text
stringlengths
28
935k
meta
stringlengths
137
139
red_pajama_subset
stringclasses
1 value
\section{Introduction} Where the problem in question came from can be found in our papers \cite{Erzin20_1,Erzin20_2}. In its refined form, it is formulated as follows. We have a set of bar charts (BCs) consisting of two bars each. Any bar has a length equal to 1, and its height does not exceed 1. Let us denote such charts as 2-BCs. It is required to find a \emph{feasible} min-length packing of all 2-BCs in a unit-height strip. If we divide the strip into equal unit-length cells, then the packing length is the number of cells in which there is at least one bar. In a feasible packing, each BC's bars do not change order and must occupy adjacent cells, but they can move vertically independently of each other. This problem was first examined in \cite{Erzin20_2}, where we described similar problems that have been well studied. Similar problems that were studied reasonably well are the bin packing problem (BPP) \cite{Baker85,Dosa07,Johnson73,Johnson85,Li97,Yue91,Yue95}, the strip packing problem (SPP)\cite{Baker80,Coffman80,Harren09,Harren14,Schiermeyer94,Steinberg97}, and the two-dimensional vector packing problem (2-DVPP) \cite{Bansal16,Christensen17,Kellerer03,Wei20}. In the BPP, a set of items $L$, each item's size, and a set of identical containers (bins) are given. All items must be placed in a minimum number of bins. BPP is a strongly NP-hard problem. However, many approximate algorithms have been proposed for it. One of the well-known algorithms is First Fit Decreasing (FFD). As part of this algorithm, objects are numbered in non-increasing order. All items are scanned in order, and the current item is placed in the first suitable bin. In 1973 was proved that the FFD algorithm uses no more than $11/9\ OPT(L)+4$ containers \cite{Johnson73}, where $OPT(L)$ is the minimal number of bins to pack the items from the set $L$. Then in 1985, the additive constant was reduced to 3 \cite{Baker85}, in 1991 it was reduced to 1 \cite{Yue91}, in 1997 it was reduced to 7/9 \cite{Li97}, and finally in 2007 was found the tight boundary of the additive constant equals 6/9 \cite{Dosa07}. A Modified First Fit Decreasing (MFFD) algorithm improves FFD. It was shown that $MFFD(L)\leq 71/60\ OPT(L)+31/6$ \cite{Johnson85}. Then the result was improved to $MFFD(L)\leq 71/60\ OPT(L)+1$ \cite{Yue95}. In the Strip Packing Problem (SPP) for each rectangle $i\in L$, we know its length and height. It is required to pack all rectangles (without rotation) in a minimum length strip. The Bottom-Left algorithm \cite{Baker80} arranges rectangles in descending order of height and yields a 3--approximate solution. In 1980 was proposed algorithms with ratio 2.7 \cite{Coffman80}. Sleator \cite{Sleator80} proposed a 2.5--approximate algorithm, and this ratio was reduced by Schiermeyer \cite{Schiermeyer94} and Steinberg \cite{Steinberg97} to 2. The smallest estimate for the ratio known to date is $(5/3+\varepsilon)OPT(L)$, for any $\varepsilon > 0$ \cite{Harren14}. The 2-DVPP is a generalization of the BPP and a particular case of 2-BCPP. It considers two attributes for each item and bin. The objective is to minimize the number of containers used. In \cite{Kellerer03} was presented a 2--approximate algorithm for 2-DVPP vector packing. In \cite{Christensen17}, one can find a survey of approximation algorithms. The best one yields a $(3/2+\varepsilon)$--approximate solution, for any $\varepsilon >0$ \cite{Bansal16}. In \cite{Erzin20_2}, we proposed an $O(n^2)$--time algorithm to build a packing for $n$ 2-BCs which length is at most $2\ OPT+1$, where $OPT$ is the minimum packing length for 2-BCPP. Then in \cite{Erzin20_3}, we presented the polynomial algorithms to solve the particular cases of the 2-BCPP when all BCs are ``big'' (at least one bar's height of each BC is more than 1/2). For the case of big non-increasing or non-decreasing BCs (when either all BCs have the first bar not less than the second, or all BCs have the second bar not less than the first), an $O(n^{3.5})$--time 3/2--approximate algorithm was proposed. For arbitrary big BCs, the $O(n^4)$--time 3/2--approximate algorithm has been proposed. The indicated time complexity characterizes the developed algorithms' time execution based on the construction of $O(n)$ matchings. To achieve the specified accuracy, one can construct only one (first) matching. Therefore, the complexity of getting the specified accuracy is $O(n^{2.5})$ and $O(n^3)$, respectively. \subsection{Our contribution} This paper updates the estimates for the packing length of big 2-BCs, keeping the time complexity. First, we give a $5/4$--approximation $O(n^{2.5})$--time algorithm for the version of 2-BCPP which we call 2-BCPP$|$1 and which contains all the instances of 2-BCPP with big non-increasing or non-decreasing 2-BCs. In 2-BCPP$|$1, we are given arbitrary (not necessarily big and not necessarily non-increasing or non-decreasing) 2-BCs, and the goal is to find a min-length packing in which two neighboring 2-BCs intersect by at most one cell on the strip. The proposed algorithm is based on an approximation-preserving reduction of 2-BCPP$|$1 to the maximum traveling salesman problem and using the result of \cite{Paluch} for the latter. It should be noted that MaxTSP is one of the most intensively researched optimization problems but has very few natural, real-life applications. 2-BCPP$|$1 can be considered as one of such applications. The second result is a $16/11$--approximation $O(n^3)$--time algorithm for 2-BCPP with big BCs. This estimate is valid for the case of ``non-strictly big'' BCs, in which at least one bar is of height at least 1/2. In obtaining this estimate, we use the known algorithm for finding a max-cardinality matching \cite{Gabow} and the proposed approximation algorithm for 2-BCPP$|$1. \vspace{0.5cm} The rest of the paper is organized as follows. Section 2 provides a statement of the 2-BCPP and necessary definitions. In Section 3, we describe a $5/4$--approximation algorithm for 2-BCPP$|$1. In Section 4, we describe a $16/11$--approximation algorithm for the case of 2-BCPP in which all the 2-BCs are non-strictly big. Section 5 concludes the paper. \section{Formulation of the problem} Let a semi-infinite strip of unit height be given on a plane in the first quadrant, the lower boundary of which coincides with the abscissa. A set $S$, $|S|=n$ of 2-BCs is also given. Each chart, $i\in S$, consists of two unit-length bars. The height of the first (left) bar is $a_i\in (0,1]$ and of the second (right) $b_i\in (0,1]$. Let us divide the strip into equal unit-length and unit-height rectangles (cells), starting from the strip's origin, and number them with integers $1,2,\ldots$. \begin{definition} \emph{Packing} is a function $p:S\rightarrow \mathbb{Z}^+$, which associates with each BC $i$ the cell number of the strip $p(i)$ into which the first bar of BC $i$ falls and the sum of the bar's heights that fall into any cell does not exceed 1. \end{definition} As a result of packing $p$, bars from 2-BC $i$ occupy the cells $p(i)$ and $p(i)+1$. \begin{definition} The packing \emph{length} $L(p)$ is the number of strip cells in which at least one bar falls. \end{definition} We assume that any packing $p$ begins from the first cell, and in each cell $1,\ldots,L(p$), there is at least one bar. If this is not the case, then the whole packing or a part of it can be moved to the left. In \cite{Erzin20_2}, we formulated 2-BCPP in the form of BLP, which we do not need in this paper. Here the problem can be formulated as follows. \vspace{0.5cm} \textbf{2-BCPP: Given an $\bm n$-element set $\bm S$ of $\bm2$-BCs, it is required to construct a packing of $S$ into a strip of minimum length, i.e., using the strip's minimum number of cells.} \vspace{0.5cm} The 2-BCPP is strongly NP-hard as a generalization of the BPP \cite{Johnson73}. Moreover, the problem is $(3/2-\varepsilon)$--inapproximable unless P=NP \cite{Vazirani01}. In \cite{Erzin20_2}, we proposed an $O(n^2)$--time algorithm, which packs the 2-BCs in the strip of length at most $2\ OPT+1$, where $OPT$ is the minimum packing length. In \cite{Erzin20_3}, we proposed two packing algorithms based on sequential matchings. Using only the first matching, one can construct a 3/2--approximate solution with time complexity $O(n^3)$ for the case when all BCs are big and with $O(n^{2.5})$ time complexity when additionally the BCs are non-increasing or non-decreasing. This paper proposes two new packing algorithms based on matching and approximation solutions to the max-weight Hamiltonian tour in the complete digraph with arcs' weight 0 or 1. If all 2-BCs are non-strictly big, one algorithm constructs a 16/11--approximate solution with time complexity $O(n^3)$. If all 2-BCs are big non-increasing or non-decreasing, then the other algorithm constructs a 5/4--approximate solution with time complexity $O(n^{2.5})$. \begin{definition} Two 2-BCs form a $t$-union if they can be placed in the strip's $4-t$ cells. \end{definition} In what follows, we will need a problem of constructing a max-weight Hamiltonian tour in a complete digraph with arc's weights 0 and 1. Let us denote this problem as MaxATSP(0,1). \section{A $5/4$--approximation for 2-BCPP limited to 1-unions} In this section, we describe a $5/4$--approximation algorithm for the version of 2-BCPP, where we are allowed to use only 0- and 1-unions: \vspace{0.5cm} \textbf{$\bm2$-BCPP$\bm{|1}$: Given an $\bm n$-element set $\bm S$ of $\bm2$-BCs, it is required to construct a min-length packing of $\bm S$ into a strip in which every pair of successive BCs forms a $\bm t$-union, where $\bm{t\le 1}$.} \vspace{0.5cm} In this version, the left and the right bars in each BC $i\in S$ may have arbitrary values $a_i,b_i\in(0,1]$. It is easy to see that 2-BCPP$|$1 contains all the instances of 2-BCPP with non-increasing (or non-decreasing) big 2-BCs. The suggested algorithm will be used not only for $2$-BCPP$|1$ but also for finding approximate solutions of $2$-BCPP with big $2$-BCs (see Sect.~4). This algorithm is based on a simple approximation-preserving reduction of $2$-BCPP$|1$ to the maximum traveling salesman problem and using known algorithmic results for the latter. It seems quite impressive in learning $2$-BCPP but also in learning MaxTSP since we give a natural, real-life application for MaxTSP, which is one of the most studied optimization problems that have almost no practical applications. \subsection{A reduction of $2$-BCPP$|1$ to MaxATSP$(0,1)$} Consider the complete weighted directed graph $G_1(S)=(S,S^2)$ in which the weight of each arc $(i,j)\in S^2$ is defined as $$\left\{ \begin{array}{cl} 1 &\mbox{if $b_i+a_j\le 1$,}\\ 0 &\mbox{otherwise.} \end{array} \right.$$ Informally speaking, the weights of the edges in $G_1(S)$ describe which pairs of BCs can form a $1$-union and which cannot. Note that, in the general case, these weights are asymmetric since $b_i+a_j$ may differ from $b_j+a_i$. Denote by ${\cal P}_1(S)$ the set of $S$ packings which consist of $0$- and $1$-unions. Then, for each packing $P\in{\cal P}_1(S)$, define the Hamiltonian cycle $H(P)$ in $G_1(S)$ with the sequence of vertices $i_1,\dots,i_n,i_1$, where $i_1,\dots,i_n$ is the sequence of $2$-BCs in $P$ in order left to right. Obviously, we have \begin{equation}\label{eq1} w(H(P))\ge k_1(P), \end{equation} where $w(.)$ is the total weight of a Hamiltonian cycle and $k_1(.)$ denotes the number of $1$-unions in a packing. Now, let $H$ be an arbitrary Hamiltonian cycle in $G_1(S)$. If $w(H)<n$, select a BC $i\in S$ such that the arc in $H$ incoming to $i$ is of zero weight; otherwise, select any chart $i\in S$. Let $i_1,\dots,i_n,i_1$ be the sequence of vertices in $H$ starting with $i_1=i$ and define the packing $P(H)$ whose sequence of charts in order left to right is $i_1,\dots,i_n$ and each pair $(i_t,i_{t+1})$, $1\le t<n$, forms a $1$-union whenever it is possible, i.e., when $b_{i_t}+a_{i_{t+1}}\le 1$. Then it is easy to see that \begin{equation}\label{eq2} k_1(P(H))=\min\{w(H),n-1\}. \end{equation} Immediate corollaries of (\ref{eq1}),\,(\ref{eq2}) are the following simple statements, which give the desired reduction to MaxATSP(0,1). \begin{lemma}\label{lem1} If $H^*$ is a max-weight Hamiltonian cycle in $G_1(S)$, then $P(H^*)$ is a min-length packing in ${\cal P}_1(S)$. \end{lemma} \begin{proof} Indeed, by (\ref{eq2}), we have $k_1(P(H^*))=\min\{w(H^*),n-1\}$. Suppose that $k_1(P)>\min\{w(H^*),n-1\}$ for some $P\in{\cal P}_1(S)$. Then, since the number of $1$-unions in any packing is at most $n-1$, we have $k_1(P)>w(H^*)$. So, by (\ref{eq1}), we obtain that $w(H(P))\ge k_1(P)>w(H^*)$, which contradicts the choice of $H^*$. The lemma is proved. \hfill$\Box$ \end{proof} \begin{lemma}\label{lem2} Suppose that $H$ is an $\alpha$--approximate solution to MaxATSP(0,1) in $G_1(S)$ for some $\alpha\in(0,1)$. Then the number of 1-unions in the packing $P(H)$ is at least $\alpha$ of that in an optimum packing in ${\cal P}_1(S)$. \end{lemma} \begin{proof} By Lemma~1, if $H^*$ is a max-weight Hamiltonian cycle in $G_1(S)$, then $P(H^*)$ is a min-length packing in ${\cal P}_1(S)$, so the number of $1$-unions in optimum packings is $k_1(P(H^*))$. On the other hand, by (\ref{eq2}), we have $$k_1(P(H))=\min\{w(H),n-1\}\ge\alpha\min\{w(H^*),n-1\}=\alpha k_1(P(H^*)).$$ The lemma is proved. \hfill$\Box$ \end{proof} By Lemma~\ref{lem2}, if $H$ is an $\alpha$--approximate solution to MaxATSP(0,1) in $G_1(S)$ and $k_1^*$ is the number of $1$-unions in an optimum packing in ${\cal P}_1(S)$, then the approximation ratio of the packing $P(H)$ is at most \begin{equation}\label{eq3} \frac{2n-\alpha k_1^*}{2n-k_1^*}\le\frac{2n-\alpha(n-1)}{2n-(n-1)}=\frac{(2-\alpha)\,n+\alpha}{n+1}<2-\alpha. \end{equation} Thus, we obtain an approximation-preserving reduction of $2$-BCPP$|1$ to the maximum traveling salesman problem with asymmetric weights $0$ and $1$, which is usually denoted MaxATSP$(0,1)$. This reduction transforms $\alpha$--approximate solutions of the corresponding instances of MaxATSP$(0,1)$ to $(2-\alpha)$--approximate solutions of $2$-BCPP$|1$. Moreover, it is easy to construct such a reduction to the partial case of MaxATSP$(0,1)$ where the input graphs are of even size. Indeed, if $n$ is odd, we will consider the set $S'=S\cup\{\tau\}$, where $\tau$ is the dummy chart with bars $a_\tau=1$ and $b_\tau=1$. \begin{lemma}\label{lem3} Suppose that $H$ is an $\alpha$--approximate solution to MaxATSP(0,1) in $G_1(S')$ for some $\alpha\in(0,1)$ and $P$ is the packing obtained from $P(H)$ by removing $\tau$. Then the number of $1$-unions in the packing $P$ is at least $\alpha$ of that in an optimum packing in ${\cal P}_1(S)$. \end{lemma} \begin{proof} Let $H^*$ be an optimum solution of MaxATSP(0,1) on $G_1(S')$. Then, by (\ref{eq2}), we have $k_1(P(H))=\min\{w(H),n\}\ge\min\{\alpha w(H^*),n\}$. But the BC $\tau$ can not be in any $1$-union, so $k_1(P)=k_1(P(H))$. At the same time, if $P^*$ is an optimum packing in ${\cal P}_1(S)$ and the sequence of charts in $P^*$ in order left to right is $i_1,\dots,i_n$, then the weight of the Hamiltonian cycle $H_\tau(P^*)=(i_1,\dots,i_n,\tau,i_1)$ in $G_1(S')$ is exactly $k_1(P^*)$. So we have $$k_1(P)=k_1(P(H))\ge\min\{\alpha w(H^*),n\}\ge\min\{\alpha w(H_\tau(P^*)),n\}=\alpha k_1(P^*).$$ The lemma is proved. \hfill$\Box$ \end{proof} Thus, if $H$ is an $\alpha$--approximate solution to MaxATSP(0,1) in $G_1(S')$ and, as before, $k_1^*$ is the number of $1$-unions in an optimum packing in ${\cal P}_1(S)$, then we obtain a solution of $2$-BCPP$|1$ on the set $S$ with approximation ratio bounded by the same expressions as in (\ref{eq3}). \subsection{An algorithm for $2$-BCPP$|1$} It remains to recall the known algorithmic results for MaxATSP$(0,1)$. Currently best approximations for MaxATSP$(0,1)$ are the $3/4$--ap\-p\-ro\-xi\-ma\-ti\-on LP-based algorithm of Bl\"{a}ser \cite{Blaser} and the $3/4$--approximation combinatorial algorithm of Paluch \cite{Paluch}. The running time of the latter algorithm is $O(n^{2.5})$ if $n$ is even and $O(n^{3.5})$ if $n$ is odd. We suggest using the above reduction to MaxTSP with an even number of vertices and applying Paluch's algorithm. The resulting algorithm for $2$-BCPP$|1$ can be described as follows:\bigskip \noindent\textbf{Algorithm~${\cal A}_1$.}\smallskip \noindent\emph{Input:} a set $S$ of $n$ 2-BCs. \emph{Output:} a packing $P\in{\cal P}_1(S)$.\medskip \noindent\emph{Step~{\rm 1}.} If $n$ is even, construct the graph $G=G_1(S)$; otherwise, construct the graph $G=G_1(S')$, where $S'=S\cup\{\tau\}$, $a_\tau=b_\tau=1$.\medskip \noindent\emph{Step~{\rm 2}.} By using the algorithm from \cite{Paluch}, find a $3/4$--approximate solution $H$ to MaxATSP(0,1) in $G$.\medskip \noindent\emph{Step~{\rm 3}.} If $n$ is even, return $P=P(H)$; otherwise, return the packing $P$ obtained from $P(H)$ by removing $\tau$.\bigskip By Lemmas \ref{lem2}, \ref{lem3} and estimate (\ref{eq3}), the approximation ratio of the packing returned by Algorithm~${\cal A}_1$ is less than $2-3/4=5/4$. So we prove \begin{theorem}\label{th5_4} Algorithm~${\cal A}_1$ finds a $5/4$--approximate solution to $2$-BCPP$|1$ in time $O(n^{2.5})$. \end{theorem} \section{A $16/11$--approximation for $2$-BCPP with big charts} This section describes a $16/11$--approximation algorithm for the case of $2$-BCPP in which all $2$-BCs are non-strictly big. Here, we assume that a chart $i$ with bars $a_i,b_i\in(0,1]$ is \emph{non-strictly big} if $\max\{a_i,b_i\}\ge 1/2$, i.e., the case when $\max\{a_i,b_i\}=1/2$ is admissible. \vspace{0.5cm} \textbf{$\bm2$-BCPP$\bm{|}$big: Given an $\bm n$-element set $\bm S$ of non-strictly big $\bm2$-BCs, it is required to construct a min-length packing of $\bm S$.} \vspace{0.5cm} Let us make some simple observations. First, it is easy to see that, since all the charts in $S$ are non-strictly big, then any two pairs of charts $\{i_1,i_2\}$ and $\{i_3,i_4\}$ which form $2$-unions in any packing of $S$ are disjoint. On the other hand, any set of disjoint pairs of charts forming $2$-unions gives a feasible solution of $2$-BCPP${|}$big. In particular, we can get such a solution by finding a max-cardinality matching $M^*$ in the graph $G_2(S)$ whose vertices are the charts of $S$ and the edges are the unordered pairs $i,j\in S$ admitting a $2$-union, i.e., for which $a_i+a_j\le 1$ and $b_i+b_j\le 1$. Let $P(M^*)$ be the packing of $S$, which consists of $0$- and $2$-unions and all $2$-unions formed by endpoints of the edges in $M^*$. The second observation is that any feasible solution of $2$-BCPP$|1$ on $S$ is also that of $2$-BCPP${|}$big. On the other hand, any feasible solution to the latter problem can be easily transformed to $2$-BCPP$|1$ as follows. If two charts $i$ and $j$ form a $2$-union and $a_i+b_j\ge a_j+b_i$, then we shift the BC $j$ and all the charts lying to the right of it one cell right. As a result, we get one cell with content height $b_i+a_j\le(a_i+b_j+a_j+b_i)/2\le 1$, while the content of the other cells does not increase. So we get a feasible packing where the pair $(i,j)$ of BCs forms a $1$-union. Denote the packing constructed by the described processing of all $2$-unions in $P$ as $\Gamma(P)$. Then $\Gamma(P)\in{\cal P}_1(S)$ and the number of $1$-unions in $\Gamma(P)$ is exactly the total number of $1$- and $2$-unions in $P$. If an optimum solution of $2$-BCPP${|}$big contains a small number of $1$-unions and a significant number of $2$-unions, this packing is not much shorter than $P(M^*)$. If, on the contrary, an optimum solution of $2$-BCPP${|}$big contains a significant number of $1$-unions and a small number of $2$-unions, then it is not much shorter than an optimum solution of $2$-BCPP$|1$. So the best of $P(M^*)$ and an optimum of $2$-BCPP$|1$ may be a relatively right solution to $2$-BCPP${|}$big. Based on this hypothesis, we suggest the following algorithm:\bigskip \noindent\textbf{Algorithm~${\cal A}_2$.}\smallskip \noindent\emph{Input:} a set $S$ of $n$ big 2-BCs. \emph{Output:} a packing $P$ of $S$.\medskip \noindent\emph{Step~{\rm 1}.} By using the algorithm from \cite{Gabow}, construct a max-cardinality matching $M^*$ in $G_2(S)$.\medskip \noindent\emph{Step~{\rm 2}.} By using Algorithm~${\cal A}_1$, find an approximate solution $P_1$ to $2$-BCPP$|1$ on $S$.\medskip \noindent\emph{Step~{\rm 3}.} If the length of $P(M^*)$ is less than that of $P_1$, return $P=P(M^*)$; otherwise, return $P=P_1$.\smallskip \begin{theorem}\label{th16_11} Algorithm~${\cal A}_2$ finds a $16/11$--approximate solution to $2$-BCPP$|$big in time $O(n^3)$. \end{theorem} \begin{proof} Let $P^*$ be a min-length packing of $S$. Denote by $k_1$ and $k_2$ the numbers of $1$- and $2$-unions in $P^*$, respectively. Then, since the $2$-unions in $P^*$ form a matching in $G_2(S)$, the cardinality of $M^*$ is at least $k_2$. Therefore, the length of $P(M^*)$ is at most $2n-2k_2$. Next, we estimate the length of $P_1$. By the construction of the packing $\Gamma(P^*)$, we have $k_1(\Gamma(P^*))=k_1+k_2$. By the description of Algorithm~${\cal A}_1$ and Lemmas \ref{lem2} and~\ref{lem3}, the number of $1$-unions in $P_1$ is at least $3/4$ of that in any packing in ${\cal P}_1(S)$. In particular, we have $$k_1(P_1)\ge(3/4)\,k_1(\Gamma(P^*))=(3/4)(k_1+k_2).$$ So the length of the packing $P_1$ is at most $2n-(3/4)(k_1+k_2)$. At the same time, it is easy to see that the length of $P^*$ is $2n-k_1-2k_2$. Moreover, as shown in \cite{Erzin20_3}, this length is at least $n$. It follows that the approximation ratio of the solution returned by Algorithm~${\cal A}_2$ is at most \begin{equation}\label{16_11_1} \frac{\min\{2n-2k_2,\ 2n-(3/4)(k_1+k_2)\}}{2n-k_1-2k_2}, \end{equation} where $2n-k_1-2k_2\ge n$ or, equivalently, where $k_1\le n-2k_2$. Obviously, the maximum value of expression (\ref{16_11_1}) is attained at the maximum possible value of $k_1$, i.e., when $k_1=n-2k_2$. Therefore, this expression is bounded by \begin{equation}\label{16_11_2} \frac{\min\{2n-2k_2,\ 2n-(3/4)(n-k_2)\}}{n}. \end{equation} Next, the values $2n-2k_2$ and $2n-(3/4)(n-k_2)$ are decreasing and increasing functions of $k_2$ respectively, while the denominator in the expression (\ref{16_11_2}) does not depend on~$k_2$. It follows that the maximum of this expression is attained when $2n-2k_2=2n-(3/4)(n-k_2)$, i.e., when $k_2=(3/11)n$. So the approximation ratio of Algorithm~${\cal A}_2$ is at most $$\frac{2n-2(3/11)n}{n}=16/11.$$ It remains to note that finding a max-cardinality matching at Step~1 by the algorithm from \cite{Gabow} takes time $O(n^3)$, while Step~2 is performed in time $O(n^{2.5})$ by Theorem~\ref{th5_4}. Thus, the running time of Algorithm~${\cal A}_2$ is $O(n^3)$. The theorem is proved. \hfill$\Box$ \end{proof} \begin{remark} The packing returned by Algorithm~${\cal A}_2$ contains either $1$- or $2$-unions. So this packing is also an approximate solution of the version of $2$-BCPP where, given arbitrary $2$-BCs (not necessarily big), it is required to find a min-length packing, in which every cell of the strip contains at most two bars of different charts. Note that, using a slightly modified algorithm based on the same ideas, easy to get a $19/14$--approximation of this version. \end{remark} \begin{remark} It can be easily proved that, if we are given an oracle which returns an optimum solution to $2$-BCPP$|1$, e.g., if we can solve MaxATSP$(0,1)$ exactly, then the best of $P(M^*)$ and an optimum of $2$-BCPP$|1$ is a $4/3$--approximate solution to $2$-BCPP$|$big. \end{remark} \section{Conclusion} We considered a problem in which it is necessary to pack $n$ two-bar charts (2-BCs) in a unit-height strip of minimum length. The problem is a generalization of the bin packing problem and 2-D vector packing problem. Earlier, we proposed an $O(n^2)$--time algorithm, which builds a packing of length at most $2\ OPT+1$ for arbitrary 2-BCs, where $OPT$ is the minimum length of the packing. Then, we proposed an $O(n^{3.5})$-- and $O(n^4)$--time packing algorithms based on the sequential matchings. Using only the first matching, one can construct a 3/2--approximate solution with time complexity $O(n^3)$ for big BCs (when each BC has at least one bar of height greater than 1/2) and with $O(n^{2.5})$ time complexity when additionally the BCs are non-increasing or non-decreasing. This paper proposes two new packing algorithms based on matching and constructing an approximate solution to the MaxATSP(0,1). We prove that for packing arbitrary non-strictly big 2-BCs (the height of at least one bar of each BC is not less than 1/2), one algorithm constructs a 16/11--approximate solution with time complexity $O(n^3)$. If all 2-BCs are big (at least one bar of each BC has a height greater than 1/2) non-increasing or non-decreasing, then another algorithm constructs a 5/4--approximate solution with time complexity $O(n^{2.5})$. We plan to conduct a numerical experiment to compare the solutions constructed by various approximation algorithms with the optimal solution yielded by the software package for BLP (for example, CPLEX) \cite{Erzin20_2}. We are also planning to obtain a new accuracy estimate for the 2-BCPP problem with arbitrary 2-BCs.
{'timestamp': '2021-01-05T02:18:09', 'yymm': '2101', 'arxiv_id': '2101.00470', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00470'}
arxiv
\section{Main evaluation on HoVer} \label{sec:hover-eval} We now conduct our primary evaluation, applying Baleen{} on the many-hop claim verification dataset HoVer, following the evaluation protocol of \citet{jiang2020hover}. First, we study the retrieval performance of Baleen{} in~\secref{sec:hover-eval:retrieval}. Subsequently (\secref{sec:hover-eval:e2e}), we investigate its sentence extraction and claim verification performance, which constitutes a test of overall end-to-end system effectiveness. We compare a four-hop Baleen{} system against the official baseline and the strong ColBERT-Hop baseline from \secref{sec:hotpotqa-eval}.\footnote{At the time of writing, MDR's open-source implementation only supports two-hop retrieval and the IRRR implementation is not publicly available. Moreover, both \citet{xiong2020answering} and \citet{qi2020retrieve} explore training only with \textit{two} gold passages, though IRRR includes evaluation on a yet-unreleased 3-hop test set.} See Appendix~\secref{appendix:hyperparameters} for implementation details and hyperparameters. \subsection{Task description} \label{sec:hover-eval:task} The input to the model is a claim, which is often one or a few sentences long. The model is to attempt to verify this claim, outputting ``Supported'' if the corpus contains enough evidence to verify the claim, or otherwise ``Unsupported'' if the corpus contradicts---or otherwise fails to support---this claim. Alongside this binary label, the model must extract facts (i.e., sentences) that justify its prediction. In particular, HoVer contains two-, three-, and four-hop claims that require facts from 2--4 different Wikipedia pages, and the model must find and extract one or more supporting facts from \textit{each} of these pages for every claim. Models are not given the number of hops per claim. % \subsection{Evaluating retrieval effectiveness} \label{sec:hover-eval:retrieval} \input{tables/hover-passages} Table~\ref{table:hover-eval:document-retrieval} reports the retrieval and passage extraction quality of the systems. We report three metrics, each sub-divided by the number of hops of each claim. The first is \textit{Retrieval@100}, which is the percentage of claims for which the system retrieves \textit{all} of the relevant passages within the top-100 results. To compare with \citet{jiang2020hover}, we report the Retrieval@100 results only for supported claims. All other metrics are reported for all claims. The second metric is \textit{Passage EM}, which is the percentage of claims for which the system can provide the \textit{exact} set of relevant passages. The third metric is \textit{Passage F1}, which uses the standard F1 measure to offer a relaxed version of EM. % At the top of the table, the TF-IDF baseline retrieves top-100 results in one round of retrieval. At the bottom of the table, we include the results reported by \citet{jiang2020hover} for their BERT ranking model when supplied with oracle retrieval, and also their reported human performance. We show Baleen{}'s performance after four hops, where Baleen{}'s FLIPR retrieves 25 passages in each hop. Note that we exclude passages retrieved in hop $t$ from the retrieval in further hops $t' > t$. As the table shows, Baleen{} achieves strong results, outperforming the official baseline model by 47.6 points in Retrieval@100, 51.1 points in Passage EM, and 29.0 points in Passage F1. In fact, Baleen{}'s performance also consistently exceeds ``Oracle~+~BERT'' at passage extraction. \subsection{Evaluating end-to-end effectiveness} \label{sec:hover-eval:e2e} \input{tables/hover-sentences} Next, we evaluate the performance of fact/sentence extraction and thereby the end-to-end claim verification of Baleen{}. The results are in Table~\ref{table:hover-eval:sentence-retrieval}, where \textit{Sentence EM} and \textit{Sentence F1} are defined similar to the corresponding metrics in Table~\ref{table:hover-eval:document-retrieval} but focus on sentence-level extraction. Moreover, \textit{Verification Accuracy} is the percentage of claims that are labelled correctly as ``Supported'' or ``Unsupported''. In Table~\ref{table:hover-eval:sentence-retrieval}, we see that Baleen{}'s sentence-level results mirror its document-level results, with large performance gains across the board against the baseline model. Baleen{} also outperforms the oracle-retrieval BERT model of \citet{jiang2020hover}, emphasizing the strong retrieval and condensing performance of Baleen{}. In the leaderboard test-set evaluation (scores expected to be posted soon), Baleen increases the overall ``HoVer Score'' metric from 15.3 for the baseline to 57.5. \subsection{Ablation studies} \label{sec:hover-eval:ablations} Lastly, Table~\ref{table:hover-eval:ablations} reports various settings and ablations of Baleen{}, corresponding to its contributions. Here, models \textbf{A} and \textbf{F} are simply the four-hop Baleen{} and ColBERT-Hop in the previous experiments, respectively. Models \textbf{B} and \textbf{C} test the effect of different architectural decisions on Baleen{}. In particular, model \textbf{B} replaces our condensed retrieval architecture with a simpler re-ranking architecture (Appendix~\secref{appendix:pipelines}), which reflects a common design choice for multi-hop systems. In this case, FLIPR is given the top-ranked passage as context in each hop, helping expose the value of extracting facts in condensed retrieval, which exhibits much shorter contexts as we show in Appendix~\secref{appendix:efficiency}. Second, model \textbf{C} trains a FLIPR retriever that uses both a condenser pipeline and a reranking pipeline independently, and then retains the overall top-100 unique passages retrieved (Appendix~\secref{appendix:pipelines}). The results suggest that condensing offers complimentary gains, and the hybrid model attains the highest scores. Moreover, models \textbf{D} and \textbf{E} test modifications to the retriever, while using the condenser of model \textbf{A}. Specifically, model \textbf{D} replaces our FLIPR retriever with a simpler ColBERT retriever, while retaining all other components of our architecture. This allows us to contrast our proposed focused late interaction with the ``vanilla'' late interaction of ColBERT. Further, model \textbf{E} replaces our weak-supervision strategy for inferring effective hop orders with a hand-crafted rule (Appendix~\secref{appendix:heuristic-ordering}) that deliberately exploits a construction bias in HotPotQA and HoVer, namely that passage titles can offer a strong signal for hop ordering. % \input{tables/ablations} \section{Discussion} \label{sec:discussion} \paragraph{Research limitations} This work investigates multi-hop reasoning at a large scale by focusing on the challenges presented by retrieval in this setting. While \textit{reading} the retrieved (or supplied) passages to solve a downstream task is another important aspect, one that has received more attention in the literature, we do not attempt to advance the state of the art approaches for multi-hop reader models. The majority of multi-hop retrieval work to date has focused on two-hop retrieval. We leverage the recently-released HoVer dataset to scale our investigation to four retrieval hops, and Baleen allows for an arbitrary number of hops in principle, but more evaluation is needed before we can claim generality to an arbitrary number of hops. We propose a condenser architecture that summarizes contexts extractively. This architectural decision allows us to scale easily to many hops as it condenses the hop information into a short context, but doing so relies on the availability on sentence-level training information (as in HotPotQA and HoVer) and extracting sentences might in principle lose important context. We expect future work to be able to infer the sentence-level labels in a latent manner and we are excited about work like decontextualization~\cite{choi2021decontextualization} that tries to retain important context for standalone sentences. Lastly, considering that learning neural retrievers for large-scale many-hop tasks is a recently-emerging topic, we had to design our own strong baseline to strengthen our HoVer evaluation, after confirming that our baseline was very strong on HotPotQA. \paragraph{Environmental and societal impact} By turning to retrieval from text corpora (see~\secref{sec:system:colbert}) as a mechanism to find and use knowledge, we seek to build scalable and efficient models that can reason and solve downstream tasks with concrete, checkable provenance from text sources and without growing the models' number of trainable parameters dramatically. We use Wikipedia, which has favorable licensing (generally under CC BY-SA 3.0), and publicly-released datasets HoVer and HotPotQA (CC BY-SA 4.0 licenses). HotPotQA and HoVer are crowd-sourced, and we expect models trained on them to reflect the biases of the underlying data. Moreover, automated systems for answering questions or verifying claims can have misleading outputs or may even be abused. That said, we believe that focusing on retrieval and extractive models as a way to help users find information can offer net gains to society, especially in contrast with large generative models that may hallucinate or make statements ungrounded in a human-written corpus. \section{Conclusion} \label{sec:conclusion} In this paper, we propose Baleen{}, a system for multi-hop reasoning that tackles the complexity of multi-hop queries with the \textit{focused late interaction} mechanism for retrieval and mitigates the exponential search space problem by employing an aggressive \textit{condensed retrieval} pipeline in every hop, which consolidates the pertinent information retrieved throughout the hops into a relatively short context while preserving high recall. Moreover, Baleen{} deals with the difficulty of ordering passages for many-hop supervision via \textit{latent hop ordering}. By employing a strong retriever, incorporating a condenser, and avoiding brittle heuristics, Baleen{} can robustly learn from limited training signal. We evaluated Baleen{}'s retrieval on HotPotQA and the recent many-hop HoVer claim verification dataset and found that it greatly outperforms the baseline models. \section{Background and related work} \label{sec:background} \paragraph{Open-domain reasoning} \label{sec:background:open-domain-reasoning} There is significant recent interest in NLP models that can solve tasks by retrieving evidence from a large corpus. The most popular such task is arguably open-domain question answering (OpenQA; \citet{chen2017reading}), which extends the well-studied machine reading comprehension (MRC) problem over supplied question--passage pairs to answering questions given only a large text corpus like Wikipedia. Other open-domain tasks span claim verification (e.g., FEVER; \citet{thorne2018fever}), question generation (e.g., with Jeopardy as in~\citet{lewis2020retrieval}), and open dialogue (e.g., Wizard of Wikipedia; \citet{dinan2018wizard}), among others. Many of these datasets are compiled in the recently-introduced KILT benchmark~\citep{petroni2020kilt} for \textit{knowledge-intensive} tasks. Among models for these tasks, the most relevant to our work are OpenQA models that include \textit{learned} retrieval components. These include ORQA~\citep{lee2019latent}, REALM~\citep{guu2020realm}, and DPR~\citep{karpukhin2020dense}. \citet{lewis2020retrieval} introduced RAG, which by virtue of a seq2seq architecture can tackle OpenQA as well as other open-domain problems, including claim verification and question generation. % \paragraph{Multi-hop open-domain reasoning} \label{sec:background:multihop-datasets} Most of the open-domain tasks from~\secref{sec:background:open-domain-reasoning} can be solved by finding \textit{one} relevant passage in the corpus, often by design. In contrast, a number of recent works explore multi-hop reasoning over multiple passages. These include QAngaroo~\citep{welbl2018constructing} and 2WikiMultiHopQA~\citep{Ho2020ConstructingAM}, among others. While thus ``multi-hop'', these tasks supply the relevant passages for each example (possibly with small set of ``distractor'' candidates), and thus do not require retrieval from a large corpus. To our knowledge, HotPotQA was the first large-scale open-domain multi-hop task, particularly in its retrieval-oriented ``fullwiki'' setting. HotPotQA catalyzed much follow-up research. However, it is limited to only two-hop questions, many of which may not require strong multi-hop reasoning capabilities (see~\citet{chen2019understanding}; \citet{wang2019multi}), softening the retrieval challenges discussed in \secref{sec:introduction}. Very recently, \citet{jiang2020hover} introduced the HoVer many-hop verification dataset, which contains two-, three-, and four-hop examples. HoVer contains just over 18,000 training examples, about 5$\times$ smaller than HotPotQA, adding to the challenge posed by HoVer. \paragraph{Multi-hop open-domain models} \label{sec:background:multihop-models} To conduct the ``hops'', many prior multi-hop systems (e.g., \citet{asai2019learning,zhao2019transformer}) assume explicit links that connect every passage with related entities. We argue that this risks tying systems to link-structured knowledge bases (like Wikipedia) or producing brittle architectures tailored for datasets constructed by following hyperlinks (like HotPotQA). Recently, \citet{xiong2020answering} and \citet{qi2020retrieve} introduce MDR and IRRR, state-of-the-art systems that assume no explicit link structure. Instead, they use an \textit{iterative retrieval} paradigm---akin to that introduced by \citet{das2018multi} and \citet{feldman2019multi}---that retrieves passages relevant to the question, reads these passages, and then formulates a new query for another hop if necessary. We adopt this iterative formulation and tackle three major challenges for multi-hop retrieval. \paragraph{ColBERT: late interaction paradigm} \label{sec:system:colbert} Most learned-retrieval systems for OpenQA (\secref{sec:background:open-domain-reasoning}) encode every query and passage into a \textit{single} dense vector. \citet{khattab2020colbert} argue that such single-vector representations are not sufficiently expressive for retrieval in many scenarios and introduce \textit{late interaction}, a paradigm that represents every query and every document at a finer granularity: it uses a vector \textit{for each constituent token}. Within this paradigm, they propose ColBERT, a state-of-the-art retriever wherein a BERT encoder embeds the query into a matrix of $N$ vectors (given $N$ tokens) and encodes every passage in the corpus as matrix of $M$ vectors (for $M$ tokens per passage). The passage representations are query-independent and thus are computed offline and indexed for fast retrieval. During retrieval with query $q$, ColBERT assigns a score to a passage $d$ by finding the maximum-similarity (MaxSim) score between each vector in $q$'s representation and \textit{all} the vectors of $d$ and then summing these MaxSim scores. This MaxSim-decomposed interaction enables scaling to massive collections with millions of passages, as the token-level passage vectors can all be indexed for fast nearest-neighbor search. \citet{khattab2020colbert} find this fine-grained matching to outperform single-vector representations, a finding extended to open-domain question answering by \citet{khattab2021relevance}. In this work, we propose FLIPR (\secref{sec:system:retriever}), a retriever with an improved late interaction mechanism for complex multi-hop queries. Whereas existing retrievers, whether traditional (e.g., TF-IDF) or neural \citep{lee2019latent,karpukhin2020dense,khattab2020colbert}, seek passages that match \textit{all} of the query, multi-hop queries can be long and noisy and need to match disparate contexts. FLIPR handles this explicitly with \textit{focused} late interaction. \paragraph{Relevance-guided supervision} \label{sec:system:RGS} \citet{khattab2021relevance} propose an iterative strategy for weakly-supervising retrievers called relevance-guided supervision (RGS). RGS assumes that no labeled passages are supplied for training the retriever. Instead, every training question is associated with a short answer string whose presence in a passage is taken as a weak signal for relevance. RGS starts with an off-the-shelf retriever and uses it to collect the top-$k$ passages for each training question, dividing these passages into positive and negative examples based on inclusion of the short answer string. These examples are used to train a stronger retriever, which is then used to repeat this process one or two times. We draw inspiration from RGS when designing latent hop ordering: unlike RGS, we \textit{do} have gold-labeled passages for training but we crucially have multiple hops, whose order is not given. Lastly, our supervision for the \textit{first hop} shares inspiration with GoldEn~\citep{qi2019answering}. GoldEn uses a bag-of-words model---and thus effectively term overlap---to identify the ``more easily retrieved'' passage among just two for the two-hop task HotPotQA. \section{Introduction} \label{sec:introduction} In \textit{open-domain} reasoning, a model is tasked with retrieving evidence from a large corpus to answer questions, verify claims, or otherwise exhibit broad knowledge. In practice, such open-domain tasks often further require \textit{multi-hop} reasoning, where the evidence must be extracted from two or more documents. To do this effectively, a model must learn to use \textit{partial} evidence it retrieves to bridge its way to additional documents leading to an answer. In this vein, HotPotQA~\citep{yang-etal-2018-hotpotqa} contains complex questions answerable by retrieving two passages from Wikipedia, while HoVer~\citep{jiang2020hover} contains claims that can only be verified (or disproven) by combining facts from up to four Wikipedia passages. Table~\ref{table:multihop-example} illustrates this using the claim \textit{``The MVP of [a] game Red Flaherty umpired was elected to the Baseball Hall of Fame''} from the HoVer validation set. To verify this claim, a HoVer model must identify facts spread across three Wikipedia pages: \textit{Red Flaherty} umpired in the World Series in 1955, 1958, 1965, and 1970. The MVP of the \textit{1965 World Series} was \textit{Sandy Koufax}. Koufax was later elected to the Baseball Hall of Fame. This three-hop claim illustrates three major challenges in multi-hop retrieval. First, \textit{multi-hop queries encompass multiple information needs}; the claim above referenced facts from three disparate passages. Second, \textit{retrieval errors in each hop propagate to subsequent hops}. This can happen if the model directly retrieves information about the Baseball Hall of Fame, confuses Red Flaherty with, say, Robert Flaherty, or singles out the MVP of, say, the \textit{1958} World Series, which Flaherty also umpired. Third, due to the dependency between hops, \textit{retrievers must learn an effective sequence of hops}, where previously-retrieved clues lead to other relevant passages. These inter-passage dependencies can be non-obvious for \textit{many-hop} problems with three or more passages, and are often left unlabeled, as it can be expensive to annotate one (or every) sequence in which facts could be retrieved. % \input{tables/example} These challenges call for highly expressive query representations, robustness to retrieval errors, and scalability to many hops over massive document collections. Existing systems fall short on one or more of these criteria. For instance, many state-of-the-art systems rely on bag-of-words \citep{qi2020retrieve} or single-vector dot-product \citep{xiong2020answering} retrievers, whose capacity to model an open-domain question is limited \citep{khattab2021relevance}, let alone complex multi-hop queries. Furthermore, existing systems embed trade-offs when it comes to ``hopping'': they employ brittle greedy search, which limits recall per hop; or they employ beam search over an exponential space, which reduces scalability to many hops; or they assume explicit links that connect every passage with related entities, which ties them to link-structured corpora. Lastly, to order the hops, many systems use fragile supervision heuristics (e.g., finding passages whose page titles appear in other passages) tailored for particular datasets like HotPotQA. % We tackle these problems with \textbf{Baleen{}},\footnote{\url{https://github.com/stanford-futuredata/Baleen} \\ In marine biology, ``baleen'' refers to the filter-feeding system that baleen whales use to capture small organisms, filtering out seawater. So too does our system seek to capture relevant facts from a sea of documents.} a scalable multi-hop reasoning system that improves accuracy and robustness. We introduce a \textit{condensed retrieval} architecture, where the retrieved facts from each hop are summarized into a short context that becomes a part of the query for subsequent hops, if any (Table~\ref{table:multihop-example}). Unlike beam search, condensed retrieval allows effective scaling to many hops, and we find that it complements greedy search (i.e., taking the best passage per hop) in improving recall considerably. We then tackle the complexity of queries by proposing a \textit{focused late interaction} passage retriever (\textbf{FLIPR}), a robust learned search model that allow different parts of the same query representation to match disparate relevant passages. FLIPR inherits the scalability of the vanilla late interaction paradigm of ColBERT~\citep{khattab2020colbert} but uniquely allows the same query to exhibit tailored matching patterns against each target passage. Lastly, we devise \textit{latent hop ordering}, a weak-supervision strategy that uses the retriever itself to select effective hop paths. We first test Baleen{} on the two-hop HotPotQA benchmark, finding evidence of saturation in retrieval: we achieve 96.3\% answer recall in the top-20 retrieved passages, up from 89.4\% for existing work. We then test Baleen{}'s ability to scale accurately to more hops, reporting our main results using the recent many-hop HoVer task. We build a strong \textit{many-hop} baseline model that combines recent results from the open-domain question answering~\citep{khattab2021relevance} and multi-hop~\citep{qi2020retrieve} literatures. This baseline combines ColBERT retrieval and standard greedy search with an ELECTRA~\citep{clark2020electra} re-ranker, and generalizes typical text-based heuristics to order the hops for training. After verifying its strong results on HotPotQA, we show that it outperforms the official TF-IDF~+~BERT baseline of HoVer by over 30 points in retrieval accuracy. Against this strong baseline itself, Baleen{} improves passage retrieval accuracy by another 17 points, raising it to over 90\% at $k=100$ passages. Baleen{} also improves the evidence extraction F1 score dramatically, outperforming even the \textit{oracle retrieval} + BERT results by \citet{jiang2020hover}. Our ablations (\secref{sec:hover-eval:ablations}) show that Baleen{}'s FLIPR retriever, condenser architecture, and latent supervision are essential to its strong performance. \section{Baleen{}} \label{sec:system} We now introduce Baleen{}, which uses an iterative retrieval paradigm to find relevant facts in $T \geq 1$ successive hops. On HotPotQA (\secref{sec:hotpotqa-eval}) and HoVer (\secref{sec:hover-eval}), we use Baleen{} with $T=2$ and $T=4$, respectively. As illustrated in Table~\ref{table:multihop-example}, the input to Baleen{} is a textual \textit{query} $Q_0$ like a question to answer or a claim to verify. The goal of hop $t$ is to take in query $Q_{t-1}$ and output an updated query $Q_t$ containing the initial input query \textit{and} pertinent facts extracted from the $t$ hops. The Baleen{} architecture is depicted in Figure~\ref{fig:system:Architecture}. In every hop, FLIPR (\secref{sec:system:retriever}) uses $Q_{t-1}$ to retrieve $K$ passages from the full corpus. These passages are fed into a two-stage \textit{condenser} (\secref{sec:system:condenser}), which reads these passages and extracts the most relevant \textit{facts}, which we model as individual sentences. The facts are collected into a single sequence and added to $Q_t$ for the subsequent hop, if any. Once all hops are complete, Baleen{}'s task-specific \textit{reader} processes $Q_T$, which now contains the query and all condensed facts, to solve the downstream task. If desired, the top-$k$ passages from each hop can also be collected and fed to a downstream model after retrieval is complete. Baleen{}'s retriever, condenser, and reader are implemented as Transformer encoders~\citep{Vaswani-etal:2017} and are trained individually. We use BERT-base~\citep{devlin-etal-2019-bert} for FLIPR and, like \citet{qi2020retrieve} and \citet{xiong2020answering}, use ELECTRA-large~\citep{clark2020electra} for the other components. For supervision, we introduce the \textit{latent hop ordering} scheme (\secref{sec:system:supervision}). % \subsection{FLIPR: focused late interaction} \label{sec:system:retriever} The FLIPR encoders and interaction mechanism are shown in Figure~\ref{fig:system:FLIPR}. Our query encoder reads $Q_{t-1}$ and outputs a vector representation of every token in the input. Each query embedding interacts with all passage embeddings via a MaxSim operator, permitting us to inherit the efficiency and scalability of ColBERT~\cite{khattab2020colbert}. While vanilla ColBERT sums all the MaxSim outputs indiscriminately, FLIPR considers only the strongest-matching query embeddings for evaluating each passage: it sums only the top-$\hat{N}$ partial scores from $N$ scores, with $\hat{N} < N$. We refer to this top-$k$ filter as a ``focused'' interaction. Intuitively, it allows the same query to match multiple relevant passages that are contextually unrelated, by aligning---during training and inference---a different subset of the query embeddings with different relevant passages. These important subsets of the query are not always clear in advance. For instance, $Q_1$ in Table~\ref{table:multihop-example} should find the page about the 1965 World Series. This requires ignoring many distractions (e.g., World Series 1970 and Baseball Hall of Fame) that seem important in isolation while focusing on other phrases, namely a prominent ``MVP'' and the World Series 1965, a distinction evident only \textit{after} finding the document and attempting to match it against the query. FLIPR applies this mechanism over the representation of the query and the facts separately, keeping the top-$\hat{N}$ and top-$\hat{L}$ from $N$ and $L$ embeddings, respectively. More formally, the FLIPR score $S_{q,d}$ of a passage $d$ given a query $q$ is the summation $S_{q,d} = S^Q_{q,d} + S^F_{q,d} $ over the scores corresponding to the original query and to the facts. Define $M^Q_i = \max_{j=1}^{m} E_{q_i} \cdot E_{d_j}^{T}$, that is, the maximum similarity of the $i^{th}$ query embedding against the passage embeddings. The partial score $S^Q_{q,d}$ is computed as \begin{equation} \label{eq:scorer-partial} S^Q_{q,d} = \sum_{i=1}^{\hat{N}} \textrm{top}_{\hat{N}} \left\{ M^Q_i : i \in [N] \right\} \end{equation} where $\textrm{top}_{\hat{N}}$ is an operator that keeps the largest $\hat{N}$ values in a set. We define $S^F_{q,d}$ similarly, using the fact matches $M^F_i$ instead of $M^Q_i$. We confirm the gains of FLIPR against the state-of-the-art ColBERT retriever in~\secref{sec:hover-eval:ablations}. By decomposing retrieval into token-level maximum similarities and pre-computing document representations, FLIPR maintains the scalability of the late interaction paradigm of ColBERT, reducing the candidate generation stage of retrieval into highly-efficient approximate $k$-nearest neighbor searches. See Appendix~\secref{appendix:flipr} for the implementation details of FLIPR. \begin{figure}[] \centering \includegraphics[width=0.99\textwidth]{figs/FLIPR.pdf} \caption{The proposed FLIPR retriever. Sub-figure (a) depicts our encoders, which represent every query and every passage as a \textit{set} of embeddings. Given query $q$ and document $d$, sub-figure (b) illustrates our \textit{focused} late-interaction mechanism. It finds the maximum-similarity score of each query embedding $\mathbf{q}_i$ and then \textit{focuses} on the top-$k$ matches only. This is analogously applied to the fact embeddings $\textbf{f}_j$ (in orange), and both scores are finally added.} \label{fig:system:FLIPR} \end{figure} \subsection{Supervision: latent hop ordering} \label{sec:system:supervision} For every training example, our datasets supply \textit{unordered} gold passages. However, dependencies often exist in retrieval as Table~\ref{table:multihop-example} illustrates: a system needs to retrieve and read the page of \textit{Red Flaherty} to deduce that it needs information about \textit{1965 World Series}. Such dependencies can be complex for 3- and 4-hop examples, as in HoVer, especially as multiple passages may be appropriate to retrieve together in the same hop. We propose a generic mechanism for identifying the best gold passage(s) to learn to retrieve next. The key insight is that among the gold passages, a weakly-supervised retriever with strong inductive biases would reliably ``prefer'' those passages it can more naturally retrieve, given the hops so far. Thus, given $Q_{t-1}$, we train the retriever with \textit{every} remaining gold passage and, among those, label as positives (for $Q_{t-1}$) only those ranked highly by the model. We subsequently use these weakly-labeled positives to train another retriever for all the hops. \input{tables/LHO} Latent hop ordering is summarized in Algorithm~\ref{algo:LHO}, which assumes we have already trained a single-hop (i.e., first-hop) retriever $R_1$ in the manner of relevance-guided supervision (see \secref{sec:system:RGS}). To start, we use $R_1$ to retrieve the top-$k$ (e.g., $k=1000$) passages for each training question (Line~2). We then divide these passages into positives $P_1$ and negatives $N_1$ (Line~3). Positives are the highly-ranked gold passages (i.e., the intersection of gold passages and the top-$\hat{k}$ passages with, e.g., $\hat{k} = 10$) and negatives are the non-gold passages. Subsequently, we expand first-hop queries with the oracle facts from $P_1$ to obtain the queries for the second hop (Line~4). We train a second-hop retriever $R_2$ using the aforementioned queries and negatives (Line~6). As we do not have second-hop positives, as a form of weak supervision, we train the retriever with \textit{all} gold passages (per query) besides those already in $P_1$. Once trained, we use $R_2$ to discover the second-hop positives $P_2$, to collect negatives $N_2$, and to expand the queries (Lines~7~and~8). We repeat this procedure for the third hop onward. Once this iterative procedure is complete, we have bootstrapped positives (and negatives) corresponding to every retrieval hop for each query. We combine these sets to train a single multi-hop retriever (Lines~10~and~11), which takes a query $Q_{t-1}$ and learns to discriminate the positives in $P_t$ from the negatives in $N_t$ for every $t \in [T]$. In~\secref{sec:hover-eval:ablations}, we indeed find that this \textit{generic} latent procedure outperforms a typical hand-crafted heuristic that relies on trying to match titles against the text. \subsection{Condenser: per-hop fact extraction} \label{sec:system:condenser} After each hop, the condenser proceeds in two stages. In the first stage, it reads $Q_{t-1}$ and each of the top-$K$ passages retrieved by FLIPR. The input passages are divided into their constituent sentences and every sentence is prepended with a special token. The output embedding corresponding to these sentence markers are scored via a linear layer, assigning a score to each sentence in every retrieved passage. We train the first-stage condenser with a cross-entropy loss over the sentences of two passages, a positive and a negative. Across the $K$ passages, the top-$k$ facts are identified and concatenated into the second-stage condenser model. As above, we include special tokens between the sentences, and the second-stage condenser assigns a score to every fact while attending jointly over all of the top-$k$ facts, allowing a direct comparison within the encoder. Every fact whose score is positive is selected to proceed, and the other facts are discarded. We train the second-hop condenser over a set of 7--9 facts, some positive and others (sampled) negative, using a linear combination of cross-entropy loss for each positive fact (against all negatives) and binary cross-entropy loss for each individual fact. In practice, this condensed architecture offers novel tradeoffs against a re-ranking pipeline. On one hand, condensed retrieval scales better to more hops, as it represents the facts from $K$ long passages using only a few sentences. This may provide stronger interpretability, as the inputs to the retriever (e.g., the example in Table~\ref{table:multihop-example}) become more focused. On the other hand, re-ranking requires only passage-level labels, which can be cheaper to collect, and provides the retriever with broader context, which can help resolve ambiguous references. Empirically, we find the two approaches to be complementary. In~\secref{sec:hover-eval:ablations}, we show that condensing is competitive with re-ranking (despite much shorter context; Appendix~\secref{appendix:efficiency}) and that a single retriever that combines both pipelines together substantially outperforms a standard rerank-only pipeline. \subsection{Reader: task-specific processing} \label{sec:system:reader} After all hops are conducted, a reader is used to extract answers or verify the claim. We use a standard Transformer encoder, in particular ELECTRA-large \citep{clark2020electra}, which we feed the final output $Q_t$ of our multi-hop retrieval and condensing pipeline. We train for question answering similar to \citet{khattab2021relevance} or claim verification similar to \citet{jiang2020hover}. \section*{Appendices for Baleen} % \section{Data Details} \label{appendix:data} \begin{table}[ht] \caption{Sizes of the splits of the datasets used in this work.} \centering \begin{tabular}{l r r r} \toprule \textbf{Multi-Hop Dataset} & \textbf{Train} & \textbf{Dev} & \textbf{Test} \\ \midrule HotPotQA & 90,447 & 7,405 & 7,405 \\ HoVer & 18,171 & 4,000 & 4,000 \\ \bottomrule \end{tabular} \label{tab:dataset-sizes} \end{table} As our retrieval corpus for both HotPotQA and HoVer, we use the Wikipedia dump released by \citet{yang-etal-2018-hotpotqa} from Oct 2017,\footnote{\url{https://hotpotqa.github.io/wiki-readme.html}} which is the Wikipedia dump used officially for both datasets. For each Wikipedia page, this corpus contains only the first paragraph and the passages are already divided into individual sentences. It contains approximately 5M passages (1.5 GiB uncompressed). We use the official data splits for both datasets, described in Table~\ref{tab:dataset-sizes}. \section{Baleen{} implementation \& hyperparameters} \label{appendix:hyperparameters} We implement Baleen using Python 3.7 and PyTorch 1.6 and rely extensively on the HuggingFace Transformers library~\citep{wolf2020transformers}.\footnote{\url{https://github.com/huggingface/transformers}} We train and test with automatic mixed precision that is built into PyTorch. \subsection{FLIPR retriever} \label{appendix:flipr} Our implementation of FLIPR is an extension of the ColBERT~\citep{khattab2020colbert} open-source code,\footnote{\url{https://github.com/stanford-futuredata/ColBERT}} where we primarily modify the retrieval modeling components (e.g., adding focused late interaction and including condensed fact tokens in the query encoder). For FLIPR, we fine-tune a BERT-base model (110M parameters). For each round of training, we initialize the model parameters from a ColBERT model previously trained on the MS MARCO Passage Ranking task~\citep{nguyen2016ms}. To train the single-hop retriever used to initiate the supervision procedure of~\secref{sec:system:supervision}, we follow the training strategy of \citet{khattab2021relevance}. In particular, we use this \textit{out-of-domain} ColBERT model to create training triples, and then we train our retriever (in this case, FLIPR for first-hop) with these triples. Once we have this first-hop model, the rest of the procedure follows Algorithm~\ref{algo:LHO} for latent hop ordering. \begin{table}[ht] \caption{Hyperparameters for Baleen's FLIPR on HoVer and HotPotQA.} \small \centering \begin{tabular}{l c c} \toprule \textbf{Hyperparameter} & \textbf{HoVer} & \textbf{HotPotQA} \\ \midrule Embedding Dimension & 128 & 128 \\ Maximum Passage Length & 256 & 256 \\ Maximum Query Length: query/overall & 64/512 & 64/512 \\ Focused Interaction Filter: $\hat{N}$ / $\hat{L}$ & 32/8 & 32/8 \\ \midrule Learning rate & $3 \times 10^{-6}$ & $3 \times 10^{-6}$ \\ Batch size (triples) & 48 & 48 \\ Training steps (round \#1; per hop) & 10k, 5k, 5k, 5k & 20k, 20k \\ Training steps (round \#2) & 10k & 40k \\ Training Negative Sampling Depth (for each hop) & 1000 & 1000 \\ Training Context (Fact) Extraction Depth (from each hop) & 5 & 5 \\ Training Positive Sampling Depth (round \#1; per hop) & 20, all, all, all & 20, all \\ Training Positive Sampling Depth (round \#2; per hop) & 10, 10, 10, all & 10, all \\ \midrule FAISS centroids (probed) & 8192 (16) & 8192 (16) \\ FAISS results per vector: training/inference & 256/512 & 256/512 \\ Inference Top-$k$ Passages Per Hop & 25, 25, 25, 25 & 10, 40 \\ \bottomrule \end{tabular} \label{tab:params:flipr} \end{table} Table~\ref{tab:params:flipr} describes our hyperparameters for FLIPR. We manually explored a limited space of hyperparameters in preliminary experiments, tuning validation-set Retrieval@$k$ Accuracy, with $k$=100 for HoVer and $k$=20 for HotPotQA, while also being cognizant of downstream Psg-EM and Sent-EM. We expect that a larger tuning budget would lead to further gains, which is consistent with the fact that our Psg-EM and Sent-EM on the \textit{held-out} leaderboard test set are 1.0 and 0.6 points \textit{higher} than the public validation set with which we developed our methods. Unless otherwise stated, the hyperparameters apply to both FLIPR and ColBERT. We adopt the default learning rate from ColBERT, namely $3\times10^{-6}$. We set the embedding dimension to the default $d=128$ and use a batch size of 48 triples. We truncate passages to 256 tokens. For the query encoder, we truncate queries to 64 tokens and allow up to 512 tokens in total, particularly for the condensed facts or reranker context passages from the previous hops. We adopt the ColBERT infrastructure for end-to-end retrieval, where candidate generation is done using nearest-neighbor search with FAISS~\cite{johnson2019billion}.\footnote{\url{https://github.com/facebookresearch/faiss/}} See \citet{khattab2020colbert} for use with late interaction models. Since multi-hop queries are much longer than standard IR or OpenQA queries, we conduct candidate generation for FLIPR and ColBERT using the embeddings corresponding to the query tokens (defined in~\secref{sec:system:retriever}), and then apply (focused) late interaction on both the query and facts embeddings. The settings for LHO are also summarized in Table~\ref{tab:params:flipr}, namely the depth (i.e., number of passages) used for sampling negative passages and positive passages and for extracting multi-hop context facts. \subsection{Condensers and rerankers} \label{appendix:pipelines} For the two-stage condenser, we train two ELECTRA-large models (335M parameters each), one per stage. We simply use a \texttt{[MASK]} token to separate the facts, although we expect that any other special-token choice would work similarly provided enough training data is available. We train the first-stage condenser with $\langle \textnormal{query}, \textnormal{positive passage}, \textnormal{negative passage} \rangle$ triples. We use a cross-entropy loss over the individual \textit{sentences} of both passages in each example, where the model has to select the positive sentence out of $\langle positive_j, negative_1, negative_2, ... \rangle$ for each positive $j$. We average the cross-entropy loss per example, then across examples per batch. We train the second-hop condenser over a set of 7--9 facts, some positive and others (sampled) negative, using a linear combination of cross-entropy loss for each positive fact (against all negatives) and binary cross-entropy loss for each individual fact. \begin{table}[ht] \caption{Hyperparameters for Baleen's condensers on HoVer and HotPotQA.} \small \centering \begin{tabular}{l c c} \toprule \textbf{Hyperparameter} & \textbf{HoVer} & \textbf{HotPotQA} \\ \midrule Learning rate & $1 \times 10^{-5}$ & $1 \times 10^{-5}$ \\ Batch size & 64 & 64 \\ Maximum Sequence Length & 512 & 512 \\ Warmup Steps & 1000 & 1000 \\ Training steps (stage \#1) & 5k & 10k \\ Training steps (stage \#2) & 5k & 10k \\ Negative Sampling Depth (stage \#1; per hop) & 20, 20, 20, 20 & 10, 30 \\ Negative Sampling Depth (stage \#2; for each hop) & 10 & 10 \\ Context Sampling Depth (from each hop) & 5 & 5 \\ Positive Sampling Depth (stage \#1; per hop) & 10, 10, 10, all & 10, all \\ Positive Sampling Depth (stage \#2; for each hop) & 10 & 10 \\ Facts fed to stage \# 2: training (inference) & 7--9 (9) & 7--9 (9) \\ \bottomrule \end{tabular} \label{tab:params:condenser} \end{table} Table~\ref{tab:params:condenser} describes our hyperparameters for the condensers. \paragraph{Claim verification} For HoVer, we train an ELECTRA-large model for claim verification. The input contains the query and the condensed facts and the output is binary, namely supported or unsupported. We use batches of 16 examples and train for 20,000 steps with 2--6 facts per input, but otherwise adopt the same hyperparameters as the second-stage condensers. \paragraph{Reranker} We similarly use ELECTRA-large for the rerankers. The input contains the query and one reranker-selected passage for each of the previous hops as well as one passage to consider for the current hop. We adopt the same positive and negative sampling as the first-stage condenser, as well as other hyperparameters, but we allow twice the training budget when tuning the number of steps since there is only one stage for reranking. During training and inference, a primary difference between the reranking and condensing architectures is that condensing takes zero or more new facts per hop, whereas reranking always adds exactly one per hop as additional context, namely the top-ranked passage (positive) for inference (training). \paragraph{Hybrid condenser/reranker implementation} We train a single retriever on top of the first-round retrievers for the condenser and reranker Baleen architectures. During inference, we run two independent pipelines, one with the condenser and the other with the reranker. After both retrieval pipelines have completed, we merge the overall top-100 results by taking the top-13 and top-12 per hop from both pipelines without duplicates, for a total of 25$\times$4 = 100 unique passages. \subsection{Heuristic ordering: using overlap between passages and titles} \label{appendix:heuristic-ordering} To ablate our latent hop ordering (LHO) approach, we consider an algorithm that generalizes \citet{xiong2020answering}'s heuristic for ordering the two HotPotQA passages for training. This heuristic applies to any number of hops and attempts to capitalize on our understanding of the construction of HotPotQA and HoVer: each hop's passage is referred to directly by at least one other passage, often by title. Where short answer strings are available (i.e., in HotPotQA), if only one passage contains that answer string, we treat it as the final hop's passage and consider the order among the remaining passage(s). We then assign a score to all remaining passages, which reflects whether the full or partial title of the passage appears inside the claim. We take the highest-scoring passage(s) as the target of the current hop, expand the claim with their full text, and repeat this process with any remaining passages. In case all passage titles are completely unmatched, which is relatively uncommon, we recurse by attempting to pick each possible candidate passage for the current hop, and keep the choice that (at the end of the recursion) results in the largest overlap scores for the remaining hops. For the ablations that use this heuristic, we train in two rounds like with LHO. However, the first round with this heuristic does not require multiple short training runs, one per hop, since all the hops are determined in advance. Instead, we allow the same total training budget for the first round (as well as the second) over all hops. We note that an additional signal for the order of hops is to recover (from Wikipedia) the hyperlinks between the passages and use them to build a directed graph. However, this violates our assumption that we are only given the text of the passages and would make very strong assumptions about the data, ones specific to the construction of HotPotQA and HoVer. \subsection{Resources used} We conducted our experiments primarily using internal cluster resources. We use four 12GB Titan~V GPUs for retrievers and four 32GB V100 GPUs for condensers, rerankers, and readers. Training FLIPR on the four-hop HoVer dataset requires five (4+1) short training runs, for a \textit{total} time of approximately five hours. Similarly, we encode and index the corpus five times in total (four intermediate and one final time) less than six hours in total. Retrieving positives and negatives for training from the index four times consumes a total of less than three hours. All four hops of retrieval on the validation set with the final FLIPR model take a total of a little over one hour. Training both condenser stages for 5k steps each and training the claim verification reader for 20k steps takes a total of less than eight hours. We use python scripts for pre- and post-processing (e.g., for LHO) and run the condensers during evaluation, which generally add only limited overhead to the running time of our experiments. Our FLIPR retriever adopts a fine-grained late interaction paradigm like ColBERT (see~\secref{sec:background}), so our memory footprint is relatively large, as it involves storing a small 256-byte (2-byte 128 dimensions) vector per token. The uncompressed index is about 83 GiBs. We note that the authors of ColBERT \citet{khattab2020colbert} have recently released a quantized implementation that can reduce the storage per vector 4--8 fold, and reducing the storage space of dense retrieval methods through compression and quantization while preserving accuracy is an active area of research~\cite{izacard2020memory,yamada2021efficient}, with recent encouraging results. \section{The effect of condensing on the context lengths} \label{appendix:efficiency} We compare our condenser architecture of Baleen to a reranker after four hops on HoVer. We find that the average context per query is 91 words for Baleen's condenser architecture versus 325 words for the reranking ablation, on average. This 3.6$\times$ improvement for Baleen's condenser suggests that for tasks with even more hops, a condenser approach would be less likely to overwhelm typical maximum sequence lengths of existing Transformer architectures. By design, the condenser architecture scales better to a large number of hops than existing work. For instance, MDR uses beam search, and would require exploring a very large set of paths (e.g., $100\times100$) from the third hop onwards. As another example, IRRR concatenates long passages together as it conducts more hops. In contrast, the condenser architecture only needs to concatenate short facts together. While this efficiency gap grows when more than two hops are necessary, condensing maintains a comparable cost to MDR and IRRR in the simple two-hop (HotPotQA) setting, where Baleen invokes an ELECTRA-large model only tens of times per query, namely for the top-10 passages from the first hop, the top-40 passages from the second hop, and twice in the second stage of condensing. \section{Diagnosing retrieval saturation on HotPotQA} \label{sec:hotpotqa-eval} \input{tables/hotpotqa} Before beginning our primary evaluation on the many-hop HoVer benchmark, we first investigate the capacity of HotPotQA in reflecting the challenges on multi-hop retrieval (\secref{sec:introduction}). We use HotPotQA's ``fullwiki'' setting, where the input to the model is a question whose answer requires retrieving two passages from Wikipedia. Similar to related work~\cite{xiong2020answering}, we report passage-level exact-match (EM) and Recall@$k$ (R@$k$) on the development set. These are the percentage of questions for which the model correctly identifies the two gold passages and for which the model's top-$k$ retrieved passages contain both gold passages, respectively.\footnote{For MDR, we use the authors released retrieval to compute P-R@20. The authors originally report 80.2, but we do not penalize the MDR retriever for finding both gold passages split across different pairs.} We also report Answer-Recall@$k$, the percentage of questions whose short answer string is found in the top-$k$ passages (excluding yes/no questions). Here, the top-20 passages from Baleen{} are simply the union of the top-10 passages retrieved during the first hop and the top-10 passages from the second hop, without duplicates. We compare against the state-of-the-art models MDR and IRRR. We additionally compare with \textit{ColBERT-Hop}, a strong baseline that ablates Baleen{}'s retriever, condenser, and supervision: ColBERT-Hop uses the state-of-the-art neural retriever ColBERT (see \secref{sec:system:colbert}), employs a typical re-ranker architecture, and uses heuristic supervision. The results are shown in Table~\ref{table:hotpotqa-eval:retrieval}. Baleen{} demonstrates strong results, finding both gold passages in over 93\% of all questions and finding passages that contain the short answer string for over 96\% of all questions in just the top $k$=20 passages. We argue that this effectively reduces the open-retrieval task to a narrow distractor-setting one, in which \textit{reader} models are supplied with only a few passages (ones that are (nearly) guaranteed to contain the answer) and are then expected to extract the answer from just those passages. In other words, such high recall largely shifts the competition in downstream quality to the reader, since it almost always has access to the answer in the top-$k$ set and is thus responsible for the majority of downstream failures. While reading the retrieved passages may still pose additional, important challenges beyond retrieval that remain open, it should be just one of the many challenging aspects of multi-hop reasoning at scale. This motivates our focus on the many-hop HoVer task.
{'timestamp': '2022-07-12T02:20:04', 'yymm': '2101', 'arxiv_id': '2101.00436', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00436'}
arxiv
\section{Upper Bound Proof} \subsection{Basic properties of the LSVI algorithm} In this part, we list some of the important lemmas for the LSVI algorithm, most of which are proven in the previous literature \cite{jin2019provably}. These lemmas are very useful for proving the regret bound in our main theorem. \begin{lemma}{\rm (Lemma B.3, \cite{jin2019provably}).} \label{B.3} Define $\left[\mathbb{P}_{h} \widetilde V_{h+1}\right](x, a):=\mathbb{E}_{x^{\prime} \sim \mathbb{P}_{h}(\cdot | x, a)} \widetilde V_{h+1}\left(x^{\prime}\right).$ Under the setting of Theorem \ref{thm:main}, let $c_{\beta}$ be the constant in our definition of $\beta$ (i.e., $\beta=$ $\left.c_{\beta} \cdot d H \sqrt{\iota}\right) .$ There exists an absolute constant $C$ that is independent of $c_{\beta}$ such that for any fixed $p \in[0,1]$ if we let $\mathfrak{E}$ be the event that: \begin{align*} &\forall(k, h) \in[K] \times[H]:\\ &\left| \left| \sum_{\tau=1}^{k-1} \phi_{h}^{\tau}\left[\widetilde V_{h+1}^{k}\left(x_{h+1}^{\tau}\right)-\mathbb{P}_{h} \widetilde V_{h+1}^{k}\left(x_{h}^{\tau}, a_{h}^{\tau}\right)\right] \right| \right| _{\left(\Lambda_{h}^{k}\right)^{-1}} \\ &\leq C \cdot d H \sqrt{\chi} \end{align*} where $\chi=\log \left[2\left(c_{\beta}+1\right) d T / p\right],$ then $\mathbb{P}(\mathfrak{E}) \geq 1-p / 2.$ \end{lemma} \paragraph{Remark} We use $\mathcal{V}$ to denote the set of all the value functions in the form of $$V(\cdot)=\min \left\{\max _{a} \mathbf{w}^{\top} \boldsymbol{\phi}(\cdot, a)+\beta \sqrt{\boldsymbol{\phi}(\cdot, a)^{\top} \Lambda^{-1} \boldsymbol{\phi}(\cdot, a)}, H\right\}.$$ Clearly $\mathcal{V}$ includes all possible value function we generate throughout the algorithm. We can construct a $\varepsilon$-covering of $\mathcal{V}$ with respect to the distance dist$\left(V, V^{\prime}\right)=\sup _{x}\left|V(x)-V^{\prime}(x)\right|.$ In addition, we can prove that $\mathcal{N}_{\varepsilon},$ the $\varepsilon$-covering number of $\mathcal{V},$ can be bounded. Thus, by combining decomposition inequality we can derive this lemma. \begin{lemma}{\rm (Lemma B.4, \cite{jin2019provably})}\label{B.4} There exists an absolute constant $c_{\beta}$ such that for $\beta=c_{\beta} \cdot d H \sqrt{\iota}$ where $\iota=\log (2 d T / p),$ and for any fixed policy $\pi,$ on the event $\mathfrak{E}$ defined in Lemma \ref{B.3}, we have for all $(x, a, h, k) \in \mathcal{S} \times \mathcal{A} \times[H] \times[K]$ that: \begin{align*} \left\langle\phi(x, a), \mathbf{w}_{h}^{k}\right\rangle- Q_{h}^{\pi}(x, a)=&\mathbb{P}_{h}\left(\widetilde V_{h+1}^{k}-V_{h+1}^{\pi}\right)(x, a)\\ &+\Delta_{h}^{k}(x, a) \end{align*} for some $\Delta_{h}^{k}(x, a)$ that satisfies $\left|\Delta_{h}^{k}(x, a)\right| \leq \beta \sqrt{\phi(x, a)^{\top}\left(\Lambda_{h}^{k}\right)^{-1} \phi(x, a)}$ \end{lemma} \paragraph{Remark.} It is noted that although the definition of $\widetilde \delta$ is not the same as it in \cite{jin2019provably}, the proof of Lemma \ref{B.4} still holds. Then the following two lemmas can be easily derived by Lemma \ref{B.4} and induction. \begin{lemma}\label{B.5}{\rm (Lemma B.5 (UCB), \cite{jin2019provably})}. On the event $\mathfrak{E}$ defined in Lemma \ref{B.3}. we have $$\widetilde Q_{h}^{k}(x, a) \geq Q_{h}^{\star}(x, a)$$ for all $(x, a, h, k) \in \mathcal{S} \times \mathcal{A} \times[H] \times[K]$ \end{lemma} For any $(h, k) \in [H] \times [k],$ let $\widetilde \delta_h^{k} = \widetilde V_h^{\tilde{k}}(x_h^{k}) - V_h^{\pi_{\tilde{k}}}(x_h^k)$ denote the errors of the estimated $\widetilde V_h^{\tilde{k}}$ relative to $V_h^{\pi_{\tilde{k}}}$. \begin{lemma}\label{B.6}{\rm (Lemma B.6 (Recursive Lemma), \cite{jin2019provably})} Let $\widetilde \zeta_{h+1}^{k}=\mathbb{E}\left[\widetilde \delta_{h+1}^{k} | x_{h}^{k}, a_{h}^{k}\right]-\widetilde \delta_{h+1}^{k} .$ Then on the event $\mathfrak{E}$ defined in Lemma \ref{B.3}, we have the following: for any $(k, h) \in[K] \times[H]$ $$ \widetilde \delta_{h}^{k} \leq \widetilde \delta_{h+1}^{k}+\widetilde \zeta_{h+1}^{k}+2 \beta \sqrt{\left(\phi_{h}^{k}\right)^{\top}\left(\Lambda_{h}^{\tilde{k}}\right)^{-1} \phi_{h}^{k}} $$ \end{lemma} \begin{lemma}{\rm (Lemma D.2, \cite{jin2019provably})} \label{D.2} Let $\left\{\phi_{t}\right\}_{t \geq 0}$ be a bounded sequence in $\mathbb{R}^{d}$ satisfying $\sup _{t>0}\left\|\phi_{t}\right\| \leq 1 .$ Let $\Lambda_{0} \in \mathbb{R}^{d \times d}$ be a positive definite matrix. For any $t \geq 0,$ we define $\Lambda_{t}=\Lambda_{0}+\sum_{j=1}^{t} \phi_{j}^{\top} \phi_{j} .$ Then, if the smallest eigenvalue of $\Lambda_{0}$ satisfies $\lambda_{\min }\left(\Lambda_{0}\right) \geq 1,$ we have $$ \log \left[\frac{\operatorname{det}\left(\Lambda_{t}\right)}{\operatorname{det}\left(\Lambda_{0}\right)}\right] \leq \sum_{j=1}^{t} \boldsymbol{\phi}_{j}^{\top} \Lambda_{j-1}^{-1} \boldsymbol{\phi}_{j} \leq 2 \log \left[\frac{\operatorname{det}\left(\Lambda_{t}\right)}{\operatorname{det}\left(\Lambda_{0}\right)}\right] $$ \end{lemma} \subsection{Decomposing and proving the regret bound} In this section, we show the decomposition of the regret bound via the following lemma: \begin{lemma} \label{A.3} Let $\widetilde \delta_h^k$ be defined the same as that in the start of this part, then the following bound for the regret holds: $$ {\rm Regret}(K) \le \sum_{k = 1}^K \widetilde \delta_1^k $$ \end{lemma} The proof of this lemma is straightforward: if we notice that the value function computed by the algorithm always estimates more than the true value, so the following equation holds: \begin{equation} \begin{split} {\rm Regret}(K) =& \sum_{k = 1} ^{K} [V_1^* (x_1^k) - V_1^{\pi_k}(x_1^k)]\\ \le&\sum_{k = 1}^{K} [\widetilde V_1^{\tilde{k}}(x_1^k) - V_1^{\pi_{\tilde{k}}}(x_1^k)] \end{split} \end{equation} \iffalse \begin{equation} \begin{split} V_h^{\pi_k}(x_h^k) =& Q_h^{\pi_k} (x_h^k, a_h^k) = Q_h{', \tilde{k}}(x_h^k, a_h^k)\\ V_h^{', k}(x_h^k) \le& \max_a Q_h^{', k}(x_h^k, a) \end{split} \end{equation}\fi \subsection{Proof of the main theorem: the regret bound} In this part, we will prove the regret bound of the main theorem stated in the section \ref{sec:algoIntro}. Firstly, conditioning on the event $\mathfrak{E}$ defined in Lemma \ref{B.4}, we have: \begin{equation*} \begin{split} \left[\widetilde {Q}_{h}^{\tilde{k}}-Q_{h}^{\pi_{\tilde{k}}}\right](x, a)=&{\rm{\mathbb{P}}}_{h}\left(V_{h+1}^{\tilde{k}}-V_{h+1}^{\pi_{\tilde{k}}}\right)\left(x, a\right)+\Delta_{h}^{\tilde{k}}(x, a)\\ \end{split} \end{equation*} Our update rule implies $\pi_{\tilde{k}} = \pi_k, \widetilde {Q}_{h}^{\tilde{k}} = {Q}_{h}^{\tilde{k}},$ so subtracting the previous equations, we have \begin{align*} \left(\widetilde {Q}_{h}^{\tilde{k}}-Q_{h}^{\pi_{\tilde{k}}}\right)\left(x_{h}^{k}, a_{h}^{k}\right) &\le \Delta_{h}^{\tilde{k}}(x, a)+\widetilde {\delta}_{h}^{k}\\ &\le \Delta_{h}^{\tilde{k}}(x, a) + \widetilde \zeta_h^{k} + \widetilde {\delta}_{h+1}^{k} \end{align*} \iffalse \begin{align*} \left(\widetilde{Q}_{h}^{k}-\widetilde Q_{h}^{\tilde{k}}\right)\left(x_{h}^{k}, a_{h}^{k}\right) &\le \Delta_{h}^{k}(x, a)+\Delta_{h}^{\tilde{k}}(x, a)+\widetilde {\delta}_{h}^{k}+\widehat{\delta}_{h}^{k}\\ &\le \Delta_{h}^{k}(x, a)+\Delta_{h}^{\tilde{k}}(x, a) + \widehat{\zeta}_h^{k} + \zeta_h^{k} + \widetilde {\delta}_{h+1}^{k}+\widehat{\delta}_{h+1}^{k} \end{align*} \fi Since $\{ \zeta_h^{k} \}_{k\in [K]}$ are bounded martingale difference sequence (adapted to the history up to episode $k-1$), by Azuma-Hoeffding inequality, we have, with probability at least $1-p/2$ \[ \sum_{k = 1}^{K} \sum_{h = 1}^{H} \widetilde \zeta_h^{k} \le H\sqrt{T\iota}. \] Let this event be $\mathfrak{E}'$. Notice our update rule implies $\phi_h^{k} (\Lambda_h^{\tilde{k}})^{-1} \phi_h^{k} \le 2 \phi_h^{k} (\Lambda_h^{k})^{-1} \phi_h^{k} $ , now we can use Lemma \ref{B.3}, \ref{B.6}, \ref{A.3} to do the recursion for the regret bound. In summary, conditioning on $\mathfrak{E}$ and $\mathfrak{E}'$, the following inequalities hold: \begin{equation*} \begin{split} {\rm Regret}(K) \le & \sum_{k = 1}^K \widetilde \delta_1^k \\ \le & \sum_{k = 1}^{K} \sum_{h = 1}^{H} \widetilde \zeta_h^{k} + 3\beta \sum_{k = 1}^{K} \sum_{h = 1}^{H} \sqrt{\phi_h^{k} (\Lambda_h^{\tilde{k}})^{-1} \phi_h^{k}}\\ \le& H\sqrt{T\iota} + 6H\sqrt{dK\iota}\\ \end{split} \end{equation*} The second part holds from the potential lemma and the Cauchy-Schwarz inequality. \subsection{Analysis for switching cost}\label{det lemma} \begin{proof}[Proof of Lemma~\ref{detlemma_2}] Assume $\phi_{\tau}^{d} = (\alpha_1, \alpha_2, \cdots, \alpha_d)^{\top}.$ We know that $\sum_{i = 1}^d \alpha_i^2 \le 1,$ thus $|\alpha_i| \le 1$ for all $i \in [d].$ Since $\phi_{\tau}^{d}(\phi_{\tau}^{d})^{\top} = (\alpha_i \alpha_j)_{ij},$ the absolute value of each component of $\phi_{\tau}^{d}(\phi_{\tau}^{d})^{\top}$ is no more than 1, and then the absolute value of each component of $A_d$ is no more than $K + \lambda.$ Use $\widetilde A_d = (a_{ij})$ to denote a $d$-dimensional matrix satisfying the feature above, $i.e.,$ $|a_{ij}| \le K + \lambda.$ Clearly, if the $1_{st}$ row and $j_{th}$ column are deleted, the rest $(d - 1)$-dimensional matrix is $\widetilde A_{d - 1}.$ Thus \begin{equation*} \begin{split} |\det{A_d}| \le& \sum_{j = 1}^d |a_{1j}| \cdot |\det{A_{d - 1}}|\\ \le& d \cdot (K + \lambda) \cdot |\det{A_{d - 1}}|\\ \le& d^d (K + \lambda)^d\\ \end{split} \end{equation*} Hence, $\log \det A_d = d\log d + d \log(K + \lambda) = O(d\log K).$ \end{proof} To prove Lemma~\ref{detlemma}, we will use the following two linear algebraic facts. \begin{fact}[Woodbury matrix identity] For any PSD matrices $A, \Delta\in \mathbb{R}^{d\times d}$, suppose $A$ is invertible, then we have \begin{align*} &(A+\Delta)^{-1}\\ =& A^{-1} - A^{-1}\Delta^{1/2}(I + \Delta^{1/2}A^{-1}\Delta^{1/2})^{-1}\Delta^{1/2}A^{-1}. \end{align*} \end{fact} \begin{fact}[Matrix determinant lemma] For any PSD matrices $A, \Delta\in\mathbb{R}^{d\times d}$, suppose $A$ is invertible, then \[ \det(A+\Delta) = \det(I + \Delta^{1/2} A^{-1} \Delta^{1/2})\cdot\det(A). \] \end{fact} \begin{proof}[Proof of Lemma~\ref{detlemma}] By the matrix determinant lemma, we only need to show that \[ \lambda_{\max}(I + \Delta^{1/2} A^{-1} \Delta^{1/2})\ge 2. \] Since $A^{-1}\not\preccurlyeq 2B^{-1}$, it must be the case that, for some $x$ with $\|x\|_2=1$, and \[ x^\top (A^{-1} - 2B^{-1}) x\ge 0. \] Denote $\Delta = B- A \succeq 0$. By Woodbury identity, we have \begin{align*} &x^\top (A^{-1} - 2B^{-1})x \\ =&x^\top (2A^{-1}\Delta^{1/2}(I + \Delta^{1/2}A^{-1}\Delta^{1/2})^{-1}\Delta^{1/2}A^{-1} - A^{-1})x\\ \ge& 0. \end{align*} Let $y = A^{-1/2}x$, we then have, \begin{align*} &2y^{\top} A^{-1/2}\Delta^{1/2}(I + \Delta^{1/2}A^{-1}\Delta^{1/2})^{-1}\Delta^{1/2}A^{-1/2} y\\ \ge& \|y\|_2^2. \end{align*} Hence, \[ \lambda_{\max}(A^{-1/2}\Delta^{1/2}(I + \Delta^{1/2}A^{-1}\Delta^{1/2})^{-1}\Delta^{1/2}A^{-1/2} ) \ge 1/2. \] Let us denote $M=A^{-1/2}\Delta^{1/2}$, we have \[ \lambda_{\max}(M(I + M^\top M)^{-1}M^\top)\ge 1/2. \] Let $M = U\Sigma V^\top$ be the SVD decomposition of $M$, where $U$ and $V$ are orthonormal and $\Sigma$ is diagonal. Then we have, \begin{align*} &M(I + M^\top M)^{-1}M^\top\\ = &U\Sigma V^\top(I + V\Sigma^2 V^\top )^{-1} V \Sigma U^\top \\ = &U\Sigma(I + \Sigma^2)^{-1}\Sigma U^\top. \end{align*} Note that $\Sigma=\mathrm{diag}(\sigma_1,\sigma_2, \ldots, \sigma_d)$ is diagonal, we have \[ \max_i \frac{\sigma_i^2}{1+\sigma_i^2}\ge 1/2 \Rightarrow \max_{i} \sigma_i^2 \ge 1. \] We additionally rewrite $I + \Delta^{1/2} A^{-1} \Delta^{1/2}$ as \[ I + \Delta^{1/2} A^{-1} \Delta^{1/2} = I + M^{\top} M = I + V\Sigma^2 V^\top. \] Thus we have \[ \lambda_{\max}(I + \Delta^{1/2} A^{-1} \Delta^{1/2})\ge 2 \] as desired. \end{proof} Combining the lemmas above, we are now ready to prove the switching cost bound in the theorem \ref{thm:main}. \begin{proof}[Proof of Theorem~\ref{thm:main}] Let $\{ k_1, k_2, \cdots, k_{N_{\rm switch}^{\rm gl}} \}$ denote the $\tilde{k}$ picked by the algorithm. From Lemma \ref{detlemma} we know $\det \Lambda_{k_{i+1}} \ge 2\det \Lambda_{k_{i}} \ge 2^{k_{i+1}}\det \Lambda_0.$ Hence, by combining Lemma \ref{detlemma_2} we have$N_{\rm switch}^{\rm gl} \le c_0 \log \det \Lambda_K = O(d\log K).$ \end{proof} \section{Analysis for Lower Bound} We will construct a set of linear MDPs with dimension $d = 4d_0$ and number of steps $H = 2H_0$ to prove theorem \ref{thm:lowerBoundThm}. These MDPs will have different action when facing different states, and we claim that an MDP with the number of action $|\mathcal{A}|$ and the number of steps $H$ can be transformed to an MDP with the number of action 2 and the number of steps $H\log|\mathcal{A}|.$ In fact, we can just add a binary tree with depth $\log|\mathcal{A}|$ before each transformation, and each intermediate state has two possible action. Then the different leaves of the tree denote for the different chosen of action. Clearly the switching cost will not decrease during this operation. \subsection{Construction} For fixed $d_0$, let $e_i$ denote the vector $(0, 0, \cdots, 1, \cdots, 0)$ in $4d_0$-dimensional space, whose $i_{th}$ component is 1 and others are 0s. We first construct a set of linear MDPs $M_{*}$ with dimension $4d_0$ as follows: The state space $\mathcal{S}$ is partitioned into 4 components, which we define as follows: \begin{equation*} \begin{split} {S_0} = & \{ s_{ h,i} | h \in [H], i \in [d_0]\}\\ {U} = & \{ u \}\\ {V} = & \{ v \}\\ {W} = & \{ w \}\\ \end{split} \end{equation*} So we have $\mathcal{S} = {S_0} \cup {U} \cup {V} \cup {W}$. Intuitively, $S_0$ is the space where the agent usually explores. $u, v, w$ are three auxiliary states for ``hiding'' the rewards and normalizing the paths taken by the agent. We take $u$ as the initial state for each episode. Now we consider the action space as follows: \begin{equation*} \begin{split} {A} =& \{ a_{j} | j \in [d_0] \}\\ {\widetilde A} =& \{ \widetilde a \}\\ \end{split} \end{equation*} The agent can take any action in $A$ at state $u,$ while there is only one feasible action $\widetilde a$ for all other states. We use $\mathcal{A} = A \cup \widetilde A$ to denote the whole action space and clearly the maximum number of feasible action in a particular state is $d_0.$ The last information the algorithm knows before exploration is the feature vectors of each state-action pair: \begin{equation*} \begin{split} \phi(u, a_j) = & e_j\\ \phi(s_{h, i}, \widetilde a) = & e_{2d_0 + i}\\ \phi(v, \widetilde a) = & e_{3d_0}\\ \phi(w, \widetilde a) = & e_{4d_0}\\ \end{split} \end{equation*} We can easily verify that the agents cannot extract any useful information about the special action by these feature vectors. More precisely, these feature vectors are orthonormal vectors, given constant $h.$ \begin{equation*} \begin{split} \mu_{2h}(s_{h,i}) = & e_i\\ \mu_{2h+1}(u) = & e_{2 d_0 + i_h}\\ \mu_{h}(v) = & e_{3d_0},\;\; h\not = 2h_*+1\\ \mu_{2h_*+1}(v) = & e_{j_{h_*}d_0 + i_{h_*}}\\ \mu_{2h}(w) = & e_{4d_0}\\ \mu_{2h+1}(w) = & \sum_{i \in [d_0]} \sum_{j = 0, 1}e_{jd_0 + i} - e_{j_h d_0 + i_h} + e_{4d_0}\\ \end{split} \end{equation*} where $h_* \sim \rm{Unif}([H_0]),$ $i_h \sim \rm{Unif}[d_0]$ for all $h \in [h_*]$ and other vectors are all $(0, 0, \cdots, 0).$ We can easily find that $v$ and $w$ are two sinks. As above shows, the agent starts at $u$ and the action $a_j$ leads to state $s_{1, j}.$ If $j = i_h,$ then the agent comes back to $u$ and then selects the next action, else the agent goes to $w$ and stays in $w$ forever. In other words, the agent will finally goes to sink $v$ at step $2h_* + 1$ along with the correct path $i_h,$ or it will go to $w$ if taking any wrong action. We illustrate the construction in Figure 2. Note that denote state $u$ as $u_1, u_2, \ldots, $ for the arrival of the $H$-th step at $u$. We do the same for $v$ and $w$. The reward function is quite simple: the agent gets reward 1 only at state $v:$ \begin{equation*} \begin{split} \theta_h = & e_{3d_0}\\ \end{split} \end{equation*} \begin{figure} \centering \label{fig:MDPfig} \tikzset{every picture/.style={line width=0.75pt}} \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-0.8,xscale=0.8] \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (330,215) .. controls (330,206.72) and (336.72,200) .. (345,200) .. controls (353.28,200) and (360,206.72) .. (360,215) .. controls (360,223.28) and (353.28,230) .. (345,230) .. controls (336.72,230) and (330,223.28) .. (330,215) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (210,215) .. controls (210,206.72) and (216.72,200) .. (225,200) .. controls (233.28,200) and (240,206.72) .. (240,215) .. controls (240,223.28) and (233.28,230) .. (225,230) .. controls (216.72,230) and (210,223.28) .. (210,215) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (90,215) .. controls (90,206.72) and (96.72,200) .. (105,200) .. controls (113.28,200) and (120,206.72) .. (120,215) .. controls (120,223.28) and (113.28,230) .. (105,230) .. controls (96.72,230) and (90,223.28) .. (90,215) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (450,215) .. controls (450,206.72) and (456.72,200) .. (465,200) .. controls (473.28,200) and (480,206.72) .. (480,215) .. controls (480,223.28) and (473.28,230) .. (465,230) .. controls (456.72,230) and (450,223.28) .. (450,215) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (330,125) .. controls (330,116.72) and (336.72,110) .. (345,110) .. controls (353.28,110) and (360,116.72) .. (360,125) .. controls (360,133.28) and (353.28,140) .. (345,140) .. controls (336.72,140) and (330,133.28) .. (330,125) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (210,125) .. controls (210,116.72) and (216.72,110) .. (225,110) .. controls (233.28,110) and (240,116.72) .. (240,125) .. controls (240,133.28) and (233.28,140) .. (225,140) .. controls (216.72,140) and (210,133.28) .. (210,125) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (90,125) .. controls (90,116.72) and (96.72,110) .. (105,110) .. controls (113.28,110) and (120,116.72) .. (120,125) .. controls (120,133.28) and (113.28,140) .. (105,140) .. controls (96.72,140) and (90,133.28) .. (90,125) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (450,125) .. controls (450,116.72) and (456.72,110) .. (465,110) .. controls (473.28,110) and (480,116.72) .. (480,125) .. controls (480,133.28) and (473.28,140) .. (465,140) .. controls (456.72,140) and (450,133.28) .. (450,125) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (330,305) .. controls (330,296.72) and (336.72,290) .. (345,290) .. controls (353.28,290) and (360,296.72) .. (360,305) .. controls (360,313.28) and (353.28,320) .. (345,320) .. controls (336.72,320) and (330,313.28) .. (330,305) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (210,305) .. controls (210,296.72) and (216.72,290) .. (225,290) .. controls (233.28,290) and (240,296.72) .. (240,305) .. controls (240,313.28) and (233.28,320) .. (225,320) .. controls (216.72,320) and (210,313.28) .. (210,305) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (90,305) .. controls (90,296.72) and (96.72,290) .. (105,290) .. controls (113.28,290) and (120,296.72) .. (120,305) .. controls (120,313.28) and (113.28,320) .. (105,320) .. controls (96.72,320) and (90,313.28) .. (90,305) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (450,305) .. controls (450,296.72) and (456.72,290) .. (465,290) .. controls (473.28,290) and (480,296.72) .. (480,305) .. controls (480,313.28) and (473.28,320) .. (465,320) .. controls (456.72,320) and (450,313.28) .. (450,305) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (330,395) .. controls (330,386.72) and (336.72,380) .. (345,380) .. controls (353.28,380) and (360,386.72) .. (360,395) .. controls (360,403.28) and (353.28,410) .. (345,410) .. controls (336.72,410) and (330,403.28) .. (330,395) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (210,395) .. controls (210,386.72) and (216.72,380) .. (225,380) .. controls (233.28,380) and (240,386.72) .. (240,395) .. controls (240,403.28) and (233.28,410) .. (225,410) .. controls (216.72,410) and (210,403.28) .. (210,395) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (90,395) .. controls (90,386.72) and (96.72,380) .. (105,380) .. controls (113.28,380) and (120,386.72) .. (120,395) .. controls (120,403.28) and (113.28,410) .. (105,410) .. controls (96.72,410) and (90,403.28) .. (90,395) -- cycle ; \draw [color={rgb, 255:red, 65; green, 117; blue, 5 } ,draw opacity=1 ] (450,395) .. controls (450,386.72) and (456.72,380) .. (465,380) .. controls (473.28,380) and (480,386.72) .. (480,395) .. controls (480,403.28) and (473.28,410) .. (465,410) .. controls (456.72,410) and (450,403.28) .. (450,395) -- cycle ; \draw [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=1 ] (150,260) .. controls (150,251.72) and (156.72,245) .. (165,245) .. controls (173.28,245) and (180,251.72) .. (180,260) .. controls (180,268.28) and (173.28,275) .. (165,275) .. controls (156.72,275) and (150,268.28) .. (150,260) -- cycle ; \draw [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=1 ] (150,350) .. controls (150,341.72) and (156.72,335) .. (165,335) .. controls (173.28,335) and (180,341.72) .. (180,350) .. controls (180,358.28) and (173.28,365) .. (165,365) .. controls (156.72,365) and (150,358.28) .. (150,350) -- cycle ; \draw [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=1 ] (150,170) .. controls (150,161.72) and (156.72,155) .. (165,155) .. controls (173.28,155) and (180,161.72) .. (180,170) .. controls (180,178.28) and (173.28,185) .. (165,185) .. controls (156.72,185) and (150,178.28) .. (150,170) -- cycle ; \draw [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=1 ] (150,80) .. controls (150,71.72) and (156.72,65) .. (165,65) .. controls (173.28,65) and (180,71.72) .. (180,80) .. controls (180,88.28) and (173.28,95) .. (165,95) .. controls (156.72,95) and (150,88.28) .. (150,80) -- cycle ; \draw [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=1 ] (270,260) .. controls (270,251.72) and (276.72,245) .. (285,245) .. controls (293.28,245) and (300,251.72) .. (300,260) .. controls (300,268.28) and (293.28,275) .. (285,275) .. controls (276.72,275) and (270,268.28) .. (270,260) -- cycle ; \draw [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=1 ] (270,350) .. controls (270,341.72) and (276.72,335) .. (285,335) .. controls (293.28,335) and (300,341.72) .. (300,350) .. controls (300,358.28) and (293.28,365) .. (285,365) .. controls (276.72,365) and (270,358.28) .. (270,350) -- cycle ; \draw [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=1 ] (270,170) .. controls (270,161.72) and (276.72,155) .. (285,155) .. controls (293.28,155) and (300,161.72) .. (300,170) .. controls (300,178.28) and (293.28,185) .. (285,185) .. controls (276.72,185) and (270,178.28) .. (270,170) -- cycle ; \draw [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=1 ] (270,80) .. controls (270,71.72) and (276.72,65) .. (285,65) .. controls (293.28,65) and (300,71.72) .. (300,80) .. controls (300,88.28) and (293.28,95) .. (285,95) .. controls (276.72,95) and (270,88.28) .. (270,80) -- cycle ; \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (390,260) .. controls (390,251.72) and (396.72,245) .. (405,245) .. controls (413.28,245) and (420,251.72) .. (420,260) .. controls (420,268.28) and (413.28,275) .. (405,275) .. controls (396.72,275) and (390,268.28) .. (390,260) -- cycle ; \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (390,350) .. controls (390,341.72) and (396.72,335) .. (405,335) .. controls (413.28,335) and (420,341.72) .. (420,350) .. controls (420,358.28) and (413.28,365) .. (405,365) .. controls (396.72,365) and (390,358.28) .. (390,350) -- cycle ; \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (390,170) .. controls (390,161.72) and (396.72,155) .. (405,155) .. controls (413.28,155) and (420,161.72) .. (420,170) .. controls (420,178.28) and (413.28,185) .. (405,185) .. controls (396.72,185) and (390,178.28) .. (390,170) -- cycle ; \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (390,80) .. controls (390,71.72) and (396.72,65) .. (405,65) .. controls (413.28,65) and (420,71.72) .. (420,80) .. controls (420,88.28) and (413.28,95) .. (405,95) .. controls (396.72,95) and (390,88.28) .. (390,80) -- cycle ; \draw [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,80) -- (106.6,123.8) ; \draw [shift={(105,125)}, rotate = 323.13] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,80) -- (223.4,123.8) ; \draw [shift={(225,125)}, rotate = 216.87] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,80) -- (343.06,124.51) ; \draw [shift={(345,125)}, rotate = 194.04] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,80) -- (463.02,124.7) ; \draw [shift={(465,125)}, rotate = 188.53] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,170) -- (106.6,213.8) ; \draw [shift={(105,215)}, rotate = 323.13] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,170) -- (223.4,213.8) ; \draw [shift={(225,215)}, rotate = 216.87] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,170) -- (343.06,214.51) ; \draw [shift={(345,215)}, rotate = 194.04] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,170) -- (463.02,214.7) ; \draw [shift={(465,215)}, rotate = 188.53] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,260) -- (106.6,303.8) ; \draw [shift={(105,305)}, rotate = 323.13] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,260) -- (223.4,303.8) ; \draw [shift={(225,305)}, rotate = 216.87] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,260) -- (343.06,304.51) ; \draw [shift={(345,305)}, rotate = 194.04] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,260) -- (463.02,304.7) ; \draw [shift={(465,305)}, rotate = 188.53] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,350) -- (106.6,393.8) ; \draw [shift={(105,395)}, rotate = 323.13] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,350) -- (223.4,393.8) ; \draw [shift={(225,395)}, rotate = 216.87] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,350) -- (343.06,394.51) ; \draw [shift={(345,395)}, rotate = 194.04] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ] (165,350) -- (463.02,394.7) ; \draw [shift={(465,395)}, rotate = 188.53] [color={rgb, 255:red, 126; green, 211; blue, 33 } ,draw opacity=1 ][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 [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ] (285,80) -- (285,168) ; \draw [shift={(285,170)}, rotate = 270] [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ][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 [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ] (285,170) -- (285,258) ; \draw [shift={(285,260)}, rotate = 270] [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ][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 [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ] (285,260) -- (285,348) ; \draw [shift={(285,350)}, rotate = 270] [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (405,80) -- (405,168) ; \draw [shift={(405,170)}, rotate = 270] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (405,170) -- (405,258) ; \draw [shift={(405,260)}, rotate = 270] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (405,260) -- (405,348) ; \draw [shift={(405,350)}, rotate = 270] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=1 ] (270,440) .. controls (270,431.72) and (276.72,425) .. (285,425) .. controls (293.28,425) and (300,431.72) .. (300,440) .. controls (300,448.28) and (293.28,455) .. (285,455) .. controls (276.72,455) and (270,448.28) .. (270,440) -- cycle ; \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (390,440) .. controls (390,431.72) and (396.72,425) .. (405,425) .. controls (413.28,425) and (420,431.72) .. (420,440) .. controls (420,448.28) and (413.28,455) .. (405,455) .. controls (396.72,455) and (390,448.28) .. (390,440) -- cycle ; \draw [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ] (285,350) -- (285,438) ; \draw [shift={(285,440)}, rotate = 270] [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (405,350) -- (405,438) ; \draw [shift={(405,440)}, rotate = 270] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (465,125) -- (406.6,168.8) ; \draw [shift={(405,170)}, rotate = 323.13] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (465,215) -- (406.6,258.8) ; \draw [shift={(405,260)}, rotate = 323.13] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (465,305) -- (406.6,348.8) ; \draw [shift={(405,350)}, rotate = 323.13] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (465,395) -- (406.6,438.8) ; \draw [shift={(405,440)}, rotate = 323.13] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (105,395) -- (403.02,439.7) ; \draw [shift={(405,440)}, rotate = 188.53] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (225,395) -- (403.06,439.51) ; \draw [shift={(405,440)}, rotate = 194.04] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (345,395) -- (403.4,438.8) ; \draw [shift={(405,440)}, rotate = 216.87] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (105,305) -- (403.02,349.7) ; \draw [shift={(405,350)}, rotate = 188.53] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (105,215) -- (403.02,259.7) ; \draw [shift={(405,260)}, rotate = 188.53] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (225,305) -- (403.06,349.51) ; \draw [shift={(405,350)}, rotate = 194.04] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (225,125) -- (403.06,169.51) ; \draw [shift={(405,170)}, rotate = 194.04] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (345,215) -- (403.4,258.8) ; \draw [shift={(405,260)}, rotate = 216.87] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ] (345,125) -- (403.4,168.8) ; \draw [shift={(405,170)}, rotate = 216.87] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=0.42 ] (105,125) -- (163.4,168.8) ; \draw [shift={(165,170)}, rotate = 216.87] [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=0.42 ][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 [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ] (345,305) -- (286.6,348.8) ; \draw [shift={(285,350)}, rotate = 323.13] [color={rgb, 255:red, 139; green, 87; blue, 42 } ,draw opacity=0.53 ][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 [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=0.42 ] (225,215) -- (166.6,258.8) ; \draw [shift={(165,260)}, rotate = 323.13] [color={rgb, 255:red, 144; green, 19; blue, 254 } ,draw opacity=0.42 ][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 (92,120) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{1,1}$}; \draw (212,120) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{1,2}$}; \draw (332,120) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{1,3}$}; \draw (452,120) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{1,4}$}; \draw (92,210) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{2,1}$}; \draw (212,210) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{2,2}$}; \draw (332,210) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{2,3}$}; \draw (452,210) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{2,4}$}; \draw (92,300) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{3,1}$}; \draw (212,300) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{3,2}$}; \draw (332,300) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{3,3}$}; \draw (452,300) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{3,4}$}; \draw (92,390) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{4,1}$}; \draw (212,390) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{4,2}$}; \draw (332,390) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{4,3}$}; \draw (452,390) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle s_{4,4}$}; \draw (157,255) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle u_{3}$}; \draw (157,345) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle u_{4}$}; \draw (157,165) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle u_{2}$}; \draw (157,75) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle u_{1}$}; \draw (277,255) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle v_{3}$}; \draw (277,345) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle v_{4}$}; \draw (277,165) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle v_{2}$}; \draw (277,75) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle v_{1}$}; \draw (397,255) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle w_{3}$}; \draw (397,345) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle w_{4}$}; \draw (397,165) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle w_{2}$}; \draw (397,75) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle w_{1}$}; \draw (277,435) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle v_{5}$}; \draw (397,435) node [anchor=north west][inner sep=0.75pt] [align=left] {$\displaystyle w_{5}$}; \end{tikzpicture} \caption{An illustration of the hard instance constructed above} \end{figure} Clearly we have \begin{equation*} \begin{split} \mathbb{E}_{M_{*}}[{V_1^\pi(x_0)}] =& \mathbb{E}_{M_{*}} \left[ \sum_{h = 1}^H \mathbf{1} \{ x_h = v \} \right]\\ \mathbb{E}_{M_{*}}[V_1^*(x_0)] =& \mathbb{E}_{M_{*}}[H - 2h_*] = H_0\\ \end{split} \end{equation*} \subsection{Minimax Lower Bound} \begin{equation*} \begin{split} &\sup_{M \in \mathcal{M}} \mathbb{E}_{s_1, \mathcal{M}}{\left[ \sum_{k = 1}^{K} V_1^*(s_1) - V_1^{\pi_k}(s_1) \right ]} \\ \ge& \mathbb{E}_{M_{*}} [\sum_{k = 1}^K V_1^* (x_0) - V_1^{\pi_k} (x_0)]\\ =& KH_0 - \sum_{k = 1}^K \mathbb{E}_{M_{*}}[V_1^{\pi_k}(x_0)] \end{split} \end{equation*} It remains to upper bound $\mathbb{E}_{M_{*}}[V_1^{\pi_k}(x_0)]$ for each $k.$ For all $k \ge 1,$ let $$ N_{\rm switch}^k = \sum_{j = 1}^{k - 1} \mathbf{1} \{ \pi_{j} \not = \pi_{j+1} \} $$ denote the switching cost at episode $K$. Let $$S_* := \{ s_{1, i_1}, s_{2, i_2}, \cdots, s_{h_*, i_{h_*}} \}$$ be the correct path leading to state $v,$ \begin{equation*} \begin{split} S_k := & \{ \tilde s_{h_1, i_1}, \tilde s_{h_2, i_2}, \cdots, \tilde s_{h_{r}, i_{r}} \}\\ \end{split} \end{equation*} be the ordered set of the states $s_{h, i}$ that have been reached throughout the execution of the algorithm, $$ S_{k}^{\tau} := \{ \tilde s _{\tau, i_1}, \tilde s _{\tau, i_2}, \cdots, \tilde s _{{\tau}, i_{r_{\tau}}} \} $$ be the states throughout the exploration of $s_{\tau, i_{\tau}},$ i.e. $S_{k}^{\tau} = S_k \cap \{ s_{\tau, i} | i \in [d_0] \}.$ We begin by observing that $r = \sum_{\tau = 1}^{h_*} r_{\tau} \le N_{\rm switch}^k + H_0 + 1,$ i.e., after changing the policy for $N_{\rm switch}^k$ times, the algorithm can only explore at most $N_{\rm switch}^k$ states in ${S'}$ except for the correct path. In fact, we know that if $x_{2h} \in S' - S_*$ for some $h,$ then $x_{2h+1} = w$ and so do the rest steps. Thus as long as the algorithm makes a mistake at some step, it can only explore one more state in $S' - S_*.$ More precisely, if the algorithm has already known the structure of this MDP, clearly it still need to find the correct path $S_*$ in order to achieve reward 1. In this way, \begin{equation*} \begin{split} \mathbb{E}_{M_{*}}[V_1^{\pi_k}(x_0)] = &\mathbb{E}_{M_{*}} \left[ \sum_{h = 1}^H \mathbf{1} \{ x_h = v \} \right]\\ \le & H \cdot \mathbb{E} _{M_{*}} \left[ \mathbf{1} \{ x_H = v \} \right]\\ \le & H \cdot \mathbb{E}_{M_{*}} [ {\mathbb{P}} \left(S_* \in S_k\right) ]\\ \le & H / H_0 \cdot \sum_{h_* = 1}^{H_0} \sum_{\tau = 1}^{h_*} {\mathbb{P}} \left( s_{\tau, i_{\tau}} \in S_k^{\tau} \right)\\ =& 2 \sum_{h_* = 1}^{H_0}\sum_{\tau = 1}^{h_*} {\mathbb{P}} \Bigg ( \bigcup_{j \ge 1} \Big \{ r_{\tau} \ge j , s_{\tau, i_{\tau}} \not \in \{ \tilde s _{\tau, i_1}, \tilde s _{\tau, i_2}, \cdots, \tilde s _{{\tau}, i_{j-1}} \}, s_{\tau, i_{\tau}} = \tilde s _{{\tau}, i_{j}} \Big \} \Bigg )\\ =& 2 \sum_{h_* = 1}^{H_0}\sum_{\tau = 1}^{h_*} \sum_{j \ge 1} \PR{r_{\tau} \ge j} \cdot \PR{s_{\tau, i_{\tau}} \not \in \{ \tilde s _{\tau, i_1}, \tilde s _{\tau, i_2}, \cdots, \tilde s _{{\tau}, i_{j-1}} \}, s_{\tau, i_{\tau}} = \tilde s _{{\tau}, i_{j}} | r_{\tau} \ge j }\\ \end{split} \end{equation*} \iffalse \begin{equation*} \begin{split} &\mathbb{E}_{M_{*}}[V_1^{\pi_k}(x_0)] = (H - 1)\mathbb{E}_{M_{*}} [ \mathbf{1} \{ x_1 = x^* \}]\\ \le& (H - 1)\mathbb{E}_{M_{*}} [\mathbf{1} \{ x^* \in X_k\}] = (H - 1)\PR{x^* \in X_k}\\ =& (H - 1){\mathbb{P}} \Bigg ( \bigcup_{j \ge 1} \Big \{ N_{\rm{switch}}^k +1 \ge j, x^* \not \in \{ \tilde x_{1}, \tilde x_{2}, \cdots, \tilde x_{{j - 1}} \}, x^* = \tilde x_j \Big \} \Bigg )\\ =& (H - 1)\sum_{j \ge 1} \PR{N_{\rm{switch}}^k +1 \ge j} \cdot \PR{x^* \not \in \{ \tilde x_{1}, \tilde x_{2}, \cdots, \tilde x_{{j - 1}} \}, x^* = \tilde x_j | N_{\rm{switch}}^k +1 \le j }\\ \end{split} \end{equation*}\fi Now suppose that we know $r_{\tau} \ge j.$ Noticing that $ s_{\tau, i_{\tau}} \sim \rm{Unif}$$( \{ s_{\tau, i} | i \in [d_0] \} ),$ we have \begin{equation*} \begin{split} &\PR{s_{\tau, i_{\tau}} \not \in \{ \tilde s _{\tau, i_1}, \tilde s _{\tau, i_2}, \cdots, \tilde s _{{\tau}, i_{j-1}} \}, s_{\tau, i_{\tau}} = \tilde s _{{\tau}, i_{j}} | r_{\tau} \ge j } \\ =& \prod_{\gamma = 1}^{j - 1} \frac{d_0 - \gamma}{d_0 - \gamma + 1} \cdot \frac{1}{d_0 - j + 1} = \frac{1}{d_0} \\ \end{split} \end{equation*} Substituting this into the preceding bound gives \begin{equation*} \begin{split} \mathbb{E}_{M_{*}}[V_1^{\pi_k}(x_0)] \le & 2\sum_{h_* = 1}^{H_0}\sum_{\tau = 1}^{h_*} \sum_{j \ge 1}\PR{r_\tau \ge j}/d_0\\ = & 2/d_0 \sum_{h_* = 1}^{H_0}\sum_{\tau = 1} ^{h_*} \mathbb{E} [r_\tau] = 2/d_0 \sum_{h_* = 1}^{H_0} \mathbb{E} \left [r\right]\\ \le & \mathbb{E}[ N_{\rm{switch}}^k + H ] \cdot 2/d_0 \le \mathbb{E}[ N_{\rm{switch}}^{\rm gl} + H ] \cdot 2/d_0\\ \le & H_0 / 2 \\ \end{split} \end{equation*} as $N_{\rm switch}^{\rm gl} \le dH/100$ almost surely and $d \ge 100$. And thus \begin{equation*} \begin{split} &\sup_{M \in \mathcal{M}} \mathbb{E}_{s_1, \mathcal{M}}{\left[ \sum_{k = 1}^{K} V_1^*(s_1) - V_1^{\pi_k}(s_1) \right ]} \\ &\ge KH_0 - \sum_{k = 1}^K \mathbb{E}_{M_{*}}[V_1^{\pi_k}(x_0)]\\\ &\ge KH_0 -KH_0/2\\ & = KH/4\\ \end{split} \end{equation*} \paragraph{Remark} In fact, we can reduce states in $S_0$ and only reserve three states $\{u, v, w \}$ with similar structure: the agent needs to find the correct action set $\{ a_{i_h} \}$ for $h_*$ steps. In this way, we can use identical $d$ actions in each states and thus we provide a tighter lower bound $\Omega(dH).$ \subsection{Proof Sketch of Theorem~\ref{thm:lowerBoundThm}} The full proof is deferred to the appendix, and here we give an outline of the proof. The strategy is to construct a class of hard MDPs and show for any algorithm without any prior knowledge about this class, it must suffer enough regret and switching cost. The difficult part is how to construct hard instances. \begin{figure} \centering \tikzset{every picture/.style={line width=0.75pt}} \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-0.8,xscale=0.8] \draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][dash pattern={on 4.5pt off 4.5pt}] (100,145) .. controls (100,131.19) and (111.19,120) .. (125,120) .. controls (138.81,120) and (150,131.19) .. (150,145) .. controls (150,158.81) and (138.81,170) .. (125,170) .. controls (111.19,170) and (100,158.81) .. (100,145) -- cycle ; \draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (250,145) .. controls (250,131.19) and (261.19,120) .. (275,120) .. controls (288.81,120) and (300,131.19) .. (300,145) .. controls (300,158.81) and (288.81,170) .. (275,170) .. controls (261.19,170) and (250,158.81) .. (250,145) -- cycle ; \draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=0.43 ] (400,145) .. controls (400,131.19) and (411.19,120) .. (425,120) .. controls (438.81,120) and (450,131.19) .. (450,145) .. controls (450,158.81) and (438.81,170) .. (425,170) .. controls (411.19,170) and (400,158.81) .. (400,145) -- cycle ; \draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (157.5,144.25) -- (243.5,144.25) ; \draw [shift={(245.5,144.25)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][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 [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (107,122.75) .. controls (78.78,85.62) and (174.06,86.23) .. (143.47,122.15) ; \draw [shift={(142.5,123.25)}, rotate = 312.15999999999997] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][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 (126,174.25) .. controls (163.62,210.88) and (382.56,207.33) .. (425.75,178.14) ; \draw [shift={(427,177.25)}, rotate = 503.13] [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 [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (256,120.75) .. controls (227.78,83.62) and (323.06,84.23) .. (292.47,120.15) ; \draw [shift={(291.5,121.25)}, rotate = 312.15999999999997] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][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 [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (407,120.75) .. controls (378.79,83.62) and (474.06,84.23) .. (443.47,120.15) ; \draw [shift={(442.5,121.25)}, rotate = 312.15999999999997] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][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 (136,145) node [align=left] {\begin{minipage}[lt]{24.48pt}\setlength\topsep{0pt} {\Large $\displaystyle \textcolor[rgb]{0,0,0}{u}$} \end{minipage}}; \draw (282,145) node [align=left] {\begin{minipage}[lt]{18.360000000000003pt}\setlength\topsep{0pt} {\Large $\displaystyle \textcolor[rgb]{0,0,0}{v}$} \end{minipage}}; \draw (430,145) node [align=left] {\begin{minipage}[lt]{18.360000000000003pt}\setlength\topsep{0pt} {\Large $\displaystyle w$} \end{minipage}}; \end{tikzpicture} \caption{An illustration of the hard instance used for proving Theorem~\ref{thm:lowerBoundThm}.} \label{fig:comblock} \end{figure} We consider environments similar to combination lock~\citep{kakade2003sample}. Figure \ref{fig:comblock} shows a simplified version of our constructed environment. The agent starts at state $u$, and $v, w$ are other two states. The reward at $v$ is always $1$ while the reward at other states is $0$. In order to go to state $v$, the agent needs to select a sequence of correct actions. In each episode, the agent stays at $u$ if the previous action is correct and even if only one action is incorrect, the agent will go to state $w$ at and stay there till the episode ends. We further construct states and features to encode this problem as a linear MDP. To ensure the transition and the reward is linear we also need to adjust states and action carefully for which some auxiliary states are needed as well. The $\log d$ factor in the denominator comes from our modifications of the environment described above. \section{Introduction} \label{sec:intro} \input{intro.tex} \section{Related Work} \label{sec:rel} \input{rel.tex} \section{Preliminaries} \label{sec:pre} \input{pre.tex} \section{Algorithm and Result} \label{sec:algoIntro} \input{algo.tex} \section{Proof Sketch of Theorem~\ref{thm:main}} \label{sec:proof_sketch} \input{proof_sketch.tex} \section{Lower Bound} \label{sec:lb} \input{lb.tex} \section{Conclusion and Future Works} \label{sec:con} \input{conclusion.tex} \input{broader.tex} \subsection{Notations} We use $\norm{\cdot}$ to denote the standard Euclidean norm. Given a positive integer $N$, we let $[N]=\left\{1,2,\ldots,N\right\}$. For a matrix $A$, we use $\det(A)$ to denote its determinant. For two symmetric matrices, $A$ and $B$, $A \preccurlyeq B$ means the matrix $B - A$ is positive semidefinite. We use the standard $O(\cdot)$ and $\Omega(\cdot)$ notations to hide universal constant factors, and $\widetilde{O}$, and $\widetilde{\Omega}$ notations to hide logarithmic factors. \subsection{Markov Decision Process} Throughout our paper, we consider the episodic Markov decision model $( \mathcal{S}, \mathcal{A}, \mathrm{H}, \mathbb{P}, \mathrm{r} )$. In this model, $\mathcal{S}$ and $\mathcal{A}$ denote the set of states and actions, respectively. All the episodes have the same number of transitions taking place, which we use $\mathrm{H} \in N$ to denote. $\mathbb{P} = \{ \mathbb{P}_h \}$ is the set of transition probability measures. Hence $\mathbb{P}_h(x'|x,a)$ means the transition probability of taking action $a$ at step $h\in [H] = \{1,2,\cdots, H \}$ on state $x$ to the state $x'$. $\mathrm{r}$ is a collection of reward functions $r_h:\mathcal{S}\times \mathcal{A}\to [0,1]$ for each step in an episode. The dynamics of the episodic MDP can be view as the interaction of an agent with the environment periodically. At the beginning of an episode $k$, an arbitrary state $x_1^k \in \mathcal{S}$ is selected by the environment, and the agent is then in step $1$. At each step $h$ in this episode, based on the current state $x_h^k \in \mathcal{S}$ and the history information, the agent needs to decide which action to take. After action $a_h^k \in \mathcal{A} $ is chosen, the environment will give the reward for the step $r_h(x_h^k, a_h^k)$ and move the agent to the next state $x_{h+1} \in \mathcal{S}$. The episode automatically ends when the agent reaches the step $H+1$. In other words, the agent will take at most $H$ actions and receive corresponding rewards in each episode. To clarify the choice of actions for the agent in the episode, we define the policy function $\pi: \mathcal{S} \times [H]\to \mathcal{A}$. Namely, $\pi (x,h)$ is the action taken on state $x$ at step $h$ by the agent. We use $Q$-function to evaluate the long-term value for the action $a$ and subsequent decisions. The $Q$-function is defined as follows: \begin{equation}\label{Q-function} \begin{split} Q_{h}^{\pi}(x, a) := r_{h}(x, a) + \mathbb{E}\left. \left[ \sum_{i=h+1}^{H} r_{i}\left(x_{i}, \pi\left(x_{i}, i \right)\right) \right| x_{h}=x, a_{h}=a\right] \end{split} \end{equation} In addition, we define the value function $V_h^{\pi}: \mathcal{S}\to \mathbb{R} $ for the policy $\pi$ via the following formula: \begin{equation}\label{value function} V_{h}^{\pi}(x):=\mathbb{E}\left. \left[\sum_{i=h}^{H} r_{i}\left(x_{i}, \pi\left(x_{i}, i\right)\right) \right| x_{h}=x \right]. \end{equation} The $Q$-function and $V$-function obey the following Bellman equation: for any policy $\pi$, \begin{align*} Q_{h}^{\pi}(x, a)=&\left(r_{h}+\mathbb{P}_{h} V_{h+1}^{\pi}\right)(x, a), \quad V_{h}^{\pi}(x)=Q_{h}^{\pi}\left(x, \pi_{h}(x)\right), \quad \text{and}\quad V_{H+1}^{\pi}(x)=0, \end{align*} where \[ \left[\mathbb{P}_{h} V_{h+1}\right](x, a):=\mathbb{E}_{x^{\prime} \sim \mathbb{P}_{h}(\cdot | x, a)} V_{h+1}\left(x^{\prime}\right). \] We denote $V_h^{*} (x) = \sup_{\pi} V_h^{\pi}(x)$, $Q_h^*(x,a) = \sup_{\pi} Q_h^{\pi} (x,\pi(x))$ as the optimal value and $Q$-functions. The Bellman equation also holds for $V_h^*$ and $Q_h^*$ with respect to the optimal policy $\pi^*$. Suppose an agent is allowed to interact with the MDP for $K$ episodes and plays policy $\pi_k$ at episode $k\in[K]$. We use regret to measure the performance of its algorithm, which is the difference of the value of the optimal policy and the policy adopted by the agent. \begin{equation} \operatorname{Regret}(K)=\sum_{k=1}^{K}\left[V_{1}^{\star}\left(x_{1}^{k}\right)-V_{1}^{\pi_{k}}\left(x_{1}^{k}\right)\right] \end{equation} \subsection{Linear Markov Decision Process} \label{LMDPassumption} The focus of our study is the linear MDP model~\citep{yang2019sample,jin2019provably}. Linearity here represents that the transition probability and the reward are linear functions given the feature map. Formally, there exists a map from the state-action space to the feature space, namely $\phi: \mathcal{S}\times \mathcal{A} \to \mathbb{R}^d$ and a measure $\mu_h$ for $h \in [H]$ such that $\forall (x,a)\in \mathcal{S}\times \mathcal{A}$ \begin{align*} \mathbb{P}_h (\cdot | x, a) = \left< \phi(x, a),\mu_h (\cdot) \right>, \quad\text{and}\quad r_h(x, a) = \left\langle \phi(x, a), \theta_h\right\rangle. \end{align*} We further assume that$ \| \phi(x,a) \| \le 1$, $\forall x\in \mathcal{S}, \|\mu_h(x)\|\le \sqrt{d}$, and $\|\theta_h\|\le \sqrt{d}$. Linear MDP model is a strict generalization of the standard tabular RL model with $d = \abs{\mathcal{S}}\abs{\mathcal{A}}$. For each $\left(s,a\right) \in \mathcal{S} \times \mathcal{A}$, we can let $\phi\left(s,a\right) = e_{(s,a)}$ be the canonical basis in $\mathbb{R}^d$. Then we can just define $\left\langle e_{(s,a)},\mu_h\left(\cdot\right)\right\rangle= \mathbb{P}_h\left(\cdot \mid s,a\right)$ and $\left\langle e_{(s,a)}, \theta_h\right\rangle = r_h(s, a)$. See \cite{yang2019sample,jin2019provably} for more examples. \subsection{Switching Cost} The concept of switching cost is used to quantify the adaptability of reinforcement learning algorithms. The main focus of our work is the global switching cost, which counts the number of policy changes in the running of the algorithm in $K$ episodes, namely: \begin{align} N_{\text{switch}} ^{\text{gl}} \triangleq \sum_{k = 1}^{K-1} \mathbb{I} \{ \pi_k \not = \pi_{k+1} \} \label{eqn:switching_cost} \end{align} The focus of \cite{bai2019provably} is local switching cost: \begin{align} N_{\text{switch}}^{\text{loc}} \triangleq\sum_{k=1}^{K-1} \left|\left\{(h,x) \in [H] \times \mathcal{S} : \pi_k^h(x) \neq \pi_{k+1}^h(x)\right\}\right| \label{eqn:switching_cost_loc} \end{align} Technically, we always have $$N_{\text{switch}} ^{\text{gl}} \le N_{\text{switch}}^{\text{loc}} \le \abs{\mathcal{S}}HN_{\text{switch}} ^{\text{gl}}. $$ One crucial reason to use the global switching cost is that the definition of local switching cost is based on the number of states, which can be infinite in the linear MDP model, so the global switching cost is more meaningful quantity to study. Lastly, we emphasize that in the study of the switching cost, we only consider deterministic policies. Note that, by the Bellman optimality equation, there exist at least one optimal policy that is deterministic. \subsection{Regret Analysis} Due to the delayed policy update, the establishment of the bound for regret may be more difficult than the previous algorithm in \cite{jin2019provably}, yet the steps are very similar. \iffalse We start our proof by decomposing the regret into the error induced by the estimation error and the error from the delayed policy update. To simplify the notation, for any $k \in [K]$, we let $k' = \arg\min_{\hat{k} \in [k]} Q_h^k = Q_h^{\hat{k}}$. Note $k' \le k$ represents the episode index we update the policy to the one used in the $k$-th episode. We have the following decomposition. \begin{align*} \text{Regret}(K) & \le \sum_{k = 1}^{K} (\widetilde Q_1^{k'}(x_1^k,a_1^k)-Q_1^{\pi_k}(x_1^k,a_1^k)) \\ &\le \sum_{k=1}^K [\widetilde Q_1^{k}(x_1^k,a_1^k) - Q_1^{\pi_k}(x_1^k,a_1^k)] + \sum_{k=1}^K [\widetilde Q_1^{k'} (x_1^k,a_1^k)- \widetilde Q_1^{k}(x_1^k,a_1^k)] \end{align*} By definition, the first represents the error from the estimation and the second term represents the error from the delayed policy update. Note the error induced by the estimation is exactly the same regret decomposition term in \cite{jin2019provably}, so we can just use the analysis therein. In the following, we focus on proving the error from the delayed policy update is small. \fi We start our proof by decomposing the regret into the error induced by the estimation error from the delayed policy update. To simplify the notation, for any $k \in [K]$, we let $\widetilde k \le k$ represents the episode index we update the policy to the one used in the $k$-th episode. We have the following decomposition. \begin{align*} \text{Regret}(K) & \le \sum_{k = 1}^{K} [\widetilde V_1^{\tilde{k}}(x_1^k) - V_1^{\pi_{\tilde{k}}}(x_1^k)] \end{align*} By definition, this term represents the error from the estimation in episode $\widetilde k$ in state $x_1^k$. \paragraph{Analysis of Error due to the Delayed Policy Update} First, as will be seen in the appendix, we can obtain a recursive formula such that it is sufficient to bound the term $\left(\widetilde {Q}_{h}^{\tilde{k}}-Q_{h}^{\pi_{\tilde{k}}}\right)\left(x_{h}^{k}, a_{h}^{k}\right)$. With some error analysis, we can bound it by \[ \left(\widetilde {Q}_{h}^{\tilde{k}}-Q_{h}^{\pi_{\tilde{k}}}\right)\left(x_{h}^{k}, a_{h}^{k}\right)\le \Delta_{h}^{\tilde{k}}(x, a)+\widetilde {\delta}_{h}^{k} \] \iffalse \[ \left(\widetilde{Q}_{h}^{k}-\widetilde Q_{n}^{k'}\right)\left(x_{h}^{k}, a_{h}^{k}\right) \le \Delta_{h}^{k}(x, a)+\Delta_{h}^{k^{\prime}}(x, a)+\widetilde {\delta}_{h}^{k}+\widehat{\delta}_{h}^{k}. \] \fi Here $\widetilde {\delta}_{h}^{k}$ is a zero-mean martingale difference sequence, so we can use standard concentration inequalities to bound it. $\Delta_{h}^{k}(x, a) $ represents the bonus term that satisfies \[\abs{\Delta_{h}^{k}(x, a)} \le \beta \sqrt{\phi(x, a)^{\top}\left(\Lambda_{h}^{k}\right)^{-1} \phi(x, a)}.\] By our policy update criteria, we have the following simple yet crucial property: \[ \phi^\top (\Lambda_h^{\widetilde k})^{-1} \phi \le 2 \phi^\top (\Lambda_h^{k})^{-1} \phi .\] Therefore, although the error due to the delayed update has additional terms, these terms are at most of the same order as the error occurring during the estimation phase. Using this observation, we can essentially reuse the proof for bounding the error due the estimation here. \subsection{Switching Cost Analysis} The analysis of switching cost is trickier. We employ a potential based analysis. The potential function is the logarithm of the determinant of the empirical covariance matrix. The following lemma shows it is upper bounded by $O\left(d \log K\right)$. \begin{lemma}\label{detlemma_2} Let $\phi_{\tau}$ are $d$-dimensional vectors satisfying $\norm{\phi_{\tau}} \le 1$. Let $A = \sum_{\tau = 1}^{K}\phi_{\tau}(\phi_{\tau})^{\top} + \lambda \cdot \mathrm{I}.$ Then we have \[\log \det A = O(d\log K).\] \end{lemma} Now we consider our update rule. Recall we update our policy only if $(\Lambda_h^k)^{-1} \not \preccurlyeq 2 (\Lambda_h^{\tilde{k}})^{-1}$. The following lemma shows whenever this condition holds, the potential function must increase by a constant. \begin{lemma}\label{detlemma} Assume $m\le n$, $A = \sum_{\tau = 1}^{m} \phi_{\tau}\phi_{\tau}^{\top} + \lambda \cdot \mathrm{I}$, $B = \sum_{\tau = 1}^{n} \phi_{\tau}\phi_{\tau}^{\top} + \lambda \cdot \mathrm{I}$. Then if $A^{-1} \not \preccurlyeq 2B^{-1}$, we have \[\log \det B \ge \log \det A + \log 2\] \end{lemma} To bound the switching cost, we note the potential is upper bounded by $O\left(d \log K\right)$ and every time we update the policy, the potential must increase by $\log 2$, so in total we at most update the policy $O\left(d \log K\right)$ times. We believe our proof strategy may be useful in other problems as well.
{'timestamp': '2021-01-05T02:19:11', 'yymm': '2101', 'arxiv_id': '2101.00494', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00494'}
arxiv
\section{Copyright} All papers submitted for publication by AAAI Press must be accompanied by a valid signed copyright form. There are no exceptions to this requirement. You must send us the original version of this form. However, to meet the deadline, you may fax (1-650-321-4457) or scan and e-mail the form ([email protected]) to AAAI by the submission deadline, and then mail the original via postal mail to the AAAI office. If you fail to send in a signed copyright or permission form, we will be unable to publish your paper. There are \textbf{no exceptions} to this policy.You will find PDF versions of the AAAI copyright and permission to distribute forms in the AAAI AuthorKit. \section{Formatting Requirements in Brief} We need source and PDF files that can be used in a variety of ways and can be output on a variety of devices. The design and appearance of the paper is strictly governed by the aaai style file (aaai20.sty). \textbf{You must not make any changes to the aaai style file, nor use any commands, packages, style files, or macros within your own paper that alter that design, including, but not limited to spacing, floats, margins, fonts, font size, and appearance.} AAAI imposes requirements on your source and PDF files that must be followed. Most of these requirements are based on our efforts to standardize conference manuscript properties and layout. All papers submitted to AAAI for publication will be recompiled for standardization purposes. Consequently, every paper submission must comply with the following requirements: \begin{quote} \begin{itemize} \item Your .tex file must compile in PDF\LaTeX{} --- ( you may not include .ps or .eps figure files.) \item All fonts must be embedded in the PDF file --- including includes your figures. \item Modifications to the style file, whether directly or via commands in your document may not ever be made, most especially when made in an effort to avoid extra page charges or make your paper fit in a specific number of pages. \item No type 3 fonts may be used (even in illustrations). \item You may not alter the spacing above and below captions, figures, headings, and subheadings. \item You may not alter the font sizes of text elements, footnotes, heading elements, captions, or title information (for references and mathematics, please see the the limited exceptions provided herein). \item You may not alter the line spacing of text. \item Your title must follow Title Case capitalization rules (not sentence case). \item Your .tex file must include completed metadata to pass-through to the PDF (see PDFINFO below) \item \LaTeX{} documents must use the Times or Nimbus font package (you may not use Computer Modern for the text of your paper). \item No \LaTeX{} 209 documents may be used or submitted. \item Your source must not require use of fonts for non-Roman alphabets within the text itself. If your paper includes symbols in other languages (such as, but not limited to, Arabic, Chinese, Hebrew, Japanese, Thai, Russian and other Cyrillic languages), you must restrict their use to bit-mapped figures. Fonts that require non-English language support (CID and Identity-H) must be converted to outlines or 300 dpi bitmap or removed from the document (even if they are in a graphics file embedded in the document). \item Two-column format in AAAI style is required for all papers. \item The paper size for final submission must be US letter without exception. \item The source file must exactly match the PDF. \item The document margins may not be exceeded (no overfull boxes). \item The number of pages and the file size must be as specified for your event. \item No document may be password protected. \item Neither the PDFs nor the source may contain any embedded links or bookmarks (no hyperref or navigator packages). \item Your source and PDF must not have any page numbers, footers, or headers (no pagestyle commands). \item Your PDF must be compatible with Acrobat 5 or higher. \item Your \LaTeX{} source file (excluding references) must consist of a \textbf{single} file (use of the ``input" command is not allowed. \item Your graphics must be sized appropriately outside of \LaTeX{} (do not use the ``clip" or ``trim'' command) . \end{itemize} \end{quote} If you do not follow these requirements, you will be required to correct the deficiencies and resubmit the paper. A resubmission fee will apply. \section{What Files to Submit} You must submit the following items to ensure that your paper is published: \begin{itemize} \item A fully-compliant PDF file that includes PDF metadata. \item Your \LaTeX{} source file submitted as a \textbf{single} .tex file (do not use the ``input" command to include sections of your paper --- every section must be in the single source file). (The only allowable exception is .bib file, which should be included separately). \item The bibliography (.bib) file(s). \item Your source must compile on our system, which includes only standard \LaTeX{} 2019 TeXLive support files. \item Only the graphics files used in compiling paper. \item The \LaTeX{}-generated files (e.g. .aux, .bbl file, PDF, etc.). \end{itemize} Your \LaTeX{} source will be reviewed and recompiled on our system (if it does not compile, you will be required to resubmit, which will incur fees). \textbf{Do not submit your source in multiple text files.} Your single \LaTeX{} source file must include all your text, your bibliography (formatted using aaai.bst), and any custom macros. Your files should work without any supporting files (other than the program itself) on any computer with a standard \LaTeX{} distribution. \textbf{Do not send files that are not actually used in the paper.} We don't want you to send us any files not needed for compiling your paper, including, for example, this instructions file, unused graphics files, style files, additional material sent for the purpose of the paper review, and so forth. \textbf{Do not send supporting files that are not actually used in the paper.} We don't want you to send us any files not needed for compiling your paper, including, for example, this instructions file, unused graphics files, style files, additional material sent for the purpose of the paper review, and so forth. \textbf{Obsolete style files.} The commands for some common packages (such as some used for algorithms), may have changed. Please be certain that you are not compiling your paper using old or obsolete style files. \textbf{Final Archive.} Place your PDF and source files in a single archive which should be compressed using .zip. The final file size may not exceed 10 MB. Name your source file with the last (family) name of the first author, even if that is not you. \section{Using \LaTeX{} to Format Your Paper} The latest version of the AAAI style file is available on AAAI's website. Download this file and place it in the \TeX\ search path. Placing it in the same directory as the paper should also work. You must download the latest version of the complete AAAI Author Kit so that you will have the latest instruction set and style file. \subsection{Document Preamble} In the \LaTeX{} source for your paper, you \textbf{must} place the following lines as shown in the example in this subsection. This command set-up is for three authors. Add or subtract author and address lines as necessary, and uncomment the portions that apply to you. In most instances, this is all you need to do to format your paper in the Times font. The helvet package will cause Helvetica to be used for sans serif. These files are part of the PSNFSS2e package, which is freely available from many Internet sites (and is often part of a standard installation). Leave the setcounter for section number depth commented out and set at 0 unless you want to add section numbers to your paper. If you do add section numbers, you must uncomment this line and change the number to 1 (for section numbers), or 2 (for section and subsection numbers). The style file will not work properly with numbering of subsubsections, so do not use a number higher than 2. If (and only if) your author title information will not fit within the specified height allowed, put \textbackslash setlength \textbackslash titlebox{2.5in} in your preamble. Increase the height until the height error disappears from your log. You may not use the \textbackslash setlength command elsewhere in your paper, and it may not be used to reduce the height of the author-title box. \subsubsection{The Following Must Appear in Your Preamble} \begin{quote} \begin{scriptsize}\begin{verbatim} \documentclass[letterpaper]{article} \usepackage{aaai20} \usepackage{times} \usepackage{helvet} \usepackage{courier} \usepackage[hyphens]{url} \usepackage{graphicx} \urlstyle{rm} \def\rm{\rm} \usepackage{graphicx} \frenchspacing \setlength{\pdfpagewidth}{8.5in} \setlength{\pdfpageheight}{11in} \pdfinfo{ /Title (Type Your Paper Title Here in Mixed Case) /Author (John Doe, Jane Doe) /Keywords (Input your keywords in this optional area) } \title{Title}\\ \author\{Author 1 \ and Author 2\\ Address line\\ Address line\\ \ And\\ Author 3\\ Address line\\ Address line }\\ \end{verbatim}\end{scriptsize} \end{quote} \subsection{Preparing Your Paper} After the preamble above, you should prepare your paper as follows: \begin{quote} \begin{scriptsize}\begin{verbatim} \begin{document} \maketitle \begin{abstract} \end{abstract}\end{verbatim}\end{scriptsize} \end{quote} \subsubsection{The Following Must Conclude Your Document} \begin{quote} \begin{scriptsize}\begin{verbatim} \section{Introduction} Reinforcement learning (RL) is a promising way to solve sequential decision-making tasks. For example, RL has shown superhuman performance in competitive games like Go~\cite{silver2016mastering} and Starcraft~\cite{vinyals2019alphastar}. RL has also been used for the control of complex robotic systems~\cite{nagabandi2018deep,chen2020delay} such as legged robots~\cite{hwangbo2019learning}. However, most well-known RL algorithms~\cite{lillicrap2015continuous,schulman2017proximal,chua2018deep} do not consider safety constraints during exploration. Moreover, they are usually not adaptive to non-stationary disturbances, which are common in many realistic safety-critical applications~\cite{tobin2017domain}. These two weaknesses of current RL algorithms need to be addressed before their deployment in safety-critical environments. \begin{figure}[t] \centering \includegraphics[width=0.8\columnwidth]{fig/health_robot_2.png} \caption{Healthcare environment with and without adaptive safety. Red dots indicate direct contacts between the robot and the patient which should be avoided.} \label{fig:health_robot} \end{figure} Several recent studies have been proposed to address the lack of \textbf{safety} \cite{achiam2017constrained,pham2018optlayer,chow2018lyapunov,dalal2018safe} and the lack of \textbf{adaptability} \cite{finn2017model,nagabandi2018learning,xu2020task} issues of RL algorithms, respectively. However, the above two issues are entangled in realistic applications, because the environment disturbances may change the system dynamics and affect the region of safety. In other words, disturbances may cause unexpected safety violations if not properly handled. A typical example is shown in Fig.~\ref{fig:health_robot}, where a healthcare robot is trying to deliver the medicine (or food) to the patient while avoiding any direct contact. The disturbance in this environment mainly comes from the patient's movements. To safely finish the delivery, the robot must be able to quickly identify the patient's moving preference and adaptively generate safe control decisions. To the best of our knowledge, there hasn't been a general framework or a complete algorithm to fully address this entangled problem. In this paper, we propose the context-aware safe reinforcement learning (CASRL) framework to realize safe adaptation in non-stationary environments and resolve the above entangled problem. Our major contribution is threefold: \begin{enumerate} \item \textbf{Fast adaptation}. We study this problem under the model-based RL framework for sample efficiency. Unlike previous models that predict the next state only based on the current state and action, we use a context-aware latent variable model to infer the disturbance of the non-stationary environment based on the historical transition data, allowing task-agnostic adaptation. \item \textbf{Risk-averse control}. We achieve risk-averse decision making with constrained model predictive control. Constraints are used for guarantees of safety in uncertain environments. To improve exploration safety in the early stage of training, we incorporate domain knowledge to make conservative decisions with prior models. We also enable prioritized sampling of rare unsafe data during the model training to alleviate the data imbalance problem in safety-critical environments. Combined with a context-aware probabilistic model, this control regime can realize safe adaptation in non-stationary environments and resolve the aforementioned entangled problem. \item \textbf{Extensive evaluation}. We conduct experiments in a toy example and a realistic high-dimensional environment with non-stationary disturbances. Results show that the proposed method can (i) realize fast adaptation for safe control in unseen environments, (ii) scale to high-dimensional tasks, and (iii) outperform existing approaches in terms of safety and robustness. \end{enumerate} \section{Related Work} \textbf{Safe reinforcement learning} has attracted long-term interest in the RL community~\cite{garcia2015comprehensive}. The Constrained Markov Decision Processes (CMDPs)~\cite{altman1999constrained} is often used to model the safe RL problem, where the agent aims to maximize its cumulative reward while satisfying certain safety constraints. Several approaches, such as the Lagrangian method~\cite{altman1998constrained} and constrained policy optimization~\cite{achiam2017constrained,chow2019lyapunov}, have been proposed to solve CMDPs. Gaussian Processes (GPs) have also been used to approximate the dynamics of the environment for safe exploration~\cite{koller2018learning,hewing2019cautious}. Particularly, Wachi and Sui~\cite{wachi2020safe} discussed the situation where the safety boundary is unknown. However, most existing safe RL methods assume a consistent environment and cannot deal with time-varying disturbances. In contrast, our method aims to realize safe control in non-stationary environments, which is more realistic for safety-critical applications. \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{fig/NPmodelv5.png} \caption{The flow of the proposed context-aware safe reinforcement learning (CASRL) framework. A context-aware model is used to perform conditional dynamics predictions based on the context data.} \label{fig:npmodel} \end{figure*} \textbf{Robust adversarial learning} addresses the environment disturbance problem by formulating a two-player zero-sum game between the agent and the disturbance~\cite{nilim2003robust,pinto2017robust,ding2020learning}. However, the robust policies trained in this way may overfit to the worst-case scenario, so the performance is not guaranteed in other cases~\cite{rice2020overfitting}. \textbf{Meta-learning for RL} has recently been developed to realize adaptive control in non-stationary environments~\cite{duan2016rl,finn2017model,saemundsson2018meta,nagabandi2018learning,xu2020task,cheung2019non}. Since unsafe data are particularly rare in safety-critical environments, we focus on model-based methods for sample efficiency~\cite{chua2018deep}. Sæmundsson et al.~\cite{saemundsson2018meta} proposed to use Gaussian Processes to represent dynamics models, which may suffer from poor scalability as the dimension and the amount of data increases. Nagabandi et al.~\cite{nagabandi2018learning} integrated model-agnostic meta-learning (MAML)~\cite{finn2017model} with model-based RL. The dynamics model is represented by a neural network that uses a meta-learned initialization and is quickly updated with the latest data batch. However, the uncertainty is not estimated by the model, and we show that this may degrade the performance. Later studies from Xu et al.~\cite{xu2020task} and Nagabandi et al.~\cite{nagabandi2018deep} achieved online continual learning with streaming data by maintaining a mixture of meta-trained dynamics models. These approaches may suffer from the model explosion in complex environments where the potential number of dynamics type is large. We overcome this issue by constructing a probabilistic latent variable model that learns a continuous mapping from the disturbance space to the latent space. \textbf{Neural Processes (NPs)}~\cite{garnelo2018neural} have been proposed for few-shot regression by learning to map a context set of input-output observations to a distribution of regression functions. Comparing to the Gaussian processes, NPs have the advantage of efficient data-fitting with linear complexity in the size of context pairs and can learn conditional distributions with a latent space. A later study~\cite{kim2019attentive} proposed Attentive Neural Processes (ANPs) by incorporating attention into NPs to alleviate the underfitting problem and improve the regression performance. NP-based models have shown great performance in function regression~\cite{qin2019recurrent}, image reconstruction~\cite{kim2019attentive}, and point-cloud modeling~\cite{gordon2019convolutional}. As probabilistic latent variable models, ANPs naturally enable continual online learning in continuously parameterized environments. In this paper, we will show how to incorporate ANPs for dynamics prediction and safety constraint estimation. The rest of the paper is organized as follows. In Sec.~\ref{sec:3}, we formulate the safety-critical problem that we aim to solve in this paper. In Sec.~\ref{sec:4}, we show the inference process of unknown environment disturbances with a latent variable model. In Sec.~\ref{sec:5}, we show how to perform safe adaptation with a sampling-based model-predictive controller. The experiment results and discussions are presented in Sec.~\ref{sec:6}. \section{Problem Statement} \label{sec:3} We consider non-stationary Markov Decision Processes (MDPs) with safe constraints. An MDP is defined as a tuple $(\mathcal{S}, \mathcal{A}, f, r, \gamma, \rho_0)$ where $\mathcal{S}$ denotes the state space, $\mathcal{A}$ denotes the action space, $f(s^\prime|s,a)$ is the transition distribution of the environment dynamics that takes into the current state $s\in\mathcal{S}$ and action $a\in\mathcal{A}$, and outputs the distribution of the next state $s^\prime\in\mathcal{S}$. $r(s,a)$ is the reward function, $\gamma$ is the reward discount factor, and $\rho_0$ is the distribution of the initial state. To simulate the disturbances in real-world environments, we consider non-stationary MDPs where the transition dynamics $f(s^\prime|s,a,\theta)$ depends on certain hidden parameters $\theta \sim \mathcal{T}$, where $\mathcal{T}$ denotes the distributions of environments parameters. For simplicity, we assume that the environment is episodically consistent - the change of $f$ only happens at the beginning of each episode. This setting is commonly used in related papers and can be easily generalized to other consistent time-horizons. Denote a safe state set by $\mathcal{S}_{safe}$ and a safe action set by $\mathcal{A}_{safe}$. The goal of safe RL is to find the optimal action sequence $a_{0:T}$ to maximize the discounted accumulated reward $\sum_{t=0}^{\tau}\gamma^t r(s_t, a_t)$, without violating the safety constraints (i.e., keeping $s_t\in\mathcal{S}_{safe}$ and $a_t\in\mathcal{A}_{safe}$ for every time step $t$). $\gamma$ is a discount factor and $\tau$ is the task horizon. Throughout this paper, we assume $\mathcal{S}_{safe}$ and $\mathcal{A}_{safe}$ are known a \textit{priori}. \section{Context-Aware Model Inference} \label{sec:4} We address the proposed problem under the model-based RL framework, where the tasks are solved by learning a dynamics model $\tilde{f}(s^\prime|s,a)$ to approximate the ground-truth environment dynamics $f(s^\prime|s,a)$. However, when the environment dynamics $f$ is non-stationary, $\tilde{f}(s^\prime|s,a)$ may fail to make accurate predictions since some hidden features of the environment are not identified. To handle this problem, we propose to learn a context-aware model $\tilde{f}(s^\prime|s,a,C)$ that performs state predictions based not only on the current state $s$ and action $a$ but also on the \textit{contexts} $C$ - the historical data collected in the current episode. In this way, the hidden information of the environment is first inferred from $C$, and then the posterior distribution of the next state $s^\prime$ is calculated. To incorporate domain knowledge for adaptive learning, we divide the dynamics model $\tilde{f}(s^\prime|s,a,C)$ into two parts: \begin{subequations} \label{equ:div} \begin{align} &s^\prime \coloneqq s^\prime_h + s^\prime_g, \\ \text{with} \quad &s^\prime_{h}\sim h(\cdot|s,a), \label{equ:div:h} \\ &s^\prime_{g}\sim g(\cdot|s,a,C). \label{equ:div:g} \end{align} \end{subequations} The model $h$ in Eq.~(\ref{equ:div:h}) is referred to as the \textit{prior model}. Such model can be obtained by leveraging domain knowledge without necessarily interacting with the environment, e.g., training the dynamics model in a simulator~\cite{chua2018deep} or using first principles modeling~\cite{pati2014modeling}. However, the drawback is that they are usually context-unaware. The model $g$ in Eq.~(\ref{equ:div:g}) is called the \textit{disturbance model} (or the error model). It represents the error between the prior model $h$ and the overall dynamics model $\tilde{f}$. It is the model we aim to learn by interacting with the target non-stationary environment. The disturbance model is context-aware and should be able to capture the hidden information of the environment based on the contexts $C$. To achieve that, the disturbance model $g$ should have the following properties: \begin{itemize} \item Flexibility: $g$ should be able to condition on arbitrary number of contexts to make predictions. \item Uncertainty awareness: $g$ should estimate the uncertainty in its predictions to balance exploration and exploitation. \item Scalability: $g$ should be able to scale to high-dimensional environments. \end{itemize} In this paper, we use an Attentive Neural Process (ANP)~\cite{kim2019attentive} to represent the disturbance dynamics model $g$ for its desirable properties and implementation simplicity. The ANP model is defined as a (infinite) family of conditional distributions, in which an arbitrary number of observed input-output \textit{contexts} $(x_C, y_C)\coloneqq(x_i,y_i)_{i\in C}$ is used to model an arbitrary number of input-output \textit{targets} $(x_T, y_T)\coloneqq(x_i,y_i)_{i\in T}$, where $C$ denotes a set of observed points and $T$ denotes a set of unobserved points (the output $y_T$ is unknown). The ANP transforms the original conditional likelihood to a hierarchical inference structure: \begin{equation} g\left(y_T|x_T, x_C, y_C\right) = \int p\left(y_T|x_T,z\right)q\left(z|l_C\right)dz \end{equation} where $z$ is a global latent vector describing uncertainty in the predictions of $y_T$ for given observations $(x_C, y_C)$, and is modeled by a factorized Gaussian parameterized by $l_C\coloneqq l(x_C, y_C)$, with $l$ being a deterministic function that aggregates $(x_C, y_C)$ into a fixed dimensional representation. In ANP, $l$ consists of a multilayer perceptron (MLP), self-attentions, and a mean aggregation layer to produce permutation-invariant representations. For dynamics prediction, the input $x$ is the state-action pair $(s,a)$, and the output $y$ is the state at the next time step $s^\prime$. At time $t$, the contexts $(x_C, y_C) = (s_i,a_i,s^\prime_i)_{i\in[1:t-1]}$ contain the state-action information of the previous time steps, the target input $x_T = (s_t,a_t)$ is the current state-action pair, and we aim to predict the target output $y_T = s^\prime_t$ that represents the next state. The flow of using context-aware model for model-based RL is shown in Fig.~\ref{fig:npmodel}. A constrained MPC controller is used for safe planning and will be introduced in the next section. The training of ANP is based on the amortized variational inference. The parameters of the encoders and the decoder are updated by maximizing the following evidence lower bound (ELBO) with the reparametrization trick~\cite{kingma2013auto}: \begin{equation} \label{equ:elbo} \begin{split} &\log g\left(y_T|x_T, x_C, y_C\right) \geq\\ &\mathbb{E}_{q\left(z|l_T\right)} \left[\log g(y_T|x_T,z)\right] - D_{\text{KL}}\left(q\left(z|l_T\right)\parallel q\left(z|l_C\right)\right). \end{split} \end{equation} where $l_T\coloneqq l(x_T, y_T)$, with $l$ being a deterministic function introduced before. The training objective of ANP can be interpreted as improving the prediction accuracy on the targets while regularizing the Kullback–Leibler divergence between the latent encoding of the contexts and the targets. The contexts and the targets are randomly sampled from a replay buffer that stores transition data from the same disturbance dynamics. However, the rareness of unsafe data may lead to low prediction accuracy in the unsafe state region. To alleviate this issue, inspired by~\cite{schaul2015prioritized}, we enable prioritized experience sampling during model training - to train the context-aware model with a certain data batch, the unsafe data in this data batch are first added into the target set $T$, and then other safe data are uniformly sampled and appended to $C$ and $T$. We found that this trick can effectively increase the prediction accuracy in the unsafe region, which is discussed in Sec.~\ref{sec:pri}. \section{Safe Adaptation with MPC} \label{sec:5} We formulate the safe adaptation as a constrained nonlinear optimization problem: \begin{subequations} \label{equ:opt} \begin{align} \max_{a_{0:\tau}} \quad & \sum_{t=0}^{\tau} r(s_t, a_t) \label{equ:obj} \\ \text{s.t.} \quad & a_t \in \mathcal{A}_{safe} \label{equ:a_con}\\ & s_{t+1} \sim \tilde{f}(\cdot|s_t, a_t, C) \label{equ:s_con1}\\ & \Pr(s_t \notin \mathcal{S}_{safe}) \leq \delta \label{equ:s_con2}\\ & \hat{s}_{t+1} \sim h(\cdot|\hat{s}_t, a_t) \label{equ:p_con1}\\ & \Pr(\hat{s}_t \notin \mathcal{S}_{safe}) \leq \delta \label{equ:p_con2}\\ \text{for} \quad & t=0,\dots,\tau \notag \end{align} \end{subequations} Eq.~(\ref{equ:obj}) shows that the objective is to maximize the cumulative reward, Eq.~(\ref{equ:a_con}) represents the safety constraint on actions, and Eq.~(\ref{equ:s_con1}, \ref{equ:s_con2}) define the safety constraint on the states $s_t$ that predicted by the learned model $\tilde{f}$. Eq.~(\ref{equ:obj})-(\ref{equ:s_con2}) form the general problem of safe RL in most previous literature~\cite{koller2018learning}. However, with the non-stationary environment disturbances, the learning process of the prediction model $\tilde{f}$ may be unstable, and it is difficult for the agent to keep safe when $\tilde{f}$ is not accurate. To alleviate this problem, we formulate the prior safety constraint shown in Eq.~(\ref{equ:p_con1}, \ref{equ:p_con2}), where a sequence of auxiliary states $\hat{s}_t$ is predicted only with the prior model $h$, and the high-probability safety constraint is applied to it ($\hat{s}_0 = s_0$). Though not accurate, the prior safety constraint provides extra protection for the agent based on the static prior model $h$. Applying the prior safety constraint is an effective way to incorporate domain knowledge to improve safe learning, especially when the unsafe data are expensive to obtain. Experiment results show that it can effectively reduce the safety violation rate especially in the early stage of training (Sec.~\ref{sec:during}). Direct solving the optimization problem Eq.~(\ref{equ:opt}) is intractable since $\tilde{f}$ is a high-dimensional nonlinear stochastic function. Previous work has used approximated uncertainty propagation techniques like sigma-point transform~\cite{ostafew2016robust} and Taylor expansion~\cite{koller2018learning} to model the state distribution as a single Gaussian distribution, and then solve Eq.~(\ref{equ:opt}) with nonlinear solvers such as the IPOPT~\cite{wachter2006implementation}. However, Deisenroth et al.~\cite{deisenroth2013gaussian} showed that the Gaussian moment matching could corrupt after long-term propagation due to the multi-modal distribution of states, inducing huge prediction errors. Also, IPOPT cannot provide an alternative plan if no solution for Eq.~(\ref{equ:opt}) is found in limited time. \begin{algorithm}[t] \caption{Trajectory sampling \label{alg:traj}} \begin{algorithmic} \Procedure{TrajSampling}{$A, h, g, C, t_0$} \For{SamplingTime $= 1, N$} \For{$t$ = $t_0$, $t_0 + \tau_p$} \State $s_{th}\sim h(\cdot|s_{t-1},a_{t-1})$ \State $s_{tg}\sim g(\cdot|s_{t-1},a_{t-1},C)$ \State $s_t = s_{th} + s_{tg}$ \EndFor \EndFor \State \textbf{return} $\{s_{t_0:t_0 + \tau}\}_{1:N}$ \EndProcedure \end{algorithmic} \end{algorithm} \begin{algorithm*}[t] \caption{Context-Aware Safe Reinforcement Learning (CASRL) \label{alg:sa}} \begin{algorithmic} \State \textbf{Input:} prior model $h$, state safe set $\mathcal{X}_{safe}$, action safe set $\mathcal{A}_{safe}$, task distribution $\mathcal{T}$ \State \textbf{Output:} disturbance model $g$, episodic replay buffer $R$ \State $\tilde{g} \leftarrow g_0$, $R \leftarrow \{\}$ \Comment{Initialize the disturbance model and the replay buffer} \For{Episode = 1, $M$} \State $p\sim\mathcal{T}$, $C \leftarrow \{\}$, reset \text{CEM}($\cdot$), get $s_0$ \Comment{Environment sampling and episode initialization} \For {$t$ = 1, $\tau$} \For {$A\sim \text{CEM}(\cdot)$} \Comment{Sampling action sequences} \State $s_{t:t+\tau_p} = \textsc{TrajSampling}(A, h, g, C, s_{t-1}, t)$ \Comment{State propagation in the learned model} \State $\hat{s}_{t:t+\tau_p} = \textsc{TrajSampling}(A, h, 0, C,s_{t-1}, t)$ \Comment{State propagation in the prior model} \State $A^* = \arg \max_A \text{CVaR}_\alpha\left(\bar{R}\left(A\right)\right)$ \Comment{The optimal action sequence is selected based on the CVaR} \State Update CEM($\cdot$) \EndFor \State Execute $a^*_t$, get $s_{t+1}$ \Comment{$a^*_t$ is the first element of $A^*$} \State $C \leftarrow C \cup (s_{t}, a_{t}^*, s_{t+1})$ \Comment{Record context} \EndFor \State $R \leftarrow R \cup C$ \Comment{Update the episodic replay buffer} \State Update $g$ by maximizing the ELBO in Eq.~(\ref{equ:elbo}) with $R$ \Comment{Model learning} \EndFor \end{algorithmic} \end{algorithm*} In this paper, we propose to solve Eq.~(\ref{equ:opt}) with a sampling-based model-predictive control (MPC) approach. We use MPC for its implementation simplicity, time flexibility, and risk aversion. Also, this sampling-based method makes no assumptions on the pattern of state distributions. Denoting the planning horizon with $\tau_p$, we first define the augmented objective function for an action sequence $A = a_{t_0:t_0 + \tau_p}$ as: \begin{equation} \label{equ:ra} \begin{split} \bar{R}(A) \coloneqq & \sum_{t=t_0}^{t_0+\tau_p} [ r\left(s_t, a_t\right) - \lambda[(\mathds{1}(\Pr(s_t \notin \mathcal{S}_{safe}) > \delta) \\ &+\mathds{1}(\Pr(\hat{s}_t \notin \mathcal{S}_{safe}) > \delta) + \mathds{1}(a_t\notin\mathcal{A}_{safe}) ) ]] \end{split} \end{equation} where $\mathds{1}(Z)$ is the indicator function that returns 1 if $Z$ is true, otherwise 0. $s_t$ and $\hat{s}_t$ are the state particles defined in Eq.~(\ref{equ:opt}) and are produced by the trajectory sampling procedure where the uncertainties are propagated (Alg~\ref{alg:traj}). $\lambda$ serves as the Lagrangian multiplier of the dual problem of Eq.~(\ref{equ:opt}). In this paper, we regard $\lambda$ as a fixed hyperparameter and make it sufficiently large \begin{equation} \lambda \geq \max(|r|)*\tau \end{equation} so that the augmented performance is monotonically decreasing w.r.t. the safety violation number. Considering the uncertainty in the probabilistic model, we evaluate $A$ with the \textit{Conditional Value at Risk (CVaR)}~\cite{tamar2015optimizing} of $\bar{R}(A)$ to make the solutions risk-averse: \begin{equation} \text{CVaR}_\alpha(\bar{R}(A)) = \mathbb{E}\left[\bar{R}(A)|\bar{R}(A) \leq \nu_\alpha(\bar{R}(A))\right] \end{equation} where $\alpha \in (0,1)$ and $\nu_\alpha$ is the $\alpha$-quantile of the distribution of $\bar{R}(A)$. In other words, we prefer action sequences with higher CVaR. We then take the first action in the most preferred action sequence and execute it. Instead of uniformly sampling $A$ every time, we utilize the \textit{Cross-Entropy Method (CEM)} as suggested in~\cite{chua2018deep} to keep the historical information. The complete algorithm along with the model-learning part is shown in Alg.~\ref{alg:sa}. \section{Experiment} \label{sec:6} For the evaluation of the proposed algorithm, we aim to answer the following questions through empirical experiments: can CASRL 1) adapt faster to unseen environments with a stream of non-stationary data than existing approaches? 2) reduce the safety violation rate with prior safety constraints? 3) scale to high-dimensional tasks? \begin{figure}[t] \centering \includegraphics[width=0.98\columnwidth]{fig/env3.png} \caption{Tasks with non-stationary disturbances and safety constraints.} \label{fig:envs} \end{figure} \subsection{Environments} To answer the above questions, we test CASRL in two continuously-parameterized non-stationary environments with safety constraints. The setup of the environments (Fig.~\ref{fig:envs}) is introduced below. \begin{itemize} \item \textbf{cart-pole.} ($\mathcal{S} \subseteq \mathbb{R}^4$, $\mathcal{A} \subseteq \mathbb{R}^1$) This is the cart-pole swingup experiment proposed in~\cite{saemundsson2018meta}. The goal is to swing the pole upright by applying force on the cart while keeping the cart close to the center of the rail. We add constraints on the pole angle $\theta \in [-10\degree, 225\degree]$ so that the pole should be swung up from the right side without too much overshoot. We make the task non-stationary by changing the pole length $l$, the pole mass $p_m$, and the cart mass $c_m$ at the beginning of each episode. The observation includes the position $x$ and velocity $\Dot{x}$ of the cart, as well as the angle $\theta$ and angular velocity $\Dot{\theta}$ of the pole. The reward function is $r = \exp\left(-\frac{(x-l\sin{\theta})^2 + (l-l\cos{\theta})^2}{l^2}\right)$ and the highest reward $r=1$ is acquired when the cart is at the center of the rail ($x=0$) and the pole is upright ($\theta=0$). The simulation frequency is 20 Hz. \item \textbf{healthcare feeding robot.} ($\mathcal{S} \subseteq \mathbb{R}^{23}$, $\mathcal{A} \subseteq \mathbb{R}^7$) The environment is provided by~\cite{erickson2020assistivegym}. The goal is to deliver the medicines to the patient's mouth with a control arm. To keep safe, there should be no direct contact between the patient and the robot. In each episode, the patient moves forward and rotates his head in 4 degree-of-freedom with randomly sampled speeds ($a_f, a_\theta, a_\phi, a_\psi$), which is the disturbance we designed to simulate different preferences. This is a relatively high-dimensional environment and is used to test the scalability of the algorithms. The observation includes the position of the robot joints and the spoon, as well as the position and orientation of the human head. The reward function has three parts: $r = r_{dis} + r_{med} + r_{act}$, where $r_{dis}$ penalizes the distance between the spoon and the target position, $r_{med}$ is a large positive value if medicine particles are successfully delivered or a large negative value if they are spilled, and $r_{act}$ penalizes the magnitude of the control input. The simulation frequency is 10 Hz. \end{itemize} \subsection{Baselines} We compare our method with the following baselines: \begin{itemize} \item \textbf{Projection-Based Constrained Policy Optimization (PCPO):} A projection-based safe RL algorithm~\cite{yang2020projection}. The learned policy is projected to the safe region during training. \item \textbf{Probabilistic Ensemble and Trajectory Sampling (PETS):} To evaluate the importance of context-aware adaptation, we compare to PETS~\cite{chua2018deep}, a state-of-the-art model-based RL approach. \item \textbf{Model-Agnostic Meta-Learning (MAML):} We use the gradient-based MAML~\cite{finn2017model,nagabandi2018learning} to learn the dynamics of the non-stationary environments. The dynamics model is represented by a neural network which is initialized from a pre-trained meta-model and updated online with the nearest context data. \footnote{We used a publicly available implementation at \url{https://github.com/iclavera/learning_to_adapt}.} \item \textbf{CASRL without prior safety constraint:} To show whether the prior safety constraint can effectively reduce the safety violation rate, we add another baseline that follows the same structure of CASRL but does not apply the prior safety constraint. \end{itemize} Each algorithm (including the proposed method) is first pre-trained in non-safety-critical simulators without any disturbances ($\mathcal{T}_{pre}$) to learn the prior model $h$, where the safety constraints are not applied so that we have enough data from both safe and unsafe regions. We then use these initialized models to safely adapt in disturbance spaces $\mathcal{T}_{adapt}$ to learn the disturbance model $g$, with constraints applied. As introduced in Sec.~\ref{sec:3}, we re-sample the parameters of the environments from $\mathcal{T}_{adapt}$ at the beginning of each episode. The results will reflect the adaptability of the tested algorithms. $\mathcal{T}_{pre}$ and $\mathcal{T}_{adapt}$ used in the experiments are shown in Table~\ref{tab:t_range}. \begin{table}[h] \small \centering \caption{Disturbance Space. $\mathcal{U}(\cdot)$ denotes uniform distribution.}\smallskip \label{tab:t_range} \begin{tabular}{|c |c |c| c|} \hline Environment & $\mathcal{T}_{pre}$ & $\mathcal{T}_{adapt}$ & Unit\\ \hline \multirow{3}{*}{cart-pole} & $l = 0.6$ & $l \sim \mathcal{U}[0.2, 1.0]$ & m\\ & $p_m = 0.6$ & $p_m \sim \mathcal{U}[0.2, 1.0]$ & kg\\ & $c_m = 0.6$ & $c_m \sim \mathcal{U}[0.2, 1.0]$ & kg\\ \hline \multirow{4}{*}{healthcare} & $a_{f} = 0$ &$a_{f} \sim \mathcal{U}[-1.0, 1.0]$ &\degree/s \\ & $a_{\theta} = 0$ & $a_{\theta} \sim \mathcal{U}[-2.0, 2.0]$ &\degree/s\\ & $a_{\phi} = 0$ & $a_{\phi} \sim \mathcal{U}[-2.0, 2.0]$ &\degree/s\\ & $a_{\psi}= 0$ & $a_{\psi} \sim \mathcal{U}[-2.0, 2.0]$ &\degree/s\\ \hline \end{tabular} \end{table} In the implementation, we use a hidden size of $[128, 128]$ for all MLP networks. The latent dimension is 8 for the deterministic encoder and latent encoder in the ANP model for both experiments. The planning horizon $\tau$ is set to be 20. Each experiment was run with 10 random seeds. We make the controller risk-averse by setting $\delta=0$ in Equ.~\ref{equ:ra}. All hyperparameters are fine-tuned manually and are provided in our submitted code base. \subsection{Result Analysis} \subsubsection{During Adaptive Training} \label{sec:during} The average returns and safety violation rates during adaptive training are shown in Fig.~\ref{fig:training}. The violation rate represents the proportion of safety violation time steps in the whole episode. For PCPO, we only plot the highest average performance after its convergence since it requires a lot more samples to train than other model-based methods. It is shown that the performance of PCPO is limited since it cannot deal with non-stationary environment disturbances. Though PETS outperforms other methods in most environments during the early stage of training, it fails to continue improving due to the lack of adaptability in non-stationary environments. The proposed approach, CASRL, outperforms MAML in both average returns and safety violation rates, especially in the healthcare environment. There are two possible reasons. One is that the adaptation of MAML relies on online training of a high-dimensional neural-network model in each step, which is very sensitive to the learning rate and could be unstable in high-dimensional spaces. On the other hand, CASRL only performs online inference. The other possible reason is that MAML cannot model the uncertainties in the environment, which is accomplished by CASRL with a probabilistic latent variable model. We can also observe that the prior safety constraint can significantly reduce the violation rate with minimal performance degradation. \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{fig/training3.png} \caption{Return and violation rate during adaptive training. The proposed method CASRL greatly reduces safety violation rate while outperforming MAML in average return.} \label{fig:training} \end{figure} \begin{figure*}[t] \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.999\linewidth]{fig/suc_cp.png} \caption{Return in cart-pole} \label{fig:ret_cp} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.999\linewidth]{fig/vio_cp.png} \caption{Violation rate (\%) in cart-pole} \label{fig:vr_cp} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.999\linewidth]{fig/suc_hc.png} \caption{Return in healthcare} \label{fig:ret_heal} \end{subfigure} \begin{subfigure}{.5\textwidth} \centering \includegraphics[width=.999\linewidth]{fig/vio_hc.png} \caption{Violation rate (\%) in healthcare} \label{fig:vr_heal} \end{subfigure} \caption{Return and violation rate after adaptive training in cart-pole and healthcare environments.} \label{fig:adaptation} \end{figure*} \subsubsection{After Adaptive Training} We evaluate the performance of models after adaptive training by experiment in the whole disturbance space $\mathcal{T}_{adapt}$ (Tab.~\ref{tab:t_range}). The results of average returns and safety violation rates in cartpole-swingup and healthcare are shown as heatmaps in Fig.~\ref{fig:adaptation}. It is interesting to observe that different constraint functions can lead to different patterns of heatmaps. In the cartpole-swingup environment, most constraint-violation cases concentrate at the corners of the disturbance space (Fig.~\ref{fig:vr_cp}) because the dynamics models in the corners are the most different from the center. In the healthcare environment, however, most constraint-violation cases take place when the human head has a high velocity of forward movement (Fig.~\ref{fig:vr_heal}), which is reasonable since forward movement decreases the distance between the human head and the robot, increasing the risk of direct contact. Among the methods tested, CASRL shows great robustness and adaptability to disturbances compared to other baselines. \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{fig/pre.png} \caption{Comparison of CASRL and MAML with and without the pre-training phase.} \label{fig:pre} \end{figure} \subsubsection{Effect of pre-training} \label{sec:pre} The pre-training phase is essential for CASRL. The pre-trained prior model $h$ not only provides a start point for adaptive learning but also forms the prior safety constraint that improves the safety of the learning process. To show this, we compare the performance of CASRL with and without pre-training in Fig.~\ref{fig:pre}. MAML provides a baseline. It is clearly shown that the pre-training phase significantly benefits the learning process, especially for CASRL. For the healthcare experiment, the violation rate experienced a big jump in the early stage of training for both methods. The reason is that the robot needs to learn to control its arm before it can approach the patient and possibly violate the safety constraint. \subsubsection{Effect of prioritized sampling} \label{sec:pri} We evaluate the effectiveness of prioritized sampling by comparing the mean square error (MSE) of dynamics predictions in safe and unsafe regions. The results are shown in Fig.~\ref{fig:mse}. The prediction accuracy in the unsafe state region is improved by prioritized sampling, while the performance in the safe state region is not influenced. The reason could be that without prioritized sampling, the model is biased towards the safe data due to the rareness of the unsafe samples. \begin{figure}[h] \centering \includegraphics[width=0.95\columnwidth]{fig/MSE2.png} \caption{The MSE of single-step dynamics predictions by CASRL in healthcare environment. The prediction accuracy in the unsafe region is improved by prioritized sampling.} \label{fig:mse} \end{figure} \section{Conclusion} In this paper, we propose the context-aware safe reinforcement learning (CASRL) method as a meta-learning framework to realize safe adaptation in non-stationary environments. The non-stationary disturbances are identified with a probabilistic latent variable model by online Bayesian inference. A risk-averse model-predictive controller is used for safe planning with uncertainties, where we incorporate prior safety constraints to enable fast adaptation with prior knowledge. We also utilize prioritized sampling of unsafe data to alleviate the data imbalance in safety-critical environments. The algorithm is evaluated in both toy and realistic high-dimensional environments. Results show that CASRL significantly outperforms existing baselines in terms of safety and robustness. Although CASRL is potentially beneficial for RL applications in safety-critical tasks, it may have its limitations. For example, the disturbance space could be much larger if we use image inputs with noises. Although the ANP model has been shown to work for image reconstruction tasks~\cite{kim2019attentive}, it may fail for dynamics prediction in complex environments. In that case, one potential solution is to conduct dynamics prediction in the latent space as in Dreamer~\cite{hafner2019dream}, which is directly applicable for CASRL. The hyperparameter-tuning for learning rates, network structures, and especially the latent dimensions could be another challenge for CASRL. \bibliographystyle{IEEEtran}
{'timestamp': '2021-01-05T02:20:56', 'yymm': '2101', 'arxiv_id': '2101.00531', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00531'}
arxiv
\section{Introduction} Learning the discourse structure of text is an important field in NLP research, and has been shown to be helpful for diverse tasks such as: event-extraction \cite{choubey-etal-2020-discourse}, opinion-mining and sentiment analysis \cite{chenlo2014rhetorical}; natural language generation \cite{celikyilmaz2020evaluation}, text summarization \cite{lu2019attributed, isonuma2019unsupervised} and cross-document storyline identification \cite{rehm2019semantic}; and even conspiracy-theory analysis \cite{abbas2020politicizing} and misinformation detection \cite{zhou2020fake}. However, even as recent advances in NLP allow us to achieve human-level performance in a variety of tasks, discourse-learning, a supervised learning task, faces the following challenges. (1) Discourse Learning (DL) tends to be a complex task, with tagsets focusing on abstract semantic concepts (human annotators often require training, conferencing, and still express disagreement \cite{das2017good}). (2) DL tends to be resource-poor, as annotation complexities make large-scale data collection challenging (Table \ref{tab:datasets_used}). To make matters worse, different discourse schemas often capture similar discourse intent with different labels, like recent corpora based on variations of Van Dijk's news discourse schema \cite{choubey-etal-2020-discourse, yarlott2018identifying,van2013news}. (3) Classes tend to be very imbalanced. For example, of Penn Discourse Tree-Bank's 48 classes, the top 24 are 24.9 times more common than the bottom 24 on average \cite{prasad2008penn}. There is no previous work establishing correspondences of discourse labels from one schema to another, but we hypothesize that a multitask approach incorporating multiple discourse datasets can address the challenges listed above. \textit{Specifically, by introducing complementary information from auxiliary discourse tasks, we can increase performance for a primary discourse task's underrepresented classes} We propose a multitask neural architecture (Section \ref{sct:methodology}) to address this hypothesis. We construct tasks from 6 discourse datasets and an events dataset (Section \ref{sct:datasets}), \textit{including a novel discourse dataset we introduce in this work}. Although different datasets are developed under divergent schemas with divergent goals, our framework is able to combine the work done by generations of NLP researchers and allows us not to ``waste'' their tagging work. Our experiments show that a multitask approach can help us improve discourse classification on a primary task, \textit{NewsDiscourse} \cite{choubey-etal-2020-discourse}, from a baseline performance of 62.8\% Micro F-1 to 67.7\%, an increase of $7\%$ (Section \ref{sct:exp_and_results}), with the biggest improvements seen in underrepresented classes. On the contrary, simply augmenting training data fails to improve performance. We give insight into why this is occurring (Section \ref{sct:discussion}). In the multitask approach, the primary task's underpresented tags are correlated with tags in other datasets. However, if we only provide more data without any correlated labels, we overpredict the overrepresented tags. Meanwhile, we test many other approaches proposed to address class-imbalance, including using hierarchical labels \cite{silva2017improving}, different loss functions \cite{li2019dice}, and CRF-sequential modeling \cite{tomanek2009reducing}, and we observe similar negative results (Appendix \ref{app:neg_results}). Taken together, this analysis indicates that the signal from the labeled datasets is essential for boosting performance in class-imbalanced settings. In summary, our core contributions are: \begin{itemize} \item We show an improvement of $7\%$ above state-of-the-art on the \textit{NewsDiscourse} dataset, and we introduce a novel news discourse dataset with 67 tagged articles based on an expanded Van Dijk news discourse schema \cite{van2013news}. \item \textit{What worked and why}: we show that different discourse datasets in a multitask framework complement each other; correlations between labels in divergent schemas provide support for underrepresented classes in a primary task. \item \textit{What did not work and why:} pure training data augmentation failed to improve above baseline because they overpredicted overrepresented classes and thus hurt the overall performances. \end{itemize} \begin{table*}[t] \centering \begin{tabular}{|l|l|c|c|c|c|c|c|} \hline Dataset Name & Label & \#Docs & \#Sents & \#Tags & Alt. & Type & Imbal.\\ \hline \textit{NewsDiscourse} & \nd & 802 & 18,151 & 9 & No & MC & 3.01 \\ Van Dijk \cite{yarlott2018identifying} & \fin & 50 & 1,341 & 9 & No & MC & 3.81 \\ Van Dijk (present work) & \spangh & 67 & 2,088 & 12 & No & MC & 6.36 \\ \hline Argumentation & \argumentation & 300 & 11,715 & 5 & No & ML & 9.35 \\ \hline Penn Discourse Treebank$^{**+}$ & PDTB-$t$ & 194 & 12,533 & 5 & Yes & ML & 2.28 \\ Rhetorical Structure Theory$^{**}$ & RST & 223 & 7,964 & 12 & Yes & ML & 2.90 \\ KBP Events 2014/2015$^{**}$ & KBP & 677 & 24,443 & 4 & Yes & ML & 4.07 \\ \hline \end{tabular} \caption{List of the datasets used in our work, an acronym, the size, number of tags ($k$), whether we processed it, whether there is one label per sentence (multiclass, MC) or multiple (multilabel, ML) and the class imbalance. (Class imbalanced is calculated by: $\frac{\sum_{j=1}^{\floor*{k/2}} n_j}{\floor{k/2}}$ / $\frac{\sum_{j=\floor*{k/2} + 1}^{k} n_j} {\floor{k/2} + 1}$. where $n_j$ is the number of datapoints labeled in class $j$, and classes are sorted such that $n_1 > n_2 > ... > n_k$). ** indicates that we filtered the dataset and + that we used a subset of tags. } \label{tab:datasets_used} \end{table*} \section{Datasets} \label{sct:datasets} Classical discourse tasks, based off of datasets like Penn Discourse Tree Bank (PDTB) \cite{prasad2008penn}, and Rhetorical Structure Theory Tree Bank (RST) \cite{carlson2003building}, focus on identifying clauses and classifying relations between pairs of them: such datasets give insight into temporal relations, causal-semantic relations, and the role of text in argument-supporting. Modern discourse tasks, based off datasets like the Argumentation (\argumentation) \cite{al2016news} and \textit{NewsDiscourse} (\nd), on the other hand, focus on classifying sentences: such datasets focus on the functional role each sentence is playing in a larger narrative, argument or negotiation. We use $7$ different datasets in our multitask setup, shown in Table \ref{tab:datasets_used}. Four datasets are ``modern'' discourse datasets (containing sentence-level labels and no relational labels). Two datasets are ``classical'' discourse datasets: PDTB and RST (containing clausal relations). One event dataset, Knowledge Base Population Event Nuggets 2014/2015 (KBP), contains information on the presence of events in sentences. \subsection{Van Dijk Schema Datasets (\nd, \fin, \spangh)} The Van Dijk Schema, developed by Richard Van Dijk in 1988 \cite{van2013news}, was applied with no modifications in 2018 \cite{yarlott2018identifying} to a dataset, the \fin dataset, of 50 news articles sampled from the ACE corpus. The Van Dijk schema contains the following sentence-level discourse tags: \textit{Lede}, \textit{Main Event} (\textbf{M1}), \textit{Consequence} (\textbf{M2}), \textit{Circumstances} (\textbf{C1}), \textit{Previous Event} (\textbf{C2}), \textit{Historical Event} (\textbf{D1}), \textit{Expectation} \textbf{(D4)}, \textit{Evaluation} (\textbf{D3}) and \textit{Verbal Reaction}. We introduce a novel news discourse dataset that also follows the Van Dijk Schema, the \spangh dataset. It contains 67 labeled news articles, also sampled from the ACE corpus without redundancy to \fin. An expert annotator labeled each article on the sentence-level. We made the following additions to the Van Dijk Schema: \textit{Explanation} and \textit{Secondary Event}. We introduce the \textit{Explanation} tag to help our annotator capture examples of ``Explanatory Journalism'' \cite{forde2007discovering} in the dataset, and we introduce the \textit{Secondary Event} after our annotator observed that secondary storylines sometimes present in news articles are not well-captured by the original schema's tags. To judge accuracy, the annotator additionally labeled $10$ articles that had been in \fin; the interannotator agreement was $\kappa = .69$. The dataset of the primary task is the \nd dataset \cite{choubey-etal-2020-discourse}. This dataset contains $802$ tagged news articles and follows a modified Van Dijk schema for news discourse relation. Authors introduced the \textit{Anecdotal Event} (\textbf{D2}) tag and eliminated the \textit{Verbal Reaction} tag. Every sentence in \nd is tagged with both a discourse tag from the modified Van Dijk schema, as well another tag indicating \textit{Speech} or \textit{Not Speech}. \subsection{Argumentation Dataset (\argumentation)} A substantial volume of the content in news articles pertains not to factual assertions, but to analysis, opinion and explanation \cite{steele1996journalism}. Indeed, several classes in Van Dijk's schema (for example, \textit{Expectation} and \textit{Evaluation}) classify news discourse that is not factual, but opinion-focused. Thus, we sought to include a discourse dataset that was focused on delineating different categories of opinion. The Argumentation dataset \cite{al2016news} is a sentence-level labeled dataset consisting of $300$ news editorials randomly selected from 3 news outlets.\footnote{aljazeera.com, foxnews.com and theguardian.com} The discourse tags the authors use to classify sentences are: \textit{Anecdote}, \textit{Assumption}, \textit{Common-Ground}, \textit{Statistics}, and \textit{Testimony}.\footnote{These tags share commonalities with Bales' Interactive Process Analysis categories, which delineate ways in which group members convince each other of arguments \cite{bales1950interaction, bales1970personality}, and have been used to analyze opinion content in news articles \cite{steele1996journalism}.} \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{figures/pdtb-processing} \caption{We processed the Penn Discourse Treebank and Rhetorical Structure Theory datasets, which are both hierarchical and relation-focused, to be sentence-level annotation tags.} \label{fig:pdtb_processing} \end{figure} \subsection{Penn Discourse Treebank (PDTB) and Rhetorical Structure Theory (RST)} \label{sec:pdtb_rst} The two classical discourse datasets each identify spans of text, or clauses, and annotate how different spans relate to each other. As shown in the left-side of Figure \ref{fig:pdtb_processing}, relation annotations are between either two clauses, or between two members of the clause hierarchy. We process each dataset so that each sentence is annotated with the set of all relations occurring at least once in the sentence. We downsample each dataset so that the sentence-length distribution of articles matches the sentence-length distribution of the \nd dataset. The full PDTB, in particular, is a high-dimensional, sparse labelset ($48$ relation classes in $2,159$ documents, $43,340$ sentences) covering a wide span of relation-types, including: \textit{Contingency}, \textit{Temporal}, \textit{Expansion} and \textit{Comparison} relations. To reduce the dimensionality and sparsity of the PDTB labelset, we only select PDTB tags pertaining to \textit{Temporal} relations, and exclude all articles that do not contain at least one such relation. This includes the tags: \textit{Temporal}, \textit{Asynchronous}, \textit{Precedence}, \textit{Synchrony}, \textit{Succession}. We filter to these tags after observing that semantic differences between certain tags in \nd depend on the temporal relation of tagged sentences: for example, the tags \textit{Previous Event} and \textit{Consequences} both describe events occurring relative to a \textit{Main Event} sentence, but a \textit{Previous Event} sentence occurs the before the \textit{Main Event} while the \textit{Consequence} occurs after. (To remove ambiguity, we henceforth refer to our filtered PDTB dataset as PDTB-$t$, for ``temporal''.) For RST, we develop a heuristic mapping for semantically similar tags (Appendix \ref{app:datasets}) to reduce dimensionality, and then only include tags that appear in more than 800 sentences. The final set of tags that we use for RST is: \textit{Elaboration}, \textit{Joint}, \textit{Topic Change}, \textit{Attribution}, \textit{Contrast}, \textit{Explanation}, \textit{Background}, \textit{Evaluation}, \textit{Summary}, \textit{Cause}, \textit{Topic-Comment}, \textit{Temporal}. \subsection{Knowledge Base Population (KBP) 2014/2015} \label{sec:kbp} Semantic differences between certain tags in \nd depend on the presence or absence of an event, for example, the tags \textit{Previous Event} and \textit{Current Context} both provide proximal background to a \textit{Main Event} sentence, but a \textit{Previous Event} sentence contains an event while a \textit{Current Context} does not. We hypothesize that a dataset annotating whether events exist within a sentence can help our model differentiate these categories better. So, we collect an additional non-discourse dataset, the KBP 2014/2015 Event Nugget dataset, which annotates the trigger words for events by event-type: \textit{Actual Event}, \textit{Generic Event}, \textit{Event Mention}, and \textit{Other}. We preserve this annotation at the sentence level, similar to the PDTB and RST transformations in Section~\ref{sec:pdtb_rst} and downsample documents similarly. \section{Methodology} \label{sct:methodology} Here we describe the methods we use, along with the variations that we test, which are summarized in Figure \ref{fig:exp_vars}. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{figures/flow-unsup.PNG} \caption{Overview of the experimental variations we consider, at each stage of the classification pipeline. \textcolor{darkgreen}{\textbf{Bold green}} indicates variations that had a positive effect on the classification accuracy, and \textcolor{red}{\textit{Italic red}} indicates variations that did not. Some variations are described in the Appendix.} \label{fig:exp_vars} \end{figure*} \subsection{Multitask Objective} Our multitask setup framework can broadly be seen as a multitask feature learning (MTFL) architecture, which is common in multitask NLP applications \cite{zhang2017survey}. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figures/multitask-setup.png} \caption{Our multitask setup uses 7 heads: 4 multiclass classification heads to classify \nd, \argumentation, \spangh and \fin datasets and 3 multilabel classification heads to classify PDTB, RST and KBP 2014/2015.} \label{fig:multitask_setup} \end{figure} As shown in Figure \ref{fig:multitask_setup}, we formulate a multitask approach to DL with the \nd dataset as our primary task. Our multitask architecture uses shared encoder layers and specific classification heads for each task. From our joined dataset $D = \{D_t\}_{t=1}^{T}$ across tasks $t=1,...,T$, where $D_t$ is of size $N_t$ and contains $\{(x_i, y_i)\}_{i=1}^{N_t}$ pairs, we randomly sample one task $t$ and one datum $(x_i, y_i)$ from that task's dataset, $D_t$. Our multitask objective is to minimize the sum of losses across tasks: \begin{equation} \label{eq:loss} \min L(D, \alpha) = \min_{\theta} \sum_{t = 1}^T \sum_{i=1}^{N_t} \alpha_t L_t(D_{i}^{t}) \end{equation} \noindent where $L_t$ is the task-specific loss with hyperparameter $\alpha = \{\alpha_t\}_{t=1}^T$, a coefficient vector summing to a constant, c, that tells us how to weight the loss from each task. \subsection{Neural Architecture} \label{sct:neural_architecture} Our neural architecture, shown in Figures \ref{fig:multitask_setup} and \ref{fig:nn_model}, consists of a sentence-embedding layer with optional embedding augmentations, a classification layer for the primary task, and optional classification layers for auxiliary supervised tasks. We describe each layer in turn. \noindent\textbf{Sentence-Embedding Modeling} The architecture we use to model each supervised task in our multitask setup is inspired by previous work in sentence-level tagging and discourse learning \cite{choubey-etal-2020-discourse,li2019discourse}. As shown in Figure \ref{fig:nn_model}, we use a transformer model, RoBERTa-base \cite{liu2019roberta}, to generate sentence embeddings: each sentence in a document is fed sequentially into the same model, and we use the <s> token from each sentence as the sentence-level embedding. The sequence of sentence embeddings is then fed into a Bi-LSTM layer to provide contextualization. Each of these layers is shared between tasks.\footnote{Variations on our method for generating sentence embeddings are reported in Appendix \ref{app:sent_emb}} \noindent\textbf{Embedding Augmentations} We experiment concatenating different embeddings to our sentence-level embeddings to incorporate information on document-topic and sentence-position: headline embeddings ($H_i$) generated via the same method as sentence-embeddings; vanilla positional embeddings ($P_{i, j}$) and sinusoidal positional embeddings ($P_{i, j}^{(s)}$) as described in \citet{vaswani2017attention} but on the sentence-level rather than the word-level; document embeddings ($D_i$), and document arithmetic ($A_{i, j}$). To generate $D_i$ and $A_{i, j}$ for sentence $j$ of document $i$, we use self-attention on input sentence-embeddings to generate a document-level embedding, and perform the following arithmetic to isolate the topic, as done by \citet{choubey-etal-2020-discourse}: \begin{gather} D_i = \text{Self-Att}(\{S_{i, j}\}_{j=1}^{N_i}) \\ A_{i, j} = D_i * S_{i, j} \oplus D_i - S_{i, j} \end{gather} \noindent where $S_{i, j}$ is the sentence-embedding for sentence $j$ of document $i$, and self-attention is an operation defined by \citet{cheng2016long}. \begin{figure}[t] \centering \includegraphics[width=.9\linewidth]{figures/nn-model-setup.png} \caption{Sentence-Level classification model used for each prediction task. The </s> token in a RoBERTa model is used to generate sentence-level embeddings, </s>$_i$. Bi-LSTM is used to contextualize these embeddings, $c_i$. Finally, FFNN layer is used to make class predictions, $p_i$. The RoBERTa and Bi-LSTM layers are shared between tasks and the FFNN is the only task-specific layer.} \label{fig:nn_model} \end{figure} \noindent\textbf{Supervised Heads} Each contexualized embedding is classified using a feed-forward layer. The feed-forward layer is task-specific. The three tasks PDBT, RST, and KBP are multilabel classification tasks and the rest of the tasks are multiclass classification tasks.\footnote{Variations both of the classification task and the loss function, aimed at addressing the class imbalance inherent in the \nd dataset, are reported in Appendix~\ref{app:supervised_head_variations}.} \subsection{Data Augmentation} \label{sct:data_aug} To determine whether it is the labeled information in the multitask setup that is helping us achieve higher accuracy or simply the addition of more news articles, we perform a ``data-ablation'': we test using additional data that does not contain new label information. We use Training Data Augmentation (TDA) to enhance single-task learning by increasing the size of the training dataset through data augmentations on the training data \cite{devries2017dataset}. We generate 10 augmentations for each sentence in \nd. Our augmentation function, $g$, is a sampling-based backtranslation function, which is a common method for data augmentation \cite{edunov2018understanding}. To perform backtranslation, we use Fairseq's English to German and English to Russian models \cite{ott2019fairseq}. Inspired by \newcite{chen2020mixtext}, we generate backtranslations using random sampling with a tunable temperature parameter instead of beam search, to ensure diversity in augmented sentences. \section{Experiments and Results} \label{sct:exp_and_results} In this section, we first discuss experiments using \nd as a single classification task. Then, we discuss the experiments using \nd in a multitask setting. Finally, we discuss our experiments with data augmentation. We show explorations we did to try to maximize the performance of each method (negative results shown in Appendix \ref{app:neg_results}.) \begin{table*}[t] \centering \begin{tabular}{|l||r|r|r|r|r|r|r|r|r||r|r|} \hline {} & M1 & M2 & C2 & C1 & D1 & D2 & D3 & D4 & E & Mac. & Mic. \\ \hline Support & 460 & 77 & 1149 & 284 & 406 & 174 & 1224 & 540 & 396 & 4710 & 4710 \\ \hline \hline ELMo & 50.6 & 27.0 & 58.9 & 35.2 & 63.4 & 50.3 & 70.5 & 64.3 & 94.6 & 57.21 & 62.85 \\ \hline RoBERTa & 52.1 & 9.4 & 65.1 & 27.7 & 68.1 & 51.6 & 72.4 & 65.4 & 96.0 & 56.43 & 64.97 \\ +Frozen & 51.2 & 29.3 & 64.3 & 29.8 & 72.2 & 65.8 & 73.7 & \textbf{67.1} & 96.5 & 61.08 & 66.54 \\ +EmbAug & 54.1 & 28.0 & 64.7 & 35.9 & 71.8 & 66.3 & 72.9 & 65.9 & 96.3 & 61.76 & 66.92 \\ \hline \hline TDA & 85.3 & 52.2 & 57.1 & 29.8 & 61.1 & 44.3 & 66.1 & 58.2 & 16.4 & 56.53 & 59.22 \\ \hline \hline MT-Mac & 54.9 & \textbf{35.5} & 63.8 & \textbf{35.9} & \textbf{73.7} & \textbf{70.7} & \textbf{73.7} & 66.3 & \textbf{96.7} & \textbf{63.46} & 67.51 \\ MT-Mic & \textbf{55.4} & 25.0 & \textbf{67.1} & 32.8 & 72.5 & 68.9 & 73.6 & 65.8 & 96.0 & 61.89 & \textbf{67.70} \\ \hline \end{tabular} \caption{\textbf{Overview:} F1-scores of individual class tags in \nd and Macro-averaged F1-score (Mac.) and Micro F1-score (Mic.). \textbf{ELMo} is the baseline used in \cite{choubey-etal-2020-discourse}. \textbf{RoBERTa+Frozen+EmbAug} is our subsequent baseline. \textbf{TDA} refers to Training Data Augmentation. MT stands for multitask: MT-Mac is a trial with $\alpha$ chosen to maximize Macro F1-score while MT-Mic is a trial with $\alpha$ chosen to maximize Micro F1-score.} \label{tab:positive_results} \end{table*} \subsection{Single Task Experiments} \noindent\textbf{ELMo vs RoBERTa} The first improvement we observe derives from the use of RoBERTa as a contextualized embedding layer rather than ELMo \cite{peters2018elmo}, as used in the baseline \cite{choubey-etal-2020-discourse}. We observe a 2-point F1-score improvement from 62 F1-score to 64 F1-score \noindent\textbf{Layer-wise Freezing (+Frozen)} The second improvement we observe follows from layerwise freezing for RoBERTa. We observe that unfreezing the layers closest to the output results in the greatest improvement (Figure \ref{fig:layerwise_freezing}). Layer-wise freezing was a bottleneck to all other improvements observed: prior to performing layer-wise freezing, none of the experiments we tried, including multitask, had any effect. We observe a 1.5 F1-score improvement above a RoBERTa unfrozen baseline. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figures/layer-wise-freezing.png} \caption{Here we show a sample of the different layer-wise freezing that we performed. ``Emb.'' block is the embedding lookup table for word-pieces. ``Encoder'' blocks closer to the input are visualized on the left, and blocks to the right are closer to the output. The \textcolor{red}{red} bar indicates the baseline, unfrozen RoBERTa model.} \label{fig:layerwise_freezing} \end{figure} \begin{table}[t] \centering \begin{tabular}{|l|r|} \hline Embedding Augmentations & $\delta$ Micro F1 \\ \hline $\oplus P_i^{(s)} \oplus D_i \oplus A_i \oplus H_i$ & \ccaten{38} \\ $\oplus P_i^{(s)} \oplus D_i \oplus A_i$ & \ccaten{37} \\ $\oplus P_i^{(s)} \oplus D_i \oplus H_i$ & \ccaten{35} \\ $\oplus P_i \oplus D_i \oplus A_i \oplus H_i$ & \ccaten{33} \\ \hline \hline $\oplus H_i$ & \ccaten{11} \\ $\oplus D_i$ & \ccaten{0} \\ $\oplus D_i \oplus A_i$ & \ccaten{0} \\ $\oplus P_i$ & \ccbten{1} \\ $\oplus P_i^{(s)}$ & \ccbten{8} \\ \hline \end{tabular} \caption{\textbf{Sample} of combinations of embedding augmentation variations. Micro F1-score increase gained by adding the embedding augmentation above \textbf{+Frozen}. $P_i^{(s)}$ is sinusoidal and $P_i$ is vanilla positional embeddings. $D_i$ is document embeddings and $A_i$ is document embeddings arithmetic. $H_i$ is headline embeddings. } \label{tbl:embedding_augmentations} \end{table} \noindent\textbf{Embedding Augmentations (+EmbAug)} The third improvement we observe derives from concatenating embedding layers that contain additional document-level information. We observe a .5 F1-score improvement above a RoBERTa partially-frozen baseline with a full concatenation of Document Embeddings, Headline Embeddings, and Sinusoidal Positional Embeddings (Table \ref{tbl:embedding_augmentations}). The .5 F1-score improvement holds across different sentence embeddings variations (Appendix \ref{app:neg_results}). The embeddings appear to interact as together they present an improvement but by themselves they offer no improvement. \subsection{Multi-Task Experiments} \label{subsct:multitask_exp} As shown in Table \ref{tab:positive_results}, multitask achieves the best performance. We conduct our multitask experiment by performing a grid-search over a wide range of loss-weighting, $\alpha$ (defined in Equation \ref{eq:loss}). As can be seen, in Figure \ref{fig:multitask_coefs}, the weighting achieving the top Micro F1-score includes datasets: VD1, \argumentation, RST and PDTB-$t$, while the weighting achieving the top Macro F1-score includes datasets: VD1, \argumentation, \spangh, and RST. We parse the effect of different loss-weighting schemes for each dataset on the output scores by running Linear Regression, where $X=\alpha$, the loss-weighting scheme, and $y=\text{F1-score}$. The Linear Regression coefficients, $\beta$, displayed in Table \ref{tbl:lin_reg}, approximate the effect of each dataset has. Note that this is just an approximation, and does not account for nonlinearity in $\alpha$ (i.e. datasets that have a negative effect within one range of $alpha$ might be less negative, or even positive within another). \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figures/scatterplot-delta.pdf} \caption{Comparison of class-level accuracy vs. tag for three models: MT-Micro, TDA (which underperforms baseline for lower-represented tags like M2, C1), and MT-Macro (which overperforms baseline for lower represented tags M1, M2, D1, D2). Split y-axis shown for clarity, due to TDA outliers.} \label{fig:scatterplot} \end{figure} \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{figures/sparklines.png} \caption{Loss-coefficient weightings ($\alpha$ vector) (y-axis) and Macro vs. Micro F1 Score shown for: (a) a mix of trials, (\textcolor{blue}{blue} bar, $\{$VD1$, X_1, ... X_k\}$) (b) pairwise multitask tasks (\textcolor{blue}{blue} bar, $\{$VD1$, X_1\}$), (c) baseline (\textcolor{red}{red} bar: $\{$VD1$\}$) (d) data ablation (\textcolor{darkyellow}{yellow} bar, TDA). Cells corresponding to training data sets are \textcolor{darkgreen}{green} in strength proportional to their $\alpha$ value. Although several simple multitask settings (0-1 $\alpha$ vectors) beat the baseline, the best performing settings are a soft mix of the $6$ discourse tasks.} \label{fig:multitask_coefs} \end{figure} \begin{table}[] \centering \begin{tabular}{|l|r||l|r|} \hline Dataset & LR $\beta$ & Dataset & LR $\beta$ \\ \hline \nd (Main) & \ccaten{83} & \argumentation & \ccaten{5} \\ RST & \ccaten{50} & PDTB & \ccbten{69} \\ \spangh & \ccaten{49} & KBP & \ccbtentwo{2}{17} \\ \fin & \ccaten{21} & Intercept & 66.26 \\ \hline \end{tabular} \caption{The Linear Regression coefficients ($\beta$) for each dataset to parse the effects of each dataset on the scores. We run a simple Linear Regression model, LR, on the $\alpha$ weights from all grid-search trials (a subset of which are shown in Figure \ref{fig:multitask_coefs}) to predict Micro F1-scores (i.e. LR$(\alpha)= \mbox{Mic. F1-score}$). This shows us, for example, that increasing RST's weight by $+1$ yields $.5$ F1-score improvement. Note: this is only an approximation, and dataset-weights might have a non-linear effect.} \label{tbl:lin_reg} \end{table} \subsection{Data Augmentation Experiments} \label{sct:uda_experiments} As shown in Table \ref{tab:positive_results} and Figure \ref{fig:multitask_coefs}, \textbf{TDA} fails to improve performance from our baseline. In the next section, we give insights into why multitask improves the performances but training data augmentation fails to do so. \section{Discussion} \label{sct:discussion} As shown in Figure \ref{fig:scatterplot}, a multitask approach to this problem significantly increases performance for classes with a lower support, while not jeopardizing the performance for classes with a higher support. This is in contrast to purely data augmentation approaches like TDA. Improving performance in low-support classes improves overall Macro F1, as expected, but, as can be seen in Table~\ref{tab:positive_results}, is beneficial to Micro F1 as well. \newcite{hyun2020class} show that, for class-imbalanced problems, regions of the data manifold that contain the underrepresented classes are poorly generalizable in data-augmented settings, resulting in general ambiguity in these regions. We show in Figure \ref{fig:num_predicted} that TDA over-predicts the overrepresented class. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figures/num-predicted-overall.pdf} \caption{TDA over-predicts the better-represented classes (C2, D3) relative to $y_{true}$, and underpredicts the lesser represented classes (M1, M2, C1, D1). MT-Macro prediction rates are closer to $Y_{true}$. (If $C_{x}$ is the empirical distribution over class-predictions made by model $x$, then $D_{\text{KL}}(C_{\text{TDA}}||C_{Y_{true}})=.27$, $D_{\text{KL}}(C_{\text{MT-Macro}}||C_{Y_{true}})=.01$).} \label{fig:num_predicted} \end{figure} \begin{table*}[t] \centering \setlength\tabcolsep{1pt} \renewcommand{\arraystretch}{0.8} \begin{tabular}{|l||lllll||lllllllllll||lllllllll||l|} \hline {} & \rot{Anecdote} & \rot{Assumption} & \rot{Common Ground} & \rot{Statistics} & \rot{Testimony} & \rot{Lede} & \rot{Main Event} & \rot{Consequence} & \rot{Previous Event} & \rot{Secondary Event} & \rot{Current Context} & \rot{Historical Event} & \rot{Evaluation} & \rot{Expectation} & \rot{Explanation} & \rot{Verbal Reaction} & \rot{Lede} & \rot{Main Event} & \rot{Consequence} & \rot{Previous Event} & \rot{Current Context} & \rot{Historical Event} & \rot{Evaluation} & \rot{Expectation} & \rot{Verbal React.} & Supp. \\ \hline Main Event & {} & {} & {} & {} & {} & \cca{3} & \cca{4} & {} & \ccb{4} & {} & {} & {} & {} & {} & {} & {} & \cca{4} & {} & {} & {} & {} & \ccb{4} & {} & {} & {} & 1782 \\ Consequence & {} & {} & \cca{5} & {} & {} & \cca{4} & {} & \cca{4} & {} & \cca{5} & {} & {} & {} & {} & {} & {} & \cca{3} & \cca{5} & \cca{5} & {} & {} & {} & {} & {} & {} & 387 \\ Previous Event & \cca{5} & {} & \cca{3} & \cca{5} & {} & {} & {} & {} & \cca{3} & {} & \cca{7} & {} & {} & \ccb{4} & {} & \ccb{6} & {} & {} & {} & \cca{4} & \cca{7} & {} & {} & {} & \ccb{4} & 4486 \\ Current Context & \cca{4} & {} & {} & \cca{4} & {} & {} & \cca{4} & {} & \cca{4} & {} & \cca{6} & {} & {} & \ccb{5} & {} & \ccb{5} & {} & \cca{3} & {} & \cca{5} & {} & {} & \ccb{4} & \ccb{4} & {} & 1094 \\ Historical Event & {} & {} & {} & {} & {} & {} & {} & \ccb{4} & \cca{7} & {} & {} & \cca{6} & {} & {} & {} & {} & {} & {} & {} & \cca{5} & {} & \cca{8} & {} & {} & {} & 1499 \\ Anecdotal Event & {} & {} & {} & {} & \cca{3} & {} & {} & {} & {} & {} & \ccb{4} & {} & {} & {} & {} & \cca{6} & {} & {} & {} & {} & \ccb{4} & {} & {} & {} & \cca{5} & 609 \\ Evaluation & \ccb{4} & {} & \ccb{5} & {} & \cca{5} & \ccb{4} & \ccb{4} & {} & {} & \ccb{5} & {} & {} & {} & {} & {} & \cca{5} & \ccb{4} & \ccb{6} & \ccb{4} & \ccb{4} & {} & {} & \cca{3} & {} & \cca{6} & 4697 \\ Expectation & \ccb{4} & {} & {} & {} & \cca{3} & {} & {} & \cca{3} & \ccb{5} & {} & \ccb{4} & \ccb{6} & {} & \cca{7} & {} & \cca{5} & {} & {} & {} & \ccb{5} & {} & {} & {} & \cca{7} & \cca{4} & 1981 \\ \hline \hline {} & \multicolumn{5}{c||}{Argument.} & \multicolumn{11}{c||}{\spangh Dataset} & \multicolumn{9}{c||}{\fin Dataset} & {} \\ \hline \end{tabular} \caption{Spearman correlations between tags predicted with \nd head and Argumentation, \spangh and \fin heads. Note that the two Van Dijk datasets have high correlations between most tags that they have in common.} \label{tbl:corr_arg_vd} \end{table*} \begin{table*}[t] \centering \setlength\tabcolsep{3.5pt} \renewcommand{\arraystretch}{0.8} \begin{tabular}{|l||llllllllllll||lllll||l|} \hline {} & \rot{Elaboration} & \rot{Joint} & \rot{Topic Change} & \rot{Attribution} & \rot{Contrast} & \rot{Explanation} & \rot{Background} & \rot{Evaluation} & \rot{Summary} & \rot{Cause} & \rot{Topic Comment} & \rot{Temporal} & \rot{Temporal} & \rot{Asynchronous} & \rot{Precedence} & \rot{Synchrony} & \rot{Succession} & Support \\ \hline Main Event & {} & {} & {} & {} & {} & {} & \ccb{4} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & 1782 \\ Consequence & {} & {} & \cca{4} & {} & {} & \ccb{4} & {} & {} & {} & {} & {} & {} & \cca{2} & \cca{2} & {} & \cca{2} & \cca{3} & 387 \\ Previous Event & {} & {} & {} & \ccb{4} & {} & {} & \cca{4} & \ccb{6} & {} & {} & \ccb{5} & {} & {} & {} & {} & {} & {} & 4486 \\ Current Context & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & {} & 1094 \\ Historical Event & {} & {} & {} & {} & {} & {} & \cca{3} & {} & {} & {} & {} & \cca{3} & \cca{2} & \cca{3} & \cca{3} & {} & \cca{2} & 1499 \\ Anecdotal Event & {} & {} & {} & \cca{3} & \cca{3} & \cca{4} & {} & \cca{5} & {} & \cca{3} & \cca{4} & {} & {} & {} & {} & {} & {} & 609 \\ Evaluation & {} & {} & {} & \cca{4} & \cca{5} & \cca{4} & {} & \cca{6} & {} & {} & {} & {} & \ccb{3} & \ccb{4} & \ccb{4} & \ccb{3} & \ccb{4} & 4697 \\ Expectation & {} & {} & {} & \cca{3} & {} & {} & {} & \cca{4} & {} & {} & {} & \ccb{4} & {} & {} & {} & {} & {} & 1981 \\ \hline {} & \multicolumn{12}{c||}{RST Dataset} & \multicolumn{5}{c||}{PDTB-$t$ Dataset} & {}\\ \hline \end{tabular} \caption{Spearman correlation between tags predicted with \nd head and RST head and PDTB-$t$ head, on the Evaluation split of \nd. Note that PDTB-$t$ relations, which tend to be temporally-based, have a positive correlation with \textit{Consequence} and \textit{Historical Event} tags, which are both defined in temporal relation to the \textit{Main Event} tag.} \label{tbl:corr_pdtb_rst} \end{table*} Multitask learning can help learn part of the data manifold where underrepresented class exists by learning signal from a class which is correlated. Tables \ref{tbl:corr_arg_vd} and \ref{tbl:corr_pdtb_rst} show the correlation between class labels predicted by our multitask model on the same dataset using different heads. For example, for a set of sentences $X$, there is a $.4$ correlation between those tagged \textit{Background} by the RST head, and those tagged \textit{Previous Event} by the \nd head. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{figures/human-performance.pdf} \caption{Our agreement with \cite{choubey-etal-2020-discourse} on a small $30$ article sample from \nd. \textbf{Blind} shows our agreement after reading their annotation guidelines and practicing, but not observing their results. \textbf{Post-Rec.} (Post-Reconciliation) shows our agreement after observing their annotations on the documents we annotated. \textbf{MT-Macro} is one of our top models.} \label{fig:human_perf} \end{figure} Table \ref{tbl:corr_arg_vd} provides a sanity check: the Van Dijk datasets largely agree on the tags that share similar definitions. For example, there is a strong correlation between sentences tagged \textit{Main Event} by the \nd head and those tagged \textit{Main Event} by the \spangh head. However, what is most interesting are the strong correlations existing between underrepresented classes in the \nd dataset. Classes \textit{Consequence} and \textit{Anecdotal Event} are two of the lowest-support classes, yet they each have strong correlations with tags in every other dataset. For example, a \textit{Consequence} sentence, which is defined in part due to its temporal relation to a \textit{Main Event} sentence, is correlated with temporal tags in the PDTB-$t$ dataset. Likewise, \textit{Anecdotal Event} is correlated with \textit{Testimony} in the Argumentation dataset. TDA serves as an ablation study. A counterargument to our claims on our Multitask setup is that, by incorporating additional tasks and additional datasets, we simply expose the model to more data. As TDA shows, however, this is not the case, as performance drops, in TDA's case significantly, when we introduce more data.\footnote{One approach we can consider for TDA is to generate more augmentations for underrepresented classes. However, since we are modeling sequential data, this is generally not possible to do for all underrepresented tags.} We provide additional information on the difficulty of this task in Figure \ref{fig:human_perf} by asking additional expert annotators to label our data. Our annotators sampled 30 documents from \nd, read \newcite{choubey-etal-2020-discourse}'s annotation guidelines and practiced on a few trial examples. Then they annotated all 30 documents. Annotations made in this pass, the \textbf{Blind} pass, had significantly lower accuracy across categories than our best model. Then, however, our annotators observed \newcite{choubey-etal-2020-discourse}'s original tags on the 30 blind-tagged articles, discussed, and changed where necessary. Surprisingly, even in this pass, the \textbf{Post-Reconciliation} pass, our annotators rarely had more than 80\% F1-score agreement with \newcite{choubey-etal-2020-discourse}'s published tags. Thus, Van Dijk labeling task might face an inherent level of legitimate disagreement, which \textbf{MT-Macro} seems to be approaching. However, there are two classes, M1 and M2, where \textbf{MT-Macro} underperformed even the \textbf{Blind} annotation. For these classes, at least, we expect that there is further room for modeling improvement through: (1) annotating more data, (2) incorporating more auxiliary tasks in the multitask setup (3) learning from unlabeled data, using an algorithm like MixMatch \cite{mixmatch} or unsupervised data augmentation \cite{xie2019unsupervised} along with our supervised tasks. \section{Related Work} Most state-of-the-art research in discourse analysis has focused on classifying the discourse relations between pairs of clauses, as is practice in the Penn Discourse Treebank (PDTB) \cite{prasad2008penn} and Rhetorical Structure Theory (RST) dataset \cite{carlson2003building}. Corpora and methods have been developed to predict explicit discourse connectives \cite{miltsakaki-etal-2004-annotating,lin2009recognizing,das2018constructing,malmi2017automatic,wang-etal-2018-toward} as well as implicit discourse relations \cite{rutherford2016robust,liu2016implicit,lan2017multi,lei2017swim}. \citet{choubey-etal-2020-discourse} built a news article corpus where each sentence was tagged with a discourse label defined in Van Dijk schema \cite{van2013news}. Since discourse analysis has limited resources, some work has explored multitask framework to learn from more than one discourse corpus. \citet{liu2016implicit} propose a CNN based multitask model and \citet{lan2017multi} propose an attention-based multitask model to learn implicit relations in PDTB and RST. The main difference in our work is the coverage and flexibility of our framework. This work is able to learn both explicit and implicit discourse relations, both multilabel and multiclass tasks, and both labeled data and non-labeled data in one framework, which makes it possible to fully utilize classic corpora like PDTB and RST as well as recent corpora developed in Van Dijk schema. \citet{ruder2017overview} gives a good overview of multitask learning in NLP more broadly. A major early work by \citet{collobert2008unified} uses a single CNN architecture to jointly learn $6$ different NLP tasks, ranging from supervised low-level syntactic tasks (e.g. \textit{Part-of-Speech Tagging}) to higher-level semantic tasks (e.g. \textit{Semantic Role Labeling}) as well as unsupervised tasks (e.g. \textit{Language Modeling}). They find that a multitask improves performance in semantic role labeling. Our work differs in several key aspects: (1) we are primarily concerned with sentence-level tasks, whereas \citeauthor{collobert2008unified} perform word-level tasks; (2) we consider a softer approach to task inclusion and use different weighting schemes for the tasks in our formulation; (3) we perform a deeper analysis of why multitask helps, including examining inter-task prediction-correlations and class-imbalance. Another broad domain of multitask learning in NLP lies within machine translation, the canonical example being \citet{aharoni2019massively}. In this work, authors jointly train a translation model between hundreds of language-pairs and find that low-resource tasks benefit especially. A different direction for multilingual modeling has been to use resources from one language to perform tasks in another. For many NLP tasks, for example, Information Extraction \cite{wiedemann2018multilingual,neveol2017clef,poibeau2012multi}, Event Detection \cite{liu2018event,agerri2016multilingual,lejeune2015multilingual}, Part-of-Speech tagging \cite{plank2016multilingual,naseem2009multilingual}, and even Discourse Analysis \cite{liu2020multilingual}, the largest tagged datasets available are primarily in English, and researchers have trained classifiers in a multilingual setting that either translate resources into the target language, translate the target language into the source language, or learn a joint multilingual space. We are primarily concerned with labeling discourse-level annotations on English sentences, however, we may benefit from multilingual discourse datasets. \section{Conclusion} We have shown a state-of-the-art improvement of $7\%$ Micro F1-score above baseline, from 62.8\% F1-score to 67.7\% F1-score, for discourse tagging on the \textit{NewsDiscourse} dataset, the largest dataset currently available focusing on sentence-level Van Dijk discourse tagging. This dataset has a number of challenges: distinctions between Van Dijk discourse tags are based on a number of complex attributes, which our baseline models showed high confusion (Appendix Figure~\ref{sfig:baseline_confusion_mat}), for example, temporal relations between different sentences or the presence or absence of an event). Additionally, this dataset is class-imbalanced, with the overrepresented classes being, on average, $3$ times more likely than the underrepresented classes. We showed that a multitask approach could be especially helpful in this circumstance, improving performance for underrepresented tags more than overrepresented tags. A possible reason, we show, is the high correlations we observe between tag predictions between tasks, indicating that auxiliary tasks are giving signal to underrepresented tags in our primary task. This includes high correlations observed in a novel dataset that we introduce based on the same schema with some minor alterations. This raises the additional benefit that our multitask approach can reconcile different datasets with slightly different schema, allowing NLP researchers not to ``waste'' valuable tagging work. Finally, we perform a comparative analysis of other strategies proposed in the literature for dealing with small datasets or class-imbalanced problems: specifically, changing loss functions, hierarchical classification and CRF-sequential modeling. We show in exhaustive experiments that these approaches do not help us improve above baseline. These negative experiments include important analysis for future researchers, and provide a powerful justification for the necessity of our multitask approach. \bibliographystyle{acl_natbib}
{'timestamp': '2021-01-05T02:14:15', 'yymm': '2101', 'arxiv_id': '2101.00389', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00389'}
arxiv
\section{Introduction}\label{sec:intro} Consider the multivariate linear regression model \begin{eqnarray}\label{mlm} {\mathbf Y}_{i} = \greekbold{\beta}_{0} + \greekbold{\beta} {\mathbf X}_{i} + \greekbold{\varepsilon}_{i}, \; i=1,\ldots,n, \end{eqnarray} where the stochastic response ${\mathbf Y}_{i} \in \real{r}$, the non-stochastic predictor vectors ${\mathbf X}_{i} \in \real{p}$, $\greekbold{\beta}_{0} \in \real{r}$, and the error vectors $\greekbold{\varepsilon}_{i}$ are independent copies of $\greekbold{\varepsilon} \sim N(0, \greekbold{\Sigma})$. Model (\ref{mlm}) is {\em unconstrained} in the sense that each response is allowed a separate linear regression: the maximum likelihood estimator of the $j$-th row of $(\greekbold{\beta}_{0},\greekbold{\beta})$ is the same as the estimator of the coefficients from the linear regression of the $j$-th response on ${\mathbf X}$. {In many applications, particularly analyses of growth curves and longitudinal data, there may be additional information that $\mathrm{span}(\greekbold{\beta}_{0},\greekbold{\beta})$ is contained in a {\em known} subspace ${\mathcal U}$ with basis matrix ${\mathbf U} \in \real{r \times k}$. The classic dental data \citep{PotthoffRoy1964,Lee1975,Rao1987,Lee1988} provides an illustration of this type of structure. \begin{example}\label{eg: dental_data} A study of dental growth measurements of the distance (mm) from the center of the pituitary gland to the pteryomaxillary fissure were obtained on 11 girls and 16 boys at ages 8, 10, 12, and 14. The goal was to study the growth measurement as a function of time and sex. \end{example} Let $Y_{ik}$ denote the continuous measure of distance for child $i$ at age $t_{k}$, for $t_{k}=8$, $10$, $12$, $14$, and let ${\mathbf X}_{i}$ denote the gender indicator for child $i$ (1 for boy and 0 for girl). After graphical inspection, many researchers treated the population means for distance as linear in time for each gender. Following this tradition, a mixed effects repeated measure model is $Y_{ik}=\alpha_{00}+b_{0i}+\alpha_{01}{\mathbf X}_i+(\alpha_{10}+b_{1i}+\alpha_{11}{\mathbf X}_{i})t_{k}+\varepsilon_{ik}^{*},$ where $\greekbold{\varepsilon}_{i}^{*}=(\varepsilon_{i1}^{*},\dots,\varepsilon_{ir}^{*})^T\overset{\text{i.i.d.}}{\sim}N(0,\greekbold{\Sigma}^*)$, $b_{0i}$ and $b_{1i}$ denote the random intercept and slope, $(b_{0i},b_{1i})\overset{\text{i.i.d.}}{\sim}N(0,\mathbf D)$, where$\mathbf D$ is a $2 \times 2$ positive difinite matrix. We rewrite this model as \begin{eqnarray}\label{gmlm} {\mathbf Y}_{i}& = &{\mathbf U} \greekbold{\alpha}_0 + {\mathbf U} \greekbold{\alpha} {\mathbf X}_i + \epsilon_i \end{eqnarray} with ${\mathbf U} := (\mathbf{1},\mathbf{t})$ with $\mathbf{t}=(8,10,12,14)^T$, $\greekbold{\alpha}_0= (\alpha_{00}, \alpha_{10})$ $\greekbold{\alpha}=(\alpha_{01},\alpha_{11})$, $\greekbold{\varepsilon}_i=\greekbold{\varepsilon}_i^{*}+b_{0i}1_{r\times1}+b_{1i}\mathbf{t}$ and $\greekbold{\varepsilon}_i\overset{\text{i.i.d.}}{\sim}N(0,\greekbold{\Sigma})$. Applying the same ideas to just $\greekbold{\beta}$, so $\mathrm{span}(\greekbold{\beta}) \subseteq {\mathcal U}$ without requiring that $\mathrm{span}(\greekbold{\beta}_{0}) \subseteq {\mathcal U}$, leads to the model \begin{eqnarray}\label{igmlm} {\mathbf Y}_{i} = \greekbold{\beta}_{0} + {\mathbf U} \greekbold{\alpha} {\mathbf X}_{i} + \greekbold{\varepsilon}_{i}, \; i=1,\ldots,n. \end{eqnarray} Let ${\mathcal B} = \mathrm{span}(\greekbold{\beta})$. If we set ${\mathbf U} = \1_{r}$, so in model (\ref{igmlm}) $\greekbold{\alpha}$ is a row vector of length $p$, then the mean functions for the individual responses are parallel. {Although motivated in the context of the dental data, we use models (\ref{gmlm}) and (\ref{igmlm}) as general forms that can be adapted for different applications by choice of ${\mathbf U}$, referring to them as {\em constrained} multivariate linear models. } \citet{Cooper2002} used a version of model (\ref{gmlm}) with ${\mathbf U}$ reflecting charge balance constraints on chemical constituents of water samples. Constrained models occur in various areas including growth curve and longitudinal studies where the elements of ${\mathbf Y}_{i}$ are repeated observations on the $i$-th experimental unit over time. It is common in such settings to model the rows of ${\mathbf U}$ as a user-specified vector-valued function ${\mathbf u}(t)\in \real{k}$ of time $t$, the $i$-th row of ${\mathbf U}$ then being ${\mathbf u}^{T}(t_{i})$. Polynomial bases ${\mathbf u}^{T}(t) = (1, t, t^{2},\ldots,t^{k-1})$ are prevalent, particularly in the foundational work of \citet{PotthoffRoy1964}, \citet{Rao1965}, \citet{Grizzle1969} and others, but splines \citep{Nummi2008} or other basis constructions \citep{Izenman1989} could be used as well. In longitudinal studies, model (\ref{gmlm}) might be used when it is desirable to model profiles, while model (\ref{igmlm}) could be used when modeling just profile differences. For instance, if ${\mathbf X} = 0,1$ is a population indicator then under model (\ref{gmlm}) the mean profiles are modeled as ${\mathbf U}\greekbold{\alpha}_{0}$ and ${\mathbf U}(\greekbold{\alpha}_{0} + \greekbold{\alpha})$, while under model (\ref{igmlm}) the profile means are $\greekbold{\beta}_{0}$ and $\greekbold{\beta}_{0} + {\mathbf U}\greekbold{\alpha}$. It is known in the literature that constrained models gain efficiency in the estimators compare with model (\ref{mlm}), provided that ${\mathbf U}$ is correctly specified. However, it may be very difficult to correctly specify ${\mathbf U}$ in some applications, as in the following study from \cite{Kenward1987}. \begin{example}\label{otro} An experiment was carried out to compare two treatments for the control of gut worm in cattle. The treatments were each randomly assigned to 30 cows whose weights were measured at $2$, $4$, $6,\ldots,18$ and $19$ weeks after treatment. The goal of the experiment was to see if a differential treatment effect could be detected and, if so, the time point when the difference was first manifested. \end{example} \begin{figure}[ht!] \centering \includegraphics[scale=.5]{cows.pdf} \caption{Cattle data: Average weight by treatment and time. } \label{cows} \end{figure} The constrained models (\ref{gmlm}) and (\ref{igmlm}) require that we select ${\mathcal U}$. Lacking prior knowledge, it is natural to inspect plots of the average weight by time, as shown in Figure~\ref{cows}. It seems clear from the figure that it would be difficult to model the treatment profiles, particularly their two crossing points, without running into problems of over fitting. {Envelopes provided a way to model data like that illustrated in Figure~\ref{cows} without specifying a subspace ${\mathcal U}$.} {Envelope methodology is based on a relatively new paradigm for dimension reduction that, when applied in the context of model (\ref{mlm}), has some similarity with constrained multivariate models. Briefly, envelopes produce a re-parameterization of model (\ref{mlm}) in terms of a basis $\greekbold{\Gamma} \in {\mathbb R}^{r\times u}$ for the smallest reducing subspace of $\greekbold{\Sigma}$ that contains ${\mathcal B}$. Like the constrained model, envelopes produce an upper bound for ${\mathcal B}$, ${\mathcal B} \subseteq \mathrm{span}(\greekbold{\Gamma})$, but unlike the constrained model the bound is unknown and must be estimated. Also, unlike the constrained model, $\greekbold{\Gamma}^{T}{\mathbf Y}$ contains the totality of ${\mathbf Y}$ that is affected by changing ${\mathbf X}$. Since ${\mathcal B} \subseteq \mathrm{span}(\greekbold{\Gamma})$, we have $\greekbold{\beta} = \greekbold{\Gamma} \greekbold{\eta} $ for some $\greekbold{\eta} \in \real{u \times p}$. Model (\ref{mlm}) can be then be re-paremeterized to give its envelope counterpart, \begin{eqnarray}\label{envmlm} {\mathbf Y}_{i} & = & \greekbold{\beta}_{0} +\greekbold{\Gamma} \greekbold{\eta} {\mathbf X}_{i} + \greekbold{\varepsilon}_{i}, \; i=1,\ldots,n, \\ \greekbold{\Sigma} & = & \greekbold{\Gamma} \greekbold{\Omega} \greekbold{\Gamma}^{T} + \greekbold{\Gamma}_{0} \greekbold{\Omega}_{0}\greekbold{\Gamma}_{0}^{T}, \nonumber \end{eqnarray} where $(\greekbold{\Gamma}, \greekbold{\Gamma}_{0})\in \real{r \times r}$, orthogonal, $\greekbold{\Omega} = \greekbold{\Gamma}^{T}\greekbold{\Sigma}\greekbold{\Gamma} > 0$ and $\greekbold{\Omega} _{0}= \greekbold{\Gamma}_{0}^{T}\greekbold{\Sigma}\greekbold{\Gamma}_{0} > 0$. Envelopes are reviewed in more detail in Section \ref{sec:review}.} Comparing (\ref{gmlm})--(\ref{igmlm}) with (\ref{envmlm}), both express $\greekbold{\beta}$ as a basis times a coordinate matrix: $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha}$ in (\ref{gmlm})--(\ref{igmlm}) and $\greekbold{\beta} = \greekbold{\Gamma} \greekbold{\eta}$ in (\ref{envmlm}). However, as mentioned previously, $\greekbold{\Gamma}$ is estimated but ${\mathbf U}$ is assumed known. Envelopes were first proposed by \citet*{Cook2007} to facilitate dimension reduction and later were shown by \cite{Cook2010} to have the potential to achieve massive efficiency gains relative to the standard maximum likelihood estimator of $\greekbold{\beta}$, and that these gains will be passed on to other tasks such as prediction. There are now a number of extensions and applications of this basic envelope methodology, each demonstrating the potential for substantial efficiency gains \citep{SuCook2011,CookZhang2015foundation,CookZhang2015simultaneous,ForzaniSu,Su2016,LiZhang2017tensor,Hossien2017}. Studies over the past several years have demonstrated repeatedly that sometimes the efficiency gains of the envelope methods relative to standard methods amount to increasing the sample size many times over. See \citet{CookEnv2018} for a review and additional extensions of envelope methodology. {The choice between a constrained model, (\ref{gmlm}) or (\ref{igmlm}), and the envelope model (\ref{envmlm}) hinges on the ability to correctly specify an upper bound ${\mathcal U}$ for $\mathrm{span}(\greekbold{\beta}_{0},\greekbold{\beta})$ or ${\mathcal B}$. As we show in Section \ref{sec:comparison}, if we have a correct parsimonious basis ${\mathbf U}$ then the constrained models are more efficient. But if bias is present or if we use a correct but excessive ${\mathbf U}$, then the envelope model (\ref{envmlm}) can be much more efficient. Although considerable methodology has been developed for the envelope version (\ref{envmlm}) of the unconstrained model (\ref{mlm}), there are apparently no envelope counterparts available for the class of models represented by (\ref{gmlm}) and (\ref{igmlm}) when a correct parsimonious ${\mathbf U}$ is available. In Section \ref{sec:Balpha} we show how to adapt the envelope paradigm to models (\ref{gmlm}) and (\ref{igmlm}) to achieve efficiency gains over those models. Testing methods are proposed in Section \ref{sec:testing} to evaluate the choice of ${\mathbf U}$ and also to test importance of predictors. Simulations to support our finding are given in Section~\ref{simulations} and in Section~\ref{sec:applications} we compare our methodology with others in { \color{black}{two}} examples. Proofs for all propositions and discussions of related issues are available in a Supplement to this article. } \paragraph{Notational conventions.} Given a sample $(\mathbf a_{i}, {\mathbf b}_{i}), i=1,\ldots,n$, let $\mathbf T_{\mathbf a,{\mathbf b}} = n^{-1}\sum_{i=1}^{n} \mathbf a_{i}{\mathbf b}_{i}^{T}$ denote the matrix of raw second moments, and let $\mathbf T_{\mathbf a} = n^{-1}\sum_{i=1}^{n} \mathbf a_{i}\mathbf a_{i}^{T}$. For raw second moments involving ${\mathbf Y}_{S}$ and ${\mathbf Y}_{D}$ (defined herein) we use $S$ and $D$ as subscripts. We use a subscript 1 in residuals computed from a model containing a vector of intercepts. The absence of a 1 indicates no intercept was included. For instance, ${\mathbf R}_{\mathbf a | {\mathbf b}}$ means the residuals from the regression of $\mathbf a$ on ${\mathbf b}$ without an intercept vector, $\mathbf a_{i} = \greekbold{\beta} {\mathbf b}_{i} + {\mathbf e}$, while ${\mathbf R}_{\mathbf a | (1, {\mathbf b})}$ means the residuals from the regression of $\mathbf a$ on ${\mathbf b}$ with an intercept vector, $\mathbf a_{i} = \greekbold{\beta}_{0} + \greekbold{\beta} {\mathbf b}_{i} + {\mathbf e}_{i}$. Similarly, ${\mathbf R}_{D|S}$ means a residual from the regression of ${\mathbf Y}_{D}$ and ${\mathbf Y}_{S}$ without an intercept, while ${\mathbf R}_{D|(1,S)}$ means a residual from the regression of ${\mathbf Y}_{D}$ and ${\mathbf Y}_{S}$ with an intercept. Sample variances are written as ${\mathbf S}_{\mathbf a} = n^{-1}\sum_{i=1}^{n}(\mathbf a_{i} - \bar{\mathbf a})(\mathbf a_{i} - \bar{\mathbf a})^{T}$ and sample covariance matrices are written as ${\mathbf S}_{\mathbf a, {\mathbf b}} = n^{-1}\sum_{i=1}^{n}(\mathbf a_{i} - \bar{\mathbf a})({\mathbf b}_{i} - \bar{{\mathbf b}})^{T}$. For variances and covariances involving ${\mathbf Y}_{D}$ and ${\mathbf Y}_{S}$ we again use $D$ and $S$ as subscripts, e.g. ${\mathbf S}_{D} = n^{-1}\sum_{i=1}^{n}({\mathbf Y}_{Di} - \bar{{\mathbf Y}}_{D})({\mathbf Y}_{Di} - \bar{{\mathbf Y}}_{D})^{T}$. The notation ${\mathbf S}_{\mathbf a|{\mathbf b}}$ means the covariance matrix of the residuals from fit of the model $\mathbf a_{i} = \greekbold{\beta}_{0} + \greekbold{\beta} {\mathbf b}_{i} + {\mathbf e}_{i}$, which always includes as intercept. That is, ${\mathbf S}_{\mathbf a|{\mathbf b}} = n^{-1}\sum_{i=1}^{n}{\mathbf R}_{\mathbf a | (1, {\mathbf b}), i}{\mathbf R}_{\mathbf a | (1, {\mathbf b}), i}^{T}$. Similarly, ${\mathbf S}_{D|S} = \sum_{i=1}^{n}{\mathbf R}_{D | (1, S), i}{\mathbf R}_{D | (1, S), i}^{T}$. We use $\mathrm{span}({\mathbf A})$ to denote the subspace spanned by the columns of the matrix ${\mathbf A}$. The projection onto ${\mathcal S} = \mathrm{span}({\mathbf A})$ will be denoted using either the subspace itself ${\mathbf P}_{{\mathcal S}}$ or its basis ${\mathbf P}_{{\mathbf A}}$. Projections onto an orthogonal complement will be denoted similarly using ${\mathbf Q}_{(\cdot)} = \mathbf I-{\mathbf P}_{(\cdot)}$. For a subspace ${\mathcal S}$ and conformable matrix ${\mathbf B}$, ${\mathbf B} {\mathcal S} = \{{\mathbf B} S \mid S \in {\mathcal S}\}$. If an estimator ${\mathbf a} \in \real{r}$ of $\greekbold{\alpha} \in \real{r}$ has the property that $\sqrt{n}({\mathbf a} - \greekbold{\alpha})$ is asymptotically normal with mean 0 and variance ${\mathbf A}$, we write $\mathrm{avar}(\sqrt{n}{\mathbf a})={\mathbf A}$ to denote its asymptotic variance. \section{Comparison of the envelope and constrained estimators }\label{sec:comparison} Models (\ref{gmlm})--(\ref{igmlm}) and (\ref{envmlm}) are similar in the sense that $\greekbold{\beta}$ is represented as a basis times a coordinate matrix, $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha}$ in (\ref{gmlm})--(\ref{igmlm}) and $\greekbold{\beta} = \greekbold{\Gamma} \greekbold{\eta}$ in (\ref{envmlm}). It might be thought that (\ref{gmlm}) and (\ref{igmlm}) would yield the better estimators because ${\mathbf U}$ is known while $\greekbold{\Gamma}$ is not, but that turns out not to be so generally, in part because we may have ${\mathcal B} \not \subseteq {\mathcal U}$, which raises the issue of bias as discussed in Section~\ref{sec:bias}, and in part because the envelope model capitalizes automatically on structure in $\greekbold{\Sigma}$, which can improve efficiency as discussed in Section~\ref{sec:varcomparison}. Our general conclusion is that in practice it may be necessary to compare their fits before selecting an estimator, and that the envelope estimator may have a clear advantage when there is uncertainty in the choice of ${\mathcal U}$, as illustrated in Figure~\ref{cows}. {Developments under models (\ref{gmlm}) and (\ref{igmlm}) are very similar since they differ only on how the intercept is handled. In the remainder of this article we focus on model (\ref{gmlm}) and comment from time to time on modifications necessary for model (\ref{igmlm}). All subsequent developments are under model (\ref{gmlm}) unless model (\ref{igmlm}) is indicated explicitly.} \subsection{Maximum likelihood estimators for constrained models}\label{sec:gmlm} Our treatment of maximum likelihood estimation from (\ref{gmlm}) is based on linearly transforming ${\mathbf Y}$. Let ${\mathbf U}_{0}$ be a semi-orthogonal basis matrix for ${\mathcal U}^{\perp}$, and let ${\mathbf W}=({\mathbf U}({\mathbf U}^{T}{\mathbf U})^{-1}, {\mathbf U}_{0}) := ({\mathbf W}_{1},{\mathbf W}_{2})$. Then the transformed model becomes \begin{equation}\label{tmodel} {\mathbf W}^{T}{\mathbf Y}_{i} := \left(\begin{array}{c} {\mathbf Y}_{Di} \\ {\mathbf Y}_{Si} \end{array}\right)=\left(\begin{array}{c} ({\mathbf U}^{T}{\mathbf U})^{-1}{\mathbf U}^{T}{\mathbf Y}_{i} \\ {\mathbf U}_{0}^{T}{\mathbf Y}_{i}\end{array}\right)=\left(\begin{array}{c} \greekbold{\alpha}_{0}+\greekbold{\alpha}{\mathbf X}_{i} \\ 0 \end{array}\right) + {\mathbf W}^{T}\greekbold{\varepsilon}_{i},\; i=1,\ldots,n, \end{equation} { where ${\mathbf Y}_{Di} \in \real{k}$ and ${\mathbf Y}_{Si}\in \real{r-k}$} with $k$ the number of columns of ${\mathbf U}$. The transformed variance can be represented block-wise as $\greekbold{\Sigma}_{{\mathbf W}} := \mathrm{var}({\mathbf W}^{T}\greekbold{\varepsilon}) = ({\mathbf W}_{i}^{T}\greekbold{\Sigma}{\mathbf W}_{j})$, $i,j=1,2$, where $\greekbold{\Sigma}$ is as defined for model (\ref{gmlm}). The mean $E({\mathbf Y}_{D} \mid {\mathbf X})$ depends non-trivially on ${\mathbf X}$ and thus, as indicated by the subscript $D$, we think of ${\mathbf Y}_{D}$ as providing direct information about the regression. On the other hand, $E({\mathbf Y}_{S}\mid {\mathbf X})=0$ and thus ${\mathbf Y}_{S}$ provides no direct information but may provide useful subordinate information by virtue of its association with ${\mathbf Y}_{D}$. To find the maximum likelihood estimators from model (\ref{tmodel}), we write the full log likelihood as the sum of the log likelihoods for the marginal model for ${\mathbf Y}_{S}\mid {\mathbf X}$ and the conditional model for ${\mathbf Y}_{D} \mid ({\mathbf X},{\mathbf Y}_{S})$: \begin{eqnarray} {\mathbf Y}_{Si} \mid {\mathbf X}& = & {\mathbf e}_{Si} \label{cmodelS}\\ {\mathbf Y}_{Di}\mid({\mathbf X}_{i}, {\mathbf Y}_{Si}) & = & \greekbold{\alpha}_0 + \greekbold{\alpha} {\mathbf X}_{i} + \greekbold{\phi}_{D|S}{\mathbf Y}_{Si} + {\mathbf e}_{D|Si}, \label{cmodelD} \end{eqnarray} where $\greekbold{\phi}_{D|S} = ({\mathbf U}^{T}{\mathbf U})^{-1}{\mathbf U}^{T}\greekbold{\Sigma} {\mathbf U}_{0}({\mathbf U}_{0}^{T}\greekbold{\Sigma}{\mathbf U}_{0})^{-1} \in \real{k \times (r-k)}$, ${\mathbf e}_{D|S} = {\mathbf W}_{1}^{T}\greekbold{\varepsilon}$, ${\mathbf e}_{S} = {\mathbf W}_{2}^{T}\greekbold{\varepsilon}$. The variances of the errors are $\greekbold{\Sigma}_{S} :=\mathrm{var}({\mathbf e}_{S}) ={\mathbf U}_0^T \greekbold{\Sigma} {\mathbf U}_0 $ and $\greekbold{\Sigma}_{D|S} := \mathrm{var}({\mathbf e}_{D|S})= ( {\mathbf U}^{T}\greekbold{\Sigma}^{-1}{\mathbf U})^{-1}$. The number of free real parameters in this conditional model is $N_{\mathrm{cm}}(k)=k(p+1) + r(r+1)/2$. The subscript `$\mathrm{cm}$' is used also to indicate estimators arising from the conditional model (\ref{cmodelD}). The maximum likelihood estimator and its asymptotic variance are \begin{eqnarray} \widehat{\greekbold{\beta}}_{\mathrm{cm}} &=& {\mathbf U} \widehat{\alphabf}_{\mathrm{cm}} = {\mathbf U} {\mathbf S}_{D,{\mathbf R}_{{\mathbf X}|(1,S)}} {\mathbf S}_{{\mathbf X}|S}^{-1} = {\mathbf U} ({\mathbf S}_{D,{\mathbf X}} - {\mathbf S}_{D,S} {\mathbf S}_{S}^{-1}{\mathbf S}_{S,{\mathbf X}}){\mathbf S}_{{\mathbf X}|S}^{-1} \label{alphahatcm} \\ \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{cm}})) & = & \greekbold{\Sigma}_{{\mathbf X}}^{-1}\otimes {\mathbf U} \greekbold{\Sigma}_{D\mid S}{\mathbf U}^{T}, \label{avarbetahatcm} \end{eqnarray} where $\widehat{\alphabf}_{\mathrm{cm}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ are the MLEs of $\greekbold{\alpha}$ and $\greekbold{\beta}$ in model (\ref{tmodel}). Estimation for model (\ref{igmlm}) requires just a few modifications of the procedure for model (\ref{gmlm}). All modifications stem from the presence of an intercept vector in model (\ref{cmodelS}), which becomes ${\mathbf Y}_{S} = {\mathbf W}_{2}^{T}\greekbold{\beta}_{0} + {\mathbf e}_{S}$. In consequence, the variance $\greekbold{\Sigma}_{S}$ is estimated as $\greekbold{\widehat{\Sigma}}_{S} = {\mathbf S}_{S}$ with corresponding change in the estimator of $\greekbold{\Sigma}$, and the estimator of the intercept ${\mathbf W}_{2}^{T}\greekbold{\beta}_{0}$ is just $\bar{{\mathbf Y}}_{S}$. The intercept in (\ref{cmodelD}) is redefined as $\greekbold{\alpha}_{0} = {\mathbf W}_{1}^{T}\greekbold{\beta}_{0}-\greekbold{\phi}_{D|S}{\mathbf W}_{2}^{T}\greekbold{\beta}_{0}$. The maximum likelihood estimator of $\greekbold{\beta}_{0}$ in model (\ref{igmlm}) can be constructed straightforwardly from the estimators of $\greekbold{\alpha}_{0}$, ${\mathbf W}_{2}^{T}\greekbold{\beta}_{0} $ and $\greekbold{\phi}_{D|S}$. Because there is an intercept in (\ref{cmodelS}), the number of real parameters becomes $N_{\mathrm{cm}} + r-k$. Importantly, the estimators of the parameters in (\ref{cmodelD}) are unchanged. This means in particular that $\widehat{\alphabf}_{\mathrm{cm}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ along with their asymptotic variances are the same under models (\ref{gmlm}) and (\ref{igmlm}), although different ${\mathbf U}$'s might be used in their construction. \subsection{Envelope estimator stemming from Model \eqref{mlm}}\label{sec:review} Consider a subspace ${\mathcal S} \subseteq \real{r}$ that satisfies the two conditions (i) ${\mathbf Q}_{{\mathcal S}}{\mathbf Y}\mid {\mathbf X}={\mathbf x}_{1} \sim {\mathbf Q}_{{\mathcal S}}{\mathbf Y}\mid {\mathbf X}={\mathbf x}_{2}$ for all relevant ${\mathbf x}_{1}$ and ${\mathbf x}_{2}$ and (ii) ${\mathbf P}_{{\mathcal S}}{\mathbf Y} \;\, \rule[0em]{.03em}{.67em} \hspace{-.25em {\mathbf Q}_{{\mathcal S}}{\mathbf Y} \mid {\mathbf X}$. Condition (i) insures that the marginal distribution of ${\mathbf Q}_{S}{\mathbf Y}$ does not depend on ${\mathbf X}$, while statement (ii) insures that, given ${\mathbf X}$, ${\mathbf Q}_{{\mathcal S}}{\mathbf Y}$ cannot provide material information via an association with ${\mathbf P}_{{\mathcal S}}{\mathbf Y}$. Together these conditions imply that the impact of ${\mathbf X}$ on the distribution of ${\mathbf Y}$ is concentrated solely in ${\mathbf P}_{{\mathcal S}}{\mathbf Y}$. One motivation underlying envelopes is then to characterize linear combinations ${\mathbf Q}_{S}{\mathbf Y}$ that are unaffected by changes in ${\mathbf X}$ and in doing so produce downstream gains in estimative and predictive efficiency. In terms of model (\ref{mlm}), condition (i) holds if and only if ${\mathcal B}\subseteq {\mathcal S}$ and condition (ii) holds if and only if ${\mathcal S}$ is a reducing subspace of $\greekbold{\Sigma}$; that is, ${\mathcal S}$ must decompose $\greekbold{\Sigma} = {\mathbf P}_{{\mathcal S}} \greekbold{\Sigma} {\mathbf P}_{{\mathcal S}} + {\mathbf Q}_{{\mathcal S}}\greekbold{\Sigma} {\mathbf Q}_{{\mathcal S}}$. The intersection of all subspaces with these properties is by construction the smallest reducing subspace of $\greekbold{\Sigma}$ that contains ${\mathcal B}$, which is called the $\greekbold{\Sigma}$-envelope of ${\mathcal B}$ and is represented as ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ \citep{Cook2010}. These consequences of conditions (i) and (ii) can be incorporated into model (\ref{mlm}) by using a basis, leading to model \eqref{envmlm}. Let $u \in \{0,1,\ldots,r\}$ denote the dimension of ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$. The number of free real parameters is $N_{\mathrm{em}} = r + pu + r(r+1)/2$. The subscript `$\mathrm{em}$' is used also to indicate selected quantities arising from this envelope model. The goal here still to estimate $\greekbold{\beta} = \greekbold{\Gamma}\greekbold{\eta}$ and $\greekbold{\Sigma}$. \citet{Cook2010} derived the maximum likelihood envelope estimators of $\greekbold{\beta}$ and $\greekbold{\Sigma}$ along with their asymptotic variances. They showed that substantial efficiency gains in estimation of $\greekbold{\beta}$ are possible under this model, particularly when a norm of $\mathrm{var}(\greekbold{\Gamma}_{0}^{T}{\mathbf Y}) =\greekbold{\Omega}_{0}$ is considerably larger than the same norm of $\mathrm{var}(\greekbold{\Gamma}^{T}{\mathbf Y})=\greekbold{\Omega}$. Given the envelope dimension $u$, the maximum likelhood estimator $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ of $\greekbold{\beta} = \greekbold{\Gamma} \greekbold{\eta} $ from envelope model (\ref{envmlm}) has asymptotic variance given by \begin{equation}\label{avarbetahatem} \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{em}})) = \greekbold{\Sigma}_{{\mathbf X}}^{-1}\otimes \greekbold{\Gamma} \greekbold{\Omega} \greekbold{\Gamma}^T + (\greekbold{\eta}^T\otimes \greekbold{\Gamma}_0) {\mathbf M}^{\dagger}(\greekbold{\Sigma}_{{\mathbf X}}) (\greekbold{\eta} \otimes \greekbold{\Gamma}^T_0), \end{equation} where for a ${\mathbf C} \in \real{p \times p}$, ${\mathbf M} ({\mathbf C}) := \greekbold{\eta} {\mathbf C}\greekbold{\eta}^T \otimes \greekbold{\Omega}_0^{-1} + \greekbold{\Omega} \otimes \greekbold{\Omega}_0^{-1} + \greekbold{\Omega}^{-1} \otimes \greekbold{\Omega}_0 - 2\mathbf I$ and $\dagger$ denotes the Moore-Penrose inverse. \cite{Cook2010} showed that $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{em}})) \leq \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{um}}))$, where $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ is the maximum likelihood estimator under the uncontrained model \eqref{mlm}. In consequence, estimators from the envelope model (\ref{envmlm}) are always superior to those from the unconstrained multivariate model (\ref{mlm}). \cite{Cook2010} also showed that the envelope estimator is { $\sqrt{n}$-consistent} even the normality assumption is violated as long as the data has finite fourth moments. \subsection{Potential bias in $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$}\label{sec:bias} Assuming that ${\mathcal B} \subseteq {\mathcal U}$, $\widehat{\alphabf}_{\mathrm{cm}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ are unbiased estimators of $\greekbold{\alpha}$ and $\greekbold{\beta}$. However, if ${\mathcal B} \not\subseteq {\mathcal U}$ then both $\widehat{\alphabf}_{\mathrm{cm}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ are biased, which could materially affect the estimators: $E(\widehat{\alphabf}_{\mathrm{cm}}) = ({\mathbf U}^{T}{\mathbf U})^{-1}{\mathbf U}^{T}\greekbold{\beta}$ and $E(\widehat{\greekbold{\beta}}_{\mathrm{cm}}) = {\mathbf P}_{{\mathbf U}}\greekbold{\beta}$. Consequently, the bias in $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ is $\greekbold{\beta} - {\mathbf P}_{{\mathbf U}}\greekbold{\beta} = {\mathbf Q}_{{\mathbf U}}\greekbold{\beta}$. A nonzero bias must necessarily dominate the mean squared error asymptotically and so could limit the utility of $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$. Simulation results that illustrate the potential bias effects are discussed in Section \ref{sec: sim_bias}. Otherwise, we assume that ${\mathcal B} \subseteq {\mathcal U}$ in the remainder of this article unless indicated otherwise. \subsection{Comparison of asymptotic variances of $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$}\label{sec:varcomparison} We now compare the asymptotic variance of the envelope and constrained estimators of $\greekbold{\beta}$, (\ref{avarbetahatem}) and (\ref{avarbetahatcm}). Depending on the dimensions involved, the relationship between ${\mathcal U}$ and the envelope ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ and other factors, the difference between the asymptotic covariance matrices for the estimators -- $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ -- from these two models can be positive definite, negative definite or indefinite. Since all comparisons are in terms of $\greekbold{\beta}$'s, we assume without loss of generality that ${\mathbf U}$ is a semi-orthogonal matrix. Also, since $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ is the same under models (\ref{gmlm}) and (\ref{igmlm}) we do not distinguish between these models in this section. \subsubsection{${\mathcal B} \subseteq {\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$} Assuming that ${\mathcal U}$ is correct so ${\mathcal B} \subseteq {\mathcal U} $ and that ${\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ is one way to simplify the variance comparison: \begin{prop}\label{lemmacmltem} If ${\mathcal B} \subseteq {\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$, then $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{cm}})) \leq \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{em}})).$ \end{prop} In consequence, under the hypothesis ${\mathcal B} \subseteq {\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$, the constrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ is superior to the envelope estimator $\widehat{\greekbold{\beta}}_{\mathrm{em}}$. However, this comparison may be seen as loaded in favor of $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ since the constrained estimator uses the additional knowledge that ${\mathcal B} \subseteq {\mathcal U}$, the envelope estimator does not. Additionally, neither estimator makes use of the proposition's hypothesis. The next proposition provides help in assessing the impact of the hypothesis on the underlying structure by connecting it with ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$, the $\greekbold{\Sigma}$-envelope of ${\mathcal U}$. \begin{prop}\label{lemma3} $\mathrm{\;}$ Assume that ${\mathcal B} \subseteq {\mathcal U}$. Then \begin{enumerate} \item ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B}) \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$, \item ${\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ if and only if ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B}) = {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$, \item If $\mathrm{rank}(\greekbold{\alpha}) = k$ then ${\mathcal B} = {\mathcal U}$ and ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B}) = {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$. \end{enumerate} \end{prop} This proposition says essentially that if ${\mathcal B} \subseteq {\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ then we can start with model (\ref{mlm}) and parameterize in terms of ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$ rather than ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$. A key distinction here is that ${\mathcal U}$ is known while ${\mathcal B}$ is not. In consequence, we expect less estimative variation when parameterizing (\ref{mlm}) in terms of ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$ instead of ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$. Since ${\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$ can construct a semi-orthogonal basis for ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U})$ as $\greekbold{\Gamma} = ({\mathbf U}, \greekbold{\Gamma}_{2})$ with ${\mathbf U}_{0} = (\greekbold{\Gamma}_{2},\greekbold{\Gamma}_{0})$ and, recognizing that $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha} = \greekbold{\Gamma}\greekbold{\eta}$, we get a new model \begin{eqnarray}\label{gmlmB} {\mathbf Y}_{i} & = & {\mathbf U} \greekbold{\alpha}_{0} + {\mathbf U} \greekbold{\alpha} {\mathbf X}_{i} + \greekbold{\varepsilon}_{i}, \; i=1,\ldots,n \\ \greekbold{\Sigma} & = & \greekbold{\Gamma} \greekbold{\Omega} \greekbold{\Gamma}^{T} + \greekbold{\Gamma}_{0}\greekbold{\Omega}_{0}\greekbold{\Gamma}_{0}^{T}.\nonumber \end{eqnarray} Consider estimating $\greekbold{\alpha}$ from this model using the steps sketched in Section~\ref{sec:gmlm}, and partition $\greekbold{\Omega} = (\greekbold{\Omega}_{ij})$ to conform to the partition of $\greekbold{\Gamma} = ({\mathbf U}, \greekbold{\Gamma}_{2})$. The envelope structure of (\ref{gmlmB}) induces a special structure on the reduced model that corresponds to (\ref{cmodelS})--(\ref{cmodelD}): $\greekbold{\Sigma}_{S} = \mathrm{bdiag}(\greekbold{\Omega}_{22}, \greekbold{\Omega}_{0})$ is block diagonal, $\greekbold{\Sigma}_{D|S} = \greekbold{\Omega}_{11} - \greekbold{\Omega}_{12}\greekbold{\Omega}_{22}^{-1}\greekbold{\Omega}_{21}$ and $\greekbold{\phi}_{D|S} = (\greekbold{\Omega}_{12}\greekbold{\Omega}_{22}^{-1}, 0)$. It can now be shown that the estimators of $\greekbold{\alpha}$ from the constrained model (\ref{cmodelS})--(\ref{cmodelD}) and from (\ref{gmlmB}) have the same asymptotic variance. In other words, if we neglect the hypothesized condition that ${\mathcal U} \subseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ then the constrained estimator is better, but if we formulate the envelope model making use of that condition then the constrained and envelope estimators are asymptotically equivalent. \citet{Rao1967} posited a simple structure for the analysis of balanced growth curve data \citep[See also][]{Geisser1970, Lee1975, Geisser1981, Lee1988, PanFang2002}. In our context, Rao's simple structure is obtained by assuming that ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal U}) = {\mathcal U}$, which corresponds to model (\ref{gmlmB}) with $\greekbold{\Gamma} = {\mathbf U}$. In view of the options available, Rao's simple structure seems too specialized to warrant further attention. Additional discussion of Rao's simple structure is available in Supplement Section~\ref{sec:structure}. \subsubsection{${\mathcal U} \supseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$} Assuming that ${\mathcal U} \supseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ is another way to simplify the variance comparison. Let $\greekbold{\Gamma} \in \real{r \times u}$ be a semi-orthogonal basis matrix for ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ and let $(\greekbold{\Gamma}, \greekbold{\Gamma}_{0})$ be an orthogonal matrix. Since ${\mathcal U} \supseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$, we can construct semi-orthogonal bases ${\mathbf U} = (\greekbold{\Gamma}, \greekbold{\Gamma}_{01})$ and $\greekbold{\Gamma}_{0} = (\greekbold{\Gamma}_{01}, \greekbold{\Gamma}_{02})$. Partition $\greekbold{\Omega}_{0} = (\greekbold{\Omega}_{0, ij})$ to correspond to the partitioning of $\greekbold{\Gamma}_{0}$. Then \begin{prop}\label{lemmaavar} Assume that ${\mathcal U} \supseteq {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ and let ${\mathbf c} \in \real{r}$. Then \begin{enumerate} \item If ${\mathbf c} \in {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})$ then $\mathrm{avar}(\sqrt{n}{\mathbf c}^{T}\widehat{\greekbold{\beta}}_{\mathrm{cm}}) = \mathrm{avar}(\sqrt{n}{\mathbf c}^{T}\widehat{\greekbold{\beta}}_{\mathrm{em}})$. \item If ${\mathbf c} \in \mathrm{span}(\greekbold{\Gamma}_{02})$ then $\mathrm{avar}(\sqrt{n}{\mathbf c}^{T}\widehat{\greekbold{\beta}}_{\mathrm{cm}}) \leq \mathrm{avar}(\sqrt{n}{\mathbf c}^{T}\widehat{\greekbold{\beta}}_{\mathrm{em}})$. \item If ${\mathbf c} \in \mathrm{span}(\greekbold{\Gamma}_{01})$, $\mathrm{rank}( {\mathbf M}(\greekbold{\Sigma}_{{\mathbf X}})) = \mathrm{rank}(\greekbold{\eta}\greekbold{\Sigma}_{{\mathbf X}}\greekbold{\eta}^{T} \otimes \greekbold{\Omega}_{0}^{-1})$ and $\greekbold{\Omega}_{12} = 0$ then $\mathrm{avar}(\sqrt{n}{\mathbf c}^{T}\widehat{\greekbold{\beta}}_{\mathrm{cm}}) \geq \mathrm{avar}(\sqrt{n}{\mathbf c}^{T}\widehat{\greekbold{\beta}}_{\mathrm{em}})$. \end{enumerate} \end{prop} The central message of this lemma is that the difference between the asymptotic covariance matrices for the estimators $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ can be positive semi-definite or negative semi-definite, depending on the characteristics of problem. Although the above derivation is under two simple cases where $\mathcal{U}$ and the envelope space are nested, the conclusion actually holds for the general case: {if we have a correct parsimoniously parameterized constrained model then the envelope model (\ref{envmlm}) is less efficient; but if the basis ${\mathbf U}$ in the constrained model is incorrect or if the constrained model is excessively parameterized, then envelopes can be much more efficient.} This motivated us to incorporate envelopes into the constrained model so that we can further improve efficiency if constraints are reasonably well modeled for the data \section{Envelopes in constrained models} \label{sec:Balpha} {In this section, we consider two different ways of imposing envelopes in a constrained model when ${\mathcal B} \subseteq \mathcal{U}$. As mentioned previously, we focus on envelope estimators in the constrained model (\ref{gmlm}) and later describe the modifications necessary for model (\ref{igmlm}). In Section~\ref{sec:envalpha} we describe envelope estimation of $\greekbold{\alpha}$ when there is available an application-grounded basis ${\mathbf U}$ that is key to interpretation and inference. In Section~\ref{sec:envbeta} we address envelope estimation of $\greekbold{\beta} = {\mathbf U} \greekbold{\alpha}$. Here the choice of basis ${\mathbf U}$ has no effect on the maximum likelihood estimators of $\greekbold{\beta}$ under the constrained models (\ref{gmlm}), but it does affect the envelope estimator of $\greekbold{\beta}$. Basis selection is addressed in Section~\ref{sec:envbeta}.} \subsection{Enveloping $\greekbold{\alpha}$}\label{sec:envalpha} { Estimation of $\greekbold{\alpha}$ will be of interest when it is desirable to interpret $\greekbold{\beta} = {\mathbf U} \greekbold{\alpha}$ in terms of its coordinates $\greekbold{\alpha}$ relative to the known application-grounded basis ${\mathbf U}$. Let ${\mathcal A} = \mathrm{span}(\alpha)$. The envelope estimator of $\greekbold{\alpha}$ in model (\ref{tmodel}) can be found by first transforming \eqref{tmodel} into \eqref{cmodelS}--\eqref{cmodelD} and then parameterizing (\ref{cmodelD}) in terms of a semi-orthogonal basis matrix $\greekbold{\phi} \in \real{k \times u}$ for ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$, the $\greekbold{\Sigma}_{D|S}$-envelope of ${\mathcal A}$ with dimension $u \leq k$. Since $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{cm}})) = \greekbold{\Sigma}_{{\mathbf X}}^{-1} \otimes \greekbold{\Sigma}_{D|S}$ is in the form of a Kronecker product that allows separation of row and column effects of $\greekbold{\alpha}$, this structure follows also from the theory of \citet{CookZhang2015foundation, CookZhang2015simultaneous} for matrix-valued envelope estimators based on envelopes of the form $\real{p}\oplus {\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$, where $\oplus$ denotes the direct sum. } Let $\greekbold{\eta} \in \real{u \times p}$ be an unconstrained matrix giving the coordinates of $\greekbold{\alpha}$ in terms of semi-orthogonal basis matrix $\greekbold{\phi}$, so $\greekbold{\alpha} = \greekbold{\phi} \greekbold{\eta}$, and let $(\greekbold{\phi}, \greekbold{\phi}_{0}) \in \real{k \times k}$ be an orthogonal matrix. Then the envelope version of model (\ref{cmodelS})--(\ref{cmodelD}) is a version of the partial envelope model \citep{SuCook2011}: ${\mathbf Y}_{Si} \mid {\mathbf X}= {\mathbf e}_{Si}$ and \begin{eqnarray} {\mathbf Y}_{Di}\mid({\mathbf X}_{i}, {\mathbf Y}_{Si}) & = & \greekbold{\alpha}_0 + \greekbold{\phi}\greekbold{\eta}{\mathbf X}_{i} + \greekbold{\phi}_{D|S}{\mathbf Y}_{Si} + {\mathbf e}_{D|Si},\label{envalpha2} \\ \greekbold{\Sigma}_{D|S} & = & \greekbold{\phi} \greekbold{\Omega} \greekbold{\phi}^{T} + \greekbold{\phi}_{0}\greekbold{\Omega}_{0}\greekbold{\phi}_{0}^{T},\nonumber \end{eqnarray} where $\greekbold{\Omega} \in \real{u \times u}$ and $\greekbold{\Omega}_{0} \in \real {(k-u)\times (k-u)}$ are positive definite matrices. The total real parameters in model (\ref{envalpha2}) is $N_{\mathrm{ecm}}(u) = k + pu + r(r+1)/2$, which reduces to that given previously for model (\ref{cmodelS})--(\ref{cmodelD}) when $u = k$. The subscript `ecm' is used to indicate selected key quantities that arise from enveloping ${\mathcal A}$ in constrained model (\ref{gmlm}). A basis $\widehat{\Phibf}$ for the maximum likelihood estimator $\widehat{{\mathcal E}}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$ of ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$ is constructed as \citep[Ch. 3]{SuCook2011,CookEnv2018}, \begin{eqnarray} \widehat{\Phibf} & = & \arg \min_{{\mathbf G}}\log |{\mathbf G}^{T}{\mathbf S}_{D|({\mathbf X},S)}{\mathbf G}| +\log |{\mathbf G}^{T} {\mathbf S}_{D|S}^{-1}{\mathbf G}|, \label{mlealpha} \end{eqnarray} where the minimum is computed over all semi-orthogonal matrices ${\mathbf G} \in \real{k \times u}$ with $u \leq k$. The fully maximized log likelihood is \begin{equation}\label{loglik2} \hat{L}_{u}=c - \frac{n}{2}\left\{ \log |\mathbf T_{S} | + \log |{\mathbf S}_{D|S} | +\log |\widehat{\Phibf}^{T}{\mathbf S}_{D|({\mathbf X},S)}\widehat{\Phibf}| + \log |\widehat{\Phibf}^{T} {\mathbf S}_{D|S}^{-1}\widehat{\Phibf}|\right\}. \end{equation} where $c = n\log |{\mathbf W}| -(nr/2)(1+ \log(2\pi))$ with the $\log|{\mathbf W}|$ term corresponding to the Jacobian transformation back to the scale of ${\mathbf Y}$. Once $\widehat{\greekbold{\phi}}$ is obtained we get the following envelope estimators for constrained model (\ref{gmlm}). Specifically, we have $\widehat{\greekbold{\beta}}_{\mathrm{ecm}} = {\mathbf U} \widehat{\alphabf}_{\mathrm{ecm}}, \widehat{\alphabf}_{\mathrm{ecm}}= {\mathbf P}_{ \widehat{\greekbold{\scriptstyle \Phi}}} \widehat{\alphabf}_{\mathrm{cm}} = \widehat{\Phibf} \widehat{\etabf}$, $\widehat{\alphabf}_{0} = \bar{{\mathbf Y}}_{D} - \widehat{\alphabf}_{\mathrm{ecm}}\bar{\X} - \widehat{\greekbold{\phi}}_{D|S}\bar{{\mathbf Y}}_{S},$ where $\widehat{\etabf} = \widehat{\Phibf}^{T} \widehat{\alphabf}_{\mathrm{cm}}$, and $\widehat{\greekbold{\phi}}_{D|S} = {\mathbf S}_{D,S}{\mathbf S}_{S}^{-1} - \widehat{\alphabf}_{\mathrm{ecm}}{\mathbf S}_{{\mathbf X},S}{\mathbf S}_{S}^{-1}$. We also have $\greekbold{\widehat{\Omega}} = \widehat{\Phibf}^{T}{\mathbf S}_{D|({\mathbf X},S)} \widehat{\Phibf}\text{ and }\greekbold{\widehat{\Omega}}_{0} = \widehat{\Phibf}_{0}^{T}{\mathbf S}_{D|S} \widehat{\Phibf}_{0},$ where $\greekbold{\widehat{\Sigma}}_{D|S} = \widehat{\Phibf}\greekbold{\widehat{\Omega}}\widehat{\Phibf}^{T} + \widehat{\Phibf}_{0}\greekbold{\widehat{\Omega}}_{0}\widehat{\Phibf}_{0}^{T}\text{ and }\greekbold{\widehat{\Sigma}}_{S} = \mathbf T_{S}$. The variances $\greekbold{\Sigma}_{{\mathbf W}}$ and $\greekbold{\Sigma}$ can be estimated as indicated in Section~\ref{sec:gmlm}. The asymptotic variance for $\widehat{\alphabf}_{\mathrm{ecm}}$ can be deduced from \citet[Prop. 1]{SuCook2011} recognizing that in our application ${\mathbf Y}_{S}$ is random, ${\mathbf X}$ is fixed, and the distribution of ${\mathbf Y}_{S} | {\mathbf X}$ is the same as that of the marginal of ${\mathbf Y}_{S}$: \[ \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{ecm}})) = \greekbold{\Sigma}_{{\mathbf X}}^{-1}\otimes \greekbold{\phi} \greekbold{\Omega} \greekbold{\phi}^T + (\greekbold{\eta}^T\otimes \greekbold{\phi}_0) {\mathbf M}^{\dagger}(\greekbold{\Sigma}_{{\mathbf X}}) (\greekbold{\eta} \otimes \greekbold{\phi}^T_0). \] It can be shown that $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{ecm}})) \leq \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{cm}}))$, so using an envelope in the constrained model always improves estimation asymptotically. Because ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A}) \subseteq \real{k}$, ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B}) \subseteq \real{r}$ and $k \leq r$ it is reasonable to expect that $\dim\{{\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})\} \leq \dim\{{\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})\}$, as we have estimated in many examples. However, this relationship between the envelope dimension is not guaranteed in general. The following proposition gives conditions sufficient to bound $\dim\{{\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})\}$. \begin{prop}\label{prop:dims} Assume that ${\mathbf U} = (\greekbold{\Gamma}{\mathbf G}, \greekbold{\Gamma}_{0}{\mathbf G}_{0})$, where the $\greekbold{\Gamma}$'s are as defined for model (\ref{envmlm}), and that ${\mathbf G} \in \real{u \times u_{1}}$ and ${\mathbf G}_{0} \in \real{(r-u)\times(k-u_{1})}$ both have full column rank, so $u_{1} \leq u$. Then $\dim\{{\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})\} \leq u_{1} \leq \dim\{{\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}}({\mathcal B})\}$. \end{prop} \subsection{Enveloping $\greekbold{\beta}$}\label{sec:envbeta} {Estimation of $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha}$ will be of interest in applications where prediction is important or where ${\mathbf U}$ is selected based on convenience, say, rather than on criteria that facilitate understanding and inference. For instance, if ${\mathbf X}$ serves to indicate different treatments then plots of the columns of $\greekbold{\beta}$ versus time give a visual comparisons of the treatment profiles. The choice of ${\mathcal U}$ is of course relevant to estimation of $\greekbold{\beta}$, but a basis ${\mathbf U}$ is not uniquely determined. While this flexibility has no effect on the maximum likelihood estimators of $\greekbold{\beta}$ under the constrained model (\ref{gmlm}), it does affect the envelope estimator of $\greekbold{\beta}$. This raises the issue of selecting a good basis for the purpose of estimating $\greekbold{\beta}$ via envelopes.} Consider re-parameterizing ${\mathbf U}$ as ${\mathbf U}{\mathbf V}^{-1}$ and $\greekbold{\alpha}$ as ${\mathbf V}\greekbold{\alpha}$ for some positive definite matrix ${\mathbf V} \in \real{k \times k}$, giving $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha} = ({\mathbf U}{\mathbf V}^{-1})({\mathbf V}\greekbold{\alpha})$. We could use either ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$ or ${\mathcal E}_{{\mathbf V}{\greekbold{\scriptstyle \Sigma}}_{D|S}{\mathbf V}^{T}}({\mathbf V}{\mathcal A})$ to estimate $\greekbold{\beta}$ as $\widehat{\greekbold{\beta}}_{\mathrm{ecm}} = {\mathbf U}\widehat{\alphabf}_{\mathrm{ecm}}$ or, in terms of re-parameterized coordinates ${\mathbf V}\greekbold{\alpha}$, as $\widehat{\greekbold{\beta}}_{\mathrm{ecm}, {\mathbf V}} = {\mathbf U}{\mathbf V}^{-1}\widehat{({\mathbf V}\greekbold{\alpha}})_{\mathrm{ecm}}$. In general $\widehat{\greekbold{\beta}}_{\mathrm{ecm}} \neq \widehat{\greekbold{\beta}}_{\mathrm{ecm},{\mathbf V}}$ and we cannot tell which estimator is necessarily better. In this section, we show that the envelope estimator of $\greekbold{\beta}$ is invariant under orthogonal re-parameterization, so we only need to consider diagonal re-parameterization: $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha} = ({\mathbf U}\greekbold{\Lambda}^{-1})(\greekbold{\Lambda}\greekbold{\alpha})$, where $\greekbold{\Lambda}$ is a diagonal matrix with positive diagonal elements. In growth curve or longitudinal analyses for instance, the columns of ${\mathbf U}$ may correspond to different powers of time, and then it seems natural to consider rescaling to bring the columns of ${\mathbf U}$ closer to the same scale. The following two propositions provide technical tools for demonstrating that the maximum likelihood envelope estimator of $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha}$ is simply $\widehat{\greekbold{\beta}}_{\mathrm{ecm}} = {\mathbf U} \widehat{\alphabf}_{\mathrm{ecm}}$ when ${\mathbf U}$ is semi-orthogonal, where $\widehat{\alphabf}_{\mathrm{ecm}}$ is the envelope estimator of $\alpha$ under the constrained model (\ref{gmlm}). \begin{prop}\label{lemma1} (a) Let ${\mathcal S} \subseteq \real{k}$ be a reducing subspace of the symmetric matrix ${\mathbf M} \in \real{k \times k}$, and let ${\mathbf V} \in \real{p \times k}$ be a semi-orthogonal matrix. Then ${\mathbf V}{\mathcal S}$ is a reducing subspace of ${\mathbf V} {\mathbf M} {\mathbf V}^{T}$. (b) Let ${\mathcal D} \in \real{p}$ be a reducing subspace of ${\mathbf V}{\mathbf M}{\mathbf V}^{T}$. Then ${\mathbf V}^{T}{\mathcal D}$ is a reducing subspace of ${\mathbf M}$. \end{prop} \begin{prop}\label{lemma2} Let ${\mathcal E}_{{\mathbf M}}({\mathcal S}) \subseteq \real{k}$ be the smallest reducing subspace of the symmetric matrix ${\mathbf M} \in \real{k \times k}$ that contains ${\mathcal S} \subseteq \real{k}$, and let ${\mathbf V} \in \real{p \times k}$ be a semi-orthogonal matrix. Then ${\mathbf V}{\mathcal E}_{{\mathbf M}}({\mathcal S}) $ is the smallest reducing subspace of ${\mathbf V} {\mathbf M} {\mathbf V}^{T}$ that contains ${\mathbf V}{\mathcal S}$; that is, ${\mathbf V}{\mathcal E}_{{\mathbf M}}({\mathcal S}) = {\mathcal E}_{{\mathbf V}{\mathbf M}{\mathbf V}^{T}}({\mathbf V}{\mathcal S})$. \end{prop} These two propositions show that the results of Section~\ref{sec:envalpha} can be used straightforwardly to get the envelope estimator of ${\mathbf U}\greekbold{\alpha}$ when ${\mathbf U}$ is semi-orthognonal. The standard maximum likelihood estimator of ${\mathbf U}\greekbold{\alpha}$ is just ${\mathbf U}\widehat{\alphabf}_{\mathrm{cm}}$ with asymptotic covariance matrix ${\mathbf U}\greekbold{\Sigma}_{D|S}{\mathbf U}^{T}$. In consequence, following the rationale at the beginning of Section~\ref{sec:envalpha}, we seek the maximum likelihood estimator of ${\mathcal E}_{{\mathbf U}{\greekbold{\scriptstyle \Sigma}}_{D|S}{\mathbf U}^{T}}({\mathbf U}{\mathcal A})$, which by Proposition~\ref{lemma2} is equal to ${\mathbf U}{\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$. From Proposition~\ref{lemma2}, the maximum likelihood estimator of ${\mathcal E}_{{\mathbf U}{\greekbold{\scriptstyle \Sigma}}_{D|S}{\mathbf U}^{T}}({\mathbf U}{\mathcal A})$ is ${\mathbf U}\widehat{{\mathcal E}}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$, which implies that envelope estimator of $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha}$ is $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}={\mathbf U}\widehat{\alphabf}_{\mathrm{ecm}}$ with asymptotic variance ${\mathbf U}\mathrm{avar}(\sqrt{n}\widehat{\alphabf}_{\mathrm{ecm}}){\mathbf U}^{T}$. Propositions~\ref{lemma1} and \ref{lemma2} also suggest how to proceed when re-prameterizing as $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha} = ({\mathbf U}\mathbf O^{T})(\mathbf O\greekbold{\alpha})$, where $\mathbf O$ is an orthognal matrix and ${\mathbf U}$ is not necessarily orthogonal. In that case the envelope estimator of $\mathbf O\greekbold{\alpha}$ is simply $\mathbf O\greekbold{\alpha}_{\mathrm{ecm}}$, and so the envelope estimator of $\greekbold{\beta}$ is invariant under orthogonal re-paramterization of the kind used here. Thus, to consider constrained model envelope under a linear transformation of ${\mathbf U}$, it suffices to consider a re-scaling transformation. That is, we consider $\greekbold{\beta} = {\mathbf U}\greekbold{\alpha} = ({\mathbf U}\greekbold{\Lambda}^{-1})(\greekbold{\Lambda}\greekbold{\alpha})$, where $\greekbold{\Lambda} = \mathrm{diag}(1,\lambda_{2},\ldots,\lambda_{k})$. The first diagonal element of $\greekbold{\Lambda}$ is 1 to ensure identifiability. We follow the general logic of \citet{CookSu2013scaled} in their development of a scaled version of envelope model (\ref{gmlm}). Without loss of generality, we cast our discussion of scaling in the context of conditional model (\ref{cmodelD}). We suppose that there is a scaling of the response ${\mathbf Y}_{D}$ so that the scaled response $\greekbold{\Lambda} {\mathbf Y}_{D}$ follows an envelope model in $\greekbold{\Lambda} \greekbold{\alpha}$ with the envelope ${\mathcal E}_{\greekbold{\scriptstyle \Lambda} {\greekbold{\scriptstyle \Sigma}}_{D|S}\greekbold{\scriptstyle \Lambda}}(\greekbold{\Lambda} {\mathcal A})$ having dimension $v$ and semi-orthogonal basis matrix $\greekbold{\Theta} \in \real{k \times v}$. Let $(\greekbold{\Theta}, \greekbold{\Theta}_{0})$ denote an orthogonal matrix. Then we can parameterize $\greekbold{\Lambda} \greekbold{\alpha} = \greekbold{\Theta} \greekbold{\eta}$ and $\greekbold{\Lambda} \greekbold{\Sigma}_{D|S}\greekbold{\Lambda} = \greekbold{\Theta} \greekbold{\Omega}\greekbold{\Theta}^{T}+\greekbold{\Theta}_{0}\greekbold{\Omega} \greekbold{\Theta}_{0}^{T}$. This setup can also be viewed equivalently as a rescaling ${\mathbf U} \mapsto {\mathbf U}\greekbold{\Lambda}^{-1}$ of ${\mathbf U}$, since $\greekbold{\Lambda} {\mathbf Y}_{D} = \greekbold{\Lambda} ({\mathbf U}^{T}{\mathbf U})^{-1}{\mathbf U}^{T}{\mathbf Y} = (\greekbold{\Lambda}^{-1}{\mathbf U}^{T}{\mathbf U}\greekbold{\Lambda}^{-1})^{-1}\greekbold{\Lambda}^{-1}{\mathbf U}^{T}{\mathbf Y}$. Since $\greekbold{\Lambda} {\mathbf Y}_{D}$ is unobserved, we now transform back to the original scale for analysis, leading to the marginal model ${\mathbf Y}_{Si} \mid {\mathbf X} = {\mathbf e}_{Si}$ and conditional model \begin{eqnarray} {\mathbf Y}_{Di}\mid({\mathbf X}_{i}, {\mathbf Y}_{Si}) & = & \greekbold{\alpha}_0 + \greekbold{\Lambda}^{-1}\greekbold{\Theta} \greekbold{\eta} {\mathbf X}_{i} + \greekbold{\phi}_{ D|S}{\mathbf Y}_{Si} + {\mathbf e}_{ D|Si}, \label{LEmodelD}\\ \greekbold{\Sigma}_{ D|S} &=&\greekbold{\Lambda}^{-1}( \greekbold{\Theta} \greekbold{\Omega} \greekbold{\Theta}^{T} + \greekbold{\Theta}_{0} \greekbold{\Omega}_{0} \greekbold{\Theta}_{0}^{T})\greekbold{\Lambda}^{-1} \nonumber. \end{eqnarray} The total real parameters in this scaled envelope model is $N_{\mathrm{secm}}(v) = 2k-1 + pv + r(r+1)/2$, where the subscript `secm' is used to indicate quantities arising from the scaled envelope version of the conditional model. For identifiability we typically need $N_{\mathrm{secm}}(v) \leq N_{\mathrm{cm}}$ or $p(k-v) \geq k-1$. The goal now is to estimate $\greekbold{\alpha}_{0}$, the coefficient matrix $\greekbold{\beta} = {\mathbf U} \greekbold{\Lambda}^{-1}\greekbold{\Theta} \greekbold{\eta} $ and $\greekbold{\Sigma}_{D|S}$, which requires the estimation of several constituent parameters. After maximizing the log likelihood over all parameters except $(\greekbold{\Lambda}, \greekbold{\Theta})$ we have \begin{equation}\label{mlelambda} (\widehat{\greekbold{\Lambda}}, \widehat{\greekbold{ \Theta}}) = \arg \min_{{\mathbf A}, {\mathbf G}}\log |{\mathbf G}^{T}{\mathbf A}{\mathbf S}_{D|({\mathbf X},S)}{\mathbf A}{\mathbf G}| +\log |{\mathbf G}^{T}{\mathbf A}^{-1} {\mathbf S}_{D|S}^{-1}{\mathbf A}^{-1}{\mathbf G}|, \end{equation} where the minimum is computed over all semi-orthogonal matrices ${\mathbf G} \in \real{k \times v}$ and diagonal matrices ${\mathbf A} = \mathrm{diag}(1,a_{2},\ldots,a_{k})$. Aside from the inner product matrices ${\mathbf S}_{D|({\mathbf X},S)}$ and ${\mathbf S}_{D \mid S}^{-1} $ this is the same as the objective function that \citet{CookSu2013scaled} derived for response scaling prior to using model (\ref{envmlm}), which allowed us to adapt their optimization algorithm to handle (\ref{mlelambda}). Having determined the maximum likelihood estimators $\widehat{\greekbold{\Lambda}}$ and $\widehat{\greekbold{ \Theta}}$, the remaining parameter estimators are $\widehat{\greekbold{\beta}}_{\mathrm{secm}} = {\mathbf U} \widehat{\greekbold{\Lambda}}^{-1} {\mathbf P}_{\widehat{\greekbold{\scriptstyle \Theta}}}\widehat{\greekbold{\Lambda}} \widehat{\alphabf}_{\mathrm{cm}} $, $\widehat{\alphabf} = \widehat{\greekbold{\Lambda}}^{-1}{\mathbf P}_{\widehat{\greekbold{\scriptstyle \Theta}}}\widehat{\greekbold{\Lambda}} \widehat{\alphabf}_{\mathrm{cm}}$, $\widehat{\alphabf}_{0} = \bar{{\mathbf Y}}_{D} - \widehat{\greekbold{\beta}}_{\mathrm{secm}}\bar{\X} - \widehat{\greekbold{\phi}}_{ D|S} \bar{{\mathbf Y}}_{S}$, where $\widehat{\etabf} = \widehat{\greekbold{ \Theta}}^T \widehat{\greekbold{\Lambda}} \widehat{\alphabf}_{\mathrm{cm}}$, $\widehat{\greekbold{\phi}}_{D|S} = ({\mathbf S}_{D,S} - \widehat{\alphabf}{\mathbf S}_{{\mathbf X},S} ) {\mathbf S}_S^{-1}$. We also have $\greekbold{\widehat{\Omega}} = \widehat{\greekbold{ \Theta}}^{T}\widehat{\greekbold{\Lambda}} {\mathbf S}_{ D|({\mathbf X},S)} \widehat{\greekbold{\Lambda}} \widehat{\greekbold{ \Theta}} $, $\greekbold{\widehat{\Omega}}_{0} = \widehat{\greekbold{ \Theta}}_{0}^{T} \widehat{\greekbold{\Lambda}} {\mathbf S}_{D|S}\widehat{\greekbold{\Lambda}} \widehat{\greekbold{ \Theta}}_{0} $, where $\greekbold{\widehat{\Sigma}}_{D|S} = \widehat{\greekbold{\Lambda}}^{-1}( \widehat{\greekbold{ \Theta}} \greekbold{\widehat{\Omega}} \widehat{\greekbold{ \Theta}}^{T} + \widehat{\greekbold{ \Theta}}_{0} \greekbold{\widehat{\Omega}}_{0}\widehat{\greekbold{ \Theta}}_{0}^{T}) \widehat{\greekbold{\Lambda}}^{-1}$, $\greekbold{\widehat{\Sigma}}_{S} = \mathbf T_{S}$. The variances $\greekbold{\Sigma}_{{\mathbf W}}$ and $\greekbold{\Sigma}$ can be estimated as indicated in Section~\ref{sec:gmlm}. This representation of the scaled envelope estimator $\widehat{\greekbold{\beta}}_{\mathrm{secm}} $ shows the construction process. First the direct-information response is transformed to $\widehat{\greekbold{\Lambda}} {\mathbf Y}_{D}$. The constrained estimator $\widehat{\greekbold{\Lambda}} \widehat{\alphabf}_{\mathrm{cm}}$ and the envelope estimator $ {\mathbf P}_{\widehat{\greekbold{\scriptstyle \Theta}}} \widehat{\greekbold{\Lambda}} \widehat{\alphabf}_{\mathrm{cm}}$ are then determined in the transformed scale. Next, the estimator is transformed back to the original scale by multiplying by $\widehat{\greekbold{\Lambda}}^{-1}$ to get $\widehat{\greekbold{\Lambda}}^{-1} {\mathbf P}_{\widehat{\greekbold{\scriptstyle \Theta}}}\widehat{\greekbold{\Lambda}} \widehat{\alphabf}_{\mathrm{cm}}$, which is the estimator of $\greekbold{\alpha}$ in the original scale. Finally, the estimator in the original scale is multiplied by ${\mathbf U}$ to give the scaled envelope estimator of $\greekbold{\beta}$. In effect, $\widehat{\greekbold{\Lambda}}$ is a similarity transformation to represent $ {\mathbf P}_{\widehat{\greekbold{\scriptstyle \Theta}}}$ in the original coordinate system as $\widehat{\greekbold{\Lambda}}^{-1} {\mathbf P}_{\widehat{\greekbold{\scriptstyle \Theta}}}\widehat{\greekbold{\Lambda}} $. The fully maximized log likelihood is \begin{equation}\label{loglik3} \hat{L}_{u}= c - \frac{n}{2}\left\{\log |\mathbf T_{S} | + \log |{\mathbf S}_{D|S} | + \log |\widehat{\greekbold{ \Theta}}^{T}\widehat{\greekbold{\Lambda}}{\mathbf S}_{D|({\mathbf X},S)}\widehat{\greekbold{\Lambda}}\widehat{\greekbold{ \Theta}}| + \log |\widehat{\greekbold{ \Theta}}^{T} \widehat{\greekbold{\Lambda}}^{-1}{\mathbf S}_{D|S}^{-1}\widehat{\greekbold{\Lambda}}^{-1}\widehat{\greekbold{ \Theta}}|\right\}, \end{equation} where $c = n\log|{\mathbf W}| - (nr/2)(1+ \log(2\pi)) $. To describe the asymptotic variance of $\widehat{\greekbold{\beta}}_{\mathrm{secm}}$, let ${\mathbf V}_{\mathrm{secm}} $ denote the upper $p k \times pk$ diagonal block of the asymptotic variance ${\mathbf V}$ given by Proposition 2 from \citet{CookSu2013scaled} with $\greekbold{\Sigma}$ replaced by $\greekbold{\Sigma}_{D\mid S}$, $\greekbold{\Gamma}$ by $\greekbold{\Theta}$ and $\greekbold{\Gamma}_0$ by $\greekbold{\Theta}_{0}$ and $\greekbold{\Lambda}$ with $\greekbold{\Lambda}^{-1}$. Additionally, $\greekbold{\Omega}$ and $\greekbold{\Omega}_0$ in the Cook-Su notation are the same as the corresponding quantities in the decomposition of $\greekbold{\Sigma}_{D \mid S}$ for model (\ref{LEmodelD}) . Then $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\greekbold{\beta}}_{\mathrm{secm}})) = (\mathbf I_{p} \otimes {\mathbf U}) {\mathbf V}_{\mathrm{secm}} (\mathbf I_{p}\otimes {\mathbf U}^T)$. \subsection{ Testing }\label{sec:testing} {Using the envelope version (\ref{envalpha2}) of constrained model (\ref{gmlm}), we address in Section \ref{test11} the adequacy of ${\mathbf U}$ through a test on the rows of $\greekbold{\alpha}$ and in Section \ref{sec:colcontrast} we present a test of the column of $\greekbold{\alpha}$ to asses the importance of the predictors. } \subsubsection{Evaluating the choice of ${\mathbf U}$ by testing rows of $\greekbold{\alpha}$}\label{test11} Having selected the dimension $u$ of the envelope, we may also want to test if ${\mathbf U}$ is over specified. This can be achieved by testing if individual rows of $\greekbold{\alpha}$ are equal to $0$. For instance, if $\mathbf U^{T}(t) = (1,t,t^{2},t^{3})$ we might wish to test if the cubic term is necessary by testing if the last row of $\greekbold{\alpha}$ is $0$. Consider a test that the last $k_{2} \leq k - u$ rows of the $\greekbold{\alpha} = \greekbold{\phi} \greekbold{\eta}$ in model (\ref{envalpha2}) all equal $0$. Following \citet{Su2016} and \citet{Zhu2019}, this hypothesis can be tested by conformably partitioning in (\ref{envalpha2}) $\greekbold{\phi} = (\greekbold{\phi}_{1}^{T}, \greekbold{\phi}_{2}^{T})^{T}$ with $\greekbold{\phi}_{j} \in \real{k_{j} \times u}, \;j=1,2$, and then testing if $\greekbold{\phi}_{2} = 0$, so under the null hypothesis $\greekbold{\alpha} = ((\greekbold{\phi}_{1}\greekbold{\eta})^{T}, 0)^{T}$. The restriction $k_{2} \leq k-u$ on the number of rows tested arises because the rank of $\greekbold{\phi}_{1}$ must equal $u$ under both the null and alternative hypothesis. If $k_{2} = k - u$ then without loss of generality we can take $\greekbold{\phi}_{1} = \mathbf I_{u}$. When $k_{2} < k-u$, the maximum likelihood estimator of $\greekbold{\phi}_1$ can be found by following the steps leading to (\ref{mlealpha}) and then introducing the restriction that ${\mathbf G} = ({\mathbf G}_{1}^{T}, 0)^{T}$. Partition ${\mathbf Y}_{D} = ({\mathbf Y}_{D_{1}}^{T}, {\mathbf Y}_{D_{2}}^{T})^{T}$ to conform to the partitioning of $\greekbold{\phi}$. Then \begin{equation}\label{likpart40} \widehat{\Phibf} _1= \arg \min_{{\mathbf G}_{1}} \log |{\mathbf G}_{1}^{T}{\mathbf S}_{D_{1}|({\mathbf X},S)} {\mathbf G}_{1}| +\log |{\mathbf G}_{1}^{T} {\mathbf S}_{D_{1}|(D_{2},S)}^{-1} {\mathbf G}_{1}|, \end{equation} where the minimum is computed over all semi-orthogonal matrices ${\mathbf G}_{1}\in \real{k_{1} \times u}$, ${\mathbf S}_{D_{1}|(D_{2},S)} $ is the sample residual covariance matrix of the regression of ${\mathbf Y}_{D_{1}} $ on $({\mathbf Y}_{D_{2}}, {\mathbf Y}_{S})$ with an intercept, and ${\mathbf S}_{D_{1}|({\mathbf X},S)}$ is the sample residual covariance matrix of the regression of ${\mathbf Y}_{D_{1}} $ on $ ({\mathbf X},{\mathbf Y}_{S})$ with an intercept. When $k_{2} = k-u$, we must have $\greekbold{\phi}_{1} = \mathbf I_{u}$ and no estimate of $\greekbold{\phi}_{1}$ is required. The likelihood ratio test statistic is computed as twice the difference between the log likelihood under the null hypothesis, \begin{equation}\label{loglik4} \hat{L}_{u,k_{2}}= c - \frac{n}{2}\left\{\log |\mathbf T_{S} | + \log |{\mathbf S}_{D_{2}|S}| + \log |{\mathbf S}_{D_{1}|(D_{2}, S})| +\log |\widehat{\Phibf}_{1}^{T}{\mathbf S}_{D_{1}|({\mathbf X},S)}\widehat{\Phibf}_{1}| + \log |\widehat{\Phibf}_{1}^{T} {\mathbf S}_{D_{1}|(D_{2},S)}^{-1}\widehat{\Phibf}_{1}|\right\}, \end{equation} and the fully maximized log likelihood (\ref{loglik2}). Here $c = n \log |{\mathbf W}|-(nr/2)(1+ \log(2\pi))$. Under the null hypothesis $\greekbold{\phi}_{2} = 0$ this difference is asymptotically distributed as a chi-squared random variable with $uk_{2}$ degrees of freedom. \subsubsection{Evaluating predictors by testing column contrast of $\greekbold{\alpha}$}\label{sec:colcontrast} In some studies we may wish to estimate and infer about column contrasts $\greekbold{\alpha}_{1} = \greekbold{\alpha} {\mathbf c}_{1}$, where ${\mathbf c}_{1} \in \real{p \times p_{1}}$ is a user-selected matrix of known constants with $p_{1} < p$. For instance, when ${\mathbf X}$ is a treatment indicator, testing column contrasts allows testing equality of treatment means. Let ${\mathcal A}_{1} = \mathrm{span}(\greekbold{\alpha}_{1})$. We could use the conditional model (\ref{gmlm}), basing estimation and inference on $ \widehat{\alphabf}_{\mathrm{cm}} {\mathbf c}_{1}$. Or we could proceed following the envelope analysis of Section~\ref{sec:envalpha} and use the estimator $\widehat{\alphabf}_{\mathrm{ecm}} {\mathbf c}_{1}$ with asymptotic variance $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{ecm}}{\mathbf c}_{1}))$ as a basis for inference. {The latter estimator is preferable since $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{ecm}}{\mathbf c}_{1})) \leq \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{\mathrm{cm}}{\mathbf c}_{1}))$. But there is a potential to gain additional asymptotic efficiency by using envelope methods to estimate $\greekbold{\alpha}_{1}$ directly.} To develope an envelope estimator of $\greekbold{\alpha}_{1}$, we first parameterize model (\ref{gmlm}) so $\greekbold{\alpha}_{1}$ appears explicitly. Select a matrix ${\mathbf c}_{2} \in \real{p \times p_{2}}$, $p_{1} + p_{2} = p$, so that ${\mathbf C} = ({\mathbf c}_{1}, {\mathbf c}_{2}) \in \real{ p \times p}$ is non-singular and define new predictors and parameters as ${\mathbf Z} = {\mathbf C}^{-1}{\mathbf X}$ and $\greekbold{\alpha}_{2} = \greekbold{\alpha}{\mathbf c}_{2}$. Then we have \[ {\mathbf U}\greekbold{\alpha} {\mathbf X} = {\mathbf U}\greekbold{\alpha}{\mathbf C}\C^{-1}{\mathbf X} ={\mathbf U}(\greekbold{\alpha}_{1},\greekbold{\alpha}_{2}){\mathbf Z} = {\mathbf U}\greekbold{\alpha}_{1}{\mathbf Z}_{1} + {\mathbf U}\greekbold{\alpha}_{2}{\mathbf Z}_{2}, \] where the row partitioning of ${\mathbf Z} = ({\mathbf Z}_{1}^{T}, {\mathbf Z}_{2}^{T})^{T}$ conforms to the column partitioning of ${\mathbf C}$. Following the logic used previously in this section, we obtain the marginal and conditional models: ${\mathbf Y}_{Si} \mid {\mathbf Z} = {\mathbf e}_{Si}$ and \begin{eqnarray} {\mathbf Y}_{Di}\mid({\mathbf X}_{i}, {\mathbf Y}_{Si}) & = & \greekbold{\alpha}_0 + \greekbold{\alpha}_{1} {\mathbf Z}_{1i} + \greekbold{\alpha}_{2} {\mathbf Z}_{2i} + \greekbold{\phi}_{D|S}{\mathbf Y}_{Si} + {\mathbf e}_{D|Si},\nonumber \\ & = & \greekbold{\alpha}_0 + \greekbold{\alpha}_{1} {\mathbf Z}_{1i} + \greekbold{\omega} \mathbf K_{i} + {\mathbf e}_{D|Si}, \label{pcmodelD} \end{eqnarray} where $\greekbold{\omega} = (\greekbold{\alpha}_{2}, \greekbold{\phi}_{D|S})$, $\mathbf K_{i} = ({\mathbf Z}_{2i}^{T},{\mathbf Y}_{Si}^{T})^{T}$ and the other terms are as defined previously. This model is of the same form as (\ref{cmodelD}) and so a semi-orthogonal basis $\greekbold{\phi} \in \real{k \times u_{1}}$ for ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A}_{1})$ with dimension $u_{1} \leq k$ can be incorporated into model (\ref{pcmodelD}) as follows. ${\mathbf Y}_{Si} \mid {\mathbf Z} = {\mathbf e}_{Si}$ and \begin{eqnarray} {\mathbf Y}_{Di}\mid({\mathbf X}_{i}, {\mathbf Y}_{Si}) & = & \greekbold{\alpha}_0 + \greekbold{\phi}\greekbold{\eta} {\mathbf Z}_{1i} + \greekbold{\omega} \mathbf K_{i} + {\mathbf e}_{D|Si}, \label{pcmodelD1}\\ \greekbold{\Sigma}_{D|S} & = & \greekbold{\phi} \greekbold{\Omega} \greekbold{\phi} + \greekbold{\phi}_{0} \greekbold{\Omega}_{0} \greekbold{\phi}_{0}, \nonumber \end{eqnarray} where $\greekbold{\Sigma}_{S}$ and $\greekbold{\Sigma}_{D|S}$ are as defined in Section~\ref{sec:gmlm}. The number of free real parameters in this model is $k + u_{1}p_{1} + p_{2}k + r(r+1)/2$. The envelope estimators can now be obtained straightforwardly by following the steps in Section~\ref{sec:envalpha}, and the asymptotic variance of envelope estimator $\widehat{\alphabf}_{1} = {\mathbf P}_{\widehat{\greekbold{\scriptstyle{\Phi}}}}\widehat{\alphabf}_{\mathrm{cm}}{\mathbf c}_{1}$ of $\greekbold{\alpha}_{1}$ is \[ \mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{1})) = \greekbold{\Sigma}_{{\mathbf Z}_{1}|{\mathbf Z}_{2}}^{-1}\otimes \greekbold{\phi} \greekbold{\Omega} \greekbold{\phi}^T + (\greekbold{\eta}^T\otimes \greekbold{\phi}_0) {\mathbf M}^{\dagger}( \greekbold{\Sigma}_{{\mathbf Z}_{1}|{\mathbf Z}_{2}} ) (\greekbold{\eta} \otimes \greekbold{\phi}^T_0), \] where $\greekbold{\Sigma}_{{\mathbf Z}_{1}|{\mathbf Z}_{2}} = \lim_{n\rightarrow \infty} {\mathbf S}_{{\mathbf Z}_{1}|{\mathbf Z}_{2}}$. Looking ahead and adapting the discussion of Section~\ref{sec:Balpha}, the envelope estimator of ${\mathbf U}\greekbold{\alpha}_{1}$ is simply ${\mathbf U}\widehat{\alphabf}_{1}$ with asymptotic variance \begin{equation}\label{varUalpha1} \mathrm{avar}(\sqrt{n}\;\mathrm{vec}({\mathbf U}\widehat{\alphabf}_{1})) = (\mathbf I_{p_{1}}\otimes {\mathbf U})\mathrm{avar}(\sqrt{n}\;\mathrm{vec}(\widehat{\alphabf}_{1}))(\mathbf I_{p_{1}}\otimes {\mathbf U}^{T}), \end{equation} where $\mathrm{avar}(\sqrt{n}\mathrm{vec}(\widehat{\alphabf}_{1}))$ is as given previously. These results can be adapted to obtain an envelope estimator of the average profile $E({\mathbf Y}|{\mathbf X}_{\mathrm{new}}) = {\mathbf U}\greekbold{\alpha}_{0} + {\mathbf U}\greekbold{\alpha}{\mathbf X}_{\mathrm{new}}$ at a new value ${\mathbf X}_{\mathrm{new}}$ of ${\mathbf X}$ by setting ${\mathbf c}_{1} = {\mathbf X}_{\mathrm{new}}$, so $\greekbold{\alpha}_{1} = \greekbold{\alpha} {\mathbf X}_{\mathrm{new}}$. Assuming without loss of generality that ${\mathbf X}$ and ${\mathbf Y}_{S}$ in (\ref{pcmodelD1}) are centered, it follows that $\widehat{\alphabf}_{0} = \bar{{\mathbf Y}}_{D}$ and thus $\widehat{{\mathbf U}\greekbold{\alpha}_{0}} = {\mathbf P}_{{\mathbf U}}\bar{{\mathbf Y}}$. The estimator of the average profile is then $ \widehat{E}({\mathbf Y}|{\mathbf X}_{\mathrm{new}}) = {\mathbf P}_{{\mathbf U}}\bar{{\mathbf Y}} + {\mathbf U} \widehat{\alphabf}_{1} = {\mathbf P}_{{\mathbf U}}\bar{{\mathbf Y}} + {\mathbf U} {\mathbf P}_{\widehat{\greekbold{\scriptstyle{\Phi}}}}\widehat{\alphabf}_{\mathrm{cm}}{\mathbf X}_{\mathrm{new}}. $ Since $\bar{{\mathbf Y}}$ and $\widehat{\alphabf}_{1} $ are asymptotically independent, we get the asymptotic variance $ \mathrm{avar}(\sqrt{n}\;\widehat{E}({\mathbf Y}|{\mathbf X}_{\mathrm{new}}) ) = {\mathbf P}_{{\mathbf U}}\greekbold{\Sigma} {\mathbf P}_{{\mathbf U}} +\mathrm{avar}(\sqrt{n} \;\mathrm{vec}({\mathbf U}\widehat{\alphabf}_{1})), $ where the second addend on the right hand side is given by (\ref{varUalpha1}). This envelope estimator has the potential to be substantially less variable than plugin estimators mentioned at the beginning of Section~\ref{sec:colcontrast}. A potential disadvantage is that a new envelope estimator is required for each profile determined by the value of ${\mathbf X}_{\mathrm{new}}$. { \subsection{Estimation under model (\ref{igmlm})}\label{sec:estalpha1.3} The modifications necessary to adapt the results in Sections~\ref{sec:envalpha}--\ref{sec:testing} for model (\ref{igmlm}) all stem from the new model for the subordinate response, ${\mathbf Y}_{S} = {\mathbf W}_{2}^{T}\greekbold{\beta}_{0} + {\mathbf e}_{S}$, and the new definitions of $ \greekbold{\alpha}_{0} = {\mathbf W}_{1}^{T}\greekbold{\beta}_{0}-\greekbold{\phi}_{D|S}{\mathbf W}_{2}^{T}\greekbold{\beta}_{0}$ for models (\ref{envalpha2}), (\ref{LEmodelD}) and (\ref{pcmodelD1}). This implies that $\mathbf T_{S}$ is replaced by ${\mathbf S}_{S}$ throughout, including log likelihoods (\ref{loglik2}), (\ref{loglik3}) and (\ref{loglik4}), and that the estimator of $\greekbold{\beta}_{0}$ can be constructed as indicated near the end of Section~\ref{sec:gmlm}. There is no change in the objective functions (\ref{mlealpha}), (\ref{mlelambda}) and (\ref{likpart40}), and consequently no change in the envelope estimators of $\greekbold{\alpha}$ and $\greekbold{\beta}$ or their asymptotic variances.} \section{Simulations}\label{simulations} \subsection{Efficiency Comparison between envelope and constrained estimator}\label{subsec: sim_eff} We first evaluate the efficiency of the envelope estimator $\widehat\greekbold{\beta}_{\mathrm{em}}$ and the constrained estimator $\widehat\greekbold{\beta}_{\mathrm{cm}}$ using simulations in two scenarios. We also include the unconstrained estimator $\widehat\greekbold{\beta}_{\mathrm{um}}$ as a reference. In Scenario 1, the eigenvalue corresponds to the material part is small relative to the immaterial part and the dimension of ${\mathbf U}$ is large; thus the envelope estimator is expected to have substantial efficiency gain. In Scenario 2, the eigenvalue of the immaterial part is small relative to that of the material part and the envelope estimator is not expected to have substantial efficiency gain. The simulation for Scenario 1 is carried out in the following steps. \begin{enumerate}[Step 1.] {\color{black}{ \item We first generated a sample of size $n=5000$. For each individual $i$, we generated $p=8$ predictors ${\mathbf X}_i$ from a multivariate normal distribution with mean 0 and variance ${\mathbf C}\C^T$, where each element in ${\mathbf C}$ is identically and independently distributed with a standard normal distribution $N(0,1)$. {\color{blue} Comment: The editor said that ``The simulations should included cases where predictors are subject to substantial dependency.'' I'm not sure this qualifies as substantial dependency since the expected covariance is 0. Perhaps mentioning the distribution of the predictor correlations in a typical simulation would do. Alternatively, change the generation scheme to be compound symmetric so the correlations can be specified easily, say .8. Or perhaps one with a small correlation say .5 and one with a larger correlation say .85} \item Set $r=20$, $u=6$, $q=15$, $q_1=4$ and $q_2=q-q_1$. Set $\greekbold{\Omega}=\text{bdiag}(0.5\mathbf I_{u-q_1},1.5\mathbf I_{q_1})$ and $\greekbold{\Omega}_0=50\mathbf I_{r-u}$. Set $(\greekbold{\Gamma},\greekbold{\Gamma}_0)=\mathbf O$ and let $\greekbold{\Sigma} = \greekbold{\Gamma} \greekbold{\Omega} \greekbold{\Gamma}^T + \greekbold{\Gamma}_0 \greekbold{\Omega}_0 \greekbold{\Gamma}_0^T$, where $\mathbf O$ is an orthogonal matrix obtained by singular value decomposition of a randomly generated matrix. Set $\greekbold{\eta}=\mathbf K_1\mathbf K_2$, where $\mathbf K_1\in\mathbb{R}^{u\times q_1}$, $\mathbf K_2\in\mathbb{R}^{ q_1\times p}$, each element in $\mathbf K_1$ and $\mathbf K_2$ is identically and independently generated from $N(0,1)$. Set $\greekbold{\beta}=\greekbold{\Gamma}\greekbold{\eta}$. Let ${\mathbf U}=(\greekbold{\Gamma},\greekbold{\Gamma}_0)\greekbold{\phi}$, where $\greekbold{\phi}=\text{bdiag}\{{\mathbf M}^{{\mathbf U}},{\mathbf M}_0^{{\mathbf U}}\}$, ${\mathbf M}^{{\mathbf U}}=\mathbf K_1$ and ${\mathbf M}_0^{{\mathbf U}}=(\mathbf I_{q_2},\mathbf{0}_{q_2\times (r-u-q_2)})^T$. }} \item For each individual $i$, generate ${\mathbf Y}_i$ identically and independently from normal distribution $N(\greekbold{\beta}{\mathbf X}_i,\greekbold{\Sigma})$. \item Calculate $\widehat\greekbold{\beta}_{\mathrm{um}}$, $\widehat\greekbold{\beta}_{\mathrm{em}}$ and $\widehat\greekbold{\beta}_{\mathrm{cm}}$, where ${\mathbf U}$ is correctly specified when calculating $\widehat\greekbold{\beta}_{\mathrm{cm}}$. \item Repeat Steps 3--4 100 times. \end{enumerate} \subsubsection{Scenario 1} From the choice of $\greekbold{\eta}$ in Step 2, we have $\text{colrank}(\greekbold{\eta})=q_1$, and $\text{span}(\greekbold{\beta})$ is strictly contained in both $\text{span}(\greekbold{\Gamma})$ and $\text{span}({\mathbf U})$ since the dimension of $\text{span}(\greekbold{\beta})$ is $q_1=4$ which is smaller than $\min(u,q)=6$. Specifically, we also have $\text{span}(\greekbold{\beta})=\text{span}(\greekbold{\Gamma}^{{\mathbf U}})=\text{span}(\greekbold{\Gamma})\cap \text{span}({\mathbf U})$. Its easy to see that $\greekbold{\alpha}=(\mathbf K_2^T,0_{p\times q_2})^T$ in this example. Among the 100 simulations, the envelope dimension was always correctly estimated as 6 using BIC. The empirical result of $\widehat\greekbold{\beta}_{\mathrm{um}}-\greekbold{\beta}$, $\widehat\greekbold{\beta}_{\mathrm{em}}-\greekbold{\beta}$ and $\widehat\greekbold{\beta}_{\mathrm{cm}}-\greekbold{\beta}$ are shown in Figure \ref{fig: sim_eff_env_win}, where all the elements of $\greekbold{\beta}$ are plotted in the same boxplot as if they are from the same population and the outliers are suppressed for a cleaner representation. Since ${\mathbf U}$ is correctly specified, $\widehat\greekbold{\beta}_{\mathrm{cm}}$ is an asymptotically unbiased estimator as are $\widehat\greekbold{\beta}_{\mathrm{um}}$ and $\widehat\greekbold{\beta}_{\mathrm{em}}$. Hence, the boxplot of three estimators are all centered at 0. In Step 2, the larger eigenvalues of $\greekbold{\Sigma}$ are contained in $\greekbold{\Omega}_0$ rather than $\greekbold{\Omega}$. That is, the variability of the immaterial part is bigger than that of the material part. Additionally, the column space of ${\mathbf U}$ is very conservatively specified as $q=15$, which is much bigger than the dimension of $q_1=\text{colrank}(\greekbold{\beta})=4$ and the $\text{span}({\mathbf U})$ contains 11 eigenvectors corresponds to large eigenvalues (i.e., 50 in this simulation). Hence, this scenario is in favor of the envelope estimator in terms of the efficiency. Indeed, the envelope estimator is the most efficient estimator among the three estimators, while $\widehat\greekbold{\beta}_{\mathrm{cm}}$ is also more efficient than the {\color{blue}unconstrained} estimator $\widehat\greekbold{\beta}_{\mathrm{um}}$. {\color{black}{The average estimated asymptotic variances were close to the theoretical asymptotic variances calculated using the true parameter values for all three estimators. The mean of the theoretical asymptotic variances across all the elements in three estimators are 127.22 for $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{um}}$ and 99.75 for $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{cm}}$ but is only 1.70 for $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{em}}$. That is, in this setting, the envelope estimator is about 58 times more efficient that the {\color{blue} constrained estimator and 75 times more efficient than the unconstrained estimator.} }} \begin{figure}[!h] \caption{Box plot of $\widehat\greekbold{\beta}_{\mathrm{um}}-\greekbold{\beta}$, $\widehat\greekbold{\beta}_{\mathrm{em}}-\greekbold{\beta}$ and $\widehat\greekbold{\beta}_{\mathrm{cm}}-\greekbold{\beta}$ in two scenarios in 100 simulations.} \centering \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\textwidth]{June24th2020_boxplot_env_win_u6_q1_4_sim100.pdf} \caption{Scenario 1} \label{fig: sim_eff_env_win} \end{subfigure}\hspace{10mm} \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\textwidth]{June24th2020_boxplot_tilde_beta_win_u6_q1_4_sim100.pdf} \caption{Scenario 2} \label{fig: sim_eff_tilde_beta_win} \end{subfigure} \label{fig: sim_eff} \end{figure} \subsubsection{Scenario 2} To carry out simulations in Scenario 2, we modify Step 2 above as $q=6$, $\greekbold{\Omega}=\text{bdiag}(50\mathbf I_{u-q_1},0.5\mathbf I_{q_1})$ and $\greekbold{\Omega}_0=0.5\mathbf I_{r-u}$. In this scenario, the larger eigenvalues of $\greekbold{\Sigma}$ are associated with $\greekbold{\Omega}$, and the dimension of ${\mathbf U}$ can be seen to be just 2 dimensional larger than the true dimension of $\greekbold{\beta}$. Hence, the envelope method is at a disadvantage in terms of the efficiency as compared with $\widehat\greekbold{\beta}_{\mathrm{cm}}$. In the 100 simulations, the envelope dimension is again always correctly estimated as 6. The empirical biases of the envelope and $\widehat\greekbold{\beta}_{\mathrm{cm}}$ are shown in Figure \ref{fig: sim_eff_tilde_beta_win}. Again, all three estimators are centered around 0, indicating the asymptotic unbiasedness. As expected, the estimator $\widehat\greekbold{\beta}_{\mathrm{cm}}$ is the most efficient among the three estimators, while the envelope estimator $\widehat\greekbold{\beta}_{\mathrm{em}}$ is still more efficient than the {\color{blue} unconstrained} estimator $\widehat\greekbold{\beta}_{\mathrm{um}}$. {\color{black}{The average estimated asymptotic variance of the three estimators were all close to their theoretical values. The average empirical variances of all the elements in three estimators are 20.68 for $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{um}}$, 19.53 for $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{em}}$ and 4.87 for $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{cm}}$. That is, in this setting, the estimator using a correctly specified ${\mathbf U}$ is on average about 4 times of more efficient that the {\color{blue} unconstrained} estimator and the envelope estimator.}} {\color{black}{\subsection{Potential Bias of the constrained estimator}\label{sec: sim_bias} We conducted a small simulation, generating data from envelope model (\ref{envmlm}), to further illustrate potential bias effects. The sample size and parameters are chosen the same as in Section \ref{subsec: sim_eff}. The sample size was taken to be large so the bias effects might be clear. It is known that the efficiency gains from fitting (\ref{envmlm}) will be much greater in Scenario 1 than in Scenario 2. \begin{figure}[ht!] \centering \includegraphics[scale=.4]{June24th2020_MSE_env_win_u6_q1_4_sim100.pdf} \caption{Illustration of potential bias in the constrained estimator (\ref{igmlm}) under Scenario 1, where $k = \dim({\mathcal U})$, ${\mathcal U} = \mathrm{span}\{(\greekbold{\Gamma}, \greekbold{\Gamma}_{0}) (\mathbf I_{k}, 0)^{T}\}$ and MSE denotes the average element-wise squared error for the indicated estimators. The lines for $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ are indistinguishable.} \label{fig:bias} \end{figure} Response vectors were then generated according to model (\ref{envmlm}) using normal errors and the resulting data fitted to obtain the envelope estimator $\widehat{\greekbold{\beta}}_{\mathrm{em}}$. We used the same data to construct the unconstrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ and the constrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ with different selections for ${\mathbf U} = (\greekbold{\Gamma}, \greekbold{\Gamma}_{0}) {\mathbf A}_{k}$ where ${\mathbf A}_{k} = (\mathbf I_{k}, 0)^{T}$, $k=1,\ldots,r$. For $k < u$, ${\mathcal B} \not \subseteq {\mathcal U}$ and so $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ is biased. But for $k\geq u$, ${\mathcal B} \subseteq {\mathcal U}$ and there is no bias in $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$. We summarized the bias by computing the mean squared error over all elements $\beta_{ij}$ of $\greekbold{\beta}$: $\mathrm{MSE} = (rp)^{-1} \sum_{i=1}^{r}\sum_{j=1}^{p}(\widehat{\greekbold{\beta}}_{(\cdot),ij} - \beta_{ij})^{2}$ for the three estimators $\widehat{\greekbold{\beta}}_{\mathrm{um}}$, $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{em}}$. Shown in Figure~\ref{fig:bias} are plots of the MSE averaged over 100 replications of this scheme for Scenario 1, each replication starting with the generation of the response vectors. The constant MSE for $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ was $3e^{-4}$ and that for unconstrained model was about $8$ times greater at $2.5e^{-3}$. The MSE for the constrained estimator decreased monotonically from its maximum value $1.74$ at $k=1$ to its minimum value, which was around $3e^{-4}$, at $k=u=6$ and then increased monotonically to $0.03$ at $k=20$. The corresponding plot for Scenario 2 is graphically indistinguishable and so is not presented. It seems clear that the bias in the constrained estimator can be substantial until we achieve ${\mathcal B} \subseteq {\mathcal U}$, at which point the three estimators become indistinguishable on the scale of Figure~\ref{fig:bias}. }} {\color{black}{ {Assuming that ${\mathbf U}$ is correctly specified, we imposed the envelope structure on $\greekbold{\alpha}$ and referred to the new envelope estimator as $\widehat\greekbold{\beta}_{\mathrm{ecm}}$. We carred out the simulations similar to those in Section \ref{subsec: sim_eff}, replacing Steps 2--4 with the following.} \begin{enumerate}[Step 2*.] \item[Step 2*.] Set $r=20$, $u^{*}=3$, $q=15$. Set $\greekbold{\Omega}^{*}=0.5\mathbf I_{u^{*}}$ and $\greekbold{\Omega}_0=50\mathbf I_{q-u^{*}}$. Set $(\greekbold{\Gamma}^{*},\greekbold{\Gamma}^{*}_0)=\mathbf I$ and let $\mathrm{var}(\greekbold{\varepsilon}_{\mathbf D|{\mathbf S}})=\greekbold{\Sigma}_{\mathbf D|{\mathbf S}} = \greekbold{\Gamma}^{*} \greekbold{\Omega} ^{*}{\greekbold{\Gamma}^{*}}^T + \greekbold{\Gamma}_0^{*} \greekbold{\Omega}_0^{*} {\greekbold{\Gamma}_0^{*}}^T$. Generate $\greekbold{\eta}^{*}\in\real{u^{*}\times p}$ and ${\mathbf U}$, where each element in $\greekbold{\eta}^{*}$ and ${\mathbf U}$ is identically and independently generated from $N(0,1)$. Set $\greekbold{\alpha}^{*}=\greekbold{\Gamma}^{*}\greekbold{\eta}^{*}$ and $\greekbold{\beta}^{*}={\mathbf U}\greekbold{\alpha}^{*}$. \item[Step 3*.] For each individual $i$, generate ${\mathbf Y}_{{\mathbf S} i}$ identically and independently from normal distribution $N(0,\mathbf I_{r-q})$. Generate $\greekbold{\phi}\in\real{q\times (r-q)}$, where each element is generated identically and independently from standard normal. Generate ${\mathbf Y}_{\mathbf D i}$ from distribution $N(\greekbold{\alpha}^{*}{\mathbf Z}_i+\greekbold{\phi}{\mathbf Y}_{{\mathbf S} i},\greekbold{\Sigma}_{\mathbf D|{\mathbf S}})$ \item[Step 4*.] Calculate $\widehat\greekbold{\beta}_{\mathrm{cm}}$ and $\widehat\greekbold{\beta}_{\mathrm{ecm}}$, where ${\mathbf U}$ is correctly specified for both estimators. \end{enumerate} The average MSE of $\widehat\greekbold{\beta}_{\mathrm{cm}}$ and $\widehat\greekbold{\beta}_{\mathrm{ecm}}$ was $4e^{-3}$ and $1e^{-3}$. The Monte Carlo mean variances over all the elements were 21.76 and 5.27 for $\sqrt{n}\tilde \greekbold{\beta}$ and $\sqrt{n}\widehat\greekbold{\beta}_{\mathrm{ecm}}$, demonstrating the efficiency of the additional envelope structure over the $\widehat\greekbold{\beta}_{\mathrm{cm}}$ estimator. }} \section{Applications}\label{sec:applications} \subsection{Dental data revisited}\label{sec:dental} The dental data consists of measurements of the distance (mm) from the center of the pituitary to the pterygomaxillary fissure for each of 11 girls and 16 boys at ages 8, 10, 12, and 14 years ($t$). Since their introduction by \cite{PotthoffRoy1964}, these data have been used frequently to illustrate the analysis of longitudinal data. We respect that tradition in this section. We removed the outlying and influential male case described by \cite{PanFang2002} prior to application of the methods discussed herein. We set the goal to characterize the differences between boys and girls rather than profile modeling and so we contrasted the behavior of estimators from the unconstrained model (\ref{mlm}), the envelope model (\ref{envmlm}), the constrained model (\ref{igmlm}) and the envelope version of model (\ref{igmlm}) discussed in Section~\ref{sec:envalpha}. Consistent with the literature, we fitted constrained model (\ref{igmlm}) and its envelope counterpart with the rows of ${\mathbf U}$ being $\mathbf U^{T}(t) = (1,t)$. The estimated dimension of the envelope for model (\ref{envmlm}) was $u=2$, and thus it was inferred that only two linear combinations of the response vectors are needed to fully characterize the differences between boys and girls. The estimated dimension of the envelope for the constrained envelope model (\ref{envalpha2}) was $u=1$. Table~\ref{tab:dental} shows the estimated asymptotic variances, determined by the plug-in method, for the four estimators $\widehat{\greekbold{\beta}}_{\mathrm{um}}$, $\widehat{\greekbold{\beta}}_{\mathrm{em}}$, $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$. The unconstrained model has the worst estimated performance, followed by the regular envelope model and the constrained model. The enveloping in the constrained model has the best estimated performance. We would need to increase the sample size by about 2.5 times for the constrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ to have the performance estimated for the enveloped version $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$ with the current sample size. \begin{table}[ht] \centering \caption{Estimated asymptotic variances $\mathrm{avar}(\sqrt{n}\widehat{\greekbold{\beta}}_{(\cdot)})$ of the four elements of $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ from the unconstrained model (\ref{mlm}), $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ from the envelope model (\ref{envmlm}), $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ from the constrained model (\ref{igmlm}) and $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$ from the envelope version of constrained model (\ref{igmlm}).}\label{tab:dental} \bigskip \begin{tabular}{lrrrr} & & Age & & \\ \hline $\widehat{\greekbold{\beta}}_{(\cdot)}$ & $8\;\;\;$ & $10\;\;$ & $12\;\;$ & $14\;\;$ \\ \hline $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ & 15.53 & 16.41 & 25.42 & 18.95 \\ $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ & 15.29 & 13.56 & 22.79 & 18.73 \\ $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ & 13.97 & 13.57 & 15.00 & 18.27 \\ $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$ & 5.88 & 9.16 & 13.16 & 17.89 \\ \hline \end{tabular} \end{table} The relatively bland performance of the envelope estimator $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ can be traced back to the estimated eigen-structure of $\greekbold{\Sigma}$. The eigenvalues of $\greekbold{\widehat{\Omega}}$ and $\greekbold{\widehat{\Omega}}_{0}$ were $(14.61, 1.10)$ and $(2.20, 0.70)$. Envelopes offer relatively little gain when most of the variation in the response is associated material information, as is the case here. On the other hand, the eigenvalues of $\greekbold{\widehat{\Omega}}$ and $\greekbold{\widehat{\Omega}}_{0}$ arising from enveloping in the constrained model were $0.02$ and $8.31$. In this case most of the variation in the direct response ${\mathbf Y}_{D}$ is associated with immaterial information, the general setting when envelopes perform well. \begin{figure}[ht!] \centerline{\hfill \includegraphics[width=2.8in]{hat_Y_env.pdf} \hfill \includegraphics[width=2.8in]{Q_hat_Gamma_env_Y.pdf} \hfill} \centerline{\hfill\makebox[2.1in]{a. Fitted values $\widehat{\mathbf Y}_{\mathrm{em}}$ from (\ref{envmlm})} \hfill\makebox[2.1in]{b. Projected means ${\mathbf Q}_{\widehat{\greekbold{\scriptstyle \Gamma}}} \bar{{\mathbf Y}}$}\hfill} \centerline{\hfill \includegraphics[width=2.8in]{hat_Y_tilde_beta.pdf} \hfill \includegraphics[width=2.8in]{Q_X_Y.pdf} \hfill} \centerline{\hfill\makebox[2.1in]{c. Fitted values $\widehat{\mathbf Y}_{\mathrm{cm}}$ from (\ref{igmlm})} \hfill\makebox[2.1in]{d. Projected means ${\mathbf Q}_{{\mathbf U}}\bar{{\mathbf Y}}$}\hfill} \caption{\label{fig:dental} Profile plots by sex of (a) the fitted vectors from envelope model (\ref{envmlm}), (b) means projected onto $\mathrm{span}^{\perp}(\widehat{\greekbold{\Gamma}})$, (c) the fitted vectors from the constrained model (\ref{igmlm}) and (d) means projected onto ${\mathcal U}^{\perp}$. The vertical axis for each plot is the distance for the plotted vectors. } \end{figure} Figure~\ref{fig:dental}a gives a profile plot of the fitted vectors from envelope model (\ref{envmlm}). The implied fit is quite good and close to the profile plot of the raw mean vectors shown in Supplement Figure~\ref{supfig:dental}a. (Profile plots of residuals are also shown in Figure~\ref{supfig:dental}). Under envelope theory, the distribution of ${\mathbf Q}_{{\greekbold{\scriptstyle \Gamma}}}{\mathbf Y}$ should be independent of the predictor values, in this case sex. The profile plot of ${\mathbf Q}_{\widehat{\greekbold{\scriptstyle \Gamma}}}\bar{{\mathbf Y}}$ by sex shown in Figure~\ref{fig:dental}b reflects this property. Figures~\ref{fig:dental}cd show the corresponding plots from the fit of the constrained model (\ref{igmlm}). The fit of the constrained model altered the shape of the profile for girls so that it more closely matches that for boys, which was not done by the fit of the envelope model. This type of conformity is an intrinsic property of constrained model (\ref{igmlm}). If there is uncertainty about the containment ${\mathcal B} \subseteq {\mathcal U}$ needed for the constrained model then it may be desirable to base an analysis on envelope model (\ref{envmlm}). Otherwise, the results in the last two rows of Table~\ref{tab:dental} indicate that enveloping in the constrained model (\ref{igmlm}) is the best option from among those considered. We also applied the scaled envelope estimator discussed in Section~\ref{sec:envbeta}. The asymptotic variances of the elements of the corresponding estimator of $\greekbold{\beta}$ did not differ materially from those shown in Table~\ref{tab:dental} for $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{em}}$. Then, scaling offered no gains in this example. This was rather as expected since good scale estimation generally requires large sample size. \subsection{The China Health and Nutrition Survey}\label{subsec: CHNS} The China Health and Nutrition Survey (CHNS) was designed to evaluate the effects of the health, nutrition and family planning policies on the health and nutritional status of its population \citep{popkin2009}. The survey used a multistage, random cluster process to draw samples of households in 15 provinces and municipal cities that vary substantially in geography, economic development, public resources, and health indicators. In totals, 9 surveys were carried out between 1989 and 2011. We included in our analysis only the 1209 individuals that participated in all the 9 surveys, giving a total of $9 \times 1209 = 10,881$ records. Five individuals were deleted for having unreasonable changes in weight or height. For instance, one individual had a height of 65 cm in the seventh survey but a height of 160 cm in all other surveys. The baseline predictors we considered include age at the first survey, binary indicators for gender and region (urban or rural), and a six-level indicator for highest education levels obtained at the first survey. About 98.2\% of the individuals in the analysis were over 21 years old. Age at first survey, gender and region were fully observed but there were $28$ individuals with missing education levels at baseline. We imputed the missing values with the education level collected at the next available visit. The response was the change in BMI from baseline at the 8 followup surveys. In the $10,881$ records, there was a total of 371 values of either missing height or weight information needed to calculate BMI. We assumed that height and weight were missing at random and imputed them by carrying the last observation forward. We compared the estimated asymptotic variances of the unconstrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{um}}$, the envelope estimator $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ and the constrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ from model (\ref{igmlm}) using $\mathbf U^{T} = (1,t,t^{2})$, where $t$ is the time in years from baseline. We also included the envelope version of the constrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$, the scaled envelope estimator $\widehat{\greekbold{\beta}}_{\mathrm{sem}}$ from \citet{CookSu2013scaled} and its constrained version $\widehat{\greekbold{\beta}}_{\mathrm{secm}}$ corresponding to model (\ref{igmlm}). We used version (\ref{igmlm}) of the constrained model because we were interested in profile contrasts rather than modeling profiles per se. Since $\widehat{\greekbold{\beta}}_{(\cdot)} \in \real{9 \times 9}$, we report in columns 4--9 of Table \ref{tb: data_var} various location statistics computed over the estimated variances of the individual elements in $\widehat{\greekbold{\beta}}_{(\cdot)}$. Using these summary statistics as the basis for comparison, we see that the estimators fall into two clear groups. The unconstrained estimator does the worst, followed closely by the envelope estimator and the constrained estimator. The three envelope estimators listed in the last three rows of the table do noticeably better than the first three. Our assessment based on just the variance summary statistics and taking computational difficulty into account leads us to prefer the envelope constrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$. The model order determined by BIC given in the third column of Table \ref{tb: data_var} tells a similar story. Based on the actual BIC values, the unconstrained estimator in the first row appears clearly inferior to the others, while the scaled envelope model in the last row is clearly the best. The remaining models are relatively difficult to distinguish. We next give a few additional details. \begin{table}[ht] \centering \caption{BIC order, minimum, maximum, mean and quartiles $Q_{1}$--$Q_{3}$ of the estimated asymptotic variances of the elements in $\widehat{\greekbold{\beta}}_{(\cdot)}$ for the CHNS study}\label{tb: data_var} \medskip \begin{tabular}{ccccccccc} \hline Estimator &Envlp. dim. &BIC order & Min & $Q_{1}$ & $Q_{2}$ & Mean & $Q_{3}$ & Max \\ \hline $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ &8 &6& 0.03 & 0.07 & 0.12 & 0.12 & 0.15 & 0.20 \\ $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ & 2 &5& 0.02& 0.05 & 0.11 & 0.11 & 0.15 & 0.21 \\ $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ & 3 &4& 0.03 & 0.05 & 0.10 & 0.10 & 0.13 & 0.19 \\ $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$ &1 &3& 0.00 & 0.00 & 0.02 & 0.05 & 0.06 & 0.17 \\ $\widehat{\greekbold{\beta}}_{\mathrm{secm}}$ &1 &2& 0.00& 0.03 & 0.03 & 0.04 & 0.04 & 0.08 \\ $\widehat{\greekbold{\beta}}_{\mathrm{sem}}$ & 1 &1& 0.00 & 0.00 & 0.02 & 0.05 & 0.06 & 0.17 \\ \hline \end{tabular} \end{table} The estimated dimensions of the various envelopes based using BIC are listed in the second column of Table~\ref{tb: data_var}. We listed the maximum envelope dimension for the two non-envelope methods. The variance gains for the envelope model over the unconstrained model shown in Table~\ref{tb: data_var} are reflected by the two eigenvalues $(17.44, 15.90)$ of $\greekbold{\widehat{\Omega}}$ and the six eigenvalues of $\greekbold{\widehat{\Omega}}_{0}$ which ranged between $1.11$ and $1.62$. Turning to the envelope version of constrained model (\ref{igmlm}), the estimated dimension of ${\mathcal E}_{{\greekbold{\scriptstyle \Sigma}}_{D|S}}({\mathcal A})$ using BIC was 1. The variance gain over the unconstrained model shown in Table~\ref{tb: data_var} is again reflected by the value of $\greekbold{\widehat{\Omega}} = 3 e^{-5}$ and the two eigenvalues of $\greekbold{\widehat{\Omega}}_{0}$, $0.16$ and $2.74$. As with the regular envelope model, the major variability lies in the immaterial part of the response. {\color{black}{ \subsection{Postbiotics study} The aim of the {\color{blue} postbiotics} study \citep{Dunand} was to determine the protective capacity against Salmonella infection in mice of the cell-free fraction (postbiotic) of fermented milk produced at laboratory and industrial levels. The capacity of the postbiotics produced by pH-controlled fermentation was evaluated to stimulate the production of secretory IgA in {\color{blue} feces} and to protect mice against Salmonella infection. There were 3 study groups with seven mice per group: (i) a control group (C), where mice received the unfermented milk supernatant; (ii) an F36 group (F36), where mice received the cell-free supernatant obtained by DSM-100H fermentation in 10\% (w/v) skim milk produced in the laboratory; and (iii) an F36D group (F36D), where mice received the product F36 diluted 1/10 in tap water. {\color{blue} Feces samples of }approximately 50 mg per mouse were collected once a week for 6 weeks and the concentration of secretory IgA (S-IgA) by ELISA was determinate. The response was the IgA measured over the 6 weeks period and the predictors were the group indicators. \begin{figure}[ht!] \centering \includegraphics[width=3in]{probiotics.png} \caption{Average of IgA by group over time in the Posbiotics Study data} \label{1} \end{figure} The research question was whether there were differences of the IgA measures among the treatment groups. We present the average response by group over the weeks in Figure \ref{1}. We set the control group as the baseline and therefore $\greekbold{\beta} \in \real{6 \times 2}$. We calculate all estimators {\color{blue} based on envelope model} (\ref{igmlm}) because we were interested in profile contrasts rather than modeling profiles. We use $\mathbf U^{T}(t) = (1,t/6,(t/6)^{2}, \cos ( 2 \pi t/6), \sin (2 \pi t/6))$, where $t=1,\dots, 6 $ are the weeks where the measures were taking. The unconstrained estimator $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ was considered in \citet{Dunand} and it did not show a difference between treatment groups, even when exploratory {\color{blue} difference seem apparent from Figure \ref{1}.} Table \ref{tb: data_var1} shows BIC, envelope dimension and MSE of the estimators. We listed the maximum envelope dimension for the two non-envelope methods as their estimated envelope dimensions. The unconstrained estimator performs the worst and the scaled constrained envelope estimator performs the best in terms of both BIC and efficiency. \begin{table}[ht] \centering \caption{Envelope dimension, BIC, BIC order, and MSE for the Postbiotics Study}\label{tb: data_var1} \medskip \begin{tabular}{ccccc} \hline Estimator &Envlp. dim.& BIC &BIC order & MSE \\ \hline $\widehat{\greekbold{\beta}}_{\mathrm{um}}$ &5 &-133.90 &6& 0.15 \\ $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ & 1 &-163.52& 2& 0.13\\ $\widehat{\greekbold{\beta}}_{\mathrm{cm}}$ & 2 & -144.37 & 5& 0.15\\ $\widehat{\greekbold{\beta}}_{\mathrm{ecm}}$ &1 & -160.76 & 3& 0.14 \\ $\widehat{\greekbold{\beta}}_{\mathrm{sem}}$ & 1 & -152.22 & 4& 0.13 \\ $\widehat{\greekbold{\beta}}_{\mathrm{secm}}$ &1 &-251.48 & 1& 0.13\\ \hline \end{tabular} \end{table} To address the researcher question, we {\color{blue} used} the $p$-values of the $\widehat{\greekbold{\beta}}$ components. From Table \ref{tb: data_var2} we can see that the unconstrained estimator does not reveal any differences, which aligns with the findings in \citet{Dunand}. None of the estimators demonstrate any evidence of difference between F36D group and the control group at any time. On the other hand, $\widehat{\greekbold{\beta}}_{\mathrm{secm}}$ reveals a significance difference between the control and {F36} groups in all followup weeks. The $p$-values for such a comparison of $\widehat{\greekbold{\beta}}_{\mathrm{em}} $ are {\color{blue} clearly significant only in week 3}. Other estimators also fail to find all followup weeks significant between F36 and control groups, e.g., the scaled envelope is not significant in week 5 and 6, and constrained envelope is significant only in week 2. \begin{table}[ht] \centering \caption{The $p$-values for coefficients for $\widehat{\greekbold{\beta}}_{\mathrm{um}}$, $\widehat{\greekbold{\beta}}_{\mathrm{em}}$ and $\widehat{\greekbold{\beta}}_{\mathrm{secm}}$ }\label{tb: data_var2} \medskip \begin{tabular}{cccccccc} \hline week&\multicolumn{3}{c}{F36 vs control}&& \multicolumn{3}{c}{F36 D vs control}\\ \cmidrule{2-4}\cmidrule{6-8} &$\widehat{\greekbold{\beta}}_{\mathrm{um}} $ & $\widehat{\greekbold{\beta}}_{\mathrm{em}} $ & $\widehat{\greekbold{\beta}}_{\mathrm{secm}} $ && $\widehat{\greekbold{\beta}}_{\mathrm{um}} $ & $\widehat{\greekbold{\beta}}_{\mathrm{em}} $ &$\widehat{\greekbold{\beta}}_{\mathrm{secm}} $ \\ \hline 1& 0.91 & 0.07&0.13&& 0.77 &0.27& 0.30\\ 2& 0.09 &0.10& 0.01 &&0.83 &0.28&0.21 \\ 3& 0.83& 0.01& 0.01 && 0.48 &0.20&0.22 \\ 4& 0.26 &0.06&0.02 && 0.90 &0.23&0.22 \\ 5&0.55 &0.05&0.00 && 0.16 & 0.20&0.20\\ 6&0.57 &0.63& 0.01 && 0.59 &0.64& 0.21\\ \hline \end{tabular} \end{table} The variance gains for the scale version of the constrained envelope model over the unconstrained model (and therefore the $p$-values) are reflected by the eigenvalue $1e^{-4}$ of $\greekbold{\widehat{\Omega}}$ and the four eigenvalues of $\greekbold{\widehat{\Omega}}_{0}$ which are $23.06$, $13.67$, $0.41 $ and $ 0.22$. The reason for the envelope estimator to be not as significant when comparing F36 and control groups is that there is not as big a discrepancy between the eigenvalues of $\greekbold{\widehat{\Omega}} $ ($2e^{-3} $) and the eigenvalues of $\greekbold{\widehat{\Omega}}_0$ ($ 0.02$, $0.04$, $0.03$, $0.01$, and $4e^{-3}$). }} \section{Discussion} The primary computational step for all of the envelope methods described herein involves finding $\widehat{\G} = \arg \min_{{\mathbf G} \in {\mathcal G}} \log|{\mathbf G}^{T} {\mathbf M}_{1}{\mathbf G}| + \log | {\mathbf G}^{T} {\mathbf M}_{2} {\mathbf G}|$ over a class ${\mathcal G}$ of semi-orthogonal matrices, where the inner product matrices ${\mathbf M}_{1}$ and ${\mathbf M}_{2}$ depend on the application. The R package Renvlp by M. Lee and Z. Su contains a routine for minimizing objective functions of this form. Computations are straightforward once $\widehat{\G}$ has been found. Renvlp also implements specialized methodology for data analysis under envelope model (\ref{envmlm}) and partial envelope model. The associated routines can be modified for the models described herein. Description of and links to packages for envelope methods are available at z.umn.edu/envelopes. We relegated discussion of certain well-established aspects of envelope methodology to the Supplement. Non-normality and the bootstrap are discussed in Section~\ref{sec:boot} and methods for selecting the envelope dimension are reviewed in Section~\ref{sec:estu}. Enveloping for $(\greekbold{\alpha}_0,\greekbold{\alpha}) $ jointly is discuss in Section \ref{both} and finally a brief discussions of envelopes and Rao's simple structure is in Section~\ref{sec:structure} Extensions to unbalanced data and random effects models requiere additional research, \renewcommand{\refname}{References} \bibliographystyle{apalike}
{'timestamp': '2021-01-05T02:19:39', 'yymm': '2101', 'arxiv_id': '2101.00514', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00514'}
arxiv
\section{Introduction} In this paper, we present and evaluate a tree-structured long-short-term-memory (LSTM) network in which the syntactic information of a sentence is encoded and the alignment between the premise-hypothesis pair is calculated through a self-attention mechanism. Our work builds on the Child-Sum Tree-LSTM from \citet{tai-etal-2015-improved}. We evaluate our model on several datasets to show that it performs well on both upward and downward inference. Particularly, our model demonstrated good performance on downward inference, which is a difficult task for most NLI models. Natural language inference (NLI), also known as recognizing textual entailment (RTE) is one of the important benchmark tasks for natural language understanding. Many other language tasks can benefit from NLI, such as question answering, text summarization, and machine reading comprehension. The goal of NLI is to determine whether a given premise \textbf{P} semantically entails a given hypothesis \textbf{H} \citep{series/synthesis/2013Dagan}. Consider the example below: \begin{itemize} \item {\footnotesize \textbf{P}: An Irishman won the Nobel prize for literature.} \item {\footnotesize \textbf{H}: An Irishman won the Nobel prize.} \end{itemize} \noindent The hypothesis can be inferred from the premise and therefore the premise entails the hypothesis. To arrive at a correct determination, an NLI model often needs to perform different inferences including various types of lexical and logical inferences. In this paper, we are concerned with monotonicity reasoning, a type of logical inference that is based on word replacement. Below is an example of monotonicity reasoning: \begin{enumerate} \item \begin{enumerate} \item {\footnotesize \textbf{All} \underline{students}$\downarrow$ carry a \underline{MacBook}$\uparrow$.} \item {\footnotesize All students carry a \underline{laptop}.} \item {\footnotesize All \underline{new students} carry a MacBook.} \end{enumerate} \item \begin{enumerate} \item {\footnotesize \textbf{Not All} \underline{new students}$\uparrow$ carry a laptop.} \item {\footnotesize Not All \underline{students} carry a laptop.} \end{enumerate} \end{enumerate} \noindent An upward entailing phrase ($\uparrow$) can allow inference from (1a) to (1b), where a more general concept laptop replaces the more specific \textit{MacBook}. A downward entailing phrase ($\downarrow$) allows an inference from (1a) to (1c), where a more specific context \textit{new students} replaces the word \textit{students}. The direction of the monotonicity can be reversed by adding a downward entailing phrase like "Not"; thus (2a) entails (2b). Recently, \citet{yanaka-etal-2019-neural} constructed a new dataset called the Monotonicity Entailment Dataset (MED). The purpose of that dataset is to evaluate the ability of a neural inference model to perform monotonicity reasoning. It is the first dataset ever created for such purpose. While many neural language models have shown state-of-art performance on large annotated NLI dataset such as the Stanford Natural Language Inference (SNLI) dataset \citep{bowman-etal-2015-large, chen-etal-2017-enhanced, parikh-etal-2016-decomposable}, many of these models did not perform well on monotonicity reasoning. In particular, they had low accuracy when performing downward monotonicity inference. Additionally, most of the state-of-art inference models that do well on upward monotonicity inference perform poorly on downward inference \citep{yanaka-etal-2019-neural}. \section{Related Work} Existing work in this area has adopted a recursive tree-structured neural network for natural language inference. \citet{bowman-etal-2015-recursive} proposed a tree-structured neural tensor network (TreeRNTNs) that can learn representations to correctly identify logical relationships such as entailment. \citet{zhou-etal-2016-modelling} extended the recursive neural tensor networks to a recursive long-short term memory network, a tree-LSTM, which combines the advantages of both the recursive neural network structure and the sequential recurrent neural network structure. The tree-LSTM can learn memory cells that reflect the historical memories of the descendant cells and thus improved the model's ability to process long-distance interaction over hierarchies, such as the language parse information. \citet{parikh-etal-2016-decomposable} proposed a simple decompose attention model for natural language inference. Their model relies on the attention to decompose the problem into sub-problems so that the smaller problems can be solved separately and in parallel. \citet{chen-etal-2017-enhanced}, proposed the Enhanced Sequential Inference Model (ESIM) for natural language inference task. It incorporated the sequential LSTM encoder with the syntactic parsing information from the tree-LSTM structure to form a hybrid neural inference mode. They found that incorporating the parsing information can improve the performance of the model. A new type of inference model that relies on external knowledge called the knowledge-based inference model (KIM) was introduced by \citet{chen-etal-2018-neural}. They incorporated neural NLI models with external knowledge in co-attention, local inference collection, and inference composition components. The KIM model achieved state-of-art performance on the SNLI and MNLI datasets. \section{Our Model} In this section we present an attentive tree structured network (AttentiveTreeNet) with self-attention based aggregation. This model is composed of the following main components: input sentence embedding, attentive tree-LSTM encoder, self-attention aggregator and a multi-layer perceptron (MLP) classifier. Figure 1 shows the architecture of our model. Given an input sentence pair, consisting of a premise \textbf{P} and a hypothesis \textbf{H}, the objective of the model is to determine whether \textbf{P} entails \textbf{H}. Our model takes in four inputs: the word embeddings of the premise and hypothesis and the dependency parse trees of the premise and hypothesis. The model initializes the embedding of \textbf{P} and \textbf{H} with some pre-trained word embedding; the parse trees are produced by a dependency parser. Our model forms a Siamese neural network structure \citep{siamese-recurrent}, in which the premise and the hypothesis are passed into a pair of identical tree-LSTMs that share the same parameters and weights. The main idea is to find a function that can map the input sentences into a target space such that we can approximate the semantic distance in the input space. \begin{figure}[t] \centering \includegraphics[width=7cm]{AttentiveTreeLSTM} \caption{Architecture of our model.} \end{figure} \subsection{Attentive Tree-LSTM Encoder} \paragraph{Child-Sum Tree-LSTM} We employ Child-Sum Tree-LSTMs \citep{tai-etal-2015-improved} as the basic building blocks for our model. A standard sequential LSTM network only permits sequential information propagation. However, the \textit{lingistic principle of compositionality} states that an expression's meaning is derived from the meanings of its parts and of the way they are syntactically combined \citep{Partee2007CompositionalityAC}. A tree-structured LSTM network allows each LSTM unit to be able to incorporate information from multiple children units. This takes advantage of the fact that sentences are syntactically formed bottom-up tree-structures. A Child-Sum Tree-LSTM is a type of tree-LSTM which contains units that conditioned their components on the sum of their children's hidden states. While a standard sequential LSTM network computes the current hidden state from the current input and the previous hidden state, a child-sum tree-LSTM computes the hidden state from the input and the hidden states of an arbitrary number of children nodes. This property allows relation representations of non-leaf nodes to be recursively computed by composing the relations of the children, which can be viewed as natural logic for neural model \citep{maccartney-manning-2009-extended, zhao-etal-2016-textual}. Using the child-sum tree structure is beneficial in interpreting the entailment relations between parts of the two sentences. When encoding the sentence in a forward manner, hidden states are passed recursively in a bottom-up fashion. The information flow in each LSTM cell is controlled by a gating mechanism similar to the one in a sequential LSTM cell. The computations in an LSTM cell are as follows: \begin{align*} \label{eq1} \tilde{h} &= \Sigma_{1 \leq k \leq n}h_{k}, \\ i &= \sigma(W^{(i)}x+U^{(i)}\tilde{h}+b^{(i)}), \\ o &= \sigma(W^{(o)}x+U^{(o)}\tilde{h}+b^{(o)}), \\ u &= tanh(W^{(u)}x+U^{(u)}\tilde{h}+b^{(u)}), \\ f_{k} &= \sigma(W^{(f)}x+U^{(f)}h_{k}+b^{(f)}), \\ c &= i \odot u+\Sigma_{1 < n}f_{k} \odot c_{k}, \\ h &= o \odot tanh(c), \end{align*} \noindent Here, $k$ is the number of children of the current node, and $\tilde{h}$ is the sum of the hidden states from the children of the current node. The forget gate $f_{k}$ controls the amount of memory being passed from the {\it k}th child. The input gate {\it i} controls the amount of internal input {\it u} being updated and the output gate {\it o} controls the degree of exposure of the memory. The $\sigma$ is the sigmoid activation function, $\odot$ is the element-wise product and {\it W} and {\it U} are both trainable weights to be learned. \begin{figure}[t] \centering \includegraphics[width=7cm]{lstm} \includegraphics[width=7cm]{attnlstm} \caption{A comparison between a standard LSTM cell and an attentive LSTM cell.} \end{figure} \paragraph{Attentive Tree-LSTM} In our model, the standard tree-LSTM is extended to an attentive tree-LSTM \citep{zhou-etal-2016-modelling} by incorporating the attention mechanism into the LSTM cell. In a sentence, some words are more related to the overall context of the sentence than others. The benefit of applying attention is that it considers this semantic relevance by weighting each child according to how relative that child is to the given context. The attention mechanism can assign a higher weight to a child node that is more relevant to the context of the sentence and a lower weight to a child node that is not relevant to the context. To apply the attention mechanism, a common soft-attention layer is used in the model. That layer receives a set of hidden states $\{h_{1},h_{2},...,h_{n}\}$ and an external vector {\it s}, which is a vector representation of a sentence from a layer of sequential LSTM. The layer then computes a weight $\alpha$ for each hidden state, and sums up the product of each hidden state and its weight to output the context vector {\it g}. Below are the equations for the soft-attention layer: \begin{align*} m_{k} &= tanh(W^{(m)}h_{k} + U^{(m)}s), \\ \alpha_{k} &= \frac{exp(w^{\top} m_{k})}{\Sigma_{j=1}^{n}exp(w^{\top} m_{j})}, \\ g &= \Sigma_{1 \leq k \leq n}\alpha_{k}h_{k} \end{align*} \noindent A new previous hidden state is then computed through a transformation $\tilde{h} = tanh(W^{(a)}g + b^{(a)})$. Figure 2 illustrates the standard tree-LSTM cell and the attentive tree-LSTM cell. \begin{figure}[t] \centering \includegraphics[width=7cm]{self-attention-MLP} \caption{Detailed view of the self-attention aggregator} \end{figure} \subsection{Self-Attention Aggregator} After both the premise and the hypothesis are encoded through the tree-LSTM, each tree's hidden states from the nodes are concatenated into a pair of matrices $H_p$ and $H_h$ and passed to a self-attentive aggregator. The aggregator contains a multi-hop self-attention mechanism \citep{Lin2017ASS}. A sentence has multiple components such as groups of related words and phrases to form an overall context, especially for long sentences. By performing multiple hops of attention, the model can get multiple attentions that each focus on different parts of the sentence. Given a matrix $H$, the self-attention mechanism performs multiple hops of attention and outputs an annotation matrix $A$ which consists of the weight vector from each hop. $A$ is calculated from a 2-layer multi-layer perceptron (MLP) and a softmax function. Below is the equation to calculate $A$: \begin{align*} A = softmax(W_{s2}tanh(W_{s1}H^{\top})) \end{align*} The annotation matrix $A$ is then multiplied by the hidden state matrix $H$ to obtain a context matrix: $M = AH$. In the model, there will be a pair of context matrices $M_p$ and $M_h$. A batch dot product and a {\it tanh} function is then applied to the context matrices with a trainable weight to obtain a pair of output $F_p$ and $F_h$ matrices: \begin{align*} F_p &= tanh(bmm(M_p, W_f)), \\ F_h &= tanh(bmm(M_h, W_f)) \end{align*} To aggregate $F_p$ and $F_h$, we follow \citet{Conneau_2017}'s generic NLI training scheme, which includes three matching methods: (i) a concatenation of $F_p$ and $F_h$, (ii) an absolute distance between $F_p$ and $F_h$, and (iii) an element wise product of $F_p$ and $F_h$. Results from the three methods are then concatenated to $F_r$ as the factor of semantic relation between the two sentences which can measure how close the two vector representations of the sentence pair are in the target space. This relatedness information will help the classifier to determine whether the hypothesis is entailed by the premise. \begin{align*} F_r &= [F_p; F_h; |F_p - F_h|; F_p \odot F_h], \end{align*} \subsection{MLP} The factor of relation $F_r$ is fed to a classic three layer MLP classifier. The final prediction is a probability $p_\theta$ representing the degree to which the hypothesis is entailed by the premise. It is calculated by a softmax function, which is a standard activation function used to calculate the probability of the input being in a category for multi-way classification tasks: \begin{align*} Y_1 &= ReLU(W_{f_1}F_r + b_{f_1}), \\ Y_2 &= \sigma(W_{f_2}Y_1 + b_{f_2}), \\ y_\theta &= softmax(W_{f_3}Y_2 + b_{f_3}), \\ \end{align*} \noindent For the classification, the binary cross-entropy loss is used as the objective function: \begin{align*} -\sum_c \mathbbm{1}(X,c)log(p(c|X)), \end{align*} where $\mathbbm{1}$ is the binary indicator (0 or 1) whether the label c is the correct class for X. \begin{table*}[t] \centering \begin{tabular}{llllll} \hline \textbf{Model} & \textbf{Train Data} & \textbf{Upward} & \textbf{Downward} & \textbf{None} & \textbf{All} \\ \hline BiMPM \citep{ijcai2017-579} & SNLI & 53.5 & 57.6 & 27.4 & 54.6 \\ ESIM \citep{chen-etal-2017-enhanced} & SNLI & 71.1 & 45.2 & 41.8 & 53.8\\ DeComp \citep{parikh-etal-2016-decomposable}& SNLI & 66.1 & 42.1 & \textbf{64.4} & 51.4\\ KIM \citep{chen-etal-2018-neural} & SNLI & 78.8 & 30.3 & 53.1 & 48.0\\ BERT \citep{devlin-etal-2019-bert}& MNLI & \textbf{82.7} & 22.8 & 52.7 & 44.7 \\ BERT \citep{devlin-etal-2019-bert} & HELP+MNLI & 76.0 & 70.3 & 59.9 & 71.6 \\ AttentiveTreeNet (ours) & MNLI & 54.7 & 60.4 & 37.8 & 58.6 \\ AttentiveTreeNet (ours) & HELP & 55.7 & 72.6 & 57.9 & 66.0 \\ AttentiveTreeNet (ours) & HELP+SubMNLI & 81.4 & \textbf{74.5} & 53.8 & \textbf{75.7}\\ \hline \end{tabular} \caption{\label{font-table} Accuracy of our model and other state-of-art NLI models evaluated on MED.} \end{table*} \section{Evaluation} \label{sec:length} \subsection{Data} Six different types of training data are used to train our model. Initially, we used the HELP dataset \citep{yanaka-etal-2019-help} to train our model. HELP is a dataset for learning entailment with lexical and logical phenomena. It embodies a combination of lexical and logical inferences focusing on monotonicity. HELP consists of 36K sentence pairs including those for upward monotone, downward monotone, non-monotone, conjunction, and disjunction. Next we trained our model with the Multi-Genre NLI Corpus (MNLI) dataset \citep{MultiNLI}. MNLI contains 433k pairs of sentences annotated with textual entailment information. That dataset covers a wide range of genres of spoken and written language. The majority of the training examples in that dataset is upward monotone. In order to provide more balanced training data, we combined a subset of the MNLI dataset with the HELP dataset to reduce the effect of the large number of downward monotone examples in the HELP dataset, we call this combined training data HELP+SubMNLI. The fourth training data contains both the HELP+SubMNLI training data and the training set for simple monotonicity from \citet{richardson2019probing}'s Semantic Fragments. The fifth training data contains both the HELP+SubMNLI training data and the training set for hard monotonicity from Semantic Fragments. Finally, the last training data contains the HELP+SubMNLI training data and the training set for simple and hard monotonicity from Semantic Fragments. To validate our model's ability for monotonicity reasoning and to evaluate its performance on upward and downward inference, the Monotonicity Entailment Dataset (MED) was used \citep{yanaka-etal-2019-neural}, which is designed to examine a model's ability of performing monotonicity reasoning. MED contains 5382 premise-hypothesis pairs including 1820 upward inference examples, 3270 downward inference examples, and 292 non-monotone examples. The sentences in MED cover a variety of linguistic phenomena, including lexical knowledge, reverse, conjunction, disjunction, conditional and negative polarity items. We removed sentence pair with the label "contradict" from MNLI dataset since the test dataset MED and the training dataset HELP do not contain the label "contradict". We furthermore tested our model on the simple and hard monotonicity fragments test sets from Semantic Fragments. \subsection{Training} Word embeddings are a common way to represent words when training neural networks (Mikolov et al., 2013). To train our model we used Stanford's pre-trained 300-D Glove 840B vectors \citep{pennington-etal-2014-glove} to initialize the word embeddings. The Stanford Dependency Parser \citep{chen-manning-2014-fast} was used to parse each sentence in the dataset. The model is trained with the Adam optimizer \citep{kingma2014adam} which is computationally efficient and helps a model to quickly converge to an optimal result. A standard learning rate for Adam, 0.001, is also used. Dropout with a standard rate of 0.5 is applied to the feed-forward layer in the self-attention aggregator and the classifier to reduce the over-fitting of the model. For the number of hops of the self-attention, we used the default 15 hops. The metric for evaluation is accuracy based. The system is implemented using a common deep learning framework, PyTorch and is trained on a GPU for 20 epochs. \section{Results} \begin{table*}[t] \centering \begin{tabular}{lllllll} \hline \textbf{Test} & \textbf{Model} & \textbf{Training Data} & \textbf{Upward} & \textbf{Downward} & \textbf{None} & \textbf{All} \\ \hline - & Full Model {\footnotesize w/ vector-concat} & HELP & 55.7 & 72.6 & 57.9 & 66.0 \\ 1 & --Self-Attentive Aggregator & HELP & 65.1 & 67.1 & 53.7 & 65.7 \\ 2 & --Tree-LSTM & HELP & 36.6 & 65.5 & 94.8 & 49.5 \\ 3 & Full Model {\footnotesize w/ mean-dist} & HELP & 59.3 & 71.2 & 46.2 & 65.9 \\ \hline - & Full Model {\footnotesize w/ vector-concat} & HELP+SubMNLI & \textbf{81.4} & \textbf{74.5} & 53.8 & \textbf{75.7} \\ 1 & --Self-Attentive Aggregator & HELP+SubMNLI & 70.5 & 66.9 & 85.6 & 69.1 \\ 2 & --Tree-LSTM & HELP+SubMNLI & 54.7 & 60.4 & 37.8 & 58.6 \\ 3 & Full Model {\footnotesize w/ mean-dist} & HELP+SubMNLI & 68.9 & 73.7 & \textbf{91.0} & 73.0 \\ \hline \end{tabular} \caption{\label{font-table} This table shows the accuracy of ablation tests trained on HELP and HELP+SubMNLI and tested on MED. Three ablation test were performed: (i) Remove self-attentive aggregator (--Self-Attentive Aggregator), (ii) Replace tree-LSTM with regular LSTM (--Tree-LSTM) (iii) Use mean distance as a matching method (Full Model {\footnotesize w/ mean-dist}). The final model (Full Model {\footnotesize w/ vector-concat}) uses a concatenation of the sentence vectors as one of the matching methods instead of mean distance.} \end{table*} \subsection{Overall Performance} In this section, we evaluated our model's ability of performing monotonicity reasoning. Table 1 shows a comparison of the performance of different models on the Monotonicity Entailment Dataset (MED), including our model. The data for all models except for ours was developed by\citet{yanaka-etal-2019-neural} who developed the MED dataset. Our model achieves an overall accuracy of 75.7\% which outperforms all other models, even a state-of-art language model like BERT. Table 1 shows the ability of different models on performing upward and downward inference. Our attentive tree model performed better on downward inference than other models with an accuracy of 74.5\% . Our model's performance on upward inference outperforms other models except BERT. However, the upward inference accuracy of our model (81.4) is very close to the accuracy of BERT (82.7). We believe the good performance on upward and downward inference is due to considering parse tree information. Furthermore, the accuracy on upward inference increased significantly when trained with a combination of HELP and MNLI (HELP+SubMNLI) then trained only with HELP; the accuracy increased from 55.7 to 81.4 while the downward accuracy did not change much. Such phenomena suggests that adding MNLI to HELP does reduce the effect of the large number of downward monotone examples in the HELP dataset and thus improve the model's ability on upward inference. \subsection{Robustness of Model} To demonstrate the robustness of our model, we experimented with training the model on various datasets. First, the model was trained on the HELP dataset alone. The overall accuracy was 66.0\%, which outperformed other models from Table 1 except BERT trained with HELP+SubMNLI and our model trained with HELP+SubMNLI. Even on downward inference alone our model outperforms all other models with an accuracy of 72.6\% except our model trained with HELP+SubMNLI. This result indicates that with a rich set of downward monotone examples, the model can learn to better predict a downward inference problem. We then trained a model with the MNLI dataset alone. It contains a large amount of upward inference examples and only a rare number of downward inference examples. The result shows that the model generalized to the training data, and had an accuracy of 58.6\% which is still higher than most models from Table 1. Interestingly, the model's performance on downward inference is still better than its performance on upward inference, even though the training dataset contains a large number of upward monotone examples. This suggests that the model is immune to significant change of training data possibly due to the multiple dropout layer added to the aggregator and the classifier which forces a the model to learn more robust features. As Table 1 show, comparing to BERT trained with MNLI along, our model trained with MNLI along has better performance on downward inference than BERT's performance from \citet{yanaka-etal-2019-neural}. Finally, we trained our model on a combination of the MNLI dataset and the HELP dataset (HELP+SubMNLI). Because of the large number of upward training examples in MNLI, we suspected that the combination would alleviate the effects of this distortion and as such increase the accuracy for upward inference. We selected 20\% of the complete MNLI dataset due to the long training period. As the results in Table 1 show, our model still performs well on downward inference with 74.5\% accuracy, it also showed significant improvements on upward inference with an accuracy of 81.4\% . The overall performance also increased substantially to 75.7\% . Compared to the results of BERT trained with HELP+MNLI from \citet{yanaka-etal-2019-neural}, our model performs better on both upward inference and downward inference, and achieves a higher overall accuracy. The result validates our hypothesis that training on a combination of upward and downward monotone sentences can help the model achieve good performance on both upward and downward monotone, and that the use of AttentiveTreeNet is a good choice. \subsection{Ablation Test} To further evaluate which part of the model contributed the most for monotonicity reasoning, we performed several ablation tests on the model. The ablation tests were trained with HELP and HELP+SubMNLI separately and the models were evaluated on the MED dataset. The results are shown in Table 2. We will focus our evaluation on the HELP+SubMNLI data. For ablation test 1, we removed the self-attentive aggregator and built the feature vector for classification right after the tree-LSTM encoder. As Table 2 (--Self-Attentive Aggregator) shows, performance of the model trained on HELP+SubMNLI shows a significant, 6.6 percentage point drop in overall accuracy, a 10.9 percentage point drop in upward inference accuracy and a 7.6 percentage point drop in downward inference accuracy. The results of this test suggest that the self-attentive aggregator is an important component of the model that cannot be removed. For ablation test 2, we replaced the tree-LSTM encoder with a standard LSTM encoder. Here, we see an even larger drop in performance. As Table 2 (--Tree-LSTM) shows, performance of the model trained on HELP+SubMNLI shows a large, 17.1 percentage point drop in overall accuracy, a 26.7 percentage point drop in upward inference accuracy and a 14.1 percentage point drop in downward inference accuracy. Based on the results, replacing tree-LSTM with standard LSTM has significant negative impact on the model's monotonicity reasoning performance. Thus, tree-LSTM is a major component of the model that cannot be replaced. For ablation test 3, we compared two matching methods for aggregating the two sentence vectors. In our final model (Full Model {\footnotesize w/ vector-concat}), we updated the matching method by following the generic NLI training scheme \citep{Conneau_2017}. In it, we concatenate the two sentence vectors with an absolute distance and an element-wise product as the input vector for the classifier. We compared the performance to our original model (Full Model {\footnotesize w/ mean-dist}) which contains the tree-LSTM encoder, the self-attentive aggregator, and the concatenation of an absolute distance, an element-wise product, and a mean distance as the input vector for the classifier. For this ablation test, the results from Table 2 (Full Model {\footnotesize w/ mean-dist}) are mixed, yet important. While the overall accuracy decreases just slightly, by 2.7 percentage points and the downward inference accuracy only decreases by 0.8 percentage points, the accuracy for upward inference decreases by a significant 12.5 percentage points. We believe that these results justify the use of concatenation of the sentence vector pair. Overall, the removal of the Tree-LSTM encoder affected the model's performance most. Thus, we conclude that the Tree-LSTM encoder contributes the most to the model's performance on monotonicity reasoning. \begin{table}[t] \centering \begin{tabular}{lllll} \hline \textbf{Training Data} & \textbf{SF} & \textbf{HF} & \textbf{MED} \\ \hline \multicolumn{4}{c}{{\small Pre-Trained Models}}\\ HELP & 57.0 & 56.8 & 66.0 \\ HELP+SubMNLI & 46.0 & 63.0 & 75.7 \\ \hline \multicolumn{4}{c}{{\small Re-trained Models w/ SF-training fragments}}\\ HELP{\footnotesize +frag} & 98.1 & 80.6 & 64.5 \\ HELP+SubMNLI{\footnotesize +frag} & 97.8 & 74.8 & 81.5 \\ \hline \multicolumn{4}{c}{{\small Re-trained Models w/ HF-training fragments}}\\ HELP{\footnotesize +frag} & 74.3 & 95.6 & 68.9 \\ HELP+SubMNLI{\footnotesize +frag} & 73.9 & 93.2 & 73.3 \\ \hline \multicolumn{4}{c}{{\small Re-trained Models w/ SF and HF-training fragments}} \\ HELP{\footnotesize +frag} & 96.9 & 94.6 & 64.5 \\ HELP+SubMNLI{\footnotesize +frag} & 96.4 & 98.3 & 75.4 \\ \hline \end{tabular} \caption{\label{font-table} This table shows the result of the model tested on MED and the simple monotonicity fragments test set (SF) and hard monotonicty fragments test set (HF) from the Semantic Fragments dataset. The table includes three subsections: (i) test accuracy on the three test sets using models pre-trained on HELP and HELP+SubMNLI; (ii) test accuracy on the three test sets using the model re-trained after adding simple monotonicity training set to HELP and HELP+SubMNLI; (iii) test accuracy on the three test sets using the model re-trained after adding hard monotonicity training set to HELP and HELP+SubMNLI; (iv) test accuracy on the three test sets using the model re-trained after adding both simple and hard monotonicity training sets to HELP and HELP+SubMNLI.} \end{table} \subsection{Additional Testings} To check if our pre-trained model can be generalized to other monotonicity dataset, and to see if the model can be easily trained to master the new dataset while retaining its performance on the original benchmark, we conducted some additional testings on the model. We tested our pre-trained models on the Semantic Fragments test dataset which provides a more in-depth test for an NLI model's performance with semantic phenomena, see \citep{richardson2019probing}. Since our model focuses on monotonicity reasoning, we only selected the simple and hard monotonicity fragments for testing. Additionally, since our models are pre-trained on datasets that only contain two labels: "Entailment" and "Neutral", we removed sentence pairs with the third label "contradict" from the test dataset. Table 3 shows the results of our testing. While we show the results for both, the HELP and HELP+SubMNLI data sets, we will focus our discussion again on the data obtained with the HELP+SubMNLI data set. The top portion of Table 3 shows that the model trained on just HELP+SubMNLI performs poorly on the simple and hard monotonicity fragments. This performance is on par with other state-of-art model's, see \citep{richardson2019probing}. The first middle portion on Table 3 shows the results of our model's performance when only the {\it simple} training fragments were added to the HELP+SubMNLI training set. As the data shows, the model masters the simple monotonicity reasoning tests, does well on the hard monotonicity reasoning tests and retains its accuracy on the original benchmark MED. The second middle portion of Table 3 shows the results of our model's performance when only the {\it hard} training fragments were added to the HELP+SubMNLI training set. In this case, the model masters the hard monotonicity reasoning tests, does well on the simple monotonicity reasoning tests and again retains its accuracy on the original benchmark MED. The bottom portion of Table 3 shows the results of our model's performance when both the {\it simple} and {\it hard} training fragments were added to the HELP+SubMNLI training set. As the results show, the model masters both the simple and hard monotonicity reasoning tests while retaining its accuracy on the original benchmark MED. Overall, the results show that the model trained on the fragments can be generalized to both simple and hard monotonicity reasoning. \section{Conclusions} In this paper, we explained our attentive tree-structured network to perform monotonicity reasoning. Our model combines a tree-structured LSTM network and a self-attention mechanism, which is a potential mechanism for future natural language inference models, to incorporate syntactic structures of the sentence to improve sentence-level monotonicity reasoning. We evaluated our model and showed that it achieves better accuracy on monotonicity reasoning than other inference models. In particular, our model is performing significantly better on downward inference than others. We interpret the results of the experiments as supporting the thesis that using parse trees of a sentence are helpful in inferring the entailment relation. Future research on the attentive tree network might extend a tree-LSTM architecture by replacing the LSTM cell with newer language models that have much better performance on various number of natural language processing tasks. One such model is the transformer model. Furthermore, future work might want to investigate how different attention mechanism affect a model's performance. \section*{Acknowledgments} We thank Michael Wollowski for reading and giving feedback on drafts and revisions of this paper. We also thank the anonymous reviewers for providing helpful suggestions and feedback.
{'timestamp': '2021-01-05T02:21:11', 'yymm': '2101', 'arxiv_id': '2101.00540', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00540'}
arxiv
\section{Introduction} A neuronal spike is a fast transient event, lasting typically around \SI{1}{\ms}, but transmission of spikes between pairs of neurons can take between \SI{1}{} and \SI{100}{\ms} \citep{AstonJones1985, Cleland1976, Swadlow1985, Swadlow1974}, and the typical timescale of sub-threshold changes in the membrane potential of several neuron models, as fitted to experimental data, is usually set from \SI{10}{} to \SI{100}{ms} \citep{Dayan2001}. Thus we can conclude that there must exists a non-negligible delay between a neuron receiving a stimulation and the resultant action potential arriving at another neuron. This delay seems at odds with the well-known observations that behavioural or electrophysiological responses (which both seem to involve large numbers of neurons) generally occur in the order of just a few hundred milliseconds \citep[e.g.][]{Thorpe1996, Tovee1994}. It is thus not surprising that rapid signal propagation between neurons and within neuronal networks has received a lot of attention \citep[e.g.][]{Delorme2003, FourcaudTromce2003, Naundorf2005, Oram1992, Panzeri1996, vanRullen2005, Tchumatchenko2011}. It has been proposed that dynamical systems with certain properties can anticipate their input signals. Some (excitable) dynamical systems, such as neurons \citep[e.g.][]{Ciszak2003, Pyragiene2013} and neural systems \citep{Matias2014}, have been shown to anticipate aspects of their inputs through so-called anticipated synchronisation \citep{Voss2000}, which for excitable systems appears through canard solutions to the system \citep{KoksalErsoz2019}. Alternatively, model neurons with specific properties \citep{Voss2016}, as well as some electrical systems \citep[e.g.][]{Lucyszyn1993, Mitchell1997, Nakanishi2002} and certain active media \citep[e.g.][]{Bigelow2003, Brillouin1914, Chiao1993, Garrett1970, Segard1985, Sommerfeld1914, Stenner2003, Wang2000, Woodley2004}, are able to anticipate the transmission of aspects of specific signals through the existence of a negative group delay or unexpectedly high group velocities. In this article, I show that the dynamics of a widely used model for excitable media, the FitzHugh-Nagumo model \citep{FitzHugh1961, Izhikevich2007, Nagumo1962}, near its stable fixed point $\bar{p}(\bar{v},\bar{w})$, possesses a frequency band with a negative group delay. Meaning that the dynamics of the model anticipate `sub-threshold' inputs of signals with certain characteristics within this frequency band. A chain of these models then seemingly respond to these types of signals before the first in the chain is good and well stimulated. In what follows, first an illustration of negative group delay is given (section \ref{sec:ngd}), and an expression for the group delay of the FitzHugh-Nagumo model for low-amplitude input is obtained (section \ref{sec:fhn}). Following (section \ref{sec:res}) the effects of the group delay are demonstrated for several types of signals both numerically and conceptually. \section{Negative group delay}\label{sec:ngd} Group delay $\tau(\omega)$ is defined as the additive inverse of the derivative of the phase-response $\angle \widetilde{H}(\omega)$ of a system: \begin{equation} \tau(\omega) := -\frac{d}{d\omega}\angle \widetilde{H}(\omega), \nonumber \end{equation} and determines the time-delay of the amplitude envelope of inputs at each frequency $\omega$ \citep{Bariska2008, Mitchell1997, Woodley2004}. To understand the effect of a group delay, consider a signal $f(t) = g(t)e^{\mathit{i}\omega_c t}$, consisting of a sinusoid with frequency $\omega_c$, modulated by a, relative to the input, low-frequency envelope $g(t)$, being passed through a filter $\widetilde{H}(\omega) := |\widetilde{H}(\omega)|e^{\mathit{i}\phi(\omega)}$. For simplicity assume the filter has a flat unit amplitude response $|\widetilde{H}(\omega)| := 1$. The spectrum of $f(t)$ passed through the filter is \begin{equation} \widetilde{f}(\omega)\widetilde{H}(\omega) = \widetilde{g}(\omega-\omega_c)e^{i \phi(\omega)}. \nonumber \end{equation} Since the modulation of the envelope is much slower than that of the sinusoidal signal, the spectrum of $G(\omega)$ is, relative to the signal, narrow around $\omega=0$. So, the output signal will contain a narrow band of frequencies, around $\omega = \omega_c$. Approximating $\phi(\omega)$ by its Taylor series at $\omega_c$ up to first order, and substituting $\Omega = \omega-\omega_c$ gives for the inverse Fourier transform \begin{equation} (f*H)(t) = e^{\mathit{i}(\omega_c t + \phi(\omega_c))} \int_{-\infty}^{\infty} \widetilde{g}(\Omega)e^{\mathit{i}\phi'(\omega_c)\Omega}e^{\mathit{i}\Omega t} d\Omega, \nonumber \end{equation} leading to, by the definition of group delay, \begin{equation} (f*H)(t) = g(t-\tau(\omega_c))e^{\mathit{i}(\omega_c t + \phi(\omega_c))}. \nonumber \end{equation} Thus the envelope $g(t)$ of a signal at frequency $\omega_c$ is shifted by an amount of $\tau(\omega_c)$. Systems where $\tau(\omega)$ is negative for a range of $\omega$ are said to contain a negative group delay, and the output of these systems will anticipate the envelope of signals within this band \citep{Bariska2008, Mitchell1997, Woodley2004}. \subsection{Group delay for filtered signals} For a broad-band signal $f(t)$ filtered by a narrow-band filter $h_{\omega_c}(t)$ with a spectrum centered at $\omega_c$, we can show that the group-delay instead shifts the complete signal $(h_{\omega_c}*f)(t)$. Passing this signal through the same filter $H(t)$ as before gives \begin{equation} ((h_{\omega_c}*f)*H)(t) = \int( \widetilde{h}_{\omega_c} \cdot \widetilde{f})(\omega)e^{\mathit{i}\phi(\omega)} e^{\mathit{i}\omega t} d\omega. \nonumber \end{equation} Assuming that $\widetilde{h}_{\omega_c}(\omega)$ decays rapidly at both sides of $\omega_c$, we can use the same linear approximation as before, leading to \begin{equation} e^{\mathit{i}[\omega_c t + \phi(\omega_c)]}\int(\widetilde{h}_{\omega_c}\cdot\widetilde{f})(\Omega+\omega_c)e^{\mathit{i}\phi'(\omega_c)\Omega}e^{\mathit{i}\Omega t} d\Omega, \nonumber \end{equation} which shows that this results in a time-shift and scaling of the filtered signal: \begin{equation} ((h_{\omega_c}*f)*H)(t) = e^{\mathit{i}\phi(\omega_c)}(h_{\omega_c}*f)(t-\tau(\omega_c)). \nonumber \end{equation} So for signals filtered narrowly around a frequency $\omega_c$ it is the complete signal that is shifted by an amount $\tau(\omega_c)$. \section{... in the FitzHugh-Nagumo model}\label{sec:fhn} The FitzHugh-Nagumo model \citep{FitzHugh1961, Nagumo1962} describes the dynamics of the membrane potential $v$ of a neuron alongside a recovery variable $w$: \begin{align}\label{eq:fhn} \frac{dv}{dt} &= v-\frac{v^3}{3} - w + I \nonumber \\ \frac{dw}{dt} &= a(v+b-cw), \end{align} with three parameters: $a$, determining the timescale of the dynamics of $w$; an offset $b$; and $c$ which influences the slope of the $w$-nullcline and decay rate of $w$. The fixed point $\bar{p}(\bar{v},\bar{w})$ of (\ref{eq:fhn}) can be easily found by solving the cubic equation $\bar{v}^3+(1/c-1)\bar{v}+b/c=I$ and plugging the resulting value for $\bar{v}$ into the equation $\bar{w}=(\bar{v}+b)/c$. For low-amplitude input $I$, if the fixed-point is stable we can approximate the cubic term $v^3$ by its Taylor series at $\bar{v}$, allowing the equation for the voltage evolution of (\ref{eq:fhn}) to be approximated by that of an approximated membrane potential $x=\bar{v}+\epsilon$, with governing equation \begin{equation}\label{eq:fhnvapp} \frac{dx}{dt} = x - \frac{\bar{v}^3}{3} - \bar{v}^2(x-\bar{v}) - w + I + O(\epsilon^2) \end{equation} which is a linear first order differential equation. It is then straightforward to obtain the spectrum of the dynamics of $x$: \begin{equation}\label{eq:fhn_spec} \widetilde{x}(\omega) = \frac{\widetilde{I}(\omega) + \text{DC}(\omega)}{\bar{v}^2-1+\mathit{i}\omega+\frac{a}{ac+\mathit{i}\omega}}, \end{equation} with direct term $\text{DC} = [ab/(ac+\textit{i}\omega)+(1-1/3)\bar{v}^3]\delta(\omega)$. If we ignore the DC term, dividing $\widetilde{x}$ by $\widetilde{I}$ leads to the transfer function $\widetilde{H}(\omega)$ of $v$ close to $\bar{v}$. \begin{figure} \subfloat[$|\widetilde{H}(\omega)|$\label{fig:mH}]{\includegraphics[width=0.5\columnwidth]{figs/Fig01a}} \subfloat[$\angle \widetilde{H}(\omega)$\label{fig:pH}]{\includegraphics[width=0.5\columnwidth]{figs/Fig01b}} \caption{\textbf{Transfer function $\widetilde{H}(\omega)$} of the linearised voltage variable of the FitzHugh-Nagumo model. a) theoretical magnitude response (black lines) and the output spectrum obtained by numerical integration of the non-linear equations (grey connected symbols). b) theoretical phase response of linearised equations. Both panels show curves for different values for $b$}\label{fig:H} \end{figure} Figures \ref{fig:mH} and \ref{fig:pH} show, respectively, the magnitude- and phase-transfer functions of the linearised voltage variable (solid lines) and the spectrum of the original non-linear equation obtained numerically (dashed lines) for different parameters. The phase-spectrum is the argument of the transfer-function \begin{equation} \angle \widetilde{H}(\omega) = \tan^{-1}\left(\frac{a\omega/(a^2c^2+\omega^2)-\omega}{\bar{v}^2-1+a^2c/(a^2c^2+\omega^2)}\right), \nonumber \end{equation} whose additive inverse differentiated with respect to $\omega$ gives the group delay \begin{align}\label{eq:gd} \tau(\omega) &= -\frac{d}{d\omega}\tan^{-1}\left(\frac{ a\omega/(a^2c^2+\omega^2)-\omega}{\bar{v}^2-1+a^2c/(a^2c^2+\omega^2)}\right) \nonumber \\ &= -\frac{\frac{a^3c-2a((\bar{v}^2-1)+ac)\omega^2}{(a^2c^2+\omega^2)^2}+\frac{a(\bar{v}^2-1)-a^2c}{a^2c^2+\omega^2}-(\bar{v}^2-1)}{[\omega a/(a^2c^2+\omega^2)-\omega]^2 + [(\bar{v}^2-1)+a^2c/(a^2c^2+\omega^2)]^2}. \end{align} In order for (\ref{eq:gd}) to be negative we need \begin{equation}\label{eq:ineq} A\omega^4 + B\omega^2 + C < 0, \end{equation} where \begin{align} &A := (\bar{v}^2-1) \nonumber \\ &B := (\bar{v}^2-1)(2a^2c^2 + a) + 3a^2c \nonumber \\ &C := (\bar{v}^2-1)(a^4c^4-a^3c^2) + a^4c^3 - a^3c. \nonumber \end{align} The l.h.s. of (\ref{eq:ineq}) has a real positive root only if $B^2-4AC \geq 0$ given by \begin{equation} \omega_0 = \sqrt{\left|\frac{\sqrt{B^2-4AC}-B}{2A}\right|}. \nonumber \end{equation} Using the slope of (\ref{eq:ineq}) at this zero-crossing \begin{equation} \left. \frac{d}{d\omega}A\omega^4+B\omega^2+C\right\rvert_{\omega = \omega_0} = 4A\omega_0^3 + 2B\omega_0, \nonumber \end{equation} noting that $0<\omega_0^2<a$ and that for stable fixed-points $\bar{v}^2-1+ac>0$, we obtain the result that (\ref{eq:fhnvapp}) has a frequency band with negative group delay for $\omega<\omega_0$. The group delay is maximally negative for $\omega=0$ and increases monotonically to $\omega=\omega_0$, meaning that the envelope of signals with frequencies $0<\omega<\omega_0$ are transmitted with a negative delay. For high frequencies (\ref{eq:gd}) tends to the limit \begin{equation} \lim_{\omega\to\infty}\tau(\omega) = 0^+, \nonumber \end{equation} thus high frequencies are transmitted without significant delay or anticipation. In fact, for the canonical case in which the timescales of $v$ and $w$ are sufficiently separated, $a\ll1$, the group delay approaches this limit fast for $\omega>1$. The group delay is then maximal for $\omega_0<\omega<1$. \begin{figure} \includegraphics[width=.9\columnwidth]{figs/Fig02} \caption{\textbf{Group delay function $\tau(\omega)$} of the voltage variable of the linearised FitzHugh-Nagumo model for different values for parameter $b$}\label{fig:gd} \end{figure} Figure \ref{fig:gd} shows the group delay function $\tau(\omega)$ for some different parameters. \section{Anticipation of signals}\label{sec:res} Group delay affects the envelope of band-limited signals, so the types of signals for which the group delay of the membrane potential will have an effect are the modulations of `constant' band-limited signals. The linear approximation of $\phi(\omega)$ at $\omega=\omega_c$ during the illustration of the group delay implies, as stated before, that the frequency spectrum of the modulation needs to have a low-pass characteristic, so that the spectrum of the modulation is narrow around $\omega=0$. In the following the anticipation of different types of signals by the voltage variable of the non-linearised model neuron are shown numerically. In order to differentiate between the effects of the phase delay $-\phi(\omega)/\omega$ and the group delay the simulations are carried out with a chain of $17$ model neurons, thus leading to a total expected group delay of $17\tau(\omega)$. In each run the first in the chain of neurons receives an input $I_0(t)$, and the subsequent neurons receive an input directly from the membrane potential of each previous neuron \begin{equation} I_i(t) = \eta[v_{i-1}(t)-v_0], \text{ for $i=1,2,3,\ldots$} \nonumber \end{equation} with coupling strength $\eta$. For each simulation all neurons have parameter values $a=0.08$, $b=0.7$ and $c=0.8$, leading to a negative group delay for frequencies below $ \omega_0/(2\pi) = \nu_0 \approx$\SI{15.14}{\hertz} (c.f. fig.\ref{fig:gd}), and $\eta = 0.95 |H(\omega)|^{-1}$. Since $\tau(\omega)$ is not flat for $\omega < 1$, considerable frequency smearing is expected even for narrow-band signals in this range. Therefore, in the following numerical examples it is not expected that the magnitude of the observed time-shift corresponds absolutely to the theoretical prediction but, as will be shown, the time-shifts correspond qualitatively to the shape of $\tau(\omega)$ and in most cases agree well on the magnitude of the time-shift as well. \subsection{Wave pulses} The classical way to show the effects of group delay is to use wave pulses: sinusoidal signals of different frequencies modulated by a windowing function. These signals would correspond to short oscillatory bursts, which could indicate or establish transient coordination of the activity of otherwise independent elements \citep{Kuramoto1975, Strogatz2000, Winfree1967}, which is proposed to underly processes in the brain \citep[e.g.][]{Buzsaki2006, Gray1989, Varela2001}. In a more general sense signals of this type are amplitude modulated signals, in which the amplitude of a (high frequency) carrier signal is modulated by a lower frequency signal which is to be transmitted. The windowing function used in the following is a Gaussian pulse \begin{equation} g(t) = e^{-\alpha t^2}\nonumber \end{equation} of width $\sigma$, which has a spectrum of the form \begin{equation} \widetilde{g}(\omega) =\sqrt{\frac{\pi}{\alpha}}e^{-\frac{\omega^2}{4\alpha}}, \nonumber \end{equation} which is centered at $\omega=0$ and whose magnitude $|\widetilde{g}(\omega)|$ has a fast roll off depending on $\alpha$. Thus for wide enough Gaussian pulses, leading to small values for $\alpha$, the linear approximation of the phase-spectrum should hold. The top panels of fig.\ref{fig:wavepulse} show the input wave pulses with carrier frequencies of $\nu_c=\nu_0/2\approx$\SI{7.57}{\hertz} (left-panel) and $\nu_c=2\nu_0\approx$\SI{30.28}{\hertz} (right-panel), falling, respectively, into the negative group delay band and a band near the maximal group delay of the membrane potential (c.f. Fig.\ref{fig:gd}). The middle panels show the membrane potential of the last neuron in a chain of $17$ cascaded model neurons, in which the first neuron received the wave pulse as in the first panel \begin{equation} I_0(t) = e^{-\alpha(t-t_0)^2}A\sin\left({\omega_c t}\right) \nonumber \end{equation} at time $t=t_0$ with carrier frequency $\omega_c$ and amplitude $A=$\SI{1e-2}. \begin{figure} \subfloat[$\omega_c=\omega_0/2$\label{fig:wavepulse_ngd}]{\includegraphics[width=.5\columnwidth]{figs/Fig03a}} \subfloat[$\omega_c=2\omega_0$\label{fig:wavepulse_pgd}]{\includegraphics[width=.5\columnwidth]{figs/Fig03b}} \caption{\textbf{Anticipation and delay of Gaussian wave pulses} with carrier frequency within the negative and positive, respectively, group delay band by a chain of model neurons} \label{fig:wavepulse} \end{figure} The bottom panels of Fig.\ref{fig:wavepulse} show the amplitude envelope of the input signal (solid lines) and that of the last neuron (dashed lines), measured as the output of a strong lowpass filter, for the two different signals. In the membrane potential of the last neuron, a clear shift forward in time of the signal envelope is visible for signals in the negative group delay band (bottom left panel), in agreement with the group delay predicted by (\ref{eq:gd}), whereas the envelope of the signal in the positive group delay band is delayed (bottom right panel). \begin{figure} \includegraphics[width=.9\columnwidth]{figs/Fig04} \caption{\textbf{Peak correlation time versus $\omega_c$} for Gaussian wave pulses. Numerical (connected dots) alongside theoretical (solid black line) group delay}\label{fig:wavepulse_shape} \end{figure} The time-shift versus pulse-carrier frequency is shown by fig.\ref{fig:wavepulse_shape} which shows the time lag (y-axis) of the peak in the correlation of the membrane potential of the first neuron, receiving an input Gaussian pulse with carrier frequency $\omega_c$ (x-axis), with the membrane potential of the last of the chain of $17$ neurons. It is visible that the numerical results (connected dots) agree well with the expected group delay $\tau(\omega_c)$ (solid black line). \subsection{Filtered noise} Pure sinusoidal signals, even though they allow simple analyses, are rare. More commonly, biological and physical signals are considered to be noisy \citep[e.g.][]{Barkai2007, Ermentrout2008, Lindner2004, Selimkhanov2014, Tsimring2014}. In the following it is shown, as anticipated, that the membrane potential of the model neuron also anticipates the fluctuations of band-limited white noise input. An ideal zero-mean Gaussian white noise $\xi(t)$ with variance $\sigma^2$ has a flat, wide-band, power spectral density $|\widetilde{\xi}(\omega)|^2 = \int \sigma^2 \delta(t)e^{-\mathit{i}\omega t}dt = \sigma^2$. In the following $\xi(t)$ is a normal Gaussian noise, thus $\sigma^2=1$. This signal will be filtered by a Gaussian filter centered at a frequency $\omega_c$ and a narrow band-width determined by $0<\alpha\ll 1$. Thus the first neuron receives an input with spectrum \begin{equation} \widetilde{I}_0(\omega) = A_0 e^{-\frac{(\omega-\omega_c)^2}{4\alpha}} \widetilde{\xi}(\omega). \nonumber \end{equation} Such narrow band filtering of sub-threshold inputs can arise due to signal transmission with heterogeneous transmission delays between neurons \citep{Houben2020a}. \begin{figure} \subfloat[$\omega_c=\omega_0/2$\label{fig:bpnoise_ngd}]{\includegraphics[width=.5\columnwidth]{figs/Fig05a}} \subfloat[$\omega_c=2\omega_0$\label{fig:bpnoise_pgd}]{\includegraphics[width=.5\columnwidth]{figs/Fig05b}} \caption{\textbf{Anticipation and delay of band-limited noise pulses} with pass-band within a negative and positive group delay band, respectively}\label{fig:bpnoise} \end{figure} The left column of fig.\ref{fig:bpnoise} shows the results of the chain of model neurons being driven by a band-limited noise with center-frequency $\nu_c=\nu_0/2\approx$ \SI{7.57}{\hertz}, and $\alpha=$\SI{1e-4} falling within the negative group delay band. The top panels show a section of one input signal (top most panel) together with the membrane potential of the last neuron in the chain (second to top panel) in response to that signal. The bottom most panel shows the envelope of the input (solid line) and that of the membrane potential of the last neuron (dashed line). The right panel shows the same, but for an input with $\nu_c = 2\nu_0 \approx$ \SI{30.28}{\hertz}. \begin{figure} \includegraphics[width=.9\columnwidth]{figs/Fig06} \caption{\textbf{Peak correlation time versus $\omega_c$} for filtered noise input. Numerical results (connected symbols) for different filtering band-widths, alongside theoretical group delay (solid black line)}\label{fig:bpnoise_shape} \end{figure} Fig.\ref{fig:bpnoise_shape} shows the time lag of the first peak in the correlation function between a filtered noise input with center-frequency $\omega_c$ (x-axis) and the membrane potential of the model neuron receiving the input (connected symbols), for different filtering bandwidths $\alpha$. The solid black line shows the theoretical group delay $\tau(\omega_c)$. \subsection{Modulated \& filtered noise} In the foregoing section the noise considered was stationary, however it is likely that in biological and physical settings the noise sources evolve over time. In addition, modulations of stationary noise sources can serve as a form of signalling through a medium. Such as mean- and variance-modulation as proposed `communication channels' for neurons and neural networks \citep[e.g.][]{Herfurth2019, Lindner2001} Considering a noise signal subjected to slow mean- and variance-modulation, $g_\mu(t)$ and $g_\sigma(t)$, \begin{equation} f(t) = g_\mu(t) + g_\sigma(t)\xi(t), \nonumber \end{equation} with either the result $f(t)$ or the input noise $\xi(t)$ being passed through a band-pass filter as before. Clearly in each case the noise signal will be affected by the group delay, if the pass-band falls within a frequency range exhibiting a group delay. It is also apparent that in both cases the mean-modulation $g_\mu(t)$ will not be affected by the group delay, and thus will be passed without delay or advance. The variance-modulation however will be affected, but only in case of the noise signal being band-limited before the variance modulation, which is easily understood from the fact that the power of $g_\sigma(t)$ is focussed outside of the pass band of the band-limited filter and thus will only serve as an amplitude modulation to the higher frequency noise signal. \section{Conclusion} In this paper it is shown that the dynamics of the voltage variable of the FitzHugh-Nagumo model posesses a negative group delay for slowly fluctuating inputs, by finding an expression for the group delay of a linear approximation of the governing equation for the voltage variable at the fixed point of the model system. The effects of the group delay are demonstrated numerically for different types of signals and signal modulations and it is shown that a chain of uni-directionally coupled model neurons anticipates certain aspects of inputs if the input consists of a carrier signal with a frequency falling within the negative group delay band. \bibliographystyle{plain \input{article.bbl} \end{document}
{'timestamp': '2021-01-05T02:19:18', 'yymm': '2101', 'arxiv_id': '2101.00500', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00500'}
arxiv
\section{Introduction} The metro is a green and efficient travel mode that plays an ever-important role in urban transportation. An accurate real-time ridership/demand forecast is crucial for a metro system's efficiency and reliability. With the wide application of smart card systems and all kinds of sensors, forecasting the real-time metro ridership has become a research hotspot in recent years. Existing research mainly focuses on forecasting the short-term (e.g., 15 or 30 minutes) boarding or alighting ridership at metro stations, such as \cite{wei2012forecasting, sun2015novel, li2017forecasting, chen2019subway, liu2019deeppf, zhang2020deep}. In contrast, forecasting the short-term ridership at origin-destination (OD) pairs of a metro system receives little attention. The ridership among all OD pairs of a metro system can be organized into a matrix. For simplicity, an ``OD matrix'' in this paper refers to the ridership of this matrix at a certain (short) time interval. Forecasting metro OD matrices has much broader applications than the station-level ridership forecast. For example, by assigning OD matrices to a metro network, we can predict and thus regulate each metro train's crowdedness. The station-level boarding/alighting flow also can be calculated from an OD matrix. However, the real-time forecast of metro OD matrices is extremely difficult for the following reasons. (1) The first challenge is the \textit{high dimensionality}. The number of OD pairs of a metro system is squared of the number of stations, often tens of thousands in practice. Moreover, (2) short-term OD matrices of a metro system are \textit{sparse}, and the ridership/flow distribution within an OD matrix is highly \textit{skewed} (Fig.~\ref{fig:histogram}). Besides, unlike the boarding or alighting flow, (3) a metro system's OD matrices are not available in real-time (\textit{delayed data availability}). Because an OD matrix can only be obtained after all the trips belonging to the OD matrix have reached their destinations. Lastly, (4) the complex dynamics of a metro system are \textit{time-evolving}; a well-tuned model may have a short ``shelf life'' and has expensive retrain/re-tune costs in long-term maintenance. Although a few studies tried to forecast the real-time metro OD matrices by matrix factorization methods \citep{gong2018network, gong2020online} or deep learning models \citep{toque2016forecasting, zhang2021short, shen2020hybrid}, no existing solution overcomes all the four challenges above. To address the above challenges, this paper proposes an effective model for real-time metro OD matrices forecasting. We use the Dynamic Mode Decomposition (DMD) \citep{schmid2010dynamic}, a recent advance in the fluid flow community, to extract the dominating dynamics from the high-dimensional noisy OD sequence. We extend the original DMD model by a high-order vector autoregression to incorporate long-term temporal correlations. In dealing with the delayed data availability problem, we replace the unavailable latest OD matrices with snapshots of boarding flow. We consider the time-evolving dynamics and introduce a forgetting ratio to reduce the weights of old data exponentially. We name the proposed model High-order Weighted Dynamic Mode Decomposition (HW-DMD). Moreover, we develop a tailored online update algorithm that updates an HW-DMD's coefficients daily without storing historical data or retraining the model, which greatly reduces the model maintenance costs for long-term implementations. Finally, the proposed model is tested on a Guangzhou metro smart card dataset with 159 stations. Experiments show HW-DMD excellently handles the sparse, skewed, and noise OD data and significantly outperforms baseline models in both the OD matrices and the boarding flow forecast. The online update algorithm also shows consistent accuracy in updating an HW-DMD model over a long period. The online HW-DMD model is applied to the metro OD matrices forecast problem, but it can be readily applied to general (high-dimensional) traffic flow forecast problems, such as in recent studies about DMD-based traffic flow forecasting \citep{avila2020data, yu2020low}. We summary main contributions of this paper as follows: \begin{itemize} \item This paper proposes an HW-DMD model that addresses various difficulties of the real-time metro OD matrices forecasting. Experiments show the forecast of HW-DMD is significantly better than conventional models. \item The time-evolving dynamics of a transportation system and the maintenance of a forecast model are often ignored in the literature. This paper considers the time-evolving feature of a metro system by reducing the weights for old data and shows improved performance. An online update algorithm is proposed to reduce the long-term maintenance cost of the HW-DMD model under a time-evolving metro system. \end{itemize} The remainder of this paper is organized as follows. We review related work on the short-term OD matrices forecasting in section \ref{cha5_sec:literature}. Next, a description of the metro OD matrices forecasting problem is presented in section \ref{sec:problem}. Section \ref{sec:DMD} briefly introduces the DMD algorithm, which serves as the base for the proposed HW-DMD model. Section \ref{sec:HW-DMD} is the core part of this paper, where the model specification, estimation, and the online update method for HW-DMD are elaborated. Section \ref{sec:experiments} is about experiments on the Guangzhou metro dataset. Conclusions and future directions are summarized in section \ref{sec:conclusions}. \section{Related Work}\label{cha5_sec:literature} In the literature, only a few studies have explored the real-time OD matrix forecasting problem for a ``metro'' system. Therefore, we extend the range to OD demand forecasting for general road transportation modes, such as the ride-hailing system and the highway tolling system. Note that for a ride-hailing system, the origins and destinations are often defined as zones on a grid. Matrix/tensor factorization is an effective method to tackle the high-dimensionality problem of OD matrix forecasting. For example, \cite{ren2017efficient} applied Canonical Polyadic (CP) decomposition to an $origin \times destination \times vehicle\_type \times time$ tensor from highway tolling data. Time series models were then built on the latent temporal matrix to forecast OD matrices. \cite{dai2018short} and \cite{liu2020dynamic} used principal component analysis (PCA) to reduce the dimensionality of OD data and applied several machine learning models to the reduced data for OD flow forecasting. \cite{gong2020online} developed a matrix factorization model to forecast the OD matrices of a metro system. Their work highlights a solution to the delayed data availability problem and various spatial and temporal regularization techniques are introduced to improve the forecast. In summary, the matrix/tensor factorization-based OD matrix forecasting consists of two components: (1) a dimensionality reduction by factorization and (2) a forecasting model applied to the reduced data. Deep learning is another mainstream method for OD matrix forecasting. In an early study, \cite{toque2016forecasting} used Long Short-Term Memory (LSTM) networks to forecast the OD matrices of a transit network. They only applied the model to selected high-flow OD pairs because of the high dimensionality and sparsity problems. Convolutional Neural Networks (CNN) and Graph Convolutional Networks (GNN) are two deep learning models that greatly reduce the model size compared with a fully connected neural network. Recently, using CNN/GCN to capture spatial correlations and LSTM to capture temporal correlations started to become the ``standard configuration'' for deep learning-based OD matrix forecasting. For example, \cite{chu2019deep} used multi-scale convolutional LSTM to forecast the real-time taxi OD demand, and \cite{wang2019origin, wang2020multi} used multi-task learning to improve the OD flow forecast of GCN+LSTM networks. A large body of literature focused on better utilizing the spatial/semantic correlations by optimizing the GNN structure or incorporating side information. Such as the local spatial context used by \cite{liu2019contextualized}, the Spatio-Temporal Encoder-Decoder Residual Multi-Graph Convolutional network (ST-ED-RMGC) proposed by \cite{ke2021predicting}, and the Dynamic Node-Edge Attention Network (DNEAT) developed by \cite{zhang2021dneat}. Some studies combined deep learning models with other models to complement each other. In this direction, \citep{xiong2020dynamic} combined GCN with Kalman filter to forecast the OD matrices of a Turnpike network. \cite{shen2020hybrid} mixed CNN with a Gravity model to forecast OD matrices of a metro system. \cite{hu2020stochastic} considered the travel time between OD pairs as a stochastic variable, and developed a stochastic OD matrix forecasting model based on tensors factorization and GCN. \cite{noursalehi2021dynamic} used discrete wavelet transform to decompose OD matrices into frequency domain; the outputs were fed into CNN and Convolutional-LSTM networks for forecasting. The performances of deep learning models are often impaired by the noise in sparse metro OD matrices. To reduce the impact of the noise, \cite{zhang2019short, zhang2021short} developed a metric called OD attraction degree (ODAD) to mask insignificant OD pairs. \cite{zhang2019short} showed that masking near-zero OD pairs improves the forecasting accuracy of an LSTM. Based on ODAD, \cite{zhang2021short} developed a Channel-wise Attentive Split-CNN (CAS-CNN) model for metro OD matrix forecasting. Another merit of this work is they considered the delayed data availability problem. In summary, matrix/tensor factorization, CNN, and GCN all aim to reduce model size while maintaining spatial/temporal correlations/dependencies. The HW-DMD model proposed in this paper belongs to the matrix factorization category. Although some ride-hailing systems may not have the delayed data availability problem, most research essentially omitted this problem for simplicity. Particularly, RNN-based deep learning models can barely work without the most recent OD matrices as inputs. In dealing with the delayed data availability problem, existing solutions \citep{gong2020online, zhang2021short, xiong2020dynamic} used alternative quantities (e.g., boarding ridership, link flow) to compensate for the unavailable OD information. We also adopt this approach in the proposed model. \section{Problem Description}\label{sec:problem} Many modern metro systems record passengers' entry and exit information using smart cards. We thus know the origin and destination stations, the start and end time for every trip in such a system. Given a fixed time interval (30 minutes in this paper), we denote by $o_{t,i,j}$ the number of trips that depart from station $i$ at the $t$-th interval to station $j$. We call $o_{t,i,j}$ an \textit{OD flow}. Next, we can describe the number of trips between every OD pair in the system at the $t$-th time interval by an \textit{OD matrix} \begin{equation*} O_t = \left[ \begin{matrix} o_{t,1,1}& \cdots& o_{t,1,s}\\ \vdots& \ddots& \vdots\\ o_{t,s,1}& \cdots& o_{t,s,s}\\ \end{matrix} \right]\in \mathbb{R}^{s\times s}, \end{equation*} where $s$ is the number of metro stations. The diagonal elements of a metro OD matrices are always zero. We keep these zero elements because they have a negligible effect on the forecast. In our model, OD matrices are organized in a vector form \begin{equation*} \mathbf{f}_t = \operatorname{vec}(O_t) = [o_{t,1,1}, \cdots, o_{t,s,1}, o_{t,1,2},\cdots, o_{t,s,2}, \cdots, o_{t,1,s}, \cdots, o_{t,s,s}]^\top\in \mathbb{R}^{n}, \end{equation*} where $n=s \times s$ is the number of OD pairs. For convenience, we refer to $\mathbf{f}_t$ as an \textit{OD snapshot}. Note that OD snapshots are aggregated by the time when passengers enter the system; the exit time might be in a different time interval. Therefore, the true OD snapshot for interval $t$ can only be obtained after all those passengers entered at interval $t$ have reached their destinations; it cannot be observed in real-time (i.e., the delayed data availability). In other words, we often do not have access to $\mathbf{f}_{t}$ when forecasting $\mathbf{f}_{t+1}$. In contrast, the boarding (entering) flow--another important quantity--is observable in real-time. We denote by $b_{t,i}$ the number of passengers entering station $i$ at interval $t$. In fact, we have $b_{t,i}=\sum_{j}{o_{t,i,j}}$. We define a \textit{boarding snapshot} as a vector $\mathbf{b}_{t}=[b_{t,1}, b_{t,2}, \cdots, b_{t,s}]^\top$. The OD matrices/flow forecasting problem is to forecast future OD snapshots $\mathbf{f}_{t+1}, \mathbf{f}_{t+2},\allowbreak \cdots, \mathbf{f}_{t+L}$ given a sequence of available historical OD snapshots $\mathbf{f}_{1}, \mathbf{f}_{2}, \cdots, \mathbf{f}_{t}$ and boarding snapshots $\mathbf{b}_{1}, \mathbf{b}_{2}, \cdots, \mathbf{b}_{t}$. The reason for using boarding snapshots is to compensate for the delayed data availability problem of recent OD snapshots. \section{Dynamic Mode Decomposition}\label{sec:DMD} Dynamic Mode Decomposition \citep[DMD,][]{schmid2010dynamic} is developed by the fluid dynamic community to extract dynamic features from high-dimensional data. To better illustrate our forecasting model, we briefly introduce DMD in this section. Consider using a linear dynamical system $\mathbf{f}_{i} \approx A \mathbf{f}_{i-1}$ for OD flow forecasting. Similar to many fluid problems, $n$ is huge for an OD snapshot and even storing $A\in \mathbb{R}^{n\times n}$ can be prohibitive. Therefore, DMD outputs the (leading) eigenvalues and eigenvectors of $A$ without calculating the expensive $A$. The eigenvectors of $A$ are referred to as the DMD modes and have clear physical meaning. Each DMD mode is associated with an oscillation frequency and a decay/growth rate determined by its eigenvalue. DMD is also connected to Koopman theory and can model complex non-linear systems by constructing proper measurements \citep{rowley2009spectral}. There are many variant algorithms for DMD. We only present the \textit{exact DMD} proposed by \cite{tu2014dynamic}, which is closely related to this paper. We arrange OD snapshots into $m$-column matrices $Y_i = [\mathbf{f}_{i-m+1}, \mathbf{f}_{i-m+2}, \cdots , \mathbf{f}_{i}] \in \mathbb{R}^{n \times m}$. Typically, $m \ll n$. The linear dynamical system follows $Y_{t} \approx A Y_{t-1}$. The exact DMD seeks the leading eigenvalues and eigenvectors of the best-fit linear operator $A$ by the following procedure. \begin{itemize} \item[1.] Compute the truncated singular value decomposition (SVD) of $Y_{t-1}\approx U\Sigma V^{\top}$, where $U\in \mathbb{R}^{n\times r}$, $\Sigma\in \mathbb{R}^{r\times r}$, and $V\in \mathbb{R}^{m\times r}$ and $r\ll m$. \item[2. ] Instead of computing the full matrix $A = Y_{t} Y_{t-1}^{+} \approx Y_{t}V\Sigma^{-1}U^{\top}$.\footnote{$(\cdot)^{+}$ denotes the Moore-Penrose inverse of a matrix.} We define a reduced matrix $\tilde{A}=U^{\top}AU \approx U^{\top}Y_{t}V\Sigma^{-1} \in \mathbb{R}^{r \times r}$. It can be proved that $\tilde{A}$ and $A$ have the same nonzero leading eigenvalues \citep{tu2014dynamic}. \item[3. ] Compute the eigenvalue decomposition $\tilde{A}W=W\Lambda$. The entries of the diagonal matrix $\Lambda$ are also the eigenvalues of the full matrix $A$. \item[4. ] The DMD modes (eigenvectors of $A$) can be obtained by $\Phi=Y_t V \Sigma^{-1} W$. \end{itemize} \begin{figure} \begin{center} \includegraphics[]{singular_value.pdf} \caption{The singular values of a ten-day-length $Y_{t-1}$ collected from Guangzhou metro smart card system.}\label{fig:singular value} \end{center} \end{figure} Figure~\ref{fig:singular value} shows the singular values of a ten-day-length $Y_{t-1}$ from the Guangzhou metro system. A few leading singular values explain a significant portion of the variance, confirming the low-rank feature of OD snapshots data. DMD-based model can thus greatly reduce the dimensionality/complexity of such a dynamic system. However, the exact DMD has some limitations for the OD flow forecasting problem. Firstly, the complex temporal correlation of OD flow cannot be well captured by a linear dynamical system. Moreover, using the last OD snapshot is impractical since OD snapshots cannot be observed in real-time. To address these problems, we propose our solution in the next section. \section{High-order Weighted Dynamic Mode Decomposition}\label{sec:HW-DMD} \subsection{Model specification}\label{sec:specification} The forecasting formula of an exact DMD amounts to a high-dimensional vector autoregression of order 1. However, the latest OD snapshots are unknown at the time of forecasting. Therefore, we use the two latest snapshots of the boarding flow as a replacement. We regard OD snapshots of three or more intervals ago as available; because we find more than 96\% trips in our data set are completed within one hour (two lags). And we can use a high-order vector autoregression to capture the long-term correlations in OD snapshots. The forecasting model follows \begin{equation} \mathbf{f}_{i} \approx A_{t, 1}\mathbf{f}_{i - q_1} + A_{t, 2}\mathbf{f}_{i-q_2} + \cdots + A_{t, h}\mathbf{f}_{i-q_h} + A_{t, b1}\mathbf{b}_{i-1} + A_{t, b2}\mathbf{b}_{i-2} \quad \forall i \in \{q_h+1, q_h+2, \cdots, t \}, \label{eq:model} \end{equation} where time lags for OD snapshots are positive integers satisfying $3\leq q_1 < \cdots < q_h < t$. Note that coefficient matrices $A_{t,1}, \cdots, A_{t,h}\in \mathbb{R}^{n\times n}$ and $A_{t,b1}, A_{t,b2}\in\mathbb{R}^{n\times s}$ are estimated using the data up to the latest ($t$-th) time interval; they are re-estimated when new data become available. This allows model coefficients to be time-varying. We will introduce how to update coefficient matrices using new observations without storing historical data in Section~\ref{sec:online}. To express Eq.~\eqref{eq:model} in a concise matrix form, let $Y_i = [\mathbf{f}_{i-m+1}, \mathbf{f}_{i-m+2}, \cdots , \mathbf{f}_{i}]$ and $B_{i}=[\mathbf{b}_{i-m+1}, \mathbf{b}_{i-m+2}, \cdots , \mathbf{b}_{i}]$, where $m=t-q_h$ is the number of target snapshots. Then, Eq.~\eqref{eq:model} is equivalent to \begin{align} Y_t & \approx A_{t, 1}Y_{t - q_1} + A_{t, 2}Y_{t-q_2} + \cdots + A_{t, h}Y_{t-q_h} + A_{t, b1}B_{t-1}+ A_{t, b2}B_{t-2}\label{eq:var matrix}\\ & =[A_{t,1},\ A_{t,2}, \cdots A_{t,h},\ A_{t, b1},\ A_{t, b2}] \left[ \begin{array}{c} Y_{t-q_1}\\ Y_{t-q_2}\\ \vdots \\ Y_{t-q_h}\\ B_{t-1}\\ B_{t-2} \end{array} \right]\\ & = G_t X_t, \end{align} where $G_t \in \mathbb{R}^{n\times (hn+2s)}$ and $X_t \in \mathbb{R}^{(hn+2s)\times m}$ are augmented matrices for coefficients and data, respectively. Note that with this approach, we model forecasting as a regression problem without considering the inter-sequence dependence. We next introduce a forgetting ratio $\rho$ ($0<\rho\le 1$) that assigns small weights on snapshots to past days. This is because the dynamics of the system may change over time and we prefer to use the most recent dynamics to achieve accurate forecasting. The matrix $G_t$ can be solved by the following optimization problem \begin{equation} \min_{G_t} \sum_{i=1}^{m}\rho^{\mathrm{day}(m)-\mathrm{day}(i)} {\left\| \mathbf{y}_i - G_t \mathbf{x}_i \right\|_F^2}, \label{eq:weighted loss} \end{equation} where $\mathbf{y}_i$ and $\mathbf{x}_i$ are the $i$-th column of $Y_t$ and $X_t$, respectively; $\mathrm{day}(i)$ represents the day of the snapshot $\mathbf{y}_i$. We assign the same weight for snapshots of the same day. The weight $\rho^{\mathrm{day}(m)-\mathrm{day}(m)}=\rho^{0}=1$ for the latest OD snapshot. For a snapshot in $j$ days ago, the weight is $\rho^{j}$, which decreases exponentially. This weighting idea is similar to works by \citet{alfatlawi2020incremental}, \citet{zhang2019online}, and \citet{kwak2020travel}. For convenience, we define $\sigma = \sqrt{\rho}$ and the weighted version of $Y_t$ and $X_t$ as \begin{align*} Y_t^w &= [\sigma^{\mathrm{day}(m)-\mathrm{day}(1)} \mathbf{y}_1, \ \sigma^{\mathrm{day}(m)- \mathrm{day}(2)} \mathbf{y}_2, \cdots, \mathbf{y}_m], \\ X_t^w &= [\sigma^{\mathrm{day}(m)-\mathrm{day}(1)} \mathbf{x}_1, \ \sigma^{\mathrm{day}(m)-\mathrm{day}(2)} \mathbf{x}_2, \cdots, \mathbf{x}_m]. \end{align*} Then, the optimization problem in Eq.~\eqref{eq:weighted loss} becomes an ordinary least squares problem \begin{equation} \min_{G_t} \left\| Y_t^w - G_t X_t^w\right\|_F^2. \label{eq:weighted loss2} \end{equation} \begin{figure} \begin{center} \includegraphics[width=0.9\textwidth]{framework.pdf} \caption{Model framework for HW-DMD. Model input $X$ contains $hn$ rows for lagged OD snapshots and $2s$ rows for lagged boarding snapshots. Columns in $Y$ and $\hat{Y}$ are, respectively, real and forecasted snapshots for OD flow. Model coefficients are estimated by weighted historical data ($X_t^w$ and $Y_t^w$) and updated daily whenever new data come.}\label{fig:framework} \end{center} \end{figure} Figure~\ref{fig:framework} summarizes the overall structure of the proposed higher-order weighted DMD (HW-DMD) framework. The underlying forecasting model is a high-order vector autoregression with the boarding flow as extra inputs. A forgetting ratio is introduced to decrease the weights of past data exponentially on a daily basis. In Section~\ref{sec:estimation}, we will introduce a dimensionality reduction technique based on DMD to find a low-rank solution for this large model (w.r.t. number of parameters). Instead of full matrices $A_{t, (\cdot)}$, we seek $\tilde{A}_{t, (\cdot)}$---much smaller matrices---to capture the system's dynamic. Finally, an online update method is proposed in Section~\ref{sec:online} to update the model coefficients incrementally without storing historical data. This provides a memory-saving solution that maintains an up-to-date model. Note that the same model framework can be easily extended to incorporate higher-order boarding flow or other external covariates (e.g., days of the week, alighting flow, holidays). For example, we can represent days of the week by one-hot encoding $\mathbf{w}_i\in \mathbb{R}^{7\times 1}$ and add an additional regression term $A_{t,w} \mathbf{w}_i$ to Eq.\eqref{eq:model} to incorporate the weekly pattern. This paper only presents the model specified in Eq.~\eqref{eq:model} for illustration. \subsection{Model estimation}\label{sec:estimation} We prefer a low-rank approximation of $G_t$ over a full matrix of the optimal solution of Eq.~\eqref{eq:weighted loss2}. This is because storing the large full matrix is prohibitive, and the optimal solution often leads to overfitting problems, especially for the sparse and noisy OD data. Luckily, we can find a pretty good approximation thanks to the inherent low-rank nature of OD data. Similar to the exact DMD, we first compute the truncated SVD on the weighted augmented data matrix $X^w_t \approx U_{X} \Sigma_{X} V_{X}^{\top}$, where we keep the $r_{X}$ ($r_{X} \ll m$) largest singular values and $U_{X}\in \mathbb{R}^{(hn+2s) \times r_{X}}$, $\Sigma_{X}\in \mathbb{R}^{r_{X} \times r_{X}}$, $V_{X}\in \mathbb{R}^{m \times r_{X}}$. As shown in Figure~\ref{fig:singular value}, a few leading singular values can well capture the entire data. Therefore, an approximation for coefficient matrices is \begin{equation} G_t = Y_{t}^{w}X_{t}^{w+} \approx Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X}^{\top}, \label{eq:Gt} \end{equation} \begin{multline} [A_{t,1}, \cdots \ A_{t,h}, \ A_{t, b1}, \ A_{t, b2}] \approx \\ [Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X,1}^{\top}, \cdots, Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X,h}^{\top},\ Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X,b1}^{\top},\ Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X,b2}^{\top}], \label{eq:A} \end{multline} where $U_{X}^{\top} = [U_{X,1}^{\top}, \cdots, U_{X,h}^{\top}, \ U_{X,b1}^{\top}, \ U_{X,b2}^{\top}]$, $U_{X,1}, \cdots, U_{X,h} \in \mathbb{R}^{n \times r_X}$, and $U_{X,b1}, U_{X,b2} \in \mathbb{R}^{s \times r_X}$. This step uses the result from a truncated SVD to replace the original $X_t^w$, which reduces the impact of the noise in the data. The results computed from Eq.~\eqref{eq:Gt} and Eq.~\eqref{eq:A} are still prohibitive. Therefore, for each column in $Y_{t}^{w}$, we seek a transformation $\mathbf{y}_i^w \rightarrow \tilde{\mathbf{y}}_i^w$ such that $\tilde{\mathbf{y}}^w_{i} \in \mathbb{R}^{r_{Y}}$ with $r_{Y} \ll n$. In doing so, we compute another rank-$r_Y$ truncated SVD of the target matrix $Y^{w}_{t} \approx U_{Y} \Sigma_{Y} V_{Y}^{\top}$. The columns of $U_Y$ form an orthonormal basis; thus, the transformation $\tilde{\mathbf{y}}^w_i = U_{Y}^{\top} \mathbf{y}^w_i$ compute the coordinates of $\mathbf{y}^w_i$ on this basis, which compresses $y_i^w$ from $\mathbb{R}^n$ to $\mathbb{R}^{r_Y}$. We can project coefficient matrices onto the same basis $U_Y$ to greatly reduce the dimensionality: \begin{align} \tilde{A}_{t,i} &= U_{Y}^{\top} A_{t,i} U_{Y} \approx U_{Y}^{\top} Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X,i}^{\top} U_{Y}, \quad \forall i \in \{1,2,\cdots, h\}, \label{eq:coeff_tilde} \\ \tilde{A}_{t,bj} &= U_{Y}^{\top} A_{t,bj} \approx U_{Y}^{\top} Y^{w}_{t} V_{X} \Sigma_{X}^{-1} U_{X,bj}^{\top}, \quad \forall j \in \{1,2\}, \label{eq:coeff_tilde_b} \end{align} where $\tilde{A}_{t,i} \in \mathbb{R}^{r_Y\times r_Y}$ and $\tilde{A}_{t,bj}\in \mathbb{R}^{r_Y \times s}$. Finally, we can write the model of Eq.~\eqref{eq:var matrix} in the reduced-order subspace \begin{equation*} \tilde{Y}_{t} \approx \tilde{A}_{t,1}\tilde{Y}_{t - q_1} + \tilde{A}_{t,2}\tilde{Y}_{t-q_2} + \cdots + \tilde{A}_{t,h}\tilde{Y}_{t-q_h} + \tilde{A}_{t,b1}B_{t-1} + \tilde{A}_{t,b1}B_{t-2}, \end{equation*} where $\tilde{Y}_i = U_Y^{\top} Y_{i}$. The final forecast of an OD snapshot $\hat{\mathbf{y}}_i$ can be calculated by transforming back to the original basis by $\hat{\mathbf{y}}_i = U_Y \tilde{\mathbf{y}}_i$. With the reduced coefficient matrices $\tilde{A}_{t,(\cdot)}$ and projection bases $U_Y$, we avoid calculating and storing the giant coefficient matrices $A_{t,(\cdot)}$. DMD-based estimation is different from common dimensionality reduction techniques in several ways. For many matrix-factorization-based models and dynamic factor models, a forecasting model is estimated after performing dimensionality reduction \citep[e.g.,][]{ren2017efficient}, or latent factors are constructed by keeping the most temporal dynamics \citep[e.g.,][]{forni2000generalized, lam2011estimation, yu2016temporal}; the forecast ability is designed on the latent (size-reduced) data for these models. In contrast, DMD-based methods first estimate a forecasting model by a least-square fit of rank-reduced full-size data (i.e., Eq.~\eqref{eq:Gt}), next reduce the dimensionality of the linear operator by projecting to leading SVD modes (i.e., Eq.~\eqref{eq:coeff_tilde}--\eqref{eq:coeff_tilde_b}); the resulting linear operator captures the dynamics of the rank-reduced full-sized data. Although the forecast value $\hat{\mathbf{y}}_i$ by an HW-DMD is restricted on the column space of $U_Y$, it is already the best approximation in $\mathbb{R}^{r_Y}$ (in terms of Frobenius norm \citep{eckart1936approximation}) because the basis is determined by leading singular vectors. Besides, the rank truncation for the data also eases the noise and the overfitting problem. As noted by \citet{schmid2010dynamic}, accurate identification of more than the first couple modes can be difficult on noisy data sets without this truncation step. The major computational cost in parameter estimation of HW-DMD is the SVD part. Current numerical software can solve large-scale SVD very efficiently. Therefore, estimating the HW-DMD model is very fast. We can further derive the eigenvalues and eigenvectors of coefficient matrices $A_{t,i}$ \citep{proctor2016dynamic}. But this step is not necessary for our task, since they are not used to generate the forecast and there is no clear physical meaning for eigenvectors in a high-order vector autoregression. \subsection{Online update}\label{sec:online} A model trained by dated data may not reflect the recent dynamic in a system. Instead of retraining using entire data, we develop an online algorithm that updates HW-DMD day by day with new observations without storing historical data, as shown in Figure~\ref{fig:framework}. Similar algorithms for online DMD have been developed by \citet{hemati2014dynamic}, \citet{zhang2019online}, and \citet{alfatlawi2020incremental}. We extend the online DMD update algorithm to a high-order weighted version. To illustrate the update algorithm, we need to reorganize Eq.~\eqref{eq:Gt}--\eqref{eq:coeff_tilde_b}. Let $\tilde{X}_i^w=U_X^{\top}X_i^w$ and $\tilde{Y}_i^w=U_Y^{\top}Y_i^w$ be the projection of data to the coordinates of $U_X$ and $U_Y$, respectively. Using the fact $(U_X\tilde{X}_t^{w})^{+}=V_{X} \Sigma_{X}^{-1} U_{X}^{\top}$, we can rewrite Eq.~\eqref{eq:Gt} as \begin{align*} G_t & \approx Y^{w}_{t} (U_X\tilde{X}_t^{w})^{+} \\ & = Y^w_t \tilde{X}_t^{w\top} \left(\tilde{X}_t^w \tilde{X}_t^{w\top}\right)^{+} U_{X}^{\top}. \end{align*} Therefore, Eq.~\eqref{eq:coeff_tilde} and \eqref{eq:coeff_tilde_b} becomes \begin{align} \tilde{A}_{t,i} &\approx \tilde{Y}^w_t \tilde{X}_t^{w\top} \left(\tilde{X}^w_t \tilde{X}_t^{w\top}\right)^{+} U_{X,i}^{\top} U_{Y} = P Q_{X}^{+} U_{X,i}^{\top} U_{Y}\quad \forall i \in \{1, \cdots,h\},\label{eq:stream Gt} \\ \tilde{A}_{t,bj} &\approx \tilde{Y}^w_t \tilde{X}_t^{w\top} \left(\tilde{X}^w_t \tilde{X}_t^{w\top}\right)^{+} U_{X,bj}^{\top}= P Q_{X}^{+} U_{X,bj}^{\top}\quad \forall j \in \{1, 2\}, \end{align} where $P=\tilde{Y}^w_t \tilde{X}_t^{w\top} \in \mathbb{R}^{r_Y \times r_X}$ and $Q_{X} = \tilde{X}^w_t \tilde{X}_t^{w\top} \in \mathbb{R}^{r_X \times r_X}$. To facilitate the online update, we define an additional matrix $Q_{Y} = \tilde{Y}^w_t \tilde{Y}_t^{w\top}\in \mathbb{R}^{r_Y \times r_Y}$. After the reorganization, model coefficients are represented by three ``core'' matrices $P$, $Q_X$, $Q_Y$ and two projection matrices $U_X$, $U_Y$. Note these matrices are also time-varying. For simplicity, we omit the $t$ subscript and regard they are always ``up-to-date''. Moreover, there are two important properties for the core matrices. \begin{theorem}\label{p1} Given new observations $Y_{\mathrm{new}}\in \mathbb{R}^{n \times d}$ and $X_{\mathrm{new}}\in \mathbb{R}^{(hn+2s)\times d}$ from a new day, where $d$ is the number of snapshots per day. Under the same projection matrices, the new core matrices can be updated by \begin{align} P &\leftarrow \rho P + \tilde{Y}_{\mathrm{new}}\tilde{X}_{\mathrm{new}}^{\top},\label{eq:update P}\\ Q_X &\leftarrow \rho Q_X + \tilde{X}_{\mathrm{new}}\tilde{X}_{\mathrm{new}}^{\top},\label{eq:update Q_X}\\ Q_Y &\leftarrow \rho Q_Y + \tilde{Y}_{\mathrm{new}}\tilde{Y}_{\mathrm{new}}^{\top},\label{eq:update Q_Y} \end{align} where $\tilde{X}_{\mathrm{new}}=U_X^{\top}X_{\mathrm{new}}$ and $\tilde{Y}_{\mathrm{new}}=U_Y^{\top}Y_{\mathrm{new}}$. \end{theorem} \begin{proof} Given new observations $Y_{\mathrm{new}}\in \mathbb{R}^{n \times d}$ and $X_{\mathrm{new}}\in \mathbb{R}^{(hn+2s)\times d}$ from a new day, Under the same projection matrices, the new core matrix $P$ can be computed by \begin{align*} \tilde{Y}^w_{t+d} \tilde{X}_{t+d}^{w \top} &= [\sigma \tilde{Y}^w_{t},\ U_Y^{\top}Y_{\mathrm{new}}][\sigma \tilde{X}^w_{t},\ U_X^{\top} X_{\mathrm{new}}]^{\top}\\ &= [\sigma \tilde{Y}^w_{t},\ \tilde{Y}_{\mathrm{new}}][\sigma \tilde{X}^w_{t},\ \tilde{X}_{\mathrm{new}}]^{\top}\\ &=\sigma^2 \tilde{Y}^w_{t} \tilde{X}^{w \top}_{t} + \tilde{Y}_{\mathrm{new}} \tilde{X}_{\mathrm{new}}^{\top}\\ & = \rho P + \tilde{Y}_{\mathrm{new}} \tilde{X}_{\mathrm{new}}^{\top}. \end{align*} Therefore, $P$ can be updated by $P\leftarrow \rho P + \tilde{Y}_{\mathrm{new}} \tilde{X}_{\mathrm{new}}^{\top}$. Similar proof applies to $Q_X$ and $Q_Y$. \end{proof} \begin{theorem}\label{p2} Denote by $\bar{Y}_t^w = U_Y\tilde{Y}_{t}^{w}$ the recovered data from the reduced data. If $\mathbf{v}_i$ is the $i$-th eigenvector of $Q_Y$, then $U_Y \mathbf{v}_i$ is the $i$-th left singular vector of $\bar{Y}_t^w$. The same property applies to $Q_X$ and $\bar{X}_t^w = U_X\tilde{X}_{t}^{w}$. \end{theorem} \begin{proof} Compute SVD $\bar{Y}_t^w = \bar{U} \bar{\Sigma} \bar{V}^{\top}$, then \begin{align} & \bar{Y}_t^w \bar{Y}_t^{w\top} = \bar{U} \bar{\Sigma} \bar{V}^{\top} \bar{V} \bar{\Sigma}^{\top} \bar{U}^{\top} = \bar{U} \left(\bar{\Sigma}\bar{\Sigma}\right) \bar{U}^{\top},\\ & \left(\bar{Y}_t^w \bar{Y}_t^{w\top}\right) \bar{U} =\bar{U} \left(\bar{\Sigma}\bar{\Sigma}\right) = \bar{U} \bar{\Lambda}\label{eq:appendix1}. \end{align} Therefore, columns of $\bar{U}$ are the eigenvectors of $\bar{Y}_t^w \bar{Y}_t^{w\top}$ and the left singular vectors of $\bar{Y}_t^w$. Substitute $\bar{Y}_t^w \bar{Y}_t^{w\top}=U_Y Q_Y U_Y^{\top}$ to Eq.~\eqref{eq:appendix1}, we have \begin{align*} & \left(U_Y Q_Y U_Y^{\top} \right)\bar{U}= \bar{U} \bar{\Lambda}, \\ & Q_Y \left(U_Y^{\top} \bar{U}\right)= \left(U_Y^{\top} \bar{U}\right) \bar{\Lambda}. \end{align*} Define $V=U_Y^{\top} \bar{U}$. Then, each column $\mathbf{v}_i$ in $V$ is a eigenvector for $Q_Y$ and $U_Y \mathbf{v}_i=U_Y \left(U_Y^{\top} \bar{\mathbf{u}}_i\right) = {\mathbf{u}}_i$ is a singular vector of $\bar{Y}_t^w$. \end{proof} Theorem~\ref{p1} is used to update the core matrices in a memory-saving way. Theorem~\ref{p2} indicates we can use the eigenvectors of $Q_Y$ to approximate the left singular vectors of $Y_t^w$ (because $Y_t^w \approx \bar{Y}_t^w$), which is crucial for updating the projection matrices. Based on these properties, we summarize the online update algorithm in the following three steps. \begin{itemize} \item[1.] \textbf{Expand projection matrices}. Let $E_Y = Y_{\mathrm{new}}-U_{Y}U_{Y}^{\top}Y_{\mathrm{new}}$ and $E_X = X_{\mathrm{new}} - U_{X}U_{X}^{\top}X_{\mathrm{new}}$ be the residuals that cannot be represented by the column space of $U_X$ and $U_Y$. To incorporate these residuals, we expand projection matrices by $U_X\leftarrow[U_X, U_{E_X}]$ and $U_Y\leftarrow[U_Y, U_{E_Y}]$, where $U_{E_{X}}$ and $U_{E_{Y}}$ are the orthonormal bases (obtained by SVD or QR factorization) of $E_X$ and $E_Y$, respectively. \item[2.] \textbf{Update core matrices}. To align dimensions, we first pad $P$, $Q_X$, and $Q_Y$ with zeros on the dimensions where $U_X$ and $U_Y$ expanded. Then update core matrices by Eq.~\eqref{eq:update P}--\eqref{eq:update Q_Y}. \item[3.] \textbf{Compression}. The first two steps incorporate all new information at the cost of expanding dimensions. Next, we compress the model based on Theorem~\ref{p2}. Denote $V_X$ and $V_Y$ to be matrices composed by the leading $r_X$ and $r_Y$ eigenvectors of $Q_X$ and $Q_Y$, respectively. We can compress projection matrices by $U_X\leftarrow U_X V_X$, $U_Y\leftarrow U_Y V_Y$ to keep the leading singular vectors of $\bar{X}_{t+d}^w$ and $\bar{Y}_{t+d}^w$. The core matrices can be compressed accordingly by $Q_X\leftarrow V_X^{\top}Q_X V_X$, $Q_Y\leftarrow V_Y^{\top}Q_Y V_Y$, $P\leftarrow V_Y^{\top}P V_X$. \end{itemize} Besides the daily update, a more general setting can be updating the model for every $k$ intervals or only doing the compression step when $r_X$ or $r_Y$ exceeds a threshold. This paper adopts the daily update described above because metro systems often have a one-day periodicity. In terms of computational efficiency, the online update algorithm computes the SVD for $d$-column data matrices and eigenvalue decomposition of $Q_X$ and $Q_Y$. The computation has a constant cost every day and it is significantly faster than retraining using entire data. In terms of memory efficiency, historical data are not required when updating the model. All we need to store are three ``core'' matrices and two projection matrices. Regarding the error, the online algorithm does not take into account the previously truncated part. This impact is negligible because the truncated part contains mostly noise, and past data are forgotten exponentially. Our experiments in section~\ref{sec:effect_online} show the online algorithm performs pretty close to or even slightly better than retraining. \subsection{Connections with other DMD models} The proposed HW-DMD is closely related to Hankel-DMD \citep{brunton2017chaos, arbabi2017ergodic, avila2020data} and DMD with control \citep[DMDc,][]{proctor2016dynamic}. Hankel-DMD uses Hankel data matrices as input and output to model a non-linear dynamical system by a linear model; its DMD modes approximate to the Koopman modes. There is another model also named Higher Order DMD \citep[HODMD,][]{le2017higher}, which requires Hankelizing data in its estimation and is essentially similar to Hankel-DMD. Instead, the proposed HW-DMD uses raw snapshots as the output (the left side of Eq.~\eqref{eq:var matrix}) without using the Hankel structure. This formula is equivalent to a high-order vector autoregression model, which is neater and more suitable in the context of forecasting. Moreover, our model can use non-continuous orders and external variables (e.g., the boarding flow). Essentially, the external variables of our model can be regarded as the control term of a DMDc model. The three-step online update algorithm for HW-DMD in this paper inherits from the work of \citet{hemati2014dynamic}. The original algorithm was developed for the exact DMD introduced in Section~\ref{sec:DMD}. Besides, the online DMD proposed by \citep{zhang2019online} considers the decaying weight of data, but the constant projection matrix in their assumption restricts the update effect. \citep{alfatlawi2020incremental} proposed an online algorithm for weighted DMD using incremental SVD, which is a different technique from our method. Our contribution is extending the algorithm proposed by \citet{hemati2014dynamic} to a high-order weighted version with the consideration of external regression covariates. \section{Experiments}\label{sec:experiments} In this section, we compare the proposed HW-DMD with other forecasting models using real-world data. We begin with an introduction to data and experimental settings. Next, we compare model performances by forecasting the OD matrices and the boarding flow derived from the OD matrices. Finally, we examine the long-term effect of the online HW-DMD update algorithm. The code for experiments is available from \url{https://github.com/mcgill-smart-transport/high-order-weighted-DMD}. \subsection{Data and experimental settings} We examine HW-DMD using the metro smart card data from two cities, Guangzhou and Hangzhou. Both data sets record the origin, destination, and entry and exit time of each metro trip. We focus on the forecast of workdays and connect each Friday to the next Monday. Details of the two data sets are as follows: \begin{itemize} \item Guangzhou metro data: This data set covers around 301 million trips among 159 metro stations in Guangzhou from July 1st to Sept 30th, 2017. Guangzhou metro operates from 6:00 to 24:00. We use the first twenty weekdays (July 3rd to July 28th) as the training set, the following ten weekdays (July 31st to Aug 11th) as the validation set, and the following ten weekdays (Aug 14th to Aug 25th) as the test set. There are additional one-month data after the test set; we use these data to study the long-term effect of the online HW-DMD update algorithm. \item Hangzhou metro data\footnote{\url{https://doi.org/10.5281/zenodo.3145404}}: This is an open data set that covers 80 effective stations of Hangzhou metro from Jan 1st to Jan 25th, 2019. The operation hours are from 5:30 to 23:30. We use the first ten weekdays (Jan 1 to Jan 14) for training, the following four weekdays (Jan 15 to Jan 18) for validation, and the rest five weekdays (Jan 21 to Jan 25) for testing. \end{itemize} We aggregate OD snapshots by a 30-minute time interval, which means 36 snapshots per day for both cities. Note that a small interval may result in sparse OD matrices; we choose the 30-minute interval to balance the practical requirements. Figure~\ref{fig:histogram} shows the distribution of $o_{i,j}$ from an OD snapshot of a typical morning peak in Guangzhou. The distribution roughly follows a power law, with most OD pairs having small volumes while a few of them are significantly larger. The highly skewed distribution is very difficult to be properly handled by conventional forecasting models. \begin{figure} \begin{center} \includegraphics[]{OD_distribution.pdf} \caption{The histogram of $o_{i,j}$ in an OD snapshot of a morning peak in Guangzhou.} \label{fig:histogram} \end{center} \end{figure} The performance of a model is quantified using the root-mean-square error (RMSE), the weighted mean absolute percentage error (WMAPE), and the coefficient of determination (denoted as $R^2$): \begin{equation*}\label{eq:rmse} \text{RMSE}(\alpha, \hat{\alpha}) = \sqrt{\frac{1}{N} \sum_{i=1}^{N}{(\alpha_{i} - \hat{\alpha}_{i})^2}}, \end{equation*} \begin{equation*}\label{eq:wmape} \text{WMAPE}(\alpha, \hat{\alpha}) = \frac{\sum_{i}^{N}\left| \alpha_{i} - \hat{\alpha}_{i}\right|} {\sum_{i}^{N} \left| \alpha_{i}\right|} \times 100\%, \end{equation*} \begin{equation*}\label{eq:r2} R^{2}(\alpha, \hat{\alpha})=1-\frac{\sum_{i=1}^{N}\left(\alpha_{i}-\hat{\alpha}_{i}\right)^{2}}{\sum_{i=1}^{N}\left(\alpha_{i}-\bar{\alpha}\right)^{2}}, \end{equation*} where $\alpha$ and $\hat{\alpha}$ are, respectively, the real and predicted values; $\bar{\alpha}$ is the average value of $\alpha$; $N$ is the total number of elements under different time intervals and locations. The three performance metrics are computed for both OD flow $o$ and boarding flow $b$ (forecasted by $\hat{b}_{t,i}=\sum_{j}{\hat{o}_{t,i,j}}$). \subsection{Hyperparameters}\label{sec:hyperparameters} We use the online update algorithm for HW-DMD if not otherwise specified. Hyperparameters for HW-DMD include time lags $q_1, \cdots, q_h$, the SVD truncation rank $r_X, r_Y$, and the forgetting ratio $\rho$. These parameters are determined in a sequential order. We use the Guangzhou data set as an example to elaborate the hyperparameter tuning procedure. We first set $r_X=r_Y=100$ and $\rho=1$ and select time lags in a greedy manner. For time lags within one day ($3\leq q_i \leq36$), we repeatedly add a ``currently best'' time lag based on the RMSE of the validation set until a new lag brings no improvement or the number of lags reaches ten. This procedure selects \{3, 4, 8, 14, 19, 28, 30, 33, 35, 36\} as time lags. The considerable high-order time lags in the result indicate long-term auto-correlations of OD time series. For example, the lag 19 roughly equals a typical work duration (9.5 hours), which can be explained as a strong correlation between the departure trips for commuters in the morning and the returning trips in the afternoon \citep{cheng2021incorporating}. The metro OD flow is also highly regular; the largest several lags (e.g., 33, 35, and 36) capture the one-day periodicity. Next, we determine $r_X$ and $r_Y$ by a grid search from 20 to 100 at an interval of 10. The best $r_Y$ is 50. A larger $r_X$ than 100 still brings a marginal improvement, but we truncate $r_X$ at 100 to restrict the model size ($r_X$ affects the size of $U_X$ in the online update). Lastly, we set $\rho$ to be $0.92$ based on a line search from $0.8$ to $1$. As shown in Figure~\ref{fig:rho}, we can see assigning smaller weights for old data indeed improves the forecast. Because $0.92^{8}\approx 0.51$, using $\rho=0.92$ is roughly equivalent to halving the weight every eight days. \begin{figure} \begin{center} \includegraphics[]{tune_rho.pdf} \caption{The effect of $\rho$ to the forecast OD RMSE in the validation set of the Guangzhou data.}\label{fig:rho} \end{center} \end{figure} The hyperparameter tuning for the Hangzhou data set follows the same procedure. The selected hyperparameters for the Hangzhou data set are time lags=\{3, 4, 6, 14, 18, 19, 28, 32, 35, 36\}, $r_Y=40$, $r_X=100$, and $\rho=0.92$. \subsection{Benchmark models} We compare HW-DMD with the following benchmark models: \begin{itemize} \item HA: Historical Average. For the OD flow at a certain period (e.g., 7:00--7:30) of the day, HA uses the average OD flow at that period in the training set as the forecast value. \item TRMF: Temporal Regularized Matrix Factorization \citep{yu2016temporal}. TRMF is a matrix factorization model that imposes autoregression (AR) processes on each temporal factor. We use time lags $[1, \cdots ,10]$ for the AR processes. We search over \{100, 300, 500, 1000, 1500, 2000, 2500, 3000\} for the best regularization parameter and search from 30 to 150 with an interval of 10 for the best number of factors. \item ConvLSTM: Convolutional LSTM \citep{shi2015convolutional}. It is a deep recurrent neural network model that forecasts future frames of matrix time series (e.g., videos). Here we use it to forecast future OD matrices by the most recent ten OD matrices. Following the work by \cite{zhang2021short}, we apply a three-layer LSTM structure with eight, eight, and one filter, respectively, and set the kernel size to be $3\times3$ for all convolutional layers in the model. \item FNN: A two-layer Feedforward Neural Network. We use the OD snapshots of 3-10 lags ago and the boarding flow snapshot of 1-2 lags ago as the input features. We perform a grid search over the type of activation functions (linear, sigmoid, and relu) and the number of hidden layers (from 10 to 100 at an interval of 10) for the best model setting. \item SARIMA: Seasonal AutoRegressive Integrated Moving Average. We only use SARI-MA to forecast the boarding flow since SARIMA only handles one-dimensional time series. We use the order $\text{ARIMA}(2, 0, 1)(1, 1, 0)[36]$ for all the stations and fit 159 separate models. This model configuration is the same as \cite{cheng2021incorporating} and was tested to be suitable for most metro stations. \end{itemize} Applying TRMF, ConvLSTM, and FNN to the original data (or after a normalization) can hardly obtain a forecast better than HA. This phenomenon was also found by \cite{gong2018network, gong2020online}. This is because the OD data are high-dimensional, sparse, noisy, and highly skewed. To improve the forecast of these models, we apply TRMF, ConvLSTM, and FNN to the residuals after subtracting the HA from the original data. This ``mean-removal'' processing also weakens the data's periodicity; therefore, we do not use seasonal lags in these models. Besides, because the standard TRMF and ConvLSTM cannot use the boarding flow as extra inputs, we ignore the delayed data availability problem for these models and assume all historical OD snapshots are available. \subsection{Forecast result} We apply trained models to the test set and forecast OD matrices of the next three steps at each time interval. Note OD snapshots of 1-2 lags ago are unknown; they are replaced by previously forecasted OD snapshots when doing multi-step rolling forecasting by HW-DMD/FNN. Next, the boarding flow can be calculated from OD matrices. We compare the forecast accuracy of models in terms of OD flow and boarding flow. Table~\ref{tab:result_od} shows the results of OD flow forecast. We can see HW-DMD with a forgetting ratio $\rho=0.92$ outperforms other models in all evaluation metrics. Even the three-step forecast of HW-DMD is better than the one-step forecast of other models. The advantage of HW-DMD over other models is more significant in the Hangzhou data set. Although TRMF, FNN, and ConvLSTM are trained on the residuals after subtracting the HA from the original data, the improvement of these models compared with HA is limited. In contrast, HW-DMD is directly applied to the original data but provides a significantly better forecast, demonstrating its strong prediction power in handling the sparse, noisy, and high-dimensional OD data. Besides, the performance of the ``unweighted'' HW-DMD ($\rho=1$) is slightly behind the weighted version, but still better than other models. \begin{table}[!htbp] \centering\small \caption{Models' performance for OD flow forecasting.} \label{tab:result_od} \begin{tabular}{ccccc|ccc} \toprule \multirowcell{2}{Method} & \multirowcell{2}{Criterion} & \multicolumn{3}{c|}{Guangzhou} & \multicolumn{3}{c}{Hangzhou}\\ & & One-step & Two-step & Three-step & One-step & Two-step & Three-step \\ \hline \multirowcell{3}{HW-DMD \\ $\rho=0.92$} & RMSE & \textbf{3.05} & \textbf{3.09} & \textbf{3.11} & \textbf{3.36} & \textbf{3.41} & \textbf{3.44} \\ & WMAPE & \textbf{29.65\%} & \textbf{29.77\%} & \textbf{29.79\%} & \textbf{31.76\%} & \textbf{31.96\%} & \textbf{31.84\%} \\ & $R^2$ & \textbf{0.957} & \textbf{0.956} & \textbf{0.955} & \textbf{0.934} & \textbf{0.932} & \textbf{0.931} \\ \hline \multirowcell{3}{HW-DMD \\ $\rho=1$} & RMSE & 3.08 & 3.12 & 3.14 & 3.40 & 3.45 & 3.48 \\ & WMAPE & 29.71\% & 29.87\% & 29.91\% & 31.94\% & 32.22\% & 32.13\% \\ & $R^2$ & 0.956 & 0.955 & 0.954 & 0.933 & 0.930 & 0.929 \\ \hline \multirow{3}[2]{*}{TRMF} & RMSE & 3.22 & 3.24 & 3.26 & 3.80 & 3.89 & 3.96\\ & WMAPE & 30.61\% & 30.72\% & 30.79\% & 34.02\% & 34.48\% & 34.82\% \\ & $R^2$ & 0.952 & 0.951 & 0.951 & 0.916 & 0.912 & 0.908 \\ \hline \multirow{3}[2]{*}{FNN} & RMSE & 3.15 & 3.16 & 3.18 & 3.97 & 4.01 & 4.05\\ & WMAPE & 30.23\% & 30.28\% & 30.32\% & 33.58\% & 33.63\% & 33.65\% \\ & $R^2$ & 0.954 & 0.953 & 0.953 & 0.908 & 0.906 & 0.904 \\ \hline \multirow{3}[2]{*}{Conv-LSTM} & RMSE & 3.25 & 3.26 & 3.27 & 4.04 & 4.06 & 4.08\\ & WMAPE & 30.11\% & 30.18\% & 30.23\% & 32.96\% & 32.92\% & 33.04\% \\ & $R^2$ & 0.951 & 0.950 & 0.950 & 0.905 & 0.904 & 0.903 \\ \hline \multirow{3}[2]{*}{HA} & RMSE & 3.43 & 3.43 & 3.43 & 4.34 & 4.34 & 4.34\\ & WMAPE & 31.21\% & 31.21\% & 31.21\% & 34.28\% & 34.28\% & 34.28\% \\ & $R^2$ & 0.945 & 0.945 & 0.945 & 0.890 & 0.890 & 0.890 \\ \bottomrule \end{tabular} \end{table}% \begin{table}[!htbp] \centering\small \caption{Models' performance for boarding flow forecasting.}\label{tab:result_boarding} \begin{tabular}{ccccc|ccc} \toprule \multirowcell{2}{Method} & \multirowcell{2}{Criterion} & \multicolumn{3}{c|}{Guangzhou} & \multicolumn{3}{c}{Hangzhou}\\ & & One-step & Two-step & Three-step & One-step & Two-step & Three-step \\ \hline \multirowcell{3}{HW-DMD \\ $\rho=0.92$} & RMSE & \textbf{93.99} & 102.61 & 107.58 & \textbf{50.08} & \textbf{54.14} & \textbf{56.32}\\ & WMAPE & \textbf{6.09\%} & \textbf{6.68\%} & 6.98\% & \textbf{7.38\%} & \textbf{8.05\%} & \textbf{8.12\%} \\ & $R^2$ & \textbf{0.991} & \textbf{0.989} & 0.988 & \textbf{0.989} & \textbf{0.988} & \textbf{0.987} \\ \hline \multirowcell{3}{HW-DMD \\ $\rho=1$} & RMSE & 94.51 & \textbf{102.46} & 106.55 & 51.28 & 55.66 & 58.45\\ & WMAPE & 6.18\% & 6.74\% & 6.98\% & 7.54\% & 8.29\% & 8.43\% \\ & $R^2$ & 0.991 & 0.989 & 0.988 & 0.989 & 0.987 & 0.986 \\ \hline \multirow{3}[2]{*}{TRMF} & RMSE & 126.03 & 127.87 & 128.65 & 77.70 & 81.19 & 83.12 \\ & WMAPE & 7.92\% & 8.07\% & 8.13\% & 10.00\% & 10.55\% & 10.81\% \\ & $R^2$ & 0.983 & 0.983 & 0.983 & 0.975 & 0.972 & 0.971 \\ \hline \multirow{3}[2]{*}{FNN} & RMSE & 101.93 & 104.00 & \textbf{106.06} & 67.16 & 68.83 & 70.77 \\ & WMAPE & 6.44\% & 6.58\% & \textbf{6.69}\% & 9.00\% & 9.22\% & 9.50\% \\ & $R^2$ & 0.989 & 0.989 & \textbf{0.988} & 0.981 & 0.980 & 0.979 \\ \hline \multirow{3}[2]{*}{Conv-LSTM} & RMSE & 117.16 & 121.22 & 123.40 & 71.46 & 75.75 & 78.07 \\ & WMAPE & 6.87\% & 7.19\% & 7.35\% & 8.83\% & 9.63\% & 9.98\% \\ & $R^2$ & 0.985 & 0.984 & 0.984 & 0.978 & 0.976 & 0.974 \\ \hline \multirow{3}[2]{*}{HA} & RMSE & 136.56 & 136.56 & 136.56 & 88.25 & 88.25 & 88.25 \\ & WMAPE & 8.38\% & 8.38\% & 8.38\% & 11.09\% & 11.09\% & 11.09\% \\ & $R^2$ & 0.980 & 0.980 & 0.980 & 0.967 & 0.967 & 0.967 \\ \hline \multirow{3}[2]{*}{SARIMA} & RMSE & 110.23 & 120.60 & 126.52 & 55.59 & 60.97 & 64.66 \\ & WMAPE & 7.15\% & 7.65\% & 7.93\% & 7.86\% & 8.28\% & 8.50\% \\ & $R^2$ & 0.987 & 0.985 & 0.983 & 0.987 & 0.984 & 0.982 \\ \bottomrule \end{tabular}% \end{table}% Examining the aggregated boarding flow is important because it reflects if the forecast errors in OD matrices' are properly distributed, which is crucial when using OD matrices in traffic assignments. Moreover, the boarding flow itself is of interest to many applications. Table~\ref{tab:result_boarding} shows the boarding flow forecasting; all models except SARIMA calculate boarding flow by OD matrices. The two HW-DMD models are the best models in most cases. The only exception is that FNN slightly outperforms HW-DMD for the three-step forecast of the Guangzhou data set. Importantly, HW-DMD is the only model that outperforms SARIMA, a well-established boarding flow forecasting model, in both data sets, showing that the forecast of HW-DMD accurately reflects the marginal distribution of OD matrices. The magnitude of OD flow in a metro system varies significantly in time and space dimensions. Therefore, we further compare HW-DMD with other models under different scenarios. Figure~\ref{fig:error_distribution} (a) and (c) show the forecast RMSE at different times of a day. We can see the RMSE of HW-DMD is the smallest in most time slots, particularly for the Hangzhou data set. Other models, such as Conv-LSTM, perform slightly better in the early morning and late night, but the difference is close, and the total network OD flow of these periods is pretty small. Figure~\ref{fig:error_distribution} (b) and (d) show the forecast RMSE for OD pairs with different flow magnitudes. The forecast RMSE of HW-DMD is considerably lower than other models for high-flow OD pairs (average half-hour OD flow larger than $2^4$). Note the number of OD pairs drops exponentially with the increase of OD flow, showing the superior forecast capability of HW-DMD for highly skewed data. \begin{figure}[ht] \begin{center} \includegraphics[]{Error_distribution.pdf} \caption{The RMSE of OD flow forecasting at different times and different OD pairs. (a) and (c) shows the RMSE of OD matrix forecasting at every 30-minute interval, along with the total OD flow in the network. Using $2^i$ as boundaries, we divide OD pairs into groups according to their average half-hour OD flow; the forecast RMSE at each group and the number of OD pairs of each group are shown in (b) and (d).}\label{fig:error_distribution} \end{center} \end{figure} Finally, we show the real and one-step forecast of OD flow at four representative OD pairs of Guangzhou metro in Figure~\ref{fig:forecast}. The OD flow exhibits a clear daily periodicity, explaining why HA already works reasonably well. Compared with FNN, HW-DMD is better at forecasting the fluctuation of high-flow OD pairs, as shown in Figure~\ref{fig:forecast} (a) and (b). In Figure~\ref{fig:forecast} (a), the forecast of HW-DMD is often lower than the real value; this is hard to avoid since there is a two-lag delay when collecting the real OD flow. More OD pairs in the system are like Figure~\ref{fig:forecast} (c) and (d) with a low flow but high noise. Under such high volatility, the forecast by HW-DMD reflects a smooth average value. In fact, the performances of other models are often undermined by noise. The SVD truncation to the data greatly enhances HW-DMD's ability in handling the noise data (Figure~\ref{fig:singular value}). Overall, HW-DMD achieves a great balance between forecasting and noise reduction, which is particularly hard for such a high-dimensional system with diverse flow magnitudes. \begin{figure}[ht] \begin{center} \includegraphics[]{forecast.pdf} \caption{The real and forecasted time series of four selected OD pairs of Guangzhou metro. (a) is the busiest OD pair in the Guangzhou metro data set. (a) to (d) are in a flow decreasing order.}\label{fig:forecast} \end{center} \end{figure} \subsection{Effect of the low-rank assumption}\label{sec:impact_rank} The demands of majority OD pairs are small and sparse by nature, making it difficult for a forecasting model to distinguish random fluctuation (noise) and intrinsic dynamic patterns. Taking the OD pair shown in Figure~\ref{fig:forecast} (d) as an example, the randomness in this OD pair is quite large compared with its average flow (low signal-to-noise ratio). A good forecasting should be robust to the noise while maintaining accurate cumulative effects of OD pairs in total (e.g., the boarding flow). This section evaluates the impact of using the low-rank assumption on forecasting and noise filtering. According to Section~\ref{sec:estimation}, the forecast of HW-DMD is always on the column space of $U_Y$. Therefore, the best possible value of an OD snapshot $\hat{\mathbf{y}}_i$ calculated by HW-DMD is the rank-reduced full-size data, i.e., $U_Y U_Y^{\top}\mathbf{y}_i$, which is the upper bound of an HW-DMD's forecast ability. Figure~\ref{fig:low_rank_approx} shows how well this low-rank approximation fits the original data. We can see the low-rank approximation keeps most information for the high-demand OD pair of Figure~\ref{fig:low_rank_approx} (a). In contrast, most fluctuations in the sparse-demand OD pair of Figure~\ref{fig:low_rank_approx} (b) are truncated. By comparing with HA, we can see the low-rank approximation reflects the average daily pattern of the sparse-demand OD pair, which is a reasonable approximation when considering the cumulative effects of OD pairs. Therefore, the rank truncation is crucial for filtering the noise in a large number of sparse-demand OD pairs. \begin{figure}[ht] \begin{center} \includegraphics[]{low_rank_approx.pdf} \caption{Comparing OD flow with its low-rank approximation in two Guangzhou metro OD pairs. (a) and (b) corresponds to the (a) and (d) in Figure~\ref{fig:forecast}, respectively.}\label{fig:low_rank_approx} \end{center} \end{figure} \begin{table}[htbp] \centering\small \caption{The difference between original data and the low-rank approximation.} \label{tab:result_lowrank} \begin{tabular}{ccc|c} \toprule Variable & Criterion & Guangzhou & Hangzhou \\ \hline \multirow{3}[2]{*}{OD flow} & RMSE & 2.82 & 3.00 \\ & WMAPE & 28.80\% & 30.65\% \\ & $R^2$ & 0.963 & 0.947 \\ \hline \multirow{3}[2]{*}{Boarding flow} & RMSE & 64.15 & 36.89 \\ & WMAPE & 4.69\% & 5.95\% \\ & $R^2$ & 0.996 & 0.994 \\ \bottomrule \end{tabular}% \end{table}% Table~\ref{tab:result_lowrank} further quantitatively evaluates the differences between the original OD data and its low-rank approximation. The results in Table~\ref{tab:result_lowrank} are the forecast upper bound of HW-DMD under the current rank-reduced space. By comparing Table~\ref{tab:result_lowrank} with the forecast of HW-DMD in Table~\ref{tab:result_od} and Table~\ref{tab:result_boarding}, we can see that a significant portion of the forecast error of HW-DMD essentially attributes to the rank truncation, but there is still space to improve the current HW-DMD model (e.g., by higher order, larger $r_X$, more regression covariates). In choosing the rank-reduced space, the two rank parameters in HW-DMD balance the trade-off between forecast accuracy and model complexity. Based on the results of hyperparameter tuning, a further increase in rank $r_Y$ may result in overfitting (bringing the noise into the rank-reduced target data). We can further slightly improve the forecasting accuracy of HW-DMD by increasing the rank $r_X$ (related to the rank-reduced input data), but we here prefer a compact model with a smaller $r_X$ at the cost of slight accuracy loss. Lastly, the current HW-DMD chooses the rank-reduced space purely based on the leading singular values, which may be sensitive and not optimal when encountering significant data anomalies and failures \citep{duke2012error}. Using optimized DMD \citep{chen2012variants} or combined with an anomaly detection algorithm \citep{scherl2020robust} could further improve the current HW-DMD. \subsection{Effect of the online update}\label{sec:effect_online} The online update algorithm proposed in Section~\ref{sec:online} can update HW-DMD's parameters daily without storing historical data, which is computationally more efficient. On the Guangzhou metro training set, it takes $18.7\pm0.43$ seconds to train an HW-DMD model, while the online update only takes $1.0\pm0.03$ seconds for each day\footnote{We report the mean $\pm$ standard deviation of 20 runs. Tests were run on a computer with Intel$^\text{\tiny{\textregistered}}$ Core$^\text{TM}$ i7-8700 Processor and 24 gigabytes of RAM. Other benchmark models have much longer training time than HW-DMD (more than 1 minute for FNN and more than 20 minutes for TRMF and Conv-LSTM).} Besides the training time, we particularly care about if errors will accumulate if we keep using the online update algorithm for a long time. Therefore, we apply the online update algorithm to all the two-month data after the training set of the Guangzhou data set to evaluate its long-term effect. In comparison, we retrain two HW-DMD models (with $\rho$=0.92 and 1, respectively) every day using all historical data up until the latest. The results are shown in Figure~\ref{fig:longterm_online}. We summarize the key findings for Figure~\ref{fig:longterm_online} as follows: \begin{itemize} \item The RMSE of a constant model gradually increases over time. This indicates the metro system's dynamics are time-evolving; thus, forecasting models should be updated/retrained regularly for better performance. \item The RMSE curve of the online update algorithm clings to the model ($\rho=0.92$) retrained every day by entire historical data, showing the online HW-DMD update algorithm works consistently well in long-term applications. For a large training set (e.g., after September in Figure~\ref{fig:longterm_online}), the online update approach even performs slightly better than retraining. \item Properly reducing the weight for old data improves the forecast. Compare $\rho=0.92$ with $\rho=1$ for the two retrained models; the benefits of forgetting the old data become more significant as the training data increases. \item The OD flow of certain weekdays can be harder to forecast. Especially for the forecast of September. The RMSEs on Fridays are significantly higher on than other weekdays. \end{itemize} \begin{figure} \begin{center} \includegraphics[]{longterm_online.pdf} \caption{The evolvement of forecast RMSE under different HW-DMD update methods (Guangzhou data set). Each marker represents the RMSE of forecasted OD flow during a day. Numbered dates in the horizontal axis are Mondays; weekends are skipped.} \label{fig:longterm_online} \end{center} \end{figure} Many forecasting models do not consider the time-evolving dynamics of a metro system. Regular retraining can be prohibitive, especially for complicated models (e.g., deep learning models). This experiment shows the online update algorithm for HW-DMD is a memory-saving and accurate approach to keep an HW-DMD model up to date. \section{Conclusions and Discussion}\label{sec:conclusions} This paper proposes a high-order weighted dynamic mode decomposition (HW-DMD) model to solve the real-time short-term OD matrix forecasting problem in metro systems. Experiments show that HW-DMD significantly outperforms common forecasting models under the high-dimensional, sparse, noisy, and skewed OD data. Particularly, we address the delayed data availability problem and the time-evolving dynamics of metro systems, which are often ignored in the literature. The idea of the forgetting rate and online update in dealing with a time-evolving system is also beneficial for other forecasting models. Moreover, the implementation of HW-DMD is simple, and the computation is very efficient, providing a promising solution to general high-dimensional time series forecasting problems. We discuss several future research directions. (1) Current HW-DMD reshapes OD matrices into vectors for dimensionality reduction. However, performing dimensionality reduction directly on OD matrices may better utilize the column/row-wise correlations and produce more concise models \citep{chen2020autoregressive, gong2020online}. A difficulty in this direction is that the low-rank feature in metro OD matrices is relatively weak because the diagonal elements of metro OD matrices are all zeros. (2) Another future direction is to use a non-linear model instead of the current linear model in the reduced space, such as the deep factor model \citep{wang2019deep}. But a limitation for a non-linear model is that an online update method may be difficult to derive or even impossible. (3) Lastly, current HW-DMD uses external features, such as the boarding flow, simply as covariates. Incorporating more general features (e.g., weather, events) and network structure to improve the HW-DMD is worth investigating. \section*{Acknowledgement} This research is supported by the Natural Sciences and Engineering Research Council (NSERC) of Canada, Mitacs, exo.quebec (https://exo.quebec/en), and the Canada Foundation for Innovation (CFI). The code for HW-DMD is available at \url{https://github.com/mcgill-smart-transport/high-order-weighted-DMD}. \bibliographystyle{elsarticle-harv}
{'timestamp': '2022-06-15T02:22:00', 'yymm': '2101', 'arxiv_id': '2101.00466', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00466'}
arxiv
\section{Introduction} \begin{figure}[t] \centering \hspace*{-20pt} \includegraphics[width=1.05\columnwidth]{figures/few_shot_squad_intro.pdf} \caption{Performance of SpanBERT (red) and RoBERTa (yellow) base-size models on SQuAD, given different amounts of training examples. Our model (Splinter, green) dramatically improves performance. SpanBERT-base trained on the \emph{full} training data of SQuAD (blue, dashed) is shown for reference. } \label{fig:fail} \end{figure} \begin{figure*}[t!] \centering \includegraphics[width=\textwidth]{figures/rss_example.PNG} \caption{An example paragraph before (a) and after (b) masking recurring spans. Each color represents a different cluster of spans. After masking recurring spans (replacing each with a single \texttt{[QUESTION]} token), only one span from each cluster remains unmasked, and is considered the correct answer to the masked spans in the cluster. The pretraining task is to predict the correct answer for each \texttt{[QUESTION]}.} \label{fig:span_masking} \end{figure*} The standard approach to question answering is to pretrain a masked language model on raw text, and then fine-tune it with a span selection layer on top \cite{devlin-etal-2019-bert, joshi-etal-2020-spanbert, liu2019roberta}. While this approach is effective, and sometimes exceeds human performance, its success is based on the assumption that large quantities of annotated question answering examples are available. For instance, both SQuAD \cite{rajpurkar-etal-2016-squad,rajpurkar-etal-2018-know} and Natural Questions \cite{kwiatkowski-etal-2019-natural} contain an order of 100,000 question and answer pairs in their training data. This assumption quickly becomes unrealistic as we venture outside the lab conditions of English Wikipedia, and attempt to crowdsource question-answer pairs in other languages or domains of expertise \cite{tsatsaronis_overview_2015, Kembhavi_2017_CVPR}. How do question answering models fare in the more practical case, where an in-house annotation effort can only produce a couple hundred training examples? We investigate the task of few-shot question answering by sampling small training sets from existing question answering benchmarks. Despite the use of pretrained models, the standard approach yields poor results when fine-tuning on few examples (Figure~\ref{fig:fail}). For example, RoBERTa-base fine-tuned on 128 question-answer pairs from SQuAD obtains around 40 F1. This is somewhat expected, since the pretraining objective is quite different from the fine-tuning task. While masked language modeling requires mainly \textit{local} context around the masked token, question answering needs to align the question with the \textit{global} context of the passage. To bridge this gap, we propose (1) a novel self-supervised method for pretraining span selection models, and (2) a question answering layer that aligns a representation of the question with the text. We introduce \textit{Splinter} (\textbf{sp}an-\textbf{l}evel po\textbf{inter}), a pretrained model for few-shot question answering. The challenge in defining such a self-supervised task is how to create question-answer pairs from unlabeled data. Our key observation is that one can leverage \textit{recurring spans}: n-grams, such as named entities, which tend to occur multiple times in a given passage (e.g., \textit{``Roosevelt''} in Figure~\ref{fig:span_masking}). We emulate question answering by masking all but one instance of each recurring span with a special \texttt{[QUESTION]} token, and asking the model to select the correct span for each such token. To select an answer span for each \texttt{[QUESTION]} token \textit{in parallel}, we introduce a question-aware span selection (QASS) layer, which uses the \texttt{[QUESTION]} token's representation to select the answer span. The QASS layer seamlessly integrates with fine-tuning on real question-answer pairs. We simply append the \texttt{[QUESTION]} token to the input question, and use the QASS layer to select the answer span (Figure~\ref{fig:question}). This is unlike existing models for span selection, which do not include an explicit question representation. The compatibility between pretraining and fine-tuning makes Splinter an effective few-shot learner. Splinter exhibits surprisingly high performance given only a few training examples throughout a variety of benchmarks from the MRQA 2019 shared task \cite{fisch-etal-2019-mrqa}. For example, Splinter-base achieves 72.7 F1 on SQuAD with only 128 examples, outperforming all baselines by a very wide margin. An ablation study shows that the pretraining method and the QASS layer itself (even without pretraining) both contribute to improved performance. Analysis indicates that Splinter's representations change significantly less during fine-tuning compared to the baselines, suggesting that our pretraining is more adequate for question answering. Overall, our results highlight the importance of designing objectives and architectures in the few-shot setting, where an appropriate inductive bias can lead to dramatic performance improvements. \begin{figure*}[t] \centering \includegraphics[width=\textwidth]{figures/question_example.png} \caption{An example of our fine-tuning setup, taken from the development set of SQuAD. The question, followed by the \texttt{[QUESTION]} token, is concatenated to the context. The \texttt{[QUESTION]} token's representation is then used to select the answer span.} \label{fig:question} \end{figure*} \section{Background} \label{sec:background} Extractive question answering is a common task in NLP, where the goal is to select a contiguous span $a$ from a given text $T$ that answers a question $Q$. This format was popularized by SQuAD \cite{rajpurkar-etal-2016-squad}, and has since been adopted by several datasets in various domains \cite{trischler-etal-2017-newsqa,Kembhavi_2017_CVPR} and languages \cite{lewis-etal-2020-mlqa,clark-etal-2020-tydi}, with some extensions allowing for unanswerable questions \cite{levy-etal-2017-zero, rajpurkar-etal-2018-know} or multiple answer spans \cite{dua-etal-2019-drop, dasigi-etal-2019-quoref}. In this work, we follow the assumptions in the recent MRQA 2019 shared task \cite{fisch-etal-2019-mrqa} and focus on questions whose answer is a single span. The standard approach uses a pretrained encoder, such as BERT \cite{devlin-etal-2019-bert}, and adds two parameter vectors $\mathbf{s}, \mathbf{e}$ to the pretrained model in order to detect the start position $s$ and end position $e$ of the answer span $a$, respectively. The input text $T$ and question $Q$ are concatenated and fed into the encoder, producing a contextualized token representation $\mathbf{x}_i$ for each token in the sequence. To predict the start position of the answer span, a probability distribution is induced over the entire sequence by computing the inner product of a learned vector $\mathbf{s}$ with every token representation (the end position is computed similarly using a vector $\mathbf{e}$): \begin{align*} P( s = i \mid T, Q) &= \frac{\exp(\mathbf{x}_i ^\top \mathbf{s})}{\sum_j \exp(\mathbf{x}_j ^\top \mathbf{s})}, \\ P( e = i \mid T, Q) &= \frac{\exp(\mathbf{x}_i ^\top \mathbf{e})}{\sum_j \exp(\mathbf{x}_j ^\top \mathbf{e})}. \end{align*} The parameters $\mathbf{s}, \mathbf{e}$ are trained during fine-tuning, using the cross-entropy loss with the start and end positions of the gold answer span. This approach assumes that each token representation $\mathbf{x}_i$ is contextualized with respect to the question. However, the masked language modeling objective does not necessarily encourage this form of long-range contextualization in the pretrained model, since many of the masked tokens can be resolved from local cues. Fine-tuning the attention patterns of pretrained masked language models may thus entail an extensive learning effort, difficult to achieve with only a handful of training examples. We overcome this issue by (1) pretraining directly for span selection, and (2) explicitly representing the question with a single vector, used to detect the answer in the input text. \section{Splinter} \label{sec:model} We formulate a new task for pretraining question answering from unlabeled text: \textit{recurring span selection}. We replace spans that appear multiple times in the given text with a special \texttt{[QUESTION]} token, except for one occurrence, which acts as the ``answer'' span for each (masked) cloze-style ``question''. The prediction layer is a modification of the standard span selection layer, which replaces the static start and end parameter vectors, $\mathbf{s}$ and $\mathbf{e}$, with dynamically-computed boundary detectors based on the contextualized representation of each \texttt{[QUESTION]} token. We reuse this architecture when fine-tuning on question-answer pairs by adding a \texttt{[QUESTION]} token at the end of the actual question, thus aligning the pretraining objective with the fine-tuning task. We refer to our pretrained model as \textit{Splinter}. \subsection{Pretraining: Recurring Span Selection} \label{subsec:pretraining} Given an input text $T$, we find all \textit{recurring spans}: arbitrary n-grams that appear more than once in the same text. For each set of identical recurring spans $R$, we select a single occurrence as the \textit{answer} $a$ and replace all other occurrences with a single \texttt{[QUESTION]} token.\footnote{In practice, only some sets of recurring spans are processed; see \textit{Cluster Selection} below.} The goal of recurring span selection is to predict the correct answer $a$ for a given \texttt{[QUESTION]} token $q \in R \setminus \{a\}$, each $q$ thus acting as an independent \textit{cloze-style question}. Figure~\ref{fig:span_masking} illustrates this process. In the given passage, the span \textit{``Roosevelt''} appears three times. Two of its instances (the second and third) are replaced with \texttt{[QUESTION]}, while one instance (the first) becomes the answer, and remains intact. After masking, the sequence is passed through a transformer encoder, producing contextualized token representations. The model is then tasked with predicting the start and end positions of the answer given each \texttt{[QUESTION]} token representation. In Figure~\ref{fig:span_masking}b, we observe four instances of this prediction task: two for the \textit{``Roosevelt''} cluster, one for the \textit{``Allied countries''} cluster, and one for \textit{``Declaration by United Nations''}. Taking advantage of recurring \emph{words} in a passage (restricted to nouns or named entities) was proposed in past work as a signal for coreference \cite{kocijan-etal-2019-wikicrem,ye-etal-2020-coreferential}. We further discuss this connection in Section~\ref{sec:related}. \paragraph{Span Filtering} To focus pretraining on semantically meaningful spans, we use the following definition for ``spans'', which filters out recurring spans that are likely to be uninformative: (1) spans must begin and end at word boundaries, (2) we consider only maximal recurring spans, (3) spans containing only stop words are ignored, (4) spans are limited to a maximum of 10 tokens. These simple heuristic filters do not require a model, as opposed to masking schemes in related work \cite{glass-etal-2020-span, ye-etal-2020-coreferential, Guu2020REALMRL}, which require part-of-speech taggers, constituency parsers, or named entity recognizers. \paragraph{Cluster Selection} We mask a random subset of recurring span clusters in each text, leaving some recurring spans untouched. Specifically, we replace up to $30$ spans with \texttt{[QUESTION]} from each input passage.\footnote{In some cases, the last cluster may have more than one unmasked span.} This number was chosen to resemble the 15\% token-masking ratio of \citet{joshi-etal-2020-spanbert}. Note that in our case, the number of masked tokens is greater than the number of questions. \subsection{Model: Question-Aware Span Selection} \label{subsec:architecture} Our approach converts texts into a set of questions that need to be answered simultaneously. The standard approach for extractive question answering \cite{devlin-etal-2019-bert} is inapplicable, because it uses fixed start and end vectors. Since we have multiple questions, we replace the standard parameter vectors $\mathbf{s}, \mathbf{e}$ with \textit{dynamic} start and end vectors $\mathbf{s}_q , \mathbf{e}_q$, computed from each \texttt{[QUESTION]} token $q$: \begin{align*} \mathbf{s}_q = \mathbf{S} \mathbf{x}_q \qquad \mathbf{e}_q = \mathbf{E} \mathbf{x}_q \end{align*} Here, $\mathbf{S} , \mathbf{E}$ are parameter matrices, which extract ad hoc start and end position detectors $\mathbf{s}_q , \mathbf{e}_q$ from the given \texttt{[QUESTION]} token's representation $\mathbf{x}_q$. The rest of our model follows the standard span selection model by computing the start and end position probability distributions. The model can also be viewed as two bilinear functions of the question representation $\mathbf{x}_q$ with each token in the sequence $\mathbf{x}_i$, similar to \citet{dozat2017deep}: \begin{align*} P( s = i \mid T, q) &= \frac{\exp(\mathbf{x}_i^\top \mathbf{S} \mathbf{x}_q)}{\sum_j \exp(\mathbf{x}_j^\top \mathbf{S} \mathbf{x}_q)} \\ P( e = i \mid T, q) &= \frac{\exp(\mathbf{x}_i^\top \mathbf{E} \mathbf{x}_q)}{\sum_j \exp(\mathbf{x}_j^\top \mathbf{E} \mathbf{x}_q)} \end{align*} Finally, we use the answer's gold start and end points $(s_a, e_a)$ to compute the cross-entropy loss: \begin{align*} - \log P(s = s_a \mid T, q) - \log P(e = e_a \mid T, q) \end{align*} We refer to this architecture as the question-aware span selection (QASS) layer. \subsection{Fine-Tuning} \label{subsec:fine_tuning} After pretraining, we assume access to labeled examples, where each training instance is a text $T$, a question $Q$, and an answer $a$ that is a span in $T$. To make this setting similar to pretraining, we simply append a \texttt{[QUESTION]} token to the input sequence, immediately after the question $Q$ (see Figure~\ref{fig:question}). Selecting the answer span then proceeds exactly as during pretraining. Indeed, the advantage of our approach is that in both pretraining and fine-tuning, the \texttt{[QUESTION]} token representation captures information about the question that is then used to select the span from context. \section{A Few-Shot QA Benchmark} \label{sec:fewshot} To evaluate how pretrained models work when only a small amount of labeled data is available for fine-tuning, we simulate various low-data scenarios by sampling subsets of training examples from larger datasets. We use a subset of the MRQA 2019 shared task \cite{fisch-etal-2019-mrqa}, which contains extractive question answering datasets in a unified format, where the answer is a single span in the given text passage. Split I of the MRQA shared task contains 6 large question answering datasets: SQuAD \cite{rajpurkar-etal-2016-squad}, NewsQA \cite{trischler-etal-2017-newsqa}, TriviaQA \cite{joshi-etal-2017-triviaqa}, SearchQA \cite{dunn2017searchqa}, HotpotQA \cite{yang-etal-2018-hotpotqa}, and Natural Questions \cite{kwiatkowski-etal-2019-natural}. For each dataset, we sample smaller training datasets from the original training set with sizes changing on a logarithmic scale, from 16 to 1,024 examples. To reduce variance, for each training set size, we sample 5 training sets using different random seeds and report average performance across training sets. We also experiment with fine-tuning the models on the full training sets. Since Split I of the MRQA shared task does not contain test sets, we evaluate using the official development sets as our test sets. We also select two datasets from Split II of the MRQA shared task that were annotated by domain experts: BioASQ \cite{tsatsaronis_overview_2015} and TextbookQA \cite{Kembhavi_2017_CVPR}. Each of these datasets only has a development set that is publicly available in MRQA, containing about 1,500 examples. For each dataset, we sample 400 examples for evaluation (test set), and follow the same protocol we used for large datasets to sample training sets of 16 to 1,024 examples from the remaining data. To maintain the few-shot setting, every dataset in our benchmark has well-defined training and test sets. To tune hyperparameters, one needs to extract validation data from each training set. For simplicity, we do not perform hyperparameter tuning or model selection (see Section 5), and thus use all of the available few-shot data for training. \section{Experimental Setup} \label{sec:setup} We describe our experimental setup in detail, including all models and baselines. \subsection{Baselines} \label{sec:baselines} Splinter-base shares the same architecture (transformer encoder \cite{vaswaniNIPS2017_7181}), vocabulary (cased wordpieces), and number of parameters (110M) with SpanBERT-base \cite{joshi-etal-2020-spanbert}. In all experiments, we compare Splinter-base to three baselines of the same capacity: \paragraph{RoBERTa} \cite{liu2019roberta} A highly-tuned and optimized version of BERT, which is known to perform well on a wide range of natural language understanding tasks. \paragraph{SpanBERT} \cite{joshi-etal-2020-spanbert} A BERT-style model that focuses on span representations. SpanBERT is trained by masking contiguous spans of tokens and optimizing two objectives: (a) masked language modeling, which predicts each masked token from its own vector representation; (b) the span boundary objective, which predicts each masked token from the representations of the unmasked tokens at the start and end of the masked span. \paragraph{SpanBERT (Reimpl)} Our reimplementation of SpanBERT, using exactly the same code, data, and hyperparameters as Splinter. This baseline aims to control for implementation differences and measures the effect of replacing masked language modeling with recurring span selection. Also, this version does not use the span boundary objective, as \citet{joshi-etal-2020-spanbert} reported no significant improvements from using it in question answering. \subsection{Pretraining Implementation} We train Splinter-base using Adam \cite{kingma2017adam} for 2.4M training steps with batches of 256 sequences of length 512.\footnote{We used this setting to approximate SpanBERT's hyperparameter setting in terms of epochs. That said, SpanBERT-base was trained for a quarter of the steps (600k steps) using four times as many examples per batch (1024 sequences). See Section~\ref{sec:baselines} for additional baselines that control for this difference.} The learning rate is warmed up for 10k steps to a maximum value of $10^{-4}$, after which it decays linearly. As in previous work, we use a dropout rate of 0.1 across all layers. We follow \citet{devlin-etal-2019-bert} and train on English Wikipedia (preprocessed by WikiExtractor as in \citet{Wikiextractor2015}) and the Toronto BookCorpus \cite{Zhu_2015_bookcorpus}. We base our implementation on the official TensorFlow implementation of BERT, and train on a single eight-core v3 TPU (v3-8) on the Google Cloud Platform. \subsection{Fine-Tuning Implementation} For fine-tuning, we use the hyperparameters from the default configuration of the HuggingFace Transformers package \cite{wolf-etal-2020-transformers}.\footnote{We did rudimentary tuning on the number of steps only, using a held-out portion of the SQuAD training set, since our training sets can be too small for the default values (e.g., running 10 epochs on 16 examples results in 20 update steps). } Specifically, we train all models using Adam \cite{kingma2017adam} with bias-corrected moment estimates for few-shot learning \cite{zhang2020revisiting}. When fine-tuning on 1024 examples or less, we train for either 10 epochs or 200 steps (whichever is larger). For full-size datasets, we train for 2 epochs. We set the batch size to 12 and use a maximal learning rate of $3 \cdot 10^{-5}$, which warms up in the first 10\% of the steps, and then decays linearly. An interesting question is how to fine-tune the QASS layer parameters (i.e., the $\mathbf{S}$ and $\mathbf{E}$ matrices in Section~\ref{subsec:architecture}). In our implementation, we chose to discard the pretrained values and fine-tune from a random initialization, due to the possible discrepancy between span statistics in pretraining and fine-tuning datasets. However, we report results on fine-tuning without resetting the QASS parameters as an ablation study (Section~\ref{subsec:ablation}). \section{Results} Our experiments show that Splinter dramatically improves performance in the challenging few-shot setting, unlocking the ability to train question answering models with only hundreds of examples. When trained on large datasets with an order of 100,000 examples, Splinter is competitive with (and often better than) the baselines. Ablation studies demonstrate the contributions of both recurring span selection pretraining and the QASS layer. \subsection{Few-Shot Learning} \label{subsec:few-shot-results} Figure~\ref{fig:fewshot} shows the F1 score \cite{rajpurkar-etal-2016-squad} of Splinter-base, plotted against all baselines for two datasets, TriviaQA and TextbookQA, as a function of the number of training examples (see Figure~\ref{fig:additional_results} in the appendix for the remaining datasets). In addition, Table~\ref{tab:fewshot} shows the performance of individual models when given 16, 128, and 1024 training examples across all datasets (see Table~\ref{tab:fewshot_full} in the appendix for additional performance and standard deviation statistics). It is evident that Splinter outperforms all baselines by large margins. Let us examine the results on SQuAD, for example. Given 16 training examples, Splinter obtains 54.6 F1, significantly higher than the best baseline's 18.2 F1. When the number of training examples is 128, Splinter achieves 72.7 F1, outperforming the baselines by 17 points (our reimplementation of SpanBERT) to 30 (RoBERTa). When considering 1024 examples, there is a 5-point margin between Splinter (82.8 F1) and SpanBERT (77.8 F1). The same trend is seen in the other datasets, whether they are in-domain sampled from larger datasets (e.g. TriviaQA) or not; in TextbookQA, for instance, we observe absolute gaps of 9 to 23 F1 between Splinter and the next-best baseline. \comment{ \begin{table*}[t] \small \centering \begin{tabular}{lccccccc} \toprule & Pretraining & QASS & Re-initialization & 16 & 128 & 1024 & 4096\\ \midrule \small\textit{SQuAD} \\ \midrule SpanBERT & MLM & & \checkmark & 12.5 & 48.5 & 63.4 & 82.5 \\ SpanBERT+QASS & MLM & \checkmark & \checkmark & 25.7 & 62.7 & 81.9 & 85.9 \\ Splinter & RSS & \checkmark & \checkmark & 54.6 & 72.7 & 82.8 & 86.3 \\ Splinter (with pretrained QASS) & RSS & \checkmark & & \textbf{60.0} & \textbf{75.0} & \textbf{83.3} & \textbf{86.3} \\ \midrule \small\textit{Natural Questions} \\ \midrule SpanBERT & MLM & & \checkmark & 19.7 & 32.2 & 50.2 & 65.3 \\ SpanBERT+QASS & MLM & \checkmark & \checkmark & 18.9 & 37.4 & 63.8 & 69.9 \\ Splinter & RSS & \checkmark & \checkmark & 27.4 & 46.3 & \textbf{65.5} & \textbf{70.5} \\ Splinter (with pretrained QASS) & RSS & \checkmark & & \textbf{31.5} & \textbf{52.1} & 63.7 & 66.9\\ \midrule \small\textit{TextBookQA} \\ \midrule SpanBERT & MLM & & \checkmark & 5.6 & 9.4 & 42.3 & - \\ SpanBERT+QASS & MLM & \checkmark & \checkmark & 10.5 & 31.5 & 49.6 & - \\ Splinter & RSS & \checkmark & \checkmark & 19.4 & \textbf{42.6} & \textbf{54.5} & - \\ Splinter (with pretrained QASS) & RSS & \checkmark & & \textbf{22.7} & 32.3 & 44.4 & - \\ \bottomrule \end{tabular} \caption{Ablation studies on SQuAD, Natural Questions and TextbookQA datasets. We first examine the role of QASS layer by fine-tuning it on top of SpanBERT. In addition, we test whether it is beneficial to keep the parameters of QASS from pretraining. \omer{I think this should be figures.}} \label{table:ablation} \end{table*} } \subsection{High-Resource Regime} Table~\ref{tab:fewshot} also shows the performance when fine-tuning on the entire training set, when an order of 100,000 examples are available. Even though Splinter was designed for few-shot question answering, it reaches the best result in five out of six datasets. This result suggests that when the target task is extractive question answering, it is better to pretrain with our recurring span selection task than with masked langauge modeling, regardless of the number of annotated training examples. \input{figure_ablations} \subsection{Ablation Study} \label{subsec:ablation} We perform an ablation study to better understand the independent contributions of the pretraining scheme and the QASS layer. We first ablate the effect of pretraining on recurring span selection by applying the QASS layer to pretrained masked language models. We then test whether the QASS layer's pretrained parameters can be reused in Splinter during fine-tuning without reinitializion. \paragraph{Independent Contribution of the QASS Layer} While the QASS layer is motivated by our pretraining scheme, it can also be used without pretraining. We apply a randomly-initialized QASS layer to our implementation of SpanBERT, and fine-tune it in the few-shot setting. Figure~\ref{fig:ablation} shows the results of this ablation study for two datasets (see Figure~\ref{fig:ablation_appendix} in the appendix for more datasets). We observe that replacing the static span selection layer with QASS can significantly improve performance on few-shot question answering. Having said that, most of Splinter's improvements in the extremely low data regime do stem from combining the QASS layer with our pretraining scheme, and this combination still outperforms all other variants as the amount of data grows. \paragraph{QASS Reinitialization} Between pretraining and fine-tuning, we randomly reinitialize the parameters of the QASS layer. We now test the effect of fine-tuning with the QASS layer's pretrained parameters; intuitively, the more similar the pretraining data is to the task, the better the pretrained layer will perform. Figure~\ref{fig:ablation} shows that the advantage of reusing the pretrained QASS is data-dependent, and can result in both performance gains (e.g. extremely low data in SQuAD) and stagnation (e.g. BioASQ with 256 examples or more). Other datasets exhibit similar trends (see appendix). We identify three conditions that determine whether keeping the pretrained head is preferable: (1) when the number of training examples is extremely low, (2) when the target domain is similar to that used at pretraining (e.g. Wikipedia), and (3) when the questions are relatively simple (e.g. SQuAD versus HotpotQA). The latter two conditions pertain to the compatibility between pretraining and fine-tuning tasks; the information learned in the QASS layer is useful as long as the input and output distribution of the task are close to those seen at pretraining time. \subsection{Analysis} The recurring span selection objective was designed to emulate extractive question answering using unlabeled text. How similar is it to the actual target task? To answer this question, we measure how much each pretrained model's functionality has changed after fine-tuning on 128 examples of SQuAD. For the purpose of this analysis, we measure change in functionality by examining the vector representation of each token as produced by the transformer encoder; specifically, we measure the cosine similarity between the vector produced by the pretrained model and the one produced by the fine-tuned model, given exactly the same input. We average these similarities across every token of 200 examples from SQuAD's test set. Table~\ref{table:analysis} shows that Splinter's outputs are very similar before and after fine-tuning (0.89 average cosine similarity), while the other models' representations seem to change drastically. This suggests that fine-tuning with even 128 question-answering examples makes significant modifications to the functionality of pretrained masked language models. Splinter's pretraining, on the other hand, is much more similar to the fine-tuning task, resulting in much more modest changes to the produced vector representations. \section{Related Work}\label{sec:related} The remarkable results of GPT-3 \cite{brown2020language} have inspired a renewed interest in few-shot learning. While some work focuses on classification tasks \cite{schick2020exploiting, gao2020making}, our work investigates few-shot learning in the context of extractive question answering. One approach to this problem is to create synthetic text-question-answer examples. Both \citet{lewis-etal-2019-unsupervised} and \citet{glass-etal-2020-span} use the traditional NLP pipeline to select noun phrases and named entities in Wikipedia paragraphs as potential answers, which are then masked from the context to create pseudo-questions. \citet{lewis-etal-2019-unsupervised} use methods from unsupervised machine translation to translate the pseudo-questions into real ones, while \citet{glass-etal-2020-span} keep the pseudo-questions but use information retrieval to find new text passages that can answer them. Both works assume access to language- and domain-specific NLP tools such as part-of-speech taggers, syntactic parsers, and named-entity recognizers, which might not always be available. Our work deviates from this approach by exploiting the natural phenomenon of \textit{recurring spans} in order to generate multiple question-answer pairs per text passage, without assuming any language- or domain-specific models or resources are available beyond plain text. Similar ideas to recurring span selection were used for creating synthetic coreference resolution examples \cite{kocijan-etal-2019-wikicrem, varkel-globerson-2020-pre}, which mask single words that occur multiple times in the same context. CorefBERT \cite{ye-etal-2020-coreferential} combines this approach with a copy mechanism for predicting the masked word during pretraining, alongside the masked language modeling objective. Unlike our approach, which was designed to align well with span selection, CorefBERT masks only \textit{single-word nouns} (rather than arbitrary spans) and replaces each token in the word with a separate mask token (rather than a single mask for the entire multi-token word). Therefore, it does not emulate extractive question answering. We did not add CorefBERT as a baseline since the performance of both CorefBERT-base and CorefBERT-large was lower than SpanBERT-base's performance on the full-data MRQA benchmark, and pretraining CorefBERT from scratch was beyond our available computational resources. \section{Conclusion} We explore the few-shot setting of extractive question answering, and demonstrate that existing methods, based on fine-tuning large pretrained language models, fail in this setup. We propose a new pretraining scheme and architecture for span selection that lead to dramatic improvements, reaching surprisingly good results even when only an order of a hundred examples are available. Our work shows that choices that are often deemed unimportant when enough data is available, again become crucial in the few-shot setting, opening the door to new methods that take advantage of prior knowledge on the downstream task during model development. \section{Additional Results} \label{appendix:results} \paragraph{Few-Shot Results} Figure~\ref{fig:additional_results} shows the results on the six few-shot question answering datasets not included in Figure~\ref{fig:fewshot}. In addition, we give the full raw results (including standard deviation) in Table~\ref{tab:fewshot_full}. \paragraph{Ablation Studies} Figure~\ref{fig:ablation_appendix} shows results of ablation studies on the six question answering datasets not included in Figure~\ref{fig:ablation}. \input{figure_few_shot_appendix} \input{table_full_few_shot} \input{figure_ablation_appendix} \section*{Acknowledgements} This project was funded by the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation programme (grant ERC HOLI 819080), the Blavatnik Fund, the Alon Scholarship, the Yandex Initiative for Machine Learning and Intel Corporation. We thank Google’s TPU Research Cloud (TRC) for their support in providing TPUs for this research. \bibliographystyle{acl_natbib}
{'timestamp': '2021-06-03T02:24:57', 'yymm': '2101', 'arxiv_id': '2101.00438', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00438'}
arxiv
\section{Introduction} \blfootnote{* Equal contribution.} Neural Machine translation (NMT) has achieved state-of-the-art performance in a variety of language pairs and settings \citep{bahdanau_nmt, vaswani_transformer}, but it is vulnerable to domain mismatch, where the test set differs significantly from the training data in terms of vocabulary, genre, length, etc. This issue is exacerbated in a low-resource condition \citep{koehn-knowles-2017-six}. Teacher forcing is used during traditional maximum likelihood neural network training, leading to a strong exposure bias, and model confusion when presented with unexpected sequences. This typically results in hallucinations in the output \citep{mller2019domain}, because the overly zealous language model component prefers a fluent translation, as opposed to an adequate one. A number of methods have been proposed in order to tackle the issue: exposing the model to its predictions during training \citep{ranzato2015sequence, shen-etal-2016-minimum, zhang-etal-2019-bridging, rico-exposure}; tuning directly towards BLEU \citep{wiseman-rush-2016-sequence} or using minimum Bayes risk decoding \citep{kumar-byrne-2004-minimum, stahlberg-etal-2017-neural}. A common weakness of such methods is that they are computationally expensive. In this paper, we adopt and experiment with two approaches inspired by previous research. We use lexical shortlisting to interpolate a statistical alignment model with NMT; on top of it, we perform n-best list re-ranking by hypothesis agreement. Our aim is to constrain the lexical choice of the decoder, to prevent hallucinations from being generated. The methods are computationally simpler, as they require no change to the model or training. We analyse the effectiveness of these methods in different scenarios of domain adaptation. We show BLEU gains on a variety of out-of-domain datasets in a low-resource English-German setting. However, the methods show no improvements once the datasets are large, or the domains are too distant. \section{Methodology} \label{sec:method} We purse and analyse two separate strategies for improving neural machine translation's performance in low-resource domain mismatched settings: lexical shortlisting and n-best list re-ranking based on inter hypothesis agreement. \subsection{Lexical shortlisting} Neural machine translation systems have a vocabulary size of tens of thousands, but for every single translation, most of the vocabulary items are improbable choices. Many researchers attempt to improve on this to speed up the computation in the output layer \citep{schwenk-etal-2007-smooth,le-etal-2012-continuous, devlin-etal-2014-fast}. This is done by preparing a list of likely word-level translations for each sentence (commonly known as lexical shortlist), by using IBM alignment models such as fast-align \citep{dyer-etal-2013-simple} and limiting the output layer choices to it. This has been implemented in NMT frameworks for efficient systems \citep{junczys-dowmunt-etal-2018-marian-cost} and since widely used \citep[][inter alia]{bogoychev-etal-2020-edinburghs}. Recently, \citet{li-etal-2019-word} showed that even in a high-resource scenario, the quality of the IBM alignments can outperform those learned by a neural model. Therefore, we find it sensible to incorporate word alignments into neural models, especially in a low-resource situation. Although shortlists have a negligible impact on the quality of strong neural systems, we can successfully limit the output layer to the likely tokens according to an IBM model trained on a particular domain, and improve out-of-domain BLEU scores in a low-resource setting. This suggests that the IBM model provides complementary information to the neural model in this scenario. \subsection{Hypothesis re-ranking} \citet{fomicheva-2020-multi-hypothesis-eval} estimate the quality of machine translation by measuring the agreement of the generated hypotheses for a given source sentence. The reason is that (higher) similarity between hypotheses reflects (higher) model confidence. In our problem, we assume that a hallucinated hypothesis will have a low agreement with the rest in the beam. Thus, we propose to re-rank the n-best list based on inter-hypothesis similarity and select the top one as the final translation. For every source sentence, NMT generates $b$ hypotheses where $b$ is the beam size. For each hypothesis, we measure its similarity against others in the beam, then sort all hypotheses by their final aggregated similarity scores. The similarity score $score_i$ for a certain hypothesis $hyp_i$ is calculated as Equation~\ref{eq-similarity}, where the similarity between $hyp_i$ and every other $hyp_j$ produced by the model is measured by an automatic metric $similarity$: \begin{equation} \text{score}_i = \sum_{j=0, i \neq j}^{b}\text{similarity}(\text{hyp}_i, \text{hyp}_j) \label{eq-similarity} \end{equation} \section{Experimental setup} For our experiments, we use OPUS English-German data \citep{opus-lison-tiedemann-2016-opensubtitles2016}, with preprocessing performed as per the work of \citet{mller2019domain}. We follow the same data split as \citet{rico-exposure}'s low-resource, domain restricted setting: a model is trained on 1M sentences pairs from the \textit{medical} domain, and is evaluated on \textit{medical} (in-domain), \textit{Koran}, \textit{IT}, \textit{subtitles} and \textit{law} (out-of-domain). We use a joint vocabulary byte-pair encoding \citep[BPE,][]{subword_nmt} trained on the \textit{medical} domain with 32k merge operations. In this way, the vocabulary trained on the \textit{medical} domain may be sub-optimal for the out-of-domain test sets. In reality, monolingual data from unknown domains might be available, which can reduce the bias of the BPE training towards the in-domain data. In order to simulate this scenario, we perform an analogous experiment where the BPE vocabulary is trained on all domains, except the \textit{subtitles} corpus, as it is much larger than other domains and would dominate the vocabulary (reasons elaborated in Section~\ref{sec:limitations}). For training, we used the Transformer-base preset of the Marian toolkit \citep{2018-marian} with transformer preprocessing normalisation as opposed to postprocessing normalisation, and additional attention and feed-forward layer dropout. We performed ample hyperparameter search, to ensure that our neural network configuration achieves the best possible performance on this low-resource task. Decoding is always done with beam size 6 and length normalisation 0.6. On top of the baseline, we tried three different combinations of methods introduced in Section~\ref{sec:method}: \begin{itemize} \item A \textbf{shortlisting} configuration where we use a lexical shortlist generated by the \textit{fast-align} model trained on the \textit{medical} dataset. We try various configurations, and we settle on an optimal value of limiting the output layer to the 10 most probable unigram translations according to the IBM model. \item A \textbf{re-ranking} setup where we re-rank the n-best translation based on inter-hypothesis similarity. Like \citeauthor{fomicheva-2020-multi-hypothesis-eval}, we tested out a few different metrics to measure similarity: sentBLEU, ChrF, TER and METEOR. In an initial experiment on the \textit{medical} domain, we found sentBLEU to have the best performance and stick to it for all experiments. We did not pick any neural metrics, as they may have a domain preference and are less interpretable. \item \textbf{Both}: shortlisting followed by re-ranking as specified above \end{itemize} \section{Results and Analysis} \label{sec_results_and_analysis} \begin{table*}[!ht] \centering \begin{tabular}{|l|cccc|cccc|} \hline \multirow{2}{*}{Domain} & \multicolumn{4}{c|}{BPE trained on \textit{medical} only} & \multicolumn{4}{c|}{BPE trained on all except \textit{subtitles}} \\ \cline{2-9} & baseline & shortlist & re-rank & both & baseline & shortlist & re-rank & both \\ \hline medical & \textit{60.0} & \textit{59.5} & \textit{\textbf{60.3}} & \textit{59.1} & \textit{\textbf{61.4}} & \textit{58.2} & \textit{57.6} & \textit{60.4} \\ Koran & 0.9 & 1.0 & 0.7 & \textbf{1.1} & 0.8 & 0.9 & 0.9 & \textbf{1.0} \\ law & 19.6 & \textbf{20.6} & 16.6 & 17.8 & 17.8 & 19.3 & 19.8 & \textbf{20.8} \\ IT & 15.0 & \textbf{16.3} & 10.1 & 11.5 & 15.7 & \textbf{18.0} & 15.3 & 17.8 \\ subtitles & 2.8 & \textbf{3.1} & 1.4 & 1.9 & 2.6 & \textbf{2.8} & 2.4 & \textbf{2.8} \\ \hline \end{tabular} \caption{BLEU results on German-English systems trained on the \textit{medical} domain, and tested on in-domain and out-domain datasets. In-domain results are in italics and the best BLEU on each domain dataset are in bold.} \label{results_tab} \end{table*} \begin{table*}[tbhp] \centering \begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline Domain & System & \multicolumn{4}{c|}{1- to 4-gram precisions} & \makecell{ Brevity \\penalty} & \ BLEU \ ($\triangle$) & \ METEOR \ ($\triangle$) \\ \hline \multirow{4}{*}{law} & baseline & 53.0 & 27.5 & 16.9 & 11.0 & 0.778 & 17.8 \hspace{30pt} & 0.36 \hspace{35pt} \\ & shortlist & \textbf{56.1} & \textbf{29.4} & \textbf{17.9} & \textbf{11.4} & 0.804 & 19.3 ($+$1.5) & \textbf{0.39 ($+$0.03)} \\ & re-rank & 51.4 & 26.4 & 16.1 & 10.5 & 0.906 & 19.8 ($+$2.0) & 0.31 ($-$0.05) \\ & both & 53.1 & 27.6 & 16.7 & 10.7 & \textbf{0.919} & \textbf{20.8 ($+$3.0)} & 0.35 ($-$0.01) \\\hline \multirow{4}{*}{IT} & baseline & 34.6 & 18.8 & 13.1 & 9.5 & 0.930 & 15.7 \hspace{30pt} & 0.16 \hspace{35pt} \\ & shortlist & \textbf{43.9} & \textbf{24.7} & \textbf{17.1} & \textbf{12.1} & 0.828 & \textbf{18.0 ($+$2.3)} & \textbf{0.18 ($+$0.02)} \\ & re-rank & 33.5 & 17.2 & 11.7 & 8.1 & \textbf{1.000} & 15.3 ($-$0.4) & 0.12 ($-$0.04) \\ & both & 38.0 & 20.1 & 13.6 & 9.7 & \textbf{1.000} & 17.8 ($+$2.1) & 0.09 ($-$0.07) \\\hline \end{tabular} \caption{Breakdown of BLEU scores for ``BPE on all'' experiments in Table~\ref{results_tab} for \textit{law} and \textit{IT} domains.} \label{table-bleu-scores} \end{table*} We present in Table~\ref{results_tab} our models' BLEU scores on in- and out-of-domain test sets, with both BPE segmentation schemes. When applying the more restrictive BPE trained on the \textit{medical} domain, our shortlisting mechanism always yields a slight increase in BLEU on out-of-domain sets and a small drop on the in-domain set. The \textit{law} and \textit{IT} domains benefit the most, whereas \textit{subtitles} and \textit{Koran} are largely unaffected. Re-ranking is not helpful in this BPE setting. When using the alternative BPE segmentation trained on all datasets, we see that the baseline scores are generally lower for the out-of-domain datasets, despite a stronger in-domain BLEU. This is potentially because the rare words from out-of-domain datasets get insufficient exposure during training (on \textit{medical} only). However, when using a lexical shortlist in this setting, we see greater improvements in terms of BLEU on the \textit{law} and \textit{IT} domains compared to the \textit{medical}-only BPE scenario. Re-ranking is also much more effective, performing similarly to shortlisting. The combination of re-ranking and shortlisting delivers the best BLEU scores in nearly all out-of-domain splits. We see that the shortlisting method is always superior to the baseline method on all out-of-domain datasets, although the results vary with the data preprocessing. This is true even more so of re-ranking, which is much better when the BPE vocabulary is learned on all domains. Combining both shortlisting and re-ranking always brings in a slight improvement over just re-ranking on the out-of-domain datasets, but its effectiveness is again preprocessing-dependent. This clearly shows that the IBM model implemented by fast-align can learn information complementary to NMT, and interpolating them is beneficial for achieving higher BLEU scores in out-of-domain settings. The lower BLEU scores on in-domain test sets are related to the aggressive shortlist we used: by increasing the output layer limit from 10 to 50 most probable tokens, we achieve identical BLEU scores as the baseline. \subsection{BLEU breakdown} According to BLEU scores reported earlier, shortlisting and re-ranking are beneficial to NMT domain adaptation (in a relatively low-resource condition). We try to understand what contributes to the increase in BLEU scores by breaking down BLEU scores into n-gram precisions and length (brevity) penalty. In Table~\ref{table-bleu-scores} we list the numbers for \textit{law} and \textit{IT} domains, under the ``BPE trained on all'' setting in Table~\ref{results_tab}, on which we have seen the largest leap of BLEU scores. Additionally, we include METEOR which focuses on n-gram overlap and is not influenced by the output length. From the table, shortlisting always significantly boosts n-gram precisions, whereas re-ranking alone decreases them. On the other hand, re-ranking ``rectifies'' the output length, leading to a better brevity penalty (closer to 1) compared to baseline or shortlisting. When using both together, we see slight improvement on both n-gram accuracies and length penalty over baseline. This is expected: shortlisting provides extra word alignment information which aids lexical accuracy; re-ranking favours the hypothesis with an average length, since too long or too short hypotheses will receive a lower similarity score. This implies that shortlisting and re-ranking enhance BLEU from different aspects. On the contrary, according to METEOR, re-ranking is outperformed even by the baseline, leading to a negative METEOR change. This suggests that the bump in BLEU scores by re-ranking is only due to an improved brevity penalty. While it encourages a more desirable length, re-ranking does not produce better lexical choices. Adequacy wise, shortlisting is proven to be a more constructive method. \section{Limitations} \label{sec:limitations} Although our methods show promising gains on the low-resource domains, we found that they have limited application when the domain mismatch is too great or there is sufficient resource available. \begin{table*}[tbhp] \centering \begin{threeparttable} \begin{tabular}{|l|rrrrr|} \hline Domain & law & medical & subtitles\tnote{\dag} & IT & Koran \\ \hline Number of sentences & 695k & 1M & 1M & 372k & 529k \\ \hline Avg. original sentence length & 22.1 & 12.5 & 8.0 & 7.5 & 20.4 \\ Avg. BPE sentence length & 30.4 & 14.3 & 11.1 & 12.7 & 24.1 \\ \hline Vocab size, appearing \textgreater 20 times & 34k & 36k & 30k & 15k & 20k \\ Vocab overlap with \textit{medical} & 11.5k & 36k & 9.0k & 5.8k & 5.1k \\ \hline \end{tabular} \begin{tablenotes} \small \item[\dag]The \textit{subtitles} corpus was sampled down from 20M to 1M sentence pairs. \end{tablenotes} \end{threeparttable} \caption{Corpus statistics for the different domains.} \label{tab:domain-stats} \end{table*} \begin{table*}[tbhp] \centering \begin{tabular}{|l|l|} \hline German & English \\ \hline \small sein Pilot hat nicht die volle Kontrolle . & \small its p@@ il@@ ot is@@ n't in control . \\ \small und Z@@ eth@@ rid ? nur einen Strei@@ f@@ sch@@ uss . & \small and , Z@@ eth@@ rid , just gr@@ aze it . \\ \hline \end{tabular} \caption{Two random German-English sentence pairs from the \textit{subtitles} dataset after BPE.} \label{tab:subtitles} \end{table*} \subsection{Large domain mismatch} In order to better interpret why our methods are much more helpful on some domains than on others (e.g.\ \textit{law} versus \textit{Koran}), we gather statistics of our test sets in different domains in Table ~\ref{tab:domain-stats}, to reflect the distance between domains. We compute vocabulary overlap with the in-domain \textit{medical} data, for each cleaned corpus prior to BPE encoding. We count only words that are seen at least 20 times, and we sample 5\% of the \textit{subtitles} corpus, since it is orders of magnitude larger than the rest. After down-sampling, it has a similar size to the \textit{medical} corpora. We also compute the average sentence length before and after BPE to determine the extent to which BPE transforms the original sentences. Both vocabulary overlap and sentence lengths implicitly reflect the degree of domain mismatch. For our most difficult datasets, \textit{subtitles} and \textit{Koran}, we see the lowest vocabulary overlap with the \textit{medical} domain of just 22-25\%. When BPE is applied to these corpora, the sentence length increases by 20-30\%. In practice, extensive and uneven BPE segmentation on named entities makes it difficult for the IBM model to produce interpretable and meaningful alignments to aid a translation model, as exemplified in Table ~\ref{tab:subtitles}. This means that lexical shortlisting is useful when we have a model trained on a relatively modest amount of data, and the out-of-domain dataset which we adapt to should share a reasonable amount of vocabulary. When the vocabulary overlap is too small, shortlisting drastically loses its effectiveness as a domain adaptation tool. We confirm this by experimenting with another domain-distant, and extremely low-resource Burmese-English scenario. The training data consists 18k sentence pairs from \textit{news} articles \citep{myen_2}, and the out-of-domain test set is a \textit{Bible} corpus \citep{100bible_cite}. The English side of the training set has 51k unique words, while the \textit{Bible} set has 29k. The vocabulary overlap between the training and test sets is just 6k words, equivalent to 21\% of the test vocabulary. After BPE, The average test sentence length increases from 25 to 38 tokens, seeing a 52\% rise. We adopt the model trained by \citet{aji-etal-2020-neural} and add shortlisting during decoding. The results displayed in Table~\ref{results_myen} show that out-of-domain performance does not improve with shortlisting, likely due to the high degree of vocabulary mismatch. \begin{table}[ht!] \centering \begin{tabular}{|l|cc|} \hline & baseline & shortlist \\ \hline news (in-domain) & 18.00 & 15.7 \\ Bible & 0.2 & 0.2 \\ \hline \end{tabular} \caption{Very low-resource Burmese-English results.} \label{results_myen} \end{table} \subsection{Availability of resources} Our previous German-English experiments are carried out under an artificially resource-constrained condition. We therefore verify the potential of our methods in a high-resource setting too, by applying shortlisting on a WMT19 German-English submission from Microsoft \citep{junczysdowmunt:2019:WMT}, and evaluating on the same out-of-domain datasets. \begin{table}[!ht] \centering \begin{tabular}{|l|cc|c|} \hline & \multicolumn{2}{c|}{Microsoft WMT19} & low-resource \\ & baseline & shortlist & baseline \\ \hline medical & 14.4 & 14.4 & 61.4 \\ Koran & 0.0 & 0.0 & 0.8 \\ law & 8.7 & 8.7 & 17.8 \\ IT & 15.4 & 15.4 & 15.7 \\ subtitles & 1.0 & 1.0 & 2.6 \\ \hline \end{tabular} \caption{High-resource German-English results.} \label{results_ms} \end{table} Results in Table~\ref{results_ms} show that shortlisting has no impact on BLEU comparing to the baseline. We conclude that given a high-resource setting and the apparent large domain mismatch, the IBM model's alignments do not contribute additional information to the model. This finding is corroborated by \citet{li-etal-2019-word}: IBM model alignments are mostly better at capturing function words, not content words, compared to a neural model. Furthermore, unnatural and aggressive BPE segmentation on out-of-domain text (e.g.\ Table~\ref{tab:subtitles}) could result in a lexical shortlist not capturing any meaningful alignment. We add our low-resource baseline trained on \textit{medical} with BPE on all data (Section~\ref{sec_results_and_analysis} Table~\ref{results_tab}) to comparison, and find that it surpasses the huge WMT model on each domain. Two reasons account for this: a WMT model is heavily biased to the news domain only; and the BPE scheme learned from news data is inferior to one learned from the out-of-domain datasets, when being evaluated on these domains. \section{Conclusion} We explore computationally cheap methods to improve neural machine translation performance in out-of-domain settings. We suggest that adding a lexical shortlist trained on the same data is always beneficial. While re-ranking also improves BLEU, it targets the BLEU brevity penalty, and does not produce better word choices. Although our results are promising in a low-resource condition, they do not transfer well to a scenario with very distant domains or sufficient resources. Our analysis shows that this is due to little vocabulary overlap, and the limited contribution from the IBM model under out-of-domain BPE segmentation. \section*{Acknowledgements} We would like to thank the anonymous reviewers, as well as the members of the AGORA research group for their valuable comments. \lettrine[image=true, lines=2, findent=1ex, nindent=0ex, loversize=.15]{eu-logo.png}% {T}his work was conducted within the scope of the Connecting Europe Facility\ \textit{User-Focused Marian}, which has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No INEA/CEF/ICT/A2019/1927024. Any communication or publication related to the action, made by the beneficiaries jointly or individually in any form and using any means, shall indicate that it reflects only the author's view and that the Agency is not responsible for any use that may be made of the information it contains. This research is based upon work supported in part by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via contract \#FA8650-17-C-9117. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies, either expressed or implied, of ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for governmental purposes notwithstanding any copyright annotation therein.
{'timestamp': '2021-09-22T02:19:47', 'yymm': '2101', 'arxiv_id': '2101.00421', 'language': 'en', 'url': 'https://arxiv.org/abs/2101.00421'}
arxiv
\section{Introduction}\label{introduction} This work presents an OpenCL backend for the Torch network library. Torch\cite{torch} is a deep learning library. Other commonly used deep learning libraries include: caffe\cite{caffe}, MXNet\cite{mxnet}, and Tensorflow\cite{tensorflow}. Deep learning became popular with the success of the AlexNet\cite{alexnet} deep learning model on the Imagenet\cite{imagenet} task. Prior to AlexNet, image recognition used hand-engineered features such as SIFT\cite{sift} and SURF\cite{surf}, in order to get state of the art performance. AlexNet used deep learning to extract features automatically, via the expressive power of a hierarchy of layers. A key ingredient for this to work was the massive amount of data available in the ImageNet task, compared to earlier tasks, such as MNIST\cite{mnist} and CIFAR\cite{cifar}. This allowed training complex models without overfitting. ImageNet gave sufficient training data for the gradients to propagate across all layers, despite the vanishing of the gradient signal as it traverses from the output back through the multiple layers. Given the amount of training data involved, and the length of time to train each batch in a deep network, another key ingredient for the success of AlexNet was: the computational capacity available in GPUs. GPUs provided sufficient processing power to be able to run multiple epochs on imagenet, using a deep network, in a reasonable timeframe, ie days or weeks; rather than months or years. Recent continued developments of SOTA models on ImageNet often improve on AlexNet by adding more layers, making the network deeper. It is probably fair to say that the more processing power we can bring to bear onto neural network models, the easier it will be to create powerful models, to train them in a reasonable timeframe, and to train them on ever larger datasets. LSUN dataset\cite{lsun} for example has 20 million images, a 20-fold increase from AlexNet. In order to obtain continued development of the computational capacity of neural network hardware, it could plausibly be useful to encourage competition between hardware vendors to as great an extent possible. For training neural networks, GPUs are typically used, but there is no particular reason why other hardware, such as Field Programmable Gate Arrays (``FPGAs''), or dedicated Massively Parallel Processors (MPPs), could not be used instead. Even within the domain of GPUs, it is probably fair to say that the vast majority of neural network training is not done on multiple hardware vendor's hardware, but using NVIDIA CUDA hardware. One reason for this is that NVIDIA was the first vendor to make GPUs accessible for running numerical algorithms in a straightforward fashion, without needing clever hardware hacks. NVIDIA introduced the CUDA toolkit, and they released TESLA GPUs, which were dedicated hardware for running embarrassingly parallel numerical algorithms. More recently, other GPU manufacturers, such as Intel and AMD, have made their own GPUs available for numerical compute applications. However, looking at the machine learning domain, existing neural network libraries were written to use the NVIDIA CUDA toolkit, and it was not therefore possible to run them on non-CUDA hardware. Concretely it is not possible to run Caffe, Tensorflow, Torch, or MXNET on non-CUDA hardware. In 2015, this situation started to change. Caffe now can be used on OpenCL hardware, thanks to the efforts of Gu et al \cite{openclcaffe}, Tschopp\cite{greentea}, and Engel\cite{caffeclengel}. DeepCL\cite{deepcl} provides a dedicated deep learning library for OpenCL. \texttt{cltorch}, described in the present paper, provides a hardware-agnostic backend for the `Torch' neural network library, using OpenCL. These projects facilitate vendor competition, and therefore contribute to the development of state of the art parallel compute hardware. \texttt{cltorch} is built using OpenCL. OpenCL is a standard governed by the Khronos Group. It aims to make it possible to run a single numerical algorithmic implementation across multiple hardwares, without needing any changes to the implementation. Hardware vendors who are members of the OpenCL consortium include: AMD, Qualcomm, NVIDIA, Intel, and Xilinx. OpenCL is not the only possible cross-platform approach possible. A recent alternative is AMD's HCC, which we will touch on briefly, at the end of this paper. \section{Key differences between CUDA and OpenCL}\label{key-differences-between-cuda-and-opencl} CUDA and OpenCL are not so different, both conceptually, and in the details. However there are some key differences, that make porting challenging. \subsection{language word differences}\label{language-word-differences} The names of certain functions are different. For the example, to determine the id of a thread within a block of threads, on CUDA this uses properties, such as \texttt{threadIdx.x}. In OpenCL this uses functions such as \texttt{get\_local\_id(0)}. The meanings of such functions are typically the same, or similar, and these differences can be handled in a straightforward fashion, using search and replace. \subsection{C++ templates}\label{c-templates} A more fundamental difference is the use of C++, and specifically C++ templates and functors, in CUDA. Torch CUDA framework makes extensive use of these. OpenCL 1.2 is based on C99, and does not have templating. Gu et al solved this problem by using a recent version of OpenCL, which does support C++ templates. Unfortunately, this limits the hardware that such a library can run on. For example NVIDIA hardware, and some mobile hardware, only supports OpenCL 1.1 and OpenCL 1.2. It can be argued that there is no reason to support NVIDIA hardware, because on NVIDIA hardware one can use CUDA instead. However, it seems an interesting goal to be able to run a neural network library across all commonly available GPUs, including those for which an alternative implementation already exists. This would enable a single codebase to be used across all devices, reducing redundant effort. The C++ templates in Torch CUDA implementation cannot be trivially replaced by hand-written C99 code. For example, they are used to pre-bake geometry-specific parameters, such as loop sizes for loop unrolling. It is not tempting to write unrolled loops by hand for multiple possible geometries. The clBLAS\cite{clblas} library handles this issue by using Python scripts to directly write out the generated OpenCL kernels and related C code, at compile time. This is an effective solution. It is fast at runtime, because the generated code is entirely generated at build time. However, it means that all possible geometries need to be baked in, at compile time, leading to a combinatorial explosion of possible parameter values. Therefore, in \texttt{cltorch}, the kernels are generated at runtime, adapted to the exact geometries required. Runtime code generation needs a scripting language to be embedded into the network library. Lua was selected. It is lightweight (about 46KB), and easy to embed. A templating language similar to Jinja2 was used, based on a templater by Nachimwald\cite{nachiwald}. This approach was sufficient to express the C++ CUDA templates used by CUDA torch. \subsection{Use of Thrust library}\label{use-of-thrust-library} The Torch CUDA library makes extensive use of the Thrust\cite{thrust} library, to handle for example sorting and reduction operations. Thrust is CUDA-specific, and therefore these methods need careful consideration. For now, this was worked around by using alternative approaches. In the case of reduction, Torch CUDA backend has internal implementations, and this was ported, and used in place of some of the calls to Thrust. Merry \cite{merry2015performance} provides performance benchmarks of several libraries that might be useful here. \subsection{cl\_mem object offsets}\label{clux5fmem-object-offsets} cl\_mem objects cannot themselves carry an implicit offset within the allocated buffer, unlike their CUDA \texttt{float\ *} counterparts. In Caffe library OpenCL backends, this was quite a large engineering challenge, since the \texttt{float\ *}s are passed around inside the library, and offsets are added to these in very many places. In Torch OpenCL backend this was not an issue, since the Torch Tensor structure already incorporates a \texttt{storageOffset} value. \subsection{Runtime compilation}\label{runtime-compilation} In order to facilitate being able to run across many hardware platforms, OpenCL kernels are typically compiled on the fly, at runtime. CUDA kernels are compiled at build time, with the rest of the C and C++ code. Compiling the GPU kernels at build time might provide a very slight boost at runtime, but in practice the cost of compiling the OpenCL kernels at runtime was found to be negligible, for deep learning libraries, compared to the time spent on network training. Compiling at runtime has the advantage that one can bake in the exact geometries which are required. By comparison, many of the Torch CUDA functions, such as the `Apply' method for example, bake in several hundred possible geometries, most of which will never be used. Runtime compilation makes it possible to provide some useful functionalities to the framework user, such as being able to provide custom functions, which will be compiled on the fly into GPU kernels. These will run on the GPU, at full speed. Zagoruyko has implemented similar functionality for CUDA Torch as an additional module \cite{cunnrtc}, which runs the CUDA compiler at runtime. \subsection{OpenCL Kernel Debuggers}\label{opencl-kernel-debuggers} When using CUDA, there are extensive debugging tools available, to facilitate finding root cause on kernel crashes, or numerical accuracy issues. When using OpenCL on CUDA devices, no such debugging tools are available. Some vendors provide debugging tools for their specific hardware. For example AMD has created CodeXL\cite{codexl}. However, no cross-platform tool is available. An alternative approach is to use a simulator. Oclgrind \cite{oclgrind} provides OpenCL kernel debugging, using a simulated OpenCL device, loadable via ICD. \subsection{Hardware geometry differences}\label{hardware-geometry-differences} Each specific hardware has its own set of geometry specifications, including, but not limited to: \begin{itemize} \tightlist \item maximum workgroup size \item warp size \item local memory size \item number of registers \end{itemize} A kernel that runs prefectly on NVIDIA hardware might fail to run altogether on eg AMD hardware. For example, the kernel might be written on the assumption that at least 512 workgroup threads are available, whereas AMD hardware typically has a maximum of 256 workgroup threads. Many kernels won't run across multiple hardware platforms until they have been tested on each platform, and platform-specific issues addressed. It is not in general safe to assume that code that works on one hardware platform will run on all the others. Moreover, the low-level memory management involved in writing OpenCL code contrasts with the use of caching on CPUs, where the caching is handled automatically by the processor, at runtime. It arguably might not be appropriate for GPUs to handle caching dynamically at runtime, because one of the distinguishing features of GPU cores is their simplicity. However, it does seem plausible that a language that is slightly higher level than OpenCL could perhaps leave the management of the cache and the memory to an effective optimizing compiler to handle? This would free the developer to focus on writing down the algorithms in programmatic form, rather than considering different possible permutations and combinations of memory and loop structures. PENCIL \cite{pencil} might be one approach here. \subsection{Compiler differences}\label{compiler-differences} Each hardware vendor's compiler emits slightly different warnings and errors. Something that builds cleanly on one vendor's hardware might fail to build altogether on another's. In addition, certain syntax, valid C99, entirely crashed certain compilers, a ``segfault''. The result is that, in addition to hardware geometry differences, each kernel needs to be built using each supported vendor's OpenCL compiler, in order to resolve vendor-specific build issues. It is not safe to assume that if it builds on one vendor's OpenCL compiler, and that the kernel contains only valid C99, that other vendor's OpenCL compilers will build the kernel successfully. Therefore, if one wishes to support hardware from three different vendors, one needs to have access to representative hardware from each vendor. \subsection{OpenCL version}\label{opencl-version} There is a compromise between targeting more recent versions of OpenCL, providing additional functionality and performance, or targeting older versions, allowing the use of more possible target platforms. \texttt{cltorch} targets OpenCL 1.2, which is supported by many current GPUs from Intel, NVIDIA, and AMD. Nevertheless, some mobile devices in common use continue to use OpenCL 1.1, and would therefore need special treatment in order to work with \texttt{cltorch}. \subsection{Kernel caching}\label{kernel-caching} NVIDIA GPUs cache the kernels automatically, even when building from templates, including where the kernel OpenCL code is supplied as a string, at runtime. For training a neural network model, the compilation time is negligible. However, for development purposes, being able to start the kernels quickly is convenient. Thus, there could be an opportunity for other vendors to provide similar kernel caching functionality. \section{Comparison with other frameworks}\label{comparison-with-other-frameworks} In this section, we will compare OpenCL Torch with other deep learning frameworks and backends, and specifically with: \begin{itemize} \tightlist \item CUDA Torch \item DeepCL \item OpenCL Caffe \end{itemize} \subsection{CUDA Torch}\label{cuda-torch} CUDA Torch provides more functionality than the OpenCL Torch implementation currently. For example, the \texttt{sort} function is not currently implemented in OpenCL Torch. \needspace{36pt}Given constant hardware, the CUDA implementation runs faster than the OpenCL implementation. There are two principle reasons: \begin{itemize} \tightlist \item Semantically identical OpenCL kernels often run slower than their CUDA counterparts, even on the same hardware \item there is currently no equivalent of the CUDA CUDNN\cite{cudnn} library available for OpenCL \end{itemize} \begin{figure}[htbp] \centering \includegraphics[width=0.48000\textwidth]{img/perelementclvscuda2b-eps-converted-to.pdf} \caption{Per-element timings as function of tensor size\label{perelement1}} \end{figure} With regards to the first reason, Figure \ref{perelement1} shows a comparison of carrying out per-element operations on a tensor in CUDA Torch vs OpenCL Torch. It shows the bandwidth for per-element operations, as a function of the number of floats per kernel launch, for CUDA and for OpenCL. These kernels are relatively simple, and the code is more or less the same, to within a search and replace eg of \texttt{threadIdx.x} with \texttt{get\_local\_id(0)}. This experiment was performed on an NVIDIA K520 GPU, using CUDA Torch as of 21 May 2016, and OpenCL Torch as of 21 May 2016. The scale is log-log. We can see that the shape of the graph is pretty similar for both OpenCL and CUDA kernel launches. For both backends, the bandwidth is approximately constant down to tensors of \(1e5\) floats, then reduces with tensor size, as the overhead of kernel launch and setup becomes dominant. The shape of both graphs, CUDA vs OpenCL, on a log-log scale, looks pretty similar. \begin{figure}[htbp] \centering \includegraphics[width=0.50000\textwidth]{img/perelementclvscudatenmillion-eps-converted-to.pdf} \caption{Per-element timings for tensors of 1e7 floats\label{perelement2}} \end{figure} However on a linear scale, there is a noticeable difference between the performance of this kernel using CUDA and using OpenCL. Figure \ref{perelement2} shows the bandwidths on a linear scale for tensors of \(1e7\) floats.\\ We can see that the OpenCL backend is about 33\% slower than the CUDA backend, for this geometry, even though the hardware is identical, and the kernel code is approximately identical, to within a search and replace for eg \texttt{threadIdx.x} vs \texttt{get\_local\_id(0)}. An opportunity exists to look at why this is the case, since both CUDA and OpenCL compile via the same PTX IL. \subsection{DeepCL}\label{deepcl} DeepCL\cite{deepcl} provides a deep learning framework dedicated to OpenCL, that runs on Windows, as well as on linux and Mac. It provides a commandline tool, and a python interface. DeepCL does not provide as many network layer types, or as complete an implementation of each layer type, compared with OpenCL Torch, or OpenCL Caffe. \subsection{OpenCL Caffe}\label{opencl-caffe} There are several ports of Caffe\cite{caffe} to OpenCL: Gu et al\cite{openclcaffe}, Engel\cite{caffeclengel}, and Tschopp\cite{greentea} Caffe is quite challenging to port to OpenCL, because it is quite tightly coupled with the underlying CUDA implementation, and it is challenging to factorize this so that an OpenCL implementation will not adversely affect subsequent Caffe development. There is no easy solution for this task, so merging the OpenCL ports to Caffe core is a painstaking time-consuming task, needing careful negotiation between the various parties involved. In terms of performance, the port by Gu et al contains a batched \texttt{im2col} implementation, discussed below. Tschopp's Greentea initially used \texttt{im2col}. Recently, Tschopp has started to implement \texttt{implicitgemm}. These algorithms are discussed below. Having discussed some alternative implementations in terms of features and functionality, let's look now at performance. \subsection{Performance}\label{performance} \begin{figure}[htbp] \centering \includegraphics[width=0.48000\textwidth]{img/convnetbenchmarkswithfft2b-eps-converted-to.pdf} \caption{Convnet-benchmarks timings\label{convnetbenchmarks}} \end{figure} Figure \ref{convnetbenchmarks} shows the timings for running a single forward-backward iteration through the convolutional layers of six popular convnet models. These timings are from Chintala's convnet-benchmarks\cite{convnetbenchmarks}. The timings shown are the forward-backward training times for a single batch. The implementations are described in Table \ref{tab:convnetimplementations}. \begin{table} \begin{center} \begin{tabular}[h]{llll} \toprule Identifier & Framework & Backend & Algorithm \\ \hline \texttt{cutorch} & Torch & CUDA & \texttt{im2col} \\ \texttt{fbfft} & Torch & CUDA & \texttt{fft} \\ \texttt{cudnnv4} & Torch & CUDA & CUDNNv4 \\ \texttt{neon} & Nervana Neon & CUDA & \texttt{winograd} \\ \texttt{greentea} & Caffe & OpenCL & \texttt{im2col} \\ \texttt{cltorch} & Torch & OpenCL & \texttt{im2col} \\ \bottomrule \end{tabular} \end{center} \caption{Convolutional Implementations} \label{tab:convnetimplementations} \end{table} Thus, we compare between torch implementations, between OpenCL Torch and OpenCL Caffe, and with a state of the art convolutional implementation for CUDA cards \texttt{neon}. DeepCL is included in the per-layer timings on the convnet-benchmarks page, but is not included in the full network timings shown here, because it lacks certain key implementation details for these models. Looking at Figure \ref{convnetbenchmarks}, we can see that the OpenCL implementations are significantly slower than the CUDA implementations. \texttt{cltorch} is marginally faster than Tschopp's Greentea \texttt{im2col} implementation. \texttt{cltorch} is around 3-4 times slower than the Torch \texttt{cutorch} implementation. \texttt{neon} is about 20 times faster than \texttt{cltorch}, on the \texttt{Googlenet\ v1} model. Gu et al's OpenCL Caffe is not present on the benchmarks page, because it uses AMD-specific OpenCL extensions, and therefore cannot run on the NVIDIA Titan X used here. It could be interesting to obtain benchmarks on hardware from other vendors, for example on AMD GPUs. Let's look at performance in more detail, and look at what options we have to improve the performance of convolutions in hardware-agnostic neural network frameworks. \section{Performance Analysis}\label{performance-analysis} In this section, we will analyse options for improving the performance of hardware-agnostic neural net frameworks. We will see that the convolutional layers dominate the training time. We will compare common algorithms for computing the convolution, discuss GEMM, hardware-specific implementations, and HCC. \subsection{Importance of convolution}\label{importance-of-convolution} \begin{figure}[htbp] \centering \includegraphics[width=0.48000\textwidth]{vgg_timings/vgg_a_timings2_horiz-eps-converted-to.pdf} \caption{VGG A per-layer timings\label{vggalayertimings}} \end{figure} The training time for a convolutional network is dominated by the convolutional layers. Figure \ref{vggalayertimings} shows the per-layer forward time for VGG model `A', on an NVIDIA Titan X GPU, for \texttt{im2col+clBLAS}, \texttt{im2col+cublas} and \texttt{cudnnv4} convolutional implementations. \begin{figure}[htbp] \centering \includegraphics[width=0.48000\textwidth]{vgg_timings/vgg_a_summary2-eps-converted-to.pdf} \caption{VGG timings grouped by layer type\label{vggalayertimingssummary}} \end{figure} The vast majority of the time is going into the convolutional layers, rather than into pooling, or RELU. Figure \ref{vggalayertimingssummary} sums the timings by layer type, and confirms this analysis. It is clear that the convolutional layer is where we should be focusing our attention. These graphs shows timings for three Torch GPU backends, described in Table \ref{tabletorchbackends}. Looking again at Figure \ref{vggalayertimingssummary}, we can see that the convolutional performance of \texttt{cltorch} is about three times slower than for the CUDA backends for Torch, and therefore there are opportunities to improve in this area. \begin{table} \begin{center} \begin{tabular}[h]{ll} \toprule Implementation & Torch GPU backend \\ \hline \texttt{im2col+cublas} & \texttt{cutorch} (CUDA Torch) \\ \texttt{cudnnv4} & \texttt{cutorch} with \texttt{cudnnv4} library \\ \texttt{im2col+clBLAS} & \texttt{cltorch} (OpenCL Torch, this paper) \\ \bottomrule \end{tabular} \end{center} \caption{Torch GPU Backends} \label{tabletorchbackends} \end{table} \subsection{Convolutional Algorithms}\label{convolutional-algorithms} In order to go further with hardware-agnostic deep learning frameworks, it could be interesting to analyse how the CUDA learning frameworks obtain excellent performance. \needspace{48pt} There are four algorithms in common use: \begin{itemize} \tightlist \item \texttt{im2col} \item \texttt{implicitgemm} \item \texttt{fft} \item \texttt{winograd} \end{itemize} In addition, cuda-convnet\cite{cudaconvnet} provides a very fast direct convolutional implementation for very specific convolutional geometries. Let's look at each of these algorithms in turn, starting with cuda-convnet \subsubsection{Cuda-convnet}\label{cuda-convnet} Cuda-convnet provides a very fast convolutional implementation for very specific convolutional geometries. Unfortunately it generalizes poorly to other geometries, or hardware. For example \cite{caffe} found that using \texttt{im2col} gave a speedup of 1.3 times on K20, compared to cuda-convnet, which is optimized for GTX580. \subsubsection{im2col}\label{im2col} \texttt{im2col} \cite{caffe,im2colchellapilla} is a very general method for implementing convolutions, off-loading the geometry-specific specializations to the underlying GPU BLAS implementation. \texttt{im2col} converts the convolution of a single 3d image tensor with the 4d weights tensor into a matrix multiplication of two 2-dimensional matrices. This uses more memory than direct convolution, but it generalizes well to many convolutional geometries. It can take advantage of existing optimizations in the existing SGEMM implementations. The idea for using matrix multiplications for carrying out convolutions is not new, but the observation that this produces excellent performance on GPUs, that generalizes well to many geometries, was made independently by \cite{caffe} and \cite{im2colchellapilla}. For \texttt{im2col} in \texttt{cltorch}, the BLAS implementation is handled by clBLAS\cite{clblas}. clBLAS is highly optimized for many high-performance computing workloads, but till recently had not been used for deep learning im2col workloads. The geometries produced by im2col do not fit within the regime of geometries for which clBLAS has been optimized on previously. Therefore, the SGEMM performance for these geometries is relatively less good. Gu et al\cite{openclcaffe} found that the overall convolutional speed of clBLAS for these workloads is not competitive with \texttt{cublas}. clBLAS works well for large, square matrices, with dimensions of around 1024 or 4096 along the side, and dimensions a multiple of 8 or 16. Gu et al showed that using batched \texttt{im2col}, over multiple images, puts clBLAS into a more favorable regime, giving a performance boost of around 4-5 times, on AMD hardware. Therefore it could be interesting to incorporate this technique generally into other OpenCL backends. In general, the performance of \texttt{im2col} will be strongly dependent on the performance of the underlying \texttt{GEMM} implementation. \subsubsection{implicitgemm}\label{implicitgemm} Similar to \texttt{im2col}, \texttt{implicitgemm}\cite{cudnn} lowers the convolutions onto matrix multiplication. Whereas \texttt{im2col} fully materializes the lowered matrix in off-chip memory, \texttt{implicitgemm} materializes the lowered matrix lazily, in on-chip memory. This reduces memory requirements, and can improve performance. \texttt{implicitgemm} is implemented in NVIDIA's \texttt{CUDNNv1}\cite{cudnn}. An OpenCL implementation of \texttt{implicitgemm} is being developed by Tschopp \cite{greentea}. This looks like a promising way forward to improve OpenCL convolutional performance. \subsubsection{FFT}\label{fft} \texttt{fft} transforms the convolutional problem from the spatial domain into the frequency domain. It is constant-time with respect to the size of the convolutional kernel. It typically requires a large amount of memory.\\ For models such as Alexnet, which have large kernels in the first layer, \texttt{fft} gives noticeable speed benefits. Specifically, in the second layer of AlexNet, \texttt{fft} shows a clear benefit for the stride 1 5x5 kernels. However, recently the focus of convolutional networks has turned to smaller kernels. VGG uses 3x3 kernels. GoogleNet includes 1x1 kernels. On these models, the benefits of \texttt{fft} are less clear, compared to other algorithms. A competitive implementation of \texttt{fft} is \texttt{fbfft}\cite{fbfft}. In Figure \ref{convnetbenchmarks}, it can be seen that \texttt{fbfft} is fast on AlexNet, and on Overfeat, but offers no advantage on VGG. No timings are available for GoogleNet, which contains 1x1 convolutions, and is far from the favorable regime for \texttt{fft}. As for \texttt{im2col}, \texttt{fft} needs a fast \texttt{GEMM} implementation. The performance of \texttt{fft} will be strongly dependent on the speed of the underlying \texttt{GEMM}. \subsubsection{Winograd}\label{winograd} The Winograd FIR algorithms\cite{winogradarithmetic} are an algorithmic optimization that reduces the number of mathematical operations required for convolution. Winograd outlined the general principles in the 80s. Lavin and Gray provided a specific implementation for GPU convolution in \cite{lavin2015fast}, and implemented these algorithms in \texttt{neon}\cite{neon}. \texttt{winograd} is an algorithmic improvement, and therefore could be implemented also in OpenCL, plausibly providing a speedup similar to the speedup which it provides to \texttt{neon}. Note however that this is not the only optimization in \texttt{neon}. We will look later at \texttt{neon}'s use of SASS, including for the GEMM implementation, which provides additional speedups. As for \texttt{im2col} and \texttt{fft}, \texttt{winograd} transforms the problem, but still relies on GEMM. And therefore its performance is strongly related also to the efficiency of the underlying GEMM implementation. Having touched on \texttt{neon}, we should look at \texttt{neon} specifically, as the current state of the art for convolutional implementations, on NVIDIA CUDA hardware. \subsubsection{Neon}\label{neon} \texttt{neon}\cite{neon} uses at least the following optimizations to obtain its very fast, near-optimal convolutional performance: \begin{itemize} \tightlist \item \texttt{winograd} algorithm\cite{winogradarithmetic,lavin2015fast} \item \texttt{SASS} implementation \item \ldots{} including a \texttt{SASS} implementation of GEMM \item fully fused kernels \end{itemize} As discussed, the \texttt{winograd} algorithm could be implemented in OpenCL, and looks a promising possible way forward to improving OpenCL convolutional performance. Note that as for \texttt{fft} and \texttt{im2col}, \texttt{winograd} is also dependent on an underlying GEMM implementation. Therefore, whilst writing \texttt{winograd} in OpenCL could plausibly produce an efficient implementation, an efficient implementation of GEMM would also be required. The SASS implementations are not directly accessible from OpenCL, since they are not just vendor-specific, but architecture specific. SASS written for CUDA Maxwell devices is incompatible with SASS written for Kepler devices, and visa versa. For example, the SASS implementations make assumptions about the available registers. SPIR-V provides a portable IL language, which could help obtain efficient optimizations. However SPIR-V is at the level of PTX, rather than at the level of SASS. PTX is higher-level than SASS. It is device independent IL, albeit vendor-specific. How much contribution does the SASS implementation, the custom GEMM, and the fused kernels provide? We can estimate this by running a convolution twice, on the same device, one with the Maxwell optimizations on, and one with them turned off, by modifying the code to incorrectly detect the device as Kepler. Figure \ref{neonmaxwellvskepler} shows the results for this. This is for forward propagation of a batch of 128 224x224 images, using 3x3 convolutions, running on an NVIDIA Titan X. We can see that the Maxwell optimizations reduce the batch time by about 33\%. \begin{figure}[htbp] \centering \includegraphics[width=0.48000\textwidth]{neon/neonmaxwellvskepler-eps-converted-to.pdf} \caption{Neon, effect of Maxwell optimizations\label{neonmaxwellvskepler}} \end{figure} Therefore, an OpenCL implementation of \texttt{winograd} would be at least around 33\% slower than a hardware-optimized low-level implementation, such as \texttt{neon}. Taking into account the earlier experiments of running ``Apply'' in OpenCL and in CUDA, on the same device, which showed an additional performance drop of around 33\%, all other things equal, we could expect an OpenCL implementation of \texttt{winograd} to approach around 40\% of the execution speed of \texttt{neon}. However, note that \texttt{neon} depends also on the speed of the underlying GEMM implementation, as do also \texttt{im2col} and \texttt{fft}, so we should discuss GEMM briefly. \subsection{GEMM}\label{gemm} GEMM is at the heart of convolution. It is used by all the convolution algorithms detailed above, with the exception of the direct convolution algorithm in cuda-convnet. Thus, it is important that the GEMM implementation should be the most efficient possible. Currently, \texttt{cltorch} uses the clBLAS GEMM implementation. Gu et al showed that clBLAS is an effective GEMM implementation that can be competitive with the CUDA \texttt{cublas} implementation. Gu et al showed that it is important to ensure that the matrix sizes fall close to the optimal regime for clBLAS. Gu et al showed that by using batching, lower multiple images into matrix multiplication in a single batch, the clBLAS implementation was around 4-5 times faster, on AMD hardware. A possible alternative to clBLAS is ViennaCL, which provides a highly hardware-agnostic implementation of GEMM, working not just on OpenCL, but also on CUDA and OpenMP. \begin{figure}[htbp] \centering \includegraphics[width=0.41000\textwidth]{img/clblassgemm_hd7950_128mplus1-eps-converted-to.pdf} \caption{Comparison of CLBlast with clBLAS, on Radeon HD7950\label{graph:clblast}} \end{figure} In terms of performance, Nugteren is developing CLBlast\cite{clblast}, based on CLTune auto-tuner\cite{cltune}. CLBlast shows a performance benefit relative to clBLAS for matrices whose sides are not a multiple of \(128\). Specifically matrices with a side of \(128m+1\), for integer \(m\), show a clear benefit, Figure \ref{graph:clblast}, \cite{clblast}. Tschopp's \texttt{implicitgemm} implementation is based loosely on the CLBlast GEMM implementation, but using fully fused kernels, rather than factorizing the matrix lowering operation and the GEMM into separate kernels. It could be interesting to benchmark OpenCL \texttt{GEMM} implementations, under workloads associated with the convolutional algorithms discussed above. Lokhmotov's GEMMbench \cite{gemmbench} could potentially be useful for this. Going back to \texttt{neon}, assuming that one could obtain a \texttt{GEMM} implementation competitive with \texttt{cublas} for OpenCL, then it looks like it could be possible to write an OpenCL implementation of \texttt{winograd}, that could approach around 20-30\% of the speed of \texttt{neon} (ie 70-80\% slower than \texttt{neon}). This would be a significant improvement on the current \texttt{im2col} implementations. However, can we do better? \subsection{Pluggable Implementations}\label{pluggable-implementations} It seems challenging to approach the performance of close-to-the-metal \texttt{SASS} from within OpenCL or SPIR-V, because there is a limit to how far one can improve the performance in languages designed to be portable. To go further, two possible approaches could be: \begin{itemize} \tightlist \item implementation of highly optimizing compilers, for OpenCL, or \item create pluggable hardware-specific convolutional implementations \end{itemize} The former approach, of creating highly optimizing compilers, is an active area of research, and there are no easy answers. AEcute metadata \cite{aecutemetadata}, and the more recent PENCIL\cite{pencil} are two approaches to facilitate generation of hardware-optimized code. PENCIL allows expression of algorithms in a higher-level language, which can be used to generate device-optimized OpenCL. Rather than attempting to make the convolutional implementations portable, an alternative approach could be to make them pluggable, loadable at runtime, and strongly hardware-specific. Thus they could be written in low-level assembler, and make full use of hardware-specific optimizations, such as knowledge of the exact memory dimensions, register layout, and other hardware characteristics The neural network library frameworks could themselves be written in a portable language, such as OpenCL. Concretely, this could work in a similar way to the \texttt{ICD} abstraction layer in OpenCL. OpenCL's \texttt{ICD} binds with the vendor-provided OpenCL implementation at runtime. In the case of convolution, the machine learning framework could simply call a function \texttt{conv}, within a Khronos-provided API. The Khronos API would route the call to a convolutional implementation appropriate to the current targeted hardware device. This might look something like Figure \ref{convprop}. \begin{figure}[htbp] \centering \includegraphics[width=0.50000\textwidth]{img/openclconv1d.png} \caption{Proposal for runtime convolution linking\label{convprop}} \end{figure} Note that this architecture says nothing about who will write the highly optimized hardware-specific convolutional implementation. For example we could imagine a virtual OpenCL platform, that wraps the \texttt{neon} implementation, for CUDA hardware, see Figure \ref{convprop2}. \begin{figure}[htbp] \centering \includegraphics[width=0.50000\textwidth]{img/openclconv2b.pdf} \caption{Proposal for virtual OpenCL platform\label{convprop2}} \end{figure} \subsection{HCC}\label{hcc} Discussion of non-CUDA deep learning implementations would not be complete without touching on AMD's HCC. HCC is an alternative open standard to OpenCL. It is not backed by Khronos, but it is an open standard, backed by one of the major competitors to NVIDIA. It is currently implemented only on AMD hardware, but there is no reason why other hardware vendors couldnt support it in the future. Since only one vendor owns the specifications currently, it can potentially evolve rapidly. Note that HCC will not in itself directly solve the challenge of writing a fast convolutional layer. The key advantages of HCC could be agility, and compatibility with CUDA language. The AMD implementation of HCC might become faster than the AMD implementation of OpenCL. However, it seems unlikely that convolutional implementations written in pure HCC would approach the performance of Gray's SASS implementations in \texttt{neon}. Therefore, the use of pluggable architectures, such as that outlined above, might be key to obtaining the fastest cross-platform convolutional performance. HCC solves many of the challenges faced during the development of \texttt{cltorch}, such as the use of c++ templates in the \texttt{torch} CUDA code. It could therefore significantly facilitate the development of hardware- agnostic deep learning frameworks in the future. The extent to which HCC can contribute to hardware-agnostic deep learning framework will depend on the extent to which multiple hardware vendors adopt the standard. \section{Possible future evolutions}\label{possible-future-evolutions} In previous sections, possible future evolutions for portable neural network compute have been described in detail. Summarizing here, several possible future evolutions could improve the performance of portable deep learning libraries: \begin{itemize} \tightlist \item OpenCL implementation of \texttt{implicitgemm}, for example that currently under development by Tschopp \item OpenCL implementation of Winograd algorithms \item Improvements to the OpenCL GEMM implementations, for example that currently under development by Nugteren \item hardware-specific convolutional implementations, loaded at runtime via a pluggable architecture \end{itemize} Finally, HCC might facilitate the future development of hardware-agnostic learning frameworks, by facilitating the porting process, and reducing the disparity between CUDA and non-CUDA code-bases. \section{Conclusion}\label{conclusion} \texttt{cltorch} provides a hardware-agnostic backend for the Torch deep learning library. It is written using the portable language `OpenCL'. \texttt{cltorch} provides sufficient functionality to train recent models such as: AlexNet, GoogleNet, Overfeat, and VGG. Challenges faced during the creation of the \texttt{cltorch} backend were presented. Current OpenCL neural network framework implementations face challenges obtaining training speeds competitive with CUDA implementations. Possible approaches to improve the speed of the convolutional implementation have been presented. Finally, HCC could solve many of the challenges faced during the development and reduce the disparity between CUDA and non-CUDA codebases, but the extent to which it will become a hardware-agnostic standard, implemented by multiple vendors is as yet uncertain.
{'timestamp': '2016-06-16T02:12:27', 'yymm': '1606', 'arxiv_id': '1606.04884', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04884'}
arxiv
\section{Introduction} Radio-frequency (RF) energy harvesting technique has recently been regarded as a new viable solution to extend the lifetime of energy-constrained wireless networks \cite{xiao2014wireless}. This technique has opened up new opportunities for cooperative communications as it enables a new cooperative manner for wireless devices (see \cite{bi2015wireless} and references therein). In particular, the relay in conventional cooperative networks, can now harvest energy from the information source and then use the harvested energy to assist the source's transmission. In this sense, the relay is more willing to cooperate since it does not need to consume its own energy. In this paper, we refer to a cooperative communication network with wireless powered relay as a wireless-powered cooperative communication network (WPCCN). In fact, the design and analysis of WPCCNs have become a hot research topic in wireless communication area very recently (see, e.g., \cite{krikidis2012rf,chen2015harvest,krikidis2015relay,liu2015performance,gu2016distributed,nasir2015block}). It is worth pointing out that the design of wireless-powered networks is inherently different from that of conventional wireless networks powered by solar/wind energy harvesting (e.g., \cite{michelusi2013transmission}). Specifically, in wireless-powered networks, the amount of energy harvested by wireless-powered nodes highly depends on the network operation modes, while these two events are independent in conventional energy harvesting networks. In practice, due to the propagation loss of RF signals, the amount of energy harvested by wireless-powered\footnote{Throughout this paper, we use the terms ``wireless-powered" and ``energy harvesting" interchangeably.} nodes during one transmission block are normally very limited. Thus, it is necessary for these nodes to equip with energy storage (e.g., a rechargeable battery) such that they can accumulate enough amount of harvested energy before performing one round of information transmission. However, to the best knowledge of the authors, only a few papers in open literature incorporated the energy accumulation process in the design/analysis of WPCCNs. In \cite{krikidis2012rf}, Krikidis \emph{et al.} studied a classical three-node relay network with an energy harvesting relay, where the relay was assumed to have a discrete and finite-capacity rechargeable battery and the energy accumulation process at the relay was characterized by a finite-state Markov chain. Recently, \cite{krikidis2015relay,liu2015performance,gu2016distributed} extended \cite{krikidis2012rf} to a more general scenario with multiple energy harvesting relays, in which several relay selection schemes were proposed and analyzed. Besides, a continuous battery model was adopted in \cite{nasir2015block} to analyze the throughput performance of a three-node relay network with energy accumulation. However, an infinite capacity of the relay battery was assumed in \cite{nasir2015block}, which makes the resulting analysis somewhat ideal. A common assumption in \cite{krikidis2012rf,krikidis2015relay,liu2015performance,gu2016distributed,nasir2015block} is that no direct link exists between source and destination. However, the direct link of a WPCCN actually plays a crucial role in practice. This is because the amount of energy harvested by the wireless-powered relay is generally limited, which means the signal-to-noise ratio (SNR) of the source-destination link may be comparable or even larger than that of the relay-destination link. In other word, relying solely on an energy harvesting relay to accomplish the information delivery from source to destination may lead to poor system performance. Thus, the direct link should be incorporated in the designs of WPCCNs. When the direct link is available, a natural question that arises is ``\emph{how often should the source cooperate with the energy harvesting relay}?". This is actually a non-trivial problem. Specifically, the relay can only accumulate little amount of energy for information forwarding when the cooperation is too intensive, which may lead to even worse performance than the direct transmission (i.e., no cooperation) scheme. On the other side, few cooperation will yield the under-utilization of the relay and then make the cooperation gain insignificant. Motivated by this open problem, in this paper we focus on the design of a three-node WPCCN consisting of one source, one energy harvesting relay implementing decode-and-forward protocol and one destination, where the direct link between source and destination exists. We consider that the relay is equipped with a rechargeable battery and multiple antennas, which includes single-antenna relay scenarios studied in \cite{krikidis2012rf,krikidis2015relay,liu2015performance,nasir2015block} as special cases. Towards the appropriate usage of the energy harvesting relay, we develop an opportunistic relaying protocol, termed accumulate-then-forward (ATF), for the considered WPCCN, where the relay cooperates with the source in an opportunistic manner. Particularly, the cooperation between source and relay is activated only when the accumulated energy at relay exceeds a predefined energy threshold and the decoding of source's information at relay is successful. Otherwise, the source has to transmit information to destination by itself, while the relay accumulates the energy harvested from source's signals. By modeling dynamic charging/discharging behaviors of relay battery as a finite-state Markov chain, we then analyze the outage probability of the proposed ATF protocol over mixed Rician-Rayleigh fading channels. Specifically, in contrast to the Rayleigh fading model used in \cite{krikidis2012rf,krikidis2015relay,liu2015performance,nasir2015block}, we adopt Rician fading to characterize the channel fading between source and relay. This is more practical by considering that the line-of-sight (LoS) path is very likely to exist between source and relay as the current wireless energy harvesting techniques can only support a relatively short distance. Numerical results are finally performed to verify the theoretical analysis and illustrate the effects of several system parameters on the network outage probability. \section{System Model and Protocol Design}\label{System} We consider a WPCCN consisting of one single-antenna source $S$, one decode-and-forward (DF) relay $R$ equipped with $N$ antennas, and one single-antenna destination $D$. We assume that $S$ and $D$ have embedded power supplies, while $R$ is a wireless-powered device. But, $R$ is equipped with an wireless energy harvesting unit and a rechargeable battery such that it can accumulate the energy harvested from RF signals broadcast by $S$. Furthermore, the relay is equipped with separate energy and information receivers \cite{zhang2013mimo}. As such, it can flexibly switch its received signal to one of these two receivers to realize energy harvesting or information~decoding. Let $h_{SD}$ denote the complex channel coefficient of $S$-$D$ link. Also let $\mathbf{h}_{SR}$ and $\mathbf{h}_{RD}$ denote the $N\times1$ channel vectors of $S$-$R$ and $R$-$D$ link, respectively. As the up-to-date wireless energy harvesting techniques could only be operated within a relatively short distance, the line-of-sight (LoS) path is very likely to exist between $S$ and $R$. Motivated by this fact, we consider an asymmetric scenario for the fading distributions of $S$-$R$ link and $R$-$D$ link. In particular, the elements of $\mathbf{h}_{SR}$ are subject to independent and identically distributed (i.i.d.) Rician fading, while the elements of $\mathbf{h}_{RD}$ are subject to i.i.d. Rayleigh fading. Besides, the channel coefficient of direct link $h_{SD}$ follows Rayleigh distribution. Furthermore, all channels between $S$, $R$ and $D$ are assumed to experience slow, independent and frequency flat fading such that the channel gains remain unchanged within each transmission block but change independently from one block to the other. We now propose an accumulate-then-forward (ATF) protocol for WPCCN. In the proposed ATF protocol, the energy harvesting relay accumulates the energy harvested from signals broadcast by $S$ and assists its information transmission in an opportunistic manner. Specifically, the relay opportunistically switches between the energy harvesting mode and the information cooperation mode based on both whether its residual energy in battery exceeds a predefined energy threshold and whether its decoding of source's information is correct. Here, we use $T$ to denote the duration of each transmission block, which is further divided into two time slots with equal length $T/2$ when $R$ attempts to decode source's information (i.e., the residual energy at $R$ exceeds the predefined energy threshold). \begin{itemize} \item \textbf{Mode I}: This mode corresponds to the case when the current residual energy in relay battery, denoted by $E_R$, is less than the energy threshold $E_T$. In this situation, $R$ chooses to perform energy harvesting operation to further accumulate its energy and the source has to transmit its information to $D$ by itself during the whole transmission~block. \item \textbf{Mode II}: In this mode, the current residual energy $E_R$ at $R$ is not less than $E_T$, but the decoding of the source's information at $R$ during the first time slot is unsuccessful. Thus, $R$ still cannot cooperate with $S$ in this mode. During the second time slot, $S$ is motivated to re-transmit its information to enhance the received SNR at $D$, while $R$ can harvest energy from this signal to charge its battery. \item \textbf{Mode III}: Here, $R$ has accumulated enough energy (i.e., $E_R \ge E_T$) and its information decoding of the first hop is also correct. As such, $R$ will work in information cooperation mode by helping forward the source's information to $D$ during the second time slot, while $S$ can keep in silence during this period. \end{itemize} In the following, we express the harvested energy at $R$ and the received SNR at $D$ of the proposed ATF for three possible modes mathematically. Without lose of generality, we consider a normalized transmission block (i.e., $T=1$) hereafter. Moreover, we use $P_S$ to denote the transmit power of $S$ and $H_{xy}=\|\mathbf{h}_{xy}\|^2$ to denote the channel power gain, where $x,y\in\left\{S,R,D\right\}$ and $\|\mathbf{x}\|$ denotes the Euclidean norm of a vector $\mathbf{x}$. \subsection{Mode I} In this mode, $R$ harvests energy during the whole transmission block. Thus, the amount of harvested energy at $R$ can be expressed as \begin{equation}\label{eq:harvest_energy_I} E_{H}^{\rm{I}} = \eta P_S H_{SR}, \end{equation} where $\eta\in\left(0,1\right]$ is the energy conversion efficiency. In (\ref{eq:harvest_energy_I}), we ignore the amount of energy harvested from the noise as it is normally below the sensitivity of energy harvesting circuit. Let $x_S$ denote the transmitted signal by $S$ with unit energy. In Mode I, the received signal at $D$ comes only from the direct link. Thus, the received SNR at $D$ in Mode I is given~by \begin{equation} \gamma_{D}^{\rm{I}} = \gamma_{SD}= P_S H_{SD}/N_0, \end{equation} where $N_0$ is the power of the additive Gaussian white noise (AWGN). \subsection{Mode II} Since $R$ has stored sufficient energy in Mode II, during the first time slot, it will try to perform information decoding based on the signal received from $S$. We assume that the maximum ratio combining (MRC) technique is adopted at $R$ to maximize the received SNR. In this case, the received SNR at the $R$ is given~by \begin{equation} \gamma_{SR} = P_S H_{SR}/N_0. \end{equation} Recall that in this mode the source's information is not decoded correctly at $R$. In the second time slot, $S$ has to re-transmit its information to $D$ as $R$ cannot help, while $R$ can harvest energy from this re-transmitted signal. The harvested energy during the second time slot is given by \begin{equation} E_{H}^{\rm{II}} = \eta P_S H_{SR}/2. \end{equation} On the other hand, $D$ receives two copies of the same information from $S$. With the MRC technique, the received SNR at $D$ in Mode II can be expressed as \begin{equation} \gamma_{D}^{\rm{II}} = \gamma_{SD} + \gamma_{SD} = 2 P_S H_{SD}/N_0. \end{equation} \subsection{Mode III} In this mode, $R$ utilizes the received signal from $S$ to decode the information in the first hop and the decoding is correct. Thus, $R$ can cooperate with $S$ by forwarding the source's information to $D$. Here, we consider that $R$ will spend $E_T$ amount of energy to perform information forwarding and the fixed transmit power is assumed to be $P_R = 2 E_T$. Moreover, for simplicity, it employs transmit antenna selection scheme \cite{tannious2008spectrally}. That is, the antenna with maximum channel power gain is selected to forward information. We define $h_{RD}^* = \max \{\mathbf{h}_{RD}\}$. In this case, the received SNR at $D$ during the second time slot is given by \begin{equation} \gamma_{RD} = P_R H_{RD}/N_0, \end{equation} where $H_{RD}=|h_{RD}^*|^2$ is the channel power gain of $R$-$D$ link. Note that the received SNR at $D$ during the first time slot is same as (2). Using the MRC technique, the resulting SNR at $D$ in Mode III can be characterized as \begin{equation} \gamma_{D}^{\rm{III}} = \gamma_{SD} + \gamma_{RD} = \left(P_S H_{SD} + P_R H_{RD}\right)/{N_0}. \end{equation} \section{Outage Probability Analysis}\label{Analysis} In this section, we analyze the outage probability of the proposed ATF protocol over mixed Rician-Rayleigh fading channels. To this end, we first model the dynamic behaviors of the relay battery by a finite-state Markov chain (MC)~\cite{krikidis2012rf}. \subsection{Markov Chain Description} We assume that $R$ is equipped by a $L$ discrete-level battery with a capacity $C$. The $i$th energy level is defined as $\varepsilon_i = i C / L$, $i\in \{0,1,2,\ldots,L \}$. We define the state $S_i$ as the state of relay's residual battery being $\varepsilon_i$. $P_{i,j}$ is defined as the state transition probability from $S_i$ to $S_j$. Let $\lambda[m]\in\{\lambda_{{\rm{I}}},\lambda_{{\rm{II}}},\lambda_{{\rm{III}}}\}$ denote the system operation mode in the $m$-th transmission block, where $\lambda_X$, $X\in{\left({\rm{I}},{\rm{II}},{\rm{III}}\right)}$, represents the event that the $X$-th mode is operated. Considering the discrete battery model adopted in this paper, the discretized amount of energy $\varepsilon_H$ harvested by $R$ should be re-calculated as \begin{equation}\label{varepsilon_H} \small{ \varepsilon_H^X \triangleq \varepsilon_i,~{\rm{where}}~ i = \arg\max\nolimits_{j\in\{0,1,\ldots,L\}}\left\{\varepsilon_j:\varepsilon_j<E_H^X\right\}, }\end{equation} where $X\in\{{\rm{I}},{\rm{II}}\}$. Similarly, the actual amount of energy consumed by $R$ for information forwarding should be defined~by \begin{equation}\label{varepsilon_T} \varepsilon_T \triangleq \varepsilon_i,~{\rm{where}}~ i = \arg\min\nolimits_{j\in\{1,\ldots,L\}}\left\{\varepsilon_j:\varepsilon_j\geq E_T\right\}. \end{equation} In this paper, we assume that $R$ can decode the information correctly if its received SNR exceeds a predetermined threshold. Let $\mathbb{R}$ denote the transmit rate of $S$. The SNR threshold of $S$-$R$ link in Mode II or III can then be defined as $\gamma_0 = 2^{2\mathbb{R}}-1$. We now can describe the three possible operations of the proposed ATF protocol during the $m$-th transmission block mathematically as follows \begin{equation} \lambda[m] = \begin{cases} \lambda_{\rm{I}}, &\mbox{if ~$\varepsilon_T>\varepsilon[m]$},\\ \lambda_{\rm{II}}, &\mbox{if ~$\varepsilon_T\leq\varepsilon[m]~\&~\gamma_{SR}<\gamma_0$},\\ \lambda_{\rm{III}}, &\mbox{if ~$\varepsilon_T\leq\varepsilon[m]~\&~\gamma_{SR}\geq\gamma_0$}, \end{cases} \end{equation} where $\varepsilon[m]$ denotes the relay's residual energy at the beginning of the $m$-th transmission block. Moreover, the residual energy at the beginning of the $(m+1)$th transmission block can thus be expressed as \begin{equation} \varepsilon[m+1] = \begin{cases} \min \{\varepsilon[m] + \varepsilon_H^{\rm{I}}, C \}, &\mbox{if $\lambda[m] = \lambda_{\rm{I}}$}\\ \min \{\varepsilon[m] + \varepsilon_H^{\rm{II}}, C \}, &\mbox{if $\lambda[m] = \lambda_{\rm{II}}$}\\ \varepsilon[m] - \varepsilon_T, &\mbox{if $\lambda[m] = \lambda_{\rm{III}}$}\\ \end{cases}. \end{equation} Based on the above mathematical description, we now derive the state transition probabilities of the formulated MC for the relay's battery. Inspired by \cite{krikidis2012rf}, the state transition of the MC can be generally split into the following eight cases. \subsubsection{The battery remains empty ($S_0$ to $S_0$)} We consider the MC starts with the state $S_0$, i.e., the battery of $R$ is empty. It is obvious that Mode I will be activated in this case. Furthermore, the amount of harvested energy during the current block should be discretized to zero, which indicates that the condition $E_H^{\rm{I}} < \varepsilon_1=C/L$ holds. The transition probability of this case is characterized as \begin{equation} \small{ P_{0,0} = \Pr\left\{E_{H}^{\rm{I}} < \frac{C}{L} \right\}=F_{H_{SR}}\left(\frac{C}{\eta P_S L}\right), }\end{equation} where $F_{H_{SR}}(\cdot)$ denotes the cumulative distribution function (CDF) of $H_{SR}$. According to \cite{ko2000average}, we can write the CDF of $H_{SR}$ as $F_{H_{SR}}\left(x\right) = 1-Q_N\left(\sqrt{2NK},\sqrt{\frac{2(K+1)}{\Omega_{SR}}x}\right)$, where $Q_N\left(\cdot,\cdot\right)$ is the generalized ($N$th-order) Marcum $Q$-function \cite{zwillinger2014table}, $K$ is the Rician $K$-factor defined as the ratio of the powers of the LoS component to the scattered components and $\Omega_{SR} = \mathbb{E}\{\left|h_{SR,i}\right|^2\},~\forall i\in\left\{1,\ldots,N\right\}$, with $\mathbb{E}\{\cdot\} $ denoting the statistical expectation and $h_{SR,i}$ denoting the $i$-th element of ${\bf h}_{SR}$. \subsubsection{The empty battery is partially charged ($S_0$ to $S_i$ with $0<i<L$)} Mode I is activated to charge the battery. We can also deduce that the effective amount of harvested energy should be expressed as $\varepsilon_H^{\rm{I}} = i C/L$, which means $E_H^{\rm{I}}$ falls between the battery levels $i$ and $i+1$. Thus, the transition probability is \begin{equation} \small{ \begin{split} P_{0,i} &= \Pr\left\{\frac{i C}{L} \leq E_{H}^{\rm{I}} < \frac{\left(i+1\right)C}{L}\right\} \\ &= F_{H_{SR}}\left(\frac{\left(i+1\right)C}{\eta P_S L}\right) - F_{H_{SR}}\left(\frac{i C}{\eta P_S L}\right). \end{split}} \end{equation} \subsubsection{The empty battery is fully charged ($S_0$ to $S_L$)} Similar to the previous two cases, the transition probability can be calculated as \begin{equation} \small{ P_{0,L} = \Pr\left\{E_{H}^{\rm{I}} \geq C \right\} = 1 - F_{H_{SR}}\left(\frac{C}{\eta P_S}\right). }\end{equation} \subsubsection{The non-empty and non-full battery remains unchanged ($S_i$ to $S_i$ with $0<i<L$)}\label{ii_section} The battery stays at the same level, which indicates that $R$ either operates in Mode I or Mode II with zero effective harvested energy (i.e. $E_{H}^{\rm{I}}$ or $E_{H}^{\rm{II}}$ is discretized to zero). The transition probability of this case is characterized as \begin{equation}\label{ii} \small{ \begin{split} &P_{i,i} = \Pr\left\{ \left[ \left(E_T > \frac{i C}{L}\right) \cap \left( E_{H}^{\rm{I}} < \frac{C}{L}\right) \right]\right.\\ &~~~~~\left.\cup \left[\left(E_T \leq \frac{i C}{L}\right) \cap \left(\gamma_{SR} < \gamma_0\right) \cap \left( E_{H}^{\rm{II}}< \frac{C}{L}\right)\right] \right\} \\ &= \begin{cases} F_{H_{SR}}\left(\frac{C}{\eta P_S L}\right),~~ \mbox{if ~$E_T > \frac{i C}{L}$};\\ F_{H_{SR}}\left(\frac{\gamma_0 N_0}{P_S}\right) ,~~\mbox{if ~$E_T \leq \frac{i C}{L}~\&~\gamma_0 N_0 < \frac{2 C}{\eta L}$}; \\ F_{H_{SR}}\left(\frac{2 C}{\eta P_S L}\right), ~~\mbox{if ~$E_T \leq \frac{i C}{L}~\&~\gamma_0 N_0 \geq \frac{2 C}{\eta L}$} . \\ \end{cases} \end{split}} \end{equation} \subsubsection{The non-empty battery is partially charged ($S_i$ to $S_j$ with $0<i<j<L$)} Similar as the previous case, the battery is partially charged from level $i$ to $j$ (i.e., $\varepsilon_H^X = \left(j-i\right)C/L$). Thus, the transition probability can be derived as (\ref{ij}) shown on the top of next page. \begin{figure*}[!t] \vspace*{4pt} \normalsize \setcounter{MYtempeqncnt}{\value{equation}} \begin{equation}\label{ij} \small{ \begin{split} P_{i,j} = & \Pr\left\{ \left[ \left(E_T > \frac{i C}{L}\right) \cap \left( \frac{\left(j-i\right)C}{L} \leq E_{H}^{\rm{I}} < \frac{\left(j-i+1\right)C}{L}\right) \right]\right.\\ &~~~~~\left.\cup\left[\left(E_T \leq \frac{i C}{L}\right) \cap \left(\gamma_{SR} < \gamma_0\right) \cap \left( \frac{\left(j-i\right)C}{L}\leq E_{H}^{\rm{II}} < \frac{\left(j-i+1\right)C}{L}\right)\right] \right\}\\ = & \begin{cases} F_{H_{SR}}\left(\frac{\left(j-i+1\right)C}{\eta P_S L}\right)-F_{H_{SR}}\left(\frac{\left(j-i\right)C}{\eta P_S L}\right), &\mbox{if ~$E_T > \frac{i C}{L}$;} \\ 0, &\mbox{if ~$E_T \leq \frac{i C}{L}~\&~ \gamma_0 N_0 < \frac{2 \left(j-i\right)C}{\eta L}$;} \\ F_{H_{SR}}\left(\frac{\gamma_0 N_0}{P_s}\right)-F_{H_{SR}}\left(\frac{2\left(j-i\right)C}{\eta P_S L}\right), &\mbox{if ~$E_T \leq \frac{i C}{L}~\&~ \frac{2 \left(j-i\right)C}{\eta L} \leq \gamma_0 N_0 < \frac{2 \left(j-i+1\right)C}{\eta L}$;} \\ F_{H_{SR}}\left(\frac{2\left(j-i+1\right)C}{\eta P_S L}\right)-F_{H_{SR}}\left(\frac{2\left(j-i\right)C}{\eta P_S L}\right), &\mbox{if ~$E_T \leq \frac{i C}{L}~\&~ \gamma_0 N_0 \geq \frac{2 \left(j-i+1\right)C}{\eta L}$.} \\ \end{cases} \end{split}} \end{equation} \hrulefill \vspace*{4pt} \end{figure*} \subsubsection{The non-empty and non-full battery is fully charged ($S_i$ to $S_L$ with $0<i<L$)} In this case, the effective harvested energy $\varepsilon_H^X$, either from Mode I or Mode II, is greater than the residual space of the battery. The transition probability is thus given by \begin{equation}\label{iL} \small{ \begin{split} &P_{i,L} = \Pr\left\{ \left[ \left(E_T > \frac{i C}{L}\right)\cap \left( E_{H}^{\rm{I}} \geq \frac{\left(L-i\right)C}{L}\right) \right]\right.\\ &\left.\cup\left[\left(E_T \leq \frac{i C}{L}\right) \cap \left(\gamma_{SR} < \gamma_0\right) \cap \left( E_{H}^{\rm{II}}\geq \frac{\left(L-i\right)C}{L}\right)\right] \right\}\\ &= \begin{cases} 1-F_{H_{SR}}\left(\frac{\left(L-i\right)C}{\eta P_S L}\right), ~\mbox{if $E_T > \frac{i C}{L}$;} \\ 0,~~~~~~~~~~~~~~~~~~~~~~~~\mbox{if $E_T \leq \frac{i C}{L}~\&~\gamma_0 < \frac{2\left(L-i\right) C}{\eta N_0 L}$;}~~~~~~~~~~~~~~~~~~~ \\ F_{H_{SR}}\left(\frac{\gamma_0 N_0}{P_S}\right)-F_{H_{SR}}\left(\frac{\left(L-i\right)C}{\eta P_S L}\right),\\ ~~~~~~~~~~~~~~~~~~~~~~~~~~~\mbox{if $E_T \leq \frac{i C}{L}~\&~\gamma_0 \geq \frac{2\left(L-i\right) C}{\eta N_0 L}$.}\\ \end{cases} \end{split} }\end{equation} \subsubsection{The battery remains full ($S_L$ to $S_L$)} In this case, the battery of $R$ certainly has enough energy to support information forwarding in the second hop. Thus, only Mode II can be performed so that the battery level is not reduced. Since the battery is full at the beginning of the transition, $\varepsilon_H^{\rm{II}}$ can be any value. The transition probability can be evaluated~as \begin{equation}\label{LL} \small{ \begin{split} P_{L,L} = \Pr\left\{\gamma_{SR} < \gamma_0 \right\} = F_{H_{SR}}\left(\frac{\gamma_0 N_0}{P_S}\right) \end{split}}. \end{equation} \subsubsection{The non-empty battery discharged ($S_j$ to $S_i$ with $0\leq i< j\leq L$)} According to the principle of the proposed ATF scheme described in Sec. \ref{System}, the battery level is decreased only when Mode III is operated. The transition probability can thus be evaluated as \begin{equation}\label{ji} \small{ \begin{split} P_{j,i} =& \Pr\left\{\left(\gamma_{SR} > \gamma_0\right) \cap \left(E_T = \frac{\left(j-i\right)C}{L}\right)\right\} \\ =& \begin{cases} 1-F_{H_{SR}}\left(\frac{\gamma_0 N_0}{P_S}\right), &\mbox{if ~$E_T = \frac{\left(j-i\right)C}{L}$;} \\ 0, &\mbox{if ~$E_T \neq \frac{\left(j-i\right)C}{L}$.} \\ \end{cases} \end{split}} \end{equation} We are now ready to derive the steady state distribution of the relay battery. Let $\mathbf{M} = \left[P_{i,j}\right]_{(L+1)\times(L+1)}$ denote the state transition matrix of the formulated MC. It is easy to verify that $\mathbf{M}$ is irreducible and row stochastic. Thus, there should exists a unique solution $\boldsymbol{\pi}$ that satisfies the following equation~\cite{krikidis2012buffer} \begin{equation} \mathbf{\boldsymbol{\pi}} = \left(\pi_0,\pi_1,\ldots,\pi_L\right)^T=\mathbf{M}^T \boldsymbol{\pi}. \end{equation} This $\boldsymbol{\pi}$ is actually the discrete distribution of the relay residual energy and can be calculated as \begin{equation} \boldsymbol{\pi} = \left(\mathbf{M}^T - \mathbf{I} + \mathbf{B}\right)^{-1}\mathbf{b}, \end{equation} where $\mathbf{M}^T$ denotes the transpose matrix of $\mathbf{M}$, $\mathbf{I}$ is the identity matrix, $B_{i,j} = 1, \forall{i,j}$, and $\mathbf{b} = \left(1,1,\ldots,1\right)^T$\cite{krikidis2012buffer}. \subsection{Outage Probability} Based on the steady state of the relay battery derived in the previous subsection, we now analyze the outage probability of the proposed ATF scheme. Let $\Phi_X$, $X\in\left({\rm{I}}, {\rm{II}}, {\rm{III}}\right)$ denote the outage event of Mode I, II, and III, respectively. According to the full probability theory, we can express the outage probability of the considered WPCCN as \begin{equation}\label{Outage} \small{ \begin{split} P_{\rm{out}}&=\left(1-P_E\right) \Pr\left\{\Phi_{\rm{I}}\right\} + P_E \Pr\left\{\gamma_{SR} < \gamma_0 \right\}\Pr\left\{\Phi_{\rm{II}}\right\} \\ &~~~+ P_E \Pr\left\{\gamma_{SR}\geq\gamma_0\right\} \Pr\left\{\Phi_{\rm{III}}\right\}, \end{split} }\end{equation} where $P_E$ denotes the probability that the residual energy at $R$ is no less than the energy threshold $E_T$, which can be expressed as \begin{equation}\label{P_E} P_E = \sum\nolimits_{i=k}^{L} \pi_i,~{\rm{s.t.}}~k = \arg\min\nolimits_{k\in1,\ldots,L}\left\{\varepsilon_k \geq E_T\right\}. \end{equation} In Mode I, $S$ sends the information to $D$ during the whole block without the help of $R$. Thus, we have \begin{equation}\label{phi1} \Pr\left\{\Phi_{\rm{I}}\right\} = \Pr\left\{\gamma_{D}^{\rm{I}} < \gamma_1\right\} = F_{H_{SD}}\left(\frac{\gamma_1 N_0}{P_S}\right), \end{equation} where $\gamma_1 = 2^\mathbb{R}-1$ is the outage threshold without cooperation and $F_{H_{SD}}(\cdot)$ is the CDF of $H_{SD}$. Since the $S$-$D$ link suffers from Rayleigh fading, we have $F_{H_{SD}}\left(y\right) = 1- \exp \left({-\frac{y}{\Omega_{SD}}}\right)$, where $\Omega_{SD} = \mathbb{E}\{\left|h_{SD}\right|^2\}$ is the mean of $H_{SD}$\cite{louie2008performance}. For Mode II, the outage probability can be characterized as \begin{equation}\label{phi2} \Pr\left\{\Phi_{\rm{II}}\right\} =\Pr\left\{\gamma_{D}^{\rm{II}}<\gamma_0\right\}= F_{H_{SD}}\left(\frac{\gamma_0 N_0}{2 P_S}\right). \end{equation} Similarly, for Mode III, we can evaluate the outage probability as follows \begin{equation}\label{phi3} \small{ \Pr\left\{\Phi_{\rm{III}}\right\} = \Pr\left\{\gamma_{D}^{\rm{III}} < \gamma_0 \right\}= \Pr\left\{\gamma_{RD} + \gamma_{SD} < \gamma_0 \right\}. }\end{equation} With the aid of \cite{tannious2008spectrally}, we can express the term $\Pr\left\{\gamma_{RD} + \gamma_{SD} < \gamma_0 \right\}$ in closed-form as (\ref{sum_SNR_TAS_CDF}) on top of next page, in which $\bar{\gamma}_{SD}=P_S \Omega_{SD}/N_0$ and $\bar{\gamma}_{RD}=2E_T \Omega_{RD}/N_0$ and $\Omega_{RD} = \mathbb{E}\{\left|h_{RD,i}\right|^2\},~\forall i\in\left\{1,\ldots,N\right\}$ with $h_{RD,i}$ denoting the $i$-th element of ${\bf h}_{RD}$. By substituting (\ref{P_E}), (\ref{phi1}), (\ref{phi2}) and (\ref{phi3}) into (\ref{Outage}), we now have obtained a closed-form expression for the outage probability of the proposed ATF~protocol. \begin{figure*}[!t] \vspace*{4pt} \normalsize \setcounter{MYtempeqncnt}{\value{equation}} \begin{equation}\label{sum_SNR_TAS_CDF} \Pr\left\{\gamma_{RD} + \gamma_{SD} < \gamma_0 \right\} = N \sum_{k=0}^{N-1}\left( {\begin{array}{*{20}{c}} N\\ k \end{array}} \right)\frac{\left(-1\right)^k \left[\bar{\gamma}_{SD}\left(1-\exp{\left(-\frac{\gamma}{\bar{\gamma}_{SD}}\right)}\right) -\frac{\bar{\gamma}_{RD}}{k+1}\left(1-\exp{\left(-\frac{\left(k+1\right)\gamma}{\bar{\gamma}_{RD}}\right)}\right)\right]}{\left(k+1\right)\bar{\gamma}_{SD}-\bar{\gamma}_{RD}}. \end{equation} \hrulefill \vspace*{4pt} \end{figure*} \section{Numerical Results} In this section, we provide some simulation results to verify the above theoretical analysis and illustrate the impacts of several parameters on system performance. We adopt the channel model $\Omega_{ij}=\left(1+d_{ij}^{\alpha}\right)^{-1}$ to capture the path-loss effect, where $d_{ij}$ denotes the distance between nodes $i$ and $j$, $\alpha\in\left[2,5\right]$ is the path-loss exponent. In the following simulations, we set $d_{SD}=50$m, $d_{SR}=5$m, $d_{RD}=45$m, the path-loss factor for all paths $\alpha=3$, the Rician-factor $K=10$, the noise power $N_0=-60$ dBm, the energy conversion efficiency $\eta=0.5$, and the transmission rate of the system $\mathbb{R}=1$. \begin{figure}[!t] \centering\scalebox{0.5}{\includegraphics{1.eps}} \caption{Outage probability of the proposed ATF scheme versus the source transmit power for different antenna numbers and battery levels, where $\mathbb{R}=1$, $C=5\times10^{-3}$, $E_T=1\times10^{-4}$, $N=[2, 4, 6]$.}\label{Final1} \end{figure} \begin{figure}[!t] \centering\scalebox{0.5}{\includegraphics{Final2_4.eps}} \caption{Outage probability of the proposed ATF scheme versus the consumed energy for information forwarding at the relay with different transmit power~at the source, where $\mathbb{R}=1$, $C=5\times10^{-3}$,~$P_S = [20,30]$dBm,~$N=[2,4,6]$}\label{Final2} \end{figure} We first compare the analytical outage probability of the considered system with its associated Monte Carlo simulation, which corresponds to the practical case that the charging of the relay batteries is continuous (i.e., $\ L \to \infty$). To this end, in Fig. \ref{Final1}, we plots the outage probability curves of the proposed ATF scheme versus the source transmit power for different antenna numbers and battery levels. It can be seen from this figure that the derived analytical expressions of outage probability approach its corresponding Monte Carlo simulation results as the discrete battery level $L$ increases. Particularly, when $L = 100$, the analytical expression coincides well with its corresponding simulation, which verifies the effectiveness of the adopted MC model and the correctness of our theoretical analysis in Sec. \ref{Analysis}. We can also observe from Fig. \ref{Final1} that when the source transmit power $P_S$ is small, the outage probability of the proposed ATF scheme is similar to that of the direct transmission without cooperation. This is because the relay cannot accumulate sufficient energy to forward information and $R$ keeps operating in Mode I. However, as $P_S$ increases, the proposed ATF gradually outperforms the direct transmission scheme as the relay can accumulate enough energy such that it can assist the source's transmission opportunistically. Furthermore, the more the antennas of the relay, the larger the performance gap introduced by larger battery levels. The outage probability of the ATF scheme versus the transmit energy at the relay (i.e, $E_T$) is drawn for different source transmit powers and antenna numbers in Fig. \ref{Final2}. This figure is a stair-stepping plot due to the adopted discrete battery model. It can be observed from the figure that there exists an optimal value of $E_T$, which minimizes the system outage probability. Moreover, when the source transmit power increases from 20dBm to 30dBm, the optimal transmit energy of the relay slightly shifts to the right as the relay can harvest more energy. Furthermore, for a fixed source transmit power, the relay with more antennas requires a smaller optimal transmit~energy. \begin{figure}[!t] \centering\scalebox{0.5}{\includegraphics{Final3_4.eps}} \caption{Outage probability of the proposed ATF scheme with optimal transmit energy at the relay, where $\mathbb{R}=1$, $C=5\times10^{-3}$, $N=[2, 4, 6]$.}\label{Final3} \end{figure} Fig. \ref{Final3} performs the outage performance comparison between the proposed ATF protocol with optimal transmit energy at the relay and the direct transmission scheme without cooperation. Note that the optimal transmit energy at the relay for a certain setup could be readily obtained via an exhaustive search of all discrete energy levels. We can see from this figure that with the optimal $E_T$, the proposed ATF protocol is significantly superior to the direct transmission scheme, especially when the source transmit power is high enough. In addition, this performance gain can be further enlarged by increasing the number of antennas equipped at the relay. This is because equipping more antennas at relay can not only effectively increase the amount of harvested energy in the first hop but also efficiently improve the received SNR at the destination in the second hop. \section{Conclusion} In this paper we developed an accumulate-then-forward (ATF) protocol for cooperative communications via a multi-antenna energy harvesting relay. By modeling the charging/discharging behaviors of the relay battery as a finite-state Markov chain, we derived a closed-form expression for the exact outage probability of the considered network over mixed Rician-Rayleigh fading channels. Numerical results showed that the system outage probability decreases with the increase of source transmit power and number of antennas at relay. Furthermore, the proposed ATF protocol can outperform the direct transmission scheme, especially when the relay consumes the optimal amount of energy for information forwarding. \bibliographystyle{IEEEtran}
{'timestamp': '2016-06-17T02:05:57', 'yymm': '1606', 'arxiv_id': '1606.05057', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05057'}
arxiv
\section{Introduction} Hashing~\cite{wang2014hashing} is a powerful indexing technique for enabling efficient retrieval on large-scale multimedia data, such as image~\cite{shen2015supervised,Shen_2015_ICCV,yang2015visual} and video~\cite{cao2012submodular}. Specifically, in order to achieve shorter response time and less computational cost, hashing encodes high-dimensional data into compact binary codes (\textit{i.e.,} 0 or 1) substantially. In this way, data can be compactly stored and Hamming distances can be efficiently calculated with bit-wise XOR operations. Because of its impressive capacity of dealing with ``curse of dimensionality'' problem, hashing has been extensively employed in various real-world applications, ranging from multimedia indexing~\cite{hu2014iterative,zhu2013linear,yang2014exploiting,yang2015robust} to multimedia event detection~\cite{petrovic2010streaming}. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{unseen_demo.pdf}\\ \caption{An illustration of newly-emerging concepts and images unseen to the existing learning systems.} \label{fig:unseen} \end{figure} There are mainly two branches of hashing, \textit{i.e.,} data-independent hashing and data-dependent hashing. For data-independent hashing, such as Locality Sensitive Hashing~\cite{gionis1999similarity}, no prior knowledge (\emph{e.g.}, supervised information) about data is available, and hash functions are randomly generated. Nonetheless, huge storage and computational overhead might be cost since more than $1,000$ bits are usually required to achieve acceptable performance. To address this problem, research directions turn to data-dependent hashing, which leverages information inside data itself. Roughly, data-dependant hashing can be divided into two categories: unsupervised hashing (\emph{e.g.}, Iterative Quantization~\cite{gong2011iterative} and Sparse Mutli-Modal Hashing~\cite{wu2014sparse}), and (semi-)supervised hashing (\emph{e.g.}, Supervised Hashing with Kernels~\cite{liu2012supervised}, Supervised Discrete Hashing~\cite{shen2015supervised}, Discrete Graph Hahsing~\cite{liu2014discrete} and Semi-Supervised Hashing~\cite{wang2010semi}). In general, supervised hashing usually achieves better performance than unsupervised ones because supervised information (\emph{e.g.}, semantic labels and/or pair-wise data relationship) can help to better explore intrinsic data property, thereby generating superior hash codes and hash functions. Along with the explosive growth of Web data, traditional supervised hashing methods have been facing an enormous challenge, \emph{i.e.}, the generation of reliable supervised knowledge cannot catch up with the rapid increasing speed of newly-emerging semantic concepts and multimedia data. In other words, due to the expensive cost of manual labelling (time-consuming and labor-intensive), sufficient labelled training data is usually not timely available for learning new hash functions that can accurately encodes data of new concepts. As illustrated in Figure~\ref{fig:unseen}, within the ``seen'' zone, where images are attached with known categories, existing supervised hashing algorithms may perform well because they are fed with correct guidance. However, outside the seen area, supervised hashing algorithms may easily fail to generalize to data of new categories that they never observe, \textit{e.g.,} $segway$, a two-wheeled, self-balancing, battery-powered electric vehicle. Moreover, most of current approaches use supervised information in the form of either 0/1 semantic labels or pair-wise data relationship for guiding the learning process, which implies that precious correlation among label semantics are inevitably ignored. One straightforward consequence of the semantic independency is that each category can neither learn from other relevant categories nor distribute its own supervised knowledge to other seen classes and/or even those unseen ones. The aforementioned disadvantages motivate us to consider whether we can encode images of ``unseen'' categories into binary codes with hash functions learned from limited training samples of``seen'' categories? The key challenge of achieving this goal is how to set up a tunnel to transfer supervised knowledge between ``seen'' and ``unseen'' categories. In recent years, zero-shot learning (ZSL)~\cite{palatucci2009zero,socher2013zero,castanon2015efficient,norouzi2013zero} has been widely recognized as a way to deal with this problem. The ZSL paradigm aims to learn a general mapping from the feature space to a high-level semantic space, which helps avoid rebuilding models for unseen categories with extra manually labelled data. ZSL is mostly achieved by using class-attribute descriptors to bridge the semantic gaps between low-level features and high-level semantics, where new categories are thus learned using only the relationship between attributes and categories. However, most of existing attribute based ZSL methods still suffer from: (1) erroneous guidance derived from imprecise or incomplete human-labelled attributes~\cite{jayaraman2014zero}, which is usually due to the lack of expertise or mislabeling by annotators, etc.; (2) diminishing of discrimination for pre-defined attributes when confronted with dataset shift~\cite{lampert2014attribute,parikh2011relative}. Recently, mining other auxiliary datasets has been shown to be helpful to tackle the zero-shot learning problem. For instance, with a huge corpus such as Wikipedia, one can obtain word embeddings that capture distributional similarity in the text corpus~\cite{turian2010word}, such that similar words can be located in similar place. During the learning phase, visual modality can be grounded by the word vectors, and such knowledge can thus be transferred into the learned model. Inspired by this, many approaches choose to utilize auxiliary modalities to help address the zero-shot tasks. Socher et al.~\cite{socher2013zero} uses word embedding as supervision in order to detect novel categories and perform classification accordingly. Frome et al.~\cite{frome2013devise} adopts a similar manner, which connects raw features and word embedding space using the dot-product similarity and hinge rank loss. In the hashing domain, however, the zero-shot problem has rarely been studied. As previously analyzed, with the newly-emerging concepts and multimedia data, we are in urgent demand of a reliable and flexible hash function that can be adopted to hash images of unseen categories. In this work, we propose a novel hashing scheme, termed \emph{zero-shot approach} (ZSH). Inspired by the superior capacity of the word embedding for capturing the semantic correlations among concepts, we map mutually independent labels into a semantic-rich space, where supervised knowledge of both seen and unseen labels can be completely shared. This strategy helps to encode images of unseen categories without any assistance of visual observation in those unknown classes. Besides, even though we cannot retrieve images of exactly the same category, semantically related objects can be returned. Moreover, we recognize the problem of semantic shift caused by off-the-shelf embedding. The embedded space is then rotated to make the hash functions more generalized to images of unseen categories. To further improve the quality of hash functions, we also preserve local structural property and discrete nature in binary codes. We summarize our main contributions as below: \begin{itemize} \item We address the problem of employing training data of seen categories to learn reliable hash functions for transforming images of unseen categories into binary codes. We propose a novel zero-shot hashing, which bridges gaps between originally independent labels through a semantic embedding space. To the best of our knowledge, this is one of the first works that study the problem of hashing data from newly-emerging concepts with limited seen supervised knowledge. Extensive experiments on various multimedia data collections validate the efficacy of our proposed ZSH. \item We devise an effective strategy for transferring available supervised knowledge from seen classes to unseen classes. In particular, we transform labels into a word embedding space, where semantic correlations among labels can be quantitatively measured and captured. In this way, unseen labels can leverage the well-established mapping from its semantically close seen categories. For instance, \emph{segway} may learn from \emph{bicycle} and \emph{automobile}. \item Since the initial semantic embedding is from an off-the-shelf word embedding space, which may bring in severe semantic shift between categories and the original visual feature. To alleviate the potential influence, we propose to further rotate the embedding space to better fit the underlying feature characteristics, thereby narrowing down the semantic gap effectively. \item In order to generate more reliable hash functions, we propose to improve the intermediate binary codes of training data by exploring underlying data properties. Concretely, we impose discrete constraints on binary codes during the code learning process as well as preserve data local structure, \emph{i.e.}, if two datums share similar representations in the original space, they are supposed to be close to each other in the learned Hamming space. \end{itemize} The rest of this paper is organized as follows. In Section 2, we briefly review some related work on hashing and zero-shot learning. In Section 3, we will elaborate our approach with details, together with our optimization method and an analysis of the algorithm. With extensive experiments, various results on various different datasets will be reported in Section 4, followed by the conclusion of this work in Section 5. \begin{figure*}[!ht] \centering \includegraphics[width=1\linewidth]{framework_demo.pdf}\\ \caption{An illustration of the overall architecture of the proposed zero-shot hashing framework.} \label{fig:framework} \end{figure*} \section{Related work} In this section, we aim to clarify the relationship between our work and other researches, due to the constraints of space, we cannot completely elaborate every detail of previous literature. \subsection{Zero-Shot Learning} Learning with no data, \textit{i}.\textit{e}., zero-shot learning has been proved to be an efficient approach to tackle the increasing difficulty posed by insufficient training examples. Many approaches have been proposed to solve this problem by using an intermediate layer to represent an image. Specifically, with visual attributes or other semantic abundant descriptors, a novel image can thus be defined as the relationship between category and intermediate representation. In the work ~\cite{farhadi2009describing} by Farhadi, he leverages attributes as a way to classify unseen objects by describing them with attributes. The work ~\cite{larochelle2008zero} by Larochelle named \textit{Zero-data Learning of New Tasks} has also proven to be useful when predict categories that are not shown in the training dataset. Recently, learning novel images with auxiliary datasets (\textit{e.g.}, leveraging textual relationship in a large corpus) has been shown to be powerful at doing zero-shot tasks. Learning the correlations between concepts, the label of a novel example omitted from training set can be reasonably inferred. Renown works include Socher's work~\cite{socher2013zero} \textit{Zero-shot Learning Through Cross-Modal Transfer}, which uses label embedding to detect unseen classes and makes semantically reasonable deduction. \textit{DEVISE}~\cite{frome2013devise} also uses the same scheme as ~\cite{socher2013zero}, but with a different language modal and a different loss function to connect two modalities. However, all above methods are limited to classification or prediction scenario. To our best knowledge, we are the first one to handle the zero-shot retrieving problem, \textit{i}.\textit{e}., hash novel images that were not observed. By adopting a natural language model~\cite{huang2012improving} pre-trained with a large corpus from Wikipedia, we precisely capture the correlations between different words, and thus hash unseen images into correct Hamming space. \subsection{Hashing} This subsection overviews fast search with binary codes using hashing technique. Similarity search is a challenge of pursuing data points of smallest distance in a large scale database. The easiest hashing scheme is dubbed Local Sensitive Hashing~\cite{gionis1999similarity}, which designs hashing function with no prior knowledge of the data distribution. However, such hashing methods require significantly large code length to achieve an acceptable performance, generating large overheads in a database. To address this problem, learning to hash comes as a trend. Unsupervised hashing methods mine the statistic distributional information in the database, generating an optimal hashing function to preserve the similarity in the original space. Classical algorithms such as Spectral Hashing (SH)~\cite{weiss2009spectral}, solves binary codes to preserve the Euclidean distance in the database; Inductive Manifold Hashing (IMH)~\cite{shen2013inductive}, adopts manifold learning techniques to better model the intrinsic structure embedded in the feature space; Iterative Quantization~\cite{gong2011iterative}, focuses on minimizing quantization error during unsupervised training. Considering a real-world database is commonly described by multiple modalities, such as visual features (\emph{e.g.}, Caffe~\cite{jia2014caffe}) or textual information (\emph{e.g.}, image captions, lyrics), Sparse Multi-Modal Hashing~\cite{wu2014sparse} utilizes information of at least two different resources to achieve promising performance. Since the unsupervised way is guided with little human-level knowledge, supervised hashing have been proposed to use supervision information to learn binary codes. Hashing techniques in this category have been emerging continuously in recent years, representative methods include Kernel Supervise Hashing (KSH)~\cite{liu2012supervised}, Minimal Loss Hashing (MLH)~\cite{norouzi2011minimal}, Supervise Discrete Hashing (SDH)~\cite{shen2015supervised}, Latent Factor Hashing (LFH)~\cite{zhang2014supervised} as well as the recently proposed Column Sampling Based Discrete Supervised Hashing (COSDISH) \cite{kang2016column}, \textit{etc.} Using supervision information, these hashing schemes perform better than unsupervised ones. Recently, with the rising of deep learning, image hashing using large convolutional neural network has also be shown to be effective in hashing domain~\cite{xia2014supervised}. By using hidden layers to represent images as feature vectors that are optimal for binary codes generation, hashing performance can be augmented greatly. Admittedly, hashing algorithms have successfully tackled the ``curse of dimensionality'' in terms of fast search, however, what if we want to achieve data-dependent performance while no training example is provided? All above hashing methods fail to generalize to ``unseen'' categories, limiting in the ``seen'' area where every category correspond to at least one training image. Besides, as the database changes everyday, re-training hashing function frequently can be expensive, further prevents their practical usage in large dynamic real-world databases. Based on tabove analysis, a hashing method that can perform well on unseen data draws a strong need, thus the orientation of zero-shot hashing is quite obvious. \section{Zero-Shot Hashing} In this section, we elaborate our proposed zero-shot hashing (ZSH). We firstly present a formal definition of hashing in zero-shot scenario, and then depict the details of ZSH, including a brief introduction of overall framework, supervision transfer, semantic alignment as well as hashing model. Finally, we introduce the optimization process and algorithm analysis. \subsection{Problem Definition} Suppose we are given $n$ training images ${X} = \left[ {x_1,x_2, \ldots ,x_n} \right] \in {\mathbb{R}^{d \times n}}$ labeled with a seen visual concept set $\mathcal{C}$, where $d$ is the dimensionality of visual feature space. Denote $Y = \left[ {{y_1},{y_2}, \ldots ,{y_n}} \right] \in {\{ 0,1\} ^{c \times n}}$ is the binary label matrix, where $y_i\in\{0,1\}^{c\times 1}$ is the label vector of the $i$-th sample $x_i$ and $c$ is the number of seen classes in $\mathcal{C}$. Different from conventional supervised hashing scenario, where both testing data and training data are associated with the same concept set, \textit{i.e.}, $\mathcal{C}$, we intend to cope with the situation where testing data and training data share no common concepts. In other words, testing data (denoted as $X^{(u)}$) belongs to an ``unseen'' category set $\mathcal{C}^{(u)}$, \textit{i.e.}, $\mathcal{C}^{(u)}\cap\mathcal{C}=\emptyset$. Using only the training images $X$ where no training samples of the ``unseen'' categories in $\mathcal{C}^{(u)}$ are available, our goal is to learn a hash function $f:\mathbb{R}^d\mapsto \{-1,1\}^{l\times 1}$, which can map images belonging to both $\mathcal{C}^{(u)}$ and $\mathcal{C}$ from original visual feature space to $l$-bit binary codes. The learned hash function $f$ not only guarantees that the binary codes of semantically relevant objects have short Hamming distances, but also generalizes well to the testing data belonging to the unseen categories, even though no training data are utilized in the training phase. \subsection{Overall Framework} The flowchart of our overall framework is illustrated in Figure~\ref{fig:framework}. As we can see, there are two stages: the offline phase and the online phase. In the offline phase, suppose only images of a limited number of categories are visible to our system. We firstly extract their visual feature features through a convolutional neural network. At the same time, we use a NLP model to transform seen labels into a semantic-rich embedding space, where each label is represented by a real-valued vector. With the embedded semantics, the relationships among both seen and unseen categories can be well captured and characterized. Instead of $0/1$-form label vector, ZSH supervises the learning of hash functions with the embedded semantic vectors to transfer supervised knowledge. We further rotate the off-the-shelf embedding space to better align with the low-level visual feature space. Meanwhile, ZSH preserves local structural information and discrete nature of the intermediate binary codes to improve hash functions. Finally, we use the learned hash functions to transform all the images in the database into binary codes for subsequent retrieval. In the online phase, when a new query image of any unseen category comes, we encode the new image into binary code following the same mapping and retrieve images that are close to this query in the Hamming space. \subsection{Transferring Supervised Knowledge} In general, most of existing supervised hashing algorithms may retrieve relevant results of queries in the seen categories since there are supervised information for understanding the queries. Nevertheless, when the hashing systems have no knowledge of certain unseen classes, query images from these classes will be probably be misunderstood, thereby leading to inaccurate search. One of the main causes is that the supervised information is in the form of $0/1$-form label vectors or pair-wise data relationship, which implicitly makes labels independent to each other and omits the inherent correlation among their high-level semantics (\textit{e.g., }\textit{cat} is as different from \textit{truck} as from \textit{dog}). As illustrated in Figure \ref{fig:emb}, using independent labels, each object will be mapped to an independent vertex of a hypercube, and the distance between any two categories will be the same. In order to address such disadvantage, we propose to connect label semantics by taking advantage of the superior ability endowed by neural language processing techniques. Specifically, as illustrated in Figure \ref{fig:emb}, we map independent labels into a word embedding space, where semantic correlations among labels can be quantitatively measured and captured. Therefore, unseen labels can leverage the well-established mapping from its semantically close seen categories. For example, in the embedding space, \textit{cat} and \textit{dog} will be close to each other, hence even the hashing systems may never observe any \textit{cat} images, they can still gain some useful clues from the supervised knowledge of \textit{dog}. We adopt the language model~\cite{huang2012improving} pre-trained using free Wikipedia text. This model leverages not only local information but also global document context, therefore shows superior performance over other competitive approaches. Every category is embedded into a $50$-d word vector\footnote{In practice, we find that by setting word vector to unit length, retrieval performance can be augmented with no distortion of the cosine similarities, thus we empirically normalize word vector to be unit length.}. In the subsequent part, we consistently denote the embedded label matrix as $Y$ for brevity. \begin{figure}[t] \centering \includegraphics[width=1.02\linewidth]{embedding_demo.pdf}\\ \caption{An illustration of independent $0/1$-form labels v.s. word embedding.} \label{fig:emb} \end{figure} \subsection{Semantic Alignment} Note that the transformed supervised knowledge from the off-the-shelf embedding space may potentially deviate from the underlying semantics of the image data due to the problems such as domain difference, semantic shift, semasiological variation. This will inevitably jeopardize the whole learning process in our proposed model. In order to prevent this issue, we propose to a semantic alignment strategy, which actively aligns the initial embedding space with the distributional properties of low-level visual feature. In particular, we seek for certain transformation $R\in\mathbb{R}^{c\times c}$ matrix with orthogonal constraint $R^TR=I_c$ to rotate the embedding space to $R^TY$. Recall that we intend to use the amendatory supervised knowledge to guide the learning of high-quality hash codes and hash functions, therefore, we minimize the following error: \begin{equation} \left\| {R^TY - {W^T}B} \right\|_{F}^{2}, \end{equation} which $W^T\in R^{c\times l}$ is the mapping matrix from binary codes $B\in \{-1,1\}^{l\times n}$ to the supervised information. $l$ is the code length. The benefit of the above formulation is that it can help to narrow down the semantic gap between binary codes and the supervised knowledge. \subsection{Hashing Model} For convenience, we firstly recap some previous settings here. Suppose we have $n$ training samples $X = \left [ x_{1},x_{2},\cdots ,x_{n} \right ]\in \mathbb{R}^{d\times n}$. For brevity, we denote the corresponding embedded label knowledge as $Y=\left [y_{1},y_{2},\cdots,y_{n} \right ]\in\mathbb{R}^{p\times n}$. Our ultimate target is to learn a set of hash functions from ``seen'' training data $X$ supervised by $Y$, enabling generating high-quality binary codes for data of ``unseen'' categories. Meanwhile, the quality of hash functions may heavily rely on the reliability of the intermediate binary codes of training data. In other words, the model is supposed to simultaneously well control both hash functions and hash codes. To achieve the above goals, we propose the following model: \begin{equation} \begin{split} \min \limits_{f,W,B,R}~&{\left\| {R^TY - {W^T}B} \right\|_{F}^{2}} + \lambda {\left\| W \right\|_{F}^{2}} + \alpha \left\| {f(X) - B} \right\|_F^2 \\&+\beta \left\| {P} \right\|_F^2+ \gamma \sum\limits_{i = 1}^n {\sum\limits_{j = 1}^n {{S_{ij}}\left\| {f({x_i}) - f({x_j})} \right\|_F^2} } \\ &\textrm{s.t.}~B\in \{-1,1\}^{l\times n}\wedge R^TR = I_c, \end{split} \label{eq:zsh} \end{equation} where $R\in \mathbb{R}^{c\times c}$ is the semantic alignment matrix. $W\in \mathbb{R}^{l\times c}$ is the mapping matrix from binary codes to supervisory information. $B = \left [b_{1},b_{2},\cdots,b_{n} \right ]\in\left \{ -1,1 \right \}^{l\times n}$ denotes the binary codes of $X$, where $b_i$ is the binary codes of the $i$-th sample $x_{i}$. $I_c$ is a diagonal matrix of size $c\times c$. $\|\cdot\|_F$ denotes the Frobenius norm of a matrix. $\lambda>0,\alpha>0,\beta>0$ and $\gamma>0$ are balancing parameters. $f:\mathbb{R}^{m\times 1}\rightarrow\mathbb{R}^{l\times 1}$ define a hash function from a non-linear embedded feature space to the desired Hamming space: \begin{equation} f(x)=P^T\phi(x), \label{eq:f} \end{equation} where $f(X)=[f(x_1),f(x_2),\ldots,f(x_n)]$. $P\in \mathbb{R}^{l\times m}$ is the transformation matrix. Following the successful practice for learning hash functions in~\cite{liu2012supervised}, we employ kernel mapping to handle the potential problem of linear inseparability: \begin{equation} \phi(x) \!= \!\left[\exp(-\frac{\|x\!-\!a_1\|^2}{\delta}),\ldots,\exp(-\frac{\|x\!-\!a_m\|^2}{\delta})\right]^T. \end{equation} where $\{a_i\}|_{i=1}^m$ are $m$ anchors randomly sampled from $X$ and $\delta$ is the bandwidth parameter. Note that we keep the discrete constraint on the variable $B$ to prevent information loss of binary codes to the greatest extent. The term $\gamma \sum\nolimits_{i = 1}^n {\sum\nolimits_{j = 1}^n {{S_{ij}}\left\| {f({x_i}) - f({x_j})} \right\|_F^2} } $ in Eq.~(\ref{eq:zsh}) preserves local structural information of training data, \textit{i.e.}, if two samples are similar in the original feature space (large $S_{ij}$), then they are enforced to share similar binary codes in the Hamming space. In the next part, we introduce an efficient alternating algorithm to optimize our zero-shot hashing model. \subsection{Optimization} We first rewrite the model in matrix form as follows: \begin{equation} \begin{split} \min \limits_{P,W,B,R}~&{\left\| {R^TY - {W^T}B} \right\|_{F}^{2}} + \lambda {\left\| W \right\|_{F}^{2}} + \alpha \left\| {P^T\phi(X) - B} \right\|_F^2 \\&+\beta \left\| {P} \right\|_F^2+ \gamma Tr(P^T\phi(X)L\phi(X)^TP) \\ &\textrm{s.t.}~B\in \{-1,1\}^{l\times n} \wedge R^TR = I, \end{split} \label{eq:zsh2} \end{equation} where $\phi(X)=[\phi(x_1),\phi(x_2),\ldots,\phi(x_n)]$ and the Laplacian matrix $L$ is computed as: \begin{equation} L = D-S, \end{equation} where $D$ is a diagonal matrix with its $i$-th diagonal element computed as $D_{ii}=\sum\nolimits_{j = 1}^n {{S_{ij}}} $. Next, we present an alternating algorithm to optimize the model in Eq.~(\ref{eq:zsh2}). \subsubsection{Update P} Fixing all variables except for $P$, we get the quadratic problem as: \begin{equation} \min\limits_P \alpha\|{P^T\phi(X) \!- \!B}\|_F^2\!+\!\beta \left\| {P} \right\|_F^2\!+\!\gamma Tr(P^T\phi(X)L\phi(X)^TP). \label{eq:P} \end{equation} By setting its derivative with respect to $P$ to 0, we have the following solution \begin{equation} P = \left(\phi(X)\phi(X)^T+\frac{\beta}{\alpha}I+\frac{\gamma}{\alpha}\phi(X)L\phi(X)^T\right)^{-1}\phi(X)B^T. \label{eq:P} \end{equation} \subsubsection{Update B} In this step, we fix all other variables and learn binary codes $B$ with discrete constraint. The objective function can be reduced to \begin{equation} \begin{split} \mathop {\min }\limits_{B}~&{\left\| {R^TY - {W^T}B} \right\|_{F}^{2}} + \alpha \left\| {P^T\phi(X) - B} \right\|_F^2\\ \textrm{s.t.}~&B\in \{-1,1\}^{l\times n}. \end{split} \end{equation} The above equation can be further written as \begin{equation} \begin{split} \mathop {\min }\limits_{B}~&{\left\| W^TB \right\|_{F}^{2}} -2Tr(B^TH)\\ \textrm{s.t.}~&B\in \{-1,1\}^{l\times n}, \end{split} \end{equation} where $H = WR^TY + \alpha P^T\phi(X)$. Inspired by~\cite{wu2008coordinate}, we apply the \textit{discrete coordinate descent (DCC)} algorithm to solve the above sub-problem. Denote $B$ as $B = \left [q_1^T,q_2^T,\cdots,q_l^T \right ]$, $H = \left [ h_1^T,h_2^T,\cdots,h_l^T \right ]$ and $W = \left [ u_1^T,u_2^T,\cdots,u_l^T \right ]$, where $q_i^T$, $h_i^T$ and $u_i^T$ are the $i$-th row of $B$, $H$ and $W$, respectively. Furthermore, for convenience, we denote \begin{equation}\left\{ \begin{array}{l} {{B}_{\neg i}} = \left[ {{q_1}^T,...,{q_{i - 1}}^T,{q_{i + 1}}^T,...,{q_l}^T} \right],\\ \\ {H_{\neg i}} = \left[ {{h_1}^T,...,{h_{i - 1}}^T,{h_{i + 1}}^T,...,{h_l}^T} \right],\\ \\ {{W}_{\neg i}} = \left[ {{u_1}^T,...,{u_{i - 1}}^T,{u_{i + 1}}^T,...,{u_l}^T} \right]. \end{array} \right. \end{equation} Then we can have \begin{equation} \begin{split} \| W^TB \|^2 &= Tr(B^TWW^TB)\\ &=const + \| q_i u_i^T\|_F^2+2u_i^TW_{\neg i}^TB_{\neg i}q_i\\ &=const + 2u_i^TW_{\neg i}^TB_{\neg i}q_i. \end{split} \label{eq:WB} \end{equation} Here, $\|q_i u_i^T\|^2 = Tr(u_i q_i^Tq_iw_i^T) = const$. Following the same rule, we also have the following conclusion \begin{equation} Tr(B^TH) = const + h_i^Tq_i. \label{eq:BQ} \end{equation} The sub-problem can be transformed to \begin{equation} \begin{split} \min\limits_{q_i}~&(u_i^TW_{\neg i}^TB_{\neg i}-h_i)q_i\\ \textrm{s.t.}~&h_i\in\{-1, 1\}^{n\times 1}, \end{split} \end{equation} The optimal solution of above equation is \begin{equation} \begin{split} q_i = \textrm{sgn}(h_i-B_{\neg i}^TW_{\neg i}u_i). \end{split} \label{eq:B} \end{equation} where $\textrm{sgn}(\cdot)$ is the sign function. We can see that each bit of the desired binary code $B$ can be learned based on other $l-1$ bits. Thus, we can use cyclic coordinate descent approach to generate the optimal codes until the entire procedure converges. \subsubsection{Update R} With $B,W,P$ fixed, we then have \begin{equation} \begin{split} \min\limits_{R}~&\left\| {R^TY - {W^T}B} \right\|_{F}^{2}\\ \textrm{s.t.}~&R^TR = I, \end{split} \label{eq:R} \end{equation} which can efficiently solved by the algorithm proposed in~\cite{wen2013feasible}. \subsubsection{Update W} By fixing $P,B,R$, we arrive at a classic ridge regression problem: \begin{equation} \begin{split} \mathop {\min }\limits_{W}~&{\left\| {R^TY - {W^T}B} \right\|_{F}^{2}} + \lambda {\left\| W \right\|_{F}^{2}}. \end{split} \end{equation} The above equation has an closed-form solution \begin{equation} \begin{split} W = (BB^T+\lambda I_l)^{-1}BY^TR. \end{split} \label{eq:W} \end{equation} where $I_l$ is a diagonal matrix of size $l\times l$. By iteratively updating $P,W,B,R$ until convergence, we can arrive at an optima. The overall algorithm is summarised in Algorithm \ref{alg:1}. \begin{algorithm}[!h] \begin{algorithmic}[1] \renewcommand{\algorithmicrequire}{\textbf{Input:}} \renewcommand{\algorithmicensure}{\textbf{Output:}} \REQUIRE Training data $X$ and the embedded label matrix $Y$; \ENSURE Binary code $B$, alignment matrix $R$, hash function $P$ and mapping matrix $W$; \STATE Randomly initialize $B,P$ and $W$; \STATE Randomly initialize $R$ to to be orthogonal; \STATE Map $X$ to $\phi(X)$ using $m$ anchors randomly selected from $X$; \STATE Construct Laplacian matrix $L$; \REPEAT{ \STATE Update $P$ according to Eq.~(\ref{eq:P}); \STATE Update $B$ iteratively by using the solution of (\ref{eq:B}); \STATE Update $R$ according to Eq.~(\ref{eq:R}); \STATE Update $W$ according to Eq.~(\ref{eq:W}); } \UNTIL{there is no change to $P,B,R,W$} \RETURN{$B,P,W,R$;} \end{algorithmic} \caption{Algorithm for optimizing Zero-Shot Hashing} \label{alg:1} \end{algorithm} \subsection{Algorithm Analysis} In this section, we analyze the convergence and time complexity of our algorithm. \subsubsection{Convergence Study} As shown in Algorithm~\ref{alg:1}, in each iteration, the updates of all variables make the objective function value decreased. We also conducted empirical study on the convergence property using ImageNet~\cite{deng2009imagenet}. Specifically, we trained our zero-shot hashing model with $30,000$ seen images randomly sampled from the ImageNet dataset, with label embedding as supervision. We selected $1,000$ anchors and set the code length to be 64 bits. As Figure \ref{fig:convergency} shows, our algorithm starts with cost function value roughly at $30,000$, but descends dramatically within only 10 iterations, and reaches a stable local minima at the 20-th iteration. This phenomenon clearly indicates the efficiency of our algorithm. \begin{figure}[t] \centering \subfloat{ \includegraphics[width=0.8\linewidth]{convergence.pdf} } \caption{Convergence study on ImageNet.} \label{fig:convergency} \end{figure} \subsubsection{Computational Complexity} In each iteration (line 6-9), the time cost is analyzed as follows. The computation of $P$ in Eq.~(\ref{eq:P}) is $O(m^2n+nml+m^3)$. The DCC algorithm for updating $B$ costs $O(cl^2+l^2n)$. As to the optimization of the sub-problem in Eq.~(\ref{eq:R}), the time cost is $O(c^3)$. Finally, the computational cost of updating $W$ is $O(l^2n+lnc+lc^2+l^3)$. Given that $m\ll n$, $l\ll n$, $c\ll n$ and our algorithm converges within a few iterations (less than 10), the overall time cost of our algorithm is $O(n)$. It is worth noting that the dominant operation of our algorithm is matrix multiplication, which can be greatly speeded up by using parallel and/or distributed algorithms. \section{EXPERIMENT} \subsection{Experimental Settings} In our experiments, we employ three real-life image datasets, including CIFAR-10\footnote{https://www.cs.toronto.edu/~kriz/cifar.html}, ImageNet\footnote{http://image-net.org/} and MIRFlickr\footnote{http://press.liacs.nl/mirflickr/}. \indent\textbf{CIFAR-10} consists of $60,000$ images which are manually labelled with 10 classes including \textit{airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck}, with $6,000$ samples in each class. The classes are completely mutually exclusive, \textit{i.e.}, no overlap between classes (\emph{e.g.}, automobiles and trucks). \textbf{ImageNet} is an image dataset organized according to the WordNet~\cite{miller1995wordnet} hierarchy. The subset of ImageNet for the Large Scale Visual Recognition Challenge 2012 (ILSVRC2012) is used for our experiments, consisting of over 1.2 million Web images, manually labeled with $1,000$ object categories. \textbf{MIRFlickr} consists of $25,000$ images collected from the social photography site Flickr through its public API. Firstly introduced in 2008, this dataset is wildly used in multimedia research. MIRFlickr is a multi-label dataset with every image associating with 24 popular tags such as \textit{sky}, \textit{river}, \textit{etc}. For all image data, we adopted the winning model for the 1000-class ImageNet Large Scale Visual Recognition Challenge 2012 ~\cite{krizhevsky2012imagenet} to extract the fully connected layer fc-7 as visual feature. Various metrics are employed for performance of different evaluation tasks. For image retrieval, we used the two traditional metrics \emph{i.e.}, Precision and Mean Average Precision (MAP). MAP focuses on the ranking of retrieval results and we reported the results over the top $5,000$ retrieved samples. Precision mainly concentrates on the retrieval accuracy and we reported the results with Hamming radius $r\leq2$. We compared our proposed ZSH with four state-of-the-art supervised hashing approaches, including COSDISH~\cite{kang2016column}, SDH~\cite{shen2015supervised}, KSH~\cite{liu2012supervised} and LFH~\cite{zhang2014supervised}. For all anchor-based algorithms, we randomly sampled $1,000$ anchors from the training dataset. Furthermore, we compared to one of the most representative unsupervised hashing method, \emph{i.e.}, Inductive Hashing on Manifolds (IMH)~\cite{shen2013inductive}. For all comparing approaches, we followed their suggested parameter settings. For ZSH, we empirically set $\alpha$ to $10^{-5}$ and $\gamma$ to $10^{-6}$. For regularization parameters $\lambda$ and $\beta$, we set them to $10^{-2}$ and $10^{-4}$, respectively. The number of iterations is set to 10. We define the similarity matrix $S$ to be computed by \begin{equation}\nonumber {S_{ij}} = \left\{ {\begin{array}{*{20}{c}} {\exp (\frac{{{{\left\| {{x_i} - {x_j}} \right\|}_2}}}{{2{\sigma ^2}}}),}&{{\rm{if }}~{x_i} \in {\mathcal{N}_k}({x_j})~{\rm{ or }}~{x_i} \in {\mathcal{N}_k}({x_j})}\\ \\{0,}&{{\rm{otherwise,}}} \end{array}} \right. \end{equation} where $\mathcal{N}_k(\cdot)$ is the function of searching $k$ nearest neighbors. In our experiment, we set $\sigma = 1$. \subsection{Results on CIFAR-10} \subsubsection{Overall Comparison of Zero-shot Image Retrieval} \begin{figure*}[!ht] \centering \includegraphics[width=1\linewidth]{retrieval_demo.pdf}\\ \caption{A demonstration of the zero-shot image retrieval exemplars using different comparing hashing algorithms on CIFAR-10, where top $15$ retrieval images are reported. Pictures with green bounding box indicate the correct results while those with red outlines indicate failure results. As can be seen, our proposed ZSH method returns the largest number of correct retrieved results with query from unseen category, followed by COSDISH which returns four correct samples.} \label{fig:retrieval} \end{figure*} To evaluate the efficacy of retrieving images in unseen categories, we split CIFAR-10 into a ``seen'' training set and an ``unseen'' testing set. In particular, we select \textit{truck} as unseen testing category and leave the rest 9 categories as seen training set. For all comparing algorithms, we randomly sample $10,000$ images for learning hash functions. For testing purpose, we randomly select $1,000$ images from the unseen category as query images, and the remaining $5,000$ test images together with the $54,000$ images of seen categories are combined to form the retrieval database. The performance of all comparing approaches \emph{w.r.t.} different codes lengths (\emph{i.e.}, $\{16, 32, 64, 96, 128\}$) is illustrated in Figure~\ref{fig:cifar_zeroshot}. As we can see, the proposed ZSH outperforms all the other hashing algorithms in terms of MAP at all code lengths. As to Precision, ZSH still shows superior image retrieval performance in most cases. The underlying principle is that our method not only utilizes inherent semantic relationship among labels to transfer supervisory knowledge, but also preserves discrete and structural properties of data in the learning of hash codes and hash functions. An interesting observation is the performance of IMH, which is an unsupervised method, gains competitive even better retrieval results in terms of Precision as compared to some supervised methods such as KSH, SDH. While unsupervised methods encode images solely with the distributional properties in the feature space, the supervised ones may be misled by independent semantic labels in the learning processing. Besides, MAP increases rapidly for all methods when code length varies from $16$ to $64$, and then reaches a slow-growth stage from 64 bits to 128 bits. When code length is short, more codes are required to guarantee the descriptive and discriminative power. However, after encoding space is large enough (\textit{e.g.} 64 bits), the expression ability saturated, providing more bits cannot significantly improve the performance. As to Precision, hashing performance significantly deteriorates as code length is larger than $64$. Recall that our searching radius is empirically set to 2, forming a hyper-ball of radius 2 in Hamming space. When the code length increases from $16$ to $64$, significant improvement in retrieval ability counteracts the searching difficulty. However, as Hamming space becomes larger, searching difficulty grows linearly, thereby degrading the Precision performance. Therefore, as a trade-off between efficiency and effectiveness, an eclectic code length should be chosen. \begin{figure}[htb!] \centering \includegraphics[width=1\linewidth]{figure_1.pdf} \caption{Performance (MAP and Precision) of different comparing methods on zero-shot image retrieval over CIFAR-10 dataset.} \label{fig:cifar_zeroshot} \end{figure} \subsubsection{Effect of Different Unseen Category} In this experiment, we aim to evaluate the performance of zero-shot image retrieval on different unseen categories. The experimental settings are the same as that in the previous subsection. Figure~\ref{fig:cifar_fig9} illustrates the MAP and Precision performance of ZSH using each individual label as unseen testing data. \begin{figure}[htb!] \centering \includegraphics[width=1\linewidth]{figure_9.pdf} \caption{Performance (Precision and MAP) of zero-shot image retrieval for each individual unseen category on CIFAR-10 dataset.} \label{fig:cifar_fig9} \end{figure} We can observe that zero-shot image retrieval performance varies from one class to another, reaching peak at \textit{bird} and bottom at \textit{automobile}. Intuitively, if an unseen class is semantically closer to other seen categories, more relevant supervisory knowledge can be transferred from word embedding space for boosting the retrieval performance. To dig deeper about the reason behind the fluctuation of performance on different unseen objects, we compute the average cosine similarity between each unseen category and other seen categories, and list the corresponding MAP in Table \ref{Tab:sim}. \begin{table}[!h] \centering \begin{tabular}{lcc} \hline \textbf{Category} & \textbf{Average Cosine Similarity} & \textbf{MAP}\\ \hline airplane & 0.2191 & 0.2791 \\ automobile & 0.1567 & 0.2603 \\ bird & 0.3565 & 0.3751 \\ cat & 0.3661 & 0.3621 \\ deer & 0.2981 & 0.2912 \\ dog & 0.3826 & 0.3467 \\ frog & 0.3485 & 0.2991 \\ horse & 0.3015 & 0.3125 \\ ship & 0.1663 & 0.2987 \\ truck & 0.3358 & 0.3120 \\ \hline \end{tabular} \caption{Average cosine similarity of each category and all other categories, together the corresponding MAP performance.} \label{Tab:sim} \end{table} We observe that the MAP performance is positively related to the average cosine similarity. For instance, those of larger cosine similarity (\textit{e.g.}, \textit{dog, cat}) performs relatively well, while those of smaller similarity (\textit{e.g.}, \textit{airplane, automobile}) gain relatively poor performance. This observation implies that in order to achieve satisfactory retrieval results, unseen classes should have sufficient correlation with seen ones. As shown in Figure~\ref{fig:cifar_fig9}, we also compare the effects of embedded labels and binary labels. The performance of embedded labels is obviously better than that of binary labels. The underlying reason is that the embedding space can help to capture the relationship between seen and unseen categories for transferring supervisory knowledge. In contrast, binary labels neglect semantic correlations, thereby leading to irregular fluctuations of retrieval performance. \subsubsection{Effect of Seen Category Ratio} In this experiment, we evaluate the performance of our proposed ZSH \emph{w.r.t.} different numbers of seen categories. Specifically, we vary the ratio of seen categories in the training set from $0.1$ to $0.9$. For each ratio, we randomly sample $10,000$ images from the seen categories for training. Further, we randomly select $1,000$ images from the unseen set as queries to search in the remaining $59,000$ images. Note that when the ratio of seen categories decreases to $0.1$, we use all $6,000$ datums of that class as training set. \begin{figure}[!h] \centering \includegraphics[width=1\linewidth]{figure_10.pdf} \caption{Effects of different ratios of seen categories on CIFAR-10 dataset.} \label{fig:unseen_ratio} \end{figure} We report the experimental results in Figure \ref{fig:unseen_ratio}, from which we have the following observations: (1) The performance of both MAP and Precision boosts as the ratio of the seen categories grows; (2) As the ratio increases from $0.1$ to $0.3$, we see a dramatic leap of the retrieval performance, followed by a relatively slight performance improvement from $0.3$ to $0.9$. We analyze that by observing more ``seen'' categories, we have higher possibility to find relevant supervision for the unseen class, which guides to learn better intermediate hash codes, thereby simultaneously improving the quality of hash functions. \subsubsection{Effect of Training Size} This part of experiment mainly focuses on evaluating the effect of training size on the searching quality of ZSH. We select \textit{truck} as the unseen object and varies the size of training data in the range of $\{1000,2000,\ldots,10000,20000,\ldots,50000\}$. The results are demonstrated in igure~\ref{fig:trainingsize}. As we can see, when the size increases from $1,000$ to $10,000$, we observe a rapid rise of the Precision performance. Nonetheless, when fed with more training data, ZSH does not gain noticeable performance boost. For the balance of training efficiency and effectiveness, in the rest experiments, we consistently set the training size to $10,000$. \begin{figure} \centering \includegraphics[width=0.8\linewidth]{trainsize.pdf} \caption{Effects of training size on Precision performance over CIFAR-10 dataset.} \label{fig:trainingsize} \end{figure} \subsection{Results on ImageNet} \subsubsection{Overall Comparison of Zero-shot Image Retrieval} In this part, we evaluate our proposed ZSH on zero-shot image retrieval as compared to other state-of-the-art methods using the Large Scale Visual Recognition Challenge 2012 (ILSVRC2012) dataset. Recall that the ILSVRC2012 dataset contains more than $1.2$ million images tagged with $1,000$ synsets without any overlap. For evaluation purpose, we randomly choose $100$ categories which have corresponding word embedding learned from Wikipedia text corpus, which gives us a set of roughly $130,000$ images. We split the data into a training set ($90$ seen categories) and a testing set ($10$ unseen categories). For all comparing algorithms, we randomly select $10,000$ images of seen categories for training. As to image queries, we randomly sample $1,000$ images from the unseen categories. We use the learned hash function to encode all the remaining images to form the retrieval database. \begin{figure}[t] \centering \includegraphics[width=1\linewidth]{figure_3.pdf} \caption{Performance (MAP and Precision) of different comparing methods on zero-shot image retrieval over ImageNet dataset.} \label{fig:Imagenet} \end{figure} The performance of our proposed ZSH and other four state-of-the-art supervised hashing methods with different code lengths are reported in Figure \ref{fig:Imagenet}. As we can see, ZSH consistently outperforms all other competitors in most cases. As code length varies from $16$ to $128$, we can observe the similar variation tendency of performance on ImageNet to that on CIFAR-10. This phenomenon again implies that we should choose a trade-off code length to guarantee the retrieval performance. \subsubsection{Image Retrieval in Related Categories} In zero-shot image retrieval scenario, we expect that even though we fail to retrieve relevant images of the same category, we can still obtain semantically related images. For instance, if the query image describes a \textit{cat}, we may prefer to retrieve images of \textit{dog} rather than images of \textit{car}. Our proposed ZSH utilizes semantic embedding to set up connections between semantically similar labels in the embedded space. In this way, the supervision knowledge of seen categories can be transferred into hash functions, which can effectively encode images of unseen categories. \begin{figure}[!h] \centering \includegraphics[width=1\linewidth]{figure_7.pdf} \caption{Comparison of ZSH and other hashing approach on the capability of retrieving semantically similar images from related categories.} \label{fig:Imagenet_hier} \end{figure} Since we need to search more related categories, all remaining images of both seen and unseen categories are used to form retrieval database. All the other settings are the same as that in Section 4.3.1. In order to evaluate the performance of retrieving related categories, we use two modified metrics, named MAP$_{{related}}$ and Precision$_{{related}}$, which are defined as \begin{equation} \begin{split} \textrm{MAP}_{related} = \sum_{i=1}^{K}\frac{\textrm{AP} _{related}@i}{K}, \end{split} \end{equation} \begin{equation} \begin{split} \textrm{Precision}_{related} = \frac{n_{related}} {n_{retrieved}} , \end{split} \end{equation} where MAP$_{{related}}$ is calculated based on the top $K$ retrieved results, $AP_{related}@i$ is the average precision based on the related results, calculated by \begin{equation} \begin{split} \textrm{AP}_{related}@i = \frac{n_{related}^{(i)}} {i} , \end{split} \end{equation} where $n_{related}^{(i)}$ is the number of related images in top $i$ retrieved results. $n_{related}$ and $n_{retrieved}$ are the related retrieval under Hamming radius 2 and total examples retrieved under Hamming radius 2, respectively. Using WordNet~\cite{miller1995wordnet}, which is a lexical database for the English language, we define query $A$ and retrieved object $B$ are related if: 1) $A$ and $B$ are not of the same category. 2) $A$ can reach $B$ on WordNet within 5 hops. In practice, we set $K=5,000$ and $R=2$. Figure \ref{fig:Imagenet_hier} shows the experimental results. We can see that in terms of MAP$_{related}@K$, our method always outperforms other methods at every code length. When we look at Precision$_{related}$, our proposed ZSH achieves $0.3262$, $0.2636$, $0.2129$ at 32 bits, 64 bits and 96 bits, which significantly outperforms the second best method. This observation indicates that ZSH is capable of detecting the semantically similar images from the most related categories. \subsection{Results on MIRFlickr} \begin{figure}[!h] \centering \includegraphics[width=1\linewidth]{figure_5.pdf} \caption{Performance (MAP and Precision) of different comparing methods on zero-shot image retrieval over MIRFlickr dataset.} \label{fig:flickr} \end{figure} In real-world pictures, especially in user-generated photos, there often exists multiple tags belong to one picture. To examine the practical efficacy of our proposed ZSH, in this part, we conduct an extra experiment on a real-life multi-label dataset, \emph{i.e.}, MIRFlickr, which contains $25,000$ images downloaded from the social photography site Flickr. Each image is associated with $24$ tags. Since in multi-label image dataset, different categories share overlapping images, which makes it difficult to divide the dataset into training set and testing set. Hence, we employ ImageNet as an auxiliary dataset to train our hash functions and evaluate the zero-shot image retrieval performance on MIRFlickr. Specifically, from the ILSVRC2012 dataset we select $100$ categories which does not overlap with the $24$ tags in MIRFlickr. For fair comparison, all hashing approaches use $10,000$ randomly sampled images for training. After the hash function is learned, we directly apply them to transform the MIRFlickr images into binary codes. We then sample $1,000$ datums as query images and search in the remaining $24,000$ images. We regard the retrieval images sharing at least two tags with the query as the true neighbors, and compute MAP on the top $5,000$ retrieved results and Precision under Hamming distance 2. Figure \ref{fig:flickr} illustrates our results of our ZSH and other comparing algorithms on MIRFlickr. In the left sub-figure, we can see that with different code lengths, our ZSH can consistently achieve the best MAP performance among all the comparing algorithms. As the code length increases, the MAP performance of each algorithm keeps increasing, reaching $0.2488$ at $128$ bits, which outperforms the second best hashing method COSDISH by $19\%$ at the same length. In terms of Precision, ZSH exceeds all other methods in most cases. Similar to that of CIFAR-10 and ImageNet, we can see a variation pattern with an increasing trend from $16$ to $64$ and a performance drop from $64$ to $128$. The promising performance on MIRFlickr demonstrates the potential of ZSH in indexing and searching real-life image data. \section{CONCLUSION} With the explosion of newly-emerging concepts and multimedia data on the Web, it is impossible to supply existing supervised hashing methods with sufficient labeled data in time. In this paper, we studied the problem of how to map images of unseen categories using hash functions learned from limited seen classes. We proposed a novel hashing scheme, termed \emph{zero-shot hashing} (ZSH), which is capable of transmit supervised knowledge from seen categories to unseen categories. Independent $0/1$-form labels were projected into an off-the-shelf embedding space with abundant semantics, where label semantic correlations can be fully characterized and quantified. Considering the issues of domain difference and semantic shift, we further narrowed down the gap between binary codes and high-level semantics by a semantic alignment operation. Specifically, we intentionally rotated the embedding space to adjust the supervised knowledge more suitable for learning high-quality hash codes. Besides, we also preserved local structural property and discrete nature of hash codes in the ZSH model. An effective algorithm was designed to optimize the model in an iterative manner and the empirical study showed the convergency and efficiency. We evaluated our proposed ZSH hashing approach on three real-world image datasets, including CIFAR-10, ImageNet and MIRFlickr. The experimental results demonstrated the superiority of ZSH as compared to several state-of-the-art hashing approaches on the zero-shot image retrieval task. In the future, we plan to enhance the exploration of label semantic correlations by integrating knowledge from multiple sources, including textual corpus and visual clues. We expect this will compensate the incomplete representation of each individual modality, thereby solving the problem of domain difference and semantic shift fundamentally. \bibliographystyle{abbrv}
{'timestamp': '2016-06-17T02:04:35', 'yymm': '1606', 'arxiv_id': '1606.05032', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05032'}
arxiv
\section{Introduction} \IEEEPARstart{P}{hase} retrieval is a longstanding problem in many fields of physics and applied sciences \cite{Fienup,Burge,Taylor,Shechtman}. Sufficient conditions ensuring that the phase of the signal and hence the full $E(t)$ can be reconstructed from the knowledge of the intensity profile only $|E(t)|^2$ are well known \cite{Burge,Taylor,Cassioli,Mecozzi}. A necessary and sufficient condition is also well known, and it is based on the position in the complex plane of the zeros of $E(z)$, the analytic continuation of $E(t)$. Such a condition however is of limited practical use, because the analytic continuation of a function is an ill posed problem and hence far from being amenable to simple numerical solutions \cite{Gallicchio}. Even when analytic continuation is possible, like for instance for bandwidth limited $E(t)$, finding the zeros in the complex plane is a difficult numerical task. Being instead the numerical evaluation of $E(t)$ for $t$ real relatively trivial, a necessary and sufficient condition based on the properties of $E(t)$ for $t$ real only would be a very useful tool. To the best of the author's knowledge, however, such a condition has not been reported yet. The purpose of this paper is to derive such a condition, which we will see is very similar to the well-established Nyqvist stability criterion \cite{Bode} of control theory. We will consider for simplicity to band-limited signals only, and leave generalizations to wider classes of signals to future studies. The outline of this paper is the following. After presenting the derivation of a necessary and sufficient condition ensuring that the phase of a band-limited field can be retrieved from its intensity profile, we apply this condition to find the class of band-limited signals corresponding to distinct states when the receiver is insensitive to the signal phase and sensitive to the field intensity only. The implications for the capacity of an optical system using square-law detection at the receiver are finally discussed. While emphasis will be given to examples belonging to the field of telecommunications only, the new condition discussed here can be of help in all fields of physics and applied sciences where the problem of phase reconstruction from the intensity only is an important one \cite{Shechtman}. \section{A necessary and sufficient condition for minimum phase} In this paper, we define the Fourier transform of functions $F(t) \in L^1 \bigcap L^2$ as \begin{equation} \tilde F(\omega) = \int_{-\infty}^\infty {\rm d} t \exp(i \omega t) F(t). \label{10} \end{equation} The fact that $F(t) \in L^1$ insures that $F(\omega)$ is uniformly continuous for $\omega \in \mathbb R$ \cite{Katznelson}. \begin{Le} \label{Le1} Assume a function $E_s(t) \in L^1 \bigcap L^2$, such that its Fourier transform $\tilde E(\omega)$ is $\tilde E_s(\omega) = 0$, $\forall \omega < 0$. Then we have \begin{equation} E_s(t) = \frac i \pi \, \mathrm{p.v.}\int_{-\infty}^\infty \frac{E_s(t')}{t'-t} {\rm d} t' , \label{kk} \end{equation} where with p.v. we refer to the Cauchy's principal value of the integral. \end{Le} \begin{proof} Condition $\tilde E_s(\omega) = 0$, $\forall \omega < 0$ implies that $\tilde E_s(\omega) = u(\omega) \tilde E_s(\omega)$, where $u(\omega)$ is a Heaviside unit step function. If we write \begin{equation} \tilde E_s(\omega) = \lim_{\epsilon \to 0^+} u(\omega) \exp(-\epsilon \omega) \tilde E_s(\omega), \end{equation} inverse Fourier transformation gives \begin{equation} E_s(t) = \frac{i}{2 \pi} \int_{-\infty}^\infty \lim_{\epsilon \to 0^+} \frac{1}{t'-t+ i \epsilon} E_s(t') {\rm d} t', \end{equation} that is \begin{equation} E_s(t) = \frac{i}{2 \pi} \int_{-\infty}^\infty \lim_{\epsilon \to 0^+} \frac{t'-t - i \epsilon}{(t'-t)^2 + \epsilon^2} E_s(t') {\rm d} t'. \end{equation} Being $\lim_{\epsilon \to 0^+} \epsilon/[(t'-t)^2 + \epsilon^2] = \pi \delta(t'-t)$ where $\delta(\cdot)$ is the Dirac delta distribution, we obtain \begin{equation} E_s(t) = \frac{i}{\pi} \int_{-\infty}^\infty \lim_{\epsilon \to 0^+} \frac{t'-t}{(t'-t)^2 + \epsilon^2} E_s(t') {\rm d} t', \end{equation} that is relation (\ref{kk}). \end{proof} Consequence of Eq. (\ref{kk}) is that the real and imaginary parts of $E_s(t) = E_{s,r}(t) + i E_{s,i}(t)$ are the Hilbert transform of one another \begin{eqnarray} E_{s,i} (t) &=& \frac 1 \pi \, \mathrm{p.v.}\int_{-\infty}^\infty {\rm d} t' \frac{E_{s,r}(t')}{t'-t}, \\ E_{s,r}(t) &=& - \frac 1 \pi \, \mathrm{p.v.}\int_{-\infty}^\infty {\rm d} t' \frac{E_{s,i}(t')}{t'-t}. \end{eqnarray} These relations are known in spectroscopy as Kramers Kronig relations \cite{Kramers,Kronig}. Let $\beta$ be a strictly positive constant with $0<\beta \le 1$ and let us define $B = (1+\beta)/T$. Let $\tilde \mathcal{C}_\beta (0,B)$ be the class of functions $E_{s}(t)$ of the form \begin{equation} E_s(t) = \sum_{n=-\infty}^\infty a_n \exp\left[- i (1+\beta) \frac{\pi (t-nT) }{T} \right] H_\beta (t-nT), \label{mod1} \end{equation} where we assume that the sequence of $a_n \in \mathbb C$ has a compact support, namely for any $E_s(t) \in \tilde \mathcal{C}_\beta (0,B)$, exists an $N \in \mathbb Z$ such that $a_n = 0$ for $|n| > N$. The orthogonal set of functions $\{H_\beta(t-nT), n \in \mathbb Z\}$ are defined as \begin{equation} H_\beta(t) = \frac 1 {\sqrt{T}} \frac{\sin\left[\pi \frac t T (1-\beta)\right] + 4 \beta \frac t T \cos\left[\pi \frac t T (1+\beta)\right]}{\pi \frac t T \left[1-\left(4 \beta \frac t T \right)^2\right]}. \label{Hb} \end{equation} The functions in $\tilde \mathcal{C}_\beta (0,B)$ belong to $L^1 \bigcap L^2$. Their Fourier transform is \begin{equation} \tilde E_{s}(\omega) = \sum_{n=-N}^N a_n \exp\left(i n T \omega \right) \tilde H_\beta\left[\omega - (1+\beta) \pi /T \right], \label{Ew1} \end{equation} where \begin{equation} \tilde H_\beta(\omega) = \sqrt T \hspace{0.1cm} C_\beta \left(\frac{\omega T} {2 \pi}\right), \end{equation} with \begin{equation} C_\beta(x) = \left\{ \begin{array}{ll} 1, & |x| \le \frac{1-\beta} 2; \\ \cos\left[ \frac{\pi}{2 \beta} \left(|x|-\frac{1-\beta} 2 \right) \right], & \frac{1-\beta} 2 < |x| \le \frac{1+\beta} 2; \\ 0, & |x| > \frac{1+\beta} 2. \end{array} \right. \end{equation} The functions $\{H_\beta(t-nT), n \in \mathbb Z\}$ have a square-root raised cosine spectrum, and their orthogonality can be directly verified in the Fourier domain \begin{equation} \int_{-\infty}^\infty |H_\beta(\omega)|^2 \exp\left[i (n'-n) T \omega \right] \frac{{\rm d} \omega}{2 \pi}= \delta_{n,n'}, \label{ort} \end{equation} where the integral is facilitated by noting that $\sum_{n} |H_\beta(\omega- 2 \pi T n)|^2 = T$ and using the periodicity of $\exp(i n T \omega)$. Being $E_s(t) \in L^1 \bigcap L^2$, its spectrum is a continuous function of $\omega$. In addition, it is zero for $\omega \notin (0, 2 \pi B )$. Finally, it is easy to verify that $E_s(z)$, the analytic continuation of $E_s(t)$ in the complex plane, is an entire function. If we define $\tilde \mathcal{C} (0,B) = \lim_{\beta \to 0^+} \tilde \mathcal{C}_\beta (0,B)$ , any function $E_s(t) \in \tilde \mathcal{C}(0,B)$ can be written in the form \begin{equation} E_{s}(t) = \hspace{-0.2cm} \sum_{n=-N}^N a_n \exp\left[- i \frac{\pi (t-nT) }{T} \right] H_0(t-nT) \label{mod} \end{equation} where \begin{equation} H_0(t) = \lim_{\beta \to 0} H_\beta(t) = \frac{1}{\sqrt{T}} \hspace{0.1cm} \mathrm{sinc}\left(\frac{\pi t} T\right). \end{equation} The Fourier transform of (\ref{mod}) is \begin{equation} \tilde E_{s}(\omega) = \sum_{n=-\infty}^\infty a_n \exp\left(i n T \omega \right) \tilde H_0\left(\omega - \pi /T \right), \label{Ew} \end{equation} where \begin{equation} \tilde H_0(\omega) = \sqrt T \hspace{0.1cm} C_0\left(\frac{\omega T} {2 \pi}\right), \end{equation} and $C_0(x) = \lim_{\beta \to 0} C_\beta(x)$ is a function equal to 1 in the open interval $(-1/2, 1/2)$, equal to $1/\sqrt 2$ for $x=\pm 1/2$ and zero elsewhere. Being for $\omega, \omega' \in (0, 2\pi B)$ \begin{equation} \sum_n \tilde H_0(\omega) \tilde H_0(\omega') \exp\left[-i n T (\omega-\omega') \right] \nonumber \\ = 2 \pi \delta\left(\omega-\omega' \right), \end{equation} any function $E_s(t) \in L^2$ band-limited to the interval $(0,2 \pi B)$ can be expressed in the form (\ref{mod}), where the $a_n$ are given by \begin{equation} a_n = \int \tilde H_0(\omega') \exp\left(-i n \frac{2 \pi}{T}\right) \tilde E_s(\omega') \frac{{\rm d} \omega'}{2 \pi}. \end{equation} Although the functions of the form (\ref{mod}) belonging to $\tilde \mathcal{C}(0,B)$ are in $L^2$, they are in general not in $L^1$. For this reason, in the following where we refer to the class of band-limited functions $\tilde \mathcal{C}(0,B)$, we will assume that its components are members of the class $\tilde \mathcal{C}_\beta(0,B)$ for $\beta >0$, hence always in the class $L^1 \bigcap L^2$, approaching arbitrarily close the limit $\beta = 0$. \begin{Th} \label{Th1} Let us assume $E_s(t) \in \tilde \mathcal{C}_\beta (0,B)$, and a constant $\bar E \ne 0$, and define $E(t) = E_s(t) + \bar E$ with $\bar E \ne 0$, such that $E(t) \ne 0$, $\forall t \in \mathbb{R}$ and the trajectory of $E(t)$ never encircles the origin for $t \in (-\infty, \infty)$. Then, the number of zeros of $E(t+i\tau)$ with $\tau <0$ is equal to the winding number (i.e, the number of windings) around the origin of the curve described by $E(t)$ when $t$ runs over the entire real axis from $t \to -\infty$ to $t \to \infty$. \end{Th} \begin{proof} The function $E(z)$ is an entire function. Let $\Gamma$ be a contour encompassing the lower complex plane $z = t + i \tau$, which incorporates the real axis from $t = -\infty $ to $\infty$ and returns to $-\infty$ from the lower complex half-plane by a semicircle $C$ with radius $\rho \to \infty$. By the Cauchy's argument principle, we have \begin{equation} I_\Gamma = \frac{1}{2 \pi i} \oint_{\Gamma} \frac{\dot{E}(z)}{E(z)} {\rm d} z = N_\mathrm{zeros} - N_\mathrm{poles}, \label{argument} \end{equation} where $\dot{E}(t) = {\rm d} E(t)/{\rm d} t$, $N_\mathrm{zeros}$ is the number of zeros and $N_\mathrm{poles}$ is the number of poles of $E(z)$ encircled by $\Gamma$. The function $E(t + i \tau)$ does not have poles for $\tau <0$, $N_\mathrm{poles}=0$. Using the substitution $E(z) = v$, we obtain \begin{equation} I_\Gamma = \frac{1}{2 \pi i} \int_{v_\Gamma} \frac{{\rm d} v}{v} = N_\mathrm{zeros}. \end{equation} Let us now split the integral $I_\Gamma$ in (\ref{argument}) into two parts, $I_\Gamma = I_r+I_C$, the first \begin{equation} I_r = \frac{1}{2 \pi i} \int_{v_r} \frac{{\rm d} v}{v} \end{equation} being the contribution of $E(z)$ when $z$ belongs to the real axis, the second \begin{equation} I_C = \frac{1}{2 \pi i} \int_{v_C} \frac{{\rm d} v}{v}, \end{equation} being the contribution of $E(z)$ when $z$ belongs to the infinite semicircle $C$. The integration path $v_C$ is made of the trajectory described by $E(z)$ for $z = R \exp(i \phi)$ when $\phi \in [\pi, 2 \pi]$. Being $E(z) \to \overline E$ on the infinite semicircle, the length of the integration path $v_C$ tends to zero. In addition, being $\bar E \ne 0$, the modulus of the integrand tends to a finite constant on the infinite semicircle, $|1/v| \to 1/|\bar{E}|$, so that $I_C = 0$. Consequently, only the first term survives, \begin{equation} I_r = \frac{1}{2 \pi i} \int_{v_r} \frac{{\rm d} v}{v} = N_\mathrm{zeros}. \label{IR} \end{equation} The curve $v_r$ is made of the trajectory described by $E(t)$ when $t$ runs over the entire time axis. Such curve is closed because $E(t)$ tends to $\overline E$ for both $t \to \infty$ and $t \to -\infty$. The left hand side of (\ref{IR}) is then equal to the number of times the curve $v_r$ encircles the origin. This shows that the winding number of the curve described by $E(t)$ when $t$ runs from $t \to -\infty$ to $t \to \infty$ is equal $N_\mathrm{zeros}$. \end{proof} Signals such that $\tilde E(\omega) = 0$ for $\omega < 0$ are called \textit{minimum phase signals} if, beside having no poles of $E(t+i \tau)$ with $\tau <0$, they have also no zeros with $\tau <0$. Theorem \ref{Th1} shows that a necessary and sufficient condition for a signal $E(t)$ to be of minimum phase is that the curve described by $E(t)$ when $t$ runs from $t \to -\infty$ to $t \to \infty$ does not encircle the origin. This theorem permits to decide whether a signal is of minimum phase or not by numerically evaluating the values of $E(t)$ for $t$ real only, avoiding the difficult, ill-conditioned \cite{Gallicchio}, analytic continuation of $E(t)$ in the complex plane. Notice that, although non zero, the constant bias $\overline E$ can be arbitrarily small. \begin{Th} \label{Co10} Let us assume $E_s(t) \in \tilde \mathcal{C}_\beta(0,B)$, and a constant $\bar E \ne 0$, and define $E(t) = E_s(t) + \bar E$ with $\bar E \ne 0$, such that $E(t) \ne 0$, $\forall t \in \mathbb{R}$ and the trajectory of $E(t)$ never encircles the origin for $t \in (-\infty, \infty)$. Then, it is possible to define \begin{equation} G(z) = \log\left[ \frac{E(z)}{\overline{E}} \right], \label{Ft} \end{equation} with the determination of the logarithm chosen such that a) $\lim_{t \to -\infty} G(t+0i) = 0$ and b) $G(z)$ is a holomorphic function in the lower half plane including the real axis. With this choice, if we define $G(t)$ as the restriction of $G(z)$ on the real axis, $G(t) \in L^1 \bigcap L^2$, and its Fourier transform $\tilde G(\omega)$ is such that $G(\omega) = 0$ for $\omega < 0$. \end{Th} \begin{proof} The continuation of $E(t) = E_s(t) + \bar E$ in the complex plane, $E(z)$ is an entire function, because $E_s(z)$ is an entire function. It is possible to define a function $G(z)$ holomorphic in the lower half plane including the real axis and such that $E(z) = \bar E \exp[G(z)]$ by the following procedure. Let us construct $G(z)$ for any $z$ in the lower half plane by analytic continuation from an arbitrary point $z_0$ in the lower half plane using \begin{equation} G(z) = G(z_0) + \int_{z_0}^z \frac{\dot E(z')}{E(z')} {\rm d} z', \label{Gz1} \end{equation} where the integration path from $z_0 = $ to $z$ is contained entirely in the lower half plane but otherwise arbitrary. The poles of $\dot{E}(z)/E(z)$ are the poles and the zeros of $E(z)$, $E(z)$ is an entire function and no zeros of $E(z)$ exist in the lower half plane by virtue of theorem \ref{Th1} and on the real axis by assumption, so that $\dot{E}(z)/E(z)$ is a holomorphic function in the lower half plane including the real axis and hence $G(z)$ is also holomorphic in the same domain. The function $G(z)$ is however not unique, because it depends on the choice of $z_0$ and of $G(z_0)$. We will choose $z_0$ on the real axis such that $z_0 = \lim_{t \to -\infty} (t + 0 i)$, and we will take for $G(z_0)$ the principal value of $\log[E(z_0)/\bar E]$, namely \begin{equation} G_\infty = \lim_{t \to -\infty} \log\left[1+\frac{E_s(t)}{\bar E}\right] = 0. \label{Gz0} \end{equation} We have then \begin{equation} G(z) = \lim_{t \to -\infty} \int_{t+0i}^z \frac{\dot E(z')}{E(z')} {\rm d} z'. \label{Gz} \end{equation} Let us now consider the integral in the complex plane $z = t + i \tau$ for $\omega = -|\omega| <0$, \begin{equation} J_\Gamma = \oint_{\Gamma} G(z) \exp(-i |\omega| z) {\rm d} z, \label{JGm} \end{equation} where $\Gamma$ is again a contour that includes the real axis and returns to $t = -\infty$ from the semicircle in the lower half plane $z = R \exp(i \phi)$ with $\phi \in [\pi, 2 \pi]$. The integral of Eq. (\ref{JGm}) can be decomposed into two terms \begin{equation} J_\Gamma = \tilde G(\omega) + J_C \end{equation} the first, \begin{equation} \tilde G(\omega) = \int_{-\infty}^\infty G(t) \exp\left(i \omega t\right) {\rm d} t \label{Gw}, \end{equation} being the Fourier transform of $G(t)$, and the second, $J_C$, being the contribution of the infinite semicircle. The second contribution is equal to $J_C = \lim_{R \to \infty} J_R$, where \begin{equation} J_R = i \int_{\pi}^{2 \pi} G[R \exp(i \phi)] \exp\{i [-|\omega| R \exp(i \phi)+ \phi]\} R {\rm d} \phi. \end{equation} In the absence of poles in the lower half-plane we have $J_\Gamma = 0$ and hence \begin{equation} \tilde G(\omega) = - J_C \quad \forall \omega <0. \label{Gw0} \end{equation} We have \begin{eqnarray} |J_R| &\le& \int_{\pi}^{2 \pi} \left|G[R \exp(i \phi)] \right| \exp[|\omega| R \sin(\phi)] R {\rm d} \phi \nonumber \\ &\le& M(R) \int_{\pi}^{2 \pi} \exp[|\omega| R \sin(\phi)] R {\rm d} \phi, \end{eqnarray} where $M(R) = \max_{\phi \in [\pi, 2 \pi]} \left\{\left|G[R \exp(i \phi)] \right|\right\}$. We have then \begin{equation} |J_R| \le 2 M(R) \int_{0}^{\pi/2} \exp[-|\omega| R \sin(\phi)] R {\rm d} \phi, \end{equation} where the integral at right-hand side tends to a constant \begin{equation} \lim_{R \to \infty} \int_{0}^{\pi/2} \exp[ - |\omega| R \sin(\phi)] R {\rm d} \phi = \frac 1 {|\omega|}. \end{equation} Using now Eq. (\ref{Gz}) on the semicircle of radius $R$ we obtain for $\phi \in [\pi, 2 \pi]$ \begin{eqnarray} G_\phi &=& \lim_{R \to \infty} G[R \exp(i \phi)] \nonumber \\ &=& \lim_{R \to \infty} \log\left\{1 + \frac{E_s[R\exp(i \phi)]}{\bar E} \right\} = 0, \label{GR} \end{eqnarray} because the principal value of the logarithm is used in Eq. (\ref{Gz0}) and, being $\lim_{t \to -\infty} G(t+0i) = G_{\phi = \pi} = 0$, the principal value should be used, for continuity, in $G_\phi$ for all $\phi \in (\pi, 2 \pi]$. Consequently we also have $\lim_{R \to \infty} M(R) = \max_{\phi \in [\pi, 2 \pi]} G_\phi = 0$, and hence $J_C = \lim_{R \to \infty} J_R = 0$. The above results implies that also $\lim_{t \to \infty} G(t+0i) = G_{\phi = 2 \pi} = 0$, so that asymptotically, on the real axis \begin{equation} G(t) = \log\left[1+\frac{E_s(t)}{\bar E} \right] \to \frac{E_s(t)}{\bar E}, \quad |t| \to \infty. \end{equation} Being $E(t) > \bar E$, $\forall t \in \mathbb R$, and $E(t)$ finite, the integrals of both $|G(t)| $ and $|G(t)|^2$ over a finite interval are finite. At infinity, being $E_s(t) \in \tilde \mathcal{C}_\beta(0,B)$ for $\beta >0$, Eqs. (\ref{mod1}) and (\ref{Hb}) show that $|E_s(t)| \simeq 1/|t|^2$ for $|t| \to \infty$ and hence the integrals of $|G(t)| $ and $|G(t)|^2$ also converge at infinity. Consequently, $G(t) \in L^1 \bigcap L^2$. \end{proof} The above theorem shows that the ambiguity in the determination of the logarithm to be used in the restriction of $G(z)$ to the real axis, $G(t) = \log[E(t)/\bar E]$, is removed by the prescriptions that both $\lim_{t \to -\infty} G(t) = 0$ and $G(t)$ is a continuos function of $t \in \mathbb R$. \begin{Th} \label{Th3} Let us assume $E_s(t) \in \tilde \mathcal{C}_\beta(0,B)$, and a constant $\bar E \ne 0$, and define $E(t) = E_s(t) + \bar E$ with $\bar E \ne 0$, such that $E(t) \ne 0$, $\forall t \in \mathbb{R}$ and the trajectory of $E(t)$ never encircles the origin for $t \in (-\infty, \infty)$. Then, the phase of $E(t)$ can be reconstructed by a logarithmic Hilbert transform \begin{equation} \phi(t) = \overline{\phi} + \frac{1}{2 \pi} \mathrm{p.v.} \int_{-\infty}^{\infty} {\rm d} t' \frac{\log\left[ |E(t')|^2 \right]}{t'-t}, \label{phi} \end{equation} where $E(t) = |E(t)| \exp[i \phi(t)]$ and $\overline{E} = |\overline{E}| \exp(i \overline{\phi})$. \end{Th} \begin{proof} Under the hypotheses stated, theorem \ref{Co10} ensures that $G(t) \in L^1 \bigcap L^2$ and $\tilde G(\omega) = 0$ for $\omega < 0$ and, hence, the hypotheses of lemma \ref{Le1} are verified, so that \begin{equation} G(t) = \frac i \pi \, \mathrm{p.v.}\int_{-\infty}^\infty {\rm d} t' \frac{G(t')}{t'-t}. \label{kk1} \end{equation} Equation (\ref{phi}) is then readily obtained by equating the imaginary parts of both sides of Eq. (\ref{kk1}), using $G(t) = \log|E(t)| - \log \overline E + i [\phi(t)-\overline \phi]$ and that \begin{equation} \frac{1}{\pi} \mathrm{p.v.} \int_{-\infty}^{\infty} {\rm d} t' \frac{\log |\overline{E}|}{t'-t} = 0. \end{equation} \end{proof} Notice that, being \begin{equation} \frac{1}{2 \pi} \mathrm{p.v.} \int_{-\infty}^{\infty} {\rm d} t \int_{-\infty}^{\infty} {\rm d} t' \frac{\log\left[ |E(t')|^2 \right]}{t'-t} = 0, \end{equation} the phase bias $\overline \phi$ is also the time average of $\phi(t)$ \begin{equation} \overline \phi = \lim_{T \to \infty} \frac 1 T \int_{-T/2}^{T/2} {\rm d} t \phi(t). \end{equation} From the necessary and sufficient condition of theorem \ref{Th3} more restrictive sufficient conditions can be derived. One is the following \begin{Co} \label{re} Let us assume $E_s(t) \in \tilde \mathcal{C}_\beta(0,B)$, and define $E(t) = E_s(t) + \bar E$, with $\bar E \ne 0$ a complex constant. Then, $E(t)$ is of minimum phase, and hence its phase can be reconstructed by the logarithmic Hilbert transform (\ref{phi}) when $\exists \phi_0 \in [0, 2 \pi)$ such that $\mathrm{real}[E(t) \exp(i \phi_0)] > 0$, $\forall t \in \mathbb R$. \end{Co} \begin{proof} Under the hypotheses of the theorem, the curve $E(t)$ never encircles the origin, hence the hypotheses of theorem \ref{Th3} are satisfied. \end{proof} This corollary can also be proven independently, under slightly less restrictive conditions. \begin{Th} \label{re1} Let $E_s(t) \in L^1 \bigcap L^2$ such that $\tilde E_s(\omega) = 0$, $\forall \omega < 0$, and define $E(t) = E_s(t) + \bar E$, with $\bar E \ne 0$ a complex constant. Then, the phase of $E(t)$ can be reconstructed by the logarithmic Hilbert transform (\ref{phi}) when $\exists \phi_0 \in [0, 2 \pi)$ such that $\mathrm{real}[E(t) \exp(i \phi_0)] > 0$, $\forall t \in \mathbb R$. \end{Th} \begin{proof} Let us define $F(t) = [E(t)/\overline E-Z_0]/Z_0$ with $Z_0 = R \exp(i \phi_0)$, and use this definition into the $G(t)$ given by Eq. (\ref{Ft}), to obtain $G(t) = \log(Z_0) + \log\left[1 + F(t) \right]$, where for the logarithm we assume its principal value. We then note that the expansion \begin{equation} G(t) = \log(Z_0) + \sum_{n=1}^\infty \frac{(-1)^{n+1}}n F^n(t), \label{Z_0} \end{equation} is legitimate for $|F(t)|<1$, that is inside the circle $|E(t)/\overline E-Z_0|< |Z_0|$ centered in $Z_0$ and of radius $|Z_0|=R$. In the limit $R \to \infty$, the expansion is then legitimate for $F(t)$ inside the half plane delimited by a straight line passing through the origin and orthogonal to $Z_0$ and containing $Z_0$, which is the region $F(t)$ belongs to by virtue of the condition $\mathrm{real}[E(t) \exp(i \phi_0)] > 0$, $\forall t \in \mathbb R$. Being the spectrum of $E(t)$ zero for $\omega < 0$, the spectrum of $F(t)$ and of all its powers $F^n(t)$ is also zero for $\omega < 0$. The series expansion (\ref{Z_0}) then shows that the spectrum of $G(t)$ exists and it is zero for $\omega < 0$. If we chose the determination of the logarithm such that $G(t) = \log[E(t)/\bar E] \to 0$ as $|t| \to \infty$, then being $E(t) \ne 0, \forall t \in \mathbb R$ and being $G(t) \simeq E_s(t)/\bar E$ for $|t| \to \infty$ with $E_s(t) \in L^1 \bigcap L^2$, also $G(t) \in L^1 \bigcap L^2$. The function $G(t)$ then fulfills once again the conditions of lemma \ref{Le1} so that its real and imaginary parts are the Hilbert transform of one another, and from this the thesis is deduced. \end{proof} Another sufficient condition, more restrictive than that given by corollary \ref{re} is that a signal $E(t) = \bar E + E_s(t)$ is of minimum phase if $|E_s(t)|^2 < |\overline{E}|^2$ for every $t$. This condition was explicitly stated in \cite{Burge} and \cite{Taylor} and, later, independently rediscovered by others, see for instance \cite{Cassioli} where the condition was given in the context of wireless channel characterizations, and \cite{Mecozzi} where the condition was applied to optical measurements. It is immediate to show that, if this condition is satisfied, $E(t)$ never encircles the origin and it is consequently of minimum phase. In addition, being \begin{equation} |E_s(t)|^2 \le \int \frac{{\rm d} \omega}{2 \pi} |\tilde E_s(\omega)|^2. \end{equation} condition $|\overline{E}|^2 > |E_s(t)|^2$ also includes the even more restrictive one \begin{equation} |\overline{E}|^2 > \int \frac{{\rm d} \omega}{2 \pi} |\tilde E_s(\omega)|^2 \end{equation} given in \cite{Kino}. Although we assumed $\overline E \ne 0$, the results obtained are valid for $\overline E$ arbitrarily small. The case $\overline E = 0$ is a delicate one, because in this case, $G(t) \notin L^2$, so that $\tilde G(\omega)$ is not defined. In this case, however, the role of $\overline E$ is not essential for convergence of the logarithmic Hilbert transform (\ref{phi}). Indeed, the phase of every $E(t) \in \tilde \mathcal{C}_\beta(0,B)$ is well defined for every $\overline E$, and it does not diverge for $\overline E = 0$. For $\overline E \ne 0$, if $E(t)$ does not encircle the origin, $\phi(t)$ given by Eq. (\ref{phi}) gives the phase of $E(t)$. Consequently, if $E(t)$ does not encircle the origin the phase of $E(t)$ can be still calculated for $\overline E = 0$ using Eq. (\ref{phi}) in the limit $\overline E \to 0$, which for what said does not diverge. We may therefore remove in the following the condition $\overline E = 0$ assuming that this case is included as the limit for $\overline E \to 0$. \begin{Co} \label{Cou} Let the two fields $E_0(t) \in \tilde \mathcal{C}_\beta(0,B)$ and $E_0'(t) \in \tilde \mathcal{C}_\beta(0,B)$ having the same intensity $|E_0(t)|^2 = |E_0'(t)|^2$. If $E_0(t)$ and $E_0'(t)$ do not encircle the origin, then they are both minimum phase signals and hence $E_0(t) = E_0'(t) \exp(i \overline{\phi})$, $\forall t$, where $\overline{\phi}$ is an arbitrary constant phase. \end{Co} An interesting and not immediately obvious property is now the following: \begin{Th} \label{Th0} Given an arbitrary field $E(t) \in \tilde \mathcal{C}_\beta(0,B)$ then \begin{equation} E_0(t) = |E(t)| \exp[i \phi_{0}(t)], \label{mp} \end{equation} where \begin{equation} \phi_{0}(t)= \overline{\phi} + \frac{1}{2 \pi} \mathrm{p.v.} \int_{-\infty}^{\infty} {\rm d} t' \frac{\log\left[ |E(t')|^2 \right]}{t'-t}, \label{mp1} \end{equation} with $\overline{\phi}$ an arbitrary phase, is band-limited to the same interval of $E(t)$, namely $(0, 2 \pi B)$. \end{Th} \begin{proof} This theorem is parallel to an analogous one in \cite{Hofstetter} that gives the condition for a function to be the auto-convolution of a time limited function. If the analytic continuation of $E(t)$, namely $E(t+i\tau)$, has no zeros for $\tau <0$, then we have $E(t) = E_0(t)$ for a suitable value of $\overline{\phi}$. If this is not the case, any zero of $E(z)$ in the lower complex half plane, say $z_0 = t_0 - i |\tau_0|$, can be removed by multiplication by the pure phase modulation \begin{equation} H(t) = \frac{t-t_0 - i |\tau_0|}{ t-t_0 + i |\tau_0|} = 1 - \frac{ 2 }{1-i(t-t_0)/|\tau_0|}, \end{equation} which adds a zero in the upper half plane symmetrically placed with respect to the real axis. The spectrum of the field $E'(t)$ after the phase modulation is \begin{eqnarray} \tilde E'(\omega) &=& \tilde E(\omega) -2 |\tau_0| \int \frac{{\rm d} \omega'}{2 \pi} \tilde E(\omega') u(\omega-\omega') \nonumber \\ && \times \exp\left[ i (\omega-\omega') (t_0-i |\tau_0|) \right], \label{Ep} \end{eqnarray} where $u(\cdot)$ is the unit step function. The integral at right hand side of (\ref{Ep}) is zero for $\omega < 0$ because the non-zero regions of $E(\omega')$ and $u(\omega-\omega')$ do not overlap, and it is also zero for $\omega>2 \pi B$ because in this case $u(\omega-\omega')$ can be replaced by $1$ and \begin{equation} \int \frac{{\rm d} \omega'}{2 \pi} \tilde E(\omega') \exp\left[ -i \omega' (t_0-i |\tau_0|) \right] = E(t_0-i |\tau_0|) = 0. \end{equation} After the phase modulation, the spectrum is still zero for $\omega < 0$ and $\omega > 2 \pi B$, and the zero at $t_0 - i |\tau_0|$ is replaced by a zero at $t_0 + i |\tau_0|$. This procedure can be repeated until all the zeros in the lower complex half plane are removed. At the end, the resulting field is a minimum phase signal still bandwidth limited to the same bandwidth of the original signal. Being the minimum phase signal unique, this signal is equal to $E_0(t)$ given by Eq. (\ref{mp}). \end{proof} Let us now consider the class of functions $\tilde \mathcal{C}(0,B)$ band-limited in the interval $(0,B)$, obtained from $\tilde \mathcal{C}_\beta(0,B)$ in the limit of $\beta \to 0^+$. Theorem \ref{Th0} insures that the class of band-limited signals with a common intensity profile always includes the minimum phase signal. To be more precise, theorem \ref{Th0} insures that if one groups the functions $E(t) \in \tilde \mathcal{C} (0,B)$ into functions with the same intensity profile $I(t) = |E(t)|^2$, any of these classes always includes the minimum phase function $E_0(t) \in \tilde \mathcal{C} (0,B)$. Corollary \ref{Cou} than shows that if the minimum phase condition is met, then the intensity profile uniquely determine the function $E_0(t)$ with the exception of an immaterial rotation of the complex plane. From now on, we will refer for convenience to $E(t)$ as the equivalence class of functions that differ from one another by an arbitrary constant phase factor, and with this caveat corollary \ref{Cou} states that the minimum phase signal is unique. Consequently, all possible intensity profiles $I(t) = |E(t)|^2$ with $E(t) \in \tilde \mathcal{C} (0,B)$ can be set into a one-to-one correspondence with the class of minimum phase functions $E_0(t)$. From theorem \ref{Th0} we may also draw the important consequence that the ratio between a signal $E(t) \in \tilde \mathcal{C}(0,B)$ that encircles $N$ times the origin and the minimum phase signal $E_0(t)$ with the same intensity profile $|E_0(t)|^2 = |E(t)|^2$, which we define as \begin{equation} H_N(t) = \frac{E(t)}{E_0(t)} , \end{equation} has the form \begin{equation} H_N(t) = \prod_{k=1}^N \left[1 - \frac{ 2 }{1-i(t-t_k)/|\tau_k|} \right], \label{HN} \end{equation} where $t_k - i |\tau_k|$ are the $N$ zeros of $E(t+i \tau)$ in the lower complex half plane. The function $H_N(t)$ is the product of terms which are 1 minus a Lorentzian line-shape, centered on the real parts $t_k$ and of width equal to the modulus of the imaginary part $|\tau_k|$ of each zero in the lower complex half plane. When these Lorentzian line-shapes are well separated, which may occur when the number $N$ is small, we have \begin{equation} H_N(t) \simeq 1 - \sum_{k=1}^N \frac{2}{1-i(t-t_k)/|\tau_k|}, \label{HNapp} \end{equation} so that $H_N(t)$ is mostly 1 with the exception of small regions of amplitude $|\tau_k|$ around the time $t_k$ where the deviation from unit has a Lorentzian shape. The magnitude of the imaginary parts of the zeros in the lower complex half plane $|\tau_k|$ is proportional to the amplitude of the region around $t_k$ where the reconstruction of the phase with the logarithmic Hilbert transform is inaccurate. \section{Encoding information on the intensity of an electromagnetic field} Let us now consider the following problem: What is the most efficient transmission over a bandwidth $B=1/T$ for the complex field $E(t)$ if we have the capability of modulating the optical field in modulus and phase and we perform square-law intensity detection of the transmitted signal at the receiver? The study of transmission systems where only direct detection is applied at the receiver became lately an intense area of research, targeting high capacity applications in the short reach range \cite{Randel_invited,DMT,Lowery,Lowery1,Petermann,Randel}. Although the information is not contained in the phase of the optical field, a suitable phase shaping is required to confine the signal within a limited bandwidth. One could in principle think of generating an arbitrary amplitude modulation at bandwidth $2B$ and then use a phase modulation equal to the logarithmic Hilbert transform of the intensity that makes this signal single sideband, as proposed in \cite{Petermann}, but in general the spectrum of the signal after modulation is not zero for $\omega > 2 \pi B$, and is in principle unbounded for positive frequencies. The analysis of the present paper gives a general solution to this problem. We have shown that all possible field patterns of a given optical bandwidth can be grouped into classes of fields with the same intensity pattern, and theorem \ref{Th0} ensured that to each of these classes belongs the minimum phase signal $E_0$. Restricting the set of symbols to minimum phase signals therefore does not reduce the set of symbols available to transmission. The recently proposed Kramers Kronig (KK) transmission scheme \cite{KK} is capable of receiving without errors any minimum phase signal $E_0(t)$ and hence it maximizes the set of symbols that can be received over a given optical bandwidth. The principle of operation of the receiver is very simple: the receiver detects the intensity profile only, and the phase of the field is calculated from the intensity profile using the logarithmic Hilbert transform (\ref{phi}) over an integration time window much longer than the inverse of the optical field bandwidth. Assuming that chromatic dispersion is optically compensated or pre-compensated at the transmitter, we will show in the section that follows that a signal constellation like (\ref{mod}) with real$(a_n) > a$ and imag$(a_n) > a$ with $a$ a suitably chosen positive constant produces a minimum phase signal. It is enough, in general, to choose $a$ much smaller than the range of possible values of $a_n$, so that the available symbols are almost all those belonging to one quadrant, say the first, of the complex plane, one quarter of all possible symbols available on the two quadratures. If some additive noise impairs the signal field, and if the noise is small enough that the perturbed field does not encircle the origin, then the perturbed field is still of minimum phase and faithfully detected by the receiver. Therefore, in spite of the fact that the quadratic receiver detects the field intensity only, and that the phase is calculated from the intensity profile and not independently measured, the receiver acts as a linear receiver (in the field) that is capable of detecting signals in the first quadrant only. Consequently, for high signal-to noise ratio, we may conjecture that the capacity of such system is of the order of the capacity (per unit bandwidth) of a coherent system in which the symbols are constrained in the first quadrant only, approximately two bit less than the capacity of a full, unconstrained, coherent system \cite{KK,CapacityIMDD}. \section{Numerical validation} \label{num} We numerically validated the results of the previous sections by testing on a signal made as the sequence of $512$ waveforms of the form $(\ref{mod})$ with $a_n = [(b + k_1) + i(b + k_2)] \sqrt{T}$, where $n$ runs from $1$ to $512$ and $k_1$ and $k_2$ are randomly chosen between $0$ and $7$. This signal corresponds to a shifted 16 quadrature-amplitude modulation (16QAM) constellation. The bias $b$ was chosen equal to two values, one $b_3 = 0.5$ insufficient to make the waveform of minimum phase, and the second $b_0 = 1.1$, that makes the waveform a minimum phase one. \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig1.pdf} \caption{Complex field of a shifted 16QAM. Red solid line: reconstructed field $E_0(t)$, blue dashed line, detected field $E(t)$, for a bias $b_3 = 0.5$.} \label{fig1} \end{figure} The numerical analysis was performed using a Marlab program, performing the Hilbert transform over a finite time window $T_w$ that in the examples given was chosen as $T_w = 512 \, T$, by multiplication of the spectrum of the signal by $-i \, \mathrm{sgn}(\omega)$ and using a fast Fourier transform (FFT) and inverse FFT routines, i.e. implicitly assuming a periodic signal instead of an $L^2$ one. The analysis of the periodic case implied by the use of the FFT can be done by replacing the kernel of the Hilbert transform $1/t$ by its $T_w$-periodic counterpart \begin{equation} \sum_{k=-\infty}^\infty \frac 1 {t - k T_w} = \frac {\pi} {T_w} \mathrm{cot}\left(\frac{\pi t}{T_w} \right), \quad t \ne \tau, \label{cot} \end{equation} and limiting the integration over $\tau$ to a single period $[-T_w/2, T_w/2)$. This corresponds to replace Fourier integrals with Fourier series. All the theorems that we have discussed retain their validity. Theorem \ref{Th1} for instance can be shown without closing the curve $\Gamma$ with a semicircle $C$ at infinity, because when $t$ spans on the real axis an entire period the function $E(t)$ describes in the complex plane a closed curve. While the rigorous analysis of the periodic case is beyond the scope of this paper, the correspondence between the periodic and the $L^2$ case can be obtained considering the case $T_w \to \infty$. In the $L^2$ case, the field $\overline E$ is the time average of the field $E(t)$ \begin{equation} \overline E = \lim_{T_w \to \infty} \frac 1 {T_w} \int_{-T_w/2}^{T_w/2} E(t) {\rm d} t, \end{equation} so that in the periodic case the role of the field bias $\overline E$ is played by the average of the signal over the length of the symbol sequence $T_w$ \begin{equation} \overline E_\mathrm{av} = \frac 1 {T_w} \int_{-T_w/2}^{T_w/2} {\rm d} t E(t). \label{Eav} \end{equation} An intuitive understanding of this correspondence can be obtained by looking at the spectrum of $E(t) = E_s(t) + \bar E$, namely $\tilde E(\omega) = \tilde E_s(\omega) + 2 \pi \bar E \delta(\omega)$, and the spectrum of the periodic sequence. Both $\overline E$ and $\overline E_\mathrm{av}$ are the amplitude of the spectral component at zero frequency, the Dirac delta function in $\tilde E(\omega)$ being replaced by the amplitude of the discrete spectral component at zero frequency in the periodic case. Figure \ref{fig1} shows by a blue dashed line a field $E(t)$ obtained with the lowest value of the bias, and by a red solid line the curve $E_0(t)$ reconstructed by the logarithmic Hilbert transform. Big blue dots represent the values of the $E(t)$ at $t = nT_w$, and red smaller dots the values of the reconstructed field at the same times. The curve $E(t)$ has a winding number around the origin of 3. The red solid curve overlaps with the blue dashed one almost everywhere, with the exception of the vicinity of the points where the windings occur. The accuracy of the reconstruction is more evident if we plot the phase reconstructed by the logarithmic Hilbert transform on top of the phase of $E(t)$. This comparison is shown in Figs. \ref{fig2} and \ref{fig3}, where we show by a red solid line the reconstructed phase and by a blue dashed line the phase of $E(t)$. In Fig. \ref{fig2} three phase jumps corresponding to the three windings of $E(t)$ around the origin are clearly visible. Figure \ref{fig3} is the zoom of the plot of Fig. \ref{fig2} in the vicinity of the second phase jump, showing that the deviation of the phase reconstruction from the phase of $E(t)$ is confined to a small region around the jump. The numerical results confirm the conjecture proposed the previous section that the constraint of square-law intensity detection reduces the number of available symbols by approximately one quarter, implying a capacity reduction of two bits over the full coherent detection for the same optical bandwidth. \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig2.pdf} \caption{Phase of a shifted 16QAM. Red solid line: reconstructed phase profile, blue dashed line, phase of $E(t)$, vs. $t/T$, for a bias $b_3 = 0.5$.} \label{fig2} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig3.pdf} \caption{Phase of a shifted 16QAM. Red solid line: reconstructed phase profile, blue dashed line, phase of $E(t)$, vs. $t/T$, for a bias $b_3 = 0.5$. This is the zoom in the region of the second phase jump of Fig. \ref{fig2}} \label{fig3} \end{figure} In Figs. \ref{fig4} we show the ratio $|H_3(t) -1| = |E(t)/E_0(t) - 1|$ for the field $E(t)$ of Fig. \ref{fig1}. Figure \ref{fig4} clearly shows the three Lorentzian of amplitude 2 corresponding to the three encircling of the origin of $E(t)$. Figure \ref{fig5} shows by a blue solid thin line the same curve in a semilogarithmic scale, and by a red dashed thick line an interpolation with the curve \begin{equation} H_3(t) - 1 = \prod_{k=1}^3 \left[1 - \sum_{h=-\infty}^{\infty} \frac{ 2 }{1 - i (t-t_k - h T_w)/|\tau_k|}\right], \label{H3} \end{equation} which, using Eq. (\ref{cot}), becomes \begin{equation} H_3(t) - 1 = \prod_{k=1}^3 \left[1 - \frac{2 \pi i |\tau_k|}{T_w} \mathrm{cot} \left(\pi \frac{t-t_k+i |\tau_k|}{T_w} \right) \right]. \label{H3bis} \end{equation} Equation (\ref{H3}) was obtained adapting Eq. (\ref{HN}) to account for the temporal periodicity induced by the use of the FFT algorithm, which introduces an infinite number of replicas of the Lorentzian line-shapes spaced by the time window $T_w$. The parameters were obtained by interpolation of the main peaks only and were for the real parts $t_1/T_w=108.5755$, $t_2/T_w = 272.4868$, and $t_3/T_w = 384.5205$, and for the imaginary parts $|\tau_1|/T_w = 0.0070$, $|\tau_2|/T_w = 0.027$ and $|\tau_3|/T_w = 0.041$. As shown in Fig \ref{fig4}, the expression given in Eq. (\ref{H3bis}) was accurate more than six orders of magnitude down to the main peaks. However, a single Lorentzian, i.e. only the dominant term with $h =0$ in Eq. (\ref{H3}), is accurate 2 orders of magnitudes down to the main peak, and is sufficient to exactly reproduce the plot in linear scale shown in Fig. \ref{fig3}. From the average time and the temporal width of each Lorentzian line-shape we were able to compute, with high accuracy, the position of the zeros of $E(t+i\tau)$ in the lower complex half-plane without the need of numerical analytic continuation of $E(t)$. \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig4.pdf} \caption{$|H_3(t)-1|$ vs. $t/T$ for a bias $b_3 = 1.1$.} \label{fig4} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig5c.pdf} \caption{$|H_3(t)-1|$ vs. $t/T$ for a bias $b_3 = 1.1$ shown in Fig. \ref{fig4}, in a semilogarithmic scale. The blue solid thin line is the numerical result reported in Fig. \ref{fig4}, the red dashed thick line is the interpolation using Eq. (\ref{H3}).} \label{fig5} \end{figure} Figures \ref{fig6}--\ref{fig8} shows the curves obtained with the same $a_n$ sequence used for Figs. \ref{fig1}--\ref{fig5} but with a larger value of the bias $b_0 = 1.1$. In this case, there are no windings of $E(t)$ around the origin, and the reconstructed field coincides with the original one, $E_0(t) \equiv E(t)$. Figure \ref{fig1} shows the perfect reconstruction of the field at the sampling point by the overlap of the red and the big blue dots. \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig6.pdf} \caption{Complex field of a shifted 16QAM. Red solid line: reconstructed field $E_0(t)$, blue dashed line, detected field $E(t)$, for a bias $b_3 = 1.1$.} \label{fig6} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig7.pdf} \caption{Phase of a shifted 16QAM. Red solid line: reconstructed phase profile, blue dashed line, phase of $E(t)$, vs. $t/T$, for a bias $b_3 = 1.1$. The smaller excursion of the phase shown here compared with that of Fig. \ref{fig4} is caused by the larger distance from the origin due to the larger bias.} \label{fig7} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig8.pdf} \caption{Phase of a shifted 16QAM. Red solid line: reconstructed phase profile, blue dashed line, phase of $E(t)$, vs. $t/T$, for a bias $b_3 = 1.1$. This is the zoom in the same region of the phase jump of Fig. \ref{fig5}.} \label{fig8} \end{figure} The example given in Figs. \ref{fig4}--\ref{fig6} corresponds to a case in which beside the condition of no windings around the origin of the trajectories of $E(t)$ also the condition $|E_s(t)|^2 < \overline E^2$ was fulfilled. Figures \ref{fig9} and \ref{fig10} show instead a case where the condition $|E_s(t)|^2 < \overline E^2$ fails but the reconstruction of the phase and consequently of the field from the intensity profile is perfect because no windings around the origin occur. These curves were obtained using $a_n = (b + k) \sqrt{T}$, with $n$ running from $1$ to $512$ and $k$ randomly chosen between $0$ and $7$, corresponding to an amplitude modulation with 8 levels. The value of $b$ was $b_0 = 0.1$. \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig9.pdf} \caption{Complex field of a shifted 8AM. Red solid line: reconstructed field $E_0(t)$, blue dashed line, detected field $E(t)$, for a bias $b_0 = 0.1$.} \label{fig9} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=2.5in]{Fig10.pdf} \caption{Phase of a shifted 8AM. Red solid line: reconstructed phase profile, blue dashed line, phase of $E(t)$, vs. $t/T$, for a bias $b_0 = 0.1$.} \label{fig10} \end{figure} \section{Time-frequency duality} \label{tfd} In this paper, we have considered functions $E(t)$ whose Fourier transform $\tilde E(\omega)$ was zero for $\omega < 0$, and our goal was to calculate the phase of $E(t)$ once its intensity $|E(t)|^2$ was measured. Once the necessary changes are made, this case has a one to one correspondence with the case studied in \cite{Fienup,Taylor,Shechtman,Cassioli,Mecozzi} of causal functions $E(t)$, i.e. such that $E(t) = 0$ for $t \le 0$, where the goal was to find the phase of $\tilde E(\omega)$ once the power spectrum $|E(\omega)|^2$ was measured over a range of frequency. The necessary changes include, for instance, the fact that the property $\tilde E(\omega) =0$ for all $\omega < 0$ implied, as we have seen, that the analytic continuation of $E(t)$ in the complex plane does not have poles in the lower complex half plane, whereas the causality of $E(t)$ considered in \cite{Fienup,Taylor,Shechtman,Cassioli,Mecozzi}, namely $E(t) = 0$ for all $t \le 0$, implied that the analytic continuation of $\tilde E(\omega)$ in the complex $\omega$ plane had no poles in the upper complex half plane. The necessary and sufficient condition becomes that $\tilde E(\omega)$ does not encircle the origin when $\omega$ goes from $-\infty$ to $\infty$ \section{Conclusions} We have given a necessary and sufficient condition for a function $E(t)$ to be of minimum phase, and hence for its phase to be univocally determined by its intensity $|E(t)|^2$. The check of this condition requires only the plot of the function $E(t)$ for $t$ belonging to the real axis, and does not require the analytic continuation of $E(t)$ in the complex plane. We have shown that sufficient conditions previously proposed can be simply derived from this more general one. As an application to communication systems, we find that the recently proposed KK transmission scheme gives a practical way to decode all distinguishable band-limited fields when the detector is sensitive only to the intensity of the field and insensitive to its phase.
{'timestamp': '2016-10-25T02:09:41', 'yymm': '1606', 'arxiv_id': '1606.04861', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04861'}
arxiv
\section{Introduction} A {\em Boolean network} with $n$ components is a discrete dynamical system usually defined by a global transition function \[ f:\{0,1\}^n\to\{0,1\}^n,\qquad x=(x_1,\dots,x_n)\mapsto f(x)=(f_1(x),\dots,f_n(x)). \] Boolean networks have many applications. In particular, since the seminal papers of McCulloch and Pitts \cite{MP43}, Hopfield \cite{H82}, Kauffman \cite{K69,K93} and Thomas \cite{T73,TA90}, they are omnipresent in the modeling of neural and gene networks (see \cite{B08,N15} for reviews). They are also essential tools in Information Theory, for the network coding problem \cite{ANLY00,GRF14}. \smallskip The structure of a Boolean network $f$ is usually represented via its {\bf interaction graph}, which is the signed digraph $G(f)$ defined as follows: the vertex set is $[n]:=\{1,\dots,n\}$ and, for all $i,j\in [n]$, there exists a positive (resp. negative) arc from $j$ to $i$ is there exists $x\in\{0,1\}^n$ such that \[ f_i(x_1,\dots,x_{j-1},1,x_{j+1},\dots,x_n)-f_i(x_1,\dots,x_{j-1},0,x_{j+1},\dots,x_n) \] is positive (resp. negative). Note that $G(f)$ may have both a positive and a negative arc from one vertex to another. Note also that $G(f)$ may have {\em loops}, that is, arcs from a vertex to itself. The sign of a cycle of $G(f)$ is, as usual, the product of the signs of its arcs (cycles are always directed and without ``repeated'' vertices). \smallskip From a dynamical point of view, there are several ways to derive a dynamics from $f$, depending on the chosen {\em updating strategy}. With the so-called {\em synchronous} or {\em parallel strategy}, each component is updated at each step: if $x^t$ is the configuration of the system at time $t$, then $f(x^t)$ is the configuration of the system at time $t+1$. Hence, the dynamics is just given by the successive iterations of $f$. On the opposite way, with the so-called {\em (fully) asynchronous strategy}, exactly one component is updated at each time. This strategy is very often used in practice, in particular in the context of gene networks \cite{TA90}. More formally, given an infinite sequence $i_0i_1i_2\dots$ of indices taken in $[n]$, the dynamics of $f$ resulting from an initial configuration $x^0$ and the asynchronous strategy $i_0i_1i_2\dots$ is given by the following recurrence: for all $t\in\mathbb{N}$ and $i\in [n]$, $x^{t+1}_i=f_i(x^t)$ if $i=i_t$ and $x^{t+1}_i=x^t$ otherwise. \smallskip All the possible asynchronous dynamics can be represented in a compact way by the so-called {\bf asynchronous graph $\Gamma(f)$}, defined as follows: the vertex set is $\{0,1\}^n$ and, for all $x,y\in\{0,1\}^n$, there is an arc from $x$ to $y$, called {\em transition}, if there exists $i\in [n]$ such that $f_i(x)=y_i\neq x_i$ and $y_j=x_j$ for all $j\neq i$. Note that $f$ and $\Gamma(f)$ share the same information. The {\em distance} between two configurations $x$ and $y$ in $\Gamma(f)$, denoted $d_{\Gamma(f)}(x,y)$, is the minimal length of a path of $\Gamma(f)$ from $x$ to $y$, with the convention that the distance is $\infty$ if no such paths exist. Note that $d_{\Gamma(f)}(x,y)$ is at least the Hamming distance $d_H(x,y)$ between $x$ and $y$. A path from $x$ to $y$ in $\Gamma(f)$ is then called a {\bf geodesic} if its length is exactly $d_H(x,y)$. In other words, a geodesic is a path along which each component is updated at most one. The {\bf diameter} of $\Gamma(f)$ is \[ \mathrm{diam}(\Gamma(f)):=\max\{d_{\Gamma(f)}(x,y):x,y\in\{0,1\}^n,d_{\Gamma(f)}(x,y)<\infty\}. \] \smallskip In many contexts, as in molecular biology, the first reliable information are represented under the form of an interaction graph, while the actual dynamics are very difficult to observe \cite{N15,TK01}. A natural question is then the following: {\em What can be said about $\Gamma(f)$ according to $G(f)$ only?} \smallskip Robert proved the following partial answer \cite{R86,R95}. \begin{theorem}\label{thm:robert} If $G(f)$ is acyclic then $f$ has a unique fixed point $y$. Furthermore, $\Gamma(f)$ is acyclic and, for every configuration $x$, $\Gamma(f)$ has a geodesic from $x$ to~$y$. \end{theorem} In other words, $d_{\Gamma(f)}(x,y)=d_H(x,y)$ for every $x\in\{0,1\}^n$. However, the acyclicity of $G(f)$ is not sufficient for $\Gamma(f)$ to have a short diameter. Indeed, in a rather different setting, Domshlak \cite{D02} proved (a slightly stronger version of) the following result. \begin{theorem}\label{thm:diam_acyclic} For every $n\geq 8$ there exists $f:\{0,1\}^n\to\{0,1\}^n$ such that $G(f)$ is acyclic and $\mathrm{diam}(\Gamma(f))\geq 1.5^{\frac{n}{2}}$. \end{theorem} Now, what can be said if $G(f)$ contains cycles ? Thomas highlighted the fact that the distinction between positive and negative cycles is highly relevant (see \cite{TA90,TK01} for instance). The subtlety and versatility of the influences of interactions between positive and negative cycles lead researchers to first focus on networks with only positive cycles or only negative cycles. In particular, the following basic properties was proved in \cite{A08,RRT08,R10}: {\em If $G(f)$ has no positive (resp. negative) cycles, then $f$ has at most (resp. at least) one fixed point.} This gives a nice proof by dichotomy of the first assertion in Theorem~\ref{thm:robert}. \smallskip In \cite{MRRS13}, the authors showed that the absence of negative cycles essentially corresponds to the study of {\bf monotone networks}, that is, Boolean networks $f:\{0,1\}^n\to\{0,1\}^n$ such that \[ x\leq y~\Rightarrow~f(x)\leq f(y) \] where $\leq$ is the usual partial order ($x\leq y$ if and only if $x_i\leq y_i$ for all $i\in[n]$). More precisely, they proved the following: {\em If $G(f)$ is strongly connected and without negative cycles, then there exists a monotone network $f':\{0,1\}^n\to\{0,1\}^n$ such that: $G(f)$ and $G(f')$ have the same underlying unsigned digraph, and $\Gamma(f)$ and $\Gamma(f')$ are isomorphic}. Furthermore, they proved the following reachability result, that shares some similarities with Theorem~\ref{thm:robert}. \begin{theorem} If $f:\{0,1\}^n\to\{0,1\}^n$ is monotone, then, for every configuration~$x$, $\Gamma(f)$ has a geodesic from $x$ to a fixed point $y$ of $f$. \end{theorem} Here, we prove the following theorem, that shows that there may exist, under the same hypothesis, a configuration $x$ and a fixed point $y$ such that $y$ is reachable from $x$ with paths of exponential length only. This result contrasts with the previous one, and may be seen as an adaptation of Theorem~\ref{thm:diam_acyclic} for monotone networks. \begin{theorem}\label{thm:diam_monotone} For every even $n$, there exists a monotone network $f:\{0,1\}^n\to\{0,1\}^n$, two configurations $x$ and $y$ such that $y$ is a fixed point of $f$ and \[ \mathrm{diam}(\Gamma(f))\geq d_{\Gamma(f)}(x,y)\geq 2^{\frac{n}{2}}. \] \end{theorem} The proof is by construction, and the idea for the construction is rather simple. Let $A$, $B$ and $C$ be the sets of configurations that contains $n/2-1$, $n/2$ and $n/2+1$ ones. Clearly, $A$, $B$ and $C$ are antichains of exponential size, and, in these antichains, obviously, the monotonicity of $f$ doesn't apply. This leaves enough freedom to defined $f$ on $A\cup B\cup C$ in such a way that subgraph $\Gamma(f)$ induced by $A\cup B\cup C$ contains a configuration $x$ and fixed point $y$ reachable from $x$ with paths of exponential length only. To obtain a network as in the theorem, it is then sufficient to extend $f$ on the whole space $\{0,1\}^n$ by keeping $f$ monotone and without creating shortcuts from $x$ to $y$ in the asynchronous graph. This idea, that consists in using large antichains to construct special monotone functions, is also present in \cite{GRR15} and \cite{ADG04c} for instance. \smallskip Let $f:\{0,1\}^n\to\{0,1\}^n$ be any Boolean network such that $G(f)$ has no negative loops. With the technic described above, we can go further and prove that $\Gamma(f)$ can be embedded in the asynchronous graph $\Gamma(f')$ of a monotone network $f':\{0,1\}^{2n}\to\{0,1\}^{2n}$ in such a way that fixed points and distances between configurations are preserved. The formal statement follows. If $x,y\in\{0,1\}^n$, then the concatenation $(x,y)$ is seen as a configuration of $\{0,1\}^{2n}$ and, conversely, each configuration in $\{0,1\}^{2n}$ is seen as the concatenation of two configurations in $\{0,1\}^n$. As usual, we denote by $\ov{x}$ the configuration obtained from $x$ by switching every component. \begin{theorem}[Main results]\label{thm:embedding} Let $f:\{0,1\}^n\to\{0,1\}^n$. If $G(f)$ has no negative loops, then there exists a monotone network $f':\{0,1\}^{2n}\to\{0,1\}^{2n}$ such that the following two properties holds. First, $x$ is a fixed point of $f$ if and only if $(x,\ov{x})$ is a fixed point of $f'$. Second, for all $x,y\in\{0,1\}^n$, $\Gamma(f)$ has a path from $x$ to $y$ of length $\ell$ if and only if $\Gamma(f')$ has a path from $(x,\bar x)$ to $(y,\bar y)$ of length~$2\ell$. \end{theorem} Theorem~\ref{thm:diam_monotone} is now an easy corollary of Theorem~\ref{thm:embedding}. \begin{proof}[of Theorem~\ref{thm:diam_monotone} assuming Theorem~\ref{thm:embedding}] Let $r=2^n$, and let $x^1,x^2,\dots,x^r$ be any enumeration of the elements of $\{0,1\}^n$ such that $d_H(x^k,x^{k+1})=1$ for all $1\leq k<r$ (take the Gray code for instance). Let $f:\{0,1\}^n\to\{0,1\}^n$ be defined by $f(x^k)=x^{k+1}$ for all $1\leq k<r$ and $f(x^r)=x^r$. Let $x=x^0$ and $y=x^r$. Then $y$ is the unique fixed point of $f$. Furthermore, since the set of transitions of $\Gamma(f)$ is $\{x^k\to x^{k+1}:1\leq k<r\}$, we deduce that $d_{\Gamma(f)}(x,y)=2^n-1$. We also deduce that $G(f)$ has no negative loops (this is an easy exercise to prove that $G(f)$ has a negative loop if and only if $\Gamma(f)$ has a cycle of length two). Hence, by Theorem~\ref{thm:embedding}, there exists a monotone network $f':\{0,1\}^{2n}\to\{0,1\}^{2n}$ such that $(y,\ov{y})$ is a fixed point and \[ d_{\Gamma(f')}((x,\ov{x}),(y,\ov{y}))=2d_{\Gamma(f)}(x,y)=2^{n+1}-2\geq 2^n. \] \qed \end{proof} The paper is organized as follows. The proof of Theorem~\ref{thm:embedding} is given in Section~\ref{sec:proof}. A conclusion and some open questions are then given in Section~\ref{sec:conclusion}. \section{Proof of Theorem~\ref{thm:embedding}}\label{sec:proof} We first fix some notations: \begin{align*} \ov{x}^i&:=(x_1,\dots,\ov{x_i},\dots,x_n)&(\textrm{$x\in\{0,1\}^n$ and $i\in [n]$}),\\ w(x)&:=|\{i\in[n]:x_i=1\}|&(\textrm{$x\in\{0,1\}^n$}),\\ w(x,y)&:=w(x)+w(y)&(\textrm{$x,y\in\{0,1\}^n$}),\\ \Omega&:=\{(x,\ov{x}):x\in\{0,1\}^n\}. \end{align*} \smallskip The function $f'$ in Theorem~\ref{thm:embedding} is defined as follows from $f$. \begin{definition} Given $f:\{0,1\}^n\to\{0,1\}^n$, we define $f':\{0,1\}^{2n}\to\{0,1\}^{2n}$ by: for all $i\in [n]$ and $x,y\in\{0,1\}^n$, \[ f'_i(x,y)= \left\{ \begin{array}{ll} f_i(x)&\text{ if $y=\ov{x}$ or $\ov{y}^i=\ov{x}$}\\[2mm] \ov{x_i}&\text{ if $w(x,y)=n$ and $y\neq \ov{x}$}\\[2mm] 1&\text{ if $w(x,y)=n+1$ and $\ov{y}^i\neq\ov{x}$}\\[2mm] 0&\text{ if $w(x,y)=n-1$ and $\ov{y}^i\neq\ov{x}$}\\[2mm] 1&\text{ if $w(x,y)\geq n+2$}\\[2mm] 0&\text{ if $w(x,y)\leq n-2$} \end{array} \right. \quad\text{and}\quad f'_{n+i}(x,y)=\ov{f'_i(\ov{y},\ov{x})}. \] \end{definition} \begin{remark} $f'_i(x,y)=\ov{f'_{n+i}(\ov{y},\ov{x})}$. \end{remark} \begin{remark} Let $A$, $B$ and $C$ be sets of configurations $(x,y)\in\{0,1\}^{2n}$ such that $w(x,y)$ is $n-1$, $n$ and $n+1$, respectively (these are the three sets discussed in the introduction) (we have $\Omega\subseteq B$). One can see that $f'_i$ behave as $f_i$ when $x$ and $y$ are mirroring each other ($y=\ov{x}$) or almost mirroring each other ($\ov{y}^i=\ov{x}$); and in both cases, $(x,y)$ lies in $A\cup B\cup C$. One can also see that $f'_i$ equals $0$ below the layer $A$ and equals $1$ above the layer $C$. The same remarks apply on $f'_{n+i}$, excepted that $f'_{n+1}$ behaves as the negation $\ov{f_i}$ in $A\cup B\cup C$. Hence, roughly speaking, $f$ behaves as $(f,\ov{f})$ in the middle layer $A\cup B\cup C$, and it converges toward the all-zeroes or all-ones configuration outside this layer. \end{remark} \begin{lemma}\label{lem:monotone} If $G(f)$ has no negative loops, then $f'$ is monotone. \end{lemma} \begin{proof} Suppose, for a contradiction, that there exists $a,b,c,d\in\{0,1\}^n$ and $i\in [n]$ such that \[ (a,b)<(c,d) \text{ and } f'_i(a,b)>f'_i(c,d). \] Then we have \[ n-1\leq w(a,b)<w(c,d)\leq n+1. \] This leaves three possibilities. \begin{description} \item[{\it Case 1: $w(a,b)=n-1$ and $w(c,d)=n+1$}.] Since $f'_i(a,b)=1$, we fall in the first case of the definition of $f'_i$, that is, \[ f'_i(a,b)=f_i(a)=1\text{ and }\ov{b}^i=\ov{a}. \] Similarly \[ f'_i(c,d)=f_i(c)=0\text{ and }\ov{d}^i=\ov{c}. \] Thus \[ (a,b)=(a,\ov{\ov{a}}^i)<(c,d)=(c,\ov{\ov{c}}^i). \] So for all $j\neq i$, we have $a_j\leq c_j$ and $\ov{a_j}=(\ov{\ov{a}}^i)_j\leq (\ov{\ov{c}}^i)_j=\ov{c_j}$ thus $c_j\leq a_j$. So $a_j=c_j$ for all $j\neq i$, that is, $c\in\{a,\ov{a}^i\}$. Since $f_i(a)<f_i(c)$ we have $c=\ov{a}^i$, and since $a\leq c$ we deduce that $a_i=0$. Thus $G(f)$ has a negative arc from $i$ to $i$, a contradiction. \medskip \item[{\it Case 2: $w(a,b)=n-1$ and $w(c,d)=n$}.] As in Case 1, we have \[ f'_i(a,b)=f_i(a)=1\text{ and }\ov{b}^i=\ov{a}. \] For $f'_i(c,d)$ we have two cases. Suppose first that \[ f'_i(c,d)=f_i(c)=0\text{ and }d=\ov{c}. \] Then \[ (a,b)=(a,\ov{\ov{a}}^i)<(c,d)=(c,\ov{c}). \] So for all $j\neq i$, we have $a_j\leq c_j$ and $\ov{a_j}=(\ov{\ov{a}}^i)_j\leq \ov{c_j}$ thus $c_j\leq a_j$. So $a_j=c_j$ for all $j\neq i$, that is, $c\in\{a,\ov{a}^i\}$. Since $f_i(a)<f_i(c)$ we have $c=\ov{a}^i$, and since $a\leq c$ we deduce that $a_i=0$. Thus $G(f)$ has a negative arc from $i$ to $i$, a contradiction. The other case is \[ f'_i(c,d)=\ov{c_i}=0\text{ and }d\neq \ov{c}. \] First, observe that for all $j\neq i$, if $c_j=0$ then $a_j=0$ thus $1=(\ov{\ov{a}}^i)_j\leq d_j$. Since $c_i=1$ we deduce that $\ov{c}\leq d$. Now, suppose that $c_j=d_j=1$ for some $j\in [n]$. Since $w(c,d)=n$, we deduce that there exists $k\neq j$ such that $c_k=d_k=0$, and this contradicts $\ov{c}\leq d$. Thus, for all $j\in [n]$, either $d_j=0$ or $d_j>c_j$, that is, $d\leq \ov{c}$. Thus $c=\ov{d}$, a contradiction. \medskip \item[{\it Case 3: $w(a,b)=n$ and $w(c,d)=n+1$}.] We obtain a contradiction as in Case~2. \end{description} So we have proven that $f'_i$ is monotone for all $i\in [n]$. It remains to prove that $f'_{n+i}$ is monotone. Using the monotony of $f'_i$ for the implication we get: \[ \begin{array}{rcl} (a,b)\leq (c,d) &\iff& (\ov{c},\ov{d})\leq (\ov{a},\ov{b})\\[2mm] &\iff& (\ov{d},\ov{c})\leq (\ov{b},\ov{a})\\[2mm] &\Longrightarrow& f'_i(\ov{d},\ov{c})\leq f'_i(\ov{b},\ov{a})\\[2mm] &\iff& \ov{f'_i(\ov{b},\ov{a})}\leq\ov{f'_i(\ov{d},\ov{c})}\\[2mm] &\iff& f'_{i+n}(a,b)\leq f'_{i+n}(c,d). \end{array} \] \qed \end{proof} \begin{lemma}\label{lem:fixed} For all $x\in\{0,1\}^n$ we have $f(x)=x$ if and only if $f'(x,\ov{x})=(x,\ov{x})$. \end{lemma} \begin{proof} By definition we have \[ f(x)=x\quad\iff\quad f'_i(x,\ov{x})=x_i~\forall i\in[n]. \] So it is sufficient to prove that \[ f'(x,\ov{x})=(x,\ov{x})\quad\iff\quad f'_i(x,\ov{x})=x_i~\forall i\in[n]. \] The direction $\Rightarrow$ is obvious, and $\Leftarrow$ is a consequence of the following equivalences: \begin{align*} f'_i(x,\ov{x})=x_i &\iff \ov{f'_{n+i}(\ov{\ov{x}},\ov{x})}=x_i\\ &\iff f'_{n+i}(x,\ov{x})=\ov{x_i}\\ &\iff f'_{n+i}(x,\ov{x})=(x,\ov{x})_{n+i}. \end{align*} \qed \end{proof} \begin{lemma}\label{lem:01} For all $x,y\in\{0,1\}^n$, if $\Gamma(f')$ has a path from $(x,y)$ to $\Omega$ then $n-1\leq w(x,y)\leq n+1$. \end{lemma} \begin{proof} It is sufficient to prove that, \[ w(x,y)\leq n-2~\Rightarrow f'(x,y)=0 \quad\text{and}\quad w(x,y)\geq n+2~\Rightarrow f'(x,y)=1. \] Let $i\in[n]$. If $w(x,y)\leq n-2$ (resp. $w(x,y)\geq n+2$) then $f'_i(x,y)=0$ (resp. $f'_i(x,y)=1$) by definition. Now, if $w(x,y)\leq n-2$ then $w(\bar y,\bar x)\geq n+2$ thus \[ f'_{n+i}(x,y)=\ov{f'_i(\bar y,\bar x)}=\ov{1}=0, \] and if $w(x,y)\geq n+2$ then $w(\bar y,\bar x)\leq n-2$ thus \[ f'_{n+i}(x,y)=\ov{f'_i(\bar y,\bar x)}=\ov{0}=1. \] \qed \end{proof} \begin{lemma}\label{lem:transition} If $G(f)$ has no negative loops, then, for all $x,y\in\{0,1\}^n$, the following assertions are equivalent: \begin{enumerate} \item[{\em (1)}] $x\to y$ is a transition of $\Gamma(f)$. \item[{\em (2)}] $(x,\ov{x})\to(y,\ov{x})\to (y,\ov{y})$ is a path of $\Gamma(f')$. \item[{\em (3)}] $(x,\ov{x})\to(x,\ov{y})\to (y,\ov{y})$ is a path of $\Gamma(f')$. \item[{\em (4)}] $\Gamma(f')$ has a path from $(x,\ov{x})$ to $(y,\ov{y})$ without internal vertex in $\Omega$. \end{enumerate} Furthermore, the only possible paths of $\Gamma(f')$ from $(x,\ov{x})$ to $(y,\ov{y})$ without internal vertex in $\Omega$ are precisely the ones in {\em (2)} and {\em (3)}. \end{lemma} \begin{proof} Suppose that $\Gamma(f)$ has a transition $x\to y$, and let $i\in[n]$ be such that $y=\ov{x}^i$. We have $f'_i(x,\ov{x})=f_i(x)\neq x_i$ thus $\Gamma(f')$ has a transition from $(x,\ov{x})$ to $(\ov{x}^i,\ov{x})=(y,\ov{x})$. Since \[ f'_{n+i}(\ov{x}^i,\ov{x})=\ov{f_i(\ov{\ov{x}},\ov{\ov{x}^i})}=\ov{f_i(x,\ov{\ov{x}^i})}=\ov{f_i(x)}=x_i\neq (\ov{x}^i,\ov{x})_{n+i}, \] $\Gamma(f')$ has a transition from $(\ov{x}^i,\ov{x})$ to \[ \ov{(\ov{x}^i,\ov{x})}^{n+i}=(\ov{x}^i,\ov{\ov{x}}^i)=(y,\ov{y}). \] This proves the implication $(1)\Rightarrow (2)$. Now, if $\Gamma(f')$ contains the transition $(x,\ov{x})\to (y,\ov{x})$ then there exists $i\in [n]$ such that $y=\ov{x}^i$ and $y_i=f'_i(x,\ov{x})=f_i(x)$. Thus $x\to y$ is a transition of $\Gamma(f)$. So we have $(1)\iff (2)$ and we prove similarly that $(1)\iff (3)$. \smallskip Since $[(2)\text{ or }(3)]\Rightarrow (4)$ is obvious, to complete the proof it is sufficient to prove that if $\Gamma(f')$ has a path $P$ from $(x,\ov{x})$ to $(y,\ov{y})$ without internal vertex in $\Omega$ then either $P=(x,\ov{x})\to(y,\ov{x})\to (y,\ov{y})$ or $P=(x,\ov{x})\to(x,\ov{y})\to (y,\ov{y})$. Let $a$ be the configuration following $(x,\ov{x})$ in $P$, and let $b$ be the configuration following $a$ in $P$. We will prove that $b=(y,\ov{y})$ and $a=(x,\ov{y})$ or $a=(y,\ov{x})$. We have $w(a)=n\pm 1$ and thus $w(b)\in\{n-2,n,n+2\}$, but if $w(b)=n\pm 2$ then we deduce from Lemma~\ref{lem:01} that $\Gamma(f')$ has no paths from $b$ to a configuration in $\Omega$, a contradiction. Thus $w(b)=n$. Let $i\in [n]$ be such that $a=(\ov{x}^i,\ov{x})$ or $a=(x,\ov{\ov{x}}^i)$. We have four cases. \begin{description} \item[{\it Case 1: $a=(\ov{x}^i,\ov{x})$ and $w(a)=n-1$}.] Since $w(a)=n-1$ we have $x_i=1$, and thus $f'_i(x,\ov{x})=f_i(x)=0$. Also $f'_i(a)=f'_i(\ov{x}^i,\ov{x})=f_i(\ov{x}^i)=0$ since otherwise $G(f)$ has a negative loop on vertex $i$. Let $1\leq j\leq 2n$ be such that $b=\ov{a}^j$. Since $w(a)<w(b)=n$, we have $a_j=0$ and $f'_j(a)=1$. If $1\leq j\leq n$ then $j\neq i$ (since $f'_i(a)=0$) so $\ov{\ov{x}}^j\neq\ov{\ov{x}^i}$ and since $w(\ov{x}^i,\ov{x})=n-1$, we deduce from the definition of $f'$ that $f'_j(a)=f'_j(\ov{x}^i,\ov{x})=0$, a contradiction. So $n< j\leq 2n$. Let $k=j-n$. We have \[ f'_j(a)=f'_{n+k}(a)=f'_{n+k}(\ov{x}^i,\ov{x})=\overline{f'_k(\ov{\ov{x}},\ov{\ov{x}^i})}=\overline{f'_k(x,\ov{\ov{x}^i})}. \] Since $w(\ov{x}^i,\ov{x})=n-1$ we have $w(x,\ov{\ov{x}}^i)=n+1$. So if $k\neq i$ we have $\ov{\ov{\ov{x}}^i}^k\neq\ov{x}$. Thus by the definition of $f'$ we have $f'_k(x,\ov{\ov{x}^i})=1$ thus $f'_j(a)=0$, a contradiction. We deduce that $k=i$, that is, $j=n+i$. Thus $b=\ov{a}^{n+i}=(\ov{x}^i,\ov{\ov{x}}^i)\in\Omega$, and we deduce that \[ P=(x,\ov{x})\to (y,\ov{x})\to (y,\ov{y}). \] \item[{\it Case 2: $a=(\ov{x}^i,\ov{x})$ and $w(a)=n+1$}.] We prove with similar arguments that \[ P=(x,\ov{x})\to (y,\ov{x})\to (y,\ov{y}). \] \item[{\it Case 3: $a=(x,\ov{\ov{x}}^i)$ and $w(a)=n-1$}.] We prove with similar arguments that \[ P=(x,\ov{x})\to (x,\ov{y})\to (y,\ov{y}). \] \item[{\it Case 4: $a=(x,\ov{\ov{x}}^i)$ and $w(a)=n+1$}.] We prove with similar arguments that \[ P=(x,\ov{x})\to (x,\ov{y})\to (y,\ov{y}). \] \end{description} \qed \end{proof} \pagebreak \begin{lemma}\label{lem:path} If $G(f)$ has no negative loops, then for all $x,y\in\{0,1\}^n$, the following two assertions are equivalent: \begin{enumerate} \item[{\em (1)}] $\Gamma(f)$ has a path from $x$ to $y$ of length $\ell$. \item[{\em (2)}] $\Gamma(f')$ has a path from $(x,\bar x)$ to $(y,\bar y)$ of length $2\ell$. \end{enumerate} \end{lemma} \begin{proof} According to Lemma~\ref{lem:transition}, $x^0\to x^1\to x^2\to \cdots\to x^\ell$ is a path of $\Gamma(f)$ if and only if \[ (x^0,\ov{x^0})\to(x^0,\ov{x^1})\to (x^1,\ov{x^1})\to(x^1,\ov{x^2})\to (x^2,\ov{x^2}) \cdots\to (x^\ell,\ov{x^\ell}) \] is a path of $\Gamma(f')$. This proves $(1)\Rightarrow (2)$. To prove $(2)\Rightarrow(1)$ suppose that $\Gamma(f')$ has a path $P$ from $(x,\bar x)$ to $(y,\bar y)$ of length $2\ell$. Let $(a^0,\ov{a^0}),(a^1\ov{a^1}),\dots,(a^p,\ov{a^p})$ be the configurations of $P$ that belongs to $\Omega$, given in the order (so $a^0=x$ and $a^p=y$). According to Lemma~\ref{lem:transition}, there exists $b^1,b^2,\dots,b^p$ with $b^q\in\{(a^{q-1},\ov{a^q}),(a^q,\ov{a^{q-1}})\}$ for all $1\leq q\leq p$ such that \[ P=(a^0,\ov{a^0})\to b^1 \to (a^1,\ov{a^1})\to b^2\to\cdots \to b^p\to (a^p,\ov{a^p}). \] Thus $p=\ell$, and again by Lemma~\ref{lem:transition}, $x^0\to x^1\to\cdots \to x^\ell$ is a path of $\Gamma(f)$.\qed \end{proof} Theorem~\ref{thm:embedding} result from Lemmas~\ref{lem:monotone}, \ref{lem:fixed} and \ref{lem:path}. \section{Conclusion and open questions}\label{sec:conclusion} In this paper we have proved that the asynchronous graph of every $n$-component Boolean network without negative loop can be embedded in the asynchronous graph of a $2n$-component {\em monotone} Boolean network, in such a way that fixed points and distances between configurations are preserved. A consequence of this result, which was our initial goal, is that the asynchronous graph of a monotone network may have an exponential diameter. More precisely, it may exist a configuration $x$ and a fixed point $y$ reachable from $x$ such that the distance between $x$ and $y$ is at least $2^{\frac{n}{2}}$. This contrasts with the fact that for every configuration $x$ there exists a fixed point $y$ such that the distance between $x$ and $y$ is at most~$n$. \smallskip These results raise several questions. Could it be possible to embed, in a similar way, a $n$-component network {\em with} negative loops into a $m$-component monotone network? Maybe this would require $m$ to be even larger than $2n$. Besides, the embedding we propose is based on the injection $x\mapsto (x,\overline{x})$ from $\{0,1\}^n$ to the balanced words of length $2n$. The well-known Knuth's balanced coding scheme \cite{K86} provides a rather simple injection from $\{0,1\}^n$ to the balanced words of length $n+2\log_2n$ only. Could this technique be used to decrease the number of components in the host monotone network from $2n$ to $n+2\log_2n$? Finally, it could be interesting to study the interaction graph of monotone networks with large diameter. Does it necessarily contain long cycles, or many disjoint cycles? \paragraph{Acknowledgment} This work has been partially supported by the project PACA APEX FRI. We wish also to thank Pierre-Etienne Meunier, Maximilien Gadouleau and an anonymous reviewer for stimulating discussions and interesting remarks. \bibliographystyle{splncs_srt}
{'timestamp': '2016-06-17T02:10:14', 'yymm': '1606', 'arxiv_id': '1606.05172', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05172'}
arxiv
\section{Introduction} Qualitative Comparative Analysis (QCA), introduced in Charles Ragin's 1987 book {\it{The Comparative Method}}, is a set of techniques designed to be a ``middle-path'' between quantitative and qualitative analysis. Ragin and others have since published many works on practical applications and extensions of the method, including the use of `fuzzy-sets,' the development of software, and many substantive applications (\citealt{dusa_and_thiem_2014,caramani_2008,ragin_2008,rihoux_and_ragin_2009,schneider_and_wagemann_2007,thiem_and_dusa_2013}). Though originally conceived has a method to analyze middle-sized samples, some herald its interpretive qualities above regression analysis in certain contexts (\citealt{katz_et_al_2005,seawright_2005,vis_2012}). At base, QCA allows for a set-theoretic approach to social science grounded in Boolean algebra. Within this framework, QCA can identify necessary conditions and multiple explanatory combinations of conditions (``recipes'') for the value of an outcome. Using the logic of sets, QCA can provide a useful alternative for analyzing complex causation, broadening the reach of current research strategies to integrate a combinatorial, logic-of-sets framework versus the mean-based approaches in regression analysis. QCA can also be applied to middle-N sets, where regression may fail to provide robust results. This multi-method technique that enables the researcher to be ``in dialogue'' with the results through by way of `truth table' analysis. Researchers are encouraged to bring in their own case-oriented knowledge to establish causal conditions, examine the results of the truth table, investigate the placement of cases, and redefine conditions as needed. Despite recent popularity, QCA is not without its detractors. QCA is most often criticized for the use of the truth table and subsequent algorithm to determine a minimum configuration that derives a given outcome. The truth table summarizes agreement on an outcome value for cases with the same configuration of causal conditions; the algorithm combines many configurations in a reduced configuration that results in an outcome. Specifically, many are skeptical of its ability to successfully identify randomly-drawn data as being patternless, an important benchmark of any method. Stanley \citet{lieberson_2004} suggested that an application of QCA using random data would often lead to spurious configurations returned. Similarly, Simon \citet{hug_2013} questioned its usefulness on the grounds that it does not allow for error in hypothesis testing. Skaaning (2013) assessed the sensitivity of QCA when varying current robustness specifications. Though \citet{braumoeller_2015} embarked on a permutation test to determine which configurations returned via QCA are due to randomness, a principled test of QCA against {\it{totally}} random data while varying configurational N, consistency score, and the structure of data has not been undertaken. A principled test of the assessment \citet{lieberson_2004} described is useful in two ways. First, to generally assess the ability of QCA, with reasonable applications of existing robustness parameters (i.e. configurational N and consistency score thresholds), to filter random patterns. Second, it can be used for directly calculating the probability of returning random results according to unique features of any data set. This would be useful as an application-specific diagnostic assessment for QCA's ``truth table'' procedure, and would help protect researchers against wrongfully spotting patterns via stochastic properties of measurable phenomena. The interpretation of such an assessment would be the probability of returning a random configuration using the data and robustness thresholds selected by the user. Systematically applying Lieberson's suggested technique could also provide specific recommendations to inform researchers of an ideal consistency score and configurational N threshold to reach a desired level of confidence against a random result. Here, we determine whether QCA is robust to randomness, generally. We systematically apply QCA to thousands of random data sets, incrementally changing elements of the data structure -- sample size and the distribution of variables in the data set -- as well as elements under the control of the researcher -- consistency threshold, configurational N threshold and `complex' versus `parsimonious' solutions. We then use logistic regression to determine which of these elements affects the probability of returning a `random configuration,' or a result returned from random data. We also describe a related method, which is the primary purpose of this article. The Bootstrapped Robustness Assessment is to be used to evaluate any QCA result. This operates by generating many random data sets of the same data structure used in an application of QCA (i.e. based upon the sample size and variable distributions) and applying QCA repeatedly at the parameters under control of the researcher (i.e consistency score thresholds, configurational N, and parsimonious vs. complex solutions). The result is the probability that a given QCA application would return a random result, based upon random data of similar size and distribution. We hope that this method will provide straightforward, easily-interpreted recommendations for researchers who desire unarbitrarily-drawn parameters of choice. \section{`Probabilistic Processes' and QCA} A recent {\it{Sociological Methodology}} symposium on the methodological merits of QCA hosted a number of papers evaluating the reliability of QCA under both statistical and epistemological conditions. One paper saw problems with QCA under optimal conditions (\citealt{lucas_and_szatrowski_2014}) which subsequently could not be independently replicated by two other papers (\citealt{ragin_2014,vaisey_2014}). Seawright (2014) discusses the reliability of QCA when certain configurations are unobserved. One recent piece (\citealt{collier_2014}) points out several studies that verify whether QCA's algorithm returns robust configurations (e.g \citealt{hug_2013,schneider_and_wagemann_2012,krogslund_et_al_2015}). This paper will attempt to remedy what can be described as QCA's ``randomness problem'' -- the extent to which QCA's `truth table' analysis and algorithm are able to filter randomness in data given the robustness checks currently available. QCA's ``randomness problem'' is best described by \citet{lieberson_2004}. Lieberson's chief criticism is that ``QCA is less prepared to allow for chance and probabilistic processes'' than other methods and that ``procedures do not rule out the possibility that the observations are all a random matter'' (\citealt[13]{lieberson_2004}). Although QCA is a broad set of techniques to analyze small-to-medium-n data, the primary criticism of QCA has been its analysis of the `truth table.' The QCA `truth table' is a decomposition of data that analyzes each combination of causal conditions found in the data, the number of cases within each combination, and the extent to which cases that share these causal conditions agree on an outcome. An algorithm is applied to the truth table, combining the information into one or more ``causal recipes'' or solutions that result in an outcome. Lieberson imagines a test of his assertion that truth table analysis returns random results: apply QCA to a collected data set versus data where values arre randomly reassigned, keeping the marginal distributions intact. If QCA returns a configuration in both cases, it has a serious problem with being able to distinguish real patterns from random ones. In a rebuttal, \citet{rihoux_and_ragin_2009} argue that such a test would show that random patterns would be filtered out by probabilistic procedures used in any application of QCA. One such procedure is the use of a high {\it{consistency threshold}}: the proportion of cases that are explained by a given a configuration or solution. This threshold is designed to prevent configurations that have high probability of being random from being included in the QCA algorithm and is the proportion of cases with the same combination of causal condition values and have the same value for the outcome. A recommended threshold is .85, meaning that 85\% of all cases with a specific configuration of causal conditions all agree in the value of the outcome. However, depending upon the marginal distributions of the conditions used in the QCA, a consistency score threshold could have a differential effect for filtering random configurations. For example, imagine an application of QCA had an outcome whose cases have a 90\% probability of being 1. Any combination of categories now has a .9 probability of having an outcome of value 1, with some rate of error. However, if attempting to explain the negation of the outcome, each combination of variables has a .1 probability of having an outcome with value 0. In these situations, the consistency score needed to protect the researcher against observing a random pattern differs quite a bit -- at base, a .9 is needed in the first case, while the lowest value is needed for predicting the negation. A more direct estimation of randomness, one that takes into account the marginal distribution of the outcome used in the analysis, would thus be helpful for providing an application-specific recommendation for the consistency score. A second probabilistic procedure to prevent spurious results is the {\it{configurational N threshold}}: the minimum number of cases that have a certain combination of causal conditions, which allow the solution to be considered in the final result. This prevents the researcher from making conclusions about a small number of cases, especially about being overconfident about just one case with a unique set of conditions. To prevent such a scenario, the researcher can set a certain configurational N threshold (usually 2 or 3) to throw out those combinations of conditions that do not have a sufficient number of cases to make conclusions. Ostensibly, a high consistency score should be sufficient to account for error in causal conditions. As we have argued, these thresholds should have varying success rates according to the marginal probability of conditions present in the analysis. The utility of these procedures to distinguish a random data set from a collected one is an empirical question. Our first goal is thus to determine if the current researcher-set thresholds are enough to ensure that the results returned are not due to random chance. This paper addresses two areas of research inquiry. First, to what extent does a consistency score and configurational N threshold actually reduce the chance of returning a spurious result? Relatedly, how does this effectiveness differ according to the structure of the data? For example, is a consistency score of .9 effective at all sample sizes? How does the distribution of the outcome affect the usefulness of a high configurational N threshold? Our first set of results demonstrates the general effects of researcher choice on spuriousness in QCA's `truth table' analysis, with a special attention given to its variation with data structure. Our second set of questions refers to a practical application of these results. If results are highly dependent upon the structure of data analyzed, an application-specific robustness check would be useful for providing specific recommendations for researcher choice. The second set of results is a practical application of our procedure that uses a given QCA model, simulates many random data sets from this model, and 1) gives specific recommendations for ensuring against random results and 2) gives a specific value for the probability that a given QCA application would return a random result. The latter application has an analogous interpretation as a p-value for a QCA result. \section{Is QCA Robust to Randomness?} There are researcher-set thresholds available prior to an analysis to reduce random configurations from being returned. The {\it{consistency threshold}} restricts the analysis to only consider configurational categories that have a certain proportion of cases that all agree in the direction of the dependent variable. The {\it{configurational N threshold}} restricts the analysis to only consider those configurational categories that have a certain number of cases within them. For example, we can choose to only include those combinations of causal conditions that have four or more cases that share all of the same causal condition states. Though these are attempts to introduce probabilistic checks for QCA configurations, their use is often flexible, and general recommendations for which thresholds are hard to determine without a principled test of their usefulness. This section assesses the relative importance of each probabilistic check for filtering out random configurations from being returned by QCA. \subsection{Assessing the Robustness of QCA} We employ a straightforward assessment of QCA using simulations. First, we first simulate a random data set. Next, we apply QCA to this random data set, and record whether QCA returned a result at all from random data. If we discover that a result is returned, we know that QCA is returning a spurious result. We systematically vary several variables to determine which elements of data structure (marginal distribution of variables, number of causal conditions included in the model, and sample size) and features of researcher choice (consistency threshold, configurational N threshold, and complex versus parsimonious solutions) affect the probability of a spurious result. In these simulations, each causal condition is a dummy variable with a marginal distribution randomly varying between .1 to .9 probability of being ``1.'' Though variables vary between iterations, all variables have the same marginal distribution within each iteration. The number of causal conditions vary from one to six. In accordance with QCA's focus for small- to medium-n samples, the sample size of the random data set varies from 10 to 60. Between iterations, we systematically vary the configurational N threshold from one to six. We vary the consistency threshold from .5 to 1. The resulting data set is 2.5 million cases, each case an iteration of this procedure. We employ logistic regression on the results, with the dependent variable being a 0-1 outcome of returning a configuration from random data. The independent variables are the elements of data structure and researcher choice listed above. The primary question here is, which factors, when altered, independently decrease the probability of returning a random configuration in QCA? Secondly, we assess whether researcher choice differentially affects the probability of a result given the structure of the data. For example, does a high consistency score threshold filter out spuriousness across all sample sizes? Does a high configurational N threshold filter spuriousness given all marginal probabilities of causal conditions? This is tested using interaction effects between variables measuring researcher choice and variables measuring data structure. If interaction effects are substantial, it suggests that additional assessments that take into account data structure need to applied to QCA to ensure robustness. \subsection{Results} Generally, the choice of a high consistency score and high configurational N in QCA do reduce the probability of returning a spurious result. Their effectiveness, however, is dependent upon the basic structure of the data: the distribution of the dependent variable, the number of variables used in the analysis, and the sample size affect how probable a result is spurious. First, we describe the main effects of each of these in turn. Then, we discuss how the structure of the data interacts strongly with checks. \subsubsection{The Effects of Data Structure and Researcher Choice on Spuriousness} \begin{figure}[htb!] \begin{center} \label{diagram} \centerline{\includegraphics[scale=.5]{regression_plots.png}} \vskip-1ex \caption{Predicted Effects on the Probability of a Spurious Result in csQCA} \end{center} \end{figure} Model 1 in Table 1 shows the results of the logistic regression model predicting whether QCA returned a spurious result from simulated random data. Figure 1 plots these effects graphically. The largest Model 1 effect is for the distribution of the outcome. An increase in the distribution of 1s in the dependent variable from probability 0 to probability 1 increased the logged odds of a spurious result by 2.29 (about 10 times the odds). This is an expected result -- in the case of an outcome with 90\% `1's', each case, and thus each configuration, has a 90\% of being 1 in the outcome. In Model 1, we see that increasing the number of variables decreases the probability of a spurious result by about 13\% for each additional variable. Interestingly, increasing the sample size also increases the odds of a spurious result by about 3\% for each additional case. This is in contrast to other mean-based approaches which typically become more robust as sample size increases. \begin{table}[ht] \caption{Logistic Regression of Elements of Researcher Choice and Data Structure Predicting a Spurious QCA Result } \centering \begin{tabular}{lll} \hline Variable & Model 1 & Model 2 \\ \hline Intercept & 0.33(0.02)*** & 3.96(0.08)*** \\ Cons. Threshold & -0.86(0.02)*** & -5.33(0.09)*** \\ Conf. N Threshold & -0.71(0.00)*** & 0.08(0.01)*** \\ Complex Solution & -0.82(0.01)*** & -1.41(0.12)*** \\ Sample Size & 0.03(0.00)*** & -0.07(0.00)*** \\ Num. Variables & -0.14(0.00)*** & 0.32(0.01)*** \\ Dependent Variable Dist. & 2.29(0.01)*** & -5.88(0.07)*** \\ Cons. Threshold * Conf. N Threshold & & -0.57(0.02)*** \\ Cons. Threshold * Complex Solution & & -1.34(0.09)*** \\ Cons. Threshold * Sample Size & & -0.01(0.00)*** \\ Cons. Threshold * Num. Variables & & 0.23(0.01)*** \\ Cons. Threshold * Dependent Variable Dist. & & 10.11(0.08)*** \\ Conf. N Threshold * Complex Solution & & 0.01(0.01) \\ Conf. N Threshold * Sample Size & & 0.02(0.00)*** \\ Conf. N Threshold * Num. Variables & & -0.33(0.00)*** \\ Conf. N Threshold * Dependent Variable Dist. & & 0.27(0.01)*** \\ Complex Solution * Sample Size & & -0.04(0.00)*** \\ Complex Solution * Num. Variables & & 1.67(0.04)*** \\ Complex Solution * Dependent Variable Dist. & & -0.06(0.05)\\ Sample Size * Num. Variables & & 0.01(0.00)*** \\ Sample Size * Dependent Variable Dist. & & 0.05(0.00)*** \\ Num. Variables * Dependent Variable Dist. & & -0.37(0.01)*** \\ AIC & 785374 & 670644 \\ \hline \multicolumn{3}{l}{\footnotesize{Null Deviance: 1029424 on 876083 degrees of freedom}}\\ \multicolumn{3}{l}{\footnotesize{$^{*}p < .05$, $ ^{**}p < .01$, $ ^{***}p < .001$}}\\ \end{tabular} \end{table} Model 1 also shows the effect of researcher choice on returning a random configuration. Increasing the consistency score from and 0 to 1 in this case decreases the odds of returning a spurious result by 58\%. Using a ``complex'' versus ``parsimonious'' solution reduces the odds of a spurious result by 56\%. The most substantial effect, however, is the configurational N threshold, with a reduction in the odds of spuriousness by 51\% at each additional increase in the configurational N threshold. With the exception of two interactions (between complex solution and configurational N threshold, and between complex solution and the dependent variable distribution), Model 2 shows that researcher choice significantly moderates the effects of the structure of the data in the application of QCA. Because there are many strong interaction effects, we encourage the reader to focus upon the interpretation of Model 2. These variegated effects are described in the section and figures below. \subsubsection{The Highly Contingent Effects of Researcher Choice on Spuriousness} How effective is researcher choice in reducing the spuriousness of QCA under different conditions of data structure? One example question here is, To what extent does increasing the consistency score threshold effectively reduce the chance of a spurious result when the sample size is high? \begin{figure}[htb!] \begin{center} \label{diagram} \centerline{\includegraphics[scale=.45]{interaction_plots_dvdist.png}} \vskip-1ex \caption{Predicted Interactions between Elements of Researcher Choice and Outcome Distribution} \end{center} \end{figure} Figure 2 shows the predicted interaction between researcher choice and the distribution of the dependent variable on the probability of spuriousness. On the y-axis is the expected probability predicted by the logistic regression model; the x-axis shows the outcome distribution in the data used to fit the QCA model. The top-left plot shows the predicted spuriousness across outcome distributions, with all other variables held at their means. The top-right shows that the consistency score threshold assists in reducing spuriousness by a great deal at lower distributions; when all cases have a .1 probability of being ``1'' on the outcome, increasing the consistency score from .5 to 1 decreases the probability of a spurious result from .5 to .2, a substantial reduction. The effectiveness of consistency score threshold on spuriousness decreases as the outcome distribution changes, however. When all cases have a .9 probability of being `1,' the predicted effect of increasing the consistency score is slightly negative. In data sets where cases almost all agree on an outcome, the consistency score may not be the most effective tool to prevent spuriousness. The higher likelihood that a lower consistency score improves robustness is likely due to lower consistency scores including all possible combinations into the analysis, which returns a non-result. Higher consistency scores in this circumstance will filter out configurations that randomly vary from the .9 baseline probability in the data set, returning a ``random'' configuration that made the cut while filtering out ``random'' configurations that predictably varied below the threshold in their incidence of the outcome. The configurational N threshold substantially impacts the probability of robustness at all levels of the outcome distribution. Unlike the consistency score threshold, there is no change in the direction of the effect; increasing the configurational N threshold decreases the probability of spuriousness at all levels of the outcome distribution. The extent to the effect, however, decreases with an increase in proportion being `1' in the outcome. The probability of spuriousness at a configurational N threshold of 6 increases from .1 to .25 when the outcome distribution of `1s' increases from .1 to .9. As shown in the bottom-right plot in Figure 2, the ``complex'' solution is always more robust than the parsimonious solution, regardless of the outcome distribution. As shown in the Table 1, the effect is not significant. \begin{figure}[htb!] \begin{center} \label{diagram} \centerline{\includegraphics[scale=.45]{interaction_plots_nvar.png}} \vskip-1ex \caption{Predicted Interactions between Elements of Researcher Choice and Number of Causal Conditions} \end{center} \end{figure} Figure 3 shows the interactions between elements of researcher choice and the number of causal conditions used in the analysis. Generally, a larger number of causal conditions is predicted to have more spurious results. As the number of causal conditions increases, the effect of consistency score on spuriousness weakens. The opposite trend occurs when interacting configurational N threshold with the number of causal conditions -- the effect is much greater when using more conditions. Ostensibly, this is due to fewer configurations being included in the truth table analysis when the number of possible configurations increases. When the number of causal conditions is seven, there is a 60\% reduction in spuriousness when using a complex versus a parsimonious solution. At two causal conditions, however, the effect of using a complex versus parsimonious solution is negligible. \begin{figure}[htb!] \begin{center} \label{diagram} \centerline{\includegraphics[scale=.5]{interaction_plots_sam_size.png}} \vskip-1ex \caption{Predicted Interactions between Elements of Researcher Choice and Sample Size} \end{center} \end{figure} As Figure 4 shows, the effect of researcher choice varies the least when interacted with sample size. Table 1 shows significant effects for these interactions, the effect size is small compared to the interactions with outcome distribution and number of causal conditions. \subsection{Discussion: QCA Robustness} The results here show that the probabilistic checks set by the researcher in a QCA truth table analysis are effective in reducing the probability of a spurious result. However, they also show that the effectiveness of researcher-set parameters to ensure robust results vary according to the structure of the data. In some cases, consistency score alone will not effectively filter out random patterns, especially when the outcome is distributed such that all configurations have a high probability of having the same outcome value. In some cases, however, a high consistency score is not needed to ensure a robust result. The interaction effects above show that elements of researcher choice differed in their effectiveness at differing levels of number of causal conditions used. A high consistency score was more effective when using fewer causal conditions, while a high configurational N threshold was more effective at higher numbers of causal conditions. The difference between complex and parsimonious solutions was negligible at lower number of causal conditions, but represented a nearly four-fold increase in spuriousness -- from 25\% chance to 85\% chance -- when using seven causal conditions. These results show that the choices researchers make when conducting a truth table analysis of QCA data have a differential effect upon spuriousness according to variations of basic features of the data. The large variation of these effects, as well their complexity, justifies the need for a more straightforward approach to probabilistic assessments for QCA's truth table analysis. While it would be helpful to advise researchers on general practices for choosing a consistency score, a configurational N, and whether to use complex or parsimonious solution, the large variations in their effects according to features of the data used prevent the authors from doing so. In the section below, we present a method for providing a model-by-model estimate of spuriousness. This method has two functions: 1) to estimate the 'confidence level' of an existing QCA model; and 2) to provide a reasonable recommendation for setting the consistency score and configurational N thresholds to achieve a desired `confidence level.' We first generally describe the method; we then give an example of its application \section{The Bootstrapped Robustness Assessment for QCA} The Bootstrapped Robustness Assessment for QCA (baQCA) is a procedural check of a QCA result that takes into account data structure (e.g. marginal distribution of variables) and researcher choice (e.g. consistency score threshold) to provide an estimate of the probability of spuriousness for a given QCA result. Above, we show that the elements of researcher choice involved with ensuring robust QCA analysis of a truth table require vastly different thresholds according to the data structure. Identifying robust configurations would thus require taking into account the data structure. To build a robustness assessment while taking into account data structure, we first draw a random data set using the same data structure as a QCA result. This includes using 1) the same number of causal conditions as the observed QCA data set, 2) the marginal distributions of the causal conditions and dependent variable present in the QCA data, and 3) the sample size. We then run a QCA model matching 4) the consistency score threshold set by the researcher and 5) the configurational N threshold set by the researcher. After thousands of repetitions, we take the simple probability that QCA returned a configuration given those parameters. The inverse of this proportion can be interpreted as the confidence that the configuration returned in the QCA analysis is due to random chance. This interpretation is similar to the p-value used in regression analysis to determine the ``significance'' of a result. Software to run this assessment is available using the R software package baQCA. Although there is current work being done to test the robustness of QCA to randomness (\citealt{braumoeller_2015,braumoeller_2015data}), this method randomly samples the outcome, keeping the causal conditions fixed, and permutes configurations rather than individual variables. Though QCA is at base a ``configurational method,'' we think it makes more sense to permute values of variables independent of other variables, rather than treating combinations of values for causal conditions as inextricably linked at predefined rates. Specifically, we argue that Braumoeller's focus on consistency score threshold as the primary check to prevent spurious results is inadequate, given our finding that the configurational N threshold is the much more powerful check. Though his method implicitly takes into account configurational N thresholds by including counts of configurations in his permutation model, these counts can vary considerably when variables are treated as independently sampled. Importantly, baQCA allows us to vary configurational N thresholds via independent random sampling of variables, and allows us to calculate how changes in configurational N threshold affect spuriousness. The idea behind this strategy is to protect the researcher from spurious results by estimating the probability of spuriousness given any random data. By repeatedly sampling random data over thousands of iterations, we are in effect directly observing this probability. When a 95\% confidence interval of the mean is calculated on a ``random'' variable, we conclude with 95\% confidence that the interval covers the true value of the mean. Our strategy identifies the probability that an application of QCA, with the exact data structure and parameters of researcher choice, would, with some level of confidence, return a result given completely random data. If this confidence level is low, the researcher should be cautious; when this confidence level is high, the researcher can conclude with confidence that the result is unlikely due to random chance, and is robust to a direct comparison with random data. \subsection{baQCA in Practice} This section outlines the step-by-step procedure of two methods for determining the probability that a given QCA application returns a spurious result. First, the Bootstrapped Assessment for QCA (baQCA) can be applied with a few steps: \begin{enumerate} \item `Fit' a QCA model with $v$ causal conditions and $n$ number of cases. \item Simulate 2000 random data sets, each with $v$ causal conditions and size $n$. Each causal condition and the outcome has the same distributions as the observed data, respectively. \item Apply QCA to all the generated data sets, matching the elements of researcher choice specified in the observed model (configurational N, consistency score, etc.). Record whether each QCA returned a spurious result. We chose 2000 to be the number of simulations using convergence diagnostics from \cite{gelman_and_rubin_1992}. \item Take the simple proportion of times the QCA returned a configuration: \begin{center} \[ \frac{R}{2000} \] {\it{Where $R$ = the number of times a QCA model returned a result from a randomly generated data set.}} \end{center} \item We use bootstrapped standard errors for a measure of uncertainty (\citealt{efron_and_tibshirani_1994}). We resample, with replacement, the vector of counts that sum to $R$. We chose 1000 resamples using convergence diagnostics from \citet{gelman_and_rubin_1992}. We then take 95\% quantiles of $\frac{R}{2000}$ for our confidence interval. \end{enumerate} The resulting scalar, and its interval, is the 95\% confidence interval of the probability that the QCA application would return a random result. A useful, related tool is the {\it{recommendation}} of a consistency score/configurational N threshold given the data, without having fit a QCA model at all. To achieve this recommendation, we follow a similar trajectory: \begin{enumerate} \item Simulate 2000 random data sets, each with $v$ causal conditions and size $n$. Each causal condition and the outcome has the same distributions as the observed data, respectively. \item Apply QCA to all the generated data sets, matching systematically varying parameters of researcher choice (configurational N, consistency score, etc.). Record whether each QCA returned a spurious result. Again, we chose 2000 simulations based on \cite{gelman_and_rubin_1992} convergence diagnostics. \item We apply a logistic regression model to the results, using the configurational N and consistency score thresholds as predictors. \item We use this model to provide fitted values, calculating the minimum consistency score needed at every configurational N threshold to achieve a desired ``level of confidence.'' \item We use the standard errors provided in the regression model to provide a confidence interval around each recommendation. \end{enumerate} Below, we provide a case study where reasonable thresholds were not quite enough to ensure good results, and where baQCA could be of service to suggest specific thresholds to ensure robustness. \subsection{Qualitative Comparative Analysis of Tea Party Rallies in Florida} In an application of this technique, we use a subset of data constructed by \citet{mcveigh_et_al_2014a} as part of their project on the emergence of Tea Party organizations in U.S. counties. The data set includes several county-level measures, including demographic measures from the American Community Survey (ACS) 2005-2009 (\citealt{acs_2009}), measures of religious adherence from the Association of Religion Data Archives (ARDA) 2001, 2008 Presidential election measures from Congressional Quarterly's {\it{America Votes}}, and the number of Tea Party organizations between 2009 and 2010 from the Institute for Research \& Education on Human Rights ((\citealt{irehr_2011})). We extend the data set to include the a new outcome variable, the number of rallies in each county between 2009 and 2010, also from IREHR. We restrict the data set to counties in Florida for two reasons based on our own case knowledge (\citealt{ragin_2008}). First, we choose Florida counties because, with the exception of California, all other states had fewer numbers of organizations. Second, and substantively important for the choice of causal conditions, we choose Florida due to the perceived impact the Tea Party movement had in the 2010 midterm election (\citealt{miller_and_walling_2012}). Restricting the data to counties in Florida leaves us with 67 cases for analysis (see Figure 5). Our analysis addresses the multiple causal pathways that lead to the occurrence of one or more Tea Party rallies in a Florida county. \begin{figure}[htb!] \begin{center} \includegraphics[scale=.75]{florida_rallies_2.png} \vskip-1ex \caption{Tea Party Rallies in Florida Counties. {\it{Note: Grey indicates at least one rally in county.}}} \label{diagram} \end{center} \end{figure} Qualitative Comparative Analysis arguments are combinational and often overlapping, and a researcher's causal conditions require a deep knowledge of cases in the data set for adequate placement within particular sets of causal conditions (\citealt{ragin_2008}). For example, to fully belong to a crisp outcome set, a Florida county must meet or exceed a minimum criterion. Therefore, it is necessary to both establish adequate causal conditions and an inclusionary criteria for each condition. Some have argued that because these criteria are based on researcher selection, criteria are biased (\citealt{lieberson_2004}), which can lead some to believe that a researcher has cherry-picked their analyses. To combat this assumption, and for the sake of clarity, we employ a simple inclusionary-exclusionary criterion for membership in a causal condition (outlined below) for the analysis. It is important to note that for many causal conditions, we dichotomize on the mean. Because QCA is designed to allow the researcher to be in dialogue between results and the cases and to recalibrate, it is generally considered bad practice to create inclusionary-exclusionary criteria in this way. We do so as a pedagogical exercise for the baQCA method and not as a manner with which to employ QCA. Research on the Tea Party movement finds that while most of their organizations were concentrated in conservative partisan environments (\citealt{mcveigh_et_al_2014a,skocpol_and_williamson_2012}), much of their on-the-ground rally activity took place in heavily populated, left-leaning locales (\citealt{skocpol_and_williamson_2012,zernike_2010}). Research on Tea Party organizations has demonstrated the importance of educational background on support for the Tea Party (\citealt{mcveigh_et_al_2014a,skocpol_and_williamson_2012}), finding that supporters of the Tea Party movement are highly educated, and that Tea Party organizations were more likely to be established in U.S. counties characterized by a predominance of college graduates. Although supporters of the Tea Party movement tended to be relatively impervious to the economic recession of 2008 (\citealt{skocpol_and_williamson_2012,parker_and_barreto_2013}), many of the movement's grievances consisted of dismay about unemployment and the expanding reach of federal government, through a series of redistributive policies designed to remedy the economic situation (\citealt{skocpol_and_williamson_2012,mcveigh_et_al_2014a,parker_and_barreto_2013}). Scholars show that while much support for the Tea Party movement came from Protestants, these supporters were not of the Evangelical bent as was depicted by media (\citealt{zernike_2010,skocpol_and_williamson_2012,mcveigh_et_al_2014a}). Finally, \citet{parker_and_barreto_2013} argue that support for the movement derived from racial backlash against the nation's first black President, as well as fears that Barack Obama would initiate policies that would favor blacks. The size of the black population has two possible effects on support for the Tea Party. First, blacks pose a pose a potential threat in places where the black population is large because their predominance might encourage redistributive action by the Obama administration. Secondly, because rallies were much more likely to take place in left-leaning, densely-populated areas, these locales are also much more likely to have larger black populations. The brief summary of extant research on the Tea Party provides insight into creating causal arguments about the presence of Tea Party rallies as a test of QCA and the baQCA method. Importantly, because the analysis here employs crisp-set QCA, each causal condition is coded as either one or zero. As previously mentioned, the outcome variable is Tea Party RALLIES. Full placement in the outcome set (1) requires that a county has at least one rally. In sum, there are 19 cases that have the outcome. Given the differential relationship between Republican partisan contexts and the presence organizations and the occurrence of rallies, we include the measure REPUBLICAN. This is coded as one if, during the 2008 Presidential Election, the Republican candidate received a majority of the votes in the Florida county. Based on the above literature, we expect the absence of (negation of) Republican context as an important component of a causal pathway to Tea Party rallies. We also include four causal conditions in which full inclusion is defined in a straightforward manner: full membership in the causal set (1) is determined by whether a value for a particular case falls at or above the mean for that variable. First, we include a measure of COLLEGE educated, the percentage of people in the county (aged 25 or above) who hold a Bachelor's degree. Second, we include a measure of UNEMPLOYMENT, measured as the percent of the county population which is unemployed. With regard to membership in the college educated set, we expect that the presence of a college educated population is an important component of the pathway to rallies. However, given that many Tea Party supporters were not actually unemployed (although the movement's rhetoric says otherwise), we expect that the absence of a high unemployed population is an important part of explaining Tea Party rallies. Third, we include a measure for the size of the BLACK population, measured as the percentage of African-Americans in the county. Fourth, we include a measure for the size of the EVANGELICAL population, measure as the percentage of Evangelical adherents in the Florida county. In QCA, the logical representation of the presence of a causal condition is indicated by the variable name in all upper-case letters whereas negation is represented by all lower-case letters. Combinations of conditions (e.g. complex combinations of variables) in a pathway or recipe to an outcome are expressed as a string of variable names delineated by an asterisk, representing the logical operator ``AND.'' If multiple pathways exist, each pathway is delineated by a plus symbol, the logical operator for ``OR.'' Therefore, our main expectation, expressed in QCA notation, is: \begin{center} republican * COLLEGE * unemployment * BLACK * evangelical \end{center} In this analysis, there are a total of 32 possible pathways to the outcome, based on the five ($K$) causal conditions ($2^K = 2^5 = 32$). Before applying the baQCA method, we calculate Tea Party rally solutions based on plausible researcher preferences. In this test case, we use a default sufficiency inclusion or consistency score of .85 (the minimum proportion of cases explained by a causal configuration) and a default configurational N threshold of 1.0 (the minimum number of cases allowed for a particular configuration). The results in Table 2 indicate that only three configurations or combinations explain the presence of Tea Party rallies in Florida counties. Overall coverage for the three configurations is 47.4\%, with only BLACK appearing in each. The presence or absence of REPUBLICAN, COLLEGE, UNEMPLOYMENT, and EVANGELICAL appear in various combinations, known as ``insufficient but necessary components of causal combinations that are unnecessary but sufficient for the outcome'' (\citealt{mackie_1980,ragin_1987}). \begin{table}[h] \begin{center} \caption{QCA Results for Florida Tea Party Rallies} \label{tab:title} \begin{tabular}{ >{$}l<{$} >{$}c<{$} >{$}c<{$} >{$}c<{$}} \text{Solutions} & & \text{Consistency} & \text{Coverage} \\ \hline \hline & & & \\ \text{COLLEGE * unemployment * BLACK * EVANGELICAL} & & 100.0\% & 10.5\% \\ \text{republican * COLLEGE * unemployment * BLACK} & & 100.0\% & 36.8\% \\ \text{republican * college * UNEMPLOYMENT * BLACK * evangelical} & & 100.0\% & 5.3\% \\ & & & \\ \hline \end{tabular} \end{center} \end{table} \subsection{Application of the Bootstrapped Robustness Assessment} As previously mentioned, using a high consistency score or altering the minimum number of cases for a solution is not enough to ensure the final configurations are non-spurious. To assess spuriousness in the current set of solutions, we apply the baQCA method, which yields a probability of randomness score; we also use the related irQCA method that suggests alternative consistency and configurational N thresholds, with significance values, for yielding a non-spurious set of solutions. Application of the baQCA method shows that causal configurations have a high probability of being random. In fact, of the simulated data sets, nearly 95 percent yielded a random result. The irQCA method suggests configurational N and consistency thresholds that would yield a non-spurious, ``significant'' result. The output is depicted in graphical form below. As shown and described above, to combat spuriousness in QCA, the researcher {\it{should}} select a high consistency threshold. In addition, the researcher should use their knowledge of the solutions and causal conditions to select an appropriate configurational N threshold. As shown in Figure 6, in all graphs except the bottom-right (p=.001) all suggested consistency thresholds reach or exceed .9. In addition, for these significance levels, the configurational N threshold ranges from three to five. Here, we use the smallest configurational N threshold, but the results are similar when using configurational N thresholds of three, four, and five. While it is possible to decrease the consistency score threshold and the configurational N threshold to yield additional configurations, these solutions would only cover one or two cases. Building configurations around one or two cases, instead of a medium-n set of cases, introduces randomness into the set of causal solutions and does not aid a researcher in developing substantive theory about the conditions that produce an outcome. \begin{figure}[htb!] \begin{center} \includegraphics[scale=.75]{plot_florida_thresholds2.png} \vskip-1ex \caption{Suggested Consistency and configurational N Thresholds by Desired Significance Level} \label{diagram} \end{center} \end{figure} The selection of a minimum of three cases per solution, and 90 percent consistency results in one solution. This result is shown in Table 3 below. We can see that the result is exactly as expected by the literature above. Tea Party rallies were present in counties that were non-Republican, and had larger populations of college graduates and blacks, in combination with low levels of both unemployment and Evangelical adherents. This result is non-spurious at the .01 level. \begin{table}[h] \caption{QCA Results for Florida Tea Party Rallies, After Applying baQCA} \label{tab:title} \begin{center} \begin{tabular}{ >{$}l<{$} >{$}c<{$} >{$}c<{$} >{$}c<{$}} \text{Solutions} & & \text{Consistency} & \text{Coverage} \\ \hline \hline & & & \\ \text{republican * COLLEGE * unemployment * BLACK * evangelical} & & 100.0\% & 31.6\% \\ & & & \\ \hline \end{tabular} \end{center} \end{table} While the overall solution coverage decreased after applying baQCA, the subsequent set of solutions were less prone to randomness (checked by reapplying the baQCA method). The more robust configuration is a subset of the less robust configuration, suggesting a simpler solution that excludes from analysis the rows of the truth table that have high probability of spuriousness. Though it has been suggested to remove rows of the truth table with low coverage in general, this test provides a systematic way of doing so. As exhibited in Table 4, applying the thresholds recommended by the irQCA method improves our solutions. We are thus highly confident that the result returned by the QCA analysis is not due to randomness. \begin{table}[h] \caption{QCA Results for Florida Tea Party Rallies, Difference by baQCA Application} \label{tab:title} \begin{center} \begin{tabular}{ >{$}l<{$} >{$}c<{$} >{$}c<{$}} \text{Solutions} & \text{Probability of Randomness} & 95\% \text{Confidence Interval} \\ \hline \hline & & \\ \text{Solution Set, before baQCA} & 0.9445 & 0.9360 \hspace{30pt} 0.9530 \\ \text{Solution Set, after baQCA} & 0.0635 & 0.0550 \hspace{30pt} 0.0730 \\ & & \\ \hline \end{tabular} \end{center} \end{table} \subsection{Discussion: baQCA Results} The case above shows that a high consistency score threshold alone was not sufficient to prevent spuriousness from taking place. By increasing the configurational N threshold, we are able to greatly reduce the probability of spuriousness of the QCA result. In this case, the original consistency score was too conservative; the same level of significant is achieved by using a .9 consistency score threshold rather than 1. By estimating the probability of randomness via a direct comparison with random data, we are able to 1) estimate what thresholds are reasonable to achieve certain significance levels and 2) determine the probability of randomness of a QCA result. \section{Conclusion and General Recommendations} Though intuitive similarities between the Bootstrapped Assessment and p-values are obvious, we do not recommend using the same standard for QCA's truth table analysis as what is found in most p-value assessments (i.e. 95\% to 99\% confidence). The Bootstrapped Assessment, though a quantitative assessment of spuriousness, should be used to better inform the researcher about the conclusions drawn from the data rather than used as a black-and-white threshold of significance. This is to notify the researcher of whether the final result has an extremely high probability of including spurious configurations. If the method concludes that a QCA result is not robust to randomness, the researcher may need to more clearly articulate how the QCA results hold up, and are not due to random chance, based on their own case-oriented knowledge and analysis. Though QCA has been heavily criticized for not being robust to randomness, this simple assessment could help provide a systematic test of QCA against randomness. As we have shown, QCA can be robust to randomness using existing checks, but the ability of these checks to sufficiently protect against spuriousness differs according to data structure. We present a method that measures the confidence that a given QCA result is due to random chance, which provides information above and beyond the current robustness checks. Ideally, the Bootstrapped Robustness Assessment could be used as a standard assessment for QCA that provides precise recommendations for researcher choice. \pagebreak{} \bibliographystyle{asa_new}
{'timestamp': '2016-06-17T02:02:42', 'yymm': '1606', 'arxiv_id': '1606.05000', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05000'}
arxiv
\section{Introduction} GitHub is the world's largest collection of open source software, with around 9 million users and 17 million public repositories.\footnote{https://github.com/search/advanced, verified on 04/04/2016} In addition to a {\tt git}-based version control system, GitHub integrates many features for social coding. For example, developers can \emph{fork} their own copy of a repository, work and improve the code locally, and then submit a \emph{pull request} to integrate their changes in the main repository. The key characteristics and challenges of this pull-based development model is recently explored in many studies~\cite{gousios2014exploratory, Gousios2015, Yu2015, GSB16}. However, GitHub also supports other typical features from social networks. For example, users can \emph{star} a repository to manifest their interest or satisfaction with the hosted project. Consequently, the number of stars of a GitHub repository can be seen as a proxy of its popularity. Currently, the two most popular repositories on GitHub are {\sc FreeCodeCamp/FreeCodeCamp} (a coding education software, which claims to have more than 300K users\footnote{https://www.freecodecamp.com/about, verified on 04/04/2016}) and {\sc twbs/bootstrap} (a library of HTML and CSS templates, which is used by almost 7M web sites\footnote{http://trends.builtwith.com/docinfo/Twitter-Bootstrap, verified 04/04/2016}). A deep understanding of the factors that impact the number of stars of GitHub repositories is important to software developers because they want to know whether their systems are attracting new users, whether the new releases are gaining acceptance, whether their systems are as popular as competitor systems, etc. Unfortunately, we have few studies about the popularity of GitHub systems. The exceptions are probably an attempt to differentiate popular and unpopular Python repositories using machine learning techniques~\cite{Weber2014} and a study on the effect of project's popularity on documentation quality~\cite{Aggarwal2014}. By contrast, popularity is extensively studied on other social platforms, like YouTube~\cite{Ahmed2013, Figueiredo2014} and Twitter~\cite{Lehmann2012, ma2013predicting}. These studies are mainly conducted to guide content generators on producing successful social media content. Similarly, knowledge on software popularity might also provide valuable insights on how to build and evolve systems in a competitive market. This paper presents an in-depth investigation on the popularity of GitHub repositories. We first collected historical data about the number of stars of 2,500 popular repositories. We use this dataset to answer four research questions:\\[-.3cm] \noindent \emph{RQ \#1: How popularity varies per programming language, application domain, and repository owner?} The goal is to provide an initial view about the popularity of the studied systems, by comparing the number of stars according to programming language, application domain, and repository owner (user or organization).\\[-.3cm] \noindent \emph{RQ \#2: Does popularity correlate with other characteristics of a repository, like age, number of commits, number of contributors, and number of forks?} This investigation is important to check whether there are factors that can be worked to increase a project's popularity.\\[-.3cm] \noindent \emph{RQ \#3: How early do repositories get popular?} With this research question, we intend to check whether gains of popularity are concentrated in specific phases of a repository's lifetime, specifically in early releases.\\[-.3cm] \noindent \emph{RQ \#4: What is the impact of new features on popularity?} This investigation can show if relevant gains in popularity happen due to new features (implemented in new releases).\\[-.3cm] In the second part of the paper, we identify four patterns of popularity growth in GitHub, which are derived after clustering the time series that describe the growth of the number of stars of the systems in our dataset. These patterns can help developers to understand how their systems have grown in the past and to predict future growth trends. Finally, in the third part of the paper, we present a qualitative study with GitHub developers to clarify some findings and themes of our study. A total of 44 developers participated to the study. The main contribution of this paper is an investigation of factors that may impact the popularity of GitHub repositories, including the identification of the major patterns that can be used to describe popularity trends. Although similar studies exist for social networks, to our knowledge we are the first to focus on the popularity of systems hosted in an ultra-large repository of open source code.\\[-.2cm] \noindent \emph{Organization:} The rest of this paper is organized as follows. Section~\ref{sec:dataset} describes and characterizes the dataset used in this study. Section~\ref{sec:results} uses this dataset to provide answers to four questions about the popularity of GitHub repositories. Section~\ref{sec-patterns} documents four patterns that describe the popularity growth of GitHub systems. Section~\ref{sec:survey} reports the feedback of GitHub developers about three specific themes of our study. Section~\ref{sec:threats} discusses threats to validity and Section~\ref{sec:related-work} presents related work. Finally, Section~\ref{sec-conclusion} concludes the paper and lists future work. \section{Dataset} \label{sec:dataset} The dataset used in this paper includes the top-2,500 public repositories with more stars in GitHub. We limit the study to 2,500 repositories for two major reasons. First, to focus on the characteristics of the highly popular GitHub systems. Second, because we investigate the impact of application domain on popularity, which demands a manual classification of the domain of each system. All data was obtained using the GitHub API, which provides services to search public repositories and to retrieve specific data about them (e.g., stars, commits, contributors, and forks). The data was collected on March 28th, 2016. Besides retrieving the number of stars on this date for each system, we also relied on GitHub API to collect historical data about the number of stars. For this purpose, we used a service from the API that returns all star events of a given repository. For each star, these events store the date and the user who starred the repository. However, GitHub API returns at most 100 events by request (i.e., a page) and at most 400 pages. For this reason, it is not possible to retrieve all stars events of systems with more than 40K stars, as is the case of {\sc FreeCodeCamp}, {\sc Bootstrap}, {\sc AngularJS}, {\sc D3}, and {\sc Font-Awesome}. Therefore, these five systems are not considered when answering the third and fourth research questions (that depend on historical data) and also on the study about common growth patterns (Section~\ref{sec-patterns}). Table~\ref{tab:top10-repositories-statistics} shows descriptive statistics on the number of stars of the repositories in our dataset. The number of stars ranges from 2,150 (for {\sc CyberAgent/android-gpuimage}) to 97,948 stars (for {\sc FreeCodeCamp/FreeCodeCamp}). The median number of stars is 3,441.\\[-.25cm] \begin{table}[!ht] \centering \caption{Descriptive statistics on the number of stars of the repositories in our dataset of 2,500 popular GitHub systems} \label{tab:top10-repositories-statistics} \begin{tabular}{@{}ccccc@{}} \toprule Min & 1st Quartile & 2nd Quartile & 3rd Quartile & Max \\ \midrule 2,150 & 2,682 & 3,441 & 5,331 & 97,948 \\ \bottomrule \end{tabular} \end{table} \noindent \emph{Age, Commits, Contributors, and Forks:} Figure~\ref{fig:dataset-info} shows the distribution of the age (in number of weeks), number of commits, number of contributors, and number of forks for the 2,500 systems in the dataset. For age, the first, second, and third quartiles are 101, 169, and 250 weeks, respectively. For number of commits, the first, second, and third quartiles are 228, 608, and 1,721, respectively. For number of contributors, the first, second, and third quartiles are 17, 41, and 96, respectively;\footnote{We report data from contributors as retrieved by GitHub API. This data may be different from the one presented on the project's page at GitHub, which only counts contributors with GitHub account.} and for number of forks, the first, second, and third quartiles are 298, 533, and 1,045, respectively. Therefore, the systems in our dataset are mature and have many commits and contributors.\\[-.25cm] \begin{figure}[!h] \centering \begin{subfigure}[t]{0.45\columnwidth} \includegraphics[width=.9\columnwidth,trim={0 2em 0 0},clip]{images2/dataset/age-overview.pdf} \caption{Age (weeks)} \label{fig:age-overview} \end{subfigure}% \begin{subfigure}[t]{0.45\columnwidth} \includegraphics[width=.9\columnwidth,trim={0 2em 0 0},clip]{images2/dataset/commits-overview.pdf} \caption{Commits} \label{fig:commits-overview} \end{subfigure} \begin{subfigure}[t]{0.45\columnwidth} \includegraphics[width=.9\columnwidth,trim={0 2em 0 0},clip]{images2/dataset/contributors-overview.pdf} \caption{Contributors} \label{fig:size-overview} \end{subfigure}% \begin{subfigure}[t]{0.45\columnwidth} \includegraphics[width=.9\columnwidth,trim={0 2em 0 0},clip]{images2/dataset/forks-overview.pdf} \caption{Forks} \label{fig:forks-overview} \end{subfigure} \caption{Age, number of commits, number of contributors, and number of Forks (outliers are omitted)} \label{fig:dataset-info} \end{figure} \noindent\emph{Programming Language:} As returned by GitHub API, the language of a repository is the one with the highest percentage of source code, considering the files in the repository. Figure~\ref{fig:stars-overview2} shows the distribution of the systems per programming language. JavaScript is the most popular language (855 repositories, 34.2\%), followed by Python (203 repositories, 8.1\%), Java (202 repositories, 8.0\%), Objective-C (188 repositories, 7.5\%), and Ruby (178 repositories, 7.1\%). Despite a concentration of systems in these languages, the dataset includes systems in 53 languages, including Groovy, R, Julia, and XSLT (all with just one repository).\\[-.25cm] \begin{figure}[!h] \centering \includegraphics[width=1\columnwidth, trim={0 1em 0 4em}, clip]{images2/dataset/repositories-by-language.pdf} \caption{Top-10 languages by number of repositories} \label{fig:stars-overview2} \end{figure} \noindent\emph{Owner:} We also provide results grouped by repository owner. In GitHub, a repository can be owned by a user (e.g.,~{\sc torvalds/linux}) or by an organization (e.g.,~{\sc facebook/react}). In our dataset, 1,263 repositories (50.5\%) are owed by organizations and 1,237 repositories (49.5\%) by users.\\[-.25cm] \noindent\emph{Application Domain:} In the study reported in this paper, results are also grouped by application domain. However, different from other source code repositories, like SourceForge, GitHub does not include information about the application domain of a project. For this reason, we manually classified the domain of each system in our dataset. Initially, the first and third authors of this paper inspected the description of the top-200 repositories to provide a first list of application domains. After this initial classification, the first author inspected the short description (and in many cases the GitHub page and the project's page) of the remaining 2,300 repositories. During this process, he also marked the repositories with dubious classification decisions. These particular cases were discussed by the first and second authors, to reach a consensus decision. The spreadsheet with the proposed classification is publicly available at https://goo.gl/73Sbvz. The systems are classified in the following six domains: \begin{itemize} \item Application software: systems that provide functionalities to end-users, like browsers and text editors (e.g.,~{\sc WordPress/WordPress} and {\sc adobe/brackets}). \item System software: systems that provide services and infrastructure to other systems, like operating systems, middleware, servers, and databases (e.g.,~{\sc torvalds/linux} and {\sc mongodb/mongo}). \item Web libraries and frameworks (e.g.,~{\sc twbs/bootstrap} and {\sc angular/angular.js}). \item Non-web libraries and frameworks (e.g.,~{\sc google/guava} and {\sc facebook/fresco}). \item Software tools: systems that support software development tasks, like IDEs, package managers, and compilers (e.g.,~{\sc Homebrew/homebrew} and {\sc git/git}). \item Documentation: repositories with documentation, tutorials, source code examples, etc. (e.g.,~{\sc iluwatar/java-design-patterns}). \end{itemize} Figure~\ref{fig:domains-dist} shows the number of systems in each domain. The top-3 domains are web libraries and frameworks (837 repositories, 33\%), non-web libraries and frameworks (641 repositories, 25\%), and software tools (470 repositories, 18\%). \begin{figure}[!h] \centering \includegraphics[width=.8\columnwidth, trim={0 0 0 3em}, clip]{images2/dataset/categories.pdf} \caption{Number of repositories by domain} \label{fig:domains-dist} \end{figure} \section{Results} \label{sec:results} In this section, we use the described dataset to answer the four research questions listed in the paper's introduction. \vspace{1em}\noindent\emph{\textbf{RQ \#1}: How popularity varies per programming language, application domain, and repository owner?}\vspace{0.5em} \label{sub:results:rq2} Figure~\ref{fig:language-popularity} shows the distribution of the number of stars for the top-10 languages with more repositories. The top-3 languages whose repositories have the highest median number of stars are: JavaScript (3,697 stars), Go (3,549 stars), and HTML (3,513 stars). The three languages whose repositories have the lowest median number of stars are PHP (3,245 stars), Java (3,224 stars), and Python (3,099 stars). By applying the Kruskal-Wallis test to compare multiple samples, we find that the distribution of the number of stars per language is different (\emph{p-value} $=$ 0.001). Thus, we can consider that programming language may impact on system popularity. \begin{figure}[!h] \centering \includegraphics[width=.95\columnwidth, trim={0 0 0 2em}, clip]{images2/dataset/popularity-by-language.pdf} \caption{Stars by programming language (considering only the top-10 languages with more repositories)} \label{fig:language-popularity} \end{figure} Figure~\ref{fig:domains-popularity} shows the distribution of the number of stars for the repositories in each application domain. The median number of stars varies as follow: systems software (3,807 stars), web libraries and frameworks (3,596 stars), documentation (3,547 stars), software tools (3,538 stars), applications (3,443 stars), and now-web libraries and frameworks (3,204 stars). By applying the Kruskal-Wallis test, we find that the distribution of the number of stars by domain is different (\emph{p-value} $<$ 0.001). Therefore, application domain is also an important factor that may impact on system popularity. \\[-0.3cm] \begin{figure}[!h] \centering \includegraphics[width=.95\columnwidth, trim={0 0 0 1em}, clip]{images2/dataset/categories_popularity.pdf} \caption{Popularity by application domain} \label{fig:domains-popularity} \end{figure} Finally, Figure~\ref{fig:owner-popularity} shows how popularity varies depending on the repository owner (i.e., user or organization). The median number of stars is 3,622 stars for repositories owned by organizations and 3,298 stars for repositories owned by users. By applying the Mann-Whitney test, we detect that indeed these distributions are different (\emph{p-value} $<$ 0.001). We hypothesize that repositories owned by organizations---specially major software companies and free software foundations---have more funding and resources, which somehow explains their higher popularity. \\[-0.3cm] \begin{figure}[!ht] \centering \includegraphics[width=.65\columnwidth, trim={0 0 0 2.5em}, clip]{images2/dataset/owner-type-popularity.pdf} \caption{Popularity by repository owner} \label{fig:owner-popularity} \end{figure} \noindent{\em Summary: The top-5 languages with more stars are JavaScript, Python, Java, Objective-C, and Ruby (Figure~\ref{fig:stars-overview2}). However, the top-5 languages whose systems have the highest median number of stars are JavaScript, Go, HTML, CSS, and C (Figure~\ref{fig:language-popularity}). The top-3 application domains whose repositories have more stars are systems software, web libraries and frameworks, and documentation. Repositories owned by organizations are more popular than the ones owned by individuals.} \begin{figure*}[!t] \centering \begin{subfigure}[b]{0.25\textwidth} \includegraphics[width=\linewidth, trim={0 1em 0 4.5em}, clip]{images2/dataset/age-vs-stars.pdf} \caption{Age vs Stars} \label{fig:age-vs-stars} \end{subfigure}% \begin{subfigure}[b]{0.25\textwidth} \includegraphics[width=\linewidth, trim={0 1em 0 4.5em}, clip]{images2/dataset/commits-vs-stars.pdf} \caption{Commits vs Stars} \label{fig:commits-vs-stars} \end{subfigure}% \begin{subfigure}[b]{0.25\textwidth} \includegraphics[width=\linewidth, trim={0 1em 0 4.5em}, clip]{images2/dataset/contributors-vs-stars.pdf} \caption{Contributors vs Stars} \label{fig:contributors-vs-stars} \end{subfigure}% \begin{subfigure}[b]{0.25\textwidth} \includegraphics[width=\linewidth, trim={0 1em 0 4.5em}, clip]{images2/dataset/forks-vs-stars.pdf} \caption{Forks vs Stars} \label{fig:forks-vs-stars} \end{subfigure} \caption{Correlation analysis. In subfigures (c) and (d), the line is the identity relation} \label{fig:correlations} \end{figure*} \vspace{1em}\noindent\emph{\textbf{RQ \#2}: Does popularity correlate with repository's age, number of commits, number of contributors, and number of forks?}\vspace{0.5em} \label{sub:results:rq3} Figure~\ref{fig:correlations} shows scatterplots correlating the number of stars with the age (in number of weeks), number of commits, number of contributors, and number of forks of a repository. First, the plots suggest that stars are not correlated with the repository's age (Figure~\ref{fig:age-vs-stars}). We have old repositories with few stars and new repositories with many stars. For example, {\sc apple/swift} has only five months and 28,105 stars, while {\sc mojombo/chronic} has more than 8 years and 2,440 stars. Essentially, this result shows that repositories gain stars at different speeds. We ran Spearman's rank correlation test and the resulting correlation coefficient is close to zero ($rho$ $=$ 0.0757 and \emph{p-value} $<$ 0.001). The scatterplot in Figure~\ref{fig:commits-vs-stars} suggests that stars are weakly correlated with number of commits ($rho$ $=$ 0.249 with \emph{p-value} $<$ 0.001). Similarly, as presented in Figure~\ref{fig:contributors-vs-stars} stars are weakly correlated with contributors ($rho$ $=$ 0.341 with \emph{p-value} $<$ 0.001). In this figure, a logarithm scale is used in both axes; the line represents the identity relation: below the line are the systems with more contributors than stars. Interestingly, two systems indeed have more contributors than stars: {\sc raspberrypi/linux} (17,766 contributors and 2,739 stars) and {\sc Linuxbrew/linuxbrew} (7,304 contributors and 2,241 stars). This happens because they are forks of highly successful repositories ({\sc torvalds/linux} and {\sc Homebrew/brew}, respectively). The top-3 systems with more stars per contributor are {\sc shadowsocks/shadowsocks} (12,287 stars/contributor), {\sc octocat/Spoon-Knife} (9,944 stars/contributor), and {\sc wg/wrk} (7,923 stars/contributor). All these systems have just one contributor. The three systems with less stars per contributor are {\sc android/platform\_frameworks\_base} (2.28 stars/contributor), {\sc FFmpeg/FFmpeg} (2.39 stars/contributor), and {\sc DefinitelyTyped/DefinitelyTyped} (2.68 stars/ contributor). Finally, Figure~\ref{fig:forks-vs-stars} shows plots correlating a system popularity and its number of forks. As visually suggested by the figure, there is a strong positive correlation between stars and forks ($rho$ $=$ 0.549 and \emph{p-value} $<$ 0.001). For example, {\sc twbs/bootstrap} is the second repository with the highest number of stars and the second one with more forks. {\sc angular/angular.js} is the third repository in number of stars and the third one with more forks. In Figure~\ref{fig:forks-vs-stars}, we can also see that only nine systems (0.36\%) have more forks than stars. As examples, we have a repository that just provides a tutorial for forking a repository ({\sc octocat/SpoonKnife}) and a popular puzzle game ({\sc gabrielecirulli/2048}), whose success motivated many forks with variations of the original implementation. Since the game can be downloaded directly from the web, we hypothesize that it receives most users' feedback in the web and not on GitHub. \\[-0.1cm] \noindent {\em Summary: There is no correlation between numbers of stars and the repository's age; however, there is a weak correlation with commits and contributors. Moreover, a strong correlation with forks was found.}\\[-0.2cm] \vspace{1em}\noindent\emph{\textbf{RQ \#3}: How early do repositories get popular?}\vspace{1em} \label{sub:results:rq4} Figure~\ref{fig:cdf} shows the cumulative distribution of the fraction of time a repository takes to receive at least 10\%, at least 50\%, and at least 90\% of its stars. Specifically, the y-axis shows the fraction of repositories that achieved 10\%, 50\%, and 90\% of their stars in a period of time that does not exceed the fraction of time shown in the x-axis. Around 40\% of the repositories receive 10\% of their stars very early, in the first days after the initial release (label A, in Figure~\ref{fig:cdf}). We hypothesize that many of these initial stars come from early adopters, who start commenting and using novel open source software immediately after they are out. After this initial burst of popularity, the growth of half of the repositories tend to stabilize. For example, half of the repositories take 51\% of their age to receive 50\% of their stars (label B); and half of the repositories take 91\% of their age to receive 90\% of their total number of stars (label C). \\[-0.1cm] \begin{figure}[!ht] \centering \includegraphics[width=0.85\columnwidth, page=1, trim={0 0 0 2.5em}, clip]{images2/cumulative/cumulative-analysis.pdf} \caption{Cumulative distribution of the fraction of time a repository takes to receive 10\%, 50\%, and 90\% of its stars} \label{fig:cdf} \end{figure} {\noindent {\em Summary: Repositories have a tendency to receive more stars right after their first public release. After this period, for half of the repositories the growth rate tends to stabilize.} \vspace{1em}\noindent\emph{\textbf{RQ \#4}: What is the impact of new features on popularity?}\vspace{1em} \label{sub:results:rq5} In this research question, we investigate the impact of new features on the popularity of GitHub repositories. The goal is to check whether the implementation of new features (resulting in new releases of the projects) contribute to a boost in popularity. Specifically, we selected 834 repositories from our dataset (33.3\%) that follow a semantic versioning convention to number releases.\footnote{http://semver.org} In such systems, versions are identified by three integers, in the format $x.y.z$, with the following semantics: increments in ${x}$ denote major releases, which can be incompatible with old versions; increments in $y$ denote minor releases, which add functionality in a backwards-compatible manner; and increments in $z$ denote patches implementing bug fixes. In our sample, we identified 580 major releases and 4,343 minor releases. First, we counted the fraction of stars received by each repository in the week following all releases (major or minor) and just after major releases. As mentioned, the goal is to check the impact of new releases in the number of stars. Figure~\ref{fig:releases1} shows the distribution of these fractions. When considering all releases, the fraction of stars gained in the first week after the releases is 1.1\% (first quartile), 3.2\% (second quartile), and 10.2\% (third quartile). For the major releases only, it is 0.5\% (first quartile), 1.4\% (second quartile), and 4.3\% (third quartile). {\sc so-fancy/diff-so-fancy} (a visualization for git diffs) is the repository with the highest fraction of stars received after releases. The repository has 53 days and 4,402 stars. Since it has a fast releasing rate (one new release per week, on average), it gained almost of its stars (89.1\%) in the weeks after releases. \begin{figure} \centering \includegraphics[width=0.65\columnwidth, page=1, trim={0 0 0 2.5em}, clip]{images2/releases/releases-ratios.pdf} \caption{Fraction of stars gained in the first week after all releases and just after the major releases} \label{fig:releases1} \end{figure} We computed a second ratio for each repository: \emph{fraction of stars in the week following all releases or just major releases (FS)} $/$ {\em fraction of time represented by these weeks (FT)}. When $\mathit{FS}/\mathit{FT} > 1$, the repository gains proportionally more stars after the releases. Figure~\ref{fig:releases2} shows boxplots with the results of $\mathit{FS}/\mathit{FT}$ for all repositories. When considering all releases, we have that $\mathit{FS}/\mathit{FT}$ is 0.80 (first quartile), 1.25 (second quartile), and 1.98 (third quartile). For major releases only, we have that $\mathit{FS}/\mathit{FT}$ is 0.81 (first quartile), 1.53 (second quartile), and 2.98 (third quartile). \begin{figure}[!ht] \centering \includegraphics[width=0.65\columnwidth, page=3, trim={0 0 0 2.5em}, clip]{images2/releases/releases-ratios.pdf} \caption{Fraction of stars in the week following all releases (or just the major releases) $/$ fraction of time represented by these weeks} \label{fig:releases2} \end{figure} Figure~\ref{fig:releases-values} shows the median values of $\mathit{FS}/\mathit{FT}$ computed using stars gained after $n$ weeks ($1 \leq n \leq 4$). This ratio decreases, both for major and for all releases. Therefore, although there is some gains of stars after releases, they tend to decrease after few weeks.\\[-0.1cm] \begin{figure}[!h] \centering \includegraphics[width=0.65\columnwidth, trim={0 0 0 2.5em}, clip]{images2/releases/threshold.pdf} \caption{Fraction of stars by fraction of time (median values), computed using different time intervals (in weeks)} \label{fig:releases-values} \end{figure} \noindent{\em Summary: There is an acceleration in the number of stars gained just after releases. For example, half of the repositories gain at least 53\% more stars in the week following major releases, than in the other weeks (see Figure~\ref{fig:releases2}). However, because repositories usually have much more weeks without releases than with releases, this phenomenon is not sufficient to generate a major concentration of popularity gain after releases. For example, 75\% of the systems gain at most 4.3\% of their stars in the week following major releases (see Figure~\ref{fig:releases1}).} \begin{figure*}[!ht] \centering \begin{subfigure}[b]{0.25\linewidth} \includegraphics[width=\linewidth, trim={0 2em 1em 5em}, clip, page=4]{images2/clusters/timeseries.pdf} \caption{Cluster C1} \label{fig:timeseries:c1} \end{subfigure}% \begin{subfigure}[b]{0.25\linewidth} \includegraphics[width=\linewidth, trim={0 2em 1em 5em}, clip, page=3]{images2/clusters/timeseries.pdf} \caption{Cluster C2} \label{fig:timeseries:c2} \end{subfigure}% \begin{subfigure}[b]{0.25\linewidth} \includegraphics[width=\linewidth, trim={0 2em 1em 5em}, clip, page=2]{images2/clusters/timeseries.pdf} \caption{Cluster C3} \label{fig:timeseries:c3} \end{subfigure}% \begin{subfigure}[b]{0.25\linewidth} \includegraphics[width=\linewidth, trim={0 2em 1em 5em}, clip, page=1]{images2/clusters/timeseries.pdf} \caption{Cluster C4} \label{fig:timeseries:c4} \end{subfigure}% \caption{Clusters of time series representing the growth of the number of starts of 2,279 GitHub repositories} \label{fig:timeseries} \end{figure*} \section{Popularity Growth Patterns} \label{sec-patterns} In this section, we investigate common patterns of popularity growth concerning the GitHub repositories in our dataset. To this purpose, we use the KSC algorithm~\cite{Yang2011}. This algorithm clusters time series with similar shapes using a metric that is invariant to scaling and shifting. The algorithm is used in other studies to cluster time series representing the popularity of YouTube videos~\cite{Figueiredo2013} and Twitter~\cite{Lehmann2012}. Like K-means~\cite{hartigan1975}, KSC requires as input the number of clusters $k$. Because the time series provided as input to KSC must have the same length, we only consider data regarding the last 52 weeks (one year). Due to this restriction, we exclude 216 repositories (8.6\%) that have less than 52 weeks. We use the $\beta_{CV}$ heuristic~\cite{Menasce2001} to define the best number $k$ of clusters. $\beta_{CV}$ is defined as the ratio of the coefficient of variation of the intracluster distances and the coefficient of variation of the intercluster distances. The smallest value of $k$ after which the $\beta_{CV}$ ratio remains roughly stable should be selected. This means that new added clusters affect only marginally the intra and intercluster variations~\cite{Figueiredo2014}. In our dataset, the values of $\beta_{CV}$ stabilize for $k=4$ (see Figure~\ref{fig:Bcv}). \begin{figure}[!h] \centering \includegraphics[width=0.65\columnwidth, trim={0 4em 0 5em}, clip]{images2/clusters/Bcv.pdf} \caption{$\beta_{CV}$ for $2 \leq k \leq 15$} \label{fig:Bcv} \end{figure} \begin{table*}[!ht] \centering \caption{Popularity Growth Patterns} \label{tab:linear} \begin{tabular}{@{}lcrrl@{}} \toprule \multicolumn{1}{c}{\bf Pattern}&\multicolumn{1}{c}{\bf Cluster} & \multicolumn{1}{c}{\bf \# Repositories} & \multicolumn{1}{c}{\bf \% Growth} & \multicolumn{1}{c}{\bf Top-3 Repositories}\\ \midrule Slow & C1 & 1,497 (65.7\%) & 27.3 & {\sc jquery/jquery}, {\sc h5bp/html5-boilerplate}, and {\sc meteor/meteor}\\ Moderate & C2 & 614 (26.9\%) & 94.0 & {\sc facebook/react}, {\sc robbyrussell/oh-my-zsh}, and {\sc airbnb/javascript}\\ Fast & C3 & 131 (5.7\%) & 469.2 & {\sc atom/electron}, {\sc google/material-design-lite}, and {\sc vuejs/vue} \\ Viral & C4 & 37 (1.6\%) & 2,673.8 & {\sc nylas/N1}, {\sc letsencrypt/letsencrypt}, and {\sc jwagner/smartcrop.js}\\ \bottomrule \end{tabular} \end{table*} \subsection{Proposed Growth Patterns} \label{sec:patterns:trends} Figure~\ref{fig:timeseries} shows plots with the time series in each cluster. The time series representing the clusters' centroids are presented in Figure~\ref{fig:popularity-trends}. The time series in clusters C1, C2, and C3 suggest a linear growth, but at different speeds. On the other hand, the series in cluster C4 suggest repositories with a sudden growth on the number of stars. We refer to these clusters as including systems with \emph{Slow}, \emph{Moderate}, \emph{Fast}, and \emph{Viral} Growth, respectively. \begin{figure}[!ht] \centering \includegraphics[width=\columnwidth, trim={0 0 0 0}, clip]{images2/clusters/centroids.pdf} \caption{Time series representing the centroids of each cluster} \label{fig:popularity-trends} \end{figure} Slow growth is the dominant pattern, including 65.7\% of the repositories in our sample, as presented in Table~\ref{tab:linear}. The table also shows the number of repositories in each cluster and the percentage of stars gained by the cluster's centroids in the period under analysis (52 weeks). The speed in which the stars are gained by repositories on cluster C1 is the lowest one (27.3\% of new stars in one year). Moderate growth is the second pattern with more repositories (26.9\% of the repositories and 94\% of new stars in one year). 5.7\% of the repositories have a fast growth (469.2\% of new stars in the analyzed year). The last cluster (Viral Growth) describes repositories with a massive growth in their number of stars in a short period of time. It is a less common pattern, including 1.6\% of the repositories. Figure~\ref{fig:viral-examples} shows two examples of systems with a viral growth: {\sc nylas/N1} (an email client, with a peak of more than 7,300 stars in a single week) and {\sc Soundnode/soundnode-app} (a desktop client for SoundCloud, which received almost 1,400 stars in a single week). \begin{figure}[!ht] \centering \begin{subfigure}[t]{0.5\columnwidth} \centering \includegraphics[width=1\linewidth, page=18, trim={0 0 0 5em}, clip]{images2/clusters/timeseries_c0.pdf} \caption{{\sc N1}} \label{fig:viral-examples:a} \end{subfigure}% \begin{subfigure}[t]{0.5\columnwidth} \centering \includegraphics[width=1\linewidth, page=11, trim={0 0 0 5em}, clip]{images2/clusters/timeseries_c0.pdf} \caption{{\sc Soundnode}} \label{fig:viral-examples:b} \end{subfigure}% \caption{Examples of viral growth} \label{fig:viral-examples} \end{figure} \begin{figure*}[!ht] \centering \includegraphics[width=\textwidth, trim={0 2em 0 0em}, clip]{images2/clusters/stacks.pdf} \caption{Percentage of systems following the proposed growth patterns, for the most popular programming languages, application domains, and repository owners} \label{fig:stackedbars} \end{figure*} \subsection{Growth Patterns vs Repositories Properties} Figure~\ref{fig:stackedbars} shows the percentage of systems following the proposed growth patterns, for the top-10 programming languages in number of repositories, application domains, repository owners, and age. The three languages with the highest percentage of systems with slow growth are Ruby (92\%), CSS (82\%), and HTML (79\%). By contrast, the languages with the highest percentage of systems with fast growth are Go (7.6\%) and Java (7.6\%). Go is a new language that is attracting a lot of interest.\footnote{https://www.thoughtworks.com/radar/languages-and-frameworks/go-language, verified on 04/07/2016.} Regarding Java, 61 out of 95 repositories with fast growth are Android applications. JavaScript is the language with the highest number of repositories with viral growth (10 repositories), followed by C++ (5 repositories) and Python (5 repositories). In relative terms, 2.7\% of the Python systems have a viral growth, followed by 1.6\% of the systems implemented in Ruby. When we group the systems by application domain, 75\% of the web libraries and frameworks have a slow growth. Interestingly, the two domains with the highest percentage of systems following a fast growth are documentation (9.8\%) and non-web libraries and frameworks (6.9\%). Regarding the repository owners, there is no substantial difference between users and organizations. For slow growth, the percentage of systems is 66.4\% and 64.9\%, for users and organizations, respectively. For fast growth, the percentage is 5.8\% and 5.6\%, respectively. Finally, the last bars in Figure~\ref{fig:stackedbars} show that old repositories tend to present a slow growth. The percentage of such repositories ranges from 30.8\% (age $<$ 2 years) to 87.2\% (age $\geq$ 4 years). As mentioned, we found a high percentage of web frameworks and libraries---especially the ones implemented in Ruby, CSS, and HTML---with a slow growth. We hypothesize two main reasons to explain this result. First, web libraries and frameworks are the dominant applications in our dataset of popular applications (837 repositories, 33\%). This implies in a high competition, with many systems disputing the same users. For example, we found a list of JavaScript MVC-based frameworks with slow growth, including systems like {\sc knockout/knockout}, {\sc spine/spine}, {\sc quirkey/sammy}, and {\sc sproutcore/sproutcore}. These systems have to compete with ``blockbusters'', like {\sc angular/angular.js}, which is certainly a challenging task. The second reason is that there are many highly popular web frameworks and libraries in our dataset. For example, among the top-10\% repositories in number of stars, 42.8\% are web libraries and frameworks. We cannot assume that these systems will present the same growth rates of less popular ones. For instance, if {\sc angular/angular.js} starts to grow at 469.2\% per year (the growth rate observed for the centroid of the repositories with fast growth) it will have almost 1.5M stars in two years. \section{Feedback from Developers} \label{sec:survey} We contacted the main developers of some GitHub repositories to clarify the results presented in the previous sections. Specifically, we surveyed developers about three themes: (a) the impact on popularity of repositories owned by users (Section~\ref{sec:survey-user}); (b) the main characteristics of successful releases (Section~\ref{sec:survey-releases}); (c) the reasons for the peaks of popularity observed in systems with viral growth (Section~\ref{sec:survey-viral}). The surveys were performed by means of follow-up emails. \subsection{Impact on Popularity of Repositories Owned by Users} \label{sec:survey-user} In Section~\ref{sec:results} (RQ \#1), we found that repositories owned by organizations are more popular than the ones owned by individuals. For example, among the top-100 most popular repositories, only 30 repositories are owned by users. The developers of 17 of such systems have a public mail address in their GitHub profile. We sent a short survey to these developers and received responses from five of them (29.8\%). In this survey, we asked two questions. First, we asked the developers about possible plans to migrate their repositories to an organization account. All developers answered negatively this question. Two developers mentioned they want to explicitly appear as the repository owner, like in this answer: \\[-0.3cm] \noindent {\em ``I worked hard to create the project, and having it under my personal username is necessary to have proper credit for it.''} \\[-0.3cm] To complement the first question, we asked the developers if they agree that migrating the repositories to an organization account would help to attract more users. Four developers (80\%) answered negatively to this question and only one participant provided the following answer:\\[-0.3cm] \noindent {\em``It depends on what organization it is. If it's a well known org I'm sure it helps, otherwise I don't think it makes a difference.''} \\[-0.3cm] Therefore, although it seems ``easier'' to organizations to reach the top positions of GitHub popularity ranking, some systems owned by individual developers also reach these positions. These developers usually do not want to move to organizational accounts, basically to keep full control and credit for their repositories. \subsection{Characteristics of Successful Releases} \label{sec:survey-releases} To reveal the characteristics of the most successful releases in our dataset (see RQ \#4, Section~\ref{sec:results}), we perform a survey with the main developers of 60 releases with the highest fraction of stars gained on the week after the release (and whose developers have a public mail address on their GitHub profile). We received answers from 25 developers, which corresponds to a response ratio of 41.6\%. First, we asked the developers about the type of features implemented in these releases. As presented in Table~\ref{tab:question1}, the releases usually include both functional and non-functional requirements (14 answers), followed by releases with mostly functional requirements (9 answers). We did not receive answers about releases including non-functional requirements. Two developers provide other types of answers (``complete rewrite'' and ``maintenance release'', respectively). \begin{table}[!ht] \centering \caption{Features implemented in successful releases} \label{tab:question1} \begin{tabular}{@{}lrl@{}} \toprule Features & \multicolumn{2}{c}{Answers} \\ \midrule Both functional and non-functional & 14 & \sbar{14}{25} \\ Mostly functional & 9 & \sbar{9}{25} \\ Other answers & 2 & \sbar{2}{25} \\ Mostly non-functional & 0 & \sbar{0}{25} \\ \bottomrule \end{tabular} \end{table} We also asked the developers to explain how the features implemented in these releases were selected (answers including multiple items are possible in this question). As presented in Table~\ref{tab:question2}, the features usually come from ideas of the repository' maintainers (23 answers) and from user's suggestions (11 answers). \begin{table}[!ht] \centering \caption{How the features are selected?} \label{tab:question2} \begin{tabular}{@{}lrl@{}} \toprule Features selected from & \multicolumn{2}{c}{Answers} \\ \midrule Ideas of the repository maintainers & 23 & \sbar{23}{25} \\ Users suggestions & 11 & \sbar{11}{25} \\ Features of similar projects & 6 & \sbar{6}{25} \\ Other answers & 3 & \sbar{3}{25} \\ \bottomrule \end{tabular} \end{table} \subsection{Reasons for Viral Growth} \label{sec:survey-viral} To expose the reasons for viral growth, we sent a message to the main developer of 22 systems with viral growth and who have a public mail address on their GitHub profile. In the message, we asked the developers to explain the peaks observed in the number of stars of their repositories. We received answers from 14 developers, which corresponds to a response ratio of 63\%. As presented in Table~\ref{tab:survey-viral}, 11 developers (78.5\%) linked the peaks to posts in social media sites, mostly Hacker News.\footnote{https://news.ycombinator.com/} For example, we received the following answer:\\[-0.3cm] \noindent{\em \aspas{I posted about this project on HackerNews. It quickly got a lot of attention and remained on the front page of HackerNews (a very high traffic tech site) for over 24 hours. It subsequently made it onto the github.com/explore as one of the top starred repositories for around a week. Because the repo was highlighted in these two high-profile locations for so much time, it received an incredible amount of traffic, which translated to a considerable number of stars.}}\\[-0.3cm] \begin{table}[!ht] \centering \caption{Sources of popularity} \label{tab:survey-viral} \begin{tabular}{@{}lrl@{}} \toprule Source & \multicolumn{2}{c}{Answers} \\ \midrule Social media sites (e.g., HackerNews) & 11 & \sbar{11}{14} \\ Blogs and news sites (e.g., infoq.com) & 3 & \sbar{3}{14} \\ Other answers (e.g., private mailing list) & 4 & \sbar{4}{14} \\ \bottomrule \end{tabular} \end{table} \section{Threats to Validity} \label{sec:threats} \noindent{\em Number of stars as a proxy for popularity:} In the paper, we consider that stars are proxies for a project popularity, as common in studies about the popularity of social media content~\cite{Ahmed2013, Figueiredo2014,Lehmann2012, ma2013predicting}. However, a developer can star a repository for other reasons, for example, when she in fact finds problems in the system and wants to create a bookmark for later access and analysis.\\[-0.25cm] \noindent{\em Dataset.} GitHub has millions of repositories. We build our dataset by collecting the top-2,500 repositories with more stars, which represents a small fraction in comparison to the GitHub's universe. However, our goal is exactly to investigate the popularity of the most starred repositories. Furthermore, most GitHub repositories are forks and have very low activity~\cite{Kalliamvakou2014, Kalliamvakou2015}.\\[-0.25cm] \noindent{\em Application domains.} Because GitHub does not classify the hosted applications in domains, we performed this classification manually. Therefore, it is subjected to errors and inaccuracies. To mitigate this threat, the dubious classification decisions were discussed by two paper's authors.\\[-0.25cm] \noindent{\em Growth patterns}. The selection of the number of clusters is a key parameter in algorithms like KSC. To mitigate this threat, we employed a heuristic that considers the intra/intercluster distance variations~\cite{Menasce2001}. Furthermore, the analysis of growth patterns was based on the stars obtained on the last year. The stars before this period are not considered, since the KSC algorithm requires time series with the same length. \\[-0.25cm] \section{Related Work} \label{sec:related-work} Several studies examine the relationship between popularity of mobile apps and their code properties~\cite{Datta2013, Fu2013, LinaresVasquez2013, Ruiz2014, lee2014, Tian2015, Guerrouj2015, Palomba2015, Corral2015}. Yuan et al.~investigate 28 factors along eight dimensions to understand how high-rated Android applications are different from low-rated ones~\cite{Tian2015}. Their result shows that external factors, like number of promotional images, are the most influential factors. Guerrouj and Baysal explore the relationships between mobile apps' success and API quality~\cite{Guerrouj2016}. They found that changes and bugs in API methods are not strong predictors of apps' popularity. Ruiz et al.~examine the relationship between the number of ad libraries and app's user ratings~\cite{Ruiz2014}. Their results show that there is no relationship between the number of ad libraries in an app and its rating. Linares-V{\'a}squez et al.~investigate how the fault- and change-proneness of Android API elements relate to applications' lack of success~\cite{LinaresVasquez2013}. They state that making heavy use of fault- and change-prone APIs can negatively impact the success of these apps. Other studies examine source code repositories in order to understand what makes a project popular. Weber and Luo attempt to differentiate popular and unpopular Python projects on GitHub using machine learning techniques~\cite{Weber2014}. They found that in-code features are more important than author metadata features. Zho et al.~study the frequency of folders used by 140 thousands GitHub projects and the results suggest that the use of standard folders (e.g., doc, test, examples) may have an impact on project popularity~\cite{Zhu2014}. Bissyande et al.~analyze the popularity, interoperability, and impact of various programming languages, using a dataset of 100K open source software projects~\cite{Bissyande2013}. Aggarwal et al.~study the effect of social interactions on GitHub projects' documentation~\cite{Aggarwal2014}. They conclude that popular projects tend to attract more documentation collaborators. By analyzing usage of Java APIs, Mileva states that popularity trend is a method for displaying the users preferences and for predicting their future~\cite{Mileva2012}. Finally, other studies analyze the relationship between popularity and software quality. Sajnani et. al.~ study the relationship between component popularity and component quality in Maven~\cite{Sajnani2014}, finding that, in most cases, there is no correlation. Capra et. al.~evaluate the effect of firms' participation on communities of open source projects and conclude that firms' involvement improves the popularity, but leads to lower software quality~\cite{Capra2011144}. To our knowledge, we are the first study to track popularity over time on social code sharing sites, like GitHub. However, there are similar studies in other contexts, like App Stores~\cite{Guerrouj2015}, video sharing sites~\cite{Chatzopoulou2010}, and social platforms~\cite{ma2013predicting}. Chatzopoulou et al.~\cite{Chatzopoulou2010} analyze popularity of Youtube videos by looking at properties and patterns metrics. They report that many of the popularity metrics are highly correlated. In our study, we also report correlations between stars and other popularity metrics (e.g., forks). Lehmann et al.~\cite{Lehmann2012} analyze popularity peaks of hashtags in Twitter. They found four usage patterns restricted to a two-week period centered on the peak time whereas the popularity patterns presented in this study are based on the last year data. \section{Conclusion} \label{sec-conclusion} In this paper, we first studied the popularity of GitHub repositories aiming to answer four research questions. We concluded that three most common domains on GitHub are web libraries and frameworks, non-web libraries and frameworks, and software tools. However, the three domains whose repositories have more stars are systems software, web libraries and frameworks, and documentation. Additionally, we found that repositories owned by organizations are more popular than the ones owned by individuals (RQ \#1). We also reported the existence of a strong correlation between stars and forks, a weak correlation between stars and commits, and a weak correlation between stars and contributors (RQ \#2), confirming the importance of a large base of contributors to the success of open source software~\cite{Mockus2002}. We concluded that repositories have a tendency to receive more stars right after their first public release. After this period, for half of the repositories the growth rate tends to stabilize (RQ \#3). In other words, bursts of popularity do not explain the popularity growth of most repositories. We showed that there is an acceleration in the number of stars gained just after releases (RQ \#4), which confirms the importance of developers constantly evolving and improving their systems. We identified four patterns of popularity growth, which were derived after clustering the time series that describe the number of stars of the systems in our dataset. We found that slow growth is the most common pattern (65.7\%) and that very few systems present a viral behavior (1.6\%). Slow growth is more common in case of overpopulated application domains (as web libraries and frameworks) and for old repositories. As future work, we plan to investigate repositories that are not popular yet and compare them with the popular ones. We also plan to correlate repository and language popularity to provide relative measures of popularity. For example, if we restrict the analysis to developers from a given language, a Scala repository can be considered more popular than a JavaScript one, although having less stars. Moreover, we plan to investigate models for predicting software popularity, which can be used for example to warn developers when signs of stagnation are detected in their repositories. \section*{Acknowledgments} \noindent This research is supported by FAPEMIG and CNPq. \bibliographystyle{IEEEtran}
{'timestamp': '2016-07-15T02:09:20', 'yymm': '1606', 'arxiv_id': '1606.04984', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04984'}
arxiv
\section{Introduction} Mechanisms are engineered games, devised to implement outcomes that depend on the private information of individuals in the economy. They provide a theoretical model to study which economic allocations an institution can achieve as equilibrium of a game in which individuals' preferences, called their \emph{type} is not known by the institution. When this information is relevant for taking a decision, and individuals can misreport their preferences in order to manipulate the outcome in their favor, they need to be incentivized to reveal it truthfully. A mechanism that elicits agents' types truthfully is said to be \emph{incentive compatible}~(IC). In this paper we focus on single agent mechanisms, which form a fundamental building block of dominant strategy mechanism design, \emph{cf.~} \cite{vohra2011mechanism, fudenberg1991game}. The analysis of such mechanisms is predominantly analytic or algebraic \cite{myerson1981optimal, rochet1987necessary, vohra2011mechanism}. We propose an entirely different approach via tropical convex geometry and tropical combinatorics. Within this framework, the study of incentive compatibility becomes a question about tropical eigenspaces and point configurations in the tropical affine space~$\mathbb{TP}$. To handle these economic problems geometrically, we put forward the definition of the basic region $\basic(T)$ and the set of basic cells $\cell(T)$ for an arbitrary multiset of types $T\subset \mathbb{TP}^{m-1}$. Our first main result states that any IC mechanism on $T$ and its payments can be constructed from these objects. \begin{theorem}\label{thm:d-ic.classes} Let $T\subset \mathbb{TP}^{m-1}$ be a multiset of types, and $(g,p)$ a single agent mechanism with outcome function $g: T \to [m]$ and payment vector $p \in \mathbb{TP}^{m-1}$. \begin{enumerate} \item A mechanism $(g,p)$ is IC if and only if $p$ lies in a basic cell $P \in \cell(T)$, and $g$ is contained in $\underline{\mathsf{coVec}}_T(P)$ as a subgraph. Then $P$ is the set of all IC payments of $g$. \item A vector $p \in \mathbb{TP}^{m-1}$ is the payment function of some IC mechanism $(g,p)$ if and only if $p$ lies in the basic region $\basic(T)$. \item If $T$ is finite and generic, then the basic cells $\cell(T)$ are full-dimensional cells of the max-plus tropical polytope generated by $T$. \item Let $(T^n, n \geq 1)$ be a sequence of finite sets which approximate $T$. Then the basic cells in $\cell(T)$ are limits in the Hausdorff metric of the basic cells of $T^n$ as $n \to \infty$. \end{enumerate} \end{theorem} Theorem \ref{thm:d-ic.classes} supplies a novel framework to study IC mechanisms, and more importantly, the set of possible IC payments, on a given type space. In particular, parts (1) and (2) state that the basic cells $\basic(T)$ and their covectors determine the set of all IC mechanisms and IC payments on~$T$, while parts (3) and (4) say that they are easy to discern from the geometry of~$T$. Our second main result, Theorem~\ref{thm:geometry}, gives a geometric construction and meaning to important classes of mechanisms, such as weakly monotone and revenue equivalent mechanisms on an arbitrary type space $T$. This theorem relates geometry and linear algebra, giving a clear understanding of how the outcome function interacts with the geometry of the type space in affecting these properties. The geometric approach developed here is conceptually distinct from large parts of the existing literature on mechanism design. Our theorems provide new tools that make checking and visualizing incentive compatibility easy, both theoretically and computationally. Furthermore, Theorem \ref{thm:d-ic.classes} and \ref{thm:geometry} provide powerful techniques to \emph{construct} all possible IC outcome functions together with their payments for arbitrary type spaces. To our knowledge such a joint characterization has not been obtained previously and appears to be beyond the scope of the traditional mathematical machinery of mechanism design. Let us demonstrate the insights that can be gained using these theorems. An IC mechanism is \emph{revenue equivalent} (RE) if there exists a unique IC payment for its outcome function, up to an additive constant. We shall say that a type space $T$ is revenue equivalent if all IC mechanisms on $T$ are revenue equivalent. Prior to our work, the characterization of RE type spaces, due to Chung and Olszewski \cite{chung2007non-differentiable}, reads as follows: $T$ is RE if and only if there do not exist disjoint subsets $B_1, B_2$, a function $r: B_1 \cup B_2\to \R$, and an $\epsilon >0$, such that $T$ equals the union of two non-empty sets $V_+(B_1,\epsilon,r)$ and $V_-(B_2,\epsilon,r)$, whose definitions depend on the parameters given. Given a specific type space $T$, it is not immediate how to apply this theorem to check whether $T$ is RE. In contrast, we obtain the following characterization as a consequence of Theorem \ref{thm:d-ic.classes} and \ref{thm:geometry}. \begin{theorem}\label{thm:property.star} A type space $T \subset \mathbb{TP}^{m-1}$ is RE if and only if for each $p~\in~\basic(T)$ the graph of $p$ is strongly connected. \end{theorem} The graph of $p$ is the directed graph on $n$ nodes, with edge $(i,j)$ if and only if the distance between $T\cap \overline{\mathcal{H}}_i(-p)$ and $\overline{\mathcal{H}}_{ij}(-p)$ is zero, where $\overline{\mathcal{H}}_{i}(-p)$ and $\overline{\mathcal{H}}_{ij}(-p)$ denote max-plus half-spaces of type $\{i\}$ and $\{i,j\}$ respectively. The max-plus hyperplane $\overline{\mathcal{H}}(-p)$ at $p$ equals the max-plus hyperplane at $0$ translated by $p$, so that checking whether a type space $T$ is RE using Theorem~\ref{thm:property.star} only requires considering translations of a fixed set by points in $\basic(T)$ and recording which sectors have positive distances. This makes checking revenue equivalence for a given type space surprisingly simple, while such an algorithm is not apparent from Chung and Olszewski's characterization. In addition, Theorem \ref{thm:d-ic.classes} and \ref{thm:geometry} allow for more detailed conclusions. For example, on an arbitrary type space $T$, one can precisely identify the set of all RE and non-RE mechanisms. We illustrate these techniques in Examples \ref{ex:failure.re} and \ref{ex:non.convex}. To demonstrate the insights gained from the combinatorial view, consider the following problem. Suppose $T \subset \mathbb{TP}^{m-1}$ is a multiset consisting of $r$ points. Let $d(T) \in \mathbb{N}$ be the number of IC outcome functions on $T$. We are not aware of ways to compute or bound $d(T)$ using traditional techniques. On the other hand, this easily follows from Theorem \ref{thm:d-ic.classes}. \begin{corollary}\label{cor:counting} Suppose $T \subset \mathbb{TP}^{m-1}$ consists of $r$ points. Then $1 \leq d(T) \leq \binom{r-1}{m-1}$. If $T$ is generic, then $d(T) = \binom{r-1}{m-1}$. \end{corollary} Our theorems were obtained by applying results from tropical convexity and tropical combinatorics to problems in mechanism design. However, we go further, by adapting and developing tropical convex geometry to handle economic problems. The basic region $\basic(T)$ and basic cells $\cell(T)$ of a multiset $T$ in tropical affine space are entirely new objects in tropical convex geometry, motivated by incentive compatibility problems. Thus concepts in mechanism design lend useful interpretations to objects in tropical convex geometry. Conversely the mathematical apparatus we advocate in this paper allows for the analysis of mechanisms in a unified way. It applies equally to mechanism design with and without money, and to multidimensional mechanism design. At the same time it supplies a complementary geometric view to the existing edifice of mechanism design theory, allowing for additional insights, as demonstrated in the preceding paragraphs. Mechanism design is a cornerstone of economic theory with many prominent applications, ranging from the analysis and design of voting procedures \cite{moulin1980strategy, gershkov2016optimal}, trading and auctioning mechanisms \cite{myerson1981optimal, myerson1983efficient, vickrey1961counterspeculation }, to contract design and regulatory policy \cite{laffont2009theory}. The plenitude of open problems, both theoretical and applied, make it a very active research area. Tropical mathematics offers a new tool box to study and interpret mechanisms, with a novel perspective on open problems. This promises further developments between tropical geometry and mechanism design, though we certainly do not claim that all problems in mechanism design can be solved tropically. More broadly, there have been applications of tropical geometry to other economic problems, such as mean-payoff games \cite{akian2012tropical}, trade theory \cite{shiozawa2015exotic , joswig2016cayley}, and auction theory \cite{baldwin2015understanding, tran2015product-mix}. These papers attest to a fruitful interaction between tropical geometry and economics. \subsection*{Further Literature} This paper is written for a general math audience with minimal background in either mechanism design or tropical geometry. While the paper is self-contained, it is not intended as an introduction to either field. For streamlined exposition with minimal notation, we only consider the simplest case of dominant strategy mechanism design, namely, direct mechanisms with a finite set of outcomes and one agent in a quasi-linear setting. These can be embedded into richer models. For an in-depth treatment of mechanism design, with economic interpretations and further generalizations, we refer to the excellent monograph of Vohra \cite{vohra2011mechanism}. Similarly, for a fuller picture of tropical algebra and geometry, there exists the comprehensive texts of Butkovivc \cite{butkovivc2010max} and Bacelli et al. \cite{baccelli1992synchronization} on solving tropical linear equations, or Joswig \cite{joswig20xxessentials} and Maclagan and Sturmfels \cite{maclagan2015introduction} on tropical geometry. \subsection*{Organization} We introduce the essential background in mechanism design and tropical convex geometry in Section \ref{sec:background}. In Section \ref{sec:proof}, we prove Theorem \ref{thm:d-ic.classes} by developing auxiliary results along the way. In particular we formalize the concept of basic cells and the basic set. In Section \ref{sec:geometry}, we state and prove Theorem \ref{thm:geometry}, providing a series of examples to demonstrate its power, and including a proof of Theorem \ref{thm:property.star} stated above. \subsection*{Notation} For an integer $n$, define $[n] := \{1, 2, \ldots, n\}$. For sets $A, B \subset \R^m$, write $\mathsf{d}(A,B)$ for the infimum of the distance between pairs of points in these sets, and $\mathsf{d_H}(A,B)$ for their Hausdorff distance, with respect to the Euclidean norm. We shall use the underline notation, such as $\underline{\oplus}, \underline{\odot}, \underline{\mathcal{H}},\ldots$ to indicate objects defined with arithmetic done in the min-plus algebra, and the overline notation $\overline{\oplus}, \overline{\odot}, \overline{\mathcal{H}},\ldots$ to indicate the same objects defined with arithmetic in the max-plus tropical algebra. When we write a multiset, we will use the same notation as for sets. When listing or enumerating the elements, we will list copies. The cardinalities of multisets are understood to include copies. Identify a graph with its incidence matrix. \section{Mechanism Design, Tropical Algebra and Tropical Convex Geometry}\label{sec:background} \subsection{Mechanism Design in Tropical Algebra} Consider a game with one agent and $m~\in~\mathbb{N}$ possible outcomes. Fix $T \subset \R^m$, called the \emph{type space}. At the beginning of the game, Nature chooses a true type $t^*\in T$ which only the agent knows. The $i$-th coordinate $t^\ast_i$ measures how much the agent values outcome $i$. A \emph{mechanism} is a pair~$(g, p)$, consisting of an outcome function $g: T \to [m]$, which is always assumed to be onto, and a payment function $p: T \to \R$. The agent's action is to declare to the mechanism a type~$s \in T$, which may be different from the true type $t^\ast$. If $s$ is declared, the game's outcome is $g(s)$, and the agent needs to pay $p(s)$. In this case, the agent's utility is \[u([g(s),p(s)], t^\ast) = t^\ast_{ g(s)} - p(s).\] The agent, knowing $(g,p)$, will declare a type $s \in T$ that maximizes utility. A central goal of mechanism design is to identify \emph{incentive compatible mechanisms}, these are mechanisms under which the agent will always tell the truth. \begin{definition}\label{defn:IC} Say that a mechanism $(g,p)$ is \emph{incentive compatible} (IC) if regardless of $t^\ast$, the agent always maximizes utility by declaring the true type. That is, \begin{equation}\tag{IC}\label{eqn:single.type.simple} t^\ast_{g(t^*)} - p(t^*)\geq t^\ast_{ g(s)} - p(s)\quad \mbox{ for all } \quad s,t^\ast \in T. \end{equation} Say that an outcome function $g: T \to [m]$ is incentive compatible if there exists $p:T \to \R$ such that $(g,p)$ is IC. \end{definition} We now proceed to state the essential terminology of mechanism design using tropical mathematics. Tropical linear algebra and its geometric version, tropical convex geometry, is the study of matrices, linear spaces and convex sets with arithmetic done in the tropical semi-ring. The \emph{min-plus semi-ring} $(\mathbb{R}\cup\{+\infty\}, \underline{\oplus},\odot)$ has addition and multiplication defined by $$a \underline{\oplus} b := \min(a,b), \quad a \odot b := a + b\quad \mbox{ for } a,b \in \R\cup\{+\infty\}.$$ Analogously, the max-plus semi-ring $(\mathbb{R}\cup\{-\infty\}, \overline{\oplus},\odot)$ is defined by $$a \overline{\oplus} b := \max(a,b), \quad a \odot b := a + b\quad \mbox{ for } a,b \in \R\cup\{-\infty\}.$$ A matrix $L \in \R^{m \times m}$ is said to have \emph{min-plus eigenvalue-eigenvector} pair $(\lambda,p) \in \R\times\R^m$ if $$ L \,\,\underline\odot\,\, p = \lambda \,\,\underline\odot \,\,p, $$ where the matrix-vector and scalar-vector multiplications take place in the min-plus semiring. Explicitly, for all $i =1,\ldots,m$, $$ \min_{j=1,\ldots,m} L_{ij} + p_j = \lambda + p_i. $$ By a theorem of Cuninghame-Green \cite{Cg62}, a $m \times m$ matrix with finite entries $L \in \R^{m \times m}$ has a unique min-plus eigenvalue, interpreted as the smallest normalized cycle length on a graph with edge weights given by~$L$. Thus one can speak of \emph{the min-plus eigenvalue} of a matrix $L$, denoted $\underline{\lambda}(L)$. The \emph{min-plus eigenspace} $\underline{\mathsf{Eig}}(L)$ of $L \in \R^{m \times m}$ is its set of eigenvectors $$ \underline{\mathsf{Eig}}(L) = \{x \in \R^m: L \underline{\odot} x = \underline{\lambda}(L) \underline{\odot} x\}. $$ Returning to mechanism design, the \emph{allocation matrix} $L^g$ of a given outcome function $g: T \to [m]$ is an $m \times m$ matrix, with $jk$-th entry \begin{equation}\label{eqn:allocation.matrix} L^g_{jk} = \inf_{t \in g^{-1}(j)}\{t_j - t_k\}. \end{equation} As is common in the literature \cite{vohra2011mechanism}, we shall always assume $T$ and $g$ to be such that the entries of~$L^g$ are finite. It follows from Definition \ref{defn:IC} that $p(t) = p(s)$ whenever $g(t) = g(s)$, for any IC mechanism $(g,p)$. Thus we may assume that $p \in \R^m$. By algebraic manipulations, one can check that equation (\ref{eqn:single.type.simple}) holds if and only if the matrix $L^g \in \R^{m \times m}$ has a tropical eigenvector $p \in \R^m$ with tropical eigenvalue zero. That is, $(g,p)$ is an IC mechanism if and only if \begin{equation}\label{eqn:single.min.plus} L^g \,\,\underline{\odot}\,\, p = 0\,\, \underline{\odot}\,\, p = p. \end{equation} Hence, deciding IC for a given $g$ involves solving the tropical linear equation (\ref{eqn:single.min.plus}). Cuninghame-Green's theorem applied to equation (\ref{eqn:single.min.plus}) gives the classical characterization of IC outcome functions obtained by Rochet \cite{rochet1987necessary}. \begin{theorem}[\cite{Cg62}, \cite{rochet1987necessary}]\label{thm:rochet} An outcome function $g$ is IC if and only if the matrix $L^g$ has min-plus tropical eigenvalue zero, that is, $\underline{\lambda}(L^g) = 0$. \end{theorem} \begin{definition}\label{defn:essential} If an outcome function $g: T \to [m]$ is IC, call $\underline{\mathsf{Eig}}(L^g)$ the set of \emph{incentive compatible payments} of $g$. \end{definition} \begin{definition} Say that $g$ is \emph{weakly monotone} if the matrix $L^g + (L^g)^\top$ is element-wise nonnegative. \end{definition} \begin{definition}Say that $g$ is \emph{revenue equivalent} (RE) if it is IC, and its set of incentive compatible payments $\underline{\mathsf{Eig}}(L^g)$ consists of exactly one point up to tropical scalar multiplication. That is, $g$ is RE if for any pair $p,q \in \underline{\mathsf{Eig}}(L^g)$, there exists a constant $c$ such that $p_i = q_i + c$ for all $i = 1, \ldots, m$. Say that a type space is \emph{revenue equivalent} if any incentive compatible mechanism defined on it is revenue equivalent. \end{definition} \subsection{Mechanism design and tropical convex geometry}\label{sec:mechanism.topical.geometry} Our key departure from the network flow approach to mechanism design, developed in \cite{vohra2011mechanism}, will be the use of tropical convex geometry. This subsection shall make Theorem \ref{thm:d-ic.classes} precise. In a first step we replace type sets in $\R^m$ by multisets in tropical affine space $\mathbb{TP}^{m-1}$. In a second step we define fundamental concepts in tropical convex geometry including tropical hyperplanes, polytopes, covectors, basic cells and basic sets. The $(m-1)$-dimensional \emph{tropical affine space} $\mathbb{TP}^{m-1}$ is $\R^m$ modulo the line spanned by the all-one vector $$\mathbb{TP}^{m-1} \equiv \R^m / \R \cdot (1, \ldots, 1).$$ We denote by $\pi: \R^m \to \mathbb{TP}^{m-1}$ the canonical projection from $\R^m$ to $\mathbb{TP}^{m-1}$. The space~$\mathbb{TP}^{m-1}$ arises when we want to regard a tropical vector $t \in \R^m$ and its scalar multiple $a \odot t = (a + t_1, \ldots, a + t_m)$ as equivalent. Whenever convenient, such as visualizing examples, we shall identify $\mathbb{TP}^{m-1}$ with $\R^{m-1}$ via the homeomorphism \begin{equation}\label{eqn:tp.to.r} \{a \odot (x_1, \ldots, x_m): a \in \R\} \in \mathbb{TP}^{m-1} \mapsto (x_2-x_1, \ldots, x_m-x_1) \in \R^{m-1}. \end{equation} A \emph{multiset} in $\mathbb{TP}^{m-1}$ is a set of unique elements in $\mathbb{TP}^{m-1}$ together with a function counting the number of copies of the underlying set's elements. A multiset in which each element has only one copy is a set. As a convention, we shall write a multiset by listing copies of its unique elements. Functions defined on a multiset may assign distinct values to the copies of the unique elements. To translate incentive compatibility problems to $\mathbb{TP}^{m-1}$, we proceed as follows. Given a type set $T'\subset \R^m$, define the multiset $T\subset \mathbb{TP}^{m-1}$ with underlying set $T= \pi(T')$, by assigning to each $t \in T$, $m$ copies whenever $\pi^{-1}(t)\cap T'$ contains at least $m$ points, and $k$ copies whenever $\pi^{-1}(t)\cap T'$ contains $k<m$ points. Note that this definition depends only upon the type set $T'\subset \R^m$. Suppose now we were given an outcome function $g':T'\to [m]$. We can then define an induced outcome function $g:T \to [m]$ which maps the copies of $t \in T$ to the values of $g'$ on $\pi^{-1}(t)\cap T'$. Note that $L^g = L^{g'}$, so that $g$ is IC if and only if $g'$ is. Furthermore, if $p$ is an IC payment of $g$, then so is $a \odot p$ for all $a\in \R$, so that IC payments naturally are subsets of $\mathbb{TP}^{m-1}$. Hence, for incentive compatibility problems, there is no loss in passing from $g'$, an outcome function defined on a subset of $\R^m$, to $g$, an outcome function defined on a sufficiently rich multiset in $\mathbb{TP}^{m-1}$. In economic terms, this means only the relative valuation of the agent matter for truthfulness. In the following we recall some fundamental concepts in tropical convex geometry. Most definitions we build on appeared in the seminal work of Develin and Sturmfels \cite{develin2004tropical}, and were developed further in subsequent works by the authors of \cite{fink2013stiefel, joswig2016weighted, gaubert2011minimal}. However, tropical convex geometry itself has a much longer history, for a comprehensive introduction consult \cite{joswig20xxessentials, maclagan2015introduction} and references therein. For a point $t \in \mathbb{TP}^{m-1}$, the \emph{min-plus hyperplane with apex $t$}, denoted $\underline{\mathcal{H}}(-t)$, is the set of $z \in \mathbb{TP}^{m-1}$ such that the minimum in the tropical inner product \begin{equation}\label{eqn:pz.min} (-t)^\top \underline{\odot} z = \min\{z_1 - t_1, \ldots, z_m - t_m\} \end{equation} is achieved at least twice. For a subset $I \subseteq [m]$, denote by $\underline{\mathcal{H}}_I(-t)$ the \emph{min-plus half-space $I$} of $\underline{\mathcal{H}}(-t)$, which is the set of $z \in \mathbb{TP}^{m-1}$ such that the minimum in the tropical inner product is achieved at all indices $i \in I$ (and possibly more). That is, $$ \underline{\mathcal{H}}_I(-t) = \{z \in \mathbb{TP}^{m-1}: z_i - t_i \leq z_j - t_j \mbox{ for all } i \in I, j \in [m]\}. $$ When $I = \{i\}$ or $I = \{i,j\}$, we write $\underline{\mathcal{H}}_i$ and $\underline{\mathcal{H}}_{ij}$, respectively, instead of $\underline{\mathcal{H}}_I$. We shall call $\underline{\mathcal{H}}_i$ the \emph{$i$-th sector} of the hyperplane. For a multiset $T \subset \mathbb{TP}^{m-1}$, the union of min-plus hyperplanes $\bigcup_{t \in T}\underline{\mathcal{H}}(-t)$ partitions~$\mathbb{TP}^{m-1}$ into a polyhedral complex, called the \emph{min-plus hyperplane arrangement} based on $T$, denoted~$\underline{\mathcal{H}}(-T)$. For a finite set $T$, the set of bounded cells of $\underline{\mathcal{H}}(-T)$ is the \emph{max-plus polytope} generated by $T$\cite[Theorem 15]{develin2004tropical}. Say that a multiset $T \subset \mathbb{TP}^{m-1}$ is \emph{generic} if there is no subset of $2 \leq k \leq m$ points in $T$ whose projection onto $k$ coordinates lie on a tropical hyperplane in $\mathbb{TP}^{k-1}$. Note that a generic multiset $T$ necessarily has no copies, i.e. it is a set. The \emph{min-plus covector} of a point $p \in \mathbb{TP}^{m-1}$ with respect to a multiset~$T ~\subseteq~\mathbb{TP}^{m-1}$, denoted $\mathsf{\underline{coVec}}_T(p)$, is the bipartite graph with nodes $[m] \times T$ and edge $(i,t)\in [m]\times T$ if and only if $p\in \mathcal{\underline{H}}_i(-t)$. \begin{definition} Fix a multiset $T \subset \mathbb{TP}^{m-1}$. Let $g$ be a bipartite graph on $[m] \times T$. We will say that $g$ is an \emph{outcome graph} if it defines an outcome function $g: T \to [m]$ via $g(t) = i$ if and only if $(i,t)$ is an edge of the graph $g$. \end{definition} \begin{definition} To a bipartite graph $g$ on $[m] \times T$, the possibly empty \emph{polyhedron of $g$} is \begin{equation}\label{eqn:pg.min} \mathcal{P}(g) = \{q \in \mathbb{TP}^{m-1}: q \in \mathcal{\underline{H}}_i(-t) \mbox{ for all } (i,t) \in g\}. \end{equation} By min-max duality, $\mathcal{P}(g)$ can be equivalently written as \begin{equation}\label{eqn:pg.max} \mathcal{P}(g) = \{q \in \mathbb{TP}^{m-1}: t \in \mathcal{\overline{H}}_i(-q) \mbox{ for all } (i,t) \in g\}. \end{equation} \end{definition} It is immediate that if a polyhedron $\mathcal{P}(g)$ is non-empty, then all points in its relative interior have the same covector with respect to $T$. Call this the \emph{basic covector} of $g$, denoted~$\nu(g)$. \begin{definition}\label{defn:basic} Say that a covector $\nu$ is basic, and that $\mathcal{P}(\nu)$ is a \emph{basic cell}, if $\nu = \nu(g)$ for some outcome function $g$. The set of basic cells of $T$ is $$\cell(T) = \{\mathcal{P}(\nu): \nu \mbox{ is a basic covector}\}.$$ The set union of the basic cells, denoted $$\basic(T) = \bigcup_{P \in \cell(T)}P.$$ will be called the \emph{basic set of $T$}. \end{definition} \input{TGMDfigure_basic.tex} \section{Auxiliary Results and Proof of the Main Theorem}\label{sec:proof} In this section, we prove Theorem \ref{thm:d-ic.classes} by establishing a series of lemmata and propositions. For readability, we split the Theorem into three propositions followed by their proofs. Proposition \ref{prop:covector.characterization} covers parts (1) and (2) of Theorem \ref{thm:d-ic.classes}. Parts (3) and (4) are covered by Propositions \ref{prop:generic} and \ref{prop:generic.approximation}, respectively. In the process we clarify all subtleties and discuss some examples to aide understanding. \subsection{Covectors and incentive compatibility} An outcome function $g: T \to [m]$ is onto, and each $t \in T$ must be assigned to an outcome. Thus, a bipartite graph $g$ is an outcome graph if and only if each node $t \in T$ has degree one, and each node $i \in [m]$ has degree at least one. The goal is to discern which outcome functions $g$ are IC. Proposition \ref{prop:covector.characterization} gives a characterization in terms of the covector of the polyhedron $\mathcal{P}(g)$. \begin{lemma}\label{lem:obs1} Let $g: T \to [m]$ be an outcome function. Then $\mathcal{P}(g)$ is the set of incentive compatible payments of $g$. In particular, $\mathcal{P}(g) \neq \emptyset$ if and only if $g$ is IC. \end{lemma} \begin{proof} Note that $p \in \mathcal{P}(g)$ if and only if for all $t \in g^{-1}(i) \subset T$ and all $j \in [m]$, $p_i - t_i \geq p_j - t_j.$ Thus $p$ is an incentive compatible payment of $g$. \end{proof} \begin{lemma}\label{lem:obs2} Let $h$ be a bipartite graph on $[m] \times T$. The following are equivalent. \begin{enumerate} \item $\mathcal{P}(h)$ is not empty, \item $h$ is contained as a subgraph in the covector of some cell of $\underline{\mathcal{H}}(-T)$, \item $\mathcal{P}(h) = \mathcal{P}(\nu(h))$ for the covector $\nu(h)$ of a point in the relative interior of $\mathcal{P}(h)$. \end{enumerate} \end{lemma} \begin{proof} Suppose (1). Let $p$ be a point in the relative interior. By definition of covector, all points in the relative interior of $\mathcal{P}(h)$ have the same covector. Let us denote this covector by $\nu(h)$. If $(i,t) \in h$, then $p \in \underline{\mathcal{H}}_i(-t)$, so $(i,t) \in \nu(h)$. Thus $h$ is contained in $\nu(h)$. This implies (2). In addition, it also implies $\mathcal{P}(\nu(h)) \subseteq \mathcal{P}(h)$, by definition of the polyhedra $\mathcal{P}(h)$ and $\mathcal{P}(\nu(h))$. Now, $\mathcal{P}(h)$ and $\mathcal{P}(\nu(h))$ are closed polyhedra. So if $\mathcal{P}(\nu(h))$ is a strict subset of $\mathcal{P}(h)$, then there must exists points in the relative interior of $\mathcal{P}(h)$ which do not belong to $\mathcal{P}(\nu(h))$, and in particular, cannot have covector $\nu(h)$. This is a contradiction, so $\mathcal{P}(\nu(h)) = \mathcal{P}(h)$. This establishes (3). Finally, (3) trivially implies (1). \end{proof} \begin{proposition}[Covector characterization]\label{prop:covector.characterization} Let $g: T \to [m]$ be an outcome function on a multiset $T$. Then $g$ is IC with payment $p \in \mathbb{TP}^{m-1}$ if and only if $\mathsf{\underline{coVec}}_T(p)$ contains $g$ as a subgraph. In this case, $\mathcal{P}(\nu(g))$ is the set of incentive compatible payments of $g$. \end{proposition} \begin{proof} By Lemma \ref{lem:obs1} the mechanism $(g, p)$ is IC if and only if $p\in \mathcal{P}(g)$. By Lemma \ref{lem:obs2} it is without loss to assume that $p$ is in the relative interior, with covector $\underline{\mathsf{coVec}}_T(p)$. It follows from the same lemma that $p\in \mathcal{P}(g)$ if and only if $g$ is contained in $\underline{\mathsf{coVec}}_T(p)$ and $\mathcal{P}(\underline{\mathsf{coVec}}_T(p)) = \mathcal{P}(g)$. \end{proof} In other words, to each IC outcome function there corresponds a basic cell containing its payments. Conversely, each basic cell can be associated with a set of IC outcome functions whose payments it contains. This set consists of precisely those outcome functions contained in the cell's covector. \input{TGMDfigure_basiccontinued.tex} \subsection{Basic cells via generic approximations} By Proposition \ref{prop:covector.characterization}, the set of basic cells $\cell(T)$ and its union, the basic set $\basic(T)$, encode the IC payments of any possible mechanism. We now study some properties of basic cells, starting with the case where $T$ is a multiset of generic points. Recall that this means there does not exist a subset of $2 \leq k \leq m$ points in $T$ whose projection onto $k$ coordinates lie on a tropical hyperplane in $\mathbb{TP}^{k-1}$. Thus, in particular, $T$ is a \emph{set}. \begin{proposition}\label{prop:generic} Suppose $T \subset \mathbb{TP}^{m-1}$ contains $r$ generic points. Then $\cell(T)$ is precisely the set of full-dimensional cells of $\underline{\mathcal{H}}(-T)$. In particular, the cardinality of $\cell(T)$ is $\binom{r-1}{m-1}$. \end{proposition} \begin{proof} By \cite[Corollary 12]{develin2004tropical}, $P = \mathcal{P}(\nu)$ is a full-dimensional cell of $\underline{\mathcal{H}}(-T)$ if and only if $\nu$ is an outcome graph whose polyhedron $\mathcal{P}(\nu)$ is non-empty. Thus, the set of full-dimensional cells of $\underline{\mathcal{H}}(-T)$ is a subset of $\cell(T)$. On the other hand, let $P = \mathcal{P}(\nu) \in \basic(T)$ be a basic cell with respect to some outcome graph $g$. Since $\nu$ is basic, $\nu = \nu(g) = g$, so $P$ is a full-dimensional cell of $\underline{\mathcal{H}}(-T)$. Finally, the cardinality follows from \cite[Corollary 25]{develin2004tropical}. \end{proof} To handle the case of a general multiset $T$ we use approximations by generic perturbations, which are common technique in tropical geometry, see \cite{maclagan2015introduction}. \begin{definition}\label{defn:generic} Suppose the multiset $T=\{t^1, \ldots t^r\}$ in $\mathbb{TP}^{m-1}$ consists of $r < \infty$ points, counting copies. A sequence $(T^k, k \geq 1)$ is called a \emph{generic perturbation} of $T$ if each set $T^k= \{ t^{k,1}, \ldots, t^{k,r}\} \subset \mathbb{TP}^{m-1}$ consists of generic points and $\lim_{k\to\infty}t^{k,i}=t^i$ for all $i\in [r]$. \end{definition} \begin{lemma}\label{lem:generic.limit} Suppose the multiset $T \subset \mathbb{TP}^{m-1}$ is finite, counting copies. Let $(T^k, k \geq 1)$ be a generic perturbation of $T$. Then $\sigma$ is a basic cell of $T$ if and only if there exists a sequence $(\sigma^k,k\geq 1)$, where $\sigma^k$ is a full-dimensional cell in $\underline{\mathcal{H}}(-T^k)$, such that $\lim_{k\to\infty}\mathsf{d_H}(\sigma^k,\sigma)=0$. \end{lemma} In other words, the basic cells of $\underline{\mathcal{H}}(-T)$ are limits as $k \to \infty$ of full-dimensional cells in $\underline{\mathcal{H}}(-T^k)$ with respect to the Hausdorff distance. For the following proof, we shall write $\nu_T(g)$ instead of the usual shorthand $\nu(g)$ to mean the basic covector of $g$ with respect to $T$. \begin{proof} Let $r$ be the number of points in the multiset $T$, counting copies. Enumerate the points $T = \{t^1, \ldots, t^r\}$. Let $T^k = \{t^{k,j}, j=1,\ldots,r\}$ be a generic perturbation from Definition \ref{defn:generic}. Suppose $\sigma^k\in \underline{\mathcal{H}}(-T^k)$ is a sequence of full-dimensional cells such that $\lim_{k\to\infty} \mathsf{d_H}(\sigma^k, \sigma)=0$. Let $\nu^k:=\underline{\mathsf{coVec}}_{T^k}(\sigma^k)$ be their covector. Each $\nu^k$ is a bipartite graph on $[m] \times [r]$. Since there are only finitely many such graphs, the sequence $(\nu^k,k\geq 1)$ contains a constant subsequence $\nu^{k'}=\nu'$ to which is associated the sequence $(\sigma^{k'}, k'\geq 1)$. Since each $\sigma^{k'}$ is full-dimensional, $\nu' = \nu_T(g)$ for some outcome function $g$. Evidently $\lim_{k'\to\infty} \mathsf{d_H}(\sigma^{k'}, \sigma) = 0$, so that $\sigma$ is a basic cell of $T$. Conversely, suppose $\sigma$ is a basic cell of $T$. A cell $\sigma$ of $\underline{\mathcal{H}}(-T)$ has the form \begin{equation}\label{eqn:cell.sigma} \sigma = \bigcap_{j=1}^r \underline{\mathcal{H}}_{I^j}(-t^j) \end{equation} for some subsets $I^j \subseteq [m]$, $j=1,\ldots,r$. Let $g^1, \ldots, g^n$ be all the IC outcome functions such that $\sigma = \mathcal{P}(\nu_T(g))$, for $g \in \{g^1, \ldots, g^n\}$. By (\ref{eqn:cell.sigma}) at least one such function exists. For each $k$ and each $i \in [n]$, consider the cell $\mathcal{P}(\nu_{T^k}(g^i))$ in $\underline{\mathcal{H}}(-T^k)$. Since $T^k$ is generic and $g^i$ is an outcome function, by Proposition \ref{prop:generic}, either this cell is empty or that it is full-dimensional. Let $\mathcal{Q}^k$ be the set of non-empty such cells, $$ \mathcal{Q}^k = \{\mathcal{P}(\nu_{T^k}(g^i)): \mathcal{P}(\nu_{T^k}(g^i)) \neq \emptyset, i =1,\ldots,n\}. $$ Since $T^k$ is a generic perturbation of $T$, $\mathcal{Q}^k \neq \emptyset$. For each $k$, choose an arbitrary cell $\sigma^k \in \mathcal{Q}^k$. But $\lim_{k\to \infty}t^{k,j} = t^j$ for all $j\in[r]$, implies $\lim_{k\to\infty}\mathsf{d_H}(\sigma^k, \sigma)=0$, so we are done. \end{proof} The approximation result below allows us to identify the basic cells of an infinite multiset $T$ as limit of finite approximations. For its proof it will be convenient to have another characterization of cells in $\underline{\mathcal{H}}(-T)$ using a generalization of \cite[Lemma 22]{develin2004tropical}. \begin{lemma}\label{lem:projection} Introduce variables $(z_t: t \in T)$. A polyhedron $\sigma$ is a cell of the tropical hyperplane arrangement $\underline{\mathcal{H}}(-T)$ with covector $\nu$ if and only if it is the projection onto the $y$ coordinate of the set $$B := \{(y, z): y_i + z_t \geq t_i \mbox{ for all } t \in T, i \in [m], y_i + z_t = t_i \mbox{ if } (i,t) \in \nu\}.$$ \end{lemma} \begin{proof} For each $y \in \sigma$, define $z(y)$ coordinate-wise by $$z_t(y) = \max_{k\in [m]}\{ t_k-y_k\}, \hspace{1em} t \in T.$$ By definition, $y \in \sigma$ if and only if $y_i - t_i \leq y_j - t_j$ for all $(i,t) \in \nu$. For each $y \in \sigma$, the pair $(y,z(y))$ belongs to $B$. Conversely, if $(y,z) \in B$ for some $z$, then $y_i - t_i \leq y_j - t_j$, so $y \in \sigma$. \end{proof} \begin{proposition} \label{prop:generic.approximation} Let $T \subset \mathbb{TP}^{m-1}$ be a multiset and $\sigma \in \underline{\mathcal{H}}(-T)$. Let $(T^k, k \geq 1)$ be a sequence of finite multisets, counting copies, such that $\lim_{k\to\infty}\mathsf{d}_H(T^k, T)=0 $. Then $\sigma\in\cell(T)$ if and only if there is a sequence of basic cells $\sigma^k \in \cell(T^k)$ such that $\lim_{k\to\infty}\mathsf{d_H}(\sigma^k,\sigma)=0$. \end{proposition} \begin{proof} Without loss of generality, one can assume that $T^k$ is an increasing sequence, i.e. $T^k \subseteq T$, and $T^k \subseteq T^{k+1}$ for all $k\geq 1$, and that the limit is dense in $T$. Let $\sigma$ be a cell of $T$ with covector $\nu$. Employing Lemma \ref{lem:projection}, we see that $\sigma$ is a polytope in $\mathbb{TP}^{m-1}$, where each $t \in T$ contributes a constraint of the form $$ y_i + z_t > t_i \mbox{ if } (i,t) \notin \nu, \hspace{1em} y_i + z_t = t_i \mbox{ if } (i,t) \in \nu. $$ In particular, if $t,t'$ are arbitrarily close, then $(i,t) \in \nu$ if and only if $(i,t') \in \nu$. This implies that the covector of $\sigma$ with respect to $T$ is completely determined by its covector with respect to a dense subset of $T$. This implies the result. \end{proof} We remark that by combining Proposition \ref{prop:generic} and \ref{prop:generic.approximation}, one can choose $T^k$ to be a finite, generic sequence that approximates $T$. This way, each basic cell of $T$ is the limit of a sequence of full-dimensional cells of an approximating sequence of max-plus tropical polytopes. This is particularly useful in specific examples, as full-dimensional cells of a generic approximation of $T$ are easy to identify. We conclude this section with some examples. \input{TGMDfigure_generic.tex} \input{TGMDfigure_limit.tex} \section{Mechanisms as Allocation Matrices}\label{sec:geometry} We now revisit Rochet's theorem using tropical geometry. Identify an outcome function $g$ with its allocation matrix $L^g$ defined in (\ref{eqn:allocation.matrix}). The main result of this section, Theorem~\ref{thm:geometry}, specifies the set of matrices that parametrizes all outcome functions on a given multiset $T\subseteq\mathbb{TP}^{m-1}$. It allows one to infer properties of $g$ from $L^g$, such as incentive compatibility, the set of IC payments, and the dimension of this set, \emph{without} computing cycle weights in$L^g$. This geometric insight allows us to easily construct examples of outcome functions, as illustrated in the examples below. In particular, Theorem \ref{thm:property.star} follows as an easy consequence. We introduce some notational shortcuts and definitions. For a matrix $L \in \R^{m \times m}$ with zero diagonal, let $L_1, \ldots, L_m \in \mathbb{TP}^{m-1}$ be the $m$ rows of $L$, viewed as vectors in $\mathbb{TP}^{m-1}$. For $j,k \in [m], j \neq k$, write $\overline{\mathcal{L}}_j$ for $\overline{\mathcal{H}}_j(-L_j)$. Let $\overline{\mathcal{L}}_j^\circ$ denote the interior of this cone. Write $\overline{\mathcal{L}}_{jk}$ for $\overline{\mathcal{H}}_{jk}(-L_j)$. As before, we use the underline notation to mean the analogous quantity in min-plus. For a matrix $L$, define the zero eigenspace of $L$ to be the possibly empty set \begin{equation}\label{eqn:eig0} \mathsf{Eig}_0(L) := \bigcap_{j=1}^m\underline{\mathcal{L}}_j. \end{equation} For a multiset $T \subseteq \mathbb{TP}^{m-1}$, say that $L$ is \emph{realizable with respect to $T$} if there exists some outcome function $g: T \to [m]$ such that $L = L^g$. In that case, say that $L$ is \emph{realized by $g$}. \begin{definition}\label{defn:seperating} For $j,k \in [m], j \neq k$, define $\mathcal{I}_{jk} = \mathcal{\overline{L}}_{jk}\cap T$. A \emph{$(j,k)$-witness} is a sequence $\{s^{j,r}: r \geq 1\} \subseteq T \cap \overline{\mathcal{L}}_j^\circ$ such that $$ \lim_{r \to \infty} \mathsf{d}(s^{j,r}, \mathcal{\overline{L}}_{jk} )=0.$$ We say that \emph{$L$ separates $T$ at $(j,k)$} if \begin{equation}\label{eqn:separate.t} \mathsf{d}(T \cap \mathcal{\overline{L}}_j, \mathcal{\overline{L}}_{jk})=0, \end{equation} and in addition, whenever $\mathcal{I}_{jk} = \mathcal{I}_{kj} = \{s\}$ for some $s \in \mathbb{TP}^{m-1}$, then there exists a $(j,k)$-witness or a $(k,j)$-witness. Say that \emph{$L$ separates $T$} if $L$ separates $T$ for all $j,k \in [m], j \neq k$. \end{definition} \begin{definition} For $p \in \mathbb{TP}^{m-1}$, the graph of $p$ (with respect to $T$) is the directed graph on $m$ nodes, with edge $(i,j)$ if and only if $$ \mathsf{d}(T\cap \overline{\mathcal{L}}_i,\overline{\mathcal{H}}_{ij}(-p)) = 0. $$ \end{definition} \begin{theorem}\label{thm:geometry} Let $L \in \R^{m \times m}$ be a matrix with zero diagonal, $T \subseteq \mathbb{TP}^{m-1}$ be a multiset. \begin{enumerate} \item $L$ is realizable if and only if $L$ separates $T$, and $$T \subseteq \bigcup_{k=1}^m \overline{\mathcal{L}}_k.$$ \item Suppose $L$ is realized by $g$. Then $g$ is weakly monotone if and only if the open sets $\overline{\mathcal{L}}^\circ_1, \ldots, \overline{\mathcal{L}}^\circ_m$ are pairwise disjoint. \item Suppose $L$ is realized by $g$. The set of incentive compatible payments of $g$ is $\mathsf{Eig}_0(L)$. In particular, $g$ is IC if and only if $\mathsf{Eig}_0(L) \neq \emptyset$. \item Suppose $L$ is realized by $g$ and $\mathsf{Eig}_0(L)\neq \emptyset$. Let $p$ be a point in the relative interior of $\mathsf{Eig}_0(L)$. Then the dimension of $\mathsf{Eig}_0(L)$ is the number of strongly connected components in the graph of $p$ with respect to $T$ minus 1. \end{enumerate} \end{theorem} We defer the proof to Section \ref{subsec:proof.geometry}. Instead, we illustrate the witnessing condition and the implications of the theorem with examples. They show that it is simple to construct mechanisms and verify realizability, incentive compatibility and revenue equivalence. \input{TGMDfigure_TL.tex} \input{TGMDfigure_realize.tex} \input{TGMDfigure_circle.tex} \input{TGMDfigure_re.tex} \subsection{Proofs of Theorem \ref{thm:geometry} and \ref{thm:property.star}} \label{subsec:proof.geometry} \begin{proof}[Proof of Theorem \ref{thm:geometry}, part (1)] Suppose $L$ is realized by $g$. For each $j = 1, 2, \ldots, m$, $g^{-1}(j) \subseteq \overline{\mathcal{L}}_j$, since $\max_{k \in [m]} (L_{jk} + t_k) = L_j \overline{\odot} t = t_j$. The sets $g^{-1}(1), \ldots, g^{-1}(m)$ partition $T$, so $T \subseteq \bigcup_{j=1}^m \overline{\mathcal{L}}_j$. It remains to show that $L$ separates $T$ at an arbitrary pair $\{j,k\}$, where $j, k \in [m], j\neq k$. We have that $\mathsf{d}(T \cap \mathcal{\overline{L}}_j, \mathcal{\overline{L}}_{jk})=0$ since $L_{jk} = \inf_{t \in g^{-1}(j)}\{t_j - t_k\}$. If $\mathcal{I}_{jk} = \mathcal{I}_{kj} = \{s\}$, then if $g(s) = j$, the infimum in the definition of $L_{kj}$ must be achieved by a $(k,j)$-witness, so there must exist a $(k,j)$-witness. Conversely, if $g(s) = k$, then there must exist a $(j,k)$-witness. This shows that $L$ separates $T$ at $\{j,k\}$, as desired. For the converse direction, suppose $L$ is a matrix with zero diagonal such that $T \subseteq \bigcup_{j=1}^m \overline{\mathcal{L}}_j$ and $L$ separates $T$. Define $g: T \to [m]$ as follows. For a point $t \in T \cap \overline{\mathcal{L}}_j^\circ$, let $g(t) = j.$ The remaining points must lie on $\bigcup_{j,k \in [m], j \neq k}\mathcal{I}_{jk}$ by definition of $\mathcal{I}_{jk}$'s. Assign these points such that points on $\mathcal{I}_{jk}$ have either outcome $j$ or $k$, and such that on every non-empty boundary $\mathcal{I}_{jk}$ there exists a point with outcome $j$. The only case where this cannot be done is if $\mathcal{I}_{jk} = \mathcal{I}_{kj} = \{s\}$. In this case, if there is a $(j,k)$-witness, set $g(s) = k$, else, since $L$ separates $T$, there must exists a $(k,j)$-witness, so set $g(s) = j$. We claim that $L$ is realized by $g$. Fix $j, k \in [m], j\neq k$. By definition of $g^{-1}(j)$, \begin{equation}\label{eqn:infimum.ell} \inf_{s \in g^{-1}(j)} (s_j - s_k) \geq L_{jk}. \end{equation} Furthermore, there must be a point in $\mathcal{I}_{jk}$ or a $(j,k)$-witness in $g^{-1}(j)$. So (\ref{eqn:infimum.ell}) holds with an equality, thus $L = L^g$, as claimed. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:geometry}, part (2)] Fix a pair of indices $j,k \in [m]$, $j \neq k$. We claim that \begin{align*} L_{jk} + L_{kj} > 0 &\Leftrightarrow \overline{\mathcal{L}}_j \cap \overline{\mathcal{L}}_k = \emptyset, \\ L_{jk} + L_{kj} = 0 &\Leftrightarrow \overline{\mathcal{L}}_j \cap \overline{\mathcal{L}}_k \mbox{ on their boundaries, i.e. } \overline{\mathcal{L}}_j \cap \overline{\mathcal{L}}_k = \partial\overline{\mathcal{L}}_j \cap \partial\overline{\mathcal{L}}_k \\ L_{jk} + L_{kj} < 0 & \Leftrightarrow \overline{\mathcal{L}}_j \cap \overline{\mathcal{L}}_k \mbox{ in their interiors, i.e. }\overline{\mathcal{L}}^\circ_j \cap \overline{\mathcal{L}}^\circ_k \neq \emptyset. \end{align*} This claim implies statement (4) by definition of weakly monotone. Now let us prove the claim. Note that $\overline{\mathcal{L}}_j$ and $\overline{\mathcal{L}}_k$ are closed polyhedra, so they either do not intersect, intersect on their boundaries, or intersect in their interiors. So it is sufficient to prove the last two equivalences in the statements. Suppose there exists $t \in \overline{\mathcal{L}}_j \cap \overline{\mathcal{L}}_k$. Then by definition of the sectors, $$ L_{jk} + L_{kj} \leq (t_j - t_k) + (t_k - t_j) = 0. $$ In particular, strict equality holds if and only if $t$ lies on the boundary of $\overline{\mathcal{L}}_j \cap \overline{\mathcal{L}}_k$, while strict inequality holds if and only if $t$ lies in either of their interiors. In that case, one can pick a $t' \in \overline{\mathcal{L}}^\circ_j \cap \overline{\mathcal{L}}^\circ_k$, then $L_{jk} + L_{kj} < (t'_j - t'_k) + (t'_k - t'_j) = 0$. This proves the desired statement. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:geometry}, part (3) and (4)] By definition, $$\mathsf{Eig}_0(L) = \{p \in \mathbb{TP}^{m-1}: L \odot p = p\}.$$ Part (3) of the theorem follows from uniqueness of the tropical eigenvalue \cite{Cg62}. For part (4), by Proposition \ref{prop:covector.characterization}, $\mathsf{Eig}_0(L^g) = \mathcal{P}(\nu(g))$, where $\nu(g) = \underline{\mathsf{coVec}}_T(p)$. Note that \begin{equation}\label{eqn:distance.boundary} \mathsf{d}(\overline{\mathcal{H}}_{ij}(-p), T\cap \overline{\mathcal{L}}_i) = \left(\inf_{t \in g^{-1}(i)} (t_i - t_j)\right) - (p_i-p_j) = L^g_{ij} - (p_i - p_j). \end{equation} Therefore, the graph of $p$ has edge $(i,j)$ if and only if $p_i - p_j = L^g_{ij}$. Form the matrix $L'$ via $L'_{ij} = L^g_{ij} - (p_i - p_j)$. Then $L'$ has eigenvalue 0, and any cycle in the graph of $p$ is a zero-length cycle. In tropical linear systems terminology, the graph of $p$ is the critical graph of $L'$. It follows from \cite[Theorem 4.3.3, 4.3.5]{butkovivc2010max} that the dimension of the eigenspace of $L'$ equals the number of connected components of $L'$. But $\mathsf{Eig}(L') = -p + \mathsf{Eig}(L^g)$, so $\mathsf{Eig}(L^g)$ has the same dimension. This proves the theorem. \end{proof} \begin{proof}[Proof of Theorem \ref{thm:property.star}] This follows immediately from Theorem \ref{thm:geometry}, part (4). If $T$ is RE, then for every $p \in \basic(T)$, its graph equals the graph of $L^g$ for some RE mechanism $(g,p)$, which is connected. Conversely, suppose the graph of every $p$ in $\basic(T)$ is strongly connected. Take a IC mechanism $(g,p)$, with $p$ in the relative interior of $\mathcal{P}(g)$. As its graph is connected, $\mathsf{Eig}_0(L^g) = \{p\}$, so $(g,p)$ is RE. \end{proof} \section{Acknowledgements} We wish to thank John Weymark for suggesting to explore possible connections of mechanism design to tropical geometry. Our geometric approach is inspired by his work with coauthors in \cite{cuff2012dominant}. Part of this work was written during the Hausdorff Center Conference ``Tropical Geometry and Economics''. We thank the participants for helpful discussions. The Hausdorff Center's role in catalyzing research in mathematical economics is gratefully acknowledged. Finally we thank Paul Edelman and John Weymark for pointing out an error in an earlier version, and Alexey Kushnir for generously sharing his manuscript. \bibliographystyle{plain}
{'timestamp': '2017-01-03T02:06:22', 'yymm': '1606', 'arxiv_id': '1606.04880', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04880'}
arxiv
\section{Experiments}\label{s:experiments} \begin{figure}[t] \centering \includegraphics[page=1, scale=0.45]{art/archs-consistent} \hfill \includegraphics[page=3, scale=0.45]{art/archs-consistent} \hfill \includegraphics[page=2, scale=0.45]{art/archs-consistent} \vspace{-0.2cm} \caption{ Our proposed architectures predict the parameters of a network from a single example, replacing static convolutions (green) with dynamic convolutions (red). The siamese learnet predicts the parameters of an embedding function that is applied to both inputs, whereas the single-stream learnet predicts the parameters of a function that is applied to the other input. Linear layers are denoted by $*$ and nonlinear layers by $\sigma$. Dashed connections represent parameter sharing. } \vspace{-0.3cm} \label{fig:archs} \end{figure} We evaluate learnets against baseline one-shot architectures (\cref{s:arch}) on two one-shot learning problems in Optical Character Recognition (OCR; \cref{sec:omniglot}) and visual object tracking (\cref{sec:tracking}). \subsection{Architectures}\label{s:arch} As noted in \cref{s:method}, the closest competitors to our method in discriminative one-shot learning are embedding learning using siamese architectures. Therefore, we structure the experiments to compare against this baseline. In particular, we choose to implement learnets using similar network topologies for a fairer comparison. The baseline siamese architecture comprises two parallel streams $\varphi(x;W)$ and $\varphi(z;W)$ composed of a number of layers, such as convolution, max-pooling, and ReLU, sharing parameters $W$ (\cref{fig:archs}.a). The outputs of the two streams are compared by a layer $\Gamma(\varphi(x;W),\varphi(z;W))$ computing a measure of similarity or dissimilarity. We consider in particular: the dot product $\langle a,b\rangle$ between vectors $a$ and $b$, the Euclidean distance $\|a-b\|$, and the weighted $l^1$-norm $\|w \odot a - w \odot b\|_1$ where $w$ is a vector of learnable weights and $\odot$ the Hadamard product). The first modification to the siamese baseline is to use a learnet to predict some of the intermediate shared stream parameters (\cref{fig:archs}.b). In this case $W = \omega(z;W')$ and the siamese architecture writes $\Gamma(\varphi(x;\omega(z;W')),\varphi(z;\omega(z;W')))$. Note that the siamese parameters are still the same in the two streams, whereas the learnet is an entirely new subnetwork whose purpose is to map the exemplar image to the shared weights. We call this model the \emph{siamese learnet}. The second modification is a \emph{single-stream learnet} configuration, using only one stream $\varphi$ of the siamese architecture and predicting its parameter using the learnet $\omega$. In this case, the comparison block $\Gamma$ is reinterpreted as the last layer of the stream $\varphi$ (\cref{fig:archs}.c). Note that: i) the single predicted stream and learnet are asymmetric and with different parameters and ii) the learnet predicts both the final comparison layer parameters $\Gamma$ as well as intermediate filter parameters. The single-stream learnet architecture can be understood to predict a discriminant function from one example, and the siamese learnet architecture to predict an embedding function for the comparison of two images. These two variants demonstrate the versatility of the dynamic convolutional layer from~\cref{eq:fc-fac}. Finally, in order to ensure that any difference in performance is not simply due to the asymmetry of the learnet architecture or to the induced filter factorizations (\cref{sub:fc-fac} and \cref{sub:c-fac}), we also compare \emph{unshared} siamese nets, which use distinct parameters for each stream, and \emph{factorized} siamese nets, where convolutions are replaced by factorized convolutions as in learnet. \input{omniglot} \input{tracking} \subsection{Character recognition in foreign alphabets}\label{sec:omniglot} \begin{figure}[t] \centering \input{vis/omniglot-oneshot/figure} \vspace{-0.1cm} \caption{ The predicted filters and the output of a dynamic convolutional layer in a single-stream learnet trained for the OCR task. Different exemplars~$z$ define different filters $w(z)$. Applying the filters of each exemplar to the same input~$x$ yields different responses (although in typical operation, the network defined by a single exemplar is applied to many other inputs). Best viewed in colour. } \vspace{-0.2cm} \label{fig:omniglot-activations} \end{figure} \begin{table}[t] \centering \begin{tabular}{l c c c c} \hline & Inner-product (\%) & Euclidean dist.\ (\%) & Weighted $\ell^{1}$ dist.\ (\%) \\ \hline Siamese (shared) & 48.5 & 37.3 & 41.8 \\ Siamese (unshared) & 47.0 & 41.0 & 34.6 \\ Siamese (unshared, factorized) & 48.4 & -- & 33.6 \\ Siamese learnet (shared) & 51.0 & 39.8 & 31.4 \\ Learnet & 43.7 & 36.7 & {\bf 28.6} \\ \hline \end{tabular} \caption{ Error rate for character recognition in foreign alphabets (chance is 95\%). } \label{tab:omniglot-error} \vspace{-0.5cm} \end{table} This section describes our experiments in one-shot learning on OCR. For this, we use the Omniglot dataset~\cite{lake2015human}, which contains images of handwritten characters from 50 different alphabets. These alphabets are divided into 30 \emph{background} and 20 \emph{evaluation} alphabets. The associated one-shot learning problem is to develop a method for determining whether, given any single exemplar of a character in an evaluation alphabet, any other image in that alphabet represents the same character or not. Importantly, all methods are trained using only background alphabets and tested on the evaluation alphabets. \paragraph{Dataset and evaluation protocol.} Character images are resized to $28 \times 28$ pixels in order to be able to explore efficiently several variants of the proposed architectures. There are exactly 20 sample images for each character, and an average of 32 characters per alphabet. The dataset contains a total of 19,280 images in the background alphabets and 13,180 in the evaluation alphabets. Algorithms are evaluated on a series of recognition problems. Each recognition problem involves identifying the image in a set of 20 that shows the same character as an exemplar image (there is always exactly one match). All of the characters in a single problem belong to the same alphabet. At test time, given a collection of characters $(x_{1}, \dots, x_{m})$, the function is evaluated on each pair $(z, x_{i})$ and the candidate with the highest score is declared the match. In the case of the learnet architectures, this can be interpreted as obtaining the parameters $W = \omega(z; W')$ and then evaluating a static network $\varphi(x_{i}; W)$ for each $x_{i}$. \paragraph{Architecture.} The baseline stream $\varphi$ for the siamese, siamese learnet, and single-stream learnet architecture consists of 3 convolutional layers, with $2\times2$ max-pooling layers of stride 2 between them. The filter sizes are $5 \times 5 \times 1 \times 16$, $5 \times 5 \times 16 \times 64$ and $4 \times 4 \times 64 \times 512$. For both the siamese learnet and the single-stream learnet, $\omega$ consists of the same layers as $\varphi$, except the number of outputs is 1600 -- one for each element of the 64 predicted filters (of size $5 \times 5$). To keep the experiments simple, we only predict the parameters of one convolutional layer. We conducted cross-validation to choose the predicted layer and found that the second convolutional layer yields the best results for both of the proposed variants. Siamese nets have previously been applied to this problem by Koch et al.~\cite{koch2016siamese} using much deeper networks applied to images of size $105 \times 105$. However, we have restricted this investigation to relatively shallow networks to enable a thorough exploration of the parameter space. A more powerful algorithm for one-shot learning, Hierarchical Bayesian Program Learning~\cite{lake2015human}, is able to achieve human-level performance. However, this approach involves computationally expensive inference at test time, and leverages extra information at training time that describes the strokes drawn by the human author. \paragraph{Learning.} Learning involves minimizing the objective function specific to each method (\eg~\cref{eq:optim} for learnet and~\cref{eq:siamese-optim} for siamese architectures) and uses stochastic gradient descent (SGD) in all cases. As noted in \cref{s:method}, the objective is obtained by sampling triplets $(z_i,x_i,\ell_i)$ where exemplars $z_i$ and $x_i$ are congruous ($\ell_i=+1$) or incongruous ($\ell_i=-1$) with 50\% probability. We consider 100,000 random pairs for training per epoch, and train for 60 epochs. We conducted a random search to find the best hyper-parameters for each algorithm (initial learning rate and geometric decay, standard deviation of Gaussian parameter initialization, and weight decay). \paragraph{Results and discussion.} \Cref{tab:omniglot-error} shows the classification error obtained using variants of each architecture. A dash indicates a failure to converge given a large range of hyper-parameters. The two learnet architectures combined with the weighted $\ell^{1}$ distance are able to achieve significantly better results than other methods. The best architecture reduced the error from 37.3\% for a siamese network with shared parameters to 28.6\% for a single-stream learnet. While the Euclidean distance gave the best results for siamese networks with shared parameters, better results were achieved by learnets (and siamese networks with unshared parameters) using a weighted $\ell^{1}$ distance. In fact, none of the alternative architectures are able to achieve lower error under the Euclidean distance than the shared siamese net. The dot product was, in general, less effective than the other two metrics. The introduction of the factorization in the convolutional layer might be expected to improve the quality of the estimated model by reducing the number of parameters, or to worsen it by diminishing the capacity of the hypothesis space. For this relatively simple task of character recognition, the factorization did not seem to have a large effect. \subsubsection{0pt}{6pt plus 0pt minus 2pt}{0pt plus 0pt minus 2pt} \crefname{section}{sect.}{sect.} \crefname{equation}{eq.}{eq.} \crefname{table}{tab.}{tab.} \crefname{figure}{fig.}{fig.} \input{macros} \title{Learning feed-forward one-shot learners} \author{ Luca Bertinetto\thanks{The first three authors contributed equally, and are listed in alphabetical order.}\\ Torr Vision Group\\ University of Oxford\\ \texttt{[email protected]}\\ \And João F. Henriques\footnotemark[1]\\ Visual Geometry Group\\ University of Oxford\\ \texttt{[email protected]}\\ \And Jack Valmadre\footnotemark[1]\\ Torr Vision Group\\ University of Oxford\\ \texttt{[email protected]}\\ \And Philip H. S. Torr\\ Torr Vision Group\\ University of Oxford\\ \texttt{[email protected]}\\ \And Andrea Vedaldi\\ Visual Geometry Group\\ University of Oxford\\ \texttt{[email protected]} } \begin{document} \maketitle \begin{abstract} One-shot learning is usually tackled by using generative models or discriminative embeddings. Discriminative methods based on deep learning, which are very effective in other learning scenarios, are ill-suited for one-shot learning as they need large amounts of training data. In this paper, we propose a method to learn the parameters of a deep model in one shot. We construct the learner as a second deep network, called a learnet, which predicts the parameters of a pupil network from a single exemplar. In this manner we obtain an efficient feed-forward one-shot learner, trained end-to-end by minimizing a one-shot classification objective in a learning to learn formulation. In order to make the construction feasible, we propose a number of factorizations of the parameters of the pupil network. We demonstrate encouraging results by learning characters from single exemplars in Omniglot, and by tracking visual objects from a single initial exemplar in the Visual Object Tracking benchmark. \end{abstract} \section{Introduction}\label{s:intro} Deep learning methods have taken by storm areas such as computer vision, natural language processing, and speech recognition. One of their key strengths is the ability to leverage large quantities of labelled data and extract meaningful and powerful representations from it. However, this capability is also one of their most significant limitations since using large datasets to train deep neural network is not just an option, but a necessity. It is well known, in fact, that these models are prone to overfitting. Thus, deep networks seem less useful when the goal is to learn a new concept on the fly, from a few or even a single example as in one shot learning. These problems are usually tackled by using generative models~\cite{rezende2016one,lake2015human} or, in a discriminative setting, using ad-hoc solutions such as exemplar support vector machines (SVMs)~\cite{malisiewicz11ensemble}. Perhaps the most common discriminative approach to one-shot learning is to learn off-line a deep \emph{embedding function} and then to define on-line simple classification rules such as nearest neighbors in the embedding space~\cite{fan2014learning,parkhi2015deep,lin2015bilinear}. However, computing an embedding is a far cry from learning a model of the new object. In this paper, we take a very different approach and ask whether we can induce, from a single supervised example, a \emph{full, deep discriminative model} to recognize other instances of the same object class. Furthermore, we do not want our solution to require a lengthy optimization process, but to be computable on-the-fly, efficiently and in one go. We formulate this problem as the one of learning a deep neural network, called a \emph{\learnet}, that, given a single exemplar of a new object class, predicts the parameters of a second network that can recognize other objects of the same type. Our model has several elements of interest. Firstly, if we consider learning to be any process that maps a set of images to the parameters of a model, then it can be seen as a ``learning to learn'' approach. Clearly, learning from a single exemplar is only possible given sufficient prior knowledge on the learning domain. This prior knowledge is incorporated in the \learnet in an off-line phase by solving millions of small one-shot learning tasks and back-propagating errors end-to-end. Secondly, our \learnet provides a feed-forward learning algorithm that extracts from the available exemplar the final model parameters in one go. This is different from iterative approaches such as exemplar SVMs or complex inference processes in generative modeling. It also demonstrates that deep neural networks can learn at the ``meta-level'' of predicting filter parameters for a second network, which we consider to be an interesting result in its own right. Thirdly, our method provides a competitive, efficient, and practical way of performing one-shot learning using discriminative methods. The rest of the paper is organized as follows. \Cref{s:related} discusses the works most related to our. \Cref{s:method} describes the \emph{learnet} approaches and nuances in its implementation. \Cref{s:experiments} demonstrates empirically the potential of the method in image classification and visual tracking tasks. Finally, \cref{s:conc} summarizes our findings. \subsection{Related work}\label{s:related} Our work is related to several others in the literature. However, we believe to be the first to look at methods that can learn the parameters of complex discriminative models in one shot. One-shot learning has been widely studied in the context of generative modeling, which unlike our work is often \emph{not} focused on solving discriminative tasks. One very recent example is by Rezende et al. \cite{rezende2016one}, which uses a recurrent spatial attention model to generate images, and learns by optimizing a measure of reconstruction error using variational inference \cite{kingma2013auto}. They demonstrate results by sampling images of novel classes from this generative model, not by solving discriminative tasks. Another notable work is by Lake et al. \cite{lake2015human}, which instead uses a probabilistic program as a generative model. This model constructs written characters as compositions of pen strokes, so although more general programs can be envisioned, they demonstrate it only on Optical Character Recognition (OCR) applications. A different approach to one-shot-learning is to learn an embedding space, which is typically done with a siamese network \cite{bromley1993signature}. Given an exemplar of a novel category, classification is performed in the embedding space by a simple rule such as nearest-neighbor. Training is usually performed by classifying pairs according to distance \cite{fan2014learning}, or by enforcing a distance ranking with a triplet loss \cite{parkhi2015deep}. A variant is to combine embeddings using the outer-product, which yields a bilinear classification rule \cite{lin2015bilinear}. The literature on zero-shot learning (as opposed to one-shot learning) has a different focus, and thus different methodologies. It consists of learning a new object class without \emph{any} example image, but based solely on a description such as binary attributes or text. It is usually framed as a modality transfer problem and solved through transfer learning \cite{socher2013zero}. The general idea of predicting parameters has been explored before by Denil et al. \cite{denil2013predicting}, who showed that it is possible to linearly predict as much as 95\% of the parameters in a layer given the remaining 5\%. This is a very different proposition from ours, which is to predict \emph{all} of the parameters of a layer given an external exemplar image, and to do so non-linearly. Our proposal allows generating all the parameters from scratch, generalizing across tasks defined by different exemplars, and can be seen as a network that effectively ``learns to learn''. \section{One-shot learning as dynamic parameter prediction}\label{s:method} Since we consider one-shot learning as a discriminative task, our starting point is standard discriminative learning. It generally consists of finding the parameters $W$ that minimize the average loss $\mathcal{L}$ of a predictor function $\varphi(x;\, W)$, computed over a dataset of $n$ samples $x_{i}$ and corresponding labels $\ell_{i}$: \begin{equation}\label{eq:std-optim} \min_{W}\frac{1}{n}\sum_{i=1}^n\mathcal{L}(\varphi(x_{i};\, W),\,\ell_{i}). \end{equation} Unless the model space is very small, generalization also requires constraining the choice of model, usually via regularization. However, in the extreme case in which the goal is to learn $W$ from a single exemplar $z$ of the class of interest, called \emph{one-shot learning}, even regularization may be insufficient and additional prior information must be injected into the learning process. The main challenge in discriminative one-shot learning is to find a mechanism to incorporate domain-specific information in the learner, \ie \emph{learning to learn}. Another challenge, which is of practical importance in applications of one-shot learning, is to avoid a lengthy optimization process such as~\cref{eq:std-optim}. We propose to address both challenges by learning the parameters $W$ of the predictor from a single exemplar $z$ using a meta-prediction process, \ie a non-iterative feed-forward function $\omega$ that maps $(z;\, W')$ to $W$. Since in practice this function will be implemented using a deep neural network, we call it a \emph{learnet}. The learnet depends on the exemplar $z$, which is a single representative of the class of interest, and contains parameters $W'$ of its own. Learning to learn can now be posed as the problem of optimizing the learnet meta-parameters $W'$ using an objective function defined below. Furthermore, the feed-forward learnet evaluation is much faster than solving the optimization problem~\eqref{eq:std-optim}. In order to train the learnet, we require the latter to produce good predictors given any possible exemplar $z$, which is empirically evaluated as an average over $n$ training samples $z_{i}$: \begin{equation}\label{eq:optim} \min_{W'}\frac{1}{n}\sum_{i=1}^n\mathcal{L}(\varphi(x_{i};\,\omega(z_{i};\, W')),\,\ell_{i}). \end{equation} In this expression, the performance of the predictor extracted by the learnet from the exemplar $z_i$ is assessed on a single ``validation'' pair $(x_i,\ell_i)$, comprising another exemplar and its label $\ell_i$. Hence, the training data consists of triplets $(x_{i},z_{i},\ell_{i})$. Notice that the meaning of the label $\ell_{i}$ is subtly different from~\cref{eq:std-optim} since the class of interest changes depending on the exemplar $z_{i}$: $\ell_{i}$ is positive when $x_i$ and $z_i$ belong to the same class and negative otherwise. Triplets are sampled uniformly with respect to these two cases. Importantly, the parameters of the original predictor $\varphi$ of \cref{eq:std-optim} now change dynamically with each exemplar $z_{i}$. Note that the training data is reminiscent of that of siamese networks~\cite{bromley1993signature}, which also learn from labeled sample pairs. However, siamese networks apply the same model $\varphi(x;\, W)$ with shared weights $W$ to both $x_{i}$ and $z_{i}$, and compute their inner-product to produce a similarity score: \begin{equation}\label{eq:siamese-optim} \min_{W}\frac{1}{n}\sum_{i=1}^n\mathcal{L}(\langle\varphi(x_{i};\, W),\,\varphi(z_{i};\, W)\rangle,\,\ell_{i}). \end{equation} There are two key differences with our model. First, we treat $x_{i}$ and $z_{i}$ asymmetrically, which results in a different objective function. Second, and most importantly, the output of $\omega(z;\, W')$ is used to parametrize linear layers that determine the intermediate representations in the network $\varphi$. This is significantly different to computing a single inner product in the last layer (\cref{eq:siamese-optim}). A similar argument can be made of bilinear networks~\cite{lin2015bilinear}. \Cref{eq:optim} specifies the optimization objective of one-shot learning as dynamic parameter prediction. By application of the chain rule, backpropagating derivatives through the computational blocks of $\varphi(x;\, W)$ and $\omega(z;\, W')$ is no more difficult than through any other standard deep network. Nevertheless, when we dive into concrete implementations of such models we face a peculiar challenge, discussed next. \subsection{The challenge of naive parameter prediction}\label{sub:naive} In order to analyse the practical difficulties of implementing a learnet, we will begin with one-shot prediction of a fully-connected layer, as it is simpler to analyse. This is given by \begin{equation} y=Wx+b,\label{eq:linear-layer} \end{equation} given an input $x\in\R^{d}$, output $y\in\R^{k}$, weights $W\in\R^{d\times k}$ and biases $b\in\R^{k}$. We now replace the weights and biases with their functional counterparts, $w(z)$ and $b(z)$, representing two outputs of the learnet $\omega(z;\, W')$ given the exemplar $z\in\R^{m}$ as input (to avoid clutter, we omit the implicit dependence on $W'$): \begin{equation}\label{eq:fc} y=w(z)x+b(z). \end{equation} While \cref{eq:fc} seems to be a drop-in replacement for linear layers, careful analysis reveals that it scales extremely poorly. The main cause is the unusually large output space of the learnet $w:\R^{m}\rightarrow\R^{d\times k}$. For a comparable number of input and output units in a linear layer ($d\simeq k$), the output space of the learnet grows \emph{quadratically }with the number of units. While this may seem to be a concern only for large networks, it is actually extremely difficult also for networks with few units. Consider a simple linear learnet $w(z)=W'z$. Even for a very small fully-connected layer of only 100 units ($d=k=100$), and an exemplar $z$ with 100 features ($m=100$), the learnet already contains 1M parameters that must be learned. Overfitting and space and time costs make learning such a regressor infeasible. Furthermore, reducing the number of features in the exemplar can only achieve a small constant-size reduction on the total number of parameters. The bottleneck is the quadratic size of the \emph{output space} $dk$, not the size of the input space $m$. \subsection{Factorized linear layers}\label{sub:fc-fac} A simple way to reduce the size of the output space is to consider a factorized set of weights, by replacing \cref{eq:fc} with: \begin{equation} y=M'\operatorname{diag}\left(w(z)\right)Mx+b(z).\label{eq:fc-fac} \end{equation} The product $M'\mathrm{diag}\left(w(z)\right)M$ can be seen as a factorized representation of the weights, analogous to the Singular Value Decomposition. The matrix $M\in\R^{d\times d}$ projects $x$ into a space where the elements of $w(z)$ represent disentangled factors of variation. The second projection $M'\in\R^{d\times k}$ maps the result back from this space. Both $M$ and $M'$ contain additional parameters to be learned, but they are modest in size compared to the case discussed in \cref{sub:naive}. Importantly, the one-shot branch $w(z)$ now only has to predict a set of diagonal elements (see \cref{eq:fc-fac}), so its output space grows linearly with the number of units in the layer (\ie $w(z)$: $\R^{m}\rightarrow\R^{d}$). \subsection{Factorized convolutional layers}\label{sub:c-fac} \begin{figure}[t] \begin{center} \includegraphics[width=0.6\textwidth]{art/one-shot-conv.pdf} \end{center} \vspace{-0.4cm} \caption{ Factorized convolutional layer (\cref{eq:conv-fac}). The channels of the input $x$ are projected to the factorized space by $M$ (a $1\times1$ convolution), the resulting channels are convolved independently with a corresponding filter prediction from $w(z)$, and finally projected back using $M'$. } \label{fig:one-shot-conv} \vspace{-0.2cm} \end{figure} The factorization of \cref{eq:fc-fac} can be generalized to convolutional layers as follows. Given an input tensor $x\in\R^{r\times c\times d}$, weights $W\in\R^{f\times f\times d\times k}$ (where $f$ is the filter support size), and biases $b\in\R^{k}$, the output $y\in\R^{r'\times c'\times k}$ of the convolutional layer is given by \begin{equation}\label{eq:conv-layer} y=W*x+b, \end{equation} where $*$ denotes convolution, and the biases $b$ are applied to each of the $k$ channels. Projections analogous to $M$ and $M'$ in \cref{eq:fc-fac} can be incorporated in the filter bank in different ways and it is not obvious which one to pick. Here we take the view that $M$ and $M'$ should disentangle the feature channels (\ie third dimension of $x$), allowing $w(z)$ to choose which filter to apply to each channel. As such, we consider the following factorization: \begin{equation} y=M'*w(z) \diagconv M*x+b(z),\label{eq:conv-fac} \end{equation} where $M\in\R^{1\times1\times d\times d}$, $M'\in\R^{1\times1\times d\times k}$, and $w(z)\in\R^{f\times f\times d}$. Convolution with subscript $d$ denotes independent filtering of $d$ channels, i.e. each channel of $x \diagconv y$ is simply the convolution of the corresponding channel in $x$ and $y$. In practice, this can be achieved with filter tensors that are diagonal in the third and fourth dimensions, or using $d$ filter groups \cite{krizhevsky2012imagenet}, each group containing a single filter. An illustration is given in \cref{fig:one-shot-conv}. The predicted filters $w(z)$ can be interpreted as a filter basis, as described in the supplementary material (sec.~A). Notice that, under this factorization, the number of elements to be predicted by the one-shot branch $w(z)$ is only $f^{2}d$ (the filter size $f$ is typically very small, e.g. 3 or 5 \cite{fan2014learning,wang2015transferring}). Without the factorization, it would be $f^{2}dk$ (the number of elements of $W$ in \cref{eq:conv-layer}). Similarly to the case of fully-connected layers (\cref{sub:fc-fac}), when $d\simeq k$ this keeps the number of predicted elements from growing quadratically with the number of channels, allowing them to grow only linearly. Examples of filters that are predicted by learnets are shown in figs.~\ref{fig:omniglot-activations} and \ref{fig:tracking-activations}. The resulting activations confirm that the networks induced by different exemplars do indeed possess different internal representations of the same input. \input{experiments} \section{Conclusions}\label{s:conc} In this work, we have shown that it is possible to obtain the parameters of a deep neural network using a single, feed-forward prediction from a second network. This approach is desirable when iterative methods are too slow, and when large sets of annotated training samples are not available. We have demonstrated the feasibility of feed-forward parameter prediction in two demanding one-shot learning tasks in OCR and visual tracking. Our results hint at a promising avenue of research in ``learning to learn'' by solving millions of small discriminative problems in an offline phase. Possible extensions include domain adaptation and sharing a single learnet between different pupil networks. \bibliographystyle{abbrv} \section{Architecture} \section{Basis filters} This appendix provides an additional interpretation for the role of the predicted filters in a factorized convolutional layer (Section \ref{sub:c-fac}). To make the presentation succint, we will use a notation that is slightly different from the main text. Let $x$ be a tensor of activations, then $x_{i}$ denotes channel $i$ of $x$. If $a$ is a multi-channel filter, then $a_{i j}$ denotes the filter for output channel $i$ and input channel $j$. That is, if $a$ is $m \times n \times p \times q$ then $a_{i j}$ is $m \times n$ for $i \in [p]$, $j \in [q]$. The set $\{1, \dots, n\}$ is denoted $[n]$. The factorised convolution is \begin{equation} y = A x = M' W M x \enspace . \end{equation} where $M$ and $M'$ are pixel-wise projections and $W$ is a diagonal convolution. While a general convolution computes \begin{equation} \textstyle (A v)_{i} = \sum_{j} a_{i j} * v_{j} \end{equation} where each $a_{i j}$ is a single-channel filter, a diagonal convolution computes \begin{equation} \textstyle (W v)_{i} = w_{i} * v_{i} \end{equation} where each $w_{i}$ is a single-channel filter, and a pixel-wise projection computes \begin{equation} \textstyle (M v)_{i} = \sum_{j} m_{i j} v_{j} \end{equation} where each $m_{i j}$ is a scalar. Let $q$ be the number of channels of $x$, let $p$ be the number of channels of $y$ and let $r$ be the number of channels of the intermediate activations. Combining the above gives \begin{align} \textstyle (W M x)_{k} & \textstyle = w_{k} * \left(\sum_{j \in [q]} m_{k j} x_{j}\right) = \sum_{j \in [q]} m_{k j} w_{k} * x_{j} \\ (M' W M x)_{i} & \textstyle = \sum_{k \in [r]} m'_{i k} \left(\sum_{j \in [q]} m_{k j} w_{k} * x_{j}\right) = \sum_{j \in [q]} \left(\sum_{k \in [r]} m'_{i k} m_{k j} w_{k}\right) * x_{j} \enspace . \end{align} This is therefore equivalent to a general convolution $y = A x$ where each filter $a_{i j}$ is a combination of $r$ single-channel basis filters $w_{k}$ \begin{equation} \textstyle a_{i j} = \sum_{k \in [r]} m'_{i k} m_{k j} w_{k} \end{equation} The predictions used in the dynamic convolution (Section \ref{sub:c-fac}) essentially modify these $r$ basis filters. \clearpage{} \section{Additional results on object tracking} \label{supp:tracking} \renewcommand{\arraystretch}{1.3} \begin{table}[h] \scriptsize \centering \begin{tabular}{l c c c c c} \hline \multicolumn{1}{c}{\textbf{Architecture}} & \multicolumn{3}{c}{\textbf{Validation (training) error}} & \multicolumn{2}{c}{\textbf{VOT2015 scores}}\\ Variant & Displacement & Classification & Objective & Accuracy & Failures\\ \hline Siamese ($\varphi$=B) & 7.40 (6.26) & 0.426 (0.0766) & 0.156 (0.0903) & 0.465 & 105\\ Siamese ($\varphi$=B; unshared) & 9.29 (6.95) & 0.514 (0.120) & \textbf{0.137} (0.0910) & 0.447 & 131\\ Siamese ($\varphi$=B; factorised) & 8.58 (7.85) & 0.564 (0.160) & 0.141 (0.104) & 0.444 & 138\\ Siamese learnet ($\varphi$=B; $\omega$=A) & 7.19 (\underline{\textbf{5.86}}) & 0.356 (0.0627) & \textbf{0.137} (0.0763) & \underline{\textbf{0.500}} & \underline{\textbf{87}}\\ Siamese learnet ($\varphi$=B; $\omega$=B) & \underline{\textbf{7.11}} (5.89) & \textbf{0.351} (\underline{\textbf{0.0515}}) & 0.141 (\underline{\textbf{0.0762}}) & 0.497 & 93\\ \hline Siamese ($\varphi$=C) & 8.13 (7.5) & 0.589 (0.192) & 0.157 (0.112) & 0.466 & 120\\ Siamese ($\varphi$=C; factorised) & 9.80 (8.96) & 0.539 (0.277) & 0.141 (0.117) & 0.435 & 132\\ Siamese learnet ($\varphi$=C; $\omega$=A) & 7.51 (\textbf{6.49}) & 0.389 (\textbf{0.0863}) & \underline{\textbf{0.134}} (\textbf{0.0856}) & 0.483 & \textbf{105}\\ Siamese learnet ($\varphi$=C; $\omega$=C) & \textbf{7.47} (6.96) & \underline{\textbf{0.326}} (0.118) & 0.142 (0.0940) & \textbf{0.491} & 106\\ \hline \end{tabular} \caption{Architectures are grouped by size of the main network. In addition to the official measures of the VOT toolkit, we report validation and training error for two measures that we use, together with the objective, to monitor the training phase. The displacement error measures the average euclidean distance between the peak of the output of the cross-correlation layer (the response) and the ground truth. The classification error, instead, expresses the likelihood that a random positive pair presents a response magnitude that is higher than the one of a random negative pair. For each group, the best entry for each column is in bold. Best overall entries are underlined.} \label{tab:tracking-error} \end{table} \begin{figure}[h] \centering \includegraphics[width=0.99\textwidth]{art/vot15_appendix.pdf} \caption{Accuracy-Robustness ranking plot (as produced by the VOT toolkit) for all the 62 trackers that participated to the VOT 2015~\cite{kristan2015visual} challenge. Note that these rankings are produced based on a statistical method described in \cite{kristan2015visual}, and being relative rankings they are not comparable across papers; for this reason we supply the raw (absolute) metrics in the main paper. We use the variant B+A of our proposed (siamese) learnet. Best trackers are closer to the top right corner of the plot. Despite being only a proof-of-concept without online update of the model nor temporal constraints, our method is among the best. We remark that the top-ranking tracker, MDNet~\cite{nam2015mdnet}, fine-tunes a network with SGD during tracking, which is computationally expensive (1 frame per second on a GPU), while all our networks operate in feed-forward mode during tracking and run at at least 60 FPS. Moreover, MDNet is trained on videos from other benchmarks that are very similar to the ones of the test set, practice which has since been prohibited by the VOT committee.} \label{fig:tracking_snapshots} \end{figure} \begin{figure}[h] \centering \includegraphics[width=0.99\textwidth]{art/vot15_snapshots.pdf} \caption{Bounding box outputs of our tracker using the variant siamese learnet B+A. Even if our method uses exclusively the first frame as exemplar and does not perform any form of online update, it is robust to challenging tracking situations like change of appearance, motion blur and scale change. The snapshots have always been generated from frames 1, 100, 200 and 400. All the sequences belong to the VOT15 benchmark. From top to bottom: \emph{iceskater2}, \emph{basketball}, \emph{car1}, \emph{girl}, \emph{helicopter}, \emph{gymnastics1}, \emph{road} and \emph{pedestrian2}.} \label{fig:tracking_snapshots} \end{figure} \subsection{Object tracking}\label{sec:tracking} The task of single-target object tracking requires to locate an object of interest in a sequence of video frames. A video frame can be seen as a collection $\mathcal{F} =\{w_1,\dots,w_K\}$ of image windows; then, in a one-shot setting, given an exemplar $z\in\mathcal{F}_1$ of the object in the first frame $\mathcal{F}_1$, the goal is to identify the same window in the other frames $\mathcal{F}_2,\dots,\mathcal{F}_M$. \paragraph{Datasets.} The method is trained using the ImageNet Large Scale Visual Recognition Challenge 2015~\cite{ILSVRC15}, with 3,862 videos totalling more than one million annotated frames. Instances of objects of thirty different classes (mostly vehicles and animals) are annotated throughout each video with bounding boxes. For tracking, instance labels are retained but object class labels are ignored. We use 90\% of the videos for training, while the other 10\% are held-out to monitor validation error during network training. Testing uses the VOT 2015 benchmark~\cite{kristan2015visual}. \paragraph{Architecture.} We experiment with siamese and siamese learnet architectures (\cref{fig:archs}) where the learnet $\omega$ predicts the parameters of the second (dynamic) convolutional layer of the siamese streams. Each siamese stream has five convolutional layers and we test three variants of those: variant (A) has the same configuration as AlexNet~\cite{krizhevsky2012imagenet} but with stride 2 in the first layer, and variants (B) and (C) reduce to 50\% the number of filters in the first two convolutional layers and, respectively, to 25\% and 12.5\% the number of filters in the last layer. \paragraph{Training.} In order to train the architecture efficiently from many windows, the data is prepared as follows. Given an object bounding box sampled at random, a crop $z$ double the size of that is extracted from the corresponding frame, padding with the average image color when needed. The border is included in order to incorporate some visual context around the exemplar object. Next, $\ell \in \{+1,-1\}$ is sampled at random with 75\% probability of being positive. If $\ell=-1$, an image $x$ is extracted by choosing at random a frame that does \emph{not} contain the object. Otherwise, a second frame containing the same object and within 50 temporal samples of the first is selected at random. From that, a patch $x$ centered around the object and four times bigger is extracted. In this way, $x$ contains both subwindows that do and do not match $z$. Images $z$ and $x$ are resized to $127 \times 127$ and $255 \times 255$ pixels, respectively, and the triplet $(z,x,\ell)$ is formed. All $127 \times 127$ subwindows in $x$ are considered to \emph{not} match $z$ except for the central $2\times 2$ ones when $\ell=+1$. All networks are trained from scratch using SGD for 50 epoch of 50,000 sample triplets $(z_i,x_i,\ell_i)$. The multiple windows contained in $x$ are compared to $z$ efficiently by making the comparison layer $\Gamma$ convolutional (\cref{fig:archs}), accumulating a logistic loss across spatial locations. The same hyper-parameters (learning rate of $10^{-2}$ geometrically decaying to $10^{-5}$, weight decay of 0.005, and small mini-batches of size 8) are used for all experiments, which we found to work well for both the baseline and proposed architectures. The weights are initialized using the improved Xavier~\cite{he2015delving} method, and we use batch normalization~\cite{ioffe15batch} after all linear layers. \paragraph{Testing.} Adopting the initial crop as exemplar, the object is sought in a new frame within a radius of the previous position, proceeding sequentially. This is done by evaluating the pupil net convolutionally, as well as searching at five possible scales in order to track the object through scale space. \begin{figure}[t] \centering \input{vis/tracking-oneshot/figure} \vspace{-0.2cm} \caption{ The predicted filters and the output of a dynamic convolutional layer in a siamese learnet trained for the object tracking task. Best viewed in colour. } \label{fig:tracking-activations} \end{figure} \begin{table} \vspace{-0.15cm} \footnotesize \centering \begin{tabular}{c @{\hspace{2ex}} c} \begin{tabular}{l @{\hspace{1.5ex}} c @{\hspace{1.5ex}} c} \hline Method & Accuracy & Failures\\ \hline Siamese ($\varphi$=B) & 0.465 & 105\\ Siamese ($\varphi$=B; unshared) & 0.447 & 131\\ Siamese ($\varphi$=B; factorized) & 0.444 & 138\\ Siamese learnet ($\varphi$=B; $\omega$=A) & \underline{\textbf{0.500}} & \underline{\textbf{87}}\\ Siamese learnet ($\varphi$=B; $\omega$=B) & 0.497 & 93\\ \hline DAT~\cite{possegger2015defense} & 0.442 & 113\\ SO-DLT~\cite{wang2015transferring} & 0.540 & 108\\ \hline \end{tabular} & \begin{tabular}{l @{\hspace{1.5ex}} c @{\hspace{1.5ex}} c} \hline Method & Accuracy & Failures\\ \hline Siamese ($\varphi$=C) & 0.466 & 120\\ Siamese ($\varphi$=C; factorized) & 0.435 & 132\\ Siamese learnet ($\varphi$=C; $\omega$=A) & 0.483 & \textbf{105}\\ Siamese learnet ($\varphi$=C; $\omega$=C) & \textbf{0.491} & 106\\ \hline DSST~\cite{danelljan2014accurate} & 0.483 & 163\\ MEEM~\cite{zhang2014meem} & 0.458 & 107\\ MUSTer~\cite{hong2015multi} & 0.471 & 132\\ \hline \end{tabular} \end{tabular} \caption{Tracking accuracy and number of tracking failures in the VOT 2015 Benchmark, as reported by the toolkit~\cite{kristan2015visual}. Architectures are grouped by size of the main network (see text). For each group, the best entry for each column is in bold. We also report the scores of 5 recent trackers.} \vspace{-0.3cm} \label{tab:tracking-error} \end{table} \paragraph{Results and discussion.} \Cref{tab:tracking-error} compares the methods in terms of the official metrics (accuracy and number of failures) for the VOT 2015 benchmark~\cite{kristan2015visual}. The ranking plot produced by the VOT toolkit is provided in the supplementary material (fig.~B.1). From \cref{tab:tracking-error}, it can be observed that factorizing the filters in the siamese architecture significantly diminishes its performance, but using a learnet to predict the filters in the factorization recovers this gap and in fact achieves better performance than the original siamese net. The performance of the learnet architectures is not adversely affected by using the slimmer prediction networks B and C (with less channels). An elementary tracker based on learnet compares favourably against recent tracking systems, which make use of different features and online model update strategies: DAT~\cite{possegger2015defense}, DSST~\cite{danelljan2014accurate}, MEEM~\cite{zhang2014meem}, MUSTer~\cite{hong2015multi} and SO-DLT~\cite{wang2015transferring}. SO-DLT in particular is a good example of direct adaptation of standard batch deep learning methodology to online learning, as it uses SGD during tracking to fine-tune an ensemble of deep convolutional networks. However, the online adaptation of the model comes at a big computational cost and affects the speed of the method, which runs at 5 frames-per-second (FPS) on a GPU. Due to the feed-forward nature of our one-shot learnets, they can track objects in real-time at framerates in excess of 60 FPS, while achieving less tracking failures. We consider, however, that our implementation serves mostly as a proof-of-concept, using tracking as an interesting demonstration of one-shot-learning, and is orthogonal to many technical improvements found in the tracking literature~\cite{kristan2015visual}.
{'timestamp': '2016-06-17T02:12:19', 'yymm': '1606', 'arxiv_id': '1606.05233', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05233'}
arxiv
\section{Introduction} \label{Intro} The future energy grid is expected to integrate more distributed and renewable energy resources with significantly enhanced communications infrastructure for timely and reliable data exchanges between the control center and various grid control and monitoring points \cite{Stojmenovic14}. Smartgrid is an example of the cyber-physical system (CPS) that integrates different communications, control, and computing technologies \cite{Zanella14}. Smartgrid communications infrastructure is an important component of the future smartgrid that enables to support many critical grid control, monitoring, and management operations and emerging smartgrid applications \cite{Zanella14}--\cite{Wang14}. The smartgrid communications infrastructure is typically hierarchical, i.e., data communications between customer premises (smart meters (SMs)) and local concentrators and between local concentrators and the utility company are supported by field/neighborhood area networks and long-haul wide area networks, respectively \cite{Sendin12}--\cite{Botte05}. The former is usually based on the low bandwidth communications technologies such as Zigbee, WiFi, and power line communications (PLC) while the later is required to have higher capacity, which can be realized by employing LTE, 3G cellular, WiMAX, and fiber optics for example. Our current work concerns the design of data compression and MAC protocol for the field/neighborhood area network where PLC is employed to report injected powers from grid reporting points to the local concentrator. In fact, several smartgrid projects in Spain \cite{Sendin12}, and France \cite{ERDF} have chosen PLC for smartgrid deployment since PLC can be realized with low-cost modems and it can utilize available electricity wires for data communications. In addition, as reported in Italy's Telegestore project, SMs have been installed at customer premises to send data to a concentrator via PLC \cite{Botte05}. We focus on reporting injected powers at different grid reporting points once in every reporting interval (RI) \cite{Alam13, Abdel13}. This is motivated by the fact that information on injected powers can be very useful for various grid applications such as line failure prediction \cite{Rao11}--\cite{Sendin13} or congestion management and grid control applications \cite{Lo12, Lo13}. Furthermore, the utility control center can utilize the collected data to further estimate the complete phasor data at different nodes \cite{Abur04} which can be then used in the control of voltages and reactive powers or in the active load management \cite{Alam13, Abdel13, Samarakoon11}, outage management \cite{Sridharan01, Liu02} as well as illegal electricity usages and data intrusion/anomaly detection \cite{Cavdar04, Valenzuela13}. There have been some existing works that study data compression and MAC protocol design issues in both smartgrids and wireless network contexts. There are two popular standards for the PLC technology, namely PRIME and G3-PLC, whose physical- and MAC-layer design aspects are investigated via simulations in \cite{Matan13a}--\cite{Patti13}. In addition, the authors in \cite{Alam13} study the state estimation problem where the voltage phasors at different nodes are recovered based on limited collected data. Li et al. \cite{Hush10} propose to employ the CS technique for sparse electricity data compression. The authors in \cite{Fazel11} consider random access exploiting the CS capability for energy efficiency communications in wireless sensor networks. However, none of these existing works considers the joint design of communications access and data compression that supports the communication for a large number of nodes (e.g., in smartgrid communication infrastructure). We aim to fill this gap in the current work. In particular, we make the following contributions. \begin{itemize} \item We propose the CS-based data compression and PRIME MAC protocol design that supports the communication between a number of grid reporting points and a data concentrator using PLC and random access. Specifically, we consider a distributed random reporting (DRR) mechanism where each node decides to report its data in the probabilistic manner by using the 802.15.4-based MAC protocol. Then the Kronecker CS technique (2D CS), which can exploit the spatio-temporal correlation of data, is employed for data reconstruction at the control center. \item We develop an analytical model for the MAC protocol, which enables us to achieve efficient and reliable data reconstruction using compressed sensing. In addition, we present an algorithm which determines efficient configuration for MAC parameters so that the average reporting time is minimized. Also, we analyze the energy consumption and bandwidth usage for our proposed design. \item We present numerical results to demonstrate the significant performance gains of our proposed design compared to the non-compressed solution and the centralized time division multiple access (TDMA) scheme. These performance gains are demonstrated for reporting delay, energy consumption, and bandwidth usage. \end{itemize} The remainder of this paper is organized as follows. Section \ref{SystemModel} presents the system model and Section \ref{GCSMAC} describes a CS-based data compression. Section \ref{Net_des_Per_Ana} describes our design and performance analysis. Numerical results are demonstrated in Section \ref{Results} followed by the conclusion in Section \ref{Conclusion}. \section{System Model} \label{SystemModel} \begin{figure*}[!t] \centering \includegraphics[width=160mm, height=120mm]{LV_network1} \caption{Next-generation smartgrid with a) power grid; b) communications infrastructure.} \label{LV_network} \end{figure*} We consider the communications between $n_S$ grid reporting points and one data concentrator which corresponds to the point-to-multipoint communication in the field area network illustrated in Fig.~\ref{LV_network}. There would be a large number of data concentrators collecting various types of monitoring and control data in the distribution network; however, we focus on the design of the point-to-multipoint communication for one such data concentrator without loss of generality. For brevity, we refer to the grid reporting points as nodes in the following. Each node is assumed to comprise a load and/or a solar/wind generator. Deployment of such renewable generators in large scale at customer premises, light poles, or advertising panels has been realized for several urban areas in Europe \cite{Sendin12}--\cite{Botte05}. We further assume that each node is equipped with a SM, which is capable of reporting power data to the data concentrator using the PLC. Upon reaching the data concentrator, the collected data is forwarded to the utility control center via the high-speed backhaul network, which is assumed to be error free.\footnote{This assumption is reasonable since the backhaul network typically has very high capacity and reliability. This is the case if the backhaul network is realized by fiber optics for example.} The data concentrator can be installed at the same place as the transformer to collect power data from its nodes as shown in Fig.~\ref{LV_network}, which enables reliable communications. Note, however, that data concentrator can be deployed in the medium voltage (MV) line as well where the power data is transferred over medium-voltage power lines passing coupling devices at transformers \cite{Sendin11} We assume that each node must report the injected power value once for each fixed-length RI \cite{Alam13, Abdel13}. Such collected injected powers can be used for various applications as discussed in Section~\ref{Intro}. The RI typically ranges from 5 minutes to one day, which is configurable for most available SMs \cite{SMII} even though we set RI equal to 5 minutes in this work. Let $\mathbf{S}_{l,i}$, $\mathbf{S}_{g,i}$ and $\mathbf{S}_i$ be the load, distributed generation and injected powers at node $i$, respectively. Then, the injected power at node $i$ can be expressed as $\mathbf{S}_i = \mathbf{S}_{g,i} - \mathbf{S}_{l,i}$. We assume that the control center wishes to acquire information about $\mathbf{S}_i$ for all nodes $i$ $(i \in \left[1, n_S\right])$ in each RI.\footnote{The proposed framework can be applied to other types of grid data as long as they exhibit sparsity in the time and/or space domains.} Due to the low bandwidth constraint of PLC \cite{Matan13a}--\cite{Patti13}, our objectives are to perform joint design of data compression and MAC protocol so that reliable data reporting can be achieved within minimum reporting time (RT). This is motivated by the fact that most smartgrid control and monitoring applications have very stringent delay requirements. Another important design target is that the MAC protocol is distributed so that it can allow low-cost and large-scale deployment. It has been shown in some recent works that power grid data typically exhibits strong correlation over space and time \cite{Hu11}--\cite{Chen10b}. Therefore, the CS technique can be employed for data compression, which can potentially reduce the amount of communication data and thus the delay, communication bandwidth and energy \cite{Duar12, Tan10, Tan10b}. To realize such compression benefits, the control center only needs to collect the reported data in $m_T < n_T$ RIs (i.e., compression over time) from a subset of $n_S$ nodes with size $m_S < n_S $ (i.e., compression over space) to reconstruct the complete data for $n_S$ nodes in $n_T$ RIs. Note that data reconstruction can be performed locally at the data concentrator or at the control center. The later deployment is assumed in this work since it helps save bandwidth usage in the backhaul network. \begin{figure*}[!t] \centering \includegraphics[width=125mm, height=50mm]{rolling.eps} \caption{Rolling-based data reconstruction for $n_S$ nodes over $n_T$ RIs} \label{Rolling} \end{figure*} For practical implementation, the data transmission and reconstruction can be performed in a rolling manner where data reconstruction performed at a particular RI utilizes the reported data over the latest $n_T$ RIs as shown in Fig.~\ref{Rolling}. To guarantee the desirable data reconstruction quality, the control center must receive sufficient data which is impacted by the underlying reporting mechanism and MAC protocol. Specifically, we must determine the values of $m_T$ and $m_S$ for some given values $n_T$ and $n_S$ to achieve the desirable data reconstruction reliability. These design issues are addressed in the following sections. \section{CS-Based Data Compression} \label{GCSMAC} \subsection{CS-Based Data Processing} Without loss of generality, we consider data reconstruction of one data field for $n_T$ RIs and $n_S$ nodes. Let $\mathbf{Z}$ be an $n_S \times n_T $ matrix whose $(i,j)$-th element denotes the injected power at node $i$ and RI $j$. We will refer to the data from one RI (i.e., one column of $\mathbf{Z}$) as one data block. From the CS theory, we can compress the data of interest if they possess sparsity properties in a certain domain such as wavelet domain. Specifically, we can express the data matrix $\mathbf{Z}$ as \begin{eqnarray} \label{wavtran} \mathbf{Z} = \mathbf{\Psi}_S \mathbf{A} \mathbf{\Psi}_T^T \end{eqnarray} where $\mathbf{\Psi}_S \in \mathbb{R}^{n_S \times n_S} $ and $\mathbf{\Psi}_T \in \mathbb{R}^{n_T \times n_T}$ denote wavelet bases in space and time dimensions, respectively \cite{Duar12, Tan10, Tan10b}. The sparsity of $\mathbf{Z}$ can be observed in the wavelet domain if matrix $\mathbf{A}$ has only $K$ significant (nonzero) coefficients where $K <n_S \times n_T$. We now proceed to describe the data compression and reconstruction operations. Let us denote $\mathbf{\Phi}_S \in \mathbb{R}^{m_S \times n_S} $ (for space) and $\mathbf{\Phi}_T \in \mathbb{R}^{m_T \times n_T}$ (for time) as the two sparse observation matrices where entries in these two matrices are i.i.d uniform random numbers where $m_S < n_S $ and $m_T < n_T $. Then we can employ $\mathbf{\Phi}_S$ and $\mathbf{\Phi}_T$ to sample the power data from which we obtain the following observation matrix \begin{eqnarray} \mathbf{Y} = \mathbf{\Phi}_S \mathbf{Z} \mathbf{\Phi}_T^T. \end{eqnarray} Let $N_{\Sigma} = n_T n_S $ and $M = m_T m_S$ be the number of elements of $\textbf{Z}$ and $\mathbf{Y}$, respectively. From the CS theory, we can reliably reconstruct the data matrix $\textbf{Z}$ by using the observation matrix $\mathbf{Y}$ if $m_T$ and $m_S$ are appropriately chosen. For the considered smartgrid communication design, this implies that the control center only needs to collect $M$ injected power elements instead of $N_{\Sigma}$ values for reliable reconstruction of the underlying data field. We now describe the data reconstruction for $\textbf{Z}$ by using the observation matrix $\mathbf{Y}$. Toward this end, the control center can determine matrix $\mathbf{A}$, which corresponds to the wavelet transform of the original data $\textbf{Z}$ as described in (\ref{wavtran}), by solving the following optimization problem \begin{eqnarray} \min_ \textbf{A} \left\|\textbf{A}\right\|_2 \,\,\, \text{s.t.} \,\,\, \left\|\textbf{vec}\left(\mathbf{Y}\right) - \mathbf{\bar Y}\right\|_2 \leq \epsilon \label{OPT_RE_EQN} \end{eqnarray} where $\mathbf{\bar Y} = \left(\mathbf{\Phi}_S \otimes \mathbf{\Phi}_T \right) \left(\mathbf{\Psi}_S \otimes \mathbf{\Psi}_T \right) \textbf{vec}\left(\textbf{A}\right)$, $\otimes$ is the Kronecker product, $\textbf{vec} \left(\mathbf{X}\right)$ denotes the vectorization of the matrix $\mathbf{X}$, which stacks the rows of $\mathbf{X}$ into a single column vector. We can indeed solve problem (\ref{OPT_RE_EQN}) by using the Kronecker CS algorithm \cite{Duar12} to obtain $\mathbf{A}^* = \operatornamewithlimits{argmin}_\textbf{A} \left\|\textbf{A}\right\|_2$. Then, we can obtain the estimation for the underlying data as $\textbf{vec}\left(\textbf{Z}^* \right) = \mathbf{\Psi}_S \otimes \mathbf{\Psi}_T \mathbf{A}^*$. More detailed discussions of this data reconstruction algorithm can be found in \cite{Duar12}. Now there are two questions one must answer to complete the design: 1) how can one choose $m_S $ and $m_T$ to guarantee reliable data reconstruction for the underlying data field?; and 2) how can one design the data sampling and MAC protocol so that the control center has sufficient information for data reconstruction? We will provide the answers for these questions in the remaining of this paper. \subsection{Determination of $m_S$ and $m_T$} \label{GCSMAC11} \begin{figure}[!t] \centering \includegraphics[width=80mm]{Novel_CDF_Numnode128_Numsample128} \caption{Probability of success vs $M_{\sf thresh} $ with $n_S = 128 $ and $n_T = 128 $.} \label{Novel_CDF_Numnode128_Numsample128} \end{figure} \begin{table} \centering \caption{Calculation of $M_{\sf thresh} $, $m_S $ and $m_T $} \label{table} \scriptsize \setlength{\tabcolsep}{5pt} \begin{tabular}{|c|c|c|c|c|c|c|} \hline ($n_S $, $n_T $) & (64,64) & (64,128) & (64,256) & (128,128) & (128,256) & (256,256)\tabularnewline \hline \hline $M_{\sf thresh} $ & 1551 & 1892 & 2880 & 3196 & 4620 & 9200 \tabularnewline \hline ($m_S $, $m_T $) & (33,47) & (22,86) & (16,180) & (47,68) & (30,154) & (80,115)\tabularnewline \hline \end{tabular} \end{table} We would like to choose $m_S$ and $m_T$ so that $M = m_S m_T$ is minimum. Determination of the optimal values of $m_S$ and $m_T$ turns out to be a non-trivial task \cite{Duar12}. So we propose a practical approach to determine $m_S$ and $m_T$. It is intuitive that $m_S$ and $m_T$ should be chosen according to the compressibility in the space and time dimensions, respectively. In addition, these parameters must be chosen so that the reliability of the data reconstruction meets the predetermined requirement, which is quantified by the mean square error (MSE). To quantify compressibility in the space and time, we consider two other design options, viz. temporal CS and spatial CS alone. For the former, the control center reconstructs data for one particular node by using the observations of only that node (i.e., we ignore spatial correlation). For the later, the control center reconstructs the data in each RI for all nodes without exploiting the correlation over different RIs. For fair quantification, we determine the MSE for one data field (i.e., for data matrix $\mathbf{Z}$ with $n_S \times n_T $ elements) for these two design options where $MSE = \left\|\mathbf{Z}-\mathbf{Z}^*\right\|_2^2/\left\|\mathbf{Z}\right\|_2^2$. For each spatial CS and temporal CS cases, we generate 1000 realizations of the injected powers based on which we perform the data reconstruction using the 1D CS for different values of $m_S$ and $m_T$, respectively. Note that we randomly choose $m_S$ and $m_T$ out of $n_S$ nodes and $n_T$ RIs for spatial CS and temporal CS, respectively. Then, we obtain the empirical probability of success for the data reconstruction versus $M_{S} = m_S n_T$ and $M_{T} = n_S m_T$, respectively where the ``success'' means that the MSE is less than the target MSE. From the obtained empirical probability of success, we can find the required values of $M_S$ and $M_T$, which are denoted as $M_{S,{\sf thresh}}$ and $M_{T,{\sf thresh}}$, respectively, to achieve the target success probability. Having obtained $M_{S,{\sf thresh}}$ and $M_{T,{\sf thresh}}$ capturing the compressibility in the space and time as described above, we choose $m_S $ and $m_T$ for the 2D CS so that $m_S/m_T = n_S/n_T \times M_{S,{\sf thresh}}/M_{T,{\sf thresh}}$. Similarly, we obtain the empirical probability of success for the 2D CS based on which we can determine the minimum value of $M_{\sf thresh} = m_S m_T$ to achieve the target success probability. To obtain numerical results in this paper, we choose target $MSE = 0.05$ and target success probability equal 0.95. Fig.~\ref{Novel_CDF_Numnode128_Numsample128} shows the empirical probability of success versus $M_{{\sf thresh}}= m_S m_T$ for $n_S = n_T = 128$ where $M_{{\sf thresh}}$ in the horizontal axis represents the $M_{S,{\sf thresh}}$, $M_{T,{\sf thresh}}$, and $M_{{\sf thresh}}$ for 1D and 2D CS for simplicity. The data model for the injected power will be described in Section~\ref{Data_Model}. For this particular setting, we can obtain the ratio $m_S/m_T = 0.691 $ from which can obtain the values of $m_S = 47 $ and $m_T = 68 $. Similarly, we determine the $M_{\sf thresh}$, $m_S $ and $m_T$ for different scenarios whose corresponding $(n_S, n_T)$ values are given in Table~\ref{table}. For all cases, we can observe that $m_S < n_S$ and $m_T < n_T$, which demonstrates the benefits of data compression by using the 2D CS. Having determined $m_S $ and $m_T$ as described above, the remaining tasks are to design the DDR mechanism and MAC protocol that are presented in the following. \section{DDR And MAC Protocol Design} \label{Net_des_Per_Ana} \subsection{Distributed Data Reporting} In any RI, to perform reconstruction for the data field corresponding to the latest $n_T$ RIs, the control center must have data in $m_T$ RIs, each of which comprises $m_S$ injected powers from $m_S$ nodes. With the previously-mentioned rolling implementation, the control center can broadcast a message to all nodes to request one more data block (the last column of data matrix $\textbf{Z}$) if it has only $m_T-1$ data blocks to perform reconstruction in the current RI. At the beginning, the control center can simply send $m_T$ broadcasts for $m_T$ randomly chosen RIs out of $n_T$ RIs and it performs data reconstruction at RI $n_T$ upon receiving the requested data blocks. \subsection{MAC Protocol Design} \begin{figure*}[!t] \centering \includegraphics[width=160mm, height=60mm]{cycletime} \caption{Timing diagram of the MAC superframe structure for one RI.} \label{cycletime} \end{figure*} If there is a broadcast message from the control center, we assume that each node participates in the contention process with probability $p_s$ using the slotted CSMA/CA MAC protocol in any RI. The slotted CSMA/CA MAC protocol \cite{Prime} with the proposed frame structure is employed for data transmissions as described in the following. We set the optionally contention-free period to zero since we focus on distributed access design in this work. Moreover, we assume there are $K_{\tau} $ superframes (SFs) in the contention period of any RI where $SF_i = SF_0 \times 2^{BO_i}$ is the length of SF $i$, $SF_0 $ is the base length of SF, $BO_i \in \left[0,BO_{\sf max}\right]$ is the beacon order at SF $i$. Therefore, the reporting time (RT) in the underlying RI is $ \sum_{i=1}^{K_{\tau}} SF_i$. We will optimize the parameters $K_{\tau} $ and $\left\{BO_i\right\}$ to minimize the RT while guaranteeing the desirable data reconstruction quality later. The superframe structure in one RI is illustrated in Fig.~\ref{cycletime}. In each SF, the nodes that choose to access the channel (with probability $p_s$) perform the contention using the standardized slotted CSMA/CA protocol as follows. A contending node randomly chooses a number in $\left[0, W_0\right]$ as the backoff counter ($W_0 \!=\! 2^{priority}$) and starts counting down. If the counter reaches zero, the node will perform the clear channel assessment (CCA) for $priority$ times (we set $priority \!=\! 2$). It will transmit data and wait for ACK if all CCAs are successful. The reception of ACK is interpreted as a successful transmission, otherwise this is a collision. In the case of failure in any CCA, the node attempts to perform backoff again with doubling backoff window. In addition, each node is allowed to access channel up to $NB\!+\!1$ times. Since the length of the SF is limited, a node may not have enough time to transmit its data and ACK packets at the end of the last SF. In this case, we assume that the node will wait for the next SF to access the channel. We refer to this as the deference state in the following. \subsection{MAC Parameter Configuration for Delay Minimization} \label{Net_design} We consider optimizing the MAC parameters $\left(K_{\tau}, p_s, \left\{BO_i\right\}\right)$ to minimize the reporting time in each RI by solving the following problem: \begin{eqnarray} \label{OPT_DOST_EQN} \begin{array}{l} {\mathop {\min }\limits_{K_{\tau}, p_s, BO_i}} \quad \mathcal{D}\left(K_{\tau}, p_s, \left\{BO_i\right\}\right) \\ \mbox{s.t.} \quad \Pr\left\{K_{\text{succ}} \geq m_{S} \right\} \geq P_{\text{suff}}, \\ \quad \quad 0 \leq K_{\tau} \leq K_{\tau,{\sf max}}, 0 \leq BO_i \leq BO_{\sf max}, 0 \leq p_s \leq 1, \\ \end{array} \end{eqnarray} where $\mathcal{D}(K_{\tau}, p_s, \left\{BO_i\right\}) = \sum_{i=1}^{K_{\tau}} SF_0 \times 2^{BO_i}$ is the reporting time. Recall that $K_{\tau} $ is the number of SFs in one RI where $SF_i$ is the length of SF $i$ and $SF_0 $ is the base length of SF, $BO_i \in \left[0,BO_{\sf max}\right]$ is the beacon order at SF $i$, $BO_{\sf max}$ is the maximum value of $BO_i$, $p_s$ is the probability that each node performs a contention for a possible channel access. In (\ref{OPT_DOST_EQN}), the first constraint means that the control center must receive $m_{S}$ packets (i.e., $m_{S}$ injected power values from $m_{S}$ nodes) with probability $P_{\text{suff}} \approx 1$. Note that one would not be able to deterministically guarantee the reception of $m_{S}$ packets due to the random access nature of the DDR and MAC protocol. The probability in this constraint can be written as \begin{eqnarray} \Pr\left\{K_{\text{succ}} \geq m_{S} \right\} \!\! = \!\! \sum_{h= m_{S} }^{n_S} \!\! \Pr\left\{\widehat{m}_S = h\right\} \!\!\!\!\!\! \sum_{K_{\sf succ} = m_{S} }^h \sum_{l =1 }^{\left|\Xi\right|} \prod_{i=1}^{K_{\tau}} \label{Prob_mthresh_OST_EQN_1}\\ \times \sum_{K_{S,i} = K_{{\sf succ},i}}^{K_{S,i,{\sf max}}} \!\!\!\!\!\!\!\! \Pr\!\left\{K_i = K_{S,i} \left|h_i \right.\right\} \! \Pr\!\left\{{\bar K}_i = K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\} \label{Prob_mthresh_OST_EQN_3} \end{eqnarray} where $K_{\text{succ}}$ denotes the number of successfully transmitted packets in the RI and $\Pr\!\left\{\widehat{m}_S \!=\! h\right\} $ is the probability of $h$ nodes joining the contention. Since each node decides to join contention with probability $p_s$, $\Pr\!\left\{\widehat{m}_S \!=\! h\right\} $ is expressed as \begin{eqnarray} \label{Prob_htrans} \Pr\left\{\widehat{m}_S = h\right\} = \left(\begin{array}{*{20}{c}} {n_S} \\ {h} \\ \end{array}\right) p_s^h \left(1-p_s\right)^{n_S - h}. \end{eqnarray} In (\ref{Prob_mthresh_OST_EQN_1}) and (\ref{Prob_mthresh_OST_EQN_3}), we consider all possible scenarios so that the total number of successfully transmitted packets over $K_{\tau}$ SFs is equal to $K_{\text{succ}}$ where $K_{\text{succ}} \in \left[m_{S}, h\right]$. Here, $K_{\text{succ},i}$ denotes the number of successfully transmitted packets in SF $i$ so that we have $\sum_{i=1}^{K_{\tau}} K_{\text{succ},i} = K_{\text{succ}}$. In particular, we generate all possible combinations of $\left\{K_{\text{succ},i}\right\} $ for $K_{\tau} $ SFs and $\Xi $ represents the set of all possible combinations ($\left|\Xi\right|$ is the number of possible combinations). For each combination, we calculate the probability that the control center receives $K_{\text{succ}}$ successful packets. Note that a generic frame may experience one of the following events: success, collision, CCA failure and deference. Also, there are at most $K_{S,i,{\sf max}}$ frames in any SF $i$ where $K_{S,i,{\sf max}} = \left\lfloor SF_i/\min\left\{ NB+1, L_s+2 \right\}\right\rfloor $ since the smallest length of a CCA failure frame is $NB +1 $ slots while the minimum length of a successful frame is $L_s+2$ where $L_s$ is the required time for one successful transmission and 2 represents the two CCA slots. We only consider the case that $K_{{\sf succ},i} \leq K_{S,i} \leq K_{S,i,{\sf max}}, \forall i \in \left[1, K_{\tau}\right]$. In (\ref{Prob_mthresh_OST_EQN_3}), $\Pr\! \left\{K_i \!=\! K_{S,i} \left|h_i \right.\right\}$ is the probability that there are $K_{S,i}$ generic frames in SF $i$ given that $h_i$ nodes join contention where $h_1 \!=\!h$ and $h_i \!=\! h_{i-1}\!-\! K_{\text{succ},i-1}$ since successfully transmitting node will not perform contention in the following frames. Moreover, $\Pr\!\left\{{\bar K}_i \!=\! K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\}$ is the probability that $K_{\text{succ},i}$ nodes transmit successfully in SF $i$ given that there are $h_i$ contending nodes and $K_{S,i}$ generic frames. In order to calculate $\Pr\left\{K_i = K_{S,i} \left|h_i \right.\right\}$ and $\Pr\left\{{\bar K}_i = K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\}$, we have to analyze the Markov chain capturing detailed operations of the MAC protocol. For simplicity, we set $NB_i = NB = 5$, which is the default value. We analyze the Markov chain model in Appendix~ \ref{Mark_chain_mod}. Then we determine $\Pr\left\{K_i = K_{S,i} \left|h_i \right.\right\} $ and $\Pr\left\{{\bar K}_i = K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\} $ as follows. \subsubsection{Calculation of $\Pr\left\{K_i = K_{S,i} \left|h_i \right.\right\} $} \label{Pr_K_S_i1} In SF $i $ there are $h_i $ contending nodes and $K_{S,i}$ generic frames where frame $j$ has length $T_{ij}$. We can approximate the distribution of generic frame length $T_{ij}$ as the normal distribution \cite{Park11}. So the probability of having $K_{S,i} $ generic frames is written as \begin{eqnarray} \label{K_genfram_EQN} \Pr\!\left\{\!K_i \!= \!K_{S,i} \left|h_i\right. \!\right\} \!\!=\!\! \Pr\{\sum_{j=1}^{K_{S,i}} \! T_{ij} \!\! = \!\! SF_i \} \!=\!\mathcal{Q} (\frac{SF_i\!-\!K_{S,i} {\bar T}_i}{\sqrt{K_{S,i} \sigma^2_i}}) \end{eqnarray} where ${\bar T}_i $ and $\sigma^2_i $ are the average and variance of the generic frame length, respectively whose calculations are presented in Appendix~\ref{average_variance}. \subsubsection{Calculation of $\Pr\left\{{\bar K}_i = K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\} $} \label{Pr_K_S_i} The second quantity, $\mathcal{P} = \Pr\left\{{\bar K}_i = K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\} $ is equal to \begin{eqnarray} \mathcal{P} = \!\!\!\!\!\! \sum_{j = 0}^{K_{S,i}- K_{\text{succ},i}} \sum_{k= 0}^{1} \left(\!\!\!\begin{array}{*{20}{c}} {K_{S,i}} \\ { K_{\text{succ},i},j,k,l} \\ \end{array} \!\!\!\right) \mathcal{P}_{\text{succ},h_i}^{ K_{\text{succ},i}} \mathcal{P}_{\text{coll},h_i}^j \mathcal{P}_d^k \mathcal{P}_{\text{ccas},h_i}^{l} \label{P_2_OST_EQN} \end{eqnarray} where $K_{\text{succ},i}\!+\!j\!+\!k\!+\!l \!=\! K_{S,i}$; $j$, $k$, and $l$ represent the number of frames with collision, deference, and CCA failure, respectively. Moreover, $\mathcal{P}_{\text{succ},h_i}$, $\mathcal{P}_{\text{coll},h_i}$, $\mathcal{P}_{\text{ccas},h_i}$, and $\mathcal{P}_d$ denote the probabilities of success, collision, CCA failure, and deference, respectively, whose calculations are given in Appendix B. In (\ref{P_2_OST_EQN}), we generate all possible combinations each of which has different numbers of success, collision, CCA failure, and deference frames. Also, the product behind the double summation is the probability of one specific combination. \subsection{MAC Parameter Configuration Algorithm} \begin{algorithm}[h \caption{\textsc{Optimization of MAC Parameters}} \label{OPT_Delay} \begin{algorithmic}[1] \FOR {each value of $K_{\tau} \in [1,K_{\tau,{\sf max}}]$} \FOR {each possible set $\left\{BO_i\right\}$} \STATE Find optimal ${\bar p}_s $ as ${\bar p}_s = \mathop {\operatornamewithlimits{argmin}} \limits_{0 \leq p_s \leq 1} \mathcal{D} \left( K_{\tau}, \left\{BO_i\right\}, p_s\right) $. \ENDFOR \STATE The best $\left(\left\{\bar{BO}_i\right\}, {\bar p}_s\right)$ for each $K_{\tau} $ is $\left(\left\{\bar{BO}_i\right\}, {\bar p}_s\right) = \mathop {\operatornamewithlimits{argmin}} \limits_{\left\{{ BO}_i\right\}, {\bar p}_s} \mathcal{D} \left(K_{\tau}, \left\{BO_i\right\}, {\bar p}_s\right) $. \ENDFOR \STATE The final solution $\left( {\bar K}_{\tau}, \left\{\bar{BO}_i\right\}, {\bar p}_s \right) $ is determined as $\left( {\bar K}_{\tau}, \left\{\bar{BO}_i\right\}, {\bar p}_s \right) = \mathop {\operatornamewithlimits{argmin}} \limits_{K_{\tau}, \left\{\bar{BO}_i\right\}, {\bar p}_s} \mathcal{D} \left(K_{\tau}, \left\{\bar{BO}_i\right\}, {\bar p}_s\right) $. \end{algorithmic} \end{algorithm} The procedure for finding $\left(K_{\tau}, p_s, \left\{BO_i\right\}\right)$ can be described in Alg.~\ref{OPT_Delay}. Since there are only finite number of possible choices for $K_{\tau} \in [1,K_{\tau,{\sf max}}]$ and the set $\left\{{BO}_i\right\}$, we can search for the optimal value of $p_s$ for given $K_{\tau}$ and $\left\{{BO}_i\right\}$ as in step 3. Then, we search over all possible choices of $K_{\tau}$ and the set $\left\{{BO}_i\right\}$ to determine the optimal configuration of the MAC parameters (in steps 5 and 7). \subsection{Bandwidth Usage} To quantify the bandwidth usage, we consider a particular neighborhood with $N>n_S$ nodes, whose simultaneous transmissions can collide with one another. In addition, these $N$ nodes must report injected power data to a control center. In this case, we would need $N/n_S$ orthogonal channels\footnote{We ignore the fact that this number must be integer for simplicity} to support these communications. Suppose that the considered smartgrid application has a maximum target delay of $\mathcal{D}_{\sf max}$. We should design the group size with $n_S$ nodes as large as possible while respecting this target delay in order to minimize the required bandwidth (i.e., number of channels). Let the maximum numbers of nodes for one group under TDMA and CSMA-CS schemes while still respecting the target delay be $n_S^{\sf TDMA}$ and $n_S^{\sf CSMA-CS}$, respectively. Note that the TDMA scheme uses all $n_T$ RIs for data transmission while the CSMA-CS scheme only chooses $m_T$ RIs for each $n_T$ RIs to transmit the data. Thus, the CSMA-CS scheme allows $n_T/m_T$ groups to share one channel for each interval of $n_T$ RIs. As a result, the number of channels needed for $N$ nodes is $N/n_S^{\sf TDMA}$ for the TDMA scheme and $N/n_S^{\sf CSMA-CS} \times m_T/n_T$ for the CSMA-CS scheme. \subsection{Energy Consumption} We now calculate the average energy consumption for data reporting of one data block. In each RI, there are $K_{\tau} $ SFs where the number of contending nodes decreases over the SFs. Let $E_i$ denote the energy consumption per node in SF $i $ with $h_i $ contending nodes. The derivation of $E_i$ is given in Appendix~ \ref{energy_consumption_i}. Then, the average energy consumption in one RI can be expressed as follows: \begin{eqnarray} E = \sum_{h=1}^{n_S} \Pr\left\{\widehat{m}_S = h\right\} \sum_{K_{\sf succ} = m_{S}}^h \sum_{l =1 }^{\left|\Xi\right|} \prod_{i=1}^{K_{\tau}} \sum_{K_{S,i} = K_{{\sf succ},i}}^{K_{S,i,{\sf max}}} \times \hspace{0.55cm} \label{Energy_EQN_1}\\ \Pr\!\left\{K_i = K_{S,i} \left|h_i \right.\right\} \! \Pr\!\left\{{\bar K}_i = K_{\text{succ},i} \left|K_{S,i},h_i \right.\right\} \sum_{i=1}^{K_{\tau}} h_i E_i. \label{Energy_EQN_2} \end{eqnarray} Here, similar to derivation of $\Pr\left\{K_{\text{succ}} \geq m_{S}\right\}$ in Section~\ref{Net_design}, we generate all combinations of $\left\{h_i\right\}$, which represents the number of contending nodes in SF $i$. For one such combination, we derive the total average energy in $K_{\tau}$ SFs. Note that $\sum_{i=1}^{K_{\tau}} h_i E_i$ is the total average energy corresponding to $\left\{h_i\right\}$. As a result, the average consumed energy for reporting one data field (with size $n_S \times n_T$) is $\mathcal{E} = m_T \times E$. \vspace{10pt} \section{Performance Evaluation and Discussion} \label{Results} \subsection{Data Modeling and Simulation Setting} \label{Data_Model} In order to evaluate the performance of our proposed data compression and MAC protocol, we synthetically generate the data for power loads and distributed generation powers by using available methods \cite{Hu11}--\cite{Chen10b}, \cite{Soares08}--\cite{Wei90} because real-world data is not available. There are various probabilistic and stochastic methods to model power data in the literature. While independent and identically distributed (i.i.d.) normal and Weibull \cite{Wei90} distributions are commonly used to generate these types of data, the considered power data generated once for every 5-minute RI in this work would be highly dependent. Therefore, autoregressive models \cite{Wei90}, which belong to the correlated time-series category, are selected to generate the required simulation data. To model the load power, we employ the autoregressive moving average (ARMA) \cite{Wei90} as a time series model which consist of two components, namely, deterministic and stochastic parts \cite{Soares08}--\cite{Christiaanse71}. Hence, the load power can be expressed as \begin{eqnarray} \label{Timeseries_EQN} X_t = X_t^d + X_t^s \end{eqnarray} where $t$ is the time index, $X$ commonly represents active load power ($P_l$) and reactive load power ($Q_l$), $X_t^d$ is the deterministic component of $X$ and $X_t^s$ is the stochastic part of $X$. The deterministic component, which captures the trend of data, is represented by the trigonometric functions \cite{Soares08}--\cite{Christiaanse71} as \begin{eqnarray} \label{deter_EQN} X^d_t = \chi_0 + \sum_{i=1}^{m_h} \left(\chi_{\text{re},i} \text{sin}\left(\frac{2\pi k_i t}{288}\right)+ \chi_{\text{im},i}\text{cos}\left(\frac{2\pi k_i t}{288}\right)\right) \end{eqnarray} where $m_h$ is the number of harmonics (i.e., the number of trigonometric functions), $\chi_{\text{re},i}$ and $\chi_{\text{im},i}$ are the coefficients of the harmonics, $\chi_0$ is the constant, and $k_i \leq 288/2$ for $\forall i \in \left\{1,\ldots, m_h\right\}$. This form consists of a constant $\chi_0$ (i.e., the first quantity in (\ref{deter_EQN})) and $m_h$ trigonometric functions (i.e., the second quantity in (\ref{deter_EQN})). This general model indeed offers flexibility where we can define suitable formulas to present the effects of seasonality and special days which are extensively studied in \cite{Soares08, Papalexopoulos90}. Now, the stochastic component is modeled by the first-order autoregressive process AR(1) which is the simple form of ARMA($n,m$) (i.e., $n = 1, m = 0$) \cite{Wei90} as follows: \begin{eqnarray} \label{Stocha_EQN} X_{t+1}^s = \varphi_t X_t^s + U_t \end{eqnarray} where $\varphi_t$ is the AR(1) coefficient and $U_t$ is the white noise process with zero mean and variance of $(1-\varphi_t)$. Here, we use AR(1) as an appropriate and simple data model; however other more complicated methods can be used as well \cite{Soares08, Papalexopoulos90, Wei90}. We now present the method to determine the parameters ($\chi_0$, $\chi_{\text{re},i}$, $\chi_{\text{im},i}$, $m_h$, $\varphi_{t}$) in (\ref{deter_EQN}) and (\ref{Stocha_EQN}). These parameters are coupled as indicated in (\ref{deter_EQN}) and (\ref{Stocha_EQN}). However we can separately estimate the parameters for these deterministic and stochastic components without significantly increasing estimation errors compared to those due to joint estimation \cite{Soares08}. To estimate these parameters, we use online data set \cite{UCIMLR} which represents the active and reactive load powers from 2006 to 2010. Specifically, we use the ordinary least squares (OLS) \cite{Wei90} to estimate $\chi_0$, $\chi_{\text{re},i}$, and $\chi_{\text{im},i}$, $i = 1,\ldots, m_h$ \cite{Soares08, Christiaanse71}. Moreover, we employ the Bayesian information criterion (BIC) \cite{Wei90} to determine $m_h$ significant harmonics which is usually less than 5 for the selected data in \cite{UCIMLR}. Then we also use OLS algorithm to estimate the AR(1) coefficient, i.e., $\varphi_t$ for every 5-minute interval over one day \cite{Soares08, Christiaanse71}. We should note that these parameters are updated and stored in every 5-minute interval over one day. Then we can generate the required power data in such the way that the output of the current interval is the input of the next interval. We can similarly generate the distributed generation power data, which exhibits the temporal and spatial correlation. In particular, distributed generation power data model also comprises deterministic and stochastic parts as described in (\ref{Timeseries_EQN}), (\ref{deter_EQN}) and (\ref{Stocha_EQN}). In addition, all parameters in these models are estimated by using online data of wind speeds \cite{KSCSW} which represent the 5-minute wind speeds in 2006--2010. These data can be transformed to output power data as follows \cite{Chen10b, Papaefthymiou08}: \begin{eqnarray} S_g = \left\{ {\begin{array}{*{20}{c}} 0 & {v \leq v_{ci}\,or\,v > v_{co}} \\ {A + Bv + Cv^2} & {v_{ci} < v \leq v_r} \\ {P_r} & {v_r < v \leq v_{co}} \end{array}} \right. \end{eqnarray} where $v_{ci}$ , $v_{co}$, $v_r$ and $P_r$ are the cut-in, cut-out, nominal wind speeds, and the rated power output, respectively. These parameters and $(A, B, C)$ are determined as in \cite{Papaefthymiou05}. Finally, the spatial correlation of distributed generation powers can be modeled as in \cite{Hu11}--\cite{Chen10b} where the correlation coefficient between 2 distributed generators $i$ and $j$ is $\rho_{i,j} = \exp\left(-d_{i,j}/d\right)$ where $d = 20 km$ is a positive constant and $d_{i,j}$ is the distance between generators $i$ and $j$, which is randomly chosen in $\left(0,1 km\right]$. We assume that wind/solar generators are installed at a half of total nodes for all following experiments. We ignore the node index $i$ in these notations for brevity. The RI is set as $\tau_T = 5$ minutes. The target probability in the constraint (\ref{OPT_DOST_EQN}) is chosen as $P_{\text{suff}} = 0.9$. The MAC parameters are chosen as $L_s = T_p + t_{ACK} + L_{ACK}$, $T_p = 5+L_{MAC}$ slots ($L_{MAC} = 2$ is the MAC header), $L_{ACK} = 2$ slots, $t_{ACK} = 1$ slot, $t_{ACK,ti} = 4$ slots where $T_p $ is the length of packet, $t_{ACK} $ is the idle time before the ACK, $L_{ACK} $ is the length of ACK, $t_{ACK,ti}$ is the timeout of the ACK, $BO_{\sf max} = 8$, $K_{\tau,{\sf max}} =10$. For all the results presented in this section, we choose $n_T=256$. \subsection{Numerical Results and Discussion} \begin{figure*}[!t] \centering \mbox{\subfigure[]{\includegraphics[width=2.20in]{Prsuff_Numnode_64_K_tau_3_BO_p_s} \label{Prsuff_Numnode_64_K_tau_3_BO_p_s1‎}} \subfigure[]{\includegraphics[width=2.20in]{Prsuff_Numnode_64_K_tau_BO_3_p_s} \label{Prsuff_Numnode_64_K_tau_BO_3_p_s2}} \subfigure[]{\includegraphics[width=2.20in]{Prsuff_Numnode_K_tau_3_BO_4_p_s} \label{Prsuff_Numnode_K_tau_3_BO_4_p_s}} } \caption{$\Pr\left\{K_{\text{succ}} \geq m_{S}\right\} $ vs. $p_s$ for (a) $(n_S, m_{S}, K_{\tau}) = (64, 16, 3)$ and different values of $BO$, (b) $(n_S, m_{S}, BO) = (64, 16, 3)$ and different values of $K_{\tau}$, (c) $(BO, K_{\tau}) = (4, 3) $ and different values of $n_S $.} \end{figure*} \subsubsection{Sufficient Probability} In Fig.~\ref{Prsuff_Numnode_64_K_tau_3_BO_p_s1‎}, we show the variations of sufficient probability, namely $\Pr\!\left\{K_{\text{succ}} \!\geq\! m_{S}\right\}$, versus $p_s$ for different values of $BO_i \!=\! BO $ (i.e., all SFs employ the same $BO$) where $m_{S} \!=\! 16$, $K_{\tau} \!=\! 3$, and $n_S \!=\! 64$. It can be observed that there exists an optimal $p_s$ that maximizes $\Pr\!\left\{K_{\text{succ}} \!\geq\! m_{S}\right\}$ for each value of $BO$. This optimal value is in the range $\left[0.3, 0.5\right]$. Furthermore, $BO$ must be sufficiently large ($BO \!\geq\! 4$) to meet the required target value $P_{\text{suff}}$=0.9. In addition, larger values of $BO$ lead to longer SF length, which implies that more data packets can be transmitted. In Fig.~\ref{Prsuff_Numnode_64_K_tau_BO_3_p_s2}, we show the probability $\Pr\left\{K_{\text{succ}} \geq m_{S}\right\} $ versus $p_s $ for different values of $K_{\tau} $ where we set $n_S = 64 $ and $BO = 3$. This figure confirms that the maximum $\Pr\left\{K_{\text{succ}} \geq m_{S}\right\} $ becomes larger with increasing $K_{\tau} $ where we can meet the target probability $P_{\text{suff}}$=0.9 if $K_{\tau} \geq 6$. Now we fix $BO_i = BO = 4 $, $K_{\tau} = 3 $, then we study $\Pr\left\{K_{\text{succ}} \geq m_{S}\right\}$ versus $p_s $ for different values of $n_S $. Note that $m_{S}$ can be calculated for each value of $n_S $ as presented in Section~\ref{GCSMAC11}. Specifically, $m_{S}$ is equal to 13, 16, 19, and 22 for $n_S = 48, 64, 80 $, and 96, respectively. Fig.~\ref{Prsuff_Numnode_K_tau_3_BO_4_p_s} demonstrates that smaller number of nodes $n_S$ (e.g., $n_S = 48, 64$) can achieve the target value of $P_{\text{suff}} $ at the optimal $p_s$. However, as $n_S$ increases to 80 and 96, there is no $p_s $ that meets the target value of $P_{\text{suff}}$. This is because the collision probability is lower for the smaller number of nodes, which results in larger values of $\Pr\left\{K_{\text{succ}} \geq m_{S}\right\}$. \subsubsection{Reporting Delay} We now show the optimal reporting delay $\mathcal{D}$ in one RI versus the number of nodes $n_S$ for different schemes, namely TDMA, CSMA, TDMA-CS, and our proposed CSMA-CS schemes in Fig.~\ref{Delay_ns}. Here, X-CS refers to scheme X that integrates the CS-based data compression and X refers to scheme X without data compression. Moreover, TDMA is the centralized non-contention time-division-multiple-access MAC, which always achieves better performance that the CSMA scheme. For both CSMA and CSMA-CS schemes, their MAC parameters are optimized by using Alg.~\ref{OPT_Delay}. It can be seen that our proposed CSMA-CS protocol achieves much smaller delay than the CSMA scheme, which confirms the great benefits of employing the CS. In addition, TDMA-CS outperforms our CSMA-CS protocol since TDMA is a centralized MAC while CSMA is a randomized distributed MAC. Finally, this figure shows that our CSMA-CS protocol achieves better delay performance than the TDMA scheme. We illustrate the variations of the optimal reporting delay with $\mathcal{P}_{err} $ for different schemes where $\mathcal{P}_{err} \!=\! 1\!-\!\Pr\!\left\{K_{\text{succ}} \!\geq\! m_{\text{S}}\right\}$ and $n_S \!=\! 64$ in Fig.~\ref{Delay_P_err_n_S_64}. This figure shows that as $\mathcal{P}_{err} $ increases, the reporting delay decreases. This indeed presents the tradeoff between the reporting delay and $\mathcal{P}_{err}$. Note that the delay of the TDMA-CS scheme is the lower bound for all other schemes. Interestingly, as $\mathcal{P}_{err}$ increases the delay gap between the proposed CSMA-CS and the TDMA-CS schemes becomes smaller. We compare the delay performance with partial and full optimization of the MAC protocol for our proposed scheme. Specifically, we consider two following cases in which we set default value for one of three optimization parameters i) $BO_i = BO = 3$ for all SFs; ii) $p_s = 0.45 $. For these two cases, we optimize the remaining parameters to achieve minimum reporting delay in each RI. Fig.~ \ref{minDelay_Numnode_BO_3p_s0_45} shows that our proposed CSMA-CS protocol with full optimization outperforms the others with the partial optimization. Furthermore, the performance for case i) with fixed $BO $ is pretty poor since we only choose the optimal configuration for $p_s $ and $K_{\tau} $ to minimize the delay performance in this case. However, the delay performance degrades more moderately as we fix the access parameter at $p_s = 0.45$. \begin{figure}[!t] \centering \includegraphics[width=80mm]{minDelay_Numnode_K_tauBOp_s} \caption{Reporting delay $\mathcal{D}$ vs. $n_S$.} \label{Delay_ns} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=80mm]{Delay_P_err_n_S_64} \caption{Reporting delay $\mathcal{D}$ vs. $\mathcal{P}_{err}$.} \label{Delay_P_err_n_S_64} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=80mm]{minDelay_Numnode_BO_3p_s0_45} \caption{Optimal $\mathcal{D}$ vs. $n_S$ with full and partial optimizations.} \label{minDelay_Numnode_BO_3p_s0_45} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=80mm]{minEnergy_Numnode_K_tauBOp_s} \caption{Energy consumption $E$ vs. $n_S$ for one RI.} \label{minEnergy_Numnode_K_tauBOp_s} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=80mm]{minEnergy_onefield_Numnode_K_tauBOp_s} \caption{Energy consumption $\mathcal{E}$ vs. $n_S$ for one data field.} \label{minEnergy_onefield_Numnode_K_tauBOp_s} \end{figure} \subsubsection{Energy Consumption} We present the energy consumption for different schemes in Figs.~\ref{minEnergy_Numnode_K_tauBOp_s}, \ref{minEnergy_onefield_Numnode_K_tauBOp_s} under the following parameter setting: $E_{\sf idle} = 0.228 \mu J/{\sf slot}$, $E_{\sf tx} = 10.022 \mu J/{\sf slot}$, $E_{\sf rx} = 11.290 \mu J/{\sf slot}$, and $E_{\sf sens} =E_{\sf rx}$ \cite{Poll08}. Fig.~\ref{minEnergy_Numnode_K_tauBOp_s} demonstrates the energy consumption $E$ in one RI for different values of $n_S$. It can be seen that the proposed CSMA-CS scheme results in significant energy saving compared to the TDMA scheme. For completeness, we also show the energy consumption for one data field (i.e., for $n_T$ RIs and $n_S$ nodes) in Fig.~\ref{minEnergy_onefield_Numnode_K_tauBOp_s}. Recall that in the proposed framework, only data blocks corresponding to $(m_S, m_T)$ are reported where $(m_S, m_T)$ can be determined for each $(n_S, n_T)$ as described in Section~ \ref{GCSMAC11}. Specifically, we have $(m_S, m_T) = \left\{(10, 194), (13, 190), (16, 180), (19, 166), (22, 151)\right\}$ for $n_T$=256 and $n_S = \left\{32, 48, 64, 80, 96\right\}$, respectively. Again, this figure confirms that the proposed CSMA-CS scheme outperforms the TDMA scheme. Moreover, the consumed energy of the proposed CSMA-CS scheme is slightly higher than that due to the TDMA-CS scheme. \begin{figure}[!t] \centering \includegraphics[width=80mm]{Numchan_N_Numnode_BOp_s} \caption{Number of channels vs. $N$.} \label{Numchan_N_Numnode_BOp_s} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=80mm]{Delay_target_Numnode} \caption{Number of channels vs. target delay.} \label{Delay_target_Numnode} \end{figure} \begin{figure}[!t] \centering \includegraphics[width=80mm]{Numchan_nS_Numnode_BOp_s} \caption{Number of channels vs. $n_S$.} \label{Numchan_nS_Numnode_BOp_s} \end{figure} \subsubsection{Bandwidth Usage} We now examine the bandwidth usage due to different schemes. To ease the exposition, we do not show the results of the CSMA and TDMA-CS schemes. The group sizes for TDMA and CSMA-CS protocols, namely $n_S^{\sf TDMA}$, $n_S^{\sf CSMA-CS}$, can be determined for a given target delay $\mathcal{D}_{\sf max}$ by using the results shown in Fig.~\ref{Delay_ns}. Specifically, we have $n_S^{\sf TDMA}\!\! = \left\{40, 75\right\}$ and $n_S^{\sf CSMA-CS}\!\! = \left\{55, 128\right\}$ for TDMA and CSMA-CS schemes for the target delay values of $\mathcal{D}_{\sf max} = \left\{400, 750\right\}$ slots, respectively. Then we calculate the required bandwidth (i.e., number of channels) for TDMA and CSMA-CS schemes with a given number of nodes $N$. In Fig.~\ref{Numchan_N_Numnode_BOp_s}, we show the required number of channels versus $N$. It can be observed that our proposed CSMA-CS scheme requires less than half of the bandwidth demanded by the TDMA scheme. Also when the network requires smaller target delay, we need more channels for both schemes as expected. Finally, Fig.~\ref{Delay_target_Numnode} illustrates the variations in the number of channels versus the target delay for $N = \left\{2048, 8192\right\}$. Again, our proposed CSMA-CS scheme provides excellent bandwidth saving compared to the TDMA scheme. In Fig.~\ref{Numchan_nS_Numnode_BOp_s}, we show the required number of channels versus $n_S$ for $N = \left\{2048, 4096\right\}$. These results can be obtained as follows. Suppose that the target delay in one RI is 650 slots then the group sizes for TDMA and CSMA-CS protocols can be determined from the results in Fig.~\ref{Delay_ns} as $\left\{n_S^{\sf TDMA} , n_S^{\sf CSMA-CS}\right\} = \left\{65, 96\right\}$. Then using the results in Fig.~\ref{Numchan_nS_Numnode_BOp_s}, the numbers of required channels for TDMA and CSMA-CS protocols are $\left\{64, 25\right\}$ for $N = 4096$ and $\left\{32, 13\right\}$ for $N = 2048 $. We can observe that the number of required channels for our proposed scheme is always less than that due to the TDMA protocol, which again demonstrates the efficacy of our proposed design. \vspace{0.2cm} \section{Conclusion} \label{Conclusion} We have proposed the joint design of data compression using the CS technique and CSMA MAC protocol for smartgrids with renewable energy. We have shown how to choose the compression levels in the space and time dimensions to maintain desirable reconstruction performance. Then, we have presented the design and optimization of the MAC protocol to minimize the reporting delay. Furthermore, we have derived the bandwidth usage and energy consumption for our proposed scheme. Numerical results have confirmed the significant performance gains of the proposed design compared to other non-compressed solutions. \appendices \section{Markov Chain Model for CSMA Protocol} \label{Mark_chain_mod} \begin{figure*}[!t] \centering \includegraphics[width=120mm]{Markovchain} \caption{Markov chain model for CSMA protocol.} \label{Markovchain} \end{figure*} We study the Markov chain model for the slotted CSMA/CA protocol, which is similar to the one in \cite{Prime}. We consider the case with $h_i$ contending nodes and we use the same notations as in \cite{Poll08}. However, our analysis has the additional ``deference state'', which was not considered in \cite{Poll08}. We consider the 2D Markov chain (MC) for slotted CSMA/CA MAC protocol $\left(s(t), c(t) \right)$ where $s(t)=-1$ represents the transmission state, and $s(t)=[0,NB]$ captures the backoff stages (BK); $c(t)=-1,-2$ denote the first and second CCAs; $c(t)=[0,L-1]$ represents transmission slots and $c(t)=[0,W_i-1]$ describes the states of backoff counter. The detail of superframe structure in one RI is demonstrated in Fig.~\ref{cycletime}. Here, $L$ is used to denote the general transmission time where $L=L_s = T_p + t_{ACK} + L_{ACK}$ for a successful transmission and $L=L_c = T_p + t_{ACK,ti}$ for a collided transmission, $T_p$ is packet transmission time, $L_{ACK}$ is the ACK time, and $t_{ACK,ti}$ is the ACK timeout. Fig.~\ref{Markovchain} shows the transition diagram of this MC. Let $b_{i,k} = {\sf lim}_{t \rightarrow \infty} \Pr\left(s(t) = i, c(t) = k\right)$ denote the stationary probability of the Markov chain. In this paper, we asume that $NB = d$ as in \cite{Prime} where $d = macMaxBE - priority $, $priority = 2$ is the priority of node and also the number of CCAs. In addition, $macMaxBE $ is the maximum backoff exponent and $NB = macMaxattempt-1 $ is the maximum number of backoffs. We define the following parameters: $\lambda = \alpha + \beta - \alpha \beta $, $\omega = \lambda \left(1-\mathcal{P}_d\right) $, where $\alpha $ and $\beta $ are the probabilities that a node fails to identify an idle channel during $CCA_1 $ and $CCA_2 $, respectively; $\mathcal{P}_d = L_s/SF $ is the probability of deference. Using the analysis similar to that in \cite{Poll08}, we can arrive at the following the relationship for the steady-state probabilities: $b_{i,0} = \omega^i b_{0,0} $, $b_{i,-1} = b_{i,0} (1-\mathcal{P}_d) $, $b_{i,-2} = b_{i,0} (1-\mathcal{P}_d) (1-\alpha) $ (for $i \in \left[0, NB\right]$), and $b_{-1,k} = (1-\mathcal{P}_d) (1-\alpha) (1-\beta) \sum_{i=0}^{NB} b_{i,0} $, $b_{i,k} = \frac{W_i-k}{W_i} b_{i,0} $ (for $i \in \left[0, NB\right], k \in \left[-2, {\sf max} \left(W_i-1, L_s-1\right)\right] $). Since we have $\sum_{i,k} b_{i,k} = 1 $, substitute the above results for all $b_{i,k}$ and perform some manipulations, we can obtain \begin{eqnarray} \label{Stead_EQN} 1=\frac{b_{0,0}}{2} \left\{W_0 \frac{1-\left(2\omega\right)^{NB+1}}{1-2\omega}+ \frac{1-\omega^{NB+1}}{1-\omega} \times \right. \nonumber \\ \left. \left[3+2\left(1-\mathcal{P}_d\right)\left(1+\left(1-\alpha\right)\left(1+\left(1-\beta\right)L_s\right)\right)\right] \right\}. \label{b00_EQN} \end{eqnarray} From these results, we can find the relationship among $b_{0,0} $, $\alpha $, $\beta $, $\phi $ as follows \cite{Poll08}: \begin{eqnarray} \phi = \sum_{i=0}^{NB} b_{i,0} = \frac{1-\omega^{NB+1}}{1-\omega} b_{0,0} \label{phi1_EQN} \\ \phi = 1 - \left(1-\frac{\alpha}{L^*\left(1-\omega\right)}\right)^{\frac{1}{h-1}} \label{phi2_EQN} \\ \phi = 1 - \left(1 - \frac{\beta_{ACK}}{\left(1-\beta_{ACK}\right)\left(2-\mathcal{P}_{\text{ncol}}\right)}\right)^{1/h} \label{phi3_EQN} \end{eqnarray} where $\phi $ is the probability that a node is at the $CCA_1 $ state after backoff, $L^* = T_p + L_{ACK} \left(1 - \mathcal{P}_{\text{ncol}}\right)$, $\mathcal{P}_{\text{ncol}} = 1 - \frac{h\phi\left(1-\phi \right)^{h-1}}{1-\left(1-\phi\right)^h} $, $\beta_{ACK} = \frac{2-\mathcal{P}_{\text{ncol}}}{2-\mathcal{P}_{\text{\text{ncol}}}+\frac{1}{1-\left(1-\phi\right)^h}} $ . From (\ref{b00_EQN}), (\ref{phi1_EQN}), (\ref{phi2_EQN}) and (\ref{phi3_EQN}), we can determine $b_{0,0} $, $\alpha $, $\beta $, and $\phi $ by using the standard numerical method. \section{Calculation of ${\bar T}_i $ and $\sigma^2_i $} \label{average_variance} In this appendix, we determine $\bar{T}_i $ and $\sigma^2_i $ for a particular SF $i$. For simplicity, we again omit the index $i$ and $h_i$ in all related parameters when this does not create confusion. First, we can express the probability generating function (PGF) of the generic frame, $T(z) $ which includes success, collision, CCA failure and deference, as \begin{eqnarray} T\left(z\right) = \mathcal{P}_{\sf succ} T_S\left(z\right) + \mathcal{P}_{\text{coll}} T_C\left(z\right) + \mathcal{P}_{\text{ccas}} T_F\left(z\right) + \mathcal{P}_d T_D\left(z\right) \end{eqnarray} Here we denote $\mathcal{P}_{\text{ccas}} $, $\mathcal{P}_{\text{coll}} $ and $\mathcal{P}_{\text{succ}} $ as the probabilities of CCA failure, collision and success, respectively. These probabilities can be calculated as $\mathcal{P}_{\text{ccas}} = \left(1-\mathcal{P}_d\right) \lambda^{NB+1} $, $\mathcal{P}_{\text{coll}} = p_c \left(1-\mathcal{P}_d\right) \left(1-\lambda^{NB+1}\right) $, and $\mathcal{P}_{\sf succ} = 1-\mathcal{P}_{\text{coll}}- \mathcal{P}_{\text{ccas}}- \mathcal{P}_d $, where $p_c = 1-\left(1-\phi\right)^{h-1} $. Moreover, we also denote $T_S\left(z\right) $, $T_C\left(z\right) $, $T_F\left(z\right)$ and $T_D\left(z\right) $ as the PGFs of durations of success, collision, CCA failure and deference, respectively. These quantities can be calculated as in \cite{Park10}. Finally, we can determine $\bar T $ and $\sigma^2$ from the first and second derivation of $T\left(z\right) $ at $z = 1 $, i.e., \begin{eqnarray} \bar T = \frac{dT}{dz}\left(1\right) ; \sigma^2 = \frac{d^2T}{dz^2}\left(1\right) + \bar T - \left(\bar T\right)^2. \label{var_genfram_EQN} \end{eqnarray} These parameters $\bar T $ and $\sigma^2$ will be utilized in (\ref{K_genfram_EQN}). \section{Calculation of ${E}_i $} \label{energy_consumption_i} The energy consumption per node in SF $i$ with $h_i $ contending nodes can be expressed as \begin{eqnarray} E_i = E_{b,i} + E_{{\sf ccas},i} + E_{{\sf suco},i} + E_{d,i} \end{eqnarray} where $E_{b,i}$, $E_{{\sf ccas},i}$, $E_{{\sf suco},i}$, and $E_{d,i} $ are the average energy consumption due to backoffs, CCAs, transmissions (successful/collided transmissions), and deference, respectively. Let us denote $E_{\sf idle} $, $E_{\sf sens} $, $E_{\sf tx} $ and $E_{\sf rx} $ as the energy consumption corresponding to idle, CCA sensing, transmitting and receiving slots, respectively; then, these quantities are determined as follows. For brevity, we again omit the index $i$ and $h_i$ in all related parameters if this does not create confusion. First, the energy consumption during backoff duration is $E_{b,i} = E_{\sf idle} \sum_{j=0}^{NB} \sum_{k=0}^{W_j -1} b_{j,k} $. After some simple manipulations, we can arrive at \cite{Park11} \begin{eqnarray} E_{b,i} = E_{\sf idle} /2 \left(W_0 b_{0,0} \frac{1-(2\omega)^{NB+1}}{1-2\omega}+3 \phi \right). \end{eqnarray} Also, $E_{{\sf ccas},i} $ can be determined as \begin{eqnarray} E_{ccas,i} \!\!=\!\! E_{\sf sens}\!\sum_{j=0}^{NB} (b_{j,-1} \!+\! b_{j,-2}) \!\!=\!\! E_{\sf sens} (1-\mathcal{P}_d)(2-\alpha) \phi. \end{eqnarray} Moreover, $E_{{\sf suco},i} $ is given as \cite{Park11} \begin{eqnarray} E_{{\sf suco},i} = E_{\sf tx} \sum_{k=0}^{T_p-1} b_{-1,k} + E_{\sf rx} (1-p_c) \sum_{k=T_p+t_{ACK}}^{L_s-1} b_{-1,k} + \nonumber \\ E_{\sf idle} \left((1-p_c)\!\!\!\sum_{k=T_p}^{T_p+t_{ACK}-1} \!\! b_{-1,k}+p_c \!\! \sum_{k=T_p}^{T_p+t_{ACK,ti}-1} \!\! b_{-1,k}\right) \\ = (1-\lambda) (1-\mathcal{P}_d) \phi \left(E_{\sf tx} T_p + E_{\sf rx} L_{ACK} (1-p_c) + \right. \nonumber \\ \left. E_{\sf idle} (t_{ACK} (1-p_c) + t_{ACK,ti} p_c)\right). \end{eqnarray} Finally, $E_{d,i} $ can be expressed as $E_{d,i} = E_{\sf idle} \mathcal{P}_d L_s$. \bibliographystyle{IEEEtran}
{'timestamp': '2016-06-17T02:02:04', 'yymm': '1606', 'arxiv_id': '1606.04995', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04995'}
arxiv
\section{Introduction} Deep Q Network (DQN) is an off-policy learning algorithm that uses a Convolutional Neural Network (CNN; \citep{Krizhevsky2012}) to represent the action-value function. Agents trained using DQN are showing superior performance on a wide range of problems \citep{mnih2015human}. Their success, and that of Deep Neural Network (DNN) in general, is explained by its ability to learn good representations automatically. Unfortunately, its high expressiveness is also the source of its unclarity, making it very hard to analyze. Visualization methods for DNN try to tackle this problem by analyzing and interpreting the learned representations \citep{zeiler2014visualizing,erhan2009visualizing,yosinski2014transferable}. However, these methods were developed for supervised learning tasks, assuming the data is i.i.d, thus overlooking the temporal structure of the learned representation. A major challenge in Reinforcement Learning (RL) is scaling to higher dimensions in order to solve real-world applications. Spatial abstractions such as state aggregation \citep{bertsekas1989adaptive}, tries to tackle this problem by grouping states with similar characteristics such as policy behaviour, value function or dynamics. On the other hand, temporal abstractions (i.e., options or skills \citep{Sutton1999}) can help an agent to focus less on lower level details of a task and more on high level planning \citep{dietterich2000hierarchical,parr1998flexible}. The problem with these methods is that finding good abstractions is typically done manually which hampers their wide use. The internal model principle \citep{francis1975internal}, "Every good key must be a model of the lock it opens", was formulated mathematically for control systems by \citet{sontag2003adaptation}, claiming that if a system is solving a control task, it must necessarily contain a subsystem which is capable of predicting the dynamics of the system. In this work we follow the same line of thought and claim that DQNs are learning an underlying spatio-temporal model of the problem, without implicitly being trained to. We identify this model as an Semi Aggregated Markov Decision Process (SAMDP), an approximation of the true MDP that allows human interpretability. \citet{Zahavy2016} used hand-crafted features in order to interpret policies learned by DQN agents. They revealed that DQNs are automatically learning spatio-temporal representations such as hierarchical state aggregation and skills. The main drawback of their approach is that they used a manual reasoning of a t-Distributed Stochastic Neighbour Embedding (t-SNE) map \citep{van2008visualizing}, a tedious process that requires careful inspection as well as an experienced eye. Moreover, their claim to observe skills is not supported with any quantitative evidence. In contrast, we use temporal aware clustering algorithms in order to aggregate the state space, and automatically reveal the underlying spatio-temporal structure of the t-SNE map. The aggregated states uniquely identify skills and allow us to estimate the SAMDP transition probabilities and reward signal empirically. In particular our main contributions are \begin{enumerate} \item \textbf{SAMDP:} a model that gives a simple explanation on how DRL agents solve a task - by hierarchically decomposing it into a set of sub-problems and learning specific skills at each. \item \textbf{Automatic analysis:} we suggest quantitative criteria that allows us to select good models and evaluate their consistency. \item \textbf{Interpretation:} we developed a novel visualization tool that gives a qualitative understanding of the learned policy. \item \textbf{Shared autonomy:} the SAMDP model allows us to predict situations where the DQN agent is not performing well. In such occasions we suggest to take the control from the agent and ask for expert advice. \end{enumerate} \section{Background} We briefly review the standard reinforcement learning framework of discrete-time, finite Markov decision processes (MDPs). In this framework, the goal of an RL agent is to maximize its expected return by learning a policy $\pi:S \rightarrow \Delta_A$, a mapping from states $s \in S$ to probability distribution over actions $A$. At time $t$ the agent observes a state $s_t \in S$, selects an action $a_t \in A$, and receives a reward $r_t$. Following the agents action choice, it transitions to the next state $s_{t+1} \in S$. We consider infinite horizon problems where the cumulative return at time $t$ is given by $R_t = \sum_{t'=t}^\infty \gamma^{t'-t}r_t$, and $\gamma\in[0,1]$ is the discount factor. The action-value function $Q^{\pi}(s,a) = \mathbb{E} [R_t|s_t = s, a_t = a, \pi]$ represents the expected return after observing state $s$, taking action $a$ after which following policy $\pi$. The optimal action-value function obeys a fundamental recursion known as the optimal Bellman Equation: $Q^* (s_t,a_t)=\mathbb{E} \left[r_t+\gamma \underset{a'}{\mathrm{max}}Q^*(s_{t+1},a') \right] .$\\ \textbf{Deep Q Networks:} The DQN algorithm approximates the optimal Q function using a CNN. The training objective it to minimize the expected TD error of the optimal Bellman Equation: $$\label{DQN_loss}\mathbb{E}_{s_t,a_t,r_t,s_{t+1}}\left\Vert Q_{\theta}\left(s_{t},a_{t}\right)-y_{t}\right\Vert _{2}^{2}$$ \citep{mnih2015human}. DQN is an offline learning algorithm that collects experience tuples $\left\{ s_{t,}a_{t},r_{t},s_{t+1},\gamma\right\}$ and stores them in the \textbf{Experience Replay (ER)} \citep{lin1993reinforcement}. At each training step, a mini-batch of experience tuples are sampled at random from the ER. The DQN maintains two separate Q-networks. The current Q-network with parameters $\theta$, and the target Q-network with parameters $\theta_{target}$. The parameters $\theta_{target}$ are set to $\theta$ every fixed number of iterations. In order to capture the MDP dynamics, the final DQN representation is a concatenation of several consecutive states. \textbf{Skills, Options, Macro-actions,} \citep{Sutton1999} are temporally extended control structures, denoted by $\sigma$. A skill is defined by a triplet: $\sigma = <I,\pi,\beta>.$ I defines the set of states where the skill can be initiated. $\pi$ is the intra-skill policy, and $\beta$ is the set of termination probabilities determining when a skill will stop executing. $\beta$ is typically either a function of state $s$ or time $t$. Any MDP with a fixed set of skills is a \textbf{Semi-Markov Decision Process (SMDP)}. Planning with skills can be performed by learning for each state the value of choosing each skill. More formally, an SMDP can be defined by a five-tuple $<S, \Sigma, P, R, \gamma>,$ where $S$ is the set of states, $\Sigma$ is the set of skills, $P$ is the SMDP transition matrix, $\gamma$ is the discount factor and the SMDP reward is defined by: \begin{equation} \label{eq:skill_reward} R_s^{\sigma} = \mathbb{E}[r_s^{\sigma}] = \mathbb{E}[r_{t+1} + \gamma r_{t+2} + \cdot\cdot\cdot + \gamma ^{k-1} r_{t+k} | s_t=s,\sigma] \end{equation} The \textbf{Skill Policy} $\mu : S\rightarrow \Delta_\Sigma$ is a mapping from states to a probability distribution over skills. The action-value function $Q_\mu(s, \sigma) = \mathbb{E} [\sum ^\infty _{t=0} \gamma ^t R_t |(s, \sigma), \mu] $ represents the value of choosing skill $\sigma \in \Sigma$ at state $s \in S$, and thereafter selecting skills according to policy $\mu$. The optimal skill value function is given by: $ \label{OptionBellman} Q_{\Sigma}^*(s,\sigma) = \mathbb{E} [R_s^{\sigma} + \gamma ^k \underset{\sigma'\in \Sigma}{\mathrm{max}} Q_{\Sigma}^*(s',\sigma')] \enspace$ \citep{stolle2002learning}. \section{Semi Aggregated Markov Decision Processes} Reinforcement Learning problems are typically modeled using the MDP formulation. The abundant theory developed for MDP throughout the years gave rise to various algorithms for efficiently solving MDPs, and finding good policies. MDP however, is not the optimal modeling choice when one wishes to analyze a given policy. Policy analysis methods typically suffer from the cardinality of the state space and the length of the planning horizon. For example, building a graphical model that explains the policy will be too large (in terms of states), and complex (in terms of planning horizon) for a human to comprehend. If the policy one wishes to analyze is known to be planning using temporally-extended actions (i.e. skills), then one may resort to \textbf{SMDP} modeling. The SMDP model reduces the planning horizon dramatically and simplifies the graphical model. There are two problems however with this approach. First, it requires to identify the set of skills used by the policy, a long-standing challenging problem with no easy solution. Second, one is still facing the high complexity of the state space. \begin{figure}[h] \begin{tabular}{ c @{\hskip 0.35in} c } \includegraphics[width=0.25\textwidth]{aggregation_diagram.pdf} & \includegraphics[width=0.65\textwidth]{modeling_graph.pdf} \end{tabular} \caption{\textbf{Left:} Illustration of state aggregation and skills. Primitive actions (orange arrows) cause transitions between MDP states (black dots) while skills (red arrows) induce transitions between SAMDP states (blue circles). \textbf{Right:} Modeling approaches for analyzing policies. MDP (top-left): a policy is analyzed in the MDP state space $S$, with the original set of primitive actions $A$. SMDP (top-right): using the set of identified skills $(A \rightarrow \Sigma)$, the policy is easier to analyze. AMDP (bottom-left): State aggregation allows to reduce state space complexity $(S \rightarrow C)$. SAMDP (bottom-right): identifying skills in the AMDP model reduces the planning horizon $(S \rightarrow C ,A \rightarrow \Sigma)$.} \label{fig:modeling} \end{figure} A different modeling approach is to aggregate similar states first. This is useful when there is a reason to believe that groups of states share common attributes such as similar policy, value function or dynamics. State aggregation is a well studied problem that can be solved by applying clustering on the MDP state representation. These models are not necessarily Markovian, however they can provide great simplification of the state space. With a slight abuse of notation we denote this model as Aggregated MDP (\textbf{AMDP}). Under the right state-representation, the AMDP can also help to identify skills (if exist). We argue that this is possible if the AMDP dynamics is such that the majority of the transitions are done within the clusters, followed by rare transitions between clusters. As we will show in the experiments section, DQN indeed provides a good state representation that allows skill identification. If the state representation contains both spatial and temporal hierarchies, then the AMDP model can be further simplified into an \textbf{SAMDP} model. Under SAMDP modeling, both the state-space cardinality and the planning horizon are reduced, making policy reasoning more feasible. We summarize our observations about the different modeling approaches in Figure~\ref{fig:modeling}.\\ In the remaining of this section we explain the SAMDP modeling in detail and focus on explaining how to empirically build an SAMDP model from experience. To do so we explain how to aggregate states, identify skills and estimate the transition probabilities and reward measures. Finally we discuss how to evaluate the fitness of an empiric SAMDP model to the data. \subsection{State aggregation} \label{sec:agg} We evaluate a \textbf{DQN} agent, by letting it play multiple trajectories with an $\epsilon$-greedy policy. During evaluation we record all visited states, neural activations, value estimations, and index them by their visitation order. We treat the neural activations as the state representation that the DQN agent has learned. \citet{Zahavy2016} showed that this state representation captures a spatio-temporal hierarchy and therefore makes a good candidate for state aggregation. We then apply \textbf{t-SNE} on the neural activations data, a non-linear dimensionality reduction method that is particularly good at creating a single map that reveals structure at many different scales. t-SNE reduces the tendency of points to crowd together in the center of the map by using a heavy tailed Student-t distribution in the low dimensional space. The result is a compact, well separated representation, that is easy to visualize and interpret. We represent an MDP state $s_i$ by a feature vector $x_i\in\mathbb{R}^3$, comprised of the two t-SNE coordinates and the DQN value estimate. Using this representation we aggregate the state space by applying clustering algorithms and define the AMDP \textbf{states} $C$ as the resulting \textbf{clusters}. Standard clustering algorithms assume that the data is drawn from an i.i.d distribution, however our data is generated from an MDP which violates this assumption. \begin{algorithm} \caption{K-means \citep{macqueen1967some} for state aggregation} \label{alg:kmeans} \textbf{Input:} MDP sates feature representation $(x_1, x_2, \cdots, x_n).$\\ \textbf{Output:} SAMDP states $(c_1, c_2, \cdots, c_k).$\\ \textbf{Objective:} minimize the within-cluster sum of squares: \begin{center} $\underset{\mathbf{C}} {\operatorname{arg\,min}} \sum_{i=1}^{k} \sum_{\mathbf x \in C_i} \left\| \mathbf x - \boldsymbol\mu_i \right\|^2$ \end{center} where $\mu_i$ is the mean of points in $c_i$.\\ \textbf{Repeat} until convergence: \begin{enumerate} \item \textbf{Assignment step,} each observation $x_i$ is assigned to its closest cluster center: \begin{center} $ C_i^{(t)} = \big \{ x_p : \big \| x_p - \mu^{(t)}_i \big \|^2 \le \big \| x_p - \mu^{(t)}_j \big \|^2 \forall j, 1 \le j \le k \big\}. $ \end{center} \item \textbf{Update step,} each cluster center $\mu_j$ is updated to be the mean of its constituent instances: \begin{center} $\mu^{(t+1)}_i = \frac{1}{|C^{(t)}_i|} \sum_{x_j \in C^{(t)}_i} x_j.$ \end{center} \end{enumerate} \end{algorithm} In order to alleviate this problem, we suggest two versions of K-Means (Algorithm~\ref{alg:kmeans}) that take into account the temporal structure of the data. \textbf{(1) Spatio-Temporal Cluster Assignment} that encourages temporal coherency by modifying the assignment step in the following way: \begin{equation} \label{convolve} C_i^{(t)} = \big \{ x_p : \big \| X_{p-w:p+w} - \mu^{(t)}_i \big \|^2 \le \big \| X_{p-w:p+w} - \mu^{(t)}_j \big \|^2, \forall j, 1 \le j \le k \big\} \end{equation} Where $p$ is the time index of observation $x_p$, $X_{p-w:p+w}$ is the set of $2w$ points before and after $x_p$ along the trajectory. In this way, a point $x_p$ is assigned to a cluster $\mu_j$, if its neighbours along the trajectory are also close to $\mu_j$.\\ \textbf{(2) Entropy Regularization Cluster Assignment} that creates simpler models by adding an entropy regularization term to the K-mean assignment step: \begin{equation} \label{entropy_regularization} C_i^{(t)} = \big \{ x_p : \big \| x_p - \mu^{(t)}_i \big \|^2 + d \cdot e^{t-1}_{x_p \rightarrow i} \le \big \| x_p - \mu^{(t)}_j \big \|^2 + d \cdot e^{t-1}_{x_p \rightarrow j}, \forall j, 1 \le j \le k \big\}. \end{equation} Where $d$ is a penalty weight, and $e^{t-1}_{x_p \rightarrow i}$ indicates the entropy (as defined in Section~\ref{sub:eval}) gain of changing $x_p$ assignment to cluster $i$ in the SMDP obtained at iteration $t-1$. This is equivalent to minimizing an energy function, the sum of the K-means objective function and an entropy term.\\ We also considered \textbf{Agglomerative Clustering,} a bottom-up hierarchical approach. Starting with a mapping from points to clusters (e.g., each point is a singular cluster), the algorithm advances by merging pairs of clusters such that a linkage criteria is minimized. In order to encourage temporal coherency in cluster assignments we define a new linkage criteria based on \citet{Inchoate:Ward63}: \begin{equation} c(A,B)=(1-\lambda) \cdot mean\{\|x_a-x_b\|:a \in A, b \in B\}+ \lambda\cdot e_{\{A,B\} \rightarrow AB} \end{equation} where $e_{\{A,B\} \rightarrow AB}$ measures the difference between the entropy of the corresponding SMDP before and after merging clusters $A,B$. \subsection{Temporal abstractions} We define the SAMDP \textbf{skills} by their initiation and termination AMDP states $C$: \begin{equation} \label{eq:skill_def} \sigma_{ij} = <\{ c_i \},\pi_{i,j},\{ c_j \}>. \end{equation} More implicit, once the DQN agent enters an AMDP state $c_i$ at an MDP state $s_t \in c_i$, it follows the skill policy $\pi_{i,j}$ for $k$ steps, until it reaches a state $s_{t+k} \in c_j$, s.t $i \neq j$. Note that we do not define the skill policy implicitly, but we will observe later that our model successfully captures spatio-temporal defined skill policies. We set the SAMDP discount factor $\gamma$ same as was used to train the DQN. We now turn to estimate the SAMDP probability matrix and reward signal. For that goal we make the following assumptions: \textbf{Definition 1. } \textit{ A deterministic probability matrix, is a probability matrix such that each of its rows contains one element that equals to $1$ and the others equal to $0$.} \textbf{Assumption 1. } \textit{The MDP transition matrices $P_A: P^{a \in A}_{i,j}=Pr(x_j|x_i,a)$ are deterministic.}\\ This assumption limits our analysis for environments with deterministic dynamics. However, many interesting problems are in fact deterministic, e.g., Atari2600 benchmarks, Go, Chess etc. \textbf{Assumption 2. } \textit{ The policy played by the DQN agent is deterministic.}\\ Although DQN chooses actions deterministically (by selecting the action that corresponds to the maximal Q value in each state), we allow $5\%$ $\epsilon$ stochastic exploration. This introduces errors into our model that we will later analyze.\\ Given the DQN policy, the MDP is reduced into a Markov Reward Process (MRP) with probability matrix $P^{\pi^{DQN}}_{i,j}=Pr(x_j|x_i,a=\pi^{DQN}(x_i))$. Note that by Assumptions 1 and 2, this is also a deterministic probability matrix. The SAMDP \textbf{transition probability matrix} $P_\Sigma: P^{\sigma \in \Sigma}_{i,j}=Pr(c_j|c_i,\sigma)$, indicates the probability of moving from state $c_i$ to $c_j$ given that skill $\sigma$ is chosen. It is also a deterministic probability matrix by our definition of skills (Equation~\ref{eq:skill_def}). Our goal is to estimate the probability matrix that the DQN policy induces on the SAMDP model: $P^{\pi^{DQN}}_{i,j}=Pr(c_j|c_i,\sigma=\pi^{DQN}(c_i))$. We do not require this policy to be deterministic from two reasons. First, we evaluate the DQN agent with an $\epsilon$-greedy policy. While almost deterministic in the view of a single time step, the variance of its behaviour increases as more moves are played. Second, the aggregation process is only an approximation. For example, a given state may contain more than one "real" state and therefore hold more than one skill with different transitions. A stochastic policy can solve this disagreement by allowing to choose skills at random. This type of modeling does not guarantee that our SAMDP model is Markovian and we are not claiming it to be. SAMDP is an approximation of the the true dynamics that simplifies it over space and time to and allow human interpretation. Finally, we estimate the skill length $k_\sigma$ and SAMDP reward for each skill from the data using Equation~\ref{eq:skill_reward}. In the experiments section we show that this model is in fact consistent with the data by evaluating its value function: \begin{equation} \label{eq:samdp_value} V_{SAMDP} = ( I+\gamma^{k}P )^{-1}r \end{equation} and the greedy policy with respect to it: \begin{equation} \label{eq:samdp_greedy_policy} \pi_{greedy}(c_i) = \underset{j}{\mbox{argmax}} \{ R_{\sigma_{i,j}}+\gamma^{k_{\sigma_{i,j}}}v_{SAMDP}(c_j) \} \end{equation} \subsection{Evaluation criteria} \label{sub:eval} We follow the analysis of \citep{hallak2013model} and define criteria to measure the fitness of a model empirically. We define the \textbf{Value Mean Square Error(VMSE)} as the normalized distance between two value estimations: $\mbox{VMSE} = \frac{\| v^{DQN}-v^{SAMDP} \|}{\|v^{DQN}\|}.$ The SAMDP value is given by Equation~\ref{eq:samdp_value} and the DQN value is evaluated by averaging the DQN value estimates over all MDP states in a given cluster (SAMDP state): ${v^{DQN}(c_j)}=\frac{1}{|C_j|}\sum_{i: s_i \in c_j}v^{DQN}(s_i)$ .\\ The \textbf{Minimum Description Length} (MDL; \citep{rissanen1978modeling}) principle is a formalization of the celebrated Occam’s Razor. It copes with the over-fitting problem for the purpose of model selection. According to this principle, the best hypothesis for a given data set is the one that leads to the best compression of the data. Here, the goal is to find a model that explains the data well, but is also simple in terms of the number of parameters. In our work we follow a similar logic and look for a model that best fits the data but is still “simple”.\\ Instead of considering "simple" in terms of the number of parameters, we measure the simplicity of the spatio-temporal state aggregation. For spatial simplicity we define the Inertia: $I = \sum_{i=0}^{n}\min_{\mu_j \in C}(||x_j - \mu_i||^2)$ which measures the variance of MDP states inside a cluster (AMDP state). For temporal simplicity we define the entropy: $e= - \sum_i \{ |C_i| \cdot \sum_j{P_{i,j} \log P_{i,j}} \}$ , and the \textit{Intensity Factor} which measures the fraction of in/out cluster transitions: $F = \sum_j \frac{P_{jj}}{\sum_i P_{ji}}.$\\ To \textbf{summarize}, the stages of building an SAMDP model are: \begin{enumerate} \item \textbf{Evaluate :} Run the trained (DQN) agent, record visited states, representations and Q-values. \item \textbf{Reduce :} Apply t-SNE on the state representations to obtain a low dimensional map. \item \textbf{Aggregate :} Cluster states in the map. \item \textbf{Model :} Fit an SAMDP model, select the best model. \item \textbf{Visualize :} Visualize the SAMDP on top of the t-SNE map. \end{enumerate} \section{Experiments} \label{Experiments} \textbf{Setup.} We evaluate our method on three Atari2600 games, Breakout, Pacman and Seaquest. For each game we collect 120k game states (each represented by 512 features), and Q-values for all actions. We apply PCA to reduce the data to 50 dimensions, then we apply t-SNE using the Barnes Hut approximation to reach the desired low $2$ dimension. We run the t-SNE algorithm for 3000 iterations with perplexity of 30. We use Spatio-Temporal K-means clustering (Section~\ref{sec:agg}) to create the AMDP states (clusters), and evaluate the transition probabilities between them using the trajectory data. We overlook flicker-transitions where a cluster is visited for less than $f$ time steps before transiting out. Finally we truncate transitions with less than 0.1 probability. \begin{figure}[h] \centering \captionsetup{justification=centering} \includegraphics[trim=1cm 0.5cm 1cm 1cm,clip,width=0.8\textwidth]{model_selection.pdf} \vspace{-2pt} \caption{\textbf{Model Selection:} Correlation between criteria pairs for the SAMDP model of Breakout.} \label{fig:model_sel} \end{figure} \textbf{Model Selection.} We perform a grid search on two parameters: \textit{i}) number of clusters \textbf{$N^c \in [15,25]$}. \textit{ii}) window size \textbf{$w \in [1,7]$}. We found that models larger (smaller) than that are too cumbersome (simplistic) to analyze. We select the best model in the following way: Let $e(w,n),i(w,n),v(e,n),f(e,n)$ be the entropy, inertia, VMSE, and intensity factor respective measures of configuration $(w,n)$ in the greed search. Let $E=\{e(w,n)\}, I=\{i(w,n)\}, V=\{v(w,n)\}, F=\{f(w,n)\}$ be the corresponding sets grouped over all grid search configurations. We sort each set from good to bad, i.e. from minimum to maximum (except for intensity factor where larger values are considered better). We then iteratively intersect the p-prefix of all sets (i.e. the first p elements of each set) starting with 1-prefix. We stop when the intersection is non empty and choose the configuration at the intersection. Figure~\ref{fig:model_sel} shows the correlation between pairs of criteria (for Breakout). Overall, we see a tradeoff between spatial and temporal complexity. For example, in the bottom left plot, we observe correlation between the Inertia and the Intensity Factor; a small window size $w$ leads to well-defined clusters in space (low Inertia) at the expense of a complex transition matrix (small intensity factor). A large $w$ causes the clusters to be more spread in space (large Inertia), but has the positive effect of intensifying the in-cluster transitions (high intensity factor). We also measure the p-value of the chosen model with the null hypothesis being the SAMDP model constructed with randomly clustered states. We tested 10000 random SAMDP models, none of which scored better than the chosen model (for any of the evaluation criteria).\\ \textbf{Qualitative Evaluation.} Examining the resulting SAMDP (Figure~\ref{fig:Breakout}) it is interesting to note the sparsity of transitions. This indicate that clusters are well located in time. Inspecting the mean image of each cluster also reveal some insights about the nature of the skills hiding within. We also see evidence for the "tunnel-digging" option described in \citep{Zahavy2016} in the transitions between clusters 11,12,14 and 4. \begin{figure}[h] \begin{center} \includegraphics[width=\textwidth]{breakout_crop.png} \caption{SAMDP visualization for Breakout over the t-SNE map colored by value estimates (low values in blue and high in red).} \label{fig:Breakout} \vspace{-5pt} \end{center} \end{figure} \textbf{Model Evaluation.} We evaluate our model using three different methods. First, the VMSE criteria (Figure~\ref{fig:model_consis}, top): high correlation between the DQN values and the SAMDP values gives a clear indication to the fitness of the model to the data. Second, we evaluate the correlation between the transitions induced by the policy improvement step and the trajectory reward $R^j$. To do so, we measure $P_i^j:$ the empirical distribution of choosing the greedy policy at state $c_i$ in that trajectory. Finally we present the correlation coefficients at each state: $corr_i = corr(P_i^j,R^j)$ (Figure~\ref{fig:model_consis}, center). Positive correlation indicates that following the greedy policy leads to high reward. Indeed for most of the states we observe positive correlation, supporting the consistency of the model. The third evaluation is close in spirit to the second one. We create two transition matrices $T^+,T^-$ using k top-rewarded trajectories and k least-rewarded trajectories respectively. We measure the correlation of the greedy policy $T^G$ with each of the transition matrices for different values of k (Figure~\ref{fig:model_consis} bottom). As clearly seen, the correlation of the greedy policy and the top trajectories is higher than the correlation with the bad trajectories.\\ \begin{figure} \centering \includegraphics[trim=2cm 0cm 0cm 1cm,clip,width=0.8\textwidth]{model_consistency_normed.pdf} \vspace{6pt} \caption{\textbf{Model Evaluation.} \textbf{Top:} Value function consistency. \textbf{Center:} greedy policy correlation with trajectory reward. \textbf{Bottom:} top (blue), least (red) rewarded trajectories.} \vspace{-4pt} \label{fig:model_consis} \end{figure} \textbf{Eject Button: Performance improvement.} In the following experiment we show how the SAMDP model can help to improve the performance of a trained policy. The motivation for this experiment stems from the idea of shared autonomy \citep{icra11a}. There are domains where errors are not permitted and performance must be as high as possible. The idea of shared autonomy is to allow an operator to intervene in the decision loop in critical times. For example, it is known that in 20$\%$ of commercial flights, the auto-pilot returns the control to the human pilots. For this experiment we first build an SAMDP model and then let the agent to play new (unseen) trajectories. We project the online state visitations onto our model and monitor its transitions along it. We define $T^+,T^-$ as above. If the likelihood of $T^-$ with respect to the online trajectory is greater than the likelihood of $T^+$, we press the \textbf{Eject} button and terminate this execution (a procedure inspired by option interruption \citep{sutton1999between}). We're interested to measure the average performance of the un-terminated trajectories with respect to all trajectories. The performance improvement achieved with and without using the Eject button is presented in Table~\ref{table:eject}. \begin{table}[h] \begin{tabular}{| l | c | c | c |} \hline Game & Average Score without eject & Average Score with eject & Improvement $\%$ \\ \hline Breakout & 293 & \textbf{400} & +36 \\ \hline Seaquest & 5641 & \textbf{6780} & +20 \\ \hline Pacman & 230 & \textbf{241} & +4.7 \\ \hline \end{tabular} \caption{\textbf{Performance gain using eject button} averaged over 60 trajectories. Numbers are reported for DQN agents we train ourselves.} \label{table:eject} \end{table} \section{Discussion} \label{Discussion} In this work we considered the problem of automatically building an SAMDP model for analyzing trained policies. Starting from a t-SNE map of neural activations, and ending up with a compact model that gives a clear interpretation for complex RL tasks. We showed how SAMDP can help in identifying skills that are well defined in terms of initiation and termination sets. However, the SAMDP doesn't offer much information about the skill policy and we suggest to further investigate it in future work. It would also be interesting to see whether skills of different states actually represent the same behaviour. Most importantly, the skills we find are determined by the state aggregation. Therefore, they are impaired by the artifacts of the clustering method used. In future work we will consider other clustering methods that better relate to the topology (such as spectral-clustering), to see if they lead to better skills. In the Eject experiment we showed how SAMDP model can help to improve the policy at hand without the need to re-train it. It would be even more interesting to use the SAMDP model to improve the training phase itself. The strength of SAMDP in identifying spatio and temporal hierarchies could be used for harnessing DRL hierarchical algorithms \citep{tessler2016deep,kulkarni2016hierarchical}. For example by automatically detecting sub-goals or skills. Another question we're interested in answering is whether a global control structure exists? Motivated by the success of policy distillation ideas \citep{rusu2015policy}, it would be interesting to see how well an SAMDP built for game A, explains game B? Finally we would like to use this model to interpret other DRL agents that are not specifically trained to approximate value such as deep policy gradient methods. \newpage \footnotesize \bibliographystyle{plainnat}
{'timestamp': '2016-06-17T02:10:20', 'yymm': '1606', 'arxiv_id': '1606.05174', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05174'}
arxiv
\section{Introduction} Propositional proof complexity aims to understand and analyze the computational resources required to prove propositional tautologies, in the same way that circuit complexity studies the resources required to compute boolean functions. A typical goal would be to establish, for a given proof system, super-polynomial lower bounds on the \emph{size} of any proof of some propositional tautology. The seminal work of Cook and Reckhow~\cite{CookReckhow79} showed that this goal relates quite directly to fundamental hardness questions in computational complexity such as the \NP\ vs.~\coNP\ question: establishing super-polynomial lower bounds for \emph{every} propositional proof system would separate \NP\ from \coNP\ (and thus also \P\ from \NP). We refer the reader to Kraj\'{i}\v{c}ek\xspace~\cite{Krajicek95} for more on this subject. Propositional proof systems come in a large variety, as different ones capture different forms of reasoning, either reasoning used to actually prove theorems, or reasoning used by algorithmic techniques for different types of search problems (as failure of the algorithm to find the desired object constitutes a proof of its nonexistence). Much of the research in proof complexity deals with propositional proof systems originating from logic or geometry. Logical proof systems include such systems as \emph{resolution} (whose variants are related to popular algorithms for automated theory proving and SAT solving), as well as the \emph{Frege} proof system (capturing the most common logic text-book systems) and its many subsystems. Geometric proof systems include \emph{cutting-plane proofs}, capturing reasoning used in algorithms for integer programming, as well as proof systems arising from systematic strategies for rounding linear- or semidefinite-programming such as the \emph{lift-and-project} or \emph{sum-of-squares} hierarchies. In this paper we focus on algebraic proof systems, in which propositional tautologies (or rather contradictions) are expressed as unsatisfiable systems of polynomial equations and algebraic tools are used to refute them. This study originates with the work of Beame, Impagliazzo, Kraj\'{i}\v{c}ek\xspace, Pitassi and Pudl{\'{a}}k\xspace~\cite{BeameIKPP96}, who introduced the Nullstellensatz refutation system (based on Hilbert's Nullstellensatz), followed by the Polynomial Calculus system of Clegg, Edmonds, and Impagliazzo~\cite{CleggEI96}, which is a ``dynamic'' version of Nullstellensatz. In both systems the main measures of proof size that have been studied are the \emph{degree} and \emph{sparsity} of the polynomials appearing in the proof. Substantial work has lead to a very good understanding of the power of these systems with respect to these measures (see for example \cite{BussIKPRS96,Razborov98,Grigoriev98,IPS99,BussGIP01,AlekhnovichRazborov01} and references therein). However, the above measures of degree and sparsity are rather rough measures of a complexity of a proof. As such, Grochow and Pitassi~\cite{GrochowPitassi14} have recently advocated measuring the complexity of such proofs by their algebraic circuit size and shown that the resulting proof system can polynomially simulate strong proof systems such as the Frege system. This naturally leads to the question of establishing lower bounds for this stronger proof system, even for restricted classes of algebraic circuits. In this work we establish such lower bounds for previously studied restricted classes of algebraic circuits, and show that these lower bounds are interesting by providing non-trivial \emph{upper} bounds in these proof systems for refutations of interesting sets of polynomial equations. This provides what are apparently the first examples of lower bounds on the algebraic circuit size of propositional proofs in the Ideal Proof System (IPS) framework of Grochow and Pitassi~\cite{GrochowPitassi14}. We note that obtaining proof complexity lower bounds from circuit complexity lower bounds is an established tradition that takes many forms. Most prominent are the lower bounds for subsystems of the Frege proof system defined by low-depth boolean circuits, and lower bounds of Pudl{\'{a}}k\xspace~\cite{Pudlak97} on Resolution and Cutting Planes system using the so-called feasible interpolation method. We refer the reader again to Kraj\'{i}\v{c}ek\xspace~\cite{Krajicek95} for more details. Our approach here for algebraic systems shares features with both of these approaches. The rest of this introduction is arranged as follows. In \autoref{sec:Nullstellensatz} we give the necessary background in algebraic proof complexity, and explain the IPS system. In \autoref{sec:intro:circuits} we define the algebraic complexity classes that will underlie the subsystems of IPS we will study. In \autoref{sec:results} we state our results and explain our techniques, for both the algebraic and proof complexity worlds. \subsection{Algebraic Proof Systems}\label{sec:Nullstellensatz} We now describe the algebraic proof systems that are the subject of this paper. If one has a set of polynomials (called \emph{axioms}) $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_n]$ over some field $\mathbb{F}$, then (the weak version of) Hilbert's Nullstellensatz shows that the system $f_1(\vx)=\cdots=f_m(\vx)=0$ is unsatisfiable (over the algebraic closure of $\mathbb{F}$) if and only if there are polynomials $g_1,\ldots,g_m\in\mathbb{F}[\vx]$ such that $\sum_j g_j(\vx)f_j(\vx)=1$ (as a formal identity), or equivalently, that 1 is in the ideal generated by the $\{f_j\}_j$. Beame, Impagliazzo, Kraj\'{i}\v{c}ek\xspace, Pitassi, and Pudl{\'{a}}k\xspace~\cite{BeameIKPP96} suggested to treat these $\{g_j\}_j$ as a \emph{proof} of the unsatisfiability of this system of equations, called a \emph{Nullstellensatz refutation}. This is in particular relevant for complexity theory as one can restrict attention to \emph{boolean} solutions to this system by adding the \emph{boolean axioms}, that is, adding the polynomials $\{x_i^2-x_i\}_{i=1}^n$ to the system. As such, one can then naturally encode $\NP$-complete problems such as the satisfiability of 3CNF formulas as the satisfiability of a system of constant-degree polynomials, and a Nullstellensatz refutation is then an equation of the form $\sum_{j=1}^m g_j(\vx)f_j(\vx)+\sum_{i=1}^n h_i(\vx)(x_i^2-x_i)=1$ for $g_j,h_i\in\mathbb{F}[\vx]$. This proof system is sound (only refuting unsatisfiable systems over $\ensuremath{\{0,1\}}^n$) and complete (refuting any unsatisfiable system, by Hilbert's Nullstellensatz). Given that the above proof system is sound and complete, it is then natural to ask what is its power to refute unsatisfiable systems of polynomial equations over $\ensuremath{\{0,1\}}^n$. To understand this question one must define the notion of the \emph{size} of the above refutations. Two popular notions are that of the \emph{degree}, and the \emph{sparsity} (number of monomials). One can then show (see for example Pitassi~\cite{Pitassi97}) that for any unsatisfiable system which includes the boolean axioms, there exist a refutation where the $g_j$ are multilinear and where the $h_i$ have degree at most $O(n+d)$, where each $f_j$ has degree at most $d$. In particular, this implies that for any unsatisfiable system with $d=O(n)$ there is a refutation of degree $O(n)$ and involving at most $\exp(O(n))$ monomials. This intuitively agrees with the fact that $\coNP$ is a subset of non-deterministic exponential time. Building on the suggestion of Pitassi~\cite{Pitassi97} and various investigations into the power of strong algebraic proof systems (\cite{GrigorievHirsch03,RazTzameret08a,RazTzameret08b}), Grochow and Pitassi~\cite{GrochowPitassi14} have recently considered more \emph{succinct} descriptions of polynomials where one measures the size of a polynomial by the size of an algebraic circuit needed to compute it. This is potentially much more powerful as there are polynomials such as the determinant which are of high degree and involve exponentially many monomials and yet can be computed by small algebraic circuits. They named the resulting system the \emph{Ideal Proof System (IPS)} which we now define. \begin{definition}[Ideal Proof System (IPS), Grochow-Pitassi~\cite{GrochowPitassi14}]\label{def:orig-IPS} Let $f_1(\vx),\ldots,f_m(\vx)\in\mathbb{F}[x_1,\ldots,x_n]$ be a system of polynomials. An \demph{IPS refutation} for showing that the polynomials $\{f_j\}_j$ have no common solution in $\ensuremath{\{0,1\}}^n$ is an algebraic circuit $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})\in\mathbb{F}[\vx,y_1,\ldots,y_m,z_1,\ldots,z_n]$, such that \begin{enumerate} \item $C(\vx,{\vec{0}},{\vec{0}}) = 0$. \item $C(\vx,f_1(\vx),\ldots,f_m(\vx),x_1^2-x_1,\ldots,x_n^2-x_n)=1$. \end{enumerate} The \demph{size} of the IPS refutation is the size of the circuit $C$. If $C$ is of individual degree $\le 1$ in each $y_j$ and $z_i$, then this is a \demph{linear} IPS refutation (called \emph{Hilbert} IPS by Grochow-Pitassi~\cite{GrochowPitassi14}), which we will abbreviate as \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace. If $C$ is of individual degree $\le 1$ only in the $y_j$ then we say this is a \texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation. If $C$ comes from a restricted class of algebraic circuits $\mathcal{C}$, then this is a called a $\mathcal{C}$-IPS refutation, and further called a $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation if $C$ is linear in ${\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}$, and a $\mathcal{C}$-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation if $C$ is linear in ${\vec{y}}\@ifnextchar{^}{\!\:}{}$. \end{definition} Notice also that our definition here by default adds the equations $\{x_i^2-x_i\}_i$ to the system $\{f_j\}_j$. For convenience we will often denote the equations $\{x_i^2-x_i\}_i$ as $\vx^2-\vx$. One need not add the equations $\vx^2-\vx$ to the system in general, but this is the most interesting regime for proof complexity and thus we adopt it as part of our definition. The $\mathcal{C}$-IPS system is sound for any $\mathcal{C}$, and Hilbert's Nullstellensatz shows that $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace is complete for any complete class of algebraic circuits $\mathcal{C}$ (that is, classes which can compute any polynomial, possibly requiring exponential complexity). We note that we will also consider non-complete classes such as multilinear-formulas (which can only compute \emph{multilinear} polynomials, but are complete for multilinear polynomials), where we will show that the multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace system is not complete for the language of all unsatisfiable sets of multilinear polynomials (\autoref{ex:multi-form:incomplete}), while the stronger multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} version is complete (\autoref{res:multilin:simulate-sparse}). However, for the standard conversion of unsatisfiable CNFs into polynomial systems of equations, the multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace system is complete (\autoref{thm:GrochowPitassi14}). Grochow-Pitassi~\cite{GrochowPitassi14} proved the following theorem, showing that the IPS system has surprising power and that lower bounds on this system give rise to \emph{computational} lower bounds. \begin{theoremwp}[Grochow-Pitassi~\cite{GrochowPitassi14}]\label{thm:GrochowPitassi14} Let $\varphi=C_1\wedge\cdots\wedge C_m$ be an unsatisfiable CNF on $n$-variables, and let $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_m]$ be its encoding as a polynomial system of equations. If there is a size-$s$ Frege proof (resp.\ Extended Frege) that $\{f_j\}_j,\{x_i^2-x_i\}_i$ is unsatisfiable, then there is a formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (resp.\ circuit-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace) refutation of size $\poly(n,m,s)$ that is checkable in randomized $\poly(n,m,s)$ time.\footnote{We note that Grochow and Pitassi~\cite{GrochowPitassi14} proved this for Extended Frege and circuits, but essentially the same proof relates Frege and formula size.} Further, $\{f_j\}_j,\{x_i^2-x_i\}_i$ has a \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation, where the refutation uses multilinear polynomials in $\VNP$. Thus, if every IPS refutation of $\{f_j\}_j,\{x_i^2-x_i\}_i$ requires formula (resp.\ circuit) size $\ge s$, then there is an explicit polynomial (that is, in $\VNP$) that requires size $\ge s$ algebraic formulas (resp.\ circuits). \end{theoremwp} \begin{remark}\label{rmk:EF-degree} One point to note is that the transformation from Extended Frege to IPS refutations yields circuits of polynomial size but without any guarantee on their degree. In particular, such circuits can compute polynomials of exponential degree. In contrast, the conversion from Frege to IPS refutations yields polynomial sized algebraic formulas and those compute polynomials of polynomially bounded degree. This range of parameters, polynomials of polynomially bounded degree, is the more common setting studied in algebraic complexity. \end{remark} The fact that $\mathcal{C}$-IPS refutations are efficiently checkable (with randomness) follows from the fact that we need to verify the polynomial identities stipulated by the definition. That is, one needs to solve an instance of the \emph{polynomial identity testing (PIT)} problem for the class $\mathcal{C}$: given a circuit from the class $\mathcal{C}$ decide whether it computes the identically zero polynomial. This problem is solvable in probabilistic polynomial time ($\BPP$) for general algebraic circuits, and there are various restricted classes for which deterministic algorithms are known (see \autoref{sec:PIT}). Motivated by the fact that PIT of non-commutative formulas\,\footnote{These are formulas over a set of non-commuting variables.} can be solved deterministically (\cite{RazShpilka05}) and admit exponential-size lower bounds (\cite{Nisan91}), Li, Tzameret and Wang~\cite{LiTW15} have shown that IPS over \emph{non-commutative} polynomials (along with additional \emph{commutator} axioms) can simulate Frege (they also provided a quasipolynomial simulation of IPS over non-commutative formulas by Frege; see Li, Tzameret and Wang~\cite{LiTW15} for more details). \begin{theoremwp}[Li, Tzameret and Wang~\cite{LiTW15}]\label{thm:LTW} Let $\varphi=C_1\wedge\cdots\wedge C_m$ be an unsatisfiable CNF on $n$-variables, and let $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_m]$ be its encoding as a polynomial system of equations. If there is a size-$s$ Frege proof that $\{f_j\}_j,\{x_i^2-x_i\}_i$ is unsatisfiable, then there is a non-commutative-IPS refutation of formula-size $\poly(n,m,s)$, where the commutator axioms $x_ix_j-x_jx_i$ are also included in the polynomial system being refuted. Further, this refutation is checkable in deterministic $\poly(n,m,s)$ time. \end{theoremwp} The above results naturally motivate studying $\mathcal{C}$-IPS for various restricted classes of algebraic circuits, as lower bounds for such proofs then intuitively correspond to restricted lower bounds for the Extended Frege proof system. In particular, as exponential lower bounds are known for non-commutative formulas (\cite{Nisan91}), this possibly suggests that such methods could even attack the full Frege system itself. \subsection{Algebraic Circuit Classes}\label{sec:intro:circuits} Having motivated $\mathcal{C}$-IPS for restricted circuit classes $\mathcal{C}$, we now give formal definitions of the algebraic circuit classes of interest to this paper, all of which were studied independently in algebraic complexity. Some of them capture the state-of-art in our ability to prove lower bounds and provide efficient deterministic identity tests, so it is natural to attempt to fit them into the proof complexity framework. We define each and briefly explain what we know about it. As the list is long, the reader may consider skipping to the results (\autoref{sec:results}), and refer to the definitions of these classes as they arise. Algebraic circuits and formula (over a fixed chosen field) compute polynomials via addition and multiplication gates, starting from the input variables and constants from the field. For background on algebraic circuits in general and their complexity measures we refer the reader to the survey of Shpilka and Yehudayoff~\cite{SY10}. We next define the restricted circuit classes that we will be studying in this paper. \subsubsection{Low Depth Classes} We start by defining what are the simplest and most restricted classes of algebraic circuits. The first class simply represents polynomials as a sum of monomials. This is also called the \emph{sparse representation} of the polynomial. Notationally we call this model $\ensuremath{\sum\prod}\xspace$ formulas (to capture the fact that polynomials computed in the class are represented simply as sums of products), but we will more often call these polynomials ``sparse''. \begin{definition}\label{def:sparse} The class $\mathcal{C}=\ensuremath{\sum\prod}\xspace$ compute polynomials in their \demph{sparse} representation, that is, as a sum of monomials. The graph of computation has two layers with an addition gate at the top and multiplication gates at the bottom. The \demph{size} of a $\ensuremath{\sum\prod}\xspace$ circuit of a polynomial $f$ is the multiplication of the number of monomials in $f$, the number of variables, and the degree. \end{definition} This class of circuits is what is used in the Nullstellensatz proof system. In our terminology $\ensuremath{\sum\prod}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace is exactly the Nullstellensatz proof system. Another restricted class of algebraic circuits is that of \emph{depth-$3$ powering formulas} (sometimes also called ``diagonal depth-$3$ circuits''). We will sometimes abbreviate this name as a ``$\ensuremath{\sum\pow\sum}\xspace$ formula'', where $\bigwedge$ denotes the powering operation. Specifically, polynomials that are efficiently computed by small formulas from this class can be represented as sum of powers of linear functions. This model appears implicitly in Shpilka~\cite{Shpilka02} and explicitly in the work of Saxena \cite{Saxena08}. \begin{definition}\label{def:diagonal} The class of depth-$3$ powering formulas, denoted $\ensuremath{\sum\pow\sum}\xspace$, computes polynomials of the following form $$f(\vx)=\sum_{i=1}^{s} \ell_i(\vx)^{d_i},$$ where $\ell_i(\vx)$ are linear functions. The degree of this $\ensuremath{\sum\pow\sum}\xspace$ representation of $f$ is $\max_i\{d_i\}$ and its size is $n\cdot \sum_{i=1}^{s}(d_i+1)$. \end{definition} One reason for considering this class of circuits is that it is a simple, but non-trivial model that is somewhat well-understood. In particular, the partial derivative method of Nisan-Wigderson~\cite{NisanWigderson96} implies lower bounds for this model and efficient polynomial identity testing algorithms are known (\cite{Saxena08,AgrawalSS13,ForbesShpilka13a,ForbesShpilka13b,ForbesSS14}, as discussed further in \autoref{sec:PIT}). We also consider a generalization of this model where we allow powering of low-degree polynomials. \begin{definition}\label{def:sumpowlowdeg} The class $\sumpow{t}$ computes polynomials of the following form \[ f(\vx)=\sum_{i=1}^{s} f_i(\vx)^{d_i} \;, \] where the degree of the $f_i(\vx)$ is at most $t$. The size of this representation is $\binom{n+t}{t} \cdot \sum_{i=1}^{s}(d_i+1)$. \end{definition} We remark that the reason for defining the size this way is that we think of the $f_i$ as represented as sum of monomials (there are $\binom{n+t}{t}$ $n$-variate monomials of degree at most $t$) and the size captures the complexity of writing this as an algebraic formula. This model is the simplest that requires the method of \emph{shifted partial derivatives} of Kayal~\cite{Kayal12,GuptaKKS14} to establish lower bounds, and this has recently been generalized to obtain polynomial identity testing algorithms (\cite{Forbes15}, as discussed further in \autoref{sec:PIT}). \subsubsection{Oblivious Algebraic Branching Programs} Algebraic branching programs (ABPs) form a model whose computational power lies between that of algebraic circuits and algebraic formulas, and certain \emph{read-once} and \emph{oblivious} ABPs are a natural setting for studying the \emph{partial derivative matrix} lower bound technique of Nisan~\cite{Nisan91}. \begin{definition}[Nisan~\cite{Nisan91}]\label{def:roABP} An \demph{algebraic branching program (ABP) with unrestricted weights} of \demph{depth} $D$ and \demph{width} $\le r$, on the variables $x_1,\ldots,x_n$, is a directed acyclic graph such that: \begin{itemize} \item The vertices are partitioned in $D+1$ layers $V_0,\ldots,V_D$, so that $V_0=\{s\}$ ($s$ is the source node), and $V_D=\{t\}$ ($t$ is the sink node). Further, each edge goes from $V_{i-1}$ to $V_{i}$ for some $0< i\le D$. \item $\max|V_i|\le r$. \item Each edge $e$ is weighted with a polynomial $f_e\in\mathbb{F}[\vx]$. \end{itemize} The \demph{(individual) degree} $d$ of the ABP is the maximum (individual) degree of the edge polynomials $f_e$. The \demph{size} of the ABP is the product $n\cdot r\cdot d\cdot D$, Each $s$-$t$ path is said to compute the polynomial which is the product of the labels of its edges, and the algebraic branching program itself computes the sum over all $s$-$t$ paths of such polynomials. There are also the following restricted ABP variants. \begin{itemize} \item An algebraic branching program is said to be \demph{oblivious} if for every layer $\ell$, all the edge labels in that layer are univariate polynomials in a single variable $x_{i_\ell}$. \item An oblivious branching program is said to be a \demph{read-once} oblivious ABP (roABP) if each $x_i$ appears in the edge label of exactly one layer, so that $D=n$. That is, each $x_i$ appears in the edge labels in at exactly one layer. The layers thus define a \demph{variable order}, which will be $x_1<\cdots<x_n$ if not otherwise specified. \item An oblivious branching program is said to be a \demph{read-$k$} oblivious ABP if each variable $x_i$ appears in the edge labels of exactly $k$ layers, so that $D=kn$. \item An ABP is \textbf{non-commutative} if each $f_e$ is from the ring $\mathbb{F}\nc{\vx}$ of non-commuting variables and has $\deg f_e\le 1$, so that the ABP computes a non-commutative polynomial. \qedhere \end{itemize} \end{definition} Intuitively, roABPs are the algebraic analog of read-once boolean branching programs, the non-uniform model of the class $\RL$, which are well-studied in boolean complexity. Algebraically, roABPs are also well-studied. In particular, roABPs are essentially equivalent to non-commutative ABPs (\cite{ForbesShpilka13b}), a model at least as strong as non-commutative formulas. That is, as an roABP reads the variables in a fixed order (hence not using commutativity) it can be almost directly interpreted as a non-commutative ABP\@. Conversely, as non-commutative multiplication is ordered, one can interpret a non-commutative polynomial in a read-once fashion by (commutatively) exponentiating a variable to its index in a monomial. For example, the non-commutative $xy-yx$ can be interpreted commutatively as $x^1y^2-y^1x^2=xy^2-x^2y$, and one can show that this conversion preserves the relevant ABP complexity (\cite{ForbesShpilka13b}). The study of non-commutative ABPs dates to Nisan~\cite{Nisan91}, who proved lower bounds for non-commutative ABPs (and thus also for roABPs, in any order). In a sequence of more recent papers, polynomial identity testing algorithms were devised for roABPs (\cite{RazShpilka05,ForbesShpilka12,ForbesShpilka13b,ForbesSS14,AgrawalGKS15}, see also \autoref{sec:PIT}). In terms of proof complexity, Tzameret~\cite{Tzameret11} studied a proof system with lines given by roABPs, and recently Li, Tzameret and Wang~\cite{LiTW15} (\autoref{thm:LTW}) showed that IPS over non-commutative formulas is essentially equivalent in power to the Frege proof system. Due to the close connections between non-commutative ABPs and roABPs, this last result suggests the importance of proving lower bounds for roABP-IPS as a way of attacking lower bounds for the Frege proof system (although our work obtains roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace lower bounds without obtaining non-commutative-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace lower bounds). Finally, we mention that recently Anderson, Forbes, Saptharishi, Shpilka, and Volk~\cite{AndersonFSSV16} obtained exponential lower bounds for read-$k$ oblivious ABPs (when $k=o(\log n/\log\log n)$) as well as a slightly subexponential polynomial identity testing algorithm. \subsubsection{Multilinear Formulas} The last model that we consider is that of multilinear formulas. \begin{definition}[Multilinear formula]\label{def-ml-fmla} An algebraic formula is a \demph{multilinear formula} if the polynomial computed by \emph{each} gate of the formula is multilinear (as a formal polynomial, that is, as an element of $\,\mathbb{F}[x_1,\ldots,x_n]$). The \demph{product depth} is the maximum number of multiplication gates on any input-to-output path in the formula. \end{definition} Raz~\cite{Raz09,Raz06} proved quasi-polynomial lower bounds for multilinear formulas and separated multilinear formulas from multilinear circuits. Raz and Yehudayoff proved exponential lower bounds for small depth multilinear formulas \cite{RazYehudayoff09}. Only slightly sub-exponential polynomial identity testing algorithms are known for small-depth multilinear formulas (\cite{OliveiraSV15}). \subsection{Our Results and Techniques}\label{sec:results} We now briefly summarize our results and techniques, stating some results in less than full generality to more clearly convey the result. We present the results in the order that we later prove them. We start by giving upper bounds for the IPS (\autoref{sec:results:upper}). We then describe our functional lower bounds and the \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace lower bounds they imply (\autoref{sec:results:funct}). Finally, we discuss lower bounds for multiples and state our lower bounds for IPS (\autoref{sec:intro:lbs-mult}). \subsubsection{Upper Bounds for Proofs within Subclasses of IPS}\label{sec:results:upper} Various previous works have studied restricted algebraic proof systems and shown non-trivial upper bounds. The general simulation (\autoref{thm:GrochowPitassi14}) of Grochow and Pitassi~\cite{GrochowPitassi14} showed that the formula-IPS and circuit-IPS systems can simulate powerful proof systems such as Frege and Extended Frege, respectively. The work of Li, Tzameret and Wang~\cite{LiTW15} (\autoref{thm:LTW}) show that even non-commutative-formula-IPS can simulate Frege. The work of Grigoriev and Hirsch~\cite{GrigorievHirsch03} showed that proofs manipulating depth-3 algebraic formulas can refute hard axioms such as the \emph{pigeonhole principle}, the \emph{subset-sum axiom}, and \emph{Tseitin tautologies}. The work of Raz and Tzameret~\cite{RazTzameret08a,RazTzameret08b} somewhat strengthened their results by restricting the proof to depth-3 \emph{multilinear} proofs (in a \emph{dynamic} system, see \autoref{sec:alg-proofs}). However, these upper bounds are for proof systems (IPS or otherwise) for which no proof lower bounds are known. As such, in this work we also study upper bounds for restricted subsystems of IPS. In particular, we compare linear-IPS versus the full IPS system, as well as showing that even for restricted $\mathcal{C}$, $\mathcal{C}$-IPS can refute interesting unsatisfiable systems of equations arising from $\NP$-complete problems (and we will obtain corresponding proof lower bounds for these $\mathcal{C}$-IPS systems). Our first upper bound is to show that linear-IPS can simulate the full IPS proof system when the axioms are computationally simple, which essentially resolves a question of Grochow and Pitassi~\cite[Open Question 1.13]{GrochowPitassi14}. \begin{theoremwp*}[\autoref{res:h-ips_v_ips}] For $|\mathbb{F}|\ge\poly(d)$, if $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_n]$ are degree-$d$ polynomials computable by size-$s$ algebraic formulas (resp.\ circuits) and they have a size-$t$ formula-IPS (resp.\ circuit-IPS) refutation, then they also have a size-$\poly(d,s,t)$ formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (resp.\ circuit-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace) refutation. \end{theoremwp*} This theorem is established by pushing the ``non-linear'' dependencies on the axioms into the IPS refutation itself, which is possible as the axioms are assumed to themselves be computable by small circuits. We note that Grochow and Pitassi~\cite{GrochowPitassi14} showed such a conversion, but only for IPS refutations computable by sparse polynomials. Also, we remark that this result holds even for circuits of unbounded degree, as opposed to just those of polynomial degree. We then turn our attention to IPS involving only restricted classes of algebraic circuits, and show that they are complete proof systems. This is clear for complete models of algebraic circuits such as sparse polynomials, depth-3 powering formulas\,\footnote{Showing that depth-3 powering formulas are complete (in large characteristic) can be seen from the fact that any multilinear monomial can be computed in this model, see for example Fischer~\cite{Fischer94}.} and roABPs. The models of sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace and roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace can efficiently simulate the Nullstellensatz proof system measured in terms of number of monomials, as the former is equivalent to this system, and the latter follows as sparse polynomials have small roABPs. Note that depth-3 powering formulas cannot efficiently compute sparse polynomials in general (\autoref{res:lbs-mult:sumpowsum}) so cannot efficiently simulate the Nullstellensatz system. For multilinear formulas, showing completeness (much less an efficient simulation of sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace) is more subtle as not every polynomial is multilinear, however the result can be obtained by a careful multilinearization. \begin{theoremwp*}[\autoref{ex:multi-form:incomplete}, \autoref{res:multilin:simulate-sparse}] The proof systems of sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace, $\ensuremath{\sum\pow\sum}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (in large characteristic fields), and roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace are complete proof systems (for systems of polynomials with no boolean solutions). The multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace proof system is not complete, but the depth-2 multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} proof system is complete (for multilinear axioms) and can polynomially simulate sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (for low-degree axioms). \end{theoremwp*} However, we recall that multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace \emph{is} complete when refuting unsatisfiable CNF formulas (\autoref{thm:GrochowPitassi14}). We next consider the equation $\sum_{i=1}^n \alpha_i x_i-\beta$ along with the boolean axioms $\{x_i^2-x_i\}_i$. Deciding whether this system of equations is satisfiable is the $\NP$-complete \emph{subset-sum} problem, and as such we do not expect small refutations in general (unless $\NP=\coNP$). Indeed, Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99} (\autoref{thm:IPS99}) have shown lower bounds for refutations in the \emph{polynomial calculus} system (and thus also the Nullstellensatz system) even when ${\vec{\alpha}}={\vec{1}}$. Specifically, they showed that such refutations require both $\Omega(n)$-degree and $\exp(\Omega(n))$-many monomials, matching the worst-case upper bounds for these complexity measures. In the language of this paper, they gave $\exp(\Omega(n))$-size lower bounds for refuting this system in $\sum\prod$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (which is equivalent to the Nullstellensatz proof system). In contrast, we establish here $\poly(n)$-size refutations for ${\vec{\alpha}}={\vec{1}}$ in the restricted proof systems of roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace and \emph{depth-3} multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (despite the fact that multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace is not complete). \begin{theoremwp*}[\autoref{res:ips-ubs:subset:roABP}, \autoref{res:ips-ubs:subset:mult-form}] Let $\mathbb{F}$ be a field of characteristic $\chara(\mathbb{F})>n$. Then the system of polynomial equations $\sum_{i=1}^n x_i-\beta$, $\{x_i^2-x_i\}_{i=1}^n$ is unsatisfiable for $\beta\in\mathbb{F}\setminus\{0,\ldots,n\}$, and there are explicit $\poly(n)$-size refutations within roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace, as well as within depth-3 multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace. \end{theoremwp*} This theorem is proven by noting that the polynomial $p(t):=\prod_{k=0}^n (t-k)$ vanishes on $\sum_i x_i$ modulo $\{x_i^2-x_i\}_{i=1}^n$, but $p(\beta)$ is a nonzero constant. This implies that $\sum_i x_i-\beta$ divides $p(\sum_i x_i)-p(\beta)$. Denoting the quotient by $f(\vx)$, it follows that $\frac{1}{-p(\beta)}\cdot f(\vx)\cdot (\sum_i x_i-\beta)\equiv 1\mod \{x_i^2-x_i\}_{i=1}^n$, which is nearly a linear-IPS refutation except for the complexity of establishing this relation over the boolean cube. We show that the quotient $f$ is easily expressed as a depth-3 powering circuit. Unfortunately, proving the above equivalence to 1 modulo the boolean cube is not possible in the depth-3 powering circuit model. However, by moving to more powerful models (such as roABPs and multilinear formulas) we can give proofs of this multilinearization to 1 and thus give proper IPS refutations. \subsubsection{Linear-IPS Lower Bounds via Functional Lower Bounds}\label{sec:results:funct} Having demonstrated the power of various restricted classes of IPS refutations by refuting the subset-sum axiom, we now turn to lower bounds. We give two paradigms for establishing lower bounds, the first of which we discus here, named a \emph{functional circuit lower bound}. This idea appeared in the work of Grigoriev and Razborov~\cite{GrigorievRazborov00} as well as in the recent work of Forbes, Kumar and Saptharishi~\cite{ForbesKS16}. We briefly motivate this type of lower bound as a topic of independent interest in algebraic circuit complexity, and then discuss the lower bounds we obtain and their implications to obtaining proof complexity lower bounds. In boolean complexity, the primary object of interest are \emph{functions}. Generalizing slightly, one can even seek to compute functions $f:\ensuremath{\{0,1\}}^n\to\mathbb{F}$ for some field $\mathbb{F}$. In contrast, in algebraic complexity one seeks to compute \emph{polynomials} as elements of the ring $\mathbb{F}[x_1,\ldots,x_n]$. These two regimes are tied by the fact that every polynomial $f\in\mathbb{F}[\vx]$ induces a function $\hat{f}:\ensuremath{\{0,1\}}^n\to \mathbb{F}$ via the evaluation $\hat{f}:\vx\mapsto f(\vx)$. That is, the polynomial $f$ \emph{functionally computes} the function $\hat{f}$. As an example, $x^2-x$ functionally computes the zero function despite being a nonzero polynomial. Traditional algebraic circuit lower bounds for the $n\times n$ permanent are lower bounds for computing $\perm_n$ as an element in the ring $\mathbb{F}[\{x_{i,j}\}_{1\le i,j\le n}]$. This is a strong notion of ``computing the permanent'', while one can consider the weaker notion of functionally computing the permanent, that is, a polynomial $f\in\mathbb{F}[\{x_{i,j}\}]$ such that $f=\perm_n$ over $\ensuremath{\{0,1\}}^{n\times n}$, where $f$ is not required to equal $\perm_n$ as a polynomial. As $\perm_n:\ensuremath{\{0,1\}}^{n\times n}\to\mathbb{F}$ is $\#\P$-hard (for fields of large characteristic), assuming plausible conjectures (such as the polynomial hierarchy being infinite) it follows that \emph{any} polynomial $f$ which functionally computes $\perm_n$ must require large algebraic circuits. Unconditionally obtaining such a result is what we term a \emph{functional lower bound}. \begin{goal}[Functional Circuit Lower Bound (\cite{GrigorievRazborov00,ForbesKS16})] Obtain an explicit function $\hat{f}:\ensuremath{\{0,1\}}^n\to\mathbb{F}$ such that for any polynomial $f\in\mathbb{F}[x_1,\ldots,x_n]$ satisfying $f(\vx)=\hat{f}(\vx)$ for all $\vx\in\ensuremath{\{0,1\}}^n$, it must be that $f$ requires large algebraic circuits. \end{goal} Obtaining such a result is challenging, in part because one must lower bound \emph{all} polynomials agreeing with the function $\hat{f}$ (of which there are infinitely many). Prior work (\cite{GrigorievKarpinski98,GrigorievRazborov00,KumarSaptharishi15}) has established functional lower bounds for functions when computing with polynomials over constant-sized finite fields, and the recent work of Forbes, Kumar and Saptharishi~\cite{ForbesKS16} has established some lower bounds for any field. While it is natural to hope that existing methods would yield such lower bounds, many lower bound techniques inherently use that algebraic computation is \emph{syntactic}. In particular, techniques involving partial derivatives (which include the partial derivative method of Nisan-Wigderson~\cite{NisanWigderson96} and the shifted partial derivative method of Kayal~\cite{Kayal12,GuptaKKS14}) cannot as is yield functional lower bounds as knowing a polynomial on $\ensuremath{\{0,1\}}^n$ is not enough to conclude information about its partial derivatives. We now explain how functional lower bounds imply lower bounds for linear-IPS refutations in certain cases. Suppose one considers refutations of the unsatisfiable polynomial system $f(\vx),\{x_i^2-x_i\}_{i=1}^n$. A linear-IPS refutation would yield an equation of the form $g(\vx)\cdot f(\vx)+\sum_i h_i(\vx)\cdot (x_i^2-x_i)=1$ for some polynomials $g,h_i\in\mathbb{F}[\vx]$. Viewing this equation modulo the boolean cube, we have that $g(\vx)\cdot f(\vx)\equiv 1\mod \{x_i^2-x_i\}_i$. Equivalently, since $f(\vx)$ is unsatisfiable over $\ensuremath{\{0,1\}}^n$, we see that $g(\vx)=\nicefrac{1}{f(\vx)}$ for $\vx\in\ensuremath{\{0,1\}}^n$, as $f(\vx)$ is never zero so this fraction is well-defined. It follows that \emph{if} the function $\vx\mapsto \nicefrac{1}{f(\vx)}$ induces a functional lower bound then $g(\vx)$ must require large complexity, yielding the desired linear-IPS lower bound. Thus, it remains to instantiate this program. While we are successful, we should note that this approach as is seems to only yield proof complexity lower bounds for systems with one non-boolean axiom and thus cannot encode polynomial systems where each equation depends on $O(1)$ variables (such as those naturally arising from 3CNFs). Our starting point is to observe that the subset-sum axiom already induces a weak form of functional lower bound, where the complexity is measured by degree. \begin{theoremwp*}[\autoref{res:subsetsum:deg:ge}] Let $\mathbb{F}$ be a field of a characteristic at least $\poly(n)$ and $\beta\notin\{0,\ldots,n\}$. Then $\sum_i x_i-\beta,\{x_i^2-x_i\}_i$ is unsatisfiable and any polynomial $f\in\mathbb{F}[x_1,\ldots,x_n]$ with $f(\vx)=\frac{1}{\sum_i x_i-\beta}$ for $\vx\in\ensuremath{\{0,1\}}^n$, satisfies $\deg f\ge n$. \end{theoremwp*} A lower bound of $\ceil{\frac{n}{2}}+1$ was previously established by Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99} (\autoref{thm:IPS99}), but the bound of `$n$' (which is tight) will be crucial for our results. We then lift this result to obtain lower bounds for stronger models of algebraic complexity. In particular, by replacing ``$x_i$'' with ``$x_iy_i$'' we show that the function $\frac{1}{\sum_i x_iy_i-\beta}$ has maximal \emph{evaluation dimension} between $\vx$ and ${\vec{y}}\@ifnextchar{^}{\!\:}{}$, which is some measure of interaction between the variables in $\vx$ and those in ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ (see \autoref{sec:eval-dim}). This measure is essentially \emph{functional}, so that one can lower bound this measure by understanding the functional behavior of the polynomial on finite sets such as the boolean cube. Our lower bound for evaluation dimension follows by examining the above degree bound. Using known relations between this complexity measure and algebraic circuit classes, we can obtain lower bounds for depth-3 powering linear-IPS. \begin{theoremwp*}[\autoref{res:lbs-fn:lbs-ips:fixed-order}] Let $\mathbb{F}$ be a field of characteristic $\ge\poly(n)$ and $\beta\notin\{0,\ldots,n\}$. Then $\sum_{i=1}^n x_iy_i-\beta,\{x_i^2-x_i\}_i,\{y_i^2-y_i\}_i$ is unsatisfiable and any $\ensuremath{\sum\pow\sum}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation requires size $\ge\exp(\Omega(n))$. \end{theoremwp*} The above axiom only gets maximal interaction between the variables across a \emph{fixed} partition of the variables. By introducing auxiliary variables we can create such interactions in variables across \emph{any} partition of (some) of the variables. By again invoking results showing such structure implies computational hardness we obtain more linear-IPS lower bounds. \begin{theoremwp*}[\autoref{res:lbs-fn:lbs-ips:vary-order}] Let $\mathbb{F}$ be a field of characteristic $\ge\poly(n)$ and $\beta\notin\{0,\ldots,\binom{2n}{2}\}$. Then $\sum_{i<j} z_{i,j}x_ix_j-\beta,\{x_i^2-x_i\}_{i=1}^n,\{z_{i,j}^2-z_{i,j}\}_{i<j}$ is unsatisfiable, and any roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation (in any variable order) requires $\exp(\Omega(n))$-size. Further, any multilinear-formula-IPS refutation requires $n^{\Omega(\log n)}$-size, and any product-depth-$d$ multilinear-formula-IPS refutation requires $n^{\Omega((\nicefrac{n}{\log n})^{1/d}/d^2)}$-size. \end{theoremwp*} Note that our result for multilinear-formulas is not just for the linear-IPS system, but actually for the full multilinear-formula-IPS system. Thus, we show that even though roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace and depth-3 multilinear formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} can refute the subset-sum axiom in polynomial size, slight variants of this axiom do not have polynomial-size refutations. \subsubsection{Lower Bounds for Multiples}\label{sec:intro:lbs-mult} While the above paradigm can establish super-polynomial lower bounds for \emph{linear}-IPS, it does not seem able to establish lower bounds for the general IPS proof system over non-multilinear polynomials, even for restricted classes. This is because such systems would induce equations such as $h(\vx) f(\vx)^2+g(\vx) f(\vx)\equiv 1 \mod \{x_i^2-x_i\}_{i=1}^n$, where we need to design a computationally simple axiom $f$ so that this equation implies at least one of $h$ or $g$ is of large complexity. In a linear-IPS proof it must be that $h$ is zero, so that for any $\vx\in\ensuremath{\{0,1\}}^n$ we can solve for $g(\vx)$, that is, $g(\vx)=\nicefrac{1}{f(\vx)}$. However, in general knowing $f(\vx)$ does not uniquely determine $g(\vx)$ or $h(\vx)$, which makes this approach significantly more complicated. Further, even though we can efficiently simulate IPS by linear-IPS (\autoref{res:h-ips_v_ips}) in general, this simulation increases the complexity of the proof so that even if one started with a $\mathcal{C}$-IPS proof for a restricted circuit class $\mathcal{C}$ the resulting \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace proof may not be in $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace. As such, we introduce a second paradigm, called \emph{lower bounds for multiples}, which can yield $\mathcal{C}$-IPS lower bounds for various restricted classes $\mathcal{C}$. We begin by defining this question. \begin{goal}[Lower Bounds for Multiples] Design an explicit polynomial $f(\vx)$ such that for any nonzero $g(\vx)$ we have that the multiple $g(\vx)f(\vx)$ is hard to compute. \end{goal} We now explain how such lower bounds yield IPS lower bounds. Consider the system $f,\{x_i^2-x_i\}_i$ with a single non-boolean axiom. An IPS refutation is a circuit $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{})$ such that $C(\vx,0,{\vec{0}})=0$ and $C(\vx,f,\vx^2-\vx)=1$, where (as mentioned) $\vx^2-\vx$ denotes $\{x_i^2-x_i\}_i$. Expressing $C(\vx,f,\vx^2-\vx)$ as a univariate in $f$, we obtain that $\sum_{i\ge 1} C_i(\vx,\vx^2-\vx) f^i = 1-C(\vx,0,\vx^2-\vx)$ for some polynomials $C_i$. For most natural measures of circuit complexity $1-C(\vx,0,\vx^2-\vx)$ has complexity roughly bounded by that of $C$ itself. Thus, we see that a multiple of $f$ has a small circuit, as $\left(\sum_{i\ge 1} C_i(\vx,\vx^2-\vx) f^{i-1}\right)\cdot f=1-C(\vx,0,\vx^2-\vx)$, and one can use the properties of the IPS refutation to show this is in fact a \emph{nonzero} multiple. Thus, if we can show that all nonzero multiples of $f$ require large circuits then we rule out a small IPS refutation. We now turn to methods for obtaining polynomials with hard multiples. Intuitively if a polynomial $f$ is hard then so should small modifications such as $f^2+x_1f$, and this intuition is supported by the result of Kaltofen~\cite{Kaltofen89} which shows that if a polynomial has a small algebraic circuit then so do all of its factors. As a consequence, if a polynomial requires super-polynomially large algebraic circuits then so do all of its multiples. However, Kaltofen's~\cite{Kaltofen89} result is about \emph{general} algebraic circuits, and there are very limited results about the complexity of factors of \emph{restricted} algebraic circuits (\cite{DvirSY09,Oliveira15}) so that obtaining polynomials for hard multiples via factorization results seems difficult. However, note that lower bound for multiples has a different order of quantifiers than the factoring question. That is, Kaltofen's~\cite{Kaltofen89} result speaks about the factors of \emph{any} small circuit, while the lower bound for multiples speaks about the multiples of a \emph{single} polynomial. Thus, it seems plausible that existing methods could yield such explicit polynomials, and indeed we show this is the case. We begin by noting that obtaining lower bounds for multiples is a natural instantiation of the algebraic \emph{hardness versus randomness} paradigm. In particular, Heintz-Schnorr~\cite{HeintzSchnorr80} and Agrawal~\cite{Agrawal05} showed that obtaining deterministic (black-box) polynomial identity testing algorithms implies lower bounds (see \autoref{sec:PIT} for more on PIT), and we strengthen that connection here to lower bounds for multiples. We can actually instantiate this connection, and we use slight modifications of existing PIT algorithms to show that multiples of the determinant are hard in some models. \begin{theoremwp*}[Informal Version of \autoref{res:generator_to_lbs-mult}, \autoref{res:lbs-mult:pit:det}] Let $\mathcal{C}$ be a restricted class of $n$-variate algebraic circuits. Full derandomization of PIT algorithms for $\mathcal{C}$ yields a (weakly) explicit polynomial whose nonzero multiples require $\exp(\Omega(n))$-size as $\mathcal{C}$-circuits. In particular, when $\mathcal{C}$ is the class of sparse polynomials, depth-3 powering formulas, $\sumpow{\O(1)}$ formulas (in characteristic zero), or ``every-order'' roABPs, then all nonzero multiples of the $n\times n$ determinant are $\exp(\Omega(n))$-hard in these models. \end{theoremwp*} The above statement shows that \emph{derandomization} implies \emph{hardness}. We also partly address the converse direction by arguing (\autoref{sec:lbs-mult:hard-v-rand}) that hardness-to-randomness construction of Kabanets and Impagliazzo~\cite{KabanetsImpagliazzo04} only requires lower bounds for multiples to derandomize PIT\@. Unfortunately, this direction is harder to instantiate for restricted classes as it requires lower bounds for classes with suitable closure properties.\footnote{Although, we note that one can instantiate this connection with depth-3 powering formulas (or even $\sumpow{\O(1)}$ formulas) using the lower bounds for multiples developed in this paper, building on the work of Forbes~\cite{Forbes15}. However, the resulting PIT algorithms are worse than those developed by Forbes~\cite{Forbes15}.} Unfortunately the above result is slightly unsatisfying from a proof complexity standpoint as the (exponential-size) lower bounds for the subclasses of IPS one can derive from the above result would involve the determinant polynomial as an axiom. While the determinant is efficiently computable, it is not computable by the above restricted circuit classes (indeed, the above result proves that). As such, this would not fit the real goal of proof complexity which seeks to show that there are statements whose proofs must be \emph{super-polynomial larger} than the length of the statement. Thus, if we measure the size of the IPS proof and the axioms with respect to the same circuit measure, the lower bounds for multiples approach \emph{cannot} establish such super-polynomial lower bounds. However, we believe that lower bounds for multiples could lead, with further ideas, to proof complexity lower bounds in the conventional sense. That is, it seems plausible that by adding \emph{extension variables} we can convert complicated axioms to simple, local axioms by tracing through the computation of that axiom. That is, consider the axiom $xyzw$. This can be equivalently written as $\{a-xy,b-zw,c-ab,c\}$, where this conversion is done by considering a natural algebraic circuit for $xyzw$, replacing each gate with a new variable, and adding an axiom ensuring the new variables respect the computation of the circuit. While we are unable to understand the role of extension variables in this work, we aim to give as simple axioms as possible whose multiples are all hard as this may facilitate future work on extension variables. We now discuss the lower bounds for multiples we obtain.\footnote{While we discussed functional lower bounds for multilinear formulas, this class is not interesting for the lower bounds for multiples question. This is because a multiple of a multilinear polynomial may not be multilinear, and thus clearly cannot have a multilinear formula.} \begin{theoremwp*}[Corollaries~\ref{res:lbs-mult:sumpowsum}, \ref{res:lbs-mult:sumpowt}, \ref{res:lbs-mult:sparse-LM}, \ref{prop:good-f-roabp}, and \ref{cor:r2abp-multiples}] We obtain the following lower bounds for multiples. \begin{itemize} \item All nonzero multiples of $x_1\cdots x_n$ require $\exp(\Omega(n))$-size as a depth-3 powering formula (over any field), or as a $\sumpow{\O(1)}$ formula (in characteristic zero). \item All nonzero multiples of $(x_1+1)\cdots (x_n+1)$ require $\exp(\Omega(n))$-many monomials. \item All nonzero multiples of $\prod_i (x_i+y_i)$ require $\exp(\Omega(n))$-width as an roABP in any variable order where $\vx$ precedes ${\vec{y}}\@ifnextchar{^}{\!\:}{}$. \item All nonzero multiples of $\prod_{i<j} (x_i+x_j)$ require $\exp(\Omega(n))$-width as an roABP in any variable order, as well as $\exp(\Omega(n))$-width as a read-twice oblivious ABP. \qedhere \end{itemize} \end{theoremwp*} We now briefly explain our techniques for obtaining these lower bounds, focusing on the simplest case of depth-3 powering formulas. It follows from the partial derivative method of Nisan and Wigderson~\cite{NisanWigderson94} (see Kayal~\cite{Kayal08}) that such formulas require exponential size to compute the monomial $x_1\ldots x_n$ \emph{exactly}. Forbes and Shpilka~\cite{ForbesShpilka13a}, in giving a PIT algorithm for this class, showed that this lower bound can be \emph{scaled down} and \emph{made robust}. That is, if one has a size-$s$ depth-3 powering formula, it follows that \emph{if} it computes a monomial $x_{i_1}\cdots x_{i_\ell}$ for distinct $i_j$ then $\ell\le O(\log s)$ (so the lower bound is scaled down). One can then show that regardless of what this formula actually computes the \emph{leading} monomial $x_{i_1}^{a_{i_1}}\cdots x_{i_\ell}^{a_{i_\ell}}$ (for distinct $i_j$ and positive $a_{i_j}$) must have that $\ell\le O(\log s)$. One then notes that leading monomials are \emph{multiplicative}. Thus, for any nonzero $g$ the leading monomial of $g\cdot x_1\ldots x_n$ involves $n$ variables so that if $g\cdot x_1\ldots x_n$ is computed in size-$s$ then $n\le O(\log s)$, giving $s\ge\exp(\Omega(n))$ as desired. One can then obtain the other lower bounds using the same idea, though for roABPs one needs to define a leading \emph{diagonal} (refining an argument of Forbes-Shpilka~\cite{ForbesShpilka12}). We now conclude our IPS lower bounds. \begin{theoremwp*}[\autoref{res:lbs-ips:mult:sumpowsum}, \autoref{res:lbs-ips:mult:roABP}] We obtain the following lower bounds for subclasses of IPS. \begin{itemize} \item In characteristic zero, the system of polynomials $x_1\cdots x_n,x_1+\cdots+x_n-n,\{x_i^2-x_i\}_{i=1}^n$ is unsatisfiable, and any $\ensuremath{\sum\pow\sum}\xspace$-IPS refutation requires $\exp(\Omega(n))$-size. \item In characteristic $>n$, the system of polynomials, $\prod_{i<j}(x_i+x_j-1),x_1+\cdots+x_n-n,\{x_i^2-x_i\}_i$ is unsatisfiable, and any roABP-IPS refutation (in any variable order) must be of size $\exp(\Omega(n))$. \qedhere \end{itemize} \end{theoremwp*} Note that the first result is a non-standard encoding of $1=\AND(x_1,\ldots,x_n)=0$. Similarly, the second is a non-standard encoding of $\AND(x_1,\ldots,x_n)=1$ yet $\XOR(x_i,x_j)=1$ for all $i,j$. \subsection{Organization} The rest of the paper is organized as follows. \autoref{sec:notation} contains the basic notation for the paper. In \autoref{sec:background} we give background from algebraic complexity, including several important complexity measures such as coefficient dimension and evaluation dimension (see \autoref{sec:coeff-dim} and \autoref{sec:eval-dim}). We present our upper bounds for IPS in \autoref{sec:h-ips:ubs}. In \autoref{sec:lbs-fn} we give our functional lower bounds and from them obtain lower bounds for \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace. \autoref{sec:lbs-mult} contains our lower bounds for multiples of polynomials and in \autoref{sec:ips-mult} we derive lower bounds for IPS using them. In \autoref{sec:open-problems} we list some problems which were left open by this work. In \autoref{sec:alg-proofs} we describe various other algebraic proof systems and their relations to IPS, such as the dynamic Polynomial Calculus of Clegg, Edmonds, and Impagliazzo~\cite{CleggEI96}, the ordered formula proofs of Tzameret~\cite{Tzameret11}, and the multilinear proofs of Raz and Tzameret~\cite{RazTzameret08a}. In \autoref{sec:appendix} we give an explicit description of a multilinear polynomial occurring in our IPS upper bounds. \section{Notation}\label{sec:notation} In this section we briefly describe notation used in this paper. We denote $[n]:=\{1,\ldots,n\}$. For a vector ${\vec{a}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n$, we denote $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}:= x_1^{a_1}\cdots x_n^{a_n}$ so that in particular $\vx^{\vec{1}}=\prod_{i=1}^n x_i$. The (total) degree of a monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$, denoted $\deg\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$, is equal to $\ellone{{\vec{a}}\@ifnextchar{^}{\!\:}{}}:=\sum_i a_i$, and the individual degree, denoted $\ideg \vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$, is equal to $\ellinfty{{\vec{a}}\@ifnextchar{^}{\!\:}{}}:=\max\{a_i\}_i$. A monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ depends on $\ellzero{{\vec{a}}\@ifnextchar{^}{\!\:}{}}:=|\{i:a_i\ne 0\}|$ many variables. Degree and individual degree can be defined for a polynomial $f$, denoted $\deg f$ and $\ideg f$ respectively, by taking the maximum over all monomials with nonzero coefficients in $f$. We will sometimes compare vectors ${\vec{a}}\@ifnextchar{^}{\!\:}{}$ and ${\vec{b}}\@ifnextchar{^}{\!\:}{}$ as ``${\vec{a}}\@ifnextchar{^}{\!\:}{}\le{\vec{b}}\@ifnextchar{^}{\!\:}{}$'', which is to be interpreted coordinate-wise. We will use $\prec$ to denote a monomial order on $\mathbb{F}[\vx]$, see \autoref{sec:mon-ord}. Polynomials will often be written out in their monomial expansion. At various points we will need to extract coefficients from polynomials. When ``taking the coefficient of ${\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ in $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$'' we mean that both $\vx$ and ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ are treated as variables and thus the coefficient returned is a scalar in $\mathbb{F}$, and this will be denoted $\coeff{\smash{{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}}(f)$. However, when ``taking the coefficient of ${\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{b}}\@ifnextchar{^}{\!\:}{}}$ in $f\in\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$'' we mean that $\vx$ is now part of the ring of scalars, so the coefficient will be an element of $\mathbb{F}[\vx]$, and this coefficient will be denoted $\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f)$. For a vector ${\vec{a}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n$ we denote ${\vec{a}}\@ifnextchar{^}{\!\:}{}_{\le i}\in\mathbb{N}^i$ to be the restriction of ${\vec{a}}\@ifnextchar{^}{\!\:}{}$ to the first $i$ coordinates. For a set $S \subseteq [n]$ we let $\overline{S}$ denote the complement set. We will denote the size-$k$ subsets of $[n]$ by $\binom{[n]}{k}$. We will use $\operatorname{ml}:\mathbb{F}[\vx]\to\mathbb{F}[\vx]$ to denote the multilinearization operator, defined by \autoref{fact:multilinearization}. We will use $\vx^2-\vx$ to denote the set of equations $\{x_i^2 -x_i\}_i$. To present algorithms that are field independent, this paper works in a model of computation where field operations (such as addition, multiplication, inversion and zero-testing) over $\mathbb{F}$ can be computed at unit cost, see for example Forbes~\cite[Appendix A]{Forbes14}. We say that an algebraic circuit is \demph{$t$-explicit} if it can be constructed in $t$ steps in this unit-cost model. \section{Algebraic Complexity Theory Background}\label{sec:background} In this section we state some known facts regarding the algebraic circuit classes that we will be studying. We also give some important definitions that will be used later in the paper. \subsection{Polynomial Identity Testing}\label{sec:PIT} In the \emph{polynomial identity testing (PIT)} problem, we are given an algebraic circuit computing some polynomial $f$, and we have to determine whether ``$f\equiv 0$''. That is, we are asking whether $f$ is the zero polynomial in $\mathbb{F}[x_1,\ldots,x_n]$. By the Schwartz-Zippel-DeMillo-Lipton Lemma~\cite{Zippel79,Schwartz80,DeMilloLipton78}, if $0\ne f \in \mathbb{F}[\vx]$ is a polynomial of degree $\le d$ and $S\subseteq \mathbb{F}$, and ${\vec{\alpha}}\in S^n$ is chosen uniformly at random, then $f({\vec{\alpha}}) =0$ with probability at most\,\footnote{Note that this is non-trivial only if $d < |S| \leq |\mathbb{F}|$, which in particular implies that $f$ is not the zero function.} $d/|S|$. Thus, given the circuit, we can perform these evaluations efficiently, giving an efficient randomized procedure for deciding whether ``$f\equiv 0$?''. It is an important open problem to find a derandomization of this algorithm, that is, to find a {\em deterministic} procedure for PIT that runs in polynomial time (in the size of circuit). Note that in the randomized algorithm of Schwartz-Zippel-DeMillo-Lipton we only use the circuit to compute the evaluation $f({\vec{\alpha}})$. Such algorithms are said to run in the {\em black-box} model. In contrast, an algorithm that can access the internal structure of the circuit runs in the {\em white-box} model. It is a folklore result that efficient deterministic black-box algorithms are equivalent to constructions of small \emph{hitting sets}. That is, a hitting set is set of inputs so that any nonzero circuit from the relevant class evaluates to nonzero on at least one of the inputs in the set. For more on PIT we refer to the survey of Shpilka and Yehudayoff~\cite{SY10}. A related notion to that of a hitting set is that of a \emph{generator}, which is essentially a low-dimensional curve whose image contains a hitting set. The equivalence between hitting sets and generators can be found in the above mentioned survey. \begin{definition}\label{defn:generator} Let $\mathcal{C}\subseteq\mathbb{F}[x_1,\ldots,x_n]$ be a set of polynomials. A polynomial ${\vec{\cG}}:\mathbb{F}^\ell\to\mathbb{F}^n$ is a \demph{generator for $\mathcal{C}$} with \demph{seed length $\ell$} if for all $f\in\mathcal{C}$, $f\equiv 0 \text{ iff } f\circ {\vec{\cG}}\equiv 0$. That is, $f(\vx)=0$ in $\mathbb{F}[\vx]$ iff $f({\vec{\cG}}({\vec{y}}\@ifnextchar{^}{\!\:}{}))=0$ in $\mathbb{F}[{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. \end{definition} In words, a generator for a circuit class $\mathcal{C}$ is a mapping ${\vec{\cG}}:\mathbb{F}^\ell \to \mathbb{F}^n$, such that for any nonzero polynomial $f$, computed by a circuit from $\mathcal{C}$, it holds that the composition $f({\vec{\cG}})$ is nonzero as well. By considering the image of ${\vec{\cG}}$ on $S^\ell$, where $S \subseteq \mathbb{F}$ is of polynomial size, we obtain a hitting set for $\mathcal{C}$. We now list some existing work on derandomizing PIT for some of the classes of polynomials we study in this paper. \paragraph{Sparse Polynomials:} There are many papers giving efficient black-box PIT algorithms for $\ensuremath{\sum\prod}\xspace$ formulas. For example, Klivans and Spielman \cite{KlivansSpielman01} gave a hitting set of polynomial size. \paragraph{Depth-$3$ Powering Formulas:} Saxena~\cite{Saxena08} gave a polynomial time white-box PIT algorithm and Forbes, Shpilka, and Saptharishi~\cite{ForbesSS14} gave a $s^{O(\lg\lg s)}$-size hitting set for size-$s$ depth-$3$ powering formulas. \paragraph{$\sumpow{\O(1)}$ Formulas:} Forbes~\cite{Forbes15} gave an $s^{O(\lg s)}$-size hitting set for size-$s$ $\sumpow{\O(1)}$ formulas (in large characteristic). \paragraph{Read-once Oblivious ABPs:} Raz and Shpilka~\cite{RazShpilka05} gave a polynomial time white-box PIT algorithm. A long sequence of papers calumniated in the work of Agrawal, Gurjar, Korwar, and Saxena~\cite{AgrawalGKS15}, who gave a $s^{O(\lg s)}$-sized hitting set for size-$s$ roABPs. \paragraph{Read-$k$ Oblivious ABPs:} Recently, Anderson, Forbes, Saptharishi, Shpilka and Volk~\cite{AndersonFSSV16} obtained a white-box PIT algorithm running in time $2^{\tilde{O}(n^{1-1/2^{k-1}})}$ for $n$-variate $\poly(n)$-sized read-$k$ oblivious ABPs. \subsection{Coefficient Dimension and roABPs}\label{sec:coeff-dim} This paper proves various lower bounds on roABPs using a complexity measures known as \emph{coefficient dimension}. In this section, we define this measures and recall basic properties. Full proofs of these claims can be found for example in the thesis of Forbes~\cite{Forbes14}. We first define the \emph{coefficient matrix} of a polynomial, called the ``partial derivative matrix'' in the prior work of Nisan~\cite{Nisan91} and Raz~\cite{Raz09}. This matrix is formed from a polynomial $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ by arranging its coefficients into a matrix. That is, the coefficient matrix has rows indexed by monomials $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ in $\vx$, columns indexed by monomials ${\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ in ${\vec{y}}\@ifnextchar{^}{\!\:}{}$, and the $(\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{})$-entry is the coefficient of $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ in the polynomial $f$. We now define this matrix, recalling that $\coeff{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f)$ is the coefficient of $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ in $f$. \begin{definition} Consider $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. Define the \demph{coefficient matrix of $f$} as the scalar matrix \[ (C_f)_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} := \coeff{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f) \;, \] where coefficients are taken in $\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$, for $\ellone{{\vec{a}}\@ifnextchar{^}{\!\:}{}},\ellone{{\vec{b}}\@ifnextchar{^}{\!\:}{}}\le \deg f$. \end{definition} We now give the related definition of \emph{coefficient dimension}, which looks at the dimension of the row- and column-spaces of the coefficient matrix. Recall that $\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f)$ extracts the coefficient of ${\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ in $f$ as a polynomial in $\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. \begin{definition}\label{defn:coefficient-space} Let $\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}:\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]\to\subsets{\mathbb{F}[\vx]}$ be the \demph{space of $\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ coefficients}, defined by \[ \coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f) := \left\{ \coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f) \right\}_{{\vec{b}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n} \;, \] where coefficients of $f$ are taken in $\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. Similarly, define $\coeffs{{\vec{y}}\@ifnextchar{^}{\!\:}{}|\vx}:\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]\to\subsets{\mathbb{F}[{\vec{y}}\@ifnextchar{^}{\!\:}{}]}$ by taking coefficients in $\mathbb{F}[{\vec{y}}\@ifnextchar{^}{\!\:}{}][\vx]$. \end{definition} The following basic lemma shows that the rank of the coefficient matrix equals the coefficient dimension, which follows from simple linear algebra. \begin{lemmawp}[Nisan~\cite{Nisan91}]\label{res:y-dim_eq-x-dim} Consider $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. Then the rank of the coefficient matrix $C_f$ obeys \[ \rank C_f = \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)=\dim\coeffs{{\vec{y}}\@ifnextchar{^}{\!\:}{}|\vx}(f) \;. \qedhere \] \end{lemmawp} Thus, the ordering of the partition ($(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})$ versus $({\vec{y}}\@ifnextchar{^}{\!\:}{},\vx)$) does not matter in terms of the resulting dimension. The above matrix-rank formulation of coefficient dimension can be rephrased in terms of low-rank decompositions. \begin{lemmawp}\label{res:nisan_dim-eq-width} Let $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. Then $\dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)$ equals the minimum $r$ such that there are ${\vec{g}}\@ifnextchar{^}{\!\:}{}\in\mathbb{F}[\vx]^r$ and ${\vec{h}}\@ifnextchar{^}{\!\:}{}\in\mathbb{F}[{\vec{y}}\@ifnextchar{^}{\!\:}{}]^r$ such that $f$ can be written as $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})=\sum_{i=1}^r g_i(\vx)h_i({\vec{y}}\@ifnextchar{^}{\!\:}{})$. \end{lemmawp} We now state a convenient normal form for roABPs (see for example Forbes~\cite[Corollary 4.4.2]{Forbes14}). \begin{lemmawp}\label{res:roABP-normal-form} A polynomial $f\in\mathbb{F}[x_1,\ldots,x_n]$ is computed by width-$r$ roABP iff there exist matrices $A_i(x_{i})\in\mathbb{F}[x_{i}]^{r\times r}$ of (individual) degree $\le \deg f$ such that $f=(\prod_{i=1}^n A_i(x_{i}))_{1,1}$. Further, this equivalence preserves explicitness of the roABPs up to $\poly(n,r,\deg f)$-factors. \end{lemmawp} By splitting an roABP into such variable-disjoint inner-products one can obtain a lower bound for roABP width via coefficient dimension. In fact, this complexity measure \emph{characterizes} roABP width. \begin{lemmawp}\label{res:roABP-width_eq_dim-coeffs} Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be a polynomial. If $f$ is computed by a width-$r$ roABP then $r \ge \max_i\dim\coeffs{\vx_{\le i}|\vx_{>i}}(f)$. Further, $f$ is computable width-$\left(\max_i\dim\coeffs{\vx_{\le i}|\vx_{>i}}(f)\right)$ roABP. \end{lemmawp} Using this complexity measure it is rather straightforward to prove the following closure properties of roABPs. \begin{fact}\label{fact:roABP:closure} If $f,g\in\mathbb{F}[\vx]$ are computable by width-$r$ and width-$s$ roABPs respectively, then \begin{itemize} \item $f+g$ is computable by a width-$(r+s)$ roABP\@. \item $f\cdot g$ is computable by a width-$(rs)$ roABP\@. \end{itemize} \noindent Further, roABPs are also closed under the follow operations. \begin{itemize} \item If $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ is computable by a width-$r$ roABP in some variable order then the partial substitution $f(\vx,{\vec{\alpha}})$, for ${\vec{\alpha}}\in\mathbb{F}^{|{\vec{y}}\@ifnextchar{^}{\!\:}{}|}$, is computable by a width-$r$ roABP in the induced order on $\vx$, where the degree of this roABP is bounded by the degree of the roABP for $f$. \item If $f(z_1,\ldots,z_n)$ is computable by a width-$r$ roABP in variable order $z_1<\cdots<z_n$, then $f(x_1y_1,\ldots,x_ny_n)$ is computable by a $\poly(r,\ideg f)$-width roABP in variable order $x_1<y_1<\cdots<x_n<y_n$. \end{itemize} Further, these operations preserve the explicitness of the roABPs up to polynomial factors in all relevant parameters. \end{fact} We now state the extension of these techniques which yield lower bounds for read-$k$ oblivious ABPs, as recently obtained by Anderson, Forbes, Saptharishi, Shpilka and Volk~\cite{AndersonFSSV16}. \begin{theoremwp}[{\cite{AndersonFSSV16}}]\label{thm:read-k-eval-dim} Let $f \in \mathbb{F}[x_1, \ldots, x_n]$ be a polynomial computed by a width-$w$ read-$k$ oblivious ABP\@. Then there exists a partition $\vx=({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$ such that \begin{enumerate} \item $|{\vec{u}}\@ifnextchar{^}{\!\:}{}|, |{\vec{v}}\@ifnextchar{^}{\!\:}{}| \ge n/k^{O(k)}$. \item $|{\vec{w}}\@ifnextchar{^}{\!\:}{}| \le n/10$. \item $\dim_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})} \coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}(f_{\vec{w}}\@ifnextchar{^}{\!\:}{}) \le w^{2k}$, where $f_{\vec{w}}\@ifnextchar{^}{\!\:}{}$ is $f$ as a polynomial in $\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}]$. \qedhere \end{enumerate} \end{theoremwp} \subsection{Evaluation Dimension}\label{sec:eval-dim} While coefficient dimension measures the size of a polynomial $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})$ by taking all coefficients in ${\vec{y}}\@ifnextchar{^}{\!\:}{}$, \emph{evaluation dimension} is a complexity measure due to Saptharishi~\cite{Saptharishi12} that measures the size by taking all possible evaluations in ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ over the field. This measure will be important for our applications as one can restrict such evaluations to the boolean cube and obtain circuit lower bounds for computing $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})$ as a \emph{polynomial} via its induced \emph{function} on the boolean cube. We begin with the definition. \begin{definition}[Saptharishi~\cite{Saptharishi12}]\label{defn:evaluation-space} Let $S\subseteq \mathbb{F}$. Let $\evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},S}:\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]\to\subsets{\mathbb{F}[\vx]}$ be the \demph{space of $\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ evaluations over $S$}, defined by \[ \evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},S}(f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})) := \left\{ f(\vx,{\vec{\beta}}) \right\}_{{\vec{\beta}}\in S^{|{\vec{y}}\@ifnextchar{^}{\!\:}{}|}} \;. \] Define $\evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}:\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]\to\subsets{\mathbb{F}[\vx]}$ to be $\evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},S}$ when $S=\mathbb{F}$. Similarly, define $\evals{{\vec{y}}\@ifnextchar{^}{\!\:}{}|\vx,S}:\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]\to\subsets{\mathbb{F}[{\vec{y}}\@ifnextchar{^}{\!\:}{}]}$ by replacing $\vx$ with all possible evaluations ${\vec{\alpha}}\in S^{|\vx|}$, and likewise define $\evals{{\vec{y}}\@ifnextchar{^}{\!\:}{}|\vx}:\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]\to\subsets{\mathbb{F}[{\vec{y}}\@ifnextchar{^}{\!\:}{}]}$. \end{definition} The equivalence between evaluation dimension and coefficient dimension was shown by Forbes-Shpilka~\cite{ForbesShpilka13b} by appealing to interpolation. \begin{lemmawp}[Forbes-Shpilka~\cite{ForbesShpilka13b}]\label{res:evals_eq-coeffs} Let $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. For any $S\subseteq\mathbb{F}$ we have that $\evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},S}(f)\subseteq\spn \coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)$ so that $\dim \evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},S}(f)\le \dim \coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)$. In particular, if $|S|>\ideg f$ then $\dim\evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},S}(f)=\dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)$. \end{lemmawp} While evaluation dimension and coefficient dimension are equivalent when the field is large enough, when restricting our attention to inputs from the boolean cube this equivalence no longer holds (in particular, we have to consider all polynomials that obtain the same values on the boolean cube and not just one polynomial), but evaluation dimension will be still be helpful as it will always lower bound coefficient dimension. \subsection{Multilinear Polynomials and Multilinear Formulas} We now turn to multilinear polynomials and classes that respect multilinearity such as multilinear formulas. We first state some well-known facts about multilinear polynomials. \begin{fact}\label{fact:multilinearization} For any two multilinear polynomials $f,g\in\mathbb{F}[x_1,\ldots,x_n]$, $f=g$ as polynomials iff they agree on the boolean cube $\ensuremath{\{0,1\}}^n$. That is, $f=g$ iff $f|_{\ensuremath{\{0,1\}}^n}=g|_{\ensuremath{\{0,1\}}^n}$. Further, there is a \demph{multilinearization} map $\operatorname{ml}:\mathbb{F}[\vx]\to\mathbb{F}[\vx]$ such that for any $f,g\in\mathbb{F}[\vx]$, \begin{enumerate} \item $\operatorname{ml}(f)$ is multilinear. \item $f$ and $\operatorname{ml}(f)$ agree on the boolean cube, that is, $f|_{\ensuremath{\{0,1\}}^n}=\operatorname{ml}(f)|_{\ensuremath{\{0,1\}}^n}$. \item $\deg \operatorname{ml}(f)\le \deg f$. \item $\operatorname{ml}(fg)=\operatorname{ml}(\operatorname{ml}(f)\operatorname{ml}(g))$. \item $\operatorname{ml}$ is linear, so that for any $\alpha,\beta\in \mathbb{F}$, $\operatorname{ml}(\alpha f+\beta g)=\alpha \operatorname{ml}(f)+\beta\operatorname{ml}(g)$. \item $\operatorname{ml}(x_1^{a_1}\cdots x_n^{a_n})=\prod_i x_i^{\max\{a_i,1\}}$. \item If $f$ is the sum of at most $s$ monomials ($s$-sparse) then so is $\operatorname{ml}(f)$. \end{enumerate} Also, if $\hat{f}$ is a function $\ensuremath{\{0,1\}}^n\to\mathbb{F}$ that only depends on the coordinates in $S\subseteq[n]$, then the unique multilinear polynomial $f$ agreeing with $\hat{f}$ on $\ensuremath{\{0,1\}}^n$ is a polynomial only in $\{x_i\}_{i\in S}$. One can also extend the multilinearization map $\operatorname{ml}:\mathbb{F}[\vx]\to\mathbb{F}[\vx]$ to matrices $\operatorname{ml}:\mathbb{F}[\vx]^{r\times r}\to\mathbb{F}[\vx]^{r\times r}$ by applying the map entry-wise, and the above properties still hold. \end{fact} Throughout the rest of this paper `$\operatorname{ml}$' will denote the multilinearization operator. Raz~\cite{Raz09,Raz06} gave lower bounds for multilinear formulas using the above notion of coefficient dimension, and Raz-Yehudayoff~\cite{RazYehudayoff08,RazYehudayoff09} gave simplifications and extensions to constant-depth multilinear formulas. \begin{theoremwp}[Raz-Yehudayoff~\cite{Raz09,RazYehudayoff09}]\label{thm:full-rank-lb} Let $f\in\mathbb{F}[x_1,\ldots,x_{2n},{\vec{z}}\@ifnextchar{^}{\!\:}{}]$ be a multilinear polynomial in the set of variables $\vx$ and auxiliary variables ${\vec{z}}\@ifnextchar{^}{\!\:}{}$. Let $f_{\vec{z}}\@ifnextchar{^}{\!\:}{}$ denote the polynomial $f$ in the ring $\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}][\vx]$. Suppose that for any partition $\vx=({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{})$ with $|{\vec{u}}\@ifnextchar{^}{\!\:}{}|=|{\vec{v}}\@ifnextchar{^}{\!\:}{}|=n$ that \[ \dim_{\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})} \coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}} f_{\vec{z}}\@ifnextchar{^}{\!\:}{} \ge 2^n \;. \] Then $f$ requires $\ge n^{\Omega(\log n)}$-size to be computed as a multilinear formula, and for $d=o(\nicefrac{\log n}{\log\log n})$, $f$ requires $n^{\Omega((\nicefrac{n}{\log n})^{\nicefrac{1}{d}}/d^2)}$-size to be computed as a multilinear formula of product-depth-$d$. \end{theoremwp} \subsection{Depth-3 Powering Formulas} In this section we review facts about depth-3 powering formulas. We begin with the \emph{duality trick} of Saxena~\cite{Saxena08}, which shows that one can convert a power of a linear form to a sum of products of univariate polynomials. \begin{theoremwp}[Saxena's Duality Trick~\cite{ShpilkaWigderson01,Saxena08,ForbesGS13}]\label{res:sumpowsum:duality} Let $n\ge 1$, and $d\ge 0$. If $|\mathbb{F}|\ge nd+1$, then there are $\poly(n,d)$-explicit univariates $f_{i,j}\in\mathbb{F}[x_i]$ such that \[ (x_1+\cdots+x_n)^d=\sum_{i=1}^s f_{i,1}(x_1)\cdots f_{i,n}(x_n) \;, \] where $\deg f_{i,j}\le d$ and $s=(nd+1)(d+1)$. \end{theoremwp} The original proof of Saxena~\cite{Saxena08} only worked over fields of large enough characteristic, and gave $s=nd+1$. A similar version of this trick also appeared in Shpilka-Wigderson~\cite{ShpilkaWigderson01}. The parameters we use here are from the proof of Forbes, Gupta, and Shpilka~\cite{ForbesGS13}, which has the advantage of working over any large enough field. Noting that the product $f_{i,1}(x_1)\cdots f_{i,n}(x_n)$ trivially has a width-1 roABP (in any variable order), it follows that $(x_1+\cdots+x_n)^d$ has a $\poly(n,d)$-width roABP over a large enough field. Thus, size-$s$ $\ensuremath{\sum\pow\sum}\xspace$ formulas have $\poly(s)$-size roABPs over large enough fields by appealing to closure properties of roABPs (\autoref{fact:roABP:closure}). As it turns out, this result also holds over any field as Forbes-Shpilka~\cite{ForbesShpilka13b} adapted Saxena's~\cite{Saxena08} duality to work over any field. Their version works over any field, but loses the above clean form (sum of product of univariates). \begin{theoremwp}[Forbes-Shpilka~\cite{ForbesShpilka13b}]\label{res:sumpowsum:roABP} Let $f\in\mathbb{F}[\vx]$ be expressed as $f(\vx)=\sum_{i=1}^s (\alpha_{i,0}+\alpha_{i,1}x_i+\cdots+\alpha_{i,n}x_n)^{d_i}$. Then $f$ is computable by a $\poly(r,n)$-explicit width-$r$ roABP of degree $\max_i\{d_i\}$, in any variable order, where $r=\sum_i (d_i+1)$. \end{theoremwp} One way to see this claim is to observe that for any variable partition, a linear function can be expressed as the sum of two variable-disjoint linear functions $\ell(\vx_1,\vx_2)=\ell_1(\vx_1)+\ell_2(\vx_2)$. By the binomial theorem, the $d$-th power of this expression is a summation of $d+1$ variable-disjoint products, which implies a coefficient dimension upper bound of $d+1$ (\autoref{res:nisan_dim-eq-width}) and thus also an roABP-width upper bound (\autoref{res:roABP-width_eq_dim-coeffs}). One can then sum over the linear forms. While this simulation suffices for obtaining roABP upper bounds, we will also want the clean form obtained via duality for application to multilinear-formula IPS proofs of the subset-sum axiom (\autoref{res:ips-ubs:subset:mult-form}). \subsection{Monomial Orders}\label{sec:mon-ord} We recall here the definition and properties of a \emph{monomial order}, following Cox, Little and O'Shea~\cite{CoxLittleOShea07}. We first fix the definition of a \emph{monomial} in our context. \begin{definition} A \demph{monomial} in $\mathbb{F}[x_1,\ldots,x_n]$ is a polynomial of the form $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}=x_1^{a_1}\cdots x_n^{a_n}$ for ${\vec{a}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n$. \end{definition} We will sometimes abuse notation and associate a monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ with its exponent vector ${\vec{a}}\@ifnextchar{^}{\!\:}{}$, so that we can extend this order to the exponent vectors. Note that in this definition ``$1$'' is a monomial, and that scalar multiples of monomials such as $2x$ are not considered monomials. We now define a monomial order, which will be total order on monomials with certain natural properties. \begin{definition} A \demph{monomial ordering} is a total order $\prec$ on the monomials in $\mathbb{F}[\vx]$ such that \begin{itemize} \item For all ${\vec{a}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n\setminus\{{\vec{0}}\}$, $1\prec \vx^{{\vec{a}}\@ifnextchar{^}{\!\:}{}}$. \item For all ${\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{c}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n$, $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec\vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ implies $\vx^{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{c}}\@ifnextchar{^}{\!\:}{}}\prec\vx^{{\vec{b}}\@ifnextchar{^}{\!\:}{}+{\vec{c}}\@ifnextchar{^}{\!\:}{}}$. \end{itemize} For nonzero $f\in\mathbb{F}[\vx]$, the \demph{leading monomial of $f$ (with respect to a monomial order $\prec$)}, denoted $\LM(f)$, is the largest monomial in $\supp(f):=\{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}:\coeff{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}}(f)\ne 0\}$ with respect to the monomial order $\prec$. The \demph{trailing monomial of $f$}, denoted $\TM(f)$, is defined analogously to be the smallest monomial in $\supp(f)$. The zero polynomial has neither leading nor trailing monomial. For nonzero $f\in\mathbb{F}[\vx]$, the \demph{leading (resp.\ trailing) coefficient of $f$}, denoted $\LC(f)$ (resp.\ $\TC(f)$), is $\coeff{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}}(f)$ where $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}=\LM(f)$ (resp.\ $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}=\TM(f)$). \end{definition} Henceforth in this paper we will assume $\mathbb{F}[\vx]$ is equipped with some monomial order $\prec$. The results in this paper will hold for \emph{any} monomial order. However, for concreteness, one can consider the lexicographic ordering on monomials, which is easily seen to be a monomial ordering (see also Cox, Little and O'Shea~\cite{CoxLittleOShea07}). We begin with a simple lemma about how taking leading or trailing monomials (or coefficients) is homomorphic with respect to multiplication. \begin{lemma}\label{res:hom_LM-TM_mult} Let $f,g\in\mathbb{F}[\vx]$ be nonzero polynomials. Then the leading monomial and trailing monomials and coefficients are homomorphic with respect to multiplication, that is, $\LM(fg)=\LM(f)\LM(g)$ and $\TM(fg)=\TM(f)\TM(g)$, as well as $\LC(fg)=\LC(f)\LC(g)$ and $\TC(fg)=\TC(f)\TC(g)$. \end{lemma} \begin{proof} We do the proof for leading monomials and coefficients, the claim for trailing monomials and coefficients is symmetric. Let $f(\vx)=\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \alpha_{\vec{a}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ and $g(\vx)=\sum_{\vec{b}}\@ifnextchar{^}{\!\:}{} \beta_{\vec{b}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}$. Isolating the leading monomials, \begin{align*} f(\vx)=&\LC(f)\cdot \LM(f)+\sum_{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec\LM(f)} \alpha_{\vec{a}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{a}}\@ifnextchar{^}{\!\:}{},& g(\vx)=&\LC(g)\cdot \LM(g)+\sum_{\vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\prec\LM(g)} \beta_{\vec{b}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}, \end{align*} with $\LC(f)=\alpha_{\LM(f)}$ and $\LC(g)=\beta_{\LM(g)}$ being nonzero. Thus, \begin{multline*} f(\vx)g(\vx)=\LC(f)\LC(g) \cdot \LM(f)\LM(g) +\LC(f)\LM(f)\left(\sum_{\vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\prec\LM(g)} \beta_{\vec{b}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right)\\ +\LC(g)\LM(g)\left(\sum_{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec\LM(f)} \alpha_{\vec{a}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\right) +\left(\sum_{\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec\LM(f)} \alpha_{\vec{a}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\right)\left(\sum_{\vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\prec\LM(g)} \beta_{\vec{b}}\@ifnextchar{^}{\!\:}{} \vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right). \end{multline*} Using that $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\prec \LM(f) \LM(g)$ whenever $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec\LM(f)$ or $\vx^{\vec{b}}\@ifnextchar{^}{\!\:}{}\prec\LM(g)$ due to the definition of a monomial order, we have that $\LM(f)\LM(g)$ is indeed the maximal monomial in the above expression with nonzero coefficient, and as its coefficient is $\LC(f)\LC(g)$. \end{proof} We now recall the well-known fact that for any set of polynomials the dimension of their span in $\mathbb{F}[\vx]$ is equal to the number of distinct leading or trailing monomials in their span. \begin{lemmawp}\label{res:dim-eq-num-TM-spn} Let $S\subseteq\mathbb{F}[\vx]$ be a set of polynomials. Then $\dim \spn S=\nLM{\spn S}=\nTM{\spn S}$. In particular, $\dim \spn S\ge \nLM{S},\nTM{S}$. \end{lemmawp} \section{Upper Bounds for Linear-IPS}\label{sec:h-ips:ubs} While the primary focus of this work is on \emph{lower bounds} for restricted classes of the IPS proof system, we begin by discussing \emph{upper bounds} to demonstrate that these restricted classes can prove the unsatisfiability of non-trivial systems of polynomials equations. In particular we go beyond existing work on upper bounds (\cite{GrigorievHirsch03,RazTzameret08a,RazTzameret08b,GrochowPitassi14,LiTW15}) and place interesting refutations in IPS subsystems where we will also prove lower bounds, as such upper bounds demonstrate the non-triviality of our lower bounds. We begin by discussing the power of the linear-IPS proof system. While one of the most novel features of IPS proofs is their consideration of non-linear certificates, we show that in powerful enough models of algebraic computation, linear-IPS proofs can efficiently simulate general IPS proofs, essentially answering an open question of Grochow and Pitassi~\cite{GrochowPitassi14}. A special case of this result was obtained by Grochow and Pitassi~\cite{GrochowPitassi14}, where they showed that \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace can simulate $\ensuremath{\sum\prod}\xspace$-IPS\@. We then consider the \emph{subset-sum} axioms, previously considered by Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99}, and show that they can be refuted in polynomial size by the $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace proof system where $\mathcal{C}$ is either the class of roABPs, or the class of multilinear formulas. \subsection{Simulating IPS Proofs with Linear-IPS}\label{sec:h-ips:ips=h-ips} We show here that general IPS proofs can be efficiently simulated by linear-IPS, assuming that the axioms to be refuted are described by small algebraic circuits. Grochow and Pitassi~\cite{GrochowPitassi14} showed that whenever the IPS proof computes \emph{sparse} polynomials, one can simulate it by linear-IPS using (possibly non-sparse) algebraic circuits. We give here a simulation of IPS when the proofs use general algebraic circuits. To give our simulation, we will need to show that if a small circuit $f(\vx,y)$ is divisible by $y$, then the quotient $\nicefrac{f(\vx,y)}{y}$ also has a small circuit. Such a result clearly follows from Strassen's~\cite{Strassen73} elimination of divisions in general, but we give two constructions for the quotient which tailor Strassen's~\cite{Strassen73} technique to optimize certain parameters. The first construction assumes that $f$ has degree bounded by $d$, and produces a circuit for the quotient whose size depends polynomially on $d$. This construction is efficient when $f$ is computed by a formula or branching program (so that $d$ is bounded by the size of $f$). In particular, this construction will preserve the depth of $f$ in computing the quotient, and as such we only present it for formulas. The construction proceeds via interpolation to decompose $f(\vx,y)=\sum_i f_i(\vx)y^i$ into its constituent parts $\{f_i(\vx)\}_i$ and then directly constructs $\nicefrac{f(\vx,y)}{y}=\sum_i f_i(\vx)y^{i-1}$. \begin{lemma}\label{res:divide-by-y:black-box} Let $\mathbb{F}$ be a field with $|\mathbb{F}|\ge d+1$. Let $f(\vx,y)\in\mathbb{F}[x_1,\ldots,x_n,y]$ be a degree $\le d$ polynomial expressible as $f(\vx,y)=\sum_{0\le i\le d} f_i(\vx)y^i$ for $f_i\in\mathbb{F}[\vx]$. Assume $f$ is computable by a size-$s$ depth-$D$ formula. Then for $a\ge 1$ one can compute \[ \sum_{i=a}^d f_i(\vx) y^{i-a} \;, \] by a $\poly(s,a,d)$-size depth-$(D+2)$ formula. Further, given $d$ and the formula for $f$, the resulting formula is $\poly(s,a,d)$-explicit. In particular, if $y^a|f(\vx,y)$ then the quotient $\nicefrac{f(\vx,y)}{y^a}$ has a formula of these parameters. \end{lemma} \begin{proof} Express $f(\vx,y)\in\mathbb{F}[\vx][y]$ by $f(\vx,y)=\sum_{0\le i\le d} f_i(\vx)y^i$. As $|\mathbb{F}|\ge 1+\deg_y f$, by interpolation there are $\poly(d)$-explicit constants $\alpha_{i,j},\beta_j\in\mathbb{F}$ such that \[ f_i(\vx)=\sum_{j=0}^d \alpha_{i,j}f(\vx,\beta_j) \;. \] It then follows that \[ \sum_{i=a}^d f_i(\vx) y^{i-a} =\sum_{i=a}^d \left(\sum_{j=0}^d \alpha_{i,j}f(\vx,\beta_j)\right) y^{i-a} =\sum_{i=a}^d \sum_{j=0}^d \alpha_{i,j}f(\vx,\beta_j) y^{i-a} \;, \] which is clearly a formula of the appropriate size, depth, and explicitness. The claim about the quotient $\nicefrac{f(\vx,y)}{y^a}$ follows from seeing that if the quotient is a polynomial then $\nicefrac{f(\vx,y)}{y^a}=\sum_{i=a}^d f_i(\vx) y^{i-a}$. \end{proof} The above construction suffices in the typical regime of algebraic complexity where the circuits compute polynomials whose degree is polynomially-related to their circuit size. However, the simulation of Extended Frege by general IPS proved by Grochow-Pitassi~\cite{GrochowPitassi14} (\autoref{thm:GrochowPitassi14}) yields IPS refutations with circuits of possibly exponential degree (see also \autoref{rmk:EF-degree}). As such, this motivates the search for an efficient division lemma in this regime. We now provide such a lemma, which is a variant of Strassen's~\cite{Strassen73} homogenization technique for efficiently computing the low-degree homogeneous components of an unbounded degree circuit. As weaker models of computation (such as formulas and branching programs) cannot compute polynomials of degree exponential in their size, we only present this lemma for circuits. \begin{lemma}\label{res:divide-by-y:white-box} Let $f(\vx,y)\in\mathbb{F}[x_1,\ldots,x_n,y]$ be a polynomial expressible as $f(\vx,y)=\sum_i f_i(\vx)y^i$ for $f_i\in\mathbb{F}[\vx]$, and assume $f$ is computable by a size-$s$ circuit. Then for $a\ge 1$ there is an $O(a^2s)$-size circuit with outputs gates computing \[ f_0(\vx),\ldots,f_{a-1}(\vx),\sum_{i\ge a} f_i(\vx) y^{i-a} \;. \] Further, given $a$ and the circuit for $f$, the resulting circuit is $\poly(s,a)$-explicit. In particular, if $y^a|f(\vx,y)$ then the quotient $\nicefrac{f(\vx,y)}{y^a}$ has a circuit of these parameters. \end{lemma} \begin{proof} The proof proceeds by viewing the computation in the ring $\mathbb{F}[\vx][y]$, and splitting each gate in the circuit for $f$ into its coefficients in terms of $y$. However, to avoid a dependence on the degree, we only split out the coefficients of $y^0,y^1,\ldots,y^{a-1}$, and then group together the rest of the coefficients together. That is, for a polynomial $g(\vx,y)=\sum_{i\ge 0} g_i(\vx)y^i$, we can split this into $g=\sum_{0\le i<a} g_i(\vx)y^i+\left(\sum_{i\ge a} g_i(\vx)y^{i-a}\right)y^a$ to obtain the constituent parts $g_0(\vx),\ldots,g_{a-1}(\vx),\sum_{i\ge a}g_i(\vx)y^{i-a}$. We can then locally update this split by appropriately keeping track of how addition and multiplication affects this grouping of coefficients. We note that we can assume without loss of generality that the circuit for $f$ has fan-in 2, as this only increases the size of the circuit by a constant factor (measuring the size of the circuit in number of edges) and simplifies the construction. \uline{construction:} Let $\Phi$ denote the circuit for $f$. For a gate $v$ in $\Phi$, denote $\Phi_v$ to be the configuration of $v$ in $\Phi$ and let $f_v$ to be the polynomial computed by the gate $v$. We will define the new circuit $\Psi$, which will be defined by the gates $\{(v,i): v\in\Phi, 0\le i\le a\}$ and the wiring between them, as follows. \begin{itemize} \item $\Phi_v\in\mathbb{F}$: $\Psi_{(v,0)}:= \Phi_v$, $\Psi_{(v,i)}:= 0$ for $i\ge 1$. \item $\Phi_v=x_i$: $\Psi_{(v,0)}:= x_i$, $\Psi_{(v,i)}:= 0$ for $i\ge 1$. \item $\Phi_v=y$: $\Psi_{(v,1)}:= 1$, $\Psi_{(v,i)}:= 0$ for $i\ne 1$. \item $\Phi_v=\Phi_u+\Phi_w$: $\Psi_{(v,i)}:= \Psi_{(u,i)}+\Psi_{(w,i)}$, all $i$. \item $\Phi_v=\Phi_u\times \Phi_w$, $0\le i<a$: \[ \Psi_{(v,i)}:= \sum_{0\le j\le i}\Psi_{(u,j)}\times\Psi_{(w,i-j)} \;. \] \item $\Phi_v=\Phi_u\times \Phi_w$, $i=a$: \begin{align*} \Psi_{(v,a)} &:= \sum_{\ell=a}^{2(a-1)}y^{\ell-a}\sum_{\substack{i+j=\ell\\0\le i,j< a}}\Psi_{(u,i)}\times\Psi_{(w,j)} + \sum_{0\le i<a} \Psi_{(u,i)}\times\Psi_{(w,a)}\times y^i\\ &\hspace{1in}+ \sum_{0\le j<a} \Psi_{(u,a)}\times\Psi_{(w,j)}\times y^j +\Psi_{(u,a)}\times\Psi_{(w,a)}\times y^a \;. \end{align*} \end{itemize} \uline{complexity:} Split the gates in $\Psi$ into two types, those gates $(v,i)$ where $i=a$ and $v$ is a multiplication gate in $\Phi$, and then the rest. For the former type, $\Psi_{(v,a)}$ is computable by a size-$O(a^2)$ circuit in its children, and there are at most $s$ such gates. For the latter type, $\Psi_{(v,i)}$ is computable by a size-$O(a)$ circuit in its children, and there are at most $O(as)$ such gates. As such, the total size is $O(a^2s)$. \uline{correctness:} We now establish correctness as a subclaim. For a gate $(v,i)$ in $\Psi$, let $g_{(v,i)}$ denote the polynomial that it computes. \begin{subclaim} For each gate $v$ in $\Phi$, for $0\le i<a$ we have that $g_{(v,i)}=\coeff{\vx|y^i}(f_v)$ and for $i=a$ we have that $g_{(v,a)}=\sum_{i\ge a} \coeff{\vx|y^i}(f_v)y^{i-a}$. In particular, $f_v=\sum_{i=0}^a g_{(v,i)}y^i$. \end{subclaim} \begin{subproof} Note that the second part of the claim follows from the first. We now establish the first part by induction on the gates of the circuit. \begin{itemize} \item $\Phi_v\in\mathbb{F}$: By construction, $g_{(v,0)}=f_v=\coeff{\vx|y^0}(f_v)$, and for $i\ge1$, $g_{(v,i)}=0=\coeff{\vx|y^i}(f_v)$. \item $\Phi_v=x_i$: By construction, $g_{(v,0)}=f_v=\coeff{\vx|y^0}(f_v)$, and for $i\ge1$, $g_{(v,i)}=0=\coeff{\vx|y^i}(f_v)$. \item $\Phi_v=y$: By construction, $g_{(v,1)}=1=\coeff{\vx|y^1}(f_v)$, and for $i\ne 1$, $g_{(v,i)}=0=\coeff{\vx|y^i}(f_v)$. \item $\Phi_v=\Phi_u+\Phi_w$: \begin{align*} g_{(v,i)} &=g_{(u,i)}+g_{(w,i)}\\ &=\coeff{\vx|y^i}(f_u)+\coeff{\vx|y^i}(f_w)\\ &=\coeff{\vx|y^i}(f_u+f_w) =\coeff{\vx|y^i}(f_v) \;. \end{align*} \item $\Phi_v=\Phi_u\times\Phi_w$, $0\le i<a$: \begin{align*} g_{(v,i)} &=\sum_{0\le j\le i} g_{(u,j)}\cdot g_{(w,i-j)}\\ &=\sum_{0\le j\le i} \coeff{\vx|y^{j}}(f_u) \cdot \coeff{\vx|y^{i-j}}(f_w)\\ &=\coeff{\vx|y^i}(f_u\cdot f_w) =\coeff{\vx|y^i}(f_v) \;. \end{align*} \item $\Phi_v=\Phi_u\times\Phi_w$, $i=a$: \begin{align*} g_{(v,a)} &=\sum_{\ell=a}^{2(a-1)}y^{\ell-a}\sum_{\substack{i+j=\ell\\0\le i,j< a}}g_{(u,i)}\cdot g_{(w,j)} + \sum_{0\le i<a} g_{(u,i)}\cdot g_{(w,a)}\cdot y^i\\ &\hspace{1in}+ \sum_{0\le j<a} g_{(u,a)}\cdot g_{(w,j)}\cdot y^j +g_{(u,a)}\cdot g_{(w,a)}\cdot y^a\\ &=\sum_{\ell=a}^{2(a-1)}y^{-a}\sum_{\substack{i+j=\ell\\0\le i,j< a}}\coeff{\vx|y^i}(f_u)y^i\cdot \coeff{\vx|y^j}(f_w)y^j\\ &\hspace{1in}+ \sum_{0\le i<a} \coeff{\vx|y^i}(f_u)\cdot \left (\sum_{j\ge a}\coeff{\vx|y^j}(f_w)y^{j-a}\right)\cdot y^i\\ &\hspace{1in}+ \sum_{0\le j<a} \left(\sum_{i\ge a}\coeff{\vx|y^i}(f_u)y^{i-a}\right)\cdot \coeff{\vx|y^j}(f_w)\cdot y^j\\ &\hspace{1in}+\left(\sum_{i\ge a}\coeff{\vx|y^i}(f_u)y^{i-a}\right)\cdot \left (\sum_{j\ge a}\coeff{\vx|y^j}(f_w)y^{j-a}\right)\cdot y^a\\ &=\sum_{\substack{i+j\ge a\\0\le i,j<a}}\coeff{\vx|y^i}(f_u)\coeff{\vx|y^j}(f_w) y^{i+j-a} +\sum_{\substack{0\le i<a\\ j\ge a}}\coeff{\vx|y^i}(f_u)\coeff{\vx|y^j}(f_w) y^{i+j-a}\\ &\hspace{.2in}+\sum_{\substack{i\ge a\\ 0\le j<a}}\coeff{\vx|y^i}(f_u)\coeff{\vx|y^j}(f_w) y^{i+j-a} +\sum_{i,j\ge a}\coeff{\vx|y^i}(f_u)\coeff{\vx|y^j}(f_w) y^{i+j-a}\\ &=\sum_{i+j\ge a}\coeff{\vx|y^i}(f_u)\coeff{\vx|y^j}(f_w)\cdot y^{i+j-a}\\ &=\sum_{\ell\ge a}\coeff{\vx|y^\ell}(f_u \cdot f_w)\cdot y^{\ell-a}\\ &=\sum_{\ell\ge a}\coeff{\vx|y^\ell}(f_v)\cdot y^{\ell-a} \;. \qedhere \end{align*} \end{itemize} \end{subproof} The correctness then follows by examining $v_\mathrm{out}$, the output gate of $\Phi$, so that $f_{v_\mathrm{out}}=f$. The gates $(v_\mathrm{out},0),\ldots,(v_\mathrm{out},a)$ are then outputs of $\Psi$ and by the above subclaim have the desired functionality. \uline{quotient:} The claim about the quotient $\nicefrac{f(\vx,y)}{y^a}$ follows from seeing that if the quotient is a polynomial then $\nicefrac{f(\vx,y)}{y^a}=\sum_{i\ge a} f_i(\vx) y^{i-a}$ which is one of the outputs of the constructed circuit. \end{proof} We now give our simulation of general IPS by linear-IPS\@. In the below set of axioms we do not separate out the boolean axioms from the rest, as this simplifies notation. \begin{proposition}\label{res:h-ips_v_ips} Let $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_n]$ be unsatisfiable polynomials with an IPS refutation $C\in\mathbb{F}[\vx,y_1,\ldots,y_m]$. Then $f_1,\ldots,f_m$ have a linear-IPS refutation $C'\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ under the following conditions. \begin{enumerate} \item Suppose $f_1,\ldots,f_m,C$ are computed by size-$s$ formulas, have degree at most $d$, and $|\mathbb{F}|\ge d+1$. Then $C'$ is computable by a $\poly(s,d,m)$-size formula of depth-$O(D)$, and $C'$ is $\poly(s,d,m)$-explicit given $d$ and the formulas for $f_1,\ldots,f_m,C$. \label{res:h-ips_v_ips:formula} \item Suppose $f_1,\ldots,f_m,C$ are computed by size-$s$ circuits. Then $C'$ is computable by a $\poly(s,m)$-size circuit, and $C'$ is $\poly(s,m)$-explicit given the circuits for $f_1,\ldots,f_m,C$. \label{res:h-ips_v_ips:circuit} \end{enumerate} \end{proposition} \begin{proof} Express $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})$ as a polynomial in $\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$, so that $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}>{\vec{0}}} C_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{}$, where we use that $C(\vx,{\vec{0}})=0$ to see that we can restrict ${\vec{a}}\@ifnextchar{^}{\!\:}{}$ to ${\vec{a}}\@ifnextchar{^}{\!\:}{}>{\vec{0}}$. Partitioning the ${\vec{a}}\@ifnextchar{^}{\!\:}{}\in\mathbb{N}^n$ based on the index of their first nonzero value, and denoting ${\vec{a}}\@ifnextchar{^}{\!\:}{}_{<i}$ for the first $i-1$ coordinates of ${\vec{a}}\@ifnextchar{^}{\!\:}{}$, we obtain \begin{align*} C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}) &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}>{\vec{0}}} C_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{}\\ &=\sum_{i=1}^n\; \sum_{\substack{{\vec{a}}\@ifnextchar{^}{\!\:}{}: {\vec{a}}\@ifnextchar{^}{\!\:}{}_{<i}={\vec{0}},\\ a_i>0}} C_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{} \;. \intertext{Now define $C_i(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}):=\sum_{\substack{{\vec{a}}\@ifnextchar{^}{\!\:}{}: {\vec{a}}\@ifnextchar{^}{\!\:}{}_{<i}={\vec{0}},\\ a_i>0}} C_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{e}}\@ifnextchar{^}{\!\:}{}_i}$, where ${\vec{e}}\@ifnextchar{^}{\!\:}{}_i$ is the $i$-th standard basis vector. Note that this is a valid polynomial as in this summation we assume $a_i>0$ so that ${\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{e}}\@ifnextchar{^}{\!\:}{}_i\ge {\vec{0}}$. Thus,} C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}) &=\sum_{i=1}^n C_i(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})y_i \;. \end{align*} We now define $C'(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}):=\sum_{i=1}^n C_i(\vx,{\vec{f}}(\vx))y_i$ and claim it is the desired linear-IPS refutation, where note that we have only \emph{partially} substituted in the $f_i$ for the $y_i$. First, observe that it is a valid refutation, as $C'(\vx,{\vec{0}})=\sum_{i=1}^n C_i(\vx,{\vec{f}}(\vx))\cdot 0=0$, and $C'(\vx,{\vec{f}}(\vx))=\sum_{i=1}^n C_i(\vx,{\vec{f}}(\vx))f_i(\vx)=C(\vx,{\vec{f}}(\vx))=1$ via the above equation and using that $C$ is a valid IPS refutation. We now argue that $C'$ can be efficiently computed in the two above regimes. \uline{\eqref{res:h-ips_v_ips:formula}:} Up to constant-loss in the depth and polynomial-loss in the size, for bounding the complexity of $C'$ it suffices to bound the complexity of each $C_i(\vx,{\vec{f}}(\vx))$. First, note that \begin{align*} C_i(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})y_i =\sum_{\substack{{\vec{a}}\@ifnextchar{^}{\!\:}{}: {\vec{a}}\@ifnextchar{^}{\!\:}{}_{<i}={\vec{0}},\\ a_i>0}} C_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{} =C(\vx,{\vec{0}},y_i,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i})-C(\vx,{\vec{0}},0,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i}) \;, \end{align*} where each ``${\vec{0}}$'' here is a vector of $i-1$ zeros. Clearly each of $C(\vx,{\vec{0}},y_i,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i})$ and $C(\vx,{\vec{0}},0,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i})$ have formula size and depth bounded by that of $C$. From our division lemma for formulas (\autoref{res:divide-by-y:black-box}) it follows that $C_i(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})=\frac{1}{y_i}(C(\vx,{\vec{0}},y_i,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i})-C(\vx,{\vec{0}},0,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i}))$ has a $\poly(s,d)$-size depth-$O(D)$ formula of the desired explicitness (as $\deg_y \left(C(\vx,{\vec{0}},y_i,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i})-C(\vx,{\vec{0}},0,{\vec{y}}\@ifnextchar{^}{\!\:}{}_{> i})\right)\le \deg_y C\le d\le |\mathbb{F}|-1$, so that $\mathbb{F}$ is large enough). We replace ${\vec{y}}\@ifnextchar{^}{\!\:}{}\leftarrow {\vec{f}}(\vx)$ to obtain $C_i(\vx,{\vec{f}}(\vx))$ of the desired size and explicitness, using that the $f_j$ themselves have small-depth formulas. \uline{\eqref{res:h-ips_v_ips:circuit}:} This follows as in \eqref{res:h-ips_v_ips:formula}, using now the division lemma for circuits (\autoref{res:divide-by-y:white-box}). \end{proof} Grochow and Pitassi~\cite[Open Question 1.13]{GrochowPitassi14} asked whether one can relate the complexity of IPS and linear-IPS, as they only established such relations for simulating $\ensuremath{\sum\prod}\xspace$-IPS by (general) linear-IPS\@. Our above result essentially answers this question for general formulas and circuits, at least under the assumption that the unsatisfiable polynomial system $f_1=\cdots=f_m=0$ can be written using small algebraic formulas or circuits. This is a reasonable assumption as it is the most common regime for proof complexity. However, the above result does not fully close the question of Grochow-Pitassi~\cite{GrochowPitassi14} with respect to simulating $\mathcal{C}$-IPS by $\mathcal{D}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace for various restricted subclasses $\mathcal{C},\mathcal{D}$ of algebraic computation. That is, for such a simulation our result requires $\mathcal{D}$ to at the very least contain $\mathcal{C}$ composed with the axioms $f_1,\ldots,f_m$, and the when applying this to the models considered in this paper (sparse polynomials, depth-3 powering formulas, roABPs, multilinear formulas) this seems to non-negligibly increase the complexity of the algebraic reasoning. \subsection{Multilinearizing roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace}\label{sec:multilinearization:roABP} We now exhibit instances where one can efficiently \emph{prove} that a polynomial equals its multilinearization modulo the boolean axioms. That is, for a polynomial $f$ computed by a small circuit we wish to prove that $f\equiv \operatorname{ml}(f)\mod \vx^2-\vx$ by expressing $f-\operatorname{ml}(f)=\sum_i h_i \cdot (x_i^2-x_i)$ so that the $h_i$ also have small circuits. Such a result will simplify the search for linear-IPS refutations by allowing us to focus on the non-boolean axioms. That is, if we are able to find a refutation of ${\vec{f}},\vx^2-\vx$ given by \[ \sum_j g_j f_j \equiv 1 \mod \vx^2-\vx \;, \] where the $g_j$ have small circuits, multilinearization results of the above form guarantee that there are $h_i$ so that \[ \sum_j g_j f_j +\sum_i h_i\cdot (x_i^2-x_i)=1 \;, \] which is a proper linear-IPS refutation. We establish such a multilinearization result when $f$ is an roABP in this section, and consider when $f$ the product of a low-degree multilinear polynomial and a multilinear formula in the next section. We will use these multilinearization results in our construction of IPS refutations of the subset-sum axiom (\autoref{sec:subset:ub}). We begin by noting that multilinearization for these two circuit classes is rather special, as these classes straddle the conflicting requirements of neither being \emph{too weak} nor \emph{too strong}. That is, some circuit classes are simply too weak to compute their multilinearizations. An example is the class of depth-3 powering formulas, where $(x_1+\cdots+x_n)^n$ has a small $\ensuremath{\sum\pow\sum}\xspace$ formula, but its multilinearization has the leading term $n!x_1\cdots x_n$ and thus requires exponential size as a $\ensuremath{\sum\pow\sum}\xspace$ formula (by appealing to \autoref{res:lbs-mult:LM:sumpowsum}). On the other hand, some circuit classes are too strong to admit efficient multilinearization (under plausible complexity assumptions). That is, consider an $n \times n$ symbolic matrix $X$ where $(X)_{i,j}=x_{i,j}$ and the polynomial $f(X,{\vec{y}}\@ifnextchar{^}{\!\:}{}):= (x_{1,1} y_1+\cdots +x_{1,n}y_n)\cdots (x_{n,1} y_1+\cdots +x_{n,n}y_n)$, which is clearly a simple depth-3 ($\prod\sum\prod$) circuit. Viewing this polynomial in $\mathbb{F}[X][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$, one sees that $\coeff{X|y_1\cdots y_n} f=\perm(X)$, where $\perm(X)$ is the $n\times n$ permanent. Viewing $\operatorname{ml}(f)$, the multilinearization of $f$, in $\mathbb{F}[X][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ one sees that $\operatorname{ml}(f)$ is of degree $n$ and its degree $n$ component is the coefficient of $y_1\cdots y_n$ in $\operatorname{ml}(f)$, which is still $\perm(X)$. Hence, by interpolation, one can extract this degree $n$ part and thus can compute a circuit for $\perm(X)$ given a circuit for $\operatorname{ml}(f)$. Since we believe $\perm(X)$ does not have small algebraic circuits it follows that the multilinearization of $f$ does not have small circuits. These examples show that efficient multilinearization is a somewhat special phenomenon. We now give our result for multilinearizing roABPs, where we multilinearize variable by variable via telescoping. \begin{proposition}\label{res:multilin:roABP} Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be computable by a width-$r$ roABP in variable order $x_1<\cdots<x_n$, so that $f(\vx)=\left(\prod_{i=1}^n A_i(x_i)\right)_{1,1}$ where $A_i\in\mathbb{F}[x_i]^{r\times r}$ have $\deg A_i\le d$. Then $\operatorname{ml}(f)$ has a $\poly(r,n,d)$-explicit width-$r$ roABP in variable order $x_1<\cdots<x_n$, and there are $\poly(r,n,d)$-explicit width-$r$ roABPs $h_1,\ldots,h_n\in\mathbb{F}[\vx]$ in variable order $x_1<\cdots<x_n$ such that \[ f(\vx)=\operatorname{ml}(f)+\sum_{j=1}^n h_j\cdot (x_j^2-x_j) \;. \] Further, $\ideg h_j\le \ideg f$ and the individual degree of the roABP for $\operatorname{ml}(f)$ is $\le 1$. \end{proposition} \begin{proof} We apply the multilinearization map $\operatorname{ml}:\mathbb{F}[\vx]\to\mathbb{F}[\vx]$ to matrices $\operatorname{ml}:\mathbb{F}[\vx]^{r\times r}\to\mathbb{F}[\vx]^{r\times r}$ by applying the map entry-wise (\autoref{fact:multilinearization}). It follows then that $A_i(x_i)-\operatorname{ml}(A_i(x_i))\equiv 0\mod x_i^2-x_i$, so that $A_i(x_i)-\operatorname{ml}(A_i(x_i))=B(x_i)\cdot (x_i^2-x_i)$ for some $B_i(x_i)\in\mathbb{F}[x_i]^{r\times r}$ where $\ideg B_i(x_i)\le \ideg A_i(x_i)$. Now define $\operatorname{ml}_{\le i}$ be the map which multilinearizes the first $i$ variables and leaves the others intact, so that $\operatorname{ml}_{\le 0}$ is the identity map and $\operatorname{ml}_{\le n}=\operatorname{ml}$. Telescoping, \begin{align*} \prod_{i=1}^n A_i(x_i) &=\operatorname{ml}_{<1}\left(\prod_{i=1}^n A_i(x_i)\right)\\ &=\operatorname{ml}_{\le n}\left(\prod_{i=1}^n A_i(x_i)\right)+\sum_{j=1}^{n} \left[\operatorname{ml}_{<j}\left(\prod_{i=1}^n A_i(x_i)\right)-\operatorname{ml}_{\le j}\left(\prod_{i=1}^n A_i(x_i)\right)\right]\\ \intertext{using that the identity $\operatorname{ml}(gh)=\operatorname{ml}(\operatorname{ml}(g)\operatorname{ml}(h))$ (\autoref{fact:multilinearization}) naturally extends from scalars to matrices, and also to partial-multilinearization (by viewing $\operatorname{ml}_{\le i}$ as multilinearization in $\mathbb{F}[\vx_{>i}][\vx_{\le i}]$),} &=\operatorname{ml}_{\le n}\left(\prod_{i=1}^n \operatorname{ml}_{\le n} A_i(x_i)\right)+\sum_{j=1}^{n} \left[\operatorname{ml}_{<j}\left(\prod_{i< j} \operatorname{ml}_{<j}(A_i(x_i))\prod_{i\ge j} A_i(x_i)\right)\right.\\ &\hspace{2in}\left.-\operatorname{ml}_{\le j}\left(\prod_{i\le j} \operatorname{ml}_{\le j}(A_i(x_i))\prod_{i>j} A_i(x_i)\right)\right]\\ \intertext{dropping the outside $\operatorname{ml}_{<j}$ and $\operatorname{ml}_{\le j}$ as the inside polynomials are now multilinear in the appropriate variables, and replacing them with $\operatorname{ml}$ as appropriate,} &=\prod_{i=1}^n \operatorname{ml}(A_i(x_i))+\sum_{j=1}^{n} \left[\prod_{i<j} \operatorname{ml}(A_i(x_i))\prod_{i\ge j} A_i(x_i)\right.\\ &\hspace{2in}\left.-\prod_{i\le j} \operatorname{ml}(A_i(x_i))\prod_{i>j} A_i(x_i)\right]\\ &=\prod_{i=1}^n \operatorname{ml}(A_i(x_i))+\sum_{j=1}^{n} \left[\prod_{i<j} \operatorname{ml}(A_i(x_i))\cdot \Big(A_j(x_j)-\operatorname{ml}(A_j(x_j))\Big)\cdot\prod_{i>j} A_i(x_i)\right]\\ &=\prod_{i=1}^n \operatorname{ml}(A_i(x_i))+\sum_{j=1}^{n} \left[\prod_{i<j} \operatorname{ml}(A_i(x_i))\cdot B_j(x_j)\cdot \prod_{i>j} A_i(x_i)\cdot (x_j^2-x_j)\right] \;. \end{align*} Taking the $(1,1)$-entry in the above yields that \begin{align*} f(\vx) &=\left(\prod_{i=1}^n A_i(x_i)\right)_{1,1}\\ &=\left(\prod_{i=1}^n \operatorname{ml}(A_i(x_i))\right)_{1,1}+\sum_{j=1}^{n} \left(\prod_{i<j} \operatorname{ml}(A_i(x_i))\cdot B_j(x_j)\cdot \prod_{i>j} A_i(x_i)\right)_{1,1}\cdot (x_j^2-x_j) \;. \end{align*} Thus, define \[ \hat{f}:= \left(\prod_{i=1}^n \operatorname{ml}(A_i(x_i))\right)_{1,1} \;, \qquad h_j := \left(\prod_{i<j} \operatorname{ml}(A_i(x_i))\cdot B_j(x_j)\cdot\prod_{i>j} A_i(x_i)\right)_{1,1} \;. \] It follows by construction that $\hat{f}$ and each $h_j$ are computable by width-$r$ roABPs of the desired explicitness in the correct variable order. Further, $\ideg h_j\le \ideg f$ and $\hat{f}$ has individual degree $\le 1$. Thus, the above yields that $f=\hat{f}+\sum_j h_j\cdot (x_j^2-x_j)$, from which it follows that $\operatorname{ml}(f)=\hat{f}$, as desired. \end{proof} We now conclude that in designing an roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation $\sum_j g_j\cdot f_j+\sum_i h_i\cdot (x_i^2-x_i)$ of $f_1(\vx),\ldots,f_m(\vx),\vx^2-\vx$, it suffices to bound the complexity of the $g_j$'s. \begin{proposition}\label{res:multilin:roABP-lIPS} Let $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_n]$ be unsatisfiable polynomials over $\vx\in\ensuremath{\{0,1\}}^n$ computable by width-$s$ roABPs in variable order $x_1<\cdots<x_n$. Suppose that there are $g_j\in\mathbb{F}[\vx]$ such that \[ \sum_{i=1}^m g_j(\vx)f_j(\vx)\equiv 1\mod\vx^2-\vx \;, \] where the $g_j$ have width-$r$ roABPs in the variable order $x_1<\cdots<x_n$. Then there is an roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})$ of individual degree at most $1+\ideg {\vec{f}}$ and computable in width-$\poly(s,r,n,m)$ in any variable order where $x_1<\cdots<x_n$. Furthermore, this refutation is $\poly(s,r,\ideg {\vec{g}}\@ifnextchar{^}{\!\:}{},\ideg {\vec{f}},n,m)$-explicit given the roABPs for $f_j$ and $g_j$. \end{proposition} \begin{proof} We begin by noting that we can multilinearize the $g_j$, so that $\sum_{i=1}^m \operatorname{ml}(g_j(\vx))f_j(\vx)\equiv 1\mod\vx^2-\vx$, and that $\operatorname{ml}(g_j)$ are $\poly(r,\ideg {\vec{g}}\@ifnextchar{^}{\!\:}{},n,m)$-explicit multilinear roABPs of width-$r$ by \autoref{res:multilin:roABP}. Thus, we assume going forward that the $g_j$ are multilinear. As $g_j,f_j$ are computable by roABPs, their product $g_jf_j$ is computable by a width-$rs$ roABP in the variable order $x_1<\cdots<x_n$ (\autoref{fact:roABP:closure}) with individual degree at most $1+\ideg f_j$ (\autoref{res:roABP-normal-form}). Thus, by the above multilinearization (\autoref{res:multilin:roABP}), there are $h_{j,i}\in\mathbb{F}[\vx]$ such that \[ g_j(\vx)f_j(\vx)=\operatorname{ml}(g_jf_j)+\sum_{i=1}^n h_{j,i}(\vx)\cdot (x_i^2-x_i) \;. \] where the $h_{j,i}$ are computable by width-$rs$ roABPs of individual degree at most $1+\ideg f_j$. We now define \[ C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}):= \sum_{j=1}^m g_j(\vx)y_j - \sum_{i=1}^n\left(\sum_{j=1}^m h_{j,i}(\vx)\right) z_i \;. \] By the closure operations of roABPs (\autoref{fact:roABP:closure}) it follows that $C$ is computable the appropriately-sized roABPs in the desired variable orders, has the desired individual degree, and that $C$ has the desired explicitness. We now show that this is a valid IPS refutation. Observe that $C(\vx,{\vec{0}},{\vec{0}})=0$ and that \begin{align} C(\vx,{\vec{f}},\vx^2-\vx) &=\sum_{j=1}^m g_j(\vx)f_j(\vx) - \sum_{i=1}^n\left(\sum_{j=1}^m h_{j,i}(\vx)\right) (x_i^2-x_i)\\ &=\sum_{j=1}^m \left( g_j(\vx)f_j(\vx) - \sum_{i=1}^n h_{j,i}(\vx) (x_i^2-x_i)\right)\\ &=\sum_{j=1}^m \operatorname{ml}(g_jf_j)\\ \intertext{as $\sum_{i=1}^m g_j(\vx)f_j(\vx)\equiv 1\mod \vx^2-\vx$ we have that \[ \sum_{j=1}^m \operatorname{ml}(g_jf_j) = \operatorname{ml}\left(\sum_{i=1}^m g_j(\vx)f_j(\vx)\right)=1 \;, \] where we appealed to linearity of multilinearization (\autoref{fact:multilinearization}), so that } C(\vx,{\vec{f}},\vx^2-\vx) &=\sum_{j=1}^m \operatorname{ml}(g_jf_j) =1 \;, \end{align} as desired. \end{proof} \subsection{Multilinear-Formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'}}\label{sec:multilinearization:mult-form} We now turn to proving that $g\cdot f\equiv \operatorname{ml}(g\cdot f) \mod \vx^2-\vx$ when $f$ is low-degree and $g$ is a multilinear formula. This multilinearization can be used to complete our construction of multilinear-formula-IPS refutations of subset-sum axiom (\autoref{sec:subset:ub}), though our actual construction will multilinearize more directly (\autoref{res:ips-ubs:subset:mult-form}). More importantly, the multilinearization we establish here shows that multilinear-formula-IPS can efficiently simulate sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (when the axioms are low-degree and multilinear). Such a simulation holds intuitively, as multilinear formulas can efficiently compute any sparse (multilinear) polynomial, and as we work over the boolean cube we are morally working with multilinear polynomials. While this intuition suggests that such a simulation follows immediately, this intuition is false. Specifically, while sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace is a complete refutation system for any system of unsatisfiable polynomials over the boolean cube, multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace is \emph{incomplete} as seen by the following example (though, by \autoref{thm:GrochowPitassi14}, multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace \emph{is} complete for refuting unsatisfiable CNFs). \begin{example}\label{ex:multi-form:incomplete} Consider the unsatisfiable system of equations $xy+1,x^2-x,y^2-y$. A multilinear linear-IPS proof is a tuple of multilinear polynomials $(f,g,h)\in\mathbb{F}[x,y]$ such that $f\cdot (xy+1)+g\cdot (x^2-x)+h\cdot (y^2-y)=1$. In particular, $f(x,y)=\frac{1}{xy+1}$ for $x,y\in\ensuremath{\{0,1\}}$, which implies by interpolation over the boolean cube that $f(x,y)=1\cdot (1-x)(1-y)+1\cdot (1-x)y+1\cdot x(1-y)+\frac{1}{2} \cdot xy=1-\frac{1}{2}\cdot xy$. Thus $f\cdot (xy+1)$ contains the monomial $x^2y^2$. However, as $g,h$ are multilinear we see that $x^2y^2$ cannot appear in $g\cdot (x^2-x)+h\cdot (y^2-y)-1$, so that the equality $f\cdot (xy+1)+g\cdot (x^2-x)+h\cdot (y^2-y)=1$ cannot hold. Thus, $xy+1,x^2-x,y^2-y$ has no linear-IPS refutation only using multilinear polynomials. \end{example} Put another way, the above example shows that in a linear-IPS refutation $\sum_j g_j f_j+\sum_i h_i\cdot (x_i^2-x_i)=1$, while one can multilinearize the $g_j$ (with a possible increase in complexity) and still retain a refutation, one cannot multilinearize the $h_i$ in general. As such, to simulate sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (a complete proof system) we must resort to using the more general \texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} over multilinear formulas, where recall that the \texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation system considers refutes ${\vec{f}},\vx^2-\vx$ with a polynomial $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})$ where $C(\vx,{\vec{0}},{\vec{0}})=0$, $C(\vx,{\vec{f}},\vx^2-\vx)=1$, with the added restriction that when viewing $C\in\mathbb{F}[\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{}][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ that the degree of $C$ with respect to the ${\vec{y}}\@ifnextchar{^}{\!\:}{}$-variables is at most 1, that is, $\deg_{\vec{y}}\@ifnextchar{^}{\!\:}{} C\le 1$. In fact, we in fact establish such a simulation using the subclass of refutations of the form $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})=\sum_j g_j y_j+C'(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})$ where $C'(\vx,{\vec{0}})=0$. Note that such refutations are only linear in the \emph{non}-boolean axioms, which allows us to circumvent \autoref{ex:multi-form:incomplete}. We now show how to prove $g\cdot f\equiv \operatorname{ml}(g\cdot f) \mod \vx^2-\vx$ when $f$ is low-degree and $g$ is a multilinear formula, where the proof is supplied by the equality $g\cdot f-\operatorname{ml}(g\cdot f)=C(\vx,\vx^2-\vx)$ where $C(\vx,{\vec{0}})=0$, and where we seek to show that $C$ has a small multilinear formula. We begin with the special case of $f$ and $g$ being the same monomial. \begin{lemmawp}\label{res:multilin:mon} Let $\vx^{\vec{1}}=\prod_{i=1}^n x_i$. Then, \[ (\vx^{{\vec{1}}})^2-\vx^{{\vec{1}}} =C(\vx,\vx^2-\vx) \;, \] where $C(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})\in\mathbb{F}[\vx,z_1,\ldots,z_n]$ is defined by \[ C(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{}) := ({\vec{z}}\@ifnextchar{^}{\!\:}{}+\vx)^{\vec{1}}-\vx^{\vec{1}} =\sum_{{\vec{0}}<{\vec{a}}\@ifnextchar{^}{\!\:}{}\le {\vec{1}}} {\vec{z}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{}\vx^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}} \;, \] so that $C(\vx,{\vec{0}})=0$. \end{lemmawp} Note that the first expression for $C$ is a $\poly(n)$-sized depth-3 expression, while the second is an $\exp(n)$-sized depth-2 expression. This difference will, going forward, show that we can multilinearize efficiently in depth-3, but can only efficiently multilinearize \emph{low-degree} monomials in depth-2. We now give an IPS proof for showing how a monomial times a multilinear formula equals its multilinearization. \begin{lemma}\label{res:multilin:mon_formula} Let $g\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_d]$ be a multilinear polynomial. Then there is a $C\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},z_1,\ldots,z_d]$ such that \[ g(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})\cdot {\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}-\operatorname{ml}(g(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})\cdot {\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}) =C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}) \;, \] and $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{0}})=0$. If $g$ is $t$-sparse, then $C$ is computable as a $\poly(t,n,2^d)$-size depth-2 multilinear formula (which is $\poly(t,n,2^d)$-explicit given the computation for $g$), as well as being computable by a $\poly(t,n,d)$-size depth-3 multilinear formula with a $+$-output-gate (which is $\poly(t,n,d)$-explicit given the computation for $g$). If $g$ is computable by a size-$t$ depth-$D$ multilinear formula, then $C$ is computable by a $\poly(t,2^d)$-size depth-$(D+2)$ multilinear formula with a $+$-output-gate (which is $\poly(t,2^d)$-explicit given the computation for $g$). \end{lemma} \begin{proof} \uline{defining $C$:} Express $g$ as $g=\sum_{{\vec{0}}\le{\vec{a}}\@ifnextchar{^}{\!\:}{}\le{\vec{1}}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ in the ring $\mathbb{F}[\vx][{\vec{y}}\@ifnextchar{^}{\!\:}{}]$, so that each $g_{\vec{a}}\@ifnextchar{^}{\!\:}{}$ is multilinear. Then \begin{align*} g(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})\cdot {\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}-\operatorname{ml}(g(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})\cdot {\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}) &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{} \cdot {\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}-\operatorname{ml}\left(\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{}\cdot {\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}\right)\\ &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx)\left({\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{1}}}-{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}}\right) =\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}\left(({\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{})^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\right) \;, \intertext{and appealing to \autoref{res:multilin:mon},} &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}\left((({\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{})+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{a}}\@ifnextchar{^}{\!\:}{}\right)\\ &=C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}) \;, \end{align*} where we define \[ C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}):= \sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}\left(({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\right) \;. \] As $({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{}={\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}}$ under ${\vec{z}}\@ifnextchar{^}{\!\:}{}\leftarrow{\vec{0}}$ we have that $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{0}})=0$. \uline{$g$ is $t$-sparse:} As $g$ is $t$-sparse and multilinear, so are each $g_{\vec{a}}\@ifnextchar{^}{\!\:}{}$, so that $g_{\vec{a}}\@ifnextchar{^}{\!\:}{}=\sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}$, and thus \begin{align*} C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}) &=\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}\left(({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\right)\\ &=\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{} -\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}\;, \intertext{where this is clearly an explicit depth-3 ($\sum\prod\sum$) multilinear formula (as ${\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}$ is variable-disjoint from $({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{}$), and the size of this formula is $\poly(n,t,d)$ as there are at most $t$ such ${\vec{a}}\@ifnextchar{^}{\!\:}{}$ where $g_{\vec{a}}\@ifnextchar{^}{\!\:}{}\ne 0$ as $g$ is $t$-sparse. Continuing the expansion, appealing to \autoref{res:multilin:mon},} &=\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}\sum_{0\le {\vec{b}}\@ifnextchar{^}{\!\:}{}\le {\vec{a}}\@ifnextchar{^}{\!\:}{}}{\vec{z}}\@ifnextchar{^}{\!\:}{}^{{\vec{b}}\@ifnextchar{^}{\!\:}{}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{b}}\@ifnextchar{^}{\!\:}{}} -\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}\\ &=\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}\sum_{{\vec{0}}<{\vec{b}}\@ifnextchar{^}{\!\:}{}\le {\vec{a}}\@ifnextchar{^}{\!\:}{}}{\vec{z}}\@ifnextchar{^}{\!\:}{}^{{\vec{b}}\@ifnextchar{^}{\!\:}{}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{b}}\@ifnextchar{^}{\!\:}{}}\\ &=\sum_{\vec{a}}\@ifnextchar{^}{\!\:}{} \sum_{i=1}^t \sum_{{\vec{0}}<{\vec{b}}\@ifnextchar{^}{\!\:}{}\le {\vec{a}}\@ifnextchar{^}{\!\:}{}}\alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},i}}{\vec{z}}\@ifnextchar{^}{\!\:}{}^{{\vec{b}}\@ifnextchar{^}{\!\:}{}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{b}}\@ifnextchar{^}{\!\:}{}} \;, \end{align*} which is then easily seen to be explicit and $\poly(n,t,2^d)$-sparse appealing to the above logic. \uline{$g$ a multilinear formula:} By interpolation, it follows that for each ${\vec{a}}\@ifnextchar{^}{\!\:}{}$ there are $\poly(2^d)$-explicit constants ${\vec{\alpha}}_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{\beta}}}$ such that $g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx)=\sum_{{\vec{\beta}}\in\ensuremath{\{0,1\}}^d} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{\beta}}}g(\vx,{\vec{\beta}})$. From this it follows that $g_{\vec{a}}\@ifnextchar{^}{\!\:}{}$ is computable by a depth $D+1$ multilinear formula of size $\poly(t,2^d)$. Expanding the definition of $C$ we get that \begin{align*} C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}) &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}\left(({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{}-{\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\right)\\ &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{} -\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} g_{\vec{a}}\@ifnextchar{^}{\!\:}{}(\vx){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}}\\ &=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} \sum_{{\vec{\beta}}\in\ensuremath{\{0,1\}}^d} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{\beta}}}g(\vx,{\vec{\beta}}){\vec{y}}\@ifnextchar{^}{\!\:}{}^{{\vec{1}}-{\vec{a}}\@ifnextchar{^}{\!\:}{}}({\vec{z}}\@ifnextchar{^}{\!\:}{}+{\vec{y}}\@ifnextchar{^}{\!\:}{})^{\vec{a}}\@ifnextchar{^}{\!\:}{} -\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} \sum_{{\vec{\beta}}\in\ensuremath{\{0,1\}}^d} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{\beta}}}g(\vx,{\vec{\beta}}){\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{1}} \;, \end{align*} which is clearly an explicit depth $D+2$ multilinear formula of size $\poly(t,2^d)$, as $D\ge 1$ so that the computation of the $z_i+y_i$ is parallelized with computing $g(\vx,{\vec{\beta}})$, and we absorb the subtraction into the overall top-gate of addition. \end{proof} We can then straightforwardly extend this to multilinearizing the product of a low-degree sparse multilinear polynomial and a multilinear formula, as we can use that multilinearization is linear. \begin{corollarywp}\label{res:multilin:sparse_formula} Let $g\in\mathbb{F}[x_1,\ldots,x_n]$ be a multilinear polynomial and $f\in\mathbb{F}[\vx]$ a $s$-sparse multilinear polynomial of degree $\le d$. Then there is a $C\in\mathbb{F}[\vx,z_1,\ldots,z_n]$ such that \[ g\cdot f-\operatorname{ml}(g\cdot f) =C(\vx,\vx^2-\vx) \;, \] and $C(\vx,{\vec{0}})=0$. If $g$ is $t$-sparse, then $C$ is computable as a $\poly(s,t,n,2^d)$-size depth-2 multilinear formula (which is $\poly(s,t,n,2^d)$-explicit given the computations for $f,g$), as well as being computable by a $\poly(s,t,n,d)$-size depth-3 multilinear formula with a $+$-output-gate (which is $\poly(s,t,n,d)$-explicit given the computations for $f,g$). If $g$ is computable by a size-$t$ depth-$D$ multilinear formula, then $C$ is computable by a $\poly(s,t,2^d)$-size depth-$(D+2)$ multilinear formula with a $+$-output-gate (which is $\poly(s,t,2^d)$-explicit given the computations for $f,g$). \end{corollarywp} We now show how to derive multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutations for ${\vec{f}},\vx^2-\vx$ from equations of the form $\sum_j g_jf_j\equiv 1\mod\vx^2-\vx$. \begin{corollary}\label{res:multilin:multilin-lbIPS} Let $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_n]$ be degree at most $d$ multilinear $s$-sparse polynomials which are unsatisfiable over $\vx\in\ensuremath{\{0,1\}}^n$. Suppose that there are multilinear $g_j\in\mathbb{F}[\vx]$ such that \[ \sum_{i=1}^m g_j(\vx)f_j(\vx)\equiv 1\mod\vx^2-\vx \;. \] Then there is a multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})$ such that \begin{itemize} \item If the $g_j$ are $t$-sparse, then $C$ is computable by a $\poly(s,t,n,m,2^d)$-size depth-2 multilinear formula (which is $\poly(s,t,n,m,2^d)$-explicit given the computations for the $f_j,g_j$), as well as being computable by a $\poly(s,t,n,m,d)$-size depth-3 multilinear formula (which is $\poly(s,t,n,m,d)$-explicit given the computations for $f_j,g_j$). \item If the $g_j$ are computable by size-$t$ depth-$D$ multilinear formula, then $C$ is computable by a $\poly(s,t,m,2^d)$-size depth-$(D+2)$ multilinear formula (which is $\poly(s,t,m,2^d)$-explicit given the computations for $f_j,g_j$). \end{itemize} \end{corollary} \begin{proof} \uline{construction:} By the above multilinearization (\autoref{res:multilin:sparse_formula}), there are $C_j\in\mathbb{F}[\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{}]$ such that \[ g_j(\vx)f_j(\vx)=\operatorname{ml}(g_jf_j)+C_j(\vx,\vx^2-\vx) \;. \] where $C_j(\vx,{\vec{0}})=0$. We now define \[ C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}):= \sum_{j=1}^m \left (g_j(\vx)y_j - C_j(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})\right) \;. \] We now show that this is a valid IPS refutation. Observe that $C(\vx,{\vec{0}},{\vec{0}})=0$ and that \begin{align*} C(\vx,{\vec{f}},\vx^2-\vx) &=\sum_{j=1}^m \left (g_j(\vx)f_j(\vx) - C_j(\vx,\vx^2-\vx)\right)\\\ &=\sum_{j=1}^m \operatorname{ml}(g_jf_j)\\ \intertext{as $\sum_{i=1}^m g_j(\vx)f_j(\vx)\equiv 1\mod \vx^2-\vx$ we have that \[ \sum_{j=1}^m \operatorname{ml}(g_jf_j) = \operatorname{ml}\left(\sum_{i=1}^m g_j(\vx)f_j(\vx)\right)=1 \;, \] where we appealed to linearity of multilinearization (\autoref{fact:multilinearization}), so that } C(\vx,{\vec{f}},\vx^2-\vx) &=\sum_{j=1}^m \operatorname{ml}(g_jf_j) =1 \;. \end{align*} \uline{complexity:} The claim now follows from appealing to \autoref{res:multilin:sparse_formula} for bounding the complexity of the $C_j$. That is, if the $g_j$ are $t$-sparse then $\sum_{j=1}^m g_j(\vx)y_j$ is $tm$-sparse and thus computable by a $\poly(t,m)$-size depth-2 multilinear formula with $+$-output-gate. As each $C_j$ is computable by a $\poly(s,t,n,2^d)$-size depth-2 or $\poly(s,t,n,d)$-size depth-3 multilinear formula (each having a $+$-output-gate), it follows that $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}):= \sum_{j=1}^m \left (g_j(\vx)y_j - C_j(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})\right)$ can be explicitly computed by a $\poly(s,t,n,m,2^d)$-size depth-2 or $\poly(s,t,n,m,d)$-size depth-3 multilinear formula (collapsing addition gates into a single level). If the $g_j$ are computable by size-$t$ depth-$D$ multilinear formula then $\sum_{j=1}^m g_j(\vx)y_j$ is computable by size $\poly(m,t)$-size depth-$(D+2)$ multilinear formula (with a $+$-output-gate), and each $C_j$ is computable by a $\poly(s,t,2^d)$-size depth-$(D+2)$ multilinear formula with a $+$-output-gate, from which it follows that $C(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}):= \sum_{j=1}^m \left (g_j(\vx)y_j - C_j(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})\right)$ can be explicitly computed by a $\poly(s,t,m,2^d)$-size depth-$(D+2)$ multilinear formula by collapsing addition gates. \end{proof} We now conclude by showing that multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} can efficiently simulate sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace when the axioms are low-degree. As this latter system is complete, this shows the former is as well. That is, we allow the refutation to depend non-linearly on the boolean axioms, but only linearly on the other axioms. \begin{corollary}\label{res:multilin:simulate-sparse} Let $f_1,\ldots,f_m\in\mathbb{F}[x_1,\ldots,x_n]$ be degree at most $d$ $s$-sparse polynomials unsatisfiable over $\vx\in\ensuremath{\{0,1\}}^n$. Suppose they have an $\ensuremath{\sum\prod}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation, that is, that there are $t$-sparse polynomials $g_1,\ldots,g_m,h_1,\ldots,h_n\in\mathbb{F}[\vx]$ such that $\sum_{j=1}^m g_j f_j+\sum_{i=1}^n h_i \cdot (x_i^2-x_i)=1$. Then ${\vec{f}},\vx^2-\vx$ can be refuted by a depth-2 multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} proof of $\poly(s,t,n,m,2^d)$-size, or by a depth-3 multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} proof of $\poly(s,t,n,m,d)$-size. \end{corollary} \begin{proof} This follows from \autoref{res:multilin:multilin-lbIPS} by noting that $\sum_j \operatorname{ml}(g_j)f_j\equiv 1\mod \vx^2-\vx$, and that the $\operatorname{ml}(g_j)$ are multilinear and $t$-sparse. \end{proof} \subsection{Refutations of the Subset-Sum Axiom}\label{sec:subset:ub} We now give efficient IPS refutations of the subset-sum axiom, where these IPS refutations can be even placed in the restricted roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace or multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace subclasses. That is, we give such refutations for whenever the polynomial $\sum_i \alpha_ix_i-\beta$ is unsatisfiable over the boolean cube $\ensuremath{\{0,1\}}^n$, where the size of the refutation is polynomial in the size of the set $A:=\{\sum_i \alpha_ix_i: \vx\in\ensuremath{\{0,1\}}^n\}$. A motivating example is when ${\vec{\alpha}}={\vec{1}}$ so that $A=\{0,\ldots,n\}$. To construct our refutations, we first show that there is an efficiently computable polynomial $f$ such that $f(\vx)\cdot (\sum_i \alpha_ix_i-\beta)\equiv 1\mod\vx^2-\vx$. This will be done by considering the univariate polynomial $p(t):=\prod_{\alpha\in A}(t-\alpha)$. Using that for any univariate $p(x)$ that $x-y$ divides $p(x)-p(y)$, we see that $p(\sum_i\alpha_ix_i)-p(\beta)$ is a multiple of $\sum_i \alpha_i x_i-\beta$. As $\sum_i \alpha_ix_i-\beta$ is unsatisfiable it must be that $\beta\notin A$. This implies that $p(\sum_i\alpha_ix_i)\equiv 0\mod\vx^2-\vx$ while $p(\beta)\ne 0$. Consequently, $p(\sum_i\alpha_ix_i)-p(\beta)$ is equivalent to a nonzero constant modulo $\vx^2-\vx$, yielding the Nullstellensatz refutation \[ \frac{1}{-p(\beta)}\cdot \frac{p(\sum_i\alpha_ix_i)-p(\beta)}{\sum_i \alpha_i x_i-\beta}\cdot ({\textstyle\sum}_i \alpha_i x_i-\beta)\equiv 1 \mod\vx^2-\vx \;. \] By understanding the quotient $\frac{p(\sum_i\alpha_ix_i)-p(\beta)}{\sum_i \alpha_i x_i-\beta}$ we see that it can be efficiently computed by a small $\ensuremath{\sum\pow\sum}\xspace$ formula and thus an roABP, so that using our multilinearization result for roABPs (\autoref{res:multilin:roABP}) this yields the desired roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation. However, this does not yield the desired multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation. For this, we need to (over a large field) convert the above quotient to a sum of products of univariates using duality (\autoref{res:sumpowsum:duality}). We can then multilinearize this to a sum of products of \emph{linear} univariates, which is a depth-3 multilinear formula. By appealing to our proof-of-multilinearization result for multilinear formula (\autoref{res:multilin:multilin-lbIPS}) one obtains a multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation, and we give a direct proof which actually yields the desired multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation. We briefly remark that for the special case of ${\vec{\alpha}}={\vec{1}}$, one can explicitly describe the unique multilinear polynomial $f$ such that $f(\vx)(\sum_i x_i-\beta)\equiv 1\mod\vx^2-\vx$. This description (\autoref{res:subsetsum:multlin}) shows that $f$ is a linear combination of elementary symmetric polynomials, which implies the desired complexity upper bounds for this case via known bounds on the complexity of elementary symmetric polynomials (\cite{NisanWigderson96}). However, this proof strategy is more technical and thus we pursue the more conceptual outline given above to bound the complexity of $f$ for general $A$. \begin{proposition}\label{res:ips-ubs:subset} Let ${\vec{\alpha}}\in\mathbb{F}^n$, $\beta\in\mathbb{F}$ and $A:=\{\sum_{i=1}^n \alpha_i x_i : \vx\in\ensuremath{\{0,1\}}^n\}$ be so that $\beta\notin A$. Then there is a multilinear polynomial $f\in\mathbb{F}[\vx]$ such that \[ f(\vx)\cdot \left({\textstyle\sum}_i \alpha_i x_i-\beta\right)\equiv 1\mod \vx^2-\vx \;. \] For any $|\mathbb{F}|$, $f$ is computable by a $\poly(|A|,n)$-explicit $\poly(|A|,n)$-width roABP of individual degree $\le 1$. If $|\mathbb{F}|\ge\poly(|A|,n)$, then $f$ is computable as a sum of product of linear univariates (and hence a depth-3 multilinear formula) \[ f(\vx)=\sum_{i=1}^s f_{i,1}(x_1)\cdots f_{i,n}(x_n) \;, \] where each $f_{i,j}\in\mathbb{F}[x_i]$ has $\deg f_{i,j}\le 1$, $s\le \poly(|A|,n)$, and this expression is $\poly(|A|,n)$-explicit. \end{proposition} \begin{proof} \uline{computing $A$:} We first note that $A$ can be computed from ${\vec{\alpha}}$ in $\poly(|A|,n)$-steps (as opposed to the naive $2^n$ steps). That is, define $A_j:=\{\sum_{i=1}^j \alpha_i x_i : x_1,\ldots,x_j\in\ensuremath{\{0,1\}}\}$, so that $A_0=\emptyset$ and $A_n=A$. It follows that for all $j$, we have that $A_j\subseteq A$ and thus $|A_j|\le |A|$, and that $A_{j+1}\subseteq A_j\cup (A_j+\alpha_j)$. It follows that we can compute $A_{j+1}$ from $A_j$ in $\poly(|A|)$ time, so that $A=A_n$ can be computed in $\poly(|A|,n)$-time. \uline{defining $f$:} Define $p(t)\in\mathbb{F}[t]$ by $p:=\prod_{\alpha\in A}(t-\alpha)$, so that $p(A)=0$ and $p(\beta)\ne 0$. Express $p(t)$ in its monomial representation as $p(t)=\sum_{k=0}^{|A|} \gamma_k t^k$, where the $\gamma_k$ can be computed in $\poly(|A|)$ time from ${\vec{\alpha}}$ by computing $A$ as above. Then observe that \begin{align*} p(t)-p(\beta) &=\left(\sum_{k=0}^{|A|} \gamma_k\frac{t^k-\beta^k}{t-\beta}\right)(t-\beta)\\ &=\left(\sum_{k=0}^{|A|} \gamma_k\sum_{j=0}^{k-1} t^{j}\beta^{(k-1)-j}\right)(t-\beta)\\ &=\left(\sum_{j=0}^{|A|-1}\left(\sum_{k=j+1}^{|A|} \gamma_k\beta^{(k-1)-j} \right)t^j\right)(t-\beta) \;. \end{align*} Thus, plugging in $t\leftarrow \sum_i \alpha_i x_i$, we can define the polynomial $g(\vx)\in\mathbb{F}[\vx]$ by \begin{align} g(\vx) &:=\frac{p(\sum_i \alpha_i x_i)-p(\beta)}{\sum_i \alpha_i x_i -\beta}\nonumber\\ &=\sum_{j=0}^{|A|-1}\left(\sum_{k=j+1}^{|A|} \gamma_k\beta^{(k-1)-j} \right) \left(\sum_i \alpha_i x_i\right)^j\label{eq:subset} \;. \end{align} Hence, \begin{align*} g(\vx) ({\textstyle\sum}_i \alpha_ix_i-\beta) &=p({\textstyle\sum}_i \alpha_i x_i)-p(\beta) \;. \end{align*} For any $\vx\in\ensuremath{\{0,1\}}^n$ we have that $\sum_i \alpha_i x_i\in A$. As $p(A)=0$ it follows that $p(\sum_i \alpha_i x_i)=0$ for all $\vx\in\ensuremath{\{0,1\}}^n$. This implies that $p(\sum_i \alpha_i x_i)\equiv 0 \mod \vx^2-\vx$, yielding \begin{align*} g(\vx) ({\textstyle\sum}_i \alpha_ix_i-\beta) &\equiv -p(\beta)\mod\vx^2-\vx \;. \end{align*} As $-p(\beta)\in\mathbb{F}\setminus\{0\}$, we have that \[ \frac{1}{-p(\beta)}\cdot g(\vx) \cdot \left({\textstyle\sum}_i \alpha_ix_i-\beta\right)\equiv 1 \mod \vx^2-\vx \;. \] We now simply multilinearize, and thus define the multilinear polynomial \[ f(\vx):= \operatorname{ml}\left(\frac{1}{-p(\beta)}\cdot g(\vx)\right) \;. \] First, we see that this has the desired form, using the interaction of multilinearization and multiplication (\autoref{fact:multilinearization}). \begin{align*} 1 &=\operatorname{ml}\left(\frac{1}{-p(\beta)} g(\vx) \cdot ({\textstyle\sum}_i \alpha_ix_i-\beta)\right)\\ &=\operatorname{ml}\left(\operatorname{ml}\left(\frac{1}{-p(\beta)}\cdot g(\vx)\right)\operatorname{ml}({\textstyle\sum}_i \alpha_ix_i-\beta)\right)\\ &=\operatorname{ml}\Big(f \cdot \operatorname{ml}({\textstyle\sum}_i \alpha_ix_i-\beta)\Big)\\ &=\operatorname{ml}\Big(f\cdot ({\textstyle\sum}_i \alpha_ix_i-\beta)\Big) \end{align*} Thus, $f\cdot ({\textstyle\sum}_i \alpha_ix_i-\beta)\equiv 1\mod\vx^2-\vx$ as desired. \uline{computing $f$ as an roABP:} By \autoref{eq:subset} we see that $g(\vx)$ is computable by a $\poly(|A|,n)$-size $\ensuremath{\sum\pow\sum}\xspace$-formula, and by the efficient simulation of $\ensuremath{\sum\pow\sum}\xspace$-formula by roABPs (\autoref{res:sumpowsum:roABP}) $g(\vx)$ and thus $\frac{1}{-p(\beta)}\cdot g(\vx)$ are computable by $\poly(|A|,n)$-width roABPs of $\poly(|A|,n)$-degree. Noting that roABPs can be efficiently multilinearized (\autoref{res:multilin:roABP}) we see that $f=\operatorname{ml}(\frac{1}{-p(\beta)}\cdot g(\vx))$ can thus be computed by such an roABP also, where the individual degree of this roABP is at most 1. Finally, note that each of these steps has the required explicitness. \uline{computing $f$ via duality:} We apply duality (\autoref{res:sumpowsum:duality}) to see that over large enough fields there are univariates $g_{j,\ell,i}$ of degree at most $|A|$, where \begin{align*} g(\vx) &=\sum_{j=0}^{|A|-1}\left(\sum_{k=j+1}^{|A|} \gamma_k\beta^{(k-1)-j} \right) \left(\sum_i \alpha_i x_i\right)^j\\ &=\sum_{j=0}^{|A|-1}\left(\sum_{k=j+1}^{|A|} \gamma_k\beta^{(k-1)-j} \right) \sum_{\ell=1}^{(nj+1)(j+1)}g_{j,\ell,1}(x_1)\cdots g_{j,\ell,n}(x_n)\\ \intertext{Absorbing the constant $\left(\sum_{k=j+1}^{|A|} \gamma_k\beta^{(k-1)-j} \right)$ into these univariates and re-indexing,} &=\sum_{i=1}^{s} g_{i,1}(x_1)\cdots g_{i,n}(x_n) \end{align*} for some univariates $g_{i,j}$, where $s\le |A|(n|A|+1)(|A|+1)=\poly(|A|,n)$. We now obtain $f$ by multilinearizing the above expression, again appealing to multilinearization (\autoref{fact:multilinearization}). \begin{align*} f &=\operatorname{ml}\left(\frac{1}{-p(\beta)} g(\vx)\right)\\ &=\operatorname{ml}\left(\frac{1}{-p(\beta)} \sum_{i=1}^{s} g_{i,1}(x_1)\cdots g_{i,n}(x_n)\right)\\ \intertext{absorbing the constant $\nicefrac{1}{-p(\beta)}$ and renaming,} &=\operatorname{ml}\left(\sum_{i=1}^{s} g'_{i,1}(x_1)\cdots g'_{i,n}(x_n)\right)\\ &=\operatorname{ml}\left(\sum_{i=1}^{s} \operatorname{ml}(g'_{i,1}(x_1))\cdots \operatorname{ml}(g'_{i,n}(x_n))\right)\\ \intertext{defining $f_{i,j}(x_j):= \operatorname{ml}(g_{i,j}(x_j))$, so that $\deg f_{i,j}\le 1$,} &=\operatorname{ml}\left(\sum_{i=1}^{s} f_{i,1}(x_1)\cdots f_{i,n}(x_n)\right)\\ \intertext{and we can drop the outside $\operatorname{ml}$ as this expression is now multilinear,} &=\sum_{i=1}^{s} f_{i,1}(x_1)\cdots f_{i,n}(x_n) \;, \end{align*} showing that $f$ is computable as desired, noting that this expression has the desired explicitness. \end{proof} Note that computing $f$ via duality also implies an roABP for $f$, but only in large enough fields $|\mathbb{F}|\ge\poly(|A|,n)$. Of course, the field must at least have $|\mathbb{F}|\ge |A|$, but by using the field-independent conversion of $\ensuremath{\sum\pow\sum}\xspace$ to roABP (\autoref{res:sumpowsum:roABP}) this shows that $\mathbb{F}$ need not be any larger than $A$ for the refutation to be efficient. The above shows that one can give an ``IPS proof'' $g(\vx)(\sum_i \alpha_ix_i-\beta)+\sum_i h_i(\vx)(x_i^2-x_i)=1$, where $g$ is efficiently computable. However, this is not yet an IPS proof as it does not bound the complexity of the $h_i$. We now extend this to an actual IPS proof by using the above multilinearization results for roABPs (\autoref{res:multilin:roABP-lIPS}), leveraging that $\sum_i \alpha_ix_i-\beta$ is computable by an roABP in any variable order (and that the above result works in any variable order). \begin{corollarywp}\label{res:ips-ubs:subset:roABP} Let ${\vec{\alpha}}\in\mathbb{F}^n$, $\beta\in\mathbb{F}$ and $A:=\{\sum_{i=1}^n \alpha_i x_i : \vx\in\ensuremath{\{0,1\}}^n\}$ be so that $\beta\notin A$. Then $\sum_i \alpha_ix_i-\beta,\vx^2-\vx$ has a $\poly(|A|,n)$-explicit roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation of individual degree $2$ computable in width-$\poly(|A|,n)$ in any variable order. \end{corollarywp} Note that while the above results give a small $\ensuremath{\sum\pow\sum}\xspace$ formula $g$ such that $g\cdot (\sum_i\alpha_i x_i-\beta)\equiv -p(\beta)\mod\vx^2-\vx$ for nonzero scalar $-p(\beta)$, this does not translate to a $\ensuremath{\sum\pow\sum}\xspace$-IPS refutation as $\ensuremath{\sum\pow\sum}\xspace$ formulas cannot be multilinearized efficiently (see the discussion in \autoref{sec:multilinearization:roABP}). We now turn to refuting the subset-sum axioms by multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace (which is not itself a complete proof system, but will suffice here). While one can use the multilinearization techniques for multilinear-formula-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} of \autoref{res:multilin:multilin-lbIPS} it gives slightly worse results due to its generality, so we directly multilinearize the refutations we built above using that the subset-sum axiom is linear. \begin{proposition}\label{res:ips-ubs:subset:mult-form} Let ${\vec{\alpha}}\in\mathbb{F}^n$, $\beta\in\mathbb{F}$ and $A:=\{\sum_{i=1}^n \alpha_i x_i : \vx\in\ensuremath{\{0,1\}}^n\}$ be so that $\beta\notin A$. If $|\mathbb{F}|\ge \poly(|A|,n)$, then $\sum_i \alpha_ix_i-\beta,\vx^2-\vx$ has a $\poly(|A|,n)$-explicit $\poly(|A|,n)$-size depth-3 multilinear-formula-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation. \end{proposition} \begin{proof} By \autoref{res:ips-ubs:subset}, there is a multilinear polynomial $f\in\mathbb{F}[\vx]$ such that $f(\vx)\cdot \left({\textstyle\sum}_i \alpha_i x_i-\beta\right)\equiv 1\mod \vx^2-\vx$, and $f$ is explicitly given as \[ f(\vx)=\sum_{i=1}^s f_{i,1}(x_1)\cdots f_{i,n}(x_n) \;, \] where each $f_{i,j}\in\mathbb{F}[x_i]$ has $\deg f_{i,j}\le 1$ and $s\le \poly(|A|,n)$. We now efficiently prove that $f(\vx)\cdot (\sum_{i=1}^n \alpha_i x_i-\beta)$ is equal to its multilinearization (which is $1$) modulo the boolean cube. The key step is that for a linear function $p(x)=\gamma x+\delta$ we have that $(\gamma x+\delta)x=(\gamma+\delta)x+\gamma(x^2-x)=p(1)x+(p(1)-p(0))(x^2-x)$. Thus, \begin{align*} f(\vx)&\cdot \left({\textstyle\sum}_i\alpha_i x_i-\beta\right)\\ &=\left( \sum_{i=1}^s f_{i,1}(x_1)\cdots f_{i,n}(x_n) \right)\cdot ({\textstyle\sum}_i\alpha_i x_i-\beta)\\ &=\sum_{i=1}^s -\beta f_{i,1}(x_1)\cdots f_{i,n}(x_n)\\ &\hspace{.5in}+\sum_{i=1}^s\sum_{j=1}^n \alpha_j \prod_{k\ne j} f_{i,k}(x_k) \cdot \Big(f_{i,j}(1)x_j + (f_{i,j}(1)-f_{i,j}(0))(x_j^2-x_j)\Big)\\ &=\sum_{i=1}^s -\beta f_{i,1}(x_1)\cdots f_{i,n}(x_n) +\sum_{i=1}^s\sum_{j=1}^n \alpha_j \prod_{k\ne j} f_{i,k}(x_k) \cdot f_{i,j}(1)x_j \\ &\hspace{.5in}+\sum_{i=1}^s\sum_{j=1}^n \alpha_j \prod_{k\ne j} f_{i,k}(x_k) \cdot (f_{i,j}(1)-f_{i,j}(0))\cdot (x_j^2-x_j) \intertext{absorbing constants and renaming, using $j=0$ to incorporate the above term involving $\beta$,} &=\sum_{i=1}^s\sum_{j=0}^n \prod_{k=1}^n f_{i,j,k}(x_k)+\sum_{j=1}^n \left(\sum_{i=1}^s\prod_{k=1}^n h_{i,j,k}(x_k)\right)(x_j^2-x_j) \intertext{where each $f_{i,j,k}$ and $h_{i,j,k}$ are linear univariates. As $f(\vx)\cdot (\sum_{i=1}^n \alpha_i x_i-\beta)\equiv 1\mod \vx^2-\vx$ it follows that $\sum_i \sum_j \prod_k f_{i,j,k}(x_k)\equiv 1\mod\vx^2-\vx$, but as each $f_{i,j,k}$ is linear it must actually be that $\sum_i \sum_j\prod_k f_{i,j,k}(x_k)=1$, so that,} &=1+\sum_{j=1}^n \left(\sum_{i=1}^s\prod_{k=1}^n h_{i,j,k}(x_k)\right)(x_j^2-x_j) \;. \end{align*} Define $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{}):= f(\vx)y-\sum_{j=1}^n h_j(\vx) z_j$, where $h_j(\vx):= \sum_{i=1}^s\prod_{k=1}^n h_{i,j,k}(x_k)$. It follows that $C(\vx,0,{\vec{0}})=0$ and that $C(\vx,\sum_i\alpha_ix_i-\beta,\vx^2-\vx)=1$, so that $C$ is a linear-IPS refutation. Further, as each $f,h_j$ is computable as a sum of products of linear univariates, these are depth-3 multilinear formulas. By distributing the multiplication of the variables $y,z_1,\ldots,z_n$ to the bottom multiplication gates, we see that $C$ itself has a depth-3 multilinear formula of the desired complexity. \end{proof} \section{Lower Bounds for Linear-IPS via Functional Lower Bounds}\label{sec:lbs-fn} In this section we give \emph{functional} circuit lower bounds for various measures of algebraic complexity, such as degree, sparsity, roABPs and multilinear formulas. That is, while algebraic complexity typically treats a polynomial $f\in\mathbb{F}[x_1,\ldots,x_n]$ as a \emph{syntactic} object, one can also see that it defines a function on the boolean cube $\hat{f}:\ensuremath{\{0,1\}}^n\to\mathbb{F}$. If this function is particularly complicated then one would expect that this implies that the polynomial $f$ requires large algebraic circuits. In this section we obtain such lower bounds, showing that for \emph{any} polynomial $f$ (not necessarily multilinear) that agrees with a certain function on the boolean cube must in fact have large algebraic complexity. Our lower bounds will proceed by first showing that the complexity of $f$ is an upper bound for the complexity of its multilinearization $\operatorname{ml}(f)$. While such a statement is known to be false for general circuits (under plausible assumptions, see \autoref{sec:multilinearization:roABP}), such efficient multilinearization can be shown for the particular restricted models of computation we consider. In particular, this multilinearization is easy for degree and sparsity, for multilinear formulas $f$ is already multilinear, and for roABPs this is seen in \autoref{sec:multilinearization:roABP}. As then $\operatorname{ml}(f)$ is uniquely defined by the function $\hat{f}$ (\autoref{fact:multilinearization}), we then only need to lower bound the complexity of $\operatorname{ml}(f)$ using standard techniques. We remark that the actual presentation will not follow the above exactly, as for roABPs and multilinear formulas it is just as easy to just work directly with the underlying lower bound technique. We then observe that by deriving such lower bounds for carefully crafted functions $\hat{f}:\ensuremath{\{0,1\}}^n\to\mathbb{F}$ one can easily obtain linear-IPS lower bounds for the above circuit classes. That is, consider the system of equations $f(\vx),\vx^2-\vx$, where $f(\vx)$ is chosen so this system is unsatisfiable, hence $f(\vx)\ne0$ for all $\vx\in\ensuremath{\{0,1\}}^n$. Any linear-IPS refutation yields an equation $g(\vx)\cdot f(\vx)+\sum_i h_i(\vx)(x_i^2-x_i)=1$, which implies that $g(\vx)=\nicefrac{1}{f(\vx)}$ for all $\vx\in\ensuremath{\{0,1\}}^n$ (that this system is unsatisfiable allows us to avoid division by zero). It follows that the polynomial $g(\vx)$ agrees with the function $\hat{f}(\vx):= \nicefrac{1}{f(\vx)}$ on the boolean cube. If the function $\hat{f}$ has a functional lower bound then this implies $g$ must have large complexity, giving the desired lower bound for the linear-IPS refutation. The section proceeds as follows. We begin by detailing the above strategy for converting functional lower bounds into lower bounds for linear-IPS\@. We then derive a tight functional lower bound of $n$ for the degree of $\nicefrac{1}{\left(\sum_i x_i+1\right)}$. We then extend this via random restrictions to a functional lower bound of $\exp(\Omega(n))$ on the sparsity of $\nicefrac{1}{\left(\sum_i x_i+1\right)}$. We can then lift this degree bound to a functional lower bound of $2^n$ on the evaluation dimension of $\nicefrac{1}{\left(\sum_i x_iy_i+1\right)}$ in the $\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}$ partition, which we then symmetrize to obtain a functional lower bound on the evaluation dimension in any partition of the related function $\nicefrac{1}{\big(\sum_{i<j} z_{i,j}x_ix_j+1\big)}$. In each case, the resulting linear-IPS lower bounds are immediate via the known relations of these measures to circuit complexity classes (\autoref{sec:background}). \subsection{The Strategy}\label{sec:lbs-fn:strategy} We give here the key lemma detailing the general reduction from linear-IPS lower bounds to functional lower bounds. \begin{lemma}\label{res:lbs-fn_lbs-ips:lIPS} Let $\mathcal{C}\subseteq\mathbb{F}[x_1,\ldots,x_n]$ be a set of polynomials closed under partial evaluation. Let $f\in\mathbb{F}[\vx]$, where the system $f(\vx),\vx^2-\vx$ is unsatisfiable. Suppose that for all $g\in\mathbb{F}[\vx]$ with \[ g(\vx)=\frac{1}{f(\vx)},\qquad \forall \vx\in\ensuremath{\{0,1\}}^n\;, \] that $g\notin \mathcal{C}$. Then $f(\vx),\vx^2-\vx$ does not have $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutations. \end{lemma} \begin{proof} Suppose for contradiction that $f(\vx),\vx^2-\vx$ has the $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{})=g(\vx)\cdot y+\sum_i h_i(\vx) \cdot z_i$ where $C(\vx,f,\vx^2-\vx)=1$ (and clearly $C(\vx,0,{\vec{0}})=0$). As $g=C(\vx,1,{\vec{0}})$, it follows that $g\in\mathcal{C}$ from the closure properties we assumed of $\mathcal{C}$. Thus, \begin{align*} 1&=C(\vx,f,\vx^2-\vx)\\ &=g(\vx)\cdot f(\vx)+\sum_i h_i(\vx) (x_i^2-x_i)\\ &\equiv g(\vx)\cdot f(\vx)\mod\vx^2-\vx \;. \end{align*} Thus, for any $\vx\in\ensuremath{\{0,1\}}^n$, as $f(\vx)\ne 0$, \[ g(\vx)=\nicefrac{1}{f(\vx)} \;. \] However, this yields the desired contradiction, as this contradicts the assumed functional lower bound for $\nicefrac{1}{f}$. \end{proof} We now note that the lower bound strategy of using functional lower bounds actually produces lower bounds for \texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} (and even for the full IPS system if we have multilinear polynomials), and not just \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace. This is because we work modulo the boolean axioms, so that any non-linear dependence on these axioms vanishes, only leaving a linear dependence on the remaining axioms. This slightly stronger lower bound is most interesting for multilinear-formulas, where the \texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace version is not complete in general (\autoref{ex:multi-form:incomplete}) (though it is still interesting due to its short refutations of the subset-sum axiom (\autoref{res:ips-ubs:subset:mult-form})), while the \texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} version is complete (\autoref{res:multilin:simulate-sparse}). \begin{lemma}\label{res:lbs-fn_lbs-ips:lbIPS} Let $\mathcal{C}\subseteq\mathbb{F}[x_1,\ldots,x_n]$ be a set of polynomials closed under evaluation, and let $\mathcal{D}$ be the set of differences of $\mathcal{C}$, that is, $\mathcal{D}:= \{p(\vx)-q(\vx): p,q\in\mathcal{C}\}$. Let $f\in\mathbb{F}[\vx]$, where the system $f(\vx),\vx^2-\vx$ is unsatisfiable. Suppose that for all $g\in\mathbb{F}[\vx]$ with \[ g(\vx)=\frac{1}{f(\vx)},\qquad \forall \vx\in\ensuremath{\{0,1\}}^n\;, \] that $g\notin \mathcal{D}$. Then $f(\vx),\vx^2-\vx$ does not have $\mathcal{C}$-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutations. Furthermore, if $\mathcal{C}$ (and thus $\mathcal{D}$) are a set of multilinear polynomials, then $f(\vx),\vx^2-\vx$ does not have $\mathcal{C}$-IPS refutations. \end{lemma} \begin{proof} Suppose for contradiction that $f(\vx),\vx^2-\vx$ has the $\mathcal{C}$-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{})$. That $\deg_{y} C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{})\le 1$ implies there is the decomposition $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{})=C_1(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})y+C_0(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})$. As $C_1(\vx,{\vec{0}})=C(\vx,1,{\vec{0}})-C(\vx,0,{\vec{0}})$, the assumed closure properties imply that $C_1(\vx,{\vec{0}})\in\mathcal{D}$. By the definition of an IPS refutation, we have that $0=C(\vx,0,{\vec{0}})=C_1(\vx,{\vec{0}})\cdot 0+C_0(\vx,{\vec{0}})$, so that $C_0(\vx,{\vec{0}})=0$. By using the definition of an IPS refutation again, we have that $1=C(\vx,f,\vx^2-\vx)=C_1(\vx,\vx^2-\vx)\cdot f+C_0(\vx,\vx^2-\vx)$, so that modulo the boolean axioms, \begin{align*} 1&=\textstyle C_1(\vx,\vx^2-\vx)\cdot f+C_0(\vx,\vx^2-\vx) \\ &\equiv \textstyle C_1(\vx,{\vec{0}})\cdot f+C_0(\vx,{\vec{0}}) \mod \vx^2-\vx\\ \intertext{using that $C_0(\vx,{\vec{0}})=0$,} &\equiv \textstyle C_1(\vx,{\vec{0}})\cdot f \mod \vx^2-\vx \;. \end{align*} Thus, for every $\vx\in\ensuremath{\{0,1\}}^n$ we have that $C_1(\vx,{\vec{0}})=\nicefrac{1}{f(\vx)}$ so that by the assumed functional lower bound $C_1(\vx,{\vec{0}})\notin \mathcal{D}$, yielding the desired contradiction to the above $C_1(\vx,{\vec{0}})\in\mathcal{D}$. Now suppose that $\mathcal{C}$ is a set of multilinear polynomials. Any $\mathcal{C}$-IPS refutation $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{})$ of $f(\vx),\vx^2-\vx$ thus must have $\deg_y C\le 1$ as $C$ is multilinear, so that $C$ is actually a $\mathcal{C}$-\texorpdfstring{\ensuremath{\text{IPS}_{\text{LIN}'}}\xspace}{IPS-LIN'} refutation, thus the above lower bound applies. \end{proof} \subsection{Degree of a Polynomial}\label{sec:lbs-fn:deg} We now turn to obtaining functional lower bounds, and deriving the corresponding linear-IPS lower bounds. We begin with a particularly weak form of algebraic complexity, the degree of a polynomial. While it is trivial to obtain such bounds in some cases (as any polynomial that agrees with the AND function on the boolean cube $\ensuremath{\{0,1\}}^n$ must have degree $\ge n$), for our applications to proof complexity we will need such degree bounds for functions defined by $\hat{f}(\vx)=\nicefrac{1}{f(\vx)}$ for simple polynomials $f(\vx)$. We show that any multilinear polynomial agreeing with $\nicefrac{1}{f(\vx)}$, where $f(\vx)$ is the subset-sum axiom $\sum_i x_i-\beta$, must have the maximal degree $n$. We note that a degree lower bound of $\ceil{\nicefrac{n}{2}}+1$ was established by Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99} (\autoref{thm:IPS99}). They actually established this degree bound\,\footnote{The degree lower bound of Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99} (\autoref{thm:IPS99}) actually holds for the (dynamic) polynomial calculus proof system (see section \autoref{sec:alg-proofs}), while we only consider the (static) Nullstellensatz proof system here. Note that for polynomial calculus Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99} also showed a matching upper bound of $\ceil{\nicefrac{n}{2}}+1$ for ${\vec{\alpha}}={\vec{1}}$.} when $f(\vx)=\sum_i \alpha_i x_i-\beta$ for \emph{any} ${\vec{\alpha}}$, while we only consider ${\vec{\alpha}}={\vec{1}}$ here. However, we need the tight bound of $n$ here as it will be used crucially in the proof of \autoref{res:lbs-fn:dim-eval}. \begin{proposition}\label{res:subsetsum:deg} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in \mathbb{F}\setminus\{0,\ldots,n\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be a multilinear polynomial such that \[ f(\vx)\left(\sum_i x_i-\beta\right)=1 \mod \vx^2-\vx \;. \] Then $\deg f=n$. \end{proposition} \begin{proof} \uline{$\le n$:} This is clear as $f$ is multilinear. \uline{$\ge n$:} Begin by observing that as $\beta\notin\{0,\ldots,n\}$, this implies that $\sum_i x_i-\beta$ is never zero on the boolean cube, so that the above functional equation implies that for $\vx\in\ensuremath{\{0,1\}}^n$ the expression \begin{align*} f(\vx)= \frac{1}{\sum_i x_i-\beta} \;, \end{align*} is well defined. Now observe that this implies that $f$ is a symmetric polynomial. That is, define the multilinear polynomial $g$ by symmetrizing $f$, \begin{align*} g(x_1,\ldots,x_n):= \frac{1}{n!}\sum_{\sigma\in\mathfrak{S}_n} f(x_{\sigma(1)},\ldots,x_{\sigma(n)}) \;, \end{align*} where $\mathfrak{S}_n$ is the symmetric group on $n$ symbols. Then we see that $f$ and $g$ agree on $\vx\in\ensuremath{\{0,1\}}^n$, as \begin{align*} g(\vx) &=\frac{1}{n!}\sum_{\sigma\in\mathfrak{S}_n} f(x_{\sigma(1)},\ldots,x_{\sigma(n)})\\ &=\frac{1}{n!}\sum_{\sigma\in\mathfrak{S}_n} \frac{1}{\sum_i x_{\sigma(i)}-\beta} =\frac{1}{n!}\sum_{\sigma\in\mathfrak{S}_n} \frac{1}{\sum_i x_i-\beta}\\ &=\frac{1}{n!}\cdot n!\cdot \frac{1}{\sum_i x_i-\beta} =\frac{1}{\sum_i x_i-\beta}=f(\vx) \;. \end{align*} It follows then that $g=f$ as polynomials, since they are multilinear and agree on the boolean cube (\autoref{fact:multilinearization}). As $g$ is clearly symmetric, so is $f$. Thus $f$ can be expressed as $f=\sum_{k=0}^d \gamma_k S_{n,k}(\vx)$, where $d:=\deg f$, $S_{n,k}:= \sum_{S\subseteq\binom{[n]}{k}}\prod_{i\in S} x_i$ is the $k$-th elementary symmetric polynomial, and $\gamma_k\in\mathbb{F}$ are scalars with $\gamma_d\ne 0$. Now observe that for $k<n$, we can understand the action of multiplying $S_{n,k}$ by $\sum_i x_i-\beta$. \begin{align*} \textstyle(\sum_i x_i-\beta) S_{n,k}(\vx) &=\sum_{S\in\binom{[n]}{k}} \textstyle(\sum_i x_i-\beta) \prod_{j\in S} x_j\\ &=\sum_{S\in\binom{[n]}{k}} \textstyle\left(\sum_{i\notin S} x_i \prod_{j\in S} x_j+\sum_{i\in S} x_i \prod_{j\in S} x_j-\beta \prod_{j\in S} x_j\right)\\ &=\sum_{S\in\binom{[n]}{k}} \left(\sum_{\substack{|T|=k+1\\mathrm{tr}\supseteq S}} \prod_{j\in T}x_j +(k-\beta) \prod_{j\in S} x_j\right) \mod \vx^2-\vx\\ &=(k+1)S_{n,k+1}+(k-\beta)S_{n,k}\mod \vx^2-\vx \;. \end{align*} Note that we used that each subset of $[n]$ of size $k+1$ contains exactly $k+1$ subsets of size $k$. Putting the above together, suppose for contradiction that $d<n$. Then, \begin{align*} 1 &=f(\vx)\left(\sum_i x_i-\beta\right) \mod \vx^2-\vx\\ &=\left(\sum_{k=0}^d \gamma_k S_{n,k}\right)\left(\sum_i x_i-\beta\right) \mod \vx^2-\vx\\ &=\left(\sum_{k=0}^d \gamma_k \Big((k+1)S_{n,k+1}+(k-\beta)S_{n,k}\Big)\right) \mod \vx^2-\vx\\ &=\gamma_d(d+1)S_{n,d+1} + (\text{degree $\le d$}) \mod \vx^2-\vx \end{align*} However, as $\gamma_d\ne 0$, $d+1\le n$ (so that $d+1\ne 0$ in $\mathbb{F}$ and $S_{n,d+1}$ is defined) this shows that $1$ (a multilinear degree 0 polynomial) equals $\gamma_d(d+1)S_{n,d+1} + (\text{degree $\le d$})$ (a multilinear degree $d+1$ polynomial) modulo $\vx^2-\vx$, which is a contradiction to the uniqueness of representation of multilinear polynomials modulo $\vx^2-\vx$. Thus, we must have $d=n$. \end{proof} To paraphrase the above argument, it shows that for multilinear $f$ of $\deg f<n$ with $\operatorname{ml}(f(\vx)\cdot (\sum_i x_i-\beta))=1$ it holds that $\deg \operatorname{ml}(f(\vx)\cdot (\sum_i x_i-\beta))=\deg f+1$. This contradicts the fact that $\deg 1=0$, so that $\deg f=n$. It is tempting to attempt to argue this claim without using that $\operatorname{ml}(f(\vx)\cdot (\sum_i x_i-\beta))=1$ in some way. That is, one could hope to argue that $\deg(\operatorname{ml}(f(\vx)\cdot(\sum_i x_i-\beta)))= \deg f+1$ directly. Unfortunately this is false, as seen by the example $\operatorname{ml}((x+y)(x-y))=\operatorname{ml}(x^2-y^2)=x-y$. However, one can make this approach work to obtain a degree lower bound of $\ceil{\nicefrac{n}{2}}+1$, as shown by Impagliazzo, Pudl{\'{a}}k\xspace, and Sgall~\cite{IPS99}. Putting the above together with the fact that multilinearization is degree non-increasing (\autoref{fact:multilinearization}) we obtain that any polynomial agreeing with $\frac{1}{\sum_i x_i-\beta}$ on the boolean cube must be of degree $\ge n$. \begin{corollary}\label{res:subsetsum:deg:ge} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in \mathbb{F}\setminus\{0,\ldots,n\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be a polynomial such that \[ f(\vx)\left(\sum_i x_i-\beta\right)=1 \mod \vx^2-\vx \;. \] Then $\deg f\ge n$. \end{corollary} \begin{proof} Multilinearizing (\autoref{fact:multilinearization}) we see that $1=\operatorname{ml}\big(f(\vx)\cdot\left(\sum_i x_i-\beta\right)\big)=\operatorname{ml}\big(\operatorname{ml}(f)\cdot\left(\sum_i x_i-\beta\right)\big)$, so that $\operatorname{ml}(f)\cdot \left(\sum_i x_i-\beta\right)=1\mod \vx^2-\vx$. Thus $\deg f\ge \deg \operatorname{ml}(f)$ (\autoref{fact:multilinearization}) and $\deg \operatorname{ml}(f)=n$ by the above \autoref{res:subsetsum:deg}, yielding the claim. \end{proof} The above proof shows that the unique multilinear polynomial $f$ agreeing with $\nicefrac{1}{\left(\sum_i x_i-\beta\right)}$ on the hypercube has degree $n$, but does so without actually specifying the coefficients of $f$. In \autoref{res:subsetsum:multlin} we compute the coefficients of this polynomial, giving an alternate proof that it has degree $n$ (\autoref{res:subsetsum:multlin:deg-sparse}). In particular, this computation yields a small algebraic circuit for $f$, expressing it as an explicit linear combination of elementary symmetric polynomials (which have small algebraic circuits). \subsection{Sparse polynomials}\label{sec:h-ips:lbs:sparse} We now use the above functional lower bounds for degree, along with random restrictions, to obtain functional lower bounds for sparsity. We then apply this to obtain exponential lower bounds for sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutations of the subset-sum axiom. Recall that sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace is equivalent to the Nullstellensatz proof system when we measure the size of the proof in terms of the number of monomials. While we provide the proof here for completeness, we note that this result has already been obtained by Impagliazzo-Pudl{\'{a}}k\xspace-Sgall~\cite{IPS99}, who also gave such a lower bound for the stronger polynomial calculus proof system. We first recall the random restrictions lemma. This lemma shows that by randomly setting half of the variables to zero, sparse polynomials become sums of monomials involving few variables, which after multilinearization is a low-degree polynomial. \begin{lemma}\label{res:random-restriction} Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be an $s$-sparse polynomial. Let $\rho:\mathbb{F}[\vx]\to\mathbb{F}[\vx]$ be the homomorphism induced by randomly and independently setting each variable $x_i$ to $0$ with probability $\nicefrac{1}{2}$ and leaving $x_i$ intact with probability $\nicefrac{1}{2}$. Then with probability $\ge \nicefrac{1}{2}$, each monomial in $\rho(f(\vx))$ involves $\le \lg s+1$ variables. Thus, with probability $\ge \nicefrac{1}{2}$, $\deg\operatorname{ml}(\rho(f))\le \lg s+1$. \end{lemma} \begin{proof} Consider a monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ involving $\ge t$ variables, $t\in\R$. Then the probability that $\rho(\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{})$ is nonzero is at most $2^{-t}$. Now consider $f(\vx)=\sum_{j=1}^s \alpha_j \vx^{{\vec{a}}\@ifnextchar{^}{\!\:}{}_j}$. By a union bound, the probability that any monomial $\vx^{{\vec{a}}\@ifnextchar{^}{\!\:}{}_j}$ involving at least $t$ variables survives the random restriction is at most $s2^{-t}$. For $t=\lg s+1$ this is at most $\nicefrac{1}{2}$. The claim about the multilinearization of $\rho(f(\vx))$ follows by observing that for a monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}$ involving $\le \lg s+1$ variables it must be that $\deg\operatorname{ml}(\rho(\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}))\le \lg s+1$ (\autoref{fact:multilinearization}). \end{proof} We now give our functional lower bound for sparsity. This follows from taking any refutation of the subset-sum axiom and applying a random restriction. The subset-sum axiom will be relatively unchanged, but any sparse polynomial will become (after multilinearization) low-degree, to which our degree lower bounds (\autoref{sec:lbs-fn:deg}) can then be applied. \begin{proposition} Let $n\ge 8$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in \mathbb{F}\setminus\{0,\ldots,n\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be a polynomial such that \[ f(\vx)=\frac{1}{\sum_i x_i-\beta} \;, \] for $\vx\in\ensuremath{\{0,1\}}^n$. Then $f$ requires $\ge 2^{\nicefrac{n}{4}-1}$ monomials. \end{proposition} \begin{proof} Suppose that $f$ is $s$-sparse so that $f(\vx)=\sum_{j=1}^s \alpha_j\vx^{{\vec{a}}\@ifnextchar{^}{\!\:}{}_j}$. Take a random restriction $\rho$ as in \autoref{res:random-restriction}, so that with probability at least $\nicefrac{1}{2}$ we have that $\deg \operatorname{ml}(\rho(f))\le \lg s+1$. By the Chernoff bound,\footnote{For independent $[0,1]$-valued random variables $\rv{X}_1,\ldots,\rv{X}_n$, $\Pr\left[\sum_i \rv{X}_i -\sum_i\E[\rv{X}_i]\le-\epsilon n\right]\le \mathrm{e}^{-2\epsilon^2n}$.} we see that $\rho$ keeps alive at least $\nicefrac{n}{4}$ variables with probability at least $1-\mathrm{e}^{-2\cdot (\nicefrac{1}{4})^2\cdot n}$, which is $\ge 1-\mathrm{e}^{-1}$ for $n\ge 8$. Thus, by a union bound the probability that $\rho$ fails to have either that $\deg\operatorname{ml}(\rho(f))\le \lg s+1$ or that it keeps at least $\nicefrac{n}{4}$ variables alive is at most $\nicefrac{1}{2}+\mathrm{e}^{-1}<1$. Thus a $\rho$ exists obeying both properties. Thus, the functional equation for $f$ implies that \[ f(\vx)\left(\sum_i x_i-\beta\right)=1+\sum_i h_i(\vx) (x_i^2-x_i) \;, \] for some $h_i\in\mathbb{F}[\vx]$. Applying the random restriction and multilinearization to both sizes of this equation, we obtain that \[ \operatorname{ml}(\rho(f))\cdot \left(\sum_{\rho(x_i)\ne 0} x_i-\beta\right)\equiv 1 \mod \{x_i^2-x_i\}_{\rho(x_i)\ne 0} \;. \] Thus, by appealing to the degree lower bound for this functional equation (\autoref{res:subsetsum:deg}) we obtain that $\lg s+1\ge \deg\operatorname{ml}(\rho(f))$ is at least the number of variables which is $\ge \nicefrac{n}{4}$, so that $s\ge 2^{\nicefrac{n}{4}-1}$ as desired. \end{proof} We remark that one can actually improve the sparsity lower bound to the optimal ``$\ge 2^n$'' by computing the sparsity of the unique multilinear polynomial satisfying the above functional equation (\autoref{res:subsetsum:multlin:deg-sparse}). We now apply these functional lower bounds to obtain lower bounds for sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutations of $\sum_i x_i-\beta,\vx^2-\vx$ via our reduction (\autoref{res:lbs-fn_lbs-ips:lIPS}). \begin{corollarywp} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in \mathbb{F}\setminus\{0,\ldots,n\}$. Then $\sum_{i=1}^n x_i-\beta,\vx^2-\vx$ is unsatisfiable and any sparse-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation requires size $\exp(\Omega(n))$. \end{corollarywp} \subsection{Coefficient Dimension in a Fixed Partition}\label{sec:evaluation} We now seek to prove functional circuit lower bounds for more powerful models of computation such as roABPs and multilinear formulas. As recalled in \autoref{sec:background}, the coefficient dimension complexity measure can give lower bounds for such models. However, by definition it is a \emph{syntactic} measure as it speaks about the coefficients of a polynomial. Unfortunately, knowing that a polynomial $f\in\mathbb{F}[\vx]$ agrees with a function $\hat{f}:\ensuremath{\{0,1\}}^n\to\mathbb{F}$ on the boolean cube $\ensuremath{\{0,1\}}^n$ does not in general give enough information to determine its coefficients. In contrast, the \emph{evaluation} dimension measure is concerned with evaluations of a polynomial (which is functional). Obtaining lower bounds for evaluation dimension, and leveraging the fact that the evaluation dimension lower bounds coefficient dimension (\autoref{res:evals_eq-coeffs}) we can obtain the desired lower bounds for this complexity measure. We now proceed to the lower bound. It will follow from the degree lower bound for the subset-sum axiom (\autoref{res:subsetsum:deg:ge}). That is, this degree bound shows that if $f({\vec{z}}\@ifnextchar{^}{\!\:}{})\cdot(\sum_i z_i-\beta)\equiv 1\mod {\vec{z}}\@ifnextchar{^}{\!\:}{}^2-{\vec{z}}\@ifnextchar{^}{\!\:}{}$ then $f$ must have degree $\ge n$. We can then ``lift'' this lower bound by the use of a gadget, in particular by replacing ${\vec{z}}\@ifnextchar{^}{\!\:}{}\leftarrow \vx\circ {\vec{y}}\@ifnextchar{^}{\!\:}{}$, where `$\circ$' is the Hadamard (entry-wise) product. Because the degree of $f$ is maximal, this gadget forces $\vx$ and ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ to maximally ``interact'', and hence the evaluation dimension is large in the $\vx$ versus ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ partition. \begin{proposition}\label{res:lbs-fn:dim-eval} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in\mathbb{F}\setminus\{0,\ldots,n\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$ be a polynomial such that \[ f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})=\frac{1}{\sum_i x_iy_i-\beta} \;, \] for $\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}\in\ensuremath{\{0,1\}}^n$. Then $\dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}} f\ge 2^n$. \end{proposition} \begin{proof} By lower bounding coefficient dimension by the evaluation dimension over the boolean cube (\autoref{res:evals_eq-coeffs}), \begin{align*} \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}} f &\ge \dim\evals{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{},\ensuremath{\{0,1\}}} f\\ &=\dim \{f(\vx,\ind{S}) : S\subseteq[n]\}\\ &\ge\dim \{\operatorname{ml}(f(\vx,\ind{S})) : S\subseteq[n]\} \;, \end{align*} where $\ind{S}\in\ensuremath{\{0,1\}}^n$ is the indicator vector for a set $S$, and $\operatorname{ml}$ is the multilinearization operator. Note that we used that multilinearization is linear (\autoref{fact:multilinearization}) and that dimension is non-increasing under linear maps. Now note that for $\vx\in\ensuremath{\{0,1\}}^n$, \[ f(\vx,\ind{S})=\frac{1}{\sum_{i\in S} x_i-\beta} \;, \] It follows then $\operatorname{ml}(f(\vx,\ind{S}))$ is a multilinear polynomial only depending on $\vx|_S$ (\autoref{fact:multilinearization}), and by its functional behavior it follows from \autoref{res:subsetsum:deg} that $\deg \operatorname{ml}(f(\vx,\ind{S}))=|S|$. As $\operatorname{ml}(f(\vx,\ind{S}))$ is multilinear it thus follows that the leading monomial of $\operatorname{ml}(f(\vx,\ind{S}))$ is $\prod_{i\in S} x_i$, which is distinct for each distinct $S$. This is also readily seen from the explicit description of $\operatorname{ml}(f(\vx,\ind{S}))$ given by \autoref{res:subsetsum:multlin}. Thus, we can lower bound the dimension of this space by the number of leading monomials (\autoref{res:dim-eq-num-TM-spn}), \begin{align*} \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}} f &\ge\dim \{\operatorname{ml}(f(\vx,\ind{S})) : S\subseteq[n]\}\\ &\ge\left|\LM \Big(\{\operatorname{ml}(f(\vx,\ind{S})) : S\subseteq[n]\}\Big)\right|\\ &=\left|\left\{\prod_{i\in S} x_i : S\subseteq[n]\right\}\right|\\ &=2^n \;. \qedhere \end{align*} \end{proof} Note that in the above proof we crucially leveraged that the degree bound of \autoref{res:subsetsum:deg} is \emph{exactly} $n$, not just $\Omega(n)$. This exact bound allows us to determine the leading monomials of these polynomials, which seems not to follow from degree lower bounds of $\Omega(n)$. As coefficient dimension lower bounds roABP-width (\autoref{res:roABP-width_eq_dim-coeffs}) and depth-3 powering formulas can be computed by roABPs in any variable order (\autoref{res:sumpowsum:roABP}), we obtain as a corollary our functional lower bound for these models. \begin{corollarywp}\label{res:lbs-fn:roABP} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in\mathbb{F}\setminus\{0,\ldots,n\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$ be a polynomial such that \[ f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})=\frac{1}{\sum_i x_iy_i-\beta} \;, \] for $\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}\in\ensuremath{\{0,1\}}^n$. Then $f$ requires width $\ge 2^n$ to be computed as an roABP in any variable order where $\vx$ precedes ${\vec{y}}\@ifnextchar{^}{\!\:}{}$. In particular, $f$ requires $\exp(\Omega(n))$-size as a depth-$3$ powering formula. \end{corollarywp} We now conclude with a lower bound for linear-IPS over roABPs in certain variable orders, and thus also for depth-$3$ powering formulas, by appealing to our reduction to functional lower bounds (\autoref{res:lbs-fn_lbs-ips:lIPS}). \begin{corollary}\label{res:lbs-fn:lbs-ips:fixed-order} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in \mathbb{F}\setminus\{0,\ldots,n\}$. Then $\sum_{i=1}^n x_iy_i-\beta,\vx^2-\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}$ is unsatisfiable and any roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation, where the roABP reads $\vx$ before ${\vec{y}}\@ifnextchar{^}{\!\:}{}$, requires width $\ge \exp(\Omega(n))$. In particular, any $\ensuremath{\sum\pow\sum}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation requires size $\ge\exp(\Omega(n))$. \end{corollary} \begin{proof} That this system is unsatisfiable is clear from construction. The proof then follows from applying our functional lower bound (\autoref{res:lbs-fn:roABP}) to our reduction strategy (\autoref{res:lbs-fn_lbs-ips:lIPS}), where we use that partial evaluations of small roABPs yield small roABPs in the induced variable order (\autoref{fact:roABP:closure}), and that depth-3 powering formulas are a subclass of roABPs (in any order) (\autoref{res:sumpowsum:roABP}). \end{proof} The above result shows an roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace lower bound for variable orders where $\vx$ precedes ${\vec{y}}\@ifnextchar{^}{\!\:}{}$, and we complement this by giving an upper bound showing there \emph{are} small roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace upper bounds for variable orders where $\vx$ and ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ are tightly interleaved. This is achieved by taking the roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace upper bound of \autoref{res:ips-ubs:subset:roABP} for $\sum_i z_i-\beta,{\vec{z}}\@ifnextchar{^}{\!\:}{}^2-{\vec{z}}\@ifnextchar{^}{\!\:}{}$ under the substitution $z_i\leftarrow x_iy_i$, and observing that such substitutions preserve roABP width in the $x_1<y_1<\cdots<x_n<y_n$ order (\autoref{fact:roABP:closure}). In particular, as $\ensuremath{\sum\pow\sum}\xspace$ formulas are small roABPs in \emph{every} variable order, this allows us to achieve an exponential separation between $\ensuremath{\sum\pow\sum}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace and roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace. \begin{corollary}\label{res:lbs-fn:lbs-ips:order-sep} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Suppose that $\beta\in \mathbb{F}\setminus\{0,\ldots,n\}$. Then $\sum_{i=1}^n x_iy_i-\beta,\vx^2-\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}$ is unsatisfiable, has a $\poly(n)$-explicit $\poly(n)$-size roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation in the variable order $x_1<y_1<\cdots<x_n<y_n$, and every $\ensuremath{\sum\pow\sum}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation requires size $\ge\exp(\Omega(n))$. \end{corollary} \begin{proof} \autoref{res:lbs-fn:lbs-ips:fixed-order} showed that this system is unsatisfiable and has the desired $\ensuremath{\sum\pow\sum}\xspace$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace lower bound, so that it remains to prove the roABP upper bound. By \autoref{res:ips-ubs:subset} the unique multilinear polynomial $f\in\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}]$ such that $f({\vec{z}}\@ifnextchar{^}{\!\:}{})\cdot (\sum_{i=1}^nz_i-\beta)\equiv 1\mod {\vec{z}}\@ifnextchar{^}{\!\:}{}^2-{\vec{z}}\@ifnextchar{^}{\!\:}{}$ has a multilinear $\poly(n)$-size roABP in the variable order $z_1<\cdots<z_n$. Applying the variable substitution $z_i\leftarrow x_iy_i$, it follows that $f'(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}):= f(x_1y_1,\ldots,x_ny_n)$ obeys $f'\cdot (\sum_{i=1}^nx_iy_i-\beta)\equiv 1 \mod \vx^2-\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}$ (as $z_i^2-z_i\equiv 0 \mod \vx^2-\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}^2-{\vec{y}}\@ifnextchar{^}{\!\:}{}$ under the substitution $z_i\leftarrow x_iy_i$) and that $f'$ is computable by a $\poly(n)$-size roABP in the variable order $x_1<y_1<\cdots<x_n<y_n$ (\autoref{fact:roABP:closure}, using that $f$ has individual degree 1). Appealing to the efficient multilinearization of roABPs (\autoref{res:multilin:roABP-lIPS}) completes the claim as $\sum_i x_iy_i -\beta$ is computable by a $\poly(n)$-size roABP (in any order). \end{proof} \subsection{Coefficient Dimension in any Variable Partition}\label{sec:lbs-fn:every-partition} The previous section gave functional lower bounds for coefficient dimension, and thus roABP width, in the $\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}$ variable partition. However, this lower bound fails for other variable orderings where $\vx$ and ${\vec{y}}\@ifnextchar{^}{\!\:}{}$ are interleaved because of corresponding upper bounds (\autoref{res:lbs-fn:lbs-ips:order-sep}). In this section we extend the lower bound to \emph{any} variable ordering by using suitable auxiliary variables to plant the previous lower bound into any partition we desire by suitably evaluating the auxiliary variables. We begin by developing some preliminaries for how coefficient dimension works in the presence of auxiliary indicator variables. That is, consider a polynomial $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})$ where we wish to study the coefficient dimension of $f$ in the $\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}$ partition. We can view this polynomial as lying in $\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}][\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ so that its coefficients are polynomials in ${\vec{z}}\@ifnextchar{^}{\!\:}{}$ and one studies the dimension of the coefficient space in the field of rational functions $\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})$. Alternatively one can evaluate ${\vec{z}}\@ifnextchar{^}{\!\:}{}$ at some point ${\vec{z}}\@ifnextchar{^}{\!\:}{}\leftarrow{\vec{\alpha}}$ so that $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{\alpha}})\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ and study its coefficient dimension over $\mathbb{F}$. The following straightforward lemma shows the first dimension over $\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})$ is lower-bounded by the second dimension over $\mathbb{F}$. \begin{lemma}\label{res:coeff-dim:fraction-field} Let $f\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}]$. Let $f_{\vec{z}}\@ifnextchar{^}{\!\:}{}$ denote $f$ as a polynomial in $\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}][\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$, so that for any ${\vec{\alpha}}\in\mathbb{F}^{|{\vec{z}}\@ifnextchar{^}{\!\:}{}|}$ we have that $f_{\vec{\alpha}}\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. Then for any such ${\vec{\alpha}}$, \[ \dim_{\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})}\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}} f_{\vec{z}}\@ifnextchar{^}{\!\:}{}(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}) \ge \dim_\mathbb{F} \coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}f_{\vec{\alpha}}(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}) \;. \] \end{lemma} \begin{proof} Let $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})$ be written in $\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}]$ as $f=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} f_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} ({\vec{z}}\@ifnextchar{^}{\!\:}{})\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$. By \autoref{res:y-dim_eq-x-dim} we see that $\dim_{\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})}\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}} f_{\vec{z}}\@ifnextchar{^}{\!\:}{}(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})$ is equal to the rank (over $\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})$) of the coefficient matrix $C_{f_{\vec{z}}\@ifnextchar{^}{\!\:}{}}$, so that its entries $(C_{f_{\vec{z}}\@ifnextchar{^}{\!\:}{}})_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}=f_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}({\vec{z}}\@ifnextchar{^}{\!\:}{})$ are in $\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}]$. Similarly, $\dim_{\mathbb{F}}\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}} f_{\vec{\alpha}}(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{})$ is equal to the rank (over $\mathbb{F}$) of the coefficient matrix $C_{f_{\vec{\alpha}}}$, so that as $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{\alpha}})= \sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} f_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}({\vec{\alpha}})\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ we have that $(C_{f_{\vec{\alpha}}})_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}=f_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}({\vec{\alpha}})$, which is in $\mathbb{F}$. Thus, it follows that $C_{f_{\vec{z}}\@ifnextchar{^}{\!\:}{}}|_{{\vec{z}}\@ifnextchar{^}{\!\:}{}\leftarrow{\vec{\alpha}}}=C_{f_{\vec{\alpha}}}$. The claim then follows by noting that for a matrix $M({\vec{w}}\@ifnextchar{^}{\!\:}{})\in\mathbb{F}[{\vec{w}}\@ifnextchar{^}{\!\:}{}]^{r\times r}$ it holds that $\rank_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})} M({\vec{w}}\@ifnextchar{^}{\!\:}{})\ge \rank_{\mathbb{F}} M({\vec{\beta}})$ for any ${\vec{\beta}}\in\mathbb{F}^{|{\vec{w}}\@ifnextchar{^}{\!\:}{}|}$. This follows as the rank of $M({\vec{w}}\@ifnextchar{^}{\!\:}{})$ is equal to the maximum size of a minor with a non-vanishing determinant. As such determinants are polynomials in ${\vec{w}}\@ifnextchar{^}{\!\:}{}$, they can only further vanish when ${\vec{w}}\@ifnextchar{^}{\!\:}{}\leftarrow{\vec{\beta}}$. \end{proof} We now use auxiliary variables to embed the coefficient dimension lower bound from \autoref{res:lbs-fn:dim-eval} into any variable order. We do this by viewing the polynomial $\sum_i u_iv_i-\beta$ as using a matching between variables in ${\vec{u}}\@ifnextchar{^}{\!\:}{}$ and ${\vec{v}}\@ifnextchar{^}{\!\:}{}$. We then wish to embed this matching graph-theoretically into a complete graph, where nodes are labelled with the variables $\vx$. Any equipartition of this graph will induce many edges across this cut, and we can drop edges to find a large matching between the $\vx$ variables which we then identify as instance of $\sum_i u_iv_i-\beta$. We introduce one new auxiliary variable $z_{i,j}$ per edge which, upon setting it to 0 or 1, allows us to have this edge (respectively) dropped from or kept in the desired matching. This leads to the new (symmetrized) equation $\sum_{i<j} z_{i,j} x_ix_j-\beta$, for which we now give the desired lower bound. \begin{proposition}\label{res:lbs-fn:any-order:coeff-dim} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>\binom{2n}{2}$. Suppose that $\beta\in\mathbb{F}\setminus\{0,\ldots,\binom{2n}{2}\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_{2n},z_1,\ldots,z_{\binom{2n}{2}}]$ be a polynomial such that \[ f(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})=\frac{1}{\sum_{i<j} z_{i,j}x_ix_j-\beta} \;, \] for $\vx\in\ensuremath{\{0,1\}}^{2n}$, ${\vec{z}}\@ifnextchar{^}{\!\:}{}\in\ensuremath{\{0,1\}}^{\binom{2n}{2}}$. Let $f_{\vec{z}}\@ifnextchar{^}{\!\:}{}$ denote $f$ as a polynomial in $\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}][\vx]$. Then for any partition $\vx=({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{})$ with $|{\vec{u}}\@ifnextchar{^}{\!\:}{}|=|{\vec{v}}\@ifnextchar{^}{\!\:}{}|=n$, \[ \dim_{\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}} f_{\vec{z}}\@ifnextchar{^}{\!\:}{} \ge 2^n \;. \] \end{proposition} \begin{proof} We wish to embed $\sum_i u_iv_i-\beta$ in this instance via a restriction of ${\vec{z}}\@ifnextchar{^}{\!\:}{}$. Define the ${\vec{z}}\@ifnextchar{^}{\!\:}{}$-evaluation ${\vec{\alpha}}\in\ensuremath{\{0,1\}}^{\binom{2n}{2}}$ to restrict $f$ to sum over those $x_ix_j$ in the natural matching between ${\vec{u}}\@ifnextchar{^}{\!\:}{}$ an ${\vec{v}}\@ifnextchar{^}{\!\:}{}$, so that \[ \alpha_{i.j} =\begin{cases} 1 & x_i=u_k, x_j=v_k\\ 0 & \text{else} \end{cases} \;. \] It follows then that $f({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{\alpha}})=\frac{1}{\sum_{k=1}^n u_kv_k-\beta}$ for ${\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}\in\ensuremath{\{0,1\}}^{n}$. Thus, by appealing to our lower bound for a fixed partition (\autoref{res:lbs-fn:dim-eval}) and the relation between the coefficient dimension in $f_{\vec{z}}\@ifnextchar{^}{\!\:}{}$ versus $f_{\vec{\alpha}}$ (\autoref{res:coeff-dim:fraction-field}), \begin{align*} \dim_{\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}} f_{\vec{z}}\@ifnextchar{^}{\!\:}{}({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}) &\ge \dim_\mathbb{F} \coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}f_{\vec{\alpha}}({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{})\\ &\ge 2^n \;. \qedhere \end{align*} \end{proof} We remark that this lower bound is only $\exp(\Omega(\sqrt{m}))$ where $m=2n+\binom{2n}{2}$ is the number of total variables, while one could hope for an $\exp(\Omega(m))$ lower bound as $2^m$ is the trivial upper bound for multilinear polynomials. One can achieve such a lower bound by replacing the above auxiliary variable scheme (which corresponds to a complete graph) with one derived from a constant-degree expander graph. That is because in such graphs any large partition of the vertices induces a large matching across that partition, where one can then embed the fixed-partition lower bounds of the previous section (\autoref{sec:evaluation}). However, we omit the details as this would not qualitatively change the results. We now obtain our desired functional lower bounds for roABPs and multilinear formulas. \begin{corollary}\label{res:lbs-fn:any-order} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>\binom{2n}{2}$. Suppose that $\beta\in\mathbb{F}\setminus\{0,\ldots,\binom{2n}{2}\}$. Let $f\in\mathbb{F}[x_1,\ldots,x_{2n},z_1,\ldots,z_{\binom{2n}{2}}]$ be a polynomial such that \[ f(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})=\frac{1}{\sum_{i<j} z_{i,j}x_ix_j-\beta} \;, \] for $\vx\in\ensuremath{\{0,1\}}^{2n}$, ${\vec{z}}\@ifnextchar{^}{\!\:}{}\in\ensuremath{\{0,1\}}^{\binom{2n}{2}}$. Then $f$ requires width $\ge 2^n$ to be computed by an roABP in any variable order. Also, $f$ requires $n^{\Omega(\log n)}$-size to be computed as a multilinear formula. For $d=o(\nicefrac{\log n}{\log\log n})$, $f$ requires $n^{\Omega((\nicefrac{n}{\log n})^{\nicefrac{1}{d}}/d^2)}$-size multilinear formulas of product-depth-$d$. \end{corollary} \begin{proof} \uline{roABPs:} Suppose that $f(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{})$ is computable by a width-$r$ roABP in some variable order. By pushing the ${\vec{z}}\@ifnextchar{^}{\!\:}{}$ variables into the fraction field, it follows that $f_{\vec{z}}\@ifnextchar{^}{\!\:}{}$ ($f$ as a polynomial in $\mathbb{F}[{\vec{z}}\@ifnextchar{^}{\!\:}{}][\vx]$) is also computable by a width-$r$ roABP over $\mathbb{F}({\vec{z}}\@ifnextchar{^}{\!\:}{})$ in the induced variable order on $\vx$ (\autoref{fact:roABP:closure}). By splitting $\vx$ in half along its variable order one obtains the lower bound by combining the coefficient dimension lower bound of \autoref{res:lbs-fn:any-order:coeff-dim} with its relation to roABPs (\autoref{res:roABP-width_eq_dim-coeffs}). \uline{multilinear formulas:} This follows immediately from our coefficient dimension lower bound (\autoref{res:lbs-fn:any-order:coeff-dim}) and the Raz~\cite{Raz09} and Raz-Yehudayoff~\cite{RazYehudayoff09} results (\autoref{thm:full-rank-lb}). \end{proof} As before, this immediately yields the desired roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace and multilinear-formula-IPS lower bounds. \begin{corollary}\label{res:lbs-fn:lbs-ips:vary-order} Let $n\ge 1$ and $\mathbb{F}$ be a field with $\chara(\mathbb{F})>\binom{2n}{2}$. Suppose that $\beta\in\mathbb{F}\setminus\{0,\ldots,\binom{2n}{2}\}$. Then $\sum_{i<j} z_{i,j}x_ix_j-\beta,\vx^2-\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{}^2-{\vec{z}}\@ifnextchar{^}{\!\:}{}\in\mathbb{F}[x_1,\ldots,x_{2n},z_1,\ldots,z_{\binom{2n}{2}}]$ is unsatisfiable, and any roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace refutation (in any variable order) requires $\exp(\Omega(n))$-size. Further, any multilinear-formula-IPS refutation requires $n^{\Omega(\log n)}$-size, and any product-depth-$d$ multilinear-formula-IPS refutation requires $n^{\Omega((\nicefrac{n}{\log n})^{\nicefrac{1}{d}}/d^2)}$-size. \end{corollary} \begin{proof} The system is unsatisfiable as any setting of $\vx\in\ensuremath{\{0,1\}}^n$ yields a sum over at most $\binom{2n}{2}$ $z$-variables, which must be in $\{0,\ldots,\binom{2n}{2}\}$ which by hypothesis does not contain $\beta$. The roABP-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace lower bound follows immediately from the above functional lower bound (\autoref{res:lbs-fn:any-order}) along with our reduction (\autoref{res:lbs-fn_lbs-ips:lIPS}), just as in \autoref{res:lbs-fn:lbs-ips:fixed-order}. The multilinear-formula-IPS lower bound also follows immediately from the above functional lower bound (\autoref{res:lbs-fn:any-order}) along with our reduction from IPS lower bounds to functional lower bounds for multilinear polynomials (\autoref{res:lbs-fn_lbs-ips:lbIPS}). In particular, this application uses that multilinear formulas are closed under partial evaluations, and that taking the difference of two formulas will only double its size and does not change the product depth. \end{proof} \section{Lower Bounds for Multiples of Polynomials}\label{sec:lbs-mult} In this section we consider the problem of finding explicit polynomials whose nonzero multiples are all hard. Such polynomials are natural to search for, as intuitively if $f$ is hard to compute then so should small modifications such as $x_1f^2+4f^3$. This intuition is buttressed by Kaltofen's~\cite{Kaltofen89} result that if a polynomial has a small algebraic circuit then so do all of its factors (up to some pathologies in small characteristic). Taken in a contrapositive, this says that if a polynomial $f$ requires super-polynomial size algebraic circuits, then so must all of its nonzero multiples. Thus, for general circuits the question of lower bounds for multiples reduces to the standard lower bounds question. Unfortunately, for many restricted classes of circuits where lower bounds are known (depth-3 powering formulas, sparse polynomials, roABPs) Kaltofen's~\cite{Kaltofen89} result produces circuits for the factors which do not fall into (possibly stronger) restricted classes of circuits where lower bounds are still known.\footnote{While some results (\cite{DvirSY09,Oliveira15}) can bound the depth of the factors in terms of the depth of the input circuit, there are only very weak lower bounds known for constant-depth algebraic circuits.} As such, developing lower bounds for multiples against these restricted classes seems to require further work beyond the standard lower bound question. We will begin by discussing the applications of this problem to the hardness versus randomness paradigm in algebraic complexity. We then use existing derandomization results to show that multiples of the determinant are hard for certain restricted classes. However, this method is very rigidly tied to the determinant. Thus, we also directly study existing lower bound techniques for restricted models of computation (depth-$3$ powering formulas, sparse polynomials, and roABPs) and extend these results to also apply to multiples. We will show the applications of such polynomials to proof complexity in \autoref{sec:ips-mult}. \subsection{Connections to Hardness versus Randomness and Factoring Circuits}\label{sec:lbs-mult:hard-v-rand} To motivate the problem of finding polynomials with hard multiples, we begin by discussing the hardness versus randomness approach to derandomizing polynomial identity testing. That is, Kabanets and Impagliazzo~\cite{KabanetsImpagliazzo04} extended the hardness versus randomness paradigm of Nisan and Wigderson~\cite{NisanWigderson94} to the algebraic setting, showing that sufficiently good algebraic circuit lower bounds for an explicit polynomial would qualitatively derandomize PIT\@. While much of the construction is similar (using combinatorial designs, hybrid arguments, etc.) to the approach of Nisan and Wigderson~\cite{NisanWigderson94} for boolean derandomization, there is a key difference. In the boolean setting, obtaining a hardness versus randomness connection requires converting \emph{worst-case} hardness (no small computation can compute the function everywhere) to \emph{average-case} hardness (no small computation can compute the function on most inputs). Such a reduction (obtained by Impagliazzo and Wigderson~\cite{ImpagliazzoWigderson97}) can in fact be obtained using certain error-correcting codes based on multivariate polynomials (as shown by Sudan, Trevisan and Vadhan~\cite{SudanTV01}). Such a worst-case to average-case reduction is also needed in the algebraic setting, but as multivariate polynomials are one source of this reduction in the boolean regime, it is natural to expect it to be easier in the algebraic setting. Specifically, the notion of average-case hardness for a polynomial $f(\vx)$ used in Kabanets-Impagliazzo~\cite{KabanetsImpagliazzo04} is that for any $g(\vx,y)$ satisfying $g(\vx,f(\vx))=0$, it must be that $g$ then requires large algebraic circuits (by taking $g(\vx,y):= y-f(\vx)$ this implies $f$ itself requires large circuits). This can be interpreted as average-case hardness because if such a $g$ existed with a small circuit, then for any value ${\vec{\alpha}}$ we have that $g({\vec{\alpha}},y)$ is a univariate polynomial that vanishes on $f({\vec{\alpha}})$. By factoring this univariate (which can be done efficiently), we see that such $g$ give a small list (of size at most $\deg g$) of possible values for $f({\vec{\alpha}})$. By picking a random element from this list, one can correctly compute $f(\vx)$ with noticeable probability, which by an averaging argument one can convert to a (non-uniform) deterministic procedure to compute $f(\vx)$ on most inputs (over any fixed finite set). While this procedure (involving univariate factorization) is not an algebraic circuit, the above argument shows that the Kabanets-Impagliazzo~\cite{KabanetsImpagliazzo04} notion is a natural form of average case hardness. To obtain this form of average-case hardness from worst-case hardness, Kabanets and Impagliazzo~\cite{KabanetsImpagliazzo04} used a result of Kaltofen~\cite{Kaltofen89}, who showed that (up to pathologies in low-characteristic fields), factors of small (general) circuits have small circuits. As $g(\vx,f(\vx))=0$ iff $y-f(\vx)$ divides $g(\vx,y)$, it follows that if $g(\vx,y)$ has a small circuit then so does $y-f(\vx)$, and thus so does $f(\vx)$. Taking the contrapositive, if $f$ requires large circuits (worst-case hardness) then any such $g(\vx,y)$ with $g(\vx,f(\vx))=0$ also requires large circuits (average-case hardness). Note that this says that \emph{any} worst-case hard polynomial is \emph{also} average-case hard. In contrast, this is provably false for boolean functions, where such worst-case to average-case reductions thus necessarily modify the original function. Unfortunately, Kaltofen's~\cite{Kaltofen89} factoring algorithm does not preserve structural restrictions (such as multilinearity, homogeneousness, low-depth, read-once-ness, etc.) of the original circuit, so that obtaining average-case hardness for restricted classes of circuits requires worst-case hardness for much stronger classes. While follow-up work has reduced the complexity of the circuits resulting from Kaltofen's~\cite{Kaltofen89} algorithm (Dvir-Shpilka-Yehudayoff~\cite{DvirSY09} and Oliveira~\cite{Oliveira15} extended Kaltofen's~\cite{Kaltofen89} to roughly preserve the depth of the original computation) these works are limited to factoring polynomials of small individual degree and do not seem applicable to other types of computations such as roABPs. Indeed, it even remains an open question to show any non-trivial upper bounds on the complexity of the factors of sparse polynomials. In fact, we actually have non-trivial \emph{lower} bounds. Specifically, von zur Gathen and Kaltofen~\cite{vzGathenKaltofen85} gave an explicit $s$-sparse polynomial (over any field) which has a factor with $s^{\Omega(\log s )}$ monomials, and Volkovich~\cite{Volkovich15} gave, for a prime $p$, an explicit $n$-variate $n$-sparse polynomial of degree-$p$ which in characteristic $p$ has a factor with $\binom{n+p-2}{n-1}$ monomials (an exponential separation for $p\ge\poly(n)$). We refer the reader to the survey of Forbes and Shpilka~\cite{ForbesShpilka15} for more on the challenges in factoring small algebraic circuits. While showing the equivalence of worst-case and average-case hardness for restricted circuit classes seems difficult, to derandomize PIT via Kabanets-Impagliazzo~\cite{KabanetsImpagliazzo04} only requires a \emph{single} polynomial which is average case hard. To facilitate obtaining such hard polynomials, we now record an easy lemma showing that polynomials with only hard multiples are average-case hard. \begin{lemma}\label{res:lbs-mult_to_nonroot} Let $f(\vx)\in\mathbb{F}[\vx]$ and $g(\vx,y)\in\mathbb{F}[\vx,y]$ both be nonzero, where $g(\vx,0)\ne 0$ also. If $g(\vx,f(\vx))=0$ then $g(\vx,0)$ is a nonzero multiple of $f(\vx)$. \end{lemma} \begin{proof} Let $g(\vx,y)=\sum_i g_i(\vx)y^i$ and $g_0(\vx):= g(\vx,0)$. That $g(\vx,f(\vx))=0$ implies that \begin{align*} 0 =g(\vx,f(\vx)) =\sum_i g_i(\vx)(f(\vx))^i =g_0(\vx)+\sum_{i\ge 1} g_i(\vx)(f(\vx))^i \end{align*} so that $g_0(\vx)=f(\vx)\cdot \left(-\sum_{i\ge 1} g_i(\vx)(f(\vx))^{i-1}\right)$ as desired. \end{proof} That is, saying that $f(\vx)$ is \emph{not} average-case hard means that $g(\vx,f(\vx))=0$ for a nonzero $g(\vx,y)$. One can assume that $g(\vx,0)\ne 0$, as otherwise one can replace $g$ by $\nicefrac{g}{y^i}$ for some $i\le \deg g$, as this only mildly increases the size for most measures of circuit size (see for example \autoref{sec:h-ips:ips=h-ips}). As then the complexity of $g(\vx,0)$ is bounded by that of $g(\vx,y)$ (for natural measures), the lemma shows then that $f$ has a nonzero multiple of low-complexity. Taken contrapositively, if $f$ only has hard nonzero multiples then it is average-case hard in the sense needed for Kabanets-Impagliazzo~\cite{KabanetsImpagliazzo04}. This shows that lower bounds for multiples is essentially the lower bound needed for algebraic hardness versus randomness.\footnote{However, it is not an exact equivalence between lower bounds for multiples and average case hardness, as the converse to \autoref{res:lbs-mult_to_nonroot} is false, as seen by considering $g(x,y):= y-x(x+1)$, so that $x|g(x,0)$ but $g(x,x)\ne 0$.} While in the below sections we are able to give explicit polynomials with hard multiples for various restricted classes of algebraic circuits, some of these classes (such as sparse polynomials and roABPs) still do not have the required closure properties to use Kabanets-Impagliazzo~\cite{KabanetsImpagliazzo04} to obtain deterministic PIT algorithms. Even for classes with the needed closure properties (such as $\sumpow{\O(1)}$ formulas, where the hard polynomial is the monomial), the resulting PIT algorithms are only worse than existing results (which for $\sumpow{\O(1)}$ formulas is the result of Forbes~\cite{Forbes15}). However, it seems likely that future results establishing polynomials with hard multiples would imply new PIT algorithms. \subsection{Lower Bounds for Multiples via PIT}\label{sec:lb-via-pit} This above discussion shows that obtaining lower bounds for multiples is sufficient for instantiating the hardness versus randomness paradigm. We now observe the converse, showing that one can obtain such polynomials with hard multiples via derandomizing (black-box) PIT, or equivalently, producing generators with small seed-length. That is, Heintz-Schnorr~\cite{HeintzSchnorr80} and Agrawal~\cite{Agrawal05} showed that one can use explicit generators for small circuits to obtain hard polynomials, and we observe here that the resulting polynomials also have only hard multiples. Thus the below claim shows that obtaining black-box PIT yields the existence of a polynomial with hard multiples, which yields average-case hardness, which (for general enough classes) will allow the Kabanets-Impagliazzo~\cite{KabanetsImpagliazzo04} reduction to again yield black-box PIT\@. Thus, we see that obtaining such polynomials with hard multiples is essentially what is needed for this hardness versus randomness approach. Note that we give the construction based on a non-trivial \emph{generator} for a class of circuits. While one can analogously prove the \emph{hitting-set} version of this claim, it is weaker. That is, it is possible to consider classes $\mathcal{C}$ of unbounded degree and still have generators with small seed-length (see for example \autoref{res:SVb-gen} below), but for such classes one must have hitting sets with infinite size (as hitting univariate polynomials of unbounded degree requires an infinite number of points). \begin{lemma}\label{res:generator_to_lbs-mult} Let $\mathcal{C}\subseteq\mathbb{F}[\vx]$ be a class of polynomials and let ${\vec{\cG}}:\mathbb{F}^\ell\to\mathbb{F}^\vx$ be a generator for $\mathcal{C}$. Suppose $0\ne h\in\mathbb{F}[\vx]$ has $h\circ {\vec{\cG}}=0$. Then for any nonzero $g\in\mathbb{F}[\vx]$ we have that $g\cdot h\notin \mathcal{C}$. \end{lemma} \begin{proof} By definition of ${\vec{\cG}}$, for any $f\in\mathcal{C}$, $f=0$ iff $f\circ {\vec{\cG}}=0$. Then for any nonzero $g$, $g\cdot h\ne 0$ and $(g\cdot h)\circ {\vec{G}}\@ifnextchar{^}{\!\:}{}=(g\circ {\vec{\cG}})\cdot (h\cdot {\vec{\cG}})=(g\circ {\vec{\cG}}) \cdot 0=0$. Thus, we must have that $g\cdot h\notin\mathcal{C}$. \end{proof} That is, if $\ell<n$ then such an $h$ exists (as the coordinates of ${\vec{\cG}}$ are algebraically dependent) and such an $h$ can be found in exponential time by solving an exponentially-large linear system. As such, $h$ is a weakly-explicit polynomial with only hard multiples, which is sufficient for instantiating hardness versus randomness. While there are now a variety of restricted circuit classes with non-trivial (black-box) PIT results, it seems challenging to find for any given generator $\mathcal{G}$ an \emph{explicit} nonzero polynomial $f$ with $f\circ \mathcal{G}=0$. Indeed, to the best of our knowledge no such examples have ever been furnished for interesting generators. Aside from the quest for polynomials with hard multiples, this question is independently interesting as it demonstrates the limits of the generator in question, especially for generators that are commonly used. There is not even a consensus as to whether the generators currently constructed could suffice to derandomize PIT for general circuits. Agrawal~\cite{Agrawal05} has even conjectured that a certain generator for depth-2 circuits (sparse polynomials) would actually suffice for PIT of constant-depth circuits. We consider here the generator of Shpilka-Volkovich~\cite{ShpilkaVolkovich09}. This generator has a parameter $\ell$, and intuitively can be seen as an algebraic analogue of the boolean pseudorandomness notion of a (randomness efficient) $\ell$-wise independent hash function. Just as $\ell$-wise independent hash functions are ubiquitous in boolean pseudorandomness, the Shpilka-Volkovich~\cite{ShpilkaVolkovich09} generator has likewise been used in a number of papers on black-box PIT (for example \cite{ShpilkaVolkovich09,AndersonvMV11,ForbesShpilka13a,ForbesSS14,Volkovich15,Forbes15} is a partial list). As such, we believe it is important to understand the limits of this generator. However, $\ell$-wise independence is a \emph{property} of a hash function and likewise the Shpilka-Volkovich~\cite{ShpilkaVolkovich09} generator is really a family of generators that all share a certain property. Specifically, the map $\GSV{\ell,n}:\mathbb{F}^{r}\to\mathbb{F}^n$ has the property\,\footnote{The most obvious algebraic analogue of an $\ell$-wise independent hash function would require that for a generator ${\vec{G}}\@ifnextchar{^}{\!\:}{}:\mathbb{F}^r\to\mathbb{F}^n$ that any subset $S\subseteq[n]$ with $|S|\le \ell$ the output of ${\vec{G}}\@ifnextchar{^}{\!\:}{}$ restricted to $S$ is all of $\mathbb{F}^{S}$. This property is implied by the Shpilka-Volkovich~\cite{ShpilkaVolkovich09} property, but is strictly weaker, and is in fact too weak to be useful for PIT\@. That is, consider the map $(x_1,\ldots,x_n)\mapsto (x_1,\ldots,x_n,x_1+\cdots+x_n)$. This map has this naive ``algebraic $n$-wise independence'' property, but does not even fool linear polynomials (which the Shpilka-Volkovich~\cite{ShpilkaVolkovich09} generator does).} that the image $\GSV{\ell,n}(\mathbb{F}^r)$ contains all $\ell$-sparse vectors in $\mathbb{F}^n$. The most straightforward construction of a randomness efficient generator with this property (via Lagrange interpolation, given by Shpilka-Volkovich~\cite{ShpilkaVolkovich09}) has that $r=2\ell$. Even this construction is actually a family of possibly constructions, as there is significant freedom to choose the finite set of points where Lagrange interpolation will be performed. As such, instead of studying a specific generator we seek to understand the power of the above \emph{property}, and thus we are free to construct another generator $\GSVb{\ell,n}$ with this property for which we can find an explicit nonzero $f$ where $f\circ \GSVb{\ell,n}=0$ for small $\ell$. We choose a variant of the original construction so that we can take $f$ as the determinant. In the original Shpilka-Volkovich~\cite{ShpilkaVolkovich09} generator, one first obtains the $\ell=1$ construction by using two variables, the control variable $y$ and another variable $z$. By using Lagrange polynomials to simulate indicator functions, the value of $y$ can be set to choose between the outputs $z{\vec{e}}\@ifnextchar{^}{\!\:}{}_1,\ldots,z{\vec{e}}\@ifnextchar{^}{\!\:}{}_n\in\mathbb{F}[z]^n$, where ${\vec{e}}\@ifnextchar{^}{\!\:}{}_i\in\mathbb{F}^n$ is the $i$-th standard basis vector. By varying $z$ one obtains all $1$-sparse vectors in $\mathbb{F}^n$. To obtain $\GSV{\ell,n}$ one can sum $\ell$ independent copies of $\GSV{1,n}$. In contrast, our construction will simply use a different control mechanism, where instead of using univariate polynomials we use bivariates. \begin{construction}\label{const:SVb} Let $n,\ell\ge 1$. Let $\mathbb{F}$ be a field of size $\ge n$. Let $\Omega:=\{\omega_1,\ldots,\omega_n\}$ be distinct elements in $\mathbb{F}$. Define $\GSVb{1,n^2}:\mathbb{F}^3\to\mathbb{F}^{n\times n}$ by \[ \left(\GSVb{1,n^2}(x,y,z)\right)_{i,j}=z\cdot \ind{\omega_i,\Omega}(x)\cdot\ind{\omega_j,\Omega}(y) \;. \] where $\ind{\omega_i,\Omega}(x)\in\mathbb{F}[x]$ is the unique univariate polynomial of degree $<n$ such that \[ \ind{\omega_i,\Omega}(\omega_j)= \begin{cases} 1 & j=i\\ 0 & \text{else} \end{cases} \;. \] Define $\GSVb{\ell,n^2}:\mathbb{F}^{3\ell}\to\mathbb{F}^{n\times n}$ by the polynomial map \[ \GSVb{\ell,n^2}(x_1,y_1,z_1,\ldots,x_\ell,y_\ell,z_\ell):=\GSVb{1,n^2}(x_1,y_1,z_1)+\cdots+\GSVb{1,n^2}(x_\ell,y_\ell,z_\ell) \;, \] working in the ring $\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{}]$. \end{construction} Note that this map has $n^2$ outputs. Now observe that it is straightforward to see that this map has the desired property. \begin{lemmawp} Assume the setup of \autoref{const:SVb}. Then the image of the generator, $\GSVb{\ell,n^2}(\mathbb{F}^{3\ell})$, contains all $\ell$-sparse vectors in $\mathbb{F}^{n\times n}$. \end{lemmawp} To the best of the authors knowledge, existing works using the Shpilka-Volkovich~\cite{ShpilkaVolkovich09} generator\,\footnote{Note that for black-box PIT it is important that we use a \emph{generator} that contains all sparse vectors, instead of just the \emph{set} of sparse vectors. As an example, the monomial $x_1\cdots x_n$ is zero on all $k$-sparse vectors for $k<n$, but is nonzero when evaluated on the Shpilka-Volkovich~\cite{ShpilkaVolkovich09} generator for any $\ell\ge 1$.} only use the above property (and occasionally also the fact that a coordinate-wise sum of constantly-many such generators is a generator of the original form with similar parameters (\cite{AgrawalSS13,ForbesSS14,GurjarKST15,Forbes15}), which our alternate construction also satisfies). As such, we can replace the standard construction with our variant in known black-box PIT results (such as \cite{ShpilkaVolkovich09,AgrawalSS13,ForbesShpilka13a,ForbesSS14,GurjarKST15,Forbes15}), some of which we now state. \begin{corollary}\label{res:SVb-gen} Assume the setup of \autoref{const:SVb}. Then $\GSVb{O(\log s),n^2}$ is a generator for the following classes of $n$-variate polynomials, of arbitrary degree. \begin{itemize} \item Polynomials of sparsity $s$ (\cite{ShpilkaVolkovich09,GurjarKST15,Forbes15}). \item Polynomials computable as a depth-$3$ powering formula of top-fan-in $s$ (\cite{AgrawalSS13,ForbesShpilka13a}). \item Polynomials computable as a \sumpow{\O(1)} formula of top-fan-in $s$ (\cite{Forbes15}), in characteristic zero. \item Polynomials computable by width-$s$ roABPs in every variable order, also known as commutative roABPs (\cite{AgrawalSS13,ForbesSS14}). \end{itemize} \end{corollary} The above result shows the power of the $\GSVb{\ell,n^2}$ generator to hit restricted classes of circuits. We now observe that it is also limited by its inability to hit the determinant. \begin{proposition} Assume the setup of \autoref{const:SVb}. The output of $\GSVb{\ell,n^2}$ is an $n\times n$ matrix of rank $\le \ell$, when viewed as a matrix over the ring $\mathbb{F}(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})$. Thus, taking $\det_n\in\mathbb{F}[X]$ to be the $n\times n$ determinant, we have that $\det_n\circ \;\GSVb{\ell,n^2}=0$ for $\ell<n$. \end{proposition} \begin{proof} \uline{$\ell=1$:} For a field $\K$, a (nonzero) matrix $M\in \K^{n\times n}$ is rank-1 if it can be expressed as an outer-product, so that $(M)_{i,j}=\alpha_i\beta_j$ for ${\vec{\alpha}},{\vec{\beta}}\in \K^n$. Taking ${\vec{\alpha}},{\vec{\beta}}\in\mathbb{F}(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{},{\vec{z}}\@ifnextchar{^}{\!\:}{})^n$ defined by $\alpha_i:= z\ind{\omega_i,\Omega}(x)$ and $\beta_j:=\ind{\omega_j,\Omega}(y)$ we immediately see that $\GSVb{1,n^2}(x,y,z)$ is rank-1. \uline{$\ell>1$:} This follows as rank is subadditive, and $\GSVb{\ell,n^2}$ is the sum of $\ell$ copies of $\GSVb{1,n^2}$. \uline{$\det_n$ vanishes:} This follows as the $n\times n$ determinant vanishes on matrices of rank $<n$. \end{proof} Note that in the above we could hope to find an $f$ such that $f\circ \GSVb{\ell,n^2}=0$ for all $\ell<n^2$, but we are only able to handle $\ell<n$. Given the above result, along with \autoref{res:generator_to_lbs-mult}, we obtain that the multiples of the determinant are hard. \begin{corollary}\label{res:lbs-mult:pit:det} Let $\det_n\in\mathbb{F}[X]$ denote the $n\times n$ determinant. Then any nonzero multiple $f\cdot \det_n$ of $\det_n$, for $0 \ne f\in\mathbb{F}[X]$, has the following lower bounds. \begin{itemize} \item $f\cdot \det_n$ involves $\exp(\Omega(n))$ monomials. \item $f\cdot \det_n$ requires size $\exp(\Omega(n))$ to be expressed as a depth-$3$ powering formula. \item $f\cdot \det_n$ requires size $\exp(\Omega(n))$ to be expressed as a \sumpow{\O(1)} formula, in characteristic zero. \item $f\cdot \det_n$ requires width-$\exp(\Omega(n))$ to be computed as an roABP in some variable order. \end{itemize} \end{corollary} \begin{proof} By \autoref{res:SVb-gen}, $\GSVb{O(\log s),n^2}$ is a generator for the above size-$s$ computations in the above classes. However, following \autoref{res:generator_to_lbs-mult}, $(f\cdot\det_n)\circ \left(\GSVb{\ell,n^2}\right)=0$ for $\ell<n$. Thus, if $f\cdot \det_n$ (which is nonzero) is computable in size-$s$ it must be that $O(\log s)\ge n$, so that $s\ge\exp(\Omega(n))$. \end{proof} Note that we crucially leveraged that the determinant vanishes on low-rank matrices. As such, the above results do not seem to imply similar results for the permanent, despite the fact that the permanent is a harder polynomial. That is, recall that because of $\VNP$-completeness of the permanent the determinant $\det_n(X)$ can be written as a projection of the permanent, so that $\det_n(X)=\perm_m(A(X))$ for an affine matrix $A(X)\in\mathbb{F}[X]^{m\times m}$ with $m\le \poly(n)$. Then, given a multiple $g(Y)\cdot\perm_m(Y)$ one would like to use this projection to obtain $g(A(X))\perm_m( A(X))=g(A(X))\det_n X$, which is a multiple of $\det_n$. Unfortunately this multiple may not be a \emph{nonzero multiple}: it could be that $g(A(X))=0$, from which no lower bounds for $g(A(X))\det_n(X)$ (and hence $g(Y)\perm_m (Y)$) can be derived. \subsection{Lower Bounds for Multiples via Leading/Trailing Monomials}\label{sec:lbs-mult:LM} We now use the theory of leading (and trailing) monomials to obtain explicit polynomials with hard multiples. We aim at finding as simple polynomials as possible so they will give rise to simple ``axioms'' with no small refutations for our proof complexity applications in \autoref{sec:ips-mult}. These results will essentially be immediate corollaries of previous work. \subsubsection{Depth-3 Powering Formulas} Kayal~\cite{Kayal08} observed that using the partial derivative method of Nisan and Wigderson~\cite{NisanWigderson96} one can show that these formulas require $\exp(\Omega(n))$ size to compute the monomial $x_1\cdots x_n$. Forbes and Shpilka~\cite{ForbesShpilka13a} later observed that this result can be made \emph{robust} by modifying the \emph{hardness of representation} technique of Shpilka and Volkovich~\cite{ShpilkaVolkovich09}, in that similar lower bounds apply when the leading monomial involves many variables, as we now quote. \begin{theoremwp}[Forbes-Shpilka~\cite{ForbesShpilka13a}]\label{res:lbs-mult:LM:sumpowsum} Let $f(\vx)\in\mathbb{F}[\vx]$ be computed a \ensuremath{\sum\pow\sum}\xspace formula of size $\le s$. Then the leading monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}=\LM(f)$ involves $\ellzero{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\le \lg s$ variables. \end{theoremwp} We now note that as the leading monomial is multiplicative (\autoref{res:hom_LM-TM_mult}) this lower bound automatically extends to multiples of the monomial. \begin{corollary}\label{res:lbs-mult:sumpowsum} Any nonzero multiple of $x_1\cdots x_n$ requires size $\ge 2^n$ to be computed as a \ensuremath{\sum\pow\sum}\xspace formula. \end{corollary} \begin{proof} Consider any $0\ne g(\vx)\in\mathbb{F}[x_1,\ldots,x_n]$. Then as the leading monomial is multiplicative (\autoref{res:hom_LM-TM_mult}) we have that $\LM(g\cdot x_1\cdots x_n)=\LM(g)\cdot x_1\cdots x_n$, so that $\LM(g\cdot x_1\cdots x_n)$ involves $n$ variables. By the robust lower bound (\autoref{res:lbs-mult:LM:sumpowsum}) this implies $g(\vx)\cdot x_1\cdots x_n$ requires size $\ge 2^n$ as a $\ensuremath{\sum\pow\sum}\xspace$ formula. \end{proof} \subsubsection{\texorpdfstring{$\sumpow{\O(1)}$ Formulas}{Sums of Powers of Low-Degree Polynomials}} Kayal~\cite{Kayal12} introduced the method of shifted partial derivatives, and Gupta-Kamath-Kayal-Saptharishi~\cite{GuptaKKS14} refined it to give exponential lower bounds for various sub-models of depth-4 formulas. In particular, it was shown that the monomial $x_1\cdots x_n$ requires $\exp(\Omega(n))$-size to be computed as a \sumpow{\O(1)} formula. Applying the hardness of representation approach of Shpilka and Volkovich~\cite{ShpilkaVolkovich09}, Mahajan-Rao-Sreenivasaiah~\cite{MahajanRS14} showed how to develop a deterministic black-box PIT algorithm for \emph{multilinear} polynomials computed by $\sumpow{\O(1)}$ formulas. Independently, Forbes~\cite{Forbes15} (following Forbes-Shpilka~\cite{ForbesShpilka13a}) showed that this lower bound can again be made to apply to leading monomials\,\footnote{The result there is stated for trailing monomials, but the argument equally applies to leading monomials.} (which implies a deterministic black-box PIT algorithm for \emph{all} $\sumpow{\O(1)}$ formulas, with the same complexity as Mahajan-Rao-Sreenivasaiah~\cite{MahajanRS14}). This leading monomial lower bound, which we now state, is important for its applications to polynomials with hard multiples. \begin{theoremwp}[Forbes~\cite{Forbes15}]\label{res:sumpowsumprodt_TM-ubs} Let $f(\vx)\in\mathbb{F}[\vx]$ be computed as a $\sumpow{t}$ formula of size $\le s$. If $\chara(\mathbb{F})\ge \ideg(\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{})$, then the leading monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}=\LM(f)$ involves $\ellzero{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\le O(t\lg s)$ variables. \end{theoremwp} As for depth-$3$ powering formulas (\autoref{res:lbs-mult:sumpowsum}), this immediately yields that all multiples (of degree below the characteristic) of the monomial are hard. \begin{corollarywp}\label{res:lbs-mult:sumpowt} All nonzero multiples of $x_1\cdots x_n$ of degree $<\chara(\mathbb{F})$ require size $\ge\exp(\Omega(\nicefrac{n}{t}))$ to be computed as $\sumpow{t}$ formula. \end{corollarywp} \subsubsection{Sparse Polynomials} While the above approaches for $\ensuremath{\sum\pow\sum}\xspace$ and $\sumpow{\O(1)}$ formulas focus on leading monomials, one cannot show that the leading monomials of sparse polynomials involve few variables as sparse polynomials can easily compute the monomial $x_1\cdots x_n$. However, following the \emph{translation} idea of Agrawal-Saha-Saxena~\cite{AgrawalSS13}, Gurjar-Korwar-Saxena-Thierauf~\cite{GurjarKST15} showed that sparse polynomials under full-support translations have \emph{some} monomial involving few variables, and Forbes~\cite{Forbes15} (using different techniques) showed that in fact the \emph{trailing} monomial involving few variables (translations do not affect the leading monomial, so the switch to trailing monomials is necessary here). \begin{theoremwp}[Forbes~\cite{Forbes15}]\label{res:transdiff_TM-ub_sparse} Let $f(\vx)\in\mathbb{F}[\vx]$ be $(\le s)$-sparse, and let ${\vec{\alpha}}\in(\mathbb{F}\setminus\{0\})^n$ so that ${\vec{\alpha}}$ has full-support. Then the trailing monomial $\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}=\TM(f(\vx+{\vec{\alpha}}))$ involves $\ellzero{{\vec{a}}\@ifnextchar{^}{\!\:}{}}\le \lg s$ variables. \end{theoremwp} This result thus allows one to construct polynomials whose multiples are all non-sparse. \begin{corollary}\label{res:lbs-mult:sparse-LM} All nonzero multiples of $(x_1+1)\cdots (x_n+1)\in\mathbb{F}[\vx]$ require sparsity $\ge 2^n$. Similarly, all nonzero multiples of $(x_1+y_1)\cdots (x_n+y_n)\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$ require sparsity $\ge 2^n$. \end{corollary} \begin{proof} Define $f(\vx)=\prod_{i=1}^n (x_i+1)$. For any $0\ne g(\vx)\in\mathbb{F}[\vx]$ the multiple $g(\vx)f(\vx)$ under the translation $\vx\mapsto \vx-{\vec{1}}$ is equal to $g(\vx-{\vec{1}})\prod_i x_i$. Then all monomials (in particular the trailing monomial) involves $n$ variables (as $g(\vx)\ne 0$ implies $g(\vx-{\vec{1}})\ne 0$). Thus, by \autoref{res:transdiff_TM-ub_sparse} it must be that $g(\vx)f(\vx)$ requires $\ge 2^n$ monomials. The second part of the claim follows as the first, where we now work over the fraction field $\mathbb{F}({\vec{y}}\@ifnextchar{^}{\!\:}{})[\vx]$, noting that this can only decrease sparsity. Thus, using the translation $\vx\mapsto\vx-{\vec{y}}\@ifnextchar{^}{\!\:}{}$ the above trailing monomial argument implies that the sparsity of nonzero multiples $\prod_i (x_i+y_i)$ are $\ge 2^n$ over $\mathbb{F}({\vec{y}}\@ifnextchar{^}{\!\:}{})[\vx]$ and hence also over $\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$. \end{proof} Note that it is tempting to derive the second part of the above corollary from the first, using that the substitution ${\vec{y}}\@ifnextchar{^}{\!\:}{}\leftarrow{\vec{1}}$ does not increase sparsity. However, this substitution can convert nonzero multiples of $\prod_i (x_i+y_i)$ to zero multiples of $\prod_i (x_i+1)$, which ruins such a reduction, as argued in the discussion after \autoref{res:lbs-mult:pit:det}. \subsection{Lower Bounds for Multiples of Sparse Multilinear Polynomials} While the previous section established that all multiples of $(x_1+1)\cdots (x_n+1)$ are non-sparse, the argument was somewhat specific to that polynomial and fails to obtain an analogous result for $(x_1+1)\cdots (x_n+1)+1$. Further, while that argument can show for example that all multiples of the $n\times n$ determinant or permanent require sparsity $\ge \exp(\Omega(n))$, this is the best sparsity lower bound obtainable for these polynomials with this method.\footnote{Specifically, as the determinant and permanent are degree $n$ multilinear polynomials, and thus so are their translations, their monomials always involve $\le n$ variables so no sparsity bound better than $2^n$ can be obtained by using \autoref{res:transdiff_TM-ub_sparse}.} In particular, one cannot establish a sparsity lower bound of ``$n!$'' for the determinant or permanent (which would be tight) via this method. We now give a different argument, due to Oliveira~\cite{Oliveira15b} that establishes a much more general result showing that multiples of \emph{any} multilinear polynomial have at least the sparsity of the original polynomial. While Oliveira~\cite{Oliveira15b} gave a proof using Newton polytopes, we give a more compact proof here using induction on variables (loosely inspired by a similar result of Volkovich~\cite{Volkovich15b} on the sparsity of factors of multi-quadratic polynomials). \begin{proposition}[Oliveira~\cite{Oliveira15b}]\label{res:lbs-mult:sparse:newton} Let $f(\vx)\in\mathbb{F}[x_1,\ldots,x_n]$ be a nonzero multilinear polynomial with sparsity exactly $s$. Then any nonzero multiple of $f$ has sparsity $\ge s$. \end{proposition} \begin{proof} By induction on variables. \uline{$n=0$:} Then $f$ is a constant, so that $s=1$ as $f\ne 0$. All nonzero multiples are nonzero polynomials so have sparsity $\ge 1$. \uline{$n\ge 1$:} Partition the variables $\vx=({\vec{y}}\@ifnextchar{^}{\!\:}{},z)$, so that $f({\vec{y}}\@ifnextchar{^}{\!\:}{},z)=f_1({\vec{y}}\@ifnextchar{^}{\!\:}{})z+f_0({\vec{y}}\@ifnextchar{^}{\!\:}{})$, where $f_i({\vec{y}}\@ifnextchar{^}{\!\:}{})$ has sparsity $s_i$ and $s=s_1+s_0$. Consider any nonzero $g({\vec{y}}\@ifnextchar{^}{\!\:}{},z)=\sum_{i=d_0}^{d_1} g_i({\vec{y}}\@ifnextchar{^}{\!\:}{})z^i$ with $g_{d_0}({\vec{y}}\@ifnextchar{^}{\!\:}{}),g_{d_1}({\vec{y}}\@ifnextchar{^}{\!\:}{})\ne 0$ (possibly with $d_0=d_1$). Then \begin{align*} g({\vec{y}}\@ifnextchar{^}{\!\:}{},z) f({\vec{y}}\@ifnextchar{^}{\!\:}{},z) &=\Big(f_1({\vec{y}}\@ifnextchar{^}{\!\:}{})z+f_0({\vec{y}}\@ifnextchar{^}{\!\:}{})\Big)\cdot \left(\sum_{i=d_0}^{d_1} g_i({\vec{y}}\@ifnextchar{^}{\!\:}{})z^i\right)\\ &=f_1({\vec{y}}\@ifnextchar{^}{\!\:}{})g_{d_1}({\vec{y}}\@ifnextchar{^}{\!\:}{})z^{d_1+1}+\left[\sum_{d_0<i\le d_1} \Big(f_1({\vec{y}}\@ifnextchar{^}{\!\:}{})g_{i-1}({\vec{y}}\@ifnextchar{^}{\!\:}{})+f_0({\vec{y}}\@ifnextchar{^}{\!\:}{})g_i({\vec{y}}\@ifnextchar{^}{\!\:}{})\Big)z^i\right]+f_0({\vec{y}}\@ifnextchar{^}{\!\:}{})g_{d_0}({\vec{y}}\@ifnextchar{^}{\!\:}{})z^{d_0} \;. \end{align*} By partitioning this sum by powers of $z$ so that there is no cancellation, and then discarding the middle terms, \begin{align*} \left|\supp\Big(g({\vec{y}}\@ifnextchar{^}{\!\:}{},z) f({\vec{y}}\@ifnextchar{^}{\!\:}{},z)\Big)\right| &\ge\left|\supp\Big(f_1({\vec{y}}\@ifnextchar{^}{\!\:}{})g_{d_1}({\vec{y}}\@ifnextchar{^}{\!\:}{})\Big)\right|+\left|\supp\Big(f_0({\vec{y}}\@ifnextchar{^}{\!\:}{})g_{d_0}({\vec{y}}\@ifnextchar{^}{\!\:}{})\Big)\right| \intertext{so that appealing to the induction hypothesis, as $f_0$ and $f_1$ are multilinear polynomials of sparsity $s_0$ and $s_1$ respectively,} &\ge s_1+s_0=s \;. \qedhere \end{align*} \end{proof} We note that multilinearity is essential in the above lemma, even for univariates. This is seen by noting that the 2-sparse polynomial $x^n-1$ is a multiple of $x^{n-1}+\cdots+x+1$. Thus, the above not only gives a different proof of the non-sparsity of multiples of $\prod_i (x_i+1)$ (\autoref{res:lbs-mult:sparse-LM}), but also establishes that nonzero multiples of $\prod_i (x_i+1)+1$ are $\ge 2^n$ sparse, and nonzero multiples of the determinant or permanent are $n!$ sparse, which is tight. Note further that this lower bound proof is ``monotone'' in that it applies to any polynomial with the same support, whereas the proof of \autoref{res:lbs-mult:sparse-LM} is seemingly not monotone as seen by contrasting $\prod_i (x_i+1)$ and $\prod_i (x_i+1)+1$. \subsection{Lower Bounds for Multiples by Leading/Trailing Diagonals} In the previous sections we obtained polynomials with hard multiples for various circuit classes by appealing to the fact that lower bounds for these classes can be reduced to studying the number of variables in leading or trailing monomials. Unfortunately this approach is restricted to circuit classes where monomials (or translations of monomials) are hard to compute, which in particular rules out this approach for roABPs. Thus, to develop polynomials with hard multiples for roABPs we need to develop a different notion of a ``leading part'' of a polynomial. In this section, we define such a notion called a \emph{leading diagonal}, establish its basic properties, and obtain the desired polynomials with hard multiples. The ideas of this section are a cleaner version of the techniques used in the PIT algorithm of Forbes and Shpilka~\cite{ForbesShpilka12} for commutative roABPs. \subsubsection{Leading and Trailing Diagonals} We begin with the definition of a leading diagonal, which is a generalization of a leading monomial. \begin{definition} Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$ be nonzero. The \demph{leading diagonal of $f$}, denoted $\LD(f)$, is the leading coefficient of $f(\vx\circ{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}\circ{\vec{z}}\@ifnextchar{^}{\!\:}{})$ when this polynomial is considered in the ring $\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}][z_1,\ldots,z_n]$, and where $\vx\circ{\vec{z}}\@ifnextchar{^}{\!\:}{}$ denotes the Hadamard product $(x_1z_1,\ldots,x_nz_n)$. The \demph{trailing diagonal of $f$} is defined analogously. The zero polynomial has no leading or trailing diagonal. \end{definition} As this notion has not explicitly appeared prior in the literature, we now establish several straightforward properties. The first is that extremal diagonals are homomorphic with respect to multiplication. \begin{lemma}\label{res:diagonals:mult-hom} Let $f,g\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$ be nonzero. Then $\LD(fg)=\LD(f)\LD(g)$ and $\TD(fg)=\TD(f)\TD(g)$. \end{lemma} \begin{proof} As $\LD(f)=\LC_{\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}|{\vec{z}}\@ifnextchar{^}{\!\:}{}}(f(\vx\circ{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}\circ{\vec{z}}\@ifnextchar{^}{\!\:}{}))$, where this leading coefficient is taken in the ring $\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}][{\vec{z}}\@ifnextchar{^}{\!\:}{}]$, this automatically follows from the fact that leading coefficients are homomorphic with respect to multiplication (\autoref{res:hom_LM-TM_mult}). The result for trailing diagonals is symmetric. \end{proof} We now show how to relate the leading monomials of the coefficient space of $f$ to the respective monomials associated to the leading diagonal of $f$. \begin{proposition}\label{res:diagonal:tm} Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$. For any ${\vec{b}}\@ifnextchar{^}{\!\:}{}$, if $\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(\LD(f))\ne 0$, then \[ \LMp{\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(\LD(f))}=\LMp{\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f)} \;. \] The respective trailing statement also holds. \end{proposition} \begin{proof} We prove the leading statement, the trailing version is symmetric. Let $f=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$. We can then expand $f(\vx\circ{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}\circ{\vec{z}}\@ifnextchar{^}{\!\:}{})$ as follows. \begin{align*} f(\vx\circ{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{y}}\@ifnextchar{^}{\!\:}{}\circ{\vec{z}}\@ifnextchar{^}{\!\:}{}) &=\textstyle\sum_{{\vec{c}}\@ifnextchar{^}{\!\:}{}}\left(\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right){\vec{z}}\@ifnextchar{^}{\!\:}{}^{\vec{c}}\@ifnextchar{^}{\!\:}{}\\ \intertext{choose ${\vec{c}}\@ifnextchar{^}{\!\:}{}_0$ so that $\LC_{\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}|{\vec{z}}\@ifnextchar{^}{\!\:}{}}(f)=\coeff{\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}|{\vec{z}}\@ifnextchar{^}{\!\:}{}^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0}}(f)$, we get that} &=\textstyle\left(\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}_0} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right){\vec{z}}\@ifnextchar{^}{\!\:}{}^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0}+\sum_{{\vec{c}}\@ifnextchar{^}{\!\:}{}\prec {\vec{c}}\@ifnextchar{^}{\!\:}{}_0}\left(\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right){\vec{z}}\@ifnextchar{^}{\!\:}{}^{\vec{c}}\@ifnextchar{^}{\!\:}{} \;, \end{align*} where $\LD(f)=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}_0} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ and $\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}=0$ for ${\vec{c}}\@ifnextchar{^}{\!\:}{}\succ{\vec{c}}\@ifnextchar{^}{\!\:}{}_0$. In particular, this means that for any ${\vec{b}}\@ifnextchar{^}{\!\:}{}$ we have that $\alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}=0$ for ${\vec{a}}\@ifnextchar{^}{\!\:}{}\succ{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}$. Thus we have that \begin{align*} \LMp{\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(\LD(f))} &=\textstyle\LMp{\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}\left(\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}_0} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right)}\\ &=\LMp{\alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}}}\\ &=\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}} \;, \end{align*} as we assume this leading monomial exists, which is equivalent here to $\alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\ne 0$. In comparison, \begin{align*} \LMp{\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f)} &=\textstyle\LMp{\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}\left(\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}\right)}\\ &=\textstyle\LMp{\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}}\\ &=\textstyle\LMp{\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}\succ {\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{} + \alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}}+\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec {\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}} \intertext{as $\alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}=0$ for ${\vec{a}}\@ifnextchar{^}{\!\:}{}\succ{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}$,} &=\textstyle\LMp{\alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}}+\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}\prec {\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}}\\ &=\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}} \;, \end{align*} where in the last step we again used that $\alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\ne0$. This establishes the desired equality. \end{proof} We now relate the extremal monomials of the coefficient space of $f$ to the monomials of the coefficient space of the extremal diagonals of $f$. \begin{corollary}\label{res:diagonal:lm-coeffs} Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$. Then \[ \LM(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f))\supseteq \LM(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(\LD(f))) \;. \] The respective trailing statement also holds. \end{corollary} \begin{proof} This follows as $\LM(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(\LD(f)))$ is equal to \[ \left\{\left.\LM\left(\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}\big(\LD(f)\big)\right) \, \right|\, \coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}\big(\LD(f)\big)\ne 0\right\} \;, \] but by \autoref{res:diagonal:tm} this set equals \[ \left\{\left.\LM\left(\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(f)\right) \, \right|\, \coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}\big(\LD(f)\big)\ne 0\right\} \;, \] which is clearly contained in $\LM(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f))$. \end{proof} We now observe that the number of leading monomials of the coefficient space of a leading diagonal is equal to its sparsity. \begin{lemma}\label{lem:LM-by-LD} Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$. For a polynomial $g$, let $\ellzero{g}$ denotes its sparsity. Then \[ \left|\LM\left(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}\big(\LD(f)\big)\right)\right| =\ellzero{\LD(f)} \;. \] The respective trailing statement also holds. \end{lemma} \begin{proof} We prove the claim for the leading diagonal, the trailing statement is symmetric. Note that the claim is a vacuous ``0=0'' if $f$ is zero. For nonzero $f$, express it as $f=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}} \alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ so that $\LD(f)=\sum_{{\vec{a}}\@ifnextchar{^}{\!\:}{}+{\vec{b}}\@ifnextchar{^}{\!\:}{}={\vec{c}}\@ifnextchar{^}{\!\:}{}_0}\alpha_{{\vec{a}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{\vec{a}}\@ifnextchar{^}{\!\:}{}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}=\sum_{{\vec{b}}\@ifnextchar{^}{\!\:}{}}\alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}}{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}$ for some ${\vec{c}}\@ifnextchar{^}{\!\:}{}_0\in\mathbb{N}^n$. Then $\coeff{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}^{\vec{b}}\@ifnextchar{^}{\!\:}{}}(\LD(f))=\alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}}$. As the monomials $\vx^{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{}}$ are distinct and hence linearly independent for distinct ${\vec{b}}\@ifnextchar{^}{\!\:}{}$, it follows that $\dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(\LD(f))=|\{{\vec{b}}\@ifnextchar{^}{\!\:}{}| \alpha_{{\vec{c}}\@ifnextchar{^}{\!\:}{}_0-{\vec{b}}\@ifnextchar{^}{\!\:}{},{\vec{b}}\@ifnextchar{^}{\!\:}{}}\ne 0\}|$, which is equal the sparsity $\ellzero{\LD(f)}$. \end{proof} Finally, we now lower bound the coefficient dimension of a polynomial by the sparsity of its extremal diagonals. \begin{corollarywp}\label{res:diagonal:coeff-dim-lb} Let $f\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$. Then \[ \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)\ge \ellzero{\LD(f)},\ellzero{\TD(f)} \;, \] where for a polynomial $g$, $\ellzero{g}$ denotes its sparsity. \end{corollarywp} \begin{proof} We give the proof for the leading diagonal, the trailing diagonal is symmetric. By the above, \[ \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f) \ge \left|\LM\left(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(f)\right)\right| \ge \left|\LM\left(\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}\big(\LD(f)\big)\right)\right| = \ellzero{\LD(f)} \;, \] where we passed from span to number of leading monomials (\autoref{res:dim-eq-num-TM-spn}), and then passed to the leading monomials of the leading diagonal (\autoref{res:diagonal:lm-coeffs}), and then passed to sparsity of the leading diagonal (\autoref{lem:LM-by-LD}). \end{proof} \subsubsection{Lower Bounds for Multiples for Read-Once and Read-Twice ABPs} Having developed the theory of leading diagonals in the previous section, we now turn to using this theory to obtain explicit polynomials whose nonzero multiples all require large roABPs. We also generalize this to read-$O(1)$ oblivious ABPs, but only state the results for $k=2$ as this has a natural application to proof complexity (\autoref{sec:ips-mult}). As the restricted computations considered above (\ensuremath{\sum\pow\sum}\xspace formulas and sparse polynomials) have small roABPs, the hard polynomials in this section will also have multiples requiring large complexity in these models as well and thus qualitatively reprove some of the above results. However, we included the previous sections as the hard polynomials there are simpler (being monomials or translations of monomials), and more importantly we will need those results for the proofs below. The proofs will use the characterization of roABPs by their coefficient dimension (\autoref{res:roABP-width_eq_dim-coeffs}), the lower bound for coefficient dimension in terms of the sparsity of the extremal diagonals (\autoref{res:diagonal:coeff-dim-lb}), and polynomials whose multiples are all non-sparse (\autoref{res:lbs-mult:sparse-LM}). \begin{proposition}\label{prop:good-f-roabp} Let $f(\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}):=\prod_{i=1}^n (x_i+y_i+\alpha_i)\in\mathbb{F}[x_1,\ldots,x_n,y_1,\ldots,y_n]$, for $\alpha_i\in\mathbb{F}$. Then for any $0\ne g\in\mathbb{F}[\vx,{\vec{y}}\@ifnextchar{^}{\!\:}{}]$, \[ \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(g\cdot f)\ge 2^n \;. \] In particular, all nonzero multiples of $f$ require width at least $2^n$ to be computed by an roABP in any variable order where $\vx\prec {\vec{y}}\@ifnextchar{^}{\!\:}{}$. \end{proposition} \begin{proof} Observe that leading diagonal of $f$ is insensitive to the $\alpha_i$. That is, $\LD(x_i+y_i+\alpha_i)=x_i+y_i$, so by multiplicativity of the leading diagonal (\autoref{res:diagonals:mult-hom}) we have that $\LD(f)=\prod_i (x_i+y_i)$. Thus, appealing to \autoref{res:diagonal:coeff-dim-lb} and \autoref{res:lbs-mult:sparse-LM}, \begin{align*} \dim\coeffs{\vx|{\vec{y}}\@ifnextchar{^}{\!\:}{}}(g\cdot f) &\ge \ellzero{\LD(g\cdot f)}\\ &=\ellzero{\LD(g)\cdot \LD(f)}\\ &=\textstyle\ellzero{\LD(g)\cdot \prod_i (x_i+y_i)}\\ &\ge 2^n \;. \end{align*} The claim about roABP width follows from \autoref{res:roABP-width_eq_dim-coeffs}. \end{proof} Note that this lower bound actually works in the ``monotone'' setting (if we replace \autoref{res:lbs-mult:sparse-LM} with the monotone \autoref{res:lbs-mult:sparse:newton}), as the result only uses the zero/nonzero pattern of the coefficients. The above result gives lower bounds for coefficient dimension in a \emph{fixed} variable partition. We now symmetrize this construction to get lower bounds for coefficient dimension in \emph{any} variable partition. We proceed as in \autoref{sec:lbs-fn:every-partition}, where we plant the fixed-partition lower bound into an arbitrary partition. Note that unlike that construction, we will not need auxiliary variables here. \begin{corollary}\label{cor:lbs-mult:every-partition} Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be defined by $f(\vx):=\prod_{i<j}(x_i+x_j+\alpha_{i,j})$ for $\alpha_{i,j}\in\mathbb{F}$. Then for any partition $\vx=({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$ with $m:=|{\vec{u}}\@ifnextchar{^}{\!\:}{}|=|{\vec{v}}\@ifnextchar{^}{\!\:}{}|$, and any $0\ne g\in\mathbb{F}[\vx]$, \[ \dim_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}(g\cdot f)\ge 2^m \;, \] where we treat $g\cdot f$ as a polynomial in $\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}]$. In particular, all nonzero multiples of $f$ require width $\ge 2^n$ to be computed by an roABP in any variable order. \end{corollary} \begin{proof} We can factor $f$ into a copy of the hard polynomial from \autoref{prop:good-f-roabp}, and the rest. That is, \begin{align*} f(\vx) =\prod_{i<j} (x_i+x_j+\alpha_{i,j}) =\prod_{i=1}^m(u_i+v_i+\beta_i)\cdot f'({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{}) \;, \end{align*} for some $\beta_i\in\mathbb{F}$ and nonzero $f'({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})\in\mathbb{F}[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{}]$. Thus, \[ g\cdot f =\left(g({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})\cdot f'({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})\right)\cdot \prod_{i=1}^m(u_i+v_i+\beta_i) \;. \] Noting that $g,f'$ are nonzero in $\mathbb{F}[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{}]$, they are also nonzero in $\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}]$, so that $g\cdot f$ is nonzero multiple of $\prod_{i=1}^m(u_i+v_i+\beta_i)$ in $\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}]$. Appealing to our lower bound for (nonzero) multiples of coefficient dimension (\autoref{prop:good-f-roabp}), we have that \[ \dim_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}(g\cdot f) =\dim_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}\left(g\cdot f'\cdot \prod_{i=1}^m(u_i+v_i+\beta_i)\right) \ge 2^m \;. \] The statement about roABPs follows from \autoref{res:roABP-width_eq_dim-coeffs}. \end{proof} We briefly remark that the above bound does not match the naive bound achieved by writing the polynomial $\prod_{i<j}(x_i+x_j+\alpha_{i,j})$ in its sparse representation, which has $2^{\Theta(n^2)}$ terms. The gap between the lower bound ($2^{\Omega(n)}$) and the upper bound ($2^{O(n^2)}$) is explained by our use of a complete graph to embed the lower bounds of \autoref{prop:good-f-roabp} into an arbitrary partition. As discussed after \autoref{res:lbs-fn:any-order:coeff-dim} one can use expander graphs to essentially close this gap. We now observe that the above lower bounds for coefficient dimension suffices to obtain lower bounds for read-twice oblivious ABPs, as we can appeal to the structural result of Anderson, Forbes, Saptharishi, Shpilka and Volk~\cite{AndersonFSSV16} (\autoref{thm:read-k-eval-dim}). This result shows that for any read-twice oblivious ABP that (after discarding some variables) there is a partition of the variables across which has small coefficient dimension, which is in contrast to the above lower bound. \begin{corollary}\label{cor:r2abp-multiples} Let $f\in\mathbb{F}[x_1,\ldots,x_n]$ be defined by $f(\vx):=\prod_{i<j}(x_i+x_j+\alpha_{i,j})$ for $\alpha_{i,j}\in\mathbb{F}$. Then for any $0\ne g\in\mathbb{F}[\vx]$, $g\cdot f$ requires width-$2^{\Omega(n)}$ as a read-twice oblivious ABP. \end{corollary} \begin{proof} Suppose that $g\cdot f$ has a read-twice oblivious ABP of width-$w$. By the lower-bound of Anderson, Forbes, Saptharishi, Shpilka and Volk~\cite{AndersonFSSV16} (\autoref{thm:read-k-eval-dim}), there exists a partition $\vx=({\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$ where $|{\vec{u}}\@ifnextchar{^}{\!\:}{}|,|{\vec{v}}\@ifnextchar{^}{\!\:}{}|\ge\Omega(n)$, and such that $\dim_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}(g\cdot f)\le w^4$ (where we treat $g\cdot f$ as a polynomial in $\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})[{\vec{u}}\@ifnextchar{^}{\!\:}{},{\vec{v}}\@ifnextchar{^}{\!\:}{}]$). Note that we can take enforce that the partition obeys $m:=|{\vec{u}}\@ifnextchar{^}{\!\:}{}|=|{\vec{v}}\@ifnextchar{^}{\!\:}{}|\ge\Omega(n)$, as we can balance ${\vec{u}}\@ifnextchar{^}{\!\:}{}$ and ${\vec{v}}\@ifnextchar{^}{\!\:}{}$ by pushing variables into ${\vec{w}}\@ifnextchar{^}{\!\:}{}$, as this cannot increase the coefficient dimension (\autoref{fact:roABP:closure}). However, appealing to our coefficient dimension bound (\autoref{cor:lbs-mult:every-partition}) \[ w^4\ge\dim_{\mathbb{F}({\vec{w}}\@ifnextchar{^}{\!\:}{})}\coeffs{{\vec{u}}\@ifnextchar{^}{\!\:}{}|{\vec{v}}\@ifnextchar{^}{\!\:}{}}(g\cdot f)\ge 2^m\ge 2^{\Omega(n)} \;, \] so that $w\ge2^{\Omega(n)}$ as desired. \end{proof} \section{IPS Lower Bounds via Lower Bounds for Multiples}\label{sec:ips-mult} In this section we use the lower bounds for multiples of \autoref{sec:lbs-mult} to derive lower bounds for $\mathcal{C}$-IPS proofs for various restricted algebraic circuit classes $\mathcal{C}$. The advantage of this approach over the functional lower bounds strategy of \autoref{sec:lbs-fn} is that we derive lower bounds for the general IPS system, not just its subclass linear-IPS\@. While our equivalence (\autoref{res:h-ips_v_ips}) of $\mathcal{C}$-IPS and $\mathcal{C}$-\texorpdfstring{IPS$_{\text{LIN}}$}{IPS-LIN}\xspace holds for any strong-enough class $\mathcal{C}$, the restricted classes we consider here (depth-3 powering formulas and roABPs)\,\footnote{As in \autoref{sec:lbs-mult}, we will not treat multilinear formulas in this section as they are less natural for the techniques under consideration. Further, IPS lower bounds for multilinear formulas \emph{can} be obtained via functional lower bounds (\autoref{res:lbs-fn:lbs-ips:vary-order}).} are not strong enough to use \autoref{res:h-ips_v_ips} to lift the results of \autoref{sec:lbs-fn} to lower bounds for the full IPS system. However, as discussed in the introduction, the techniques of this section can only yield lower bounds for $\mathcal{C}$-IPS refutations of systems of equations which are hard to compute within $\mathcal{C}$ (though our examples are computable by small (general) circuits). We begin by first detailing the relation between IPS refutations and multiples. We then use our lower bounds for multiples (\autoref{sec:lbs-mult}) to derive as corollaries lower bounds for \ensuremath{\sum\pow\sum}\xspace-IPS and roABP-IPS refutations. \begin{lemma}\label{res:lbs-mult:strategy} Let $f,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx\in\mathbb{F}[x_1,\ldots,x_n]$ be an unsatisfiable system of equations, where ${\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$ is satisfiable. Let $C\in\mathbb{F}[\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{}]$ be an IPS refutation of $f,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$. Then \[ 1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx) \] is a nonzero multiple of $f$. \end{lemma} \begin{proof} That $C$ is an IPS refutation means that \[ C(\vx,f,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)=1,\qquad C(\vx,0,{\vec{0}},{\vec{0}})=0 \;. \] We first show that $1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$ is a multiple of $f$, using the first condition on $C$. Expand $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$ as a univariate in $y$, so that \[ C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})=\sum_{i\ge 0} C_i(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})y^i \;, \] for $C_i\in\mathbb{F}[\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{}]$. In particular, $C_0(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})=C(\vx,0,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$. Thus, \begin{align*} 1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx) &=C(\vx,f,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)\\ &=\textstyle\left(\sum_{i\ge 0} C_i(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)f^i\right)-C_0(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)\\ &=\textstyle\sum_{i\ge 1} C_i(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)f^i\\ &=\textstyle\left(\sum_{i\ge 1} C_i(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)f^{i-1}\right)\cdot f \;. \end{align*} Thus, $1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$ is a multiple of $f$ as desired. We now show that this is a \emph{nonzero} multiple, using the second condition on $C$ and the satisfiability of ${\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$. That is, the second condition implies that $0=C(\vx,0,{\vec{0}},{\vec{0}})=C_0(\vx,{\vec{0}},{\vec{0}})$. If $1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$ is zero, then by the above we have that $C_0(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)=1$, so that $C_0(\vx,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$ is an IPS refutation of ${\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$, which contradicts the satisfiability of ${\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$ as IPS is a sound proof system. So it must then be that $1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$ is nonzero. That is, take an ${\vec{\alpha}}$ satisfying ${\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$ so that ${\vec{g}}\@ifnextchar{^}{\!\:}{}({\vec{\alpha}})={\vec{0}},{\vec{\alpha}}^2-{\vec{\alpha}}={\vec{0}}$. Substituting this ${\vec{\alpha}}$ into $C_0(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$, we have that $C_0(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)|_{\vx\leftarrow{\vec{\alpha}}}=C_0({\vec{\alpha}},{\vec{0}},{\vec{0}})$, and because $C_0(\vx,{\vec{0}},{\vec{0}})\equiv0$ in $\mathbb{F}[\vx]$ via the above we have that $C_0({\vec{\alpha}},{\vec{0}},{\vec{0}})=0$. Thus, we have that $1-C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)=1-C_0(\vx,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$ is a nonzero polynomial as its evaluation at $\vx\leftarrow{\vec{\alpha}}$ is $1$. \end{proof} The above lemma thus gives a template for obtaining lower bounds for IPS\@. First, obtain a ``hard'' polynomial $f$ whose nonzero multiples are hard for $\mathcal{C}$, where $f$ is hopefully also computable by small (general) circuits. Then find additional (simple) polynomials ${\vec{g}}\@ifnextchar{^}{\!\:}{}$ such that ${\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$ is satisfiable yet $f,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$ is unsatisfiable. By the above lemma one then has the desired IPS lower bound for refuting $f,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx$, assuming that $\mathcal{C}$ is sufficiently general. However, for our results we need to more careful as even though $C(\vx,y,{\vec{z}}\@ifnextchar{^}{\!\:}{},{\vec{w}}\@ifnextchar{^}{\!\:}{})$ is from the restricted class $\mathcal{C}$, the derived polynomial $C(\vx,0,{\vec{g}}\@ifnextchar{^}{\!\:}{},\vx^2-\vx)$ may not be, and as such we will need to appeal to lower bounds for stronger classes. We now instantiate this template, first for depth-3 powering formulas, where we use lower bounds for multiples of the stronger \sumpow{2} model. \begin{corollary}\label{res:lbs-ips:mult:sumpowsum} Let $\mathbb{F}$ be a field with $\chara(\mathbb{F})=0$. Let $f:= x_1\cdots x_n$ and $g:= x_1+\cdots+x_n-n$ with $f,g\in\mathbb{F}[x_1,\ldots,x_n]$. Then $f,g,\vx^2-\vx$ are unsatisfiable and any $\ensuremath{\sum\pow\sum}\xspace$-IPS refutation requires size at least $\exp(\Omega(n))$. \end{corollary} \begin{proof} The hypothesis $\chara(\mathbb{F})=0$ implies that $\{0,\ldots,n\}$ are distinct numbers. In particular, the system $g(\vx)=0$ and $\vx^2-\vx={\vec{0}}$ is satisfiable and has the unique satisfying assignment ${\vec{1}}$. However, this single assignment does not satisfy $f$ as $f({\vec{1}})=\prod_{i=1}^n 1=1\ne 0$, so the entire system is unsatisfiable. Thus, applying our strategy (\autoref{res:lbs-mult:strategy}), we see that for any \ensuremath{\sum\pow\sum}\xspace-IPS refutation $C(\vx,y,z,{\vec{w}}\@ifnextchar{^}{\!\:}{})$ of $f,g,\vx^2-\vx$ that $1-C(\vx,0,g,\vx^2-\vx)$ is a nonzero multiple of $f$. Let $s$ be the size of $C$ as a $\ensuremath{\sum\pow\sum}\xspace$ formula. As $g$ is linear and the boolean axioms $\vx^2-\vx$ are quadratic, it follows that $1-C(\vx,0,g,\vx^2-\vx)$ is a sum of powers of quadratics ($\sumpow{2}$) of size $\poly(s)$. As nonzero multiples of $f$ requires $\exp(\Omega(n))$-size as a \sumpow{2} formula (\autoref{res:lbs-mult:sumpowt}) it follows that $\poly(s)\ge\exp(\Omega(n))$, so that $s\ge\exp(\Omega(n))$ as desired. \end{proof} We similarly obtain a lower bound for roABP-IPS, where here we use lower bounds for multiples of read-\emph{twice} oblivious ABPs. \begin{corollary}\label{res:lbs-ips:mult:roABP} Let $\mathbb{F}$ be a field with $\chara(\mathbb{F})>n$. Let $f:= \prod_{i<j}(x_i+x_j-1)$ and $g:= x_1+\cdots+x_n-n$ with $f,g\in\mathbb{F}[x_1,\ldots,x_n]$. Then $f,g,\vx^2-\vx$ are unsatisfiable and any roABP-IPS refutation (in any variable order) requires size $\ge\exp(\Omega(n))$. \end{corollary} \begin{proof} The hypothesis $\chara(\mathbb{F})>n$ implies that $\{0,\ldots,n\}$ are distinct numbers. In particular, the system $g(\vx)=0$ and $\vx^2-\vx={\vec{0}}$ is satisfiable and has the unique satisfying assignment ${\vec{1}}$. However, this single assignment does not satisfy $f$ as $f({\vec{1}})=\prod_{i<j}(1+1-1)=1\ne0$, so the entire system is unsatisfiable. Thus, applying our strategy (\autoref{res:lbs-mult:strategy}), we see that for any roABP-IPS refutation $C(\vx,y,z,{\vec{w}}\@ifnextchar{^}{\!\:}{})$ of $f,g,\vx^2-\vx$ that $1-C(\vx,0,g,\vx^2-\vx)$ is a nonzero multiple of $f$. Let $s$ be the size of $C$ as an roABP, and we now argue that $1-C(\vx,0,g,\vx^2-\vx)$ has a small read-\emph{twice} oblivious ABP\@. First, note that we can expand $C(\vx,0,z,{\vec{w}}\@ifnextchar{^}{\!\:}{})$ into powers of $z$, so that $C(\vx,0,z,{\vec{w}}\@ifnextchar{^}{\!\:}{})=\sum_{0\le i\le s} C_i(\vx,{\vec{w}}\@ifnextchar{^}{\!\:}{})z^i$ (where we use that $s$ bounds the width and \emph{degree} of the roABP $C$). Each $C_i(\vx,{\vec{w}}\@ifnextchar{^}{\!\:}{})$ has a $\poly(s)$-size roABP (in the variable order of $C$ where $z$ is omitted) as we can compute $C_i$ via interpolation over $z$, using that each evaluation preserves roABP size (\autoref{fact:roABP:closure}). Further, as $g$ is linear, for any $i$ we see that $g^i$ can be computed by a $\poly(n,i)$-size roABP (in any variable order) (\autoref{res:sumpowsum:roABP}). Combining these facts using closure properties of roABPs under addition and multiplication (\autoref{fact:roABP:closure}), we see that $C(\vx,0,g,{\vec{w}}\@ifnextchar{^}{\!\:}{})$, and hence $1-C(\vx,0,g,{\vec{w}}\@ifnextchar{^}{\!\:}{})$, has a $\poly(s,n)$-size roABP in the variable order that $C$ induces on $\vx,{\vec{w}}\@ifnextchar{^}{\!\:}{}$. Next observe, that as each boolean axiom $x_i^2-x_i$ only refers to a single variable, substituting ${\vec{w}}\@ifnextchar{^}{\!\:}{}\leftarrow\vx^2-\vx$ in the roABP for $1-C(\vx,0,g,{\vec{w}}\@ifnextchar{^}{\!\:}{})$ will preserve obliviousness of the ABP, but now each variable will be read twice, so that $1-C(\vx,0,g,\vx^2-\vx)$ has a $\poly(s,n)$-size read-twice oblivious ABP. Now, using that nonzero multiples of $f$ requires $\exp(\Omega(n))$-size to be computed as read-twice oblivious ABPs (\autoref{cor:r2abp-multiples}) it follows that $\poly(s,n)\ge\exp(\Omega(n))$, so that $s\ge\exp(\Omega(n))$ as desired. \end{proof} We note that the above lower bound is for the \emph{size} of the roABP\@. One can also obtain the stronger result (for similar but less natural axioms) showing that the \emph{width} (and hence also the size) of the roABP must be large, but we do not pursue this as it does not qualitatively change the result. \section{Discussion}\label{sec:open-problems} In this work we proved new lower bounds for various natural restricted versions of the Ideal Proof System (IPS) of Grochow and Pitassi~\cite{GrochowPitassi14}. While existing work in algebraic proof complexity showed limitations of weak measures of complexity such as the degree and sparsity of a polynomial, our lower bounds are for stronger measures of circuit size that match many of the frontier lower bounds in algebraic circuit complexity. However, our work leaves several open questions and directions for further study, which we now list. \begin{enumerate} \item Can one obtain proof complexity lower bounds from the recent techniques for lower bounds for depth-4 circuits, such as the results of Gupta, Kamath, Kayal and Saptharishi~\cite{GuptaKKS14}? Neither of our approaches (functional lower bounds or lower bounds for multiples) currently extend to their techniques. \item Many proof complexity lower bounds are for refuting unsatisfiable $k$-CNFs, where $k=O(1)$, which can be encoded as systems of polynomial equations where each equation involves $O(1)$ variables. Can one obtain interesting IPS lower bounds for such systems? Our techniques only establish exponential lower bounds where there is at least one axiom involving $\Omega(n)$ variables. \item Given an equation $f(\vx)=0$ where $f$ has a size-$s$ circuit, there is a natural way to convert this equation to $\poly(s)$-many equations on $O(1)$ \emph{extension variables} by tracing through the computation of $f$. Can one understand how introducing extension variables affects the complexity of refuting polynomial systems of equations? This seems a viable approach to the previous question when applied to our technique of using lower bounds for multiples. \item We have shown various lower bounds for multiples by invoking the hardness of the determinant (\autoref{res:lbs-mult:pit:det}), but this does not lead to satisfactory proof lower bounds as the axioms are complicated. Can one \emph{implicitly} invoke the hardness of the determinant? For example, consider the hard matrix identities suggested by Cook and Rackoff (see for example the survey of Beame and Pitassi~\cite{BeamePitassi98}) and later studied by Soltys and Cook~\cite{SoltysCook04}. That is, consider unsatisfiable equations such as $XY-{\mathbf{I}}_n,YX-2\cdot {\mathbf{I}}_n$, where $X$ and $Y$ are symbolic $n\times n$ matrices and ${\mathbf{I}}_n$ is the $n\times n$ identity matrix. The simplest refutations known involve the determinant (see Hrube\v{s}\xspace-Tzameret~\cite{HrubesTzameret15}, and the discussion in Grochow-Pitassi~\cite{GrochowPitassi14}), can one provide evidence that computing the determinant is intrinsic to such refutations? \item The lower bounds of this paper are for the \emph{static} IPS system, where one cannot simplify intermediate computations. There are also \emph{dynamic} algebraic proof systems (see \autoref{sec:alg-proofs}), can one extend our techniques to that setting? \end{enumerate} \section*{Acknowledgments} We would like to thank Rafael Oliviera for telling us of \autoref{res:lbs-mult:sparse:newton}, Mrinal Kumar and Ramprasad Saptharishi for conversations~\cite{ForbesKS16} clarifying the roles of functional lower bounds in this work, as well as Avishay Tal for pointing out how \autoref{res:subsetsum:multlin} implies an optimal functional lower bound for sparsity (\autoref{res:subsetsum:multlin:deg-sparse}). We would also like to thank Joshua Grochow for helpful discussions regarding this work. We are grateful for the anonymous reviewers for their careful read of the paper and for their comments. {\footnotesize \bibliographystyle{customurlbst/alphaurlpp} \ifthenelse{\equal{miforbes}{miforbes}} {
{'timestamp': '2016-06-17T02:05:38', 'yymm': '1606', 'arxiv_id': '1606.05050', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05050'}
arxiv
\section{Introduction} \label{intro} During recent years, wireless ad hoc networks have received considerable attention of researchers for their increasing applications in various fields, e.g, military communications, disaster relief, rescue operations, etc. There exist different schemes for transmitting data in a wireless network. Depending on the situation, either both 0 and 1 are represented by non-zero voltage levels, or one of the bit values is represented by a zero voltage level while a non-zero voltage level is used to distinguish the other bit value. An example of the latter is the polar return-to-zero (polar-RZ) transmission scheme, where a 0 corresponds to a zero voltage level, while a 1 is represented by a non-zero voltage level. However, most existing transmission schemes utilize non-zero voltage levels for both 0 and 1 so as to distinguish between a silent and a busy channel. Communication strategies that require energy expenditure for transmitting both 0 and 1 bit values are known as {\em energy based transmission} (EbT) schemes. For example, in order to communicate a value of 278, a node will transmit the bit sequence $<1, 0, 0, 0, 1, 0, 1, 1, 0>$, consuming energy for every bit it transmits. Thus, if the energy required per bit transmitted is $e_b$, the total energy consumed to transmit the value 278 would be $9e_b$. In this paper, we propose a communication technique that first recodes a binary data in redundant radix based number (RBN) representation \cite{tagaki85} and then uses silent periods to communicate the bit value of '0'. We show that by using the redundant binary number system (RBNS) that utilizes the digits from the set \{-1, 0, 1\} to represent a number with radix 2, we can significantly reduce the number of non-zero digits that need to be transmitted. The transmission time remains linear in the number of bits used for data representation, as in the binary number system. We finally propose a MAC protocol that would support the communication of such RBN encoded data frames with a significant amount of energy savings. We have simulated our proposed transmission algorithm with both ideal device characteristics and parameters of several commercially available radio devices. The results of these experiments show that, for ideal device characteristics and even for some commercial device characteristics, the increase in energy savings with our proposed algorithm over the existing energy based transmission schemes is, on an average, equal to 69\%. \section{Related Work} \label{related} Recent research efforts on reducing energy consumption have mainly been focussed on the MAC layer design \cite{demirkol05}, optimizing data transmissions by reducing collisions and retransmissions \cite{sinha04} and through intelligent selection of paths or special architectures for sending data \cite{enz04}. A survey of routing protocols in wireless sensor networks can be found in \cite{demirkol05}. In all such schemes, the underlying communication strategy of sending a string of binary bits is {\em energy based transmissions} (EbT) \cite{zhu05,chen05}, which implies that the communication of any information between two nodes involves the expenditure of energy for the transmission of data bits. In \cite{zhu05}, a new communication strategy called {\em Communication through Silence} (CtS) has been proposed that involves the use of silent periods as opposed to energy based transmissions. CtS, however, suffers from the disadvantage of being exponential in time. An alternative strategy, called Variable-base tacit communication (VarBaTaC) has been proposed in \cite{chen05} that uses a variable radix-based information coding coupled with CtS for communication. \section{Preliminaries and Proposed Communication Scheme} \label{prelim} The redundant binary number system (RBNS) \cite{tagaki85} utilizes the digits from the set \{-1, 0, 1\} for representing numbers using radix 2. In the rest of the paper, for convenience, we denote the digit '-1' by $\bar{1}$. In RBNS, there can be more than one possible representation of a given number. For example, the number 7 can be represented as either $111$ or $100\bar{1}$ in RBNS. In this work, we utilize this property of RBNS to recode a message string so as to reduce the number of 1's in the string while transmitting the message \cite{phdthesis}. The original binary message can, however, be obtained at the receiver end by reconverting the received message from RBN to binary number system \cite{tagaki85}. The basic idea of our recoding scheme is as follows : Consider a run of $k$ 1's, $k > 1$. Let $i$ be the bit position for the first 1 in this run, $i \geq 0$ (bit position 0 refers to the least significant bit at the rightmost end). Let $v$ represent the value of this run of $k$ 1's. Then, \begin{equation} \label{rbneqn1} v = 2^i + 2^{i + 1} + 2^{i + 2} + \ldots + 2^{k + i - 1} \end{equation} Alternatively, we can rewrite equation~\ref{rbneqn1} as, \begin{equation} \label{equation2} v = 2^{k + i} - 2^i \end{equation} Equation~\ref{equation2} can be represented in RBNS by a '1' at bit position $(k + i)$ and a $\bar{1}$ at bit position $i$, while all the intermediate 1's between them are converted to 0's. Thus, a long run of 1's can equivalently be replaced by a run of 0's and only two non-zero digits, 1 and $\bar{1}$. Observe that for a run of $k$ 1's, $k > 1$, the savings in terms of the number of non-zero digits is $k - 2$. However, the number of non-zero digits remain unchanged for $k = 2$. Thus, if we keep the transmitter switched-off for 0 bit-values, the power consumption of the transmitter will be less than that in {\em energy based transmission} (EbT) schemes. Hence, by combining this approach of silent zero transmission with our RBNS-based recoding strategy, a significant reduction in the energy expenditure during data transmission can be achieved when compared to the energy based transmission (EbT) of binary data. Our proposed low energy transmission strategy involves the execution of the following two steps : \\ \noindent {\bf Algorithm TransmitRBNData} {\bf Step 1} : Recode the $n$-bit binary data frame to its equivalent RBNS data frame using steps 1.1 and 1.2 stated below. {\bf Step 1.1} : Starting from the least significant bit (lsb) position, scan the string for a run 1's of length $> 1$. A run of $k$ 1's ($k > 1$) starting from bit position $i$, is replaced by an equivalent representation consisting of a '1' at bit position $k + i$ and a $\bar{1}$ at bit position $i$, with 0's in all intermediate bit positions. \label{reduction1} {\bf Step 1.2} : Every occurrence of the bit pattern $\bar{1}1$ in a string obtained after step 1.1, is replaced by the equivalent bit pattern $0\bar{1}$. \label{reduction2} {\bf Step 2} : Transmit the RBNS data frame obtained from step 1 above. Note that the encoding process of an $n$-bit binary string to its equivalent RBNS representation can result in a RBNS string of length of either $n$ or $n + 1$ symbols. If a run of 1's of length $> 1$ ends in the most significant bit (msb), then by virtue of step 1.1 of {\em TransmitRBNData} algorithm, the symbol $1$ is placed at the position $msb + 1$. Otherwise, if the msb was 0, then the RBNS string also has exactly $n$ symbols. \begin{example} \label{examplereduction} Consider in a given binary string, a substring, say $110111$, with only one '0' trapped between runs of 1's. Then following step 1.1, we would get the string $10\bar{1}100\bar{1}$. Note the presence of the pattern $\bar{1}1$ for this trapped '0'. Application of step 1.2 of algorithm TransmitRBNData to the bit pattern $\bar{1}1$ replaces it by $0\bar{1}$, thus resulting in a further reduction in the number of non-zero symbols to be transmitted. \end{example} We now present the receiver side algorithm to receive a RBNS data frame and convert it back to binary : \\ \noindent {\bf Algorithm ReceiveRBNData} {\bf Step 1} : Receive the RBNS data frame in a buffer, say $recv\_buf$. {\bf Step 2} : Set $runflag \leftarrow false$. Now starting from lsb, scan the RBNS string in $recv\_buf$ sequentially to obtain the binary equivalent using steps 2.1 through 2.3 : {\bf Step 2.1} : If the $i^{th}$ bit, $recv\_buf[i] = \bar{1}$ then execute steps 2.1.1 and 2.1.2, otherwise execute step 2.2 : {\bf Step 2.1.1} : If $runflag = false$ then the corresponding output binary bit is 1. Also set $runflag \leftarrow true$. {\bf Step 2.1.2} : If $runflag = true$ then the corresponding output binary bit is 0. {\bf Step 2.2} : If the $i^{th}$ bit, $recv\_buf[i] = 1$ then execute steps 2.2.1 and 2.2.2, otherwise execute step 2.3 : {\bf Step 2.2.1} : If $runflag = true$ then the corresponding output binary bit is 0. Also set $runflag \leftarrow false$. {\bf Step 2.2.2} : If $runflag = false$ then the corresponding output binary bit is 1. {\bf Step 2.3} : If the $i^{th}$ bit, $recv\_buf[i] = 0$ then execute steps 2.3.1 and 2.3.2 : {\bf Step 2.3.1} : If $runflag = true$ then the corresponding output binary bit is 1. {\bf Step 2.3.2} : If $runflag = false$ then the corresponding output binary bit is 0. {\bf Step 3} : Set $i \leftarrow i + 1$ and repeat from step 2 until the entire received RBNS data frame is scanned and converted to the binary equivalent. The equivalent binary data is then passed onto the higher layers of the network stack. \begin{table*} \centering \caption{{\small Number of occurrences of runlengths for $n = 8$}} \label{table1} \begin{tabular}{|c|c|c|} \hline Runlength size ($k$) & Number of maximum & Number of \\ & \multicolumn{1}{c|}{possible values of $i_k$} & \multicolumn{1}{c|}{occurrences} \\ \hline \hline 1 & 4 & 320 \\ 2 & 3 & 144 \\ 3 & 2 & 64 \\ 4 & 1 & 28 \\ 5 & 1 & 12 \\ 6 & 1 & 5 \\ 7 & 1 & 2 \\ 8 & 1 & 1 \\ \hline \end{tabular} \end{table*} We note that the application of steps 1.1 and 1.2 of the {\em TransmitRBNData} algorithm ensures that the bit patterns $1\bar{1}$ and $\bar{1}1$ can not occur in the transmitted data. Hence, there is only a unique way of converting the received RBNS data into its binary equivalent. \section{Analysis of the Energy Savings} \label{analysis} We denote a run of 1's of length $k$ by $R_k$. Let us append a zero on left of each such $R_k, 1 \leq k \leq n$ and denote the symbol $0 \ R_k$ by $y_k$. We also denote a single zero by the symbol $y_0$. Then each such $y_k, 0 \leq k \leq n$, will be a string of length $k+1$. To find out the total number of occurrences of $R_k$'s, $1 \leq k \leq n$, in all possible $2^n$ strings of length $n$, we would first compute the total number of occurrences of exactly $i_k$ number of $y_k$'s. Let this number be denoted by the symbol $N_n^{i_k, k}$. We use a generating function based approach to derive an expression for $N_n^{i_k, k}$ in all possible binary strings of length $n$. The detailed analysis is given in \cite{phdthesis}. We have omitted it here for the sake of brevity and state only the final result as follows : For a given $n$ and $k \geq 1$, $N_n^{i_k, k}$ is given by, \begin{eqnarray*} N_n^{i_k, k} &= &i_k \sum_{r=1}^{n+1-(k+1)i_k} {{r + i_k} \choose {i_k}} \sum_{q=0}^r \sum_{j=0}^{q} (-1)^{q+j} \times \\ & &{{r+m-1-kq-j} \choose {m-kq-j}} {r \choose q} {q \choose j} \\ \end{eqnarray*} \begin{example} \label{example1} For $n=8$, $k = 2$ and $i_k = 2$, we get the number : \begin{eqnarray*} N_8^{2,2} & = & 2 {3 \choose 2} \biggl[{2 \choose 2} {1 \choose 0} {0 \choose 0} \\ & &- {0 \choose 0} {1 \choose 1} {1 \choose 0} + {{-1} \choose {-1}} {1 \choose 1} {1 \choose 1}\biggr] \\ & &+ 2 {4 \choose 2} \biggl[{2 \choose 1} {2 \choose 0} {0 \choose 0} - 0 + 0 \biggr] \\ & & + 2 {5 \choose 2} \biggl[{2 \choose 0} {3 \choose 0} {0 \choose 0} - 0 + 0 \biggr] \\ & = & 2(0 + 12 + 10) = 44\\ \end{eqnarray*} \end{example} For a given $k \geq 1$, if we now sum the expression $N_n^{i_k, k}$ for all possible values of $i_k$, $1 \leq i_k \leq \lfloor (n+1)/(k+1) \rfloor$, then we get the total number of occurrences of $R_k$ in all possible strings of length $n$. Table~\ref{table1} shows the total number of occurrences of all possible runlengths of 1's in all possible binary strings of length 8 bits. It was shown in \cite{phdthesis} that considering all possible $2^n$ binary strings of length $n$ each, the total number of 1's and $\bar{1}$'s in the RBN coded message after applying both the steps 1.1 and 1.2 of the algorithm TransmitRBNData would be $(n + 2)2^{n-2}$. \section{Experimental Results} \label{results} Experimental results demonstrate that algorithm {\em TransmitRBNData} significantly reduces the energy consumption required for transmission, for different types of application scenarios. We tested our algorithm on several popular compression benchmark test suites \cite{maxcomp,canterbury}. The results for these test suites are presented in figure~\ref{figure2}. We have omitted the detailed results for each file of the individual benchmark suites for the sake of brevity. For the purpose of the experiments, we assumed a data frame size of 1024 bits. All the reported values in figure~\ref{figure2} are with respect to energy based transmission schemes where the transmission of both '0' and '1' bit values require the expenditure of energy. The column "SiZe" mentioned in the tables and figures, refers to a silent zero (SiZe) transmission scheme introduced in \cite{phdthesis}. \begin{table*} \centering \caption{{\small Theoretical energy savings results for different radios, $n = 1024$}} \label{tabledevices} \begin{tabular}{|l||c|c|c|c|} \hline Vendor & Maxim & Chipcon & RFM & Maxim \\ part no. & 2820 & CC2510Fx & TR1000 & 1479 \\ \hline \hline Data rate (kbps) & 50 & 2.5 & 25 & 2.0 \\ Symbol duration ($\mu s$) & 20 & 400 & 40 & 500 \\ $V_{cc}$ (volts) & 2.7 & 3.0 & 3.0 & 2.7 \\ TX state, $I_{high}$ (mA) & 70.0 & 23.0 & 12.0 & 7.3 \\ Active state, $I_{low}$ (mA) & 25.0 & 7.5 & $7.0 \texttt{x} 10^{-4}$ & $0.2 \texttt{x} 10^{-6}$ \\ $t_{on}$ ($\mu s$) & 3 & 195 & 16 & 200 \\ \hline $\gamma_{SiZe}$ & 32.14\% & 33.69\% & 50.0\% & 50.0\% \\ $\gamma_{dev}$ & 48.18\% & 50.51\% & 74.95\% & 74.95\% \\ \hline \end{tabular} \end{table*} Considering the mean of the values reported for the {\em SiZe protocol}, we find that binary encoded files consists of 42.5\% zeroes on an average which thus translates into an increased energy savings of 42.5\%, as compared to an EbT transmission scheme. Application of algorithm TransmitRBNdata on binary encoded files to create RBN encoded files cause on an average, an increased savings in energy from 42.5\% to 69\%, when averaged over the values reported in figure~\ref{figure2}. Experimental results also showed that increasing the data frame size increases the fractional savings in energy as longer runs of ones can then be reduced. It increases steeply with the increase in frame size, when the size of the frames is small (8, 16, 32, 64, $\ldots$ bits) and plateaus out for larger frame sizes. We observed that in general, for frame sizes larger than 1024 bits, the increase in fractional savings is either very small or none. The results show that the maximum increase in energy savings (34.4\%) with our proposed algorithm over the SiZe protocol is obtained for the Maximum Compression test suite \cite{maxcomp}, while the minimum (21.8\%) is for the Large Canterbury suite \cite{canterbury}. From the results in figure~\ref{figure2} we see that there is an increase of $ 69\% - 42.5\% = 26.5\%$ in transmission energy savings, when averaged over all benchmark suites considered in the figure, by using the proposed {\em TransmitRBNData} algorithm over the SiZe protocol. \begin{figure*} \centerline{\psfig{file=ctsavgscongplot.eps,width=2.5in,height=2.5in}} \centering \caption{Comparison of Average Energy Savings for the Benchmark Test Suites} \label{figure2} \end{figure*} \subsection{Results Considering Device Characteristics} The effect of real life device characteristics on the energy savings was studied in details in \cite{sinhaaton07}. It was shown in \cite{sinhaaton07} that the fractional energy savings generated by the {\em TransmitRBNData} algorithm over EbT transmission scheme is, \begin{align} \gamma_{dev} & = \Bigl(1 - \frac{n + 2}{4n}\Bigr)\Bigl(1 - \frac{I_{low}}{I_{high}}\Bigr) \label{gammaequation} \end{align} while the fractional energy savings generated by the {\em SiZe} protocol compared to an EbT transmission scheme is given by, \begin{align} \gamma_{SiZe} & = \frac{I_{high} - I_{low}}{2I_{high}} = \frac{1}{2} - \frac{I_{low}}{2I_{high}} \label{gammasize} \end{align} where, $I_{high}$ and $I_{low}$ denote the current drawn in the {\em transmit} (TX) and the {\em active} states, respectively. In order to evaluate the performance of our {\em TransmitRBNData} algorithm on real-life devices, we considered some of the commercially available radios for our simulation purpose. The results of our simulation are presented in table~\ref{tabledevices}. In table~\ref{tabledevices}, $\gamma_{SiZe}$ and $\gamma_{dev}$ refer to the values obtained by substituting the corresponding device parameter values in equations~\ref{gammasize} and \ref{gammaequation}, respectively. Table~\ref{tabledevices} shows that $\gamma_{dev}$ is higher than $\gamma_{SiZe}$ by at least 16\% for Maxim 2820 and Chipcon CC2510Fx chips, while it is higher by nearly 25\% for RFM TR1000 and Maxim 1479. The values of $\gamma^{sim}_{SiZe}$ and $\gamma^{sim}_{dev}$ in figures~\ref{figure3} and \ref{figure4} refer to the energy saving results with the SiZe transmission scheme and our proposed algorithm respectively, obtained by running the simulation on the benchmark suites with the corresponding device parameters. The results show that for the TransmitRBNData algorithm, the performance in energy savings is always much better than the SiZe transmission scheme. However, while the graphs of RFM TR1000 and the Maxim 1479 devices show savings that are nearly equal to those reported in figure~\ref{figure2}, the savings are somewhat lower for the CC2510Fx and Maxim 2820, due to the fact that the current drawn in the active state for both of these devices is not negligible compared to the current in the TX state. \begin{figure*} \centerline{\hbox{ \hspace{0.0in} \subfigure{\psfig{file=devicesavingsplot1.eps,width=2.5in,height=2.5in} \hspace{0.13in} \label{figure3:a}} \subfigure{\psfig{file=devicesavingsplot2.eps,width=2.5in,height=2.5in} \label{figure3:b}} } } \hbox{\hspace{1.0in} (a) \hspace{2.67in} (b)} \caption{\small{Device Specific Energy Savings for the Maximum Compression and Calgary Test Suites}} \label{figure3} \end{figure*} \begin{figure*} \centerline{\hbox{ \hspace{0.0in} \subfigure{\psfig{file=devicesavingsplot3.eps,width=2.5in,height=2.5in} \hspace{0.13in} \label{figure4:a}} \subfigure{\psfig{file=devicesavingsplot4.eps,width=2.5in,height=2.5in} \label{figure4:b}} } } \hbox{\hspace{1.0in} (a) \hspace{2.67in} (b)} \caption{\small{Device Specific Energy Savings for the Canterbury and Large Canterbury Test Suites}} \label{figure4} \end{figure*} \section{Medium Access Control} \label{phyissues} We present in this section a medium access control for the {\em TransmitRBNData} algorithm. Issues related to the design of a MAC protocol such as representation of RBN encoded numbers in the internal buffers at the MAC layer, consideration of suitable modulation schemes for the {\em TransmitRBNData} algorithm and receiver-transmitter synchronization for the duration of transmission of a data packet were addressed in \cite{sinhaaton07}. \subsection{RBNSiZeMAC - Asynchronous MAC Protocol} We now present RBNSiZeMAC - an asynchronous MAC protocol that allows the transmission of RBN encoded data, for single channel wireless networks. In order to transmit a frame successfully, a node must compete with other nodes within its neighborhood to win the channel for the time duration it requires to transmit its frame. It is important to prevent simultaneous transmission to the same receiving node as that would garble the frames beyond recovery. \begin{figure*} \centerline{\psfig{file=dataframe.eps,width=5in,height=0.4in}} \centering \caption{Data frame of RBNSiZeMAC protocol} \label{dataframe} \end{figure*} Our protocol uses two classes of frames : data and control. The format of the data frame is shown in figure~\ref{dataframe}. The {\em data frame} consists of three parts : i) a header ii) payload and, iii) a frame trailer. The frame header and the trailer are in binary while the payload is in RBN. The header part consists of a preamble, destination and source addresses, type, length and sync fields. Each frame starts with a {\em Preamble} of 2 bytes, each containing the bit pattern 10101010, similar to that of the IEEE 802.3 MAC header. The receiver synchronizes its clock with that of the sender on this preamble field \cite{tannenbaum}. The next two fields in the frame header are the {\em destination} and the {\em source} addresses respectively, each 6 bytes long. As in the 802.3 standard, the high order bit of the destination address is a 0 for ordinary addresses and 1 for group addresses. A frame with destination address consisting of all 1s is accepted by all nodes in the neighborhood of the transmitter. Next comes a 2 bit {\em type} field which indicates whether this is a data or a control frame. The value '00' is used to indicate a data frame while the remaining 3 possible bit patterns (01, 10 and 11) are reserved for the control frames. The 2 byte {\em length} field gives the length of the {\em payload} part of the frame. Finally, there are another 2 bytes of {\em sync} field, each consisting of the binary bit pattern 10101010 to ensure that the receiver and the sender clocks remain synchronized during the entire period of transmission of the payload. This is necessary as we assume that no signal is transmitted by the sender for the symbol $0$ in the RBN encoded payload. As our proposed algorithm {\em TransmitRBNData} can lead to the creation of long runs of 0's in the RBN encoded data, it is important to ensure that the sender and receiver clocks remain synchronized for the entire duration of the transmission of the payload. The payload field can be maximum 1500 bytes, again similar to the 802.3 frame. The payload part is followed by the binary encoded {\em frame trailer} which consists of a 4 byte {\em checksum} field computed only on the binary equivalent of the payload of the frame. The checksum algorithm is the standard cyclic redundancy check (CRC) used by IEEE 802. \begin{figure*} \centerline{\psfig{file=controlframe.eps,width=4.7in,height=0.4in}} \centering \caption{Control frame of RBNSiZeMAC protocol} \label{controlframe} \end{figure*} The format of the {\em control frame} is shown in figure~\ref{controlframe}. The control frame is in binary. It consists of a 2 byte {\em preamble}, similar to that in a data frame, followed by the destination, source and the type fields respectively. The size and interpretation of these three fields are same as in the data frame. The {\em type} field is set according to the type of the intended control message, namely RTS, CTS or ACK. The way these three message types are used is exactly the same as in the 802.11 MAC protocol \cite{tannenbaum}. This is followed by a {\em length} field which indicates the length of the payload that a node wishes to send in the data frame. In the case of a CTS or ACK frame from a receiving node, if the receiver too has some data to send to the sender, it sets the length field accordingly, otherwise it is set to zero. The last field is the usual 4 byte checksum computed over the rest of the control frame fields. Each node in the network is assumed to possess channel status sensing capability - i.e., whether the channel is idle or busy. The protocol that we propose here is a CSMA/CA (CSMA with collision avoidance) protocol, very similar to the 802.11 protocol. When a node $A$ wants to transmit, it senses the channel. If it remains idle for a time period of $b$, where $b$ is the maximum possible duration of a frame transmission in RBNSiZeMAC protocol, $A$ sends an RTS (Request to Send) control message to the receiver (say $B$). The reason for waiting for at least $b$ time is to avoid interrupting any ongoing frame transmission. Due to encoding of the payload in RBN, it is possible that there may be a long run of the symbol $0$ in the data which may otherwise be wrongly interpreted as the channel being idle without any ongoing transmission. If $B$ receives the RTS, it may decide to grant permission to $A$ to transmit, in which case it sends a CTS frame back. If $A$ does not receive any CTS from $B$ or a collision occurs for the RTS frame, each of the colliding nodes waits for a random time, using the binary exponential back-off algorithm, and then retry. The behavior of other nodes in the vicinity of both $A$ and $B$ on hearing the RTS or CTS frames is the same as in 802.11. After a frame has been sent, there is a certain amount of dead time before any node may send a frame. We define two different intervals, similar to the 802.11 \cite{tannenbaum}, for the RBNSiZeMAC protocol : \begin{enumerate} \item{The shortest interval is SIFS (Short InterFrame Spacing) that is used in exactly the same way as in 802.11. After a SIFS interval, the receiver can send a CTS in response to an RTS or an ACK to indicate a correctly received data frame.} \item{If there is no transmission after a SIFS interval has elapsed and a time NIFS (Normal InterFrame Spacing) elapses, any node may attempt to acquire the channel to send a new frame in the manner described previously. We use NIFS in exactly the same way as the 802.11 protocol uses the DIFS (DCF InterFrame Spacing) interval.} \end{enumerate} \section{Conclusion} \label{conclusion} The redundant binary number system can be used instead of the binary number system in order to increase the number of zero bits in the data. Coupled with this, the use of silent periods for communicating the 0's in the bit pattern provides a significant amount of energy savings in data transmissions. The transmission time also remains linear in the number of bits used for data representation, as in the binary number system. Simulation results on various benchmark suites show that with ideal as well as some commercial device characteristics, our proposed algorithm offers a reduction in energy consumption of 69\% on an average, when compared to existing energy based transmission schemes. Based on this transmission strategy, we have designed a MAC protocol that would support the communication of such RBN encoded data frames for asynchronous communication in a wireless network.
{'timestamp': '2016-06-16T02:13:40', 'yymm': '1606', 'arxiv_id': '1606.04935', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04935'}
arxiv
\section{Introduction} The majority problem is a special case of the heavy hitters problem. Indeed, research into the more general case was prompted by one of the solutions to the majority problem (see \cite{Boyer1991}, Sec. 5.8 and \cite{Misra1982}). Given a collection of $n$ balls, $\{x_1, ... x_n\}$, each of which is coloured with one of $m$ colours, the majority problem is to identify the colour that appears on more than $n/2$ of the balls, or to state that no such colour exists. Boyer and Moore were the first to propose a solution which they called MJRTY \cite{Boyer1991}. Soon after, Fischer and Salzberg provided an algorithm with optimal worst-case performance \cite{Fischer1982}. Matula proposed an alternative algorithm with the same worst-case performance that we refer to as the Tournament algorithm \cite{Matula1990}. All three algorithms are based on pairing balls of different colours. When there is a majority, we are guaranteed that after such a process the only unpaired balls remaining will be of the majority colour. The analysis of this problem has therefore focused on the number of comparisons. Fischer and Salzberg proved that, when there are arbitrarily many colours, $\lceil\frac{3n}{2}\rceil-2$ comparisons are necessary and sufficient \cite{Fischer1982}. Matula repeated the proof independently \cite{Matula1990} Aside from the proofs for the worst-case, all the analysis of the majority problem has been for the special case where there are only two possible colours. In that case, it has been shown that $n-\nu(n)$ comparisons are necessary and sufficient, where $\nu(n)$ is the number of 1s in the binary expansion of $n$ \cite{Saks1991,Alonso1993,Wiener2002}. Assuming that all $2^n$ possible inputs are equally probable, the average-case complexity has been shown to be lower-bounded by $\frac{2n}{3}-\sqrt{\frac{8n}{9\pi}}+\Theta(1)$ and that $\frac{2n}{3}-\sqrt{\frac{8n}{9\pi}}+O(\log n)$ comparisons are necessary and sufficient \cite{Alonso1997}. Under the same assumption, it has been shown that the average-case complexity of Boyer and Moore's MJRTY algorithm is $n - \sqrt{2n/\pi} +O(1)$ \cite{Alonso2013}. In this paper, we consider the average-case complexity of the three deterministic algorithms. We assume that there are an arbitrary number of colours and that all $n^m$ possible streams are equally likely. Our analysis is heuristic but we empirically validate our analysis with large scale simulations. \section{Boyer and Moore's MJRTY Algorithm} \subsection{Brief Description of the Algorithm} Boyer and Moore's algorithm, MJRTY, works by simulating a process of pairing balls of different colours and discarding the pairs. The algorithm uses two variables: One to store the candidate colour and one to store the number of unpaired balls of that colour. Whenever the counter is zero, the colour of the next ball drawn becomes the candidate colour; otherwise the ball that is drawn is compared to the candidate colour. If the new balls has the same colour as the candidate colour, then the counter is incremented because we have encountered another unpaired ball. If the new ball has a different colour, then the counter is decrement which represents the pairing and discarding of two unmatched balls. When this process completes, the candidate colour is the colour of the majority of balls, if a majority exists. A second pass over the stream is required to verify whether the candidate colour appears on a majority of balls. This is done by simply counting the number of times that colour is seen. The pseudocode for the algorithm can be found in the Appendix. \subsection{Analysis of the Algorithm} The number of comparisons required in the second (verification) phase is always $n$ because we have to compare every ball to the candidate without exception. The number of comparisons required in the first phase is $n$ less the number of times the counter is zero, because that is the only situation in which a comparison is not performed. The key to our analysis is to note that, although there may be an arbitrary number of colours, the problem reduces to a two-colour problem as soon as a candidate is selected. This is because the candidate counter is incremented for one colour and decremented for all other colours. When counting the number of comparisons, therefore, we only need to consider the number of comparisons needed in a two-colour problem. Let $p$ be the probability of incrementing the counter and $q = 1-p$ be the probability of decrementing the counter. We can model the algorithm's behaviour as a random walk in which we walk \textit{up} with probability $p$ and \textit{down} with probability $q$. The number of times this walk hits the horizon is equivalent to the number of times the candidate counter returns to zero. To calculate the expected number of times the walk hits the horizon, we could consider Dyck paths, since a return to zero must start at zero and return to zero. We could then create an indicator variable, $X_i$ which is 1 if the walk is at zero after $2i$ steps and 0 otherwise. Finding the expected value of $X$ would give the expected number of times the counter is zero. However, in our case the horizon is reflective such that whenever the walk is at the horizon the next step is an \textit{up}, with probability 1. Therefore, we would need to consider the Catalan Triangle numbers, $T(i,k)$, which give the number of paths of length $2i$ having $k$ returns to zero \cite[A033184]{Sloane2007}. To find the expected number of times the walk hits the horizon, we would need to sum over all values of $i$ up to $n/2$ and for each value of $i$, another sum over all values of $k$ up to $i$. This has no closed form and is extremely expensive to calculate as $n$ increases. An alternative, heuristic analysis is to consider the expected number of balls that are drawn between the counter being zero and returning to zero. In fact, we must find the expected number of balls that are drawn between the counter being one and returning to zero because whenever the counter is zero it must move to one on the next draw. This can again be modelled as a asymmetric random walk. The question now becomes the expected number of steps to go from position 1 to 0. Faris provides the solution in section 1.2 of his work Lectures on Stochastic Processes \cite{Faris2001}. The solution is $1(q-p)$. In our case, we have $p = 1/m$ and $q = 1 - 1/m$, which makes the expected number of steps required to go from one to zero equal to $m/(m-2)$. Let $t$ be the expected number of steps required to go from one to zero. $1+t$ will therefore be the expected number of balls drawn when the counter moves from zero back to zero again. Heuristically, we can say that the expected number of zeros is $n/(1+t) = n/(1+m/(m-2))$. The expected total number of comparisons is therefore: \begin{equation} E[C] = 2n - 1 - n/(1+\frac{m}{m-2}) \label{eqn:MJRTY} \end{equation} We note that this equation has no solution when there are two colours, but the average number of comparisons required in that case has already been provided by Alonso and Reingold \cite{Alonso2013}. \subsection{Experimental Validation} We validate our analysis with large scale simulations by running the MJRTY algorithm on synthetic data. We vary the number of colours, selecting 3, 5 and 10 colours. For each colour, we vary the stream length between 250 and 10,000 in steps of 250. For each stream length we create 100 streams with colours represented as integers. The streams are created so that every ``colour'' is assigned to each item uniformly at random. For every stream, the number of comparisons used by the MJRTY algorithm is recorded and compared to the expected number, using equation (\ref{eqn:MJRTY}). The expected number of comparisons is found to always be within the 99\% confidence interval of the mean number of observed comparisons. Furthermore, the relative difference between the mean of the observed number of comparisons and the expected number is on average 0.05\%, 0.04\% and 0.03\% for 3, 5 and 10 colours respectively. \begin{figure}[t] \centering \includegraphics[width=\columnwidth]{MJRTY_Method2} \caption{A comparison of the expected and actual number of comparisons for the MJRTY algorithm for 3 and 10 colours - best viewed in colour.} \label{fig:MJRTY} \end{figure} For a visual example we simulate 1,000 streams each of which is a random length between 10 and 1,000. For each stream we calculate the actual number of comparisons used and compare to the expected number. We repeat the experiment for 3 and 10 colours. Fig. \ref{fig:MJRTY} shows the results. \section{Matula's Tournament Algorithm} \subsection{Brief Description of the Algorithm} The Tournament algorithm, first proposed by Matula, is also based on the pairing off of balls but it stores the results of those comparisons to speed up verification. The algorithm maintains a set of lists where each list has an associated weight ($w = 0,1,2,3\dots$) such that every item in the list is a shorthand for $2^w$ balls of the same colour. There is also a list of discarded tuples of the form $\{v',v'',j\}$ where $v'$ and $v''$ are balls of different colours both of which are shorthand for $2^j$ balls of that colour. Initially all balls are in the list with weight 0 (this is just the initial stream). Then, in each round, pairs of balls from the same list are compared and either merged or discarded. If the two balls have the same colour, then they are merged and placed as a single entry in the next list. If they do not have the same colour, then they are formed into a tuple and added to the list of discarded tuples. The process continues until no list contains more than one ball. At this point, the candidate ball is the one in the most heavily weighted list which contains a ball A verification phase is needed in which the lists are traversed in reverse order and balls (really representing collections of balls) are compared to the candidate. A counter is maintained that is incremented by the appropriate amount for each list. Once all the lists are traversed, the discarded tuples must be examined as well. The pseudocode for the algorithm can be found in the Appendix. \subsection{Analysis of the Algorithm} In the first round of the Tournament algorithm there are $n$ balls and we therefore need $n/2$ comparisons. A ball is entered into the next round if, upon comparison, the second ball matches the first which happens with probability $1/m$. So we would expected to find $n/2m$ balls in the second round. In the second round we perform $n/4m$ comparisons and expect $n/4m^2$ balls in the third round. In general, we expect to perform $n/2^im^{i-1}$ comparisons in round $i$, starting with round 1. There are a maximum of $\log_2(n)$ rounds but if we sum to infinity, the sum simplifies. The expected number of comparisons in the first phase is therefore: \begin{equation} E[C_1] = \sum_{i=1}^\infty \frac{n}{2^im^{(i-1)}} = \frac{mn}{2m-1} \label{eqn:TournamentFirstPhase} \end{equation} During the second phase, we need to examine the balls in the lists as well as those in the discarded tuples. Let us first consider the tuples. The number of discarded tuples will depend on the number of comparisons during the first phase. A tuple is created whenever a comparison is performed and the two balls being compared have different colours. The expected number of comparisons during the first phase is given by equation (\ref{eqn:TournamentFirstPhase}) above, and the probability that two balls do not have the same colour is $1-1/m$. Heuristically, therefore, we can say that the expected number of discarded tuples is the product of equation (\ref{eqn:TournamentFirstPhase}) and $1-1/m$. But for each tuple we may have to perform one comparison (if the first ball in the tuple matches the candidate) or two comparisons (if the first ball in the tuple does not match the candidate). Since the probability of the first ball not matching the candidate is $1-1/m$, the expected number of comparisons per tuple is $2-1/m$. Putting these elements together, we can say that the expected number of comparisons in the second phase from the discarded tuples is: \begin{equation} E[C_{2D}] = \frac{mn}{2m-1}(1-\frac{1}{m})(2-\frac{1}{m}) = \frac{(1-2m)(1-m)n}{m(2m-1)} \label{eqn:TournamentSecondPhaseDiscarded} \end{equation} Finally, we also need to consider the comparisons for the lists. Once the first phase of the algorithm is completed, the lists will be empty unless they initially had an odd number of balls in which case they will contain a single ball. The expected size of list $i$ is $n/(2m)^i$, but it is not possible to say whether this is odd or even in general. However, we can iterate through the lists from $i=0$ to $i=\log_2(n)$ and if the expected size is odd then add an additional comparison. \subsection{Experimental Validation} We validate our analysis with experiments in the same way as for the MJRTY algorithm. The only difference is that for this algorithm we also include the case of two colours. The expected number of comparisons is found to always be within the 99\% confidence interval of the mean number of observed comparisons. The average relative error is 0.11\%, 0.08\%, 0.06\% and 0.05\% for 2, 3, 5 and 10 colours respectively. \begin{figure}[t] \centering \includegraphics[width=0.9\columnwidth]{Tournament_Method2} \caption{A comparison of the expected and actual number of comparisons for the Tournament algorithm for a number of different colours (best viewed in colour).} \label{fig:Tournament} \end{figure} Fig. \ref{fig:Tournament} shows the results of our second experiment with 2, 3 and 10 colours. \section{Fischer and Salzberg's Algorithm} \subsection{Brief Description of the Algorithm} The Fischer-Salzberg algorithm is also based on the principle of pairing balls but with a slight twist. Rather than pairing and discarding, the algorithm attempts to create an ordering of paired balls by having a condition that no two adjacent balls can be of the same colour. We refer to this condition as the \textit{adjacency condition}. The idea is that, if there is a majority, it will be impossible to create such an ordering \footnote{There is one exception, in the case that $n$ is odd and the first, last and every second ball is of the same colour. We do not consider this case here explicitly for simplicity but the algorithm handles such a case with no additional comparison compared to a case of no majority}. The algorithm starts by creating a list which conforms to the adjacency condition. This is achieved through two data-structures: the \textit{list} and the \textit{bucket}. Balls are drawn from the stream and compared to the current last ball in the list. If the two balls have the same colour then they cannot be placed next to each other, so instead the drawn ball is placed in the bucket. If the two balls have different colours, the drawn ball is added to the end of the list and a ball from the bucket is added afterwards (if any exist). By taking balls from the bucket and appending them to the list, it is guaranteed that all balls in the bucket have the same colour, which is also the colour of the last ball in the list. It is also part of creating a list of all the balls without breaking the adjacency condition. Once all the balls have been drawn, the last ball in the list is the candidate and will be of the majority, if one exists. However, balls may remain in the bucket and it may be possible to insert them into the list without violating the adjacency condition. If that is possible, then there is no majority. Therefore, a second phase is required which attempts to insert the balls from the bucket into the list without violating the adjacency condition. During the second phase, the list is traversed in reverse order, always comparing the last ball in the list to the candidate. If the two are the same, then the last two balls in the list are discarded because balls from the bucket cannot be inserted either at the end of the list or between the last two balls (because all balls in the bucket will be the same colour as the candidate). If they are not the same, then the last ball in the list and one from the bucket are discarded because a ball from the bucket can be inserted at the end of the list without breaking the adjacency condition. The algorithm stops if a ball is ever needed from the bucket but the bucket is empty because then we have successfully found an ordering that does not break the adjacency condition and there is no majority colour. If the entire list is traversed and at least one ball remains in the bucket, then that ball is of the majority colour. The pseudocode for the algorithm can be found in the Appendix. \subsection{Analysis of the Algorithm} The Fischer-Salzberg algorithm is extremely difficult to analyse because it is so sensitive to the order of the balls. Therefore, here we present a heuristic analysis that we show, empirically, to be extremely accurate. The first phase of the algorithm will always use $n-1$ comparisons. The number of comparisons in the second phase depends on the size of the bucket and whether or not there is a majority. During the first phase, balls are added to the bucket if they are the same colour as the last ball in the list. Otherwise, a ball is removed from the bucket. The size of the bucket can therefore be modelled as a one-dimensional random walk with probability $1/m$ of going \textit{up} and probability $1-1/m$ of going \textit{down}. There is a barrier at 0 such that when the walk is at zero, \textit{down} means staying at 0. Unfortunately, we were unable to solve this random walk to provide an expected position after $n$ steps. However, we can provide a heuristic analysis by treating the walk as if there was no barrier. When there is a majority, the probability of going up dominates. Let $\rho$ be the proportion of the majority coloured ball, then the expected position of the walk would be $n\rho - n(1-\rho) = n(2\rho-1)$ which would then be the expected size of the bucket after the first phase. The list would then have $n - n(2\rho-1) = 2n(1-\rho)$ balls in it. We would expect to traverse the list two balls at a time for $n(1-\rho)$ comparisons in the second phase. To complete this part of the analysis we need to know the value of $\rho$ - the expected proportion of balls of the majority colour. $\rho$ is the expected value of a Bernoulli distribution with probability of success $1/m$ conditioned on there being a majority of successes. We found no closed form for this but it can be calculated directly from the definition of conditional expected value (taking into account that we do not care which colour is of the majority): \begin{equation} \rho = m\sum_{x=\frac{n}{2}+1}^{n} x {n\choose x}(1/m)^x(1-1/m)^{n-x} \end{equation} When there is no majority, the expected position of the walk is negative, equating to an empty bucket. The list length is therefore equal to $n$. We must traverse the list, two balls at a time, until we encounter a non-matching ball. When there are only two colours and no majority we will have to traverse the entire list for $n/2$ comparisons. When there are more than two colours, we can model the list as a binomial distribution with ``success'' defined as encountering a non-matching ball which happens with probability $1-1/m$. The expected number of trials before encountering the first success in a binomial distribution is the reciprocal of the probability of success so we would expect to have $1/(1-1/m) = m/(m-1)$ comparisons in the second phase. Finally, to produce an overall expected number of comparisons, we must compute the probability of there being a majority. Again we model our stream as a binomial distribution with probability of success $1/m$. The probability of having a minority of successes can be directly calculated from the cumulative distribution function and from that the probability of having a majority can be found. Let $P(m)$ be the probability of having a majority and let $E_m[C]$ be the expected number of comparisons when there is a majority. We can then say that the expected number of comparisons for the Fischer-Salzberg algorithm is: \begin{equation} E[C] = (n-1) + \left(P(m)E_m[C] + (1-P(m)m/(m-1)\right) \label{eqn:FischerSalzbergExpected} \end{equation} \subsection{Experimental Validation} We validate our analysis with experiments in the same way as for the MJRTY and Tournament algorithms. The expected number of comparisons is found to always be within the 99\% confidence interval of the mean number of observed comparisons. The mean relative error was 0.03\%, 0.23\%, 0.04\% and 0.01\% for 2, 3, 5 and 10 colours respectively. The relatively high mean relative error with 3 colours is because at small stream sizes (250 and 500) the relative error was 2.27\% and 1.40\% which brought up the average. \begin{figure}[t] \centering \includegraphics[width=0.9\columnwidth]{FischerSalzberg_Method2} \caption{A comparison of the expected and actual number of comparisons for the Fischer-Salzberg algorithm for a number of different colours (best viewed in colour). The results for 3 and 10 colours overlap.} \label{fig:FischerSalzberg} \end{figure} Fig. \ref{fig:FischerSalzberg} shows the results of our second experiment. The number of comparisons with 3 and 10 colours are very similar and cannot be discerned in the graph. \section{Conclusion} \label{sec:Conclusion} \begin{figure}[tp] \centering \includegraphics[width=\columnwidth]{CompareAllMethods} \caption{A comparison of the three algorithms with five colours and varying stream length.} \label{fig:AllLengths} \end{figure} \begin{figure}[tp] \centering \includegraphics[width=\columnwidth]{CompareAllMethods_VaryingColours} \caption{A comparison of the three algorithms with varying number of colours for a stream of 5,000 balls.} \label{fig:AllColours} \end{figure} The majority problem is an interesting problem that is a special case of the heavy hitters problem. In this paper we have presented a heuristic analysis of the expected number of comparisons required by the three deterministic algorithms that appear in the literature, assuming an arbitrary number of colours. Fig. \ref{fig:AllLengths} shows a direct comparison of the three algorithms when varying the stream length but keeping the number of colours constant at five colours. Fig. \ref{fig:AllColours} shows a direct comparison of the three algorithms with a constant stream size of 5,000 balls but varying the number of colours. It is interesting to note that the most-widely discussed of the algorithms (Boyer and Moore's MJRTY) algorithm requires the largest number of comparisons. In contrast, the Fischer-Salzberg algorithm, which has been described as being ``essentially identical'' \cite{Cormode2010}, requires the fewest. Both algorithms have the same number of comparisons in the first phase but Fischer-Salzberg does some extra work in the first phase to save comparisons in the second phase. The Tournament algorithm also requires fewer comparisons than MJRTY. This is in both the first and second phase. The trade-off is the overhead of maintaining various lists. These results suggest that measuring the number of comparisons is not sufficient to fully characterise the performance of these algorithms. A fuller investigation is warranted which considers the actual execution times. Nevertheless, our analysis shows that the Tournament algorithm has the fewest expected comparisons in the first phase. It has an expected number of $mn/(2m-1)$ which, as the number of colours increases, tends to $n/2$. This compares to $n-1$ for both of the other algorithms. Since much of the later work on the more general heavy hitters problem does not consider verification (i.e. the second phase), this lower number of expected comparisons suggests that variations of the Tournament algorithm may outperform variants of the MJRTY algorithm. Furthermore, there have been proposals for a parallel version of the MJRTY algorithm \cite{Lei1993,Cafaro2011}. The Tournament algorithm, however, seems better suited for a parallel implementation and it would be interesting to see whether the overheads of parallelism result in the Tournament algorithm being more efficient than MJRTY. \bibliographystyle{elsart-num}
{'timestamp': '2018-01-08T02:06:25', 'yymm': '1606', 'arxiv_id': '1606.05123', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05123'}
arxiv
\section{Introduction} An online problem is an optimization problem for which the input is divided into small pieces, usually called requests, arriving sequentially. An online algorithm must serve each request, irrevocably, without any knowledge of possible future requests. The quality of online algorithms is traditionally measured using the competitive ratio~\cite{CompRatio1, CompRatio2}, which is essentially the worst case ratio of the online performance to the performance of an optimal offline algorithm, i.e., an algorithm that knows the whole input sequence from the beginning and has unlimited computational power. For some online problems such as Independent Set or Vertex Cover, the best possible competitive ratio is linear in the sequence length. This gives rise to the question of what would happen, if the algorithm knew {\em something} about future requests. Semi-online settings, where it is assumed that the algorithm has some specific knowledge such as the value of an optimal solution, have been studied (see \cite{BFKLM17} for many relevant references). The extra knowledge may also be more problem specific such as an access graph for paging~\cite{BIRS95,CN99}. In contrast to problem specific approaches, advice complexity~\cite{A1,A4,A2} is a quantitative and standardized way of relaxing the online constraint. The main idea of advice complexity is to provide an online algorithm, \ensuremath{\textsc{Alg}}\xspace, with some partial knowledge of the future in the form of advice bits provided by a trusted oracle which has unlimited computational power and knows the entire request sequence. Informally, the advice complexity of an algorithm is a function of input sequence length, and for a given $n$, it is the maximum number of advice bits read for input sequences of length $n$. The advice complexity of a problem is a function of input sequence length and competitive ratio, and for a given competitive ratio $c$, it is the best possible advice complexity of any $c$-competitive algorithm for the problem. Advice complexity is formally defined in Section~\ref{sec:prelim}. Upper bounds on the advice complexity for a problem can sometimes lead to (or come from) semi-online algorithms, and lower bounds can show that such algorithms do not exist. Since its introduction, advice complexity has been a very active area of research. Lower and upper bounds on the advice complexity have been obtained for a large number of online problems; a recent list can be found in~\cite{Sml2015}. For a survey on advice complexity, see~\cite{BFKLM17}. Recently in~\cite{BFKM15}, the first complexity class for online problems, \ensuremath{\mathsf{AOC}}\xspace, was introduced. The class consists of online problems that can be described in the following way: The input is a sequence of requests and each request must either be accepted or rejected. The set of accepted requests is called the solution. For each request sequence, there is at least one feasible solution. The class contains minimization as well as maximization problems. For a minimization problem, the goal is to accept as few requests as possible, while maintaining a feasible solution, and for maximization problems, the aim is to accept as many requests as possible. For minimization problems, any super set of a feasible solution is also a solution, and for maximization problems, any subset of a feasible solution is also a feasible solution. The AOC-complete problems are the hardest problems in the class in terms of their advice complexity. The class \ensuremath{\mathsf{AOC}}\xspace is formally defined in Section~\ref{sec:weightedAOC}. In this paper, we consider a generalization of the problems in the class \ensuremath{\mathsf{AOC}}\xspace in which each request comes with a weight. The goal is now to either minimize or maximize the total weight of the accepted requests. We separately consider the classes of maximization and minimization problems. For \ensuremath{\mathsf{AOC}}\xspace-complete maximization problems, we get advice complexity results quite similar to those for the unweighted versions of the problems. On the other hand, for \ensuremath{\mathsf{AOC}}\xspace-complete minimization problems, the results are a lot more negative: using less than one advice bit per request leads to unbounded competitive ratios, so this gives a complexity class containing harder problems than \ensuremath{\mathsf{AOC}}\xspace. This is in contrast to unweighted AOC-complete problems, where minimization and maximization problems are equally hard in terms of advice complexity. Recently, differences between (unweighted) AOC minimization and maximization problems were found with respect to online bounded analysis~\cite{BEFLL16} and min- and max-induced subgraph problems~\cite{KK15}. Our upper bound techniques are also useful for non-complete \ensuremath{\mathsf{AOC}}\xspace problems such as Matching in the edge arrival model, as well as non-\ensuremath{\mathsf{AOC}}\xspace problems such as Scheduling. \paragraph{Previous results.} For any \ensuremath{\mathsf{AOC}}\xspace-complete problem, $\Theta(n/c)$ advice bits are necessary and sufficient to obtain a competitive ratio of $c$. More specifically, for competitive ratio $c$, the advice complexity is $B(n,c) \pm O(\log n)$, where \begin{equation} B(n,c)= \log\left(1+\frac{(c-1)^{c-1}}{c^{c}}\right)n, \label{eq:bnc} \end{equation} and $an/c \leq B(n,c) \leq n/c$, $a = 1/(e \ln(2)) \approx 0.53$. This is an upper bound on the advice complexity of all problems in \ensuremath{\mathsf{AOC}}\xspace. In~\cite{BFKM15}, a list of problems including Independent Set, Vertex Cover, Dominating Set, and Set Cover were proven \ensuremath{\mathsf{AOC}\text{-complete}}\xspace. The paper~\cite{Amakespan} studies a semi-online version of scheduling where it is allowed to keep several parallel schedules and choose the best schedule in the end. The scheduling problem considered is makespan minimization on $m$ identical machines. Using $(1/\ensuremath{\varepsilon}\xspace)^{O(\log(1/\ensuremath{\varepsilon}\xspace))}$ parallel schedules, a $(4/3+\ensuremath{\varepsilon}\xspace)$-competitive algorithm is obtained. Moreover, a $(1+\ensuremath{\varepsilon}\xspace)$-competitive algorithm which uses $(m/\ensuremath{\varepsilon}\xspace)^{O(\log(1/\ensuremath{\varepsilon}\xspace)/\ensuremath{\varepsilon}\xspace)}$ parallel schedules is given along with an almost matching lower bound. Note that keeping $s$ different schedules until the end corresponds to working with $s$ different online algorithms. Thus, this particular semi-online model easily translates to the advice model, the advice being which of the $s$ algorithms to run. In this way, the results of~\cite{Amakespan} correspond to a $(4/3+\ensuremath{\varepsilon}\xspace)$-competitive algorithm using $O(\log^2(1/\ensuremath{\varepsilon}\xspace))$ advice bits and a $(1+\ensuremath{\varepsilon}\xspace)$-competitive algorithm using $O(\log(m/\ensuremath{\varepsilon}\xspace) \cdot \log(1/\ensuremath{\varepsilon}\xspace) / \ensuremath{\varepsilon}\xspace)$ advice bits. In particular, note that this algorithm uses constant advice in the size of the input and only logarithmic advice in the number of machines. In~\cite{Aschedule}, scheduling on identical machines with a more general type of objective function (including makespan, minimizing the $\ell_p$-norm, and machine covering) was studied. The paper considers the advice-with-request model where a fixed number of advice bits are provided along with each request. The main result is a $(1+\ensuremath{\varepsilon}\xspace)$-competitive algorithm that uses $O((1/\ensuremath{\varepsilon}\xspace) \cdot \log(1/\ensuremath{\varepsilon}\xspace))$ advice bits per request, totaling $O((n/\ensuremath{\varepsilon}\xspace) \cdot \log (1/\ensuremath{\varepsilon}\xspace))$ bits of advice for the entire sequence. \paragraph{Our results.} We prove that adding arbitrary weights, \ensuremath{\mathsf{AOC}}\xspace-complete minimization problems become a lot harder than \ensuremath{\mathsf{AOC}}\xspace-complete maximization problems: \begin{itemize} \item For \ensuremath{\mathsf{AOC}\text{-complete}}\xspace maximization problems, the weighted version is not significantly harder than the unweighted version: For any maximization problem in \ensuremath{\mathsf{AOC}}\xspace (this includes, e.g., Independent Set), the $c$-competitive algorithm given in~\cite{BFKM15} for the unweighted version of the problem can be converted into a $(1+\ensuremath{\varepsilon}\xspace)c$-competitive algorithm for the weighted version using only $O((\log^2 n)/\ensuremath{\varepsilon}\xspace)$ additional advice bits. Thus, a $(1+\ensuremath{\varepsilon}\xspace)c$-competitive algorithm using at most $B(n,c)+O((\log^2 n)/\ensuremath{\varepsilon}\xspace)$ bits of advice is obtained. For the weighted version of non-complete \ensuremath{\mathsf{AOC}}\xspace maximization problems, a better advice complexity than $B(n,c)$ may be obtained: For any $c$-competitive algorithm for an \ensuremath{\mathsf{AOC}}\xspace maximization problem, {\textsc P}\xspace, using $b$ advice bits can be converted into a $O(c \cdot \log n)$-competitive algorithm for the weighted version of {\textsc P}\xspace using $b+O(\log n)$ advice bits. For Weighted Matching in the edge arrival model, this implies a $O(\log n)$-competitive algorithm reading $O(\log n)$ bits of advice. We show that this is best possible in the following sense: For a set of weighted \ensuremath{\mathsf{AOC}}\xspace problems including Matching, Independent Set and Clique, no algorithm reading $o(\log n)$ bits of advice can have a competitive ratio bounded by any function of $n$. Furthermore, any $O(1)$-competitive algorithm for Matching must read $\Omega(n)$ advice bits. \item For all minimization problems known to be \ensuremath{\mathsf{AOC}\text{-complete}}\xspace (this includes, e.g., Vertex Cover, Dominating Set, and Set Cover), $n - O(\log n)$ bits of advice are required to obtain a competitive ratio bounded by a function of $n$. This should be contrasted with the fact that $n$ bits of advice trivially yields a strictly $1$-competitive algorithm. If the largest weight \ensuremath{w_{\text{max}}}\xspace cannot be arbitrarily larger than the smallest weight $\ensuremath{w_{\text{min}}}\xspace$, the $c$-competitive algorithm given in~\cite{BFKM15} for the unweighted version can be converted into a $c(1+\ensuremath{\varepsilon}\xspace)$-competitive algorithm for the weighted versions using $B(n,c) + O(\log^2 n + \log (\log(\ensuremath{w_{\text{max}}}\xspace/\ensuremath{w_{\text{min}}}\xspace)/\ensuremath{\varepsilon}\xspace))$ advice bits in total. \end{itemize} Our main upper bound technique is a simple exponential classification scheme that can be used to sparsify the set of possible weights. This technique can also be used for problems outside of \ensuremath{\mathsf{AOC}}\xspace. For example, for {\em scheduling on related machines}, we show that for many important objective functions (including makespan minimization and minimizing the $\ell_p$-norm), there exist $(1+\varepsilon)$-competitive algorithms reading $O((\log^2 n)/\ensuremath{\varepsilon}\xspace)$ bits of advice. For scheduling on $m$ {\em unrelated} machines where $m$ is constant, we get a similar result, but with $O((\log n)^{m+1}/\ensuremath{\varepsilon}\xspace^m)$ advice bits. Finally, for unrelated machines, where the goal is to {\em maximize} an objective function, we show that under some mild assumptions on the objective function (satisfied, for example, for machine covering), there is a $(1+\ensuremath{\varepsilon}\xspace)$-competitive algorithm reading $O((\log n)^{m+1}/\ensuremath{\varepsilon}\xspace^m)$ bits of advice. For scheduling on related and unrelated machines, our results are the first non-trivial upper bounds on the advice complexity. For the case of makespan minimization on identical machines, the algorithm of~\cite{Amakespan} is strictly better than ours. However, for minimizing the $\ell_p$-norm or maximizing the minimum load on identical machines, we exponentially improve the previous best upper bound~\cite{Aschedule} (which was linear in $n$). \section{Preliminaries} \label{sec:prelim} Throughout the paper, we let $n$ denote the number of requests in the input. We let $\mathbb{R}_+$ denote the set containing 0 and all positive real numbers. We let $\log$ denote the binary logarithm $\log_2$. For $k\geq 1$, $[k]=\{1,2,\ldots, k\}$. For any bit string $y$, let $\nz{y}$ and $\no{y}$ denote the number of zeros and the number of ones, respectively, in $y$. We write $x \sqsubseteq y$ if for all indices, $i$, $x_i=1 \Rightarrow y_i =1$. \subsection{Advice complexity and competitive analysis} \label{subsec:advice} In this paper, we use the ``advice-on-tape'' model~\cite{A1}. Before the first request arrives, the oracle, which knows the entire request sequence, prepares an \emph{advice tape}, an infinite binary string. The algorithm \ensuremath{\textsc{Alg}}\xspace may, at any point, read some bits from the advice tape. The {\em advice complexity} of \ensuremath{\textsc{Alg}}\xspace is the maximum number of bits read by \ensuremath{\textsc{Alg}}\xspace for any input sequence of at most a given length. \ensuremath{\textsc{Opt}}\xspace is an optimal offline algorithm. Advice complexity is combined with competitive analysis to determine how many bits of advice are necessary and sufficient to achieve a given competitive ratio. \begin{definition}[Competitive analysis~\cite{CompRatio1, CompRatio2} and advice complexity~\cite{A1}] The input to an online problem, {\textsc P}\xspace, is a request sequence $\sigma=\langle r_1,\ldots , r_n \rangle$. An \emph{online algorithm with advice}, \ensuremath{\textsc{Alg}}\xspace, computes the output $y=\langle y_1,\ldots , y_n\rangle$, where $y_i$ is computed from $\varphi, r_1,\ldots , r_i$, where $\varphi$ is the content of the advice tape. Each possible output for {\textsc P}\xspace is associated with a \emph{cost/profit}. For a request sequence $\sigma$, $\ensuremath{\textsc{Alg}}\xspace(\sigma)$ $(\ensuremath{\textsc{Opt}}\xspace(\sigma))$ denotes the cost/profit of the output computed by $\ensuremath{\textsc{Alg}}\xspace$ $(\ensuremath{\textsc{Opt}}\xspace)$ when serving $\sigma$. If {\textsc P}\xspace is a minimization (maximization) problem, then $\ensuremath{\textsc{Alg}}\xspace$ is \emph{$c(n)$-competitive} if there exists a constant, $\alpha$, such that, for all $n \in \mathbb{N}$, $\ensuremath{\textsc{Alg}}\xspace(\sigma)\leq c(n)\cdot\ensuremath{\textsc{Opt}}\xspace (\sigma)+\alpha$, ($\ensuremath{\textsc{Opt}}\xspace (\sigma)\leq c(n)\cdot\ensuremath{\textsc{Alg}}\xspace (\sigma)+\alpha$), for all request sequences, $\sigma$, of length at most $n$. If the relevant inequality holds with $\alpha=0$, we say that $\ensuremath{\textsc{Alg}}\xspace$ is \emph{strictly $c(n)$-competitive}. The \emph{advice complexity, $b(n)$, of an algorithm}, \ensuremath{\textsc{Alg}}\xspace, is the largest number of bits of $\varphi$ read by \ensuremath{\textsc{Alg}}\xspace over all possible request sequences of length at most $n$. The {\em advice complexity of a problem}, {\textsc P}\xspace, is a function, $f(n,c)$, $c\geq 1$, such that the smallest possible advice complexity of a strictly $c$-competitive online algorithm for {\textsc P}\xspace is $f(n,c)$. \end{definition} We only consider deterministic online algorithms (with advice). Note that both $b(n)$ and $c(n)$ in the above definition may depend on $n$, but, for ease of notation, we often write $b$ and $c$ instead of $b(n)$ and $c(n)$. Also, with this definition, $c\geq 1$, for both minimization and maximization problems. \subsection{Complexity classes} In this paper, we consider the complexity class \ensuremath{\mathsf{AOC}}\xspace from~\cite{BFKM15}. \begin{definition}[\ensuremath{\mathsf{AOC}}\xspace~\cite{BFKM15}]\label{sgeasydef} A problem, {\textsc P}\xspace, is in \ensuremath{\mathsf{AOC}}\xspace \emph{(Asymmetric Online Covering)} if it can be defined as follows: The input to an instance of {\textsc P}\xspace consists of a sequence of $n$ requests, $\sigma= \langle r_1, \ldots, r_n \rangle$, and possibly one final dummy request. An algorithm for {\textsc P}\xspace computes a binary output string, $y=y_1 \ldots y_n\in\{0,1\}^n$, where $y_i=f(r_1, \ldots , r_i)$ for some function $f$. For minimization (maximization) problems, the score function, $s$, maps a pair, $(\sigma,y)$, of input and output to a cost (profit) in $\mathbb{N} \cup \{\infty \}$ $(\mathbb{N} \cup \{-\infty \})$. For an input, $\sigma$, and an output, $y$, $y$ is \emph{feasible} if $s(\sigma ,y) \in \mathbb{N}$. Otherwise, $y$ is \emph{infeasible}. There must exist at least one feasible output. Let $S_{\min}(\sigma)$ $(S_{\max}(\sigma))$ be the set of those outputs that minimize (maximize) $s$ for a given input $\sigma$. If {\textsc P}\xspace is a minimization problem, then for every input, $\sigma$, the following must hold: \begin{enumerate} \item For a feasible output, $y$, $s(\sigma,y)=\no{y}$. \item An output, $y$, is feasible if there exists a $y'\in S_{\min}(\sigma)$ such that $y'\sqsubseteq y$.\\ If there is no such $y'$, the output may or may not be feasible. \end{enumerate} If {\textsc P}\xspace is a maximization problem, then for every input, $\sigma$, the following must hold: \begin{enumerate} \item For a feasible output, $y$, $s(\sigma,y)=\nz{y}$. \item An output, $y$, is feasible if there exists a $y'\in S_{\max}(\sigma)$ such that $y'\sqsubseteq y$.\\ If there is no such $y'$, the output may or may not be feasible. \end{enumerate} \end{definition} Recall that no problem in \ensuremath{\mathsf{AOC}}\xspace requires more than $B(n,c) + O(\log n)$ bits of advice (see Eq.~(\ref{eq:bnc}) for the definition of $B(n,c)$). This result is based on a covering design technique, where the advice indicates a superset of the output bits that are 1 in an optimal solution. The problems in \ensuremath{\mathsf{AOC}}\xspace requiring the most advice are \ensuremath{\mathsf{AOC}\text{-complete}}\xspace~\cite{BFKM15}: \begin{definition}[\ensuremath{\mathsf{AOC}\text{-complete}}\xspace~\cite{BFKM15}] \label{completedef} A problem ${\textsc P}\xspace \in \ensuremath{\mathsf{AOC}}\xspace$ is \emph{\ensuremath{\mathsf{AOC}\text{-complete}}\xspace} if for all $c>1$, any $c$-competitive algorithm for {\textsc P}\xspace must read at least $B(n,c)-O(\log n)$ bits of advice. \end{definition} In~\cite{BFKM15}, an abstract guessing game, {\sc min\-ASGk}\xspace (Minimum Asymmetric String Guessing with Known History), was introduced and shown to be \ensuremath{\mathsf{AOC}\text{-complete}}\xspace. The {\sc min\-ASGk}\xspace-problem itself is very artificial, but it is well-suited as the starting point of reductions. All minimization problems known to be \ensuremath{\mathsf{AOC}\text{-complete}}\xspace have been shown to be so via reductions from {\sc min\-ASGk}\xspace. The input for {\sc min\-ASGk}\xspace is a secret string $x=x_1x_2\ldots x_n\in\{0,1\}^n$ given in $n$ rounds. In round $i\in[n]$, the online algorithm must answer $y_i\in\{0,1\}$. Immediately after answering, the correct answer $x_i$ for round $i$ is revealed to the algorithm. If the algorithm answers $y_i=1$, it incurs a cost of $1$. If the algorithm answers $y_i=0$, then it incurs no cost if $x_i=0$, but if $x_i=1$, then the output of the algorithm is declared to be infeasible (and the algorithm incurs a cost of $\infty$). The objective is to minimize the total cost incurred. Note that the optimal solution has cost $\no{x}$. See the appendix for a formal definition of {\sc min\-ASGk}\xspace and for definitions of other \ensuremath{\mathsf{AOC}\text{-complete}}\xspace problems. The problem {\sc min\-ASGk}\xspace is based on the {\em binary string guessing} problem~\cite{SG,A2}. Binary string guessing is similar to asymmetric string guessing, except that any wrong guess (0 instead of 1 or 1 instead of 0) gives a cost of 1. In Theorem \ref{minasglower}, we show a very strong lower bound for a weighted version of {\sc min\-ASGk}\xspace. In Theorem \ref{thm:reduction}, via reductions, we show that this lower bound implies similar strong lower bounds for the weighted version of other \ensuremath{\mathsf{AOC}\text{-complete}}\xspace minimization problems. \begin{definition}[Weighted \ensuremath{\mathsf{AOC}}\xspace] Let ${\textsc P}\xspace$ be a problem in \ensuremath{\mathsf{AOC}}\xspace. We define the {\em weighted version of ${\textsc P}\xspace$}, denoted $\ensuremath{\textsc{P}_{\text{w}}}\xspace$, as follows: A $\ensuremath{\textsc{P}_{\text{w}}}\xspace$-input $\sigma=\langle \{r_1, w_1\},$ $\{r_2, w_2\},$ $\ldots , \{r_n, w_n\}\rangle$ consists of $n$ ${\textsc P}\xspace$-requests, $r_1,...,r_n$, each of which has a weight $w_i\in\mathbb{R}_+$. The ${\textsc P}\xspace$-request $r_i$ and its weight $w_i$ are revealed simultaneously. An output $y=y_1\ldots y_n\in\{0,1\}^n$ is feasible for the input $\sigma$ if and only if $y$ is feasible for the ${\textsc P}\xspace$-input $\langle r_1,\ldots , r_n\rangle$. The cost (profit) of an infeasible solution is $\infty$ ($-\infty$). If ${\textsc P}\xspace$ is a minimization problem, then the cost of a feasible $\ensuremath{\textsc{P}_{\text{w}}}\xspace$-output $y$ for an input $\sigma$ is $$ s(\sigma,y)=\sum_{i=1}^n w_iy_i $$ If ${\textsc P}\xspace$ is a maximization problem, then the profit of a feasible $\ensuremath{\textsc{P}_{\text{w}}}\xspace$-output $y$ for an input $\sigma$ is $$ s(\sigma,y)=\sum_{i=1}^n w_i (1-y_i) $$ \end{definition} \section{Weighted Versions of \ensuremath{\mathsf{AOC}}\xspace-Complete Minimization Problems} \label{sec:weightedAOC} In the weighted version of {\sc min\-ASGk}\xspace, {\sc minASGk$_{\text{w}}$}\xspace, each request is a weight for the current request and the value $0$ or $1$ of the previous request. Producing a feasible solution requires {\em accepting} (answering $1$ to) all requests with value $1$, and the cost of a feasible solution is the sum of all weights for requests which are accepted. We start with a negative result for {\sc minASGk$_{\text{w}}$}\xspace and then use it to obtain similar results for the weighted online version of Vertex Cover, Set Cover, Dominating Set, and Cycle Finding. \begin{theorem} \label{minasglower} For {\sc minASGk$_{\text{w}}$}\xspace, no algorithm using less than $n$ bits of advice is $f(n)$-competitive, for any function $f$. \end{theorem} \begin{proof} Let \ensuremath{\textsc{Alg}}\xspace be any algorithm for {\sc minASGk$_{\text{w}}$}\xspace reading at most $n-1$ bits of advice. We show how an adversary can construct input sequences where the cost of \ensuremath{\textsc{Alg}}\xspace is arbitrarily larger than that of \ensuremath{\textsc{Opt}}\xspace. We only consider sequences with at least one 1. It is easy to see that for the unweighted version of the binary string guessing problem, $n$ bits of advice are necessary in order to guess correctly each time: If there are fewer than $n$ bits, there are only $2^{n-1}$ possible advice strings, so, even if we only consider the $2^n-1$ possible inputs with at least one 1, there are at least two different request strings, $x$ and $y$, which get the same advice string. \ensuremath{\textsc{Alg}}\xspace will make an error on one of the strings when guessing the first bit where $x$ and $y$ differ, since up until that point \ensuremath{\textsc{Alg}}\xspace has the same information about both strings. We describe a way to assign weights to the requests in {\sc minASGk$_{\text{w}}$}\xspace such that if \ensuremath{\textsc{Alg}}\xspace makes a single mistake (either guessing 0 when the correct answer is 1 or vice versa), its performance ratio is unbounded. We use a large number $a>1$, which we allow to depend on $n$. All weights are from the interval $[1,a]$ (note that they are not necessarily integers). We let $x=x_1, \ldots, x_n$ be the input string and set $w_1=a^{1/2}$. For $i>1$, $w_i$ is given by: \[ w_i = \begin{cases} \hfill w_{i-1}\cdot a^{(-2^{-i})}, \hfill & \text{ if $x_{i-1}=0$} \\ \hfill w_{i-1}\cdot a^{(2^{-i})}, \hfill & \text{ if $x_{i-1}=1$} \\ \end{cases} \] Since the weights are only a function of previous requests, they do not reveal any information to \ensuremath{\textsc{Alg}}\xspace about future requests. \begin{observation} \label{min_opt_obs} For each $i$, the following hold: \begin{enumerate}[(a)] \item \label{obs:zero} If $x_i=0$, then $w_j \leq w_{i}\cdot a^{(-2^{-n})}$ for all $j>i$. \item \label{obs:one} If $x_i=1$, then $w_j \geq w_{i}\cdot a^{(2^{-n})}$ for all $j>i$. \end{enumerate} \end{observation} We argue for each set of inequalities in the observation: (\ref{obs:zero}): If $x_i=0$, for each $j>i$, $w_j=w_i\cdot a^{(-2^{-(i+1)})}\cdot a^{\sum_{k=i+2}^j (\pm 2^{-(i+1)})}$, where the plus or minus depends on whether $x_k=0$ or $x_k=1$. The value $w_j$ is largest if all of the $x_k$ values are $1$, in which case $w_j=w_i\cdot a^{(-2^{-j})} \leq w_i\cdot a^{(-2^{-n})}$. (\ref{obs:one}): The argument of $x_i=1$ is similar, changing minus to plus and vice versa. We claim that if \ensuremath{\textsc{Alg}}\xspace makes a single mistake, its performance ratio is not bounded by any function of $n$. Indeed, if \ensuremath{\textsc{Alg}}\xspace guesses $0$ for a request, but the correct answer is $1$, the solution is infeasible and \ensuremath{\textsc{Alg}}\xspace gets a cost of $\infty$. We now consider the case where \ensuremath{\textsc{Alg}}\xspace guesses $1$ for a request $j$, but the correct answer is $0$. This request gives a contribution of $w_j =a^b$, for some $0<b<1$, to the cost of the solution produced by \ensuremath{\textsc{Alg}}\xspace. Define $j'$ such that $w_{j'}=\max \{w_i \mid x_i=1\}$. Since \ensuremath{\textsc{Opt}}\xspace only answers $1$ if $x_i =1$, this is the largest contribution to the cost of \ensuremath{\textsc{Opt}}\xspace from a single request. If $j'>j$, Observation~\ref{min_opt_obs}(\ref{obs:zero}) gives that $w_{j'} \leq w_j\cdot a^{(-2^{-n})}=a^b\cdot a^{(-2^{-n})}=a^{b-2^{-n}}$. The cost of \ensuremath{\textsc{Opt}}\xspace is at most $n \cdot w_{j'} \leq n \cdot a^{b-2^{-n}}$. Thus, \[ \frac{\ensuremath{\textsc{Alg}}\xspace(x)}{\ensuremath{\textsc{Opt}}\xspace(x)} \geq \frac{a^b}{n \cdot a^{b-2^{-n}}}=\frac{a^{2^{-n}}}{n}. \] Since $a$ can be arbitrarily large (recall that it can be a function of $n$), we see that no algorithm can be $f(n)$-competitive for any specific function $f$. If $j'<j$, Observation~\ref{min_opt_obs}(\ref{obs:one}) gives us that $w_{j} \geq w_{j'}\cdot a^{(2^{-n})}$. Using $w_j=a^b$, we get $a^{b-2^{-n}} \geq w_{j'} $. We can repeat the argument from the case where $j'>j$ to see that no algorithm can be $f(n)$-competitive for any specific function $f$. \qed \end{proof} In order to show that similar lower bounds apply to all minimization problems known to be complete for \ensuremath{\mathsf{AOC}}\xspace, we define a simple type of advice preserving reduction for online problems. These are much less general than those defined by Sprock in his PhD dissertation~\cite{Sprock13}, mainly because we do not allow the amount of advice needed to change by a multiplicative factor. Let $\ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace}(\ensuremath{\sigma}\xspace)$ denote the value of the optimal solution for request sequence $\ensuremath{\sigma}\xspace$ for problem ${\textsc P}\xspace$, and let $|\ensuremath{\sigma}\xspace|$ denote the number of requests in $\ensuremath{\sigma}\xspace$. \begin{definition} \label{def:reduction} Let ${\textsc P}\xspace_1$ and ${\textsc P}\xspace_2$ be two online minimization problems, and let $\ensuremath{\mathcal{I}}\xspace_1$ be the set of request sequences for ${\textsc P}\xspace_1$ and $\ensuremath{\mathcal{I}}\xspace_2$ be the set of request sequences for ${\textsc P}\xspace_2$. For a given function $g: \ensuremath{\mathbb{N}}\xspace \rightarrow \ensuremath{\mathbb{R}}\xspace_+$, we say that there is a {\em length preserving $g$-reduction} from ${\textsc P}\xspace_1$ to ${\textsc P}\xspace_2$, if there is a {\em transformation function} $f: \ensuremath{\mathcal{I}}\xspace_1 \rightarrow \ensuremath{\mathcal{I}}\xspace_2$ such that \begin{itemize} \item for all $\ensuremath{\sigma}\xspace\in \ensuremath{\mathcal{I}}\xspace_1$, $\length{\ensuremath{\sigma}\xspace} = \length{f(\ensuremath{\sigma}\xspace)}$, and \item for every algorithm \ensuremath{\textsc{Alg}_2}\xspace for ${\textsc P}\xspace_2$, there is an algorithm \ensuremath{\textsc{Alg}_1}\xspace for ${\textsc P}\xspace_1$ such that for all $\ensuremath{\sigma}\xspace_1\in \ensuremath{\mathcal{I}}\xspace_1$, the following holds:\\ If \ensuremath{\textsc{Alg}_2}\xspace produces a feasible solution for $\ensuremath{\sigma}\xspace_2 = f(\ensuremath{\sigma}\xspace_1)$ with advice $\phi(\ensuremath{\sigma}\xspace_2)$, then \ensuremath{\textsc{Alg}_1}\xspace, using at most $\length{\phi(\ensuremath{\sigma}\xspace_2)} + g(\length{\ensuremath{\sigma}\xspace_2})$ advice bits, produces a feasible solution for $\ensuremath{\sigma}\xspace_1$ such that \begin{itemize} \item $\ensuremath{\textsc{Alg}_1}\xspace(\ensuremath{\sigma}\xspace_1) \leq \ensuremath{\textsc{Alg}_2}\xspace(\ensuremath{\sigma}\xspace_2) + \ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1)$ and $\ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1) \geq \ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_2}(\ensuremath{\sigma}\xspace_2)$, or \item $\ensuremath{\textsc{Alg}_1}\xspace(\ensuremath{\sigma}\xspace_1) = \ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1)$ \end{itemize} \end{itemize} \end{definition} Note that the transformation function $f$ is length-preserving in that the lengths of the request sequences for the two problems are identical. This avoids the potential problem that the advice for the two problems could be functions of two different sequence lengths. The amount of advice for the problem being reduced to is allowed to be an additive function, $g(n)$, longer than for the original problem, because this seems to be necessary for some of the reductions showing that problems are \ensuremath{\mathsf{AOC}\text{-complete}}\xspace. Since the reductions are only used here to show that no algorithm is $F(n)$-competitive for any function $F$, the increase in the performance ratio that occurs with these reductions is insignificant. The following lemma shows how length-preserving reductions can be used. \begin{lemma} \label{lemma:reduction} Let ${\textsc P}\xspace_1$ and ${\textsc P}\xspace_2$ be online minimization problems. Suppose that at least $b_1(n,c)$ advice bits are required to be $(c+1)$-competitive for ${\textsc P}\xspace_1$ and suppose there is a length preserving $g(n)$-reduction from ${\textsc P}\xspace_1$ to ${\textsc P}\xspace_2$. Then, at least $b_1(n,c)-g(n)$ advice bits are needed for an algorithm for ${\textsc P}\xspace_2$ to be $c$-competitive. \end{lemma} \begin{proof} Let $f$ be the transformation function associated with $g$. Suppose for the sake of contradiction that there is a (strictly) $c$-competitive algorithm $\ensuremath{\textsc{Alg}_2}\xspace$ for ${\textsc P}\xspace_2$ with advice complexity $b_2(n,c) < b_1(n,c)-g(n)$. Then there exists a constant $\alpha$ such that for any request sequence $\ensuremath{\sigma}\xspace_1 \in \ensuremath{\mathcal{I}}\xspace_1$, either $\ensuremath{\textsc{Alg}_1}\xspace(\ensuremath{\sigma}\xspace_1) =\ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1)$ or \begin{align*} \ensuremath{\textsc{Alg}_1}\xspace(\ensuremath{\sigma}\xspace_1) & \leq \ensuremath{\textsc{Alg}_2}\xspace(\ensuremath{\sigma}\xspace_2) + \ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1)\\ & \leq c\cdot\ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_2}(\ensuremath{\sigma}\xspace_2) + \alpha + \ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1)\\ & \leq (c+1)\cdot\ensuremath{\textsc{Opt}}\xspace_{{\textsc P}\xspace_1}(\ensuremath{\sigma}\xspace_1) + \alpha, \end{align*} where $\ensuremath{\sigma}\xspace_2 = f(\ensuremath{\sigma}\xspace_1)$. Thus, \ensuremath{\textsc{Alg}_1}\xspace is (strictly) $(c+1)$-competitive, with less than $b_1(n,c)$ bits of advice, a contradiction. \qed \end{proof} All known \ensuremath{\mathsf{AOC}\text{-complete}}\xspace problems were proven complete using length-preserving reductions from {\sc minASGk}\xspace, so the following holds for the weighted versions of all such problems: \begin{theorem} \label{thm:reduction} For the weighted online versions of Vertex Cover, Cycle Finding, Dominating Set, Set Cover, an algorithm reading less than $n-O(\log n)$ bits of advice cannot be $f(n)$-competitive for any function $f$. \end{theorem} \begin{proof} The reductions in~\cite{BFKM15} showing that these problems are \ensuremath{\mathsf{AOC}\text{-complete}}\xspace are length preserving $O(\log n)$-reductions from {\sc minASGk}\xspace, and hence, the theorem follows from Lemma~\ref{lemma:reduction}. For Vertex Cover, the following $O(\log n)$-reduction can be used (the other three reductions are given in the Appendix~\ref{reductions}): Each input $\ensuremath{\sigma}\xspace = \langle x_1, x_2, \ldots, x_n \rangle$ to the problem {\sc minASGk}\xspace, is transformed to $f(\ensuremath{\sigma}\xspace) = \langle v_1, v_2, \ldots, v_n \rangle$, where $V=\{v_1, v_2, \ldots, v_n \}$ is the vertex set of a graph with edge set $E=\{(v_i,v_j) \colon x_i=1 \text{ and } i<j\}.$ Let $V_1 = \{v_i \in V \colon x_1 = 1\}$. Note that $V_1 \setminus \{v_n\}$ is a minimum vertex cover of the graph and that no algorithm can reject more than one vertex from $V_1$, since $V_1$ induces a clique. The advice used by the {\sc minASGk}\xspace algorithm \ensuremath{\textsc{Alg}_1}\xspace consists of the advice used by the Vertex Cover algorithm \ensuremath{\textsc{Alg}_2}\xspace and $O(\log n)$ bits that are either all 0 or give (an encoding of) an index to a position $i$ in the input sequence, such that $v_i \in V_1$ and \ensuremath{\textsc{Alg}_2}\xspace rejects $v_i$. Let $V_{\ensuremath{\textsc{Alg}_2}\xspace} \subseteq V$ be the vertex cover constructed by \ensuremath{\textsc{Alg}_2}\xspace and let $X_{\ensuremath{\textsc{Alg}_1}\xspace}$ be the set of requests on which \ensuremath{\textsc{Alg}_1}\xspace returns a 1. Then either $X_{\ensuremath{\textsc{Alg}_1}\xspace} = V_{\ensuremath{\textsc{Alg}_1}\xspace}$ or $X_{\ensuremath{\textsc{Alg}_1}\xspace} = V_{\ensuremath{\textsc{Alg}_2}\xspace} \cup \{v_i\}$, where $\{v_i\} = V_1 \setminus V_{\ensuremath{\textsc{Alg}_1}\xspace}$. Thus, $\ensuremath{\textsc{Alg}_1}\xspace(\ensuremath{\sigma}\xspace) \leq \ensuremath{\textsc{Alg}_2}\xspace(f(\ensuremath{\sigma}\xspace))+\ensuremath{\textsc{Opt}}\xspace(\ensuremath{\sigma}\xspace)$, since $w_i \leq \ensuremath{\textsc{Opt}}\xspace(\ensuremath{\sigma}\xspace)$. \qed \end{proof} \section{Exponential Sparsification} Assume that we are faced with an online problem for which we know how to obtain a reasonable competitive ratio, possibly using advice, in the unweighted version (or when there are only few possible different weights). We use \emph{exponential sparsification}, a simple technique which can be of help when designing algorithms with advice for weighted online problems by reducing the number of different possible weights the algorithm has to handle. The first step is to partition the set of possible weights into intervals of exponentially increasing length, i.e., for some small $\varepsilon$, $0<\varepsilon <1$, $$\mathbb{R}_+=\bigcup_{k=-\infty}^{\infty}\big[(1+\varepsilon)^k, (1+\varepsilon)^{k+1}\big).$$ How to proceed depends on the problem at hand. We now informally explain the meta-algorithm that we repeatedly use in this paper. Note that if $w_1,w_2\in \big[(1+\varepsilon)^k, (1+\varepsilon)^{k+1}\big)$ and $w_1\leq w_2$, then $w_1\leq w_2\leq (1+\varepsilon)w_1$. For many online problems, this means that an algorithm can treat all requests whose weights belong to this interval as if they all had weight $(1+\varepsilon)^{k+1}$ with only a small loss in competitiveness. Consider now a set of weights and let $\ensuremath{w_{\text{max}}}\xspace$ denote the largest weight in the set. Let \ensuremath{k_{\text{max}}}\xspace be the integer for which $\ensuremath{w_{\text{max}}}\xspace\in \big[(1+\varepsilon)^{\ensuremath{k_{\text{max}}}\xspace}, (1+\varepsilon)^{\ensuremath{k_{\text{max}}}\xspace+1}\big)$. We say that a request with weight $w\in \big[(1+\varepsilon)^{k}, (1+\varepsilon)^{k+1}\big)$ is \emph{unimportant} if $k<\ensuremath{k_{\text{max}}}\xspace- \ceil{\log_{1+\varepsilon}(n^2)}$. Furthermore, we will often categorize the request as \emph{important} if $\ensuremath{k_{\text{max}}}\xspace-\ceil{\log_{1+\varepsilon}(n^2)} \leq k < \ensuremath{k_{\text{max}}}\xspace+1$ and as {\em huge} if $k \geq \ensuremath{k_{\text{max}}}\xspace+1$. Each unimportant request has weight $w \leq (1+\varepsilon)^{k+1}\leq (1+\varepsilon)^{\ensuremath{k_{\text{max}}}\xspace-\ceil{\log_{1+\varepsilon}(n^2)}-1+1}\leq \ensuremath{w_{\text{max}}}\xspace/n^2$, so the total sum of the unimportant weights is $O(\ensuremath{w_{\text{max}}}\xspace/n)$. For many weighted online problems, this means that an algorithm can easily serve the requests with unimportant weights, as follows. In maximization problems, this is done by rejecting them. In minimization problems, it is done by accepting them. Thus, exponential sparsification (when applicable) essentially reduces the problem of computing a good approximate solution for a problem with $n$ distinct weights to that of computing a good approximate solution with only $O(\log_{1+\varepsilon} n)$ distinct weights. For a concrete problem, several modifications of this meta-algorithm might be necessary. Often, the most tricky part is how the algorithm can learn $\ensuremath{k_{\text{max}}}\xspace$ without using too much advice. One approach that we often use is the following: The oracle encodes the index $i$ of the first request whose weight is close enough to $(1+\varepsilon)^{\ensuremath{k_{\text{max}}}\xspace}$ that the algorithm only needs a little bit of advice to deduce $\ensuremath{k_{\text{max}}}\xspace$ from the weight of this request. If it is somehow possible for the algorithm to serve all requests prior to $i$ reasonably well, then this approach works well. Our main application of exponential sparsification is to weighted \ensuremath{\mathsf{AOC}}\xspace problems. We begin by considering maximization problems. Note that no assumptions are made about the weights of $\ensuremath{\textsc{P}_{\text{w}}}\xspace$ in Theorem~\ref{exsparse}. \begin{theorem} \label{exsparse} If ${\textsc P}\xspace\in\ensuremath{\mathsf{AOC}}\xspace$ is a maximization problem, then for any $c>1$ and $0<\varepsilon\leq 1$, \ensuremath{\textsc{P}_{\text{w}}}\xspace has a strictly $(1+\varepsilon)c$-competitive algorithm using $B(n,c)+O(\varepsilon^{-1}\log^2 n)$ advice bits. \end{theorem} \begin{proof} Fix $\varepsilon>0$. Let $\sigma=\langle \{r_1,w_1\},\ldots ,\{r_n, w_n\}\rangle$ be the input and let $x=x_1\ldots x_n\in\{0,1\}^n$ specify an optimal solution for $\sigma$, with zeros indicating membership in the optimal solution. Throughout most of this proof, we assume that $n$ is sufficiently large. The necessary conditions are discussed at the end of the proof, along with how to handle small $n$. Define $s=1+\varepsilon/2$. Let $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace=\{i\colon x_i=0\}$. Note that $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$ contains exactly those rounds in which $\ensuremath{\textsc{Opt}}\xspace$ answers $0$ and thus accepts. Furthermore, for $k\in\mathbb{Z}$, let $V^k=\{i\colon s^k\leq w(i) <s^{k+1}\}$ and let $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^k=\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace\cap V^k$. Finally, let $i_{\max}\in \ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$ be such that $w(i_{\max})\geq w(i)$ for every $i\in \ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$. The oracle computes the unique $m\in\mathbb{Z}$ such that $i_{\max}\in \ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^m$. We say that a request $r_i$ is \emph{unimportant} if $w(i)<s^{m- \ceil{\log_{s}(n^2)}}$, \emph{important} if $s^{m-\ceil{\log_{s}(n^2)}} \leq w(i) < s^{m+1}$, and \emph{huge} if $w(i)\geq s^{m+1}$. The oracle computes the index $i'$ of the first important request in the input sequence. Assume that $i' \in V^{m'}$. The oracle writes the length $n$ of the input onto the advice tape using a self-delimiting encoding\footnote{For example, $\lceil \log n\rceil$ could be written in unary ($\lceil \log n\rceil$ ones, followed by a zero) before writing $n$ itself in binary.}, and then writes the index $i'$ and the integer $m-m'$ (which is at most $\ceil{\log_{s}(n^2)}$) onto the tape, using a total of $O(\log n)$ bits. This advice allows the algorithm to learn $m$ as soon as the first important request arrives. From there on, the algorithm will know if a request is important, unimportant, or huge. Whenever an unimportant or a huge request arrives, the algorithm answers $1$ (rejects the request). We now describe how the algorithm and oracle work for the important requests. For each $0\leq j\leq \ceil{\log_{s}(n^2)}$, let $n_{m-j}=\ab{V^{m-j}}$. For the requests (whose indices are) in $V^{m-j}$, we use the covering design based $c$-competitive algorithm for unweighted \ensuremath{\mathsf{AOC}}\xspace-problems. This requires $B(n_{m-j}, c) + O(\log n_{m-j})$ bits of advice. Since $B(n,c)$ is linear in $n$, this means that we use a total of $$b=\sum_{j=0}^{\ceil{\log_{s}(n^2)}} \big(B(n_{m-j}, c) + O(\log n_{m-j})\big)\leq B(n,c)+O(\log_{s} n \cdot\log n)$$ bits of advice. Note that $\log_{s}(n)\leq 2\varepsilon^{-1}\log n$ for $\varepsilon/2\leq 1$, giving the bound on the advice in the statement of the theorem. We now prove that the algorithm achieves the desired competitiveness. We can ignore the huge requests, since neither $\ensuremath{\textsc{Alg}}\xspace$ nor $\ensuremath{\textsc{Opt}}\xspace$ accepts any of them. Let $V_{\ensuremath{\textsc{Alg}}\xspace}$ be those rounds in which $\ensuremath{\textsc{Alg}}\xspace$ answers $0$ and let $V_{\ensuremath{\textsc{Alg}}\xspace}^k=V_{\ensuremath{\textsc{Alg}}\xspace}\cap V^k$. We consider the important requests first. Fix $0\leq j\leq \ceil{\log_{s}(n^2)}$. Let $n^{\ensuremath{\textsc{Opt}}\xspace}_{m-j}=\ab{\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^{m-j}}$, i.e., $n^{\ensuremath{\textsc{Opt}}\xspace}_{m-j}$ is the number of requests in $V^{m-j}$ which are also in the optimal solution $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$. By construction, we have $n^{\ensuremath{\textsc{Opt}}\xspace}_{m-j}\leq c\ab{V_{\ensuremath{\textsc{Alg}}\xspace}^{m-j}}$. Since the largest possible weight of a request in $V^{m-j}$ is at most $s$ times larger than the smallest possible weight of a request in $V^{m-j}$, this implies that $w(\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^{m-j})\leq s \cdot c\cdot w(V_{\ensuremath{\textsc{Alg}}\xspace}^{m-j})$. Thus, we get that \begin{equation} \label{eq:uppermax1} \sum_{j=0}^{\ceil{\log_{s}(n^2)}}w(\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^{m-j})\leq \sum_{j=0}^{\ceil{\log_{s}(n^2)}}s \cdot c\cdot w(V_{\ensuremath{\textsc{Alg}}\xspace}^{m-j})= s\cdot c\cdot \ensuremath{\textsc{Alg}}\xspace(\sigma). \end{equation} We now consider the unimportant requests. If $r_i$ is unimportant, then $w(i)\leq s^{m'-\ceil{\log_{s}(n^2)}}\leq s^{m'} / n^2 \leq w(x_{i_{\max}})/n^2\leq \ensuremath{\textsc{Opt}}\xspace(\sigma)/n^2$. This implies that \begin{equation} \label{eq:uppermax2} \sum_{j=\ceil{\log_{s}(n^2)}+1}^{\infty}w(V_{\ensuremath{\textsc{Opt}}\xspace}^{m-j})\leq n\frac{\ensuremath{\textsc{Opt}}\xspace(\sigma)}{n^2}=\frac{\ensuremath{\textsc{Opt}}\xspace(\sigma)}{n}. \end{equation} We conclude that $$\ensuremath{\textsc{Opt}}\xspace(\sigma)=w(\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace)=\sum_{j=0}^{\ceil{\log_{s}(n^2)}}w(\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^{m-j})+\sum_{j=\ceil{\log_{s}(n^2)}+1}^{\infty}w(\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^{m-j}).$$ By Eq.~(\ref{eq:uppermax2}), $$\left( 1-\frac{1}{n}\right)\ensuremath{\textsc{Opt}}\xspace(\sigma) \leq \sum_{j=0}^{\ceil{\log_{s}(n^2)}}w(\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^{m-j}),$$ so by Eq.~(\ref{eq:uppermax1}), $\ensuremath{\textsc{Opt}}\xspace(\sigma) \leq \frac{n}{n-1}\cdot s\cdot c\cdot \ensuremath{\textsc{Alg}}\xspace(\sigma)$. Note that for $n\geq n_0=\frac{2+2\varepsilon}{\varepsilon}$, $(\frac{n}{n-1})(1+\varepsilon/2)\leq (1+\varepsilon)$. For inputs of length less than $n_0$, the oracle writes an optimal solution onto the advice tape, using at most $n_0$ bits. Since $n_0\leq \frac{4}{\varepsilon}$, $b\in O(\varepsilon^{-1}\log^2 n)$ as required. For inputs of length at least $n_0$, we use the algorithm described above. Thus, for every input $\sigma$, it holds that $\ensuremath{\textsc{Opt}}\xspace(\sigma)\leq (1+\varepsilon)c\ensuremath{\textsc{Alg}}\xspace(\sigma)$. Since $\varepsilon$ was arbitrary, this proves the theorem. \qed \end{proof} It may be surprising that adding weights to \ensuremath{\mathsf{AOC}\text{-complete}}\xspace maximization problems has almost no effect, while adding weights to \ensuremath{\mathsf{AOC}\text{-complete}}\xspace minimization problems drastically changes the advice complexity. In particular, one might wonder why the technique used in Theorem~\ref{exsparse} does not work for minimization problems. The key difference lies in the beginning of the sequence. Let $w_{\max}$ be the largest weight of a request accepted by \ensuremath{\textsc{Opt}}\xspace. For maximization problems, the algorithm can safely reject all requests before the first important one. For minimization problems, this approach does not work, since the algorithm must accept a superset of what \ensuremath{\textsc{Opt}}\xspace accepts in order to ensure that its output is feasible. Thus, rejecting an unimportant request that \ensuremath{\textsc{Opt}}\xspace accepts may result in an infeasible solution. This essentially means that the algorithm is forced into accepting all requests before the first important request arrives. Accepting all unimportant requests is no problem, since they will not contribute significantly to the total cost. However, accepting even a single huge request can give an unbounded contribution to the algorithm's cost. As shown in Theorem~\ref{minasglower}, it is not possible in general for the algorithm to tell if a request in the beginning of the sequence is unimportant or huge without using a lot of advice. However, if the ratio of the largest to the smallest weight is not too large, exponential sparsification is also useful for minimization problems in \ensuremath{\mathsf{AOC}}\xspace. Essentially, when this ratio is bounded, it is possible for the algorithm to learn a good approximation of $w_{\max}$ when the first request arrives. This is formalized in Theorem~\ref{exsparsemin}, the proof of which is very similar to the proof of Theorem~\ref{exsparse}. \begin{theorem} \label{exsparsemin} If ${\textsc P}\xspace\in\ensuremath{\mathsf{AOC}}\xspace$ is a minimization problem and $0<\varepsilon\leq 1$, then \ensuremath{\textsc{P}_{\text{w}}}\xspace with all weights in $[\ensuremath{w_{\text{min}}}\xspace,\ensuremath{w_{\text{max}}}\xspace]$ has a $(1+\varepsilon)c$-competitive algorithm with advice complexity at most $$B(n,c)+O\left(\varepsilon^{-1} \log^2 n+ \log \left( \ensuremath{\varepsilon}\xspace^{-1} \log \frac{\ensuremath{w_{\text{max}}}\xspace}{\ensuremath{w_{\text{min}}}\xspace}\right)\right)\,.$$ \end{theorem} \begin{proof} Fix $\varepsilon>0$. Let $\sigma=\langle \{r_1,w_1\},\ldots ,\{r_n, w_n\}\rangle$ be the input and let $x=x_1\ldots x_n\in\{0,1\}^n$ specify an optimal solution for $\sigma$, with ones indicating membership in the optimal solution. Define $s=1+\varepsilon/2$. Let $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace=\{i\colon x_i=1\}$. Note that $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$ contains exactly those rounds in which $\ensuremath{\textsc{Opt}}\xspace$ answers $1$ and thus accepts. Furthermore, for $k\in\mathbb{Z}$, let $V^k=\{i\colon s^k\leq w(i) <s^{k+1}\}$ and let $\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^k=\ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace\cap V^k$. Finally, let $i_{\max}\in \ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$ be such that $w(i_{\max})\geq w(i)$ for every $i\in \ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace$. The oracle computes the unique $m\in\mathbb{Z}$ such that $i_{\max}\in \ensuremath{V_{\ensuremath{\textsc{Opt}}\xspace}}\xspace^m$. We say that a request $r_i$ is \emph{unimportant} if $w(i)<s^{m- \ceil{\log_{s}(n^2)}}$, \emph{important} if $s^{m-\ceil{\log_{s}(n^2)}} \leq w(i) < s^{m+1}$, and \emph{huge} if $w(i) \geq s^{m+1}$. The oracle also computes the unique $m\in\mathbb{Z}$ such that $s^{m'} \leq w_1 < s^{m'+1}$ and writes the values $n$ and $m-m'$ on the tape in a self-delimiting encoding. The number of advice bits needed to write $m-m'$ is $O(\log (m-m'))$. \begin{align*} \log{(m-m')} & \leq \log{(\log_s{w(i_{\max})} - \log_s{w_1})}+1 \\ & \leq \log{\log_s{\frac{\ensuremath{w_{\text{max}}}\xspace}{\ensuremath{w_{\text{min}}}\xspace}}}+1\\ & \leq \log \left( 2\ensuremath{\varepsilon}\xspace^{-1} \log \frac{\ensuremath{w_{\text{max}}}\xspace}{\ensuremath{w_{\text{min}}}\xspace} \right)+1, \text{ since } \log_s n \leq 2 \ensuremath{\varepsilon}\xspace^{-1}\log n, \text{ for } \ensuremath{\varepsilon}\xspace/2 \leq 1 \end{align*} Note that since the length of $m-m'$ is not known, we need to use a self-delimiting encoding, which means that we use $O(\log n+\log ( \ensuremath{\varepsilon}\xspace^{-1} \log \frac{\ensuremath{w_{\text{max}}}\xspace}{\ensuremath{w_{\text{min}}}\xspace}))$ advice bits at the beginning. This advice allows the algorithm to learn $m$ as soon as the first request arrives. From there on, the algorithm will know if a request is important, unimportant, or huge. Whenever a huge request arrives, the algorithm answers $0$ (rejects the request). When an unimportant request arrives, the algorithm answers $1$ (accepts the request). We now describe how the algorithm and oracle work for the important requests. For the important requests (whose indices are) in $V^{m-j}$, we use the covering design based $c$-competitive algorithm for unweighted \ensuremath{\mathsf{AOC}}\xspace-problems. This is similar to what we do in the proof of Theorem~\ref{exsparse}. The same calculations yield an upper bound on this advice of $B(n,c)+O(\log_{s} n \cdot\log n)$. Note that $\log_{s}(n)\leq 2\varepsilon^{-1}\log n$ for $\varepsilon/2\leq 1$, giving the bound on the advice in the statement of the theorem. First, we note that the solution produced is valid, since it is a superset of the solution of \ensuremath{\textsc{Opt}}\xspace. We now argue that the cost of the solution is at most $(1+\varepsilon)c$ times the cost of \ensuremath{\textsc{Opt}}\xspace. Following the proof of Theorem~\ref{exsparse} and switching the roles of \ensuremath{\textsc{Opt}}\xspace and \ensuremath{\textsc{Alg}}\xspace, we have by construction that the cost of the important requests for the algorithm is at most $sc$ times larger than the cost for \ensuremath{\textsc{Opt}}\xspace on the important requests. For the huge requests, both this algorithm and \ensuremath{\textsc{Opt}}\xspace incur a cost of zero. We now consider the unimportant requests. If $r_i$ is unimportant, then $$w(i)< s^{m-\ceil{\log_{s}(n^2)}}\leq s^{m} / n^2 \leq w(x_{i_{\max}})/n^2\leq \ensuremath{\textsc{Opt}}\xspace(\sigma)/n^2.$$ This implies that \begin{equation} \sum_{j=\ceil{\log_{s}(n^2)}+1}^{\infty}w(V^{m-j})\leq n\frac{\ensuremath{\textsc{Opt}}\xspace(\sigma)}{n^2}=\frac{\ensuremath{\textsc{Opt}}\xspace(\sigma)}{n}. \end{equation} Thus, even if the algorithm accepts all unimportant requests and \ensuremath{\textsc{Opt}}\xspace accepts none of them, it only accepts an additional $\frac{\ensuremath{\textsc{Opt}}\xspace(\sigma)}{n}$. In total, the algorithm gets a cost of at most $(1+\frac{1}{n})(1+\varepsilon/2)c\ensuremath{\textsc{Opt}}\xspace(\sigma)$. For $n\geq n_0=\frac{2+\varepsilon}{\varepsilon}$, this is at most $(1+\varepsilon)c\ensuremath{\textsc{Opt}}\xspace(\sigma)$. For inputs of length less than $n_0$, the oracle will write an optimal solution onto the advice tape, using at most $n_0$ bits. Since $n_0\leq \frac{3}{\varepsilon}$, $b\in O(\varepsilon^{-1}\log^2 n)$ as required. For inputs of length at least $n_0$, we use the algorithm described above. Thus, for every input $\sigma$, it holds that $\ensuremath{\textsc{Opt}}\xspace(\sigma)\leq (1+\varepsilon)c\ensuremath{\textsc{Alg}}\xspace(\sigma)$. \qed \end{proof} \section{Matching and Other Non-Complete \ensuremath{\mathsf{AOC}}\xspace Problems} We first provide a general theorem that works for all maximization problems in \ensuremath{\mathsf{AOC}}\xspace, giving better results in some cases than that in Theorem~\ref{exsparse}. \begin{theorem} \label{thm:WeightedAOCgeneral} Let ${\textsc P}\xspace \in \ensuremath{\mathsf{AOC}}\xspace$ be a maximization problem. If there exists a $c$-competitive {\textsc P}\xspace-algorithm reading $b$ bits of advice, then there exists a $O(c\cdot \log n)$-competitive \ensuremath{\textsc{P}_{\text{w}}}\xspace-algorithm reading $O(b+\log n)$ bits of advice. \end{theorem} \begin{proof} Use exponential sparsification on the weights with an arbitrary $\varepsilon$, say $\varepsilon=1/2$, and let $s=1+\varepsilon$. For a given request sequence, $\sigma$, let $w_{\max}$ be the maximum weight that $\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}$ accepts. The oracle computes the unique $m \in \mathbb{Z}$ such that $w_{\max} \in [s^m,s^{m+1})$. The important requests are those with weight $w$, where $s^{m-\ceil{\log_s (n^2)}} \leq w < s^{m+1}$. We consider only the $\ceil{\log_s(n^2)}+1$ important intervals, i.e., the intervals $[s^{i},s^{i+1})$, $m-\ceil{\log_s(n^2)} \leq i \leq m$, and index them by $i$. Let $k$ be the index of the interval of weights contributing the most weight to $\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}(\sigma)$. The advice is a self-delimiting encoding of the index, $j$, of the first request with weight $w \in [s^{k},s^{k+1})$, plus the advice used by the given $c$-competitive {\textsc P}\xspace-algorithm. This requires at most $b+O(\log (n))$ bits of advice. The algorithm rejects all requests before the $j$th. From the $j$th request, the algorithm calculates the index $k$. The algorithm accepts those requests which would be accepted by the {\textsc P}\xspace-algorithm when presented with the subsequence of $\sigma$ consisting of the requests with weights in $[s^{k},s^{k+1})$. Since, by exponential sparsification, $\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}$ accepts total weight at most $\frac{1}{n}\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}(\sigma)$ from requests with unimportant weights, and it accepts at least as much from interval $k$ as from any of the other $\ceil{\log_s (n^2)}+1$ intervals considered, $\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}$ accepts weight at least $(1-\frac{1}{n})\frac{\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}(\sigma)}{\ceil{\log_s (n^2)}+1}$ from interval $k$. The algorithm, \ensuremath{\textsc{Alg}}\xspace, described here accepts at least $\frac{1}{c}$ as many requests as $\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}$ does in this interval, and each of the requests it accepts is at least a fraction $\frac{1}{s}$ as large as the largest weight in this interval. Thus, $c(1+\varepsilon)\ensuremath{\textsc{Alg}}\xspace(\sigma) \geq \left( \frac{1-\frac{1}{n}} {\ceil {\log_s (n^2)}+1}\right)\ensuremath{\textsc{Opt}}\xspace_{\ensuremath{\textsc{P}_{\text{w}}}\xspace}(\sigma)$, so \ensuremath{\textsc{Alg}}\xspace is $O(c \log n)$-competitive. \qed \end{proof} In the online matching problem, edges arrive one by one. Each request contains the names of the edge's two endpoints (the set of endpoints is not known from the beginning, but revealed gradually as the edges arrive). The algorithm must irrevocably accept or reject them as they arrive, and the goal is to maximize the number of edges accepted. The natural greedy algorithm for this problem is well known to be $2$-competitive. In terms of advice, the problem is known to be in \ensuremath{\mathsf{AOC}}\xspace, but is not \ensuremath{\mathsf{AOC}\text{-complete}}\xspace~\cite{BFKM15}. We remark that a version of unweighted online matching with vertex arrivals (incomparable to our weighted matching with edge arrivals) has been studied with advice in~\cite{DBLP:journals/corr/DurrKR16}. \begin{corollary} There exists a $O(\log n)$-competitive algorithm for Weighted Matching reading $O(\log n)$ bits of advice. \end{corollary} \begin{proof} The result follows from Theorem~\ref{thm:WeightedAOCgeneral} since there exists a $2$-competitive algorithm without advice for (unweighted) Matching. \qed \end{proof} \subsection{Lower bounds} First, we present a result which holds for the weighted versions of many maximization problems in \ensuremath{\mathsf{AOC}}\xspace. It also holds for the weighted versions of \ensuremath{\mathsf{AOC}\text{-complete}}\xspace minimization problems, but Theorem~\ref{thm:reduction} gives a much stronger result. \begin{theorem} \label{thm:simplelowerbound} For the weighted online versions of Independent Set, Clique, Disjoint Path Allocation, and Matching, an algorithm reading $o(\log n)$ bits of advice cannot be $f(n)$-competitive for any function $f$. \end{theorem} To prove Theorem~\ref{thm:simplelowerbound}, we start by proving the following lemma from which the theorem easily follows. \begin{lemma} Let ${\textsc P}\xspace\in\ensuremath{\mathsf{AOC}}\xspace$ and suppose there exists a family $(\sigma_n)_{n\in\mathbb{N}}$ of ${\textsc P}\xspace$-inputs with the following properties: \begin{enumerate} \item $\sigma_n=\langle r_1, r_2,\ldots , r_n\rangle$ consists of $n$ requests. \item $\sigma_{n+1}$ is obtained by adding a single request to the end of $\sigma_n$. \item If {\textsc P}\xspace is a maximization problem, the feasible solutions are those in which at most one request is accepted. If {\textsc P}\xspace is a minimization problem, the feasible solutions are those in which at least one request is accepted. \end{enumerate} Then, no algorithm for the weighted problem $\ensuremath{\textsc{P}_{\text{w}}}\xspace$ reading $o(\log n)$ bits of advice can be $f(n)$-competitive for any function $f$. \end{lemma} \begin{proof} Let $\ensuremath{\textsc{Alg}}\xspace$ be a $\ensuremath{\textsc{P}_{\text{w}}}\xspace$-algorithm reading at most $b=o(\log n)$ bits of advice. Let $f(n)>0$ be an arbitrary non-decreasing function of $n$. We will show that for all sufficiently large $n$, there exists an input of length $n$ such that the profit obtained by $\ensuremath{\textsc{Opt}}\xspace$ is at least $f(n)$ times as large as the profit obtained by $\ensuremath{\textsc{Alg}}\xspace$. Since $f(n)$ was arbitrary, it follows that $\ensuremath{\textsc{Alg}}\xspace$ is not $f(n)$-competitive for any function $f$. Since $b=o(\log n)$, there exists an $N \in \mathbb{Z}$ such that for any $n \geq N$, $\ensuremath{\textsc{Alg}}\xspace$ reads less than $\log (n)-1$ bits of advice on inputs of length at most $n$. Fix an $n\geq N$. For $1\leq i\leq n$, define the $\ensuremath{\textsc{P}_{\text{w}}}\xspace$-input $\widehat{\sigma}_i=\langle\{r_1, f(n)\}, \{r_2, f(n)^2\},\ldots ,$ $\{r_i, f(n)^i\}\rangle$. Consider the set of inputs $\{\widehat{\sigma}_1,\ldots , \widehat{\sigma}_{n}\}$. For every $1\leq i\leq n$, the number of advice bits read by $\ensuremath{\textsc{Alg}}\xspace$ on the input $\widehat{\sigma}_i$ is at most $\log(n)-1$ (since the length of the input $\widehat{\sigma}_i$ is $i\leq n$). Thus, by the pigeonhole principle, there must exist two integers $n_1, n_2$ with $n_1<n_2$ such that $\ensuremath{\textsc{Alg}}\xspace$ reads the same advice on $\widehat{\sigma}_{n_1}$ and $\widehat{\sigma}_{n_2}$. If $\ensuremath{\textsc{Alg}}\xspace$ rejects all requests in $\widehat{\sigma}_{n_1}$, then it achieves a profit of $0$ while \ensuremath{\textsc{Opt}}\xspace obtains a profit of $f(n)^{n_1}$. If $\ensuremath{\textsc{Alg}}\xspace$ accepts a request in $\widehat{\sigma}_{n_1}$, then it obtains a profit of at most $f(n)^{n_1}$. Since $\ensuremath{\textsc{Alg}}\xspace$ reads the same advice on $\widehat{\sigma}_{n_1}$ and $\widehat{\sigma}_{n_2}$ and since the two inputs are indistinguishable for the first $n_1$ requests, this means that $\ensuremath{\textsc{Alg}}\xspace$ also obtains a profit of at most $f(n)^{n_1}$ on the input $\widehat{\sigma}_{n_2}$. But $\ensuremath{\textsc{Opt}}\xspace(\widehat{\sigma}_{n_2})=f(n)^{n_2}$, and hence $\ensuremath{\textsc{Opt}}\xspace(\widehat{\sigma}_{n_2})/\ensuremath{\textsc{Alg}}\xspace(\widehat{\sigma}_{n_2})\geq f(n)^{n_2-n_1}\geq f(n)$. For minimization problems, we can use the same arguments and the input sequence $\widehat{\sigma}_i=\langle\{r_1, f(n)^{-1}\}, \{r_2, f(n)^{-2}\},\ldots , \{r_i, f(n)^{-n}\}\rangle$. \qed \end{proof} \begin{proof}[Proof of Theorem \ref{thm:simplelowerbound}] For Independent Set, we can use the above lemma with a family of cliques $(K_n)_{n\in\mathbb{N}}$, and for Clique, we can use a family of independent sets. For Matching, we can use a family of stars $(K_{1,n})_{n\in\mathbb{N}}$. For Disjoint Path Allocation, we use a path $P_{2n} = \langle v_1, v_2, \ldots, v_{2n} \rangle$ and $r_i = \langle v_i, v_{i+1}, \ldots v_{i+n} \rangle$. \qed \end{proof} Returning to the example of Weighted Matching, we now know that $O(\log n)$ bits suffice to be $O(\log n)$-competitive, and that no algorithm can be $f(n)$-competitive for any function $f$ with $o(\log n)$ bits of advice. In order to prove that a linear number of advice bits is necessary to achieve constant competitiveness for Weighted Matching, we use a direct product theorem from~\cite{M16}. This uses the concept defined in~\cite{M16} of a problem being {\em $\Sigma$-repeatable}. Informally, this means that it is always possible to combine $r$ (sufficiently profitable) input sequences $I_1,I_2,\ldots,I_r$ into a single input $g(I_1,I_2,\ldots,I_r)$ such that serving this single input gives profit close to that of serving each of the $I_i$ independently and adding the profits. \begin{definition} Let $P$ be an online maximization problem and $I$ be the set of possible input sequences. Assume that for every input in $I$, there are only a finite number of valid outputs. Let $I^*$ be the set of concatenations of sequences (rounds) from $I$. $P$ is \emph{$\Sigma$-repeatable with parameters $(k_1,k_2,k_3)$} if there exists a function $g ~:~ I^*\rightarrow I$ satisfying the following: \begin{itemize} \item For every $\sigma^* \in I^*$ with $r$ rounds, $|g(\sigma^*)| \leq |\sigma^*| +k_1 r$ \item For every deterministic algorithm \ensuremath{\textsc{Alg}}\xspace for $P$, there is a deterministic algorithm $\ensuremath{\textsc{Alg}}\xspace^*$ for sequences from $I^*$, such that for every $\sigma^* \in I^*$ with $r$ rounds, $\ensuremath{\textsc{Alg}}\xspace^*(\sigma^*) \geq \ensuremath{\textsc{Alg}}\xspace(g(\sigma^*)-k_2 r$, \item Let $\ensuremath{\textsc{Opt}}\xspace^*$ denote an optimal algorithm for sequences from $I^*$. For every $\sigma^* \in I^*$ with $r$ rounds, $\ensuremath{\textsc{Opt}}\xspace^*(\sigma^*) \leq \ensuremath{\textsc{Opt}}\xspace(g(\sigma^*))+k_3 r$. \end{itemize} \end{definition} \begin{theorem} \label{thm:matching} An $O(1)$-competitive algorithm for Weighted Matching must read $\Omega(n)$ bits of advice. \end{theorem} \begin{proof} We prove the lower bound using a direct product theorem~\cite{M16}. According to~\cite{M16}, it suffices to show that: (i) Weighted Matching is $\Sigma$-repeatable, and (ii) for every $c$, there exists a probability distribution $p_c$ with finite support such that for every deterministic algorithm $\ensuremath{\textsc{Det}}\xspace$ without advice, it holds that $\E_{p_c}[\ensuremath{\textsc{Opt}}\xspace(\sigma)]\geq c\cdot \E_{p_c}[\ensuremath{\textsc{Det}}\xspace(\sigma)]$. Also, there must be a finite upper bound on the profit an algorithm can obtain on an input in the support of $p_c$. It is trivial to see that Weighted Matching is $\Sigma$-repeatable. Fix $c\geq 1$ and let $k=2c-1$. We define the probability distribution $p_c$ by specifying a probabilistic adversary: The input graph will be a star $K_{1,m}$ consisting of $m$ edges for some $1\leq m\leq k$. In round $i$, the adversary reveals the edge $e_i=(v,v_i)$ where $v_i$ is a new vertex and $v$ is the center vertex of the star. The edge $e_i$ has weight $2^i$. If $i<k$, then with probability $1/2$ the adversary will proceed to round $i+1$, and with probability $1/2$ the input sequence will end. If the adversary reaches round $k$, it will always stop after revealing the edge $e_k$ of round $k$. Note that the support of $p_c$ and the largest profit an algorithm can obtain on any input in the support of $p_c$ are both finite. Let $X$ be the random variable which denotes the number of edges revealed by the adversary. Note that $\Pr(X=j)=2^{-j}$ if $1\leq j<k$. Consequently, \begin{equation} \Pr(X=k)=1-\Pr(X<k)=1-\sum_{i=1}^{k-1}2^{-i}=2^{-(k-1)}. \end{equation} Let $\ensuremath{\textsc{Det}}\xspace$ be a deterministic algorithm without advice. We may assume that $\ensuremath{\textsc{Det}}\xspace$ decides in advance on some $1\leq j\leq k$ and accepts the edge $e_j$ (the only other possible deterministic strategy it to never accept an edge, but this is always strictly worse than following any of the $k$ strategies that accepts an edge). If $X<j$, then the profit obtained by $\ensuremath{\textsc{Det}}\xspace$ is zero. If $X\geq j$, then $\ensuremath{\textsc{Det}}\xspace$ obtains a profit of $2^j$. It follows that \begin{align*} \E[\ensuremath{\textsc{Det}}\xspace(\sigma)]=\Pr(X\geq j)2^j=(1-\Pr(X<j))2^j=2^{-(j-1)}2^j=2. \end{align*} The optimal algorithm $\ensuremath{\textsc{Opt}}\xspace$ always accepts the last edge of the input. Thus, if $X=j$, then the profit of $\ensuremath{\textsc{Opt}}\xspace$ is $2^j$. It follows that \begin{align*} \E[\ensuremath{\textsc{Opt}}\xspace(\sigma)]=\sum_{j=1}^{k}\Pr(X=j)2^j=\sum_{j=1}^{k-1}\left(2^{-j}2^j\right)+2^{-(k-1)}2^k=k+1. \end{align*} Thus, we conclude that $\E[\ensuremath{\textsc{Opt}}\xspace(\sigma)]\geq \frac{k+1}{2}\E[\ensuremath{\textsc{Det}}\xspace(\sigma)]= c\E[\ensuremath{\textsc{Det}}\xspace(\sigma)]$. \qed \end{proof} In particular, we cannot achieve constant competitiveness using $O(\log n)$ bits of advice for Weighted Matching. We leave it as an open problem to close the gap between $\omega(1)$ and $O(\log n)$ on the competitiveness of Weighted Matching algorithms with advice complexity $O(\log n)$. \section{Scheduling with Sublinear Advice} For the scheduling problems studied, the requests are jobs, each characterized by its size. Each job must be assigned to one of $m$ available machines. If the machines are {\em identical}, the {\em load} of a job on any machine is simply its size. If the machines are {\em related}, each machine has a speed, and the load of a job, $J$, assigned to a machine with speed $s$ is the size of $J$ divided by $s$. If the machines are {\em unrelated}, each job arrives with a vector specifying its load on each machine. Consider a sequence $\sigma=\langle r_1,\ldots , r_n\rangle$ of $n$ jobs that arrive online. Each job $r_i\in\sigma$ has an associated weight-function $w_i:[m]\rightarrow\mathbb{R}_{+}$. Upon arrival, a job must irrevocably be assigned to one of the $m$ machines. The \emph{load} $L_j$ of a machine $j\in[m]$ is defined as $L_j=\sum_{i\in M_j}w_i(j)$ where $M_j$ is the set of (indices of) jobs scheduled on machine $j$. The \emph{total load} of a schedule for $\sigma$ is the vector $\ensuremath{\mathbf{L}}\xspace=(L_1,\ldots , L_m)$. We say that $(L_1,\ldots , L_m) \leq (L'_1,\ldots , L'_m)$ if and only if $L_i \leq L'_i$ for $1 \leq i \leq m$. A scheduling problem of the above type is specified by an \emph{objective function} $f:\mathbb{R}_+^m\rightarrow \mathbb{R}_+$ and by specifying if the goal is to minimize or maximize $f(\ensuremath{\mathbf{L}}\xspace)=f(L_1,\ldots, L_m)\in\mathbb{R}_+$. We assume that $f$ is non-decreasing, i.e., $f(\ensuremath{\mathbf{L}}\xspace)\leq f(\ensuremath{\mathbf{L}}\xspace')$ for all $\ensuremath{\mathbf{L}}\xspace\leq \ensuremath{\mathbf{L}}\xspace'$. Some of the classical choices of objective function include: \begin{itemize} \item Minimizing the $\ell_p$-norm $f_p(\ensuremath{\mathbf{L}}\xspace)=f_p(L_1,\ldots , L_m)=\|(L_1,\ldots , L_m)\|_p$ for some $1\leq p\leq \infty$. That is, for $1\leq p<\infty$, the goal is to minimize $\left(\sum_{j\in[m]} L_j^p\right)^{1/p}$ and for $p=\infty$, the goal is to minimize the makespan $\max_{j\in [m]} L_j$. \item Maximizing the minimum load $f(\ensuremath{\mathbf{L}}\xspace)=\min_{j\in [m]} L_j$. This is also known as machine covering. Note that this objective function is not a norm\footnote{$f$ is a norm if $f(\alpha \ensuremath{\mathbf{v}}\xspace)=|\alpha|f(\ensuremath{\mathbf{v}}\xspace)$, $f(\ensuremath{\mathbf{u}}\xspace+\ensuremath{\mathbf{v}}\xspace)\leq f(\ensuremath{\mathbf{u}}\xspace)+f(\ensuremath{\mathbf{v}}\xspace)$, and $f(\ensuremath{\mathbf{v}}\xspace)=0 \Rightarrow \ensuremath{\mathbf{v}}\xspace=\mathbf{0}$.}, but it does satisfy that $f(\alpha \ensuremath{\mathbf{L}}\xspace)=\alpha f(\ensuremath{\mathbf{L}}\xspace)$ for every $\alpha\geq 0$ and $\ensuremath{\mathbf{L}}\xspace\in\mathbb{R}^m_+$. \end{itemize} We begin with a result for \emph{unrelated} machines. \begin{theorem} \label{thm:unrelatedmin} Let {\textsc P}\xspace be a scheduling problem on $m$ unrelated machines where the goal is to minimize an objective function $f$. Assume that $f$ is a non-decreasing norm. Then, for $0<\varepsilon\leq 1$, there exists a $(1+\varepsilon)$-competitive ${\textsc P}\xspace$-algorithm reading $O\big( (\frac{4}{\varepsilon} \log(n)+2)^m \log (n)\big)$ bits of advice. In particular, if $m=O(1)$ and $\varepsilon=\Omega(1)$, then there exists a $(1+\varepsilon)$-competitive algorithm reading $O(\polylog(n))$ bits of advice. \end{theorem} \begin{proof} Since the objective function $f$ is a norm on $\mathbb{R}^m$, we will denote it by $\|\cdot \|$. Let $\mathbf{1}_j$ be the $j$th unit vector (the vector with a $1$ in the $j$th coordinate and $0$ elsewhere). Fix an input sequence $\sigma$. The oracle starts by computing an arbitrary optimal schedule for $\sigma$. Throughout most of this proof, we assume that $n$ is sufficiently large. The necessary conditions are discussed at the end of the proof, along with how to handle small $n$. Let $\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Opt}}\xspace}$ be the load-vector of this schedule. Thus, $\ensuremath{\textsc{Opt}}\xspace(\sigma)=\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$. Let $s=1+\varepsilon /2$ and let $k$ be the unique integer such that $s^{k}\leq \|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\| < s^{k+1}$. A job $r_i\in\sigma$ is said to be \emph{unimportant} if there exists a machine $j\in[m]$ such that $\|w_i(j)\mathbf{1}_j\|< s^{k-\ceil{\log_{s}(n^2)}}$. A job which is not unimportant is {\em important}. The oracle uses $O(\log n)$ bits to encode $n$ using a self-delimiting encoding. It then writes the index $i'$ of the first important job $r_{i'}$ onto the advice tape (or indicates that $\sigma$ contains no important jobs) using $\ceil{\log(n+1)}$ bits. Let $j'$ be the machine minimizing $\|w_{i'}(j')\mathbf{1}_{j'}\|$, where ties are broken arbitrarily. The oracle also writes $\Delta_{i'} = k-k_{i'}$, where $k_{i'}$ is the unique integer such that $s^{k_{i'}}\leq \|w_{i'}(j')\mathbf{1}_{j'}\|< s^{k_{i'}+1}$ onto the advice tape using $O(\log \log_s n)$ bits. \emph{Scheduling unimportant jobs.} If a job $r_i\in\sigma$ is unimportant, then the algorithm schedules the job on the machine $j$ minimizing $\|w_i(j)\mathbf{1}_j\|$ where ties are broken arbitrarily. We now explain how the algorithm knows if a job is unimportant or not. If $r_i\in\sigma$ is a job that arrives before the first important job, i.e., if $i< i'$, then $r_i$ is unimportant by definition. When job $r_{i'}$ arrives, the algorithm can deduce $k$ since it knows $\Delta_{i'}$ from the advice and since it can compute $\min_{j} \|w_{i'}(j)\mathbf{1}_{j}\|$ without help. Knowing $k$ (and the number of jobs $n$), the algorithm is able to tell if a job is unimportant or not. \emph{Scheduling important jobs.} We now describe how the algorithm schedules the important jobs. To this end, we define the type of an important job. For an important job $r_i$, let $\Delta_i(1),\ldots , \Delta_i(m)$ be defined as follows: For $1 \leq j \leq m$, if there exists an integer $k_i(j) \leq k$ such that $s^{k_i(j)}\leq \|w_{i}(j)\mathbf{1}_{j}\| <s^{k_i(j)+1}$, then $\Delta_i(j)=k-k_i(j)$ (since $r_i$ is important, $\Delta_i(j) \leq \ceil{\log_{s}(n^2)}$). If no such integer exists, then it must be the case that $ \|w_{i}(j)\mathbf{1}_{j}\|\geq s^{k+1}> \|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$. In this case, we let $\Delta_i(j)=\bot$ be a dummy symbol. The \emph{type} of $r_i$ is the vector $\mathbf{\Delta}_i=(\Delta_i(1),\ldots ,\Delta_i(m))$. Note that there are only $(\lceil \log_{s}(n^2)\rceil+2)^m$ different types. For each possible type $\mathbf{\Delta}=(\Delta(1),\ldots , \Delta(m))$, the oracle writes the number, $a_{\mathbf{\Delta}}$, of jobs of type $\mathbf{\Delta}$ onto the advice tape. This requires at most $(\lceil \log_{s}(n^2)\rceil+2)^m\lceil \log(n+1)\rceil$ bits of advice. Note that since $\|\cdot\|$ is a norm, if $r_i\in\sigma$ is of type $\mathbf{\Delta}_i=(\Delta_i(1),\ldots , \Delta_i(m))$, then $s^{k-\Delta_i(j)}\|\mathbf{1}_j\|^{-1}\leq w_i(j)\leq s^{k-\Delta_i(j)+1}\|\mathbf{1}_j\|^{-1}$ if $\Delta_i(j)\neq\bot$ and $w_i(j)>\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|\|\mathbf{1}_j\|^{-1}$ if $\Delta_i(j)=\bot$. The algorithm computes an optimal schedule $\widehat{S}_{\text{\ensuremath{\text{imp}}\xspace}}$ for the input $\widehat{\sigma}$ which for each possible type $\mathbf{\Delta}$ contains $a_{\mathbf{\Delta}}$ jobs with weight-function $\widehat{w}_{\mathbf{\Delta}}$ where $\widehat{w}_{\mathbf{\Delta}}(j)=s^{k-\Delta(j)+1}\|\mathbf{1}_j\|^{-1}$ if $k(j)\neq\bot$ and $\widehat{w}_{\mathbf{\Delta}}(j)=\infty$ otherwise. This choice of weight-function ensures that if $r_{i}\in\sigma$ is a job of type $\mathbf{\Delta}_i$, then for each $j$ with $\Delta_i(j)\neq\bot$, \begin{equation} \label{eq:unrelated} w_{i}(j)< \widehat{w}_{\mathbf{\Delta}_i}(j)\leq s \cdot w_{i}(j). \end{equation} When an important job of $\sigma$ arrives, the algorithm computes the type of the job. Based solely on this type, the algorithm schedules the important jobs in $\sigma$ by following the schedule $\widehat{S}_{\ensuremath{\text{imp}}\xspace}$ for $\widehat{\sigma}$. Let $\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}$ be the load-vector of the important jobs of $\sigma$ scheduled by $\ensuremath{\textsc{Alg}}\xspace$. Note that by Eq.~(\ref{eq:unrelated}), the weight-function of an important job of $\sigma$ is strictly smaller (for all machines) than the weight-function of the corresponding job of $\widehat{\sigma}$. Thus, since $f$ is non-decreasing $\|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}\|$ is bounded from above by the cost of the schedule $\widehat{S}_{\ensuremath{\text{imp}}\xspace}$ for $\widehat{\sigma}$. \emph{Putting it all together.} The optimal schedule for $\sigma$ computed by the oracle induces a schedule of $\widehat{\sigma}$. Let $\widehat{\ensuremath{\mathbf{L}}\xspace}$ be the load-vector of this schedule. By Eq.~(\ref{eq:unrelated}), we get that $\|\widehat{\ensuremath{\mathbf{L}}\xspace}\| \leq s \|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$. Thus, the cost of $\widehat{S}_{\text{\ensuremath{\text{imp}}\xspace}}$ (which was an optimal scheduling of $\widehat{\sigma}$) is at most $\|\widehat{\ensuremath{\mathbf{L}}\xspace}\|\leq s\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$. Let $\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{unimp}}\xspace}$ be the load-vector of the unimportant jobs scheduled by $\ensuremath{\textsc{Alg}}\xspace$. Furthermore, let $M_j$ be the set of indices of the unimportant jobs scheduled by $\ensuremath{\textsc{Alg}}\xspace$ on machine $j$. By subadditivity, \begin{align*} \|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{unimp}}\xspace}\|&=\left\|\sum_{j=1}^m\sum_{i\in M_j}w_i(j)\mathbf{1}_j\right\| \leq \sum_{j=1}^m\sum_{i\in M_j} \|w_i(j)\mathbf{1}_j\| < \sum_{j=1}^m\sum_{i\in M_j} s^{k-\lceil \log_{s}(n^2)\rceil} \\ &\leq n \frac{\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|}{n^2}\leq \frac{\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|}{n}. \end{align*} We are finally able to bound the cost of the entire schedule created by $\ensuremath{\textsc{Alg}}\xspace$: \begin{align*} \ensuremath{\textsc{Alg}}\xspace(\sigma)=\|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}+\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{unimp}}\xspace}\|\leq \|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}\|+\|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{unimp}}\xspace}\|\leq (s+1/n)\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\| \end{align*} Recall that $s=1+\varepsilon / 2$. Thus, if $n \geq 2/\varepsilon$, then $\ensuremath{\textsc{Alg}}\xspace(\sigma)\leq (1+\varepsilon)\ensuremath{\textsc{Opt}}\xspace(\sigma)$. For inputs of length less than $2/\varepsilon$, the oracle can simply encode the optimal solution using at most $\frac{2}{\varepsilon}\lceil \log m\rceil$ bits of advice. The total amount of advice used by our algorithm is at most \begin{align*} (\lceil \log_{s}(n^2)\rceil+2)^m\lceil \log(n+1)\rceil+O(\log n+\log \log_s n)=O\big( (4\varepsilon^{-1} \log(n)+2)^m \log (n)\big). \end{align*} \qed \end{proof} For the following discussion, assume that $\varepsilon=\Theta(1)$. We remark that the $(1+\varepsilon)$-competitive algorithm in Theorem~\ref{thm:unrelatedmin} is only of interest if the number of machines $m$ is small compared to the number of jobs $n$. As already noted, the most interesting aspect of Theorem~\ref{thm:unrelatedmin} is that our algorithm uses only $\polylog(n)$ bits of advice if $m$ is a constant. More generally, if $m=o(\log n / \log\log n)$, then our algorithm will use $o(n)$ bits of advice. On the other hand, if $m=\Theta(\log n)$, then our algorithm uses $\Omega(\log(n)^{\log (n)})$ bits of advice, which is worse than the trivial $1$-competitive algorithm which uses $n\lceil \log m\rceil=O(n\log\log n )$ bits of advice when $m=\Theta(\log n)$. The advice complexity of the algorithm in Theorem~\ref{thm:unrelatedmin} depends on the number of machines $m$ because we want the result to hold even when the machines are unrelated. We now show that when restricting to related machines, we can obtain a $(1+\varepsilon)$-competitive algorithm using $O(\varepsilon^{-1}\log^2 n)$ bits of advice, independent of the number of machines. The proof resembles that of Theorem~\ref{thm:unrelatedmin}. The main difference is that we are able to reduce the number of types to $O(\log^2 n)$. \begin{theorem}\label{thm:relatedmin} Let {\textsc P}\xspace be a scheduling problem on $m$ related machines where the goal is to minimize an objective function $f$. Assume that $f$ is a non-decreasing norm. Then, for $0<\varepsilon\leq 1$, there exists a $(1+\varepsilon)$-competitive ${\textsc P}\xspace$-algorithm with advice complexity $O\big(\varepsilon^{-1}\log^2 n\big).$ \end{theorem} \begin{proof} Since the objective function $f$ is a norm on $\mathbb{R}^m$, we will denote it by $\|\cdot \|$. Fix an input sequence $\sigma$. The oracle starts by computing an arbitrary optimal schedule for $\sigma$. Let $s=1+\varepsilon/2$. The oracle uses $O(\log n)$ bits to encode $n$ using a self-delimiting encoding. Let $C_1,\ldots , C_m$ be the speeds of the $m$ machines. Assume without loss of generality that $\|\mathbf{1}_j\|/C_j$ attains its minimum value when $j=1$. Define $B=\|\mathbf{1}_1\|/C_1$. Let $\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Opt}}\xspace}$ be the load-vector of the fixed optimal schedule. Thus, $\ensuremath{\textsc{Opt}}\xspace(\sigma)=\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$. Let $k$ be the unique integer such that $s^{k}\leq \|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\| < s^{k+1}$. A job $r_i\in\sigma$ is said to be \emph{unimportant} if its weight, $w_i$, satisfies $w_iB < s^{k-\ceil{\log_{s}(n^2)}}$. A job which is not unimportant is important. Note that $w_iB$ is always bounded from above by $\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$ since $r_i$ must be placed on some machine. The oracle writes the index $i'$ of the first important job $r_{i'}$ onto the advice tape (or indicates that $\sigma$ contains no important jobs) using $\ceil{\log n}+1$ bits. The oracle also writes the unique integer $k'$ such that $s^{k-k'}\leq w_{i'}B < s^{k-k'+1}$ onto the advice tape, using $O(\log\log_{s}(n))$ bits. We now explain how the algorithm knows if a job is unimportant or not. If $r_i\in\sigma$ is a job that arrives before the first important job, i.e., if $i< i'$, then $r_i$ is unimportant by definition. When job $r_{i'}$ arrives, the algorithm can deduce $k$ since it knows $k'$ from the advice and since it can compute $w_{i'}B$ without help. Knowing $k$ (and the number of jobs $n$), the algorithm is able to tell if a job is unimportant or not. If a job $r_i\in\sigma$ is unimportant, then the algorithm schedules the job on machine $1$. \emph{Scheduling important jobs.} We now describe how the algorithm schedules the important jobs. To this end, we define the type of an important job. The \emph{type} of an important job $r_i$ is the non-negative integer $t_i$ such that $s^{k-t_i}\leq w_iB< s^{k-t_i+1}$. Note that there are only $\ceil{\log_{s}(n^2)}+1$ different types. For each possible type $0\leq t\leq \ceil{\log_{s}(n^2)}$, the oracle writes the number of jobs $a_t$ of that type onto the advice tape. This requires at most $O(\log_{s}(n^2)\log(n))$ bits of advice. Note that since $\|\cdot\|$ is a norm, if $r_i\in\sigma$ is of type $t_i$, then $s^{k-t_i}B^{-1} \leq w_i\leq s^{k-t_i+1}B^{-1}$. The algorithm computes an optimal schedule $\widehat{S}_{\text{\ensuremath{\text{imp}}\xspace}}$ for the input $\widehat{\sigma}$ which for each possible type $0\leq t\leq \ceil{\log_{s}(n^2)}$ contains $a_{t}$ jobs with weight $\widehat{w}_t=s^{k-k_i+1}B^{-1}$. This choice of weight ensures that if $r_{i}\in\sigma$ is a job of type $t_{i}$, then, \begin{equation} \label{eq:related} w_{i}< \widehat{w}_{t_i}\leq s\cdot w_{i}. \end{equation} When an important job of $\sigma$ arrives, the algorithm computes the type of the job. Based solely on this type, the algorithm schedules the important jobs in $\sigma$ by following the schedule $\widehat{S}_{\ensuremath{\text{imp}}\xspace}$ for $\widehat{\sigma}$. Let $\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}$ be the load-vector of the important jobs of $\sigma$ scheduled by $\ensuremath{\textsc{Alg}}\xspace$. Note that by Eq.~(\ref{eq:related}), the weight of an important job of $\sigma$ is strictly smaller than the weight of the corresponding job of $\widehat{\sigma}$. Thus, $\|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}\|$ is bounded from above by the cost of the schedule $\widehat{S}_{\ensuremath{\text{imp}}\xspace}$ for $\widehat{\sigma}$. \emph{Putting it all together.} The fixed optimal schedule for $\sigma$ induces a scheduling of $\widehat{\sigma}$. Let $\widehat{\ensuremath{\mathbf{L}}\xspace}$ be the load-vector of this schedule. By Eq.~(\ref{eq:related}), we get that $\widehat{\ensuremath{\mathbf{L}}\xspace}\leq s\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace$. Thus, the cost of $\widehat{S}_{\text{\ensuremath{\text{imp}}\xspace}}$ (which was an optimal scheduling of $\widehat{\sigma}$) is at most $\|\widehat{\ensuremath{\mathbf{L}}\xspace}\|\leq s\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|$. Let $W_u$ be the total weight of unimportant jobs scheduled on machine $1$ by $\ensuremath{\textsc{Alg}}\xspace$. We have that \begin{align*} \|(W_u/C_1)\mathbf{1}_1\|=W_uB\leq n s^{k-\ceil{\log_{s}(n^2)}}\leq n\frac{\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|}{n^2}\leq \frac{\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\|}{n}. \end{align*} We are finally able to bound the cost of the entire schedule $S_{\ensuremath{\text{imp}}\xspace}\cup S_{\ensuremath{\text{unimp}}\xspace}$ created by $\ensuremath{\textsc{Alg}}\xspace$: \begin{align*} \ensuremath{\textsc{Alg}}\xspace(\sigma)=\|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}+(W_u/C_1)\mathbf{1}_1\|\leq \|\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\text{imp}}\xspace}\|+\|(W_u/C_1)\mathbf{1}_1\|\leq (s+1/n)\|\ensuremath{\mathbf{L}}\xspace_\ensuremath{\textsc{Opt}}\xspace\| \end{align*} Recall that $s=1+\varepsilon / 2$. Thus, if $n>2/\varepsilon$, then $\ensuremath{\textsc{Alg}}\xspace(\sigma)\leq (1+\varepsilon)\ensuremath{\textsc{Opt}}\xspace(\sigma)$. For inputs of length less than $2/\varepsilon$, the oracle can simply encode the optimal solution using at most $\frac{2}{\varepsilon}\lceil \log m\rceil$ bits of advice. The total amount of advice used by our algorithm is $O(\varepsilon^{-1}\log^2 n)$. \qed \end{proof} We now consider scheduling problems where the goal is to maximize an objective function $f$. Recall that we assume that the objective function is non-decreasing. The most notable example is when $f$ is the minimum load. In the following theorem, we show how to schedule almost optimally on unrelated machines with only a rather weak constraint on $f$ (weaker than $f$ being a norm). \begin{theorem}\label{thm:seminorm} Let ${\textsc P}\xspace$ be a scheduling problem on $m$ unrelated machines where the goal is to maximize an objective function $f$. Assume that $f$ is non-decreasing, that $f(\alpha\ensuremath{\mathbf{L}}\xspace) \leq \alpha f(\ensuremath{\mathbf{L}}\xspace)$ for every $\alpha\geq 0$, and $\ensuremath{\mathbf{L}}\xspace\in\mathbb{R}^m_+$. Then, for every $0<\varepsilon\leq 1$, there exists a $(1+\varepsilon)$-competitive ${\textsc P}\xspace$-algorithm with advice complexity $O((\frac{4}{\varepsilon} \log(n)+2)^mm^2\log n).$ In particular, if $m=O(1)$ and $\ensuremath{\varepsilon}\xspace = \Omega(1)$, the advice complexity is $O(\polylog (n))$. \end{theorem} \begin{proof} Fix an input sequence $\sigma$ and an arbitrary optimal schedule. Let $s=1+\varepsilon/2$. The oracle uses $O(\log n)$ bits to encode $n$ using a self-delimiting encoding. For $1\leq j\leq m$, let $L_j$ be the load on machine $j$ in the optimal schedule. Furthermore, let $k_j$ be the unique integer such that $s^{k_j}\leq L_j<s^{k_j+1}$. We say that a job $r_i$ is \emph{unimportant to machine $j$} if $w_i(j)<s^{k_j-\lceil \log_{s}(n^2)\rceil}$, \emph{important to machine $j$} if $s^{k_j-\lceil \log_{s}(n^2)\rceil}\leq w_i(j)<s^{k_j+1}$ and {\em huge to machine $j$} if $w_i(j) \geq s^{k_j+1}$. Note that if $r_i$ is huge to machine $j$, \ensuremath{\textsc{Opt}}\xspace does not schedule $r_i$ on machine $j$. A job which is important to at least one machine is called {\em important}. All other jobs are called {\em unimportant}. Note that, by definition, any unimportant job is unimportant (and not huge) to the machine where it is scheduled by \ensuremath{\textsc{Opt}}\xspace. We number the machines such that the first job which is important to machine $j$ arrives no later than the first job which is important to machine $j'$ for every $j<j'$. This numbering is written to the advice tape, using $O(m \log m)$ advice bits. The algorithm works in $m+1$ phases (some of which might be empty). Phase 0 begins when the first request arrives. For $1\leq j\leq m$, phase $j-1$ ends and phase $j$ begins when the first important job for machine $j$ arrives. Note that the same job could be the first important job for more than one machine. Phase $m$ ends with the last request of $\sigma$. For each phase, $j$, the oracle writes the index, $i$, of the request starting the phase and the unique integer $\Delta_i(j)$ such that $s^{k_j-\Delta_i(j)} \leq w_i(j) < s^{k_j-\Delta_i(j)+1}$. The unimportant jobs are scheduled arbitrarily by our algorithm (it will become clear from the analysis of the algorithm that any choice will do). We now describe how the algorithm schedules the important jobs in phase $j$ for $1\leq j\leq m$. By definition, at any point in phase $j$, we have received an important job for machines $1,2,\ldots , j$ and no important job for machine $j+1$ has yet arrived. The \emph{type} of a job $r_i$ in phase $j$ is a vector $\mathbf{\Delta}_i=(\Delta_i(1),\ldots , \Delta_i(j))$ where $\Delta_i(j')$ is the interval of $r_i$ on machine $j'$ (so $s^{k_j-\Delta_i(j')} \leq w_i(j') < s^{k_j-\Delta_i(j')+1}$) or $\bot$ if the job is not important to machine $j'$. Note that there are $\ceil{(2+\log_{s}(n^2))^j}$ possible job types in phase $j$. The oracle considers how the jobs in phase $j$ are scheduled in the fixed optimal schedule. For each job type $\mathbf{\Delta}$ and each machine $1\leq j'\leq j$, the oracle encodes the number of jobs of that type which are scheduled on machine $j'$ during phase $j$. This can be done using $O(\lceil 2+\log_{s}(n^2)\rceil^mm\log n)$ bits of advice for a single phase, and $O(\lceil 2+\log_{s}(n^2)\rceil^mm^2\log n)$ bits of advice for all $m$ phases. Equipped with the advice described above, the algorithm simply schedules the important jobs in the current phase based on their types. This ensures that, for each machine $j$, the total load of important jobs that \ensuremath{\textsc{Opt}}\xspace schedules on machine $j$ is at most $s$ times as large as the total load of important jobs scheduled by \ensuremath{\textsc{Alg}}\xspace on machine $j$ (since if $r_i$ and $r_{i'}$ are important to machine $j$ and of the same type, then $w_i(j)< s\cdot w_{i'}(j)$). In order to finish the proof, we need to show that the contribution of unimportant jobs to $\ensuremath{\textsc{Opt}}\xspace(\sigma)$ is negligible (recall that all jobs are either important or unimportant). To this end, let $L_j^{\ensuremath{\text{unimp}}\xspace}$ (resp. $L_j^{\ensuremath{\text{imp}}\xspace}$) be the load on machine $j$ of the unimportant (resp. important) jobs scheduled on that machine in the optimal schedule. Note that $L_j=L_j^{\ensuremath{\text{unimp}}\xspace}+L_j^{\ensuremath{\text{imp}}\xspace}$. By the definition of an unimportant job (and since there trivially can be no more than $n$ unimportant jobs), we find that for every $1\leq j\leq m$, \begin{equation*} L_j^{\ensuremath{\text{unimp}}\xspace}<n \cdot s^{-\ceil{\log_s(n^2)}} \cdot L_j\leq \frac{L_j}{n}. \end{equation*} Thus, $L_j=L_j^{\ensuremath{\text{unimp}}\xspace}+L_j^{\ensuremath{\text{imp}}\xspace}\leq L_j/n+L_j^{\ensuremath{\text{imp}}\xspace}$ from which $L_j\leq \frac{n}{n-1}\cdot L_j^{\ensuremath{\text{imp}}\xspace}$ follows, assuming that $n>1$. Since this holds for all machines, and since as previously argued $\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Opt}}\xspace}^{\ensuremath{\text{imp}}\xspace}\leq s\cdot \ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Alg}}\xspace}^{\ensuremath{\text{imp}}\xspace} \leq s\cdot \ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Alg}}\xspace}$, we get that $$\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Opt}}\xspace}\leq \frac{n}{n-1} \ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Opt}}\xspace}^{\ensuremath{\text{imp}}\xspace}\leq s\frac{n}{n-1} \ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Alg}}\xspace}.$$ By assumption, the objective function $f$ satisfies $f(\alpha \ensuremath{\mathbf{L}}\xspace)\leq \alpha f(\ensuremath{\mathbf{L}}\xspace)$ and is non-decreasing. Thus, we conclude that \begin{align*} \ensuremath{\textsc{Opt}}\xspace(\sigma)&=f(\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Opt}}\xspace}) \leq f\left( s\frac{n}{n-1}\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Alg}}\xspace}\right)\leq s\frac{n}{n-1}f(\ensuremath{\mathbf{L}}\xspace_{\ensuremath{\textsc{Alg}}\xspace})=s\frac{n}{n-1}\ensuremath{\textsc{Alg}}\xspace(\sigma). \end{align*} For $n \geq 2 + \frac{2}{\ensuremath{\varepsilon}\xspace}$, this gives a ratio of at most $1+\ensuremath{\varepsilon}\xspace$. \qed \end{proof} \bibliographystyle{plain}
{'timestamp': '2017-08-15T02:11:07', 'yymm': '1606', 'arxiv_id': '1606.05210', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05210'}
arxiv
\section{Introduction} \label{sec:intro} In many data-driven applications, including medicine, the primary interest is identifying interventions that produce a desired change in some associated outcome. Due to experimental limitations, learning in such domains is commonly restricted to an observational dataset $\mathcal{D}_n := \left\{ \left(x^{(i)}, y^{(i)}\right) \right\}_{i=1}^n$ which consists of IID samples from a population with joint distribution $\mathbb{P}_{XY}$ over covariates (features) $X \in \mathbb{R}^d$ and outcomes $Y \in \mathbb{R}$. Typically, such data is analyzed using models which facilitate understanding of the relations between variables (eg.\ assuming linearity/additivity). Based on conclusions drawn from this analysis, the analyst decides how to intervene in a manner they confidently believe will improve outcomes. Formalizing such beliefs via Bayesian inference, we develop a framework that identifies beneficial interventions directly from the data. In our setup, an intervention on an individual with pre-treatment covariates $X$ produces post-treatment covariate values $\widetilde{X}$ that determine the resulting outcome $Y$ (depicted as the graphical model: $X \rightarrow \widetilde{X} \rightarrow Y)$. Each possible intervention results in a diffferent $\widetilde{X}$. More concretely, we make the following simplifying assumption: \begin{equation} Y = f(\widetilde{X}) + \varepsilon \ \text{ with } \mathbb{E}[\varepsilon] = 0, \varepsilon \independent \widetilde{X}, X \label{eq:functionassumption} \end{equation} for some underlying function $f$ that encodes the effects of causal mechanisms (ie.\ $\widetilde{X}$ represents a fair description of the system state, and some covariates in $\widetilde{X}$ causally affect $Y$, not vice-versa). The observed data is comprised of naturally occurring covariate values where we presume $\widetilde{x}^{(i)} = x^{(i)}$ for $i=1,\dots,n$ (ie.\ the system state remains static without intervention, so the observed covariate values directly influence the observed outcomes). Moreover, we assume the relationship between these covariate values and the outcomes remains invariant, following the same (unknown) function $f$ for any $\widetilde{X}$ arising from one of our feasible interventions (or no intervention at all). Note that this assumption precludes the presence of hidden confounding. \cite{Peters2015} have also relied on this invariance assumption, verifying it as a reasonable property of causal mechanisms in nature. Given this data, we aim to learn an intervention policy defined by a covariate transformation $T : \mathbb{R}^d \rightarrow \mathbb{R}^d$, applied to each individual in the population. Here, $T(x)$ presents a desired setting of the covariates that should be reflected by subsequent intervention to actually influence outcomes. When $T$ only specifies changes to a subset of the covariates, an intervention seeking to realize $T$ may have unintended side-effects on covariates outside of this subset. We ignore such ``fat hand'' settings \mbox{\citep{Duvenaud2010}} until \S\ref{causalconnection}. Instead, our methods assume interventions can always be carried out with great precision to ensure the desired transformation $T$ is exactly reflected in the post-treatment values: $\widetilde{x} = T(x)$. Our goal is to identify the transformation $T$ which produces the largest corresponding post-treatment improvement with high certainty. $T(x)$ can either represent a single mapping to be performed on all individuals (global policy) or encode a personalized policy where the intervened upon variables and their values may change with $x$. Our strong assumptions are made to ensure that statistical modeling alone suffices to identify beneficial interventions. While many real-world tasks violate these conditions, there exist important domains in which violations are sufficiently minor that our methods can discover effective interventions (cf.\ \citet{Carulla2016, Peters2015}). We use two applications to illustrate our framework. One is a writing improvement task where the data consists of documents labeled with associated outcomes (eg.\ grades or popularity) and the goal is to suggest beneficial changes to the author. Our second example is a gene perturbation task where the expression of some regulatory genes can be up/down-regulated in a population (eg.\ cells or bacteria) with the goal of inducing a particular phenotype or activation/repression of a downstream gene. In these examples, covariates are known to cause outcomes and our other assumptions may hold to some degree, depending on the type of external intervention used to alter covariate values. The contributions of this work include: (1) a formal definition of the optimal intervention that exhibits desirable characteristics under uncertainty due to limited data, (2) widely applicable types of (sparse) intervention policy that are easily enacted across a whole population, (3) algorithms to find the optimal intervention under practical constraints, (4) theoretical insight regarding our methods' properties in Gaussian Process settings as well as certain misspecified applications. \section{Related Work} \label{sec:relwork} The same invariance assumption has been exploited by \citet{Peters2015} and \citet{Carulla2016} for causal variable selection in regression models. Recently, researchers such as \citet{Duvenaud2010} and \citet{Kleinberg2015} have supported a greater role for predictive modeling in various decision-making settings. \cite{Zeevi2015} use gradient boosting to predict glycemic response based on diet (and personal/microbiome covariates), and found they can naively leverage their regressor to select personalized diets which result in superior glucose levels than the meals proposed by a clinical dietitian. As treatment-selection in high-impact applications (eg.\ healthcare) grows increasingly reliant on supervised learning methods, it is imperative to properly handle uncertainty. Nonlinear Bayesian predictive models have been employed by \citet{Hill2012}, \citet{Brodersen2015}, and \citet{Krishnan2015} for quantifying the effects of a given treatment from observations of individuals who have been treated and those who have not. Rather than considering a single given intervention, we introduce the notion of an optimal intervention under various practical constraints, and how to identify such a policy from a limited dataset (in which no individuals have necessarily received any interventions). Although our goals appear similar to Bayesian optimization and bandit problems \citep{Shahriari2016, Agarwal2013}, additional data is not collected in our setup. Since we consider settings where interventions are proposed based on all available data, acquisition functions for sequential exploration of the response-surface are not appropriate. As most existing data is not generated through sequential experimentation, our methods are more broadly applicable than iterative approaches like Bayesian optimization. A greater distinction is our work's focus on the pre vs.\ post-intervention change in outcome for each particular individual, whereas Bayesian optimization seeks a single globally optimal configuration of covariates. In practice, feasible covariate transformations are constrained based on an individual's naturally occurring covariate-values, which stem from some underlying population beyond our control. For example in the writing improvement task, the goal is not to identify a globally optimal configuration of covariates that all texts should strive to achieve, but rather to inform a particular author of simple modifications likely to improve the outcome of his/her existing article. Appropriately treating such constraints is particularly important when we wish to prescribe a global policy corresponding to a single intervention applied to all individuals from the population (there is no notion of an underlying population in Bayesian optimization). \section{Methods} \label{sec:methods} Our strategy is to first fit a Bayesian model for $Y \mid X$ whose posterior encodes our beliefs about the underlying function $f$ given the observed data. Subsequently, the posterior for $f \mid \mathcal{D}_n$ is used to identify a transformation of the covariates $T : \mathbb{R}^d \rightarrow \mathbb{R}^d$ which is likely to improve expected post-intervention outcomes according to our current beliefs. The posterior for $f \mid \mathcal{D}_n$ may be summarized at any points $x, x' \in \mathbb{R}^d$ by mean function $\mathbb{E}[f(x) \mid \mathcal{D}_n]$ and covariance function $\text{Cov}(f(x) , f(x') \mid \mathcal{D}_n)$. \subsection{Intervening at the Individual Level} For $x \in \mathbb{R}^d$ representing the covariate-measurements from an individual, we are given a set $\mathcal{C}_x \subset \mathbb{R}^d$ that denotes constraints of possible transformations of $x$. Let $T(x) = \widetilde{x} \in \mathcal{C}_x$ denote the new covariate-measurements of this individual after a particular intervention on $x$ which alters covariates as specified by transformation $T: \mathbb{R}^d \rightarrow \mathbb{R}^d$. Recall that we assume an intervention can be conducted to produce post-treatment covariate-values that exactly match any feasible transformation: $\widetilde{x} = T(x)$, and we thus write $f(T(x))$ in place of $\mathbb{E}_{\varepsilon}[Y \mid \widetilde{X} = T(x)]$. We first consider \emph{personalized interventions} in which $T$ may be tailored to a particular $x$. Under the Bayesian perspective, $f \mid \mathcal{D}_n$ is randomly distributed according to our posterior beliefs, and we define the \emph{individual expected gain} function: \begin{equation} G_x(T) := f(T(x)) - f(x) \mid \mathcal{D}_n \label{eq:indgain} \end{equation} Since $f(x) = \mathbb{E}_\varepsilon [Y \mid \widetilde{X} = x]$, random function $G_x$ evaluates the expected outcome-difference at the post vs. pre-intervention setting of the covariates (this expectation is over the noise $\varepsilon$, not our posterior). To infer the best personalized intervention (assuming higher outcomes are desired), we use optimization over vectors $T(x) \in \mathbb{R}^d$ to find: \begin{equation} T^*(x) = \argmax_{T(x) \in \mathcal{C}_x} \ F^{-1}_{G_x(T)}( \alpha) \label{eq:personalized} \end{equation} where $F^{-1}_{G(\cdot)}(\alpha)$ denotes the $\alpha^{\text{th}}$ quantile of our posterior distribution over $G(\cdot)$. We choose $0 < \alpha < 0.5$, which implies the intervention that produces $T^*(x)$ should improve the expected outcome with probability $\ge 1-\alpha$ under our posterior beliefs. Defined based on known constraints of feasible interventions, the set $\mathcal{C}_x \subset \mathbb{R}^d$ enumerates possible transformations that can be applied to an individual with covariate values $x$. If the set of possible interventions is independent of $x$ (ie.\ $\mathcal{C}_x = \mathcal{C} \ \forall x$), then our goal is similar to the optimal covariate-configuration problem studied in Bayesian optimization. However, in many practical applications, $x$-independent transformations are not realizable through intervention. Consider gene perturbation, a scenario where it is impractical to simultaneously target more than a few genes due to technological limitations. If alternatively intervening on a quantity like caloric intake, it is only realistic to change an individual's current value by at most a small amount. The choice $\mathcal{C}_x := \{ z \in \mathbb{R}^d : ||x - z||_0 \le k \}$ reflects the constraint that at most $k$ covariates can be intervened upon. We can denote limits on the amount that the $s^{\text{th}}$ covariate may be altered by $\mathcal{C}_x := \{ z \in \mathbb{R}^d : |x_s - z_s| \le \gamma_s \}$ for $s \in \{1,\dots,d\}$. In realistic settings, $\mathcal{C}_x$ may be the intersection of many such sets reflecting other possible constraints such as boundedness, impossible joint configurations of multiple covariates, etc. For any $x, T(x) \in \mathbb{R}^d$: the posterior distribution for $G_x(T)$ has: \begin{align*} & \text{mean} = \mathbb{E}[f(T(x) \mid \mathcal{D}_n ] - \mathbb{E}[f(x) \mid \mathcal{D}_n \numberthis \\ & \text{variance} = \text{Var}(f(T(x)) \mid \mathcal{D}_n) + \text{Var}(f(x) \mid \mathcal{D}_n) \\ & \hspace*{18mm} - 2\text{Cov}(f(T(x)), f(x) \mid \mathcal{D}_n) \numberthis \end{align*} which is easily computed using the corresponding mean/covariance functions of the posterior $f \mid \mathcal{D}_n$. When $T(x) = x$, the objective in (\ref{eq:personalized}) takes value 0, so any superior optimum corresponds to an intervention we are confident will lead to expected improvement. If there is no good intervention in $\mathcal{C}_x$ (corresponding to a large increase in the posterior mean) or too much uncertainty about $f(x)$ given limited data, then our method simply returns $T^*(x) = x$ indicating no intervention should be performed. Our objective exhibits these desirable characteristics because it relies on the posterior beliefs regarding both $f(T(x))$ and $f(x)$, which are tied via the covariance function. In contrast, a similarly-conservative lower confidence bound objective (ie.\ the UCB acquisition function with lower rather than upper quantiles) would only consider $f(T(x))$, and could propose unsatisfactory transformations where ${{\mathbb{E}[f(x) \mid \mathcal{D}_n ]} > \mathbb{E}[f(T(x)) \mid \mathcal{D}_n ]}$. \subsection{Intervening on Entire Populations} The above discussion focused on personalized interventions tailored on an individual basis. In certain applications, policy-makers are interested in designing a single intervention which will be applied to all individuals from the same underlying population as the data. Relying on such a \emph{global policy} is the only option in cases where we no longer observe covariate-measurements of new individuals outside the data. In our gene perturbation example, gene expression may no longer be individually profiled in future specimens that receive the decided-upon intervention to save costs/labor. Here, the covariates $X$ are assumed distributed according to some underlying (pre-intervention) population, and we define the \emph{population expected gain} function: \begin{equation*} G_X(T) := \mathbb{E}_X [ G_x(T) ] = \mathbb{E}_X \big[ f(T(x)) - f(x) \mid \mathcal{D}_n \big] \end{equation*} which is also randomly distributed based on our posterior ($\mathbb{E}_X$ is expectation with respect to the covariate-distribution $X$ which is not modeled by $f \mid \mathcal{D}_n$). Our goal is now to find a single transformation $T : \mathbb{R}^d \rightarrow \mathbb{R}^d$ corresponding to a \emph{population intervention} which will (with high certainty under our posterior beliefs) lead to large outcome improvements on average across the population: \begin{equation} T^* = \argmax_{T \in \mathcal{T}} \ F^{-1}_{G_X(T)}(\alpha) \label{eq:policy} \end{equation} Here, the family of possible transformations $\mathcal{T}$ is constrained such that $T(x) \in \mathcal{C}_x$ for all $T \in \mathcal{T}, x \in \mathbb{R}^d$. As a good model of our multivariate features may be {unknown}, we instead work with the empirical estimate: \begin{flalign*} && T^* & = \argmax_{T \in \mathcal{T}} \ F^{-1}_{G_n(T)} (\alpha) && \numberthis \label{eq:empiricalpolicy} \\ \text{where } && G_n(T) & := \frac{1}{n} \hspace*{-0.1mm} \sum_{i=1}^n \big[ f(T(x^{(i)})) - f(x^{(i)}) \big] \ \mid \mathcal{D}_n && \end{flalign*} is the \emph{empirical} population expected gain, whose posterior distribution has: \begin{align*} & \hspace*{-2mm} \text{mean} = \frac{1}{n} \hspace*{-0.5mm} \sum_{i=1}^n \mathbb{E}[f(T(x^{(i)})) \mid \mathcal{D}_n] - \mathbb{E}[f(x^{(i)}) \mid \mathcal{D}_n] \numberthis \\ & \hspace*{-2mm} \text{variance} = \frac{1}{n^2} \sum_{i=1}^n \sum_{j=1}^n \Big[ \text{Cov}\left( f(x^{(i)}), f(x^{(j)}) \mid \mathcal{D}_n \right) \\ & \hspace*{15.5mm} - \text{Cov}\big( f(T(x^{(i)})), f(x^{(j)}) \mid \mathcal{D}_n \big) \\ & \hspace*{15.5mm} - \text{Cov}\big( f(x^{(i)}), f(T(x^{(j)})) \mid \mathcal{D}_n \big) \\[-5pt] & \hspace*{15.5mm} + \text{Cov}\big(f(T(x^{(i)})), f(T(x^{(j)})) \mid \mathcal{D}_n \big) \Big] \numberthis \end{align*} The population intervention objective in (\ref{eq:empiricalpolicy}) is again 0 for the identity mapping $T(x) = x$. Under excessive uncertainty or a dearth of beneficial transformations in $\mathcal{T}$, the policy produced by this method will again simply be to perform no intervention. In this population intervention setting, $T$ is designed assuming future individuals will stem from the same underlying distribution as the samples in $\mathcal{D}_n$. Although $T$ is a function of $x$, the form of the transformation must be agnostic to the specific values of $x$ (so the intervention can be applied to new individuals without measuring their covariates). We consider two types of transformations that we find widely applicable. \emph{Shift} interventions involve transformations of the form: $T(x) = x + \Delta$ where $\Delta \in \mathbb{R}^d$ represents a (sparse) shift that the policy applies to each individuals' covariates (eg.\ always adding 3 to the value of the second covariate corresponds to $T(x) = [x_1, x_2 + 3, \dots, x_d]$). \emph{Covariate-fixing} interventions are policies which set certain covariates to a constant value for all individuals, and involve transformations $T_{\mathcal{I}\shortrightarrow z}(x) = [z_1, \dots, z_d]$ such that for some covariate-subset $\mathcal{I} \subseteq \{1,\dots,d\}: z_j = x_j \ \forall j \notin \mathcal{I}$ and for $j \in \mathcal{I}$: $z_j \in \mathbb{R}$ is fixed across all $x$ (eg.\ always setting the first covariate to 0, for example in gene knockout, corresponds to $T(x) = [0, x_2, \dots, x_d]$ $\forall x$). Figure \ref{fig:examples} depicts examples of these different interventions. Under a sparsity constraint, we must carefully model the underlying population in order to identify the best covariate-fixing intervention (here, setting $X_1$ to a large value is superior to intervening on $X_2$). \vspace*{-2mm} \begin{figure}[h!] \centering \includegraphics[width = 0.7\textwidth]{InterventionExamples2.pdf} \vspace*{-3mm} \caption{Contour plot of expected outcomes over feature space $ [X_1, X_2]$ for relationship ${Y = X_1 \cdot X_2 +~\varepsilon}$. Black points: the underlying population. Gold diamond: optimal covariate-setting if any transformation in the box were feasible. Red points: same population after shift intervention $\Delta = [-3, 0]$. Light (or dark) green points (along border): best covariate-fixing intervention which can only set $X_2$ (or only $X_1$) to a fixed value. Blue, purple, light blue points: individuals who receive a single-variable personalized intervention (arrows indicate direction of optimal transformation).} \label{fig:examples} \end{figure} \section{Algorithms} \label{sec:algorithms} Throughout this work, we use Gaussian Process (GP) regression \citep{Rasmussen2006} to model $Y \mid X$ as described in \S\ref{sec:gp} (`S' indicates references in the Supplementary Material). This nonparametric method has been favored in many applications as it produces both accurate predictions and effective measures of uncertainty (with closed-form estimators available in the standard case). Furthermore, a variety of GP models exist for different settings including: non-Gaussian response variables \citep{Rasmussen2006}, non-stationary relationships \citep{Paciorek2004}, deep representations \citep{Daminaou2013}, measurement error \citep{McHutchon2011}, and heteroscedastic noise \citep{Le2005}. While these variants are not employed in this work, our methodology can be directly used in conjunction with such extensions (or more generally, any model which produces a useful posterior for $f \mid \mathcal{D}_n$). Under the standard GP model, $G_x(T)$ follows a Gaussian distribution and the $\alpha^{\text{th}}$ quantile of our personalized gain is simply given by: \begin{align*} F^{-1}_{G_x(T)} = & \mathbb{E}[ G_x(T) ] + \Phi^{-1}(\alpha) \cdot \text{Var} [ G_x(T)] \numberthis \label{eq:quantilegp} \end{align*} where $\Phi^{-1}$ denotes the $N(0,1)$ quantile function. The quantiles of the empirical population gain may be similarly obtained. When a smooth smooth covariance kernel $k(\cdot, \cdot)$ is adopted in the GP prior, derivatives of our intervention-objectives are easily computed with respect to $T$. In many practical settings, an intervention that only affects a small subset of variables is desired. Software to improve text, for example, should not overwhelm authors with a multitude of desired changes, but rather present a concise list of the most beneficial revisions in order to retain underlying semantics. Note that identifying a sparse transformation of the covariates is different from feature selection in supervised learning (where the goal is to identify dimensions along which $f$ varies most). In contrast, we seek the dimensions $\mathcal{I} \subset \{1,\dots,d \}$ along which one of our feasible covariate-transformations can produce the largest high-probability increase in $f$, assuming the other covariates remain fixed at their initial pre-treatment values (in the case of personalized intervention) or follow the same distribution as the pre-intervention population (in the case of a global policy). For a shift intervention $T(x) = x+ \Delta$, we introduce the convenient notation $G_n(\Delta) := G_n(T)$. In applications where shifting $x_s$ (the $s^{\text{th}}$ covariate for $s \in \{1,\dots, d\}$) by one unit incurs cost $\gamma_s$, we account for these costs by considering the following regularized intervention-objective: \begin{equation} \label{eq:shiftpopulation} J_\lambda(\Delta) := F^{-1}_{G_n(\Delta)}(\alpha ) - \lambda \sum_{s=1}^d \gamma_s | \Delta_s| \end{equation} By maximizing this objective over feasible set $\mathcal{C}_{\Delta} := \{ \Delta \in \mathbb{R}^d : x + \Delta \in \mathcal{C}_{x} \text{ for all } x \in \mathbb{R}^d \}$, policy-makers can decide which variables to intervene upon (and how much to shift them), depending on the relative value of outcome-improvements (specified by $\lambda$). This optimization is performed using the proximal gradient method \citep{Bertsekas1995}, where at each iterate: a step in the gradient direction is followed by a soft-thresholding operation \citep{Bach2012} as well as a projection back onto the feasible set $\mathcal{C}_{\Delta}$. However, a simple gradient method may suffer from local optima. To avoid severely suboptimal solutions, we develop a continuation technique \citep{Mohabi2012} that performs a series of gradient-based optimizations over variants of this objective with tapering levels of added smoothness (details in \S\ref{supsec:algorithms}). In some settings, one may want to ensure at most $k < d$ covariates are intervened upon. We identify the optimal $k$-sparse shift intervention via the Sparse Shift Algorithm below, which relies on $\ell_1$-relaxation \citep{Bach2012} and the regularization path of our penalized objective in (\ref{eq:shiftpopulation}). \vspace*{4mm} \begin{mdframed}[leftmargin=0cm,rightmargin=0cm,skipbelow=0cm,skipabove=0cm, innertopmargin=3pt, innerbottommargin=3pt, innerrightmargin=0.8pt, innerleftmargin=0.8pt] \textbf{ Sparse Shift Algorithm:} Finds best $k$-sparse \\ \hspace*{0.5mm} shift intervention. \\ \nopagebreak \noindent\rule[1ex]{\linewidth}{1pt} \vspace*{-6mm} \begin{enumerate}[1:, topsep=-1.5ex,leftmargin=6mm] \item Set $\gamma_s = 1$ for $s = 1,\dots, d$ \item Perform binary search over $\lambda$ to find: \vspace*{-2mm} \begin{align*} \lambda^* \leftarrow \argmin \Big\{ \lambda \ge 0 & \text{ s.t.} \ \Delta^* := \argmax_{\Delta \in \mathcal{C}_{\Delta}} J_\lambda(\Delta) \\[-0.75em] & \text{ has $\le k$ nonzero entries} \Big\} \end{align*} \vspace*{-6mm} \item Define $\displaystyle \mathcal{I} \leftarrow \text{support}(\Delta^*_{\lambda^*}) \subseteq \{1,\dots, d\}$ \\ where $\displaystyle \Delta^*_{\lambda^*} := \argmax_{\Delta \in \mathcal{C}_{\Delta}} J_{\lambda^*}(\Delta)$ \item \textbf{Return: } \ $\displaystyle \Delta^* \in \mathbb{R}^d \leftarrow \argmax_{\Delta \in B} J_{\hspace*{0.1mm} 0}(\Delta)$ \\ where $B := \mathcal{C}_\Delta \bigcap \big\{ \Delta \in \mathbb{R}^d : \Delta_s = 0 \text{ if } s \notin \mathcal{I} \big\}$ \end{enumerate} \end{mdframed} Recall that in the case of personalized intervention, we simply optimize over vectors $T(x) \in \mathcal{C}_x$. Any personalized transformation can therefore be equivalently expressed as a shift in terms of $\Delta_x \in \mathbb{R}^d$ such that $T(x) = x + \Delta_x$. After substituting the individual gain $G_x(\Delta_x)$ in place of the population gain $G_n(\Delta)$ within our definition of $J_\lambda$ in (\ref{eq:shiftpopulation}), we can thus employ the same algorithms to identify sparse/cost-sensitive personalized interventions. To find a covariate-fixing intervention which sets $k$ of the covariates to particular fixed constants across all individuals from the population, we instead employ a forward step-wise selection algorithm (detailed in \S\ref{supsec:uniformalgorithm}), as the form of the optimization is not amenable to $\ell_1$-relaxation in this case. \section{Theoretical Results} \label{sec:theory} Consider the following basic conditions: \refstepcounter{assumption} (A\theassumption) \label{as:first} all data lies in $\mathcal{C} := [0,1]^d$, \refstepcounter{assumption} (A\theassumption) ${0 < \alpha \le 0.5}$. \label{as:last} Throughout this section, we assume (A\ref{as:first}), (A\ref{as:last}), and the conditions laid out in \S\ref{sec:intro} hold. For clarity, we rewrite the true underlying relationship as $f^*$, letting $f$ now denote arbitrary functions. Our results are with respect to the \emph{true improvement} of an intervention ${G^*_x(T) := f^*(T(x)) - f^*(x)}$, $G^*_X(T) := \mathbb{E}_X [G^*_x(T)]$ (note that $G^*_x, G^*_X$ are no longer random). Our theory relies on Gaussian Process results derived by \cite{Srinivas2010, VanderVaart2011}, and we relegate proofs and technical definitions to \S\ref{subsec:proofs}. \begin{thm} \label{thm:close} Suppose we adopt a GP$\big(0, k(x,x')\big)$ prior and the following conditions hold: \\ \refstepcounter{assumption} (A\theassumption) noise variables $\varepsilon^{(i)} \overset{iid}{\sim} N(0, \sigma^2)$ \refstepcounter{assumption} (A\theassumption) there exist $\rho > 0$ such that the H\"{o}lder space $C^\rho[0,1]^d$ has probability one under our prior (see \cite{VanderVaart2011}). \refstepcounter{assumption} (A\theassumption) $f^*$ and any $f$ supported by the prior are Lipschitz continuous over $\mathcal{C}$ with constant $L$ \refstepcounter{assumption} (A\theassumption) the density of our input covariates $p_X \in [a,b]$ is bounded above and below over domain $\mathcal{C}$. Then, for all $x, T(x) \in \mathcal{C}$: \ \ \ $$ \mathbb{E}_{\mathcal{D}_n} \Big| F^{-1}_{G_x(T)}(\alpha) - G^*_x(T) \Big| \le \frac{C}{\alpha} \Big(L + \frac{1}{a} \Big) \cdot \Psi_{\hspace*{-0.4mm}f^*}\hspace*{-0.2mm}(n)^{1 / [2(d+1)]} $$ \end{thm} where constant $C$ depends on the prior and density $p_X$ and we define: \[ \Psi_{f}(n) := \begin{cases} \big[\psi_{f}^{-1}(n)\big]^2 & \hspace*{-8mm} \text{ if } \psi_{f}^{-1}(n) \le n^{-d/(4\rho + 2d)} \\ n \cdot [\psi_{f^*}^{-1}(n)]^{(4\rho + 4d)/d} & \text{ otherwise } \\ \end{cases} \] $\psi_{f^*}^{-1}(n)$ is the (generalized) inverse of $\psi_{f^*}(\epsilon) := \frac{\phi_{f^*}(\epsilon)}{\epsilon^2}$ which depends on the concentration function $\displaystyle \phi_{f^*}(\epsilon) = \inf_{h \in \mathcal{H}_k : || h - f^*||_\infty < \epsilon} ||h||^2_k - \log \Pi \big( f: ||f ||_\infty < \epsilon \big)$. $\phi_{f^*}$ measures how well the RKHS of our GP prior $\mathcal{H}_k$ approximates $f^*$ (see \cite{VanderVaart2011} for more details). The expectation $ \mathbb{E}_{\mathcal{D}_n}$ is over the distribution of the data $\{(X^{(i)}, Y^{(i)})\}_{i=1}^n$. Importantly, Theorem \ref{thm:close} does not assume anything about the true relationship $f^*$, and the bound depends on the distance between $f^*$ and our prior. When $f^*$ is a $\rho$-smooth function, a typical bound is given by $\psi_{f^*}^{-1}(n) = \mathcal{O}( n^{- \min\{ \nu, \rho \}/(2\nu + d)})$ if $k$ is the Mat\'ern kernel with smoothness parameter $\nu$. When $k$ is the squared exponential kernel and $f^*$ is $\beta$-regular (in Sobolev sense), $\psi_{f^*}^{-1}(n) = \mathcal{O}((1 / \log n)^{\beta/2 - d/4})$ \citep{VanderVaart2011}. \begin{thm} \label{thm:popclose} Under the assumptions of Theorem \ref{thm:close}, for any $T$ such that $\Pr(T(X) \in \mathcal{C}) = 1$: \begin{align*} & \mathbb{E}_{\mathcal{D}_n} \Big| F^{-1}_{G_n(T)}(\alpha) - G_X^*(T) \Big| \\ & \le \frac{C}{\alpha} \Big[L\sqrt{ \frac{d}{n} } + \Big(L + \frac{1}{a} \Big) \Psi_{f^*}(n)^{\frac{1}{2(d+1)}} \Big] \end{align*} \end{thm} Theorems \ref{thm:close} and \ref{thm:popclose} characterize the rate at which our personalized/population-intervention objectives are expected to converge to the true improvement (due to contraction of the posterior as $n$ grows). Since these results hold for all $T$, this implies the maximizer of our intervention-objectives will converge to the true optimal transformation as $n \rightarrow \infty$ (under a reasonable prior). Complementing these results, Theorem \ref{thm:notbad} in \S\ref{subsec:proofs} ensures that for any $n$: optimizing our personalized intervention objective corresponds to improving a lower bound on the true improvement with high probability, when $\alpha$ is small and $f^*$ belongs to the RKHS of our prior. In this case, the optimal transformation inferred by our approach only worsens the actual expected outcome with low probability. \section{Results} \S\ref{supsec:simulation} contains an analysis of our approach on simulated data from simple covariate-outcome relationships. The average improvement produced by our chosen interventions rapidly converges to the best possible value with increasing $n$. In these experiments, sparse-interventions consistently alter the correct feature subset, and proposed transformations under our conservative $\alpha = 0.05$ criterion are much more rarely harmful than those suggested by optimizing the posterior mean function (which ignores uncertainty). \subsection{Gene Perturbation} Next, we applied our method to search for population interventions in observational yeast gene expression data from \citet{Kemmeren2014large}. We evaluated the effects of proposed interventions (restricted to single gene knockouts) over a set $X$ of 10 transcription factors ($n=161$) with the goal of down-regulating each of a set of 16 small molecule metabolism target genes, $Y$. Results for all methods are compared to the actual expression change of the target gene found experimentally under individual knockouts of each transcription factor in $X$. Compared to marginal linear regressions and multivariate linear regression, our method's uncertainty prevents it from proposing harmful interventions, and the interventions it proposes are optimal or near optimal (Figure~\ref{fig:geneExpression}). Insets (a) and (b) in Figure~\ref{fig:geneExpression} show empirical marginal distributions between target gene \emph{TSL1} and members of $X$ identified for knockout by our method (\emph{CIN5}) and marginal regression (\emph{GAT2}). From the linear perspective, these relationships are fairly indistinguishable, but only \emph{CIN5} displays a strong inhibitory effect in the knockout experiments. Inset (c) shows the empirical marginal for a harmful intervention proposed by multivariate regression for down-regulating \emph{GPH1}, where the overall correlation is significantly positive, but the few lowest expression values (which influence our GP intervention objective the most) do not provide strong evidence of a large knockdown effect. \vspace*{-2mm} \begin{figure}[h!] \hspace*{-2mm} \includegraphics[trim=0in 7.775in 0in 0in, clip=true, width=1.02\textwidth]{GeneExpressionKnockdownFigure.pdf} \vspace*{-5mm} \caption{Actual effects of proposed interventions (single gene knockout) over a set transcription factors on down-regulation of each of a set of 16 small molecule metabolism target genes.} \label{fig:geneExpression} \end{figure} \subsection{Writing Improvement} \label{sec:writing} Finally, we apply our personalized intervention methodology to the task of transforming a given news article into one which will be more widely-shared on social media. We use a dataset from \cite{Fernandes2015} containing various features about individual Mashable articles along with their subsequent popularity in social networks (detailed description/results for this analysis in \S\ref{supsec:writing}). We train a GP regressor on 5,000 articles labeled with popularity-annotations and evaluate sparse interventions on a held-out set of 300 articles based on changes they induce in article \emph{benchmark popularity} (defined in \S\ref{supsec:writing}). When $\alpha = 0.05$, the average benchmark popularity increase produced by our personalized intervention methodology is 0.59, whereas it statistically significantly decreases to 0.55 if $\alpha = 0.5$ is chosen. Thus, even given this large sample size, ignoring uncertainty appears detrimental for this application, and $\alpha = 0.5$ results in 4 articles whose benchmark popularity worsens post-intervention (compared to only 2 for $\alpha = 0.05$). Nonetheless, both methods generally produce very beneficial improvements in this analysis, as seen in Figure \ref{fig:writing}. As an example of the personalization of proposed interventions, our method ($\alpha = 0.05$) generally proposes different sparse interventions for articles in the Business category vs.\ the Entertainment category. On average, the sparse transformation for business articles uniquely advocates decreasing global sentiment polarity and increasing word count (which are not commonly altered in the personalized interventions found for entertainment articles), whereas interventions to decrease title subjectivity are uniquely prevalent throughout the entertainment category. These findings appear intuitive (eg.\ critical business articles likely receive more discussion, and titles of popular entertainment articles often contain startling statements written non-subjectively as fact). Interestingly, the model also tends to advise shorter titles for business articles, but increasing the length for entertainment articles. Articles across all categories are universally encouraged to include more references to other articles and keywords that were historically popular. \section{Misspecified Interventions} \label{causalconnection} Our methodology heavily relies on the assumption that the outcome-determining covariate values $\widetilde{x}$ produced through intervention exactly match the desired covariate transformation $T(x)$. When transformations are only allowed to alter at most $k < d$ covariates, this requires that we can intervene to alter only this subset without affecting the values of other covariates. If $T$ specifies a sparse change affecting only a subset of the covariates $\mathcal{I} \subset \{1,\dots,d\}$, our methods assume the post-treatment value of any non-intervened-upon covariate remains at its initial value (ie.\ $\widetilde{x}_s = x_s \ \forall s \notin \mathcal{I}$). In some domains, the covariate-transformation induced via sparse external intervention can only be roughly controlled (eg.\ our gene perturbation example when the profiled genes belong to a common regulatory network). Let $T_{\mathcal{I}\shortrightarrow z}$ denote a covariate-fixing transformation which sets a subset of covariates in $\mathcal{I} \subset \{1,\dots,d\}$ to constant values $z_\mathcal{I} \in \mathbb{R}^{|\mathcal{I}|}$ across all individuals in the population. In this section, we consider an alternative assumption under which the intervention applied in hopes of achieving $T_{\mathcal{I}\shortrightarrow z}$ propagates downstream to affect other covariates outside $\mathcal{I}$ (so there may exist $s \notin \mathcal{I}$: $\widetilde{x}_s \neq x_s$), which we formalize as the $\emph{do}$-operation in the causal calculus of \cite{Pearl2000}. Here, we suppose the underlying population of $X, Y$ follows a \emph{structural equation model} (SEM) \citep{Pearl2000}. The outcome $Y$ is restricted to be a sink node of the causal DAG, so we can still write $Y = f^*(\widetilde{X}) + \varepsilon$ and maintain the other conditions from \S\ref{sec:intro}. Rather than exhibiting covariate-distribution $T_{\mathcal{I}\shortrightarrow z}(X)$ with $Y = f^*(T_{\mathcal{I}\shortrightarrow z}(X)) + \varepsilon$ (as presumed in our methods), the post-treatment population which arises from an intervention seeking to enact transformation $T_{\mathcal{I}\shortrightarrow z}$ is now assumed to follow the distribution specified by $p(X, Y \mid do(X_{\mathcal{I}} = z_{\mathcal{I}}))$. Note that the $\emph{do}$-operation here is only applied to some nodes in the DAG (variables in subset $\mathcal{I}$) as discussed by \cite{Peters2014}, but its effects can alter the distributions of non-intervened-upon covariates outside of $\mathcal{I}$ which lie downstream in the DAG. \begin{thm} \label{thm:dooperation} For some $\mathcal{I} \subseteq \{1, \dots,d\}$, suppose the condition: \refstepcounter{assumption} (A\theassumption) \label{as:bestdo} $pa(Y) \subseteq \mathcal{I} \ \bigcup \ \text{desc}(\mathcal{I})^C$ holds. Then, for any covariate-fixing transformation $T_{\mathcal{I}\shortrightarrow z}$: $\displaystyle \mathbb{E}_X \big[ f^*(T_{\mathcal{I}\shortrightarrow z}(x)) - f^*(x) \big]$ \ and \\ $\mathbb{E}_{\widetilde{x} \sim \text{do}(X_{\mathcal{I}} = z_{\mathcal{I}})} \big[ f^*(\widetilde{x}) \big] - \mathbb{E}_{X}\big[f^*(x) \big] $ are equal. \end{thm} Here, $\text{pa}(Y)$ denotes the variables which are parents of outcome $Y$ in the underlying causal DAG, and $\text{desc}(\mathcal{I})^C$ is the set of variables which are \emph{not} descendants of variables in subset $\mathcal{I}$. For the next result, we define: $\displaystyle \mathcal{I^*} := \argmin \Big\{ |\mathcal{I}'| \text{ s.t. } \exists \ T_{\mathcal{I}' \shortrightarrow z} \in \argmax_{T_{\mathcal{I}\shortrightarrow z} : |\mathcal{I}| \le k} \hspace*{-0.1mm} \mathbb{E}_X \big[ f^*(T_{\mathcal{I}\shortrightarrow z}(x)) - f^*(x) \big] \Big\}$ as the intervention set corresponding to the optimal $k$-sparse covariate-fixing transformation (where in the case of ties, the set of smallest cardinality is chosen), if transformations were exactly realized by our interventions (which is not necessarily the case in this section). \begin{thm} \label{thm:bestdofound} Suppose the underlying DAG satisfies: \refstepcounter{assumption} (A\theassumption) \label{as:parentdisconnect} No variable in $\text{pa}(Y)$ is a descendant of other parents, ie. $\nexists \ j \in \text{pa}(Y)$ s.t.\ $j \in \text{desc}(\text{pa}(Y) \setminus \{j\})$. Then, $\mathcal{I^*}$ satisfies (A\ref{as:bestdo}). \end{thm} In the absence of extremely strong interactions between variables in $\text{pa}(Y)$, the equality of Theorem \ref{thm:dooperation} will also hold for $\mathcal{I^*}$ if $| \text{pa}(Y) | \le k$. For settings where sparse interventions elicit unintentional $do$-effects and the causal DAG meets condition (A\ref{as:parentdisconnect}), Theorems \ref{thm:dooperation} and \ref{thm:bestdofound} imply that, under complete certainty about $f^*$, the (minimum cardinality) maximizer of our covariate-fixing intervention objective corresponds to an transformation that produces an equally good outcome change when the corresponding intervention is actually realized as a $do$-operation in the underlying population. Combined with Theorem \ref{thm:popclose}, our results ensure that, even in this misspecified setting, the empirical maximizer of our sparse covariate-fixing intervention objective (\ref{eq:empiricalpolicy}) produces (in expectation as $n \rightarrow \infty$) beneficial interventions for populations whose underlying causal relationships satisfy certain conditions. Next, we empirically investigate how effective our methods are in this misspecified SEM setting, where a proposed sparse population transformation is actually realized as a \emph{do}-operation and can therefore unintentionally affect other covariates in the post-intervention population. We generate data from an underlying linear \emph{non}-Gaussian SEM, and where $Y$ is a sink node in the corresponding causal DAG (see \S\ref{supsec:SEMdetails} for details). Our approach to identify a beneficial sparse population intervention is compared with inferring the complete SEM using the LinGAM estimator of \cite{Shimizu2006} and subsequently identifying the optimal single-node \emph{do}-operation in the inferred SEM. Note that LinGAM is explicitly designed for this setting, while both our method and the relied-upon Gaussian Process model are severely misspecified. Figures \ref{fig:lingam}A and \ref{fig:lingam}B demonstrate that the inferred best single-variable shift population intervention (under constraints on the magnitude of the shift) matches the performance the interventions suggested by LinGAM (except for in rare cases with tiny sample size) when the proposed interventions are evaluated as \emph{do}-operations in the true underlying SEM. Thus, we believe a supervised learning approach like ours is preferable in practical applications where interpreting the underlying causal structure is not as important as producing good outcomes (especially for higher dimensional data where estimation of the causal structure becomes difficult \citep{Peters2014}). \begin{figure}[h!] \centering {\def-0.3{-0.3} \begin{tabular}{c c} \hspace*{-3mm} \includegraphics[width=0.49\textwidth]{LingamComparison_A.pdf} \hspace*{-3mm} & \hspace*{-1mm} \includegraphics[width=0.49\textwidth]{LingamComparison_B.pdf} \\[0.25em] (A) SEM$_A$ \hspace*{0mm} & \hspace*{0mm} (B) SEM$_B$ \end{tabular} \vspace*{-2mm}} \caption{The average (solid) and $0.05^{\text{th}}$ quantile (dashed) expected outcome change produced by our method (red) vs LinGAM (blue) over 100 datasets drawn from two underlying SEMs chosen by \cite{Shimizu2006}. The black dashed line indicates the best possible improvement in each case.} \label{fig:lingam} \end{figure} The assumption of sparse interventions realized as a $do$-operation (as defined by \cite{Peters2014}) may also be an inappropriate in many domains, particularly if off-target effects of interventions are explicitly mitigated via external controls. To appreciate the intricate nature of assumptions regarding non-intervened-upon variables, consider our example of modeling text documents represented using two features: polarity and word count. A desired transformation to increase the text's polarity can be accomplished by inserting additional positive adjectives, but such an intervention also increases articles' word count. Alternatively, polarity may be identically increased by replacing words with more positive alternatives, an external intervention which would not affect the word count (and thus follows the assumptions of our framework). \section{Discussion} \label{sec:discussion} This work introduces methods for directly learning beneficial interventions from purely observational data without treatments. While this objective is, strictly speaking, only possible under stringent assumptions, our approach performs well in both intentionally-misspecified and complex real-world settings. As supervised learning algorithms grow ever more popular, we expect intervention-decisions in many domains will increasingly rely on predictive models. Our conservative definition of the optimal intervention provides a principled approach to handle the inherent uncertainty in these settings due to finite data. Able to employ any Bayesian regressor, our ideas are widely applicable, considering practical types of interventions that can either be personalized or enacted uniformly over a population. \vspace*{3mm} \textbf{Acknowledgements: } We thank David Gifford for helpful comments. DR was funded by an award from IARPA (under research contract 2015-15061000003). \clearpage \newpage \subsection*{References} \bibliographystyle{agsm} {
{'timestamp': '2017-02-23T02:03:13', 'yymm': '1606', 'arxiv_id': '1606.05027', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05027'}
arxiv
\section{Introduction}\label{sec:intro} Surveys and polls using the telephone are widely used to provide information of what people think about parties or political personalities\cite{JSS}. Surveys randomly select the electorate sample, avoiding selection bias, and are designed to collect the perception of a population regarding some subject, such as in politics or marketing. However this method is expensive and time consuming \cite{Connor,JSS}. Furthermore, over the years it is becoming more difficult to contact people and persuade them to participate in these surveys \cite{Kohut}. On the other hand, online publication of news articles is a standard behavior of news outlets and the raise of social media, namely Twitter and Facebook, has changed the way people interact with news \cite{Bermingham,Saleiro2016}. This way, people are able to react and comment any news in real time. One challenge that several research works have been trying to solve is to understand how opinions expressed on social media, and their sentiment, can be a leading indicator of public opinion. However, at the same time there might exist simultaneously positive, negative and neutral opinions regarding the same subject. Thus, we need to obtain a value that reflects the general image of each political target in social media, for a given time period. To that end, we use sentiment aggregate functions. In summary, a sentiment aggregate function calculates a global value based on the number of positive, negative, and neutral mentions of each political target, in a given period. We conducted an exhaustive study and collected and implemented several sentiment aggregate functions from the state of the art \cite{Bermingham, pred12, pred6, pred3, livne2011party, tumasjan2010predicting, Gayo-Avello2012, O'Connor2010, Chung2011}. Thus, the main objective of our work is to study and define a methodology capable of successfully estimating the polls results, based on opinions expressed on social media, represented by sentiment aggregators. We applied this problem to the Portuguese bailout case study, using Tweets from a sample of the Portuguese Tweetosphere and Portuguese polls as gold standard. Given the monthly periodicity of polls, we needed to monthly aggregate data. This approach allows each aggregator value to represent the monthly sentiment for each political party. Due to the absence of a general sentiment aggregate function suitable for different case studies, we decided to include all aggregate functions as features of the regression model. Therefore the learning algorithm is able to adapt to the most informative aggregate functions through time. In the next Section we review related work. In Section \ref{sec:methodology} we present the methodology we implemented. We describe data in Section \ref{sec:data} followed by the experimental setup in Section \ref{sec:experimental}. In Section \ref{sec:results} we present and discuss the results we obtained, while Section \ref{sec:conclusions} is reserved for some conclusions taken from our study, and for future work. \section{Related Work}\label{sec:related} Content analysis of mass media has an established tradition in the social sciences, particularly in the study of effects of media messages, encompassing topics as diverse as those addressed in seminal studies of newspaper editorials \cite{lasswell1952}, media agenda-setting \cite{mccombs1972}, or the uses of political rhetoric \cite{moen1990}, among many others. By 1997, Riffe and Freitag \cite{riffe1997}, reported an increase in the use of content analysis in communication research and suggested that digital text and computerized means for its extraction and analysis would reinforce such trend. Their expectation has been fulfilled: the use of automated content analysis has by now surpassed the use of hand coding \cite{neuendorf2002}. The increase in the digital sources of text, on the one hand, and current advances in computation power and design, on the other, are making this development both necessary and possible, while also raising awareness about the inferential pitfalls involved \cite{hopkins2010, chall2}. One avenue of research that has been explored in recent years concerns the use of social media to predict present and future political events, namely electoral results \cite{Bermingham, pred12, pred6, pred3, livne2011party, tumasjan2010predicting, Gayo-Avello2012, O'Connor2010, Chung2011}. Although there is no consensus about methods and their consistency \cite{Metaxas2011, Gayo-Avello2011}. Gayo-Avello \cite{pred_survey} summarizes the differences between studies conducted so far by stating that they vary about period and method of data collection, data cleansing and pre-processing techniques, prediction approach and performance evaluation. One particular challenge when using sentiment is how to aggregate opinions in a timely fashion that can be fed to the prediction method. Two main strategies have been used to predict elections: buzz, i.e., number of tweets mentioning a given candidate or party and the use of sentiment polarity. Different computational approaches have been explored to process sentiment in text, namely machine learning and linguistic based methods \cite{pang2008, Kouloumpis2011, nakov2013}. In practice, algorithms often combine both strategies. Johnson et al. \cite{JSS} concluded that more than predicting elections, social media can be used to gauge sentiment about specific events, such as political news or speeches. Defending the same idea, Diakopoulos el al. \cite{Diakopoulos} studied the global sentiment variation based on Twitter messages of an Obama vs McCain political TV debate while it was still happening. Tumasjan et al. \cite{tumasjan2010predicting} used Twitter data to predict the 2009 Federal Election in Germany. They stated that ``the mere number of party mentions accurately reflects the election result''. Bermingham et al. \cite{Bermingham} correctly predicted the 2011 Irish General Elections also using Twitter data. Gayo-Avello et al. \cite{Gayo-Avello2011} also tested the share of volume as predictor in the 2010 US Senate special election in Massachusetts. On the other hand, several other studies use sentiment as a polls result indicator. Connor et al. \cite{O'Connor2010} used a sentiment aggregate function to study the relationship between the sentiment extracted from Twitter messages and polls results. They defined the sentiment aggregate function as the ratio between the positive and negative messages referring an specific political target. They used the sentiment aggregate function as predictive feature in the regression model, achieving a correlation of 0.80 between the results and the poll results, capturing the important large-scale trends. Bermingham et al. \cite{Bermingham} also included in their regression model sentiment features. Bermingham et al. introduced two novel sentiment aggregate functions. For inter-party sentiment, they modified the share of volume function to represent the share of positive and negative volume. For intra-party sentiment , they used a log ratio between the number of positive and negative mentions of a given party. Moreover, they concluded that the inclusion of sentiment features augmented the effectiveness of their model. Gayo-Avello et al. \cite{Gayo-Avello2011} introduced a different aggregate function. In a two-party race, all negative messages on party $c2$ are interpreted as positive on party $c1$, and vice-versa. \section{Methodology}\label{sec:methodology} \begin{figure}[t] \centering \includegraphics[width=0.8\textwidth]{architecture} \caption{Data mining process pipeline.} \label{fig:architecture} \end{figure} Figure \ref{fig:architecture} depicts an overview of the data mining process pipeline applied in this work. To collect and process raw Twitter data, we use an online reputation monitoring platform \cite{saleiro2015popmine} which can be used by researchers interested in tracking political opinion on the web. It collects tweets from a pre-defined sample of users, applies named entity disambiguation \cite{saleiro2013popstar} and generates indicators of both frequency of mention and polarity (positivity/negativity) of mentions of entities across time. In our case, tweets are collected from the stream of 100 thousand different users, representing a sample of the Portuguese community on Twitter. The platform automatically classifies each tweet according to its sentiment polarity. If a message expresses a positive, negative or neutral opinion regarding an entity (e.g. politicians), it is classified as positive, negative or neutral mention, respectively. The sentiment classifier uses a corpus of 1500 annotated tweets as training set and it is reported an accuracy over 80\% using 10-fold cross validation. These 1500 tweets were manually annotated by 3 political science students. Mentions of entities and respective polarity are aggregated by counting positive, negative, neutral and total mentions for each entity in a given period. Sentiment aggregate functions use these cumulative numbers as input to generate a new value for each specific time period. Since we want to use sentiment aggregate functions as features of a regression model to produce an estimate of the political opinion, we decided to use traditional poll results as gold standard. \subsection{Sentiment Aggregate Functions} The following list presents the sentiment aggregate functions applied to the aggregated data between polls: \begin{itemize} \item[-]$entity\_buzz$: the monthly sum of the number of mentions (buzz) of a given entity (political party leader) between consecutive polls. \item[-]$entity\_positives$: the monthly sum of the positively classified mentions of a given entity (political party leader) between consecutive polls. \item[-]$entity\_neutrals$: the monthly sum of the neutral classified mentions of a given entity (political party leader) between consecutive polls. \item[-]$entity\_negatives$: the monthly sum of the negatively classified mentions of a given entity (political party leader) between consecutive polls. \item[-]$bermingham$ \cite{Bermingham}: $\log_{10}{\frac{entity\_posistives +1}{entitty\_negatives +1}}$ \item[-]$berminghamsovn$ \cite{Bermingham}: $\frac{entity\_negatives}{total\_negatives} $, $total\_negatives$ \\ \\ corresponds to the sum of the negative mentions of all entities between polls. \item[-]$berminghamsovp$ \cite{Bermingham}: $\frac{entity\_positives}{total\_positives}$, $total\_positives$ corresponds to the sum of the positives mentions of all entities between polls. \item[-]$connor$ \cite{Connor}: $\frac{entity\_positives}{entity\_negatives}$ \item[-]$gayo$ \cite{Gayo-Avello}: $\frac{entity\_positives + others\_negatives}{total\_positives + total\_negatives}$ \item[-]$polarity$: $entity\_positives - entity\_negatives$ \item[-]$polarityONeutral$: $\frac{entity\_positives - entity\_negatives}{entity\_neutrals}$ \item[-]$polarityOTotal$: $\frac{entity\_positives - entity\_negatives}{entity\_buzz}$ \item[-]$subjOTotal$: $\frac{entity\_positives + entity\_negatives}{entity}$ \item[-]$subjNeuv$: $\frac{entity\_positives + entity\_negatives}{entity\_neutrals}$ \item[-]$subjSoV$: $\frac{entity\_positives + entity\_negatives}{total\_positives + total\_negatives }$ \item[-]$subjVol$: $entity\_positives + entity\_negatives$ \item[-]$share$ \cite{Bermingham}: $\frac{entity\_buzz}{total\-buzz}$ \item[-]$shareOfNegDistribution$: $\frac{ \frac{entity\_negatives}{entity\_buzz}}{\sum_{i=0}^n \frac{entity\_negatives_i}{entity\_buzz_i}}$, where $n$ is the number of political entities in the poll \item[-]$normalized\_positive$: $\frac{entity\_positivesi}{entity\_buzz}$ \item[-]$normalized\_negative$: $\frac{entity\_positivesi}{entity\_buzz}$ \item[-]$normalized\_neutral$: $\frac{entity\_positivesi}{entity\_buzz}$ \item[-]$normalized\_bermingham$: $\log_{10}{\frac{normalized\_positives +1}{normalized\_negatives +1}} $ \item[-]$normalized\_connor$: $\frac{normalized\_positives}{normalized\_negatives}$ \item[-]$normalized\_gayo$: \\ \\ $\frac{normalized\_positives + normalized\_others\_negatives}{normalized\_total\_positives + normalized\_total\_negatives}$ \item[-]$normalized\_polarity$: \\ \\ $normalized\_positives - normalized\_negatives$ \end{itemize} The sentiment aggregate functions are used as features in the regression models. \section{Data}\label{sec:data} The data used in this work consists of tweets mentioning Portuguese political party leaders and polls from August 2011 to December 2013. This period corresponds to the Portuguese bailout when several austerity measures were adopted by the incumbent right wing governmental coalition of PSD and CDS. \subsection{Twitter} \begin{table}[!t] \centering \caption{Distribution of positive, negative and neutral mentions per political party}\label{tab:twitter_data_dist} \begin{tabular}{ l | r | r | r | r |} \cline{2-5} &Negative & Positive & Neutral & Total Mentions \\ \cline{2-5} \hline \multicolumn{1}{ |c| }{PSD} & 69 723 & 121 & 37 133 &106 977\\ \hline \multicolumn{1}{ |c| }{PS} & 28 660 & 225 & 15 326 & 44 211 \\ \hline \multicolumn{1}{ |c| }{CDS} & 41 935 & 51 & 17 554 & 59 540 \\ \hline \multicolumn{1}{ |c| }{CDU} & 2 445 & 79 & 5 604 & 8 128 \\ \hline \multicolumn{1}{ |c| }{BE} & 9 603 & 306 & 4 214 & 14 123 \\ \hline \end{tabular} \end{table} The Twitter data set contains 232 979 classified messages, collected from a network of 100 thousand different users classified as Portuguese. Table \ref{tab:twitter_data_dist} presents the distribution of positive, negative, and neutral mentions of the political leaders of the 5 most voted political parties in Portugal (PSD, PS, CDS, PCP and BE). The negative mentions represent the majority of the total mentions, except for CDU where the number of negative mentions is smaller than the neutral ones. The positive mentions represent less than 1\% of the total mentions of each party, except for BE where they represent 2\% of the total mentions. The most mentioned parties are PS, PSD and CDS. The total mentions of these three parties represent 90\% of the data sample total mentions. Figure \ref{fig:negshare} depicts the time series of the $berminghamsovn$ (negatives share) sentiment aggregate function. The higher the value of the function the higher is the percentage of negative tweets mention a given political entity in comparison with the other entities. As expected, Pedro Passos Coelho (PSD) as prime-minister is the leader with the higher score through the all time period under study. Paulo Portas (CDS) leader of the other party of the coalition, and also member of the government is the second most negatively mentioned in the period, while António José Seguro (PS) is in some periods the second higher. PSD and CDS are the incumbent parties while PS is the main opposition party in the time frame under study. PSD and CDS as government parties were raising taxes and cutting salaries. PS was the incumbent government during the years that led to the bailout and a fraction of the population considered responsible for the financial crisis. The bailout and the consequent austerity measures could explain the overwhelming percentage of negative mentions although we verified that in other time periods the high percentage of negatives mentions remains. We can say that Twitter users of this sample when mentioning political leaders on their tweets tend to criticize them. \begin{figure}[!t] \centering \includegraphics[width=0.9\textwidth]{negatives_share} \caption{Negatives share ($berminghamsovn$) of political leaders in Twitter.} \label{fig:negshare} \end{figure} \subsection{Political Opinion Polls} The polling was performed by Eurosondagem, a Portuguese private company which collects public opinion. This data set contains the monthly polls results of the five main Portuguese parties, from June 2011 to December 2013. Figure \ref{fig:pollEuro} represents the evolution of Portuguese polls results. We can see two main party groups: The first group, where both PSD and PS are included, has a higher value of vote intention (above 23\%). PSD despite starting as the preferred party in vote intention, has a downtrend along the time, losing the leadership for PS in September 2012. On the other hand, PS has in general an uptrend. The second group, composed by CDS, PCP and BE, has a vote intention range from 5\% to 15\%. While CDS has a downtrend in public opinion, PCP has an ascendent one. Although the constant tendencies (up- and downtrends), we noticed that the maximum variation observed between two consecutive months is 3\%. In June 2013 there was political crises in the government when CDS threaten to leave the government coalition due to the austerity measures being implemented and corresponds to the moment when PS takes the lead in the polls. \begin{figure}[!t] \centering \includegraphics[width=0.7\textwidth]{pollEuro2} \caption{Representation of the monthly poll results of each political candidate} \label{fig:pollEuro} \end{figure} \section{Experimental Setup}\label{sec:experimental} {\renewcommand{\arraystretch}{2} We defined the period of 2011 to December 2012 as training set and the all year of 2013 as test set. We applied a sliding window setting in which we start to predict the poll results of January 2013 using the previous 16 months as training set. The second poll to estimate is February 2013 and we train a new model using the previous 16 months to the target month under prediction. \begin{itemize} \item Training set – containing the monthly values of the aggregators (both sentiment and buzz aggregator) for 16 months prior the month intended to be predicted. \item Testing set - containing the values of the aggregators (both sentiment and buzz aggregator) of the month intended to be predicted. \end{itemize} \begin{enumerate} \item We select the values of the aggregators of the 16 months prior January 2013 (September 2011 to December 2012). \item We use that data to train our regression model. \item Then we input the aggregators' values of January 2013 - the first record of the testing set - in the the trained model, to obtain the poll results prediction. \item We select the next month of the testing set and repeat the process until all months are predicted. \end{enumerate} The models are created using two regression algorithms: a linear regression algorithm (Ordinary Least Squares - OLS) and a non-linear regression algorithm (Random Forests - RF). We also run an experiment using the derivative of the polls time series as gold standard, i.e., poll results variations from poll to poll. Thus, we also calculate the variations of the aggregate functions from month to month as features. Furthermore, we repeat each experiment including and excluding the lagged self of the polls, i.e., the last result of the poll for a given candidate ($y_{t-1}$) or the last polls result variation ($\Delta y_{t-1}$) when predicting polls variations. We use Mean Absolute Error (MAE) \cite{Han} as evaluation measure, to determine the absolute error of each prediction. Then, we calculate the average of the twelve MAE's so we could know the global prediction error of our model. \begin{equation} MAE = \frac{\sum_{i=1}^{n}|f_{i} - y_{i}|}{n} \label{eq:mae} \end{equation} $n$ is the number of forecasts, $f_{i}$ is the model's forecast and $y_{i}$ the real outcome. \section{Results and Discussion}\label{sec:results} In this Section we explain in detail the experiments and its results. We perform two different experiments: (1) using absolute values and (2) using monthly variations. \subsection{Predicting Polls Results} In this experiment, the sentiment aggregators take absolute values in order to predict the absolute values of polls results. Mathematically speaking, this experiment can be seen as: $y \leftarrow$ \{$y_{t-1}$, $buzzAggregators$, $sentimentAggregators$\}. In figure \ref{fig:expabs_mae} we see the global errors we obtained. \begin{figure}[!t] \centering \includegraphics[scale = 0.40]{absExperiment} \caption{Error predictions for polls results.} \label{fig:expabs_mae} \end{figure} The results shows that we obtain an Mean Absolute Error for the 5 parties poll results over 12 months of 6.55 \% using Ordinary Least Squares and 3.1 \% using Random Forests. The lagged self of the polls, i.e., assuming the last known poll result as prediction results in a MAE of 0.61 \% which was expectable since the polls exhibit slight changes from month to month. This experiment shows that the inclusion of the lagged self ($y_{t-1}$) produces average errors similar to the lagged self. \subsection{Predicting Polls Results Variation} According to our exploratory data analysis, the polls results have a small variation between two consecutive months. Thus, instead of predicting the absolute value of poll results, we tried to predict the variation, $\Delta y \leftarrow $ \{$\Delta (y_{t-1})$, $\Delta buzzAggregators$, $\Delta sentimentAggregators$\} \begin{figure}[!t] \centering \includegraphics[scale = 0.30]{varExperiment} \caption{Error predictions for polls results variation.} \label{fig:exp_var_mae} \end{figure} In this particular experiment, the inclusion of the $\Delta y_{t-1}$ as feature in the regression model has not a determinant role (figure \ref{fig:exp_var_mae}). Including that feature we could not obtain lower MAE than excluding it. It means that the real monthly poll variation is not constant over the year. In general, using a non-linear regression algorithm we obtain lower MAE. The results show that when leading with polls results with slight changes from poll to poll it makes sense to transform the dataset by derivation. \subsubsection{Buzz and Sentiment} Several studies state that the buzz has predictive power and reflects correctly the public opinion on social media. Following that premise, we trained our models with buzz and sentiment aggregators separately to predict polls variations: \begin{itemize} \item $\Delta y \leftarrow$ \{$\Delta (y_{t-1})$, $\Delta buzzAggregators$\} \item $\Delta y \leftarrow$ \{$\Delta (y_{t-1})$, $\Delta sentimentAggregators$\} \end{itemize} This experiment allowed us to compare the behavior of buzz and sentiment aggregators. \begin{figure}[Ht] \centering \includegraphics[scale = 0.30]{buzzvssentExperiment} \caption{Mean absolute error buzz vs sentiment.} \label{fig:buzzvssent} \end{figure} According to figure \ref{fig:buzzvssent}, buzz and sentiment aggregators have similar results. Although the OLS algorithm combined only with buzz aggregators has a slightly lower error than the other models, it is not a significant improvement. These results also show that Random Forests algorithm performs the best when combined only with sentiment aggregators. \subsection{Feature Selection} One of the main goals of our work is to understand which aggregator (or group of aggregators) better suits our case study. According to the previous experiments, we can achieve lower prediction errors when training our model with buzz and sentiment aggregators separately. However, when training our model with these two kinds of aggregators separately, we are implicitly performing feature selection. We only have two buzz features ($share$ and $total\_mentions$). Due to that small amount of features, it was not necessary to perform any feature selection technique within buzz features. Thus, we decided to apply a feature selection technique to the sentiment aggregators, in order to select the most informative ones to predict the monthly polls results variation. We use univariate feature selection, selecting 10\% of the sentiment features (total of 3 features). Using this technique, the Random Forests' global error raise from 0.65 to 0.73. However, OLS presents an MAE drop from 0.72 to 0.67. Another important fact to notice is that if we perform univariate feature selection to all aggregators (buzz and sentiment), we will achieve the same MAE value that when applied only to sentiment aggregators. We try a different approach and perform a recursive feature elimination technique. In this technique, features are eliminated recursively according to a initial score given by the external estimator. This method allow us to determine the number of features to select. Thus, also selecting 3 features, the OLS' MAE drop to 0.63. Once again, none of the buzz features were selected. Furthermore, both feature selection techniques select different features for each monthly prediction. \begin{figure*}[t] \centering \includegraphics[width=0.9\textwidth]{figure_1} \caption{Aggregate functions importance in the Random Forests models.} \label{fig:importances} \end{figure*} \subsection{Feature Importance} We select the Random Forest model of monthly variations to study the features importance as depicted in figure \ref{fig:importances}. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Values correspond to the average of the Gini importance over the different models trained in the experiments. The single most important feature is the $bermingham$ aggregate function, followed by $neutrals$. It is important to notice that when combining all the aggregate functions as features in a single regression model, the $buzz$ does not comprises a high Gini importance, even if when used as a single feature produces similar results with the sentiment aggregate functions. In general, the standard deviation of the GIni importance is relatively high. This has to due with our experimental setup, as the values depicted in the bar chart correspond to the average of the Gini importance over 12 different models (12 months of testing set). Therefore, feature importances vary over time while the MAE tends to remain unchanged. We can say that different features have different informative value over time and consequently it is useful to combine all the sentiment aggregation functions as features of the regression models over time. \section{Conclusions}\label{sec:conclusions} We studied a large set of sentiment aggregate functions to use as features in a regression model to predict political opinion poll results. The results show that we can estimate the polls results with low prediction error, using sentiment and buzz aggregators based on the opinions expressed on social media. We introduced a strong baseline for comparison, the lagged self of the polls. In our study, we built a model where we achieve the lowest MAE using the linear algorithm (OLS), combined only with buzz aggregators, using monthly variations. The model has an MAE of 0.63\%. We performed two feature selection techniques: (1) Univariate feature selection and (2) recursive feature elimination. Applying the recursive technique to the sentiment features, we can achieve an MAE of 0.63, equating our best model. Furthermore, the chosen features are not the same in every prediction. Regarding feature importance analysis our experiments showed that $bermingham$ aggregate function represents the higher Gini importance in the Random Forests model. The next immediate step is to implement a methodology using time series analysis. Furthermore, it is desirable to test this methodology with difference data sources, such as Facebook messages, blogs or news. Other alternative approach we intend to implement and evaluate is to interpret this problem as a classification problem - predict only the changing direction of opinion poll result (i.e., up or down). \bibliographystyle{unsrt}
{'timestamp': '2016-06-17T02:12:36', 'yymm': '1606', 'arxiv_id': '1606.05242', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05242'}
arxiv
\section{Introduction} Many modern classification systems, including internet applications (such as web-search engines, recommendation systems, and spam filtering) and security \& surveillance applications (such as wide-area surveillance and classification on large video corpora), face the challenge of prediction-time budget constraints~\cite{xu2013cost}. Prediction-time budgets can arise due to monetary costs associated with acquiring information or computation time (or delay) involved in extracting features and running the algorithm. We seek to learn a classifier by training on fully annotated training datasets that maintains high-accuracy while meeting average resource constraints during prediction-time. We consider a system that adaptively acquires features as needed depending on the instance(example) for high classification accuracy with reduced feature acquisition cost. \noindent We propose a two-stage algorithm. In the first stage, we train a random forest (RF) of trees using an impurity function such as entropy or more specialized cost-adaptive impurity \cite{icml2015_nan15}. Our second stage takes a RF as input and attempts to jointly prune each tree in the forest to meet global resource constraints. During prediction-time, an example is routed through all the trees in the ensemble to the corresponding leaf nodes and the final prediction is based on a majority vote. The total feature cost for a test example is the sum of acquisition costs of \emph{unique} features\footnote{When an example arrives at an internal node, the feature associated with the node is used to direct the example. If the feature has never been acquired for the example an acquisition cost is incurred. Otherwise, no acquisition cost is incurred as we assume that feature values are stored once computed.} acquired for the example in the entire ensemble of trees in the forest. \footnote{For time-sensitive cases such as web-search we parallelize the implementation by creating parallel jobs across all features and trees. We can then terminate jobs based on what features are returned.} We derive an efficient scheme to learn a \emph{globally optimal pruning} of a RF minimizing the empirical error and incurred average costs. We formulate the pruning problem as a 0-1 integer linear program that incorporates feature-reuse constraints. By establishing total unimodularity of the constraint set, we show that solving the linear program relaxation of the integer program yields the optimal solution to the integer program resulting in a \emph{polynomial time algorithm for optimal pruning}. We develop a primal-dual algorithm by leveraging results from network-flow theory for scaling the linear program to large datasets. Empirically, this pruning outperforms state-of-the-art resource efficient algorithms on benchmarked datasets. \noindent \begin{wraptable}{r}{83mm} \setlength\tabcolsep{4pt} \vspace{-.2cm} \centering \begin{tabular}{|l|c|c|c|c|c|} \hline & No Usage & 1--7 & > 7 & Cost & Error \\ \hline Unpruned RF & 7.3\% & 91.7\% & 1\% & 42.0 & 6.6\% \\ \hline BudgetPrune & 68.3\% & 31.5\% & 0.2\% & 24.3 & 6.7\% \\ \hline \end{tabular} \caption{\footnotesize Typical feature usage in a 40 tree RF before and after pruning (our algorithm) on the MiniBooNE dataset. Columns 2-4 list percentage of test examples that do not use the feature, use it 1 to 7 times, and use it greater than 7 times, respectively. Before pruning, 91\% examples use the feature only a few (1 to 7) times, paying a significant cost for its acquisition; after pruning, 68\% of the total examples no longer use this feature, reducing cost with minimal error increase. Column 5 is the average feature cost (the average number of unique features used by test examples). Column 6 is the test error of RFs. Overall, pruning dramatically reduces average feature cost while maintaining the same error level. } \label{table} \vspace{-.35cm} \end{wraptable} Our approach is motivated by the following considerations: \\ ({\bf i}) RFs are scalable to large datasets and produce flexible decision boundaries yielding high prediction-time accuracy. The sequential feature usage of decision trees lends itself to adaptive feature acquisition. \\({\bf ii}) RF feature usage is superfluous, utilizing features with introduced randomness to increase diversity and generalization. Pruning can yield significant cost reduction with negligible performance loss by selectively pruning features sparsely used across trees, leading to cost reduction with minimal accuracy degradation (due to majority vote). See Table \ref{table}. \\ ({\bf iii}) Optimal pruning encourages examples to use features either a large number of times, allowing for complex decision boundaries in the space of those features, or not to use them at all, avoiding incurring the cost of acquisition. It enforces the fact that once a feature is acquired for an example, repeated use incurs no additional acquisition cost. Intuitively, features should be repeatedly used to increase discriminative ability without incurring further cost. \\ ({\bf iv}) Resource constrained prediction has been conventionally viewed as a top-down (tree-growing) approach, wherein new features are acquired based on their utility value. This is often an intractable problem with combinatorial (feature subsets) and continuous components (classifiers) requiring several relaxations and heuristics. In contrast, ours is a bottom-up approach that starts with good initialization (RF) and prunes to realize optimal cost-accuracy tradeoff. Indeed, while we do not pursue it, our approach can also be used in conjunction with existing approaches \textbf{Related Work:} Learning decision rules to minimize error subject to a budget constraint during prediction-time is an area of recent interest, with many approaches proposed to solve the prediction-time budget constrained problem \cite{Fastmarginbasedcostsensitiveclassification_NanWTS14,AnLPSequentialLearningUnderBudgets_WangTS14,wang2014model,wang2014lp,Gao+Koller:NIPS11,DBLP:conf/icml/XuWC12,trapeznikov:2013b, NIPS2015_5982,ASTC_AAAI14}. These approaches focus on learning complex adaptive decision functions and can be viewed as orthogonal to our work. Conceptually, these are top-down ``growing'' methods as we described earlier (see ({\bf iv})). Our approach is bottom-up that seeks to prune complex classifiers to tradeoff cost vs. accuracy. Our work is based on RF classifiers \cite{breiman}. Traditionally, feature cost is not incorporated when constructing RFs, however recent work has involved approximation of budget constraints to learn budgeted RFs \cite{icml2015_nan15}. The tree-growing algorithm in \cite{icml2015_nan15} does not take feature re-use into account. Rather than attempting to approximate the budget constraint during tree construction, our work focuses on pruning ensembles of trees subject to a budget constraint. Methods such as traditional ensemble learning and budgeted random forests can be viewed as complementary. Decision tree pruning has been studied extensively to improve generalization performance, we are not aware of any existing pruning method that takes into account the feature costs. A popular method for pruning to reduce generalization error is Cost-Complexity Pruning (CCP), introduced by Breiman et al. \cite{breiman1984classification}. CCP trades-off classification ability for tree size, however it does not account for feature costs. As pointed out by Li et al. \cite{Li2001DPP}, CCP has undesirable ``jumps" in the sequence of pruned tree sizes. To alleviate this, they proposed a Dynamic-Program-based Pruning (DPP) method for binary trees. The DPP algorithm is able to obtain optimally pruned trees of all sizes; however, it faces the curse of dimensionality when pruning an ensemble of decision trees and taking feature cost into account. \cite{integerPruneZhang,OptimalPruning2009} proposed to solve the pruning problem as a 0-1 integer program; again, their formulations do not account for feature costs that we focus on in this paper. The coupling nature of feature usage makes our problem much harder. In general pruning RFs is not a focus of attention as it is assumed that overfitting can be avoided by constructing an ensemble of trees. While this is true, it often leads to extremely large prediction-time costs. Kulkarni and Sinha \cite{pruningRFSurvey} provide a survey of methods to prune RFs in order to reduce ensemble size. However, these methods do not explicitly account for feature costs. \section{Learning with Resource Constraints} In this paper, we consider solving the Lagrangian relaxed problem of learning under prediction-time resource constraints, also known as the error-cost tradeoff problem: \begin{equation}\label{eq:budgetProb} \min_{f \in \mathcal{F}}E_{(x,y)\sim\mathcal{P}}\left[err\left(y,f(x)\right)\right]+ \lambda E_{x\sim \mathcal{P}_x}\left[C\left(f,x\right)\right], \end{equation} where example/label pairs $(x,y)$ are drawn from a distribution $\mathcal{P}$; $err(y,\hat{y})$ is the error function; $C(f,x)$ is the cost of evaluating the classifier $f$ on example $x$; $\lambda$ is a tradeoff parameter. A larger $\lambda$ places a larger penalty on cost, pushing the classifier to have smaller cost. By adjusting $\lambda$ we can obtain a classifier satisfying the budget constraint. The family of classifiers $\mathcal{F}$ in our setting is the space of RFs, and each RF $f$ is composed of $T$ decision trees $\mathcal{T}_1,\dots,\mathcal{T}_T$. \noindent {\bf Our approach:} Rather than attempting to construct the optimal ensemble by solving Eqn. \eqref{eq:budgetProb} directly, we instead propose a two-step algorithm that first constructs an ensemble with low prediction error, then prunes it by solving Eqn. \eqref{eq:budgetProb} to produce a pruned ensemble given the input ensemble. By adopting this two-step strategy, we obtain an ensemble with low expected cost while simultaneously preserving the low prediction error. There are many existing methods to construct RFs, however the focus of this paper is on the second step, where we propose a novel approach to prune RFs to solve the tradeoff problem Eqn.\eqref{eq:budgetProb}. Our pruning algorithm is capable of taking any RF as input, offering the flexibility to incorporate any state-of-the-art RF algorithm. \section{Pruning with Costs} In this section, we treat the error-cost tradeoff problem Eqn. \eqref{eq:budgetProb} as an RF pruning problem. Our key contribution is to formulate pruning as a 0-1 integer program with totally unimodular constraints. We first define notations used throughout the paper. A training sample $S=\{(\mathbf x^{(i)},y^{(i)}):{i=1,\dots,N}\}$ is generated i.i.d. from an unknown distribution, where $\mathbf x^{(i)} \in \Re^K$ is the feature vector with a cost assigned to each of the $K$ features and $y^{(i)}$ is the label for the $i^{\mbox{th}}$ example. In the case of multi-class classification $y \in \{1,\dots,M\}$, where $M$ is the number of classes. Given a decision tree $\mathcal{T}$, we index the nodes as $h\in \{1,\dots,|\mathcal{T}|\}$, where node $1$ represents the root node. Let $\tilde{\mathcal{T}}$ denote the set of leaf nodes of tree $\mathcal{T}$. Finally, the corresponding definitions for $\mathcal{T}$ can be extended to an ensemble of $T$ decision trees $\{\mathcal{T}_t :t=1,\dots,T\}$ by adding an subscript $t$. \noindent {\bf Pruning Parametrization:} In order to model ensemble pruning as an optimization problem, we parametrize the space of all prunings of an ensemble. The process of pruning a decision tree $\mathcal{T}$ at an internal node $h$ involves collapsing the subtree of $\mathcal{T}$ rooted at $h$, making $h$ a leaf node. We say a pruned tree $\mathcal{T}^{(p)}$ is a valid pruned tree of $\mathcal{T}$ if (1) $\mathcal{T}^{(p)}$ is a subtree of $\mathcal{T}$ containing root node 1 and (2) for any $h\neq 1$ contained in $\mathcal{T}^{(p)}$, the sibling nodes (the set of nodes that share the same immediate parent node as $h$ in $\mathcal{T}$) must also be contained in $\mathcal{T}^{(p)}$. Specifying a pruning is equivalent to specifying the nodes that are leaves in the pruned tree. We therefore introduce the following binary variable for each node $h\in \mathcal{T}$ $$ z_h=\left\{ \begin{array}{rl} 1 & \text{if node } h \text{ is a leaf in the pruned tree} ,\\ 0 & \text{otherwise}. \end{array} \right. $$ We call the set $\{z_h, \forall h \in \mathcal{T}\}$ the node variables as they are associated with each node in the tree. Consider any root-to-leaf path in a tree $\mathcal{T}$, there should be exactly one node in the path that is a leaf node in the pruned tree. Let $p(h)$ denote the set of predecessor nodes, the set of nodes (including $h$) that lie on the path from the root node to $h$. The set of valid pruned trees can be represented as the set of node variables satisfying the following set of constraints: $\sum_{u\in p(h)} z_u=1 \quad \forall h \in \tilde{\mathcal{T}}$. Given a valid pruning for a tree, we now seek to parameterize the error of the pruning. \noindent {\bf Pruning error: } As in most supervised empirical risk minimization problems, we aim to minimize the error on training data as a surrogate to minimizing the expected error. In a decision tree $\mathcal{T}$, each node $h$ is associated with a predicted label corresponding to the majority label among the training examples that fall into the node $h$. Let $S_h$ denote the subset of examples in $S$ routed to or through node $h$ on $\mathcal{T}$ and let $\text{Pred}_h$ denote the predicted label at $h$. The number of misclassified examples at $h$ is therefore $e_h=\sum_{i\in S_h} \indicator{y^{(i)}\neq \text{Pred}_h}$. We can thus estimate the error of tree $\mathcal{T}$ in terms of the number of misclassified examples in the leaf nodes: $\frac{1}{N}\sum_{h\in \tilde{\mathcal{T}}}e_h$, where $N=|S|$ is the total number of examples. Our goal is to minimize the expected test error of the trees in the random forest, which we empirically approximate based on the aggregated probability distribution in Step~\eqref{algo:predictionRule} of Algorithm~\ref{algo:BudgetPrune} with $\frac{1}{TN}\sum_{t=1}^{T}\sum_{h\in \tilde{\mathcal{T}_t}}e_h$. We can express this error in terms of the node variables: $\frac{1}{TN}\sum_{t=1}^{T}\sum_{h\in \mathcal{T}_t}e_h z_h$. \noindent {\bf Pruning cost:} Assume the acquisition cost for the $K$ features, $\{c_k:k=1,\dots,K\}$, are given. The feature acquisition cost incurred by an example is the sum of the acquisition costs of unique features acquired in the process of running the example through the forest. This cost structure arises due to the assumption that an acquired feature is cached and subsequent usage by the same example incurs no additional cost. Formally, the feature cost of classifying an example $i$ on the ensemble $\mathcal{T}_{[T]}$ is given by $C_{\text{feature}}(\mathcal{T}_{[T]},\mathbf x^{(i)}) =\sum_{k=1}^{K}c_k w_{k,i}$, where the binary variables $w_{k,i}$ serve as the indicators: $$ w_{k,i}=\left\{\begin{array}{rl} 1 & \text{ if feature } k \text{ is used by }\mathbf x^{(i)} \text{ in any } \mathcal{T}_t, t=1,\dots,T\\ 0 & \text{ otherwise}. \end{array} \right. $$ The expected feature cost of a test example can be approximated as $\frac{1}{N}\sum_{i=1}^{N}\sum_{k=1}^{K}c_k w_{k,i}$. In some scenarios, it is useful to account for computation cost along with feature acquisition cost during prediction-time. In an ensemble, this corresponds to the expected number of Boolean operations required running a test through the trees, which is equal to the expected depth of the trees. This can be modeled as $\frac{1}{N}\sum_{t=1}^{T}\sum_{h\in \mathcal{T}_t} |S_h| d_h z_h$, where $d_h$ is the depth of node $h$. \noindent {\bf Putting it together:} Having modeled the pruning constraints, prediction performance and costs, we formulate the problem of pruning using the relationship between the node variables $z_h$'s and feature usage variables $w_{k,i}$'s. Given a tree $\mathcal{T}$, feature $k$, and example $\mathbf x^{(i)}$, let $u_{k,i}$ be the first node associated with feature $k$ on the root-to-leaf path the example follows in $\mathcal{T}$. Feature $k$ is used by $\mathbf x^{(i)}$ if and only if none of the nodes between the root and $u_{k,i}$ is a leaf. We represent this by the constraint $w_{k,i}+\sum_{h\in p(u_{k,i})} z_h = 1$ for every feature $k$ used by example $x^{(i)}$ in $\mathcal{T}$. Recall $w_{k,i}$ indicates whether or not feature $k$ is used by example $i$ and $p(u_{k,i})$ denotes the set of predecessor nodes of $u_{k,i}$. Intuitively, this constraint says that either the tree is pruned along the path followed by example $i$ before feature $k$ is acquired, in which case $z_h=1$ for some node $h\in p(u_{k,i})$ and $w_{k,i}=0$; or $w_{k,i}=1$, indicating that feature $k$ is acquired for example $i$. We extend the notations to ensemble pruning with tree index $t$: $z^{(t)}_h$ indicates whether node $h$ in $\mathcal{T}_t$ is a leaf after pruning; $w^{(t)}_{k,i}$ indicates whether feature $k$ is used by the $i^{\mbox{th}}$ example in $\mathcal{T}_t$; $w_{k,i}$ indicates whether feature $k$ is used by the $i^{\mbox{th}}$ example in any of the $T$ trees $\mathcal{T}_1,\dots,\mathcal{T}_T$; $u_{t,k,i}$ is the first node associated with feature $k$ on the root-to-leaf path the example follows in $\mathcal{T}_t$; $K_{t,i}$ denotes the set of features the $i^{\mbox{th}}$ example uses on tree $\mathcal{T}_t$. We arrive at the following integer program. \begin{equation*} \hspace{-.5cm}\begin{array}{rlll \displaystyle \min_{\substack{z^{(t)}_h, w^{(t)}_{k,i}, w_{k,i} \in \{0,1\}}} & \multicolumn{2}{l}{\overbrace{\frac{1}{NT}\displaystyle \sum_{t=1}^{T}\sum_{h\in \mathcal{T}_t} e^{(t)}_h z^{(t)}_h}^{\mathclap{\text{error}}} +\lambda \left( \overbrace{\sum_{k=1}^{K}c_k(\frac{1}{N}\sum_{i=1}^{N}w_{k,i})}^{\mathclap{\text{feature acquisition cost}}} + \overbrace{\displaystyle \frac{1}{N}\sum_{t=1}^{T}\sum_{h\in \mathcal{T}_t} |S_h| d_h z_h}^{\mathclap{\text{computational cost}}} \right) } \quad \textbf{(IP)}\\ \textrm{s.t.} & \sum_{u\in p(h)} z^{(t)}_u=1, & \forall h \in \tilde{\mathcal{T}}_t, \forall t \in [T], \qquad \quad \text{(feasible prunings)} \\ & w^{(t)}_{k,i}+ \sum_{h\in p(u_{t,k,i})} z^{(t)}_h=1 , & \forall k\in K_{t,i},\forall i\in S, \forall t \in [T], \text{ (feature usage/ tree)}\\ & w^{(t)}_{k,i} \leq w_{k,i}, & \forall k\in [K], \forall i\in S, \forall t\in [T]. \text{ (global feature usage)} \end{array} \end{equation*} \noindent {\bf Totally Unimodular constraints: } Even though integer programs are NP-hard to solve in general, we show that {\bf (IP)} can be solved exactly by solving its LP relaxation. We prove this in two steps: first, we examine the special structure of the equality constraints; then we examine the inequality constraint that couples the trees. Recall that a network matrix is one with each column having exactly one element equal to 1, one element equal to -1 and the remaining elements being 0. A network matrix defines a directed graph with the nodes in the rows and arcs in the columns. We have the following lemma. \begin{lemma}\label{lemma1} The equality constraints in {\bf (IP)} can be turned into an equivalent network matrix form for each tree. \end{lemma} \begin{proof} We observe the first constraint $\sum_{u\in p(h)} z^{(t)}_u=1$ requires the sum of the node variables along a path to be 1. The second constraints $w^{(t)}_{k,i}+ \sum_{h\in p(u_{t,k,i})} z^{(t)}_h=1$ has a similar sum except the variable $w^{(t)}_{k,i}$. Imagine $w^{(t)}_{k,i}$ as yet another node variable for a fictitious child node of $u_{t,k,i}$ and the two equations are essentially equivalent. The rest of proof follows directly from the construction in Proposition 3 of \cite{OptimalPruning2009}. \end{proof} Figure \ref{fig:trees} illustrates such a construction. The nodes are numbered 1 to 5. The subscripts at node 1 and 3 are the feature index used in the nodes. Since the equality constraints in {\bf (IP)} can be separated based on the trees, we consider only one tree and one example being routed to node 4 on the tree for simplicity. The equality constraints can be organized in the matrix form as shown in the middle of Figure \ref{fig:trees}. Through row operations, the constraint matrix can be transformed to an equivalent network matrix. Such transformation always works as long as the leaf nodes are arranged in a pre-order manner. Next, we deal with the inequality constraints and obtain our main result. \tikzset{every tree node/.style={minimum width=1em,draw,circle}, blank/.style={draw=none}, edge from parent/.style= {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}, level distance=1cm} \tikzset{every tree node/.style={minimum width=1em,draw,circle}, blank/.style={draw=none}, edge from parent/.style= {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}, level distance=1cm} \renewcommand{\kbldelim}{( \renewcommand{\kbrdelim}{) \begin{figure} \subcaptionbox*{}{ \begin{tikzpicture}[scale=.7] \Tree [.\ensuremath{1_1} [.2 ] [.\ensuremath{3_2} [.4 ] [.5 ] ] ] \end{tikzpicture}} \hspace{-1.5cm} \subcaptionbox*{}{ \resizebox{!}{.1\hsize}{ $$ \kbordermatrix{ & z_1 & z_2 & z_3 & z_4 & z_5 & w^{(1)}_{1,1} & w^{(1)}_{2,1}\\ r_1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ r_2 & 1 & 0 & 1 & 1 & 0 & 0 & 0 \\ r_3 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ r_4 & 1 & 0 & 1 & 0 & 0 & 0 & 1 \\ r_5 & 1 & 0 & 0 & 0 & 0 & 1 & 0 } $$} } \hspace{-1.5cm} \subcaptionbox*{}{ \resizebox{!}{.1\hsize}{ $$ \kbordermatrix{ & z_1 & z_2 & z_3 & z_4 & z_5 & w^{(1)}_{1,1} & w^{(1)}_{2,1}\\ -r_1 & -1 & -1 & 0 & 0 & 0 & 0 & 0 \\ r_1-r_2 & 0 & 1 & -1 & -1 & 0 & 0 & 0 \\ r_2-r_3 & 0 & 0 & 0 & 1 & -1 & 0 & 0 \\ r_3-r_4 & 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ r_4-r_5 & 0 & 0 & 1 & 0 & 0 & -1 & 1 \\ r_5 & 1 & 0 & 0 & 0 & 0 & 1 & 0 } $$} } \vspace{-.5cm} \caption{A decision tree example with node numbers and associated feature in subscripts together with the constraint matrix and its equivalent network matrix form.}\label{fig:trees} \vspace{-.4cm} \end{figure} \begin{theorem}\label{theorem} The LP relaxation of {\bf (IP)}, where the 0-1 integer constraints are relaxed to interval constraints $[0,1]$ for all integer variables, has integral optimal solutions. \end{theorem} Due to space limit the proof can be found in the Appendix. The main idea is to show the constraints are still \emph{totally unimodular} even after adding the coupling constraints and the LP relaxed polyhedron has only integral extreme points \cite{nemhauser1978analysis}. As a result, solving the LP relaxation results in the optimal solution to the integer program {\bf (IP)}, allowing for polynomial time optimization. \footnote{The nice result of totally unimodular constraints is due to our specific formulation. See Appendix for an alternative formulation that does not have such a property.} \begin{algorithm}[hb] \caption{{\textbf{\textsc{BudgetPrune}}}}\label{algo:BudgetPrune} \begin{algorithmic}[1] \Algphase{During Training: input - ensemble($\mathcal{T}_1,\dots,\mathcal{T}_T$), training/validation data with labels, $\lambda$} \State initialize dual variables $\beta_{k,i}^{(t)} \leftarrow 0$. \State update $z^{(t)}_h,w^{(t)}_{k,i}$ for each tree $t$ (shortest-path algo). $w_{k,i}=0$ if $\mu_{k,i}>0$, $w_{k,i}=1$ if $\mu_{k,i}<0$. \State $\beta_{k,i}^{(t)} \leftarrow [\beta_{k,i}^{(t)}+ \gamma (w_{k,i}^{(t)}-w_{k,i})]_+$ for step size $\gamma$, where $[\cdot]_+=\max\{0,\cdot\}$. \State go to Step 2 until duality gap is small enough. \Algphase{During Prediction: input - test exmaple $\mathbf{x}$} \State Run $\mathbf{x}$ on each tree to leaf, obtain the probability distribution over label classes $\mathbf{p}_t$ at leaf. \State Aggregate $\mathbf{p}=\frac{1}{T}\sum_{t=1}^{T}\mathbf{p}_t$. Predict the class with the highest probability in $\mathbf{p}$. \label{algo:predictionRule} \end{algorithmic} \end{algorithm} \section{A Primal-Dual Algorithm} Even though we can solve {\bf (IP)} via its LP relaxation, the resulting LP can be too large in practical applications for any general-purpose LP solver. In particular, the number of variables and constraints is roughly $O(T \times |\mathcal{T}_{\text{max}}|+N \times T \times K_{\text{max}})$, where $T$ is the number of trees; $|\mathcal{T}_{\text{max}}|$ is the maximum number of nodes in a tree; $N$ is the number of examples; $K_{\text{max}}$ is the maximum number of features an example uses in a tree. The runtime of the LP thus scales $O(T^{3})$ with the number of trees in the ensemble, limiting the application to only small ensembles. In this section we propose a primal-dual approach that effectively decomposes the optimization into many sub-problems. Each sub-problem corresponds to a tree in the ensemble and can be solved efficiently as a shortest path problem. The runtime per iteration is $O(\frac{T}{p}(|\mathcal{T}_{\text{max}}|+N \times K_{\text{max}})\log(|\mathcal{T}_{\text{max}}|+N \times K_{\text{max}}))$, where $p$ is the number of processors. We can thus massively parallelize the optimization and scale to much larger ensembles as the runtime depends only linearly on $\frac{T}{p}$. To this end, we assign dual variables $\beta_{k,i}^{(t)}$ for the inequality constraints $ w^{(t)}_{k,i} \leq w_{k,i}$ and derive the dual problem. \begin{equation*} \hspace{-.3cm}\begin{array}{rlll} \displaystyle \max_{\beta_{k,i}^{(t)}\geq 0} \min_{\substack{z^{(t)}_h\in [0,1] \\ w^{(t)}_{k,i}\in [0,1] \\w_{k,i}\in [0,1]}} & \multicolumn{2}{l}{\frac{1}{NT}\displaystyle \sum_{t=1}^{T}\sum_{h\in \mathcal{T}_t} \hat{e}^{(t)}_h z^{(t)}_h +\lambda \left( \sum_{k=1}^{K}c_k(\frac{1}{N}\sum_{i=1}^{N}w_{k,i}) \right) + \sum_{t=1}^T \sum_{i=1}^N \sum_{k\in K_{t,i}} \beta_{k,i}^{(t)}(w_{k,i}^{(t)}-w_{k,i})}\\ \textrm{s.t.} & \displaystyle \sum_{u\in p(h)} z^{(t)}_u=1, & \forall h \in \tilde{\mathcal{T}}_t, \forall t \in [T], \\ & w^{(t)}_{k,i}+ \displaystyle \sum_{h\in p(u_{t,k,i})} z^{(t)}_h=1 , & \forall k\in K_{t,i},\forall i\in S, \forall t \in [T], \\ \end{array} \end{equation*} where for simplicity we have combined coefficients of $z_h^{(t)}$ in the objective of {\bf (IP)} to $\hat{e}_h^{(t)}$. The primal-dual algorithm is summarized in Algorithm \ref{algo:BudgetPrune}. It alternates between updating the primal and the dual variables. The key is to observe that given dual variables, the primal problem (inner minimization) can be decomposed for each tree in the ensemble and solved in parallel as shortest path problems due to Lemma \ref{lemma1}. (See also Appendix). The primal variables $w_{k,i}$ can be solved in closed form: simply compute $\mu_{k,i}=\lambda c_k / N-\sum_{t\in T_{k,i}} \beta_{k,i}^{(t)}$, where $T_{k,i}$ is the set of trees in which example $i$ encounters feature $k$. So $w_{k,i}$ should be set to 0 if $\mu_{k,i}>0$ and $w_{k,i}=1$ if $\mu_{k,i}<0$. Note that our prediction rule aggregates the leaf distributions from all trees instead of just their predicted labels. In the case where the leaves are pure (each leaf contains only one class of examples), this prediction rule coincides with the majority vote rule commonly used in random forests. Whenever the leaves contain mixed classes, this rule takes into account the prediction confidence of each tree in contrast to majority voting. Empirically, this rule consistently gives lower prediction error than majority voting with pruned trees. \section{Experiments} We test our pruning algorithm \textsc{BudgetPrune} on four benchmark datasets used for prediction-time budget algorithms. The first two datasets have unknown feature acquisition costs so we assign costs to be 1 for all features; the aim is to show that \textsc{BudgetPrune} successfully selects a sparse subset of features on average to classify each example with high accuracy. \footnote{In contrast to traditional sparse feature selection, our algorithm allows adaptivity, meaning different examples use different subsets of features.} The last two datasets have real feature acquisition costs measured in terms of CPU time. \textsc{BudgetPrune} achieves high prediction accuracy spending much less CPU time in feature acquisition. For each dataset we first train a RF and apply \textsc{BudgetPrune} on it using different $\lambda$'s to obtain various points on the accuracy-cost tradeoff curve. We use in-bag data to estimate error probability at each node and the validation data for the feature cost variables $w_{k,i}$'s. We implement \textsc{BudgetPrune} using CPLEX \cite{cplex} network flow solver for the primal update step. The running time is significantly reduced (from hours down to minutes) compared to directly solving the LP relaxation of {\bf (IP)} using standard solvers such as Gurobi \cite{gurobi}. Futhermore, the standard solvers simply break trying to solve the larger experiments whereas \textsc{BudgetPrune} handles them with ease. We run the experiments for 10 times and report the means and standard deviations. \noindent {\bf Competing methods:} We compare against four other approaches. ({\bf i}) \textsc{BudgetRF}\cite{icml2015_nan15}: the recursive node splitting process for each tree is stopped as soon as node impurity (entropy or Pairs) falls below a threshold. The threshold is a measure of impurity tolerated in the leaf nodes. This can be considered as a naive pruning method as it reduces feature acquisition cost while maintaining low impurity in the leaves. \begin{wrapfigure}{r}{0.8\textwidth} \vspace{-0.35cm} \centering \subcaptionbox{MiniBooNE}{\includegraphics[width=.49\linewidth]{mbne_paper.pdf}} \subcaptionbox{Forest Covertype}{\includegraphics[width=.49\linewidth]{forest_paper.pdf}} \\ \vspace{-.1cm} \subcaptionbox{Yahoo! Rank}{\includegraphics[width=.49\linewidth]{yahoo_paper.pdf}} \subcaptionbox{Scene15}{\includegraphics[width=.49\linewidth]{scene15_paper.pdf}} \vspace{-.25cm} \caption{\footnotesize Comparison of \textsc{BudgetPrune} against CCP, \textsc{BudgetRF} with early stopping, \textsc{GreedyPrune} and \textsc{GreedyMiser} on 4 real world datasets. \textsc{BudgetPrune} (red) outperforms competing state-of-art methods. \textsc{GreedyMiser} dominates ASTC~\cite{ASTC_AAAI14}, CSTC~\cite{xu2013cost} and DAG~\cite{NIPS2015_5982} significantly on all datasets. We omit them in the plots to clearly depict the differences between competing methods.} \label{fig:experiments} \vspace{-0.1in} \end{wrapfigure} ({\bf ii}) Cost-Complexity Pruning (CCP) \cite{breiman1984classification}: it iteratively prunes subtrees such that the resulting tree has low error and small size. We perform CCP on individual trees to different levels to obtain various points on the accuracy-cost tradeoff curve. CCP does not take into account feature costs. ({\bf iii}) \textsc{GreedyPrune}: is a greedy global feature pruning strategy that we propose; at each iteration it attempts to remove all nodes corresponding to one feature from the RF such that the resulting pruned RF has the lowest training error and average feature cost. The process terminates in at most K iterations, where K is the number of features. The idea is to reduce feature costs by successively removing features that result in large cost reduction yet small accuracy loss. We also compare against the state-of-the-art methods in budgeted learning ({\bf iv}) \textsc{GreedyMiser} \cite{DBLP:conf/icml/XuWC12}: it is a modification of gradient boosted regression tree \cite{Friedman00greedyfunction} to incorporate feature cost. Specifically, each weak learner (a low-depth decision tree) is built to minimize squared loss with respect to current gradient at the training examples plus feature acquisition cost. To build each weak learner the feature costs are set to zero for those features already used in previous weak learners. Other prediction-time budget algorithms such as ASTC \cite{ASTC_AAAI14}, CSTC \cite{xu2013cost} and cost-weighted $l$-1 classifiers are shown to perform strictly worse than \textsc{GreedyMiser} by a significant amount \cite{ASTC_AAAI14,icml2015_nan15} so we omit them in our plots. Since only the feature acquisition costs are standardized, for fair comparison we do not include the computation cost term in the objective of {\bf (IP)} and focus instead on feature acquisition costs. \noindent {\bf MiniBooNE Particle Identification and Forest Covertype Datasets:\cite{UCI_repository}} Feature costs are uniform in both datasets. Our base RF consists of 40 trees using entropy split criteria and choosing from the full set of features at each split. As shown in (a) and (b) of Figure \ref{fig:experiments}, \textsc{BudgetPrune} (in red) achieves the best accuracy-cost tradeoff. The advantage of \textsc{BudgetPrune} is particularly large in (b). \textsc{GreedyMiser} has lower accuracy in the high budget region compared to \textsc{BudgetPrune} in (a) and significantly lower accuracy in (b). The gap between \textsc{BudgetPrune} and other pruning methods is small in (a) but much larger in (b). This indicates large gains from globally encouraging feature sharing in the case of (b) compared to (a). In both datasets, \textsc{BudgetPrune} successfully prunes away large number of features while maintaining high accuracy. For example in (a), using only 18 unique features on average instead of 40, we can get essentially the same accuracy as the original RF. \noindent {\bf Yahoo! Learning to Rank:\cite{YahooChallenge2010}} This ranking dataset consists of $473134$ web documents and $19944$ queries. Each example in the dataset contains features of a query-document pair together with the relevance rank of the document to the query. There are $141397/146769/184968$ examples in the training/validation/test sets. There are 519 features for each example; each feature is associated with an acquisition cost in the set $\{1,5,20,50,100,150,200\}$, which represents the units of CPU time required to extract the feature and is provided by a Yahoo! employee. The labels are binarized so that the document is either relevant or not relevant to the query. The task is to learn a model that takes a new query and its associated set of documents to produce an accurate ranking using as little feature cost as possible. As in \cite{icml2015_nan15}, we use the Average Precision@5 as the performance metric, which gives a high reward for ranking the relevant documents on top. Our base RF consists of 140 trees using cost weighted entropy split criteria as in \cite{icml2015_nan15} and choosing from a random subset of 400 features at each split. As shown in (c) of Figure \ref{fig:experiments}, \textsc{BudgetPrune} achieves similar ranking accuracy as \textsc{GreedyMiser} using only 30\% of its cost. \noindent {\bf Scene15 \cite{scene15}:} This scene recognition dataset contains 4485 images from 15 scene classes (labels). Following \cite{DBLP:conf/icml/XuWC12} we divide it into $1500/300/2685$ examples for training/validation/test sets. We use a diverse set of visual descriptors and object detectors from the Object Bank \cite{objectBank}. We treat each individual detector as an independent descriptor so we have a total of 184 visual descriptors. The acquisition costs of these visual descriptors range from 0.0374 to 9.2820. For each descriptor we train 15 one-vs-rest kernel SVMs and use the output (margins) as features. Once any feature corresponding to a visual descriptor is used for a test example, an acquisition cost of the visual descriptor is incurred and subsequent usage of features from the same group is free for the test example. Our base RF consists of 500 trees using entropy split criteria and choosing from a random subset of 20 features at each split. As shown in (d) of Figure \ref{fig:experiments}, \textsc{BudgetPrune} and \textsc{GreedyPrune} significantly outperform other competing methods. \textsc{BudgetPrune} has the same accuracy at the cost of 9 as at the full cost of 32. \textsc{BudgetPrune} and \textsc{GreedyPrune} perform similarly, indicating the greedy approach happen to solve the global optimization in this particular initial RF. \subsection{Discussion \& Concluding Comments} We have empirically evaluated several resource constrained learning algorithms including \textsc{BudgetPrune} and its variations on benchmarked datasets here and in the Appendix. We highlight key features of our approach below. \\ ({\bf i}) \textsc{State-of-the-art Methods}. Recent work has established that \textsc{GreedyMiser} and \textsc{BudgetRF} are among the state-of-the-art methods dominating a number of other methods~\cite{ASTC_AAAI14,xu2013cost,NIPS2015_5982} on these benchmarked datasets. \textsc{GreedyMiser} requires building class-specific ensembles and tends to perform poorly and is increasingly difficult to tune in multi-class settings. RF, by its nature, can handle multi-class settings efficiently. On the other hand, as we described earlier, \cite{ASTC_AAAI14,NIPS2015_5982,xu2013cost} are fundamentally "tree-growing" approaches, namely they are top-down methods acquiring features sequentially based on a surrogate utility value. This is a fundamentally combinatorial problem that is known to be NP hard~\cite{DecisionTreesforEntityIdentification,xu2013cost} and thus requires a number of relaxations and heuristics with no guarantees on performance. In contrast our pruning strategy is initialized to realize good performance (RF initialization) and we are able to globally optimize cost-accuracy objective. \\ ({\bf ii}) \textsc{Variations on Pruning}. By explicitly modeling feature costs, \textsc{BudgetPrune} outperforms other pruning methods such as early stopping of \textsc{BudgetRF} and CCP that do not consider costs. \textsc{GreedyPrune} performs well validating our intuition (see Table.~1) that pruning sparsely occurring feature nodes utilized by large fraction of examples can improve test-time cost-accuracy tradeoff. Nevertheless, the \textsc{BudgetPrune} outperforms \textsc{GreedyPrune}, which is indicative of the fact that apart from obvious high-budget regimes, node-pruning must account for how removal of one node may have an adverse impact on another downstream one. \\ ({\bf iii}) \textsc{Sensitivity to Impurity, Feature Costs, \& other inputs}. We explore these issues in Appendix. We experiment \textsc{BudgetPrune} with different impurity functions such as entropy and Pairs \cite{icml2015_nan15} criteria. Pairs-impurity tends to build RFs with lower cost but also lower accuracy compared to entropy and so has poorer performance. We also explored how non-uniform costs can impact cost-accuracy tradeoff. An elegant approach has been suggested by \cite{benbouzid:tel-00990245}, who propose an adversarial feature cost proportional to feature utility value. We find that \textsc{BudgetPrune} is robust with such costs. Other RF parameters including number of trees and feature subset size at each split do impact cost-accuracy tradeoff in obvious ways with more trees and moderate feature subset size improving prediction accuracy while incurring higher cost. To conclude, our proposed formulation possesses 1) elegant theoretical properties, 2) an algorithm scalable to large problems and 3) superior empirical performance. \paragraph{Acknowledgment} We thank Dr Kilian Weinberger for helpful discussions and Dr David Castanon for the insights on the primal dual algorithm. \section{Appendix} \subsection{A Naive Pruning Formulation} The nice property of totally unimodular constraints in Theorem 3.2 is due to our specific formulation. Here we present an alternative integer program formulation and show its deficiency. Recall we defined the following node variables $$ z_h=\left\{ \begin{array}{rl} 1 & \text{if node } h \text{ is a leaf in the pruned tree} ,\\ 0 & \text{otherwise}. \end{array} \right. $$ and indicator variables of feature usage: $$ w_{k,i}=\left\{\begin{array}{rl} 1 & \text{ if feature } k \text{ is used by }\mathbf x^{(i)} \text{ in any } \mathcal{T}_t, t=1,\dots,T\\ 0 & \text{ otherwise}. \end{array} \right. $$ First, note that if $z_h=1$ for some node $h$, then the examples that are routed to $h$ must have used all the features in the predecessor nodes $p(h)$, excluding $h$. We use $k\sim p(h)$ to denote feature $k$ is used in any predecessor of $h$, excluding $h$. Then for each feature $k$ and example $i$, we must have $w_{k,i}\geq z_h$ for all nodes $h$ such that $i\in S_h$ and $k\sim p(h)$. Combining these constraints with the pruning constraints we formulate pruning as a 0-1 integer program for an individual tree: \begin{equation*} \begin{array}{rlll} \displaystyle \min_{\substack{z_h \in \{0,1\} \\w_{k,i}\in \{0,1\}}} & \multicolumn{2}{l}{\frac{1}{N}\displaystyle \sum_{h\in \mathcal{N}} e_h z_h +\lambda \sum_{k=1}^{K}c_k(\frac{1}{N}\sum_{i=1}^{N}w_{k,i})} \\ \textrm{s.t.} & z_h+ \sum_{u\in p(h)} z_u=1 & \forall h \in \tilde{\mathcal{T}}, \\ & w_{k,i}\geq z_h & \forall h:i\in S_h \land k\sim p(h), \\ & & \forall k\in [K], \forall i\in S. \\ \end{array} \label{eq:IP1} \end{equation*} To solve the integer program, a common heuristic is to solve its linear program relaxation. Unfortunately, the constraint set in the above formulation has fractional extreme points, leading to possibly fractional solutions to the relaxed problem. It is not clear how to perform rounding to obtain good prunings. Consider the first tree in Figure \ref{fig:trees}. Feature 1 is used at the root node and feature 2 is used at node 3. There are 7 variables (assuming there is only one example and it goes to leaf 4): $z_1,z_2,z_3,z_4,z_5,w_{1,1},w_{2,1}$. The LP relaxed constraints are: \begin{align*} & z_1+z_3+z_4=1 , z_1+z_3+z_5=1 , z_1+z_2=1, \\ & w_{1,1}\geq z_4, w_{1,1}\geq z_3, w_{2,1}\geq z_4, 0\leq z\leq 1. \end{align*} The following is a basic feasible solution: \begin{equation*} z_1=0, z_2=1 , z_3=z_4=z_5=0.5, w_{1,1}=w_{2,1}=0.5, \end{equation*} because the following set of 7 constraints are active: \begin{align*} & z_1+z_3+z_4=1, z_1+z_3+z_5=1, \\ & w_{1,1}\geq z_4, w_{1,1}\geq z_3,w_{2,1}\geq z_4, z_1=0,z_2=1. \end{align*} Even if we were to interpret the fractional solution of $z_h$ as probabilities of $h$ being a leaf node, we see an issue with this formulation: the example has $0.5$ probability of stopping at node 3 or 4 ($z_3=z_4=0.5$). In both cases, feature 1 at the root node has to be used, however $w_{1,1}=0.5$ indicates that it is only being used half of the times. This solution is not a feasible pruning and fails to capture the cost of the pruning. Attempting to use an LP relaxation of this formulation fails to capture the desired behavior of the integer program. In the main paper we propose a better integer program formulation and show that solving the LP relaxation yields the optimal solution to the integer program. \subsection{Transformation to Network Matrices and Shortest Path Problems} To illustrate the transformation to network matrix in Lemma 3.1, we provide the following illustration in Figure \ref{fig:trees}. Note in the main paper we have shown the example of the first tree. For simplicity we consider only one example being routed to nodes 4 and 11 respectively on the two trees. The equality constraints in (IP2) can be separated based on the trees and put in matrix form: \renewcommand{\kbldelim}{( \renewcommand{\kbrdelim}{) \[ \kbordermatrix{ & z_1 & z_2 & z_3 & z_4 & z_5 & w^{(1)}_{1,1} & w^{(1)}_{2,1}\\ r_1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ r_2 & 1 & 0 & 1 & 1 & 0 & 0 & 0 \\ r_3 & 1 & 0 & 1 & 0 & 1 & 0 & 0 \\ r_4 & 1 & 0 & 1 & 0 & 0 & 0 & 1 \\ r_5 & 1 & 0 & 0 & 0 & 0 & 1 & 0 }, \] for tree 1 and \[ \kbordermatrix{ & z_6 & z_7 & z_8 & z_9 & z_{10} & z_{11} & z_{12} & w^{(2)}_{2,1} & w^{(2)}_{3,1}\\ r_1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ r_2 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\ r_3 & 1 & 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0\\ r_4 & 1 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0\\ r_5 & 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1\\ r_6 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 }, \] for tree 2. Through row operations they can be turned into network matrices, where there is exactly two non-zeros in each column, a 1 and a $-1$. \[ \kbordermatrix{ & z_1 & z_2 & z_3 & z_4 & z_5 & w^{(1)}_{1,1} & w^{(1)}_{2,1}\\ -r_1 & -1 & -1 & 0 & 0 & 0 & 0 & 0 \\ r_1-r_2 & 0 & 1 & -1 & -1 & 0 & 0 & 0 \\ r_2-r_3 & 0 & 0 & 0 & 1 & -1 & 0 & 0 \\ r_3-r_4 & 0 & 0 & 0 & 0 & 1 & 0 & -1 \\ r_4-r_5 & 0 & 0 & 1 & 0 & 0 & -1 & 1 \\ r_5 & 1 & 0 & 0 & 0 & 0 & 1 & 0 }, \] for tree 1 and \[ \kbordermatrix{ & z_6 & z_7 & z_8 & z_9 & z_{10} & z_{11} & z_{12} & w^{(2)}_{2,1} & w^{(2)}_{3,1}\\ -r_1 & -1 & -1 & -1 & 0 & 0 & 0 & 0 & 0 & 0\\ r_1-r_2 & 0 & 0 & 1 & -1 & 0 & 0 & 0 & 0 & 0\\ r_2-r_3 & 0 & 1 & 0 & 1 & -1 & -1 & 0 & 0 & 0\\ r_3-r_4 & 0 & 0 & 0 & 0 & 0 & 1 & -1 & 0 & 0\\ r_4-r_5 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & -1\\ r_5-r_6 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & -1 & 1\\ r_6 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 } \] for tree 2. Note the above transformation to network matrices can always be done as long as the leaf nodes are arranged in a pre-order fashion. In the primal-dual algorithm, the inner minimization can be decomposed to shortest path problems corresponding to individual trees. Figure \ref{fig:shortestpath} illustrates such a construction based on the network matrices shown above. The nodes in the graphs correspond to rows in the network matrices and the arcs correspond to the columns, which are the primal variables $z_h, w^{(t)}_{k,i}$'s. There is a cost associated with each arc in the objective of the minimization problem. The task is to find a path from the first node (source) to the last node (sink) such that the sum of arc costs is minimized. Note each path from source to sink corresponds to a feasible pruning. For example, in (a) of Figure \ref{fig:shortestpath}, consider the path of 1-2-5-6, the active arcs are $z_2, z_3$ and $w^{(1)}_{1,1}$, Setting these variables to 1 and others to 0, we see that it corresponds to pruning Tree 1 at node 3 in Figure \ref{fig:trees}. (Note the nodes in Figure \ref{fig:shortestpath} and Figure \ref{fig:trees} are not to be confused - they do not have a relation with each other. ) \begin{figure} \vspace{-0.35cm} \centering \subcaptionbox{Tree 1}{\includegraphics[width=\linewidth,height=.3\linewidth]{shortest_path_diagram1.JPG}} \subcaptionbox{Tree 2}{\includegraphics[width=\linewidth,height=.3\linewidth]{shortest_path_diagram2.JPG}} \\ \caption{Turning pruning to equivalent shortest path problems.} \label{fig:shortestpath} \end{figure} \subsection{Proof of Theorem 3.2} Denote the equality constraints of (IP) with index set $J_1$. They can be divided into each tree. Each constraint matrix in $J_1$ associated with a tree can be turned into a network matrix according to Lemma 3.1. Stacking these matrices leads to a larger network matrix. Denote the $w^{(t)}_{k,i}\leq w_{k,i}$ constraints with index set $J_2$. Consider the constraint matrix for $J_2$. Each $w^{(t)}_{k,i}$ only appears once in $J_2$, which means the column corresponding to $w^{(t)}_{k,i}$ has only one element equal to 1 and the rest equal to 0. If we arrange the constraints in $J_2$ such that for any given $k,i$ $w^{(t)}_{k,i}\leq w_{k,i}$ are put together for $t\in [T]$, the constraint matrix for $J_2$ has interval structure such that the non-zeros in each column appear consecutively. Finally, putting the network matrix from $J_1$ and the matrix from $J_2$ together. Assign $J_1$ and the odd rows of $J_2$ to the first partition $Q_1$ and assign the even rows of $J_2$ to the second partition $Q_2$. Note the upper bound constraints on the variables can be ignored as this is an minimization problem. We conclude that the constraint matrix of (IP) is totally unimodular according to Theorem 2.7, Part 3 of \cite{Nemhauser:1988:ICO:42805} with partition $Q_1$ and $Q_2$. By Proposition 2.1 and 2.2, Part 3 of \cite{Nemhauser:1988:ICO:42805} we can conclude the proof. \tikzset{every tree node/.style={minimum width=1em,draw,circle}, blank/.style={draw=none}, edge from parent/.style= {draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}}, level distance=1cm} \begin{figure} \centering \subcaptionbox*{}{ \begin{tikzpicture} \Tree [.\ensuremath{1_1} [.2 ] [.\ensuremath{3_2} [.4 ] [.5 ] ] ] \end{tikzpicture}} ~ ~ ~ \subcaptionbox*{}{ \begin{tikzpicture} \Tree [.\ensuremath{6_2} [.\ensuremath{7_1} [.8 ] [.9 ] ] [.\ensuremath{10_3} [.11 ] [.12 ] ] ] \end{tikzpicture}} \caption{An ensemble of two decision trees with node numbers and associated feature in subscripts}\label{fig:trees2} \end{figure} \subsection{Additional Details of Experiments} In this section we provide additional details of the experiment setup and explore how some parameter choices may affect \textsc{BudgetPrune}. \paragraph{Additional details of datasets} The MiniBooNE data set is a binary classification task to distinguish electron neutrinos from muon neutrinos. There are $45523/19510/65031$ examples in training/validation/test sets. Each example has 50 features, each with unit cost. The Forest data set contains cartographic variables to predict 7 forest cover types. There are $36603/15688/58101$ examples in training/validation/test sets. Each example has 54 features, each with unit cost. We use 1000 trees for \textsc{GreedyMiser} and search over learning rates in $[10^{-5}, 10^2]$ for MiniBooNE and Forest. The Yahoo and Scene15 datasets have actual feature acquisition costs in terms of CPU time. We use 3000 trees for \textsc{GreedyMiser} and search over learning rates in $[10^{-5}, 1]$. We use the multi-class logistic loss for Scene15 and the squared loss for other datasets in \textsc{GreedyMiser}. For the Scene15 dataset, we use a diverse set of visual discriptors varying in computation time: GIST, spatial HOG, Local Binary Pattern, self-similarity, texton histogram, geometric texton, geometric color and 177 object detectors from the Object Bank \cite{objectBank}. We treat each individual detector as an independent descriptor so we have 184 different visual descriptors in total. The acquisition costs of these visual descriptors range from 0.0374 to 9.2820. For each descriptor we train 15 one-vs-rest kernel SVMs and use the output (margins) as features. The best classifier based on individual descriptors achieves an accuracy of 77.8\%. Note the features are grouped based on the visual descriptors. Once any feature corresponding to a visual descriptor is used for a test example, an acquisition cost of the visual descriptor is incurred and subsequent usage of features from the same group is free for the test example. Next, we perform additional experiments to evaluate \textsc{BudgetPrune} with different costs, input RFs. \paragraph{Non-uniform cost on MiniBooNE} We observe that CCP performs similarly to \textsc{BudgetPrune} on MiniBooNE when the costs are uniform in the case of entropy splitting criteria, indicating little gain from global optimization with respect to feature usage. We suspect that uniform feature costs work in favor of CCP because there's no loss in treating each feature equally. To confirm this intuition we assign the features non-uniform costs and re-run prunings on the same RF. We first normalize the data so that the data vectors corresponding to the features have the same $l$-2 norm. We then train a linear SVM on it and obtain the weight vector corresponding to the learned hyperplane. We around the absolute values of the weights and make them the costs for the features. Intuitively the feature with higher weight tends to be more relevant for the classification task so we assign it a higher acquisition cost. The resulting costs lie in the range of $[1,40]$ and we normalize them so that the sum of all feature costs is 50 - the number of features. We plot \textsc{BudgetPrune} and CCP for uniform cost as well as the non-uniform cost described above in Figure \ref{fig:mbne_nonuniform}. \textsc{BudgetPrune} still achieves similar performance as uniform cost while CCP performance drops significantly with non-uniform feature cost. This shows again the importance of taking into account feature costs in the pruning process. \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{mbne_nonuniform.pdf} \caption{Comparing \textsc{BudgetPrune} and CCP with uniform and non-uniform feature cost on MiniBooNE dataset. \textsc{BudgetPrune} is robust when the feature cost is non-uniform.} \label{fig:mbne_nonuniform} \end{figure} \paragraph{Entropy Vs Pairs} How does \textsc{BudgetPrune} depend on the splitting criteria used in the underlying random forest? On two data sets we build RFs using the popular entropy splitting criteria and the mini-max Pairs criteria used in \cite{icml2015_nan15} and the results are shown in Figure \ref{fig:entropy_pair}. We observe that entropy splitting criteria lead to RFs with higher accuracy while the Pairs criteria lead to RFs with lower cost. This is expected as using Pairs biases to more balanced splits and thus provably low cost \cite{icml2015_nan15}. In (a) of Figure \ref{fig:entropy_pair} we observe that as more of the RF is pruned away \textsc{BudgetPrune} and CCP results for entropy and Pairs coincide. This suggests that the two criteria actually lead to similar tree structures in the initial tree-building process. However, as the trees are built deeper their structures diverge. Plot (b) in Figure \ref{fig:entropy_pair} shows that pruning based on the RFs from the Pairs criteria can achieve higher accuracy in the low cost region. But if high accuracy in the high cost region is desirable then the entropy criteria should be used. \begin{figure}[htbp] \centering \subcaptionbox*{MiniBooNE}{\includegraphics[width=.48\linewidth,height=.4\linewidth]{mbne_entropy_pair.pdf}} \subcaptionbox*{Forest Covertype}{\includegraphics[width=.48\linewidth,height=.4\linewidth]{forest_entropy_pair.pdf}} \caption{Comparisons of various pruning methods based on entropy and Pairs splitting criteria on MiniBooNE and Forest datasets} \label{fig:entropy_pair} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.5\textwidth]{scene15_k_20_120.pdf} \caption{Comparing various pruning approaches on RF built with k=20 and k=120 on Scene15 dataset. The initial RF has higher accuracy and higher cost for k=20. \textsc{GreedyPrune} performs very well in k=20 but very poorly in k=120.} \label{fig:scene15_k_20_120} \end{figure} \paragraph{Size of random feature subset at each split} At each split in RF building, it is possible to restrict the choice of splitting feature to be among a random subset of all features. Such restriction tends to further reduce correlation among trees and gain prediction accuracy. The drawback is that test examples tend to encounter a diverse set of features, increasing feature acquisition cost. For illustration purpose, we plot various pruning results on Scene15 dataset for feature subset sizes $k=20$ and $k=120$ in Figure \ref{fig:scene15_k_20_120}. The initial RF has higher accuracy and higher cost for $k=20$ as expected. \textsc{BudgetPrune} achieves slightly better accuracy in $k=20$ than $k=120$. Note also how \textsc{GreedyPrune} performance drops significantly for $k=120$ so it is not robust. In our main experiments $k$ is chosen on validation data to achieve highest accuracy for the initial RF. \clearpage
{'timestamp': '2016-06-17T02:06:04', 'yymm': '1606', 'arxiv_id': '1606.05060', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05060'}
arxiv
\section{Proof of Results Leading to Theorems \ref{RAPSA_convg_thm} and \ref{RAPSA_convg_thm_finite}}\label{apx_syn} \subsection{Proof of Lemma \ref{exp_wrt_blocks}}\label{apx_lemma_exp_wrt_blocks} Recall that the components of vector $\bbx^{t+1}$ are equal to the components of $\bbx^t$ for the coordinates that are not updated at step $t$, i.e., $i\notin \ccalI^t$. For the updated coordinates $i\in \ccalI^t$ we know that $\bbx^{t+1}_{i}=\bbx^{t}_{i}-\gamma^t \nabla_{\bbx_i^t} f( \bbx^{t}, \bbtheta^t)$. Therefore, $B-I$ blocks of the vector $\bbx^{t+1}-\bbx^t$ are 0 and the remaining $I$ randomly chosen blocks are given by $-\gamma^t \nabla_{\bbx_i^t} f( \bbx^{t}, \bbtheta^t)$. Notice that there are ${B}\choose{I}$ different ways for picking $I$ blocks out of the whole $B$ blocks. Therefore, the probability of each combination of blocks is $1/ {{B}\choose{I}}$. Further, each block appears in ${B-1}\choose{I-1}$ of the combinations. Therefore, the expected value can be written as \begin{equation}\label{lemma_RAPS_dec_20} \mathbb{E}_{\ccalI^t}\!\left[ \bbx^{t+1}-\bbx^t \mid \ccalF^t \right] =\frac{{{B-1}\choose{I-1}}}{{{m}\choose{I}}} \left( -\gamma^t \nabla f( \bbx^{t}, \bbTheta^t) \right). \end{equation} Observe that simplifying the ratio in the right hand sides of \eqref{lemma_RAPS_dec_20} leads to \begin{equation}\label{lemma_RAPS_dec_30} \frac{{{B-1}\choose{I-1}}}{{{B}\choose{I}}} =\frac{\frac{(B-1)!}{(I-1)!\times (B-I)!}}{\frac{p!}{I!\times (B-I)!}}=\frac{I}{B}=r. \end{equation} Substituting the simplification in \eqref{lemma_RAPS_dec_30} into \eqref{lemma_RAPS_dec_20} follows the claim in \eqref{lemma_RAPS_dec_claim_1}. To prove the claim in \eqref{lemma_RAPS_dec_claim_2} we can use the same argument that we used in proving \eqref{lemma_RAPS_dec_claim_1} to show that \begin{equation}\label{lemma_RAPS_dec_40} \mathbb{E}_{\ccalI^t}\!\left[ \| \bbx_{t+1}\!-\!\bbx^t\|^2\! \mid \ccalF^t \right] \!=\!\frac{{{B-1}\choose{I-1}}}{{{B}\choose{I}}} (\gamma^t)^2\! \left\|\nabla f( \bbx^{t}, \bbTheta^t)\right\|^2\!\!\!. \end{equation} By substituting the simplification in \eqref{lemma_RAPS_dec_30} into \eqref{lemma_RAPS_dec_40} the claim in \eqref{lemma_RAPS_dec_claim_2} follows. \subsection{Proof of Proposition \ref{martingale_prop}}\label{apx_martingale_prop} By considering the Taylor's expansion of $F(\bbx^{t+1})$ near the point $\bbx^t$ and observing the Lipschitz continuity of gradients $\nabla F$ with constant $M$ we obtain that the average objective function $F(\bbx^{t+1}) $ is bounded above by \begin{equation}\label{martingale_10} F(\bbx^{t+1})\leq F(\bbx^{t}) +\nabla F(\bbx^{t})^T (\bbx^{t+1}-\bbx^{t})+\frac{M}{2}\|\bbx^{t+1}-\bbx^{t}\|^2. \end{equation} Compute the expectation of the both sides of \eqref{martingale_10} with respect to the random set $\ccalI^t$ given the observed set of information $\ccalF^t$. Substitute $\mathbb{E}_{\ccalI^t}\!\left[{\bbx^{t+1}-\bbx^{t}\mid \ccalF^t}\right] $ and $\mathbb{E}_{\ccalI^t}\!\left[\|{\bbx^{t+1}-\bbx^{t}\|^2\mid \ccalF^t}\right] $ with their simplifications in \eqref{lemma_RAPS_dec_claim_1} and \eqref{lemma_RAPS_dec_claim_2}, respectively, to write \begin{align}\label{martingale_20} \mathbb{E}_{\ccalI^t}\left[F(\bbx^{t+1})\mid \ccalF^t\right] \leq F(\bbx^{t}) - {r\gamma^t }{}\ \nabla F(\bbx^{t})^T\nabla f( \bbx^{t}, \bbTheta^t) + \frac{rM(\gamma^t)^2}{2 }\ \left\|\nabla f( \bbx^{t}, \bbTheta^t)\right\|^2. \end{align} Notice that the stochastic gradient $\nabla f( \bbx^{t}, \bbTheta^t)$ is an unbiased estimate of the average function gradient $ \nabla F(\bbx^{t})$. Therefore, we obtain $\mathbb{E}_{\bbTheta^t} \left[ \nabla f( \bbx^{t}, \bbTheta^t) \mid \ccalF^t\right]= \nabla F(\bbx^{t})$. Observing this relation and considering the assumption in \eqref{ekhtelaf}, the expected value of \eqref{martingale_20} with respect to the set of realizations $\bbTheta^t$ can be written as \begin{align}\label{martingale_30} \mathbb{E}_{\ccalI^t,\bbTheta^t}\left[F(\bbx^{t+1})\mid \ccalF^t\right] &\leq F(\bbx^{t}) - {r\gamma^t}{}\ \left\|\nabla F(\bbx^{t})\right\|^2 + \frac{rM(\gamma^t)^2 K}{2 }. \end{align} Subtracting the optimal objective function value $F(\bbx^*)$ form the both sides of \eqref{martingale_30} implies that \begin{align}\label{martingale_40} &\mathbb{E}_{\ccalI^t,\bbTheta^t}\left[F(\bbx^{t+1})-F(\bbx^*)\mid \ccalF^t\right] \leq F(\bbx^{t}) -F(\bbx^*) - r\gamma^t \ \left\|\nabla F(\bbx^{t})\right\|^2 + \frac{rM(\gamma^t)^2 K}{2 }. \end{align} We proceed to find a lower bound for the gradient norm $\| \nabla F(\bbx^{t})\|$ in terms of the objective value error $F(\bbx^{t}) -\ F(\bbx^*)$. Assumption \ref{convexity_assumption} states that the average objective function $F$ is strongly convex with constant $m>0$. Therefore, for any $\bby,\bbz\in \reals^p$ we can write \begin{equation}\label{martingale_50} F(\bby) \geq\ F(\bbz) +\nabla F(\bbz)^{T}(\bby-\bbz) + {{m}\over{2}}\|{\bby - \bbz}\|^{2}. \end{equation} For fixed $\bbz$, the right hand side of \eqref{martingale_50} is a quadratic function of $\bby$ whose minimum argument we can find by setting its gradient to zero. Doing this yields the minimizing argument $\hby = \bbz- (1/m) \nabla F(\bbz)$ implying that for all $\bby$ we must have \begin{alignat}{2}\label{martingale_60} F(\bby) \geq\ &\ F(\bbw) +\nabla F(\bbz)^{T}(\hby-\bbz) + {{m}\over{2}}\|{\hby - \bbz}\|^{2} \nonumber \\ \ =\ &\ F(\bbz) - \frac{1}{2m} \| \nabla F(\bbz)\|^{2} . \end{alignat} Observe that the bound in \eqref{martingale_60} holds true for all $\bby$ and $\bbz$. Setting values $\bby=\bbx^{*}$ and $\bbz=\bbx^{t}$ in \eqref{martingale_60} and rearranging the terms yields a lower bound for the squared gradient norm $\|\nabla F(\bbx^t)\|^2$ as \begin{equation}\label{martingale_70} \| \nabla F(\bbx^{t})\|^{2} \geq 2m( F(\bbx^{t}) - F(\bbx^*) ). \end{equation} Substituting the lower bound in \eqref{martingale_70} by the norm of gradient square $ \| \nabla F(\bbx^{t})\|^{2}$ in \eqref{martingale_40} follows the claim in \eqref{martingale_prop_claim}. \subsection{Proof of Theorem \ref{RAPSA_convg_thm}}\label{apx_RAPSA_convg_thm} We use the relationship in \eqref{martingale_prop_claim} to build a supermartingale sequence. To do so, define the stochastic process $\alpha^t$ as \begin{equation}\label{martingale_41} \alpha^t := F(\bbx^{t})-F(\bbx^*) +\frac{rMK}{2} \sum_{u=t}^{\infty} (\gamma^u)^2 . \end{equation} Note that $\alpha^t$ is well-defined because $\sum_{u=t}^{\infty} (\gamma^u)^2 \leq\sum_{u=0}^{\infty} (\gamma^u)^2 <\infty$ is summable. Further define the sequence $\beta_t$ with values \begin{equation}\label{martingale_42} \beta^t :=\ {2m\gamma^t r} (F(\bbx^{t})-F(\bbx^*) ). \end{equation} The definitions of sequences $\alpha^t$ and $\beta^t$ in \eqref{martingale_41} and \eqref{martingale_42}, respectively, and the inequality in \eqref{martingale_prop_claim} imply that the expected value $\alpha^{t+1}$ given $\ccalF^t$ can be written as \begin{equation}\label{martingale_43} \E{\alpha^{t+1} \given \ccalF^t} \ \leq\ \alpha^t - \beta^t. \end{equation} Since the sequences $\alpha^t$ and $\beta^t$ are nonnegative it follows from \eqref{martingale_43} that they satisfy the conditions of the supermartingale convergence theorem -- see e.g. Theorem E$7.4$ of \cite{Solo}. Therefore, we obtain that: (i) The sequence $\alpha^t$ converges almost surely to a limit. (ii) The sum $\sum_{t=0}^{\infty}\beta^t < \infty$ is almost surely finite. The latter result yields \begin{equation}\label{martingale_44} \sum_{t=0}^{\infty} {2m\gamma^t r} (F(\bbx^{t})-F(\bbx^*) ) < \infty. \qquad\text{a.s.} \end{equation} Since the sequence of step sizes is non-summable there exits a subsequence of sequence $F(\bbx^{t})-F(\bbx^*)$ which is converging to null. This observation is equivalent to almost sure convergence of $\liminf F(\bbx^{t})-F(\bbx^*)$ to null, \begin{equation}\label{martingale_45} \liminf_{t\to \infty} F(\bbx^{t})-F(\bbx^*)=0. \qquad\text{a.s.} \end{equation} Based on the martingale convergence theorem for the sequences $\alpha^t$ and $\beta^t$ in relation \eqref{martingale_43}, the sequence $\alpha^t$ almost surely converges to a limit. Consider the definition of $\alpha^t$ in \eqref{martingale_41}. Observe that the sum $\sum_{u=t}^{\infty} (\gamma^u)^2$ is deterministic and its limit is null. Therefore, the sequence of the objective function value error $F(\bbx^t)-F(\bbx^*)$ almost surely converges to a limit. This observation in association with the result in \eqref{martingale_45} implies that the whole sequence of $F(\bbx^t)-F(\bbx^*)$ converges almost surely to null, \begin{equation}\label{martingale_71} \lim_{t\to \infty}\ F(\bbx^{t}) - F(\bbx^*) =0. \qquad\text{a.s.} \end{equation} The last step is to prove almost sure convergence of the sequence $\|\bbx^t-\bbx^*\|^2$ to null, as a result of the limit in \eqref{martingale_71}. To do so, we follow by proving a lower bound for the objective function value error $F(\bbx^{t}) - F(\bbx^*)$ in terms of the squared norm error $\|\bbx^t-\bbx^*\|^2$. According to the strong convexity assumption, we can write the following inequality \begin{equation}\label{martingale_72} F(\bbx^t)\geq F(\bbx^*)+\nabla F(\bbx^*)^T(\bbx^t-\bbx^*)+\frac{m}{2}\|\bbx^t-\bbx^*\|^2. \end{equation} Observe that the gradient of the optimal point is the null vector, i.e., $\nabla F(\bbx^*)=\bb0$. This observation and rearranging the terms in \eqref{martingale_72} imply that \begin{equation}\label{martingale_73} F(\bbx^t) - F(\bbx^*)\geq \frac{m}{2}\|\bbx^t-\bbx^*\|^2. \end{equation} The upper bound in \eqref{martingale_73} for the squared norm $\|\bbx^t-\bbx^*\|^2$ in association with the fact that the sequence $F(\bbx^t) - F(\bbx^*)$ almost surely converges to null, leads to the conclusion that the sequence $\|\bbx^t-\bbx^*\|^2$ almost surely converges to zero. Hence, the claim in \eqref{rapsa_as_convg} is valid. The next step is to study the convergence rate of RAPSA in expectation. In this step we assume that the diminishing stepsize is defined as $\gamma^t=\gamma^0 T^0/(t+T^0)$. Recall the inequality in \eqref{martingale_prop_claim}. Substitute $\gamma^t$ by $\gamma^0 T^0/(t+T^0)$ and compute the expected value of \eqref{martingale_prop_claim} given $\ccalF^0$ to obtain \begin{align}\label{martingale_90} &\E{F(\bbx^{t+1})-F(\bbx^*)} \leq \left( 1- \frac{2mr \gamma^0 T^0}{(t+T^0)} \right)\E{F(\bbx^{t}) -F(\bbx^*)}+ \frac{rMK(\gamma^0 T^0)^2}{2 (t+T^0)^2}. \end{align} We use the following lemma to show that the result in \eqref{martingale_90} implies sublinear convergence of the sequence of expected objective value error $\E{F(\bbx^{t})-F(\bbx^*)}$. \begin{lemma}\label{lecce22} Let $c>1$, $b>0$ and $t^0 > 0$ be given constants and $u_{t}\geq 0$ be a nonnegative sequence that satisfies \begin{equation}\label{claim23} u^{t+1} \leq \left( 1- \frac{c}{t+t^0} \right) u^{t} + \frac{b}{{(t+t^0)}^{2}}\ , \end{equation} {for all times $t\geq0$}. The sequence $u^t$ is then bounded as \begin{equation}\label{lemma3_claim} u^{t} \leq\ \frac{Q}{t+t^{0}}, \end{equation} for all times $t\geq0$, where the constant $Q$ is defined as $ Q:=\max \{{b}/({c-1}),\ t^{0} u^{0} \}$ . \end{lemma} \begin{proof} See Section 2 in (\cite{Nemirovski}). \end{proof} Lemma \ref{lecce22} shows that if a sequence $u^t$ satisfies the condition in \eqref{claim23} then the sequence $u^t$ converges to null at least with the rate of $\ccalO(1/t)$. By assigning values $t^0=T^0$, $u^t=\E{F(\bbx^t)-F(\bbx^*)}$, $c=2m r\gamma^0 T^0$, and $b=rM K(\gamma^0 T^0)^2/2$, the relation in \eqref{martingale_90} implies that the inequality in \eqref{claim23} is satisfied for the case that $2mr\gamma^0 T^0>1$. Therefore, the result in \eqref{lemma3_claim} holds and we can conclude that \begin{equation}\label{martingale_100} \E{F(\bbx^t)-F(\bbx^*)}\leq \frac{ C}{t+T^0}, \end{equation} where the constant $C$ is defined as \begin{equation}\label{martingale_110} C= \max\left\{\frac{rMK (\gamma^0 T^0)^2}{4rm\gamma^0 T^0-2},\ T^0(F(\bbx^0)-F(\bbx^*))\right\}. \end{equation} \subsection{Proof of Theorem \ref{RAPSA_convg_thm_finite}}\label{apx_RAPSA_convg_thm_finite} To prove the claim in \eqref{rapsa_as_convg_finite} we use the relationship in \eqref{martingale_prop_claim} (Proposition \ref{martingale_prop}) to construct a supermartingale. Define the stochastic process $\alpha^t$ with values \begin{equation}\label{finite_10} \alpha^t\!:=\!\left( F(\bbx^t)-F(\bbx^*) \right) \times \mathbf{1}\!\left\{\min_{u\leq t} F(\bbx^u)-F(\bbx^*) \!>\! \frac{\gamma M K}{4m}\right\} \end{equation} The process $\alpha^t$ tracks the optimality gap $F(\bbx^t)-F(\bbx^*)$ until the gap becomes smaller than $\gamma M K/{2m}$ for the first time at which point it becomes $\alpha^t=0$. Notice that the stochastic process $\alpha^t$ is always non-negative, i.e., $\alpha^t\geq0$. Likewise, we define the stochastic process $\beta^t$ as \begin{align}\label{finite_20} \beta^t:={2\gamma m r}{}\left( F(\bbx^t)-F(\bbx^*)-\frac{\gamma M K}{4m} \right) \times \mathbf{1}\left\{\min_{u\leq t}\ F(\bbx^u)-F(\bbx^*) > \frac{\gamma M K}{4m}\right\}, \end{align} which follows $2\gamma m r\left( F(\bbx^t)-F(\bbx^*)-{\gamma M K}/{4m} \right) $ until the time that the optimality gap $F(\bbx^t)-F(\bbx^*)$ becomes smaller than $\gamma M K/{2m}$ for the first time. After this moment the stochastic process $\beta^t$ becomes null. According to the definition of $\beta^t$ in \eqref{finite_20}, the stochastic process satisfies $\beta^t\geq0$ for all $t\geq0$. Based on the relationship \eqref{martingale_prop_claim} and the definitions of stochastic processes $\alpha^t$ and $\beta^t$ in \eqref{finite_10} and \eqref{finite_20} we obtain that for all times $t\geq0$ \begin{equation}\label{finite_30} \E{\alpha^{t+1} \mid \ccalF^t} \leq \alpha^t-\beta^t. \end{equation} To check the validity of \eqref{finite_30} we first consider the case that $\min_{u\leq t}\ F(\bbx^u)-F(\bbx^*) > {\gamma M K}{/4m}$ holds. In this scenario we can simply the stochastic processes in \eqref{finite_10} and \eqref{finite_20} as $\alpha^t=F(\bbx^t)-F(\bbx^*)$ and $\beta^t=2\gamma m r\left( F(\bbx^t)-F(\bbx^*)-{\gamma M K}/{4m} \right)$. Therefore, according to the inequality in \eqref{martingale_prop_claim} the result in \eqref{finite_30} is valid. The second scenario that we check is $\min_{u\leq t}\ F(\bbx^u)-F(\bbx^*) \leq {\gamma M K}{/4m}$. Based on the definitions of stochastic processes $\alpha^t$ and $\beta^t$, both of these two sequences are equal to 0. Further, notice that when $\alpha^t=0$, it follows that $\alpha^{t+1}=0$. Hence, the relationship in \eqref{finite_30} is true. Given the relation in \eqref{finite_30} and non-negativity of stochastic processes $\alpha^t$ and $\beta^t$ we obtain that $\alpha^t$ is a supermartingale. The supermartingale convergence theorem yields: i) The sequence $\alpha^t$ converges to a limit almost surely. ii) The sum $\sum_{t=1}^\infty \beta^t$ is finite almost surely. The latter result implies that the sequence $\beta^t$ is converging to null almost surely, i.e., \begin{equation}\label{finite_40} \lim_{t \to \infty} \beta^t \ =\ 0 \quad \text{a.s. } \end{equation} Based on the definition of $\beta^t$ in \eqref{finite_20}, the limit in \eqref{finite_40} is true if one of the following events holds: i) The indicator function is null after for large $t$. ii) The limit $\lim_{t\to \infty} \left( F(\bbx^t)-F(\bbx^*)-{\gamma M K}/{4m} \right) =0$ holds true. From any of these two events we it is implied that \begin{equation}\label{finite_50} \liminf_{t\to \infty}\ F(\bbx^t)-F(\bbx^*)\ \leq \ \frac{\gamma M K}{4m}\quad \text{a.s.} \end{equation} Therefore, the claim in \eqref{rapsa_as_convg_finite} is valid. The result in \eqref{finite_50} shows the objective function value sequence $F(\bbx^t)$ almost sure converges to a neighborhood of the optimal objective function value $F(\bbx^*)$. We proceed to prove the result in \eqref{rapsa_rate_finite}. Compute the expected value of \eqref{martingale_prop_claim} given $\ccalF^0$ and set $\gamma^t=\gamma$ to obtain \begin{align}\label{finite_constant_10} \E{F(\bbx^{t+1})-F(\bbx^*)} &\leq \left( 1- 2m \gamma r \right)\E{ F(\bbx^{t}) -F(\bbx^*)} + \frac{rM K\gamma^2}{2 }. \end{align} Notice that the expression in \eqref{finite_constant_10} provides an upper bound for the expected value of objective function error $\E{F(\bbx^{t+1})-F(\bbx^*)}$ in terms of its previous value $\E{F(\bbx^{t})-F(\bbx^*)}$ and an error term. Rewriting the relation in \eqref{finite_constant_10} for step $t-1$ leads to \begin{align}\label{finite_constant_20} \E{F(\bbx^{t})-F(\bbx^*)} \leq \left( 1- 2m \gamma r \right)\E{ F(\bbx^{t-1}) -F(\bbx^*)} + \frac{rM K\gamma^2}{2 }. \end{align} Substituting the upper bound in \eqref{finite_constant_20} for the expectation $\E{F(\bbx^{t})-F(\bbx^*)}$ in \eqref{finite_constant_10} follows an upper bound for the expected error $\E{F(\bbx^{t+1})-F(\bbx^*)}$ as \begin{align}\label{finite_constant_30} \E{F(\bbx^{t+1})\!-\!F(\bbx^*)} \leq \left( 1- 2m \gamma r \right)^2\E{ F(\bbx^{t-1}) \!-\!F(\bbx^*)} + \frac{rM K\gamma^2}{2 }\left(1+\left( 1\!- \!2mr \gamma\right)\right)\!. \end{align} By recursively applying the steps in \eqref{finite_constant_20}-\eqref{finite_constant_30} we can bound the expected objective function error $\E{F(\bbx^{t+1})-F(\bbx^*)}$ in terms of the initial objective function error $F(\bbx^{0}) -F(\bbx^*)$ and the accumulation of the errors as \begin{align}\label{finite_constant_40} \E{F(\bbx^{t+1})\!-\!F(\bbx^*)} \leq \left( 1- 2m \gamma r \right)^{t+1}( F(\bbx^{0}) -F(\bbx^*)) + \frac{rM K\gamma^2}{2 } \sum_{u=0}^t \left( 1- {2mr\gamma}{} \right)^u\!\!\!. \end{align} Substituting $t$ by $t-1$ and simplifying the sum in the right hand side of \eqref{finite_constant_40} yields \begin{align}\label{finite_constant_50} \E{F(\bbx^{t})-F(\bbx^*)} \leq \left( 1- 2m \gamma r \right)^{t}( F(\bbx^{0}) -F(\bbx^*)) + \frac{M K\gamma}{4 m} \left[ 1- \left( 1- {2mr \gamma}{} \right)^t\right]. \end{align} Observing that the term $1- \left( 1- {2mr \gamma}{} \right)^t$ in the right hand side of \eqref{finite_constant_50} is strictly smaller than $1$ for the stepsize $\gamma<1/(2mr)$, the claim in \eqref{rapsa_rate_finite} follows. \section{Proofs Leading up to Theorem \ref{RAPSA_convg_thm_asyn}}\label{apx_asyn} \subsection{Proof of Lemma \ref{exp_wrt_blocks_asyn}}\label{apx_exp_wrt_blocks_asyn} \begin{myproof} Recall that the components of vector $\bbx^{t+1}$ are equal to the components of $\bbx^t$ for the coordinates that are not updated at step $t$, i.e., $i\notin \ccalI^t$. For the updated coordinates $i\in \ccalI^t$ we know that $\bbx^{t+1}_{i}=\bbx^{t}_{i}-\gamma^t \nabla_{\bbx_i^t} f( \bbx^{t-\tau}, \bbtheta^{t-\tau})$. Therefore, $B-1$ blocks of the vector $\bbx^{t+1}-\bbx^t$ are 0 and only one block is given by $-\gamma^t \nabla_{\bbx_i} f( \bbx^{t-\tau}, \bbtheta^{t-\tau})$. Since the corresponding processor picks its block uniformly at random from the $B$ sets of blocks we obtain that the expected value of the difference $\bbx^{t+1}-\bbx^t$ with respect to the index of the block at time $t$ is given by \begin{equation}\label{lemma_RAPS_dec_20_asyn} \mathbb{E}_{\ccalI^t}\!\left[ \bbx^{t+1}-\bbx^t \mid \ccalF^{t} \right] = \frac{1}{B} \left( -\gamma^t \nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau}) \right). \end{equation} Substituting the simplification in \eqref{lemma_RAPS_dec_20_asyn} in place of \eqref{lemma_RAPS_dec_20} in the proof of Lemma \ref{exp_wrt_blocks} and simplifying the resulting expression yields the claim in \eqref{lemma_RAPS_dec_claim_1_asyn}. To prove the claim in \eqref{lemma_RAPS_dec_claim_2_asyn} we can use the same argument that we used in proving \eqref{lemma_RAPS_dec_claim_1_asyn} to show that \begin{equation}\label{lemma_RAPS_dec_40_asyn} \mathbb{E}_{\ccalI^t}\left[ \| \bbx_{t+1}-\bbx^t\|^2 \mid \ccalF^{t} \right] =\frac{(\gamma^t)^2}{B} \left\|\nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau})\right\|^2, \end{equation} which completes the proof. \end{myproof} \subsection{Proof of Proposition \ref{martingale_prop_asyn}}\label{apx_RAPSA_convg_thm_finite_asyn} By considering the Taylor's expansion of $F(\bbx^{t+1})$ near the point $\bbx^t$ and observing the Lipschitz continuity of gradients $\nabla F$ with constant $M$ we obtain that the average objective function $F(\bbx^{t+1}) $ is bounded above by \begin{equation}\label{martingale_10_asyn} F(\bbx^{t+1})\leq F(\bbx^{t}) +\nabla F(\bbx^{t})^T (\bbx^{t+1}-\bbx^{t})+\frac{M}{2}\|\bbx^{t+1}-\bbx^{t}\|^2. \end{equation} Compute the expectation of the both sides of \eqref{martingale_10_asyn} with respect to the random indexing set $\ccalI^{t}\subset \{1,\dots,B\}$ associated with chosen blocks given the observed set of information $\ccalF^{t}$. Substitute $\mathbb{E}_{\ccalI^t}\!\left[{\bbx^{t+1}-\bbx^{t}\mid \ccalF^t}\right] $ and $\mathbb{E}_{\ccalI^t}\!\left[\|{\bbx^{t+1}-\bbx^{t}\|^2\mid \ccalF^t}\right] $ with their simplifications in \eqref{lemma_RAPS_dec_claim_1_asyn} and \eqref{lemma_RAPS_dec_claim_2_asyn}, respectively, to write \begin{align}\label{martingale_20_asyn} \mathbb{E}_{\ccalI^t}\left[F(\bbx^{t+1})\mid \ccalF^t\right] \leq F(\bbx^{t}) - \frac{\gamma^t }{B}\ \nabla F(\bbx^{t})^T\nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau})+ \frac{M(\gamma^t)^2}{2B }\ \left\|\nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau})\right\|^2. \end{align} Notice that the stochastic gradient $\nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau})$ is an unbiased estimate of the average function gradient $ \nabla F(\bbx^{t-\tau})$. Therefore, we obtain $\mathbb{E} \left[ \nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau}) \mid \ccalF^t\right]= \nabla F(\bbx^{t-\tau})$. Observing this relation and considering the assumption in \eqref{ekhtelaf}, the expected value of \eqref{martingale_20_asyn} given the sigma algebra $\ccalF^t$ can be written as \begin{align}\label{martingale_30_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^t\right] \leq F(\bbx^{t}) - \frac{\gamma^t}{B}\ \nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau}) + \frac{M(\gamma^t)^2 K}{2B }. \end{align} By adding and subtracting the term $({\gamma^t}/{B}) \|\nabla F(\bbx^{t})\|^2$ to the right hand side of \eqref{martingale_30_asyn} we obtain \begin{align}\label{martingale_31_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^t\right] \leq F(\bbx^{t}) - \frac{\gamma^t}{B}\ \|\nabla F(\bbx^{t})\|^2 + \frac{\gamma^t}{B} \left(\|\nabla F(\bbx^{t})\|^2-\nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau})\right) + \frac{M(\gamma^t)^2 K}{2B}. \end{align} Observe that the third term on the right-hand side of \eqref{martingale_31_asyn} is the directional error due to the presence of delays from asynchronicity. We proceed to find an upper bound for the expression $\|\nabla F(\bbx^{t})\|^2-\nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau})$, which means that the error due to delay may be mitigated. To do so, notice that we can write \begin{align}\label{martingale_32_asyn} \|\nabla F(\bbx^{t})\|^2-\nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau}) & =\nabla F(\bbx^{t})^T(\nabla F(\bbx^{t})-\nabla F( \bbx^{t-\tau})) \nonumber\\ & \leq \|\nabla F(\bbx^{t})\|\|\nabla F(\bbx^{t})-\nabla F( \bbx^{t-\tau})\|, \end{align} where for the inequality we have used the Cauchy--Schwarz inequality. Apply the fact that the gradient of the objective function is $M$-Lipschitz continuous, which implies that $\|\nabla F(\bbx^{t})-\nabla F( \bbx^{t-\tau})\|\leq M\|\bbx^t-\bbx^{t-\tau}\|$. Substituting the upper bound $ M\|\bbx^t-\bbx^{t-\tau}\|$ for $\|\nabla F(\bbx^{t})-\nabla F( \bbx^{t-\tau})\|$ into \eqref{martingale_32_asyn} we obtain \begin{align}\label{martingale_33_asyn} &\|\nabla F(\bbx^{t})\|^2-\nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau}) \leq M \|\nabla F(\bbx^{t})\|\|\bbx^t-\bbx^{t-\tau}\|. \end{align} The difference norm $\|\bbx^t-\bbx^{t-\tau}\|$ is equivalent to $\|\sum_{s=t-\tau}^{t-1} (\bbx^{s+1}-\bbx^{s})\|$ which can be bounded above by $\sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|$ by the triangle inequality. Therefore, \begin{align}\label{martingale_34_asyn} \|\nabla F(\bbx^{t})\|^2-\nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau}) \leq M \|\nabla F(\bbx^{t})\|\sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|. \end{align} Substitute the upper bound in \eqref{martingale_34_asyn} for $\|\nabla F(\bbx^{t})\|^2-\nabla F(\bbx^{t})^T\nabla F( \bbx^{t-\tau})$ into \eqref{martingale_31_asyn} to obtain \begin{align}\label{martingale_35_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^t\right] \leq F(\bbx^{t}) - \frac{\gamma^t}{B}\ \|\nabla F(\bbx^{t})\|^2 + \frac{M\gamma^t}{B} \|\nabla F(\bbx^{t})\|\sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\| + \frac{M(\gamma^t)^2 K}{2B}. \end{align} Note that for any positive scalars $a$, $b$, and $\rho$ the inequality $ab \leq (\rho/2)a^2+(1/2\rho)b^2$ holds. If we set $a:=\|\nabla F(\bbx^t)\|$ and $b:=\sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|$ we obtain that \begin{align}\label{martingale_36_asyn} \|\nabla F(\bbx^{t})\| \sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\| & \leq \frac{\rho}{2} \|\nabla F(\bbx^{t})\|^2 + \frac{1}{2\rho}\left[ \sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|\right]^2 \nonumber \\ & \leq \frac{\rho}{2} \|\nabla F(\bbx^{t})\|^2 + \frac{\tau}{2\rho} \sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|^2, \end{align} where the last inequality is an application of the triangle inequality to the second term on the right-hand side of the first line in \eqref{martingale_36_asyn}. Now substituting the upper bound in \eqref{martingale_36_asyn} into \eqref{martingale_35_asyn} yields \begin{align}\label{martingale_37_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^t\right] \leq F(\bbx^{t}) - \left(\frac{\gamma^t}{B} -\frac{\rho M \gamma^t}{2B}\right) \|\nabla F(\bbx^{t})\|^2 + \frac{\tau M\gamma^t}{2\rho B} \sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|^2 + \frac{M(\gamma^t)^2 K}{2B}. \end{align} Compute the expected value of the both sides of \eqref{martingale_37_asyn} given the sigma-algebra $\ccalF^{t-1}$ to obtain \begin{align}\label{martingale_38_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^{t-1}\right] & \leq \mathbb{E}\left[F(\bbx^{t})\mid \ccalF^{t-1}\right] - \left(\frac{\gamma^t}{B} -\frac{\rho M \gamma^t}{2B}\right) \mathbb{E}\left[\|\nabla F(\bbx^{t})\|^2\mid \ccalF^{t-1}\right] \nonumber\\ & \qquad + \frac{\tau M \gamma^t}{2\rho B} \mathbb{E}\left[\sum_{s=t-\tau}^{t-1} \|\bbx^{s+1}-\bbx^{s}\|^2\mid \ccalF^{t-1}\right] + \frac{M(\gamma^t)^2 K}{2B}\; , \end{align} which can be simplified as \begin{align}\label{martingale_39_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^{t-1}\right] & \leq \mathbb{E}\left[F(\bbx^{t})\mid \ccalF^{t-1}\right] - \left(\frac{\gamma^t}{B} -\frac{\rho M \gamma^t}{2B}\right) \mathbb{E}\left[\|\nabla F(\bbx^{t})\|^2\mid \ccalF^{t-1}\right] \nonumber\\ & \quad + \frac{\tau M \gamma^t}{2\rho B} \mathbb{E}\left[\sum_{s=t-\tau}^{t-2} \|\bbx^{s+1}-\bbx^{s}\|^2\mid \ccalF^{t-1}\right] + \frac{\tau M \gamma^t (\gamma^{t-1})^2 K}{2\rho B^2} + \frac{M(\gamma^t)^2 K}{2B}. \end{align} Do the same up to $t-\tau$ to get \begin{align}\label{martingale_391_asyn} \mathbb{E}\left[F(\bbx^{t+1})\mid \ccalF^{t-\tau}\right] & \leq \mathbb{E}\left[F(\bbx^{t})\mid \ccalF^{t-\tau}\right] - \left(\frac{\gamma^t}{B} -\frac{\rho M \gamma^t}{2B}\right) \mathbb{E}\left[\|\nabla F(\bbx^{t})\|^2\mid \ccalF^{t-\tau}\right] \nonumber\\ & \quad + \frac{\tau M \gamma^t K}{2\rho B^2} \sum_{s=t-\tau}^{t-1} (\gamma^s)^2 + \frac{M(\gamma^t)^2 K}{2B}. \end{align} Notice that the sequence of stepsizes $\gamma^t$ is decreasing, thus the sum $ \sum_{s=t-\tau}^{t-1} (\gamma^s)^2$ in \eqref{martingale_391_asyn} can be bounded above by $\tau (\gamma^{t-\tau})^2$. Applying this substutition and subtracting the optimal objective function value $F(\bbx^*)$ from both sides of the implied expression lead to \begin{align}\label{martingale_392_asyn} \mathbb{E}\left[F(\bbx^{t+1})-F(\bbx^*)\mid \ccalF^{t-\tau}\right] & \leq \mathbb{E}\left[F(\bbx^{t})-F(\bbx^*)\mid \ccalF^{t-\tau}\right] - \left(\frac{\gamma^t}{B} -\frac{\rho M \gamma^t}{2B}\right) \mathbb{E}\left[\|\nabla F(\bbx^{t})\|^2\mid \ccalF^{t-\tau}\right] \nonumber\\ & \qquad + \frac{\tau^2 M \gamma^t K(\gamma^{t-\tau})^2}{2\rho B^2} + \frac{M(\gamma^t)^2 K}{2B}. \end{align} We make use of the fact that the average function $F(\bbx)$ is $m$-strongly convex in applying the relation $ \| \nabla F(\bbx^{t})\|^{2} \geq 2m( F(\bbx^{t}) - F(\bbx^*) )$ to the expression \eqref{martingale_392_asyn}. Therefore, \begin{align}\label{martingale_392_asyn} \mathbb{E}\left[F(\bbx^{t+1})-F(\bbx^*)\mid \ccalF^{t-\tau}\right] & \leq \mathbb{E}\left[F(\bbx^{t})-F(\bbx^*)\mid \ccalF^{t-\tau}\right] -2m \left(\frac{\gamma^t}{B} -\frac{\rho M \gamma^t}{2B}\right) \mathbb{E}\left[ F(\bbx^{t}) - F(\bbx^*) \mid \ccalF^{t-\tau}\right] \nonumber\\ & \qquad + \frac{\tau^2 M \gamma^t K(\gamma^{t-\tau})^2}{2\rho B^2} + \frac{M(\gamma^t)^2 K}{2B} \; , \end{align} as stated in Proposition \ref{martingale_prop_asyn}. \subsection{Proof of Theorem \ref{RAPSA_convg_thm_asyn}}\label{apx_RAPSA_convg_thm_asyn} \begin{myproof} We use the result in Proposition \ref{martingale_prop_asyn} to define a martingale difference sequence with delay. Begin by defining the non-negative stochastic processes $\alpha^t$, $\beta^t$, and $\zeta^t$ for $t\geq 0$ as \begin{align}\label{proof_asyn_10} &\alpha^t:= F(\bbx^t)-F(\bbx^*), \qquad \beta^t :=\frac{2m \gamma^t}{B} \left[1-\frac{\rho M}{2}\right] (F(\bbx^{t}) -F(\bbx^*)), \nonumber\\ & \zeta^t:=\frac{M K(\gamma^t)^2}{2B }+ \frac{\tau^2 MK \gamma^t (\gamma^{t-\tau})^2}{2\rho B^2}. \end{align} According to the definitions in \eqref{proof_asyn_10} and the inequality in \eqref{martingale_prop_claim_asyn} we can write \begin{equation}\label{proof_asyn_20} \mathbb{E}\left[\alpha^{t+1}\mid \ccalF^{t-\tau}\right]\leq \mathbb{E}\left[\alpha^t\mid \ccalF^{t-\tau}\right] -\mathbb{E}\left[\beta^t\mid \ccalF^{t-\tau}\right] + \zeta^t. \end{equation} Computing the expected value of both sides of \eqref{proof_asyn_20} with respect to the initial sigma algebra $\mathbb{E}\left[\cdot\mid\ccalF^{0}\right]=\mathbb{E}\left[\cdot\right]$ yields \begin{equation}\label{proof_asyn_30} \mathbb{E}\left[\alpha^{t+1}\right]\leq \mathbb{E}\left[\alpha^t\right] -\mathbb{E}\left[\beta^t\right] + \zeta^t. \end{equation} Sum both sides of \eqref{proof_asyn_30} from $t=0$ to $t=\infty$ and consider the fact that $\zeta^t$ is summable and the sequence $\alpha^t$ is non-negative. Thus, we obtain that the series $\sum_{t=0}^{\infty} \mathbb{E}\left[\beta^t \right] < \infty$ is finite. By using Monotone Convergence Theorem, we pull the expectation outside the summand to obtain that $\mathbb{E}\left[\sum_{t=0}^{\infty} \beta^t \right] < \infty$. If we define $Y_n:=\sum_{t=0}^{n} \beta^t$, we obtain that $Y_n\geq 0 $ and $Y_n\leq Y_{n+1}$. Thus, from the result $\mathbb{E}\left[\sum_{t=0}^{\infty} \beta^t \right] < \infty$ we can conclude that $\sum_{t=0}^{\infty} \beta^t < \infty$ with probability 1. Now considering the definition of $\beta^t$ in \eqref{proof_asyn_10} and the non-summability of the stepsizes $\sum_{t=0}^{\infty} \gamma^t=\infty$, we obtain that a subsequence of the sequence $F(\bbx^{t}) -F(\bbx^*)$ almost surely converges to zero, i.e., the liminf of the sequence $F(\bbx^{t}) -F(\bbx^*)$ is zero with probability 1, \begin{align}\label{proof_asyn_40} \liminf_{t\to \infty}\ F(\bbx^{t}) -F(\bbx^*)=0,\quad \text{a.s.} \end{align} The next step is to study the convergence rate of asynchronous RAPSA in expectation. By setting $\gamma^t=\gamma^0 T^0/(t+T^0)$ in \eqref{martingale_prop_claim_asyn} and computing the expected value given the initial sigma algebra $\ccalF^0$ we obtain \begin{align}\label{martingale_90_asyn} &\mathbb{E}\left[F(\bbx^{t+1})-F(\bbx^*)\right]\\ &\quad \leq \left( 1-\frac{2m\gamma^0 T^0}{B(t+T^0)} \left[1-\frac{\rho M}{2}\right] \right)\mathbb{E}\left[F(\bbx^{t}) -F(\bbx^*)\right] + \frac{M K(\gamma^0 T^0)^2}{2B(t+T^0)^2 }+ \frac{\tau^2 MK (\gamma^0 T^0)^3}{2\rho B^2(t+T^0)(t-\tau+T^0)^2}.\nonumber \end{align} Observe that it is not hard to check that if $t\geq2\tau+1$, then the inequality $(t-\tau+T^0)^2>t+T^0$ holds and we can substitute $1/((t-\tau+T^0)^2)$ in \eqref{martingale_90_asyn} by the upper bound $1/(t+T^0)$. Applying this substitution yields \begin{align}\label{martingale_91_asyn} &\mathbb{E}\left[F(\bbx^{t+1})-F(\bbx^*)\right]\nonumber\\ &\quad \leq \left( 1-\frac{2m\gamma^0 T^0}{B(t+T^0)} \left[1-\frac{\rho M}{2}\right] \right)\mathbb{E}\left[F(\bbx^{t}) -F(\bbx^*)\right] + \frac{M K(\gamma^0 T^0)^2}{2B(t+T^0)^2 }+ \frac{\tau^2 MK (\gamma^0 T^0)^3}{2\rho B^2(t+T^0)^2}. \end{align} We use the result in Lemma \ref{lecce22} to show sublinear convergence of the sequence of expected objective value error $\E{F(\bbx^{t})-F(\bbx^*)}$. Lemma \ref{lecce22} shows that if a sequence $u^t$ satisfies the condition in \eqref{claim23} then the sequence $u^t$ converges to null at least with the rate of $\ccalO(1/t)$. By assigning values $t^0=T^0$, $u^t=\E{F(\bbx^t)-F(\bbx^*)}$, $c=(2m \gamma^0 T^0/B)(1-\rho M/2)$, and $b=M K(\gamma^0 T^0)^2/2B+(\tau^2 MK (\gamma^0 T^0)^3)(2\rho B^2)$, the relation in \eqref{martingale_90} implies that the inequality in \eqref{claim23} is satisfied for the case that $c=(2m \gamma^0 T^0/B)(1-\rho M/2)>1$. Therefore, the result in \eqref{lemma3_claim} holds and we can conclude that \begin{equation}\label{martingale_100_asyn} \E{F(\bbx^t)-F(\bbx^*)}\leq \frac{ C}{t+T^0}, \end{equation} where the constant $C$ is defined as \begin{align}\label{martingale_110_asyn} C= \max \left\{\frac{M K(\gamma^0 T^0)^2/2B+(\tau^2 MK (\gamma^0 T^0)^3)(2\rho B^2)}{(2m \gamma^0 T^0/B)(1-\rho M/2)-1},\ T^0(F(\bbx^0)-F(\bbx^*))\right\}. \end{align} \end{myproof} \section{Accelerated Random Parallel Stochastic Algorithm (ARAPSA)}\label{sec:arapsa} As we mentioned in Section \ref{sec:rapsa}, RAPSA operates on first-order information which may lead to slow convergence in ill-conditioned problems. We introduce Accelerated RAPSA (ARAPSA) as a parallel doubly stochastic algorithm that incorporates second-order information of the objective by separately approximating the function curvature for each block. We do this by implementing the oLBFGS algorithm for different blocks of the variable $\bbx$. For related approaches, see, for instance, \cite{Broyden,Byrd,Dennis,Li}. Define $\hbB_b^t$ as an approximation for the Hessian inverse of the objective function that corresponds to the block $b$ with the corresponding variable $\bbx_b$. If we consider $b_i^t$ as the block that processor $i$ chooses at step $t$, then the update of ARAPSA is defined as multiplication of the descent direction of RAPSA by $\hbB_b^t$, i.e., \begin{equation}\label{ARAPS_update} \bbx^{t+1}_{b} \ = \ \bbx^{t}_{b} - \gamma^t\ \hbB_b^t\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) \qquad b = b_i^t. \end{equation} Subsequently, we define the $\hbd_{b}^t:= \hbB_b^t\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$. We next detail how to properly specify the block approximate Hessian $\hbB_b^t$ so that it behaves in a manner comparable to the true Hessian. To do so, define for each block coordinate $\bbx_b$ at step $t$ the variable variation $\bbv_b^t$ and the stochastic gradient variation $\hbr_b^t$ as \begin{equation}\label{var_grad_var} \bbv_b^t \:=\ \bbx^{t+1}_{b} - \bbx^{t}_{b} , \qquad \hbr_b^t \:=\ \nabla_{\bbx_b} f( \bbx^{t+1}, \bbTheta_i^t) - \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t). \end{equation} Observe that the stochastic gradient variation $\hbr_b^t$ is defined as the difference of stochastic gradients at times $t+1$ and $t$ corresponding to the block $\bbx_b$ for a common set of realizations $\bbTheta_i^t$. The term $ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$ is the same as the stochastic gradient used at time $t$ in \eqref{ARAPS_update}, while $\nabla_{\bbx_b} f( \bbx^{t+1}, \bbTheta_i^t)$ is computed only to determine the stochastic gradient variation $\hbr_b^t$. An alternative and perhaps more natural definition for the stochastic gradient variation is $\nabla_{\bbx_b} f( \bbx^{t+1}, \bbTheta_i^{t+1}) - \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$. However, as pointed out in \cite{schraudolph2007stochastic}, this formulation is insufficient for establishing the convergence of stochastic quasi-Newton methods. We proceed to developing a block-coordinate quasi-Newton method by first noting an important property of the true Hessian, and design our approximate scheme to satisfy this property. The secant condition may be interpreted as stating that the stochastic gradient of a quadratic approximation of the objective function evaluated at the next iteration agrees with the stochastic gradient at the current iteration. We select a Hessian inverse approximation matrix associated with block $\bbx_b$ such that it satisfies the secant condition $\hbB_b^{t+1}\hbr_b^{t}=\bbv_b^{t}$, and thus behaves in a comparable manner to the true block Hessian. \begin{algorithm}[t] \caption{Computation of the ARAPSA step $\hbd_b^t =\hbB_b^{t} \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) $ for block $\bbx_b$.} \label{algo_lbfgs} \begin{algorithmic}[1] \STATE \textbf{function} $\hbd_b^t=\bbq^\tau$ = ARAPSA Step$\left(\hbB_b^{t,0}, \ \bbp^0= \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t), \ \{\bbv_b^{u},\hbr_b^{u}\}_{u=t-\tau}^{t-1}\right)$ \FOR [Loop to compute constants $\alpha^u$ and sequence $\bbp^u$] {$u= 0, 1, \ldots, \tau-1$ } \STATE Compute and store scalar $\alpha^{u}= \hat{\rho}_b^{t-u-1}(\bbv_b^{t-u-1})^{T}\bbp^{u}$ \STATE Update sequence vector $\bbp^{u+1}=\bbp^u-\alpha^{u}\hbr_b^{t-u-1}$. \ENDFOR \STATE Multiply $\bbp^\tau$ by initial matrix: $\bbq^{0}= \hbB_b^{t,0} \bbp^{\tau} $ \FOR [Loop to compute constants $\beta_u$ and sequence $\bbq_u$] {$u= 0, 1, \ldots, \tau-1$} \STATE Compute scalar $\beta^u= \hat{\rho}_b^{t-\tau+u}(\hbr_b^{t-\tau+u})^{T}\bbq^{u}$ \STATE Update sequence vector $\bbq^{u+1}=\bbq^{u}+(\alpha^{\tau-u-1}-\beta^{u})\bbv_b^{t-\tau+u}$ \ENDFOR \ \{return $\hbd_b^t = \bbq^\tau$\} \end{algorithmic}\end{algorithm} The oLBFGS Hessian inverse update rule maintains the secant condition at each iteration by using information of the last $\tau\geq1$ pairs of variable and stochastic gradient variations $\{\bbv_b^u,\hbr_b^{u}\}_{u=t-\tau}^{t-1}$. To state the update rule of oLBFGS for revising the Hessian inverse approximation matrices of the blocks, define a matrix as $\hbB_b^{t,0}:= \eta_b^t\bbI$ for each block $b$ and $t$, where the constant $\eta_b^t$ for $t>0$ is given by \begin{equation}\label{initial_matrix_update} \eta_b^t:= \frac{(\bbv_b^{t-1})^{T}\hbr_b^{t-1}}{\|\hbr_b^{t-1}\|^2}, \end{equation} while the initial value is $\eta_b^t=1$. The matrix $\hbB_b^{t,0}$ is the initial approximate for the Hessian inverse associated with block $\bbx_b$. The approximate matrix $\hbB_b^{t}$ is computed by updating the initial matrix $\hbB_b^{t,0}$ using the last $\tau $ pairs of curvature information $\{\bbv_b^u,\hbr_b^{u}\}_{u=t-\tau}^{t-1}$. We define the approximate Hessian inverse $\hbB_b^{t}=\hbB_b^{t,\tau}$ corresponding to block $\bbx_b$ at step $t$ as the outcome of $\tau$ recursive applications of the update \begin{equation}\label{SLBFGS_update} \hbB_b^{t,u+1} = (\hbZ_b^{t-\tau+u})^T\ \! \hbB_b^{t,u}\ \! (\hbZ_b^{t-\tau+u}) + \hat{ \rho}_b^{t-\tau+u} \ \!(\bbv_b^{t-\tau+u})\ \!(\bbv_b^{t-\tau+u})^{T}, \end{equation} where the matrices $\hbZ_b^{t-\tau+u}$ and the constants $\hat{\rho}_b^{t-\tau+u} $ in \eqref{SLBFGS_update} for $u=0,\dots, \tau-1$ are defined as \begin{equation}\label{Z_rho_definitions} \hat{\rho}_b^{t-\tau+u}\ =\ \frac{1}{(\bbv_b^{t-\tau+u})^{T}\hbr_b^{t-\tau+u}} \quad \text{and}\quad \hbZ_b^{t-\tau+u}\ =\ \bbI - \hat{\rho}_b^{t-\tau+u} \hbr_b^{t-\tau+u} (\bbv_b^{t-\tau+u})^{T}. \end{equation} The block-wise oLBFGS update defined by \eqref{var_grad_var} - \eqref{Z_rho_definitions} is summarized in Algorithm \ref{algo_lbfgs}. The computation cost of $\hbB_b^{t}$ in \eqref{SLBFGS_update} is in the order of $O(p_b^2)$, however, for the update in \eqref{ARAPS_update} the descent direction $\hbd_b^t := \hbB_b^{t} \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) $ is required. \cite{DingNocedal} introduce an efficient implementation of product $\hbB_b^{t} \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$ that requires computation complexity of order $O(\tau p_b)$. We use the same idea for computing the descent direction of ARAPSA for each block -- more details are provided below. Therefore, the computation complexity of updating each block for ARAPSA is in the order of $O(\tau p_b)$, while RAPSA requires $O( p_b)$ operations. On the other hand, ARAPSA accelerates the convergence of RAPSA by incorporating the second order information of the objective function for the block updates, as may be observed in the numerical analyses provided in Section \ref{sec:simulations}. For reference, ARAPSA is also summarized in algorithmic form in Algorithm \ref{algo_ARAPS}. Steps 2 and 3 are devoted to assigning random blocks to the processors. In Step 2 a subset of available blocks $\ccalI^t$ is chosen. These blocks are assigned to different processors in Step 3. In Step 5 processors compute the partial stochastic gradient corresponding to their assigned blocks $\nabla_{\bbx_b}f(\bbx^t,\bbTheta_i^t)$ using the acquired samples in Step 4. Steps 6 and 7 are devoted to the computation of the ARAPSA descent direction $\hbd_{i}^t$. In Step 6 the approximate Hessian inverse $\hbB_{b}^{t,0}$ for block $\bbx_b$ is initialized as $\hbB_b^{t,0}= {\eta_b^{t}}\bbI$ which is a scaled identity matrix using the expression for ${\eta_b^{t}}$ in \eqref{initial_matrix_update} for $t>0$. The initial value of $\eta_b^t$ is $\eta_b^0=1$. In Step 7 we use Algorithm \ref{algo_lbfgs} for efficient computation of the descent direction $\hbd_b^{t}=\hbB_b^t\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$. The descent direction $\hbd_b^{t}$ is used to update the block $\bbx_b^t$ with stepsize $\gamma^t$ in Step 8. Step 9 determines the value of the partial stochastic gradient $ \nabla_{\bbx_b} f( \bbx^{t+1}, \bbTheta_i^t)$ which is required for the computation of stochastic gradient variation $\hbr_b^{t}$. In Step 10 the variable variation $\bbv_b^{t}$ and stochastic gradient variation $\hbr_b^{t}$ associated with block $\bbx_b$ are computed to be used in the next iteration. \begin{algorithm}[t] \caption{Accelerated Random Parallel Stochastic Algorithm (ARAPSA)}\label{algo_ARAPS} \begin{algorithmic}[1] {\FOR {$t=0,1,2,\dots$} { \ALOOP {{\bf{in parallel}}, processors $i=1,\dots,I$ execute:} \STATE Select block $b_i^t$ uniformly at random from set of blocks $\{1,\dots,B\}$ \STATE Choose a set of realizations $\bbTheta_i^t$ for the block $\bbx_b$ \STATE Compute stochastic gradient : $\displaystyle{ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)=\frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t}\nabla_{\bbx_b} f( \bbx^{t}, \bbtheta) }$ [cf. \eqref{block_sto_grad}] \STATE Compute the initial Hessian inverse approximation: $\displaystyle{\hbB_b^{t,0}=\eta_b^t \bbI}$ \STATE Compute descent direction: $\displaystyle{\hbd_{b}^t = \text{ARAPSA Step}\left(\hbB_b^{t,0}, \ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) , \ \{\bbv_b^{u},\hbr_b^{u}\}_{u=t-\tau}^{t-1}\right)}$ \STATE Update the coordinates of the decision variable $\displaystyle{ \bbx^{t+1}_{b} \ = \ \bbx^{t}_{b} - \gamma^t\ \hbd_{b}^t }$ \STATE Compute {\it updated} stochastic gradient: % $\displaystyle{ \nabla_{\bbx_b} f( \bbx^{t+1}, \bbTheta_i^t)=\frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t}\nabla_{\bbx_b} f( \bbx^{t+1}, \bbtheta) }$ [cf. \eqref{block_sto_grad}] % \STATE Update variations $\displaystyle{\bbv_b^t= \bbx_b^{t+1}-\bbx_b^t}$ and $\displaystyle{\hbr_{i}^t=\nabla_{\bbx_b} f( \bbx^{t+1}, \bbTheta_i^t)-\nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)}$ [ cf.\eqref{var_grad_var}] \end{ALC@loop}\ALC@it\algorithmicendloop {; Transmit updated blocks $i\in\ccalI^t\subset \{1,\dots,B\}$ to shared memory}} \ENDFOR} \end{algorithmic} \end{algorithm} \section{Asynchronous Architectures}\label{sec:asyn} \begin{algorithm}[t] \caption{Asynchronous RAPSA at processor $i$}\label{algo_asyn} \begin{algorithmic}[1] {\WHILE {$t< T$} \STATE {\bf{Processor $i\in \{1,\dots,I\}$ at time index $t$ executes the following steps}}: \INDSTATE Select block $b_i^t$ uniformly at random from set of blocks $\{1,\dots,B\}$ \INDSTATE Choose a set of realizations $\bbTheta_i^t$ for the block $\bbx_b$, $b=b_i^t$ \INDSTATE Compute stochastic gradient : $\displaystyle{ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)=\frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t}\nabla_{\bbx_b} f( \bbx^{t}, \bbtheta) }$ [cf. \eqref{block_sto_grad}] \INDSTATE Update the coordinates of the decision variable $\displaystyle{ \bbx^{t+\tau+1}_{b} \ = \ \bbx^{t+\tau}_{b} - \gamma^{t+\tau}\nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) }$ \STATE {\bf Send updated parameters $\bbx_b^{t+1}$ associated with block $b=b_i^t$ to shared memory} \STATE If another processor is also operating on block $b_i^t$ at time $t$, randomly overwrite \ENDWHILE} \end{algorithmic} \end{algorithm} Up to this point, the RAPSA method dictates that distinct parallel processors select blocks $b_i^t\in \{1,\dots, B\}$ uniformly at random at each time step $t$ as in Figure \ref{fig_diagram}. However, the requirement that each processor operates on a common time index is burdensome for parallel operations on large computing clusters, as it means that nodes must wait for the processor which has the longest computation time at each step before proceeding. Remarkably, we are able to extend the methods developed in Sections \ref{sec:rapsa} and \ref{sec:arapsa} to the case where the parallel processors need not to operate on a common time index (lock-free) and establish that their performance guarantees carry through, so long as the degree of their asynchronicity is bounded in a certain sense. In doing so, we alleviate the computational bottleneck in the parallel architecture, allowing processors to continue processing data as soon as their local task is complete. \subsection{Asynchronous RAPSA}\label{subsec:asynchronous} Consider the case where each node operates asynchronously. In this case, at an instantaneous time index $t$, only one processor executes an update, as all others are assumed to be busy. If two processors complete their prior task concurrently, then they draw the same time index at the next available slot, in which case the tie is broken at random. Suppose processor $i$ selects block $b_i^t\in \{1,\dots, B\}$ at time $t$. Then it grabs the associated component of the decision variable $\bbx_b^t$ and computes the stochastic gradient $ \nabla_{\bbx_b} f( \bbx^{t},\bbTheta_i^{t}) $ associated with the samples $\bbTheta_i^{t}$. This process may take time and during this process other processors may overwrite the variable $\bbx_b$. Consider the case that the process time of computing stochastic gradient or equivalently the descent direction is $\tau$. Thus, when processor $i$ updates the block $b$ using the evaluated stochastic gradient $\nabla_{\bbx_b} f( \bbx^{t},\bbTheta_i^{t}) $, it performs the update \begin{align} \label{eq:block_stochastic_gradient_asyn} \bbx^{t+\tau+1}_{b} = \bbx^{t+\tau}_b - \gamma^{t+\tau} \ \! \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^{t}) \quad \qquad b = b_i^{t} . \end{align} Thus, the descent direction evaluated based on the available information at step $t$ is used to update the variable at time $t+\tau$. Asynchronous RAPSA is summarized in Algorithm \ref{algo_asyn}. Note that the delay comes from asynchronous implementation of the algorithm and the fact that other processors are able to modify the variable $\bbx_b$ during the time that processor $i$ computes its descent direction. We assume the the random time $\tau$ that each processor requires to compute its descent direction is bounded above by a constant $\Delta$, i.e., $\tau \leq \Delta$ -- see Assumption \ref{delay_assumption}. Despite the minimal coordination of the asynchronous random parallel stochastic algorithm in \eqref{eq:block_stochastic_gradient_asyn}, we may establish the same performance guarantees as that of RAPSA in Section \ref{sec:rapsa}. These analytical properties are investigated at length in Section \ref{sec:convergence_analysis}. \begin{remark} One may raise the concern that there could be instances that two processors or more work on a same block. Although, this event is not very likely since $I<<B$, there is a positive chance that it might happen. This is true since the available processor picks the block that it wants to operate on uniformly at random from the set $ \{1,\dots, B\}$. We show that this event does not cause any issues and the algorithm can eventually converge to the optimal argument even if more than one processor work on a specific block at the same time -- see Section \ref{sec:asyn_rapsa_convg}. Functionally, this means that if one block is worked on concurrently by two processors, the memory coordination requires that the result of one of the two processors is written to memory with probability $1/2$. This random overwrite rule applies to the case that three or more processors are operating on the same block as well. In this case, the result of one of the conflicting processors is written to memory with probability $1/C$ where $C$ is the number of conflicting processors. \end{remark} \subsection{Asynchronous ARAPSA} \begin{algorithm}[t] \caption{Asynchronous Accelerated RAPSA at processor $i$}\label{algo_asyn_ARAPS} \begin{algorithmic}[1] {\WHILE {$t< T$} \STATE {\bf Processor $i\in \{1,\dots,I\}$ at time index $t$ executes the following steps}: \INDSTATE Select block $b_i^t$ uniformly at random from set of blocks $\{1,\dots,B\}$ \INDSTATE Choose a set of realizations $\bbTheta_i^t$ for the block $\bbx_b$, $b=b_i^t$ \INDSTATE Compute stochastic gradient : $\displaystyle{ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)=\frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t}\nabla_{\bbx_b} f( \bbx^{t}, \bbtheta) }$ [cf. \eqref{block_sto_grad}] \INDSTATE Compute the initial Hessian inverse approximation: $\displaystyle{\hbB_b^{t,0}=\eta_b^t \bbI}$ \INDSTATE Compute descent direction: $\displaystyle{\hbd_{b}^t = \text{ARAPSA Step}\left(\hbB_b^{t,0}, \ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) , \ \{\bbv_b^{u},\hbr_b^{u}\}_{u=t-\tau}^{t-1}\right)}$ \INDSTATE Update the coordinates of the decision variable $\displaystyle{ \bbx^{t+\tau+1}_{b} \ = \ \bbx^{t+\tau}_{b} - \gamma^{t+\tau}\ \hbd_{b}^t }$ \INDSTATE Compute {\it updated} stochastic gradient: % $\displaystyle{ \nabla_{\bbx_b} f( \bbx^{t+\tau+1}, \bbTheta_i^t)=\frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t}\nabla_{\bbx_b} f( \bbx^{t+\tau+1}, \bbtheta) }$ [cf. \eqref{block_sto_grad}] % \INDSTATE Update variations $\displaystyle{\bbv_b^{t}= \bbx_b^{t+\tau+1}-\bbx_b^t}$ and $\displaystyle{\hbr_{b}^{t}=\nabla_{\bbx_b} f( \bbx^{t+\tau+1}, \bbTheta_i^t)-\nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)}$ [ cf.\eqref{var_grad_var_asyn}] \INDSTATE Overwrite the oldest pairs of $\bbv_b$ and $\hbr_{b}$ in local memory by $\bbv_b^{t}$ and $\hbr_{b}^{t}$, respectively. \STATE {\bf Send updated parameters $\bbx_b^{t+1}$, $\{\bbv_b^u,\hbr_b^u\}_{u=t-\tau}^{t-1}$ to shared memory.} \STATE If another processor is operating on block $b_i^t$, choose to overwrite with probability $1/2$. \ENDWHILE} \end{algorithmic} \end{algorithm} In this section, we study the asynchronous implementation of accelerated RAPSA (ARAPSA). The main difference between the synchronous of implementation ARAPSA in Section \ref{sec:arapsa} and the asynchronous version is in the update of the variable $\bbx_b^t$ corresponding to the block $b$. Consider the case that processor $i$ finishes its previous task at time $t$, chooses the block $b=b_{i}^{t}$, and reads the variable $\bbx_{b}^{t}$. Then, it computes the stochastic gradient $f( \bbx^{t}, \bbTheta_i^{t}) $ using the set of random variables $\bbTheta_{i}^{t}$. Further, processor $i$ computes the descent direction $ \hbB_b^{t}\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^{t}) $ using the last $\tau$ sets of curvature information {$\{\bbv_b^u,\hbr_b^{u}\}_{u=t-\tau}^{t-1}$} as shown in Algorithm 1. If we assume that the required time to compute the descent direction $ \hbB_b^{t}\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^{t}) $ is $\tau'$, processor $i$ updates the variable $\bbx_b^{t+\tau'}$ as \begin{align} \label{eq:block_stochastic_gradient_asyn_arapsa} \bbx^{t+\tau'+1}_{b} = \bbx^{t+\tau'}_b - \gamma^{t+\tau'}\ \! \hbB_b^{t}\ \! \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^{t}) \quad \qquad b = b_i^{t} . \end{align} Note that the update in \eqref{eq:block_stochastic_gradient_asyn_arapsa} is different from the synchronous version in \eqref{ARAPS_update} in the time index of the variable that is updated using the available information at time $t$. In other words, in the synchronous implementation the descent direction $ \hbB_b^{t}\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^{t}) $ is used to update the variable $\bbx_b^t$ with the same time index, while this descent direction is executed to update the variable $\bbx_b^{t+\tau'}$ in asynchronous ARAPSA. Note that the definitions of the variable variation $\bbv_b^t$ and the stochastic gradient variation $\hbr_b^t$ are different in asynchronous setting and they are given by \begin{equation}\label{var_grad_var_asyn} \bbv_b^t \:=\ \bbx^{t+\tau'+1}_{b} - \bbx^{t}_{b} , \qquad \hbr_b^t \:=\ \nabla_{\bbx_b} f( \bbx^{t+\tau'+1}, \bbTheta_i^t) - \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t). \end{equation} This modification comes from the fact that the stochastic gradient $\nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$ is already evaluated for the descent direction in \eqref{eq:block_stochastic_gradient_asyn_arapsa}. Thus, we define the stochastic gradient variation by computing the difference of the stochastic gradient $\nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)$ and the stochastic gradient associated with the same random set $\bbTheta_i^t$ evaluated at the most recent iterate which is $\bbx^{t+\tau'+1}_{b} $. Likewise, the variable variation is redefined as the difference $\bbx^{t+\tau'+1}_{b} - \bbx^{t}_{b} $. The steps of asynchronous ARAPSA are summarized in Algorithm \ref{algo_asyn_ARAPS}. \section{Conclusions}\label{sec_conclusions} We proposed the random parallel stochastic algorithm (RAPSA) proposed as a doubly stochastic approximation algorithm capable of optimization problems associated with learning problems in which both the number of predictive parameters and sample size are huge-scale. RAPSA is doubly stochastic since each processors utilizes a random set of functions to compute the stochastic gradient associated with a randomly chosen sets of variable coordinates. We showed the proposed algorithm converges to the optimal solution sublinearly when the step-size is diminishing. Moreover, linear convergence to a neighborhood of the optimal solution can be achieved using a constant step-size. We further introduced accelerated and asynchronous variants of RAPSA, and presented convergence guarantees for asynchronous RAPSA. A detailed numerical comparison between RAPSA and parallel SGD for learning a linear estimator and a logistic regressor is provided. The numerical results showcase the advantage of RAPSA with respect to parallel SGD. Further empirical results illustrate the advantages of ARAPSA with respect to parallel oL-BFGS, and that implementing the algorithm on a lock-free parallel computing cluster does not substantially degrade empirical performance. \section{Convergence analysis}\label{sec_convergence} Our goal here is to show that as time progresses the sequence of iterates $\bbx^t$ approaches the optimal argument $\bbx^*$. To do so, in addition to the conditions on the weight matrices $\bbW$ and $\tbW$ in Assumption \ref{ass_wight_matrix_conditions}, we assume the instantaneous local functions $f_{n,i}$ have specific properties that we state next. \begin{assumption}\label{ass_intantaneous_hessian_bounds}\normalfont The instantaneous local functions $f_{n,i}(\bbx_n)$ are differentiable and strongly convex with parameter $\mu$. \end{assumption} \begin{assumption}\normalfont\label{ass_bounded_stochastic_gradient_norm} The gradient of instantaneous local functions $\nabla f_{n,i}$ are Lipschitz continuous with parameter $L$. I.e., for all $n\in\{1,\dots,N\}$ and $i\in\{1,\dots,q_n\}$ we can write \begin{equation} \left\|\nabla f_{n,i}(\bba)-\nabla f_{n,i}(\bbb)\right\| \leq L\ \| \bba-\bbb \|\quad\! \bba,\bbb \in \reals^p. \end{equation} \end{assumption} The condition imposed by Assumption \ref{ass_intantaneous_hessian_bounds} implies that the local functions $f_{n}(\bbx_{n})$ and the global cost function $f(\bbx)=\sum_{n=1}^N f_{n}(\bbx_{n})$ are also strongly convex with parameter $\mu$. Likewise, Lipschitz continuity of the local instantaneous gradients considered in Assumption \ref{ass_bounded_stochastic_gradient_norm} enforces Lipschitz continuity of gradients of the local functions $\nabla f_n(\bbx_n)$ and the aggregate function $\nabla f(\bbx)$ -- see, e.g., (Lemma 1 of \cite{mokhtari2015network}). \subsection{Preliminaries} In this section we study some basic properties of the sequences of primal and dual variables generated by the DSA algorithm. In the following lemma, we study the relation of iterates $\bbx^t$ and $\bbv^t$ with the optimal primal $\bbx^*$ and dual $\bbv^*$ arguments. \begin{lemma}\label{lemma_important} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local} and recall the updates of the primal $\bbx^t$ and dual $\bbv^t$ variables in \eqref{DSA_primal_update} and \eqref{DSA_dual_update}, respectively. Further, define the positive semidefinite matrix $\bbU:=(\tbZ-\bbZ)^{1/2}$. If Assumption \ref{ass_wight_matrix_conditions} holds true, then the sequence of primal $\bbx^t$ and dual $\bbv^t$ variables satisfy \begin{align}\label{claim_10} \alpha \left[\hbg^{t} -\nabla f(\bbx^*) \right] =(\bbI+\bbZ-2\tbZ)(\bbx^*-\bbx^{t+1})+\tbZ(\bbx^{t}-\bbx^{t+1}) -\bbU(\bbv^{t+1}-\bbv^*). \end{align} \end{lemma} \begin{proof} Considering the update rule for the dual variable in \eqref{DSA_dual_update} and the definition $\bbU=(\tbZ-\bbZ)^{1/2}$, we can substitute $\bbU\bbv^t$ in \eqref{DSA_primal_update} by $\bbU\bbv^{t+1}-\bbU^2\bbx^{t+1}$. Applying this substitution into the DSA primal update in \eqref{DSA_primal_update} yields \begin{equation}\label{combine_20} \alpha \hbg^{t} = -(\bbI+\bbZ-\tbZ)\bbx^{t+1}+\tbZ\bbx^{t}-\bbU\bbv^{t+1}. \end{equation} By adding and subtracting $\tbZ\bbx^{t+1}$ into the right hand side of \eqref{combine_20} and considering the fact that $(\bbI+\bbZ-2\tbZ)\bbx^{*}=\bb0$ we obtain \begin{equation}\label{combine_30} \alpha \hbg^{t} = (\bbI+\bbZ-2\tbZ)(\bbx^*-\bbx^{t+1})+\tbZ(\bbx^{t}-\bbx^{t+1})-\bbU\bbv^{t+1}. \end{equation} One of the KKT conditions of problem \eqref{constrained_opt_problem} follows that the optimal variables $\bbx^*$ and $\bbv^*$ satisfy $\alpha\nabla f(\bbx^*)+\bbU\bbv^*=\bb0$ or equivalently $-\alpha \nabla f(\bbx^*)=\bbU\bbv^{*}$. Adding this equality to both sides of \eqref{combine_30} follows the claim in \eqref{claim_10}. \end{proof} In the subsequent analyses of convergence of DSA, we need an upper bound for the expected value of squared difference between the stochastic averaging gradient $\hbg^t$ and the gradient of optimal argument $\nabla f(\bbx^*)$ given the observation until step $t$, i.e. $\E{\left\| \hbg^{t} - \nabla f(\bbx^*) \right\|^2 \mid \ccalF^t}$. To establish this upper bound first we define the sequence $p^{t}\in \reals$ as \begin{align}\label{p_definition} p^{t}:= \sum_{n=1}^N \bigg[ \frac{1}{q_n}\sum_{i=1}^{q_n}\left( f_{n,i}(\bby_{n,i}^{t}) - f_{n,i}(\tbx^*) -\nabla f_{n,i}(\tbx^*)^T (\bby_{n,i}^{t}-\tbx^*)\right) \bigg]. \end{align} Notice that based on strong convexity of local instantaneous functions $f_{n,i}$, each term $f_{n,i}(\bby_{n,i}^{t}) - f_{n,i}(\tbx^*) -\nabla f_{n,i}(\tbx^*)^T (\bby_{n,i}^{t}-\tbx^*)$ is positive and as a result the sequence $p^t$ defined in \eqref{p_definition} is always positive. In the following lemma, we use the result in Lemma \ref{lemma_important} to guarantee an upper bound for the expectation $\E{\| \hbg^{t} -\nabla f(\bbx^*) \|^2 \mid \ccalF^t}$ in terms of $p^t$ and the optimality gap $f(\bbx^{t}) - f(\bbx^*) -\nabla f(\bbx^*)^T (\bbx^{t}-\bbx^*)$. \begin{lemma}\label{lemma_gradient_noise_bound} Consider the DSA algorithm in \eqref{eqn_sag_update}-\eqref{initial_DSA_local} and the definition of sequence $p^t$ in \eqref{p_definition}. If Assumptions \ref{ass_wight_matrix_conditions}-\ref{ass_bounded_stochastic_gradient_norm} hold true, then the squared norm of the difference between stochastic averaging gradient $\hbg^{t}$ and the optimal gradient $\nabla f(\bbx^*)$ in expectation is bounded above by \begin{align}\label{claim_gradient_noise} \E{\left\| \hbg^{t} - \nabla f(\bbx^*) \right\|^2 \!\mid\! \ccalF^t} \leq 4Lp^t +2\left(2 L -\mu\right) \left(f(\bbx^{t}) - f(\bbx^*) -\nabla f(\bbx^*)^T (\bbx^{t}-\bbx^*)\right). \end{align} \end{lemma} \begin{proof} See Appendix \ref{apx_lemma_grad_noise_bound}. \end{proof} Observe that as the sequence of iterates $\bbx^t$ approaches the optimal argument $\bbx^*$, all the local auxiliary variables $\bby_{n,i}^t$ converge to $\tbx^*$ which follows convergence of $p^t$ to null. This observation in association with the result in \eqref{claim_gradient_noise} implies that the expected value of the difference between the stochastic averaging gradient $\hbg^{t} $ and the optimal gradient $\nabla f(\bbx^*)$ vanishes as the sequence of iterates $\bbx^t$ approaches the optimal argument $\bbx^*$. \subsection{Convergence} In this section we establish linear convergence of the sequence of iterates $\bbx^t$ generated by DSA to the optimal argument $\bbx^*$. To do so define $0<\gamma $ and $\Gamma<\infty$ as the smallest and largest eigenvalues of positive definite matrix matrix $\tbZ$, respectively. Likewise, define $\gamma'$ as the smallest non-zero eigenvalue of matrix $\tbZ-\bbZ$ and $\Gamma'$ as the largest eigenvalue of matrix $\tbZ-\bbZ$. Further, define vectors $\bbu^{t},\bbu^*\in \reals^{2Np}$ and matrix $\bbG\in \reals^{2Np\times 2Np}$ as \begin{equation}\label{z_G_definitions} \bbu^*:= \begin{bmatrix} \bbx^*\\ \bbv^* \end{bmatrix} , \quad \bbu^t:= \begin{bmatrix} \bbx^t\\ \bbv^t \end{bmatrix} ,\quad \bbG = \begin{bmatrix} \tbZ & \bb0 \\ \bb0 & \bbI \end{bmatrix}. \end{equation} Vector $\bbu^*\in \reals^{2Np}$ concatenates the optimal primal and dual variables and vector $\bbu^t\in \reals^{2Np}$ contains primal and dual iterates at step $t$. Matrix $\bbG\in \reals^{2Np\times 2Np}$ is a block diagonal positive definite matrix that we introduce since instead of tracking the value of $\ell_2$ norm $\|\bbu^{t}-\bbu^{*}\|^2_{2}$ we study the convergence properties of $\bbG$ weighted norm $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}$. Notice that the weighted norm $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}$ is equivalent to $(\bbu^{t}-\bbu^{*})^T\bbG(\bbu^{t}-\bbu^{*})$. Our goal is to show that the sequence $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}$ converges linearly to null. To do this we show linear convergence of a Lyapunov function of the sequence $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}$. The Lyapunov function is defined as $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c p^t$ where $c>0$ is a positive constant. To prove linear convergence of the sequence $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c p^t$ we first show an upper bound for the expected error $\E{\|\bbu^{t+1}-\bbu^{*}\|^2_{\bbG}\mid \ccalF^t}$ in terms of $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}$ and some parameters that capture the optimality gap. \begin{lemma}\label{lemma_lower_bound_for_z_decrement} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local}. Further recall the definitions of $p^t$ in \eqref{p_definition} and $\bbu^t$, $\bbu^*$, and $\bbG$ in \eqref{z_G_definitions}. If Assumptions \ref{ass_wight_matrix_conditions}-\ref{ass_bounded_stochastic_gradient_norm} hold true, then for any positive constants $\eta>0$ we can write \begin{align}\label{claim_z_decrement_prime} \E{\|\bbu^{t+1}-\bbu^*\|_\bbG^2\mid \ccalF^t} &\leq \|\bbu^t-\bbu^*\|_\bbG^2 -2\E{\|\bbx^{t+1}-\bbx^*\|_{\bbI+\bbZ-2\tbZ}^2\mid \ccalF^t} +\frac{\alpha4L}{\eta}p^t \nonumber \\ &\quad -\E{\|\bbx^{t+1}-\bbx^t\|_{\tbZ-2\alpha\eta\bbI}^2\mid \ccalF^t} -\E{\|\bbv^{t+1}-\bbv^t\|^2\mid \ccalF^t}\nonumber\\ & \quad -\left(\frac{4\alpha\mu }{L} - \frac{2\alpha( 2L-\mu)}{\eta} \right) \left( f(\bbx^{t}) - f(\bbx^*) -\nabla f(\bbx^*)^T (\bbx^{t}-\bbx^*)\right). \end{align} \end{lemma} \begin{proof} See Appendix \ref{apx_lemma_lower_bound_for_z_decrement}. \end{proof} Lemma \ref{lemma_lower_bound_for_z_decrement} shows an upper bound for the squared norm $\|\bbu^{t+1}-\bbu^{*}\|^2_{\bbG}$ which is the first part of the Lyapunov function $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c p^t$ at step $t+1$. Likewise, we provide an upper bound for the second term of the Lyapunov function at time $t+1$ which is $p^{t+1}$ in terms of $p^{t}$ and some parameters that capture optimality gap. This bound is studied in the following lemma. \begin{lemma}\label{lemma_p_decrement_2} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local} and the definition of $p^t$ in \eqref{p_definition}. Further, define $q_{\min}$ and $q_{\max}$ as the smallest and largest values for the number of instantaneous functions at a node, respectively. If Assumptions \ref{ass_wight_matrix_conditions}-\ref{ass_bounded_stochastic_gradient_norm} hold true, then for all $t>0$ the sequence $p^t$ satisfies \begin{align}\label{lemma_p_decrement_claim} \E{ p^{t+1} \mid \ccalF^t} \leq \left[1-\frac{1}{q_{\max}}\right]p^t+\frac{1}{q_{\min}}\left[ f(\bbx^t)-f(\bbx^*) -\nabla f(\bbx^*)^T (\bbx^{t}-\bbx^*) \right]. \end{align} \end{lemma} \begin{proof} See Appendix \ref{apx_lemma_p_decrement_2}. \end{proof} Lemma \ref{lemma_p_decrement_2} provides an upper bound for $p^{t+1}$ in terms of its previous value $p^{t}$ and the optimality error $f(\bbx^t)-f(\bbx^*) -\nabla f(\bbx^*)^T (\bbx^{t}-\bbx^*) $. Combining the results in Lemmata \ref{lemma_lower_bound_for_z_decrement} and \ref{lemma_p_decrement_2} we can show that in expectation the Lyapunov function $\| \bbu^{t+1}-\bbu^*\|_\bbG^2+c\ p^{t+1}$ at step $t+1$ is strictly smaller than its previous value $\| \bbu^{t}-\bbu^*\|_\bbG^2+c\ p^t$ at step $t$. \begin{theorem}\label{lin_convg_thm} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local}. Further recall the definition of the sequence $p^t$ in \eqref{p_definition}. Define $\eta$ as an arbitrary positive constant chosen from the interval \begin{equation}\label{eta_condition} \eta\in\left( \frac{L^2q_{\max}}{\mu q_{\min} }+\frac{L^2}{\mu}-L\ , \ \infty \right). \end{equation} If Assumptions \ref{ass_wight_matrix_conditions}-\ref{ass_bounded_stochastic_gradient_norm} hold true and the stepsize $\alpha$ is chosen from the interval $\alpha \in \left( 0, {\gamma}/{2\eta}\right)$, then for arbitrary $c$ chosen from the interval \begin{equation}\label{c_condition} c\in \left( \frac{4\alpha L q_{\max}}{\eta}\ , \ \frac{4\alpha \mu q_{\min}}{L}-\frac{2\alpha q_{\min}(2L-\mu)}{\eta} \right), \end{equation} there exits a positive constant $0<\delta<1$ such that \begin{equation}\label{linear_convg_claim} \E{\|\bbu^{t+1}-\bbu^{*}\|^2_{\bbG}+c\ \! p^{t+1} \mid \ccalF^t}\leq (1-\delta)\left(\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^t\right). \end{equation} \end{theorem} \begin{proof} See Appendix \ref{apx_lin_convg_thm}. \end{proof} We point out that the linear convergence constant $\delta$ in \eqref{linear_convg_claim} is explicitly available -- see \eqref{linear_convg_70} in Appendix \ref{apx_lin_convg_thm}. It is a function of the strong convexity parameter $\mu$, the Lipschitz continuity constant $L$, lower and upper bounds on the eigenvalues of the matrices $\tbZ$, $\tbZ-\bbZ$, and $\bbI+\bbZ-2\tbZ$, the smallest $q_{\min}$ and largest $q_{\max}$ values for the number of instantaneous functions available at a node, and the stepsize $\alpha$. Insight on the dependence of $\delta$ with problem parameters is offered in Section \ref{sec_convergence_constant}. The inequality in \eqref{linear_convg_claim} shows that the expected value of the sequence $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^t$ at time $t+1$ given the observation until step $t$ is strictly smaller than the previous iterate at step $t$. Computing the expected value with respect to the initial sigma field $\E{.\mid \ccalF^0}=\E{.}$ implies that in expectation the sequence $\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^t$ converges linearly to null, i.e., \begin{equation}\label{best_result} \E{\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^{t}}\leq (1-\delta)^{t} \left(\|\bbu^{0}-\bbu^{*}\|^2_{\bbG}+c\ \! p^0\right). \end{equation} We use the result in \eqref{best_result} to establish linear convergence of the sequence of squared norm error $\|\bbx^t-\bbx^*\|^2$ in expectation. \begin{corollary}\label{corollary_lin_convg} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local} and recall $\gamma$ is the minimum eigenvalue of the positive definite matrix $\tbZ$. If the hypothesis of Theorem \ref{lin_convg_thm} holds, then there exits a positive constant $0<\delta<1$ such that \begin{equation}\label{best222} \E{\|\bbx^{t}-\bbx^{*}\|^2}\leq (1-\delta)^{t} \frac{\left(\|\bbu^{0}-\bbu^{*}\|^2_{\bbG}+c\ \! p^0\right).}{\gamma} \end{equation} \end{corollary} \begin{proof} First note that according to the definitions of $\bbu$ and $\bbG$ in \eqref{z_G_definitions} and the definition of $p^t$ in \eqref{p_definition} , we can write $\|\bbx^{t}-\bbx^{*}\|_{\tbZ}^2\leq \|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^{t}$. Further, note that the weighted norm $\|\bbx^{t}-\bbx^{*}\|_{\tbZ}^2$ is lower bounded by $\gamma\|\bbx^{t}-\bbx^{*}\|^2$, since $\gamma$ is a lower bound for the eigenvalues of $\tbZ$. Combine these two observations to obtain $\gamma\|\bbx^{t}-\bbx^{*}\|^2\leq \|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^{t}$. This inequality in conjunction with the expression in \eqref{best_result} follows the claim in \eqref{best222}. \end{proof} Corollary \ref{corollary_lin_convg} states that the sequence $\E{\|\bbx^{t}-\bbx^{*}\|^2}$ linearly converges to null. Note that the sequence $\E{\|\bbx^{t}-\bbx^{*}\|^2}$ is not necessarily monotonically decreasing as the sequence $\E{\|\bbu^{t}-\bbu^{*}\|^2_{\bbG}+c\ \! p^t}$ is. The result in \eqref{best222} shows linear convergence of the sequence of variables generated by DSA in expectation. In the following Theorem we show that all local variables $\bbx_n^t$ generated by DSA almost surely converge to the optimal argument of \eqref{opt_problem}. \begin{theorem}\label{a_s_convg} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local} and assume the same hypothesis of Theorem \ref{lin_convg_thm}. Then, the sequences of local variables $\bbx_{n}^t$ for all $n=1,\dots, N$ converge almost surely to the optimal argument $\tbx^*$, i.e., \begin{equation}\label{a_s_convg_claim} \lim_{t \to \infty} \bbx_n^t\ = \ \tbx^* \quad a.s. \qquad \forall\ n=1,\dots, N. \end{equation} Further, the almost sure convergence is at least of order $\ccalO(1/t)$. \end{theorem} \begin{proof} See Appendix \ref{apx_a_s_convg}. \end{proof} Theorem \ref{a_s_convg} provides almost sure convergence of $\bbx^t$ to the optimal solution $\bbx^*$ which is stronger result than convergence in expectation as in Corollary \ref{corollary_lin_convg}, however, the rate of convergence for the almost sure convergence is sublinear $\ccalO(1/t)$ which is slower relative to the linear convergence in expectation provided in \eqref{best222}. \subsection{Convergence constant}\label{sec_convergence_constant} The constant $\delta$ that controls the speed of convergence can be simplified by selecting specific values for $\eta$, $\alpha$, and $c$. This uncovers connections to the properties of the local objective functions and the network topology. To make this clearer define the condition numbers of the objective function and the graph as \begin{equation}\label{condition_numbers} \kappa_f=\frac{L}{\mu}, \qquad \kappa_g=\frac{\max\{\Gamma,\Gamma'\}}{\min\{\gamma,\gamma'\}}, \end{equation} respectively. The condition number of the function is a measure of how difficult it is to minimize the local functions using gradient descent directions. The condition number of the graph is a measure of how slow the graph is in propagating a diffusion process. Both are known to control the speed of convergence of distributed optimization methods. The following corollary illustrates that these condition numbers also determine the convergence speed of DSA. \begin{corollary}\label{corollary_lin_convg_constant} Consider the DSA algorithm as defined in \eqref{eqn_sag_update}-\eqref{initial_DSA_local} and assume the same hypothesis of Theorem \ref{lin_convg_thm}. Choose the weight matrices $\bbW$ and $\tbW$ as $\tbW=(\bbI+\bbW)/2$, assign the same number of instantaneous local functions $f_{n,i}$ to each node, i.e., $q_{\min}=q_{\max}=q$, and set the constants $\eta$, $\alpha$ and $c$ as \begin{equation}\label{constants} \eta=\frac{2L^2}{\mu}, \quad \alpha=\frac{\gamma\mu}{8L^2},\quad c=\frac{q\gamma \mu^2}{4L^3}\left( 1+\frac{\mu}{4L} \right). \end{equation} The linear convergence constant $0<\delta<1$ in \eqref{linear_convg_claim} reduces to \begin{equation}\label{something} \delta = \min \Bigg[\frac{1}{ 16\kappa_g^2}, \ \frac{1}{q[1+4\kappa_f(1+\gamma/\gamma')]},\ \frac{1}{ 4(\gamma/\gamma')\kappa_f+32\kappa_g\kappa_f^4 } \Bigg]. \end{equation} \end{corollary} \begin{proof} The given values for $\eta$, $\alpha$, and $c$ satisfy the conditions in Theorem \ref{lin_convg_thm}. Substitute then these values into the expression for $\delta$ in \eqref{linear_convg_70}. Simplify terms and utilize the condition number definitions in \eqref{condition_numbers}. The second term in the minimization in \eqref{linear_convg_70} becomes redundant because it is dominated by the first. \end{proof} Observe that while the choices of $\eta$, $\alpha$, and $c$ in \eqref{constants} satisfy all the required conditions of Theorem \ref{lin_convg_thm}, they are not necessarily optimal for maximizing the linear convergence constant $\delta$. Nevertheless, the expression in \eqref{something} shows that the convergence speed of DSA decreases with increases in the graph condition number $\kappa_g$, the local functions condition number $\kappa_f$, and the number of functions assigned to each node $q$. For a cleaner expression observe that both, $\gamma$ and $\gamma'$ are the minimum eigenvalues of the weight matrix $\bbW$ and the weight matrix difference $\tbW-\bbW$. They can therefore be chosen to be of similar order. For reference, say that we choose $\gamma=\gamma'$ so that the ratio $\gamma/\gamma'=1$. In that case, the constant $\delta$ in \eqref{something} reduces to \begin{equation}\label{approx_constant} \delta = \min \Bigg[ \frac{1}{16 \kappa_g^2},\ \frac{1}{q(1+8\kappa_f)},\ \frac{1}{4(\kappa_f+8\kappa_f^4\kappa_g)} \Bigg]. \end{equation} The three terms in \eqref{approx_constant} establish separate regimes, problems where the graph condition number is large, problems where the number of functions at each node is large, and problems where the condition number of the local functions are large. In the first regime the first term in \eqref{approx_constant} dominates and establishes a dependence in terms of the square of the graph's condition number. In the second regime the middle term dominates and results in an inverse dependence with the number of functions available at each node. In the third regime, the third term dominates. The dependence in this case is inversely proportional to $\kappa_f^4$. \section{Convergence Analysis}\label{sec:convergence_analysis} We show in this section that the sequence of objective function values $F(\bbx^t)$ generated by RAPSA approaches the optimal objective function value $F(\bbx^{*})$. We further show that the convergence guarantees for synchronous RAPSA generalize to the asynchronous setting. In establishing this result we define the set $\ccalS^t$ corresponding to the components of the vector $\bbx$ associated with the blocks selected at step $t$ defined by indexing set $\ccalI^t \subset \{1,\dots,B\}$. Note that components of the set $\ccalS^t$ are chosen uniformly at random from the set of blocks $\{\bbx_1,\dots,\bbx_B\}$. With this definition, due to convenience for analyzing the proposed methods, we rewrite the time evolution of the RAPSA iterates (Algorithm \ref{algo_RAPSA}) as \begin{align} \label{eq:block_stochastic_gradient} {\bbx^{t+1}_{i} \ = \ \bbx^{t}_{i} - \gamma^t\ \nabla_{\bbx_i} f( \bbx^{t}, \bbTheta_i^t) \qquad \forall \ \bbx_i\in \ccalS^t,} \end{align} while the rest of the blocks remain unchanged, i.e., $ \bbx^{t+1}_{i}=\bbx^{t}_{i}$ for $\bbx_i\notin \ccalS^t$. Since the number of updated blocks is equal to the number of processors, the ratio of updated blocks is $r:=|\ccalI^t|/B=I/B$. To prove convergence of RAPSA, we require the following assumptions. \begin{assumption}\label{convexity_assumption} The instantaneous objective functions $f(\bbx,\bbtheta)$ are differentiable and the average function $F(\bbx)$ is strongly convex with parameter $m>0$. \end{assumption} \begin{assumption}\label{Lipschitz_assumption} The average objective function gradients $\nabla F(\bbx)$ are Lipschitz continuous with respect to the Euclidian norm with parameter $M$, i.e., for all $\bbx, \hbx \in \reals^p$, it holds that \begin{equation} \| \nabla F(\bbx)-\nabla F(\hbx) \| \ \leq\ M\ \| \bbx- \hbx \|. \end{equation} \end{assumption} \begin{assumption}\normalfont\label{ass_bounded_stochastic_gradient_norm} The second moment of the norm of the stochastic gradient is bounded for all $\bbx$, i.e., there exists a constant $K$ such that for all variables $\bbx$, it holds \begin{equation}\label{ekhtelaf} \mbE_{\bbtheta} \big{[} \|\nabla f( \bbx^t, \bbtheta^t)\|^{2} \given{\bbx^t}\big{]} \leq K. \end{equation} \end{assumption} Notice that Assumption \ref{convexity_assumption} only enforces strong convexity of the average function $F$, while the instantaneous functions $f_i$ may not be even convex. Further, notice that since the instantaneous functions $f_i$ are differentiable the average function $F$ is also differentiable. The Lipschitz continuity of the average function gradients $\nabla F$ is customary in proving objective function convergence for descent algorithms. The restriction imposed by Assumption \ref{ass_bounded_stochastic_gradient_norm} is a standard condition in stochastic approximation literature \citep{robbins1951}, its intent being to limit the variance of the stochastic gradients \citep{Nemirovski}. \subsection{Convergence of RAPSA} We turn our attention to the random parallel stochastic algorithm defined in \eqref{block_sto_grad}-\eqref{eq:block_stochastic_gradient_1} in Section \ref{sec:rapsa}, establishing performances guarantees in both the diminishing and constant algorithm step-size regimes. Our first result comes in the form of a expected descent lemma that relates the expected difference of subsequent iterates to the gradient of the average function. \begin{lemma}\label{exp_wrt_blocks} Consider the random parallel stochastic algorithm defined in \eqref{block_sto_grad}-\eqref{eq:block_stochastic_gradient_1}. Recall the definitions of the set of updated blocks $\ccalI^t$ which are randomly chosen from the total $B$ blocks. Define $\ccalF^t$ as a sigma algebra that measures the history of the system up until time $t$. Then, the expected value of the difference $\bbx^{t+1}-\bbx^{t}$ with respect to the random set $\ccalI^t$ given $\ccalF^t$ is \begin{equation}\label{lemma_RAPS_dec_claim_1} \mathbb{E}_{\ccalI^t}\!\left[{\bbx^{t+1}-\bbx^{t}\mid \ccalF^t}\right] = - r\gamma^t \ \nabla f( \bbx^{t}, \bbTheta^t). \end{equation} Moreover, the expected value of the squared norm $\|\bbx^{t+1}-\bbx^{t}\|^2$ with respect to the random set $\ccalI^t$ given $\ccalF^t$ can be simplified as \begin{equation}\label{lemma_RAPS_dec_claim_2} \mathbb{E}_{\ccalI^t}\!\left[\|{\bbx^{t+1}-\bbx^{t}\|^2\mid \ccalF^t}\right] = {r(\gamma^t)^2 }\ \left\|\nabla f( \bbx^{t}, \bbTheta^t)\right\|^2. \end{equation} \end{lemma} \begin{proof} See Appendix \ref{apx_lemma_exp_wrt_blocks}. \end{proof} Notice that in the regular stochastic gradient descent method the difference of two consecutive iterates $\bbx^{t+1}-\bbx^{t}$ is equal to the stochastic gradient $\nabla f( \bbx^{t}, \bbTheta^t)$ times the stepsize $\gamma^t$. Based on the first result in Lemma \ref{exp_wrt_blocks}, the expected value of stochastic gradients with respect to the random set of blocks $\ccalI^t$ is the same as the one for SGD except that it is multiplied by the fraction of updated blocks $r$. Expression in \eqref{lemma_RAPS_dec_claim_2} shows the same relation for the expected value of the squared difference $\|\bbx^{t+1}-\bbx^{t}\|^2$. These relationships confirm that in expectation RAPSA behaves as SGD which allows us to establish the global convergence of RAPSA. \begin{proposition}\label{martingale_prop} Consider the random parallel stochastic algorithm defined in \eqref{block_sto_grad}-\eqref{eq:block_stochastic_gradient_1}. If Assumptions \ref{convexity_assumption}-\ref{ass_bounded_stochastic_gradient_norm} hold, then the objective function error sequence $F(\bbx^t)-F(\bbx^*)$ satisfies \begin{align}\label{martingale_prop_claim} \mathbb{E}\left[F(\bbx^{t+1})-F(\bbx^*)\mid \ccalF^t\right]\leq \left( 1- {2m r\gamma^t}{} \right)\left( F(\bbx^{t}) -F(\bbx^*)\right)+ \frac{rM K(\gamma^t)^2}{2 }. \end{align} \end{proposition} \begin{proof} See Appendix \ref{apx_martingale_prop}. \end{proof} Proposition \ref{martingale_prop} leads to a supermartingale relationship for the sequence of objective function errors $F(\bbx^t)-F(\bbx^*)$. In the following theorem we show that if the sequence of stepsize satisfies standard stochastic approximation diminishing step-size rules (non-summable and squared summable), the sequence of objective function errors $F(\bbx^t)-F(\bbx^*)$ converges to null almost surely. Considering the strong convexity assumption this result implies almost sure convergence of the sequence $\| \bbx^{t}-\bbx^{*} \|^{2}$ to null. \begin{theorem}\label{RAPSA_convg_thm} Consider the random parallel stochastic algorithm defined in \eqref{block_sto_grad}-\eqref{eq:block_stochastic_gradient_1} (Algorithm \ref{algo_RAPSA}). If Assumptions \ref{convexity_assumption}-\ref{ass_bounded_stochastic_gradient_norm} hold true and the sequence of stepsizes are non-summable $\sum_{t=0}^\infty \gamma^t=\infty$ and square summable $\sum_{t=0}^\infty (\gamma^t)^2<\infty$, then sequence of the variables $\bbx^t$ generated by RAPSA converges almost surely to the optimal argument $\bbx^*$, \begin{equation}\label{rapsa_as_convg} \lim_{t\to \infty} \|\bbx^t-\bbx^*\|^2 \ =\ 0 \qquad \text{a.s.} \end{equation} Moreover, if stepsize is defined as $\gamma^t:=\gamma^0T^0/(t+T^0)$ and the stepsize parameters are chosen such that $2mr \gamma^0 T^0>1$, then the expected average function error $\E{F(\bbx^t)-F(\bbx^*)}$ converges to null at least with a sublinear convergence rate of order $\ccalO(1/t)$, \begin{equation}\label{rapsa_rate} \E{F(\bbx^t)-F(\bbx^*)} \ \leq \ \frac{ C}{t+T^0}, \end{equation} where the constant $C$ is defined as \begin{equation}\label{Constant_C} C= \max\left\{\frac{rMK (\gamma^0 T^0)^2}{4mr\gamma^0 T^0-2},\ T^0(F(\bbx^0)-F(\bbx^*))\right\}. \end{equation} \end{theorem} \begin{proof} See Appendix \ref{apx_RAPSA_convg_thm}. \end{proof} The result in Theorem \ref{RAPSA_convg_thm} shows that when the sequence of stepsize is diminishing as $\gamma^t=\gamma^0T^0/(t+T^0)$, the average objective function value $F(\bbx^t)$ sequence converges to the optimal objective value $F(\bbx^*)$ with probability 1. Further, the rate of convergence in expectation is at least in the order of $\ccalO(1/t)$. \footnote{The expectation on the left hand side of \eqref{rapsa_rate}, and throughout the subsequent convergence rate analysis, is taken with respect to the full algorithm history $\ccalF_0$, which all realizations of both $\bbTheta_t$ and $\ccalI_t$ for all $t\geq 0$.} Diminishing stepsizes are useful when exact convergence is required, however, for the case that we are interested in a specific accuracy $\eps$ the more efficient choice is using a constant stepsize. In the following theorem we study the convergence properties of RAPSA for a constant stepsize $\gamma^t=\gamma$. \begin{theorem}\label{RAPSA_convg_thm_finite} Consider the random parallel stochastic algorithm defined in \eqref{block_sto_grad}-\eqref{eq:block_stochastic_gradient_1} (Algorithm \ref{algo_RAPSA}). If Assumptions \ref{convexity_assumption}-\ref{ass_bounded_stochastic_gradient_norm} hold true and the stepsize is constant $\gamma^t=\gamma$, then a subsequence of the variables $\bbx^t$ generated by RAPSA converges almost surely to a neighborhood of the optimal argument $\bbx^*$ as \begin{equation}\label{rapsa_as_convg_finite} \liminf_{t\to \infty}\ F(\bbx^t)-F(\bbx^*)\ \leq\ \frac{\gamma M K}{4m} \qquad \text{a.s.} \end{equation} Moreover, if the constant stepsize $\gamma$ is chosen such that $2m r\gamma<1$ then the expected average function value error $\E{F(\bbx^t)-F(\bbx^*)}$ converges \textit{linearly} to an error bound as \begin{align}\label{rapsa_rate_finite} \E{F(\bbx^{t})-F(\bbx^*)} &\leq \left( 1- {2m\gamma r}{} \right)^{t}( F(\bbx^{0}) -F(\bbx^*)) + \frac{\gamma M K}{4 m}. \end{align} \end{theorem} \begin{proof} See Appendix \ref{apx_RAPSA_convg_thm_finite}. \end{proof} Notice that according to the result in \eqref{rapsa_rate_finite} there exits a trade-off between accuracy and speed of convergence. Decreasing the constant stepsize $\gamma$ leads to a smaller error bound ${\gamma M K}/{4 m}$ and a more accurate convergence, while the linear convergence constant $\left( 1- {2m\gamma r}{} \right)$ increases and the convergence rate becomes slower. Further, note that the error of convergence ${\gamma M K}/{4 m}$ is independent of the ratio of updated blocks $r$, while the constant of linear convergence $1- {2m\gamma r}$ depends on $r$. Therefore, updating a fraction of the blocks at each iteration decreases the speed of convergence for RAPSA relative to SGD that updates all of the blocks, however, both of the algorithms reach the same accuracy. To achieve accuracy $\eps$ the sum of two terms in the right hand side of \eqref{rapsa_rate_finite} should be smaller than $\eps$. Let's consider $\phi$ as a positive constant that is strictly smaller than $1$, i.e., $0<\phi<1$. Then, we want to have \begin{equation}\label{condition_on_gamma} \frac{\gamma M K}{4 m}\leq \phi \eps , \quad\!\! \left( 1- {2m\gamma r}{} \right)^{t}( F(\bbx^{0}) -F(\bbx^*)) \leq (1-\phi)\eps. \end{equation} Therefore, to satisfy the first condition in \eqref{condition_on_gamma} we set the stepsize as $\gamma=4m\phi\eps/MK$. Apply this substitution into the second inequality in \eqref{condition_on_gamma} and consider the inequality $a+\ln(1-a)<0$ for $0<a<1$, to obtain that \begin{equation}\label{num_ite} t\geq\frac{MK}{8m^2r\phi \eps}\ln\left(\frac{ F(\bbx^{0}) -F(\bbx^*)}{(1-\phi)\eps}\right). \end{equation} The lower bound in \eqref{num_ite} shows the minimum number of required iterations for RAPSA to achieve accuracy $\eps$. \subsection{Convergence of Asynchronous RAPSA}\label{sec:asyn_rapsa_convg} In this section, we study the convergence of Asynchronous RAPSA (Algorithm \ref{algo_asyn}) developed in Section \ref{sec:asyn} and we characterize the effect of delay in the asynchronous implementation. To do so, the following condition on the delay $\tau$ is required. \begin{assumption}\label{delay_assumption} The random variable $\tau$ which is the delay between reading and writing for processors does not exceed the constant $\Delta$, i.e., \begin{equation}\label{delay_bounds} \tau\leq \Delta. \end{equation} \end{assumption} The condition in Assumption \ref{delay_assumption} implies that processors can finish their tasks in a time that is bounded by the constant $\Delta.$ This assumption is typical in the analysis of asynchronous algorithms. To establish the convergence properties of asynchronous RAPSA recall the set $\ccalS^t$ containing the blocks that are updated at step $t$ with associated indices $\ccalI^t \subset \{1,\dots,B\}$. Therefore, the update of asynchronous RAPSA can be written as \begin{align} \label{eq:block_stochastic_gradient_asyn_2} {\bbx^{t+1}_{i} \ = \ \bbx^{t}_{i} - \gamma^t\ \nabla_{\bbx_i} f( \bbx^{t-\tau}, \bbTheta_i^{t-\tau}) \qquad \forall \ \bbx_i\in \ccalS^t,} \end{align} and the rest of the blocks remain unchanged, i.e., $ \bbx^{t+1}_{i}=\bbx^{t}_{i}$ for $\bbx_i\notin \ccalS^t$. Note that the random set $\ccalI^t$ and the associated block set $\ccalS^t$ are chosen at time $t-\tau$ in practice; however, for the sake of analysis we can assume that these sets are chosen at time $t$. In other words, we can assume that at step $t-\tau$ processor $i$ computes the full (for all blocks) stochastic gradient $\nabla f( \bbx^{t-\tau}, \bbTheta_i^{t-\tau})$ and after finishing this task at time $t$, it chooses uniformly at random the block that it wants to update. Thus, the block $\bbx_i$ in \eqref{eq:block_stochastic_gradient_asyn_2} is chosen at step $t$. This new interpretation of the update of asynchronous RAPSA is only important for the convergence analysis of the algorithm and we use it in the proof of following lemma which is similar to the result in Lemma \ref{exp_wrt_blocks} for synchronous RAPSA. \begin{lemma}\label{exp_wrt_blocks_asyn} Consider the asynchronous random parallel stochastic algorithm (Algorithm \ref{algo_asyn}) defined in \eqref{eq:block_stochastic_gradient_asyn}. Recall the definitions of the set of updated blocks $\ccalI^t$ which are randomly chosen from the total $B$ blocks. Define $\ccalF^t$ as a sigma algebra that measures the history of the system up until time $t$. Then, the expected value of the difference $\bbx^{t+1}-\bbx^{t}$ with respect to the random set $\ccalI^{t}$ given $\ccalF^{t}$ is \begin{equation}\label{lemma_RAPS_dec_claim_1_asyn} \mathbb{E}_{\ccalI^t}\!\left[{\bbx^{t+1}-\bbx^{t}\mid \ccalF^{t}}\right] = - \frac{\gamma^t}{B} \ \nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau}). \end{equation} Moreover, the expected value of the squared norm $\|\bbx^{t+1}-\bbx^{t}\|^2$ with respect to the random set $\ccalS^t$ given $\ccalF^t$ satisfies the identity \begin{equation}\label{lemma_RAPS_dec_claim_2_asyn} \mathbb{E}_{\ccalI^t}\!\left[\|{\bbx^{t+1}-\bbx^{t}\|^2\mid \ccalF^{t}}\right] = {\frac{(\gamma^t)^2}{B} }\ \left\|\nabla f( \bbx^{t-\tau}, \bbTheta^{t-\tau})\right\|^2. \end{equation} \end{lemma} \begin{myproof} See Appendex \ref{apx_exp_wrt_blocks_asyn}. \end{myproof} The results in Lemma \ref{exp_wrt_blocks_asyn} is a natural extension of the results in Lemma \ref{exp_wrt_blocks} for the lock-free setting, since in the asynchronous scheme only one of the blocks is updated at each iteration and the ratio $r$ can be simplified as $1/B$. We use the result in Lemma \ref{exp_wrt_blocks_asyn} to characterize the decrement in the expected sub-optimality in the following proposition. \begin{proposition}\label{martingale_prop_asyn} Consider the asynchronous random parallel stochastic algorithm defined in \eqref{eq:block_stochastic_gradient_asyn} (Algorithm \ref{algo_asyn}) . If Assumptions \ref{convexity_assumption}-\ref{ass_bounded_stochastic_gradient_norm} hold, then for any arbitrary $\rho>0$ we can write that the objective function error sequence $F(\bbx^t)-F(\bbx^*)$ satisfies \begin{align}\label{martingale_prop_claim_asyn} &\mathbb{E}\left[F(\bbx^{t+1})-F(\bbx^*)\mid \ccalF^{t-\tau}\right]\nonumber\\ &\quad \leq \left( 1-\frac{2m \gamma^t}{B} \left[1-\frac{\rho M}{2}\right] \right)\mathbb{E}\left[F(\bbx^{t}) -F(\bbx^*)\mid \ccalF^{t-\tau}\right] + \frac{M K(\gamma^t)^2}{2B }+ \frac{\tau^2 MK \gamma^t (\gamma^{t-\tau})^2}{2\rho B^2}. \end{align} \end{proposition} \begin{myproof} See Appendix \ref{apx_RAPSA_convg_thm_finite_asyn}. \end{myproof} We proceed to use the result in Proposition \ref{martingale_prop_asyn} to prove that the sequence of iterates generated by asynchronous RAPSA converges to the optimal argument $\bbx^*$ defined by \eqref{eq:block_stoch_opt}. \begin{theorem}\label{RAPSA_convg_thm_asyn} Consider the asynchronous RAPSA defined in \eqref{eq:block_stochastic_gradient_asyn} (Algorithm \ref{algo_asyn}) . If Assumptions \ref{convexity_assumption}-\ref{ass_bounded_stochastic_gradient_norm} hold true and the sequence of stepsizes are non-summable $\sum_{t=0}^\infty \gamma^t=\infty$ and square summable $\sum_{t=0}^\infty (\gamma^t)^2<\infty$, then sequence of the variables $\bbx^t$ generated by RAPSA converges almost surely to the optimal argument $\bbx^*$, \begin{equation}\label{rapsa_as_convg_asyn} \liminf_{t\to \infty} \|\bbx^t-\bbx^*\|^2 \ =\ 0 \qquad \text{a.s.} \end{equation} Moreover, if stepsize is defined as $\gamma^t:=\gamma^0T^0/(t+T^0)$ and the stepsize parameters are chosen such that $(2m \gamma^0 T^0/B)(1-\rho M/2)>1$, then the expected average function error $\E{F(\bbx^t)-F(\bbx^*)}$ converges to null at least with a sublinear convergence rate of order $\ccalO(1/t)$, \begin{equation}\label{rapsa_rate} \E{F(\bbx^t)-F(\bbx^*)} \ \leq \ \frac{ C}{t+T^0}, \end{equation} where the constant $C$ is defined as \begin{equation}\label{Constant_C2} C= \max \left\{\frac{M K(\gamma^0 T^0)^2/2B+(\tau^2 MK (\gamma^0 T^0)^3)(2\rho B^2)}{(2m \gamma^0 T^0/B)(1-\rho M/2)-1},\ T^0(F(\bbx^0)-F(\bbx^*))\right\}. \end{equation} \end{theorem} \begin{myproof} See Appendix \ref{apx_RAPSA_convg_thm_asyn}. \end{myproof} Theorem \ref{RAPSA_convg_thm_asyn} establishes that the RAPSA algorithm when run on a lock-free computing architecture, still yields convergence to the optimal argument $\bbx^*$ defined by \eqref{eq:block_stoch_opt}. Moreover, the expected objective error sequence converges to null as $\ccalO(1/t)$. These results, which correspond to the diminishing step-size regime, are comparable to the performance guarantees (Theorem \ref{RAPSA_convg_thm}) previously established for RAPSA on a synchronous computing cluster, meaning that the algorithm performance does not degrade significantly when implemented on an asynchronous system. This issue is explored numerically in Section \ref{sec:simulations}. \section{Introduction}\label{sec_Introduction} Learning is often formulated as an optimization problem that finds a vector of parameters $\bbx^*\in\reals^p$ that minimizes the average of a loss function across the elements of a training set. For a precise definition consider a training set with $N$ elements and let $f_{n}:\reals^p\to\reals$ be a convex loss function associated with the $n$-th element of the training set. The optimal parameter vector $\bbx^*\in\reals^p$ is defined as the minimizer of the average cost $F(\bbx) := (1/N)\sum_{n=1}^N f_{n}(\bbx)$, \begin{equation}\label{eq:empirical_min} \bbx^* := \argmin_{\bbx} F(\bbx) := \argmin_{\bbx}\frac{1}{N}\sum_{n=1}^N f_{n}(\bbx). \end{equation} Problems such as support vector machine classification, logistic and linear regression, and matrix completion can be put in the form of problem \eqref{eq:empirical_min}. In this paper, we are interested in large scale problems where both the number of features $p$ and the number of elements $N$ in the training set are very large -- which arise, e.g., in text \citep{Sampson:1990:NLA:104905.104911}, image \citep{mairal2010online}, and genomic \citep{tacsan2014selecting} processing. When $N$ and $p$ are large, the parallel processing architecture in Figure \ref{fig_diagram} becomes of interest. In this architecture, the parameter vector $\bbx$ is divided into $B$ blocks each of which contains $p_b\ll p$ features and a set of $I\ll B$ processors work in parallel on randomly chosen parameter blocks while using a stochastic subset of elements of the training set. In the schematic shown, Processor 1 fetches functions $f_1$ and $f_n$ to operate on block $\bbx_b$ and Processor $i$ fetches functions $f_{n'}$ and $f_{n''}$ to operate on block $\bbx_{b'}$. Other processors select other elements of the training set and other blocks with the majority of blocks remaining unchanged and the majority of functions remaining unused. The blocks chosen for update and the functions fetched for determination of block updates are selected independently at random in subsequent slots. \begin{figure*} \centering\input{diagram.tex} \caption{Random parallel stochastic algorithm (RAPSA). At each iteration, processor $P_i$ picks a random block from the set $\{\bbx_1,\dots,\bbx_B\}$ and a random set of functions from the training set $\{f_1,\dots,f_N\}$. The functions drawn are used to evaluate a stochastic gradient component associated with the chosen block. RAPSA is shown here to converge to the optimal argument $\bbx^*$ of \eqref{eq:empirical_min}.} \label{fig_diagram} \end{figure*} Problems that operate on blocks of the parameter vectors {\it or} subsets of the training set, but not on both, blocks {\it and} subsets, exist. Block coordinate descent (BCD) is the generic name for methods in which the variable space is divided in blocks that are processed separately. Early versions operate by cyclically updating all coordinates at each step \citep{Luo1992,Tseng01convergenceof,xu2014globally}, while more recent parallelized versions of coordinate descent have been developed to accelerate convergence of BCD \citep{richtarik2012parallel,lu2013complexity,nesterov2012efficiency,beck2013convergence}. Closer to the architecture in Figure \ref{fig_diagram}, methods in which subsets of blocks are selected at random have also been proposed \citep{liu2013asynchronous,6612036,nesterov2012efficiency,lu2015complexity}. BCD, serial, parallel, or random, can handle cases where the parameter dimension $p$ is large but requires access to all $N$ training samples at each iteration. Parallel implementations of block coordinate methods have been developed initially in this setting for composite optimization problems \citep{richtarik2012parallel}. A collection of parallel processors update randomly selected blocks concurrently at each step. Several variants that select blocks in order to maximize the descent at each step are proposed in \citep{scherrer2012feature,facchinei2015parallel,shalev2013accelerated}. The aforementioned works require that parallel processors operate on a common time index. In contrast, asynchronous parallel methods, originally proposed in \cite{bertsekas1989parallel}, have been developed to solve optimization problems where processors are \emph{not} required to operate with a common global clock. This work focused on solving a fixed point problem over a separable convex set, but the analysis is more restrictive than standard convexity assumptions. For a standard strongly convex optimization problem, in contrast, \cite{liu2013asynchronous} establish linear convergence to the optimum. All of these works are developed for optimization problems with deterministic objectives. To handle the case where the number of training examples $N$ is very large, methods have been developed to only process a subset of sample points at a time. These methods are known by the generic name of stochastic approximation and rely on the use of stochastic gradients. In plain stochastic gradient descent (SGD), the gradient of the aggregate function is estimated by the gradient of a randomly chosen function $f_n$ \citep{robbins1951}. Since convergence of SGD is slow more often that not, various recent developments have been aimed at accelerating its convergence. These attempts include methodologies to reduce the variance of stochastic gradients \citep{schmidt2013minimizing,johnson2013accelerating,defazio2014saga} and the use of ideas from quasi-Newton optimization to handle difficult curvature profiles \citep{schraudolph2007stochastic,bordes2009sgd,mokhtari2014res,mokhtari2014global}. More pertinent to the work considered here are the use of cyclic block SGD updates \citep{xuyin2014} and the exploitation of sparsity properties of feature vectors to allow for parallel updates \citep{Niu11hogwild:a}. These methods are suitable when the number of elements in the training set $N$ is large but don't allow for parallel feature processing unless parallelism is inherent to the problem's structure. The random parallel stochastic algorithm (RAPSA) proposed in this paper represents the first effort at implementing the architecture in Fig. \ref{fig_diagram} that randomizes over both parameters and sample functions, and may be implemented in parallel. In RAPSA, the functions fetched by a processor are used to compute the stochastic gradient component associated with a randomly chosen block (Section \ref{sec:rapsa}). The processors do not coordinate in either choice except to avoid selection of the same block. Our main technical contribution is to show that RAPSA iterates converge to the optimal classifier $\bbx^*$ when using a sequence of decreasing stepsizes and to a neighborhood of the optimal classifier when using constant stepsizes (Section \ref{sec:convergence_analysis}). In the latter case, we further show that the rate of convergence to this optimality neighborhood is linear in expectation. These results are interesting because only a subset of features are updated per iteration and the functions used to update different blocks are, in general, different. We propose two extensions of RAPSA. Firstly, motivated by the improved performance results of quasi-Newton methods relative to gradient methods in online optimization, we propose an extension of RAPSA which incorporates approximate second-order information of the objective, called Accelerated RAPSA. We also consider an extension of RAPSA in which parallel processors are not required to operate on a common time index, which we call Asynchronous RAPSA. We further show how these extensions yield an accelerated doubly stochastic algorithm for an asynchronous system. We establish that the performance guarantees of RAPSA carry through to asynchronous computing architectures. We then numerically evaluate the proposed methods on a large-scale linear regression problem as well as the MNIST digit recognition problem (Section \ref{sec:simulations}). \section{Decentralized Double stochastic averaging gradient }\label{sec:DSA} Consider a connected network that contains $N$ nodes such that each node $n$ can only communicate with peers in its neighborhood $\ccalN_{n}$. Define $\bbx_n\in \reals^p$ as a local copy of the variable $\bbx$ that is kept at node $n$. In decentralized optimization, agents try to minimize their local functions $f_{n}(\bbx_n)$ while ensuring that their local variables $\bbx_n$ coincide with the variables $\bbx_{m}$ of all neighbors $m \in \ccalN_{n}$ -- which, given that the network is connected, ensures that the variables $\bbx_n$ of all nodes are the same and renders the problem equivalent to \eqref{opt_problem}. DGD is a well known method for decentralized optimization that relies on the introduction of nonnegative weights $w_{ij}\geq0$ that are not null if and only if $m=n$ or if $m\in \mathcal{N}_n$. Letting $t\in\naturals$ be a discrete time index and $\alpha$ a given stepsize, DGD is defined by the recursion \begin{equation}\label{gd_iteration} \bbx_{n}^{t+1} = \sum_{m=1}^{N} w_{nm}\bbx_{m}^{t}-\alpha\nabla f_n({\bbx_{n}^{t}}), \qquad n=1,\ldots,N. \end{equation} Since $w_{nm}=0$ when $m\neq n$ and $m\notin \mathcal{N}_n$, it follows from \eqref{gd_iteration} that node $n$ updates $\bbx_n$ by performing an average over the variables $\bbx_{m}^t$ of its neighbors $m\in \mathcal{N}_n$ and its own $\bbx_{n}^t$, followed by descent through the negative local gradient $-\nabla f_n(\bbx_{n}^t)$. If a constant stepsize is used, DGD iterates $\bbx_{n}^t$ approach a neighborhood of the optimal argument $\tbx^*$ of \eqref{opt_problem} but don't converge exactly. To achieve exact convergence diminishing stepsizes are used but the resulting convergence rate is sublinear (\cite{Nedic2009}). EXTRA is a method that resolves either of these issues by mixing two consecutive DGD iterations with different weight matrices and opposite signs. To be precise, introduce a second set of weights $\tdw_{nm}$ with the same properties as the weights $w_{nm}$ and define EXTRA through the recursion \begin{align}\label{local_extra} \bbx_n^{t+1} = \bbx_n^{t} + \sum_{m=1}^N w_{nm} \bbx_{m}^t - \sum_{m=1}^N \tdw_{nm}\bbx_{m}^{t-1} - \alpha\left [ \nabla f_n(\bbx_n^{t}) -\nabla f_n(\bbx_n^{t-1}) \right] , \quad n=1,\ldots,N. \end{align} Observe that \eqref{local_extra} is well defined for $t>0$. For $t=0$ we utilize the regular DGD iteration in \eqref{gd_iteration}. In the nomenclature of this paper we say that EXTRA performs a decentralized double gradient descent step because it operates in a decentralized manner while utilizing a difference of two gradients as descent direction. Minor modification as it is, the use of this gradient difference in lieu of simple gradients, endows EXTRA with exact linear convergence to the optimal argument $\tbx^*$ under mild assumptions (\cite{Shi2014}). If we recall the definitions of the local functions $f_{n}(\bbx_n)$ and the instantaneous local functions $f_{n,i}(\bbx_n)$ available at node $n$, the implementation of EXTRA requires that each node $n$ computes the {full} gradient of its local objective function $f_n$ at $\bbx_n^t$ as \begin{equation}\label{gradient} \nabla f_{n}(\bbx_n^t) = \frac{1}{q_n} \sum_{{i=1}}^{q_n} \nabla f_{n,{i}}(\bbx_n^t). \end{equation} This is computationally expensive when the number of instantaneous functions $q_n$ is large. To resolve this issue, local stochastic gradients can be substituted for the local objective functions gradients in \eqref{local_extra}. These stochastic gradients approximate the gradient $\nabla f_{n}(\bbx_n)$ of node $n$ by randomly choosing one of the instantaneous functions gradients $\nabla f_{n,i}(\bbx_n)$. If we let $i_n^t\in\{1,\ldots q_n\}$ denote a function index that we choose at time $t$ at node $n$ uniformly at random and independently of the history of the process, then the stochastic gradient is defined as \begin{equation}\label{sto_gradient} \hbs_n(\bbx_n^t):= \nabla f_{n,i_n^{t}}(\bbx_n^t). \end{equation} We can then write a stochastic version of EXTRA by replacing $\nabla f_n(\bbx_n^{t})$ by $\hbs_n(\bbx_n^t)$ and $\nabla f_n(\bbx_n^{t-1})$ by $\hbs_n(\bbx_n^{t-1})$. Such algorithm would have a small computational cost per iteration and, presumably, converge to the optimal argument $\tbx^*$. Here however, we want to design an algorithm with linear convergence rate, and stochastic descent algorithms achieve sublinear rates because of the difference between the stochastic and deterministic descent directions. \begin{figure} \centering \ifcompiletikz \input{figures/average_gradient_update.tex} \else \includegraphics[width=\linewidth]{figures/average_gradient_update.pdf}\fi \caption{Stochastic averaging gradient table at node $n$. At each iteration $t$ a random local instantaneous gradient $\nabla f_{n,i_n^{t}}(\bby_{n,i_{n}^t}^{t})$ is updated by $\nabla f_{n,i_n^{t}}(\bbx_n^{t})$. The rest of the local instantaneous gradients remain unchanged, i.e., $\nabla f_{n,i}(\bby_{n,i}^{t+1})=\nabla f_{n,i}(\bby_{n,i}^{t})$ for $i\neq i_n^t$. This list is used to compute the stochastic averaging gradient in \eqref{local_stochastic_gradient}.} \label{fig_sag} \end{figure} To reduce this noise we propose the use of stochastic averaging gradients instead (\cite{defazio2014saga}). The idea is to maintain a list of gradients of all instantaneous functions in which one randomly chosen element is replaced at each iteration and to use an average of the elements of this list for gradient approximation; see Figure \ref{fig_sag}. Formally, define the variable $\bby_{n,i}\in\reals^{p}$ to represent the iterate value the last time that the instantaneous gradient of function $f_{n,i}$ was evaluated. If we let $i_n^t\in\{1,\ldots, q_n\}$ denote the function index chosen at time $t$ at node $n$, as we did in \eqref{sto_gradient}, the variables $\bby_{n,i}$ are updated recursively as \begin{equation}\label{eqn_sag_update} \bby_{n,i}^{t+1} = \bbx_{n}^t, \quad \text{if\ } i = i_{n}^t, \qquad \bby_{n,i}^{t+1} = \bby_{n,i}^{t}, \quad \text{if\ } i \neq i_{n}^t. \end{equation} With these definitions in hand we can define the stochastic averaging gradient at node $n$ as \begin{align}\label{local_stochastic_gradient} \hbg_{n}^t := \nabla f_{n,i_n^{t}}(\bbx_n^t) -\nabla f_{n,i_n^{t}}(\bby_{n,i_{n}^t}^{t}) +\frac{1}{q_n}\sum_{i=1}^{q_n} \nabla f_{n,i}(\bby_{n,i}^{t}). \end{align} Observe that to implement \eqref{local_stochastic_gradient} the gradients $\nabla f_{n,i}(\bby_{n,i}^{t})$ are stored in the local gradient table shown in Figure \ref{fig_sag}. The DSA algorithm is a variation of EXTRA that substitutes the local gradients $\nabla f_n(\bbx_n^t)$ in \eqref{local_extra} for the local stochastic average gradients $\hbg_{n}^t$ in \eqref{local_stochastic_gradient}, \begin{equation}\label{DSA_local} \bbx_n^{t+1} = \bbx_n^{t} +\sum_{m=1}^N w_{nm} \bbx_{m}^t -\sum_{m=1}^N \tdw_{nm} \bbx_{m}^{t-1} - \alpha\left[\hbg_{n}^t-\hbg_{n}^{t-1}\right]. \end{equation} The DSA initial update is given by applying the same substitution for the update of DGD in \eqref{gd_iteration} as \begin{equation}\label{initial_DSA_local} \bbx_n^{1}=\sum_{m=1}^N w_{nm} \bbx_{m}^0 - \alpha\ \hbg_{n}^0. \end{equation} DSA is summarized in Algorithm \ref{algo_DSA} for $t\geq1$. The DSA update in \eqref{DSA_local} is implemented in Step 9. This step requires access to the local iterates $\bbx_m^t$ of neighboring nodes $m\in \ccalN_{n}$ which are collected in Step 2. Furthermore, implementation of the DSA update also requires access to the stochastic averaging gradients $\hbg_n^{t-1}$ and $\hbg_n^t$. The latter is computed in Step 4 and the former is computed and stored at the same step in the previous iteration. The computation of the stochastic averaging gradients requires the selection of the index $i_{n}^t$. This index is chosen uniformly at random in Step 3. Determination of stochastic averaging gradients also necessitates access and maintenance of the gradients table in Figure \ref{fig_sag}. The $i_n^t$ element of this table is updated in Step 5 by replacing $\nabla f_{n,i_n^t}(\bby_{n,i_{n}^t}^t)$ with $\nabla f_{n,i_n^t}(\bbx_n^t)$, while the other vectors remain unchanged. To implement the first DSA iteration at time $t=0$ we have to perform the update in \eqref{initial_DSA_local} instead of the update in \eqref{DSA_local} as in Step 7. Furhter observe that the auxiliary variables $\bby_{n,i}^0$ are initialized to the initial iterate $\bbx_n^0$. This implies that the initial values of the stored gradients are $\nabla f_{n,i}(\bby_{n,i}^0) = \nabla f_{n,i}(\bbx_n^0)$ -- with a consequently relatively large initialization cost. \begin{algorithm}[tb] \caption{DSA algorithm at node $n$}\label{algo_DSA} \begin{algorithmic}[1] \small{\REQUIRE Vectors $\bbx_{n}^0$. Gradient table initialized with instantaneous gradients $\nabla f_{n,i}(\bby_{n,i}^0)$ with $\bby_{n,i}^0 = \bbx_n^0$. \FOR {$t=0,1,2,\ldots$} \STATE Exchange variable $\bbx_{n}^t$ with neighboring nodes $m\in \ccalN_n$. \STATE Choose $i_{n}^t$ uniformly at random from the set $\{1,\dots,q_{n}\}$. \STATE Compute and store stochastic averaging gradient as per \eqref{local_stochastic_gradient}:\\ $ \displaystyle{\hbg_{n}^t = \nabla f_{n,i_n^{t}}(\bbx_{n}^t) -\nabla f_{n,i_n^{t}}(\bby_{n,i_{n}^t}^{t}) +\frac{1}{q_n} \sum_{i=1}^{q_n} \nabla f_{n,i}(\bby_{n,i}^{t}) .}$ \STATE Store $\nabla f_{n,i_{n}^t}(\bby_{n,i_{n}^t}^{t+1}) = \nabla f_{n,i_{n}^t}(\bbx_{n}^t)$ in $i_{n}^t$ . gradient table position. % \IF{$t=0$} \vspace{-1.5mm} \STATE Update variable $\bbx_{n}^t$ as per \eqref{initial_DSA_local}: $\quad \displaystyle{\bbx_n^{t+1}=\sum_{n=1}^{N}w_{nm}\bbx_n^{t+1}- \alpha \hbg_{n}^t.}$ \vspace{-1.5mm} \ELSE \vspace{-1.5mm} \STATE Update variable $\bbx_{n}^t$ as per \eqref{DSA_local}: $\quad \displaystyle{\bbx_n^{t+1} = \bbx_n^{t} + \sum_{n=1}^{N}w_{nm}\bbx_n^{t} - \sum_{n=1}^{N}\tilde{w}_{nm}\bbx_n^{t-1} - \alpha\left[\hbg_{n}^t-\hbg_{n}^{t-1}\right].}$ \vspace{-1.5mm} \ENDIF \ENDFOR} \end{algorithmic}\end{algorithm} We point out that the weights $w_{nm}$ and $\tdw_{nm}$ can't be arbitrary. If we define weight matrices $\bbW$ and $\tbW$ with elements $w_{nm}$ and $\tdw_{nm}$, respectively, they have to satisfy conditions that we state as an assumption for future reference. \\ \begin{assumption}\label{ass_wight_matrix_conditions} The weight matrices $\bbW$ and $\tbW$ must satisfy the following properties \begin{mylist} \item[(a)] Both are symmetric, $\bbW=\bbW^T$ and $\tbW=\tbW^T$. \label{symmetry} \item[(b)] The null space of $\bbI-\tbW$ includes the span of $\bbone$, i.e., $\text{null}(\bbI-\tbW)\supseteq \text{span}(\bbone)$, the null space of $\bbI-\bbW$ is the span of $\bbone$, i.e., $\text{null}(\bbI-\tbW)= \text{span}(\bbone)$, and the null space of the difference $\tbW-\bbW$ is the span of $\bbone$, i.e., $\text{null}(\tbW-\bbW)=\text{span}(\bbone)$. \label{spectral1} \item[(c)] They satisfy the spectral ordering $ \bbW \preceq \tbW \preceq ({\bbI+\bbW})/{2}$ and the matrix $\tbW$ is positive definite $\bb0\prec\tbW$. \label{spectral2} \end{mylist} \end{assumption} Requiring the matrix $\bbW$ to be symmetric and with specific null space properties is necessary to let all agents converge to the same optimal variable. Analogous properties are necessary in DGD and are not difficult to satisfy. The condition on spectral ordering is specific to EXTRA but is not difficult to satisfy either. {E.g., if we have a matrix $\bbW$ that satisfies all the conditions in Assumption \ref{ass_wight_matrix_conditions}, the weight matrix $\tbW=(\bbI+\bbW)/2$ makes Assumption \ref{ass_wight_matrix_conditions} valid.} We also point that, as written in \eqref{local_stochastic_gradient}, computation of local stochastic averaging gradients $\hbg_n^t$ is costly because it requires evaluation of the sum $\sum_{i=1}^{q_n}\nabla f_{n,i}(\bby_{n,i}^{t})$ at each iteration. This cost can be avoided by updating the sum at each iteration with the recursive formula \begin{align}\label{local_stochastic_gradient_recursive} \sum_{i=1}^{q_n}\nabla f_{n,i}(\bby_{n,i}^{t}) \ =\ \sum_{i=1}^{q_n}\nabla f_{n,i}(\bby_{n,i}^{t-1}) + \nabla f_{n,i_n^{t-1}}(\bbx_n^{t-1}) -\nabla f_{n,i_n^{t-1}}(\bby_{n,i_{n}^{t-1}}^{t-1}) . \end{align} Important properties and interpretations of EXTRA and DSA are presented in the following sections after a pertinent remark. \begin{remark}\label{rmk_unbiased_estimation}\normalfont The local stochastic averaging gradients in \eqref{local_stochastic_gradient} are unbiased estimates of the local gradients $\nabla f_{n}(\bbx_n^t)$. Indeed, if we let $\ccalF_t$ measure the history of the system up until time $t$ we have that the sum in \eqref{local_stochastic_gradient} is deterministic given this sigma-algebra. Thus, the conditional expectation of the stochastic averaging gradient is, \begin{align}\label{expected_value_simplification_intermediate} \E{\hbg_{n}^t\given\ccalF^t} = \mbE\Big[\nabla f_{n,i_n^{t}}(\bbx_n^t)\given\ccalF^t\Big] -\mbE\Big[\nabla f_{n,i_n^{t}}(\bby_{n,i_{n}^t}^{t})\given\ccalF^t\Big] +\frac{1}{q_n}\sum_{i=1}^{q_n} \nabla f_{n,i}(\bby_{n,i}^{t}). \end{align} With the index $i_n^t$ chosen equiprobably from the set $\{1,\ldots, q_n\}$, the expectation of the second term in \eqref{expected_value_simplification_intermediate} is the same as the sum in the last term -- each of the indexes is chosen with probability $1/q_n$. Therefore, these two terms cancel out each other and, since the expectation of the first term in \eqref{expected_value_simplification_intermediate} is simply $\mbE\big[\nabla f_{n,i_n^{t}}(\bbx_n^t)\given\ccalF^t\big] = (1/q_n) \sum_{i=1}^{q_n}\nabla f_{n,i}(\bbx_n^t) =\nabla f_{n}(\bbx_n^t)$, we can simplify \eqref{expected_value_simplification_intermediate} to \begin{align}\label{expected_value_simplification} \E{\hbg_{n}^t\given\ccalF^t} = \nabla f_{n}(\bbx_n^t). \end{align} The expression in \eqref{expected_value_simplification} means, by definition, that $\hbg_{n}^t$ is an unbiased estimate of $\nabla f_{n}(\bbx_n^t)$ when the history $\ccalF^t$ is given. \end{remark} \section{Random Parallel Stochastic Algorithm (RAPSA)}\label{sec:rapsa} We consider a more general formulation of \eqref{eq:empirical_min} in which the number $N$ of functions $f_n$ is not necessarily finite. Introduce then a random variable $\bbtheta \in \bbTheta \subset \reals^q$ that determines the choice of the random smooth convex function $f(\cdot,\bbtheta) : \reals^p \to \reals$. We consider the problem of minimizing the expectation of the random functions $F(\bbx):=\mbE_{\bbtheta}[f(\bbx,\bbtheta)]$, \begin{equation} \label{eq:block_stoch_opt} \bbx^* := \argmin_{\bbx\in \reals^p} F(\bbx) := \argmin_{\bbx\in \reals^p} \mbE_{\bbtheta}\left[{f(\bbx , \bbtheta)}\right]. \end{equation} Problem \eqref{eq:empirical_min} is a particular case of \eqref{eq:block_stoch_opt} in which each of the functions $f_n$ is drawn with probability $1/N$. Observe that when $\bbtheta=(\bbz, \bby)$ with feature vector $\bbz\in\reals^p$ and target variable $\bby\in\reals^q$ or $y\in\{0,1\}$, the formulation in \eqref{eq:block_stoch_opt} encapsulates generic supervised learning problems such as regression or classification, respectively. We refer to $f(\cdot,\bbtheta)$ as instantaneous functions and to $F(\bbx)$ as the average function. RAPSA utilizes $I$ processors to update a random subset of blocks of the variable $\bbx$, with each of the blocks relying on a subset of randomly and independently chosen elements of the training set; see Figure \ref{fig_diagram}. Formally, decompose the variable $\bbx$ into $B$ blocks to write $\bbx=[\bbx_1;\dots;\bbx_B]$, where block $b$ has length $p_b$ so that we have $\bbx_b \in \reals^{p_b}$. At iteration $t$, processor $i$ selects a random index $b_i^t$ for updating and a random subset $\bbTheta_i^t$ of $L$ instantaneous functions. It then uses these instantaneous functions to determine stochastic gradient components for the subset of variables $\bbx_b=\bbx_{b_i^t}$ as an average of the components of the gradients of the functions $f( \bbx^{t}, \bbtheta)$ for $\bbtheta\in\bbTheta_i^t$, \begin{equation}\label{block_sto_grad} \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) = \frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t} \nabla_{\bbx_b} f( \bbx^{t}, \bbtheta), \qquad b = b_i^t. \end{equation} Note that $L$ can be interpreted as the size of mini-batch for gradient approximation. The stochastic gradient block in \eqref{block_sto_grad} is then modulated by a possibly time varying stepsize $\gamma^t$ and used by processor $i$ to update the block $\bbx_b=\bbx_{b_i^t}$ \begin{align} \label{eq:block_stochastic_gradient_1} \bbx^{t+1}_{b} = \bbx^{t}_b - \gamma^t \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) \qquad \qquad b = b_i^t . \end{align} RAPSA is defined by the joint implementation of \eqref{block_sto_grad} and \eqref{eq:block_stochastic_gradient_1} across all $I$ processors, and is summarized in Algorithm \ref{algo_RAPSA}. We would like to emphasize that the number of updated blocks which is equivalent to the number of processors $I$ is not necessary equal to the total number of blocks $B$. In other words, we may update only a subset of coordinates $I/B<1$ at each iteration. We define $r:=I/B$ as the ratio of the updated blocks to the total number of blocks which is smaller than $1$. The selection of blocks is coordinated so that no processors operate in the same block. The selection of elements of the training set is uncoordinated across processors. The fact that at any point in time a random subset of blocks is being updated utilizing a random subset of elements of the training set means that RAPSA requires almost no coordination between processors. The contribution of this paper is to show that this very lean algorithm converges to the optimal argument $\bbx^*$ as we show in Section \ref{sec:convergence_analysis}. \begin{algorithm}[t] \caption{Random Parallel Stochastic Algorithm (RAPSA)}\label{algo_RAPSA} \begin{algorithmic}[1] {\FOR {$t=0,1,2,\dots$} { \ALOOP {{\bf{in parallel}}, processors $i=1,\dots,I$ execute:} \STATE Select block $b_i^t\in\{1,\dots,B\}$ uniformly at random from set of blocks \STATE Choose training subset $\bbTheta_i^t$ for block $\bbx_b$, \STATE Compute stochastic gradient : $\displaystyle{ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t)=\frac{1}{L}\sum_{\bbtheta\in \bbTheta_i^t}\nabla_{\bbx_b} f( \bbx^{t}, \bbtheta), \quad b=b_i^t }$ [cf. \eqref{block_sto_grad}] \STATE Update the coordinates $b_i^t$ of the decision variable $\displaystyle{ \bbx^{t+1}_{b} \ = \ \bbx^{t}_{b} - \gamma^t\ \nabla_{\bbx_b} f( \bbx^{t}, \bbTheta_i^t) }$ \end{ALC@loop}\ALC@it\algorithmicendloop {; Transmit updated blocks $i\in\ccalI^t\subset \{1,\dots,B\}$ to shared memory}} \ENDFOR} \end{algorithmic} \end{algorithm} \subsection{Rate of Convergence} \label{sec:rate}\vspace{-2mm} We complement the convergence result in Theorem \ref{convg} with a characterization of the expected convergence rate that we introduce in the following theorem. \begin{theorem}\label{theo_convergence_rate} Consider the online Limited memory BFGS algorithm as defined by \eqref{eqn_olbfgs_descent}-\eqref{initial_matrix_update_2}. If assumptions \ref{ass_intantaneous_hessian_bounds}, \ref{ass_bounded_stochastic_gradient_norm} and \ref{stepsize_ass} hold true and the step size parameters $\eps_0$ and $T_{0}$ satisfy the inequality \begin{equation}\label{eqn_thm_cvg_rate_10} 2\ \epsilon_{0} T_{0} \delta >1\ , \end{equation} then the optimal objective $F(\bbw^*)$ satisfies \vspace{-2mm} \begin{equation}\label{eqn_thm_cvg_rate_20} \E {F(\bbw_{t})}- F(\bbw^*)\ \leq\ \frac{C_{0}}{T_{0}+t}\ ,\vspace{-2mm} \end{equation} where the constant $C_{0}$ satisfies \vspace{-2mm} \begin{equation}\label{eqn_thm_cvg_rate_30} C_{0} = \max \left\{ \frac{\epsilon_{0}^{2}\ T_{0}^{2} K}{2 \epsilon_{0} T_{0} \delta -1}, T_{0}\ \! (F(\bbw_{0}) -\ F(\bbw^*)) \right\} .\vspace{-2mm} \end{equation} \end{theorem} Theorem \ref{theo_convergence_rate} shows that under specified assumptions, the expected error in terms of the objective value after $t$ oLBFGS iterations is of order $O(1/t)$. This implies that the rate of convergence for oLBFGS is not better than conventional SGD. While the convergence rate doesn't change, improvements in convergence time are marked as we illustrate with the numerical experiments of section \ref{sec_ad_numerical_results}. \section{Numerical analysis} \label{sec:simulations} In this section we study the numerical performance of the doubly stochastic approximation algorithms developed in Sections \ref{sec:rapsa}-\ref{sec:asyn} by first considering a linear regression problem. We then use RAPSA to develop a visual classifier to distinguish between distinct hand-written digits. \subsection{Linear Regression}\label{subsec:lmmse} We consider a setting in which observations $\bbz_n\in\reals^q$ are collected which are noisy linear transformations $\bbz_{n}=\bbH_n \bbx + \bbw_{n}$ of a signal $\bbx\in\reals^p$ which we would like to estimate, and $\bbw \sim \ccalN(0, \sigma^2 I_q)$ is a Gaussian random variable. For a finite set of samples $N$, the optimal $\bbx^*$ is computed as the least squares estimate $\bbx^*:=\argmin_{\bbx\in\reals^p } ({1}/{N})\sum_{n=1}^N \|\bbH_{n}\bbx- \bbz_{n}\|^2$. We run RAPSA on LMMSE estimation problem instances where $q=1$, $p=1024$, and $N=10^4$ samples are given. The observation matrices $\bbH_n \in \reals^{q\times p}$, when stacked over all $n$ (an $N \times p$ matrix), are generated from a matrix normal distribution whose mean is a tri-diagonal matrix. The main diagonal is $2$, while the super and sub-diagonals are all set to $-1/2$. Moreover, the true signal has entries chosen uniformly at random from the fractions $\bbx\in \{1,\dots,p\}/p$. Additionally, the noise variance perturbing the observations is set to $\sigma^2=10^{-2}$. We assume that the number of processors $I=16$ is fixed and each processor is in charge of $1$ block. We consider different number of blocks $B=\{16,32,64,128\}$. Note that when the number of blocks is $B$, there are $p/B=1024/B$ coordinates in each block. \begin{figure}\centering \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {rapsa_linear_regression_empiricalrisk_constant_iter.pdf}\label{subfig:rapsa_linear_constant_a}} \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {rapsa_linear_regression_empiricalrisk_constant_features.pdf}\label{subfig:rapsa_linear_constant_b}} \caption{RAPSA on a linear regression (quadratic minimization) problem with signal dimension $p=1024$ for $N=10^3$ iterations with mini-batch size $L=10$ for different number of blocks $B=\{16,32,64,128\}$ initialized as $10^4 \times \bbone$. We use constant step-size $\gamma^t= \gamma=10^{-2}$. Convergence is in terms of number of iterations is best when the number of blocks updated per iteration is equal to the number of processors ($B=16$, corresponding to parallelized SGD), but comparable across the different cases in terms of number of features processed. This shows that there is no price payed in terms of convergence speed for reducing the computation complexity per iteration.} \label{fig:rapsa_linear_constant} \end{figure} {\bf Results for RAPSA} We first consider the algorithm performance of RAPSA (Algorithm \ref{algo_RAPSA}) when using a constant step-size $\gamma^t=\gamma=10^{-2}$. The size of mini-batch is set as $L=10$ in the subsequent experiments. To determine the advantages of incomplete randomized parallel processing, we vary the number of coordinates updated at each iteration. In the case that $B=16$, $B=32$, $B=64$, and $B=128$, in which case the number of updated coordinates per iteration are $1024$, $512$, $256$, and $128$, respectively. Notice that the case that $B=16$ can be interpreted as parallel SGD, which is mathematically equivalent to Hogwild! \citep{Niu11hogwild:a}, since all the coordinates are updated per iteration, while in other cases $B>16$ only a subset of $1024$ coordinates are updated. Fig. \ref{subfig:rapsa_linear_constant_a} illustrates the convergence path of RAPSA's objective error sequence defined as $F(\bbx^t) - F(\bbx^*)$ with $F(\bbx) = ({1}/{N})\sum_{n=1}^N \|\bbH_{n}\bbx- \bbz_{n}\|^2 $ as compared with the number of iterations $t$. In terms of iteration $t$, we observe that the algorithm performance is best when the number of processors equals the number of blocks, corresponding to parallelized stochastic gradient method. However, comparing algorithm performance over iteration $t$ across varying numbers of blocks updates is unfair. If RAPSA is run on a problem for which $B=32$, then at iteration $t$ it has only processed {\it half} the data that parallel SGD, i.e., $B=16$, has processed by the same iteration. Thus for completeness we also consider the algorithm performance in terms of number of features processed $\tdp_t$ which is given by $\tdp_t=ptI/B$. \begin{figure}\centering \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {rapsa_linear_regression_empiricalrisk_hybrid_iter.pdf}\label{subfig:rapsa_linear_hybrid_a}} \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {rapsa_linear_regression_empiricalrisk_hybrid_features.pdf}\label{subfig:rapsa_linear_hybrid_b}} \caption{RAPSA on a linear regression problem with signal dimension $p=1024$ for $N=10^3$ iterations with mini-batch size $L=1$0 for different number of blocks $B=\{16,32,64,128\}$ using initialization $\bbx_0 = 10^4 \times \bbone$. We use hybrid step-size $\gamma^t= \min(10^{-1.5},10^{-1.5} \tilde{T}_0/t)$ with annealing rate $\tilde{T}_0=400$. Convergence is faster with smaller $B$ which corresponds to the proportion of blocks updated per iteration $r$ closer to $1$ in terms of number of iterations. Contrarily, in terms of number of features processed $B=128$ has the best performance and $B=16$ has the worst performance. This shows that updating less features/coordinates per iterations can lead to faster convergence in terms of number of processed features.} \label{fig:rapsa_linear_hybrid} \end{figure} In Fig. \ref{subfig:rapsa_linear_constant_b}, we display the convergence of the excess mean square error $F(\bbx^t) - F(\bbx^*)$ in terms of number of features processed $\tilde{p}_t$. In doing so, we may clearly observe the advantages of updating fewer features/coordinates per iteration. Specifically, the different algorithms converge in a nearly identical manner, but RAPSA with $I<<B$ may be implemented without any complexity bottleneck in the dimension of the decision variable $p$ (also the dimension of the feature space). We observe a comparable trend when we run RAPSA with a hybrid step-size scheme $\gamma^t= \min(\eps, \eps\tilde{T}_0/t)$ which is a constant $\eps=10^{-1.5}$ for the first $\tilde{T}_0=400$ iterations, after which it diminishes as $O(1/t)$. We again observe in Figure \ref{subfig:rapsa_linear_hybrid_a} that convergence is fastest in terms of excess mean square error versus iteration $t$ when all blocks are updated at each step. However, for this step-size selection, we see that updating fewer blocks per step is \emph{faster} in terms of number of features processed. This result shows that updating fewer coordinates per iteration yields convergence gains in terms of number of features processed. This advantage comes from the advantage of Gauss-Seidel style block selection schemes in block coordinate methods as compared with Jacobi schemes. In particular, it's well understood that for problems settings with specific conditioning, cyclic block updates are superior to parallel schemes, and one may respectively interpret RAPSA as compared to parallel SGD as executing variants of cyclic or parallel block selection schemes. We note that the magnitude of this gain is dependent on the condition number of the Hessian of the expected objective $F(\bbx)$. {\bf Results for Accelerated RAPSA} We now study the benefits of incorporating approximate second-order information about the objective $F(\bbx)$ into the algorithm in the form of ARAPSA (Algorithm \ref{algo_ARAPS}). We first run ARAPSA for the linear regression problem outlined above when using a constant step-size $\gamma^t=\gamma=10^{-2}$ with fixed mini-batch size $L=10$. Moreover, we again vary the number of blocks as $B=16$, $B=32$, $B=64$, and $B=128$, corresponding to updating all, half, one-quarter, and one-eighth of the elements of vector $\bbx$ per iteration, respectively. \begin{figure}\centering \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {arapsa_linear_regression_empiricalrisk_constant_iter.pdf}\label{subfig:arapsa_linear_constant_a}} \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {arapsa_linear_regression_empiricalrisk_constant_features.pdf}\label{subfig:arapsa_linear_constant_b}} \caption{ARAPSA on a linear regression problem with signal dimension $p=1024$ for $N=10^3$ iterations with mini-batch size $L=10$ for different number of blocks $B=\{16,32,64,128\}$. We use constant step-size $\gamma^t= \gamma=10^{-1}$ using initialization $10^4 \times \bbone$. Convergence is comparable across the different cases in terms of number of iterations, but in terms of number of features processed $B=128$ has the best performance and $B=16$ (corresponding to parallelized oL-BFGS) converges slowest. We observe that using fewer coordinates per iterations leads to faster convergence in terms of number of processed elements of $\bbx$.} \label{fig:arapsa_linear_constant} \end{figure} Fig. \ref{subfig:arapsa_linear_constant_a} displays the convergence path of ARAPSA's excess mean-square error $F(\bbx^t) - F(\bbx^*)$ versus the number of iterations $t$. We observe that parallelized oL-BFGS ($I=B$) converges fastest in terms of iteration index $t$. On the contrary, in Figure \ref{subfig:arapsa_linear_constant_b}, we may clearly observe that larger $B$, which corresponds to using \emph{fewer} elements of $\bbx$ per step, converges faster in terms of number of features processed. The Gauss-Seidel effect is more substantial for ARAPSA as compared with RAPSA due to the fact that the $\argmin$ of the instantaneous objective computed in block coordinate descent is better approximated by its second-order Taylor-expansion (ARAPSA, Algorithm \ref{algo_ARAPS}) as compared with its linearization (RAPSA, Algorithm \ref{algo_RAPSA}). \begin{figure}\centering \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$]{ \includegraphics[width=0.48\linewidth,,height=0.28\linewidth] {arapsa_linear_regression_empiricalrisk_hybrid_iter.pdf}\label{subfig:arapsa_linear_hybrid_a}} \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.48\linewidth,height=0.28\linewidth] {arapsa_linear_regression_empiricalrisk_hybrid_features.pdf} \label{subfig:arapsa_linear_hybrid_b}} \caption{ARAPSA on a linear regression problem with signal dimension $p=1024$ for $N=10^4$ iterations with mini-batch size $L=10$ for different number of blocks $B=\{16,32,64,128\}$. We use hybrid step-size $\gamma^t= \min(10^{-1.5},10^{-1.5} \tilde{T}_0/t)$ with annealing rate $\tilde{T}_0=400$. Convergence is comparable across the different cases in terms of number of iterations, but in terms of number of features processed $B=128$ has the best performance and $B=16$ has the worst performance. This shows that updating less features/coordinates per iterations leads to faster convergence in terms of number of processed features.} \label{fig:arapsa_linear_hybrid} \end{figure} We now consider the performance of ARAPSA when a hybrid algorithm step-size is used, i.e. $\gamma^t= \min(10^{-1.5},10^{-1.5} \tilde{T}_0/t)$ with attenuation threshold $\tilde{T}_0=400$. The results of this numerical experiment are given in Figure \ref{fig:arapsa_linear_hybrid}. We observe that the performance gains of ARAPSA as compared to parallelized oL-BFGS apparent in the constant step-size scheme are more substantial in the hybrid setting. That is, in Figure \ref{subfig:arapsa_linear_hybrid_a} we again see that parallelized oL-BFGS is best in terms of iteration index $t$ -- to achieve the benchmark $F(\bbx^t) - F(\bbx^*)\leq 10^{-4}$, the algorithm requires $t=100$, $t=221$, $t=412$, and $t>1000$ iterations for $B=16$, $B=32$, $B=64$, and $B=128$, respectively. However, in terms of $\tilde{p}_t$, the number of elements of $\bbx$ processed, to reach the benchmark $F(\bbx^t) - F(\bbx^*)\leq 0.1$, we require $\tilde{p}_t > 1000$, $\tilde{p}_t=570$, $\tilde{p}_t=281$, and $\tilde{p}_t=203$, respectively, for $B=16$, $B=32$, $B=64$, and $B=128$. {\bf Comparison of RAPSA and ARAPSA} We turn to numerically analyzing the performance of Accelerated RAPSA and RAPSA on the linear estimation problem for the case that parameter vectors $\bbx\in\reals^p$ are $p=500$ dimensional for $N=10^4$ iterations in the constant step-size case $\gamma=10^{-2}$. Both algorithms are initialized as $\bbx_0 = 10^3 \times \bbone$ with mini-batch size $L=10$, and ARAPSA uses the curvature memory level $\tau=10$. The number of processors is fixed again as $I=16$, and the number of blocks is $B=64$, meaning that $r=1/4$ of the elements of $\bbx$ are operated on at each iteration. The results of this numerical evaluation are given in Figure \ref{fig:rapsa_vs_arapsa_linear}. We plot the objective error sequence versus iteration $t$ in Figure \ref{subfig:rapsa_vs_arapsa_linear_a}. Observe that ARAPSA converges to within $10^{-4}$ of the optimum by $t=300$ iterations in terms of $F(\bbx^t) - F(\bbx^*)$, whereas RAPSA, while descending slowly, approaches within $10$ of the optimum by $t= 10^4$ iterations. The performance advantages of ARAPSA as compared to RAPSA are also apparent in Figure \ref{subfig:rapsa_vs_arapsa_linear_b}, which readjusts the results of Figure \ref{subfig:rapsa_vs_arapsa_linear_a} to be in terms of \emph{actual} elapsed time. We see that despite the higher complexity of ARAPSA per iteration, its empirical performance results in extremely fast convergence on linear estimation problems. That is, in about $3$ seconds, the algorithm converges to within $10^{-4}$ of the optimal estimator in terms of objective function evaluation. \begin{figure}\centering \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$]{ \includegraphics[width=0.48\linewidth,,height=0.28\linewidth] {rapsa_vs_arapsa_iterations_linear.pdf}\label{subfig:rapsa_vs_arapsa_linear_a}} \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. clock time (s)]{ \includegraphics[width=0.48\linewidth,,height=0.28\linewidth] {rapsa_vs_arapsa_clocktime_linear.pdf}\label{subfig:rapsa_vs_arapsa_linear_b}} \caption{A numerical comparison of RAPSA and ARAPSA on the linear estimation problem stated at the beginning of Section \ref{subsec:lmmse} for $N=10^4$ iterations with signal dimension $p=500$ with constant step-size $\gamma=10^{-2}$ when there are $I=16$ processors and $B=64$ blocks, meaning that one quarter of the elements of $\bbx$ are updated per iteration. Observe that the rate of convergence for ARAPSA is empirically orders of magnitude higher than RAPSA.} \label{fig:rapsa_vs_arapsa_linear} \end{figure} {\bf Results for Asynchronous RAPSA} We turn to studying the empirical performance of the asynchronous variant of RAPSA (Algorithm \ref{algo_asyn}) proposed in Section \ref{subsec:asynchronous}. The model we use for asynchronicity is modeled after a random delay phenomenon in physical communication systems in which each local server has a distinct clock which is not locked to the others. Each processor's clock begins at time $t_0^i=t_0$ for all processors $i=1,\dots,I$ and selects subsequent times as $t_{k} = t_{k-1} + w_k^i$, where $w_k^i \sim \ccalN(\mu,\sigma^2)$ is a normal random variable with mean $\mu$ and variance $\sigma^2$. The variance in this model effectively controls the amount of variability between the clocks of distinct processors. We run Asynchronous RAPSA for the linear estimation problem when the parameter vector $\bbx$ is $p=500$ dimensional for $N=10^3$ iterations with no mini-batching $L=1$ for both the case that the algorithm step-size is diminishing and constant step-size regimes for the case that the noise distribution perturbing the collected observations has variance $\sigma^2=10^{-2}$, and the observation matrix is as discussed at the outset of Section \ref{subsec:lmmse}. Further, the algorithm is initialized as $\bbx_0 = 10^3\bbone$. We run the algorithm for a few different instantiations of asynchronicity, that is, $w_k^i \sim \ccalN(\mu,\sigma^2)$ with $\mu = 1$ or $\mu = 2$, and $\sigma=.1$ or $\sigma = .3$. The results of this numerical experiment are given in Figure \ref{fig:asyn_rapsa_linear} for both the constant and diminishing step-size schemes. We see that the performance of the asynchronous parallel scheme is comparable across different levels of variability among the local clocks of each processor. In particular, in Figure \ref{subfig:asyn_rapsa_linear_a} which corresponds to the case where the algorithm is run with constant step-size $\gamma=10^{-2}$, we observe comparable performance in terms of the objective function error sequence $F(\bbx^t) - F(\bbx^*)$ with iteration $t$ -- across the varying levels of asynchrony we have $F(\bbx^t) - F(\bbx^*)\leq 10$ by $t=10^3$. This trend may also be observed in the diminishing step-size scheme $\gamma^t=1/t$ which is given in Figure \ref{subfig:asyn_rapsa_linear_b}. That is, the distance to the optimal objective is nearly identical across differing levels of asynchronicity. In both cases, the synchronized algorithm performs better than its asynchronous counterpart. \begin{figure}[t]\centering \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$.]{ \includegraphics[width=0.45\linewidth,height=0.25\linewidth] {rapsa_asynchronous_linear_constant.pdf}\label{subfig:asyn_rapsa_linear_a}} \subfigure[Excess Error $F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$.]{ \includegraphics[width=0.45\linewidth,height=0.25\linewidth] {rapsa_asynchronous_linear_diminishing.pdf}\label{subfig:asyn_rapsa_linear_b}} % \caption{Asynchronous RAPSA (Algorithm \ref{algo_asyn}) on the linear estimation problem in the constant ($\gamma=10^{4}$, left) and diminishing ($\gamma_t=10^6/(t + 250)$, right) step-size schemes with no mini-batching $L=1$ for a binary training subset of size $N=10^3$ with no regularization $\lambda=0$ when the algorithm is initialized as $\bbx_0 =10^3\times\bbone $. Varying the asynchronicity distribution has little effect, but we find that convergence behavior is slower than its synchronized counterpart, as expected.}\label{fig:asyn_rapsa_linear} \end{figure} \subsection{Hand-Written Digit Recognition}\label{subsec:mnist} We now make use of RAPSA for visual classification of written digits. To do so, let $\bbz\in\reals^p$ be a feature vector encoding pixel intensities (elements of the unit interval $[0,1]$ with smaller values being closer to black) of an image and let $y\in \{-1,1\}$ be an indicator variable of whether the image contains the digit $0$ or $8$, in which case the binary indicator is respectively $y=-1$ or $y=1$. We model the task of learning a hand-written digit detector as a logistic regression problem, where one aims to train a classifier $\bbx \in \reals^p$ to determine the relationship between feature vectors $\bbz_n \in \reals^p$ and their associated labels $y_n \in \{-1,1\}$ for $n=1,\dots,N$. The instantaneous function $f_n$ in \eqref{eq:empirical_min} for this setting is the $\lambda$-regularized negative log-likelihood of a generalized linear model of the odds ratio of whether the label is $y_n=1$ or $y_n=-1$. The empirical risk minimization associated with training set $\ccalT=\{(\bbz_n,y_n)\}_{n=1}^N$ is to find $\bbx^*$ as the maximum a posteriori estimate \begin{equation}\label{logistic_regression} \bbx^* := \argmin_{\bbx\in\reals^p} \frac{\lambda}{2}\|\bbx\|^2 + \frac{1}{N}\sum_{n=1}^N \log (1 + \exp({-y_n \bbx^T \bbz_n}))\; , \end{equation} where the regularization term $({\lambda}{/2})\|\bbx\|^2$ encodes a prior belief on the joint distribution of $(\bbz, y)$ and helps to avoid overfitting. We use the MNIST dataset \citep{citeulike:599493}, in which feature vectors $\bbz_n \in \reals^p$ are $p=28^2=784$ pixel images whose values are recorded as intensities, or elements of the unit interval $[0,1]$. Considered here is the subset associated with digits $0$ and $8$, a training set $\ccalT=\{\bbz_n,y_n\}_{n=1}^N$ with $N=1.76\times 10^4$ sample points. \begin{figure}[t]\centering \subfigure[Objective $F(\bbx^t)$ vs. iteration $t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {rapsa_logistic_regression_objective_constant_iterations.pdf}\label{subfig:rapsa_mnist_constant_a}} \subfigure[Objective $F(\bbx^t)$ vs. feature $\tilde{p}_t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {rapsa_logistic_regression_objective_constant_features.pdf}\label{subfig:rapsa_mnist_constant_b}} \subfigure[Test Set Accuracy vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.32\linewidth, height=0.2\linewidth] {rapsa_logistic_regression_accuracy_constant_features.pdf}\label{subfig:rapsa_mnist_constant_c}} % \caption{RAPSA on MNIST data with constant step-size $\gamma^t= \gamma=10^{-.5}$ with no mini-batching $L=1$. Algorithm performance is best in terms of number of iterations $t$ when all blocks are used per step (parallelized SGD), but in terms of number of features processed, the methods perform comparably. Thus RAPSA performs as well as SGD while breaking the complexity bottleneck in $p$, the dimension of decision variable $\bbx$.} \label{fig:rapsa_mnist_constant} \end{figure} \begin{figure}[t]\centering \subfigure[Objective $F(\bbx^t)$ vs. iteration $t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {rapsa_logistic_regression_objective_hybrid_iterations.pdf}\label{subfig:rapsa_mnist_hybrid_a}} \subfigure[Objective $F(\bbx^t)$ vs. feature $\tilde{p}_t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {rapsa_logistic_regression_objective_hybrid_features.pdf}\label{subfig:rapsa_mnist_hybrid_b}} \subfigure[Test Set Accuracy vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.32\linewidth, height=0.2\linewidth] {rapsa_logistic_regression_accuracy_hybrid_features.pdf}\label{subfig:rapsa_mnist_hybrid_c}} % \caption{RAPSA on MNIST data with hybrid step-size $\gamma^t= \min(10^{-3/4},10^{-3/4} \tilde{T}_0/t)$, with $\tilde{T}_0=300$ and no mini-batching $L=1$. As with the constant step-size selection, we observe that updating all blocks per iteration is best in terms of $t$, but in terms of elements of $\bbx$ updated, algorithm performance is nearly identical, meaning that no price is payed for breaking the complexity bottleneck in $p$.} \label{fig:rapsa_mnist_hybrid} \end{figure} {\bf Results for RAPSA} We run RAPSA on this training subset for the cases that $B=16$, $B=32$, $B=64$, and $B=128$, which are associated with updating $p$, $p/2$, $p/4$, and $p/8$ features per iteration. We consider the use of RAPSA with both constant and hybrid step-size selections. In Figure \ref{fig:rapsa_mnist_constant}, we display the results when we select a constant learning rate $\gamma^t=\gamma=10^{-.5}=0.316$. In Figure \ref{subfig:rapsa_mnist_constant_a} we plot the objective $F(\bbx^t)$ versus iteration $t$, and observe that algorithm performance improves with using more elements of $\bbx$ per iteration. That is, using all $p$ coordinates of $\bbx$ achieves superior convergence with respect to iteration $t$. However, as previously noted, iteration index $t$ is an unfair comparator for objective convergence since the four different setting process different number of features per iteration. In Figure \ref{subfig:rapsa_mnist_constant_b}, we instead consider $F(\bbx^t)$ versus the number of coordinates of $\bbx$, denoted as $\tilde{p}_t$, that algorithm performance is comparable across the different selections of $B$. This demonstrates that RAPSA breaks the computational bottleneck in $p$ while suffering no reduction in convergence speed with respect to $\tilde{p}_t$. We consider further the classification accuracy on a test subset of size $\tilde{N}=5.88\times10^3$, the results of which are shown in Fig. \ref{subfig:rapsa_mnist_hybrid_c}. We see that the result for classification accuracy on a test set is consistent with the results for the convergence of the objective function value, and asymptotically reach approximately $98\%$ across the different instances of RAPSA. In Figure \ref{fig:rapsa_mnist_hybrid} we show the result of running RAPSA for this logistic regression problem with hybrid step-size $\gamma^t= \min(10^{-3/4},10^{-3/4} \tilde{T}_0/t)$, with $\tilde{T}_0=300$ and no mini-batching $L=1$. In Fig. \ref{subfig:rapsa_mnist_hybrid_a}, which displays the objective $F(\bbx^t)$ versus iteration $t$, that using full stochastic gradients is better than only updating \emph{some} of the coordinates in terms of the number of iterations $t$. In particular, to reach the objective benchmark $F(\bbx^t) \leq 10^{-1}$, we have to run RAPSA $t=74$, $t=156$, and $t=217$, and $t=631$ iterations, for the cases that $B=16$, $B=32$, $B=64$, and $B=128$. We illustrate the objective $F(\bbx^t)$ vs. feature $\tilde{p}_t$ in Fig. \ref{subfig:rapsa_mnist_hybrid_b}. Here we recover the advantages of randomized incomplete parallel processing: updating fewer blocks per iteration yields comparable algorithm performance. We additionally display the algorithm's achieved test-set accuracy on a test subset of size $\tilde{N}=5.88\times10^3$ in Fig. \ref{subfig:rapsa_mnist_hybrid_c} under the hybrid step-size regime. We again see that after a burn-in period, the classifier achieves the highly accurate asymptotic error rate of between $1-2\%$ across the different instantiations of RAPSA. We note that the test set accuracy achieved by the hybrid scheme is superior to the constant step-size setting. {\bf Results for Accelerated RAPSA} We now run Accelerated RAPSA (Algorithm \ref{algo_ARAPS}) as stated in Section \ref{sec:arapsa} for this problem setting for the entire MNIST binary training subset associated with digits $0$ and $8$, with mini-batch size $L=10$ and the level of curvature information set as $\tau=10$. We further select regularizer $\lambda=1/\sqrt{N}=7.5\times 10^{-3}$, and consider both constant and hybrid step-size regimes. As before, we study the advantages of incomplete randomized parallel processing by varying the number of blocks $B\in \{16, 32, 64,128\}$ on an architecture with a fixed number $|\ccalI_t|=I=16$ of processors. This setup is associated with using all $p$ entries of vector $\bbx$ at each iteration as compared with $1/2$, $1/4$, and $1/8$ of its entries. \begin{figure}[t]\centering \subfigure[Objective $F(\bbx^t)$ vs. iteration $t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {arapsa_logistic_regression_objective_constant_iterations.pdf}\label{subfig:arapsa_mnist_constant_a}} \subfigure[Objective $F(\bbx^t)$ vs. feature $\tilde{p}_t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {arapsa_logistic_regression_objective_constant_features.pdf}\label{subfig:arapsa_mnist_constant_b}} \subfigure[Test Set Accuracy vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.32\linewidth, height=0.2\linewidth] {arapsa_logistic_regression_accuracy_constant_features.pdf}\label{subfig:arapsa_mnist_constant_c}} % \caption{ARAPSA on MNIST data with constant step-size $\gamma^t= \gamma=10^{-2}$ and mini-batch size $L=10$, curvature memory $\tau=10$, and regularizer $\lambda=7.5\times10^{-3}$. Algorithm performance is comparable across different numbers of decision variable coordinates updated per iteration $t$, but in terms of number of features processed, ARAPSA performance best when using the least information per update.}\label{fig:arapsa_mnist_constant} \end{figure} \begin{figure}[t]\centering \subfigure[Objective $F(\bbx^t)$ vs. iteration $t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {arapsa_logistic_regression_objective_hybrid_iterations.pdf}\label{subfig:arapsa_mnist_hybrid_a}} \subfigure[Objective $F(\bbx^t)$ vs. feature $\tilde{p}_t$.]{ \includegraphics[width=0.32\linewidth,height=0.2\linewidth] {arapsa_logistic_regression_objective_hybrid_features.pdf}\label{subfig:arapsa_mnist_hybrid_b}} \subfigure[Test Set Accuracy vs. feature $\tilde{p}_t$]{ \includegraphics[width=0.32\linewidth, height=0.2\linewidth] {arapsa_logistic_regression_accuracy_hybrid_features.pdf}\label{subfig:arapsa_mnist_hybrid_c}} % \caption{ARAPSA on MNIST data with hybrid step-size $\gamma^t= \min(10^{-1},10^{-1} \tilde{T}_0/t)$, with $\tilde{T}_0=500$, mini-batch size $L=10$, curvature memory $\tau=10$, and regularizer $\lambda=7.5\times10^{-3}$. Algorithm performance is comparable across different numbers of decision variable coordinates updated per iteration $t$, but in terms of number of features processed, RAPSA performance best when using the least information per update.}\label{fig:arapsa_mnist_hybrid} \end{figure} Figures \ref{fig:arapsa_mnist_constant} the results of this algorithm run when a constant step-size $\gamma=10^{-2}$ is used. Observe in Figure \ref{subfig:arapsa_mnist_constant_a} that the algorithm achieves convergence across the differing numbers of blocks $B$ in terms of iteration $t$, with faster learning rates achieved with smaller $B$. In particular, to reach the benchmark $F(\bbx^t) \leq 10^{-1}$, we require $t=145$, $t=311$, and $t=701$ iterations for $B=16$, $B=32$, and $B=64$, respectively, whereas the case $B=128$ does not achieve this benchmark by $t=10^3$. This trend is inverted, however, in Figure \ref{subfig:arapsa_mnist_constant_b}, which displays the objective $F(\bbx^t)$ with $\tilde{p}_t$ the number of coordinates of $\bbx$ on which the algorithm operates per step. Observe that using \emph{fewer} entries of $\bbx$ per iteration is better in terms of number of features processed $\tilde{p}_t$. Furthermore, ARAPSA achieves comparable accuracy on a test set of images, approximately near $98\%$ across different selections of $B$, as is displayed in Figure \ref{subfig:arapsa_mnist_constant_c}. We now run Accelerated RAPSA when the learning rate is hand-tuned to optimize performance via a hybrid scheme $\gamma^t= \min(10^{-1},10^{-1} \tilde{T}_0/t)$, with attenuation threshold $\tilde{T}_0=500$. The results of this experiment are given in Figure \ref{fig:arapsa_mnist_hybrid}. In particular, in Figure \ref{subfig:arapsa_mnist_hybrid_a} we plot the objective $F(\bbx^t)$ with iteration $t$ when the number of blocks $B$ is varied. We see that parallelized oL-BFGS ($I=B$ so that $r=1$) performs best in terms of $t$: to achieve the threshold condition $F(\bbx^t) \leq 10^{-1}$, we require $t=278$, $t=522$ iterations for $B=16$ and $B=32$, respectively, whereas the cases $B=64$ and $B=128$ do not achieve this benchmark by $t=10^3$. However, the instance of ARAPSA with the fastest and most accurate convergence uses the \emph{least} coordinates of $\bbx$ when we compare the objective with $\tilde{p}_t$, as may be observed in Figure \ref{subfig:arapsa_mnist_hybrid_b}. This trend is corroborated in Figure \ref{subfig:arapsa_mnist_hybrid_c}, where we observe that ARAPSA with $B=128$ achieves $99\%$ test-set accuracy the fastest, followed by $B=64$, $B=32$, and $B=16$. {\bf Comparison of RAPSA and ARAPSA} We now compare the performance of RAPSA and its accelerated variant on the MNIST digit recognition problem for a binary subset of the training data consisting of $N=10^5$ samples. We run both algorithms on an $I=16$ processor simulated architecture with $B=64$ blocks, such that $r=1/4$ of the elements of $\bbx$ are operated upon at each step. We consider the constant algorithm step-size scheme $\gamma=10^{-2}$ with mini-batch size $L=10$. The results of this online training procedure are given in \eqref{fig:rapsa_vs_arapsa_logistic}, where we plot the objective optimality gap $F(\bbx^t) - F(\bbx^*)$ versus the number of feature vectors processed $tL$ (Figure \ref{subfig:rapsa_vs_arapsa_logistic_a}) and actual elapsed time (Figure \ref{subfig:rapsa_vs_arapsa_logistic_b}). We see ARAPSA achieves superior convergence behavior with respect to RAPSA in terms of number of feature vectors processed: to achieve the benchmark $F(\bbx^t) - F(\bbx^*)\leq 10^{-1}$, ARAPSA requires fewer than $tL=200$ feature vectors, whereas RAPSA requires $tL=4\times10^4 $ feature vectors. This relationship is corroborated in Figure \ref{subfig:rapsa_vs_arapsa_logistic_b}, where we see that within a couple seconds ARAPSA converges to within $10^{-1}$, whereas after $\emph{five}$ times as long, RAPSA does not achieve this benchmark. \begin{figure}\centering \subfigure[$F(\bbx^t) - F(\bbx^*)$ vs. iteration $t$]{ \includegraphics[width=0.48\linewidth,,height=0.28\linewidth] {rapsa_vs_arapsa_iterations_logistic.pdf}\label{subfig:rapsa_vs_arapsa_logistic_a}} \subfigure[$F(\bbx^t) - F(\bbx^*)$ vs. clock time (s)]{ \includegraphics[width=0.48\linewidth,,height=0.28\linewidth] {rapsa_vs_arapsa_clocktime_logistic2.pdf}\label{subfig:rapsa_vs_arapsa_logistic_b}} \caption{A comparison of RAPSA and ARAPSA on the MNIST digit recognition problem for a binary training subset of size $N=10^3$ with mini-batch size $L=10$ in the constant step-size scheme $\gamma=10^{-2}$. The objective optimality gap $F(\bbx^t) - F(\bbx^*)$ is shown with respect to the number of feature vectors processed $tL$ (left) and actual elapsed time (right). While the performance difference between RAPSA and ARAPSA is not as large as in the linear estimation problem, we still observe that ARAPSA substantially accelerates the convergence of RAPSA for a standard machine learning problem.} \label{fig:rapsa_vs_arapsa_logistic} \end{figure} {\bf Results for Asynchronous RAPSA} We now evaluate the empirical performance of the asynchronous variant of RAPSA (Algorithm \ref{algo_asyn}) proposed in Section \ref{subsec:asynchronous} on the logistic regression formulation of the MNIST digit recognition problem. The model we use for asynchronicity is the one outlined in Section \ref{subsec:lmmse}, that is, each local processor has a distinct local clock which is not required coincide with others, begins at time $t_0^i=t_0$ for all processors $i=1,\dots,I$, and then selects subsequent times as $t_{k} = t_{k-1} + w_k^i$. Here $w_k^i \sim \ccalN(\mu,\sigma^2)$ is a normal random variable with mean $\mu$ and variance $\sigma^2$ which controls the amount of variability between the clocks of distinct processors. We run the algorithm with no regularization $\lambda=0$ or mini-batching $L=1$ and initialization $\bbx_0 =\bbone $. The results of this numerical setup are given in Figure \ref{fig:asyn_rapsa_mnist}. We consider the expected risk $F(\bbx^t)$ in both both the constant ($\gamma=10^{-2}$, Figure \ref{subfig:asyn_rapsa_mnist_a}) and diminishing ($\gamma^t=1/t$, Figure \ref{subfig:asyn_rapsa_mnist_b}) algorithm step-size schemes. We see that the level of asynchronicity does not significantly impact the performance in either scheme, and that the convergence guarantees established in Theorem \ref{RAPSA_convg_thm_asyn} hold true in practice. We again observe that the version of RAPSA with synchronized computations converges at a faster rate than Asynchronous RAPSA. \begin{figure}[t]\centering \subfigure[Objective $F(\bbx^t)$ vs. iteration $t$.]{ \includegraphics[width=0.45\linewidth,height=0.25\linewidth] {rapsa_asynchronous_logistic_constant.pdf}\label{subfig:asyn_rapsa_mnist_a}} \subfigure[Objective $F(\bbx^t)$ vs. iteration $t$.]{ \includegraphics[width=0.45\linewidth,height=0.25\linewidth] {rapsa_asynchronous_logistic_diminishing.pdf}\label{subfig:asyn_rapsa_mnist_b}} % \caption{Asynchronous RAPSA on MNIST data in the constant ($\gamma=10^{-2}$, left) and diminishing ($\gamma^t=1/t$, right) step-size schemes with no mini-batching $L=1$ for a binary training subset of size $N=10^3$ with no regularization $\lambda=0$ when the algorithm is initialized as $\bbx_0 =\bbone $. The variability in local processor clocks does not significantly impact performance in both the diminishing and constant step-size settings; however, the synchronous algorithm converges at a faster rate.}\label{fig:asyn_rapsa_mnist} \end{figure}
{'timestamp': '2016-06-17T02:01:38', 'yymm': '1606', 'arxiv_id': '1606.04991', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04991'}
arxiv
\section{Conclusions}\label{Sec:Conclusions} In this work we proposed and analyzed a coding strategy tailored for \gls{harq} protocol and aiming at the increase of the throughput for transmission over block fading channel. Unlike many heuristic coding schemes proposed previously, our goal was to address explicitly the issue of joint coding of many packets into the channel block of predefined length. With such a setup, the challenge is to optimize the coding rates for each packet which we do efficiently assuming existence of a multi-bits feedback channel which transmit the outdated \gls{csi} experienced by the receiver. The throughput of the resulting \gls{xp} is compared to the conventional \gls{irharq} indicating that significant gains can be obtained using the proposed coding strategy. The gains are particularly notable in the range of high throughput, where the conventional \gls{harq} fails to offer any improvement with increasing number of transmission rounds. The proposed encoding scheme may be seen as a method to increase the throughput, or as a mean to diminish the memory requirements at the receiver; the price for the improvements is paid by a more complex joint encoding/decoding. We also proposed an example of a practical implementation based on turbo codes. This example highlights the practical aspects of the proposed coding scheme, where the most important difficulties are i)~the need of tailoring the encoder to provide the jointly coded symbols with the best decoding performance, and ii)~the design of the simple decoder. Moreover, the real challenge is to leverage the possibility of adaptation to the outdated \gls{csi}. To do so, simple techniques for performance evaluation (\eg the \gls{per}) based on the expected \gls{csi}, must be used; such as, for example those studied in \cite{Latif13}. \begin{appendices} \input{./Includes/Appendix_Decoding_ProofMLT.tex} \input{./Includes/Appendix_MDP.tex} \end{appendices} \bibliographystyle{IEEEtran} \section{Decoding conditions of \gls{xp}}\label{Sec:Decoding_Proof} In this appendix, we outline the proof of the decoding conditions \eqref{dec.1} and \eqref{dec.2}, stated in the following \lemref{lemma:DecodingConditions}. We consider an HARQ-code $c \in\mathcal{C}$ Given a sequence length $n\in\mathbb{N}$, an HARQ-code $c \in\mathcal{C}(n,R_1,R_2)$ is a tuple of functions $(C_1,C_2,C_3,C_4)$ defined by { \begin{footnotesize} \begin{eqnarray} &C_1& : \mathcal{M}_1 \longrightarrow \mathcal{X}_1^n,\label{eq:Code1}\\ &C_2& : \mathcal{K}_1 \times \mathcal{Y}_1^n \longrightarrow \{\ack_1,\nack_1 \} \times \mathcal{M}_1, \label{eq:Code2}\\ &C_3&: \mathcal{M}_1\times \mathcal{M}_2 \times \{\ack_1,\nack_1 \} \longrightarrow \mathcal{X}_2^{ n},\label{eq:Code3}\\ &C_4& : \mathcal{Y}_1^n \times \mathcal{Y}_2^n \times \mathcal{K}_1 \times \mathcal{K}_2 \rightarrow \{\ack_2,\nack_2 \} \times \mathcal{M}_1\times \mathcal{M}_2 .\label{eq:Code4} \end{eqnarray} \end{footnotesize} } where, for notation convenience, $\mathcal{X}_k^n, \mathcal{Y}_k^n, \mathcal{M}_k, \mathcal{K}_k$ denote the set of input symbols sequence, the set of possible outputs, the set of messages $\mf{m}_{k}$ and the set of channel states in the $k$th round, respectively. In our case, the channel state is totally characterized by $\SNR_{k}$, thus, $\mathcal{K}_k=\Real_{+}~\forall k$. However, we will use $\mathcal{K}_k$ to keep the generality of the decoding conditions. \begin{lemma}[Decoding conditions]\label{lemma:DecodingConditions} For all $\varepsilon>0$, there exists a $\bar{n}\in \mathbb{N}$ such that for all $n\geq \bar{n}$, there exists a HARQ-code $c^{\star} \in\mathcal{C}(n,R_1,R_2)$ such that for all channel states $k_{1} \in \mathcal{K}_1$ and $k_{2} \in \mathcal{K}_2$ satisfying, \begin{eqnarray} R_1 &\leq& \mf{I}(X_1 ; Y_1 |k_{1}) - 4 \varepsilon , \label{eq:Rate1} \\ R_1 + R_2 &\leq& \mf{I}(X_1 ; Y_1 |k_{1}) + \mf{I}(X_2 ; Y_2 |k_{2}) - 4 \varepsilon, \label{eq:Rate2} \end{eqnarray} the error probability is bounded below $\varepsilon$, \ie \begin{eqnarray} \mathcal{P}\bigg( \Big\{ \mf{m}_1\neq \hat{\mf{m}_1} \Big\} \cup \Big \{ \mf{m}_2\neq \hat{\mf{m}_2} \Big\} \bigg|\;c^{\star}, k_{1}, k_{2} \;\bigg) \leq \varepsilon.\label{eq:DefErrorProbaLz} \end{eqnarray} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma:DecodingConditions}] We consider a random HARQ-code $c \in \mathcal{C}(n,R_1,R_2)$, defined as follows: \begin{itemize} \item[$\bullet$] \textit{Random codebook:} we generate $|\mathcal{M}_1|= 2^{n \cdot R_1 } $ sequences $x_1^n$ and $|\mathcal{M}_1 \times \mathcal{M}_2|= 2^{n \cdot ( R_1 + R_2 )} $ sequences $x_2^n$, drawn from the i.i.d. distribution $\mathcal{P}^{\star}(x)$. The index $n$ is added to emphasize the length of sequence $n$. In our context, $n=\Ns$. \item[$\bullet$] \textit{Encoding function:} as explained in \secref{Sec:joint.codec}, the encoder starts by sending $x_1^n$ which corresponds to the message $\mf{m}_1 \in \mathcal{M}_1$. If the encoder receives a $\nack_1$ message, it sends $x_2^n$ corresponding to the pair of messages $[\mf{m}_1 , \mf{m}_2] \in \mathcal{M}_1 \times \mathcal{M}_2$. Otherwise a new transmission process starts. \item[$\bullet$] \textit{Decoding function:} if the channel states $( k_{1}, k_{2})$ satisfy equations \eqref{eq:Rate1} and \eqref{eq:Rate2}, then the decoder finds a pair of messages $[\mf{m}_1,\mf{m}_2]$ such that the following sequences of symbols are jointly typical: \begin{eqnarray} \Big(x_1^n , y_1^n \Big) &\in& A_{\varepsilon}^{{\star}{n}}\big(\mathcal{Q}(x,y|k_{1})\big), \label{eq:JointTypical1}\\ \Big(x_2^n , y_2^n \Big) &\in& A_{\varepsilon}^{{\star}{n}}\big(\mathcal{Q}(x,y|k_{2})\big) \label{eq:JointTypical2}. \end{eqnarray} For each transmission $l \in \{1,2\}$, the joint probability distribution $\mathcal{Q}(x,y|s_{l}) = \mathcal{P}^{\star}(x) \cdot T(y|x,s_{l})$ is defined with respect to the channel state $k_{l}\in\mathcal{K}_l$. The decoder returns the messages $(m_1,m_2) $. What are $A_{\varepsilon}^{{\star}{n}}\big(\mathcal{Q}(x,y|k_{1})\big), \mathcal{P}^{\star}(x) \text{and} T(y|x,s_{l})$? \item[$\bullet$] \textit{Error} is declared when sequences are not jointly typical. \end{itemize} \begin{figure}[!ht] \begin{center} \psset{xunit=0.7cm,yunit=0.5cm} \begin{pspicture}(-5.3,10.4)(9,17.3) \psellipse(2,16)(3,0.7) \psellipse(2,14)(3,0.7) \psdots(2,12.8)(2,12.5)(2,12.2) \psellipse(2,11)(3,0.7) \psdots(2,16) \rput[u](4,17.3){$x_2\sim \mathcal{P}_{\sf{x}}^{\star \times n } $} \psline[linewidth=1pt]{-}(-2,16)(2,16) \psline[linewidth=1pt]{-}(2,15)(2,16) \rput[u](-2.4,16){$m_1$} \rput[u](2.4,15){$m_2$} \rput[u](-3.5,13.5){$|\mathcal{M}_1 |= 2^{n R_1 } $} \psbrace[linecolor=black,ref=rC](-1,17)(-1,10){} \rput[u](-2.5,17.3){$|\mathcal{M}_1 \times \mathcal{M}_2 | = 2^{n \cdot (R_1 + R_2) } $} \rput[u](6,15){$|\mathcal{M}_2 |= 2^{n R_2 } $} \end{pspicture} \caption{Random generation of the codebook: $x_2$. } \end{center} \label{figure:BinningLeszekCode} \end{figure} \textbf{Error events.} We define the following error events: \begin{scriptsize} \begin{itemize} \item[$\bullet$]$E_0=\bigg\{(x_1^n, y_1^n)\notin A_{\varepsilon}^{{\star}{n}}\big(\mathcal{Q}(x,y|k_{1})\big) \bigg\}$\\ \qquad\qquad $ \qquad \cup \bigg\{(x_2^n, y_2^n)\notin A_{\varepsilon}^{{\star}{n}}\big(\mathcal{Q}(x,y|k_{2})\big) \bigg\}$.\\ \item[$\bullet$]$E_1 =\bigg\{\exists m'_1 \neq m_1,\text{ s.t. } \big( x_1^n(m'_1) , y_1^n\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{1})\big)\bigg\}$.\\ \item[$\bullet$]$E_{2} =\bigg\{\exists (m'_1,m'_2) \neq (m_1,m_2),\text{ s.t. }\Big\{ \big( x_1^n(m'_1) , y^n_1\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{1})\big) \Big\} \cap \Big\{ \big( x_2^n(m'_1,m'_2) , y_2^n\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{2})\big) \Big\} \bigg\}$.\\ \item[$\bullet$]$E_{3} =\bigg\{\exists m'_1\neq m_1,\text{ s.t. }\Big\{ \big( x_1^n(m'_1) , y^n_1\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{1})\big) \Big\} \cap \Big\{ \big( x_2^n(m'_1,m_2) , y_2^n\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{2})\big) \Big\} \bigg\}$.\\ \item[$\bullet$]$E_{4} =\bigg\{\exists m'_2 \neq m_2,\text{ s.t. } \big( x_2^n(m_1,m'_2) , y_2^n\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{2})\big)\bigg\}$.\\ \end{itemize} \end{scriptsize} \textbf{Upper bound on an error event $E_{2}$.} We consider the error event $E_{2} $ and we provide an upper bound on the expected probability, that is valid for all channel states $(k_{1} , k_{2})$ that satisfy equations \eqref{eq:Rate1} and \eqref{eq:Rate2}. \begin{tiny} \begin{eqnarray} && \mathbb{E}_c\bigg[\mathcal{P}\bigg(\exists (m'_1,m'_2) \neq (m_1,m_2),\text{ s.t. }\Big\{ \big( X_1^n(m'_1) , Y^n_1\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{1})\big) \Big\} \nonumber\\ &&\cap \Big\{ \big( X_2^n(m'_1,m'_2) , Y_2^n\big) \in A_{\varepsilon}^{{\star}{n}}\big(Q(x,y|k_{2})\big) \Big\} \bigg)\bigg] \nonumber \\ &\leq& \sum_{(m'_1,m'_2) \atop \neq (m_1,m_2)} \sum_{ (x_1^n, y_1^n) \in \atop A_{\varepsilon}^{\star n}(\mathcal{Q}(x,y|k_{1}))} \mathbb{E}_c\bigg[\mathcal{P}\bigg( \big( X_1^n(m'_1) , Y^n_1\big) = (x_1^n, y_1^n) \bigg)\bigg] \nonumber\\ && \times \sum_{ (x_2^n, y_2^n) \in \atop A_{\varepsilon}^{\star n}(\mathcal{Q}(x,y|k_{2})} \mathbb{E}_c\bigg[\mathcal{P}\bigg( \big( X_2^n(m'_1,m'_2) , Y_2^n\big) = (x_2^n, y_2^n) \bigg)\bigg] \label{eq:ErrorSecond2} \\ &\leq& \sum_{(m'_1,m'_2) \atop \neq (m_1,m_2)} \sum_{ (x_1^n, y_1^n) \in \atop A_{\varepsilon}^{\star n}(\mathcal{Q}(x,y|k_{1}))} \mathbb{E}_c\bigg[\mathcal{P}\bigg( X_1^n(m'_1) = x_1^n \bigg)\bigg] \times \mathbb{E}_c\bigg[\mathcal{P}\bigg( Y^n_1 = y_1^n \bigg)\bigg] \nonumber\\ && \times \sum_{ (x_2^n, y_2^n) \in \atop A_{\varepsilon}^{\star n}(\mathcal{Q}(x,y|k_{2}))} \mathbb{E}_c\bigg[\mathcal{P}\bigg( X_2^n(m'_1,m'_2) = x_2^n \bigg)\bigg] \times \mathbb{E}_c\bigg[\mathcal{P}\bigg( Y_2^n = y_2^n \bigg)\bigg] \label{eq:ErrorSecond4} \\ &\leq& 2^{n \cdot \bigg(\textsf{R}_1 + \textsf{R}_2 - \mf{I}(X_1;Y_1|k_{1}) - \mf{I}(X_2;Y_2|k_{2}) + 3\varepsilon \bigg)} \label{eq:ErrorSecond5} \\ &\leq& 2^{ - n \cdot \varepsilon }.\label{eq:ErrorSecond8} \end{eqnarray} \end{tiny} Equation \eqref{eq:ErrorSecond2} comes from Boole's inequality and from the independence of sequences $ \big( X_1^n(m'_1) , Y^n_1\big)$ of the first block with respect to $\big( X_2^n(m'_1,m'_2) , Y_2^n\big)$ of the second block.\\ Equation \eqref{eq:ErrorSecond4} comes from the independence of the codewords $X _1^n(m'_1)$ with $(X _1^n(m_1), Y _1^n)$ and $X_2^n(m'_1,m'_2)$ with $(x_2, Y _2^n)$. \\ Equation \eqref{eq:ErrorSecond5} comes from the properties of the typical sequences, stated pp. 26 in \cite{ElGammal11_Book} and the cardinality of the sets $\mathcal{M}_1$ and $\mathcal{M}_2$, in the random codebook.\\ Equation \eqref{eq:ErrorSecond8} comes from the equation \eqref{eq:Rate2}, that is satisfied for the channel states $(k_{1} , k_{2})$. There exists a $n_2\in \mathbb{N}$ such that for all $n\geq n_2$, the expected probability of event $E_{2}$ is bounded for all channel states $(k_{1} , k_{2})$. \begin{eqnarray} \mathbb{E}_c\bigg[\mathcal{P}\bigg(E_{2} \bigg|\;c, k_{1}, k_{2} \bigg)\bigg] \leq \varepsilon.\label{eq:ErrorSecond6} \end{eqnarray} This proof relies on the jointly typical lemma, stated in \cite{ElGammal11_Book} page 29, and the same arguments provide upper bounds for the error events $E_{3}$ and $E_{4}$. This proves the existence of an HARQ-code $c^{\star} \in \mathcal{C}(n,R_1,R_2)$ with error probability bounded by $\varepsilon>0$ for all channel states $( k_{1}, k_{2} )$ satisfying \eqref{eq:Rate1}-\eqref{eq:Rate2}: \begin{eqnarray} \mathcal{P}\bigg( \Big\{ M_1\neq \hat{M_1} \Big\} \cup \Big \{ M_2\neq \hat{M_2} \Big\} \bigg|\;c^{\star}, k_{1}, k_{2} \;\bigg) \leq \varepsilon.\label{eq:DefErrorProbaLz} \end{eqnarray} This concludes the proof of Lemma \ref{lemma:DecodingConditions}. \end{proof} \section{Decoding conditions of \gls{xp}}\label{Sec:Decoding_Proof} We outline the proof of the decoding conditions \eqref{dec.1} and \eqref{dec.2}, stated in the following \lemref{lemma:DecodingConditions}. The HARQ-code refers to the encoding functions stated in \eqref{encoding.1} and \eqref{conventional.code} and the joint decoding of the pair $[\mf{m}_1, \mf{m}_2]$. \begin{lemma}[Decoding conditions]\label{lemma:DecodingConditions} For all $\varepsilon>0$, there exists $\bar{n}\in \mathbb{N}$ such that for all $n\geq \bar{n}$, there exists a HARQ-code $c^{\star} $ such that for all \gls{snr} realization $(\SNR_1,\SNR_2)$ that satisfy: \begin{eqnarray} R_1 + R_2 &\leq& \mf{I}(X_1 ; Y_1 |\SNR_{1}) + \mf{I}(X_2 ; Y_2 |\SNR_{2}) - \varepsilon, \label{eq:Rate2} \\ R_2 &\leq& \mf{I}(X_2 ; Y_2 |\SNR_{2}) - \varepsilon , \label{eq:Rate1} \end{eqnarray} the error probability is bounded by \begin{eqnarray} \PR{ [ \mf{m}_1, \mf{m}_2] \neq [ \hat{\mf{m}}_1, \hat{\mf{m}}_2] \bigg|c^{\star}, \SNR_{1}, \SNR_{2} }\leq \varepsilon. \end{eqnarray} \end{lemma} \begin{proof}[Proof of Lemma \ref{lemma:DecodingConditions}] We consider the random HARQ-code: \begin{itemize} \item[$\bullet$] \textit{Random codebook:} we generate $ 2^{\Ns \cdot R_1 } $ codewords $\boldsymbol{x}_1$ and $2^{\Ns \cdot ( R_1 + R_2 )} $ codewords $\boldsymbol{x}_2$, drawn from the uniform distribution over the constellation $\X$. \item[$\bullet$] \textit{Encoding function:} as explained in \secref{Sec:joint.codec}, the encoder starts by sending $\boldsymbol{x}_1$ which corresponds to the packet (or \emph{message} in the language of information theory) $\mf{m}_1$. If the encoder receives a feedback $\nack_1$, it sends $\boldsymbol{x}_2$ corresponding to the pair of messages $[\mf{m}_1 , \mf{m}_2]$. Otherwise a new transmission process starts. \item[$\bullet$] \textit{Decoding function:} if the \gls{snr} realizations $(\SNR_1,\SNR_2)$ satisfy equations \eqref{eq:Rate1} and \eqref{eq:Rate2}, then the decoder finds a pair of messages $[\mf{m}_1,\mf{m}_2]$ such that the following sequences of symbols are jointly typical: \begin{eqnarray} \Big(\Phi_1[\mf{m}_1] , \boldsymbol{y}_1 \Big) \in A_{\varepsilon}^{{\star}{\Ns}},\; \Big(\Phi_2[\mf{m}_1, \mf{m}_2] , \boldsymbol{y}_2 \Big) \in A_{\varepsilon}^{{\star}{\Ns}}. \label{eq:JointTypical2} \end{eqnarray} \item[$\bullet$] \textit{Error} is declared when sequences are not jointly typical. \end{itemize} \textbf{Error events.} We define the following error events: \begin{footnotesize} \begin{itemize} \item[$\bullet$]$E_0=\bigg\{\Big(\Phi_1[\mf{m}_1] , \boldsymbol{y}_1 \Big) \notin A_{\varepsilon}^{{\star}{\Ns}}\bigg\} \cup \bigg\{\Big(\Phi_2[\mf{m}_1, \mf{m}_2] , \boldsymbol{y}_2 \Big) \notin A_{\varepsilon}^{{\star}{\Ns}}\bigg\}$,\\ \item[$\bullet$]$E_{1} =\bigg\{\exists [\mf{m}_1',\mf{m}_2'] \neq [\mf{m}_1,\mf{m}_2],\text{ s.t. }\\ \qquad \qquad\qquad\qquad \qquad \Big\{ \Big(\Phi_1[\mf{m}_1'] , \boldsymbol{y}_1 \Big) \in A_{\varepsilon}^{{\star}{\Ns}} \Big\} \cap \Big\{ \Big(\Phi_2[\mf{m}_1', \mf{m}_2'] , \boldsymbol{y}_2 \Big) \in A_{\varepsilon}^{{\star}{\Ns}} \Big\} \bigg\}$,\\ \item[$\bullet$]$E_{2} =\bigg\{\exists \mf{m}_1'\neq \mf{m}_1,\text{ s.t. }\\ \qquad \qquad \qquad\qquad\qquad\Big\{ \Big(\Phi_1[\mf{m}_1'] , \boldsymbol{y}_1 \Big) \in A_{\varepsilon}^{{\star}{\Ns}} \Big\} \cap \Big\{ \Big(\Phi_2[\mf{m}_1', \mf{m}_2] , \boldsymbol{y}_2 \Big) \in A_{\varepsilon}^{{\star}{\Ns}} \Big\} \bigg\}$,\\ \item[$\bullet$]$E_{3} =\bigg\{\exists \mf{m}_2'\neq \mf{m}_2,\text{ s.t. } \Big(\Phi_2[\mf{m}_1, \mf{m}_2'] , \boldsymbol{y}_2 \Big) \in A_{\varepsilon}^{{\star}{\Ns}} \bigg\}$. \end{itemize} \end{footnotesize} The properties of the typical sequences imply that, for $\Ns$ large enough, $\PR{E_0} \leq \varepsilon$, and the Packing Lemma \cite[p.~46]{ElGammalKim(book)11} implies that the probabilities of the events $E_1$, $E_2$, $E_3$ are bounded by $\varepsilon$ if the following conditions are satisfied \begin{eqnarray} R_1 + R_2 &\leq& \mf{I}(X_1 ; Y_1 |\SNR_{1}) + \mf{I}(X_2 ; Y_2 |\SNR_{2}) - \varepsilon, \label{eq:Second1}\\ R_2 &\leq& \mf{I}(X_2 ; Y_2 |\SNR_{2}) - \varepsilon \label{eq:Second3},\\ R_1 &\leq& \mf{I}(X_1 ; Y_1 |\SNR_{1}) + \mf{I}(X_2 ; Y_2 |\SNR_{2}) - \varepsilon, \label{eq:Second2}. \end{eqnarray} Since \eqref{eq:Second1}-\eqref{eq:Second3} are the hypothesis \eqref{eq:Rate2}-\eqref{eq:Rate1} of \lemref{lemma:DecodingConditions}, there exists HARQ-code $c^{\star}$ with small error probability. \end{proof} \section{Optimization via \gls{mdp}}\label{Sec:OptimalAdaptation} To obtain the \gls{mdp} formulation it is convenient to replace packet-wise notation of \eqref{y.x.z} with a time-wise model \begin{align}\label{} \boldsymbol{y}[n]=\sqrt{\SNR[n]}\boldsymbol{x}[n]+\boldsymbol{z}[n], \end{align} where $n$ is the index of the channel block. At each time $n$, the \gls{harq} controller observes the \emph{state} $\mf{s}[n]$, and takes an \emph{action} $\mf{a}[n]=\pi(\mf{a}[n])$, according to the policy $\pi$. The transition probability matrix, $\boldsymbol{Q}(\mf{a})$, has the elements \begin{align}\label{eq:trans_vl} Q_{\mf{s},\mf{s}'}(\mf{a})\triangleq \displaystyle{\Pr\set{ \mf{s}[n+1]=\mf{s}'|\mf{s}[n]=\mf{s}, \mf{a}[n]=\mf{a}}}, \end{align} defining the probabilities of the system moving to the state $\mf{s}' \in \mc{S}$ at time $n+1$ conditioned on the system being in the state $\mf{s} \in \mc{S}$ at time $n$ and the controller taking the action $\mf{a}\in\mc{A}(\mf{s})$, where $\mc{A}(\mf{s})$ is the set of actions allowed in a state $\mf{s}$ and $\underset{\mf{s} \in \mc{S}}{\bigcup}\mc{A}(\mf{s})=\mc{A}$. In our case, the actions are the coding rates, which we assume may take any positive value, and thus $\mc{A}(\mf{s})=\Real_+$. A \emph{policy} $\pi$ is defined as a mapping $\pi:\mc{S}\mapsto\mc{A}$ between the state space, $\mc{S}$, and the action space, $\mc{A}$. We aim at finding a policy $\pi$ which maximizes the long-term average throughput \begin{align}\label{throughput.t} \eta(\pi) &= \lim_{N \rightarrow \infty}\frac{1}{N}\sum_{n=1}^N \Ex\big[ \mf{R}(\mf{s}[n],\pi(\mf{s}[n])) \big], \end{align} where $\mf{R}(\mf{s},\mf{a})$ is the average reward obtained when taking action $\mf{a}$ in the state $\mf{s}$ and the expectations are taken with respect to the random states $\mf{s}[n]$. In our case the reward is the number of decoded bits normalized by the duration of the channel block, $\Ns$. The optimal policy thus solves the following problem: \begin{align}\label{op.throughput.t} \hat{\eta}^{\tnr{xp}}_{\kmax}=\max_{\pi(\cdot)}\eta(\pi) \end{align} and may be found solving the Bellman equations \cite[Prop.~4.2.1]{Bertsekas07_book} \begin{align}\label{bellman.eq} \hat{\eta}^{\tnr{xp}}_{\kmax}+h(\mf{s})&=\max_{\mf{a} \in \mc{A}(\mf{s})}\left[ \mf{R}(\mf{s},\mf{a}) + \sum_{\mf{s}'\in\mc{S}} Q_{\mf{s},\mf{s}'}(\mf{a}) h(\mf{s}')\right],\quad \forall \mf{s}\in\mc{S}, \end{align} where $h(\mf{s})$ is a difference reward associated with the state. To calculate the optimal $\hat{\eta}^{\tnr{xp}}_{\kmax}$, we use here the policy iteration algorithm whose details may be found in \cite[Sec.~4.4.1]{Bertsekas07_book} and which guarantees to reach the solution after a finite number of iterations. The unique optimal throughput $\hat{\eta}^{\tnr{xp}}_{\kmax}$ exists and is independent of the initial state, $\mf{s}[0]$ if, for any state $\mf{s}'[t]\in\mc{S}$, we can find a policy, which starting with arbitrary state $\mf{s}[0]$ reaches the state $\mf{s}'[t]$ in a finite time $t<\infty$, with non-zero probability \cite[Prop.~4.2.6 and Prop.~4.2.4]{Bertsekas07_book}. For our problems, finding such a policy is indeed possible, proof of which we skip for sake of brevity In order to define the state space and the average reward, we deal separately with the truncated and persistent \gls{xp} but in both cases we must track the accumulated rate, $\Rsig[n]$ (it defines the reward, $\mf{R}(\mf{s},\mf{a})$), and the accumulated \gls{mi}, $\Isig[n]$ (it defines the matrix $\boldsymbol{Q}$). Thus these two variables must enter the definition of the state, $\mf{s}[n]$. \subsection{Persistent HARQ} For the persistent \gls{xp}, the state can be defined as a pair \begin{align}\label{state.persistent} \mf{s}[n]\triangleq(\Isig[n],\Rsig[n]), \end{align} and the transition to the state at time $n+1$ is defined as \begin{align}\label{eq:dynamic.pers} \mf{s}[n+1]= \begin{cases} \big(\Isig[n]+I[n],\Rsig[n]+\R[n]\big), \\ \qquad~\quad \text{if} \quad \Rsig[n]+\R[n]\geq \Isig[n]+I[n]\\ \big(0, 0\big), \quad \text{otherwise}. \end{cases}. \end{align} A non-zero reward is obtained only by terminating the \gls{harq} cycle, \ie moving to the state $\mf{s}[n+1]=(0,0)$, \begin{align}\label{reward.persistent} \mf{R}(\mf{s}[n],\mf{a})=&\big(\Rsig[n]+\mf{a}\big)\ccdf_I (\Rsig[n]-\Isig[n]+\mf{a}), \end{align} where $\ccdf_I(x)\triangleq 1-\cdf_I(x)$ and $\cdf_I(x)$ is the \gls{cdf} of $I$. \subsection{Truncated HARQ} In the truncated \gls{harq}, a new \gls{harq} cycle starts also if the maximum number of allowed rounds is attained (even if the message is not decoded correctly). Thus i)~the index of the transmission round, $\mf{k}$, must enter the defining of the state, ii)~we need to make a distinction between the decoding success/failure of the last round. We thus define the state as \begin{align}\label{state.persistent} \mf{s}[n]\triangleq(\Isig[n],\Rsig[n],\mf{k}[n],\mf{M}[n]), \end{align} where $\mf{k}[n]$ and $\mf{M}[n]\in\set{\ack,\nack}$ are respectively, the number of rounds and the decoding result after the transmission in block $n$. The system dynamic is described as follows: \begin{align}\nonumbe \mf{s}[n+1]= \begin{cases} \big(0, 0,0,\ack\big), \quad ~~\text{if} \quad \mc{E}_{\ack}[n] \\ \big(0, 0,0,\nack\big), \quad \text{if} \quad \mc{E}_{\nack}[n] \\ \big(\Isig[n]+I[n],\Rsig[n]+\R[n],\mf{k}[n]+1,\nack\big), \\ \qquad~\qquad \text{otherwise} \end{cases} \end{align} where \begin{align}\nonumber \mc{E}_{\ack}[n]&\triangleq\set{\Rsig[n]+\R[n]\leq \Isig[n]+I[n]}\\ \nonumber \mc{E}_{\nack}[n]&\triangleq\set{\Rsig[n]+\R[n]> \Isig[n]+I[n]~\wedge~\mf{k}[n]+1=\kmax} \end{align} are respectively, the conditions indicating a successful decoding and a decoding failure at the end of the \gls{harq} cycle. Thus, the state space is defined as: $\mc{S}=\Real_{+}\times\Real_{+}\times\set{0,1,\ldots,\kmax-1}\times\set{\ack,\nack}$ and the reward is defined by \eqref{reward.persistent}. \section{Optimal MDP for $K=2$}\label{Sec:OptimalAdaptation.Analytic} Knowing the rate of the first transmission, $\R_{1}$, the optimization problem \eqref{op.throughput.t} may be solved analytically for $\kmax=2$ using \eqref{eq.mm.ad} \begin{align}\label{op.throughput.definition.RR.2} &\displaystyle{\hat{\eta}^\tnr{xp}_2=\max_{ \R_{2}(I_{1})} \frac{\Ex\Big[\R_{1}\IND{I_{1}\ge \R_{1}}\Big]}{1+f_{1}}+}\nonumber \\ &\displaystyle{\frac{\Ex\Big[(\R_{1}+ \R_{2}(I_{1}))\IND{I_{1}\le \R_{1} \wedge \Isig_2\ge \R_{1}+\R_{2}(I_{1})}\Big]}{1+f_{1}}}. \end{align} Since $f_{1}$ is independent of $\R_{2}(\cdot)$, solving \eqref{op.throughput.definition.RR.2} is equivalent to finding, for each value of $I_{1}<\R_{1}$, the optimal $\R_{2}(\cdot)$ as follows \begin{align}\label{} \R_{2}(I_{1})=\mathop{\mr{argmax}}_{R}~(\R_{1}+ R) \cdot \cdf_{I_{2}}^{\tr{c}}(\R_{1}+R-I_{1}). \end{align} which is a one-dimension optimization problem, that can be solved analytically, provided $\cdf_{I_{2}}^{\tr{c}}(\cdot)$ is known. In the case of Gaussian codebook, \ie when the \gls{mi} is given by $I_{k}=\log_{2}(1+\SNR_{k})$, the optimal rate adaptation policy is given by the following closed-form \begin{align}\label{eq:optimal.analitical.policy} \R_{2}(I_{1})=\max\big(0,\frac{W(2^{I_{1}} \SNRav )}{\log(2)}-R_{1}\big), \end{align} where $W(.)$ is Lambert $W$ function defined as the solution of $x=W(x)\mr{e}^{W(x)}$. \section{Analytical solution of the optimization problem \eqref{op.throughput.definition.RR}}\label{Sec:OptimalAdaptation.Analytic} In this appendix, we will solve analytically the optimization problem \eqref{op.throughput.definition.RR} when $\kmax=2$ and the rate of the first transmission is constant and equals to $\R_{1}$. That is, the objectif is to solve the following optimization problem: \begin{align}\label{op.throughput.definition.RR.2} &\displaystyle{\eta^\tnr{xp}_2=\max_{ \R_{2}(I_{1})} \frac{\Ex_{\{I_{1},I_{2}\}}\Big[\R_{1}\IND{I_{1}\ge \R_{1}}\Big]}{1+f_{1}}+}\nonumber \\ &\displaystyle{\frac{\Ex_{\{I_{1},I_{2}\}}\Big[(\R_{1}+ \R_{2}(I_{1}))\IND{I_{1}\le \R_{1} \wedge I_{1}+I_{2}\ge \R_{1}+\R_{2}(I_{1})}\Big]}{1+f_{1}}}\\ &\displaystyle{=\max_{ \R_{2}(I_{1})} \frac{\R_{1}(1-f_{1})}{1+f_{1}}}+\nonumber \\ &\displaystyle{\frac{\Ex_{\{I_{1},I_{2}\}}\Big[(\R_{1}+ \R_{2}(I_{1}))\IND{I_{1}\le \R_{1} \wedge I_{1}+I_{2}\ge \R_{1}+\R_{2}(I_{1})}\Big]}{1+f_{1}}}, \end{align} where $f_{1}=\Pr\{I_{1}<\R_{1}\}$ is independent of $\R_{2}(\cdot)$. Thus, \eqref{op.throughput.definition.RR.2} is equivalent to \begin{align}\label{} \max_{ \R_{2}(I_{1})}& \Ex_{\{I_{1},I_{2}\}}\Big[(\R_{1}+ \R_{2}(I_{1})) \times \nonumber \\ & \IND{ I_{1}\le \R_{1} \wedge I_{1}+I_{2}\ge \R_{1}+\R_{2}(I_{1})}\Big]. \end{align} Therefore, for each value of $I_{1}<\R_{1}$, the optimal $\R_{2}(I_{1})$ is given by \begin{align}\label{} \R_{2}(I_{1})=\mathop{\mr{argmax}}_{R}~(\R_{1}+ R) \cdot \cdf_{I_{2}}^{\tr{c}}(\R_{1}+R-I_{1}). \end{align} which is a simple one-dimension optimization problem. For the particular case of Gaussian modulation when the \gls{mi} is given by $I_{k}=\log_{2}(1+\SNR_{k})$, it is easy to show that the optimal rate adaptation policy is given by the following closed-form \begin{align}\label{eq:optimal.analitical.policy} \R_{2}(I_{1})=\max\big(0,\frac{W(2^{I_{1}} \SNRav )}{\log(2)}-R_{1}\big), \end{align} where $W(.)$ is Lambert $W$ function defined as the solution of $x=W(x)\mr{e}^{W(x)}$. Thus, the optimal throughput is given by: \begin{align} &\eta^\tnr{xp}_2=\frac{\R_{1}(1-f_{1})}{1+f_{1}}+\nonumber \\ & \frac{\Ex_{\{I_{1}\}}\Big[(\R_{1}+ \R_{2}(I_{1})) \cdf_{I_2}^{\tr{c}}(\R_{1}+\R_{2}(I_{1})-I_{1}) | I_1<\R_1\Big]}{1+f_{1}}, \end{align} \section{Introduction}\label{Sec:Intro} In this work, in order to improve the throughput of the \gls{harq} transmission over block-fading channel, we propose to use joint coding of multiple information packets into the same channel block and we develop methods to optimize the coding rates. \gls{harq} is used in modern communications systems to deal with unpredictable changes in the channel (due to fading), and with the distortion of the transmitted signals (due to noise). \gls{harq} relies on the feedback/acknowledgement channel, which is used by the receiver to inform the transmitter about the decoding errors (via \gls{nack}) and about the decoding success, via \gls{ack}. After \gls{nack}, the transmitter makes another transmission \emph{round} which conveys additional information necessary to decode the packet. This continues till \gls{ack} is receiver and then a new \gls{harq} \emph{cycle} starts again for another information packet. In so-called \emph{truncated} \gls{harq}, the cycle stops also if the maximum number of rounds is attained. As in many previous works, \eg \cite{Caire01,Larsson14}, we will consider throughput as a performance measure assuming that residual errors are taken care of by the upper layers \cite{Jabi16}. We consider here the ``canonical'' problem defined in \cite{Caire01}, where the \gls{csi} is available at the receiver but not at the transmitter, which knows only its statistical description. The essential part of \gls{harq} is channel coding, which is done over many channel blocks as long as \gls{nack}s are obtained over the feedback channel. It was shown in \cite{Caire01} that \gls{harq}'s throughput may approach the ergodic capacity of the channel with sufficiently high ``nominal'' coding rate per round. However, such an approach is based on large number of \gls{harq} rounds, and thus has a limited practical value: long buffers are required which becomes a limiting factor for implementation of \gls{harq} \cite{Lee15}. On the other hand, using finite nominal coding rate and truncated \gls{harq}, the difference between the throughput achievable using \gls{harq} and the theoretical limits may be large, especially, when we target throughput close to the nominal rate \cite{Larsson14}, \cite{Jabi15b}. To address this problem, various adaptive versions of \gls{harq} were proposed in the literature. For example, \cite{Cheng03,Visotsky03,LiuR03,Visotsky05,Kim11,Szczecinski13,Pfletschinger14} suggested to vary the length of the codewords so as to strike the balance between the number of channel uses and the chances of successful decoding. Their obvious drawback is that the resources assigned to the various \gls{harq} rounds are not constant which may leave an ``empty'' space within the block. To deal with this issue, it was proposed to share the block resources (power, time or bandwidth) between various packets in \eg \cite{Zhang09,Takahashi10,Chaitanya11b,Steiner08,Jabi16}, to encode many packets into predefined size blocks as done in \cite{ElAoun10,AOUN12}, or to group variable-length codewords to fill the channel block \cite{Wang07,Szczecinski13}. A simplified approach was also proposed in \cite{Popovski14} to transmit the redundancy using two-step encoding. These approaches implicitly implement a joint coding of many packets into a single channel block. Here, we want to address the issue of cross-packet coding explicitly. The idea of this \gls{xp} is to get rid of the restricting assumptions proper to various heuristics developed before and to use a generic joint \gls{harq} encoder accepting many information packets and encoding them into a common codeword which fills the channel block. The contributions of this work are the following: \begin{itemize} \item We propose a general framework to analyze joint encoding of multiple packets which allow us to derive the relationship between the coding rates and the throughput. Our approach to cross-packet coding is similar to the one shown in \cite{Hausl07,Chui07,Duyck10,Trillingsgaard14}, which, however, did not optimize the coding parameters. The optimization was proposed in \cite{Nguyen15}, however, due to complex decoding rules, it was very tedious and thus limited to the case of a simple channel model. In our work we simplify the problem assuming asymptotically long codewords are used, which leads to a compact description of the decoding criteria and allows us to solve the rate-optimization problem. % \item We consider the so-called multi-bit feedback to adapt the coding rates to the channel state experienced by the receiver in the past transmission rounds of \gls{harq}. The same idea was exploited already \eg in\cite{Tuninetti11b,Nguyen12,Szczecinski13,Cheng03,Karmokar04,Jabi15,Visotsky05,Djonin08,Gopalakrishnan08b,Pfletschinger14,Jabi16}. The assumption of multi-bit feedback not only simplifies the optimization but also yields the results which may be treated as the ultimate performance limits of any adaptation schemes when the instantaneous \gls{csi} is not available at the transmitter. \item We optimize the coding rates using the \gls{mdp} formulation \cite[Chap.~4]{Bertsekas07_book}, and compare the proposed, \gls{xp} to the conventional \gls{irharq} from the perspective of attainable throughput. For the particular case of two transmission round, we obtain the optimal solution in closed-form. \item We also present an analytical formula for attainable throughput using heuristic rate-adaptation inspired by the numerical results and which presents a notable gain over the conventional \gls{irharq}. \item To obtain an insight into the practical constraints on the system design, we also show the results obtained when a turbo coding is adopted. \end{itemize} The remainder of the paper is organized as follows. We define the transmission model as well as the basic performance metrics in \secref{Sec:Model}. The idea of cross-packet coding is explained in \secref{Sec:joint.codec}. The optimization of the rates in the proposed coding strategy is presented in \secref{Sec:Rate_Optimazation}. We discuss the effects of using a practical encoding/decoding schemes in \secref{Sec:Practical}. The numerical results are presented in form of short examples throughout the work to illustrate the main ideas. Conclusions are presented in \secref{Sec:Conclusions}. The optimization methods used to obtain the numerical results and the proof of decoding conditions are presented in appendices. \section{Optimization of the coding rates}\label{Sec:Rate_Optimazation} Our goal now is to evaluate how well the \gls{xp} can perform. To this end, we will have to find the optimal coding rates $\R_1, \R_2, \ldots, \R_K$ which maximize throughput \eqref{throughput.joint}. Since the objective function is highly non linear, we will use the exhaustive search: for a truncated \gls{harq} this can be done with a manageable complexity. \begin{example}[16QAM, Rayleigh fading -- continued]\label{Ex:allocation} In \figref{Fig:Rayleigh.joint.truncated.allocation} we show the results of the exhaustive-search optimization of ${\eta}^{\tnr{xp}}_\kmax$ with ${\eta}^{\tnr{ir}}_\kmax$; for implementability, we limited the search space: \gls{irharq} uses \mbox{$\R_1\in\set{0,0.25,\ldots,3.75}$} and \gls{xp} uses rates which satisfy $\Rsig_{\kmax} \leq \R_{\max}$, with \mbox{$\R_{\max}=8$}; $\R_{1}\in\set{0.25,\ldots,3.75}$, $\R_{k}\in\set{0,0.25,\ldots,3.75} ~ \forall k\in\set{2,\ldots,\kmax}$. We used here an additional constraints requires each transmission to have non zero probability of being decodable, that is $\R_{k} < \log_{2} M, \forall k=1,\ldots,\kmax$, where $M=16$. In fact, these constraints were always satisfied in \gls{xp} so they only affect \gls{irharq}; we will relax them in the next example. In terms of \gls{snr} required to attain $\eta=3$, the gain of \gls{xp} over \gls{irharq} varies from $1.5\dBval$ (for $\kmax =2$) to $2.5\dBval$ (for $K =3$). \begin{figure}[tb] \input{./figures/Fig.HARQ.Truncated.Rayleigh.Joint.Allocation.tex} \caption{Throughput of the conventional \gls{irharq} ($\eta^{\tnr{ir}}_\kmax$) compared to \gls{xp} ($\eta^{\tnr{xp}}_\kmax$) in Rayleigh block-fading channel. The ergodic capacity ($\ov{C}$) is shown for reference. }\label{Fig:Rayleigh.joint.truncated.allocation} \end{figure} \end{example} \subsection{Rate adaptation}\label{Sec:multibit} The possibility of varying the rates during the \gls{harq} cycle opens new optimization space and we want to explore it fully following the idea of adapting the transmission parameters in \gls{harq} on the basis of obsolete \gls{csi} considered before, \eg in \cite{Cheng03,LiuR03,Visotsky05,Pfletschinger10,Kim11,Szczecinski13,Jabi15}. The idea is to \emph{adapt} the coding rates using obsolete \gls{csi}s, $I_1, I_2, \ldots, I_{k-1}$; this concept remains compatible with the assumption of transmitter operating without \gls{csi} knowledge because the obsolete \gls{csi}s $I_1, I_2, \ldots, I_{k-1}$ cannot be used in the $k$th round to infer anything about $I_{k}$ (due to \gls{iid} model of the \gls{snr}s). Using this approach, the rate $\R_k$ will not only depend on the \gls{mi}s $I_1,\ldots, I_{k-1}$ but also -- on the past rates $\R_1, \ldots, \R_k$.\footnote{Through $\R_1, \Rsig_2,\ldots, \Rsig_{k-1}$, which determine the probability of the decoding success, see \eqref{nack.k}.} This recursive dependence may be dealt with using the \gls{mdp} framework, where the states of the Markov chain not only indicate the transmission number but also gather all information necessary to decide on the rate, which in the language of the \gls{mdp} is called an \emph{action}. The state has to be defined so that i)~knowing the action (chosen rate), the state-transition probability can be determined after each transmission, and ii)~the reward may be calculated knowing the state and the action. The state defined as a pair $\mf{s}_k=(\Rsig_k,\Isig_k)$ satisfies these two requirements, where we only need to consider the pairs which satisfy $\Rsig_k>\Isig_k$, otherwise the decoding is successful and the \gls{harq} cycle terminates. Thus, the rate adaptation consists in finding the functions (called \emph{policies}), $\R_{l}(\mf{s}_{l-1})$ maximizing the throughput, which is found generalizing the expression \eqref{throughput.joint} \begin{align}\label{eq.mm.ad} \hat{\eta}^{\tnr{xp}}_{\kmax}&=\frac{\Ex\big[\sum_{k=1}^{\kmax}\xi_{k} \Rsig_k\big]}{1+\sum_{k=1}^{\kmax-1}f_{k}}, \end{align} where \begin{align}\label{xi.original} \xi_{k}=\IND{I_1<\R_1 \wedge \ldots \wedge \Isig_{k-1}<\Rsig_{k-1}\wedge \Isig_{k}\geq \Rsig_k}, \end{align} indicates the successful decoding in the $k$th round, and \begin{align}\label{Rsig.state} \Rsig_k=\Rsig_{k-1}+\R_{k}(\mf{s}_{k-1}) \end{align} is the accumulated rate depending in a recursive fashion on the states of the Markov chain. The probability of $k$ successive errors, $f_k$, may be expressed as \eqref{nack.k} considering the dependence of the rates on the states given by \eqref{Rsig.state}. All the expectations are taken with respect to the states -- or equivalently -- with respect to $I_1,\ldots, I_{\kmax}$. The expression \eqref{eq.mm.ad} will be useful in \secref{Sec:Heuristics}, however, its maximization with respect to the policies $\R_{l}(\mf{s}_{l-1}), l=1,\ldots, \kmax$ will be done using efficient specialized algorithms as explained in \appref{Sec:OptimalAdaptation}. In the particular case of two \gls{harq} rounds ($\kmax=2$), the optimal rate adaptation policy can be derived in closed form as shown in \appref{Sec:OptimalAdaptation.Analytic}. To run the optimization algorithms outlined in \appref{Sec:OptimalAdaptation}, we need to discretize the variables involved (states and actions). As for the rates (actions), we use a relatively course discretization step equal to $0.25$ and define the action space as the set $\mc{R}=\set{0.25,0.5,\ldots, \R_{\max}}$. While the results are notably affected by $\R_{\max}$, using a finer discretization step did not change the results significantly. Here, it is natural to ask a question about the signaling overhead due to proposed adaptation scheme. We thus note that while we assume the outdated \gls{mi}, $\Isig_k$ is discretized with a high resolution when optimizing the throughput (\cf \appref{Sec:OptimalAdaptation}), the feedback load is affected by the cardinality of the action space, $\mc{R}$: the receiver knows the accumulated \gls{mi} but only transmits the index of the chosen rate. \begin{example}[16QAM, Rayleigh fading channel -- continued]\label{Ex:Rayleigh.joint.adaptation} The throughput of adaptive \gls{xp}, $\hat{\eta}^{\tnr{xp}}$, is compared to the throughput of the conventional \gls{irharq} in \figref{Fig:Rayleigh.joint.persistent} for $K=\infty$, while \figref{Fig:Rayleigh.joint.truncated} shows the comparison for truncated \gls{harq}. Here, for \gls{irharq}, we removed the constraints on the initial coding rate, $\R_1<\log_2 M$, which were applied in \exref{Ex:allocation}. It allows us to increase the throughput $\eta^{\tnr{ir}}_3$ at the cost of first transmission not being decodable. In our view this is a potentially serious drawback but we show such results to complement those already shown in \figref{Fig:Rayleigh.joint.truncated.allocation}, where the decodability condition was imposed. Again, \gls{xp} was insensitive to the decodability constraints and always provided results with decodable transmissions. \begin{figure}[tb] \input{./figures/Fig.HARQ.Persistent.Rayleigh.Joint.Adaptation.tex} \caption{Optimal throughput of the conventional \gls{irharq} ($\eta^{\tnr{ir}}_\infty$) compared to the proposed \gls{xp} ($\hat{\eta}^{\tnr{xp}}_\infty$) in Rayleigh block-fading channel. The ergodic capacity ($\ov{C}$) is shown for reference. }\label{Fig:Rayleigh.joint.persistent} \end{figure} \begin{figure}[tb] \input{./figures/Fig.HARQ.Truncated.Rayleigh.Joint.Adaptation.tex} \caption{Throughput of the conventional \gls{irharq} ($\eta^{\tnr{ir}}_\kmax$) compared to the proposed \gls{xp} ($\hat{\eta}^{\tnr{xp}}_\kmax$) for a truncated \gls{harq}, $\kmax\in\set{2,3}$ in Rayleigh block-fading channel; $\R_{\max}=8$. The ergodic capacity ($\ov{C}$) and the optimal throughput of the persistent conventional \gls{irharq} ($\eta^{\tnr{ir}}_\infty$) are shown for reference.}\label{Fig:Rayleigh.joint.truncated} \end{figure} The improvements due to adaptive \gls{xp} are most notable for high values of the throughput. In particular we observe that \begin{itemize} \item The persistent \gls{xp} halves the gap between the ergodic capacity and the conventional \gls{irharq}. For example, the \gls{snr} gap between $\hat{\eta}^{\tnr{xp}}_\infty=3$ and the ergodic capacity, $\ov{C}=3$ is reduced by more than $50\%$ when comparing to the gap between $\eta^{\tnr{ir}}_\infty=3$ and $\ov{C}=3$ which is equal to $5\dBval$ when $\R_{\max}=8$. We note that the throughput of \gls{xp} increases when $\R_{\max}$ increases: the \gls{snr} gap between $\ov{C}$ and $\hat{\eta}^{\tnr{xp}}_\infty$ is reduced by half when $\R_{\max}=16$ is used instead of $\R_{\max}=8$. \item For any value of throughput $\eta>3$, two rounds of \gls{xp} yield higher throughput than the conventional persistent \gls{irharq}. Thus, in this operation range we may improve the performance and yet decrease the memory requirements at the receiver. \end{itemize} \end{example} \subsection{Heuristic adaptation policy}\label{Sec:Heuristics} \begin{figure}[tb] \input{./figures/Fig.HARQ.Persistent.Rayleigh.Joint.Adaptation.Policy.tex} \caption{Optimal rate $R_k$ as a function of $\Rsig_{k-1}-\Isig_{k-1}$ for different values of $\Rsig_{k-1}$; $\kmax=\infty$, $\SNRav=20\dBval$, $\R_{\max}=8$.}\label{Fig:Strategy.persistent} \end{figure} \figref{Fig:Strategy.persistent} shows the optimal rate adaptation as a function of $\Rsig_{k-1}-\Isig_{k-1}$ for different values of $\Rsig_{k-1}$, where we note a quasi-linear behaviour of the adaptation function with the saturation which occurs to guarantee $\Rsig_{k-1}+\R_k\leq\R_{\max}$. To exploit this very regular form, which was also observed solving the related problems in \cite{Szczecinski13,Jabi15}, we propose to use the following heuristic function inspired by \figref{Fig:Strategy.persistent} \begin{align}\label{Rk.heuristic} \R_k=\R_1- (\Rsig_{k-1}-\Isig_{k-1}), \end{align} where only the rate $\R_1$ needs to be optimized (from \figref{Fig:Strategy.persistent} we find $\R_1\approx3.5$). Furthermore, applying \eqref{Rk.heuristic} recursively we obtain $\R_2=I_1, \R_3=I_2, \ldots, \R_k=I_{k-1}$; the identical rate-adaptation strategy may be derived from \cite[Sec.~III]{Popovski14}. The simplicity of the adaptation function allows us now to evaluate analytically the throughput of \gls{xp}. To this end we need to calculate $f_l$ in the denominator of \eqref{eq.mm.ad} and the expectation in its numerator. We first note that, from \eqref{Rk.heuristic} we obtain \begin{align}\label{} \big(\Isig_k&<\Rsig_k\big) \iff (I_k<R_1), \end{align} which means that the probability of decoding failure does not change with the index of the transmission round. Thus \begin{align}\label{eq.fk.heur} f_{k}&=(f_{1})^k, \end{align} and \eqref{xi.original} may be formulated as \begin{align}\label{eq.xi.heur} \xi_{k}=\Big(\prod_{l=1}^{k-1}\IND{I_l<\R_1}\Big)\IND{I_{k}\geq \R_1}. \end{align} From \eqref{Rk.heuristic} we also obtain $\Rsig_k=\R_1 + \sum_{l=1}^{k-1}I_l$, which allows us to calculate the expectation in the numerator of \eqref{eq.mm.ad} as \begin{align}\label{} \Ex[\xi_{k} \Rsig_k] &=\Ex[\xi_{k} (\R_1 + I_1+\ldots, I_{k-1})]\\ \label{xi.final} &=\big(\R_1f_1 +(k-1)\tilde{C}\big)(f_1)^{k-2}(1-f_1), \end{align} where $\tilde{C}=\Ex_{I_1}\big[I_{1}\cdot\IND{I_{1}<\R_{1}}\big]$ is a ``truncated'' expected \gls{mi}. Using \eqref{xi.final} and \eqref{eq.fk.heur} in \eqref{eq.mm.ad}, the throughput is calculated as \begin{align}\label{eq.xi.heur.final} \tilde{\eta}^\tnr{xp}_\kmax&=\R_{1}(1-f_{1})+\frac{\tilde{C}(1-f_{1})}{1-f_{1}^\kmax} \nonumber\\ &\qquad\times \Big(-(\kmax-1)f_{1}^{\kmax-1}+\frac{1-f_{1}^{\kmax-1}}{1-f_{1}} \Big). \end{align} In the limit, $\kmax\rightarrow\infty$, \eqref{eq.xi.heur.final} becomes \begin{align}\label{eq.xi.heur.infini} \tilde{\eta}^{\tnr{xp}}_\infty=\R_{1}(1-f_{1})+\tilde{C}, \end{align} which is the same as \cite[Eq.~(12)]{Popovski14}. \begin{figure} \input{./figures/Fig.HARQ.Truncated.Rayleigh.Joint.vs.Petar.Adaptation.tex} \caption{Throughput of the optimal \gls{xp} ($\hat{\eta}^\tnr{xp}_\kmax$) is compared to the throughput of \gls{xp} with the heuristic policy ($\tilde{\eta}^\tnr{xp}_\kmax$) in Rayleigh block-fading channel. The ergodic capacity ($\ov{C}$) is shown for reference.}\label{Fig:Rayleigh.joint.vs.Petar.truncated.adaptation} \end{figure} \begin{example}[16QAM, Rayleigh fading -- continued]\label{Ex:Rayleigh.joint.vs.BRQ.adaptation.and.allocation} We compare in \figref{Fig:Rayleigh.joint.vs.Petar.truncated.adaptation} the throughput of optimal \gls{xp} with the heuristic policy \eqref{Rk.heuristic}, which is optimized over $\R_{1}$. As expected, the optimal solution outperforms the heuristic policy but the gap is very small (less than $0.5\dBval$). Moreover, since $\hat{\eta}^\tnr{xp}_\kmax$ was optimized over a finite set of rates $\mc{R}=\set{0.25,0.5,\ldots,\R_{\max}}$, and the heuristic policy assumes that $\mc{R}$ is continuous and unbounded, $\tilde{\eta}^\tnr{xp}_\kmax$ slightly outperforms $\hat{\eta}^\tnr{xp}_\kmax$ above $\SNRav=20\dBval$. This gap can be reduced increasing the value of $\R_{\max}$; decreasing the discretisation step below $0.25$ had much lesser influence on the results.\end{example} The results are quite intriguing and suggesting that the strategy of \cite{Popovski14} based on a double-layer encoding\footnote{\cite{Popovski14} proposes double-step encoding: to form $\mf{m}_{[k]}$ the bits $\mf{m}_{k}$ and the parity bits of $\mf{m}_{[k-1]}$ are first ``mixed'', and next, the channel encoder is used.} and a transmission-by-transmission decoding (as opposed to the joint decoding required in \gls{xp}), asymptotically yield the same throughput as the heuristic cross-packet \gls{harq}, whose throughput is also very close to the optimal \gls{xp}. We cannot follow that path here but this relationship should be studied in more details; in particular, the effect of removing the idealized assumption of using a continuous set of rates $\mc{R}$, necessary to implement \eqref{Rk.heuristic}, should be analyzed. \section{Channel model and HARQ}\label{Sec:Model} We consider a point-to-point \gls{irharq} transmission of a packet $\mf{m}$ over a block fading channel. After each transmission, using a feedback/acknowledgement channel, the receiver tells the transmitter whether the decoding of $\mf{m}$ succeeded (\gls{ack}) or failed (\gls{nack}). We thus assume that error detection is possible (\eg via \gls{crc} mechanisms) and that the feedback channel is error-free. For simplicity, we ignore any loss of resources due to the \gls{crc} and the acknowledgement feedback. The transmission of a single packet may thus require many transmission rounds which continue till the $\kmax$th round is reached or till \gls{ack} is received. When $\kmax$ is finite, we say that \gls{harq} is \emph{truncated}, otherwise we say it is \emph{persistent}. We define a \gls{harq} \emph{cycle} as the sequence of transmission rounds of the same packet $\mf{m}$. The received signal in the $k$th round is given by \begin{align}\label{y.x.z} \boldsymbol{y}_{k}=\sqrt{\SNR_{k}}\boldsymbol{x}_{k}+\boldsymbol{z}_{k},\quad k=1,\ldots, \kmax \end{align} where $\boldsymbol{z}_{k}$ and $\boldsymbol{x}_k$ modelling, respectively, the noise and the transmitted codeword are $\Ns$-dimensional vectors, each containing \gls{iid} zero mean, unit-variance random variables; $\SNR_{k}$ is thus the \gls{snr} at the receiver. The elements of $\boldsymbol{z}_k$ are drawn from complex Gaussian distribution, and elements of $\boldsymbol{x}_{k}$ -- from the uniform distribution over the set (constellation) $\mc{X}$. During the $k$th round, $\SNR_{k}$ is assumed to be perfectly known/estimated at the receiver and unknown at the transmitter; it varies from one round to another and we model $\SNR_{k}, k=1,\ldots,\kmax$ as the \gls{iid} random variables $\SNRrv$ with distribution $\pdf_{\SNRrv}(\SNR)$. \subsection{Conventional \gls{harq}}\label{Sec:HARQ} In the conventional \gls{irharq}, a packet $\mf{m} \in\set{0,1}^{\R\Ns}$ is firstly encoded into a codeword $\boldsymbol{x}=\Phi[\mf{m}]\in\X^{K\Ns}$ composed of $K\Ns$ complex symbols taken from a constellation $\X$ where $\Phi[\cdot]$ is the coding function and $\R$ denotes the \emph{nominal} coding rate per block.\footnote{We clearly define the nominal rate as the coding rate per channel block because \gls{harq} is a variable-rate transmission: the number of used channel blocks is random, and the final transmission rate is random as well.} Then, the codeword $\boldsymbol{x}$ is divided into $K$ disjoint subcodewords $\boldsymbol{x}_k$ composed of different symbols \ie $\boldsymbol{x}=[\boldsymbol{x}_1,\boldsymbol{x}_2,\ldots,\boldsymbol{x}_\kmax]$. After each round $k$, the receiver try to decode the packet $\mf{m}$ concatenating all received channel outcomes till the $k$th block \begin{align}\label{yk.x.z} \boldsymbol{y}_{[k]}=[\boldsymbol{y}_{1},\ldots,\boldsymbol{y}_{k-1},\boldsymbol{y}_{k}]. \end{align} Following \cite{Caire01,Nguyen12}, we assume $\Ns$ large enough to make the random coding limits valid. Then, knowing the \gls{mi} $I_k=\mf{I}(X_k;Y_k|\SNR_k)$ between the random variables $X_k$ and $Y_k$ modeling respectively, the channel input and output in the $k$th block, allows us to determine when the decoding is successful or not: the decoding failure occurs in the $k$th round if the accumulated \gls{mi} at the receiver is smaller than the coding rate \begin{align}\label{nack.def} \nack_k&\triangleq\set{ \big(I_1<R\big) \wedge \big(\Isig_2<R\big) \wedge \ldots\wedge \big(\Isig_k<R\big) }\\ &= \SET{\Isig_k<R}, \end{align} where $\Isig_k\triangleq\sum_{l=1}^k I_l$ is the \gls{mi} accumulated in $k$ rounds. Of course, the \gls{mi} depends on the \gls{snr}, \ie $I_k\equiv I_k(\SNR_k)$. \gls{irharq} can be modelled as a Markov chain where the transmission rounds correspond to the states, and the \gls{harq} cycle corresponds to a renewal cycle in the chain. Thus, the long-term average throughput, defined as the average number of correctly received bits per transmitted symbol, may be calculated from the renewal-reward theorem: it is a ratio between the average reward (number of bits successfully decoded per cycle) and the average renewal time (the expected number of transmissions needed to deliver the packet with up to $\kmax$ transmission rounds) \cite{Caire01}. Let $f_k\triangleq\PR{\nack_k}, k\ge1$ be the probability of $k$ successive errors so the probability of successful decoding in the $k$th round is given by $\PR{\nack_{k-1}\wedge \Isig_k\ge\R }=f_{k-1}-f_k$ \cite{Caire01}. The throughput is then calculated as follows \cite{Caire01} \begin{align} \label{eta.rr.detail} \eta^{\tnr{ir}}_{\kmax} &=\frac{R(1-f_1)+ R(f_1-f_2)+ \ldots+R(f_{K-1}-f_K)} {1\cdot(1-f_1)+2\cdot(f_1-f_2)+\ldots+K\cdot(f_{K-1})}\\ \label{eta.rr} &=\frac{\R (1-f_K)}{1+\sum_{k=1}^{K-1}f_k}. \end{align} Because the instantaneous \gls{csi} is not available at the transmitter, the highest achievable throughput is given by the ergodic capacity\footnote{We use the term ``capacity'' to denote the achievable rate for a \emph{given} distribution of $X$.} of the channel \cite{Caire01,Wu10} \begin{align}\label{C.erg} \ov{C}\triangleq \Ex_\SNRrv[ I(\SNRrv]). \end{align} However, achieving $\ov{C}$ is not obvious: as shown in \cite{Caire01}, it can be done growing simultaneously $\R$ and $\kmax$ to infinity but this approach is impractical due to large memory requirements. \begin{example}[Two-states channel]\label{Ex:2states} Consider a block-fading channel where the \gls{mi} can only take two values, $I_\tnr{a}$ and $I_\tnr{b}$, where $\PR{I=I_\tnr{a}}=1-p$ and $\PR{I=I_\tnr{b}}=p$. The ergodic capacity is given by $\ov{C}=I_\tnr{a}(1-p)+I_\tnr{b} p$. We force the \gls{harq} to deliver the packet at most in the last transmission, \ie $f_K=0$, which means that we impose the constraints on the coding rate $\R\leq KI_\tnr{a}$ if we assume that $I_\tnr{a}<I_\tnr{b}$. Assume $I_\tnr{a}=1, I_\tnr{b}=1.5$, and $p=0.75$ so $\ov{C}=1.375$. For $K=2, 3$ we easily calculate the throughput\footnote{For $\R\leq 1$ we obtain $f_1=0$. For $1<\R\leq 1.5$ -- $f_1=1-p$ and $f_2=0$. For $1.5<\R\leq2$ -- $f_1=1$, $f_2=0$, etc.} as \begin{align}\label{eta.IR} \eta^{\tnr{ir}}_2&= \begin{cases} \R, &\text{if}\quad \R\leq1\\ 0.8\R, &\text{if}\quad 1 <\R \leq 1.5\\ 0.5\R, &\text{if}\quad 1.5 <\R \leq 2 \end{cases}, \end{align} and \begin{align} \eta^{\tnr{ir}}_3&= \begin{cases} \eta^{\tnr{ir}}_2, &\text{if}\quad \R\leq 2\\ 0.48\R, &\text{if}\quad 2 <\R \leq 2.5\\%f_1=1, f_2=(1-p)^2=1/16; \eta=\R 16/33 0.41\R, &\text{if}\quad 2.5 <\R \leq 3 \end{cases}. \end{align} The optimum throughput-rate pairs are then $(\eta^{\tnr{ir}}_2=1.2, \R=1.5)$ and $(\eta^{\tnr{ir}}_3=1.23, \R=3)$. First, the benefit of using \gls{harq} is clear: we are able to transmit without errors with a finite number of channel blocks and go beyond the obvious limit of $I_\tnr{a}$. Second, we note that for $K=2$, after two transmissions, the accumulated \gls{mi} always satisfies $\Isig_2\geq 2$, while the condition $\Isig_2\geq 1.5$ is sufficient to decode the packet. This may be seen as a ``waste'' which will be removed with the idea of cross-packet coding introduced in \secref{Sec:joint.codec}. \end{example} \begin{example}[16QAM over Rayleigh fading channel]\label{Ex:QAM.Rayleigh} Assume now that the transmission is done using symbols drawn uniformly from 16-points \gls{qam} constellation $\X$ \cite[Ch.~2.5]{Szczecinski_Alvarado_book} and that the channel gains follow Rayleigh distribution, \ie \begin{align}\label{pdf.SNR} \pdf_{\SNRrv}(\SNR)=1/\SNRav\exp(-\SNR/\SNRav), \end{align} where $\SNRav$ is the average \gls{snr}. We calculate $I(\SNR)$ and the average $\ov{C}$ using the numerical methods outlined in \cite[Ch.~4.5]{Szczecinski_Alvarado_book} and compare it in \figref{Fig:Rayleigh.conventional} with the throughput $\eta^{\tnr{ir}}_{\kmax}$ when $\kmax\in\set{2,\infty}$.\footnote{$\eta^{\tnr{ir}}_{\infty}$ can be computed by taking $\kmax$ large enough in \eqref{eta.rr.detail} as suggested in \cite{Larsson14} or by evaluating the throughput using the method outlined in the \appref{Sec:OptimalAdaptation} and considering the policy $\pi(\mf{s})=\R$ if $\mf{s}=(0,0)$ and $\pi(\mf{s})=0$ otherwise. We opt for the later method.} The results indicate that i)~there is a significant loss with respect to the ergodic capacity when using truncated \gls{harq}, and ii)~increasing the number of transmission rounds ($K=\infty$) helps recovering the loss for a small-medium range of throughput (\eg for $\eta^{\tnr{ir}}=1$ we gain $\sim 3\dBval$ and the gap to $\ov{C}$ is less than $1\dBval$), but it is less useful in the region of high $\eta^{\tnr{ir}}_K$, \ie in the vicinity of the maximum attainable throughput (\eg for $\eta^{\tnr{ir}}=3$, we gain $1\dBval$ but the gap to $\ov{C}$ is still $\sim5\dBval$). We highlight this well-known effect \cite{Larsson14} to emphasize later the gains of the new coding strategy. \end{example} \begin{figure} \input{./figures/Fig.HARQ.Rayleigh.tex} \caption{Throughput of the conventional \gls{irharq}, compared to the ergodic capacity, $\ov{C}$, in Rayleigh block-fading channel. The $R_\tr{opt}$ curve is an envelope of the throughputs $\eta^{\tnr{ir}}_{\kmax}$ obtained with different coding rates per block $\R\in\set{0.25,0.5,\ldots, 7.75}$.}\label{Fig:Rayleigh.conventional} \end{figure} \section{Cross-packet HARQ}\label{Sec:joint.codec} The examples shown previously indicate that the conventional coding cannot bring the throughput of \gls{harq} close to the capacity unless the nominal coding rate $\R$ and the number of rounds $K$ increase. We would like now to exploit a new coding possibility consisting in joint coding of packets during the \gls{harq} cycle. Let us start with the case of two transmission rounds. In the first round, we use the nominal rate $\R_1$ is used, \ie the packet $\mf{m}_1\in\set{0,1}^{R_1\Ns}$ is encoded \begin{align}\label{encoding.1} \boldsymbol{x}_1=\Phi_1[\mf{m}_1] \in \X^{\Ns}, \end{align} and transmitted over the channel \eqref{y.x.z} producing $\boldsymbol{y}_1=\sqrt{\SNR_1}\boldsymbol{x}_1+\boldsymbol{z}_1$, where $\Phi_k[\cdot]$ is the encoding at the $k$th round. If the packet $\mf{m}_1$ is decoded correctly (which occurs if $I_1\ge\R_1$), a new cycle \gls{harq} starts by the transmission of a new packet. However, if the decoding fails, the packet $\mf{m}_{[2]}=[\mf{m}_1,\mf{m}_2]\in\Binary^{(R_1+R_2) \Ns}$ is encoded using a conventional code designed independently of the codebook corresponding to the first transmission \begin{align}\label{conventional.code} \boldsymbol{x}_2=\Phi_2[\mf{m}_1,\mf{m}_2] \in \mc{X}^{\Ns}, \end{align} which yields the channel outcome $\boldsymbol{y}_2=\sqrt{\SNR_2}\boldsymbol{x}_2+\boldsymbol{z}_2$ as depicted in \figref{Fig:multi_message}.\footnote{This coding strategy is introduced without any claim of optimality. The undeniable advantage of using independently generated codebooks is the simplicity of implementation. We note that the idea of using $\Phi_2$ independent of $\Phi_1$ was also proposed in \cite{Trillingsgaard14,Nguyen15}.} \begin{figure}[tb] \begin{center} \resizebox{1\linewidth}{!}{\input{./figures/MM_model_V4.tex}} \end{center} \caption{Model of the adaptive \gls{xp} transmission: the \gls{harq} controller uses the information $\mc{F}$ obtained over the feedback channel to choose the rate for the next round; $\mc{F}$ represent \gls{ack}/\gls{nack} acknowledgement in the case of one bit feedback, or, it carries the index of the coding rate in the case of rate-adaptive transmission (\secref{Sec:multibit}).}\label{Fig:multi_message} \end{figure} Intuitively, by introducing $\mf{m}_2$ we want to prevent the ``waste'' of \gls{mi}, which happens if $\Isig_2$ is much larger than $\R_1$, \cf \exref{Ex:2states}. After the second transmission, the receiver decodes the packets $[\mf{m}_1, \mf{m}_2]$ using the observations $\boldsymbol{y}_{[2]}=[\boldsymbol{y}_1, \boldsymbol{y}_2]$. The codebook obtained after two transmissions is illustrated in \figref{Fig:codebook}. The associated decoding conditions based on the channel outcomes $\boldsymbol{y}_{[2]}$ are given by \begin{align} \label{dec.1} \Isig_2=I_1+I_2&\ge R_1+R_2,\\ \label{dec.2} I_2&\ge R_2, \end{align} where \eqref{dec.1} is a constraint over the sum-rate that guarantees the joint decoding of the packets pair $(\mf{m}_1, \mf{m}_2)$ while \eqref{dec.2} ensures the correct decoding of the packet $\mf{m}_2$. This means, the \gls{mi} must be accumulated to decode each of the packets even though the decoding is done jointly. The formal proof of \eqref{dec.1} and \eqref{dec.2} is presented in the Appendix~\ref{Sec:Decoding_Proof}. Similar decoding conditions were presented in the context of \gls{phy} security in \cite{LeTreust13}. While the event $\nack_1$ remains unchanged with respect to the conventional coding, the event $\nack_2$ means that $\nack_1$ occurred, as well as, that \eqref{dec.1} and \eqref{dec.2} are not satisfied \begin{align}\nonumber \nack_2&=\Big\{\bigl( I_1<R_1 \bigr) \wedge \ov{\bigl((\Isig_2\ge \Rsig_2) \wedge (I_2\ge R_2) \bigr)}\Big\}\\ \label{nack.2.a} &=\Big\{ ( I_1<R_1) \wedge \bigl( (\Isig_2<\Rsig_2) \vee ( I_2<R_2) \bigr) \Big\} \\ \label{nack.2} &=\Big\{\bigl( I_1<R_1 \bigr) \wedge \bigl(\Isig_2<\Rsig_2\bigr)\Big\}, \end{align} where $\Rsig_k\triangleq\sum_{l=1}^k \R_l$ and the event $\ov{E}$ is the complement of $E$. To pass from \eqref{nack.2.a} to \eqref{nack.2} we used the decoding failure implication \begin{align}\nonumber \set{I_1<R_1 \wedge I_2<R_2}\implies \set{ I_1<R_1 \wedge \Isig_2<\Rsig_2}, \end{align} which means that $\nack_1$ combined with \eqref{dec.1} implies \eqref{dec.2}. The above conditions generalize straightforwardly for any $k>1$ with $\R_k$ being the rate of the packet $\mf{m}_k$ added in the $k$th round \begin{align} \label{nack.k} \nack_k=\set{\nack_{k-1} \wedge \bigl(\Isig_k<\Rsig_k \bigr)}. \end{align} To calculate the throughput of such an \gls{xp}, we adopt a similar approach as in \eqref{eta.rr.detail} but we must account for the reward in the $k$ transmission round given by $\Rsig_k$, which yields \begin{align}\nonumber \eta^{\tnr{xp}}_{\kmax} &=\frac{\Rsig_1(1-f_1)+ \Rsig_2(f_1-f_2)+ \ldots+\Rsig_K(f_{K-1}-f_K)} {(1-f_1)+2\cdot(f_1-f_2)+\ldots+K\cdot(f_{K-1})}\\ \label{throughput.joint} &=\frac{\sum_{k=1}^{K}R_k \big(f_{k-1}-f_K\big) }{1+\sum_{k=1}^{K-1} f_k}. \end{align} Here, again $f_k=\PR{\nack_k}, k\ge1$ with $\nack_k$ defined by \eqref{nack.k}. As a sanity check we can set $R_k=0, k=2, \ldots, K$, and recover the conventional single-packet \gls{harq}, \ie \eqref{throughput.joint} will be equivalent to \eqref{eta.rr}. The fundamental difference of the proposed \gls{xp} with respect to the conventional \gls{harq} appears now clearly in the numerator of \eqref{throughput.joint} which expresses the idea of variable rate transmission due to encoding of multiple packets. Nevertheless, not only the numerator changed with respect to \eqref{eta.rr} but also the denominator is different due to the new definition of $\nack_k$ in \eqref{nack.k}. \begin{figure}[tb] \psfrag{1}[l][l][0.7]{$1$} \psfrag{Ns}[r][r][0.7]{$\Ns$} \psfrag{Ns1}[l][l][0.7]{$\Ns+1$} \psfrag{2Ns}[l][l][0.7]{$~2\Ns$} \psfrag{2r1}[r][r][0.7]{$2^{R_1\Ns}$} \psfrag{2r12}[l][l][0.7]{$2^{(R_1+R_2)\Ns}$} \psfrag{vdots}[l][l][0.7]{$\vdots$} \psfrag{PHI1}[l][l][0.7]{$\Phi_1$} \psfrag{PHI2}[l][l][0.7]{$\Phi_2$} \centering \vskip 0.1in \scalebox{1}{\includegraphics[width=0.5\linewidth]{./figures/codebook2.eps}} \caption{Illustration of the codebook defined through the coding function $\Phi_1$ in \eqref{encoding.1} and the joint coding function $\Phi_2$ in \eqref{conventional.code}. Each codeword composed of $2\Ns$ symbols is indexed by the packet $\mf{m}_{[2]}$. The first $\Ns$ symbols are created without indexing by $\mf{m}_2$ so we artificially repeat them $2^{R_2\Ns}$ times to match the number of codewords in the codebook $\Phi_2$.} \label{Fig:codebook} \end{figure} \begin{example}[Two-state channel and \gls{xp}]\label{Ex:2state.MP} We consider now the proposed \gls{xp} in the scenario of \exref{Ex:2states}. Let us start, as before, with $\kmax=2$ and $R_1=1.5$. After a decoding failure (which means that we obtained $I_1=I_\tnr{a}=1$), we are free to define any rate $R_2$. In the absence of any formal criterion (more on that in \secref{Sec:Rate_Optimazation}), we take the following auxiliary (and somewhat ad-hoc) condition: we want to guarantee a non-zero successful decoding probability, \ie $f_2<1$. Here, since $\Isig_2\in(2,2.5)$, any $R_2 \leq 1$ can ensure that $f_2<1$. In particular, if the rate $R_2\leq 0.5$ we guarantee a much stronger condition $f_2=0$. For the case when $\kmax=2$ and using $R_2=0.5$, we obtain $f_1=0.25$ and $f_2=0$. The throughput is then given by \begin{align}\label{eta.j.c.2} \eta^{\tnr{xp}}_2=\frac{\R_1+0.25\R_2 }{1+0.25}=1.3. \end{align} Thus, we used exactly the same channel resources as in the conventional \gls{harq}, obtained the same guarantee of successful decoding ($f_2=0$) after two transmission rounds, but the throughput is larger. The difference is that, while we still have $\Isig_2\in(2,2.5)$, we now use $\Rsig_2=2$ to eliminated the ``waste'' of \gls{mi} in the conventional \gls{irharq}, where $\Rsig_2=1.5$. The improvement may be seen as the increase in the throughput (from $\eta^{\tnr{ir}}_2=1.2$ to $\eta^{\tnr{xp}}_2=1.3$) or as the reduction in the memory requirements (\ie we obtain a better throughput with smaller $K$, see $\eta^{\tnr{ir}}_3=1.23$ in \exref{Ex:2states}). The price to pay for this advantages is the possible increase in complexity of cross-packet encoding/decoding. Similarly, for $\kmax=3$, we can use the larger value of $\R_2$ (that guarantees our objective of decodability, $f_2<1$), \ie $\R_2=1$. In this case, $f_1=0.25$, and $f_2=\PR{I_1<1.5 \wedge \Isig_2<2.5}=0.0625$. In the third transmission we observe $\Isig_{3} \in(3,3.5)$ so, using $\R_3=0.5$, we obtain $f_3=0$ and thus the throughput is calculated as \begin{align}\label{eta.j.c.3} \eta_3^{\tnr{xp}}=\frac{\R_1+0.25\R_2 + 0.0625\R_3}{1+0.25+0.0625}\approx 1.36, \end{align} which is already quite close to $\ov{C}=1.375$. \end{example} The improvement of the throughput in \gls{xp} is due to the way the codebook is constructed. While the conventional \gls{irharq}, see \secref{Sec:HARQ}, makes a rigid separation of the codewords into the fixed-content subcodewords -- an approach which is blind to the channel realizations, in \gls{xp} we match the information content of the codebook following the outcome of the transmissions. \section{Example of a practical implementation}\label{Sec:Practical} Until now, we have adopted the perfect decoding assumption, \ie the decoding error in the $k$th round is equivalent to the event $\set{I_1<\R_1\wedge\ldots\wedge \Isig_{k}<\Rsig_{k}}$. We will remove now this idealization to highlight also the practical aspect of \gls{xp}. We thus implement the cross-packet encoders in \figref{Fig:multi_message} using turbo encoders. To this end, as shown in \figref{Fig:HARQ.Turbo} we separate each encoder $\Phi_k$ into i)~a bit-level multiplexer, $\mc{M}$, whose role is to interleave the input packets $\mf{m}_1, \ldots, \mf{m}_k$ and produce the packet, $\mf{m}_{[k]}$, ii)~a conventional turbo-encoder (TC), iii)~the rate-matching puncturer, $\mc{P}$, which ensures that all binary codewords $\boldsymbol{c}_k$ have the same length, $\Nc$, and iv)~a modulator, which maps the codewords $\boldsymbol{c}_k$ onto the codewords $\boldsymbol{x}_k$ from the constellation $\mc{X}$; since we use $16$ary \gls{qam}, $\Nc=\Ns \log_2(M)$. The multiplexers $\mc{M}_k$ are implemented using pseudo-random interleaving. The encoders (TC) are constructed via parallel concatenation of two recursive convolutional encoders with polynomials $[13/15]_8$. Each TC produces a $N_{\tr{b},[k]}=\Ns\R_1+\ldots+\Ns\R_k$ systematic (input) bits and $N_{\tr{p}}=2N_{\tr{b},[k]}$ parity bits $\boldsymbol{p}_k$.\footnote{We neglects the effect of the trellis terminating bits.} The bits $\boldsymbol{c}_k$ are obtained concatenating ``fresh'' systematic bits $\mf{m}_k$ (those which were not transmitted in the previous rounds) and the parity bits selected from $\boldsymbol{p}_k$ via a periodic puncturing. Such a construction of the encoders is of course not optimal and better interleavers and puncturers may be sought; however, their optimal design represents a challenge of its own and must be considered out of scope of the example we present here. The encoding is rather straightforward and can be implemented using conventional elements. The decoding in the $k$th round is slightly more involved because it is done using outcomes of all transmissions, $\boldsymbol{y}_{[k]}$. From this perspective, we may see the binary codewords $\boldsymbol{c}_1, \ldots, \boldsymbol{c}_k$ as an outcome of $2k$ concatenated convolutional encoders (two encoders per \gls{harq} round), each producing the sequence with increasing lengths. The decoding of multiple encoding units was already addressed before \cite{huettinger2002design}\cite{divsalar1995multiple} and requires implementation of $2k$ \gls{bcjr} decoders (one for each of the encoders) exchanging the extrinsic probabilities for the information bits. We implement the serial scheduling, that is, once a \gls{bcjr} decoder is activated, it must wait till all other \gls{bcjr} decoders are activated. One iteration is defined as $2k$ activations. The results we present are obtained using algorithm from the library \cite{Doray15}; we use $\Ns=1024$ and four decoding iterations. \usetikzlibrary{arrows} \usetikzlibrary{shapes} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{shapes.misc} \begin{figure}[bt] \begin{center} \resizebox{1\linewidth}{!}{\input{./figures/Enc_model_5.tex}} \caption{Implementation of the encoders $\Phi_k[\cdot]$ using turbo codes (TC), bit multiplexing ($\mc{M}_k$), puncturing ($\mc{P}$), and modulation ($\mc{X}$).}\label{Fig:HARQ.Turbo} \end{center} \end{figure} Since we do not have the closed-form formula which describes the probability of error under particular channel conditions, especially when multiples transmissions are involved, the rate-adaptation approach seems to be out of reach and we focus on finding the fixed coding rates $\R_k, k=1,\ldots,\kmax$. We use the brute search over the space of available coding rates which verifies the following conditions $\sum_{k=1}^{\kmax}\R_{k}\leq 8$, $\R_{1}\in\set{1.5,1.75,2,\ldots,3.75}$, $\R_{k}\in\set{0,0.25,\ldots,3.75}, \forall k>1$. The results obtained are shown in \figref{Fig:Rayleigh.joint.truncated.allocation.turbo} where the \gls{snr} gap (for the throughput $\eta=3$) between \gls{xp} and the conventional \gls{irharq} is $\sim1.5\dBval$ for $\kmax=2$ and $\sim2\dBval$ for $\kmax=3\dBval$. We attribute a small improvement of the throughput $\eta^{\tnr{xp}}_3$ over $\eta^{\tnr{xp}}_2$ to the suboptimal encoding scheme we consider in this example. We also note that the improvement of $\eta^{\tnr{ir}}_3$ with respect to $\eta^{\tnr{ir}}_2$ does not materialize. This is because \gls{irharq} is optimized for $\R_1$ but, due to limitation of the turbo encoder which generates only $3\Nb$ bits, a full redundancy cannot be always obtained and, in such a case, we are forced to repeat the systematic and parity bits. This explains why $\eta^{\tnr{ir}}_3$ and $\eta^{\tnr{ir}}_2$ are very similar for low throughput. On the other hand, they should be, indeed, similar for high throughput as we have seen in the numerical examples before. We show in \figref{Fig:Rayleigh.joint.truncated.allocation.turbo} the ergodic capacity where the gap to the throughput of the TC-based transmission is increased by additional ~$3\dBval$ which should be expected when using relatively-short codewords and practical decoders. \begin{figure}[tb] \input{./figures/Fig.HARQ.Truncated.Rayleigh.Joint.Allocation.Turbo.Code.tex} \caption{Turbo-coded transmission: the conventional \gls{irharq} ($\eta_\kmax$) is compared to \gls{xp} ($\eta^{\tnr{xp}}_\kmax$) in Rayleigh block-fading channel. }\label{Fig:Rayleigh.joint.truncated.allocation.turbo} \end{figure}
{'timestamp': '2016-06-17T02:10:35', 'yymm': '1606', 'arxiv_id': '1606.05182', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05182'}
arxiv
\section*{Abstract} \else \normalsize \begin{center} {\bf Summary\vspace{-.5em}\vspace{0pt}} \end{center} \quotation \fi} \def\if@twocolumn\else\endquotation\fi{\if@twocolumn\else\endquotation\fi} \newcommand{\mbox{{\bf y}}}{\mbox{{\bf y}}} \newcommand{\mbox{\boldmath $w$}}{\mbox{\boldmath $w$}} \newcommand{\mbox{\boldmath $s$}}{\mbox{\boldmath $s$}} \newcommand{\mbox{\boldmath $g$}}{\mbox{\boldmath $g$}} \newcommand{\mbox{\boldmath $u$}}{\mbox{\boldmath $u$}} \newcommand{\mbox{\boldmath $v$}}{\mbox{\boldmath $v$}} \newcommand{\mbox{\boldmath $x$}}{\mbox{\boldmath $x$}} \newcommand{\mbox{{\bf 0}}}{\mbox{{\bf 0}}} \newcommand{\mbox{\boldmath $\alpha$}}{\mbox{\boldmath $\alpha$}} \newcommand{\mbox{\boldmath $\mu$}}{\mbox{\boldmath $\mu$}} \newcommand{\mbox{{\bf f}}}{\mbox{{\bf f}}} \newcommand{\mbox{{\bf b}}}{\mbox{{\bf b}}} \newcommand{\mbox{{\bf 1}}}{\mbox{{\bf 1}}} \newcommand{\mbox{\boldmath $Z$}}{\mbox{\boldmath $Z$}} \newcommand{\mbox{{\bf e}}}{\mbox{{\bf e}}} \newcommand{\mbox{{\bf r}}}{\mbox{{\bf r}}} \newcommand{\mbox{{\bf z}}}{\mbox{{\bf z}}} \newcommand{\mbox{{\tiny old}}}{\mbox{{\tiny old}}} \newcommand{\mbox{{\tiny new}}}{\mbox{{\tiny new}}} \newcommand{\mbox{$\gamma^{\tnew}$}}{\mbox{$\gamma^{\mbox{{\tiny new}}}$}} \newcommand{\mbox{$\gamma^{\tnew}_j$}}{\mbox{$\gamma^{\mbox{{\tiny new}}}_j$}} \newcommand{\mbox{$\gamma^{\told}$}}{\mbox{$\gamma^{\mbox{{\tiny old}}}$}} \newcommand{\mbox{$\gamma^{\told}_j$}}{\mbox{$\gamma^{\mbox{{\tiny old}}}_j$}} \newcommand{\mbox{$\zeta^{\tnew}$}}{\mbox{$\zeta^{\mbox{{\tiny new}}}$}} \newcommand{\mbox{$\zeta^{\told}$}}{\mbox{$\zeta^{\mbox{{\tiny old}}}$}} \newcommand{\mbox{$\phi^{\tnew}$}}{\mbox{$\phi^{\mbox{{\tiny new}}}$}} \newcommand{\mbox{$\phi^{\told}$}}{\mbox{$\phi^{\mbox{{\tiny old}}}$}} \newcommand{\mbox{$\tilde \phi^{\tnew}$}}{\mbox{$\tilde \phi^{\mbox{{\tiny new}}}$}} \newcommand{\mbox{$\tilde \phi^{\told}$}}{\mbox{$\tilde \phi^{\mbox{{\tiny old}}}$}} \newcommand{\mbox{\boldmath $J$}}{\mbox{\boldmath $J$}} \newcommand{\mbox{\boldmath $\psi$}}{\mbox{\boldmath $\psi$}} \newcommand{\mbox{\boldmath $\epsilon$}}{\mbox{\boldmath $\epsilon$}} \newcommand{\mbox{\boldmath $\gamma$}}{\mbox{\boldmath $\gamma$}} \newcommand{\mbox{\boldmath $\beta$}}{\mbox{\boldmath $\beta$}} \newcommand{\mbox{\boldmath $\omega$}}{\mbox{\boldmath $\omega$}} \newcommand{\mbox{\boldmath $\kappa$}}{\mbox{\boldmath $\kappa$}} \newcommand{\mbox{\boldmath $\theta$}}{\mbox{\boldmath $\theta$}} \newcommand{\mathop{\frac{1}{2}}}{\mathop{\frac{1}{2}}} \newcommand{\var}{\mathop{\rm var}} \newcommand{\mathop{\rm E}}{\mathop{\rm E}} \newcommand{\mathop{\rm cov}}{\mathop{\rm cov}} \newcommand{\mathop{\rm corr}}{\mathop{\rm corr}} \newcommand{\mathop{\rm rank}}{\mathop{\rm rank}} \newcommand{\mathop{\rm row~space}}{\mathop{\rm row~space}} \makeatletter \@addtoreset{equation}{section} \makeatother \newtheorem{lemma}{Lemma}[section] \newtheorem{remark}{Remark}[section] \newenvironment{Remark}{\begin{remark} \rm}{\end{remark}} \newcommand{\myappendix}[1]{ \setcounter{section}{1} \renewcommand{\thesection}{A\arabic{section}}} \newcommand{\fah}[1]{ \vspace{-0.2in}\nopagebreak \begin{center} {\sf -----#1-----} \end{center}\nopagebreak \vspace{-0.1in}} \section*{References} \vspace{-10pt} \parindent=0pt \begin{trivlist} \item[] Almeida, C. and C. Czado, (2012). `Bayesian inference for stochastic time-varying copula models', {\em Computational Statistics \& Data Analysis}, 56, 1511--1527. \item[] Amisano, G. \& G. Fagan, (2013). `Money growth and inflation: A regime switching approach', {\em Journal of International Money and Finance}, 33, 118--145. \item[] Azzalini, A. \& A. Capitanio,~(2003). `Distribution generated by perturbation of symmetry with emphasis on a multivariate skew t distribution', {\em Journal of the Royal Statistical Society}, Series B, 65, 367--389. \item[] Barndorff-Nielsen, O. \& G. Schou, (1973). `On the Parameterization of Autoregressive Models by Partial Autocorrelations', {\em Journal of Multivariate Analysis}, 3, 408--419. \item[] Beare, B. K., (2010). `Copulas and temporal dependence', {\em Econometrica}, 78, 395--410. \item[] Beare, B. K., \& J. Seo~(2015). `Vine copula specifications for stationary multivariate Markov chains', {\em Journal of Time Series Analysis}, 36, 228--246. \item[] Brockwell, P.J. \& R.A. Davis,~(1991), {\em Time Series: Theory and Methods}, 2nd Ed., NY: Springer. \item[] Chan, J.C.C (2015). `The Stochastic Volatility in Mean Model with Time-Varying Parameters: An Application to Inflation Modeling', {\em Journal of Business and Economic Statistics}, to appear. \item[] Chan, J.C.C. \& C.Y.L. Hsiao, (2014). `Estimation of Stochastic Volatility Models with Heavy Tails and Serial Dependence', in {\em Bayesian Inference in the Social Sciences}, Eds. I. Jeliazkov and X.-S. Yang, Wiley: NJ. \item[] Clark, T. E. \& F. Ravazzolo, (2015). `Macroeconomic Forecasting Performance under Alternative Specifications of Time-varying Volatility', {\em Journal of Applied Econometrics}, 30, 551--575. \item[] Creal, D.D. \& R.S. Tsay, (2015). `High dimensional dynamic stochastic copula models', {\em Journal of Econometrics}, 189, 335--345. \item[] DeJong, D.N., R. Liesenfeld, G.V. Moura, J.-F. Richard, H. Dharmarajan, (2013). `Efficient Likelihood Evaluation of State-Space Representations', {\em Review of Economic Studies}, 30, 538--567. \item[] De Lira Salvatierra, I. \& A.J. Patton~(2015), `Dynamic copula models and high frequency data', {\em Journal of Empirical Finance}, 30, 120--135. \item[] Demarta, S. \& A. McNeil, (2005). `The t-copula and related copulas', {\em International Statistical Review}, 73, 111--129. \item[] Durbin, J. \& S.J. Koopman, (2012). {\em Time Series Analysis by State Space Methods}, 2nd Ed., OUP. \item[] Embrechts, P., A. McNeil \& D. Straumann, (2001). `Correlation and dependency in risk management: properties and pitfalls', in M. Dempster \& H. Moffatt, (Eds.) {\em Risk Management: Value at Risk and Beyond} Cambridge University Press, 176--223. \item[] Faust, J. \& J. Wright, (2013). `Forecasting Inflation', in G. Elliot \& A. Timmermann (eds.), {\em Handbooks in Economics}, Vol. 2A., 3--56. \item[] Frees, E.W. \& P. Wang, (2006). `Copula credibility for aggregate loss models', {\em Insurance: Mathematics and Economics}, 38, 360--373. \item[] Hafner, C.M. \& H. Manner, (2012). `Dynamic stochastic copula models: estimation, inference and applications', {\em Journal of Applied Econometrics}, 27, 269--295. \item[] Hamilton, J.D., (1994). {\em Time Series Analysis}, Princeton University Press: NJ. \item[] Gneiting, T. \& A.E. Raftery,~(2007). `Strictly Proper Scoring Rules, Prediction and Estimation', {\em Journal of the American Statistical Association}, 102, 359--378. \item[] Gneiting, T. \& R. Ranjan,~(2011). `Comparing Density Forecasts using Threshold- and Quantile-Weighted Scoring Rules', {\em Journal of Business and Economic Statistics}, 29, 411--422. \item[] Godsill, S., A. Doucet \& M. West~(2004). `Monte Carlo Smoothing for Nonlinear Time Series', {\em Journal of the American Statsitical Association}, 99, 156--168. \item[] Gordon, N.J., D.J. Salmond and A.F.M. Smith (1993). `A Novel Approach to Non-Linear and Non-Gaussian Bayesian State Estimation', {\em IEEE Proceedings, F140}, 107--133. \item[] Hamilton, J.D. (1989). `A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle', {\em Econometrica}, 57, 357--384. \item[] Joe, H., (1997). {\em Multivariate Models and Dependence Concepts}, Chapman and Hall. \item[] Joe, H. (2005). `Asymptotic Efficiency of the Two-Stage Esimation Method for Cupula-Based Models', {\em Journal of Multivariate Analysis}, 94, 401--419. \item[] Jungbacker, B. \& S.J. Koopman~(2007). `Monte Carlo Estimation for Nonlinear Non-Gaussian State Space Models', {\em Biometrika}, 94: 4, 827-839. \item[] Kauermann, G., C. Schellhase, D. Ruppert~(2013). `Flexible Copula Density Estimation with Penalized Hierarchical B-splines', {\em Scandinavian Journal of Statistics: Theory and Applications}, 40, 685--705. \item[] Kim, S., N. Shephard \& S. Chib, (1998). `Stochastic Volatility: Likelihood Inference and Comparison with ARCH Models', {\em Review of Economic Studies}, 65, 361--393. \item[] Lambert, P. \& F. Vandenhende, (2002). `A copula-based model for multivariate non-normal longitudinal data: analysis of a dose titration safety study on a new antidepressant', {\em Statistics in Medicine}, 21, 3197--3217. \item[] Ljung, L. (1999). {\em System Identification: Theory for the User}, 2nd Ed., Prentice-Hall. \item[] Loaiza-Maya, R., M.S. Smith \& W. Maneesoonthorn~(2017). `Time Series Copulas for Heteroskedastic Data', {\em Journal of Applied Econometrics}, forthcoming. \item[] L\"{u}tkepohl, H., (2006). {\em New Introduction to Multiple Time Series Analysis}, Springer-Verlag: Berlin. \item[] Oh, D.H. \& A.J. Patton~(2015). `Modelling Dependence in High Dimensions with Factor Copulas', {\em Journal of Business and Economic Statistics}, forthcoming. \item[] Nelsen, R., (2006), {\em An Introduction to Copulas}. 2nd ed., New York, Springer. \item[] Patton, A.J., (2006). `Modelling Asymmetric Exchange Rate Dependence', {\em International Economic Review}, 47, 527--556. \item[] Patton, A.J., (2012). `A Review of Copula Models for Economic Time Series', {\em Journal of Multivariate Analysis}, 110, 4--18. \item[] Pitt, M., D. Chan \& R. Kohn~(2006). `Efficient Bayesian Inference for Gaussian Copula Regression Models', {\em Biometrika}, 93, 537--554. \item[] Richard, J.F. \& W. Zhang, (2007). `Efficient high-dimensional importance sampling', {\em Journal of Econometrics}, 141, 1385--1411. \item[] Scharth, M. \& Kohn, R.,~(2016). `Particle Efficient Importance Sampling', {\em Journal of Econometrics}, 190, 133--147. \item[] Shapiro, S. \& M. Wilk, (1965). `An Analysis of Variate Test for Normality (Complete Samples)', {\em Biometrika}, 52, 3-4, 591--611. \item[] Shephard, N. \& M. Pitt,~(1997). `Likelihood analysis of non-Gaussian measurement time series', {\em Biometrika}, 84:3, 653--667. \item[] Shih, J.H. \& T.A. Louis, (1995). `Inferences on the association parameter in copula models for bivariate survival data', {\em Biometrics}, 51, 4, 1384--99. \item[] Shimazaki, H. \& S. Shinomoto, (2010). `Kernel bandwidth optimization in spike rate estimation', {\em Journal of Computational Neuroscience}, 29, 171--182. \item[] Smith, M.S., (2015). `Copula modelling of dependence in multivariate time series', {\em International Journal of Forecasting}, 31, 815--833. \item[] Smith, M.S., Q. Gan \& R. Kohn~(2012). `Modelling Dependence using Skew t Copulas: Bayesian Inference and Applications', {\em Journal of Applied Econometrics}, 27, 500--522. \item[] Smith, M., A. Min, C. Almeida \& C. Czado, (2010). `Modeling Longitudinal Data using a Pair-Copula Decomposition of Serial Dependence', {\em Journal of the American Statistical Association}, 105, 492, 1467-1479. \item[] Smith, M.S. \& S.P. Vahey, (2016). `Asymmetric density forecasting of U.S. macroeconomic variables using a Gaussian copula model of cross-sectional and serial dependence', {\em Journal of Business and Economic Statistics}, 34:3, 416--434. \item[] Song, P. (2000). `Multivariate Dispersion Models Generated from Gaussian Copula', {\em Scandinavian Journal of Statistics}, 27, 305--320. \item[] Stock, J.H. and M.W. Watson,~(2007). `Why Has U.S. Inflation Become Harder to Forecast?', {\em Journal of Money, Credit and Banking}, 39, 3--33. \item[] Stroud, J.R., P. M\"uller \& N.G. Polson,~(2003). `Nonlinear State-Space Models with State-Dependence Variances', {\em Journal of the American Statistical Association}, 98:462, 377--386. \item[] Tsukahara, H. (2005). `Semiparametric estimation in copula models', {\em The Canadian Journal of Statistics}, 33, 357--375. \end{trivlist} \section{Introduction}\label{sec:intro} \vspace{-10pt} Parametric copulas constructed through the inversion of a latent multivariate distribution (Nelsen~2006, sec. 3.1) are popular for the analysis of high-dimensional dependence. For example, Gaussian (Song~2000), t (Embrechts, McNeil \& Straumann~2001) and skew t (Demarta \& McNeil~2005; Smith, Gan \& Kohn~2012) distributions have all been used to form such `inversion copulas'. More recently, Oh \& Patton~(2015) suggest employing distributions formed through marginalization over a small number of latent factors. However, the copulas constructed from these distributions cannot capture accurately the serial dependence exhibited by many time series. As an alternative, we instead propose a broad new class of inversion copulas formed by inverting parametric nonlinear state space models. Even though the dimension of such a copula is high, it is parsimonious because its parameters are those of the underlying latent state space model. The copula also has the same serial dependence structure as the state space model. But when such copulas are combined with an arbitrary marginal distribution for the data, they allow for the construction of new time series models. These models allow for substantially more flexible density forecasts than the underlying state space models themselves, because the latter typically have rigid margins that are often inconsistent with that observed empirically. When the latent state space model is non-stationary, the resulting copula model for the data is also, but with time invariant univariate margins. Alternatively, when the state space model is stationary, so is the resulting copula model, and we focus on this case here. When the state space model is Gaussian and linear, the resulting inversion copula is a Gaussian copula (Song~2000) with a closed form likelihood. However, in general, the likelihood function of a nonlinear state space model cannot be expressed in closed form. Similarly, neither can the density of the corresponding inversion copula. Nevertheless, we show how existing techniques for computing the likelihood of such state space models can also be used to compute the copula densities. We also provide an efficient spline approximation method for computing the marginal density and quantile function of the state space model. These are the most computationally demanding aspects of evaluating the copula density for time series data. We outline in detail how Bayesian techniques can be used to compute posterior estimates of the copula model parameters. A Markov chain Monte Carlo (MCMC) sampler is used, where the existing methods for efficiently sampling the states of a state space model can be employed directly. We also study the time series properties of the copula models, show how to compute measures of serial dependence, as well as construct density forecasts. We show that the density forecasts from the copula model better reflect the nature of the empirical data distribution than the state space model counterpart in real world applications. Copula models are used extensively to model cross-sectional dependence, including between multiple time series; see Patton~(2012) for a review. However, their use to capture serial dependence is much more limited. Joe~(1997, pp.243-280), Lambert \& Vandenhende~(2002), Frees \& Wang~(2006), Beare~(2010), Smith, Min, Almeida \& Czado~(2010) and Loaiza-Maya, Smith \& Maneesoonthorn~(2017) use Archimedean, elliptical or decomposable vine copulas to capture serial dependence in univariate time series. While the likelihood is available in closed form for these copulas, they cannot capture as wide a range of serial dependence structures as the inversion copulas proposed here can. Moreover, the proposed inversion copulas are simple to specify, often more parsimonious, and can be easier to estimate than the copulas used previously. Recently, copulas with time-varying parameters have proven popular for the analysis of multivariate time series data; for example, see Almeida \& Czado~(2012), Hafner \& Manner~(2012), De Lira Salvatierra \& Patton~(2015) and Creal \& Tsay~(2015). However, these authors use copulas to account for the (conditional) cross-sectional dependence as in Patton~(2006). This is completely different to our objective of constructing a $T$-dimensional copula for serial dependence. Semi- and nonparametric copula functions (Kauermann, Schellhase \& Ruppert~2013) can also be used to model serial dependence. However, such an approach is better suited to longitudinal data, where there are repeated observations of the time series. To highlight the broad range of new copulas that can be formed using our approach, we consider three in detail. They are formed by inversion of three stationary latent state space models that are popular in forecasting macroeconomic time series. The first is a stochastic volatility model with an unobserved first order autoregressive mean component. The second is a Markov switching first order autoregression. The third is a Gaussian unobserved component model, where the unobserved component follows a $p$th order autoregression. When forming an inversion copula, all characteristics (including moments) of the marginal distribution of the state space model are lost, leaving the parameters potentially unidentified. For each of the three inversion copulas we study in detail, we solve this problem by imposing constraints on the parameter space. We show how to implement the MCMC sampling scheme, where the states are generated using existing methods, and the parameters are drawn efficiently from constrained distributions. In an empirical setting, we also show how to estimate the copula parameters using maximum likelihood. To show that that using an inversion copula with a flexible margin can substantially improve forecast density accuracy, compared to employing the state space model directly, we use it to model and forecast quarterly U.S. broad inflation and U.S. electricity inflation. This is a long-standing problem on which there is a large literature (Faust \& Wright~2013). A wide range of univariate time series models have been used previously, including the three state space models examined here. However, all three have marginal distributions that are inconsistent with that observed empirically for inflation, which exhibits strong positive skew and heavy tails. Moreover, the predictive distributions from the state space models are either exactly or approximately symmetric-- a feature that places excessively high probability on severe deflation. In comparison, the inversion copula models can employ the same serial dependence structure as the latent state space models, but also incorporate much more accurate asymmetric marginal distributions. We show that this not only improves the fit of the time series models, but that it increases the accuracy of the one-quarter-ahead density forecasts significantly. The rest of the paper is organized as follows. In Section~\ref{sec:icop} we first define a time series copula model, and then outline the construction of an inversion copula from a nonlinear state space model. The special case of a Gaussian linear state space model is considered separately. We then discuss estimation, time series properties, measures of serial dependence and prediction. In Section~\ref{sec:threecop} we discuss the three inversion copulas that we examine in detail, while in Section~\ref{sec:empirical} we present the analyses of the U.S. broad inflation and U.S. electricity inflation; Section~\ref{sec:disc} concludes. In a supplementary appendix, we provide a simulation study that verifies the proposed methodology in a controlled setting (Section A), as well as supplementary figures for the U.S. electricity inflation application (Section B). \section{Time Series Copula Models}\label{sec:icop} \vspace{-10pt} Consider a discrete-time stochastic process $\{Y_t\}_{t=1}^T$, with a time series of observed values $\bm{y}=(y_1,\ldots,y_T)$. Then a copula model decomposes its joint distribution function as \begin{equation} F_Y(\bm{y})=C(\bm{u})\,. \label{eq:datacdf} \end{equation} Here, $\bm{u}=(u_1,\ldots,u_T)$, $u_t=G(y_t)$, and $G$ is the marginal distribution function of $Y_t$, which we assume to be time invariant. The function $C$ is a $T$-dimensional copula function (Nelsen~2006, p.45), which captures all serial dependence in the data. All marginal features of the data are captured by $G$, which can be modeled separately, and either parametrically or non-parametrically. While Equation~(\ref{eq:datacdf}) applies equally to both continuous and discrete-valued time series data, we focus here on the former, where the density \begin{equation} f_Y(\bm{y})=\frac{d}{d\bm{y}} F_Y(\bm{y})=c(\bm{u})\prod_{t=1}^T g(y_t)\,.\label{eq:cmod} \end{equation} Here, $g(y)=\frac{d}{d y}G(y)$ is the marginal density of each observation, and $c(\bm{u})=\frac{d}{d \bm{u}}C(\bm{u})$ is widely called the `copula density'. We refer to Equations~(\ref{eq:datacdf}) and~(\ref{eq:cmod}) as a `time series copula model'. The main challenge in constructing such a model is the selection of an appropriate copula function $C$. It has to be both of high dimension, and also account accurately for the potentially complex serial dependence structure in $\{Y_t\}_{t=1}^T$. \vspace{-10pt} \subsection{State Space Inversion Copula}\label{sec:ssiv} \vspace{-5pt} A popular way to construct a high-dimensional copula $C$ is by transformation from a latent continuous-valued stochastic process $\{Z_t\}_{t=1}^T$, with joint distribution function $F_Z$. Let $F_{Z_t}$ be the marginal distribution function of $Z_t$. Then, by setting $U_t=F_{Z_t}(Z_t)$, the $T$ observations of the stochastic process $\{U_t\}_{t=1}^T$ have distribution function \[ C(\bm{u})=F_Z(F_{Z_1}^{-1}(u_1),\ldots,F_{Z_T}^{-1}(u_T))\,, \] and density function \begin{equation} c(\bm{u})=\frac{f_Z(\bm{z})}{\prod_{t=1}^T f_{Z_t}(z_t)}\,, \label{eq:icop} \end{equation} where $z_t=F_{Z_t}^{-1}(u_t)$, $\bm{z}=(z_1,\ldots,z_T)$, $f_Z(\bm{z})=\frac{d}{d \bm{z}} F_Z(\bm{z})$, and $f_{Z_t}(z_t)=\frac{d}{d z_t} F_{Z_t}(z_t)$. The transformation ensures that each $U_t$ is marginally uniformly distributed on $[0,1]$, so that $C$ meets the conditions of a copula function (Nelsen~2006, p.45). This approach to copula construction is called inversion by Nelsen~(2006, sec. 3.1), and we label such a copula an `inversion copula'. Table~\ref{tab:icd} depicts the transformations between $Y_t$, $U_t$ and $Z_t$, along with their distribution functions and domains. Previous choices for $F_Z$ include elliptical (especially the Gaussian and t), skew t distributions and latent factor models (Oh \& Patton~2015). The dependence properties of the resulting inversion copulas are inherited from those of $F_Z$, although all location, scale and other marginal properties of $F_{Z_t}$ are lost in the transformation. In this paper we propose to construct an inversion copula from a latent nonlinear state space model for $\{Z_t\}_{t=1}^T$. In doing so, we aim to construct new high-dimensional copulas that inherit the rich range of serial dependence structures that state space models allow. The nonlinear state space model we consider is generically given by \begin{eqnarray} Z_t|\bm{X}_t=\bm{x}_t &\sim &H_t(z_t|\bm{x}_t;\bm{\psi}) \label{eq:obsn}\\ \bm{X}_t|\bm{X}_{t-1}=\bm{x}_{t-1} &\sim &K_t(\bm{x}_t|\bm{x}_{t-1};\bm{\psi}). \label{eq:trans} \end{eqnarray} Here, $H_t$ is the distribution function of $Z_t$, conditional on a $r$-dimensional state vector $\bm{X}_t$. The states follow a Markov process, with conditional distribution function $K_t$. Parametric distributions are almost always adopted for $H_t$ and $K_t$, and we do so here with parameters we denote collectively as $\bm{\psi}$. In the time series literature Equations~(\ref{eq:obsn}) and~(\ref{eq:trans}) are called the measurement and transition distributions, although in the copula context $Z_t$ is not directly observed, but is also latent. Note that even though the state vector $\bm{X}_t$ has Markov order one, $Z_t$ is Markov with an arbitrary order; see Durbin \& Koopman~(2012) for properties of this model. A key requirement in evaluating the inversion copula density at Equation~(\ref{eq:icop}) is computing the marginal distribution and density functions of $Z_t$. These are given by \begin{eqnarray} F_{Z_t}(z_t|\bm{\psi}) &= &\int H_t(z_t|\bm{x}_t;\bm{\psi})f(\bm{x}_t|\bm{\psi}) \mbox{d}\bm{x}_t \nonumber \\ f_{Z_t}(z_t|\bm{\psi}) &= &\int h_t(z_t|\bm{x}_t;\bm{\psi})f(\bm{x}_t|\bm{\psi}) \mbox{d}\bm{x}_t\,,\label{eq:mdist} \end{eqnarray} where the dependence on $\bm{\psi}$ is denoted explicitly here. The density $h_t(z_t|\bm{x}_t;\bm{\psi}) =\frac{d}{d z_t} H_t(z_t|\bm{x}_t;\bm{\psi})$, and $f(\bm{x}_t|\bm{\psi})$ is the marginal density of the state variable $\bm{X}_t$ which can be derived analytically from the transition distribution for most state space models used in practice. Evaluation of the integrals in Equation~(\ref{eq:mdist}) is typically straightforward either analytically or numerically, as we show later for three different state space models. Note that $z_t$ is a function of $\bm{\psi}$ through the quantile function $z_t=F^{-1}_{Z_t}(u_t|\bm{\psi})$, as we discuss later. A more challenging problem is the evaluation of the numerator in Equation~(\ref{eq:icop}). To compute this, the state vector $\bm{x}=(\bm{x}_1,\ldots,\bm{x}_T)$ needs to be integrated out, with \begin{eqnarray*} f_Z(\bm{z}|\bm{\psi}) &= &\int f(\bm{z}|\bm{x},\bm{\psi}) f(\bm{x}|\bm{\psi}) \mbox{d}\bm{x} \\ &= &\int \prod_{t=1}^T h_t(z_t|\bm{x}_t;\bm{\psi}) \prod_{t=2}^T k_t(\bm{x}_t|\bm{x}_{t-1};\bm{\psi}) f(\bm{x}_1;\bm{\psi}) \mbox{d}\bm{x} \,, \end{eqnarray*} where $k_t(\bm{x}_t|\bm{x}_{t-1};\bm{\psi})=\frac{d}{d \bm{x}_t} K_t(\bm{x}_t|\bm{x}_{t-1};\bm{\psi})$. There are many methods suggested for evaluating this high-dimensional integral; for example, see Shephard \& Pitt~(1997), Stroud, M\"uller \& Polson~(2003), Godsill, Doucet \& West~(2004), Jungbacker \& Koopman~(2007), Richard \& Zhang~(2007), Scharth \& Kohn~(2016) and references therein. In this paper we show how popular Markov chain Monte Carlo (MCMC) methods for solving this problem can also be used to estimate the inversion copula. Because all features of the marginal distribution of $Z_t$--- including the marginal moments--- are lost when forming the copula, parameters in a state space model that uniquely affect these are unidentified and can be excluded from $\bm{\psi}$. Moreover, where possible we also impose constraints on the parameters so that $F_{Z_t}$ has zero mean and unit variance. While this has no effect on the copula function $C$, it aids identification of the parameters in the likelihood. \vspace{-10pt} \subsection{Gaussian Linear State Space Inversion Copula}\label{sec:gssiv} \vspace{-5pt} The stationary Gaussian linear state space model encompasses many popular time series models; see Ljung~(1999, Sec.~4.3) and Durbin \& Koopman~(2012, Part~1) for overviews. In this special case, we show here that the inversion copula is the popular Gaussian copula. This state space model is given by \begin{eqnarray} Z_t|\bm{X}_t=\bm{x}_t &\sim &N(\bm{b}\bm{x}_t',\sigma^2) \nonumber \\ \bm{X}_t|\bm{X}_{t-1}=\bm{x}_{t-1} &\sim &N(\bm{x}_{t-1}R',F Q F'), \label{eq:lgssm} \end{eqnarray} where $\bm{X}_t$ is a $(1\times r)$ state vector, $\bm{b}$ is a $(1\times r)$ vector, $\sigma^2$ is the disturbance variance, $R$ is a $(r \times r)$ matrix of autoregressive coefficients, with absolute values of all eigenvalues less than one. The matrices $F$ and $Q$ are of sizes $(r \times q)$ and $(q \times q)$, respectively, where $q$ represents the dimension of random components driving the $r$-dimensional state. The copula parameters are $\bm{\psi}\subseteq\{\bm{b},R,F,Q,\sigma^2\}$, depending on the specific state space model adopted. To identify the parameters in the likelihood, they are constrained so that $E(Z_t)=0$ and $\mbox{Var}(Z_t)=1$. For the latter, if $\mbox{Var}(\bm{X}_t)=\Sigma_X$, then $\mbox{Var}(Z_t)=\bm{b}\Sigma_X \bm{b}'+\sigma^2$, where $\mbox{vec}(\Sigma_X) = (I_{r^2}-R \otimes R )^{-1} \mbox{vec}(F Q F')$. This results in the equality constraint $\sigma^2=1-\bm{b}\Sigma_X \bm{b}'$, along with nonlinear inequality constraints on the other elements of $\bm{\psi}$; something we illustrate further for a specific Gaussian state space model in Section~\ref{sec:ucar4}. With these constraints, the margins of $Z_t$ are standard normal. This greatly simplifies evaluation and estimation of the copula compared to the general case, where $f_{Z_t}$ and $F_{Z_t}$ in Equation~(\ref{eq:mdist}) depend on $\bm{\psi}$ and need to be recomputed whenever $\bm{\psi}$ changes. Moreover, $(Z_1,\ldots,Z_T)\sim N(\bm{0},\Omega_\psi)$, with \begin{eqnarray} \Omega_\psi = \begin{bmatrix} 1 & a_1 & \dots & a_{T-1}\\ a_1 & 1 & \dots & a_{T-2}\\ \vdots & \vdots & \ddots & \vdots\\ a_{T-1} & a_{T-2} & \dots & 1 \end{bmatrix}, \nonumber \end{eqnarray} where $a_l=\bm{b} \Gamma(l) \bm{b}'$, and $\Gamma(l)=\mbox{Cov}(\bm{X}_t,\bm{X}_{t-l})$ denotes the $l^{\mbox{\scriptsize th}}$ autocovariance matrix of the state vectors, which can be computed using the multivariate Yule-Walker equations (Lutkepohl~2006, pp.26--30). Because this is a Gaussian copula, its density is known explicitly (Song~2000) as \[ c_{Ga}(\bm{u};\bm{\psi})=|\Omega_\psi|^{-1/2}\exp\left( -\frac{1}{2}\bm{z} (\Omega_\psi^{-1} - I)\bm{z}'\right)\,. \] The copula parameters $\bm{\psi}$ can therefore be estimated using the full likelihood in Equation~(\ref{eq:cmod}). However, $\Omega_\psi^{-1}$ is usually computationally demanding to evaluate, so that $c_{Ga}(\bm{u};\bm{\psi})$ is also. Therefore, we instead employ Bayesian methods where the latent states are generated explicitly as part of a MCMC scheme, as we now discuss. This can be just as fast and efficient for the inversion copula, as it is for the underlying linear Gaussian state space model using the Kalman Filter. \vspace{-10pt} \subsection{Estimation}\label{sec:copmod} \vspace{-5pt} Assuming a parametric margin $G(y_t;\bm{\theta})$ with parameters $\bm{\theta}$, the likelihood of the time series copula model is \begin{equation} f_Y(\bm{y}|\bm{\psi},\bm{\theta})=c(\bm{u};\bm{\psi})\prod_{t=1}^T g(y_t;\bm{\theta})= f_Z(\bm{z}|\bm{\psi})\prod_{t=1}^T \frac{g(y_t;\bm{\theta})}{f_{Z_t}(z_t|\bm{\psi})}\,,\label{eq:like} \end{equation} where the reliance of the copula density on $\bm{\psi}$ is made explicit, and $z_t=F_{Z_t}^{-1}(G(y_t;\bm{\theta})|\bm{\psi})$. Given parameters $(\bm{\psi},\bm{\theta)}$, marginal $G$, and a method to compute $f_{Z_t}$, $F_{Z_t}$ and $F_{Z_t}^{-1}$, evaluation of the likelihood boils down to evaluation of $f_Z(\bm{z}|\bm{\psi})$. There are a range of methods for doing this, usually tailored to specific state space models. They include methods based on sequential importance sampling (Shephard \& Pitt~1997; Jungbacker \& Koopman~2007; Richard \& Zhang~2007) from which maximum likelihood estimates (MLEs) can be computed. For example, in Section~\ref{sec:MLE}, we compute the MLEs for three inversion copulas outlined in Section~\ref{sec:threecop} for the U.S. broad inflation application. However, it is popular to estimate nonlinear state space models using robust MCMC methods, and we focus on this approach here. Conditional on the states, the likelihood is \begin{equation} f(\bm{y}|\bm{x},\bm{\psi},\bm{\theta})= f_Z(\bm{z}|\bm{x},\bm{\psi})\prod_{t=1}^T \frac{g(y_t;\bm{\theta})}{f_{Z_t}(z_t|\bm{\psi})}= \prod_{t=1}^T h_t(z_t|\bm{x}_t;\bm{\psi})\frac{g(y_t;\bm{\theta})}{f_{Z_t}(z_t|\bm{\psi})} \,. \label{eq:clike} \end{equation} Adopting independent priors $\pi_\psi(\bm{\psi})$ and $\pi_\theta(\bm{\theta})$, estimation and inference from the model can be based on the sampler below. \noindent {\underline{Sampling Scheme}} \noindent Step 1. Generate from $f(\bm{x}|\bm{\psi},\bm{\theta},\bm{y})=f(\bm{x}|\bm{\psi},\bm{\theta},\bm{z})\propto \prod_{t=1}^T h_t(z_t|\bm{x}_t; \bm{\psi})f(\bm{x}|\bm{\psi})$. \noindent Step 2. Generate from $f(\bm{\psi}|\bm{x},\bm{\theta},\bm{y}) \propto \left( \prod_{t=1}^T h_t(z_t|\bm{x}_t;\bm{\psi})/f_{Z_t}(z_t|\bm{\psi}) \right) f(\bm{x}|\bm{\psi}) \pi_{\psi}(\bm{\psi})$. \noindent Step 3. Generate from $f(\bm{\theta}|\bm{x},\bm{\psi},\bm{y}) \propto \left( \prod_{t=1}^T h_t(z_t|\bm{x}_t;\bm{\psi})g(y_t;\bm{\theta})/f_{Z_t}(z_t|\bm{\psi}) \right) \pi_\theta(\bm{\theta})$. Note that the values $\bm{z}=(z_1,\ldots,z_T)$ are not generated directly in the sampling scheme, but instead are computed for each draw of the parameters $\bm{\psi},\bm{\theta}$. Crucially, Step~1 is exactly the same as that for the underlying state space model, so that the wide range of existing procedures for generating the latent states can be employed. Step~2 can be undertaken using Metropolis-Hastings, with a proposal based on a numerical or other approximation to the conditional posterior. However, for some state space models it can be more computationally efficient to generate sub-vectors of $\bm{\psi}$ from their conditional posteriors, using separate steps. In all our empirical applications in Section~\ref{sec:empirical}, we sample each element of $ \bm{\psi}$ individually using normal approximations to the each of the conditional posteriors, obtained based on 15 Newton-Raphson steps. Initial values for the optimization are the parameter means obtained from the density $q(\bm{\psi})\propto f(\bm{x}|\bm{\psi})\pi_\psi(\bm{\psi})$. Note that the prior $\pi_\psi(\bm{\psi})$ reflects the parameter constraints required to identify the inversion copula, resulting in appropriately truncated normal approximations. To speed up the optimization, $F_{Z_1}$ (and its inverse and derivative $f_{Z_1}$) are not updated at each Newton-Raphson step. Nevertheless, we show that the resulting normal distributions are appropriate proposal densities later in our empirical work. For non-parametric marginal models it is often attractive to follow Shih \& Louis~(1995) and others, and employ two-stage estimation, so that Step~3 is not required. However, for parametric models, $\bm{\theta}$ can be generated at Step~3 using a Metropolis-Hastings step. It is appealing to use the posterior from the marginal model as a proposal, with density $q(\bm{\theta})\propto \prod_{t=1}^T g(y_t;\bm{\theta}) \pi_\theta(\bm{\theta})$. However, this should be avoided because when there is strong dependence --- precisely the circumstance where the copula model is most useful --- this proposal can be a poor approximation to the conditional posterior. The computations associated with Step 1 is equivalent to those of the conventional state space model on which the inversion copula is based. We outline later key aspects of the samplers that are used to estimate the three specific inversion copulas considered. However, note that at Steps~2 and~3 the value of $\bm{z}$ needs updating, although not at the end of Step~1. When updating $z_t=F_{Z_t}^{-1}(G(y_t;\bm{\theta})|\bm{\psi})$, repeated evaluation of the quantile function $F_{Z_t}^{-1}$ is the most computationally demanding aspect of the sampling scheme. In the Appendix we outline how to achieve this quickly and accurately for a stationary nonlinear state space model using spline interpolation. \vspace{-10pt} \subsection{Time Series Properties}\label{sec:tsp} \vspace{-5pt} Inversion copulas at Equation~(\ref{eq:icop}) can be constructed from either stationary or non-stationary state space models for $\{Z_t\}_{t=1}^T$. Here, stationarity refers to strong or strict stationarity, rather than weak or covariance stationarity; eg. see Brockwell \& Davis~(1991, p.12). When a non-stationary state space model is used, the copula model at Equation~(\ref{eq:cmod}) is a non-stationary time series model for $\{Y_t\}_{t=1}^T$, but with a time invariant univariate marginal $G$. Conversely, when a stationary latent state space model is employed, it is straightforward to show that $\{Y_t\}_{t=1}^T$ is also stationary. Moreover, $\{Z_t\}_{t=1}^T$ and $\{Y_t\}_{t=1}^T$ share the same Markov order. For the rest of the paper we only consider the stationary case with Markov order $p$. In which case $F_{Z_t}$ is time invariant, so that we denote it simply as $F_{Z_1}$ throughout. An alternative representation of the copula density at Equation~(\ref{eq:icop}) can be derived as follows. For $a<b$, we employ the notation $\bm{z}_{a:b}=(z_a,z_{a+1},\ldots,z_b)$, with analogous definitions for $\bm{x}_{a:b}$ and $\bm{u}_{a:b}$. Then, the (time invariant) $r$-dimensional marginal density of the latent process for $r\geq 2$ is \begin{equation*} f_Z^{(r)}(\bm{z}_{t-r+1:t}) =\int \cdots \int \left( \prod_{s=t-r+1}^t h_s(z_s|\bm{x}_s;\bm{\psi}) \right) f(\bm{x}_{t-r+1:t}|\bm{\psi}) \mbox{d}\bm{x}_{t-r+1:t}\,, \end{equation*} where $t\geq r$ and $f(\bm{x}_{t-r+1:t}|\bm{\psi})$ is the $r$-dimensional marginal density of the states $\bm{X}_{t-r+1:t}$. Then the $r$-dimensional marginal copula density can be defined as \begin{equation*} c^{(r)}(\bm{u}_{t-r+1:t}) = \frac{f_Z^{(r)}(\bm{z}_{t-r+1:t})}{\prod_{s=t-r+1}^t f_{Z_1}(z_s)}\,. \end{equation*} and the density at Equation~(\ref{eq:icop}) can then be written in terms of $\{c^{(r)};r=2,\ldots,p+1\}$ as \begin{eqnarray} c(\bm{u}) &= &\prod_{t=p+1}^T f(u_t|\bm{u}_{t-p:t-1})\prod_{t=2}^p f(u_t|\bm{u}_{1:t-1}) \nonumber \\ &= &\prod_{t=p+1}^T \frac{c^{(p+1)}(\bm{u}_{t-p:t})}{c^{(p)}(\bm{u}_{t-p:t-1})} \prod_{t=2}^p \frac{c^{(t)}(\bm{u}_{1:t})}{c^{(t-1)}(\bm{u}_{1:t-1})} \,, \label{eq:cexp2} \end{eqnarray} where we define $c^{(r)}=1$ whenever $r\leq 1$, and a product to be equal to unity whenever its upper limit is less than its lower limit. For example, for a Markov order $p=1$ series, $c(\bm{u})=\prod_{t=2}^T c^{(2)}(\bm{u}_{t-1:t})$, so that the marginal copula $c^{(2)}$ fully captures the serial dependence structure. In Appendix~B, we show how to construct $c^{(2)}$ for the copulas in Section~\ref{sec:threecop}. \vspace{-10pt} \subsection{Serial Dependence and Prediction}\label{sec:serial} \vspace{-5pt} Measures of serial dependence at a given lag $l\geq 1$, can be computed from the inversion copula. They include Kendall's tau, Spearman's rho, and measures of quantile dependence; see Nelsen~(2006, Ch.~5) for an introduction to such measures of concordance. These can be computed from the bivariate copula of the observations of the series at times $s$ and $t=s+l$ as follows. If the density and distribution functions of $(Z_s,Z_t)$ are denoted as \begin{eqnarray} f_Z^{s,t}(z_s,z_t|\bm{\psi}) &= &\int \int h_s(z_s|\bm{x}_s;\bm{\psi})h_t(z_t|\bm{x}_t;\bm{\psi}) f(\bm{x}_s,\bm{x}_t|\bm{\psi})\mbox{d}\bm{x}_s\mbox{d}\bm{x}_t\,, \nonumber\\ F_Z^{s,t}(z_s,z_t|\bm{\psi}) &= &\int \int H_s(z_s|\bm{x}_s;\bm{\psi})H_t(z_t|\bm{x}_t;\bm{\psi}) f(\bm{x}_s,\bm{x}_t|\bm{\psi})\mbox{d}\bm{x}_s\mbox{d}\bm{x}_t\,,\label{eq:stdens} \end{eqnarray} then the bivariate copula function is \[ C^{s,t}(u_s,u_t|\bm{\psi})=F_Z^{s,t}(F_{Z_1}^{-1}(u_s|\bm{\psi}),F_{Z_1}^{-1}(u_t|\bm{\psi})|\bm{\psi})\,, \] with corresponding density $c^{s,t}(u_s,u_t|\bm{\psi})=f_Z^{s,t}(z_s,z_t|\bm{\psi})/f_{Z_1}(z_s|\bm{\psi})f_{Z_1}(z_t|\bm{\psi})$. Kendall's tau, Spearman's rho and the lower quantile dependence for quantile $0<\alpha<0.5$, are then \begin{eqnarray*} \tau_l &= &4\int \int C^{s,t}(u,v)c^{s,t}(u,v)\mbox{d}u\mbox{d}v-1 \\ r_l &= &12\int\int uv c^{s,t}(u,v)\mbox{d}u\mbox{d}v-3\\ \lambda^{--}_l(\alpha) &= &\mbox{Pr}(u_t<\alpha |u_s<\alpha) = C^{t,s}(\alpha,\alpha)/\alpha\,. \end{eqnarray*} Quantile dependencies in other quadrants, $\lambda^{++}_l(\alpha)=\mbox{Pr}(u_t>1-\alpha|u_{s}>1-\alpha)$, $\lambda^{+-}_l(\alpha)=\mbox{Pr}(u_t>1-\alpha|u_{s}<\alpha)$ and $\lambda^{-+}_l(\alpha)=\mbox{Pr}(u_t<\alpha|u_{s}>1-\alpha)$ are computed similarly. We note that for $l=1$, the marginal copula $c^{(2)}=c^{s+1,s}$. For the copulas employed in Section~\ref{sec:threecop}, the integrals at Equation~(\ref{eq:stdens}) and the dependence metrics can be computed numerically. However, this may be impractical for some state space models. In this case, following Oh \& Patton~(2013), the dependence measures are readily calculated via simulation. To do this, simply generate $(z_1,\ldots,z_{l+1})$ from the state space model, and then transform each value to $u_t=F_{Z_1}(z_t)$. If the iterates $(u_1^{[j]},\ldots,u_{l+1}^{[j]})$, $j=1,\ldots,J$, are generated in this way, then Spearman's rho for pairwise dependence between $Y_{t+l}$ and $Y_{t}$ is \[ r_l=12E(u_{l+1}u_{1})-3 \approx \frac{12}{J}\sum_{j=1}^J\left( u_{l+1}^{[j]} u_1^{[j]}\right) - 3\,. \] The same Monte Carlo iterates can be used to approximate the other measures of dependence. While large Monte Carlo samples (e.g. $J=50,000$) can be required for these estimates to be accurate, simulating from the marginal copula is both fast and can be undertaken in parallel, so that it is not a problem in practice. The forecast density for $Y_{t+l}$ conditional on $\bm{Y}_{1:t}=\bm{y}_{1:t}$, is \begin{equation} f(y_{t+l}|\bm{y}_{1:t},\bm{\theta},\bm{\psi}) = f(z_{t+l}|\bm{z}_{1:t},\bm{\psi})\frac{g(y_{t+l}|\bm{\theta})}{f_{Z_1}(z_{t+l}|\bm{\psi})}\,.\label{eq:preddist} \end{equation} Here, $f(z_{t+l}|\bm{z}_{1:t},\bm{\psi})$ is the predictive density for $Z_{t+l}$ conditional on $\bm{Z}_{1:t}=\bm{z}_{1:t}$, which can be computed either analytically or numerically for many state space models, including those in Section~\ref{sec:threecop} below. Otherwise, the predictive density can be evaluated via simulation--- a process which is both straightforward and fast. First, simulate a ray of values from the predictive distribution of the state space model $(z_{t+1},\ldots,z_{t+l}) \sim F(z_{t+1},\ldots,z_{t+l}|\bm{z}_{1:t},\bm{\psi},\bm{\theta})$. Then $y_{t+l}=G^{-1}(F_{Z_1}(z_{t+l}|\bm{\psi})|\bm{\theta})$ is an iterate from the predictive distribution. The predictive distribution can be evaluated conditional on either point estimates of $(\bm{\psi},\bm{\theta})$, or over the sample of parameter values from the posterior. The latter approach integrates out parameter uncertainty in the usual Bayesian fashion, and is undertaken in all our empirical work. \section{Three Inversion Copulas}\label{sec:threecop} \vspace{-10pt} We consider three time series inversion copulas in detail. The first two are constructed from two popular nonlinear state space models and cannot be expressed in closed form, while the last is constructed from a linear Gaussian state space model. In each case, we outline constraints required to identify the parameters when forming the copula by inversion, as well as how to implement the generic sampler in Section~\ref{sec:copmod}. We illustrate the effectiveness of the three copula models in Section~\ref{sec:empirical}. \vspace{-10pt} \subsection{Stochastic Volatility Inversion Copula}\label{sec:sv} \vspace{-5pt} The conditional variance of many financial and economic time series exhibit strong positive serial dependence. A popular model used to capture this is the stochastic volatility model, although a major limitation is that its marginal distribution is symmetric, which is inconsistent with most series. Our approach allows for the construction of time series models that have the same serial dependence as a stochastic volatility model, but also an arbitrary margin that can be asymmetric. We consider the stochastic volatility model with an unobserved autoregressive component (SVUC) given by \begin{eqnarray} Z_t|\bm{X}_t=\bm{x}_t &\sim &N(\mu_t,\exp(\zeta_t)) \nonumber \\ \mu_t |\bm{X}_{t-1}=\bm{x}_{t-1} &\sim &N(\bar \mu+\rho_{\mu}(\mu_{t-1}-\bar \mu),\sigma_{\mu}^2) \nonumber \\ \zeta_t|\bm{X}_{t-1}=\bm{x}_{t-1} &\sim &N(\bar \zeta+\rho_\zeta (\zeta_{t-1}-\bar \zeta),\sigma_\zeta^2)\,, \label{eq:svuc} \end{eqnarray} where $\bm{x}_t=(\mu_t,\zeta_t)$ is the state vector. We constrain $|\rho_\mu|<1$ and $|\rho_\zeta|<1$, ensuring $\{Z_t\}$ is a (strongly) stationary first order Markov processes. The marginal mean $E(Z_t)=\bar \mu$, so that we set $\bar \mu=0$. The marginal variance $\mbox{Var}(Z_t)=s^2_\mu+\exp(\bar \zeta + s^2_\zeta/2)$, where $s^2_\mu=\sigma^2_\mu/(1-\rho_\mu^2)$ and $s^2_\zeta=\sigma^2_\zeta/(1-\rho_\zeta^2)$. Setting this equal to unity provides an equality constraint on $\bar \zeta = \log(1-s^2_\mu)-\frac{s_\zeta^2}{2}$. In addition, $\exp(\bar \zeta+s^2_\zeta/2)\geq 0$, giving the inequality constraint $0<\sigma^2_\mu\leq (1-\rho_\mu^2)$. With these constraints, the dependence parameters of the resulting inversion copula are $\bm{\psi}=\{\rho_\mu,\rho_\zeta,\sigma^2_\mu,\sigma^2_\zeta\}$. The marginal density at Equation~(\ref{eq:mdist}) is \[ f_{Z_1}(z;\bm{\psi})=\int\int \phi_1\left( z ;\mu,\exp(\zeta)\right) \phi_1(\zeta;\bar \zeta,s_\zeta^2) \phi_1(\mu;0,s^2_\mu)d\mu d\zeta\,, \] where $\phi_1(z;a,b^2)$ is a univariate Gaussian density with mean $a$ and variance $b^2$. The inner integral in $\mu$ can be computed analytically and (with a little algebra) the marginal density and distribution functions are \begin{eqnarray*} f_{Z_1}(z;\bm{\psi}) &= &\int \phi_1(z;0,w(\zeta)^2)\phi_1(\zeta;\bar \zeta,s_\zeta^2)d\zeta \\ F_{Z_1}(z;\bm{\psi}) &= &\int \Phi_1(z;0,w(\zeta)^2)\phi_1(\zeta;\bar \zeta,s_\zeta^2)d\zeta\,, \end{eqnarray*} with $w(\zeta)^2=s^2_\mu+\exp(\zeta)$. Computing the (log) copula density at Equation~(\ref{eq:icop}) requires evaluating $\log(f_{Z_1})$ and the quantile function $F_{Z_1}^{-1}$ at all $T$ observations. Appendix~A outlines how to compute these numerically using spline interpolation of both functions. In our empirical work we find these spline-based approximations to be accurate within 5 to 9 decimals places, and fast because they require direct evaluation of $F_{Z_1}^{-1}$ at only one point. We label the inversion copula constructed from the SVUC model as `InvCop1'. Appendix~B outlines how to compute the marginal copula density $c^{(2)}(u_t,u_{t-1}|\bm{\psi})$ for this copula. Because the time series has Markov order one, this bivariate copula characterizes the full serial dependence structure. For example, Figure~\ref{fig:svcop}(a) plots $c^{(2)}$ for the case when there is no unobserved mean component (ie. $\rho_\mu=\sigma^2_\mu=0$), $\rho_\zeta=0.952$ and $\sigma_\zeta=0.045$--- typical values arising when fitting asset return data. The copula density is far from uniform, with high equally-valued quantile dependence in all four quadrants ($\lambda^{++}_1(0.1)=0.1428, \lambda^{++}_1(0.05)=0.0964$ and $\lambda^{++}_1(0.01)=0.0454$). This is a high level of first order serial dependence, yet $\tau_1=r_1=0$. This is because $\tau_1$ and $r_1$ measure `level' dependence, whereas this copula instead captures bivariate dependence in the second moment. Most existing parametric copulas are not well-suited to represent such serial dependence; see Loaiza-Maya et al.~(2016) for a discussion. We employ the prior $\pi_{\psi}(\bm{\psi})\propto \frac{1}{\sigma^2_\mu \sigma^2_\zeta}I(\bm{\psi} \in R_\psi)$, where $R_\psi$ is the region of feasible parameter values conforming to the restrictions listed above, and $I(X)=1$ if $X$ is true, and zero otherwise. We outline here how to implement the Step 1 of the sampling scheme in Section~\ref{sec:copmod}. We partition the state vector into $\bm{\mu}=(\mu_1,\ldots,\mu_T)$ and $\bm{\zeta}=(\zeta_1,\ldots,\zeta_T)$, and use the two separate steps: \begin{itemize} \item[] Step~1a. Generate from $f(\bm{\mu}|\bm{\psi},\bm{\zeta},\bm{\theta},\bm{y}) \propto \prod_{t=1}^T \phi_1 \left( z_t;\mu_t;\exp(\zeta_t)\right)f(\bm{\mu}|\bm{\psi})$ \item[] Step~1b. Generate from $f(\bm{\zeta}|\bm{\psi},\bm{\mu},\bm{\theta},\bm{y}) \propto \prod_{t=1}^T \phi_1 \left( z_t;\mu_t;\exp(\zeta_t)\right)f(\bm{\zeta}|\bm{\psi})$ \end{itemize} The posterior of $\bm{\mu}$ in Step~1a can be recognized as normal with zero mean and a band 1 precision matrix, so that generation is both straightforward and fast. There are a number of efficient methods to generate $\bm{\zeta}$ in Step~1b in the literature, and we employ the `precision sampler' for the latent states outlined in Chan \& Hsiao~(2014). This is a fast sparse matrix implementation of the auxiliary mixture sampler (Kim, Shepherd \& Chib~1998) that is known to mix well for the stochastic volatility model. \vspace{-10pt} \subsection{Markov Switching Inversion Copula}\label{sec:rs} \vspace{-5pt} Another popular class of nonlinear state space models are regime switching models, which allow for structural changes in the dynamics of a series. In these models latent regime indicators usually follow an ergodic Markov chain, in which case the model is called a Markov switching model; see Hamilton~(1994; Ch.22) for an introduction. We consider a two regime Markov switching first order autoregressive model (MSAR1) given by \begin{eqnarray} Z_t|\bm{X}_t=\bm{x}_t \sim N(c_{s_t}+\rho_{s_t}z_{t-1},\sigma^2_{s_t}) \nonumber \\ \mbox{Pr}(s_t=j|s_{t-1}=i)=p_{ij}, \label{eq:msar} \end{eqnarray} for regimes $s_t\in\{1,2\}$. This is a nonlinear state space model with state vector $\bm{x}_t=\left(z_{t-1},s_t\right)$. We assume the Markov chain is ergodic, so that the marginal distribution of $s_t$ is time invariant with $\mbox{Pr}(s_t=1)=\pi_{1}=(1-p_{22})/(2-p_{11}-p_{22})$ and $\mbox{Pr}(s_t=2)=\pi_{2}=1-\pi_1$. Denoting $s_i^2=\sigma_i^2/(1-\rho_i^2)$, it can be shown that stationarity results from the constraints $|\rho_j|<1$ for $j=1,2$, and $s_i^2 s_j^2 -\rho_j^2(s_i^2)^2>0$ for $(i,j)=(1,2),(2,1)$. These provide inequality constraints on each element of $\{\rho_1,\rho_2,\sigma^2_1,\sigma^2_2\}$, given values for the other elements. Following standard practice we identify the two components by assuming $\pi_1<\pi_2$. When forming the copula, we assume the marginal mean $E(Z_t)=\bar \mu =\sum_{i=1,2}\pi_i\frac{c_i}{1-\rho_i}=0$ and variance $\mbox{Var}(Z_t)=\sum_{i=1,2}\pi_i\frac{\sigma^2_i}{1-\rho^2_i}=1$. This provides the additional equality constraints \begin{eqnarray*} c_1 &= &-\frac{\pi_2c_2(1-\rho_1)}{\pi_1 (1-\rho_2)}\,,\\ \sigma^2_1 &= &\frac{(1-\rho_1^2)}{\pi_1}\left(1-\pi_2 s^2_2\right)\,. \end{eqnarray*} Also, because $\sigma^2_1>0$, from the last equality constraint above it follows that $\pi_2 s^2_2<1$, which can be satisfied by imposing an upper bound on $p_{22}$. The inversion copula parameters are therefore $\bm{\psi}=\{c_2,\rho_1,\rho_2,\sigma_2^2,p_{11},p_{22}\}$, subject to the inequality constraints above. The marginal distribution of $Z_t$ is a mixture of two Gaussians, with \begin{eqnarray} f_{Z_1}(z|\bm{\psi})=\sum_{i=1,2} \phi_1\left(z;\mu_i, s_i^2\right)\pi_i,\label{ms_uni} \end{eqnarray} where $\mu_i=\frac{c_i}{1-\rho_i}$. Both $f_{Z_1}$ and $F_{Z_1}$ are therefore fast to compute, and the quantile function $F_{Z_1}^{-1}$ is computed using the spline interpolation method outlined in Appendix~A. The marginal copula $c^{(2)}$ is given in Appendix~B, and is the inversion copula of a mixture of four bivariate Gaussians. This is very different than the more common `mixture copula', which is a finite mixture of copulas; for example, see Patton~(2006). We label the inversion copula constructed from the MSAR1 model as `InvCop2'. Unlike the other two inversion copulas examined, it can exhibit asymmetric first order serial dependence. To illustrate, Figure~\ref{fig:svcop}(b) plots the marginal copula $c^{(2)}$ when $p_{11}=0.92$, $p_{22}=0.95$, $\sigma^2_2=0.6$, $\rho_1=-0.5$, $\rho_2=0.6$ and $c_2=0.02$. In this case, $r_1=0.159$, $\tau_1=0.113$, and quantile dependence is different in each quadrant with $\lambda^{--}_1(0.1)=0.249$, $\lambda^{++}_1(0.1)=0.201$, $\lambda^{+-}_1(0.1)=0.141$ and $\lambda^{-+}_1(0.1)=0.144$. As before, we employ the MCMC algorithm in Section~\ref{sec:copmod} to estimate the model. The prior $\pi_{\psi}(\psi)\propto \frac{1}{\sigma^2_2}I(\bm{\psi}\in R_\psi)$, where $R_\psi$ is the region of feasible parameter values outlined above. A forward filtering and backward sampling algorithm (Hamilton~1994, p.694) is used to sample the regime indicators $\bm{s}=(s_1,...,s_T)$ in Step~1. \vspace{-10pt} \subsection{Gaussian Unobserved Component Inversion Copula}\label{sec:ucar4} \vspace{-5pt} We also construct an inversion copula from a Gaussian unobserved component model, where the component follows a stationary order $p$ autoregression, so that \begin{eqnarray} Z_t|\bm{X}_t = \bm{x}_t &\sim &N(\mu_t,\sigma^2) \nonumber \\ \mu_t &= &\bar \mu + \sum_{j=1}^p \rho_j(\mu_{t-j}-\bar{\mu})+\sigma^2_\mu\, \label{eq:ucar}. \end{eqnarray} This model (labeled here as UCAR$p$) can be written in state space form at Equation~(\ref{eq:lgssm}) with state vector $\bm{x}_t=(\mu_t,\mu_{t-1},\ldots,\mu_{t-p+1})$ and appropriate choices for matrices $\bm{b},R,F$ and $Q$. The resulting inversion copula is a Gaussian copula with the specific time series dependence structure, and is labeled `InvCop3'. We follow Barndorff-Neilsen \& Schou~(1973) and others, and re-parametrize the autoregressive coefficients by the partial correlations $\bm{\pi}=(\pi_1,\pi_2,\ldots,\pi_p)$ via the Durbin-Levinson algorithm. An advantage is that stationarity is easily imposed by the inequalities $|\pi_j|<1$ for $j=1,\ldots,p$. When forming the copula, the marginal mean $E(Z_t)=\bar \mu=0$. A second equality constraint $\sigma^2=1-\mbox{Var}(\mu_t)$, where $\mbox{Var}(\mu_t)=\sigma^2_\mu \prod_{j=1}^p(1-\pi_j^2)^{-1}$, ensures the marginal variance is unity. The parameters of this copula are therefore $\bm{\psi}=\{\bm{\pi},\sigma^2_\mu\}$, and the prior is $\pi_\psi(\bm{\psi}) \propto \frac{1}{\sigma^2_\mu}I(|\pi_j|<1)$. As in Section~\ref{sec:sv}, we use the precision sampler to sample the latent states $(\mu_1,\ldots,\mu_T)$ at Step~1. In Step~2 of the scheme, the partial correlations $\bm{\pi}$ are sampled jointly using Metropolis-Hasting with a multivariate normal approximation proposal computed as described in Section~\ref{sec:copmod}, and truncated to the unit cube. The parameter $\sigma_\mu^2$ is also generated using a truncated normal approximation as a proposal. We show these are adequate proposals in our empirical work. \section{Empirical Analysis}\label{sec:empirical} \vspace{-10pt} The three inversion copulas in Section~\ref{sec:threecop} are used to model quarterly U.S. broad inflation and U.S. electricity inflation. Here we illustrate that the inversion copulas produce more accurate forecast densities than the three state space models themselves. In the Supplementary Appendix (Part A) we include a simulation study that shows that even the simplest of our proposed inversion copulas with a flexible margin can greatly increase forecast accuracy. \vspace{-10pt} \subsection{Modeling and Forecasting U.S. Broad Inflation}\label{sec:inflation} \vspace{-5pt} We employ our methodology to model and forecast U.S. inflation from 1954:Q1 to 2013:Q4. Inflation is measured by the difference $y_t=\log(P_t)-\log(P_{t-1})$ in the logarithm of the (seasonally adjusted) quarterly GDP price deflator $P_t$, sourced from the FRED database of the Federal Reserve Bank of Saint Louis. Figure~\ref{fig:infldata}(a) plots the time series of the $T=240$ quarterly observations, while Figure~\ref{fig:margins} plots histograms of the data. The marginal distribution of inflation is far from symmetric, with sample skew 1.329 and kurtosis 4.515, and a Shapiro \& Wilk~(1965) test for normality is rejected at any meaningful significance level. A wide range of time series models have been fitted to quarterly inflation data previously (Faust \& Wright~2013; Clark \& Ravazzolo~2015), including the three state space models considered here. However, these three models--- in fact, most time series models used previously--- have margins that are inconsistent with that observed empirically. We show that combining each of the three inversion copulas with more flexible margins solves this problem, and significantly improves the accuracy of the one-quarter-ahead predictive densities. \vspace{-5pt} \subsubsection{SVUC and InvCop1}\label{sec:inflsv} \vspace{-5pt} Stock \& Watson~(2007) suggest using an unobserved component model with stochastic volatility for U.S. inflation, and it has become a popular model for this series (Clark \&~Ravazzolo~2015; Chan~2015). We fit the SVUC model directly to the inflation data using Bayesian methods. Table~\ref{tab:psihat} reports the parameter estimates, labeled as model `S1'. (Note that this table also reports the parameter estimates for all five other models fit to this data.) The marginal density for inflation implied by the SVUC model is shown in Figure~\ref{fig:margins}(a) in red. It is necessarily symmetric and inconsistent with that observed empirically. We therefore employ a copula time series model (labeled `C1') with copula function InvCop1 and a nonparametric margin, for which we employ the kernel density estimator (KDE), with the locally adaptive bandwidth method of Shimazaki \& Shinomoto~(2010). This copula model allows for the same serial dependence structure as the SVUC model, but with a more accurate margin. The estimated margin is a smooth asymmetric and heavy-tailed distribution, and is also plotted in Figure~\ref{fig:margins}(a). Using this for $g$, the copula data $u_t=G(y_t)$ are computed and plotted in Figure~\ref{fig:infldata}(b). This time series retains the serial dependence apparent in the original data. The copula parameters are estimated using the MCMC scheme, where the proposals in Step~2 of the sampler have acceptance rates between 35\% and 41\%. There is strong positive correlation in both the level ($\hat \rho_\mu=0.959$) and the log-volatilities ($\hat \rho_\zeta=0.789$) of $Z_t$, similar to that for the SVUC model fit directly to the inflation data. Figure~\ref{fig:copdensity_comparison}(a) plots the marginal copula density $c^{(2)}(u_t,u_{t-1}|\hat{\bm{\psi}})$ at the parameter estimates. There are spikes in the density close to (0,0) and (1,1), so that the vertical axis is truncated at 7 to aid interpretation. The logarithm of the density is also plotted in panel~(d). The majority of mass is along the axis between (0,0) to (1,1), which is due to level dependence captured by the unobserved component. However, the conditional heteroskedasticity also affects the form of the copula, with mass around points (0,1) and (1,0) and four edges apparent in panel~(d). Table~\ref{tab:depend} reports measures of first order serial dependence in $\{Y_t\}$ captured by InvCop1. The unobserved mean component results in strong positive overall dependence, with $\hat r_1=0.792$. There is high (symmetric) quantile dependence $\hat \lambda_1^{++}(0.05)=\hat \lambda^{--}_1(0.05)=0.507$, consistent with the shape of $c^{(2)}$. \vspace{-5pt} \subsubsection{MSAR1 \& InvCop2} \vspace{-5pt} Amisano \& Fagan~(2013) employ the MSAR1 model for U.S. inflation, but only allow $c_1$ and $c_2$ to vary between regimes. We extend this study here by fitting the more general MSAR1 model (labeled `S2') directly to the inflation data using Bayesian methods. The implied marginal density is shown in Figure~\ref{fig:margins}(b) in red, and it is more consistent with the data than the margin of the SVUC model. A time series copula model, with margin $G$ given by the KDE and copula function InvCop2, is also fit and labeled as model `C2'. The copula parameters are estimated using the MCMC scheme, and the proposals in Step~2 of the sampler have acceptance rates between 13\% and 38\%. Parameter estimates for both models S2 and C2 show positive serial dependence and high values for $p_{11}$ and $p_{22}$. However, the characteristics of the regimes differ between the two models, and it is shown later that the two models also have very different predictive distributions Table~\ref{tab:depend} reports the first order serial dependence metrics of copula InvCop2. Similar to the other copulas, there is high overall dependence with $\hat r_1=0.752$, although dependence is highly asymmetric with $\hat \lambda^{++}_1(0.05)=0.644>\hat \lambda^{--}_1(0.05)=0.272$. This asymmetry is visible in $c^{(2)}$ and $\log(c^{(2)})$, which are plotted in Figure~\ref{fig:copdensity_comparison}(b,e). In contrast, the copulas InvCop1 and InvCop3 do not allow for such asymmetric quantile dependence. \vspace{-5pt} \subsubsection{UCAR4 and InvCop3} \vspace{-5pt} As a benchmark, the UCAR model with $p=4$ is also fitted, and labeled as model `S3'. The margin implied by this model is Gaussian, and plotted in Figure~\ref{fig:margins}(c) in red. The estimates of the partial correlations $\bm{\pi}$ suggest that the unobserved component is Markov order one, which is consistent with the GDP data being seasonally-adjusted. To compare, we also fit a time series copula model (labeled `C3') with copula function InvCop3 and $p=4$. To illustrate estimation of a parametric margin, $G$ is a skew t distribution (Azzalini \& Capitanio~2003). The location ($\xi$), scale ($\omega$), skew ($\gamma_1$) and kurtosis ($\gamma_2$) coefficients are used as parameters, so that $\bm{\theta} = (\xi,\omega,\gamma_1,\gamma_2)$. The joint parameter posterior is computed using the MCMC scheme, where $\bm{\theta}$ is generated in Step~3 of the sampler using an adaptive random walk proposal. Table \ref{tab:psihat} reports the posterior estimates of both $\bm{\psi}$ and $\bm{\theta}$. The skew t margin has high positive skew $\hat \gamma_1=1.565$ and heavy tails $\hat \gamma_2=7.89$, similar to the KDE. In contrast to model S3, the posterior of $\bm{\pi}$ for model C3 suggests that the unobserved component is Markov order two. Figure~\ref{fig:copdensity_comparison}(c,f) plots $c^{(2)}$ and $\log(c^{(2)})$ for InvCop3. This is a bivariate Gaussian copula, and is therefore symmetric along the axes (0,1) to (1,0). As with the other copula functions, overall first order serial dependence is positive with $\hat r_1=0.789$. Quantile dependence is symmetric and positive for $\alpha>0$, although $\lim_{\alpha\rightarrow 0}\lambda_1^{++}(\alpha)=0$ for any Gaussian copula. \vspace{-5pt} \subsubsection{Density Forecast Comparison} \vspace{-5pt} One-quarter-ahead predictive densities are computed for quarters $t=2,\ldots,T$ for all six fitted models. Point forecast accuracy is measured using the root mean squared error (RMSE). Density forecast accuracy is measured using the (negative) logarithm of the predictive score (LP), the cumulative rank probability score (CRPS) and the tail-weighted CRPS (TW-CRPS). The latter two measures are introduced in Gneiting \& Raftery~(2007) and Gneiting and Ranjan~(2011), and computed directly from the quantile score as in Smith \& Vahey (2016). The mean values of the metrics are reported in Table~\ref{tab:mmetric}, where lower values for all metrics indicate increased accuracy. The density forecasts from the copula models C1, C2 and C3 are all more accurate than those from the corresponding state space models S1, S2 and S3, as measured by mean LP, CRPS and TW-CRPS. However, adopting a copula model results in less of an improvement in RMSE. To show how the predictive distributions differ, Figure~\ref{fig:pred_moments}(b,d,f) plots their standard deviation for models C1--C3 in blue, and for models S1--S3 in red; the differences are striking. This is particularly the case for model C3 in panel~(f), where the combination of an asymmetric margin with InvCop3 produces heteroskedasticity in the predictive distributions, even though the latent state space model is homoskedastic. A similar feature was observed by Smith \& Vahey~(2016) when they fit a Gaussian copula. The tails of the predictive distributions also differ. For example, Figure~\ref{fig:deflation} plots the predictive probability of deflation for all models. Broad-based deflation is very rare, with only very mild deflation occurring twice in our data. Yet, the state space models can over-estimate this probability. This is because the inaccuracy of the left hand tails of the margins of models S1--S3 apparent in Figure~\ref{fig:margins} also extends to the predictive distributions. Figure~\ref{fig:4dens} plots the predictive distributions from models S1 and C1 for four different quarters. It shows that the predictive distributions from the copula model do not simply replicate the asymmetry (or other features) of the marginal distribution. Overall, the best performing model is C1, and its inclusion in a real time forecasting study -- such as those by Clark \& Ravazzolo~(2015) and Smith \& Vahey (2016) -- is merited. \vspace{-5pt} \subsubsection{Computation Times} \vspace{-5pt} The MCMC estimation algorithms were implemented in MATLAB using a standard workstation, and computation times varied across the three copula models. The time to complete 1000 sweeps was 667s, 44s and 94s for models C1, C2 and C3, respectively. The greater computing time for model C1 is because $F_{Z_1}$ requires evaluation of a univariate numerical integral, as noted in Section~\ref{sec:sv}. In addition, model C3 also involves generation of the parameters of the skew t margin. Our empirical results are based on Monte Carlo samples of size 20,000, 25,000 and 30,000 iterates for models C1, C2 and C3, respectively, with a further 5,000, 15,000 and 20,000 iterates discarded for convergence. While we generated more iterates for the faster schemes, we found that varying these did not affect the results meaningfully. \vspace{-5pt} \subsubsection{Maximum Likelihood Estimates}\label{sec:MLE} \vspace{-5pt} We report maximum likelihood estimates of the copula parameters for the U.S. broad inflation example in Table~\ref{WAtab:psihat} to show that it is possible to estimate the inversion copulas via MLE. All parameter estimates are obtained using two-stage estimation (Joe 2005), where the margin $G$ is first estimated and the copula data $u_t=G(y_t)$ computed for $t=1,\ldots,T$. Conditional upon this copula data, $\bm{\psi}$ is estimated by maximizing the copula density in Equation~(2.3). The denominator of this density, as well as the values of $\bm{z}$, are computed from $f_{Z_1}$, $F_{Z_1}$ and $F_{Z_1}^{-1}$ in the same manner as outlined in the paper. The numerator $f_Z$ of the copula density can be evaluated for each of our three inversion copulas by filtering algorithms. For InvCop1, the likelihood of the latent SVUC model is computed by the bootstrap particle filter (Gordon et al.~1993), in combination with the Kalman filter. For InvCop2, the likelihood of the latent MSAR1 model is evaluated in closed form using the Hamilton filter for discrete states (see Hamilton 1989). For InvCop3, the likelihood of the latent state space model is Gaussian with moments that can be computed using the Kalman filter. In all cases, $\bm{\psi}$ is constrained as discussed in Section~3, and maximization employs constrained optimization as implemented in the Matlab toolbox. The maximum likelihood estimates reported in Table~\ref{WAtab:psihat} are in line with the posteriors in Table~\ref{tab:psihat}. \vspace{-10pt} \subsection{Modeling and Forecasting U.S. Electricity Inflation} \vspace{-5pt} To confirm that our methodology applies to other data, we consider inflation in U.S. electricity prices between 1952:Q1 and 2015:Q4 as a second empirical example. The data are differences in the logarithm of the (seasonally-adjusted) quarterly electricity consumer price index of all urban consumers. This series is produced by the U.S. Bureau of Labor Statistics, and available from the FRED database. The time series plots of the $T=256$ observations of the data and the associated copula data are given in Figure 1 of the Supplementary Appendix. The marginal distribution of the data is highly non-Gaussian, and we fit the same six models to this item-specific inflation data, as we do the broad inflation measure in Section~\ref{sec:inflation}. Even though the data differ, the three state space models S1, S2 and S3 remain attractive time series models for item-specific inflation. Figure~\ref{WAfig:margins} plots the histogram of the data in every panel. As with the broader inflation measure, electricity inflation is positively skewed. It also exhibits an excentuated peak around 0\%. The marginal distributions of the fitted state space models S1, S2 and S3 are plotted in red in panels~(a,b,c), respectively. The symmetric margins of S1 (the SVUC model) and S3 (the UCAR4 model) are highly inconsistent with the data. Also plotted in blue in panels~(a,b) is the adaptive KDE estimate --- which is far from symmetric --- as is the margin of both copula models C1 and C2. Panel~(c) plots the posterior estimate of the skew t distribution, which is the margin of copula model C3. It is positively skewed and heavy-tailed. In each case, the margins of the copula models are more accurate than those implied by the respective state space models. The copula densities from all three models are similar to those in the broad inflation case, with the bivariate marginal copulas $c^{(2)}(u_t,u_{t-1})$ showing strong positive dependence (see Figure~2 of the Supplementary Appendix). This is unsurprising because electricity consumption is a major component of economic output. As in Section~\ref{sec:inflation}, we compute the one-quarter-ahead predictive distributions for all six models at times $t=2,\ldots,T$. Table~\ref{WAtab:metrics} reports the accuracy metrics, and in each case the copula time series models out-perform their equivalent state space models using every metric. One-sided t-tests of the CRPS and log-score suggest that these differences are statistically significant. As with the analysis of broad inflation, the flexible modelling of the highly asymmetric margin increases the quality of the fitted time series model and the accuracy of these predictive densities. Illustration of the stark differences between the one-quarter-ahead predictive densities from the state space models, and their equivalent copula models, is given in Figure~3 of the Supplementary Appendix. \section{Discussion}\label{sec:disc} \vspace{-5pt} This paper proposes a new class of copulas for capturing serial dependence. They are constructed from inversion of a general nonlinear state space model, so that the potential range of dependence structures that they can produce is incredibly broad. A major insight is that such copulas can be very different than those that are widely used for capturing cross-sectional dependence. The latter include elliptical and vine copulas, which have also been used previously to capture serial dependence; see Joe~(1997), Beare~(2010), Smith et al.~(2010) and Loaiza-Maya et al.~(2017) for examples. Yet, the three inversion copulas studied in detail highlight the wider serial dependence structures that can be captured by our approach. As with the likelihood of the underlying state space model, in general the density of the inversion copula cannot be expressed in closed form. However, an important insight is that existing methods for evaluating the likelihood of the latent state space model can also be employed in the copula context. While we employ MCMC samplers to evaluate the posterior, other existing methods can also be used to compute the numerator of the copula density, as we do in Section~\ref{sec:MLE}. Either way, a major computational challenge is the repeated evaluation of the quantile $F_{Z_t}^{-1}$ and density $f_{Z_t}$ functions at the $T$ observations. When the latent state space model is stationary, we show how this can be achieved using spline approximations to $F_{Z_1}^{-1}$ and $\log(f_{Z_1})$ outlined in Appendix~A. These approximations are highly accurate in our examples, fast to derive, and can be employed with even very large values of $T$ in practice. Recently, Oh \& Patton~(2015) construct an inversion copula from a flexible parametric distribution formed through marginalization over a low-dimensional vector of latent factors. This latent factor model can be written in state space form, where the factors are a static state vector $\bm{X}_t$ that does not vary with $t$ at Equation~(\ref{eq:trans}). Full likelihood-based estimation can then be undertaken using the Bayesian MCMC methods discussed here, providing a better alternative to the moment-based method suggested by Oh \& Patton~(2015). While these factor copulas are unsuitable for serial dependence, Oh \& Patton~(2015) show they can capture high-dimensional cross-sectional dependence well. An interesting result is that the inversion copula of a Gaussian linear state space model is a Gaussian copula. Therefore, in this special case, the likelihood is available in closed form. Nevertheless, estimation using simulation methods can still prove efficient, just as it is for the latent state space model itself. While all three of our example inversion copulas are Markov and stationary, copulas can also be derived from non-stationary latent state space models. The resulting time series copula model is also non-stationary, but with a time invariant margin. Such copula models are an interesting topic for further study, although a new approach to computing $F_{Z_t}^{-1}$ and $f_{Z_t}$ efficiently is needed. A second interesting extension is to employ the proposed time series inversion copulas to capture serial dependence in discrete data. Here, the copula remains unchanged, but $G$ would be a discrete distribution function. The model can be estimated using Bayesian data augmentation, as discussed in Pitt, Chan \& Kohn~(2006) and Smith, Gan \& Kohn~(2012). This would require $\bm{z}$ to be generated as an additional step in the sampling scheme in Section~\ref{sec:copmod}. A third highly useful extension is to construct the inversion copula of a multivariate state space model. If the dimension of the multivariate time series is $m$, then the resulting $Tm$-dimensional copula captures both cross-sectional and serial dependence jointly. This would provide an alternative to the vine copula models of Smith~(2015), Beare \& Seo~(2015) and Loaiza-Maya et al.~(2017) for this case. While the extension is straightforward in principle, implementation relies on the ability to evaluate the univariate marginal distribution functions (and their inverses) for each series of the latent state space model. To show our methodology can improve the quality of forecast densities, we use it to model and forecast quarterly U.S. broad inflation and U.S. electricity inflation, which is an important problem in empirical macroeconomics (Faust \& Wright~2013). We employ inversion copulas constructed from three state space models used previously for this series. When combined with highly asymmetric and heavy-tailed nonparametric or flexible marginal distributions, the predictive distributions from the resulting copula time series models are more accurate than those of the state space models themselves. This is because these state space models have rigid margins, which are very far from that observed for inflation empirically--- a problem resolved by the copula models. \section*{A: Simulation Study} We simulate data from two time series models. The first (Sim1) is the UCAR1 model outlined in Equation~(3.4), but with $Z_t$ replaced by $Y_t$. The second (Sim2) is a copula model with a Gamma(2,2) marginal distribution $G$, and copula function InvCop3 constructed from the same latent UCAR1 model. The parameter values are $\bar{\mu}=0$, $\rho_1=0.7$, $\sigma^2_\mu = 0.25$, and $\sigma^2=0.5$, which satisfy the constraints in Section~3.3 Both Sim1 and Sim2 exhibit the same simple first order serial dependence structure, but Sim2 has a highly positively skewed margin with skew coefficient 1.41. One hundred time series datasets, each of length $T=1000$, are generated from the data generating processes Sim1 and Sim2. To each dataset we fit two models. The first is the UCAR1 state space model fit directly the data using Bayesian methods, and labeled `M1'. The second is a copula model with copula function InvCop3 (with $p=1$) and a nonparametric margin, and labeled `M2'. In the copula literature it is popular to use the empirical distribution function as a nonparametric estimator of $G$ (Shih \& Louis~1995; Tsukahara~2005). However, this can give inaccurate estimates of the tails of $G$, as illustrated by Smith \& Vahey~(2015) for macroeconomic series. Therefore, a kernel density estimator (KDE) is fit using the locally adaptive bandwidth method of Shimazaki \& Shinomoto~(2010). The copula parameters are estimated using the Bayesian method outlined in Section~3.3. There are four combinations of data generating process and fitted model: Sim1/M1, Sim1/M2, Sim2/M1 and Sim2/M2. For each of these we construct one-step-ahead predictive distributions. For the UCAR1 model (ie. M1) these are Gaussian distributions with moments computed using the Kalman Filter, while for the copula model (ie. M2) they are non-Gaussian as outlined in Section~2.5. Predictive distributions are computed for time points $t=2,\ldots,1000$ and for each of the 100 simulated datasets. Point forecast accuracy is measured using the root mean squared error (RMSE). Density forecast accuracy is measured using the (negative) logarithm of the predictive score (LP), the cumulative rank probability score (CRPS) and the tail-weighted CRPS (TW-CRPS). The latter two measures are discussed in Gneiting \& Raftery~(2007) and Gneiting \& Ranjan~(2011), and computed directly from the quantile score. For each of the four cases, Table~\ref{tab:sim} reports the mean metric values computed over all time points and datasets. More accurate forecasts correspond to higher values for LP, and lower values for all other metrics. Model M1 is the correct parametric model for Sim1, yet there is almost no loss of accuracy when fitting the copula model M2. However, for Sim2 where the margin is truly asymmetric, ignoring this fact and fitting M1 leads to poor forecasts. In contrast, fitting model M2 increases forecast accuracy by all measures because it allows for flexibility in the margin. The differences in mean metric values between fitting models M1 and M2 are statistically significant between the 100 replicated datasets at the 1\% level for every metric. In summary, employing time series models with inaccurate margins can substantially decrease forecast accuracy, compared to employing a copula time series model with flexible margins. \begin{table}[h] \begin{center} \begin{tabular}{lccccc} \hline \hline \noalign{\smallskip} Model & RMSE&LP&CRPS&TW-CRPS \\ \hline \noalign{\smallskip} \multicolumn{4}{l}{{\em Sim1: UCAR1}} &\\ \cline{1-1} \noalign{\smallskip} M1: UCAR1 & 0.8585&1.3437&0.5220&0.1129\\ M2: InvCop3 \& KDE & 0.8588&1.3377&0.5220&0.1129\\ \hline \noalign{\smallskip} \multicolumn{4}{l}{{\em Sim2: InvCop3 with Gamma(2,2) Margin}}&\\ \cline{1-3} \noalign{\smallskip} M1: UCAR1 &6.8868&2.3822&1.4205&0.3169\\ M2: InvCop3 \& KDE &6.8553&2.1842&1.3783&0.3013\\ \hline\hline \end{tabular} \end{center} \caption{Summary of the accuracy of the one-step-ahead predictive distributions in the simulation study. The rows report results for the four combinations of simulation (Sim1 and Sim2) and fitted model (M1 and M2). The columns report results for the four metrics considered, which are the mean (negative) logarithm predictive score (LP), the mean cumulative rank probability score (CRPS), the mean tail-weighted CRPS (TW-CRPS), and the root mean squared error (RMSE). The means are computed over the 999 time points and 100 simulated datasets. Note that tests at the 1\% level indicate the values in the bottom row are all statistically significantly different than those in the row immediately above.} \label{tab:sim} \end{table} \newpage \section*{B: Figures from the U.S. Electricity Inflation Application} \begin{figure}[h] \begin{center} \includegraphics[width=440pt]{WAelec_data.pdf} \end{center} \caption{Panel~(a) is a time series plot of the quarter-on-quarter U.S. electricity inflation data. Panel~(b) is a time series plot of the resulting copula data $u_t=G(y_t)$, where $G$ is the distribution function computed from the KDE.} \label{WAfig:elecdata} \end{figure} \begin{landscape} \begin{figure}[thbp] \centering \begin{tabular}{@{}ccc@{}} \includegraphics[width=170pt]{WAcpdfa.pdf} & \includegraphics[width=170pt]{WAcpdfb.pdf} & \includegraphics[width=170pt]{WAcpdfc.pdf} \\ \noalign{\vspace{15pt}} \includegraphics[width=170pt]{WAcpdfd.pdf} & \includegraphics[width=170pt]{WAcpdfe.pdf} & \includegraphics[width=170pt]{WAcpdff.pdf} \end{tabular} \caption{Marginal copula densities $c^{(2)}(u_t,u_{t-1}|\hat{\bm{\psi}})$ for each of the three inversion copula models fitted to the quarterly U.S. electricity inflation data. Panels~(a,b,c) plot the densities with a common vertical axis truncated at 7 for interpretation. Panels~(d,e,f) plot the logarithm of the same three densities. Each density has been computed at the posterior mean $\hat{\bm{\psi}}$ of the copula parameters.} \label{WAfig:copdensity_comparison} \end{figure} \end{landscape} \begin{landscape} \begin{figure}[htbp] \begin{center} \includegraphics[width=500pt]{WApred_moments_all.pdf} \end{center} \caption{Moments of the one-step-ahead predictive distributions. Panels~(a,c,e) plot in blue the predictive means from each of the three copula models C1, C2 and C3, respectively. Also plotted is a scatterplot of the data. Panels~(b,d,f) plot the standard deviations of the predictive distributions from the three copula models in blue. The standard deviations of the predictive distributions from the three corresponding state space models, fit directly to the same data, are plotted in red.} \label{WAfig:pred_moments} \end{figure} \end{landscape} \newpage \section*{C: Accuracy of Spline Interpolation} \begin{figure}[htbp] \begin{center} \includegraphics[width=500pt]{WAfigR1-new.pdf} \end{center} \caption{Summary of the accuracy of spline approximations to the margin of $Z_1$ computed at the posterior mean $\bm{\psi}=\hat{\bm{\psi}}$ for InvCop1. Panels~(a), (b) and~(c) plot the approximations of $F_{Z_1}^{-1}$, $\log f_{Z_1}$ and $F_{Z_1}$, respectively. Also plotted are the true functions computed using slower but more accurate numerical methods in MATLAB. The approximate and true functions are so similar that they are visually indistinguishable. Panels (d), (e) and~(f) plot the absolute difference between the true functions and their spline approximations, which are very small. The integrated absolute difference (computed on a grid of 500 points over the domain of each function) between the two functions in panel~(a) is 1.282e-06, while for the two functions in panel~(b) it is 2.925e-10.} \label{fig:R1} \end{figure} \end{document}
{'timestamp': '2017-10-24T02:04:07', 'yymm': '1606', 'arxiv_id': '1606.05022', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05022'}
arxiv
\section{Developing applications supporting a global public sphere} \section{The need for cross-national analysis} The recently published news on the Panama Papers leak demonstrates firstly that tax fraud is an international phenomenon and secondly how cross-national cooperation can be beneficial to investigating and reporting. Admittedly, this is an exceptional case. Global events are still "primarily covered in accordance with the traditional national outlook, i.e. national domestications and the 'domestic vs. foreign news” logic'" \citep[847]{berglez_what_2008}. A global public sphere to address globally relevant issues has not been established yet and national biases impede possible international approaches. This way "the global sociopolitical order becomes defined by the realpolitik of nation-states that cling to the illusion of sovereignty despite the realities wrought by globalization" \citep[80]{castells_new_2008}. Reciprocal knowledge about controversial issues across national borders is necessary to provide common ground for fruitful global discussions and proposals. In this position statement, we provide evidence that joining forces improves media transparency on a global scale: Combining machine learning with statistics and journalism studies contributes to bridging the segmented data of the international public sphere. Following an interdisciplinary approach we tackle the question of how methods from machine learning help to deepen our understanding of the discussion on cross-national issues. LDA, @TM, PDNs and word2vec are used to enhance transparency on international media coverage: Range, amount and framing of issues can be compared with fewer translation efforts. Differences in perception become obvious and evaluation divides can be interpreted. This will be demonstrated by an analysis of the coverage on the controversial Transatlantic Trade and Investment Partnership (TTIP) between the United States of America (U.S.) and the European Union (E.U.). TTIP was designed to facilitate trade between the U.S. and the E.U. However, TTIP's actual impact on economies and societies has been discussed controversially in both the U.S. and Europe. Media perception has differed in many aspects. The comparison of a U.S. newspaper (New York Times) and a German newspaper (S\"uddeutsche Zeitung) reveals that TTIP is more hotly debated in Germany than in the U.S., see Fig.~\ref{keywordsearch}. The New York Times highlighted the need of bank regulations and the threat that exporting nations pose to local markets. Whereas, S\"uddeutsche Zeitung focused largely on consumer protection. On the one hand TTIP was criticized for its implications on environmental and food standards, on the other for the negotiation proceedings that were characterized by democratic deficits and insufficient transparency. Intricate questions derive from the simple comparison of word frequencies: Why does the range of reported arguments differ so considerably? Is the German media reluctant to the Trade Partnership in general? And what are the reasons for the German obsession with the 'chlorinated chicken' as evidenced in the significant number of these words in articles broaching the TTIP issue? The TTIP example illustrates that media coverage can largely differ across nations. Public discussion is still strongly influenced by national media. Multiple languages add to the difficulties to frame a common global perspective. However, in a globalized world, crisis and political decisions have become far too complex to be dealt with on a national level only. Combining Machine Learning and data-driven journalism enables researchers to investigate large corpora of texts to reveal national patterns of argumentation, which in turn can promote international understanding. \begin{figure*} \centering \subfigure[Comparison of number of articles containing 'TTIP' in New York Times and S\"uddeutsche Zeitung.\label{keywordsearch}]{ \includegraphics[scale=0.32]{sz_nyt_ttip.pdf} } \quad \subfigure[PDN created from the articles containing 'TTIP' in S\"uddeutsche Zeitung. (German words were translated to English)\label{pdnsz}]{ \includegraphics[trim = 90mm 20mm 0mm 80mm,clip,scale=0.29]{ttipEng.pdf} } \quad \subfigure[Attentional curves capture the development of topics in news articles over time, here illustrated for the war on Ukraine.\label{ukraineGompertz}]{ \includegraphics[scale=0.19]{gompertzsNewTt9times.png} } \caption{Boosting international understanding and transparency in news coverage using machine learning and data-driven journalism.} \end{figure*} \section{ML meets Data-Driven Journalism} There is an arms race to `deeply' understand text data, and consequently a range of different techniques has been developed for media analysis. However, when using them for data-driven journalism, e.g. to gain a deeper understanding of the news reception of important political and societal issues, there are also challenges. Just to name few of the recent ML techniques, DeepDive \cite{niu12} aims to extract structured data from texts, Metro Maps \cite{sha12} extract easy to understand networks of news stories, and word2vec \cite{mik13} computes Euclidean embeddings of words. It is trained on a corpus of documents and transforms each word into a vector by calculating word correlations. Similarity measures can be applied to the resulting vectors. Particularly, word2vec can be used to compute those words that are most likely to occur in the same context as a given word. It thus has the potential to reveal which words are linked closest to a given issue and hence provides a semantically enriched alternative to classical keyword searches, which is well used by journalists. Finally, topic models, have been used successfully in many scenarios, in particular to model discourses. Most prominent among them is Latent Dirichlet Allocation (LDA) \cite{blei03} that characterizes each topic as a list of words and their respective probabilities to appear in the topic. Topics over Time (TOT) \cite{wan06} follows this paradigm, but introduces a temporal component. In TOT, each document has a timestamp and the probability of a topic grows and declines over time. Thus, TOT can be employed to analyze trends in news. Due to this rich machine learning toolbox for analyzing news articles, it is tempting to put a stack of news articles on a data journalist's desk saying `Enjoy'. Unfortunately, data-driven journalism is not that simple. Reconsider topic models, the main focus of the present paper. TOT does not model attention of the crowd in a physically plausible way. Triggered by models from communication studies \cite{kolb05} and the observation that the Shifted Gompertz distribution models attentional curves \cite{bau14}, we developed a novel Attentional Topic Model (@TM) \cite{poe16}. It captures well the growth and decline of the popularity of topics in a physically plausible way. Moreover, multinomial word distributions, such as in LDA and TOT capture the most common words used in each topic. However, they often fail to give a deeper understanding of topics required when investigating media discourse. That is why APMs \cite{ino14}, which discover word dependencies in each topic, have been introduced; essentially, they encode topics as weighted undirected graphs. Often, however, word dependencies are asymmetric. If the word 'treaty' appears in a text, it is very likely that the text will refer to the museum's 'secretary of state', too. The phrase 'secretary of state', on the other hand, is a very general term and can be used in many different contexts. Thus, it does not make the word 'treaty' per se more likely. In \cite{erd16}, we therefore extended APMs to directed dependencies using Poisson Dependency Networks \cite{had15}. Moreover, longer chains of directed dependencies may provide interesting clues to understand a topic. Finally, topic models have been traditionally evaluated using intrinsic measurements such as the likelihood and the perplexity of topics \cite{wal09}. As these measurements do not necessarily correspond to human judgment \cite{cha09}, we pool together the talents of journalists, machine learners and statisticians to obtain a better understanding of what makes a good topic. If we use topic models to create subcorpora e.g.\ for content analysis we have to ensure that the subcorpora are at least as good as the ones from other methods like keyword searches. The gold standard is the evaluation based on human judgment \cite{stryker_validation_2006}. The use of statistical methods helps to reduce the time requirement for human coders to come to a significant statement about the quality of a subcorpus. Moreover, our interdisciplinary research led to several interesting observations about the quality of topics: While researchers from a mathematical background tended to focus on topics linked to large quantities of documents, journalists oftentimes preferred those topics that were created from only few meaningful documents. Likewise words like 'can', 'need' and 'do', that were considered stopwords by machine learners, really caught the journalist's attention. We believe that these small and seemingly insignificant notices can help to improve the application and lead a way to new computational models. Can new topic models be developed to cater better to the specific needs of journalists? Are there different approaches to gain deeper insight into each topic? We will illustrate this using the case of TTIP. \section{Towards an International View on TTIP} TTIP affects millions of people living in the U.S.\ and the E.U.\ and its negotiations have been controversial. However, content analysis of newspapers indicates that the issue is of diverging national importance. Both compared newspapers are high-circulation dailies from metropolises that exhibit a rather liberal orientation. Despite these similarities, coverage on TTIP varies significantly (see Fig.~\ref{keywordsearch}). It is notable that coverage on TTIP increases considerably from 2014 in S\"uddeutsche Zeitung (SZ), whereas the number of articles in the New York Times (NYT) remains unaltered. In order to shed light on this disparity the general coverage on the U.S.A. and Europe, respectively, was analyzed. In SZ the sub-corpus with all articles including the pattern of the letters \verb+usa+ contained 59.637 articles (36 per cent of the corpus) whereas the \verb+europe+-corpus in NYT contained 34.177 (11 per cent of the corpus). \begin{figure}[b] \centering \caption{Topics in NYT found by LDA and labeled by journalists.\label{lda}} \includegraphics[scale=0.2]{wordle4.png} \end{figure} {\bf (Topic Models)} LDA was used to find 100 topics in each sub-corpus. The topics were labeled by journalists using top words and top articles. The topics in NYT are illustrated in Fig.~\ref{lda}. A glance at the results shows distinctly the different perspectives on TTIP in the public spheres. In SZ TTIP appears on the top word list of a topic covering articles on policies of the European Commission along with conjoined words like customs, arbitration and investor protection. In NYT TTIP is not among the top words of the European Commission topic which is dominated by stakeholders dealing with financial issues around the euro crisis. Interpreting the LDA topics further TTIP plays a less significant role in the U.S.-European relations represented by the LDA topics which are mainly various international conflicts, art, sports and general economy related topics. {\bf (Directed word dependencies)} A PDN \cite{had15} trained on the articles of S\"uddeutsche Zeitung shows that the constitution of the E.U.\ as a politico-economic union of 28 states places the question of parliamentary participation in the foreground (see Fig.~\ref{pdnsz}). In the U.S., this question does not arise. {\bf (Attentional Topic Models)} When analyzing the discourse on Europe in NYT through Attentional Topic Models \cite{poe16}, we found no attentional topic corresponding to the TTIP. Instead, the discussion focused on different topics such as the war in the Ukraine (see Fig.~\ref{ukraineGompertz}). {\bf (word2vec)} Analyzing word2vec results highlights diverse reciprocal perception: U.S. and German newspaper both coincide covering Germany mainly considering the recent migration. However, on the coverage on the U.S. SZ and NYT drift apart: In the SZ the importance of U.S. as an economic partner is demonstrated, whereas the NYT covers the U.S. in a broader range of topics including several sports (see Table \ref{w2v}). Comparing the use of TTIP indicates that the NYT uses more matter-of-fact words in connection with TTIP while SZ seems to include more commenting and evaluating words including 'chlorinated chicken'. Word2vec solves the mystery of the 'chlorinated chicken': free trade agreement, genetically modified food and genetically modified corn are among the most similar words. For German TTIP opponents chicken meat disinfected with chlorine has become a symbol for lowering food safety standards and the disadvantages of TTIP in general. Applying machine learning to understand the cross-nationally diverse discourse on TTIP highlights the benefit which can be derived from an interdisciplinary approach. Yet, this interdisciplinary approach is still in its infancy. \begin{table}[t] \begin{center} \begin{tabular}{p{1.2cm}p{6cm}} \hline \multirow{2}{*}{USA}& \tiny{NYT: santander consumer, served chairman, basketball, womens hockey, oracle team, senior vice, kan, goodgame, divac, columbus ohio}\\ &\tiny{SZ: kanada mexico, united states, china hongkong, largest market, most important trade partner, embargo, pacific states, china russia, great britain france, usa kanada}\\ \hline \multirow{2}{*}{Germany}& \tiny{NYT: germanys, europe, asylum seekers, migrants, german, plan distribute, migrants entered, accept migrants, hungary closed, human flow}\\ &\tiny{SZ: europe, countries, immigrant, kanada australia, prospects of remaining, immigrants, arriving refugees, many refugees, most refugees, european countries}\\ \hline \multirow{2}{*}{TTIP}& \tiny{NYT: transatlantic trade, investment partnership, trade ministers, mr froman, trade agreement, trade negotiations, trade negotiators, trade talks, euus, trade commissioner}\\ &\tiny{SZ: ceta, investor protection, free trade agreement, free trade agreement ttip, trade agreement, investment protection, eu kanada, transatlantic free trade agreement, chlorine chicken, free trade}\\ \hline \end{tabular} \end{center} \caption{Most similar words to 'USA', 'Germany' and 'TTIP' in NYT and SZ (translated from German) according to word2Vec.\label{w2v}} \end{table} \section{Lesson Learned: Bridging Fields} The absence of a common public sphere has already been constituted as an enduring obstacle to further political and economic integration in Europe \cite{habermas_crisis_2014,jones_failing_2015,vossing_transforming_2015,risse_european_2015}, a region where the difficulty of understanding between people speaking different languages becomes evident in spite of small distances. Agents in politics and business face a confusing multitude of partly conflicting national discourses. Therefore, finding common solutions in a democratic context is hindered. The defiance of finding common ground for discussion becomes even more challenging if international understanding is volitional. To amend the development of a global public sphere discussing and approaching international challenges it is imperative that computer scientists, information scientists, and experts in communication studies pool their talents and knowledge to help find efficient and effective ways of managing the news sources available. Research in this new field is necessarily interdisciplinary since developing new methods and applying established ones should eventually lead to instruments that enable not only researches and experienced data journalists but also practitioners in the media, in politics and business to compare debates internationally. So far using machine learning methods for content analysis is still uncommon in communication studies and best practices for algorithmic text analysis (ATA) are still being negotiated. In the TTIP case they were used as part of a hybrid approach "that combines computational and manual methods throughout the process . . . [to] retain the strengths of traditional content analysis while maximizing the accuracy, efficiency, and largescale capacity of algorithms for examining Big Data." \cite{lewis_content_2013} Following this approach, patterns that so far have been hidden can be made visible. Transparency will be achieved on the prevailing debates, showing how they evolve and relate to existing narratives, identifying national frames and agenda setters and showing divergences and convergences across national debates. The focus of research should be on interlocking of long-term discourse patterns with current issues. Which arguments and frames have dominated the debate on the refugee crisis? Why is the opposition against TTIP so strong in the German speaking countries of Germany, Austria and Luxembourg while others embrace the deal? Why have Germany and France differed so fundamentally on how to handle the Greek debt crisis? Which persons and institutions are dominating the debates in the respective countries? In which areas do new topics or new frames emerge? Our TTIP study also motivates to revisit a considerable number of important theories of communication studies. The mechanisms of Agenda-setting \cite{bennett_toward_2006} and issue attention cycles \cite{downs_up_1972} can be visualized using clustering models in an entirely new dimension; the most important agents of the public discourse \cite{habermas_structural_1991} can be analyzed with named-entity-recognition and network-visualizations, framing of news \cite{entman_framing:_1993} can be illustrated using sentiment-analysis. In a nutshell, the potential of machine learning for analyzing international communication and discourses is high. However, the potential can only be achieved if new methods are developed and made available as easy-to-use applications. Overall, applying machine learning to broaden insight in international news coverage opens up fundamentally new intellectual territory with great potential to advance the state of the art of computer science and related disciplines and to provide unique societal benefits. Measures to achieve this potential involve intense interdisciplinary collaboration and the mutual objective to develop methods being easily usable for everyone interested in profound international understanding. \section*{Acknowledgment} This work was supported by the DFG Collaborative Research Center SFB 876 project A6 and A1 and the Dortmund Center for Media Analysis (DoCMA).
{'timestamp': '2016-06-17T02:08:14', 'yymm': '1606', 'arxiv_id': '1606.05110', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05110'}
arxiv
\section{Introduction} \label{sec:introduction} Heterogeneous computing systems that consist of CPUs and accelerators such as Nvidia GPU \cite{nvidia_tesla} or Intel Xeon Phi \cite{chrysos2014intel} are becoming prevalent. Some of the most powerful supercomputers in the TOP500 list (November 2015,~\cite{top500}) are heterogeneous at their node level. For example, a node of Tianhe-2 (no. 1 in TOP500) comprises two Intel IvyBrigde CPUs and three Intel Xeon Phi co-processors; a node of Titan (no. 2 in TOP500) contains one AMD Opteron CPU and one Nvidia Tesla GPU. Utilizing the computational power of all the available resources (CPUs + accelerators) in heterogeneous systems is essential to achieve good performance. However, due to different performance characteristics of their processing elements, achieving a good workload distribution across multiple devices on heterogeneous systems is non-trivial \cite{benkner11,vettersurvey,sandrieser12}. Furthermore, optimal workload distribution is most likely to change for different applications, input problem sizes and available resources. Determining the optimal system configuration (including the number of threads, thread affinity, workload partitioning ratio for multi-core processors of the host and the accelerating devices) using brute-force may be prohibitively time consuming. Various approaches for workload distribution have been proposed. For example Augonnet et al. \cite{starpu2011augonnet} propose a task scheduling library to handle the load balancing and the memory transfer. Scogland et al. \cite{coretsar2014scogland} propose an adaptive worksharing library to schedule computational load across devices. Ravi and Agrawal \cite{ravi2011dynamic} propose a dynamic scheduling framework that splits tasks into smaller ones and distributes them across processing elements on heterogeneous systems. Grewe and O'Boyle \cite{grewe2011static} propose a static partitioning approach to distribute OpenCL programs on heterogeneous systems. However, so far not much research was focused on using meta-heuristics to optimize the workload distribution of data-parallel applications, which considers various parameters such as: the number of threads, the thread affinity, and the workload partitioning ratio for host CPUs and co-processing devices. In this paper we propose an optimization approach that combines the Combinatorial Optimization and Machine Learning to determine near-optimal system configuration parameters of a heterogeneous system. We use Simulated Annealing as a combinatorial optimization approach to search for the optimal system configuration in the given parameter space, whereas for performance evaluation of the proposed system configurations during space exploration we use the Boosted Decision Tree Regression. The objective function that we aim to minimize is the application's execution time. To evaluate our approach we use a parallel application for DNA Sequence Analysis on a platform that comprises two 12-core Intel Xeon E5 CPUs and an Intel Xeon Phi 7120P co-processor with 61 cores. Using our optimization approach to determine the near-optimal system configuration we achieve a speedup of 1.74$\times$ compared to the case when only the available resources of the host are used, and up to 2.18$\times$ speedup compared to the case when all the resources of the accelerating device are used. \textbf{Contributions:} The major contributions of this paper are: \begin{itemize} \item A Combinatorial Optimization approach to explore the large system configuration space; \item A supervised Machine Learning approach to evaluate the performance of parallel applications; \item An approach that combines the combinatorial optimization heuristic with machine learning to determine a near-optimal system configuration, such that the execution time is decreased; \item Experimental evaluation of our approach; \item Performance comparison of our approach that utilizes both CPUs and accelerators, compared to CPU-only and accelerator-only approaches. \end{itemize} The rest of the paper is organized as follows. Section \ref{sec:background} provides background and motivation. Section \ref{sec:framework} describes the design and implementation of our optimization approach. Section \ref{sec:evaluation} presents our evaluation. This paper is compared and contrasted to the state-of-the-art related work in Section \ref{sec:rw}. We provide conclusions and discuss the future work in Section \ref{sec:conclusion}. \section{Background and Motivation} \label{sec:background} In this section we will motivate the need for optimized workload distribution across heterogeneous devices. To illustrate and motivate the problem of workload distribution on heterogeneous platforms and to evaluate the proposed approach, we will measure the execution time of a DNA Sequence Analysis application \cite{mp-cse15,mp-pbio15} in a heterogeneous platform that is accelerated using an Intel Xeon Phi co-processor. Details related to the heterogeneous platform and the application used for experimentation will follow in the next sections. \subsection{Heterogeneous Computing Platforms with Intel Xeon Phi} \label{sec:xphi} \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{emil-platform.eps} \caption{Our target accelerated system comprises a host with two CPUs and an Intel Xeon Phi device.} \label{fig:emil-platform} \end{figure} A typical heterogeneous platform that is accelerated with the Intel Xeon Phi is diagrammed in Figure \ref{fig:emil-platform}. Such platforms may consist of one or two CPUs on the host (left-hand side of the figure), and one to eight accelerators (right-hand side of the figure). The host CPUs are of type Intel Xeon E5, which consists of 12 cores, each of them supports two hardware threads that amounts to a total of 48 threads. The L3 cache is split in two parts, in total it features a 30MB L3 cache. The Xeon phi accelerator has 61 cores, where each core supports four hardware threads, in total 244 threads per co-processor \cite{chrysos2014intel}. The Xeon Phi comes with a lightweight Linux Operating System ($\mu$OS) that allows us to either run applications natively or offload them. One of the cores is used by the OS, the remaining 60 cores are used for experimentation. The Xeon Phi has a unified L2 cache memory of 30.5MB. One of the key features of the Intel Xeon Phi is its vector processing units that are essential to fully utilize the co-processor \cite{TianSPGKMCP13}. Through the 512-bit wide SIMD registers it can perform 16 (16 wide $\times$ 32 bit) single-precision or 8 (8 wide $\times$ 64 bit) double-precision operations per cycle. The performance capabilities of the Intel Xeon Phi have been investigated by different researches within different domains \cite{vp-hpcc15,liu2016parallel,DokulilBBPSB13}. \subsection{DNA Sequence Analysis} \label{sec:dna-seq} For motivation purposes, and later on for evaluation of our approach we have used a high performance data analytic application for DNA Sequence Analysis \cite{mp-cse15,mp-pbio15} that is based on Finite Automata and finds patterns (so called motifs) in large-scale DNA sequences. It allows efficient use of the computational resources of the host and accelerating device. The DNA Sequence Analysis application targets heterogeneous systems that are accelerated with the Intel Xeon Phi co-processor, and is able to exploit both the thread- and SIMD-level parallelism. \subsection{Motivational Experiment} \label{sec:motivation} We measured the execution time of a DNA Sequence Analysis application \cite{mp-cse15,mp-pbio15} on a simple heterogeneous system that consists of two Intel Xeon CPUs and one Intel Xeon Phi co-processor. In reality, heterogeneous systems may consist of several different types of accelerators with different performance capabilities. We run these experiments with different input sizes and number of CPU threads. To highlight the work-distribution problem we vary the distribution ratio across host and device. Figure \ref{fig:mot-case-study} shows the results of our experiments. The x-axis indicates the work distribution ratio, for instance $60/40$ means that 60\% of the work is mapped to the host CPUs and the remaining 40\% is mapped to the co-processor. The y-axis indicates the execution time, note that the values are normalized in a range from 1-10. In the first experiment, depicted in Fig. \ref{fig:mot-turkey-48}, we may observe that the lowest execution time is achieved when running on the CPU only. That is due to the relatively small input size used, where any work distribution makes the execution time be biased by the represented overhead. In the second experiment, shown in Fig. \ref{fig:mot-human-48}, we used a larger input size, therefore running on the 48 threads of the CPU or on the co-processor only is not the most effective mapping. We may observe that a work distribution of $70/30$ or $60/40$ is much faster. Figure \ref{fig:most-human-4} shows the results when using the same input size but the number of CPU threads is reduced to 4. We may observe that the optimal work distribution is when we assign 70\% of the work to the co-processor. Please note that in these experiments we consider only 11 possible workload partition ratios ($0, 10, 20, ..., 100$). In real-world problems this ratio can be any number in the interval 0-100. From the above experiments we may see that the optimal workload distribution depends on the input size and the available resources. If we consider more features (example, thread affinity, number of threads per core) or multiple accelerators with different performance characteristics, the number of all possible system configurations increases dramatically. Determining the optimal system configuration using brute-force may be prohibitively time expensive. The number of all possible system configurations is a product of parameter value ranges, \begin{equation} \label{eq:1} \prod_{i=1}^{n} R_{c_i} = R_{c_1} \times R_{c_2} \times .. \times R_{c_n} \end{equation} where $C=\{c_1, c_2, ..., c_n\}$ is a set of parameters and each $c_i$ has a value range $R_{c_i}$. In the next section we are going to propose an intelligent work distribution approach that is able to determine an optimal system configuration using combinatorial optimization and machine learning. \begin{figure}[tb] \centering \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\textwidth]{mot-turkey-48.eps} \caption{Experiment 1. (Input Size = 190MB, \# CPU Threads = 48)} \label{fig:mot-turkey-48} \end{subfigure} \hfill ~ \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\textwidth]{mot-human-48.eps} \caption{Experiment 2. (Input Size = 3250MB, \# CPU Threads = 48)} \label{fig:mot-human-48} \end{subfigure} \begin{subfigure}[b]{0.45\textwidth} \includegraphics[width=\textwidth]{mot-human-4.eps} \caption{Experiment 3. (Input Size = 3250MB, \# CPU Threads = 4)} \label{fig:most-human-4} \end{subfigure} \caption{DNA Sequence Analysis with different input sizes and number of CPU threads used. The execution time values are normalized in the range of 1-10.} \label{fig:mot-case-study} \end{figure} \section{Design and Implementation} \label{sec:framework} One of the most compelling features of the Intel Xeon Phi co-processor is the double advantage of transforming-and-tuning, which means that tuning an application on the Intel Xeon Phi for scaling (more cores and threads), vectorization and memory usage, stands to benefit an application when running on the Intel Xeon processors. Therefore, with not much programming investment application tailored for many-core Intel Xeon Phi co-processors can benefit when running on multi-core Intel Xeon CPUs, and vice-versa. To distribute the workload across the heterogeneous devices we use the offload programming model. We overlap the parts offloaded to the co-processor with the ones that are running on the host CPUs, which mitigates the idle time for both CPUs and accelerators. We target applications with \enquote{divisible} workload, which means that the workloads division can be adjusted arbitrarily. However, as seen in Section \ref{sec:motivation}, in heterogeneous systems that have processing units of different speed, finding an optimal partitioning ratio for a given workload is non-trivial. In this section, we describe our approach for determining the optimal system configuration parameters (including number of threads, thread affinities, workload fraction) of a heterogeneous systems. The goal of our approach is to propose a near-optimal system configuration such that the overall execution time is minimized. The system parameters and their possible values are listed in Table \ref{table:sys-parameters}. \begin{table}[t] \centering \scriptsize \caption{The set of considered parameters and their values for our target system.} \label{table:sys-parameters} \begin{tabular}{@{}lll@{}} \toprule \multicolumn{1}{c}{} & Host & Device \\ \midrule Threads & \{2, 4, 6, 12, 24, 36, 48\} & \{2, 4, 8, 16, 30, 60, 120, 180, 240\} \\ Affinity & \{none, scatter, compact\} & \{balanced, scatter, compact\} \\ Workload Fraction & \{1..100\} & \{100 - Host Workload Fraction\} \\ \bottomrule \end{tabular} \end{table} To determine the optimal system configuration in a large parameter space one could try to naively enumerate over all possible parameter values, a technique we refer to as \emph{enumeration} (also known as \emph{brute-force}). The use of enumeration for design-space exploration in a real-world context may be prohibitively time consuming \cite{Bosschere2001,PllanaBMNX08,pbb08,fahringer04}. Therefore, we propose to use Simulated Annealing as a combinatorial optimization method to search for an optimal system configuration in a given parameter space. We may use \emph{measurements} or \emph{model-based prediction} for evaluation of the system performance for each system configuration. In comparison to the measurement based evaluation, the prediction-based is much faster but less accurate. Furthermore it requires training of the prediction model. In this paper, we consider using various optimization approaches: \begin{description} \item[a) Enumeration and Measurements (EM)] - Certainly determines the optimal system configuration, however it involves a very large number of performance experiments. The expected optimization effort is very high. Since EM has no performance prediction capabilities, for each program input the whole optimization process needs to be repeated. \item[b) Enumeration and Machine Learning (EML)] - uses machine learning to infer about the system performance. Since it has to examine all of the possible system configurations, the effort needed for parameter space exploration is still high. \item[c) Simulated Annealing and Measurements (SAM)] - uses Simulated Annealing to guide the parameter space exploration and measurements for performance evaluation of the proposed system configurations. This method significantly reduces the effort for parameter space exploration. \item[d) Simulated Annealing and Machine Learning (SAML)] - Compared to SAM, SAML provides the possibility to predict the system performance for new unseen system configurations, because it uses machine learning for performance evaluation. \end{description} The properties of each of the proposed approaches are listed on Table \ref{table:opt-method-properties}. In what follows in this section we describe our approach for parameter space exploration using Simulated Annealing and our approach for performance prediction using Machine Learning. \begin{threeparttable}[t] \scriptsize \centering \caption{Properties of optimization methods. } \label{table:opt-method-properties} \begin{tabular}{@{}lllllc@{}} \toprule Method & \specialcell{Space\\Exploration} & \specialcell{Sys. Conf.\\Evaluation} & Effort & Accuracy & Prediction \\ \midrule EM & Enumeration & Measurements & high & optimal & no \\ EML & Enumeration & \specialcell{Machine\\Learning} & high & near-optimal & yes \\ SAM & \specialcell{Simulated\\Annealing} & Measurements & medium & near-optimal & no \\ SAML & \specialcell{Simulated\\Annealing} & \specialcell{Machine\\Learning} & medium & near-optimal & yes \\ \bottomrule \end{tabular} \end{threeparttable} \subsection{Using Simulated Annealing for Parameter Space Exploration} \label{sec:SA} Press et al. \cite{NumRecipes2007} describe several heuristics for solving optimization problems, including: Genetic Algorithms, Ant Colony Optimization, Simulated Annealing, Local Search, Tabu Search. Factors such as the type of the optimization problem and search space, the computational time, and demanded solution quality need to be considered when choosing the most convenient heuristic for a specific problem \cite{ACO4PS, braun2001comparison}. We have decided to use Simulated Annealing because of its ability to cope with very large discrete configuration space, and the ability to avoid getting stuck at local minimums, which makes it much better on average at finding an approximate global minimum on a large space. The name and inspiration comes from the process of annealing in metallurgy, a technique that includes heating and controlled cooling of materials. At high temperatures particles of the material have more freedom of movement, and as the temperature decreases the movement of particles is restricted as well. When the material is cooled slowly, the particles are ordered in the form of a crystal that represents its minimal energy. In the same way, in Simulated Annealing there is a temperature variable $T$ that controls the cooling process. One of the fundamental properties of the Simulated Annealing meta-heuristic is its ability to accept worse solutions at a higher temperature, therefore there is a corresponding chance to get out of local minimum, which enables a more extensive search for the global optimal solution. The lower the temperature, less likely it accepts new solutions \cite{NumRecipes2007}. The method of Simulated Annealing is a suitable technique for optimization of large scale problems, especially the ones where the global optimum is hidden among many local optima. Examples like the traveling salesman problem (TSP) or designing complex integrated circuits are just some of many problems that can be solved using the Simulated Annealing. The space over which the objective function is defined is discrete and very large (factorial) configuration space, for example, in the TSP the set of possible orders of cities. In the context of the load balancing problem in heterogeneous systems, we define the configuration space as follows: \begin{itemize} \item workload fraction is a discrete value from 0-100, which indicates the percentage of the workload that needs to be executed in a specific device. For instance in a heterogeneous system with one CPU and one accelerator, if 40\% of the workload is mapped to the host CPU, the remaining 60\% is assigned to the accelerator(s); \item number of threads for the host CPU and the accelerator(s); \item the thread allocation strategy for the host CPU and the accelerator(s); \end{itemize} The objective function $E$ (analog of energy) of our approach is to minimize the total execution time of an application, which basically is determined by the maximum of the $T_{host}$ and $T_{device}$: \begin{equation} E = max(T_{host}, T_{device}) \end{equation} \begin{figure}[tb] \centering \includegraphics[width=.7\linewidth]{simulated-annealing-algorithm.eps} \caption{The Structure of the Simulated Annealing Algorithm.} \label{fig:sa-algorithm} \end{figure} An overview of the Simulated Annealing algorithm is depicted in Figure \ref{fig:sa-algorithm}. The algorithm start by setting an initial temperature and creating a random initial solution. Then we begin looping until the annealing process has sufficiently cooled. We define the annealing schedule as follows: \begin{equation} T = T * (1 - coolingRate); \end{equation} where $coolingRate$ determines the cooling rate. The temperature variable plays a decisive role in the acceptance probability function. When a new solution is proposed, we first check if its energy $E'$ is lower than the energy of the current solution $E$. If it is, we accept it unconditionally, otherwise we consider how much worse is the time of the proposed solution compared to the current one, and what is the temperature of the system. If the temperature is high, the system is more likely to accept solutions that are worse than the current one. The acceptance probability function $p$ is determined as follows: \begin{equation} p = exp((E - E') / T) \end{equation} where $E'$ determines the energy of the newly generated solution. This function allows the system to get out of local optima, and find a new better one. \subsection{Using Machine Learning for Performance Evaluation} \label{sec:ml} The evaluation of the newly generated solutions by the Simulated Annealing can be done using measurements of actual program execution, or using machine learning approaches to predict the execution time of an application on the host $T_{host}$ and accelerator $T_{device}$. In our approach we use the predicted execution time to determine the near-optimal system configuration. The aim is to balance the workload between the host and device(s) such that the total execution time is reduced. During the development of our performance prediction model we have considered various supervised machine learning approaches, including Linear Regression, Poisson Regression, and the Boosted Decision Tree Regression. In our performance prediction experiments, we achieved more accurate prediction results with the Boosted Decision Tree Regression. The Boosted Decision Tree Regression is a supervised machine learning algorithm that uses boosting to generate a group of regression trees and determine the optimal tree based on a loss function. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{boosted-decision-tree-regression.eps} \caption{The Predictive Model using Boosted Decision Tree Regression} \label{fig:ml-algorithm} \end{figure} The execution time for most of the applications is mainly influenced by the input size, the available computing resources, and the thread allocation strategies. Therefore, we use these features to train and evaluate our prediction model. We have generated training data for training our performance prediction model by executing the application used during evaluation of our approach with different number of threads, thread affinities and input sizes. The main features including their possible values used to train and evaluate our prediction model are listed in Table \ref{table:sys-parameters}. We generated data by running our experiments on two different environments (host and device). On the host we used $2, 4, 6, 12, 24, 36$ and $48$ threads. We varied the thread affinities between \emph{none, scatter,} and \emph{compact}. On the accelerator we used $2, 4, 8, 16, 30, 60, 120, 180$ and $240$ threads, whereas we varied the thread affinity strategies between \emph{balanced, scatter,} and \emph{compact}. We trained our model with different input fractions, varying from 0-100, which represents the percentage fraction of the input that needs to be examined in a specific device. In total the data of about 7200 experiments were used to train and evaluate the performance prediction model using the Boosted Decision Tree Regression. Half of the experiments were used to train the prediction model, and the other half were used for evaluation. Figure \ref{fig:ml-algorithm} illustrates the process of training and predicting an unseen system configuration. The left hand side of the figure shows the training model, which basically takes as input a structured data set, and trains a model using the Boosted Decision Tree Regression algorithm. The gray colored boxes are used for evaluation of our approach. The right-hand side of the figure shows the Predictive Model, which takes the proposed system configurations as input, uses the trained model and predicts the execution time. \section{Evaluation} \label{sec:evaluation} In this section we evaluate experimentally our proposed combinatorial optimization approach for workload distribution on heterogeneous platforms. We describe the following: \begin{itemize} \item the experimentation environment \item evaluation of our prediction model \item comparison of the SAML and EM \item achieved performance improvement \end{itemize} \subsection{Experimentation Environment} \label{sec:exp-env} In this section we describe the experimentation environment used for the evaluation of our approach for workload sharing on heterogeneous platforms. We describe the system configuration, the application used for testing, its input dataset, and the parameters that define the system configuration. In Section \ref{sec:xphi} we described the architecture of the heterogeneous platform used for performance evaluation of our approach. The major features of our system are listed in Table \ref{table:emil}. In Section \ref{sec:dna-seq} we talked about the application used for evaluation of our approach, that is a DNA Sequence Analysis application. We used the code generated by our PaREM tool \cite{mp-cse14} as a basis for our DNA Sequence Analysis application. The DNA sequence is basically a long string of characters. Each character indicates one of the nucleotide bases Adenine (A), Cytosine (C), Guanine (G), and Thymine (T). The size of the DNA sequences of various organisms is typically of several gigabytes. For experimentation, we used real-world DNA sequences of human (3.17GB), mouse (2.77GB), cat (2.43GB) and dog (2.38GB). These DNA sequences are extracted from the GenBank sequence database of the National Center for Biological Information \cite{GenBank}. The parameters that define the system configuration for our combinatorial optimization approach are shown in Table \ref{table:sys-parameters}. All the parameters are discrete. The considered values for the number of threads for host are $\{2, 6, 12, 24, 36, 48\}$, whereas for device are $\{2, 4, 8, 16, 30, 60, 120, 180, 240\}$. The thread affinity can vary between $\{none, compact, scatter\}$ for the host, and $\{balanced, compact, scatter\}$ for the device. The DNA Sequence Fraction parameter can have any number in the range $\{0,..,100\}$, such that if $60\%$ of the DNA sequence is assigned for processing to the host, the remaining $100 - 60 = 40\%$ is assigned to the device. \begin{table}[!t] \scriptsize \caption{\emph{Emil}: hardware architecture} \label{table:emil} \centering \begin{tabular}{lll} \toprule Specification & Intel Xeon & Intel Xeon Phi \\ \midrule Type & E5-2695v2 & 7120P \\ Core frequency & 2.4 -- 3.2 GHz & 1.238 -- 1.333 GHz \\ \# of Cores & 12 & 61 \\ \# of Threads & 24 & 244 \\ Cache & 30 MB & 30.5 MB \\ Max Mem. Bandwidth & 59.7 GB/s & 352 GB/s \\ Memory & 8x16 GB & 16 GB \\ \bottomrule \end{tabular} \end{table} \subsection{Evaluation of our Performance Prediction Model} \label{sec:eval-ml} We have trained our performance prediction model for different input sizes. A total of 7200 experiments (2880 on host and 4320 on the device) were performed. We employed a standard validation methodology by using half of the experiments for training and the other half for evaluation. The predicted values are then compared to the measured values to calculate the prediction accuracy. We use the absolute error and the percent error to express the prediction accuracy, \begin{equation} absolute\_error = |T_{measured} - T_{predicted}| \end{equation} \begin{equation} percent\_error = 100 \cdot absolute\_error / T_{measured} \end{equation} \textbf{Result 1:} \textit{The execution times evaluated by our performance prediction model match well the execution time evaluated with measurements. } Figure \ref{fig:host-scatter} shows the measured and predicted execution time of DNA sequence analysis on the host CPUs. We perform the experiments for various number of threads, thread affinities, and fractions of the selected DNA sequences. The fractions include $2.5 - 100$ percent of the DNA sequence size. We may observe that predicted values match well the measured values execution times for most configurations. We observe similar behavior for \emph{none} and \emph{compact} thread affinities, but we elide these figures for space and simplicity. \begin{figure}[!h] \centering \includegraphics[width=\linewidth]{host-scatter.eps} \caption{Performance prediction accuracy for the host. A total of 2880 experiments with DNA sequences of human, mouse, cat and dog were needed. Half of the experiments are used to train the model, and the other half to evaluate it.} \label{fig:host-scatter} \end{figure} Figure \ref{fig:device-balanced} depicts the measurement and prediction results of the execution time on the Intel Xeon Phi device for different number of threads and fractions of the selected DNA sequences. For most of the test cases the predicted execution time values match well the measured values. We have observed similar behavior when using 2, 4, 8, and 16 threads and varying the thread affinity to \emph{scatter} and \emph{compact}, but we elide their results for space and simplicity. \begin{figure}[!h] \centering \includegraphics[width=\linewidth]{device-balanced.eps} \caption{Performance prediction accuracy for the device. A total of 4320 experiments with DNA sequences of human, mouse, cat and dog were needed. Half of the experiments are used to train the model, and the other half to evaluate it.} \label{fig:device-balanced} \end{figure} \begin{table}[h] \centering \caption{Performance prediction accuracy expressed via the absolute error [s] and percent error [\%] for the host} \label{table:error-ml-host} \begin{tabular}{@{}llllllll@{}} \toprule Threads & 2 & 6 & 12 & 24 & 36 & 48 & avg \\ \midrule absolute {[}s{]} & 0.032 & 0.032 & 0.027 & 0.026 & 0.023 & 0.023 & 0.027 \\ percent {[}\%{]} & 1.756 & 4.102 & 5.678 & 7.141 & 6.555 & 6.201 & 5.239 \\ \bottomrule \end{tabular} \end{table} \begin{table}[] \centering \caption{Performance prediction accuracy expressed via the absolute error [s] and percent error [\%] for the device} \label{table:error-ml-device} \begin{tabular}{@{}p{1.32cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.3cm} p{0.7cm}@{}} \toprule Threads & 2 & 4 & 8 & 16 & 30 & 60 & 120 & 180 & 240 & avg \\ \midrule absolute {[}s{]} & 0.16 & 0.16 & 0.11 & 0.06 & 0.05 & 0.04 & 0.03 & 0.03 & 0.03 & 0.074 \\ percent {[}\%{]} & 1.21 & 1.98 & 2.68 & 2.56 & 2.92 & 3.54 & 4.38 & 4.22 & 4.68 & 3.132 \\ \bottomrule \end{tabular} \end{table} \textbf{Result 2:} \textit{The performance prediction model is able to accurately predict the execution time for unseen system configurations. The absolute and percent error are very low.} Figure \ref{fig:host-histogram} depicts a histogram of the frequency of performance prediction absolute error for the experiments running on the host CPUs. It shows that most of the absolute error values are low. For instance, $756$ predictions have an absolute error less than $0.01$ seconds, $609$ predictions have an absolute error in the range $0.01 - 0.02$ seconds, and the rest of the predictions have an absolute error in the range of $0.02 - 0.2$. \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{host-histogram.eps} \caption{Error histogram for execution time predictions on the host} \label{fig:host-histogram} \end{figure} Figure \ref{fig:device-histogram} depicts a histogram of the frequency of performance prediction absolute errors for the experiments running on the co-processor. Most of the predictions have an absolute error less than $0.3$ seconds. The error differences between the host and device error histograms is due to the larger span of execution times (0.9 - 42 seconds) on the device compared to host (0.74 - 5.5 seconds). However, that does not necessarily mean that the prediction model for the device is less accurate than the one on for the host (see the percent errors in Table \ref{table:error-ml-host} and \ref{table:error-ml-device}). \begin{figure}[tb] \centering \includegraphics[width=\linewidth]{device-histogram.eps} \caption{Error histogram for execution time predictions on the device} \label{fig:device-histogram} \end{figure} The average percent and absolute error that considers all the tested system configurations for different number of threads on the host is shown in Table \ref{table:error-ml-host}. Table \ref{table:error-ml-device} shows the average percent and absolute error for the experiments running on the co-processor. The average percent error for the experiments on the host is 5.239\%, whereas the average percent error on the device is 3.132 \%. The average absolute error on the host is 0.027 seconds, and 0.074 on the device. In the following section, we will show that the average prediction error of 5.239\% and 3.132\% enables us to satisfactory infer about the execution time during the evaluation of a given system configuration. \subsection{Comparison of SAML with EM} \label{sec:comparison} The enumeration approach finds the system parameter values that result with the best performance by trying out all of the possible parameter values of the system under study. While this approach determines certainly the best system configuration, for the large search space of real-world problems enumeration may be prohibitively expensive. For the experiments used in this paper, despite the fact that we tested only what we considered reasonable parameter values (listed on Table \ref{table:sys-parameters} in Section \ref{sec:framework}), 19926 experiments were required when we used enumeration. Our heuristic-guided approach SAML that is based on Simulated Annealing and Machine Learning leads to comparatively good performance results, which requires only a relatively small set of experiments to be performed. For performance comparison, we use the absolute difference and percent difference, which are determined using the following equations: \begin{equation} absolute\_difference = |T_{EM} - T_{SAML}| \end{equation} \begin{equation} percent\_difference = 100 \cdot absolute\_difference / T_{EM} \end{equation} where $T_{EM}$ indicates the best execution time determined using EM, and $T_{SAML}$ indicates the execution time of our algorithm with a system configuration suggested by the SAML approach. \textbf{Result 3} \textit{Using SAML we can determine a near-optimal system configuration by evaluating only about 5\% of the total required experiments by EM} Figure \ref{fig:saml-enum} depicts the execution time of the selected application when running using the system configuration suggested by the simulated annealing. The solid horizontal line indicates the execution time of the system configuration determined by EM, which is considered as the optimal solution. The dashed horizontal line indicates the execution time of the optimal solution determined using EML. Simulated Annealing suggests at each \emph{iteration} parameter values for the system configuration. We can adjust the number of iterations required by Simulated Annealing by changing the initial temperature, or adjusting the cooling function. We may observe that after 1000 iterations (that is only about 5\% of the total possible configurations) our approach is able to determine a system configuration that results with a performance that is close to the performance of the system configuration determined with 19926 experiments when using EM. Please note that Simulated Annealing is a global optimization approach, and to avoid ending at a local optima during the search sometimes it accepts a worse system configuration that results with a higher execution time compared to the previous one. \begin{figure*}[bt] \centering \begin{subfigure}[b]{0.47\textwidth} \includegraphics[width=\textwidth]{saml_human.eps} \caption{the sequence of human} \label{fig:samlhuman} \end{subfigure} \hfill ~ \begin{subfigure}[b]{0.47\textwidth} \includegraphics[width=\textwidth]{saml_mouse.eps} \caption{the sequence of mouse} \label{fig:saml_mouse} \end{subfigure} \begin{subfigure}[b]{0.47\textwidth} \includegraphics[width=\textwidth]{saml_cat.eps} \caption{the sequence of cat} \label{fig:saml_cat} \end{subfigure} \hfill ~ \begin{subfigure}[b]{0.47\textwidth} \includegraphics[width=\textwidth]{saml_dog.eps} \caption{the sequence of dog} \label{fig:saml_dog} \end{subfigure} \caption{Performance comparison between the best system configuration determined by the Enumeration and Measurements (EM) and the near to optimal one determined by the Simulated Annealing and Measurements (SAM) and Simulated Annealing and Machine Learning (SAML).} \label{fig:saml-enum} \end{figure*} The EML and SAML use the predicted execution times to evaluate the proposed system configurations during the search space, however for fair comparison we use the measured values. That explains the results depicted on Figure \ref{fig:saml_cat} and \ref{fig:saml_dog}, where the execution time for EML is worse than the SAM and SAML for 750 or more iterations. In these cases, based on the predicted values the optimal execution time would be the ones indicated by the dashed lines, however they might be the cases with lowest prediction accuracy. \textbf{Result 4} \textit{The system configurations determined using the SAML approach have low absolute and percent differences compared to the optimal solution determined by EM} Table \ref{table:percent-error-saml} shows the percent difference of the SAML approach compared to the EM. We may observe that for 250 iterations the average percent difference is very high (19.685\%), but by increasing the number of iterations to 500, 750 and 1000, the percent difference decreases significantly, into 14.067\%, 11.846\% and 10.129\% respectively. Further increase of the number of iterations (1250, 1500, 1750 and 2000) results with a modest decrease of the percent difference (9.557, 8.599, 7.601, 6.849). However, since SAML is based on performance predictions, once the model is trained one can easily increase the number of iterations even more in order to achieve a higher accuracy. With respect to the absolute difference shown in Table \ref{table:absolute-error-saml}, the determined system configurations using SAML with 250 iterations is only 0.075 seconds slower than the EM approach. Increasing the number of iterations into 500, 750 and 1000, decreases the absolute difference between the execution time into 0.054, 0.046 and 0.039 seconds respectively. Doubling the number of iterations required by SAML, we may achieve even closer absolute difference between EM and SAML, only 0.026 seconds. \begin{table}[] \centering \scriptsize \caption{Percent difference [\%]. The performance of system configuration suggested by SAML after 250, 500, 750, 1000, 1250, 1500, 1750, 2000 iterations is compared with the best one determined by EM.} \label{table:percent-error-saml} \begin{tabular}{@{}l| llllllll@{}} \toprule & \multicolumn{7}{c}{System Configuration} \\ DNA & 250 & 500 & 750 & 1000 & 1250 & 1500 & 1750 & 2000 \\ \midrule human & 22.15 & 16.17 & 14.59 & 13.22 & 12.11 & 11.44 & 11.06 & 9.324 \\ mouse & 22.80 & 16.84 & 14.47 & 12.25 & 12.28 & 10.50 & 10.35 & 9.488 \\ cat & 15.81 & 9.524 & 8.71 & 5.771 & 5.607 & 4.453 & 3.385 & 2.895 \\ dog & 17.98 & 13.74 & 9.61 & 9.269 & 8.233 & 7.998 & 5.613 & 5.691 \\ \midrule \textbf{\specialcell{avgerage\\difference}} & 19.68 & 14.07 & 11.85 & 10.13 & 9.557 & 8.599 & 7.601 & 6.849 \\ \bottomrule \end{tabular} \end{table} \begin{table}[] \centering \scriptsize \caption{Absolute difference [s]. The performance of system configuration suggested by SAML after 250, 500, 750, 1000, 1250, 1500, 1750, 2000 iterations is compared with the best one determined by EM.} \label{table:absolute-error-saml} \begin{tabular}{@{}l|llllllll@{}} \toprule & \multicolumn{7}{c}{System Configuration} \\ DNA & 250 & 500 & 750 & 1000 & 1250 & 1500 & 1750 & 2000 \\ \midrule human & 0.097 & 0.071 & 0.064 & 0.058 & 0.053 & 0.050 & 0.049 & 0.041 \\ mouse & 0.084 & 0.062 & 0.053 & 0.045 & 0.045 & 0.038 & 0.038 & 0.035 \\ cat & 0.057 & 0.035 & 0.032 & 0.021 & 0.020 & 0.016 & 0.012 & 0.010 \\ dog & 0.063 & 0.048 & 0.034 & 0.032 & 0.029 & 0.028 & 0.019 & 0.019 \\ \midrule \textbf{\specialcell{average\\difference}} & 0.075 & 0.054 & 0.046 & 0.039 & 0.037 & 0.029 & 0.029 & 0.026 \\ \bottomrule \end{tabular} \end{table} \subsection{Performance improvement} \label{sec:performance-improvement} In this section we present the performance improvement when all the available resources of the host and device are utilized using the system configuration determined by the SAML approach. Please note that in what follows we present only the speedups achieved when comparing our approach with CPU-only (48 threads) and accelerator-only (244 threads) execution times. Comparing our approach with sequential execution is not relevant for this paper. \textbf{Result 5} \textit{Our approach is able to determine system configurations that allow the applications to efficiently share its workload among the available resources.} The results in Table \ref{table:speedup-vs-host} demonstrate the performance improvement achieved when the system configuration determined by the SAML and EM is used for DNA sequence analysis compared to the case when all the available cores on the host are used. We achieve a maximal speedup of 1.74 after 1000 system configurations have been tried with SAML, whereas the maximal speedup that can be achieved using EM is 1.95. \begin{table}[ht] \centering \scriptsize \caption{Speedup achieved when host and device are used for DNA sequence analysis compared with the host only. We consider system configurations determined by EM and SAML after 250, 500, 750, 1000, 1250, 1500, 1750, 2000 iterations.} \label{table:speedup-vs-host} \begin{tabular}{@{}l|lllllllll@{}} \toprule & \multicolumn{8}{c}{System Configuration} \\ DNA & 250 & 500 & 750 & 1000 & 1250 & 1500 & 1750 & 2000 & EM\\ \midrule human & 1.37 & 1.45 & 1.46 & 1.49 & 1.5 & 1.51 & 1.52 & 1.53 & 1.68 \\ mouse & 1.6 & 1.66 & 1.7 & \textbf{1.74} & 1.75 & 1.77 & 1.77 & 1.78 & \textbf{1.95} \\ cat & 1.5 & 1.58 & 1.62 & 1.66 & 1.68 & 1.7 & 1.7 & 1.7 & 1.76 \\ dog & 1.42 & 1.51 & 1.52 & 1.56 & 1.57 & 1.58 & 1.6 & 1.6 & 1.69 \\ \bottomrule \end{tabular} \end{table} Table \ref{table:speedup-vs-device} shows the performance improvement that is achieved when the system configuration determined by the SAML and EM is used for DNA sequence analysis compared to the case when all the available cores on the device are used. The maximal achieved speedup using EM is 2.36. We achieve a close to maximal speedup (2.18) using only 1000 iterations. \begin{table}[ht] \centering \scriptsize \caption{Speedup achieved when host and device are used for DNA sequence analysis compared with the device only. We consider system configurations determined by EM and SAML after 250, 500, 750, 1000, 1250, 1500, 1750, 2000 iterations.} \label{table:speedup-vs-device} \begin{tabular}{@{}l|lllllllll@{}} \toprule & \multicolumn{8}{c}{System Configuration} \\ DNA & 250 & 500 & 750 & 1000 & 1250 & 1500 & 1750 & 2000 & EM\\ \midrule human & 1.64 & 1.74 & 1.76 & 1.79 & 1.81 & 1.81 & 1.83 & 1.84 & 2.02 \\ mouse & 1.7 & 1.77 & 1.80 & 1.85 & 1.86 & 1.88 & 1.88 & 1.89 & 2.07 \\ cat & 1.96 & 2.08 & 2.13 & \textbf{2.18} & 2.21 & 2.24 & 2.23 & 2.24 & 2.31 \\ dog & 1.99 & 2.1 & 2.13 & \textbf{2.18} & 2.19 & 2.21 & 2.23 & 2.25 & \textbf{2.36} \\ \bottomrule \end{tabular} \end{table} \section{Related Work} \label{sec:rw} Efficient utilization of the combined computation power of the various computing units in heterogeneous systems requires optimal workload distribution. Recent related work proposed various approaches for workload distribution across different devices in heterogeneous systems. CoreTsar \cite{coretsar2014scogland} is an adaptive worksharing library for workload scheduling across different devices. It is a directive based library that extends the accelerated OpenMP by introducing a cross-device worksharing directive. Such directives enable the programmer to specify the association between the computation and data. The library evaluates the speed of each device statically, then use these indicators to split the workload across different devices. Similarly Ayguad{\'e} et al. \cite{ayguade2003schedule} investigated the extension of OpenMP to allow workload distribution on future iterations based on the results of first static ones. These approaches tend to minimize the required source code changes. In comparison, StarPU \cite{starpu2011augonnet} and OmpSs \cite{ompss2011duran} (task block models) require manual workload distribution by the developer, which may include significant structural source code changes. These powerful models for scheduling on heterogeneous systems are queue-based that basically split the workload into smaller tasks and queuing these tasks across the available resources. A similar approach based on priority queues is proposed by Dokulili et al. \cite{DokulilBBPSB13}. A dynamic scheduling framework that divides tasks into smaller ones is proposed by Ravi and Agrawal \cite{ravi2011dynamic}. These task are distributed across different processing elements in a task-farm way. While making scheduling decisions, architectural trade-offs, computation and communication patterns are considered. Our approach considers only system runtime configuration and the input size that makes it a more general approach, which can be used with different applications and architecture. Odajima et al. \cite{XcalableMP-dev} combines the pragma-based XcalableMP (XMP) \cite{xcalablemp2010nakao} programming language with StarPU runtime system to utilize resources on each heterogeneous node for work distribution of the loop executions. XMP is used for work distribution and synchronization, whereas StarPU is used for task scheduling. Qilin \cite{qilin2009luk} is a programming system that is based on a regression model to predict the execution time of kernels. Similarly to our approach, it uses off-line learning that is thereafter used in compile time to predict the execution time for different input size and system configuration. Grewe and O'Boyle \cite{grewe2011static} focus on workload distribution of OpenCL programs on heterogeneous systems. Their static based partitioning uses static analysis for code features extraction, which are used to determine the best partitioning across the different devices. Their approach relies on the architectural characteristics of a system. In comparison to the aforementioned approaches, in addition to using machine learning for evaluation of applications performance, we use combinatorial optimization to determine the near-optimal system configuration. \section{Summary and Future Work} \label{sec:conclusion} In this paper we have proposed a combinatorial optimization approach that uses machine learning to determine the system configuration (that is, the number of threads, thread affinity, and the DNA sequence fraction for the host and device) such that the overall execution time is minimized. We have observed that searching for the best system configuration using enumeration is time consuming, since it required many experiments. Using Simulated Annealing to suggest at each \emph{iteration} parameter values for the system configuration after 1000 iterations we determined a system configuration that results with a performance that is close to the performance of the system configuration determined with 19926 experiments of enumeration. By running only about 5\% of experiments we were able to find a near-optimal system configuration. Furthermore, we have proposed a Machine Learning approach that is able to predict the execution time for a system configuration. We have observed in our experiments that the average percent error of 4.2\% (5.239\% on the host, and 3.132\% on the device) of the performance prediction enables us to satisfactory suggest near to optimal system configurations. Using the near optimal system configuration determined by the Simulated Annealing and Machine Learning we achieved a maximal speedup of $1.74\times$ compared to the case when all the cores of the host are used, and up to $2.18\times$ faster compared to the fastest execution time on the device. Future work will study adaptive workload-aware approaches.
{'timestamp': '2016-06-17T02:08:50', 'yymm': '1606', 'arxiv_id': '1606.05134', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05134'}
arxiv
\section{Acknowledgments} \label{sec:ack} Guilherme Domingues, E. de Souza e Silva, Rosa M. M. Leão and Daniel S. Menasché are partially supported by grants from CNPq and FAPERJ. Don Towsley is partially supported by grants from NSF. \section{Stateful Model} \label{sec:appstateful} Two possible ways to implement stateful searches are: (a) when an inter-domain request arrives at a router and finds that the request cannot be immediately satisfied, a search is initiated and the searcher pre-selects $j$ out of the remaining $N-1$ routers to conduct the search or; (b) after the search is initiated, the searcher chooses the next router to visit uniformly at random, from those that have not yet been visited before. In this Appendix we consider the case in which routers are pre-selected at the beginning of the search. We assume that $\gamma$ is very large compared to the rate at which RCs are updated. Let $J$ be a random variable denoting the number of routers to be visited by time $t$ excluding the first visited router, and as before, let $L_c$ be the number of replicas of content $c$ in the domain under consideration. Note that as we do not allow revisits, $J \leq N-1$. Conditioning on $J=j$ visited routers and $L_c=l$ content replicas present in the $N-1$ possible caches to visit, \begin{equation} \label{eq:R-choose} \tilde{R}_c(t | J=j, L_c=l) = (1-\pi_c) \frac { {{N-1-l} \choose j} } {{{N-1} \choose j}}. \end{equation} We assume, like in Section~\ref{sec:model1}, that the search is sufficiently fast compared to the rate at which content is replaced. % Replacing \eqref{eq:R-choose} into \eqref{eq:Lrepl}, \begin{eqnarray} \label{eq:Rt-j-1} \tilde{R}_c(t | J=j) &=& \sum_{l=0}^{N-1} \tilde{R}_c(t | J=j, L_c=l) { {N-1} \choose l } \pi_c^l (1-\pi_c)^{N-1-l} \label{eq:rtjeq1} \\ &=& \sum_{l=0}^{N-1-j} \tilde{R}_c(t | J=j, L_c=l) { {N-1} \choose l } \pi_c^l (1-\pi_c)^{N-1-l} \label{eq:rtjeq2} \\ &=& (1-\pi_c) \sum_{l=0}^{N-1-j} { {N-1-j} \choose l } \pi_c^l (1-\pi_c)^{N-1-l}\\ &=& (1-\pi_c)^{j+1}. \label{eq:rtjeqLast} \end{eqnarray} \eqref{eq:rtjeq2} follows from \eqref{eq:rtjeq1} since $\tilde{R}_c(t | J=j)=0$ if $l>N-1-j$ as at least one of the $j$ routers necessarily has the content. It is interesting to observe that \eqref{eq:rtjeqLast} and \eqref{eq:Rt-j-2} are identical, although derived from two different sets of assumptions. \section{Cache Insertion Rate} \label{appcacheins} In this appendix we study the rate at which content is inserted into cache. Recall that associated with each counter and content there is a threshold $K$, such that when the reinforced counter exceeds $K$, the corresponding content must be stored into cache. Next, we consider the impact of $K$ on the cache insertion rate. The cache insertion rate for a given content is the rate at which that content is brought into the cache. Similarly, the cache eviction rate is the rate at which content is evicted from the cache. Due to flow balance, in steady state the cache insertion rate equals the cache eviction rate. Let {$\psi_c$ be the insertion rate}. Recall that $\lambda_c$ and $\mu_c$ are the request arrival rate for content $c$ and the rate at which the counter associated to content $c$ is decremented, respectively (Table~\ref{tab:notation}). {Then} \begin{equation} \label{eq:ins_rate} \psi_c = \lambda_c \rho_c^K (1-\rho_c) = { \pi_c (\mu_c - \lambda_c) } \end{equation} Recall that the content miss rate is given by $\lambda_c \sum_{i=0}^K \rho_c^i (1-\rho_c) = \lambda_c (1-\pi_c)$. We note that, except for $K=0$, the content {insertion} rate is strictly smaller than the content miss rate. Let us now consider the impact of $K$ on the {insertion} rate, assuming a constant miss rate. For a given miss rate, $\pi_c$ is determined. Once $\pi_c$ is established, it follows from \eqref{eq:pic} that larger values of $K$ yield smaller values of $\mu_c$. A decrease in $\mu_c$, in turn, causes a reduction in the {insertion} rate (see eq.~\eqref{eq:ins_rate}). { A smaller insertion rate, for the same hit ratio, has several advantages: (a) first, increasing the number of cache writes slows down servicing the requests for other contents, that is, cache churn increases which reduces throughput ~\cite{hashcache,realitycheck, cachingworkload, martina2014unified}; (b) if flash memory is used for the cache, write operations are much slower than reads; (c) writes wear-out the flash memory; and (d) additional writes mean increasing power consumption. Reducing the cache eviction rate might also lead to a reduction in network load. To appreciate this point, consider a scenario similar to the one presented in~\cite{dehghan2014complexity}. A custodian is connected to a cache through one route, and to clients through another separate route. The link between the custodian and the cache is used only when a cache insertion is required. The link between the custodian and the clients, in contrast, is used after every cache miss, irrespectively of whether the cache miss resulted in a cache insertion. In this case, reducing the cache insertion rate produces a reduction in the load of the link between the custodian and the cache. In summary, larger values of $K$ favor a reduction in the insertion rate, which benefits system performance. The impact of $K$ is similar in spirit to that of $k$ in $k$-LRU~\cite{martina2014unified} and $N$ in $N$-hit caching~\cite{cachingworkload}. } \section{Dual Problem For $\gamma T <<1$} \label{appsmallgammat} Let \begin{eqnarray} K_{2,i}&=&\frac{\lambda_i}{\lambda}\mathcal{C} T \gamma \\ K_{1,i}&=&\frac{\lambda_i}{\lambda}\left(-(\mathcal{C}+T)- \mathcal{C} T \gamma \right) \\ K_{0,i}&=& (\mathcal{C}+T) \end{eqnarray} Let $\mathbf{1}$ be a row vector of ones. The optimization problem posed in Section~\ref{sec:gammatsmall} can be stated as a quadratic program, \begin{eqnarray} \min&& \frac{1}{2} {\mbox{\boldmath $\pi$}} ^T {\bf Q} {\mbox{\boldmath $\pi$}} + {\bf c} ^T {\mbox{\boldmath $\pi$}} \\ s.t. && {\bf A} {\mbox{\boldmath $\pi$}} \leq {\bf b} \\ && \mathbf{1} {\mbox{\boldmath $\pi$}} = B \end{eqnarray} where $ {\bf Q} $ is a diagonal matrix with $Q(i,i)=2 K_{2,i}$, $ {\bf c} $ is a vector with $c(i)=K_{1,i}$ and \begin{footnotesize} \begin{equation} \begin{array}{ll} {\bf A} = \underbrace{\begin{bmatrix} 1 & 0 & \cdots & 0 \\ 0 & \ddots & \ddots & \vdots \\ \vdots & \ddots & \ddots & 0 \\ 0 & \cdots & 0 & 1 \\ -1 & 0 & \cdots & 0 \\ 0 & \ddots & \ddots & \vdots \\ \vdots & \ddots & \ddots & 0 \\ 0 & \cdots & 0 & -1 \end{bmatrix}}_C & {\bf b} = {\begin{bmatrix} 1 \\ 1 \\ \vdots\\ 1 \\ 0 \\ 0 \\ \vdots \\ 0 \end{bmatrix}} \end{array} \end{equation} \end{footnotesize} Note that because $ {\bf Q} $ is a positive-definite matrix, there is a unique global minimizer~\cite{boyd2004convex}. Let $ {\mbox{\boldmath $\delta$}} = ( {\mbox{\boldmath $\nu$}} , {\mbox{\boldmath $\upsilon$}} )$, where $\nu_i$ and $\upsilon_i$ are the Lagrange multipliers associated with the constraints $\pi_i \leq 1$ and the non-negativity constraint $\pi_i \ge 0$, $i=1, \ldots, C$, respectively. The Lagrangian is given by \begin{eqnarray} \mathcal{L}( {\mbox{\boldmath $\pi$}} , {\mbox{\boldmath $\delta$}} , \epsilon) &=& \frac{1}{2} {\mbox{\boldmath $\pi$}} ^T {\bf Q} {\mbox{\boldmath $\pi$}} + {\bf c} ^T {\mbox{\boldmath $\pi$}} + {\mbox{\boldmath $\delta$}} ^T( {\bf A} {\mbox{\boldmath $\pi$}} - {\bf b} ) +\epsilon (\mathbf{1} {\mbox{\boldmath $\pi$}} - B) \\ &=& \frac{1}{2} \sum_{i=1}^C \pi_i^2 q_i + \sum_{i=1}^C c_i \pi_i + \sum_{i=1}^C \nu_i(\pi_i-1) + \sum_{i=1}^C \upsilon_i(-\pi_i) + \epsilon \left(\sum_{i=1}^C \pi_i - B\right) \nonumber \\ \\ &=& \sum_{i=1}^C \pi_i \left( \frac{q_i \pi_i}{2} + c_i + \nu_i -\upsilon_i + \epsilon \right) - \left( \sum_{i=1}^C \nu_i \right) - \epsilon B \end{eqnarray} To determine the dual function $g( {\mbox{\boldmath $\delta$}} , \epsilon)$, defined as \begin{equation} g( {\mbox{\boldmath $\delta$}} , \epsilon) = \inf_{ {\mbox{\boldmath $\pi$}} } \mathcal{L}( {\mbox{\boldmath $\pi$}} , {\mbox{\boldmath $\delta$}} , \epsilon) \end{equation} we note that \begin{equation} \nabla_{ {\mbox{\boldmath $\pi$}} } \mathcal{L}( {\mbox{\boldmath $\pi$}} , {\mbox{\boldmath $\delta$}} , \epsilon) = 0 \Rightarrow {\mbox{\boldmath $\pi$}} ^{\star} = - {\bf Q} ^{-1}( {\bf A} ^T {\mbox{\boldmath $\delta$}} + {\bf c} + \mathbf{1}^T\epsilon) \end{equation} Then, \begin{equation} \pi^{\star}_i = \frac{-1}{q_i} (c_i + \nu_i - \upsilon_i + \epsilon) \end{equation} The dual function is \begin{equation} g( {\mbox{\boldmath $\delta$}} , \epsilon) = -\frac{1}{2} \sum_{i=1}^C (\pi^{\star}_i)^2{q_i} - \left(\sum_{i=1}^C \nu_i\right) -\epsilon B \end{equation} The dual problem is also a quadratic program, \begin{eqnarray} \max_{\epsilon, {\mbox{\boldmath $\delta$}} }&& -\frac{1}{2} ( {\mbox{\boldmath $\pi$}} ^{\star})^T {\bf Q} {\mbox{\boldmath $\pi$}} ^{\star} - {\bf b} ^T {\mbox{\boldmath $\delta$}} - B \epsilon\\ s.t. && {\mbox{\boldmath $\delta$}} \ge 0 \end{eqnarray} The dual problem naturally yields an asynchronous distributed solution~\cite{lee2015convergence}. \begin{comment} TODO \begin{itemize} \item study relation to optimal portfolio: \url{http://edoc.hu-berlin.de/series/speps/2007-1/PDF/1.pdf} \item try to find closed-form solution: \url{https://en.wikipedia.org/wiki/Quadratic_programming} \item \url{http://www.matematika.utm.my/index.php/matematika/article/viewFile/318/311} \end{itemize} The derivative of the Lagrangian with respect to $\pi_c$ is \begin{eqnarray} \frac{d E[D]}{d \pi_c } &=& \frac{\lambda_c}{\lambda} \left( ( -1)\left(T+(1-\gamma \pi_c T) \mathcal{C} \right) + (1-\pi_c) \left(-\gamma T \mathcal{C} \right) \right) -\beta \\ &=& \frac{\lambda_c}{\lambda} \left( - T - \mathcal{C} +\gamma \pi_c T \mathcal{C} + (1-\pi_c) \left(-\gamma T \mathcal{C} \right) \right) -\beta \\ &=& \frac{\lambda_c}{\lambda} \left( R + 2\pi_c S \right) -\beta \\ \pi_c &=& \frac{\beta \frac{\lambda}{\lambda_c}-R}{2S} \\ \sum \pi_c &=& B \\ &=& \frac{\beta \lambda \sum \frac{1}{\lambda_c} - R C}{2S} \\ \beta &=& \frac{B2S+ RC}{\lambda \sum \frac{1}{\lambda_c} } \\ \pi_c &=& \frac{\frac{B2\gamma T \mathcal{C}-(\mathcal{C}+T+\gamma T \mathcal{C})C}{\lambda \sum \frac{1}{\lambda_c} } \frac{\lambda}{\lambda_c}+\mathcal{C}+T+\gamma T \mathcal{C}}{2\gamma T \mathcal{C}} \\ &=& \frac{B}{\lambda_c \sum \frac{1}{\lambda_c}} -\frac{(\mathcal{C}+T+\gamma T \mathcal{C})}{ 2 \gamma T \mathcal{C} }\left( \frac{C}{\lambda_c \sum \frac{1}{\lambda_c}}-1\right) \end{eqnarray} Problem: non-negativity constraints might be active (note that we must make sure that $0 \leq \pi_c \leq 1$) \end{comment} \section{Conclusion} \label{sec:concl} Content search and placement are two of the most fundamental mechanisms that must be addressed by any content distribution network. In this paper, we have introduced a simple analytical model that couples search through random walks and placement through a TTL-like mechanism. Although the proposed model is simple, it captures the key tradeoffs involved in the choice of parameters. Using the model, we posed an optimization problem which consists of minimizing the expected delay experienced by users subject to expected storage constraints. The solution to the optimization problem indicates for how long should one wait before resorting to custodians in order to download the desired content. We believe that this paper is a first step towards a more foundational understanding of the relationship between search and placement, which is key for the efficient deployment of content centric networks. \section{Discussion} \label{sec:disc} \subsection{Joint Placement and Search Optimization} In this paper, we introduced a new architecture, followed by a model and its analysis that couples search through random walks with placement through reinforced counters to yield simple expressions for metrics of interest. The model allows us to pose an optimization problem that is amenable to numerical solution. Previous works considered heuristics to solve the joint placement and search problem~\cite{araldo2014cost, rossini2014coupling, araldocost}, accounting for the tradeoff between exploration and exploitation of paths towards content replicas~\cite{chiocchetti2012exploit}. To the best of our knowledge, we are the first to account for such a tradeoff using random walks, which have previously been proposed in the context of peer-to-peer systems as an efficient way to search for content~\cite{ioannidis2008design}. We are also not aware of previous works that generalize the cache utility framework~\cite{dehghan2016utility, macashing} from a single cache to a cache network setting. \subsection{Threats to Validity} In this section we discuss some of the limitations and simplifying assumptions, as well as extensions subject for future work. \subsubsection{Threats to Internal Validity} The parameters used in numerical evaluations serve to illustrate different properties of the proposed model. It remains for one to apply the proposed framework in a realistic setting, showing how to make it scale for hundreds of contents whose popularities vary over time. Section~\ref{sec:opt} provides a first step towards that goal. \subsubsection{Threats to External Validity} In this paper, we consider a simple setup which allows us to obtain an analytical model amenable to analysis. The extension to caches with TTL replacement policy, as well as other policies such as LRU, FIFO and Random, is a subject for future research. In Section~\ref{sec:opt} we focused on a single domain when analyzing the optimal placement and search problem. The extension to multiple domains under the assumption that the workload to each domain is Poisson is straightforward. Nonetheless, validating the extent to which this assumption is valid is subject for future work. Finally, we have focused on the placement and search strategies. We assumed throughout this paper the ZDD assumption (zero delay for downloads). Accounting for the effects of service capacities for download on system performance is out of the scope of this work. \section{Evaluation} \label{sec:eval} In this section we report numerical results obtained using the proposed model. Our goals are a) to show tradeoffs involved in the choice of the \textit{time to live} (TTL) parameter, b) to illustrate the interplay between content search and placement, and c) to numerically solve the optimization problems posed in this paper, giving insights about the solutions. In Sections~\ref{sec:tradeoffttl} and \ref{sec:3-contents} we consider the stateless model, and in Section~\ref{sec:loadagg} we consider the stateful one. \subsection{Tradeoff in The Choice of TTL: Single Content Scenario} \label{sec:tradeoffttl} In this section we consider a single content that is to be served in the three-tiered topology shown in Figure~\ref{fig:3tiers}(b). Let $\Lambda_c=1$. We assume that the number of replicas of the content remains fixed while the walker traverses each domain (Section~\ref{sec:fix}). In addition, we assume that $\pi$ and $T$ are equal at the three considered domains (this assumption will be removed in the other considered scenarios). As requests are filtered towards the custodian, the rate of requests decreases when moving from tier 3 to tier 1. The rate at which reinforced counters are decremented also decreases, in order to keep $\pi$ constant. \begin{figure}[h!] \center \includegraphics[width=0.8\textwidth]{figs/architectures1} \caption{Illustrative topology } \label{fig:3tiers} \end{figure} Figure~\ref{sec:resultsttl}(a) shows the the expected delay to reach the custodian and the custodian load for different values of $\pi$ and $T$. For a given value of $\pi$, the dotted lines indicate that as $T$ increases the load at the custodian decreases and the expected delays in the domains increases. In contrast, for a given value of $T$, as $\pi$ increases, content becomes more available, which causes a decrease in the load at the custodian and in the expected delay. \begin{figure}[h!] \center \includegraphics[scale=0.30]{figs/newresultsscatter.eps} \\ (a) \\ \includegraphics[scale=0.30]{figs/newresultsdelay1.eps} \\ (b) \caption{Scatter plot indicating the tradeoff in the choice of TTL $T$: (a) larger values of $T$ reduce load in custodian at cost of increased expected delay in domain; (b) expected delay as a function of expected delay in domains, assuming cost at custodian $\mathcal{C}(\hat{\Lambda}_c)=1/(0.9-\hat{\Lambda}_c)$. } \label{sec:resultsttl} \end{figure} Next, our goal is to evaluate the expected delay. To this aim, we use an M/M/1 queue to model the delay at the custodian. We let the custodian cost be given by $\mathcal{C}(\hat{\Lambda}_{c})=1/(0.9-\hat{\Lambda}_c)$, which corresponds to the delay of an M/M/1 queue with service capacity of 0.9. Figure~\ref{sec:resultsttl}(b) shows how the expected delay (obtained with equation~\eqref{eq:edd}) varies as a function of $\pi$ and $T$. For $\pi=0.05$ and $\pi=0.1$, as $T$ increases, the expected delay $E[D_c]$ first decreases and then increases. The initial decrease occurs due to a decrease in the custodian load. Nonetheless, as $T$ further increases the gains due to decreased load at the custodian are dominated by the increased expected delay before reaching the custodian. The optimal value of $T$ is approximately 1.5 and 0.5 for $\pi$ equal to 0.05 and 0.1, respectively. \subsection{Benefits of Load Aggregation} \label{sec:loadagg} While in the previous section we studied the dynamics of a single content, now we consider four content popularities: very low, low, medium and high. In Figures~\ref{fig:delay-lambda-001-01} and~\ref{fig:delay-lambda-05-09} we plot expected delay both for the one-tiered architecture (Figure~\ref{fig:3tiers}(a)) and the three-tiered architecture (Figure~\ref{fig:3tiers}(b)). The request arrival rate for each type of content was obtained from real data collected from a major Brazilian broadband service provider~\cite{mendonca2015}. The content request rates are $\lambda_1=0.8$, $\lambda_2=0.5$, $\lambda_3=0.1$ and $\lambda_4=0.01$ req/sec. The Request Counter (RC) of each content is decremented at constant rate $\mu=1$ in the three tiers. The value of $\pi$ varies for each content in each tier due to the fact that content requests are filtered out as they travel towards the custodian. In addition, we assume that $T$ is equal in the three domains, the number of replicas of each content remains fixed while the walker traverses each domain (Section~\ref{sec:fix}), and the mean time to retrieve a content from the publishing area exponentially increases with respect to the amount of requests hitting the publishing area, $\mathcal{C}(\hat{\Lambda}_c)=e^{\hat{\Lambda}_c}$. Figures~\ref{fig:delay-lambda-001-01} and~\ref{fig:delay-lambda-05-09} show the benefits of load aggregation that occurs in the three-tiered architecture: requests that are not satisfied in tier three are aggregated in the second and third tiers. Aggregation increases the probability to find the content in these tiers. We observe that contents with low and medium popularities benefit the most from load aggregation. Note that the expected delay decreases by several orders of magnitude for low popularity contents when we consider a three-tiered architecture. For very low and high popularity contents, a significant reduction is not observed. For highly popular contents, the probability to store the content in at least one of the tiers is high in both architectures, and only a small fraction of the requests is served by the publishing area. For very low popularity contents, the opposite occurs: the majority of requests are served by the publishing area, as the probability that content is stored in one of the tiers is very low. \begin{figure}[h!] \center \includegraphics[scale=0.5]{figs/delay-lambda-001-01} \vspace{-6cm} \caption{Expected Delay: very low and low popularity contents} \label{fig:delay-lambda-001-01} \end{figure} \begin{figure}[h!] \center \includegraphics[scale=0.5]{figs/delay-lambda-05-09} \vspace{-6cm} \caption{Expected Delay: medium and high popularity contents} \label{fig:delay-lambda-05-09} \end{figure} Figures~\ref{fig:delay-lambda-001-01} and~\ref{fig:delay-lambda-05-09} show that the three-tiered architecture yields lower delays, for all content popularities. Next, we consider the optimal TTL choice in the three-tiered topology. For very low popularity contents, the best choice is $T=0$ as the majority of requests must be served by the publishing area. For high popularity contents, the best choice is also $T=0$ because the probability to find the content in the first router of the domain is very high. On the other hand, for low popularity contents, Figure~\ref{fig:delay-lambda-001-01} shows that the mean delay is minimized when $T \approx 0.1$. \subsection{Validation of the Optimal Solution} \label{sec:3-contents} In this example our goal is to obtain the values of $\pi_c$ and $T_c$, $c=1,2,3$, that minimize expected delay. We consider three contents with high, medium and low popularity sharing a memory that can store, on average, one replica of content, $B=1$. The publisher cost is $\mathcal{C}=10$, the random search time is $1/\gamma=40$ ms and the content request rates are $\lambda_1=0.8$, $\lambda_2=0.1$ and $\lambda_3=0.002$ req/sec. As in the previous section, content popularities were inspired by data collected from a major Brazilian broadband service provider~\cite{mendonca2015}. \begin{figure}[h!] \center \includegraphics[scale=0.5]{figs/delay-pi} \\ \vspace{-7cm} (a) Minimum expected delay is obtained for $\pi_1=0.71$, $\pi_2=0.25$ and $\pi_3=0.04$ \\ \includegraphics[scale=0.5]{figs/delay-T} \\ \vspace{-7cm} (b) Minimum expected delay is obtained for $T_1 \ge 0.2$, $T_2 \ge 0.2$ and $T_3 \ge 0.2$ \\ \caption{Minimum expected delay for each value of $\pi_c$ and $T_c$.} \label{fig:3-contents} \end{figure} Using~\eqref{eq:d}, we compute the expected delay for different values of $\pi_c$ and $T_c$, $\pi_c$ varying from $0.01$ to $0.99$ and $T_c$ varying from $0$ to $30$s, $i=1,2,3$. The results of our exhaustive search for the minimum delay are reported in Figure~\ref{fig:3-contents}. Figure~\ref{fig:3-contents}(a) shows the minimum average delay attained as a function of $\pi_1$, $\pi_2$ and $\pi_3$, {\it considering all possible values of the other parameters}. Similarly, Figure~\ref{fig:3-contents}(b) shows the minimum attainable average delay as a function of $T_1$, $T_2$ and $T_3$. For large values of $T$, it was shown in Section~\ref{sec:optplgrout} that~\eqref{squareroot} yields the optimal values of $\pi_c$. For our experimental parameters, ~\eqref{squareroot} yields $\pi_1=0.71$, $\pi_2=0.25$ and $\pi_3=0.04$. These values are very close to the three points that minimize the expected delay obtained using the exhaustive search, as shown in Figure~\ref{fig:3-contents}(a), which indicates the usefulness of the closed-form expressions derived in this paper. Even though the solutions we obtained do not account for joint search and placement, they yield relevant guidelines that can be effectively computed in a scalable fashion. The exhaustive search for solutions took us a few hours using a Pentium IV machine, whereas the evaluation of the proposed closed-form expressions takes a fraction of seconds. \begin{comment} \subsection{Minimum Expected Delay Under Zipfian Workload} \label{sec:zipfian} Next, we consider a set of 100 contents under a Zipf workload, $\lambda_i=1/i$, for $i=1, \ldots, 100$. Figure~\ref{fig100contents} shows the minimum expected delay as a function of publisher cost $\mathcal{C}$, for various values of $B$ and $\gamma$. We assume that all contents are subject to the same TTL $T$, but that $\alpha_i$ can be set on a per-content basis (Section~\ref{sec:optplgrout}). Consider the reference setup $B=2, \gamma=1$. Then, increasing the expected buffer storage capacity $B$ from 2 to 4 yields a gain which is comparable to that of increasing $\gamma$ from 1 to 2. Considering the same reference setup, setting $\gamma=2$ yields more pronounced gains compared to an increase in expected buffer capacity to $B=8$. \begin{figure}[h!] \center \includegraphics[scale=0.3]{figs/100contents} \caption{Expected delay incurred by optimal placement policy for one hundred contents under Zipf popularity} \label{fig100contents} \end{figure} \end{comment} \section{Introduction} \label{sec:intro} Content distribution is in the vogue. Nowadays, virtually everybody can create, distribute and download content through the Internet. It is estimated that video distribution will alone account for up to 80\% of global traffic by 2017~\cite{ciscovni}. Despite the success of the current Internet infrastructure to support user demand, scalability challenges motivate clean slate approaches for content dissemination, such as information centric networking. In information centric networks (ICNs), {the focus is on content, rather than on hosts}~\cite{ccn1,dona}. {Each content has an identification and is associated to at least one custodian. Once a request for a content is generated it flows towards a custodian through routers equipped with caches, referred to as \textit{cache-routers}. A request that finds the content stored in a cache-router does not have to access the custodian. This alleviates the load at the custodians, reduces the delay to retrieve the content and the overall traffic in the network.} {To achieve performance gains with respect to existing architectures,} in information centric networks cache-routers must efficiently and distributedly determine how to route content requests and {where to} place contents. ICN architectures, such as NDN~\cite{ccn1}, are promising solutions for the future Internet. Still, it is unclear the scope at which the proposed solutions are feasible~\cite{realitycheck}. Incrementally deployable solutions are likely to prevail~\cite{incrementally2}, and identifying the simplest foundational attributes of ICN architectures is essential while envisioning their Internet scale deployment. {The efficient management of distributed storage resources in the network coupled with the routing of requests for information retrieval are of fundamental importance \cite{icn-comm-survey-2013,kurosesurvey}}. {However,} the interplay between search and placement is still not well understood, {and} there is a need to study search and placement problems under a holistic perspective. {In fact, an adequate framework within which to assess the overall performance gains that ICNs can provide is still missing~\cite{icn-comm-survey-2013}. In this paper, we propose and study a simple ICN architecture comprising of a {logical} hierarchy of cache-routers divided into {tiers, where each tier is subdivided into one or more logical domains} (Figure~\ref{fig:domains2}). In-between domains, requests are routed from users towards custodians which are assumed to be placed at the top of the hierarchy. \begin{figure}[h!] \center \includegraphics[scale=0.3]{domains2} \caption{System diagram} \label{fig:domains2} \end{figure} To route content requests from users to custodians, a random lookup search takes place in the vicinity of the logically connected cache-routers (horizontal arrows in Figure~\ref{fig:domains2}). {Cache-routers within a domain are assumed to form a logical \textit{clique}. As such, a request that does not find the searched content in a cache-router is forwarded to one of the remaining cache-routers in the same domain.} The goal is to opportunistically explore the presence of content replicas in a given domain. If a copy is found in the domain {within a reasonable time interval}, the content is served. Otherwise, requests are routed from users towards custodians (vertical arrows in Figure~\ref{fig:domains2}). Custodians as well as the name resolution system (NRS) are supplied by third parties at the publishing area, and we focus our attention on the infrastructure from users to publishing areas. By using random walks to opportunistically explore the presence of content replicas closer to users, we avoid content routing tables and tackle the scalability challenge posed in~\cite{challengesicn2015}. An alternative would be to adopt scoped-flooding~\cite{wangpro}. However, scoped-flooding is more complex than random walks and requires some level of synchronization between caches. In addition, random walks have been show to scale well in terms of overhead~\cite{ioannidis2008design}. To efficiently and distributedly place content in the cache network, we consider a flexible content placement mechanism inspired by TTL caches. At each cache, a counter is associated to each content stored there, {which we refer to as \textit{reinforced counter}} (RC). Whenever the RC surpasses a given threshold, the corresponding content is stored. The RC is decremented at a given established rate, until reaching zero, when the content is evicted. Focusing on two of the simplest possible mechanisms for search and placement, namely random walks and TTL-like caches, our benefits are twofold. From a practitioners point of view, the proposed architecture is potentially deployable at the Internet scale~\cite{realitycheck}. From the performance evaluation perspective, our architecture is amenable to analytical treatment. Our quantitative analysis provides closed-form expressions for different metrics of interest, such as the average delay experienced by users. Given such an architecture, we pose the following questions, \begin{enumerate} \item How long should the random-walk based search last at each domain so as to optimize the performance metrics of interest? \item How should the reinforced counters be tuned so as to tradeoff content retrieval delay with server load at the custodian? \item {What parameters have the greatest impact on the performance metrics of the proposed ICN architecture?} \end{enumerate} To answer these questions, we introduce an analytical model that yields: a) the {expected delay to find a content} (average search time) and; b) the rate at which requests {have to be satisfied by custodians}. While the expected delay is directly related to users quality of experience, the rate of accesses towards the custodian is associated with publishing costs. The model yields simple closed-form expressions for the metrics of interest. {Using the model, we study different tradeoffs involved in the setting of the parameter values. In particular, we study the tradeoff between the time spent in opportunistic exploration around the vicinity of the user in order to find content and the custodian load. } In summary, our key contributions are the following: \begin{description} \item[{ICN architecture:}] we propose a simple ICN multi-tiered architecture based on random walks and TTL-like caches. Simplicity easies deployment and allows for analytical treatment, while capturing essential features of other ICN architectures such as the tension between opportunistic exploration of replicas closer to users and exploitation of known paths towards custodians. \item[Analytical model:] {we introduce a simple analytical model of the proposed ICN architecture that can be helpful in the performance evaluation of ICNs. In particular, we consider the interplay between content placement and search. Using the model we show that we can achieve performance gains using a simple search strategy (random walks) and a logical hierarchical storage organization. } Although our analysis is focused on the proposed architecture, we believe that the insights obtained are more broadly applicable to other architectures as well, such as scoped-flooding~\cite{wangpro}. \item[{Parameter tuning}:] we formulate an optimization problem that leverages the closed-form expressions obtained with the proposed model to determine optimal search and placement parameters {under storage constraints}. We show that previously proposed strategies for optimal placement, such as the square-root allocation, follow as special cases of our solution, and that a bang-bang search policy is optimal if content allocation is given. \item[Performance studies:] we investigate how different parameters impact system performance under different assumptions regarding the relative rate at which requests are issued and content is replaced in the cache-routers. Our numerical investigations consider scenarios in which the assumptions of the optimization problem posed in this paper do not hold. \end{description} The remainder of this paper is organized as follows. After introducing background in Section~\ref{sec:related}, we describe the system studied in this paper in Section~\ref{sec:system}. An analytic model of this system is presented in Section~\ref{sec:model}. The joint placement and search optimization problem is posed and analyzed in Section~\ref{sec:opt} and numerical evaluations are presented in Section~\ref{sec:eval}. Further discussions are presented in Section~\ref{sec:disc} and Section~\ref{sec:concl} concludes. \section{} \section*{References} \section{Analytical Model} \label{sec:model} {In this section we present an analytical model to obtain performance metrics for the ICN architecture described in the previous section, illustrated in Figure \ref{fig:domains2}.} The model takes into account the {performance} impact of content search through random walks and the cache management mechanism based on reinforced counters. In particular, the model allows one to compute the probability of finding a content in a domain and the mean time to find it. {Using the model we } show the benefit of a hierarchical structure and study the tradeoff between the storage requirements of the cache-routers {and the load that reaches the publishing area}. {When a request reaches a cache-router, the local cache is searched and if the content is locally stored it is immediately retrieved and sent to the user. If the content is not found, a random walk search starts in the domain. We assume that the random search takes $V$ time units per each cache-router visited where $V$ is an exponentially distributed random variable with rate $\gamma$. } { Long search times can have an adverse effect on performance; hence, a timer is set when the random walk starts to limit the search time. The search can last for at most $T$ time units. The search ends when the timer expires or the content is found, whichever occurs first. As described in Section~\ref{sec:rws}, if the timer expires the user request is sent to the next cache-router in the tier hierarchy, and the process restarts.} Table~\ref{tab:notation} summarizes the notation used in the remainder of this paper. \afterpage{ \begin{center} \scriptsize \begin{longtable}{l p{4.8in}} \hline \hline Parameter & Description \\ \hline $1/\gamma$ & average delay per-hop, i.e., average time for the random walk to check \\ & for a content at a cache and possibly forward the request \\ $\mathcal{C}(\hat{\Lambda}_c)$ & cost incurred by custodian (measured in delay experienced by users) \\ $C$ & number of contents \\ $M$ & number of tiers \\ $N$ & number of caches in domain under consideration \\ $\lambda_{c,i}$ & arrival rate of exogenous and interdomain requests for content $c$ at typical cache of domain $i$, $\lambda =\sum_{i=1}^M \sum_{c=1}^C \lambda_{c,i}$ \\ $\Lambda_c$ & exogenous arrival rate of requests for $c$ at the network (except otherwise noted, exogenous requests are issued at tier $M$) \\ \hline \hline Variable & Description \\ \hline $L_c$ & number of replicas of content $c$ in tagged tier \\ $\pi_{c,i}$ & probability that content $c$ is stored at typical cache at domain $i$ \\ $\alpha_{c,i}$ & $=1/\mu_{c,i}$ \\ \hline \hline Control variable & Description \\ \hline $\mu_{c,i}$ & reinforced counter decrement rate for content $c$ at domain $i$ \\ $T_{c,i}$ & TTL for content $c$ at domain $i$, i.e., \\ & {maximum time to perform a random search for} content $c$ at domain $i$ \\ \hline \hline Metric & Description \\ \hline $R_{c,i}(t)$ & probability of not finding content $c$ at tier $i$ by time $t$ \\ $D_{c,i}$ & delay incurred for finding content $c$ at tier $i$ \\ $D_{c}$ & delay incurred for finding content $c$ \\ $D$ & delay incurred for finding typical content \\ $\hat{\Lambda}_c$ & rate of requests for content $c$ at the publisher \\ \hline \caption{Table of notation. Note that subscripts are omitted when clear from context.} \label{tab:notation} \end{longtable} \end{center} } \subsection{ {Cache hit and insertion ratios} } Consider a given tagged tier and cache-router in this tier. We assume that requests to content $c$ arrive to this cache-router according to a Poisson process with rate $\lambda_c$. { $\lambda_c$ is also referred to as the content popularity. Recent work~\cite{mendonca2015} using three months of data collected from the largest VoD provider in Brazil indicates that, during peak hours, the Poisson process is well suited to model the video request arrival process. In our numerical experiments, we rely on the Poisson assumption coupled with the Zipf distribution for popularities to characterize the workload. } { } { We recall from Section \ref{sec:rcdesc} that the reinforced counter associated to a given content $c$ is incremented at every request for $c$ and decremented at constant rate $\mu_c$. We assume that the counter is decremented at exponentially distributed times with mean $1/\mu_c$. Associated with each counter and content is a threshold $K_c$ such that when the counter exceeds $K_c$, content $c$ must be stored into cache. } {Let $\pi_c$ denote the probability that the cache-router contains content $c$. Due to the assumption of Poisson arrivals and exponential decrement times, the dynamics of each reinforced counter is characterized by a birth-death process. } Hence $\pi_c$, which is the probability that the reinforced counter has value greater than $K_c$, is given by \begin{equation} \label{eq:pic} \pi_c = \left(\frac{\lambda_c}{\mu_c}\right)^{K_c+1} \end{equation} If $K_c=0$ we have $\pi_c = \lambda_c/\mu_c$, which we denote by $\rho_c$. Let $\beta_c$ denote the miss rate for content $c$. Then, \begin{equation} \label{eq:miss_r} \beta_c= \lambda_c (1-\pi_c) \end{equation} In~\ref{appcacheins} we consider an additional metric of interest, namely the cache insertion rate, which is the rate at which content is inserted into cache. Note that the cache insertion rate is lower than the cache miss rate, as not all misses lead to content insertions. We show that larger values of $K_c$ yield lower insertion rates, which translate into less overhead due to content churn. {Despite the advantages of using $K_c>0$, without loss of generality, and to facilitate the exposition,} in the remainder of this paper we assume $K_c=0$, except otherwise noted. \subsection{Publisher Hit Probability} We start by considering a single domain in a single tiered hierarchy, wherein $N$ cache-routers are logically fully connected, {i.e., any cache-router can exchange messages with any other router in the same domain}. Our goal is to compute the probability {$R(t)$} that a random walk does not find the requested content by time $t$, $t>0$. Note that $R(T_c)$ equals the probability that the request is forwarded to the custodian. { We consider two slightly different models. As in the previous section, both models assume that requests for a content arrive according to a Poisson process. In what follows we describe the assumptions associated with each model, and comment on their applicability. } In Sections~\ref{sec:fix} and~\ref{sec:dyn} the analysis of stateless and stateful searches focuses on a tagged content~$c$. \subsubsection{Model 1: Stateless search} \label{sec:fix} Recall that a \textit{stateless search} is a search in which requests do not carry any information about previously visited cache-routers. We assume that searches are sufficiently fast so that the probability that content placement in a domain changes during the search is negligible. This assumption is reasonable if the expected time it takes for the random walker to check for the presence of content $c$ in a cache and to transit from a cache-router to another, $1/\gamma$, is very small compared to the mean time between: (a) two requests for $c$, $1/\lambda_c$, and; (b) decrements of the reinforced counter for $c$, $1/\mu_c$. { When an inter-domain request for a given content $c$ arrives at a cache-router and a miss occurs, a random stateless search for $c$ starts. After each visit to a cache-router, if the content is not found another cache-router is selected uniformly at random among the remaining $N-1$ cache-routers. Note that, because the search is stateless, nodes can be revisited during the search. } In Section~\ref{sec:rcdesc} we discussed the decoupling between RCs of different contents in a given cache. Next, we argue that RCs for different caches in a domain can also be treated independently. Recall that reinforced counters are not affected by endogenous requests inside a given domain, so we restrict ourselves to the impact of inter-domain requests when studying cache occupancies. Due to symmetry, we assume that the rate of requests from outside of a domain for a given content at different cache-routers in a domain are identical. Due to the Poisson assumption, a request for content $c$ that arrives at a tagged cache-router sees the system in equilibrium (PASTA property). Therefore, arrivals will find the content of interest at a given cache with probability $\pi_c$, independent of the state of the neighboring caches in that domain. Let $L_c$ be the random variable equal to the number of replicas of the content $c$ in the domain, excluding the router being visited. We have: \begin{equation} \label{eq:Lrepl} P(L_c=l) = \binom {N-1} {l} \pi_c^{l}(1-\pi_c)^{N-1-l} . \end{equation} Let $J_c$ denote the number of hops traversed by the stateless request by time $t$. Since the time between visits is assumed to be exponentially distributed, \begin{eqnarray} \label{eq:limit0} R(t|J_c=j,L_c=l) &=& (1 - \pi_c) (1-w_l)^{j} \end{eqnarray} where $w_l$ is the conditional probability that the random walker selects one router with content $c$ from the remaining $N-1$ routers in the domain when there are $l$ replicas of the content in the domain given that the current router does not have the content. Then, $w_l=l/(N-1)$. Note that $\pi_c$ depends on the placement policy and is defined partially by its parameter values. \begin{proposition} \label{prop:01} The probability $R_c(t|L_c=l)$ is given by \begin{eqnarray} \label{eq:rtm} R_c(t|L_c=l) &=& (1 - \pi_c) e^{-\gamma \omega_l t} \end{eqnarray} \end{proposition} \textit{Proof: } From \eqref{eq:limit0} we have: \begin{eqnarray} R_c(t|L_c=l) &=& (1 - \pi_c) \sum_{n=0}^{\infty} \frac{(\gamma t)^n}{n!}(1-\omega_l)^n e^{-\gamma t} \nonumber \\ &=& \frac{1 - \pi_c} {e^{\gamma t \omega_l}} \sum_{n=0}^{\infty} \frac{(\gamma t (1-\omega_l))^n}{n!}e^{- \gamma t (1-\omega_l)} \nonumber \\ &=& (1 - \pi_c)e^{-\gamma \omega_l t} \end{eqnarray} $\square$ \begin{proposition}[Stateless search] \label{prop:Rt} The probability ${R}_c(t)$ that a walker does not find a requested tagged content {in a domain} by time $t$ is given by: \begin{eqnarray} \label{eq:rt} R_c(t) &=& { \left( { e^{-\gamma t / (N-1)} \pi_c + (1-\pi_c) } \right) }^{(N-1)} (1-\pi_c) \end{eqnarray} \end{proposition} \textit{Proof:} Unconditioning \eqref{eq:rtm} on $L_c$, yields \begin{eqnarray} R(t) &=& \sum_{l=0}^{N-1} R(t|L_c=l) \binom {N-1} {l} \pi_c^{l} (1-\pi_c)^{(N-1-l)} \nonumber \\ &=& (1-\pi_c) \sum_{l=0}^{N-1} e^{-\gamma \omega_l t} \binom {N-1} {l} \pi_c^{l}(1-\pi_c)^{(N-1-l)} \nonumber \\ &=& (1-\pi_c) \sum_{l=0}^{N-1} \binom {N-1} {l} \left( {e^{-\gamma t/(N-1)} \pi_c }\right)^{l} (1-\pi_c)^{N-1-l} \nonumber \\ &=& (1-\pi_c) \left( { \pi_c e^{-\gamma t / (N-1) } + (1-\pi_c) } \right)^{(N-1)} \end{eqnarray} $\square$ According to \eqref{eq:rt}, $R_c(\infty) = (1-\pi_c)^{N}$. As $t$ increases, the probability that the walker does not find content $c$ approaches the probability that all $N$ caches within the domain do not hold the content. \label{sec:model1} \subsubsection{Model 2: Stateful search} \label{sec:dyn} In this section, we consider \textit{stateful searches} wherein requests remember the cache-routers that have been visited, i.e., after the search is initiated, the searcher chooses the next router to visit uniformly at random, from those that have not yet been visited before. Alternatively, requests know ahead of time what routers to visit. This latter approach is discussed in~\ref{sec:appstateful}. Under a stateful search, the searcher never revisits cache-routers. This is possible because cache-routers are logically fully-connected. As in the stateless model, we assume that arrivals of inter-domain requests for content $c$ at cache-routers are characterized by Poisson processes. Therefore, the random searches for $c$ that are initiated at a tagged router $i$ are characterized by a Poisson process modulated by the RC of router $i$, whose dynamics is governed by a birth-death Markovian process. It is shown in~\cite{pasta-ext1992} that the PASTA property holds for Poisson processes modulated by independent Markovian processess. Therefore, a search that starts at router $i$ and arrives at router $k \neq i$ sees the RC at $k$ in equilibrium, i.e., the request issued at router $i$ finds the desired content at cache $k$ with probability $\pi_c$. Conditioning on $J_c=j$ hops being traversed by time $t$, the probability that content $c$ is not found is given by \begin{eqnarray} \label{eq:Rt-j-2} \tilde{R}_c(t | J_c=j) &=& (1-\pi_c)^{j+1} \end{eqnarray} It remains to remove the conditioning on $J_c$. We assume, as in the stateless model, that the search takes an exponentially distributed random delay at each hop, independent of the system state. \begin{proposition}[Stateful search] \label{prop:model2} The probability $\tilde{R}(t)$ that a tagged content is not found by a stateful search by time $t$ is given by \begin{equation} \tilde{R}_c(t) = (1-\pi_c)( e^{-\gamma \pi_c t} + g(N)) \end{equation} where \begin{equation} g(N) = (1-\pi_c)^{N-1}\sum_{n=N}^{\infty} \frac{(\gamma t)^n} {n!} e^{-\gamma t} \left(1-(1-\pi_c)^{n+1-N}\right) \end{equation} \end{proposition} \textit{Proof:} { The proof is similar to that of Proposition~\ref{prop:01}. The time between cache visits is an exponential random variable with rate $\gamma$. It follows from \eqref{eq:Rt-j-2} that \begin{eqnarray} \tilde{R}_c(t) &=& \sum_{n=0}^{N-1} \tilde{R}_c(t|J=n) \frac{(\gamma t)^n}{n!} e^{-\gamma t} + \tilde{R}_c(t|J=N-1) \sum_{n=N}^{\infty} \frac{(\gamma t)^n}{n!} e^{-\gamma t} \\ &=& (1-\pi_c)\left( \sum_{n=0}^{N-1} \frac{(\gamma t)^n}{n!} e^{-\gamma t} (1-\pi_c)^n + (1-\pi_c)^{N-1} \sum_{n=N}^{\infty} \frac{(\gamma t)^n}{n!} e^{-\gamma t} \right) \nonumber \\ &=& (1-\pi_c)\left( \sum_{n=0}^{\infty} \frac{((1-\pi_c) \gamma t)^n }{n!} \frac{e^{-\gamma(1-\pi_c)t}} {e^{\gamma \pi_c t}} + g(N) \right) \nonumber \\ &=& (1-\pi_c) \left( e^{-\gamma \pi_c t} + g(N) \right) \end{eqnarray} $\square$ } { For large values of $N$, it follows from Proposition~\ref{prop:model2} that \begin{equation} \tilde{R}_c(t) \approx (1-\pi_c) e^{-\gamma \pi_c t} \label{eq:rtm1} \end{equation} The validity of the large $N$ assumption can be checked by using the Normal distribution approximation for the Poisson distribution. For instance, the sum $\sum_{n=N}^{\infty} \frac{(\gamma t)^n} {n!} e^{-\gamma t}$ that appears in the expression of $g(N)$ is well approximated by the complementary cumulative distribution of the Normal distribution, $1-\Phi\left(\frac{N-\gamma t}{\sqrt{\gamma t}}\right)$, for values of $N > \gamma t + 4 \sqrt{\gamma t}$, where $\Phi(x)$ is the cumulative distribution function of the standard Normal distribution. } According to ~\eqref{eq:rtm1}, $\tilde{R}_c(\infty) = 0$. As the random walk progresses, contents are dynamically inserted and evicted from the caches and the walker eventually finds the desired content. \subsubsection{Multi-tier {Networks}} { In the previous sections we considered a single tiered network. In what follows we extend these results to the multi-tier case. In Section \ref{sec:eval} we discuss the potential performance benefits of a multi-tiered architecture. } {Refer to Figure \ref{fig:domains2} and} let $M$ denote the number of tiers. Let $\hat{\Lambda}_c$ denote the publisher load accounting for the requests filtered at the $M$ tiers. Let $R_{c,i}(T_{c,i})$ denote the probability that a search that reaches domain $i$ fails to find content $c$ at that domain. The load for content $c$ that arrives at the publishing area is given by: \begin{eqnarray} \hat{\Lambda}_c =\Lambda_c \prod_{i=1}^{M} R_{c,i}(T_{c,i}) \end{eqnarray} where $\prod_{i=1}^{M} R_{c,i}(T_{c,i})$ is the probability that a request arrives at the publishing area and $\Lambda_c$ is the load generated by the users for content $c$ which are all placed at tier $M$. Note that replacing $R_{c,i}(T_{c,i})$ by $\tilde{R}_{c,i}(T_{c,i})$ corresponds to {using the stateful model in place of the stateless one.} \subsection{Average Delay} Let ${D}_{c,i}$ be a random variable denoting the delay experienced by requests for content $c$ at domain $i$. Recall that $T_{c,i}$ is the maximum time a walker spends searching for content $c$ in domain $i$. In what follows, we make the dependence of $D_{c,i}$ on $T_{c,i}$ explicit. It follows from~\cite{transol2000} that \begin{eqnarray} E[{D}_{c,i}(T_{c,i})] = \int_{0}^{T_{c,i}} R_{c,i}(t)dt \label{eqlt} \end{eqnarray} {Under the stateless model, } $E[{D}_{c,i}(T_{c,i})]$ does not admit a simple closed form solution and must be obtained through numerical integration of~\eqref{eq:rt}. {On the other hand, when the stateful model is employed, we obtain, after replacing~\eqref{eq:rtm1} into~\eqref{eqlt},} \begin{eqnarray} E[{D}_{c,i}(T_{c,i})] &=& \int_{0}^{T_{c,i}} (1-\pi_{c,i}) e^{ -\gamma \pi_{c,i} t}dt \\ &=& (1-\pi_{c,i})\frac{1-e^{-\gamma \pi_{c,i} T_{c,i}}}{\pi_{c,i} \gamma}. \label{eqlt1} \end{eqnarray} Let $D_c$ denote the delay to find content $c$, including the time required for the publishing area to serve the request if needed. Then, $E[D_c]$ is given by: \begin{eqnarray} \label{eq:edd} E[D_c] = \left(\sum_{i=1}^{M} E[D_{c,i}(T_{c,i})]\prod_{j=i+1}^{M} R_{c,j}(T_{c,j}) \right) + \mathcal{C}(\hat{\Lambda}_{c}) \prod_{j=1}^{M} R_{c,j}(T_{c,j}), \end{eqnarray} where $\mathcal{C}(\hat{\Lambda}_{c})$ is the mean cost (measured in time units) to retrieve a content at the publishing area as a function of the load $\hat{\Lambda}_{c}$. Recall that tier 1 (resp., tier $M$) is the closest to the custodians (resp., users). Therefore, $\prod_{j=i+1}^{M} R_{c,j}(T_{c,j})$ corresponds to the fraction of requests to content $c$ that reach tier $i$, for $i=1, \ldots, M-1$. \section{{Parameter Tuning}} \label{sec:opt} In this section we consider the problem of minimizing average delay under average storage constraints. To this aim, we use the stateful model { that was} introduced in the previous section. While {in Section \ref{sec:model} } the analysis targeted a single tagged content, in this section we account for the {limited space available in the caches and for contents that compete for cache space.} To simplify presentation, we consider a single tier ($M=1$). We also assume that the delays experienced by requests at the custodian are given and fixed, equal to $\mathcal{C}$. Let $D_c$ denote the delay experienced by a requester of content $c$. $E[D_c]$ is obtained by substituting \eqref{eq:rtm1} into \eqref{eq:edd}, \begin{equation} \label{eq:dc} E[D_c] = (1-\pi_c)\left( \frac{1-e^{-\gamma \pi_c T_c }}{\pi_c \gamma} + \mathcal{C} e^{-\gamma \pi_c T_c} \right) \end{equation} and \begin{equation} \label{eq:d} E[D] = \sum_{c=1}^C \frac{\lambda_c}{\lambda} E[D_c] \end{equation} Let $\alpha_c = 1/\mu_c$, $ {\bf m} {\alpha} = (\alpha_1, \alpha_2, \ldots, \alpha_C)$ and $ {\bf m} {T} = (T_1, T_2, \ldots, T_C)$. In light of~\eqref{eq:pic} and ~\eqref{eq:dc}-\eqref{eq:d}, {we} pose the following {joint placement and search} optimization problem: \begin{eqnarray} \label{eq:joint-opt} \min_{( {\bf m} {\alpha}, {\bf m} {T})} && E[D]= \sum_{c=1}^C \frac{\lambda_c}{\lambda} (1-\lambda_c \alpha_c) \left(\frac{1-e^{-\gamma \lambda_c \alpha_c T_c }}{\lambda_c \alpha_c \gamma} + \mathcal{C} e^{-\gamma \lambda_c \alpha_c T_c} \right) \nonumber \\ s.t. && \sum_{c=1}^{C}\lambda_c \alpha_c = B \end{eqnarray} Note that we impose a constraint on the expected buffer size, i.e., the number of expected items in the cache cannot exceed the buffer size $B$. Similar constraint has been considered, for instance, in~\cite{melazzi2014general}. Moreover, recent work~\cite{mostafa} shows that, for TTL caches, we can size the buffer as $B(1 + \epsilon)$, where $B$ (resp., $\epsilon$) grows in a sublinear manner (resp., shrinks to zero) with respect to $C$, and content will not need to be evicted from the cache before their timers expire, with high probability. The reinforced counter vector $ {\bf m} {\alpha}$ impacts content placement, while the random walk vector $ {\bf m} {T}$ impacts content search. By jointly optimizing for placement and search parameters, under storage constraints, we obtain insights about the interplay between these two fundamental mechanisms. { In what follows, we do not solve the joint optimization problem directly. Instead, to simplify the solution, we solve two problems independently: first, we consider the optimal placement given a search strategy, and then the optimal search given a pre-determined placement. In our case studies we discuss the impact of these simplifications. } \subsection{Optimal Placement Given Search Strategy} \label{sec:optplgrout} We first address the optimal placement problem, that is we determine how the buffer space at the cache-routers should be statistically divided among the contents to optimize the overall performance. \subsubsection{Special Case: $T$ large} We begin by considering large time to live values. In the limit when $T_c=\infty$, the time spent locally searching for a content is unbounded. Under this assumption, the optimization problem stated in \eqref{eq:joint-opt} reduces to \begin{eqnarray} \min_{ {\bf m} {\pi}} && \sum_{c=1}^C \frac{\lambda_c}{\lambda} ( 1-\pi_c) \left(\frac{1} {\pi_c \gamma} \right) \nonumber \\ s.t. && \sum_{c=1}^{C}\pi_c = B \label{eq:constr1} \end{eqnarray} We construct the Lagrange function, \begin{equation} \mathcal{L}( {\bf m} {\pi},\beta) = \sum_{c=1}^C \frac{\lambda_c}{\lambda} \frac{( 1-\pi_c)}{\pi_c \gamma} + \beta \left( \sum_{c=1}^C \pi_c - B \right) \end{equation} where $\beta$ is a Lagrange multiplier. Setting the derivative of the Lagrangian with respect to $\pi_c$ equal to zero and using~\eqref{eq:constr1} yields, \begin{equation} \beta=\frac{\left(\sum_{c=1}^C \sqrt{\lambda_c}\right)^2 }{ \gamma \lambda B^2}. \end{equation} Therefore, \begin{equation} \pi_c = B {\frac{\sqrt{\lambda_c}}{\left(\sum_{c=1}^C \sqrt{\lambda_c}\right)}}, c=1, \ldots, C. \label{squareroot} \end{equation} When $B=1$, the optimal policy~\eqref{squareroot} is the square-root allocation proposed by Cohen and Shenker~\cite{cohen2002replication} in the context of peer-to-peer systems. It is interesting that we obtain a similar result for the ICN system under study. This is because in both cases the optimization problem can be reformulated as to minimize $ \sum_{c=1}^C (\lambda_c/\lambda)/\pi_c$ under the constraint that $\sum_{c=1}^C \pi_c =B$. In~\cite{cohen2002replication} the term $1/\pi_c$ is the mean time to find content $c$, which is the average of a geometric random variable with probability of success $\pi_c$. In the ICN system under study, the term $1/\pi_c$ follows from expression~\eqref{eq:dc}. \subsubsection{Special Case: $ T=0$} \label{sec:optplgrout} Next, we consider the case $T=0$. When a request for $c$ arrives at a cache-router and does not find the content, the request is automatically sent to the next level in the hierarchy of tiers. Then, the optimization problem reduces to \begin{eqnarray} \min_{ {\bf m} {\pi}} && E[D]= \sum_{c=1}^C \frac{\lambda_c}{\lambda} ( 1-\pi_c) \mathcal{C}\\ s.t. && \sum_{c=1}^{C}\pi_c = B \end{eqnarray} In this case, the optimal solution consists of ordering contents based on $\lambda_c$ and storing the $B$ most popular ones in the cache, i.e., $\pi_c=1$ for $c=1, \ldots, B$ and $\pi_c=0$ otherwise. Note that this rule was shown to be optimal by Liu, Nain, Niclausse and Towsley~\cite{liu1997static} in the context of Web servers. \subsubsection{Special Case: $\gamma T$ small} \label{sec:gammatsmall} For $\gamma T << 1$, we have $e^{-\gamma \pi_c T} \approx 1-\gamma \pi_c T$. The optimization problem is given by \begin{eqnarray} \min_{ {\bf m} {\pi}} && E[D]= \sum_{c=1}^C \frac{\lambda_c}{\lambda} ( 1-\pi_c)\left(T+(1-\gamma \pi_c T) \mathcal{C} \right) \\ s.t. && \sum_{c=1}^{C}\pi_c = B \\ && 0 \leq \pi_c \leq 1 \end{eqnarray} Note that the objective function can be rewritten as \begin{equation} E[D]= \sum_{c=1}^C \frac{\lambda_c}{\lambda} \left( \mathcal{C} T \gamma \pi_c^2 + \left(-(\mathcal{C}+T)- \mathcal{C} T \gamma \right) \pi_c + (\mathcal{C}+T)\right) \end{equation} This is a special separable convex quadratic program, known as the economic dispatch problem~\cite{bay2010analytic} or continuous quadratic knapsack~\cite{gallo1980quadratic}. It can be solved in linear time using techniques presented in~\cite{bayon2013exact}. Alternatively, in~\ref{appsmallgammat} we present the dual of the problem above, which naturally yields a simple interactive gradient descent solution algorithm. \subsection{Optimal Search Given Placement} \label{sec:optroutgpl} In this section we address the optimal search problem, that is the choice of the $T_c$'s, when placement is given (the $\pi_c$'s have been determined). Then, the problem reduces to \begin{eqnarray} \label{minfixpl} \min_{ {\bf m} {T}} && \sum_{c=1}^C \frac{\lambda_c}{\lambda} \left(1-\pi_c\right)\left(\frac{1-e^{- \gamma \pi_c T_c }}{\gamma \pi_c} + \mathcal{C} e^{-\gamma \pi_c T_c} \right)\\ s.t. && T_c \ge 0, c=1, \ldots, C \end{eqnarray} For each content $c$ the function to be minimized is $f(T)$, \begin{equation} f(T)=\frac{1}{\gamma \pi_c} \left(1-e^{- \gamma \pi_c T}\right) + \mathcal{C} e^{- \pi_c \gamma T} \label{myobj} \end{equation} and \begin{equation} \frac{df(T)}{dT}= e^{- \gamma \pi_c T} - \gamma \pi_c \mathcal{C} e^{- \gamma \pi_c T} \end{equation} For a given content $c$, a random walk search should be issued with $T=\infty$ whenever ${df(T)}/{dT} < 0$, i.e., if $1 - \gamma \pi_c \mathcal{C} < 0$. Otherwise, the request for content $c$ should be sent directly to the publishing area; \begin{equation} \label{eq:Tc} T_c =\left\{ \begin{array}{ll} \infty, & \pi_c > {1}/({\mathcal{C} \gamma}) \\ 0, & \textrm{otherwise} \end{array} \right. \end{equation} \textbf{Remarks}: Although we do not solve the joint placement and search optimization problem, the special cases considered above provide some guidance for system tuning. The studies we conduct in the following section provide evidence of the usefulness of our model solutions. In addition, we may try different approximation approaches to solve the combined placement and search problem. For instance, one such approach is to first optimize for the $\pi_c$'s assuming $T$ is large and set $T_c = \infty$ for all contents that satisfy $\pi_c > {1}/({\mathcal{C} \gamma})$ (see \eqref{eq:Tc}). Then, set $T_c=0$ for the contents for which $\pi_c \leq {1}/({\mathcal{C} \gamma})$, and recompute $\pi_c$ for such contents using the solution presented in Section~\ref{sec:optplgrout} so as to fill the available buffer space. The performance of this and other heuristics is subject for future research. \section{Background and Related Work} \label{sec:related} In this section we introduce the background used in this paper. In Section~\ref{icnar} we present previously proposed ICN architectures and in Section~\ref{chall} we indicate some of the challenges they pose. \subsection{ICN Architectures} \label{icnar} A survey comprising various architectures considered for ICN can be found in~\cite{icn-comm-survey-2013}. In what follows, we focus on five of the prominent architectures, namely DONA, PSIRP, Netinf, Multicache and NDN, which are most relevant to our work. \begin{comment} \end{comment} DONA ~\cite{dona} consists of a hierarchy of domains. Each domain includes a logical Resolution Handler~(RH) that tracks the contents published in the domain and in the descendant domains. Therefore, the logical RH placed in the highest level of the hierarchy is aware of all the content published in the entire network. RHs provide a hierarchical name resolution service over the routing infra-structure. DONA supports caching through the RH infrastructure. When a RH aims at storing a content, it replaces the IP address of the requester by its own IP address. Then, the content will be delivered first to the RH before being forwarded to the end users, allowing the RH to cache the content within the domain. PSIRP~\cite{psirp}, Netinf~\cite{netinf} and Multicache~\cite{multicache} handle name resolution through a set of Request Nodes (RNs) organized according to a hierarchical Distributed Hash Table (DHT). Content is sent to the user through a set of forward nodes (FNs), under a separate network. FNs can advertise cached information to RNs to enhance the search efficiency and cache hit ratio. Nonetheless, as RNs cannot keep track of all replicas within the network, a key challenge consists of determining what is the relevant information to advertise. The NDN~\cite{ccn1} architecture handles name resolution using content routing tables. Users issue \textit{Interest} messages to request a content. Messages are forwarded hop-by-hop by Content Routers~(CRs) until the content is found. Messages leave a trail of \textit{bread crumbs} and the content follows the reverse path set by the trail. As content flows to requesters, the bread crumbs are removed. Published content is announced through routing protocols, with routing tables supporting name aggregation (names are hierarchical). To enhance the discovery of cached contents, Rosensweig et al.~\cite{elisha1} allow bread crumbs not to be consumed on the fly when content traverses the network. This allows trails for previously downloaded contents to be preserved. \subsection{Challenges} \label{chall} Some of the main challenges faced by present ICN architectures are discussed in~\cite{challengesicn2015}. For Name Resolution Services~(NRS) lookup proposals, such as Dona, NetInf and PSIRP, the challenge is to build a scalable resolution system which provides: (i) fast mapping of the name of the content to its locators; (ii) fast update of the location of a content since locations can change frequently; (iii) an efficient scheme to incorporate copies of a content in the cache routers. For proposals based on content routing tables, such as NDN, the number of contents may be around $10^{15}$ to $10^{22}$. Routing table design becomes a challenge as its size is proportional to the number of contents in the system. Route announcements due to replica updates, and link failures, pose additional challenges. Simple hierarchical tiered topologies, wherein each domain comprises a single node, admit closed-form expressions for the expected time to access content~\cite{dabirmoghaddam2014understanding, towsley1}. In this paper, we consider the case where each domain comprises multiple nodes, which means that routing is non-trivial. To face the scalability challenge related to content routing tables,~\cite{wangpro} proposes the use of flooding in each neighborhood, which simplifies design and reduces complexity. In this paper, in contrast, we propose the use of random walks. Random walks are as simple as flooding, and lead to reduced congestion~\cite{gelenbe2010search, ioannidis2008design,lv2002search,gkantsidis2004random} while still taking advantage of spacial and temporal locality~\cite{traverso2013temporal, dabirmoghaddam2014understanding}. For proposals relying on DHTs there exist many unsolved security vulnerabilities that are able to disrupt the pre-defined operation of DHT nodes~\cite{securitydht} and need to be overcome. Note that in a network composed of domains where providers care about administrative autonomy, the use of a global hash table becomes unfeasible~\cite{mdht}. \section{System Architecture} \label{sec:system} {In this section} we describe the system architecture considered in this paper. {We begin with a brief overview}. \subsection{Tiers and Domains} The system consists of a set of cache-routers partitioned into several logical domains, which are organized into hierarchically arranged tiers (Figure~\ref{fig:domains2}). Each domain consists of a set of routers or cache-routers that are responsible for forwarding requests and caching copies of contents. In what follows, we assume that all routers are equipped with caches, and use interchangeably the terms router and cache-router. Users generate requests at the lowest level of the hierarchy. These requests flow across {domains, following the tier hierarchy} towards the publishing areas, at the top of the hierarchy. Figure~\ref{fig:domains2} displays routers forwarding requests towards a publishing area (green arrows). We consider {$M$} logical hierarchical tiers. Tier 1 is the top level tier and tier {$M$} {is} the bottom level {constituted by routers that are ``closest'' to the users, i.e., which are the first to receive requests from users}. The publishing area knows how to forward a request to a publisher in case the content is not found in any of the tiers. {We adopt} a strategy that allows \textit{opportunistic} encounters between requests and replicas in a best-effort manner. Each cache maintains a counter (one per content), referred to as a {\it{reinforced-counter}}, to establish thresholds to guide content placement at the caches. Copies of popular contents may be cached in the routers. Whenever a request arrives to a domain, it generates a random walk to explore the domain, so as to allow opportunistic encounters with the desired content, taking advantage of the temporal and geographical correlations encountered by popular requests~\cite{traverso2013temporal}. We rely on random walks in order to avoid the control overhead associated to routing table updates and the drawbacks of DHTs discussed in the previous section. \subsection{Random Walk Search} \label{sec:rws} Random walks are one of the simplest search mechanisms with the flexibility to account for opportunistic encounters between user requests and replicas stored within the domains (purple arrows in Figure~\ref{fig:domains2}). Opportunistic encounters satisfy requests without the need for them to reach the publishing area. {A request that reaches the publisher area indicates that the corresponding content was not found in any of the domains traversed by it.} When a request arrives to a domain, if the cache-router that receives the request does not have the content, it starts a random walk search. The random walk lasts for at most $T$ units of time, only traversing routers in the domain. A time-to-live (TTL) counter is set to limit the amount of search time for a content \textit{within a domain}. If the content has not been found by the time the TTL counter expires, the router that holds the request transfers it to the next tier above it in the hierarchy. As a request is forwarded up the hierarchy, \textit{backward pointers} are deployed. These pointers are named \textit{bread crumbs}. When content is located in the network, {two actions are performed: (a) the content is sent to the requester and (b) the content is \textit{possibly} stored in the caches of the routers that first received the request in each domain (those that initiated the random walk at a domain). Action (b) is performed if the reinforced counters associated with the given content at the considered cache-routers reach a pre-determined threshold. Note that a cache-router may store contents that were found either in its own domain or in tiers above it. The publisher can perform action (a) by either directly sending the content to the requester, or by following the reverse path of the request (blue arrows in Figure~\ref{fig:domains2}), whichever is more efficient.} As the content follows the path of \textit{bread crumbs}, the trail is erased. \subsection{Reinforced Counter Based Placement} \label{sec:rcdesc} We consider a special class of content placement mechanisms, henceforth referred to as reinforced counters (RC), similar in spirit to TTL-caches~\cite{towsley1}. Each published content in the network is identified by a unique hash key \textsf{\textit{inf}}. All cache-routers have a set of RCs, one for {each} content. Reinforced counters are affected by exogenous requests and interdomain requests, {\textit{but not by endogenous requests inside a given domain}}, {that is, their values are not altered by the random walk search}. At any cache, the reinforced-counter associated to a given content is increment by one at every exogenous or interdomain request to that content, and is decremented by one at every tick of a timer. The timer ticks at a rate of $\mu$ ticks per second. {Associated with each RC is a} threshold $K$. Whenever a request for content \textsf{\textit{inf}} reaches a router, either (i) an already pre-allocated counter for \textsf{\textit{inf}} is incremented {by one} in this router or (ii) a new RC is allocated for \textsf{\textit{inf}} and set to one. If the value of the RC surpasses $K$, the content is stored {after \textsf{\textit{inf}} is found}. RCs are {decremented} over time. Whenever the RC for \textsf{\textit{inf}} is decremented from $K+1$ to $K$ the content is evicted {from the cache}. The counter is deallocated {when it reaches zero}. Note that the RC dynamics of different contents are uncoupled {and the RC values are independent of each other}. { Cache storage constraints are taken into account in the model by limiting the {\it average} number of replicas in each cache, which corresponds to soft constraints. Since hard constraints on the cache occupancy must be enforced, the RC threshold should be set in such a way that the probability of a cache overflow is small~\cite{mostafa}. By limiting the fraction of time that each content is cached, reinforced counters take advantage of statistical multiplexing of contents in the system. } \subsection{Stateless and Stateful Searches} We consider two variants of random walk searches: stateless and stateful. Under stateless searches, requests do not carry any information about previously visited cache-routers. In other words, when a cache-router is visited, the only information that is known is the content of the cache currently being visited. In a stateful search requests either a) remember the cache-routers that have been visited or b) know ahead of time what routers to visit. We assume that in stateful searches the searcher never revisits cache-routers. The stateless and stateful searches are studied in Sections~\ref{sec:fix} and~\ref{sec:dyn}, respectively.
{'timestamp': '2016-06-17T02:04:40', 'yymm': '1606', 'arxiv_id': '1606.05034', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05034'}
arxiv
\section{Introduction} One of the emerging techniques to significantly improve the spectral efficiency in wireless networks is full-duplex wireless communication~\cite{ashu13}. In-band full-duplex wireless allows simultaneous transmission and reception using the same frequency band, and thus opens up new design opportunities to increase the spectral efficiency of wireless systems. The feasibility of a (near-)full-duplex radio has been demonstrated by many groups, see e.g.\cite{ashu13,duarte2012design,evan13,Bharadia2013,aryafar2012midu,Kim15,HossainH15} and references therein. A side-effect of the full-duplex operation is that additional interference is introduced because there are more simultaneous active links and hence there is a possibility that the full-duplex gain can be offset by the loss due to additional interference. In the example shown in Fig.~\ref{fig:topology}, the uplink rate will be affected by the new interference from neighboring full-duplex BSs, and downlink rate will be affected by the new interference from uplink users (UE). \begin{figure} \centering \includegraphics[width=0.65\textwidth,trim = 20mm 45mm 20mm 23mm, clip]{pic/Multi-cellTopology3} \caption{The full-duplex BS in each cell has $M$ antennas, and the UE has single antenna with either full-duplex or half-duplex radio. Besides the conventional interference, there will be new BS-BS and UE-UE interference highlighted by the red dash lines.} \label{fig:topology} \end{figure} In this paper, we study if and how large antenna arrays at BSs can be used to manage the increased intra- and inter-cell interference in full-duplex enabled networks. Recently, the use of a very large antenna array at the BS has become very attractive~\cite{Shepard2013,larsson2014massive,rusek2013scaling}, known as massive MIMO, where a BS has orders of magnitude more antennas compared with the current use. The large antenna array at the BS not only can increase the network capacity many-fold, but also enable a new network architecture to simplify baseband signal processing~\cite{Shepard2013}, eliminate inter-cell interference~\cite{marzettaNon10}, and reduce node transmit power for energy saving~\cite{Ngo13}. The experimental evidence on the benefits of massive MIMO has already sparked strong industry interest and 64-antenna configuration~\cite{3gppMassiveMIMO} is now being considered for 5G systems. Our contributions are three-fold. First, we provide a general analysis to characterize the uplink and downlink ergodic achievable rates in multi-cell multi-user MIMO~(MU-MIMO) full-duplex networks. Focusing on computationally efficient linear receivers and precoders, we consider the case where each BS has multiple antennas with full-duplex capability, while each UE has a single antenna with either full-duplex or half-duplex radio. Practical constraints such as imperfect self-interference cancellation, channel estimation error, training overhead and pilot contamination are considered in our analysis. Second, we analyze the system performance in the asymptotic regime where the number of BS antennas grows infinitely large. We show that the transmit power of BSs and UEs can be scaled down with an increasing number of BS antennas to maintain a fixed asymptotic rate. The impact of imperfect self-interference cancellation at full-duplex BSs and full-duplex UEs, intra-cell and inter-cell interference in the multi-cell MU-MIMO full-duplex networks disappears as the number of BS antennas becomes infinitely large. Under the assumption of perfect channel knowledge, full-duplex system asymptotically achieves 2$\times$ spectral efficiency gain over the half-duplex system. When channel estimation error and channel training overhead are considered, the 2$\times$ asymptotic full-duplex gain is achieved when serving only full-duplex UEs. Lastly, we numerically evaluate the system performance in finite SNR and finite antenna regimes. Our numerical results reveal that full-duplex networks can use significantly fewer antennas to achieve spectral efficiency gain over the half-duplex counterparts. In addition, under realistic 3GPP multi-cell network scenarios~\cite{3gppdtdd}, the overall full-duplex gains can be achieved despite the increased interference introduced in the full-duplex networks. \textbf{Related work:} There are two lines of work in the area of MU-MIMO full-duplex cellular networks. The first line of work focuses on information theoretic limits while the other line of work focuses on practical network design. Towards that end, we discuss \cite{Sahai13, Bai15, Jeon15, Karakus15, Wenzhuo15, JingwenTWC, Goyal13,Choi13,Amir15}; note that not all papers are multi-cell studies. In \cite{Sahai13, Bai15, Jeon15,Karakus15,Wenzhuo15}, only a single-cell MIMO full-duplex case is studied. The authors in \cite{Sahai13, Bai15, Jeon15} study the information theoretic limits of a single-cell MU-MIMO full-duplex network, where the high signal-to-noise~(SNR) approximation, i.e., degrees of freedom or multiplexing gains have been characterized. In \cite{Karakus15,Wenzhuo15}, the authors propose opportunistic scheduling and a distributed power control method to mitigate UE-UE interference in a single-cell MIMO full-duplex network. Authors in \cite{JingwenTWC} present several schemes to manage UE-UE interference via out-of-band wireless side-channels in the full-duplex network. All the papers~\cite{Goyal13,Choi13,Amir15} study multi-cell full-duplex networks. In \cite{Goyal13}, scheduling and power control algorithms with BS cooperation in the multi-cell SISO full-duplex networks are investigated and \cite{Choi13} studies the MIMO case with 4 BS antennas. The performance analyses are based on extensive simulations, largely because of the challenge of analyzing complex scheduling and power control methods. In~\cite{Amir15}, the authors study the degrees of freedom region when the BSs have full coordination. This converts the problem into a network MIMO problem, and essentially allows one to treat the multi-cell problem as one giant MIMO cell. This, in turn, allows the use of interference alignment to achieve the highest possible degrees of freedom. While this approach provides insights into the maximum possible degrees of freedom, it relies on full coordination and proposes a very complex transmission method - both of them are extremely challenging to implement in practice. Compared to the above works, we focus on the case when there is no BS coordination and hence we cannot convert the problem to the more tractable single-cell problem. In addition, we allow only simple linear processing at the BSs, namely conjugate beamforming, and hence complex schemes like zero-forcing or interference-alignment cannot be employed. The rest of paper is organized as follows. We first describe the system model in Section~\ref{system}. In Section~\ref{core}, we characterize the ergodic achievable rates of uplink and downlink under both perfect and imperfect CSI assumptions. The large-scale system performance is studied in Section~\ref{asym}. The numerical results with realistic network evaluation are presented in Section~\ref{numerical}. Section~\ref{conclusion} concludes the paper. \section{Multi-cell Full-Duplex System Model}\label{system} We consider a multi-cell MU-MIMO full-duplex system with $L~(\geq 1)$ cells, where each cell has one in-band full-duplex BS with $M$ antennas. In each cell, single-antenna UEs with either full-duplex or half-duplex radios are supported. Each BS can serve $K_f$ full-duplex~(FD) users, $K_{h}^{u}$ half-duplex~(HD) uplink users and $K_{h}^d$ half-duplex downlink users. We denote $\mathcal{K}_{u}=\{\underbrace{1,\cdots,K_{f}}_{\mathrm{FD~UE}},\underbrace{K_{f}+1,\cdots,K_f+K_h^u}_{\mathrm{HD~UE}}\}$ as the set of all uplink users, where the first $K_f$ elements represent $K_f$ full-duplex users; and the last $K_{h}^{u}$ elements represent half-duplex uplink users. The set of all downlink users are denoted as $\mathcal{K}_d=\{\underbrace{1,\cdots,K_{f}}_{\mathrm{FD~UE}},\underbrace{K_{f}+1,\cdots,K_f+K_h^d}_{\mathrm{HD~UE}}\}$, where the first $K_f$ elements represent full-duplex users, and the last $K_{h}^{d}$ elements represent half-duplex downlink users. We further denote the set of full-duplex users as $\mathcal{K}_f\triangleq \{1,\cdots,K_f\}$ and set of half-duplex downlink users as $\mathcal{K}_h^d\triangleq \{K_f+1,\cdots,K_f+K_h^d\}$. The total number of uplink users is $|\mathcal{K}_{u}|\triangleq K_u$, where $K_u=K_{f}+K_h^u$ and the total number of downlink users is $|\mathcal{K}_{d}|\triangleq K_d$, where $K_d=K_{f}+K_h^d$. The uplink and downlink data are transmitted over the same time-frequency slot with block fading. The analysis in this paper can be applied to wide-band channels like OFDM system. In this work, we will consider practical constraints on the full-duplex radio chains such as non-ideal power amplifier, oscillator phase noise, non-ideal digital-to-analog converter and analog-to-digital converter, which can be captured by the dynamic range model~\cite{Day12,Vehkapera13}. The dynamic range model approximates the imperfect full-duplex transmit radio chain as an additive white Gaussian ``transmitter noise" added to each transmit antenna. The variance of the transmitter noise is $\kappa$~($\kappa\ll 1$) times the power of the transmit signals, where $\kappa$ is the dynamic range parameter. The full-duplex transmitter noise will propagate over the self-interference~(SI) channel and become nontrivial compared to the receiver thermal noise. However, the effect of transmitter noise that propagates over the uplink/downlink channels can be ignored compared to the receiver thermal noise~\cite{Vehkapera13}. \subsection{Uplink} The $j$-th full-duplex BS will receive an $M\times 1$ uplink signal vector $\bm{y}_{u,j}^\prime$: \begin{gather} \begin{aligned} \bm{y}_{u,j}^\prime=\sum_{l=1}^L\bm{G}_{u,jl} \bm{x}_{u,l}+\sum_{l=1}^{L}\bm{V}_{jl}\bm{x}_{d,l}+\bm{V}_{jj}\bm{e}_{bs,j}+\bm{n}_{u,j}, \label{original:uplink} \end{aligned} \end{gather} where $\bm{x}_{u,l} = \sqrt{P_u}\bm{u}_l$ denotes the uplink transmit signal vector, $\bm{u}_l\triangleq[u_{l,1},\cdots,u_{l,K_u}]^T$ is a $K_u\times 1$ vector consisting of uplink messages of the $K_u$ uplink users in the $l$-th cell. Each user has an average power constraint $P_u$, and $\mathbb{E}(|{u}_{l,k}|^2)=1$, for $k\in\mathcal{K}_u$. $\bm{x}_{d,l}$ is an $M\times 1$ vector denoting downlink transmit signal in the $l$-th cell. Each BS has an average power constraint $P_d$. We assume $\bm{G}_{u,jl}$ is an $M\times K_u$ matrix denoting the channel between the uplink users in the $l$-th cell and the $j$-th BS. The propagation channel model in our system considers both small-scale fading due to mobility and multipath, and large-scale fading due to geometric attenuation and shadowing effect, thus allowing arbitrary cell layout. The uplink channel $\bm{G}_{u,jl}$ encompasses independent small-scale fading and large-scale fading \[(\bm{G}_{u,jl})_{m,n}\triangleq g_{u,jmln}=h_{u,jmln}\sqrt{\beta_{u,jln}},\] where $j,l\in\{1,\cdots,L\},m\in\{1,\cdots,M\},n\in\mathcal{K}_{u}$. $h_{u,jmln}$ is the small-scale fading value between the $n$-th uplink user in the $l$-th cell and the $m$-th antenna at the $j$-th BS, following independent and identically distributed~(i.i.d.) circularly-symmetric complex Gaussian distribution $\mathcal{CN}(0,1)$. We use ${\beta_{u,jln}}$ to model the path loss and shadow fading between the $n$-th uplink user in the $l$-th cell and the $j$-th BS, which is independent of $m$. Such long-term parameters can be measured at the BS. The BS-BS channel $\bm{V}_{j,l}$ is an $M\times M$ matrix denoting the channel between the $l$-th BS and the $j$-th BS, and $\bm{V}_{j,j}$ denotes the SI channel for the $j$-th full-duplex BS. We assume $\bm{V}_{j,l}$ contains i.i.d $\mathcal{CN}(0,\beta_{b,jl})$ elements. The imperfect full-duplex transmit front-end chain is modeled as transmit noise $\bm{e}_{bs,j}\in\mathbb{C}^{M\times 1}$ added to each transmit antenna at the $j$-th full-duplex BS. And $\bm{e}_{bs,j}$ will propagate through the SI channel and follow~$\mathcal{CN}\left(0,\frac{\kappa P_d}{M}\bm{I}_M\right)$ assuming equal power allocation among downlink users, where $\bm{I}_M$ denotes an $M\times M$ identity matrix. The receiver thermal noise is denoted as $\bm{n}_{u,j}$ which contains i.i.d $\mathcal{CN}(0,\sigma^2)$ entries. The $j$-th BS then performs SI cancellation by knowing its SI channel and its downlink signal. Hence from (\ref{original:uplink}), we have \begin{gather} \begin{aligned} \bm{y}_{u,j}=\sum_{l=1}^L\bm{G}_{u,jl} \bm{x}_{u,l}+\sum_{l\neq j}^{L}\bm{V}_{j,l}\bm{x}_{d,l}+\bm{z}_{u,j},\label{eq:ul} \end{aligned} \end{gather} where $\bm{z}_{u,j}\sim \mathcal{CN}\left(0,\left(\sigma^2+\kappa P_d\beta_{b,jj}\right)\bm{I}_M\right)$. \subsection{Downlink} The received signals for the $K_d$ downlink users in the $l$-th cell can be expressed as a $K_d\times 1$ vector $\bm{y}_{d,l}$, given by \begin{gather} \begin{aligned} \bm{y}_{d,l}=\sum_{j=1}^L\bm{G}^T_{d,jl}\bm{x}_{d,j}+\sum_{j=1}^L\bm{F}_{lj}\bm{x}_{u,j}+\bm{J}_{l}+\bm{n}_{d,l}, \label{eq:dl} \end{aligned} \end{gather} where $\bm{G}_{d,jl}$ is an $M\times K_d$ matrix denoting the channel between the downlink users in the $l$-th cell and the $j$-th BS, the downlink channel can be represented as $\bm{G}_{d,jl}^T$ and we have \[(\bm{G}_{d,jl})_{m,k}^T\triangleq g^T_{d,jmlk}=h^T_{d,jmlk}\sqrt{\beta_{d,jlk}},\] where $k\in\mathcal{K}_{d}$, the superscript $``T"$ denotes transpose. $h_{d,jmlk}$ is the small-scale fading value between the $k$-th downlink user in the $l$-th cell and the $m$-th antenna at the $j$-th BS, following $\mathcal{CN}(0,1)$; ${\beta_{d,jlk}}$ incorporates path loss and shadow fading between the $k$-th downlink user in the $l$-th cell and the $j$-th BS . The UE-UE interference channel $\bm{F}_{lj}$ is a $K_d\times K_u$ matrix denoting the interference channel from $K_u$ uplink users in the $j$-th to $K_d$ downlink users in the $l$-th cell; $\bm{J}_{l}= \begin{pmatrix} \mathsf{diag}(\bm{S}_{ll})\bm{e}_{ue,l} \\ \bm{0} \end{pmatrix}$ is a $K_d\times 1$ vector, where $\bm{S}_{ll}$ is a $K_f\times K_f$ matrix denoting the interference channels between full-duplex users in the $l$-th cell. The diagonal elements of $\bm{S}_{ll}$ constitute SI channels for each full-duplex user in the $l$-th cell. And $\bm{S}_{ll}$ is a sub-matrix of $\bm{F}_{ll}$, where $ \left(\mathsf{diag}(\bm{S}_{ll})\right)_k=(\bm{F}_{ll})_{k,k}\triangleq f_{lklk},~k\in\mathcal{K}_f$. We assume each entry in $(\bm{F}_{lj})_{k,n}\triangleq f_{lkjn}$ models both the large-scale and fast fading channel coefficient between the $n$-th uplink user in the $j$-th cell and the $k$-th downlink user in the $l$-th cell, and follows i.i.d. $\sim\mathcal{CN}(0,\beta_{I,lkjn})$, where $j,l\in\{1,\cdots,L\}$ and $n\in\mathcal{K}_u,k\in\mathcal{K}_d$. The transmit noise at each full-duplex user in the $l$-th cell $\bm{e}_{ue,l}\in\mathbb{C}^{K_f\times 1}$ will propagate through the SI channel and follow~$\mathcal{CN}\left(0,\kappa P_u\bm{I}_{K_f}\right)$. The receiver thermal noise $\bm{n}_{d,l}$ follows~$\sim\mathcal{CN}(0,\sigma^2\bm{I}_{K_d})$. Next, the $k$-th full-duplex user in the $l$-th cell where $k\in\mathcal{K}_f$, will perform SI cancellation by subtracting out its own interference from the received signal in (\ref{eq:dl}). Thus we have \begin{gather} \begin{aligned} {r}_{d,lk}=\sum_{j=1}^L\bm{g}^T_{d,jlk}\bm{x}_{d,j}+\sum_{j=1}^L\sum_{n=1}^{K_u}\sqrt{P_u}f_{lkjn}{u}_{j,n}-\sqrt{P_u}f_{lklk}{u}_{l,k}+{z}_{d,lk}, \label{eq:dlfd} \end{aligned} \end{gather} where $\bm{g}_{d,jlk}$ is the $k$-th column of matrix $\bm{G}_{d,jl}$ and ${z}_{d,lk}\sim \mathcal{CN}\left(0,\left(\sigma^2+\kappa P_u\beta_{I,lklk}\right)\right).$ The expressions of the received downlink signals for full-duplex users and half-duplex users will differ, because for a full-duplex user, after SI cancellation there is no self UE-UE interference but an additional transmit noise is added to the received signal, while for a half-duplex downlink user, it will suffer the interference from all uplink users. Hence we can rewrite the received downlink signal for the $k^\prime$-th half-duplex user in the $l$-th cell where $k^\prime\in\mathcal{K}_h^d$ as \begin{gather} \begin{aligned} {r}_{d,lk^\prime}=\sum_{j=1}^L\bm{g}^T_{d,jlk^\prime}\bm{x}_{d,j}+\sum_{\mathclap{\substack{j=1}}}^L\sum_{\mathclap{n=1}}^{K_u} \sqrt{P_u}f_{lk^\prime jn}u_{j,n}+{n}_{d,lk^\prime}, \label{eq:dlhd} \end{aligned} \end{gather} where ${n}_{d,lk^\prime}$ is the $k^\prime$-th element in $\bm{n}_{d,l}$. \section{Achievable rates in full-duplex networks} \label{core} In this section, we will derive the up- and downlink ergodic achievable rates in multi-cell MU-MIMO full-duplex networks. We first study the case of perfect channel state information~(CSI) where the channel information is obtained perfectly at no cost. Next, we consider the channel estimation error, where CSI is estimated from uplink pilot sequences. We assume synchronized reception from all cells, which will reflect the worst possible scenario of pilot contamination~\cite{marzettaNon10}. \subsection{Perfect channel state information} \subsubsection{Uplink with maximum ratio combining} The $j$-th BS will receive data transmitted by its associated $K_u$ uplink users, together with the interference from other cells. We apply a low-complexity linear receiver, i.e., maximum ratio combing for uplink signal detection. The $j$-th BS will multiply the received signal after SI cancellation by the conjugate-transpose of its uplink channel $\bm{G}_{u,jj}^H$ to obtain a $K_u\times 1$ signal vector \begin{gather} \begin{aligned} \bm{r}_{u,j}&=\bm{G}_{u,jj}^H\bm{y}_{u,j}\\ &=\bm{G}_{u,jj}^H\bm{G}_{u,jj}\bm{x}_{u,j}+\sum_{\mathclap{l\neq j}}\bm{G}_{u,jj}^H\bm{G}_{u,jl}\bm{x}_{u,l}+\sum_{l\neq j}\bm{G}_{u,jj}^H\bm{V}_{j,l}\bm{x}_{d,l}+\bm{G}_{u,jj}^H\bm{z}_{u,j}, \label{eq:ul2} \end{aligned} \end{gather} where superscript ``$H$" denotes conjugate-transpose, $\bm{y}_{u,j}$ is given in (\ref{eq:ul}). \subsubsection{Downlink with conjugate beamforming} The $l$-th BS will transmit an $M\times 1$ downlink signal vector $\bm{x}_{d,j}$ by precoding the downlink messages using a conjugate beamforming linear precoder \begin{gather} \begin{aligned} \bm{x}_{d,l}=\frac{\bm{G}^*_{d,ll}}{\sqrt{\gamma_l}}\bm{s}_{d,l},\label{precode:p} \end{aligned} \end{gather} where superscript ``*" denotes conjugate. $\bm{s}_{d,l}=\sqrt{\frac{P_d}{K_d}}\bm{d}_l$, $\bm{d}_l\triangleq[d_{l,1},\cdots,d_{l,K_d}]^T$ is a $K_d\times 1$ vector consisting of downlink messages of the $K_d$ downlink users in the $l$-th cell with $\mathbb{E}(|d_{l,k}|^2)=1,k\in\mathcal{K}_d$; $\gamma_l$ is the $l$-th cell power normalization factor to meet the average power constraint such that $\mathbb{E}(\bm{x}_{d,l}^H\bm{x}_{d,l})=P_d$, hence $\gamma_l=\frac{\mathbb{E}(\bm{d}_l^H\bm{G}^T_{d,ll}\bm{G}^*_{d,ll}\bm{d}_l)}{K_d}=\frac{{M\sum_{k=1}^{K_d} \beta_{d,llk}}}{K_d}$. Substituting (\ref{precode:p}) into (\ref{eq:dlfd}), we can first obtain the downlink signal at the $k$-th full-duplex user in the $l$-th cell where $k\in\mathcal{K}_f$ as \begin{gather} \begin{aligned} {r}_{d,lk}=\sum_{j=1}^L\sum_{i=1}^{K_d}\sqrt{\frac{P_d}{K_d\gamma_j}}\bm{g}^T_{d,jlk}\bm{g}^*_{d,jji}{d}_{j,i}+\sum_{j=1}^L\sum_{n=1}^{K_u}\sqrt{P_u}f_{lkjn}{u}_{j,n}-\sqrt{P_u}f_{lklk}{u}_{l,k}+{z}_{d,lk}. \label{eq:dl2} \end{aligned} \end{gather} Next, we substitute (\ref{precode:p}) into (\ref{eq:dlhd}) to obtain the received downlink signal at the $k^\prime$-th half-duplex user in the $l$-th cell where $k^\prime\in\mathcal{K}_h^d$ as \begin{gather} \begin{aligned} {r}_{d,lk^\prime}=\sum_{j=1}^L\sum_{i=1}^{K_d}\sqrt{\frac{P_d}{K_d\gamma_j}}\bm{g}^T_{d,jlk^\prime}\bm{g}^*_{d,jji}{d}_{j,i}+\sum_{\mathclap{\substack{j=1}}}^L\sum_{\mathclap{n=1}}^{K_u} \sqrt{P_u}f_{lk^\prime jn}u_{j,n}+{n}_{d,lk^\prime}. \label{eq:dl3} \end{aligned} \end{gather} \subsubsection{Ergodic achievable rates} We will treat the interference terms in (\ref{eq:ul2}), (\ref{eq:dl2}) and (\ref{eq:dl3}) as noise in our rate analysis. By coding over infinitely large number of the realizations of the fast ading channels, we can obtain the ergodic achievable rate of the $n$-th uplink user in the $j$-th cell~(bits/s/Hz) as \begin{gather} \begin{aligned} \tilde{R}^{fd,p}_{u,jn}&= \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{P_u\norm{\bm{g}_{u,jjn}}^4}{P_u\sum_{(l,m)\neq (j,n)}|\bm{g}^H_{u,jjn}\bm{g}_{u,jlm}|^2+I_{bs-bs}+\norm{\bm{g}_{u,jjn}}^2(\sigma^2+\kappa P_d\beta_{b,jj})}\right)\right\}, \label{ul:lb1} \end{aligned} \end{gather} where $n\in\mathcal{K}_u$, $I_{bs-bs}=\sum_{l\neq j}\sum_{k\in\mathcal{K}_d}\frac{P_d}{K_d \gamma_l}|\bm{g}^H_{u,jjn}\bm{V}_{jl}\bm{g}^*_{d,llk}|^2$. The notation of $\sum_{(l,m)\neq (j,n)}$ denotes the summation over all tuples $(l,m)\in\{1,\cdots,L\}\times \mathcal{K}_u\backslash\{(l=j,m=n)\}$. Similarly, the downlink ergodic achievable rates of the $k$-th full-duplex user and the $k^\prime$-th half-duplex user in the $l$-th cell are respectively given as \begin{gather} \begin{aligned} \tilde{R}^{fd,p}_{d,lk}&= \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{\frac{P_d}{K_d\gamma_l}\norm{\bm{g}_{d,llk}}^4}{\sum_{(j,i)\neq (l,k)}\frac{P_d}{K_d\gamma_j}|\bm{g}^T_{d,jlk}\bm{g}^*_{d,jji}|^2+I_{ue-ue}(k)- P_u|f_{lklk}|^2+\sigma^2+\kappa P_u\beta_{I,lklk}}\right)\right\},\\ \tilde{R}^{fd,p}_{d,lk^\prime}&= \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{\frac{P_d}{K_d\gamma_l}\norm{\bm{g}_{d,llk^\prime}}^4}{\sum_{(j,i)\neq (l,k^\prime)}\frac{P_d}{K_d\gamma_j}|\bm{g}^T_{d,jlk^\prime}\bm{g}^*_{d,jji}|^2+I_{ue-ue}(k^\prime)+\sigma^2}\right)\right\},\label{ARFDP} \end{aligned} \end{gather} where $k\in\mathcal{K}_f,k^\prime\in\mathcal{K}_h^d$. $I_{ue-ue}(k)=\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}|P_uf_{lkjn}|^2$. The notation of $\sum_{(j,i)\neq (l,k)}$ denotes the summation over all tuples $(j,i)\in\{1,\cdots,L\}\times \mathcal{K}_d\backslash\{(j=l,i=k)\}$. \begin{Proposition}\label{prop1} For perfect CSI, lower bounds on the ergodic achievable rates of multi-cell MU-MIMO full-duplex networks when $M\geq 3$ are given as \begin{gather} \begin{aligned} \text{Uplink user:}~R^{fd,p}_{u,jn}&= \mathrm{log}_2\bigg(1+\frac{P_u(M-1)\beta_{u,jjn}}{I_{up}+\sigma^2+\kappa P_d\beta_{b,jj}}\bigg),\\ \text{Downlink, FD user:}~R^{fd,p}_{d,lk}&= \mathrm{log}_2\Bigg(1+\frac{\eta_l P_d(M-1)(M-2)\beta^2_{d,llk}}{I_{down}(k)-P_u\beta_{I,lklk}+\sigma^2+\kappa P_u\beta_{I,lklk}}\Bigg),\\ \text{Downlink, HD user:}~R^{fd,p}_{d,lk^\prime}&= \mathrm{log}_2\Bigg(1+\frac{\eta_l P_d(M-1)(M-2)\beta^2_{d,llk^\prime}}{I_{down}(k^\prime)+\sigma^2}\Bigg),\label{eq:prop1} \end{aligned} \end{gather} where $n\in\mathcal{K}_u,~k\in\mathcal{K}_f,~k^\prime\in\mathcal{K}_h^d$, $I_{up}=P_u\sum_{(l,m)\neq (j,n)}\beta_{u,jlm}+P_d\sum_{l\neq j} \beta_{b,jl}$, $I_{down}(k) = \sum_{i\neq k,i\in\mathcal{K}_d}\eta_l P_d\beta_{d,llk}\beta_{d,lli}(M-2)+P_d\sum_{j\neq l}\beta_{d,jlk}+\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}P_u\beta_{I,lkjn}$, and $\eta_l=\frac{1}{M\sum_{i\in\mathcal{K}_d}\beta_{d,lli}}$. \end{Proposition} \begin{proof} See Appendix~\ref{proof1}. \end{proof} \subsection{Imperfect channel state information} In order to perform up- and downlink beamforming in MU-MIMO networks, the BS needs to know the up- and downlink channels for uplink coherent detection and downlink precoding. In this section, we will derive the ergodic achievable rates in the presence of channel estimation error. In the full-duplex system, the up- and downlink channels are estimated through uplink training sequences, and thus the pilot overhead is only proportional to the number of users. Simultaneous up-and downlink data transmission starts after uplink training, as shown in Fig.~\ref{training}. \subsubsection{Pilot-aided channel estimation} During the uplink training period, within a coherence interval of $T$, $K_{tot}\triangleq K_u+K_d-K_f$ mutually orthogonal pilot sequences of length $\tau$~($\tau\geq K_{tot}$) symbols are used to estimate the channels between each BS and its associated UEs. The same set of pilot sequences will be reused by $L$ cells. The channel estimate will be corrupted by pilot contamination~\cite{marzettaNon10} due to the non-orthogonality of the reused pilots. We assume that each user has an average channel training power of $P_{tr}$, which is a parameter that depends on the length of the pilot sequences. The $j$-th BS will correlate the received signal from uplink training with the pilot sequences assigned for the $k$-th user to obtain an $M$-dimensional vector $\bm{y}_{tr,jk}$ \begin{gather} \bm{y}_{tr,jk}=\bm{g}_{\Phi,jjk}+\sum_{l\neq j}^L\bm{g}_{\Phi,jlk}+\frac{\bm{n}_{jk}}{\sqrt{P_{tr}}}, \end{gather} where $\Phi\in\{u,d\}$, $k\in\mathcal{K}_u\cup\mathcal{K}_h^d$, $\bm{g}_{\Phi, jjk}$ is the $k$-th column of the channel matrix $\bm{G}_{\Phi, jj}$, and $\bm{n}_{jk}\sim\mathcal{CN}(\bm{0},\sigma^2\bm{I}_M)$. For the full-duplex users, due to the channel reciprocity, we have $\bm{g}_{u,jji}=\bm{g}_{d,jji}$ for $i\in\mathcal{K}_f$. Hence the estimated uplink channels for full-duplex users can also be used for downlink precoding. \begin{figure} \centering \includegraphics[width=0.4\textwidth,trim = 60mm 75mm 70mm 76mm, clip]{pic/FDbsFDuePilots.pdf} \caption{Uplink channel training in full-duplex networks.} \label{training} \end{figure} The MMSE channel estimate of the $k$-th user in the $j$-th cell $\bm{g}_{\Phi,jjk}$ can be obtained as~\cite{Hoydis13} \begin{gather} \begin{aligned} \hat{\bm{g}}_{\Phi,jjk}=\frac{P_{tr}\beta_{\Phi,jjk}}{\lambda_{\Phi,jk}}\left(\sum_{l=1}^L \bm{g}_{\Phi,jlk}+\frac{\bm{n}_{jk}}{\sqrt{P_{tr}}}\right),\label{eq:mmse} \end{aligned} \end{gather} where $\lambda_{\Phi,jk}=\sigma^2+P_{tr}\sum_{l=1}^L\beta_{\Phi,jlk}$, and $\hat{\bm{g}}_{\Phi,jjk}\sim\mathcal{CN}\left(\bm{0},\frac{P_{tr}\beta^2_{\Phi,jjk}}{\lambda_{\Phi,jk}}\bm{I}_M\right)$ Due to the orthogonality principle of the MMSE estimator, the true channel can be decomposed as the estimated channel and channel estimation error. Hence we have \begin{gather} \begin{aligned} \bm{g}_{\Phi,jjk}=\hat{\bm{g}}_{\Phi,jjk}+\bm{\epsilon}_{\Phi,jjk}, \end{aligned} \end{gather} where $\bm{\epsilon}_{\Phi,jjk}\sim\mathcal{CN}\left(\bm{0},\frac{\beta_{\Phi,jjk}\left(\sigma^2+P_{tr}\sum_{l\neq j}\beta_{\Phi,jlk}\right)}{\lambda_{\Phi,jk}}\bm{I}_M\right)$, and the error $\bm{\epsilon}_{\Phi,jjk}$ is independent of the estimate $\hat{\bm{g}}_{\Phi,jjk}$. \subsubsection{Uplink and downlink data transmission} In the uplink, the $j$-th BS will apply maximum ratio combining detector by multiplying the conjugate-transpose of channel estimate $\hat{\bm{G}}_{u,jj}^H$ with the received signal \begin{eqnarray} \bm{r}_{u,j}&=&\hat{\bm{G}}_{u,jj}^H\bm{y}_{u,j}\\ &=&\hat{\bm{G}}_{u,jj}^H\bm{G}_{u,jj}\bm{x}_{u,j}+\sum_{\mathclap{l\neq j}}\hat{\bm{G}}_{u,jj}^H\bm{G}_{u,jl}\bm{x}_{u,l}+\sum_{l\neq j}\hat{\bm{G}}_{u,jj}^H\bm{V}_{j,l}\bm{x}_{d,l}+\hat{\bm{G}}_{u,jj}^H\bm{z}_{u,j}\\ &=&\hat{\bm{G}}_{u,jj}^H\hat{\bm{G}}_{u,jj}\bm{x}_{u,j}+\hat{\bm{G}}_{u,jj}^H\bm{E}_{u,jj}\bm{x}_{u,j}+\sum_{\mathclap{l\neq j}}\hat{\bm{G}}_{u,jj}^H\bm{G}_{u,jl}\bm{x}_{u,l}+\sum_{l\neq j}\hat{\bm{G}}_{u,jj}^H\bm{V}_{j,l}\bm{x}_{d,l} \label{eq:ul22}\\ &&+~\hat{\bm{G}}_{u,jj}^H\bm{z}_{u,j}\nonumber \end{eqnarray} where the $k$-th column of $\bm{E}_{u,jj}$ is $\bm{\epsilon}_{u,jjk}$, and (\ref{eq:ul22}) follows from $\bm{G}_{u,jj}=\hat{\bm{G}}_{u,jj}+\bm{E}_{u,jj}$. In the downlink, the $l$-th BS will employ conjugate beamforming to precode the downlink messages using the channel estimate $\hat{\bm{G}}_{d,ll}$, and transmit an $M\times 1$ signal vector $\bm{x}_{d,l}$, \begin{gather} \begin{aligned} \bm{x}_{d,l}=\frac{\hat{\bm{G}}^*_{d,ll}}{\sqrt{\tilde{\gamma}_l}}\bm{s}_{d,l}, \label{precode:ip} \end{aligned} \end{gather} where $\tilde{\gamma}_l=\frac{\mathbb{E}(\bm{d}_l^H\hat{\bm{G}}^T_{d,ll}\hat{\bm{G}}^*_{d,ll}\bm{d}_l)}{K_d}=\frac{M}{K_d}\sum_{i=1}^{K_d}\frac{P_{tr}\beta_{d,lli}^2}{\sigma^2+P_{tr}\sum_{j=1}^L\beta_{d,lji}}$. We assume that the downlink users do not have the channel estimate for reception~(otherwise, additional pilot overhead needs to be considered), but are aware of the channel statistics. Each downlink user can perfectly track the average effective channel gain. Thus the received downlink signal can be decomposed as an average effective channel gain times the desired signal symbol, plus a composite term to denote effective noise as in~\cite{Jose11}. Substituting (\ref{precode:ip}) into (\ref{eq:dlfd}), the received downlink signal at the $k$-th full-duplex user in the $l$-th cell where $k\in\mathcal{K}_f$ can be written as \begin{gather} \begin{aligned} {r}_{d,lk}&=\sqrt{\frac{P_d}{K_d\tilde{\gamma}_l}}\mathbb{E}[\bm{g}^T_{d,llk}\bm{v}_{lk}]d_{l,k}+\sqrt{\frac{P_d}{K_d\tilde{\gamma}_l}}\left(\bm{g}^T_{d,llk}\bm{v}_{lk}-\mathbb{E}[\bm{g}^T_{d,llk}\bm{v}_{lk}]\right)d_{l,k}\\ &+\sum_{(j,i)\neq (l,k)}\sqrt{\frac{P_d}{K_d\tilde{\gamma}_j}}\bm{g}^T_{d,jlk}{\bm{v}}_{ji}d_{j,i}+\sum_{j=1}^L\sum_{n=1}^{K_u}\sqrt{P_u}f_{lkjn}{u}_{j,n}-\sqrt{P_u}f_{lklk}{u}_{l,k}+z_{d,lk}. \end{aligned} \end{gather} where $\bm{v}_{lk}=\hat{\bm{g}}^*_{d,llk}$ for conjugate beamforming precoder. Similarly, we substitute (\ref{precode:ip}) into (\ref{eq:dlhd}) to obtain the downlink signal at the $k^\prime$-th half-duplex user in the $l$-th cell where $k^\prime\in\mathcal{K}_h^d$ \begin{gather} \begin{aligned} {r}_{d,lk^\prime}&=\sqrt{\frac{P_d}{K_d\tilde{\gamma}_l}}\mathbb{E}[\bm{g}^T_{d,llk^\prime}\bm{v}_{lk^\prime}]d_{l,k^\prime}+\sqrt{\frac{P_d}{K_d\tilde{\gamma}_l}}\left(\bm{g}^T_{d,llk^\prime}\bm{v}_{lk^\prime}-\mathbb{E}[\bm{g}^T_{d,llk^\prime}\bm{v}_{lk^\prime}]\right)d_{l,k^\prime}\\ &+\sum_{(j,i)\neq (l,k^\prime)}\sqrt{\frac{P_d}{K_d\tilde{\gamma}_j}}\bm{g}^T_{d,jlk^\prime}{\bm{v}}_{ji}d_{j,i}+\sum_{\mathclap{\substack{j=1}}}^L\sum_{\mathclap{n=1}}^{K_u} \sqrt{P_u}f_{lk^\prime jn}u_{j,n}+{n}_{d,lk^\prime}. \end{aligned} \end{gather} \subsubsection{Ergodic achievable rates} For the uplink, the channel estimate will be treated as the true channel. Hence we can obtain the ergodic achievable rate for the $n$-th uplink user in the $j$-th cell as follows: \begin{gather} \begin{aligned} \tilde{R}^{fd,ip}_{u,jn}&= \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{P_u\norm{\hat{\bm{g}}_{u,jjn}}^4}{P_u|\hat{\bm{g}}_{u,jjn}^H\bm{\epsilon}_{u,jjn}|^2+P_u\sum_{(l,m)\neq (j,n)}|\hat{\bm{g}}^H_{u,jjn}\bm{g}_{u,jlm}|^2+I^{ip}_{bs-bs}+N}\right)\right\}, \label{ulim:lb1} \end{aligned} \end{gather} where $n\in\mathcal{K}_u$, $I^{ip}_{bs-bs}=\sum_{l\neq j}\sum_{k\in\mathcal{K}_d}\frac{P_d}{K_d \tilde{\gamma}_l}|\hat{\bm{g}}^H_{u,jjn}\bm{V}_{jl}\hat{\bm{g}}^*_{d,llk}|^2,~N=\norm{\hat{\bm{g}}_{u,jjn}}^2(\sigma^2+\kappa P_d\beta_{b,jj})$. For the downlink, the effective noise is uncorrelated with the signal, using worst-case independent Gaussian noise results in~\cite{Jose11}, the downlink ergodic achievable rates of the $k$-th full-duplex user and the $k^\prime$-th half-duplex user in the $l$-th cell are respectively given as \begin{gather} \begin{aligned} {R}_{d,lk}^{fd,ip}&= \mathrm{log}_2\left(1+\frac{\frac{P_d}{K_d\tilde{\gamma}_l}\left|\mathbb{E}\left[\bm{g}^T_{d,llk}\hat{\bm{g}}^*_{d,llk}\right]\right|^2}{\frac{P_d}{K_d\tilde{\gamma}_l}\mathsf{var}\left[\bm{g}^T_{d,llk}\hat{\bm{g}}^*_{d,llk}\right]+I_{other}(k)- P_u\mathbb{E}\left[\abs{f_{lklk}}^2\right]+\sigma^2+\kappa P_u\beta_{I,lklk}}\right),\\ {R}_{d,lk^\prime}^{fd,ip}&= \mathrm{log}_2\left(1+\frac{\frac{P_d}{K_d\tilde{\gamma}_l}\left|\mathbb{E}\left[\bm{g}^T_{d,llk^\prime}\hat{\bm{g}}^*_{d,llk^\prime}\right]\right|^2}{\frac{P_d}{K_d\tilde{\gamma}_l}\mathsf{var}\left[\bm{g}^T_{d,llk^\prime}\hat{\bm{g}}^*_{d,llk^\prime}\right]+I_{other}(k^\prime)+\sigma^2}\right),\label{dlim:lb1} \end{aligned} \end{gather} where $k\in\mathcal{K}_f,k^\prime\in\mathcal{K}_h^d$. $I_{other}(k)=\sum_{(j,i)\neq (l,k)}\frac{P_d}{K_d\tilde{\gamma}_j}\mathbb{E}\left[\abs{\bm{g}^T_{d,jlk}\hat{\bm{g}}^*_{d,jji}}^2\right]+\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}P_u\mathbb{E}\left[\abs{f_{lkjn}}^2\right]$. The notation $\mathsf{var}[x]\triangleq\mathbb{E}[(x -\mu)(x -\mu)^H],~\mathbb{E}[x]=\mu$. \begin{Proposition} \label{prop2} For imperfect CSI with MMSE estimation, the following sets of rates are achievable in multi-cell MU-MIMO full-duplex networks when $M\geq 3$ \begin{gather} \begin{aligned} \text{Uplink user:}~R^{fd,ip}_{u,jn}&= \mathrm{log}_2\bigg(1+\frac{P_{tr}P_u(M-1)\beta^2_{u,jjn}}{P_u\beta_{u,jjn}(\sigma^2+P_{tr}\sum_{l\neq j}\beta_{u,jln})+\tilde{I}_{up}+\tilde{N}}\bigg),\\ \text{Downlink, FD user:}~R^{fd,ip}_{d,lk}&= \mathrm{log}_2\Bigg(1+\frac{\tilde{\eta}_lP_{tr} P_dM\beta^4_{d,llk}}{\lambda^2_{d,lk}(\tilde{I}_{down}(k)-P_u\beta_{I,lklk}+\sigma^2+\kappa P_u\beta_{I,lklk})}\Bigg),\\ \text{Downlink, HD user:}~R^{fd,ip}_{d,lk^\prime}&= \mathrm{log}_2\Bigg(1+\frac{\tilde{\eta}_lP_{tr} P_dM\beta^4_{d,llk^\prime}}{\lambda^2_{d,lk^\prime}(\tilde{I}_{down}(k^\prime)+\sigma^2)}\Bigg),\label{eq:prop2} \end{aligned} \end{gather} where $\tilde{I}_{up}=P_{tr}P_u\sum_{l\neq j}\left[(M+1)\beta^2_{u,jln}+\sum_{l_1\neq l}\beta_{u,jl_1 n}\beta_{u,jln}+\frac{\beta_{u,jln}\sigma^2}{P_{tr}}\right]$, $\tilde{N}=\lambda_{u,jn}(P_d\sum_{l\neq j} \beta_{b,jl}+P_u\sum_{l=1}^L\sum_{m\in\mathcal{K}_u,m\neq n}\beta_{u,jlm}+\sigma^2+\kappa P_d\beta_{b,jj})$, $\tilde{I}_{down}(k) = \frac{\tilde{\eta}_l P_d\beta^3_{d,llk}}{\lambda_{d,lk}}+\sum_{j\neq l}\frac{\tilde{\eta}_jP_{tr}P_d(M+1)\beta^2_{d,jlk}\beta^2_{d,jjk}}{\lambda^2_{d,jk}}+\sum_{j\neq l}\frac{\tilde{\eta}_j P_{d}\beta_{d,jjk}^2(\sigma^2+P_{tr}\sum_{l_1\neq l}\beta_{d,jl_1k})\beta_{d,jlk}}{\lambda^2_{d,jk}}+\sum_{j=1}^L\sum_{i\neq k,i\in\mathcal{K}_d}\frac{\tilde{\eta}_jP_d\beta^2_{d,jji}\beta_{d,jlk}}{\lambda_{d,ji}}+\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}P_u\beta_{I,lk jn}$. $\tilde{\eta}_l=\left(\sum_{i\in\mathcal{K}_d}\frac{\beta^2_{d,lli}}{\lambda_{d,li}}\right)^{-1}$, $n\in\mathcal{K}_u,~k\in\mathcal{K}_f,~k^\prime\in\mathcal{K}_h^d.$ \end{Proposition} \begin{proof} See Appendix~\ref{proof2}. \end{proof} \subsection{TDD baseline system } We use TDD system as a baseline half-duplex system for comparison since both full-duplex and TDD systems use uplink training for channel estimation.\footnote{FDD system requires downlink training with channel feedback which incurs a much higher pilot overhead as the overhead is not only proportional to the number of users but also the number of BS antennas.} Compared with a full-duplex system, in a TDD system, the uplink does not have BS-BS interference and transmit noise which accounts for imperfect FD radios, and the downlink does not have UE-UE interference and transmit noise. We assume the corresponding TDD system has an uplink and downlink user sets of $\mathcal{K}_u$ and $\mathcal{K}_d$, respectively, with the same total number of uplink and downlink users as in the full-duplex system, i.e., $|\mathcal{K}_u|=K_u$ and $|\mathcal{K}_d|=K_d$. For the TDD baseline system, the up- and downlink transmissions are in two different time slots, and we assume an equal time sharing between up- and downlink transmission. By treating interference as noise, the up- and downlink ergodic achievable rates in a TDD system under perfect CSI assumption are given as \begin{gather} \begin{aligned} \text{Uplink user:}~{R}^{tdd,p}_{u,jn}&=\frac{1}{2}\mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{P_u\norm{\bm{g}_{u,jjn}}^4}{P_u\sum_{(l,m)\neq (j,n)}|\bm{g}^H_{u,jjn}\bm{g}_{u,jlm}|^2+\norm{\bm{g}_{u,jjn}}^2\sigma^2}\right)\right\},\\ \text{Downlink user:}{R}^{tdd,p}_{d,lk}&= \frac{1}{2} \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{\frac{P_d}{K_d\gamma_l}\norm{\bm{g}_{d,llk}}^4}{\sum_{(j,i)\neq (l,k)}\frac{P_d}{K_d\gamma_j}|\bm{g}^T_{d,jlk}\bm{g}^*_{d,jji}|^2+\sigma^2}\right)\right\}, \label{ARHDP} \end{aligned} \end{gather} where $\gamma_l=\frac{{M\sum_{k=1}^{K_d} \beta_{d,llk}}}{K_d}$, $n\in\mathcal{K}_u,~k\in\mathcal{K}_d$. When training sequences are used for channel estimation, within a coherence interval $T$, $K_u$ mutually orthogonal pilot sequences of length $\tau_u$ ($\tau_u\geq K_u$) are used for the uplink users and $K_d$ mutually orthogonal pilot sequences of length $\tau_d$ ($\tau_d\geq K_d$) are used for the downlink users. The same sets of training sequences are also reused by all cells. The corresponding up- and downlink ergodic achievable rates with MMSE estimation in TDD system are given below, \begin{gather} \begin{aligned} \text{Uplink user:}~ {R}^{tdd,ip}_{u,jn}&=\frac{1}{2} \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{P_u\norm{\hat{\bm{g}}_{u,jjn}}^4}{P_u|\hat{\bm{g}}_{u,jjn}^H\bm{\epsilon}_{u,jjn}|^2+P_u\sum_{(l,m)\neq (j,n)}|\hat{\bm{g}}^H_{u,jjn}\bm{g}_{u,jlm}|^2+N^\prime}\right)\right\},\\ \text{Downlink user:}~{R}^{tdd,ip}_{d,lk}&= \frac{1}{2} \mathbb{E}\left\{\mathrm{log}_2\left(1+\frac{\frac{P_d}{K_d\tilde{\gamma}_l}\left|\mathbb{E}\left[\bm{g}^T_{d,llk}\hat{\bm{g}}^*_{d,llk}\right]\right|^2}{Z^\prime+\sigma^2}\right)\right\},\label{ARHDIP} \end{aligned} \end{gather} where $N^\prime=\norm{\hat{\bm{g}}_{u,jjn}}^2\sigma^2$, $n\in\mathcal{K}_u,~k\in\mathcal{K}_d$, and $Z^\prime=\frac{P_d}{K_d\tilde{\gamma}_l}|\bm{g}^T_{d,llk}\hat{\bm{g}}^*_{d,llk}-\mathbb{E}[\bm{g}^T_{d,llk}\hat{\bm{g}}^*_{d,llk}]|^2+\sum_{(j,i)\neq (l,k)}\frac{P_d}{K_d\tilde{\gamma}_j}|\bm{g}^T_{d,jlk}{\bm{v}}_{ji}d_{j,i}|^2$. Note that the uplink and downlink ergodic achievable rates in the baseline TDD system follow~\cite{Ngo13} and \cite{Jose11} but without lower bounding the achievable rates, as we will use them to compute the full-duplex versus half-duplex rate ratios in the next section. \section{Large-Scale full-duplex System Performance} \label{asym} While the general ergodic achievable rates in the full-duplex system are given in the previous section, it is of interest to study the impact of large antenna arrays at BSs as the next generation of wireless systems will employ significantly more antennas at the infrastructure nodes~\cite{3gppMassiveMIMO}. In this section, we will investigate large-scale system performance as the number of full-duplex BS antennas, $M$, becomes arbitrarily large. \subsection{Leveraging large antenna arrays for multi-cell interference mitigation} In this section, we will show that using large BS antenna arrays can mitigate multi-cell interference in the full-duplex system. With increasing number of BS antennas, the signal strength will become stronger due to beamforming, and the transmit power can be scaled down proportionally to maintain the same quality-of-service. In what follows, we will present two theorems which characterize the asymptotic full-duplex spectral efficiency gain over TDD system under both perfect and imperfect CSI assumptions. \begin{theorem}[Asymptotic FD spectral efficiency gain with perfect CSI] \label{prop3} For perfect CSI, we scale the transmit power of each node proportional to $1/M$ as $P_u=E_u/M$ and $P_d=E_d/M$, where $E_u$ and $E_d$ are fixed. As $M\rightarrow\infty$, the full-duplex spectral efficiency gains over the TDD system in the uplink and downlink, denoted by $\mathsf{Gain}^p_{u}$ and $\mathsf{Gain}^p_{d}$, respectively, are given below, where fixed asymptotic up- and downlink rates are maintained. \begin{gather} \begin{aligned} \mathsf{Gain}^{p}_{u}&\triangleq\lim_{M\rightarrow\infty}\frac{\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}R^{fd,p}_{u,jn}}{\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}R_{u,jn}^{tdd,p}}=2,\\ \mathsf{Gain}^p_{d}&\triangleq\lim_{M\rightarrow\infty}\frac{\sum_{l=1}^L\sum_{k\in\mathcal{K}_d}R^{fd,p}_{d,lk}}{\sum_{l=1}^L\sum_{k\in\mathcal{K}_d}R_{d,lk}^{tdd,p}}=2. \end{aligned} \end{gather} The asymptotic ergodic achievable rate of the $n$-th uplink user in the $j$-th cell and the achievable rate of the $k$-th downlink user in the $l$-th cell are given below, \begin{gather} \begin{aligned} R^{fd,p}_{u,jn}&\rightarrow \mathrm{log}_2\left(1+\frac{\beta_{u,jjn}E_u}{\sigma^2}\right), ~n\in\mathcal{K}_u\\ R^{fd,p}_{d,lk}&\rightarrow \mathrm{log}_2\left(1+\frac{\beta^2_{d,llk}E_d}{\sum_{i\in\mathcal{K}_d}\beta_{d,lli}\sigma^2}\right), ~k\in\mathcal{K}_d. \end{aligned} \end{gather} \end{theorem} \begin{proof} For two mutually independent $M\times 1$ vectors $\boldsymbol{a}\triangleq [a_1,\cdots,a_M]^T$ and $\boldsymbol{b}\triangleq [b_1,\cdots,b_M]^T$ whose entries are i.i.d. zero-mean random variables with $\mathbb{E}(|a_i|^2=\sigma^2_a)$ and $\mathbb{E}(|b_i|^2=\sigma^2_b),~\forall i\in\{1,\cdots,M\}$, by law of large numbers, we have the following almost sure convergence according to~\cite{Cramer1970}, \begin{gather} \begin{aligned} \frac{1}{M}\bm{a}^H\bm{a}\xrightarrow[]{a.s.} \sigma^2_a,~\frac{1}{M}\bm{a}^H\bm{b}\xrightarrow[]{a.s.} 0,~\text{as}~M\rightarrow\infty.\label{lrn1} \end{aligned} \end{gather} Under the favorable propagation condition in \cite{marzettaNon10} where the fast fading channels are i.i.d. with zero mean and unit variance, from (\ref{lrn1}), in the limit of $M$, we have $\lim_{M\rightarrow\infty}\frac{\bm{G}_{u,jl}^H\bm{G}_{u,jl}}{M}=\bm{D}_{u,jl}\delta_{jl}$, $\lim_{M\rightarrow\infty}\frac{\bm{G}_{d,jl}^H\bm{G}_{d,jl}}{M}=\bm{D}_{d,jl}\delta_{jl}$, where $\bm{D}_{u,jl}$ is a $K_u\times K_u$ diagonal matrix, and each diagonal element is $(\bm{D}_{u,jl})_{n}=\beta_{u,jln}$; $\bm{D}_{d,jl}$ is a $K_d\times K_d$ diagonal matrix, and each diagonal element is $(\bm{D}_{d,jl})_{k}=\beta_{d,jlk}$; $\delta_{jl}=1$~for $j=l$, $\delta_{jl}=0$~for $j\neq l$. By substituting $P_u=E_u/M$ and $P_d=E_d/M$ into (\ref{ul:lb1}), (\ref{ARFDP}) and (\ref{ARHDP}), we can obtain the desired results as $M\rightarrow\infty$. \end{proof} \begin{remark} When a full-duplex BS employs a large antenna array, the transmit power of each node can possibly be scaled down proportionally to $1/M^{C}$ to achieve the same rate. As $M\rightarrow\infty$, $1/M$ is the fastest rate at which we can scale down the transmit power to maintain fixed asymptotic up- and downlink rates. Otherwise, if $C>1$, the rates will go to zero and if $C<1$, the rates will go to infinity. The full-duplex system preserves the same power scaling law as in the half-duplex system~\cite{Ngo13} despite increased interference in the multi-cell full-duplex networks. Full-duplex system asymptotically doubles the spectral efficiency over TDD system since all $K_u$ uplink streams and $K_d$ downlink streams can be supported in the same time-frequency slot. \end{remark} \begin{theorem}[Asymptotic FD spectral efficiency gain with imperfect CSI]\label{prop4} For imperfect CSI with MMSE estimation, we scale the power of each node for channel training and data transmission proportional to $1/\sqrt{M}$ as $P_{tr}=E_{tr}/{\sqrt{M}}$, $P_u=E_u/{\sqrt{M}}$ and $P_d={E_d}/{\sqrt{M}}$, where $E_{tr}$, $E_u$ and $E_d$ are fixed. Within a coherence interval $T$, let $\tau_u=K_u$, $\tau_d=K_d$ and $\tau=K_u+K_d-K_f$. As $M\rightarrow\infty$, the full-duplex spectral efficiency gains over the TDD system in the uplink and downlink, denoted by $\mathsf{Gain}^{ip}_{u}$ and $\mathsf{Gain}^{ip}_{d}$, respectively, are given below, where fixed asymptotic up- and downlink rates are maintained. \begin{gather} \begin{aligned} \mathsf{Gain}^{ip}_{u}&\triangleq\lim_{M\rightarrow\infty}\frac{\frac{T-\tau}{T}\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}R^{fd,ip}_{u,jn}}{\frac{T-\tau_u}{T}\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}R_{u,jn}^{tdd,ip}}=2\Big(1-\frac{K_h^d}{T-K_u}\Big),\\ \mathsf{Gain}^{ip}_{d}&\triangleq\lim_{M\rightarrow\infty}\frac{\frac{T-\tau}{T}\sum_{l=1}^L\sum_{k\in\mathcal{K}_d}R^{fd,ip}_{d,lk}}{\frac{T-\tau_d}{T}\sum_{l=1}^L\sum_{k\in\mathcal{K}_d}R_{d,lk}^{tdd,ip}}=2\Big(1-\frac{K_h^u}{T-K_d}\Big). \end{aligned} \end{gather} The asymptotic ergodic achievable rate of the $n$-th uplink user in the $j$-th cell and the achievable rate of the $k$-th downlink user in the $l$-th cell are given below, \begin{gather} \begin{aligned} R_{u,jn}^{fd,ip}&\rightarrow \mathrm{log}_2\left(1+\frac{E_{tr}E_u\beta^2_{u,jjn}}{E_{tr} E_u\sum_{l\neq j} \beta^2_{u,jln}+\sigma^4}\right),\\ R_{d,lk}^{fd,ip}&\rightarrow \mathrm{log}_2\left(1+\frac{E_{tr}E_d \beta^4_{d,llk}}{Z_l\left(\sum_{j\neq l} \frac{E_{tr}E_d\beta^2_{d,jjk}\beta^2_{d,jlk}}{Z_j}+\sigma^6\right)}\right), \end{aligned} \end{gather} where $Z_l=\sum_{i\in\mathcal{K}_d}\frac{\beta^2_{d,lli}}{\sigma^2},~n\in\mathcal{K}_u,~k\in\mathcal{K}_d$. \end{theorem} \begin{proof} When channel estimation overhead is taken into account, the up- and downlink spectral efficiency in the full-duplex system are $\frac{T-\tau}{T}\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}R^{ip}_{u,jn}$ and $\frac{T-\tau}{T}\sum_{l=1}^L\sum_{k\in\mathcal{K}_d}R^{ip}_{d,lk}$, respectively. While for the TDD system, since uplink and downlink transmission are in two different time slots, the corresponding up- and downlink spectral efficiency are $\frac{T-\tau_u}{T}\sum_{j=1}^L\sum_{n\in\mathcal{K}_u}R_{u,jn}^{tdd,ip}$ and $\frac{T-\tau_d}{T}\sum_{l=1}^L\sum_{k\in\mathcal{K}_d}R_{d,lk}^{tdd,ip}$, respectively. Following similar steps used in the proof of Theorem~\ref{prop3}, substituting $P_{tr}=E_{tr}/{\sqrt{M}}$, $P_u=E_u/{\sqrt{M}}$, $P_d={E_d}/{\sqrt{M}}$, $\tau_u=K_u$, $\tau_d=K_d$ and $\tau=K_u+K_d-K_f$ into (\ref{ulim:lb1}), (\ref{dlim:lb1}) and (\ref{ARHDIP}), and using the fact that $K_u=K_h^u+K_f$ and $K_d=K_h^d+K_f$, the desired results can be obtained as $M\rightarrow\infty$. \end{proof} \begin{corollary} When $K_u=K_d=K_f$, i.e., when only full-duplex users are served, full-duplex system asymptotically doubles the spectral efficiency over the TDD system under the imperfect CSI assumption, where $\mathsf{Gain}^{ip}_{u}=\mathsf{Gain}^{ip}_{d}=2$. However, if there exists half-duplex users~(i.e., $K_h^d>0$ or $K_h^u>0$), then $\mathsf{Gain}^{ip}_{u/d}<2$, and the spectral efficiency gains decrease as the number of half-duplex users increases due to channel training overhead. \end{corollary} \begin{remark} In case of imperfect CSI, the fastest rate at which we can cut down the transmit power to maintain fixed asymptotic up- and downlink rates is $1/\sqrt{M}$. As the transmit power scale down with increasing $M$, the impact of imperfect SI cancellation, intra-cell and inter-cell interference in the multi-cell MU-MIMO full-duplex networks will vanish as $M\rightarrow\infty$. \end{remark} \subsection{System with only full-duplex users} For tractability, we consider a homogeneous network by assuming all links in the same cell have the same channel statistic and all the cross-cell links have the same channel statistics, i.e., let $\beta_{u,lln}=\beta_{d,llk}=\beta_{I,lkln}=\beta_{b,ll}=1$, $\beta_{u,jln}=\beta_{d,jlk}=\beta_{I,lkjn}=\beta_{b,jl}=\beta$, where $\beta\in[0,1]$ for $j\neq l\in[1,\cdots,L],~n\in\mathcal{K}_u$, $k\in\mathcal{K}_d$, and the noise variance is set as $\sigma^2=1$. We consider a simple scenario where all users are full-duplex and the number of full-duplex users in each cell is $K_f\triangleq K$. Similar results can be derived in case of mixed half-duplex UEs or only half-duplex UEs. With such simplification, we can compute the up- and downlink spectral efficiency per cell (bits/s/Hz/cell) when CSI is perfect as \begin{gather} \begin{aligned} R^{fd,p}_{u}&=K\mathrm{log}_2\left(1+\frac{P_u(M-1)}{P_u(K-1)+(L-1)\beta(P_uK+P_d)+\kappa P_d+1}\right),\\ R^{fd,p}_{d}&=K\mathrm{log}_2\left(1+\frac{P_d(M-1)(M-2)}{P_d(K-1)(M-2)+MK(L-1)\beta P_d+V+MK(\kappa P_u+1)}\right), \label{homocsi} \end{aligned} \end{gather} where $V=MK\left(K-1+(L-1)K\beta\right)P_u$. When CSI is imperfect, the up- and downlink spectral efficiency per cell (bits/s/Hz/cell) are \begin{gather} \begin{aligned} R^{fd,ip}_{u}&\!=\frac{K(T-\tau)}{T}\mathrm{log}_2\left(\!1+\frac{P_{tr} P_u(M-1)}{P_{tr} P_u\left(K\bar{L}^2-1+\beta(\bar{L}-1)M\right)+J}\right),\\ R^{fd,ip}_{d}&\!=\frac{K(T-\tau)}{T}\mathrm{log}_2\left(\!1+\frac{P_{tr}P_dM}{\left(1+P_{tr}\bar{L}\right)U_1+\left(\bar{L}-1\right)U_2}\right),\label{homoerror} \end{aligned} \end{gather} where $J=P_d(1+P_{tr}\bar{L})(\bar{L}-1)+P_uK\bar{L}+P_{tr}(1+ \kappa P_d)\bar{L}+\kappa P_d+1$,\\ $U_1=P_d\left(1+(K-1)\bar{L}\right)+K\left(P_u(K-1)+P_u(\bar{L}-1)K+1+\kappa P_u\right), $\\ $U_2=P_{tr}P_d\left(M\beta+\bar{L}\right)+P_d,~\bar{L}=1+(L-1)\beta$. We first evaluate the tightness of our derived bounds on achievable rates in the homogenous networks. We consider a scenario with $L=7$ cells and the inter-cell interference level $\beta=0.3$, each cell has $K=5$ full-duplex UEs. The up- and downlink transmit power are assumed as $P_{tr}=P_u=10$~dB and $P_d=20$~dB, respectively. The dynamic range parameter is $\kappa=-50$~dB. In case of imperfect CSI, considering an OFDM system, we assume the coherence time is 1~ms (one subframe in LTE standard where there are 14 OFDM symbols in each subframe), and the ``frequency smoothness interval" is 14 as given in~\cite{marzettaNon10}. Hence the coherence interval which is a time-frequency product is equal to $T=196$. The pilot length is assumed to be the same as the number of users, i.e., $\tau=K$. From Figure~\ref{tight}, we can see that all bounds are very tight in both perfect and imperfect CSI cases, particularly with increasing $M$. Next, we use these bounds for the full-duplex system to compute the uplink and downlink spectral efficiency ratios between full-duplex system and half-duplex system. Note that for the half-duplex system, we still numerically evaluate the ergodic achievable rates with no simplification. \begin{figure} \centering \begin{subfigure}[b]{0.65\textwidth} \centering \includegraphics[width=0.72\textwidth,trim = 10mm 60mm 15mm 70mm, clip]{pic/TightnessGenieWoPS.pdf} \caption{With perfect CSI} \label{tight1} \end{subfigure}% ~ \hspace{-30mm} \begin{subfigure}[b]{0.65\textwidth} \centering \includegraphics[width=0.68\textwidth,trim = 20mm 60mm 15mm 70mm, clip]{pic/TightnessErrorWoPS} \caption{With imperfect CSI} \label{tight2} \end{subfigure} \caption{Comparisons between lower bounds in Proposition~\ref{prop1} and \ref{prop2} and numerically evaluated values of the ergodic achievable rates~(bits/s/Hz/cell) under both perfect and imperfect CSI assumptions, where $P_{tr}=P_u=10$~dB and $P_d=20$~dB.}\label{tight} \end{figure} We compute the spectral efficiency ratios between full-duplex and half-duplex by comparing the full-duplex rates given in (\ref{homocsi}) and (\ref{homoerror}) with the half-duplex achievable rates in (\ref{ARHDP}) and (\ref{ARHDIP}) which can be evaluated numerically. We consider the same setting as in Fig.~\ref{tight} under both perfect and imperfect CSI assumptions. In Figure~\ref{power1}, in the case of perfect CSI, we can see that as $M$ increases, the up- and downlink spectral efficiency gain between full-duplex system versus TDD system will converge to 2 as we scale down the transmit power according to Theorem~\ref{prop3}. The convergence rate is fast at the beginning, and becomes slower for large $M$. To reach the asymptotic $2\times$ gain, it will require remarkably large number of BS antennas. However, full-duplex spectral efficiency gains in both uplink and downlink are achievable for finite $M$. For example, when $M=64$, full-duplex achieves about 1.7$\times$ downlink gain and 1.3$\times$ uplink gain. We numerically show that even without scaling down the transmit power, similar full-duplex gains are achievable. Figure~\ref{power2} shows the full-duplex over half-duplex spectral efficiency gains in the case of imperfect CSI. We observe that even with channel estimation error and pilot contamination, full-duplex uplink and downlink gains exist for finite $M$ with and without scaling down the transmit power. \begin{figure} \centering \begin{subfigure}[b]{0.6\textwidth} \centering \includegraphics[width=0.72\textwidth,trim = 10mm 60mm 15mm 65mm, clip]{pic/GainGeniCombine_WoSC.pdf} \caption{With perfect CSI} \label{power1} \end{subfigure}% ~ \hspace{-25mm} \begin{subfigure}[b]{0.65\textwidth} \centering \includegraphics[width=0.7\textwidth,trim = 10mm 63mm 15mm 65mm, clip]{pic/GainErrorCombine_WoSC.pdf} \caption{With imperfect CSI} \label{power2} \end{subfigure} \caption{Spectral efficiency gains of using full-duplex for finite $M$ with and without power scaling.}\label{power scaling} \end{figure} We also investigate the spectral efficiency gain and antenna reduction tradeoff between full-duplex system and TDD system. The antenna reduction is the reduction of BS antennas due to full-duplex operation which can be characterized by the ratio between the number of BS antennas in TDD system~($M_{\rm{TDD}}$) and the number of BS antennas in FD system. The spectral efficiency gain and antenna reduction tradeoff is essentially the tradeoff between full-duplex multiplexing gain due to simultaneous transmission and reception and beamforming gain due to large $M$. In Fig.~\ref{ratio}, we consider the same setting as in Fig.~\ref{tight} under imperfect CSI assumption. We illustrate the spectral efficiency gain and antenna reduction tradeoff for both uplink and downlink with different $M_{\rm{TDD}}$ in the TDD system. Larger full-duplex antenna reduction can be achieved at the cost of reducing the spectral efficiency gain. In the regimes above the dashed arrows as shown in Fig.~\ref{ratio}, full-duplex system achieves both spectral efficiency gain and antenna reduction over TDD system. We can see that full-duplex system can require an order of magnitude fewer BS antennas compared with TDD to obtain the same performance in some cases. In addition, as $M_{\rm{TDD}}$ increases, full-duplex system can achieve higher spectral efficiency gain and antenna reduction. \begin{figure*}[t!] \centering \includegraphics[width=0.6\textwidth,trim = 3mm 60mm 0mm 65mm, clip]{pic/RateAntennaTradeOffError.pdf} \caption{Spectral efficiency gain and antenna reduction tradeoff for various numbers of BS antennas employed in the TDD system under imperfect CSI assumption.}\label{ratio} \end{figure*} \section{Numerical Results}\label{numerical} \subsection{A small cell scenario} Based on the state-of-art self-interference cancellation capability~\cite{ashu13}, the coverage of a full-duplex system is more likely to be within a small-cell communication ranges. Hence in this section, we present the numerical simulation in realistic small-cell network settings used in 3GPP~\cite{3gppdtdd} to evaluate the system performance. Twelve small cell BSs are uniformly and randomly distributed within a hexagonal region with a radius of $300$~meters All the small-cell BSs have full-duplex capability with multiple antennas. Each small-cell BS is associated with five single-antenna half-duplex uplink UEs and downlink UEs, respectively, which are uniformly and randomly dropped within a radius of 40 meters of the BS. The numerical results are shown for the case of imperfect CSI with channel estimation error. We consider an OFDM system and the coherence interval is $T=196$. The channel bandwidth is assumed as 20 MHz for both TDD and full-duplex systems. The large-scale fading models for BS-UE, BS-BS and UE-UE channels which include path loss and shadowing effect follow 3GPP model in~\cite{3gppdtdd}. The SI channel model is based on the existing experiment data~\cite{ashu13}, where the propagation loss of SI channel in a separate-antenna system includes path loss, isolation, cross-polarization and antenna directionality~\cite{evan13}, and in a shared-antenna system includes isolation using a circulator. We assume the SI channel has a propagation loss of $40$~dB. We run hundreds of random drops of BSs and UEs in the simulation, and parameter details are given in Tabel~\ref{simulation:table}. \begin{table} \centering \renewcommand{\arraystretch}{1.2} \scalebox{0.9}{ \begin{tabular}{|l|l|} \hline \textbf{Parameter}& \textbf{Value}\\ \hline Full-duplex BS power &$24$~dBm\\ \hline UE power &$23$~dBm\\ \hline BS antenna gain &$5$~dBi\\ \hline Number of BS antennas $M$ &\{$20, 50, 100, 300, 500$\}\\ \hline Thermal noise density &$-174$~dBm/Hz\\ \hline Noise Figure & BS: 9~dB; UE: $5$~dB \\ \hline Dynamic range $\kappa^{-1}$ & \{$50, 60, 70,80$\}~dB \\ \hline Minimum distance constraints &BS-BS: $40$~m; BS-UE: $10$~m; UE-UE: $3$~m \\ \hline Shadowing standard deviation & BS-UE: $10$~dB; BS-BS: $12$~dB; UE-UE: $6$~dB \\ \hline Pathloss models for BS-UE, UE-UE,& Refer to~\cite{3gppdtdd} \\ and BS-BS channels&\\ \hline Fast fading channels & i.i.d.~$\mathcal{CN}(0,1)$\\ \hline Propagation loss of self-interference channels&$40$~dB~\cite{ashu13}\\ \hline \end{tabular}} \vspace{-1mm} \caption{Simulation parameters} \label{simulation:table} \end{table} The average full-duplex spectral efficiency gain is illustrated in Fig.~\ref{simulation:results1} with varying numbers of BS antennas, where the dynamic range parameter $\kappa$ is $-60$~dB. We verify that the full-duplex gains in realistic network scenarios exist for a range of finite number of BS antennas and the gains will scale with BS antennas. Fig~\ref{results1} depicts the average spectral efficiency gain of the full-duplex system for different dynamic range parameters~$\kappa$ when $M=100$, which demonstrates the impact of imperfect SI cancellation. Since all users are half-duplex, the downlink gains are not affected by $\kappa$. However, since all the BSs are full-duplex, the uplink gains are severely affected by the dynamic range values especially when the dynamic range value is low. We can see that larger dynamic range $\kappa^{-1}$, (i.e., smaller $\kappa$) will result in less residual SI, thus increasing the uplink gain. Once the dynamic range $\kappa^{-1}$ exceeds certain threshold, there is not much impact of the residual SI on the uplink performance. \begin{figure*}[t!] \centering \includegraphics[width=0.5\textwidth,trim = 15mm 65mm 20mm 65mm,clip]{pic/RealGainVsMUETX23} \caption{Average full-duplex spectral efficiency gain with BS antenna arrays when $L=12$ and $\kappa=-60$. } \label{simulation:results1} \end{figure*} \begin{figure*}[t!] \centering \includegraphics[width=0.48\textwidth,trim = 15mm 65mm 20mm 65mm,clip]{pic/RealGainVsKappaUETX23} \caption{Average full-duplex spectral efficiency gain with different dynamic ranges when $M=100$ and $L=12$. } \label{results1} \end{figure*} \section{Conclusion}\label{conclusion} In this paper, we have investigated the multi-cell MU-MIMO full-duplex networks where single-antenna full-duplex and half-duplex UEs are served by the full-duplex BSs with multiple antennas. Using low complexity linear receivers and precoders, the ergodic achievable rates of uplink and downlink are characterized for the full-duplex system. Several practical constraints are modeled in the analysis such as imperfect full-duplex radio chains, channel estimation error, pilot overhead and pilot contamination. The large scale system performance is analyzed when each BS has a large antenna array. When the number of BS antennas grows infinitely large, the 2$\times$ asymptotic full-duplex spectral efficiency gain can be achieved over the TDD system with perfect CSI. When channel estimation error and channel training overhead are considered, the 2$\times$ asymptotic full-duplex spectral efficiency gain is achieved when serving only full-duplex UEs. Furthermore, we show by numerical simulation that full-duplex system can achieve both spectral efficiency gain and antenna reduction as the full-duplex system can require one order of magnitude fewer antennas than TDD to achieve the same or better performance in certain cases.
{'timestamp': '2016-06-17T02:04:15', 'yymm': '1606', 'arxiv_id': '1606.05025', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05025'}
arxiv
\section{Introduction}\label{sec:intro} First-order factoid question answering (QA) assumes that the question can be answered by a single fact in a knowledge base (KB). For example, ``How old is Tom Hanks'' is about the [age] of [Tom Hanks]. Also referred to as \emph{simple} questions by Bordes et al.~\shortcite{Bordes:2015aa}, recent attempts that apply either complex linguistic reasoning or attention-based complex neural network architectures achieve up to 76\% accuracy on benchmark sets~\cite{Golub:2016aa,Yin:2016aa}. While it is tempting to study QA systems that can handle more complicated questions, it is hard to reach reasonably high precision for unrestricted questions. For more than a decade, successful industry applications of QA have focused on first-order questions. This bears the question:\ are users even interested in asking questions beyond first-order (or are these use cases more suitable for interactive dialogue)? Based on voice logs from a major entertainment platform with millions of users every day, Comcast X1, we find that most existing use cases of QA fall into the first-order category. Our strategy is to tailor our approach to first-order QA by making strong assumptions about the problem structure. In particular, we assume that the answer to a first-order question is a \emph{single} property of a \emph{single} entity in the KB, and decompose the task into two subproblems:\ (a) detecting entities in the question and (b) classifying the question as one of the relation types in the KB. We simply train a vanilla recurrent neural network (RNN) to solve each subproblem~\cite{Elman:1990aa}. Despite its simplicity, our approach (RNN-QA) achieves the highest reported accuracy on the SimpleQuestions dataset. While recent literature has focused on building more complex neural network architectures with attention mechanisms, attempting to generalize to broader QA, we enforce stricter assumptions on the problem structure, thereby reducing complexity. This also means that our solution is efficient, another critical requirement for real-time QA applications. In fact, we present a performance analysis of RNN-QA on Comcast's X1 entertainment system, used by millions of customers every day. \section{Related work} If knowledge is presented in a structured form (e.g., knowledge base (KB)), the standard approach to QA is to transform the question and knowledge into a compatible form, and perform reasoning to determine which fact in the KB answers a given question. Examples of this approach include pattern-based question analyzers~\cite{Buscaldi:2010aa}, combination of syntactic parsing and semantic role labeling~\cite{Bilotti:2007aa,Bilotti:2010aa}, as well as lambda calculus~\cite{Berant:2013aa} and combinatory categorical grammars (CCG)~\cite{Reddy:2014aa}. A downside of these approaches is the reliance on linguistic resources/heuristics, making them language- and/or domain-specific. Even though Reddy et al.~\shortcite{Reddy:2014aa} claim that their approach requires less supervision than prior work, it still relies on many English-specific heuristics and hand-crafted features. Also, their most accurate model uses a corpus of paraphrases to generalize to linguistic diversity. Linguistic parsers can also be too slow for real-time applications. In contrast, an RNN can detect entities in the question with high accuracy and low latency. The only required resources are word embeddings and a set of questions with entity words tagged. The former can be easily trained for any language/domain in an unsupervised fashion, given a large text corpus without annotations~\cite{Mikolov:2013aa,Pennington:2014aa}. The latter is a relatively simple annotation task that exists for many languages and domains, and it can also be synthetically generated. Many researchers have explored similar techniques for general NLP tasks~\cite{Collobert:2011aa}, such as named entity recognition~\cite{Lu:2015aa,Hammerton:2003aa}, sequence labeling~\cite{Graves:2008aa,Chung:2014aa}, part-of-speech tagging~\cite{Huang:2015aa,Wang:2015aa}, chunking~\cite{Huang:2015aa}. Deep learning techniques have been studied extensively for constructing parallel neural networks for modeling a joint probability distribution for question-answer pairs~\cite{Hsu:2016aa,Yang:2014aa,He:2015aa,Mueller:2016aa} and re-ranking answers output by a retrieval engine~\cite{Rao:2016aa,Yang:2016aa}. These more complex approaches might be needed for general-purpose QA and sentence similarity, where one cannot make assumptions about the structure of the input or knowledge. However, as noted in Section~\ref{sec:intro}, first-order factoid questions can be represented by an entity and a relation type, and the answer is usually stored in a structured knowledge base. Dong et al.~\shortcite{Dong:2015ab} similarly assume that the answer to a question is at most two hops away from the target entity. However, they do not propose how to obtain the target entity, since it is provided as part of their dataset. Bordes et al.~\shortcite{Bordes:2014aa} take advantage of the KB structure by projecting entities, relations, and subgraphs into the same latent space. In addition to finding the target entity, the other key information to first-order QA is the relation type corresponding to the question. Many researchers have shown that classifying the question into one of the pre-defined types (e.g., based on patterns~\cite{Zhang:2003aa} or support vector machines~\cite{Buscaldi:2010aa}) improves QA accuracy. \section{Approach}\label{sec:approach} \smallskip \noindent {\bf (a) From Question to Structured Query.} Our approach relies on a \emph{knowledge base}, containing a large set of \emph{facts}, each one representing a binary [subject,~relation,~object] relationship. Since we assume \emph{first-order questions}, the answer can be retrieved from a single fact. For instance, ``How old is Sarah Michelle Gellar?'' can be answered by the fact: \vspace{-0.15cm} \begin{flushleft} {\footnotesize \verb|[Sarah Michelle Gellar,bornOn,4/14/1977] | \vspace{0.3cm} } \end{flushleft} The main idea is to dissect a first-order factoid natural-language question by converting it into a structured query: \{\textrm{entity ``Sarah Michelle Gellar'', relation}: \verb|bornOn|\}. The process can be modularized into two machine learning problems, namely \emph{\textbf{entity detection}} and \emph{\textbf{relation prediction}}. In the former, the objective is to \emph{tag} each question word as either entity or not. In the latter, the objective is to \emph{classify} the question into one of the $K$ relation types. We modeled both using an RNN. We use a standard RNN architecture:\ Each word in the question passes through an embedding lookup layer $E$, projecting the one-hot vector into a $d$-dimensional vector $x_t$. A recurrent layer combines this \emph{input representation} with the hidden layer representation from the \emph{previous word} and applies a non-linear transformation to compute the hidden layer representation for the \emph{current word}. The hidden representation of the final recurrent layer is projected to the output space of $k$ dimensions and normalized into a probability distribution via soft-max. \ignore{ \begin{eqnarray} \ignore{\nonumber x_t=E_{x_t} & \textrm{word repr. at $t$} \\} \nonumber h_t=\textrm{ReLu}(W h_{t-1}+U x_t) & \textrm{hidden repr. at $t$}\\ \nonumber o_t=\textrm{softmax}(V h_t) & \textrm{output at $t$} \nonumber \\ \nonumber E=|\textrm{vocab size}| \times d & \textrm{ embedding}\\ \nonumber W=m\times m & \textrm{transition weights}\\ \nonumber U=m\times d & \textrm{input weights}\\ \nonumber V=k\times d & \textrm{output weights} \end{eqnarray} } In \emph{relation prediction}, the question is classified into one of the 1837 classes (i.e., relation types in Freebase). In the \emph{entity detection} task, each word is classified as either \emph{entity} or \emph{context} (i.e., $k=2$). Given a new question, we run the two RNN models to construct the structured query. Once every question word is classified as entity (denoted by \texttt{E}) or context (denoted by \texttt{C}), we can extract entity phrase(s) by grouping consecutive entity words. For example, for question ``How old is Michelle Gellar'', the output of entity detection is [\texttt{C C C E E}], from which we can extract a single entity ``Michelle Gellar''. The output of relation prediction is \texttt{bornOn}. The inferred structured query $q$ becomes the following: \noindent $\{\textrm{\emph{entityText}: } \textrm{``michelle gellar''},\textrm{\emph{relation}: } \texttt{bornOn}\}$ \smallskip \noindent {\bf (b) Entity Linking.} The textual reference to the entity (entityText in $q$) needs to be linked to an actual entity node in our KB. In order to achieve that, we build an \emph{inverted index} $I_{\textrm{entity}}$ that maps all $n$-grams of an entity ($n\in \{1,2,3\}$) to the entity's alias text (e.g., name or title), each with an associated $TF$-$IDF$ score. We also map the exact text ($n=\infty$) to be able to prioritize exact matches. Following our running example, let us demonstrate how we construct $I_{\textrm{entity}}$. Let us assume there is a node $e_i$ in our KB that refers to the actress ``Sarah Michelle Gellar''. The alias of this entity node is the name, which has three unigrams (``sarah'', ``michelle'', ``gellar''), two bigrams (``sarah michelle'', ``michelle gellar'') and a single trigram (i.e., the entire name). Each one of these $n$-grams gets indexed in $I_{\textrm{entity}}$ with $TF$-$IDF$ weights. Here is how the weights would be computed for unigram ``sarah'' and bigram ``michelle gellar'' ($\Rightarrow$ denotes mapping): \begin{align*} &I_{\textrm{entity}}(\textrm{``sarah''}) \Rightarrow \{ \textrm{node}: e_i, \\ & \textrm{score}: TF\textrm{-}IDF(\textrm{``sarah''}, \textrm{``sarah michelle gellar''})\} \\ &I_{\textrm{entity}}(\textrm{``michelle gellar''}) \Rightarrow \{ \textrm{node}: e_i, \\ &\textrm{score}: TF\textrm{-}IDF(\textrm{``michelle gellar''}, \\ & \; \;\; \;\; \;\; \;\; \;\; \;\; \;\; \;\; \;\; \;\; \;\; \;\; \;\textrm{``sarah michelle gellar''})\} \end{align*} This is performed for every $n$-gram ($n\in \{1,2,3,\infty\}$) of every entity node in the KB. Assuming there is an entity node, say $e_j$, for the actress ``Sarah Jessica Parker'', we would end up creating a second mapping from unigram ``sarah'': \begin{align*} &I_{\textrm{entity}}(\textrm{``sarah''}) \Rightarrow \{ \textrm{node}: e_j,\\ & \textrm{score}: TF\textrm{-}IDF(\textrm{``sarah''}, \textrm{``sarah jessica parker''})\} \end{align*} In other words, ``sarah'' would be linked to both $e_i$ and $e_j$, with corresponding $TF$-$IDF$ weights. Once the index $I_{\textrm{entity}}$ is built, we can link \emph{entityText} from the structured query (e.g., ``michelle gellar'') to the intended entity in the KB (e.g., $e_i$). Starting with $n=\infty$, we iterate over $n$-grams of \emph{entityText} and query $I_{\textrm{entity}}$, which returns all matching entities in the KB with associated $TF$-$IDF$ relevance scores. For each $n$-gram, retrieved entities are appended to the candidate set $C$. We continue this process with decreasing value of $n$ (i.e., $n\in\{\infty,3,2,1\}$) Early termination happens if $C$ is non-empty and $n$ is less than or equal to the number of tokens in \emph{entityText}. The latter criterion is to avoid cases where we find an exact match but there are also partial matches that might be more relevant:\ For ``jurassic park'', for $n=\infty$, we get an exact match to the original movie ``Jurassic Park''. But we would also like to retrieve ``Jurassic Park II'' as a candidate entity, which is only possible if we keep processing until $n=2$. \smallskip \noindent {\bf (c) Answer Selection.} Once we have a list of candidate entities $C$, we use each candidate node $e_{\textrm{cand}}$ as a starting point to reach candidate answers. A \emph{graph reachability index} $I_{\textrm{reach}}$ is built for mapping each entity node $e$ to all nodes $e'$ that are reachable, with the associated path $p(e,e')$. For the purpose of the current approach, we limit our search to a single hop away, but this index can be easily expanded to support a wider search. \begin{align*} &I_{reach}(e_i) \Rightarrow\\ &\{\textrm{node:} e_{i_1}, \textrm{text:} \textrm{The Grudge}, \textrm{path:} [\texttt{actedIn}]\} \\ &\{\textrm{node:} e_{i_2}, \textrm{text:} \textrm{4/14/1977}, \textrm{path:} [\texttt{bornOn}]\} \\ &\{\textrm{node:} e_{i_3}, \textrm{text:} \textrm{F. Prinze}, \textrm{path:} [\texttt{marriedTo}]\} \end{align*} We use $I_{\textrm{reach}}$ to retrieve all nodes $e^\prime$ that are reachable from $e_{\textrm{cand}}$, where the path from is consistent with the predicted relation $r$ (i.e., $r\in p(e_{\textrm{cand}},e^\prime$)). These are added to the candidate answer set $A$. For example, in the example above, node $e_{i_2}$ would have been added to the answer set $A$, since the path [\texttt{bornOn}] matches the predicted relation in the structured query. After repeating this process for each entity in $C$, the highest-scored node in $A$ is our best answer to the question. \section{Experimental Setup}\label{sec:eval} \smallskip \noindent {\bf Data.} Evaluation of RNN-QA was carried out on SimpleQuestions, which uses a subset of Freebase containing 17.8M million facts, 4M unique entities, and 7523 relation types. Indexes $I_\textrm{entity}$ and $I_\textrm{reach}$ are built based on this knowledge base. SimpleQuestions was built by \cite{Bordes:2014aa} to serve as a larger and more diverse factoid QA dataset.\footnote{75910/10845/21687 question-answer pairs for training/validation/test is an order of magnitude larger than comparable datasets. Vocabulary size is 55K as opposed to around 3K for WebQuestions~\cite{Berant:2013aa}.} Freebase facts are sampled in a way to ensure a diverse set of questions, then given to human annotators to create questions from, and get labeled with corresponding entity and relation type. There are a total of 1837 unique relation types that appear in SimpleQuestions. \ignore{ For both datasets, even after the process above, there was a small subset for which we could not identify either an associated relation, or the correct entity. These were removed from the test set, since we cannot evaluate our approach. There is no reason to believe these questions were more difficult than others, so we assume that our accuracy would have been same on the removed portion, and compare against published results accordingly. But even if we assume all of them to be answered incorrectly, our conclusions would not change. } \smallskip \noindent {\bf Training.} We fixed the embedding layer based on the pre-trained 300-dimensional Google News embedding,\footnote{\url{word2vec.googlecode.com}} since the data size is too small for training embeddings. Out-of-vocabulary words were assigned to a random vector (sampled from uniform distribution). Parameters were learned via stochastic gradient descent, using categorical cross-entropy as objective. In order to handle variable-length input, we limit the input to $N$ tokens and prepend a special pad word if input has fewer.\footnote{Input length ($N$) was set to 36, the maximum number of tokens across training and validation splits. } We tried a variety of configurations for the RNN:\ four choices for the type of RNN layer (GRU or LSTM, bidirectional or not); depth from 1 to 3; and drop-out ratio from 0 to 0.5, yielding a total of 48 possible configurations. For each possible setting, we trained the model on the training portion and used the validation portion to avoid over-fitting. After running all 48 experiments, the most optimal setting was selected by micro-averaged F-score of predicted entities (entity detection) or accuracy (relation prediction) on the validation set. We concluded that the optimal model is a 2-layer bidirectional LSTM (BiLSTM2) for entity detection and BiGRU2 for relation prediction. Drop-out was 10\% in both cases. \section{Results}\label{sec:results} \smallskip \noindent {\bf End-to-End QA.} For evaluation, we apply the relation prediction and entity detection models on each test question, yielding a structured query $q=\{entityText\textrm{: }t_e, relation\textrm{: }r\}$ (Section~\ref{sec:approach}a). Entity linking gives us a list of candidate entity nodes (Section~\ref{sec:approach}b). For each candidate entity $e_{\textrm{cand}}$, we can limit our relation choices to the set of unique relation types that some candidate entity $e_{\textrm{cand}}$ is associated with. This helps eliminate the artificial ambiguity due to overlapping relation types as well as the spurious ambiguity due to redundancies in a typical knowledge base. Even though there are 1837 relation types in Freebase, the number of relation types that we need to consider per question (on average) drops to 36. The highest-scored answer node is selected by finding the highest scored entity node $e$ that has an outward edge of type $r$ (Section~\ref{sec:approach}c). We follow Bordes et al.~\shortcite{Bordes:2015aa} in comparing the predicted entity-relation pair to the ground truth. A question is counted as correct if and only if the entity we select (i.e., $e$) and the relation we predict (i.e, $r$) match the ground truth. Table~\ref{tab:end2end} summarizes end-to-end experimental results. We use the best models based on validation set accuracy and compare it to three prior approaches:\ a specialized network architecture that explicitly memorizes facts~\cite{Bordes:2015aa}, a network that learns how to convolve sequence of characters in the question~\cite{Golub:2016aa}, and a complex network with attention mechanisms to learn most important parts of the question~\cite{Yin:2016aa}. Our approach outperforms the state of the art in accuracy (i.e., precision at top 1) by 11.9 points (15.6\% relative). \begin{table}[hbt] \centering \begin{tabular}{|c|c|c|} \hline \textbf{Model} & \textbf{P@1} \\ \hline Memory Network~\shortcite{Bordes:2015aa} & 63.9 \\ \hline Char-level CNN~\shortcite{Golub:2016aa} & 70.9 \\ \hline Attentive max-pooling~\shortcite{Yin:2016aa} & 76.4 \\ \hline\hline RNN-QA (best models) & \textbf{88.3} \\ \hline\hline naive ED & 58.9 \\ \hline naive RP & 4.1 \\ \hline naive ED and RP & 3.7 \\ \hline \end{tabular} \caption{Top-1 accuracy on test portion of SimpleQuestions. Ablation study on last three rows. } \label{tab:end2end} \end{table} Last three rows quantify the impact of each component via an \emph{\textbf{ablation study}}, in which we replace either entity detection (ED) or relation prediction (RP) models with a naive baseline:\ (i) we assign the relation that appears most frequently in training data (i.e., {\small {\tt bornOn}}), and/or (ii) we tag the entire question as an entity (and then perform the $n$-gram entity linking). Results confirm that RP is absolutely critical, since both datasets include a diverse and well-balanced set of relation types. When we applied the naive ED baseline, our results drop significantly, but they are still comparable to prior results. Given that most prior work do not use the network to detect entities, we can deduce that our RNN-based entity detection is the reason our approach performs so well. \noindent {\bf Error Analysis.} In order to better understand the weaknesses of our approach, we performed a \emph{blame analysis}:\ Among 2537 errors in the test set, 15\% can be blamed on entity detection --- the relation type was correctly predicted, but the detected entity did not match the ground truth. The reverse is true for 48\% cases.\footnote{In remaining 37\% incorrect answers, both models fail, so the blame is shared.} We manually labeled a sample of 50 instances from each blame scenario. When entity detection is to blame, 20\% was due to spelling inconsistencies between question and KB, which can be resolved with better text normalization during indexing (e.g., ``la kings'' refers to ``Los Angeles Kings''). We found 16\% of the detected entities to be correct, even though it was not the same as the ground truth (e.g., either ``New York'' or ``New York City'' is correct in ``what can do in new york?''); 18\% are inherently ambiguous and need clarification (e.g., ``where bin laden got killed?'' might mean ``Osama'' or ``Salem''). When blame is on relation prediction, we found that the predicted relation is reasonable (albeit different than ground truth) 29\% of the time (e.g., ``what was nikola tesla known for'' can be classified as {\small {\tt profession}} or {\small {\tt notable\_for}}). \vspace{0.2cm} \noindent {\bf RNN-QA in Practice.} In addition to matching the state of the art in effectiveness, we also claimed that our simple architecture provides an efficient and modular solution. We demonstrate this by applying our model (without any modifications) to the entertainment domain and deploying it to the Comcast X1 platform serving millions of customers every day. Training data was generated synthetically based on an internal entertainment KB. For evaluation, 295 unique question-answer pairs were randomly sampled from real usage logs of the platform. We can draw two important conclusions from Table~\ref{tab:realworld}:\ First of all, we find that almost all of the user-generated natural-language questions (278/295$\sim$95\%) are first-order questions, supporting the significance of first-order QA as a task. Second, we show that even if we simply use an open-sourced deep learning toolkit (\url{keras.io}) for implementation and limit the computational resources to 2 CPU cores per thread, RNN-QA answers 75\% of questions correctly with very reasonable latency. \begin{table}[hbt] \centering \begin{tabular}{c|c|} \textbf{Error} & \textbf{Count} \\ \hline Correct & 220 \\ \hline Incorrect entity & 16 \\ \hline Incorrect relation & 42 \\ \hline Not first-order question & 17 \\ \hline\hline Total Latency & 76$\pm$16 ms \end{tabular} \caption{Evaluation of RNN-QA on real questions from X platform.} \label{tab:realworld} \end{table} \section{Conclusions and Future work} We described a simple yet effective approach for QA, focusing primarily on first-order factual questions. Although we understand the benefit of exploring task-agnostic approaches that aim to capture semantics in a more general way (e.g., \cite{Kumar:2015aa}), it is also important to acknowledge that there is no ``one-size-fits-all'' solution as of yet. One of the main novelties of our work is to decompose the task into two subproblems, entity detection and relation prediction, and provide solutions for each in the form of a RNN. In both cases, we have found that bidirectional networks are beneficial, and that two layers are sufficiently deep to balance the model's ability to fit versus its ability to generalize. While an ablation study revealed the importance of both entity detection and relation prediction, we are hoping to further study the degree of which improvements in either component affect QA accuracy. Drop-out was tuned to 10\% based on validation accuracy. While we have not implemented attention directly on our model, we can compare our results side by side on the same benchmark task against prior work with complex attention mechanisms (e.g., \cite{Yin:2016aa}). Given the proven strength of attention mechanisms, we were surprised to find our simple approach to be clearly superior on SimpleQuestions. Even though deep learning has opened the potential for more generic solutions, we believe that taking advantage of problem structure yields a more accurate and efficient solution. While first-order QA might seem like a solved problem, there is clearly still room for improvement. By revealing that 95\% of real use cases fit into this paradigm, we hope to convince the reader that this is a valuable problem that requires more \emph{attention}. \ignore{ Our main assumption is that first-order QA can be reduced to two machine learning tasks:\ tagging and classification. We then apply the power of deep learning (through recurrent neural networks) to learn an effective model for these two tasks, namely \emph{entity detection} and \emph{relation prediction}. Experimental results indicate impressive improvements over the state of the art on two commonly-used QA benchmark datasets. The fact that our simple approach significantly outperforms more sophisticated ones can be explained by two observations. Recurrent neural networks, paired with a well-trained word embedding naturally models the word dependencies and lexical varieties without any extra effort. For first-order QA, the answer can be extracted by two pieces of information (i.e., entity and relation type), therefore building a model specifically for this purpose allows us to excel at this very task. However, we would need to non-trivially augment our approach to support other types of questions (e.g., ``What movie did both Tom Hanks and Meg Ryan appear in?''). In other words, customizing and fine-tuning models with respect to a specific task helps --- while it is important to explore more task-agnostic approaches (e.g., \cite{Kumar:2015aa}), it is important to acknowledge that machine learning has not yet matured enough to provide such solutions for natural language processing problems. } \bibliographystyle{emnlp_natbib}
{'timestamp': '2017-07-31T02:09:00', 'yymm': '1606', 'arxiv_id': '1606.05029', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05029'}
arxiv
\section{Introduction} \label{s:intro} Suppose we are given the convolution of two signals, $\boldsymbol{y} = \boldsymbol{f}\ast \boldsymbol{g}$. When, under which conditions, and how can we reconstruct $\boldsymbol{f}$ and $\boldsymbol{g}$ from the knowledge of $\boldsymbol{y}$ if both $\boldsymbol{f}$ {\em and} $\boldsymbol{g}$ are unknown? This challenging problem, commonly referred to as {\em blind deconvolution} problem, arises in many areas of science and technology, including astronomy, medical imaging, optics, and communications engineering, see e.g.~\cite{jefferies1993restoration,Tong95,chan1998total,wang1998blind,campisi2007blind,LWD11,CVR14,WBSJ14}. Indeed, the quest for finding a fast and reliable algorithm for blind deconvolution has confounded researchers for many decades. It is clear that without any additional assumptions, the blind deconvolution problem is ill-posed. One common and useful assumption is to stipulate that $\boldsymbol{f}$ and $\boldsymbol{g}$ belong to known subspaces~\cite{RR12,LLB15BIP,LLJB15,LS15}. This assumption is reasonable in various applications, provides flexibility and at the same time lends itself to mathematical rigor. We also adopt this subspace assumption in our algorithmic framework (see Section~\ref{s:prelim} for details). But even with this assumption, blind deconvolution is a very difficult non-convex optimization problem that suffers from an overabundance of local minima, making its numerical solution rather challenging. In this paper, we present a numerically efficient blind deconvolution algorithm that converges geometrically to the optimal solution. Our regularized gradient descent algorithm comes with rigorous mathematical convergence guarantees. The number of measurements required for the algorithm to succeed is only slightly larger than the information theoretic minimum. Moreover, our algorithm is also robust against noise. To the best of our knowledge, the proposed algorithm is the first blind deconvolution algorithm that is numerically efficient, robust against noise, and comes with rigorous recovery guarantees under certain subspace conditions. \subsection{State of the art} Since blind deconvolution problems are ubiquitous in science and engineering, it is not surprising that there is extensive literature on this topic. It is beyond the scope of this paper to review the existing literature; instead we briefly discuss those results that are closest to our approach. We gladly acknowledge that those papers that are closest to ours, namely~\cite{RR12,CLS14,KMO09IT,SL15}, are also the ones that greatly influenced our research in this project. In the inspiring article~\cite{RR12}, Ahmed, Recht, and Romberg develop a convex optimization framework for blind deconvolution. The formal setup of our blind deconvolution problem follows essentially their setting. Using the meanwhile well-known lifting trick,~\cite{RR12} transforms the blind deconvolution problem into the problem of recovering a rank-one matrix from an underdetermined system of linear equations. By replacing the rank condition by a nuclear norm condition, the computationally infeasible rank minimization problem turns into a convenient convex problem. The authors provide explicit conditions under which the resulting semidefinite program is guaranteed to have the same solution as the original problem. In fact, the number of required measurements is not too far from the theoretical minimum. The only drawback of this otherwise very appealing convex optimization approach is that the computational complexity of solving the semidefinite program is rather high for large-scale data and/or for applications where computation time is of the essence. Overcoming this drawback was one of the main motivations for our paper. While~\cite{RR12} does suggest a fast matrix-factorization based algorithm to solve the semidefinite program, the convergence of this algorithm to the optimal solution is not established in that paper. The theoretical number of measurements required in~\cite{RR12} for the semidefinite program to succeed is essentially comparable to that for our non-convex algorithm to succeed. The advantage of the proposed non-convex algorithm is of course that it is dramatically faster. Furthermore, numerical simulations indicate that the empirically observed number of measurements for our non-convex approach is actually smaller than for the convex approach. The philosophy underlying the method presented in our paper is strongly motivated by the non-convex optimization algorithm for phase retrieval proposed in~\cite{CLS14}, see also~\cite{CC15,CLM15}. In the pioneering paper~\cite{CLS14} the authors use a two-step approach: (i) Construct in a numerically efficient manner a good initial guess; (ii) Based on this initial guess, show that simple gradient descent will converge to the true solution. Our paper follows a similar two-step scheme. At first glance one would assume that many of the proof techniques from~\cite{CLS14} should carry over to the blind deconvolution problem. Alas, we quickly found out that despite some general similarities between the two problems, phase retrieval and blind deconvolution are indeed surprisingly different. At the end, we mainly adopted some of the general ``proof principles'' from~\cite{CLS14} (for instance we also have a notion of local regularity condition - although it deviates significantly from the one in~\cite{CLS14}), but the actual proofs are quite different. For instance, in~\cite{CLS14} and~\cite{CC15} convergence of the gradient descent algorithm is shown by directly proving that the distance between the true solution and the iterates decreases. The key conditions (a local regularity condition and a local smoothness condition) are tailored to this aim. For the blind deconvolution problem we needed to go a different route. We first show that the objective function decreases during the iterations and then use a certain local restricted isometry property to transfer this decrease to the iterates to establish convergence to the solution. We also gladly acknowledge being influenced by the papers~\cite{KMO09IT,KMO09noise} by Montanari and coauthors on matrix completion via non-convex methods. While the setup and analyzed problems are quite different from ours, their approach informed our strategy in various ways. In~\cite{KMO09IT,KMO09noise}, the authors propose an algorithm which comprises a two-step procedure. First, an initial guess is computed via a spectral method, and then a nonconvex problem is formulated and solved via an iterative method. The authors prove convergence to a low-rank solution, but do not establish a rate of convergence. As mentioned before, we also employ a two-step strategy. Moreover, our approach to prove stability of the proposed algorithm draws from ideas in~\cite{KMO09noise}. We also benefitted tremendously from~\cite{SL15}. In that paper, Sun and Luo devise a non-convex algorithm for low-rank matrix completion and provide theoretical guarantees for convergence to the correct solution. We got the idea of adding a penalty term to the objective function from~\cite{SL15} (as well as from~\cite{KMO09IT}). Indeed, the particular structure of our penalty term closely resembles that in~\cite{SL15}. In addition, the introduction of the various neighborhood regions around the true solution, that are used to eventually characterize a ``basin of attraction'', stems from~\cite{SL15}. These correspondences may not be too surprising, given the connections between low-rank matrix completion and blind deconvolution. Yet, like also discussed in the previous paragraph, despite some obvious similarities between the two problems, it turned out that many steps and tools in our proofs differ significantly from those in~\cite{SL15}. Also this should not come as a surprise, since the measurement matrices and setup differ significantly\footnote{Anyone who has experience in the proofs behind compressive sensing and matrix completion is well aware of the substantial challenges one can already face by ``simply'' changing the sensing matrix from, say, a Gaussian random matrix to one with less randomness.}. Moreover, unlike~\cite{SL15}, our paper also provides robustness guarantees for the case of noisy data. Indeed, it seems plausible that some of our techniques to establish robustness against noise are applicable to the analysis of various recent matrix completion algorithms, such as e.g.~\cite{SL15}. We briefly discuss other interesting papers that are to some extent related to our work. ~\cite{LLJB15} proposes a projected gradient descent algorithm based on matrix factorizations and provide a convergence analysis to recover sparse signals from subsampled convolution. However, this projection step can be hard to implement, which does impact the efficiency and practical use of this method. As suggested in~\cite{LLJB15}, one can avoid this expensive projection step by resorting to a heuristic approximate projection, but then the global convergence is not fully guaranteed. On the other hand, the papers~\cite{LLB15BIP,LLB15ID} consider identifiability issue of blind deconvolution problem with both $\boldsymbol{f}$ and $\boldsymbol{g}$ in random linear subspaces and achieve nearly optimal result of sampling complexity in terms of information theoretic limits. Very recently,~\cite{KK16} improved the result from~\cite{LLB15BIP,LLB15ID} by using techniques from algebraic geometry. The past few years have also witnessed an increasing number of excellent works other than blind deconvolution but related to nonconvex optimization~\cite{SQW16,WCCL15,Sun16,CLM15,LSJR16}. The paper~\cite{TBSR15} analyzes the problem of recovering a low-rank positive semidefinite matrix from linear measurements via a gradient descent algorithm. The authors assume that the measurement matrix fulfills the standard and convenient restricted isometry property, a condition that is not suitable for the blind deconvolution problem (besides the fact that the positive semidefinite assumption is not satisfied in our setting). In~\cite{CM15}, Chen and Wainwright study various the solution of low-rank estimation problems by projected gradient descent. The very recent paper~\cite{ZL16} investigates matrix completion for rectangular matrices. By ``lifting'', they convert the unknown matrix into a positive semidefinite one and apply matrix factorization combined with gradient descent to reconstruct the unknown entries of the matrix. ~\cite{CJ16} considers an interesting blind calibration problem with a special type of measurement matrix via nonconvex optimization. Besides some general similarities, there is little overlap of the aforementioned papers with our framework. Finally, a convex optimization approach to blind deconvolution and self-calibration that extends the work of~\cite{RR12} can be found in~\cite{LS15}, while~\cite{LS15Blind} also covers the joint blind deconvolution-blind demixing problem. \subsection{Organization of our paper} This paper is organized as follows. We introduce some notation used throughout the paper in the remainder of this section. The model setup and problem formulation are presented in Section~\ref{s:prelim}. Section~\ref{s:Algo} describes the proposed algorithm and our main theoretical result establishing the convergence of our algorithm. Numerical simulations can be found in Section~\ref{s:numerics}. Section~\ref{s:proof} is devoted to the proof of the main theorem. Since the proof is quite involved, we have split this section into several subsections. Some auxiliary results are collected in the Appendix. \subsection{Notation} We introduce notation which will be used throughout the paper. Matrices and vectors are denoted in boldface such as $\boldsymbol{Z}$ and $\boldsymbol{z}$. The individual entries of a matrix or a vector are denoted in normal font such as $Z_{ij}$ or $z_i.$ For any matrix $\boldsymbol{Z}$, $\|\boldsymbol{Z}\|_*$ denotes its nuclear norm, i.e., the sum of its singular values; $\|\boldsymbol{Z}\|$ denotes its operator norm, i.e., the largest singular value, and $\|\boldsymbol{Z}\|_F$ denotes its the Frobenius norm, i.e., $\|\boldsymbol{Z}\|_F =\sqrt{\sum_{ij} |Z_{ij}|^2 }$. For any vector $\boldsymbol{z}$, $\|\boldsymbol{z}\|$ denotes its Euclidean norm. For both matrices and vectors, $\boldsymbol{Z}^\top$ and $\boldsymbol{z}^\top$ stand for the transpose of $\boldsymbol{Z}$ and $\boldsymbol{z}$ respectively while $\boldsymbol{Z}^*$ and $\boldsymbol{z}^*$ denote their complex conjugate transpose. We equip the matrix space $\mathbb{C}^{K\times N}$ with the inner product defined as $\left\langle \boldsymbol{U}, \boldsymbol{V}\right\rangle : =\text{Tr}(\boldsymbol{U}^*\boldsymbol{V}).$ A special case is the inner product of two vectors, i.e., $\left\langle \boldsymbol{u}, \boldsymbol{v}\right\rangle = \text{Tr}(\boldsymbol{u}^*\boldsymbol{v}) = \boldsymbol{u}^*\boldsymbol{v}.$ For a given vector $\boldsymbol{v}$, $\diag(\boldsymbol{v})$ represents the diagonal matrix whose diagonal entries are given by the vector $\boldsymbol{v}$. For any $z\in \mathbb{R}$, denote $z_+$ as $z_+ = \frac{z + |z|}{2}.$ $C$ is an absolute constant and $C_{\gamma}$ is a constant which depends linearly on $\gamma$, but on no other parameters. \section{Problem setup} \label{s:prelim} We consider the blind deconvolution model \begin{equation}\label{eq:model-0} \boldsymbol{y} = \vct{f} \ast \boldsymbol{g} + \boldsymbol{n}, \end{equation} where $\boldsymbol{y}$ is given, but $\boldsymbol{f}$ and $\boldsymbol{g}$ are unknown. Here ``$\ast$" denotes circular convolution\footnote{As usual, ordinary convolution can be well approximated by circulant convolution, as long as the function $\boldsymbol{f}$ decays sufficiently fast~\cite{Str00}.}. We will usually consider $\boldsymbol{f}$ as the ``blurring function'' and $\boldsymbol{g}$ as the signal of interest. It is clear that without any further assumption it is impossible to recover $\boldsymbol{f}$ and $\boldsymbol{g}$ from $\boldsymbol{y}$. We want to impose conditions on $\boldsymbol{f}$ and $\boldsymbol{g}$ that are realistic, flexible, and not tied to one particular application (such as, say, image deblurring). At the same time, these conditions should be concrete enough to lend themselves to meaningful mathematical analysis. A natural setup that fits these demands is to assume that $\boldsymbol{f}$ and $\boldsymbol{g}$ belong to known linear subspaces. Concerning the blurring function, it is reasonable in many applications to assume that $\boldsymbol{f}$ is either compactly supported or that $\boldsymbol{f}$ decays sufficiently fast so that it can be well approximated by a compactly supported function. Therefore, we assume that $\vct{f}\in \mathbb{C}^L$ satisfies \begin{equation}\label{def:ff} \vct{f}: = \begin{bmatrix} \boldsymbol{h} \\ {\bf 0}_{L-K} \end{bmatrix} \end{equation} where $\boldsymbol{h}\in\mathbb{C}^K$, i.e., only the first $K$ entries of $\boldsymbol{f}$ are nonzero and $f_l = 0$ for all $l = K+1, K+2, \ldots, L$. Concerning the signal of interest, we assume that $\boldsymbol{g}$ belongs to a linear subspace spanned by the columns of a known matrix $\boldsymbol{C}$, i.e., $\boldsymbol{g} = \boldsymbol{C}\bar{\boldsymbol{x}}$ for some matrix $\boldsymbol{C}$ of size $L \times N$. Here we use $\bar{\boldsymbol{x}}$ instead of $\boldsymbol{x}$ for the simplicity of notation later. For theoretical purposes we assume that $\boldsymbol{C}$ is a Gaussian random matrix. Numerical simulations suggest that this assumption is clearly not necessary. For example, we observed excellent performance of the proposed algorithm also in cases when $\boldsymbol{C}$ represents a wavelet subspace (appropriate for images) or when $\boldsymbol{C}$ is a Hadamard-type matrix (appropriate for communications). We hope to address these other, more realistic, choices for $\boldsymbol{C}$ in our future research. Finally, we assume that $\boldsymbol{n}\sim \mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2}\boldsymbol{I}_L) + \mathrm{i}\mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2}\boldsymbol{I}_L) $ as the additive white complex Gaussian noise where $d_0 = \|\boldsymbol{h}_0\| \|\boldsymbol{x}_0\|$ and $\boldsymbol{h}_0$ and $\boldsymbol{x}_0$ are the true blurring function and the true signal of interest, respectively. In that way $\sigma^{-2}$ actually serves as a measure of SNR (signal to noise ratio) For our theoretical analysis as well as for numerical purposes, it is much more convenient to express~\eqref{eq:model-0} in the Fourier domain, see also~\cite{RR12}. To that end, let $\boldsymbol{F}$ be the $L\times L$ unitary Discrete Fourier Transform (DFT) matrix and let the $L \times K$ matrix $\boldsymbol{B}$ be given by the first $K$ columns of $\boldsymbol{F}$ (then $\boldsymbol{B}^{*} \boldsymbol{B} = \boldsymbol{I}_{K}$ ). By applying the scaled DFT matrix $\sqrt{L}\boldsymbol{F}$ to both sides of~\eqref{eq:model-0} we get \begin{equation} \label{conv2diag} \sqrt{L}\boldsymbol{F} {\boldsymbol{y}}= \diag(\sqrt{L} \boldsymbol{F} \vct{f} ) (\sqrt{L}\boldsymbol{F} \boldsymbol{g}) + \sqrt{L}\boldsymbol{F} \boldsymbol{n}, \end{equation} which follows from the property of circular convolution and Discrete Fourier Transform. Here, $ \diag(\sqrt{L} \boldsymbol{F} \vct{f} ) (\sqrt{L}\boldsymbol{F} \boldsymbol{g})= (\sqrt{L} \boldsymbol{F} \vct{f} )\odot(\sqrt{L}\boldsymbol{F} \boldsymbol{g})$ where $\odot$ denotes pointwise product. By definition of $\boldsymbol{f}$ in~\eqref{def:ff}, we have \begin{equation*} \boldsymbol{F} \vct{f} = \boldsymbol{B}\boldsymbol{h}. \end{equation*} Therefore,~\eqref{conv2diag} becomes, \begin{equation} \label{conv2diag-2} \frac{1}{\sqrt{L}}\hat{\boldsymbol{y}} = \diag(\boldsymbol{B}\boldsymbol{h}) \overline{\boldsymbol{A}\boldsymbol{x}} + \frac{1}{\sqrt{L}}\boldsymbol{F}\boldsymbol{n} \end{equation} where $\overline{\boldsymbol{A}} = \boldsymbol{F}\boldsymbol{C}$ (we use $\overline{\boldsymbol{A}}$ instead of $\boldsymbol{A}$ simply because it gives rise to a more convenient notation later, see e.g.~\eqref{def:F}). Note that if $\boldsymbol{C}$ is a Gaussian matrix, then so is $\boldsymbol{F}\boldsymbol{C}$. Furthermore, $\boldsymbol{e} = \frac{1}{\sqrt{L}} \boldsymbol{F}\boldsymbol{n}\sim \mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2L}\boldsymbol{I}_L) + \mathrm{i}\mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2L}\boldsymbol{I}_L) $ is again a complex Gaussian random vector. Hence by replacing $\frac{1}{\sqrt{L}}\hat{\boldsymbol{y}}$ in~\eqref{conv2diag-2} by $\boldsymbol{y}$, we arrive with a slight abuse of notation at \begin{equation}\label{eq:model} \boldsymbol{y} = \diag(\boldsymbol{B}\boldsymbol{h}) \overline{\boldsymbol{A}\boldsymbol{x}} + \boldsymbol{e}. \end{equation} For the remainder of the paper, instead of considering the original blind deconvolution problem~\eqref{eq:model-0}, we focus on its mathematically equivalent version~\eqref{eq:model}, where $\boldsymbol{h}\in\mathbb{C}^{K\times 1}$, $\boldsymbol{x} \in \mathbb{C}^{N\times 1}$, $\boldsymbol{y}\in\mathbb{C}^{L\times 1}$, $\boldsymbol{B}\in\mathbb{C}^{L\times K}$ and $\boldsymbol{A}\in\mathbb{C}^{L\times N}$. As mentioned before, $\boldsymbol{h}_0$ and $\boldsymbol{x}_0$ are the ground truth. Our goal is to recover $\boldsymbol{h}_0$ and $\boldsymbol{x}_0$ when $\boldsymbol{B}$, $\boldsymbol{A}$ and $\boldsymbol{y}$ are given. It is clear that if $(\boldsymbol{h}_0, \boldsymbol{x}_0)$ is a solution to the blind deconvolution problem. then so is $(\alpha \boldsymbol{h}_0, \alpha^{-1} \boldsymbol{x}_0)$ for any $\alpha \neq 0$. Thus, all we can hope for in the absence of any further information, is to recover a solution from the equivalence class $(\alpha \boldsymbol{h}_0, \alpha^{-1}\boldsymbol{x}_0), \alpha \neq 0$. Hence, we can as well assume that $\|\boldsymbol{h}_0\| = \|\boldsymbol{x}_0\| := \sqrt{d}_0$. As already mentioned, we choose $\boldsymbol{B}$ to be the ``low-frequency" discrete Fourier matrix, i.e., the first $K$ columns of an $L\times L$ unitary DFT (Discrete Fourier Transform) matrix. Moreover, we choose $\boldsymbol{A}$ to be an $L\times N$ complex Gaussian random matrix, i.e., \begin{equation*} A_{ij} \sim \mathcal{N}\left(0, \frac{1}{2}\right) + \mathrm{i} \mathcal{N}\left(0, \frac{1}{2}\right), \end{equation*} where ``$\mathrm{i}$" is the imaginary unit. \bigskip We define the matrix-valued linear operator $\mathcal{A}(\cdot)$ via \begin{equation}\label{def:A} \mathcal{A}: \mathcal{A}(\boldsymbol{Z}) = \{\boldsymbol{b}_l^*\boldsymbol{Z} \boldsymbol{a}_l\}_{l=1}^L, \end{equation} where $\boldsymbol{b}_l$ denotes the $l$-th column of $\boldsymbol{B}^*$ and $\boldsymbol{a}_l$ is the $l$-th column of $\boldsymbol{A}^*.$ Immediately, we have $\sum_{l=1}^L \boldsymbol{b}_l\boldsymbol{b}_l^* = \boldsymbol{B}^*\boldsymbol{B} = \boldsymbol{I}_K$, $\|\boldsymbol{b}_l\| = \frac{K}{L}$ and $\E(\boldsymbol{a}_l\boldsymbol{a}_l^*) = \boldsymbol{I}_N$ for all $1\leq l\leq L$. This is essentially a smart and popular trick called ``lifting"~\cite{CSV11,RR12,LS15}, which is able to convert a class of nonlinear models into linear models at the costs of increasing the dimension of the solution space. It seems natural and tempting to recover $(\boldsymbol{h}_0, \boldsymbol{x}_0)$ obeying~\eqref{eq:model} by solving the following optimization problem \begin{equation}\label{eq:minF} \min_{(\boldsymbol{h}, \boldsymbol{x})} \,\, F(\boldsymbol{h}, \boldsymbol{x}), \end{equation} where \begin{equation}\label{def:F} F(\boldsymbol{h}, \boldsymbol{x}) := \|\diag(\boldsymbol{B}\boldsymbol{h})\overline{\boldsymbol{A}\boldsymbol{x}} - \boldsymbol{y}\|^2 = \|\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e}\|^2. \end{equation} We also let \begin{equation}\label{def:F0} F_0(\boldsymbol{h}, \boldsymbol{x}) : = \|\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*)\|_F^2 \end{equation} which is a special case of $F(\boldsymbol{h}, \boldsymbol{x})$ when $\boldsymbol{e} = \boldsymbol{0}.$ Furthermore, we define $\delta(\boldsymbol{h}, \boldsymbol{x})$, an important quantity throughout our discussion, via \begin{equation}\label{def:delta} \delta(\boldsymbol{h}, \boldsymbol{x}) : = \frac{\|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}{d_0}. \end{equation} When there is no danger of ambiguity, we will often denote $\delta(\boldsymbol{h}, \boldsymbol{x})$ simply by $\delta$. But let us remember that $\delta(\boldsymbol{h}, \boldsymbol{x})$ is always a function of $(\boldsymbol{h}, \boldsymbol{x})$ and measures the relative approximation error of $(\boldsymbol{h}, \boldsymbol{x})$. Obviously, minimizing~\eqref{def:F} becomes a nonlinear least square problem, i.e., one wants to find a pair of vectors $(\boldsymbol{h},\boldsymbol{x})$ or a rank-1 matrix $\boldsymbol{h}\boldsymbol{x}^*$ which fits the measurement equation in~\eqref{def:F} best. Solving~\eqref{eq:minF} is a challenging optimization problem since it is highly nonconvex and most of the available algorithms, such as alternating minimization and gradient descent, may suffer from getting easily trapped in some local minima. Another possibility is to consider a convex relaxation of~\eqref{eq:minF} at the cost of having to solve an expensive semidefinite program. In the next section we will describe how to avoid this dilemma and design an efficient gradient descent algorithm that, under reasonable conditions, will always converge to the true solution. \if 0 \subsection{Incoherence} However, in this particular problem, minimizing~\eqref{def:F} might not be enough to guarantee recovery. Before moving to further discussion, we define the incoherence parameter between $\{\boldsymbol{b}_l\}_{l=1}^L$ and $\boldsymbol{h}_0$ as \begin{equation}\label{def:muh} \mu^2_h = \frac{L \|\boldsymbol{B}\boldsymbol{h}_0\|_{\infty}^2}{\|\boldsymbol{h}_0\|^2} \end{equation} and it is easy to see that $1\leq \mu_h^2 \leq K$. Both lower and upper bounds are tight, i.e., $\mu^2_h = K$ if $\boldsymbol{h}_0$ is parallel to one of $\{\boldsymbol{b}_l\}_{l=1}^L$ and $\mu^2_h = 1$ if $\boldsymbol{h}_0$ is a 1-sparse vector of length $K$. One may naturally question if $\mu^2_h$ is really necessary here. Now recall that in matrix completion~\cite{CR08,Recht11MC}, we know the left and right singular vectors of ``ground truth" cannot be ``too aligned" with those of the measurement matrices. The same philosophy works here as well. It has been shown numerically that the incoherence parameter is not only an important ingredient for establishing exact recovery via convex programming~\cite{RR12,LS15Blind} but also it affects the performance of algorithm and sampling complexity. In other words, an important underlying assumption here is that $\boldsymbol{B}$ and the ground truth $\boldsymbol{h}_0$ are well ``incoherent" to each other and thus $\mu^2_h$ is relatively small. So more precisely, we are looking for a pair of $(\boldsymbol{h}_0, \boldsymbol{x}_0)$ via \begin{equation}\label{eq:F-2} \min_{(\boldsymbol{h}, \boldsymbol{x})} F(\boldsymbol{h}, \boldsymbol{x}) \quad \text{ subject to } \quad L\|\boldsymbol{B}\boldsymbol{h}\|_{\infty}^2 \leq p \|\boldsymbol{h}\|^2 \end{equation} where $p > 0$ is a tuning parameter which controls the incoherence. Now one may want to ask a similar question, i.e., for this nonconvex optimization problem, whether adding this incoherence constraint will enhance the performance or it is just artifact of proof? The answer is that the incoherence constraint does improve empirical performance under some extreme cases. \lsy{LSY: numerically, we see improvement of empirical result if adding regularizer term... especially if the underlying signals are quite aligned with some rows of $\boldsymbol{B}$, for both $\boldsymbol{A}$ being Gaussian matrices and random Hadamard matrix.} \XL{XL: This is a quite strong claim. The numerical advantage of penalization and regularization might be empirically important, but by far we don't have very convincing evidence. If we hope to claim this, we'd better expend some effort to seek for more convincing evidence.} But it is obvious that $\{ \boldsymbol{h} | L\|\boldsymbol{B}\boldsymbol{h}\|_{\infty}^2 \leq p \|\boldsymbol{h}\|^2 \}$ is a nonconvex cone. Therefore, this extra constraint creates new difficulties although it helps enforce the incoherence constraint. \fi \section{Algorithm and main result} \label{s:Algo} In this section we introduce our algorithm as well as our main theorems which establish convergence of the proposed algorithm to the true solution. As mentioned above, in a nutshell our algorithm consists of two parts: First we use a carefully chosen initial guess, and second we use a variation of gradient descent, starting at the initial guess to converge to the true solution. One of the most critical aspects is of course that we must avoid getting stuck in local minimum or saddle point. Hence, we need to ensure that our iterates are inside some properly chosen {\em basin of attraction} of the true solution. The appropriate characterization of such a basin of attraction requires some diligence, a task that will occupy us in the next subsection. We will then proceed to introducing our algorithm and analyzing its convergence. \subsection{Building a basin of attraction} The road toward designing a proper basin of attraction is basically paved by three observations, described below. These observations prompt us to introduce three neighborhoods (inspired by~\cite{KMO09IT,SL15}), whose intersection will form the desired basin of attraction of the solution. \medskip \noindent {\bf Observation 1 - Nonuniqueness of the solution:} As pointed out earlier, if $(\boldsymbol{h},\boldsymbol{x})$ is a solution to~\eqref{eq:model}, then so is $(\alpha \boldsymbol{h}, \alpha^{-1}\boldsymbol{x})$ for any $\alpha \neq 0$. Thus, without any prior information about $\|\boldsymbol{h}\|$ and/or $\|\boldsymbol{x}\|$, it is clear that we can only recover the true solution up to such an unknown constant $\alpha$. Fortunately, this suffices for most applications. From the viewpoint of numerical stability however, we do want to avoid, while $\|\boldsymbol{h}\|\|\boldsymbol{x}\|$ remains bounded, that $\|\boldsymbol{h}\|\to 0$ and $\|\boldsymbol{x}\| \to \infty$ (or vice versa). To that end we introduce the following neighborhood: \begin{equation} \mathcal{N}_{d_0} := \{ (\boldsymbol{h}, \boldsymbol{x}) : \|\boldsymbol{h}\| \leq 2\sqrt{d_0}, \|\boldsymbol{x}\| \leq 2\sqrt{d_0} \} \label{def:Kd}. \end{equation} (Recall that $d_0 = \|\boldsymbol{h}_0\| \|\boldsymbol{x}_0\|$.) \medskip \noindent {\bf Observation 2 - Incoherence:} Our numerical simulations indicate that the number of measurements required for solving the blind deconvolution problem with the proposed algorithm does depend (among others) on how much $\boldsymbol{h}_0$ is correlated with the rows of the matrix $\boldsymbol{B}$ --- the smaller the correlation the better. A similar effect has been observed in blind deconvolution via convex programming~\cite{RR12,LS15Blind}. We quantify this property by defining the {\em incoherence} between the rows of $\boldsymbol{B}$ and $\boldsymbol{h}_0$ via \begin{equation}\label{def:muh} \mu^2_h = \frac{L \|\boldsymbol{B}\boldsymbol{h}_0\|_{\infty}^2}{\|\boldsymbol{h}_0\|^2}. \end{equation} It is easy to see that $1\leq \mu_h^2 \leq K$ and both lower and upper bounds are tight; i.e., $\mu^2_h = K$ if $\boldsymbol{h}_0$ is parallel to one of $\{\boldsymbol{b}_l\}_{l=1}^L$ and $\mu^2_h = 1$ if $\boldsymbol{h}_0$ is a 1-sparse vector of length $K$. Note that in our setup, we assume that $\boldsymbol{A}$ is a random matrix and $\boldsymbol{x}_0$ is fixed, thus with high probability, $\boldsymbol{x}_0$ is already sufficiently incoherent with the rows of $\boldsymbol{A}$ and thus we only need to worry about the incoherence between $\boldsymbol{B}$ and $\boldsymbol{h}_0$. It should not come as a complete surprise that the incoherence between $\boldsymbol{h}_0$ and the rows of $\boldsymbol{B}$ is important. The reader may recall that in matrix completion~\cite{CR08,Recht11MC} the left and right singular vectors of the solution cannot be ``too aligned" with those of the measurement matrices. A similar philosophy seems to apply here. Being able to control the incoherence of the solution is instrumental in deriving rigorous convergence guarantees of our algorithm. For that reason, we introduce the neighborhood \begin{equation} \mathcal{N}_{\mu} := \{ \boldsymbol{h} : \sqrt{L} \|\boldsymbol{B}\boldsymbol{h}\|_{\infty} \leq 4\sqrt{d_0}\mu \}, \label{def:Kmu} \end{equation} where $\mu_h \leq \mu$. \medskip \noindent {\bf Observation 3 - Initial guess:} It is clear that due to the non-convexity of the objective function, we need a carefully chosen initial guess. We quantify the distance to the true solution via the following neighborhood \begin{equation} \mathcal{N}_{\epsilon} := \{ (\boldsymbol{h}, \boldsymbol{x}) : \|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq \epsilon d_0 \}. \label{def:Keps} \end{equation} where $\epsilon$ is a predetermined parameter in $(0, \frac{1}{15}]$. \bigskip It is evident that the true solution $(\boldsymbol{h}_0,\boldsymbol{x}_0) \in \mathcal{N}_{d_0} \cap \mathcal{N}_{\mu}$. Note that $(\boldsymbol{h}, \boldsymbol{x})\in \mathcal{N}_{d_0} \bigcap \mathcal{N}_{\epsilon}$ implies $\|\boldsymbol{h}\boldsymbol{x}^*\|\geq (1 - \epsilon)d_0$ and $\frac{1}{\|\boldsymbol{h}\|} \leq \frac{\|\boldsymbol{x}\|}{(1 - \epsilon)d_0} \leq \frac{2}{(1 - \epsilon)\sqrt{d_0}}$. Therefore, for any element $(\boldsymbol{h}, \boldsymbol{x})\in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon},$ its incoherence can be well controlled by \begin{equation*} \frac{\sqrt{L}\|\boldsymbol{B}\boldsymbol{h}\|_{\infty}}{\|\boldsymbol{h}\|} \leq \frac{4\sqrt{d_0}\mu}{ \|\boldsymbol{h}\| } \leq \frac{ 8\mu }{1 - \epsilon}. \end{equation*} \subsection{Objective function and key ideas of the algorithm} Our approach consists of two parts: We first construct an initial guess that is inside the ``basin of attraction'' $\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$. We then apply a carefully regularized gradient descent algorithm that will ensure that all the iterates remain inside $\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$. Due to the difficulties of directly projecting onto $ \mathcal{N}_{d_0}\cap \mathcal{N}_{\mu}$ (the neigbourhood $ \mathcal{N}_{\epsilon}$ is easier to manage) we add instead a regularizer $G(\boldsymbol{h},\boldsymbol{x})$ to the objective function $F(\boldsymbol{h}, \boldsymbol{x})$ to enforce that the iterates remain inside $ \mathcal{N}_{d_0}\cap \mathcal{N}_{\mu}$. While the idea of adding a penalty function to control incoherence is proposed in different forms to solve matrix completion problems, see e.g.,~\cite{Sun15,LRST10}, our version is mainly inspired by~\cite{SL15,KMO09IT}. Hence, we aim to minimize the following regularized objective function to solve the blind deconvolution problem: \begin{equation}\label{def:FG} \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) = F(\boldsymbol{h}, \boldsymbol{x}) + G(\boldsymbol{h}, \boldsymbol{x}), \end{equation} where $F(\boldsymbol{h}, \boldsymbol{x})$ is defined in~\eqref{def:F} and $G(\boldsymbol{h}, \boldsymbol{x})$, the penalty function, is of the form \begin{equation}\label{def:G} G(\boldsymbol{h}, \boldsymbol{x}) = \rho \left[ G_0\left(\frac{\|\boldsymbol{h}\|^2}{2d}\right) + G_0\left(\frac{\|\boldsymbol{x}\|^2}{2d}\right) + \sum_{l=1}^L G_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \right], \end{equation} where $G_0(z) = \max\{z - 1, 0 \}^2$ and $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2$. Here we assume $\frac{9}{10}d_0 \leq d \leq \frac{11}{10}d_0$ and $\mu \geq \mu_h$. The idea behind this, at first glance complicated, penalty function is quite simple. The first two terms in~\eqref{def:G} enforce the projection of $(\boldsymbol{h}, \boldsymbol{x})$ onto $ \mathcal{N}_{d_0}$ while the last term is related to $ \mathcal{N}_{\mu}$; it will be shown later that any $(\boldsymbol{h}, \boldsymbol{x})\in \frac{1}{\sqrt{3}} \mathcal{N}_{d_0} \bigcap \frac{1}{\sqrt{3}} \mathcal{N}_{\mu}$ gives $G(\boldsymbol{h}, \boldsymbol{x}) = 0$ if $\frac{9}{10}d_0 \leq d\leq \frac{11}{10}d_0$. Since $G_0(z)$ is a truncated quadratic function, it is obvious that $G_0'(z) = 2\sqrt{G_0(z)}$ and $G(\boldsymbol{h}, \boldsymbol{x})$ is a continuously differentiable function. Those two properties play a crucial role in proving geometric convergence of our algorithm presented later. Another important issue concerns the selection of parameters. We have three unknown parameters in $G(\boldsymbol{h}, \boldsymbol{x})$, i.e., $\rho$, $d$, and $\mu$. Here, $d$ can be obtained via Algorithm~1 and $\frac{9}{10}d_0 \leq d\leq \frac{11}{10}d_0$ is guaranteed by Theorem~\ref{thm:init}; $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2 \approx d^2 + 2\sigma^2 d_0^2$ because $\|\boldsymbol{e}\|^2 \sim \frac{\sigma^2 d_0^2}{2L}\chi^2_{2L}$ and $\|\boldsymbol{e}\|^2$ concentrates around $\sigma^2 d_0^2$. In practice, $\sigma^2$ which is the inverse of the SNR, can often be well estimated. Regarding $\mu$, we require $\mu_h \leq \mu$ in order to make sure that $\boldsymbol{h}_0\in \mathcal{N}_{\mu}$. It will depend on the specific application how well one can estimate $\mu_h^2$. For instance, in wireless communications, a very common channel model for $\boldsymbol{h}_0$ is to assume a {\em Rayleigh fading model}~\cite{TV05}, i.e., $\boldsymbol{h}_0 \sim \mathcal{N}(\boldsymbol{0}, \frac{\sigma^2_h}{2}\boldsymbol{I}_K) + \mathrm{i} \mathcal{N}(\boldsymbol{0}, \frac{\sigma^2_h}{2}\boldsymbol{I}_K)$. In that case it is easy to see that $\mu_h^2 = \mathcal{O}(\log L).$ \subsection{Wirtinger derivative of the objective function and algorithm} Since we are dealing with complex variables, instead of using regular derivatives it is more convenient to utilize Wirtinger derivatives~\footnote{For any complex function $f(\boldsymbol{z})$ where $\boldsymbol{z} = \boldsymbol{u} + \mathrm{i} \boldsymbol{v}\in\mathbb{C}^n$ and $\boldsymbol{u}, \boldsymbol{v}\in\mathbb{R}^n$, the Wirtinger derivatives are defined as $\frac{\partial f}{\partial \boldsymbol{z}} = \frac{1}{2}\left( \frac{\partial f}{\partial \boldsymbol{u}} - \mathrm{i} \frac{\partial f}{\partial \boldsymbol{v}}\right)$ and $\frac{\partial f}{\partial \bar{\boldsymbol{z}}} = \frac{1}{2}\left( \frac{\partial f}{\partial \boldsymbol{u}} + \mathrm{i} \frac{\partial f}{\partial \boldsymbol{v}}\right).$ Two important examples used here are $\frac{\partial \|\boldsymbol{z}\|^2}{\partial \bar{\boldsymbol{z}}} = \boldsymbol{z}$ and $\frac{\partial (\boldsymbol{z}^*\boldsymbol{w}) }{\partial \bar{\boldsymbol{z}}} = \boldsymbol{w}$. }, which has become increasingly popular since~\cite{CLS14,CLM15}. Note that $\widetilde{F}$ is a real-valued function and hence we only need to consider the derivative of $\widetilde{F}$ with respect to $\bar{\boldsymbol{h}}$ and $\bar{\boldsymbol{x}}$ and the corresponding updates of $\boldsymbol{h}$ and $\boldsymbol{x}$ because a simple relation holds, i.e., \begin{equation*} \frac{\partial \widetilde{F}}{\partial \bar{\boldsymbol{h}}} = \overline{ \frac{\partial \widetilde{F}}{\partial \boldsymbol{h}}} \in \mathbb{C}^{K\times 1}, \quad \frac{\partial \widetilde{F}}{\partial \bar{\boldsymbol{x}}} = \overline{ \frac{\partial \widetilde{F}}{\partial \boldsymbol{x}}} \in \mathbb{C}^{N\times 1}. \end{equation*} In particular, we denote $\nabla \widetilde{F}_{\boldsymbol{h}} := \frac{\partial \widetilde{F}}{\partial \bar{\boldsymbol{h}}}$ and $\nabla \widetilde{F}_{\boldsymbol{x}} := \frac{\partial \widetilde{F}}{\partial \bar{\boldsymbol{x}}}$. We also introduce the adjoint operator of $\mathcal{A}: \mathbb{C}^L \rightarrow \mathbb{C}^{K\times N}$, given by \begin{equation}\label{def:AD} \mathcal{A}^*(\boldsymbol{z}) = \sum_{l=1}^L z_l \boldsymbol{b}_l\boldsymbol{a}_l^*. \end{equation} Both $\nabla \widetilde{F}_{\boldsymbol{h}}$ and $\nabla \widetilde{F}_{\boldsymbol{x}}$ can now be expressed as \begin{equation*} \nabla \widetilde{F}_{\boldsymbol{h}} = \nabla F_{\boldsymbol{h}} + \nabla G_{\boldsymbol{h}}, \quad \nabla \widetilde{F}_{\boldsymbol{x}} = \nabla F_{\boldsymbol{x}} + \nabla G_{\boldsymbol{x}}, \end{equation*} where each component yields \begin{eqnarray} \nabla F_{\boldsymbol{h}} & = & \mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^*) - \boldsymbol{y})\boldsymbol{x} = \mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) -\boldsymbol{e})\boldsymbol{x}, \label{eq:WFh} \\ \nabla F_{\boldsymbol{x}} & = & [\mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^*) - \boldsymbol{y})]^*\boldsymbol{h} = [\mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e})]^*\boldsymbol{h}, \label{eq:WFx}\\ \nabla G_{\boldsymbol{h}} & = & \frac{\rho}{2d}\left[G'_0\left(\frac{\|\boldsymbol{h}\|^2}{2d}\right) \boldsymbol{h} + \frac{L}{4\mu^2} \sum_{l=1}^L G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h} \right], \label{eq:WGh} \\ \nabla G_{\boldsymbol{x}} & = & \frac{\rho}{2d} G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \boldsymbol{x}. \label{eq:WGx} \end{eqnarray} \bigskip Our algorithm consists of two steps: initialization and gradient descent with constant stepsize. The initialization is achieved via a spectral method followed by projection. The idea behind spectral method is that \begin{equation*} \E \mathcal{A}^*(\boldsymbol{y}) = \E \mathcal{A}^*\mathcal{A}(\boldsymbol{h}_0\boldsymbol{x}_0^*) + \E \mathcal{A}^*(\boldsymbol{e}) = \boldsymbol{h}_0\boldsymbol{x}_0^* \end{equation*} and hence one can hope that the leading singular value and vectors of $\mathcal{A}^*(\boldsymbol{y})$ can be a good approximation of $d_0$ and $(\boldsymbol{h}_0, \boldsymbol{x}_0)$ respectively. The projection step ensures $\boldsymbol{u}_0\in \mathcal{N}_{\mu}$, which the spectral method alone might not guarantee. We will address the implementation and computational complexity issue in Section~\ref{s:numerics}. \begin{algorithm}[h!] \caption{Initialization via spectral method and projection} \label{Initial} \begin{algorithmic}[1] \State Compute $\mathcal{A}^*(\boldsymbol{y}).$ \State Find the leading singular value, left and right singular vectors of $\mathcal{A}^*(\boldsymbol{y})$, denoted by $d$, $\hat{\boldsymbol{h}}_0$ and $\hat{\boldsymbol{x}}_0$ respectively. \State Solve the following optimization problem: \begin{equation*} \boldsymbol{u}_0 := \text{argmin}_{\boldsymbol{z}} \|\boldsymbol{z} - \sqrt{d}\hat{\boldsymbol{h}}_0\|^2, \quad \subjectto \sqrt{L}\|\boldsymbol{B}\boldsymbol{z}\|_{\infty} \leq 2\sqrt{d}\mu \end{equation*} and $\boldsymbol{v}_0 = \sqrt{d}\hat{\boldsymbol{x}}_0.$ \State Output: $(\boldsymbol{u}_0, \boldsymbol{v}_0).$ \end{algorithmic} \end{algorithm} \begin{algorithm}[h!] \caption{Wirtinger gradient descent with constant stepsize $\eta$} \label{AGD} \begin{algorithmic}[1] \State {\bf Initialization:} obtain $(\boldsymbol{u}_0, \boldsymbol{v}_0)$ via Algorithm~\ref{Initial}. \For{ $t = 1, 2, \dots, $} \State $\boldsymbol{u}_t = \boldsymbol{u}_{t-1} - \eta \nabla \widetilde{F}_{\boldsymbol{h}}(\boldsymbol{u}_{t-1}, \boldsymbol{v}_{t-1})$ \State $\boldsymbol{v}_t = \boldsymbol{v}_{t-1} - \eta \nabla \widetilde{F}_{\boldsymbol{x}}(\boldsymbol{u}_{t-1}, \boldsymbol{v}_{t-1})$ \EndFor \end{algorithmic} \end{algorithm} \subsection{Main results} Our main finding is that with a diligently chosen initial guess $(\boldsymbol{u}_0, \boldsymbol{v}_0)$, simply running gradient descent to minimize the regularized non-convex objective function $\widetilde{F}(\boldsymbol{h},\boldsymbol{x})$ will not only guarantee linear convergence of the sequence $(\boldsymbol{u}_t, \boldsymbol{v}_t)$ to the global minimum $(\boldsymbol{h}_0, \boldsymbol{x}_0)$ in the noiseless case, but also provide robust recovery in the presence of noise. The results are summarized in the following two theorems. \begin{theorem}\label{thm:init} The initialization obtained via Algorithm~\ref{Initial} satisfies \begin{equation}\label{eq:init-val} (\boldsymbol{u}_0, \boldsymbol{v}_0) \in \frac{1}{\sqrt{3}} \mathcal{N}_{d_0}\bigcap \frac{1}{\sqrt{3}} \mathcal{N}_{\mu} \bigcap \mathcal{N}_{\frac{2}{5}\epsilon }, \end{equation} and \begin{equation}\label{eq:d} \frac{9}{10}d_0 \leq d\leq \frac{11}{10}d_0 \end{equation} holds with probability at least $1 - L^{-\gamma}$ if the number of measurements satisfies \begin{equation} \label{Lbound} L \geq C_{\gamma} (\mu_h^2 + \sigma^2)\max\{K, N\} \log^2 (L)/\epsilon^2. \end{equation} Here $\epsilon$ is any predetermined constant in $(0, \frac{1}{15}]$, and $C_{\gamma}$ is a constant only linearly depending on $\gamma$ with $\gamma \geq 1$. \end{theorem} The proof of Theorem~\ref{thm:init} is given in Section~\ref{s:init}. While the initial guess is carefully chosen, it is in general not of sufficient accuracy to already be used as good approximation to the true solution. The following theorem establishes that as long as the initial guess lies inside the basin of attraction of the true solution, regularized gradient descent will indeed converge to this solution (or to a solution nearby in case of noisy data). \begin{theorem}\label{thm:main} Consider the model in~\eqref{eq:model} with the ground truth $(\boldsymbol{h}_0, \boldsymbol{x}_0)$, $\mu^2_h = \frac{L\|\boldsymbol{B}\boldsymbol{h}_0\|_{\infty}^2}{\|\boldsymbol{h}_0\|^2}\leq\mu^2$ and the noise $\boldsymbol{e}\sim \mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2L}\boldsymbol{I}_L) + \mathrm{i}\mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2L}\boldsymbol{I}_L)$. Assume that the initialization $(\boldsymbol{u}_0, \boldsymbol{v}_0)$ belongs to $\frac{1}{\sqrt{3}} \mathcal{N}_{d_0}\bigcap \frac{1}{\sqrt{3}} \mathcal{N}_{\mu} \bigcap \mathcal{N}_{\frac{2}{5}\epsilon }$ and that \begin{equation*} L \geq C_{\gamma} (\mu^2 + \sigma^2)\max\{K, N\} \log^2 (L)/\epsilon^2, \end{equation*} Algorithm~\ref{AGD} will create a sequence $(\boldsymbol{u}_t, \boldsymbol{v}_t)\in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ which converges geometrically to $(\boldsymbol{h}_0, \boldsymbol{x}_0)$ in the sense that with probability at least $1 - 4L^{-\gamma} - \frac{1}{\gamma}\exp(-(K + N))$, there holds \begin{equation}\label{eq:main-res1} \max\{ \sin \angle(\boldsymbol{u}_t, \boldsymbol{h}_0), \sin \angle(\boldsymbol{v}_t, \boldsymbol{x}_0)\} \leq \frac{1}{d_t}\left( \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + 50\|\mathcal{A}^*(\boldsymbol{e})\| \right) \end{equation} and \begin{equation}\label{eq:main-res2} |d_t - d_0| \leq \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + 50 \|\mathcal{A}^*(\boldsymbol{e})\|, \end{equation} where $d_t := \|\boldsymbol{u}_t\|\|\boldsymbol{v}_t\|$, $\omega > 0$, $\eta$ is the fixed stepsize and $\angle(\boldsymbol{u}_t, \boldsymbol{h}_0)$ is the angle between $\boldsymbol{u}_t$ and $\boldsymbol{h}_0$. Here \begin{equation}\label{eq:Ae-1} \|\mathcal{A}^*(\boldsymbol{e})\| \leq C_0\sigma d_0 \max\Big\{ \sqrt{\frac{(\gamma + 1)\max\{K,N\} \log L}{L}}, \frac{(\gamma + 1)\sqrt{KN}\log^2 L }{L} \Big\}. \end{equation} holds with probability $1 - L^{-\gamma}.$ \end{theorem} \medskip \noindent {\bf Remarks:} \begin{enumerate} \item While the setup in~\eqref{eq:model} assumes that $\boldsymbol{B}$ is a matrix consisting of the first $K$ columns of the DFT matrix, this is actually not necessary for Theorem~\ref{thm:main}. As the proof will show, the only conditions on $\boldsymbol{B}$ are that $\boldsymbol{B}^{\ast} \boldsymbol{B} = \boldsymbol{I}_K$ and that the norm of the $l$-th row of $\boldsymbol{B}$ satisfies $\| \boldsymbol{b}_l \|^2 \leq C \frac{K}{L}$ for some numerical constant $C$. \item The minimum number of measurements required for our method to succeed is roughly comparable to that of the convex approach proposed in~\cite{RR12} (up to log-factors). Thus there is no price to be paid for trading a slow, convex-optimization based approach with a fast non-convex based approach. Indeed, numerical experiments indicate that the non-convex approach even requires a smaller number of measurements compared to the convex approach, see Section~\ref{s:numerics}. \item The convergence rate of our algorithm is completely determined by $\eta\omega$. Here, the {\em regularity constant} $\omega = \mathcal{O}(d_0)$ is specified in~\eqref{eq:reg} and $\eta \leq \frac{1}{C_L}$ where $C_L = \mathcal{O}(d_0 ( N\log L + \frac{\rho L}{d_0^2 \mu^2}))$. The attentive reader may have noted that $C_L$ depends essentially linearly on $\frac{\rho L}{\mu^2}$, which actually reflects a tradeoff between sampling complexity (or statistical estimation quality) and computation time. Note that if $L$ gets larger, the number of constraints is also increasing and hence leads to a larger $C_L$. However, this issue can be solved by choosing parameters smartly. Theorem~\ref{thm:main} tells us that $\mu^2$ should be roughly between $\mu_h^2$ and $\frac{L}{(K + N)\log^2L}$. Therefore, by choosing $\mu^2 = \mathcal{O}(\frac{L}{(K + N)\log^2L})$ and $\rho \approx d^2 + 2\|\boldsymbol{e}\|^2$, $C_L$ is optimized and \begin{equation*} \eta\omega = \mathcal{O}(((1 + \sigma^2)(K + N) \log^2L)^{-1}), \end{equation*} which is shown in details in Section~\ref{s:smooth}. \item Relations~\eqref{eq:main-res1} and~\eqref{eq:main-res2} are basically equivalent to the following: \begin{equation}\label{eq:main-result} \| \boldsymbol{u}_t\boldsymbol{v}_t^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + 50 \|\mathcal{A}^*(\boldsymbol{e})\|, \end{equation} which says that $(\boldsymbol{u}_t, \boldsymbol{v}_t)$ converges to an element of the equivalence class associated with the true solution $(\boldsymbol{h}_0,\boldsymbol{x}_0)$ (up to a deviation governed by the amount of additive noise). \item The matrix $\mathcal{A}^*(\boldsymbol{e}) = \sum_{l=1}^L e_l \boldsymbol{b}_l\boldsymbol{a}_l^*$, as a sum of $L$ rank-1 random matrices, has nice concentration of measure properties under the assumption of Theorem~\ref{thm:main}. Asymptotically, $\|\mathcal{A}^*(\boldsymbol{e})\|$ converges to $0$ with rate $\mathcal{O}(L^{-1/2})$, which will be justified in Lemma~\ref{lem:Ay-hx} of Section~\ref{s:init} (see also~\cite{CLM15}). Note that \begin{equation}\label{eq:F-decom} F(\boldsymbol{h}, \boldsymbol{x}) = \|\boldsymbol{e}\|^2 + \|\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*)\|_F^2 - 2\Real (\left\langle \mathcal{A}^*(\boldsymbol{e}) , \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\right\rangle). \end{equation} If one lets $L\rightarrow \infty$, then $\|\boldsymbol{e}\|^2\sim \frac{\sigma^2 d_0^2}{2L} \chi^2_{2L}$ will converge almost surely to $\sigma^2d_0^2$ under the Law of Large Numbers and the cross term $\Real (\left\langle \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*, \mathcal{A}^*(\boldsymbol{e}) \right\rangle)$ will converge to $0$. In other words, asymptotically, \begin{equation*} \lim_{L\rightarrow \infty} F(\boldsymbol{h}, \boldsymbol{x}) = F_0(\boldsymbol{h}, \boldsymbol{x}) + \sigma^2 d_0^2 \end{equation*} for all fixed $(\boldsymbol{h}, \boldsymbol{x})$. This implies that if the number of measurements is large, then $F(\boldsymbol{h}, \boldsymbol{x})$ behaves ``almost like" $F_0(\boldsymbol{h}, \boldsymbol{x}) = \|\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*)\|^2$, the noiseless version of $F(\boldsymbol{h}, \boldsymbol{x})$. This provides the key insight into analyzing the robustness of our algorithm, which is reflected in the so-called ``\textit{Robustness Condition}" in~\eqref{eq:AEnorm}. Moreover, the asymptotic property of $\mathcal{A}^*(\boldsymbol{e})$ is also seen in our main result~\eqref{eq:main-result}. Suppose $L$ is becoming larger and larger, the effect of noise diminishes and heuristically, we might just rewrite our result as $\|\boldsymbol{u}_t\boldsymbol{v}_t^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + o_p(1)$, which is consistent with the result without noise. \end{enumerate} \section{Numerical simulations} \label{s:numerics} We present empirical evaluation of our proposed gradient descent algorithm (Algorithm~\ref{AGD}) using simulated data as well as examples from blind deconvolution problems appearing in communications and in image processing. \subsection{Number of measurements vs size of signals}\label{sec:simulation,phase} We first investigate how many measurements are necessary in order for an algorithm to reliably recover two signals from their convolution. We compare Algorithm~\ref{AGD}, a gradient descent algorithm for the sum of the loss function $F(\boldsymbol{h},\boldsymbol{x})$ and the regularization term $G(\boldsymbol{h},\boldsymbol{x})$, with the gradient descent algorithm only applied to $F(\boldsymbol{h},\boldsymbol{x})$ and the nuclear norm minimization proposed in \cite{RR12}. These three tested algorithms are abbreviated as {\em regGrad, Grad} and {\em NNM} respectively. To make fair comparisons, both regGrad and Grad are initialized with the normalized leading singular vectors of $\mathcal{A}^*(\boldsymbol{y})$, which are computed by running the power method for $50$ iterations. Though we do not further compute the projection of $\hat{\boldsymbol{h}}_0$ for regGrad as stated in the third step of Algorithm~\ref{Initial}, we emphasize that the projection can be computed efficiently as it is a linear programming on $K$-dimensional vectors. A careful reader may notice that in addition to the computational cost for the loss function $F(\boldsymbol{h},\boldsymbol{x})$, regGrad also requires to evaluate $G(\boldsymbol{h},\boldsymbol{x})$ and its gradient in each iteration. When $B$ consists of the first $K$ columns of a unitary DFT matrix, we can evaluate $\left\{\boldsymbol{b}_l^*\boldsymbol{h}\right\}_{l=1}^L$ and the gradient of $\sum_{l=1}^L G_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right)$ using FFT. Thus the additional per iteration computational cost for the regularization term $G(\boldsymbol{h},\boldsymbol{x})$ is only $O(L\log L)$ flops. The stepsizes in both regGrad and Grad are selected adaptively in each iteration via backtracking. As suggested by the theory, the choices for $\rho$ and $\mu$ in regGrad are $\rho=d^2/100$ and $\mu=6\sqrt{L/(K+N)}/\log L$. We conduct tests on random Gaussian signals $\boldsymbol{h}\in\mathbb{C}^{K\times 1}$ and $\boldsymbol{x}\in\mathbb{C}^{N\times 1}$ with $K=N=50$. The matrix $\boldsymbol{B}\in\mathbb{C}^{L\times K}$ is the first $K$ columns of a unitary $L\times L$ DFT matrix, while $\boldsymbol{A}\in\mathbb{C}^{L\times N}$ is either a Gaussian random matrix or a partial Hadamard matrix with randomly selected $N$ columns and then multiplied by a random sign matrix from the left. When $\boldsymbol{A}$ is a Gaussian random matrix, $L$ takes $16$ equal spaced values from $K+N$ to $4(K+N)$. When $\boldsymbol{A}$ is a partial Hadamard matrix, we only test $L=2^s$ with $6\leq s\leq 10$ being integers. For each given triple $(K,N,L)$, fifty random tests are conducted. We consider an algorithm to have successfully recovered $(\boldsymbol{h}_0,\boldsymbol{x}_0)$ if it returns a matrix $\hat{\boldsymbol{X}}$ which satisfies \begin{align*} \frac{\|\hat{\boldsymbol{X}}-\boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}{\| \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}<10^{-2}. \end{align*} We present the probability of successful recovery plotted against the number of measurements in Figure~\ref{fig_phase}. \begin{figure*}[!t] \centering \subfloat[]{\includegraphics[width=70mm]{transition_plot_Gaussian_Gaussian.eps} \label{fig_phase_Gaussian}} \hfil \subfloat[]{\includegraphics[width=70mm]{transition_plot_Hadamard_Gaussian.eps} \label{fig_phase_Hadamard}} \caption{Empirical phase transition curves when (a) $\boldsymbol{A}$ is random Gaussian (b) $\boldsymbol{A}$ is partial Hadamard. Horizontal axis $L/(K+N)$ and vertical axis probability of successful recovery out of $50$ random tests.} \label{fig_phase} \end{figure*} It can be observed that regGrad and Grad have similar performance, and both of them require a significantly smaller number of measurements than NNM to achieve successful recovery of high probability. \subsection{Number of measurements vs incoherence}\label{sec:simulation,LvsIncoherence} Theorem~\ref{thm:main} indicates that the number of measurements $L$ required for Algorithm~\ref{AGD} to achieve successful recovery scales linearly with $\mu_h^2$. We conduct numerical experiments to investigate the dependence of $L$ on $\mu_h^2$ empirically. The tests are conducted with $\mu_h^2$ taking on $10$ values $\mu_h^2\in\{ 3,6,\cdots,30\}$. For each fixed $\mu_h^2$, we choose $\boldsymbol{h}_0$ to be a vector whose first $\mu_h^2$ entries are $1$ and the others are $0$ so that its incoherence is equal to $\mu_h^2$ when $\boldsymbol{B}$ is low frequency Fourier matrix. Then the tests are repeated for random Gaussian matrices $\boldsymbol{A}$ and random Gaussian vectors $\boldsymbol{x}_0$. The empirical probability of successful recovery on the $(\mu_h^2,L)$ plane is presented in Figure~\ref{fig_L_mu}, which suggests that $L$ does scale linearly with $\mu_h^2$. \begin{figure*}[!t] \centering \includegraphics[width=100mm]{L_vs_muhsq_Rgrad.eps} \caption{Empirical probability of successful recovery. Horizontal axis $\mu_h^2$ and vertical axis $L$. White: $100\%$ success and black: $0\%$ success.} \label{fig_L_mu} \end{figure*} \subsection{A comparison when $\mu_h^2$ is large} While regGrad and Grad have similar performances in the simulation when $\boldsymbol{h}_0$ is a random Gaussian signal (see Figure~\ref{fig_phase}), we investigate their performances on a fixed $\boldsymbol{h}_0$ with a large incoherence. The tests are conducted for $K=N=200$, $\boldsymbol{x}_0\in\mathbb{C}^{N\times 1}$ being a random Gaussian signal, $\boldsymbol{A}\in\mathbb{C}^{L\times N}$ being a random Gaussian matrix, and $\boldsymbol{B}\in\mathbb{C}^{L\times K}$ being a low frequency Fourier matrix. The signal $\boldsymbol{h}_0$ with $\mu_h^2=100$ is formed in the same way as in Section~\ref{sec:simulation,LvsIncoherence}; that is, the first $100$ entries of $\boldsymbol{h}_0$ are one and the other entries are zero. The number of measurements $L$ varies from $3(K+N)$ to $8(K+N)$. For each $L$, $100$ random tests are conducted. Figure~\ref{fig_phase_fixed_h} shows the probability of successful recovery for regGrad and Grad. It can be observed that the successful recovery probability of regGrad is at least $10\%$ larger than that of Grad when $L\geq 6(K+N)$. \begin{figure*}[!t] \centering \includegraphics[width=80mm]{transition_plot_Gausian_one_200.eps} \caption{Empirical phase transition curves when $\mu_h^2$ is large. Horizontal axis $L/(K+N)$ and vertical axis probability of successful recovery out of $50$ random tests.} \label{fig_phase_fixed_h} \end{figure*} \subsection{Robustness to additive noise} We explore the robustness of Algorithm~\ref{AGD} when the measurements are contaminated by additive noise. The tests are conducted with $K=N=100$, $L\in\{500, 1000\}$ when $\boldsymbol{A}$ is a random Gaussian matrix, and $L\in\{512,1024\}$ when $\boldsymbol{A}$ is a partial Hadamard matrix. Tests with additive noise have the measurement vector $\boldsymbol{y}$ corrupted by the vector \begin{align*} \boldsymbol{e}=\sigma\cdot\|\boldsymbol{y}\|\cdot\frac{\bm{w}}{\|\bm{w}\|}, \end{align*} where $\bm{w}\in\mathbb{C}^{L\times 1}$ is standard Gaussian random vector, and $\sigma$ takes nine different values from $10^{-4}$ to $1$. For each $\sigma$, fifty random tests are conducted. The average reconstruction error in dB plotted against the signal to noise ratio (SNR) is presented in Fig.~\ref{fig_stability}. First the plots clearly show the desirable linear scaling between the noise levels and the relative reconstruction errors. Moreover, as desired, the relative reconstruction error decreases linearly on a $\log$-$\log$ scale as the number of measurements $L$ increases. \begin{figure*}[!t] \centering \subfloat[]{\includegraphics[width=70mm]{stability_of_regGrad_Gaussian.eps} \label{fig_stability_Gaussian}} \hfil \subfloat[]{\includegraphics[width=70mm]{stability_of_regGrad_Hadamard.eps} \label{fig_stability_Hadamard}} \caption{Performance of Algorithm~\ref{AGD} under different SNR when (a) $\boldsymbol{A}$ is random Gaussian (b) $\boldsymbol{A}$ is partial Hadamard.} \label{fig_stability} \end{figure*} \subsection{An example from communications} In order to demonstrate the effectiveness of Algorithm~\ref{AGD} for real world applications, we first test the algorithm on a blind deconvolution problem arising in communications. Indeed, blind deconvolution problems and their efficient numerical solution are expected to play an increasingly important role in connection with the emerging Internet-of-Things~\cite{WBSJ14}. Assume we want to transmit a signal from one place to another over a so-called time-invariant multi-path communication channel, but the receiver has no information about the channel, except its {\em delay spread} (i.e., the support of the impulse response). In many communication settings it is reasonable to assume that the receiver has information about the signal encoding matrix---in other words, we know the subspace $\boldsymbol{A}$ to which $\boldsymbol{x}_0$ belongs to. Translating this communications jargon into mathematical terminology, this simply means that we are dealing with a blind deconvolution problem of the form~\eqref{eq:model}. These encoding matrices (or so-called spreading matrices) are often chosen to have a convenient structure that lends itself to fast computations and minimal memory requirements. One such choice is to let $\boldsymbol{A}:=\boldsymbol{D} \boldsymbol{H}$, where the $L \times K$ matrix $\boldsymbol{H}$ consists of $K$ (randomly or not randomly) chosen columns of an $L \times L$ Hadamard matrix, premultiplied with an $L \times L$ diagonal random sign matrix $\boldsymbol{D}$. Instead of a partial Hadamard matrix we could also use a partial Fourier matrix; the resulting setup would then closely resemble an OFDM transmission format, which is part of every modern wireless communication scheme. For the signal $\boldsymbol{x}_0$ we choose a so-called QPSK scheme, i.e., each entry of $\boldsymbol{x}_0\in\mathbb{C}^{123\times 1}$ takes a value from $\{1,-1,\mathrm{i},-\mathrm{i}\}$ with equal probability. The actual transmitted signal is then $\boldsymbol{z} = \boldsymbol{A} \boldsymbol{x}_0$. For the channel $\boldsymbol{h}_0$ (the blurring function) we choose a real-world channel, courtesy of Intel Corporation. Here, $\boldsymbol{h}_0$ represents the impulse response of a multipath time-invariant channel, it consists of 123 time samples, hence $\boldsymbol{h}_0\in\mathbb{C}^{123\times 1}$. Otherwise, the setup follows closely that in Sec.~\ref{sec:simulation,phase}. For comparison we also include the case when $\boldsymbol{A}$ is a random Gaussian matrix. The plots of successful recovery probability are presented in Figure~\ref{fig_phase_real}, which shows that Algorithm~\ref{AGD} can successfully recover the real channel $\boldsymbol{h}_0$ with high probability if $L\gtrsim 2.5(L+N)$ when $\boldsymbol{A}$ is a random Gaussian matrix and if $L\gtrsim 4.5(L+N)$ when $\boldsymbol{A}$ is a partial Hadamard matrix. Thus our theory seems a bit pessimistic. It is gratifying to see that very little additional measurements are required compared to the number of unknowns in order to recover the transmitted signal. \begin{figure*}[!t] \centering \subfloat[]{\includegraphics[width=70mm]{transition_plot_Gaussian_Real.eps} \label{fig_phase_Gaussian_Real}} \hfil \subfloat[]{\includegraphics[width=70mm]{transition_plot_Hadamard_Real.eps} \label{fig_phase_Hadamard_Real}} \caption{Empirical phase transition curves when (a) $\boldsymbol{A}$ is random Gaussian (b) $\boldsymbol{A}$ is partial Hadamard. Horizontal axis $L/(K+N)$ and vertical axis probability of successful recovery out of $50$ random tests.} \label{fig_phase_real} \end{figure*} \begin{figure*}[!t] \centering \subfloat[]{\includegraphics[width=2.3in]{mri_original.eps} \label{mri_original}}\hspace{-0.3cm} \subfloat[]{{\includegraphics[width=1.8in,height=1.4in,trim=-0.2in -0.7in 0.5in 0.8in]{kernel.eps}} \label{kernel}} \subfloat[]{\includegraphics[width=2.3in]{mri_blurred.eps} \label{mri_blurred}} \subfloat[]{\includegraphics[width=2.3in]{mri_initial_guess.eps}\label{mri_initial_guess}\hspace{-0.6cm}} \subfloat[]{\includegraphics[width=2.3in]{mri_recovered_all_known_20000.eps} \label{mri_recovered_both_known}\hspace{-0.8cm}} \subfloat[]{\includegraphics[width=2.3in]{mri_recovered_35000.eps} \label{mri_recovered_both_unknown}} \caption{MRI image deblurring: (a) Original $512\times 512$ MRI image; (b) Blurring kernel; (c) Blurred image; (d) Initial guess; (e) Reconstructed image when the subspaces are known; (f) Reconstructed image without knowing the subspaces exactly.} \label{mri_deblurring} \end{figure*} \subsection{An example from image processing} Next, we test Algorithm~\ref{AGD} on an image deblurring problem, inspired by~\cite{RR12}. The observed image (Figure~\ref{mri_blurred}) is a convolution of a $512\times 512$ MRI image (Figure~\ref{mri_original}) with a motion blurring kernel (Figure~\ref{kernel}). Since the MRI image is approximately sparse in the Haar wavelet basis, we can assume it belongs to a low dimensional subspace; that is, $\boldsymbol{g}=\boldsymbol{C}\boldsymbol{x}_0$, where $\boldsymbol{g}\in\mathbb{C}^{L}$ with $L=262,144$ denotes the MRI image reshaped into a vector, $\boldsymbol{C}\in\mathbb{C}^{L\times N}$ represents the wavelet subspace and $\boldsymbol{x}_0\in\mathbb{C}^N$ is the vector of wavelet coefficients. The blurring kernel $\boldsymbol{f}\in\mathbb{C}^{L\times 1}$ is supported on a low frequency region. Therefore $\widehat{\boldsymbol{f}}=\boldsymbol{B}\boldsymbol{h}_0$, where $\boldsymbol{B}\in\mathbb{C}^{L\times K}$ is a reshaped $2$D low frequency Fourier matrix and $\boldsymbol{h}_0\in\mathbb{C}^{K}$ is a short vector. Figure~\ref{mri_initial_guess} shows the initial guess for Algorithm~\ref{AGD} in the image domain, which is obtained by running the power method for fifty iterations. While this initial guess is clearly not a good approximation to the true solution, it suffices as a starting point for gradient descent. In the first experiment, we take $\boldsymbol{C}$ to be the wavelet subspace corresponding to the $N=20000$ largest Haar wavelet coefficients of the original MRI image, and we also assume the locations of the $K=65$ nonzero entries of the kernel are known. Figure~\ref{mri_recovered_both_known} shows the reconstructed image in this ideal setting. It can be observed that the recovered image is visually indistinguishable from the ground truth MRI image. In the second experiment, we test a more realistic setting, where both the support of the MRI image is the wavelet domain and the support of the kernel are not known. We take the Haar wavelet transform of the blurred image (Figure~\ref{mri_blurred}) and select $\boldsymbol{C}$ to be the wavelet subspace corresponding to the $N=35000$ largest wavelet coefficients. We do not assume the exact support of the kernel is known, but assume that its support is contained in a small box region. The reconstructed image in this setting is shown in Figure~\ref{mri_recovered_both_unknown}. Despite not knowing the subspaces exactly, Algorithm~\ref{AGD} is still able to return a reasonable reconstruction. Yet, this second experiment also demonstrates that there is clearly room for improvement in the case when the subspaces are unknown. One natural idea to improve upon the result depicted in Figure~\ref{mri_recovered_both_unknown} is to include an additional total-variation penalty in the reconstruction algorithm. We leave this line of work for future research. \section{Proof of the main theorem} \label{s:proof} This section is devoted to the proof of Theorems~\ref{thm:init} and~\ref{thm:main}. Since proving Theorem~\ref{thm:main} is a bit more involved, we briefly describe the architecture of its proof. In Subsection~\ref{ss:conditions} we state four key conditions: The {\em Local Regularity Condition} will allow us to show that the objective function decreases; the {\em Local Restricted Isometry Property} enables us to transfer the decrease in the objective function to a decrease of the error between the iterates and the true solution; the {\em Local Smoothness Condition} yields the actual rate of convergence, and finally, the {\em Robustness Condition} establishes robustness of the proposed algorithm against additive noise. Armed with these conditions, we will show how the three regions defined in Section~\ref{s:Algo} characterize the convergence neighborhood of the solution, i.e., if the initial guess is inside this neighborhood, the sequence generated via gradient descent will always stay inside this neighborhood as well. In Subsections~\ref{s:lemmata}--\ref{s:init} we justify the aforementioned four conditions, show that they are valid under the assumptions stated in Theorem~\ref{thm:main}, and conclude with a proof of Theorem~\ref{thm:init}. \subsection{Four key conditions and the proof of Theorem~\ref{thm:main}} \label{ss:conditions} \begin{condition}[{\textbf{\textit{Local RIP condition}}}]\label{cond:rip} The following local Restricted Isometry Property (RIP) for $\mathcal{A}$ holds uniformly for all $(\boldsymbol{h}, \boldsymbol{x})\in\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}:$ \begin{equation}\label{eq:LRIP} \frac{3}{4} \|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F^2 \leq \|\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*)\|^2 \leq \frac{5}{4}\|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F^2 \end{equation} \end{condition} Condition~\ref{cond:rip} states that $\mathcal{A}$ almost preserves the $\ell_2$-distance between $\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*$ over a ``local" region around the ground truth $\boldsymbol{h}_0\boldsymbol{x}_0^*$. The proof of Condition~\ref{cond:rip} is given in Lemma~\ref{lem:rip}. \begin{condition}[{\textbf{\textit{Robustness condition}}}]\label{cond:AE} For the noise $\boldsymbol{e}\sim\mathcal{N}(\boldsymbol{0}, \frac{\sigma^2 d_0^2}{2L}\boldsymbol{I}_L) + \mathrm{i} \mathcal{N}(\boldsymbol{0}, \frac{\sigma^2 d_0^2}{2L}\boldsymbol{I}_L)$, with high probability there holds, \begin{equation}\label{eq:AEnorm} \| \mathcal{A}^*(\boldsymbol{e}) \| \leq \frac{\epsilon d_0}{10\sqrt{2}} \end{equation} if $L \geq C_{\gamma}(\frac{\sigma^2}{\epsilon^2} + \frac{\sigma}{\epsilon})\max\{K, N\}\log L$. \end{condition} This condition follows directly from~\eqref{eq:Ae-1}. It is quite essential when we analyze the behavior of Algorithm~\ref{AGD} under Gaussian noise. With those two conditions above in hand, the lower and upper bounds of $F(\boldsymbol{h}, \boldsymbol{x})$ are well approximated over $\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ by two quadratic functions of $\delta$, where $\delta$ is defined in~\eqref{def:delta}. A similar approach towards noisy matrix completion problem can be found in~\cite{KMO09noise}. For any $(\boldsymbol{h}, \boldsymbol{x})\in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$, applying Condition~\ref{cond:rip} to~\eqref{eq:F-decom} leads to \begin{equation}\label{eq:Fuppbd-org} F(\boldsymbol{h}, \boldsymbol{x}) \leq \|\boldsymbol{e}\|^2 + F_0(\boldsymbol{h}, \boldsymbol{x}) + 2\sqrt{2}\|\mathcal{A}^*(\boldsymbol{e})\|\delta d_0 \leq \|\boldsymbol{e}\|^2 + \frac{5}{4}\delta^2 d_0^2 + 2\sqrt{2} \|\mathcal{A}^*(\boldsymbol{e})\| \delta d_0 \end{equation} and similarly \begin{equation}\label{eq:Flowbd-org} F(\boldsymbol{h}, \boldsymbol{x}) \geq \|\boldsymbol{e}\|^2 + \frac{3}{4}\delta^2 d_0^2 - 2\sqrt{2} \|\mathcal{A}^*(\boldsymbol{e})\| \delta d_0 \end{equation} where \begin{equation*} |\left\langle \mathcal{A}^*(\boldsymbol{e}), \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \right\rangle| \leq \|\mathcal{A}^*(\boldsymbol{e})\| \|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_* \leq \sqrt{2}\|\mathcal{A}^*(\boldsymbol{e})\| \delta d_0, \end{equation*} because $\|\cdot\|$ and $\|\cdot\|_*$ is a pair of dual norm and $\rank(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) \leq 2$. Moreover, with the Condition~\ref{cond:AE}, ~\eqref{eq:Fuppbd-org} and~\eqref{eq:Flowbd-org} yield the followings: \begin{equation}\label{eq:Fuppbd} F(\boldsymbol{h}, \boldsymbol{x}) \leq \|\boldsymbol{e}\|^2 + \frac{5}{4}\delta^2d_0^2 + \frac{\epsilon \delta d_0^2}{5} \end{equation} and \begin{equation}\label{eq:Flowbd} F(\boldsymbol{h}, \boldsymbol{x}) \geq \|\boldsymbol{e}\|^2 + \frac{3}{4}\delta^2 d_0^2 - \frac{\epsilon \delta d_0^2}{5}. \end{equation} The third condition is about the regularity condition of $\widetilde{F}(\boldsymbol{h}, \boldsymbol{x})$, which is the key to establishing linear convergence later. The proof will be given in Lemma~\ref{lem:reg}. \begin{condition}[{\textbf{\textit{Local regularity condition}}}]\label{cond:reg} Let $\widetilde{F}(\boldsymbol{h}, \boldsymbol{x})$ be as defined in~\eqref{def:FG} and $\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) := (\nabla \widetilde{F}_{\boldsymbol{h}}, \nabla \widetilde{F}_{\boldsymbol{x}})\in\mathbb{C}^{K + N}$. Then there exists a {\em regularity constant} $\omega = \frac{d_0}{5000}>0$ such that \begin{equation}\label{eq:reg} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\|^2 \geq \omega \left[ \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - c\right]_+ \end{equation} for all $(\boldsymbol{h}, \boldsymbol{x}) \in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ where $c = \|\boldsymbol{e}\|^2 + a \|\mathcal{A}^*(\boldsymbol{e})\|^2 $ with $a = 1700$. In particular, in the noiseless case, i.e., $\boldsymbol{e} = \boldsymbol{0}$, we have \begin{equation*} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\|^2 \geq \omega \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}). \end{equation*} \end{condition} \bigskip Besides the three regions defined in~\eqref{def:Kd} to~\eqref{def:Kmu}, we define another region $ \mathcal{N}_{\widetilde{F}}$ via \begin{equation} \mathcal{N}_{\widetilde{F}} := \left\{(\boldsymbol{h}, \boldsymbol{x}): \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) \leq \frac{1}{3}\epsilon^2 d_0^2 + \|\boldsymbol{e}\|^2\right\} \end{equation} for proof technical purposes. $ \mathcal{N}_{\widetilde{F}}$ is actually the sublevel set of the nonconvex function $\widetilde{F}$. Finally we introduce the last condition called \textit{Local smoothness condition} and its corresponding quantity $C_L$ which characterizes the choice of stepsize $\eta$ and the rate of linear convergence. \begin{condition}[{\textbf{\textit{Local smoothness condition}}}]\label{cond:smooth} Denote $\boldsymbol{z} := (\boldsymbol{h}, \boldsymbol{x})$. There exists a constant $C_L $ such that \begin{equation}\label{def:cl} \|\nabla f(\boldsymbol{z} + t \Delta\boldsymbol{z}) - \nabla f(\boldsymbol{z})\| \leq C_L t\|\Delta\boldsymbol{z}\|, \quad \forall 0\leq t\leq 1, \end{equation} for all $\{(\boldsymbol{z}, \Delta \boldsymbol{z}) | \boldsymbol{z} +t \Delta \boldsymbol{z} \in \mathcal{N}_{\epsilon}\bigcap \mathcal{N}_{\widetilde{F}}, \forall 0\leq t\leq 1\}$, i.e., the whole segment connecting $\boldsymbol{z}$ and $\boldsymbol{z} + \Delta \boldsymbol{z}$, which is parametrized by $t$, belongs to the nonconvex set $ \mathcal{N}_{\epsilon}\bigcap \mathcal{N}_{\widetilde{F}}.$ \end{condition} The upper bound of $C_L$, which scales with $\mathcal{O}(d_0(1 + \sigma^2)(K + N)\log^2L )$, will be given in Section~\ref{s:smooth}. We will show later in Lemma~\ref{lem:induction} that the stepsize $\eta$ is chosen to be smaller than $\frac{1}{C_L}.$ Hence $\eta = \mathcal{O}((d_0(1 + \sigma^2)(K + N)\log^2L )^{-1}).$ \begin{lemma} \label{lem:betamu} There holds $ \mathcal{N}_{\widetilde{F}} \subset \mathcal{N}_{d_0} \cap \mathcal{N}_{\mu}$; under Condition~\ref{cond:rip} and~\ref{cond:AE}, we have $ \mathcal{N}_{\widetilde{F}} \cap \mathcal{N}_{\epsilon} \subset \mathcal{N}_{\frac{9}{10}\epsilon}$. \end{lemma} \begin{proof} If $(\vct{h}, \vct{x}) \notin \mathcal{N}_{d_0} \cap \mathcal{N}_{\mu}$, by the definition of $G$ in~\eqref{def:G}, at least one component in $G$ exceeds $\rho G_0\left(\frac{2d_0}{d}\right)$. We have \begin{eqnarray*} \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) & \geq & \rho G_0\left(\frac{2d_0}{d}\right) \geq (d^2 + 2\|\boldsymbol{e}\|^2) \left( \frac{2d_0}{d} - 1\right)^2 \\ & \geq & (2d_0 - d)^2 + 2\|\boldsymbol{e}\|^2\left( \frac{2d_0}{d} - 1\right)^2 \\ & \geq & 0.81 d_0^2 + \|\boldsymbol{e}\|^2 > \frac{1}{3}\epsilon^2 d_0^2 + \|\boldsymbol{e}\|^2, \end{eqnarray*} where $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2$ and $0.9d_0 \leq d \leq 1.1d_0.$ This implies $(\boldsymbol{h}, \boldsymbol{x}) \notin \mathcal{N}_{\widetilde{F}}$ and hence $ \mathcal{N}_{\widetilde{F}} \subset \mathcal{N}_{d_0} \cap \mathcal{N}_{\mu}$. \\ For any $(\boldsymbol{h}, \boldsymbol{x}) \in \mathcal{N}_{\widetilde{F}} \cap \mathcal{N}_{\epsilon}$, we have $(\boldsymbol{h}, \boldsymbol{x})\in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ now. By~\eqref{eq:Flowbd}, \begin{equation*} \|\boldsymbol{e}\|^2 + \frac{3}{4} \delta^2 d_0^2 - \frac{\epsilon\delta d_0^2}{5} \leq F(\boldsymbol{h}, \boldsymbol{x})\leq \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\leq \|\boldsymbol{e}\|^2 + \frac{1}{3}\epsilon^2 d_0^2. \end{equation*} Therefore, $(\vct{h}, \vct{x}) \in \mathcal{N}_{\frac{9}{10}\epsilon}$ and $ \mathcal{N}_{\widetilde{F}} \cap \mathcal{N}_{\epsilon} \subset \mathcal{N}_{\frac{9}{10}\epsilon}$. \end{proof} This lemma implies that the intersection of $ \mathcal{N}_{\widetilde{F}}$ and the boundary of $ \mathcal{N}_{\epsilon}$ is empty. One might believe this suggests that $ \mathcal{N}_{\widetilde{F}} \subset \mathcal{N}_{\epsilon}$. This may not be true. A more reasonable interpretation is that $ \mathcal{N}_{\widetilde{F}}$ consists of several disconnected regions due to the non-convexity of $\widetilde{F}(\boldsymbol{h}, \boldsymbol{x})$, and one or several of them are contained in $ \mathcal{N}_{\epsilon}$. \begin{lemma} \label{lem:line_section} Denote $\vct{z}_1 = (\vct{h}_1, \vct{x}_1)$ and $\vct{z}_2 = (\vct{h}_2, \vct{x}_2)$. Let $\vct{z}(\lambda):=(1-\lambda)\vct{z}_1 + \lambda \vct{z}_2$. If $\vct{z}_1 \in \mathcal{N}_{\epsilon}$ and $\vct{z}(\lambda) \in \mathcal{N}_{\widetilde{F}}$ for all $\lambda \in [0, 1]$, we have $\vct{z}_2 \in \mathcal{N}_{\epsilon}$. \end{lemma} \begin{proof} Let us prove the claim by contradiction. If $\vct{z}_2 \notin \mathcal{N}_{\epsilon}$, since $\vct{z}_1 \in \mathcal{N}_{\epsilon}$, there exists $\vct{z}(\lambda_0):=(\vct{h}(\lambda_0), \vct{x}(\lambda_0)) \in \mathcal{N}_{\epsilon}$ for some $\lambda_0 \in [0, 1]$, such that $\|\vct{h}(\lambda_0)\vct{x}(\lambda_0)^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F = \epsilon d_0$. However, since $\vct{z}(\lambda_0) \in \mathcal{N}_{\widetilde{F}}$, by \prettyref{lem:betamu}, we have $\|\vct{h}(\lambda_0)\vct{x}(\lambda_0)^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq \frac{9}{10}\epsilon d_0$. This leads to a contradiction. \end{proof} \begin{remark} Lemma~\ref{lem:line_section} tells us that if one line segment is completely inside $ \mathcal{N}_{\widetilde{F}}$ with one end point in $ \mathcal{N}_{\epsilon}$, then this whole line segment lies in $\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}.$ \end{remark} \begin{lemma} \label{lem:induction} Let the stepsize $\eta \leq \frac{1}{C_L}$, $\boldsymbol{z}_t : = (\boldsymbol{u}_t, \boldsymbol{v}_t)\in\mathbb{C}^{K + N}$ and $C_L$ be the constant defined in~\eqref{def:cl}. Then, as long as $\vct{z}_t \in \mathcal{N}_{\epsilon} \cap \mathcal{N}_{\widetilde{F}}$, we have $\vct{z}_{t+1} \in \mathcal{N}_{\epsilon} \cap \mathcal{N}_{\widetilde{F}}$ and \begin{equation} \label{eq:decreasing2} \widetilde{F}(\boldsymbol{z}_{t+1}) \leq \widetilde{F}(\boldsymbol{z}_t) - \eta \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2. \end{equation} \end{lemma} \begin{proof} It suffices to prove \prettyref{eq:decreasing2}. If $\nabla \widetilde{F}(\boldsymbol{z}_t) = \vct{0}$, then $\boldsymbol{z}_{t+1} = \boldsymbol{z}_t$, which implies \prettyref{eq:decreasing2} directly. So we only consider the case when $\nabla \widetilde{F}(\boldsymbol{z}_t) \neq \vct{0}$. Define the function \[ \varphi(\lambda) := \widetilde{F}(\boldsymbol{z}_t - \lambda \nabla \widetilde{F}(\boldsymbol{z}_t)). \] Then \[ \varphi'(\lambda)|_{\lambda = 0} = - 2\| \nabla \widetilde{F}(\boldsymbol{z}_t) \|^2 <0. \] since $\varphi(\lambda)$ is a real-valued function with complex variables (See~\eqref{eq:chain} for details). By the definition of derivatives, we know there exists $\eta_0 > 0$, such that $\varphi(\lambda) < \varphi(0)$ for all $0<\lambda \leq \eta_0$. Now we will first prove that $\varphi(\lambda) \leq \varphi(0)$ for all $0\leq \lambda\leq \eta$ by contradiction. Assume there exists some $\eta_1 \in (\eta_0, \eta]$ such that $\varphi(\eta_1) > \varphi(0)$. Then there exists $\eta_2 \in (\eta_0, \eta_1)$, such that $\varphi(\eta_2) = \varphi(0)$ and $\varphi(\lambda) < \varphi(0)$ for all $0 < \lambda < \eta_2$, since $\varphi(\lambda)$ is a continuous function. This implies \[ \boldsymbol{z}_t - \lambda \nabla \widetilde{F}(\boldsymbol{z}_t) \in \mathcal{N}_{\widetilde{F}}, \quad \forall 0 \leq \lambda \leq \eta_2 \] since $\widetilde{F}(\boldsymbol{z}_t - \lambda \nabla \widetilde{F}(\boldsymbol{z}_t)) \leq \widetilde{F}(\boldsymbol{z}_t)$ for $0\leq \lambda\leq \eta_2.$ By \prettyref{lem:line_section} and the assumption $\boldsymbol{z}_t \in \mathcal{N}_{\epsilon}$, we have \[ \boldsymbol{z}_t - \lambda \nabla \widetilde{F}(\boldsymbol{z}_t) \in \mathcal{N}_{\epsilon} \cap \mathcal{N}_{\widetilde{F}}, \quad \forall 0 \leq \lambda \leq \eta_2. \] Then, by using the modified descent lemma (Lemma~\ref{lem:DSL}), \begin{align*} \widetilde{F}(\boldsymbol{z}_t - \eta_2 \nabla \widetilde{F}(\boldsymbol{z}_t)) &\leq \widetilde{F}(\boldsymbol{z}_t) - 2 \eta_2 \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2 + C_L\eta_2^2 \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2 \nonumber \\ & =\widetilde{F}(\boldsymbol{z}_t) + (C_L\eta_2^2 - 2\eta_2) \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2 < \widetilde{F}(\boldsymbol{z}_t), \end{align*} where the final inequality is due to $\eta_2/\eta <1$, $\eta_2 > \eta_0 \geq 0$ and $\nabla \widetilde{F}(\boldsymbol{z}_t) \neq \vct{0}$. This contradicts $ \widetilde{F}(\boldsymbol{z}_t - \eta_2 \nabla \widetilde{F}(\boldsymbol{z}_t)) = \varphi(\eta_2) = \varphi(0) = \widetilde{F}(\boldsymbol{z}_t)$. Therefore, there holds $\varphi(\lambda) \leq \varphi(0)$ for all $0 \leq \lambda \leq \eta$. Similarly, we can prove \[ \boldsymbol{z}_t - \lambda \nabla \widetilde{F}(\boldsymbol{z}_t) \in \mathcal{N}_{\epsilon} \cap \mathcal{N}_{\widetilde{F}}, \quad \forall 0 \leq \lambda \leq \eta, \] which implies $\boldsymbol{z}_{t+1} = \boldsymbol{z}_t - \eta \nabla \widetilde{F}(\boldsymbol{z}_t) \in \mathcal{N}_{\epsilon} \cap \mathcal{N}_{\widetilde{F}}$. Again, by using Lemma~\ref{lem:DSL} we can prove \[ \widetilde{F}(\boldsymbol{z}_{t+1}) = \widetilde{F}(\boldsymbol{z}_t - \eta \nabla \widetilde{F}(\boldsymbol{z}_t)) \leq \widetilde{F}(\boldsymbol{z}_t) - 2 \eta \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2 + C_L\eta^2 \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2 \leq \widetilde{F}(\boldsymbol{z}_t) - \eta \|\nabla \widetilde{F}(\boldsymbol{z}_t)\|^2, \] where the final inequality is due to $ \eta \leq \frac{1}{C_L}$. \end{proof} We conclude this subsection by proving Theorem~\ref{thm:main} under the \textit{Local regularity condition}, the \textit{Local RIP condition}, the \textit{Robustness condition}, and the \textit{Local smoothness condition}. The next subsections are devoted to justifying these conditions and showing that they hold under the assumptions of Theorem~\ref{thm:main}. \begin{proof}{[\textbf{of Theorem~\ref{thm:main}}]} Suppose that the initial guess $\boldsymbol{z}_0 := (\boldsymbol{u}_0, \boldsymbol{v}_0)\in \frac{1}{\sqrt{3}} \mathcal{N}_{d_0} \bigcap \frac{1}{\sqrt{3}} \mathcal{N}_{\mu} \bigcap \mathcal{N}_{\frac{2}{5}\epsilon}$, we have $G(\boldsymbol{u}_0, \boldsymbol{v}_0) = 0$. This holds, because \begin{equation*} \frac{\|\boldsymbol{u}_0\|^2}{2d} \leq \frac{2d_0}{3d} < 1, \quad \frac{L|\boldsymbol{b}_l^* \boldsymbol{u}_0|^2}{8d\mu^2} \leq \frac{L}{8d\mu^2} \cdot\frac{16d_0\mu^2}{3L} \leq \frac{2d_0}{3d} < 1, \end{equation*} where $\|\boldsymbol{u}_0\| \leq \frac{2\sqrt{d_0}}{\sqrt{3}}$, $\sqrt{L}\|\boldsymbol{B}\boldsymbol{u}_0\|_{\infty} \leq \frac{4 \sqrt{d_0}\mu}{\sqrt{3}}$ and $\frac{9}{10}d_0 \leq d\leq \frac{11}{10}d_0.$ Therefore $G_0\left( \frac{\|\boldsymbol{u}_0\|^2}{2d}\right) = G_0\left( \frac{\|\boldsymbol{v}_0\|^2}{2d}\right) = G_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{u}_0|^2}{8d\mu^2}\right) = 0$ for all $1\leq l\leq L$ and $G(\boldsymbol{u}_0, \boldsymbol{v}_0) = 0.$ Since $(\boldsymbol{u}_0, \boldsymbol{v}_0)\in\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$, ~\eqref{eq:Fuppbd} combined with $\delta(\boldsymbol{z}_0) := \frac{\|\boldsymbol{u}_0\boldsymbol{v}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}{d_0} \leq \frac{2\epsilon}{5}$ imply that \begin{equation*} \widetilde{F}(\boldsymbol{u}_0, \boldsymbol{v}_0) = F(\boldsymbol{u}_0, \boldsymbol{v}_0) \leq \|\boldsymbol{e}\|^2 + \frac{5}{4}\delta^2(\boldsymbol{z}_0) d_0^2 + \frac{1}{5}\epsilon\delta(\boldsymbol{z}_0) d_0^2 < \frac{1}{3}\epsilon^2 d_0^2 + \|\boldsymbol{e}\|^2 \end{equation*} and hence $\boldsymbol{z}_0 = (\boldsymbol{u}_0, \boldsymbol{v}_0)\in \mathcal{N}_{\epsilon}\bigcap \mathcal{N}_{\widetilde{F}}.$ Denote $\boldsymbol{z}_t : = (\boldsymbol{u}_t, \boldsymbol{v}_t).$ Combining Lemma~\ref{lem:induction} by choosing $\eta \leq \frac{1}{C_L}$ with Condition~\ref{cond:reg}, we have \begin{equation*} \widetilde{F}(\boldsymbol{z}_{t + 1}) \leq \widetilde{F}(\boldsymbol{z}_t) - \eta\omega \left[ \widetilde{F}(\boldsymbol{z}_t) - c \right]_+ \end{equation*} with $c = \|\boldsymbol{e}\|^2 + a\|\mathcal{A}^*(\boldsymbol{e})\|^2$, $a = 1700$ and $\boldsymbol{z}_t \in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ for all $t\geq 0.$ Obviously, the inequality above implies \begin{equation*} \widetilde{F}(\boldsymbol{z}_{t+1}) - c \leq (1 - \eta\omega) \left[ \widetilde{F}(\boldsymbol{z}_t) - c \right]_+ , \end{equation*} and by monotonicity of $z_+ = \frac{z + |z|}{2}$, there holds \begin{equation*} \left[ \widetilde{F}(\boldsymbol{z}_{t+1}) - c\right]_+ \leq (1 - \eta\omega) \left[ \widetilde{F}(\boldsymbol{z}_t) - c \right]_+ . \end{equation*} Therefore, by induction, we have \begin{eqnarray*} \left[ \widetilde{F}(\boldsymbol{z}_t) - c\right]_+ & \leq & \left(1 - \eta\omega\right)^t \left[ \widetilde{F}(\boldsymbol{z}_0) - c\right]_+ \leq \frac{1}{3} (1 - \eta\omega)^{t} \epsilon^2 d_0^2 \end{eqnarray*} where $\widetilde{F}(\boldsymbol{z}_0) \leq \frac{1}{3}\epsilon^2d_0^2 + \|\boldsymbol{e}\|^2$ and hence $\left[ \widetilde{F}(\boldsymbol{z}_0) - c \right]_+ \leq \left[ \frac{1}{3}\epsilon^2 d_0^2 - a\|\mathcal{A}^*(\boldsymbol{e})\|^2 \right]_+ \leq \frac{1}{3}\epsilon^2 d_0^2.$ Now we can conclude that $\left[ \widetilde{F}(\boldsymbol{z}_t) - c\right]_+$ converges to $0$ geometrically. Note that over $\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$, \begin{equation*} \widetilde{F}(\boldsymbol{z}_t) - \|\boldsymbol{e}\|^2 \geq F_0(\boldsymbol{z}_t) - 2\Real(\left\langle \mathcal{A}^*(\boldsymbol{e}), \boldsymbol{u}_t\boldsymbol{v}_t^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \right\rangle ) \geq \frac{3}{4} \delta^2(\boldsymbol{z}_t)d_0^2 - 2\sqrt{2}\|\mathcal{A}^*(\boldsymbol{e})\| \delta(\boldsymbol{z}_t)d_0 \end{equation*} where $ \delta(\boldsymbol{z}_t) := \frac{\|\boldsymbol{u}_t\boldsymbol{v}_t^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}{d_0}$, $F_0$ is defined in~\eqref{def:F0} and $G(\boldsymbol{z}_t) \geq 0$. There holds \begin{equation*} \frac{3}{4} \delta^2(\boldsymbol{z}_t)d_0^2 - 2\sqrt{2}\|\mathcal{A}^*(\boldsymbol{e})\| \delta(\boldsymbol{z}_t)d_0 - a\|\mathcal{A}^*(\boldsymbol{e})\|^2 \leq \left[ \widetilde{F}(\boldsymbol{z}_t) - c \right]_+ \leq \frac{1}{3}(1 - \eta\omega)^t \epsilon^2 d_0^2 \end{equation*} and equivalently, \begin{equation*} \left|\delta(\boldsymbol{z}_t)d_0 - \frac{4\sqrt{2}}{3} \|\mathcal{A}^*(\boldsymbol{e})\| \right|^2 \leq \frac{4}{9} (1 - \eta\omega)^t \epsilon^2 d_0^2 + \left(\frac{4}{3}a + \frac{32}{9}\right)\|\mathcal{A}^*(\boldsymbol{e})\|^2. \end{equation*} Solving the inequality above for $\delta(\boldsymbol{z}_t)$, we have \begin{eqnarray} \delta(\boldsymbol{z}_t) d_0 & \leq & \frac{2}{3}(1 - \eta\omega)^{t/2} \epsilon d_0 +\left(\frac{4\sqrt{2}}{3} + \sqrt{\frac{4}{3}a + \frac{32}{9}} \right)\|\mathcal{A}^*(\boldsymbol{e})\| \nonumber \\ & \leq & \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + 50 \|\mathcal{A}^*(\boldsymbol{e})\|. \label{eq:main-res-2} \end{eqnarray} Let $d_t : = \|\boldsymbol{u}_t\|\|\boldsymbol{v}_t\|$, $t\geq 1.$ By~\eqref{eq:main-res-2} and triangle inequality, we immediately conclude that \begin{equation*} |d_t - d_0| \leq \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + 50 \|\mathcal{A}^*(\boldsymbol{e})\|. \end{equation*} Now we derive the upper bound for $\sin \angle (\boldsymbol{u}_t, \boldsymbol{h}_0)$ and $\sin \angle(\boldsymbol{v}_t, \boldsymbol{x}_0).$ Due to symmetry, it suffices to consider $\sin \angle (\boldsymbol{u}_t, \boldsymbol{h}_0)$. The bound follows from standard linear algebra arguments: \begin{eqnarray*} \sin \angle(\boldsymbol{u}_t, \boldsymbol{h}_0) & = & \frac{1}{\|\boldsymbol{u}_t\|}\left\| \left(\boldsymbol{I} - \frac{\boldsymbol{h}_0\boldsymbol{h}_0^*}{d_0}\right)\boldsymbol{u}_t\right\| \\ & = & \frac{1}{\|\boldsymbol{u}_t\| \|\boldsymbol{v}_t\|}\left\| \left(\boldsymbol{I} - \frac{\boldsymbol{h}_0\boldsymbol{h}_0^*}{d_0}\right)(\boldsymbol{u}_t \boldsymbol{v}_t^* - \boldsymbol{h}_0\boldsymbol{x}_0^* )\right\| \\ & \leq & \frac{1}{d_t} \|\boldsymbol{u}_t\boldsymbol{v}_t^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \\ & \leq & \frac{1}{d_t}\left( \frac{2}{3}(1 - \eta\omega)^{t/2}\epsilon d_0 + 50 \|\mathcal{A}^*(\boldsymbol{e})\|\right), \end{eqnarray*} where the second equality uses $\left(\boldsymbol{I} - \frac{\boldsymbol{h}_0\boldsymbol{h}_0^*}{d_0}\right) \boldsymbol{h}_0 = \boldsymbol{0}.$ \end{proof} \subsection{Supporting lemmata} \label{s:lemmata} This subsection introduces several lemmata, especially Lemma~\ref{lem:orth_decomp}, ~\ref{lem:ripu} and~\ref{lem:key}, which are central for justifying Conditions~\ref{cond:rip} and~\ref{cond:reg}. After that, we will prove the \textit{Local RIP Condition} in Lemma~\ref{lem:rip} based on those three lemmata. We start with defining a linear space $T$, which contains $\boldsymbol{h}_0\boldsymbol{x}_0^*$, via \begin{equation}\label{def:T} T := \lc \frac{1}{\sqrt{d_0}}\boldsymbol{h}_0\boldsymbol{v}^* + \frac{1}{\sqrt{d_0}}\boldsymbol{u}\boldsymbol{x}_0^*,~ \boldsymbol{u} \in\mathbb{C}^K, \boldsymbol{v}\in\mathbb{C}^N \rc \subset \mathbb{C}^{K\times N}. \end{equation} Its orthogonal complement is given by \begin{equation*} T^{\bot} : = \lc \left(\boldsymbol{I} - \frac{1}{d_0}\boldsymbol{h}_0\boldsymbol{h}_0^*\right)\boldsymbol{Z}\left(\boldsymbol{I} - \frac{1}{d_0}\boldsymbol{x}_0\boldsymbol{x}_0^*\right),~ \boldsymbol{Z}\in\mathbb{C}^{K\times N} \rc. \end{equation*} Denote $\mathcal{P}_T$ to be the projection operator from $\mathbb{C}^{K\times N}$ onto $T$. For any $\vct{h}$ and $\vct{x}$, there are unique orthogonal decompositions \begin{equation} \label{eq:orth} {\vct{h} = \alpha_1 \vct{h}_0 + \tilde{\vct{h}}, \quad \vct{x} = \alpha_2 \vct{x}_0 + \tilde{\vct{x}}}, \end{equation} where $\vct{h}_0 \perp \tilde{\vct{h}}$ and $\vct{x}_0 \perp \tilde{\vct{x}}$. More precisely, $ \alpha_1 = \frac{\boldsymbol{h}_0^*\boldsymbol{h}}{d_0} = \frac{\left\langle \boldsymbol{h}_0, \boldsymbol{h}\right\rangle}{d_0}$ and $\alpha_2 = \frac{\left\langle \boldsymbol{x}_0, \boldsymbol{x}\right\rangle}{d_0}.$ We thereby have the following matrix orthogonal decomposition \begin{align}\label{eq:decomposition} \vct{h}\vct{x}^* - \vct{h}_0 \vct{x}_0^* = (\alpha_1 \overline{\alpha_2} - 1)\vct{h}_0\vct{x}_0^* + \overline{\alpha_2} \tilde{\vct{h}} \vct{x}_0^* + \alpha_1 \vct{h}_0 \tilde{\vct{x}}^* + \tilde{\vct{h}} \tilde{\vct{x}}^* \end{align} where the first three components are in $T$ while $\tilde{\boldsymbol{h}}\tilde{\boldsymbol{x}}^*\in T^{\bot}$. \begin{lemma} \label{lem:orth_decomp} Recall that $\|\vct{h}_0\| = \|\vct{x}_0\| = \sqrt{d_0}$. If $\delta := \frac{\|\vct{h}\vct{x}^* - \vct{h}_0 \vct{x}_0^*\|_F}{d_0}<1$, we have the following useful bounds \[ |\alpha_1|\leq \frac{\|\vct{h}\|}{\|\vct{h}_0\|}, \quad |\alpha_1\overline{\alpha_2} - 1|\leq \delta, \] and \[ \|\tilde{\vct{h}}\| \leq \frac{\delta}{1 - \delta}\|\vct{h}\|,\quad \|\tilde{\vct{x}}\| \leq \frac{\delta}{1 - \delta}\|\vct{x}\|,\quad \|\tilde{\vct{h}}\| \|\tilde{\vct{x}}\| \leq \frac{\delta^2}{2(1 - \delta)} d_0. \] Moreover, if $\|\vct{h}\| \leq 2\sqrt{d_0}$ and $\sqrt{L}\|\mtx{B} \vct{h}\|_\infty \leq 4\mu \sqrt{d_0}$, we have $\sqrt{L}\|\mtx{B} \tilde{\vct{h}}\|_\infty \leq 6 \mu \sqrt{d_0}$. \end{lemma} \begin{remark} This lemma is actually a simple version of singular value/vector perturbation. It says that if $\frac{\|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}{d_0}$ is of $\mathcal{O}(\delta)$, then the individual vectors $(\boldsymbol{h}, \boldsymbol{x})$ are also close to $(\boldsymbol{h}_0, \boldsymbol{x}_0)$, with the error of order $\mathcal{O}(\delta).$ \end{remark} \begin{proof} The equality \prettyref{eq:orth} implies that $\|\alpha_1 \vct{h}_0\| \leq \|\vct{h}\|$, so there holds $|\alpha_1|\leq \frac{\|\vct{h}\|}{\|\vct{h}_0\|}$. Since $\|\vct{h}\vct{x}^* - \vct{h}_0 \vct{x}_0^*\|_F = \delta d_0$, by \prettyref{eq:decomposition}, we have \begin{equation} \label{eq:pythag} \delta^2d_0^2 = (\alpha_1 \overline{\alpha_2} -1)^2 d_0^2 + |\overline{\alpha_2}|^2 \|\tilde{\vct{h}}\|^2d_0 + |\alpha_1|^2 \|\tilde{\vct{x}}\|^2d_0+ \|\tilde{\vct{h}}\|^2\|\tilde{\vct{x}}\|^2. \end{equation} This implies that \[ \|\vct{h}\|^2\|\tilde{\vct{x}}\|^2 = (\alpha_1^2d_0 + \|\tilde{\vct{h}}\|^2)\|\tilde{\vct{x}}\|^2 \leq \delta^2d_0^2. \] On the other hand, \[ \|\vct{h}\|\|\vct{x}\| \geq \|\vct{h}_0\|\|\vct{x}_0\|- \|\vct{h}\vct{x}^* - \vct{h}_0 \vct{x}_0^*\|_F = (1 - \delta) d_0. \] The above two inequalities imply that $\|\tilde{\vct{x}}\| \leq \frac{\delta}{1 - \delta}\|\vct{x}\|$, and similarly we have $\|\tilde{\vct{h}}\| \leq \frac{\delta}{1 - \delta}\|\vct{h}\|$. The equality \prettyref{eq:pythag} implies that $|\alpha_1 \overline{\alpha_2} -1| \leq \delta$ and hence $|\alpha_1 \overline{\alpha_2}| \geq 1 - \delta$. Moreover, \prettyref{eq:pythag} also implies \[ \|\tilde{\vct{h}}\|\|\tilde{\vct{x}}\| |\alpha_1| |\overline{\alpha_2}| \leq \frac{1}{2}( |\overline{\alpha_2}|^2 \|\tilde{\vct{h}}\|^2 + |\alpha_1|^2\|\tilde{\vct{x}}\|^2) \leq \frac{\delta^2 d_0}{2}, \] which yields $\|\tilde{\vct{h}}\|_2 \|\tilde{\vct{x}}\|_2 \leq \frac{\delta^2}{2(1 - \delta)} d_0$.\\ ~\\ If $\|\vct{h}\| \leq 2\sqrt{d_0}$ and $\sqrt{L}\|\mtx{B} \vct{h}\|_\infty \leq 4\mu \sqrt{d_0}$, there holds $|\alpha_1| \leq \frac{\|\vct{h}\|}{\|\vct{h}_0\|} \leq 2$. Then \begin{eqnarray*} \sqrt{L}\|\mtx{B} \tilde{\vct{h}}\|_\infty & \leq & \sqrt{L}\|\mtx{B} \vct{h}\|_\infty + \sqrt{L}\|\mtx{B}(\alpha_1\vct{h}_0)\|_\infty \leq \sqrt{L}\|\mtx{B} \vct{h}\|_\infty + 2\sqrt{L}\|\mtx{B}\vct{h}_0\|_\infty \\ & \leq & 4 \mu \sqrt{d_0} + 2 \mu_h \sqrt{d_0} \leq 6\mu \sqrt{d_0} \end{eqnarray*} where $\mu_h \leq \mu$. \end{proof} In the following, we introduce and prove a series of local and global properties of $\mathcal{A}$: \begin{lemma}[Lemma 1 in \cite{RR12}] \label{lem:A-UPBD} For $\mathcal{A}$ defined in~\eqref{def:A}, \begin{equation}\label{eq:A-UPBD} \|\mathcal{A}\| \leq \sqrt{N\log(NL/2) + \gamma \log L} \end{equation} with probability at least $1 - L^{-\gamma}.$ \end{lemma} \begin{lemma}[Corollary 2 in~\cite{RR12}] \label{lem:ripu} Let $\mathcal{A}$ be the operator defined in~\eqref{def:A}, then on an event $E_1$ with probability at least $1 - L^{-\gamma}$, $\mathcal{A}$ restricted on $T$ is well-conditioned, i.e., \begin{equation*} \|\mathcal{P}_T\mathcal{A}^*\mathcal{A}\mathcal{P}_T - \mathcal{P}_T\| \leq \frac{1}{10} \end{equation*} where $\mathcal{P}_T$ is the projection operator from $\mathbb{C}^{K\times N}$ onto $T$, provided $L \geq C_{\gamma} \max\{K, \mu_h^2 N\}\log^2(L)$. \end{lemma} Now we introduce a property of $\mathcal{A}$ when restricted on rank-one matrices. \begin{lemma} \label{lem:key} On an event $E_2$ with probability at least $1 - L^{-\gamma} - \frac{1}{\gamma}\exp(-(K+N))$, we have \begin{equation*} \|\mathcal{A}(\vct{u}\vct{v}^*)\|^2 \leq \left(\frac{4}{3}\|\vct{u}\|^2 + 2\|\vct{u}\|\|\mtx{B}\vct{u}\|_\infty \sqrt{2(K+N)\log L} + 8\|\mtx{B}\vct{u}\|_\infty^2(K+N) \log L \right)\|\vct{v}\|^2, \end{equation*} uniformly for any $\vct{u}$ and $\vct{v}$, provided $L\geq C_{\gamma}(K+N)\log L$. \end{lemma} \begin{proof} Due to the homogeneity, without loss of generality we can assume $\|\vct{u}\|=\|\vct{v}\|=1$. Define \[ f(\vct{u}, \vct{v}):=\|\mathcal{A}(\vct{u}\vct{v}^*)\|^2 - 2\|\mtx{B}\vct{u}\|_\infty \sqrt{2(K+N)\log L} - 8\|\mtx{B}\vct{u}\|_\infty^2(K+N)\log L. \] It suffices to prove that $f(\vct{u}, \vct{v})\leq \frac{4}{3}$ uniformly for all $(\vct{u}, \vct{v}) \in \mathcal{S}^{K-1}\times \mathcal{S}^{N-1}$ with high probability, where $\mathcal{S}^{K-1}$ is the unit sphere in $\mathbb{C}^K.$ For fixed $(\vct{u}, \vct{v}) \in \mathcal{S}^{K-1}\times \mathcal{S}^{N-1}$, notice that \begin{equation*} \|\mathcal{A}(\vct{u}\vct{v}^*)\|^2 = \sum\limits_{l=1}^L |\vct{b}_l^* \vct{u}|^2 |\vct{a}_l^* \vct{v}|^ \end{equation*} is the sum of subexponential variables with expectation $\mathbb{E} \|\mathcal{A}(\vct{u}\vct{v}^*)\|^2 = \sum\limits_{l=1}^L |\vct{b}_l^* \vct{u}|^2 = 1$. For any generalized $\chi_n^2$ variable $Y \sim \sum_{i=1}^n c_i \xi_i^2$ satisfies \begin{equation}\label{ineq:bern} \mathbb{P}(Y - \mathbb{E}(Y) \geq t) \leq \exp\left(- \frac{t^2}{8\|\vct{c}\|_2^2}\right) \vee \exp\left(- \frac{t}{8\|\vct{c}\|_\infty}\right), \end{equation} where $\{\xi_i\}$ are i.i.d. $\chi^2_1$ random variables and $\boldsymbol{c} = (c_1, \cdots, c_n)^T\in \mathbb{R}^n$. Here we set $|\boldsymbol{a}_l^*\boldsymbol{v}|^2 = \frac{1}{2} \xi_{2l-1}^2 + \frac{1}{2}\xi_{2l}^2$, $c_{2l-1} = c_{2l} = \frac{|\boldsymbol{b}_l^*\boldsymbol{u}|^2}{2}$ and $n = 2L$. Therefore, \begin{equation*} \|\boldsymbol{c}\|_{\infty} = \frac{\|\boldsymbol{B}\boldsymbol{u}\|_{\infty}^2}{2}, \quad \|\boldsymbol{c}\|_2^2 = \frac{1}{2}\sum_{l=1}^L |\boldsymbol{b}_l^*\boldsymbol{u}|^4 \leq \frac{\|\boldsymbol{B}\boldsymbol{u}\|^2_{\infty}}{2} \end{equation*} and we have \begin{equation*} \mathbb{P}(\|\mathcal{A}(\vct{u}\vct{v}^*)\|^2 \geq 1 + t)\leq \exp\left(- \frac{t^2}{4 \|\mtx{B}\vct{u}\|_\infty^2}\right) \vee \exp\left(- \frac{t}{4\|\mtx{B}\vct{u}\|_\infty^2}\right). \end{equation*} Applying~\eqref{ineq:bern} and setting \[ t = g(\vct{u}):= 2\|\mtx{B}\vct{u}\|_\infty \sqrt{2(K+N)\log L} + 8\|\boldsymbol{B}\boldsymbol{u}\|^2_{\infty}(K + N)\log L, \] there holds \[ \mathbb{P}\left(\|\mathcal{A}(\vct{u}\vct{v}^*)\|^2 \geq 1 + g(\vct{u})\right) \leq \exp\left( - 2 (K+N)(\log L) \right). \] That is, $f(\vct{u}, \vct{v}) \leq 1$ with probability at least $1 - \exp\left( - 2 (K+N)(\log L) \right)$. We define $\mathcal{K}$ and $\mathcal{N}$ as $\epsilon_0$-nets of $\mathcal{S}^{K-1}$ and $\mathcal{S}^{N-1}$, respectively. Then, $|\mathcal{K}|\leq (1+\frac{2}{\epsilon_0})^{2K}$ and $|\mathcal{N}|\leq (1+\frac{2}{\epsilon_0})^{2N}$ follow from the covering numbers of the sphere (Lemma 5.2 in~\cite{Ver10}). By taking the union bounds over $\mathcal{K}\times \mathcal{N},$ we have $f(\vct{u}, \vct{v})\leq 1$ holds uniformly for all $(\vct{u}, \vct{v}) \in \mathcal{K} \times \mathcal{N}$ with probability at least \[ 1- \left(1+\frac{2}{\epsilon_0}\right)^{2(K + N)} e^{ - 2 (K+N)\log L } = 1- \exp\left( -2(K + N)\left(\log L - \log \left(1 + \frac{2}{\epsilon_0}\right)\right) \right). \] Our goal is to show that $f(\vct{u}, \vct{v})\leq \frac{4}{3}$ uniformly for all $(\vct{u}, \vct{v}) \in \mathcal{S}^{K-1}\times \mathcal{S}^{N-1}$ with the same probability. For any $(\vct{u}, \vct{v}) \in \mathcal{S}^{K-1}\times \mathcal{S}^{N-1}$, we can find its closest $(\vct{u}_0, \vct{v}_0) \in \mathcal{K} \times \mathcal{N}$ satisfying $\| \boldsymbol{u} - \boldsymbol{u}_0 \| \leq \epsilon_0$ and $\|\boldsymbol{v} - \boldsymbol{v}_0\| \leq \epsilon_0$. By \prettyref{lem:A-UPBD}, with probability at least $1 - L^{-\gamma}$, we have $\|\mathcal{A}\| \leq \sqrt{(N+\gamma)\log L}$. Then straightforward calculation gives \begin{eqnarray*} | f(\vct{u}, \vct{v}) - f(\vct{u}_0, \vct{v})| & \leq & \| \mathcal{A}((\vct{u} - \vct{u}_0)\vct{v}^*)\|\|\mathcal{A}((\vct{u} + \vct{u}_0)\vct{v}^*)\| \\ && + 2\|\mtx{B}(\vct{u} - \vct{u}_0)\|_\infty \sqrt{2(K+N)\log L}\\ && + 8(K+N) (\log L) \|\mtx{B}(\vct{u} - \vct{u}_0)\|_\infty(\|\mtx{B}\vct{u}\|_\infty + \|\mtx{B}\vct{u}_0\|_\infty) \\ & \leq & 2\|\mathcal{A}\|^2 \epsilon_0 + 2\sqrt{2(K+N)\log L}\epsilon_0 + 16(K + N)(\log L) \epsilon_0 \\ &\leq & (21N + 19K + 2\gamma )(\log L) \epsilon_0 \end{eqnarray*} where the first inequality is due to $||z_1|^2 - |z_2|^2| \leq |z_1 - z_2||z_1 + z_2|$ for any $z_1, z_2 \in \mathbb{C}$, and the second inequality is due to $\|\boldsymbol{B} \vct{z} \|_{\infty} \leq \|\boldsymbol{B} \vct{z} \| = \|\vct{z}\|$ for any $\vct{z} \in \mathbb{C}^K$. Similarly, \begin{eqnarray*} |f(\vct{u}_0, \vct{v}) - f(\vct{u}_0, \vct{v}_0)| & = & \| \mathcal{A}( \vct{u}_0 (\vct{v} + \vct{v}_0)^*)\|\| \mathcal{A}( \vct{u}_0 (\vct{v} - \vct{v}_0)^*)\| \\ & \leq & 2\|\mathcal{A}\|^2\epsilon_0 \leq 2( N + \gamma)(\log L)\epsilon_0 . \end{eqnarray*} Therefore, if $\epsilon_0 = \frac{1}{70(N + K + \gamma)\log L}$, there holds \[ |f(\vct{u}_0, \vct{v}) - f(\vct{u}_0, \vct{v}_0)| \leq \frac{1}{3}. \] Therefore, if $L \geq C_{\gamma}(K+N)\log L$ with $C_{\gamma}$ reasonably large and $\gamma \geq 1$, we have $\log L - \log\left(1 + \frac{2}{\epsilon_0}\right) \geq \frac{1}{2}(1 + \log(\gamma))$ and $f(\vct{u}, \vct{v})\leq \frac{4}{3}$ uniformly for all $(\vct{u}, \vct{v}) \in \mathcal{S}^{K-1}\times \mathcal{S}^{N-1}$ with probability at least $1- L^{-\gamma} - \frac{1}{\gamma}\exp(-(K+N))$. \end{proof} Finally, we introduce a local RIP property of $\mathcal{A}$ conditioned on the event $E_1\cap E_2$, where $E_1$ and $E_2$ are defined in Lemma~\ref{lem:ripu} and Lemma~\ref{lem:key} \begin{lemma} \label{lem:rip} Over $\MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ with $\mu \geq \mu_h$ and $\epsilon \leq \frac{1}{15}$, the following RIP type of property holds for $\mathcal{A}$: \begin{equation*} \frac{3}{4} \|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F^2 \leq \|\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*)\|^2 \leq \frac{5}{4}\|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F^2 \end{equation*} provided $L \geq C\mu^2 (K+N)\log^2 L$ for some numerical constant $C$ and conditioned on $E_1\bigcap E_2.$ \end{lemma} \begin{proof} Let $\delta : = \frac{\|\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F}{d_0} \leq \epsilon \leq \frac{1}{15}$, and \[ \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^* := \boldsymbol{U} + \boldsymbol{V}. \] where \begin{equation} \label{eq:UV} \boldsymbol{U} = (\alpha_1 \overline{\alpha_2} - 1)\vct{h}_0\vct{x}_0^* + \overline{\alpha_2} \tilde{\vct{h}} \vct{x}_0^* + \alpha_1 \vct{h}_0 \tilde{\vct{x}}^* \in T,\quad \boldsymbol{V} = \tilde{\vct{h}} \tilde{\vct{x}}^* \in T^\perp. \end{equation} By \prettyref{lem:orth_decomp}, we have $\|\boldsymbol{V}\|_F \leq \frac{\delta^2}{2(1 - \delta)} d_0$ and hence \[ \left(\delta - \frac{\delta^2}{2(1 - \delta)}\right)d_0 \leq \|\boldsymbol{U} \|_F \leq \left(\delta + \frac{\delta^2}{2(1 - \delta)}\right)d_0. \] Since $\boldsymbol{U} \in T$, by \prettyref{lem:ripu}, we have \begin{equation} \label{eq:AU} \sqrt{\frac{9}{10}}\left(\delta - \frac{\delta^2}{2(1 - \delta)}\right)d_0 \leq \|\mathcal{A}(\boldsymbol{U}) \| \leq \sqrt{\frac{11}{10}}\left(\delta + \frac{\delta^2}{2(1 - \delta)}\right)d_0. \end{equation} By \prettyref{lem:key}, we have \begin{equation}\label{ineq:AV} \|\mathcal{A}(\boldsymbol{V})\|^2 \leq \left(\frac{4}{3}\|\tilde{\vct{h}}\|_2^2 + 2\|\tilde{\vct{h}}\|\|\mtx{B}\tilde{\vct{h}}\|_\infty \sqrt{2(K+N)\log L} + 8\|\mtx{B}\tilde{\vct{h}}\|_\infty^2(K+N) (\log L)\right) \|\tilde{\vct{x}}\|^2. \end{equation} By \prettyref{lem:orth_decomp}, we have $\|\tilde{\vct{h}}\| \|\tilde{\vct{x}}\| \leq \frac{\delta^2}{2(1 - \delta)} d_0$, $\|\tilde{\vct{x}}\| \leq \frac{\delta}{1 - \delta}\|\vct{x}\| \leq \frac{2\delta}{1 - \delta} \sqrt{d_0}$, $\|\tilde{\vct{h}}\| \leq \frac{\delta}{1 - \delta}\|\vct{h}\| \leq \frac{2\delta}{1 - \delta} \sqrt{d_0}$, and $\sqrt{L}\|\mtx{B} \tilde{\vct{h}}\|_\infty \leq 6 \mu \sqrt{d_0}$. By substituting all those estimations into~\eqref{ineq:AV}, it ends up with \begin{equation} \label{eq:AV} \|\mathcal{A}(\boldsymbol{V})\|^2 \leq \frac{\delta^4}{3(1-\delta)^2} d_0^2 + C'\left(\frac{\delta^3}{\sqrt{C\log L}} + \frac{\delta^2}{C\log L} \right)d_0^2, \end{equation} where $C'$ is a numerical constant and $L \geq C\mu^2 (K + N)\log^2 L$. Combining \prettyref{eq:AV} and \prettyref{eq:AU} together with $C$ sufficiently large, numerical computation gives \[ \frac{3}{4}\delta d_0 \leq \|\mathcal{A}(\boldsymbol{U})\| - \|\mathcal{A}(\boldsymbol{V})\| \leq \|\mathcal{A}(\boldsymbol{U} + \boldsymbol{V})\| \leq \|\mathcal{A}(\boldsymbol{U})\| + \|\mathcal{A}(\boldsymbol{V})\| \leq \frac{5}{4}\delta d_0. \] for all $(\boldsymbol{h}, \boldsymbol{x})\in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ given $\epsilon \leq \frac{1}{15}$. \end{proof} \subsection{Local regularity} \label{s:LRC} In this subsection, we will prove Condition~\ref{cond:reg}. Throughout this section, we assume $E_1$ and $E_2$ holds where $E_1$ and $E_2$ are mentioned in Lemma~\ref{lem:ripu} and Lemma~\ref{lem:key}. For all $(\vct{h}, \vct{x}) \in \mathcal{N}_{d_0} \cap \mathcal{N}_{\epsilon}$, consider $\alpha_1, \alpha_2, \tilde{\vct{h}}$ and $\tilde{\vct{x}}$ defined in \prettyref{eq:orth} and let \begin{equation*} \Delta\boldsymbol{h} = \boldsymbol{h} - \alpha \boldsymbol{h}_0, \quad \Delta\boldsymbol{x} = \boldsymbol{x} - \overline{\alpha}^{-1}\boldsymbol{x}_0. \end{equation*} where \begin{equation*} \alpha (\vct{h}, \vct{x})= \begin{cases} (1 - \delta_0)\alpha_1, & \text{~if~} \|\vct{h}\|_2 \geq \|\vct{x}\|_2 \\ \frac{1}{(1 - \delta_0)\overline{\alpha_2}}, & \text{~if~} \|\vct{h}\|_2 < \|\vct{x}\|_2\end{cases} \end{equation*} with $\delta_0 := \frac{\delta}{10}$. The particular form of $\alpha(\boldsymbol{h}, \boldsymbol{x})$ serves primarily for proving the local regularity condition of $G(\boldsymbol{h}, \boldsymbol{x})$, which will be evident in Lemma~\ref{lem:regG}. The following lemma gives bounds of $\Delta\boldsymbol{x}$ and $\Delta\boldsymbol{h}$.\\ \begin{lemma} \label{lem:DxDh} For all $(\vct{h}, \vct{x}) \in \mathcal{N}_{d_0} \cap \mathcal{N}_{\epsilon}$ with $\epsilon \leq \frac{1}{15}$, there holds $\|\Delta\boldsymbol{h}\|_2^2 \leq 6.1 \delta^2 d_0$, $\|\Delta\boldsymbol{x}\|_2^2 \leq 6.1 \delta^2 d_0$, and $\|\Delta\boldsymbol{h}\|_2^2 \|\Delta\boldsymbol{x}\|_2^2 \leq 8.4 \delta^4 d_0^2$. Moreover, if we assume $(\vct{h}, \vct{x}) \in \mathcal{N}_{\mu}$ additionally, we have $ \sqrt{L}\|\mtx{B}(\Delta\boldsymbol{h})\|_\infty \leq 6\mu\sqrt{d_0}$. \end{lemma} \begin{proof} We first prove that $\|\Delta\boldsymbol{h}\|_2^2 \leq 6.1 \delta^2 d_0$, $\|\Delta\boldsymbol{x}\|_2^2 \leq 6.1 \delta^2 d_0$, and $\|\Delta\boldsymbol{h}\|_2^2 \|\Delta\boldsymbol{x}\|_2^2 \leq 8.4 \delta^4 d_0^2$:\\ Case 1: $\|\vct{h}\|_2 \geq \|\vct{x}\|_2$ and $\alpha = (1 - \delta_0) \alpha_1$. In this case, we have \[ \Delta\boldsymbol{h} = \tilde{\vct{h}} + \delta_0 \alpha_1 \vct{h}_0,\quad \Delta\boldsymbol{x} = \vct{x} - \frac{1}{(1 - \delta_0)\overline{\alpha}_1} \vct{x}_0 = \left(\alpha_2 - \frac{1}{(1 - \delta_0)\overline{\alpha}_1}\right)\vct{x}_0 + \tilde{\vct{x}}. \] First, notice that $\|\vct{h}\|_2^2 \leq 4d_0$ and $\|\alpha_1 \vct{h}_0\|_2^2\leq \|\vct{h}\|_2^2$. By \prettyref{lem:orth_decomp}, we have \begin{equation}\label{eq:Dh-est} \|\Delta\boldsymbol{h}\|_2^2 = \|\tilde{\vct{h}}\|_2^2 + \delta_0^2\|\alpha_1 \vct{h}_0\|_2^2 \leq \left(\left(\frac{\delta}{1-\delta}\right)^2 + \delta_0^2\right)\|\vct{h}\|_2^2 \leq 4.7 \delta^2 d_0. \end{equation} Secondly, we estimate $\|\Delta \boldsymbol{x}\|.$ Note that $\|\vct{h}\|_2 \|\vct{x}\|_2 \leq (1+\delta)d_0$. By $\|\vct{h}\|_2 \geq \|\vct{x}\|_2$, we have $\|\vct{x}\|_2 \leq \sqrt{(1+\delta)d_0}$. By $|\alpha_2| \|\vct{x}_0\|_2 \leq \|\vct{x}\|_2$, we get $|\alpha_2| \leq \sqrt{1+\delta}$. By \prettyref{lem:orth_decomp}, we have $|\overline{\alpha_1} \alpha_2 -1|=|\alpha_1 \overline{\alpha_2} -1|\leq \delta$, so \[ \left|\alpha_2 - \frac{1}{(1 - \delta_0)\overline{\alpha_1}}\right| = |\alpha_2| \left|\frac{(1 - \delta_0)(\overline{\alpha_1} \alpha_2- 1) - \delta_0}{(1 - \delta_0)\overline{\alpha_1} \alpha_2}\right| \leq \frac{\delta \sqrt{1+ \delta}}{1 - \delta} + \frac{\sqrt{1+\delta}\delta_0}{(1 - \delta_0)(1 - \delta)}\leq 1.22 \delta \] where $|\overline{\alpha_1}\alpha_2| \leq \frac{1}{1 - \delta}.$ Moreover, by \prettyref{lem:orth_decomp}, we have $\|\tilde{\vct{x}}\|_2 \leq \frac{\delta}{1-\delta}\|\vct{x}\|_2 \leq \frac{2\delta}{1-\delta} \sqrt{d_0}$. Then we have \begin{equation}\label{eq:Dx-est} \|\Delta\boldsymbol{x}\|_2^2 = \left|\alpha_2 - \frac{1}{(1 - \delta_0)\overline{\alpha}_1}\right|^2 d_0 + \|\tilde{\vct{x}}\|_2^2 \leq \left(1.22^2+ \frac{4}{(1 - \delta)^2}\right) \delta^2 d_0 \leq 6.1 \delta^2 d_0. \end{equation} Finally, \prettyref{lem:orth_decomp} gives $\|\tilde{\vct{h}}\|_2 \|\tilde{\vct{x}}\|_2 \leq \frac{\delta^2}{2(1 - \delta)} d_0$ and $|\alpha_1| \leq 2$. Combining~\eqref{eq:Dh-est} and~\eqref{eq:Dx-est}, we have \begin{align*} \|\Delta\boldsymbol{h}\|_2^2 \|\Delta\boldsymbol{x}\|_2^2 &\leq \|\tilde{\boldsymbol{h}}\|_2^2\|\tilde{\boldsymbol{x}}\|_2^2 + \delta_0^2 |\alpha_1|^2 \|\vct{h}_0\|_2^2 \|\Delta\boldsymbol{x}\|_2^2 + \left|\alpha_2 - \frac{1}{(1 - \delta_0)\overline{\alpha}_1}\right|^2 \|\vct{x}_0\|_2^2 \|\Delta\boldsymbol{h}\|_2^2 \\ & \leq \left(\frac{\delta^4}{4(1 - \delta)^2} d_0^2 + \delta_0^2(4d_0) (6.1 \delta^2 d_0) + (1.22 \delta)^2 d_0 (4.7 \delta^2 d_0 )\right) \leq 8.4 \delta^4 d_0^2. \end{align*} where $\|\tilde{\boldsymbol{x}}\| \leq \|\Delta\boldsymbol{x}\|$. ~\\ Case 2: $\|\vct{h}\|_2 < \|\vct{x}\|_2$ and $\alpha = \frac{1}{(1-\delta_0)\overline{\alpha_2}}$. In this case, we have \[ \Delta\boldsymbol{h} = \left(\alpha_1 - \frac{1}{(1 - \delta_0)\overline{\alpha_2}}\right)\vct{h}_0 + \tilde{\vct{h}},\quad \Delta\boldsymbol{x} = \tilde{\vct{x}} + \delta_0 \alpha_2 \vct{x}_0. \] By the symmetry of $ \mathcal{N}_{d_0} \cap \mathcal{N}_{\epsilon}$, we can prove $|\alpha_1| \leq \sqrt{1+\delta}$, \[ \left|\alpha_1 - \frac{1}{(1 - \delta_0)\overline{\alpha_2}}\right| \leq \frac{\delta \sqrt{1+ \delta}}{1 - \delta} + \frac{\sqrt{1+\delta}\delta_0}{(1 - \delta_0)(1 - \delta)} \leq 1.22 \delta. \] Moreover, we can prove $\|\Delta\boldsymbol{h}\|_2^2 \leq 6.1 \delta^2 d_0$, $\|\Delta\boldsymbol{x}\|_2^2 \leq 4.7 \delta^2 d_0$ and $\|\Delta\boldsymbol{h}\|_2^2 \|\Delta\boldsymbol{x}\|_2^2 \leq 8.4 \delta^4 d^2$.\\ ~\\ Next, under the additional assumption $(\vct{h}, \vct{x}) \in \mathcal{N}_{\mu}$, we now prove $\sqrt{L}\|\mtx{B}(\Delta\boldsymbol{h})\|_\infty \leq 6\mu\sqrt{d_0}$:\\ Case 1: $\|\vct{h}\|_2 \geq \|\vct{x}\|_2$ and $\alpha = (1 - \delta_0) \alpha_1$. By \prettyref{lem:orth_decomp} gives $|\alpha_1| \leq 2$, which implies \begin{align*} \sqrt{L}\|\mtx{B}(\Delta\boldsymbol{h})\|_\infty &\leq \sqrt{L}\|\mtx{B}\vct{h}\|_\infty + (1 - \delta_0) |\alpha_1|\sqrt{L}\|\mtx{B}\vct{h}_0\|_\infty \\ &\leq 4\mu\sqrt{d_0} + 2(1 - \delta_0)\mu_h \sqrt{d}_0 \leq 6\mu\sqrt{d_0}. \end{align*} Case 2: $\|\vct{h}\|_2 < \|\vct{x}\|_2$ and $\alpha = \frac{1}{(1-\delta_0)\overline{\alpha_2}}$. Notice that in this case we have $|\alpha_1| \leq \sqrt{1+\delta}$, so $\frac{1}{|(1 -\delta_0)\overline{\alpha_2}|}= \frac{|\alpha_1|}{|(1 -\delta_0)\overline{\alpha_2} \alpha_1|} \leq \frac{\sqrt{1+\delta}}{|1 - \delta_0||1 - \delta|}$. Therefore \begin{align*} \sqrt{L}\|\mtx{B}(\Delta\boldsymbol{h})\|_\infty &\leq \sqrt{L}\|\mtx{B}(\vct{h})\|_\infty + \frac{1}{(1 - \delta_0) |\overline{\alpha_2}|} \sqrt{L}\|\mtx{B}(\vct{h}_0)\|_\infty \\ &\leq 4\mu\sqrt{d_0} + \frac{\sqrt{1+\delta}}{|1 - \delta_0||1 - \delta|}\mu_h \sqrt{d}_0 \leq 5.2 \mu\sqrt{d_0}. \end{align*} \end{proof} \begin{lemma}\label{lem:regF} For any $(\boldsymbol{h}, \boldsymbol{x}) \in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ with $\epsilon \leq \frac{1}{15}$, the following inequality holds uniformly: \begin{equation*} \Real\lp\left\langle \nabla F_{\boldsymbol{h}}, \Delta\boldsymbol{h} \right\rangle + \left\langle \nabla F_{\boldsymbol{x}}, \Delta\boldsymbol{x} \right\rangle\rp \geq \frac{\delta^2 d_0^2}{8} - 2\delta d_0 \|\mathcal{A}^*(\boldsymbol{e})\|, \end{equation*} provided $L \geq C\mu^2 (K+N)\log^2 L$ for some numerical constant $C$. \end{lemma} \begin{proof} In this section, define $\boldsymbol{U}$ and $\boldsymbol{V}$ as \begin{equation} \label{eq:UV2} \boldsymbol{U} = \alpha\boldsymbol{h}_0\Delta\boldsymbol{x}^* + \overline{\alpha}^{-1}\Delta\boldsymbol{h}\boldsymbol{x}_0^* \in T, \quad \boldsymbol{V} = \Delta\boldsymbol{h}\Delta\boldsymbol{x}^*, \end{equation} which gives \begin{equation*} \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^* = \boldsymbol{U} + \boldsymbol{V}. \end{equation*} Notice that generally $\boldsymbol{V} \in T^\perp$ does not hold. Recall that \begin{equation*} \nabla F_{\boldsymbol{h}} = \mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e}) \boldsymbol{x}, \quad \nabla F_{\boldsymbol{x}} = [\mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e})]^* \boldsymbol{h}. \end{equation*} Define $I_0 := \left\langle \nabla_{\vct{h}} F, \Delta\boldsymbol{h} \right\rangle + \overline{\left\langle \nabla_{\boldsymbol{x}} F, \Delta\boldsymbol{x} \right\rangle}$ and we have $\Real(I_0)=\Real\lp\left\langle \nabla_{\vct{h}} F, \Delta\boldsymbol{h} \right\rangle + \left\langle \nabla_{\boldsymbol{x}} F, \Delta\boldsymbol{x} \right\rangle\rp$. Since \begin{eqnarray*} I_0 & = & \left\langle \mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e}), \Delta\boldsymbol{h} \boldsymbol{x}^* + \boldsymbol{h} \Delta\boldsymbol{x}^* \right\rangle \\ & = & \left\langle \mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e}, \mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^* + \Delta\boldsymbol{h}\Delta\boldsymbol{x}^*) \right\rangle \\ & = & \left\langle \mathcal{A}(\boldsymbol{U} + \boldsymbol{V}), \mathcal{A}(\boldsymbol{U} + 2\boldsymbol{V})\right\rangle - \left\langle \mathcal{A}^*(\boldsymbol{e}), \boldsymbol{U} + 2\boldsymbol{V}\right\rangle: = I_{01} + I_{02} \end{eqnarray*} where $\Delta\boldsymbol{h}\boldsymbol{x}^* + \boldsymbol{h} \Delta\boldsymbol{x}^* = \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^* + \Delta\boldsymbol{h}\Delta\boldsymbol{x}^*.$ By the Cauchy-Schwarz inequality, $\Real(I_{01})$ has the lower bound \begin{eqnarray} \label{eq:I_0} \Real(I_{01})& \geq & \|\mathcal{A}(\boldsymbol{U})\|^2 - 3\|\mathcal{A}(\boldsymbol{U})\|\|\mathcal{A}(\boldsymbol{V})\| + 2\|\mathcal{A}(\boldsymbol{V})\|^2 \nonumber \\ & \geq & (\|\mathcal{A}(\boldsymbol{U})\| - \|\mathcal{A}(\boldsymbol{V})\|) (\|\mathcal{A}(\boldsymbol{U})\| - 2\|\mathcal{A}(\boldsymbol{V})\|). \end{eqnarray} In the following, we will give an upper bound for $\|\mathcal{A}(\boldsymbol{V})\|$ and a lower bound for $\|\mathcal{A}(\boldsymbol{U})\|$. Upper bound for $\|\mathcal{A}(\boldsymbol{V})\|$: By \prettyref{lem:DxDh} and \prettyref{lem:key}, we have \begin{align*} \|\mathcal{A}(\boldsymbol{V})\|^2 &\leq \left(\frac{4}{3}\|\Delta\boldsymbol{h}\|^2 + 2\|\Delta\boldsymbol{h}\| \|\mtx{B}\Delta\boldsymbol{h}\|_\infty \sqrt{2(K+N)\log L} + 8\|\mtx{B}\Delta\boldsymbol{h}\|_\infty^2 (K+N) (\log L)\right)\|\Delta\boldsymbol{x}\|^2 \\ &\leq \left(11.2 \delta^2 + C_0\left(\delta \mu \sqrt{\frac{1}{L} (K+N)(\log L)} +\frac{1}{L}\mu^2 (K+N)(\log L)\right) \right) \delta^2 d_0^2 \\ & \leq \left(11.2\delta^2 + C_0\left( \frac{\delta}{\sqrt{ C\log L}} + \frac{1}{C\log L}\right)\right) \delta^2 d_0^2 \end{align*} for some numerical constant $C_0$. Then by $\delta \leq \epsilon \leq \frac{1}{15}$ and letting $L \geq C\mu^2 (K + N)\log^2 L$ for a sufficiently large numerical constant $C$, there holds \begin{equation}\label{eq:AVdelta} \|\mathcal{A}(\boldsymbol{V})\|^2 <\frac{\delta^2 d_0^2}{16} \implies \|\mathcal{A}(\boldsymbol{V})\| \leq \frac{\delta d_0}{4}. \end{equation} Lower bound for $\|\mathcal{A}(\boldsymbol{U})\|$: By \prettyref{lem:DxDh}, we have \[ \|\boldsymbol{V}\|_F = \|\Delta\boldsymbol{h}\|_2 \|\Delta\boldsymbol{x}\|_2 \leq 2.9 \delta^2 d_0, \] and therefore \[ \|\boldsymbol{U}\|_F \geq d_0 \delta - 2.9\delta^2 d_0 \geq \frac{4}{5} d_0 \delta. \] if $\epsilon \leq \frac{1}{15}$. Since $\boldsymbol{U} \in T$, by \prettyref{lem:ripu}, there holds \begin{equation}\label{eq:AUdelta} \|\mathcal{A}(\boldsymbol{U})\| \geq \sqrt{\frac{9}{10}}\|\boldsymbol{U}\|_F \geq \frac{3}{4} d_0 \delta. \end{equation} With the upper bound of $\mathcal{A}(\boldsymbol{V})$ in~\eqref{eq:AVdelta}, the lower bound of $\mathcal{A}(\boldsymbol{U})$ in \eqref{eq:AUdelta}, and~\eqref{eq:I_0}, we finally arrive at \[ \Real(I_{01}) \geq \frac{\delta^2 d_0^2}{8}. \] Now let us give a lower bound for $\Real(I_{02})$, \begin{equation*} \Real(I_{02}) \geq - \|\mathcal{A}^*(\boldsymbol{e})\| \|\boldsymbol{U} + 2\boldsymbol{V}\|_* \geq - \sqrt{2}\|\mathcal{A}^*(\boldsymbol{e})\| \|\boldsymbol{U} + 2\boldsymbol{V}\|_F \geq -2\delta d_0 \|\mathcal{A}^*(\boldsymbol{e})\| \end{equation*} where $\|\cdot\|$ and $\|\cdot\|_*$ are a pair of dual norms and \begin{equation*} \|\boldsymbol{U} + 2\boldsymbol{V}\|_F \leq \|\boldsymbol{U} + \boldsymbol{V}\|_F + \|\boldsymbol{V}\|_F \leq \delta d_0+ 2.9\delta^2 d_0 \leq 1.2\delta d_0 \end{equation*} if $\delta \leq \epsilon \leq \frac{1}{15}.$ Combining the estimation of $\Real(I_{01})$ and $\Real(I_{02})$ above leads to \begin{equation*} \Real( \left\langle \nabla F_{\boldsymbol{h}}, \Delta\boldsymbol{h}\right\rangle + \left\langle \nabla F_{\boldsymbol{x}}, \Delta\boldsymbol{x}\right\rangle \geq \frac{\delta^2 d_0^2}{8} - 2\delta d_0 \|\mathcal{A}^*(\boldsymbol{e})\| \end{equation*} as we desired. \end{proof} \begin{lemma}\label{lem:regG} For any $(\boldsymbol{h}, \boldsymbol{x}) \in \mathcal{N}_{d_0} \bigcap \mathcal{N}_{\epsilon}$ with $\epsilon \leq \frac{1}{15}$ and $\frac{9}{10}d_0 \leq d\leq \frac{11}{10}d_0$, the following inequality holds uniformly \begin{equation} \label{eq:G_regularity} \Real\lp\left\langle \nabla G_{\boldsymbol{h}}, \Delta\boldsymbol{h} \right\rangle + \left\langle \nabla G_{\boldsymbol{x}}, \Delta\boldsymbol{x} \right\rangle\rp \geq {\frac{\delta }{5}}\sqrt{ \rho G(\boldsymbol{h}, \boldsymbol{x})}, \end{equation} where $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2.$ \end{lemma} \begin{proof} Recall that $G_0'(z) = 2\max\{z - 1, 0\} = 2\sqrt{G_0(z)}$. Using the Wirtinger derivative of $G$ in~\eqref{eq:WGh} and~\eqref{eq:WGx}, we have \[ \left\langle \nabla G_{\boldsymbol{h}}, \Delta\boldsymbol{h} \right\rangle + \left\langle \nabla G_{\boldsymbol{x}}, \Delta\boldsymbol{x} \right\rangle := \frac{\rho}{2d} \left(H_1 +H_2 +H_3\right), \] where \begin{equation} H_1 = G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right) \left\langle \boldsymbol{h}, \Delta\boldsymbol{h} \right\rangle, \quad H_2 = G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \left\langle\boldsymbol{x}, \Delta\boldsymbol{x} \right\rangle, \end{equation} and \begin{equation*} H_3 = \frac{L}{4\mu^2} \sum_{l=1}^L G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle. \end{equation*} We will give lower bounds for $H_1$, $H_2$ and $H_3$ for two cases.\\ \paragraph{Case 1} $\|\vct{h}\|_2 \geq \|\vct{x}\|_2$ and $\alpha = (1 - \delta_0) \alpha_1$. \paragraph{Lower bound of $H_1$:} Notice that \[ \Delta\boldsymbol{h} = \boldsymbol{h} - \alpha \boldsymbol{h}_0 = \boldsymbol{h} - (1 - \delta_0)\alpha_1 \boldsymbol{h}_0 = \boldsymbol{h} - (1-\delta_0)(\boldsymbol{h} - \tilde{\boldsymbol{h}}) = \delta_0 \boldsymbol{h} + (1 - \delta_0) \tilde{\boldsymbol{h}}. \] We have $\left\langle \boldsymbol{h}, \Delta\boldsymbol{h} \right\rangle = \delta_0 \|\boldsymbol{h}\|_2^2 + (1 - \delta_0) \left\langle \boldsymbol{h}, \tilde{\boldsymbol{h}}\right\rangle = \delta_0 \|\boldsymbol{h}\|_2^2 + (1 - \delta_0) \|\tilde{\boldsymbol{h}}\|_2^2 \geq \delta_0 \|\boldsymbol{h}\|_2^2$, which implies that $H_1 \geq G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right) \frac{\delta}{10} \|\boldsymbol{h}\|_2^2$. We claim that \begin{equation} \label{eq:H1_lower} H_1 \geq \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right). \end{equation} In fact, if $\|\boldsymbol{h}\|_2^2 \leq 2d$, we get $H_1 = 0 = \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right)$; If $\|\boldsymbol{h}\|_2^2 > 2d$, we get \eqref{eq:H1_lower} straightforwardly. \paragraph{Lower bound of $H_2$:} The assumption $\|\vct{h}\|_2 \geq \|\vct{x}\|_2$ gives \[ \|\vct{x}\|_2^2 \leq \|\vct{x}\|_2 \|\vct{h}\|_2 \leq (1+\delta) d_0 \leq 1.1(1 + \delta)d_0 < 2d, \] which implies that \[ H_2 = G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \left\langle\boldsymbol{x}, \Delta\boldsymbol{x} \right\rangle = 0 = \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right). \] \paragraph{Lower bound of $H_3$:} When $L|\boldsymbol{b}_l^*\boldsymbol{h}|^2 \leq 8d\mu^2$, \[ \frac{L}{4\mu^2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle = 0 = \frac{d}{2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right). \] When $L|\boldsymbol{b}_l^*\boldsymbol{h}|^2 > 8d\mu^2$, by \prettyref{lem:orth_decomp}, there holds $|\alpha_1| \leq 2$. Then by $\mu_h \leq \mu$, we have \begin{eqnarray*} \Real(\left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle) & = & \Real(|\boldsymbol{b}_l^*\boldsymbol{h}|^2- \alpha\left\langle \boldsymbol{b}_l^*\boldsymbol{h},\boldsymbol{b}_l^*\boldsymbol{h}_0\right\rangle)\\ & \geq & |\boldsymbol{b}_l^*\boldsymbol{h}| (|\boldsymbol{b}_l^*\boldsymbol{h}| - (1-\delta_0)|\alpha_1| |\boldsymbol{b}_l^*\boldsymbol{h}_0|) \\ &\geq & |\boldsymbol{b}_l^*\boldsymbol{h}| (|\boldsymbol{b}_l^*\boldsymbol{h}| - 2\mu\sqrt{d_0/L}) \\ & \geq & \sqrt{\frac{8d\mu^2}{L}} \left(\sqrt{\frac{8d\mu^2}{L}} - 2\mu\sqrt{\frac{10d}{9L}}\right) \geq \frac{2d\mu^2}{L}, \end{eqnarray*} where $(1 - \delta_0)|\alpha_1| |\boldsymbol{b}_l^*\boldsymbol{h}_0| \leq \frac{2\mu_h\sqrt{d_0}}{\sqrt{L}} \leq \frac{2\mu\sqrt{10d}}{\sqrt{9L}}.$ This implies that \[ \frac{L}{4\mu^2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right)\Real(\left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle) \geq \frac{d}{2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right). \] So we always have \[ \Real(H_3) \geq \sum_{l=1}^L \frac{d}{2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right). \] \paragraph{Case 2:} $\|\vct{h}\|_2 < \|\vct{x}\|_2$ and $\alpha = \frac{1}{(1-\delta_0)\overline{\alpha_2}}$. \paragraph{Lower bound of $H_1$:} The assumption $\|\vct{h}\|_2 < \|\vct{x}\|_2$ gives \[ \|\vct{h}\|_2^2 \leq \|\vct{x}\|_2 \|\vct{h}\|_2 \leq (1+\delta) d_0 < 2d, \] which implies that \[ H_1 = G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right) \left\langle\boldsymbol{h}, \Delta\boldsymbol{h} \right\rangle = 0 = \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right). \] \paragraph{Lower bound of $H_2$:} Notice that \[ \Delta\boldsymbol{x} = \boldsymbol{x} - \overline{\alpha}^{-1} \boldsymbol{x}_0 = \boldsymbol{x} - (1 - \delta_0)\alpha_2 \boldsymbol{x}_0 = \boldsymbol{x} - (1-\delta_0)(\boldsymbol{x} - \tilde{\boldsymbol{x}}) = \delta_0 \boldsymbol{x} + (1 - \delta_0) \tilde{\boldsymbol{x}}. \] We have $\left\langle \boldsymbol{x}, \Delta\boldsymbol{x} \right\rangle = \delta_0 \|\boldsymbol{x}\|_2^2 + (1 - \delta_0) \left\langle \boldsymbol{x}, \tilde{\boldsymbol{x}}\right\rangle = \delta_0 \|\boldsymbol{x}\|_2^2 + (1 - \delta_0) \|\tilde{\boldsymbol{x}}\|_2^2 \geq \delta_0 \|\boldsymbol{x}\|_2^2$, which implies that $H_2 \geq G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \frac{\delta}{10} \|\boldsymbol{x}\|_2^2$. We claim that \begin{equation} \label{eq:H2_lower} H_2 \geq \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right). \end{equation} In fact, if $\|\boldsymbol{x}\|_2^2 \leq 2d$, we get $H_2 = 0 = \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right)$; If $\|\boldsymbol{x}\|_2^2 > 2d$, we get \eqref{eq:H2_lower} straightforwardly. \paragraph{Lower bound of $H_3$:} When $L|\boldsymbol{b}_l^*\boldsymbol{h}|^2 \leq 8d \mu^2$, \[ \frac{L}{4\mu^2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle = 0 = \frac{d}{4} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right). \] When $L|\boldsymbol{b}_l^*\boldsymbol{h}|^2 > 8d \mu^2$, by \prettyref{lem:orth_decomp}, there hold $|\alpha_1\overline{\alpha_2} -1|\leq \delta$ and $|\alpha_1| \leq 2$, which implies that \[ \frac{1}{(1-\delta_0)|\overline{\alpha_2}|} = \frac{|\alpha_1|}{(1 - \delta_0)|\alpha_1 \overline{\alpha_2}|} \leq \frac{2}{(1-\delta_0)(1-\delta)}. \] By $\mu_h \leq \mu$ and $\delta \leq \epsilon \leq \frac{1}{15}$, similarly we have \begin{align*} \Real(\left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle) &\geq |\boldsymbol{b}_l^*\boldsymbol{h}| \left(|\boldsymbol{b}_l^*\boldsymbol{h}| - \frac{2}{(1-\delta_0)(1-\delta)} |\boldsymbol{b}_l^*\boldsymbol{h}_0|\right) \\ &\geq \left(8 - 4\sqrt{\frac{20}{9}}\frac{1}{(1-\delta_0)(1-\delta)}\right) \frac{d\mu^2 }{L} > \frac{d\mu^2}{L}. \end{align*} This implies that for $1\leq l\leq L$, \[ \frac{L}{4\mu^2} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \Real\left\langle \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}, \Delta\boldsymbol{h}\right\rangle \geq \frac{d}{4} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right). \] So we always have \[ \Real(H_3) \geq \sum_{l=1}^L \frac{d}{4} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right). \] To sum up the two cases, we have \begin{align*} \Real(H_1 + H_2 + H_3) &\geq \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right) + \frac{\delta d}{5}G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) + \sum_{l=1}^L \frac{d}{4} G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \\ &\geq \frac{2\delta d}{5}\left( \sqrt{G_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right)} + \sqrt{G_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right)} + \sum_{l=1}^L \sqrt{G_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right)} \right) \\ &\geq \frac{2\delta d}{5}\left( \sqrt{G_0\left( \frac{\|\boldsymbol{h}\|^2}{2d}\right) + G_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right)+ \sum_{l=1}^L G_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right)} \right) \end{align*} where $G_0'(z) = 2\sqrt{G_0(z)}$ and it implies \prettyref{eq:G_regularity}. \end{proof} \begin{lemma} \label{lem:reg} Let $\widetilde{F}$ be as defined in~\eqref{def:FG}, then there exists a positive constant $\omega$ such that \begin{equation*} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\|^2 \geq \omega \left[ \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - c \right]_+ \end{equation*} with $c = \|\boldsymbol{e}\|^2 + 1700 \|\mathcal{A}^*(\boldsymbol{e})\|^2$ and $\omega = \frac{d_0}{5000}$ for all $(\boldsymbol{h}, \boldsymbol{x}) \in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$. Here we set $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2.$ \end{lemma} \begin{proof} Following from Lemma~\ref{lem:regF} and Lemma~\ref{lem:regG}, we have \begin{eqnarray*} \Real( \left\langle \nabla F_{\boldsymbol{h}}, \Delta\boldsymbol{h}\right\rangle + \left\langle \nabla F_{\boldsymbol{x}}, \Delta\boldsymbol{x}\right\rangle) & \geq & \frac{\delta^2 d_0^2}{8} - 2\delta d_0 \|\mathcal{A}^*(\boldsymbol{e})\| \\ \Real( \left\langle \nabla G_{\boldsymbol{h}}, \Delta\boldsymbol{h} \right\rangle + \left\langle \nabla G_{\boldsymbol{x}}, \Delta\boldsymbol{x} \right\rangle) & \geq & \frac{\delta d}{5} \sqrt{ G(\boldsymbol{h}, \boldsymbol{x})} \geq \frac{9\delta d_0}{50}\sqrt{G(\boldsymbol{h}, \boldsymbol{x})} \end{eqnarray*} for $\alpha = (1 - \delta_0)\alpha_1$ or $\frac{1}{(1 - \delta)\overline{\alpha_2}}$ and $\forall (\boldsymbol{h}, \boldsymbol{x}) \in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}$ where $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2 \geq d^2$ and $\frac{9}{10}d_0 \leq d \leq \frac{11}{10}d_0$. Adding them together gives \begin{eqnarray} \frac{\delta^2 d_0^2}{8} + \frac{ 9\delta d_0}{50}\sqrt{ G(\boldsymbol{h}, \boldsymbol{x})} - 2\delta d_0 \|\mathcal{A}^*(\boldsymbol{e}) \| & \leq & \Real\left (\left\langle \nabla F_{\boldsymbol{h}}+ \nabla G_{\boldsymbol{h}}, \Delta\boldsymbol{h} \right\rangle + \left\langle \nabla F_{\boldsymbol{x}} + \nabla G_{\boldsymbol{x}} \right\rangle\right) \nonumber \\ & \leq & \|\nabla\widetilde{F}_{\boldsymbol{h}}\| \| \Delta\boldsymbol{h} \| + \| \nabla\widetilde{F}_{\boldsymbol{x}} \| \| \Delta\boldsymbol{x} \| \nonumber \\ & \leq & \sqrt{2} \| \nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\| \max\{ \| \Delta\boldsymbol{h} \|, \| \Delta\boldsymbol{x} \|\} \nonumber \\ & \leq & 3.6 \delta \sqrt{d_0} \| \nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\| \label{eq:nabla-tF} \end{eqnarray} where both $\|\Delta\boldsymbol{h}\|$ and $\|\Delta\boldsymbol{x}\|$ are bounded by $2.5\delta\sqrt{d_0}$ in Lemma~\ref{lem:DxDh}. Note that \begin{equation}\label{eq:AEHX} \sqrt{2\left[ \Real(\left\langle \mathcal{A}^*(\boldsymbol{e}), \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\right\rangle) \right]_+} \leq \sqrt{ 2\sqrt{2} \|\mathcal{A}^*(\boldsymbol{e})\| \delta d_0} \leq \frac{\sqrt{5}\delta d_0}{4} + \frac{4}{\sqrt{5}}\|\mathcal{A}^*(\boldsymbol{e})\|. \end{equation} Dividing both sides of~\eqref{eq:nabla-tF} by $\delta d_0$, we obtain \begin{equation*} \frac{3.6}{\sqrt{d_0}} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\| \geq \frac{\delta d_0}{12} + \frac{9}{50}\sqrt{G(\boldsymbol{h}, \boldsymbol{x})} + \frac{\delta d_0 }{24} - 2\|\mathcal{A}^*(\boldsymbol{e})\|. \end{equation*} The Local RIP condition implies $F_0(\boldsymbol{h}, \boldsymbol{x}) \leq \frac{5}{4}\delta^2 d_0^2$ and hence $\frac{\delta d_0}{12} \geq \frac{1}{6\sqrt{5}}\sqrt{F_0(\boldsymbol{h}, \boldsymbol{x})}$, where $F_0$ is defined in~\eqref{def:F0}. Combining the equation above and~\eqref{eq:AEHX}, \begin{eqnarray*} \frac{3.6}{\sqrt{d_0}} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\| & \geq & \frac{1}{6\sqrt{5}} \Big[ \left(\sqrt{F_0(\boldsymbol{h}, \boldsymbol{x})} +\sqrt{2\left[ \Real(\left\langle \mathcal{A}^*(\boldsymbol{e}), \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\right\rangle) \right]_+} + \sqrt{G(\boldsymbol{h}, \boldsymbol{x})}\right) \\ && + \frac{\sqrt{5}\delta d_0}{4} - \left( \frac{\sqrt{5}\delta d_0}{4} + \frac{4}{\sqrt{5}}\|\mathcal{A}^*(\boldsymbol{e})\|\right)\Big] - 2\|\mathcal{A}^*(\boldsymbol{e})\| \\ & \geq & \frac{1}{6\sqrt{5}} \left[ \sqrt{ \left[\widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - \|\boldsymbol{e}\|^2\right]_+} - 29\|\mathcal{A}^*(\boldsymbol{e})\|\right] \end{eqnarray*} where $\widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - \|\boldsymbol{e}\|^2 \leq F_0(\boldsymbol{h}, \boldsymbol{x}) + 2 [\Real(\left\langle \mathcal{A}^*(\boldsymbol{e}), \boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\right\rangle)]_+ + G(\boldsymbol{h}, \boldsymbol{x})$ follows from definition and~\eqref{eq:F-decom}. Finally, we have \begin{equation*} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\|^2 \geq \frac{d_0}{2500} \left[ \sqrt{\left[\widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - \|\boldsymbol{e}\|^2\right]_+} - 29 \|\mathcal{A}^*(\boldsymbol{e})\|\right]_+^2 \end{equation*} for all $(\boldsymbol{h}, \boldsymbol{x})\in \MN_{d_0} \cap \MN_{\mu} \cap \MN_{\epsilon}.$ For any nonnegative fixed real numbers $a$ and $b$, we have \begin{equation*} [\sqrt{(x - a)_+} - b ]_+ + b \geq \sqrt{(x - a)_+} \end{equation*} and it implies \begin{equation*} ( x - a)_+ \leq 2 ( [\sqrt{(x - a)_+} - b ]_+^2 + b^2) \Longrightarrow [\sqrt{(x - a)_+} - b ]_+^2 \geq \frac{(x - a)_+}{2} - b^2. \end{equation*} Therefore, by setting $ a = \|\boldsymbol{e}\|$ and $b = 30\|\mathcal{A}^*(\boldsymbol{e})\|$, there holds \begin{eqnarray*} \|\nabla \widetilde{F}(\boldsymbol{h}, \boldsymbol{x})\|^2 & \geq & \frac{d_0}{2500} \left[ \frac{\widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - \|\boldsymbol{e}\|^2 }{2} - 850 \|\mathcal{A}^*(\boldsymbol{e})\|^2 \right]_+ \\ & \geq & \frac{d_0}{5000} \left[ \widetilde{F}(\boldsymbol{h}, \boldsymbol{x}) - (\|\boldsymbol{e}\|^2 + 1700 \|\mathcal{A}^*(\boldsymbol{e})\|^2) \right]_+. \end{eqnarray*} \end{proof} \subsection{Local smoothness} \label{s:smooth} \begin{lemma} For any $\boldsymbol{z} : = (\boldsymbol{h}, \boldsymbol{x})$ and $\boldsymbol{w} : = (\boldsymbol{u}, \boldsymbol{v})$ such that $\vct{z}, \vct{z}+\vct{w} \in \mathcal{N}_{\epsilon} \cap \mathcal{N}_{\widetilde{F}}$, there holds \begin{equation*} \| \nabla\widetilde{F}(\boldsymbol{z} + \boldsymbol{w}) - \nabla\widetilde{F}(\boldsymbol{z}) \| \leq C_L \|\boldsymbol{w}\|, \end{equation*} with \begin{equation*} C_L \leq \sqrt{2}d_0\left[ 10 \|\mathcal{A}\|^2 + \frac{\rho}{d^2} \left(5 + \frac{3L}{2\mu^2}\right)\right] \end{equation*} where $\rho \geq d^2 + 2\|\boldsymbol{e}\|^2$ and $\|\mathcal{A}\|^2\leq \sqrt{N\log(NL/2) + \gamma\log L}$ holds with probability at least $1 - L^{-\gamma}$ from Lemma~\ref{lem:A-UPBD}. In particular, $L = \mathcal{O}((\mu^2 + \sigma^2) (K + N)\log^2 L)$ and $\|\boldsymbol{e}\|^2 = \mathcal{O}(\sigma^2d_0^2)$ follows from $\|\boldsymbol{e}\|^2 \sim \frac{\sigma^2d_0^2}{2L} \chi^2_{2L}$ and~\eqref{ineq:bern}. Therefore, $C_L$ can be simplified into \begin{equation*} C_L = \mathcal{O}(d_0(1 + \sigma^2)(K + N)\log^2 L ) \end{equation*} by choosing $\rho \approx d^2 + 2\|\boldsymbol{e}\|^2.$ \end{lemma} \begin{proof} By \prettyref{lem:betamu}, we have $\vct{z}=(\vct{h}, \vct{x}), \vct{z}+\vct{w}=(\vct{h}+\vct{u}, \vct{x}+\vct{v}) \in \mathcal{N}_{d_0} \cap \mathcal{N}_{\mu}$. Note that \[ \nabla \widetilde{F} = (\nabla \widetilde{F}_{\boldsymbol{h}}, \nabla \widetilde{F}_{\boldsymbol{x}}) = (\nabla F_{\boldsymbol{h}} + \nabla G_{\boldsymbol{h}}, \nabla F_{\boldsymbol{x}} + \nabla G_{\boldsymbol{x}}), \] where \begin{equation} \nabla F_{\boldsymbol{h}} = \mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e}) \boldsymbol{x}, \quad \nabla F_{\boldsymbol{x}} = (\mathcal{A}^*(\mathcal{A}(\boldsymbol{h}\boldsymbol{x}^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) - \boldsymbol{e}))^* \boldsymbol{h}, \end{equation} and \begin{equation*} \nabla G_{\boldsymbol{h}} = \frac{\rho}{2d}\left[G'_0\left(\frac{\|\boldsymbol{h}\|^2}{2d}\right) \boldsymbol{h} + \frac{L}{4\mu^2} \sum_{l=1}^L G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h} \right],\quad \nabla G_{\boldsymbol{x}} = \frac{\rho}{2d}G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \boldsymbol{x}. \end{equation*} \paragraph{Step 1:} we estimate the upper bound of $\|\nabla F_{\boldsymbol{h}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla F_{\boldsymbol{h}}(\boldsymbol{z}) \|$. A straightforward calculation gives \begin{equation*} \nabla F_{\boldsymbol{h}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla F_{\boldsymbol{h}}(\boldsymbol{z}) = \mathcal{A}^*\mathcal{A}( \boldsymbol{u}\boldsymbol{x}^* + \boldsymbol{h}\boldsymbol{v}^* + \boldsymbol{u}\boldsymbol{v}^*) \boldsymbol{x} + \mathcal{A}^*\mathcal{A}((\boldsymbol{h}+\boldsymbol{u})(\boldsymbol{x}+\boldsymbol{v})^* - \boldsymbol{h}_0\boldsymbol{x}_0^*) \boldsymbol{v} - \mathcal{A}^*(\boldsymbol{e})\boldsymbol{v}. \end{equation*} Note that $\boldsymbol{z}, \boldsymbol{z}+\boldsymbol{w} \in \mathcal{N}_{d_0}$ directly implies \begin{equation*} \|\boldsymbol{u}\boldsymbol{x}^* + \boldsymbol{h}\boldsymbol{v}^* + \boldsymbol{u}\boldsymbol{v}^*\|_F \leq \|\vct{u}\| \|\vct{x}\| + \|\vct{h}+\vct{u}\|\|\vct{v}\| \leq 2\sqrt{d_0} (\|\boldsymbol{u}\| + \|\boldsymbol{v}\|) \end{equation*} where $\|\boldsymbol{h} + \boldsymbol{u}\| \leq 2\sqrt{d_0}.$ Moreover, $\vct{z} + \vct{w} \in \mathcal{N}_{\epsilon}$ implies \begin{equation*} \|(\boldsymbol{h}+\boldsymbol{u})(\boldsymbol{x}+\boldsymbol{v})^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq \epsilon d_0. \end{equation*} Combined with $\|\mathcal{A}^*(\boldsymbol{e})\| \leq \epsilon d_0$ and $\|\boldsymbol{x}\| \leq 2\sqrt{d_0}$, we have \begin{eqnarray} \|\nabla F_{\boldsymbol{h}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla F_{\boldsymbol{h}}(\boldsymbol{z}) \| & \leq & 4d_0 \|\mathcal{A}\|^2(\|\boldsymbol{u}\| + \|\boldsymbol{v}\|) + \epsilon d_0 \|\mathcal{A}\|^2 \|\boldsymbol{v}\| + \epsilon d_0 \|\boldsymbol{v}\| \nonumber \\ & \leq & 5d_0 \|\mathcal{A}\|^2 ( \|\boldsymbol{u}\| + \|\boldsymbol{v}\|). \label{eq:LipFh} \end{eqnarray} \paragraph{Step 2:} we estimate the upper bound of $\|\nabla F_{\boldsymbol{x}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla F_{\boldsymbol{x}}(\boldsymbol{z})\|$. Due to the symmetry between $\nabla F_{\boldsymbol{h}}$ and $\nabla F_{\boldsymbol{x}}$, we have, \begin{equation} \label{eq:LipFx} \|\nabla F_{\boldsymbol{x}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla F_{\boldsymbol{x}}(\boldsymbol{z}) \| \leq 5d_0\|\mathcal{A}\|^2 ( \|\boldsymbol{u}\| + \|\boldsymbol{v}\|).\end{equation} \paragraph{Step 3:} we estimate the upper bound of $\|\nabla G_{\boldsymbol{x}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla G_{\boldsymbol{x}}(\boldsymbol{z})\|$. Notice that $G_0'(z) = 2\max\{z - 1, 0\}$, which implies that for any $z_1, z_2, z\in \mathbb{R}$, there holds \begin{equation} \label{eq:LipG} |G'_0(z_1) - G'_0(z_2)| \leq 2|z_1 - z_2|, \quad G'(z) \leq 2|z|, \end{equation} although $G'(z)$ is not differentiable at $z = 1$. Therefore, by~\eqref{eq:LipG}, it is easy to show that \[ \left| G'_0\left( \frac{\|\boldsymbol{x} + \boldsymbol{v}\|^2}{2d}\right) - G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \right| \leq \frac{\|\boldsymbol{x} + \boldsymbol{v}\| + \|\boldsymbol{x}\|}{d} \|\boldsymbol{v}\| \leq \frac{4\sqrt{d_0}}{d}\|\boldsymbol{v}\| \] where $\|\boldsymbol{x} + \boldsymbol{v}\| \leq 2\sqrt{d_0}.$ Therefore, by $\boldsymbol{z}, \boldsymbol{z}+\boldsymbol{w} \in \mathcal{N}_{d_0}$, we have \begin{align} \| \nabla G_{\boldsymbol{x}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla G_{\boldsymbol{x}}(\boldsymbol{z}) \| &\leq \frac{\rho}{2d} \left| G'_0\left( \frac{\|\boldsymbol{x} + \boldsymbol{v}\|^2}{2d}\right) - G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right)\right| \| \boldsymbol{x} + \boldsymbol{v} \| + \frac{\rho}{2d} G'_0\left( \frac{\|\boldsymbol{x}\|^2}{2d}\right) \| \boldsymbol{v} \| \nonumber \\ & \leq \frac {\rho}{2d} \left( \frac{8d_0 \|\boldsymbol{v}\|}{d} + \frac{2d_0\|\boldsymbol{v}\|}{d} \right) \leq \frac{5d_0 \rho}{d^2} \|\boldsymbol{v}\|. \label{eq:LipGx} \end{align} \paragraph{Step 4:} we estimate the upper bound of $\|\nabla G_{\boldsymbol{h}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla G_{\boldsymbol{h}}(\boldsymbol{z})\|$. Denote \begin{align*} \nabla G_{\boldsymbol{h}}(\boldsymbol{z} + \boldsymbol{w}) - \nabla G_{\boldsymbol{h}}(\boldsymbol{z}) &= \frac{\rho}{2d}\left[G'_0\left(\frac{\|\boldsymbol{h} + \boldsymbol{u}\|^2}{2d}\right) (\boldsymbol{h} + \boldsymbol{u}) - G'_0\left(\frac{\|\boldsymbol{h}\|^2}{2d}\right) \boldsymbol{h}\right] \\ &+ \frac{\rho L}{8d\mu^2 }\sum_{l=1}^L \left[G'_0\left(\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2}\right) \boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u}) - G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \boldsymbol{b}_l^*\boldsymbol{h} \right]\boldsymbol{b}_l \\ &:= \vct{j}_1 + \vct{j}_2. \end{align*} Similar to \prettyref{eq:LipGx}, we have \begin{equation} \label{eq:LipG1} \|\vct{j}_1\| \leq \frac{5d_0 \rho}{d^2} \|\boldsymbol{u}\|. \end{equation} Now we control $\|\vct{j}_2\|$. Since $\vct{z}, \vct{z}+\vct{w} \in \mathcal{N}_{\mu}$, we have \begin{eqnarray} \left| G'_0\left(\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2}\right) - G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right)\right| & \leq & \frac{L}{4d\mu^2}\left(|\vct{b}_l^*(\vct{h} + \vct{u})| + |\vct{b}_l^*\vct{h}|\right) |\boldsymbol{b}_l^*\boldsymbol{u}| \nonumber \\ & \leq & \frac{2\sqrt{d_0 L}}{d\mu} |\vct{b}_l^*\vct{u}|. \label{eq:step4-1} \end{eqnarray} and \begin{equation} \label{eq:step4-2} \left|G'_0\left(\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2}\right)\right| \leq 2\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2} \leq \frac{4d_0}{d} \end{equation} where both $\max_l |\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|$ and $\max_l |\boldsymbol{b}_l^*\boldsymbol{h}|$ are bounded by $\frac{4 \sqrt{d_0}\mu}{\sqrt{L}}$. Let $\alpha_l$ be \begin{align*} \alpha_l &:=G'_0\left(\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2}\right) \boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u}) - G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right) \boldsymbol{b}_l^*\boldsymbol{h} \\ & = \left(G'_0\left(\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2}\right) - G'_0\left(\frac{L|\boldsymbol{b}_l^*\boldsymbol{h}|^2}{8d\mu^2}\right)\right)\vct{b}_l^*\vct{h} + G'_0\left(\frac{L|\boldsymbol{b}_l^*(\boldsymbol{h} + \boldsymbol{u})|^2}{8d\mu^2}\right)\vct{b}_l^*\vct{u}. \end{align*} Applying~\eqref{eq:step4-1} and~\eqref{eq:step4-2} leads to \[ |\alpha_l| \leq \frac{2\sqrt{d_0 L}}{d \mu}|\vct{b}_l^*\vct{u}|\left(4\mu \sqrt{\frac{d_0}{L}}\right) + \frac{4d_0}{d}|\vct{b}_l^*\vct{u}| = \frac{12 d_0}{d}|\vct{b}_l^*\vct{u}|. \] Since $\sum_{l=1}^L \alpha_l \vct{b}_l = \mtx{B}^* \begin{bmatrix} \alpha_1 \\ \vdots \\ \alpha_L \end{bmatrix}$ and $\|\mtx{B}\|=1$, there holds \[ \left\|\sum_{l=1}^L \alpha_l \vct{b}_l \right\|^2 \leq \sum_{l=1}^L |\alpha_l|^2 \leq \left(\frac{12 d_0}{d}\right)^2 \sum_{l=1}^L |\vct{b}_l^*\vct{u}|^2 = \left(\frac{12 d_0}{d}\right)^2 \|\mtx{B}\vct{u}\|^2 \leq \left(\frac{12 d_0}{d}\right)^2 \|\vct{u}\|^2. \] This implies that \begin{equation} \label{eq:LipG2} \|\vct{j}_2\| = \frac{\rho L}{8d\mu^2} \left\|\sum_{l=1}^L \alpha_l \vct{b}_l \right\| \leq \frac{\rho L}{8d\mu^2}\frac{12 d_0}{d}\|\vct{u}\| = \frac{3\rho Ld_0}{2d^2\mu^2}\|\vct{u}\|. \end{equation} In summary, by combining~\prettyref{eq:LipFh}, \prettyref{eq:LipFx}, \prettyref{eq:LipGx}, \prettyref{eq:LipG1}, and \prettyref{eq:LipG2}, we conclude that \[ \|\nabla \widetilde{F}(\boldsymbol{z} + \boldsymbol{w}) - \nabla \widetilde{F}(\boldsymbol{z})\| \leq 10d_0 \|\mathcal{A}\|^2 (\|\vct{u}\| + \|\vct{v}\|) + \frac{5d_0\rho}{d^2}(\|\vct{u}\| + \|\vct{v}\|) + \frac{3\rho Ld_0}{2\mu^2d^2}\|\vct{u}\|. \] With $\|\boldsymbol{u}\| + \|\boldsymbol{v}\| \leq \sqrt{2}\|\boldsymbol{w}\|$, there holds \begin{equation*} \|\nabla \widetilde{F}(\boldsymbol{z} + \boldsymbol{w}) - \nabla \widetilde{F}(\boldsymbol{z})\| \leq \sqrt{2}d_0\left[ 10 \|\mathcal{A}\|^2 + \frac{\rho}{d^2} \left(5 + \frac{3L}{2\mu^2}\right)\right] \|\boldsymbol{w}\|. \end{equation*} \end{proof} \subsection{Initialization}\label{s:init} This section is devoted to justifying the validity of the \textit{Robustness condition} and to proving Theorem~\ref{thm:init}, i.e., establishing the fact that Algorithm~\ref{Initial} constructs an initial guess $(\boldsymbol{u}_0, \boldsymbol{v}_0)\in \frac{1}{\sqrt{3}} \mathcal{N}_{d_0}\bigcap \frac{1}{\sqrt{3}} \mathcal{N}_{\mu} \bigcap \mathcal{N}_{\frac{2}{5}\epsilon }.$ \begin{lemma}\label{lem:Ay-hx} For $\boldsymbol{e}\sim\mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2L}\boldsymbol{I}_L) + \mathrm{i}\mathcal{N}(\boldsymbol{0}, \frac{\sigma^2d_0^2}{2L}\boldsymbol{I}_L)$, there holds \begin{equation}\label{eq:Ay-hx} \| \mathcal{A}^*(\boldsymbol{y}) - \boldsymbol{h}_0\boldsymbol{x}_0^* \| \leq \xi d_0, \end{equation} with probability at least $1 - L^{-\gamma}$ if $L \geq C_{\gamma} (\mu^2_h + \sigma^2) \max\{K, N\} \log L /\xi^2.$ Moreover, \begin{equation*} \|\mathcal{A}^*(\boldsymbol{e})\| \leq \xi d_0 \end{equation*} with probability at least $1 - L^{-\gamma}$ if $L \geq C_{\gamma}(\frac{\sigma^2}{\xi^2} + \frac{\sigma}{\xi})\max\{K, N\} \log L.$ In particular, we fix $\xi = \frac{\epsilon}{10\sqrt{2}}$ and then Robustness condition~\ref{cond:AE} holds, i.e., $\|\mathcal{A}^*(\boldsymbol{e})\| \leq \frac{\epsilon d_0}{10\sqrt{2}}$. \end{lemma} \begin{proof} In this proof, we can assume $d_0 = 1$ and $\|\boldsymbol{h}_0\| = \|\boldsymbol{x}_0\| = 1$, without loss of generality. First note that $\E(\mathcal{A}^*\boldsymbol{y}) = \E(\mathcal{A}^*\mathcal{A}(\boldsymbol{h}_0\boldsymbol{x}_0^* ) + \mathcal{A}^*(\boldsymbol{e}))= \boldsymbol{h}_0\boldsymbol{x}_0^*.$ We will use the matrix Bernstein inequality to show that \begin{equation*} \| \mathcal{A}^*(\boldsymbol{y}) - \boldsymbol{h}_0\boldsymbol{x}_0^* \| \leq \xi. \end{equation*} By definition of $\mathcal{A}$ and $\mathcal{A}^*$ in~\eqref{def:A} and~\eqref{def:AD}, \begin{equation*} \mathcal{A}^*(\boldsymbol{y}) - \boldsymbol{h}_0\boldsymbol{x}_0^* = \sum_{l=1}^L \left[ \boldsymbol{b}_l\boldsymbol{b}^*_l\boldsymbol{h}_0\boldsymbol{x}_0^* (\boldsymbol{a}_l\boldsymbol{a}_l^* - \boldsymbol{I}_N) + e_l \boldsymbol{b}_l\boldsymbol{a}_l^*\right] = \sum_{l=1}^L \mathcal{Z}_l, \end{equation*} where $\mathcal{Z}_l : = \boldsymbol{b}_l\boldsymbol{b}_l^*\boldsymbol{h}_0\boldsymbol{x}_0^*(\boldsymbol{a}_l \boldsymbol{a}_l^* - \boldsymbol{I}_N) + e_l \boldsymbol{b}_l\boldsymbol{a}_l^*$ and $\sum_{l=1}^L \boldsymbol{b}_l\boldsymbol{b}_l^* = \boldsymbol{I}_K$. In order to apply Bernstein inequality~\eqref{thm:bern}, we need to estimate both the exponential norm $\|\mathcal{Z}_l\|_{\psi_1}$ and the variance. \begin{eqnarray*} \|\mathcal{Z}_l\|_{\psi_1} & \leq & C \|\boldsymbol{b}_l\| |\boldsymbol{b}_l^*\boldsymbol{h}_0| \| \boldsymbol{x}_0^*(\boldsymbol{a}_l\boldsymbol{a}_l^* - \boldsymbol{I}_N)\|_{\psi_1} + C \|e_l \boldsymbol{b}_l\boldsymbol{a}_l^*\|_{\psi_1}\\ & \leq & C \frac{\mu_h\sqrt{KN}}{L} + C\frac{\sigma \sqrt{KN}}{L} \leq C\frac{(\mu_h + \sigma) \sqrt{KN}}{L}, \end{eqnarray*} for some constant $C$. Here,~\eqref{lem:11JB} of Lemma~\ref{lem:multiple1} gives \begin{equation*} \|\boldsymbol{x}_0^* (\boldsymbol{a}_l\boldsymbol{a}_l^* - \boldsymbol{I}_N)\|_{\psi_1} \leq C\sqrt{N} \end{equation*} and \begin{equation*} \|e_l \boldsymbol{b}_l\boldsymbol{a}_l^*\|_{\psi_1}\leq C\sqrt{\frac{K}{L}} (|e_l| \| \boldsymbol{a}_l\| )_{\psi_1} \leq C\sqrt{ \frac{K}{L}} \frac{\sigma}{\sqrt{L}}\sqrt{N} \leq \frac{C\sigma\sqrt{KN}}{L} \end{equation*} follows from~\eqref{lemma:psi} where both $|e_l|$ and $\|\boldsymbol{a}_l\|$ are sub-gaussian random variables. Now we give an upper bound of $\sigma_0^2 : = \max\{ \|E\sum_{l=1}^L \mathcal{Z}_l^*\mathcal{Z}_l\|, \| \E\sum_{l=1}^L \mathcal{Z}_l\mathcal{Z}_l^*\|\}$. \begin{eqnarray*} \left\| \E \sum_{l=1}^l \mathcal{Z}_l\mathcal{Z}_l^* \right\| & = & \left\| \sum_{l=1}^L |\boldsymbol{b}_l^*\boldsymbol{h}_0|^2 \boldsymbol{b}_l\boldsymbol{b}_l^* \E \|(\boldsymbol{a}_l\boldsymbol{a}_l^* - \boldsymbol{I}_N)\boldsymbol{x}_0 \|^2 + \sum_{l=1}^L \E(|e_l|^2 \|\boldsymbol{a}_l\|^2)\boldsymbol{b}_l\boldsymbol{b}_l^* \right\| \\ & \leq & C N \left\| \sum_{l=1}^L |\boldsymbol{b}_l^*\boldsymbol{h}_0|^2 \boldsymbol{b}_l\boldsymbol{b}_l^* \right\|^2 + C\frac{\sigma^2 N}{L}\\ & \leq & C\frac{\mu^2_hN}{L} + C\frac{\sigma^2 N}{L} \leq C\frac{(\mu^2_h + \sigma^2)N}{L}. \end{eqnarray*} where $\E\|(\boldsymbol{a}_l\boldsymbol{a}_l^* - \boldsymbol{I}_N)\boldsymbol{x}_0 \|^2 = \boldsymbol{x}_0^* \E(\boldsymbol{a}_l \boldsymbol{a}_l^* - \boldsymbol{I}_N)^2 \boldsymbol{x}_0 = N$ follows from~\eqref{lem:9JB} and $\E( |e_l|^2) = \frac{\sigma^2}{L}.$ \begin{eqnarray*} \left\| \E \sum_{l=1}^l \mathcal{Z}^*_l\mathcal{Z}_l \right\| & \leq & \left\| \sum_{l=1}^L |\boldsymbol{b}_l^*\boldsymbol{h}_0|^2 \|\boldsymbol{b}_l\|^2 \E \left[ (\boldsymbol{a}\ba_l^* - \boldsymbol{I}_N)\boldsymbol{x}_0\boldsymbol{x}_0^* (\boldsymbol{a}_l\boldsymbol{a}_l^* - \boldsymbol{I}_N)\right] \right \| \\ & & + \left\| \E\sum_{l=1}^L e_l^2 \|\boldsymbol{b}_l\|^2 \boldsymbol{a}_l\boldsymbol{a}_l^* \right\| \\ & \leq & C\frac{K}{L} \left\| \sum_{l=1}^L |\boldsymbol{b}_l^*\boldsymbol{h}_0|^2 \boldsymbol{I}_N\right\| + C\frac{\sigma^2K}{L^2} \left\| \sum_{l=1}^L \E(\boldsymbol{a}_l\boldsymbol{a}_l^*) \right\| = C\frac{(\sigma^2 + 1) K}{L} \end{eqnarray*} where we have used the fact that $\sum_{l=1}^L |\boldsymbol{b}_l^*\boldsymbol{h}_0|^2 = \|\boldsymbol{h}_0\|^2 = 1.$ Therefore, we now have the variance $\sigma^2_0$ bounded by $\frac{(\mu^2_h + \sigma^2)\max\{K, N\}}{L}.$ We apply Bernstein inequality~\eqref{thm:bern}, and obtain \begin{eqnarray*} \left\|\sum_{l=1}^L \mathcal{Z}_l \right\| & \leq & C_0 \max\Big\{ \sqrt{\frac{( \mu^2_h + \sigma^2)\max\{K,N\} (\gamma + 1) \log L}{L}}, \\ && \quad \frac{\sqrt{KN}(\mu_h + \sigma)(\gamma + 1)\log^2 L }{L} \Big\} \leq \xi \end{eqnarray*} with probability at least $1 - L^{-\gamma}$ if $L \geq C_{\gamma} (\mu^2_h + \sigma^2 )\max\{K, N\}\log^2L /\xi^2.$ Regarding the estimation of $\|\mathcal{A}^*(\boldsymbol{e})\|$, the same calculations immediately give \begin{equation*} R : = \max_{1\leq l\leq L} \|e_l \boldsymbol{b}_l\boldsymbol{a}_l^*\|_{\psi_1} \leq \sqrt{\frac{K}{L}}\max_{1\leq l\leq L} ( |e_l| \|\boldsymbol{a}_l\|)_{\psi_1}\leq \frac{C\sigma\sqrt{KN}}{L} \end{equation*} and \begin{equation*} \max \left\{ \left\| \E \left[ \mathcal{A}^*(\boldsymbol{e}) (\mathcal{A}^*(\boldsymbol{e}))^*\right] \right\|, \left\| \E \left[ (\mathcal{A}^*(\boldsymbol{e}))^*\mathcal{A}^*(\boldsymbol{e})\right] \right\| \right\} \leq \frac{\sigma^2\max\{K, N\}}{L}. \end{equation*} Applying Bernstein inequality~\eqref{thm:bern} again, we get \begin{equation*} \|\mathcal{A}^*(\boldsymbol{e})\| \leq C_0\sigma \max\Big\{ \sqrt{\frac{(\gamma + 1)\max\{K,N\} \log L}{L}}, \frac{(\gamma + 1)\sqrt{KN}\log^2 L }{L} \Big\} \leq \xi \end{equation*} with probability at least $1 - L^{-\gamma}$ if $L \geq C_{\gamma} (\frac{\sigma^2}{\xi^2} + \frac{\sigma}{\xi})\max\{K, N\}\log^2L.$ \end{proof} Lemma~\ref{lem:Ay-hx} lays the foundation for the initialization procedure, which says that with enough measurements, the initialization guess via spectral method can be quite close to the ground truth. Before moving to the proof of Theorem~\ref{thm:init}, we introduce a property about the projection onto a closed convex set. \begin{lemma}[Theorem 2.8 in~\cite{RM11AP}]\label{lem:KMC} Let $Q := \{ \boldsymbol{w}\in\mathbb{C}^K | \sqrt{L}\|\boldsymbol{B}\boldsymbol{w}\|_{\infty} \leq 2\sqrt{d}\mu \}$ be a closed nonempty convex set. There holds \begin{equation*} \Real( \left\langle \boldsymbol{z} - \mathcal{P}_Q(\boldsymbol{z}) , \boldsymbol{w} - \mathcal{P}_Q(\boldsymbol{z}) \right\rangle ) \leq 0, \quad \forall \, \boldsymbol{w} \in Q, \boldsymbol{z}\in \mathbb{C}^K \end{equation*} where $\mathcal{P}_{Q}(\boldsymbol{z})$ is the projection of $\boldsymbol{z}$ onto $Q$. \end{lemma} This is a direct result from Theorem 2.8 in~\cite{RM11AP}, which is also called \textit{Kolmogorov criterion}. Now we present the proof of Theorem~\ref{thm:init}. \begin{proof}{[\textbf{of Theorem~\ref{thm:init}}]} Without loss of generality, we again set $d_0 = 1$ and by definition, all $\boldsymbol{h}_0,$ $\boldsymbol{x}_0$, $\hat{\boldsymbol{h}}_0$ and $\hat{\boldsymbol{x}}_0$ are of unit norm. Also we set $\xi = \frac{\epsilon}{10\sqrt{2}}.$ By applying the triangle inequality to~\eqref{eq:Ay-hx}, it is easy to see that \begin{equation}\label{eq:hd} 1 - \xi \leq d \leq 1 + \xi, \quad |d - 1| \leq \xi \leq \frac{\epsilon}{10\sqrt{2}} < \frac{1}{10}, \end{equation} which gives $\frac{9}{10}d_0 \leq d \leq \frac{11}{10}d_0.$ It is easier to get an upper bound for $\|\boldsymbol{v}_0\|$ here, i.e., \begin{equation*} \| \boldsymbol{v}_0 \| = \sqrt{d} \|\hat{\boldsymbol{x}}_0\| = \sqrt{d} \leq \sqrt{1 + \xi} \leq \frac{2}{\sqrt{3}}, \end{equation*} which implies $\boldsymbol{v}_0 \in \frac{1}{\sqrt{3}} \mathcal{N}_{d_0}.$ The estimation of $\boldsymbol{u}_0$ involves Lemma~\ref{lem:KMC}. In our case, $\boldsymbol{u}_0$ is the minimizer to the function $f(\boldsymbol{z}) = \frac{1}{2} \| \boldsymbol{z} - \sqrt{d} \hat{\boldsymbol{h}}_0 \|^2$ over $Q = \{ \boldsymbol{z} | \sqrt{L}\|\boldsymbol{B}\boldsymbol{z}\|_{\infty} \leq 2\sqrt{d}\mu\}.$ Therefore, $\boldsymbol{u}_0$ is actually the projection of $\sqrt{d} \hat{\boldsymbol{h}}_0$ onto $Q$. Note that $\boldsymbol{u}_0\in Q$ implies $\sqrt{L}\|\boldsymbol{B}\boldsymbol{u}_0\|_{\infty} \leq 2\sqrt{d}\mu\leq \frac{4\mu}{\sqrt{3}}$ and hence $\boldsymbol{u}_0\in \frac{1}{\sqrt{3}} \mathcal{N}_{\mu}.$ Moreover, $\boldsymbol{u}_0$ yields \begin{eqnarray} \|\sqrt{d}\hat{\boldsymbol{h}}_0 - \boldsymbol{w}\|^2 & = & \| \sqrt{d}\hat{\boldsymbol{h}}_0 - \boldsymbol{u}_0\|^2 + 2\Real(\left\langle \sqrt{d}\hat{\boldsymbol{h}} - \boldsymbol{u}_0, \boldsymbol{u}_0 - \boldsymbol{w}\right\rangle) + \|\boldsymbol{u}_0 - \boldsymbol{w} \|^2 \nonumber \\ & \geq & \| \sqrt{d}\hat{\boldsymbol{h}}_0 - \boldsymbol{u}_0\|^2 + \|\boldsymbol{u}_0 - \boldsymbol{w} \|^2 \label{eq:KMC} \end{eqnarray} for all $\boldsymbol{w}\in Q$ because the cross term is nonnegative due to Lemma~\ref{lem:KMC}. Let $\boldsymbol{w} = \boldsymbol{0}\in Q$ and we get \begin{equation*} \|\boldsymbol{u}_0\|^2 \leq d \leq \frac{4}{3}. \end{equation*} So far, we have already shown that $(\boldsymbol{u}_0, \boldsymbol{v}_0) \in \frac{1}{\sqrt{3}} \mathcal{N}_{d_0}$ and $\boldsymbol{u}_0 \in \frac{1}{\sqrt{3}} \mathcal{N}_{\mu}$. Now we will show that $\|\boldsymbol{u}_0\boldsymbol{v}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq 4\xi.$ First note that $\sigma_i(\mathcal{A}^*(\boldsymbol{y})) \leq \xi$ for all $i\geq 2$, which follows from Weyl's inequality~\cite{Stewart90} for singular values where $\sigma_i(\mathcal{A}^*(\boldsymbol{y}))$ denotes the $i$-th largest singular value of $\mathcal{A}^*(\boldsymbol{y})$. Hence there holds \begin{equation}\label{eq:dhx-hx} \| d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \| \leq \|\mathcal{A}^*(\boldsymbol{y}) - d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* \| + \|\mathcal{A}^*(\boldsymbol{y}) - \boldsymbol{h}_0\boldsymbol{x}_0^* \| \leq 2\xi. \end{equation} On the other hand, \begin{eqnarray*} \| (\boldsymbol{I} - \boldsymbol{h}_0\boldsymbol{h}_0^*)\hat{\boldsymbol{h}}_0 \| & = & \| (\boldsymbol{I} - \boldsymbol{h}_0\boldsymbol{h}_0^*) \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^*\hat{\boldsymbol{x}}_0\hat{\boldsymbol{h}}_0^* \| \\ & = & \| (\boldsymbol{I} - \boldsymbol{h}_0\boldsymbol{h}_0^*) ( \mathcal{A}^*(\boldsymbol{y}) - d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* + \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^* ) \hat{\boldsymbol{x}}_0\hat{\boldsymbol{h}}_0^* \| \\ & = & \| (\boldsymbol{I} - \boldsymbol{h}_0\boldsymbol{h}_0^*) ( \mathcal{A}^*(\boldsymbol{y}) - \boldsymbol{h}_0\boldsymbol{x}_0^* ) \hat{\boldsymbol{x}}_0\hat{\boldsymbol{h}}_0^* \| \leq \xi \end{eqnarray*} where the second equation follows from $ (\boldsymbol{I} - \boldsymbol{h}_0\boldsymbol{h}_0^*) \boldsymbol{h}_0\boldsymbol{x}_0^* = \boldsymbol{0}$ and $(\mathcal{A}^*(\boldsymbol{y}) - d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^*)\hat{\boldsymbol{x}}_0\hat{\boldsymbol{h}}_0^* = \boldsymbol{0}$. Therefore, we have \begin{equation}\label{eq:h0-h} \| \hat{\boldsymbol{h}}_0 - \boldsymbol{h}_0^*\hat{\boldsymbol{h}}_0 \boldsymbol{h}_0 \| \leq \xi, \quad \|\sqrt{d} \hat{\boldsymbol{h}}_0 - \alpha_0 \boldsymbol{h}_0 \| \leq \sqrt{d}\xi, \end{equation} where $\alpha_0 = \sqrt{d}\boldsymbol{h}_0^*\hat{\boldsymbol{h}}_0$. If we substitute $\boldsymbol{w}$ by $\alpha_0 \boldsymbol{h}_0\in Q$ into~\eqref{eq:KMC}, \begin{equation}\label{eq:h0-h-2} \|\sqrt{d}\hat{\boldsymbol{h}}_0 - \alpha_0 \boldsymbol{h}_0\| \geq \| \boldsymbol{u}_0 - \alpha_0 \boldsymbol{h}_0\|. \end{equation} where $\alpha_0 \boldsymbol{h}_0\in Q$ follows from $\sqrt{L} |\alpha_0|\|\boldsymbol{B}\boldsymbol{h}_0\|_{\infty} \leq |\alpha_0| \mu_h \leq \sqrt{d} \mu_h \leq \sqrt{d} \mu < \sqrt{2d}\mu$. Combining~\eqref{eq:h0-h} and~\eqref{eq:h0-h-2} leads to $\|\boldsymbol{u}_0 - \alpha_0\boldsymbol{h}_0\| \leq \sqrt{d}\xi.$ Now we are ready to estimate $\|\boldsymbol{u}_0\boldsymbol{v}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \|_F$ as follows, \begin{eqnarray*} \|\boldsymbol{u}_0\boldsymbol{v}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \|_F & \leq & \|\boldsymbol{u}_0\boldsymbol{v}_0^* - \alpha_0\boldsymbol{h}_0\boldsymbol{v}_0^* \|_F + \|\alpha_0\boldsymbol{h}_0\boldsymbol{v}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \|_F \\ & \leq & \|\boldsymbol{u}_0 - \alpha_0\boldsymbol{h}_0\| \|\boldsymbol{v}_0\| + \| d \boldsymbol{h}_0 \boldsymbol{h}^*_0 \hat{\boldsymbol{h}}_0 \hat{\boldsymbol{x}}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^* \|_F \\ & \leq & \xi \sqrt{d} \|\boldsymbol{v}_0\| + \|d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \\ & \leq & \xi d + 2 \sqrt{2}\xi \leq \xi (1 + \xi) + 2\sqrt{2}\xi \\ & \leq & 4\xi \leq \frac{2}{5}\epsilon, \end{eqnarray*} where $\|\boldsymbol{v}_0\| = \sqrt{d}$, $\boldsymbol{v}_0 = \sqrt{d}\hat{\boldsymbol{x}}_0$ and $\|d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\|_F \leq \sqrt{2}\|d \hat{\boldsymbol{h}}_0\hat{\boldsymbol{x}}_0^* - \boldsymbol{h}_0\boldsymbol{x}_0^*\| \leq 2\sqrt{2} \xi$ follows from~\eqref{eq:dhx-hx}. \end{proof} \section{Appendix} \subsection{Descent Lemma} \begin{lemma}\label{lem:DSL} If $f(\boldsymbol{z}, \bar{\boldsymbol{z}})$ is a continuously differentiable real-valued function with two complex variables $\boldsymbol{z}$ and $\bar{\boldsymbol{z}}$, (for simplicity, we just denote $f(\boldsymbol{z}, \bar{\boldsymbol{z}})$ by $f(\boldsymbol{z})$ and keep in the mind that $f(\boldsymbol{z})$ only assumes real values) for $\boldsymbol{z} := (\boldsymbol{h}, \boldsymbol{x}) \in \mathcal{N}_{\epsilon}\cap \mathcal{N}_{\widetilde{F}}$. Suppose that there exists a constant $C_L$ such that \begin{equation*} \|\nabla f(\boldsymbol{z} + t \Delta \boldsymbol{z}) - \nabla f(\boldsymbol{z})\| \leq C_L t\|\Delta\boldsymbol{z}\|, \quad \forall 0\leq t\leq 1, \end{equation*} for all $\boldsymbol{z}\in \mathcal{N}_{\epsilon}\cap \mathcal{N}_{\widetilde{F}}$ and $\Delta \boldsymbol{z}$ such that $\boldsymbol{z} + t\Delta \boldsymbol{z} \in \mathcal{N}_{\epsilon}\cap \mathcal{N}_{\widetilde{F}}$ and $0\leq t\leq 1$. Then \begin{equation*} f(\boldsymbol{z} + \Delta \boldsymbol{z}) \leq f(\boldsymbol{z}) + 2\Real( (\Delta \boldsymbol{z})^T \overline{\nabla} f(\boldsymbol{z})) + C_L\|\Delta \boldsymbol{z}\|^2 \end{equation*} where $\overline{\nabla} f(\boldsymbol{z}) := \frac{\partial f(\boldsymbol{z}, \bar{\boldsymbol{z}})}{\partial \boldsymbol{z}}$ is the complex conjugate of $\nabla f(\boldsymbol{z}) = \frac{\partial f(\boldsymbol{z}, \bar{\boldsymbol{z}})}{\partial \bar{\boldsymbol{z}}}$. \end{lemma} \begin{proof} The proof simply follows from proof of descent lemma (Proposition A.24 in~\cite{B99}). However it is slightly different since we are dealing with complex variables. Denote $g(t) := f(\boldsymbol{z} + t\Delta \boldsymbol{z}).$ Since $f(\boldsymbol{z}, \bar{\boldsymbol{z}})$ is a continuously differentiable function, we apply the chain rule \begin{equation} \label{eq:chain} \frac{d g(t)}{dt} = (\Delta\boldsymbol{z})^T\frac{\partial f}{\partial \boldsymbol{z}} (\boldsymbol{z} + t\Delta \boldsymbol{z}) + (\Delta \bar{\boldsymbol{z}})^T \frac{\partial f}{\partial \bar{\boldsymbol{z}}} (\boldsymbol{z} + t\Delta \boldsymbol{z}) = 2\Real ( (\Delta \boldsymbol{z})^T \overline{\nabla} f (\boldsymbol{z} + t\Delta\boldsymbol{z}) ). \end{equation} Then by the Fundamental Theorem of Calculus, \begin{eqnarray*} f(\boldsymbol{z} + t\Delta \boldsymbol{z}) - f(\boldsymbol{z}) & = & \int_0^1 \frac{dg(t)}{dt} dt = 2\int_0^1 \Real ( (\Delta \boldsymbol{z})^T \overline{\nabla} f (\boldsymbol{z} + t\Delta \boldsymbol{z}) ) dt \\ & \leq & 2\Real ((\Delta\boldsymbol{z})^T \overline{\nabla} f(\boldsymbol{z}_0)) + 2\int_0^1 \Real((\Delta\boldsymbol{z})^T(\overline{\nabla} f(\boldsymbol{z} + t\Delta \boldsymbol{z}) - \overline{\nabla} f(\boldsymbol{z}))) dt \\ & \leq & 2\Real((\Delta\boldsymbol{z})^T \overline{\nabla} f(\boldsymbol{z})) + 2 \|\Delta\boldsymbol{z}\| \int_0^1 \| \nabla f(\boldsymbol{z} + t\Delta \boldsymbol{z}) - \nabla f(\boldsymbol{z})) \| dt \\ & \leq & 2\Real((\Delta\boldsymbol{z})^T \overline{\nabla} f(\boldsymbol{z})) + C_L\|\Delta \boldsymbol{z}\|^2. \end{eqnarray*} \end{proof} \subsection{Some useful facts} The key concentration inequality we use throughout our paper comes from Proposition 2 in~\cite{KolVal11,VK11}. \begin{theorem}\label{BernGaussian} Consider a finite sequence of $\mathcal{Z}_l$ of independent centered random matrices with dimension $M_1\times M_2$. Assume that $\|\mathcal{Z}_l\|_{\psi_1} \leq R$ where the norm $\|\cdot\|_{\psi_1}$ of a matrix is defined as \begin{equation}\label{def:psi-1} \|\boldsymbol{Z}\|_{\psi_1} := \inf_{u \geq 0} \{ \E[ \exp(\|\boldsymbol{Z}\|/u)] \leq 2 \}. \end{equation} and introduce the random matrix \begin{equation}\label{S} \boldsymbol{S} = \sum_{l=1}^L \mathcal{Z}_l. \end{equation} Compute the variance parameter \begin{equation}\label{sigmasq} \sigma_0^2 := \max\{ \|\E(\boldsymbol{S}\BS^*)\|, \|\E(\boldsymbol{S}^*\boldsymbol{S})\|\} = \max\Big\{ \| \sum_{l=1}^L \E(\mathcal{Z}_l\mathcal{Z}_l^*)\|, \| \sum_{l=1}^L \E(\mathcal{Z}_l^* \mathcal{Z}_l)\| \Big\}, \end{equation} then for all $t \geq 0$, we have the tail bound on the operator norm of $\boldsymbol{S}$, \begin{equation}\label{thm:bern} \|\boldsymbol{S}\| \leq C_0 \max\{ \sigma_0 \sqrt{t + \log(M_1 + M_2)}, R\log\left( \frac{\sqrt{L}R}{\sigma_0}\right)(t + \log(M_1 + M_2)) \} \end{equation} with probability at least $1 - e^{-t}$ where $C_0$ is an absolute constant. \end{theorem} For convenience we also collect some results used throughout the proofs. \begin{lemma} \label{lem:6JB} Let $z$ be a random variable which obeys $\Pr\{ |z| > u \} \leq a e^{-b u }$, then \begin{equation*} \|z\|_{\psi_1} \leq (1 + a)/b. \end{equation*} which is proven in Lemma 2.2.1 in~\cite{VW96}. Moreover, it is easy to verify that for a scalar $\lambda\in \mathbb{C}$ \begin{equation*} \|\lambda z\|_{\psi_1} = |\lambda| \|z\|_{\psi_1}. \end{equation*} \end{lemma} \begin{lemma}[ Lemma 10-13 in~\cite{RR12}, Lemma 12.4 in~\cite{LS15Blind}] \label{lem:multiple1} Let $\boldsymbol{u}\in\mathbb{C}^n \sim \mathcal{N}(0, \frac{1}{2}\boldsymbol{I}_n) + \mathrm{i} \mathcal{N}(0, \frac{1}{2}\boldsymbol{I}_n) $, then $\|\boldsymbol{u}\|^2 \sim \frac{1}{2}\chi^2_{2n}$ and \begin{equation} \label{lem:8JB} \| \|\boldsymbol{u}\|^2 \|_{\psi_1} = \| \left\langle\boldsymbol{u}, \boldsymbol{u}\right\rangle \|_{\psi_1} \leq C n \end{equation} and \begin{equation} \label{lem:9JB} \E\ls (\boldsymbol{u}\bu^* - \boldsymbol{I}_n)^2 \rs = n\boldsymbol{I}_n. \end{equation} Let $\boldsymbol{q}\in\mathbb{C}^n$ be any deterministic vector, then the following properties hold \begin{equation} \label{lem:11JB} \| (\boldsymbol{u}\bu^* - \boldsymbol{I})\boldsymbol{q}\|_{\psi_1} \leq C\sqrt{n}\|\boldsymbol{q}\|, \end{equation} \begin{equation} \label{lem:12JB} \E\ls (\boldsymbol{u}\bu^* - \boldsymbol{I})\boldsymbol{q}\bq^* (\boldsymbol{u}\bu^* - \boldsymbol{I})\rs = \|\boldsymbol{q}\|^2 \boldsymbol{I}_n. \end{equation} Let $\boldsymbol{v}\sim \mathcal{N}(0, \frac{1}{2}\boldsymbol{I}_m) + \mathrm{i} \mathcal{N}(0, \frac{1}{2}\boldsymbol{I}_m) $ be a complex Gaussian random vector in $\mathbb{C}^m$, independent of $\boldsymbol{u}$, then \begin{equation}\label{lemma:psi} \left\| \|\boldsymbol{u}\| \cdot \|\boldsymbol{v}\|\right\|_{\psi_1} \leq C\sqrt{mn}. \end{equation} \end{lemma} \section*{Acknowledgement} S.~Ling, T.~Strohmer, and K.~Wei acknowledge support from the NSF via grant DTRA-DMS 1322393.
{'timestamp': '2016-06-16T02:13:37', 'yymm': '1606', 'arxiv_id': '1606.04933', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04933'}
arxiv
\subsection{Missing Data in Multilevel Research} \subsubsection{The multivariate mixed effects model} A few options for treating missing data in multilevel models are available in standard statistical software. The pan package \citep{Schafer2014} has been recommended for MI of multilevel data \citep{Graham2012, Enders2010} and is easily accessible through the statistical software R \citep{RCoreTeam2014}. The statistical model behind pan, which we will refer to as the \emph{pan model}, is the multivariate mixed effects model as presented by \citet{Schafer1997a}. The pan model is capable of treating multilevel missing data but may also be used to describe both the imputation and analysis of multilevel data. The model reads \begin{equation} \label{eq:pan} \mathbf{Y}_j = \mathbf{X}_j \boldsymbol\beta + \mathbf{Z}_j \mathbf{b}_j + \mathbf{E}_j \text{,} \end{equation} where $j = 1 , \ldots , G$ denotes groups or other observational units at Level~2. Here, the response matrix $\mathbf{Y}_j$ of group $j$ is regressed on a design matrix $\mathbf{X}_j$ (containing intercept and predictor values) with associated \emph{fixed effects} $\boldsymbol\beta$ and a design matrix $\mathbf{Z}_j$ with associated group-specific \emph{random effects} $\mathbf{b}_j$. The random effects matrix $\mathbf{b}_j$ (with columns stacked) is assumed to follow a normal distribution with mean zero and covariance matrix $\boldsymbol\Psi$ (iid. for all groups). Each row of the error matrix $\mathbf{E}_j$ is assumed to follow a normal distribution with mean zero and covariance matrix $\boldsymbol\Sigma$ (iid. for all individuals). Note that in the pan model, $\boldsymbol\Sigma$ is missing the index $j$ and is thus assumed to be the same for each group. Suppose our dataset consists of two variables $X$ and $Y$, both of which are Level~1 variables that have some variation at Level~2. In a special application of the pan model, we may want to estimate the regression of $Y$ on $X$ with varying coefficients across groups, that is, the random coefficient model (RC model). This model results if we write the outcome $Y$ (e.g., students' math grades) on the left-hand side of Equation \ref{eq:pan}, and the covariate $X$ (e.g., individual achievement) on the right-hand side, and allow for the intercepts and slopes to vary across groups. We will also call the RC model the \emph{analyst's model} as it fits our supposed research question. Finally, we can express the parameters of the analyst's model in a single expression $\boldsymbol\theta = (\boldsymbol\beta,\boldsymbol\Psi,\boldsymbol\Sigma)$ and write $f(Y|X,\boldsymbol\theta_X)$ in short for the RC model. \subsubsection{Missing data terminology} The common classification of missing data mechanisms found in \citet{Rubin1987} assumes a hypothetical complete data matrix, which is decomposed into observed and unobserved parts $\mathbf{Y}=(\mathbf{Y}_{obs},\mathbf{Y}_{mis})$ by an indicator matrix $\mathbf{R}$ denoting the missing data. If values are missing as a random sample of the hypothetical complete data, that is, $P(\mathbf{R}|\mathbf{Y})=P(\mathbf{R})$, the data are missing completely at random (MCAR). If missingness depends on other variables but the data are MCAR with these partialled out, that is, $P(\mathbf{R}|\mathbf{Y})=P(\mathbf{R}|\mathbf{Y}_{obs})$, the data are missing at random (MAR). These two missing data mechanisms are often called ``ignorable''. An ignorable missing data mechanism is highly beneficial for MI because all of the relevant information about the missing values is present in the dataset. This is in contrast to data that are missing \emph{not} at random (MNAR) where missingness is additionally dependent on the missing part of the data, that is, $P(\mathbf{R}|\mathbf{Y})=P(\mathbf{R}|\mathbf{Y}_{obs}, \mathbf{Y}_{mis})$. For such ``nonignorable'' missingness, a general approach to an analysis of missing data is not feasible and strong assumptions have to be made about the missing data mechanism \citep{Carpenter2013}. \subsubsection{Multiple imputation for multilevel models} Multiple imputation, as introduced by \citet{Rubin1987}, is a convenient procedure for obtaining valid parameter estimates from partially unobserved data that usually relies on the MAR assumption (i.e., the observed values provide sufficient information about the missing data mechanism). Using MI, the researcher draws independent random samples from the posterior predictive distribution of the missing values given the observed data and a statistical model, thus generating a number of complete datasets to use in further analyses. The final parameter estimates can be obtained according to the rules described by \citet{Rubin1987} simply by averaging over the parameter estimates from all imputed datasets. Applying MI can be subtle and need not always be the most practical choice in multilevel research \citep{Peters2012, Twisk2013} because its validity is subject to some further conditions. First, with increasing variation and sample size at Level~2, it becomes necessary to include the multilevel structure in the imputation model. Ignoring the multilevel structure using single-level MI may result in biased parameter estimates \citep{vanBuuren2011a, Taljaard2008}. Second, the analyst's model has to be considered, and the imputation model must be specified accordingly \citep{Schafer2003, Meng1994}. Broadly speaking, the imputation model must account for the complexity of the desired analysis. If an imputation model is used that does not include variables or parameters relevant to the analyst (e.g., slope variance), then the analysis results will be biased. And third, the imputation model must incorporate relevant information about the missing data process, that is, variables predictive of missing variables or of the missingness itself \citep{Carpenter2013}, to make the MAR assumption more plausible \citep{Collins2001}. Satisfying these conditions can be cumbersome when varying slopes are of interest. However, little is known about how the quality of parameter estimates in multilevel modeling is affected if one of these conditions is not met. \subsubsection{Missing covariates in models with random slopes} When only the outcome variable contains missing values, MI for a random coefficient model is straightforward. The imputation model can be specified in pan by writing the outcome on the left-hand side of Equation \ref{eq:pan}, and the covariate with fixed and random effects on the right-hand side. This is the previously mentioned RC model, denoted $f(Y|X,\boldsymbol\theta_X)$. The imputation model is then equivalent to the analyst's model. Fewer guidelines are available if a covariate contains missing values. If the outcome is completely observed, then a \emph{reversed} imputation model may be used. For this model, the covariate is written on the left-hand side of Equation \ref{eq:pan} and the outcome on the right-hand side (with fixed and random effects). We will refer to this as the reversed RC model and denote it $f(X|Y,\boldsymbol\theta_Y)$. This model assumes slope variation but does so by regressing $X$ on $Y$, which might induce bias into the parameter estimation. So far, pan has been recommended only for missing covariates whose effect is fixed across groups \citep{Schafer1997a}. Alternatively, for a \emph{multivariate} imputation model, denoted $f(X,Y|\boldsymbol\theta_0)$, both variables could be written on the left-hand side of Equation \ref{eq:pan} with random intercepts for both variables. Slope variation is ignored in this model, but in contrast to the conditional models (i.e., reversed and regular RC) it is able to account for multivariate patterns of missing data. An additional description of these models can be found in Supplement A in the online supplemental materials. The supplemental online materials can be downloaded from \url{http://dx.doi.org/10.6084/m9.figshare.1206375} . In three simulation studies, we assessed the performance of conditional and multivariate MI for random slope models. Study 1, Study 2 and Study 3 examined cases in which missing values occurred on the outcome, the covariate, or both variables, respectively. Study 1 attempted to replicate findings of previous research on partially observed outcome variables. We expected both conditional MI and LD to provide approximately unbiased estimates if the outcome was MAR \citep{Little2002, Carpenter2013}. Study 2 focused on missing covariate data. We expected that the reversed model would recover most parameters of the RC model but that it might perform poorly for the slope variance. Listwise deletion was expected to provide biased estimates with MAR and MNAR data. Study 3 examined multivariate missing data. We expected that multivariate MI would underestimate the slope variance but would recover most other parameters. We expected the results for LD to be similar to the results from the second study. \section{Study 1} The first study compared the performance of LD, conditional MI, and multivariate MI when the only outcome had missing values. For conditional MI, both the analyst's model $f(Y|X,\boldsymbol\theta_X)$ and the imputation model $g(Y|X,\boldsymbol\omega_X)$ were RC models where $\boldsymbol\omega_X$ took on the same role as $\boldsymbol\theta_X$ but denoted a distinct set of model parameters. These models were equally complex and fit the clustered structure of the data. Multivariate MI was set up as described earlier, and LD was applied by restricting the analysis to complete cases only. \subsection{Simulation and Methods} \subsubsection{Data generation and imposition of missing values} Two standardized normal variables $X$ and $Y$ were simulated. Both varied at two levels as indicated by their intraclass correlations (ICCs) $\rho_X$ and $\rho_Y$, respectively. The covariate $X$ was simulated from its within- and between-group portions $X^W \sim N(0,1-\rho_X)$ and $X^B \sim N(0,\rho_X)$, respectively. Then $Y$ was simulated conditionally on $X$ according to Equation \ref{eq:pan} with fixed effects $\boldsymbol\beta = (\beta_0, \beta_1)$, where $\beta_0$ was zero due to standardization. The covariance matrix of random effects was $\boldsymbol\Psi = \left( \begin{smallmatrix} \psi_{11}^2 & 0 \\ 0 & \psi_{22}^2 \end{smallmatrix} \right)$. Thus, the intercepts and slopes were uncorrelated. The Level~1 residual variance was $\boldsymbol\Sigma = \sigma^2$. The variables in this study were parametrized by their ICC rather than their actual variance components. Given the ICC and a slope variance $\psi_{22}^2$, the other variance components followed \citep[see][]{Snijders2012} as \\[-2.5ex] \begin{equation} \label{eq:varcomp} \begin{aligned} \sigma^2 &= (1-\rho_Y) - \beta_1^2(1-\rho_X) - \psi_{22}^2(1-\rho_X) \\ \psi_{11}^2 &= \rho_Y - \beta_1^2\rho_X - \psi_{22}^2\rho_X \text{.} \end{aligned} \end{equation} ~\\[-2ex]\noindent Missing values on $Y$ were imposed using a linear model for the latent response variable $R^{*}$. Values in $Y$ were set to be missing if their respective $R^{*}>0$ according to \\[-2.5ex] \begin{equation} \label{eq:mismech} \begin{aligned} R^{*} &= \alpha + \lambda_1 X + \lambda_2 Y + \varepsilon_{R^{*}} \text{,} \end{aligned} \end{equation} where $\alpha$ is a value of the standard normal distribution according to a missing data probability (e.g., $\alpha = -0.67$ for 25\% missing data), and $\lambda_1$ and $\lambda_2$ are used to control the missing data mechanism. The residuals were distributed normally with mean zero and variance \\[-2ex] \begin{equation} \label{eq:resmis} \sigma_{R^{*}}^2 = 1 - \lambda_1^2 - \lambda_2^2 - 2\;\! \lambda_1 \lambda_2 \text{Cov}(X,Y) \text{.} \end{equation} Table \ref{tab:study} provides an overview of the conditions included in all three studies. The two ICCs were set to be equal, that is, $\rho_X=\rho_Y=\rho$. In order for $Y$ to be MCAR, we set $\lambda_1=\lambda_2=0$, and for MAR, we set $\lambda_1=0.5$ and $\lambda_2=0$. For $Y$ to be MNAR, we chose equal values for $\lambda_1$ and $\lambda_2$ such that the error variance in $R^{*}$ was the same as in the MAR condition. Hence, with $\text{Cov}(X,Y)=\beta_1=0.5$, we had $\lambda_1=\lambda_2=\sqrt{0.25/3} \approx 0.289$. The conditions were chosen to mimic typical data in psychology and the behavioral sciences \citep{Aguinis2013, Mathieu2012, Murray2003}. \begin{table}[tbp] \begin{threeparttable} \renewcommand{\arraystretch}{1.35} \caption{Simulation Designs of Study 1, Study 2, and Study 3} \label{tab:study} \small \begin{tabular}{llll} \hline \\[-3.5ex] Design conditions& Study 1 & Study 2 & Study 3 \\[0.5ex] \hline Number of groups & 50, 150 & 50, 150 & 50, 150 \\ Group size & 10, 30 & 10, 30 & 10, 30 \\ ICC & .05, .15, .25 & .05, .15, .25 & .05, .15, .25 \\ Fixed slope & .50 & .50 & .50 \\ Slope variance & .01, .05, .10, .20 & .01, .05, .10, .20 & .01, .05, .10, .20 \\ MD pattern & univariate $Y$ & univariate $X$ & multivariate $X$ and $Y$ \\ MD proportion & 25\%, 50\% & 25\%, 50\% & 25\%, 50\% \\ MD mechanism & MCAR, MAR, MNAR & MCAR, MAR, MNAR & MCAR, MAR, MNAR \\ Imputation models& RC model $f(Y|X,\boldsymbol\theta_X)$, & reversed RC $f(X|Y,\boldsymbol\theta_Y)$, & multivariate $f(X,Y|\boldsymbol\theta_0)$ \\ & multivariate $f(X,Y|\boldsymbol\theta_0)$ & multivariate $f(X,Y|\boldsymbol\theta_0)$ & \\ \hline \end{tabular} \begin{tablenotes}[para,flushleft] ~\\[-1.5ex] {\small \textit{Note.} ICC = intraclass correlation of $X$ and $Y$; MD = missing data; MCAR = missing completely at random; MAR = missing at random; MNAR = missing not at random; RC = random coefficients.} \end{tablenotes} \end{threeparttable} \end{table} In summary, each simulated setting was defined by the number of groups (G), the number of individuals within each group (N), the ICC of $X$ and $Y$ ($\rho$), the fixed slope ($\beta_1$), the slope variance ($\psi_{22}^2$), the proportion of missing data, and the missing data mechanism (including the missing data effects $\lambda_1$ and $\lambda_2$). Each setting was replicated 1,000 times. \subsubsection{Imputation and data analysis} The R package pan was used to impute missing values \citep{Schafer2014}. We let pan perform 10,000 burn-in cycles before drawing one imputed dataset for every 200 cycles, leading to $M=50$ imputed datasets and 20,000 cycles in total \citep[see][]{Graham2007}. Diagnostic plots regarding the convergence behavior of pan's Gibbs sampler are presented in Supplement B in the online supplemental materials. Least-informative inverse-Wishart priors for $\boldsymbol\Sigma$ and $\boldsymbol\Psi$ were chosen with $\boldsymbol\Sigma \sim W^{-1}(\mathbf{I}_1,1)$ and $\boldsymbol\Psi \sim W^{-1}(\mathbf{I}_2,2)$ for conditional MI, and $\boldsymbol\Sigma \sim W^{-1}(\mathbf{I}_2,2)$ and $\boldsymbol\Psi \sim W^{-1}(\mathbf{I}_2,2)$ for multivariate MI, where $\mathbf{I}_n$ denotes the identity matrix of size $n$. We fit the analyst's model to each imputed dataset using the R package lme4 \citep{Bates2013}. The final parameter estimates were obtained according to Rubin's (1987) rules. We note that choosing least-informative priors implies a prior expectation of variances of $.50$, which might induce bias into small variance components. However, because non-informative priors are often desirable for MI, the same priors were used throughout the three studies. Possible alternative specifications of the prior distribution will be reviewed in the General Discussion. The computer code for running conditional and multivariate MI, with least-informative or alternative priors, is provided in Supplement C of the supplemental online materials. Bias and the root-mean-square error (RMSE) were calculated for each condition and each parameter. The bias is the mean difference between a parameter estimate $\hat \theta$ and its true value $\theta$, and is crucial for statistical reasoning in general. The RMSE is the root of the mean squared difference between $\hat \theta$ and $\theta$ and represents both accuracy and precision (i.e., the variability) of an estimator. Thus, it is an important measure of practical utility. \subsection{Results and Discussion} \begin{table}[tbp] \begin{threeparttable} \caption{Study 1: Bias and RMSE for Estimates Obtained from LD and MI Given Small Variance Components, Smaller or Larger Samples, and Missing $Y$ ~\\[2.0ex]} \label{tab:res1} \setlength{\tabcolsep}{5pt} \renewcommand{\arraystretch}{1.15} \small \input{MisY_Results_VarianceComponents} \begin{tablenotes}[para,flushleft] ~\\[-2.0ex] {\small \textit{Note.} LD = listwise deletion; MV = multivariate imputation; RC = conditional imputation (random coefficients); MCAR = missing completely at random; MAR = missing at random; $\beta_0$ = fixed intercept; ; $\beta_1$ = fixed slope; $\psi_{11}^2$ = intercept variance; $\psi_{22}^2$ = slope variance; $\psi_{12}$ = intercept-slope covariance; $\sigma^2$ = Level~1 residual variance.} \end{tablenotes} \end{threeparttable} \end{table} Due to the large simulation design, only the most important findings will be reported. Furthermore, only results for 25\% missing data will be reported as higher rates did not yield interesting results. The complete results for Study 1 are given in Supplement D in the online supplemental materials. Table \ref{tab:res1} shows the results of the first study for samples that featured small variance components (i.e., $\text{ICC}=.05$, $\psi_{22}^2=.01$) for MCAR and MAR data in smaller (N~=~10, G~=~50) and larger samples (N~=~30, G~=~150). Notable values for bias and RMSE are presented in bold. Bias presented in bold is at least $\pm5\%$ off the true value for fixed effects, and $\pm30\%$ off for variance components. For parameters whose true value was zero, a threshold of $\pm.05$ was used. For each simulated condition, the highest RMSE is printed in bold as long as it was significantly larger than that found for the complete datasets (at least twice as large). As can be seen in Table \ref{tab:res1}, neither LD nor MI produced strongly biased results, but bias emerged under specific conditions for both MI procedures. The multivariate imputation model underestimated the slope variance by as much as 50\% unless it was essentially zero (i.e., $.01$), but overestimated the intercept variance. Conditional MI (using the RC model) overestimated both the intercept and slope variance (Table \ref{tab:res1}, top panel). A sufficient sample size reduced bias to acceptable proportions even for the smallest variance components (Table \ref{tab:res1}, bottom panel). For larger values of the ICC (i.e., $.15$ and $.25$) and the slope variance (i.e., $.05$, $.10$, and $.20$), this bias was reduced to essentially zero (see Supplement D). Using LD, the intercept and slope variance were sometimes biased when samples were not sufficiently large. When data were MNAR, all approaches yielded biased results (see Supplement D). Listwise deletion has previously been shown to provide essentially unbiased estimates when the outcome is ignorably missing \citep[e.g.,][]{Little2002}. Surprisingly, the imputation models overestimated small random effects variances in small samples. We argue that this is a side effect of the least-informative prior which expects variances to be larger, and that bias may be reduced to zero when the prior is set on an appropriate scale (see general discussion). From the data at hand, both LD and conditional MI can be recommended for univariate missing data on $Y$ provided that the sample is sufficiently large or the prior is set on an appropriate scale. Care should be taken when small variance components are to be estimated, as overly non-informative priors may inflate them. The multivariate model is useful if the slope variance is close to zero. \section{Study 2} The second study examined the performance of MI and LD with missing values on the covariate $X$. The analyst's model was again the RC model $f(Y|X,\boldsymbol\theta_X)$, whereas conditional MI was carried out using the \emph{reversed} RC model $g(X|Y,\boldsymbol\omega_Y)$. The two models fit the clustered structure of the data but differed in the way the slope variability was attributed. Multivariate MI and LD were administered as before. \subsection{Simulation and Methods} The same procedures as applied in Study 1 were used to simulate data and impose missing values on the covariate $X$, whereas MAR was now dependent on the outcome $Y$. Imputations were created by pan using the least-informative priors as chosen in Study 1. The analyst's model was fit using lme4, and the bias and RMSE were calculated for each parameter in each setting. \subsection{Results} \begin{table}[tbp] \begin{threeparttable} \caption{Study 2: Bias and RMSE for Estimates Obtained from LD and MI Given Small Variance Components, Smaller or Larger Samples, and Missing $X$ ~\\[1.8ex]} \label{tab:res2} \setlength{\tabcolsep}{5pt} \renewcommand{\arraystretch}{1.15} \small \input{MisX_Results_VarianceComponents} \begin{tablenotes}[para,flushleft] ~\\[-2.0ex] {\small \textit{Note.} LD = listwise deletion; MV = multivariate imputation; RC = conditional imputation (random coefficients); MCAR = missing completely at random; MAR = missing at random; $\beta_0$ = fixed intercept; ; $\beta_1$ = fixed slope; $\psi_{11}^2$ = intercept variance; $\psi_{22}^2$ = slope variance; $\psi_{12}$ = intercept-slope covariance; $\sigma^2$ = Level~1 residual variance.} \end{tablenotes} \end{threeparttable} \end{table} The results of Study 2 are reported in full in Supplement D. Here, we will report the most important findings. Table \ref{tab:res2} provides a brief overview of the results for samples that featured small variance components. Estimating the fixed effects of the RC model proved to be more accurate and efficient using MI. Specific difficulties emerged again for small variance components, that is, when samples featured small ICCs or little slope variation. In contrast to when data were missing on $Y$, however, estimates of larger slope variances were not necessarily unbiased. \subsubsection{Fixed effects} As shown in Table \ref{tab:res2}, LD led to biased estimates for the fixed effects unless the data were MCAR (see Supplement D). Bias for the fixed intercept varied between $-.098$ and $-.161$ with MAR data and between $-.055$ and $-.101$ with MNAR data. The fixed slope was underestimated by approximately 6-10\% when the data were not MCAR. Results from MI were essentially unbiased, but the reversed model exhibited a small downward bias across conditions. The RMSE suggested that estimates obtained from MI were at least as efficient as those obtained by LD across conditions, and more efficient when data were not MCAR. \begin{figure} \centering \includegraphics[width=\linewidth]{BIAS_fixslo_MisX_-_MIS_IMP_-_SV.pdf} \caption{Bias in estimating the fixed slope for univariate missing data on $X$ (Study 2) for different MD mechanisms, MD techniques, and different amounts of slope variance. $\psi_{22}^2$ = true slope variance; MCAR = missing completely at random; MAR = missing at random; MNAR = missing not at random; CD = complete data; LD = listwise deletion; MV = multivariate imputation; RC = conditional imputation using the reversed RC model.} \label{fig:fixslo} \end{figure} Interestingly, bias from both LD and conditional MI was dependent on the amount of slope variation that was present in the dataset. As slope variation increased, bias became weaker with LD, and stronger with conditional MI. This result is illustrated in Figure \ref{fig:fixslo} for small samples (N~=~10, G~=~150), moderate ICCs (i.e., .15), and MAR data. Nonetheless, estimates obtained from MI were more accurate and efficient across all conditions. \subsubsection{Variance and covariance of random effects} Conditional and multivariate MI underestimated the intercept variance when the ICCs were small but provided unbiased estimates otherwise. Listwise deletion followed the same pattern for MCAR data, but otherwise underestimated the intercept variance. This bias was strongest in the MAR condition, weaker with MNAR data, and increased as the ICCs grew larger. Figure \ref{fig:varcomp} (top row) illustrates this finding for different levels of the ICC. Results for the slope variance differed from Study 1. Although conditional MI again overestimated small amounts of slope variation, this bias was much weaker and practically disappeared in larger samples (see Table \ref{tab:res2}). Moderate slope variation could be estimated almost without bias. In contrast to Study 1, however, large and very large slope variances were not estimated correctly by conditional MI but increasingly suffered from a downward bias. Listwise deletion provided practically unbiased estimates of the slope variance if the sample size was sufficiently large. The positive bias for conditional MI was also present with MNAR data, whereas the negative bias was smaller. Figure \ref{fig:varcomp} (bottom row) illustrates these findings for different levels of slope variation. \begin{figure} \centering \includegraphics[width=\linewidth]{BIAS_VarComp_MisX_-_MIS_IMP.pdf} \caption{Bias in estimating the intercept (top row) and slope variance (bottom row) for univariate missing data on $X$ (Study 2) for different values of the ICC or slope variance, respectively, and different MD mechanisms and MD techniques. ICC = true intraclass correlation; $\psi_{22}^2$ = true slope variance; MCAR = missing completely at random; MAR = missing at random; MNAR = missing not at random; CD = complete data; LD = listwise deletion; MV = multivariate imputation; RC = conditional imputation using the reversed RC model.} \label{fig:varcomp} \end{figure} According to the RMSE, the intercept variance could occasionally be estimated more efficiently using MI, whereas the slope variance could be estimated more accurately using LD. However, these differences were usually very small. Supplement D even suggests that conditional MI occasionally estimated the slope variance more efficiently in small samples. \subsubsection{Other parameters} The covariance between random intercepts and slopes was well recovered across all conditions. The Level~1 residual variance was overestimated using MI, where conditional MI was less biased, but it was underestimated by LD when data were not MCAR. For higher amounts of slope variation, the bias associated with LD became smaller, whereas the bias grew for MI. These patterns were observed with MAR and MNAR data, but the bias was relatively small. \subsection{Discussion} Regarding most parameters of the analyst's model, better estimates could be obtained using the reversed MI procedure, especially when the covariate $X$ was not MCAR. This was true for the fixed regression coefficients but also applied to the intercept variance and even transferred to MNAR data. However, reversed MI seemed to provide unstable estimates of the slope variance, which could be positively or negatively biased. The positive bias for small slope variances became essentially zero as the samples grew larger. For larger slope variances, the bias did not approach zero (as in Study 1) but turned negative regardless of sample size. The negative bias was, however, rather small and could be viewed as negligible considering that it only occurred for large slope variances, which are rarely found in empirical studies. Furthermore, the overall precision of the estimates, as indicated by the RMSE, was often comparable to LD because the data were handled more efficiently using MI. The reversed model seemed to share many but not all of the desirable properties of the regular RC model. The multivariate imputation model is applicable if little slope variation is present in the data, but it will suppress even moderate amounts of slope variation and inflate the Level~1 residual variance. Estimates of the fixed slope obtained from multivariate MI were even less biased and more efficient than those from the reversed MI procedure. Listwise deletion offered little benefit as most of its parameter estimates were biased unless the data were MCAR. However, LD provided surprisingly accurate results for the slope variance. Small variance components were again positively biased but less so than in the previous study. We will return to this point in the General Discussion. \section{Study 3} The final study examined the performance of MI and LD with multivariate missing data. The analyst's model was once again the RC model $f(Y|X,\boldsymbol\theta_X)$, but only the multivariate imputation model $g(X,Y|\boldsymbol\omega_0)$ could be applied. This imputation model ignores slope variability, but may provide reasonable results for the remaining parameters of the analyst's model. \subsection{Simulation and Methods} The same procedures that were used in the previous studies could be used for most tasks. Because the pattern of missing data was no longer univariate, the missing data model had to be adjusted. We excluded unit-nonresponse from our considerations; thus, every participant was expected to have at least one observation on either $X$ or $Y$. This allowed us to implement the same mechanisms as described before (i.e., MCAR, MAR, MNAR) for both $X$ and $Y$. For each case, a coin toss decided whether $X$ or $Y$ could be missing (i.e., each was equally likely). The actual missing values were then imposed on either $X$ or $Y$ with the probability that was given in the simulation design. Thus the amount of missing values in each dataset was the same in all three studies. \subsection{Results and Discussion} \begin{table}[tbp] \begin{threeparttable} \caption{Study 3: Bias and RMSE for Estimates Obtained from LD and MI Given Small Variance Components, Smaller or Larger Samples, and Missing $X$ and $Y$ ~\\[1.8ex]} \label{tab:res3} \setlength{\tabcolsep}{5pt} \renewcommand{\arraystretch}{1.15} \small \input{MisXY_Results_VarianceComponents} \begin{tablenotes}[para,flushleft] ~\\[-2.0ex] {\small \textit{Note.} LD = listwise deletion; MV = multivariate imputation; MCAR = missing completely at random; MAR = missing at random; MNAR = missing not at random; $\beta_0$ = fixed intercept; ; $\beta_1$ = fixed slope; $\psi_{11}^2$ = intercept variance; $\psi_{22}^2$ = slope variance; $\psi_{12}$ = intercept-slope covariance; $\sigma^2$ = Level~1 residual variance.} \end{tablenotes} \end{threeparttable} \end{table} The results of the third study provided little further insight into the performance of LD and multivariate MI because the bias and RMSE were usually halfway between those reported in Studies 1 and 2. Results for small variance components are presented in Table \ref{tab:res3}. The complete results are available in Supplement D. Multivariate MI provided approximately unbiased estimates of all parameters as long as the slope variance was close to zero and the values were either MCAR or MAR. The slope variance was underestimated by as much as 40\%, especially in larger samples where more values were imputed under false assumptions. When the data were MNAR, multivariate MI underestimated the fixed regression coefficient, but the bias was relatively small compared with the true values. Estimates obtained from LD were approximately unbiased when data were MCAR. When data were MAR or MNAR, the fixed effects were biased downward and were estimated less efficiently than with multivariate MI, where higher values for the ICC and slope variance reduced bias with LD (see Supplement D). The results of the third study suggest that MI is necessary for proper estimation of the fixed regression coefficients. Unfortunately, pan's multivariate imputation model could not preserve the slope variance. If the slope variance was small and the number of missing values was not very high, then the bias was relatively small in absolute size. Limiting the analysis to complete cases only distorted the parameter estimates, but provided reasonable estimates of the slope variance. \section{General Discussion} We investigated the performance of conditional and multivariate MI for univariate and multivariate patterns of missing data. Both conditional MI and LD provided unbiased estimates if only the outcome was missing. Care should be taken if covariates are partially unobserved. Imputing the covariate in a reversed manner accounted for, but also misspecified the slope variation. Only vague estimates could be obtained for the slope variance, but bias was not extreme, and the remaining estimates exhibited either no or less bias than what would have been obtained by deleting cases. The multivariate imputation model rarely induced any bias but strongly underestimated the slope variance. Thus, it is appropriate only if the true slope variance is close to zero and not too many values are unobserved. We recommend that LD be avoided when covariate data are missing unless the data are strictly MCAR. As is true for all computer simulations, our study was limited in several ways. The missing data mechanisms were based on linear models and may behave quite differently in nature. Other implementations are possible, and results may vary especially for MAR and MNAR data \citep{Allison2000, Galati2013}. We focused on descriptive measures of approximate performance but ignored statistical inference. Testing for slope variation \citep{LaHuis2007} as well as Type-I and Type-II error rates associated with LD and MI should be a subject of future research. Rather than estimating the slope variance, researchers often wish to explain it using predictor variables at Level~2 \citep{Mathieu2012, Aguinis2013}. Cross-level interaction effects might be relatively easy to recover even if the slope variance is not. Interestingly, small variance components were positively biased across the three studies. We argue that this is due to the standard least-informative prior, which induces bias into small variance components. Ad hoc procedures might combine the specific advantages of LD and MI and lead to less biased and more stable estimates. For example, choosing $D^{-1} = 2 \cdot \hat{\boldsymbol\Psi}_{LD}$ as the scale matrix of the inverse Wishart prior for the covariance matrix of random effects, where $\hat{\boldsymbol\Psi}_{LD}$ is an estimate of this covariance matrix obtained from LD, would loosely center the prior distribution around appropriate values. The computer code for this specification is provided in Supplement C of the supplemental online materials. We conducted a small simulation to examine whether the bias for the intercept and slope variance could be reduced by rescaling the prior distribution in this manner. The simulation featured small samples, univariate MAR data on either $X$ or $Y$, small values for the ICCs, as well as small and very large values for the slope variance. Estimates of small variance components that utilized the adjusted prior did not exhibit any more bias than LD did and were often more efficient. The positive bias reported in Studies 1 and 2 could therefore be viewed as an artifact of specifying the least-informative prior. The negative bias for large slope variances in Study 2, however, could not be improved in this manner. Using least squares or maximum likelihood estimation might further strengthen this approach. The methodological literature offers alternatives to pan for multilevel MI. It has been suggested that multilevel data be imputed using dummy variables in random intercept models but that imputations should be conducted separately for each group if random slopes are involved \citep{Graham2009, Graham2012}. However, \citet{Andridge2011} found that the first approach leads to biased results, and unreported simulation results indicate that very large samples are needed to treat even small amounts of missing data with the second approach. Alternative MI procedures include \emph{fully conditional specification} using chained equations \citep{vanBuuren2011}. These procedures might lead to better results, but may face similar problems with respect to the slope variance. However, recent developments in the context of substantive model compatible MI have offered promising results for interaction effects and nonlinear terms among covariates that have missing values \citep{vonHippel2009, Bartlett2014a}. Extending this approach to multilevel MI \citep{Goldstein2009, Goldstein2014} and applying it to random slope models should be the subject of future research. Adaptations of the pan model have been proposed by \citet{Shin2010} and \citet{Yucel2011}. The latter approach specifies a joint model that allows the within-group covariance matrix to vary across groups, and has been recently discussed by \citet{Carpenter2013}. However, it is currently not available in standard software and has yet to be evaluated in a systematic manner. In general, we believe that MI is a flexible and powerful tool that can be used to treat missing data in multilevel research. More research should be conducted to generalize the current formulations of MI and to evaluate recent developments as well as sensible ad hoc solutions to missing data in multilevel models with random slopes. \bibliographystyle{apacite}
{'timestamp': '2016-06-17T02:11:18', 'yymm': '1606', 'arxiv_id': '1606.05204', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05204'}
arxiv
\section{Comments} \section{Introduction} Since the seminal work of \citet{james1961estimation}, shrinkage estimation has been immensely successful in various statistical disciplines and continues to enjoy widespread attention. Many shrinkage estimators have a natural Bayesian flavor. For example, one obtains the ridge regression estimator as the posterior mean arising from an isotropic Gaussian prior on the vector of regression coefficients \citep{jeffries1961theory,hoerl1970ridge}. Along similar lines, an empirical Bayes interpretation of the (positive part) James--Stein estimator can be obtained \citep{efron1973stein}. Such connections have been extended to the semiparametric regression context, with applications to smoothing splines and penalized splines \citep{wahba1990spline,ruppert2003semiparametric}. Over the past decade and a half, a number of second-generation shrinkage priors have appeared in the literature in relation to high-dimensional sparse estimation. Such priors can be almost exclusively expressed as global-local scale mixtures of Gaussians \citep{polson2010shrink}; examples include the relevance vector machine \citep{tipping2001sparse}, normal/Jeffrey's prior \citep{bae2004gene}, the Bayesian lasso \citep{park2008bayesian,hans2009bayesian}, the horseshoe \citep{carvalho2010horseshoe}, normal/gamma and normal/inverse-Gaussian priors \citep{caron2008sparse,griffin2010inference}, generalized double Pareto priors \citep{armagan2011generalized} and Dirichlet--Laplace priors \citep{bhattacharya2015dirichlet}. These priors typically have a large spike near zero with heavy tails, thereby providing an approximation to the operating characteristics of sparsity inducing discrete mixture priors \citep{ george1997approaches,johnson2012bayesian}. For more on connections between Bayesian model averaging and shrinkage, refer to \cite{polson2010shrink}. A key distinction between ridge-type shrinkage priors and the global-local priors is that while ridge-type priors typically shrink towards a fixed point, most commonly the origin, the global-local priors provide shrinkage towards the union of subspaces consisting of sparse vectors, with the amount of sparsity controlled by certain hyperparameters \citep{bhattacharya2015dirichlet}. In this article, we further enlarge the scope of shrinkage to present a class of functional shrinkage priors, namely the functional horseshoe priors (fHS), that facilitate shrinkage towards pre-specified subspaces. The shrinkage factor (defined in Section 3) is assigned a $\mbox{Beta}(a, b)$ prior with $a, b < 1$, which has the shape of a horseshoe \citep{carvalho2010horseshoe}. However, while the horseshoe prior of \cite{carvalho2010horseshoe} shrinks towards sparse vectors, the proposed functional horseshoe prior shrinks functions towards arbitrary subspaces. As a preliminary example, consider a nonparametric regression model with unknown regression function $f : \mathcal X \to \mathbb R$ given by\begin{align}\label{eq:normal_mean} Y = F + \varepsilon, \quad \varepsilon \sim { \mathrm{N} }(0, \sigma^2 \mathrm I_n), \end{align} where $Y = (y_1, \ldots, y_n)^{{ \mathrm{\scriptscriptstyle T} }}$, and $F = (f(x_1), \ldots, f(x_n))^{{ \mathrm{\scriptscriptstyle T} }} = \bbE (Y \mid \bx)$, with the covariates $x_i \in \mathcal X \subset \mathbb R$. In \eqref{eq:normal_mean}, we can either make parametric assumptions (e.g., linear or quadratic dependence on $x$) regarding the shape of $f$, or model it nonparametrically using splines, wavelets, Gaussian processes, etc. Although one can examine a scatter plot or perform a goodness of fit test to ascertain the validity of a linear or quadratic model in \eqref{eq:normal_mean}, such an exercise is only feasible in relatively simple settings. In relatively complex and/or high dimensional problems, there is clearly a need for an automatic data-driven procedure to adapt between models of varying complexity. With this motivation, we propose the functional horseshoe prior that encourages shrinkage towards a parametric class of models embedded inside a larger semiparametric model, as long as a suitable projection operator can be defined. For example, in \eqref{eq:normal_mean}, $f$ will be shrunk towards a linear or quadratic function if such parametric assumptions are supported by the data, and will remain unshrunk otherwise. As noted already, our approach is not limited to the univariate regression context and can be extended to the varying coefficient model \citep{hastie1993varying}, density estimation via log-spline models \citep{kooperberg1991study}, and additive models \citep{hastie1986generalized}, among others; further details are provided in Section \ref{sec:sim}. In the additive regression context, the proposed approach is highly competitive to state-of-the-art procedures such as the {\it Sparse Additive Model} (SpAM) of \cite{ravikumar2009sparse} and the {\it High-dimensional Generalized Additive Model} (HGAM) by \cite{meier2009high}. We provide theoretical support to the method by showing an adaptive property of the approach in the context of \eqref{eq:normal_mean}. Specifically, we show that the posterior contracts \citep{ghosal2000convergence} at the parametric rate if the true function belongs to the pre-designated subspace, and contracts at the optimal rate for $\alpha$-smooth functions otherwise. In other words, our approach adapts to the parametric shape of the unknown function while allowing deviations from the parametric shape in a nonparametric fashion. \section{Preliminaries}\label{sec:pre} We begin by introducing some notation. For $\alpha > 0$, let $\lfloor \alpha \rfloor$ denote the largest integer smaller than or equal to $\alpha$ and $\ceil{\alpha}$ denote the smallest integer larger than or equal to $\alpha$. Let $C^{\alpha}[0,1]$ denote the H{\"o}lder class of $\alpha$ smooth functions on $[0,1]$ that have continuously differentiable derivatives up to order $\lfloor \alpha \rfloor$, with the $\lfloor \alpha \rfloor$th order derivative being Lipschitz continuous of order $\alpha - \lfloor \alpha \rfloor$. For a vector $x \in \mathbb R^d$, let $\norm{x}$ denote its Euclidean norm. For a function $g:[0,1] \to \mathbb R$ and points $x_1, \ldots, x_n \in [0,1]$, let $\norm{g}_{2,n}^2 = n^{-1} \sum_{i=1}^n g^2(x_i)$; we shall refer to $\norm{\cdot}_{2,n}$ as the empirical $L_2$ norm. For an $m \times d$ matrix $A$ with $m > d$ and $\mbox{rk}(A) = d$, let $\mathfrak{L}(A)=\{ A\beta : \beta \in \mathbb R^d \}$ denote the column space of $A$, which is a $d$-dimensional subspace of $\mathbb R^m$. Let $\Proj_A = A(A^{{ \mathrm{\scriptscriptstyle T} }} A)^{-1} A^{{ \mathrm{\scriptscriptstyle T} }}$ denote the projection matrix on $\mathfrak{L}(A)$. \section{The functional horseshoe prior}\label{sec:main} In the nonparametric regression model in \eqref{eq:normal_mean}, we model the unknown function $f$ as spanned by a set of pre-specified basis functions $\{\phi_j\}_{1\leq j\leq k_n}$ as follows: \begin{eqnarray}\label{eq:ff} f(x) = \sum_{j=1}^{k_n} \beta_j \phi_j(x). \end{eqnarray} We shall work with the B-spline basis in the sequel, though the methodology generalizes to a larger class of basis functions. The B-splines basis functions can be constructed in a recursive way. Let the positive integer $q$ denote the degree of the B-spline basis functions satisfying $k_n>q+1$. Define a sequence of knots $0=t_0<t_1<\cdots<t_{k_n-q}=1$ In addition, define $q$ knots $t_{-q}=\cdots=t_{-1} = t_0$ and another set of $q$ knots $t_{k_n-q}=\cdots=t_{k_n}$. As in \citet{de2001practical}, the B-spline basis functions are defined as \begin{eqnarray*} \phi_{j,1}(x) &=& \begin{cases} 1,\:\: t_j\leq x<t_{j+1},\\ 0,\:\:\mbox{otherwise}, \end{cases}\\ \phi_{j,q+1}(x) &=& \frac{x-t_j}{t_{j+q}-t_j}\phi_{j,q}(x) + \frac{t_{j+q+1}-x}{t_{j+q+1}-t_{j+1}}\phi_{j+1,q}(x), \end{eqnarray*} for $j=-q,\dots,k_n-q-1$. We reindex $j=-q,\dots,k_n-q-1$ to $j=1,\dots,k_n$ and the number of basis functions is $k_n$. Letting $\beta = (\beta_1, \ldots, \beta_{k_n})^{{ \mathrm{\scriptscriptstyle T} }}$ denote the vector of basis coefficients and $\Phi = \{\phi_j(X_i)\}_{1 \le i \le n, 1 \le j \le k_n}$ denote the $n \times k_n$ matrix of basis functions evaluated at the observed covariates, the model \eqref{eq:normal_mean} can be expressed as \begin{eqnarray}\label{eq:basis_exp} Y \mid \beta \sim \mbox{N}(\Phi \beta, \sigma^2 \mathrm I_n). \end{eqnarray} A standard choice for a prior on $\beta$ is a $g$-prior $\beta \sim \mbox{N}(0, g (\Phi^{{ \mathrm{\scriptscriptstyle T} }} \Phi)^{-1})$\citep{zellner1986}. $g$-priors have been commonly used in linear models, since they incorporate the correlation structure of the covariates inside the prior variance. The posterior mean of $\beta$ with a $g$-prior can be expressed as $\{ 1 - 1/(1+g)\} \widehat{\beta}$, where $\widehat{\beta} = \Proj_{\Phi} Y$ is the maximum likelihood estimate of $\beta$. Thus, the posterior mean shrinks the maximum likelihood estimator towards zero, with the amount of shrinkage controlled by the parameter $g$. \citet{bontemps2011bernstein} studied asymptotic properties of the resulting posterior by providing bounds on the total variation distance between the posterior distribution and a Gaussian distribution centered at the maximum likelihood estimator with the inverse Fisher information matrix as covariance. In his work, the $g$ parameter was fixed {\em a priori} depending on the sample size $n$ and the error variance $\sigma^2$. His results in particular imply minimax optimal posterior convergence for $\alpha$-smooth functions. Among related work, \citet{ghosal2007convergence} established minimax optimality with isotropic Gaussian priors on $\beta$. Our goal is to define a broader class of shrinkage priors on $\beta$ that facilitate shrinkage towards a {\em null subspace} that is fixed in advance, rather than shrinkage towards the origin or any other fixed {a priori} guess $\beta_0$. For example, if we have {\em a priori} belief that the function is likely to attain a linear shape, then we would like to impose shrinkage towards the class of linear functions. In general, our methodology allows shrinkage towards any null subspace spanned by the columns of a null regressor matrix $\Phi_0$, with $d_0 = \mbox{rank}(\Phi_0)$ the dimension of the null space. For example in the linear case, we define the null space as $\mathfrak{L}(\Phi_0)$ with $\Phi_0 = \{{\bf 1},\bx\} \in \mathbb R^{n \times 2}$, where ${\bf 1}$ is a $n \times 1$ vector of ones and $d_0 = 2$. Shrinkage towards quadratic, or more generally polynomial, regression are achieved similarly. With the above ingredients, we propose the functional horseshoe prior through the following hierarchical specification: \begin{eqnarray} \pi(\beta\mid\tau) &\propto& (\tau^2)^{-(k_n-d_0)/2}\exp\left\{ -\frac{1}{2\sigma^2\tau^2} \beta^{ \mathrm{\scriptscriptstyle T} }\Phi^{ \mathrm{\scriptscriptstyle T} }\IP\Phi\beta \right\}, \label{eq:beta_pr} \\ \pi(\tau) &\propto& \frac{(\tau^2)^{b-1/2 }}{(1+\tau^2)^{(a+b)}} \mathbbm{1}_{(0, \infty)}(\tau), \label{eq:hyper} \end{eqnarray} where $a, b > 0$ and recall that $\Proj_0 = \Phi_0(\Phi_0^{ \mathrm{\scriptscriptstyle T} }\Phi_0)^{-1}\Phi_0^{ \mathrm{\scriptscriptstyle T} }$ denotes the projection matrix of $\Phi_0$. When $\Phi_0 = 0$, \eqref{eq:beta_pr} is equivalent to a $g$-prior with $g = \tau^2$. The key additional feature in our proposed prior is to introduce the quantity $\IP$ in the exponent, which enables shrinkage towards subspaces rather than single points. Although the proposed prior may be singular, it follows from the subsequent results that the joint posterior of $(\beta, \tau^2)$ is proper. Note that the prior on the scale parameter $\tau$ follows a half-Cauchy distribution when $a = b = 1/2$. Half-Cauchy priors have been recommended as a default prior choice for global scale parameters in the linear regression framework \citep{polson2012half}. Using the reparameterization $\omega = 1/(1 + \tau^2)$, the prior \eqref{eq:hyper} can be interpreted as the prior induced on $\tau$ via a $\mbox{Beta}(a, b)$ prior on $\omega$. We shall work in the $\omega$ parameterization subsequently for reasons to be evident shortly. Exploiting the conditional Gaussian specification, the conditional posterior of $\beta$ is Gaussian, \begin{align}\label{eq:beta_post} \beta \mid Y, \omega \sim \mbox{N}( \wt{\beta}_{\omega}, \wt\Sigma_{\omega}), \end{align} where \begin{align}\label{eq:beta_mv} \wt{\beta}_{\omega} = \left(\Phi^{{ \mathrm{\scriptscriptstyle T} }} \Phi+ \frac{\omega}{1-\omega}\Phi^{ \mathrm{\scriptscriptstyle T} }\IP\Phi\right)^{-1} \Phi^{{ \mathrm{\scriptscriptstyle T} }} Y, \quad \wt\Sigma_{\omega} = \sigma^2 \left(\Phi^{{ \mathrm{\scriptscriptstyle T} }} \Phi+\frac{\omega}{1-\omega}\Phi^{ \mathrm{\scriptscriptstyle T} }\IP\Phi \right)^{-1}. \end{align} We now state a lemma which delineates the role of $\omega$ as the parameter controlling the shrinkage. \begin{lemma}\label{lem:postm} Suppose that $\mathfrak{L}(\Phi_0) \subsetneq \mathfrak{L}(\Phi)$. Then, \be \bbE\left[\Phi\beta \mid Y,\omega \right] = \Phi\wt\beta_\omega= (1-\omega)\Proj_{\Phi} Y + \omega \Proj_0 Y, \ee where $\Proj_\Phi$ is the projection matrix of $\Phi$. \end{lemma} The above lemma suggests that the conditional posterior mean of the regression function given $\omega$ is a convex combination of the classical B-spline estimator $\Proj_{\Phi} Y$ and the parametric estimator $\Proj_0 Y$. The parameter $\omega\in(0,1)$ controls the shrinkage effect; the closer $\omega$ is to $1$, the greater the shrinkage towards the parametric estimator. We learn the parameter $\omega$ from the data with a $\mbox{Beta}(a, b)$ prior on $\omega$. The hyperparameter $b < 1$ controls the amount of prior mass near one. Figure \ref{fig:beta} illustrates the connection between the choice of the hyperparameters $a$ and $b$ and the shrinkage behavior of the prior. The first and the second column in Figure \ref{fig:beta}, with $a$ fixed at $1/2$ shows that the prior density of $\omega$ increasingly concentrates near $1$ as $b$ decreases from $1/2$ to $10^{-1}$. The third column in Figure \ref{fig:beta} depicts the prior probability that $\omega>0.95$ and $\omega<0.05$. Clearly, as $b$ decreases, the amount of prior mass around one increases, which results in stronger shrinkage towards the parametric estimator. In particular, when $a= b = 1/2$, the resulting ``horseshoe" prior density derives its name from the shape of the prior on $\omega$ \citep{carvalho2010horseshoe}. \begin{figure} \includegraphics[height=4.5cm, width=16cm]{beta1.pdf} \caption{The first two columns illustrate the prior density function of $\omega$ with different hyperparameters $(a,b)$: $(1/2,1/2)$ for the first column and $(1/2,10^{-1})$ for the second column. The third column shows the prior probability that $\omega>0.95$ (solid line) and $\omega<0.05$ (dotted line) for varying $b$ and a fixed $a=1/2$.} \label{fig:beta} \end{figure} When $\mathfrak{L}(\Phi_0) \subsetneq \mathfrak{L}(\Phi)$, we can orthogonally decompose $\Proj_\Phi = \Proj_1 + \Proj_0$, where the columns of $\Proj_1$ are orthogonal to $\Proj_0$, i.e., $\Proj_1^{{ \mathrm{\scriptscriptstyle T} }} \Proj_0 = 0$. To see this, since $\mathfrak{L}(\Phi_0) \subsetneq \mathfrak{L}(\Phi)$, we can use Gram-Schmidt orthogonalization to create $\wt{\Phi} = [\Phi_0; \Phi_1]$ of the same dimension as $\Phi$ such that $\Phi_1^{{ \mathrm{\scriptscriptstyle T} }} \Phi_0 = 0$ and $\mathfrak{L}(\Phi) = \mathfrak{L}(\wt{\Phi})$. Then, we let $\Proj_{1}$ denote the projection matrix on $\mathfrak{L}(\Phi_1)$. Simple algebra shows that \begin{align} & \pi(\omega \mid Y) = \int \pi(\omega, \beta \mid Y) d \beta = \frac{\pi(\omega)}{m(Y)} \int f(Y \mid \beta, \omega) \pi(\beta \mid \omega) d \beta \notag \\ & = \omega^{a+(k_n-d_0)/2-1}(1-\omega)^{b-1}\exp\{-H_n \omega \}/m(Y), \label{eq:omega} \end{align} where $H_n = Y^{{ \mathrm{\scriptscriptstyle T} }} \Proj_{1} Y/(2\sigma^2)$ and $m(Y) = \int^1_0 \omega^{a+(k_n-d_0)/2-1}(1-\omega)^{b-1}\exp\left\{ -H_n\omega \right\} d\omega$. To investigate the asymptotic behavior of the implied posterior, it is crucial to find tight two-sided bounds on $m(Y)$, which is stated in Lemma \ref{lem:C}. \begin{lemma}{(Bounds on the normalizing constant)}\label{lem:C} Let $A_n$ and $B_n$ be arbitrary sequences satisfying $A_n\to \infty$ as $n \to \infty$ and $B_n=O(1)$. Define $t_n = \int_0^1 \omega^{A_n-1}(1-\omega)^{B_n-1}\exp\{-H_n\omega\}d\omega$. Then, \be \frac{\Gamma(A_n)\Gamma(B_n)}{\Gamma(A_n+B_n)}\exp\{-H_n\}(1+Q_n^L) \leq t_n \leq \frac{\Gamma(A_n)\Gamma(B_n)}{\Gamma(A_n+B_n)}\exp\{-H_n\}(1+Q_n^U), \ee where, \be Q_n^U &=& \frac{B_n}{A_n+B_n}\exp( H_n),\\ Q_n^L &=& \frac{B_nH_n}{A_n+B_n} + \frac{DB_n(B_n+T_n)^{-A_n}}{(A_n+B_n)^{3/2}}\left(\exp\{H_n\} - 1 -H_n - (T_n+2)^{-1/2}\right)_+, \ee where $T_n=\max\{A_n^2, 3\ceil{H_n}\}$ and $D$ is some positive constant. \end{lemma} By setting $A_n=a+k_n/2$ and $B_n = b$, Lemma \ref{lem:C} suggests that the magnitude of the normalizing constant $m(Y)$ in \eqref{eq:omega} is determined by an interplay between the relative sizes of $b$ and $\exp(H_n)$. When $b$ is small enough to dominate $\exp(H_n)$, $m(Y) \approx \mbox{Be}(a+k_n/2,b) \exp(-H_n)$, where $\mbox{Be}(\cdot,\cdot)$ denotes the beta function. Otherwise, $m(Y) \approx Be(a+k_n/2,b)b$ ignoring polynomial terms. This asymptotic behavior of $m(Y)$ is the key ingredient to identify the posterior contraction rate of the functional horseshoe prior. We also note that the magnitude of $a$ asymptotically does not affect the strength of shrinkage as long as $a$ is a fixed constant, since the prior contribution $\omega^{a-1}$ is dominated by the likelihood contribution $\omega^{k_n/2}$. \subsection{ {\bf Posterior concentration rate}}\label{sec:post} We state a set of assumptions (\cite{zhou1998local}, \cite{claeskens2009asymptotic}) that have been used in the literature to prove minimax optimality of B-spline estimators. Assume that the following conditions hold: {\bf (A1)}. Let $u=\max_{1\leq j \leq (k_n-1)}(t_{j+1}-t_j)$. There exists a constant $C>0$, such that \\ $u/\min_{1\leq j\leq (k_n-1)}(t_{j+1}-t_j) \leq C$ and $u=o(k_n^{-1})$. {\bf (A2)}. There exists some distribution function $G$ with a positive continuous density such that \be \sup_{x\in[0,1]}|G_n(x)-G(x)|= o(k_n^{-1}), \ee where $G_n$ is the empirical distribution of the covariates $\{x_i\}_{1\leq i \leq n}$, which are fixed by design. Under {\bf (A1)} and {\bf (A2)}, \cite{zhou1998local} showed that the mean square error of the B-spline estimator $\Proj_\Phi Y$ achieves the minimax optimal rate. If the true function $f_0 \in C^{\alpha}[0, 1]$ is $\alpha$-smooth and the number of basis functions $k_n \asymp n^{1/(2 \alpha + 1)}$, then \cite{zhou1998local} shows that \begin{eqnarray} \bbE_0\left[ \norm{\Proj_\Phi Y - F_0}_{2,n}^2\right] = O\left(n^{-2\alpha/(1+2\alpha)}\right),\label{eq:classic} \end{eqnarray} where $\bbE_0(\cdot)$ represents an expectation with respect to the true data generating distribution of $Y$. We now state our main result on the posterior contraction rate of the functional horseshoe prior. \begin{theorem \label{theo:post} Consider the model \eqref{eq:normal_mean} equipped with the functional horseshoe prior \eqref{eq:beta_pr}-\eqref{eq:hyper}. Assume {\bf (A1)} and {\bf(A2)} hold and $\mathfrak{L}(\Phi_0) \subsetneq \mathfrak{L}(\Phi)$. Further, assume that for some integer $\alpha \ge 1$, the true regression function $f_0\in C^\alpha[0,1]$ and the B-spline basis functions $\Phi$ are constructed with $k_n-\lfloor\alpha\rfloor$ knots and $\lfloor\alpha\rfloor-1$ degree, where $k_n \asymp n^{1/(1+2\alpha)}$. Suppose that the prior hyperparameters $a$ and $b$ in \eqref{eq:hyper} satisfy $a \in (\delta, 1 - \delta)$ for some constant $\delta \in (0, 1/2)$, and $k_n\log k_n\prec -\log b \prec (n k_n)^{1/2}$. Then, \begin{eqnarray}\label{eq:post} \bbE_0\left[ P\left\{\norm{\Phi\beta - F_0}_{2,n} >M_n(f_0)^{1/2} \mid Y \right\} \right] = o(1), \end{eqnarray} where \be M_n(f_0) = \begin{cases} \zeta_n n^{-1},\:\:\mbox{if}\:\:F_0 \in \mathfrak{L}(\Phi_0), \\ \zeta_n n^{-2\alpha/(1+2\alpha)}\log n,\:\:\mbox{if}\:\: F_0^{ \mathrm{\scriptscriptstyle T} }\IP F_0 \asymp n, \end{cases} \ee where $\zeta_n$ can be any arbitrary sequence that diverges to infinity as $n$ tends to $\infty$. \end{theorem} Theorem \ref{theo:post} exhibits an adaptive property of the functional horseshoe prior. If the true function is $\alpha$-smooth, then the posterior contracts around the true function at the near minimax rate of $n^{-\alpha/(2\alpha + 1)} \log n$. However, if the true function $f_0$ belongs to the finite dimensional subspace $\mathfrak{L}(\Phi_0)$, then the posterior contracts around $f_0$ in the empirical $L_2$ norm at the parametric $1/\sqrt{n}$ rate. We note that the bound $k_n \log k_n \prec -\log b \prec (n k_n)^{1/2}$ is key to the adaptivity of the posterior, since the strength of the shrinkage towards $\mathfrak{L}(\Phi_0)$ is controlled by $b$. If $-\log b \prec k_n \log k_n$, then the shrinkage towards $\mathfrak{L}(\Phi_0)$ is too weak to achieve the parametric rate when $F_0\in\mathfrak{L}(\Phi_0)$. On the other hand, if $-\log b \succ (nk_n)^{1/2}$, the resulting posterior distribution would strongly concentrate around $\mathfrak{L}(\Phi_0)$, and it would fail to attain the optimal nonparametric rate of posterior contraction when $F_0\not\in\mathfrak{L}(\Phi_0)$. We ignore the subspace of functions such that $\{F \in \mathbb{R}^n: F^{ \mathrm{\scriptscriptstyle T} } \IP F = o(n),\:\:F\not\in \mathfrak{L}(\Phi_0)\}$. We only focus on the function space that can be strictly separated from the null space $\mathfrak{L}(\Phi_0)$, although it would be meaningful to illustrate the shrinkage behavior when the regression function $f$ approaches the null space in a sense that $F^{ \mathrm{\scriptscriptstyle T} } \IP F/n \to 0$ as $n\to\infty$. \section{Extensions to Gaussian process priors}\label{sec:GP} Even though the procedure based on the functional horseshoe prior can be interpreted as a partial linear model, its scope of applicability extends to a more general class of nonparametric models. We outline such an extension to Gaussian process (GP) priors below \citep{neal1998regression,rasmussen2006gaussian}: \begin{eqnarray}\label{eq:gp} F \mid\Sigma,\tau &\sim& { \mathrm{N} }\left({\bf 0},\{\Sigma(\bx)^{-1}+\IP/\tau^2\}^{-1} \right)\\ \pi(\tau) &\propto& \frac{(\tau^2)^{b-1/2 }}{(1+\tau^2)^{(a+b)}} \mathbbm{1}_{(0, \infty)}(\tau),\nonumber \end{eqnarray} where $\Sigma(\cdot, \cdot)$ is a positive definite covariance kernel with $\Sigma(\bx) = (\Sigma(x_i, x_j))$, and $\mathrm{Q}_0$, $a$ and $b$ are defined in \eqref{eq:beta_pr} and \eqref{eq:hyper}. We note that the proposed prior does not define a stochastic process. However, it can be used as a prior on $F$ given the set of locations $\bx$. To investigate the shrinkage effect of the modified GP prior, we considered two examples of GP priors with the functional shrinkage idea: shrinking towards a class of linear functions and a class of piece-wise linear functions. For shrinking towards linearity, it is straightforward to choose $\Phi_0$, which is defined in Section \ref{sec:main}, as being equivalent to $\{{\bf 1}, \bx\}$. In the same sense, for the shrinkage towards a class of piece-wise linear functions with the knots $-1$ and $1$, we can consider $\Phi_0=\{ {\bf 1}, (\bx+{\bf 1})_+,(-\bx-{\bf 1})_+,(\bx-{\bf 1})_+ \}$, where $(t)_+ = t$, if $t>0$ and zero otherwise. \begin{figure} \includegraphics[height=4.5cm, width=16cm]{GP.pdf} \caption{ Samples from the classical GP prior (the first column), the GP prior with shrinkage towards linear functions (the second column), and the GP prior with shrinkage towards piecewise linear functions with knots $-1$ and $1$ (the third column).} \label{fig:GP} \end{figure} Figure \ref{fig:GP} illustrates a comparison between the classical GP prior and the shrinkage version of the GP prior. The covariates were independently generated from a uniform distribution between $-\pi$ and $\pi$. The exponential covariance function, i.e., $\Sigma(\bx)_{i,k} = \exp\{ -|x_i-x_k| \}$ for $1\leq i, k \leq n$, was considered, and we set $a=1/2$ and $b=n^{-2}$ with sample size $n=100$. The first plot shows five sample curves generated from the classical GP prior, i.e., ${ \mathrm{N} }({\bf 0}, \Sigma(\bx))$. The second and the third plots display five sample curves from the modified GP prior in \eqref{eq:gp} with shrinkage towards linear and piece-wise linear functions, respectively. The near parametric forms of the sample paths from the modified GP prior suggest a promising way to shrink GP regression towards simpler parametric classes. \section{Simulation studies}\label{sec:sim} \subsection{Univariate examples} In this section, we examine the performance of the functional horseshoe prior on various simulated data sets. We consider three models as follows: \begin{eqnarray} \mbox{i) simple regression model:}&& Y_i = f(x_i) + \epsilon_i \label{eq:reg}\\ \mbox{ii) varying coefficient model:}&\:& Y_i = w_if(x_i) +\epsilon_i\label{eq:vc}\\ \mbox{iii) density function estimation:}&\:& p(Y_i) = \frac{\exp\{ f(Y_i) \} }{\int \exp\{ f(t) \}dt }, \label{eq:density} \end{eqnarray} with $\epsilon_i\overset{i.i.d}\sim{ \mathrm{N} }(0,\sigma^2)$ for $i=1,\dots,n$ in (i) and (ii), and $p(\cdot)$ the density function of $Y$ in (iii). The varying coefficient model \citep{hastie1993varying} in \eqref{eq:vc} reduces to a linear model when the coefficient function $f$ is constant, and the density function $p$ is Gaussian when the log-density function $f$ is quadratic in the log-spline model \citep{kooperberg1991study} in \eqref{eq:density}, motivating the usage of the functional horseshoe prior in these examples to shrink towards the respective parametric alternatives. For each setting, we considered the case corresponding to the relevant parametric model, as well as the parametric model was not adequate. For (i) and (ii), we generated the covariates independently from a uniform distribution between $-\pi$ and $\pi$ and set the error variance $\sigma^2 = 1$. For each case (i) - (iii), we considered three parametric choices for $f$. For case (i), we considered $f$ to be linear, quadratic, and sinusoidal. For case (ii), we considered constant, quadratic and sinusoidal functions. For (iii), we considered normal, log-normal and mixture of normal distributions. For the first two cases, we standardized the true function so as to obtain a signal-to-noise ratio of $1.0$. We used the B-spline basis with $k_n=8$ in \eqref{eq:ff} to model the function $f$ in each setting. To shrink the regression function in \eqref{eq:reg} towards linear subspaces, we set $\Phi_0= \{{\bf 1}, \bx \}$ in the fHS prior \eqref{eq:beta_pr}. For the varying coefficient model \eqref{eq:vc}, we set $\Phi_0= \{{\bf 1} \}$ to shrink $f$ towards constant functions, whence the resulting model reduces to a linear regression model. Finally, we set $\Phi_0 = \{{\bf 1}, Y, Y^2\}$ to shrink $f$ towards the space of quadratic functions in \eqref{eq:density}, which results in the density $p$ being shrunk towards the class of Gaussian distributions. We note that the prior for $p$ in \eqref{eq:density} is data-dependent. An inverse-gamma prior with parameters $(1/100,1/100)$ was imposed on $\sigma^2$ for the fHS prior in (i) and (ii). In all three examples, we set $b = \exp\{ -k_n\log n/2 \}$ to satisfy the conditions of Theorem \ref{theo:post} and arbitrarily set $a=1/2$. Although Theorem \ref{theo:post} only applies to the regression model \eqref{eq:reg}, the empirical results for these hyperparameter choices are promising for the varying coefficient model and the log-density model as well. \begin{table} \caption{ Results of univariate examples} \centering \fbox{ \begin{tabular}{c|c|c|c|c|} \hline True function & Method & $n=200$ & $n=500$ & $n=1000$ \\ \hline \hline {\bf Linear} & fHS & {\bf 0.93} (0.81) & {\bf 0.44} (0.45) & {\bf 0.17} (0.17) \\ & B-spline & 3.57 (1.60) & 1.54 (0.74) & 0.76 (0.38) \\ \hline Quadratic& fHS & 3.63 (1.73) & 1.55 (0.74) & 0.77 (0.37) \\ & B-spline & 3.59 (1.60) & 1.56 (0.74) & 0.78 (0.38) \\ \hline Sine& fHS & 3.64 (1.58) & 1.50 (0.74) & 0.75 (0.36) \\ & B-spline & 3.57 (1.60) & 1.53 (0.74) & 0.76 (0.38) \\ \hline \hline {\bf Constant} & fHS & {\bf 0.13} (0.15) & {\bf 0.06} (0.08) & {\bf 0.03} (0.04) \\ & B-spline & 1.33 (0.63) & 0.48 (0.26) & 0.25 (0.13) \\ \hline Quadratic& fHS & { 1.35 (0.62)} & { 0.51} (0.27) & { 0.27 (0.13)} \\ & B-spline & 1.36 (0.64) & 0.51 (0.26) & 0.27 (0.13) \\ \hline Sine& fHS & 1.35 (0.63) & 0.48 (0.26) & 0.25 (0.13) \\ & B-spline & 1.33 (0.63) & 0.48 (0.26) & 0.25 (0.13) \\ \hline \hline {\bf Normal} & fHS & {\bf 1.34} (1.35) & {\bf 0.59} (0.52) & {\bf 0.35 } (0.31) \\ & B-spline & 10.30 (5.00) & 3.68 (1.42) & 1.96 (0.77) \\ \hline Log-normal& fHS & 5.15 (2.70) & 3.35 (1.14) & 2.91 (0.98) \\ & B-spline & 6.37 (4.21) & 3.27 (1.86) & 2.83 (1.14) \\ \hline Mixture & fHS & 4.42 (2.18) & 1.79 (0.85) & 1.04 (0.39) \\ & B-spline & 5.31 (3.61) & 1.85 (0.93) & 1.04 (0.39) \\ \hline \end{tabular}} \label{tab:simple} \end{table} We considered the Jeffrey's prior, $\pi(\beta,\sigma^2)\propto 1/\sigma^2$, on the B-spline coefficients for the simple regression model and the varying coefficient model as a competitor to the functional horseshoe prior. Following \cite{ghosal2008nonparametric}, we assigned independent $U(-\pi, \pi)$ priors on the B-spline coefficients, which are known to guarantee the minimax rate of posterior convergence rate for the log-density model. For each prior, we used the posterior mean $\hat{f}$ as a point estimate for $f$, and report the empirical {\it Mean Square Error} (MSE), i.e. $\norm{\widehat f - f}_{n,2}^2$. \begin{figure} \includegraphics[height=6cm, width=16.3cm]{simple.pdf} \includegraphics[height=6cm, width=16.3cm]{vc.pdf} \includegraphics[height=6cm, width=16.3cm]{density.pdf} \caption{Examples when the underlying true functions are parametric. Posterior mean of each procedure (red solid), its 95\% pointwise credible bands (red dashed), and the true function (black solid) from a single example with $n=200$ for each model. The top row is for the simple regression model; the second row is for the varying coefficient model; the last row is for the density estimation. The Bayesian B-spline procedure, the Bayesian parametric model procedure, and functional horseshoe priors are illustrated in the first, second, and third columns, respectively. } \label{fig:example} \end{figure} \begin{figure} \includegraphics[height=6cm, width=16.3cm]{simple_nl.pdf} \includegraphics[height=6cm, width=16.3cm]{vc_nl.pdf} \includegraphics[height=6cm, width=16.3cm]{density_nl.pdf} \caption{Examples when the underlying true functions are nonparametric. Posterior mean of each procedure (red solid), its 95\% pointwise credible bands (red dashed), and the true function (black solid) from a single example with $n=200$ for each model. The top row is for the simple regression model; the second row is for the varying coefficient model; the last row is for the density estimation. The Bayesian B-spline procedure, the Bayesian parametric model procedure, and functional horseshoe priors are illustrated in the first, second, and third columns, respectively. } \label{fig:example2} \end{figure} In Table \ref{tab:simple}, we report 100 times MSE of the posterior mean estimator and its standard deviation over 100 replicates in estimating the unknown function $f$ for all three models, for sample sizes $n = 200$, $500$, and $1000$. The first top three rows are for the simple regression model; the second three rows for the varying coefficient model; the last three rows for the density estimation. ``Mixture" in the last row indicates a mixture of Gaussian densities as $0.3{ \mathrm{N} }(2,1)+0.7{ \mathrm{N} }(-1,0.5)$. In all three settings, when the true function $f$ belongs to the nominal parametric class, the posterior mean function resulting from the functional horseshoe prior clearly outperforms the B-spline prior. When the true function does not belong to the parametric model, the functional horseshoe prior performs comparably to the B-spline prior. Figure \ref{fig:example} depicts the point estimate (posterior mean) and pointwise 95\% credible bands for the unknown function $f$ for a single data set for each of the three examples when the true function belongs to the parametric class, that is a linear function in \eqref{eq:reg}, a constant function in \eqref{eq:vc}, and a quadratic function in \eqref{eq:density}. Figure \ref{fig:example2} depicts the corresponding estimates when the data generating function does not fall in the assumed parametric class. It is evident from Figure \ref{fig:example} that when the parametric assumptions are met, the fHS prior performs similarly to the parametric model, which empirically corroborates our findings in Theorem \ref{theo:post} that the posterior contracts at a near parametric rate when the parametric assumptions are met. It is also evident that the fHS procedure automatically adapts to deviations from the parametric assumptions in Figure \ref{fig:example2}, again confirming the conclusion of Theorem \ref{theo:post} that when the true function is well-separated from the parametric class, the posterior concentrates at a near optimal minimax rate. We reiterate that the same hyperparameters $a=1/2$ and $b=\exp\{-k_n\log n /2\}$ for the fHS prior were used in the examples in Figure \ref{fig:example} and Figure \ref{fig:example2}. \subsection{Comparisons to additive models} \label{sim:additive} Our regression examples in the previous subsection involved one predictor variable. In the case of multiple predictors, a popular modeling framework is the class of additive models (\citet{hastie1986generalized}, \citet{hastie1986generalized}), where the unknown function relating $p$ candidate predictors to a univariate response is modeled as the sum of $p$ univariate functions, with the $j$th function only dependent on the $j$th predictor. In this section, we apply the fHS prior to additive models and compare results obtained under this prior to several alternative methods. To be consistent with our previous notation, we express additive models as \begin{eqnarray}\label{eq:additive} Y = \sum_{j=1}^p F_j + \epsilon, \end{eqnarray} where $F_j = (f_j(x_{1j}),\dots,f_j(x_{nj}) )^{ \mathrm{\scriptscriptstyle T} }$ for $j=1,\dots,p$ and $\epsilon\sim{ \mathrm{N} }(0,\sigma^2\mathrm{I}_n)$. In the specific case where each $f_j$ is linear, we obtain a linear regression model. In general, each component function can be modeled nonparametrically, for example, using the B-spline basis functions as described in the previous section; $f_j(x) = \sum_{l=1}^{k_n}\beta_{jl}\phi_{jl}(x)$ for $j=1,\dots,p$. However, if there are many candidate predictors, then nonparametrically estimating $p$ functions may be statistically difficult, and in addition, may result in a loss of precision if only a small subset of the variables are significant. With this motivation, we extend the fHS framework to additive models, where we assign independent fHS priors to the $f_j$'s with $Q_0 = 0$ in \eqref{eq:beta_pr} to facilitate shrinkage of each of these functions towards the null function. We use the resulting posterior mean as a point estimate and compare its performance with a host of penalized likelihood estimators. For the additive model, \cite{ravikumar2009sparse} proposed penalized likelihood procedures called {\it Sparse Additive Models} (SpAM) that combine ideas from model selection and additive nonparametric regression. The penalty term of SpAM can be described as a weighted group Lasso penalty \citep{yuan2006model}, and the coefficients for each component function $f_j$ for $j=1,\dots,p$ are forced to simultaneously shrink towards zero, so that the resulting procedure selects the variables that are associated with the response. \cite{meier2009high} proposed the {\it High-dimensional Generalized Additive Model} (HGAM) that differs from SpAM in the sense that its penalty term not only imposes shrinkage towards zero, but also regularizes the smoothness of the function. \cite{huang2010variable} introduced the two step procedure of adaptive group Lasso (AdapGL) for the additive model, which first estimates the weight of the group penalty, then applies it to the adaptive group lasso penalty. Since the performance of penalized likelihood methods is sensitive to the choice of the tuning parameter, in the simulation studies that follow we considered two criterion for tuning parameter selection: AIC and BIC. R packages \texttt{SAM}, \texttt{hgam}, and \texttt{grplasso} were used to implement SpAM, HGAM, and AdapGL, respectively. We denote the signal-to-noise ratio as $\mbox{SNR} =\mathop{\rm Var}(f(X))/Var(\epsilon)$, where f is the true underlying function, and we examine the same settings that were considered in \cite{meier2009high} as follows:\\ \noindent {\it Setting 1:} ($p=200$, $\mbox{SNR}\approx 15$). This is same with Example 1 in \cite{meier2009high}, and a similar setting was also considered in \cite{hardle2012nonparametric} and \cite{ravikumar2009sparse}. The model is \be Y_i = f_1(x_{i1}) + f_2(x_{i2}) + f_3(x_{i3}) + f_4(x_{i4}) + \epsilon_i, \ee where $\epsilon_i\overset{i.i.d}\sim{ \mathrm{N} }(0,1)$ for $i=1,\dots,n$, with \be f_1(x) &=& -\sin(2x), \:\: f_2(x) = x^2-25/12,\:\: f_3(x) = x,\\ f_4(x) &=& \exp\{-x\} -2/5\cdot\sinh(5/2). \ee The covariates are independently generated from a uniform distribution between $-2.5$ to $2.5$. \\ \noindent {\it Setting 2:} ($p=80$, $\mbox{SNR}\approx 7.9$). This is equivalent to Example 3 in \cite{meier2009high} and similar with an example in \cite{lin2006component}. The model is \be Y_i = 5f_1(x_{i1}) + 3f_2(x_{i2}) + 4f_3(x_{i3}) + 6f_4(x_{i4}) + \epsilon_i, \ee where $\epsilon_i\overset{i.i.d}\sim{ \mathrm{N} }(0,1.74)$ for $i=1,\dots,n$, with \be f_1(x) &=& x, \:\: f_2(x) = (2x-1)^2,\:\: f_3(x) = \frac{\sin(2\pi x)}{2-\sin(2\pi x)},\\ f_4(x) &=& 0.1\sin(2\pi x) + 0.2* \cos(2\pi x) + 0.3 \sin^2(2\pi x)\\ &&+0.4 \cos^3(2\pi x) + 0.5 \sin^3(2\pi x). \ee The covariate $\bx_j=(x_{1j},\dots,x_{nj})^{ \mathrm{\scriptscriptstyle T} }$ for $j=1,\dots,p$ is generated by $ \bx_j = (W_j + U)/2$, where $W_1,\dots,W_p$ and $U$ are independently simulated from U$(0, 1)$ distributions. \\ \noindent {\it Setting 3} ($p=60$, $\mbox{SNR}\approx 11.25$). This is equivalent to Example 4 in \cite{meier2009high}, and a similar example was also considered in \cite{lin2006component}. The same functions are used and the same process to generate the covariates is considered as in {\it Setting 2}. The model is \be Y_i &=& f_1(x_{i1}) + f_2(x_{i2}) + f_3(x_{i3}) + f_4(x_{i4}) \\ && +1.5 f_1(x_{i5}) + 1.5 f_2(x_{i6}) + 1.5 f_3(x_{i7}) + 1.5 f_4(x_{i8}) \\ && +2.5 f_1(x_{i9}) + 2.5 f_2(x_{i10}) + 2.5 f_3(x_{i11}) + 2.5 f_4(x_{i12}) + \epsilon_i, \ee where $\epsilon_i\overset{i.i.d}\sim{ \mathrm{N} }(0,0.5184)$ for $i=1,\dots,n$. To evaluate the estimation performance of the functional horseshoe prior, we report the MSE for each method. To measure the performance of model selection, we considered the proportion of times the true model was selected, as well as the {\it Matthews correlation coefficient} (MCC; \cite{matthews1975comparison}), defined as, \be \mbox{MCC} = \frac{\mbox{TP}\cdot \mbox{TN} - \mbox{FP}\cdot \mbox{FN}}{(\mbox{TP}+\mbox{FP})(\mbox{TP}+\mbox{FN})(\mbox{TN}+\mbox{FP})(\mbox{TN}+\mbox{FN})}, \ee where TP, TN, FP, and FN denote the number of true positive, true negatives, false positives, false negatives, respectively. MCC is generally regarded as a balanced measure of the performance of classification methods, which simultaneously takes into account TP, TN, FP, and FN. We note that MCC is bounded by 1, and the closer MCC is to 1, the better the model selection performance is. \begin{figure} \includegraphics[height=5.5cm, width=16.5cm]{ex1.pdf} \includegraphics[height=5.5cm, width=16.5cm]{ex2.pdf} \includegraphics[height=5.5cm, width=16.5cm]{ex3.pdf} \caption{The first column illustrates the logarithm of the MSE of each method; the second column displays the MCC; the third column is the proportion of times the each procedure selected the true model. The top row, the middle row, and the bottom row represent the {\it Setting 1}, {\it Setting 2}, and {\it Setting 3}, respectively. For penalized likelihood methods, AIC (black) and BIC (grey) were used to choose the tuning parameter.} \label{fig:sim} \end{figure} For model selection using the fHS prior, we used 95\% pointwise credible bands for each component function to exclude component functions whose credible bands uniformly contained the zero function on the entire support of the corresponding covariate. To investigate the performance achieved by the proposed method, we compared it with the partial oracle estimator that refers to the B-spline least squares estimator under the situation where the variables in the true model are given, but the true component functions in the additive model are not provided. Results from a simulation study to compare these methods are depicted in Figure \ref{fig:sim}. In all three settings it is clear that the procedure based on the functional horseshoe prior outperforms the penalized likelihood estimators in terms of MSE. In terms of model selection performance, the proposed procedure is also better or at least comparable to that of the competitors. We note that the SpAM procedure with tuning parameter selected by BIC provides comparable model selection performance to the fHS prior in {\it Setting 1}, yet its MSE is at least 8 times bigger than that of the procedure based on the functional horseshoe prior (note that the reported scale is logarithmic). The results suggest that the fHS prior provides improvement over the penalized likelihood methods in terms of both MSE and model selection performance combined, at least under the considered settings. \section{Real data analysis} In this section, we apply the functional horseshoe prior to two well known data sets: the first concerns ozone levels and the second considers housing prices in Boston. Both data sets are available in the R package \texttt{mlbench}. These two data sets have been previously analyzed in various places, including \cite{buja1989linear}, \cite{breiman1995better}, \cite{lin2006component} and \cite{xue2009consistent}. Following the pre-processing step in \cite{xue2009consistent}, we standardized both the response and independent variables prior to our analyses. We first consider the Boston housing data set that contains the median value of 506 owner-occupied homes in the Boston area, together with several variables that might be associated with the median value. To examine the performance of our method in eliminating extraneous predictors, we add $40$ spurious variables generated as i.i.d. standard Gaussian deviates. Using the standard notation for the variable in this data set, we then assumed a model of the following form: \be \texttt{medv} &=& \beta_0 +f_1(\texttt{crim}) + f_2(\texttt{indus}) + f_3(\texttt{nox})+f_4(\texttt{rm})+f_5(\texttt{age})+f_6(\texttt{dis})+f_7(\texttt{tax})\\ &&+f_8(\texttt{ptratio})+f_9(\texttt{b}) + f_{10}(\texttt{lstat}) +\epsilon, \ee where $\epsilon \sim { \mathrm{N} }(0,\sigma^2\mathrm{I}_n)$. Each component function is modeled by the B-spline bases with $k_n=8$, and $50$ test data points were randomly selected to estimate the out-of-sample prediction error. Five hundreds simulations of each procedure were used to generate the plots in Table \ref{tab:real}. We also modeled the ozone data set using each of the procedures that were applied the housing data. The ozone data consists of the daily maximum one-hour-average ozone readings and nine meteorological variables for $330$ days in the Los Angeles basin in 1976. The model applied to these data can be expressed as follows: \be \texttt{ozone} &=& \beta_0 +f_1(\texttt{height}) + f_2(\texttt{wind}) + f_3(\texttt{humidity})+f_4(\texttt{temp1})+f_5(\texttt{temp2})\\ &&+f_6(\texttt{inv height})+f_7(\texttt{gradient})+f_8(\texttt{inv temp})+f_9(\texttt{visibility}) +\epsilon. \ee Like the Boston Housing data case, we added $40$ spurious variables generated as i.i.d. standard Gaussian deviates. We used B-spline bases with $k_n=5$ were considered to model the component functions. We performed a cross-validation experiment to assess the predictive performance of the competing methods. In each of 500 simulated data sets, we held out 30 data values as the test set and used the remaining observations to estimate the model. The parameter settings described in Section \ref{sim:additive} were again used for the functional horseshoe prior. Also, for each training data set we generated $30,000$ posterior samples by following the MCMC algorithm described in the Appendix, and only the last $20,000$ samples were used in the analysis. We compared the performance of the procedure based on the proposed priors with that of SpAM, HGAM, AdapGL and the classical B-spline estimator was fit without the spurious noise variables. For the penalized likelihood methods, AIC and BIC were used to choose tuning parameters. Table \ref{tab:real} displays the average of test set errors, the average number of selected noise variables, and the most frequently selected model for each method. \begin{table} \caption{Results of real data examples} \centering \fbox{ \begin{tabular}{*{5}{c}} \hline Data & Method & Test Error & NN & Selected Model \\ \hline Boston & Full & 0.156(0.065)& & \\ & fHS & {\bf 0.154}(0.067) & {\bf 0.00} & \texttt{crim}, \texttt{nox}, \texttt{rm}, \texttt{dis}, \texttt{ptratio}, \texttt{lstat} \\ & SpAM(AIC) & 0.224(0.072) & 21.06 & All \\ & SpAM(BIC) & 0.344(0.093) & 2.00 & \texttt{crim}, \texttt{nox}, \texttt{rm}, \texttt{dis}, \texttt{ptratio}, \texttt{lstat} \\ & HGAM(AIC) & 0.212(0.095) & 37.49 & All \\ & HGAM(BIC) & 0.222(0.115) & 1.06 & \texttt{indus}, \texttt{nox}, \texttt{age}, \texttt{dis}, \texttt{tax}, \texttt{ptratio} \\ & AdaptGL(AIC) & 0.579(0.214) & 40.00 & All \\ \hline \hline Ozone & Full &0.311(0.085) & & \\ & fHS & {\bf 0.278}(0.092) & {\bf 0.02} & \texttt{temp2}, \texttt{gradient} \\ & SpAM(AIC) & 0.427(0.156) & 20.67 & All but \texttt{height} and \texttt{inv temp}\\ & SpAM(BIC) & 0.624(0.213) & 0.07 & \texttt{temp1}, \texttt{temp2}, \texttt{gradient} \\ & HGAM(AIC) & 0.298(0.109) & 23.12 & All but \texttt{gradient}\\ & HGAM(BIC) & 0.631(0.260) & 0.208 & \texttt{humidity}, \texttt{temp1}\\ & AdaptGL(AIC) & 0.359(0.131) & 21.91 & All but \texttt{height} and \texttt{inv temp}\\ & AdaptGL(BIC) & 0.341(0.142) & 2.252 & \texttt{humidity}, \texttt{temp1}, \texttt{temp2}, \texttt{inv height}, \\ & & & &\texttt{gradient}, \texttt{visibility}\\ \hline \end{tabular} } \label{tab:real} \end{table} In Table 2, ``Test Error" refers to the average of empirical $L_2$ test errors, and ``NN" represents the averaged number of selected spurious variables, and ``Full" indicates the B-spline least square estimator from the full model without spurious variables. Table 2 shows that for both data sets the procedure based on the functional horseshoe prior achieved the smallest test errors, and it also selected the minimum number of spurious variables. Moreover, even though 40 spurious variables are added to the proposed procedure, its test error was smaller than that of the full estimator that was estimated without the spurious variables. For both data sets, the model selected by the fHS prior was similar to that chosen by SpAM with BIC. However, the test error of the SpAM procedure was roughly twice that of fHS. More generally, the fHS procedure outperformed all of the other procedures in these examples. \section{Conclusion} We have proposed a class of shrinkage priors which we call the functional horseshoe priors. When appropriate, these priors imposes strong shrinkage towards a pre-specified class of functions. The shrinkage term in the prior is new, as it directly allows the nonparametric function shrink towards parametric functions, so it preserves the minimax optimal parametric rate of posterior convergence $n^{-1/2}$ when the true underlying function is parametric, and it also comes within $O(\log n)$ of achieving the minimax nonparametric rate when the true function is strictly separated from the class of parametric functions. The novel shrinkage term contained in the proposed prior, $F^{ \mathrm{\scriptscriptstyle T} }\IP F$ (i.e., \eqref{eq:beta_pr}), can be naturally applied to a new class of penalized likelihood methods having a general form expressible as \[ - l(Y\mid F) + p_{\lambda}\big( F^{ \mathrm{\scriptscriptstyle T} }\IP F \big), \] where $l(Y\mid F)$ is the logarithm of a nonparametric likelihood function and $p_\lambda$ is the penalty term. In constrast to other penalized likelihood, this form of penalty allows shrinkage towards the space spanned by a projection matrix $Q_0$, rather than simply a zero function. \newpage
{'timestamp': '2016-11-23T02:08:36', 'yymm': '1606', 'arxiv_id': '1606.05021', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05021'}
arxiv
\section{Introduction} Our aim is to create a 3D model of a single object recorded by a handheld mobile phone camera. We assume only that the object is placed on a flat surface and that the object is approximately centered. The ability to easily and accurately create 3D models from handheld cameras has broad applications including virtual reality and 3D printing. But existing methods are unable to consistently produce 3D models of objects with specularities and irregular shapes without user interaction or controlled capture settings. 3D reconstruction of scenes from image sequences is a well studied problem in computer vision. The underlying idea behind most existing work is that multiple pixel measurements of a point in the scene can be used to triangulate its 3D position. Therefore, reconstruction accuracy hinges on the ability to track a pixel with sub-pixel accuracy. Tracking and matching algorithms, however, assume brightness constancy which breaks down for specular surfaces. Tracking algorithms also falter in textureless regions where neighboring pixels have similar intensities. MonoFusion \cite{pradeep2013monofusion} and MobileFusion \cite{ondruska2015mobilefusion} demonstrate 3D reconstruction by explicitly modeling surfaces as depth maps and then performing volumetric fusion. However, to achieve real-time performance such methods compromise on accuracy of the depth maps by relying on stereo matching between the live frame and the last key frame. Similarly, volumetric fusion is performed by a weighted average of implicit surface representation of the depth surfaces, such as Truncated Signed Distance Fields (TSDF), computed in different views. Success of such volumetric fusion approaches depends on the accuracy of depth maps. While these techniques work well for depth maps acquired using active sensors like Kinect, they are not robust to localized but often large errors in depth maps that are common with multi-view stereo techniques. Another important aspect of single object 3D reconstructions is segmentation of the object from the scene. To be useful for 3D printing, the 3D volume occupied by the object needs to be identified. While TSDF gives an estimate of empty regions in space, the cues that distinguish the object from other surfaces come from scene priors and the images. Some approaches iteratively solve for 2D and 3D segmentations~\cite{vogiatzis2005multi} or jointly segment pixels and sparse point clouds~\cite{xiao2007joint}, but none, to the best of our knowledge, perform joint inference over pixels and a dense grid of voxels, which we find to be important for obtaining accurate 3D models. In this work, we propose to improve the accuracy and robustness of video based multi-view single object 3D reconstruction and segmentation systems by improving surface modeling, volumetric fusion, and segmentation. Our system computes accurate depth maps by posing dense per-pixel depth estimation as an optimization problem which incorporates multi-view stereo cues, sparse point cloud reconstruction from a VSLAM system, and a surface smoothness prior in the form of a rotation invariant bending energy. For 3D reconstruction, we reformulate volumetric fusion of depth maps by getting rid of the \textit{truncation} in TSDF and using a \textit{soft-max} based signed distance function (SDF). Our fusion approach has the benefit of being more robust to errors in depth maps and also produces smoother surfaces. This technique however leads to a shift in the \textit{zero-crossing} of the function field, which we remedy by introducing a novel volume field deformation using a sparse surface point cloud such as that provided by patch-based multi-view stereo~\cite{furukawa2010accurate}. For segmentation, we perform joint inference over pixel and voxel labels in a graph cut optimization framework. Pixels and voxels impose complementary constraints on the reconstruction. Pixels model the object color which helps distinguish the object surface from other background surfaces and provide cues to surface discontinuities through contour edges. Voxels impose constraints on empty regions, enforce continuity of objects in 3D space and incorporate our scene prior. In addition, surface voxels enforce consistency of pixel labeling across multiple images. We evaluate each of these components to demonstrate good performance even in the presence of specularities and textureless surfaces. To summarize our contributions: \begin{enumerate} \item[1.] We propose a fully automated approach to produce a 3D mesh of a single object placed on a flat surface. \item[2.] We propose a method to robustly estimate depth surfaces from multi-view stereo cues and a sparse point cloud (optional) which is regularized by a rotation invariant second order bending energy. We demonstrate its performance on our Object-Videos dataset as well as RGBD Scenes v2 dataset and compare against other forms of regularization. \item[3.] We reformulate volumetric fusion by using a \textit{soft-max} instead of the truncation and weighted averaging for computing the TSDF proposed in \cite{newcombe2011kinectfusion}. To correct the bias in \textit{zero-crossing} we perform a smooth function field deformation using a surface point cloud. Our approach is more robust to errors in depth maps and produces smooth surface meshes. \item[4.] We formulate joint 2D image segmentation and volumetric 3D reconstruction as the task of assigning discrete labels $\{object,background\}$ to every pixel and $\{object,background,empty\}$ to every voxel $v$.The discrete optimization is solved using graph cut with $\alpha$-expansion procedure under constraints imposed by pixels, voxels and scene priors. \item[5.] We evaluate our entire system through pixel segmentation accuracy on Object-Videos dataset which is a video dataset of 12 objects recorded by a mobile phone camera. We provide ground-truth segmentation masks for selected frames to encourage advancement of state-of-the-art on this task. \end{enumerate} \section{Related Work} We can group relevant literature into two broad areas: 3D reconstruction and multi-view segmentation. \noindent \textbf{3D Reconstruction:} Most of the existing work in this area focuses on reconstruction of an entire scene. Different approaches cater to different reconstruction resolution requirements and size of the scenes. Single object reconstruction mostly falls within the purview of literature that deals with small sized indoor scenes. MonoFusion \cite{pradeep2013monofusion} and MobileFusion \cite{ondruska2015mobilefusion} use stereo matching between the live frame and last selected key-frame to generate depth maps. The final surface reconstruction is computed by extracting zero-level set of the Signed Distance Field (SDF) obtained by weighted averaging of TSDFs for different views. This approach to volumetric fusion, popularized by KinectFusion \cite{newcombe2011kinectfusion}, has demonstrated good performance for fusing accurate depth measurements from active sensors like the Kinect. However, this method has two drawbacks. First, due to weighted averaging, the TSDFs are forced to be asymmetric to avoid changing the zero-level set. This in turn hinders their ability to collect evidence of occupancy for voxels behind the visible surfaces. Second, this approach relies on accurate depth surface estimates which, while generally true for active sensors operating in indoor scenes, does not generalize to stereo based methods in presence of specular reflection and texture-less surfaces. To counter these problems we propose an alternative scheme that relies on maximum signed distance to the visible surfaces. For robustness we use a \textit{soft-max} instead of a hard maximum. This is followed by \textit{zero-crossing} correction using a smooth deformation field generated using a sparse point cloud provided by PMVS \cite{furukawa2010accurate}. Our joint 2D-3D segmentation also reduces dependence on the depth maps by utilizing multiple cues and hence improves the overall robustness of the system. DTAM \cite{newcombe2011dtam} proposes a novel and robust alternative to pairwise stereo for computing dense per-pixel depth maps. They pose the problem of computing depth at evey pixel as a two step iterative optimization problem, where the first step ensures consistency of depth estimates with photometric evidence integrated over multiple frames (\textit{cost volume}) and the second step provides a first order spatial regularization. Inspired by DTAM, we also pose depth surface computation as a two step iterative optimization problem but with some important improvements and simplifications. The major differences are: (1) relaxation of frontal-planar assumption imposed by the first order regularization; (2) removal of Huber loss on smoothness term and appropriate compensation through spatially varying weights that turns the optimization problem in the second step to linear least squares; (3) replacement of pixel based photometric error by patch based Zero-mean Normalized Cross Correlation (ZNCC) which is more robust to brightness changes, while computing the cost volume. Another approach to dense 3D reconstruction is to begin with a sparse point cloud, increase density by propagating measurements to nearby points using techniques like PMVS \cite{furukawa2010accurate} and then fit a mesh to this semi-dense reconstruction \cite{kazhdan2006poisson}. However to expand the point cloud, techniques like PMVS perform only local operations that may not produce a globally consistent result. It is also difficult to enforce surface regularization. Camera pose estimation is an integral component of any of the above mentioned methods. Direct monocular slam approaches like LSD-SLAM \cite{engel2014lsd} and DTAM, which directly minimize photometric error to register live frame with the last selected key-frame have been shown to be more robust than feature tracking based approaches such as PTAM \cite{klein2009parallel}. LSD-SLAM also provides semi-dense depth estimates with inverse depth variance which expresses belief about the accuracy of the estimates. \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{system_overview2.pdf} \end{center} \vspace{-0.1in} \caption{ System overview: First, LSD-SLAM is used to estimate camera poses and to select key-frames from the input video. Then we compute dense depth maps which are volumetrically fused using a robust 2 stage process involving computation of a \textit{softmax} based \textit{signed distance function} followed by deformation using PMVS point cloud. Finally, a joint 2D-3D segmentation is performed to obtain a 3D reconstruction with consistent 2D segmentations.} \vspace{-0.1in} \label{fig:overview} \end{figure*} \noindent \textbf{Multi-view Segmentation:} The dominant approach for multi-view segmentation involves finding optimal labels for some subset of \{\textit{pixels}, \textit{superpixels}, \textit{3D points}, \textit{voxels}\} that minimizes an energy function that encodes task specific priors and evidence from data. The work most closely related to ours is \cite{vogiatzis2005multi}, where 3D reconstruction is posed as a volumetric Graph Cut \cite{boykov2004experimental} optimization problem defined over a 6-connected grid of voxels. Foreground and background color distributions were modeled from images and the unary term for a voxel was defined in terms of the average posterior probabilities of the pixels that the voxel projected to. The foreground voxels were then projected onto the images to get segmentation masks and the color model was updated. Similarly, \cite{djelouah2013multi} propose an approach for segmenting an object from a video by performing graph cut over superpixels and sparse 3D points. They have explicit edges between 3D points and superpixels to ensure multi-view coherence, and edges between superpixels across frames, which are related by optical flow, to model temporal consistency. Both the approaches generate image segmentation masks, but, while the first method generates a volumetric reconstruction by labeling voxels, the second approach only segments a sparse point cloud. Our formulation borrows the idea of jointly labeling superpixels and a voxel grid with edges between them to enforce consistency, but we incorporate rich information from volumetrically fused dense depth maps computed in early stages of our system and scene priors to get good quality reconstructions of objects with complicated shapes and varying material properties. Our system also differs from these approaches in that we use a richer set of labels that distinguish between the voxels that belong to the object of interest and those belonging to other objects in the scene, namely voxels behind the support surface. This distinction allows a more complete and accurate reasoning about the scene. Like us, \cite{kowdle2012multiple} attempts to exploit the rich evidence available in dense depth maps, using stereo and color based appearance cues to first compute dense piecewise planar depth maps for every view. Then they assign a foreground or background label to polygons in every image independently. Finally, they fuse these independent segmentations using multi-view reasoning. Each of these steps is performed by $\alpha$ expansion based energy minimization with carefully chosen terms. Unlike us, they only generate image segmentations. Also, the piecewise planar assumption also does not hold for many objects of interest. An alternative to graph cut optimization was proposed in \cite{xiao2007joint}, where joint segmentation is performed over 2D pixels and 3D scene points using affinity propagation. A graph is constructed over \textit{joint} nodes each of which comprises of a 3D point and its image projections in different views. Similarity between nodes is defined using 3D features like spatial proximity and angle between normal directions, and 2D features like color differences and Kullback-Leibler divergence between patch histograms. This method, however, requires user initialization and includes only sparse 3D points in the optimization. All the above approaches perform 3D segmentation by converting the problem to a discrete optimization. \cite{kolev2009continuous} formulate volumetric reconstruction as that of minimizing a continuous convex functional by relaxing binary labels to lie in $[0,1]$, and they show quantitative improvement over discrete graph cut based approaches. \section{Approach} Our system takes as input an image sequence and automatically generates a volumetric reconstruction of the object, depth surfaces, and segmentation masks for selected key-frames, as shown in Fig.~\ref{fig:overview}. There are four main stages: \noindent \textbf{Pose Estimation:} A state-of-the-art VSLAM system LSD-SLAM \cite{engel2014lsd} is used to get camera poses, key-frame selection, and semi-dense depth maps which are used in later stages of the system. \noindent \textbf{Surface Modeling:} The visible surfaces from each view are modeled as dense depth maps. The procedure, inspired by DTAM \cite{newcombe2011dtam}, involves minimizing an objective function comprising of a \textit{cost volume} based data term regularized by a spatially varying linearized bending energy. We experiment with second order bending energies and compare to the first order regularization used in \cite{newcombe2011dtam}. \noindent \textbf{Volumetric Fusion:} Depth maps from the previous stage are fused together volumetrically to generate a signed function field over a voxel grid. The function field indicates normalized and clipped signed distance of every voxel to its nearest surface. The fusion, however, introduces a bias in the function field and shifts the zero-crossing. PMVS \cite{furukawa2010accurate} points which are known to lie on the surface are used to correct the bias by deforming the function field where the deformation is modeled by a radial basis expansion. \noindent \textbf{Joint 2D-3D Segmentation:} A joint segmentation of all key-frame images and a common voxel map is performed using graph cuts with $\alpha$-expansion over the set of all pixel and voxel nodes. The pixel unary models the color of the object and background regions. The voxel unary enforces constraints on the empty regions (using the SDF) and incorporates scene prior by encouraging voxels below the fitted plane to belong to the background. Pixel-pixel and voxel-voxel pairwise terms are used to impose smoothness in 2D (edge-aware) and 3D space respectively. Finally, edges connecting pixel nodes to sparse surface voxel nodes (identified by hashing sparse 3D points generated by LSD-SLAM into the voxel grid) implicitly enforce consistent labeling across views. \subsection{Pose Estimation} Camera poses and an initial sparse point cloud with visibility information for each point are required in later stages. Camera focal length, optical center, and radial distortion parameters are precomputed using a checkerboard pattern. The video frames are also corrected for radial distortion. LSD-SLAM \cite{engel2014lsd} with loop closure is then used to select a set of key-frames, compute camera poses for every frame, and generate semi-dense depth maps with corresponding estimates of inverse depth variance for all key-frames. \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{depth_normal_object_dataset.pdf} \end{center} \vspace{-0.1in} \caption{Visualization of depth maps and surface normals generated for videos in the Object-Videos Dataset using our depth surface reconstruction method. Smoothness constraints in our optimization make the surface normals well behaved. Higher order bending energy helps preserve more fine details such as those on the dragon's head and keyboard's keys and wire.} \vspace{-0.1in} \label{fig:depthNormal} \end{figure*} \subsection{Surface Modeling} \label{denseDepth} Let the set of all pixels in the current reference image $I_r$ be denoted by $\mathcal{P}$. The pixel coordinates will be referred to as $(u,v)$ or by a 2 dimensional vector $\textbf{u}$. The problem of estimating depth surface reduces to assigning a depth value $\xi(\textbf{u})$ to each pixel $\textbf{u} \in \mathcal{P}$ such that the assignment results in low photometric error, agrees with the depth measurements $\hat{\xi}(\textbf{u})$ wherever available and is mostly smooth barring depth discontinuities. In our system these depth measurements are provided by LSD-SLAM for a set of pixels $\mathcal{T}$. LSD-SLAM also provides an estimate of the inverse depth variance $\sigma(\textbf{u})$ for all $\textbf{u}\in \mathcal{T}$. \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{rgbd_scenes_qual_cropped.png} \end{center} \vspace{-0.1in} \caption{Effect of different smoothness terms and number of measurement points available on depth map estimation for RGBD Scenes V2 dataset. Our method is robust in presence of specularity and textureless surfaces. The second order bending energies allow the reconstruction of long thin surfaces like the arm rest on the chair.} \vspace{-0.1in} \label{fig:rgbd_qual} \end{figure*} Inspired by DTAM \cite{newcombe2011dtam}, we begin by constructing the cost volume $C(\textbf{u},d)$ which specifies the average photometric error of pixel $\textbf{u}$ with respect to neighboring frames for some discrete depth candidates $d\in \mathcal{D}$. Instead of simply using the difference between the pixel intensities, we use a measure based on Zero-mean Normalized Cross-Correlation (ZNCC) between patches of size $3\times 3$. ZNCC has two advantages: (i) removal of brightness constancy assumption; and (ii) robustness to false matches between pixels with similar intensities but different neighborhoods. For a selected set of neighboring frames $N(m)$, the cost volume is given by \begin{equation} C(\textbf{u},\xi(\textbf{u})) = \frac{1}{|N(m)|} \sum_{I\in N(m)} \frac{1-Z(\textbf{u},\xi(\textbf{u});I,I_r)}{2} \end{equation} where $Z(u,\xi(\textbf{u});I,I_r)$ is the ZNCC between a patch around $\textbf{u}$ in $I_r$ and the patch around its reprojection in $I$ assuming depth $\xi(\textbf{u})$. Depth estimation is now formulated as the following optimization problem \begin{multline} \label{eq:optProblem} \min_{\xi}\sum_{\textbf{u}\in \mathcal{P}} C(\textbf{u},\xi(\textbf{u})) +\\ \sum_{\textbf{u}\in \mathcal{T}}\lambda_m(\textbf{u})(\xi(\textbf{u})-\hat{\xi}(\textbf{u}))^2 +\sum_{\textbf{u}\in \mathcal{P}} \lambda_s(\textbf{u})\mathcal{B}(\textbf{u}) \end{multline} where $\mathcal{B}(\textbf{u})$ is the surface bending energy at $\textbf{u}$ and $\lambda_s(\textbf{u})$ is a spatially varying weight that prevents smoothing across edges. For ease of optimization, we restrict the choice of bending energy to those which can be approximated by finite differences. Ideally, bending energy must also be invariant to in-plane rotation of the camera. One such bending energy has the form \begin{equation}\label{eq:bendingEnergy} \mathcal{B}(\textbf{u}) = \left(\frac{\partial^2 \xi(\textbf{u})}{\partial u^2}\right)^2 + \left(\frac{\partial^2 \xi(\textbf{u})}{\partial v^2}\right)^2 + 2\left(\frac{\partial^2 \xi(\textbf{u})}{\partial u \partial v}\right)^2 \end{equation} Experiments show that dropping the cross term produces similar results but considerably speeds up the optimization procedure. A commonly used substitute, which is also used in \cite{newcombe2011dtam}, is squared norm of the gradient $\|\nabla\xi(\textbf{u})\|^2$. However, this imposes an often misleading bias towards frontal-planar surfaces. The optimization problem in Equation \ref{eq:optProblem} is solved using a two-step iterative procedure, similar to \cite{newcombe2011dtam}, by introducing auxiliary variables $\alpha$ and a coupling term whose role in the optimization is controlled by parameter $\theta$ \begin{multline} \min_{\xi,\alpha}\sum_{\textbf{u}\in \mathcal{P}} \lambda_c C(\textbf{u},\alpha(\textbf{u})) + \frac{1}{2\theta}(\alpha(\textbf{u})-\xi(\textbf{u}))^2 +\\ \sum_{\textbf{u}\in \mathcal{T}}\lambda_m(\textbf{u})(\xi(\textbf{u})-\hat{\xi}(\textbf{u}))^2 +\sum_{\textbf{u}\in \mathcal{P}} \lambda_s(\textbf{u})\mathcal{B}(\textbf{u}) \end{multline} where $\lambda_c$ is a constant that is empirically determined and $\lambda_m(\textbf{u})$ is a spatially varying weight that depends on the reliability of the measurement at $\textbf{u}$. \noindent The first step involves minimizing the data term by point-wise search; while the second step solves for the surface that is consistent with the estimates in the first step, agrees with the measurement, and has low bending energy. \noindent \textbf{Step 1} involves a per-pixel point-wise search over the discrete depth candidates to obtain photo-consistent depth estimates \begin{align}\label{step1} \hat{\alpha}(\textbf{u}) &= \arg\min_{d\in \mathcal{D}} E_{aux}^{(t)}(\textbf{u},d,\xi^{(t-1)}) \end{align} \begin{align} E_{aux}^{(t)}(\textbf{u},d,\xi^{(t-1)}) &= \lambda_c C(\textbf{u},d) + \frac{1}{2\theta^{(t)}}(d-\xi^{(t-1)}(\textbf{u}))^2 \end{align} where $\theta^{(t)}$ is decreased after every iteration to increase the coupling between the discrete auxiliary variables and continuous depth estimates. This step is identical to \cite{newcombe2011dtam} except that our final estimate in the current iteration $\alpha^{(t)}$ is obtained by median filtering the depth image $\hat{\alpha}$ to increase robustness to outliers and then performing a single Newton step using the numerical gradient of $E_{aux}^{(t)}$ \begin{align} \alpha^{(t)}(\textbf{u}) \leftarrow \alpha^{(t)}(\textbf{u}) - \eta \frac{\nabla E_{aux}^{(t)}(\textbf{u},\alpha^{(t)},\xi^{(t-1)})}{\nabla^2 E_{aux}^{(t)}(\textbf{u},\alpha^{(t)},\xi^{(t-1)})} \end{align} where $\eta$ is the learning rate. We use $\eta=0.01$ for our experiments. $\lambda_c=10$ was used for RGBD Scenes dataset and $\lambda_c=1000$ was used for Object-Videos dataset. \noindent \textbf{Step 2} enforces smoothness and consistency with depth measurements while being tied to photo-consistent depth estimates obtained in the previous step. \begin{align} \begin{split} \xi^{(t)} = \arg\min_{\xi}\sum_{\textbf{u}\in \mathcal{T}}\lambda_m(\textbf{u})(\xi(\textbf{u})-\hat{\xi}(\textbf{u}))^2 + \\ \sum_{\textbf{u}\in \mathcal{P}} \frac{\lambda_a(\textbf{u})}{2\theta^{(t)}}(\alpha^{(t)}(\textbf{u})-\xi(\textbf{u}))^2 + \lambda_s^{(t)}(\textbf{u})\mathcal{B}(\textbf{u}) \end{split} \end{align} In contrast to \cite{newcombe2011dtam}, we remove the Huber loss on the smoothness term which turns our optimization problem into linear least squares thereby improving efficiency. We deal with outliers and large depth discontinuities by employing two techniques: 1) median filtering the optimal solution to equation (\ref{step1}); 2) appropriate choice of spatially varying constants $\lambda_m, \lambda_a$ and $\lambda_s$: \begin{enumerate} \item[i.] \textit{\textbf{Measurement weights}}: $\lambda_m(\textbf{u})$ is chosen to be inversely proportional to $\sigma(\textbf{u})$, the inverse-depth variance estimate for each measurement provided by LSD-SLAM. We use $0.1$ as the constant of proportionality. \item[ii.] \textit{\textbf{Smoothness weights}}: Since we remove the Huber loss on smoothness term, we gradually increase $\lambda_s^t(u)$ with every iteration so that by the time the smoothness term dominates, $\xi$ is already very close to the true solution. The weight also depends upon edge strength to make smoothing edge aware. Specifically we use \begin{equation} \lambda_s^{(t)}(\textbf{u}) = \gamma^{t-1} \lambda_s^{(0)}e^{-c_{\text{edge}}\; Edge(\textbf{u})} \end{equation} where $Edge(\textbf{u})$ is the edge strength obtained from Structured Edge Detector ~\cite{dollar2013structured} which was trained to detect object contours in images. For our experiments we used $\lambda_s^{(0)}=0.01$ and $c_{\text{edge}}=5$. $\gamma=1.6$ was used for RGBD Scenes dataset, whereas $\gamma=1.8$ was used for Object-Videos dataset. \item[iii.] \textit{\textbf{Coupling weights}}: Similar to \cite{newcombe2011dtam}, we decrease $\theta$ with every iteration to increase coupling \begin{equation} \theta^{(t)} = (1-\beta t)\theta^{(t-1)} \end{equation} In addition, photometric error based spatially varying weights are used to propagate depth estimates from more \textit{confident} regions to less \textit{confident} ones such as textureless and specular surfaces. \begin{equation} \lambda_a(\textbf{u}) = e^{-c_{\text{conf}}\; \rho(\textbf{u})} \end{equation} where $\rho(\textbf{u})$ is the minimum photometric error stored in the cost volume at pixel $\textbf{u}$ \begin{equation} \rho(\textbf{u}) = \min_{d}C(\textbf{u},d) \end{equation} In our experiments, we use $\theta^{(0)}=1$, $\beta=0.03$, and $c_{\text{conf}}=5$. \end{enumerate} Note that with the exception of $\lambda_c$ and $\gamma$, the same set of parameters generalized to two datasets with very different scales. \subsection{Volumetric Fusion} The depth maps estimated for the key-frames are fused together to get a volumetric reconstruction of the scene represented by an implicit surface function field $S(\textbf{v})$ defined on a voxel grid, $\mathcal{V}$. A desired property of such a function field is that $S(\textbf{v})$ takes a positive value in empty regions and negative value otherwise. The surface mesh can then be extracted as the zero-level set of $S$. Let $S_i(\textbf{v})$ be the Signed Distance Function (SDF) computed over $\mathcal{V}$ due to $i^{th}$ key-frame. Given $K$ key-frames, the actual choice of the functional mapping from $\{S_1(\textbf{v}),\cdots,S_K(\textbf{v})\}$ to $S(\textbf{v})$ is closely related to the choice of the mapping from the $i^{th}$ key-frame's depth map $\xi_i$ to $S_i(\textbf{v})$. Another important requirement from $S(\textbf{v})$ is that its zero-crossing lies on the object's surface. If the depth maps were very accurate, then for any choice of $S_i(\textbf{v})$ which assigns a negative value to voxels behind the depth surface and positive otherwise, $S(\textbf{v})$ can simply be computed as follows \begin{equation} S(\textbf{v}) = \max_{i\in \{1,\cdots,K\}} S_i(\textbf{v}) \end{equation} The surface extracted from $S(\textbf{v})$ will be guaranteed to be accurate up to the resolution of the voxel grid. Sub-voxel accuracy however still depends on the computation of $S_i$. Naturally smooth and more accurate surfaces can be expected if $S_i(\textbf{v})$ is proportional to the distance of $\textbf{v}$ from the closest depth surface. However, since the estimated depth maps often have local errors in regions with textureless surfaces or specularities, the above computations need to be suitably modified for robustness. We propose to decompose volumetric fusion into two parts: i) robust fusion, and ii) zero-crossing or bias correction. The first step produces SDFs that are robust to errors in depth map or camera pose estimation at the cost of incurring a bias or a shift in the zero-crossing. The second step corrects for this bias by applying a smooth deformation field to force the function value close to zero at a set of points known to lie on the object surface. We compare our proposed approach to TSDF~\cite{newcombe2011kinectfusion} in Fig.~\ref{fig:tsdfVSssdf}. Fig.~\ref{fig:deformation} shows the effect and importance of zero-crossing correction. \subsubsection{Robust Fusion} Let $\textbf{q}_i(\textbf{v})$ be the point where the ray from the $i^{th}$ camera center to $\textbf{v}$ intersects the depth surface due to $\xi_i$. $S_i(\textbf{v})$ is simply given by \begin{equation} S_i(\textbf{v}) = \min\left(1, \frac{\|\mathbf{\eta}_i(\textbf{v})\|_2}{\mu}\right) \times \text{sign}\left(\eta_{iz}(\textbf{v})\right) \end{equation} where $\mathbf{\eta}_i(\textbf{v}) = \textbf{T}_i(\textbf{q}_i(\textbf{v})) - \textbf{T}_i(\textbf{v})$ with $\textbf{T}_i$ being the transformation from world coordinates to camera coordinates. Here $\mu$ is a constant used to clip the SDF value further away from the surface. The SDFs from all key-frames are fused using a soft maximum operation defined as follows \begin{equation} S'(\textbf{v}) = \frac{\sum_{i=1}^{K}S_i(\textbf{v})e^{h S_i(\textbf{v})}}{\sum_{i=1}^{K}e^{h S_i(\textbf{v})}} \end{equation} where $h$ is a hardness constant. We use $h=10$ for all our experiments. Soft maximum produces level surfaces that are naturally smooth and trades the property of preserving the zero-crossings for robustness to errors in depth and camera parameter estimates. Note that this is in contrast to \cite{newcombe2011kinectfusion} where $S_i$ were truncated to zero beyond a depth of $\mu$ behind the depth surface in order to preserve zero-crossing as it relied on a weighted averaging of $S_i$s. Views in which a voxel was more directly in the line of sight were given a higher weight while fusing the SDFs. Such a weighing is implicit in our soft-max formulation since voxels tend to have higher $S_i(\textbf{v})$ in views where it is directly in the line of sight. \begin{figure} [t] \begin{center} \includegraphics[width=0.9\linewidth]{tsdf_vs_ssdf.png} \end{center} \vspace{-0.1in} \caption{Comparison of TSDF with the proposed robust fusion scheme involving deformation of Softmax SDF. The proposed SDF is more robust to errors in depth estimation and produces smoother more accurate surfaces.} \vspace{-0.1in} \label{fig:tsdfVSssdf} \end{figure} \subsubsection{Zero-crossing Correction} \begin{figure} [t] \begin{center} \includegraphics[width=0.9\linewidth]{deformation_notrans.png} \end{center} \vspace{-0.1in} \caption{Visualization of the zero-level set of the fused SDF before and after deformation. Notice how the zero-crossing correction recovered the thin structures like the lever arm of the paper punch and horns of the dragon} \vspace{-0.1in} \label{fig:deformation} \end{figure} To correct for the bias in $S'$, we use a sparse set of 3D surface points, $\mathcal{M}$ generated by PMVS \cite{furukawa2010accurate}. We pose this problem as that of finding a deformation field $\Delta S(\textbf{v})$ such that \begin{equation} S(\textbf{p}) = S'(\textbf{p}) + \Delta S(\textbf{p}) = 0 \: \forall \: \textbf{p} \in \mathcal{M} \end{equation} We choose to parametrize $\Delta S$ by a radial basis expansion \begin{equation} \Delta S(\textbf{v}) = \sum_{j=1}^{C} a_j \phi(\|\textbf{v} - \textbf{c}_j\|_2) \end{equation} where $\textbf{c}_j$ is a set of control points, $\textbf{a}$ denotes the coefficients of expansion, and $\phi$ is any radial basis kernel. For our experiments, we use $\phi(x) = e^{-x^2/\sigma^2}$ with $\sigma=0.1$. For a voxel grid of maximum grid dimension $200$, we use $C=4000$ randomly sampled control points out of which half are sampled in the region $\{\textbf{v}\in \mathcal{V} | -0.5 < S'(\textbf{v}) < 0.5\}$ and the other half outside this region. The coefficients are obtained by minimizing the following least squares objective function \begin{multline} \sum_{\textbf{p}\in \mathcal{M}'_1} \left( S'(\textbf{p}) + \sum_{j=1}^{C}a_j\phi(\|\textbf{p} - \textbf{c}_j\|_2) \right)^2 + \\ \sum_{\textbf{p}\in \mathcal{M}'_2} \left( \sum_{j=1}^{C}a_j\phi(\|\textbf{p} - \textbf{c}_j\|_2) \right)^2 + \lambda\frac{\|\textbf{a}\|^2}{2} \end{multline} The first term enforces $S(\textbf{p})=0$ for $\textbf{p}\in\mathcal{M}'_1$ which contains $500$ points randomly sampled from $\mathcal{M}$. The second term constrains the deformation to be zero at points $\textbf{p}\in \mathcal{M}'_2$ which contains 500 points each sampled from $0.9$ and $-0.9$ level sets of $S'$. The third term is used to regularize the deformation. \subsection{Joint 2D-3D Segmentation} Given a set of key-frame images $\mathcal{I}$, their camera pose estimates $\mathcal{C}$, fused and deformed SDF $S$, and a sparse set of pixel-voxel correspondences, we want to label all 2D image pixels as $\{object,background\}$ and all voxels as $\{object,background,empty\}$. Note that even though the objects are placed on simple planar surfaces, achieving good quality segmentations is challenging because of one or more of the following reasons: (i) specularities; (ii) significant color variations on the object surface; (iii) errors in camera pose estimation; (iv) local errors in depth map estimates, (v) noisy PMVS point cloud; and (vi) error in support surface estimation. Another challenge is the computational complexity that arises as a result of dealing with pixels in all images and a dense voxel grid. To keep computational complexity in check, we label superpixels instead of pixels. About $2000$ superpixels are computed for each image $I_i \in \mathcal{I}$ using SLIC \cite{achanta2012slic}. We denote the label assigned to the $i^{th}$ superpixel and voxel by $s_i$ and $v_i$, and the set of all pixels and voxels by $\mathcal{S}$ and $\mathcal{V}$ respectively . We formulate our objective as a joint 2D-3D segmentation and minimize it using graph cuts with $\alpha$-expansion. The objective function is given by \begin{multline} E(s,v) = \sum_{i=1}^{|\mathcal{S}|}\psi_s(s_i) + \sum_{i=1}^{|\mathcal{V}|}\psi_v(v_i) + \sum_{(i,j)\in \mathcal{E}_{sv}}\psi_{sv}(s_i,s_j) \: + \\ \sum_{(i,j)\in \mathcal{E}_{ss}}\psi_{ss}(s_i,s_j) + \sum_{(i,j)\in \mathcal{E}_{vv}}\psi_{vv}(s_i,s_j) \end{multline} The superpixel unary term $\psi_s$ encodes object color, a scene prior that is informative about background superpixels, and consistency of image segmentations with volumetric reconstruction. The voxel unary term, $\psi_v$, encodes information about the empty regions using the SDF, location of background voxels using the scene prior pertaining to a flat support surface, and consistency of volumetric reconstruction with image segmentations. Super-pixel binary term, $\psi_{ss}$, encodes edge-aware smoothness between labeling of neighboring superpixels. Similarly, voxel binary term $\psi_{vv}$ encodes smoothness in voxel labeling. Finally, superpixel - voxel pairwise term, $\psi_{sv}$, ensures consistency between surface voxels, and superpixels they project to in different views. Indirectly, $\psi_{sv}$ ensures consistent superpixel labeling across views. Next we describe the graph structure, initialization, and each of the unary and pairwise energy terms in detail. \subsubsection{Graph Structure} There is a node in the graph, $\mathcal{G}$, for every superpixel $\textbf{s}_i$ in $\mathcal{S}$ and every voxel $\textbf{v}_i$ in $\mathcal{V}$. We connect the neighboring voxels using a $6$-connected grid. We insert an edge between two superpixels if they both lie in the same image and share a boundary. We would ideally like to connect each superpixel with all voxels that project inside the superpixel, are in direct line of sight in the corresponding view, and lie on the surface of the object. However, this would require knowing the surface voxels and their visibility information. We can compute this information for a sparse set of points using semi-dense depth maps provided by LSD-SLAM. For each image we back-project the LSD-SLAM depth map and hash the points into the voxel grid $\mathcal{V}$. This gives us a sparse set of correspondences between superpixels and voxels. The region to be discretized by the voxel grid (our region of interest or ROI), is set to $median \pm 2$ standard deviations computed from the LSD-SLAM point cloud along each dimension. The resolution of the grid is chosen such that the largest dimension is divided into $200$ voxels. \subsubsection{Initialization} \begin{figure} [t] \begin{center} \includegraphics[width=0.9\linewidth]{trimap_rgb.png} \end{center} \vspace{-0.1in} \caption{Pixel labels for 2D-3D Joint Segmentation are initialized using a trimap obtained from the deformed SDF. Only the labels of the blue colored pixels are optimized by graph cut.} \vspace{-0.1in} \label{fig:trimapInit} \end{figure} We first extract the zero level set of the fused and deformed SDF and fit a plane to the points to identify the flat surface that supports the object. All voxels whose signed distance to the plane (negative denoting behind the plane) is less than a small positive theshold, $\tau$, are set to $background$. All voxels above the surface which contain at least one point from LSD-SLAM point cloud are marked as $object$ and the remaining ones are maked $empty$. We initialize the segmentation with a per-image trimap (see Fig.~\ref{fig:trimapInit}), computed by projecting an over-estimate, $\mathcal{U}$, and an under-estimate, $\mathcal{L}$, of the 3D volume on to each image. $\mathcal{U}$ is obtained by selecting the largest connected component from the set of voxels with $S(\textbf{v}) < 0.5$ and distance to the plane greater than $\tau$. We project $\mathcal{U}$ on to each image $I_i$ to get segmentation masks. Super-pixels that have more than $90\%$ pixels in the background region of the segmentation mask are permanently set to $background$. Next we create a set of voxels $\mathcal{L}=\{\textbf{v}\in \mathcal{U}|S(\textbf{v}) < -0.5\}$. $\mathcal{L}$ is projected on to each image plane to get segmentation masks and each superpixel with more than $90\%$ pixels in the foreground is permanently marked $object$. The remaining superpixels are randomly initialized. Note that only the superpixels that lie in this narrow band around the object silhouette are being solved for by graph cuts. A good initialization must include as few voxels on or below the plane in $\mathcal{U}$ as possible. For this $\tau$ is set to $0.05$ times the mean of the standard deviations along each dimension of the points used to fit the plane. \subsubsection{Energy Terms} \textbf{Super-Pixel Unary} $\psi_s$ comprises 3 components: $\psi_c$ encodes foreground and background colors; $\psi_{roi}$ ensures that superpixels which correspond to surfaces farther away from the ROI are assigned to background; and iii) $\psi_{sil}$ ensures consistency of silhouettes with volumetric reconstruction. For the color term, separate GMMs are used to model the color distribution of foreground and background in Lab color space across all key-frame images. We learn both GMMs with 10 components and learn a full covariance matrix. $5000$ superpixels are randomly sampled across images from the currently labeled foreground or background regions and from them $50000$ pixels are sampled to learn each GMM model. Next, the posterior probabilities, denoted by $Prob(.)$, are computed for each pixel using the learned GMMs. In order to limit the influence of the color term, the probabilities are scaled and truncated by using the following function \begin{equation} M(x) = \min(5,-log(x)) \end{equation} Let $\mathcal{P}(i)$ denote the set of pixels in the $i^{th}$ superpixel. Then the color based superpixel unary term is given by \begin{equation} \psi_c(s_i) = \frac{1}{|\mathcal{P}(i)|} \sum_{p \in \mathcal{P}(i)} M(\rm P_{gmm}(s_i|Color(p)) \end{equation} To compute $\psi_{roi}$, we back-project pixels using the depth map and count how many lie inside the ROI. Let $f(i)$ denote the fraction of pixels in $\mathcal{P}(i)$ which fall outside the ROI. Then the ROI based term is given by \begin{equation} \psi_{roi}(s_i) = \begin{cases} f(i) & s_i=object \\ 0 & s_i=background \end{cases} \end{equation} For the silhouette based term, the current voxels labeled as object are used to render segmentation masks. Let $sil(i)$ denote the fraction of pixels in $\mathcal{P}(i)$ labeled as foreground. Then silhouette consistency term is given by \begin{equation} \psi_{sil}(s_i) = \begin{cases} 1-sil(i) & s_i=object \\ sil(i) & s_i=background \end{cases} \end{equation} Finally $\psi_s(s_i) = \psi_c(s_i) + \lambda_{roi}\psi_{roi}(s_i) + \lambda_{sil}\psi_{sil}(s_i)$. For our experiments we used $\lambda_{roi} = 10$ and $\lambda_{sil} = 1$. In our experiments, we found that using an average of $\psi_{sil}$ over all past iterations of graph cut leads to more stable solutions. \begin{figure*}[t] \begin{center} \includegraphics[width=1\linewidth]{baseline_compare_3.pdf} \end{center} \vspace{-0.1in} \caption{Comparison of reconstructions produced by our system ``SDF + 2D-3D Voxel'' with other baseline methods on videos in Object-Videos dataset. Our approach incorporates: dense depth maps with an improved cost function and improved signed distance function for fusion; sparse patch-based stereo 3D points (PMVS); and joint 2D-3D segmentation based on color, edge, and depth cues. By using a broad set of techniques, our system avoids many of the errors and artifacts inherent in any individual. Note that our method produces smoother and more detailed reconstructions as compared to the baseline methods while being more robust to errors in PMVS point cloud and depth estimation errors that show their effect in ``PMVS + Poisson'' and ``Deformed SDF''. Also unlike ``Volumetric GC'', our approach is less sensitive to the color model, as evident from the \textit{books} example.} \vspace{-0.1in} \label{fig:baselineCompare} \end{figure*} \textbf{Voxel Unary} $\psi_v$ has 3 components: $\psi_{sdf}$ encodes the information contained in the SDF, $S$; $\psi_{scene}$ encodes our scene prior; and $\psi_{carve}$ ensure that voxel labeling is consistent with superpixel labeling. Note that SDF helps in identifying empty regions ($S(\textbf{v})>0$) but cannot distinguish between object of interest and other background regions, such as those below the support surface or regions further away from the object, since SDF attains a positive value in both cases. This complementary information is provided by the other two components, $\psi_{scene}$ and $\psi_{carve}$. First, for each voxel $\textbf{v}$, a normalized distance to the fitted plane is computed as follows \begin{equation} d_{n}(\textbf{v}) = \frac{1}{1+e^{-d(\textbf{v})/\sigma_{d}}} \end{equation} where $d(\textbf{v})$ denotes the distance of $\textbf{v}$ from the plane and $\sigma_d$ is the standard deviation of the distance of all voxels from the plane. Next, all voxels with $d_n(\textbf{v}) < 0.3$ are permanently set to $background$. All voxels with $S(\textbf{v}) > 0.9$ are permanently set to $empty$. For the remaining voxels, $\textbf{v}$ the $SDF$ based energy term is given by \begin{equation} \psi_{sdf}(v_i) = \begin{cases} S(\textbf{v}) & v_i=object \\ S(\textbf{v}) & v_i=background \\ -S(\textbf{v}) & v_i=empty \end{cases} \end{equation} The scene prior energy term, $\psi_{scene}$, penalizes labeling of voxels above the support surface as background and those below the surface as either $object$ or $empty$. It is defined as \begin{equation} \psi_{scene}(v_i) = \begin{cases} \mathbbm{1}(d_{n}(\textbf{v})<0.5) \; (1-d_{n}(\textbf{v})) & v_i=object \\ \mathbbm{1}(d_{n}(\textbf{v})>0.5) \; d_{n}(\textbf{v}) & v_i=background \\ \mathbbm{1}(d_{n}(\textbf{v})<0.5) \; (1-d_{n}(\textbf{v})) & v_i=empty \end{cases} \end{equation} In order to compute $\psi_{carve}$, we first perform silhouette carving to get a set of voxel $\mathcal{V}_{carve}$ which project on the superpixels labeled $object$ in all key-frame views. Let the complementary set be $\mathcal{V}_{carve}^c = \mathcal{V}\setminus\mathcal{V}_{carve}$. $\psi_{carve}$ is then given by \begin{equation} \psi_{carve}(v_i) = \mathbbm{1}(\textbf{v}_i\in \mathcal{V}_{carve}^c)\mathbbm{1}(v_i=object) \end{equation} The final voxel unary for the variable voxels is given by $\psi_v(v_i)~=~\lambda_{sdf}\psi_{sdf}(v_i) + \lambda_{scene}\psi_{scene}(v_i) + \lambda_{carve}\psi_{carve}(v_i)$. For all our experiments we have set $\lambda_{sdf}=4$, $\lambda_{scene}=1$, and $\lambda_{carve}~=~1$. Similar to $\psi_{sil}$, we also use the average $\psi_{carve}$ over all past iterations. \textbf{Super-pixel Binary} term $\psi_{ss}$ imposes edge-aware smoothness constraints on the superpixel labeling. For a pair of superpixels with indices $(i,j)$ that share boundary, with the set of boundary pixels denoted by $\mathcal{B}(i,j)$, the superpixel pairwise energy term is given by \begin{equation} \psi_{ss}(s_i,s_j) = \mathbbm{1}(s_i\neq s_j)\exp\left(-2\sum_{\textbf{p}\in \mathcal{B}(i,j)}Edge(\textbf{p})\right) \end{equation} where $Edge(\textbf{p})$ denotes the contour edge strength of pixel $\textbf{p}$ obtained using Structured Edge Detector \cite{dollar2013structured}. \textbf{Voxel Binary} term $\psi_{vv}$ imposes smoothness constraints on the voxels. For a pair of voxels indexed by $(i,j)\in \mathcal{E}_{vv}$, the voxel binary term is defined as $\psi_{vv}(v_i,v_j) = \mathbbm{1}(v_i\neq v_j)$. \textbf{Super-pixel - Voxel Pairwise} term $\psi_{sv}$ ensures that for every superpixel and voxel with an edge between them, with indices $(i,j)\in \mathcal{E}_{sv}$, superpixel and voxel labels are consistent with each other. Note that $\mathcal{E}_{sv}$ only connects surface voxels with superpixels. The surface voxels can never be $empty$ hence both $s_i$ and $v_j$ lie in $\{object,background\}$. Given this restriction on the labels $\psi_{sv}(s_i,v_j) = \mathbbm{1}(v_i\neq v_j)$. \subsubsection{Details of $\alpha$-expansion} We run $5$ iterations of optimization with $3$ $\alpha$-expansion steps per iteration or until the sum of the number of label swaps for all expansion moves in an iteration falls below $6000$, whichever comes first. To make the set of labels the same for pixels and voxels, we assign a very high cost to $empty$ for any superpixel. The color models are updated in each iteration using the current superpixel labeling hence $\psi_c$ needs to be recomputed in each iteration. Besides this only $\psi_{sil}$ and $\psi_{carve}$ are updated in each iteration since they depend on the current voxel map and segmentation masks. \subsection{Post-processing} \label{sec:postProcess} As an important post-processing step, we select the largest connected component from the voxels labeled as $object$. While this could be used to generate a surface mesh of the object directly, we found that qualitatively better results are obtained by using it as a mask to set $S(\textbf{v})$ to $1$ for all $\textbf{v}$ such that $v\neq object$, extract its zero-level set, and perform mesh smoothing using \cite{zhang2006vertex}. \section{Experiments} We evaluate our system qualitatively (Fig.~\ref{fig:qualWall} and Fig.~\ref{fig:baselineCompare}) with displays of 3D reconstructed objects from our Object-Videos dataset. We also quantitatively evaluate dense depth map estimation (Fig.~\ref{fig:plot}) with the RGBD Scenes V2 Dataset~\cite{henry2013patch} and segmentation accuracy (Tab.~\ref{tab:fgIOU}) on key frames from the Object-Videos dataset. \subsection{Object Reconstruction} Our Object-Videos dataset consists of 12 videos of 10 objects captured using a commercial mobile phone camera Samsung Galaxy S4. Many of the objects have complex shapes, low-texture surfaces, and specular materials. Thus, while many graphics and vision papers use carefully designed experimental setups and/or objects with smooth Lambertian surfaces that satisfy model assumptions, we attempt to reconstruct common objects filmed with a typical camera in a casual process. In Fig.~\ref{fig:baselineCompare}, we show results of our method ``SDF + 2D-3D Voxel'' with comparisons to baseline methods: (i) Poisson surface reconstruction~\cite{kazhdan2006poisson} using PMVS~\cite{furukawa2010accurate} point cloud; (ii) Volumetric graph cut method of ~\cite{vogiatzis2005multi}; and (iii) Zero level set of deformed SDF $S$ after selecting appropriate region using aggressive and conservative thresholds on $S$. \subsection{Dense Depth Estimation} \begin{figure} [t] \begin{center} \includegraphics[width=1\linewidth]{rgbd_scenes_eval_separate.pdf} \end{center} \vspace{-0.1in} \caption{Evaluation of dense depth map computation on RGBD Scenes v2 dataset with - (a) 100, and (b) 1000 measurements. Our algorithm is better at reconstructing nearby depths because of nonlinear discretization used for cost volume construction which leads to finer resolution at smaller depths. The object of interest is typically close to the camera.} \vspace{-0.1in} \label{fig:plot} \end{figure} To evaluate our dense depth map estimation procedure we use the available camera poses to estimate depth maps for five selected key frames of each video in the RGBD Scenes V2 dataset. We compare three different smoothness priors: first order ($\|\nabla\xi(u)\|_2^2$); second order (eq.~\ref{eq:bendingEnergy} without the cross term); and second order rotation invariant bending energy (eq.~\ref{eq:bendingEnergy}). We also evaluate the effect of increasing the number of measurements (known depth points) from 100 to 1000 (see Fig.~\ref{fig:rgbd_qual} for a qualitative comparison on RGBD Scenes V2 dataset). We compare to bilinear interpolation of known depth values as a baseline. For indoor scenes that consist of many planar surfaces, the baseline works quite well, but it provides poor estimates for objects that have curved surfaces. Fig.~\ref{fig:depthNormal} shows the qualitative comparison of depth estimation with different smoothness priors on 2 videos from our Object-Videos dataset. In Fig.~\ref{fig:plot}, we plot root mean squared error as a function of ground truth depth. All the variants of our approach beat the baseline for small depths, which is most relevant for our application. For large depths, non-linear discretization used for the cost volume results in high quantization errors, causing the dense depth estimation to underperform the baseline. While inverse depth and log space discretization are common, in our experiments we found that scaling $\{(0.2 + 0.8\times i/l)^5\}_{i=1}^l$ to the expected range of depth values, where $l$ is the number of discrete values, performed best. Among smoothness priors, the rotation invariant second order bending energy performs the best, beating the second order bending energy by a small but noticeable amount. However, the latter may be preferred because it requires less computation. Both the second order energies perform significantly better than the first order energy. Finally, as the number of measurements increase the error reduces, as expected, especially for regions further from the camera. \subsection{Object Segmentation} \begin{table*}[t] \centering \resizebox{\textwidth}{!}{% \begin{tabular}{|c|cccccccccccc|c|c|} \hline & \textbf{dragon} & \textbf{stapler} & \textbf{rubik\_cube} & \textbf{paper\_punch} & \textbf{keyboard} & \textbf{teabox} & \textbf{books} & \textbf{helmet} & \textbf{hedgehog1} & \textbf{hedgehog2} & \textbf{godzilla1} & \textbf{godzilla2} & \textbf{mean} & \textbf{median} \\ \hline \hline \textbf{Fused SDF} & 0.86 & 0.79 & 0.83 & 0.73 & 0.74 & 0.74 & 0.88 & 0.84 & 0.82 & 0.73 & 0.82 & 0.78 & 0.80 & \multicolumn{1}{c|}{0.80} \\ \textbf{Deformed SDF} & 0.87 & 0.82 & 0.85 & 0.81 & 0.76 & 0.54 & 0.81 & 0.79 & 0.63 & 0.80 & 0.58 & 0.82 & 0.76 & \multicolumn{1}{c|}{0.81} \\ \hline \hline \textbf{Volumetric GC} & 0.90 & 0.86 & 0.76 & 0.88 & 0.68 & 0.85 & 0.35 & 0.37 & 0.86 & 0.86 & 0.81 & 0.90 & 0.76 & \multicolumn{1}{c|}{0.85} \\ \textbf{2D GC} & 0.90 & 0.90 & 0.95 & 0.93 & 0.76 & 0.94 & 0.88 & 0.84 & 0.83 & 0.88 & 0.80 & 0.91 & 0.88 & \multicolumn{1}{c|}{0.89} \\ \textbf{2D-3D GC Pixel:} & 0.91 & 0.90 & 0.95 & 0.93 & 0.78 & 0.87 & 0.92 & 0.87 & 0.85 & 0.85 & 0.83 & 0.91 & 0.88 & \multicolumn{1}{c|}{0.88} \\ \textbf{2D-3D GC Voxel} & 0.91 & 0.90 & 0.93 & 0.88 & 0.73 & 0.84 & 0.92 & 0.88 & 0.87 & 0.82 & 0.80 & 0.88 & 0.86 & \multicolumn{1}{c|}{0.88} \\ \textbf{GC Select} & 0.90 & 0.89 & 0.91 & 0.88 & 0.74 & 0.82 & 0.92 & 0.87 & 0.86 & 0.80 & 0.79 & 0.86 & 0.85 & \multicolumn{1}{c|}{0.87} \\ \hline \hline \textbf{SDF + 2D-3D Voxel} & 0.90 & 0.89 & 0.91 & 0.88 & 0.73 & 0.82 & 0.91 & 0.87 & 0.86 & 0.79 & 0.79 & 0.85 & 0.85 & \multicolumn{1}{c|}{0.87} \\ \hline \end{tabular}} \vspace{-0.1in} \caption{Foreground IoU} \vspace{-0.1in} \label{tab:fgIOU} \end{table*} \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{qual_wal_3.png} \end{center} \vspace{-0.1in} \caption{Qualitative reconstruction results for more videos in Object-Videos dataset. Our approach produces naturally smooth surface reconstruction of objects with varying complexity of shapes and material properties.} \vspace{-0.1in} \label{fig:qualWall} \end{figure*} \begin{figure*} [t!] \begin{center} \includegraphics[width=0.9\linewidth]{failure_cases.png} \end{center} \vspace{-0.1in} \caption{Failure cases which are mainly caused due to camera pose estimation errors. Pose errors affect all stages in the pipeline. Incorrect support surface estimation is an issue for flat objects since there is little evidence to distinguish between object and background regions.} \vspace{-0.1in} \label{fig:failCases} \end{figure*} We also compare variants of our algorithm on 2D pixel segmentation. These results give a sense of 3D segmentation and reconstruction quality, but multiple 3D segmentations are consistent with a single 2D segmentation (e.g., the visual hull and the true shape have the same silhouettes) and different kinds of 2D segmentation errors have different impact on 3D reconstruction. In Table~\ref{tab:fgIOU}, we compare segmentation performance, measured by intersection over union (IoU) of ground truth and estimated segmentation masks over annotated keyframes, for several variants of our technique: \begin{itemize} \item[] \textbf{Fused SDF: } Segmentations obtained by backprojecting the largest connected component of interior voxels above the fitted plane from the signed distance function (SDF) created from depth maps. \item[] \textbf{Deformed SDF: } Same as above, but after deforming the SDF so that its surface lies close to PMVS points. \item [] \textbf{Volumetric GC: } Our implementation of volumetric graph cut method of \cite{campbell2010automatic}. \item[] \textbf{2D GC: } Image graph cuts co-segmentation using color terms computed from multiple images but without voxel segmentation, the pixel-voxel constraints, or the $\psi_{sil}$ term. \item[] \textbf{2D-3D GC Pixel: } Pixel segmentations resulting from our joint 2D-3D graph cuts method. \item[] \textbf{2D-3D GC Voxel: } Backprojects segmented voxels using our joint 2D-3D method. \item[] \textbf{SDF + 2D-3D Voxel: } Backprojects the 3D volume obtained by slightly dilating the voxels obtained from 2D-3D segmentation, intersecting with Deformed SDF, and smoothing. This method provides the best qualitative results and is used for reconstruction results. \end{itemize} The SDF deformation yields better results in most cases, but for \textit{teabox}, \textit{books}, \textit{helmet}, \textit{hedgehog1}, and \textit{godzilla1}, the results are much worse due to large errors in camera pose estimation that decreased accuracy of the PMVS point cloud used for deformation. The PMVS results are included in the supplementary video. Our graph cuts methods are robust to these errors, outperforming ``Fused SDF'' and ``Deformed SDF'' by large margins. Our joint 2D-3D segmentation (``2D-3D GC Pixel'') performs equally or better than 2D-only segmentation (``2D GC'') in all but two cases, supporting the value of joint segmentation. The main case in which 2D-only outperforms is \textit{teabox} in which errors in camera pose estimation harm the 2D-3D result. Although backprojecting voxels from the 2D-3D segmentation (``2D-3D GC Voxel'') slightly underperforms the 2D-3D pixel segmentation (partly due to coarser voxel discretization), the voxel-based 3D model is better than that obtained by shape carving from 2D segmentations because shape carving is sensitive to errors in individual images. Our most qualitatively pleasing 3D models are produced by combining meshes from ``Deformed SDF'' and ``2D-3D GC Voxel'', but when backprojected to images, the resulting silhouettes are slightly less accurate than ``2D-3D GC Voxel''. As an alternative to graph cut optimization, we tried Spectral Matting \cite{levin2008spectral} for performing independent image segmentations using the trimap. Spectral Matting first identifies a basis set of matting components where each component is obtained as a linear combination of a Laplacian matrix. Then it uses the trimap initialization to assign each component to foreground or background and constructs an $\alpha$-matte. However, we found that in order to obtain consistent segmentations across views it is necessary to compute eigenvectors of a prohibitively large Laplacian matrix defined over pixels in all key-frames and all voxels. \section{Failure Modes and Limitations} Based on qualitative (see Fig.~\ref{fig:failCases}) and quantitative evaluation, we have identified a set of failure modes for our approach - A major source of error that affects all stages of our system is camera pose estimation. Camera pose estimates directly affect the accuracy of constructed \textit{cost volume} and depth measurements for computing dense depth maps, accuracy of PMVS point cloud, alignment of depth maps during volumetric fusion, deformation of SDF using PMVS point cloud, and superpixel-voxel consistency constraints during joint 2D-3D segmentation. The pose estimation errors are largely due to severe occlusion and breaking of brightness constancy assumption due to textureless and specular surfaces. The videos in Object-Videos dataset are also collected in a casual fashion with blurry frames and large displacement between consecutive frames. Secondly, errors in estimated depth maps due to specular and textureless surfaces adversely affect quality of the fused SDF which is the driving force behind the 2D-3D segmentation mechanism. We have demonstrated some degree of robustness in reconstructing textureless and specular surfaces such as in \textit{stapler}, \textit{paper-punch}, \textit{teabox}, and \textit{helmet}, but explicit removal of specularities would further improve performance. As a byproduct of the above two, incorrect estimation of the support surface is a main source of error while reconstructing flat objects like the \textit{keyboard}. Our approach also has some limitations. Our method was targeted towards reconstruction of small objects for 3D printing or augmented reality applications and hence applies to a scale of objects and scenes which can afford computation with a discrete grid of voxels. We are also limited by computation of the cost volume for depth estimation which grows linearly in the number of discrete depth values used. We limit our selves to planar support surfaces with limited background clutter. Finally, our method cannot recover fine geometric details such as the scale pattern on the \textit{dragon}. Such detail recovery would require shape from shading and material analysis which are still open research problems. \section{Conclusion} In this work, we proposed a system for 3D reconstruction of an object from a video taken with hand-held mobile phone camera. Our three major contributions are: (1) improved objective function for dense depth map computation; 2) robust estimation of an implicit surface using a softmax signed distance function with zero-crossing correction; and (3) a method for joint $2D$-$3D$ segmentation. Through qualitative and quantitative results we demonstrate robustness to textureless surfaces, specularities, and errors in camera pose estimation. Potential directions for future work include extending the proposed approach for category specific reconstruction using data driven priors and recovering high frequency details in the reconstruction through shape-from-shading and material analysis. \section*{Acknowledgements} This research was supported in part by NSF Award 14-21521. We are also thankful to David Forsyth for helpful discussion on linearized bending energy and smoothness priors, and to Jason Rock for suggesting the region of interest based component of superpixel unary. \bibliographystyle{acmsiggraph} \nocite{*} \section{Introduction} Our aim is to create a 3D model of a single object recorded by a handheld mobile phone camera. We assume only that the object is placed on a flat surface and that the object is approximately centered. The ability to easily and accurately create 3D models from handheld cameras has broad applications including virtual reality and 3D printing. But existing methods are unable to consistently produce 3D models of objects with specularities and irregular shapes without user interaction or controlled capture settings. 3D reconstruction of scenes from image sequences is a well studied problem in computer vision. The underlying idea behind most existing work is that multiple pixel measurements of a point in the scene can be used to triangulate its 3D position. Therefore, reconstruction accuracy hinges on the ability to track a pixel with sub-pixel accuracy. Tracking and matching algorithms, however, assume brightness constancy which breaks down for specular surfaces. Tracking algorithms also falter in textureless regions where neighboring pixels have similar intensities. MonoFusion \cite{pradeep2013monofusion} and MobileFusion \cite{ondruska2015mobilefusion} demonstrate 3D reconstruction by explicitly modeling surfaces as depth maps and then performing volumetric fusion. However, to achieve real-time performance such methods compromise on accuracy of the depth maps by relying on stereo matching between the live frame and the last key frame. Similarly, volumetric fusion is performed by a weighted average of implicit surface representation of the depth surfaces, such as Truncated Signed Distance Fields (TSDF), computed in different views. Success of such volumetric fusion approaches depends on the accuracy of depth maps. While these techniques work well for depth maps acquired using active sensors like Kinect, they are not robust to localized but often large errors in depth maps that are common with multi-view stereo techniques. Another important aspect of single object 3D reconstructions is segmentation of the object from the scene. To be useful for 3D printing, the 3D volume occupied by the object needs to be identified. While TSDF gives an estimate of empty regions in space, the cues that distinguish the object from other surfaces come from scene priors and the images. Some approaches iteratively solve for 2D and 3D segmentations~\cite{vogiatzis2005multi} or jointly segment pixels and sparse point clouds~\cite{xiao2007joint}, but none, to the best of our knowledge, perform joint inference over pixels and a dense grid of voxels, which we find to be important for obtaining accurate 3D models. In this work, we propose to improve the accuracy and robustness of video based multi-view single object 3D reconstruction and segmentation systems by improving surface modeling, volumetric fusion, and segmentation. Our system computes accurate depth maps by posing dense per-pixel depth estimation as an optimization problem which incorporates multi-view stereo cues, sparse point cloud reconstruction from a VSLAM system, and a surface smoothness prior in the form of a rotation invariant bending energy. For 3D reconstruction, we reformulate volumetric fusion of depth maps by getting rid of the \textit{truncation} in TSDF and using a \textit{soft-max} based signed distance function (SDF). Our fusion approach has the benefit of being more robust to errors in depth maps and also produces smoother surfaces. This technique however leads to a shift in the \textit{zero-crossing} of the function field, which we remedy by introducing a novel volume field deformation using a sparse surface point cloud such as that provided by patch-based multi-view stereo~\cite{furukawa2010accurate}. For segmentation, we perform joint inference over pixel and voxel labels in a graph cut optimization framework. Pixels and voxels impose complementary constraints on the reconstruction. Pixels model the object color which helps distinguish the object surface from other background surfaces and provide cues to surface discontinuities through contour edges. Voxels impose constraints on empty regions, enforce continuity of objects in 3D space and incorporate our scene prior. In addition, surface voxels enforce consistency of pixel labeling across multiple images. We evaluate each of these components to demonstrate good performance even in the presence of specularities and textureless surfaces. To summarize our contributions: \begin{enumerate} \item[1.] We propose a fully automated approach to produce a 3D mesh of a single object placed on a flat surface. \item[2.] We propose a method to robustly estimate depth surfaces from multi-view stereo cues and a sparse point cloud (optional) which is regularized by a rotation invariant second order bending energy. We demonstrate its performance on our Object-Videos dataset as well as RGBD Scenes v2 dataset and compare against other forms of regularization. \item[3.] We reformulate volumetric fusion by using a \textit{soft-max} instead of the truncation and weighted averaging for computing the TSDF proposed in \cite{newcombe2011kinectfusion}. To correct the bias in \textit{zero-crossing} we perform a smooth function field deformation using a surface point cloud. Our approach is more robust to errors in depth maps and produces smooth surface meshes. \item[4.] We formulate joint 2D image segmentation and volumetric 3D reconstruction as the task of assigning discrete labels $\{object,background\}$ to every pixel and $\{object,background,empty\}$ to every voxel $v$.The discrete optimization is solved using graph cut with $\alpha$-expansion procedure under constraints imposed by pixels, voxels and scene priors. \item[5.] We evaluate our entire system through pixel segmentation accuracy on Object-Videos dataset which is a video dataset of 12 objects recorded by a mobile phone camera. We provide ground-truth segmentation masks for selected frames to encourage advancement of state-of-the-art on this task. \end{enumerate} \section{Related Work} We can group relevant literature into two broad areas: 3D reconstruction and multi-view segmentation. \noindent \textbf{3D Reconstruction:} Most of the existing work in this area focuses on reconstruction of an entire scene. Different approaches cater to different reconstruction resolution requirements and size of the scenes. Single object reconstruction mostly falls within the purview of literature that deals with small sized indoor scenes. MonoFusion \cite{pradeep2013monofusion} and MobileFusion \cite{ondruska2015mobilefusion} use stereo matching between the live frame and last selected key-frame to generate depth maps. The final surface reconstruction is computed by extracting zero-level set of the Signed Distance Field (SDF) obtained by weighted averaging of TSDFs for different views. This approach to volumetric fusion, popularized by KinectFusion \cite{newcombe2011kinectfusion}, has demonstrated good performance for fusing accurate depth measurements from active sensors like the Kinect. However, this method has two drawbacks. First, due to weighted averaging, the TSDFs are forced to be asymmetric to avoid changing the zero-level set. This in turn hinders their ability to collect evidence of occupancy for voxels behind the visible surfaces. Second, this approach relies on accurate depth surface estimates which, while generally true for active sensors operating in indoor scenes, does not generalize to stereo based methods in presence of specular reflection and texture-less surfaces. To counter these problems we propose an alternative scheme that relies on maximum signed distance to the visible surfaces. For robustness we use a \textit{soft-max} instead of a hard maximum. This is followed by \textit{zero-crossing} correction using a smooth deformation field generated using a sparse point cloud provided by PMVS \cite{furukawa2010accurate}. Our joint 2D-3D segmentation also reduces dependence on the depth maps by utilizing multiple cues and hence improves the overall robustness of the system. DTAM \cite{newcombe2011dtam} proposes a novel and robust alternative to pairwise stereo for computing dense per-pixel depth maps. They pose the problem of computing depth at evey pixel as a two step iterative optimization problem, where the first step ensures consistency of depth estimates with photometric evidence integrated over multiple frames (\textit{cost volume}) and the second step provides a first order spatial regularization. Inspired by DTAM, we also pose depth surface computation as a two step iterative optimization problem but with some important improvements and simplifications. The major differences are: (1) relaxation of frontal-planar assumption imposed by the first order regularization; (2) removal of Huber loss on smoothness term and appropriate compensation through spatially varying weights that turns the optimization problem in the second step to linear least squares; (3) replacement of pixel based photometric error by patch based Zero-mean Normalized Cross Correlation (ZNCC) which is more robust to brightness changes, while computing the cost volume. Another approach to dense 3D reconstruction is to begin with a sparse point cloud, increase density by propagating measurements to nearby points using techniques like PMVS \cite{furukawa2010accurate} and then fit a mesh to this semi-dense reconstruction \cite{kazhdan2006poisson}. However to expand the point cloud, techniques like PMVS perform only local operations that may not produce a globally consistent result. It is also difficult to enforce surface regularization. Camera pose estimation is an integral component of any of the above mentioned methods. Direct monocular slam approaches like LSD-SLAM \cite{engel2014lsd} and DTAM, which directly minimize photometric error to register live frame with the last selected key-frame have been shown to be more robust than feature tracking based approaches such as PTAM \cite{klein2009parallel}. LSD-SLAM also provides semi-dense depth estimates with inverse depth variance which expresses belief about the accuracy of the estimates. \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{system_overview2.pdf} \end{center} \vspace{-0.1in} \caption{ System overview: First, LSD-SLAM is used to estimate camera poses and to select key-frames from the input video. Then we compute dense depth maps which are volumetrically fused using a robust 2 stage process involving computation of a \textit{softmax} based \textit{signed distance function} followed by deformation using PMVS point cloud. Finally, a joint 2D-3D segmentation is performed to obtain a 3D reconstruction with consistent 2D segmentations.} \vspace{-0.1in} \label{fig:overview} \end{figure*} \noindent \textbf{Multi-view Segmentation:} The dominant approach for multi-view segmentation involves finding optimal labels for some subset of \{\textit{pixels}, \textit{superpixels}, \textit{3D points}, \textit{voxels}\} that minimizes an energy function that encodes task specific priors and evidence from data. The work most closely related to ours is \cite{vogiatzis2005multi}, where 3D reconstruction is posed as a volumetric Graph Cut \cite{boykov2004experimental} optimization problem defined over a 6-connected grid of voxels. Foreground and background color distributions were modeled from images and the unary term for a voxel was defined in terms of the average posterior probabilities of the pixels that the voxel projected to. The foreground voxels were then projected onto the images to get segmentation masks and the color model was updated. Similarly, \cite{djelouah2013multi} propose an approach for segmenting an object from a video by performing graph cut over superpixels and sparse 3D points. They have explicit edges between 3D points and superpixels to ensure multi-view coherence, and edges between superpixels across frames, which are related by optical flow, to model temporal consistency. Both the approaches generate image segmentation masks, but, while the first method generates a volumetric reconstruction by labeling voxels, the second approach only segments a sparse point cloud. Our formulation borrows the idea of jointly labeling superpixels and a voxel grid with edges between them to enforce consistency, but we incorporate rich information from volumetrically fused dense depth maps computed in early stages of our system and scene priors to get good quality reconstructions of objects with complicated shapes and varying material properties. Our system also differs from these approaches in that we use a richer set of labels that distinguish between the voxels that belong to the object of interest and those belonging to other objects in the scene, namely voxels behind the support surface. This distinction allows a more complete and accurate reasoning about the scene. Like us, \cite{kowdle2012multiple} attempts to exploit the rich evidence available in dense depth maps, using stereo and color based appearance cues to first compute dense piecewise planar depth maps for every view. Then they assign a foreground or background label to polygons in every image independently. Finally, they fuse these independent segmentations using multi-view reasoning. Each of these steps is performed by $\alpha$ expansion based energy minimization with carefully chosen terms. Unlike us, they only generate image segmentations. Also, the piecewise planar assumption also does not hold for many objects of interest. An alternative to graph cut optimization was proposed in \cite{xiao2007joint}, where joint segmentation is performed over 2D pixels and 3D scene points using affinity propagation. A graph is constructed over \textit{joint} nodes each of which comprises of a 3D point and its image projections in different views. Similarity between nodes is defined using 3D features like spatial proximity and angle between normal directions, and 2D features like color differences and Kullback-Leibler divergence between patch histograms. This method, however, requires user initialization and includes only sparse 3D points in the optimization. All the above approaches perform 3D segmentation by converting the problem to a discrete optimization. \cite{kolev2009continuous} formulate volumetric reconstruction as that of minimizing a continuous convex functional by relaxing binary labels to lie in $[0,1]$, and they show quantitative improvement over discrete graph cut based approaches. \section{Approach} Our system takes as input an image sequence and automatically generates a volumetric reconstruction of the object, depth surfaces, and segmentation masks for selected key-frames, as shown in Fig.~\ref{fig:overview}. There are four main stages: \noindent \textbf{Pose Estimation:} A state-of-the-art VSLAM system LSD-SLAM \cite{engel2014lsd} is used to get camera poses, key-frame selection, and semi-dense depth maps which are used in later stages of the system. \noindent \textbf{Surface Modeling:} The visible surfaces from each view are modeled as dense depth maps. The procedure, inspired by DTAM \cite{newcombe2011dtam}, involves minimizing an objective function comprising of a \textit{cost volume} based data term regularized by a spatially varying linearized bending energy. We experiment with second order bending energies and compare to the first order regularization used in \cite{newcombe2011dtam}. \noindent \textbf{Volumetric Fusion:} Depth maps from the previous stage are fused together volumetrically to generate a signed function field over a voxel grid. The function field indicates normalized and clipped signed distance of every voxel to its nearest surface. The fusion, however, introduces a bias in the function field and shifts the zero-crossing. PMVS \cite{furukawa2010accurate} points which are known to lie on the surface are used to correct the bias by deforming the function field where the deformation is modeled by a radial basis expansion. \noindent \textbf{Joint 2D-3D Segmentation:} A joint segmentation of all key-frame images and a common voxel map is performed using graph cuts with $\alpha$-expansion over the set of all pixel and voxel nodes. The pixel unary models the color of the object and background regions. The voxel unary enforces constraints on the empty regions (using the SDF) and incorporates scene prior by encouraging voxels below the fitted plane to belong to the background. Pixel-pixel and voxel-voxel pairwise terms are used to impose smoothness in 2D (edge-aware) and 3D space respectively. Finally, edges connecting pixel nodes to sparse surface voxel nodes (identified by hashing sparse 3D points generated by LSD-SLAM into the voxel grid) implicitly enforce consistent labeling across views. \subsection{Pose Estimation} Camera poses and an initial sparse point cloud with visibility information for each point are required in later stages. Camera focal length, optical center, and radial distortion parameters are precomputed using a checkerboard pattern. The video frames are also corrected for radial distortion. LSD-SLAM \cite{engel2014lsd} with loop closure is then used to select a set of key-frames, compute camera poses for every frame, and generate semi-dense depth maps with corresponding estimates of inverse depth variance for all key-frames. \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{depth_normal_object_dataset.pdf} \end{center} \vspace{-0.1in} \caption{Visualization of depth maps and surface normals generated for videos in the Object-Videos Dataset using our depth surface reconstruction method. Smoothness constraints in our optimization make the surface normals well behaved. Higher order bending energy helps preserve more fine details such as those on the dragon's head and keyboard's keys and wire.} \vspace{-0.1in} \label{fig:depthNormal} \end{figure*} \subsection{Surface Modeling} \label{denseDepth} Let the set of all pixels in the current reference image $I_r$ be denoted by $\mathcal{P}$. The pixel coordinates will be referred to as $(u,v)$ or by a 2 dimensional vector $\textbf{u}$. The problem of estimating depth surface reduces to assigning a depth value $\xi(\textbf{u})$ to each pixel $\textbf{u} \in \mathcal{P}$ such that the assignment results in low photometric error, agrees with the depth measurements $\hat{\xi}(\textbf{u})$ wherever available and is mostly smooth barring depth discontinuities. In our system these depth measurements are provided by LSD-SLAM for a set of pixels $\mathcal{T}$. LSD-SLAM also provides an estimate of the inverse depth variance $\sigma(\textbf{u})$ for all $\textbf{u}\in \mathcal{T}$. \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{rgbd_scenes_qual_cropped.png} \end{center} \vspace{-0.1in} \caption{Effect of different smoothness terms and number of measurement points available on depth map estimation for RGBD Scenes V2 dataset. Our method is robust in presence of specularity and textureless surfaces. The second order bending energies allow the reconstruction of long thin surfaces like the arm rest on the chair.} \vspace{-0.1in} \label{fig:rgbd_qual} \end{figure*} Inspired by DTAM \cite{newcombe2011dtam}, we begin by constructing the cost volume $C(\textbf{u},d)$ which specifies the average photometric error of pixel $\textbf{u}$ with respect to neighboring frames for some discrete depth candidates $d\in \mathcal{D}$. Instead of simply using the difference between the pixel intensities, we use a measure based on Zero-mean Normalized Cross-Correlation (ZNCC) between patches of size $3\times 3$. ZNCC has two advantages: (i) removal of brightness constancy assumption; and (ii) robustness to false matches between pixels with similar intensities but different neighborhoods. For a selected set of neighboring frames $N(m)$, the cost volume is given by \begin{equation} C(\textbf{u},\xi(\textbf{u})) = \frac{1}{|N(m)|} \sum_{I\in N(m)} \frac{1-Z(\textbf{u},\xi(\textbf{u});I,I_r)}{2} \end{equation} where $Z(u,\xi(\textbf{u});I,I_r)$ is the ZNCC between a patch around $\textbf{u}$ in $I_r$ and the patch around its reprojection in $I$ assuming depth $\xi(\textbf{u})$. Depth estimation is now formulated as the following optimization problem \begin{multline} \label{eq:optProblem} \min_{\xi}\sum_{\textbf{u}\in \mathcal{P}} C(\textbf{u},\xi(\textbf{u})) +\\ \sum_{\textbf{u}\in \mathcal{T}}\lambda_m(\textbf{u})(\xi(\textbf{u})-\hat{\xi}(\textbf{u}))^2 +\sum_{\textbf{u}\in \mathcal{P}} \lambda_s(\textbf{u})\mathcal{B}(\textbf{u}) \end{multline} where $\mathcal{B}(\textbf{u})$ is the surface bending energy at $\textbf{u}$ and $\lambda_s(\textbf{u})$ is a spatially varying weight that prevents smoothing across edges. For ease of optimization, we restrict the choice of bending energy to those which can be approximated by finite differences. Ideally, bending energy must also be invariant to in-plane rotation of the camera. One such bending energy has the form \begin{equation}\label{eq:bendingEnergy} \mathcal{B}(\textbf{u}) = \left(\frac{\partial^2 \xi(\textbf{u})}{\partial u^2}\right)^2 + \left(\frac{\partial^2 \xi(\textbf{u})}{\partial v^2}\right)^2 + 2\left(\frac{\partial^2 \xi(\textbf{u})}{\partial u \partial v}\right)^2 \end{equation} Experiments show that dropping the cross term produces similar results but considerably speeds up the optimization procedure. A commonly used substitute, which is also used in \cite{newcombe2011dtam}, is squared norm of the gradient $\|\nabla\xi(\textbf{u})\|^2$. However, this imposes an often misleading bias towards frontal-planar surfaces. The optimization problem in Equation \ref{eq:optProblem} is solved using a two-step iterative procedure, similar to \cite{newcombe2011dtam}, by introducing auxiliary variables $\alpha$ and a coupling term whose role in the optimization is controlled by parameter $\theta$ \begin{multline} \min_{\xi,\alpha}\sum_{\textbf{u}\in \mathcal{P}} \lambda_c C(\textbf{u},\alpha(\textbf{u})) + \frac{1}{2\theta}(\alpha(\textbf{u})-\xi(\textbf{u}))^2 +\\ \sum_{\textbf{u}\in \mathcal{T}}\lambda_m(\textbf{u})(\xi(\textbf{u})-\hat{\xi}(\textbf{u}))^2 +\sum_{\textbf{u}\in \mathcal{P}} \lambda_s(\textbf{u})\mathcal{B}(\textbf{u}) \end{multline} where $\lambda_c$ is a constant that is empirically determined and $\lambda_m(\textbf{u})$ is a spatially varying weight that depends on the reliability of the measurement at $\textbf{u}$. \noindent The first step involves minimizing the data term by point-wise search; while the second step solves for the surface that is consistent with the estimates in the first step, agrees with the measurement, and has low bending energy. \noindent \textbf{Step 1} involves a per-pixel point-wise search over the discrete depth candidates to obtain photo-consistent depth estimates \begin{align}\label{step1} \hat{\alpha}(\textbf{u}) &= \arg\min_{d\in \mathcal{D}} E_{aux}^{(t)}(\textbf{u},d,\xi^{(t-1)}) \end{align} \begin{align} E_{aux}^{(t)}(\textbf{u},d,\xi^{(t-1)}) &= \lambda_c C(\textbf{u},d) + \frac{1}{2\theta^{(t)}}(d-\xi^{(t-1)}(\textbf{u}))^2 \end{align} where $\theta^{(t)}$ is decreased after every iteration to increase the coupling between the discrete auxiliary variables and continuous depth estimates. This step is identical to \cite{newcombe2011dtam} except that our final estimate in the current iteration $\alpha^{(t)}$ is obtained by median filtering the depth image $\hat{\alpha}$ to increase robustness to outliers and then performing a single Newton step using the numerical gradient of $E_{aux}^{(t)}$ \begin{align} \alpha^{(t)}(\textbf{u}) \leftarrow \alpha^{(t)}(\textbf{u}) - \eta \frac{\nabla E_{aux}^{(t)}(\textbf{u},\alpha^{(t)},\xi^{(t-1)})}{\nabla^2 E_{aux}^{(t)}(\textbf{u},\alpha^{(t)},\xi^{(t-1)})} \end{align} where $\eta$ is the learning rate. We use $\eta=0.01$ for our experiments. $\lambda_c=10$ was used for RGBD Scenes dataset and $\lambda_c=1000$ was used for Object-Videos dataset. \noindent \textbf{Step 2} enforces smoothness and consistency with depth measurements while being tied to photo-consistent depth estimates obtained in the previous step. \begin{align} \begin{split} \xi^{(t)} = \arg\min_{\xi}\sum_{\textbf{u}\in \mathcal{T}}\lambda_m(\textbf{u})(\xi(\textbf{u})-\hat{\xi}(\textbf{u}))^2 + \\ \sum_{\textbf{u}\in \mathcal{P}} \frac{\lambda_a(\textbf{u})}{2\theta^{(t)}}(\alpha^{(t)}(\textbf{u})-\xi(\textbf{u}))^2 + \lambda_s^{(t)}(\textbf{u})\mathcal{B}(\textbf{u}) \end{split} \end{align} In contrast to \cite{newcombe2011dtam}, we remove the Huber loss on the smoothness term which turns our optimization problem into linear least squares thereby improving efficiency. We deal with outliers and large depth discontinuities by employing two techniques: 1) median filtering the optimal solution to equation (\ref{step1}); 2) appropriate choice of spatially varying constants $\lambda_m, \lambda_a$ and $\lambda_s$: \begin{enumerate} \item[i.] \textit{\textbf{Measurement weights}}: $\lambda_m(\textbf{u})$ is chosen to be inversely proportional to $\sigma(\textbf{u})$, the inverse-depth variance estimate for each measurement provided by LSD-SLAM. We use $0.1$ as the constant of proportionality. \item[ii.] \textit{\textbf{Smoothness weights}}: Since we remove the Huber loss on smoothness term, we gradually increase $\lambda_s^t(u)$ with every iteration so that by the time the smoothness term dominates, $\xi$ is already very close to the true solution. The weight also depends upon edge strength to make smoothing edge aware. Specifically we use \begin{equation} \lambda_s^{(t)}(\textbf{u}) = \gamma^{t-1} \lambda_s^{(0)}e^{-c_{\text{edge}}\; Edge(\textbf{u})} \end{equation} where $Edge(\textbf{u})$ is the edge strength obtained from Structured Edge Detector ~\cite{dollar2013structured} which was trained to detect object contours in images. For our experiments we used $\lambda_s^{(0)}=0.01$ and $c_{\text{edge}}=5$. $\gamma=1.6$ was used for RGBD Scenes dataset, whereas $\gamma=1.8$ was used for Object-Videos dataset. \item[iii.] \textit{\textbf{Coupling weights}}: Similar to \cite{newcombe2011dtam}, we decrease $\theta$ with every iteration to increase coupling \begin{equation} \theta^{(t)} = (1-\beta t)\theta^{(t-1)} \end{equation} In addition, photometric error based spatially varying weights are used to propagate depth estimates from more \textit{confident} regions to less \textit{confident} ones such as textureless and specular surfaces. \begin{equation} \lambda_a(\textbf{u}) = e^{-c_{\text{conf}}\; \rho(\textbf{u})} \end{equation} where $\rho(\textbf{u})$ is the minimum photometric error stored in the cost volume at pixel $\textbf{u}$ \begin{equation} \rho(\textbf{u}) = \min_{d}C(\textbf{u},d) \end{equation} In our experiments, we use $\theta^{(0)}=1$, $\beta=0.03$, and $c_{\text{conf}}=5$. \end{enumerate} Note that with the exception of $\lambda_c$ and $\gamma$, the same set of parameters generalized to two datasets with very different scales. \subsection{Volumetric Fusion} The depth maps estimated for the key-frames are fused together to get a volumetric reconstruction of the scene represented by an implicit surface function field $S(\textbf{v})$ defined on a voxel grid, $\mathcal{V}$. A desired property of such a function field is that $S(\textbf{v})$ takes a positive value in empty regions and negative value otherwise. The surface mesh can then be extracted as the zero-level set of $S$. Let $S_i(\textbf{v})$ be the Signed Distance Function (SDF) computed over $\mathcal{V}$ due to $i^{th}$ key-frame. Given $K$ key-frames, the actual choice of the functional mapping from $\{S_1(\textbf{v}),\cdots,S_K(\textbf{v})\}$ to $S(\textbf{v})$ is closely related to the choice of the mapping from the $i^{th}$ key-frame's depth map $\xi_i$ to $S_i(\textbf{v})$. Another important requirement from $S(\textbf{v})$ is that its zero-crossing lies on the object's surface. If the depth maps were very accurate, then for any choice of $S_i(\textbf{v})$ which assigns a negative value to voxels behind the depth surface and positive otherwise, $S(\textbf{v})$ can simply be computed as follows \begin{equation} S(\textbf{v}) = \max_{i\in \{1,\cdots,K\}} S_i(\textbf{v}) \end{equation} The surface extracted from $S(\textbf{v})$ will be guaranteed to be accurate up to the resolution of the voxel grid. Sub-voxel accuracy however still depends on the computation of $S_i$. Naturally smooth and more accurate surfaces can be expected if $S_i(\textbf{v})$ is proportional to the distance of $\textbf{v}$ from the closest depth surface. However, since the estimated depth maps often have local errors in regions with textureless surfaces or specularities, the above computations need to be suitably modified for robustness. We propose to decompose volumetric fusion into two parts: i) robust fusion, and ii) zero-crossing or bias correction. The first step produces SDFs that are robust to errors in depth map or camera pose estimation at the cost of incurring a bias or a shift in the zero-crossing. The second step corrects for this bias by applying a smooth deformation field to force the function value close to zero at a set of points known to lie on the object surface. We compare our proposed approach to TSDF~\cite{newcombe2011kinectfusion} in Fig.~\ref{fig:tsdfVSssdf}. Fig.~\ref{fig:deformation} shows the effect and importance of zero-crossing correction. \subsubsection{Robust Fusion} Let $\textbf{q}_i(\textbf{v})$ be the point where the ray from the $i^{th}$ camera center to $\textbf{v}$ intersects the depth surface due to $\xi_i$. $S_i(\textbf{v})$ is simply given by \begin{equation} S_i(\textbf{v}) = \min\left(1, \frac{\|\mathbf{\eta}_i(\textbf{v})\|_2}{\mu}\right) \times \text{sign}\left(\eta_{iz}(\textbf{v})\right) \end{equation} where $\mathbf{\eta}_i(\textbf{v}) = \textbf{T}_i(\textbf{q}_i(\textbf{v})) - \textbf{T}_i(\textbf{v})$ with $\textbf{T}_i$ being the transformation from world coordinates to camera coordinates. Here $\mu$ is a constant used to clip the SDF value further away from the surface. The SDFs from all key-frames are fused using a soft maximum operation defined as follows \begin{equation} S'(\textbf{v}) = \frac{\sum_{i=1}^{K}S_i(\textbf{v})e^{h S_i(\textbf{v})}}{\sum_{i=1}^{K}e^{h S_i(\textbf{v})}} \end{equation} where $h$ is a hardness constant. We use $h=10$ for all our experiments. Soft maximum produces level surfaces that are naturally smooth and trades the property of preserving the zero-crossings for robustness to errors in depth and camera parameter estimates. Note that this is in contrast to \cite{newcombe2011kinectfusion} where $S_i$ were truncated to zero beyond a depth of $\mu$ behind the depth surface in order to preserve zero-crossing as it relied on a weighted averaging of $S_i$s. Views in which a voxel was more directly in the line of sight were given a higher weight while fusing the SDFs. Such a weighing is implicit in our soft-max formulation since voxels tend to have higher $S_i(\textbf{v})$ in views where it is directly in the line of sight. \begin{figure} [t] \begin{center} \includegraphics[width=0.9\linewidth]{tsdf_vs_ssdf.png} \end{center} \vspace{-0.1in} \caption{Comparison of TSDF with the proposed robust fusion scheme involving deformation of Softmax SDF. The proposed SDF is more robust to errors in depth estimation and produces smoother more accurate surfaces.} \vspace{-0.1in} \label{fig:tsdfVSssdf} \end{figure} \subsubsection{Zero-crossing Correction} \begin{figure} [t] \begin{center} \includegraphics[width=0.9\linewidth]{deformation_notrans.png} \end{center} \vspace{-0.1in} \caption{Visualization of the zero-level set of the fused SDF before and after deformation. Notice how the zero-crossing correction recovered the thin structures like the lever arm of the paper punch and horns of the dragon} \vspace{-0.1in} \label{fig:deformation} \end{figure} To correct for the bias in $S'$, we use a sparse set of 3D surface points, $\mathcal{M}$ generated by PMVS \cite{furukawa2010accurate}. We pose this problem as that of finding a deformation field $\Delta S(\textbf{v})$ such that \begin{equation} S(\textbf{p}) = S'(\textbf{p}) + \Delta S(\textbf{p}) = 0 \: \forall \: \textbf{p} \in \mathcal{M} \end{equation} We choose to parametrize $\Delta S$ by a radial basis expansion \begin{equation} \Delta S(\textbf{v}) = \sum_{j=1}^{C} a_j \phi(\|\textbf{v} - \textbf{c}_j\|_2) \end{equation} where $\textbf{c}_j$ is a set of control points, $\textbf{a}$ denotes the coefficients of expansion, and $\phi$ is any radial basis kernel. For our experiments, we use $\phi(x) = e^{-x^2/\sigma^2}$ with $\sigma=0.1$. For a voxel grid of maximum grid dimension $200$, we use $C=4000$ randomly sampled control points out of which half are sampled in the region $\{\textbf{v}\in \mathcal{V} | -0.5 < S'(\textbf{v}) < 0.5\}$ and the other half outside this region. The coefficients are obtained by minimizing the following least squares objective function \begin{multline} \sum_{\textbf{p}\in \mathcal{M}'_1} \left( S'(\textbf{p}) + \sum_{j=1}^{C}a_j\phi(\|\textbf{p} - \textbf{c}_j\|_2) \right)^2 + \\ \sum_{\textbf{p}\in \mathcal{M}'_2} \left( \sum_{j=1}^{C}a_j\phi(\|\textbf{p} - \textbf{c}_j\|_2) \right)^2 + \lambda\frac{\|\textbf{a}\|^2}{2} \end{multline} The first term enforces $S(\textbf{p})=0$ for $\textbf{p}\in\mathcal{M}'_1$ which contains $500$ points randomly sampled from $\mathcal{M}$. The second term constrains the deformation to be zero at points $\textbf{p}\in \mathcal{M}'_2$ which contains 500 points each sampled from $0.9$ and $-0.9$ level sets of $S'$. The third term is used to regularize the deformation. \subsection{Joint 2D-3D Segmentation} Given a set of key-frame images $\mathcal{I}$, their camera pose estimates $\mathcal{C}$, fused and deformed SDF $S$, and a sparse set of pixel-voxel correspondences, we want to label all 2D image pixels as $\{object,background\}$ and all voxels as $\{object,background,empty\}$. Note that even though the objects are placed on simple planar surfaces, achieving good quality segmentations is challenging because of one or more of the following reasons: (i) specularities; (ii) significant color variations on the object surface; (iii) errors in camera pose estimation; (iv) local errors in depth map estimates, (v) noisy PMVS point cloud; and (vi) error in support surface estimation. Another challenge is the computational complexity that arises as a result of dealing with pixels in all images and a dense voxel grid. To keep computational complexity in check, we label superpixels instead of pixels. About $2000$ superpixels are computed for each image $I_i \in \mathcal{I}$ using SLIC \cite{achanta2012slic}. We denote the label assigned to the $i^{th}$ superpixel and voxel by $s_i$ and $v_i$, and the set of all pixels and voxels by $\mathcal{S}$ and $\mathcal{V}$ respectively . We formulate our objective as a joint 2D-3D segmentation and minimize it using graph cuts with $\alpha$-expansion. The objective function is given by \begin{multline} E(s,v) = \sum_{i=1}^{|\mathcal{S}|}\psi_s(s_i) + \sum_{i=1}^{|\mathcal{V}|}\psi_v(v_i) + \sum_{(i,j)\in \mathcal{E}_{sv}}\psi_{sv}(s_i,s_j) \: + \\ \sum_{(i,j)\in \mathcal{E}_{ss}}\psi_{ss}(s_i,s_j) + \sum_{(i,j)\in \mathcal{E}_{vv}}\psi_{vv}(s_i,s_j) \end{multline} The superpixel unary term $\psi_s$ encodes object color, a scene prior that is informative about background superpixels, and consistency of image segmentations with volumetric reconstruction. The voxel unary term, $\psi_v$, encodes information about the empty regions using the SDF, location of background voxels using the scene prior pertaining to a flat support surface, and consistency of volumetric reconstruction with image segmentations. Super-pixel binary term, $\psi_{ss}$, encodes edge-aware smoothness between labeling of neighboring superpixels. Similarly, voxel binary term $\psi_{vv}$ encodes smoothness in voxel labeling. Finally, superpixel - voxel pairwise term, $\psi_{sv}$, ensures consistency between surface voxels, and superpixels they project to in different views. Indirectly, $\psi_{sv}$ ensures consistent superpixel labeling across views. Next we describe the graph structure, initialization, and each of the unary and pairwise energy terms in detail. \subsubsection{Graph Structure} There is a node in the graph, $\mathcal{G}$, for every superpixel $\textbf{s}_i$ in $\mathcal{S}$ and every voxel $\textbf{v}_i$ in $\mathcal{V}$. We connect the neighboring voxels using a $6$-connected grid. We insert an edge between two superpixels if they both lie in the same image and share a boundary. We would ideally like to connect each superpixel with all voxels that project inside the superpixel, are in direct line of sight in the corresponding view, and lie on the surface of the object. However, this would require knowing the surface voxels and their visibility information. We can compute this information for a sparse set of points using semi-dense depth maps provided by LSD-SLAM. For each image we back-project the LSD-SLAM depth map and hash the points into the voxel grid $\mathcal{V}$. This gives us a sparse set of correspondences between superpixels and voxels. The region to be discretized by the voxel grid (our region of interest or ROI), is set to $median \pm 2$ standard deviations computed from the LSD-SLAM point cloud along each dimension. The resolution of the grid is chosen such that the largest dimension is divided into $200$ voxels. \subsubsection{Initialization} \begin{figure} [t] \begin{center} \includegraphics[width=0.9\linewidth]{trimap_rgb.png} \end{center} \vspace{-0.1in} \caption{Pixel labels for 2D-3D Joint Segmentation are initialized using a trimap obtained from the deformed SDF. Only the labels of the blue colored pixels are optimized by graph cut.} \vspace{-0.1in} \label{fig:trimapInit} \end{figure} We first extract the zero level set of the fused and deformed SDF and fit a plane to the points to identify the flat surface that supports the object. All voxels whose signed distance to the plane (negative denoting behind the plane) is less than a small positive theshold, $\tau$, are set to $background$. All voxels above the surface which contain at least one point from LSD-SLAM point cloud are marked as $object$ and the remaining ones are maked $empty$. We initialize the segmentation with a per-image trimap (see Fig.~\ref{fig:trimapInit}), computed by projecting an over-estimate, $\mathcal{U}$, and an under-estimate, $\mathcal{L}$, of the 3D volume on to each image. $\mathcal{U}$ is obtained by selecting the largest connected component from the set of voxels with $S(\textbf{v}) < 0.5$ and distance to the plane greater than $\tau$. We project $\mathcal{U}$ on to each image $I_i$ to get segmentation masks. Super-pixels that have more than $90\%$ pixels in the background region of the segmentation mask are permanently set to $background$. Next we create a set of voxels $\mathcal{L}=\{\textbf{v}\in \mathcal{U}|S(\textbf{v}) < -0.5\}$. $\mathcal{L}$ is projected on to each image plane to get segmentation masks and each superpixel with more than $90\%$ pixels in the foreground is permanently marked $object$. The remaining superpixels are randomly initialized. Note that only the superpixels that lie in this narrow band around the object silhouette are being solved for by graph cuts. A good initialization must include as few voxels on or below the plane in $\mathcal{U}$ as possible. For this $\tau$ is set to $0.05$ times the mean of the standard deviations along each dimension of the points used to fit the plane. \subsubsection{Energy Terms} \textbf{Super-Pixel Unary} $\psi_s$ comprises 3 components: $\psi_c$ encodes foreground and background colors; $\psi_{roi}$ ensures that superpixels which correspond to surfaces farther away from the ROI are assigned to background; and iii) $\psi_{sil}$ ensures consistency of silhouettes with volumetric reconstruction. For the color term, separate GMMs are used to model the color distribution of foreground and background in Lab color space across all key-frame images. We learn both GMMs with 10 components and learn a full covariance matrix. $5000$ superpixels are randomly sampled across images from the currently labeled foreground or background regions and from them $50000$ pixels are sampled to learn each GMM model. Next, the posterior probabilities, denoted by $Prob(.)$, are computed for each pixel using the learned GMMs. In order to limit the influence of the color term, the probabilities are scaled and truncated by using the following function \begin{equation} M(x) = \min(5,-log(x)) \end{equation} Let $\mathcal{P}(i)$ denote the set of pixels in the $i^{th}$ superpixel. Then the color based superpixel unary term is given by \begin{equation} \psi_c(s_i) = \frac{1}{|\mathcal{P}(i)|} \sum_{p \in \mathcal{P}(i)} M(\rm P_{gmm}(s_i|Color(p)) \end{equation} To compute $\psi_{roi}$, we back-project pixels using the depth map and count how many lie inside the ROI. Let $f(i)$ denote the fraction of pixels in $\mathcal{P}(i)$ which fall outside the ROI. Then the ROI based term is given by \begin{equation} \psi_{roi}(s_i) = \begin{cases} f(i) & s_i=object \\ 0 & s_i=background \end{cases} \end{equation} For the silhouette based term, the current voxels labeled as object are used to render segmentation masks. Let $sil(i)$ denote the fraction of pixels in $\mathcal{P}(i)$ labeled as foreground. Then silhouette consistency term is given by \begin{equation} \psi_{sil}(s_i) = \begin{cases} 1-sil(i) & s_i=object \\ sil(i) & s_i=background \end{cases} \end{equation} Finally $\psi_s(s_i) = \psi_c(s_i) + \lambda_{roi}\psi_{roi}(s_i) + \lambda_{sil}\psi_{sil}(s_i)$. For our experiments we used $\lambda_{roi} = 10$ and $\lambda_{sil} = 1$. In our experiments, we found that using an average of $\psi_{sil}$ over all past iterations of graph cut leads to more stable solutions. \begin{figure*}[t] \begin{center} \includegraphics[width=1\linewidth]{baseline_compare_3.pdf} \end{center} \vspace{-0.1in} \caption{Comparison of reconstructions produced by our system ``SDF + 2D-3D Voxel'' with other baseline methods on videos in Object-Videos dataset. Our approach incorporates: dense depth maps with an improved cost function and improved signed distance function for fusion; sparse patch-based stereo 3D points (PMVS); and joint 2D-3D segmentation based on color, edge, and depth cues. By using a broad set of techniques, our system avoids many of the errors and artifacts inherent in any individual. Note that our method produces smoother and more detailed reconstructions as compared to the baseline methods while being more robust to errors in PMVS point cloud and depth estimation errors that show their effect in ``PMVS + Poisson'' and ``Deformed SDF''. Also unlike ``Volumetric GC'', our approach is less sensitive to the color model, as evident from the \textit{books} example.} \vspace{-0.1in} \label{fig:baselineCompare} \end{figure*} \textbf{Voxel Unary} $\psi_v$ has 3 components: $\psi_{sdf}$ encodes the information contained in the SDF, $S$; $\psi_{scene}$ encodes our scene prior; and $\psi_{carve}$ ensure that voxel labeling is consistent with superpixel labeling. Note that SDF helps in identifying empty regions ($S(\textbf{v})>0$) but cannot distinguish between object of interest and other background regions, such as those below the support surface or regions further away from the object, since SDF attains a positive value in both cases. This complementary information is provided by the other two components, $\psi_{scene}$ and $\psi_{carve}$. First, for each voxel $\textbf{v}$, a normalized distance to the fitted plane is computed as follows \begin{equation} d_{n}(\textbf{v}) = \frac{1}{1+e^{-d(\textbf{v})/\sigma_{d}}} \end{equation} where $d(\textbf{v})$ denotes the distance of $\textbf{v}$ from the plane and $\sigma_d$ is the standard deviation of the distance of all voxels from the plane. Next, all voxels with $d_n(\textbf{v}) < 0.3$ are permanently set to $background$. All voxels with $S(\textbf{v}) > 0.9$ are permanently set to $empty$. For the remaining voxels, $\textbf{v}$ the $SDF$ based energy term is given by \begin{equation} \psi_{sdf}(v_i) = \begin{cases} S(\textbf{v}) & v_i=object \\ S(\textbf{v}) & v_i=background \\ -S(\textbf{v}) & v_i=empty \end{cases} \end{equation} The scene prior energy term, $\psi_{scene}$, penalizes labeling of voxels above the support surface as background and those below the surface as either $object$ or $empty$. It is defined as \begin{equation} \psi_{scene}(v_i) = \begin{cases} \mathbbm{1}(d_{n}(\textbf{v})<0.5) \; (1-d_{n}(\textbf{v})) & v_i=object \\ \mathbbm{1}(d_{n}(\textbf{v})>0.5) \; d_{n}(\textbf{v}) & v_i=background \\ \mathbbm{1}(d_{n}(\textbf{v})<0.5) \; (1-d_{n}(\textbf{v})) & v_i=empty \end{cases} \end{equation} In order to compute $\psi_{carve}$, we first perform silhouette carving to get a set of voxel $\mathcal{V}_{carve}$ which project on the superpixels labeled $object$ in all key-frame views. Let the complementary set be $\mathcal{V}_{carve}^c = \mathcal{V}\setminus\mathcal{V}_{carve}$. $\psi_{carve}$ is then given by \begin{equation} \psi_{carve}(v_i) = \mathbbm{1}(\textbf{v}_i\in \mathcal{V}_{carve}^c)\mathbbm{1}(v_i=object) \end{equation} The final voxel unary for the variable voxels is given by $\psi_v(v_i)~=~\lambda_{sdf}\psi_{sdf}(v_i) + \lambda_{scene}\psi_{scene}(v_i) + \lambda_{carve}\psi_{carve}(v_i)$. For all our experiments we have set $\lambda_{sdf}=4$, $\lambda_{scene}=1$, and $\lambda_{carve}~=~1$. Similar to $\psi_{sil}$, we also use the average $\psi_{carve}$ over all past iterations. \textbf{Super-pixel Binary} term $\psi_{ss}$ imposes edge-aware smoothness constraints on the superpixel labeling. For a pair of superpixels with indices $(i,j)$ that share boundary, with the set of boundary pixels denoted by $\mathcal{B}(i,j)$, the superpixel pairwise energy term is given by \begin{equation} \psi_{ss}(s_i,s_j) = \mathbbm{1}(s_i\neq s_j)\exp\left(-2\sum_{\textbf{p}\in \mathcal{B}(i,j)}Edge(\textbf{p})\right) \end{equation} where $Edge(\textbf{p})$ denotes the contour edge strength of pixel $\textbf{p}$ obtained using Structured Edge Detector \cite{dollar2013structured}. \textbf{Voxel Binary} term $\psi_{vv}$ imposes smoothness constraints on the voxels. For a pair of voxels indexed by $(i,j)\in \mathcal{E}_{vv}$, the voxel binary term is defined as $\psi_{vv}(v_i,v_j) = \mathbbm{1}(v_i\neq v_j)$. \textbf{Super-pixel - Voxel Pairwise} term $\psi_{sv}$ ensures that for every superpixel and voxel with an edge between them, with indices $(i,j)\in \mathcal{E}_{sv}$, superpixel and voxel labels are consistent with each other. Note that $\mathcal{E}_{sv}$ only connects surface voxels with superpixels. The surface voxels can never be $empty$ hence both $s_i$ and $v_j$ lie in $\{object,background\}$. Given this restriction on the labels $\psi_{sv}(s_i,v_j) = \mathbbm{1}(v_i\neq v_j)$. \subsubsection{Details of $\alpha$-expansion} We run $5$ iterations of optimization with $3$ $\alpha$-expansion steps per iteration or until the sum of the number of label swaps for all expansion moves in an iteration falls below $6000$, whichever comes first. To make the set of labels the same for pixels and voxels, we assign a very high cost to $empty$ for any superpixel. The color models are updated in each iteration using the current superpixel labeling hence $\psi_c$ needs to be recomputed in each iteration. Besides this only $\psi_{sil}$ and $\psi_{carve}$ are updated in each iteration since they depend on the current voxel map and segmentation masks. \subsection{Post-processing} \label{sec:postProcess} As an important post-processing step, we select the largest connected component from the voxels labeled as $object$. While this could be used to generate a surface mesh of the object directly, we found that qualitatively better results are obtained by using it as a mask to set $S(\textbf{v})$ to $1$ for all $\textbf{v}$ such that $v\neq object$, extract its zero-level set, and perform mesh smoothing using \cite{zhang2006vertex}. \section{Experiments} We evaluate our system qualitatively (Fig.~\ref{fig:qualWall} and Fig.~\ref{fig:baselineCompare}) with displays of 3D reconstructed objects from our Object-Videos dataset. We also quantitatively evaluate dense depth map estimation (Fig.~\ref{fig:plot}) with the RGBD Scenes V2 Dataset~\cite{henry2013patch} and segmentation accuracy (Tab.~\ref{tab:fgIOU}) on key frames from the Object-Videos dataset. \subsection{Object Reconstruction} Our Object-Videos dataset consists of 12 videos of 10 objects captured using a commercial mobile phone camera Samsung Galaxy S4. Many of the objects have complex shapes, low-texture surfaces, and specular materials. Thus, while many graphics and vision papers use carefully designed experimental setups and/or objects with smooth Lambertian surfaces that satisfy model assumptions, we attempt to reconstruct common objects filmed with a typical camera in a casual process. In Fig.~\ref{fig:baselineCompare}, we show results of our method ``SDF + 2D-3D Voxel'' with comparisons to baseline methods: (i) Poisson surface reconstruction~\cite{kazhdan2006poisson} using PMVS~\cite{furukawa2010accurate} point cloud; (ii) Volumetric graph cut method of ~\cite{vogiatzis2005multi}; and (iii) Zero level set of deformed SDF $S$ after selecting appropriate region using aggressive and conservative thresholds on $S$. \subsection{Dense Depth Estimation} \begin{figure} [t] \begin{center} \includegraphics[width=1\linewidth]{rgbd_scenes_eval_separate.pdf} \end{center} \vspace{-0.1in} \caption{Evaluation of dense depth map computation on RGBD Scenes v2 dataset with - (a) 100, and (b) 1000 measurements. Our algorithm is better at reconstructing nearby depths because of nonlinear discretization used for cost volume construction which leads to finer resolution at smaller depths. The object of interest is typically close to the camera.} \vspace{-0.1in} \label{fig:plot} \end{figure} To evaluate our dense depth map estimation procedure we use the available camera poses to estimate depth maps for five selected key frames of each video in the RGBD Scenes V2 dataset. We compare three different smoothness priors: first order ($\|\nabla\xi(u)\|_2^2$); second order (eq.~\ref{eq:bendingEnergy} without the cross term); and second order rotation invariant bending energy (eq.~\ref{eq:bendingEnergy}). We also evaluate the effect of increasing the number of measurements (known depth points) from 100 to 1000 (see Fig.~\ref{fig:rgbd_qual} for a qualitative comparison on RGBD Scenes V2 dataset). We compare to bilinear interpolation of known depth values as a baseline. For indoor scenes that consist of many planar surfaces, the baseline works quite well, but it provides poor estimates for objects that have curved surfaces. Fig.~\ref{fig:depthNormal} shows the qualitative comparison of depth estimation with different smoothness priors on 2 videos from our Object-Videos dataset. In Fig.~\ref{fig:plot}, we plot root mean squared error as a function of ground truth depth. All the variants of our approach beat the baseline for small depths, which is most relevant for our application. For large depths, non-linear discretization used for the cost volume results in high quantization errors, causing the dense depth estimation to underperform the baseline. While inverse depth and log space discretization are common, in our experiments we found that scaling $\{(0.2 + 0.8\times i/l)^5\}_{i=1}^l$ to the expected range of depth values, where $l$ is the number of discrete values, performed best. Among smoothness priors, the rotation invariant second order bending energy performs the best, beating the second order bending energy by a small but noticeable amount. However, the latter may be preferred because it requires less computation. Both the second order energies perform significantly better than the first order energy. Finally, as the number of measurements increase the error reduces, as expected, especially for regions further from the camera. \subsection{Object Segmentation} \begin{table*}[t] \centering \resizebox{\textwidth}{!}{% \begin{tabular}{|c|cccccccccccc|c|c|} \hline & \textbf{dragon} & \textbf{stapler} & \textbf{rubik\_cube} & \textbf{paper\_punch} & \textbf{keyboard} & \textbf{teabox} & \textbf{books} & \textbf{helmet} & \textbf{hedgehog1} & \textbf{hedgehog2} & \textbf{godzilla1} & \textbf{godzilla2} & \textbf{mean} & \textbf{median} \\ \hline \hline \textbf{Fused SDF} & 0.86 & 0.79 & 0.83 & 0.73 & 0.74 & 0.74 & 0.88 & 0.84 & 0.82 & 0.73 & 0.82 & 0.78 & 0.80 & \multicolumn{1}{c|}{0.80} \\ \textbf{Deformed SDF} & 0.87 & 0.82 & 0.85 & 0.81 & 0.76 & 0.54 & 0.81 & 0.79 & 0.63 & 0.80 & 0.58 & 0.82 & 0.76 & \multicolumn{1}{c|}{0.81} \\ \hline \hline \textbf{Volumetric GC} & 0.90 & 0.86 & 0.76 & 0.88 & 0.68 & 0.85 & 0.35 & 0.37 & 0.86 & 0.86 & 0.81 & 0.90 & 0.76 & \multicolumn{1}{c|}{0.85} \\ \textbf{2D GC} & 0.90 & 0.90 & 0.95 & 0.93 & 0.76 & 0.94 & 0.88 & 0.84 & 0.83 & 0.88 & 0.80 & 0.91 & 0.88 & \multicolumn{1}{c|}{0.89} \\ \textbf{2D-3D GC Pixel:} & 0.91 & 0.90 & 0.95 & 0.93 & 0.78 & 0.87 & 0.92 & 0.87 & 0.85 & 0.85 & 0.83 & 0.91 & 0.88 & \multicolumn{1}{c|}{0.88} \\ \textbf{2D-3D GC Voxel} & 0.91 & 0.90 & 0.93 & 0.88 & 0.73 & 0.84 & 0.92 & 0.88 & 0.87 & 0.82 & 0.80 & 0.88 & 0.86 & \multicolumn{1}{c|}{0.88} \\ \textbf{GC Select} & 0.90 & 0.89 & 0.91 & 0.88 & 0.74 & 0.82 & 0.92 & 0.87 & 0.86 & 0.80 & 0.79 & 0.86 & 0.85 & \multicolumn{1}{c|}{0.87} \\ \hline \hline \textbf{SDF + 2D-3D Voxel} & 0.90 & 0.89 & 0.91 & 0.88 & 0.73 & 0.82 & 0.91 & 0.87 & 0.86 & 0.79 & 0.79 & 0.85 & 0.85 & \multicolumn{1}{c|}{0.87} \\ \hline \end{tabular}} \vspace{-0.1in} \caption{Foreground IoU} \vspace{-0.1in} \label{tab:fgIOU} \end{table*} \begin{figure*} [t] \begin{center} \includegraphics[width=0.9\linewidth]{qual_wal_3.png} \end{center} \vspace{-0.1in} \caption{Qualitative reconstruction results for more videos in Object-Videos dataset. Our approach produces naturally smooth surface reconstruction of objects with varying complexity of shapes and material properties.} \vspace{-0.1in} \label{fig:qualWall} \end{figure*} \begin{figure*} [t!] \begin{center} \includegraphics[width=0.9\linewidth]{failure_cases.png} \end{center} \vspace{-0.1in} \caption{Failure cases which are mainly caused due to camera pose estimation errors. Pose errors affect all stages in the pipeline. Incorrect support surface estimation is an issue for flat objects since there is little evidence to distinguish between object and background regions.} \vspace{-0.1in} \label{fig:failCases} \end{figure*} We also compare variants of our algorithm on 2D pixel segmentation. These results give a sense of 3D segmentation and reconstruction quality, but multiple 3D segmentations are consistent with a single 2D segmentation (e.g., the visual hull and the true shape have the same silhouettes) and different kinds of 2D segmentation errors have different impact on 3D reconstruction. In Table~\ref{tab:fgIOU}, we compare segmentation performance, measured by intersection over union (IoU) of ground truth and estimated segmentation masks over annotated keyframes, for several variants of our technique: \begin{itemize} \item[] \textbf{Fused SDF: } Segmentations obtained by backprojecting the largest connected component of interior voxels above the fitted plane from the signed distance function (SDF) created from depth maps. \item[] \textbf{Deformed SDF: } Same as above, but after deforming the SDF so that its surface lies close to PMVS points. \item [] \textbf{Volumetric GC: } Our implementation of volumetric graph cut method of \cite{campbell2010automatic}. \item[] \textbf{2D GC: } Image graph cuts co-segmentation using color terms computed from multiple images but without voxel segmentation, the pixel-voxel constraints, or the $\psi_{sil}$ term. \item[] \textbf{2D-3D GC Pixel: } Pixel segmentations resulting from our joint 2D-3D graph cuts method. \item[] \textbf{2D-3D GC Voxel: } Backprojects segmented voxels using our joint 2D-3D method. \item[] \textbf{SDF + 2D-3D Voxel: } Backprojects the 3D volume obtained by slightly dilating the voxels obtained from 2D-3D segmentation, intersecting with Deformed SDF, and smoothing. This method provides the best qualitative results and is used for reconstruction results. \end{itemize} The SDF deformation yields better results in most cases, but for \textit{teabox}, \textit{books}, \textit{helmet}, \textit{hedgehog1}, and \textit{godzilla1}, the results are much worse due to large errors in camera pose estimation that decreased accuracy of the PMVS point cloud used for deformation. The PMVS results are included in the supplementary video. Our graph cuts methods are robust to these errors, outperforming ``Fused SDF'' and ``Deformed SDF'' by large margins. Our joint 2D-3D segmentation (``2D-3D GC Pixel'') performs equally or better than 2D-only segmentation (``2D GC'') in all but two cases, supporting the value of joint segmentation. The main case in which 2D-only outperforms is \textit{teabox} in which errors in camera pose estimation harm the 2D-3D result. Although backprojecting voxels from the 2D-3D segmentation (``2D-3D GC Voxel'') slightly underperforms the 2D-3D pixel segmentation (partly due to coarser voxel discretization), the voxel-based 3D model is better than that obtained by shape carving from 2D segmentations because shape carving is sensitive to errors in individual images. Our most qualitatively pleasing 3D models are produced by combining meshes from ``Deformed SDF'' and ``2D-3D GC Voxel'', but when backprojected to images, the resulting silhouettes are slightly less accurate than ``2D-3D GC Voxel''. As an alternative to graph cut optimization, we tried Spectral Matting \cite{levin2008spectral} for performing independent image segmentations using the trimap. Spectral Matting first identifies a basis set of matting components where each component is obtained as a linear combination of a Laplacian matrix. Then it uses the trimap initialization to assign each component to foreground or background and constructs an $\alpha$-matte. However, we found that in order to obtain consistent segmentations across views it is necessary to compute eigenvectors of a prohibitively large Laplacian matrix defined over pixels in all key-frames and all voxels. \section{Failure Modes and Limitations} Based on qualitative (see Fig.~\ref{fig:failCases}) and quantitative evaluation, we have identified a set of failure modes for our approach - A major source of error that affects all stages of our system is camera pose estimation. Camera pose estimates directly affect the accuracy of constructed \textit{cost volume} and depth measurements for computing dense depth maps, accuracy of PMVS point cloud, alignment of depth maps during volumetric fusion, deformation of SDF using PMVS point cloud, and superpixel-voxel consistency constraints during joint 2D-3D segmentation. The pose estimation errors are largely due to severe occlusion and breaking of brightness constancy assumption due to textureless and specular surfaces. The videos in Object-Videos dataset are also collected in a casual fashion with blurry frames and large displacement between consecutive frames. Secondly, errors in estimated depth maps due to specular and textureless surfaces adversely affect quality of the fused SDF which is the driving force behind the 2D-3D segmentation mechanism. We have demonstrated some degree of robustness in reconstructing textureless and specular surfaces such as in \textit{stapler}, \textit{paper-punch}, \textit{teabox}, and \textit{helmet}, but explicit removal of specularities would further improve performance. As a byproduct of the above two, incorrect estimation of the support surface is a main source of error while reconstructing flat objects like the \textit{keyboard}. Our approach also has some limitations. Our method was targeted towards reconstruction of small objects for 3D printing or augmented reality applications and hence applies to a scale of objects and scenes which can afford computation with a discrete grid of voxels. We are also limited by computation of the cost volume for depth estimation which grows linearly in the number of discrete depth values used. We limit our selves to planar support surfaces with limited background clutter. Finally, our method cannot recover fine geometric details such as the scale pattern on the \textit{dragon}. Such detail recovery would require shape from shading and material analysis which are still open research problems. \section{Conclusion} In this work, we proposed a system for 3D reconstruction of an object from a video taken with hand-held mobile phone camera. Our three major contributions are: (1) improved objective function for dense depth map computation; 2) robust estimation of an implicit surface using a softmax signed distance function with zero-crossing correction; and (3) a method for joint $2D$-$3D$ segmentation. Through qualitative and quantitative results we demonstrate robustness to textureless surfaces, specularities, and errors in camera pose estimation. Potential directions for future work include extending the proposed approach for category specific reconstruction using data driven priors and recovering high frequency details in the reconstruction through shape-from-shading and material analysis. \section*{Acknowledgements} This research was supported in part by NSF Award 14-21521. We are also thankful to David Forsyth for helpful discussion on linearized bending energy and smoothness priors, and to Jason Rock for suggesting the region of interest based component of superpixel unary. \bibliographystyle{acmsiggraph} \nocite{*}
{'timestamp': '2016-07-29T02:00:55', 'yymm': '1606', 'arxiv_id': '1606.05002', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05002'}
arxiv
\section{Introduction} \label{intro} With the proliferation of the Internet, mobile devices, social media and video cameras, traditional methods of data analytics are facing disruptions. There has been a paradigm shift in data sources from the traditional format of structured data (typically arranged in rows and columns with a well-defined data model) to unstructured data where either the data does not have a pre-defined data model or is not organized in a pre-defined manner. These unstructured data comes in the form of natural language text, speech, images and videos, among others. Most state of the art automated algorithms available today do not meet the expectations of quality when it comes to analysis of these forms and volume of unstructured data.This results in irregularities and ambiguities that make it difficult to derive interpretations using traditional analytics techniques that have been designed to work with data stored in fielded form in databases or annotated (semantically tagged) in documents. The problem is even more accentuated by the volume of data that has to be dealt with, often in gigabytes or petabytes of data per day. Most studies state that today, unstructured information might account for more than $80\%$ of all data. Therefore, there is a growing requirement for human-like analytics with machine-like throughput and predictability. As an illustrative example, a company whose products are sold via millions of small retail outlets might want to gain insights from in-store video data into shopper demographics, brand/product perception and purchase behavior, in order to come up with effective sales and marketing strategies, develop new products, and optimize its supply chain. State of the art automated solutions for automatically spotting event of interests in audio-video streams perform poorly in the presence of poor lighting, clutter and crowd, ambient noise levels, multiple simultaneous conversations, and the use of multiple languages and dialects. As another example, a marketing campaign may like to perform richer qualitative analysis (theme, sentiment and intent analysis) of social media from Twitter and Facebook. Most existing automated solutions for both the above illustrative cases today can not match the quality of analysis by humans. We therefore believe that for problems such as the above, the use of human intelligence via crowdsourcing can significantly analytics solutions. Such an approach is particularly attractive for developing economies given the large pool of human resources and high levels of under-employment. Statistics from the popular crowdsourcing platform Amazon Mechanical Turk (mTurk) reveal that the majority ($46\%$) of workers on mTurk are from developing nations, and for $30\%$ of these workers, mTurk is their main source of income \cite{mturk, ipeirotis}. Our objective is thus to design a next generation hybrid computing platform that will utilize on-demand scalable human intelligence through crowdsourcing to complement scalable machine computation on the cloud. Such a platform would theoretically be able to deliver smarter, richer and more sophisticated analytics on unstructured data. Creating such a platform poses a number of technical and software engineering challenges when we try to provide service level guarantees in terms of budget (payment for on-demand human and machine resources), completion time (humans with required skills are not always available), and accuracy (automated technology is brittle, and humans can be unreliable and error-prone). In this paper, we present a new approach for designing such an hybrid computing platform, analogous to an operating system with machine and human processors, over which a given task workload needs to be intelligently deployed to meet the service level objectives (SLOs). Analogous to the elastic, on-demand machine computing resources enabled by the cloud, the proposed platform with its set of API libraries for i) task definition, execution and monitoring and, ii) \textsl{connector} to existing crowdsourcing and social media platforms would enable scalable, on-demand human processors in a transparent and seamless manner. To the best of our knowledge, ours is the first work that attempts to build a computing platform that transparently uses human and machine computing agents to address the three SLO parameters of accuracy, budget and completion time deadline for solving complex, workflow based tasks. \section{Related Work} \label{related} A crowdsourcing platform acts as an intermediary/broker or marketplace between task \textsl{requesters} and workers for short-term microtask assignments that usually require a low degree of cognitive load and skills. While micro-tasking based crowdsourcing platforms are increasingly seeing substantial use - such as Amazon Mechanical Turk (AMT) \cite{mturk}, CrowdFlower \cite{crowdflower} and MobileWorks \cite{mobileworks} - none of them focus on automated SLO management using a hybrid man-machine computation system. AMT is the largest and most popular paid crowdsourcing platform. But, it does not provide any guarantee on either accuracy or time and the pay per microtask is fixed during \textsl{human intelligence task} (HIT) creation \cite{ipeirotis2010}. Compared to AMT, CrowdFlower provides automatic quality control through the insertion of \textsl{gold data} - data whose answers are known a priori. However, timeliness and budget adjustments are done manually by the job submitter/requester in CrowdFlower. MobileWorks uses a combination of captive workers and local managers on ground to control accuracy and time constraints. CrowdForge \cite{crowdforge} uses general purpose framework for complex, interdependent tasks \textsl{map-reduce} like abstraction to create dynamic partitioning of microtasks among workers - workers decide a task partition and once the submit their answers, their results in turn generate new subtasks for other workers. Crowdforge uses a variety of quality control methods such as voting, verification or merging items and intelligent aggregation of results using both machine algorithms as well as human workers. Clowder \cite{weld2011} and its predecessor TurKontrol \cite{turkontrol, dai2013} use a new approach of decision-theoretic control methodology for iterative workflows (workflows where multiple passes/workers iterate over previous results) wherein each controller runs a \textsl{partially observable markov decision process} (POMDP) \cite{dai2013}. However, due to high-dimensional and continuous state space, solving a POMDP is a notoriously hard problem, thus making these approaches computationally intensive. Turkomatic \cite{kulkarni2011} is another example of iterative workflow based quality control in crowdsourcing. The AutoMan system provides an environment where the job requester can program a confidence level for the overall computation and a budget. The AutoMan runtime system then transparently manages all details necessary for scheduling, pricing, and quality control through automatic scheduling of human tasks for each computation until it achieves the desired confidence level. The runtime system monitors, reprices, and restarts human tasks as necessary with the ability to parallely schedule the same task across multiple human workers to achieve the specified confidence level while staying under budget. The system periodically determines the minimum number of tasks necessary to meet the confidence SLO with remaining budget and spawns more tasks if required (same pay and time-out). However, AutoMan focuses only on human based computation and ignores the use of a heterogeneous computing model using machine and human agents in parallel. In CDAS \cite{liu2012}, an analytics job is first transformed into human jobs and computer jobs, which are then processed by different modules. The human jobs are handled by the crowdsourcing engine. However, CDAS focusses only on accuracy/quality of the results. BudgetFix \cite{thanh2014} aims at crowdsourcing at minimal cost and with predictable accuracy for complex tasks that involve different types of interdependent microtasks structured into complex workflows. BudgetFix determines the number of interdependent micro-tasks and the price to pay for each task given budget constraints. It also provides quality guarantees on the accuracy of the output of each phase of a given workflow. However, it does not consider deadline constraint and focusses only on the budget and accuracy constraints. \section{Preliminaries} \label{prelims} We first present a brief introduction to some of the common crowdsourcing terminology. A \textsl{crowd} refers to a group of workers willing to voluntarily do small duration and simple tasks on a crowdsourcing platform. This group is characterized by being heterogeneous and by the fact that its members do not know each other. An individual who is a member of such a crowd is known as a \textsl{crowdworker} or simply a \textsl{worker}. \textsl{Microtasking} is the process of breaking down a \textsl{task} into smaller, well defined sub-tasks known as \textsl{microtasks}. The following characteristics of a task are usually required for it to qualify as a microtask: \begin{itemize} \item A microtask can be performed independent of other microtasks. \item A microtask requires human participation or intelligence and can be done in a short period of time by a human (typically ranging from a few seconds to minutes of cognitive load). \item A microtask is either not solvable by a machine algorithm or the quality of the machine solution is unsatisfactory for the application for which the microtask was generated or would take significantly longer time than a human. \end{itemize} Examples of microtasks include image tagging and categorization, digitization and validation of text in images, object tagging in images, sentiment analysis of a text snippet, text classification, language translation, event detection in video, keyword spotting in audio, etc. to name a few. \begin{figure} \centering \includegraphics[height=0.8in, width=2.4in]{hit-example.eps} \caption{Example of a paid microtask} \label{figure1} \end{figure} In this paper, we shall use the term \textsl{crowdsourcing} and \textsl{paid crowdsourcing} interchangeably for human based computing. Platforms like the AMT exhibit a list of available tasks - each task being a collection of multiple microtasks (usually tens or hundreds). A task typically includes instructions for the workers, reward per microtask and deadlines. Most tasks have two types of deadlines - one after which the task expires; the second is the time to completion before which a worker must complete her microtask to be considered for payment. Compensation per microtask is generally low, since requesters expect that work can be completed on a time scale ranging from seconds to minutes. Pay per microtask ranges from $\$0.01$ to to several dollars. As an example, on AMT, which is one of the largest paid crowdsourcing platforms, most microtasks or \textsl{human intelligence tasks} (HITs) as they are known on AMT, are priced between $\$0.01$ and $\$0.05$. A typical example of a microtask from \cite{sinha2015} is shown in Figure~\ref{figure1}. We now give a definition of \textsl{workflow} that we will use for the rest of the paper: \begin{definition} \label{definition1} The workflow for a given task is a dependency graph consisting of a sequence of activities, each executed by some computing entity, in order to transform raw data into useful, application specific information. The activities are represented as nodes in the dependency graph, with edges depicting data/execution dependencies/order between the activities. \end{definition} \section{Proposed Platform} \label{approach} Our goal in this paper is to solve complex workflow-based tasks of the following form on a human-machine computing platform: \textsl{Given a task $S$ that can be represented as a dependency graph consisting of nodes representing subtasks that are solvable using a human-machine agent system and the SLO metrics ($A^*$, $B^*$, $T^*$) specified by the task requester, complete $S$ with confidence/accuracy of the results being at least $A^*$, while ensuring that the total money spent is less than $B^*$ and the total time taken is less than $T^*$.} Towards this end, we propose a hybrid computing platform that uses machine computation as well as crowd-intelligence to solve workflow-based complex analytics problems on unstructured data under a fundamental assumption that there exists a feasible solution for the specified SLOs and enough number of human workers are reachable through our platform. The most important components of our proposed platform are outlined below. \begin{figure} \centering \includegraphics[height=2.1in, width=3.4in]{workflow-slo.eps} \caption{Representative workflow description as task dependency graph} \label{figure2} \end{figure} \subsection{Platform Interfaces} The platform will provide three main interface libraries for users to interact with the platform in order to create, manage, execute and monitor tasks: \begin{enumerate} \item \textbf{Crowd Access Layer}: The \textsl{crowd access layer} (CAL) will be used for bringing crowd workers into our platform. The larger and more diverse the crowd, more the chances of scaling computation and meeting the SLO requirements of the tasks executing on our platform. Hence, the platform will not only provide a dedicated crowdsourcing channel for creating a private crowd for a given task, but also have connectors to tap into existing crowdsourcing platforms like the AMT and CrowdCloud. As part of the CAL, the platform will also have APIS that support a subset of the APIs of popular social media platforms (e.g., Facebook, Twitter, Instagram) so that the platform can exploit social media to recruit suitable workers for a given task. \item \textbf{Machine Abstraction Layer}: The \textsl{machine abstraction layer} (MAL) would provide the necessary APIs that would allow platform users to plugin/register their own machine algorithms/software. To make it easy to use the platform, we intend to also provide a set of popular analytics software and APIs to access them, for text and image analytics using a \textsl{software as a service} (SaaS) model. \item \textbf{Task Management Library}: The primary goal of the \textsl{task management library} (TML) would be to expose a \textsl{task-workflow} specification interface for hybrid tasks, whereby a complex, multi-stage task that can be decomposed into subtasks and specified as a \textsl{task-dependency graph} with subtask nodes tagged either as \textsl{machine only} or \textsl{human only} or \textsl{either} and then processed using a workflow engine. The SLOs for individual subtasks and the specific algorithms or crowd to use for a subtask node would also form a part of the task-workflow. Figure~\ref{figure2} shows a representative workflow definition where a task is decomposed into subtasks along with their individual SLOs and execution agent specifications. Once the workflow is submitted to the system, the platform would automatically schedule and manage the execution of the subtasks specified in the dependency graph with the goal of satisfying the specified SLO values. The task management library would also provide APIs that can be used for monitoring the execution progress of a submitted task. \end{enumerate} \subsection{Task Execution Management Engine} The heart of the proposed platform is defined by its ability to provide service level guarantees on accuracy, time and budget while using crowd and cloud computing agents. In order to provide such guarantees while using a combination of human and machine computing agents, a \textsl{task execution management engine} is required that can provide the following two fundamental functionalities: \begin{itemize} \item Intelligently partition work between human and machine computing agents. \item Provide continuous monitoring and management of task execution to guarantee SLOs of accuracy ($A^*$), budget ($B^*$) and deadline ($T^*$). For example, in the event of an exception (defined by time-out, unacceptable results submitted by a computing agents, etc.), reschedule the work to a different agent. \end{itemize} As a first step towards building such a task execution management engine, we consider in this paper only the problem of solving \textsl{data-parallel microtasks}, i.e., similar but independent microtasks with different inputs. Our goal is: \textsl{Given a task set $S$ consisting of $n$ microtasks that are solvable using a human-machine agent system and the SLO metrics ($A^*$, $B^*$, $T^*$) specified by the task requester, complete $S$ with confidence/accuracy of the results being at least $A^*$, while ensuring that the total money spent is within budget $B^*$ and the total time taken is less than $T^*$.} A task $\mathcal{S}$ consists of $n$ independent, homogeneous microtasks each of which can be executed in parallel using either human or machine computing agents. An example would be a \textsl{sentiment analysis} task on a set of independent tweets - analyzing the sentiment of each tweet would then constitute a microtask and each tweet can be analyzed by either a human or a sentiment analysis algorithm. The $n$ microtasks are to be executed on a payment-based task execution platform. The task execution management engine uses the \textsl{crowd access layer} (CAL) or the \textsl{machine abstraction layer} (MAL) APIs to access the different types of crowd workers as well as machine algorithms for microtask execution. We assume the total allocated time interval $T^*$ (for finishing the task set $S$) to be divided into $K$ polling intervals with the polling instances being $t_0$, $t_1$, $t_2$, $\ldots$, $t_{K-1} = T^*$. We denote by $n_H(t)$ the number of microtasks assigned to humans at time instance $t$. $n_M(t) = n - n_H(t)$ is the number of microtasks assigned to machine agents at time instance $t$. Since, humans are unpredictable \cite{ipeirotis} and there is no ground truth to establish the correctness of an answer, we assume that every microtask that is assigned for human agent based execution on a crowdsourcing platform is replicated $w$ times, i.e., every human-assigned microtask is done in parallel by $w$ humans. We denote a replicated human assignment of a microtask by $w$-task. A similar assumption for replicated assignments per machine assigned tasks can be made if required, where each of the assignments is executed using a different machine algorithm. A $w$-task is said to be in \textsl{picked} state if it has been assigned to an agent but has either not been completed or the $w$-task completion deadline has not elapsed. \textsl{done} indicates a picked $w$-task that has been returned to the system by an agent. Note that a $w$-task in \textsl{done} state does not necessarily imply that the submitted answer is correct. The correctness of a submitted answer is determined only after the microtask \textsl{result evaluation phase} in which the answers for all the done $w$-tasks are considered for correctness. A separate \textsl{result evaluation module} within the \textsl{task execution management engine} would be responsible for aggregating the results of individual $w$-tasks and arriving at a consolidated accuracy/confidence level for the microtasks completed at any given point in time. At present, we are using a simple \textsl{majority voting scheme} for result aggregation - the answer choice of the majority workers is taken as the correct answer. For microtasks that can be scheduled to run in parallel over either machine or human computing agents, we define an internal metric called $HM$-Ratio ($\lambda$) and distribute the microtasks workload such that the number of human tasks is $\lambda$ times that of machine tasks. The rational being that while humans can produce more accurate results for the type of tasks that we are interested in, they are also slower and more expensive as computational agents. Hence, the $\lambda$ parameter can be used to manage the accuracy SLO goal while keeping the total cost under the budget $B^*$. Unfortunately, as humans are unpredictable, there is a need for continuous feedback and control of the execution. Therefore, for dynamic control of the SLO, we have defined a second probe called the \textsl{Microtask Completion Rate} ($\rho$), which reflects the rate of completion ($\rho$) of microtasks by humans and machines. At regular polling intervals, a risk estimate of meeting $A^*$ or $T^*$ is made based on the current value of $\rho$ and appropriate corrective actions are taken subject to the budget constraint of $B^*$. Examples of such corrective actions are: changing $\lambda$ to re-allocated more microtasks to machine agents, or to more workers, or to workers with higher capability, or increasing the incentive per microtask so as to attract/employ agents with better quality/speed. These concepts have been further refined in \cite{sinha2015} and an early prototype has been built and validated through simulation with actual performance data generated from anonymous crowd workers on Amazon Mechanical Turk Machine and Hewlett Packard's Autonomy IDOL. \section{Results} We carried out multiple experiments using AMT to assign tasks to the crowd, and Hewlett-Packard's Autonomy IDOL \cite{autonomy} for automated analysis. For evaluation purpose, we used a set of 1000 tweets, each of which was to be categorized into six intent categories and subcategories. We experimented with three types of crowd workers - i) known, expert workers consisting of team members, ii) anonymous workers from the public crowd on AMT and, (iii) anonymous workers on AMT who had passed a short training before being allowed to work on our microtasks. A \textsl{majority voting scheme} was used for result aggregation for all worker types. For expert workers, we used 3 assignments per microtask. The 3000 microtasks were completed by the expert workers over 21 days, with $91.8\%$ of the 1000 tweets achieving majority consensus. For experiment on AMT, we used a subset of 250 randomly selected tweets from the 100 tweets dataset. Untrained workers on AMT - with both 3 and 5 assignments per tweet - categorized these 250 tweets within a day. We paid each worker $0.02$ for successfully completing a microtask assignment. In the absence of gold data, the majority voting scheme on the labeled data from the expert crowd was used to determine the correct answer for each tweet. An analysis of the results showed that for AMT crowd with 3 workers per tweet, the accuracy was only $57.2\%$ and with 5 workers per tweet it was $78\%$. For the same dataset of 250 tweets, the qualified workers generated an accuracy of $80.4\%$ but took 7 days, with 3 assignments per microtask. The performance of each type of crowd on the three SLO parameters is depicted in Figure~\ref{figure3}. \begin{figure} \centering \includegraphics[height=2.7in, width=3.6in]{arrival-graph.eps} \caption{Worker arrival pattern on AMT} \label{figure4} \end{figure} The results from the expert crowd were also used for training the multi-class classifier of Autonomy IDOL, which in turn was used to categorize the 250 tweets given to the AMT crowd. The corresponding accuracy for Autonomy IDOL was only $67.2\%$. We also studied the arrival pattern of the workers on AMT to pick up our microtasks. Figure~\ref{figure4} shows the distribution of the arrival pattern of the AMT workers. It is clear from the plot that the arrival pattern of workers on AMT follows a Poisson distribution and the best fit curve had a mean arrival rate of $0.039084$. \begin{figure*} \centering \includegraphics[height=2.7in, width=4.5in]{worker-data2.eps} \caption{Performance comparison of different worker classes} \label{figure3} \end{figure*} \section{Conclusion} \label{conclusion} In this paper, we have proposed a new human-machine hybrid computational platform that will allow the transparent and seamless use of machine algorithms and crowdsourcing channels to solve complex, workflow-based analytics tasks on unstructured data while ensuring that the specified service level objectives of accuracy, budget and timeliness are taken into account in the task execution plan. Our initial experiments on performance data collected for anonymous crowd workers on Amazon Mechanical Turk, expert workers and machine algorithms for text analytics provide indications that such a platform would indeed be feasible and provide significant benefits for SLO driven analytics on unstructured data. We do acknowledge that more extensive experiments and development is needed to establish the complete effectiveness of our proposed platform and further work on developing a task execution management system have shown encouraging results \cite{sinha2015}. To the best of our knowledge, ours is the first work that attempts to simultaneously attempt to build a hybrid computing platform to address the three SLO parameters of accuracy, budget and deadline for data-parallel microtasks.
{'timestamp': '2016-06-16T02:13:34', 'yymm': '1606', 'arxiv_id': '1606.04929', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04929'}
arxiv
\section*{Abstract} Grid cells, discovered more than a decade ago \cite{Haft}, are neurons in the brain of mammals that fire when the animal is located near certain specific points in its familiar terrain. Intriguingly, these points form, for a single cell, a two-dimensional triangular grid, not unlike our Figure 3. Grid cells are widely believed to be involved in path integration, that is, the maintenance of a location state through the summation of small displacements. We provide theoretical evidence for this assertion by showing that cells with grid-like tuning curves are indeed well adapted for the path integration task. In particular we prove that, in one dimension under Gaussian noise, the sensitivity of measuring small displacements is maximized by a population of neurons whose tuning curves are near-sinusoids --- that is to say, with peaks forming a one-dimensional grid. We also show that effective computation of the displacement is possible through a second population of cells whose sinusoid tuning curves are in phase difference from the first. In two dimensions, under additional assumptions it can be shown that measurement sensitivity is optimized by the product of two sinusoids, again yielding a grid-like pattern. We discuss the connection of our results to the triangular grid pattern observed in animals. \section{Introduction} Grid cells \cite{Haft} are neurons in the dorsocodal medial entorhinal cortex of mammals that fire when the animal is near specific locations in its familiar environment; intriguingly, these locations form, for a single cell, a two-dimensional regular triangular grid \cite{Haft}. Ever since their discovery, grid cells have been hypothesized to be involved in space representation \cite{Haft,GMM}, and in particular in neural algorithms {\em ``that integrate information about place, distance, and direction''} \cite{Haft}, a task usually referred to as {\em path integration} \cite{Haft,Mcnau}. But why are neurons with grid-like tuning curves well adapted for the task of path integration? This is the question we address in this paper. Path integration presumably entails the measurement of small displacements. Therefore, for path integration to be effective, measurement of small displacements has to be as accurate as possible. What is the tuning curve, for neurons measuring small displacements, that has the highest possible sensitivity, that is, the smallest possible variance? We show that, in one dimension, optimal measurement sensitivity is achieved through a one-dimensional grid. In particular, we consider a population of neurons measuring small displacements on the circle. Working on the circle instead of the line segment, or the infinite line, simplifies the analysis by avoiding edge effects. We assume that the tuning curves of these neurons are cyclical shifts of one another, and that the noise of the measurement is Gaussian. We seek the tuning curve maximizing the accuracy of the measurement. A useful surrogate of accuracy is the {\em Fisher information} \cite{Kay}, which upper-bounds the accuracy of any estimator. We establish that the tuning curve maximizing Fisher information is a sinusoidal-like wave (see Figure 1) --- that is to say, a tuning curve whose peaks form a grid. The frequency of the wave is that of the eigenvector corresponding to the smallest positive eigenvalue of the noise correlation matrix. We say ``sinusoidal-like'' because, mathematically, the optimal solutions form a family of near-sinusoidal functions parametrized by any function $\psi:[0,1]\mapsto [0,1]$, with the common sinusoid corresponding to the identity function (notice the differences between the sinusoid-like waves in Figure 2). \begin{figure} \centering \includegraphics[width=0.3\linewidth]{polar_coordinates.jpg} \caption{The optimum tuning curve} \end{figure} But how can the displacement be read out from the change in spiking rates in such a population? We notice that the actual displacement can be computed with the help of a second cell population which is identical to the first, albeit with tuning curves phase-shifted by $90^{\rm o}$. This last observation about the computation of displacement is relevant when exploring how our analysis can be extended to two dimensions. Again, in order to avoid edge effects we are working on the torus (the unit square with its opposite sides identified). Under quite hefty assumptions (of independence of both correlation and tuning curves, as well as of independent optimization of sensitivity in each direction) it can be shown that the optimum tuning curve in two dimensions is indeed a grid. We speculate that the triangular grid may be the result of optimization of measurement sensitivity under an additional constraint, and that constraint may be computational: In two dimensions, the problem of inferring the displacement from tuning curve change requires not one additional phase-shifted population of cells, but {\em three} such populations. The interface of the four phase-shifted populations is best achieved through a triangular grid (Figure 3). \paragraph{Related work:} Over the past decade, there has been much theoretical investigation of grid cells, their origin, and their role. It has been noted that a grid-like pattern can result from the interference of two, or possibly three, sinusoidal waves \cite{Burg}, while periodic tuning curves on the circle \cite{N} and the torus \cite{Mcnau} can be generated by neural networks (see Figure 3A and B in \cite{GMM}); however, these models were not proposed in the context of optimizing the accuracy of measurement. It has also been shown that continuous attractor models can generate triangular grid-like responses \cite{BF}, while experimental data are consistent with a 2-dimensional response of the population \cite{YBB}. Grid cells were interpreted in \cite{SF} and, in a different way, in \cite{FBB}, as very efficient novel neural codes for encoding position and velocity, and in \cite{MHS} it is shown that in this arena grid cells are more apt than place cells; these works are methodologically close to ours in that they also employ Fisher information for their analysis and comparisons --- without, however, seeking the tuning curve design that maximizes it. Cells with one-dimensional grid-like firing patterns have also very recently come up in the analysis of the responses of animal grid cells to one-dimensional environments \cite{F}, characterized as projections (``slices'') of a two-dimensional lattice to the one-dimensional circumstances of the experiment. Finally, recently it was claimed in \cite{M} that the tuning curve in one dimension with maximum Fisher information is a sinusoid curve, while the product of two such curves is optimum in two dimensions, results very similar to ours; unfortunately (as pointed out in Sections 2 and 3) the mathematical development in that manuscript contains significant gaps. \section{The optimal tuning curve is periodic} \label{sec:framework} \label{subsec:framework-outline} Consider a population of $N$ neurons measuring a small angular displacement at a point on the circle. We assume that the tuning curves of the $N$ neurons are identical, albeit shifted by multiples of the angle $2\pi\over N$. We seek the tuning curve that maximizes the sensitivity of measuring small displacements. The neurons respond to an angular stimulus $\theta\in [0,2\pi]$, and the tuning curve of the $i$th neuron is denoted by $f_i(\theta)$; we assume that the tuning curves are identical but shifted by multiples of ${2\pi\over N}$, that is, $f_{i+1\bmod N}(\theta) = f_i(\theta + {2\pi\over n})$. The average population activity caused by a stimulus is thus the vector ${\hbox{\bf}}{f}(\theta)=(f_1(\theta), f_2(\theta),...,f_N(\theta))$. The derivative $d{f}_i\over d\theta$ is denoted $\dot f_i$, and we denote by ${\hbox{\bf}}{\dot f}(\theta)$ the vector $(\dot f_1(\theta), \dot f_2(\theta),...,\dot f_N(\theta))$. A stimulus $\theta$ results in the response $r_i(\theta)=f_i(\theta)+\eta_i$, for $i=1,\ldots,N$, where $\eta_i$ is Gaussian noise. The values of noise at different neurons, $\eta_i$ and $\eta_j$, are correlated, and this correlation is assumed to be independent of $\theta$, and denoted $C_{i,j}$, a quantity that depends on the distance on the ring of the neurons $i$ and $j$. It follows that the noise correlation matrix $C$ is both circulant and symmetric. Importantly, we also assume that the total signal power --- the sum of the squares of the slopes of the tuning curves --- is bounded from above by a constant, which we take to be one. Thus $\dot{{\hbox{\bf}}{f}} (\theta)^T \dot{{\hbox{\bf}}{f}} (\theta)\leq 1$ for all $\theta$. If the stimulus changes from $\theta$ to $\theta + \Delta \theta$, this results in population activity ${\hbox{\bf}}{r}(\theta+\Delta \theta)$. The goal of the decoding system is to estimate $\Delta \theta$ from the change in the population response --- that is, from ${\hbox{\bf}}{r}(\theta) - {\hbox{\bf}}{r}(\theta + \Delta \theta)$. To do this as effectively as possible, the overall variance of the measurement must be as small as possible. Instead of this ``overall variance'', it is convenient in this context to work with the {\em Fisher information} of the population, a function of the tuning curves and the correlation matrix which is known, by the Cramer-Rao theorem \cite{Kay}, to bound from above the accuracy of any any unbiased estimator. We seek the tuning curves $f_i(\theta)$ with the largest {Fisher information} under correlation matrix $C$. Under Gaussian noise, and the assumption that $C$ is nonsingular, it is well known \cite{Kay,YS} that the Fisher information can be written as follows: $${\hbox{\bf}}{I}(\theta) = {{\hbox{\bf}}{\dot f}} (\theta)^{T} {\hbox{\bf}}{C}^{-1} {{\hbox{\bf}}{\dot f}} (\theta)\eqno{(1)}$$ Thus, we seek the vector ${\hbox{\bf}}{\dot f}$ satisfying ${\hbox{\bf}}{\dot f}^T{\hbox{\bf}}{\dot f}\leq 1$ that maximizes the right-hand side of (1). Furthermore, ${\hbox{\bf}}{C^{-1}}$ is also symmetric, and its eigenvalues are the inverses of the eigenvalues of ${\hbox{\bf}}{C}$, while its eigenvectors are the same as those of ${\hbox{\bf}}{C}$. Recall now the Courant-Fischer theorem \cite{Mey} (stated below for the case of real symmetric matrices and the largest eigenvalue only): \begin{theorem} {\bf (Courant-Fischer, 1953)} If $A$ is symmetric, then the vector $x$ in the unit ball $x^Tx\leq 1$ that maximizes $x^TAx$ is the eigenvector corresponding to the largest eigenvalue of $A$. \end{theorem} Comparing with equation (1), we conclude that the optimum tuning curve vector ${\hbox{\bf}}{f}$ has derivative ${\hbox{\bf}}{\dot f}$ equal to the eigenvector corresponding to the {\em smallest} positive eigenvalue of ${\hbox{\bf}}{C}$ (the inverse of the largest eigenvalue of $C^{-1}$). What is this eigenvector? Since ${\hbox{\bf}}{C}$ is circulant and symmetric, it is well known \cite{Mey} that each eigenvalue $\lambda_k$, for $k=0,\ldots, {N\over 2}-1$, has multiplicity two, and the two corresponding eigenvectors are the two sinusoidal waves $v_k$ and $w_k$: $$v_k=[\cos(0),\cos(k\delta),\cos(2k\delta),\ldots, \cos((N-1)k\delta)] \hbox{\rm \ \ and}$$ $$w_{k}=[\sin(0),\sin(k\delta),\sin(2k\delta),\ldots, \sin((N-1)k\delta)],$$ where $\delta={2\pi\over N}$ and $k=0,1,\ldots,{N\over 2}-1$. We conclude that the optimum tuning curve vector has derivative of the form $${\hbox{\bf}}{\dot f}(\theta)=\alpha_k(\theta)v_k + \beta_{k}(\theta)w_{k},$$ where $\alpha_k^2(\theta) + \beta^2_{k}=1$ and the smallest positive eigenvalue of $C$ is $\lambda_k$. We now apply the change of variables \footnote{The otherwise similar argument in \cite{M} does not contain this step, and as a result it is incomplete and the full spectrum of optimal solutions (see Figure 2) is missed.} $\alpha_k(\theta) =\sin(\phi(\theta)), \beta_{k}(\theta) =\cos(\phi(\theta))$ to obtain $$\dot{{\hbox{\bf}}{f}}_i(\theta)=\sin(\phi(\theta))\cos(ik\delta)+\cos(\phi(\theta))\sin(ik\delta) =\ \sin(\phi(\theta)+ik\delta).\eqno{(2)}$$ Recall that we are assuming that the tuning curves of the $N$ neurons are identical, albeit shifted by $\delta={2\pi\over N}$; that is, for all $i$ and $\theta$, $f_{i+1}(\theta) = f_i(\theta+\delta)$, and thus $\dot{f}_{i+1}(\theta) = \dot{f}_i(\theta+\delta)$. Substituting into (2) we conclude that $\sin(\phi(\theta)+(i+1)k\delta) = \sin(\phi(\theta+\delta)+ik\delta)$ for all $\theta$, or equivalently $$\phi(\theta+\delta) = \phi(\theta) +k\delta + 2n\pi, \eqno{(3)}$$ for some integer $n$. The simplest solution of (3) is $\phi(\theta)=(k+nN)\theta +c$ for all $\theta$ and for some constant $c$ (which we take zero without loss of generality) and integer $n$. It follows that ${\dot f}_i(\theta)= \sin(K\theta+ik\delta),$ and thus $${f}_i(\theta)= {1\over K}\cos(K\theta+ik\delta)+\left|{1\over K}\right|,\eqno{(4)}$$ where $K=k+nN$ for some integer $n$ (positive, zero, or negative), and we took the constant of the integration to be $|{1\over K}|$ so the tuning curve takes only positive values. However, (3) has many more solutions. Let $\psi(\theta)$ be any function mapping $[0,\delta]$ to the reals, and, for any $\theta\in[0,2\pi]$, define $\theta'\in [0,\delta]$ and $\theta''\in \{0,\delta, 2\delta,\ldots 2\pi-\delta\}$ by the equation $\theta = \theta'+\theta''$. Then the function $$\dot f(\theta) = \sin(\psi(\theta')+ \theta'')$$ is also the derivative of an optimal tuning curve. Indicatively, in Figure 2 we show the tuning curves resulting from six simple functions $\psi$, including $\psi(x)=x$ (the true sinusoid). \begin{figure}[ht] \hfil \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=\linewidth]{psi_eq_x_4pi.jpg} \caption{$\psi(x) = x$} \label{fig7:a} \vspace{4ex} \end{subfigure \hfil \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=\linewidth]{psi=10x.jpg} \caption{$\psi(x) = 10x$} \label{fig7:b} \vspace{4ex} \end{subfigure} \hfil \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=\linewidth]{psi_eq_x2_4pi.jpg} \caption{$\psi(x) = \frac{x^2}{\delta}$} \label{fig7:c} \vspace{4ex} \end{subfigure} \hfil \vskip\baselineskip \begin{subfigure}[b]{.25 \linewidth} \centering \includegraphics[width=\linewidth]{psi_eq_1_4pi.jpg} \caption{$\psi(x) = 1$} \label{fig7:d} \end{subfigure \hfill \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=\linewidth]{psi_eq_sqrt_4pi.jpg} \caption{$\psi(x) = \sqrt{x \delta}$} \label{fig7:e} \end{subfigure \hfill \begin{subfigure}[b]{0.25\linewidth} \centering \includegraphics[width=\linewidth]{psi_eq_0_4pi.jpg} \caption{$\psi(x) = 0$} \label{fig7:f} \end{subfigure} \caption{Six optimum tuning curves} \label{fig7} \end{figure} \section{Two Dimensions} In view of the one-dimensional result, one may suspect that grid-like structures may also be optimal in two dimensions. Intuitively, it is tempting to try and reduce the two-dimensional case to the one-dimensional case just solved, and show that the optimum two-dimensional tuning curve must be the product of two sinusoids, and therefore a grid. Unfortunately, this matter turns out to be quite a bit more complicated. Assume a population of neurons measuring displacements on the torus (the product of two circles, or, equivalently, a square with opposite edges identified in the parallel way), whose tuning curves are shifts of one another along some lattice on the torus defined by the unit vectors along two different directions $x$ and $y$ (not necessarily orthogonal). We make some additional assumptions: \begin{itemize} \item The noise correlations in the $x$ and $y$ directions have the same form and are independent of each other. That is, the correlation tensor decomposes into the product of two identical correlation matrices. \item We further assume that the tuning curve of the neurons can also be decomposed as the product of identical one-dimensional tuning curves in the $x$ and $y$ dimensions. It then follows that the Fisher information in the $x$ dimension has the form $${I_x}(x) = \left[\dot{f_x}(x)^T C^{-1}\dot{f_x}(x)\right]\cdot \left[(f_y(y)^T C^{-1} f_y(y))\right],\eqno{(5)}$$ and similarly for the $y$ direction. \item Identifying the optimum tuning curve, even under these assumptions, is still ill-defined, because of the possibly unbounded second factor in (5): $f_y$ must be obtained by integrating $\dot{f_y}$, a step that introduces an unbounded integration constant. We could of course impose an upper bound on $f_y$ --- a justified assumption since neurons cannot fire at arbitrarily high rates, --- but then the optimization problem becomes an intractable one, involving integral inequality constraints\footnote{This difficulty is ignored in \cite{M}.}. We can obtain a meaningful solution only under one additional assumption: That the Fisher information in each of the $x$ and $y$ directions is maximized {\em independently of the other direction.} That is, the overall sensitivity is not maximized, and instead the sensitivities along the two directions $x$ and $y$ are maximized separately, yielding an overall suboptimal solution. This is not implausible, if one considers the independent evolution of two separate modules, each measuring displacement in one of the two directions. \end{itemize} Under these assumptions, the result for the one-dimensional case does generalize immediately, and the tuning curve maximizing the Fisher information at all stimuli turns out to be the outer product of near-sinusoidal waves in the $x$ and $y$ directions. If the two directions form an angle of $120^{{\rm o}}$, the familiar triangular grid results. The idea that the triangular firing field structure can result from the interference of two oscillations has been suggested before \cite{Burg}; however, the advantage of this structure was unclear. But why should the two directions $x$ and $y$ be at an angle of $120^{{\rm o}}$ to form the familiar triangular grid observed in \cite{Haft}? One possible answer comes from algorithmic considerations, discussed next. \section{Computing the displacement} Consider a population of cells around the circle as in the previous section with the sinusoid tuning curve $f(\theta)$ in (4) above, measuring (under noise) the change in firing rate $\Delta f = f(\theta)-f(\theta+\Delta\theta)$. What is the mechanism whereby the displacement $\Delta\theta$ is inferred from the measurement of $\Delta f$? This seems problematic, since the value of the stimulus $\theta$ appears to be needed, and keeping track of $\theta$ is the purpose of path integration... But upon closer consideration, we note that the decoding mechanism does not quite need the stimulus $\theta$, but just its cosine. Recall that, as $\Delta\theta$ goes to zero, $\Delta f = \dot f \Delta \theta$, where $f = \sin(K\theta + \hbox{\rm const})$. Hence, $$\Delta\theta = \Delta f{1\over K\cos(K\theta)}.\eqno{(6)}$$ In the one-dimensional case, this additional information can be obtained with a very simple architecture: Suppose that there is a {\em second} population of neurons, with identical tuning curve $g(\theta)$ with the primary population, albeit shifted by an angle $\alpha\neq 0, \pi$; say $\alpha = 90^{{\rm o}}$. Then this new population yields a similar equation, with $\sin$ replacing $\cos$ because of the phase shift: $$\Delta\theta = \Delta g{1\over K\sin(K\theta)}.\eqno{(7)}$$ Thus we have two trigonometric equations for the two unknowns $\Delta\theta$ and $\cos(K\theta)$, which can be easily solved: By dividing (6) by (7) we note that $\tan(\theta)={\Delta g\over \Delta f}$, and hence $$\Delta\theta = \Delta f{1+({\Delta g\over \Delta f})^2\over K}.$$ That is, the displacement measurement can be computed from the two populations. We conclude that, in one dimension, a second identical population of neurons shifted by $90^{{\rm o}}$ suffices for an effective readout. Now in two dimensions, the equivalent of (6) is $$\Delta \theta_x K \cos (K\theta_x) + \Delta \theta_y K \cos (K\theta_y) = \Delta f.$$ Notice that now there are {\em four} unknowns ($\Delta \theta_x$, $\cos (K\theta_x)$, $\Delta \theta_y$, and $\cos (K\theta_y)$). We conclude that {\em three} additional populations of neurons seem to be required, with different two-dimensional shifts from the original one. The most natural way to implement such a scheme is through shifts in three directions, forming equal angles of $120^{{\rm o}}$ with each other (see Figure 3). Hence the familiar triangular grid may be the most natural way to implement this mechanism. Further analytical articulation of this point is the subject of future work. \begin{figure} \centering \begin{tikzpicture}[darkstyle/.style={circle,draw,fill=gray!40,minimum size=20}] \foreach \mbox{\boldmath $x$} in {0,2,4} \foreach \mbox{\boldmath $y$} in {0,4} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$},2*\mbox{\boldmath $y$}) {$A$}; \foreach \mbox{\boldmath $x$} in {1,3,5} \foreach \mbox{\boldmath $y$} in {0,4} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$},2*\mbox{\boldmath $y$}) {$B$}; \foreach \mbox{\boldmath $x$} in {0,2,4} \foreach \mbox{\boldmath $y$} in {2} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$},2*\mbox{\boldmath $y$}) {$B$}; \foreach \mbox{\boldmath $x$} in {1,3,5} \foreach \mbox{\boldmath $y$} in {2} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$},2*\mbox{\boldmath $y$}) {$A$}; \foreach \mbox{\boldmath $x$} in {0,2,4} \foreach \mbox{\boldmath $y$} in {2} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$},2*\mbox{\boldmath $y$}) {$B$}; \foreach \mbox{\boldmath $x$} in {0,2,4} \foreach \mbox{\boldmath $y$} in {1} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$}+1,2*\mbox{\boldmath $y$}) {$D$}; \foreach \mbox{\boldmath $x$} in {1,3} \foreach \mbox{\boldmath $y$} in {1} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$}+1,2*\mbox{\boldmath $y$}) {$C$}; \foreach \mbox{\boldmath $x$} in {0,2,4} \foreach \mbox{\boldmath $y$} in {3} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$}+1,2*\mbox{\boldmath $y$}) {$C$}; \foreach \mbox{\boldmath $x$} in {1,3} \foreach \mbox{\boldmath $y$} in {3} \node [darkstyle] (\mbox{\boldmath $x$}\mbox{\boldmath $y$}) at (2*\mbox{\boldmath $x$}+1,2*\mbox{\boldmath $y$}) {$D$}; \foreach \mbox{\boldmath $x$} in {0,...,4}{ \pgfmathtruncatemacro{\right}{\mbox{\boldmath $x$}+1} \draw[gray,very thin] (\x4)--(\right4);} \foreach \mbox{\boldmath $x$} in {0,...,4} \foreach \mbox{\boldmath $y$} in {0,2}{ \pgfmathtruncatemacro{\right}{\mbox{\boldmath $x$}+1} \pgfmathtruncatemacro{\up}{\mbox{\boldmath $y$}+1} \draw[gray,very thin] (\mbox{\boldmath $x$}\mbox{\boldmath $y$})--(\right\mbox{\boldmath $y$}) (\mbox{\boldmath $x$}\mbox{\boldmath $y$})--(\mbox{\boldmath $x$}\up);} \foreach \mbox{\boldmath $x$} in {0,...,3} \foreach \mbox{\boldmath $y$} in {1,3}{ \pgfmathtruncatemacro{\right}{\mbox{\boldmath $x$}+1} \pgfmathtruncatemacro{\up}{\mbox{\boldmath $y$}+1} \draw[gray,very thin] (\mbox{\boldmath $x$}\mbox{\boldmath $y$})--(\right\mbox{\boldmath $y$}) (\mbox{\boldmath $x$}\mbox{\boldmath $y$})--(\mbox{\boldmath $x$}\up);} \foreach \mbox{\boldmath $x$} in {0,...,4} \foreach \mbox{\boldmath $y$} in {1,3}{ \pgfmathtruncatemacro{\down}{\mbox{\boldmath $y$}-1} \pgfmathtruncatemacro{\up}{\mbox{\boldmath $y$}+1} \pgfmathtruncatemacro{\right}{\mbox{\boldmath $x$}+1} \draw[gray,very thin] (\mbox{\boldmath $x$}\mbox{\boldmath $y$})--(\right\down) (\mbox{\boldmath $x$}\mbox{\boldmath $y$})--(\right\up);} \draw[gray,very thin] (42)--(41) (44)--(43); \end{tikzpicture} \caption{Four interlaced populations of grid cells} \end{figure} \section{Discussion} What is the origin and utility of the grid cells' distinctive firing field, and what does it have to do with path integration? We have shown that, in one dimension, the tuning curve that optimizes the accuracy of displacement measurements is a near-sinusoid wave, whose peaks naturally form a one-dimensional grid. In two dimensions, we needed several further assumptions in order to show that the optimum tuning curve is the product of two sinusoidal waves in two non-parallel directions. If these two directions form an angle of $120^{\hbox{{\small o}}}$, the familiar triangular grid results. We have also presented ideas about a possible mechanism for computing the change in position from the change in the response. For two dimensions, our proposed mechanism predicts the existence of four populations of grid cells with regularly displaced firing fields, and suggests that the triangular architecture may be the optimum solution of the joint problem of maximizing both sensitivity and accuracy of decoding. One may further speculate about grid cells for {\em three dimensions} (relevant for animals such as bats and sea mammals). Here, our analysis predicts a total of {\em six} populations, and these must be interlaced in a way analogous to that in Figure 3. The arrangement in Figure 3 works because the simple triangular lattice of one population, say population A, if copied three times and appropriately shifted, has the property that each point has at least one neighbor from each of the other three populations. This suggests the following technical question in 3-dimensional geometry: Is there a lattice in three dimensions with the property that, if it is duplicated six times, each point of each copy of the lattice is adjacent to at least one point from each of the other five copies? It turns out that the lattice generated by the vectors $(0,3,0), (0,0,2), (1,1,1)$ has this property: Notice that the corresponding matrix has determinant $6$, suggesting that six copies of the lattice can be arranged in space, and it is easy to check that each point of each copy is at distance one from a point from each of the other copies. Therefore, intriguing compromises do exist between the design of a neural architecture for path integration in three dimensions and the realities of three-dimensional geometry. \paragraph{Acknowledgment:} Many thanks to Reza Moazzezi for fruitful collaboration during the early stages of this work, to Umesh Vazirani for illuminating discussions, and to Christos-Alexandros Psomas for help with the figures.
{'timestamp': '2016-06-16T02:12:14', 'yymm': '1606', 'arxiv_id': '1606.04876', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04876'}
arxiv
\section*{Introduction} There exists a corpus of work about the benefits of working in teams, a trend which is gaining importance. In academia, it has been shown that works with highest scientific impact have been produced by teams\cite{Guimera,mukherjeesci}. Team coordination is also prized in sports \cite{fewell, kniffin2010, kniffin2005, wolfe2005} and military \cite{hutch, levi}, where team members coordinate with each other for a common objective of being more successful than the opponent. A recent survey conducted on high-level managers concluded that teams are central to organizational success\cite{martin}. The effect of leadership on team performance has been a topic of interest for a long time. Previous works on leadership have dealt with role of leadership in coaching related activities\cite{manz,wageman} or managing events in context of teams\cite{druskat}. Some works have also focussed on how leadership is shared in teams\cite{carson,hiller,pearce}. However, earlier body of work on effect of leadership on team performance was conducted at the level of survey analysis and narrow set of leadership activities\cite{burke,zaccaro}. One of the major drawback of such studies is that team performances were assessed in a subjective manner in which team leaders rated the performance of their own teams. An earlier work has shown that team leaders tend to over-rate team performance, since a team's performance reflects the ability of the leader \cite{sparrow}. The decisive role of leaders in team's performance has been a long debated topic\cite{smallbusiness, smallbusiness2}. Prior works focussed on the paradigm of leader-centeredness, in which the leadership is viewed as a top-down process between the leader and the followers\cite{yukl}. Recent works have also focussed on the idea of shared leadership or distributed leadership in which other team members emerge as leaders \cite{amehra}. An earlier meta-analysis {of $37$ studies of teams in natural contexts} discus how the network position of team leaders influences team performance\cite{balkundi2006}. {\bf It was observed that teams with stronger interpersonal ties are more successful and teams with leaders who are central in the intra-group networks display better performance \cite{balkundi2006}}. One of the main limitations of the earlier studies is that they are restricted to cross-sectional data, primarily due to the limited availability of longitudinal data. To overcome the limitations of previous works, I employed the treasury of data available in sports \cite{mukherjeecric,Duch,Radicchi, kniffin2014} and objectively investigate the association between leadership structure and team performance in interactive contests. I applied the social network analysis approach to diagnose the role and qualities of a leader effectively. {\bf Leadership involving team activities is a relational construct. Again, social network analysis emphasizes on the relationship of social actors and subsequently elucidates the patterns and theories of such relationships \cite{mayo}. Network analysis has been applied to explore the significance of structure of various relationship in organizations \cite{Krack, Krack2}. Social network approach to leadership demonstrated how would-be leaders perfectly perceives the relationship among team members in various organizations \cite{Balkundi2005}}. Social network analysis provides an understanding of the dynamics of centralized leadership and distributed leadership\cite{amehra,morgeson}. Here, I quantified the extent to which leadership potentials are associated with games won across all teams in the history of cricket. Even though cricket is the second most popular game in the world after soccer, compared to other professional sports it has been relatively understudied by academics, although there is no dearth of match statistics. Cricket is chosen for the following reasons. First, cricket is a game in which an outcome depends a lot on the leadership. Compared with other sports the role of a captain is elevated in cricket. {\bf A cricket captain's direct involvement in the proceedings of a game can be viewed as team-leadership in the corporate world, leadership in politics, social capital \cite{Lin99} or organizational communication tactics \cite{Yamac2009}}. The captain chooses the batting order, sets up fielding positions and shoulders the responsibility of on-field decision-making and is also responsible at all times for ensuring that play is conducted within the Spirit of the Game as well as within the Laws. However, a coach in soccer or manager in baseball takes decisions off the field, which includes player substitution or deciding batting line-up. In cricket, the role of a captain is not restricted to off-the-field decisions but also to deliver winning performance for the team while playing \cite{cricketpsych}. It is to be noted that in cricket, there is no substitution unlike Soccer or Basketball, where a player is substituted by the coach. To quote Sir Don Bradman {\it ``A captain must make every decision before he knows what its effect will be, and he must carry the full responsibility, not whether his decision will be right or wrong, but whether it brings success"} \cite{bradman} . In cricket, the captains are appointed based on their performance and position in the team (often the role is given to batsmen). One of the key role performed by the captain is leading by example \cite{cricketpsych}, a quality that is gaining importance in business domains \cite{smallbusiness, smallbusiness2}. The captain is expected to win the match for his team, commonly referred by fans and commentators as `captain's knock'. Legendary players like Sir Don Bradman, Richie Benaud or Sir Gary Sobers, were great performers and inspired their team through their own performance $-$ example of centralized leadership. Even though in cricket there are always formally appointed captains, the emergence of leaders has been seen in many games. These emergent leaders were responsible for leading their team to victories. While captains like Mike Brearley or Ray Illingworth were not the best players in their side but were known to extract maximum performance from their players. Again, Sir Gary Sobers and Sachin Tendulkar were best players in their sides, they were not successful captains. In an earlier study it was shown that Steve Waugh was the most successful captain in the history of Test cricket ($1877-2010$)\cite{mukherjeeskip}. Again, presence of legendary performers like Adam Gilchrist, Shane Warne, Glenn McGrath and Ricky Ponting in Steve Waugh's Australian team, leads to the well debated topic whether distributed leadership is more successful than centralized leadership. Secondly, in a team game like cricket, one can objectively assess the role of leader-position in the network and team performance. Motivated by the above observations I set to explore the role of leaders in a team game like cricket and the impact of leadership structure on the outcome of a match. \section*{Materials and Methods} \subsection*{Data} I analyzed the data of batting partnership (publicly available in cricinfo website \cite{cricinfo}) in Test cricket between $1877$ and $2013$ and also one day international cricket between $1971$ and $2013$. Cricinfo has recorded the information for all $3420$ one day international matches played between $1971$ and $2013$ and all $1979$ Test matches played between $1877$ and $2013$. For every match I recorded and analyzed the score-cards which contain the information of match outcome, amount of runs scored by a pair of batsmen and run-rate of each team after the game is over. In order to control for team talent, I also collected the information about the International cricket Council (ICC) points awarded to every player each year as well as the batting average of every player (including the captain) in a year. Data are available upon request \footnote{The author will share the data in an online repository post publication of the manuscript}. \subsection*{Network Representation} To articulate the social network analysis approach of studying the pattern of leadership in cricket, I first outline the methodology of identifying the leadership style between two competing teams. Next I discuss the nature of leadership networks and finally discuss the effect of centralized and distributed leadership on the outcome of a game. In cricket two batsmen always bat in partnership, although only one is on strike at any time. The partnership of two batsmen comes to an end when one of them is dismissed or at the end of an innings. Fig~\ref{fig:fig0} demonstrates the formation of batting partnership network. Two opening batsmen $a$ and $b$ start the innings for their team. In network terminology, this can be visualized as a network with two nodes $a$ and $b$, the link representing the partnership between the two players. Weight of the link reflects the amount of runs scored in partnership. Now, if batsman $a$ is dismissed by a bowler, then a new batsman $c$ arrives to form a new partnership with batsman $b$. Thus a new node $c$ gets linked with node $b$. Subsequently one can generate an entire network of batting-partnership till the end of an innings. The innings comes to an end when $10$ players are dismissed or when the duration of play comes to an end\cite{mukherjeebpn}. The score of a team is the sum of all the runs scored during a batting partnership. The outcome of a match depends on the batting partnerships between batsmen. Long lasting partnerships not only add runs on the team\rq{}s score, it may also serve to exhaust the tactics of the fielding team. Again, the concept of partnerships become vital if only one recognized batsman remains. It is therefore important to identify the key players in a team by constructing network of batting partners. Two batsmen are connected if they formed a batting partnership in the match. An undirected and weighted batting partnership network is generated for each team and for every match played through $2013$. I examined two network metrics which captures the position of a captain in the batting partnership network in cricket. A similar approach using network metrics to capture team performance and strategies has been used in basketball \cite{fewell} and soccer \cite{tgrund}. \paragraph{ Centralized leadership and de-centralized leadership} To quantify the centrality of a captain, I evaluated the betweenness centrality of players in the batting partnership network. The betweenness centrality is defined as \begin{equation} C^{w}_{B}(i) = \frac{g^{w}_{jl}(i)}{g^{w}_{jl}} \end{equation} Where $w$ is the weight of the link between two nodes $j$ and $l$, $g_{jl}$ is the number of shortest paths between two nodes and $g_{jl}(i)$ is the number of shortest paths that pass through node $i$ \cite{wasserman, peay}. Betweenness centrality measures the extent to which one batsman is between two other batsmen who are not connected to each other. In other words, betweenness centrality measures how the run scoring by a player during a batting partnership depends on another player. Batsmen with high betweenness centrality are crucial for the team for scoring runs without losing his wicket. These batsmen are important because their dismissal has a huge impact on the structure of the network\cite{pena}. So a single player with a high betweenness centrality is also a weakness, since the entire team is vulnerable to the loss of his wicket. In an ideal case, every captain would seek a combination of players where betweenness scores are uniformly distributed among players. Hence betweenness centrality is a measure of dependence on other team members\cite{pena}. Centralized leadership refers to the post-match situation when captain is the player with highest betweenness centrality, else it is an example of emergent de-centralized leadership. \paragraph{ Distributed leadership} To predict a continuos measure of leadership structure I measure the network de-centralization proposed by Mayo et al \cite{mayo}. The variance of centrality is given by the equation \begin{equation} \omega = \frac{\sum_{i=1}^N (k_{max} - k(i))}{(N-1)(N-2)} \end{equation} Where $N$ is the number of players in the batting partnership network and $\omega$ is the variance of centrality of the network and $k$ is the degree of the node, with $k_{max}$ being the maximum degree. Here degree of a node refers to the number of batting partners of a player. Variance of centrality ($\omega$) captures the aspects of batting performance of players under the leadership of different captains. As mentioned earlier the captain takes the bulk of the decision in forming the batting line-up. A good leader will always allot effective batting positions such that the team is benefited the most. In this sense the $\omega$ highlights the extent to which the leadership is distributed. The index $\omega$ varies from $0$ to $1$. A value of $0$ indicates that the leadership is distributed equally among the individuals and a value of $1$ indicates that the team is centralized around an individual, not necessarily the captain. \paragraph{Normal approximation method of the Binomial confidence interval} The equation for Normal approximation method\cite{seana} to evaluate 95\% Binomial confidence intervals is given as, \begin{equation} CI = p~ \pm~1.96~\sqrt\frac{p(1-p)}{M} \end{equation} Where $p$ is the proportion of interest and $M$ is the number of matches played. For example if out of $M$ matches, $m$ matches results in win under centralized leadership, then the 95\% Binomial confidence intervals fall between $\frac{m}{M} - 1.96~\sqrt\frac{\frac{m}{M}(1-\frac{m}{M})}{M}$ and $\frac{m}{M} + 1.96~\sqrt\frac{\frac{m}{M}(1-\frac{m}{M})}{M}$. \subsection*{ Regression Methods and Control variables} Below I report detailed results for predicting the probability of win using logistic regression analysis. The dependent variable is a binary indicator for win$-$loss. The explanatory variable of interest is an indicator variable of centrality of the captain, as defined above. The control variables are as follows: \paragraph{ Batting average of captain} Batting average of a player is defined as the amount of runs scored divided by the number of times the player is dismissed. Batting average of a captain serves as an indicator of his ability and skills as a batsman irrespective of external factors like match situation or strength of opposition. In the logistic regression analysis, I include a dummy variable which takes the value $1$ if the captain's batting average is higher than the median batting average of the team; $0$ otherwise. \paragraph{ Talent of captain} While the batting average of a player serves as a good metric of a batsman's ability, it is independent of match situations, quality of bowling attacks, or strength of opponents. The ICC player rankings provides a sophisticated ranking of batsmen based on amount of runs scored, quality of opposition, winning performance for the team. Players are rated on a point scale of $0$ to $1000$, more points being granted if the opponent is stronger or the player's performance results in team's win. The ICC points of the captain is an indicator of his batting talent. In the logistic regression analysis, I introduce a dummy variable which takes the value $1$ if the captain's ICC points is higher than the median ICC points of the team; $0$ otherwise. \paragraph{ Fixed effects} The logistic regression includes a full set of team fixed-effects, fixed effects of each year the match was played and fixed effects of batting position of the captain during the match. The logistic regression takes the form, \begin{equation} logit(W_{i}) = \beta_{1}~C(i) + \beta_{2}~S_{b}(i) + \beta_{3}~S_{p}(i) + {\sum_{t=1}^m \gamma_{t}}~Team_{ti} + {\sum_{y} \gamma_{y}}~Year_{yi} + {\sum_{p} \gamma_{p}}~Pos_{pi}\, \end{equation} Where $C(i)$ is an indicator variable for centrality of captain, $W(i)$ is an indicator variable of win-loss by a captain. The indicator variable $S_{b}$ ($S_{p}$) takes a value $1$ if the batting average (ICC points) of the captain is above the median batting average (median ICC points) of the team; $0$ otherwise. The logistic regression includes a full set of fixed effects for each of teams, where the indicator variables $[(Team)]_{ti}$ $\in$ \{0,1\} are equal to $1$ if the match $i$ involves team $t$. I also controlled for fixed effect of the year the match was played - indicator variables $[(Year)]_{yi}$ $\in$ \{0,1\} are equal to $1$ if the match $i$ was played in the year $y$ and {\bf fixed effect of the batting position of the captain - $[(Pos)]_{pi}$ $\in$ \{0,1\} are equal to $1$ if the batting position is $p$ in match $i$}. \subsubsection*{Distributed leadership model} The dependent variable is the difference of run-rates of a team, defined as the ratio of number of runs scored by a team to the total number of overs played by the team $-$ if a team scored $140$ runs in $20$ overs, run-rate is $7$. The explanatory variable is the difference of variance of centrality of two teams. The control variables include difference in batting average of captains as well as difference in team talent of competing teams. Team talent is measured as the coefficient of variation of ICC points of every player in the team. The linear model takes the form, \begin{equation} \delta~r_{12}(i) = A_0 + A_1~\delta~\omega_{12}(i) + A_2~\delta~C^{v}_{12}(i) + A_3~\delta~B^{Avg}_{12}(i) + A_4~{\sum_{g=1}^m \gamma_{g}}~Ground_{gi} + A_5~{\sum_{y} \gamma_{y}}~Year_{yi} \, \end{equation} Where the dependent variable $\delta~r_{12}$ is the difference of run-rate of the two competing teams ($r_{1} - r_{2}$), $\delta~\omega_{12}$ is the difference of degree centralities of the two teams ($\omega_{1} - \omega_{2}$), $\delta~C^{v}_{12}$ is the difference in coefficient of variation of team talent (ICC points) of the teams and $\delta~B^{Avg}_{12}$ is the difference in batting average of the captains leading the two teams. The subscripts $1$ and $2$ indicates the first and second batting innings. The regression includes a full set of fixed effects for each games, where the indicator variables $[(Ground)]_{gi}$ $\in$ ${(0,1)}$ are equal to $1$ if the game $i$ was played in ground $g$. \section*{Results} \paragraph{ Centralized leadership and team performance} I empirically investigated whether team performance is negatively associated with centralized leadership. If the captain emerge as the player with highest betweenness centrality, then the team is under centralized leadership. On the other hand, in many cases, other players may emerge as most central player $-$ an example of emerging de-centralized leadership. In Fig~\ref{fig:fig1} I compared the batting partnership network of two competing teams $-$ {\it England} and {\it Australia} during the first Test match in Ashes $2013/2014$. The Australian captain {\it M.~J.~Clarke} is not the central-most player, whereas for England, captain {\it A.~N.~Cook} emerged as the player with highest betweenness centrality. The first Test match resulted in a defeat for England $-$ an example where centralized leadership is negatively associated with team performance. I analyzed whether {\bf the first Test match in Ashes $2013/2014$ is a special case and whether} leadership structure has any relationship with team performance in cricket matches. For each game the betweenness centrality of captains in the batting partnership network is evaluated. An indicator variable $C_{i}$ is introduced for centrality of captain $i$, which takes a value $1$ if the captain emerges as the player with highest betweenness centrality and $0$ otherwise. In Test cricket, there are three possible outcomes $-$ win, loss or draw. The success or failure of a team is directly related to the success or failure of the team's captain. In order to assess a team's success, I assigned a score of $0$ if the team loses, a score of $1$ if the match is drawn (indecisive) and score of $2$ if team wins the match. In the entire history of Test cricket there has been only two games which resulted in tie. Here I assigned the score of $1$ for tied matches. In one day international cricket there are three possible outcomes $-$ win, loss or tie. As mentioned earlier a score of $0$ was assigned if the team loses, a score of $1$ if the match was tied and score of $2$ if the team won the match. The average of all the scores for each team is an indicator of the performance of the captain. Fig~\ref{fig:fig2} shows that in Test cricket, the leadership structure doesn't have a significant effect on team performance. Interestingly, in one day international cricket a significant advantage is seen for centralized leadership ($p < 0.001$). Team performance can be assessed if the captain is the most central player ($C(i)=1$) or captain is not the most central player ($C(i)=0$) at the end of a game. I hypothesize that the centrality of the captain has a stronger effect on the outcome of a game compared to the batting average and talent of the captain. To assess the robustness of the association between leadership structure and the team performance, the relationship is quantified with a logistic regression of the form $logit(W_{i}) = \beta_{1}~C(i) + \beta_{2}~S_{b}(i) + \beta_{3}~S_{p}(i) + {\sum_{t=1}^m \gamma_{t}}~Team_{ti} + {\sum_{y} \gamma_{y}}~Year_{yi}$ (Materials and Methods). As summarized in Table~\ref{table_regression_1}, I observe that in one day international cricket, the probability of winning depends positively and significantly on centrality $C$ of the captain ($p<1\times 10^{-16}$), negatively depends on the batting average as well as captain's talent. For the latter variable, no significant relationship is observed with the outcome of a match. The odds of winning a one day international match for centralized leadership ($C=1$) over the odds of winning for de-centralized leadership ($C=0$) is $\exp~(0.262)$ $=1.299$. In other words, the odds for centralized leadership is $30$\% higher than the odds for de-centralized leadership. The same logistic analysis reveals that in Test cricket, captain's centrality, captain's batting average, and captain's talent are statistically unrelated to the performance of the team ($p > 0.05$). \paragraph{ Binomial confidence interval} In an alternate approach, I implemented a non-parametric test to evaluate the confidence of the results. I estimated the number of wins when the captain is the player with highest centrality as well as number of wins when the captain is not the player with highest centrality and evaluate the Binomial Confidence Interval (BCI) using the Normal Approximation Method\cite{seana}. In one day international cricket, out of $891$ matches, $459$ resulted in win when the captain is the player with highest centrality, with the $95\%$ BCI falling between $48.2\%$ and $54.8\%$. Considering the one day international matches where the captain is not the player with highest centrality, I observe that the $95\%$ BCI falls between $43.8\%$ and $46.6\%$ ($2293$ wins out of $5067$ matches), strengthening the hypothesis that centralized leadership is more successful than de-centralized leadership. However, in Test cricket I don't observe any significant difference between success under centralized leadership or de-centralized leadership - the $95\%$ BCI falling between $61.5\%$ and $69.8\%$ for centralized leadership ($338$ wins and draws out of $514$ matches) and between $65.6\%$ and $68.7\%$ for de-centralized leadership ($2360$ wins and draws out of $3512$ matches). \paragraph{ Distributed leadership and team performance} So far I described centralized leadership and de-centralized leadership based on the betweenness centrality of the captain in batting partnership network. In emergent de-centralized leadership, a player other than the formally appointed leader emerge as the most central player and takes the responsibility for winning performance for the team. {\bf In such situations, team members other than the captain also score high as well}. There also exists situations where different team members rotate to take leadership responsibilities - an example of distributed leadership, a team level construction \cite{derue2011}. As defined in Equation $2$, I utilized the variance of centrality as an indicator for distributed leadership. Next, I investigated the impact of leadership structure on team performance. The team performance is judged by the run-rate of the team. A higher run-rate indicates a superior performance of the team. In a team game, performance of the team depends on the team talent \cite{swaabr}. As considered earlier, the ICC points for every player in a team serves as a quantifier for overall team talent (Materials and Methods). I collected the ICC points for every player in a team per year and evaluate the coefficient of variation of the ICC points. If I hypothesize that distributed leadership positively affect the outcome of a game, then it would follow that the difference of variance of centrality of two teams is negatively associated with the difference of run-rate of teams. Controlling for the team talent and batting average of the captain, the relationship between difference in team run-rate and difference in variance of centrality is quantified by a linear model mentioned in Equation $5$ (Materials and Methods). The linear model indicates that in one day international cricket team talent ($\delta~C^{v}_{12}$) and captain batting average ($B^{Avg}_{12}$) have no significant explanatory power for $\delta~r_{12}$. Consistent with the conjecture, there exists a positive and significant relationship between $\delta~r_{12}$ and variance of centrality ($\delta~\omega_{12}$) in one day international cricket (Table~\ref{table_regression_2}). Together, they account for about $10\%$ of the observed variance in the data. No significant association was observed between $\delta~r_{12}$ and $\delta~\omega_{12}$ in Test cricket ($p=0.883$), although team talent plays a significant effect on the result ($p<1\times 10^{-16}$). In Test cricket, variance of centrality, team talent and captain batting average account for only $4\%$ of the observed variance in the data. Figure~\ref{fig:fig3} shows the standardized coefficients for one day international and Test cricket and compares the relative effects of the variables $-$ $\delta~\omega_{12}$, $\delta~B^{Avg}_{12}$ and $\delta~C^{v}_{12}$. In one day international matches the relative effect of the difference of variance of centrality is significantly higher than the difference of batting average of captain and difference of coefficient of variation of ICC points of team $-$ a one standard deviation increase in $\delta~\omega_{12}$ yields a $0.269$ standard deviation increase in the predicted difference of team run-rate. In Test cricket, difference in coefficient of variation of ICC points (team talent) has significantly higher effect than leadership structure or difference in batting average of captains of two teams $-$ one standard deviation decrease in $\delta~C^{v}_{12}$ results in $0.097$ standard deviation increase in $\delta~r_{12}$. \section*{Discussion} Contribution of this paper is of practical importance in research involving leadership perception in teams. While effect of leadership on team performance has long been analyzed under the premises of survey analysis, an extensive empirical evidence was lacking. {\bf Contrary to the example discussed in Fig~\ref{fig:fig1}}, at least in the context of Test cricket, my results extensively demonstrates that there is no evidence to suggest distributed leadership as well as de-centralized leadership is associated with better team performance in competitions involving small teams in cricket matches. The magnitude of the coefficients enable us to infer that, in one day international cricket, centralized leadership shows positive effect on team performance, which can be justified by the fact that one day international cricket is more competitive and result oriented than Test cricket, where there are situations where teams attempt to draw a match and the outcome remains indecisive. These findings perhaps indicate that depending on the level of competitiveness, centralized leadership is positively related with team performance. While this positive correlation cannot establish a causal relationship, it nonetheless suggests strongly the positive relation between centralized leadership and team performance. Contrary to my findings, an earlier study on $28$ field-based sales teams which showed that certain types of distributed leadership (distributed-fragmented leadership) are positively related to team performance \cite{amehra}. {\bf My results confirm the earlier findings of link between centralized leadership and greater team performance, as observed in the meta-analysis of study of $37$ teams in natural contexts \cite{balkundi2006}}. Beyond cricket this approach could be extended to serve as template for analyzing other small team collaborations. It would be interesting to conduct similar research on other professional domains like basketball and soccer in which the most central player is identified by the ball passing networks among players. One of the potential limitation of the current work involves the process of captain selection which is an endogenous process. A captain is assigned by a selection committee to maximize the chances of winning. Currently, I am unable to deal with this crucial endogeneity due to lack of available information about the selection process. Nevertheless, these findings leave a lot of potential for future research. For example, one of the key aspects of leadership is experience. It has been shown in earlier works that on average basketball teams with coaches early in their careers benefit relatively more from timeouts than teams with high-experienced coaches\cite{saavmukbag}. Previous research has also shown that in mathematics, mentors early in their careers can have a stronger positive impact on prot\'{e}g\'{e}s than later in their careers \cite{Malmgren}. It remains to be seen if there exists a link between experience and leadership in sports teams, academia or business. While the effect of centralized or distributed leadership in academia or business cannot be demonstrated, preliminary results provide insights into the structure of leadership and performance of cricket teams. It remains an open challenge to extrapolate these findings to domains of scientific and managerial impact. Finally there are few more aspects which deserve closer scrutiny. The relationship between gender diversity and decision making hasn't been explored effectively. While an earlier survey of executives observed that there exists a direct connection between gender diversity and business success\cite{guardian}, the connections between success, leadership structure and gender diversity still remains an unexplored challenge. Performance in academia or sports and leadership abilities depending on gender remains an open idea for further research. Again, teams are prone to conflict between team members. A recent study has empirically attempted to predict future conflict in team-members\cite{nuria}. Leadership will play a critical role in diagnosing and resolving potential conflicts and confrontations among team members. \paragraph{Limitations} This paper is limited to the situation where captains led by example, specifically identifying whether the most central player in the batting partnership network is captain of the team. Batting partnership network provides a visual summary of how the batting is centralized around an individual batsman or distributed around multiple batsmen. Since the captain is responsible in selecting an effective batting order, batting partnership network reflects a limited set of roles performed by the captain. There are various other roles which are performed by the captain $-$ inspiring and motivating the players they lead, communicating effectively with the coach and selectors, remaining positive in match situations and devising strategies accordingly. {\bf The work is also limited by the fact that I have considered static network of batting partnerships, when the innings come to an end. This limitation is due to the available data in Cricinfo. A more robust analysis is possible by considering the dynamic version of the batting partnership network similar to the idea of ``dynamic exchange networks" \cite{Leik92}, in which the players change as players exchange their batting-striking position. Traditionally, $90$\% of the captains have been specialist batsmen. The present study deals with captains who are part of batting partnership network. However, captains like Courtney Walsh of {\it West Indies}, who are not specialist batsmen, would not end up being the most central player solely due to his low batting order and poor batting abilities. Future analysis involves new techniques to analyze the effect of captains who are specialist bowlers}. Also, the work is limited to the structural approach to leadership and doesn't explore concepts like work environment under leadership structure. Whether members in centralized-leadership network experience higher levels of conflict than members of distributed-leadership network is a matter worthy of future investigations. \clearpage \begin{figure}[!ht] \begin{center} \includegraphics[width=6in]{Figure1.eps} \end{center} \caption{{\bf Batting partnership network} The batting pair who start the innings is referred to as an opening-pair. Two opening batsmen $a$ and $b$ start the innings. A weighted link is generated between $a$ and $b$. The weight of the link is proportional to the runs scored by the batting pair ($a$, $b$) ({\bf 1}). Now, if batsman $a$ is dismissed by a bowler, then the partnership between $a$ and $b$ is broken and a new batsman $c$ arrives to form a new partnership with batsman $b$ ({\bf 2}). If $c$ is dismissed then a new batsman $d$ gets linked with batsman $b$ ({\bf 3}). In this way one can generate an entire network of batting-partnership till the end of an innings (${\bf 4}-{\bf 9}$). The nodes and links are blurred if a batsman is dismissed and a partnership is broken.} \label{fig:fig0} \end{figure} \begin{figure}[!ht] \begin{center} \includegraphics[width=6in]{Figure2.eps} \end{center} \caption{{\bf Batting partnership network for Australia and England} Batting partnership network of batsmen playing under the leadership of {\it M. J. Clarke} (Australia) and {\it A. N. Cook} (England). The nodes represent the batsmen and the links denote the batting partnership. Each node is colored according to the betweenness centrality of the node. Thickness of each link if proportional to the runs scored by a batting pair for a given team. The size of each node is proportional to the career batting average of the player. } \label{fig:fig1} \end{figure} \begin{figure}[!ht] \begin{center} \includegraphics[width=6in]{Figure3.eps} \end{center} \caption{{\bf Average performance of teams under centralized and de-centralized leadership} A team is assigned a score of $0$ if the team loses, a score of $1$ if the match is drawn (indecisive) and score of $2$ if team wins the match. The average of all the scores for each team is an indicator of the average performance of the captain. I plot the average points of teams when the captain is the most central player of the team (blue) and when the captain is not the most central player of the team (red). In one day international cricket matches centralized leadership shows significant advantage over distributed leadership. However in Test cricket, no significant difference is observed between centralized leadership and de-centralized leadership. Here, bars represent $95 \%$ confidence intervals obtained by resampling, $^{***}$ denotes $p < 0.001$ and $^{NS}$ denotes not significant. } \label{fig:fig2} \end{figure} \clearpage \begin{table} \caption{{\bf Results for the logit regression used for predicting the effect of centrality of captain on outcome of a match ($W$)}. Coefficients that are statistically significant (p-value $< 0.05$) are marked in bold fonts. *** $p<0.001$, ** $p<0.01$} \centering \begin{tabular}{lc|ccc} &&& \bf{Model}\\ &&&&\\ & & & $\beta$ (SE) & \\ \hline \bf{Model for $W$ in one day } &&\\ \bf{international matches} &&\\ &&&\\ ~~~Centrality of captain &$C$ & \bf{0.251}**(0.072) & \bf{0.262}**(0.085) & \\ &&&\\ ~~~Batting average of captain &$S_{b}$ & & -0.039 (0.068) & \\ &&&\\ ~~~Batting talent of captain &$S_{p}$ & & \bf{0.006}***(0.0004) & \\ &&&\\ {\bf Fixed effects} &&& \\ ~~~Team & & & $Y$ & \\ ~~~Year & & & $Y$ & \\ ~~~Batting position & & & $Y$ & \\ &&&\\ ~~~Prob $>$ Chi-square& & $0.0006$&$<1\times 10^{-16}$ \\ ~~~Number of observations & $5936$ & & \\ &&&\\ \hline \bf{Model for $W$ in } &&\\ \bf{Test matches} &&\\ &&&\\ ~~~Centrality of captain &$C$ & $-0.064 (0.099)$ & $-0.014 (0.114)$ & \\ &&&\\ ~~~Batting average of captain &$S_{b}$ & & $0.719 (0.594)$ & \\ &&&\\ ~~~Batting talent of captain &$S_{p}$ & & \bf{0.005}***(0.0006) & \\ &&&\\ {\bf Fixed effects} &&& \\ ~~~Team & & & $Y$ & \\ ~~~Year & & & $Y$ & \\ ~~~Batting position & & & $Y$ & \\ &&&\\ ~~~Prob $>$ Chi-square& & $0.517$&$<1\times 10^{-16}$\\ ~~~Number of observations & $4026$ & & \\ &&&\\ \hline &&&&\\ \end{tabular} \label{table_regression_1} \end{table} \clearpage \begin{table} \small \centering \caption{{\bf Results for the linear regression used for predicting the effect of difference in variance of centrality on difference of run-rate of competing teams in a match.} Bold font is used to mark the coefficients that are statistically significant (p-value$<0.05$). The variance inflation factor is less than $2$, indicating that severity of multicollinearity affecting the regression is within the tolerance limit. *** $p<0.001$, ** $p<0.01$} \begin{tabular}{lc|ccc} \\ &&& \bf{Model}\\ &&&&\\ & & & $\beta$ (SE) & \\ \hline \bf{Model for $\delta~r_{12}$ in } &&\\ \bf{one day international matches} &&\\ &&&\\ ~~~Difference in variance of centrality &$\omega_{12}$ & \bf{ 1.066}*** (0.073) & \bf{ 1.009}*** (0.084) & \\ ~~~Difference in skipper batting average &$B^{Avg}_{12}$ & & 0.0004 (0.0006) & \\ ~~~Difference in team talent &$C^{v}_{12}$ & & -0.243 (0.231) & \\ &&&\\ {\bf Fixed effects} &&& \\ ~~~Team & & & $Y$ & \\ ~~~Year & & & $Y$ & \\ ~~~Ground & & & $Y$ & \\ &&&\\ ~~~R$^{2}$ &&~ {\bf 0.08} & ~ {\bf 0.106}\\ ~~~Number of matches & $3420$ & & \\ &&&\\ \hline \bf{Model for $\delta~r_{12}$ in Test matches} &&\\ &&&\\ ~~~Difference in variance centrality &$\omega_{12}$ & -0.046 (0.097) & -.015 (0.099) & \\ ~~~Difference in skipper batting average &$B^{Avg}_{12}$ & & \bf{0.002}**(0.001) & \\ ~~~Difference in team talent &$C^{v}_{12}$ & & \bf{ -0.530}**(0.137) & \\ &&&\\ {\bf Fixed effects} &&& \\ ~~~Team & & & $Y$ & \\ ~~~Year & & & $Y$ & \\ ~~~Ground & & & $Y$ & \\ &&&\\ ~~~R$^{2}$ && $0.0002$& ~ {\bf 0.048} \\ ~~~Number of matches & $1979$ & & \\ &&&&\\ \hline &&&&\\ \end{tabular} \label{table_regression_2} \end{table} \clearpage \begin{figure}[!ht] \begin{center} \includegraphics[width=6in]{Figure4.eps} \end{center} \caption{{\bf Relative effect of $\delta~\omega_{12}$, $\delta~C^{v}_{12}$ and $\delta~B^{Avg}_{12}$ terms on difference of team run rates} Figure shows the standardized coefficients with 95\% confidence intervals and compare the relative effects of the variables $\delta~\omega_{12}$, $\delta~C^{v}_{12}$ and $\delta~B^{Avg}_{12}$. Significant variables are marked by (*), where * $p < 0.05$; **** $p < 1\times 10^{-16}$. In one day international cricket, a one standard deviation increase in $\delta~\omega_{12}$ yields a $0.269$ standard deviation increase in the predicted difference of team run-rate. Note that there is no significant relationship between the control variables $\delta~C^{v}_{12}$ and $\delta~B^{Avg}_{12}$ with the difference in team run-rates. In Test cricket, there is no significant relationship between the explanatory variable $\delta~\omega_{12}$ and the dependent variable $\delta~r_{12}$. However, a one standard deviation increase in $\delta~B^{Avg}_{12}$ results in $0.098$ standard deviation increase in $\delta~r_{12}$. There also exists significant association between team talent and the dependent variable $\delta~r_{12}$ $-$ one standard deviation decrease in $\delta~C^{v}_{12}$ results in $0.097$ standard deviation increase in $\delta~r_{12}$.} \label{fig:fig3} \end{figure}
{'timestamp': '2016-06-17T02:12:42', 'yymm': '1606', 'arxiv_id': '1606.05248', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05248'}
arxiv
\section{Introduction} \par The network topology is significant on the performance of the interconnection network, and thus various kinds of topologies have been proposed and analyzed in many areas such as Datacenter network, High Performance Computing (HPC), Peer-to-peer system, Network-on-Chip (NoC), and so on \cite{deBruijn,Jellyfish,analysis,meshstar,3-Dnoc,datacenter,swapandrandom}. In these areas, topologies with small diameter and low average shortest path length (ASPL) are desired. For example, the Hypercube topologies and the de~Bruijn graphs are known to be effective for NoC architectures~\cite{3-Dnoc} and peer-to-peer networks~\cite{deBruijn, analysis}, respectively. Some topologies based on randomness have been proposed and explored in the area of Datacenter network and HPC~\cite{Jellyfish,datacenter,swapandrandom}. \par The problem of finding the maximum graph for given maximum degree and diameter is called the {\em degree/diameter problem}, and has been studied in graph theory \cite{MooreBound}. However, in practice, the order (the number of nodes) is often limited due to several reasons. Hence, for many applications, we are given order and maximum degrees, and try to minimize the diameter and the ASPL\@. This problem is called the {\em order/degree problem}, and has not been studied sufficiently. Recently, the importance of the order/degree problem is pointed out~\cite{opticalforHPC}. Some of the authors of~\cite{opticalforHPC} and their coworkers held a competition called ``Graph Golf'' on the order/degree problem~\cite{GraphGolfWeb}. The stochastic local search (SLS) is a framework of approximation algorithms for general optimization problems. In this paper, we consider the construction of low ASPL graphs of given order and given maximum degrees by using SLS algorithms. In a SLS algorithm, an initial feasible solution is generated (possibly be a random solution). Then, the solution is iteratively replaced by one of its neighborhoods. For our problem, we use a simple local modification procedure called {\em switch} for defining the neighborhoods. In this paper, we assume that SLS algorithms use the {\em evaluation function} which represents a quality of feasible solutions~\cite{SLSbook}. Since huge number of feasible solutions must be evaluated in SLS algorithms in general, efficient evaluation algorithms are strongly desired. However, the ASPL cannot be calculated efficiently at least in our knowledge, and hence is not suitable for the evaluation function. In this paper, we assume that for given $n$ and $d$, the $d$-regular random graph of order $n$ has the diameter 3 with high probability, and propose the evaluation function for graphs of diameter 3 which can be evaluated efficiently. More precisely, first, we derive an equality and bounds for the ASPL of graphs of diameter 3. On the basis of the simplest upper bound of the ASPL, we propose to use $3\triangle+2\Box$ as the evaluation function of SLS algorithms where $\triangle$ and $\Box$ denote the number of triangles and squares in a graph, respectively. The proposed evaluation function can be evaluated in $O(1)$ time as $n$ and $d$ tend to infinity by using some data tables. By using the proposed evaluation function in the iterative first improvement (IFI) and the simulated annealing (SA), we construct low ASPL regular graphs of diameter 3 with 10\,000 nodes, which are the best graphs in the competition Graph Golf. \par The remainder of this paper is organized as follows. In Section~\ref{preliminarysec}, notions and notations used in this paper are introduced. In Section~\ref{theoremsec}, the equality and bounds for the ASPL of graphs of diameter 3 are shown. In Section~\ref{algorithmsec}, we propose the new evaluation function, and show an efficient algorithm for calculating the new evaluation function using data tables. In Section~\ref{experimentsec}, we show results of numerical experiments. Section~\ref{concludesec} concludes this paper. \section{Preliminaries} \label{preliminarysec} \subsection{Notations and definitions} \label{Notations and Definitions} A graph $G$ is a pair of two finite sets $V$ and $E$ where every element of $E$ is a subset of $V$ of size 2. Each element of $V$ is called a {\em node}. Each element of $E$ is called an {\em edge}. Let $e_{ij}:=\{i,j\}$ for $\{i,j\}\in E$. The number $n$ of nodes is called the {\em order of $G$}. For nodes $u,v \in V$, $u$ is said to be {\em connected to $v$} if there is an edge $\{u,v\}\in E$. The {\em degree} $d_v$ of a node $v$ is the number of nodes connected to $v$. A graph is {\em $d$-regular} if the degrees of all the nodes are equal to $d$. \par For two graphs $G=(V,E)$ and $G'=(V',E')$, {\em $G'$ is a subgraph of $G$} if $V' \subseteq V$ and $E' \subseteq E$. If $G'$ is a subgraph of $G$, we say $G$ {\em contains} $G'$. We say {\em $G$ is isomorphic to $G'$} if there is a bijection $f : V \rightarrow V'$ that satisfies the following condition: \[ \forall \{u,v\} \subseteq V,\hspace{2em} \{u,v\} \in E \Longleftrightarrow \{f(u),f(v)\} \in E'. \] For two graphs $G$ and $H$, {\em the number of $H$ in $G$} is the number of subgraphs of $G$ that are isomorphic to $H$. \par For two nodes $s$ and $t$, a {\em $s$-$t$ path} or a {\em path} is a graph $P=(V,E)$ where \begin{align*} V = \{s=v_0,v_1,\ldots,v_\ell=t\}, \qquad E=\bigcup_{k=0}^{\ell-1} \{\{v_k,v_{k+1}\}\} \end{align*} for $v_0,v_1,\ldots,v_\ell$ which are distinct nodes. Here, $\ell$ is called the {\em length} of $s$-$t$ path $P$. If $P=(V,E)$ is a $s$-$t$ path of length $\ell \geq 2$, a graph $C=(V,E\cup\{\{s,t\}\})$ is called a {\em cycle}. The length of the cycle $C$ is $\ell+1$. We call a cycle of length 3 and 4 a {\em triangle} and a {\em square}, respectively. \begin{defi} For $k=0,1,\ldots$ a {\em $k$-multiple triangle} is a graph $\mathrm{Tri}^{(k)}=(V^{(k)},E^{(k)})$ where \begin{align*} V^{(k)} &:= \begin{cases} \{i,j\}, &\hspace{2em} k=0 \\ V^{(k-1)}\cup \{v_k\}, &\hspace{2em} k>0 \end{cases} \\ E^{(k)} &:= \begin{cases} \{\{i,j\}\}, &\hspace{2em} k=0 \\ E^{(k-1)} \cup \{\{i,v_{k}\},\{v_{k},j\}\}, &\hspace{2em} k>0. \end{cases} \end{align*} Such a $k$-multiple triangle is called a {\em $k$-multiple triangle sharing $i,j$} when we specify the two nodes $i$ and $j$. \end{defi} \begin{defi} For $k=0,1,\ldots$ a {\em $k$-multiple square} is a graph $\mathrm{Squ}^{(k)}=(V^{(k)},E^{(k)})$ where \begin{align*} V^{(k)} &:= \begin{cases} \{i,j,v_0\}, &\hspace{2em} k=0 \\ V^{(k-1)}\cup \{v_k\}, &\hspace{2em} k>0 \end{cases} \\ E^{(k)} &:= \begin{cases} \{\{i,v_0\},\{v_0,j\}\}, &\hspace{2em} k=0 \\ E^{(k-1)} \cup \{\{i,v_{k}\},\{v_{k},j\}\}, &\hspace{2em} k>0. \end{cases} \end{align*} Such a $k$-multiple square is called a {$k$-multiple square sharing $i,j$} when we specify the two nodes $i$ and $j$. \end{defi} \begin{figure} \centering \includegraphics[width=7cm]{figures.png} \caption{Some examples of $k$-multiple triangles and $k$-multiple squares.\label{figures}} \end{figure} Fig.~\ref{figures} shows $k$-multiple triangles and $k$-multiple squares sharing $i,j$ for $k=0,1,2$. Note that the $1$-multiple triangle and the $1$-multiple square are equivalent to the triangle and the square, respectively. The number of $k$-multiple triangles and the number of $k$-multiple squares in a graph are denoted by $\triangle^{(k)}$ and $\Box^{(k)}$, respectively. Let $\triangle := \triangle^{(1)}$ and $\Box:=\Box^{(1)}$. \par For a graph $G=(V,E)$ and $s,t \in V$, a $s$-$t$ path whose length is minimum among all $s$-$t$ paths contained in $G$ is called the {\em shortest path between $s$ and $t$}. The length of the shortest path between $s$ and $t$ is called the {\em distance between $s$ and $t$}, denoted by $\mathrm{dist}(s,t)$. If $G$ contains no $s$-$t$ paths, we define $\mathrm{dist}(s, t) = \infty$. The {\em diameter} of $G$ is defined by $\max_{\{i,j\}\subseteq V, i \neq j} \mathrm{dist}(i,j)$. \begin{defi} \label{ASPLdefi} For a graph $G=(V,E)$, {\em the average shortest path length of $G$} is defined by \[ \mathrm{ASPL}(G) := \frac{2}{n(n-1)}\sum_{\{i,j\}\subseteq V,\, i\ne j} \mathrm{dist}(i,j). \] \end{defi} In this paper, we consider the following graph optimization problem: For given $n$ and $d$, \begin{displaymath} \begin{array}{ll} \mbox{{\rm minimize:} } & \mathrm{ASPL}(G) \\ \mbox{{\rm subject to:} }& |V(G)|=n \\ &d_v = d, \hspace{2em} \forall v \in V(G). \\ \end{array} \end{displaymath} Here, $V(G)$ denotes the node set of $G$. Note that the set of feasible solutions of this problem is the set of all $d$-regular graphs of order $n$. \begin{figure} \centering \includegraphics[width=6.25cm]{switching.png} \caption{An image of switch for $e_{ab}$ and $e_{cd}$. \label{switch}} \end{figure} \subsection{Stochastic local search for our problem} \par In this paper, we consider SLS algorithms described below. First, an initial $d$-regular graph $G$ of order $n$ is chosen randomly. Then, $G$ is iteratively replaced by a local modification procedure called {\em switch}. In the switch procedure, a pair of edges $(e_{ab}, e_{cd})$ is chosen and replaced by $(e_{ac}, e_{bd})$ or $(e_{ad}, e_{bc})$ as in Fig.~\ref{switch}. If the new graph $G'$ is not $d$-regular, i.e., at least one of the edges introduced by the switch already exists in $G$, a new pair of edges in $G$ is chosen for the switch until a $d$-regular graph $G'$ is found. Here, the $d$-regular graph $G'$, which can be obtained by a single switch of $G$, is called {\em a neighborhood} of $G$. Once a neighborhood $G'$ is found, $G'$ is evaluated by {\em the evaluation function}. According to the value of the evaluation function on $G'$, it is determined whether or not the current graph $G$ is replaced by $G'$. This updating procedure continues until further improvement is not expected. It is natural to define the evaluation function by the ASPL of $G'$. In order to calculate the ASPL of a $d$-regular graph of order $n$, the distances of all node pairs have to be calculated, which takes $O(n^2d)$ time by using the breadth first search. Since it is not sufficiently efficient, low ASPL graphs cannot be obtained within a reasonable time for large $n$ and $d$. In this paper, we consider an optimization of $d$-regular graphs of diameter 3. The Moore bound implies that any graph of diameter 2 satisfies $n \leq d^2+1$ and any graph of diameter 3 satisfies $n \leq d^3-d^2+d+1$ \cite{MooreBound}. Furthermore, almost all graphs of diameter 2 satisfy $n<d^2$ \cite{MooreBound,erd}. Therefore, if $n\ge d^2$ and $n$ is close to $d^2$, then a random $d$-regular graph of order $n$ is expected to have diameter 3 with high probability. For such $n$ and $d$, if we choose a random $d$-regular graph of order $n$ as the initial graph of a SLS algorithm, the diameter of every graph appearing in the SLS algorithm is empirically 3. By assuming that the diameter of graphs found by the SLS algorithm is always 3, the ASPL can be calculated in $O(d)$ time\footnote{The ASPL of graph of diameter 3 is determined by the adjacency matrix $A$ of the graph and its square $A^2$. Therefore, we can calculate the difference of the ASPLs of $G$ and $G'$ by updating $A$ and $A^2$. The updating requires $O(d)$ time since $O(d)$ elements of $A^2$ change.}, which is still not sufficiently efficient for large $n$. In this paper, we give an upper bound of the ASPL of graphs of diameter 3, and propose SLS algorithms which uses the upper bound as the evaluation function. It will be shown that the upper bound can be calculated in $O(1)$ time. \section{Bounds for the ASPL of graphs of diameter 3}\label{theoremsec} In this section, an equality and bounds for the ASPL of graphs of diameter 3 are shown. They are stated not only for $d$-regular graphs but also for general graphs. \begin{defi} For a graph $G=(V,E)$, let $V_2 := \{\{i,j\}\,:\, i\in V, j\in V, i\ne j\}$. For $\{i,j\} \in V_2$, \[ W_{ij}:=(V \backslash \{i,j\}) \cup \{0\}. \] For $\{i,j\} \in V_2$ and $k \in W_{ij}$, \[ S^{i,j}_k :=\begin{cases} \{\{i,j\} \,:\, \{i,j\}\in E \}, &\hspace{2em} k=0 \\ \{\{i,j\} \,:\, \{i,k\},\{k,j\} \in E \}, &\hspace{2em} k\ne 0. \end{cases} \] For $m=1,2,\ldots,n-1$, \begin{equation}\label{defiT} T(m) := \sum_{\{i,j\} \in V_2} \sum_{\substack{K \subseteq W_{ij}\\ |K|=m}} \left| \bigcap_{k \in K} S^{i,j}_k \right|. \end{equation} \end{defi} Note that $S^{i,j}_k$ is either $\{\{i,j\}\}$ or the empty set. \begin{lem}\label{lemmatwo} For a graph $G=(V,E)$, \[ n_1+n_2 = \sum_{m=1}^{n-1} (-1)^{m-1} T(m). \] where $n_k = \#\{\{i,j\} \in V_2 : \mathrm{dist}(i,j) = k \}$ for $k=1,2$. \end{lem} \begin{IEEEproof} For $\{i, j\}\in V_2$, it holds \[ \{i,j\}\in \bigcup_{k \in W_{ij}} S^{i,j}_k \, \Longleftrightarrow \, \mathrm{dist}(i,j) \leq 2. \] We can obtain the lemma by using the inclusion-exclusion principle. \begin{eqnarray} n_1+n_2 &=& \sum_{\{i,j\} \in V_2} \left| \bigcup_{k\in W_{ij}} S^{i,j}_k \right| \nonumber\\ &=& \sum_{\{i,j\} \in V_2} \sum_{m=1}^{n-1} (-1)^{m-1} \sum_{\substack{K \subseteq W_{ij}\\ |K|=m}} \left| \bigcap_{k \in K} S^{i,j}_k \right| \nonumber\\ &=& \sum_{m=1}^{n-1} (-1)^{m-1}T(m). \label{eq:incexc} \end{eqnarray} \end{IEEEproof} \begin{lem}\label{lemmaone} \begin{equation} T(m) = \begin{cases} \frac{1}{2} \sum_{k \in V} d_k^2, &\hspace{2em} m=1 \\ 3\triangle+2\Box, &\hspace{2em} m=2 \\ \triangle^{(m-1)}+\Box^{(m-1)}, &\hspace{2em} m \geq 3. \end{cases} \end{equation} \end{lem} \begin{IEEEproof} When $m=1$ \begin{eqnarray*} T(1) &=& \sum_{\{i,j\} \in V_2} \left| S^{i,j}_0 \right| + \sum_{\substack{\{i,j\}\in V_2\\k\in W_{ij}\backslash \{0\}}} \left|S^{i,j}_k\right| \\ &=& |E| + \sum_{k \in V} \binom{d_k}{2} = \frac{1}{2} \sum_{k \in V}d_k^2. \end{eqnarray*} Here, we used the fact $|E|=\sum_{k\in V} d_k/2$. Assume $m\ge 2$. For $K\subseteq W_{ij}$ and $|K|=m$, $|\bigcap_{k\in K} S^{i,j}_k|=1$ if \begin{equation} \label{lemmaone1} \{i,j\}\in \bigcap_{k\in K} S^{i,j}_{k} \end{equation} and $|\bigcap_{k\in K} S^{i,j}_k|=0$ otherwise. If $0\in K$,~\eqref{lemmaone1} holds if and only if there is an $(m-1)$-multiple triangle sharing $i,j$ whose node set is $\{i,j\}\cup K\setminus\{0\}$. Similarly, if $0\notin K$, the equality~\eqref{lemmaone1} holds if and only if there is an $(m-1)$-multiple square sharing $i,j$ whose node set is $\{i,j\}\cup K$. \par Assume $m=2$. If there is a triangle consisting of three nodes $i$, $j$ and $k$ and of edge set $\{e_{ij},e_{jk},e_{ki}\}$, it holds \begin{align*} \{i,j\}&\in S^{i,j}_0 \cap S^{i,j}_k,& \{j,k\}&\in S^{j,k}_0 \cap S^{j,k}_i,\\ \{k,i\}&\in S^{k,i}_0 \cap S^{k,i}_j. \end{align*} If there is a square consisting of four nodes $a$, $b$, $c$ and $d$ and of edge set $\{e_{ab},e_{bc},e_{cd},e_{da}\}$, it holds \begin{align*} \{a,c\}&\in S^{a,c}_b \cap S^{a,c}_d,& \{b,d\}&\in S^{b,d}_a \cap S^{b,d}_c. \end{align*} Therefore, \begin{align*} T(2)&= \sum_{\substack{\{i,j\} \in V_2\\k,l\in W_{ij}}} \left|S^{i,j}_k \cap S^{i,j}_l \right| \\ &= \sum_{\substack{\{i,j\} \in V_2\\k\in W_{ij}\backslash \{0\}}} \left|S^{i,j}_0 \cap S^{i,j}_k \right| + \sum_{\substack{\{i,j\} \in V_2\\k,l \in W_{ij} \backslash \{0\}}} \left|S^{i,j}_k \cap S^{i,j}_l \right| \\ &= 3\triangle + 2\Box. \end{align*} \par Assume $m \geq 3$. If there is an $(m-1)$-multiple triangle sharing $i,j$ consisting of nodes $\{i,j\}\cup K$ for some $K\subseteq W_{ij}\setminus \{0\}$, it holds $\{i,j\}\in \bigcap_{k\in K\cup \{0\}} S^{i,j}_k$ and $\left|K \cup \{0\} \right| = m$. Similarly, if there is an $(m-1)$-multiple square sharing $i,j$ consisting of nodes $\{i,j\}\cup K$ for some $K\subseteq W_{ij}\setminus \{0\}$, it holds $\{i,j\}\in \bigcap_{k\in K} S^{i,j}_k$ and $\left|K \right|=m$. Therefore, $T(m)=\triangle^{(m-1)}+\Box^{(m-1)}$. \end{IEEEproof} \begin{thm} For a graph $G=(V,E)$ of diameter 3, \begin{align*} \mathrm{ASPL}(G) &= 3-\frac{2}{n(n-1)}\left(|E|+\sum_{m=1}^{n-1} (-1)^{m-1} T(m) \right). \end{align*} \end{thm} \begin{IEEEproof} $\mathrm{ASPL}(G)$ can be represented by \[ \mathrm{ASPL}(G) = \frac{2}{n(n-1)}(n_1+2n_2+3n_3) \] where $n_k = \#\{\{i,j\} \in V_2 : \mathrm{dist}(i,j) = k \}$ for $k=1,2,3$. From Lemma \ref{lemmatwo} and the fact of $n_1=|E|$, \begin{align*} n_1+2n_2+3n_3 &= 3(n_1+n_2+n_3)-n_1-(n_1+n_2) \\ &= \frac{3n(n-1)}{2}-|E|-\sum_{m=1}^{n-1}(-1)^{m-1}T(m). \end{align*} \end{IEEEproof} \begin{thm}\label{thm1} When $t$ is even \begin{align} \label{ASPLlowerbound} \mathrm{ASPL}(G) \leq 3-\frac{2}{n(n-1)}\left(|E|+\sum_{m=1}^{t} (-1)^{m-1} T(m) \right). \end{align} When $t$ is odd \begin{align} \label{ASPLupperbound} \mathrm{ASPL}(G) \geq 3-\frac{2}{n(n-1)}\left(|E|+\sum_{m=1}^{t} (-1)^{m-1} T(m) \right). \end{align} \end{thm} \begin{IEEEproof} When $t$ is even, by applying the Bonferroni inequality to~\eqref{eq:incexc}~\cite{Bon}, one obtains \[ n_1+n_2 \geq \sum_{m=1}^t (-1)^{m-1}T(m). \] The theorem for odd $t$ can be proved in the same way. \end{IEEEproof} By substituting $t=1,2$ into~\eqref{ASPLlowerbound} and~\eqref{ASPLupperbound}, respectively, the following corollaries are obtained. \begin{cor} For a $d$-regular graph $G$ of order $n$ and diameter 3, \begin{equation} \label{Moore} \mathrm{ASPL}(G) \geq 3-\frac{d(d+1)}{n-1}. \end{equation} \end{cor} \begin{cor} For a $d$-regular graph $G$ of order $n$ and diameter 3, \begin{equation} \label{ASPLupper} \mathrm{ASPL}(G) \leq 3 - \frac{d(d+1)}{n-1} + \frac{6\triangle+4\Box}{n(n-1)}. \end{equation} \end{cor} \par The lower bound (\ref{Moore}) agrees with the {\em Moore bound} \cite{MooreBound}. \section{Proposed evaluation function and algorithm}\label{algorithmsec} \subsection{SLS using the upper bound as the evaluation function} In this paper, we propose SLS using~\eqref{ASPLupper} as the evaluation function. More precisely, the evaluation function $g$ in our SLS is defined by \begin{equation} \label{evalfunc} g(G) = 3\triangle+2\Box. \end{equation} Since the minimization of~\eqref{evalfunc} is equivalent to the minimization of~\eqref{ASPLupper}, we can expect that the SLS algorithm using the above evaluation function finds a graph with low ASPL if all graphs appearing in the SLS algorithm have diameter 3. In this section, we show that a difference $g(G')-g(G)$ for a $d$-regular graph $G$ of order $n$ and its neighborhood $G'$ can be calculated in $O(1)$ time by using three two-dimensional arrays. We also show that these three arrays can be updated in $O(d^2)$ time. In SLS algorithms, the frequency of the evaluations is much higher than the frequency of the updates. Therefore, our SLS is much faster than SLS using the ASPL as the evaluation function, which needs $O(d)$ time both for the evaluation and the update. For the current graph $G$, the three two-dimensional arrays used for the $O(1)$-time evaluation are defined by \begin{align*} {\rm T1}[i][j] &:= \begin{cases} 1, &\hspace{2em} \{i,j\}\in E(G) \\ 0, &\hspace{2em} \{i,j\} \not \in E(G), \end{cases}\\ {\rm T2}[i][j] &:= \#\{ \text{$i$-$j$ paths of length 2 in $G$}\}, \\ {\rm T3}[i][j] &:= \#\{ \text{$i$-$j$ paths of length 3 in $G$}\}. \end{align*} Here, $E(G)$ is the edge set of $G$. The construction of these three arrays takes $O(nd^3)$ time since the number of paths of length at most 3 in $G$ is $O(nd^3)$, and since $d=\Omega(n^{1/3})$ for guaranteeing the diameter of $G$ is equal to 3. We first construct T1, T2 and T3 for the initial graph in the SLS. Then, at each step of the SLS, we evaluate a neighborhood in $O(1)$ time by using T1, T2 and T3. If the current graph is replaced, T1, T2 and T3 are updated in $O(d^2)$ time. In the following, we show algorithms for the $O(1)$-time evaluation and the $O(d^2)$-time update. \subsection{$O(1)$-time evaluation with arrays} For the neighborhood $G'$, let $\triangle'$ be the number of triangles in $G'$ and $\Box'$ be the number of squares in $G'$. Then, it holds \begin{equation} g(G')-g(G) = 3(\triangle'-\triangle)+2(\Box'-\Box). \end{equation} We assume that a neighborhood $G'$ of $G$ is obtained by replacing $e_{ab},e_{cd} \in E(G)$ with $e_{ac},e_{bd} \not \in E(G)$. The switch can be divided into two steps: the removal of $e_{ab},e_{cd}$ and the addition of $e_{ac},e_{bd}$. First, we consider the removal of $e_{ab}$ and $e_{cd}$. Since no triangles contain both of $e_{ab}$ and $e_{cd}$, the number of triangles decreases by \begin{equation}\label{dectri} {\rm T2}[a][b]+{\rm T2}[c][d]. \end{equation} \par Next, we consider the addition of $e_{ac}$ and $e_{bd}$ to the graph obtained by the removal of $e_{ab}$ and $e_{cd}$. Note that the arrays T1, T2 and T3 remain unchanged at this time. After the removal of $e_{ab}$ and $e_{cd}$, the addition of $e_{ac}$ increases the number of triangles by \begin{equation}\label{inctri-ac} {\rm T2}[a][c] - {\rm T1}[a][d]-{\rm T1}[b][c]. \end{equation} Here, the terms ${\rm T1}[a][d]$ and ${\rm T1}[b][c]$ take account of non-existent paths $a$-$d$-$c$ and $a$-$b$-$c$, respectively. Similarly, the addition of $e_{bd}$ increases the number of triangles by \begin{equation}\label{inctri-bd} {\rm T2}[b][d] - {\rm T1}[a][d]-{\rm T1}[b][c]. \end{equation} Hence, from~\eqref{dectri}, \eqref{inctri-ac} and \eqref{inctri-bd}, one obtains \begin{align*} \triangle' - \triangle = &-{\rm T2}[a][b]-{\rm T2}[c][d]+{\rm T2}[a][c]+{\rm T2}[b][d]\\ &- 2 ({\rm T1}[a][d]+{\rm T1}[b][c]). \end{align*} Next, we consider $\Box'-\Box$. Since the number of squares that contain both of $e_{ab}$ and $e_{cd}$ is ${\rm T1}[a][d]{\rm T1}[b][c]$ (Recall that $e_{ac}$ and $e_{bd}$ are not in $E(G)$), the removal of $e_{ab}$ and $e_{cd}$ decreases the number of squares by \begin{equation}\label{decsqu} {\rm T3}[a][b]+{\rm T3}[c][d] - {\rm T1}[a][d]{\rm T1}[b][c]. \end{equation} After the removal of $e_{ab}$ and $e_{cd}$, the addition of $e_{ac}$ increases the number of squares by \begin{equation} \label{incsqu-ac} {\rm T3}[a][c] - {\rm T2}[a][d] - {\rm T2}[b][c]. \end{equation} Here, the terms ${\rm T2}[a][d]$ and ${\rm T2}[b][c]$ take account of non-existent paths $a$-$*$-$d$-$c$ and $a$-$b$-$*$-$c$, respectively, where $*$ represents an arbitrary node (A non-existent path $a$-$b$-$d$-$c$ is not counted since $e_{bd}\notin E(G)$). Similarly, after the addition of $e_{ac}$, the addition of $e_{bd}$ increases the number of squares by \begin{equation} \label{incsqu-bd} {\rm T3}[b][d] - {\rm T2}[a][d] - {\rm T2}[b][c] + {\rm T1}[a][d]{\rm T1}[b][c]. \end{equation} Here, the term ${\rm T1}[a][d]{\rm T1}[b][c]$ takes account of the path $b$-$c$-$a$-$d$ in $G'$. Hence, from~\eqref{decsqu}, \eqref{incsqu-ac} and \eqref{incsqu-bd}, one obtains \begin{align*} \Box'-\Box = &-{\rm T3}[a][b]-{\rm T3}[c][d]+{\rm T3}[a][c]+{\rm T3}[b][d]\\ &-2({\rm T2}[a][d]+{\rm T2}[b][c]-{\rm T1}[a][d]{\rm T1}[b][c]). \end{align*} We conclude that we can calculate $g(G')-g(G)$ in $O(1)$ time if T1, T2 and T3 for $G$ are given. \subsection{Array update} \label{Table Update} When $e_{ab}$ is removed, T2 can be updated by decrementing ${\rm T2}[t][s]$ and ${\rm T2}[s][t]$ for all $s$-$t$ paths of length 2 using $e_{ab}$. Since the number of these paths is $O(d)$, this calculation can be done in $O(d)$ time. Also T3 can be updated by decrementing ${\rm T3}[s][t]$ and ${\rm T3}[t][s]$ for all $s$-$t$ paths of length 3 using $e_{ab}$. The number of these paths is $O(d^2)$ and thus this calculation can be done in $O(d^2)$ time. When edges are added, the arrays can be updated in $O(d^2)$ time in the same way. \section{Numerical experiments}\label{experimentsec} \subsection{Accuracy of approximations} In this section, we show by numerical experiments that the upper bounds and lower bounds obtained by Theorem~\ref{thm1} are also good approximations for the ASPL\@. Table~\ref{result1} shows the relative error $(\widetilde{\mathrm{ASPL}}(G)-\mathrm{ASPL}(G))/\mathrm{ASPL}(G)$ of the approximations where $\widetilde{\mathrm{ASPL}}(G)$ denotes the bounds obtained by Theorem~\ref{thm1} for $t=1,2,3$, and where $G$ denotes a random $d$-regular graph of order $n$ where $(n,d)=(4096,60),(4096,64),(10\,000,60),(10\,000,64)$. The diameters of these graphs are 3. \begin{table} \newcolumntype{T}{>{\raggedleft\arraybackslash}p{4em}} \caption{The relative ASPL errors of approximations. \label{result1}} \centering \begin{tabular}{|c|T|T|T|} \hline $(n,d)$ & \multicolumn{1}{c|}{$t=1$} & \multicolumn{1}{c|}{$t=2$} & \multicolumn{1}{c|}{$t=3$} \\ \hline $(4096,60)$ & $-0.1206$ & $0.0355$ & $-0.0074$\\ $(4096,64)$ & $-0.1544$ & $0.0523$ & $-0.0124$\\ $(10\,000,60)$ & $-0.0209$ & $0.0024$ & $-0.0002$\\ $(10\,000,64)$ & $-0.0270$ & $0.0036$ & $-0.0003$\\ \hline \end{tabular} \end{table} Table~\ref{result1} implies that the approximations are more accurate as $t$ increases. Furthermore, Table~\ref{result1} also implies that the approximations are more accurate for sparse graphs. It can be easily understood since $\triangle,\Box,\triangle^{(2)},\Box^{(2)},\ldots$ are small when a graph is sparse. \subsection{Construction by Iterative First Improvement} The Iterative First Improvement (IFI) algorithm is one of the simplest SLS algorithms. The IFI algorithm evaluates neighborhoods one after another. When the IFI finds the neighborhood whose value of the evaluation function is lower than that of the current solution, it replaces the current solution by the neighborhood and then starts to evaluate the next neighborhood. The evaluation and replacement continues until the IFI algorithm finds the local optimum. We consider the IFI algorithm with the $O(1)$-time evaluation function proposed in Section~\ref{algorithmsec}. \par In order to improve the efficiency of the IFI algorithm, we modify the IFI algorithm as follows: At every 50 replacements, the set of edges are sorted by the number of triangles and squares that contain the edge. More precisely, all edges are sorted in descending order of $3\triangle_e + 2\Box_e$ where $\triangle_e$ and $\Box_e$ denote the number of triangles and squares that contain the edge $e$, respectively. After the sort, all pairs of edges are chosen in the order of $(e_1,e_2), (e_1,e_3), \dotsc, (e_1,e_{|E|}), (e_2,e_3), (e_2,e_4),\dotsc$. This modification is useful for finding efficiently a neighborhood improving the value of the evaluation function. Table~\ref{randomASPL} shows the ASPL, the Moore bound~\eqref{Moore}, denoted by $L$, and the ASPL gap $(\mathrm{ASPL}(G)-L)/L$ for random $d$-regular graph $G$ of order $n$. From these random graphs, we applied the above modified IFI algorithm, and obtained local optimals. Table~\ref{result2} shows the ASPL, the ASPL gap for the local optimals and the required time for the modified IFI\@. These numerical experiments are performed on MacBook Pro, Intel Core i7 2.6GHz. The modified IFI found a local optimal within two days. The obtained local optimals have smaller ASPL gap than the original random graphs. Especially, for $(n,d)=(10\,000,60), (10\,000,64)$, the ASPL gaps are significantly improved. \begin{table}[t] \centering \caption{ASPL of Random Graphs \label{randomASPL}} \begin{tabular}{|c|c|c|c|} \hline $(n,d)$ & ASPL & Moore & ASPL gap \\ \hline $(4096,60)$ & 2.3951 & 2.1062 & $13.72\times 10^{-2}$ \\ $(4096,64)$ & 2.3464 & 1.9841 & $18.26\times 10^{-2}$ \\ $(10\,000,60)$ & 2.6901 & 2.6340 & $21.31\times 10^{-3}$ \\ $(10\,000,64)$ & 2.6557 & 2.5840 & $27.76\times 10^{-3}$ \\ \hline \end{tabular} \end{table} \begin{table}[t] \centering \caption{Results of the modified IFI \label{result2}} \begin{tabular}{|c|c|c|c|} \hline $(n,d)$ & ASPL & ASPL gap & Time (minutes) \\ \hline $(4096,60)$ & 2.3055 & $9.461\times 10^{-2}$ & 341\\ $(4096,64)$ & 2.2536 & $13.58\times 10^{-2}$ & 336\\ $(10\,000,60)$ & 2.6521 & $6.886\times 10^{-3}$ & 2429\\ $(10\,000,64)$ & 2.6120 & $10.85\times 10^{-3}$ & 2222\\ \hline \end{tabular} \end{table} \subsection{Construction by Simulated Annealing} The Simulated Annealing (SA) is one of the most successful SLS algorithms. The SA in our numerical experiments works as follows. At each step, a neighborhood is chosen uniformly at random and evaluated. If the value $E'$ of evaluation function for the neighborhood is lower than that $E$ for the current solution, then the current solution is replaced by the neighborhood. Also, even if the neighborhood has the higher evaluation value than the current solution, i.e., $E'>E$, the current graph is also replaced by the neighborhood with probability $P$ where \[ P = \exp \left\{-\frac{E'-E}{T}\right\}. \] Here, $T$ is a parameter called the {\em temperature} which decreases at each step of SA\@. The annealing schedule, which determines the temperature at each step, is crucial to the SA\@. In the numerical experiments, we set $T(k):=11/ \ln (k+1)$ where $k$ denotes the number of graphs which are evaluated until that time. Table~\ref{saresult} shows the ASPL of graphs constructed by applying the SA 60 days, and then applying the modified IFI. They are the best graphs obtained in the Graph Golf~\cite{GraphGolfWeb}. \begin{table}[t] \centering \caption{Results of the SA \label{saresult}} \begin{tabular}{|c|l|l|} \hline \multicolumn{1}{|c|}{Graph} & \multicolumn{1}{c|}{ASPL} & \multicolumn{1}{c|}{ASPL gap} \\ \hline $(10\,000,60)$ & 2.6502 & $6.2 \times 10^{-3}$ \\ $(10\,000,64)$ & 2.6099 & $10.0 \times 10^{-3}$ \\ \hline \end{tabular} \end{table} \section{Conclusion}\label{concludesec} We derived the equality and bounds for the ASPL of graphs of diameter 3 by using the number of triangles, squares, and some other structures in a graph. By numerical experiments, we confirmed that the upper and lower bounds obtained are also accurate approximation for the ASPL\@. On the basis of one of our bounds, we propose to use $3\triangle + 2\Box$ as the evaluation function of SLS for the ASPL minimization problem where $n$ is at least and close to $d^2$, so that the random graph has diameter 3 with high probability. We show that the proposed SLS algorithms requires $O(1)$ time for the evaluation and $O(d^2)$ time for the update. We construct low ASPL graphs of diameter 3 by IFI and SA using our evaluation function. \par While the upper bound evaluated by the proposed algorithm is represented only by the number of triangles and squares, the other bounds represented by the number of more complicated structures such as $\triangle^{(2)},\Box^{(2)}$ are confirmed to be more accurate. Thus, if there exists $O(1)$-time evaluation algorithm that calculates one of these bounds, then we can use the bound as the evaluation function of SLS\@. It would construct graphs with lower ASPL\@. Finally, we note that our bounds of ASPL for graphs of diameter 3 can be generalized to larger diameter in a similar way. The construction of low ASPL graphs of larger diameter by similar algorithm is an interesting future work. \section*{Acknowledgment} This work was supported by MEXT KAKENHI Grant Number 24106008. \bibliographystyle{IEEEtran}
{'timestamp': '2016-06-17T02:08:32', 'yymm': '1606', 'arxiv_id': '1606.05119', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05119'}
arxiv
\section{Introduction} Several hard optimization problems often become substantially easier on special classes of graphs such as planar graphs and bounded treewidth graphs. For example, while the maximum independent set problem is notoriously hard on general graphs \cite{hastad}, it admits an efficient approximation scheme on planar graphs \cite{LT,baker} and can be solved exactly in polynomial time on bounded treewidth graphs \cite{Bod}. Similarly, while MAX-$k$-SAT is APX-hard in general \cite{haastad2001some}, planar instances admit an efficient approximation scheme \cite{MotwaniKhanna} and bounded treewidth instances can be solved exactly in polynomial time \cite{freuder1990complexity,marx2007can}. In general, there has been extensive work done on designing better algorithms for special graph classes and several general techniques have been developed for this purpose. For problems on bounded treewidth graphs, several techniques based on dynamic programming and deep results from algorithmic graph minor theory and logic have been developed \cite{Fomin-book, Bod,DH08,Courcelle,eppstein2000diameter}. For problems on planar graphs, many surprising approximation guarantees can be obtained based on decomposition approaches. One of the first decomposition approaches is based on the planar-separator theorem \cite{LT}. Later, Baker \cite{baker} developed a more versatile technique based on decomposition into $O(1)$-outerplanar graphs (which have bounded treewidth). For example, Khanna and Motwani \cite{MotwaniKhanna} used Baker's technique to obtain efficient approximation schemes for a wide variety of Constraint Satisfaction Problems (CSPs) such as MAX-SAT. \medskip \noindent {\bf Noisy graph models.} In this paper, we consider a natural question that was first studied by Magen and Moharrami \cite{MM}: What happens to these special graph classes when they are perturbed adversarially? For the maximum independent set problem, \cite{MM} considers the setting where an input graph $G$ on $n$ vertices is obtained from some (hidden) underlying planar graph $G_0$ by adding $\delta n$ arbitrary edges (these are called \emph{noisy} edges) for some small number $\delta >0$ and ask: how well can one approximate the maximum independent set (MIS) problem on $G$? More generally, one can consider the same question for other optimization problems that are easy on these special graph classes. In this work, we consider MAX-$k$-SAT (for constant $k$) in the noisy setting. To introduce our noise model and to relate to the noisy graph model of \cite{MM}, we remind the reader of the definition of a factor graph: given a $k$-SAT formula $\Phi$, the \emph{factor graph} of $\Phi$ is a bipartite graph $H=(A,B)$ where $A$ contains a vertex for every variable appearing in $\Phi$, $B$ contains a vertex for every clause appearing in $\Phi$, and a clause-vertex $\phi$ is connected to a variable-vertex $x$ if and only if $x$ belongs to the clause $\phi$. In the noisy setting, the input formula $\Phi$ is given by an adversary who takes a planar $k$-SAT formula $\Phi_0$ (i.e.~$\Phi_0$'s factor graph is planar) with $n$ variables and $m$ clauses, and adds $\delta m$ clauses (each clauses contains exactly $k$ literals) to $\Phi_0$ (resulting in $\delta m$ vertices and $k \delta m = O(\delta m)$ edges being added to the factor graph of $\Phi_0$). We choose to focus on this noise model as it does not change the arity of the original formula $\Phi_0$. Our results carry over without much difficulty to more general noise models where one adds both vertices and edges to the factor graph of $\Phi_0$, so long as the total number of edges and vertices added is $\delta m$. \medskip \noindent {\bf Previous Work.} Several previous works have considered approximation algorithms for MIS in the noisy setting. Magen and Moharrami presented an elegant argument showing that $\alpha(G)$ can be approximated to within a $(1+\epsilon)$ factor, for $\epsilon = \Omega(\delta)$, using $O(1/\epsilon)$ levels of the Sherali-Adams (SA) Hierarchy. Interestingly, this only yields an efficient {\em estimation} algorithm for $\alpha(G)$ and does not give any way to actually find the corresponding independent set.\footnote{Self-reducibility techniques such as those used for finding independent set in perfect graphs do not seem to work here as the estimation algorithm only gives an approximate answer.} In particular, the SA approach only uses the existence of $G_0$ to argue that $SA(G)\approx \alpha(G)$, without actually detecting the noisy edges. Later, Chan and Har-Peled \cite{ChanHP} developed a PTAS for planar independent set based on local search which can be used to obtain a $(1+\epsilon)$-approximation for MIS in noisy planar graphs. We are not aware of any previous work that studied approximation algorithms for noisy CSPs. \medskip \noindent {\bf Limitations of Current Approaches.} For MAX-$k$-SAT, classic approaches for planar instances based on computing decompositions of the factor graph break down completely in the presence of noise. In particular, the known algorithms for finding planar separators or decomposition into $O(1)$-outerplanar graphs inherently use the planar structure in various ways, and are easily tricked even with very few noisy edges. In fact, a key motivation of \cite{MM} for studying the noisy setting was to design more ``robust" algorithms that are not specifically tailor-made for particular graph classes. Note that in our noise model the adversary is even allowed to add a bounded degree expander on some subset of $O(\delta n)$ vertices, completely destroying the planar structure and increasing the treewidth to $\Omega(n)$. Another natural approach might be to recover some planar graph $\tilde{G}$ from $G$ without removing too many edges, and then apply the algorithms for planar graphs to $\tilde{G}$. However the best known guarantees for this Minimum Planarization problem are too weak for our purpose. In particular, even for bounded degree graphs these algorithms \cite{CMS,ChekuriS13} only achieve a $poly(n,\operatorname{OPT})$ approximation, where $\operatorname{OPT}$ is the number of noisy edges, and thus only work in our setting when the noise parameter $\delta = n^{-\Omega(1)}$. Finally, one may attempt to apply the local search algorithm of \cite{ChanHP}. However, the analysis of the local search algorithm of \cite{ChanHP} crucially relies on the existence of a decomposition based on the planar separator theorem known as $r$-divisions \cite{Frederickson87} and does not seem to apply to noisy instances of MAX-$k$-SAT. \subsection{Our Contributions} In this work, we give a general approach for solving problems on noisy planar graphs. Using this approach, we give the first algorithm that is able to handle noisy versions of planar MAX-$k$-SAT. \begin{theorem}\label{thm:MAX-CUT} Let $\Phi_0$ be a planar $k$-SAT formula over $n$ variables and $m$ clauses, where $k$ is a constant independent of $n$ and $m$. Let $\Phi$ be a $k$-SAT formula obtained by adding $\delta m$ clauses to $\Phi_0$, for some $\delta > 0$. Then there is an algorithm such that given any $\epsilon > 0$, finds a $(1 + O(\epsilon + \delta \log m \log \log m))$-approximate assignment in time $m^{O(\log \log m)^2/\epsilon}$. \end{theorem} \noindent{\em Remark:} Since MAX-$k$-SAT can be approximated within a constant factor, Theorem~\ref{thm:MAX-CUT} is of interest when $\delta=O(1/(\log m \log \log m))$. Theorem~\ref{thm:MAX-CUT} can also be extended to arbitrary (binary) $k$-CSPs. For the maximum independent set problem, our approach gives an LP-based approximation algorithm with much better running time and whose approximation ratio has a better dependence on $\delta$. \begin{theorem} \label{thm:MIS} Let $G$ be an $n$-vertex graph obtained by adding $\delta n$ arbitrary edges to some planar graph $G_0$, for some $\delta>0$. Then there is an algorithm such that given any $\epsilon > 0$, finds an independent set of size within a $(1 + O(\epsilon + \delta))$ factor of $\alpha(G)$, and runs in time $n^{O(1/\epsilon^4)}$. \end{theorem} \paragraph{General framework} The starting point for our results is the following simple observation: Most algorithms for planar graphs use the planar structure only to find a certain structured decomposition of the graph, and once this is found, apply some simple or brute-force algorithm. For example, the planar separator theorems are used to argue that given any $\epsilon >0$, a planar graph can be decomposed into disjoint components of size $O(1/\epsilon^2)$ by removing some subset $X$ of at most $\epsilon n$ vertices. Similarly in Baker's decomposition, an $\epsilon$ fraction of edges $F$ (or vertices) can be removed from a planar graph to decompose it into $O(1/\epsilon)$-treewidth graphs. Now consider a noisy planar graph $G$. We claim that such nice decompositions also exist for $G$ (although it is unclear how to find them). For example, consider the decomposition of the underlying planar graph $G_0$ into bounded size pieces and for every noisy edge in $G\setminus G_0$ put one of its endpoint in $X$. This subset $X$ has size $|X| \leq (\epsilon + \delta)n$ and removing $X$ splits $G$ into components of size $O(1/\epsilon^2)$. Similarly, let $F$ be the edges removed in Baker's decomposition of $G_0$, plus the noisy edges in $G\setminus G_0$. Clearly, $|F| \leq (\epsilon + \delta) n$ and removing $F$ decomposes $G$ into $O(1/\epsilon)$-treewidth graphs. So this leads to the natural question of whether we can directly find such good decompositions, without relying on the topological or other specific structure of the graph. Our main contribution is to show that this can indeed be done using general LP-based techniques. Specifically, we consider the following problems. \begin{enumerate} \item {\em Bounded Size Interdiction (weaker form):} Suppose $G$ can be decomposed into components of size at most $1/\epsilon^2$ by removing some (small) subset $X$ of vertices. Find such a subset $X$. \item {\em Bounded Treewidth Interdiction:} Suppose $G$ can be decomposed into graphs of treewidth at most $w$, by removing some subset $F$ of edges. Find such a subset $F$. \end{enumerate} \paragraph{Our Results.} We show the following results for these general interdiction problems. Our main technical result is the following theorem. \begin{theorem} \label{thm:bti} Given a graph $G$ and an integer $w>0$, let $F$ be some subset of edges such that removing them reduces the treewidth of $G$ to $w$. Then there is an algorithm that runs in time $n^{O(1)}$ and finds a subset of edges $F'$ such that $|F'| = O(\log n \log \log n) |F|$ and removing $F'$ from $G$ reduces the treewidth to $O(w \log w)$. \end{theorem}\label{thm:treewidth_intrediction} Note that this gives a bicriteria $(\log n \log \log n, \log w)$-approximation to the Bounded Treewidth Interdiction problem. We also remark that the approximation factors and the running time of the above algorithm do not depend on $w$. Let us now see how Theorem~\ref{thm:bti} can be used to obtain Theorem~\ref{thm:MAX-CUT}. The basic idea is to apply Theorem~\ref{thm:bti} to the factor graph $H$ of the noisy formula $\Phi$ to obtain a formula $\Phi'$ whose factor graph has a smaller treewidth, and then compute an exact solution for $\Phi'$. Since $k$ is constant, the noisy formula $\Phi$ has at most $O(m)$ variables and thus $H$ has $\Theta(m)$ vertices. Thus, as discussed above, we know that there exists a set $F$ of $(k\delta + O(\epsilon /(\log m\log \log m))) m$ edges that we can delete from $H$ to reduce its treewidth to $O(\log m \log \log m/\epsilon)$. So we can apply Theorem~\ref{thm:bti} to $H$ with $w = O(\log m \log \log m / \epsilon)$ to find an edge set $F'$ of size at most $O((\epsilon + k\delta (\log m \log \log m))m)$ such that the residual factor graph $H - F'$ has treewidth $O(\log m (\log \log m)^2/\epsilon)$. Now observe that deleting the clauses incident to $F'$ gives us a formula $\Phi'$ whose factor graph is a subgraph of $H-F'$, and thus has treewidth $O(\log m (\log \log m)^2/\epsilon)$. Thereafter, one can use an exact algorithm for MAX-$k$-SAT \cite{MotwaniKhanna} that runs in time $2^{O(\ell)}\cdot \poly(m)$ when the factor graph has treewidth at most $\ell$. Next, we analyze the quality of this solution. Denote by $\operatorname{OPT}$ and $\operatorname{OPT}'$ the maximum number of satisfiable clauses in $\Phi$ and $\Phi'$, respectively. At least a constant fraction of the clauses in $\Phi$ are satisfiable, so $\operatorname{OPT} \geq \Omega(m)$. Since the formula $\Phi'$ is obtained by deleting $O(\epsilon + \delta (\log m \log \log m))m$ clauses from $\Phi$ (recall that $k$ is a constant), we have $\operatorname{OPT}' \geq \operatorname{OPT} - O(\epsilon + \delta (\log m \log \log m))m$. Thus, $\operatorname{OPT}' \geq (1 - O(\epsilon + \delta \log m \log \log m))\operatorname{OPT}$ and so our solution is a $(1 + O(\epsilon + \delta \log m \log \log m))$-approximation. We remark that Bounded Treewidth Interdiction is a fundamental problem of interest beyond its application to noisy planar graphs. For instance, treewidth interdiction algorithms have found applications in designing PTASes in several settings \cite{FLMS12,DHK,fomin2011bidimensionality}. Next, we consider the Bounded Size Interdiction problem in Section \ref{sec:MIS}. \begin{theorem} (Weaker version) \label{thm:weak-bsi} For the weaker form of the Bounded Size Interdiction problem stated above, given any $\beta \leq 1$, we can find in time $n^{O(1/\epsilon^2)}$ a subset of vertices $X'$ with $|X'| \leq O(|X|/\beta + \beta |E|)$ such that $G[V\setminus X']$ has no component larger than $1/\epsilon^2$. Here, $|E|$ is the number of edges in $G$. \end{theorem} For a noisy planar graph $G$, there exists $X \subseteq V$ of size $|X| \leq (\epsilon + \delta)n$ (as discussed above) and $|E| \leq (3+\delta)n = O(1)n$. The latter follows as a planar graph has at most $3n-6$ edges. So setting $\beta = (\epsilon+\delta)^{1/2}$ in Theorem \ref{thm:weak-bsi} already gives $X'$ of size $O((\epsilon + \delta)^{1/2} n)$ in time $n^{O(1/\epsilon^2)}$. This can be used to design a $(1 + O((\epsilon + \delta)^{1/2}))$-approximation algorithm for independent set in noisy planar graphs. To get the better approximation factor of $1 + O(\epsilon + \delta)$ of Theorem \ref{thm:MIS} above, we will use a more refined result (Theorem \ref{lem:noisy-LT}) that decouples the dependence of $|X'|$ on $\epsilon$ and $\delta$. To prove Theorem \ref{lem:noisy-LT}, we write a configuration LP based formulation and round it suitably. (See Section \ref{sec:MIS}.) The proof of Theorem \ref{thm:bti} is much more challenging and requires several new ideas, and we give a broad overview of the algorithm and the proof below. \paragraph{Overview of Techniques for Theorem \ref{thm:bti}:} First, observe that if $G$ has treewidth at most $w$, then $F=\emptyset$, and the algorithm must return $F'=\emptyset$. Thus, the problem is at least as hard as determining the treewidth of $G$. This is well known to be NP-Hard, and in fact unlikely to admit a polynomial time $O(1)$ approximation under reasonable complexity assumptions \cite{WAPL}. This implies that the bicriteria guarantee is necessary, and that it is unlikely that the approximation with respect to $w$ can be made $O(1)$. At a high level, our algorithm will try to construct a good tree decomposition of width $w$, while removing some problematic edges along the way. To this end, let us first see how the known algorithms for finding tree decompositions work. Treewidth is characterized up to $O(1)$ factor by the well-linkedness property of a graph, which allows one to construct a tree decomposition by computing small balanced vertex separators recursively. Either the algorithm succeeds at each step and eventually finds a tree decomposition, or returns a well-linked set as a certificate that $G$ has large treewidth. Finding balanced vertex separators is hard but one can use LP or SDP (resp.) formulations \cite{BGHK95,Amir,FHL} based on spreading constraints \cite{ENRS,ARV}, and lose an $O(\log w)$ or $O(\sqrt{\log w})$ (resp.) factor in the quality of the treewidth. In the noisy setting, our algorithmic task can thus be viewed as detecting which edges to remove so that the above recursive procedure works. To do this, we formulate an LP with variables for which edges to remove (let us call these the $x_{uv}$ variables) so that in the residual graph every subset $S$ of vertices has a small fractional balanced vertex separator of size at most $w$. However, as there are exponentially many such sets $S$, this gives a huge overall LP with (both) exponentially many variables and constraints, and it is unclear how to solve it. In particular, we have exponentially many different vertex separator LPs coupled together with the common $x_{uv}$ variables. We describe the algorithm in two parts. First, we assume that we are given the $x_{uv}$ values from some feasible optimum LP solution. Using these $x$-values, for any given set $S$, we can now formulate a balanced edge-and-vertex separator LP, where the $x$-values give the fractional amount by which edges are removed, and in addition at most $w$ vertices are removed. Using standard region-growing techniques jointly on these edge and vertex values, we decide which edges to delete (this adds to $F'$), and which vertices lie in the separator for $S$ (these enter the bags in the tree decomposition). Doing this directly gives an $O(\log^2 n)$ approximation (provided we ensure that the separator tree is balanced and has depth $O(\log n)$), due to the loss of an $O(\log n)$ factor on each level of recursion. To reduce this to $O(\log n \log \log n)$, we use ``Seymour's trick" of more careful region-growing \cite{Seymour}, together with some additional technical steps needed to make it work together with the tree decomposition procedure. Second, we describe how to ``solve" the LP. Perhaps surprisingly, this turns out to be quite challenging and requires some new ideas, which may be be useful in other contexts. We only sketch these here, and details can be found in Section \ref{sec:LP}. First, we bypass the need to completely solve this LP, by using the Round-or-Separate framework (as in \cite{AnSS14,LLS}). In particular, the algorithm starts with some possibly infeasible solution $x$, and tries to construct the tree decomposition. If it succeeds, we are done. Otherwise, it gets stuck at finding a small balanced vertex separator for some set $S$. At that point, we try to add a violated inequality. However, a crucial point is that we need to find a violated inequality only involving the $x$-variables. So, a key step is to reformulate the LP to only have the $x$-variables. This crucially uses LP duality and the structure of the LP that the variables for different sets $S$ are only loosely coupled via the $x$-variables. After this reformulation, it is still unclear how to find a violated inequality due to the exponential size of the LPs involved. We get around this issue by using some further properties of the Ellipsoid Method and the LP duality. \paragraph{Other Related Work.} The noise model considered here gives an interesting interpolation between easy and general worst-case instances. This is similar in spirit to approaches such as smoothed analysis \cite{SpielmanTeng}, planted models and semi-random models \cite{FK98,MMV12}, although unlike these models our noise model is completely adversarial. For the general version of the bounded size interdiction problem---given a graph $G$ and a size parameter $s$, find the smallest vertex set $X$ to delete so that $G - X$ has components of size at most $s$---Lee~\cite{lee17small} independently gave a $O(\log s)$-approximation algorithm that runs in time $2^{O(s)}\poly(n)$. However, using this for maximum independent set on noisy planar graphs only yields a $(1 + O((\delta +\epsilon)\log (1/\epsilon))$-approximation. Fomin et al.~\cite{FLMS12} have considered the vertex deletion variant of our treewidth interdiction problem. They obtain a constant approximation factor for the problem, however their approximation factor depends at least exponentially on $w$ which makes it inapplicable in our setting\footnote{We need a sublinear dependence on $w$. To see why, consider for example the noisy MIS problem with $G_0$ as a grid. If we wish to reduce the treewidth to $w$, we would need to remove an $\Omega(1/w)$ fraction of the vertices, so if the interdiction algorithm is not an $o(w)$ approximation, it might end up deleting all the vertices.}. Also their algorithm is polynomial time only for $w=O(1)$. A related model was considered by \cite{HKNO} in the context of property-testing and sublinear time algorithms in the bounded degree model. \section{Notation and Preliminaries} We always use $G_0$ for the underlying graph, and $G$ for the noisy graph. The number of vertices of $G$ is always $n$. For a subset $S \subseteq V$ and $F \subseteq E$, we use the notation $G[S] - F$ to denote the subgraph induced on the vertices $S$, excluding the edges in $F$. We use the notation $E(S)$ to denote the subset of $E$ with both endpoints in $S$, and given another subset $S' \subseteq V$, we use $E(S,S')$ to denote the subset of $E$ with one endpoint in $S$ and another in $S'$. \paragraph{Planar and Minor-Free graphs.} The classic planar separator theorem \cite{LT} states that any planar graph has a $2/3$-balanced vertex separator of size $O(\sqrt{n})$ and that it can be found efficiently. Applying this recursively gives the following. \begin{lemma} \label{thm:LT} For any planar graph $G$ and any $\alpha>0$, there is subset of vertices $X \subset V$ with $|X| =O(\alpha n)$, such that every component $C_i$ of $G_0[V-X]$ has at most $1/\alpha^2$ vertices. \end{lemma} A more generally applicable technique (see e.g.~\cite{MotwaniKhanna,eppstein,Demaine2008}) is Baker's decomposition \cite{baker}, which states that for any integer $k$, a planar graph can be decomposed into pieces of treewidth $O(k)$ (specifically, $k$-outerplanar graphs) by removing $O(1/k)$ fraction of edges or vertices. A minor of $G$ is a graph $G'$ obtained by deleting and contracting edges. A graph $G$ is $H$-free if $G$ does not contain a subgraph $H$ as a minor. Planar graphs are exactly the graphs excluding $K_{3,3}$ and $K_5$ as minors. In fact, Robertson and Seymour proved that every graph family closed under taking minors is characterized by a set of excluded minors. Both the planar separator theorem and Baker's decomposition approach extend more generally to $H$-free graphs \cite{AST,devos,DHK}. \paragraph{Treewidth.} We review some relevant definitions related to treewidth. \begin{definition}[$\alpha$-separator of $S$ in $G$] Given a graph $G=(V,E)$ and a set $S \subset V$, a vertex set $X \subset V$ is an \emph{$\alpha$-separator} of vertex set $S$ in $G$ if every component $C$ of $G[V - X]$ has $|C \cap S| \leq \alpha|S|$. \end{definition} \begin{definition}[Well-linked sets] A vertex set $S$ is \emph{$w$-linked} in $G$ if it does not have a $\frac{1}{2}$-separator $X$ with $|X| < w$. The \emph{linkedness} of $G$ is defined to be the maximum integer $w$ such that there exists a $w$-linked set in $G$, and is denoted as $\operatorname{link}(G)$. \end{definition} \begin{definition}[Tree decomposition] \label{def:treedec} A \emph{tree decomposition} of $G$ is a tree $T$ whose nodes $t$ correspond to vertex subsets $V_t$ of $G$ (called bags) that satisfies the following properties: (i) for every edge $(u,v) \in E$, there exists a bag $V_t$ containing both $u$ and $v$; (ii) for every vertex $v$, the bags that contain $v$ form a non-empty subtree of $T$. The \emph{width} of the decomposition is $\operatorname{width}(T) = \max_{s \in T} |V_s| - 1$. \end{definition} \begin{definition}[Treewidth] The \emph{treewidth} of $G$ is the minimum integer $w$ such that it has a tree decomposition of width $w$, and is denoted as $\operatorname{tw}(G)$. \end{definition} The following well-known (see e.g. \cite{Reed97}) approximate characterization of treewidth in terms of linkedness will be useful for us. \begin{lemma}[\cite{Reed97}] \label{lem:tw-duality} For any graph $G$, $\operatorname{link}(G) < \operatorname{tw}(G) < 4\operatorname{link}(G)$. \end{lemma} \newcommand{\textsc{Interdict}}{\textsc{Interdict}} \newcommand{\frac{2}{3}}{\frac{2}{3}} \newcommand{\delta_x}{\delta_x} \newcommand{\delta_y}{\delta_y} \newcommand{\kappa}{\kappa} \section{Bounded Treewidth Interdiction} Recall that in the Bounded Treewidth Interdiction problem, we are given a graph $G = (V,E)$, a target treewidth $w$, and we want to find the minimum set $F$ of edges to delete from $G$ such that $\operatorname{tw}(G-F) < w$. In this section, we describe the exponential-size LP and sketch the rounding algorithm used to prove Theorem \ref{thm:bti}. In the following, when $X$ is a vertex set and $F$ is an edge set, we use the shorthand $G-X$ to mean $G[V - X]$, and $G-X-F$ to mean $G[V - X] - F$. \subsection{An Exponential-Sized LP} \label{sec:lp-relaxation} Lemma \ref{lem:tw-duality} gives us a convenient characterization of feasible solutions $F$ which we can use to write an LP. In particular, it says that if $\operatorname{tw}(G-F) < w$, then every vertex set $S \subseteq V$ has a $\frac{1}{2}$-separator $X^S$ in $G - F$ of size less than $w$. Consider LP \eqref{lp:exp} in Figure \ref{fig:lpexp}. It has a variable $x_{uv}$ indicating if edge $(u,v) \in E$ belongs to $F$. For every subset $S\subseteq V$ and vertex $v \in V$, variable $y^S_v$ indicates if $v$ belongs to the minimum-size $\frac{1}{2}$-separator $X^S$ of $S$ in $G-F$. For $u,v \in V$, let $\mathcal{P}(u,v)$ denote the set of paths between $u$ and $v$. For a path $P$, define $E(P)$ to be the set of edges in $P$ and $V(P)$ to be the set of vertices on $P$, including the endpoints. \label{sec:ROS} \begin{figure} \centering \begin{equation} \boxed{ \label{lp:exp} \begin{aligned} \mbox{min} \quad & \sum_{(u,v) \in E} x_{uv}\\ \mbox{s.t.}\quad & \sum_{v \in V} y^S_v \leq w &\quad \forall S \subseteq V\\ & d^S_{uv} \leq \sum_{e \in E(P)} x_e + \sum_{t \in V(P)} y^S_t &\quad \forall S \subseteq V, u,v \in V, P \in \mathcal{P}(u,v) \\ & \sum_{v \in U} d^S_{uv} \geq |U| - \frac{|S|}{2} &\quad \forall U \subseteq S \subseteq V, u \in U \end{aligned} } \end{equation} \caption{LP relaxation for the treewidth interdiction problem.} \label{fig:lpexp} \end{figure} We interpret the solution as follows: the LP assigns a length $x_{uv}$ to each edge $(u,v) \in E$ and a weight $y^S_v$ for each vertex set $S$ and vertex $v$. Consider a fixed set $S$. Without loss of generality, we can assume that the variable $d^S_{uv}$ denotes the distance between $u$ and $v$ induced by the edge lengths $x_e$ and vertex weights $y^S_t$. In particular, if we define the length of a path $P \in \mathcal{P}(u,v)$ to be the sum of edge lengths and vertex weights on the path, including the weights on $u$ and $v$, then $d^S_{uv}$ is the length of the shortest path between $u$ and $v$. The variables $d^S_{uv}$ and the last set of constraints are often called \emph{spreading metrics} and \emph{spreading constraints}, respectively. It is also easy to see that without loss of generality any feasible solution satisfies $d_{uv}^S \leq 1$. Note that there is a potentially different metric $d^S$ for each set $S$, and that the LP has exponentially many constraints and exponentially many variables. \begin{lemma} \label{lem:LP-relax} LP \eqref{lp:exp} is a relaxation of the treewidth interdiction problem. \end{lemma} \begin{proof} We show that for every edge set $F$ such that $\operatorname{tw}(G-F) < w$, there exists a feasible solution $(\pmb{x},\pmb{y},\pmb{d})$ to LP \eqref{lp:exp} with $\sum_{(u,v) \in E} x_{uv} \leq |F|$. Let $\pmb{x}$ be the indicator vector for $F$. As $\operatorname{tw}(G-F)< w$, by Lemma \ref{lem:tw-duality}, for each vertex set $S$, there exists a set $X^S$ of at most $w$ vertices such that no component of $G-X^S-F$ contains more than half of $S$. Define $\pmb{y}^S$ to be the indicator vector for $X^S$ and $d^S_{uv}=1$ if either $u$ or $v$ lies in $X^S$, or if $u$ and $v$ lie in separate components of $G-X^S-F$. The solution $(\pmb{x},\pmb{y},\pmb{d})$ has $\sum_{(u,v) \in E} x_{uv} = |F|$ and satisfies the first two sets of constraints. It remains to show that it satisfies the spreading constraints. Fix some $S$ and consider $U \subseteq S$ with $|U| > |S|/2$. Let $u$ be a vertex of $U$. There are two cases to consider: (i) If $u \in X^S$, we have $d^S_{uv} = 1$ for all $v \in U \setminus \{u\}$ and so $\sum_{v \in U}d^S_{uv} \geq |U| - 1 \geq |U| - |S|/2$; (ii) otherwise if $u \notin X^S$, let $C$ be the component of $G-X^S-F$ that contains $u$. We have $|C \cap S| \leq |S|/2$ since $X^S$ is a $\frac{1}{2}$-separator of $S$ in $G-F$. We also have $d^S_{uv} = 1$ for every $v \in U - (C \cap S)$ since $v$ is either in a different component of $G-X^S-F$ or in $X^S$. Thus, \[\sum_{v \in U} d^S_{uv} \geq \sum_{v \in U - (C \cap S)} d^S_{uv} \geq |U| - |C \cap S| \geq |U| - |S|/2.\] Therefore, the solution $(\pmb{x},\pmb{y},\pmb{d})$ is a feasible solution with $\sum_{(u,v) \in E} x_{uv} = |F|$. \end{proof} In the rest of this section, we describe our rounding algorithm for LP \eqref{lp:exp} and prove the following lemma \begin{lemma} \label{lem:tw-oracle} Given oracle access to a feasible solution $(\pmb{x}, \pmb{y}, \pmb{d})$ of LP \eqref{lp:exp}, we can find in time $\poly(n)$ an edge set $F$ such that $\operatorname{tw}(G-F) \leq O(w \log w)$ and $|F| \leq O(\log n \log \log n)\sum_{(u,v) \in E}x_{uv}$. \end{lemma} \subsection{Sketch of the Rounding Algorithm} \label{sec:rounding-sketch} Let $(\pmb{x},\pmb{y},\pmb{d})$ be a feasible solution to LP \eqref{lp:exp}. As mentioned in the Introduction, our rounding algorithm is based on a recursive algorithm for constructing tree decompositions with Seymour's recursive graph decomposition trick layered on top. We now describe at a high level how these ideas are combined together and highlight the key issues that arise. \paragraph{Classic Tree Decomposition.} We begin by outlining the relevant parts of the classic tree decomposition algorithm \cite{RobertsonS95b} (which we call $\textsc{Decomposition}$). It is a recursive algorithm: Given a subgraph $H$ of $G$ and an integer $w$, it either constructs a tree decomposition of width $O(w)$ or it finds a $w$-linked set $S$ which certifies\footnote{It certifies $\operatorname{tw}(H) \geq w$, and the treewidth of a graph is at least the treewidth of any subgraph.} that $\operatorname{tw}(G) \geq w$. There are two key steps (illustrated in Figure \ref{fig:recursive-separator}) that are important to us: \begin{itemize} \item Separate: find a minimum-size $\frac{2}{3}$-separator $X$ of a vertex set $S$ in $H$ (the particular choice of $S$ depends on previous recursive steps). \item Recurse: for each component $C_i$ of $H-X$, recurse on the subgraph $H_i$ of $H$ which consists of the edges of $H$ induced by $C_i$ and those between $C_i$ and $X$. \end{itemize} We say that $\textsc{Decomposition}$ ``succeeds'' if it does not encounter a $w$-linked vertex set $S$. In particular, when $\textsc{Decomposition}$ succeeds, the separators found during its execution can be used to construct a tree decomposition of width $O(w)$; when it fails, it has found a $w$-linked set $S$ during its recursion. \begin{figure} \centering \hfill \includegraphics[scale=0.3]{recursion.pdf} \hfill{} \caption{$\textsc{Decomposition}$ finds a separator $X$, and for each component $C_i$ of $H-X$, it recurses on the subgraph $H_i$ consisting of edges of $H$ with at least one endpoint in $C_i$.} \label{fig:recursive-separator} \end{figure} \paragraph{Our Algorithm.} Our algorithm (which we call $\textsc{Interdict}$) largely follows along the lines of $\textsc{Decomposition}$. The main difference is that we also want to delete edges to ensure that size of the separators found in the recursion are small enough so that we succeed in constructing a tree decomposition of width $O(w\log w)$. We still make the same choices about which set $S$ to separate and how to recurse; this allows us to reuse the analysis of $\textsc{Decomposition}$ to prove that we have deleted enough edges to reduce the treewidth down to $O(w \log w)$. In particular, instead of the Separate step, we want to perform a ``Delete and Separate'' step instead. \begin{itemize} \item Delete and Separate: delete a subset $D$ of edges and find a vertex set $X$ of size $O(w \log w)$ such that $X$ is a $\frac{2}{3}$-separator of $S$ in $H-D$. \end{itemize} Here is where LP \eqref{lp:exp} is useful. It is similar to the spreading metric relaxation for finding minimum balanced vertex separators, except that it gives edge-and-vertex separators. As mentioned in the Introduction, one can apply standard region growing techniques in an almost black box fashion along with other tricks to obtain a $(\log^2 n, \log w)$-approximation to treewidth interdiction. \begin{figure*} \centering \hfill \subfloat{\label{fig:embedding}\includegraphics[scale=0.3]{metric-embedding.pdf}} \hfill \subfloat{\label{fig:regiongrowing}\includegraphics[scale=0.3]{metric-partition.pdf}} \hfill \subfloat{\label{fig:region-subgraph}\includegraphics[scale=0.3]{subgraph.pdf}} \hfill{} \caption{$\textsc{Interdict}$ uses the spreading metric given by LP solution (left), partitions the metric into regions with cut vertices shown as hollow vertices and cut edges shown as dashed edges (center), and for each region, recurses on the subgraph contained in it (right). Note that the subgraph includes the cut vertices on the boundary of the region as well.} \label{fig:partitioning} \end{figure*} Obtaining a $(\log n \log \log n, \log w)$-approximation needs some care. At a high level, we want to apply region growing recursively using Seymour's recursion. The basic idea is to ensure that not only is $|D|$ bounded by the cost of the LP solution projected on $H$, but it is also bounded in some nice way by the cost of the LP solution on the subgraphs $H_i$ we recurse on. In particular, we want to use region growing to partition the spreading metric $d^S$ into ``regions'' $B_1, \ldots, B_k$ (illustrated in Figure \ref{fig:partitioning}) with the following properties: \begin{itemize} \item (bounded charge) the set of edges $\delta_x(B_i)$ (vertices $\delta_y(B_i)$ resp.) cut by $B_i$ can be charged to the $x_{uv}$ variables ($y^S_v$ variables, resp.) ``contained'' in the region, \item (containment) each subgraph $H_i$ we recurse on is contained inside a region. \end{itemize} We can then choose $D = \delta_x(B_1) \cup \cdots \cup \delta_x(B_k)$ and $X=\delta_y(B_1) \cup \cdots \cup \delta_y(B_k)$. Due to the structure of the subproblems in the Recurse step, ensuring the second property requires some care with how we implement region growing. The problem is that the separators involve both edges and vertices, and they play different roles, i.e.~edges are deleted globally, while vertices are deleted locally for each $S$. Normally, the region growing technique proceeds by finding a region $B_i$ in the current graph that satisfies the bounded charge property, removes $B_i \cup \delta_y(B_i)$---the vertices contained in or cut by $B_i$ from the graph---and repeats on the residual graph. However, this would also remove any edge $(u,v)$ with $u \in \delta_y(B_i)$, even though $v$ is still remaining in the residual graph. In this case, no future region can contain or cut the edge $(u,v)$. This is a problem if $v$ ends up being in some component $C_i$ later, as we would have a subgraph $H_i$ that is not contained in any region.Thus, we need to somehow preserve edges between $\delta_y(B_i)$ and the residual vertices. We will do this by introducing copies of these edges that we need to preserve, called ``zombie edges". A detailed description of Delete and Separate step as well as the rounding algorithm appears in the next subsection. \subsection{The Delete and Separate Step} \label{sec:algpart} We start by describing the Delete and Separate step sketched out in Section \ref{sec:rounding-sketch}. The main ingredient is the region growing technique. \paragraph{Region Growing.} \label{sec:region} We begin with some standard definitions. We define the ball $B(s,r)$ centered at vertex $s$ with radius $r$ as $B(s,r) = \{v : d^S_{sv} \leq r\}$. We say that a vertex $v$ is \emph{cut} by $B(s,r)$ if $d^S_{sv} - y^S_v < r < d^S_{sv}$, i.e.~$v$ is only ``partially inside'' the ball, and use $\delta_y(s,r)$ to denote the set of vertices cut by $B(s,r)$; likewise, an edge $(u,v)$ is \emph{cut} by $B(s,r)$ if $d^S_{su} \leq r < d^S_{su} + x_{uv}$ and we use $\delta_x(s,r)$ to denote the set of edges cut by $B(s,r)$. We define two quantities for the $x$-cost and $y$-cost. The \emph{cost} $\operatorname{LP-cost}(s,r)$ of $B(s,r)$ is defined to be the total cost of the LP solution ``contained'' in $B(s,r)$: \begin{align*} \operatorname{LP-cost}(s,r) = \sum_{u \in B(s,r), v \in B(s,r) \cup \delta_y(s,r)} x_{uv}\\ +\sum_{(u,v) \in \delta_x(s,r) : u \in B(s,r), v \notin B(s,r)} r - d^S_{su} \end{align*} Similarly, its \emph{weight} is defined to be the total fractional weight that is ``contained'' in $B(s,r)$: \[\operatorname{wt}(s,r) = \sum_{v \in B(s,r)} y^S_v + \sum_{v \in \delta_y(s,r)} r - (d^S_{sv} -y^S_v).\] See Figure \ref{fig:region} for an illustration. The \emph{$x$-volume} and \emph{$y$-volume} is then defined to be $\operatorname{vol}_x(s,r) = \frac{\operatorname{LP-cost}(G)}{n^2} + \operatorname{LP-cost}(s,r)$ and $\operatorname{vol}_y(s,r) = \frac{1}{w} + \operatorname{wt}(s,r)$. These notions also extend to subgraphs. Given a subgraph $H'$, we define $\operatorname{LP-cost}(H') = \sum_{(u,v) \in H'} x_{uv}$ and $\operatorname{wt}(H') = \sum_{v \in H'} y^S_v$. Similarly, $\operatorname{vol}_x(H') = \frac{\operatorname{LP-cost}(G)}{n^2} + \operatorname{LP-cost}(H')$ and $\operatorname{vol}_y(H') = \frac{1}{w} + \operatorname{wt}(H')$. \begin{figure} \centering \includegraphics[scale=0.4]{RegionGrowing} \caption{In this figure, the edge lengths represents the $x$ variables, and vertices are represented as circles whose diameters correspond to their $y^S$ weights. The dashed arc is centered at $v_1$ and has radius $0.8$. We have $B(v_1,0.8) = \{v_1,v_2,v_3\}$. Its boundary edges and vertices are $\delta_x(v_1,0.8) = \{(v_2,v_4),(v_1,v_4)\}$ and $\delta_y(v_1,0.8) = \{v_3\}$, respectively. Towards $\operatorname{vol}_x(v_1,0.8)$, edge $(v_1,v_2)$ contributes $0.1$, $(v_1,v_3)$ contributes $0.3$, $(v_1,v_4)$ contributes $0.7$, and $(v_2,v_4)$ contributes $0.1$. Towards $\operatorname{vol}_y(v_1,0.8)$, $v_1$ contributes $0.1$, $v_2$ contributes $0.5$, and $v_3$ contributes $0.4$.} \label{fig:region} \end{figure} The following lemma shows that there exists a \emph{good} radius $r \in [0,1/12]$ such that the number of edges cut by $B(s,r)$ can be charged to $\operatorname{vol}_x(s,r)$ and simultaneously, the number of vertices cut by $B(s,r)$ can be charged to $\operatorname{vol}_y(s,r)$. \begin{lemma}[Region Growing Lemma] \label{lem:region} For every vertex $s$, we can efficiently find a \emph{good} radius $r \in [0,1/12]$ such that \begin{align*} |\delta_x(s,r)| &\leq O(\log \log n) \cdot \ln \frac{\operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,r)} \cdot \operatorname{vol}_x(s,r),\\ |\delta_y(s,r)| &\leq \kappa \cdot \log w \cdot \operatorname{vol}_y(s,r), \end{align*} for some constant $\kappa$. \end{lemma} \begin{proof} Say that $r$ is \emph{$x$-good} if it satisfies the first inequality and \emph{$y$-good} if it satisfies the second inequality. Set $r(n):=\ln \ln [e (n + 1)]$ and define the following sets of radii: \begin{align*} A_x = &\Bigl\{r \in [0,1/12] : \\ &\frac{|\delta_x(s,r)|}{\operatorname{vol}_x(s,r)} > 48 \cdot \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,r)} \cdot r(n) \Bigr\}, \end{align*} \begin{align*} A_y &= \left\{r \in [0,1/12] : \frac{|\delta_y(s,r)|}{\operatorname{vol}_y(s,r)} > 48 \cdot \ln (w^2+1)\right\}. \end{align*} In other words, $A_x$ and $A_y$ are the sets of radii that are $x$-bad and $y$-bad, respectively. We claim that the measure of both $A_x$ and $A_y$ are small: $\mu(A_x), \mu(A_y) \leq 1/48$. The claim then implies that there exists $r \in [0, 1/12]$ that is simultaneously $x$-good and $y$-good. Observe that $\frac{\partial \operatorname{vol}_x(s,r)}{\partial r} = |\delta_x(s,r)|$ and $\frac{\partial \operatorname{vol}_y(s,r)}{\partial r} = |\delta_y(s,r)|$. Suppose, towards a contradiction, that $\mu(A_x) > 1/48$. We have \begin{align*} &\frac{\partial}{\partial r} \left(-\ln \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,r)}\right)\\ &= \frac{|\delta_x(s,r)|}{\operatorname{vol}_x(s,r)\cdot \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,r)}} \end{align*} So \begin{align*} &\ln \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,0)}\\ &= -\ln \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,r)} \ \Bigg|^{1/12}_0 \\ &= \int_0^{1/12} \frac{|\delta_x(s,r)|}{\operatorname{vol}_x(s,r)\cdot \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,r)}}\, \partial r \\ &\geq \mu(A_x) \cdot 48 \ln \ln [e (n + 1)] > r(n). \end{align*} But \[\ln \ln \frac{e \cdot \operatorname{vol}_x(s,1/12)}{\operatorname{vol}_x(s,0)} \leq \ln \ln \frac{e (\operatorname{vol}_x + \operatorname{vol}_x/n)}{\operatorname{vol}_x/n} = r(n).\] Thus, we have a contradiction and so $\mu(A_x) \leq 1/48$. We now turn to bounding $\mu(A_y)$. Suppose, towards a contradiction, that $\mu(A_y) > 1/48$. \begin{align*} \ln \frac{\operatorname{vol}_y(s,1/48)}{\operatorname{vol}_y(s,0)} &= \int_0^{1/12} \frac{1}{\operatorname{vol}_y(s,r)} \frac{\partial \operatorname{vol}_y(s,r)}{\partial r}\, \partial r\\ &= \int_0^{1/12} \frac{|\delta_y(s,r)|}{\operatorname{vol}_y(s,r)}\, \partial r \\ &\geq \mu(A_y) \cdot 48 \ln (w^2+1) > \ln (w^2+1). \end{align*} But \[\ln \frac{\operatorname{vol}_y(s,1/48)}{\operatorname{vol}_y(s,0)} \leq \ln \frac{w + 1/w}{1/w} = \ln(w^2 + 1).\] Therefore, both $\mu(A_x), \mu(A_y) \leq 1/48$ and so there exists $r \in [0, 1/12]$ that is simultaneously $x$-good and $y$-good. To find such an $r$ efficiently, note that as $r$ grows, $\operatorname{vol}_x(s,r)$ and $\operatorname{vol}_y(s,r)$ are non-decreasing. Thus, we only need to check the condition at points $r$ when either $\delta_x(s,r)$ and $\delta_y(s,r)$ changes, which happens at most $2|V'|$ and $2|E'|$ times, respectively. This is because as $r$ grows, once a vertex leaves $\delta_y(s,r)$, it is inside $B(s,r)$ and will never reappear in $\delta_y(s,r)$; and once an edge leaves $\delta_x(s,r)$, both of its endpoints are inside $B(s,r)$ and the edge will never reappear in $\delta_y(s,r)$. \end{proof} The next lemma shows that as we grow a ball $B(s,r)$ around vertex $s$, as long as $r \leq 1/12$, it cannot contain more than two-thirds of $S$. \begin{lemma} \label{lem:radius} Let $U$ be a set of vertices. If $\max_{u,v \in U}d^S_{uv} \leq 1/6$, then $|U \cap S| \leq 2|S|/3$. \end{lemma} \begin{proof} We prove the contrapositive. Suppose, that $|U \cap S| > 2|S|/3$. Let $u$ be a vertex in $U \cap S$. The spreading constraints imply that \[\sum_{v \in U \cap S} d^S_{uv} \geq |U \cap S| - \frac{|S|}{2} > |U \cap S| - \frac{3|U \cap S|}{4} = \frac{|U \cap S|}{4}.\] Thus, by averaging, there exists $v \in U \cap S$ such that $d^S_{uv} > 1/4 > 1/6$. \end{proof} We are now ready to describe the $\textsc{Partition}$ algorithm, which executes the Delete and Separate component of our algorithm. Recall that in the Delete and Separate step, the input is a subgraph $H = (V',E')$ and a vertex set $S \subseteq V'$, and our goal is find a set $D$ of edges to delete and a vertex set $X$ of size $O(w \log w)$ such that $X$ is a $\frac{2}{3}$-separator of $S$ in $H-D$. \paragraph{The $\textsc{Partition}$ algorithm.} \begin{enumerate} \item Initialization. Let $\hat{H} = H$ \item Region growing. While $\hat{H}$ contains more than two-thirds of $S$, \begin{enumerate} \item Find region. Choose an arbitrary vertex $v \in S$ that is contained in $\hat{H}$ and find a good radius $r$ such that $B(v,r)$ satisfies the conditions of Lemma \ref{lem:region}. Note that distances, balls and boundaries are defined with respect to $\hat{H}$. \item Removal. Remove all vertices in $B(v,r)$ and their incident edges from $\hat{H}$. \item Add zombies. For each edge $(s,u)$ that was removed, if $s \in \delta_y(v,r)$ and $u$ is still in $\hat{H}$, add \emph{zombie vertex} $z_u(s)$ with weight $y^S_{z_u(s)} = 0$ to $\hat{H}$ and \emph{zombie edge} $(z_u(s), u)$ with length $x_{z_u(s),u} = x_{su}$. \end{enumerate} \item Let $B(v_i,r_i)$ be the ball found in the $i$-th iteration. \item Return the vertex set $X = \bigcup_i \delta_y(v_i,r_i)$ and the edge set $D = \bigcup_i \delta_x(v_i,r_i)$, replacing each zombie vertex $z_u(s)$ in $X$ with its original vertex $s$ and each zombie edge $(z_u(s), u)$ in $D$ with its original edge $(s,u)$. \end{enumerate} \begin{lemma} \label{lem:partitioning} Suppose $\textsc{Partition}$ took $\ell$ iterations and let $B(v_1,r_1), \ldots, B(v_\ell,r_\ell)$ be the regions it found. Let $C_1, \ldots, C_k$ be the components of $H-X-D$. For every $j \in [k]$, define the subgraph $H_j = (V_j,E_j)$ where $E_j$ is the subset of $E'-D$ with at least one endpoint in $C_j$, and $V_j$ is the set of endpoints of $E_j$. We have the following: \begin{enumerate} \item $|D| \leq O(\log \log n) \cdot\sum_{i=1}^\ell \ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(v_i,r_i)}\right) \operatorname{vol}_x(v_i,r_i)$, \item $|X| \leq \gamma \cdot (w +|S|/w) \log w$, for some constant $\gamma$, \item $|C_i \cap S| \leq 2|S|/3$, and \item The edge set $E_j$ of each subgraph $H_j$ is either contained in a region $B(v_i,r_i)$ (and so $\operatorname{vol}_x(H_j) \leq \operatorname{vol}_x(v_i,r_i)$) or it is contained in the residual graph $\hat{H}$ at the end of the execution of $\textsc{Partition}$. \end{enumerate} \end{lemma} \begin{proof} The first statement follows from the fact that we chose a good radius $r_i$ for each region $B(v_i,r_i)$ and that the $x$-volume of any region can be at most $\operatorname{vol}_x(H)$. Let us now consider the second statement. The fact that we chose a good radius for each region implies that \[|X| = \sum_{i=1}^\ell |\delta_y(v_i,r_i)| \leq \kappa \cdot \log w \sum_{i=1}^\ell \operatorname{vol}_y(v_i,r_i)\] for some constant $\kappa$. Recall that $\operatorname{vol}_y(v_i,r_i) = \operatorname{wt}(v_i,r_i) + 1/w$. Since each vertex can only contribute towards the weight of at most one region and zombie vertices have zero weight, the total weight of any region is at most $\sum_{v \in V'}y^S_v \leq w$. So, $\sum_{i=1}^\ell \operatorname{vol}_y(v_i,r_i) \leq (w + \ell/w)$. Moreover, since the center of each region is a vertex $v_i$ of $S$, we remove at least one vertex of $S$ in each iteration. Thus, the number of iterations $\ell$ can be at most $|S|$. So, $|X| \leq \kappa \cdot \log w \cdot (w + \ell/w) \leq \kappa \cdot (w + |S|/w) \log w$ and this proves the second statement of the lemma. Next, we argue that $|C_i \cap S| \leq 2|S|/3$. If $C_i$ was a component that remained at the end of the execution of $\textsc{Partition}$, then by definition, $|C_i \cap S| \leq 2|S|/3$. Suppose $C_i$ was a component that is contained in $B(v_i,r_i)$. By Lemma \ref{lem:radius}, it suffices to check that the distance between any two remaining vertices $u$ and $v$ at the start of iteration $i$ is at least $d^S_{uv}$. Over the previous iterations, $\textsc{Partition}$ modifies the graph in two ways: by removing edges and vertices, and by introducing zombie edges. Removing edges and vertices clearly cannot decrease the distance between $u$ and $v$. Zombie edges do not create a shortcut between $u$ and $v$ either. Thus, the distance between $u$ and $v$ in iteration $i$ is at least $d^S_{uv}$. Finally, each subgraph $H_j$ is connected (since they are the set of edges with one endpoint in a connected component $C_j$), thus for each region $B(v_i,r_i)$, either all the vertices of $H_j$ are in $B(v_i,r_i)$ or all of them are not in $B(v_i,r_i)$. \end{proof} \subsection{Putting it together} We are now ready to describe the $\textsc{Interdict}$ algorithm, which recursively rounds a feasible solution to LP \eqref{lp:exp}. It takes as input a subgraph $H = (V',E')$ and a vertex set $S$, and deletes a set of edges $F$ such that $\operatorname{tw}(H-F) \leq O(w \log w)$. Let $\gamma$ be the constant in Lemma \ref{lem:partitioning}. \paragraph{The $\textsc{Interdict}$ Algorithm.} \begin{enumerate} \item Delete and Separate. Use algorithm $\textsc{Partition}$ to find a set $D$ of edges to delete and a $\frac{2}{3}$-separator $X$ of $S$ in $H-D$. Let $C_1, \ldots, C_k$ be the components of $H-D-X$. Delete $D$. \item Define subproblems. For $i \in [k]$, define the subgraph $H_i = (V_i,E_i)$ where $E_i$ is the subset of $E'-D$ with an endpoint in $C_i$, and $V_i$ is the set of endpoints of $E_i$. \item Recurse. For $i \in [k]$, call $\textsc{Interdict}(H_i, V_i \cap (X \cup S))$. \end{enumerate} To round a feasible solution of LP \eqref{lp:exp}, we call $\textsc{Interdict}(G,S_0)$ where $S_0$ is an arbitrary set of at most $O(w \log w)$ vertices. Let $F$ be the set of edges deleted by $\textsc{Interdict}(G,S_0)$. \begin{lemma} \label{lem:tree-dec} $\operatorname{tw}(G - F) \leq O(w \log w)$. \end{lemma} \begin{proof} We can apply exactly the same analysis of the classic tree decomposition algorithm \cite{RobertsonS95b} to argue that the $O(w \log w)$-size separators found in the recursion can be used to construct a tree decomposition $T$ of $G-F$ such that the width of $T$ is at most $O(w \log w)$. \end{proof} Recall that $\operatorname{LP-cost}(G) = \sum_{(u,v) \in E} x_{uv}$, the cost of the LP solution $(\pmb{x}, \pmb{y}, \pmb{d})$. \begin{lemma} \label{lem:F-cost} $|F| \leq O(\log n\log \log n)\operatorname{LP-cost}(G)$. \end{lemma} \begin{proof} Let $k$ be the recursion depth of $\textsc{Interdict}(G,S_0)$. For each depth $j$, let $\mathcal{H}_j$ be the collection of subgraphs that $\textsc{Interdict}$ recursed on at depth $j$, and for each $H \in \mathcal{H}_j$, let $R(H)$ be the set of regions found by $\textsc{Partition}$ when $\textsc{Interdict}$ recursed on $H$. (Note that at depth $0$, we have $\mathcal{H}_0 = \{G\}$.) By Lemma \ref{lem:partitioning}, we have the following bound on $|F|$: \begin{equation} |F| \leq O(\log \log n) \cdot \sum_j \sum_{H \in \mathcal{H}_j} \sum_{B(s,r) \in R(H)}\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r).\label{eq:F-cost} \end{equation} For each edge $(u,v) \in E$, define $g(u,v) = x_{uv} + \frac{\operatorname{LP-cost}(G)}{n^2}$. We have that \begin{equation} \sum_{(u,v) \in E}g(u,v) \leq 2\operatorname{LP-cost}(G).\label{eq:total-g} \end{equation} We now show that $\sum_j \sum_{H \in \mathcal{H}_j} \sum_{B(s,r) \in R(H)}\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r) \leq O(\log n) \sum_{(u,v) \in E} g(u,v)$. We will do this by charging $\sum_{H \in \mathcal{H}_j} \sum_{B(s,r) \in R(H)}\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r)$ to edges of the subgraphs in $\mathcal{H}_j$ and proving that every edge $(u,v)$ receives a total charge, across all depths, of at most $O(\log n) g(u,v)$. Our charging scheme is as follows: for each subgraph $H \in \mathcal{H}_j$ and each region $B(s,r) \in R(H)$, charge $\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right) g(u,v)$ to each edge $(u,v)$ with at least one endpoint in $B(s,r)$. Let us first see why the total amount charged per region $B(s,r) \in R(H)$ is at least $\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r)$. Let $E_H(s,r)$ be the edges with at least one endpoint in $B(s,r)$. This is exactly the set of edges that contribute to the region's $x$-volume $\operatorname{vol}_x(s,r)$. Therefore, \begin{align*} \sum_{(u,v) \in E_H(s,r)} g(u,v) &\geq \sum_{(u,v) \in E_H(s,r)} x_{uv} + \frac{\operatorname{LP-cost}(G)}{n^2}\\ &\geq \operatorname{vol}_x(s,r) \end{align*} and so the total amount charged is at least $\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r)$. Overall, we have \begin{equation} \sum_j \sum_{H \in \mathcal{H}_j} \sum_{B(s,r) \in R(H)}\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r) \leq \sum_{(u,v) \in E} \phi(u,v),\label{eq:charge-uv} \end{equation} where $\phi(u,v)$ is the total charge received by $(u,v)$. Fix an edge $(u,v) \in E$. Let us now upper bound $\phi(u,v)$. Since $\textsc{Interdict}$ recurses on edge-disjoint subgraphs, $(u,v)$ is contained in at most one subgraph of $\mathcal{H}_j$ for each depth $j$, and if it does not belong to a subgraph of $\mathcal{H}_j$, then it does not belong to any subgraph of $\mathcal{H}_{j'}$ at lower depths $j' > j$. In the worst case, $(u,v)$ is contained in some subgraph $H_j \in \mathcal{H}_j$ for every depth $j$. Let us assume this is so and define $B(s_j,r_j) \in R(H_j)$ to be the region containing $(u,v)$. Lemma \ref{lem:partitioning} tells us that all of $H_j$ is contained in the region $B(s_{j-1},r_{j-1})$ for each $j$ and so $\operatorname{vol}_x(s_j, r_j) \geq \operatorname{vol}_x(H_{j+1})$. Thus, \begin{align*} \phi(u,v) &= \sum_{j=0}^k \ln\left(\frac{\operatorname{vol}_x(H_j)}{\operatorname{vol}_x(s_j,r_j)}\right) g(u,v)\\ &\leq \sum_{j=0}^k \ln\left(\frac{\operatorname{vol}_x(H_j)}{\operatorname{vol}_x(H_{j+1})}\right) g(u,v)\\ &\leq \ln\left(\frac{\operatorname{vol}_x(G)}{\operatorname{vol}_x(H_{k+1})}\right) g(u,v) \\ &\leq \ln (n^2+1) g(u,v), \end{align*} where the last inequality follows from the fact that $x$-volume is always at least $\frac{\operatorname{LP-cost}(G)}{n^2}$. Combining this with Inequality \eqref{eq:charge-uv}, we get \begin{align*} &\sum_j \sum_{H \in \mathcal{H}_j} \sum_{B(s,r) \in R(H)}\ln\left(\frac{\operatorname{vol}_x(H)}{\operatorname{vol}_x(s,r)}\right)\operatorname{vol}_x(s,r)\\ &\leq \sum_{(u,v) \in E} \ln (n^2+1) g(u,v)\\ &\leq 2\ln (n^2+1) \operatorname{LP-cost}(G), \end{align*} where the last inequality follows from Inequality \eqref{eq:total-g}. Finally, plugging this into the right hand side of \eqref{eq:F-cost} gives us $|F| \leq O(\log n \log \log n)\operatorname{LP-cost}(G)$, as desired. \end{proof} Lemmas \ref{lem:F-cost} and \ref{lem:tree-dec} imply Lemma \ref{lem:tw-oracle}. \section{Using the LP} \label{sec:LP} We now come to the problem of how to handle the LP \eqref{lp:exp} in $n^{O(1)}$ time. As discussed in the Introduction, we bypass the need to completely solve this LP using the Round-or-Separate framework. A crucial ingredient here is that if the rounding step gets stuck (is unable to find a small separator), we need to find a violated inequality for the $x$-variables, and not just for the LP \eqref{lp:exp}. In Section \ref{s:lp:part1} we show how to reformulate LP \eqref{lp:exp} to only have the $x$ variables. In this reformulation, the coefficients of the inequalities come from feasible points in a polytope with exponentially many variables, so Section \ref{s:lp:part2} deals with how to fix such a violated inequality. \subsection{Reformulating the LP} \label{s:lp:part1} We first reformulate LP \eqref{lp:exp}---the original LP with variables $(\pmb{x},\pmb{y},\pmb{d})$---to obtain another LP with only $x$-variables. Call a vector $\pmb{x}$ \emph{feasible} if there exist vectors $\pmb{y}$ and $\pmb{d}$ such that $(\pmb{x}, \pmb{y}, \pmb{d})$ is a feasible solution to LP \eqref{lp:exp}. Define $\mathcal{F}$ to be the set of all feasible vectors $\pmb{x}$, and observe that $\mathcal{F}$ is simply the feasible region of LP \eqref{lp:exp} with the $y$ and $d$ variables projected out. Next, we show how to describe $\mathcal{F}$ using linear inequalities. For every vertex set $S$, we define an LP parameterized by $\pmb{x}$ (see Figure \ref{fig:lpS}). We call this $\operatorname{sep-LP}(\pmb{x}, S)$. \begin{figure*}[htp] \centering \begin{equation} \boxed{ \label{lp:S} \begin{aligned} \mbox{min} \quad & \sum_v y_v\\ \mbox{s.t.}\quad & d_{uv} \leq \sum_{e \in E(P)} x_e + \sum_{t \in V(P)} y_t &\quad \forall u,v \in V, P \in \mathcal{P}(u,v) \\ & \sum_{u \in T} d_{uv} \geq |T| - |S|/2 & \quad \forall T \subseteq S \subseteq V, v \in T \end{aligned} } \end{equation} \caption{$\operatorname{sep-LP}(\pmb{x},S)$} \label{fig:lpS} \end{figure*} We emphasize that in this LP, only $\pmb{y}$ and $\pmb{d}$ are variables. Recall that this LP is related to the problem of finding a small balanced vertex separator of $S$ in $G$, provided the edges are removed fractionally to extent $x_e$. \begin{definition} Let $\lambda(\pmb{x},S)$ be the value of the optimum solution to the $\operatorname{sep-LP}(\pmb{x}, S)$. We say that $\pmb{x}$ is \emph{$S$-feasible} if $\lambda(\pmb{x}, S) \leq w$, and denote by $\mathcal{F}(S)$ the set of $S$-feasible vectors. \end{definition} \begin{lemma} \label{lem:equiv} $\mathcal{F} = \bigcap_{S \subseteq V} \mathcal{F}(S)$. \end{lemma} \begin{proof} Suppose $\pmb{x} \in \mathcal{F}$. Then, for every vertex set $S$, the vectors $\pmb{y}^S$ and $\pmb{d}^S$ are a feasible solution to $\operatorname{sep-LP}(\pmb{x},S)$ and $\sum_v y^S \leq w$, so $\lambda(\pmb{x},S) \leq w$. On the other hand, suppose $\lambda(\pmb{x}, S) \leq w$ for all vertex sets $S$. Define $\pmb{y}$ and $\pmb{d}$ such that for each $S \in \mathcal{S}$, $(\pmb{y}^S, \pmb{d}^S)$ is the optimal solution to $\operatorname{sep-LP}(\pmb{x},S)$. As $\lambda(\pmb{x}, S) \leq w$ for all $S \in \mathcal{S}$, we have that $(\pmb{x}, \pmb{y}, \pmb{d})$ is a feasible solution to LP \eqref{lp:exp}. \end{proof} Thus, to describe $\mathcal{F}$ using linear inequalities, it suffices to describe $\mathcal{F}(S)$ using linear inequalities. By linear programming duality, we have that $\lambda(\pmb{x},S) \leq w$ if and only if for every feasible solution to the dual of $\operatorname{sep-LP}(\pmb{x},S)$ has objective value at most $w$. So we consider the dual LP \eqref{lp:S-dual} (Figure \ref{fig:flowLP}), and denote it by $\operatorname{flow-LP}(\pmb{x},S)$. (We call this $\operatorname{flow-LP}$ as it is dual to a ``cut-type'' LP.) \begin{lemma} \label{lem:dual} The dual to $\operatorname{sep-LP}(\pmb{x},S)$ is given by LP \eqref{lp:S-dual} below. \end{lemma} \begin{proof} Let us introduce the variables $f^{uv}_P$ for the first set of constraints in LP \eqref{lp:S}, and the variables $ g_{T,v}$ for the second set of constraints. Again, we emphasize that only $f$ and $g$ are variables here (and that $x$ is not a variable). Let us check that the dual is exactly LP \eqref{lp:S-dual}. Rewrite the first set of primal constraints as \[\sum_{t \in V(P)} y_t - d_{uv} \geq -\sum_{e \in E(P)} x_e \quad \forall u,v \in V, P \in \mathcal{P}(u,v)\] In the objective, the coefficient of $f^{uv}_P$ is $-\sum_{e \in E(P)} x_e$ and the coefficient of $g_{T,v}$ is $|T| - |S|/2$. The dual constraints correspond to primal variables $d_{uv}$ and $y_t$. In the primal, the variable $d_{uv}$ has a coefficient of $-1$ for the constraints corresponding to the dual variables $f^{uv}_P$ for $P \in \mathcal{P}(u,v)$, and a coefficient of $1$ in the constraints corresponding to the dual variables $g_{T,t}$ for $t \in \{u,v\}$ and $T \ni t$. Similarly, the variable $y_t$ has a coefficient of $1$ for the constraints corresponding to the dual variables $f^{uv}_P$ for $u,v \in V$ and $P \in \mathcal{P}(u,v)$ such that $t \in V(P)$. So, LP \eqref{lp:S-dual} is dual to LP \eqref{lp:S}. \end{proof} \begin{figure*} \centering \begin{equation} \boxed{ \label{lp:S-dual} \begin{aligned} \mbox{max} \quad &\sum_{T \subseteq S, v \in T} g_{T,v}(|T| - |S|/2) - \sum_{u,v \in V; P \in \mathcal{P}(u,v)} f^{uv}_P\left[\sum_{e \in P} x_e\right]\\ \mbox{s.t.}\quad & \sum_{T \subseteq V : u, v \in T} g_{T,u} + g_{T,v} \leq \sum_{P \in \mathcal{P}(u,v)} f^{uv}_P &\quad \forall u,v \in V,\\ & \sum_{u,v \in V} \sum_{P \in \mathcal{P}(u,v): t \in V(P)} f^{uv}_P \leq 1 &\quad \forall t \in V\\ \end{aligned} } \end{equation} \caption{$\operatorname{flow-LP}(\pmb{x},S)$.} \label{fig:flowLP} \end{figure*} \paragraph{Separation oracle for $\mathcal{F}(S)$.} Given a solution $(\pmb{f}, \pmb{g})$ to $\operatorname{flow-LP}(\pmb{x},S)$, we denote its objective value as $\operatorname{flow-LP}(\pmb{x},S,\pmb{f},\pmb{g})$. LP duality implies the following lemma. \begin{lemma} \label{lem:ineqs} $\pmb{x} \in \mathcal{F}(S)$ if and only if $\operatorname{flow-LP}(\pmb{x},S,\pmb{f},\pmb{g}) \leq w$ for all feasible dual solutions $(\pmb{f}, \pmb{g})$. \end{lemma} Let us see what we have achieved so far. The expression $\operatorname{flow-LP}(\pmb{x},S,\pmb{f},\pmb{g}) \leq w$ is a linear constraint on $x$, whose coefficients $(\pmb{f}, \pmb{g})$ are feasible points in the polytope given by \eqref{lp:S-dual}. Now we crucially note that the coefficients of the constraints on $(\pmb{f}, \pmb{g})$ depend only on the topology of the graph $G$ and not on $\pmb{x}$. \begin{definition} We say that $(\pmb{f}, \pmb{g})$ is \emph{$S$-valid} if it satisfies the constraints of $\operatorname{flow-LP}(\pmb{x},S)$. \end{definition} Thus, Lemma \ref{lem:ineqs} gives a description of $\mathcal{F}(S)$ in terms of linear inequalities. Together with Lemma \ref{lem:equiv}, we get a description of $\mathcal{F}$ in terms of linear inequalities and so we can reformulate LP \eqref{lp:exp} as follows. \begin{equation} \boxed{ \label{lp:poly} \begin{aligned} \mbox{min} \quad & \sum_{(u,v) \in E} x_{uv}\\ \mbox{s.t.}\quad & \operatorname{flow-LP}(\pmb{x},S,\pmb{f},\pmb{g})\leq w \quad\forall S \subseteq V, (\pmb{f}, \pmb{g}) \mbox{ $S$-valid} \end{aligned} } \end{equation} \subsection{Round or Separate} \label{s:lp:part2} We will work with the reformulated LP \eqref{lp:poly}. One immediate obstacle is that it is unclear how to get an efficient separation oracle for $\mathcal{F}$. In fact, even for a fixed vertex set $S$, it is not immediately clear how to find a violated inequality for $\mathcal{F}(S)$. The problem is that for any constraint, the coefficients of the $x$-variables are based on $\pmb{f},\pmb{g}$, which need to satisfy LP \eqref{lp:S-dual}, and it is not clear how to generate them; e.g. there are exponentially many $\pmb{f}, \pmb{g}$ variables in $\operatorname{flow-LP}(\pmb{x},S)$. To get over these problems, we do the following. We apply the Round-or-Separate framework with the $\textsc{Interdict}$ algorithm in Section \ref{sec:ROS}. Roughly speaking, we start with some candidate solution $\pmb{x}$ (possibly infeasible), and try to construct a tree decomposition of width $O(w \log w)$ using $\textsc{Interdict}$. If we succeed, we are done. Otherwise, $\textsc{Interdict}$ could not find a small balanced separator for some vertex set $S$, and this can only happen if $\pmb{x} \notin \mathcal{F}(S)$. Later, in Lemma \ref{lem:sep-oracle}, we give an efficient procedure that given $\pmb{x}$ and $S$, determines whether $\pmb{x} \in \mathcal{F}(S)$ and if so, outputs a solution $(\pmb{y}^S, \pmb{d}^S)$ that is feasible to $\operatorname{sep-LP}(\pmb{x},S)$ and satisfies $\sum_v y^S_v \leq w$; otherwise, it outputs a separating hyperplane, i.e. an $S$-valid $(\pmb{f},\pmb{g})$ such that $\operatorname{flow-LP}(\pmb{x},S,\pmb{f},\pmb{g}) > w$. In the first case, $\textsc{Interdict}$ can use $(\pmb{y}^S, \pmb{d}^S)$ to find a $O(w \log w)$-size separator of $S$ and make progress. In the second case, we can add the separating hyperplane to find a new candidate $x$ and repeat the whole tree decomposition procedure. By the standard Ellipsoid method-based, separation-versus-optimization framework, the number of such iterations is polynomially bounded. It remains to show how to efficiently separate $\mathcal{F}(S)$ for any given subset $S$. We will do this indirectly by using the Ellipsoid Method and applying duality to $\operatorname{sep-LP}(\pmb{x}, S)$. \begin{lemma} \label{lem:sep-oracle} There exists a polynomial-time algorithm that given $\pmb{x}$ and $S$, determines whether $\pmb{x} \in \mathcal{F}(S)$, and if so, outputs a solution $(\pmb{y}^*, \pmb{d}^*)$ that is feasible to $\operatorname{sep-LP}(\pmb{x},S)$ and satisfies $\sum_v y^*_v \leq w$; otherwise, it finds a violated inequality for LP \eqref{lp:poly}. \end{lemma} \begin{proof} We apply the Ellipsoid method to find an optimal solution $(\pmb{y}^*,\pmb{d}^*)$ to $\operatorname{sep-LP}(\pmb{x}, S)$. We can do this efficiently by using a separation oracle that uses Dijkstra's algorithm to determine the distances $\pmb{d}$ given $\pmb{x}$ and $\pmb{y}$. If $\sum_v y^*_v \leq w$, then $\pmb{x} \in \mathcal{F}(S)$ by definition. On the other hand, if $\sum_v y^*_v > w +\epsilon$ (where $\epsilon$ can be made exponentially small), then we can find a violated inequality for \eqref{lp:poly} as follows. As the Ellipsoid method added only polynomially many constraints we can re-solve this LP only on these added constraints and assume that $\pmb{y}^*$ is a solution to this smaller LP on only polynomially many constraints. By complementary slackness, there exists an optimal dual solution $(\pmb{f}^*, \pmb{g}^*)$ where the only non-zero dual variables are those that correspond to these polynomially many primal constraints. Thus, it suffices to solve $\operatorname{flow-LP}(\pmb{x},S)$ restricted to these dual variables which makes $\operatorname{flow-LP}(\pmb{x},S)$ polynomial in size. The objective function in $\operatorname{flow-LP}$ then gives the violated inequality for LP \eqref{lp:poly}. \end{proof} \section{Bounded Size Interdiction and MIS in Noisy Planar Graphs} \label{sec:MIS} We consider the Bounded Size Interdiction problem and show how it implies Theorem \ref{thm:MIS}. Consider the noisy graph $G$ obtained by adding $\delta n$ edges to some planar $G_0$. Let us view $G$ as obtained by superimposing the noisy edges on the recursive decomposition of $G_0$ given by Lemma \ref{thm:LT}. This directly implies the following (noisy) decomposition for $G$. \begin{lemma}[Noisy Decomposition] \label{lemma:rough-decompo} Given a $\delta$-noisy planar graph $G$, for any $\alpha >0$, there exists a partition $X,C_1,\ldots,C_k$ of $V$ with (i) $|X| \leq c\alpha n$ for some universal constant $c$, (ii) $|C_i| \leq 1/\alpha^2$ for all $i\in [k]$, and (iii) at most $\delta n$ edges whose endpoints lie in distinct (two different) $C_i$s. \end{lemma} Of course as we do not know $G_0$, it is not clear how to find such a decomposition. Theorem \ref{lem:noisy-LT} shows that this can be done approximately. \begin{theorem}[Noisy Bounded Size Interdiction] \label{lem:noisy-LT} Let $G = (V,E)$ be any graph that has a vertex partition $X,C_1,\ldots,C_k$ with $|C_i| \leq s$ for each $i \in [k]$, and let $b$ be the total number of edges whose endpoints lie in distinct $C_i$s. Then for every $\beta \leq 1$, we can find in time $n^{O(s)}$ a vertex partition $X',C'_1,\ldots,C'_{k'}$ such that (i) $|X'| = O(|X|/\beta)$, (ii) $|C'_i| \leq s$ for each $i\in [k']$, and (iii) at most $O(b + \beta |E|)$ edges whose endpoints lie in distinct $C_i$s. \end{theorem} This implies the following proper decomposition (where the $C'_i$ are components of $G[V-X]$). \begin{corollary} \label{cor:bis} There is a subset $X' \subset V$ of size $O(|X|/\beta + b + \beta |E|)$ such that the components in $G[V-X']$ have size at most $s$. \end{corollary} \begin{proof} For each edge $(u,v)$ with $u \in C'_i$ and $v \in C'_j$ for $i\neq j\in [k']$, put an endpoint (say $u$) in $X'$ and remove $u$ from $C'_i$. As a result, $X'$ has size $ O(|X|/\beta + b + \beta |E|)$ and there are no edges between different $C'_i$ and $C'_j$. \end{proof} Before we prove Theorem \ref{lem:noisy-LT}, let us first see how it implies Theorem \ref{thm:MIS}. \smallskip \begin{proofof}[Theorem \ref{thm:MIS}] Given an $\epsilon > 0$, set $\gamma = O(\epsilon^2)$. Applying Lemma \ref{lemma:rough-decompo} with $\alpha=\gamma$, $G$ has a noisy decomposition with $|X| = O(\gamma n)$ and pieces $C_i$ of size $s=1/\gamma^2$ and at most $b=\delta n$ edges between these $C_i$'s. Moreover $G$ has at most $(3 + \delta )n \leq 4n$ edges. Applying Corollary \ref{cor:bis} with $\beta = \gamma^{1/2}$, gives an $X'$ of size $O(|X|/\gamma^{1/2} + \delta n + \gamma^{1/2} n) = O( (\epsilon + \delta)n)$, such that the components of $G[V-X']$ have at most $1/\gamma^2 = 1/\epsilon^4$ vertices. By exhaustive search, find an MIS in each $C_i$ separately and return their union $I$. Clearly, $I$ is a valid independent set. By Theorem \ref{lem:noisy-LT}, the algorithm has overall running time $n^{O(1/\gamma^2)} = n^{O(1/\epsilon^4)}$. As $G_0$ is planar and hence $4$-colorable, and $G\setminus G_0$ has at most $\delta n$ noisy edges, $\alpha(G) \geq \alpha(G_0) - \delta n \geq n/4 - \delta n.$ Moreover, as $|I| \geq \alpha(G) - |X'|$, this gives $|I| \geq (1- O(\epsilon +\delta)) \alpha(G)$. \end{proofof} \noindent {\em Remark.} Theorem \ref{thm:MIS} extends directly to the minor-free case using the separator theorem for minor-free graphs \cite{AST}, and the fact that these graphs have bounded average degree and thus $\alpha(G) = \Omega(n)$. \subsection{Proof of Theorem \ref{lem:noisy-LT}} \label{sec:noisy-LT} \paragraph{LP formulation.} Given $0 < \beta \leq 1$ and $G$ as input, we first write an integer program to find $X$ and the $C_i$s. Let $a=|X|$ (we can assume that $a$ is known as the algorithm can try every value). For each vertex $v$, the variable $y_v$ indicates if $v \in X$. For each subset $S\subset V$ with $|S|\leq s$, the variable $z_S$ indicates if $S$ is one of the pieces $C_i$. Let $\mathcal{S}$ be the collection of all such subsets $S$. For each $(u,v)\in E$, the variable $x_{uv}$ indicates whether the edge $(u,v)$ is such that $u \in C_i$ and $v \in C_j$ for some $i \neq j$. Consider the integer program IP \eqref{lp:partition} in Figure \ref{fig:lppart}. \begin{figure*} \centering \begin{equation} \boxed{ \label{lp:partition} \begin{aligned} \mbox{min} \quad & \sum_{(u,v) \in E} x_{uv}\\ \mbox{s.t.}\quad & \sum_v y_v \leq a \quad \\ & \sum_{S : v \in S } z_S = 1 - y_v &\quad \forall v \in V\\ & \sum_{S : u \in S \wedge v \notin S} z_S \leq x_{uv} + y_v &\quad \forall (u,v) \in E\\ & x_{uv},y_v,z_S \in \{0,1\} &\quad \forall (u,v) \in E, v \in V, S \in \mathcal{S} \end{aligned} } \end{equation} \caption{IP for the Bounded Size Interdiction Problem.} \label{fig:lppart} \end{figure*} This is easily seen to be a valid formulation for the problem. The first set of constraints ensure that $X$ contains at most $a$ vertices. The second set of constraints ensure that each vertex lies in either $X$ or some $C_i$. The third set of constraints are more involved and force $x_{uv}$ to be $1$ if some edge has endpoints in distinct $C_i$ and $C_j$. In particular, it says that if $u$ lies in some $C_i$ and $v$ does not lie in that $C_i$, then either $v$ lies in $X$ (i.e.~$y_v=1$) or $x_{uv}=1$. Note that the third set of constraints are asymmetric in $u$ and $v$, and we will put two such constraints (with $u$ and $v$ swapped) for each edge $(u,v)$. As the objective function exactly measures the number of edges with endpoints in two different $C_i$'s, it follows that the IP above has a feasible solution with value at most $\delta n$. Consider the LP relaxation of this program. It has $O(n^{s})$ variables, and $O(n^2)$ non-trivial constraints. So in time $n^{O(s)}$, we can find some basic feasible solution with support size at most $O(n^2)$. We reuse $x_{uv}$, $y_v$ and $z_S$ to denote some fixed optimum solution to the LP. \paragraph{The Rounding Algorithm.} The algorithm will construct the required $X'$ and the collection $\mathcal{C}$ of sets $C'_i$ from the LP solution by the following preprocessing and sampling procedure. \begin{enumerate} \item Initialization. We set $X',\mathcal{C} = \emptyset$ and $U =V$, where $U$ denotes the set of vertices not covered by $\mathcal{C}$. \item Preprocessing. Add every vertex $v$ with $y_v \geq \beta$ to $X'$. Set $U = U \setminus X'$ \item Sampling to create $\mathcal{C}$. Arbitrarily order the sets $S_1,\ldots,S_k$ in the support of the LP solution. Repeat the following (phase) until $U$ is empty: {\em Phase.} For $i=1,\ldots,k$, sample the set $S_i$ randomly with probability $z_{S_i}$. If $S_i$ is picked, add $C'=S_i \cap U$ to the collection $\mathcal{C}$, and update $U = U \setminus S_i$. \end{enumerate} \paragraph{Analysis.} Clearly the sets $C'$ produced by the algorithm have size at most $s$, and they are disjoint. \begin{lemma} \label{small:x} $|X'| \leq a/\beta$. \end{lemma} \begin{proof} As $X'$ is the set of vertices $v$ with $y_v \geq \beta$, there can be at most $a/\beta$ such vertices by the LP constraint $\sum_v y_v \leq a$. \end{proof} Henceforth, we also assume that $\beta \leq 1/2$, otherwise choosing $X' = \emptyset$ and partitioning $V$ arbitrarily into sets $C_1,\ldots,C_k$ of size at most $s$ trivially suffices for Theorem \ref{lem:noisy-LT}. We now show that the algorithm runs in expected polynomial time and does not generate a vertex partition with too many edges between distinct $C'_i$. \begin{lemma} \label{small:f} Let $F$ be the set of edges with endpoints in two distinct $C'_i$s. Then $\E[|F|] \leq O(b + \beta|E|) $. Moreover, the algorithm terminates after at most $O(n^2 \log n)$ sampling steps with high probability. \end{lemma} \begin{proof} We claim that $U$ is empty after $O(\log n)$ phases, with high probability. After the preprocessing step, each uncovered vertex in $U$ has $y_v < \beta \leq 1/2$. Thus, by the second LP constraint, $p_v:=\sum_{ S\ni v} z_S = 1- y_v \geq 1/2$. So the probability that a vertex $v$ is not covered after $j$ phases is \[ \left(\prod_{S \ni v} (1-z_S)\right)^j \leq \exp\left(-j p_v \right) \leq \exp \left(-j/2\right) \leq (2/3)^j \] The claim now follows from a union bound over the $n$ vertices. We now bound the size of $F$. Let us focus on an edge $e=(u,v)$ and bound the probability that it is \emph{cut}, that is, added to $F$ during the Sampling step. Let $U_j$ denote the vertices in $U$ at the end of phase $j$. The edge is cut in phase $j$ if and only if both $u$ and $v$ remain in $U$ at the end of phase $j-1$ (i.e. $u,v \in U_{j-1}$) and a set $S$ with $|S \cap \{u,v\}| = 1$ is chosen in phase $j$. As $\Pr[u,v \in U_{j-1}] \leq \Pr[v \in U_{j-1}] \leq (2/3)^{j-1}$, this implies that \begin{equation} \label{eq:phasecut} \Pr[(u,v) \mbox{ cut in phase $j$}] \leq (2/3)^{j-1} \cdot \sum_{S : |S \cap \{u,v\}| = 1}z_S. \end{equation} Moreover, by the third set of constraints in LP \eqref{lp:partition} \begin{equation} \sum_{S : |S \cap \{u,v\}| = 1}z_S = \sum_{S : u \in S \wedge v \notin S}z_S + \sum_{S : v \in S \wedge u \notin S}z_S \leq 2x_{uv} + y_u + y_v.\label{eq:cut} \end{equation} Summing \eqref{eq:phasecut} over all the phases and using \eqref{eq:cut}, we get \[ \Pr[(u,v) \mbox{ cut}] \leq 3(2x_{uv} + y_u + y_v) \leq 6 x_{uv} + 6\beta, \] where the second inequality follows as both $u$ and $v$ were not chosen in $X$ during the preprocessing step and hence $y_u,y_v \leq \beta$. By linearity of expectation, this implies that \[ \E[|F|] = \sum_{(u,v) \in E} (6 x_{uv} + 6 \beta) = O(b + \beta|E|).\] \end{proof} \section*{Acknowledgements} We would like to thank Marcin Pilipczuk and Fedor Fomin for many useful discussions and pointers, and anonymous reviewers for bringing recent local search-based techniques to our attention. Part of this work was done when all the authors were visiting the Simons Institute for the Theory of Computing. \bibliographystyle{plain}
{'timestamp': '2017-02-03T02:03:12', 'yymm': '1606', 'arxiv_id': '1606.05198', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05198'}
arxiv
\section{Introduction} \label{intro} \IEEEPARstart{L}{et} $\mathbb{F}_q$ be a finite field of cardinality $q$ and $G$ a group of order $n$. The group algebra $\mathbb{F}_q[G]$ is a vector space over $\mathbb{F}_q$ with basis $G$. Addition, multiplication with scalars $c\in \mathbb{F}_q$ and multiplication are defined by: for any $a_g,b_g\in \mathbb{F}_q$, \begin{center} $\sum_{g\in G}a_g g+\sum_{g\in G}b_g g=\sum_{g\in G}(a_g+b_g) g$, \end{center} \begin{center} $c(\sum_{g\in G}a_g g)=\sum_{g\in G}ca_g g$, \end{center} \begin{center} $(\sum_{g\in G}a_g g)(\sum_{g\in G}b_g g)=\sum_{g\in G}(\sum_{uv=g}a_ub_v)g$. \end{center} \noindent Then $\mathbb{F}_q[G]$ is an associative $\mathbb{F}_q$-algebra with identity $1=1_{\mathbb{F}_q}1_{G}$ where $1_{\mathbb{F}_q}$ and $1_{G}$ are the identity elements of $\mathbb{F}_q$ and $G$ respectively. Readers are referred to \cite{passman2011algebraic} for more details on group algebra. \par Let $G=G_{(m,s,r)}=\langle x,y\mid x^m=1, y^s=1,yx=x^ry\rangle$ where ${\rm gcd}(m,r)=1$ and $r^s\equiv 1$ (mod $m$). Then $G$ is called a \textit{metacyclic group} of order $sm$. Sabin and Lomonaco \cite{sabin1995metacyclic} provided a unique direct decomposition of the $\mathbb{F}_2$-algebra $\mathbb{F}_2[G_{(m,n,r)}]$ to minimal two-sided ideals (central codes) and described a technique to decompose minimal central codes to a direct sum of $n$ minimal left ideals (left codes) and gave an algorithm to determine these minima left codes. They discovered several good metacyclic codes and they expressed the hope that more ``good" and perhaps even ``best" codes may be discovered among the ideals of non-abelian group rings. Recently, Olteanu et al \cite{olteanu2015construction} provided algorithms to construct minimal left group codes and rediscovered some best codes. These are based on results describing a complete set of orthogonal primitive idempotents in each Wedderburn component of a semisimple finite group algebra $\mathbb{F}_q[G]$ for a large class of groups $G$. For example, by use of the computer algebra system GAP and the packages GUAVA and Wedderga some optimal codes and non-abelian group codes were obtained: \par $\diamond$ A linear $[27,18,2]$-code constructed by a left ideal in $\mathbb{F}_2[G]$, where $G=\langle x,y\mid x^9=1, y^3=1,yx=x^4y\rangle$ ( \cite[Example 1]{olteanu2015construction}). \par $\diamond$ A best linear $[20,4,8]$-code constructed by a left ideal in $\mathbb{F}_3[G]$, where $G=\langle x,y\mid x^5=1, y^4=1,yx=x^2y\rangle$ (\cite[Example 3]{olteanu2015construction}). \par $\diamond$ A non-abelian group code $[55,10,22]$-code constructed by a left ideal in $\mathbb{F}_2[G]$, where $G=\langle x,y\mid x^{11}=1, y^5=1,yx=x^3y\rangle$ (\cite[Example 4]{olteanu2015construction}). \par For any $\textbf{a}=(a_{0,0}, a_{1,0},\ldots, a_{m-1,0},a_{0,1}, a_{1,1},\ldots, a_{m-1,1}$, $a_{0,s-1}, a_{1,s-1},\ldots, a_{m-1,s-1})\in \mathbb{F}_q^{sm}$, define $$\Psi(\textbf{a})=(1,x,\ldots,x^{m-1})M_{\textbf{a}}\left(\begin{array}{c} 1 \cr y\cr \ldots\cr y^{s-1}\end{array}\right),$$ where $M_{\textbf{a}}=\left(\begin{array}{cccc} a_{0,0} & a_{0,1}& \ldots &a_{0,s-1} \cr a_{1,0} & a_{1,1} & \ldots & a_{1,s-1} \cr \ldots & \ldots \cr a_{m-1,0} & a_{m-1,1}&\ldots & a_{m-1,s-1}\end{array}\right).$ Then $\Psi$ is an $\mathbb{F}_q$-linear isomorphism from $\mathbb{F}_q^{sm}$ onto $\mathbb{F}_q[G_{(m,s,r)}]$. As in \cite{olteanu2015construction} and \cite{sabin1995metacyclic} a nonempty subset $C$ of $\mathbb{F}_q^{sm}$ is called a \textit{left metacyclic code} (or \textit{left $G_{(m,s,r)}$-code} for more precisely) over $\mathbb{F}_q$ if $\Psi(C)$ is a left ideal of the $\mathbb{F}_q$-algebra $\mathbb{F}_q[G_{(m,s,r)}]$. From now on, we will identify $C$ with $\Psi(C)$ for convenience. \par In this paper, we focus our attention on the case of $s=3$ in the metacyclic group $G_{(m,s,r)}$ and $r=q^\epsilon$ for some positive integer $\epsilon$. \par Compared with the known theory for cyclic codes over finite fields, literatures related with metacyclic codes were involved too much group algebra language and techniques. A system and elementary theory for left metacyclic codes over finite fields have not been developed fully to the best of our knowledge. In this paper, we try to achieve the following goals: \par $\bullet$ Develop a system theory for left $G_{(m,3,r)}$-codes using an elementary method. Specifically, only finite field theory and basic theory of cyclic codes and skew cyclic codes are involved, and it does not involve any group algebra language and technique. \par $\bullet$ Provide a clear expression for each left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ and give a formula to count the number of all such codes. \par $\bullet$ Give an explicit expression of the dual code for each left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ and determine its self-orthogonality. \par Using the expression provided, one can list all distinct left $G_{(m,3,r)}$-codes for specific $m$ and $q$ (not too big) conveniently and easily, design left $G_{(m,3,r)}$-codes for their requirements and encode the presented codes directly. \par The present paper is organized as follows. In section 2, we prove that any left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ is a direct sum of concatenated codes with inner codes ${\cal A}_i$ and outer codes $C_i$ for the case of ${\rm gcd}(n,q)=1$ and $r\equiv q^\epsilon$ (mod $m$) for some positive integer $\epsilon$, where ${\cal A}_i$ is a minimal cyclic code over $\mathbb{F}_q$ of length $m$ and $C_i$ is a skew $\theta_i$-cyclic code over $K_i$ of length $3$, i.e., left ideals of the ring $K_i[y;\theta_i]/\langle y^3-1\rangle$, where $K_i$ is an extension field of $\mathbb{F}_q$ and $\theta_i\in {\rm Aut}_{\mathbb{F}_q}(K_i)$ satisfying $\theta_i^3={\rm id}_{K_i}$. In Section 3, we give a precise description for skew $\theta_i$-cyclic codes over $K_i$ of length $3$. Hence all distinct left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$ can be determined by their concatenated structure. In Section 4, we give the dual code of each left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ precisely and determine all self-orthogonal left-$G_{(m,3,r)}$-codes. Finally, we list all distinct $541696$ left $G_{(14,3,9)}$-codes and all $3364$ self-orthogonal left $G_{(14,3,9)}$-codes over $\mathbb{F}_3$ in Section 5. \section{The concatenated structure of left $G_{(m,3,r)}$-codes over $\mathbb{F}_{q}$} \noindent In this section, we overview properties for concatenated structure of linear codes and determine the concatenated structure of left $G_{(m,3,r)}$-codes over $\mathbb{F}_{q}$. \par Let $B$ be a linear $[n_B,k_B,d_B]$-code over $\mathbb{F}_{q}$, $\mathbb{F}_{q^{k_B}}$ an extension field of $\mathbb{F}_{q}$ with degree $k_B$, $\varphi$ an $\mathbb{F}_{q}$-linear isomorphism from $\mathbb{F}_{q^{k_B}}$ onto $B$ and $E$ a linear $[n_E,k_E,d_E]$-code over $\mathbb{F}_{q^{k_B}}$. The \textit{concatenated code} of the inner code $B$ and the outer code $E$ is defined as $$B\Box_{\varphi}E=\{(\varphi(c_1),\ldots, \varphi(c_{n_E}))\mid (c_1,\ldots,c_{n_E})\in E\}$$ (cf. \cite[Definition 2.1]{sendrier1998concatenated}). It is known that $B\Box_{\varphi}E$ is a linear code over $\mathbb{F}_{q}$ with parameters $[n_Bn_E,k_Bk_E,\geq d_Bd_E]$. \par From now on, let $m$ be a positive integer satisfying ${\rm gcd}(m,q)=1$ and $m\geq 3$, $(\mathbb{Z}_m,+)$ the addition group of integer residue classes modulo $m$ where $\mathbb{Z}_m=\{0,1,\ldots,m-1\}$, and denote by $${\cal A}=\mathbb{F}_q[x]/\langle x^m-1\rangle=\{\sum_{i=0}^{m-1}a_ix^i\mid a_0,a_1,\ldots,a_{m-1}\in \mathbb{F}_q\}$$ the residue class ring of $\mathbb{F}_q[x]$ modulo its ideal generated by $x^m-1$ with operations defined by the usual polynomial operations modulo $x^m-1$. We will identify cyclic codes over $\mathbb{F}_q$ of length $m$ with ideals of the ring ${\cal A}$ under the identification map: $(a_0,a_1,\ldots,a_{m-1})\mapsto \sum_{i=0}^{m-1}a_ix^i$. \par First, we define $$\theta: (\mathbb{Z}_m,+)\rightarrow (\mathbb{Z}_m,+) \ {\rm by} \ \theta(s)\equiv rs \ ({\rm mod} \ m).$$ As ${\rm gcd}(m,r)=1$, we see that $\theta$ is a group automorphism on $(\mathbb{Z}_m,+)$. Moreover, from $1<r<n$ and $r^3\equiv 1$ (mod $m$) we deduce that the multiplicative order of $\theta$ is a factor of $3$. \par Next, we define a map ${\cal A}\rightarrow {\cal A}$ by the rule that $$a(x)\mapsto \sum_{j=0}^{m-1}a_jx^{\theta(j)}\equiv a(x^r) \ ({\rm mod} \ x^m-1),$$ for any $a(x)=\sum_{j=0}^{m-1}a_jx^j\in {\cal A}$. In order to simplify notations, we also use $\theta$ to denote this map on ${\cal A}$, i.e., $$\theta(a(x))=a(x^r) \ {\rm in} \ {\cal A}.$$ Then $\theta$ is an $\mathbb{F}_q$-algebra automorphism on ${\cal A}$ satisfying $\theta^3={\rm id}_{{\cal A}}$. In addition, $\theta$ is a permutation of the coordinate positions $\{0,1,\ldots, m-1\}$ of a cyclic codes of length $m$ over $\mathbb{F}_q$ and is called a \textit{multiplier}. Readers are referred to \cite[Theorems 4.3.12 and 4.3.13]{huffman2010fundamentals} for more details on basic properties of multipliers. \par Wether $\theta$ denotes this automorphism of ${\cal A}$ or the group automorphism on $(\mathbb{Z}_m,+)$ is determined by the context. Let $${\cal A}[y;\theta]=\{\sum_{j=0}^ka_j(x)y^j\mid a_0(x),\ldots,a_k(x)\in {\cal A}, \ k\geq 0\}$$ be the \textit{skew polynomial ring} over the commutative ring ${\cal A}$ with coefficients written on the left side, where the multiplication is defined by the rule $$y^ja(x)=\theta^{j}(a(x))y^j=a(x^{r^j})y^j, \ \forall a(x)\in {\cal A}$$ and by the natural ${\cal A}$-linear extension to all polynomials in ${\cal A}[y;\theta]$. \par As $\theta^3={\rm id}_{\mathcal{A}}$, we have $y^3a(x)=a(x)y^3$ for all $a(x)\in {\cal A}$. So $y^3-1$ generates a two-sided ideal $\langle y^3-1\rangle$ of ${\cal A}[y;\theta]$. Let $${\cal A}[y;\theta]/\langle y^3-1\rangle=\{\alpha+\beta y+\gamma y^2\mid \alpha,\beta,\gamma\in {\cal A}\}$$ be the residue class ring of $A[y;\theta]$ modulo its two-sided ideal $\langle y^3-1\rangle$. For any $\xi=a_0(x)+a_1(x)y+a_2(x)y^2\in {\cal A}[y;\theta]/\langle y^3-1\rangle$, where $a_j(x)=\sum_{i=0}^{m-1}a_{i,j}x^i\in {\cal A}$ with $a_{i,j}\in \mathbb{F}_q$ for $j=0,1,2$, we define a natural map: $$\Phi: \xi\mapsto a(x,y)=\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}x^iy^j.$$ Then it can be easily proved that $\Phi$ is a ring isomorphism from ${\cal A}[y;\theta]/\langle y^3-1\rangle$ onto $\mathbb{F}_q[G_{(m,3,r)}]$. \par In the rest of this paper, we will identify $\mathbb{F}_q[G_{(m,3,r)}]$ with ${\cal A}[y;\theta]/\langle y^3-1\rangle$ under this ring isomorphism $\Phi$. \vskip 3mm \noindent \begin{theorem}\label{th2.1} Using the notations above, ${\cal C}$ is a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ if and only if ${\cal C}$ is a left ideal of the ring ${\cal A}[y;\theta]/\langle y^3-1\rangle$. \end{theorem} \vskip 3mm \begin{IEEEproof} By the identification of $\mathbb{F}_q[G_{(m,3,r)}]$ with ${\cal A}[y;\theta]/\langle y^3-1\rangle$, we see that ${\cal C}$ is a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$, i.e., ${\cal C}$ is a left ideal of the ring $\mathbb{F}_q[G_{(m,3,r)}]$, if and only if ${\cal C}$ is a left ideal of ${\cal A}[y;\theta]/\langle y^3-1\rangle$. \end{IEEEproof} \vskip 3mm \par In order to determine all left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$, by Theorem \ref{th2.1} it is sufficient to give all left ideals of the ring ${\cal A}[y;\theta]/\langle y^3-1\rangle$. To do this, we need investigate the structure and properties of ${\cal A}$ first. \par For any integer $s$, $0\leq s\leq m-1$, let $J_{s}^{(q)}$ be the $q$-cyclotomic coset modulo $m$, i.e., $J_{s}^{(q)}=\{s,sq,\ldots,sq^{l_s-1}\}$ (mod $m$) where $l_s={\rm min}\{k\in \mathbb{Z}^{+}\mid s(q^k-1)\equiv 0 \ ({\rm mod} \ m)\}$. Then $|J_{s}^{(q)}|=l_s$. It is obvious that $J_{0}^{(q)}=\{0\}$ and $\theta(J_{0}^{(q)})=J_{0}^{(q)}=\{0\}$. In this paper, we assume that \begin{equation} r\equiv q^\epsilon \ ({\rm mod} \ m) \end{equation} for some positive integer $\epsilon$. \vskip 3mm \noindent \begin{lemma}\label{lm2.2} Let $0\leq s\leq m-1$. Then $J_{s}^{(q)}$ satisfies one and only one of the following two conditions: \par (I) $\theta(s)\equiv s$ $({\rm mod} \ m)$. In this case, $\theta(k)\equiv k$ $({\rm mod} \ m)$ for all $k\in J_{s}^{(q)}$. \par (II) $\theta(s)\in J_{s}^{(q)}$ and $\theta(s)\not\equiv s$ $({\rm mod} \ m)$. In this case, $l_s=|J_{s}^{(q)}|$ is a multiple of $3$, and $\theta(J_{s}^{(q)})=J_{s}^{(q)}$. \end{lemma} \vskip 3mm \noindent \begin{IEEEproof} By Condition (1), it follows that $\theta(s)\in J_{s}^{(q)}$ and $\theta(J_{s}^{(q)})=J_{s}^{(q)}$. Then we have one of the following two cases. \par (I) $\theta(s)=rs\equiv s$ (mod $m$). In this case, for any $k\in J_{s}^{(q)}$ we have $k\equiv sq^j$ for some $0\leq j\leq l_s-1$, and hence $\theta(k)=rsq^j\equiv sq^j\equiv k$ (mod $m$). \par (II) $\theta(s)\in J_{s}^{(q)}$ and $\theta(s)\not\equiv s$ (mod $m$). In this case, it is obvious that $l_s=|J_{s}^{(q)}|\geq 2$. By $\theta(s)\in J_{s}^{(q)}$, there exits integer $v$, $1\leq v\leq l_s-1$, such that $\theta(s)=rs\equiv sq^v$ (mod $m$). By $r^3\equiv 1$ (mod $m$) and $sq^v\equiv rs$ (mod $m$), we have $sq^{3v}=s(q^v)^3\equiv r^3s\equiv s$ (mod $m$). From this and by the minimality of $l_s$, we deduce that $l_s|3v$. Suppose that $l_s$ is not a multiple of $3$. Then ${\rm gcd}(l_s,3)=1$ and hence $l_s|v$. By $sq^{l_s}\equiv s$ (mod $m$), we deduce that $sq^v\equiv s$ (mod $m$), i.e., $\theta(s)\equiv s$ (mod $m$), which contradicts that $\theta(s)\not\equiv s$ (mod $m$). Hence $l_s$ is a multiple of $3$. \end{IEEEproof} \vskip 3mm \par In this paper, let $\zeta$ be a primitive $m$th root of unity in an extension field of $\mathbb{F}_{q}$. Then $x^m-1=\sum_{s=0}^{m-1}(x-\zeta^s)$. We will adopt the following notations: \par $\bullet$ Let $J_{k_0}^{(q)}, J_{k_1}^{(q)}, \ldots, J_{k_s}^{(q)}$, where $k_0=0$, be all distinct $q$-cyclotomic cosets modulo $m$ satisfying Condition (I) in Lemma \ref{lm2.2}. \par $\bullet$ Let $J_{k_{s+1}}^{(q)}, \ldots, J_{k_{s+t}}^{(q)}$ be all distinct $q$-cyclotomic cosets modulo $m$ satisfying Condition (II) in Lemma \ref{lm2.2}. \par $\bullet$ Denote $J(i)=J_{k_i}^{(q)}$, $f_i(x)=\prod_{j\in J(i)}(x-\zeta^j)$, $$K_i=\mathbb{F}_q[x]/\langle f_i(x)\rangle$$ and assume $d_i={\rm deg}(f_i(x))=|J_{k_i}^{(q)}|=|J(i)|$ for all $i=0,1,\ldots,s+t$. \noindent Then $d_i$ is a multiple of $3$ for all $s+1\leq i\leq s+t$ by Lemma \ref{lm2.2}(II). It is clear that $f_0(x),f_1(x),\ldots, f_{s+t}(x)$ are pairwise coprime irreducible polynomials in $\mathbb{F}_q[x]$ satisfying $$x^m-1=f_0(x)f_1(x)\ldots f_{s+t}(x).$$ Hence $K_i$ is an extension field of $\mathbb{F}_q$ with cardinality $q^{d_i}$ for $i=0,1,\ldots,s+t$, and $m=\sum_{i=0}^{s+t}d_i$. \par For each integer $i$, $0\leq i\leq s+t$, denote \begin{center} $F_i(x)=\frac{x^m-1}{f_i(x)}\in \mathbb{F}_q[x]$. \end{center} Then ${\rm gcd}(F_i(x),f_i(x))$ $=1$. By Extended Euclidian Algorithm, we find polynomials $u_i(x)$, $v_i(x)\in \mathbb{F}_q[x]$ such that \begin{equation} \label{eq2} u_i(x)F_i(x)+v_i(x)f_i(x)=1. \end{equation} In this paper, we denote \begin{equation} \label{eq3} \varepsilon_i(x)\equiv u_i(x)F_i(x)=1-v_i(x)f_i(x) \ ({\rm mod} \ x^m-1). \end{equation} By (\ref{eq2}) and (\ref{eq3}), it follows that $\varepsilon_i(\zeta^j)=1$ for all $j\in J(i)$ and $\varepsilon_i(\zeta^j)=0$ for all $j\in \mathbb{Z}_m\setminus J(i)$, which implies \begin{equation} \label{eq4} \varepsilon_i(x)=\frac{1}{m}\sum_{l=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-jl})x^l, \ 0\leq i\leq s+t. \end{equation} Then we have the following conclusions. \vskip 3mm \begin{lemma}\label{lm2.3} Using the notations above, the following hold. \par (i) $\sum_{i=0}^{s+t}\varepsilon_i(x)=1$, $\varepsilon_i(x)^2=\varepsilon_i(x)$ and $\varepsilon_i(x)\varepsilon_j(x)=0$ in $\mathcal{A}$ for all $0\leq i\neq j\leq s+t$. \par (ii) ${\cal A}={\cal A}_0\oplus {\cal A}_1\oplus\ldots {\cal A}_{s+t}$, where ${\cal A}_i={\cal A}\varepsilon_i(x)$ is the ideal of ${\cal A}$ generated by $\varepsilon_i(x)$, and ${\cal A}_i$ is a commutative ring with $\varepsilon_i(x)$ as its multiplicative identity for all $i=0,1,\ldots, s+t$. \par (iii) For each integer $i$, $0\leq i\leq s+t$, define $$\varphi_i: a(x)\mapsto \varepsilon_i(x)a(x) \ {\rm mod} \ x^m-1 \ (\forall a(x)\in K_i).$$ Then $\varphi_i$ is a field isomorphism from $K_i$ onto ${\cal A}_i$. \par (iv) $\theta(\varepsilon_i(x))=\varepsilon_i(x)$ and $\theta({\cal A}_i)={\cal A}_i$, for all $i=0,1$, $\ldots, s+t$. \par (v) For each integer $i$, $0\leq i\leq s+t$, define $$\theta_i: K_i\rightarrow K_i \ {\rm via} \ a(x)\mapsto a(x^r) \ (\forall a(x)\in K_i).$$ Then $\theta_i$ is an $\mathbb{F}_q$-algebra automorphism on $K_i$ satisfying $\theta_i^3={\rm id}_{K_i}$, where ${\rm id}_{K_i}$ is the identity automorphism on $K_i$. Precisely, $\theta_i={\rm id}_{K_i}$ for all $i=0,1,\ldots,s$, and the multiplicative order of $\theta_i$ is equal to $3$ for all $i=s+1,\ldots,s+t$. \par (vi) The restriction $\theta|_{{\cal A}_i}$ of $\theta$ on ${\cal A}_i$ is an $\mathbb{F}_q$-algebra automorphism on ${\cal A}_i$ satisfying $(\theta|_{{\cal A}_i})^3={\rm id}_{{\cal A}_i}$ and $\theta |_{{\cal A}_i}=\varphi_i\theta_i\varphi_i^{-1}$. Hence the following diagram for $\mathbb{F}_q$-algebra isomorphisms commutes: $$\left.\begin{array}{ccc} \ \ \ \ K_i & \stackrel{\theta_i}{\longrightarrow} & K_i \cr \varphi_i\downarrow & & \ \ \ \ \downarrow \varphi_i \cr \ \ \ \ \mathcal{A}_i & \stackrel{\theta |_{\mathcal{A}_i}}{\longrightarrow} & \mathcal{A}_i\end{array}\right..$$ Then $\theta|_{{\cal A}_i}={\rm id}_{{\cal A}_i}$ for all $i=0,1,\ldots,s$, and the multiplicative order of $\theta|_{{\cal A}_i}$ is equal to $3$ for all $i=s+1,\ldots,s+t$. \end{lemma} \vskip 3mm \begin{IEEEproof} (i)--(iii) follow from classical ring theory and Equations (\ref{eq2}) and (\ref{eq3}). \par (iv) By the definition of the automorphism $\theta$ on $\mathcal{A}$ and (\ref{eq4}), it follows that $$\theta(\varepsilon_i(x))=\frac{1}{m}\sum_{l=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-jl})x^{rl \ ({\rm mod} \ m)}.$$ As $J(i)=\theta(J(i))=\{rj \ ({\rm mod} \ m)\mid j\in J(i)\}$, we have \begin{eqnarray*} \theta(\varepsilon_i(x))&=&\frac{1}{m}\sum_{l=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-(rj)l})x^{rl \ ({\rm mod} \ m)}\\ &=&\frac{1}{m}\sum_{l=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-j(rl)})x^{rl \ ({\rm mod} \ m)}. \end{eqnarray*} Moreover, since $\theta$ is an automorphism of the group $(\mathbb{Z}_m,+)$, for each $k\in \mathbb{Z}_m$ there is a unique $l\in \mathbb{Z}_m$ such that $k=rl$ (mod $m$), and hence $$\theta(\varepsilon_i(x))=\frac{1}{m}\sum_{k=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-jk})x^{k}=\varepsilon_i(x).$$ Therefore, $\theta({\cal A}_i)=\theta({\cal A})\theta(\varepsilon_i(x))={\cal A}\varepsilon_i(x) ={\cal A}_i.$ \par (v) It is clear that $\theta_i$ is an $\mathbb{F}_q$-algebra endomorphism of $K_i$. By $r^3\equiv 1$ (mod $m$) and $f_i(x)=\prod_{j\in J(i)}(x-\zeta^j)$, we see that $(\zeta^j)^{r^3}=\zeta^j$ for all $j\in J(i)$, which implies that $x^{r^3}\equiv x$ (mod $f_i(x)$), i.e., $x^{r^3}=x$ in $K_i$. Hence for any $a(x)\in K_i=\mathbb{F}_q[x]/\langle f_i(x)\rangle$ we have $\theta_i^3(a(x))=a(x^{r^3})=a(x)$ in $K_i$. Therefore, $\theta_i^3={\rm id}_{K_i}$ and so $\theta_i$ is an $\mathbb{F}_q$-algebra automorphism of $K_i$. Then we consider the following two cases: \par (v-1) Let $0\leq i\leq s$. For any $j\in J(i)$, by Condition (I) in Lemma 2.2 we have $(\zeta^j)^r=\zeta^j$, which implies $x^r\equiv x$ (mod $x-\zeta^j$), and hence $x^r\equiv x$ (mod $f_i(x)$). Therefore, $\theta_i(a(x))=a(x^r)=a(x)$ for any $a(x)\in K_i=\mathbb{F}_q[x]/\langle f_i(x)\rangle$, and so $\theta_i={\rm id}_{K_i}$. \par (v-2) Let $s+1\leq i\leq s+t$. By Condition (II) in Lemma 2.2, there exists $j\in J(i)$ such that $rj\not\equiv j$ (mod $m$), which implies $(\zeta^j)^r\neq\zeta^j$. Then by the proof of (v-1), we conclude $\theta_i\neq{\rm id}_{K_i}$. From this and by $\theta_i^3={\rm id}_{K_i}$, we deduce that the multiplicative order of $\theta_i$ is equal to $3$. \par (vi) By (iv) and $\theta^3={\rm id}_{{\cal A}}$, it follows that $\theta|_{{\cal A}_i}$ is an $\mathbb{F}_q$-algebra automorphism on ${\cal A}_i$ satisfying $(\theta|_{{\cal A}_i})^3={\rm id}_{{\cal A}_i}$. Then the equation $\theta |_{{\cal A}_i}=\varphi_i\theta_i\varphi_i^{-1}$ follows from (v) and the definitions of $\varphi_i$, $\theta_i$ and $\theta|_{{\cal A}_i}$ immediately. \end{IEEEproof} \vskip 3mm \par For any integer $i$, $0\leq i\leq s+t$, it is known that $\mathcal{A}_i$ is a minimal cyclic code of length $m$ over $\mathbb{F}_q$. Precisely, $f_i(x)$ is the parity check polynomial and $\varepsilon_i(x)$ is the idempotent generator of $\mathcal{A}_i$. Hence ${\rm dim}_{\mathbb{F}_q}(\mathcal{A}_i)={\rm deg}(f_i(x))=d_i$. \par Frow now on, we adopt the following notations. \par $\bullet$ Let $K_i[y;\theta_i]=\{\sum_{j=0}^kb_j(x)y^j\mid b_0(x),\ldots,b_k(x)\in K_i, \ k\geq 0\}$ be the skew polynomial ring over $K_i$ with coefficients written on the left side, where the multiplication is defined by the rule $$y^ja(x)=\theta_i^{j}(a(x))y^j=a(x^{r^j})y^j, \ \forall a(x)\in K_i$$ and by the natural $K_i$-linear extension to all polynomials in $K_i[y;\theta_i]$. \par Since $\theta_i^3={\rm id}_{K_i}$ by Lemma \ref{lm2.3}(v), we see that $y^3-1$ generates a two-sided ideal $\langle y^3-1\rangle$ of $K_i[y;\theta_i]$. \par $\bullet$ Let $K_i[y;\theta_i]/\langle y^3-1\rangle=\{a(x)+b(x)y+c(x)y^2\mid a(x), b(x),c(x)\in K_i\}$ be the residue class ring of $K_i[y;\theta_i]$ modulo its two-sided ideal $\langle y^3-1\rangle$. \par Recall that left ideals of $K_i[y;\theta_i]/\langle y^3-1\rangle$ are called \textit{skew $\theta_i$-cyclic codes} over $K_i$ of length $3$ (See \cite[Theorem 1]{boucher2007skew}). For more details on skew cyclic codes, readers are referred to \cite{boucher2007skew, boucher2008skew, boucher2009codes, boucher2009coding, Jitman201239}. \par Now, we can decompose any left $G_{(m,3,r)}$-code into a direct sum of concatenated codes by the following theorem. \vskip 3mm \begin{theorem}\label{th2.4} Using the notations above, we have the following conclusions. \par (i) ${\cal A}[y;\theta]/\langle y^3-1\rangle=\oplus_{i=0}^{s+t}({\cal A}_i[y;\theta |_{{\cal A}_i}]/\langle \varepsilon_i(x)y^3-\varepsilon_i(x)\rangle)$. \par (ii) For each integer $i$, $0\leq i\leq s+t$, $\varphi_i:K_i\rightarrow {\cal A}_i$ can be extended to a ring isomorphism from $K_i[y;\theta_i]/\langle y^3-1\rangle$ onto ${\cal A}_i[y;\theta |_{{\cal A}_i}]/\langle \varepsilon_i(x)y^3-\varepsilon_i(x)\rangle$ by $$\varphi_i:\xi(y)\mapsto \varphi_i(\xi_0)+\varphi_i(\xi_1)y+\varphi_i(\xi_2)y^2=\varepsilon_i(x)\xi(y)$$ for any $\xi(y)=\xi_0+\xi_1+\xi_2y^2$ with $\xi_0,\xi_1,\xi_2\in K_i$. \par (iii) ${\cal C}$ is a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ if and only if for each $0\leq i\leq s+t$ there is a unique skew $\theta_i$-cyclic code $C_i$ over $K_i$ of length $3$ such that $${\cal C}=\bigoplus_{i=0}^{s+t}{\cal A}_i\Box_{\varphi_i}C_i,$$ where ${\cal A}_i\Box_{\varphi_i}C_i=\{\varepsilon_i(x)\xi \ ({\rm mod} \ x^m-1)\mid \xi\in C_i\}$. Moreover, we have $|{\cal C}|=\prod_{i=0}^{s+t}|C_i|$. \end{theorem} \vskip 3mm \begin{IEEEproof} (i) By Lemma \ref{lm2.3}(ii),(iv) and (vi), we have $${\cal A}[y;\theta]=\oplus_{i=0}^{s+t}{\cal A}_i[y;\theta |_{{\cal A}_i}].$$ Moreover, by ${\cal A}_i={\cal A}\varepsilon_i(x)$ we know that the projection from ${\cal A}[y;\theta]$ onto ${\cal A}_i[y;\theta |_{{\cal A}_i}]$ is determined by $\alpha(y)\mapsto \varepsilon_i(x)\alpha(y)$ ($\forall \alpha(y)\in {\cal A}[y;\theta]$). Especially, we have $y^3-1\mapsto \varepsilon_i(x)y^3-\varepsilon_i(x)$ under this projection. As $(\theta |_{{\cal A}_i})^3={\rm id}_{{\cal A}_i}$, $\varepsilon_i(x)y^3-\varepsilon_i(x)$ generates a two-sided ideal $\langle \varepsilon_i(x)y^3-\varepsilon_i(x)\rangle$ of ${\cal A}_i[y;\theta |_{{\cal A}_i}]$ for all $i=0,1,\ldots,s+t$. By Lemma \ref{lm2.3}(i) it follows that $y^3-1=\sum_{i=0}^{s+t}(\varepsilon_i(x)y^3-\varepsilon_i(x))$ and $(\varepsilon_i(x)y^3-\varepsilon_i(x))(\varepsilon_j(x)y^3-\varepsilon_j(x))=0$ for all $0\leq i\neq j\leq s+t$. Hence \begin{center} ${\cal A}[y;\theta]/\langle y^3-1\rangle=\oplus_{i=0}^{s+t}({\cal A}_i[y;\theta |_{{\cal A}_i}]/\langle \varepsilon_i(x)y^3-\varepsilon_i(x)\rangle)$. \end{center} \par (ii) Since $\varphi_i:K_i\rightarrow {\cal A}_i$ is a ring isomorphism by Lemma 2.3(iii), the conclusion follows from Lemma \ref{lm2.3}(vi) and a direct calculation. \par (iii) By Theorem \ref{th2.1} and (i), we see that ${\cal C}$ is a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ if and only if for each integer $i$, $0\leq i\leq s+t$, there is a unique left ideal ${\cal C}_i$ of the ring ${\cal A}_i[y;\theta |_{{\cal A}_i}]/\langle \varepsilon_i(x)y^3-\varepsilon_i(x)\rangle$ such that ${\cal C}=\oplus_{i=0}^{s+t}{\cal C}_i$. By (ii), the latter condition is equivalent to that for each integer $i$, $0\leq i\leq s+t$, there is a unique left ideal $C_i$ of $K_i[y;\theta_i]/\langle y^3-1\rangle$ such that ${\cal C}_i=\varphi_i(C_i)=\{\varepsilon_i(x)\xi\mid \xi\in C_i\}={\cal A}_i\Box_{\varphi_i}C_i$. \par Finally, it is clear that the codewords contained in ${\cal C}$ is equal to $|{\cal C}|=\prod_{i=0}^{s+t}|{\cal C}_i|=\prod_{i=0}^{s+t}|C_i|$. \end{IEEEproof} \vskip 3mm \par By Theorem \ref{th2.4}, in order to give all distinct left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$ it is sufficient to determine all distinct skew $\theta_i$-cyclic codes over $K_i$ of length $3$, for all $i=0,1,\ldots,s+t$. For convenience and notations simplicity in the following sections, we introduce the following notations. \vskip 3mm \noindent \begin{notation} For any integer $i$, $0\leq i\leq s+t$, denote \par $\bullet$ ${\cal R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$. \noindent For any $\alpha=a_0+a_1y+a_2y^2\in {\cal R}_i$ with $a_0,a_1,a_2\in K_i$, the \textit{Hamming weight} ${\rm wt}_H^{(i)}(\alpha)$ of $\alpha$ over $K_i$ is defined as the number of nonzero coefficients of the polynomial $a_0+a_1y+a_2y^2\in K_i[y;\theta_i]$, i.e., \par $\bullet$ ${\rm wt}_H^{(i)}(\alpha)=|\{j\mid a_j\neq0, \ j=0,1,2\}|$. \noindent For any nonzero left ideal $J$ of ${\cal R}_i$, the \textit{minimum Hamming weight} ${\rm wt}_H^{(i)}(J)$ of $J$ over $K_i$ is defined as \par $\bullet$ ${\rm wt}_H^{(i)}(J)={\rm min}\{{\rm wt}_H^{(i)}(\alpha)\mid \alpha\neq 0, \ \alpha\in J\}$. \end{notation} \section{Skew $\theta_i$-cyclic codes over $K_i$ of length $3$} \noindent In this section, we give all skew $\theta_i$-cyclic codes over $K_i$ of length $3$, i.e., left ideals of the ring ${\cal R}_i$, where $0\leq i\leq s+t$. \par $\diamondsuit$ Let $0\leq i\leq s$. Then $K_i$ is a finite field of cardinality $q^{d_i}$ and $\theta_i$ is the identity automorphism of $K_i$ by Lemma \ref{lm2.3}(v). Hence ${\cal R}_i=K_i[y]/\langle y^3-1\rangle$ which is a commutative ring. In this case, left ideals of ${\cal R}_i$ are in fact ideals of ${\cal R}_i$. By the basic theory of cyclic codes over finite fields, we know that $C_i$ is an ideal of ${\cal R}_i$ if and only if $C_i$ is a cyclic code over $K_i$ of length $3$. The latter is equivalent to that there is a unique monic divisor $g(y)$ of $y^3-1$ in $K_i[y]$ such that $C_i={\cal R}_ig(y)$. Then $g(y)$ is called the \textit{generator polynomial} of $C_i$ and ${\rm dim}_{K_i}(C_i)=3-{\rm deg}_y(g(y))$ where ${\rm deg}_y(g(y))$ is the degree of $g(y)$ as a polynomial with indeterminate $y$. Obviously, ${\cal R}_i(y^3-1)=\{0\}$. \vskip 3mm \noindent \begin{theorem}\label{th3.1} Let $0\leq i\leq s$. Then ${\cal R}_i=K_i[y]/\langle y^3-1\rangle$ which is a commutative ring, and the following hold. \par (i) If $q\equiv 0$ $({\rm mod} \ 3)$, there are $4$ distinct ideals in ${\cal R}_i$: $${\cal R}_ig(y), \ {\rm where} \ g(y)\in \{1, y-1,(y-1)^2,y^3-1\}.$$ (ii) If $q^{d_i}\equiv 2$ $({\rm mod} \ 3)$, there are $4$ distinct ideals in ${\cal R}_i$: $${\cal R}_ig(y), \ {\rm where} \ g(y)\in \{1, y-1,y^2+y+1,y^3-1\}.$$ (iii) Let $q^{d_i}\equiv 1$ $({\rm mod} \ 3)$, $\zeta_i(x)$ a primitive element of $K_i$ and denote $\omega_i(x)=\zeta_i(x)^{\frac{q^{d_i}-1}{3}}$ $({\rm mod} \ f_i(x))$. Then there are $8$ distinct ideals in ${\cal R}_i$: ${\cal R}_ig(y)$, \textit{where} \begin{eqnarray*} &&g(y)\in \{1, y-1,y-\omega_i(x),y-\omega_i(x)^2,y^2+y+1,\\ && \ \ \ \ \ (y-1)(y-\omega_i(x)^2), (y-1)(y-\omega_i(x)), y^3-1\}. \end{eqnarray*} \end{theorem} \vskip 3mm \begin{IEEEproof} (i) Since $q\equiv 0$ (mod $3$), we have $y^3-1=(y-1)^3$ in $K_i[y]$. In this case, $y^3-1$ has $4$ monic divisors in $K_i[y]$: $1$, $y-1$, $(y-1)^2$ and $y^3-1$,. \par (ii) Since $q^{d_i}\equiv 2$ (mod $3$), we have that $y^3-1=(y-1)(y^2+y+1)$ where $y^2+y+1$ is irreducible in $K_i[y]$. In this case, $y^3-1$ has $4$ monic divisors in $K_i[y]$: $1$, $y-1$, $y^2+y+1$ and $y^3-1$. \par (iii) Since $q^{d_i}\equiv 1$ (mod $3$), we have $3|(q^{d_i}-1)$ and $\omega_i(x)$ is a primitive $3$th root of unity in $K_i$, which implies $y^3-1=(y-1)(y-\omega_i(x))(y-\omega_i(x)^2)$. In this case, $y^3-1$ has $8$ monic divisors in $K_i[y]$: $1$, $y-1$, $y-\omega_i(x)$, $y-\omega_i(x)^2$, $y^2+y+1$, $(y-1)(y-\omega_i(x)^2)$, $(y-1)(y-\omega_i(x))$ and $y^3-1$. \end{IEEEproof} \vskip 3mm \par $\diamondsuit$ Let $s+1\leq i\leq s+t$. Then $K_i$ is a finite field of cardinality $q^{d_i}$, $d_i$ is a multiple of $3$ by Lemma \ref{lm2.2}(II), and $\theta_i$ is an $\mathbb{F}_q$-algebra automorphism of $K_i$ with multiplicative order $3$ by Lemma \ref{lm2.3}(v). \par In this case, by \cite[Lemma 1 and Theorem 1]{boucher2007skew} we know that $C_i$ is a left ideal of ${\cal R}_i$ if and only if $C_i$ is a skew $\theta_i$-cyclic code over $K_i$ of length $3$, and the latter is equivalent to that there is a unique monic right divisor $g(y)$ of $y^3-1$ in the skew polynomial ring $K_i[y;\theta_i]$ such that $C_i={\cal R}_ig(y)$. If the latter condition is satisfied, $g(y)$ is called the \textit{generator polynomial} of $C_i$, ${\rm dim}_{K_i}(C_i)=3-{\rm deg}_y(g(y))$ and the number of codewords in $C_i$ is equal to $|C_i|=(q^{d_i})^{3-{\rm deg}_y(g(y))}$. Precisely, a generator matrix of $C_i$ over $K_i$ is given by: $G_{C_i}=(a(x),b(x),1) \ {\rm if} \ g(x)=a(x)+b(x)y+y^2;$ and $$G_{C_i}=\left(\begin{array}{ccc}a(x) & 1 & 0 \cr 0 &\theta_i(a(x)) & 1 \end{array}\right) \ {\rm if} \ g(x)=a(x)+y.$$ \par In order to describe monic right divisors of $y^3-1$ in the skew polynomial ring $K_i[y;\theta_i]$ and the relationships between two nontrivial monic right divisors, we adopt the following notations in the rest of this paper: \par $\bullet$ Let $\zeta_i(x)$ be a primitive element of $K_i$ and denote $\varrho_i(x)=\zeta_i(x)^{q^{\frac{d_i}{3}-1}}$. Then the multiplicative order of $\varrho_i(x)$ is equal to ${\rm ord}(\varrho_i(x))=\frac{q^{d_i}-1}{q^{\frac{d_i}{3}}-1}=1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}.$ Denote $$\mathcal{G}_i=\{\varrho_i(x)^k\mid k=0,1,\ldots,q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}\}$$ which is the multiplicative cyclic subgroup of $K_i^\times$ generated by $\varrho_i(x)$. Then $|\mathcal{G}_i|=1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}$. \vskip 3mm \begin{lemma}\label{lm3.2} Let $s+1\leq i\leq s+t$. Then we have the following: \par (i) $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$ or $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$. \par (ii) For any $\alpha(x)\in K_i^\times$, $\alpha(x)\in \mathcal{G}_i$ if and only if $\alpha(x)$ satisfies the following equation $$\alpha(x)\theta_i(\alpha(x))\theta_i^2(\alpha(x))=1.$$ \par (iii) All distinct monic right divisors of $y^3-1$ with degree $1$ in the skew polynomial ring $K_i[y;\theta_i]$ are given by: $$-\alpha(x)+y, \ \alpha(x)\in \mathcal{G}_i.$$ \par (iv) All distinct monic right divisors of $y^3-1$ with degree $2$ in the skew polynomial ring $K_i[y;\theta_i]$ are given by: $$\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2, \ \alpha(x)\in \mathcal{G}_i.$$ \par (v) For any $\alpha(x)\in \mathcal{G}_i$, we have \begin{eqnarray*} y^3-1&=&\left(-\alpha(x)+y\right)\cdot\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2\right)\\ &=&\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2\right)\cdot\left(-\alpha(x)+y\right). \end{eqnarray*} \noindent Therefore, both the number of right divisors of $y^3-1$ in $K_i[y;\theta_i]$ with degree $1$ and the number of right divisors of $y^3-1$ in $K_i[y;\theta_i]$ with degree $2$ are equal to $1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}$. \end{lemma} \vskip 3mm \begin{IEEEproof} (i) Let $\sigma: \alpha\mapsto \alpha^q$ ($\forall \alpha\in K_i$) be the Frobenius automorphism of $K_i$ over $\mathbb{F}_q$. Then the multiplicative order of $\sigma$ is $d_i$ and every automorphism of $K_i$ over $\mathbb{F}_q$ is of the form: $\sigma^k$, $0\leq k\leq d_i-1$. By Lemma \ref{lm2.2}, $d_i$ is a multiple of $3$. Hence ${\rm ord}(\sigma^k)=3$ if and only if ${\rm gcd}(k,d_i)=\frac{d_i}{3}$, i.e., $k=\frac{d_i}{3}$ or $k=\frac{2d_i}{3}$. By Lemma \ref{lm2.3}(v), $\theta_i$ is an automorphism of $K_i$ over $\mathbb{F}_q$ with multiplicative order $3$, which implies that $\theta_i=\sigma^{\frac{d_i}{3}}$ or $\theta_i=\sigma^{\frac{2d_i}{3}}$. Hence $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$ or $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$. \par (ii) Denote $\alpha=\alpha(x)$ in order to simplify the notation. When $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$, it is clear that $$\alpha\theta_i(\alpha)\theta_i^2(\alpha)=\alpha^{1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}}.$$ When $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$, by $\alpha^{q^{\frac{4d_i}{3}}}=(\alpha^{q^{d_i}})^{q^{\frac{d_i}{3}}} =\alpha^{q^{\frac{d_i}{3}}}$ we have $\alpha\theta_i(\alpha)\theta_i^2(\alpha)=\alpha^{1+q^{\frac{2d_i}{3}}+q^{\frac{4d_i}{3}}}=\alpha^{1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}}$ as well. \par Since $K_i^\times$ is a multiplicative cyclic group with order $q^{d_i}-1$ and $\mathcal{G}_i$ is a subgroup of $K_i^\times$ with order $1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}$, by basic group theory we conclude that $\alpha\in \mathcal{G}_i$ if and only if $\alpha^{1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}}=1$, i.e., $\alpha\theta_i(\alpha)\theta_i^2(\alpha)=1$. \par (iii) Let $\alpha\in K_i$. Dividing $y^3-1$ by $y-\alpha$ from right hand in the skew polynomial ring $K_i[y;\theta_i]$, we \begin{eqnarray*} y^3-1&=&\left(y^2+\theta_i^2(\alpha)y+\theta_i^2(\alpha)\theta_i(\alpha)\right)(y-\alpha)\\ &&+1-\alpha\theta_i(\alpha)\theta_i^2(\alpha). \end{eqnarray*} Hence $-\alpha+y$ is a right divisors of $y^3-1$ in $K_i[y;\theta_i]$ if and only if $1-\alpha\theta_i(\alpha)\theta_i^2(\alpha)=0$, i.e., $\alpha\theta_i(\alpha)\theta_i^2(\alpha)=1$. \par (iv) Let $\beta,\gamma\in K_i$. Then $\gamma+\beta y+y^2$ is a right divisors of $y^3-1$ in $K_i[y;\theta_i]$ if and only if there exists $\alpha\in K_i$ such that \begin{eqnarray*} y^3-1&=&(-\alpha+y)(\gamma+\beta y+y^2)\\ &=&y^3+(\theta_i(\beta)-\alpha)y^2+(\theta_i(\gamma)-\beta\alpha)y-\gamma \alpha, \end{eqnarray*} which is equivalent that $\alpha,\beta,\gamma$ satisfy $\theta_i(\beta)=\alpha$, $\theta_i(\gamma)=\beta\alpha$ and $\gamma \alpha=1$. From these and by $\theta_i^3={\rm id}_{K_i}$, we deduce that $\beta=\theta_i^2(\theta_i(\beta))=\theta_i^2(\alpha)$ and $\gamma=\theta_i^2(\theta_i(\gamma))=\theta_i^2(\beta\alpha)=\theta_i(\alpha)\theta_i^2(\alpha)$, which implies $\alpha\theta_i(\alpha)\theta_i^2(\alpha)=1$. Then by the latter equation and (ii), we conclude that $\alpha\in\mathcal{G}_i$, and hence $$\gamma=\alpha^{-1} \ {\rm and} \ \beta=\theta_i^2(\alpha).$$ \par Therefore, both the number of right divisors of $y^3-1$ in $K_i[y;\theta_i]$ with degree $1$ and the number of right divisors of $y^3-1$ in $K_i[y;\theta_i]$ with degree $2$ are equal to $1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}$. \par (v) It follow from a direct calculation. \end{IEEEproof} \vskip 3mm \par Now, by Lemma \ref{lm3.2} and basic theory of skew cyclic codes we list all distinct left ideals of ${\cal R}_i$, i.e., skew $\theta_i$-cyclic codes over $K_i$ of length $3$, by the following theorem. \vskip 3mm \begin{theorem}\label{th3.3} Let $s+1\leq i\leq s+t$. Then all distinct left ideals of ${\cal R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ are given by one of the following three cases: \par (i) $C_{i,0}=\{0\}$; $C_{i,3}={\cal R}_i$ with $|C_{i,3}|=q^{3d_i}$, ${\rm wt}_H^{(i)}(C_{i,3})=1$ and $G_{C_{i,3}}=I_3$ is a generator matrix of $C_{i,3}$, where $I_3$ is the identity matrix of size $3\times 3$. \par (ii) $C_{i,2,\alpha}={\cal R}_i(-\alpha(x)+y)$, where $\alpha=\alpha(x)\in \mathcal{G}_i$. \par Precisely, we have ${\rm dim}_{K_i}(C_{i,2,\alpha})=2$, $|C_{i,2,\alpha}|=q^{2d_i}$ and a generator matrix of $C_{i,2,\alpha}$ is given by $$G_{C_{i,2,\alpha}}=\left(\begin{array}{ccc}-\alpha(x) & 1 & 0\cr 0 & -\theta_i(\alpha(x))& 1\end{array}\right).$$ Therefore, $C_{i,2,\alpha}=\{(a,b)G_{C_{i,2,\alpha}}\mid a,b\in K_i\}$ and ${\rm wt}_H^{(i)}(C_{i,2,\alpha})=2$. Hence $C_{i,2,\alpha}$ is a MDS linear $[3,2,2]_{q^{d_i}}$-code over $K_i$. \par (iii) $C_{i,1,\alpha}={\cal R}_i(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2)$, where $\alpha=\alpha(x)\in\mathcal{G}_i$. \par Precisely, we have ${\rm dim}_{K_i}(C_{i,1,\alpha})=1$, $|C_{i,1,\alpha}|=q^{d_i}$ and a generator matrix of $C_{i,1,\alpha}$ is given by $$G_{C_{i,1,\alpha}}=(\alpha(x)^{-1},\theta_i^2(\alpha(x)),1).$$ Hence $C_{i,1,\alpha}=\{a G_{C_{i,1,\alpha}}\mid a \in K_i\}$ and ${\rm wt}_H^{(i)}(C_{i,1,\alpha})=3$. Then $C_{i,1,\alpha}$ is a MDS linear $[3,1,3]_{q^{d_i}}$-code over $K_i$. \par Therefore, the number of left ideals of ${\cal R}_i$ is equal to $4+2q^{\frac{d_i}{3}}+2q^{\frac{2d_i}{3}}$. \end{theorem} \vskip 3mm \par In the rest of this paper, for any $\alpha,\beta\in \mathcal{G}_i$, we denote \vskip 2mm\par $\bullet$ $C_{i,2,\alpha}=\mathcal{R}_i(-\alpha+y)$, $C_{i,1,\beta}={\cal R}_i(\beta^{-1}+\theta_i^2(\beta)y+y^2)$ \vskip 2mm\noindent which are skew $\theta_i$-cyclic codes over $K_i$ of length $3$. By Theorems \ref{th2.4}, \ref{th3.1} and \ref{th3.3}, we deduce the following corollary. \vskip 3mm \begin{corollary}\label{co3.4} Using the notations in Section 2, denote $$\delta=|\{d_i \mid q^{d_i}\equiv 1 \ ({\rm mod} \ 3), \ 0\leq i\leq s\}|.$$ Then the number $N_{(m,3,r;q)}$ of left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$ is given by one of the following two cases: \par (i) When $q\equiv 0$ $($mod $3)$, $$N_{(m,3,r;q)}=4^{s+1}\prod_{i=s+1}^{s+t}(4+2q^{\frac{d_i}{3}}+2q^{\frac{2d_i}{3}}).$$ \par (ii) When $q\not\equiv 0$ $($mod $3)$, $$N_{(m,3,r;q)}=2^{\delta}4^{s+1}\prod_{i=s+1}^{s+t}(4+2q^{\frac{d_i}{3}}+2q^{\frac{2d_i}{3}}).$$ \end{corollary} \vskip 3mm\par As the end of this section, we investigate the relationship between two left ideals of the ring $\mathcal{R}_i$ for $i=s+1,\ldots,s+t$. To do this, we consider the relationship between two nontrivial monic right divisors of $y^3-1$ in $K_i[y,\theta_i]$ with different degrees. \vskip 3mm \begin{lemma}\label{lm3.5} For any $\gamma\in \mathcal{G}_i$, denote $$\phi_{i,\gamma}(X)=X^{q^{\frac{d_i}{3}}+1}+\gamma^{q^{\frac{2d_i}{3}}}X+\gamma^{-1},$$ $$\psi_{i,\gamma}(X)=\gamma^{q^{\frac{d_i}{3}}}X^{q^{\frac{d_i}{3}}+1}+\gamma^{-1}X^{q^{\frac{d_i}{3}}}+1.$$ Then both $\phi_{i,\gamma}(X)$ and $\psi_{i,\gamma}(X)$ have exactly $q^{\frac{d_i}{3}}+1$ roots and these roots are contained in $\mathcal{G}_i$. \end{lemma} \vskip 3mm \begin{IEEEproof} As ${\rm gcd}(q,q^{\frac{d_i}{3}}+1)=1$, $\phi_{i,\gamma}(X)$ and $\psi_{i,\gamma}(X)$ have exactly $q^{\frac{d_i}{3}}+1$ roots in some extended field of $K_i$. We only need to prove that all these roots are contained in $\mathcal{G}_i$. \par By $\gamma\in \mathcal{G}_i\subseteq K_i^\times$, we have $\gamma^{1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}}=1$ and $\gamma^{q^{d_i}}=\gamma$, which implies $\gamma^{q^{\frac{2d_i}{3}}+1}=\gamma^{q^{-\frac{d_i}{3}}}$. Then from $$X^{q^{\frac{d_i}{3}}+1}\equiv -(\gamma^{q^{\frac{2d_i}{3}}}X+\gamma^{-1})\ ({\rm mod} \ \phi_{i,\gamma}(X)),$$ we deduce that \begin{eqnarray*} X^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1} &\equiv&(X^{q^{\frac{d_i}{3}}+1})^{q^{\frac{d_i}{3}}}X\\ &\equiv& -(\gamma^{q^{\frac{2d_i}{3}}}X+\gamma^{-1})^{q^{\frac{d_i}{3}}}X\\ &\equiv & -(\gamma^{q^{d_i}}X^{q^{\frac{d_i}{3}}+1}+\gamma^{q^{-\frac{d_i}{3}}}X)\\ &\equiv& -\gamma(X^{q^{\frac{d_i}{3}}+1}+\gamma^{q^{\frac{2d_i}{3}}}X)\\ &\equiv & -\gamma\gamma^{-1}=1 \ ({\rm mod} \ \phi_{i,\gamma}(X)), \end{eqnarray*} which implies that $\phi_{i,\gamma}(X)$ is a factor of $X^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}-1$. Hence $\alpha^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}=1$ for any root $\alpha$ of $\phi_{i,\gamma}(X)$. Therefore, all roots of $\phi_{i,\gamma}(X)$ are contained in $\mathcal{G}_i$. \par The reciprocal polynomial of $\psi_{i,\gamma}(X)$ is equal to $$\psi_{i,\gamma}^\ast(X)=X^{q^{\frac{d_i}{3}}+1}+\gamma^{-1}X+\gamma^{q^{\frac{d_i}{3}}}.$$ Then by $X^{q^{\frac{d_i}{3}}+1}\equiv -(\gamma^{-1}X+\gamma^{q^{\frac{d_i}{3}}})$ (mod $\psi_{i,\gamma}^\ast(X)$) and $\gamma^{-q^{\frac{d_i}{3}}-1}=\gamma^{q^{\frac{2d_i}{3}}}$, it follows that \begin{eqnarray*} X^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1} &\equiv&(X^{q^{\frac{d_i}{3}}+1})^{q^{\frac{d_i}{3}}}X\\ &\equiv& -(\gamma^{-1}X+\gamma^{q^{\frac{d_i}{3}}})^{q^{\frac{d_i}{3}}}X\\ &\equiv&-(\gamma^{-q^{\frac{d_i}{3}}}X^{q^{\frac{d_i}{3}}+1}+\gamma^{q^{\frac{2d_i}{3}}}X)\\ &\equiv&-(-\gamma^{-q^{\frac{d_i}{3}}}(\gamma^{-1}X+\gamma^{q^{\frac{d_i}{3}}})+\gamma^{q^{\frac{2d_i}{3}}}X)\\ &\equiv& 1 \ ({\rm mod} \ \psi_{i,\gamma}^\ast(X)), \end{eqnarray*} which implies that $\psi_{i,\gamma}^\ast(x)$ is a factor of $X^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}-1$. Since $X^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}-1$ is self-reciprocal, we conclude that $\psi_{i,\gamma}(X)$ is also a factor of $X^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}-1$. Therefore, all roots of $\psi_{i,\gamma}(X)$ are contained in $\mathcal{G}_i$. \end{IEEEproof} \vskip 3mm \begin{theorem}\label{th3.6} (i) Let $\alpha,\beta\in \mathcal{G}_i$. Then $C_{i,1,\beta}\subset C_{i,2,\alpha}$ if and only of $\alpha$ and $\beta$ satisfying the following equation \begin{equation} \label{eq5} \alpha\theta_i(\alpha)\beta+\alpha\beta\theta_i^2(\beta)+1=0. \end{equation} \par (ii) For any $\beta\in \mathcal{G}_i$, there are $q^{\frac{d_i}{3}}+1$ codes $C_{i,2,\alpha}$ containing $C_{i,1,\beta}$ where $\alpha$ is given by one of the following two case: \par $\alpha$ is a root of the polynomial $\phi_{i,\beta}(X)$ if $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$; \par $\alpha$ is a root of the polynomial $\psi_{i,\beta}(X)$ if $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$. \par (iii) For any $\alpha\in \mathcal{G}_i$, there are $q^{\frac{d_i}{3}}+1$ codes $C_{i,1,\beta}$ contained in $C_{i,2,\alpha}$ where $\beta$ is given by one of the following two case: \par $\beta$ is a root of the polynomial $\psi_{i,\alpha}(X)$ if $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$; \par $\beta$ is a root of the polynomial $\phi_{i,\alpha}(X)$ if $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$. \end{theorem} \vskip 3mm \begin{IEEEproof} (i) It is clear that $C_{i,1,\beta}\subset C_{i,2,\alpha}$ if and only if $-\alpha+y$ is a right divisor of $\beta^{-1}+\theta_i^2(\beta)y+y^2$. \par Dividing $\beta^{-1}+\theta_i^2(\beta)y+y^2$ by $y-\alpha$ from right hand in the skew polynomial ring $K_i[y;\theta_i]$, we have \begin{eqnarray*} &&\beta^{-1}+\theta_i^2(\beta)y+y^2\\ &=&(\theta_i(\alpha)+\theta_i^2(\beta))(-\alpha+y)+\beta^{-1}+\alpha\theta_i(\alpha)+\alpha\theta_i^2(\beta). \end{eqnarray*} Hence $-\alpha+y$ is a right divisor of $\beta^{-1}+\theta_i^2(\beta)y+y^2$ if and only if $\beta^{-1}+\alpha\theta_i(\alpha)+\alpha\theta_i^2(\beta)=0$, which is equivalent to that $\alpha$ and $\beta$ satisfy (\ref{eq5}). \par (ii) Let $\alpha\in \mathcal{G}_i$. We have one of the following two cases: \par When $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$, it is clear that $$\alpha\theta_i(\alpha)\beta+\alpha\beta\theta_i^2(\beta)+1=\beta\phi_{i,\beta}(\alpha).$$ From this and by (i), we deduce that $C_{i,1,\beta}\subset C_{i,2,\alpha}$ if and only if $\phi_{i,\beta}(\alpha)=0$. Furthermore, by Lemma \ref{lm3.5} we know that the $\phi_{i,\beta}(x)$ has exactly $q^{\frac{d_i}{3}}+1$ roots in $\mathcal{G}_i$. \par When $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$, by $\alpha\theta_i(\alpha)=\alpha^{1+q^{\frac{2d_i}{3}}}=q^{-q^{\frac{d_i}{3}}}$ we have $$\alpha\theta_i(\alpha)\beta+\alpha\beta\theta_i^2(\beta)+1=\alpha^{1+q^{\frac{2d_i}{3}}}\beta\psi_{i,\beta}(\alpha).$$ From this and by (i), we deduce that $C_{i,1,\beta}\subset C_{i,2,\alpha}$ if and only if $\psi_{i,\beta}(\alpha)=0$. Furthermore, by Lemma \ref{lm3.5} we know that the polynomial $\psi_{i,\beta}(x)$ has exactly $q^{\frac{d_i}{3}}+1$ roots in $\mathcal{G}_i$. \par (iii) By (\ref{eq5}) and Lemma \ref{lm3.5}, it can be proved similarly as that of (ii). Here, we omit the proof. \end{IEEEproof} \section{The dual code of any left $G_{(m,3,r)}$-code} \noindent In this section, we give the dual code of any left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ and determine all self-orthogonal left $G_{(m,3,r)}$-codes. \par As in \cite{jitman2013abelian}, the \textit{Euclidian inner product} in $\mathbb{F}_{q}[G_{(m,3,r)}]$ is defined as follows. For $\xi=\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}x^iy^j$ and $\eta=\sum_{i=0}^{m-1}\sum_{j=0}^2b_{i,j}x^iy^j$ in $\mathbb{F}_{q}[G_{(m,3,r)}]$, we set $$[\xi,\eta]_E=\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}b_{i,j}\in \mathbb{F}_q.$$ The \textit{Euclidian dual code} of a left $G_{(m,3,r)}$-code $\mathcal{C}$ over $\mathbb{F}_{q}$ is defined by $$\mathcal{C}^{\bot_E}=\{\xi\in \mathbb{F}_{q}[G_{(m,3,r)}]\mid [\xi,\eta]_E=0, \ \forall \eta\in \mathcal{C}\}.$$ $\mathcal{C}$ is said to be \textit{self-orthogonal} if $\mathcal{C}\subseteq \mathcal{C}^{\bot_E}$. \par For any $\xi(y)=\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}x^iy^j\in \mathbb{F}_{q}[G_{(m,3,r)}]$, as in \cite{jitman2013abelian} we define the \textit{conjugation} $\mu$ on $\mathbb{F}_{q}[G_{(m,3,r)}]$ by $$\mu(\xi(y))=\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}y^{-j}x^{-i} \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $$ \begin{equation} \label{eq6} =a_0(x^{-1})+y^2a_1(x^{-1})+ya_2(x^{-1}), \end{equation} where $a_j(x)=\sum_{i=0}^{m-1}a_{i,j}x^{i}$ and $a_j(x^{-1})=a_{0,j}+\sum_{i=1}^{m-1}a_{i,j}x^{m-i}$ for $j=0,1,2$. It can be verify easily that $$\mu(\xi+\eta)=\mu(\xi)+\mu(\eta) \ {\rm and} \ \mu(\xi\eta)=\mu(\eta)\mu(\xi)$$ for all $\xi,\eta\in \mathbb{F}_{q}[G_{(m,3,r)}]$. Moreover, we have the following \vskip 3mm \begin{lemma}\label{lm4.1} (i) The map $\mu$ defined by $(6)$ is an $\mathbb{F}_{q}$-algebra anti-automorphism of $\mathbb{F}_{q}[G_{(m,3,r)}]$ satisfying $\mu^{-1}=\mu$. \par (ii) For any $\xi,\eta\in \mathbb{F}_{q}[G_{(m,3,r)}]$, we have $[\xi,\eta]_E=0$ if $\xi\cdot \mu(\eta)=0$ in the ring $\mathbb{F}_{q}[G_{(m,3,r)}]$. \par (iii) Let $\mathcal{C}$ be a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ and $\mathcal{B}$ a right ideal of $\mathbb{F}_{q}[G_{(m,3,r)}]$. Then $$\mu(\mathcal{B})\subseteq \mathcal{C}^{\perp_E} \ {\rm if} \ \mathcal{C}\cdot \mathcal{B}=\{0\} \ {\rm in} \ \mathbb{F}_{q}[G_{(m,3,r)}].$$ \end{lemma} \vskip 3mm \begin{IEEEproof} (ii) For $\xi=\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}x^iy^j$ and $\eta=\sum_{i=0}^{m-1}\sum_{j=0}^2b_{i,j}x^iy^j$ in $\mathbb{F}_{q}[G_{(m,3,r)}]$, by ${\rm ord}(x)=m$ and ${\rm ord}(y)=3$ we deduce that \begin{eqnarray*} \xi\cdot\mu(\eta)&=&(\sum_{i=0}^{m-1}\sum_{j=0}^2a_{i,j}x^iy^j)(\sum_{k=0}^{m-1}\sum_{l=0}^2b_{k,l}y^{3-l}x^{m-k})\\ &=&[\xi,\eta]_E+\sum_{0\leq i\leq m-1, 0\leq j\leq 2,i+j\neq 0}c_{i,j}x^iy^j \end{eqnarray*} for some $c_{i,j}\in \mathbb{F}_q$. Hence $[\xi,\eta]_E=0$ if $\xi\cdot \mu(\eta)=0$ in the ring $\mathbb{F}_{q}[G_{(m,3,r)}]$. \par (iii) For any $\beta\in \mathcal{B}$ and $\eta\in \mathcal{C}$, by $\mathcal{C}\cdot \mathcal{B}=\{0\}$ we have $\eta\beta=0$, which implies $\mu(\beta)\cdot\mu(\eta)=0$ by (i), and so $[\mu(\beta),\eta]_E=0$ by (ii). From this we deduce that $\mu(\beta)\in\mathcal{C}^{\bot_E}$. Therefore, $\mu(\mathcal{B})\subseteq \mathcal{C}^{\bot_E}$. \end{IEEEproof} \vskip 3mm \par By the identification of $\mathbb{F}_q[G_{(m,3,r)}]$ with ${\cal A}[y;\theta]/\langle y^3-1\rangle$, we see that $\mathcal{A}=\mathbb{F}_q[x]/\langle x^m-1\rangle$ is a subring of $\mathbb{F}_{q}[G_{(m,3,r)}]$. In the following, we consider the restriction of $\mu$ on $\mathcal{A}$. In order to simplify the notation, we still denote this restriction by $\mu$. Obviously, we have $$\mu(a(x))=a(x^{-1})=\sum_{i=0}^{m-1}a_ix^{-i}=a_0+\sum_{i=1}^{m-1}a_ix^{m-i}$$ for all $a(x)=\sum_{i=0}^{m-1}a_ix^{i}\in \mathcal{A}$. It is clear that $\mu$ is an $\mathbb{F}_{q}$-algebra automorphism of $\mathcal{A}$ satisfying $\mu^{-1}=\mu$. \par Using the notations of Section 2, we know that $J(i)=J_{k_i}^{(q)}$, $0\leq i\leq s+t$, are the all distinct $q$-cyclotomic cosets modulo $m$. By Lemma \ref{lm2.2}, we have one of the following two cases: \par $\diamondsuit$ $0\leq i\leq s$. In this case, we have $\theta(j)=rj\equiv j$ (mod $m$) for all $j\in J(i)=J_{k_i}^{(q)}$. Then it is clear that $-J(i)=\{-j\mid j\in J(i)\}$ (mod $m$) is a $q$-cyclotomic coset modulo $m$ satisfying $\theta(-j)=-rj\equiv -j$ (mod $m$) for all $j\in J(i)$. Hence $-J(i)$ is also a $q$-cyclotomic coset modulo $m$ satisfying Condition (I) in Lemma \ref{lm2.2}. Therefore, there is a unique integer $i^\prime$, $0\leq i^\prime\leq s$, such that $-J(i)=J(i^\prime)$. \par $\diamondsuit$ $s+1\leq i\leq s+t$. In this case, we have $\theta(j)\in J(i)$ and $\theta(j)\not\equiv j$ (mod $m$) for all $j\in J(i)=J_{k_i}^{(q)}$. Then it is clear that $-J(i)$ is a $q$-cyclotomic coset modulo $m$ satisfying $\theta(-j)=-\theta(j)\in -J(i)$ and $\theta(-j)\not\equiv -j$ (mod $m$) for all $j\in J(i)$. Hence $-J(i)$ is also a $q$-cyclotomic coset modulo $m$ satisfying Condition (II) in Lemma \ref{lm2.2}. Therefore, there is a unique integer $i^\prime$, $s+1\leq i^\prime\leq s+t$, such that $-J(i)=J(i^\prime)$. \par We also use $\mu$ to denote this map $i\mapsto i^\prime$, i.e., $\mu(i)=i^\prime$. Whether $\mu$ denotes the automorphism of $\mathcal{A}$ or this map on the set $\{0,1,\ldots,s+t\}$ is determined by context. The next lemma shows the compatibility of the two uses of $\mu$. \vskip 3mm \begin{lemma}\label{lm4.2} Using the notations above, the following assertions hold. \par (i) $\mu$ is a permutation on $\{0,1,\ldots,s+t\}$ satisfying $\mu^{-1}=\mu$, $\mu(0)=0$, $1\leq \mu(i)\leq s$ for all $1\leq i\leq s$ and $s+1\leq \mu(i)\leq s+t$ for all $s+1\leq i\leq s+t$. \par (ii) After a rearrangement of $J(0),J(1)\ldots,J(s+t)$, there are nonnegative integers $s_1,s_2,t_1,t_2$ satisfying the following conditions: \par $\bullet$ $s=s_1+2s_2$, $\mu(i)=i$ for all $1\leq i\leq s_1$, $\mu(i)=i+s_2$ and $\mu(i+s_2)=i$ for all $s_1+1\leq i\leq s_1+s_2$; \par $\bullet$ $t=t_1+2t_2$, $\mu(i)=i$ for all $s+1\leq i\leq s+t_1$, $\mu(i)=i+t_2$ and $\mu(i+t_2)=i$ for all $s+t_1+1\leq i\leq s+t_1+t_2$. \par (iii) $\mu(\varepsilon_i(x))=\varepsilon_{\mu(i)}(x)$ and $\mu(\mathcal{A}_i)=\mathcal{A}_{\mu(i)}$ for all $i=0,1,\ldots,s+t$. \par (iv) Let $\mu$ be the map defined by $\mu(a(x))=a(x^{-1})=a(x^{m-1})$ $({\rm mod} \ f_{\mu(i)}(x))$ for all $a(x)\in K_i=\mathbb{F}_q[x]/\langle f_i(x)\rangle$. Then $\mu$ is an $\mathbb{F}_q$-algebra isomorphism from $K_i$ onto $K_{\mu(i)}=\mathbb{F}_q[x]/\langle f_{\mu(i)}(x)\rangle$ satisfying $\mu\theta_i=\theta_{\mu(i)}\mu$. \par (v) Let $0\leq i\leq s+t$. Using the notations of Theorem \ref{th2.4}(ii), the $\mathbb{F}_{q}$-algebra anti-automorphism $\mu$ of $\mathbb{F}_{q}[G_{(m,3,r)}]$ induces an $\mathbb{F}_q$-algebra anti-isomorphism $\varphi_{\mu(i)}^{-1}\mu\varphi_i$ from $\mathcal{R}_i$ onto $\mathcal{R}_{\mu(i)}$. We denote this anti-isomorphism by $\mu$ as well. Then for any $\alpha(y)=a(x)+b(x)y+c(x)y^2\in \mathcal{R}_i$ where $a(x),b(x),c(x)\in K_i$, we have \begin{equation} \label{eq7} \mu(\alpha(y))=a(x^{-1})+y^2b(x^{-1})+yc(x^{-1}). \end{equation} \end{lemma} \vskip 1mm \begin{IEEEproof} (i) follows from the definition of the map $\mu$, and (ii) follows from (i). \par (iii) It is clear that $\mu(\varepsilon_i(x))=\frac{1}{m}\sum_{l=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-jl})x^{-l}$ by (\ref{eq3}) in Section 2. From this, by $\mathbb{Z}_m=-\mathbb{Z}_m$ and $J(\mu(i))=-J(i)=\{-j\mid j\in J(i)\}$ we deduce that \begin{eqnarray*} \mu(\varepsilon_i(x))&=&\frac{1}{m}\sum_{l=0}^{m-1}(\sum_{j\in J(i)}\zeta^{-(-j)(-l)})x^{-l}\\ &=&\frac{1}{m}\sum_{k=0}^{m-1}(\sum_{j^\prime\in J(\mu(i))}\zeta^{-j^\prime k})x^{k}\\ &=&\varepsilon_{\mu(i)}(x). \end{eqnarray*} Hence $\mu(\mathcal{A}_i)=\mu(\mathcal{A}\varepsilon_i(x))=\mu(\mathcal{A})\mu(\varepsilon_i(x)) =\mathcal{A}\varepsilon_{\mu(i)}(x)=\mathcal{A}_{\mu(i)}$ by Lemma \ref{lm2.3}(ii). \par (iv) By (iii), we know that $\mu$ induces an $\mathbb{F}_q$-algebra isomorphism from $\mathcal{A}_i$ onto $\mathcal{A}_{\mu(i)}$. Then by Lemma \ref{lm2.3}(iii), we see that $\varphi_{\mu(i)}^{-1}\mu\varphi_i$ is an $\mathbb{F}_q$-algebra isomorphism from $K_i$ onto $K_{\mu(i)}$. For any $a(x)\in K_i$, by Equation (\ref{eq3}) in Section 2 we have $\varepsilon_{\mu(i)}(x)\equiv 1$ (mod $f_{\mu(i)}(x)$), which implies \begin{eqnarray*} (\varphi_{\mu(i)}^{-1}\mu\varphi_i)(a(x))&=&\varphi_{\mu(i)}^{-1}\mu(\varepsilon_i(x)a(x))\\ &=&\varphi_{\mu(i)}^{-1}(\varepsilon_{\mu(i)}(x)a(x^{-1}))\\ &=&a(x^{-1}) \ ({\rm mod} \ f_{\mu(i)}(x)). \end{eqnarray*} Since we denote $\varphi_{\mu(i)}^{-1}\mu\varphi_i$ by $\mu$ as well, the map $\mu: a(x)\mapsto a(x^{-1})$ (mod $f_{\mu(i)}(x)$) is an $\mathbb{F}_q$-algebra isomorphism from $K_i$ onto $K_{\mu(i)}$. Moreover, for any $a(x)\in K_i$ by Lemma \ref{lm2.3}(v) and $a(x^{-1})\in K_{\mu(i)}$ it follows that \begin{eqnarray*} (\mu\theta_i)(a(x))&=&\mu(a(x^r))=a(x^{-r})=\theta_{\mu(i)}(a(x^{-1}))\\ &=&(\theta_{\mu(i)}\mu)(a(x)). \end{eqnarray*} Hence $\mu\theta_i=\theta_{\mu(i)}\mu$. \par (v) By (iii) and Theorem \ref{th2.4}(ii), we have the following commutative diagram form ring isomorphisms: $$\left.\begin{array}{ccc}\ \ \ \ \ \ \ \ \ \mathcal{R}_i & \stackrel{\varphi_i}{\longrightarrow} & \mathcal{A}_i[y;\theta|_{\mathcal{A}_i}]/\langle \varepsilon_i(x)(y^3-1)\rangle \cr {\small \varphi_{\mu(i)}^{-1}\mu\varphi_i}\downarrow & & \ \ \ \ \downarrow \mu \cr \ \ \ \ \ \ \ \ \ \mathcal{R}_{\mu(i)} & \stackrel{\varphi_{\mu(i)}}{\longrightarrow} & \mathcal{A}_{\mu(i)}[y;\theta|_{\mathcal{A}_{\mu(i)}}]/\langle \varepsilon_{\mu(i)}(x)(y^3-1)\rangle\end{array}\right.$$ As we write $\varphi_{\mu(i)}^{-1}\mu\varphi_i$ by $\mu$, for any $a(x),b(x),c(x)\in K_i$ by the identification of $\mathbb{F}_q[G_{(m,3,r)}]$ with ${\cal A}[y;\theta]/\langle y^3-1\rangle$, $\varepsilon_i(x^{-1})=\mu(\varepsilon_i(x))=\varepsilon_{\mu(i)}(x)$, Equation (\ref{eq6}) and $y\varepsilon_{\mu(i)}(x)=\theta(\varepsilon_{\mu(i)}(x))y=\varepsilon_{\mu(i)}(x)y$, we deduce that \begin{eqnarray*} &&\mu(a(x)+b(x)y+c(x)y^2)\\ &=&(\varphi_{\mu(i)}^{-1}\mu)(\varphi_i(a(x)+b(x)y+c(x)y^2))\\ &=&\varphi_{\mu(i)}^{-1}\left(\mu(\varepsilon_i(x)a(x)+\varepsilon_i(x)b(x)y+\varepsilon_i(x)c(x)y^2)\right)\\ &=&\varphi_{\mu(i)}^{-1}(\varepsilon_i(x^{-1})a(x^{-1})+y^2\varepsilon_i(x^{-1})b(x^{-1})\\ &&+y\varepsilon_i(x^{-1})c(x^{-1}))\\ &=&\varphi_{\mu(i)}^{-1}\left(\varepsilon_{\mu(i)}(x)\left(a(x^{-1})+y^2b(x^{-1})+yc(x^{-1})\right)\right)\\ &=&a(x^{-1})+y^2b(x^{-1})+yc(x^{-1}) \end{eqnarray*} by (iv). \end{IEEEproof} \vskip 3mm \begin{corollary}\label{co4.3} For any $\alpha(x)\in \mathcal{G}_i$, we denote $$\widehat{\alpha}(x)=(\alpha(x^{m-1}))^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}} \ ({\rm mod} \ f_{\mu(i)}(x)).$$ Using the notations of Lemma \ref{lm4.2}(iv), we have that $\widehat{\alpha}(x)=(\alpha(x^{-1}))^{-1}=(\mu(\alpha(x)))^{-1} \in \mathcal{G}_{\mu(i)}$, $\alpha(x^{-1})\widehat{\alpha}(x)=1$ and $\alpha(x)=(\widehat{\alpha}(x^{-1}))^{-1}$. \end{corollary} \vskip 3mm \begin{IEEEproof} As $\alpha(x)\in \mathcal{G}_i$, we see that $\alpha(x)$ is an element of $K_i=\mathbb{F}_q[x]/\langle f_i(x)\rangle$ satisfying $(\alpha(x))^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}=1$. By Lemma \ref{lm4.2}(iv), we know that $\mu$ is an $\mathbb{F}_q$-algebra isomorphism from $K_i$ onto $K_{\mu(i)}=\mathbb{F}_q[x]/\langle f_{\mu(i)}(x)\rangle$. Hence $(\mu(\alpha(x)))^{-1}\in K_{\mu(i)}$ and $(\mu(\alpha(x)))^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}+1}=1$ in $K_{\mu(i)}$, which implies $\mu(\alpha(x))\in \mathcal{G}_{\mu(i)}$, and so $(\mu(\alpha(x))^{-1}\in \mathcal{G}_{\mu(i)}$. Finally, by $f_{\mu(i)}(x)|(x^m-1)$ it follows that \begin{eqnarray*} \widehat{\alpha}(x)&=&(\alpha(x^{-1}))^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}}=(\mu(\alpha(x)))^{q^{\frac{2d_i}{3}}+q^{\frac{d_i}{3}}}\\ &=&(\mu(\alpha(x)))^{-1} \end{eqnarray*} in $K_{\mu(i)}$. Then $\alpha(x)=(\mu(\widehat{\alpha}(x)))^{-1}=(\widehat{\alpha}(x^{-1}))^{-1}$. \end{IEEEproof} \vskip 3mm \par For any integer $i$, $0\leq i\leq s+t$, and $g(y),h(y)\in \mathcal{R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$, in the following we define $$g(y)\sim_l h(y) \ {\rm if} \ g(y)=\alpha h(y) \ {\rm for} \ {\rm some} \ \alpha\in \mathcal{R}_i^\times,$$ where $\mathcal{R}_i^\times$ is the set of invertible elements in $\mathcal{R}_i$. It is clear that $\mathcal{R}_ig(y)=\mathcal{R}_ih(y)$ if $g(y)=\alpha h(y)$. \vskip 3mm \begin{lemma}\label{lm4.4} For any integer $i$, $0\leq i\leq s+t$, we have the following conclusions: \par (i) $\mu(y^2+y+1)\sim_l y^2+y+1$, $\mu(y^3-1)\sim_l y^3-1$ and $\mu((y-1)^j)\sim_l (y-1)^j$ for all $j=0,1,2$. \par (ii) Let $0\leq i\leq s$ and $q^{d_i}\equiv 1$ (mod $3$). Then $\mu(y-\omega_i(x))\sim_l y-\omega_i(x^{-1})^2$ and $\mu(y-\omega_i(x)^2)\sim_l y-\omega_i(x^{-1})$ in $\mathcal{R}_{\mu(i)}$. \par (iii) Let $s+1\leq i\leq s+t$ and $\alpha(x)\in \mathcal{G}_i$. Then $$\mu(-\alpha(x)+y)\sim_l -\theta_{\mu(i)}(\widehat{\alpha}(x))+y,$$ \begin{eqnarray*} &&\mu\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x)) y+y^2\right)\\ &\sim_l&\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x))\right)^{-1} +\theta_{\mu(i)}^2\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x))\right)y+y^2. \end{eqnarray*} \end{lemma} \vskip 3mm \begin{IEEEproof} (i) By Equation (\ref{eq7}) and $y^3=1$, it follows that $\mu(y-1)=y^{2}-1=(-y^2)(y-1)$ where $-y^2\in \mathcal{R}_i^\times$. The other conclusion can be verified similarly. \par (ii) Since $\omega_i(x)^3=1$ and $\mu$ is a ring isomorphism from $\mathcal{R}_i$ onto $\mathcal{R}_{\mu(i)}$ by Lemma \ref{lm4.2}(v), it follows that $\omega_i(x^{-1})^3=(\mu(\omega_i(x)))^3=1$. As $-\omega_i(x^{-1})y^2\in \mathcal{R}_{\mu(i)}^\times$, we have \begin{eqnarray*} \mu(y-\omega_i(x))&=&-\omega_i(x^{-1})+y^2\\ &=&(-\omega_i(x^{-1})y^2)(y-\omega_i(x^{-1})^2)\\ &\sim_l&y-\omega_i(x^{-1})^2. \end{eqnarray*} Similarly, one can verify that $\mu(y-\omega_i(x)^2)\sim_l y-\omega_i(x^{-1})$. \par (iii) By (\ref{eq7}), Lemma \ref{lm4.2}(v) and Corollary \ref{co4.3} we have \begin{eqnarray*} \mu(-\alpha(x)+y) &=&-\alpha(x^{-1})+y^2\\ &=&-\mu(\alpha(x))\left(1-\widehat{\alpha}(x)y^2\right)\\ &=&-\mu(\alpha(x))\left(1-y^2\theta_{\mu(i)}(\widehat{\alpha}(x))\right)\\ &=&-\mu(\alpha(x))y^2\cdot y\left(1-y^2\theta_{\mu(i)}(\widehat{\alpha}(x))\right)\\ &=&-\mu(\alpha(x))y^2\left(-\theta_{\mu(i)}(\widehat{\alpha}(x))+y\right), \end{eqnarray*} where $-\mu(\alpha(x))y^2\in \mathcal{R}_{\mu(i)}^\times$ and $\theta_{\mu(i)}(\widehat{\alpha}(x))\in \mathcal{G}_{\mu(i)}$ by Corollary \ref{co4.3}. Similarly, we have \begin{eqnarray*} &&\mu\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x)) y+y^2\right)\\ &=&\alpha(x^{-1})^{-1}+y^2\theta_{\mu(i)}^2(\alpha(x^{-1})) +y\\ &=&y^2\cdot y\left(\widehat{\alpha}(x)+y^2\theta_{\mu(i)}^2(\widehat{\alpha}(x)^{-1})+y\right)\\ &=&y^2\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x)^{-1}) +\theta_{\mu(i)}(\widehat{\alpha}(x))y+y^2\right) \end{eqnarray*} where $y^2\in \mathcal{R}_{\mu(i)}^\times$, $\theta_{\mu(i)}^2(\widehat{\alpha}(x)^{-1})=\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x))\right)^{-1}\in \mathcal{G}_{\mu(i)}$ by Corollary 4.3 and $\theta_{\mu(i)}(\widehat{\alpha}(x))=\theta_{\mu(i)}^2\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x))\right)$. \end{IEEEproof} \vskip 3mm \par Now, we give the dual code of any left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ by the following theorem. \vskip 3mm \begin{theorem}\label{th4.5} Let ${\cal C}=\oplus_{i=0}^{s+t}({\cal A}_i\Box_{\varphi_i}C_i)$ be a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$, where $C_i$ is a left ideal of the ring ${\cal R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ given by Theorems \ref{th3.1} and \ref{th3.3}. Then the dual code ${\cal C}^{\bot_E}$ of ${\cal C}$ is also a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$. Precisely, we have $${\cal C}^{\bot_E}=\bigoplus_{i=0}^{s+t}({\cal A}_i\Box_{\varphi_i}D_i),$$ where $D_i$ is a left ideal of ${\cal R}_i$ given by one of the following cases: \par (i) Let $0\leq i\leq s$. Then $\mathcal{R}_i=K_i[y]/\langle y^3-1\rangle$ and $D_i$ is given by one of the following subcases: \par (i-1) Let $q\equiv 0$ $({\rm mod} \ 3)$. Then $D_{\mu(i)}=\mathcal{R}_{\mu(i)}\frac{(y-1)^3}{g(y)}$, if $C_i=\mathcal{R}_{i}g(y)$ where $g(y)\in\{1,y-1,(y-1)^2,(y-1)^3\}$. \par (i-2) Let $q^{d_i}\equiv 2$ $({\rm mod} \ 3)$. Then $D_{\mu(i)}=\mathcal{R}_{\mu(i)}\frac{y^3-1}{g(y)}$, if $C_i=\mathcal{R}_{i}g(y)$ where $g(y)\in\{1,y-1,y^2+y+1,y^3-1\}$. \par (i-3) Let $q^{d_i}\equiv 1$ $({\rm mod} \ 3)$. Then $D_{\mu(i)}=\mathcal{R}_{\mu(i)}\vartheta(y)$ if $C_i=\mathcal{R}_{i}g(y)$, where the pair $(g(y),\vartheta(y))$ of polynomials is given by the following table: \vskip 1mm \begin{center} \begin{tabular}{l|l}\hline $g(y)$ & $\vartheta(y)$ (${\rm mod} \ f_{\mu(i)}(x)$)\\ \hline $1$ & $y^3-1$,\\ $y-1$ & $y^2+y+1$\\ $y-\omega_i(x)$ & $(y-1)(y-\omega_i(x^{-1}))$ \\ $y-\omega_i(x)^2$ & $(y-1)(y-\omega_i(x^{-1})^2)$ \\ $y^2+y+1$ & $y-1$ \\ $(y-1)(y-\omega_i(x)^2)$ & $y-\omega_i(x^{-1})^2$ \\ $(y-1)(y-\omega_i(x))$ & $y-\omega_i(x^{-1})$ \\ $y^3-1$ & $1$ \\ \hline \end{tabular} \end{center} \vskip 1mm \par (ii) Let $s+1\leq i\leq s+t$. Then $\mathcal{R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ and $D_i$ is given by one of the following subcases: \par (ii-1) $D_{\mu(i)}={\cal R}_{\mu(i)}\left(-\theta_{\mu(i)}(\widehat{\alpha}(x))+y\right)=C_{\mu(i),2,\theta_{\mu(i)}(\widehat{\alpha})}$ and a generator matrix of $D_{\mu(i)}$ is given by $$G_{D_{\mu(i)}}=\left(\begin{array}{ccc}-\theta_{\mu(i)}(\widehat{\alpha}(x)) & 1 & 0 \cr 0 & -\theta_{\mu(i)}\left(\theta_{\mu(i)}(\widehat{\alpha}(x))\right) & 1 \end{array}\right)$$ as a linear code over $K_{\mu(i)}$ of length $3$, if $C_i=C_{i,1,\alpha}=\mathcal{R}_{i}\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2\right)$ where $\alpha(x)\in \mathcal{G}_i$. \par (ii-2) $D_{\mu(i)}={\cal R}_{\mu(i)}(\theta_{\mu(i)}^2(\widehat{\alpha}(x)^{-1}) +\theta_{\mu(i)}(\widehat{\alpha}(x))y+y^2 )=C_{\mu(i),1,\theta_{\mu(i)}^2(\widehat{\alpha})}$ and a generator matrix of $D_{\mu(i)}$ is given by $$G_{D_{\mu(i)}}=\left(\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x))\right)^{-1}, \theta_{\mu(i)}^2\left(\theta_{\mu(i)}^2(\widehat{\alpha}(x))\right),1\right)$$ as a linear code over $K_{\mu(i)}$ of length $3$, if $C_i=C_{i,2,\alpha}=\mathcal{R}_{i}(-\alpha(x)+y)$ where $\alpha(x)\in \mathcal{G}_i$. \par (ii-3) $D_{\mu(i)}=\{0\}$ if $C_i={\cal R}_i$; $D_{\mu(i)}={\cal R}_{\mu(i)}$ if $C_i=\{0\}$. \end{theorem} \vskip 3mm \begin{IEEEproof} Let $K_i=\mathbb{F}_q[x]/\langle f_i(x)\rangle$, $\mathcal{R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ and $B_i$ be an right ideal of the ring $\mathcal{R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ given by one of the following two cases: \par (A) Let $0\leq i\leq s$. Then $\theta_i={\rm id}_{K_i}$, $\mathcal{R}_i=K_i[y]/\langle y^3-1\rangle$ and $B_i$ is given by one of the following three subcases. \par (A-1) Let $q\equiv 0$ (mod $3$). Then $B_i=\frac{y^3-1}{g(y)}\mathcal{R}_i$ if $C_i=\mathcal{R}_ig(y)$ where $g(y)\in\{1, y-1, (y-1)^2, y^3-1\}$. \par (A-2) Let $q^{d_i}\equiv 2$ (mod $3$). Then $B_i=\frac{y^3-1}{g(y)}\mathcal{R}_i$ if $C_i=\mathcal{R}_ig(y)$ where $g(y)\in\{1, y-1, y^2+y+1, y^3-1\}$. \par (A-3) Let $q^{d_i}\equiv 1$ (mod $3$). Then $B_i=\frac{y^3-1}{g(y)}\mathcal{R}_i$ if $C_i=\mathcal{R}_ig(y)$ where $g(y)\in\{1, y-1, y-\omega_i(x), y-\omega_i(x)^2, y^2+y+1, ( y-1)(y-\omega_i(x)^2), ( y-1)(y-\omega_i(x)),y^3-1\}$. \par (B) Let $s+1\leq i\leq s+t$. Then $B_i$ is given by one of the following four subcases. \par (B-1) $B_i=(-\alpha(x)+y)\mathcal{R}_i$, if $C_i=\mathcal{R}_i(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2)$ where $\alpha(x)\in\mathcal{G}_i$. \par (B-2) $B_i=\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2\right)\mathcal{R}_i$, if $C_i=\mathcal{R}_i(-\alpha(x)+y)$ where $\alpha(x)\in\mathcal{G}_i$. \par (B-3) $B_i=\{0\}$, if $C_i=\mathcal{R}_i$; $B_i=\mathcal{R}_i$, if $C_i=\{0\}$. \noindent By Theorems \ref{th3.1} and \ref{th3.3}, Lemma \ref{lm3.2}(v) and direct calculations, one can easily verify that \begin{equation} \label{eq8} C_i\cdot B_i=\{0\} \ {\rm in} \ \mathcal{R}_i, \ i=0,1,\ldots,s+t. \end{equation} \par For any integer $0\leq i\leq s+t$, let $D_{\mu(i)}=\mu(B_i)$. By Lemma \ref{lm4.2}(v) we see that $D_{\mu(i)}$ is a left ideal of $\mathcal{R}_{\mu(i)}$. Let $$\mathcal{D}=\sum_{i=0}^{s+t}\mathcal{A}_i\Box_{\varphi_i}D_i =\bigoplus_{i=0}^{s+t}\mathcal{A}_{\mu(i)}\Box_{\varphi_{\mu(i)}}D_{\mu(i)}.$$ Then by Theorem \ref{th2.4}(iii), we conclude that $\mathcal{D}$ is a left $G_{(m,3,r)}$-code over $\mathbb{F}_q$. \par $\diamondsuit$ First, we give the clear expression of $D_{\mu(i)}=\mu(B_i)$. \par For the trivial case: $B_i=\mathcal{R}_i$ or $B_i=\{0\}$, the conclusion follows from Lemma 4.2(v) immediately. Then we only need to consider the nontrivial cases in (A) and (B). \par In the case of (A-1), $B_i=\frac{y^3-1}{g(y)}\mathcal{R}_i$. If $g(y)=(y-1)^2$, then $B_i=(y-1)\mathcal{R}_i$. By Lemma \ref{lm4.2}(v) and Lemma \ref{lm4.4}(i), we have $D_{\mu(i)}=\mu(B_i)=\mathcal{R}_{\mu(i)}\mu(y-1)=\mathcal{R}_{\mu(i)}(y-1)$. \par Similarly, one can easily prove that the other conclusions in (i-1) and all conclusions in (i-2) hold from (A-1) and (A-2). \par In the case of (A-3), $B_i=\frac{y^3-1}{g(y)}\mathcal{R}_i$. If $g(y)=(y-1)(y-\omega(x)^2)$, by Lemma \ref{lm4.2}(v) and Lemma \ref{lm4.4}(ii), we have \begin{eqnarray*} D_{\mu(i)}&=&\mu((y-\omega_i(x))\mathcal{R}_i)=\mu(\mathcal{R}_i)\mu((y-\omega_i(x))\\ &=&\mathcal{R}_{\mu(i)}(y-\omega_i(x^{-1})^2). \end{eqnarray*} \par Similarly, one can easily prove that the other conclusions in (i-3) hold from (A-3). \par In the case of (B-1), by Lemma \ref{lm4.2}(v) and Lemma \ref{lm4.4}(iii) we have \begin{eqnarray*} D_{\mu(i)}&=&\mu\left((-\alpha(x)+y)\mathcal{R}_i\right) =\mu(\mathcal{R}_i)\mu(-\alpha(x)+y)\\ &=&{\cal R}_{\mu(i)}\left(-\theta_{\mu(i)}(\widehat{\alpha}(x))+y\right)\\ &=&C_{\mu(i),2,\theta_{\mu(i)}(\widehat{\alpha})} \end{eqnarray*} Hence the conclusion (ii-1) holds by Theorem \ref{th3.3}(ii). \par Similarly, in the case of (B-2) we have \begin{eqnarray*} &&D_{\mu(i)} =\mu(\mathcal{R}_i)\mu\left(\alpha(x)^{-1}+\theta_i^2(\alpha(x)) y+y^2\right)\\ &=&{\cal R}_{\mu(i)}\left((\theta_{\mu(i)}^2(\widehat{\alpha}(x)))^{-1} +\theta_{\mu(i)}^2(\theta_{\mu(i)}^2(\widehat{\alpha}(x)))y+y^2\right)\\ &=&C_{\mu(i),1,\theta_{\mu(i)}^2(\widehat{\alpha})}. \end{eqnarray*} Hence the conclusion (ii-2) holds by Theorem \ref{th3.3}(iii). \par $\diamondsuit$ Then we prove that $|\mathcal{C}||\mathcal{D}|=|\mathbb{F}_q|^{3m}$. For any $0\leq i\leq s+t$, by Theorems \ref{th3.1}, \ref{th3.3} and direct calculations we deduce that $|C_i||D_{\mu(i)}|=|K_i|^3=|\mathcal{R}_i|$. From this and by Theorem \ref{th2.4} (i)--(iii), we obtain \begin{eqnarray*} |\mathcal{C}||\mathcal{D}|&=&(\prod_{i=0}^{s+t}|C_i|)(\prod_{i=0}^{s+t}|D_{\mu(i)}|)=\prod_{i=0}^{s+t}|C_i||D_{\mu(i)}|\\ &=&\prod_{i=0}^{s+t}|\mathcal{R}_i|=\prod_{i=0}^{s+t}|\mathcal{A}_i[y;\theta|_{\mathcal{A}_i}]/\langle \varepsilon_i(x)(y^3-1)\rangle|\\ &=&|\mathcal{A}[y;\theta]/\langle y^3-1\rangle|=|\mathbb{F}_q[G_{(m,3,r)}]|\\ &=&|\mathbb{F}_q|^{3m}. \end{eqnarray*} \par $\diamondsuit$ We claim that $\mathcal{D}\subseteq \mathcal{C}^{\bot_E}$. In fact, let $\xi\in \mathcal{D}$ and $\eta\in \mathcal{C}$. Then for each integer $i$, $0\leq i\leq s+t$, there exist $\alpha_i\in C_i$ and $\beta_i\in D_i$ such that $\xi=\sum_{i=0}^{s+t}\varepsilon_i(x)\alpha_i$ and $\eta=\sum_{i=0}^{s+t}\varepsilon_i(x)\beta_i$, where $C_i$ and $D_i$ are left ideals of $\mathcal{R}_i$ given by (i)--(ii) and $\varepsilon_i(x)\alpha_i, \varepsilon_i(x)\beta_i\in \mathcal{A}_i[y;\theta|_{\mathcal{A}_i}]/\langle \varepsilon_i(x)(y^3-1)\rangle$. By Lemma \ref{lm2.3}(iv), we see that $\varepsilon_i(x)$ is the multiplicative identity of $\mathcal{A}_i[y;\theta|_{\mathcal{A}_i}]/\langle \varepsilon_i(x)(y^3-1)\rangle$. Since $\varepsilon_i(x)\varepsilon_j(x)=0$ for all $0\leq i\neq j\leq s+t$, we have $\varepsilon_i(x)\varepsilon_{\mu(j)}(x)=0$ if $i\neq\mu(j)$, i.e., $j\neq\mu(i)$. Hence \begin{eqnarray*} \xi\cdot\mu(\eta)&=&(\sum_{i=0}^{s+t}\varepsilon_i(x)\alpha_i)(\sum_{i=0}^{s+t}\mu(\varepsilon_i(x)\beta_i)\\ &=&\left(\sum_{i=0}^{s+t}(\varepsilon_i(x)\alpha_i)\varepsilon_i(x)\right)\\ &&\cdot\left(\sum_{i=0}^{s+t}\varepsilon_{\mu(i)}(x)(\mu(\beta_i)\varepsilon_{\mu(i)}(x))\right)\\ &=&\sum_{i,j=0}^{s+t}(\varepsilon_i(x)\alpha_i) \varepsilon_i(x)\varepsilon_{\mu(j)}(x)(\mu(\beta_j)\varepsilon_{\mu(j)}(x))\\ &=&\sum_{i=0}^{s+t}(\varepsilon_i(x)\alpha_i) \varepsilon_i(x)(\mu(\beta_{\mu(i)})\varepsilon_{i}(x))\\ &=&\sum_{i=0}^{s+t}\varepsilon_i(x)(\alpha_i\mu(\beta_{\mu(i)})). \end{eqnarray*} Since $\beta_{\mu(i)}\in D_{\mu(i)}$, by Lemma \ref{lm4.2}(i) we see that $$\mu(\beta_{\mu(i)})\in \mu(D_{\mu(i)})=\mu(\mu(B_i))=B_i.$$ From this and by (\ref{eq8}), we deduce that $\alpha_i\mu(\beta_{\mu(i)})=0$ for all $i=0,1,\ldots,s+t$, which implies $\xi\cdot\mu(\eta)=0$, and so $[\xi,\eta]_E=0$ by Lemma \ref{lm4.1}(ii). Therefore, $\mathcal{D}\subseteq \mathcal{C}^{\bot_E}$. \par As stated above, we conclude that $\mathcal{D}=\mathcal{C}^{\bot_E}$ since both $\mathcal{C}$ and $\mathcal{D}$ are linear codes over $\mathbb{F}_q$ of length $3m$. \end{IEEEproof} \vskip 3mm \par Finally, we determine self-orthogonal left $G_{(m,3,r)}$-codes. \vskip 3mm \begin{theorem}\label{th4.6} All distinct self-orthogonal left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$ are given by the following $$\mathcal{C}=\bigoplus_{i=0}^{s+t}\mathcal{A}_i\Box_{\varphi_i}C_i=\bigoplus_{i=0}^{s+t}\{\varepsilon_i(x)\xi\mid \xi\in C_i\} \ ({\rm mod} \ x^m-1),$$ where $C_i$ is an left ideal of $\mathcal{R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ given by one of the following four cases: \par (i) $0\leq i\leq s_1$. In this case, $C_i$ is given by one of the following three subcases. \par (i-1) If $q\equiv 0$ (mod $3$), $C_i=\{0\}$ or $C_i=\mathcal{R}_i(y-1)^2$. \par (i-2) If $q^{d_i}\equiv 2$ (mod $3$), $C_i=\{0\}$. \par (i-3) Let $q^{d_i}\equiv 1$ (mod $3$). If $\omega_i(x^{-1})\equiv \omega_i(x)$ (mod $f_i(x)$), then $C_i=\{0\}$, $C_i=\mathcal{R}_i(y-1)(y-\omega_i(x))$ or $C_i=\mathcal{R}_i(y-1)(y-\omega_i(x)^2)$. Otherwise, $C_i=\{0\}$. \par (ii) $s_1+1\leq i\leq s_1+s_2$. In this case, $C_i=\mathcal{R}_ig(y)$, $C_{i+s_2}=\mathcal{R}_{i+s_2}\vartheta(y)$ and the pair $(g(y),\vartheta(y))$ of polynomials is given by one of the following three subcases. \par (ii-1) Let $q\equiv 0$ (mod $3$). There are $10$ pairs $(g(y),\vartheta(y))$: \vskip 1mm \begin{center} \begin{tabular}{l|l}\hline $g(y)$ & $\vartheta(y)$ \\ \hline $y^3-1$ & $y^3-1,(y-1)^2,y-1,1$ \\ $(y-1)^2$ & $y^3-1,(y-1)^2,y-1$ \\ $y-1$ & $y^3-1,(y-1)^2$ \\ $1$ & $y^3-1$ \\ \hline \end{tabular} \end{center} \vskip 1mm \par (ii-2) Let $q^{d_i}\equiv 2$ (mod $3$). There are $9$ pairs $(g(y),\vartheta(y))$: \vskip 1mm \begin{center} \begin{tabular}{l|l}\hline $g(y)$ & $\vartheta(y)$ \\ \hline $y^3-1$ & $y^3-1,y^2+y+1,y-1,1$ \\ $y^2+y+1$ & $y^3-1,y-1$ \\ $y-1$ & $y^3-1,y^2+y+1$ \\ $1$ & $y^3-1$ \\ \hline \end{tabular} \end{center} \vskip 1mm \par (ii-3) Let $q^{d_i}\equiv 1$ (mod $3$). There are $27$ pairs $(g(y),\vartheta(y))$: \vskip 1mm {\small \begin{center} \begin{tabular}{l|l}\hline $g(y)$ & $\vartheta(y)$ (${\rm mod}$ $f_{\mu(i)}(x)$)\\ \hline $y^3-1$ & $1,y^2+y+1,(y-1)(y-\omega_i(x^{-1}))$,\\ & $(y-1)(y-\omega_i(x^{-1})^2),y-1$,\\ & $y-\omega_i(x^{-1})^2, y-\omega_i(x^{-1}),y^3-1$ \\ \hline $y^2+y+1$ & $y^3-1,(y-1)(y-\omega_i(x^{-1}))$,\\ & $(y-1)(y-\omega_i(x^{-1})^2),y-1$ \\ \hline $(y-1)(y-\omega(x))$ & $y^3-1,(y-1)(y-\omega_i(x^{-1}))$,\\ & $y^2+y+1,y-\omega_i(x^{-1})$ \\ \hline $(y-1)(y-\omega(x)^2)$ & $y^3-1,(y-1)(y-\omega_i(x^{-1})^2)$,\\ & $y^2+y+1,y-\omega_i(x^{-1})^2$ \\ \hline $y-1$ & $y^3-1,y^2+y+1$ \\ $y-\omega(x)$ & $y^3-1,(y-1)(y-\omega_i(x^{-1}))$ \\ $y-\omega(x)^2$ & $y^3-1,(y-1)(y-\omega_i(x^{-1})^2)$ \\ $1$ & $y^3-1$ \\ \hline \end{tabular} \end{center} } \vskip 1mm \par (iii) $s+1\leq i\leq s+t_1$. In this case, $C_i=\{0\}$ or $C_i=C_{i,1,\alpha}=\mathcal{R}_i(\alpha(x)^{-1}+\theta_i^2(\alpha(x))y+y^2)$ where $\alpha=\alpha(x)\in \mathcal{G}_i$ satisfying $$\theta_{i}(\widehat{\alpha})\theta_{i}^2(\widehat{\alpha})\alpha+\theta_{i}(\widehat{\alpha})\alpha\theta_i^2(\alpha)+1=0.$$ \par (iv) $s+t_1+1\leq i\leq s+t_1+t_2$. In this case, there are exactly $10+8q^{\frac{d_i}{3}}+8q^{\frac{2d_i}{3}}+q^{d_i}$ pairs $(C_i,C_{i+t_2})$ given by one of the following four subcases: \par (iv-1) $4+2q^{\frac{d_i}{3}}+2q^{\frac{2d_i}{3}}$ pairs: $(\{0\},C_{i+t_2})$, where $C_{i+t_2}$ is any left ideal of $\mathcal{R}_{i+t_2}$ listed by Theorem \ref{th3.3}. \par (iv-2) $(1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}})(3+q^{\frac{d_i}{3}})$ pairs: $(C_{i,1,\alpha},C_{i+t_2})$, where $\alpha=\alpha(x)\in \mathcal{G}_i$ and $C_{i+t_2}$ is one of the following $3+q^{\frac{d_i}{3}}$ left ideals of $\mathcal{R}_{i+t_2}$: \par $\bullet$ $C_{i+t_2}=\{0\}$. \par $\bullet$ $C_{i+t_2}=C_{i+t_2,1,\beta}$ where $\beta=\theta_{i+t_2}^2(\gamma(x^{-1})^{-1})$ (mod $f_{i+t_2}(x)$) and $\gamma(x)\in \mathcal{G}_i$ satisfying the following conditions: \par $\phi_{i,\alpha}(\gamma(x))=0$, if $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$; \par $\psi_{i,\alpha}(\gamma(x))=0$, if $\theta_i(a(x))=a(x)^{q^{2\frac{d_i}{3}}}$ for all $a(x)\in K_i$. \par $\bullet$ $C_{i+t_2}=C_{i+t_2,2,\beta}$ where $\beta=\theta_{i+t_2}(\alpha(x^{-1})^{-1})$ (mod $f_{i+t_2}(x)$). \par (iv-3) $2(1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}})$ pairs: $(C_{i,2,\alpha},C_{i+t_2})$, where $\alpha=\alpha(x)\in \mathcal{G}_i$ and $C_{i+t_2}$ is one of the following $2$ left ideals of $\mathcal{R}_{i+t_2}$: \par $\bullet$ $C_{i+t_2}=\{0\}$. \par $\bullet$ $C_{i+t_2}=C_{i+t_2,1,\beta}$ where $\beta=\theta_{i+t_2}^2(\alpha(x^{-1})^{-1})$ (mod $f_{i+t_2}(x)$). \par (iv-1) $1$ pair: $(\mathcal{R}_i,\{0\})$. \end{theorem} \vskip 3mm \begin{IEEEproof} By Theorem \ref{th4.5} and its proof we have $\mathcal{C}^{\bot_E}=\oplus_{i=0}^{s+t}\mathcal{A}_i\Box_{\varphi_i}D_i$, where $D_i=\mu(B_{\mu(i)})$. From this and by Theorem \ref{th2.4}, we deduce that $\mathcal{C}$ is a self-orthogonal left $G_{(m,3,r)}$-code over $\mathbb{F}_q$ if and only if $C_i\subseteq D_i=\mu(B_{\mu(i)})$ for all $i=0,1,\ldots,s+t$. \par By Equation (\ref{eq8}) and the proof of Theorem \ref{th4.5}, it follows that $C_{\mu(i)}\cdot B_{\mu(i)}=\{0\}$ and $$|C_{\mu(i)}||B_{\mu(i)}|=|C_{\mu(i)}||\mu(B_{\mu(i)})|=|C_{\mu(i)}||D_{i}|=|\mathcal{R}_{\mu(i)}|,$$ which implies that $C_{\mu(i)}$ is the annihilating left ideal of $B_{\mu(i)}$ in $\mathcal{R}_{\mu(i)}$, i.e., \begin{equation} \label{eq9} C_{\mu(i)}={\rm Ann}^{(L)}_{\mathcal{R}_{\mu(i)}}(B_{\mu(i)}) \end{equation} where ${\rm Ann}^{(L)}_{\mathcal{R}_{\mu(i)}}(B_{\mu(i)})=\{\xi\in \mathcal{R}_{\mu(i)}\mid \xi\eta=0, \ \forall \eta\in B_{\mu(i)}\}$. \par Since $\mu$ is an $\mathbb{F}_q$-algebra anti-isomorphism from $\mathcal{R}_i$ onto $\mathcal{R}_{\mu(i)}$, by $C_i\cdot B_i=\{0\}$ and $|C_i||B_i|=|\mathcal{R}_i|$ we have $\mu(B_i)\cdot \mu(C_i)=\{0\}$ and $|\mu(B_i)||\mu(C_i)|=|\mathcal{R}_{\mu(i)}|$, which implies $$ {\rm Ann}^{(L)}_{\mathcal{R}_{\mu(i)}}(\mu(C_i))=\mu(B_i)=D_{\mu(i)}.$$ From this, by $D_i=\mu(B_{\mu(i)})$ and (\ref{eq9}), we deduce that \begin{eqnarray*} C_i\subseteq D_i &\Longleftrightarrow& B_{\mu(i)}\supseteq \mu(C_i) \\ &\Longleftrightarrow& {\rm Ann}^{(L)}_{\mathcal{R}_{\mu(i)}}(B_{\mu(i)})\subseteq {\rm Ann}^{(L)}_{\mathcal{R}_{\mu(i)}}(\mu(C_i))\\ &\Longleftrightarrow& C_{\mu(i)}\subseteq D_{\mu(i)} \end{eqnarray*} for all $i=0,1,\ldots,s+t$. \par $\diamondsuit$ Let $0\leq i\leq s$. Then $\theta_i={\rm id}_{K_i}$ and that $\mathcal{R}_i=K_i[y]/\langle y^3-1\rangle$ is a commutative ring. By Theorem \ref{th4.5} and its proof there is a unique pair $(g(y),h(y))$ of monic factors $g(y),h(y)$ of $y^3-1$ in $K_i[y]$ such that \par $C_i=\mathcal{R}_ig(y)$, $D_i=\mathcal{R}_i\frac{y^3-1}{h(y)}=\mu(B_{\mu(i)})$ with $B_{\mu(i)}=\mathcal{R}_{\mu(i)}\mu(\frac{y^3-1}{h(y)})$, and \begin{equation} \label{eq10} C_{\mu(i)}={\rm Ann}^{(L)}_{\mathcal{R}_{\mu(i)}}(B_{\mu(i)})=\mathcal{R}_{\mu(i)}\mu(h(y)). \end{equation} Hence \begin{equation} \label{eq11} C_i\subseteq D_i \Longleftrightarrow \frac{y^3-1}{h(y)}\mid g(y)\Longleftrightarrow (y^3-1)\mid g(y)h(y). \end{equation} By Lemma \ref{lm4.2}(ii) and Theorems \ref{th3.1}, we have one of the following two cases. \par (i) When $0\leq i\leq s_1$, $\mu(i)=i$, which implies $\mu(h(y))\sim_l g(y)$ by (\ref{eq10}), and so $\mu(g(y))\sim_l h(y)$. Form this and by (\ref{eq11}) we deduce that $C_i\subseteq D_i$ if and only if $(y^3-1)\mid g(y)\mu(g(x))$. Then the conclusions follow from Lemma \ref{lm4.4} (i) and (ii). \par (ii) Let $s_1+1\leq i\leq s_1+s_2$, $\mu(i)=i+s_2$. By Lemma \ref{lm4.4} (i) and (ii), we see that for each monic factor $h(y)$ of $y^3-1$ in $K_i[y]$ there is a unique monic factor $\vartheta(y)$ of $y^3-1$ in $K_{\mu(i)}[y]$ such that $\mu(h(y))\sim_l \vartheta(y)$, which implies $C_{i+s_2}=\mathcal{R}_{\mu(i)}\vartheta(y)$ by (\ref{eq10}). Then the conclusions follow from (\ref{eq11}), Lemma \ref{lm4.4} (i) and (ii) immediately. \par $\diamondsuit$ Let $s+1\leq i\leq s+t$. Then $\mathcal{R}_i=K_i[y;\theta_i]/\langle y^3-1\rangle$ is a noncommutative ring. By Theorem \ref{th4.5}(ii), the pair $(C_i,D_{\mu(i)})$ is given by one of the following cases: \par $\diamond$ $C_i=\{0\}$ and $D_{\mu(i)}=\mathcal{R}_{\mu(i)}$, or $C_i=\mathcal{R}_{i}$ and $D_{\mu(i)}=\{0\}$; \par $\diamond$ $C_i=C_{i,1,\alpha}$ and $D_{\mu(i)}=C_{\mu(i),2,\theta_{\mu(i)}(\widehat{\alpha})}$, where $\alpha\in\mathcal{G}_i$; \par $\diamond$ $C_i=C_{i,2,\alpha}$ and $D_{\mu(i)}=C_{\mu(i),1,\theta_{\mu(i)}^2(\widehat{\alpha})}$, where $\alpha\in\mathcal{G}_i$. \noindent From these, we deduce that \begin{equation} \label{eq12} {\rm dim}_{K_i}(C_i)+{\rm dim}_{K_{\mu(i)}}(C_{\mu(i)})=3. \end{equation} Then by Lemma \ref{lm4.2}(ii), we have one and only one of the following two cases. \par (iii) Let $s+1\leq i\leq s+t_1$. Then $\mu(i)=i$. In this case, we deduce that the condition $C_i\subseteq D_i$ if and only if $C_i=\{0\}$ or $C_i=C_{i,1,\alpha}$ where $\alpha=\alpha(x)\in \mathcal{G}_i$ satisfying $C_{i,1,\alpha}\subset C_{i,2,\theta_{i}(\widehat{\alpha})}$. By Theorem \ref{th3.6}(i), the condition $C_{i,1,\alpha}\subset C_{i,2,\theta_{i}(\widehat{\alpha})}$ is equivalent to that $\theta_{i}(\widehat{\alpha})\theta_{i}(\theta_{i}(\widehat{\alpha}))\alpha+\theta_{i}(\widehat{\alpha})\alpha\theta_i^2(\alpha)+1=0$, i.e., $\theta_{i}(\widehat{\alpha})\theta_{i}^2(\widehat{\alpha})\alpha+\theta_{i}(\widehat{\alpha})\alpha\theta_i^2(\alpha)+1=0.$ \par (iv) Let $s+t_1+1\leq i\leq s+t_1+t_2$. Then $\mu(i)=i+t_2$. By Theorem \ref{th4.5}(ii), we have one of the following four situations: \par (iv-1) Let $C_i=\{0\}$. Then $D_{i+t_2}=\mathcal{R}_{\mu(i)}$. In this case, $C_{i+t_2}\subseteq D_{i+t_2}$ for any left ideal $C_{i+t_2}$ of $\mathcal{R}_{\mu(i)}$. \par By Theorem \ref{th3.3}, the number of pairs $(\{0\}, C_{i+t_2})$ is equal to $4+2q^{\frac{d_i}{3}}+2q^{\frac{2d_i}{3}}$. \par (iv-2) Let $C_i=C_{i,1,\alpha}$ where $\alpha=\alpha(x)\in \mathcal{G}_i$. Then ${\rm dim}_{K_{i+t_i}}(D_{i+t_2})=2$ by (\ref{eq12}) and $$D_{i+t_2}=C_{i+t_2,2,\theta_{i+t_2}(\widehat{\alpha})}$$ by Theorem \ref{th4.5}(ii-1). Hence ${\rm dim}_{K_{i+t_i}}(C_{i+t_2})\leq 2$ if $C_{i+t_2}\subseteq D_{i+t_2}$. Then we have one of the following three cases. \par $\triangleright$ It is obvious that $C_{i+t_2}=\{0\}$ satisfying $C_{i+t_2}\subseteq D_{i+t_2}$. \par $\triangleright$ Let $C_{i+t_2}=C_{i+t_2,1,\beta}$ where $\beta=\beta(x)\in \mathcal{G}_{i+t_2}$. By Lemma \ref{lm4.2}(ii), we have $\mu(i+t_2)=i$, which implies $D_i=D_{\mu(i+t_2)}=C_{i,2,\theta_i(\widehat{\beta})}$ by Theorem \ref{th4.5}(ii-1). From this and by Theorem \ref{th3.6}(ii), we deduce that $C_i\subset D_i$ if and only if $\theta_i(\widehat{\beta})$ satisfies the following conditions: \par $\phi_{i,\alpha}(\theta_i(\widehat{\beta}))=0$, if $\theta_i(a(x))=a(x)^{q^{\frac{d_i}{3}}}$ for all $a(x)\in K_i$. \par $\psi_{i,\alpha}(\theta_i(\widehat{\beta}))=0$, if $\theta_i(a(x))=a(x)^{q^{\frac{2d_i}{3}}}$ for all $a(x)\in K_i$. \noindent We denote $\gamma=\gamma(x)=\theta_i(\widehat{\beta}(x))$. Then $\gamma=\theta_i(\mu(\beta(x))^{-1})\in \mathcal{G}_i$ by Corollary \ref{co4.3}, which implies $\mu(\beta(x))^{-1}=\theta_i^2(\gamma(x))$, and hence $\beta(x)=\theta_{i+t_2}^2(\gamma(x^{-1})^{-1})$ by Lemma \ref{lm4.2}(iv). Moreover, by Lemma \ref{lm3.5} we know that both $\phi_{i,\alpha}(x)$ and $\psi_{i,\alpha}(x)$ have exactly $q^{\frac{d_i}{3}}+1$ roots in $\mathcal{G}_i$. \par $\triangleright$ Let $C_{i+t_2}=C_{i+t_2,2,\beta}$ where $\beta=\beta(x)\in \mathcal{G}_{i+t_2}$. As $\mu(i+t_2)=i$, we have $D_i=D_{\mu(i+t_2)}=C_{i,1,\theta_i^2(\widehat{\beta})}$ by Theorem \ref{th4.5}(ii-2). Hence $C_i=C_{i,1,\alpha}\subseteq D_i$ if and only if $\alpha=\theta_i^2(\widehat{\beta})=\theta_i^2(\beta(x^{-1})^{-1})$, which is equivalent to that $\beta(x)=\theta_{i+t_2}(\alpha(x^{-1})^{-1})$ by Lemma \ref{lm4.2}(iv). \par Therefore, the number of pairs $(C_{i,1,\alpha},C_{i+t_2})$ is equal to $$(1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}})(3+q^{\frac{d_i}{3}}).$$ \par (iv-3) Let $C_i=C_{i,2,\alpha}$ where $\alpha=\alpha(x)\in \mathcal{G}_i$. Then ${\rm dim}_{K_{i+t_i}}(D_{i+t_2})=1$ by (\ref{eq12}) and $$D_{i+t_2}=C_{i+t_2,1,\theta_{i+t_2}^2(\widehat{\alpha})}$$ by Theorem \ref{th4.5}(ii-2). Hence ${\rm dim}_{K_{i+t_i}}(C_{i+t_2})\leq 1$ if $C_{i+t_2}\subseteq D_{i+t_2}$. Then we have one of the following two cases. \par $\triangleright$ $C_{i+t_2}=\{0\}$. \par $\triangleright$ Let $C_{i+t_2}=C_{i+t_2,1,\beta}$ where $\beta=\beta(x)\in \mathcal{G}_{i+t_2}$. Then As $\mu(i+t_2)=i$, we have $D_i=D_{\mu(i+t_2)}=C_{i,2,\theta_i(\widehat{\beta})}$ by Theorem \ref{th4.5}(ii-1). Hence $C_i=C_{i,2,\alpha}\subseteq D_i$ if and only if $\alpha=\theta_i(\widehat{\beta})=\theta_i^2(\beta(x^{-1})^{-1})$, which is equivalent to that $\beta(x)=\theta_{i+t_2}^2(\alpha(x^{-1})^{-1})$ by Lemma \ref{lm4.2}(iv). \par Therefore, the number of pairs $(C_{i,1,\alpha},C_{i+t_2})$ is equal to $2(1+q^{\frac{d_i}{3}}+q^{\frac{2d_i}{3}}).$ \par (iv-4) Let $C_i=\mathcal{R}_i$. Then $D_{i+t_2}=\{0\}$. From this and by $C_{i+t_2}\subseteq D_{i+t_2}$, we deduce $C_{i+t_2}=\{0\}$. \par As stated above, we conclude that the number of pairs $(C_i,C_{i+t_2})$, where $s+t_1+1\leq i\leq s+t_1+t_2$, is equal to $10+8q^{\frac{d_i}{3}}+8q^{\frac{2d_i}{3}}+q^{d_i}.$ \end{IEEEproof} \section{An Example} \noindent We consider left $G_{(14,3,9)}$-codes over $\mathbb{F}_3$. Obviously, $9^3=729\equiv 1$ (mod $14$). All distinct $3$-cyclotomic cosets modulo $14$ are the following: $J^{(3)}_0=\{0\}$, $J^{(3)}_7=\{7\}$, $J^{(3)}_2=\{2,6,4,12,8,10\}$, $J^{(3)}_1=\{1,3,9,13,11,5\}$. It is clear that $$\theta(7)=9\cdot 7\equiv 7, \ \theta(2)=9\cdot 2\equiv 4, \ \theta(1)=9 \ ({\rm mod 14}).$$ Using the notations is Section 2, we have that $s=1$, $t=2$, $J(0)=J^{(3)}_0$, $J(1)=J^{(3)}_7$, $J(2)=J^{(3)}_2$ and $J(3)=J^{(3)}_1$. Hence $d_0=d_1=1$, $d_i=6$ and $\frac{d_i}{3}=2$ for $i=2,3$. \par Obviously, $3\equiv 0$ (mod $3$). By Corollary \ref{co3.4}(i), the number of left $G_{(14,3,9)}$-codes over $\mathbb{F}_3$ is equal to $$4^2\prod_{i=2,3}(4+2\cdot 3^{\frac{d_i}{3}}+2\cdot 3^{\frac{2d_i}{3}})=16\cdot 184^2=541,696.$$ \par We have $x^{14}-1=f_0(x)f_1(x)f_2(x)f_3(x)$, where $f_0(x)=x-1$, $f_1(x)=x+1$, $f_2(x)=x^6+x^5+x^4+x^3+x^2+x+1$ and $f_3(x)=x^6+2x^5+x^4+2x^3+x^2+2x+1$. Then \par $\bullet$ $K_0=\mathbb{F}_3[x]/\langle x-1\rangle=\mathbb{F}_3$ and $\mathcal{R}_0=K_0[y]/\langle y^3-1\rangle =\mathbb{F}_3[y]/\langle (y-1)^3\rangle$. By Theorem \ref{th3.1}(ii), all distinct ideals of $\mathcal{R}_0$ are given by: $C_0=\mathcal{R}_0g(y)$, where $g(y)\in \{1,y-1,(y-1)^2,y^3-1\}.$ \par $\bullet$ $K_1=\mathbb{F}_3[x]/\langle x+1\rangle=\mathbb{F}_3$ and $\mathcal{R}_1=K_1[y]/\langle y^3-1\rangle =\mathbb{F}_3[y]/\langle (y-1)^3\rangle$. By Theorem \ref{th3.1}(ii), all distinct ideals of $\mathcal{R}_1$ are given by: $C_1=\mathcal{R}_1g(y)$, where $g(y)\in \{1,y-1,(y-1)^2,y^3-1\}.$ \par Moreover, $|\langle 0\rangle|=1$, $|\mathcal{R}_0|=|\mathcal{R}_1|=3^3=27$, $|\mathcal{R}_0(y-1)|=|\mathcal{R}_1(y-1)|=3^2=9$ and $|\mathcal{R}_0(y-1)^2|=|\mathcal{R}_1(y-1)^2|=3$. \par $\bullet$ $K_2=\mathbb{F}_2[x]/\langle f_2(x)\rangle=\{\sum_{j=0}^{5}a_jx^j\mid a_j\in \mathbb{F}_3, \ j=0,1,\ldots,5\}$ and $\varrho_2(x)=1+x$ is an element of multiplicative order $1+3^2+3^4=91$ in $K_2$. Hence $$\mathcal{G}_2=\{(1+x)^\lambda\mid \lambda=0,1,\ldots,90\} \ ({\rm mod} \ f_2(x))$$ and $\mathcal{R}_2=K_2[y;\theta_2]/\langle y^3-1\rangle$ where $\theta_2$ is an $\mathbb{F}_3$-algebra automorphism of $K_2$ defined by: $$\theta_2(a(x))=a(x^r)=a(x^9)=a(x)^9 \ ({\rm mod} \ f_2(x))$$ for all $a(x)\in K_2$. Then $\theta_2^2(\varrho_2(x))=(1+x)^{9^2}=1+x^4.$ \par By Theorem \ref{th3.3}, all distinct left ideals $C_2$ of $\mathcal{R}_2$ are given by the following three cases: \par (i) $C_2=\{0\}$ with $|\{0\}|=1$, and $C_2=\mathcal{R}_2$ with $|\mathcal{R}_2|=|K_2|^3=(3^6)^3=3^{18}=387420489$. \par (ii) $C_2=C_{2,2,(1+x)^\lambda}=\mathcal{R}_2(-(1+x)^\lambda+y)$ with $|C_2|=(3^6)^2=3^{12}=531441$, $\lambda=0,1,2,\ldots,90$. \par (iii) $C_2=C_{2,1,(1+x)^\lambda}=\mathcal{R}_2((1+x)^{91-\lambda}+(1+x^4)^\lambda y+y^2)$ with $|C_2|=3^6=729$, $\lambda=0,1,2,\ldots,90$. \par $\bullet$ $K_3=\mathbb{F}_2[x]/\langle f_3(x)\rangle=\{\sum_{j=0}^5a_jx^j\mid a_j\in \mathbb{F}_3\}$. We find that $\varrho_3(x)=1+2x$ is an element of multiplicative order $1+3^2+3^4=91$ in $K_3$. Hence $$\mathcal{G}_3=\{(1+2x)^\lambda\mid \lambda=0,1,\ldots,90\} \ ({\rm mod} \ f_3(x))$$ and $\mathcal{R}_3=K_3[y;\theta_2]/\langle y^3-1\rangle$ where $\theta_3$ is an $\mathbb{F}_3$-algebra automorphism of $K_3$ defined by: $$\theta_3(a(x))=a(x^r)=a(x^9)=a(x)^9 \ ({\rm mod} \ f_3(x))$$ for all $a(x)\in K_3$. In particular, we have $\theta_3^2(\varrho_2(x))=(1+x)^{9^2}=1+x^4.$ \par By Theorem \ref{th3.3}, all distinct left ideals $C_3$ of $\mathcal{R}_3$ are given by the following three cases: \par (i) $\{0\}$ and $\mathcal{R}_3$, where $|\{0\}|=1$ and $|\mathcal{R}_3|=|K_3|^3=(3^6)^3=3^{18}=387420489$. \par (ii) $C_3=C_{3,2,(1+2x)^\lambda}=\mathcal{R}_3(-(1+2x)^\lambda+y)$ with $|C_3|=(3^6)^2=3^{12}=531441$, $\lambda=0,1,2,\ldots,90$. \par (iii) $C_3=C_{3,1,(1+x)^\lambda}=\mathcal{R}_3((1+2x)^{91-\lambda}+(1+x^4)^\lambda y+y^2)$ with $|C_3|=3^6=729$, $\lambda=0,1,2,\ldots,90$. \par $\bullet$ All distinct $541696$ left $G$-codes over $\mathbb{F}_3$ are given by $$\mathcal{C}=\bigoplus_{i=0}^3\mathcal{A}_i\Box_{\varphi_i}C_i=\sum_{i=0}^3\{\varepsilon_i(x)\xi_i\mid \xi_i\in C_i\}$$ (mod $ x^{14}-1$) by Theorem \ref{th2.4}, where \par $\varepsilon_0(x)=2+2x+2x^2+2x^3+2x^4+2x^5+2x^6+2x^7+2x^8+2x^9+2x^{10}+2x^{11}+2x^{12}+2x^{13}$, $\varepsilon_1(x)=2+x+2x^2+x^3+2x^4+x^5+2x^6+x^7+2x^8+x^9+2x^{10}+x^{11}+2x^{12}+x^{13}$, $\varepsilon_2(x)=x+x^2+x^3+x^4+x^5+x^6+x^8+x^9+x^{10}+x^{11}+x^{12}+x^{13}$, $\varepsilon_3(x)=2x+x^2+2x^3+x^4+2x^5+x^6+x^8+2x^9+x^{10}+2x^{11}+x^{12}+2x^{13}$, \noindent and the number of codewords in $\mathcal{C}$ is equal to \par \begin{center} $|\mathcal{C}|=|C_0||C_1||C_2||C_3|$.\end{center} \par As $-J(i)=J(i)$ (mod $14$), we have $\mu(i)=i$ for all $i=0,1,2,3$. Using the notations of Lemma \ref{lm4.2}, we have $s=s_1=1$, $s_2=0$, $t=t_1=2$ and $t_2=0$. Hence $\mu(\varepsilon_i(x))=\varepsilon_i(x)$ for all $i=0,1,2,3$. \par $\bullet$ By Theorem \ref{th4.6}, all self-orthogonal left $G_{(14,3,9)}$-codes over $\mathbb{F}_3$ are given by: $\mathcal{C}=\bigoplus_{i=0}^3\mathcal{A}_i\Box_{\varphi_i}C_i$, where \par $\diamond$ $C_0=\{0\}$ or $C_0=\mathcal{R}_0(y-1)^2$. \par $\diamond$ $C_1=\{0\}$ or $C_1=\mathcal{R}_1(y-1)^2$. \par $\diamond$ $C_2=\{0\}$ or $C_2=C_{2,1,\alpha(x)}$ where $\alpha(x)=(1+x)^\lambda$ satisfying $\theta_{i}(\widehat{\alpha})\theta_{i}^2(\widehat{\alpha})\alpha+\theta_{i}(\widehat{\alpha})\alpha\theta_i^2(\alpha)+1=0$, i.e., \begin{eqnarray*} 0&=&1+(1+x^{-1})^{-9\lambda-81\lambda}(1+x)^\lambda\\ &&+(1+x^{-1})^{-9\lambda}(1+x)^{\lambda+81\lambda}\\ &=&1+x^{90\lambda}(1+x)^{-89\lambda}+x^{9\lambda}(1+x)^{73\lambda} \end{eqnarray*} in $K_2$ ($0\leq\lambda\leq 90$). Since $x^{14}=1$ and $(1+x)^{91}=1$ in $K_2$, the above condition is equivalent to $$1+x^{6\lambda}(1+x)^{2\lambda}+x^{9\lambda}(1+x)^{73\lambda}\equiv 0 \ ({\rm mod} \ f_2(x)).$$ Precisely, we have $$\lambda=0,7,8,11,13,20,21,24,26,33,34,37,39,46,47,$$ \begin{equation}\label{eq13} \ \ \ \ \ \ \ \ \ \ 50,52,59,60,63,65,72,73,76,78,85,86,89. \end{equation} \par $\diamond$ $C_3=\{0\}$ or $C_3=C_{3,1,(1+2x)^\lambda}$ where $\lambda$ is given by (\ref{eq13}). \vskip 2mm \par Therefore, the number of self-orthogonal left $G_{(14,3,9)}$-codes over $\mathbb{F}_3$ is equal to $2\cdot 2\cdot 29\cdot29=3364$. \par For example, we have $21$ self-orthogonal left $G_{(14,3,9)}$-codes over $\mathbb{F}_3$: $\mathcal{C}=\{\varepsilon_2(x)\xi\mid \xi\in C_{2,1,(1+x)^\lambda}\}$ where $\lambda=7,8,11,20,21,24,33,34,37,46,47, 50, 59,60,63,72,73,76$, $85,86,89$, which are self-orthogonal linear $[42,6,18]$-codes over $\mathbb{F}_3$ with the following Hamming weight enumerator: $$W_{\mathcal{C}}(Y)=1+14Y^{18}+294Y^{24}+336Y^{30}+84Y^{36}.$$ \section{Conclusion} Let $G_{(m,3,r)}$ be a metacyclic group of order $3m$, $r\equiv q^\epsilon$ (mod $m$) for some positive integer $\epsilon$ and ${\rm gcd}(m,q)=1$. We present a system theory of left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$, only using finite field theory and basic theory of cyclic codes and skew cyclic codes. We prove that any left $G_{(m,3,r)}$-code is a direct sum of concatenated codes with inner codes ${\cal A}_i$ and outer codes $C_i$, where ${\cal A}_i$ is a minimal cyclic code over $\mathbb{F}_q$ of length $m$ and $C_i$ is a skew cyclic code of length $3$ over an extension field of $\mathbb{F}_q$, and provide an explicit expression for each outer code in every concatenated code. Moreover, we give the dual code of each left $G_{(m,3,r)}$-code and determine all self-orthogonal left $G_{(m,3,r)}$-codes over $\mathbb{F}_q$. \section*{Acknowledgment} Part of this work was done when Yonglin Cao was visiting Chern Institute of Mathematics, Nankai University, Tianjin, China. Yonglin Cao would like to thank the institution for the kind hospitality. This research is supported in part by the National Natural Science Foundation of China (Grant Nos. 11471255, 61171082, 61571243) and the National Key Basic Research Program of China (Grant No. 2013CB834204).
{'timestamp': '2016-06-17T02:04:03', 'yymm': '1606', 'arxiv_id': '1606.05019', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05019'}
arxiv
\section{Introduction} During the last decade, multiple-input multiple-output (MIMO) radars received significant attention from the research community \cite{DeMaio}-\cite{HaimBlum2}. MIMO radars employ multiple transmitted waveforms and jointly process signals received at the multiple receivers. Two MIMO radar concepts are commonly considered in the literature: MIMO radar with widely separated antennas \cite{DeMaio}-\cite{Aittomaki}, \cite{HaimBlum2}-\cite{Wei1} and MIMO radar with colocated antennas \cite{Bliss}-\cite{LiStoica0}. This work studies the multiple target parameter estimation performance of a radar configuration with widely separated antenna arrays, which combines the benefits from viewing the targets from different locations, called geometric diversity, with the benefits of employing standard coherent array processing. Often, estimation performance is assessed by evaluation of bounds on the estimation errors. One of the most widely used bounds is the Cramer-Rao Lower Bound (CRLB). The CRLB for MIMO radar with widely separated antennas have been derived for target velocity estimation \cite{HaimBlum5}, coherent and noncoherent target location estimation \cite{HaimBlum6}, noncoherent joint location and velocity estimation \cite{HaimBlum8}, and multiple target parameter estimation \cite{Godrich1}, \cite{Wei1}. It is important to notice that all just referenced results consider radars with widely separated omnidirectional antennas and do not consider widely separated arrays. This work derives the CRLB on the joint estimation of position and velocity of multiple targets with a set of widely separated antenna arrays. A similar configuration was proposed in \cite{Xu1}, where the idea of the MIMO radar with collocated antennas was extended to achieve both coherent processing and spatial diversity gains. While each antenna element in any closely-spaced array transmits a phase-shifted version of a common signal to allow coherent processing in the radar system considered in this paper, the radar system proposed in \cite{Xu1} consists of multiple widely spaced subarrays where the closely spaced antennas inside each transmitting subarray are assumed to transmit different orthogonal waveforms. The authors developed an iterative generalized-likelihood ratio test for target detection and parameter estimation, and compared performance of several spatial spectral estimators including the Capon and APES approaches. The CRLB was not considered in \cite{Xu1}. To our knowledge, the CRLB and the asymptotic properties of the ML estimator have not been discussed in the literature for the configuration studied in this paper. This paper derives the CRLB for two commonly used array processing signal models: stochastic and deterministic \cite{VanTrees}-\cite{Korso}. The stochastic model assumes the targets' reflectivities are random variables. If the reflectivities are normally distributed, which is the case considered in this paper, the stochastic model leads to the well known Swerling I and II target types \cite{Aittomaki}, \cite{Richards}. The deterministic model assumes the targets' reflectivities are deterministic unknowns and is often used when the assumption about the normality of the reflectivities is not realistic \cite{Yu}, \cite{Bekkerman}. Here the signal covariance matrix and the power of the additive white Gaussian noise are treated as unknown nuisance parameters under the stochastic model assumption. Similarly, the nuisance parameters for the deterministic model are the targets' reflectivities and the noise power. Notice that the previously derived bound in \cite{HaimBlum8} for MIMO radar with widely distributed antennas under the stochastic model does not consider nuisance parameters and treats the signal covariance matrix and the noise power as known quantities, while the bounds in \cite{HaimBlum5} and \cite{HaimBlum6} derived for the deterministic case consider the noise power to be known. Under the deterministic signal model assumption, the CRLB depends on the particular realization of the targets' reflectivities which makes the application of such a bound complicated. In this work we consider an extended Miller-Chang bound (EMCB) \cite{Gini} which is calculated as the deterministic CRLB averaged over the different realizations of the targets' reflectivities. The EMCB provides a bound on the average variance of any scalar parameter of interest, where the average is taken using an assumed distribution for the parameter. This paper uses the same distribution assumed in the stochastic model. In the numerical results section the EMCB is evaluated for different configurations of the radar with widely separated antenna arrays and compared to the corresponding mean squared error (MSE). The CRLB is a good prediction of the variance of the estimation error only in the asymptotic region when SNR is large or the number of taken data samples is large. The CRLB and the asymptotic properties of the corresponding ML estimator for conventional antenna arrays for both stochastic and deterministic models have been well studied in \cite{StoicaNehorai1} and \cite{StoicaNehorai2}. The asymptotic behavior of the ML estimator for MIMO radar with widely separated antennas has been considered only under the stochastic model assumption in a single target scenario \cite{HaimBlum8}. This work investigates a more general case of multiple distributed antenna arrays observing multiple targets. For a radar system with $M_t$ transmitting arrays of $L_r$ antenna elements and $M_r$ receiving arrays with $L_r$ antenna elements we study the asymptotic properties of the ML estimator in two scenarios: large $M_tM_r$ and large $L_r$. The analysis shows that under the stochastic model assumption the ML estimates of the parameters of interest become consistent and efficient if $M_tM_r$ approaches infinity while $L_r$ is fixed to some constant value. On the other hand, having finite $M_tM_r$ and infinitely large $L_r$ does not provide consistency and efficiency. Under the deterministic model assumption the ML estimator is consistent but not efficient if $M_tM_r$ is asymptotically large and $L_r$ is constant, while finite $M_tM_r$ and infinitely large $L_r$ guarantee consistency and efficiency. The asymptotic analysis provides an insight about the estimation performance of the proposed radar system with widely separated arrays but does not answer the question of an optimal allocation of a finite number of antennas into a finite number of distributed arrays. To further investigate this issue the paper provides a numerical comparison of the MSE and the corresponding CRLB and EMCB for a position estimation of two closely located targets using different configurations of the radar with distributed arrays and finite $M_tM_r$ and $L_r$. Different configurations of the radar with widely separated arrays were compared while keeping the number of receiving antenna elements, $M_r L_r$, fixed. The numerical results show that in the scenarios with sufficiently large $M_t M_r$ and targets which were favorably positioned with respect to the distributed arrays, the MSE and the threshold SNR tended to decrease with increasing $L_r$ up to a point. When $M_tM_r$ was too small, the loss of geometric diversity (gains from different orientations between different arrays and a given target) became apparent. Equivalently, it became difficult to assure the targets were all well positioned with respect to the arrays. At this point, further decreases in $M_tM_r$ degraded performance. This indicates that it is often more beneficial to group receiving antenna elements into a small number of receiving arrays and there is a clear limit on the minimum number of receiving arrays which should be employed. However for a finite $M_t M_r$ and $L_r$ the MSE may not be well predicted by the CRLB even at the large SNR. The performance obtained did depend on the location of the targets with respect to the arrays and having a larger number of differently oriented arrays was extremely helpful in providing geometric diversity which tended to enhance the worst-case performance as targets were moved over some extensive region. The obtained simulation results suggest that for a radar with a fixed finite number of receiving antenna elements the optimal number of transmit-to-receive array paths and the size of the arrays depends on the scenario, and it may be advantageous to use the radar configurations where neither $M_tM_r$ nor $L_r$ are too small. The main contributions of this paper are: a) new CRLBs for a radar with widely separated antenna arrays under stochastic and deterministic signal model assumptions; b) the derived CRLBs consider joint estimation of the parameters of multiple targets in the presence of the nuisance parameters; c) the study of the asymptotic properties of the ML estimator in the two extreme cases: the product $M_tM_r$ is large, and $L_r$ is large; d) the numerical study of the performance of ML estimator in the scenarios with a fixed finite number of receiving antenna elements $M_rL_r$. It is worth pointing out that the obtained results can give the general trade-offs for the case of passive radar where the transmitters are from existing communication systems \cite{Griffiths}, \cite{Tan}. Assuming the passive system is able to estimate the transmitted signals with perfect accuracy, the derived CRLBs and the asymptotic ML results can be applied to predict the target parameter estimation performance in passive radar. The assumptions of perfectly estimated waveforms would result in a lower bounds on the MSE that a passive radar system can achieve. The rest of the paper is organized as follows. Section II describes the received signal model for a radar with multiple widely spaced arrays, where each array employs coherent processing. Section III derives the likelihood functions and the CRLBs for both the stochastic and deterministic models. Section IV discusses the asymptotic properties of the ML estimator for both stochastic and deterministic signal models. The performance evaluation of the ML estimator using Monte-Carlo simulations is provided in Section V. Our conclusions are summarized in Section VI. \section{Signal Model} \label{sec:SignalModel} Consider a radar system with $M_t$ transmitting and $M_r$ receiving arrays, which are arbitrarily distributed over the two-dimensional surveillance area. Each transmitting and receiving array consists of $L_t$ and $L_r$ antenna elements respectively. The center of the $k$th, $k = 1,2,\ldots,M_t$, transmitting array is located at $(x_{tk}, y_{tk})$, while the center of the $l$th, $l=1,2,\ldots,M_r$, receiving array is located at $(x_{rl}, y_{rl})$. Each array element of the $k$th transmitting array transmits a phase shifted version of the same waveform $\sqrt{\frac{E}{M_tL_t}}s_k(t)$, where $E$ is the total transmitted energy. Let ${\bf{w}}_k(\bar{\theta}_k)$ be an $L_t \times 1$ vector of beamforming coefficients which steers the $k$th transmitting array to point to the direction $\bar{\theta}_k$. The radar system observes $Q$ targets with coordinates $(x^q, y^q)$ and velocities $(v_{x}^q, v_{y}^q)$, where $q = 1, \ldots, Q$. The targets may act like non-point targets by exhibiting different reflections in different directions. Let ${\bf{a}}_{tk}(\theta_{tk}^q)$ be an $L_t \times 1$ vector which represents propagation from the $k$th transmitting array toward the $q$th target located at the bearing angle $\theta_{tk}^q$. Let ${\bf{a}}_{rl}(\theta_{rl}^q)$ be the $L_r \times 1$ response vector of the $l$th receiving array to the plane wave arrived from the target $q$ at the angle $\theta_{rl}^q$. Notice that, the angles $\theta_{rl}^q$, $\theta_{tk}^q$ and $\bar{\theta}_{k}$ are defined with respect to a given specified direction. For linear arrays, this could be the direction normal to the corresponding receiving and transmitting arrays. In order to keep the results of this paper general for all array configurations, we don't assume any particular array geometry, unless stated otherwise. The targets are assumed to be located in the far-field of the arrays and narrowband signals are assumed. Assuming the observed $Q$ targets have constant velocities, the time delay for the signal traveling from the center of the $k$th transmitting array, reflected from the $q$th target and received at the center of the $l$th receiving array is determined by $\tau_{kl}^q = ( R_{tk}^q + R_{rl}^q ) / c$, where $R_{tk}^q = \sqrt{(x_{tk} - x^q)^2 + (y_{tk} - y^q)^2}$ is the range from the center of the $k$th transmitting array to the $q$th target, $R_{rl}^q = \sqrt{(x_{rl} - x^q)^2 + (y_{rl} - y^q)^2}$ is the range from the $q$th target to the center of the $l$th receiving array, and $c$ is the wave propagation velocity. For $v_x^q, v_y^q \ll c$, the Doppler shift induced by the $q$th target on the signal transmitted by the $k$th transmitting array and received at the $l$th receiving array is defined by $\Omega_{kl}^q = v_{x}^q \Omega ( \cos\phi_{tk}^q + \cos\phi_{rl}^q)/c + v_{y}^q \Omega ( \sin\phi_{tk}^q + \sin\phi_{rl}^q)/c$, where $\phi_{tk}^q = \tan^{-1}((y_{tk} - y^q)/(x_{tk} - x^q))$, $\phi_{rl}^q = \tan^{-1}((y_{rl} - y^q)/(x_{rl} - x^q))$, and $\Omega$ is a carrier frequency. At every receiving array, the continuous-time baseband signal is sampled every $\triangle t$ seconds. Due to the sampling, the time delay and Doppler shift in the sampling domain are defined as $n_{kl}^q = \tau_{kl}^q / \triangle t$ and $\omega_{kl}^q = \Omega_{kl}^q \triangle t$ respectively. The sampled baseband signal at the $l$th receiving array, due to the transmission from the $k$th transmitting array and reflection from the $Q$ targets, can be modeled as the superposition of the $Q$ time delayed and Doppler-shifted versions of the transmitted signal $s_k(t)$ as \cite{DoganNehor1} \begin{equation} \begin{split} {\bf{r}}_{kl}\left[n\right] & = \sqrt{\frac{E}{M_tL_t}} \sum_{q=1}^Q \alpha_{kl}^q \zeta_{kl}^q {\bf{a}}_{rl}\left(\theta_{rl}^q\right)\\ \cdot & \left({\bf{w}}_k^H\left(\bar{\theta}_k\right){\bf{a}}_{tk}\left(\theta_{tk}^q\right)\right) s_{k}\left[n-n_{kl}^q\right]e^{jn\omega_{kl}^q} + {\bf{e}}_{kl}\left[n\right] \label{Model1} \end{split} \end{equation} where $\alpha_{kl}^q$ is the complex target reflectivity corresponding to the $(k,q,l)th$ ($k$th transmitting array, $q$th target, $l$th receiving array) path, $\zeta_{kl}^q = 1/(R_{tk}^q + R_{rl}^q)^2$ is a propagation loss coefficient, $s_k[n]$ is the sampled version of the continuous time signal $s_{k}(t)$, ${\bf{e}}_{kl}[n]$ is an $L_r \times 1$ vector of the additive receiver noise, and $(\cdot)^H$ is a complex conjugate and transpose operation. To incorporate multiple temporal samples in the model (\ref{Model1}) we define the $N\times 1$ temporal steering vector for the $(k,q,l)th$ path as \begin{eqnarray} {\bf{b}}_{kl}\left(n_{kl}^q,\omega_{kl}^q\right) = \sqrt{\frac{E}{M_tL_t}} \left[ s_k[1-n_{kl}^q]e^{j\omega_{kl}^q1},\right.\nonumber \\ s_k[2-n_{kl}^q]e^{j\omega_{kl}^q2}, \ldots, \left. s_k[N-n_{kl}^q]e^{j\omega_{kl}^qN} \right]^T \end{eqnarray} where $(\cdot)^T$ denotes a matrix or a vector transpose operator. Considering $N$ temporal samples, the signal transmitted by the $k$th transmitting array and observed at the $l$th receiving array becomes \begin{equation} \label{Model2} {\bf{r}}_{kl} = \sum_{q=1}^Q \alpha_{kl}^q \zeta_{kl}^q {\bf{a}}_{rl}^q\otimes \left(\left({\bf{w}}_k^H{\bf{a}}_{tk}^q\right){\bf{b}}_{kl}^q\right) + {\bf{e}}_{kl} \end{equation} where $\otimes$ denotes the Kroneker product, and for the simplicity of the further presentation the following shorthand notation is used ${\bf{a}}_{tk}^q\triangleq{\bf{a}}_{tk}(\theta_{tk}^q)$, ${\bf{a}}_{rl}^q \triangleq {\bf{a}}_{rl}(\theta_{rl}^q)$, ${\bf{w}}_k \triangleq {\bf{w}}_k(\bar{\theta}_k)$, and ${\bf{b}}_{kl}^q \triangleq {\bf{b}}_{kl}(n_{kl}^q, \omega_{kl}^q)$. Let the coherent processing interval (CPI) be $T_c = N \triangle t$. The targets' reflectivities $\alpha_{kl}^q$, $\forall k,q,l$ are assumed to remain constant during this interval. In addition, the narrowband assumption in (\ref{Model1}) implies that the propagation time of the signal across the array elements should be smaller than the reciprocal of the signal's bandwidth \cite{DoganNehor1}. In the signal model (\ref{Model2}), the bearing angles $\theta_{tk}^q$ and $\theta_{rl}^q$, the time delay $n_{kl}^q$, and the propagation loss coefficient $\zeta_{kl}^q$ are defined by the location of the $q$th target, while the Doppler shift $\omega_{kl}^q$, is defined by the both the $q$th target's location and velocity. Let ${\mbox{\boldmath $\psi$}}^q$ be a $P\times 1$ vector of parameters of interest for the $q$th target (e.g. if ${\mbox{\boldmath $\psi$}}^q = \left[x^q, y^q, v_x^q, v_y^q \right]^T$ then $P=4$), then the corresponding spatio-temporal steering vector for the $q$th target is \begin{equation} \label{spatiotemporalsv} {\bf{h}}_{kl}^q( {\mbox{\boldmath $\psi$}}^q ) = \zeta_{kl}^q{\bf{a}}_{rl}^q\otimes \left(\left({\bf{w}}_{tk}^H{\bf{a}}_{tk}^q\right) {\bf{b}}_{kl}^q\right). \end{equation} Now the received signal model in (\ref{Model2}) can be rewritten in the matrix form as \begin{equation} \label{Model3} {\bf{r}}_{kl} = {\bf{H}}_{kl}({\mbox{\boldmath $\psi$}}){\mbox{\boldmath $\alpha$}}_{kl} + {\bf{e}}_{kl} \end{equation} where ${\mbox{\boldmath $\alpha$}}_{kl} = \left[\alpha_{kl}^1,\alpha_{kl}^2,\cdots,\alpha_{kl}^Q\right]^T$ is a vector of tagets' reflectivities for the $kl$th transmit-to-receive array path, ${\bf{H}}_{kl}({\mbox{\boldmath $\psi$}}) = \left[{\bf{h}}_{kl}^1({\mbox{\boldmath $\psi$}}^1),{\bf{h}}_{kl}^2({\mbox{\boldmath $\psi$}}^2),\cdots,{\bf{h}}_{kl}^Q({\mbox{\boldmath $\psi$}}^Q)\right]$ is a matrix of spatio-temporal steering vectors, and ${\mbox{\boldmath $\psi$}} =\left[ ({\mbox{\boldmath $\psi$}}^1)^T,\right.$ $\left.({\mbox{\boldmath $\psi$}}^2)^T,\cdots,({\mbox{\boldmath $\psi$}}^Q)^T \right]^T$ is a $PQ\times 1$ vector of unknown parameters for the $Q$ observed targets. Further this paper uses ${\bf{H}}_{kl}$ to indicate ${\bf{H}}_{kl}({\mbox{\boldmath $\psi$}})$. For the estimate $\hat{{\mbox{\boldmath $\psi$}}}$ of ${\mbox{\boldmath $\psi$}}$ we will use $\hat{{\bf{H}}}_{kl}$ instead of ${\bf{H}}_{kl}(\hat{{\mbox{\boldmath $\psi$}}})$. The following assumptions allow for the signals transmitted by the $M_t$ transmitting arrays and received at the $l$th receiving array to be considered independently. \textit{Assumption 1 (Orthogonal signals):} Assuming sufficiently large sample support $N$, the sampled waveforms transmitted by the $M_t$ transmitting arrays are orthogonal if \begin{equation} \label{orthog1} \begin{split} {\bf{b}}_{kl}^H\left(0,0\right)&{\bf{b}}_{k'l}\left(0,0\right)=\frac{E}{M_tL_r}\sum_{n=1}^{N}s_{k}[n]s_{k'}^*[n] \\ & = \left\lbrace \begin{array}{cc} \frac{E}{M_tL_r}\sum_{n=1}^{N}\vert s_i[n] \vert ^ 2 = \frac{E}{M_tL_r} & k=k' \\ 0 & k \neq k' \end{array} \right. \end{split} \end{equation} and the orthogonality is approximately maintained for the set of all possible time delays $n_{kl}^q$, $n_{k'l}^q$ and Doppler shifts $\omega_{kl}^q$, $\omega_{k'l}^q$ as per \begin{equation} \label{orthog2} \begin{split} {\bf{b}}_{kl}^H&\left(n_{kl}^q,\omega_{kl}^q\right){\bf{b}}_{k'l}^H\left(n_{k'l}^q,\omega_{k'l}^q\right)\\ & =\frac{E}{M_tL_r}\sum_{n=1}^{N}s_k[n-n_{kl}^q]s_{k'}^*[n-n_{k'l}^q]e^{jn\left(\omega_{kl}^q-\omega_{k'l}^q\right)} \\ & \approx\left\lbrace \begin{array}{cc} \frac{E}{M_tL_r} & k=k' \\ 0 & k \neq k' \end{array} \right. . \end{split} \end{equation} The estimation of the parameters of interest in (\ref{Model3}) and the corresponding CRLB on those parameters depend on the assumptions made about the targets' reflectivities ${\mbox{\boldmath $\alpha$}}_{kl}$. Two typical approaches exist in the literature \cite{VanTrees}-\cite{Korso}. The first is known as the stochastic model which assumes randomly distributed ${\mbox{\boldmath $\alpha$}}_{kl}$ according to a zero-mean complex Gaussian distribution with unknown covariance matrix that needs to be estimated. Such a model is also referred to as unconditional since the distribution of the received data depends only on the statistics of the targets' reflectivities, and remains the same for different realizations of ${\mbox{\boldmath $\alpha$}}_{kl}$. The second approach is called deterministic and assumes ${\mbox{\boldmath $\alpha$}}_{kl}$ to be deterministic unknowns. Since the distribution of the received data in this case is conditioned on the particular values of the targets' reflectivities such a received signal model is also known as conditional. This work considers both signal models based on the following assumptions. \textit{Assumption 2.1 (Stochastic signal model):} The stochastic signal model assumes ${\mbox{\boldmath $\alpha$}}_{kl}$ to be a zero-mean circularly-symmetric complex Gaussian random vector with a unknown $Q \times Q$ covariance matrix, ${\bf{A}} = E[{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H]$, equal for all transmit-to-receive array paths. Since the transmitting and receiving arrays are widely separated, we assume that ${\mbox{\boldmath $\alpha$}}_{kl}$ and ${\mbox{\boldmath $\alpha$}}_{k'l'}$ are statistically independent if $k \ne k'$ or $l \neq l'$. Thus \begin{equation} \label{assump:21} E[\alpha_{kl}^q\alpha_{k'l'}^{q'}] = \left\lbrace \begin{array}{cc} [{\bf{A}}]_{qq'} & k=k', l=l' \\ 0 & otherwise \end{array} \right. . \end{equation} \textit{Assumption 2.2 (Deterministic signal model):} Vectors of targets' reflectivities ${\mbox{\boldmath $\alpha$}}_{kl}$ are assumed to be deterministic and unknown. \textit{Assumption 3 (Uncorrelated spatiotemporal noise):} The noise in (\ref{Model3}) is spatially and temporally white zero-mean complex Gaussian random vector uncorrelated for different transmit-to-receive array paths \begin{equation} \label{assump:3} E[{\bf{e}}_{kl}{\bf{e}}_{k'l'}] = \left\lbrace \begin{array}{cc} \sigma^2{\bf{I}}_{L_rN} & k=k', l=l'\\ {\bf{0}} & otherwise \end{array} \right. \end{equation} where $\sigma^2$ is an unknown noise power, which is treated as a nuisance parameter during the target parameter estimation and ${\bf{I}}_{L_rN}$ is an $L_rN\times L_rN$ identity matrix. The rest of the paper develops the CRLBs and studies the asymptotic properties of the ML estimator for stochastic and deterministic signal models based on the Assumptions 2.1 and 2.2 respectively. \section{CRLB} The covariance matrix of any unbiased estimator $\hat{{\mbox{\boldmath $\gamma$}}}$ of the vector of unknown parameters ${\mbox{\boldmath $\gamma$}}$ satisfies the following inequality \cite{Kay1} \begin{equation} Cov[\hat{{\mbox{\boldmath $\gamma$}}}] \succeq {\mathcal{I}}^{-1}({\mbox{\boldmath $\gamma$}}) \end{equation} where \begin{equation} {\mathcal{I}}({\mbox{\boldmath $\gamma$}}) = E\left[\frac{\partial}{\partial {\mbox{\boldmath $\gamma$}} } \Lambda({\bf{r}}; {\mbox{\boldmath $\gamma$}})\left(\frac{\partial}{\partial {\mbox{\boldmath $\gamma$}} } \Lambda({\bf{r}}; {\mbox{\boldmath $\gamma$}})\right)^H\right] \end{equation} is a Fisher information matrix (FIM), $\Lambda({\bf{r}};{\mbox{\boldmath $\gamma$}})$ is a likelihood function, ${\bf{r}}$ is a collected data vector, and the symbol $\succeq$ indicates that the difference $Cov[\hat{{\mbox{\boldmath $\gamma$}}}] - {\mathcal{I}}^{-1}({\mbox{\boldmath $\gamma$}})$ is a positive semidefinite matrix. The CRLB for the vector of unknown parameters ${\mbox{\boldmath $\gamma$}}$ is defined as an inverse of the FIM \begin{equation} {\bf{C}}_{CRLB}({\mbox{\boldmath $\gamma$}}) = {\mathcal{I}}^{-1}({\mbox{\boldmath $\gamma$}}). \end{equation} This section presents the CRLBs for the stochastic and the deterministic signal models for radar with multiple widely separated arrays. \subsection{Stochastic Model} \label{sec:stochmodel} According to the the stochastic model in Assumption 2.1, the vector of targets' reflectivities ${\mbox{\boldmath $\alpha$}}_{kl}$ at the $kl$th transmit-to-receive array path is a sample from the complex Gaussian random process with zero-mean and $Q\times Q$ non-singular covariance matrix ${\bf{A}} = E\left[{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H\right]$. Since the targets' reflectivities and the additive noise are mutually independent, the received signal ${\bf{r}}_{kl}$ in (\ref{Model3}) is a zero-mean complex Gaussian with a covariance matrix \begin{equation} \label{CovarMat} {\bf{R}}_{kl} = E\left[ {\bf{r}}_{kl}{\bf{r}}_{kl}^H \right] = {\bf{H}}_{kl}{\bf{A}}{\bf{H}}_{kl}^H + \sigma^2{\bf{I}}_{L_rN}. \end{equation} Under Assumptions 1, 2.1 and 3 the likelihood function becomes a product of individual likelihood functions for each transmit-to-receive array path \begin{equation} \label{likelihood_stoch} \begin{split} \Lambda_s ({\bf{r}}_{11},{\bf{r}}_{12},&\ldots,{\bf{r}}_{M_tM_r}; {\mbox{\boldmath $\psi$}}, {\bf{A}}, \sigma^2) \\ & = \prod_{l=1}^{M_r}\prod_{k=1}^{M_t}\frac{1}{\pi^{NL_r}\left|{\bf{R}}_{kl}\right|}e^{-{\bf{r}}_{kl}^H{\bf{R}}_{kl}^{-1}{\bf{r}}_{kl}} \end{split} \end{equation} For the stochastic model the unknown parameters can be gathered in a single vector \begin{equation} \label{prms_stoch} {\mbox{\boldmath $\gamma$}} = \left[{\mbox{\boldmath $\psi$}}, {\mbox{\boldmath $\rho$}}, \sigma^2 \right]^T \end{equation} where ${\mbox{\boldmath $\rho$}}$ is the $Q^2 \times 1$ vector containing real and imaginary parts of the elements in ${\bf{A}}$. The $ij$th element of the FIM for the vector of unknown parameters ${\mbox{\boldmath $\gamma$}}$ in (\ref{prms_stoch}) is \cite{Kay1} \begin{equation} \label{FIMstoch} [{\mathcal{I}}({\mbox{\boldmath $\gamma$}})]_{ij} = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Tr\left\lbrace\frac{d{\bf{R}}_{kl}}{d\gamma_i}{\bf{R}}_{kl}^{-1}\frac{d{\bf{R}}_{kl}}{d\gamma_j}{\bf{R}}_{kl}^{-1}\right\rbrace. \end{equation} The FIM as defined in (\ref{FIMstoch}) contains the information about unknown parameters of interest ${\mbox{\boldmath $\psi$}}$ as well as the information about the nuisance parameters, the elements of the unknown signal covariance matrix ${\bf{A}}$ stored in ${\mbox{\boldmath $\rho$}}$ and the noise variance $\sigma^2$. Let ${\bf{c}}^q$ be a $q$th column of the matrix ${\bf{A}}$, and ${\bf{d}}_{kl}^{qp} = \frac{d}{d({\mbox{\boldmath $\psi$}}^q)_p}{\bf{h}}_{kl}^q$ be a derivative of the spatio-temporal steering vecotor ${\bf{h}}_{kl}^q$ in (\ref{spatiotemporalsv}) with respect to the $p$th, $p=1,2,\ldots P$, element of the vector ${\mbox{\boldmath $\psi$}}^q$. The following expression for the CRLB on the estimation errors of the targets' parameters of interest only is derived from the FIM in (\ref{FIMstoch}) in Appedinx \ref{AppendixA} \begin{equation} \label{FIMstochFianl} \begin{split} &{\bf{C}}_s^{-1}({\mbox{\boldmath $\psi$}}) = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} {\bf{G}}_{kl}^H{\bf{G}}_{kl}\\ &- {\bf{G}}_{kl}^H{\bf{F}}_{kl}\left(\sum_{l'=1}^{M_r}\sum_{k'=1}^{M_t}{\bf{F}}_{k'l'}^H{\bf{F}}_{k'l'}\right)^{-1} \left(\sum_{l'=1}^{M_r}\sum_{k'=1}^{M_t} {\bf{F}}_{k'l'}^H{\bf{G}}_{k'l'}\right) \end{split} \end{equation} where \begin{equation} {\bf{F}}_{kl} = \begin{bmatrix}{\bf{R}}_{kl}^{-T/2}{\bf{H}}_{kl}^C\otimes{\bf{R}}_{kl}^{-1/2}{\bf{H}}_{kl} & vec\left({\bf{R}}_{kl}^{-1}\right) \end{bmatrix} \end{equation} and the $m$th, $m=P(q-1)+p$, column of matrix ${\bf{G}}_{kl}$ is defined as follow \begin{equation} \begin{split} \left[{\bf{G}}_{kl}\right]_m & = vec\left({\bf{R}}_{kl}^{-1/2}\left({\bf{H}}_{kl}{\bf{c}}^q\left({\bf{d}}_{kl}^{qp}\right)^H \right.\right. \\ & + \left.\left. {\bf{d}}_{kl}^{qp}\left({\bf{c}}^q\right)^H{\bf{H}}_{kl}^H\right){\bf{R}}_{kl}^{-1/2}\right). \end{split} \end{equation} Here $vec(\cdot)$ is a vectorization operator that stacks columns of a matrix on top of each other, and $(\cdot)^C$ denotes a complex conjugate operation. Notice that the derived bound depends on the time delays $n_{kl}^q$, the bearing angles $\theta_{tk}^q$ and $\theta_{rl}^q$, the Doppler shift $\omega_{kl}^q$, and the propagation loss coefficients $\zeta_{kl}^q$ through the terms ${\bf{d}}_{kl}^{qp}$ which can be expanded using the differentiation chain rule as follows \begin{eqnarray} \label{chainrule} {\bf{d}}_{kl}^{qp} & = & \frac{\partial {\bf{h}}_{kl}^q}{\partial ({\mbox{\boldmath $\psi$}}^q)_p} = \frac{\partial {\bf{h}}_{kl}^q}{\partial n_{kl}^q}\frac{\partial n_{kl}^q}{\partial ({\mbox{\boldmath $\psi$}}^q)_p} + \frac{\partial {\bf{h}}_{kl}^q}{\partial \theta_{tk}^q}\frac{\partial \theta_{tk}^q}{\partial ({\mbox{\boldmath $\psi$}}^q)_p} \\ &+& \frac{\partial {\bf{h}}_{kl}^q}{\partial \theta_{rl}^q}\frac{\partial \theta_{rl}^q}{\partial ({\mbox{\boldmath $\psi$}}^q)_p} + \frac{\partial {\bf{h}}_{kl}^q}{\partial \omega_{kl}^q}\frac{\partial \omega_{kl}^q}{\partial ({\mbox{\boldmath $\psi$}}^q)_p} + \frac{\partial {\bf{h}}_{kl}^q}{\partial \zeta_{kl}^q}\frac{\partial \zeta_{kl}^q}{\partial ({\mbox{\boldmath $\psi$}}^q)_p}. \nonumber \end{eqnarray} To our knowledge the general expression for the CRLB in (\ref{FIMstochFianl}) cannot be significantly simplified since it requires an inverse of a sum of matrices. One can observe from (\ref{CovarMat}) that the covariance matrix ${\bf{R}}_{kl}$ of the received radar echoes is different for each transmit-to-receive array path. Thus, the radar echoes, ${\bf{r}}_{kl}$, are independent but not identically distributed (i.n.i.d.) random vectors. The result in (\ref{FIMstochFianl}) is a summation of $M_tM_r$ terms, such that each transmit-to-receive array path contributes information about the targets' parameters of interest. \subsection{Deterministic Model} \label{subsec:DetModel} Assumption 2.2 of the deterministic signal model treats the vector of targets' reflectivities ${\mbox{\boldmath $\alpha$}}_{kl}$ as a deterministic unknown nuisance parameter. Both the real and imaginary part of ${\mbox{\boldmath $\alpha$}}_{kl}$ has to be estimated for each $k$ and $l$ jointly with the elements of ${\mbox{\boldmath $\psi$}}$, and unknown noise power $\sigma^2$. Thus the vector of unknown parameters for the deterministic model is \begin{equation} {\mbox{\boldmath $\gamma$}} = \left[{\mbox{\boldmath $\psi$}}, {\mbox{\boldmath $\alpha$}}, \sigma^2 \right]^T \end{equation} where ${\mbox{\boldmath $\alpha$}} = \left[Re\left\lbrace{\mbox{\boldmath $\alpha$}}_{11}^T\right\rbrace, Im\left\lbrace{\mbox{\boldmath $\alpha$}}_{11}^T\right\rbrace, Re\left\lbrace{\mbox{\boldmath $\alpha$}}_{12}^T\right\rbrace, Im\left\lbrace{\mbox{\boldmath $\alpha$}}_{12}^T\right\rbrace,\right.$ $\left.\ldots, Re\left\lbrace{\mbox{\boldmath $\alpha$}}_{M_tM_r}^T\right\rbrace, Im\left\lbrace{\mbox{\boldmath $\alpha$}}_{M_tM_r}^T\right\rbrace\right]^T $ is the $2QM_tM_r \times 1$ vector that contains the real and imaginary parts of the unknown targets' reflectivities. In this case the received data at the $kl$th path (\ref{Model3}) has the complex Gaussian distribution with the mean vector ${\mbox{\boldmath $\mu$}}_{kl} = {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}$ and the covariance ${\bf{R}}_{kl} = \sigma^2{\bf{I}}_{L_rN}$. The corresponding likelihood function is \begin{equation} \label{Likelihood_det} \begin{split} \Lambda_d(&{\bf{r}}_{11},{\bf{r}}_{12},\ldots,{\bf{r}}_{M_tM_r};{\mbox{\boldmath $\psi$}}, {\mbox{\boldmath $\alpha$}}, \sigma^2)\\ =& \prod_{l=1}^{M_r}\prod_{k=1}^{M_t}\frac{1}{\pi^{NL_r}\left|\sigma^2{\bf{I}}\right|}e^{-\sigma^{-2}\left({\bf{r}}_{kl}-{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\right)^H\left({\bf{r}}_{kl}-{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\right)} \end{split} \end{equation} For the described signal model, the $ij$th element of FIM has a following general form \cite{Kay1} \begin{equation} \label{FIMdet} \begin{split} [{\mathcal{I}}({\mbox{\boldmath $\gamma$}})]_{ij} = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t}&\left[Tr\left\lbrace{\bf{R}}_{kl}^{-1} \frac{d{\bf{R}}_{kl}}{d\gamma_i} {\bf{R}}_{kl}^{-1}\frac{d{\bf{R}}_{kl}}{d\gamma_j} \right\rbrace \right. \\ + & \left. 2Re\left\lbrace \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d\gamma_i} {\bf{R}}_{kl}^{-1} \frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d\gamma_j} \right\rbrace\right] \end{split} \end{equation} The FIM in ($\ref{FIMdet}$) is defined for the vector of unknown parameters ${\mbox{\boldmath $\gamma$}}$ which contains both the parameters of interest ${\mbox{\boldmath $\psi$}}$ and the nuisance parameters ${\mbox{\boldmath $\alpha$}}$ and $\sigma$. The corresponding CRLB for the vector of targets' parameters of interests only is derived in Appendix \ref{AppendixB}, and can be written as \begin{eqnarray} \label{FIMdetFinal} {\bf{C}}_d^{-1}\left({\mbox{\boldmath $\psi$}} \right) & = & \frac{2}{\sigma^2}Re\left\lbrace \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left( {\bf{D}}_{kl}^H \Pi_{{\bf{H}}_{kl}}^{\perp} {\bf{D}}_{kl} \right) \right. \\ & \odot & \left. \left({\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H \otimes {\bf{1}}_{P\times P}\right)^T\right\rbrace \nonumber \end{eqnarray} where \begin{equation} \label{projection_matrix} \Pi_{{\bf{H}}_{kl}}^{\perp} = {\bf{I}}_{L_rN} - {\bf{H}}_{kl}\left({\bf{H}}_{kl}^H{\bf{H}}_{kl}\right)^{-1}{\bf{H}}_{kl}^H \end{equation} is a projection matrix on a subspace orthogonal to a null space of ${\bf{H}}_{kl}^H$, ${\bf{D}}_{kl} = \left[ {\bf{d}}_{kl}^{11}, {\bf{d}}_{kl}^{12},\ldots, {\bf{d}}_{kl}^{QP}\right]$, ${\bf{1}}_{P\times P}$ is the $P\times P$ all-ones matrix, and $\otimes$ denotes the Hadamard matrix product. The derived CRLB depends on the time delays, the bearing angles, the Doppler shifts, and the propagation loss coefficients through the columns of the matrices ${\bf{D}}_{kl}$ that can be explicitly written using the differentiation chain rule as shown in (\ref{chainrule}). The resultant CRLB has a similar form with the CRLB for the single array case in \cite{StoicaNehorai2}, where instead of the summation over the multiple snapshots taken at the same array, the expression in (\ref{FIMdetFinal}) has a summation over the different transmit-to-receive array paths. Notice that similarly to the stochastic model case discussed in Section \ref{sec:stochmodel}, the radar echoes received over different transmit-to-receiver array paths have different distributions, thus the likelihood function in (\ref{FIMdetFinal}) is a summation of i.n.i.d. terms. The performance comparison of different radar systems with multiple distributed arrays requires evaluation of (\ref{FIMdetFinal}) for each different set of targets' reflectivities. Making additional assumptions about the nuisance parameters allows us to simplify the performance evaluation by obtaining a single value of the bound instead of a set of values. Multiple ways to remove the dependence of the bound on the nuisance parameters have been proposed in the literature. For example, the hybrid CRLB assumes nuisance parameters to be random with known prior distribution \cite{VanTrees, Rockah}. Other methods, known as the modified Cramer-Rao bound, the Miller-Chang bound (MCB) and the extended MCB (EMCB), are discussed and compared in \cite{Gini}. These bounds characterize the estimation performance averaged over the different values of the vector of nuisance parameters. The EMCB is shown to be the tightest among the discussed Cramer-Rao like bounds. The EMCB is calculated by first deriving the CRLB for the joint estimation of the vector of prarameters of interest ${\mbox{\boldmath $\psi$}}$ and the nuisance parameters ${\mbox{\boldmath $\alpha$}}$, and then averaging the result over ${\mbox{\boldmath $\alpha$}}$ assuming it has some known probability distribution. The resulting expression is a bound on the expected value of the variance of the estimator $\hat{{\mbox{\boldmath $\psi$}}}$ taken with respect to the targets' reflectivities ${\mbox{\boldmath $\alpha$}}$ \begin{equation} \label{emcb} E_{{\mbox{\boldmath $\alpha$}}}[var[{\mbox{\boldmath $\psi$}}]] \succcurlyeq {\bf{C}}_{EMCB}({\mbox{\boldmath $\psi$}}) = E_{{\mbox{\boldmath $\alpha$}}} \left[{\bf{C}}_d({\mbox{\boldmath $\psi$}})\right]. \end{equation} The EMCB is used in this work for performance evaluation of the ML estimator for the deterministic model, since it can be evaluated using Monte-Carlo simulations. \section{Maximum Likelihood Estimation} \label{sec:ML} This section investigates the asymptotic properties of the ML estimator for both signal models: deterministic and stochastic as defined in Assumption 2.1 and 2.2, respectively. Based on the standard theory, the ML estimator is known to be consistent and efficient if the number of observations approaches infinity \cite{Kay1} while the number of nuisance parameters stays fixed. Since the received signal model in (\ref{Model3}) assumes each receiving array takes only a single snapshot, in the stochastic (\ref{likelihood_stoch}) and the deterministic (\ref{Likelihood_det}) likelihood functions the number of observations is equal to the number of transmit-to-receive array pairs, $M_tM_r$. Under the stochastic model assumption the number of nuisance parameters stays fixed as $M_tM_r$ grows, while for the deterministic model it increases. Hence, as $M_tM_r$ approaches infinity the standard theory can only be applied to the stochasitc model. In the following section we verify the asymptotic results for the stochastic model when $M_tM_r$ is large, and investigate the corresponding asymptotic properties for the deterministic model. In addition, we consider the asymptotic properties of ML in the scenario with fixed $M_tM_r$ and infinitely large $L_r$ for both models. \subsection{Stochastic ML Estimator} \label{subsec:StoML} The ML estimates of the parameters are found by maximizing the corresponding log-likelihood function. Under the stochastic signal model assumption, the maximization of the log of the likelihood function in (\ref{likelihood_stoch}) is equivalent to the minimization of the following function \begin{equation} \label{StochLogLike} \begin{split} \mbox{${\cal L}$}_s&\left({\mbox{\boldmath $\psi$}}, {\bf{A}}, \sigma^2\right) \\ = &\frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[ \log\left|{\bf{R}}_{kl}\right| + Tr \left\lbrace{\bf{R}}_{kl}^{-1} {\bf{r}}_{kl} {\bf{r}}_{kl}^H\right\rbrace\right]. \end{split} \end{equation} To our knowledge the variables ${\mbox{\boldmath $\psi$}}$, ${\bf{A}}$, and $\sigma^2$ are not separable, and in general it is impossible to find closed form solutions that minimize the function in (\ref{StochLogLike}). On the other hand, some insight about the ML estimates of these parameters can be obtained by considering the asymptotic performance of the ML estimator when $M_tM_r$ and $L_r$ are large. \subsubsection{Large $M_tM_r$} \label{LargeMMStoch} Consider the function in (\ref{StochLogLike}) evaluated at some given values of $\hat{{\mbox{\boldmath $\psi$}}}$, $\hat{{\bf{A}}}$, and $\hat{\sigma}^2$ \begin{equation} \begin{split} \label{StochLogLikeEst} \mbox{${\cal L}$}_s&\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right) \\ =& \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[ \log\left|\hat{{\bf{R}}}_{kl}\right| + Tr \left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{r}}_{kl} {\bf{r}}_{kl}^H\right\rbrace\right] \end{split} \end{equation} where $\hat{{\bf{R}}}_{kl} = \hat{{\bf{H}}}_{kl}\hat{{\bf{A}}}\hat{{\bf{H}}}_{kl}^H + \hat{\sigma}^2{\bf{I}}_{L_rN}$ is a positive definite matrix. In order to show that the ML estimates obtained by minimizing (\ref{StochLogLike}) are consistent we first show that the function in (\ref{StochLogLikeEst}) converges to the expected value when $M_tM_r \rightarrow \infty$, and then that the resulting expected value achieves its minimum at the true values of the parameters. Since the received signals, ${\bf{r}}_{kl}$, at different transmit-to-receive array paths have different covariance matrices ${\bf{R}}_{kl}$ (\ref{CovarMat}), the function in (\ref{StochLogLikeEst}) is the sum of i.n.i.d. random variables. According to Kolmogorov's strong law of large numbers, the sample mean of i.n.i.d random variables converges to its expected value, as long as the variance of each individual summand is bounded \cite{Papoulis}. Appendix \ref{AppendixCA} demonstrates that the variance of the $kl$th term in $\mbox{${\cal L}$}_s\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right)$ is always finite. Thus, Kolmogorov's strong law of large numbers can be applied to (\ref{StochLogLikeEst}) by letting $M_tM_r\rightarrow\infty$ \begin{eqnarray} \begin{split} &\mbox{${\cal L}$}_s\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right)\xrightarrow{a.s.} E\left[ \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left[\log\left|\hat{{\bf{R}}}_{kl}\right| \right.\right. \\ &\qquad\qquad\qquad\qquad\qquad\qquad + \left.\left.Tr \left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{r}}_{kl} {\bf{r}}_{kl}^H\right\rbrace\right] \vphantom{\sum_{l=1}^{M_r}}\right]\\ & = \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left[\log\left|\hat{{\bf{R}}}_{kl}\right| + Tr \left\lbrace \hat{{\bf{R}}}_{kl}^{-1} E\left[{\bf{r}}_{kl} {\bf{r}}_{kl}^H\right]\right\rbrace \right] \\ & = \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left[\log\left|\hat{{\bf{R}}}_{kl}\right| + Tr \left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{R}}_{kl} \right\rbrace\right] \label{mle_stoch_app_asymptotic} \end{split} \end{eqnarray} To show that the ML estimates are consistent, $\mbox{${\cal L}$}_s\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right)$ in (\ref{mle_stoch_app_asymptotic}) is shown to be minimized by the true values of the parameters. The lower bound on (\ref{mle_stoch_app_asymptotic}) can be obtained by applying the inequality (\ref{StoicasInequality}) stated in Appendix \ref{Inequalities} \begin{equation} \label{InequalityStoica} \begin{split} \frac{1}{M_rM_tL_r}&\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \log\left|\hat{{\bf{R}}}_{kl}\right| + Tr \left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{R}}_{kl} \right\rbrace \\ \geq & N + \frac{1}{M_tM_rL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \log\det{{\bf{R}}_{kl}} = const \end{split} \end{equation} while the equality in (\ref{InequalityStoica}) holds only if $\hat{{\bf{R}}}_{kl}={\bf{R}}_{kl}$, $\forall k,l$. Thus, for $M_tM_r\rightarrow \infty$, the function in (\ref{StochLogLike}) is minimized when the estimates are equal to the true values of parameters: $\hat{{\mbox{\boldmath $\psi$}}} = {\mbox{\boldmath $\psi$}}$, $\hat{{\bf{A}}} = {\bf{A}}$, and $\hat{\sigma}^2 = \sigma^2$. Therefore, the ML estimator is consistent for $M_tM_r \rightarrow \infty$. In addition, according to the standard theory, since the number of nuisance parameters is fixed, the ML estimator for targets' parameters of interest is also efficient. \subsubsection{Large $L_r$} \label{LargeLrStoch} This subsection considers the asymptotic behavior of the likelihood function in (\ref{StochLogLikeEst}) when the size of the receiving arrays, $L_r$, approaches infinity and the product $M_tM_r$ is finite. Similar to the case with an infinite number of transmit-to-receive array paths, $M_tM_r$, considered in the previous subsection, we first verify that (\ref{StochLogLikeEst}) converges to its expected value when $L_r\rightarrow \infty$. Appendix \ref{AppStochLr} shows that as $L_r$ approaches infinity, (\ref{StochLogLikeEst}) converges to \begin{equation} \label{LargeLrStochLL} \begin{split} \mbox{${\cal L}$}_s\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right)& \xrightarrow{a.s.} \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[\log\left|\hat{{\bf{R}}}_{kl}\right| \right. \\ +& \left. Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1}\left({\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H + \sigma^2{\bf{I}}\right)\right\rbrace\right] \end{split} \end{equation} which is not equal to the expected value in (\ref{mle_stoch_app_asymptotic}), provided $M_t$ and $M_r$ are finite. As it can be seen from (\ref{LargeLrStochLL}), the summation also requires $M_tM_r$ to be infinitely large in order for the trace term to converge to the expected value in (\ref{mle_stoch_app_asymptotic}). The consistent estimates of the targets' parameters of interest (locations and velocities) require consistent estimates of the corresponding bearing angles, time delays and Doppler shifts. The infinite receiving arrays can provide ideal estimates of the bearing angles, however for the time delays and Doppler shifts to be ideally estimated the number of transmit-to-receive array pairs must be much greater than the number of observed targets, $M_tM_r\gg Q$. Therefore, the ML estimates under the stochastic model assumption and infinitely large receiving arrays are inconsistent if $M_tM_r$ is finite. \subsection{Deterministic ML Estimator} \label{subsec:DetML} Under the deterministic model assumption, the estimates of the unknown parameters can be found by the maximization of the log of the likelihood function in (\ref{Likelihood_det}) which is equivalent to the minimization of the function \begin{equation} \label{lldet} \begin{split} \mbox{${\cal L}$}_d({\mbox{\boldmath $\psi$}}, {\mbox{\boldmath $\alpha$}}, \sigma^2) = \frac{1}{M_tM_rL_r}&\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left[L_rN\log\left(\pi\sigma^2\right) \right. \\ -& \left.\sigma^{-2} \Vert{\bf{r}}_{kl} - {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\Vert^2\right] \end{split} \end{equation} The estimate of the vectors of targets' reflectivities can be obtained by differentiating (\ref{lldet}) with respect to ${\mbox{\boldmath $\alpha$}}_{kl}$, and equating the resultant derivatives to zero while assuming the two other parameters $\sigma^2$ and ${\mbox{\boldmath $\psi$}}$ to be equal to their corresponding estimates $\hat{\sigma}^2$ and $\hat{{\mbox{\boldmath $\psi$}}}$. This leads to a necessary condition which expresses $\hat{{\mbox{\boldmath $\alpha$}}}_{kl}$ as a function of $\hat{{\mbox{\boldmath $\psi$}}}$ as \begin{equation} \label{DetAlphaHat} \hat{{\mbox{\boldmath $\alpha$}}}_{kl}(\hat{{\mbox{\boldmath $\psi$}}}) = \left(\hat{{\bf{H}}}_{kl}^H\hat{{\bf{H}}}_{kl}\right)^{-1}\hat{{\bf{H}}}_{kl}^H{\bf{r}}_{kl}. \end{equation} These steps also provide the estimate of the noise power as a function of $\hat{{\mbox{\boldmath $\psi$}}}$ as \begin{eqnarray} \label{DetSigmaHat} \hat{\sigma}^2(\hat{{\mbox{\boldmath $\psi$}}}) = \frac{1}{L_rNM_tM_r} \sum_{l=1}^{M_r} \sum_{k=1}^{M_t} Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{r}}_{kl} {\bf{r}}_{kl}^H\right\rbrace \end{eqnarray} where $\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} = {\bf{I}}_{L_rN} - \hat{{\bf{H}}}_{kl} \left(\hat{{\bf{H}}}_{kl}^H \hat{{\bf{H}}}_{kl}\right)^{-1} \hat{{\bf{H}}}_{kl}^H$ is a projection matrix $\Pi_{{\bf{H}}_{kl}}^{\perp}$ evaluated at the estimate $\hat{{\mbox{\boldmath $\psi$}}}$. Substituting $\hat{\sigma}^2(\hat{{\mbox{\boldmath $\psi$}}})$ and $\hat{{\mbox{\boldmath $\alpha$}}}_{kl}(\hat{{\mbox{\boldmath $\psi$}}})$ back into (\ref{lldet}) instead of the corresponding variables, the estimate of ${\mbox{\boldmath $\psi$}}$ can be found as the minimizer of the function \begin{equation} \label{MLdet} \begin{split} \hat{{\mbox{\boldmath $\psi$}}} = & \arg\min_{{\mbox{\boldmath $\psi$}}}\hat{\sigma}^2({\mbox{\boldmath $\psi$}}) = \arg\min_{{\mbox{\boldmath $\psi$}}} F\left({\mbox{\boldmath $\psi$}}\right) \\ =& \arg\min_{{\mbox{\boldmath $\psi$}}} \frac{1}{L_rNM_tM_r}\sum_{l=1}^{M_r} \sum_{k=1}^{M_t} Tr\left\lbrace\Pi_{{\bf{H}}_{kl}}^{\perp} {\bf{r}}_{kl}{\bf{r}}_{kl}^H\right\rbrace \end{split} \end{equation} Thus, the ML estimate of the vector of parameters of interest ${\mbox{\boldmath $\psi$}}$ is a vector $\hat{{\mbox{\boldmath $\psi$}}}$ which minimizes the estimate of the noise power $\hat{\sigma}^2(\hat{{\mbox{\boldmath $\psi$}}})$ in (\ref{DetSigmaHat}). The likelihood function in (\ref{MLdet}) is obtained form (\ref{lldet}) by removing the undesirable dependence on the nuisance parameters ${\mbox{\boldmath $\alpha$}}$ and $\sigma^2$. Such a likelihood function is known as the concentrated \cite{StoicaNehorai3} or profile \cite{Murphy} likelihood. Notice, since Assumption 2.2 considers the targets' reflectivities as deterministic unknowns, the number of unknown variables that have to be estimated grows with the number of antenna arrays, $M_tM_r$. \subsubsection{Large $M_tM_r$} \label{DetLargeMM} Insight about the performance of the ML estimator in (\ref{MLdet}) can be obtained by studying an asymptotic case when the number of transmit-to-receive array pairs, $M_tM_r$, is large. Consider (\ref{MLdet}) evaluated at some given value of $\hat{{\mbox{\boldmath $\psi$}}}$ \begin{equation} \label{MLdetEst} F\left(\hat{{\mbox{\boldmath $\psi$}}}\right) = \frac{1}{L_rNM_tM_r}\sum_{l=1}^{M_r} \sum_{k=1}^{M_t} Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{r}}_{kl}{\bf{r}}_{kl}^H\right\rbrace. \end{equation} Similar to Section \ref{LargeMMStoch} the consistency of $\hat{{\mbox{\boldmath $\psi$}}}$ can be shown by first demonstrating that (\ref{MLdetEst}) converges to the expected value when $M_tM_r \rightarrow \infty$, and then showing that the obtained expected value is minimized by the true value of the vector of parameter ${\mbox{\boldmath $\psi$}}$. Under Assumption 2.2 of the deterministic signal model, the radar echoes ${\bf{r}}_{kl}$ received at different transmit-to-receive array paths have different means, ${\mbox{\boldmath $\mu$}}_{kl} = {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}$. Hence, (\ref{MLdetEst}) is a summation of i.n.i.d. random variables. According to Kolmogorov's strong low of large numbers, this summation converges to the expected value, if the variance of each summand is finite. Appendix \ref{AppendixDA} shows that for targets' reflectivities with bounded magnitude, $\vert\alpha_{kl}^q\vert^2 \leq \vert\alpha_{max}\vert^2$, $\forall k,q,l$, the variance of the $kl$th term in (\ref{MLdetEst}) is bounded. Thus, when the number of transmit-to-receive array paths, $M_tM_r$, is approaching infinity, the function in (\ref{MLdetEst}) converges to the expected value \begin{equation} \begin{split} F(\hat{{\mbox{\boldmath $\psi$}}}) &\xrightarrow{a.s.} E\left[\frac{1}{L_rNM_tM_r}\sum_{l=1}^{M_r} \sum_{k=1}^{M_t} Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{r}}_{kl}{\bf{r}}_{kl}^H\right\rbrace\right] \\ = & \frac{1}{L_rNM_tM_r}\sum_{l=1}^{M_r} \sum_{k=1}^{M_t} Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} E\left[\vphantom{\left(\right)^H} \left({\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl} + {\bf{e}}_{kl}\right) \right.\right.\\ \quad & \qquad\qquad\qquad\qquad\qquad \cdot \left.\left.\left({\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl} + {\bf{e}}_{kl}\right)^H\right]\right\rbrace\\ = & \frac{1}{L_rNM_tM_r}\sum_{l=1}^{M_r} \sum_{k=1}^{M_t}\left[Tr\left\lbrace \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H \right\rbrace \right. \\ \quad & \qquad\qquad\qquad\qquad\qquad + \left.\sigma^2 Tr\left\lbrace \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right\rbrace\right] \label{AsympDet} \end{split} \end{equation} where the last identity follows since the noise vector ${\bf{e}}_{kl}$ is zero-mean with the covariance $\sigma^2{\bf{I}}_{L_rN}$. Since the matrix inside the first trace operator in (\ref{AsympDet}) is positive semidefinite, and using the fact that the trace of the orthogonal projection matrix is equal to its rank, $Tr\left\lbrace \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right\rbrace = L_rN-Q$, a bound on the expected value of (\ref{MLdetEst}) follows as \begin{equation} \label{AsympDet1} \begin{split} F(\hat{{\mbox{\boldmath $\psi$}}}) &\xrightarrow{a.s.} \sigma^2\frac{L_rN - Q}{L_rN} \\ +& \frac{1}{L_rNM_tM_r}\sum_{l=1}^{M_r} \sum_{k=1}^{M_t}Tr\left\lbrace \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H \right\rbrace \\ &\qquad\qquad\qquad\qquad\qquad\geq \sigma^2\frac{L_rN - Q}{L_rN} \end{split} \end{equation} Further $Tr\left\lbrace \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H \right\rbrace$ in (\ref{AsympDet1}) is equal to zero if and only if $\hat{{\bf{H}}}_{kl} = {\bf{H}}_{kl}$, thus the equality in (\ref{AsympDet1}) holds only if the estimate is equal to the true value of the parameters vector. Therefore, the estimate of the targets' parameters vector $\hat{{\mbox{\boldmath $\psi$}}}$ is consistent. However the estimates of the vectors of targets' reflectivities ${\mbox{\boldmath $\alpha$}}_{kl}$ are inconsistent. This can be seen from (\ref{DetAlphaHat}) by letting $\hat{{\bf{H}}}_{kl}={\bf{H}}_{kl}$ \begin{equation} \label{DetAlphaHatAsymp} \hat{{\mbox{\boldmath $\alpha$}}}_{kl}({\mbox{\boldmath $\psi$}}) = {\mbox{\boldmath $\alpha$}}_{kl} + ({\bf{H}}_{kl}^H{\bf{H}}_{kl})^{-1} {\bf{H}}_{kl}^H{\bf{e}}_{kl} \end{equation} Additionally, since $\sigma^2({\mbox{\boldmath $\psi$}}) = F({\mbox{\boldmath $\psi$}})$ and following the asymptoic result in (\ref{AsympDet1}), the estimate of the noise power in (\ref{DetSigmaHat}) converges to \begin{equation} \label{DetSigmaHatAsymp} \hat{\sigma^2}({\mbox{\boldmath $\psi$}}) \rightarrow \frac{L_rN-Q}{L_rN} \sigma^2. \end{equation} Thus, infinitely large product $M_tM_r$ does not provide a consistent estimate of the noise power. The biased estimates of the targets' reflectivities and the noise power for large $M_tM_r$ result in the ML estimate of ${\mbox{\boldmath $\psi$}}$ being consistent but not efficient. \subsubsection{Large $L_r$} \label{sec:LargeLrDet} This section proves consistency and efficiency of the estimates of ${\mbox{\boldmath $\psi$}}$, ${\mbox{\boldmath $\alpha$}}$ and $\sigma^2$, for a finite number of transmit-to-receive array paths, $M_tM_r$, and infinitely large size of the receiving arrays $L_r$. Appendix \ref{AppendixDB} proves that as $L_r\rightarrow \infty$, the function $F(\hat{{\mbox{\boldmath $\psi$}}})$ in (\ref{MLdetEst}) converges to the same expected value as in (\ref{AsympDet1}) which is minimized when $\hat{{\mbox{\boldmath $\psi$}}}={\mbox{\boldmath $\psi$}}$. Hence, the estimates of ${\mbox{\boldmath $\psi$}}$ in (\ref{MLdet}) are consistent if $L_r\rightarrow \infty$. Furthermore, as $L_r\rightarrow \infty$ the targets can be considered as sufficiently separated such that the following assumption holds: \textit{Assumption 4 (Well separated targets):} For a given receiving arrays length, $L_r$, and a number of temporal samples, $N$, any two observed targets $q$ and $q'$ are well separated (in space and Doppler) if the corresponding spatio-temporal steering vectors are nearly orthogonal \begin{equation} \left({\bf{h}}_{kl}^{q}\right)^H{\bf{h}}_{kl}^{q'} \approx \left\lbrace \begin{array}{cc} \frac{L_rE}{L_tM_t}\vert{\bf{w}}_k^H{\bf{a}}_{tk}^q\vert^2 (\zeta_{kl}^q)^2 & q=q'\\ 0 & otherwise \end{array} \right.. \end{equation} Thus for $Q$ well separated targets \begin{eqnarray} \label{remot_assmp} {\bf{H}}_{kl}^H{\bf{H}}_{kl} & \approx & \frac{L_rE}{L_tM_t} diag\left(\vert {\bf{w}}_k^H{\bf{a}}_{tk}^1\vert^2(\zeta_{kl}^1)^2, \vert {\bf{w}}_k^H{\bf{a}}_{tk}^2\vert^2(\zeta_{kl}^2)^2,\right.\nonumber\\ &\ldots &,\left.\vert {\bf{w}}_k^H{\bf{a}}_{tk}^Q\vert^2(\zeta_{kl}^Q)^2\right). \end{eqnarray} Using (\ref{remot_assmp}) it can be shown that the variance of the bias term in (\ref{DetAlphaHatAsymp}) approaches zero as $L_r \rightarrow \infty$ \begin{eqnarray} \label{biasalpha} &var&\left[({\bf{H}}_{kl}^H{\bf{H}}_{kl})^{-1} {\bf{H}}_{kl}^H{\bf{e}}_{kl}\right] = \sigma^2({\bf{H}}_{kl}^H{\bf{H}}_{kl})^{-1} \\ &\approx & \sigma^2\frac{L_tM_t}{L_rE} \left[ diag\left(\vert {\bf{w}}_k^H{\bf{a}}_{tk}^1\vert^2(\zeta_{kl}^1)^2, \vert {\bf{w}}_k^H{\bf{a}}_{tk}^2\vert^2(\zeta_{kl}^2)^2,\right.\right. \nonumber\\ &\ldots&,\left.\left.\vert {\bf{w}}_k^H{\bf{a}}_{tk}^Q\vert^2(\zeta_{kl}^Q)^2\right)\right]^{-1} \rightarrow {\bf{0}}. \nonumber \end{eqnarray} Thus the estimates of ${\mbox{\boldmath $\alpha$}}_{kl}$ in (\ref{DetAlphaHatAsymp}) are consistent when $L_r \rightarrow \infty$. Finally, since $F(\hat{{\mbox{\boldmath $\psi$}}})$ converges to the expected value in (\ref{AsympDet1}) when $L_r$ becomes asymptotically large, the estimate of the noise power $\hat{\sigma}^2({\mbox{\boldmath $\psi$}}) = F({\mbox{\boldmath $\psi$}})$ converges to (\ref{DetSigmaHatAsymp}). One can notice by observing (\ref{DetSigmaHatAsymp}) that if the size of the receiving array is sufficiently large such that $L_rN\gg Q$, the estimate of the noise power becomes consistent. Thus the estimates of the targets' parameters of interest, the noise variance and the targets' reflectivities are consistent when $L_r$ is infinitely large. Unlike adding transmitting and receiving arrays, increasing $L_r$ does not increase the number of nuisance parameters which have to be estimated. Since for infinitely large arrays, all targets can be considered as well-separated, it follows from the standard theory that the ML estimates of ${\mbox{\boldmath $\psi$}}$ are also asymptotically efficient when $L_r \rightarrow \infty$. \vspace{6 mm} To summarize, this section provides a study of the asymptotic properties of the ML estimator under the stochastic and deterministic signal model assumptions for a radar with widely distributed arrays. The ML estimator of ${\mbox{\boldmath $\psi$}}$ is shown to be consistent and efficient under the stochastic model assumption when the number of transmit-to-receive array paths, $M_tM_r$, is infinitely large. On the other hand, when $M_tM_r$ is finite, increasing the receiving array size, $L_r$, to infinity does not result in the consistent estimates of ${\mbox{\boldmath $\psi$}}$. Under the deterministic model assumption, the ML estimator of ${\mbox{\boldmath $\psi$}}$ is shown to be consistent but not efficient when $M_tM_r\rightarrow \infty$, since the number of nuisance parameters increases as $M_tM_r$ increases. However, when $M_tM_r$ is fixed and $L_r\rightarrow \infty$ the ML estimator for the deterministic model becomes consistent and efficient. The conducted asymptotic analysis provides insight into the parameter estimation performance of the radar system with widely separated antenna arrays, when $M_tM_r$ and $L_r$ are infinitely large. However, in practice an infinite number of antennas is infeasible, and optimal allocation of a finite number of antennas into a finite number of widely separated arrays remains an open question. In addition, a sufficiently large SNR is required in practice for the derived CRLB to be a good approximate performance measure. In order to further investigate these problems we conduct numerical simulations for finite $M_tM_r$ and $L_r$, and various values of SNR. \section{Simulation Results} This section uses the derived CRLB for stochastic and deterministic signal models and Monte Carlo simulations to assess the estimation performance of different configurations of the radar with widely separated antenna arrays. In order to compare different radar systems based on the same amount of transmitted power and occupied bandwidth, we assume that all radar configurations considered in this section have single element transmitting arrays ($L_t = 1$). The results from two sets of simulation scenarios are presented. In the first set the number of transmitting arrays is $M_t=6$, and the total number of receiving elements is $M_rL_r = 512$. In the second set of the simulation scenarios $M_t=2$ and $M_rL_r=128$. In both sets of the simulation scenarios, the target parameter estimation performance is studied for multiple radar configurations by changing the number of receiving arrays $M_r$ and their size $L_r$ while keeping the product $M_rL_r$, and the number of transmitting arrays $M_t$ fixed. In all the simulation scenarios considered here, the receiver and the transmitter arrays are located equidistantly and symmetrically with respect to the origin \cite{HaimBlum5,HaimBlum6}. Such antenna placements allow for an easy to explain, general methodology for changing the number of arrays whose performance is easy to interpret to facilitate validation of the derived CRLBs. The centers of the transmitting and receiving arrays are \begin{equation} \begin{split} ( x_{tk}, y_{tk} ) = & R \left(\cos \left( ( 2k - 1 ) \pi / M_t \right), \right. \\ & \qquad\left.\sin \left( ( 2k - 1 ) \pi / M_t \right) \right), k = 1,2,\ldots,M_t \nonumber\\ ( x_{rl}, y_{rl} ) = & R \left(\cos \left( 2 ( l - 1 ) \pi / M_r \right), \right. \\ & \qquad\left.\sin \left( 2 ( l - 1 ) \pi / M_r \right) \right), l = 1,2,\ldots,M_r \end{split} \end{equation} where $R$ is a distance from the origin to the transmitter or receiver. In the presented results $R = 1100$m. \begin{figure*}[htb] \centerline{\psfig{figure=Fig1.eps,width=5in,height=2.2in}} \caption{Examples of symmetrical and equdistant antenna placement: (a) $M_t = 6$ and $M_r = 8$; (b) $M_t = 2$ and $M_r = 2$; (c) $M_t = 2$ and $M_r = 1$. The boresighs of all receiving arrays point at the origin (the placements of the array elements are indicated by the lines passing through the corresponding receiver). Two targets positions are considered: 1) the targets are placed close to the origin at $( -40, -50 )$ and $( 60, 50 )$; 2) the targets are located away from the origin at $( 410, 320 )$ and $( 510, 420 )$.} \label{fig:scenario} \end{figure*} All receiving antennas are assumed to be uniformly spaced linear arrays (ULA) with $L_r$ elements and half wavelength inter-element spacing. The phase center of the $l$th receiving array is assumed to be in the geometrical center of the array located at $( x_{rl}, y_{rl} )$. The orientation of the $l$th receiving array is chosen such that its boresight direction points towards the origin. Examples of such a symmetrical antenna placement are shown in Fig. \ref{fig:scenario}. We assume all transmitters use a pulse train waveform of LFM chirps, which in the time-sampled signal domain have the following form \begin{equation} s_k[n] = \sum_{z=0}^{Z-1}s_0\left(n\triangle t - z T_r - \tilde{T}_k\right) \nonumber \label{LFM} \end{equation} \begin{equation} s_0(t) = e^{j\pi\frac{f_B}{T_0}\left(t - \frac{1}{2}T_0\right)^2}\left[h(t)-h(t - T_0)\right] \nonumber \end{equation} where $Z$ is the number of transmitted pulses, $T_r$ is the pulse repetition interval, $f_B$ is the bandwidth of the chirp, $T_0$ is the pulse duration, and $h(t)$ is the Heaviside step function. Let all transmitted waveforms contain the same number of pulses $Z=3$ with equal pulse repetition interval $T_r = 54$ms, bandwidth of $f_B = 1$MHz, and pulse duration $T_0=20\mu$s. The orthogonality assumption in (\ref{orthog2}) is satisfied by setting the time delays $\tilde{T}_k$ for each transmitter, such that there is no overlap between different transmitted waveforms for the set of time delays of interest. Notice that in such a way the waveform orthogonality can be achieved only if the surveillance area is limited. The derived CRLB and ML results are general and do not depend on the specific type of the transmitted orthogonal waveforms. The simulation results are obtained for two different positions of $Q=2$ targets. In the first case the targets are close to the origin and approximately equidistant from all transmitting and receiving arrays: $(x_1, y_1) = ( -40, -50 )$ and $( x_2, y_2 ) = ( 60, 50 )$. In the second case the targets' locations are chosen such that they are closer to some transmitting and receiving antennas and more remote from the others: $(x_1, y_1) = ( 410, 320 )$, and $( x_2, y_2 ) = ( 510, 420 )$. The distance between the targets in both cases is $r \approx 141.42$m. Since the MSE assessment of the ML estimator's performance requires computationally intensive Monte Carlo simulations, the simulation scenarios presented here consider the target location estimation only. Thus the vector of unknown parameters is ${\mbox{\boldmath $\psi$}} = \left[x^1,y^1,x^2,y^2\right]^T$. Notice that the range resolution of the LFM waveform with $1$MHz bandwidth is $\triangle r = c / (2f_b) = 150m > r$, thus the radar cannot reliably resolve the targets in range. We consider such targets as closely spaced. Let the vector of targets' reflectivities be generated from the complex circular Gaussian distribution with zero-mean and diagonal covariance matrix ${\bf{A}} = \sigma_{\alpha}^2{\bf{I}}$. Thus the targets are assumed to be uncorrelated. The total SNR is defined as an average of the SNRs over all transmit-to-receiver array pairs and targets \begin{equation} \label{SNRsim} SNR = \frac{1}{M_tM_rQ}\sum_{k=1}^{M_t}\sum_{l=1}^{M_r}\sum_{q=1}^Q SNR_{kl}^q \nonumber \end{equation} where \begin{equation} SNR_{kl}^q = E\frac{\sigma_{\alpha}^2 \left( \zeta_{kl}^q \right)^2}{\sigma^2} \nonumber. \end{equation} Recall that the target parameter estimation problem considered in this paper under Assumption 2.1 of the stochastic signal model treats the covariance matrix ${\bf{A}}$ as an unknown nuisance parameter. In addition, although the diagonal covaraince matrix is used to generate the signals in the simulation results presented here, no assumptions were made about the shape of the ${\bf{A}}$ while deriving the likelihood function in (\ref{likelihood_stoch}). \begin{figure*}[!t] \centering \begin{tabular}{c} \subfloat[]{\includegraphics[width=3in]{Fig2a.eps}} \subfloat[]{\includegraphics[width=3in]{Fig2b.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig2c.eps}} \subfloat[]{\includegraphics[width=3in]{Fig2d.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig2e.eps}} \subfloat[]{\includegraphics[width=3in]{Fig2f.eps}} \end{tabular} \caption{The CRLB and the MSE of the ML estimator for the stochastic signal model with two targets. The first target's location estimation results are shown for two closely spaced targets placed close to the origin in (a), (c) and (e), and away from the origin in (b), (d), and (f). Each configuration of the radar with widely separated arrays has $M_t = 6$ single antenna element transmitting arrays and the total number of receiving antenna elements is fixed at $M_rL_r = 512$. The number and the size of the receiving arrays vary: (a) and (b) $M_r = 128$, $L_r = 4$; (c) and (d) $M_r = 32$, $L_r = 16$; (e) and (f) $M_r = 8$, $L_r = 64$.} \label{fig:CRBsto} \end{figure*} \subsection{$M_rL_r = 512$ and $M_t = 6$} This subsection presents a set of simulation scenarios for different configurations of the radar with multiple widely separated arrays when the total number of receiving antenna elements and the number of transmitting arrays are fixed to $M_rL_r = 512$ and $M_t=6$ respectively. The MSE performance of the ML estimator as a function of SNR for the stochastic signal model is shown in Fig. \ref{fig:CRBsto}. The CRLB is evaluated using the expression in (\ref{FIMstochFianl}), and the ML estimates are obtained by minimizing (\ref{StochLogLike}). The results are shown for the first target's location estimation only, since the results obtained for the second target are identical. Subplots (a), (c), and (e) of Fig. \ref{fig:CRBsto} show the results for the targets located close to the origin, while subplots (b), (d), and (f) show the results for the targets located away from the origin. Subplots (a) and (b) demonstrate the estimation performance of the the radar with the large number of transmit-to-receive array path, $M_tM_r = 768$, but short receiving arrays, $L_r = 4$. The resolution of the receiving arrays, in such a configuration, is not sufficient to separate the targets. Thus, the MSE is predicted well by the CRLB only for large values of SNR. Contrary to this, a configuration with a relatively small value of the product $M_tM_r = 48$, and the long receiving arrays, $L_r = 64$, is shown in (e) and (f). The receiving arrays have sufficient resolution to separate the targets. The MSE starts converging to the CRLB at the SNR$=-10$dB, which is $30$dB lower, than in the case shown in (a) and (b). Subplots (c) and (d) of Fig. \ref{fig:CRBsto} demonstrate the transition between the configuration with the large number of small receiving arrays to the configuration with the long receiving arrays. One can observe from Fig. \ref{fig:CRBsto} that as $L_r$ increases over the limited range shown, for sufficiently large $M_tM_r$ and fixed $M_rL_r$, and targets well surrounded by the separated arrays, the location estimation performance of the radar with widely separated arrays improves in two ways: 1) the CRLB becomes lower, 2) the asymptotic region starts at lower values of the SNR. Notice, that the estimation performance does not change significantly when the targets are moved away from the origin, despite that some of the transmit-to-receive array pairs become more dominant than the others. This can be explained by the large values of $M_tM_r$ considered in these simulation scenarios, which provide a sufficient geometric diversity. \begin{figure*}[!t] \centering \begin{tabular}{c} \subfloat[]{\includegraphics[width=3in]{Fig3a.eps}} \subfloat[]{\includegraphics[width=3in]{Fig3b.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig3c.eps}} \subfloat[]{\includegraphics[width=3in]{Fig3d.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig3e.eps}} \subfloat[]{\includegraphics[width=3in]{Fig3f.eps}} \end{tabular} \caption{The EMCB and the MSE of the ML estimator for the deterministic signal model with two targets. The first target's location estimation results are shown for two closely spaced targets placed close to the origin in (a), (c), and (e), and away from the origin in (b), (d), and (f). Each configuration of the radar with widely separated arrays has $M_t = 6$ single antenna element transmitting arrays and the total number of receiving antenna elements is fixed at $M_rL_r = 512$. The number and the size of the receiving arrays vary: (a) and (b) $M_r = 128$, $L_r = 4$; (c) and (d) $M_r = 32$, $L_r = 16$; (e) and (f) $M_r = 8$, $L_r = 64$.} \label{fig:CRBdet} \end{figure*} Fig. \ref{fig:CRBdet} presents results similar to Fig. \ref{fig:CRBsto} obtained under the deterministic signal model assumption. Here we calculate EMCB instead of the CRLB, as discussed prior to (\ref{emcb}), assuming the targets' reflectivities are generated from the same zero-mean complex Guassian distribution as in the stochastic case. The radar configurations with $M_t = 6$ and $M_rL_r = 512$ are again considered. Since for the deterministic signal model the number of unknowns grows with the number of transmit-to-receiver array paths, $M_tM_r$, it is expected that the radar configuration with smaller $M_tM_r$ and larger receiving arrays will provide a better estimation performance. This can be observed by comparing subplots (a) and (b) to subplots (e) and (f) of Fig. \ref{fig:CRBdet}. Similar to the MSE performance for the stochastic model, for sufficiently large $M_tM_r$, as $L_r$ increases over the range shown, the asymptotic region starts at lower values of the SNR and the overall variance of the estimate decreases. Fig. \ref{fig:CRBdet} shows that even for finite $M_tM_r$ and $L_r$ the EMCB is a good prediction of the MSE when the SNR is high. In addition, Fig. \ref{fig:CRBdet} demonstrates that the results obtained for the targets located close to the origin are similar to the results obtained for the targets located away from origin. Therefore the estimation performance does not significantly depend on the targets locations if $M_tM_r$ is sufficiently large, and the targets are well surrounded by transmitting and receiving antennas. \begin{figure*}[!t] \centering \begin{tabular}{c} \subfloat[]{\includegraphics[width=3in]{Fig4a.eps}} \subfloat[]{\includegraphics[width=3in]{Fig4b.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig4c.eps}} \subfloat[]{\includegraphics[width=3in]{Fig4d.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig4e.eps}} \subfloat[]{\includegraphics[width=3in]{Fig4f.eps}} \end{tabular} \caption{The CRLB and the MSE of the ML estimator for the stochastic signal model with two targets. The first target's location estimation results are shown for two closely spaced targets placed close to the origin in (a), (c), and (e), and away from the origin in (b), (d), and (f). Each configuration of the radar with widely separated arrays has $M_t = 2$ single antenna element transmitting arrays and the total number of receiving antenna elements is fixed at $M_rL_r = 128$. The number and the size of the receiving arrays vary: (a) and (b) $M_r = 32$, $L_r = 4$; (c) and (d) $M_r = 8$, $L_r = 16$; (e) and (f) $M_r = 2$, $L_r = 64$.} \label{fig:sStoch} \end{figure*} \subsection{$M_rL_r = 128$ and $M_t = 2$} The MSE results shown in Fig. \ref{fig:CRBsto} and Fig. \ref{fig:CRBdet} demonstrate a good convergence to the bounds because the number of transmit-to-receive array paths, $M_tM_r$, is always sufficiently large. This subsection considers the estimation performance of the radar configurations with $M_t = 2$ single element transmitting arrays and $M_rL_r=128$ total receiving antenna elements. Fig. \ref{fig:sStoch} shows the MSE and the CRLB for the stochastic signal model under Assumption 2.1. The target parameter estimation performance for the radar configuration with $M_tM_r=64$ transmit-to-receive array paths is shown in subplots (a) and (b) for the targets located close to and away from the origin respectively. In (a) the CRLB provides a better prediction for the MSE than in (b), however the MSE is similar in both cases. Subplots (e) and (f) show the simulation results for the configuration with $M_tM_r=4$, and $L_r = 64$. The corresponding antenna placement is given in Fig. \ref{fig:scenario}b. Due to the chosen placement and the orientation of the receiving arrays, this radar configuration provides a better resolution along the $y$ axis, and a limited resolution along the $x$ axis, which is consistent with the MSE results in (e) and (f). However, because of a small number of transmit-to-receive array path, $M_tM_r=4$, the estimation performance of this radar configuration is more sensitive to the targets' location when compared to the estimation performance of the configuration with $M_tM_r=64$ in (a) and (b). This can be explained by a loss of the geometric diversity when $M_tM_r$ becomes small. In (c) and (d) the MSE calculated for the radar configuration with $M_t = 2$, $M_r = 8$ and $L_r = 16$ exhibits better convergence to the CRLB, and is more robust to the targets' location. \begin{figure*}[!t] \centering \begin{tabular}{c} \subfloat[]{\includegraphics[width=3in]{Fig5a.eps}} \subfloat[]{\includegraphics[width=3in]{Fig5b.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig5c.eps}} \subfloat[]{\includegraphics[width=3in]{Fig5d.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig5e.eps}} \subfloat[]{\includegraphics[width=3in]{Fig5f.eps}} \end{tabular} \caption{The EMCB and the MSE of the ML estimator for the deterministic signal model with two targets. The first target's location estimation results are shown for two closely spaced targets placed close to the origin in (a), (c), and (e), and away from the origin in (b), (d), and (f). Each configuration of the radar with widely separated arrays has $M_t = 2$ single antenna element transmitting arrays and the total number of receiving antenna elements is fixed at $M_rL_r = 128$. The number and the size of the receiving arrays vary: (a) and (b) $M_r = 32$, $L_r = 4$; (c) and (d) $M_r = 8$, $L_r = 16$; (e) and (f) $M_r = 2$, $L_r = 64$.} \label{fig:sDet} \end{figure*} Similar conclusions can be made about the deterministic signal model and the radar configurations with $M_t=2$ and $M_rL_r=128$. The corresponding results of the Monte Carlo simulations are shown in Fig. \ref{fig:sDet}. In (a) and (b) the number of transmit-to-receive array path is $M_tM_r=64$, and the receiving arrays have $L_r=4$ antenna elements. The MSE is well predicted by the EMCB in the high SNR region, and the prediction is better for the targets located close to the origin compared to the targets located away from the origin. Since the number of unknown nuisance parameters (targets' reflectivities) decreases with $M_tM_r$ under the deterministic model assumption, the MSE in (c) and (e) demonstrates better convergence to the EMCB. The antenna placement used to obtain results in (e) and (f) with $M_t=2$, $M_r=2$, and $L_r=64$ is given in Fig. \ref{fig:scenario}b. Similar to the stochastic case, such antenna placement results in a better estimation performance along the $y$ axis than along the $x$ axis, however the estimation performance becomes significantly dependent on the location of the targets with respect to the receiving arrays. \begin{figure*}[!t] \centering \begin{tabular}{c} \subfloat[]{\includegraphics[width=3in]{Fig6a.eps}} \subfloat[]{\includegraphics[width=3in]{Fig6b.eps}}\\ \subfloat[]{\includegraphics[width=3in]{Fig6c.eps}} \subfloat[]{\includegraphics[width=3in]{Fig6d.eps}}\\ \end{tabular} \caption{Results of the Monte Carlo simulations for a radar configuration with all receiving antenna elements grouped into one receiving array. The first target's location estimation results are shown for two closely spaced targets: (a) the targets are close to the origin and the stochastic model is assumed; (b) the targets are away from the origin and the stochastic model is assumed; (c) the targets are close to the origin and the deterministic model is assumed; (d) the targets are away from the origin and the deterministic model is assumed. Each configuration of the radar with widely separated arrays has $M_t = 2$ single antenna element transmitting arrays and $M_r = 1$ receiving array with $L_r = 128$ antenna elements.} \label{fig:longarrays} \end{figure*} From the presented results, one might conclude that grouping all receiving antenna elements into one receiving array would provide the smallest MSE. In order to demonstrate that this assumption is generally false, we consider a radar with $M_t=2$ single element transmitting arrays and $M_r=1$ receiving array with $L_r=128$ antenna elements. The antenna placement chosen for the simulations is shown in Fig. \ref{fig:scenario}c. Since such a radar system has only $M_tM_r = 2$ transmit-to-receive array paths, the geometric gain due to observing targets from multiple angles is much smaller compared to the other configurations with $M_tM_r\gg 1$. We provide target location estimation Monte Carlo simulation results in Fig. \ref{fig:longarrays}. In (a) and (b) we show the MSE and the CRLB for the stochastic model, while in (c) and (d) we present the MSE and the EMCB curves for the deterministic model. Comparing the MSE curves shown in Fig. \ref{fig:longarrays} with those in subplots (e) and (f) in Fig. \ref{fig:sStoch} and Fig. \ref{fig:sDet} indicates that the MSE performance of the ML estimator for the radar with one large receiving array is worse than the performance of the radar with two receiving arrays for both stochastic and deterministic signal models. The MSE is much higher in the single receiving array case, and the CRLB provides a poor prediction of the MSE. Since the receiving array is oriented parallel to the $y$-axis it provides good resolution along the $y$-axis, with very limited resolution along the $x$-axis. Thus, the MSE results for the $y$ coordinates of the targets in Fig. \ref{fig:longarrays} are much better than the corresponding results for the $x$ coordinates. This demonstrates a loss in the geometric gain due to having only a single receiving array. Since the targets have two unknown coordinates, two appropriately oriented arrays are required to obtain accurate estimation performance for both x and y coordinates. The simulation results shown in Fig. \ref{fig:longarrays} show that grouping all receiving antenna elements in one array does not generally provide better estimation performance, since the product $M_tM_r=2$ is too small. The MSE depends significantly on the positions of the targets with respect to the receiving array. Therefore, in terms of the MSE, it is generally more beneficial to have multiple distributed transmitting and receiving arrays such that the targets are observed from multiple angles providing geometric gain in all directions. \section{Conclusions} This paper studies the parameter estimation performance of a radar with widely separated antenna arrays in multiple target scenarios. The CRLB is derived under the stochastic and the deterministic signal model assumptions. The derived expressions are general and can be used to obtain bounds for different scenarios including a variety of radar system configurations. The asymptotic properties of the ML estimator are studied under the stochastic and the deterministic signal model assumptions. The stochastic ML estimates are shown to become consistent and efficient if the number of transmit-to-receive array paths, $M_tM_r$, approaches infinity. However, keeping $M_tM_r$ finite and increasing the size of the receiving arrays, $L_r$, does not provide consistency. Under the deterministic signal model assumption the ML estimates are consistent but not efficient when $M_tM_r$ is infinitely large and $L_r$ is fixed, while finite $M_tM_r$, and infinitely large $L_r$ guarantee consistency and efficiency. The asymptotic study conducted here provides useful insight into the parameter estimation performance of a radar system with distributed arrays. However, the question of the optimal allocation of the antennas into arrays when only a finite number of antenna elements is available cannot be answered by considering the asymptotic performance. This issue is addressed by conducting numerical simulations of scenarios with finite $M_tM_r$ and $L_r$, and a fixed number of available receiving antenna elements, $M_rL_r$. The simulation results show that the MSE and the threshold SNR decrease as $L_r$ increases for both signal models if $M_tM_r$ is sufficiently large. The MSE for both stochastic and deterministic signal models is shown to be well predicted by the corresponding CRLB and the EMCB in the large SNR region. However, if $M_tM_r$ is too small, the estimation performance becomes strongly dependent on the targets' positions and for certain locations even an infinitely large $L_r$ cannot provide performance close to that with asymptotically large $M_tM_r$. This suggests that when the number of available receiving antenna elements is fixed, the configurations where neither $M_t M_r$ nor $L_r$ are too small provide better target parameter estimation performance. The CRLB and the asymptotic analysis of the ML estimator is the first step toward understanding the parameter estimation performance of a radar system with multiple widely separated arrays. This paper introduces a number of questions and shows that further analysis is required in some directions. \appendices \section{} \label{AppendixA} The derivation of the Cramer-Rao bound for the stochastic model presented in this appendix follows the derivation for a single phased array case developed in \cite{Stoica2}. Using (\ref{vec1}) and (\ref{vec2}), the expression for the $ij$th element of the FIM in (\ref{FIMstoch}) can be rewritten as \begin{equation} \begin{split} \label{AppendixA0} \left[{\mathcal{I}}({\mbox{\boldmath $\gamma$}})\right]_{ij} &= \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left(vec\left( \frac{d{\bf{R}}_{kl}}{d{\mbox{\boldmath $\gamma$}}_i}\right)\right)^H\left({\bf{R}}_{kl}^{-T}\otimes{\bf{R}}_{kl}^{-1}\right)\\ & \cdot vec\left(\frac{d{\bf{R}}_{kl}}{d{\mbox{\boldmath $\gamma$}}_j}\right). \end{split} \end{equation} Applying (\ref{vec2}) also to (\ref{CovarMat}) we can define \begin{equation} \label{VectorizedR} {\bf{v}}_{kl} = vec\left({\bf{R}}_{kl}\right) = \left({\bf{H}}_{kl}^c\otimes {\bf{H}}_{kl}\right)vec\left({\bf{A}}\right)+\sigma^2 vec\left({\bf{I}}_{L_rN}\right). \end{equation} Using (\ref{VectorizedR}) in (\ref{AppendixA0}) the $PQ\times PQ$ FIM follows \begin{equation} {\mathcal{I}}({\mbox{\boldmath $\gamma$}}) = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \left(\frac{d{\bf{v}}_{kl}}{d{\mbox{\boldmath $\gamma$}}^T}\right)^H\left({\bf{R}}_{kl}^{-T}\otimes{\bf{R}}_{kl}^{-1}\right)\left(\frac{d{\bf{v}}_{kl}}{d{\mbox{\boldmath $\gamma$}}^T}\right). \end{equation} Further, the matrix ${\mathcal{I}}({\mbox{\boldmath $\gamma$}})$ can be partitioned \begin{equation} \label{PartitionedFIM} {\mathcal{I}}({\mbox{\boldmath $\gamma$}}) = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} \begin{bmatrix} {\bf{G}}_{kl}^H \\ {\bf{\Delta}}_{kl}^H \end{bmatrix} \begin{bmatrix} {\bf{G}}_{kl} & {\bf{\Delta}}_{kl} \end{bmatrix} \end{equation} where \begin{eqnarray} \label{Gmat} {\bf{G}}_{kl} & = & \left({\bf{R}}_{kl}^{-T/2}\otimes{\bf{R}}_{kl}^{-1/2}\right)\left(\frac{d{\bf{v}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T}\right)\\ \label{Deltamat} {\bf{\Delta}}_{kl} & = & \left({\bf{R}}_{kl}^{-T/2}\otimes{\bf{R}}_{kl}^{-1/2}\right) \begin{bmatrix} \frac{d{\bf{v}}_{kl}}{d{\mbox{\boldmath $\rho$}}^T} & \frac{d{\bf{v}}_{kl}}{d\sigma^2} \end{bmatrix}.\end{eqnarray} The CRLB for the vector of the targets' parameters of interest can be found by applying a matrix factorization lemma \cite{Horn} to (\ref{PartitionedFIM}) \begin{equation} \label{AppendixAFIM1} \begin{split} &{\bf{C}}_s^{-1}({\mbox{\boldmath $\psi$}}) = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} {\bf{G}}_{kl}^H{\bf{G}}_{kl} \\ &- {\bf{G}}_{kl}^H{\bf{\Delta}}_{kl}\left(\sum_{l'=1}^{M_r}\sum_{k'=1}^{M_t}{\bf{\Delta}}_{k'l'}^H{\bf{\Delta}}_{k'l'}\right)^{-1}\left(\sum_{l'=1}^{M_r}\sum_{k'=1}^{M_t} {\bf{\Delta}}_{k'l'}^H{\bf{G}}_{k'l'}\right). \end{split} \end{equation} Further we define derivatives of ${\bf{v}}_{kl}$ with respect to the elements of ${\mbox{\boldmath $\psi$}}$ and ${\mbox{\boldmath $\rho$}}$, and $\sigma^2$. Let $({\mbox{\boldmath $\psi$}}^q)_p$ be the $p$th, $p=1,2,\ldots,P$, parameter of interest of the target $q$, then from (\ref{VectorizedR}) \begin{equation} \begin{split} \frac{d{\bf{v}}_{kl}}{d({\mbox{\boldmath $\psi$}}^q)_p} &= vec\left(\frac{{\bf{R}}_{kl}}{d({\mbox{\boldmath $\psi$}}^q)_p}\right) \\ &= vec\left({\bf{d}}_{kl}^{qp}\left({\bf{c}}^q\right)^H{\bf{H}}_{kl}^H + {\bf{H}}_{kl}{\bf{c}}^q\left({\bf{d}}_{kl}^{qp}\right)^H\right) \end{split} \end{equation} where ${\bf{c}}^q$ is a $q$th column of ${\bf{A}}$, and ${\bf{d}}_{kl}^{qp} = \frac{d}{d({\mbox{\boldmath $\psi$}}^q)_p}{\bf{h}}_{kl}^q$. Thus the $m$th column of the matrix ${\bf{G}}_{kl}$ in (\ref{Gmat}), where $m = P( q - 1 ) + p$, becomes \begin{eqnarray} \left[{\bf{G}}_{kl}\right]_m &=& \left({\bf{R}}_{kl}^{-T/2}\otimes{\bf{R}}_{kl}^{-1/2}\right)\frac{d{\bf{v}}_{kl}}{d({\mbox{\boldmath $\psi$}}^q)_p}\\& = & vec\left({\bf{R}}_{kl}^{-1/2}\frac{{\bf{R}}_{kl}}{d({\mbox{\boldmath $\psi$}}^q)_p}{\bf{R}}_{kl}^{-1/2}\right) \nonumber\\ & = & vec\left({\bf{R}}_{kl}^{-1/2}\left({\bf{H}}_{kl}{\bf{c}}^q\left({\bf{d}}_{kl}^{qp}\right)^H \right.\right.\nonumber\\ & + & \left.\left.{\bf{d}}_{kl}^{qp}\left({\bf{c}}^q\right)^H{\bf{H}}_{kl}^H\right){\bf{R}}_{kl}^{-1/2}\right).\nonumber \end{eqnarray} The derivative of (\ref{VectorizedR}) with respect to ${\mbox{\boldmath $\rho$}}$ can be simplified after making the following observation: $vec\left({\bf{A}}\right) = {\bf{J}}{\mbox{\boldmath $\rho$}}$, where ${\bf{J}}$ is a $Q^2 \times Q^2$ constant block diagonal nonsingular matrix that maps elements of the vector ${\mbox{\boldmath $\rho$}}$ into the elements of $vec\left({\bf{A}}\right)$ \cite{Stoica2}. Thus \begin{equation} \label{dvdrho} \frac{d{\bf{v}}_{kl}}{d{\mbox{\boldmath $\rho$}}} = \left({\bf{H}}_{kl}^c\otimes{\bf{H}}_{kl}\right){\bf{J}}. \end{equation} Finally, the derivative of (\ref{VectorizedR}) with respect to the noise variance is \begin{equation} \label{dvdsigma} \frac{d{\bf{v}}_{kl}}{d \sigma^2} = vec\left({\bf{I}}_{L_rN}\right). \end{equation} Using (\ref{dvdrho}) and (\ref{dvdsigma}) in (\ref{Deltamat}), the matrix ${\bf{\Delta}}_{kl}$ can be written as \begin{equation} \begin{split} \Delta_{kl} &= \begin{bmatrix} \left({\bf{R}}_{kl}^{-T/2}{\bf{H}}_{kl}^c\otimes{\bf{R}}_{kl}^{-1/2}{\bf{H}}_{kl}\right){\bf{J}} & vec\left({\bf{R}}_{kl}^{-1}\right) \end{bmatrix} \\ &= {\bf{F}}_{kl} \bar{{\bf{J}}} \end{split} \end{equation} where \begin{eqnarray} {\bf{F}}_{kl} & = & \begin{bmatrix}{\bf{R}}_{kl}^{-T/2}{\bf{H}}_{kl}^c\otimes{\bf{R}}_{kl}^{-1/2}{\bf{H}}_{kl} & vec\left({\bf{R}}_{kl}^{-1}\right) \end{bmatrix}\\ \bar{{\bf{J}}} & = & \begin{bmatrix} {\bf{J}} & {\bf{0}}_{Q^2\times 1} \\ {\bf{0}}_{1 \times Q^2} & 1 \end{bmatrix}. \end{eqnarray} After substituting ${\bf{\Delta}}_{kl}$ back into (\ref{AppendixAFIM1}) we obtain \begin{equation} \label{AppendixAFIM2} \begin{split} {\bf{C}}_s^{-1}({\mbox{\boldmath $\psi$}}) & = \sum_{l=1}^{M_r}\sum_{k=1}^{M_t} {\bf{G}}_{kl}^H{\bf{G}}_{kl} \\ &- {\bf{G}}_{kl}^H{\bf{F}}_{kl}\left(\sum_{l'=1}^{M_r}\sum_{k'=1}^{M_t}{\bf{F}}_{k'l'}^H{\bf{F}}_{k'l'}\right)^{-1}\\ &\cdot \left(\sum_{l'=1}^{M_r}\sum_{k'=1}^{M_t} {\bf{F}}_{k'l'}^H{\bf{G}}_{k'l'}\right). \end{split} \end{equation} One can observe that the result in (\ref{AppendixAFIM2}) does not depend on the matrix ${\bf{J}}$, and the explicit form of ${\bf{J}}$ is not important. To our knowledge the expression in (\ref{AppendixAFIM2}) in general cannot be significantly simplified because it requires inversion of the sum of matrices. \section{} \label{AppendixB} The general expression for the deterministic FIM is given in (\ref{FIMdet}). Under Assumption 2.2 the mean and the covariance matrix of the received signal for the $kl$th transmit-to-receive array path are ${\mbox{\boldmath $\mu$}}_{kl} = {\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}$ and ${\bf{R}}_{kl} = \sigma^2{\bf{I}}_{L_rN}$ respectively. The derivatives of ${\mbox{\boldmath $\mu$}}_{kl}$ and ${\bf{R}}_{kl}$ with respect to ${\mbox{\boldmath $\psi$}}$, ${\mbox{\boldmath $\alpha$}}$, and $\sigma^2$ follow \begin{equation} \label{AppendixBdmudpsi} \frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T} = \begin{bmatrix} {\bf{d}}_{kl}^{11}\alpha_{kl}^{1} & \ldots & {\bf{d}}_{kl}^{qp}\alpha_{kl}^{q} & \dots & {\bf{d}}_{kl}^{PQ}\alpha_{kl}^Q \end{bmatrix} \end{equation} \begin{equation} \frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d {\mbox{\boldmath $\alpha$}}^T} = \begin{bmatrix} {\bf{0}}_{L_rN \times 2Q} & \ldots & {\bf{H}}_{kl} & j{\bf{H}}_{kl} & \ldots & {\bf{0}}_{L_rN \times 2Q} \end{bmatrix} \end{equation} \begin{eqnarray} \frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d \sigma^2} & = & {\bf{0}}_{L_rN \times 1} \\ \frac{d{\bf{R}}_{kl}}{d {\mbox{\boldmath $\psi$}}^{qp}} & = & \frac{d{\bf{R}}_{kl}}{d Re\left\lbrace\alpha_{kl}^q\right\rbrace} = \frac{d{\bf{R}}_{kl}}{d Im\left\lbrace\alpha_{kl}^q\right\rbrace} = {\bf{0}}_{L_rN \times L_rN} \\ \label{AppendixdRmatdsigma} \frac{d{\bf{R}}_{kl}}{d \sigma^2} & = & {\bf{I}}_{L_rN}. \end{eqnarray} Notice (\ref{AppendixBdmudpsi}) can be written in a more compact form \begin{equation} \label{AppendixBshort} \frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T} = {\bf{D}}_{kl}{\bf{P}}_{kl} \end{equation} where \begin{eqnarray} {\bf{D}}_{kl} & = & \begin{bmatrix} {\bf{d}}_{kl}^{11} & \ldots & {\bf{d}}_{kl}^{PQ} \end{bmatrix}\\ {\bf{P}}_{kl} & = & diag( {\mbox{\boldmath $\alpha$}}_{kl} \otimes {\bf{1}}_{P\times 1} ) \end{eqnarray} and ${\bf{1}}_{P \times 1}$ is a $P\times 1$ all-ones column vector. Using (\ref{AppendixBdmudpsi})-(\ref{AppendixdRmatdsigma}) in (\ref{FIMdet}), the FIM under the deterministic model assumption can be written as \begin{equation} \label{AppendixBFIM1} {\mathcal{I}}({\mbox{\boldmath $\gamma$}}) = \frac{2}{\sigma^2}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} Re \begin{bmatrix} \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\psi$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T} & \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\psi$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\alpha$}}^T} & {\bf{0}}\\ \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\alpha$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T} & \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\alpha$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\alpha$}}^T} & {\bf{0}}\\ {\bf{0}} & {\bf{0}} & \frac{L_rN}{2\sigma^2} \end{bmatrix}. \end{equation} Using a matrix factorization lemma the FIM for the vector of parameters of interest ${\mbox{\boldmath $\psi$}}$ becomes \begin{eqnarray} \label{AppendixBFIM2} {\mathcal{I}}({\mbox{\boldmath $\psi$}}) & = & \frac{2}{\sigma^2} \left[\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} Re\left\lbrace \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\psi$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T} \right\rbrace \right. \\ & - & \left(\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Re\left\lbrace \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\psi$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\alpha$}}^T} \right\rbrace\right) \nonumber\\ &\cdot& \left(\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Re\left\lbrace \frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\alpha$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\alpha$}}^T}\right\rbrace \right)^{-1} \nonumber\\ &\cdot & \left. \left(\sum_{l=1}^{M_r}\sum_{k=1}^{M_t} Re\left\lbrace\frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\alpha$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T}\right\rbrace\right)\right] \nonumber. \end{eqnarray} It can be verified that \begin{equation} \label{AppendixBReal1} Re\left\lbrace\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\psi$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T}\right\rbrace = \begin{bmatrix} {\bf{Y}}_{11} & \cdots & {\bf{0}} \\ \vdots & \ddots & \vdots\\ {\bf{0}} & \cdots & {\bf{Y}}_{M_tM_r} \end{bmatrix} \end{equation} \begin{eqnarray} Re\left\lbrace\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\psi$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\alpha$}}^T}\right\rbrace & = & \begin{bmatrix} {\bf{T}}_{11} & \ldots & {\bf{T}}_{M_tM_r} \end{bmatrix}\\ \label{AppendixBReal2} Re\left\lbrace\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\frac{d{\mbox{\boldmath $\mu$}}_{kl}^H}{d{\mbox{\boldmath $\alpha$}}}\frac{d{\mbox{\boldmath $\mu$}}_{kl}}{d{\mbox{\boldmath $\psi$}}^T}\right\rbrace & = & \begin{bmatrix} {\bf{U}}_{11}^T & \ldots & {\bf{U}}_{M_tM_r}^T \end{bmatrix}^T \end{eqnarray} where \begin{eqnarray} {\bf{Y}}_{kl} & = & \begin{bmatrix} Re\left\lbrace{\bf{H}}_{kl}^H{\bf{H}}_{kl}\right\rbrace & - Im\left\lbrace{\bf{H}}_{kl}^H{\bf{H}}_{kl}\right\rbrace\\ Im\left\lbrace{\bf{H}}_{kl}^H{\bf{H}}_{kl}\right\rbrace & Re\left\lbrace{\bf{H}}_{kl}^H{\bf{H}}_{kl}\right\rbrace\\ \end{bmatrix}\\ {\bf{T}}_{kl} & = & \begin{bmatrix} Re\left\lbrace{\bf{P}}_{kl}^H{\bf{D}}_{kl}^H{\bf{H}}_{kl}\right\rbrace & -Im\left\lbrace{\bf{P}}_{kl}^H{\bf{D}}_{kl}^H{\bf{H}}_{kl}\right\rbrace \end{bmatrix}\\ {\bf{U}}_{kl} & = & \begin{bmatrix} Re\left\lbrace{\bf{H}}_{kl}^H{\bf{D}}_{kl}{\bf{P}}_{kl}\right\rbrace \\ Im\left\lbrace{\bf{H}}_{kl}^H{\bf{D}}_{kl}{\bf{P}}_{kl}\right\rbrace \end{bmatrix}. \end{eqnarray} Substituting (\ref{AppendixBReal1})-(\ref{AppendixBReal2}) and (\ref{AppendixBshort}) into (\ref{AppendixBFIM2}) we obtain \begin{equation} {\mathcal{I}}({\mbox{\boldmath $\psi$}}) = \frac{2}{\sigma^2}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Re\left\lbrace{\bf{P}}_{kl}^H{\bf{D}}_{kl}^H{\bf{D}}_{kl}{\bf{P}}_{kl}\right\rbrace-{\bf{T}}_{kl}{\bf{Y}}_{kl}^{-1}{\bf{U}}_{kl}. \end{equation} Using identities (\ref{CompMatIdnt1}) and (\ref{CompMatIdnt2}) the FIM can be written as \begin{eqnarray} \label{AppendixBFIM3} {\mathcal{I}}({\mbox{\boldmath $\psi$}}) & = & \frac{2}{\sigma^2}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Re\left\lbrace{\bf{P}}_{kl}^H{\bf{D}}_{kl}^H{\bf{D}}_{kl}{\bf{P}}_{kl}\right. \\ &-& \left. {\bf{P}}_{kl}^H{\bf{D}}_{kl}^H{\bf{H}}_{kl}\left({\bf{H}}_{kl}^H{\bf{H}}_{kl}\right)^{-1} {\bf{H}}_{kl}^H{\bf{D}}_{kl}{\bf{P}}_{kl}\right\rbrace \nonumber \\ & = & \frac{2}{\sigma^2}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Re\left\lbrace{\bf{P}}_{kl}^H{\bf{D}}_{kl}^H\Pi_{{\bf{H}}_{kl}}^{\perp}{\bf{D}}_{kl}{\bf{P}}_{kl}\right\rbrace \nonumber\\ & = & \frac{2}{\sigma^2}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}Re\left\lbrace{\bf{D}}_{kl}^H\Pi_{{\bf{H}}_{kl}}^{\perp}{\bf{D}}_{kl} \right. \nonumber\\ &\odot& \left.\left({\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H \otimes {\bf{1}}_{P \times P}\right)^T\right\rbrace \nonumber \end{eqnarray} where \begin{equation} \Pi_{{\bf{H}}_{kl}}^{\perp} = {\bf{I}}_{L_rN} - {\bf{H}}_{kl}\left({\bf{H}}_{kl}^H{\bf{H}}_{kl}\right)^{-1}{\bf{H}}_{kl}^H \end{equation} and ${\bf{1}}_{P \times P}$ is a $P \times P$ all-ones matrix. An inverse of (\ref{AppendixBFIM3}) results in the CRLB expression in (\ref{FIMdetFinal}). \section{} \label{AppendixCA} This appendix shows that the $kl$th summand in (\ref{StochLogLikeEst}) has a finite variance. Consider a $kl$th summand in (\ref{StochLogLikeEst}) \begin{equation} \label{AppCklStoch} \mbox{${\cal L}$}_{s_{kl}} = \frac{1}{M_tM_rL_r}\left( \log\left|\hat{{\bf{R}}}_{kl}\right| + Tr \left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{r}}_{kl} {\bf{r}}_{kl}^H\right\rbrace\right). \end{equation} Only the trace term in (\ref{AppCklStoch}) is random, thus the variance of $\mbox{${\cal L}$}_{s_{kl}}$ is \begin{equation} \begin{split} var\left[\mbox{${\cal L}$}_{s_{kl}}\right] =& var\left[\frac{1}{M_tM_rL_r}Tr \left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{r}}_{kl} {\bf{r}}_{kl}^H\right\rbrace\right]\\ =& var\left[\frac{1}{M_tM_rL_r}{\bf{r}}_{kl}^H \hat{{\bf{R}}}_{kl}^{-1} {\bf{r}}_{kl}\right] \end{split} \end{equation} where to obtain the last identity the cyclic property of the trace operator was used. Using the expression for the variance of the quadratic form in (\ref{QuadFromVar}) \begin{equation} \label{AppCStochVar1} var\left[\mbox{${\cal L}$}_{s_{kl}}\right] = \frac{2}{(M_tM_rL_r)^2}Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{R}}_{kl}\hat{{\bf{R}}}_{kl}^{-1} {\bf{R}}_{kl}\right\rbrace. \end{equation} Further in order to obtain an upper bound on the variance, the matrix trace inequality (\ref{TraceMatrixInequality}) can be applied to the trace in (\ref{AppCStochVar1}) yielding \begin{equation} \label{AppCStochVar2} var\left[\mbox{${\cal L}$}_{s_{kl}}\right] \leq \frac{2}{(M_tM_r)^2} \left( Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1} {\bf{R}}_{kl}\right\rbrace\right)^2. \end{equation} Let $\hat{\nu}_{kl_{max}}$ and $\nu_{kl_{max}}$ be the largest eigenvalues of the matrices $\hat{{\bf{R}}}_{kl}^{-1}$ and ${\bf{R}}_{kl}$ respectively. Applying the Von Neumanns inequality from (\ref{VonNeumannInq}) to the trace in (\ref{AppCStochVar2}), another bound on the variance of $\mbox{${\cal L}$}_{s_{kl}}$ can be obtained \begin{equation} var\left[\mbox{${\cal L}$}_{s_{kl}}\right] \leq \frac{2}{(M_tM_rL_r)^2} \left(N\hat{\nu}_{kl_{max}} \nu_{kl_{max}} \right)^2. \end{equation} Since the matrices $\hat{{\bf{R}}}_{kl}$ and ${\bf{R}}_{kl}$ are positive definite the eigenvalues $\hat{\nu}_{kl_{max}}$ and $\nu_{kl_{max}}$ have to be finite, which leads to the variance of $\mbox{${\cal L}$}_{s_{kl}}$ being finite. \section{} \label{AppStochLr} This appendix verifies (\ref{LargeLrStochLL}). Using (\ref{Model3}) in (\ref{StochLogLikeEst}) \begin{equation} \begin{split} \mbox{${\cal L}$}_s&\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right) = \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[\log\left|\hat{{\bf{R}}}_{kl}\right| \right.\\ +& Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1}{\bf{e}}_{kl}{\bf{e}}_{kl}^H\right\rbrace + 2Re\left\lbrace Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\bf{e}}_{kl}^H\right\rbrace\cbr \\ + &\left. Tr\left\lbrace{\bf{H}}_{kl}^H\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H\right\rbrace\right] \label{StochLogLikeEstLr1} \end{split} \end{equation} By the definition of a trace operator the second, the third, and the fourth terms of the function in (\ref{StochLogLikeEstLr1}) can be written as summations \begin{equation} \label{StochLogLikeEstLr2} \begin{split} \mbox{${\cal L}$}_s&\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right) = \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[\log\left|\hat{{\bf{R}}}_{kl}\right| \right.\\ & + \sum_{i=1}^{L_rN}\sum_{j=1}^{L_rN}\left[\hat{{\bf{R}}}_{kl}^{-1}\right]_{ij}({\bf{e}}_{kl}^H)_{i}({\bf{e}}_{kl})_j \\ & + 2\sum_{i=1}^{L_rN}\sum_{j=1}^Q Re\left\lbrace\left[\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}\right]_{ij}({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right\rbrace \\ & + \left.\sum_{i=1}^Q\sum_{j=1}^Q \left[{\bf{H}}_{kl}^H\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}\right]_{ij}({\mbox{\boldmath $\alpha$}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right] \end{split} \end{equation} The first term in (\ref{StochLogLikeEstLr2}) is deterministic, while the second, the third and the fourth terms depend on the random targets' reflectivities and the noise. Letting $L_r \rightarrow \infty$ Kolmogorov's strong law of large numbers \cite{Papoulis} can be applied to the second and the third terms in (\ref{StochLogLikeEstLr2}) yielding \begin{equation} \label{term2KSL} \begin{split} \sum_{i=1}^{L_rN}&\sum_{j=1}^{L_rN}\left[\hat{{\bf{R}}}_{kl}^{-1}\right]_{ij}({\bf{e}}_{kl}^H)_{i}({\bf{e}}_{kl})_j\\ \xrightarrow{a.s.}&E\left[\sum_{i=1}^{L_rN}\sum_{j=1}^{L_rN} \left[\hat{{\bf{R}}}_{kl}^{-1}\right]_{ij}({\bf{e}}_{kl}^H)_{i}({\bf{e}}_{kl})_j \right] \\ = & \sum_{i=1}^{L_rN}\sum_{j=1}^{L_rN} \left[\hat{{\bf{R}}}_{kl}^{-1}\right]_{ij} E\left[({\bf{e}}_{kl}^H)_{i}({\bf{e}}_{kl})_j \right]\\ = & \sum_{i=1}^{L_rN} \left[\hat{{\bf{R}}}_{kl}^{-1}\right]_{ii} \sigma^2 = Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1}\right\rbrace\sigma^2 \end{split} \end{equation} and \begin{equation} \label{term3KSL} \begin{split} \sum_{i=1}^{L_rN}&\sum_{j=1}^Q Re\left\lbrace\left[\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}\right]_{ij}({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right\rbrace \\ \xrightarrow{a.s.}& E\left[\sum_{i=1}^{L_rN}\sum_{j=1}^Q Re\left\lbrace\left[\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}\right]_{ij}({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right\rbrace\right] \\ =& \sum_{i=1}^{L_rN}\sum_{j=1}^Q Re\left\lbrace\left[\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}\right]_{ij} E\left[({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right]\right\rbrace = 0 \end{split} \end{equation} where (\ref{term3KSL}) follows from the independence of the noise and the targets' reflectivities. However Kolmogorov's strong law of large numbers cannot be applied to the fourth term in (\ref{StochLogLikeEstLr2}) since there is no summation over $L_r$. Therefore as $L_r$ approaches infinity, $\mbox{${\cal L}$}_s\left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right)$ does not approach the expected value in (\ref{mle_stoch_app_asymptotic}) \begin{equation} \label{LargeLrTrace3} \begin{split} \mbox{${\cal L}$}_s & \left(\hat{{\mbox{\boldmath $\psi$}}}, \hat{{\bf{A}}}, \hat{\sigma}^2\right) \xrightarrow{a.s.} \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[\log\left|\hat{{\bf{R}}}_{kl}\right| \right. \\ & \qquad\qquad + \left.\sigma^2 Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1}\right\rbrace + {\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H\hat{{\bf{R}}}_{kl}^{-1}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\right] \\ & = \frac{1}{M_rM_tL_r}\sum_{l=1}^{M_r}\sum_{k=1}^{M_t}\left[\log\left|\hat{{\bf{R}}}_{kl}\right| \right.\\ & \qquad\qquad + \left. Tr\left\lbrace\hat{{\bf{R}}}_{kl}^{-1}\left({\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H + \sigma^2{\bf{I}}\right)\right\rbrace\right] \end{split} \end{equation} \section{} \label{AppendixDA} This appendix verifies that the variance of the $kl$th term in (\ref{MLdetEst}) is bounded. Consider a $kl$th summand in (\ref{MLdetEst}) \begin{equation} \label{AppenD1} \begin{split} F_{kl} &= \frac{1}{L_rNM_tM_r}Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{r}}_{kl}{\bf{r}}_{kl}^H\right\rbrace \\ &= \frac{1}{L_rNM_tM_r}{\bf{r}}_{kl}^H\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{r}}_{kl} \end{split} \end{equation} Under the deterministic signal model assumption the vector ${\bf{r}}_{kl}$ has the mean ${\mbox{\boldmath $\mu$}}_{kl}={\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}$ and the covariance matrix ${\bf{R}}_{kl} = \sigma^2{\bf{I}}_{L_rN}$. Using the expression for the variance of the quadratic form in (\ref{QuadFromVar2}) \begin{equation} \begin{split} var&[{\bf{r}}_{kl}^H\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{r}}_{kl}] = Tr \left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{R}}_{kl} \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{R}}_{kl}\right\rbrace\\ & \qquad\qquad\qquad + 2{\mbox{\boldmath $\mu$}}_{kl}^H \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{R}}_{kl} \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}{\mbox{\boldmath $\mu$}}_{kl}\\ & = \sigma^4 Tr \left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right\rbrace + \sigma^2{\mbox{\boldmath $\mu$}}_{kl}^H \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\mbox{\boldmath $\mu$}}_{kl}\\ & = \sigma^4 (L_rN-Q) + \sigma^2Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\mbox{\boldmath $\mu$}}_{kl}{\mbox{\boldmath $\mu$}}_{kl}^H\right\rbrace \label{AppendixDvar} \end{split} \end{equation} where the last identity follows since the trace of the orthogonal projection matrix is equal to its rank $Tr \left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right\rbrace = L_rN-Q$. In order to show that the variance in (\ref{AppendixDvar}) is bounded we first state a number of inequalities. Since the propagation loss coefficient $\zeta_{kl}^q$ is always positive and smaller than one, and the norm of the temporal steering vector ${\bf{b}}_{kl}^q$ according to Assumption 1 is $\frac{E}{M_tL_t}$, the following inequality holds for $Q$ targets and the $kl$th transmit-to-receive array path \begin{equation} \label{AppC1} \begin{split} &Tr\left\lbrace{\bf{H}}_{kl}^H{\bf{H}}_{kl}\right\rbrace = \sum_{q=1}^Q ({\bf{h}}_{kl}^q)^H{\bf{h}}_{kl}^q \\&= \sum_{q=1}^Q (\zeta_{kl}^q)^2\left(({\bf{a}}_{rl}^q)^H{\bf{a}}_{rl}^q\right)\left(({\bf{b}}_{kl}^q)^H{\bf{b}}_{kl}^q\right)\vert{\bf{w}}_k^H{\bf{a}}_{tk}^q\vert^2 \leq QE\frac{L_tL_r}{M_t}. \end{split} \end{equation} If the magnitudes of the targets' reflection ceofficients are bounded such that $\vert\alpha_{kl}^q\vert^2\leq \vert\alpha_{max}\vert^2$, $\forall k,l,q$ then \begin{equation} \label{AppC2} Tr\left\lbrace{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H\right\rbrace \leq Q \vert\alpha_{max}\vert^2. \end{equation} Combining (\ref{AppC1}) and (\ref{AppC2}) and using the matrix trace inequality in (\ref{TraceMatrixInequality}) yields: \begin{equation} \label{AppC3} \begin{split} Tr\left\lbrace{\mbox{\boldmath $\mu$}}_{kl}{\mbox{\boldmath $\mu$}}_{kl}^H\right\rbrace &= Tr\left\lbrace{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H\right\rbrace \\ &\leq Tr\left\lbrace{\bf{H}}_{kl}^H{\bf{H}}_{kl}\right\rbrace Tr\left\lbrace{\mbox{\boldmath $\alpha$}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}^H\right\rbrace \\ &= Q^2E\frac{L_tL_r}{M_t}\vert\alpha_{max}\vert^2. \end{split} \end{equation} Applying the matrix trace inequality in (\ref{TraceMatrixInequality}) to the trace in (\ref{AppendixDvar}) and then using (\ref{AppC3}), the bound on the variance of $F_{kl}$ follows \begin{equation} \begin{split} var[F_{kl}] &\leq \frac{\sigma^4 (L_rN-Q) + \sigma^2 Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right\rbrace Tr\left\lbrace{\mbox{\boldmath $\mu$}}_{kl}{\mbox{\boldmath $\mu$}}_{kl}^H\right\rbrace}{(L_rNM_tM_r)^2} \\ &\leq \frac{\sigma^2(L_rN-Q)}{(L_rNM_tM_r)^2}\left(\sigma^2 +Q^2E\frac{L_tL_r}{M_t}\vert\alpha_{max}\vert^2 \right) < \infty. \end{split} \end{equation} \section{} \label{AppendixDB} Verification that $F(\hat{{\mbox{\boldmath $\psi$}}})$ in (\ref{MLdetEst}) converges to (\ref{AsympDet1}) as $L_r\rightarrow \infty$. Using (\ref{Model3}) in (\ref{MLdetEst}) the function $F(\hat{{\mbox{\boldmath $\psi$}}})$ can be written as \begin{equation} \begin{split} F(\hat{{\mbox{\boldmath $\psi$}}}) &= \frac{1}{L_rNM_tM_r} \sum_{l=1}^{M_r} \sum_{k=1}^{M_t}\left[{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\right. \\ &+ \left.{\bf{e}}_{kl}^H \Pi_{\hat{{\bf{H}}}_{kl}}^{\perp} {\bf{e}}_{kl} + 2Re\left\lbrace{\bf{e}}_{kl}^H\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\right\rbrace\right] \end{split} \label{LargeLrTraceDet} \end{equation} By the definition of the trace operator \begin{equation} \label{LargeLrTraceDet2} \begin{split} F(\hat{{\mbox{\boldmath $\psi$}}}) & = \frac{1}{L_rNM_tM_r} \sum_{l=1}^{M_r} \sum_{k=1}^{M_t} \left[\vphantom{\left\lbrace\sum_{i=1}^{L_rN}\right\rbrace}{\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl}\right.\\ & + \sum_{i=1}^{L_rN}\sum_{j=1}^{L_rN} \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij} ({\bf{e}}_{kl}^H)_i ({\bf{e}}_{kl})_j \\ & + \left.2Re\left\lbrace\sum_{i=1}^{L_rN}\sum_{j=1}^Q \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij}({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right\rbrace\right] \end{split} \end{equation} Note that in (\ref{LargeLrTraceDet2}) only the second and the third terms are random variables since they depend on the noise vector ${\bf{e}}_{kl}$ and according to the deterministic signal model the targets' reflectivities ${\mbox{\boldmath $\alpha$}}_{kl}$ are non-random. By letting $L_r \rightarrow \infty$, Kolmogorov's strong law of large numbers can be applied to the second and the third terms in (\ref{LargeLrTraceDet2}) yielding \begin{equation} \begin{split} \sum_{i=1}^{L_rN}&\sum_{j=1}^{L_rN} \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij} ({\bf{e}}_{kl}^H)_i ({\bf{e}}_{kl})_j \\ \xrightarrow{a.s.} & E\left[ \sum_{i=1}^{L_rN}\sum_{j=1}^{L_rN} \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij} ({\bf{e}}_{kl}^H)_i ({\bf{e}}_{kl})_j\right] \\ = & \sum_{i=1}^{L_rN}\sum_{j=1}^{L_rN} \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij} E\left[({\bf{e}}_{kl}^H)_i ({\bf{e}}_{kl})_j\right] \\ = & \sigma^2 Tr\left\lbrace\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right\rbrace = \sigma^2(L_rN-Q) \\ \end{split} \end{equation} and \begin{equation} \begin{split} \sum_{i=1}^{L_rN}&\sum_{j=1}^Q \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij}({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j \\ \xrightarrow{a.s.}& E\left[\sum_{i=1}^{L_rN}\sum_{j=1}^Q \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij}({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right] \\ = & \sum_{i=1}^{L_rN}\sum_{j=1}^Q \left[\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}\right]_{ij}E\left[({\bf{e}}_{kl}^H)_i({\mbox{\boldmath $\alpha$}}_{kl})_j\right] = 0 \end{split} \end{equation} Thus as $L_r$ approaches infinity $F(\hat{{\mbox{\boldmath $\psi$}}})$ converges to the expected value \begin{equation} \begin{split} F(\hat{{\mbox{\boldmath $\psi$}}}) \xrightarrow{a.s.}& \frac{\sigma^2(L_rN-Q)}{L_rN} \\ +& \frac{1}{L_rNM_tM_r} \sum_{l=1}^{M_r} \sum_{k=1}^{M_t} {\mbox{\boldmath $\alpha$}}_{kl}^H{\bf{H}}_{kl}^H\Pi_{\hat{{\bf{H}}}_{kl}}^{\perp}{\bf{H}}_{kl}{\mbox{\boldmath $\alpha$}}_{kl} \end{split} \end{equation} \section{Useful Identities and Inequalities} \label{Inequalities} \begin{itemize} \item \textit{Vectorization operator} \cite{Stoica2} \begin{eqnarray} \label{vec1} Tr\left\lbrace{\bf{A}}{\bf{B}}\right\rbrace = (vec({\bf{A}}^H))^H vec({\bf{B}})\\ \label{vec2} vec({\bf{A}}{\bf{B}}{\bf{C}}) = ({\bf{C}}^T \otimes {\bf{A}}) vec({\bf{B}}). \end{eqnarray} \item For a nonsingular complex matrix ${\bf{A}}$ and its inverse ${\bf{B}}={\bf{A}}^{-1}$ the following identity was shown to hold in \cite{StoicaNehorai2} \begin{equation} \label{CompMatIdnt1} \begin{bmatrix} Re\left\lbrace{\bf{A}}\right\rbrace & - Im\left\lbrace{\bf{A}}\right\rbrace \\ Im\left\lbrace{\bf{A}}\right\rbrace & Re\left\lbrace{\bf{A}}\right\rbrace \end{bmatrix}^{-1} = \begin{bmatrix} Re\left\lbrace{\bf{B}}\right\rbrace & - Im\left\lbrace{\bf{B}}\right\rbrace \\ Im\left\lbrace{\bf{B}}\right\rbrace & Re\left\lbrace{\bf{B}}\right\rbrace \end{bmatrix}. \end{equation} \item For complex matrices ${\bf{A}}$, ${\bf{B}}$ and ${\bf{C}}$ it can be verified that \cite{StoicaNehorai2} \begin{equation} \label{CompMatIdnt2} \begin{split} &\begin{bmatrix} Re\left\lbrace {\bf{A}} \right\rbrace & -Im\left\lbrace{\bf{A}}\right\rbrace \end{bmatrix} \begin{bmatrix} Re \left\lbrace {\bf{B}} \right\rbrace & -Im\left\lbrace {\bf{B}} \right\rbrace \\ Im \left\lbrace {\bf{B}} \right\rbrace & Re\left\lbrace {\bf{B}} \right\rbrace \end{bmatrix} \begin{bmatrix} Re \left\lbrace {\bf{C}} \right\rbrace \\ Im \left\lbrace {\bf{C}} \right\rbrace \end{bmatrix}\\ & = Re \left\lbrace {\bf{A}}{\bf{B}}{\bf{C}} \right\rbrace. \end{split} \end{equation} \item \textit{Expected value and variance of a quadratic form} \cite{Sultan}. For an $n$-dimensional complex Gaussian random vector ${\bf{x}}$ with a zero-mean and a covariance matrix $\Sigma$, and a Hermitian matrix ${\bf{A}}$ \begin{align} E\left[{\bf{x}}^H{\bf{A}}{\bf{x}}\right] & = Tr\left\lbrace{\bf{A}}\Sigma\right\rbrace\\ E\left[({\bf{x}}^H{\bf{A}}{\bf{x}})^2\right] & = Tr\left\lbrace{\bf{A}}\Sigma{\bf{A}}\Sigma\right\rbrace + \left(Tr\left\lbrace{\bf{A}}\Sigma\right\rbrace\right)^2 \end{align} thus \begin{equation} \label{QuadFromVar} var\left[{\bf{x}}^H{\bf{A}}{\bf{x}}\right] = 2Tr\left\lbrace{\bf{A}}\Sigma{\bf{A}}\Sigma\right\rbrace. \end{equation} It can be shown that if ${\bf{x}}$ has a mean ${\mbox{\boldmath $\mu$}}$ and covariance matrix $\Sigma$ then \begin{align} E\left[{\bf{x}}^H{\bf{A}}{\bf{x}}\right] & = Tr\left\lbrace{\bf{A}}\Sigma\right\rbrace + {\mbox{\boldmath $\mu$}}^H{\bf{A}}{\mbox{\boldmath $\mu$}}\\ var\left[{\bf{x}}^H{\bf{A}}{\bf{x}}\right] & = Tr\left\lbrace{\bf{A}}\Sigma{\bf{A}}\Sigma\right\rbrace + 2{\mbox{\boldmath $\mu$}}^H{\bf{A}}\Sigma{\bf{A}}{\mbox{\boldmath $\mu$}} \label{QuadFromVar2} \end{align} \item \textit{A matrix trace inequality} \cite{Yang}. For the positive semidefinite matrices ${\bf{A}}$ and ${\bf{B}}$\\ \begin{equation} \label{TraceMatrixInequality} Tr\left\lbrace {\bf{A}}{\bf{B}} \right\rbrace \leq \left( Tr\left\lbrace {\bf{A}} \right\rbrace^2 Tr\left\lbrace {\bf{B}} \right\rbrace^2 \right)^{1/2}. \end{equation} \item \textit{Von Neumann's trace inequality} \cite{Mirsky}. For $m\times m$ matrices ${\bf{A}}$ and ${\bf{B}}$ with singular values $\alpha_1\geq\alpha_2\geq\ldots\geq\alpha_n$ and $\beta_1\geq\beta_2\geq\ldots\geq\beta_n$ respectively\\ \begin{equation} \label{VonNeumannInq} \left|Tr\left\lbrace{\bf{A}}{\bf{B}}\right\rbrace\right|\leq\sum_{i=1}^n\alpha_i\beta_i \leq n\alpha_1\beta_1. \end{equation} \item For any arbitrary given $n \times n$ positive definite matrix ${\bf{A}}$, the inequality below holds for any positive definite $n \times n$ matrix ${\bf{B}}$ \cite{StoicaNehorai3} \begin{equation} \label{StoicasInequality} \ln\det{{\bf{B}}}+Tr\left\lbrace{\bf{B}}^{-1}{\bf{A}}\right\rbrace \geq n + \ln\det{{\bf{A}}}. \end{equation} \end{itemize}
{'timestamp': '2016-06-17T02:05:17', 'yymm': '1606', 'arxiv_id': '1606.05043', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05043'}
arxiv
\section{Introduction}\label{sec:intro} One of the primary contributors to global mobile traffic growth is the increasing number of wireless devices that are accessing mobile networks. Over half a billion (526 million) mobile devices and connections were added in 2013 and the overall mobile data traffic is expected to grow to 15.9 exabytes per month by 2018, nearly an 11-fold increase over 2013~\cite{Cis14}. In order to address this issue, a recent trend in 3GPP is to utilize both the licensed and unlicensed spectrum simultaneously for extending available system bandwidth. In this context, LTE in unlicensed spectrum, referred to as LTE-U, is proposed to enable mobile operators to offload data traffic onto unlicensed frequencies more efficiently and effectively, and provides high performance and seamless user experience~\cite{RML+15}. Integration of unlicensed bands is also considered as one of the key enablers for 5G cellular systems~\cite{Sam15}. However, unlike the typical operation in licensed bands, where operating base stations (BS) have exclusive access to spectrum and therefore are able to coordinate by exchanging of signaling to mitigate mutual interference, such a multi-standard and multi-operator spectrum sharing scenario imposes significant challenges on coexistence in terms of interference mitigation. \begin{figure} [t] \centering \includegraphics[width=6cm, angle =0]{Multi-RAT.eps} \caption{Coexistence scenario in 60 GHz deployment with beamforming} \label{figworstcase} \end{figure} Licensed Assisted Access (LAA) with listen-before-talk (LBT) protocol has been proposed for the current coexistence mechanism of LTE-U~\cite{Jeo15}. For coexistence in 5G, one of the major issues is that the use of highly directional antennas as one of the key enablers for 5G networks \cite{TSR13,Maz15} becomes problematic for the current coexistence mechanisms where omni-directional antennas were mostly assumed. For example, transmission by a different nearby 5G BS or WiGig access Point (AP) may not be detected due to the narrow beam that has been used, resulting a transmission that causes excessive interference to the victim user equipment (UE), e.g., UEs in the central area as illustrated in Fig.~\ref{figworstcase}. In this regard, the simultaneous transmission should be coordinated and exploited fully to greatly enhance the network capacity. Such a mechanism is referred as beam scheduling. There has been some related work on this topic based on TDMA \cite{AH08,PKW+09} and a concept of exclusive region is introduced in \cite{CSM10} to enable concurrent transmission with significant interference reduction. However, the effect of interference aggregation is not captured. Other approaches are proposed based on centralized coordination in \cite{GSA+10,SMM10}, where the access points are coordinated in a centralized manner to reduce interferences and improve network capacity. In this paper, we consider a multi-RAT deployment where 5G BSs and other 60GHz APs, e.g., WiGig APs, co-exist, all transmitting via beamforming. We form a scheduled beam sequence containing the indices of the beams used at different time slots, and formulate an optimization problem to find the optimal scheduled beam sequence to maximize the spectral efficiency of the entire network. It is known that such a combinatorial problem is NP-hard and highly computationally costly when using exhaustive search \cite{LT15}. We therefore further propose a novel distributed learning algorithm where different BSs cooperatively and iteratively update the beam sequences such that near maximum spectral efficiency is achieved. It is shown that the proposed algorithm almost achieves comparable spectral efficiency to that using the exhaustive search, while at the same time having a much reduced complexity and signaling overhead. It should be noted that the proposed algorithm and analysis are general and can be easily applied to other bands, such as 28 GHz. The rest of the paper is organized as follows. System model will be introduced in the next section and the optimization problem is formulated in section III. In section IV, we detail the proposed distributed learning algorithm and compare its complexity with that using exhaustive search and distributed greedy scheduling. Simulation results are presented in section V and Section VI concludes the paper. \section{System Model}\label{sysmodel} In this paper, we assume that both 5G BSs and co-existing APs employ beamforming to tackle the increased path loss in 60 GHz band. From now on, we do not differentiate 5G BS and co-existing AP and refer to them as 5G AP for simplicity. We also assume that each 5G AP is only able to transmit data using a single beam at a time for simplicity and the mechanism considered here can be extended to the multi-beam case. We assume a coexistence deployment scenario with $N$ 5G APs, which could either be 5G BSs or co-existing APs or a mixture of both, and $M$ associated UEs for every AP. Each 5G AP has $N_t$ transmit antennas, whilst each UE has one receive antenna. At a given time, the $n$th ($n=1,\dots, N$) 5G AP transmits to the $m$th ($m=1,\cdots, M$) UE using a beam $\mathbf{w}_{nm}$, where $\mathbf{w}_{nm}$ is vector with length $N_t$. To obtain the beamforming vector $\mathbf{w}_{nm}$, we assume that the 5G AP selects the beam configuration within a predefined beam codebook with cardinality $C$ that uniformly covers the azimuth directions around the AP. In particular, the codebooks at the transmitter are formed by vectors $\{\mathbf{v}_{1}, \cdots, \mathbf{v}_{C}\}$, with the $i$th length-$N_t$ vector $\mathbf{v}_i$ denoting the beam for the $i$th codebook entry. The $n$th AP selects the $\hat{i}$th entry in the codebook according to \begin{equation} \hat{i} = \arg\!\max_{i=1,\cdots, C}\left|\mathbf{v}_i^T\mathbf{h}_{mn}\right|^2 \end{equation} and \begin{equation} \mathbf{w}_{nm} = \mathbf{v}_{\hat{i}}. \end{equation} We define a scheduling cycle with duration of $M$ time slots. Within each scheduling cycle, we consider scheduling the beams for $M$ UEs associated with a particular 5G AP, for example, the $n$th AP. Suppose at a given time slot $m$ ($m=1,\cdots, M$), this AP is transmitting to only one of the UEs via one beam in a round robin manner, which could be any one of the beams from $\mathbf{w}_{n1}, \cdots, \mathbf{w}_{nM}$, indexed as beam $1, \cdots, M$. During one scheduling cycle, the indices of the transmitted beams therefore form a beam sequence vector with a length $M$, denoted as $\mathbf{b}_n(t) = [b_{n1}(t), \cdots, b_{nM}(t)]^T$, where $b_{nm}(t)\in [1,\cdots, M]$. It is known that there are $\prod_{m=1}^Mm = M!$ permutations of such beam sequences, whereas there may exist only one optimal sequence given particular network criterion. This paper therefore aims at finding an optimal $\mathbf{b}_n(t)$ for the $n$th 5G AP, such that certain utility function is optimized in every scheduling cycle. In particular, we consider using the spectral efficiency as the utility function and aim to find an optimal beam sequence that maximizes the spectral efficiency. \section{Problem Formulation} Let $\mathcal{B}$ denote the set that contains all $M!$ possible beam sequences. The mathematical description of the problem is given by \begin{equation} \hat{\mathbf{b}}_n = \arg\!\max_{\mathbf{b}_n\in \mathcal{B}}U(\mathbf{b}_n) \label{opt_problem} \end{equation} where $U(\mathbf{b}_n)$ is a utility function obtained when the sequence $\mathbf{b}_n$ is chosen as the beam sequence within one scheduling cycle with duration of $M$ time slot. When spectral efficiency is considered, the utility function for the entire scheduling cycle is given by \begin{equation} U(\mathbf{b}_n) = \frac{1}{M}\sum_{m=1}^MU(b_{nm}) \end{equation} where $U(b_{nm})$ is the utility function for the $m$th user. We then consider the problem of finding the optimal $\hat{\mathbf{b}}_n$ such that the average spectral efficiency is maximized. \subsection{Derivation of Spectral Efficiency} We now show the derivation of spectral efficiency $U(b_{nm})$. Suppose at a given time slot, the $m$th UE is scheduled and the 5G AP is transmitting via beam $\mathbf{w}_{nm}$. The spectral efficiency for the given time slot can be expressed as \cite{FM15} \begin{equation} U(b_{nm}) = \log_2\left(1+\frac{P_r(n,m)}{I(m)+N(m)}\right) \label{untifunc} \end{equation} where $P_r(n, m)$ is the received signal power at the scheduled UE $m$, and $I(m)$ and $N(m)$ are the interference and noise term, respectively. The received signal power is given by \begin{equation} P_r(n,m)(dB) = P_{n} + G_{n}(m) - PL(d) \end{equation} where $P_{n}$ and $G_{n}(m)$ are the transmission power and beamforming gain at the $n$th 5G AP. In this paper we consider a constant transmission power, given by $P_{n} = \frac{P_{total}}{B}$, where $B$ is the bandwidth. In addition, the beamforming gain at the $n$th 5G AP $G_{n}(m)$ is calculated as \begin{equation} G_{n}(m) = \left|\mathbf{w}^H_{nm}\mathbf{h}_{nm}\right|^2 \end{equation} where $\mathbf{h}_{nm}$ is the channel between the $n$th base station to the scheduled UE given in \cite{FM15} as \begin{equation}\label{hnm} \mathbf{h}_{nm} = \sqrt{\frac{N}{L}}\sum_{l=1}^L\alpha_l\mathbf{a}_{UE}\left(\gamma_{l}^{UE}\right)\mathbf{a}^*_{AP}\left(\gamma_{l}^{AP}\right). \end{equation} In (\ref{hnm}), $\alpha_l$ is the complex gain of the $l$th path, $\gamma_{l}^{UE}$ and $\gamma_{l}^{AP} \in [0, 2\pi]$ are the uniformly distributed random variables representing the angles of arrival and departure, respectively, and $\mathbf{a}_{UE}$ and $\mathbf{a}_{AP}$ are the antenna array responses at the UEs and 5G APs, respectively. Assuming uniform linear arrays, $\mathbf{a}_{AP}$ can be written as \begin{equation} \mathbf{a}_{AP} = \frac{1}{\sqrt{N_{AP}}}\left[1, \cdots, e^{j(N_{AP}-1)\frac{2\pi}{\lambda}D\sin(\gamma_l^{AP})}\right]^T\nonumber. \end{equation} For single antenna UE, we have \begin{equation} \mathbf{a}_{UE} = 1\nonumber. \end{equation} Lastly, $PL(d)$ is the path loss component between the $n$th 5G AP and the $m$th user, which is a function of the distance $d$ between two nodes. We now look at the interference term given in (5), which is given by \begin{equation} I(m) = \sum_{n'=1\atop n'\neq n}^{N}P_r(n',m) \end{equation} where $P_r(n',m)$ is calculated in the same manner as $P_r(n,m)$. The noise term $N(m)$ in (5) is simply white Gaussian noise, given by \begin{equation} N(m) = K_BTB \end{equation} where $K_B$ is the Boltzmann constant and $T$ is the noise temperature. Having obtained the spectral efficiency, the optimization problem given in (\ref{opt_problem}) can then be solved and the optimal beam sequence can be found. One could perform an exhaustive search in the finite set of possible beam sequences, known to yield a high computational complexity. In the following section, we propose a novel distributed learning algorithm to solve the optimization problem, which is shown to yield comparable performance than that using exhaustive search, while achieving a much reduced complexity. \section{Beam Scheduling Algorithms} We first present a distributed greedy scheduling mechanism, followed by a detailed description of the distributed learning algorithm. \subsection{Distributed Greedy Scheduling} In the distributed greedy scheduling algorithm, at the beginning of each scheduling cycle, $\mathbf{b}_n$ is randomly chosen from the $M!$ possible permutation sequences for each 5G AP. A block-coordinate optimization algorithm is then applied to maximize the individual utility function of each 5G AP sequentially \cite{MHC15}. Different from exhaustive search, where a global optimization is reached and maximum spectral efficiency is achieved for all BSs, the distributed greedy scheduling mechanism maximizes the utility function with respect to $\mathbf{b}_n$ while keeping other $\mathbf{b}_i (i\neq n)$ unchanged. In other words, the $n$th 5G AP computes the utility functions for all possible permutations of $\mathbf{b}_n$, and then greedily selects the sequence that yields the maximum utility value, i.e., spectrum efficiency, for itself, assuming the first $(n-1)$ 5G APs are using the optimal sequences obtained in the previous selection process. The process continues until it reaches the last 5G AP, which completes one iteration of greedy selection. The same iteration will be repeated $N_{DG}$ times until a scheduling decision is made. \subsection{Distributed Learning Scheduling} In this section, we propose a distributed learning algorithm for beam scheduling. In the proposed learning algorithm, we allocate each sequence a probability at the beginning of each scheduling cycle and then update the probability and utility functions of the sequences iteratively. The optimal beam sequence is then selected at the end of the learning procedure according to such a probability. Such a learning algorithm is detailed as follows. Suppose the $k$th ($k\in [1,\cdots, M!]$) beam sequence is selected for 5G AP $n$ at iteration $t$, which we denote as $\mathbf{b}_{nk}^{(t)}\in \mathcal{B}$. At the beginning, i.e., $t=1$, each sequence is assigned with the same probability $p(U(\mathbf{b}_{nk}^{(1)}))=\frac{1}{M!}$, and one sequence $\mathbf{b}_{nk}^{(1)}\in \mathcal{B}$ is randomly selected for the $n$th 5G AP according to this probability. The utility functions are then calculated for each 5G AP. At the end of the $t$th iteration, the probability $p(U(\mathbf{b}_{ni}^{(t+1)}))$ ($1 \leqslant i \leqslant M!$) is updated for the $n$th 5G AP according to \cite{YR08} as \begin{equation} p(U(\mathbf{b}_{ni}^{(t+1)})) = p(U(\mathbf{b}_{ni}^{(t)}))-w\frac{U(\mathbf{b}_{ni}^{(t)})}{U^{max}(t)}p(U(\mathbf{b}_{ni}^{(t)})) \end{equation} subject to $\sum_{i=1}^{M!}p(U(\mathbf{b}_{ni}^{(t+1)}))=1$, where $i \neq k$, $w$ is a weighting factor, and $U^{max}(t)$ is the maximum utility function obtained up to iteration $t$, given by \begin{equation} U^{max}(t) = \max\{U(\mathbf{b}_n^{(1)}), \cdots, U(\mathbf{b}_n^{(t)})\}. \end{equation} For $i=k$, $p(U(\mathbf{b}_{nk}^{(t+1)}))$ is updated as \begin{equation} p(U(\mathbf{b}_{nk}^{(t+1)})) = p(U(\mathbf{b}_{nk}^{(t)}))+w\frac{U(\mathbf{b}_{nk}^{(t)})}{U^{max}(t)}P_n^{sum} \end{equation} where \begin{equation} P_n^{sum} = \sum_{i=1,i \neq k}^{M!}p(U(\mathbf{b}_{ni}^{(t)})) \end{equation} The similar learning procedure is applied to the next 5G AP until it reaches the last one and then the $(t+1)$th iteration starts. Such a learning process continues until the maximum number of iteration $T$ is hit and then the training phase stops. The final probabilities used to choose the optimal sequence for the $n$th 5G AP among all permutations is given by \begin{equation} \hat{k}_n(M) = \arg\!\max_{k\in \{1,\cdots,M!\}}\{p(U(\mathbf{b}_{n}^{(1)})), \cdots, p(U(\mathbf{b}_{n}^{(M!)}))\}. \end{equation} \begin{figure} [t] \centering \includegraphics[scale=0.27]{FlowChart.eps} \caption{Flow chart of the distributed learning scheduling algorithm} \label{figflowchart} \end{figure} A flow chart of the distributed learning scheduling algorithm is given in Fig. \ref{figflowchart}. \subsection{Complexity and Signaling Overhead Analysis} It is known that for exhaustive search, the statistical utility functions need to be computed for all APs and all possible beam sequences, yielding a complexity of $O(\left(M!\right)^N)$, which becomes prohibitive especially with a large number of APs. For the distributed greedy scheduling algorithm, for $N$ APs and $N_{DG}$ iterations, we need to calculate $N_{DG}NM!$ utility functions in total, having a computational complexity of $O(N_{DG}NM!)$. The proposed distributed learning algorithm, on the contrary, computes only one utility function for each 5G AP at a given iteration, yielding a complexity of $O(N_{LE}N)$, which is much smaller than the exhaustive search as well as the distributed greedy scheduling. In addition, as illustrated in the next section, the number of iterations required by the proposed leaning algorithm is also less than that of the greedy ones, i.e., $N_{LE} < N_{DG}$, leading to even less calculations. In terms of signaling overhead, exhaustive search requires global utility function information to be exchanged among all 5G APs, whilst the signaling overhead of the proposed distributed learning scheduling algorithm is similar to the distributed greedy scheduling algorithm since there is no need for exchanging utility function globally. \begin{table} \renewcommand{\arraystretch} {1.3} \caption{Main System Parameters} \label{table1} \centering \begin{tabular}{c c} \hline\hline Parameter & Value \\ \hline Carrier frequency & 60 GHz\\ Total bandwidth & 500MHz \\ Base station Tx power & 30dBm\\ Inter-cell distance & 200 or 400m\\ Number of base station antenna & 8\\ Beam codebook size of base stations & 16\\ Number of base stations & 2 or 10\\ Number of UEs per base station & 3 or 5\\ Number of UE antennas & 1\\ Number of scatters & 3\\ Noise temperature & 300 K\\ \hline \end{tabular} \end{table} \section{Simulations} In this section, we present simulation results obtained based on the scheduling algorithms proposed in the previous section. We assume a total transmission power of $30$ dBm and a total bandwidth of $500$ MHz and the 5G APs distribute the power uniformly over the entire bandwidth. The pathloss model used here is given in \cite{TSR13}. The noise temperature $T$ is taken as the room temperature of $300K$. The detailed system parameters are presented in Table \ref{table1}. \begin{figure} [t] \centering \includegraphics[scale=0.35]{dep1.eps} \caption{Deployment of 2 5G APs (5 UEs per AP) } \label{dep1} \end{figure} Fig. \ref{dep1} shows an example of a deployment scenario with 2 5G APs, each covering 5 UEs. In the figure, UE$_{ij}$ denotes the $j$th UE associated with the $i$th 5G AP. It can be seen that if UE$_{13}$ and UE$_{22}$ are scheduled at the same time, the transmission beam of AP$_{1}$ to UE$_{13}$ will cause interference to UE$_{22}$. Fig. \ref{conv1} illustrates the fluctuation of the utility functions of two APs obtained during the entire learning procedure with weighting factor $w=0.15$. As illustrated, the utility functions rapidly converge to the optimal values in less than 55 learning iterations. The average utility function of two also converges to the maximum at the same pace. \begin{figure} [t] \centering \includegraphics[scale=0.35]{conv1.eps} \caption{Convergence behavior of the distributed learning scheduling algorithm} \label{conv1} \end{figure} The cumulative distribution functions (CDFs) of utility functions for different scheduling algorithms are illustrated in Fig. \ref{CDF1}. For comparison purpose, we present the results obtained by using random selection of permutation sequences. As expected, the exhaustive search algorithm achieves the maximum overall utility function and the performance of the distributed greedy scheduling algorithm is slightly worse than the exhaustive one, which also serves as a performance boundary for all distributed scheduling algorithms. The performance of the proposed distributed learning algorithm is very close to the greed one but with significantly reduced complexity and signaling overhead as aforementioned. When the cell size is changed from 400m to 200m, the performance gap between the distributed greedy scheduling algorithm and the learning algorithm becomes even smaller. \begin{figure} [t] \centering \includegraphics[scale=0.35]{CDF_2BS_400m_new.eps} \caption{CDF of spectrum efficiency (inter-cell distance = 400m)} \label{CDF1} \end{figure} \begin{figure} [t] \centering \includegraphics[scale=0.35]{CDF_2BS_200m_new.eps} \caption{CDF of spectrum efficiency (inter-cell distance = 200m)} \label{CDF2} \end{figure} \begin{figure} [t] \centering \includegraphics[scale=0.35]{Cov_10BS.eps} \caption{Convergence behavior of two scheduling schemes} \label{conv2} \end{figure} Then we increase the number of deployed 5G APs to 10, each covering 3 UEs, and clearly such deployment will result in a higher probability for a UE to receive interferences from other 5G APs. In Fig. \ref{conv2}, the convergence speed of the distributed greedy algorithm and the proposed learning algorithm is compared. Even though the greedy algorithm achieves a higher utility value, the convergence speed of the proposed learning algorithm is much higher (more than 150 iterations less), therefore leading to further reduced complexity. The CDFs of the utility function are illustrated in Fig. \ref{CDF3}. The proposed learning algorithm outperforms the random one and is close to the greedy one. \section{Conclusion and Future Works} In this paper, we propose a novel multi-RAT coexistence mechanism where neighboring 5G and WiGig APs, each serving their own associated UEs, schedule their beams in a distributed manner such that their own utility function, e.g., spectral efficiency, is maximized. The proposed distributed algorithm yields a comparable spectral efficiency for the entire networks as that using exhaustive search, which requires centralized coordination among multi-RAT networks with much higher algorithmic complexity. Our future work will focus on game theoretical analysis of our proposed algorithm with respect to fairness and its convergence properties. \section*{Acknowledgements} The authors would like to thank Francesco Guidolin for his support and assistance with the simulations. The research leading to these results received funding from the European Commission H2020 programme under grant agreement n°671650 (5G PPP mmMAGIC project). \begin{figure} [t] \centering \includegraphics[scale=0.35]{CDF_10BS_400m.eps} \caption{CDF of spectrum efficiency (inter-cell distance = 400m)} \label{CDF3} \end{figure}
{'timestamp': '2016-06-17T02:08:52', 'yymm': '1606', 'arxiv_id': '1606.05135', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05135'}
arxiv
\section{Introduction} In multi-class classification, one observes pairs $(z, y)$ where $y \in \mathcal{Y} \subset \mathbb{R}^p$ are feature vectors, and $z$ are unknown labels, which lie in a countable label set $\mathcal{Z}$. The goal is to construct a classification rule for predicting the label of a new data point; generally, the classification rule $h: \mathcal{Y} \to \mathcal{Z}$ is learned from previously observed data points. In many applications of multi-class classification, such as face recognition or image recognition, the space of potential labels is practically infinite. In such a setting, one might consider a sequence of classification problems on finite label subsets $\mathcal{Z}_1 \subset \cdots \subset \mathcal{Z}_K$, where in the $i$-th problem, one constructs the classification rule $h^{(i)}:\mathcal{Y} \to \mathcal{Z}_i$. Supposing that $(Z, Y)$ have a joint distribution, define the accuracy for the $i$-th problem as \[ \text{acc}^{(i)} = \Pr[h^{(i)}(Y) = Z|Z \in \mathcal{Z}_i]. \] Using data from only $\mathcal{Z}_k$, can one predict the accuracy achieved on the larger label set $\mathcal{Z}_K$, with $K> k$? This is the problem of \emph{performance extrapolation}. A practical instance of performance extrapolation occurs in neuroimaging studies, where the number of classes $k$ is limited by experimental considerations. Kay et al. [1] obtained fMRI brain scans which record how a single subject's visual cortex responds to natural images. The label set $\mathcal{Z}$ corresponds to the space of all grayscale photographs of natural images, and the set $\mathcal{Z}_1$ is a subset of 1750 photographs used in the experiment. They construct a classifier which achieves over 0.75 accuracy for classifying the 1750 photographs; based on exponential extrapolation, they estimate that it would take on the order of $10^{9.5}$ photographs before the accuracy of the model drops below 0.10! Directly validating this estimate would take immense resources, so it would be useful to develop the theory needed to understand how to compute such extrapolations in a principled way. However, in the fully general setting, it is impossible on construct non-trivial bounds on the accuracy achieved on the new classes $\mathcal{Z}_K \setminus \mathcal{Z}_k$ based only on knowledge of $\mathcal{Z}_k$: after all, $\mathcal{Z}_k$ could consist entirely of well-separated classes while the new classes $\mathcal{Z}_K \setminus \mathcal{Z}_k$ consist entirely of highly inseparable classes, or vice-versa. Thus, the most important assumption for our theory is that of \emph{exchangeable sampling}. The labels in $\mathcal{Z}_i$ are assumed to be an exchangeable sample from $\mathcal{Z}$. The condition of exchangeability ensures that the separability of random subsets of $\mathcal{Z}$ can be inferred by looking at the empirical distributions in $\mathcal{Z}_k$, and therefore that some estimate of the achievable accuracy on $\mathcal{Z}_K$ can be obtained. The assumption of exchangeability greatly limits the scope of application for our methods. Many multi-class classification problems have a hierarchical structure [2], or have class labels distributed according to non-uniform discrete distributions, e.g. power laws [3]; in either case, exchangeability is violated. It would be interesting to extend our theory to the hierarchical setting, or to handle non-hierarchical settings with non-uniform prior class probabilities, but again we leave the subject for future work. In addition to the assumption of exchangeability, we consider a restricted set of classifiers. We focus on \emph{generative classifiers}, which are classifiers that work by training a model separately on each class. This convenient property allows us to characterize the accuracy of the classifier by selectively conditioning on one class at a time. In section 3, we use this technique to reveal an equivalence between the expected accuracies of $\mathcal{Z}_k$ to moments of a common distribution. This moment equivalence result allows standard approaches in statistics, such as U-statistics and nonparametric pseudolikelilood, to be directly applied to the extrapolation problem, as we discuss in section 4. In non-generative classifiers, the classification rule has a joint dependence on the entire set of classes, and cannot be analyzed by conditioning on individual classes. In section 5, we empirically study the performance of our classifiers. Since generative classifiers only comprise a minority of the classifiers used in practice, we applied our methods to a variety of generative and non-generative classifiers in simulations and in one OCR dataset. Our methods have varying success on generative and non-generative classifiers, but seem to work badly for neural networks. \noindent\emph{Our contribution.} To our knowledge, we are the first to formalize the problem of prediction extrapolation. We introduce three methods for prediction extrapolation: the method of extended unbiased estimation and the constrained pseudolikelihood method are novel. The third method, based on asymptotics, is a new application of a recently proposed method for estimating mutual information [4]. \section{Setting} Having motivated the problem of performance extrapolation, we now reformulate the problem for notational and theoretical convenience. Instead of requiring $\mathcal{Z}_k$ to be a random subset of $\mathcal{Z}$ as we did in section 1, take $\mathcal{Z}=\mathbb{N}$ and $\mathcal{Z}_k = \{1,\hdots, k\}$. We fix the size of $\mathcal{Z}_k$ without losing generality, since any monotonic sequence of finite subsets can be embedded in a sequence with $|\mathcal{Z}_k| = k$. In addition, rather than randomizing the labels, we will randomize the marginal distribution $p(y|z)$ of each label; Towards that end, let $\mathcal{Y} \subset \mathbb{R}^p$ be a space of feature vectors, and let $\mathcal{P}(\mathcal{Y})$ be a measurable space of probability distributions on $\mathcal{Y}$. Let $\mathbb{F}$ be a probability measure on $\mathcal{P}$, and let $F_1, F_2,\hdots$ be an infinite sequence of i.i.d. draws from $\mathbb{F}$. We refer to $\mathbb{F}$, a probability measure on probability measures, as a \emph{meta-distribution}. The distributions $F_1,\hdots, F_k$ are the marginal distributions of the first $k$ classes. Further assuming that the labels are equiprobable, we rewrite the accuracy as \[ \text{acc}^{(t)} = \frac{1}{t}\sum_{i=1}^t \Pr_{F_i}[h^{(t)}(Y) = i]. \] where the probabilities are taken over $Y \sim F_i$. In order to construct the classification rule $h^{(t)}$, we need data from the classes $F_1,\hdots, F_t$. In most instances of multi-class classification, one observes independent observations from each $F_i$ which are used to construct the classifier. Since the order of the observations does not generally matter, a sufficient statistic for the training data for the $t$-th classification problem is the collection of empirical distributions $\hat{F}_1^{(t)},\hdots,\hat{F}_t^{(t)}$ for each class. Henceforth, we make the simplifying assumption that the training data for the $i$-th class remains fixed from $t =i, i+1,\hdots$, so we drop the superscript on $\hat{F}_i^{(t)}$. Write $\hat{\mathbb{F}}(F)$ for the conditional distribution of $\hat{F}_i$ given $F_i = F$; also write $\hat{\mathbb{F}}$ for the marginal distribution of $\hat{F}$ when $F \sim \mathbb{F}.$ As an example, suppose every class has the number of training examples $r \in \mathbb{N}$; then $\hat{F}$ is the empirical distribution of $r$ i.i.d. observations from $F$, and $\hat{\mathbb{F}}(F)$ is the \emph{empirical meta-distribution} of $\hat{F}$. Meanwhile, $\hat{\mathbb{F}}$ is the true meta-distribution of the empirical distribution of $r$ i.i.d. draws from a random $F \sim \mathbb{F}$. \subsection{Multiclass classification} Extending the formalism of Tewari and Bartlett [5]\footnote{As in their framework, we define a classifier as a vector-valued function. However, we introduce the notion of a classifier as a multiple-argument functional on empirical distributions, which echoes the functional formulation of estimators common in the statistical literature.}, we define a classifier as a collection of mappings $\mathcal{M}_i: \mathcal{P}(\mathcal{Y})^k \times \mathcal{Y} \to \mathbb{R}$ called \emph{classification functions.} Intuitively speaking, each classification function \emph{learns a model} from the first $k$ arguments, which are the empirical marginals of the $k$ classes, $\hat{F}_1,\hdots, \hat{F}_k$. For each class, the classifier assigns a real-valued \emph{classification score} to the \emph{query point} $y \in \mathcal{Y}$. A higher score $\mathcal{M}_i(\hat{F}_1,\hdots, \hat{F}_k, y)$ indicates a higher estimated probability that $y$ belongs to the $k$-th class. Therefore, the classification rule corresponding to a classifier $\mathcal{M}_i$ assigns a class with maximum classification score to $y$: \[ h(y) = \text{argmax}_{i \in \{1,\hdots, k\}} \mathcal{M}_i(y). \] For some classifiers, the classification functions $\mathcal{M}_i$ are especially simple in that $\mathcal{M}_i$ is only a function of $\hat{F}_i$ and $y$. Furthermore, due to symmetry, in such cases one can write \[ \mathcal{M}_i(\hat{F}_1,\hdots, \hat{F}_k, y) = \mathcal{Q}(\hat{F}_i, y), \] where $\mathcal{Q}$ is called a \emph{single-class classification function} (or simply \emph{classification function}), and we say that $\mathcal{M}$ is a \emph{generative classifier}. Quadratic discriminant analysis and Naive Bayes [6] are two examples of generative classifiers\footnote{For QDA, the classification function is given by \[ \mathcal{Q}_{QDA}(\hat{F}, y) = -(y - \mu(\hat{F}))^T \Sigma(\hat{F})^{-1} (y-\mu(\hat{F})) - \log\det(\Sigma(\hat{F})), \] where $\mu(F) = \int y dF(y)$ and $\Sigma(F) = \int (y-\mu(F))(y-\mu(F))^T dF(y)$. In Naive Bayes, the classification function is \[ \mathcal{Q}_{NB}(\hat{F}, y) = \sum_{i=1}^n \log \hat{f}_i(y_i), \] where $\hat{f}_i$ is a density estimate for the $i$-th component of $\hat{F}$.}. The \emph{generative} property allows us to prove strong results about the accuracy of the classifier under the exchangeable sampling assumption, as we see in Section 3. \section{Performance extrapolation for generative classifiers} Let us specialize to the case of a generative classifier, with classification function $\mathcal{Q}$. Consider estimating the expected accuracy for the $k$-th classification problem, \begin{equation}\label{eq:pt} p_k \stackrel{def}{=} \textbf{E}[\text{acc}^{(k)}].\end{equation} In the case of a generative classifier, we have \[ p_k = \textbf{E}[acc^{(k)}] = \textbf{E}\left[\frac{1}{k}\sum_{i=1}^k \Pr_{Y \sim F_i}[\mathcal{Q}(\hat{F}_i, Y) > \max_{j \neq i}\mathcal{Q}(\hat{F}_j, Y)]\right]. \] Define the \emph{conditional accuracy} function $u(\hat{F}, y)$ which maps a distribution $\hat{F}$ on $\mathcal{Y}$ and a \emph{test} observation $y$ to a real number in $[0,1]$. The conditional accuracy gives the probability that for independently drawn $\hat{F}'$ from $\hat{\mathbb{F}}$, that $\mathcal{Q}(\hat{F}, y)$ will be greater than $\mathcal{Q}(\hat{F}', y)$: \[ u(\hat{F}, y) = \Pr_{\hat{F}' \sim \hat{\mathbb{F}}}[\mathcal{Q}(\hat{F}, y) > \mathcal{Q}(\hat{F}', y)]. \] Define the \emph{conditional accuracy} distribution $\nu$ as the law of $u(\hat{F}, Y)$ where $\hat{F}$ and $Y$ are generated as follows: (i) a true distribution $F$ is drawn from $\mathbb{F}$; (ii) the empirical distribution $\hat{F}$ is drawn from $\hat{\mathbb{F}}(F)$ (i.e., the training data for the class), (iii) the query $Y$ is drawn from $F$, with $Y$ independent of $\hat{F}$ (i.e. a single test data point from the same class.) The significance of the conditional accuracy distribution is that the expected accuracy $p_t$ can be written in terms of its moments. \noindent\textbf{Theorem 3.1.} \emph{ Let $\mathcal{Q}$ be a single-distribution classification function, and let $\mathbb{F}$, $\hat{\mathbb{F}}(F)$ be a distribution on $\mathcal{P}(\mathcal{Y}).$ Further assume that $\hat{\mathbb{F}}$ and $\mathcal{Q}$ jointly satisfy the \emph{tie-breaking} property: \begin{equation}\label{eq:tie} \Pr[\mathcal{Q}(\hat{F}, y) = \mathcal{Q}(\hat{F}', y)] = 0 \end{equation} for all $y \in \mathcal{Y}$, where $\hat{F}, \hat{F}' \stackrel{iid}{\sim} \hat{\mathbb{F}}$. Let $U$ be defined as the random variable $U = u(\hat{F}, Y)$ for $F \sim \mathbb{F}$, $Y \sim F$, and $\hat{F} \sim \hat{\mathbb{F}}(F)$ with $Y \perp \hat{F}$. Then \[p_k = \textbf{E}[U^{k-1}],\] where $p_k$ is the expected accuracy as defined by \eqref{eq:pt}. } \noindent\textbf{Proof.} Write $q^{(i)}(y) = \mathcal{Q}(\hat{F}_i, y)$. By using conditioning and conditional independence, $p_k$ can be written \begin{align*} p_k &= \textbf{E}\left[ \frac{1}{k}\sum_{i=1}^k \Pr_{F_i}[q^{(i)}(Y) > \max_{j\neq i} q^{(j)}(Y)] \right] \\&= \textbf{E}\left[ \Pr_{F_1}[q^{(1)}(Y) > \max_{j\neq 1} q^{(j)}(Y)] \right] \\&= \textbf{E}_{F_1}[\Pr[q^{(1)}(Y) > \max_{j\neq 1} q^{(j)}(Y)|\hat{F}_1, Y]] \\&= \textbf{E}_{F_1}[\Pr[\cap_{j > 1} q^{(1)}(Y) > q^{(j)}(Y)|\hat{F}_1, Y]] \\&= \textbf{E}_{F_1}[\prod_{j > 1}\Pr[q^{(1)}(Y) > q^{(j)}(Y)|\hat{F}_1, Y]] \\&= \textbf{E}_{F_1}[\Pr[q^{(1)}(Y) > q^{(2)}(Y)|\hat{F}_1, Y]^{k-1}] \\&= \textbf{E}_{F_1}[u(\hat{F}_1, Y)^{k-1}] = \textbf{E}[U^{k-1}]. \end{align*} $\Box$ Theorem 3.1 tells us that the problem of extrapolation can be approached by attempting to estimate the conditional accuracy distribution. The $(t-1)$-th moment of $U$ gives us $p_t$, which will in turn be a good estimate of $\text{acc}^{(t)}$. While $U = u(\hat{F}, Y)$ is not directly observed, we can obtain unbiased estimates of $u(\hat{F}_i, y)$ by using test data. For any $\hat{F}_1,\hdots, \hat{F}_k$, and independent test point $Y \sim F_i$, define \begin{equation}\label{eq:hatu} \hat{u}(\hat{F}_i, Y) = \frac{1}{k -1}\sum_{j \neq i} I(\mathcal{Q}(\hat{F}_i, Y) > \mathcal{Q}(\hat{F}_j, Y)). \end{equation} Then $\hat{u}(\hat{F}_i, Y)$ is an unbiased estimate of $u(\hat{F}_i, Y)$, as stated in the following theorem. \noindent\textbf{Theorem 3.2.}\emph{ Assume the conditions of theorem 3.1. Then defining \begin{equation}\label{eq:veq} V = (k-1)\hat{u}(\hat{F}_i, y),\end{equation} we have \[V \sim \text{\emph{Binomial}}(k-1, u(\hat{F}_i, y)).\] Hence, \[\textbf{E}[\hat{u}(\hat{F}_i, y)] = u(\hat{F}_i, y).\] } In section 4, we will use this result to estimate the moments of $U$. Meanwhile, since $U$ is a random variable on $[0, 1]$, we also conclude that $p_t$ follows a \emph{mixed exponential decay}. Let $\alpha$ be the law of $-\log(U)$. Then from change-of-variables $\kappa =-\log(u)$, we get \[p_t = \textbf{E}[U^{t-1}] = \int_0^1 u^{t-1} d\nu(u) = \int_0^1 e^{t\log(u)} \frac{1}{u}d\nu(u) = \int_{\mathbb{R}^{+}} e^{-\kappa t} d\alpha(\kappa).\] This fact immediately suggests the technique of fitting a mixture of exponentials to the test accuracy at $t =2,3,\hdots, k$: we explore this idea further in Section 4.1. \subsection{Properties of the conditional accuracy distribution} The conditional accuracy distribution $\nu$ is determined by $\mathbb{F}$ and $\mathcal{Q}$. What can we say about the the conditional accuracy distribution without making any assumptions on either $\mathbb{F}$ or $\mathcal{Q}$? The answer is: not much. For an arbitrary probability measure $\nu'$ on $[0,1]$, one can construct $\mathbb{F}$ and $\mathcal{Q}$ such that the conditional accuracy $U$ has the distribution $\nu'$, even if one makes the \emph{perfect sampling assumption} that $\hat{F}=F.$ \noindent\textbf{Theorem 3.3.} \emph{ Let $U$ be defined as in Theorem 3.1, and let $\nu$ denote the law of $U$. Then, for any probability distribution $\nu'$ on $[0,1]$, one can construct a meta-distribution $\mathbb{F}$ and a classification function $\mathcal{Q}$ such that the conditional accuracy $U$ has distribution $\nu'$ under perfect sampling (that is, $\hat{F} = F$.) } \textbf{Proof.} Let $G$ be the cdf of $\nu$, $G(x) = \int_0^x d\nu(x)$, and let $H(u) = \sup_x \{G(x) \leq u\}$. Define $\mathcal{Q}$ by \[ \mathcal{Q}(\hat{F}, y) = \begin{cases} 0 &\text{ if }\mu(\hat{F}) > y + H(y)\\ 0 & \text{ if }y + H(y) > 1 \text{ and }\mu(\hat{F}) \in [H(y) - y, y]\\ 1 + \mu(\hat{F}) - y &\text{ if } \mu(\hat{F}) \in [y, y + H(y)]\\ 1 + y + \mu(\hat{F}) &\text{ if }\mu(\hat{F}) + H(y) > 1 \text{ and }\mu(\hat{F}) \in [0, H(y) - y]. \end{cases} \] Let $\theta \sim \text{Uniform}[0,1]$, and define $F \sim \mathbb{F}$ by $F = \delta_\theta$, and also $\hat{F} = F.$ A straightforward calculation yields that $\nu = \nu'$. $\Box$ On the other hand, we can obtain a positive result if we assume that the classifier approximates a \emph{Bayes classifier.} Assuming that $F$ is absolutely continuous with respect to Lebesgue measure $\Lambda$ with probability one, a Bayes classifier results from assuming perfect sampling ($\hat{F} = F$) and taking $\mathcal{Q}(\hat{F}, y) = \frac{dF}{d\Lambda}(y)$. Theorem 3.4. states that for a Bayes classifier, the measure $\nu$ has a density $\eta(u)$ which is monotonically increasing. Since a `good' classifier approximates the Bayes classifier, we intuitively expect that a monotonically increasing density $\eta$ is a good model for the conditional accuracy distribution of a `good' classifier. \noindent\textbf{Theorem 3.4.} \emph{ Assume the conditions of theorem 3.1, and further suppose that $\hat{F} = F$, $F$ is absolutely continuous with respect to $\Lambda$ with probability one, that $\mathcal{Q}(\hat{F}, y) = \frac{dF}{d\Lambda}(y)$, and that $F|Y$ has a regular conditional probability distribution. Let $\nu$ denote the law of $U$. Then $\nu$ has a density $\eta(u)$ on $[0, 1]$ which is monotonic in $u$. } \noindent\textbf{Proof.} It suffices to prove that \[ \nu([u, u + \delta]) < \nu([v, v + \delta]) \] for all $0 < u < v < 1$ and $0 < \delta < 1-v$. Let $\mathcal{P}_{ac}(\mathcal{Y})$ denote the space of distributions supported on $\mathcal{Y}$ which are absolutely continuous with respect to $p$-dimensional Lebesgue measure $\Lambda$. Let $\mathbb{Y}$ denote the marginal distribution of $Y$ for $Y \sim F$ with $F \sim \mathbb{F}$. Define the set \[ J_y(A) =\{F \in \mathcal{P}_{ac}(\mathcal{Y}): u(F, y) \in A\}. \] for all $A \subset [0, 1].$ One can verify that for all $y \in \mathcal{Y}$, \[ \Pr_\mathbb{F}[J_y([u, u + \delta])|Y=y] \leq \Pr_\mathbb{F}[J_y([v, v + \delta])|Y=y], \] using the fact that $\mathbb{F}$ has no atoms. Hence, we obtain \[ \Pr[U \in [u-\delta, u + \delta]] = \textbf{E}_{\mathbb{Y}}[\Pr_\mathbb{F}[J_Y([u, u + \delta])|Y]] \leq \textbf{E}_{\mathbb{Y}}[\Pr_\mathbb{F}[J_Y([v, v + \delta])|Y]] = Pr[U \in [v - \delta, v + \delta]]. \] Taking $\delta \to 0$, we conclude the theorem. $\Box$\newline \section{Estimation} Suppose we have $m$ independent test repeats per class, $y^{(i),1}\hdots, y^{(i), m}$. Let us define \[ V_{i,j} = \sum_{\ell\neq i} I(\mathcal{M}_i(\hat{F}_1,\hdots, \hat{F}_k, y^{(i, j)}) > \mathcal{M}_\ell(\hat{F}_1,\hdots, \hat{F}_k, y^{(i, j)})), \] which coincides with the definition \eqref{eq:veq} in the special case that $\mathcal{M}$ is generative. At a high level, we have a hierarchical model where $U$ is drawn from a distribution $\nu$ on $[0, 1]$ and then $V_{i, j} \sim \text{Binomial}(k, U)$. Let us assume that $U$ has a density $\eta(u)$: then the marginal distribution of $V_{i, j}$ can be written \[ \Pr[V_{i,j} = \ell] = \begin{pmatrix} k \\ \ell \end{pmatrix} \int_0^1 u^\ell (1-u)^{k-\ell} \eta(u) du. \] However, the observed $\{V_{i, j}\}$ do \emph{not} comprise an i.i.d. sample. We discuss the following three approaches for estimating $p_t = \textbf{E}[U^{t-1}]$ based on $V_{i, j}$. The first is an extension of \emph{unbiased estimation} based on binomial U-statistics, which is discussed in Section 4.1. The second is the \emph{pseudolikelihood} approach. In problems where the marginal distributions are known, but the dependence structure between variables is unknown, the \emph{pseudolikelihood} is defined as the product of the marginal distributions. For certain problems in time series analysis and spatial statistics, the maximum pseudolikelihood estimator (MPLE) is proved to be consistent [7]. We discuss pseudolikelihood-based approaches in Section 4.2. Thirdly, we note that the high-dimensional theory of Anon 2016 [4] can be applied for prediction accuracy, which we discuss in Section 4.3. \subsection{Extensions of unbiased estimation} If $V \sim \text{Binomial}(k, U)$, then an unbiased estimator of $U^t$ exists if and only if $0 \leq t \leq k$. The theory of U-statistics [8] provides the minimal variance unbiased estimator for $U^t$: \[ U^t = \textbf{E}\left[\begin{pmatrix} V \\ t \end{pmatrix} \begin{pmatrix} k \\ t \end{pmatrix}^{-1}\right]. \] This result can be immediately applied to yield an unbiased estimator of $p_t$, when $t \leq k$: \begin{equation}\label{eq:ustat} \hat{p}_t^{UN} = \frac{1}{km}\sum_{i=1}^k\sum_{j=1}^{m} \begin{pmatrix} V_{i, j} \\ t-1 \end{pmatrix} \begin{pmatrix} k \\ t-1 \end{pmatrix}^{-1}. \end{equation} However, since $\hat{p}_t^{UN}$ is undefined for $k \geq t$, we can use exponential extrapolation to define an extended estimator $\hat{p}_t^{EXP}$ for $k > t$. Let $\hat{\alpha}$ be a measure defined by solving the optimization problem \[ \text{minimize}_{\alpha} \sum_{t=2}^{k} \left(\hat{p}_t^{UN} - \int_0^\infty \exp[-t\kappa] d\alpha(\kappa)\right)^2. \] After discretizing the measure $\hat{\alpha}$, we obtain a convex optimization problem which can be solved using non-negative least squares [9]. Then define \[ \hat{p}_t^{EXP} = \begin{cases} \hat{p}_t^{UN}&\text{ for }t \leq k,\\ \int_0^\infty \exp[-t\kappa] d\hat{\alpha}(\kappa))&\text{ for }t > k. \end{cases} \] \subsection{Maximum pseudolikelihood} \begin{figure} \centering \begin{tabular}{ccrl} Estimated density $\hat{\eta}$ &Estimated moment $\textbf{E}[U^t]$ & \\ \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0.2in 0.6in 0 0.7in]{gu_est.pdf}} & \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0.2in 0.6in 0 0.7in]{gu_est_moments.pdf}} & & \\ & & \crule[black]{0.2cm}{0.2cm} & Truth\\ & & & \\ & & \crule[blue]{0.2cm}{0.2cm} & MPLE \\ & & & \\ & & \crule[red]{0.2cm}{0.2cm} & CONS \\ & & & \\ & & & \\ & & & \\ $u$& $t$& & \\ \end{tabular} \caption{Maximum pseudolikelihood (MPLE) versus constrained pseudolikelihood (CONS). Adding constraints improves the estimation of the density $\eta(u)$, as well as moment estimation.} \end{figure} The (log) pseudolikelihood is defined as \begin{equation}\label{eq:psuedo} \ell(\eta) = \sum_{i=1}^k \sum_{j=1}^{m} \log\left(\int u^{V_{i, j}} (1-u)^{k - V_{i, j}} \eta(u) du\right), \end{equation} and a maximum pseudolikelihood estimator (MPLE) is defined as any density $\hat{\eta}$ such that \[ \ell(\hat{\eta}_{MPLE}) = \sup_{\eta} \ell(\eta). \] The motivation for $\hat{\eta}_{MPLE}$ is that it consistently estimates $\eta$ in the limit where $k \to \infty$. However, in finite samples, $\hat{\eta}_{MPLE}$ is not uniquely defined, and if we define the plug-in estimator \[ \hat{p}_t^{MPLE} = \int u^{t-1} \hat{\eta}_{MPLE}(u) du, \] $\hat{p}_t^{MPLE}$ can vary over a large range, depending on which $\hat{\eta} \in \text{argmax}_{\eta} \ell_t(\eta)$ is selected. These shortcomings motivate the adoption of additional constraints on the estimator $\hat{\eta}$. Theorem 3.4. motivates the \emph{monotonicity constraint} that $\frac{d\hat{\eta}}{du} > 0$. A second constraint is to restrict the $k$-th moment of $\hat{\eta}$ to match the unbiased estimate. The addition of these constraints yields the constrained PMLE $\hat{\eta}_{CON}$, which is obtained by solving \[ \text{maximize }\ell(\eta) \text{ subject to }\int u^{k-1} \eta(u) du = \hat{p}_k^{UN}\text{ and }\frac{d\hat{\eta}}{du} > 0. \] By discretizing $\eta$, all of the above maximization problems can be solved using a general-purpose convex solver\footnote{ We found that the disciplined convex programming language CVX, using the ECOS second-order cone programming solver, succeeds in optimizing the problems where the dimension of the discretized $\eta$ is as large as 10,000 [10, 11].}. While the added constraints do not guarantee a unique solution, they improve estimation of $\eta$ and thus improve moment estimation (Figure 1.) \subsection{High-dimensional asymptotics} Under a number of conditions on the distribution $\mathbb{F}$, including (but not limited to) having a large dimension $p$, Anon [4] relate the accuracy $p_t$ of the Bayes classifier to the mutual information between the label $z$ and the response $y$: \[ p_t = \bar{\pi}_t(\sqrt{2I(Z; Y)}). \] where \[ \bar{\pi}_k(c) = \int_{\mathbb{R}} \phi(z - c) \Phi(z)^{k-1} dz. \] While our goal is not to estimate the mutual information, we note that the results of Anon 2016 imply a relationship between $p_k$ and $p_K$ for the Bayes accuracy under the high-dimensional regime: \[ p_K = \bar{\pi}_K\left(\bar{\pi}_k^{-1}(p_k)\right). \] Therefore, under the high-dimensional conditions of [4] and assuming that the classifier approximates the Bayes classifier, we naturally obtain the following estimator \[ \hat{p}_t^{HD} = \bar{\pi}_K\left(\bar{\pi}_k^{-1}(\hat{p}_k^{UN})\right). \] \section{Results} We applied the methods described in Section 4 on a simulated gaussian mixture (Figure 2) and on a Telugu character classification task [12] (Table 1.) For the simulated gaussian mixture, we vary the size of the initial subset from $k=3$ classes to $k=K=50$ classes, and extrapolate the performance for gaussian mixture model, multinomial logistic, and one-layer neural network (with 10 sigmoidal units.) Figure 3 shows how the predicted $K$-class accuracy changes as $k$ is varied. We see that the predicted accuracy curves for QDA and Logistic have similar behavior, even though QDA is generative and multinomial logistic is not. All three methods perform better on QDA and logistic classifiers than on the neural network: in fact, for the neural network, the test accuracy of the initial set, $\text{acc}^{(k)}$, becomes a better estimator of $\text{acc}^{(K)}$ than the three proposed methods for most of the curve. We also see that the exponential extrapolation method, $\hat{p}^{EXP}$, is more variable than constrained pseudolikelihood $\hat{p}^{CONS}$ and high-dimensional estimator $\hat{p}^{HD}$. Additional simulation results can be found in the supplement. In the character classification task, we predict the 400-class accuracy of naive Bayes, multinomial logistic regression, SVM [6], $\epsilon$-nearest neighbors\footnote{$k$-nearest neighbors with $k = \epsilon n$ for fixed $\epsilon > 0$}, and deep neural networks\footnote{The network architecture is as follows: {\tt 48x48-4C3-MP2-6C3-8C3-MP2-32C3-50C3-MP2-200C3-SM.} 48x48 binary input image, $m$C3 is a 3x3 convolutional layer with $m$ output maps, MP2 is a 2x2 max-pooling layer, and SM is a softmax output layer on 20 or 400 classes.} using 20-class data with 103 training examples per class (Table 1). Taking the test accuracy on 400 classes (using 50 test examples per class) as a proxy for $\text{acc}^{(400)}$, we compare the performance of the three extrapolation methods; as a benchmark, also consider using the test accuracy on 20 classes as an estimate. The exponential extrapolation method performs well only for the deep neural network. Meanwhile, constrained PMLE achieves accurate extrapolation for two out of four classifiers: logistic and SVM but failed to converge for the the deep neural network (due to the high test accuracy). The high-dimensional estimator $\hat{p}^{HD}$ performs well on the multinomial logistic, SVM, and deep neural network classifiers. All three methods beat the benchmark (taking the test accuracy at 20) for the first four classifiers; however, the benchmark is the best estimator for the deep neural network, similarly to what we observe in the simulation (albeit with a shallow network rather than a deep network.) \begin{figure} \centering \begin{tabular}{cccrl} QDA & Logistic & Neural Net & \\ \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0.2in 0.6in 0.2in 0.7in]{sim_qda.pdf}} & \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0.75in 0.6in 0.2in 0.7in]{sim_glmnet.pdf}} & \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0.75in 0.6in 0.2in 0.7in]{sim_nnet.pdf}} & & \\ && & &\\ && & \crule[black]{0.2cm}{0.2cm} & $\text{acc}^{(k)}$ \\ && & \crule[green]{0.2cm}{0.2cm} & $\hat{p}^{EXP}$ \\ && & \crule[red]{0.2cm}{0.2cm} & $\hat{p}^{CONS}$ \\ && & \crule[blue]{0.2cm}{0.2cm} & $\hat{p}^{HD}$ \\ && & & \\ && & & \\ && & & \\ $k$ &$k$& $k$& & \\ \end{tabular} \caption{Predictions for $\text{acc}^{(50)}$ as $k$, the size of the subset, is varied. Our methods work better for QDA and Logistic than Neural Net; overall, $\hat{p}^{EXP}$ has higher variability than $\hat{p}^{CONS}$ and $\hat{p}^{HD}$.} \end{figure} \begin{table} \centering \begin{tabular}{|c||c|c|c|c|c|}\hline Classifier & Test $\text{acc}^{(20)}$ & Test $\text{acc}^{(400)}$ & $\hat{p}^{EXP}_{400}$ & $\hat{p}^{CONS}_{400}$ & $\hat{p}^{HD}_{400}$\\ \hline Naive Bayes & 0.947 & 0.601 & 0.884 & \textbf{0.659} & 0.769 \\ \hline Logistic & 0.922 & 0.711 & 0.844 & \textbf{0.682} & 0.686 \\ \hline SVM & 0.860 & 0.545 & 0.737 & 0.473 & \textbf{0.546} \\ \hline $\epsilon$-NN & 0.964 & 0.591 & 0.895 & \textbf{0.395} & 0.839\\ \hline Deep neural net & \textbf{0.995} & 0.986 & 0.973 & (*) & 0.957\\ \hline \end{tabular} \caption{Performance extrapolation: predicting the accuracy on 400 classes using data from 20 classes on a Telugu character dataset. (*) indicates failure to converge. $\epsilon = 0.002$ for $\epsilon$-nearest neighbors.} \end{table} \section{Discussion} Empirical results indicate that our methods generalize beyond generative classifiers. A possible explanation is that since the Bayes classifier is generative, any classifier which approximates the Bayes classifier is also `approximately generative.' However, an important caveat is that the classifier must already attain close to the Bayes accuracy on the smaller subset of classes. If the classifier is initially far from the Bayes classifier, and then becomes more accurate as more classes are added, our theory could underestimate the accuracy on the larger subset. This is a non-issue for generative classifiers when the training data per class is fixed, since a generative classifier approximates the Bayes rule if and only if the single-class classification function approximates the Bayes optimal single-class classification function. On the other hand, for classifiers with built-in \emph{model selection} or \emph{representation learning}, it is expected that the classification functions become more accurate, in the sense that they better approximate a monotonic function of the Bayes classification functions, as data from more classes is added. Our results are still too inconclusive for us to recommend the use of any of these estimators in practice. Theoretically, it still remains to derive confidence bounds for the generative case; practically, additional experiments are needed to establish the reliability of these estimators in specific applications. There also remains plenty of room for new and improved estimators in this area: for instance, fixing the instability of the constrained pseudolikelihood estimator when the test accuracy is high. \subsubsection*{Acknowledgments} We thank John Duchi, Steve Mussmann, Qingyun Sun, Jonathan Taylor, Trevor Hastie, Robert Tibshirani for useful discussion. CZ is supported by an NSF graduate research fellowship. \newpage \section*{References} \small [1] Kay, K. N., Naselaris, T., Prenger, R. J., \& Gallant, J. L. (2008). ``Identifying natural images from human brain activity.'' \emph{Nature}, 452(March), 352-355. [2] Deng, J., Berg, A. C., Li, K., \& Fei-Fei, L. (2010). ``What does classifying more than 10,000 image categories tell us?'' \emph{Lecture Notes in Computer Science}, 6315 LNCS(PART 5), 71-84. [3] Garfield, S., Stefan W., \& Devlin, S. (2005). ``Spoken language classification using hybrid classifier combination." \emph{International Journal of Hybrid Intelligent Systems} 2.1: 13-33. [4] Anonymous, A. (2016). ``Estimating mutual information in high dimensions via classification error.'' Submitted to \emph{NIPS 2016.} [5] Tewari, A., \& Bartlett, P. L. (2007). ``On the Consistency of Multiclass Classification Methods.'' \emph{Journal of Machine Learning Research}, 8, 1007-1025. [6] Hastie, T., Tibshirani, R., \& Friedman, J., (2008). \emph{The elements of statistical learning.} Vol. 1. Springer, Berlin: Springer series in statistics. [7] Arnold, Barry C., \& Strauss, D. (1991). ``Pseudolikelihood estimation: some examples." \emph{Sankhya: The Indian Journal of Statistics, Series B}: 233-243. [8] Cox, D.R., \& Hinkley, D.V. (1974). \emph{Theoretical statistics.} Chapman and Hall. ISBN 0-412-12420-3 [9] Lawson, C. L., \& Hanson, R. J. (1974). \emph{Solving least squares problems.} Vol. 161. Englewood Cliffs, NJ: Prentice-hall. [10] Hong, J., Mohan, K. \& Zeng, D. (2014). ``CVX. jl: A Convex Modeling Environment in Julia." [11] Domahidi, A., Chu, E., \& Boyd, S. (2013). "ECOS: An SOCP solver for embedded systems." \emph{Control Conference (ECC), 2013 European. IEEE.} [12] Achanta, R., \& Hastie, T. (2015) "Telugu OCR Framework using Deep Learning." arXiv preprint arXiv:1509.05962 . \end{document}
{'timestamp': '2016-06-17T02:12:04', 'yymm': '1606', 'arxiv_id': '1606.05228', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05228'}
arxiv
\section{Introduction} In Part-I {\cite{RoseMian16_1}} of this two-paper set we defined a signaling model and developed an information theoretic framework for evaluating the capacity and efficiency of channels which use molecules (or ``tokens'') as information carriers. Here in Part-II we provide some necessary undergirding results which are interesting in their own right. In particular, we consider a timing channel similar but not identical to Anantharam's and Verd\'u's ``Bits Through Queues'' channel \cite{bits-Qs,sundaresan1, sundaresan2} wherein a mean launch time constraint is replaced by a launch deadline constraint. We derive closed forms for the optimizing distribution and the channel capacity for this older timing channel and then apply the results to the molecular communication problem. We also derive analytic expressions and bounds for a key quantity in our analysis -- the {\em ordering entropy} $H(\Omega|\vec{{\bf S}}, {\bf T})$ -- first generally and then specifically for exponential first-passage time distribution. These results support the capacity bounds of Part-I {\cite{RoseMian16_1}}, provide capacity results for a timing channel with an emission deadline under exponential first-passage, and also establish that unlike the mean-constrained timing channel, the worst case corruption is {\em not} exponential first-passage. Our analysis ends with the derivation of an upper bound on the token timing channel capacity. \section{Brief Problem Description} \label{sect:brief} A detailed discussion of the underlying molecular communication problem and its importance in both biology and engineering is provided in Part-I {\cite{RoseMian16_1}}. Here we assume basic familiarity with the concepts and provide only the mathematical description of the system. As a reader aid, key quantities are provided in TABLE~\ref{table:glossary} and in an identical table in Part-I. \begin{table}[h] \begin{tabular}{p{2.0cm}|p{5.9cm}} \hline {\bf \em Token} & {\small A unit released by the transmitter and captured by the receiver}\\ \hline {\bf \em Payload} & {\small Physical information ({inscribed matter}) carried by a token}\\ \hline {\bf \em ${\lambda}$} & {\small The average rate at which tokens are released/launched into the channel}\\ \hline {\bf ${\bf T}$} & {\small A vector of token release/launch times}\\ \hline {\bf \em First-Passage} & {\small The time between token release/launch and token capture at the receiver}\\ \hline {\bf ${\bf D}$} & {\small A vector of first-passage times associated with launch times ${\bf T}$}\\ \hline {\bf $G(\cdot)$} & {\small The cumulative distribution function for first-passage random variable $D$}\\ \hline {\bf $1/{\mu}$} & {\small Average/mean first-passage time}\\ \hline {\bf $\rho$} & {\small ${\lambda}/{\mu}$, a measure of system token ``load'' }\\ \hline {\bf ${\bf S}$} & {\small A vector of token arrival times, ${\bf S} = {\bf T} + {\bf D}$} \\ \hline {\bf $P_k({\bf x})$} & {\small A permutation operator which rearranges the order of elements in vector ${\bf x}$}\\ \hline {\bf $\Omega$} & {\small The ``sorting index'' which produces $\vec{{\bf S}}$ from ${\bf S}$, {\em i.e.}, $\vec{{\bf S}} = P_{\Omega}({\bf S})$}\\ \hline {\bf $\vec{{\bf S}}$} & {\small An {\em ordered} vector of arrival times obtained by sorting the elements of ${\bf S}$ (note, the receiver only sees $\vec{{\bf S}}$ not ${\bf S}$)}\\ \hline {\bf $I({\bf S};{\bf T})$} & {\small The mutual information between the launch times (input) and the arrival times (output)}\\ \hline {\bf $I(\vec{{\bf S}};{\bf T})$} & {\small The mutual information between the launch times (input) and the {\em ordered} arrival times (output)}\\ \hline {\bf $h({\bf S})$} & {\small The differential entropy of the arrival vector ${\bf S}$}\\ \hline {\bf $H(\Omega|\vec{{\bf S}},{\bf T})$} & {\small The {\em ordering entropy} given the input ${\bf T}$ and the output $\vec{{\bf S}}$} \\ \hline {\bf ${H^{\uparrow}}({\bf T})$} & {\small An upper bound for $H(\Omega|\vec{{\bf S}},{\bf T})$}\\ \hline {\bf $C_q$ {\rm and } $C_t$} & {\small The asymptotic per token and per unit time capacity between input and output}\\ \hline \end{tabular} $\mbox{ }$\\ \caption{Glossary of useful terms} \label{table:glossary} \end{table} Thus, consider a communication system in which $M$ identical tokens are released/launched at times $T_1, T_2, \cdots, T_M$ with no assumption that the $T_m$ are ordered in time. The duration of each token's journey from transmitter to receiver is a random variable $D_m$ so that token $m$ arrives at time $S_m = T_m + D_m$. The $D_m$ are assumed independent and identically distributed (i.i.d.). In vector notation, we have ${\bf S} = {\bf T} + {\bf D}$. We denote the density of each $D_m$ as $f_{D_m}(d) = g(d)$, $d \ge 0$ and the cumulative distribution function (CDF) as $F_{D_m}(d) = G(\cdot)$. Likewise, the complementary CDF (CCDF) is ${\bar{G}}(\cdot)$. The channel output is the time-sorted version of the $\{ S_m \}$ which we denote as $\{ \vec{S}_i \}$, $\vec{S}_i \le \vec{S}_{i+1}$. However, since the tokens are identical and their transit times are random, the receiver cannot unequivocally know which arrival, $\vec{S}_i$ corresponds to which transmission $T_m$. That is, $\vec{{\bf S}}$, the ordered arrival times are related to ${\bf S}$ through a permutation operation, $P_{\Omega}(\vec{{\bf S}}) = {\bf S}$ and from the receiver's perspective, $\Omega$ is a random variable, $\Omega = 1, 2, \cdots, M!$. In the next section, we provide a sampling of results from Part-I upon which we will expand here in Part-II. \section{Key Results from the Companion Paper \cite{RoseMian16_1}} A good deal of effort was expended in Part-I quantifying the relationships between ${\bf T}$, ${\bf D}$, ${\bf S}$ and $\vec{{\bf S}}$, and in developing a signaling discipline wherein the measure of communication efficacy is determined by the mutual information between $\vec{{\bf S}}$ and ${\bf T}$, $I(\vec{{\bf S}};{\bf T})$. That is, we took care to make sure that channel coding theorem results \cite[(chapt 8 \& 10)]{cover} could be applied by deriving a model in which channel uses were (asymptotically) independent. Specifically, we assume sequential finite signaling intervals/epochs of duration $\tau$ and then define the token intensity as ${\lambda} = \frac{M}{\tau}$ as a proxy for transmitter power (each emission ``costs'' some fixed energy). In addition, we assume that the {\em mean first-passage time} exists with $E[D] = 1/{\mu}$ so that tokens always (eventually) arrive at the receiver. It is important to note that finite first-passage time is important for information-theoretic patency of the analysis. As shown in Part-I \cite{RoseMian16_1}, finite first-passage allows sequential signaling intervals (channel uses) to be derived which are, in the limit of long intervals, asymptotically independent. Infinite first-passage {\em does not allow such asymptotically independent sequential intervals to be constructed} so that mutual information $I(\vec{{\bf S}};{\bf T})$ is not necessarily the proper measure of information carriage for the system. We note that transport processes such as free-space diffusion do {\em not} have finite first-passage. However, any physical system is limited in extent and therefore does have finite (though perhaps long) first-passage under an ergodic transport model. So, the analysis holds for situations where tokens eventually arrive at the receiver. Of course, as discussed in Part-I, there are situations where a token might never arrive at {\em any} time. Such situations include channels where the token ``denatures'' and becomes unrecognizable by the receiver or is ``gettered'' by agents in the channel which remove the token from circulation before detection \cite{farsad_isit16, farsadIT16}. Such tokens do not contribute to intersymbol interference (earlier tokens corrupting a subsequent interval) so it is possible that slightly different first-passage time distributions could be used which still preserve asymptotically independent channel uses. However, since any such model produces a first passage density, $g(d)$ with singularities, the specific analysis used in Part-I is not immediately applicable. The implications (and shortcomings) of the finite first-passage assumption are discussed more carefully in the Discussion \& Conclusion section of Part-I. Now, as a prelude to deriving channel capacity, we recall from Part-I \cite{RoseMian16_1} that if $Q({\bf x})$ is a hypersymmetric function, $Q({\bf x}) = Q(P_k({\bf x}))$ $\forall k$ where $P_k(\cdot)$ is a permutation operator and ${\bf X}$ is a hypersymmetric random vector whose PDF obeys $f_{{\bf X}}({\bf x}) = f_{{\bf X}}(P_k({\bf x}))$, then when $\vec{{\bf X}}$ is the ordered version of random vector ${\bf X}$ we have \begin{IEEEeqnarray}{c} \label{eq:hyperexpect} E_{\vec{{\bf X}}} \left [Q(\vec{{\bf X}}) \right ] = E_{{\bf X}} \left [Q({\bf X}) \right ] \end{IEEEeqnarray} This expression (Theorem 1 from Part-I) allows us to avoid deriving order distributions on potentially correlated random variables. Next, the mutual information between the input ${\bf T}$ and the output $\vec{{\bf S}}$ of the token timing channel is given by \begin{IEEEeqnarray}{c} I(\vec{{\bf S}}; {\bf T}) = h(\vec{{\bf S}}) - h(\vec{{\bf S}}|{\bf T}) \label{eq:ISvvT} \end{IEEEeqnarray} Then, if we assume that $g(\cdot)$ does not contain singularities, we observe that the set of all ${\bf S}$ for which two or more elements are equal is of zero measure which allows us to ``fold'' the distribution on $f_{{\bf S}}(\cdot)$ to obtain a distribution on the ordered $\vec{{\bf S}}$. If we then in addition assume hypersymmetric ${\bf X}$, we can write \equat{ISvvT} as \begin{IEEEeqnarray}{c} I(\vec{{\bf S}}; {\bf T}) = h({\bf S}) - \log M! - h(\vec{{\bf S}}|{\bf T}) \label{eq:IST_SvvT} \end{IEEEeqnarray} Hypersymmetry of ${\bf X}$ and no singularity in $g(\cdot)$ implies that we can ignore situations where one or more of the $S_i$ are equal, which then implies an equivalence \begin{IEEEeqnarray}{c} \{ \vec{{\bf S}}, \Omega \} \Leftrightarrow {\bf S} \label{eq:equivalence} \end{IEEEeqnarray} which leads to \begin{IEEEeqnarray}{c} h({\bf S}|{\bf T}) = h(\vec{{\bf S}}, \Omega|{\bf T}) = H(\Omega|\vec{{\bf S}},{\bf T}) + h(\vec{{\bf S}}|{\bf T}) \label{eq:hSvvTequiv} \end{IEEEeqnarray} where $H(\Omega|\vec{{\bf S}},{\bf T})$ is the {\em ordering entropy}, a measure of the uncertainty about which $S_m$ correspond to which $\vec{S}_i$. \Equat{hSvvTequiv} allows us to write the \equat{IST_SvvT} as \begin{equation} \label{eq:orderedMI_decomp} I(\vec{{\bf S}}; {\bf T}) = I({\bf S};{\bf T}) - \left ( \log M! - H(\Omega|\vec{{\bf S}},{\bf T}) \right ) \end{equation} And since we know asymptotically independent channel uses can be assured (Part-I Theorem 2, \cite{RoseMian16_1}), the channel capacity in bits/nats per channel use is \begin{IEEEeqnarray*}{c} C = \max_{f_{{\bf T}}(\cdot)} \left [ I({\bf S};{\bf T}) - \left ( \log M! - H(\Omega|\vec{{\bf S}},{\bf T}) \right ) \right ] \end{IEEEeqnarray*} We then derived an upper bound for the ordering entropy $H(\Omega|\vec{{\bf S}},{\bf T})$ in Part-I as \begin{IEEEeqnarray}{c} \label{eq:HOHupineq} H(\Omega|\vec{{\bf S}},{\bf t}) \le {H^{\uparrow}}({\bf t}) \end{IEEEeqnarray} and derived/defined ${H^{\uparrow}}(\cdot)$ as \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{{H^{\uparrow}}({\bf t}) = \sum_{\ell=1}^{M-1} \log(1 + \ell)} \nonumber \\ \quad & \times & {\sum_{m=\ell}^{M-1}} { \sum_{|\bar{{\bf x}}| = \ell}} { \prod_{j=1}^m {\bar{G}}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1 -\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j)} \IEEEeqnarraynumspace \label{eq:Hexpurg3} \end{IEEEeqnarray} with $\vec{\tv}$ the size-ordered version of ${\bf t}$ and $\bar{{\bf x}}$ a binary $m$-vector with $|\bar{{\bf x}}|$ defined as its number of non-zero entries. Then, through hypersymmetry arguments as in \equat{hyperexpect}, we showed that \begin{IEEEeqnarray}{c} H(\Omega|\vec{{\bf S}},{\bf T}) = E_{{\bf t}} \left [ H(\Omega|\vec{{\bf S}},{\bf t}) \right ] \le E_{\vec{\tv}} \left [ {H^{\uparrow}}({\bf t}) \right ] = {H^{\uparrow}}( {\bf T}) \IEEEeqnarraynumspace \label{eq:HOinequality} \end{IEEEeqnarray} with equality {\bf iff} the first passage time is exponential (Theorem 8, Part-I \cite{RoseMian16_1}). Based on asymptotically independent channel uses, two key measures of channel capacity were derived. The first, $C_q$, is the asymptotic per token capacity: \begin{IEEEeqnarray}{c} C_q = \lim_{M \rightarrow \infty} \frac{1}{M} I(\vec{{\bf S}};{\bf T}) \label{eq:Cqdef} \end{IEEEeqnarray} and the second is $C_t = {\lambda} C_q$, the asymptotic per unit time capacity (Theorem 4, Part-I \cite{RoseMian16_1}). In what follows we will seek to maximize $h({\bf S})$ under the deadline constraints on the ${\bf T}$, derive a variety of expressions for ${H^{\uparrow}}({\bf T})$ for general and then for exponential first-passage under both a deadline and also the mean launch constraint considered in ``Bits Through Queues'' \cite{bits-Qs} and elsewhere \cite{sundaresan1, sundaresan2}. We follow with asymptotic results for ${H^{\uparrow}}({\bf T})/M$ as $M \rightarrow \infty$ again assuming exponential first-passage and close by providing upper bounds for $C_q$ and $C_t$. \section{``Bits Through Queues'' With a Deadline Constraint} \label{sect:minmaxhS} \subsection{Preliminaries} The award-winning paper, ``Bits Through Queues'' \cite{bits-Qs} and others \cite{sundaresan1,sundaresan2} derived capacity results for a timing channel under a mean launch time constraint. In this section we derive results for a similar single-token timing channel where instead of a mean constraint, the launch time $T$ is limited to $[0,\tau]$ \cite{isit11,SonRos13} and first-passage is exponential with parameter ${\mu}$. Here we provide closed forms for both the capacity and for the capacity-achieving input density. However, unlike in \cite{bits-Qs} we show that exponential first-passage is {\em not} the worst case corruption for the launch deadline-constrained channel. Since $T$ is independent of $D$, the density of $S=T+D$ is given by \begin{IEEEeqnarray*}{c} f_{S}(s) = \int_0^s f_T(t) f_D(s-t) dt \quad 0 \leq s \end{IEEEeqnarray*} and because $T$ is constrained to $[0,\tau]$, we can divide $f_S(s)$ into two regions: region $I$ where $s \in [0,\tau]$ and region $II$ where $s \in (\tau,\infty)$. We then have \begin{IEEEeqnarray}{c} f_S(s)= \left\{ \begin{array}{l l} \sigma f_{S|I}(s) & 0 \leq s \leq \tau\\ (1-\sigma) f_{S|II}(s) & s > \tau\\ \end{array} \right. \label{eq:pdf_S1S2} \end{IEEEeqnarray} where \begin{IEEEeqnarray*}{c} \sigma = \int_{0}^{\tau} f_{S}(s) ds \end{IEEEeqnarray*} with \begin{IEEEeqnarray}{c} \sigma f_{S|I}(s) = \int_0^s f_T(t) f_D(s-t) dt \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} (1- \sigma) f_{S|II}(s) = \int_{0}^{\tau} f_T(t) f_D(s-t) dt \end{IEEEeqnarray} For $D$ exponential with parameter ${\mu}$ we have \begin{IEEEeqnarray}{c} \label{eq:pdf_S} f_{S}(s) = \int_0^s f_T(t) {\mu} e^{-{\mu}(s-t)} dt \quad 0 \leq s \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} \sigma f_{S|I}(s) = \int_0^s f_T(t) {\mu} e^{-{\mu}(s-t)} dt \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} \label{eq:fSII} (1- \sigma) f_{S|II}(s) = e^{-{\mu} s} \int_{0}^{\tau} f_T(t) {\mu} e^{{\mu} t} dt \end{IEEEeqnarray} The entropy of $S$ is then \begin{IEEEeqnarray}{c} \label{eq:entropy_S} \begin{split} h(S) & = -\int_0^{\infty} f_{S}(s) \log f_{S}(s) ds \\ & = -\int_0^{\tau} \sigma f_{S|I}(s) \log \left ( \sigma f_{S|I}(s) \right ) ds\\ & - \int_{\tau}^{\infty} (1-\sigma )f_{S|II}(s) \log \left ( (1-\sigma )f_{S|II}(s)\right ) ds\\ & = \sigma h(S|I) + (1-\sigma) h(S|II) + H_B (\sigma) \\ \end{split} \end{IEEEeqnarray} where $H_B(\cdot)$ is the binary entropy function. Notice that no particular care has to be taken with the integrals at $s=T$ because $f_S(s)$ cannot contain singularities -- it is obtained by the convolution of two densities, one of which, $f_D(\cdot) = g(\cdot)$, contains no singularities. \subsection{Maximization of $h(S)$} \label{sect:optimize} We observe of \equat{fSII} that the {\em shape} of the conditional density for $s>\tau$ is completely determined -- an exponential with parameter ${\mu}$ as depicted in FIGURE~\ref{fig:step0}. \begin{figure}[h] \centering \includegraphics[width=3in]{step0_mod.png} \caption{The shapes associated with $f_{S}(s)$: We assume arbitrary shape in region I and the requisite exponential shape in region II.} \label{fig:step0} \end{figure} Thus, selection of $f_T(\cdot)$ does not affect $f_{S|II}(\cdot)$ and we must have $h(S|II) = 1 - \log {\mu}$. This observation suggests a three-step approach to maximizing $h(S)$. In the first two steps, we completely ignore $f_T(\cdot)$ and find the {\em shape} $f_{S|I}(\cdot)$ and value of $\sigma$ which maximize \equat{entropy_S}. In step three, we determine that there indeed exists a density $f_T(\cdot)$ which produces the optimizing $f_S(\cdot)$. {\bf Step 1:} For fixed $\sigma$ we see from \equat{entropy_S} that $h(S)$ is maximized solely by our choice of $f_{S|I}(\cdot)$. The uniform density maximizes entropy on a finite interval \cite{Cover06}. Thus, $f_{S|I}(s) = \frac{1}{\tau}$ and $h(S|I) = \log \tau$ as depicted in FIGURE~\ref{fig:step1}. \begin{figure}[h] \centering \includegraphics[width=3in]{step1_mod.png} \caption{The updated shape of $f_{S}(s)$ after step 1: $f_{S|I}(s)$ is chosen as $\frac{1}{\tau}$. } \label{fig:step1} \end{figure} {\bf Step 2:} Since for any $\sigma$, $h(S|I) = \log \tau$, we have \begin{equation} h(S) = \sigma \log \tau + (1-\sigma) (1 - \log {\mu}) + H_B (\sigma) \\ \label{eq:HSstep1} \end{equation} Taking the derivative of \equat{HSstep1} with respect to $\sigma$ yields \begin{IEEEeqnarray*}{c} \log \tau - (1-\log {\mu}) - (1+\log \sigma) + (1+\log (1-\sigma)) \end{IEEEeqnarray*} which we set to zero to obtain \begin{IEEEeqnarray*}{c} \log {\mu} \tau - \log \frac{\sigma}{1-\sigma} - 1 = 0 \end{IEEEeqnarray*} We rearrange to obtain \begin{IEEEeqnarray*}{c} {\mu} \tau = \frac{e\sigma}{1-\sigma} \end{IEEEeqnarray*} from which we deduce that the optimal $\sigma$ is \begin{IEEEeqnarray}{c} \label{eq:sigmastar} \sigma^* = \frac{{\mu} \tau}{e + {\mu} \tau} \end{IEEEeqnarray} Returning to the entropy maximization we have \begin{IEEEeqnarray*}{c} \max_{f_T(\cdot)} h(S) \le \sigma^* \log \tau + (1-\sigma*) (1 - \log {\mu}) + H_B (\sigma^*) \end{IEEEeqnarray*} which through substitution of $\sigma^*$ according to \equat{sigmastar} yields \begin{IEEEeqnarray}{c} \max_{f_T(\cdot)} h(S) \le \log \left ( \frac{e + {\mu} \tau}{{\mu}} \right ) \label{eq:hSmax} \end{IEEEeqnarray} with equality when \begin{IEEEeqnarray}{c} f_S(s) = \twodef{\frac{{\mu}}{e + {\mu} \tau} }{0 \le s < \tau}{\frac{e}{e+{\mu} \tau} {\mu} e^{- {\mu} (s-\tau)}}{s \ge \tau} \label{eq:optimumS} \end{IEEEeqnarray} \blankout{ as depicted in FIGURE~\ref{fig:step2}. \begin{figure}[h] \centering \includegraphics[width=3in]{step1_mod.png} \caption{The optimizing $f_S(s)$.} \label{fig:step2} \end{figure}} {\bf Step 3:} All that remains is to ascertain whether $\exists f_T(\cdot)$ which can generate the $f_S(s)$ of \equat{optimumS}. Since $f_S(\cdot)$ is the convolution of $f_D(\cdot)$ and $f_T(\cdot)$ we can use Fourier transforms to obtain a candidate solution for $f_T(\cdot)$. That is, the Fourier transform of $f_D(\cdot)$ is $\frac{{\mu}}{{\mu} + j 2 \pi f}$ so the Fourier transform of $f_T(\cdot)$ is \begin{IEEEeqnarray*}{c} {\cal F} \left \{ f_T(\cdot) \right \} = {\cal F} \left \{ f_S(\cdot) \right \} \left ( \frac{j 2 \pi f}{{\mu}} + 1 \right ) \end{IEEEeqnarray*} Multiplication by $j 2 \pi f$ implies differentiation so we must have \begin{IEEEeqnarray*}{c} f_T(t) = \frac{1}{{\mu}} \frac{d}{dt} f_S(t) + f_S(t) \end{IEEEeqnarray*} which implies via \equat{optimumS} that \begin{IEEEeqnarray}{c} \label{eq:optimalfT} f_T(t) = \twodef{\frac{{\mu}}{e+{\mu} \tau}}{0<t<\tau}{\delta(t) \frac{1}{e + {\mu} \tau} + \delta(t-\tau) \frac{e-1}{e + {\mu} \tau}}{\mbox{o.w.}} \end{IEEEeqnarray} -- a valid probability density function. We can now state the maximum mutual information (capacity in bits per channel use) as \begin{IEEEeqnarray}{c} \label{eq:maxI} \max_{f_T(\cdot)} I(S;T) = \log \left ( \frac{e {\mu} \tau}{{\mu}} \right ) - (1- \log {\mu}) = \log \left ( 1 + \frac{{\mu} \tau}{e} \right ) \IEEEeqnarraynumspace \end{IEEEeqnarray} which is achieved using the emission time density of \equat{optimalfT}. We summarize the result as a theorem: {\em \begin{theorem} {\bf Maximum \boldmath $I(S;T)$ Under a Deadline Constraint:} \thmlabel{fTopthSopt} If $S=T+D$ where $D$ is an exponential random variable with parameter ${\mu}$ and $T \in [0,\tau]$, then the mutual information between $S$ and $T$ obeys \begin{IEEEeqnarray*}{c} I(S;T) \le \log \left ( 1 + \frac{{\mu} \tau}{e} \right ) \end{IEEEeqnarray*} with equality when \begin{IEEEeqnarray*}{c} f_T(t) = \twodef{\frac{{\mu}}{e+{\mu} \tau}}{0<t<\tau}{\delta(t) \frac{1}{e + {\mu} \tau} + \delta(t-\tau) \frac{e-1}{e + {\mu} \tau}}{\mbox{o.w.}} \end{IEEEeqnarray*} and \begin{IEEEeqnarray*}{c} f_S(s) = \twodef{\frac{{\mu}}{e + {\mu} \tau} }{0 \le s < \tau}{\frac{e}{e+{\mu} \tau} {\mu} e^{- {\mu} (s-\tau)}}{s \ge \tau} \end{IEEEeqnarray*} \end{theorem}} \begin{Proof}{Theorem \thmref{fTopthSopt}} See the development leading to the statement of \equat{maxI}. \end{Proof} The only remaining question is whether for interval-limited inputs, the exponential first-passage time density, to quote \cite{bits-Qs} ``plays the same role ... that Gaussian noise plays in additive noise channels.'' Unfortunately the answer is no, a result we state as a theorem: {\em \begin{theorem} {\bf \boldmath For $T$ Constrained to $[0,\tau]$, the Minmax Mutual Information First-Passage Density Is NOT Exponential:} \thmlabel{minmax} If $g(\cdot)$ is a first passage density with mean $1/\mu$ and $f_T(\cdot)$ can be nonzero only on $[0,\tau]$, then \begin{IEEEeqnarray*}{c} \operatorname*{arg\,min}_{g(\cdot)} \left [ \max_{f_T(\cdot)} I(S;T) \right ] = g^*(s) \ne \mu e^{-\mu s} u(s) \end{IEEEeqnarray*} where $u(\cdot)$ is the unit step function. \end{theorem}} \begin{Proof}{Theorem \thmref{minmax}} Consider that \begin{IEEEeqnarray}{c} I(S;T) = \int \int f_T(t) g(s-t) \frac{g(s-t)}{f_S(s)} dt ds \label{eq:mutualinfodef} \end{IEEEeqnarray} is convex in $g(\cdot)$ \cite{cover,gallagerit}. Since we constrain $g(\cdot)$ to be non-negative with mean $1/\mu$ and unit integral, we can apply Euler-Lagrange variational techniques \cite{hild}. That is, we set $q(x) = g(x) + \epsilon \eta(x)$ where $\eta(x)$ is any function defined on $[0,\infty)$, and look for the stationary point \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\frac{d}{d\epsilon} \left [ \int \int f_T(t) q(s-t) \frac{ q(s-t) }{\int f_T(x) q(s-x) dx} dt ds \right .} \nonumber \\ & + & \left . a \left ( \int s q(s) ds - \frac{1}{\mu} \right ) + b \left (\int q(s) ds - 1 \right ) \right ]_{\epsilon = 0} =0 \IEEEeqnarraynumspace \label{eq:eulerlagrange} \end{IEEEeqnarray} where $a$ and $b$ are (Lagrange) multipliers. Satisfaction of \equat{eulerlagrange} for any possible $\eta(\cdot)$ requires (after expansion and a change of coordinate systems in the double integral) that \begin{IEEEeqnarray}{c} \log g(s) = \int_0^\tau f_T(t) \log f_S(s+t) dt + a s + b \label{eq:variationalg} \end{IEEEeqnarray} for the $g(\cdot)$ that minimizes \equat{mutualinfodef}. Now, from \Thmref{fTopthSopt} we know the form of the optimizing $f_T(t)$, $t \in [0,\tau]$ and the resulting $f_S(s)$ were $g(\cdot)$ exponential with mean $1/\mu$. We also know that $I(S;T)$ is concave in $f_T(t)$\cite{cover,gallagerit}. Thus, were exponential $g(\cdot)$ to minimize the maximum mutual information, the left hand side of \equat{variationalg} would be a linear function of $s$. Thus, the integral term on the right would also need to be a linear function of $s$ given $f_S(s)$ as in \equat{optimumS} and $f_T(t)$ as in \equat{optimalfT}. For $s \ge \tau$ we have $f_S(s+t) = \frac{\mu e}{e + \mu \tau} e^{ - \mu (s+t-\tau)}$ and thence \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\int_0^\tau f_T(t) \log f_S(s+t) dt} \nonumber \\ \quad & =& \int_{0}^{\tau} \frac{ \left ( \delta(t) + \mu + \delta(t-\tau)(e-1) \right ) (-\mu (s+t-\tau))}{e + \mu \tau} dt \nonumber \\ & + & \log\frac{\mu e}{e + \mu \tau} \nonumber \\ & = & \frac{\mu \tau - \mu s e}{e + \mu \tau} - \frac{\mu^2}{e + \mu \tau} \left . \frac{(s+t - \tau)^2}{2} \right |_0^\tau + \log\frac{\mu e}{e + \mu \tau} \nonumber \\ & = & \log\frac{\mu e}{e + \mu \tau} +\frac{\mu \tau - \mu s e}{e + \mu \tau} - \frac{\mu^2}{e + \mu \tau} \left ( s \tau - \frac{\tau^2}{2} \right ) \end{IEEEeqnarray} which is indeed a linear function of $s$. However, when $0 \le s < \tau$ we obtain \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\int_0^\tau f_T(t) \log f_S(s+t) dt} \nonumber \\ \quad & =& \int_0^{\tau - s} \left (\frac{\delta(t)}{e + \mu\tau} + \frac{\mu}{e + \mu \tau} \right ) \log \frac{\mu}{e + \mu \tau} dt \nonumber \\ & + & \int_{\tau - s}^{\tau} \left ( \frac{\mu}{e + \mu \tau} + \frac{\delta(t-\tau)(e-1)}{e + \mu \tau} \right ) \log \frac{\mu e}{e + \mu \tau} dt \nonumber \\ & - & \int_{\tau - s}^{\tau} \left ( \frac{\mu}{e + \mu \tau} + \frac{\delta(t-\tau)(e-1)}{e + \mu \tau} \right ) \mu (s+t-\tau) dt \nonumber \\ & =& \frac{1 + \mu (\tau - s)}{e + \mu \tau} \log \frac{\mu}{e + \mu \tau} + \frac{\mu s +e - 1}{e + \mu \tau} \log \frac{\mu e}{e + \mu \tau} \nonumber \\ & - & \frac{\mu s (e-1)}{e + \mu \tau} - \frac{\mu^2}{e + \mu \tau} \left . \frac{(s+t-\tau)^2}{2}\right |_{\tau-s}^\tau \nonumber \\ & = & \log \frac{\mu}{e + \mu \tau} + \frac{2\mu s + e(1- \mu s) - 1}{e + \mu \tau} - \frac{\mu^2}{e + \mu \tau} \frac{s^2}{2} \IEEEeqnarraynumspace \end{IEEEeqnarray} which does not have the requisite form owing to the term in $s^2$. Therefore, for $T$ constrained to $[0,\tau]$, the minmax $I(S;T)$ first-passage density, $g(\cdot)$, is not exponential. \end{Proof} It is important to note that owing to a faulty proof \cite{isit11}, exponential first passage was previously claimed to maximally suppress capacity of the constrained-launch channel. \Thmref{minmax} corrects this error. \section{Ordering Entropy, $H(\Omega|\vec{{\bf S}},{\bf T})$} In this section we derive a number of results for the ordering entropy, $H(\Omega|\vec{{\bf S}},{\bf T})$, both generally and for exponential first-passage. As a prelude, we recall from section~\ref{sect:brief} and TABLE~\ref{table:glossary} that $\vec{\tv} = \{\vec{t}_1, \vec{t}_2, \cdots, \vec{t}_M \}$ is the ordered version of ${\bf t} = \{t_1, t_2, \cdots, t_M\}$, the launch times, and that $G(\cdot)$ is the cumulative distribution function (CDF) for the first-passage time $D$ (with ${\bar{G}}(\cdot)$ its complementary cumulative distribution function (CCDF). We recall from Part-I \cite{RoseMian16_1} that $H(\Omega|\vec{{\bf S}},{\bf t}) \le {H^{\uparrow}}({\bf t})$ from \equat{HOHupineq} with ${H^{\uparrow}}({\bf t})$ defined as in \equat{Hexpurg3}. We also recall from Part-I that $\bar{{\bf x}}$ is a binary vector of dimension $m$ and $\sum_{|\bar{{\bf x}}| = \ell}$ is a sum over all $\bar{{\bf x}}$ containing exactly $\ell$ $1$'s. The inequality in \equat{HOinequality} is an equality {\bf iff} first-passage is exponential with ${\bar{G}}(x) = e^{-{\mu} x} u(x)$, where $u(x)$ is the unit step function (Theorem 9, Part-I). \subsection{General Calculation of ${H^{\uparrow}}({\bf t})$} \label{app:Hup} To calculate ${H^{\uparrow}}({\bf t})$ we first define \begin{IEEEeqnarray}{c} \label{eq:thetadef} \Theta_{m,\ell}(\vec{\tv}) \equiv \sum_{|\bar{{\bf x}}| = \ell} \prod_{j=1}^m \bar{G}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1 -\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) \IEEEeqnarraynumspace \end{IEEEeqnarray} which implies via \equat{Hexpurg3} that \begin{IEEEeqnarray}{c} \label{eq:Hexpurg4} {H^{\uparrow}}({\bf t}) = \sum_{\ell=1}^{M-1} \log(1 + \ell) \sum_{m=\ell}^{M-1} \Theta_{m,\ell}(\vec{\tv}) \end{IEEEeqnarray} \blankout{Please note that we have assumed that $t_1 \le t_2 \le \cdots \le t_m$ -- important because although $\left | \Omega \right |_{{\bf s},{\bf t}}$ is hypersymmetric in ${\bf t}$, ${H^{\uparrow}}({\bf t})$ is {\em not}.} In principle, we could derive ${H^{\uparrow}}({\bf T})$ by taking the expectation of \equat{Hexpurg4} with respect to ordered emission times, $\vec{\tv}$. However, direct {\em analytic} evaluation of ${H^{\uparrow}}({\bf T})$ requires we derive joint order densities on the underlying ${\bf T}$, a difficult task in general when the individual $\{T_m \}$ are not necessarily independent. So, we take a different approach. The sum over all permutations of binary vector $\bar{{\bf x}}$ in the definition of $\Theta_{m,\ell}(\vec{\tv})$ (\equat{thetadef}) renders it hypersymmetric in $\vec{t}_1 , \cdots , \vec{t}_m$ given the $(m+1)^{\mbox{st}}$ smallest emission time $\vec{t}_{m+1}$. That is, $\Theta_{m,\ell}(\vec{\tv}) = \Theta_{m,\ell}(P_k(\vec{t}_1, \cdots,\vec{t}_m), \vec{t}_{m+1})$ for any permutation function $k$ so long as $\vec{t}_{m+1}$ is fixed. In what follows we therefore drop the over-vector notation for the $t_1, t_2, \cdots, t_m$ and assume all are less than $\vec{t}_{m+1}$. Therefore, by \equat{hyperexpect} we can define $E[\Theta_{m,\ell}] = \bar{\Theta}_{m,\ell}$ as \begin{IEEEeqnarray}{c} E_{{\vec{T}}_{m+1}} \left [ E_{T_1,\cdots,T_m|{\vec{T}}_{m+1}} \left [ \Theta_{m,\ell}(T_1,\cdots,T_m,{\vec{T}}_{m+1}) \right ] \right ] \IEEEeqnarraynumspace \label{eq:Hhyper} \end{IEEEeqnarray} Then, the CDF, $F_{\vec{T}_{m+1}} (t_{m+1})$, of the $(m+1)^{\mbox{st}}$ smallest emission time is \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{F_{\vec{T}_{m+1}} (t_{m+1})} \nonumber \\ \quad & = & 1 - \displaystyle \sum_{k=0}^{m} {M \choose k} \underbrace{ \int_{{\bf 0}}^{\bf t_{m+1}} }_{\mbox{$k$}} \underbrace{ \int_{\bf t_{m+1}}^{{\boldsymbol{\infty}}} }_{\mbox{$M-k$}} f_{{\bf T}}({\bf t}) dt_M \cdots dt_{1} \IEEEeqnarraynumspace \label{eq:ftvm} \end{IEEEeqnarray} and likewise, the CDF, $F_{T_1,\cdots,T_m|{\vec{T}}_{m+1}} (t_1,\cdots,t_m|\vec{t}_{m+1})$, of the smallest {\em unordered} $T_1,\cdots,T_m$ given $\vec{T}_{m+1}$ is \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{F_{T_1,\cdots,T_m|{\vec{T}}_{m+1}} (t_1,\cdots,t_m|\vec{t}_{m+1})} \nonumber \\ \quad & = & \frac{F_{T_1,\cdots,T_m} (t_1,\cdots,t_m)}{F_{T_1,\cdots,T_m} (\vec{t}_{m+1},\cdots,\vec{t}_{m+1})} \end{IEEEeqnarray} $\forall t_j \le \vec{t}_{m+1}$ where $j=1,\cdots,m$. Therefore, by the hypersymmetry of ${\Theta}_{m,\ell}$ in $t_1,\cdots,t_m$ we may write $\bar{\Theta}_{m,\ell}$ as \begin{IEEEeqnarray}{c} \int_0^{\infty} {\bf \int}_{{\bf 0}}^{{\bf t_{m+1}}} \frac{f_{\vec{T}_{m+1}}(t_{m+1}) f_{{\bf T_m}}({\bf t_m})B(m,\ell,{\bf t})}{F_{{\bf T_m}}(t_{m+1},\cdots,t_{m+1})} d{\bf t_m} dt_{m+1} \IEEEeqnarraynumspace \label{eq:Thbardef} \end{IEEEeqnarray} where ${\bf T_m} = \{T_1, \cdots, T_M \}$, ${\bf t_m} = \{T_1, \cdots, t_M \}$ and \begin{IEEEeqnarray}{c} \label{eq:Bdef} B(m,\ell,{\bf t}) \equiv {m \choose \ell} \!\prod_{j=1}^{\ell} \!\bar{G}(t_{m+1} \!-\! t_j)\!\!\prod_{k=\ell+1}^m \!G(t_{m+1} \!-\! t_k) \IEEEeqnarraynumspace \end{IEEEeqnarray} and thence \begin{equation} \label{eq:He1} {H^{\uparrow}}({\bf T}) = \sum_{\ell=1}^{M-1} \log(1 + \ell) \sum_{m=\ell}^{M-1} \bar{\Theta}_{m,\ell} \end{equation} In addition, if we define \begin{equation} \label{eq:Gamma} \Gamma_{M,\ell} = \sum_{m=\ell}^{M-1} \bar{\Theta}_{m,\ell} \end{equation} and \begin{equation} \label{eq:DeltaGamma} \Delta\Gamma_{M,\ell} = \Gamma_{M,\ell} - \Gamma_{M,\ell+1} \end{equation} then we can also express ${H^{\uparrow}}({\bf T})$ as \begin{equation} \label{eq:He2} {H^{\uparrow}}({\bf T}) = \sum_{\ell=1}^{M-1} \Delta\Gamma_{M,\ell} \log (\ell + 1)! \end{equation} The development starting in section~\ref{app:Hup} proves the following theorem: {\em \begin{theorem}{\bf The General Form of ${H^{\uparrow}}({\bf T})$:} \thmlabel{HupGeneral} If we define $$ \Gamma_{M,\ell} = \sum_{m=\ell}^{M-1} \bar{\Theta}_{m,\ell} $$ and $$ \Delta\Gamma_{M,\ell} = \Gamma_{M,\ell} - \Gamma_{M,\ell+1} $$ where $\bar{\Theta}_{m,\ell}$ is as defined by \equats{Thbardef} and \equat{Bdef}. \blankout{\begin{IEEEeqnarray*}{c} \begin{array}{l} \bar{\Theta}_{m,\ell} = \displaystyle \int_0^{\infty} f_{\vec{T}_{m+1}}(t_{m+1}) \times\\ \displaystyle {\bf \int}_{{\bf 0}}^{{\bf t_{m+1}}} \left [ \begin{array}{c} \displaystyle \frac{f_{T_1,\cdots,T_m}(t_1,\cdots,t_m)}{F_{T_1,\cdots,T_m}(t_{m+1},\cdots,t_{m+1})}\\ {\mbox{\Large \boldmath $\times$} }\\ B(m,\ell,{\bf t}) \end{array} \right ] dt_1 \cdots dt_{m+1} \end{array} \end{IEEEeqnarray*}} \blankout{ \begin{IEEEeqnarray}{c} \int_0^{\infty} {\bf \int}_{{\bf 0}}^{{\bf t_{m+1}}} \frac{f_{\vec{T}_{m+1}}(t_{m+1}) f_{{\bf T_m}}({\bf t_m})B(m,\ell,{\bf t})}{F_{{\bf T_m}}(t_{m+1},\cdots,t_{m+1})} {\bf dt_m} dt_{m+1} \IEEEeqnarraynumspace \end{IEEEeqnarray}} \blankout{ \begin{IEEEeqnarray*}{c} \begin{array}{rcl} \bar{\Theta}_{m,\ell} & = & \displaystyle \int_0^{\infty} f_{\vec{T}_{m+1}}(t_{m+1}) \displaystyle {\bf \int}_{{\bf 0}}^{{\bf t_{m+1}}} \\ & \times & \displaystyle \frac{f_{T_1,\cdots,T_m}(t_1,\cdots,t_m)}{F_{T_1,\cdots,T_m}(t_{m+1},\cdots,t_{m+1})} B(m,\ell,{\bf t}) dt_1 \cdots dt_{m+1} \end{array} \end{IEEEeqnarray*}} \blankout{and \begin{IEEEeqnarray*}{c} B(m,\ell,{\bf t}) \equiv {m \choose \ell} \prod_{j=1}^{\ell} \bar{G}(t_{m+1} - t_j) \prod_{k=\ell+1}^m G(t_{m+1} - t_k) \IEEEeqnarraynumspace \end{IEEEeqnarray*}} then we can express ${H^{\uparrow}}({\bf T})$ as \begin{IEEEeqnarray*}{c} {H^{\uparrow}}({\bf T}) = \sum_{\ell=1}^{M-1} \Delta\Gamma_{M,\ell} \log (\ell + 1)! \end{IEEEeqnarray*} \end{theorem}} \begin{Proof}{Theorem \thmref{HupGeneral}} See the development starting in section~\ref{app:Hup} leading to the statement of \Thmref{HupGeneral}. \end{Proof} This concludes our calculation of ${H^{\uparrow}}({\bf T})$ for general input distributions $f_{{\bf T}}(\cdot)$. The key utility of our formulation is that it does not require joint order distributions for the $\{ T_m\}$, only the more easily calculable $m^{\mbox{th}}$ order distribution for ${\vec{T}}_m$. We now turn to the case where the ${\bf T}$ are i.i.d. -- important because i.i.d. ${\bf T}$ increases entropy $h({\bf S})$. \subsection{$H(\Omega|\vec{{\bf S}},{\bf T})$ for General IID ${\bf T}$} \label{app:HupIID} With i.i.d. ${\bf T}$, we can use the definition of $\Theta_{m,\ell}(\cdot)$ in \equat{thetadef} and the hypersymmetric result of \equat{Hhyper} to obtain \begin{IEEEeqnarray}{c} \bar{\Theta}_{m, \ell} = E_{{\vec{T}}_{m+1}} \left [ \begin{array}{c} {m \choose \ell} E_{T \le {\vec{T}}_{m+1}}^{\ell} \left [ \bar{G}({\vec{T}}_{m+1} - T) \right ]\\ {\mbox{\large \boldmath $\times$} }\\ E_{T \le {\vec{T}}_{m+1}}^{m-\ell} \left [ (1 - \bar{G}({\vec{T}}_{m+1} - T)) \right ] \end{array} \right ] \IEEEeqnarraynumspace \label{eq:thetabariid} \end{IEEEeqnarray} From the definition of $F_{{\vec{T}}{m+1}}(\cdot)$ in \equat{ftvm} we obtain \begin{IEEEeqnarray}{c} f_{{{\vec{T}}}_{m+1}}(t) = \frac{d}{dt} \left [ 1 - \sum_{k=0}^{m} {M \choose k} F_T^k(t)(1-F_T(t))^{M-k} \right ] \IEEEeqnarraynumspace \end{IEEEeqnarray} which after rearranging as a telescoping sum simplifies to \begin{IEEEeqnarray}{c} \sum_{k=0}^{m} (M-k) {M \choose k} f_T(t)F_T^k(t)(1-F_T(t))^{M-k-1} \nonumber\\ - \displaystyle \sum_{k=0}^{m-1} (k+1) {M \choose {k+1}} f_T(t)F_T^{k}(t)(1-F_T(t))^{M-k-1} \IEEEeqnarraynumspace \end{IEEEeqnarray} which further simplifies to \begin{IEEEeqnarray}{c} (m+1) {M \choose {m+1}} f_T(t)F_T^m(t)(1-F_T(t))^{M-m-1} \IEEEeqnarraynumspace \end{IEEEeqnarray} We then define \begin{IEEEeqnarray}{c} \label{eq:phidef} \phi(t) = \int_0^t f_T(x) \bar{G}(t-x) dx \end{IEEEeqnarray} and \begin{IEEEeqnarray*}{c} \int_0^t f_T(x) (1- \bar{G}(t-x)) dx = F_T(t) - \phi(t) \end{IEEEeqnarray*} which allows us to write \begin{IEEEeqnarray*}{c} \phi({\vec{T}}_{m+1}) = E_{T \le {\vec{T}}_{m+1}} \left [ \bar{G}({\vec{T}}_{m+1} - T) \right ] \end{IEEEeqnarray*} and \begin{IEEEeqnarray*}{c} F_T(t) - \phi({\vec{T}}_{m+1}) = E_{T \le {\vec{T}}_{m+1}} \left [ 1 - \bar{G}({\vec{T}}_{m+1} - T) \right ] \end{IEEEeqnarray*} which upon substitution into \equat{thetabariid} allows us to write $\bar{\Theta}_{m,\ell}$ as \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\bar{\Theta}_{m,\ell} = (m+1) {M \choose {m+1}} {m \choose {\ell}} } \nonumber \\ \quad & \times & \displaystyle \int_0^{\infty} \left [ \begin{array}{c} f_T(t)(1-F_T(t))^{M-m-1} \phi^{\ell} (t)\\ {\mbox{\large \boldmath $\times$} }\\ (F_T(t)-\phi(t))^{m-\ell} \end{array} \right ] dt \end{IEEEeqnarray} and then as \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\bar{\Theta}_{m,\ell} = M {{M -1} \choose \ell} {{M - \ell - 1} \choose {m- \ell}} } \nonumber \\ \quad & \times & \begin{array}{c} \displaystyle \int_0^{\infty} \left [ \begin{array}{c} f_T(t)(1-F_T(t))^{M-m-1} \phi^{\ell} (t)\\ {\mbox{\large \boldmath $\times$} }\\ (F_T(t)-\phi(t))^{m-\ell} \end{array} \right ] dt \end{array} \IEEEeqnarraynumspace \label{eq:thetaml} \end{IEEEeqnarray} To evaluate ${H^{\uparrow}}({\bf T})$ in \equat{He2} we must first compute $\Gamma_{M,\ell} =\sum_{m=\ell}^{M-1} \bar{\Theta}_{m,\ell}$ as \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\Gamma_{M,\ell} = M {{M -1} \choose \ell} } \nonumber \\ \quad & \times & \int_0^{\infty} f_T(t) \left [ \begin{array}{c} (1- F_T(t))^{M-1} \left ( \frac{\phi(t)}{F_T(t) - \phi(t)} \right )^{\ell}\\ {\mbox{\large \boldmath $\times$} }\\ {\displaystyle \sum_{m=\ell}^{M-1}} {{M - \ell - 1} \choose {m- \ell}} \left ( \frac{F_T(t)-\phi(t)}{1 - F_T(t)} \right )^{m} \end{array} \right ] dt \IEEEeqnarraynumspace \end{IEEEeqnarray} which we rewrite as \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\Gamma_{M,\ell} = M {{M \!-\!1} \choose \ell} } \nonumber \\ \quad & \times & \int_0^{\infty} \! \!f_T(t) \left [ \begin{array}{c} (1\!-\! F_T(t))^{M\!-\!1} \left ( \frac{\phi(t)}{F_T(t) - \phi(t)} \right )^{\ell}\\ {\mbox{\large \boldmath $\times$} }\\ {\displaystyle\sum_{m=0}^{M\!-\!1\!-\!\ell}} {{M \!- \!\ell \!- \!1} \choose {m}} \left ( \frac{F_T(t)-\phi(t)}{1 - F_T(t)} \right )^{m\!+\!\ell} \end{array} \right ] dt \IEEEeqnarraynumspace \end{IEEEeqnarray} \blankout{ \begin{IEEEeqnarray*}{c} \begin{array}{c} M {{M -1} \choose \ell}\\ {\mbox{\large \boldmath $\times$} }\\ \displaystyle \int_0^{\infty} f_T(t) \left [ \begin{array}{c} (1- F_T(t))^{M-1} \left ( \frac{\phi(t)}{F_T(t) - \phi(t)} \right )^{\ell}\\ {\mbox{\large \boldmath $\times$} }\\ {\displaystyle\sum_{m=0}^{M\!-\!1\!-\!\ell}} {{M \!- \!\ell \!- \!1} \choose {m}} \left ( \frac{F_T(t)-\phi(t)}{1 - F_T(t)} \right )^{m+\ell} \end{array} \right ] dt \end{array} \end{IEEEeqnarray*}} We consolidate the binomial sum to obtain \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\Gamma_{M,\ell} = M {{M \!-\!1} \choose \ell} } \nonumber \\ \quad & \times & \int_0^{\infty} \!\!f_T(t) \left [ \begin{array}{c} (1\!-\! F_T(t))^{M\!-1} \left ( \frac{\phi(t)}{F_T(t) \!-\! \phi(t)} \right )^{\ell}\\ {\mbox{\large \boldmath $\times$} }\\ \left ( \frac{F_T(t)-\phi(t)}{1\! -\! F_T(t)} \right )^{\ell} \left ( \frac{1-\phi(t)}{1 \!-\! F_T(t)} \right )^{M\!-1\!-\!\ell} \end{array} \right ] dt \IEEEeqnarraynumspace \end{IEEEeqnarray} which reduces to \begin{IEEEeqnarray}{c} \label{eq:gammaML} \Gamma_{M,\ell} = \int_0^{\infty} \!\!M {{M\!-\!1} \choose \ell} f_T(t) \phi^{\ell}(t) \left ( 1 \!- \!\phi(t) \right )^{M\!-1\!-\ell} dt \IEEEeqnarraynumspace \end{IEEEeqnarray} for $\ell = 1,2,\cdots,M-1$. Now consider the integrand of the difference $\Gamma_{M,\ell} - \Gamma_{M,\ell+1}$ where we drop the $t$ dependence for notational convenience \begin{IEEEeqnarray*}{c} \Gamma_{M,\ell} - \Gamma_{M,\ell+1} = \left [ \begin{array}{c} M {{M-1} \choose \ell} \phi^{\ell} \left ( 1 -\phi \right )^{M-\ell-1}\\ {\mbox{\large \boldmath $-$} }\\ M {{M\-\!1} \choose {\ell\!+\!1}} \phi^{\ell+1} \left ( 1 \!-\!\phi \right )^{M\!-\!\ell-2} \end{array} \right ] \end{IEEEeqnarray*} We can rewrite this expression as \begin{IEEEeqnarray*}{c} M \phi^{\ell} \left [ {{M\!-\!1} \choose \ell} \!+\! \sum_{r=1}^{M\!-\!\ell\! -\!1} \!\!(-1)^r \phi^r \left [ \begin{array}{c} {{M-1} \choose \ell} {{M\!-\!\ell\! -\! 1} \choose r} \\ {\mbox{\large \boldmath $+$} }\\ {{M\!-\!1} \choose {\ell\!+\!1}} {{M\!-\!\ell\! - \!2} \choose {r\!-\!1}} \end{array} \right ] \right ] \end{IEEEeqnarray*} which after consolidating terms becomes \begin{IEEEeqnarray*}{c} M \phi^{\ell} \left [ \begin{array}{c} {{M-1} \choose \ell}\\ \mbox{ }\\ {\mbox{\large \boldmath $+$}} \\ \frac{1}{M} {{M} \choose {\ell+1}} {\displaystyle \sum_{r=1}^{M-\ell -1}} (-1)^r {{M-\ell -1} \choose {r}} (\ell+r+1) \phi^r \end{array} \right ] \end{IEEEeqnarray*} Extending the sum to $r=0$ and subtracting the $r=0$ term produces \begin{IEEEeqnarray*}{c} {{M} \choose {\ell+1}} \sum_{r=0}^{M-\ell -1} (-1)^r {{M-\ell -1} \choose {r}} (\ell+r+1) \phi^{r+\ell} \end{IEEEeqnarray*} which can be recognized as \begin{IEEEeqnarray*}{c} \frac{d}{d\phi} \left [ {{M} \choose {\ell+1}} \sum_{r=0}^{M-\ell -1} (-1)^r {{M-\ell -1} \choose {r}} \phi^{r+\ell+1} \right ] \end{IEEEeqnarray*} and then reduced to \begin{IEEEeqnarray*}{c} {{M} \choose {\ell+1}} \frac{d}{d\phi} \left [ \phi^{\ell+1} (1-\phi)^{M-\ell - 1} \right ] \end{IEEEeqnarray*} so that we have $\Delta\Gamma_{M,\ell}$ as \begin{IEEEeqnarray}{c} \label{eq:Gammadiffiid} {{M} \choose {\ell\!+\!1}} \sum_{r=0}^{M\!-\!\ell\! -\!1} \!\!(-1)^r {{M\!-\!\ell\! -\!1} \choose {r}} (\ell\!+\!r\!+\!1) E \left [ \phi^{r\!+\!\ell}(t) \right ] \IEEEeqnarraynumspace \end{IEEEeqnarray} where $E[\cdot]$ is the expectation using $f_T(t)$. The previous development of section~\ref{app:HupIID} proves the following theorem: {\em \begin{theorem} {\bf \boldmath An Upper Bound for Ordering Entropy $H(\Omega|\vec{{\bf S}},{\bf T})$ with I.I.D. ${\bf T}$:} \thmlabel{DeltaGamma} If ${\bf T}$ is i.i.d., then we can write $\Delta\Gamma_{M,\ell}$ as \begin{IEEEeqnarray*}{c} {{M} \choose {\ell\!+\!1}} \sum_{r=0}^{M\!-\!\ell\! -\!1} \!\!(-1)^r {{M\!-\!\ell\! -\!1} \choose {r}} (\ell\!+\!r\!+\!1) E \left [ \phi^{r\!+\!\ell}(t) \right ] \end{IEEEeqnarray*} where \begin{IEEEeqnarray*}{c} \phi(t) = \int_0^t f_T(x) \bar{G}(t-x) dx \end{IEEEeqnarray*} so that \begin{IEEEeqnarray*}{c} H(\Omega|\vec{{\bf S}},{\bf T}) \le {H^{\uparrow}}({\bf T}) = \sum_{\ell=1}^{M-1} \Delta\Gamma_{M,\ell} \log (\ell + 1)! \end{IEEEeqnarray*} \end{theorem}} \begin{Proof}{Theorem \thmref{DeltaGamma}} See the development of section~\ref{app:HupIID} leading to the statement of \Thmref{DeltaGamma}. \end{Proof} \subsection{$H(\Omega|\vec{{\bf S}},{\bf T})$ Special Case IID ${\bf T}$} \label{sect:specialcaseHO} Here we derive expressions for $H(\Omega|\vec{{\bf S}},{\bf T})$ when the i.i.d. input distribution is that which maximizes $I({\bf S};{\bf T})$. We consider the following cases: \begin{itemize} \item Exponential first-passage with $E[T] = \tau$ \item Exponential first-passage with emission deadline, $\tau$ \end{itemize} \subsubsection{Exponential Transit Times with a Mean Constraint} For exponential first-passage times with mean $1/{\mu}$, the probability density of ${\bf T}$ that maximizes $h({\bf S})$ subject to a mean constraint $E[\sum_m T_m] \le M\tau$ is i.i.d. with marginal \begin{IEEEeqnarray}{c} \label{eq:fThSoptmean} f_{T_m}(t) = a\delta(t) + {\mu} a(1-a) e^{-{{\mu}}a t} u(t) \end{IEEEeqnarray} where $a = 1/({\mu} \tau + 1)$ \cite{bits-Qs} and $u(t)$ is the unit step function \cite{bits-Qs}. For exponential transit we have \begin{IEEEeqnarray*}{c} \bar{G}(t) = e^{-{\mu} t} u(t) \end{IEEEeqnarray*} \blankout{ \begin{IEEEeqnarray*}{c} 1- F_T(t) = (1-a)e^{- a {\mu} t} \end{IEEEeqnarray*} } and thereby \begin{IEEEeqnarray*}{c} \phi(t) = \int_0^t f_T(x) \bar{G}(t-x) dx = a e^{-{\mu} a t} u(t) \end{IEEEeqnarray*} We then require an expression for $E_T[\phi^k(T)]$. Remembering that $\int_{0^-}^{0^+} \delta (t) u^k(t) dt = \frac{1}{k+1}$ we obtain \begin{IEEEeqnarray*}{c} E_T[\phi^k(T)] = \int_0^{\infty} f_T(t) a^k e^{-k{\mu} a t} u^k(t) dt = \frac{a^k}{k+1} \end{IEEEeqnarray*} so that \equat{Gammadiffiid} becomes \begin{IEEEeqnarray*}{c} \Delta\Gamma_{M,\ell} = {{M} \choose {\ell+1}} \sum_{r=0}^{M-\ell -1} (-1)^r {{M-\ell -1} \choose {r}} a^{r+\ell} \end{IEEEeqnarray*} which reduces to \begin{IEEEeqnarray}{c} \label{eq:Gammadiffexp} \Delta\Gamma_{M,\ell} = {M \choose \ell+1} a^\ell (1-a)^{M-\ell - 1} \end{IEEEeqnarray} for $\ell = 1,2,\cdots,M-1$. With $a = \frac{1}{{\mu} \tau + 1}$ we can write $H(\Omega|\vec{{\bf S}},{\bf T})$ as \begin{IEEEeqnarray}{c} \label{eq:HOexpgeomform} ({\mu} \tau + 1) \sum_{k=0}^M \log(k!) {M \choose k} \left (\frac{{\mu} \tau}{{\mu} \tau + 1} \right )^{M-k} \left (\frac{1}{{\mu} \tau + 1} \right )^k \IEEEeqnarraynumspace \end{IEEEeqnarray} which is the expectation of $({\mu} \tau + 1) \log K!$ for a binomial random variable $K$ with parameters $M$ and $\frac{1}{{\mu} \tau + 1}$, or \begin{IEEEeqnarray}{c} \label{eq:HOexpgeomformA} H(\Omega|\vec{{\bf S}},{\bf T}) = ({\mu} \tau + 1) E_K \left [ \log K! \right ] \end{IEEEeqnarray} We restate this result as a theorem: {\em \begin{theorem}{\bf \boldmath $H(\Omega|\vec{{\bf S}},{\bf T})$ for Exponential First-Passage with a Mean Constraint ($E[T] = \tau$):} \thmlabel{HOmaxmean} For $T$ distributed as \equat{fThSoptmean} and exponential first-passage with parameter ${\mu}$, we have \begin{IEEEeqnarray*}{c} H(\Omega|\vec{{\bf S}},{\bf T}) = ({\mu} \tau + 1) E_K \left [ \log K! \right ] \end{IEEEeqnarray*} where $K$ is a binomial random variable with parameters $M$ and $\frac{1}{1+{\mu} \tau}$. \end{theorem}} \begin{Proof}{Theorem \thmref{HOmaxmean}} See the development leading to the statement of \Thmref{HOmaxmean} and direct application of \Thmref{HupGeneral}. \end{Proof} \subsubsection{Exponential Transit Times with a Deadline} \Thmref{fTopthSopt} states that if $T$ is constrained to $[0,\tau]$ then the $f_T(t)$ that maximizes $h(S)$ (and therefore $h({\bf S})$ when in i.i.d. form) is \begin{IEEEeqnarray}{c} \label{eq:fThSoptdeadline} f_{T}(t) = {\frac{1}{e + {\mu} \tau} \delta(t) + \frac{{\mu}}{e + {\mu} \tau} + \frac{e-1}{e + {\mu} \tau} \delta(t-\tau)} \end{IEEEeqnarray} for $t \in [0,\tau]$ and zero otherwise. To obtain the corresponding $H(\Omega|\vec{{\bf S}},{\bf T}) = {H^{\uparrow}}({\bf T})$ we calculate $\phi(t)$ as \begin{IEEEeqnarray}{c} \label{eq:phiISalmostfs} \int_0^{t} f_T(x) e^{-{\mu} (t-x)} dx = \threedef{ {\frac{1} {e + {\mu} \tau}}}{0\le t \le \tau} {\frac{e}{e + {\mu} \tau} e^{-{\mu} (t - {\mu} \tau)}}{t > \tau}{0}{\mbox{o.w.}} \end{IEEEeqnarray} Once again, we require an expression for the integral $\int_0^{\infty} f_T(t) \phi^k(t)dt$, and again remembering that $\int_{0^-}^{0^+} \delta (t) u^k(t) dt = \frac{1}{k+1}$ we obtain $E_T \left [ \phi^k(T) \right ]$ as \begin{IEEEeqnarray*}{c} \left (\frac{1}{e+{\mu} \tau} \right )^{k+1} {\displaystyle \int_{0^-}^{0^+} } \delta(t) u^k(t) dt \\ + \\ {\mu}\left (\frac{1}{e+{\mu} \tau} \right )^{k+1} \int_0^{\tau} dt\\ +\\ (e\!-\!1)\left ( \frac{1}{e\!+\!{\mu} \tau} \right )^{k\!+\!1} \!\!{\displaystyle \int_{\tau^-}^{\tau^+} } \!\!\delta(t-\tau) \left ( 1\! +\! (e\!-\!1)u(t\!-\!\tau) \right )^k dt \end{IEEEeqnarray*} which reduces to \begin{IEEEeqnarray*}{c} \left (\frac{1}{e+{\mu} \tau} \right )^{k+1} \left [ \frac{1}{k+1} + {\mu} \tau + \sum_{r=0}^k {k \choose r} \frac{1}{r+1} (e-1)^{r+1} \right ] \end{IEEEeqnarray*} which further reduces to \begin{IEEEeqnarray*}{c} \left (\frac{1}{e+{\mu} \tau} \right )^{k+1} \left [ \frac{1}{k+1} + {\mu} \tau + \frac{e^{k+1}}{k+1} - \frac{1}{k+1} \right] \end{IEEEeqnarray*} and then finally, \begin{IEEEeqnarray*}{c} E_T \left [ \phi^k(T) \right ] = \left (\frac{1}{e+{\mu} \tau} \right )^{k+1} \left [ {\mu} \tau + \frac{e^{k+1}}{k+1} \right] \end{IEEEeqnarray*} so that $\Delta\Gamma_{M,\ell}$ in \equat{Gammadiffiid} becomes \begin{IEEEeqnarray*}{c} {{M} \choose {\ell\!+\!1}} \displaystyle \sum_{r=0}^{M\!-\!\ell\! -\!1} \left [ \begin{array}{c} (-1)^r {{M-\ell -1} \choose {r}}\\ \times \\ \!\!(\ell\!+\!r\!+\!1) \left (\frac{1}{e+{\mu} \tau} \right )^{r\!+\!\ell\!+\!1} \!\!\left [ {\mu} \tau \!+\! \frac{e^{r+\ell+1}}{r+\ell+1} \right] \end{array} \right ] \end{IEEEeqnarray*} which reduces to \begin{IEEEeqnarray*}{c} {{M} \choose {\ell+1}} \left (\frac{e}{e+{\mu} \tau} \right )^{\ell+1} \left (\frac{{\mu} \tau}{e+{\mu} \tau} \right )^{M-\ell-1}\\ {\mbox{\large \boldmath $+$}}\\ {\mu} \tau {{M} \choose {\ell+1}} \displaystyle \sum_{r=0}^{M-\ell -1} \left [ \begin{array}{c} (-1)^r {{M-\ell -1} \choose {r}}\\ \times\\ (\ell+r+1) \left (\frac{1}{e+{\mu} \tau} \right )^{r+\ell+1} \end{array} \right ] \end{IEEEeqnarray*} and then to \begin{IEEEeqnarray*}{c} {{M} \choose {\ell+1}} \left (\frac{e}{e+{\mu} \tau} \right )^{\ell+1} \left (\frac{{\mu} \tau}{e+{\mu} \tau} \right )^{M-\ell-1}\\ {\mbox{\large \boldmath $+$}}\\ \left [ \begin{array}{c} {\mu} \tau {{M} \choose {\ell+1}} \left (1 - \frac{1}{e+{\mu} \tau} \right )^{M-\ell -2}\\ \times \\ \left (\frac{1}{e+{\mu} \tau} \right )^{\ell +1} \left ( \ell + 1 -\frac{M}{e+{\mu} \tau} \right ) \end{array} \right ] \end{IEEEeqnarray*} If we define $k = \ell +1$ and then \begin{IEEEeqnarray*}{c} p_1 = \frac{e}{e+{\mu} \tau} \end{IEEEeqnarray*} and \begin{IEEEeqnarray*}{c} p_2 = \frac{1}{e+{\mu} \tau} \end{IEEEeqnarray*} we can then write \begin{IEEEeqnarray}{c} \label{eq:Gammadiffuniform} \Delta\Gamma_{M,k-1} = \left [ \begin{array}{c} {M \choose k} p_1^k (1-p_1)^{M-k}\\ {\mbox{\large \boldmath $+$}}\\ \frac{{\mu} \tau }{1-p_2} \left [ k - \frac{M}{{\mu} \tau + e} \right ] {M \choose k} p_2^k (1-p_2)^{M-k} \end{array} \right ] \IEEEeqnarraynumspace \end{IEEEeqnarray} Now if we define random variables $K_i$ to be binomial with parameters $M$ and $p_i$, the following theorem results from direct application of \Thmref{HupGeneral}: {\em \begin{theorem}{\bf \boldmath $H(\Omega|\vec{{\bf S}},{\bf T})$ for Exponential First-Passage with a Launch Deadline (${\bf T} \in [0,\tau]^M$):} \thmlabel{HOmaxdeadline} For $T$ distributed as \equat{fThSoptdeadline} we have \begin{IEEEeqnarray}{c} \label{eq:HOexpgeomform2} H(\Omega|\vec{{\bf S}},{\bf T}) = \!\left [ \!\!\begin{array}{c} E_{K_1} \left [ \log K_1! \right ] \!+\! \frac{{\mu} \tau}{1-p_2} E_{K_2} \left [ K_2 \log K_2! \right ]\\ {\mbox{\large \boldmath $-$}}\\ \frac{{\mu} \tau M }{(1-p_2)({\mu} \tau + e)} E_{K_2} \left [ \log K_2! \right ] \end{array} \! \!\right ] \IEEEeqnarraynumspace \end{IEEEeqnarray} where $K_1$ is a binomial random variable with parameters $M$ and $\frac{e}{e+{\mu} \tau}$ and $K_2$ is a binomial random variable with parameters $M$ and $\frac{1}{e+{\mu} \tau}$. \end{theorem}} \begin{Proof}{Theorem \thmref{HOmaxdeadline}} See the development leading to the statement of \Thmref{HOmaxdeadline} and direct application of \Thmref{HupGeneral}. \end{Proof} \subsection{Asymptotic $H(\Omega|\vec{{\bf S}},{\bf T})/M$ For Exponential First-Passage} We are interested in asymptotic values of $H(\Omega|\vec{{\bf S}},{\bf T})/M$ owing to our definition of capacity per token in \equat{Cqdef} (see also in Part-I \cite{RoseMian16_1}). To that end, recall that ${\lambda} \tau = M$ and we define $\rho = {\lambda}/{\mu}$, a measure of system token ``load'' (also a proxy for power expenditure in units of energy per passage time), so that \begin{IEEEeqnarray*}{c} \frac{1}{1 + {\mu} M/{\lambda}} = \frac{1}{1 + M/\rho} \end{IEEEeqnarray*} and likewise \begin{IEEEeqnarray*}{c} \frac{e}{e + {\mu} M/{\lambda}} = \frac{e}{e + M/\rho} \end{IEEEeqnarray*} and \begin{IEEEeqnarray*}{c} \frac{1}{e + {\mu} M/{\lambda}} = \frac{1}{e + M/\rho} \end{IEEEeqnarray*} Now, remember the binomial distribution for fixed $k$ and large $M$ is approximated by \begin{IEEEeqnarray*}{c} {M \choose k} p^k (1-p)^{M-k} \approx \frac{M^k}{k!} p^k (1-p)^{M-k} \end{IEEEeqnarray*} So, for any finite $k$ it is easily seen that for $M \rightarrow \infty$ \begin{IEEEeqnarray}{c} \label{eq:limit1} {M \choose k} \left ( \frac{1}{1 + \frac{M}{\rho}} \right )^k \left (1 - \frac{1}{1 + \frac{M}{\rho}} \right )^{M-k} \rightarrow e^{-\rho} \frac{1}{k!} \rho^k \IEEEeqnarraynumspace \end{IEEEeqnarray} \begin{IEEEeqnarray}{c} \label{eq:limit2} {M \choose k} \left ( \frac{1}{e + \frac{M}{\rho}} \right )^k \left (1 - \frac{1}{e + \frac{M}{\rho}} \right )^{M-k} \rightarrow e^{-\rho} \frac{1}{k!} \rho^k \IEEEeqnarraynumspace \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} \label{eq:limit3} {M \choose k} \left ( \frac{e}{e + \frac{M}{\rho}} \right )^k \left (1 - \frac{e}{e + \frac{M}{\rho}} \right )^{M-k} \rightarrow e^{-\rho e} \frac{1}{k!} \rho^k e^k \IEEEeqnarraynumspace \end{IEEEeqnarray} and we note that all these limiting distributions are Poisson. \Equat{HOexpgeomformA} and \equat{HOexpgeomform2} can then be combined with \equat{limit1}, \equat{limit2} and \equat{limit3} to produce the following two theorems: {\em \begin{theorem}{\bf \boldmath Asymptotic $H(\Omega|\vec{{\bf S}},{\bf T})/M$ for Exponential First-Passage with a Mean Constraint ($E[T] = \tau$):} \thmlabel{HOasymptmean} For exponential first-passage with $E[T] = \tau$ and $f_T(\cdot)$ as given in \equat{fThSoptmean}, $H(\Omega|\vec{{\bf S}},{\bf T})$ is given by \begin{IEEEeqnarray}{c} \label{eq:HOiidmean} \lim_{M \rightarrow \infty} \frac{H(\Omega|\vec{{\bf S}},{\bf T})}{M} = e^{-\rho} \sum_{k=2}^{\infty} \rho^{k-1} \frac{\log k!}{k!} = E[\frac{\log k!}{\rho}] \IEEEeqnarraynumspace \end{IEEEeqnarray} where the final expectation is for $k$ a Poisson random variable with parameter $\rho$. \end{theorem}} \begin{Proof}{Theorem \thmref{HOasymptmean}} See \Thmref{HOmaxmean} and the development leading up to the statement of \Thmref{HOasymptmean}. \end{Proof} {\em \begin{theorem}{\bf \boldmath Asymptotic $H(\Omega|\vec{{\bf S}},{\bf T})/M$ for Exponential First-Passage with a Deadline Constraint ($T \in [0,\tau]$)} \thmlabel{HOasymptdeadline} For exponential first-passage with ${\bf T} \in [0,M/\rho]^M$ and $f_T(\cdot)$ as given in \equat{fThSoptdeadline}, $H(\Omega|\vec{{\bf S}},{\bf T})$ is given by \begin{IEEEeqnarray}{c} \label{eq:HOiiddeadline} \lim_{M \rightarrow \infty} \frac{H(\Omega|\vec{{\bf S}},{\bf T})}{M} = E[ (\frac{k}{\rho} - 1) \log k!] \IEEEeqnarraynumspace \end{IEEEeqnarray} where the final expectation is for $k$ a Poisson random variable with parameter $\rho$. \end{theorem}} \begin{Proof}{Theorem \thmref{HOasymptdeadline}} See \Thmref{HOmaxdeadline} and the development leading up to the statement of \Thmref{HOasymptmean}. \end{Proof} \blankout{ \section{Lower Bound on $C_q$} {\em \begin{theorem} {\bf \boldmath A Lower Bound on $C_q$:} \thmlabel{Ilowbound} If the first-passage density $f_D(\cdot)$ is exponential with parameter ${\mu}$ and ${\lambda}$ is the constant average rate at which tokens are released (${\lambda} \equiv \lim_{M \rightarrow \infty}\frac{M}{\tau(M)}$) then the capacity \cite{isit13} per token, $C_q$, obeys \begin{IEEEeqnarray}{c} \label{eq:Cmdown} C_q \ge -\log \rho + e^{-\rho} {\displaystyle \sum_{k=1}^{\infty}} {\rho}^k (\frac{k}{\rho} - 1) \frac{\log k!}{k!} \end{IEEEeqnarray} where $\rho \equiv \frac{{\lambda}}{{\mu}}$. \end{theorem}} \begin{Proof}{Theorem \thmref{Ilowbound}} See development leading to \Thmref{Ilowbound}. \end{Proof} We can rewrite \equat{Cmdown} more compactly by noting that \begin{IEEEeqnarray*}{rCl} \begin{array}{rcl} {\displaystyle \sum_{k=1}^{\infty}} \rho^k (\frac{k}{\rho} - 1) \frac{\log k!}{k!} & = & {\displaystyle \sum_{\ell=1}^{\infty}} \log \ell {\displaystyle \sum_{k=\ell}^{\infty}} \rho^k \frac{(\frac{k}{\rho} - 1)}{k!} \end{array} \end{IEEEeqnarray*} Then \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} \left (\rho \right )^k \frac{1}{k!} = e^{\rho} - \sum_{k=0}^{\ell - 1} \left (\rho \right )^k \frac{1}{k!} \end{IEEEeqnarray*} and \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} k/ \rho \left (\rho \right )^k \frac{1}{k!} = \sum_{k=\ell-1}^{\infty} \left (\rho \right )^k \frac{1}{k!} \end{IEEEeqnarray*} \blankout{ which leads to \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} (k/\rho - 1)\left (\rho \right )^k \frac{1}{k!} = \sum_{k=\ell-1}^{\infty} \left (\rho \right )^k \frac{1}{k!} + \sum_{k=0}^{\ell - 1} \left (\rho \right )^k \frac{1}{k!} - e^{\rho} \end{IEEEeqnarray*}} can be used to obtain \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} \left (\rho \right )^k \frac{(k/\rho - 1)}{k!} = \frac{1}{(\ell - 1)!} \left (\rho \right )^{\ell -1} = \ell \left (\rho \right )^{\ell} \frac{1}{\rho \ell!} \end{IEEEeqnarray*} We can then define the probability mass function $ p_\ell = e^{-\rho} \left (\rho \right )^\ell \frac{1}{\ell!} $, $\ell = 0, 1, \cdots, \infty$ to obtain the more compact \begin{IEEEeqnarray}{c} \label{eq:HOsimple} {\displaystyle \sum_{k=1}^{\infty}} \left (\rho \right )^k (k/ \rho - 1) \frac{\log k!}{k!} = \frac{1}{\rho} E_\ell \left [ (\ell \log \ell) \right ] \end{IEEEeqnarray} so that \equat{Cmdown} becomes \begin{IEEEeqnarray}{c} \label{eq:Cmdownsimple} C_m \ge -\log \rho + \frac{1}{\rho} E_\ell \left [ (\ell \log \ell) \right ] \end{IEEEeqnarray} } \blankout{ \section{Simple Lower Bound for $C_q$} We can derive a simple lower bound on $C_q(M)$ by noting that \equat{orderedMI_decomp} and the definition of \equat{pertokenCtauM} with $\tau(M)$ produces \begin{IEEEeqnarray}{c} \label{eq:RtauMboundsimple} \begin{array}{rcl} C_q(M) & = & \max_{f_{{\bf T}}(\cdot)} \left [ I({\bf S};{\bf T}) + H(\Omega|\vec{{\bf S}},{\bf T}) \right ] - \log M!\\ & \ge & \max_{f_{{\bf T}}(\cdot)} I({\bf S};{\bf T}) - \log M! \end{array} \end{IEEEeqnarray} because $0 \le H(\Omega|\vec{{\bf S}},{\bf T}) \le M!$. From section~\ref{sect:minmaxhS} (and \cite{isit11}) we know that the univariate maximum $I(S;T)$ subject to $T \le \tau$ and a mean first-passage time ${\mu}^{-1}$ is also minimized when the mean first-passage time density $g(\cdot)$ is exponential with parameter ${\mu}$. We therefore have for any finite $M$ and a finite launch deadline $\tau(M)$, \begin{IEEEeqnarray}{c} \label{eq:Iminmaxdeadline} \max_{f_{{\bf T}}(\cdot)} I({\bf S};{\bf T}) \ge \min_{g(\cdot)} \max_{f_{{\bf T}}(\cdot)} I({\bf S};{\bf T}) = M \log \left (1 + \frac{{\lambda} \tau(M)}{e} \right ) \end{IEEEeqnarray} which means, \begin{IEEEeqnarray}{c} C_q(M) \ge \log \left (1 + \frac{{\lambda} \tau(M)}{e} \right ) - \frac{\log(M!)}{M} \end{IEEEeqnarray} for a launch deadline $\tau(M)$. Using $\rho = {\lambda}/{\mu}$ and Stirling's approximation, $\log M! = M \log M - M + O(\log(M))$ we have the following sequence of simplifications \begin{IEEEeqnarray*}{c} \begin{array}{c} \frac{1}{M} \left ( M \log \left ( 1 + \frac {{\lambda}}{{\lambda} e} M \right ) - \log M! \right )\\ \log \left ( 1 + \frac{{\lambda}}{{\lambda} e} M \right ) - \log M + 1 - \frac{1}{M}O(\log(M))\\ \log \left ( \frac{e}{M} + \frac{{\lambda}}{{\lambda}} \right ) - \frac{1}{M}O(\log(M)) \end{array} \end{IEEEeqnarray*} Defining $\rho = \frac{{\lambda}}{{\mu}}$, the ratio of the token uptake rate to the release rate, and then taking the limit as $M \rightarrow \infty$ we obtain \begin{IEEEeqnarray}{c} \lim_{M \rightarrow \infty} C_q(M) \ge -\log \rho \end{IEEEeqnarray} The above results prove the following theorem: {\em \begin{theorem} {\bf \boldmath A Simple Lower Bound for $C_q$:} \thmlabel{IDlowerbound} Given an average rate of signaling token production ${\lambda} = M/\tau$ and any i.i.d. first-passage time distribution with mean ${\mu}^{-1}$, the timing channel capacity $C_q(\rho)$ in nats per token obeys \begin{IEEEeqnarray}{c} \label{eq:Cqlo} C_{q}(\rho) \ge \max \left \{-\log\rho,0 \right \} \end{IEEEeqnarray} where $\rho = \frac{{\lambda}}{{\mu}}$ \end{theorem}} \begin{Proof}{Theorem \thmref{IDlowerbound}} See development leading to \Thmref{IDlowerbound}. \end{Proof} We emphasize that the Theorem \thmref{IDlowerbound} bound is {\em general} and applies to {\em any} first-passage time density $g(\cdot)$ with mean ${\mu}^{-1}$. } \section{Upper Bound for $I(\vec{{\bf S}};{\bf T})$} \label{sect:upperI} With analytic bounds for $H(\Omega|\vec{{\bf S}},{\bf T})$, we can now consider bounds on the mutual information, $I(\vec{{\bf S}};{\bf T})$. In Part-I (using results from this, Part-II) lower bounds were derived. Here we consider an upper bound. To begin, however, we must find an upper bound for $H(\Omega|\vec{{\bf S}},{\bf T})$. \subsection{A Useful Upper Bound On $H(\Omega|\vec{{\bf S}},{\bf T}$)} \label{sect:upperHO} We state the bound as a theorem with proof. {\em \begin{theorem} {\bf \boldmath An Upper Bound for $H(\Omega|\vec{{\bf S}},{\bf T})$:} \thmlabel{HOgamma} Given \begin{IEEEeqnarray}{c} Q(\cdot) = {\bar{G}}(|\cdot|) \end{IEEEeqnarray} where ${\bar{G}}(\cdot)$ is the CCDF of the passage time, and defining \begin{IEEEeqnarray}{c} \label{eq:gamma} \gamma_T = E_{{\bf T}} \left [ Q(T_1 - T_2) \right ] \end{IEEEeqnarray} we have \begin{IEEEeqnarray}{c} \label{eq:Homega_bound} H(\Omega|\vec{{\bf S}},{\bf T}) \le E_{{\bf T}}\left [ {H^{\uparrow}}({\bf T}) \right ] \le M \log \left ( 1 + \frac{M-1}{2} \gamma_T \right ) \IEEEeqnarraynumspace \end{IEEEeqnarray} \end{theorem}} \begin{Proof}{Theorem \thmref{HOgamma}} ${H^{\uparrow}}({\bf t})$, defined in \equat{Hexpurg3} and derived in Part-I \cite{RoseMian16_1, SonRos13} is an upper bound for $H(\Omega|\vec{{\bf S}},\vec{\tv})$. The bound is satisfied with equality {\bf iff} the first-passage density is exponential \cite{RoseMian16_1,SonRos13}. For a given $m$, let us define ${\bar{G}}_k = {\bar{G}}(\vec{t}_{m+1} - \vec{t}_k)$ and $G_k$ in a corresponding way. Then, consider the sum of the following $2^m$ terms \begin{IEEEeqnarray*}{c} {\bar{G}}_{m} {\bar{G}}_{m-1} {\bar{G}}_{m-2} \cdots {\bar{G}}_3 {\bar{G}}_2 {\bar{G}}_1\\ +\\ {\bar{G}}_{m} {\bar{G}}_{m-1} {\bar{G}}_{m-2} \cdots {\bar{G}}_3 {\bar{G}}_2 G_1\\ +\\ \vdots\\ +\\ G_{m} G_{m-1} G_{m-2} \cdots G_3 G_2 {\bar{G}}_1\\ +\\ G_{m} G_{m-1} G_{m-2} \cdots G_3 G_2 G_1 \end{IEEEeqnarray*} Taken pairwise it is easy to see that this sum telescopes to $1$ since ${\bar{G}}_i + G_i = 1$ so that the ensemble of terms is a PMF. Furthermore, since $m = 1,2, \cdots, M$, the complete ensemble of the terms, $\prod_{j=1}^m {\bar{G}}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1-\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j)$, $m=1,2,\cdots, M$, sums to $M$. So, we can define \begin{IEEEeqnarray}{c} \label{eq:pellm} p_{\ell|\vec{\tv},m} = \sum_{|\bar{{\bf x}}| = \ell} \prod_{j=1}^m {{\bar{G}}}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1 -\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) \IEEEeqnarraynumspace \end{IEEEeqnarray} and then \begin{IEEEeqnarray}{c} \label{eq:pell} p_{\ell|\vec{\tv}} = \sum_{m=\ell}^{M-1} \sum_{|\bar{{\bf x}}| = \ell} \prod_{j=1}^m \frac{{{\bar{G}}}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1 -\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j)}{M} \IEEEeqnarraynumspace \end{IEEEeqnarray} for $\ell = 0, 1, \cdots, M-1$. We can use Jensen's inequality to write \begin{IEEEeqnarray}{c} \label{eq:hup} {H^{\uparrow}}({\bf t}) = E_{\ell|\vec{\tv}} \left [\log(1+\ell) \right ] \le M \log (E[\ell|\vec{\tv}] + 1) \end{IEEEeqnarray} Now consider that \begin{IEEEeqnarray*}{c} E[\ell|\vec{\tv}] = \sum_{m=0}^{M-1} \frac{1}{M} E[\ell|\vec{\tv},m] \end{IEEEeqnarray*} and the explicit expansion of $E[\ell|\vec{\tv},m]$ is \begin{IEEEeqnarray}{c} \label{eq:El} \sum_{\ell=0}^m \ell \mbox{\small $ \left ( {\displaystyle \sum_{|\bar{{\bf x}}| = \ell} \prod_{j=1}^m} {{{\bar{G}}}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) {G}^{1- \bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j)} \right )$} \IEEEeqnarraynumspace \end{IEEEeqnarray} Then consider that $E[\ell| \vec{\tv},m]$ has the terms \begin{IEEEeqnarray*}{c} \label{eq:Elgroup} \left . 0 \times \left [ \begin{array}{c} G_{m} G_{m-1} G_{m-2} \cdots G_3 G_3 G_1 \nonumber \\ \end{array} \right ] \right \} {\mbox{$1$ term}} \end{IEEEeqnarray*} \begin{IEEEeqnarray*}{c} \left . 1 \times \left [ \begin{array}{c} G_{m} G_{m-1} G_{m-2} \cdots G_3 G_2 {\bar{G}}_1\nonumber \\ +\nonumber \\ G_{m} G_{m-1} G_{m-2} \cdots G_3 {\bar{G}}_2 G_1\nonumber \\ +\nonumber \\ \vdots\nonumber \\ +\nonumber \\ {\bar{G}}_{m} G_{m-1} G_{m-2} \cdots G_3 G_2 G_1 \end{array} \right ] \right \} {\mbox{$m$ terms}} \end{IEEEeqnarray*} \begin{IEEEeqnarray*}{c} \left . 2 \times \left [ \begin{array}{c} G_{m} G_{m-1} G_{m-2} \cdots G_3 {\bar{G}}_2 {\bar{G}}_1\nonumber \\ +\nonumber \\ \vdots\nonumber \\ +\nonumber \\ {\bar{G}}_{m} {\bar{G}}_{m-1} G_{m-2} \cdots G_3 G_2 G_1 \end{array} \right ] \right \}{\mbox{${m \choose 2}$ terms}} \end{IEEEeqnarray*} with final term \begin{IEEEeqnarray*}{c} \left . m \times \left [ \begin{array}{c} {\bar{G}}_{m} {\bar{G}}_{m-1} {\bar{G}}_{m-2} \cdots {\bar{G}}_{3} {\bar{G}}_{2}{\bar{G}}_1 \\ \end{array} \right ] \right \}{\mbox{$1$ term}} \end{IEEEeqnarray*} Then consider the term $G_{m} G_{m-1} G_{m-2} \cdots G_2 {\bar{G}}_1$ and group together the other $2^{m-1} - 1$ different terms that contain ${\bar{G}}_1$. The sum of all these terms is ${\bar{G}}_1$. We can do a corresponding grouping for each of the $m$ terms in which ${\bar{G}}_i$ appears exactly once. Thus, by expanding and regrouping the inner product terms of \equat{El} we can show that \begin{IEEEeqnarray*}{c} E[\ell|\vec{\tv},m] = \sum_{j=1}^m {{\bar{G}}}(\vec{t}_{m+1} - \vec{t}_j) \end{IEEEeqnarray*} which results in \begin{IEEEeqnarray*}{c} {H^{\uparrow}}({\bf t}) \le M \log \left ( 1 + \frac{1}{M} \sum_{m=1}^{M-1} \sum_{j=1}^m {{\bar{G}}}(\vec{t}_{m+1} - \vec{t}_j) \right ) \end{IEEEeqnarray*} via \equat{pell} and \equat{hup}, remembering that $E[\ell|\vec{\tv},m=0] = 0$. Taking the expectation in $\vec{{\bf T}}$ yields \begin{IEEEeqnarray}{c} \label{eq:EHup} {H^{\uparrow}}({\bf T}) \le M \log \left ( 1 + \sum_{m=1}^{M-1} \sum_{j=1}^m \frac{E \left[ {{\bar{G}}}({\vec{T}}_{m+1} - {\vec{T}}_j) \right ]}{M} \right ) \IEEEeqnarraynumspace \end{IEEEeqnarray} We then note that all ordered differences between the $T_i$ are accounted for in \equat{EHup}. For any given ${\bf T}$ there are $\frac{M(M-1)}{2}$ ordered terms. Thus, we can rewrite \equat{EHup} as \begin{IEEEeqnarray}{c} \label{eq:EHup2} E_{\vec{{\bf T}}}\left [ {H^{\uparrow}}({\bf T}) \right ] \le M \log \left ( 1 + \sum_{i,j, i \ne j}^M \frac{E \left[ {{\bar{G}}}(\left |T_i - T_j \right |) \right ]}{2M} \right ) \IEEEeqnarraynumspace \end{IEEEeqnarray} where the factor of $\frac{1}{2}$ is introduced to account for terms $T_i < T_j$ which would not appear in the ordered case of \equat{EHup}. Finally, hypersymmetry of ${\bf T}$ requires that $E \left[ {{\bar{G}}}(\left |T_i - T_j \right |) \right ] = \gamma_T$, a constant for $i\ne j$ so that \begin{IEEEeqnarray*}{c} H(\Omega|\vec{{\bf S}},{\bf T}) \le E_{\vec{{\bf T}}}\left [ {H^{\uparrow}}({\bf T}) \right ] \le M \log \left ( 1 + \frac{M-1}{2} \gamma_T \right ) \end{IEEEeqnarray*} which matches the result stated in Theorem \thmref{HOgamma} and thus proves the theorem. \end{Proof} \subsection{Maximizing $h({\bf S}) + M \log \left ( 1 + \gamma_S (M-1) \right )$} We now have the rudiments of an upper bound for $I(\vec{{\bf S}};{\bf T})$ in \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{\max_{f_{{\bf T}}(\cdot)} \frac{I(\vec{{\bf S}};{\bf T})}{M}} \nonumber \\ \quad & \le & \frac{h({\bf S})}{M} + \log \left ( 1 + \gamma_S (M-1) \right ) - \frac{\log M!}{M} - h(D) \IEEEeqnarraynumspace \end{IEEEeqnarray} However, the upper bound \equat{Homega_bound} is in terms of $f_{{\bf T}}(\cdot)$ whereas $h({\bf S})$ is a function(al) of $f_{{\bf S}}(\cdot)$. Therefore, we must develop a relationship between $\gamma_T = E \left [ Q(T_1 - T_2) \right ]$ and $\gamma_S = E \left [ Q(S_1 - S_2) \right ]$. This relationship allows us to fix $\gamma_S$ and maximize $h({\bf S})$ while still maintaining an upper bound on $H(\Omega|\vec{{\bf S}},\vec{{\bf T}})$. From here onward we assume exponential first-passage of tokens. {\em \begin{theorem} {\bf \boldmath $\gamma_T$ versus $\gamma_S$ for Exponential First-Passage:} \thmlabel{EQTS} If the first-passage density $f_D(\cdot)$ is exponential then \begin{IEEEeqnarray*}{c} E \left [ Q(S_1 - S_2) \right ] \ge \frac{1}{2} E \left [ Q(T_1 - T_2) \right ] \end{IEEEeqnarray*} or \begin{IEEEeqnarray*}{c} \gamma_S \ge \frac{1}{2} \gamma_T \end{IEEEeqnarray*} \end{theorem}} \begin{Proof}{Theorem \thmref{EQTS}} Let $\Delta = T_1 - T_2$ and ${\cal D} = D_2 - D_1$. Then $\Delta+{\cal D} = S_1 - S_2$. For the i.i.d. $D_i$ exponential we have ${{\bar{G}}}(d) = e^{-{\lambda} d}$, $d \ge 0$. Thus, $Q(\cdot)= e^{-{\lambda} |\cdot|}$. We then note that $|a+b| \le |a| + |b|$ so that \begin{IEEEeqnarray*}{rCl} E[Q(\Delta+{\cal D})] & = & E[e^{-{\lambda} | \Delta+{\cal D} |}]\\ & \ge & E[e^{-{\lambda} |\Delta| -{\lambda} |{\cal D} |}]\\ & = & E[Q(\Delta)]E[Q({\cal D})] \end{IEEEeqnarray*} because $\Delta$ and ${\cal D}$ are independent. Then consider that the density of ${\cal D}$ is $f_{\cal D}({\cdot}) = \frac{{\lambda}}{2}e^{-{\lambda} |{\cdot}|}$ so that $E[Q({\cal D})] = \int_{=\infty}^\infty \frac{{\lambda}}{2}e^{-{\lambda} |z|} e^{-{\lambda}|z|} dz = \frac{1}{2}$ which completes the proof. \end{Proof} Now, suppose we fix $E \left [ Q(S_1 - S_2) \right ] = \gamma_S$. Then, owing to hypersymmetry we have $E \left [ Q(S_i - S_j) \right ] = \gamma_S$ $\forall i,j,i \ne j$. Using standard Euler-Lagrange optimization \cite{hild}, we can find the density $f_{{\bf S}}$ which maximizes $h({\bf S})$ as \begin{IEEEeqnarray}{c} f_{{\bf S}}^* ({\bf s}) = \frac{1}{A(\beta)} e^{\beta \sum_{\stackrel{i,j}{i \ne j}}Q(s_i - s_j)} \end{IEEEeqnarray} where \begin{IEEEeqnarray}{c} A(\beta) = \int e^{\beta \sum_{\stackrel{i,j}{i\ne j}}Q(s_i - s_j)} d{\bf s} \end{IEEEeqnarray} and $\beta$ is a constant chosen to satisfy $E[Q(S_1 - S_2)] = \gamma_S$. The entropy of ${\bf S}$ is then \begin{IEEEeqnarray}{c} h({\bf S}) = \log A(\beta) - \beta M(M-1) \gamma_S \end{IEEEeqnarray} We note that for $\beta=0$, $f_{{\bf S}}(\cdot)$ is uniform. Increasing $\beta$ makes $f_{{\bf S}}(\cdot)$ more ``peaky'' in regions where $s_i \approx s_j$ since $Q(0)=1$ and $Q(\cdot)$ is monotonically decreasing away from zero. Likewise, decreasing $\beta$ reduces $f_{{\bf S}}(\cdot)$ in the vicinity of $s_i \approx s_j$. Thus, $\gamma_S$ increases monotonically with $\beta$. The result is that $\gamma_S^{\prime}(\cdot)$ is strictly positive. More formally, we have from the definition of $\gamma_S(\beta)$ that \begin{IEEEeqnarray*}{c} M(M-1)\gamma_S(\beta) = E\left [\sum_{\stackrel{i,j}{i\ne j}}Q(s_i - s_j) \right ] \equiv \Gamma_S(\beta) \end{IEEEeqnarray*} Then \begin{IEEEeqnarray}{c} \label{eq:variance} \Gamma_S^{\prime}(\beta) \!=\! E\!\!\left [ \!\!\left ( \! \sum_{\stackrel{i,j}{i\ne j}}\!Q(s_i\! - \!s_j) \!\right )^{\!2} \right ] \!-\! E^2 \!\!\left [\sum_{\stackrel{i,j}{i\ne j}}\!Q(s_i\! -\! s_j) \! \right ] \IEEEeqnarraynumspace \end{IEEEeqnarray} which is a variance and therefore greater than or equal to zero. Thus, $\gamma_S^{\prime}(\beta) \ge 0$. And since $0 \le \gamma_S(\beta) \le 1$, we must also have $\gamma_S^{\prime}(\beta) \rightarrow 0$ in the limits $\beta \rightarrow \pm \infty$. Now, consider all terms as functions of $\beta$ as in \begin{IEEEeqnarray}{c} \label{eq:Ibeta} \begin{array}{rcl} I(\vec{{\bf S}};{\bf T}) & \le & \log A(\beta) - \beta M(M-1)\gamma_S(\beta) \\ & + & M \log \left ( 1 + \gamma_S(\beta)(M-1) \right )\\ & - & h({\bf S}|{\bf T}) - \log M! \end{array} \end{IEEEeqnarray} We can find extremal points by differentiating \equat{Ibeta} with respect to $\beta$ to obtain the first derivative \begin{IEEEeqnarray*}{c} M(M-1) \gamma^{\prime}_S (\beta) \left ( -\beta + \frac{1}{1 + \gamma_S(\beta)(M-1)} \right ) \end{IEEEeqnarray*} and the second derivative \begin{IEEEeqnarray*}{c} \begin{array}{c} M(M-1)\gamma^{\prime\prime}_S(\beta) \left ( -\beta + \frac{1}{1 + \gamma_S(\beta)(M-1)} \right )\\ +\\ -M(M-1) \gamma^{\prime}_S (\beta) \left ( 1 + (M-1)\frac{\gamma^{\prime}_S(\beta)}{\left ( 1 + \gamma_S(\beta)(M-1) \right )^2} \right ) \end{array} \end{IEEEeqnarray*} which when the first derivative is zero reduces to \begin{IEEEeqnarray*}{c} -M(M-1) \gamma^{\prime}_S (\beta) \left ( 1 + (M-1) \begin{array}{c} \frac{\gamma^{\prime}_S(\beta)}{\left ( 1 + \gamma_S(\beta)(M-1) \right )^2} \end{array} \right ) \le 0 \IEEEeqnarraynumspace \end{IEEEeqnarray*} We then have \begin{IEEEeqnarray}{c} \label{eq:betastar} \gamma_S^* = \gamma_S({\beta^*}) = \frac{1 - {\beta^*}}{(M-1){\beta^*}} \end{IEEEeqnarray} and note that \equat{betastar} requires $\frac{1}{M} \le {\beta^*} \le 1$ since $0 \le \gamma_S(\beta) \le 1$. In addition, there is at most one solution to \equat{betastar} since $\frac{1 - {\beta^*}}{(M-1){\beta^*}}$ monotonically decreases in $\beta$ while $\gamma_S(\beta)$ monotonically increases in $\beta$. Since the second derivative at the extremal is non-positive, the unique point defined by \equat{betastar} is a maximum. Unfortunately, solutions to \equat{betastar} have no closed form and numerical solutions for asymptotically large $M$ are impractical. Nonetheless, the constraints on ${\beta^*}$ will allow an oblique approach to deriving a bound. We note again that $\Gamma_S^{\prime}(\beta)$, is the variance of $\sum_{i\ne j}Q(s_i - s_i)$ and must decrease monotonically in $\beta$ since as previously discussed, increased $\beta$ concentrates $f_{{\bf S}}(\cdot)$ around larger values of $\sum_{i\ne j}Q(s_i - s_i)$. Thus, \begin{IEEEeqnarray}{c} \Gamma_S^{\prime}(\beta) \le \Gamma_S^{\prime}(0) \end{IEEEeqnarray} $\forall \beta > 0$ which in turn implies \begin{IEEEeqnarray}{c} \label{eq:diffeq} \Gamma_S(\beta) \le \beta \Gamma_S^{\prime}(0) + \Gamma_S(0) \end{IEEEeqnarray} $\forall \beta \in (0,1]$. Assuming exponential first-passage, $Q(x) = e^{-\mu|x|}$ and remembering that $\Gamma_S(\beta) = M(M-1)\gamma_S(\beta)$, we can calculate both $\gamma_S(0)$ and $\gamma_S^{\prime}(0)$ in closed form as \begin{IEEEeqnarray}{c} \label{eq:Gamma0} \gamma_S(0) = Z(\mu \tau) \equiv \frac{2}{(\mu \tau)^2} \left ( \mu \tau + e^{-\mu \tau} - 1 \right ) \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} \label{eq:Gammaprime0} \gamma_S^{\prime}(0) = \left [ \begin{array}{c} (M-2)(M-3) \gamma_S^2(0) + 2Z(2 \mu\tau)\\ + \\ 24\frac{M-2}{(\mu \tau)^3} \left ( \mu \tau - 2 + e^{-\mu \tau} (2 + \mu \tau) \right ) \\ -\\ M(M-1) \gamma_S^2(0) \end{array} \right ] \end{IEEEeqnarray} respectively. Defining $M = {\lambda} \tau$ and taking the limit for large $M$ yields \begin{IEEEeqnarray}{c} \label{eq:limgamma} \lim_{M \rightarrow \infty} M \gamma_S(0) = \frac{2{\lambda}}{{\mu}} = 2\rho \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} \label{eq:limgammaprime} \lim_{M \rightarrow \infty} (M-1)\gamma_S^{\prime}(0) = 8 \frac{{\lambda}^2}{\mu^2} + 2 \frac{{\lambda}}{\mu} = 8\rho^2 + 2\rho \end{IEEEeqnarray} where once again $\rho = \frac{{\lambda}}{{\mu}}$. Remembering that $\Gamma_S(\beta) = M(M-1)\gamma_S(\beta)$ and utilizing \equat{diffeq} we have \begin{IEEEeqnarray}{c} \label{eq:gammaprimemax} \gamma_S(0) \le \gamma_S({\beta^*}) \le \gamma_S^{\prime}(0) {\beta^*} + \gamma_S(0) \end{IEEEeqnarray} Thus, the $\gamma$-intercept of the monotonically decreasing $\frac{1-\beta}{(M-1)\beta}$ with the right hand side of \equat{gammaprimemax} must yield a value at least as large as $\gamma({\beta^*})$. To solve for this intercept we set \begin{IEEEeqnarray}{rCl} \frac{1-{\tilde{\beta}}}{(M-1){\tilde{\beta}}} & = & \gamma_S^{\prime}(0) {\tilde{\beta}} + \gamma_S(0) \nonumber \\ & = & \frac{1}{M-1} {\tilde{\beta}} \left ( {8\rho^2} + {2\rho} \right ) + {2\rho}\frac{1}{M} \IEEEeqnarraynumspace \end{IEEEeqnarray} so that in the limit of large $M$ we have \begin{IEEEeqnarray*}{c} {\tilde{\beta}} = \frac{\sqrt{1 + {12 \rho} +36 {\rho^2}} - (1 + {2\rho})}{{16 \rho^2} + {4\rho}} = \frac{1}{4 \rho + 1} \end{IEEEeqnarray*} which results in \begin{IEEEeqnarray}{c} \label{eq:tgamma} (M-1) \gamma({\beta^*}) \le \frac{1}{4 \rho + 1} \left (8 \rho^2 + 2 \rho \right ) + {2\rho} = 4 \rho \end{IEEEeqnarray} so that for large $M$ we have \begin{IEEEeqnarray}{rCl} I(\vec{{\bf S}};{\bf T}) & \le & \log A({\beta^*}) - {\beta^*} M (M-1)\gamma_S({\beta^*}) \nonumber\\ & + & M \log \left ( 1 + 4 \rho \right ) - h({\bf S}|{\bf T}) - \log M! \label{eq:Ibetamax1} \end{IEEEeqnarray} To complete the mutual information bound, we could then derive upper bounds on $A({\beta^*}) - {\beta^*} M (M-1)\gamma_S({\beta^*})$. However, in the limit of large $M = \tau/{\lambda}$, the density on ${\bf S}$ is effectively constrained to $({\bf 0}, {\boldsymbol{\tau}})$ \cite{isit13, RoseMian16_1} which constrains $h({\bf S}) \le M \log \tau$. Then, since $h({\bf S}|{\bf T}) = M (1-\log \mu)$ for exponential first-passage, \equat{Ibetamax1} produces mutual information per token \begin{IEEEeqnarray}{c} \label{eq:IupperoverM} \frac{I(\vec{{\bf S}};{\bf T})}{M} \le \log \tau - (1-\log \mu) + \log \left (1 + {4 \rho} \right ) - \frac{\log M!}{M} \IEEEeqnarraynumspace \end{IEEEeqnarray} Application of Stirling's approximation for large $M$ \begin{IEEEeqnarray}{c} \frac{\log M!}{M} \approx \log M - 1 \label{eq:stirling} \end{IEEEeqnarray} in combination with \equat{IupperoverM} produces our main theorem: {\em \begin{theorem}{\bf An Upper Bound on the Asymptotic Capacity per Token, $C_q$:} {\thmlabel{IupperoverM}} For exponential passage with mean first-passage time $1/\mu$ and token emission intensity ${\lambda}$, an upper bound for the asymptotic capacity per token is given by \begin{IEEEeqnarray}{c} C_q = \max_{f_{\bf T}(\cdot)} \lim_{M \rightarrow \infty} \frac{1}{M} I(\vec{{\bf S}};{\bf T}) \le \log \left (\frac{1}{\rho} + 4 \right ) \end{IEEEeqnarray} where $\rho = \frac{{\lambda}}{{\mu}}$. \end{theorem}} \begin{Proof}{\Thmref{IupperoverM}} Substitution of \equat{stirling} and $\tau = M/{\lambda}$ into \equat{IupperoverM} completes the proof. \end{Proof} \section{Discussion \& Conclusion} The timing channel \cite{bits-Qs, sundaresan1, sundaresan2, moewin16} is a building block upon which the information theory of the identical molecule/token timing channel is built. In this paper we considered a version of the timing channel were a single emission is restricted to an interval $[0,\tau]$ and we derived closed form expressions for the channel capacity under exponential first-passage as well as the optimal input (emission) distribution. We also established that unlike for the mean-constrained channel, exponential first-passage is {\em not} the worst case corruption. Building block though the single emission channel is, the identical molecule timing channel differs from previous models because which emission corresponds to which arrival is ambiguous expressly because travel time from sender to receiver is random and the molecules are identical. This ambiguity is captured by a quantity we define as the ``ordering entropy'' $H(\Omega|\vec{{\bf S}},{\bf T})$ and understanding its properties is critical to understanding the capacity of not only the molecular timing channel, but also channels where tokens/molecules may themselves carry information payloads -- portions of messages to be strung together at the receiver \cite{RoseMian16_1}. In the Part-I companion to this paper \cite{RoseMian16_1}, we carefully explored the information theory formulation of the problem to establish that the usual information $I({\bf S};{\bf T})$ is indeed the proper measure of information flow over this channel and its relationship to $H(\Omega|\vec{{\bf S}},{\bf T})$. In this paper, Part-II, we carefully explored the properties of $H(\Omega|\vec{{\bf S}},{\bf T})$, showing how it can be calculated without deriving full order distributions and deriving closed form expressions for cases where the emission times ${\bf T}$ are i.i.d. random variables. We then derived closed form expressions for the special cases of the input distribution being that which achieves capacity for the mean-constrained and the deadline-constrained timing channel with exponential first-passage and the asymptotic behavior $\lim_{M \rightarrow \infty} H(\Omega|\vec{{\bf S}},{\bf T})$. Our understanding of $H(\Omega|\vec{{\bf S}},{\bf T})$ then allowed derivation of lower bounds on timing channel capacity for exponential first passage (Part-I, Theorem 14) and here in Part-II, an upper bound for the molecular timing channel capacity. Although the machinery necessary to consider a mean-constrained version of the identical token timing channel was derived, capacity results were not pursued owing to our inability to derive an appropriate sequential channel use model with asymptotic independence. However, if physically parallel channels were used (so as to avoid corruption of one channel by arrivals from another), the results of \cite{bits-Qs} combined with \Thmref{HOmaxmean} might be used to derive upper and lower bounds analogous to those provided here and in Part-I \cite{RoseMian16_1}. This might prove interesting since the mean-constraint seems analytically simpler than the deadline constraint with respect to both the single-token entropy and capacity as well as the ordering entropy. \section*{Acknowledgments} Profound thanks are owed to A. Eckford, N. Farsad, S. Verd\'u and V. Poor for useful discussions and guidance. We are also extremely grateful to the editorial staff and the raft of especially careful and helpful anonymous reviewers. This work was supported in part by NSF Grant CDI-0835592. \bibliographystyle{unsrt}
{'timestamp': '2016-11-23T02:07:45', 'yymm': '1606', 'arxiv_id': '1606.05036', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05036'}
arxiv
\section{Introduction} The three principal resources typically required for developing a phoneme based automatic speech recognizer (ASR) are: transcribed acoustic data for acoustic model estimation, text data for language model estimation, and a pronunciation dictionary to map words to sequences of sub-word units. Manual preparation of such resources requires significant investment and expertise. Therefore, an automatic generation of pronunciation dictionary from the data is clearly required for many dialects and languages. Developing ASRs for dialects and under-resourced languages has attracted growing attention over the past few years \cite{Das2015,Qian2011, Besacier2014}. A main challenge to develop ASR for under-resourced domains is to produce a reliable pronunciation dictionary from limited available resources. For major languages, however, a canonical pronunciation dictionary is usually already available. However, such dictionaries may be error-prone due to the fact that they are manually generated and in most cases do not cover pronunciation variants. There were several attempts to tackle these problems \cite{Saraclar2000,Wester2003, Hain2005, Mcgraw2013}. Lu et al. \cite{Singh2002} proposed a data-driven dictionary generator to include new pronunciations based on newly coming acoustic evidence. Goel et al. in \cite{Ghoshal2010} use a grapheme-to-phoneme approach to guess the pronunciation and iteratively refine the acoustic model and the dictionary. However, these methods still require a high-quality initial pronunciation dictionary created by an expert. In modern ASRs words are represented by smaller sub-word units such as phonemes and the pronunciation dictionary maps words to sequences of sub-word units. However, sub-word units do not essentially need to be linguistically motivated elements. In fact, given a set of acoustic samples, the linguistically defined units are most probably not the optimal ones for speech recognition \cite{Naghibi2013}. For instance telephony speech, where high frequency components have been filtered out, requires a modified dictionary with slightly different set of fricatives than full-bandwidth speech. Over the past few years, there have been several attempts to move beyond phoneme based sub-word units by jointly learn a set of sub-word units and their corresponding dictionary directly from the given data \cite{Holter1997,Bacchiani1999,Singh2002}. Bacchiani and Ostendorf \cite{Bacchiani1999} proposed an iterative acoustic segmentation and clustering approach to build sub-word units from speech signals and subsequently construct the dictionary based on the estimated sub-word units. Singh et al. \cite{Singh2002} introduced a divide-and-conquer strategy to recursively update sub-word units and dictionary. The dictionary computation was done by means of an n-best type algorithm which is known to produce sub-optimal solutions. Although their approach demonstrates some promising results, the performance is still not comparable with a phoneme based ASR. The main focus of this paper is to design an ASR based on an automatically generated dictionary that outperforms commonly used phoneme based ASRs. While most of the solutions proposed to find a pronunciation based on multiple utterances of a word are n-best type heuristics \cite{Singh2002,Svendsen2004, Mokbel1999}, in this paper, we employ an approximation of the K-dimensional Viterbi algorithm proposed in our previous works \cite{Gerber2011, Naghibi2013}. This approach gives us the maximum-likelihood estimates of the pronunciations. These high-quality pronunciations are one of the key factors to outperform phoneme based ASRs. Moreover, to learn proper sub-word units, we combine the strength of Gaussian mixture models (GMM) and deep neural network (DNN) based acoustic modeling. We formulate this problem as an instance of a semi-supervised self-learning process. By taking advantage of the robustness of hidden Markov models (HMM) with GMM based observation probability distribution against labeling errors, we train the first set of sub-word units and output the first set of pronunciations. We then use this dictionary to re-label the data and employ the higher expressiveness of DNNs to improve the modeling of sub-word units and the dictionary in an iterative process. In each iteration round, a new dictionary is generated and by means of this new dictionary the data is re-labeled. This data is again used to train the DNN. As shown in the experiments, the proposed results achieves more than 10\% absolute improvement over the phoneme based approach on TIMIT data in a continuous speech recognition task. The reminder of this paper is organized as follows. The proposed framework and its components for joint sub-word units and dictionary learning are introduced in Section~\ref{sec:methods}. In Section~\ref{sec:exper} the experimental results are demonstrated and finally, conclusions are summarized in Section \ref{sec:concl}. \section{Semi-supervised joint Dictionary and Acoustic Model Learning} \label{sec:methods} \subsection{Framework} In the rest of this paper, we refer to data-driven sub-word units as abstract acoustic elements (AAEs) in contrast to phones. Our goal is to jointly learn the pronunciation dictionary $d^* = \{\omega_1,\cdots,\omega_L\}$ of $L$ pronunciations $\omega_i$ and $N$ AAE models $\lambda^*=\{A_1,\cdots,A_N\}$ that maximize the joint likelihood: \begin{equation} \lambda^*,d^* = \mathop{\rm arg~max}\limits_{\Lambda,D} P(\textbf{X}|\textbf{T},\Lambda,D) \label{eq:origi} \end{equation} where $\textbf{X}=(X_1, \cdots,X_M)$ is the set of training utterances, $\textbf{T}=(T_1, \cdots,T_M)$ is the set of corresponding orthographic transcriptions, $M$ is the number of utterances, $\Lambda$ is the universe of all possible sets of $N$ AAEs and $D$ is the universe of all the dictionaries which map words to AAEs sequences. It is hard to find the optimal solution for the optimization problem in (\ref{eq:origi}) due to its complex non-linear nature. It is thus decomposed into two simpler optimization problems which can be solved iteratively. \begin{eqnarray} d^i = \mathop{\rm arg~max}\limits_{D} P(X|T,\lambda^i,D) \label{eq:dicup}\\ \lambda^{i+1} = \mathop{\rm arg~max}\limits_{\Lambda} P(X|T,\Lambda,d^i) \label{eq:acup} \end{eqnarray} Since the pronunciation of each word can be estimated independently from other words, the dictionary estimation in (\ref{eq:dicup}) can be decomposed into $L$ maximum likelihood estimations as follows: \begin{equation} \begin{split} \omega_l = &\mathop{\rm arg~max}\limits_{\omega} \prod_{j\in \Omega_l} \max_{\textbf{S}_j} P(X_j,\textbf{S}_j|\lambda)\\ &\text{subject to: }\textbf{S}_j \in \mathbb{S}_\omega \end{split} \label{eq:jointlh} \end{equation} where $\Omega_l$ is the set of indices of utterances of word $W_l$, $\textbf{S}_j$ is a sequence of AAEs and $\mathbb{S}_\omega$ denotes a set of all possible AAE sequences of the pronunciation $\omega$. For instance in $\mathbb{S}_\omega$, if the pronunciation is $\omega=A_1A_2A_3$, some samples in $\mathbb{S}_\omega$ may be $A_1A_1A_1A_2A_3, A_1A_2A_2A_3A_3$ and $A_1A_1A_2A_3A_3A_3$. The constraint in (\ref{eq:jointlh}) implies that all AAE sequences should be samples of the same pronunciation. For the case where $\lambda$ is modeled by a left-to-right HMM without skips, which is the most common topology in HMM based ASRs, a solution of (\ref{eq:jointlh}) has been proposed in \cite{Gerber2011} (Details are in Section~\ref{sec:dicupdate}.). In (\ref{eq:acup}), since the dictionary is fixed, the problem results in a common acoustic model estimation given the dictionary. However, the labels re-assigned by using the estimated dictionary are very noisy since the dictionary is automatically estimated from data without any expert supervision. Therefore, a robust model is required at early stage of the training iteration while a more expressive and powerful model such as a DNN \cite{Hinton2012, Abdel-hamid2012} can be used after the reliable dictionary is obtained. The joint dictionary and AAE learning framework is illustrated in Figure \ref{fig:overview} and summarized as follows: \begin{algorithm} \caption{ Semi-supervised joint AAEs and dictionary learning} \label{alg1} \begin{algorithmic}[1] \STATE $i=0$ \\ // Initialize AAE models $\lambda^0$ (Section~\ref{sec:init}) \STATE Clustering the acoustic space. \STATE Model each cluster by GMM and set as $\lambda^0$.\\ // Start joint AAEs and dictionary learning \WHILE{ ( Performance is improved ) } \STATE Given AAE models $\lambda^i$, update dictionary $d^i$ by maximizing joint likelihood multiple utterances (Section~\ref{sec:dicupdate}). \STATE Given dictionary $d^i$, double the number of mixtures and update AAE models $\lambda^{i+1}$ (Section~\ref{sec:acupdate}). \STATE $i \gets i + 1$ \ENDWHILE \STATE Replace GMM by DNN and train AAE model using labels obtained by HMM-GMM (Section~\ref{sec:acupdate}). \WHILE{ ( Performance is improved ) } \STATE Given AAE models $\lambda^i$, update dictionary $d^i$ by maximizing joint likelihood multiple utterances. \STATE Given dictionary $d^i$, re-train DNN based AAE models $\lambda^{i+1}$ (Section~\ref{sec:acupdate}). \STATE $i \gets i + 1$ \ENDWHILE \end{algorithmic} \end{algorithm} \subsection{Acoustic Model Initialization} \label{sec:init} Initial AAE models can simply be obtained by clustering the acoustic space. The acoustic space can be described by any feature as long as it is informative enough to discriminate between different words. We employed the Linde-Buzo-Gray (LBG) algorithm \cite{Linde1980} with a squared-error distortion measure to cluster the acoustic feature vectors. The LBG clustering algorithm tends to assign more codebook vectors to high-density areas which is a useful property in order to obtain discriminative initial AAEs. Each cluster is then modeled by a GMM with a single Gaussian component. These models are used as the initial models for AAEs. \subsection{Dictionary Generation} \label{sec:dicupdate} The solution of (\ref{eq:jointlh}) proposed in \cite{Gerber2011} is an extension of the standard one-dimensional Viterbi algorithm to $K$ dimensions. The K-dimensional Viterbi algorithm calculates the most probable HMM state sequence which is common to $K$ given utterances. While this algorithm is rigorous, its complexity grows exponentially with the number of utterances, which consequently makes it infeasible to apply it to more than a few utterances. An efficient approximation of the K-dimensional Viterbi algorithm has been proposed in \cite{Naghibi2013} where the problem to find the joint alignment and the optimal common sequence for $K$ utterances is decomposed into $K{-}1$ applications of two-dimensional Viterbi algorithm. This approximation starts with finding the best alignment between two utterances. Then, while keeping the alignment between the already processed utterances fixed, the next utterance is aligned with this master utterance. The AAE sequence of the final master utterance is the approximation of the K-dimensional Viterbi pronunciation. \subsection{Acoustic Modeling} \label{sec:acupdate} Once the dictionary is updated, all utterances are decoded based on the new pronunciation of the words in the dictionary and the AAEs are re-estimated according to the new labels. The AAEs can be modeled by commonly used models such as HMM/GMM or HMM/DNN. However, at the beginning of the training iteration, the model and dictionary are not accurate enough and more probable to get stuck in a bad local optimum if the model's degree of freedom is too high. In order to avoid this situation, we start the training with a simple model, namely one Gaussian component for each AAE with a diagonal covariance matrix. In each iteration, the dictionary gets more accurate. Thus, the number of mixture components are doubled in order to increase the modeling power. Once the performance is saturated the GMM is replaced with the DNN in order to utilize more expressive modeling capability. This process makes the semi-supervised DNN training feasible and prevents it to get stuck in a bad local optimum. The HMM state-level transcription is obtained by force-aligned decoding with optimised HMM-GMM and dictionary. This transcription provides labels for DNN training. The DNN is trained to estimate HMM posterior states by minimizing the cross entropy loss $L$ with $l_1$ regularization using back propagation: \begin{eqnarray} \mathop{\rm arg~min}\limits_{W} \sum_{i,j} L(\textbf{x}^i_j,y^i_j,W)+\rho\|W\|_1 \label{eq:obj} \end{eqnarray} where $\textbf{x}^i_j\in X_i$ is the $j$th feature vector of the $i$th utterance, $y_j^i$ is the corresponding label and $W$ is the set of network parameters, respectively. $\rho$ is a constant parameter which is set to $10^{-6}$ in this work. \section{Experiments} \label{sec:exper} We conducted several sets of experiments on the TIMIT corpus \cite{timit}. The TIMIT corpus provides a manually prepared dictionary and phone-level transcriptions with 61 phones. As a baseline, 61 phone models were trained using the TIMIT dictionary and the provided transcriptions. We used 12 mel frequency cepstral coefficients (MFCCs) and energy with their deltas and delta-deltas as descriptors of the acoustic space. The speech data was analyzed using a 25 ms Hamming window with a 10 ms frame shift. We evaluated phone based DNN-HMM, GMM-HMM and AAE based GMM-HMM model as baselines. The DNN architecture was comprised of 7 hidden layers. The first hidden layer had 2048 nodes, next 5 layers had 1024 nodes and the number of nodes at the last layer was equal to the number of HMM states to be predicted. All hidden layers were equipped with the Rectified Linear Unit (ReLU) non-linearity \cite{Dahl2013}. The input to the network was 11 contiguous frames of MFCCs. The networks were trained using mini-batch gradient descent based on back propagation with momentum. We applied dropout \cite{Hinton2012} to all hidden layers with dropout probability $0.5$. The batch size was set to 128. HMMs had left-to-right, no-skipping topology with three states for each phoneme as opposed to one state for each AAE. HMMs were trained using a modified version of HTK \cite{htk341} and DNNs were implemented using Lasagne \cite{lasagne}. \subsection{Isolated Word Recognition} The first set of experiments were on the isolated word recognition to test the performance of the proposed methods and investigate the effects of hyper parameters such as the number of mixture components and the number of AAEs. For joint pronunciation estimation and acoustic models training, we collected a pronunciation training set comprising of words with more than 10 utterances from the TIMIT training set. The total number of utterances in the pronunciation training set was 12800. After excluding words with less than 4 characters (e.g., a and the), 339 distinct words were collected from the TIMIT test set for the isolated word speech recognition task, resulting in 3900 utterances in total. The baseline GMM based phone models were trained with 32 mixture components. During the GMM based AAE model training the number of mixtures was doubled for each iteration until it reached 128 mixtures as described in Section~\ref{sec:acupdate}. \subsubsection{Comparison with phonetic approach} The word error rates (WER) of each method are shown in Table~\ref{tab:iwr}. The results show that the proposed data-driven method clearly outperforms the baseline methods. The proposed AAE-DNN method achieved 10.3\% and 2.4\% improvement over GMM and DNN based phonetic acoustic models, respectively. This suggests that a more accurate dictionary and better acoustic models can be obtained directly from training data without any human expertise. Moreover, AAE-DNN method improves the performance by 3.2\% over the AAE-GMM method. This indicates that the DNN was successfully trained in the semi-supervised manner and the final model could effectively use the its expressive modeling power. \begin{table}[t] \caption{\label{tab:iwr} {\it Comparison of word error rates of each method on 339 words isolated word recognition (\%). Baseline phone models are trained by using the TIMIT dictionary.}} \vspace{2mm} \centering{ \begin{tabular}{ c | r } \hline Method & WER \\ \hline Phone GMM & 18.18 \\ Phone DNN & 10.31 \\ \hline AAE GMM & 11.15 \\ AAE DNN & \textbf{7.93} \\ \hline \end{tabular} } \end{table} \subsubsection{Number of AAEs} Our second experiment focused on the effects of the number of AAEs, i.e. $N$. We trained the dictionary and AAE models with $N = 64, 128, 192, 256, 320, 384, 448$. The word error rates of DNN and GMM based AAE models are illustrated in Figure \ref{fig:NAAE}. The number of mixtures of the GMMs were determined experimentally as shown in Table~\ref{tab:ngmm}. For DNN based AAE models, the best result are obtained with 384 AAEs in contrast to with 320 AAEs for the GMM based models. Interestingly, the optimal number of AAE states is far higher than the number of states of the phone models (61 phonemes $\times$ 3 states = 183 states). This is an indication that the proposed data-driven approach to jointly generate the sub-word units and dictionary models the acoustic space more precisely than the linguistically motivated phonetic units and the manually designed dictionary. It is also worthwhile to mention that the optimal number of DNN based AAE models was higher than that of GMM based models. This is perhaps due to the fact that the DNN was trained discriminatively, allowing to efficiently model the interaction between higher number of AAEs. \begin{table}[t] \caption{\label{tab:ngmm} {\it Word error rates in \% of AAE based recognizers with different number of AAEs and GMM mixture. The best performance for each number of AAE is plotted in Figure \ref{fig:NAAE}}.} \vspace{2mm} \centering{ \begin{tabular}{ c | c c c c} \hline \# of AAE & \multicolumn{4}{c}{\# of mixture}\\ & 16 & 32 & 64 & 128\\ \hline 64 & 19.48 & 18.33 & 17.52 & \textbf{16.93}\\ 128 & 14.33 & 13.87 & \textbf{13.09} & 13.70\\ 192 & 13.39 & 13.31 & \textbf{12.68} & 13.98\\ 256 & 11.97 & \textbf{11.56} & 12.65 & 14.33\\ 320 & 11.46 & \textbf{11.15} & 11.69 & 14.10\\ 384 & 11.63 & \textbf{11.56} & 12.14 & 13.75\\ 448 & \textbf{11.20} & 11.33 & 12.45 & - \\ \hline \end{tabular} } \end{table} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{NAAE.png} \caption{{\it Performance of AAE based recognizers with different number of AAEs on test set with 339 words}.} \label{fig:NAAE} \end{figure} \subsection{Continuous Speech Recognition} Unlike phoneme based ASRs, the proposed AAE based approach does not depend on linguistic knowledge. It is therefore interesting to compare these approaches on a real-world continues speech recognition (CSR) task. For this purpose, we used the SX records of the TIMIT corpus which contains 450 sentences spoken by 7 speakers, i.e. 3150 utterances in total. We prepared the test set by randomly selecting and putting aside one speaker for each sentence from the SX recordings and used the remaining samples as the training set (450 sentences $\times$ 6 speaker = 2700 utterances). We also included the SA and SI recordings of the TIMIT corpus in the training set. The number of AAEs was 384. The number of mixture components in the GMM based phone models was 64. The performance was evaluated in two scenarios: with and without language model. The language model employed in the baseline and the proposed methods is a simple bigram model. Table \ref{tab:csr} shows that the proposed AAE-DNN based approach significantly outperforms baseline methods in both scenarios. The performance improvements over the phone based HMM-DNN method in with and without the language model scenarios were 10.68\% and 5.11\%, respectively. The results suggest that the proposed data-driven dictionary and the AAE models are also useful for CSR and a more accurate representation of speech signals can be learned automatically. We observed that all 384 AAEs were actually used in the trained dictionary, and the dictionary tend to assign 39\% more HMM states on average to each word as compare with the TIMIT phonetic dictionary. This means that in AAEs, the stay-in-state probability is smaller resulting in more frequent state transitions. This suggests that by using AAEs, the acoustic space was modeled at a higher resolution. This consequently increased the precision of the word pronunciations. \begin{table}[t] \caption{\label{tab:csr} {\it Comparison of word error rate of each method on continuous speech recognition. In column ”No LM”, no language model was used.}} \vspace{2mm} \centering{ \begin{tabular}{ c | c | c } \hline Method & No LM & Bigram \\ \hline Phone GMM & 71.11 & 43.54 \\ Phone DNN & 50.18 & 20.89 \\ \hline AAE GMM & 59.52 & 32.36 \\ AAE DNN & \textbf{39.05} & \textbf{15.78} \\ \hline \end{tabular} } \end{table} \section{Conclusions} \label{sec:concl} In this work we proposed a novel joint dictionary and sub-word unit learning framework for ASRs. The proposed method does not require linguistic expertise, and can automatically create the set of sub-word units and the corresponding pronunciation dictionary. In our method, reliable pronunciations are estimated from multiple utterances by an efficient approximation of K-dimensional Viterbi algorithm which estimates the most probable HMM state sequence common to multiple utterances of a word. Experimental results show that the proposed method significantly outperforms the phone based methods which even get manually prepared dictionary and hand crafted transcriptions as inputs. We further investigated the effects of the number of data-driven sub-word units and showed that the optimal number of sub-word units is much higher than the total number of HMM states of the 61 phones. The future works will be directed towards applying the proposed method to speech recognition for under-resourced languages and large vocabulary continuous speech recognition tasks. \newpage \eightpt \bibliographystyle{IEEEtran}
{'timestamp': '2016-06-17T02:03:20', 'yymm': '1606', 'arxiv_id': '1606.05007', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05007'}
arxiv
\section{Introduction} \label{sec:introduction} Co-simulation allows for the independent and parallel modeling and simulation of complex systems including multiple physical and engineering domains, the use of tailored software tools and expert knowledge, the efficient use of suited solvers, and the protection of intellectual property within models. All these properties make this kind of simulator coupling an attractive choice, especially from an industrial perspective. But the fact that coupled subsystems are solved independently of each other between discrete communication time points also emphasizes accuracy and stability issues. The flow and the conservation of energy between simulators in a co-simulation can be conveniently studied when using \emph{power bonds} to realize the couplings. A power bond is a direct energetic bond between subsystems defined by inputs and outputs whose product gives a physical power: force and velocity, electric current and voltage, pressure and flow rate, to name a few. Because subsystems in a co-simulation advance in time independently of each other, energy transactions between them are inherently inaccurate. \emph{Energy residuals} emerge as a consequence and directly affect the total energy of the overall coupled system. Consequently, system dynamics are distorted and co-simulation accuracy and stability are challenged. These concepts are exploited in the \emph{Energy-Conservation-based Co-Simulation} method\cite{Sadjina2016} (ECCO). Because energy residuals are a direct expression of coupling errors, they are a versatile tool to assess the quality of co-simulations. Based on such error estimators, ECCO defines an adaptive control of the co-simulation step size, and displays significant improvements in the accuracy and efficiency of non-iterative co-simulations. Similar arguments are used in the \emph{Nearly Energy Preserving Coupling Element}\cite{Benedikt2013} (NEPCE) to introduce corrections to the flow of (generalized) power between simulators in order to minimize coupling errors. Here, we have a closer look at NEPCE and its energy-conserving properties. We further propose a modification to include the presence of direct feed-through, enhancing its performance. NEPCE's efficiency is based on the assumption that the coupling variables are slowly varying functions of time. This assumption is challenged, however, by finding a suitable choice of the co-simulation (macro) time step. We demonstrate how this issue is efficiently handled by ECCO's energy-conservation-based adaptive step size control in order to substantially improve accuracy and efficiency. Because the resulting framework is non-iterative, it is computationally inexpensive and well suited for industrial applications. This paper is organized as follows: In Section~\ref{sec:energy_conservation_in_co-simulations}, we start with a brief recapitulation of the flow and conservation of energy in co-simulations using power bonds. Next, we study NEPCE's non-iterative corrections to the simulator inputs in Section~\ref{sec:energy_conserving_corrections} and show how they should be modified in the presence of direct feed-through. Section~\ref{sec:adaptive_step_size} discusses how these corrections can be combined with ECCO's adaptive step size control, and a quarter car model is then used in Section~\ref{sec:co-simulation_benchmark_tests} to demonstrate the performance of the proposed method and its influence on co-simulation accuracy and efficiency. Finally, we give a conclusion in Section~\ref{sec:conclusion}. \section{Energy Conservation in Co-Simulations} \label{sec:energy_conservation_in_co-simulations} Most commonly, co-simulations are realized by letting the simulators advance in time in parallel and independently of each other, and then synchronizing coupling data at discrete communication time points. This weak coupling approach is easily implemented and relatively efficient on paper: It is universally applicable for industrial applications (which usually prohibit iterative schemes) and the parallelization potential holds the promise of substantial simulation speed-ups. Its major weaknesses, however, are accuracy and stability. Input quantities are generally unknown during the time integrations inside the simulators. They must therefore be approximated, and are often simply held constant. A sufficiently small macro time step has to be chosen in order to keep the coupling errors which result from this scheme contained. \begin{figure}[h!tb] \centering \def\graphicswidth{\graphicswidth} \subfloat[Inputs are set at $t = t_i$]{ \input{graphics/power_bond_cosim_1.pdf_tex} \label{fig:power_bond_cosim_1} }\\ \def\graphicswidth{\graphicswidth} \subfloat[Outputs are retrieved at $t = t_{i+1}$]{ \input{graphics/power_bond_cosim_2.pdf_tex} \label{fig:power_bond_cosim_2} } \caption{% Two coupled simulators exchange energy through a power bond in a co-simulation } \label{fig:power_bond_cosim} \end{figure} \subsection{Power and Energy Residuals} \label{subsec:residuals} The use of power bonds from bond graph theory\cite{Paynter1961,Breedveld1984} allows to reframe these issues in terms of energy conservation considerations.\cite{Sadjina2016} A power bond $k$ is defined by a pair of power variables---a flow $f_k$ and an effort $e_k$---whose product $P_k = e_k f_k$ gives a physical power. Powers and energies, the universal currencies of physical systems, are directly accessible in co-simulations when using power bonds. As an example, consider the flow of energy between two simulators S$_1$ and S$_2$ that are coupled via a power bond $k$, see Fig.~\ref{fig:power_bond_cosim}. From the point of view of S$_1$, energy is transferred to S$_2$ at a rate \begin{subequations} \label{equ:energyflow} \begin{equation} \label{equ:energyflow_S1} P_{k_1}(t) = \mbox{$\tilde{u}$}_{k_1}(t) y_{k_1}(t) , \end{equation} where $y_{k_1}(t)$ is the output and $\mbox{$\tilde{u}$}_{k_1}(t) \approx u_{k_1}(t)$ is an approximation of the generally unknown value $u_{k_1}(t)$. If, instead, we consider the energy transfer from the other simulator's perspective, we conclude that \begin{equation} \label{equ:energyflow_S2} P_{k_2}(t) = \mbox{$\tilde{u}$}_{k_2}(t) y_{k_2}(t) . \end{equation} \end{subequations} This is problematic because it fundamentally violates the conservation of energy, \begin{equation} \label{equ:energyflow_dP} - ( P_{k_1} + P_{k_2} ) \neq 0 , \end{equation} because, generally, $\mbox{$\tilde{u}$}_{k_1}(t) \neq u_{k_1}(t)$ and $\mbox{$\tilde{u}$}_{k_2}(t) \neq u_{k_2}(t)$. Hence, a \emph{residual energy} is incorrectly created due to the independent time integrations of the simulators during the macro time step $t_i \rightarrow t_{i+1} = t_i + \Delta t_i$,\cite{Sadjina2016} \begin{subequations} \label{equ:residuals} \begin{align} \label{equ:residuals_energy} \delta E_k(t_{i+1}) &\equiv \int_{t_i}^{t_{i+1}} \delta P_k(t) \diff t , \intertext{where} \label{equ:residuals_power} \delta P_k &\equiv - ( P_{k_1} + P_{k_2} ) \end{align} \end{subequations} is the \emph{residual power} for the power bond $k$, see Fig.~\ref{fig:power_bond_residual} for an illustration. At each macro time step, the residual energy $\delta E_k$ is directly added to the total energy of the overall coupled system.\cite{Sadjina2016} As a consequence, system dynamics are distorted and the quality of the co-simulation reduced. Note that the power transmitted from S$_1$ to S$_2$ can be obtained from the simulator outputs as \begin{equation} \label{equ:energytransfer} P_{k_{12}}(t) = \sigma_{k_{12}} \big( y_{k_1}(t) y_{k_2}(t) \big) , \end{equation} where the sign $\sigma_{k_{12}} \equiv ({\vect{L}_k}_{12}-{\vect{L}_k}_{21})/2$ is determined by the corresponding elements of the connection graph matrix $\vect{L}$. \begin{figure}[h!tb] \centering \def\graphicswidth{\graphicswidth} \input{graphics/power_bond_residual.pdf_tex} \caption{% Total system dynamics are distorted by a residual power $\delta P_k$ between two energetically coupled simulators due to the independent time integrations } \label{fig:power_bond_residual} \end{figure} Luckily, inaccurate energy transactions provide us with a versatile error estimator because the corresponding residual energies are a direct expression of the co-simulation coupling errors and the violation of energy conservation.\cite{Sadjina2016} This is exploited by the ECCO algorithm to define an adaptive macro step size controller: For input extrapolation of order $m$, the residual energy scales quadratic with the step size\cite{Sadjina2016}, $\delta {E_k} = \mathcal{O}({\Delta t}^{m+2})$. Consequently, the conservation of energy can be approximately satisfied by controlling the macro step size, optimizing the quality and efficiency of co-simulations. \subsection{Local Errors in the Coupling Variables} \label{subsec:errors} Considering the time evolution of the internal states $\vect{x} = \{ x_1, x_2\}$ of the coupled simulators between the discrete communication time points $t_i$ and $t_{i+1}$, \begin{subequations} \label{equ:cosimulation} \begin{equation} \label{equ:cosimulation_evolution} \dot{\vect{x}}(t) = \vect{f} \big( \vect{x}(t) , \tilde{\vect{u}}(t) \big) , \quad t \in (t_i,t_{i+1}] , \end{equation} simulator coupling can be expressed as \begin{align} \label{equ:cosimulation_outputs} \vect{y}(t_{i+1}) &= \vect{g} \big( \vect{x}(t_{i+1}) , \tilde{\vect{u}}(t_{i+1}) \big) , \\ \label{equ:cosimulation_connections} \vect{u}(t_{i+1}) &= \vect{L} \vect{y}(t_{i+1}) , \end{align} \end{subequations} where $\vect{L}$ is a connection graph matrix that relates outputs $\vect{y}$ and inputs $\vect{u}$ at communication time points. In the non-iterative co-simulation, the inputs are generally unknown and have to be approximated during the time integrations inside the simulators, $\tilde{\vect{u}}(t) \approx \vect{u}(t)$. Most commonly, they are simply held constant such that $\tilde{\vect{u}}(t) = \vect{u}(t_i)$ for $t \in (t_i,t_{i+1}]$. Let us in the following have a closer look at the local coupling errors which stem from these approximations and the independent time integrations in the subsystems between communication time points. For the case of coupling via power bonds, these errors are conveniently represented as power and energy errors and directly related to the conservation of energy throughout the entire coupled system. Using energies and powers as error metrics instead of non-energetic quantities has two major advantages: \romannumeral 1.) They offer a more holistic and intuitive approach by considering the flow of energy between subsystems directly \romannumeral 2.) They avoid that some simulator's contributions to the global error are given too much weight. If, for example, one simulator outputs a force and another a position, the numerical values of the force output will typically be much larger than those of the position output. The same will then generally be true for the numerical values of the corresponding errors, skewing the actual simulators' contributions to the global co-simulation error. The use of energy and power errors solves this issue in an elegant fashion. In the next section, we will discuss how we can minimize local coupling errors. The subsystem states are inaccessible in a typical co-simulation setting and can not be directly altered. Instead, corrections to the inputs can be derived such that the residual energies between simulators are minimized and energy conservation is approximately satisfied. These corrections ideally cancel the local errors in the inputs which are given by \begin{subequations} \label{equ:errors} \begin{equation} \label{equ:errors_input_general} \begin{split} \Delta \vect{u}(t) &= \tilde{\vect{u}}(t) - \vect{u}_0(t) \\ &= \tilde{\vect{u}}(t) - \vect{L} \vect{y}_0(t) \\ &= \tilde{\vect{u}}(t) - \vect{L} \big( \vect{y}(t) - \Delta \vect{y}(t) \big) , \end{split} \end{equation} where $\vect{u}_0(t)$ is the exact solution and we used that $\vect{u}_0(t)=\vect{L}\vect{y}_0(t)$ for any time $t$. The errors in the outputs evaluate to \begin{equation} \label{equ:errors_output} \begin{split} \Delta \vect{y}(t) &= \vect{y}(t) - \vect{y}_0(t) \\ &= \vect{g} \big( \vect{x}(t), \tilde{\vect{u}}(t) \big) - \vect{g} \big( \vect{x}_0(t), \vect{u}_0(t) \big) \\ &= \vect{J}_{\vect{g}}(\vect{u}) \Delta \vect{u}(t) + \vect{J}_{\vect{g}}(\vect{x}) \Delta \vect{x}(t) \\ &+ \mathcal{O}({\Delta t}^{m+2}) , \end{split} \end{equation} where ${J_{\vect{g}}}_{i j}(\vect{u}) = \pdiff g_i /\pdiff u_j$ is the interface Jacobian and ${J_{\vect{g}}}_{i j}(\vect{x}) = \pdiff g_i /\pdiff x_j$. While the error contributions from the state vector are \begin{equation} \label{equ:errors_state} \Delta \vect{x}(t) = \vect{x}(t) - \vect{x}_0(t) = \mathcal{O}({\Delta t}^{m+2}) , \end{equation} \end{subequations} the input errors appear to order $\Delta \vect{u} = \mathcal{O}({\Delta t}^{m+1})$. Consequently, if one of the simulators S$_k$ has direct feed-through, the output errors are also of order $\mathcal{O}({\Delta t}^{m+1})$ because then ${J_{\vect{g}}}_{k k}(\vect{u}) \neq 0$. Using Eq.~\eqref{equ:errors_output} in Eq.~\eqref{equ:errors_input_general} and rewriting thus gives \begin{equation} \label{equ:errors_input} \begin{split} \Delta \vect{u}(t) &= \big( 1 - \vect{L} \vect{J} \big)^{-1} \big( \tilde{\vect{u}}(t) - \vect{L} \vect{y}(t) \big) \\ &+ \mathcal{O}({\Delta t}^{m+2}) , \end{split} \end{equation} where we set $\vect{J} \equiv \vect{J}_{\vect{g}}(\vect{u})$ for brevity. \section{Non-Iterative Energy-Conservation-Based Corrections} \label{sec:energy_conserving_corrections} Let us now take the idea of energy conservation in co-simulations a step further by directly modifying the coupling variables such that energy transactions between simulators are described more accurately. In this section, we will explore this concept which is used by NEPCE~\cite{Benedikt2013} and generalize it to include the presence of direct feed-through. In Section~\ref{sec:adaptive_step_size} we then discuss how the energy-conservation-based corrections studied here can be combined with ECCO's non-iterative adaptive step size controller, and Section~\ref{sec:co-simulation_benchmark_tests} demonstrates the substantial improvements in accuracy and efficiency thus obtained using a quarter car co-simulation benchmark model. As can be seen from Eqs.~\eqref{equ:energyflow} and~\eqref{equ:residuals}, a residual energy \begin{equation} \label{equ:residual_energy_general} \delta E_k(t_{i+1}) = - \int_{t_i}^{t_{i+1}} \tilde{\vect{u}}_k(t) \cdot \vect{y}_k(t) \diff t \end{equation} is accumulated during the time step $t_i\rightarrow t_{i+1}$ for a power bond $k$ connecting the inputs $\tilde{\vect{u}}_k = \{\mbox{$\tilde{u}$}_{k_1},\mbox{$\tilde{u}$}_{k_2}\}$ and outputs $\vect{y}_k = \{y_{k_1},y_{k_2}\}$. The concept behind NEPCE is to find corrections $\delta \vect{u}_k = \{\delta u_{k_1}, \delta u_{k_2}\}$ to the inputs at communication time instant $t=t_i$ with the aim of reducing the residual energy by a factor of $(1-\alpha)$, such that \begin{equation} \label{equ:residual_energy_corrections} (\alpha-1) \delta E_k(t_{i+1}) = \int_{t_i}^{t_{i+1}} \big( \tilde{\vect{u}}_k(t) + \delta \vect{u}_k(t) \big) \cdot \vect{y}_k(t) \diff t \end{equation} with the tuning factor $\alpha \in [0,1]$. Ideally, $\alpha = 1$ if the corrections accurately track the errors in the inputs, $\delta \vect{u}_k(t) = - \Delta \vect{u}_k(t)$. While this can not be realized in general for non-iterative co-simulations, however, corrections should be of the same order as the errors in the input~\eqref{equ:errors_input_general}, $\delta \vect{u}_k = \mathcal{O}({\Delta t}^{m+1})$, to mitigate their effects. Moreover, a correction to the input will generally elicit a modification of the output $\delta \vect{y}_k$, such that we generally need to consider \begin{equation} \label{equ:residual_energy_corrections_feedthrough} \begin{split} &(\alpha-1) \delta E_k(t_{i+1}) \\ = &\int_{t_i}^{t_{i+1}} \big( \tilde{\vect{u}}_k(t) + \delta \vect{u}_k(t) \big) \cdot \big( \vect{y}_k(t) + \delta \vect{y}_k(t) \big) \diff t . \end{split} \end{equation} If direct feed-through is present, this modification to the output is of the same order as the input corrections, $\delta \vect{y}_k = \mathcal{O}({\Delta t}^{m+1})$, and should be included. \subsection{NEPCE} \label{subsec:corrections_NEPCE} But first, let us discuss the case where none of the simulators have direct feed-through. Then, the errors in the inputs~\eqref{equ:errors_input} are simply \begin{equation} \Delta \vect{u}(t) = \tilde{\vect{u}}(t) - \vect{L} \vect{y}(t) + \mathcal{O}({\Delta t}^{m+2}) , \end{equation} and Eq.~\eqref{equ:residual_energy_corrections} suffices. Choosing \begin{equation*} \delta \vect{u}(t) = -\Delta \vect{u}(t) \approx \vect{L} \vect{y}(t) - \tilde{\vect{u}}(t) \end{equation*} would make the residual energy vanish and the coupling quantities exact to order $\mathcal{O}({\Delta t}^{m+1})$. As already mentioned, this is not possible for non-iterative co-simulations because $\vect{y}(t)$ is unknown a priori for $t = (t_i, t_{i+1}]$. Instead, we realize the correction in terms of previous coupling data,\cite{Benedikt2013} \begin{equation} \label{equ:corrections_NEPCE} \delta \vect{u}(t) \approx \frac{\alpha}{\Delta t_i} \int_{t_{i-1}}^{t_i} \big( \vect{L} \vect{y}(\tau) - \tilde{\vect{u}}(\tau) \big) \diff \tau , \end{equation} for $t \in (t_i,t_{i+1}]$, assuming that the coupling variables and the errors are slowly varying on the scale of the time step $\Delta t$. Note that this is a reasonable assumption in theory: In a co-simulation the macro time step should be chosen such that the dynamics of the system can be sufficiently well resolved in time. A violation of this assumption is equivalent to the macro time step simply being too large for the problem at hand. In section~\ref{sec:adaptive_step_size}, we will take a big step towards ensuring that this crucial assumption holds by combining the energy-conservation-based input corrections discussed in the present section with the energy-conservation-based adaptive step size controller ECCO. \subsection{Corrections with Direct Feed-Through} \label{subsec:corrections_feedthrough} As discussed previously, corrections to the inputs cause modifications to the outputs which are of the same order $\mathcal{O}({\Delta t}^{m+1})$ in the presence of direct feed-through. The errors in the inputs are then given by Eq.~\eqref{equ:errors_input}, and Eq.~\eqref{equ:corrections_NEPCE} should be modified to \begin{equation} \label{equ:corrections_feedthrough} \delta \vect{u}(t) \approx \frac{\alpha}{\Delta t_i} \big( 1 - \vect{L} \vect{J} \big)^{-1} \int_{t_{i-1}}^{t_i} \big( \vect{L} \vect{y}(\tau) - \tilde{\vect{u}}(\tau) \big) \diff \tau \end{equation} to include all coupling errors of order $\mathcal{O}({\Delta t}^{m+1})$. It is important to point out that Eq.~\eqref{equ:corrections_feedthrough} requires the knowledge of the generally time-dependent interface Jacobian $J_{i j} = \pdiff g_i /\pdiff u_j$. In practical applications, it will likely not be available and the unmodified NEPCE form~\eqref{equ:corrections_NEPCE} should be chosen. While disregarding the output error contribution in Eqs.~\eqref{equ:errors}, it is still an improvement over the uncorrected co-simulation in the presence of direct feed-through. Finally, note that we can safely disregard the case where both simulators have direct feed-through, because it amounts to an algebraic loop which indicates that the particular system reticulation is not suitable for non-iterative co-simulation and ill-chosen. \section{Energy-Conserving Adaptive Step Size Control} \label{sec:adaptive_step_size} The previous section discussed NEPCE and how it should be modified in the presence of direct feed-through. The approach to energy-conservation-based corrections to the inputs in non-iterative co-simulations relies on the assumption that the coupling variables are slowly varying functions of time on the scale of the macro time step. When this assumption does not hold the corrections become increasingly ineffective and can even lead to instability by exciting relatively fast dynamics in the subsystems\cite{Benedikt2013}. In other words, the smaller the chosen macro time step the more efficient and beneficial the input corrections become. The \emph{Energy-Conservation-based Co-Simulation} method (ECCO) provides a framework that allows us to adaptively choose a macro step size which (given some tolerances) approximately ensures energy conservation in non-iterative co-simulations. This concept and its performance have recently been studied\cite{Sadjina2016}, and we shall in the following combine it with the energy-conservation-based input corrections from the previous section to define a non-iterative co-simulation framework yielding high accuracy and efficiency without the use of any simulator-internal data. An I-controller is used to determine a new optimal step size \begin{equation} \label{equ:step_control} {\Delta t}_{i+1} = \alpha_\text{s} \epsilon(t_i)^{-k_\text{I}} \Delta t_i \end{equation} as a function of an error indicator $\epsilon$. Here, $k_\text{I} = 0.3/(m+2)$ is the integral gain\footnote{% The denominator $m+2$ represents the order of the error, here $\delta E_k = \mathcal{O}({\Delta t}^{m+2})$. The corrections discussed in Sec.~\ref{sec:energy_conserving_corrections} have the aim of canceling the energy error $\delta E_k$ to leading order in $\Delta t$, and thus one should choose $k_\text{I} = 0.3/(m+3)$. Here, we decide against this alteration for two reasons: \romannumeral 1.) As mentioned previously, the leading terms in the error can in general not be canceled exactly for the non-iterative case, as expressed by the tuning factor $\alpha$. The \romannumeral 2.) The actual benchmark results discussed in Sec.~\ref{sec:co-simulation_benchmark_tests} show little to no dependence on this chance. }, $m$ is the extrapolation order ($m=0$ for constant extrapolation), and $\alpha_\text{s} \in [0.8,0.9]$ is a safety factor. The scalar error indicator can be defined as\cite{Sadjina2016} \begin{equation} \label{equ:error_indicator} \epsilon(t) \equiv \sqrt{ \frac{1}{N} \sum_{k = 1}^N \bigg( \frac{ \delta E_k(t) }{ r_k \big( {E_0}_k + | E_k(t) | \big) } \bigg)^2 } , \end{equation} using the residual energies $\delta E_k$ and energies $E_k(t_{i+1}) \approx P_{k_{12}}(t_{i+1}) \Delta t_i$ transmitted per time step for all $N$ power bonds. Here, the typical energy scale ${E_0}_k$ and the relative tolerance $r_k$ are freely configurable parameters which determine the energy resolution for the power bond $k$. The I-controller~\eqref{equ:step_control} aims to find and maintain a balance between accuracy and efficiency by choosing a step size for which $\epsilon \approx 1$: Efficiency can be improved if $\epsilon < 1$ by increasing the step size, while accuracy needs to be increased by choosing smaller time steps of $\epsilon > 1$. In order to avoid rapid oscillations in the step size on one hand, and inefficiently small step sizes on the other, the step size itself and its rate of change are restricted by the parameters ${\Delta t}_\text{min}$ and ${\Delta t}_\text{max}$, and $\Theta_\text{min}$ and $\Theta_\text{max}$, respectively. Table~\ref{tab:controller_configuration} lists the full configuration used for the benchmark tests of Section~\ref{sec:co-simulation_benchmark_tests}. \begin{table}[h!tb] \begin{tabular}{lS[table-format=3.1]s} \hline\noalign{\smallskip} & {Value} & {Unit} \\ \noalign{\smallskip}\hline\noalign{\smallskip} $\alpha_\text{s}$ & 0.8 & \\ ${\Delta t}_\text{min}$ & 10 & \micro\second \\ ${\Delta t}_\text{max}$ & 10 & \milli\second \\ $\Theta_\text{min}$ & 0.2 & \\ $\Theta_\text{max}$ & 1.5 & \\ $E_0$ & 750 & \si{\joule} \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Configuration of the adaptive step size controller for the benchmark model in Sec.~\ref{sec:co-simulation_benchmark_tests} } \label{tab:controller_configuration} \end{table} \section{Co-Simulation Benchmark Tests} \label{sec:co-simulation_benchmark_tests} In order to assess the performance of the methods discussed in sections~\ref{sec:energy_conserving_corrections} and~\ref{sec:adaptive_step_size}, we employ a quarter car model as described in Ref.~\onlinecite{Arnold2013} and split it into two subsystems connected via a power bond, see Fig.~\ref{fig:quartercar_model}. This model can be considered two coupled Dahlquist test equations\cite{Dahlquist1956} and is thus well suited as a co-simulation benchmark test case.\cite{Clauss2012,Schierz2012,Arnold2013,Arnold2014,Sadjina2016} We further study two different reticulations for the co-simulation and also investigate nonlinear damping characteristics. The corresponding model and the underlying equations are adapted directly from Ref.~\onlinecite{Sadjina2016}, the parameters are summarized in Table~\ref{tab:quartercar_model} for the linear test case and in Table~\ref{tab:quartercar_nonlinear_model} for the nonlinear case. \begin{figure}[h!tb] \centering \def\graphicswidth{\graphicswidth} \input{graphics/quartercar.pdf_tex} \caption{% The quarter car benchmark model is split into the subsystems S$_1$ and S$_2$ for co-simulation using the two distinct reticulations 1 and 2 } \label{fig:quartercar_model} \end{figure} \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=6.1]s} \hline\noalign{\smallskip} & {Value} & Unit \\ \noalign{\smallskip}\hline\noalign{\smallskip} $m_\text{c}$ & 400 & \kilogram \\ $m_\text{w}$ & 40 & \kilogram \\ $k_\text{c}$ & 15000 & \newton\per\meter \\ $k_\text{w}$ & 150000 & \newton\per\meter \\ $d_\text{c}$ & 1000 & \newton\second\per\meter \\ $n_d$ & 0.5 & \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Parameters for the linear quarter car benchmark model according to Ref.~\onlinecite{Arnold2013} } \label{tab:quartercar_model} \end{table} \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=3.1]s} \hline\noalign{\smallskip} & {Value} & {Unit} \\ \noalign{\smallskip}\hline\noalign{\smallskip} $d_\text{c}$ & 900 & \newton\raiseto{1/2}{(\second\per\meter)} \\ $n_d$ & 1.5 & \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Parameter changes to include nonlinear damping forces in the benchmark model according to Ref.~\onlinecite{Busshardt1992} } \label{tab:quartercar_nonlinear_model} \end{table} We generally carry out the time integrations in the subsimulators using micro step sizes of ${\Delta t}_{\text{S}_1} = {\Delta t}_{\text{S}_2} = {\Delta t}/256$ with the forward Euler method to focus on the co-simulation coupling errors.\footnote{% Even smaller micro step sizes affect the benchmark results only marginally. } As mentioned previously, we use energies and powers as error metrics to assess the quality of the co-simulation results: On one hand, we consider the average error in the power~\eqref{equ:energytransfer} transmitted over the power bond from simulator S$_1$ to simulator S$_2$, \begin{subequations} \label{equ:error_measures} \begin{equation} \label{equ:error_measures_power} \Delta P(t_{i+1}) \equiv \frac{1}{T} \sum_{j=0}^i | P_{12}(t_{j+1}) - P^0_{12}(t_{j+1}) | \Delta t_j, \end{equation} where $P^0_{12}(t)$ is the exact solution and $T$ is the total (virtual) duration of the simulation run. On the other hand, the total accumulated residual energy \begin{equation} \label{equ:error_measures_total_residual_energy} \Delta E(t_{i+1}) \equiv \sum_{j=0}^i \delta P(t_{j+1}) \Delta t_j \end{equation} \end{subequations} gives the amount of energy wrongfully added to the full system during the entire simulation time interval $t \in [t_0, t_{i+1}]$ and is thus used as another indicator of co-simulation accuracy. \subsection{NEPCE} \label{subsec:co-simulation_benchmark_tests_NEPCE} Let us first use the quarter car model to benchmark NEPCE's performance. The tuning factor $\alpha$ is chosen such that the errors are minimized while avoiding the excitation of fast oscillations and risking instability. The energy errors can be reduced throughout by \SI{49}{\percent} to \SI{86}{\percent} when using NEPCE compared to the uncorrected results. The results are summarized in Tables~\ref{tab:quartercar_NEPCE} and~\ref{tab:quartercar_alt_NEPCE}, where the tuning factor, the total number of macro time steps, and the power transmitted over the power bond $P_{12}$ averaged over the entire simulation duration $T$ are shown. Furthermore, the error in the power $\Delta P(T)$ and the total accumulated residual energy $\Delta E(T)$ are given according to Eqs.~\eqref{equ:error_measures} with respect to the simulation duration $T$. \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=1.2]S[table-format=4.0]S[table-format=1.2]S[table-format=1.2]S[table-format=1.2]} \hline\noalign{\smallskip} \multicolumn{3}{c}{Algorithm} & \multicolumn{1}{ c }{Power} & \multicolumn{2}{ c }{Error} \\ \multicolumn{1}{ c }{type} & \multicolumn{1}{ c }{tuning} & \multicolumn{1}{ c }{steps} & \multicolumn{1}{ c }{$\frac{\overline{P_{12}}}{\si{\watt}}$} & \multicolumn{1}{ c }{$\frac{\Delta P}{\si{\watt}}$} & \multicolumn{1}{ c}{$\frac{\Delta E}{\si{\joule}}$} \\ \noalign{\smallskip}\hline\noalign{\smallskip} constant & & 4000 & 0.4 & 1.0 & 6.3 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.95 & 4000 & 0.01 & 0.14 & 3.20 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.95 & 4000 & 0.01 & 0.11 & 3.20 \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Linear quarter car benchmark results for reticulation 1 with NEPCE and with NEPCE with direct feed-through modification } \label{tab:quartercar_NEPCE} \end{table} \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=1.2]S[table-format=4.0]S[table-format=-1.2]S[table-format=1.2]S[table-format=1.2]} \hline\noalign{\smallskip} \multicolumn{3}{c}{Algorithm} & \multicolumn{1}{ c }{Power} & \multicolumn{2}{ c }{Error} \\ \multicolumn{1}{ c }{type} & \multicolumn{1}{ c }{tuning} & \multicolumn{1}{ c }{steps} & \multicolumn{1}{ c }{$\frac{\overline{P_{12}}}{\SI{d2}{\watt}}$} & \multicolumn{1}{ c }{$\frac{\Delta P}{\SI{d2}{\watt}}$} & \multicolumn{1}{ c}{$\frac{\Delta E}{\SI{d2}{\joule}}$} \\ \noalign{\smallskip}\hline\noalign{\smallskip} constant & & 4000 & -1.89 & 0.10 & 0.22 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.85 & 4000 & -1.88 & 0.04 & 0.11 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.85 & 4000 & -1.88 & 0.03 & 0.10 \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Linear quarter car benchmark results for reticulation 2 with NEPCE and with NEPCE with direct feed-through modification } \label{tab:quartercar_alt_NEPCE} \end{table} The quarter car benchmark model does exhibit direct feed-through (in simulator S$_2$ for system reticulation 1 and in S$_1$ in system reticulation 2). We thus expect improved performance when including the modification to NEPCE discussed in Section~\ref{subsec:corrections_feedthrough}. Indeed, the average error in the power $\Delta P(T)$ is reduced by about another \SI{17}{\percent} to \SI{33}{\percent} with the modification. Fig.~\ref{fig:quartercar_comparisonNEPCE} exemplifies this enhancement by showing the average error in the transmitted power for system reticulation 2. Note, however, that the direct feed-through modification to NEPCE does not significantly influence the overall accumulated residual energy $\Delta E(T)$. \begin{figure}[h!tb] \centering \includegraphics[width=\graphicswidth]{graphics/comparisonNEPCE} \caption{% Average error in the power for the linear quarter car benchmark with reticulation 2 and constant step size: NEPCE with direct feed-through modification (solid), NEPCE alone (dashed), and the uncorrected result (dotted) } \label{fig:quartercar_comparisonNEPCE} \end{figure} \subsection{NEPCE with ECCO} \label{subsec:co-simulation_benchmark_tests_ECCO} Let us now demonstrate how the corrections to the inputs are made more efficient by combining them with ECCO's energy-conservation-based adaptive step size control, as proposed in Sec.~\ref{sec:adaptive_step_size}. For this purpose, the I controller~\eqref{equ:step_control} and the scalar error indicator~\eqref{equ:error_indicator} are configured according to the parameters listed in Table~\ref{tab:controller_configuration}, and the starting step size is set to ${\Delta t}_0 = {\Delta t}_\text{min}$. The quarter car system is initially excited with an energy of \SI{750}{\joule} which thus determines the characteristic energy scale for the system, $E_0 = \SI{750}{\joule}$. The tolerance $r$ is set such that the total number of macro time steps remains around a constant \num{4000} steps in order to keep the computational cost at the same level. Substantial improvements are observed when using NEPCE with ECCO's adaptive step size control: The energy errors in the benchmarks are reduced by \SI{87}{\percent} to \SI{92}{\percent} for system reticulation 1, see Table~\ref{tab:quartercar_ECCO}, and by \SI{97}{\percent} to \SI{98}{\percent} for system reticulation 2, see Table~\ref{tab:quartercar_alt_ECCO}. This considerable enhancement of the quality of the co-simulation results is also exemplified in Fig.~\ref{fig:quartercar_comparisonECCO}. \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=1.2]S[table-format=1.1d-1]S[table-format=4.0]S[table-format=-1.2]S[table-format=1.2]S[table-format=1.2]} \hline\noalign{\smallskip} \multicolumn{4}{c}{Algorithm} & \multicolumn{1}{ c }{Power} & \multicolumn{2}{ c }{Error} \\ \multicolumn{1}{ c }{type} & \multicolumn{1}{ c }{tuning} & \multicolumn{1}{ c }{tolerance} & \multicolumn{1}{ c }{steps} & \multicolumn{1}{ c }{$\frac{\overline{P_{12}}}{\si{\watt}}$} & \multicolumn{1}{ c }{$\frac{\Delta P}{\si{\watt}}$} & \multicolumn{1}{ c}{$\frac{\Delta E}{\si{\joule}}$} \\ \noalign{\smallskip}\hline\noalign{\smallskip} constant & & & 4000 & 0.4 & 1.0 & 6.3 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.95 & 1.6d-6 & 3930 & -0.05 & 0.08 & 0.83 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.95 & 1.6d-6 & 4002 & -0.04 & 0.06 & 0.81 \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Linear quarter car benchmark results for reticulation 1 using residual-energy-based adaptive step size control with NEPCE and with NEPCE with direct feed-through modification } \label{tab:quartercar_ECCO} \end{table} \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=1.2]S[table-format=1.1d-1]S[table-format=4.0]S[table-format=-1.3]S[table-format=1.3]S[table-format=1.3]} \hline\noalign{\smallskip} \multicolumn{4}{c}{Algorithm} & \multicolumn{1}{ c }{Power} & \multicolumn{2}{ c }{Error} \\ \multicolumn{1}{ c }{type} & \multicolumn{1}{ c }{tuning} & \multicolumn{1}{ c }{tolerance} & \multicolumn{1}{ c }{steps} & \multicolumn{1}{ c }{$\frac{\overline{P_{12}}}{\SI{d2}{\watt}}$} & \multicolumn{1}{ c }{$\frac{\Delta P}{\SI{d2}{\watt}}$} & \multicolumn{1}{ c}{$\frac{\Delta E}{\SI{d2}{\joule}}$} \\ \noalign{\smallskip}\hline\noalign{\smallskip} constant & & & 4000 & -1.89 & 0.10 & 0.22 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.85 & 1.4d-6 & 3921 & -1.872 & 0.003 & 0.004 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.85 & 1.4d-6 & 3958 & -1.871 & 0.002 & 0.004 \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Linear quarter car benchmark results for reticulation 2 using residual-energy-based adaptive step size control with NEPCE and with NEPCE with direct feed-through modification } \label{tab:quartercar_alt_ECCO} \end{table} \begin{figure}[h!tb] \centering \includegraphics[width=\graphicswidth]{graphics/comparisonECCO} \caption{% Average error in the power for the linear quarter car benchmark with reticulation 2: ECCO with NEPCE (solid) against the constant step size results with NEPCE (dashed) and without any corrections (dotted) } \label{fig:quartercar_comparisonECCO} \end{figure} The situation is further improved by also including the direct feed-through modifications for NEPCE, as shown in Fig.~\ref{fig:quartercar_comparisonECCO_mod_NEPCE}. Then, an additional reduction of the average error in the power of \SI{26}{\percent} to \SI{36}{\percent} is achieved compared to the results without the modification. Again, however, the accumulated residual energy is almost unaffected. \begin{figure}[h!tb] \centering \includegraphics[width=\graphicswidth]{graphics/comparisonECCO_mod_NEPCE} \caption{% Average error in the power for the linear quarter car benchmark with reticulation 2: ECCO with NEPCE with direct feed-through modification (solid), ECCO with NEPCE alone (dashed), and uncorrected result with constant step sizes (dotted) } \label{fig:quartercar_comparisonECCO_mod_NEPCE} \end{figure} In conclusion, the non-iterative energy-conservation-based co-simulation framework presented here (NEPCE with direct feed-through modification and ECCO) manages to reduce the energy errors by between \SI{87}{\percent} and \SI{98}{\percent} in the linear quarter car benchmark at no additional computational cost. \subsection{Nonlinear Damping} \label{subsec:nonlinear_spring} Finally, let us study the effects of nonlinear damping as given in Table~\ref{tab:quartercar_nonlinear_model}. Note that the total simulation duration is now set to $T = \SI{2}{\second}$ (\num{2000} macro time steps in total) because the excitations in the system are subdued faster with the more efficient nonlinear damper. In addition, system reticulation 2 is relatively unstable for nonlinear damping, and the macro step size is thus restricted to $t_\text{max} = \SI{2.5}{\milli\second}$ for this setup. The energy-conservation-based corrections to the inputs (as expressed by the tuning factor $\alpha$) have to be applied less aggressively to avoid rapid oscillations. Yet, using NEPCE alone without modifications yields a reduction in the energy errors of \SI{32}{\percent} to \SI{60}{\percent} when compared to the uncorrected results, as shown in Tables~\ref{tab:quartercar_nonlinear} and~\ref{tab:quartercar_alt_nonlinear}. As was the case for the linear benchmark, significant improvements are obtained by combining NEPCE with ECCO: The energy errors are reduced by \SI{79}{\percent} to \SI{91}{\percent} compared to uncorrected results obtained with a constant step size. Also including the direct feed-through modifications with NEPCE leads to small additional reductions of \SI{0}{\percent} to \SI{19}{\percent}. \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=1.1]S[table-format=1.1d-1]S[table-format=4.0]S[table-format=-1.1]S[table-format=1.1]S[table-format=1.1]} \hline\noalign{\smallskip} \multicolumn{4}{c}{Algorithm} & \multicolumn{1}{ c }{Power} & \multicolumn{2}{ c }{Error} \\ \multicolumn{1}{ c }{type} & \multicolumn{1}{ c }{tuning} & \multicolumn{1}{ c }{tolerance} & \multicolumn{1}{ c }{steps} & \multicolumn{1}{ c }{$\frac{\overline{P_{12}}}{\si{\watt}}$} & \multicolumn{1}{ c }{$\frac{\Delta P}{\si{\watt}}$} & \multicolumn{1}{ c}{$\frac{\Delta E}{\si{\joule}}$} \\ \noalign{\smallskip}\hline\noalign{\smallskip} constant & & & 2000 & 0.6 & 1.3 & 4.7 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.6 & & 2000 & 0.1 & 0.5 & 2.9 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.6 & & 2000 & 0.1 & 0.5 & 2.9 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.6 & 4.7d-6 & 1991 & -0.1 & 0.2 & 1.0 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.6 & 4.6d-6 & 2010 & -0.1 & 0.2 & 1.0 \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Nonlinear quarter car benchmark results for reticulation 1 } \label{tab:quartercar_nonlinear} \end{table} \begin{table}[h!tb] \centering \begin{tabular}{lS[table-format=1.1]S[table-format=1.1d-1]S[table-format=4.0]S[table-format=-1.2]S[table-format=1.2]S[table-format=1.2]} \hline\noalign{\smallskip} \multicolumn{4}{c}{Algorithm} & \multicolumn{1}{ c }{Power} & \multicolumn{2}{ c }{Error} \\ \multicolumn{1}{ c }{type} & \multicolumn{1}{ c }{tuning} & \multicolumn{1}{ c }{tolerance} & \multicolumn{1}{ c }{steps} & \multicolumn{1}{ c }{$\frac{\overline{P_{12}}}{\SI{d2}{\watt}}$} & \multicolumn{1}{ c }{$\frac{\Delta P}{\SI{d2}{\watt}}$} & \multicolumn{1}{ c}{$\frac{\Delta E}{\SI{d2}{\joule}}$} \\ \noalign{\smallskip}\hline\noalign{\smallskip} constant & & & 2000 & -3.8 & 0.2 & 0.4 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.4 & & 2000 & -3.78 & 0.14 & 0.30 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.4 & & 2000 & -3.78 & 0.12 & 0.30 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE & 0.4 & 2.6d-5 & 1986 & -3.77 & 0.04 & 0.04 \\ \noalign{\smallskip}\hline\noalign{\smallskip} NEPCE mod.\ & 0.4 & 2.7d-5 & 1989 & -3.77 & 0.03 & 0.04 \\ \noalign{\smallskip}\hline \end{tabular} \caption{% Nonlinear quarter car benchmark results for reticulation 2 } \label{tab:quartercar_alt_nonlinear} \end{table} \section{Conclusion} \label{sec:conclusion} The \emph{Energy-Conservation-based Co-Simulation} method\cite{Sadjina2016} (ECCO) provides a generic framework for error estimation and adaptive step size control in non-iterative co-simulations. Using power bonds to realize the simulator coupling, it directly monitors power flows between the subsystems and gives the exact amount of energy wrongfully added to the total energy of the full coupled system during co-simulation (macro) time steps. The resulting so-called \emph{residual energies} are obtain from the coupling variable values alone, and ECCO uses them to propose an optimal macro time step to minimize energy errors throughout the co-simulation. The \emph{Nearly Energy Preserving Coupling Element}\cite{Benedikt2013} (NEPCE), on the other hand, corrects for coupling errors in non-iterative co-simulations directly to make the flow of (generalized) energy between subsimulators more accurate. In the present paper, we combine both methods to optimize the efficiency and accuracy of non-iterative co-simulations. NEPCE is based on the assumption that the coupling variables are slowly varying on the scale of the macro time step. ECCO, on the other hand, provides a systematic approach to fulfill this requirement by adaptively controlling the macro step size in order to minimize the violation of energy conservation. We also extend NEPCE to the case where direct feed-through is present. Then, the output errors give contributions to the residual energy which are of the same order as the ones stemming from the input errors. Put differently, additional contributions to the violation of energy conservation should be taken into account when constructing energy-conserving corrections to the coupling variables. This is, however, only possible if the interface Jacobian is known. The performance of the concepts discussed here is demonstrated by use of a quarter car co-simulation benchmark model. We study two distinct system reticulations, as well as the effects of including nonlinear damping characteristics. In these benchmarks, NEPCE alone generally yields a reduction in the energy errors of \SI{32}{\percent} to \SI{86}{\percent}, depending on how aggressively it can be used before unwanted oscillations are induced. The proposed direct feed-through modification to NEPCE reduces the energy errors by another \SI{0}{\percent} to \SI{36}{\percent}. Also employing ECCO's adaptive step size control leads to substantially higher accuracies in the co-simulation results: Energy errors are then reduced by up to \SI{98}{\percent} when compared to the uncorrected results with constant macro step sizes. \begin{acknowledgments} This work was funded by the Research Council of Norway (project no. $225322$ MAROFF) and the industrial partners in the ViProMa project consortium (VARD, Rolls-Royce Marine and DNV GL). We are grateful for their financial support. The authors would further like to thank Stian Skjong for fruitful discussions. \end{acknowledgments} \nocite{*} \bibliographystyle{ieeetr}
{'timestamp': '2016-06-17T02:10:09', 'yymm': '1606', 'arxiv_id': '1606.05168', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05168'}
arxiv
\section{Introduction} On-line social networking services have enabled advertisers, campaigners and activists to reach millions of individuals. In particular, the ability to recommend or share web articles \cite{Leskovec2009}, videos \cite{Leskovec2006}, and other media can be harnessed by campaigners for disseminating information to a worldwide audience. While such social network based campaigns sound promising, due to the fact that ideas propagate only a few hops from their origins \cite{Dinh2012}, often, they are found to perform poorly in practice. Providing incentives for recommendations is a natural solution for increasing the hop count. For example, Dropbox, which offers cloud storage services, increased its customer base rapidly by offering incentives for social recommendations \cite{Houston2010}. Although such referrals may increase the short term costs to the company by generating a large number of registrations for the free service, in the long term, the free registrations pay off, since a significant portion of free users eventually migrate to the premium service. Also, to keep the cost down, they capped the referral payouts --- additional 500 MB only for the first 28 referrals, i.e. the referral payout is capped at 14 GB. An alternative mechanism to limiting the cost is to cap the number of incentivized individuals, i.e., instead of capping incentive payments, offer large referral rewards\footnote{For example the living social website gives $100\%$ cash-back on a purchased product if the customer persuades three others to buy the (same) product. Another famous example of uncapped referrals is Uber, and also the taxi service Lyft.} to a preselected set of individuals\footnote{{Instead of advertising the referral scheme, a randomized scheme can be advertised. For example, the advertisement could be ``those who register for the service will get a chance to win discounts for referring their friends."}}. This approach allows the campaigner to target individuals who are best suited to use and recommend the service to their co-workers or friends. \subsection{Related Work} {In \cite{Kempe2003,Chen2009,Chen2010}, the authors consider nodes to be either active or inactive. Making an inactive node active --- not through network effects, but through direct intervention for kick-starting the campaign --- is termed as ``seeding.'' Assuming full knowledge of the network structure, i.e., the adjacency matrix, the question asked in \cite{Kempe2003,Chen2009,Chen2010} is; Given a constraint on the number of seeds, what is the optimal set of seed nodes that would maximize the reach of the campaign? However, in several real-world settings, we may just have access to the statistical properties of the network. Also, the authors in \cite{Kempe2003,Chen2009,Chen2010} do not consider the cost incurred due to incentivization. Incentivization is the process of providing incentives to nodes who are already active, to persuade their friends to sign up. Incentivization happens throughout the campaign, whereas seeding, as discussed in \cite{Kempe2003}, happens only at the beginning. } A related problem involving the calculation of an optimal pricing strategy for products sold to individuals in a social network was explored in \cite{Hartline2008,Arthur2009}. The authors in \cite{Hartline2008,Arthur2009} consider the problem of pricing a product and calculating the amount of cash-back (discount) that is provided to individuals as an incentive to evangelize the product. In this paper, we do not focus on optimal pricing, but rather focus on the size and cost of the campaign where individuals \emph{do not} incur a cost to register for the service. The problems studied in this paper are more appropriate in settings where the service is free, or is based on a freemium model. Furthermore, we only assume partial knowledge of the network and also incorporate constraints that ensure a given campaign penetration, whereas the algorithms proposed in \cite{Hartline2008,Arthur2009} assume full knowledge of the network structure and do not consider any constraint on the campaign size. The problem of computing the optimal referral payment mechanisms that maximize profit was studied in \cite{Lobel2014}, by modelling the referral process as a network game. The authors in \cite{Lobel2014} conclude that a combination of linear payment mechanism (linear in the number of referrals) and threshold payment mechanism (payment only when number of referral exceeds a threshold) approximates the optimal pricing scheme. In this paper, we focus on the set of nodes to be incentivized while assuming that a pricing scheme, which can be computed based on the results in \cite{Lobel2014}, is provided by the campaigner. Similar problems involving the computation of referral rewards in real time, for maximizing the campaign spread, were studied using the theory of optimal control in \cite{Karnik2012,Dayama2012,Kandhway2014,Kandhway2014a,Kandhway2014b}. \subsection{Our Contributions} We consider a scheme where preselected incentivized individuals are presented with a reward when they register for the service, encouraging them to spread the news about the service to their friends. The decision of whether to offer an incentive to an individual is precomputed based on the solution of an optimization problem. We use a variant of the linear threshold model \cite{Kempe2003} for modelling the campaign spreading process. For a given fraction of such incentivized individuals, we first compute the campaign size (expected fraction of registered individuals) using bootstrap percolation. We then use this quantity to formulate the following optimization problems: 1). minimize the cost for achieving a given expected fraction of registered individuals, and 2). maximize the expected fraction of registered individuals for a given cost budget. These optimization problems are not amenable to traditional approaches because of a fixed point equation that needs to be solved numerically. However, we use results from reliability theory to establish some key properties of the fixed point, which in turn enables us to solve these problems using algorithms that are linearithmic in the maximum node degree. Through extensive simulations, we also study the efficacy our incentivization scheme in real world networks. \begin{table}[h] \centering { \caption{A summary of key notation \label{table:notation}} \begin{tabular}{|r|l|} \hline \textbf{Notation} & \textbf{Description} \\ \hline $p(k)$ & fraction of degree $k$ nodes \\ \hline $k_{max}$ & maximum node degree of graph $\mathcal{G}$ \\ \hline $p_{th}(m|k)$ & probability of a degree $k$ node having threshold $m$ \\ \hline $\alpha_1 $ & activation probability of a type $1$ node\\ \hline $\alpha_2 $ & activation probability of a type $2$ node\\ \hline $\overline{d}$ & mean node degree of graph $\mathcal{G}$ \\ \hline $q$ & probability of encountering a type~$2$ node \\ & by traversing a randomly chosen link\\ \hline & random variables that denote the number of type~2 \\ $X_{k_2}$ & \emph{active neighbours} of a degree $k$ node, given that there \\ & are $k_2$ type~2 neighbours\\ \hline & random variables that denote the number of type~1 \\ $Y_{k-k_2}$ & \emph{active neighbours} of a degree $k$ node, given that there \\ & are $k-k_2$ type~1 neighbours\\ \hline $u$ & probability of reaching a registered node by following \\ & an arbitrary edge of the graph\\ \hline $u_q$ & fixed point of Equation~\eqref{eq:u1_fixed_point} \\ \hline $s(q)$ & expected fraction of registered nodes \\ & at the end of the campaign\\ \hline $s_k(q)$ & expected fraction of degree $k$ registered \\ & nodes at the end of the campaign\\ \hline $c_k$ & cost of incentivizing a degree $k$ node \\ \hline $\phi(k)$ & probability of incentivizing a degree $k$ node \\ \hline $\gamma$ & minimum expected fraction of registered nodes\\ \hline $\overline{c}$ & maximum expected incentivization cost \\ \hline \end{tabular} } \end{table} {The key notation used in this paper is summarized in Table~\ref{table:notation}}. The remainder of this paper is organized as follows. In Section~\ref{sec:model}, we present the campaign model. In Section~\ref{sec:compute_cascade_size}, using results from percolation theory, we compute the campaign size (expected proportion of registered individuals). Using this quantity, we formulate and solve two relevant optimization problems in Sections~\ref{sec:cm} and \ref{sec:csm}. In Section~\ref{sec:num_eval}, we compare the analytical results with simulation performed on real-world networks. Finally, in Section~\ref{sec:conclusion}, we conclude the paper. \begin{figure}[t] \centering \includegraphics[scale=0.6]{flow_chart.pdf} \caption{Flow chart denoting the various stages of a node; $m$ denotes the \emph{threshold} of node $i$, $\alpha_1$ and $\alpha_2$ are the activation probabilities of \emph{incentivized} and \emph{non-incentivized} nodes, respectively. \label{fig:flow_chart}} \end{figure} \section{Model} \label{sec:model} Consider a set of $\mathcal{N} = \{1, 2, \cdots, n\}$ individuals who are connected to one another through a social network. {For analytical tractability, as in \cite{Barrat2008,Baxter2010}, we consider this network to be arbitrary, connected\footnote{{The configuration model random graph is connected with high probability if and only if the minimum degree is greater than or equal to $3$.}}, locally tree-like and uncorrelated\footnote{{Uncorrelated networks are networks where the degree of a node is statistically independent of the degree of any other node in the network \cite{Dorogovtsev2010}.}}}. We represent this network as an undirected graph $\mathcal{G}(\mathcal{N}, \mathcal{L})$, where $\mathcal{N}$ and $\mathcal{L}$ represent the set of nodes and links of graph $\mathcal{G}$, respectively. An undirected edge $(a,b) \in \mathcal{L}$ if individuals $a$ and $b$ are neighbours in the underlying social network. {In most scenarios, full knowledge of the network structure may not be available to the campaigner. In such cases, the campaigner can obtain statistical properties of the network through data mining. One such property is the degree distribution.} Let $\{p(k), k \geq 1 \}$ be the degree distribution of graph $\mathcal{G}$. We consider a campaign on the network represented by graph $\mathcal{G}$ (see Fig.~\ref{fig:flow_chart} for the flow chart). The nodes in graph $\mathcal{G}$ can be either in \emph{``active''}, \emph{``registered''} or \emph{``unregistered''} state. Once active, a node remains active. Active nodes are very spirited and express their strong support for the campaign by encouraging their neighbours to register, whereas nodes in the registered and unregistered states refrain from recommendations. For a node to become active, it must first show support for the campaign by registering itself. However, all registered nodes need not be active. The campaign starts with a set of \emph{zealous} individuals --- those who intrinsically desire the service. These nodes do not need any recommendation to register, and are registered for the campaign from the very start. If a zealous node becomes active, it will recommend the service to its neighbours. On the other hand, nodes that are not zealous, register only if the number of active neighbours exceeds a predefined threshold value (see Fig.~\ref{fig:flow_chart}). Let $p_{th}(m|k)$ denote the probability of a degree $k$ node having threshold $m$. {This is a generalization of the celebrated linear threshold model \cite{Kempe2003}} --- a model of choice for studying the dissemination and adoption of new products, technologies and ideas \cite{Granovetter1978,Macy1991,Mahajan1991,Berger2001}. We note that, by definition, $\sum_{k \geq 1} p(k) \cdot p_{th}(0|k)$ denotes the fraction of zealous nodes in the network\footnote{Campaigner can estimate the fraction of zealous nodes by conducting surveys on a reasonable sized demographic.} --- fraction of nodes that register without any recommendations. A node that receives a reward when it registers for the service is more likely to tell its neighbours about the reward and encourage them to register. Therefore, we divide the nodes into two categories: the `\emph{non-incentivized}' (type $1$) and the `\emph{incentivized}' (type $2$). The campaigner decides the fraction of incentivized nodes before the start of the campaign\footnote{Alternatively, whenever an individual registers, the campaigner can dynamically decide whether to incentivize this individual. This problem is similar to stochastic control problems, and is beyond the scope of this paper.}. However, these nodes become aware of the fact that they are incentivized only if they register for the service\footnote{{Incentives are assigned assuming knowledge of the exact degree of the registered node, because the exact node degree can be obtained after registering. For example, one can ask individuals to register through an on-line social network, and compute the exact degree from their contact list.}}. Since incentivized nodes are provided with incentives upon registration, they are more likely to be enthused, and will play an active part in the campaign than non-incentivized nodes. Let $\alpha_1 \in (0,1]$ and $\alpha_2 \in (0,1]$ be the probabilities of a non-incentivized (type $1$) and incentivized (type $2$) node becoming active, respectively. Due to the presence of incentives, we assume that $\alpha_2>\alpha_1$. \begin{figure*}[!t] \setcounter{temp}{\value{equation}} \setcounter{equation}{5} \begin{align} f(q, u) &= \sum \nolimits_{k \geq 0} p_{ex}(k) \cdot p_{th}(0|k+1) + \sum \nolimits_{k \geq 1} p_{ex}(k) \sum \nolimits_{m \geq 1} p_{th}(m|k+1) \sum \nolimits^{k}_{k_2=0} \hat{p}(k_2 | k) \cdot P[X_{k_2} + Y_{k-k_2} \geq m ] \nonumber \\ &= \sum \nolimits_{k \geq 0} p_{ex}(k) \cdot p_{th}(0|k+1) + \sum \nolimits_{k \geq 1} p_{ex}(k) \sum \nolimits_{m \geq 1} p_{th}(m|k+1) \sum \nolimits^{k}_{k_2=0} {k \choose k_2} \cdot q^{k_2} \cdot (1-q)^{k - k_2} \cdot \nonumber \\ & \hspace{40mm} \left(\sum \nolimits_{l + l^{'} \geq m} {k_2 \choose l} (\alpha_2u)^l (1-\alpha_2u)^{k_2-l} {k-k_2 \choose l^{'}} (\alpha_1u)^{l^{'}} (1-\alpha_1u)^{k-k_2-l^{'}} \right) \nonumber \\ g_k(q, u) &= p_{th}(0|k) + \sum \nolimits_{m \geq 1} p_{th}(m|k) \sum \nolimits^{k}_{k_2=0} \hat{p}(k_2 | k) \cdot P[X_{k_2} + Y_{k-k_2} \geq m ] \nonumber \\ & \hspace{-12mm} \textrm{where } X_{k_2} \sim Bin(k_2,\alpha_2u) \textrm{ and } Y_{k-k_2} \sim Bin(k-k_2,\alpha_1u) \nonumber \end{align} \setcounter{equation}{\value{temp}} \hrulefill \vspace*{4pt} \end{figure*} \section{Computing the Cascade Size} \label{sec:compute_cascade_size} Before presenting the problems, we need to first compute cascade size, i.e., the expected fraction of nodes that have registered at the end of the campaign. Let $p(k' | k)$ be the probability of encountering a degree $k'$ node by traversing a link from a degree $k$ node. From \cite{Barrat2008}, we know that this conditional distribution, {for an uncorrelated network}, has the following form $p(k' | k) = \frac{k' \cdot p(k')}{ \overline{d}}$, where $\overline{d}$ denotes the mean degree of the graph $\mathcal{G}$. Let $q(k)$ be the probability of encountering a type~$2$ node by traversing a randomly chosen link from a degree $k$ node. Then, we have \begin{align*} q(k) &= \sum \nolimits_{k^{'} \geq 1} \textrm{Pr}[\textrm{type~2 neigh.} | k^{'}] \cdot p(k^{'}| k) \nonumber \\ &= \sum \nolimits_{k^{'} \geq 1} \phi(k^{'}) \cdot p(k^{'}| k) = \frac{1}{\overline{d}}\sum \nolimits_{k^{'} \geq 1} k^{'} \phi(k^{'}) p(k^{'}) \end{align*} Since $q(k)$ is independent of $k$, let $q(k) = q \ \forall \ k \in \{1,2, \cdots ,k_{max}\}$. Here, $k_{max}$ is the maximum node degree. Since the network is locally tree-like, with some effort, it can be shown that the number of type~$2$ neighbours of a degree $k$ node is a \emph{binomial random variable} with the probability distribution function $\hat{p}(k_2 | k) = {k \choose k_2} \cdot q^{k_2} \cdot (1-q)^{k - k_2}$. Let $p_{ex}(k^{'})$ be the excess degree distribution, i.e., the degree distribution of a node encountered by following a randomly chosen link without counting that link. For an uncorrelated network, from \cite{Baxter2010}, we know that $p_{ex}(k^{'}) = \frac{(k^{'}+1) \cdot p(k^{'}+1)}{ \overline{d}}$. Now, let $u$ denote the probability of reaching a registered node by following an arbitrary edge of the graph. First, let us consider an arbitrary node $j$ of degree $k$ and threshold $m$. Next, we compute the probability that node $j$ registers due to recommendations from its active neighbours, given that we have arrived at node $j$ by following an arbitrary link in the graph. For ease of presentation, we do not explicitly write the condition ``following an arbitrary link.'' \begin{align} &\hspace{0mm} P[j \textrm{ registers } | j \textrm{ is of degree } k, j \textrm{ has threshold } m] \nonumber \\ &\overset{(a)}{=} {\textstyle \sum^k_{l = m}} P[j \textrm{ has } l \textrm{ active neighbours} | j \textrm{ is of degree } k] \nonumber \\ &= {\textstyle \sum^k_{l = m}} {\textstyle \sum \nolimits^k_{k_2=0}} P[k_2 \textrm{ type~2 neighbours} | j \textrm{ is of degree } k] \nonumber \\ & \hspace{2mm} \cdot P[l \textrm{ active neigh.}| j \textrm{ is of degree } k \textrm{ and } k_2 \textrm{ type~2 neigh.} ] \Big) \nonumber \\ &= {\textstyle \sum^k_{l = m}} \left( {\textstyle \sum^{k}_{k_2=0}} \hat{p}(k_2 | k) \cdot P[X_{k_2} + Y_{k-k_2} = l ]\right) \nonumber \\ &= {\textstyle \sum^{k}_{k_2=0}} \hat{p}(k_2 | k) \cdot P[X_{k_2} + Y_{k-k_2} \geq m ] \label{eq:p_j_reg} \end{align} \normalsize {where Equality~(a) follows because the events $\{j$ registers$\}$ and $\{j$ has $m$ or more active neighbours given that $j$ has threshold $m\}$ are equivalent, and the events $\{j $ has $l$ active neighbours$\}$ and $\{j$ has threshold $m\}$ are independent of each other.} In Equality~\eqref{eq:p_j_reg}, $X_{k_2}$ and $Y_{k-k_2}$ are random variables that denote the number of type~2 and type~1 \emph{active neighbours} of a degree $k$ node, given that there are $k_2$ type~2 and $k-k_2$ type~1 neighbours. With some effort, it can be shown that random variables $X_{k_2}$ and $Y_{k-k_2}$ are independent and have a binomial distribution with parameters $(k_2,\alpha_2 u)$ and $(k-k_2,\alpha_1 u)$, respectively. Here, $\alpha_1$ and $\alpha_2$ are the probability of a type~1 and type~2 node becoming active, respectively. {The independence occurs because the probability of incentivizing a node is independent of the degree of its neighbouring nodes. The binomial distribution arises here because the network is locally tree-like. } From Equation~\eqref{eq:p_j_reg}, it is evident that the probability of a node registering is \emph{independent of its type}\footnote{A node registers either if it is zealous (this event is independent of its type), or through recommendations which depend on its neighbours and type of neighbours but not on its type.}. Therefore, the probability that by following an arbitrary link we can reach a node that registers due to recommendations is given by \begin{align} &P[\textrm{node registers due to recommendation}] = \sum \nolimits_{k \geq 1} p_{ex}(k) \cdot \nonumber \\ &\hspace{5mm} P[\textrm{node reg. due to recommendations} | \textrm{excess degree } k] \nonumber \end{align} \begin{align} &= \sum_{k \geq 1} p_{ex}(k) \hspace{-1.5mm} \sum_{m \geq 1} \hspace{-1mm} P[\textrm{node registers, node has threshold } m | \nonumber \\ & \hspace{45mm} \textrm{node has excess degree } k] \nonumber \\ &\overset{(a)}{=} \sum_{k \geq 1} p_{ex}(k) \hspace{-1.5mm} \sum_{m \geq 1} \hspace{-1mm} p_{th}(m|k+1) \cdot P[\textrm{node registers} | \nonumber \\ & \hspace{12mm} \textrm{node has excess degree } k,\textrm{ node has threshold } m] \nonumber \\ & =\sum_{k \geq 1} p_{ex}(k) \sum_{m \geq 1} p_{th}(m|k+1) \cdot \nonumber \\ & \hspace{3mm} \sum^{k}_{k_2=0} {k \choose k_2} \cdot q^{k_2} \cdot (1-q)^{k - k_2} \cdot P[X_{k_2} + Y_{k-k_2} \geq m ] \label{eq:node_reg} \end{align} {On the RHS of Equation~\eqref{eq:node_reg}, we use the excess degree distribution because we discount the link that we followed to arrive at the node. In Equality~(a), we use $p_{th}(m|k+1)$ because if we include the link on which we arrived, a node of excess degree $k$ will have $k+1$ links}. Arguing along the lines of \cite{Baxter2010}, we can conclude that $u$ has to satisfy the following self consistency equation \begin{align} & u = P[\textrm{node is zealous}] \nonumber \\ & \hspace{20mm} + P[\textrm{node reg. due to recommendations}] \nonumber \\ &= \sum \nolimits_{k \geq 0} p_{ex}(k) p_{th}(0|k+1) \nonumber \\ & \hspace{20mm} + P[\textrm{node reg. due to recommendations}] \nonumber \\ &= f(q,u) \label{eq:u1_fixed_point} \end{align} where $f(q,u)$ is as given at the top of this page. For any $q$, Equation~(\ref{eq:u1_fixed_point}) is a fixed point equation in $u$. However, due to the complex nature of the function $f(q,u)$, the existence of a $u$ that satisfies Equation~\eqref{eq:u1_fixed_point} is not obvious. {Using results from reliability theory, in Proposition~\ref{prop:fixed_point}, we prove the existence and uniqueness of the fixed point of Equation~\eqref{eq:u1_fixed_point}.} Before that, the following proposition establishes the nature of function $f(q,u)$ (w.r.t $u$). \begin{prop} \label{prop:f_nature} If the fraction of zealous nodes lies in the open interval $(0,1)$, then $ \forall \ q \in [0,1]$, $f(q,u)$ is a continuously differentiable, convex, monotonically increasing function of $u$. \end{prop} \begin{IEEEproof} In Appendix~\ref{sec:prop_f_nature}. \end{IEEEproof} {Proposition~\ref{prop:f_nature} gives us some intuition about the existence and uniqueness of the fixed point.} However, we establish the same rigorously in the following proposition. \begin{prop} \label{prop:fixed_point} For every $q \in [0,1]$, \begin{enumerate}[(i)] \item If no node in the network is zealous, then $u=0$ is the only solution of Equation~\eqref{eq:u1_fixed_point}. \item If every node in the network is zealous, then $u=1$ is the only solution of Equation~\eqref{eq:u1_fixed_point}. \item If the fraction of zealous nodes lies in the interval $(0,1)$, then Equation~\eqref{eq:u1_fixed_point} has a unique fixed point in $(0,1)$. \end{enumerate} \end{prop} \begin{IEEEproof} In Appendix~\ref{sec:fixed_point}. \end{IEEEproof} For ease of presentation, in the remainder of the paper, we assume that the fraction of zealous nodes lies in the open interval $(0,1)$. For any $q \in [0,1]$, let $u_q$ denote the fixed point of Equation~\eqref{eq:u1_fixed_point}. {Since the fixed point is unique, we can obtain $u_q$ by iteratively solving Equation~\eqref{eq:u1_fixed_point}.} Our next proposition qualitatively describes the variation of the fixed point $u_q$ as function of $q$. \begin{prop} \label{prop:fp_increasing} If $\alpha_2 > \alpha_1$, then $u_q$ is a strictly increasing continuous function of $q$, i.e., $\frac{\partial u_q}{\partial q} > 0$. \end{prop} \begin{IEEEproof} In Appendix~\ref{sec:du_by_dq}. \end{IEEEproof} Now, given a $q \in [0,1]$, let $s_k(q)$ be the {expected fraction} of degree $k$ nodes that have registered at the end of the campaign. The expression for $s_k(q)$ can be obtained as follows \begin{align} & s_k(q) = P[\textrm{node registers}| \textrm{degree } k ] \nonumber \\ &= P[\textrm{node is zealous} | \textrm{degree } k] \nonumber \\ & \hspace{10mm} + P[\textrm{node reg. due to recommendations} | \textrm{degree } k] \nonumber \\ &= \sum \nolimits_{m \geq 1} \hspace{-1mm} P[\textrm{node reg, node has threshold } m | \nonumber \\ & \hspace{20mm} \textrm{node has degree } k] + p_{th}(0|k) \nonumber \\ &= p_{th}(0|k) + \sum \nolimits_{m \geq 1} \hspace{-1mm} p_{th}(m|k) \cdot \nonumber \\ & \hspace{6mm} P[\textrm{node reg} | \textrm{node has degree } k,\textrm{ node has threshold } m] \nonumber \\ &= g_k(q,u) |_{u=u_q} \label{eq:sk} \end{align} where $g_k(q, u)$ is as given at the top of this page and $u_q$ is the fixed point of Equation\eqref{eq:u1_fixed_point}. Given a $q \in [0,1]$, let $s(q)$ be the {expected fraction} of nodes that have registered at the end of the campaign. $s(q)$ is also termed as the size of the epidemic. Then, using arguments similar to the ones used to derive Equation~\eqref{eq:s}, it can be shown that \begin{align} s(q) &=\sum \nolimits_{k \geq 1} p(k) \cdot g_k(q,u) \Big|_{u=u_q} \hspace{-2mm} = \sum \nolimits_{k \geq 1} p(k) \cdot s_k(q) \label{eq:s} \end{align} {Once again using results from reliability theory, in Proposition~\ref{prop:g_increasing}, we establish the increasing and non-decreasing nature of functions $g(q,u)$ and $g_k(q,u)$ (with respect to $u$ and $q$). } \begin{prop} \label{prop:g_increasing} If $\alpha_2 > \alpha_1$, then \begin{enumerate} \item $\frac{\partial g(q,u)}{\partial q} > 0$ and $\frac{\partial g(q,u)}{\partial u} > 0$ \item $\frac{\partial g_k(q,u)}{\partial q} \geq 0$ and $\frac{\partial g_k(q,u)}{\partial u} \geq 0$. \end{enumerate} \end{prop} \begin{IEEEproof} Similar to that of Propositions~\ref{prop:f_nature} and \ref{prop:increasing}. \end{IEEEproof} \section{{Cost Minimization Under Cascade Size Constraint}} \label{sec:cm} Providing incentives is a costly affair. The campaigner may either be interested in minimizing the cost while guaranteeing that a given proportion of population registers, or in maximizing the registrations for a given cost budget. In this section, we look at the former problem. \subsection{Cost of incentivization} \label{sec:cost_structure} Incentives provided by the campaigner is usually a function of its degree because the number of potential recommendations depend on the degree. Let $c_k$ be the cost of incentivizing a degree $k$ node. \emph{Incentivized nodes obtain incentives only if they registers}. Therefore, the expected cost per incentivized degree $k$ node is given by $c_k \cdot s_k(q)$, where $s_k(q)$ (see Equation~\ref{eq:sk}) is the probability that an incentivized degree $k$ node registers. Let $\phi(k)$ denote the probability of incentivizing a degree $k$ node. Then, the average cost per node for incentive-policy $(\boldsymbol{\phi}=\{\phi(k), k \geq 1\})$ is given by $\sum_{k \geq 1} p(k) \phi(k) \times (\textrm{cost of node of deg. } k) = \sum_{k \geq 1} p(k) \cdot c_k \cdot \phi(k) \cdot s_k(q)$, where $q = \frac{1}{\overline{d}} \sum_{k\geq 1} k \cdot p(k) \cdot \phi(k)$. \subsection{Problem formulation} \label{sec:problem_cm} Minimizing the cost while providing guarantees on the number of expected registrations is appropriate for campaigns where the campaigners are mandated to achieve a given target. This problem can be mathematically formulated as follows \begin{align} & \hspace{10mm} \underset{\boldsymbol{0} \leq \boldsymbol{\phi} \leq \boldsymbol{1}} {\text{min}} \label{eq:min_problem} \ \ \ \ \sum \nolimits_{k \geq 1} c_k \cdot p(k) \cdot \phi(k) \cdot s_k(q) \\ & \hspace{0mm} \textrm{Subject to:} \quad s(q) \geq \gamma \textrm{ and } q = \frac{1}{\overline{d}} \sum \nolimits_{k\geq 1} k \cdot p(k) \cdot \phi(k) \nonumber \end{align} where $\gamma \in [0,\gamma_{max}]$ is the minimum expected fraction of registered individuals that must be achieved and $\overline{d}$ is the mean degree of the network. Here, $\gamma_{max}$ is the expected fraction of registered individuals obtained by incentivizing everyone. The expression for $s_k(q)$ (Equation~\eqref{eq:sk}) and $s(q)$ (Equation~\eqref{eq:s}) involve $u_q$, which is the solution to the fixed point Equation~\eqref{eq:u1_fixed_point}. Thus, it is not possible to apply traditional analytical techniques such as the \emph{Karush-Kuhn-Tucker (KKT) conditions} to solve the above problem. Furthermore, the problem may be non convex, and applying numerical techniques such as \emph{genetic algorithms}, or \emph{Markov Chain Monte Carlo} methods may not yield a globally optimal solution. \subsection{Solution approach} \label{sec:sa_cm} In this section, we present transformations that allow us to efficiently compute the global optima of the cost minimization problem presented in the previous section. To help us with this, we state and prove the following proposition. {The intuition behind this proposition is that, as $\alpha_2 > \alpha_1$, increasing $q$ increases the proportion of type~$2$ nodes, which results in a higher $s(q)$.} \begin{prop} \label{prop:s_increasing} If $\alpha_2 > \alpha_1$, then function $s:[0,1] \to [\gamma_{min},\gamma_{max}]$ is a monotonically increasing bijection, where $\gamma_{max}=s(0)$ and $\gamma_{max}=s(1)$ are the expected fraction of registered individuals obtained by incentivizing nobody and everybody, respectively. \end{prop} \begin{IEEEproof} We have \begin{align} \frac{\partial s(q)}{\partial q} &= \frac{\partial \left(g(q,u) |_{u=u_q} \right)}{\partial q} \nonumber \\ & \overset{(a)}{=} \frac{\partial g(q,u)}{\partial q} \Bigg|_{u=u_q} + \frac{\partial g(q,u)}{\partial u} \Bigg|_{u=u_q} \cdot \frac{\partial u_q}{\partial q} \nonumber \\ & = \underset{\textrm{Proposition \ref{prop:g_increasing}}}{(>0)} + \underset{\textrm{Proposition \ref{prop:g_increasing}}}{(> 0)} \cdot \underset{\textrm{Proposition \ref{prop:fp_increasing}}}{(>0)} \nonumber \\ & \hspace{-15mm} \Rightarrow \frac{\partial s(q)}{\partial q} > 0 \label{eq:sq_inc} \end{align} {where Equality~(a) follows from an application of the chain rule.} From Inequality~\eqref{eq:sq_inc}, we can see that $s(q)$ is a monotonically increasing function defined on the closed interval $[0,1]$. Hence, $s:[0,1]\to[\gamma_{min},\gamma_{max}]$ is a bijection. \end{IEEEproof} Proposition~\ref{prop:s_increasing} establishes that $s(q)$ is a monotonically increasing function of $q$ and is a bijection. Therefore, we can replace the constraint $s(q) \geq \gamma$ with the constraint $q \geq q_{\gamma}$, where $q_{\gamma}$ is such that $s(q_\gamma) = \gamma$. {Since $s(q)$ is a monotonically increasing function of $q$, we can compute $q_{\gamma}$ by performing a line search over the closed interval $[0,1]$.} The following algorithm does this. \begin{algorithm} \label{algo:q_gamm} \caption{Algorithm to compute $q_{\gamma}$} \begin{algorithmic}[1] \STATE Set $q_1 :=0$ and $q_2 :=1$ \WHILE{$|s(q_1) - s(q_2)| > \epsilon$} \STATE $q_{mp} := (q_1 + q_2)/2$ \STATE Solve equation $u = f(q_{mp},u)$ to obtain $u_{q_{mp}}$. \IF{$s(q_{mp}) < \gamma$} \STATE $q_1 := q_{mp}$ \ELSE \STATE $q_2 := q_{mp}$ \ENDIF \ENDWHILE \STATE \textbf{return} $q_{\gamma} := (q_1+q_2)/2$ \end{algorithmic} \end{algorithm} Proposition~\ref{prop:s_increasing} does not tell us how the expected fraction of registered degree $k$ nodes ($s_k(q)$) responds to changes in $q$. {While, the function $s_k(q)$ may not be a bijection for all values of $k$, we show that it is a \emph{non-decreasing} function of $q$, for all values of $k$.} \begin{prop} \label{prop:sk_increasing} If $\alpha_2 > \alpha_1$, then for all $k \geq 1$, $\frac{\partial s_k(q)}{\partial q} \geq 0$ \end{prop} \begin{IEEEproof} By first writing the total derivative in terms of the partial derivatives (see Proposition~\ref{prop:s_increasing}), and then by using the non-negativity of these partial derivatives (from Propositions \ref{prop:fp_increasing} and \ref{prop:g_increasing}). \end{IEEEproof} {Now, if $\gamma \leq \gamma_{min}=s(0)$, then the cascade constraint is met without incentivizing anyone. In such cases, the optimum incentive policy and the optimum cost is given by $\{\phi(k)=0, \forall k \geq 1\}$ and $0$, respectively. On the other hand, if $\gamma = \gamma_{max}=s(1)$, then the cascade constraint is met only if everyone is incentivized, i.e., $\{\phi(k)=1, \forall k \geq 1\}$, and the optimum cost is given by $\sum_{k \geq 1} c_k \cdot p(k) \cdot s_k(1)$.} For the cases when $\gamma \in (\gamma_{min}, \gamma_{max})$, {due to Propositions~\ref{prop:s_increasing}}, the cost minimization problem can be re-written as follows \begin{align} & \hspace{0mm} P_1: \underset{\boldsymbol{0} \leq \boldsymbol{\phi} \leq \boldsymbol{1}} {\text{min}} \label{eq:min_problem_alternate} \ \ \ \ \sum \nolimits_{k \geq 1} c_k \cdot p(k) \cdot \phi(k) \cdot s_k(q) \\ & \hspace{0mm} \textrm{Subject to:} \quad q \geq q_{\gamma} \textrm{ and } q = \frac{1}{\overline{d}} \cdot \sum \nolimits_{k\geq 1} k \cdot p(k) \cdot \phi(k)\nonumber \end{align} where $q_{\gamma}$ is chosen such that $s(q_\gamma) = \gamma$. Since $\gamma \in (\gamma_{min}, \gamma_{max})$, we have $q_{\gamma} \in (0,1)$ (see Proposition~\ref{prop:s_increasing}). {The next proposition establishes the existence of an optimal policy, of problem $P_1$, that satisfies all its the constraints, with equality.} \begin{prop} \label{prop:eq_to_lp_stage_one} If $\alpha_2 > \alpha_1$, then problem $P_1$ has an optimal solution $\boldsymbol{\phi}^{opt} = \{\phi^{opt}_k , k \geq 1\}$ such that $\sum_{k\geq 1} k \cdot p(k) \cdot \phi^{opt}(k) = \overline{d} \cdot q_{\gamma}$ \end{prop} \begin{IEEEproof} In Appendix~\ref{sec:eq_to_lp_stage_one}. \end{IEEEproof} {From Proposition~\ref{prop:eq_to_lp_stage_one}, we can see that problem $P_1$ has an optimal solution that satisfies all its constraints with equality. Therefore, to obtain a solution of problem $P_1$, we restrict our search to the set of policies that satisfy the constraints of problem $P_1$ with equality. Subsequently, a change of variable gives us the following linear program} \begin{align} & \hspace{10mm} P_2: \underset{\{\nu_k , k\geq 1\}} {\text{min}} \label{eq:min_problem_linear} \ \ \ \ \overline{d} \cdot q_{\gamma} \cdot \sum \nolimits_{k \geq 1} \nu_k \cdot \mu_k(q_{\gamma}) \\ & \hspace{0mm} \textrm{Subject to:} \quad \sum \nolimits_{k\geq 1} \nu_k = 1 \textrm{ and } 0 \leq \nu_k \leq \frac{k \cdot p(k)}{\overline{d} \cdot q_{\gamma}} \, \, \forall k \geq 1\nonumber \end{align} where $\mu_k(q_{\gamma}) = \frac{s_k(q_\gamma) \cdot c_k}{k}$. {The following proposition establishes a crucial relation between the optimal solutions of problems $P_1$ and $P_2$. } \begin{prop} \label{prop:eq_to_lp_stage_two} Let $\{\nu^{opt}_k , k \geq 1\}$ be an optimal solution of problem $P_2$. If $\alpha_2 > \alpha_1$, then we can obtain an optimal solution of problem $P_1$ as follows $$\phi^{opt}(k) = \begin{cases} 0 & \textrm{if } p(k) = 0 \\ \frac{\nu^{opt}_k \cdot \overline{d} \cdot q_{\gamma}}{k \cdot p(k)} & \textrm{otherwise} \end{cases} $$ \end{prop} \begin{IEEEproof} In Appendix~\ref{sec:eq_to_lp_stage_two}. \end{IEEEproof} {Therefore, to obtain an optimal solution of problem $P_1$, we just need to solve $P_2$ and apply Proposition~\ref{prop:eq_to_lp_stage_two}. Problem $P_2$ is a linear program and can be solved by any well-known LP-solver in polynomial time ($O((k_{max})^{3.5})$ time, where $k_{max}$ is the maximum node degree in the network)\cite{Karmarkar1984}. However, we exploit the rich structure of this problem and solve it in linearithmic time $O(k_{max} \cdot log(k_{\max}))$} Let $\mathcal{S} = \{1, 2, \cdots, k_{max}\}$. Here, $k_{max}$ is the maximum degree of the network. Consider a permutation $\sigma:\mathcal{S} \to \mathcal{S}$ such that if $k_1 < k_2$, then $\mu_{\sigma(k_1)}(q_{\gamma}) \leq \mu_{\sigma(k_2)}(q_{\gamma})$, i.e., $\mu_{\sigma(1)}(q_{\gamma}) \leq \mu_{\sigma(2)}(q_{\gamma}) \leq \cdots \leq \mu_{\sigma(k_{max})}(q_{\gamma})$. The permutation $\sigma$ can be obtained in $O(k_{max} \cdot log(k_{\max}))$ time by sorting the set $\{\mu_k(q_{\gamma}), k \geq 1\}$ in ascending order. Using this order, we can obtain an optimal solution $\boldsymbol{\nu}^a$ of problem $P_2$ in $\Theta(k_{max})$ time by following the steps in Algorithm~\ref{algo:compute_nu}. \begin{algorithm}[h] \caption{Algorithm to compute optimal solution of $P_2$ \label{algo:compute_nu}} \begin{algorithmic}[1] \STATE $res := 1$ and $\boldsymbol{\nu}^a := [0, 0, \cdots , 0]$ --- a $1 \times k_{max}$ vector \FOR{$j \in [1, 2, \cdots, k_{max}]$} \IF{$res > 0$} \STATE $\nu^a_{\sigma(j)} = \min \left\{ res, \frac{\sigma(j) \cdot p(\sigma(j))}{\overline{d} \cdot q_{\gamma}} \right\}$ \STATE $res := res - \nu^a_{\sigma(j)}$ \ENDIF \ENDFOR \STATE \textbf{return} $\boldsymbol{\nu}^a$ \end{algorithmic} \end{algorithm} In Algorithm~\ref{algo:compute_nu}, $\nu^a_k$ denotes the $k^{th}$ component of vector $\boldsymbol{\nu}^a$. {We illustrate the principle behind Algorithm~\ref{algo:compute_nu} using a jar filling analogy. Variable $\nu^a_{\sigma(j)}$ can be interpreted as a jar with capacity $\frac{\sigma(j) \cdot p(\sigma(j))}{\overline{d} \cdot q_{\gamma}}$. The for loop in the algorithm is equivalent to filling these jars with water from another} {jar of unit capacity, in an ascending order, as given by the permutation $\sigma$.} From steps $1$, and $4-5$ of Algorithm~\ref{algo:compute_nu}, it is easy to see that $\boldsymbol{\nu}^a$ is a feasible solution of problem $P_2$. The optimality of $\boldsymbol{\nu}^a$ with respect to problem $P_2$ is established by the following proposition. \begin{prop} \label{prop:opt_stage_two} The vector $\boldsymbol{\nu}^a$ returned by Algorithm~\ref{algo:compute_nu} is an optimal solution of problem $P_2$. \end{prop} \begin{IEEEproof} In Appendix~\ref{sec:opt_nu_a}. \end{IEEEproof} \section{{Cascade Size Maximization Under Budget Constraint}} \label{sec:csm} In this section, we consider the challenge faced by a resource-constrained campaigner. The campaigner desires to maximize the campaign size, but is constrained by limited resources. Let $\overline{c}$ denote the limit on the expected incentivization cost. Then, we can formulate the cost-constrained cascade maximization problem as follows \begin{align*} & \hspace{15mm} P_3: \underset{\boldsymbol{0} \leq \boldsymbol{\phi} \leq \boldsymbol{1}} {\text{max}} \ \ \ \ s(q) \\ & \hspace{0mm} \textrm{Subject to:} \ \ \sum \nolimits_{k \geq 1} c_k \cdot p(k) \phi(k) s_k(q) \leq \overline{c} \nonumber \\ & \hspace{5mm} \textrm{ and } q = \frac{1}{\overline{d}} \sum \nolimits_{k\geq 1} k \cdot p(k) \cdot \phi(k) \end{align*} \subsection{Solution approach} \label{sec:sa_crm} Let $s^{opt}$ be the optimum value of problem $P_3$. From Proposition~\ref{prop:s_increasing}, we know that there exists a unique $q^{opt} \in (0,1)$ such that $s(q^{opt}) = s^{opt}$. {From Proposition~\ref{prop:s_increasing}, we know that $\frac{\partial s(q)}{\partial q}> 0$, i.e., $s(q)$ is a monotonically increasing bijection. Therefore, it can be argued that $q^{opt}$ can be obtained by solving the following optimization problem} \begin{align*} & \hspace{15mm} P_4: \underset{\boldsymbol{0} \leq \boldsymbol{\phi} \leq \boldsymbol{1}} {\text{max}} \ \ \ \ q \\ & \hspace{0mm} \textrm{Subject to:} \sum \nolimits_{k \geq 1} c_k \cdot p(k) \phi(k) s_k(q) \leq \overline{c} \nonumber \\ & \hspace{5mm} \textrm{ and } q = \frac{1}{\overline{d}} \sum \nolimits_{k\geq 1} k \cdot p(k) \cdot \phi(k) \end{align*} Let us define $\mu_k(q) = \frac{s_k(q) \cdot c_k}{k}$ and $\nu_k(q) = \frac{k \cdot p(k) \cdot \phi(k)}{\overline{d} \cdot q}$. Then, problem $P_4$ can be re-written as follows \begin{align*} & \hspace{30mm} P_5: \underset{\boldsymbol{\nu}, q \in (0,1)} {\text{max}} \ \ \ \ q \\ & \hspace{15mm} \textrm{Subject to:} \quad \overline{d} \cdot q \cdot \sum \nolimits_{k \geq 1} \nu_k(q) \cdot \mu_k(q) \leq \overline{c} \nonumber \\ & \hspace{0mm} \sum \nolimits_{k\geq 1} \nu_k(q) = 1 \quad \textrm{and} \quad 0 \leq \nu_k(q) \leq \frac{k \cdot p(k)}{\overline{d} \cdot q} \quad \forall \ k \geq 1\nonumber \end{align*} \noindent Now, given a $q \in(0,1)$, consider the following criteria \begin{enumerate}[(1)] \item $\overline{d} \cdot q \cdot \sum_{k \geq 1} \nu_k(q) \cdot \mu_k(q) \leq \overline{c} $ \item $ \sum_{k\geq 1} \nu_k(q) = 1$ \item $0 \leq \nu_k(q) \leq \frac{k \cdot p(k)}{\overline{d} \cdot q} \quad \forall k \geq 1$ \end{enumerate} If we can find a vector $\boldsymbol{\nu}$ that satisfies the above criteria, then the 2-tuple $(\boldsymbol{\nu},q)$ is a feasible solution of problem $P_5$. Let $\boldsymbol{\nu}^a(q)$ be the vector output by Algorithm~\ref{algo:compute_nu} when $q_{\gamma}$ is set to $q$. From Proposition~\ref{prop:opt_stage_two}, we know that this vector minimizes the LHS of criterion~(1) subject to criteria (2) and (3). Therefore, if we have $\overline{d} \cdot q \cdot \sum_{k \geq 1} \nu^a_k(q) \cdot \mu_k(q) > \overline{c} $, then for the given value of $q$, no vector $\boldsymbol{\nu}$ can satisfy criterion~(1). Now, let $\boldsymbol{\nu}^a(q+ \Delta q)$ be the vector output by Algorithm~\ref{algo:compute_nu} when $q_{\gamma}$ is set to $q+\Delta q$. Then, for any $\Delta q > 0$, if $\overline{d} \cdot q \cdot \sum_{k \geq 1} \nu^a_k(q) \cdot \mu_k(q) > \overline{c}$, then we have \begin{align} \overline{c} & < \overline{d} \cdot q \sum_{k \geq 1} \nu^a_k(q) \cdot \mu_k(q) \overset{(a)}{\leq} \overline{d} \cdot q \cdot \sum_{k \geq 1} \nu^a_k(q+\Delta q) \cdot \mu_k(q) \nonumber \\ & \overset{(b)}{\leq} \overline{d} \cdot (q + \Delta q) \cdot \sum \nolimits_{k \geq 1} \nu^a_k(q+\Delta q) \cdot \mu_k(q+\Delta q) \label{eq:less} \end{align} {where Inequality~$(a)$ follows because the vector $\boldsymbol{\nu}^a(q)$ is an optimal solution and $\boldsymbol{\nu}^a(q+\Delta q)$ is just a feasible point at $q$, and Inequality~$(b)$ follows because $\frac{\partial \mu_k(q)}{\partial q} = \frac{c_k}{k} \cdot \frac{\partial s_k(q)}{\partial q} \geq 0$ (see Proposition~\ref{prop:sk_increasing})}. From Inequality~\ref{eq:less} we can conclude that if there does not exist a vector $\boldsymbol{\nu}$ that satisfies criteria (1)-(3) for some $q \in (0,1)$, then no vector satisfies these criteria for any $q^{'} \in (q,1)$. {Therefore, the optimal value $q^{opt}$ is given by the largest value of $q$ in $ [0,1]$ such that vector $\boldsymbol{\nu}^a(q)$ satisfies criteria~(1)}, and can be computed using the following algorithm \begin{algorithm} \caption{Algorithm to compute optimum of $P_3$ \label{algo:q_opt}} \begin{algorithmic}[1] \STATE Set $q_1 :=0$ and $q_2 :=1$ \WHILE{$|s(q_1) - s(q_2)| > \epsilon$} \STATE $q_{mp} := (q_1 + q_2)/2$ \STATE Set $q_{\gamma} = q_{mp}$ in Algorithm~\ref{algo:compute_nu} and obtain $\boldsymbol{\nu}^a(q_{mp})$ \IF{$\overline{d} \cdot q_{mp} \cdot \sum_{k \geq 1} \nu^a_k(q_{mp}) \cdot \mu_k(q_{mp}) > \overline{c}$} \STATE $q_2 := q_{mp}$ \ELSE \STATE $q_1 := q_{mp}$ \ENDIF \ENDWHILE \STATE Return $q^{opt} := (q_1+q_2)/2$ \end{algorithmic} \end{algorithm} Algorithm~\ref{algo:q_opt} does a line search to find the largest values of $q \in [0,1]$ such that the tuple $(\boldsymbol{\nu}^a(q),q)$ meets criteria (1)-(3). \section{Simulation and Numerical Evaluations} \label{sec:num_eval} We formulated and solved the optimization problems assuming an uncorrelated, locally tree-like and connected network. However, real world social networks may contain triads, loops, multiple connected components, and need not be uncorrelated. Despite such differences, we show that, in most cases, our analytical results closely match the simulations on real world social networks. We evaluate our analytical results on two very different networks: Gnutella \cite{snapnets} --- a p2p file sharing network, and Hamsterster \cite{konect} --- a social network for people with pet hamsters. Table~ \ref{table:networks} presents a few statistical measures of these networks. The degree distributions of these networks are displayed in Figures ~\ref{fig:degreedistribution1} and ~\ref{fig:degreedistribution2}. All simulations are averaged over $10000$ runs. To enhance legibility, error bars are suppressed in all the plots. \begin{figure}[t] \centering \includegraphics[scale=0.25,angle=-90]{gnu_deg_dist.pdf} \caption{Degree distribution of network A (Gnutella network); the thick black line denotes the best fit of the power law to the degree distribution. \label{fig:gnu_deg_dist}} \label{fig:degreedistribution1} \includegraphics[scale=0.25,angle=-90]{ham_deg_dist.pdf} \caption{Degree distribution of network B (Hamsterster network); the thick black line denotes the best fit of the power law to the degree distribution. \label{fig:ham_deg_dist}} \label{fig:degreedistribution2} \end{figure} \begin{table}[h] \caption{Simple Parameters of the two real-world networks used for simulations.} \centering \begin{tabular}{|c|c|c|} \hline & Network A & Network B\\ \hline Source & p2p-Gnutella08 \cite{snapnets} & Hamsterster \cite{konect} \\ \hline Network category & Peer-to-peer & Social \\ \hline Nodes & 6301 & 2426 \\ \hline Edges & 20777 & 16631 \\ \hline Maximum degree & 273 & 97\\ \hline Average degree & 6.59 & 13.71\\ \hline Number of triangles & 2383 & 53265 \\ \hline Clustering coefficient & 0.01 & 0.51 \\ \hline Connected components & 2 & 148 \\ \hline \end{tabular} \label{table:networks} \end{table} \begin{figure}[t] \centering \includegraphics[scale=0.28,angle=-90]{gnu_s_plot.pdf} \caption{Analytical and simulated values of $s(q)$ on network A (Gnutella network). \label{fig:gnu_s_plot}} \label{fig:SimGnutella} \includegraphics[scale=0.28,angle=-90]{ham_s_plot.pdf} \caption{Analytical and simulated values of $s(q)$ on network B (Hamsterster network). \label{fig:ham_s_plot}} \label{fig:SimHamsterster} \centering \includegraphics[scale=0.345,angle=-90]{gnu_opt1.pdf} \caption{Analytical and simulated values of average cost vs. $\gamma$ for network A (Gnutella network). \label{fig:gnu_gamma_plot}} \label{fig:sim1gnutella} \end{figure} We first evaluate the correctness of the analytical calculation of the campaign size, i.e., $s(q)$. The simulation plots were generated by considering a linear threshold model where nodes register if at least $50 \%$ of their neighbours are active. We assume that $30 \%$ of the nodes in the network were zealous. For a different values of $q$, we studied three schemes: $\boldsymbol{\phi}^{all}$ --- incentivizing all nodes equally with probability $q$, $\boldsymbol{\phi}^{high}$ --- incentivizing nodes starting from the highest degree till degree $k'$ such that $q=\frac{1}{\overline{d}} \sum_{k \geq k'} p(k) \phi^{high}(k)$, and $\boldsymbol{\phi}^{low}$ --- incentivizing nodes starting from the lowest degree till degree $k'$ such that $q=\frac{1}{\overline{d}} \sum_{1 \leq k \leq k'} p(k) \phi^{high}(k)$. The analytical results were obtained by extracting the degree distribution from the networks. The number of triangles in the p2p Gnutella network is very small, which is also reflected in the clustering coefficient. Therefore, the Gnutella network is very similar to a locally tree-like network. As consequence of this, for the Gnutella network, the simulation and analytical results are in excellent agreement with each other (see Fig.~\ref{fig:gnu_s_plot}). On the other hand, one can observe a deviation of the simulation results from the analytical on Hamsterster for large values of $q$ (see Fig.~\ref{fig:ham_s_plot}). This behaviour may in part be due to the presence of significant number of triangles and loops in the network. \begin{figure} \includegraphics[scale=0.35,angle=-90]{ham_opt1.pdf} \caption{Analytical and simulated values of average cost vs. $\gamma$ for network B (Hamsterster network). \label{fig:ham_gamma_plot}} \label{fig:sim1hamsterster} \centering \includegraphics[scale=0.35,angle=-90]{gnu_opt2} \caption{Analytical and simulated values of cascade size vs. $\overline{c}$ for network A (Gnutella network). \label{fig:gnu_c_plot}} \label{fig:sim2gnutella} \end{figure} \begin{figure}[t] \includegraphics[scale=0.35,angle=-90]{ham_opt2} \caption{Analytical and simulated values of cascade size vs. $\overline{c}$ for network B (Hamsterster network). \label{fig:ham_c_plot}} \label{fig:sim2hamsterster} \end{figure} Next, we consider a linear incentive structure, where an incentivized node obtains a unit reward per neighbour, i.e., $c_k = k, \ \forall \ k \geq 1$. For the cost minimization problem, for a given $\gamma$, using the degree distributions, we analytically compute the solution $\boldsymbol \phi$ and the average cost. We then simulate the linear threshold process (nodes register if at least $50 \%$ of their neighbours are active) on the respective real world networks using the analytical solution $\boldsymbol{\phi}$, and compare the average cost obtained from analysis and simulations (see Fig.~\ref{fig:sim1gnutella} and Fig.~\ref{fig:sim1hamsterster}). Similarly, for the campaign size maximization problem we analytically compute $\boldsymbol{\phi}$ and size $s$ for a given cost budget $\overline{c}$. The analytical solution is then used in the simulation of cascade maximization problem (see Fig.~\ref{fig:sim2gnutella} and Fig.~\ref{fig:sim2hamsterster}). As observed in Fig. ~\ref{fig:sim1gnutella} and ~\ref{fig:sim1hamsterster}, the analytical average cost is in excellent agreement with the simulated one for different values of $\alpha_1, \alpha_2$ and $\gamma$, on both the networks. Similarly Fig. ~\ref{fig:sim2gnutella} and ~\ref{fig:sim2hamsterster} show an excellent match between simulation and analytical computation of campaign size in almost all the plots. For large values of $\alpha_1$ and $\alpha_2$, the simulated campaign size in the Hamsterster network is larger than the analytically computed campaign size. This may in part be due to the large number of triangles in the network. This suggests that in social networks containing large number of triangles and loops, the analytically computed size represents a lower bound. \section{Conclusion} \label{sec:conclusion} In this paper, we have studied the problem of campaigning in social networks by offering incentives for referrals. We used ideas from percolation theory to compute the campaign size, which was then used to formulate two optimization problems. These problems were not amenable to traditional solutions since they involved a fixed point equation whose solution was analytically intractable. We used results from reliability theory to establish some key properties of the fixed point that enabled us to solve these problems with simple algorithms having linearithmic time complexity. Although we assumed an uncorrelated and locally tree-like network in the analysis, through extensive simulations on real world social networks, we showed that our analytical results are applicable in real world networks. \appendices \section{Some Results from Reliability Theory} \label{sec:tso} In this paper, we prove several propositions using the theory of \emph{stochastic order.}. Let $X$ and $Y$ be two random variables. Then, $X$ is said to be smaller than $Y$ in the \emph{usual stochastic order} (denoted by $X \leq_{st} Y $) \cite{moshe} if and only if $$ P[ X > x ] \leq P[ Y > x ] \quad \forall x \in (-\infty, \infty)$$ Next, we present two theorem from \cite{moshe} without proof, and a lemma. We will use these theorems and lemma in several of our proofs. \begin{thm} \label{thm:prop1_thm1} $X \leq_{st} Y$ if and only if $\mathbb{E}[\psi(X)] \leq \mathbb{E}[\psi(Y)]$ holds for all non-decreasing functions $\psi$ for which the expectation exists. \end{thm} \begin{IEEEproof} Refer Chapter~1 of \cite{moshe}. \end{IEEEproof} \begin{thm} \label{thm:prop1_thm2} The usual stochastic order is closed under convolutions, i.e., If $X \leq_{st} Y$ and $X^{'} \leq_{st} Y^{'}$, then $X^{'} + X \leq_{st} Y^{'} + Y$. \end{thm} \begin{IEEEproof} Refer Chapter~1 of \cite{moshe}. \end{IEEEproof} \begin{lem} \label{lemma:prop1_lemma1} \begin{enumerate}[(i)] \item Let $I(p_1)$ and $I(p_2)$ be two Bernoulli random variable with parameters $p_1$ and $p_2$, then $I(p_1) \leq_{st} I(p_2)$ if and only if $p_1 \leq p_2$. \item Let $Z(n, p_1)$ and $Z(n, p_2)$ be two binomial random variable with parameters $(n,p_1)$ and $(n,p_2)$, then for any $n \in \mathbb{N}$, $Z(n, p_1) \leq_{st} Z(n, p_2)$ if $p_1 \leq p_2$. \end{enumerate} \end{lem} \begin{IEEEproof} \textit{Part (i):} By comparing the complementary cumulative distribution function of the two random variable, and by applying the definition of \emph{usual stochastic order}. \textit{Part (ii):} A binomial random variable with parameter $(n,p)$ is the sum of $n$ i.i.d. Bernoulli random variable with parameter $p$. Now, the result follows from an application of Part~(i), and due to the fact that stochastic order is closed under convolution (Theorem~\ref{thm:prop1_thm2}). \end{IEEEproof} We also use some results from the theory of \emph{stochastic convexity} in our proofs. For the sake of completeness, we reproduce some definitions and theorems from \cite{moshe}. Let $\{X(\theta), \theta \in \Theta\}$ be a parametrized collection of random variables. We say \begin{enumerate}[(a)] \item $\{X(\theta), \theta \in \Theta\}$ is \emph{stochastically increasing (SI)} if $\mathbb{E}[\psi(X(\theta))]$ is non-decreasing in $\theta$ for all non-decreasing functions $\psi$. \item $\{X(\theta), \theta \in \Theta\}$ is \emph{stochastically increasing and convex (SICX)} if $\{X(\theta), \theta \in \Theta\} \in SI$ and $\mathbb{E}[\psi(X(\theta))]$ is non-decreasing and convex in $\theta$ for all non-decreasing convex functions $\psi$. \item $\{X(\theta), \theta \in \Theta\}$ is \emph{stochastically increasing and linear (SIL)} if $\{X(\theta), \theta \in \Theta\} \in SICX$ and $\mathbb{E}[\psi(X(\theta))]$ is non-decreasing and concave in $\theta$ for all non-decreasing concave functions $\psi$. \end{enumerate} \noindent Note that, by definition, we have $\{X(\theta), \theta \in \Theta\} \in SIL \Rightarrow \{X(\theta), \theta \in \Theta\} \in SICX$. \begin{lem} \label{lemma:binomial_sicx} Let $X(n,p)$ be a binomial random variable with parameters $(n,p)$. Then, $\{X(n,p), p \in (0,1) \} \in SICX$. \end{lem} \begin{IEEEproof} By combining example Example~8.B.3 and Theorem~8.B.9 of \cite{moshe}, it can shown that $\{X(n,p), p \in (0,1)\} \in SIL$. Then, due to the fact that $SIL \Rightarrow SICX$, the lemma follows. \end{IEEEproof} \begin{thm} \label{thm:closure_sicx} Suppose $\{X(\theta), \theta \in \Theta\}$ and $\{Y(\theta), \theta \in \Theta\}$ are two collection of random variables such that $X(\theta)$ and $Y(\theta)$ are independent for each $\theta$. If $\{X(\theta), \theta \in \Theta\} \in SICX$ and $\{Y(\theta), \theta \in \Theta\} \in SICX$, then $\{X(\theta)+Y(\theta), \theta \in \Theta\} \in SICX$. \end{thm} \begin{IEEEproof} Refer the proof of Theorem~8.A.15 in \cite{moshe}. \end{IEEEproof} \begin{thm} \label{thm:sicx_and_ccdf} Suppose that for each $\theta \in \Theta$, the support of $X(\theta)$ is in $\mathbb{N}$. Then, $\{X(\theta), \theta \in \Theta\} \in SICX$ \emph{if and only if} $\{X(\theta), \theta \in \Theta\} \in SI$ and $P[X(\mathbf{\theta}) > m]$ is non-decreasing and convex in $\theta$ for all $m \in \mathbb{N}$. \end{thm} \begin{IEEEproof} Refer the proof of Theorem~8.A.10 in \cite{moshe}. \end{IEEEproof} \section{Existence and Uniqueness of the Fixed Point} \label{sec:fixed_point_proof} In this section, we show that for any $q \in [0,1]$, the fixed point Equation~\ref{eq:u1_fixed_point} has a unique solution. The proof in this section is split into two parts. In the first part, we show that function $f(q,u)$ is monotonically increasing and convex in $u$. In the section part, we use the result of the first part to establish the existence and uniqueness of the fixed point. \subsection{Proof of Proposition~\ref{prop:f_nature}} \label{sec:prop_f_nature} The differentiability of $f(q,u)$ follows from its definition. In this section, we show that $f(q,u)$ is monotonically increasing and convex in $u \in (0,1)$. To show this, we use the theory of stochastic convexity. Let $\{X(k_2, \alpha_2 u), u \in (0,1) \}$ and $\{Y(k-k_2,\alpha_1u), u \in (0,1) \}$ be two collection of independent binomial random variables with parameters $(k_2,\alpha_2u)$ and $(k-k_2,\alpha_1u)$, respectively. Then, from Lemma~\ref{lemma:binomial_sicx}, we have $\{X(k_2, \alpha_2 u), u \in (0,1) \} \in SICX$ and $\{Y(k-k_2,\alpha_1u), u \in (0,1) \} \in SICX$. Since the random variables are independent, an application of Theorem~\ref{thm:closure_sicx} gives us $\{X(k_2, \alpha_2 u) + Y(k-k_2,\alpha_1u), u \in (0,1) \} \in SICX$. Now, by applying Theorem~\ref{thm:sicx_and_ccdf} we can conclude that \begin{enumerate}[(1)] \item $\{X(k_2, \alpha_2 u) + Y(k-k_2,\alpha_1u), u \in (0,1) \} \in SI$. \item $P[X(k_2, \alpha_2 u) + Y(k-k_2,\alpha_1u) > m]$ is a \emph{non-decreasing convex} function of $u \in (0,1)$ for all $m \in \mathbb{N}$. \end{enumerate} Let $h(u,k,k_2,m) = P[X(k_2, \alpha_2 u) + Y(k-k_2,\alpha_1u) > m]$. We note that function $h(u,k,k_2,m)$ is non-decreasing and convex in $u$. Since the network is connected and the fraction of zealous nodes lies in the open interval $(0,1)$, there exists positive integers $k_0,m_0$ such that $m_{0} \in (0, k_0]$ and $p_{ex}(k_0) p_{th}(m_0 | k_0+1) > 0$. Therefore, we have \begin{align*} & \frac{\partial f(q, u)}{\partial u} = \sum_{k \geq 1} p_{ex}(k) \sum_{m \geq 1} p_{th}(m|k+1) \cdot \sum^{k}_{k_2=0} \hat{p}(k_2|k) \cdot \\ & \hspace{10mm} \frac{\partial h(u,k,k_2,m)}{\partial u} \cdot (1 - \mathbb{I}_{\{k=k_0,m=m_0,k_2=k\}}) \\ & \hspace{5mm} + p_{ex}(k_0) p_{th}(m_0|k_0+1) \frac{\partial P[X(k_0, u\alpha_2) \geq m_0]}{\partial u} \overset{(a)}{>} 0 \end{align*} where Inequality~(a) follows because $h(u,k,k_2,m)$ and $P[X(k_0, u\alpha_2) \geq m_0], m_0 \in (0, k_0]$ are non-decreasing and monotonically increasing functions of $u$, respectively. Similarly, we have \begin{align*} &\frac{ \partial^2 f(q, u)}{\partial u^2} = \sum_{k \geq 1} p_{ex}(k) \sum_{m \geq 0} p_{th}(m|k+1) \sum^{k}_{k_2=0} \hat{p}(k_2|k) \cdot \\ &\hspace{30mm} \frac{\partial^2 h(u,k,k_2,m)}{\partial u^2} \overset{(b)}{\geq} 0 \end{align*} where Inequality~(a) follows because $h(u,k,k_2,m)$ is convex in $u$. \hfill \IEEEQED \subsection{Proof of Proposition~\ref{prop:fixed_point}} \label{sec:fixed_point} We recollect that $u$ denotes the probability of finding a registered node by following an arbitrary link of the network. Nodes with zero threshold do not need any recommendations, and are registered from the start of the campaign. Thus, if every node has threshold value zero, then the entire network is registered and we have $u=1$. On the other hand, nodes with non-zero threshold have to be recommended by active nodes to register. Therefore, if all nodes in the network have non-zero threshold, then there are no node from which the campaign can start. Hence, in such scenarios, we have $u=0$. Now, let us consider the case when the fraction of zealous nodes lies in the interval $(0,1)$. Let us define $f^0(u) = f(q,u) - u$. It is easy to see that $u_0$ is a fixed point of Equation~\ref{eq:u1_fixed_point} \emph{if and only if} $f^{0}(u_0)=0$. By differentiating $f^0(u)$ with respect to $u$ twice, we get $\frac{\partial^2 f^0(u)}{\partial u^2} = \frac{\partial^2 f(q,u)}{\partial u^2} \geq 0$, i.e., $f^0$ is a convex function of $u$. We also have \begin{align*} f^0(0) &= f(q,0) = \sum \nolimits_{k \geq 0} p_{ex}(k) \cdot p_{th}(0|k+1) \overset{(a)}{>} 0 \\ f^0(1) &= f(q,1) - 1 \overset{(b)}{<} 0 \end{align*} where Inequality~(a) follows because the network is connected and the fraction of zealous nodes lies in the open interval $(0,1)$, and Inequality~(b) follows because the $f(q,1)$ is a convex combination of non-negative terms less or equal to $1$ (some terms are strictly less that $1$). Since $f^0(0) > 0$ and $f^0(1) < 0$, due to the continuity of function $f^{0}$, there exist a point $u_0 \in (0,1)$ such that $f^{0}(u_0)=0$ i.e., $f(q,u_0) = u_0$. We prove the uniqueness of the fixed point by contradiction. Now, if $u_0, u_1 \in (0,1)$ are two fixed points of Equation~\eqref{eq:u1_fixed_point}, then we should have $f^{0}(u_0) = f^{0}(u_1) = 0$. Without loss of generality, let us assume that $0 < u_0 < u_1 < 1$. Now, choose positive real numbers $u_2 \in (u_1,1)$ and $\lambda \in (0,1)$ such that $f^0(u_2)<0$ and $u_1 = \lambda u_0 + (1-\lambda)u_2$. Then, we have \begin{align*} &f^0(\lambda u_0 + (1-\lambda)u_2) = f^0(u_1) = 0 \quad \textrm{and}\\ &\lambda f^0(u_0) + (1-\lambda) f^0(u_2) = (1-\lambda) f^0(u_2) < 0 \\ & \Longrightarrow f^0(\lambda u_0 + (1-\lambda)u_2) \overset{(c)}{>} \lambda f^0(u_0) + (1-\lambda) f^0(u_2) \end{align*} Inequality~(c) contradicts the convex nature of function $f^{0}$. Thus, in turn, establishes the uniqueness of the fixed point. \hfill \IEEEQED \section{Increasing Nature of the Fixed Point} \label{sec:du_by_dq} First we introduce some notation and present some preliminary observations. We will use these observations in the proof of Proposition~\ref{prop:fp_increasing}. Let $$h_{m,k}(q) = \sum^{k}_{k_2=0} {k \choose k_2} q^{k_2} (1-q)^{k - k_2} P[X_{k_2} + Y_{k-k_2} \geq m ]$$ where random variables $X_{k_2}$ and $Y_{k-k_2}$ are independent and have a binomial distribution with parameters $(k_2,\alpha_2 u)$ and $(k-k_2,\alpha_1 u)$, respectively. The first step in the proof of Proposition~\ref{prop:fp_increasing} is to show that for any $m \in \mathbb{Z}^{+}$, $P[X_{k_2} + Y_{k-k_2} \geq m ]$ is a non-decreasing function of $k_2 \in [0,k]$. Let $$\varphi_{m,k}(k_2) = P[X_{k_2} + Y_{k-k_2} \geq m] \quad \forall k_2 \in [0,k]$$ We note that if $u \in (0,1]$ then $\varphi_{m,k}(k_2) = 0$ only if $m > k$, i.e., if the number of active neighbours is greater than the node degree. \begin{lem} \label{lemma:prop1_lemma2} For any $m,k \in \mathbb{Z}^{+}$, $\varphi_{m,k}(k_2)$ is non-decreasing function of $k_2 \in [0, k]$. \end{lem} \begin{IEEEproof} Consider two integers $k_2,k^{'}_2 \in [0,k]$. Without loss of generality, let $k^{'}_2 > k_2$ and define the following random variables $$W_{k_2} = X_{k_2} + Y_{k-k_2} \quad \textrm{and} \quad W_{k^{'}_2} = X_{k^{'}_2} + Y_{k-k^{'}_2}$$ Then, we have \begin{align*} W_{k_2} &=_{st} X_{k_2} + Y_{k-k_2} \\ &=_{st} \sum \nolimits^{k_2}_{i=1} I_i(\alpha_2 u) + \sum \nolimits^{k-k_2}_{i=1} I_i(\alpha_1 u) \end{align*} where $I_i(p)$ are \emph{independent Bernoulli random variable} with parameter $p$ and $=_{st}$ implies equality in distribution \cite{moshe}. Therefore, for any $k^{'}_2 > k_2$ and $k_2,k^{'}_2 \in [0,k]$, we have \begin{align*} & W_{k_2} =_{st} \sum\nolimits^{k_2}_{i=1} I_i(\alpha_2 u) + \sum\nolimits^{(k-k^{'}_2) + (k^{'}_2-k_2)}_{i=1} I_i(\alpha_1 u) \\ &=_{st} \sum\nolimits^{k_2}_{i=1} I_i(\alpha_2 u) + \sum\nolimits^{k-k^{'}_2}_{i=1} I_i(\alpha_1 u) + \sum\nolimits^{k^{'}_2-k_2}_{i=1} I_i(\alpha_1 u) \\ &\overset{(a)}{\leq}_{st} \sum\nolimits^{k_2}_{i=1} I_i(\alpha_2 u) + \sum\nolimits^{k-k^{'}_2}_{i=1} I_i(\alpha_1 u) + \sum\nolimits^{k^{'}_2-k_2}_{i=1} I_i(\alpha_2 u) \\ & =_{st} \sum\nolimits^{k^{'}_2}_{i=1} I_i(\alpha_2 u) + \sum\nolimits^{k-k^{'}_2}_{i=1} I_i(\alpha_1 u) =_{st} W_{k^{'}_2} \end{align*} where Inequality $(a)$ follows because $\alpha_1 < \alpha_2 \Rightarrow \alpha_1 u \leq \alpha_2 u$, and due to Lemma~\ref{lemma:prop1_lemma1}. Hence, we have established that for $k_2,k^{'}_2 \in [0,k]$ and $k^{'}_2 > k_2$, we have $W_{k_2}\leq_{st} W_{k^{'}_2}$. Thus, $\forall m \in \mathbb{Z}^{+}$ and $k^{'}_2 > k_2$, we have \begin{align*} \varphi_{m,k}(k_2) = P[X_{k_2} + Y_{k-k_2} \geq m] &= P[W_{k_2} \geq m] \\ & \hspace{-45mm} \overset{(b)}{\leq} P[W_{k^{'}_2} \geq m] = P[X_{k^{'}_2} + Y_{k-k^{'}_2} \geq m] = \varphi_{m,k}(k^{'}_2) \end{align*} where Inequality (b) follows because $W_{k_2}\leq_{st} W_{k^{'}_2}$. Thus, we have shown that $\varphi_{m,k}(k_2)$ is a non-decreasing function of $k_2 \in [0, k]$. \end{IEEEproof} Now, let us define $$\psi_{m,k}(k_2) = \frac{k \cdot \varphi_{m,k}(k_2)}{(k-k_2)} \quad \forall k_2 \in [0,k-1]$$ Due to Lemma~\ref{lemma:prop1_lemma2}, we can conclude that for any $m,k \in \mathbb{Z}^{+}$, $\psi_{m,k}(k_2)$ is also a \emph{non-decreasing function} of $k_2 \in [0, k-1]$. Next, establish that the function $f(q,u)$ is monotonically increasing in $q$. \begin{prop} \label{prop:increasing} If $\alpha_2 > \alpha_1$, then $\frac{\partial f(q,u)}{\partial q} > 0$. \end{prop} \begin{IEEEproof} \begin{align*} & h_{m,k}(q) = \sum^{k}_{k_2=0} {k \choose k_2} q^{k_2} (1-q)^{k - k_2} P[X_{k_2} + Y_{k-k_2} \geq m ] \\ &= \sum\nolimits^{k-1}_{k_2=0} {k \choose k_2} q^{k_2} (1-q)^{k - k_2} P[X_{k_2} + Y_{k-k_2} \geq m ] \\ & \hspace{40mm} + q^m \cdot P[X_{k} \geq m ] \\ &= (1-q) \sum\nolimits^{k-1}_{k_2=0} {k-1 \choose k_2} q^{k_2} (1-q)^{k - k_2} \cdot \psi_{m,k}(k_2) \\ & \hspace{40mm} + q^m \cdot P[X_{k} \geq m ] \\ &= (1-q) \cdot \mathbb{E}[\psi_{m,k}(Z(k-1,q))] + q^m \cdot P[X_{k} \geq m ] \end{align*} where $Z(k-1,q)$ is a binomial random variable with parameters $(k-1,q)$. Now, consider two real numbers $q_1,q_2 \in [0,1]$ such that $q_1 < q_2$. Then, we have \begin{align} & h_{m,k}(q_1) = (1-q_1) \mathbb{E}[\psi_{m,k}(Z(k-1,q_1))] \nonumber \\ & \hspace{50mm} + (q_1)^m P[X_{k} \geq m ] \nonumber \\ & \overset{(a)}{\leq} (1-q_1) \mathbb{E}[\psi_{m,k}(Z(k-1,q_1))] + (q_2)^m P[X_{k} \geq m ] \nonumber \\ & \overset{(b)}{\leq} (1-q_1) \mathbb{E}[\psi_{m,k}(Z(k-1,q_2))] + (q_2)^m P[X_{k} \geq m ] \nonumber \\ & \overset{}{=} (1-q_2) \mathbb{E}[\psi_{m,k}(Z(k-1,q_2))] + (q_2)^m P[X_{k} \geq m ] \nonumber \\ & \hspace{20mm} + (q_2-q_1) \mathbb{E}[\psi_{m,k}(Z(k-1,q_2))] \nonumber \\ & \overset{}{=} h_{m,k}(q_2) + (q_2-q_1) \mathbb{E}[\psi_{m,k}(Z(k-1,q_2))] \label{eq:h_m_one} \end{align} where \begin{enumerate}[(a)] \item follows because $q_1 < q_2$. \item since $q_1 < q_2$, we have $Z(k-1,q_1) \leq_{st} Z(k-1,q_2)$ (Lemma~\ref{lemma:prop1_lemma1}). Therefore, due to the non-decreasing nature of function $\psi_{m,k}$, we have $\mathbb{E}[\psi_{m,k}(Z(k-1,q_1))] \leq \mathbb{E}[\psi_{m,k}(Z(k-1,q_2))]$ (Theorem~\ref{thm:prop1_thm1}). \end{enumerate} Also, from the definition, we also have \begin{align} h_{m,k}(q_1) & = \mathbb{E}[\varphi_{m,k}(Z(k,q_1))] \nonumber \\ &\overset{(c)}{\leq} \mathbb{E}[\varphi_{m,k}(Z(k,q_2))] = h_{m,k}(q_2) \label{eq:h_m_two} \end{align} where Inequality $(c)$ follows because of Lemma~\ref{lemma:prop1_lemma1}, Lemma~\ref{lemma:prop1_lemma2} and Theorem~\ref{thm:prop1_thm1}. From Equations~\eqref{eq:h_m_one} and \eqref{eq:h_m_two}, we can see that for any $q_1,q_2 \in [0,1]$ such that $q_1 < q_2$, we have $h_{m,k}(q_1)= h_{m,k}(q_2)$ \emph{if and only if} $\mathbb{E}[\psi_{m,k}(Z(k-1,q_2))]=0$. From the definition of function $\psi_{m,k}$, we can see that $\mathbb{E}[\psi_{m,k}(Z(k-1,q_2))] = 0$ \emph{if and only if} $m > k$. Thus, if $m \in [0,k]$, then we can conclude that $h_{m,k}(q_1) < h_{m,k}(q_2)$. Since the network is connected and the fraction of zealous nodes lies in the open interval $(0,1)$, there exists positive integers $k_0,m_0$ such that $m_{0} \in (0, k_0]$ and $p_{ex}(k_0) p_{th}(m_0 | k_0+1) > 0$. Therefore, for $q_1,q_2 \in [0,1]$ such that $q_1 < q_2$, we have $h_{m_0,k_0}(q_1) < h_{m_0,k_0}(q_2) $. Let $z_0 = \sum\nolimits_{k \geq 1} p_{ex}(k) p_{th}(0|k+1) $ --- fraction of zealous nodes. Thus, we have \begin{align*} &f(q_1,u) = z_0 + \sum_{k \geq 1} \sum_{m \geq 1} p_{ex}(k) p_{th}(m|k+1) h_{m,k}(q_1) \\ & = \sum_{k \geq 1} \sum_{m \geq 1} p_{ex}(k) p_{th}(m|k+1) h_{m,k}(q_1) (1-\mathbb{I}_{\left\{\underset{k=k_0}{m=m_0}\right\}}) \\ & \hspace{20mm} + p_{ex}(k_0) p_{th}(m_0|k_0+1) \cdot h_{m_0,k_0}(q_1) + z_0\\ & < \sum_{k \geq 1} \sum_{m \geq 1} p_{ex}(k) p_{th}(m|k+1) h_{m,k}(q_1) (1-\mathbb{I}_{\left\{\underset{k=k_0}{m=m_0}\right\}}) \\ & \hspace{20mm} + p_{ex}(k_0) p_{th}(m_0|k_0+1) \cdot h_{m_0,k_0}(q_2) + z_0 \\ & \leq \sum_{k \geq 1} \sum_{m \geq 1} p_{ex}(k) p_{th}(m|k+1) h_{m,k}(q_2) (1-\mathbb{I}_{\left\{\underset{k=k_0}{m=m_0}\right\}}) \\ & \hspace{20mm} + p_{ex}(k_0) p_{th}(m_0|k_0+1) \cdot h_{m_0,k_0}(q_2) + z_0\\ & = f(q_2,u) \end{align*} i.e., for $q_1,q_2 \in [0,1]$ such that $q_1 < q_2$, we have $f(q_1,u) < f(q_2,u)$. \end{IEEEproof} \subsection{Proof of Proposition ~\ref{prop:fp_increasing}} The continuity of the fixed point follows from the fact that function $f(\cdot,u)$ is a continuous map for all $u \in [0,1]$. To prove the increasing nature of the fixed point, we use the \emph{implicit function theorem}. Let $f^{0}(q,u) = f(q,u) - u$. According to the implicit function theorem, when $f^0(q,u)=0$, we have $$ \frac{du}{d q} = - \frac{\frac{\partial f^0(q,u)}{\partial q}}{\frac{\partial f^0(q,u)}{\partial u}} = \frac{\frac{\partial f(q,u)}{\partial q}}{ \left(1 - \frac{\partial f(q,u)}{\partial u} \right)} $$ From Proposition~\ref{prop:fixed_point}, we know that for every $q \in [0,1]$, there is a unique fixed point $u_q \in (0,1)$ that satisfies $f(q,u_q) = u_q$ i.e., $f^0(q,u_q)=0$. Therefore, we have $$ \frac{du_q}{d q} = \frac{\frac{\partial f(q,u_q)}{\partial q}}{ \left(1 - \frac{\partial f(q,u)}{\partial u} \Big|_{u = u_q} \right)} $$ From Proposition~\ref{prop:increasing}, we know that $\frac{\partial f(q,u)}{\partial q} > 0 , \forall u \in (0,1)$. Since $u_q \in (0,1)$, we have $\frac{\partial f(q,u_q)}{\partial q} > 0$. Now, to prove Proposition ~\ref{prop:fp_increasing}, we just need to show that $\frac{\partial f(q,u)}{\partial u} \Big|_{u = u_q} < 1$. We show this by contradiction. We note that $f(q,1) \overset{(a)}{<} 1$, where Inequality~(a) follows because the $f(q,1)$ is a convex combination of non-negative terms less than or equal to $1$ (some terms are strictly less that $1$). Since the function $f(q,u)$ is continuous and non-decreasing in $u$ (see Proposition~\ref{prop:f_nature}), there exists a point $u^{'}_q \in (u_q,1)$ such that $f(q,u^{'}_q) < u^{'}_q$. We note that the function $f(q,u)$ is convex in $u \in (0,1)$ (see Proposition~\ref{prop:f_nature}). Now, let us assume that $\frac{\partial f(q,u)}{\partial u} \Big|_{u = u_q} \geq 1$. Then, from the definition of convex functions, we have \begin{align*} f(q,u^{'}_q) &\geq f(q,u_q) + (u^{'}_q - u_q) \cdot \frac{\partial f(q,u)}{\partial u} \Big|_{u = u_q} \\ &\overset{}{\geq} f(q,u_q) + (u^{'}_q - u_q) \\ &\overset{(b)}{=} u_q + (u^{'}_q - u_q) = u^{'}_q \\ & \hspace{-20mm} \Rightarrow f(q,u^{'}_q) \overset{(c)}{\geq} u^{'}_q \end{align*} where Inequality~(b) follows because we have $f(q,u_q) = u_q$. Inequality~(c) contradicts the fact that $f(q,u^{'}_q) < u^{'}_q$. Since this contradiction was due to the assumption that $\frac{\partial f(q,u)}{\partial u} \Big|_{u = u_q} \geq 1$, we should have $\frac{\partial f(q,u)}{\partial u} \Big|_{u = u_q} < 1$. This, in turn, establishes that $\frac{du_q}{d q} > 0$. \hfill \IEEEQED \section{Equivalence to the Linear Program} \label{sec:eq_to_lp} In this section, we prove the equivalence between problems $P_1$ and $P_2$ presented in Section~\ref{sec:cm} \subsection{Proof of Proposition~\ref{prop:eq_to_lp_stage_one}} \label{sec:eq_to_lp_stage_one} Let the value of the objective of problem $P_1$ for incentive-policy $\boldsymbol{\phi}$ be denoted as $c(\boldsymbol{\phi})$. Let $\boldsymbol{\phi}^{o} = \{\phi^{o}_k , k \geq 1\}$ be an optimal solution of problem $P_1$. If we have $\sum_{k\geq 1} k \cdot p(k) \cdot \phi^{o}(k) = \overline{d} \cdot q_{\gamma}$, then we can choose $\boldsymbol{\phi}^{opt} = \boldsymbol{\phi}^{o}$. So, let us assume that $\frac{1}{\overline{d}} \sum_{k\geq 1} k \cdot p(k) \cdot \phi^{o}(k) = q^o > q_{\gamma}$. Our goal to obtain a policy $\boldsymbol{\phi}^{opt}$ from $\boldsymbol{\phi}^{o}$ without increasing the cost. Let $\boldsymbol{\phi}^{opt} = \frac{q_{\gamma}}{q^o} \boldsymbol{\phi}^{o} $. Then, we have \begin{align} &\frac{1}{\overline{d}} \sum_{k\geq 1} k p(k) \cdot \phi^{opt}(k) = \frac{q_{\gamma}}{q^o \overline{d}} \sum_{k\geq 1} k \cdot p(k) \cdot \phi^{o}(k) = q_{\gamma} \label{eq:one} \\ & \hspace{20mm} \textrm{and} \quad \boldsymbol{0} \leq \boldsymbol{\phi}^{opt} \leq \boldsymbol{\phi}^{o} \leq \boldsymbol{1} \label{eq:two} \end{align} From Equality~\eqref{eq:one} and Inequality~\eqref{eq:two} we can see that $\boldsymbol{\phi}^{opt}$ is a feasible solution of problem $P_1$. Further, we also have \begin{align} c(\boldsymbol{\phi}^{o}) &= \sum \nolimits_{k \geq 1} c_k \cdot p(k) \cdot \phi^o(k) \cdot s_k(q^o) \nonumber \\ & \overset{(a)}{\geq} \sum \nolimits_{k \geq 1} c_k \cdot p(k) \cdot \phi^{opt}(k) \cdot s_k(q^o) \nonumber \\ & \overset{(b)}{\geq} \sum \nolimits_{k \geq 1} c_k \cdot p(k) \cdot \phi^{opt}(k) \cdot s_k(q_{\gamma}) \nonumber \\ & = c(\boldsymbol{\phi}^{opt}) \overset{(c)}{\geq} c(\boldsymbol{\phi}^{o}) \Rightarrow c(\boldsymbol{\phi}^{o}) = c(\boldsymbol{\phi}^{opt}) \nonumber \end{align} where Inequality~(a) follows because $\boldsymbol{\phi}^{opt} \leq \boldsymbol{\phi}^{o}$, Inequality~(b) follows because $q^0 > q_{\gamma}$ and $s_k(q)$ is non-decreasing in $q$ (Proposition~\ref{prop:sk_increasing}), and Inequality~(c) follows because $\boldsymbol{\phi}^{o}$ is an optimal solution of problem $P_1$. Since the cost for policies $\boldsymbol{\phi}^{o}$ and $\boldsymbol{\phi}^{opt}$ are equal, and $\boldsymbol{\phi}^{o}$ is an optimal policy, we can conclude that policy $\boldsymbol{\phi}^{opt}$ is also an optimal solution of problem $P_1$. \hfill \IEEEQED \subsection{Proof of Proposition~\ref{prop:eq_to_lp_stage_two}} \label{sec:eq_to_lp_stage_two} Let $\boldsymbol{\nu}^{opt} = \{\nu^{opt }_k , k \geq 1\}$ be an optimal solution of problem $P_2$. Let us define $$\phi^{f}(k) = \begin{cases} 0 & \textrm{if } p(k) = 0 \\ \frac{\nu^{opt}_k \cdot \overline{d} \cdot q_{\gamma}}{k \cdot p(k)} & \textrm{otherwise} \end{cases} $$ Then, we have \begin{align} \frac{1}{\overline{d}} \sum \nolimits_{k \geq 1} k \cdot p(k) \cdot \phi^{f}(k) = q_{\gamma} \sum\nolimits_{k \geq 1} \nu^{opt}_k \overset{(a)}{=} q_{\gamma} \label{eq:feasible_phi_1} \\ \phi^{f}(k) = \begin{cases} 0 < 1 & \textrm{if } p(k) = 0 \\ \frac{\nu^{opt}_k \cdot \overline{d} \cdot q_{\gamma}}{k \cdot p(k)} \overset{(b)}{\leq} 1 & \textrm{otherwise} \end{cases} \label{eq:feasible_phi_2} \end{align} where Equality~(a) and Inequality~(b) follows because $\{\nu^{opt}_k , k \geq 1\}$ is a feasible solution of problem $P_2$. From Equality~\eqref{eq:feasible_phi_1} and Inequality~\eqref{eq:feasible_phi_2}, we can conclude that $\boldsymbol{\phi}^f$ is a feasible solution of problem $P_1$. Now, let $\boldsymbol{\phi}^{opt} = \{\phi^{opt}_k , k \geq 1\}$ be an optimal solution of problem $P_1$ such that $\sum_{k\geq 1} k \cdot p(k) \cdot \phi^{opt}(k) = \overline{d} \cdot q_{\gamma}$. The existence of such an optimal policy is guaranteed by Proposition~\ref{prop:eq_to_lp_stage_one}. Let us define $$\nu^{f}(k) = \frac{k \cdot p(k) \cdot \phi^{opt}_k }{\overline{d} \cdot q_{\gamma}} $$ Then, we have $\sum_{k \geq 1} \nu^{f}(k) = \sum_{k \geq 1} \frac{k \cdot p(k) \cdot \phi^{opt}_k }{\overline{d} \cdot q_{\gamma}} = 1$ and $0 \leq \nu_k = \frac{k \cdot p(k) \cdot \phi^{opt}_k }{\overline{d} \cdot q_{\gamma}} \leq \frac{k \cdot p(k)}{\overline{d} \cdot q_{\gamma}}$. Hence, $\boldsymbol{\nu}^f$ is a feasible solution of problem $P_2$. Further, we also have \begin{align*} & \sum \nolimits_{k \geq 1} c_k p(k) \phi^{opt}(k) s_k(q_{\gamma}) \leq \sum \nolimits_{k \geq 1} c_k p(k) \phi^{f}(k) s_k(q_{\gamma})\\ & = \overline{d} \cdot q_{\gamma} \sum \nolimits_{k \geq 1} \nu^{opt}_k \cdot \mu_k(q_{\gamma}) \leq \overline{d} \cdot q_{\gamma} \sum \nolimits_{k \geq 1} \nu^{f}_k \cdot \mu_k(q_{\gamma}) \\ & = \sum_{k \geq 1} c_k p(k) \phi^{opt}(k) s_k(q_{\gamma}) \\ & \Rightarrow \sum_{k \geq 1} c_k p(k) \phi^{opt}(k) s_k(q_{\gamma}) = \sum_{k \geq 1} c_k p(k) \phi^{f}(k) s_k(q_{\gamma}) \\ & \Rightarrow \boldsymbol{\phi}^f \textrm{ is an optimal solution of problem $P_1$.} \end{align*} \hfill \IEEEQED \section{Optimality of Algorithm~\ref{algo:compute_nu}} \label{sec:opt_nu_a} In this section, we prove that the vector $\boldsymbol{\nu}^a$ returned by Algorithm~\ref{algo:compute_nu} is an optimal point of problem $P_2$. However, as a first step, we prove the following lemma. Let $\mathcal{S} = \{1, 2, \cdots, k_{max}\}$ and $k_{max}$ is the maximum degree in the network. \begin{lem} \label{lem:opt_stage_one} Let $\boldsymbol{\nu}$, a $1 \times k_{max}$ vector, be a feasible solution of problem $P_2$. Then, we have $$\sum \nolimits^{j_0}_{j = 1} \nu^a_{\sigma(j)} \geq \sum \nolimits^{j_0}_{j = 1} \nu_{\sigma(j)} \quad \forall j_0 \in \mathcal{S}$$ \end{lem} \begin{IEEEproof} We prove this lemma by induction. For $j_0=1$, we have \begin{align} \nu^a_{\sigma(1)} = \min \left\{ 1, \frac{\sigma(1) \cdot p(\sigma(1))}{\overline{d} \cdot q_{\gamma}} \right\} \overset{(a)}{\geq} \nu_{\sigma(1)} \end{align} where Inequality~(a) follows because $\boldsymbol{\nu}$ is a feasible solution of problem $P_2$. Now, let us assume that $\sum^{j_1}_{j = 1} \nu^a_{\sigma(j)} \geq \sum^{j_1}_{j = 1} \nu_{\sigma(j)}$ for some $j_1 \in \mathcal{S}$. We need to show that $\sum^{j_1+1}_{j = 1} \nu^a_{\sigma(j)} \geq \sum^{j_1+1}_{j = 1} \nu_{\sigma(j)}$. If we have $\nu^a_{\sigma(j_1+1)}\geq \nu_{\sigma(j_1+1)}$, then the result is trivial. Let us therefore consider the case where $\nu^a_{\sigma(j_1+1)} < \nu_{\sigma(j_1+1)}$. This implies that \begin{align*} &\nu^a_{\sigma(j_1+1)} < \nu_{\sigma(j_1+1)} \leq \frac{\sigma(j_1+1) \cdot p(\sigma(j_1+1))}{\overline{d} \cdot q_{\gamma}} \\ &\Rightarrow \nu^a_{\sigma(j_1+1)} \overset{(b)}{=} 1 - \sum \nolimits^{j_1}_{j=1} \nu^a_{\sigma(j)} \end{align*} where Equality~(b) follows because of steps~4 and 5 of Algorithm~\ref{algo:compute_nu}. Therefore, if $\nu^a_{\sigma(j_1+1)} < \nu_{\sigma(j_1+1)}$, then we have \begin{align*} \sum \nolimits^{j_1+1}_{j=1} \nu^a_{\sigma(j)} = 1 = \sum \nolimits_{j \in \mathcal{S}} \nu_{\sigma(j)} \geq \sum \nolimits^{j_1+1}_{j = 1} \nu_{\sigma(j)} \end{align*} \end{IEEEproof} \subsection{Proof of Proposition~\ref{prop:opt_stage_two}} Let $\boldsymbol{\nu}$ be a feasible solution of problem $P_2$. Since $\boldsymbol{\nu}^a$ and $\boldsymbol{\nu}$ are feasible solutions of problem $P_2$, we have $\sum_{j \geq 1} \nu^a({\sigma(j)}) = \sum_{j \geq 1} \nu({\sigma(j)}) = 1$. Let $X^a$ and $X$ two independent random variable taking values from the set $\mathcal{S}$ such that $P[X^a = j] = \nu^a_{\sigma(j)} \quad \textrm{and} \quad P[X = j] = \nu_{\sigma(j)}$. Then, from Lemma~\ref{lem:opt_stage_one}, we have \begin{align} & P[X^a \leq j_0] = \sum_{j=1}^{j_0} \nu^a_{\sigma(j)} \geq \sum_{j=1}^{j_0} \nu_{\sigma(j)} = P[X \leq j_0] \label{eq:final} \end{align} From Equation~\ref{eq:final} and the definition of usual stochastic orders we can see that $X^a \leq_{st} X$. Therefore, we have \begin{align} & \sum \nolimits_{k \geq 1} \nu^a_k \cdot \mu_{k}(q_{\gamma}) = \sum \nolimits_{j \in \mathcal{S}} \nu^a_{\sigma(j)} \cdot \mu_{\sigma(j)}(q_{\gamma}) \nonumber \\ &= \sum \nolimits_{j \in \mathcal{S}} P[X^a = j] \cdot \mu_{\sigma(j)}(q_{\gamma}) = \mathbb{E}[\mu_{\sigma{(X^a)}}(q_{\gamma})] \nonumber \\ & \overset{(a)}{\leq} \mathbb{E}[\mu_{\sigma{(X)}}(q_{\gamma})] = \sum \nolimits_{j \in \mathcal{S}} P[X = j] \cdot \mu_{\sigma(j)}(q_{\gamma}) \nonumber \\ &= \sum \nolimits_{j \in \mathcal{S}} \nu_{\sigma(j)} \cdot \mu_{\sigma(j)}(q_{\gamma}) = \sum \nolimits_{k \geq 1} \nu_k \cdot \mu_{k}(q_{\gamma}) \label{eq:va} \end{align} where Inequality~(a) follows from an application of Theorem~\ref{thm:prop1_thm1} ($X^a \leq_{st} X$ and $\mu_{\sigma(j)}(q_{\gamma})$ is a non-decreasing function of $j$). Let $\boldsymbol{\nu}^{opt}$ be an optimal solution of $P_2$. Then, we have the following inequalities \begin{align*} & \sum_{k \geq 1} \nu^{opt}_k \cdot \mu_{k}(q_{\gamma}) \leq \sum_{k \geq 1} \nu^a_k \cdot \mu_{k}(q_{\gamma}) \overset{(b)}{\leq} \sum_{k \geq 1} \nu^{opt}_k \cdot \mu_{k}(q_{\gamma}) \\ & \Longrightarrow \sum_{k \geq 1} \nu^{opt}_k \cdot \mu_k (q_{\gamma}) = \sum_{k \geq 1} \nu^{a}_k \cdot \mu_{k}(q_{\gamma}) \\ & \Longrightarrow \boldsymbol{\nu}^{a} \textrm{ is an optimal solution of } P_2 \end{align*} where Inequality~(b) follows by setting $\boldsymbol{\nu}$ to $\boldsymbol{\nu}^{opt}$ in Inequality~\eqref{eq:va}. \hfill \IEEEQED \bibliographystyle{IEEEtran} \footnotesize
{'timestamp': '2016-06-17T02:10:27', 'yymm': '1606', 'arxiv_id': '1606.05179', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05179'}
arxiv
\section{Introduction} \label{sec:intro} Integration of spatial information paves the way for improved accuracies in hyperspectral image classification \cite{fauvel2013advances}, as the use of spatial features extracted from image regions produces spatially smoother classification maps \cite{fauvel2012spatial}. A common approach to extract such features is to rely on multiscale representations, \textit{e.g.} through (extracted) attribute profiles \cite{dalla2010extended} or hierarchical spatial features \cite{bruzzone2006multilevel}. In this framework, features from multiple scales are extracted to model the context information around the pixels through different scales. Features computed at each scale are then concatenated into a unique (long) stacked vector. Such a vector is then used as input into a conventional classifier like SVM. Representative examples of this framework include \cite{bruzzone2006multilevel, lefevre14, huo2015semisupervised}. While defining kernels on stacked vectors is a simple and standard way to cope with hierarchical spatial features, it does not take into account the specific nature (\textit{i.e.} hierarchical) of the data. Indeed, hierarchical spatial features extracted from hyperspectral images can rather be viewed as a sequence of data, for which structured kernels are commonly applied in other fields. Among the existing sequence structured kernels, the spectrum kernel based on subsequences of various lengths has been successfully applied in various domains, \textit{e.g.} biology for protein classification \cite{leslie2002spectrum,smola2003fast} or nature language processing for text classification \cite{lodhi2002text}. Its relevance for hyperspectral image classification remains to be demonstrated and is the main objective of this paper. Indeed, by applying the spectrum kernel onto hierarchical spatial features, we can explicitly take into account the hierarchical relationships among regions from different scales. To do so, we construct kernels on various lengths of subsequences embedded in the whole set of hierarchical spatial features instead of modeling this set as a single stacked vector, the latter actually being a particular case of the sequence kernel. Furthermore, we also propose an efficient algorithm to compute the spectrum kernel with all possible lengths, thus making realistic to apply such a kernel on hyperspectral images. The paper is organized as follows. We first briefly recall some background on hierarchical image representation (Sec.~\ref{sec:Hierarchical}). We then detail the concept of spectrum kernel (Sec.~\ref{sec:Spectrum}), and introduce an efficient algorithm for its computation. Evaluation of proposed method is detailed in Sec.~\ref{sec:Experiments}, before giving a conclusion and discussing future works. \section{Hierarchical image representation} \label{sec:Hierarchical} \begin{figure}[htb] \centering \includegraphics[width=1.6cm,height=1.6cm]{./Image/hierarchical/IndianPines.png} \includegraphics[width=1.6cm,height=1.6cm]{./Image/hierarchical/FCCIndianPines.png} \includegraphics[width=1.6cm,height=1.6cm]{./Image/hierarchical/Hseg2.png} \includegraphics[width=1.6cm,height=1.6cm]{./Image/hierarchical/Hseg5.png} \includegraphics[width=1.6cm,height=1.6cm]{./Image/hierarchical/Hseg7.png} \caption{The image representation of \texttt{Indian Pines} at different segmentation scales. From left to right: ground truth, false-color image, fine level (2486 regions), intermediate level (278 regions), coarse level (31 regions). } \label{fig:hierarchcal} \end{figure} Hierarchical image representation describes the content of an image from fine to coarse level (as illustrated in Fig.~\ref{fig:hierarchcal}) through a tree structure, where the nodes represent the image regions at different levels and the edges model the hierarchical relationships among those regions. Such representation is commonly used in the GEOgraphic-Object-Based Image Analysis (GEOBIA) framework \cite{Hay2008} and can be constructed with hierarchical segmentation algorithms, \textit{e.g.} HSeg \cite{tilton2010rhseg}. Let $n_1$ be a pixel of the image. Through hierarchical image representation, we write $n_i$ the nested image regions at level $i= 2,...,p_\text{max}$, with region at lower levels always being included in higher levels \textit{i.e.} $n_1 \subseteq n_2 \ldots \subseteq n_{p_\text{max}}$. The context information of pixel $n_1$ can be then described by its ancestor regions $n_i$ at multiple levels $i= 2,...,p_\text{max}$. More specifically, one can define the context information as a sequence $S= \{n_1,...,n_{p_\text{max}}\}$ that encodes the evolution of the pixel $n_1$ through the different levels of the hierarchy. Each $n_{i}$ is described by a $D$-dimensional feature $\boldsymbol{x}_{i}$ that encodes the region characteristics \textit{e.g.} spectral information, size, shape, etc. \section{ spectrum kernels} \label{sec:Spectrum} \subsection{Definition} \label{ssec:Spectrum} The spectrum kernel is an instance of kernels for structured data that allows the computation of similarities between contiguous subsequences of different lengths \cite{leslie2002spectrum,smola2003fast}. Originally designed for symbolic data, we propose here an adaptation to deal with hierarchical representations equipped with numerical features. Contiguous subsequences can be defined as $ s_{p} = (n_t, n_{t+1}$ $..., n_{t+p})$, with $ t \geq 1, t+p \leq p_\text{max}$ and $p$ being the subsequence length. Fig.~\ref{fig:sequence} gives an example of a sequence and enumerates all its subsequences $s_p$. \begin{figure}[htb] \centering \includegraphics[width = 0.35\textwidth]{./Image/sequence.pdf} \caption{A sequence $S$ (left) and all its subsequences $s_p$ (right).} \label{fig:sequence} \end{figure} The spectrum kernel measures the similarity between two sequences $S, S'$ by summing up kernels computed on all their subsequences. Let $S_p = \{s_p \in S \mid |s_p| = p\}$ be the set of subsequences with a specific length $p$, the spectrum kernel can be written as: \begin{equation} \begin{split} K(S,S')& = \sum_{p} \; \omega_{p} ~ K(S_p,S'_p) \; \\ & = \sum_{p} \; \omega_{p} \sum_{\substack{s_{p} \in S_p, s'_{p} \in S'_p }} K(s_p,s'_p ) \; , \label{spectrumSym} \end{split} \end{equation} where the $p$-spectrum kernel $ K(S_p,S'_p)$ is computed between the set of subsequences of length $p$, and is further weighted by parameter $\omega_{p}$. In other words, it only allows the matching of subsequences with same length. The kernel between two subsequences $K(s_p,s'_p )$ is defined as the product of atomic kernels computed on individual nodes $k(n_{t+i},n'_{t'+i})$, with $i$ denoting the position of nodes in the subsequence, following an ascending order $ 0 \leq i \leq p - 1$: \begin{equation} K(s_{p},s'_{p})= \prod_{\substack{i = 0}}^{p-1} k(n_{t+i},n'_{t'+i} )\; . \label{eq:path} \end{equation} $K(S,S')$ in Eq.~\eqref{spectrumSym} suffers a common issue for structured kernels: the kernel value highly depends on the length of the sequences, as the number of compared substructures greatly increases with the length of sequence. One can mitigate this problem by normalizing the kernel as: \begin{equation} K^*(S,S')= \frac{K(S,S') }{ \sqrt{K(S,S)}\sqrt{K(S',S')}}. \; \end{equation} In the sequel, we only use the normalized version $K^*$ of the kernel (written $K$ for the sake of simplicity). \subsection{Weighting} \label{ssec:weighting} Several common weighting schemes \cite{smola2003fast} can be considered: \begin{itemize} \item $\omega_{p}= 1$ if $p = q$ and $\omega_{p}= 0$ otherwise, yielding to a $q$-spectrum kernel considering only subsequence with a given length $q$: $K(S,S')=\sum\limits_{{s_{q} \in S_q, s'_{q} \in S'_q }} K(s_q,s'_q )$; \item $\omega_{p}= 1$ for all $p$, leading to a constant weighting with all lengths of subsequences; \item $\omega_{p}= \lambda^p$ with $\lambda\in (0,1)$, an exponentially decaying weight \textit{w.r.t.} the length of the subsequences. \end{itemize} It should be noted here that when using Gaussian kernel for the atomic kernel \begin{equation} k(n_{i},n_{i}') = \exp (-\gamma \lVert \boldsymbol{x}_{i}-\boldsymbol{x}'_{i}\rVert^2)\; , \label{eq:rbf1} \end{equation} the kernel computed on the stacked vector $\boldsymbol{z} = (\boldsymbol{x}_{1}, \cdots, \boldsymbol{x}_{p_\text{max}})$ comes down to the $p_\text{max}$-spectrum kernel: \begin{equation} \label{eq:rbf2} \begin{split} & K(s_{p_\text{max}},s'_{p_\text{max}}) = \prod_{\substack{i = 1}}^{p_\text{max}} \exp (-\gamma \lVert \boldsymbol{x}_{i}-\boldsymbol{x}'_{i}\rVert^2)\; = \\ & \exp \left(\sum_{\substack{i = 1}}^{p_\text{max}} (-\gamma \lVert \boldsymbol{x}_{i}-\boldsymbol{x}'_{i}\rVert^2)\right)\; = \exp (-\gamma \lVert \boldsymbol{z}-\boldsymbol{z}'\rVert^2)\;. \end{split} \end{equation} \subsection{Kernel computation} \label{ssec:computation} We propose here an efficient computation scheme to iteratively compute all the $p$-spectrum kernels in a single run, yielding a complexity of $O(p_\text{max}p'_\text{max})$. The basic idea is to iteratively compute the kernel on subsequences $s_{p}$ and $s'_p$ using previously computed kernels on subsequences of length $(p-1)$. The atomic kernel $k(n_{i}, n'_{i'})$ thus needs to be computed only once, avoiding redundant computing. We define a three-dimensional matrix $M$ of size $p_\text{max} \times p'_\text{max} \times \min(p_\text{max}, p'_\text{max})$, where each element $M_{i,i',p}$ is defined as: \begin{equation} M_{i,i',p} = k(n_i,n'_{i'}) ( M_{{i-1},{i'-1} ,p-1} ) \; . \label{eq:computation} \end{equation} where $M_{0,0,0} = M_{0,i',0} = M _{i,0,0} = 1$ by convention. The kernel value for the $p$-spectrum kernel is then computed as the sum of all the matrix elements for a given $p$: \begin{equation} K(S_p,S'_p) = \sum_{i,i'=1}^{p_{\text{max}},p'_{\text{max}}}M_{i,i',p} \; . \end{equation} \section{Experiments} \label{sec:Experiments} \subsection{Datasets and design of experiments} We conduct experiments on 6 standard hyperspectral image datasets: \texttt{Indian Pines}, \texttt{Salinas}, \texttt{Pavia Centre} and \texttt{University}, \texttt{Kennedy space center (KSC)} and \texttt{Botswana}, considering a \textit{one-against-one} SVM classifier (using the Java implementation of LibSVM \cite{chang2011}). We use Gaussian kernel as the atomic kernel $ k(\cdot,\cdot)$. Free parameters are determined by 5-fold cross-validation over potential values: the bandwidth $\gamma$ (Eq.~\eqref{eq:rbf1}) and the SVM regularization parameter $C$. We also cross-validate the different weighting scheme parameters: $q \in \{1, \ldots, p_\text{max}\}$ for the $q$-spectrum kernel and $\lambda\in (0,1)$ for the decaying factor. \subsection{Results and analysis} We randomly pick $n=\{10,25,50\}$ samples per class from available ground truth for training, and the rest for testing. In the case of small number of pixels per class in \texttt{Indian Pines} dataset (total sample size for a class less than $2n$), we use half of samples for training. Hierarchical image representations are generated with HSeg \cite{tilton2010rhseg} by increasing the region dissimilarity criterion $\alpha$. Parameter $\alpha$ is empirically chosen: $\alpha=[2^{-2},2^{-1},...,2^{8}]$, leading to a tree that covers the whole scales from fine to coarse (top levels of whole image are discarded as they do not provide any additional information). Hierarchical levels $\alpha = \{2^2,2^4,2^6\}$ of \texttt{Indian Pines} are shown in Fig.~\ref{fig:hierarchcal} as the fine, intermediate, coarse level for illustration. Features $\boldsymbol{x}_{i}$ that describe each region are set as the average spectral information of the pixels that compose the region. \subsubsection{Comparison with state-of-the-art algorithms} We compare our sequence-based kernel with state-of-the-art algorithms that take into account the spatial information relying on multiscale representation of an image: i) spatial-spectral kernel \cite{fauvel2012spatial} that uses area filtering to obtain the spatial features (the filtering size is fixed so as to lead to the best accuracy); ii) attribute profile \cite{dalla2010extended}, using 4 first principal components with automatic level selection for the area attribute and standard deviation attribute as detailed in \cite{ghamisi2014automatic}; iii) hierarchical features stored on a stacked vector \cite{bruzzone2006multilevel,lefevre14,huo2015semisupervised}. For comparison purposes, we also report the pixel-based classification overall accuracies. All results are obtained by averaging the performances over 10 runs of (identical among the algorithms) randomly chosen training and test sets. First of all, in Tab.~\ref{tab:results}, we can see that the overall accuracies are highly improved when spatial information is included. Using hierarchical features computed over a tree (stacked vector or any version of the spectrum kernel) yields competitive results compared with state-of-the-art methods. By applying the proposed spectrum kernel on the hierarchical features rather than a kernel on a stacked vector, the results are further improved: best results for \texttt{Indian Pines}, \texttt{Salinas}, \texttt{Pavia Centre}, \texttt{KSC} and \texttt{Botswana} datasets are obtained with a spectrum kernel. We can observe that attribute profiles perform better for \texttt{Pavia University}. This might be due to the kind of hierarchical representation used, \textit{i.e.} min and max-trees in the case of attribute profiles instead of HSeg in our case. Besides, the popularity of these profiles as well as the \texttt{Pavia} dataset result in optimizations of the scale parameters for years. However, the proposed spectrum kernel is not limited at all to the HSeg representation, and it is thus possible to apply it to min- and max-trees and attribute features. This will be explored in future studies. \subsubsection{Impact of the weighting scheme} We study the impact of the different weighting schemes introduced in Sec.~\ref{ssec:weighting}. Fig.~\ref{fig:spectrum} shows that the stacked vector ($q = p_\text{max}$) does not lead to the best performances, and that the best scale $q$ can not be determined beforehand as it depends on the dataset. For most setups, combination of different scales (constant weighting or decaying factor) allows the improvement of the accuracies. However, the best weighting scheme again depends on the considered dataset, and this calls for a more extensive study of weighting strategies. \begin{table*}[htb] \footnotesize \centering \caption{Mean (and standard deviation) of overall accuracies (OA) computed over 10 repetitions using $n$ training samples per class for 6 hyperspectral image datasets. $c$ stands for constant weighting, $q$ for the $q$-spectrum kernel and $\lambda$ for the decaying weight. Best results are boldfaced.} \begin{tabular}{|c|c||c|c|c||c|c|c|} \hline & \multicolumn{7}{c|}{\texttt{Indian Pines}} \\ \hline $n$ & pixel only & Spatial-spectral & Attribute profile & Stacked vector & Spectrum kernel-$c$ & Spectrum kernel-$q$ & Spectrum kernel-$\lambda$ \\ \hline 10 & 54.89 (2.10) & 72.03 (2.52)& 64.37 (2.87) & 73.21 (2.60)& 78.70 (4.88) & 80.19 (4.48) & \textbf{80.19 (3.40)}\\ 25 & 66.04 (1.59) & 84.02 (1.31) & 76.71 (2.60) & 84.90 (2.42)& 89.16 (2.89) & \textbf {91.36 (1.57)} & 89.46 (3.61)\\ 50 & 72.99 (0.10) & 90.82 (2.07)& 84.57 (1.45) & 92.19 (0.86)& 94.12 (1.18) & \textbf{94.76 (1.09)} & 94.48 (1.20) \\ \hline \end{tabular} \begin{tabular}{|c|c||c|c|c||c|c|c|} \hline & \multicolumn{7}{c|}{\texttt{Salinas}} \\ \hline $n$ & pixel only & Spatial-spectral & Attribute profile & Stacked vector & Spectrum kernel-$c$ & Spectrum kernel-$q$ & Spectrum kernel-$\lambda$ \\ \hline 10 & 83.87 (1.96) & 87.72 (1.88) & 91.89 (1.73) & 89.17 (2.95) & \textbf{93.18 (1.70)} & 91.16 (2.65) & 91.44 (2.71) \\ 25 & 88.13 (1.22) & 92.93 (0.98) & 95.99 (1.11) & 94.86 (1.58) & \textbf{97.28 (1.62)} & 97.04 (1.28) & 97.02 (1.57) \\ 50 & 88.86 (1.22) & 94.34 (0.81) & 97.39 (0.45) & 96.71 (0.70) & 98.51 (0.89) & \textbf{98.81 (0.70)} & 97.93 (1.22)\\ \hline \end{tabular} \begin{tabular}{|c|c||c|c|c||c|c|c|} \hline & \multicolumn{7}{c|}{\texttt{Pavia Centre}} \\ \hline $n$ & pixel only & Spatial-spectral & Attribute profile & Stacked vector & Spectrum kernel-$c$ & Spectrum kernel-$q$ & Spectrum kernel-$\lambda$ \\ \hline 10 & 93.37 (3.59) & 95.69 (0.73) & 96.03 (0.91) & 95.94 (1.01) & 96.14 (1.61) & 96.56 (1.09) & \textbf{96.71 (0.97)} \\ 25 & 96.13 (0.48) & 96.99 (0.48) & 97.59 (0.27) & 97.85 (0.53) & 97.93 (0.55) & \textbf{97.96 (0.59)} & 97.93 (0.57) \\ 50 & 96.98 (0.52) & 98.10 (0.34) & 98.59 (0.24) & 98.59 (0.48)& 98.83 (0.39) & 98.92 (0.37) & \textbf{99.04 (0.31)}\\ \hline \end{tabular} \begin{tabular}{|c|c||c|c|c||c|c|c|} \hline & \multicolumn{7}{c|}{\texttt{Pavia University}} \\ \hline $n$ & pixel only & Spatial-spectral & Attribute profile & Stacked vector & Spectrum kernel-$c$ & Spectrum kernel-$q$ & Spectrum kernel-$\lambda$ \\ \hline 10& 69.00 (5.68) & 76.74 (5.26) & \textbf{88.69 (4.06)} & 83.30 (3.75) & 84.34 (5.14) & 84.43 (6.13) & 85.10 (6.65) \\ 25& 79.81 (1.42) & 87.92 (3.36) & \textbf{95.17 (1.84)} & 92.95 (3.29) & 93.70 (2.56) & 93.98 (1.91) & 93.98 (2.22) \\ 50& 84.72 (1.32) & 93.27 (1.29) & \textbf{97.52 (0.86)} & 96.62 (1.06) & 97.20 (0.97) & 96.76 (1.11) & 96.66 (1.84) \\ \hline \end{tabular} \begin{tabular}{|c|c||c|c|c||c|c|c|} \hline & \multicolumn{7}{c|}{\texttt{KSC}} \\ \hline $n$ & pixel only & Spatial-spectral & Attribute profile & Stacked vector & Spectrum kernel-$c$ & Spectrum kernel-$q$ & Spectrum kernel-$\lambda$ \\ \hline 10 & 86.56 (1.33) & 90.96(2.12) & 90.61 (0.63) & 92.75 (1.71) & 93.98 (1.29) & \textbf{94.18 (0.87)} & 94.01 (1.15)\\ 25 & 91.27 (0.84) & 97.16 (0.16) & 95.53 (0.71) & 97.32 (0.45) & \textbf{97.85 (0.63)} & 97.45 (0.86) & 97.82 (0.66) \\ 50 & 93.67 (0.58) & 98.46 (0.29) & 97.41 (0.49) & 98.26 (0.37) & 99.13 (0.34) & 99.00 (0.40) & \textbf{99.15 (0.23)} \\ \hline \end{tabular} \begin{tabular}{|c|c||c|c|c||c|c|c|} \hline & \multicolumn{7}{c|}{\texttt{Botswana}} \\ \hline $n$ & pixel only & Spatial-spectral & Attribute profile & Stacked vector & Spectrum kernel-$c$ & Spectrum kernel-$q$ & Spectrum kernel-$\lambda$ \\ \hline 10 & 87.72 (2.42) & 92.62 (1.40) & 92.17 (1.32) & 94.16 (1.41) & \textbf{94.66 (1.62)} & 94.59 (1.69) & 94.63 (1.54) \\ 25 & 91.89 (0.67) & 96.65 (0.69) & 95.35 (0.91) & 97.71 (0.72) & \textbf{97.99 (0.48)} & 97.79 (0.55) & 97.90 (0.79)\\ 50 & 94.03 (0.60) & 97.74 (0.52) & 96.83 (0.64) & 98.95 (0.53)& \textbf{99.10 (0.50)} & 98.97 (0.42) & 98.99 (0.45) \\ \hline \end{tabular} \label{tab:results} \end{table*} \begin{figure*}[!htb] \centering \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=1\textwidth]{./Image/experiments/IndianPines50Samples-eps-converted-to.pdf} \caption{\texttt{Indian Pines}} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=1\textwidth]{./Image/experiments/Salinas50Samples-eps-converted-to.pdf} \caption{\texttt{Salinas}} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=1\textwidth]{./Image/experiments/PaviaC50Samples-eps-converted-to.pdf} \caption{\texttt{Pavia Centre}} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=1\textwidth]{./Image/experiments/Pavia50Samples-eps-converted-to.pdf} \caption{\texttt{Pavia University}} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=1\textwidth]{./Image/experiments/KSC50Samples-eps-converted-to.pdf} \caption{\texttt{KSC}} \end{subfigure} \begin{subfigure}[t]{0.32\textwidth} \includegraphics[width=1\textwidth]{./Image/experiments/Botswana50Samples-eps-converted-to.pdf} \caption{\texttt{Botswana}} \end{subfigure} \caption{The overall accuracies of $q$-spectrum kernel with different lengths $q$ using $n = 50$ training samples per class. Results for the stacked vector with Gaussian kernel are shown in dashed line.} \label{fig:spectrum} \end{figure*} \section{Conclusion} In this paper, we propose to use the spectrum kernel for applying machine learning on hierarchical features for hyperspectral image classification. The proposed kernel considers the hierarchical features as a sequence of data and exploits the hierarchical relationship among regions at multiple scales by constructing kernels on various lengths of subsequences. The method exhibits better performances than state-of-the-art algorithms for all but one tested dataset. We also show that combining different scales allows the improvement of the accuracies, but the way to combine them should be further explored. The use of optimal weights thanks to the multiple kernel learning framework \cite{gonen2011multiple} is the next step of our work. \bibliographystyle{IEEEbib}
{'timestamp': '2016-06-17T02:01:33', 'yymm': '1606', 'arxiv_id': '1606.04985', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04985'}
arxiv
\section{Introduction} \PARstart{T}{he} moment generating function (MGF) has played a pivotal role in communication theory for decades, as a tool for evaluating the performance of communication systems in very different scenarios \cite{Simon1998,DiRenzo2010,Yilmaz2012,Rao2015}. The MGF of the signal-to-noise ratio (SNR) $\gamma$, defined as the Laplace transform of the Probability Density Function (PDF) of $\gamma$, is well-known for most popular fading distributions \cite{AlouiniBook,Ermolova2008,Paris2014} and hence enables for a simple characterization of the performance metrics of interest in closed-form. A more general function extensively used in communication theory is the so-called incomplete MGF (IMGF), {also referred to as truncated MGF, or interval MGF}. This function has an additional degree of freedom by allowing the lower (or equivalently, upper) limit of the integral in the Laplace transform, say $\zeta$, to be greater than zero (or equivalently, lower than $\infty$), and also appears when characterizing the performance in a number of scenarios of interest: {order statistics \cite{Nuttall2002,Nam2010,Yang2011,Nam2014},} symbol and bit error rate calculation with multiantenna reception \cite{Xiaodi2006,Loskot2009}, capacity analysis in fading channels \cite{DiRenzo2010}, outage probability analysis in cellular systems \cite{Annamalai2001,Morales2012}, adaptive scheduling techniques \cite{Gaaloul2012}, cognitive relay networks \cite{Yang2015} or physical layer security \cite{JuanmaJavi15}. Despite its usefulness, to the best of our knowledge the expressions of the IMGF are largely unknown for fading distributions other than the classical ones: Rayleigh, Rice, Nakagami-$m$ and Hoyt. {In fact, a general and systematic way to find analytical expressions for the IMGF does not yet exist, thus requiring the use of state-of-the-art numerical techniques for its evaluation \cite{DiRenzo2010}.} Thence, there is a twofold motivation for this paper from a purely communication-theoretic perspective: first, we present a {general theory} for deriving the IMGF of the SNR for an arbitrary distribution. {Specifically, we show that the IMGF of \textit{any} fading distribution is given in terms of an inverse Laplace transform of a shifted version of the MGF scaled by the Laplace domain variable. This implies that the IMGF should have a similar functional form as the cumulative distribution function (CDF).} { Secondly, we exemplify the usefulness of this result by deriving} a closed-form expression for the IMGF of the $\kappa$-$\mu$ shadowed distribution \cite{Paris2014,Cotton2015}, which includes popular fading distributions such as \mbox{$\kappa$-$\mu$}, $\eta$-$\mu$ \cite{Yacoub07,Laureano2015} or Rician-shadowed \cite{Abdi2003} as particular cases, and for all of which the IMGF had not been previously reported. In order to illustrate its {practical applicability, we introduce several scenarios of interest in wireless communications: As a main application,} we focus on a physical-layer security set-up on which two legitimate peers (Alice and Bob) wish to communicate in the presence of an external eavesdropper (Eve). The characterization of the maximum rate at which a secure communication can be attained, i.e. the \emph{secrecy capacity} $C_S$, is a classical problem \cite{Wyner1975,Cheong1978} in communication theory. Remarkably, the research on physical-layer security of communication systems operating in the presence of fading has been boosted in the last years ever since the original works in \cite{Barros2006,Bloch2008}. The fact that Eve and Bob observe independent fading realizations adds an additional layer of security to communication compared to the conventional set-up for the Gaussian wiretap channel \cite{Cheong1978}. Hence, a secure communication is feasible even when the average SNR at Bob is lower than the average SNR at Eve. In the literature, there is a great interest on understanding how the consideration of more sophisticated fading models than Rayleigh may impact the secrecy performance attending to different metrics: the outage probability of secrecy capacity (OPSC), the probability of strictly-positive secrecy capacity (SPSC) or the average secrecy capacity (ASC). Specifically, fading models such as Nakagami-$m$ \cite{Sarkar09}, Rician \cite{Liu13}, Weibull \cite{Liu13b}, two-wave with diffuse power \cite{Wang14}, Nakagami-$q$ \cite{Romero2014} or $\kappa$-$\mu$ \cite{Bhargav2016} have been considered. However, the statistical characterization of the OPSC in a tractable form is often unfeasible due to the involved mathematical derivations. Thus, approximations are usually required for evaluating the OPSC \cite{Wang14,Bhargav2016}, being only possible the calculation of the SPSC in closed-form \cite{Liu13,Liu13b,Bhargav2016}. Very recent works have proposed novel approaches to deriving the secrecy performance metrics in a general way: in \cite{Gomez2015}, a duality between the OPSC and the outage probability analysis in the presence of interference and background noise was presented, which greatly simplifies the analysis of the OPSC calculation for an arbitrary choice of fading distributions for the desired and eavesdropper links. In \cite{Peppas2016}, a unified MGF approach to the analysis of physical-layer security in wireless systems was introduced, allowing for a numerical evaluation of the secrecy performance metrics for arbitrary fading distributions. {As we will later see, the practical application of our results allows that the OPSC can be evaluated directly by specializing the IMGF of the SNR at Bob at some specific values}. Thus, the OPSC (and hence the SPSC as a special case) can be evaluated in closed-form provided that such IMGF is given in closed-form. This is exemplified for the very general case of the $\kappa$-$\mu$ shadowed distribution \cite{Paris2014}. {We also illustrate how the IMGF can be used to obtain other performance metrics in relevant scenarios in communication theory which, despite looking rather dissimilar at a first glance, they all require for the computation of the IMGF. The first one of these additional scenarios is the outage probability analysis of wireless communications systems affected by interference and background noise. As previously stated, this problem was recently shown to be mathematically equivalent to the OPSC in \cite{Gomez2015}; thus, the outage probability in this scenario will also be expressed in terms of the IMGF under the same conditions assumed when computing the OPSC. The second additional scenario is related to the analysis of the channel capacity when side information is available at both the transmitter and the receiver sides \cite{Goldsmith1997}. According to the framework introduced in \cite{DiRenzo2010}, the capacity in this scenario can be expressed in terms of the IMGF. Finally, we also analyze a classical performance metric in communication theory, which is the average bit-error rate (ABER) with adaptive modulation \cite{Gold05}. The ABER in this scenario under \textit{arbitrary} fading is also given in terms of the IMGF of the fading distribution.} The remainder of this paper is structured as follows: in Section \ref{mathematics}, the main mathematical contributions of this paper are presented, within the most relevant is a general way to deriving the IMGF of any arbitrary fading distribution. Closed-form expressions for the IMGF of the $\kappa$-$\mu$ shadowed distribution are also given, as well as for all the special cases included therein ($\kappa$-$\mu$, $\eta$-$\mu$, Rician shadowed, Rician, Nakagami-$m$, Nakagami-$q$, Rayleigh and one-sided Gaussian). Then, in Section \ref{analysis} these mathematical results are used to present an IMGF-based approach to the physical-layer security analysis in wireless systems. {Section \ref{analysis2} is devoted to illustrate how additional scenarios of interest in wireless communications can also be analyzed by using the IMGF.} Numerical results are given in Section \ref{numerical}, whereas the main conclusions are outlined in Section \ref{conclusions}. \section{Mathematical Results} \label{mathematics} \begin{definition} [Lower IMGF] Let $X$ be a non-negative random variable and $\zeta$ a non-negative real number, the lower IMGF of $X$ is defined as \label{IMGF} \begin{equation} \label{def1} \M_{X}^{l}(s,\zeta) \triangleq \int_{0}^{\zeta} {e^{sx} f_X \left( x \right)dx}. \end{equation} \end{definition} \vspace{5mm} \begin{definition} [Upper IMGF] Let $X$ be a non-negative random variable and $\zeta$ a non-negative real number, the upper IMGF of $X$ is defined as \label{IMGFb} \begin{equation} \label{def1b} \M_{X}^{u}(s,\zeta) \triangleq \int_{\zeta}^\infty {e^{sx} f_X \left( x \right)dx}. \end{equation} \end{definition} \vspace{5mm} Obviously, the MGF of $X$ is obtained from these IMGFs as $\M_{X}(s)=\M_{X}^{l}(s,\infty)=\M_{X}^{u}(s,0)$. Both incomplete IMGFs are easily related through the following equation \begin{align} \label{obvious} {\M}_X^u \left( {s,\zeta} \right) &= {\M}_X \left( s \right) - {\M}_X^l \left( {s,\zeta} \right), \end{align} In the following Lemma, we present a general expression for the IMGF of an arbitrarily distributed non-negative random variable. \begin{lemma} \label{lema1} Let $X$ be a non-negative random variable with MGF $\M_{\gamma}(s)$. Its lower IMGFs can be computed by the inverse Laplace transform of the scaled-shifted MGF, i.e. \begin{align} \label{eq_lema1} {\M}_X^l \left( {s,\zeta} \right) &= {\L}^{ - 1} \left\{ {\frac{1} {p}{\M}_X \left( {s - p} \right);p,z=\zeta} \right\}, \end{align} where ${\L}\left\{ {h\left( z \right);z,p} \right\} \triangleq \int_0^\infty {e^{ - pz} h\left( z \right)dz}$ represents the Laplace transform from the $z$-domain to the $p$-domain, and ${\L}^{ - 1} \left\{ {H\left( z \right);p,z} \right\}$ the inverse Laplace transform from the \mbox{$p$-domain} to the $z$-domain. \end{lemma} \begin{proof} Let us consider the upper IMGF in (\ref{def1}) as a function of the upper integration limit, i.e. \begin{equation} \label{eq_lema1_proof_2} \Lambda(z)=\int_0^{z} {e^{sx} f_X \left( x \right)dx}. \end{equation} The Laplace transform of $\Lambda(z)$ in the $p$-domain can be expressed as \begin{equation} \label{eq_lema1_proof_3} \begin{gathered} {\L}\left\{\Lambda \left( z \right);z,p\right\} = {\L}\left\{ {\int_0^z {e^{sx} f_X \left( x \right)dx;z,p} } \right\} = \frac{1} {p}{\L}\left\{ {e^{sz} f_X \left( z \right);z,p} \right\} \hfill \\ = \frac{1} {p}{\L}\left\{ {f_X \left( x \right);z,p - s} \right\} = \frac{1} {p}{\M}_X \left( {s - p} \right), \hfill \\ \end{gathered} \end{equation} where both the definite integral property and the modulation property of the Laplace transform have been applied in order to complete the proof. \end{proof} \vspace{4mm} This Lemma provides a general way of computing the IMGF {of \textit{any} fading distribution} in terms of the conventional MGF. Interestingly, (\ref{eq_lema1}) involves an inverse Laplace transform of a shifted version of the MGF, scaled by the Laplace domain variable $p$. Thus, it is expectable that the IMGF has a functional form similar to the CDF, since the CDF arises as a particular case of the lower IMGF when evaluated in ${s=0}$, i.e. \begin{equation} F_X(\zeta)=\M_{X}^{l}(0,\zeta). \end{equation} {This result also suggests that the IMGF of \textit{any} distribution for which either the CDF or the MGF are not available in closed-form, will not be likely to have a closed-form expression. Otherwise, we would be finding an expression for such CDF or MGF as a special case. This is the case of some relevant fading distributions in the literature like Durgin and Rappaport's Two-Wave with Diffuse Power (TWDP) fading model \cite{Durgin2002}, or the Beckmann distribution \cite{Beckmann1962,Beckmann1964}. The CDF for these distributions is only available in integral form, but their MGFs have a closed-form expression \cite{AlouiniBook,Rao2015}. Another valid example is the Lognormal distribution, for which the CDF has a closed-form expression in terms of the Gaussian $Q$-function, but its MGF has been largely unknown \cite{Tellambura2010}.} As consequences of Lemma \ref{lema1}, the IMGF of any non-negative RV can be obtained in a very general form by an inverse Laplace transform operation over the MGF. As we will now show, this Laplace transform can be computed in closed-form for a number of fading distributions of interest. In the following corollaries (and summarized in Table \ref{table01}), we derive closed-form expressions for the IMGF of the $\kappa$-$\mu$ shadowed distribution and the special cases included therein, namely the Rician shadowed, $\kappa$-$\mu$ and $\eta$-$\mu$ distributions. All these expressions are new in the literature to the best of our knowledge. \vspace{2mm} \begin{corollary} \label{corolary1} Let $\gamma$ be a $\kappa$-$\mu$ shadowed random variable with $E\left\{\gamma\right\}=\bar\gamma$, and non-negative real shape parameters $\kappa$, $\mu$ and $m$, i.e, ${\gamma\sim \mathcal{S}_{\kappa\mu m}(\gamma;\kappa,\mu,m)}$\footnote{The symbol $\sim$ reads as \textit{statistically distributed as.}} \cite{Paris2014}. Then, its lower IMGF is given in the first entry of Table \ref{table01}, where $\Phi_2(\cdot)$ is the bivariate confluent hypergeometric function defined in \cite[eq. 9.261.2]{Gradstein2007}. \end{corollary} \begin{proof} For the sake of clarity let us write the MGF of the $\kappa$-$\mu$ shadowed distribution as follows \begin{equation} \label{eq_corolary1_proof1} \begin{gathered} {\M}_{\gamma} \left( s \right) = ( - 1)^\mu A(s - a)^{m - \mu } (s - b)^{ - m} \hfill \\ \left\{ \begin{gathered} A = \frac{{\mu ^\mu m^m \left( {1 + \kappa } \right)^\mu }} {{\bar \gamma ^\mu \left( {\mu \kappa + m} \right)^m }} \hfill \\ a = \frac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }} \hfill \\ b = \frac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}\frac{m} {{\mu \kappa + m}} \hfill \\ \end{gathered} \right. \hfill \\ \end{gathered}. \end{equation} In order to apply Lemma \ref{lema1}, the scaled-shifted MGF of $\gamma$ is first expressed as follows \begin{equation} \label{eq_corolary1_proof2} \begin{gathered} \frac{1} {p}{\M}_{\gamma} \left( {s - p} \right) = \frac{{A( - 1)^\mu }} {p}(s - p - a)^{m - \mu } (s - p - b)^{ - m} \hfill \\ = \frac{A} {p}(p - s + a)^{m - \mu } (p - s + b)^{ - m} \hfill \\ = \frac{A} {{p^{1 + \mu } }}\left( {1 - \left( {\frac{{s - a}} {p}} \right)} \right)^{m - \mu } \left( {1 - \left( {\frac{{s - b}} {p}} \right)} \right)^{ - m} \hfill \\ = \frac{A} {{p^{1 + \mu } }}\left( {1 - \left( {\frac{{s - a}} {p}} \right)} \right)^{ - (\mu - m)} \left( {1 - \left( {\frac{{s - b}} {p}} \right)} \right)^{ - m}. \hfill \\ \end{gathered} \end{equation} To perform the inverse Laplace transform the following pair can be considered \cite[pp. 290]{Srivastava1985} \begin{equation} \label{eq_corolary1_proof3} \begin{gathered} {\L}\left\{ {x^{\gamma - 1} \Phi _2^{\left( n \right)} \left( {\beta _1 ,...,\beta _n ;\gamma ;\lambda _1 x,...,\lambda _n x} \right);x,p} \right\} = \hfill \\ = \frac{{\Gamma \left( \gamma \right)}} {{p^\gamma }}\left( {1 - \frac{{\lambda _1 }} {p}} \right)^{ - \beta _1 } ...\left( {1 - \frac{{\lambda _n }} {p}} \right)^{ - \beta _n } ,\quad \hfill \\ \operatorname{Re} \left\{ \gamma \right\} > 0,\operatorname{Re} \left\{ p \right\} > \max \left\{ {0,\operatorname{Re} \left\{ {\lambda _1 } \right\}, ...,\operatorname{Re} \left\{ {\lambda _n } \right\}} \right\}. \hfill \\ \end{gathered} \end{equation} Joining (\ref{eq_corolary1_proof2}), (\ref{eq_corolary1_proof3}) and Lemma \ref{lema1} the proof is completed. \end{proof} \vspace{2mm} It must be noted that the IMGF here obtained has the same functional form as the CDF given in \cite[eq. 6]{Paris2014}; thus, evaluating the IMGF has the same complexity as evaluating the CDF. \vspace{2mm} \begin{table*}[h] \renewcommand{\arraystretch}{3 \centering \caption{Lower IMGFs for the $\kappa$-$\mu$ shadowed fading model and particular cases included therein. Upper IMGFs can be obtained using the MGFs given in \cite{Abdi2003,Ermolova2008,Paris2014} and restated in the table, and then using (\ref{obvious}).} \label{table01} \begin{tabular}{|c|c|} \hline\hline Fading model & IMGF $\M_{\gamma}^{l}(s,z)$ and MGF $\M_{\gamma}(s)$ \\ \hline\hline $\kappa$-$\mu$ shadowed & $ \M_{\gamma}^{l}(s,z) = \frac{{\mu ^{\mu-1} m^m \left( {1 + \kappa } \right)^\mu }} {{\Gamma(\mu)\bar \gamma ^\mu \left( {\mu \kappa + m} \right)^m }}z^\mu \times \Phi _2 \left( {\mu - m,m;1 + \mu ;\left( {s - \tfrac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}} \right)z,\left( {s - \tfrac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}\tfrac{m} {{\mu \kappa + m}}} \right)z} \right)$ \\ & $ \M_{\gamma}(s) = \frac{( - \mu)^\mu{ m^m \left( {1 + \kappa } \right)^\mu }} {{\bar \gamma ^\mu \left( {\mu \kappa + m} \right)^m }}\frac{{\left( {s - \frac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}} \right)^{m - \mu } }} {{\left( {s - \frac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}\frac{m} {{\mu \kappa + m}}} \right)^m }}$ \\ \hline Rician shadowed & $ \M_{\gamma}^{l}(s,z) = \frac{ m^m \left( {1 + K } \right) }{{\bar \gamma \left( {K + m} \right)^m }} z \times \Phi _2 \left( {1 - m,m;2 ;\left( {s - \tfrac{{ \left( {1 + K } \right)}} {{\bar \gamma }}} \right)z,\left( {s - \tfrac{{ \left( {1 + K } \right)}} {{\bar \gamma }}\tfrac{m} {{K + m}}} \right)z} \right)$ \\ & $ \M_{\gamma}(s) = - \frac{{ m^m \left( {1 + K } \right) }} {{\bar \gamma \left( { K + m} \right)^m }}\frac{{\left( {s - \frac{{ \left( {1 + K } \right)}} {{\bar \gamma }}} \right)^{m - 1 } }} {{\left( {s - \frac{{ \left( {1 + K } \right)}} {{\bar \gamma }}\frac{m} {{ K + m}}} \right)^m }}$ \\ \hline $\kappa$-$\mu$ & $\M_{\gamma}^{l}(s,z) = \frac{{{\mu ^\mu }{{\left( {1 + \kappa } \right)}^\mu }}}{{{{\left( {\mu \left( {1 + \kappa } \right) - \bar \gamma s} \right)}^\mu }}}\exp \left( {\frac{{\mu \kappa \bar \gamma s}}{{\mu \left( {1 + \kappa } \right) - \bar \gamma s}}} \right) \times \left[ {{\rm{1 - }}{Q_\mu }\left( {\sqrt {2\mu \kappa \frac{{\mu \left( {1 + \kappa } \right)}}{{\mu \left( {1 + \kappa } \right) - \bar \gamma s}}} ,\sqrt {2\left( {\frac{{\mu \left( {1 + \kappa } \right)}}{{\bar \gamma }} - s} \right)z} } \right)} \right]$ \\ & $ \M_{\gamma}(s) = \frac{{\mu ^\mu \left( {1 + \kappa } \right)^\mu }} {{\left( {\mu \left( {1 + \kappa } \right) - \bar \gamma s} \right)^\mu }}\exp \left( {\frac{{\mu \kappa \bar \gamma s}} {{\mu \left( {1 + \kappa } \right) - \bar \gamma s}}} \right)$ \\ \hline $\eta$-$\mu$ & $ \M_{\gamma}^{l}(s,z) = \frac{\mu ^{2\mu-1} } {2{\Gamma(2\mu)\bar \gamma ^{2\mu}}} \left(\frac{\left( {1 + \eta } \right)^2}{ \eta} \right)^{\mu} z^{2\mu} \times \Phi _2 \left( \mu,\mu;2\mu+1 ;\left( {s - \tfrac{{\mu \left( {1 + \eta } \right)}} {\eta{\bar \gamma }}} \right)z,\left( {s - \tfrac{{\mu \left( {1 + \eta } \right)}} {{\bar \gamma }}}\right) z\right)$ \\ & $ \M_{\gamma}(s) = \left(\frac{\mu^2\left(2+\eta^{-1}+\eta\right)}{\left[(1+\eta)\mu-\bar\gamma s\right]\left[(1+\eta^{-1})\mu-\bar\gamma s\right]}\right)^{\mu}$ \\ \hline \end{tabular} \end{table*} \begin{corollary} \label{corolary2a} Let $\gamma$ be a Rician shadowed random variable with $E\left\{\gamma\right\}=\bar\gamma$, and non-negative real shape parameters $K$ and $m$, i.e, ${\gamma\sim \mathcal{S}_{Km}(\gamma;K,m)}$ \cite{Abdi2003}. Then, its lower IMGF is given in the second entry of Table \ref{table01}. \end{corollary} \begin{proof} Specializing the results for the $\kappa$-$\mu$ shadowed distribution for $\mu=1$, the IMGF for the Rician-shadowed case is obtained with $K=\kappa$. \end{proof} \vspace{2mm} Again, the IMGF of the Rician Shadowed distribution has the same functional form as its CDF \cite{Paris2010}. We must note that for the case of $m\in\mathbb{Z}$, we have that $\Phi_2(1-m,m;2;\cdot,\cdot)$ function reduces to a finite sum of Laguerre polynomials \cite[eq. 4]{Paris2010}; similarly, for $m$ being a positive half integer, then $\Phi_2(1-m,m;2;\cdot,\cdot)$ function reduces to a finite sum of Kummer hypergeometric functions, modified Bessel functions and Marcum-$Q$ functions \cite[eq. 7]{Paris2010}. \vspace{2mm} \begin{corollary} \label{corolary2} Let $\gamma$ be a $\kappa$-$\mu$ random variable with ${E\left\{\gamma\right\}=\bar\gamma}$ and non-negative real shape parameters $\kappa$ and $\mu$, i.e, ${\gamma\sim \mathcal{S}_{\kappa\mu}(\gamma;\kappa,\mu)}$ \cite{Yacoub07}. Then, its lower IMGF is given in the third entry of Table \ref{table01}, where $Q_{\mu}$ is the generalized Marcum $Q$ function of $\mu$-th order \cite{AlouiniBook}. \end{corollary} \begin{proof} Using the MGF of a $\kappa$-$\mu$ distributed RV $\gamma$ in \cite{Ermolova2008}, and according to Lemma \ref{lema1}, the lower IMGF can be expressed as \begin{align} \label{eq_corolary2_proof1} &{\M}_{\gamma}^l \left( {s,z} \right) = \L^{-1}\left\{\tfrac{1}{p}\M_{\gamma}(s-p);p,z\right\}\nonumber\\&={\L^{ - 1}}\left\{ {\tfrac{1}{p}\tfrac{{{\mu ^\mu }{{\left( {1 + \kappa } \right)}^\mu }}}{{{{\left( {\mu \left( {1 + \kappa } \right) - \bar \gamma s + \bar \gamma p} \right)}^\mu }}}\exp \left( {\tfrac{{\mu \kappa \bar \gamma s - \mu \kappa \bar \gamma p}}{{\mu \left( {1 + \kappa } \right) - \bar \gamma s + \bar \gamma p}}} \right);p,z} \right\}, \end{align} After some algebra, the terms in (\ref{eq_corolary2_proof1}) can be conveniently rearranged so the inverse Laplace transform has the following form: \begin{align} \label{eq_corolary2_proof2} \begin{array}{l} {\M}_{\gamma}^l \left( {s,z} \right) = \exp \left( { - \mu \kappa } \right){\left( {\frac{{\mu \left( {1 + \kappa } \right)}}{{\bar \gamma }}} \right)^\mu }\exp \left( {\left( {s - \frac{{\mu \left( {1 + \kappa } \right)}}{{\bar \gamma }}} \right)z} \right) \times \\ {\L^{ - 1}}\left\{ {\frac{1}{{{p^{\mu + 1}}}}\frac{1}{{1 - \left( {\frac{{\mu \left( {1 + \kappa } \right)}}{{\bar \gamma }} - s} \right)/p}}\exp \left( {\frac{1}{p}{{\frac{{{\mu ^2}\kappa \left( {1 + \kappa } \right)}}{{\bar \gamma }}}}} \right);p,z} \right\}, \end{array} \end{align} This inverse Laplace transform can be calculated in terms of the bivariate confluent hypergeometric function $\Phi_3(\cdot)$ defined in \cite[eq. 9.261.3]{Gradstein2007} by using the transform pair in \cite[4.24.9]{Erdelyi1954}. This yields \begin{align} \label{eqPepe} \begin{array}{l} {\M}_{\gamma}^l \left( {s,z} \right) = \frac{\mu^{\mu}(1+\kappa)^{\mu}z^{\mu}}{\Gamma(\mu+1)\bar\gamma^{\mu}\exp{(\kappa\mu)}} \exp \left( {\left( {s - \frac{{\mu \left( {1 + \kappa } \right)}}{{\bar \gamma }}} \right)z} \right) \\ \times {\Phi _3}\left( {1,\mu + 1;\left( {\frac{{\mu \left( {1 + \kappa } \right)}}{{\bar \gamma }} - s} \right)z,\frac{{{\mu ^2}\kappa \left( {1 + \kappa } \right)}}{{\bar \gamma }}z} \right), \end{array} \end{align} Finally, we make use of the existing connection between the $\Phi_3(1,\mu+1;a;b)$ function and the generalized Marcum $Q$-function, which holds for $\mu\in\mathbb{R}$. Adapting \cite[eq. 34]{Morales2014} to the specific case here addressed, we have \begin{align} \frac{\Phi_3\left(1,\mu+1;a,b\right)}{\Gamma(\mu+1)}=\exp\left(a+\tfrac{b}{a}\right)a^{-\mu}\left[1-Q_{\mu}\left(\sqrt{2\tfrac{b}{a}},\sqrt{2a}\right)\right]. \end{align} Combining this equation with (\ref{eqPepe}) yields the final expression given in the third entry of \mbox{Table \ref{table01}}. This completes the proof. \end{proof} \vspace{2mm} Note that the IMGF is given in terms of the well-known Marcum $Q$-function, just like the CDF of the $\kappa$-$\mu$ distribution originally derived by Yacoub \cite{Yacoub07}. \vspace{2mm} \begin{corollary} \label{corolary3} Let $\gamma$ be a $\eta$-$\mu$ random variable with ${E\left\{\gamma\right\}=\bar\gamma}$ and non-negative real shape parameters $\eta$ and $\mu$, i.e, ${\gamma\sim \mathcal{S}_{\eta\mu}(\gamma;\eta,\mu)}$ \cite{Yacoub07}. Then, its lower IMGF is given in the fourth entry of Table \ref{table01}. \end{corollary} \begin{proof} Leveraging the recent connection between the $\kappa$-$\mu$ shadowed distribution and the $\eta$-$\mu$ distribution \cite{Laureano2015}, the IMGF of the $\eta$-$\mu$ power envelope in format 1 is obtained\footnote{According to the original definition in \cite{Yacoub07}, this format implies that $\eta\in[0,\infty)$} by setting the parameters of the $\kappa$-$\underline\mu$ shadowed distribution to $\underline \mu = 2\mu$, $\kappa=\frac{1-\eta}{2\eta}$ and $m=\mu$. \end{proof} \vspace{2mm} This expression is coincident with the one obtained in \cite{Morales2014}, and also has the same complexity as the original CDF for the $\eta$-$\mu$ distribution derived in \cite{Morales2010} \vspace{2mm} \section{Application to Physical Layer Security} \label{analysis} \subsection{Single-antenna scenario} Aided by the previous mathematical results, we will now show how the IMGF can be used to directly analyze the performance in wireless scenarios. Specifically, we aim to determine the physical layer security of a wireless link between two legitimate peers (Alice and Bob) in the presence of an external eavesdropper (Eve) \cite{Barros2006,Bloch2008}. We first consider that Bob, Eve and Alice are equipped with single-antenna devices; the inclusion of multiple antennas at Bob or Eve will be later discussed in this section. Depending on the characteristics of the propagation environment, random fluctuations affecting the desired and wiretap links need to be modeled with a specific distribution. The performance in this scenario can be characterized by the secrecy capacity $C_S$, defined as \begin{equation} \label{sec01} C_S\triangleq C_b-C_e = \log_2\left({\frac{1+\gamma_b}{1+\gamma_e}}\right)>0, \end{equation} where $\gamma_b$ and $\gamma_e$ are the instantaneous SNRs at Bob and Eve, respectively, and $C_b$ and $C_e$ denote the capacities of the communication links between Alice and Bob, and between Alice and Eve, respectively. In many cases, Eve's channel state information (CSI) is not available at Alice and hence {information-theoretic security cannot be guaranteed}. This may be the case on which Eve is a passive eavesdropper, and hence Alice has no way to have access to Eve's CSI. Conversely, perfect knowledge of Bob's CSI by Alice can be assumed. Thus, Alice selects a constant secrecy rate $R_S$ for transmission; in this situation, the outage probability of the secrecy capacity (OPSC) gives the probability that communication at a certain secrecy rate ${R_S > 0}$ cannot be securely attained. This metric is computed as follows \begin{align} \label{eq_analysis_1} \mathcal{P}_{R_S}\triangleq\Pr \left\{ {C_S \leqslant R_S } \right\}&=\Pr\left\{ {\gamma_b \leqslant \left(2^{R_S}-1\right)\left(\frac{2^{R_S}}{2^{R_S}-1}\gamma_e+1\right) } \right\}\\ &= 1 - \Pr \left\{ {C_S > R_S } \right\}. \end{align} The probability of strictly positive secrecy capacity can be obtained as a particular case of (\ref{eq_analysis_1}) by setting ${R_S=0}$. Finally, another secrecy performance metric of interest is the $\epsilon$-outage secrecy capacity $C_{\epsilon}$. This is defined as the largest secrecy rate $R_S$ for which the OPSC satisfies ($\mathcal{P}_{R_S}{\leq\epsilon}$), with $0\leq\epsilon\leq 1$. For a certain $\epsilon$, this metric is computed as \begin{equation} C_{\epsilon}\triangleq \underset{R_S:\mathcal{P}_{R_S}\leq\epsilon}{\sup} \left\{R_S\right\}, \end{equation} {We will first assume that the fading experienced by the eavesdropper can be modeled by the $\kappa$-$\mu$ shadowed distribution, i.e. ${\gamma_e\sim \mathcal{S}_{\kappa\mu m}(\gamma_e;\kappa,\mu,m)}$. This distribution \cite{Paris2014} is well suited to model both line-of sight (LOS) and non-LOS (NLOS) scenarios, and also includes most popular fading distributions in the literature as special cases. We will also consider that the fading severity parameters $\mu$ and $m$ take integer values\footnote{This can be justified as follows: the parameter $\mu$ in the $\kappa$-$\mu$ distribution introduced by Yacoub \cite{Yacoub07} was defined as the number of clusters of multipath waves propagating in a certain environment; thus, according to this definition the consideration of integer $\mu$ is related to the physical model for the $\kappa$-$\mu$ distribution. Equivalently, the restriction of $m$ to take integer values does not have a major impact unless the LOS component is affected by heavy shadowing (i.e. very low values of $m$). In practice, this restriction has a negligible effect, and specially when the $\kappa$-$\mu$ shadowed distribution is used to approximate the $\kappa$-$\mu$ distribution in a more tractable form \cite{Lopez2016}.}, which allows for a simpler mathematical tractability. With this only restriction, and for \textit{any arbitrary} fading distribution at the legitimate link between Alice and Bob, the OPSC can be computed using the following Lemma: \vspace{3mm} \begin{lemma} \label{lema3} Let us consider the communication between two legitimate peers A and B in the presence of an external eavesdropper E. Let $\gamma_b$ and $\gamma_e$ be the instantaneous SNRs at B and E, respectively, and $\bar\gamma_b$ and $\bar\gamma_e$ the average SNRs at B and E, respectively. If ${\gamma_e\sim \mathcal{S}_{\kappa\mu m}(\gamma_e;\kappa_e,\mu_e,m_e)}$ with $\{\mu,m\}\in\mathbb{Z}^+$, then for any finite rate $R_S\geq0$ the OPSC can be expressed in terms of the IMGF of $\gamma_b$ as \begin{align} \label{eqProb} \mathcal{P}_{R_S}&=\sum_{i=0}^{M}C_i e^{\alpha\beta_i}\sum_{r=0}^{m_i-1}\sum_{k=0}^{r} \tfrac{(-\alpha\beta_i)^{r}}{k!(r-k)!} \tfrac{\partial^k \M_{\gamma_b}^{u}\left( s,z\right)}{\partial s^k}\bigg{|}_{\stackrel{s=-\beta_i}{z=\alpha}}+\M_{\gamma_b}^{l}(0,2^{R_S}-1)\nonumber\\ &=\sum_{i=0}^{M}C_i e^{\alpha\beta_i}\sum_{r=0}^{m_i-1}\sum_{k=0}^{r} \tfrac{(-\alpha\beta_i)^{r}}{k!(r-k)!} \tfrac{\partial^k \M_{\gamma_b}^{u}\left( s,z\right)}{\partial s^k}\bigg{|}_{\stackrel{s=-\beta_i}{z=\alpha}}+F_{\gamma_b}\left(\alpha\right). \end{align} where $F_{\gamma_b}(\cdot)$ is the CDF of $\gamma_b$, $\alpha=2^{R_S}-1$, $\beta_i=1/(2^{R_S}\Omega_i)$, and the parameters $M$, $m_i$, $\Omega_i$ and $C_i$ are related to $\kappa$, $\mu$, $m$ and $\bar\gamma_e$ as described in Table \ref{table02} in Appendix \ref{app2}. \end{lemma} \vspace{3mm} \begin{proof} See Appendix \ref{app1}. \end{proof} \vspace{3mm} Expression (\ref{eqfinal01}) yields the OPSC in any scenario on which the eavesdropper's fading channel can be modeled with the $\kappa$-$\mu$ shadowed distribution, for \textit{any arbitrary} choice of the fading distribution for the legitimate channel. Thence, we can use the results in Table \ref{table01} combined with (\ref{obvious}) to derive analytical expressions for the secrecy performance in those scenarios on which the fading at the desired link can be modeled by the general $\kappa$-$\mu$ shadowed distribution, or any of the particular cases included therein. Note that there is no need to restrict the parameters $\mu$ and $m$ of the legitimate channel to take integer values, as the IMGF derived in Table \ref{table01} holds for any $\{\mu,m\}\in\mathbb{R}$. In some scenarios, Eve may only have access to signals arriving from NLOS paths \cite{Maleki2014,Classen2015}. Under this premise, we can assume that the eavesdropper link can be modeled by the Rayleigh distribution. This leads $\gamma_e$ to be exponentially distributed with average SNR $\bar\gamma_e$, i.e. $\gamma_e\sim\text{Exp}{(\bar\gamma_e)}$. Thus, the following corollary arises as a special case of Lemma 2. \vspace{3mm} \begin{corollary} \label{coroR1} Let us consider the communication between two legitimate peers A and B in the presence of an external eavesdropper E. Let $\gamma_b$ and $\gamma_e$ be the instantaneous SNRs at B and E, respectively, and $\bar\gamma_b$ and $\bar\gamma_e$ the average SNRs at B and E, respectively. If ${\gamma_e\sim\text{Exp}{(\bar\gamma_e)}}$, then for any finite rate $R_S\geq0$ the OPSC can be expressed in terms of the IMGF of $\gamma_b$ as \begin{align} \label{eqProb2} \mathcal{P}_{R_S}=&\M_{\gamma_b}^{l}(0,2^{R_S}-1)+e^{\frac{2^{R_S}-1}{2^{R_S}\bar\gamma_e}}\M_{\gamma_b}^{u}\left(-\frac{1}{2^{R_S}\bar\gamma_e},2^{R_S}-1\right)\nonumber\\ =&F_{\gamma_b}\left(2^{R_S}-1\right)+e^{\frac{2^{R_S}-1}{2^{R_S}\bar\gamma_e}}\M_{\gamma_b}^{u}\left(-\frac{1}{2^{R_S}\bar\gamma_e},2^{R_S}-1\right), \end{align} where $F_{\gamma_b}(\cdot)$ is the CDF of $\gamma_b$. \end{corollary} \vspace{3mm} \begin{proof} Following the same derivation in Appendix \ref{app1} and setting $\kappa=0$ and $\mu=1$ yields the desired result. \end{proof} \vspace{3mm} Note that these results provide a systematic way to derive the OPSC for any arbitrary fading distribution in the legitimate link, provided that the IMGF of the SNR at Bob is known. We must also note the OPSC for $\bar\gamma_b\gg\bar\gamma_e$ does not depend on the distribution of $\gamma_e$, but only on the distribution of $\gamma_b$ and the average SNR at Eve $\bar\gamma_e$ \cite{Romero2014}. Thus, the consideration of Rayleigh fading for the eavesdropper link as performed in Corollary 5 has a negligible effect in practice, while simplifying the analysis. If now assuming Rayleigh fading also for the legitimate channel, the OPSC expression in (\ref{eqProb2}) reduces to the one originally calculated in \cite{Barros2006}. This can be checked by setting $\kappa=0$ and $\mu=1$ in the IMGF of the $\kappa$-$\mu$ distribution in the third entry of Table \ref{table01}. Using the equivalence $Q_1(0,\sqrt{2x})=e^{-x}$ given in \cite[eq. 4.45]{AlouiniBook}, and after some manipulations we obtain \begin{align} \label{eqBarros} \mathcal{P}_{R_S}=1-e^{-\frac{2^{R_S}-1}{\bar\gamma_b}}\frac{\bar\gamma_b}{\bar\gamma_b+2^{R_S}\bar\gamma_e}. \end{align} } \subsection{Extension to the multi-antenna scenario} \label{app2} In the previous analysis, we have explicitly assumed that all the agents in the system are equipped with single-antenna devices. We here show that the extension for the case on which Eve and Bob are multi-antenna devices can be straightforwardly carried out. First, note that in the derivation carried out in Appendix \ref{app1} in order to prove Lemma 2, there is neither any restriction related to the number of antennas used by Bob, nor related to the combining strategy carried out. Hence, Lemma 2 can be applied as is for a multi-antenna configuration at Bob. In this case, the only requirement to derive the OPSC is to determine the IMGF of the SNR after combining. For instance, if maximal ratio combining (MRC) is used by Bob we have that $\gamma_b=\sum_{i=1}^{N_B}{\gamma_b}_i$ and \begin{align} \M_{\gamma_b}^{u}\left(s,z\right)=\prod_{i=1}^{N_B}\M_{{\gamma_b}_i}^{u}\left(s_i,z_i\right), \end{align} where $N_B$ is the number of receive antennas at Bob, ${{\gamma_b}_i}$ denote the per-branch instantaneous SNRs, and independence between receive branches has been considered. When assuming multiple antennas at Eve with i.i.d. branches under {$\kappa$-$\mu$ shadowed fading, the extension is also straightforward when considering that Eve performs MRC reception in order to maximize the receive SNR; since the sum of $N_E$ i.i.d. $\kappa$-$\mu$ shadowed random variables is also $\kappa$-$\mu$ shadowed-distributed with $\mu_{eq}=N_E\cdot{\mu}$, $m_{eq}=N_E\cdot{m}$ and $\gamma_e=N_E\cdot{\gamma_e}$, the OPSC in the multiantenna scenario can be expressed as in Lemma 2.} { \section{Other Applications} \label{analysis2} \subsection{Outage probability analysis with interference and background noise} The performance characterization of wireless communication systems in the presence of interference is a very important problem in communication theory, ever since the advent of digital cellular systems, whose performance is known to be limited by the interference received from nearby cells. Let us denote as $\gamma_d$ the instantaneous SNR at the intended receiver, and let us denote as $\gamma_i$ the aggregate instantaneous interference-to-noise ratio corresponding to the set of interfering signals affecting the receiver. The outage probability in this scenario, defined as the probability that the signal-to-noise plus interference ratio is below a given threshold $\gamma_{\text{th}}$, can be calculated as \begin{align} \label{OPNI} \text{OP}_{\text{NI}}=\Pr\left\{ \gamma_d \leqslant \gamma_{\text{th}}\left(\gamma_i+1\right) \right\}, \end{align} As pointed out in \cite{Gomez2015}, expressions (\ref{OPNI}) and (\ref{eq_analysis_1}) are formally equivalent, up to some scaling of the random variables and setting $\gamma_{\text{th}}=2^{R_S}-1$. This means that both $\text{OP}_{\text{NI}}$ and $\mathcal{P}_{R_S}$ will have the same functional form for the same choice of distributions. The derivation of the outage probability of communication systems in the presence of interference and background noise in a $\kappa$-$\mu$ shadowed/$\kappa$-$\mu$ shadowed scenario, which is an open problem in the literature, is directly obtained by using the IMGF given in the first entry of Table I, under the same conditions assumed in Section \ref{analysis}. Recent results in the literature arise as special cases \cite{Ermolova2014}. \subsection{Channel capacity with side information at the transmitter and the receiver} Let us now consider the scenario on which a transmitter, subject to an average transmit power constraint, communicates with a receiver through a fading channel. Assuming perfect channel knowledge at both the transmitter and receiver sides, the transmitter can optimally adapt its power and rate. The Shannon capacity in this scenario is known to be given by the following expression \cite{Goldsmith1997}, \begin{equation} \label{cap} C= \int_{0}^{\infty}\log\left(\frac{\gamma}{\gamma_0}\right)f_{\gamma}(\gamma)d\gamma, \end{equation} where a normalized bandwidth $B=1$ was assumed for simplicity. In (\ref{cap}), $\gamma$ is the instantaneous SNR and $\gamma_0$ is a cut-off SNR determined by the average power constraint. An alternative expression for this capacity was proposed in \cite{DiRenzo2010} in terms of the $E_i$-transform, which makes use of the exponential integral function $E_i(\cdot)$ as integration kernel, yielding \begin{equation} \label{cap2} C= \frac{1}{\log(2)} \int_{0}^{\infty}E_i(-x)\exp(x)\Psi(x,\gamma_0)dx, \end{equation} where the ancillary function $\Psi(x,\gamma_0)$ is defined as \begin{equation} \label{cap3} \Psi(x,\gamma_0)\triangleq M_{\gamma}^{u}\left(\frac{x}{\gamma_0},x\right) + \frac{1}{\gamma_0} \frac{\partial \M_{\gamma}^{u}\left( s,z\right)}{\partial s}\bigg{|}_{\stackrel{s=\frac{x}{\gamma_0}}{z=x}}. \end{equation} Thus, equation (\ref{cap2}) provides an alternative way of computing the capacity in this scenario for an arbitrary distribution of the SNR, in terms of the IMGF and its first derivative. Using the expressions for the IMGF derived in Table I, capacity results are obtained for the $\kappa$-$\mu$ shadowed fading channels, and all the special cases included therein. These results are also new in the literature. \subsection{Average bit-error rate with adaptive modulation} Adaptive modulation makes use of channel knowledge at the transmitter side in order to optimally design system parameters such as constellation size, transmit power, coding rates and schemes, and many others \cite{Gold05}. One extended alternative is the design of the constellation size and power in order to maximize the average throughput, for a certain instantaneous bit-error rate (BER) constraint. In this scenario, the average BER $\bar P_b$ of adaptive modulation with $M$-QAM is well approximated using \cite[eq. 9.7]{Gold05} and \mbox{\cite[eq. 9.72]{Gold05}}, as \begin{equation} \label{ABER} \bar P_b \approx \frac{{\sum\limits_{j = 1}^{N - 1} {k_j \int_{\gamma _{j - 1} }^{\gamma _j } {0.2\exp \left( { - 1.5\frac{{\gamma }} {{2^{k_j } - 1}}} \right)f_{\gamma}\left( \gamma \right)d\gamma } } }} {{\sum\limits_{j = 1}^{N - 1} {k_j \int_{\gamma _{j - 1} }^{\gamma _j } {f_{\gamma}\left( \gamma \right)d\gamma } } }}, \end{equation} where $\gamma$ represents the instantaneous SNR, $\bar\gamma$ is the average SNR, $N$ is the number of fading regions, $\{\gamma_j\}$ are the SNR switching thresholds and $k_j$ is the number of bits per complex symbol employed when $\gamma_{j-1}\leq\gamma<\gamma_j$. Note that the denominator in (\ref{ABER}) represents the exact average spectral efficiency and, for convenience, $\gamma_{N-1}\triangleq \infty$. Using the IMGF of $\gamma$, the following closed-form expression is obtained as \begin{align} \label{ABER2} \bar P_b &\approx \frac{{0.2\sum\limits_{j = 1}^{N - 1} {k_j \left\{ {\M_{\gamma}^{l}(- \frac{{1.5}} {{2^{k_j } - 1}},\gamma _{j - 1}) - \M_{\gamma}^{l}(- \frac{{1.5}} {{2^{k_j } - 1}},\gamma _{j})} \right\}} }} {{\sum\limits_{j = 1}^{N - 1} {k_j \left\{ {\M_{\gamma}^{l}(0,\gamma _{j - 1}) - \M_{\gamma}^{l}(0,\gamma _{j})} \right\}} }}\nonumber\\ &\approx \frac{{0.2\sum\limits_{j = 1}^{N - 1} {k_j \left\{ {\M_{\gamma}^{l}(- \frac{{1.5}} {{2^{k_j } - 1}},\gamma _{j - 1}) - \M_{\gamma}^{l}(- \frac{{1.5}} {{2^{k_j } - 1}},\gamma _{j})} \right\}} }} {{\sum\limits_{j = 1}^{N - 1} {k_j \left\{ {F_{\gamma}(\gamma _{j - 1}) - F_{\gamma}(\gamma _{j})} \right\}} }}. \end{align} Therefore, the average BER in this scenario for \textit{any} fading distribution can be easily obtained by evaluating a finite number of terms involving the IMGF. More specifically, closed-form results new in the literature can be obtained for the case of the $\kappa$-$\mu$ shadowed fading distribution and special cases. } \section{Numerical Results} \label{numerical} {In this section we provide numerical results for some of the practical scenarios previously analyzed. Specifically, we focus on} the outage probability of the secrecy capacity studied in Section \ref{analysis} under different fading scenarios. We assume that Bob and Eve are only equipped with one antenna, {and for the eavesdropper's channel we set $\kappa=0$ and $\mu=1$}. The effect of system parameters on the $\epsilon$-outage secrecy capacity is also investigated. All the results shown here have been analytically obtained by the direct evaluation of the expressions developed in this paper: Additionally, Monte Carlo simulations have been performed to validate the derived expressions, and are also presented in all figures, showing an excellent agreement with the analytical results. Details on how to compute the confluent bivariate function $\Phi_2$ are given in \cite[App. E]{Paris2014}. In Figs. \ref{fig1}-\ref{fig5}, the OPSC is represented considering different fading models as a function of the average SNR at Bob $\bar\gamma_b$, for different sets of values of the fading parameters. We assume in these figures that the normalized rate threshold value used to declare an outage is $R_S = 0.1$, and an average SNR at Eve $\bar\gamma_e$ = 15 dB. Figs. \ref{fig1} and \ref{fig2}, show results for the $\kappa$-$\mu$ shadowed fading considering, respectively, small ($\kappa=1.5$) and large ($\kappa=10$) LOS components in the received wave clusters for different values of the $\mu$ parameter and also considering light ($m=12$) or heavy ($m=0.5$) shadowing for the LOS components. As expected, as the fading parameter $\mu$ increases, the diversity gain increases too, resulting in a higher slope of the curves in the high SNR regime, and with diminishing returns as $\mu$ increases. Note that $\mu$ represents the number of received wave clusters when it takes an integer value. It can also be observed that the performance is always better when the LOS components are lightly shadowed, and this improvement is much more noticeable for large LOS components. \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./outage_kmuSha1.eps} \caption{Outage probability of secrecy capacity under $\kappa$-$\mu$ shadowed fading as a function of $\bar\gamma_b$, for different values of $m$ and $\mu$. Parameter values: $\kappa=1.5$, $\bar\gamma_e=15$ dB and $R_S=0.1$.} \label{fig1} \end{figure} \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./outage_kmuSha2.eps} \caption{Outage probability of secrecy capacity under $\kappa$-$\mu$ shadowed fading as a function of $\bar\gamma_b$, for different values of $m$ and $\mu$. Parameter values: $\kappa=10$, $\bar\gamma_e=15$ dB and $R_S=0.1$.} \label{fig2} \end{figure} The impact of shadowed LOS components on performance can be observed in Fig. \ref{fig3}, where the outage probability of the secrecy capacity under Rician shadowed fading is presented for different values of the $m$ and $K$ parameters. It can be observed that it is more beneficial for the performance to have small LOS components ($K=1.5$) if they are affected by heavy shadowing. Conversely, if the shadowing is mild, large LOS components always yield a lower outage probability. This appreciation can be confirmed by observing the results in Fig. \ref{fig4}, which depicts the outage probability under $\kappa$-$\mu$ fading, i.e., when the LOS components do not experience any shadowing. \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./outage_RicianSha.eps} \caption{Outage probability of secrecy capacity under Rician shadowed fading as a function of $\bar\gamma_b$, for different values of $K$ and $m$. Parameter values: $\bar\gamma_e=15$ dB and $R_S=0.1$.} \label{fig3} \end{figure} \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./outage_kmu.eps} \caption{Outage probability of secrecy capacity under $\kappa$-$\mu$ fading as a function of $\bar\gamma_b$, for different values of $\kappa$ and $\mu$. Parameter values: $\bar\gamma_e=15$ dB and $R_S=0.1$.} \label{fig4} \end{figure} Fig. \ref{fig5} presents results for the $\eta$-$\mu$ fading, i.e.. in a NLOS scenario on which the in-phase and quadrature components of the scattered waves are not necessarily equally distributed. We consider format 1 of this distribution, for which $\eta$ represents the scattered-wave power ratio between the in-phase and quadrature components of each cluster of multipath, and the number of multipath clusters, when $\mu$ is a semi-integer, is represented by $2\mu$ . It can be observed that, when the in-phase and quadrature components are highly imbalanced ($\eta=0.04$), the performance is poorer. On the other hand, increasing the number of multipath clusters have always a beneficial impact on performance, as the instantaneous received signal power is smoothed. \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./outage_etamu.eps} \caption{Outage probability of secrecy capacity under $\eta$-$\mu$ fading as a function of $\bar\gamma_b$, for different values of $\eta$ and $\mu$. Parameter values: $\bar\gamma_e=15$ dB and $R_S=0.1$.} \label{fig5} \end{figure} Fig. \ref{fig6} shows the normalized $\epsilon$-outage secrecy capacity $C_{\epsilon}$ under $\kappa$-$\mu$ shadowed fading as a function of $\bar\gamma_b$, where the capacity normalization has been computed with respect to the capacity of an AWGN channel with SNR equal to $\bar\gamma_b$. We have assumed $m=2$ and an average SNR at Eve of $\bar\gamma_e=-10$ dB. The corresponding results for $\eta$-$\mu$ fading are presented in Fig. \ref{fig7}, also for $\bar\gamma_e=-10$ dB. In both figures it can be observed that when the outage probability is set to a high value ($\epsilon=0.8$), better channel conditions (i.e. $\mu=6$, $\kappa=10$ for $\kappa$-$\mu$ shadowed fading and $\mu=4$, $\eta=0.9$ for $\eta$-$\mu$ fading) yield a lower $\epsilon$-outage capacity. Conversely, better channel conditions results in a higher capacity for lower values of $\epsilon$. Further insight can be obtained from Fig. \ref{fig8}, where it is shown the normalized $\epsilon$-outage secrecy capacity $C_{\epsilon}$ under $\kappa$-$\mu$ fading as a function of the outage probability $\epsilon$ and for different average SNRs at Eve, assuming an average SNR of 10 dB at the desired link. We observe that higher outage probability $\epsilon$ leads to higher $C_{\epsilon}$, having an important influence the average SNR of the eavesdropper's channel. It can also be observed that, as the channel conditions improve, the normalized $\epsilon$-outage secrecy capacity tends to one for all values of the outage probability for low values of $\bar\gamma_e$. \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./epsi_cap_kmuSha.eps} \caption{Normalized $\epsilon$-outage secrecy capacity $C_{\epsilon}$ under $\kappa$-$\mu$ shadowed fading as a function of $\bar\gamma_b$. Parameter values; $m=2$, $\bar\gamma_e=-10$ dB.} \label{fig6} \end{figure} \begin{figure}[t] \includegraphics[width=.99\columnwidth]{./epsi_cap_etamu.eps} \caption{Normalized $\epsilon$-outage secrecy capacity $C_{\epsilon}$ under $\eta$-$\mu$ fading as a function of $\bar\gamma_b$. Parameter value $\bar\gamma_e=-10$ dB.} \label{fig7} \end{figure} \begin{figure}[ht] \includegraphics[width=\columnwidth]{./epsi_cap_kmu.eps} \caption{Normalized $\epsilon$-outage secrecy capacity $C_{\epsilon}$ under $\kappa$-$\mu$ fading as a function of $\epsilon$. Parameter value $\gamma_b=10$ dB.} \label{fig8} \end{figure} Note that wireless communication over fading channels does not require necessarily the average SNR of the channel between Alice and Bob to be greater than the average SNR of the channel between Alice and Eve, since there is certain probability that the instantaneous SNR of the main channel being higher than the instantaneous SNR of the eavesdropper's channel ($\gamma_b>\gamma_e$) even when $\bar\gamma_b<\bar\gamma_e$. In fact, there is a trade off between the outage probability of the secrecy capacity ${ \Pr \left\{C_S\leq R_S\right\}}$ and the $\epsilon$-outage secrecy capacity $C_{\epsilon}$, where a higher $C_{\epsilon}$ corresponds to a higher outage probability $\epsilon$, and viceversa. For that reason, results in Figs. \ref{fig6}, \ref{fig7} and \ref{fig8} show that the normalized outage secrecy capacity may have non-zero values even when $\bar\gamma_b \leq \bar\gamma_e$ (for high values of $\epsilon$). \section{Conclusions} \label{conclusions} A fundamental connection between the incomplete MGF of a positive random variable and its complete MGF has been presented. The main takeaway is that the IMGF is expected to have a similar functional form as the CDF, and hence its evaluation should not require any additional complexity. Using this novel connection, closed-form expressions for the IMGF of the $\kappa$-$\mu$ shadowed distribution (and all the special cases included therein) have been derived for the first time in the literature. This has enabled us to introduce a new framework for the analysis of the physical layer security in scenarios on which the desired link is affected by any arbitrary fading distribution, {and the eavesdropper's link undergoes $\kappa$-$\mu$ shadowed fading. We hope that the results in this paper may facilitate the performance evaluation for more practical setups related to physical layer security, such as those using artificial noise transmission or the collaboration of a friendly jammer, and, in general for all the situations and scenarios on which the IMGF makes appearances.} \section*{Acknowledgment} This work has been funded by the Consejer\'ia de Econom\'ia, Innovaci\'on, Ciencia y Empleo of the Junta de Andaluc\'ia, the Spanish Government and the European Fund for Regional Development FEDER (projects P2011-TIC-7109, P2011-TIC-8238, TEC2013-42711-R, TEC2013-44442-P and TEC2014-57901-R). \appendices \section{Proof of Lemma 2} \label{app1} From the definition of OPSC in (\ref{eq_analysis_1}), the probability of achieving a successful secure communication is given by \begin{align} \label{eq:sec30} & \Pr\left\{C_S>R_S\right\}= \Pr \left\{\gamma_e<\frac{1}{2^{R_S}}(1+\gamma_b)-1\right\} . \end{align} Note that $\gamma_e$ only takes non-negative values; hence, for this condition to occur in (\ref{eq:sec30}), then the inequality ${\gamma_b \geq 2^{R_S}-1}$ must be satisfied, i.e. \begin{align} \label{eq:sec31} \Pr \left\{\gamma_e<\frac{1}{2^{R_S}}(1+\gamma_b)-1 | \gamma_b < 2^{R_S}-1\right\} = 0. \end{align} Therefore we can write \begin{align} \label{eq:sec34} \Pr\left\{C_S>R_S\right\}&= \int_{2^{R_S}-1}^\infty f_{\gamma_b}(x) \left(\int_0^{\frac{1}{2^{R_S}}(1+x)-1} f_{\gamma_e}(y) dy\right) dx \nonumber \\&= \int_{2^{R_S}-1}^\infty f_{\gamma_b}(x) F_{\gamma_e}\left(\frac{1}{2^{R_S}}(1+x)-1\right) dx, \end{align} where $F_{X}(\cdot)$ and $f_{X}(\cdot)$ are the CDF and PDF of the random variable $X$, respectively. { Let us first assume that the fading experienced by the eavesdropper's is modeled by th $\kappa$-$\mu$ shadowed distribution \cite{Paris2014}. For integer values of $\mu$ and $m$, the CDF of the $\kappa$-$\mu$ shadowed distribution can be expressed as a mixture of gamma distributions as described in Appendix \ref{app2}, as follows: \begin{equation} \label{eqmulti} F_{\gamma_e}(\gamma_e)=1-\sum_{i=0}^{M}C_i e^{-\frac{\gamma}{\Omega_i}}\sum_{r=0}^{m_i-1}\frac{1}{r!}\left(\frac{\gamma}{\Omega_i}\right)^{r}, \end{equation} Plugging (\ref{eqmulti}) in (\ref{eq:sec34}) yields \begin{align} \label{eqapp2b1} &\Pr\left\{C_S>R_S\right\}= 1- F_{\gamma_b}(2^{R_S}-1) -\sum_{i=0}^{M}C_i \exp{\left(-\frac{1-2^{R_S}}{2^{R_S}\bar \Omega_i}\right)} \nonumber \\& \times \underbrace{\int_{2^{R_S}-1}^\infty f_{\gamma_b}(x) e^{ -\frac{ x}{2^{R_S} \bar \Omega_i}} \sum_{r=0}^{m_i-1} \frac{1}{r!}\left(\frac{1+x-2^{R_S}}{2^{R_S}\Omega_i}\right)^r dx}_{\mathcal{I}}, \end{align} where the parameters $M$, $m_i$, $C_i$ and $\Omega_i$ are defined in Table \ref{table02} in the Appendix \ref{app2} in terms of the parameters $\kappa$, $\mu$, $m$ and $\gamma_e$ of the eavesdropper's fading distribution. Using the binomial expansion, and defining $\alpha=2^{R_S}-1$, $\beta_i=1/(2^{R_S}\Omega_i)$, the integral term $\mathcal{I}$ can be reexpressed as \begin{align} \label{eqapp2b2} \mathcal{I} &=\sum_{r=0}^{m_i-1}\sum_{k=0}^{r} \frac{(-\alpha)^{r-k}}{k!(r-k)!} \beta_i^{r} \int_{\alpha}^\infty x^k f_{\gamma_b}(x) e^{ -\beta_i x} dx,\nonumber\\ &=\sum_{i=0}^{m_i-1}\sum_{k=0}^{r} \frac{\alpha^{r-k}}{k!(r-k)!} \beta_i^{r} \frac{\partial^k \M_{\gamma_b}^{u}\left( s,z\right)}{\partial s^k}\bigg{|}_{\stackrel{s=-\beta_i}{z=\alpha}} \end{align} where the general derivative property in the transform domain was used, in order to identify the $k^{th}$ derivative of the IMGF. Finally, using (\ref{eqapp2b2}) in (\ref{eqapp2b1}) and (\ref{eq_analysis_1}) yields \begin{align} \label{eqfinal01} \mathcal{P}_{R_S}= \sum_{i=0}^{M}C_i e^{\alpha\beta_i}\sum_{r=0}^{m_i-1}\sum_{k=0}^{r} \tfrac{(-\alpha\beta_i)^{r}}{k!(r-k)!} \frac{\partial^k \M_{\gamma_b}^{u}\left( s,z\right)}{\partial s^k}\bigg{|}_{\stackrel{s=-\beta_i}{z=\alpha}}+F_{\gamma_b}\left(\alpha\right). \end{align} This completes the proof. } { \section{CDF of the $\kappa$-$\mu$ shadowed distribution for integer fading parameters} \label{app2} The CDF of the $\kappa$-$\mu$ shadowed fading model was originally given in \cite{Paris2014} as \begin{align} F_{\gamma}(\gamma)=&\frac{{\mu ^{\mu-1} m^m \left( {1 + \kappa } \right)^\mu }} {{\Gamma(\mu)\bar \gamma ^\mu \left( {\mu \kappa + m} \right)^m }}z^\mu \times \nonumber\\ & \Phi _2 \left( {\mu - m,m;1 + \mu ; { - \tfrac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}} \gamma, { - \tfrac{{\mu \left( {1 + \kappa } \right)}} {{\bar \gamma }}\tfrac{m} {{\mu \kappa + m}}} \gamma} \right). \end{align} If the fading parameters $\mu$ and $m$ take integer values, this CDF can be expressed as a finite mixture of squared Nakagami distributions, i.e. as a finite sum of exponentials and powers \cite{Lopez2016}. Manipulating the expressions in \cite{Lopez2016}, we can compactly express the CDF as \begin{equation} F_{\gamma}(\gamma)=1-\sum_{i=0}^{M}C_i e^{-\frac{\gamma}{\Omega_i}}\sum_{r=0}^{m_i-1}\frac{1}{r!}\left(\frac{\gamma}{\Omega_i}\right)^{r}, \end{equation} where the parameters $m_i$, $M$ and $\Omega_i$ are expressed in Table \ref{table02} in terms of the parameters of the $\kappa$-$\mu$ shadowed distribution, namely $\kappa$, $\mu$, $m$ and $\bar\gamma$. } \begin{table*}[h] \renewcommand{\arraystretch}{3 \centering { \caption{Parameter values for the $\kappa$-$\mu$ shadowed distribution with integer $\mu$ and $m$,} \label{table02} \begin{tabular}{|c|c|} \hline\hline Case $\mu>m$ & Case $\mu \leq m$ \\ \hline\hline $M=\mu$ & $M=m-\mu+1$ \\ \hline $C_i=\begin{cases} 0 & i=0 \\ \left( { - 1} \right)^m \binom{m+i-2}{i-1}\times \left[ {\frac{m} {{\mu \kappa + m}}} \right]^{ m} \left[ {\frac{{\mu \kappa }} {{\mu \kappa + m}}} \right]^{ - m - j + 1} & 0<i\leq \mu-m \\ \left( { - 1} \right)^{i-\mu+m - 1} \binom{i-2}{i-\mu+m-1} \times \left[ {\frac{m} {{\mu \kappa + m}}} \right]^{i-\mu+m - 1} \left[ {\frac{{\mu \kappa }} {{\mu \kappa + m}}} \right]^{-i + 1} & \mu-m < i \leq \mu \end{cases}$ & $C_i=\binom{m-\mu}{j}\left[ {\frac{m} {{\mu \kappa + m}}} \right]^j \left[ {\frac{{\mu \kappa }} {{\mu \kappa + m}}} \right]^{m - \mu - j}$ \\ \hline $\Omega_i=\begin{cases} \frac{{\bar \gamma }} {{\mu \left( {1 + \kappa } \right)}}, & 0\leq i\leq \mu-m \\ \frac{{\mu \kappa + m}} {m}\frac{{\bar \gamma }} {{\mu \left( {1 + \kappa } \right)}} & \mu-m < i \leq \mu \end{cases}$ & $\Omega_i=\frac{{\mu \kappa + m}} {m}\frac{{\bar \gamma }} {{\mu \left( {1 + \kappa } \right)}}$ \\ \hline \ $m_i=\begin{cases} \mu-m-i+1, & 0\leq i\leq \mu-m \\ \mu-i+1 & \mu-m < i \leq \mu \end{cases}$ & $m_i=m-i$ \\ \hline \end{tabular} } \end{table*} \bibliographystyle{IEEEtran}
{'timestamp': '2016-10-05T02:00:32', 'yymm': '1606', 'arxiv_id': '1606.05127', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05127'}
arxiv
\section{Introduction} \label{sec:introduction} \input{introduction} \section{Related Work} \label{sec:related_work} \input{relatedWork} \section{Model Description} \label{sec:model} \input{modelDescription} \section{Experiments} \label{sec:experiments} \input{experiments} \section{Conclusions and Future Work} \label{sec:conclusions} \input{conclusion} {\small \textbf{Acknowledgements} \input{acknowledgements} } {\small \bibliographystyle{ieee} \subsection{Composable Activities Dataset} \label{subsec:composableActivities} \subsection{Inference of per-frame annotations.} \label{subsec:action_annotation} The hierarchical structure and compositional properties of our model enable it to output a predicted global activity, as well as per-frame annotations of predicted atomic actions and poses for each body region. It is important to highlight that in the generation of the per-frame annotations, no prior temporal segmentation of atomic actions is needed. Also, no post-processing of the output is performed. The proficiency of our model to produce per-frame annotated data, enabling action detection temporally and spatially, make our model unique. Figure \ref{fig:annotation} illustrates the capability of our model to provide per-frame annotation of the atomic actions that compose each activity. The accuracy of the mid-level action prediction can be evaluated as in \cite{Wei2013}. Specifically, we first obtain segments of the same predicted action in each sequence, and then compare these segments with ground truth action labels. The estimated label of the segment is assumed correct if the detected segment is completely contained in a ground truth segment with the same label, or if the Jaccard Index considering the segment and the ground truth label is greater than 0.6. Using these criteria, the accuracy of the mid-level actions is 79.4\%. In many cases, the wrong action prediction is only highly local in time or space, and the model is still able to correctly predict the activity label of the sequence. Taking only the correctly predicted videos in terms of global activity prediction, the accuracy of action labeling reaches 83.3\%. When consider this number, it is important to note that not every ground truth action label is accurate: the videos were hand-labeled by volunteers, so there is a chance for mistakes in terms of the exact temporal boundaries of the action. In this sense, in our experiments we observe cases where the predicted labels showed more accuracte temporal boundaries than the ground truth. \begin{figure*}[th] \begin{center} \includegraphics[width=0.999\linewidth]{./fig_all_sequences_red.pdf} \end{center} \caption{Per-frame predictions of atomic actions for selected activities, showing 20 frames of each video. Each frame is joined with the predicted action annotations of left arm, right arm, left leg and right leg. Besides the prediction of the global activity of the video, our algorithm is able to correctly predict the atomic actions that compose each activity in each frame, as well as the body regions that are active during the execution of the action. Note that in the example video of the activity \emph{Walking while calling with hands}, the \emph{calling with hands} action is correctly annotated even when the subject change the waving hand during the execution of the activity.} \label{fig:annotation} \end{figure*} \subsection{Robustness to occlusion and noisy joints.} Our method is also capable of inferring action and activity labels even if some joints are not observed. This is a common situation in practice, as body motions induce temporal self-occlusions of body regions. Nevertheless, due to the joint estimation of poses, actions, and activities, our model is able to reduce the effect of this problem. To illustrate this, we simulate a totally occluded region by fixing its geometry to the position observed in the first frame. We select which region to be completely occluded in every sequence using uniform sampling. In this scenario, the accuracy of our preliminary model in \cite{Lillo2014} drops by 7.2\%. Using our new SR setup including NI handling, the accuracy only drops by 4.3\%, showing that the detection of non-informative poses helps the model to deal with occluded regions. In fact, as we show in Section \ref{subsec:exp_non_info_handling}, many of truly occluded regions in the videos are identified using NI handling. In contrast, the drop in performance of BoW is 12.5\% and HMM 10.3\%: simpler models are less capable of robustly dealing with occluded regions, since their pose assignments rely only on the descriptor itself, while in our model the assigned pose depends on the descriptor, sequences of poses and actions, and the activity evaluated, making inference more robust. Fig. \ref{fig:occlusions} shows some qualitative results of occluded regions. \begin{figure}[tb] \begin{center} \includegraphics[width=0.999\linewidth] {./subject_1_6.pdf} \\ {\footnotesize Right arm occluded} \\ \includegraphics[width=0.999\linewidth] {./subject_1_23.pdf}\\ {\footnotesize Left leg occluded} \\ \includegraphics[width=0.999\linewidth] {./subject_1_8.pdf}\\ {\footnotesize Left arm occluded}\\ \end{center} \caption{The occluded body regions are depicted in light blue. When an arm or leg is occluded, our method still provides a good estimation of the underlying actions in each frame.} \label{fig:occlusions} \end{figure} In terms of noisy joints, we manually add random Gaussian noise to change the joints 3D location of testing videos, using the SR setup and the GEO descriptor to isolate the effect of the joints and not mixing the motion descriptor. Figure \ref{fig:joint_noise} shows the accuracy of testing videos in terms of noise dispersion $\sigma_{noise}$ measured in inches. For little noise, there is no much effect in our model accuracy, as expected for the robustness of the geometric descriptor. However, for more drastic noise added to every joint, the accuracy drops dramatically. This behavior is expected, since for highly noisy joints the model can no longer predict well the sequence of actions and poses. \begin{figure}[tb] \begin{center} \includegraphics[width=0.999\linewidth]{./fig_acc_vs_noise.pdf} \\ \end{center} \caption{Performance of our model in presence of simulated Gaussian noise in every joint, as a function of $\sigma_{noise}$ measured in inches. When the noise is less than 3 inches in average, the model performance is not very affected, while for bigger noise dispersion the model accuracy is drastically affected. It is important no note that in our simulation, every joint is affected to noise, while in a real setup, noisy joint estimation tend to occur more rarely. } \label{fig:joint_noise} \end{figure} \subsection{Early activity prediction.} Our model needs the complete video to make an accurate activity and action prediction of a query video. In this section, we analyze the number of frames (as a percentage of a complete activity sequence) needed to make an accurate activity prediction. Figure \ref{fig:accuracy_reduced_frames} shows the mean accuracy over the dataset (using leave-one-subject-out cross-validation) in function of the percentage of frames used by the classifier to label each video. We note that considering 30\% of the frames, the classifier performs reasonable predictions, while 70\% of frames are needed to closely match the accuracy of using all frames. \begin{figure}[tb] \begin{center} \includegraphics[width=0.999\linewidth]{./fig_acc_vs_frame_reduction.pdf} \end{center} \caption{Accuracy of activity recognition versus percentage of frames used in Composable Activities dataset. In general, 30\% of the frames are needed to perform reasonable predictions, while 70\% of frames are needed to closely match the accuracy of using all frames.} \label{fig:accuracy_reduced_frames} \end{figure} \subsection{Failure cases.} We also study some of the failure cases that we observe during the experimentation with our model. Figure \ref{fig:errors} shows some error cases. It is interesting that the sequences are confusing even for humans when only the skeleton is available as in the figure. These errors probably will not be surpassed with the model itself, and will need to use other sources of information like object detectors, where a cup should be distinguished from a cellphone as in the third row of Figure \ref{fig:errors}. \begin{figure}[tb] \begin{center} \includegraphics[width=0.999\linewidth] {./sbj1_1.pdf} \\ {\footnotesize Ground truth: Walking while calling with hands\\ Prediction: Walking while waving hand} \\ \includegraphics[width=0.999\linewidth] {./sbj4_4.pdf}\\ {\footnotesize Ground truth: Composed activity 1\\ Prediction: Talking on cellphone and drinking} \\ \includegraphics[width=0.999\linewidth] {./sbj4_6.pdf}\\ {\footnotesize Ground truth: Waving hand and drinking\\ Prediction: Talking on cellphone and scratching head} \\ \end{center} \caption{Failure cases. Our algorithm tends to confuse activities that share very similar body postures.} \label{fig:errors} \end{figure} \begin{comment} \subsubsection{New activity characterization} As we mention in previous section, our model using sparse regularization and non-negative weights on activity ($\alpha$) classifiers and action ($\beta$) classifiers do not \emph{punish} poses that have no influence in the activities. For this reason, our model is able to model a new composed activity just combining the coefficients of two known activities, leaving the rest of the parameters of the model untouched. We use an heuristic approach to combine two models: givint two classes $c_1$ and $c_2$, their coefficients for a region $r$ and action $a$ are $ \alpha^r_{c_1,a}$ and $ \alpha^r_{c_2,a}$ respectively. For a new class $c_{new}$ composed of classes $c_1$ and $c_2$, we use the mean value of the coefficients \begin{equation} \alpha^r_{{c_{new},a}} = \frac{(\alpha^r_{c_1,a} + \alpha^r_{c_2,a})}{2} \end{equation} only when the corresponding coefficients for are positive; in other case, we use the maximum value of the two coefficients. For all subjects of the dataset, we create all the combinations od two activities, and tested the new model using three composed videos per subject. The average accuracy of the activity $16+1$ is 90.2\%, and in average the activities that compose the new activity drops its accuracy in 12.3\%, showing that we effectively incorporate a new composed activity to the model at a little cost of getting more confusion over the original activities. Moreover, the accuracy of action labeling for the new class is 74.2\%, similar to the accuracy of the action labeling of the original model, so we can effectively transfer the learning of atomic action classifiers to new compositions of activities. \begin{table} \begin{tabular} \hline Activity group & Accuracy of new class & \\ \hline Simple & 92. Complex & 87.2\% & \\ \hline All & 90.2\% & \\ \end{tabular} \caption{} \label{tab:acc_new_class} \end{table} \end{comment} \subsection{Classification of Simple and Isolated Actions} As a first experiment, we evaluate the performance of our model on the task of simple and isolated human action recognition in the MSR-Action3D dataset \cite{WanLi2010}. Although our model is tailored at recognizing complex actions, this experiment verifies the performance of our model in the simpler scenario of isolated atomic action classification. The MSR-Action3D dataset provides pre-trimmed depth videos and estimated body poses for isolated actors performing actions from 20 categories. We use 557 videos in a similar setup to \cite{Wang2012}, where videos from subjects 1, 3, 5, 7, 9 are used for training and the rest for testing. Table \ref{tab:msr3d} shows that in this dataset our model achieves classification accuracies comparable to state-of-the-art methods. \begin{table}[t] \footnotesize \centering \begin{tabular}{|l|c|} \hline \textbf{Algorithm} & \textbf{Accuracy}\\ \hline Our model & 93.0\% \\ \hline L. Tao \etal \cite{Tao2015} & 93.6\% \\ C. Wang \etal \cite{Wang2013} & 90.2\% \\ Vemulapalli \etal \cite{Vemulapalli2014} & 89.5\% \\ \hline \end{tabular} \caption{\footnotesize Recognition accuracy in the MSR-Action3D dataset.} \label{tab:msr3d} \end{table} \subsection{Detection of Concurrent Actions} Our second experiment evaluates the performance of our model in a concurrent action recognition setting. In this scenario, the goal is to predict the temporal localization of actions that may occur concurrently in a long video. We evaluate this task on the Concurrent Actions dataset \cite{Wei2013}, which provides 61 RGBD videos and pose estimation data annotated with 12 action categories. We use a similar evaluation setup as proposed by the authors. We split the dataset into training and testing sets with a 50\%-50\% ratio. We evaluate performance by measuring precision-recall: a detected action is declared as a true positive if its temporal overlap with the ground truth action interval is larger than 60\% of their union, or if the detected interval is completely covered by the ground truth annotation. Our model is tailored at recognizing complex actions that are composed of atomic components. However, in this scenario, only atomic actions are provided and no compositions are explicitly defined. Therefore, we apply a simple preprocessing step: we cluster training videos into groups by comparing the occurrence of atomic actions within each video. The resulting groups are used as complex actions labels in the training videos of this dataset. At inference time, our model outputs a single labeling per video, which corresponds to the atomic action labeling that maximizes the energy of our model. Since there are no thresholds to adjust, our model produces the single precision-recall measurement reported in Table \ref{tab:concurrent}. Our model outperforms the state-of-the-art method in this dataset at that recall level. \begin{table}[tb] \footnotesize \centering \begin{tabular}{|l|c|c|} \hline \textbf{Algorithm} & \textbf{Precision} & \textbf{Recall}\\ \hline Our full model & 0.92 & 0.81 \\ \hline Wei et al. \cite{Wei2013} & 0.85 & 0.81 \\ \hline \end{tabular} \caption{ \footnotesize Recognition accuracy in the Concurrent Actions dataset. } \label{tab:concurrent} \end{table} \subsection{Recognition of Composable Activities} In this experiment, we evaluate the performance of our model to recognize complex and composable human actions. In the evaluation, we use the Composable Activities dataset \cite{Lillo2014}, which provides 693 videos of 14 subjects performing 16 activities. Each activity is a spatio-temporal composition of atomic actions. The dataset provides a total of 26 atomic actions that are shared across activities. We train our model using two levels of supervision during training: i) spatial annotations that map body regions to the execution of each action are made available ii) spatial supervision is not available, and therefore the labels $\vec{v}$ to assign spatial regions to actionlets are treated as latent variables. Table \ref{tab:composable} summarizes our results. We observe that under both training conditions, our model achieves comparable performance. This indicates that our weakly supervised model can recover some of the information that is missing while performing well at the activity categorization task. In spite of using less supervision at training time, our method outperforms state-of-the-art methodologies that are trained with full spatial supervision. \begin{table}[tb] \footnotesize \centering \begin{tabular}{|l|c|} \hline \textbf{Algorithm} & \textbf{Accuracy}\\ \hline Base model + GC, GEO desc. only, spatial supervision & 88.5\%\\ Base model + GC, with spatial supervision & 91.8\% \\ Our full model, no spatial supervision (latent $\vec{v}$) & 91.1\%\\ \hline Lillo \etal \cite{Lillo2014} (without GC) & 85.7\% \\ Cao et al. \cite{cao2015spatio} & 79.0\% \\ \hline \end{tabular} \caption{ \footnotesize Recognition accuracy in the Composable Activities dataset.} \label{tab:composable} \end{table} \subsection{Action Recognition in RGB Videos} Our experiments so far have evaluated the performance of our model in the task of human action recognition in RGBD videos. In this experiment, we explore the use of our model in the problem of human action recognition in RGB videos. For this purpose, we use the sub-JHMDB dataset \cite{Jhuang2013}, which focuses on videos depicting 12 actions and where most of the actor body is visible in the image frames. In our validation, we use the 2D body pose configurations provided by the authors and compare against previous methods that also use them. Given that this dataset only includes 2D image coordinates for each body joint, we obtain the geometric descriptor by adding a depth coordinate with a value $z = d$ to joints corresponding to wrist and knees, $z = -d$ to elbows, and $z = 0$ to other joints, so we can compute angles between segments, using $d = 30$ fixed with cross-validation. We summarize the results in Table \ref{tab:subjhmdb}, which shows that our method outperforms alternative state-of-the-art techniques. \begin{table}[tb] \footnotesize \centering \begin{tabular}{|l|c|} \hline \textbf{Algorithm} & \textbf{Accuracy}\\ \hline Our model & 77.5\% \\ \hline Huang et al. \cite{Jhuang2013} & 75.6\% \\ Ch\'eron et al. \cite{Cheron2015} & 72.5\%\\ \hline \end{tabular} \caption{\footnotesize Recognition accuracy in the sub-JHMDB dataset.} \label{tab:subjhmdb} \end{table} \subsection{Spatio-temporal Annotation of Atomic Actions} In this experiment, we study the ability of our model to provide spatial and temporal annotations of relevant atomic actions. Table \ref{tab:annotation} summarizes our results. We report precision-recall rates for the spatio-temporal annotations predicted by our model in the testing videos (first and second rows). Notice that this is a very challenging task. The testing videos do no provide any label, and the model needs to predict both, the temporal extent of each action and the body regions associated with the execution of each action. Although the difficulty of the task, our model shows satisfactory results being able to infer suitable spatio-temporal annotations. We also study the capability of the model to provide spatial and temporal annotations during training. In our first experiment, each video is provided with the temporal extent of each action, so the model only needs to infer the spatial annotations (third row in Table \ref{tab:annotation}). In a second experiment, we do not provide any temporal or spatial annotation, but only the global action label of each video (fourth row in Table \ref{tab:annotation}). In both experiments, we observe that the model is still able to infer suitable spatio-temporal annotations. \begin{table}[tb] \footnotesize \centering \begin{tabular}{|l|c|c|c|} \hline \textbf{Videos} & \textbf{Annotation inferred} & \textbf{Precision} & \textbf{Recall}\\ \hline Testing set & Spatio-temporal, no GC & 0.59 & 0.77 \\ Testing set & Spatio-temporal & 0.62 & 0.78 \\ \hline Training set & Spatial only & 0.86 & 0.90\\ Training set & Spatio-temporal & 0.67 & 0.85 \\ \hline \end{tabular} \caption{ \footnotesize Atomic action annotation performances in the Composable Activities dataset. The results show that our model is able to recover spatio-temporal annotations both at training and testing time.} \label{tab:annotation} \end{table} \subsection{Effect of Model Components} In this experiment, we study the contribution of key components of the proposed model. First, using the sub-JHMDB dataset, we measure the impact of three components of our model: garbage collector for motion poselets (GC), multimodal modeling of actionlets, and use of latent variables to infer spatial annotation about body regions (latent $\vec{v}$). Table \ref{tab:components} summarizes our experimental results. Table \ref{tab:components} shows that the full version of our model achieves the best performance, with each of the components mentioned above contributing to the overall success of the method. \begin{table}[tb] \footnotesize \centering \begin{tabular}{|l|c|} \hline \textbf{Algorithm} & \textbf{Accuracy}\\ \hline Base model, GEO descriptor only & 66.9\%\\ Base Model & 70.6\%\\ Base Model + GC & 72.7\% \\ Base Model + Actionlets & 75.3\%\\ Our full model (Actionlets + GC + latent $\vec{v}$) & 77.5\% \\ \hline \end{tabular} \caption{ \footnotesize Analysis of contribution to recognition performance from each model component in the sub-JHMDB dataset.} \label{tab:components} \end{table} Second, using the Composable Activities dataset, we also analyze the contribution of the proposed self-paced learning scheme for initializing and training our model. We summarize our results in Table \ref{tab:initialization} by reporting action recognition accuracy under different initialization schemes: i) Random: random initialization of latent variables $\vec{v}$, ii) Clustering: initialize $\vec{v}$ by first computing a BoW descriptor for the atomic action intervals and then perform $k$-means clustering, assigning the action intervals to the closer cluster center, and iii) Ours: initialize $\vec{v}$ using the proposed self-paced learning scheme. Our proposed initialization scheme helps the model to achieve its best performance. \begin{table}[tb] \footnotesize \centering \begin{tabular}{|l|c|} \hline \textbf{Initialization Algorithm} & \textbf{Accuracy}\\ \hline Random & 46.3\% \\ Clustering & 54.8\% \\ Ours & 91.1\% \\ \hline Ours, fully supervised & 91.8\%\\ \hline \end{tabular} \caption{ \footnotesize Results in Composable Activities dataset, with latent $\vec{v}$ and different initializations. } \label{tab:initialization} \end{table} \subsection{Qualitative Results} Finally, we provide a qualitative analysis of relevant properties of our model. Figure \ref{fig:poselets_img} shows examples of moving poselets learned in the Composable Activities dataset. We observe that each moving poselet captures a salient body configuration that helps to discriminate among atomic actions. To further illustrate this, Figure \ref{fig:poselets_img} indicates the most likely underlying atomic action for each moving poselet. Figure \ref{fig:poselets_skel} presents a similar analysis for moving poselets learned in the MSR-Action3D dataset. We also visualize the action annotations produced by our model. Figure \ref{fig:actionlabels} (top) shows the action labels associated with each body part in a video from the Composable Activities dataset. Figure \ref{fig:actionlabels} (bottom) illustrates per-body part action annotations for a video in the Concurrent Actions dataset. These examples illustrate the capabilities of our model to correctly annotate the body parts that are involved in the execution of each action, in spite of not having that information during training. \begin{figure}[tb] \begin{center} \scriptsize Motion poselet \#4 - most likely action: talking on cellphone\\ \includegraphics[trim=0 0 0 0.35cm, clip, width=0.49\textwidth]{Fig/poselets1} Motion poselet \#7 - most likely action: erasing on board\\ \includegraphics[trim=0 0 0 0.35cm, clip, width=0.49\textwidth]{Fig/poselets2} Motion poselet \#19 - most likely action: waving hand\\ \includegraphics[trim=0 0 0 0.35cm, clip, width=0.49\textwidth]{Fig/poselets3} \end{center} \caption{ \footnotesize Moving poselets learned from the Composable Activities dataset.} \label{fig:poselets_img} \end{figure} \begin{figure}[tb] \begin{center} \scriptsize Motion poselet \#16 - most likely action: tennis swing\\ \includegraphics[trim=0 0 0cm 0cm, clip, width=0.49\textwidth]{Fig/poselets4} Motion poselet \#34 - most likely action: golf swing\\ \includegraphics[trim=0 0 0cm 0cm,clip, width=0.49\textwidth]{Fig/poselets5} Motion poselet \#160 - most likely action: bend\\ \includegraphics[trim=0 0 0cm 0cm, clip, width=0.49\textwidth]{Fig/poselets6} \end{center} \caption{ \footnotesize Moving poselets learned from the MSR-Action3D dataset.} \label{fig:poselets_skel} \end{figure} \begin{figure}[tb] \begin{center} \scriptsize \includegraphics[]{Fig/labels_acciones} \end{center} \caption{ \footnotesize Automatic spatio-temporal annotation of atomic actions. Our method detects the temporal span and spatial body regions that are involved in the performance of atomic actions in videos.} \label{fig:actionlabels} \end{figure} \begin{comment} [GENERAL IDEA] What we want to show: \begin{itemize} \item Show tables of results that can be useful to compare the model. \item Show how the model is useful for videos of simple and composed actions, since now the level of annotations is similar. \item Show how the inference produces annotated data (poses, actions, etc). In particular, show in Composable Activities and Concurrent actions how the action compositions are handled by the model without post-processing. \item Show results in sub-JHMDB,showing how the model detects the action in the videos and also which part of the body performs the action (search for well-behaved videos). It could be interesting to show the annotated data over real RGB videos. \item Show examples of poses (like poselets) and sequences of 3 or 5 poses for actions (Actionlets?) \end{itemize} \subsection{Figures} The list of figures should include: \begin{itemize} \item A figure showing the recognition and mid-level labels of Composable Activities, using RGB videos \item Comparison of action annotations, real v/s inferred in training set, showing we can recover (almost) the original annotations. \item Show a figure similar to Concurrent Actions paper, with a timeline showing the actions in color. We can show that our inference is more stable than proposed in that paper, and it is visually more similar to the ground truth than the other methods. \item Show a figure for sub-JHMDB dataset, where we can detect temporally and spatially the action without annotations in the training set. \item Show Composable Activities and sub-JHMDB the most representative poses and actions. \end{itemize} \paragraph{Composable Activities Dataset} In this dataset we show several results. (1) Comparing TRAJ descriptor (HOF over trajectory); (2) Compare the results using latent variables for action assignations to regions, with different initializations; (3) Show results of the annotations of the videos in inference. We must include figures comparing the real annotations and the inferred annotations for training data, to show we are able to get the annotations only from data. \subsection{Recognition of composable activities} \label{subsec:experiments_summary} \subsection{Impact of including motion features} \label{subsec:exp_motionfeats} \subsection{Impact of latent spatial assignment of actions} \label{subsec:exp_vlatent} \subsection{Impact of using multiple classifiers per semantic action} \label{subsec:exp_multiple} \subsection{Impact of handling non-informative poses} \label{subsec:exp_non_info_handling} \end{comment} \begin{comment} \subsection{CAD120 Dataset} The CAD120 dataset is introduced in \cite{Koppula2012}. It is composed of 124 videos that contain activities in 10 clases performed by 4 actors. Activities are related to daily living: \emph{making cereal}, \emph{stacking objects}, or \emph{taking a meal}. Each activity is composed of simpler actions like \emph{reaching}, \emph{moving}, or \emph{eating}. In this database, human-object interactions are an important cue to identify the actions, so object locations and object affordances are provided as annotations. Performance evaluation is made through leave-one-subject-out cross-validation. Given that our method does not consider objects, we use only the data corresponding to 3D joints of the skeletons. As shown in Table \ref{Table-CAD120}, our method outperforms the results reported in \cite{Koppula2012} using the same experimental setup. It is clear that using only 3D joints is not enough to characterize each action or activity in this dataset. As part of our future work, we expect that adding information related to objects will further improve accuracy. \begin{table} \centering {\small \begin{tabular}{|c|c|c|} \hline \textbf{Algorithm} & \textbf{Average precision} & \textbf{Average recall}\\ \hline Our method & 32.6\% & 34.58\% \\ \hline \cite{Koppula2012} & 27.4\% & 31.2\%\\ \cite{Sung2012} & 23.7\% & 23.7\% \\ \hline \end{tabular} } \caption{Recognition accuracy of our method compared to state-of-the-art methods using CAD120 dataset.} \label{Table-CAD120} \end{table} \end{comment} \subsection{Latent spatial actions for hierarchical action detection} \subsection{Hierarchical activity model} Suppose we have a video $D$ with $T$ frames, each frame described by a feature vector $x_t$. Assume we have available $K$ classifiers$\{w_k\}_{k=1}^K$ over the frame descriptors, such that each frame descriptor can be associated to a single classifier. If we choose the maximum response for every frame, encoded as $z_t = \argmax_k\{w_k^\top x_t\}$, we can build a BoW representation to feed linear action classifiers $\beta$, computing the histogram $h(Z)$ of $Z = \{z_1,z_2,\dots,z_T\}$ and using these histograms as a feature vector for the complete video to recognize single actions. Imagine now that we would like to use the scores of the maximum responses, $w_{z_t}^\top x_t$ as a potential to help discriminating between videos that present reliable poses from videos that does not. We can build a joint energy function, combining the action classifier score and the aggregated frame classifier scores, as \begin{equation} \label{eq:2-levels} \begin{split} E(D) &= \beta_{a}^\top h(Z) + \sum_{t=1}^T w_{z_t}^\top x_t \\ & = \sum_{t=1}^T\sum_{k=1}^K\left(\beta_{a,k} + w_k^\top x_t \right)\delta(z_t=k) \end{split} \end{equation} What is interesting of Eq. (\ref{eq:2-levels}) is that it every term in the sum is tied for the value of $z_t$, creating a model such that all its components depends of the labeling $Z$. We can expand the previous model to more levels using the same philosophy. In fact, for a new level, we could create a new indicator $v_t$ for every frame that indicates the election of which classifier $\beta$ will be used (the same as $z_t$ indicates which classifier of $w$). If we name $w$ as \emph{pose classifiers}, and $\beta$ as \emph{action classifiers}, we can create a hierarchical model where multiple poses and actions can be present in a single video. Supposing we have $A$ actions; the energy for a three-level hierarchy could be, for an \emph{activity} $l$, \begin{equation} E(D) =\alpha_l^\top h(V) + \sum_{a=1}^A \beta_{a}^\top h^a(Z,V) + \sum_{t=1}^T w_{z_t}^\top x_t \end{equation} where $h^a(Z,V)$ refers to the BoW representation of $Z$ for those frames labeled as action $v_t = a$. [NEW MODEL] Recent work in action recognition \cite{Cheron2015,Tao2015, Wang2011,Jhuang2013} shows a resurgence of describing human actions as a collection of dynamic spatial parts that resembles Poselets. In line with these research, we split the human body into $R$ semantic regions. As modeling actions using the whole body is hard, separating the body into groups of limbs helps in recognition of actions, specially for complex datasets \cite{Tao2015}. Our wiew is that while poses are in general well defined in most research, little effort has been made to mine actions from videos, in terms of detecting the temporal spanning (action detection) and action localization. In addition to the fact that most action datasets are only single actions, there is a lack of research in the general setup where actions are combined in the same video. Nevertheless, a few works have noticed that humans usually performs complex action in real life \cite{Wei2013, Lillo2014}, providing their own datasets based in RGB-D cameras. In our work, we aim to group both worlds of single and composed actions in a single hierarchical model of three semantic levels, and using human body regions to improve the representativeness. During training, we assume there is temporal annotations of actions. As we want our model to perform action localization, we model the action assignments $V_r$ in each region as latent variables during training, allowing the model to infer which human part execute the action without needing this kind of annotations in the training set, including a model for the initialization of action labels. In this way, we advance from a simple detection problem to infer also \emph{how} the subject executes the action, important in surveillance applications, health monitoring, between others. We also expand the modeling of recurrent patterns of poses to construct a general model for shared actions, aiming to handle multimodal information, which is produced by actions with the same label but with different execution patterns, or by changes in representation of actions such as varying camera view. We handle this problem by augmenting the number of action classifiers, where each original action acts as a parent node of several non-overlapping child actions. Finally, as we are using local information for poses, some frames could be noisy or representing an uncommon pose, not useful to build the pose models. We attack this issue by adding a garbage collector for poses, where only the most-informative poses are used by pose classifiers during learning. We describe these contributions in the following paragraphs. \paragraph{[EDIT] Latent assignments of actions to human regions} Knowing the parts of the body involved in the actions is highly appealing. Suppose we have $M$ videos, each video annotated with $Q_m$ action intervals. Each action interval can be associated with any number of regions, from $1$ to all $R$ regions. For example, a \emph{waving hand} action could be associated only with \emph{right\_arm}, while the action \emph{jogging} could be associated with the whole body. We want to learn the associations of actions and human parts for training videos, and we build these associations using latent variables. The main problem to solve is to how to get a proper initialization for actions, since there is a very high chance to get sticked in a local minimum far away of the optimum, producing bad results. Our first contribution is a method to get a proper initialization of fine-grained spatial action labels, knowing only the time span of the actions. Using the known action intervals, we formulate the problem of action to region assignment as an optimization problem, constrained using structural information: the actions intervals must not overlap in the same region, and all the action intervals must be present at least in one region. We formulate this labeling problem as a binary Integer Linear Programming (ILP) problem. We define as $v_{r,q}^m=1$ when the action interval $q \in \{1,\dots,Q_m\}$ appears in region $r$ in the video $m$, and $v_{r,q}^m=0$ otherwise. We assume we have pose labels $z_{t,r}$ in each frame, independent for each region, learned via clustering the poses for all frames in all videos. For an action interval $q$, we use as descriptor the histogram of pose labels for each region in the action interval, defined for the video $m$ as $h_{r,q}^m$ . We can solve the problem of finding the correspondence between action intervals and regions in a formulation similar to $k$-means, using the structure of the problem as constraints in the labels, and using $\chi^2$ distance between the action interval descriptors and the cluster centers: \begin{equation} \begin{split} P1) \quad \min_{v,\mu} &\sum_{m=1}^M \sum_{r=1}^R \sum_{q=1}^{Q_m} v_{r,q}^m d( h_{r,q}^m - \mu_{a_q}^r) -\frac{1}{\lambda} v_{r,q}^m\\ \text{s. to} \quad & \sum_{r=1}^R v_{r,q}^m \ge 1\text{, }\forall q\text{, }\forall m \\ & v_{r,q_1}^m + v_{r,q_2}^m \le 1 \text{ if } q_1\cap q_2 \neq \emptyset \text{, }\forall r\text{, }\forall m\\ & v_{r,q}^m \in \{0,1\}\text{, }\forall q\text{, }\forall{r}\text{, }\forall m \end{split} \end{equation} with \begin{equation} d( h_{r,q}^m - \mu_{a_q}^r) = \sum_{k=1}^K (h_{r,q}^m[k] - \mu_{a_q}^r[k])^2/(h_{r,q}^m[k] +\mu_{a_q}^r[k]). \end{equation} $\mu_{a_q}^r$ are computed as the mean of the descriptors with the same action label within the same region. We solve $P1$ iteratively as $k$-means, finding the cluster centers for each region $r$, $\mu_{a}^r$ using the labels $v_{r,q}^m$, and then finding the best labeling given the cluster centers, solving an ILP problem. Note that the first term of the objective function is similar to a $k$-means model, while the second term resembles the objective function of \emph{self-paced} learning as in \cite{Kumar2010}, fostering to balance between assigning a single region to every action, towards assigning all possible regions to the action intervals when possible. [IL: INCLUDE FIGURE TO SHOW P1 GRAPHICALLY] We describe the further changes in the hierarchical model of \cite{Lillo2014} in the learning and inference sections. \paragraph{[EDIT] Representing semantic actions with multiple atomic sequences}. As the poses and atomic actions in \cite{Lillo2014} model are shared, a single classifier is generally not enough to model multimodal representations, that occur usually in complex videos. We modify the original hierarchical model of \cite{Lillo2014} to include multiple linear classifiers per action. We create two new concepts: \textbf{semantic actions}, that refer to actions \emph{names} that compose an activity; and \textbf{atomic sequences}, that refers to the sequence of poses that conform an action. Several atomic sequences can be associated to a single semantic action, creating disjoint sets of atomic sequences, each set associated to a single semantic action. The main idea is that the action annotations in the datasets are associated to semantic actions, whereas for each semantic action we learn several atomic sequence classifiers. With this formulation, we can handle the multimodal nature of semantic actions, covering the changes in motion, poses , or even changes in meaning of the action according to the context (e.g. the semantic action ``open'' can be associated to opening a can, opening a door, etc.). Inspired by \cite{Raptis2012}, we first use the \emph{Cattell's Scree test} for finding a suitable number of atomic sequence for every semantic action. Using the semantic action labels, we compute a descriptor for every interval using normalized histograms of pose labels. Then, for a particular semantic action $u$, we compute the the eigenvalues $\lambda_u$ of the affinity matrix of the semantic action descriptors, using $\chi^2$ distance. For each semantic action $u \in \{1,\dots,U\}$ we find the number of atomic sequences $G_u$ as $G_u = \argmin_i \lambda_{i+1}^2 / (\sum_{j=1}^i \lambda_j) + c\cdot i$, with $c=2\cdot 10^{-3}$. Finally, we cluster the descriptors corresponding to each semantic action using k-means, using a different number of clusters for each semantic action $u$ according to $G_u$. This approach generates non-overlapping atomic sequences, each associated to a single semantic action. To transfer the new labels to the model, we define $u(v)$ as the function that given the atomic sequence label $v$, returns the corresponding semantic action label $u$. The energy for the activity level is then \begin{equation} E_{\text{activity}} = \sum_{u=1}^U\sum_{t=1}^T \alpha_{y,u}\delta(u(v_t)=u) \end{equation} For the action and pose labels the model remains unchanged. Using the new atomic sequences allows a richer representation for actions, while in he activity level, several atomic sequences will map to a single semantic action. This behavior resembles a max-pooling operation, where we will choose at inference the atomic sequences that best describe the performed actions in the video, keeping the semantics of the original labels. \paragraph{Towards a better representation of poses: adding a garbage collector} The model in \cite{Lillo2014} uses all poses to feed action classifiers. Out intuition is that only a subset of poses in each video are really discriminative or informative for the actions performed, while there is plenty of poses that corresponds to noisy or non-informative ones. [EXPAND] Our intuition is that low-scored frames in terms of poses (i.e. a low value of $w_{z_t}^\top x_t$ in Eq. (\ref{eq:energy2014})) make the same contribution as high-scored poses in higher levels of the model, while degrading the pose classifiers at the same time since low-scored poses are likely to be related to non-informative frames. We propose to include a new pose, to explicitly handling those low-scored frames, keeping them apart for the pose classifiers $w$, but still adding a fixed score to the energy function to avoid normalization issues and to help in the specialization of pose classifiers. We call this change in the model a \emph{garbage collector} since it handles all low-scores frames and group them having a fixed energy score $\theta$. In practice, we use a special pose entry $K+1$ to identify the non-informative poses. The equation representing the energy for pose level is \begin{equation} \label{Eq_poseEnergy} E_{\text{poses}} = \sum_{t=1}^T \left[ {w_{z_t}}^\top x_{t}\delta(z_{t} \le K) + \theta \delta(z_{t}=K+1)\right] \end{equation} where $\delta(\ell) = 1$ if $\ell$ is true and $\delta(\ell) = 0$ if $\ell$ is false. The action level also change its energy: \begin{equation} \begin{split} \label{Eq_actionEnergy} E_{\text{actions}} = \sum_{t=1}^T \sum_{a=1}^A \sum_{k=1}^{K+1} \beta_{a,k} \delta(z_t = k) \delta(v_t = a). \end{split} \end{equation} \begin{comment} Integrating all contribution detailed in previous sections, the model is written as: Energy function: \begin{equation} E = E_{\text{activity}} + E_{\text{action}} + E_{\text{pose}} + E_{\text{action transition}} + E_{\text{pose transition}}. \end{equation} \begin{equation} E_{\text{poses}} = \sum_{t=1}^T \left[ {w_{z_t}}^\top x_{t}\delta(z_{t} \le K) + \theta \delta(z_{t}=K+1)\right] \end{equation} \begin{equation} E_{\text{actions}} = \sum_{t=1}^T \sum_{a=1}^A \sum_{k=1}^{K+1} \beta_{a,k} \delta(z_t = k) \delta(v_t = a). \end{equation} \begin{equation} h_g^{r}(U) = \sum_{t} \delta_{u_{t,r}}^g \end{equation} So the energy in the activity level is \begin{equation} E_{\text{activity}} = \sum_{r} {\alpha^r_{y}}^\top h^{r}(U) = \sum_{r,g,t} \alpha^r_{y,g} \delta_{u_{t,r}}^g \end{equation} \begin{equation} E_{\text{action transition}} = \sum_{r,a,a'} \gamma^r_{a',a} \sum_{t} \delta_{v_{t-1,r}}^{a'}\delta_{v_{t,r}}^a \end{equation} \begin{equation} E_{\text{pose transition}} =\sum_{r,k,k'} \eta^r_{k',k}\sum_{t}\delta_{z_{t-1,r}}^{k'}\delta_{z_{t,r}}^{k} \end{equation} \end{comment} \subsection{Inference} \label{subsec:inference} The input to the inference algorithm is a new video sequence with features $\vec{x}$. The task is to infer the best complex action label $\hat y$, and to produce the best labeling of actionlets $\hat{\vec{v}}$ and motion poselets $\hat{\vec{z}}$. {\small \begin{equation} \hat y, \hat{\vec{v}}, \hat{\vec{z}} = \argmax_{y, \vec{v},\vec{z}} E(\vec{x}, \vec{v}, \vec{z}, y) \end{equation}} We can solve this by exhaustively enumerating all values of complex actions $y$, and solving for $\hat{\vec{v}}$ and $\hat{\vec{z}}$ using: \small \begin{equation} \begin{split} \hat{\vec{v}}, \hat{\vec{z}} | y ~ =~ & \argmax_{\vec{v},\vec{z}} ~ \sum_{r=1}^R \sum_{t=1}^T \left( \alpha^r_{y,u(v{(t,r)})} + \beta^r_{v_{(t,r)},z_{(t,r)}}\right. \\ &\quad\quad \left.+ {w^r_{z_{(t,r)}}}^\top x_{t,r} \delta(z_{(t,r)} \le K) + \theta^r \delta_{z_{(t,r)}}^{K+1} \right. \\ & \quad\quad \left.+ \gamma^r_{v_{({t-1},r)},v_{(t,r)}} + \eta^r_{z_{({t-1},r)},z_{(t,r)}} \vphantom{{w^r_{z_{(t,r)}}}^\top x_{t,r}} \right). \\ \end{split} \label{eq:classify_inference} \end{equation} \normalsize \subsection{Learning} \label{subsec:learning} \textbf{Initial actionlet labels.} An important step in the training process is the initialization of latent variables. This is a challenging due to the lack of spatial supervision: at each time instance, the available atomic actions can be associated with any of the $R$ body regions. We adopt the machinery of self-paced learning \cite{Kumar:EtAl:2010} to provide a suitable solution and formulate the association between actions and body regions as an optimization problem. We constrain this optimization using two structural restrictions: i) atomic actions intervals must not overlap in the same region, and ii) a labeled atomic action must be present at least in one region. We formulate the labeling process as a binary Integer Linear Programming (ILP) problem, where we define $b_{r,q}^m=1$ when action interval $q \in \{1,\dots,Q_m\}$ is active in region $r$ of video $m$; and $b_{r,q}^m=0$ otherwise. Each action interval $q$ is associated with a single atomic action. We assume that we have initial motion poselet labels $z_{t,r}$ in each frame and region. We describe the action interval $q$ and region $r$ using the histogram $h_{r,q}^m$ of motion poselet labels. We can find the correspondence between action intervals and regions using a formulation that resembles the operation of$k$-means, but using the structure of the problem to constraint the labels: \small \begin{equation} \begin{split} \text{P1}) \quad \min_{b,\mu} &\sum_{m=1}^M \sum_{r=1}^R \sum_{q=1}^{Q_m} b_{r,q}^m d( h_{r,q}^m - \mu_{a_q}^r) -\frac{1}{\lambda} b_{r,q}^m\\ \text{s.t.} \quad & \sum_{r=1}^R b_{r,q}^m \ge 1\text{, }\forall q\text{, }\forall m \\ & b_{r,q_1}^m + b_{r,q_2}^m \le 1 \text{ if } q_1\cap q_2 \neq \emptyset \text{, }\forall r\text{, }\forall m\\ & b_{r,q}^m \in \{0,1\}\text{, }\forall q\text{, }\forall{r}\text{, }\forall m \end{split} \end{equation} with \begin{equation} d( h_{r,q}^m - \mu_{a_q}^r) = \sum_{k=1}^K (h_{r,q}^m[k] - \mu_{a_q}^r[k])^2/(h_{r,q}^m[k] +\mu_{a_q}^r[k]). \end{equation} \normalsize Here, $\mu_{a_q}^r$ are the means of the descriptors with action label $a_q$ within region $r$. We solve $\text{P1}$ iteratively using a block coordinate descending scheme, alternating between solving $b_{r,q}^m$ with $\mu_{a}^r$ fixed, which has a trivial solution; and then fixing $\mu_{a}^r$ to solve $b_{r,q}^m$, relaxing $\text{P1}$ to solve a linear program. Note that the second term of the objective function in $\text{P1}$ resembles the objective function of \emph{self-paced} learning \cite{Kumar:EtAl:2010}, managing the balance between assigning a single region to every action or assigning all possible regions to the respective action interval. \textbf{Learning model parameters.} We formulate learning the model parameters as a Latent Structural SVM problem \cite{Yu:Joachims:2010}, with latent variables for motion poselets $\vec{z}$ and actionlets $\vec{v}$. We find values for parameters in equations (\ref{eq:motionposelets}-\ref{eq:actionletstransition}), slack variables $\xi_i$, motion poselet labels $\vec{z}_i$, and actionlet labels $\vec{v}_i$, by solving: {\small \begin{equation} \label{eq:big_problem} \min_{W,\xi_i,~i=\{1,\dots,M\}} \frac{1}{2}||W||_2^2 + \frac{C}{M} \sum_{i=1}^M\xi_i , \end{equation}} where {\small \begin{equation} W^\top=[\alpha^\top, \beta^\top, w^\top, \gamma^\top, \eta^\top, \theta^\top], \end{equation}} and {\small \begin{equation} \label{eq:slags} \begin{split} \xi_i = \max_{\vec{z},\vec{v},y} \{ & E(\vec{x}_i, \vec{z}, \vec{v}, y) + \Delta( (y_i,\vec{v}_i), (y, \vec{v})) \\ & - \max_{\vec{z}_i}{ E(\vec{x}_i, \vec{z}_i, \vec{v}_i, y_i)} \}, \; \;\; i\in[1,...M]. \end{split} \end{equation}} In Equation (\ref{eq:slags}), each slack variable $\xi_i$ quantifies the error of the inferred labeling for video $i$. We solve Equation (\ref{eq:big_problem}) iteratively using the CCCP algorithm \cite{Yuille:Rangarajan:03}, by solving for latent labels $\vec{z}_i$ and $\vec{v}_i$ given model parameters $W$, temporal atomic action annotations (when available), and labels of complex actions occurring in training videos (see Section \ref{subsec:inference}). Then, we solve for $W$ via 1-slack formulation using Cutting Plane algorithm \cite{Joachims2009}. The role of the loss function $\Delta((y_i,\vec{v}_i),(y,\vec{v}))$ is to penalize inference errors during training. If the true actionlet labels are known in advance, the loss function is the same as in \cite{Lillo2014} using the actionlets instead of atomic actions: \small \begin{equation} \Delta((y_i,\vec{v}_i),(y,\vec{v})) = \lambda_y(y_i \ne y) + \lambda_v\frac{1}{T}\sum_{t=1}^T \delta({v_t}_{i} \neq v_t), \end{equation} \normalsize \noindent where ${v_t}_{i}$ is the true actionlet label. If the spatial ordering of actionlets is unknown (hence the latent actionlet formulation), but the temporal composition is known, we can compute a list $A_t$ of possible actionlets for frame $t$, and include that information on the loss function as \small \begin{equation} \Delta((y_i,\vec{v}_i),(y,\vec{v})) = \lambda_y(y_i \ne y) + \lambda_v\frac{1}{T}\sum_{t=1}^T \delta(v_t \notin A_t) \end{equation} \normalsize \subsection{Body regions} We divide the body pose into $R$ fixed spatial regions and independently compute a pose feature vector for each region. Figure \ref{fig:skeleton_limbs_regions} illustrates the case when $R = 4$ that we use in all our experiments. Our body pose feature vector consists of the concatenation of two descriptors. At frame $t$ and region $r$, a descriptor $x^{g}_{t,r}$ encodes geometric information about the spatial configuration of body joints, and a descriptor $x^{m}_{t,r}$ encodes local motion information around each body joint position. We use the geometric descriptor from \cite{Lillo2014}: we construct six segments that connect pairs of joints at each region\footnote{Arm segments: wrist-elbow, elbow-shoulder, shoulder-neck, wrist-shoulder, wrist-head, and neck-torso; Leg segments: ankle-knee, knee-hip, hip-hip center, ankle-hip, ankle-torso and hip center-torso} and compute 15 angles between those segments. Also, three angles are calculated between a plane formed by three segments\footnote{Arm plane: shoulder-elbow-wrist; Leg plane: hip-knee-ankle} and the remaining three non-coplanar segments, totalizing an 18-D geometric descriptor (GEO) for every region. Our motion descriptor is based on tracking motion trajectories of key points \cite{WangCVPR2011}, which in our case coincide with body joint positions. We extract a HOF descriptor using 32x32 RGB patches centered at the joint location for a temporal window of 15 frames. At each joint location, this produces a 108-D descriptor, which we concatenate across all joints in each a region to obtain our motion descriptor. Finally, we apply PCA to reduce the dimensionality of our concatenated motion descriptor to 20. The final descriptor is the concatenation of the geometric and motion descriptors, $x_{t,r} = [x_{t,r}^g ; x_{t,r}^m]$. \subsection{Hierarchical compositional model} We propose a hierarchical compositional model that spans three semantic levels. Figure \ref{fig:overview} shows a schematic of our model. At the top level, our model assumes that each input video has a single complex action label $y$. Each complex action is composed of a temporal and spatial arrangement of atomic actions with labels $\vec{u}=[u_1,\dots,u_T]$, $u_i \in \{1,\dots,S\}$. In turn, each atomic action consists of several non-shared \emph{actionlets}, which correspond to representative sets of pose configurations for action identification, modeling the multimodality of each atomic action. We capture actionlet assignments in $\vec{v}=[v_1,\dots,v_T]$, $v_i \in \{1,\dots,A\}$. Each actionlet index $v_i$ corresponds to a unique and known actomic action label $u_i$, so they are related by a mapping $\vec{u} = \vec{u}(\vec{v})$. At the intermediate level, our model assumes that each actionlet is composed of a temporal arrangement of a subset from $K$ body poses, encoded in $\vec{z} = [z_1,\dots,z_T]$, $z_i \in \{1,\dots,K\}$, where $K$ is a hyperparameter of the model. These subsets capture pose geometry and local motion, so we call them \emph{motion poselets}. Finally, at the bottom level, our model identifies motion poselets using a bank of linear classifiers that are applied to the incoming frame descriptors. We build each layer of our hierarchical model on top of BoW representations of labels. To this end, at the bottom level of our hierarchy, and for each body region, we learn a dictionary of motion poselets. Similarly, at the mid-level of our hierarchy, we learn a dictionary of actionlets, using the BoW representation of motion poselets as inputs. At each of these levels, spatio-temporal activations of the respective dictionary words are used to obtain the corresponding histogram encoding the BoW representation. The next two sections provide details on the process to represent and learn the dictionaries of motion poselets and actionlets. Here we discuss our integrated hierarchical model. We formulate our hierarchical model using an energy function. Given a video of $T$ frames corresponding to complex action $y$ encoded by descriptors $\vec{x}$, with the label vectors $\vec{z}$ for motion poselets, $\vec{v}$ for actionlets and $\vec{u}$ for atomic actions, we define an energy function for a video as: \small \begin{align}\label{Eq_energy} E(\vec{x},&\vec{v},\vec{z},y) = E_{\text{motion poselets}}(\vec{z},\vec{x}) \nonumber \\&+ E_{\text{motion poselets BoW}}(\vec{v},\vec{z}) + E_{\text{atomic actions BoW}}(\vec{u}(\vec{v}),y) \nonumber \\ & + E_{\text{motion poselets transition}}(\vec{z}) + E_{\text{actionlets transition}}(\vec{v}). \end{align} \normalsize Besides the BoW representations and motion poselet classifiers described above, Equation (\ref{Eq_energy}) includes two energy potentials that encode information related to temporal transitions between pairs of motion poselets ($E_{\text{motion poselets transition}}$) and actionlets ($E_{\text{actionlets transition}}$). The energy potentials are given by: {\small \begin{align} \label{eq:motionposelets} &E_{\text{mot. poselet}}(\vec{z},\vec{x}) = \sum_{r,t} \left[ \sum_{k} {w^r_k}^\top x_{t,r}\delta_{z_{(t,r)}}^{k} + \theta^r \delta_{z_{(t,r)}}^{K+1}\right] \\ &E_{\text{mot. poselet BoW}}(\vec{v},\vec{z}) = \sum_{r,a,k} {\beta^r_{a,k}}\delta_{v_{(t,r)}}^{a}\delta_{z_{(t,r)}}^{k}\\ \label{eq:actionlets_BoW} &E_{\text{atomic act. BoW}}(\vec{u}(\vec{v}),y) =\sum_{r,s} {\alpha^r_{y,s}}\delta_{u(v_{(t,r)})}^{s} \\ &E_{\text{mot. pos. trans.}}(\vec{z}) = \sum_{r,k_{+1},k'_{+1}} \eta^r_{k,k'} \sum_{t} \delta_{z_{(t-1,r)}}^{k}\delta_{z_{(t,r)}}^{k'} \\ \label{eq:actionletstransition} &E_{\text{acttionlet trans.}}(\vec{v}) =\sum_{r,a,a'} \gamma^r_{a,a'} \sum_{t} \delta_{v_{(t-1,r)}}^{a}\delta_{v_{(t,r)}}^{a'} \end{align} } Our goal is to maximize $E(\vec{x},\vec{v},\vec{z},y)$, and obtain the spatial and temporal arrangement of motion poselets $\vec{z}$ and actionlets $\vec{v}$, as well as, the underlying complex action $y$. In the previous equations, we use $\delta_a^b$ to indicate the Kronecker delta function $\delta(a = b)$, and use indexes $k \in \{1,\dots,K\}$ for motion poselets, $a \in \{1,\dots,A\}$ for actionlets, and $s \in \{1,\dots,S\}$ for atomic actions. In the energy term for motion poselets, $w^r_k$ are a set of $K$ linear pose classifiers applied to frame descriptors $x_{t,r}$, according to the label of the latent variable $z_{t,r}$. Note that there is a special label $K+1$; the role of this label will be explained in Section \ref{subsec:garbage_collector}. In the energy potential associated to the BoW representation for motion poselets, $\vec{\beta}^r$ denotes a set of $A$ mid-level classifiers, whose inputs are histograms of motion poselet labels at those frame annotated as actionlet $a$. At the highest level, $\alpha^r_{y}$ is a linear classifier associated with complex action $y$, whose input is the histogram of atomic action labels, which are related to actionlet assignments by the mapping function $\vec{u}(\vec{v})$. Note that all classifiers and labels here correspond to a single region $r$. We add the contributions of all regions to compute the global energy of the video. The transition terms act as linear classifiers $\eta^r$ and $\gamma^r$ over histograms of temporal transitions of motion poselets and temporal transitions of actionlets respectively. As we have a special label $K+1$ for motion poselets, the summation index $k_{+1}$ indicates the interval $\lbrack 1,\dots,K+1 \rbrack$. \subsection{Learning motion poselets} In our model, motion poselets are learned by treating them as latent variables during training. Before training, we fix the number of motion poselets per region to $K$. In every region $r$, we learn an independent set of pose classifiers $\{w^r_k\}_{k=1}^K$, initializing the motion poselet labels using the $k$-means algorithm. We learn pose classifiers, actionlets and complex actions classifiers jointly, allowing the model to discover discriminative motion poselets useful to detect and recognize complex actions. As shown in previous work, jointly learning linear classifiers to identify body parts and atomic actions improves recognition rates \cite{Lillo2014,Wang2008}, so here we follow a similar hierarchical approach, and integrate learning of motion poselets with the learning of actionlets. \subsection{Learning actionlets} \label{sec:learningactionlets} A single linear classifier does not offer enough flexibility to identify atomic actions that exhibit high visual variability. As an example, the atomic action ``open'' can be associated with ``opening a can'' or ``opening a book'', displaying high variability in action execution. Consequently, we augment our hierarchical model including multiple classifiers to identify different modes of action execution. Inspired by \cite{Raptis2012}, we use the \emph{Cattell's Scree test} to find a suitable number of actionlets to model each atomic action. Specifically, using the atomic action labels, we compute a descriptor for every video interval using normalized histograms of initial pose labels obtained with $k$-means. Then, for a particular atomic action $s$, we compute the eigenvalues $\lambda(s)$ of the affinity matrix of the atomic action descriptors, which is build using $\chi^2$ distance. For each atomic action $s \in \{1,\dots,S\}$, we find the number of actionlets $G_s$ as $G_s = \argmin_i {\lambda(s)}_{i+1}^2 / (\sum_{j=1}^i {\lambda(s)}_j) + c\cdot i$, with $c=2\cdot 10^{-3}$. Finally, we cluster the descriptors from each atomic action $s$ running $k$-means with $k = G_s$. This scheme generates a set of non-overlapping actionlets to model each single atomic action. In our experiments, we notice that the number of actionlets used to model each atomic action varies typically from 1 to 8. To transfer the new labels to the model, we define $u(v)$ as a function that maps from actionlet label $v$ to the corresponding atomic action label $u$. A dictionary of actionlets provides a richer representation for actions, where several actionlets will map to a single atomic action. This behavior resembles a max-pooling operation, where at inference time we will choose the set of actionlets that best describe the performed actions in the video, keeping the semantics of the original atomic action labels. \subsection{A garbage collector for motion poselets} \label{subsec:garbage_collector} While poses are highly informative for action recognition, an input video might contain irrelevant or idle zones, where the underlying poses are noisy or non-discriminative to identify the actions being performed in the video. As a result, low-scoring motion poselets could degrade the pose classifiers during training, decreasing their performance. To deal with this problem, we include in our model a \emph{garbage collector} mechanism for motion poselets. This mechanism operates by assigning all low-scoring motion poselets to the $(K+1)$-th pose dictionary entry. These collected poses are associated with a learned score lower than $\theta^r$, as in Equation (\ref{eq:motionposelets}). Our experiments show that this mechanism leads to learning more discriminative motion poselet classifiers. \input{learning} \input{inference} \subsection{Video Representation} \label{subsec:videorepresentation} [EXPLAIN BETTER, ADD FIGURE] Our model is based on skeleton information encoded in joint annotations. We use the same geometric descriptor as in \cite{Lillo2014}, using angles between segments connecting two joints, and angles between these segments and a plane formed by three joints. In addition to geometry, other authors \cite{Zanfir2013,Tao2015,Wang2014} have noticed that including local motion information is beneficial to the categorization of videos. Moreover, in \cite{zhu2013fusing} the authors create a fused descriptor using spatio-temporal descriptors and joint descriptors, showing that they combined perform better than separated. With this is mind, we augment the original geometric descriptor with motion information: when there is only skeleton jonints data, we use the displacement of vectors (velocity) as a motion descriptor. If RGB video is available, we use the HOF descriptor extracted from the trajectory of the joint in a small temporal window. For the geometric descriptor, we use 6 segments per human action (see Fig. XXXX). The descriptor is composed by the angles between the segments (15 angles), and the angles between a plane formed by three segments and the non-coplanar segments (3 angles). For motion descriptor, we use either the 3D velocity of every joint in each region as a concatenated vector (18 dimensions), or the concatenated HOF descriptor of the joint trajectories, transformed to a low-dimensional space using PCA (20 dimensions).
{'timestamp': '2016-06-17T02:01:41', 'yymm': '1606', 'arxiv_id': '1606.04992', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04992'}
arxiv
\section{Introduction} Placebo effects have draw a lot of interest and debate in medicine\cite{price2008}. They can be viewed as a simulation of an active therapy within a psychosocial context\cite{price2008}. Research in neurobiology has shown that placebo responses are accompanied by actual alterations in neural activity within brain regions involved in emotional regulation\cite{price2008,fields2004,petrovic2005,zubieta2001}. Hence, rather than inducing a simple bias in response, placebos can induce actual biological effects and improve clinical outcomes. Among the cognitive and emotional factors that have been proposed to contribute to placebo effects, the interaction between the desire for symptom change and the expected symptom intensity has been proposed as a key component giving raise to placebo effects\cite{price2008}. In the psychology literature, this interaction is known as the desire-expectation model of emotions\cite{price2008,price1984,price1985,price2001}, which postulates that ratings of positive and negative emotional feelings are predicted by multiplicative interactions between ratings of desire and expectation. A number of experimental studies of placebo analgesia\cite{price2008,vase2003,verne2003} have corroborated the role of the desire-expectation model as a trigger of placebo effects. These findings have important implications for both clinical practice and clinical trials. On one hand, clinicians should harness the placebo effect to improve the clinical outcome of their patients (by managing expectations and desires through ethical use of suggestions and optimum caregiver-patient interactions)\cite{price2008}. On the other hand, assessment of expectation and desire levels is also important in clinical trials since placebo effects might strongly influence the results of a study. In unblinded trials, it is widely recognized that the overall effect attributed to a treatment might actually correspond to a combination of treatment and placebo effects. However, placebo effects might still play a role in blinded trials as well\cite{price2008}. For instance, blinded studies evaluating the effectiveness of acupuncture\cite{bausell2005} and of implantation of human embryonic dopamine neurons into the brains of persons with severe Parkinson disease\cite{mcrae2004} have shown that perceived treatment (or the treatment the participants thought they had received) can have stronger effects than the treatment actually received by the participants. These findings illustrate the relevance of measuring expectation, desire, and emotional levels in order to assess the contribution of placebo effects, and suggest that it is important to adjust for these variables when estimating treatment effects and interpreting the results of clinical trials\cite{price2008}. However, because it is generally impossible to rule out the presence of unmeasured confounders, simply measuring and adjusting for variables associated with placebo effects might not be enough to ensure a reliable estimation of the treatment effect. For instance, estimation based on regression models adjusting for the placebo related measurements still leads to biased estimates of the treatment effect, unless all confounders influencing the outcome variable enter the regression model. \section{The statistical method} Here we present a statistical approach to disentangle treatment and placebo effects using instrumental variables\cite{angrist2001,bowden1990,didelez2010} in randomized experiments. An instrumental variable (IV) is statistically independent from any unmeasured confounders, but is associated with the treatment variable and with the outcome variable (via its influence on the treatment variable alone). Use of IVs in randomized experiments allows the consistent estimation of treatment effects without the need to explicitly model the confounders (the technique even accounts for confounders the researcher is unaware about). Our proposed method requires the ability to assess variables associated with placebo effects (e.g., levels of expectancy, desire, and emotion), and uses randomization to separately manipulate a pair of variables. The first, corresponds to a psychological encouragement variable aiming to increase the desire for improved symptoms. The study participants are randomized according to whether they receive the psychological encouragement or not. This ``psychological treatment" IV allows the consistent estimation of the placebo effect on the outcome in the presence of confounders. The second, corresponds to a treatment assignment variable representing the random assignment of participants to active treatment or control therapy groups. It allows the estimation of the treatment effect on the outcome, after adjustment for the placebo effect. Mechanistically, the approach corresponds to a two-step procedure, which first estimates the contribution of the placebo effect on the outcome, and then the effect of the treatment on the residuals of the outcome variable after the contribution of the placebo effect has been removed. A graphical representation of the causal model underlying our approach is given in Figure \ref{fig:dags}a. Circled and un-circled nodes represent observed and unobserved variables, respectively. Arrows represent the causal influence of a variable on another, with the influence of unmeasured confounders shown as dotted arrows. The binary variable $Z$ represents the randomized treatment assigned to the participant (1 if participant is assigned to the active treatment group, and 0 if assigned to the control group), while $X$ represents the treatment actually received by the study participant (1 if the participant receives the active treatment, and 0 otherwise). It is important to model both assigned and received treatment variables since participants won't necessarily subscribe to their assigned treatment, and the experiment might suffer from imperfect compliance. \begin{figure}[!h] $$ \[email protected]{ *+[F-:<10pt>]{Z} \ar[dr] &&& \bfU \ar@{.>}[dll] \ar@{.>}[drr] && (a) & & *+[F-:<10pt>]{Z} \ar[dr] &&& \bfU \ar@{.>}[dll] \ar@{.>}[drr] && (b) \\ & *+[F-:<10pt>]{X} \ar[rr]^{\eta} \ar[dddddd] && S \ar[rr]^{\lambda} && *+[F-:<10pt>]{Y} & & & *+[F-:<10pt>]{X} \ar[rrrr]^{\beta} \ar[dddddd] && && *+[F-:<10pt>]{Y} & \\ &&&&&& & &&&&&& \\ \bfC_1 \ar@{.>}[uur] \ar@{.>}[ddddr] && \bfmH \ar@{.>}[r] \ar@{.>}[ddr] \ar@{.>}[uur] \ar@{.>}[uul] \ar@{.>}[uurrr] \ar@{.>}[ddddl] \ar@{.>}[ddddrrr] & P \ar[rruu]_{\tau} \ar[uu]_{\delta} &&& \bfV_1 \ar@{.>}[uul] \ar@{.>}[ddddl] & \bfC_1 \ar@{.>}[uur] \ar@{.>}[ddddr] && \bfmH \ar@{.>}[ddr] \ar@{.>}[uul] \ar@{.>}[uurrr] \ar@{.>}[ddddl] \ar@{.>}[ddddrrr] & &&& \bfV_1 \ar@{.>}[uul] \ar@{.>}[ddddl] \\ && \bfC_3 \ar@{.>}[dr] \ar@{.>}[uuul] && \bfV_3 \ar@{.>}[dl] \ar@{.>}[uuur] && & && \bfC_3 \ar@{.>}[dr] \ar@{.>}[uuul] && \bfV_3 \ar@{.>}[dl] \ar@{.>}[uuur] && \\ \bfC_2 \ar@{.>}[ddrrrrr] \ar@{.>}[uuuur] && \bfL_1 \ar@{.>}[ddl] \ar@{.>}[r] & *+[F-:<10pt>]{M} \ar[uu]_{\phi} & \bfL_2 \ar@{.>}[ddr] \ar@{.>}[l] && \bfV_2 \ar@{.>}[uuuul] \ar@{.>}[ddlllll] & \bfC_2 \ar@{.>}[ddrrrrr] \ar@{.>}[uuuur] && \bfL_1 \ar@{.>}[ddl] \ar@{.>}[r] & *+[F-:<10pt>]{M} \ar@/^1.25pc/[uuuurr]_{\psi} & \bfL_2 \ar@{.>}[ddr] \ar@{.>}[l] && \bfV_2 \ar@{.>}[uuuul] \ar@{.>}[ddlllll] & \\ &&&&&& & &&&&&& \\ & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & & & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & & \\ &&& \bfL_3 \ar@{.>}[ull] \ar@{.>}[urr] &&& *+[F-:<10pt>]{Q} \ar[lu] & &&& \bfL_3 \ar@{.>}[ull] \ar@{.>}[urr] &&& *+[F-:<10pt>]{Q} \ar[lu] \\ } $$ \caption{Direct acyclic graph representation of the causal model underlying the proposed IV approach for disentangling treatment and placebo effects in unblinded clinical trials. Circled and un-circled nodes represent observed and unobserved variables, respectively. Arrows represent the causal influence of a variable on another, with the influence of confounders on variables shown as dotted arrows. The $Z$ and $X$ nodes represent, respectively, the participant's assigned and received treatment, whereas $Q$ stands for the psychological encouragement treatment. The $S$ and $P$ variables represent the (unobserved) somatic and psychosomatic states of the participant, respectively. The $E$, $D$, $I$, and $M$ nodes stand for the participant's expectation of symptom intensity, desire for improved symptoms, desire-expectation interaction, and emotional level, respectively. The sets of variables $\bfU$, $\bfC_1$, $\bfC_2$, $\bfC_3$, $\bfL_1$, $\bfL_2$, $\bfL_3$, $\bfV_1$, $\bfV_2$, $\bfV_3$, and $\bfmH$ stand for unmeasured confounder variables. The $Y$ node represents the outcome variable. Panel a shows the full model. Panel b shows the reduced model where the unobserved somatic and psychosomatic states of a participant are not directly represented in the causal model.} \label{fig:dags} \end{figure} The variable $S$ represents the unmeasured biochemical/physiological (somatic) state of a participant and mediates the effect of the treatment on the outcome variable, $Y$. For instance, if $X$ represents a drug treatment, then $S$ could represent the physiological state induced by the biochemical pathways targeted by the drug. The causal effects of $X$ on $S$ and of $S$ on $Y$ are quantified, respectively, by $\eta$ and $\lambda$. The outcome variable is also influenced by the unmeasured psychosomatic state of the participant, represented by $P$. We allow $P$ to influence $Y$ via a direct path, quantified by $\tau$, and by an indirect path, mediated by $S$, and quantified by the product $\delta \, \lambda$. The combined effect of the direct and indirect paths represents the placebo effect. The direct path from $P$ to $Y$ represents the influence of the psychosomatic state on the outcome mediated by biochemical and physiological pathways distinct from the pathways influenced by the active treatment, while the influence of $P$ on $S$ allows for the possibility that $P$ also influences the same pathways targeted by the treatment $X$. (Experimental evidence that placebo effects influence biochemical pathways is provided, for example, in studies of placebo analgesia involving endogenous opioid systems\cite{price2008,levine1978,benedetti1996,grevert1983,levine1984,amanzio2001,benedetti1995}. See also figure 2 in reference\cite{finniss2010}, for empirical support about pathways influenced by both psychosocial context and drug treatments.) The role played by the expectation-desire model of emotions is made explicit by the observed variables $E$, $D$, $I$ and $M$, representing, respectively, the expected symptom intensity, the desire for symptom improvement, the interaction between expectation and desire, and the emotional level (measured, for example, by the participant's mood). According to the expectation-desire model, $M$ is directly influenced by $E$, $D$, and their interaction $I = E \times D$. The causal influence of $M$ on $P$ is quantified by $\phi$. In unblinded trials it is reasonable to expect that the treatment actually received by the participant will affect its expected symptom intensity, since participants who know they are receiving the active treatment will more likely experience an increase in their expectation to feel better. Hence, we include an arrow from $X$ to $E$. The implication is that the treatment can influence the outcome not only via the participant's somatic state, but also by its psychosomatic state via the paths $X \rightarrow E \rightarrow M \rightarrow P$ and $X \rightarrow E \rightarrow I \rightarrow M \rightarrow P$. The binary variable $Q$ represents the randomized psychological encouragement IV assuming the value 1 when a encouragement message (aiming to increase the desire for symptom improvement) is applied to the participant, and 0 otherwise. In addition to the key variables described so far, it is important to recognize the existence of unmeasured confounders. Except for the exogenous variables $Z$ and $Q$, that by construction are not associated with any unmeasured confounders, the model includes confounders influencing all pairs of endogenous variables other than $I$, namely, $X$, $E$, $D$, $M$, $P$, $S$, and $Y$. (It is not necessary to include confounders between $I$ and the other endogenous variables, since $I$ is deterministically computed as the product of $E$ and $D$). For instance, $\bfU$ represents a set of unmeasured confounder variables influencing $X$ and $Y$. In order to avoid cluttering the figure, the confounder variables influencing $S$ and $P$ and all other endogenous variables are represented by the vector of variables $\bfmH = (\bfH_1, \ldots, \bfH_{11})^T$. (For the same reason the figure does not explicitly shows the error terms, which account for unmeasured variables influencing each particular variable in the model and are uncorrelated with each other). It would be unrealistic to assume, for example, that the emotion of a participant is determined by $E$, $D$, and $I$ alone. Hence, the model allows sets of unmeasured confounders, such as $\bfL_1$, $\bfL_2$ and $\bfL_3$, to influence emotion and expectation, emotion and desire, and expectation and desire, respectively. Similarly, it would be unrealistic to assume that emotion alone influences the psychosomatic state of a participant, and the model accommodates unmeasured confounders influencing these variables as well. Although, in practice, not all endogenous variables (other than $I$) will necessarily be influenced by confounders, the model still includes confounders for all 21 pairwise combinations of endogenous variables, since we want to derive estimators for the placebo and treatment effects under the most general setting possible. In practice, however, it is impossible to accurately measure the unobserved somatic and psychosomatic states of a participant. Hence, Figure \ref{fig:dags}b presents a reduced version where $S$ and $P$ are not explicitly represented in the graph. Assuming linear relationships between $S$ and $X$, $P$ and $M$, and $Y$, $S$, and $P$, the causal influence of $X$ on $Y$ is given by $\beta = \eta \, \lambda$, while the influence of $M$ on $Y$ is given by $\psi = \phi \, \tau + \phi \, \delta \, \lambda$. Under this reduced model the instrumental variable $Q$ allows for the consistent estimation of the net placebo effect, $\psi$, using the IV estimator $\widehat{\psi} = \widehat{\cov}(Q, Y)/\widehat{\cov}(Q, M)$. Once the net placebo effect is estimated, it is possible to estimate the causal effect of $X$ on $Y$ using the IV estimator of the causal effect of $X$ on the residuals of the outcome variable after the removal of the placebo effect, $\widehat{\beta} = \widehat{\cov}(Z, \widehat{R})/\widehat{\cov}(Z, X)$, where $\widehat{R} = Y - \hat{\psi} \, M$ (see Methods for details). \section{Performance evaluation} We assessed the statistical performance of the proposed method (and compare it to a naive regression approach) in 16 simulation experiments evaluating the empirical type I error rate and empirical power of randomization tests for the null hypotheses that the placebo effect is zero, $H_0: \psi = 0$, and that the treatment effect is zero, $H_0: \beta = 0$. Descriptions of the randomization tests and simulation experiments are provided in the Methods. We simulated data from blinded and unblinded trials, in the presence and absence of confounders, according to the models presented in Figure \ref{fig:simdags}. For each setting, we ran 4 separate simulation experiments generating data: (i) under the null for treatment and placebo effects; (ii) under the alternative for treatment, and null for placebo effects; (iii) the other way around; and (iv) under the alternative for treatment and placebo effects. Each simulation experiment employed 10,000 distinct synthetic data sets with diverse characteristics (see Methods). Although the randomization tests are non-parametric procedures free of distributional assumptions, we still generated data using gaussian errors in order to met the distributional requirements of the regression based analytical tests used in our comparisons. \begin{figure}[!h] $$ {\scriptsize \[email protected]{ *+[F-:<10pt>]{Z} \ar[dr] &&& U \ar@{.>}[dll] \ar@{.>}[drr] && (a) & & *+[F-:<10pt>]{Z} \ar[dr] &&& U \ar@{.>}[dll] \ar@{.>}[drr] && (b) & \\ & *+[F-:<10pt>]{X} \ar[rrrr]^{\beta} && && *+[F-:<10pt>]{Y} & & & *+[F-:<10pt>]{X} \ar[rrrr]^{\beta} \ar[dddddd] && && *+[F-:<10pt>]{Y} & \\ &&&&&& & &&&&&& \\ C_1 \ar@{.>}[uur] \ar@{.>}[ddddr] && & &&& V_1 \ar@{.>}[uul] \ar@{.>}[ddddl] & C_1 \ar@{.>}[uur] \ar@{.>}[ddddr] && & &&& V_1 \ar@{.>}[uul] \ar@{.>}[ddddl] \\ && C_3 \ar@{.>}[dr] \ar@{.>}[uuul] && V_3 \ar@{.>}[dl] \ar@{.>}[uuur] && & && C_3 \ar@{.>}[dr] \ar@{.>}[uuul] && V_3 \ar@{.>}[dl] \ar@{.>}[uuur] && \\ C_2 \ar@{.>}[ddrrrrr] \ar@{.>}[uuuur] && L_1 \ar@{.>}[ddl] \ar@{.>}[r] & *+[F-:<10pt>]{M} \ar@/^1.25pc/[uuuurr]_{\psi} & L_2 \ar@{.>}[ddr] \ar@{.>}[l] && V_2 \ar@{.>}[uuuul] \ar@{.>}[ddlllll] & C_2 \ar@{.>}[ddrrrrr] \ar@{.>}[uuuur] && L_1 \ar@{.>}[ddl] \ar@{.>}[r] & *+[F-:<10pt>]{M} \ar@/^1.25pc/[uuuurr]_{\psi} & L_2 \ar@{.>}[ddr] \ar@{.>}[l] && V_2 \ar@{.>}[uuuul] \ar@{.>}[ddlllll] & \\ &&&&&& & &&&&&& \\ & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & & & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & \\ &&& L_3 \ar@{.>}[ull] \ar@{.>}[urr] &&& *+[F-:<10pt>]{Q} \ar[lu] & &&& L_3 \ar@{.>}[ull] \ar@{.>}[urr] &&& *+[F-:<10pt>]{Q} \ar[lu] \\ &&&&&& & &&&&&& \\ *+[F-:<10pt>]{Z} \ar[dr] &&& && (c) & & *+[F-:<10pt>]{Z} \ar[dr] &&& && (d) & \\ & *+[F-:<10pt>]{X} \ar[rrrr]^{\beta} && && *+[F-:<10pt>]{Y} & & & *+[F-:<10pt>]{X} \ar[rrrr]^{\beta} \ar[dddddd] && && *+[F-:<10pt>]{Y} & \\ &&&&&& & &&&&&& \\ && & &&& & && & &&& \\ && && && & && && && \\ && & *+[F-:<10pt>]{M} \ar@/^1.25pc/[uuuurr]_{\psi} & && & && & *+[F-:<10pt>]{M} \ar@/^1.25pc/[uuuurr]_{\psi} & && & \\ &&&&&& & &&&&&& \\ & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & & & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & \\ &&& &&& *+[F-:<10pt>]{Q} \ar[lu] & &&& &&& *+[F-:<10pt>]{Q} \ar[lu] \\ }} $$ \caption{Models used in the simulation study. Panels a and b represent, respectively, blinded and unblinded trials influenced by confounders. For simplicity we include a single confounder variable per pair of endogenous variables (other than $I$), but still simulate confounding across the 10 possible pairwise combinations of the endogenous variables $X$, $Y$, $E$, $M$, and $D$. Panels c and d represent, respectively, unconfounded blinded and unblinded trials. For simulations under the null $H_0: \psi = 0$ there are no arrows from $M$ to $Y$. Similarly, for simulations under $H_0: \beta = 0$, there are no arrows from $X$ to $Y$.} \label{fig:simdags} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{fig3.eps} \caption{Empirical type I error rates of the placebo effect null, $H_0: \psi = 0$, in both blinded and unblinded settings. Panels a and b show that, in the presence of confounders, the type I error rate of the IV approach is controlled at the exact nominal level (red and blue), whereas the regression based test leads to highly inflated error rates (orange and brown). Panels c and d show that, in the absence of confounding, both IV and regression approaches show well controlled errors. The nominal significance level is represented by $\alpha$.} \label{fig:simpsi} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{fig4.eps} \caption{Empirical type I error rates for the treatment effect null, $H_0: \beta = 0$, in the blinded setting. Panels a and b show that, in the presence of confounders, the type I error rates of the IV approaches are controlled at the exact nominal level (red and blue), whereas the regression based test leads to highly inflated error rates (brown). Panels c and d show that, in the absence of confounding, both IV and regression approaches show well controlled errors. The nominal significance level is represented by $\alpha$.} \label{fig:simbetablinded} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{fig5.eps} \caption{Empirical type I error rates for the treatment effect null, $H_0: \beta = 0$, in the unblinded setting. The two-step IV approach (blue) shows slightly inflated errors in the presence (panels a and b) and absence (panels c and d) of confounders. Note that the larger errors in panels c and d, in comparison to a and b, are likely due to the effective stronger influence of $X$ on $M$ in the simulations unaffected by confounders (the presence of confounders can considerably increase the amount of noise), so that adjustment by $\hat{\psi}$ leaks more information about $X$ in the absence than in the presence of confounders. The estimator adjusted by the true placebo effect (dark-orange) leads, nonetheless, to well controlled errors. The non-adjusted IV approach (red) leads to well controlled errors in the absence of placebo effects (panels a and c), but to highly inflated errors in the presence of placebo effects (panels b and d). Regression (brown) leads to highly inflated errors in the presence of confounders (panels a and b), but to well controlled error rates in their absence (panels c and d).} \label{fig:simbetaunblinded} \end{center} \end{figure} Figure \ref{fig:simpsi} presents the results for the placebo effect tests, and shows that the error rates of the IV approach (red and blue) are controlled at the exact nominal levels in both blinded and unblinded settings, in the presence and absence of confounders. The regression approach (brown and dark-orange), on the other hand, shows highly inflated errors in the presence of confounders (panels a and b), since the association between $M$ and $Y$, caused by confounders, is mistaken by an influence of $M$ on $Y$. Being able to control type I error rates at the exact nominal level is a desirable statistical property, as it means that the test is neither conservative nor liberal. Figure \ref{fig:simbetablinded} presents the results for the treatment effect tests in the blinded setting. In addition to the two-step estimator (blue), we also evaluated the simple IV estimator $\widehat{\beta} = \widehat{\cov}(Z, Y)/\widehat{\cov}(Z, X)$, which does not account for the placebo effect (red). The results show, again, well controlled error rates for both IV approaches, but inflated errors for the regression test (brown) in the presence of confounders (panels a and b). Figure \ref{fig:simbetaunblinded} presents the results for the unblinded case. All panels show slightly inflated errors for the two-step IV estimator (blue). The likely reason is that the estimated placebo effects are noisy and unable to completely block the influence of $X$ on $Y$ through the paths mediated by $M$. To test this supposition, we evaluated an additional IV estimator, where the true placebo effect was used in the computation of the residuals (i.e., we estimated $\beta$ by $\widehat{\beta} = \widehat{\cov}(Z, R)/\widehat{\cov}(Z, X)$, where $R = Y - \psi \, M$, instead of $\widehat{\beta} = \widehat{\cov}(Z, \widehat{R})/\widehat{\cov}(Z, X)$, where $\widehat{R} = Y - \hat{\psi} \, M$). Results based on this estimator (dark-orange) show that, indeed, adjustment by the true placebo effect leads to error rates controlled at the nominal level. The regression approach (brown) shows again highly inflated errors in the presence of confounders (panels a and b). Panels a and c show well controlled errors for the non-adjusted IV estimator (red) in the absence of placebo effects as, in this case, there are no paths from $X$ to $Y$, and the association between $X$ and $Y$ induced by confounders is accounted by the IV estimator. Panels b and d, on the other hand, show highly inflated error rates in the presence of placebo effects since, in this case, $X$ can influence $Y$ through the paths mediated by $M$. These observations suggest that, in practice, when analyzing the results of unblinded trials, we should first test for the existence of placebo effect, and then use the two-step IV estimator if $H_0: \psi = 0$ is rejected, and the non-adjusted one if $H_0: \psi = 0$ is accepted. While this strategy can decrease the chance of the two-step approach making a type I error in the absence of placebo effects, the estimator is still unable to avoid slightly inflated errors produced in the presence of placebo effects. We point out, however, that the two-step procedure still represents a strong improvement over the alternative approach of not adjusting for placebo effects in the presence of confounders (compare the red and blue curves in panel b of Figure \ref{fig:simbetaunblinded}). \begin{figure}[!b] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{suppletextfig1.eps} \caption{Empirical power to detect placebo effects in the blinded and unblinded settings. Panels a and b show the results in the presence of confounders, whereas panels c and d show the results in their absence. The regression approach (brown and dark-orange) were considerably better powered than the IV approaches (blue and red) in the presence of confounders (panels a and b), but only slightly better powered in the absence of confounders (panels c and d). Both regression and IV approaches showed similar power under the blinded and unblinded settings.} \label{fig:powerpsi} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{suppletextfig2.eps} \caption{Empirical power for detecting treatment effects in the blinded setting. The regression approach (brown) tends to be better powered than the IV approaches in the presence of confounders (panels a and b), but only slightly better in the absence of confounding (panels c and d). The two-step IV approach (blue) tends to be better powered than the non-adjusted one (red) in the presence of placebo effects (panels b and d), but both IV approaches tend to be comparable in absence of placebo effects (panels a and c).} \label{fig:powerbetablinded} \end{center} \end{figure} \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{suppletextfig3.eps} \caption{Empirical power for detecting treatment effects in the unblinded setting. The regression approach (brown) tended to be better powered than the IV approaches in the presence of confounders (panels a and b), but comparable in the absence of confounding (panels c and d). The two-step IV approach (blue) tended to be slightly better powered than the non-adjusted one (red) in the presence of placebo effect (panel b), but comparable in the other panels.} \label{fig:powerbetaunblinded} \end{center} \end{figure} For completeness, we also report an evaluation of the empirical power (Figures \ref{fig:powerpsi}, \ref{fig:powerbetablinded}, and \ref{fig:powerbetaunblinded}). We point out, however, that power results are more sensitive to the choice of parameter values employed in the generation of the simulated data (e.g., sample size, the strength of treatment, placebo and confounding effects, and etc), than the type I error rates. In any case, these empirical power results, still serve to illustrate some general patterns. For instance, the regression tests tended to show considerably stronger power than the IV approaches in the presence of confounders (compare the brown and blue curves in panels a and b of Figures \ref{fig:powerbetablinded} and \ref{fig:powerbetaunblinded}). We point out, however, that this increased power is likely an artifact of the biased estimates of $\beta$ outputted by the regression approach. Figure \ref{fig:deltabeta}, illustrates how the regression estimates tended to show larger bias than the estimates generated by the IV estimators (note the heavier tails of the brown density, in both blinded and unblinded cases). In other words, the increased power is likely a consequence of the overestimation of the treatment effect by the regression approach, which mistakenly interprets the association between treatment and outcome caused by unmeasured confounders as a stronger influence of the treatment on the outcome. \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{suppletextfig4.eps} \caption{Comparison of the bias of the regression and IV estimators. Panels a and b show the densities of the difference between true and estimated treatment effects, $\beta - \hat{\beta}$, in the blinded and unblinded settings, respectively. In both settings we observed larger bias in the regression estimates, in comparison to the IV approaches, as illustrated by the heavier tails of the brown densities.} \label{fig:deltabeta} \end{center} \end{figure} At least for the parameter ranges adopted in our simulations, we observed good empirical power of the IV approach to detect placebo effects, even when the correlation between psychological encouragement and emotional level was relatively low (Figure \ref{fig:stratifiedpower}a). This suggests that the psychological encouragement treatment does not need to be highly effective in manipulating the emotional levels, in order for the approach to work well in practice. Similarly, Figure \ref{fig:stratifiedpower}b shows good empirical power of the two-step IV approach to detect treatment effects when the correlation between the assigned and received treatment is moderate, suggesting that the proposed approach does not require high levels of compliance in order to perform well. \begin{figure}[!h] \begin{center} \includegraphics[angle=270, scale = 0.61, clip]{suppletextfig5.eps} \caption{Empirical power curves stratified by strength of association with the IV variable. Panel a shows the power curves for the placebo effect IV estimator $\hat{\psi}$, stratified according to the correlation between $Q$ and $M$ (panel c shows the distribution of the correlation between $Q$ and $M$ across all simulations used to construct the power curves in panel a). Panel b shows the power curves for the two-step treatment effect IV estimator $\hat{\beta}$, stratified according to the correlation between $Z$ and $X$ (panel d shows the distribution of the correlation between $Z$ and $X$ over the simulations used to estimate the power curves in panel b). Results based on blinded and unblinded simulations influence by confounders.} \label{fig:stratifiedpower} \end{center} \end{figure} \begin{figure}[!h] \includegraphics[angle=270, scale = 0.61, clip]{supplefig1.eps} \caption{Consistency of the $\hat{\psi}$ and $\hat{\beta}$ estimators. Panels a and b present, respectively, the densities of $\psi - \hat{\psi}$ and $\beta - \hat{\beta}$ for 5 increasing sample size ranges, and illustrate the consistency of the $\hat{\psi}$ and $\hat{\beta}$ estimators (which tend to get closer to the true parameter values as the sample size increases). Panel c shows that, as expected, the statistical power to detect a treatment effect increases with the sample size. Panel d, on the other hand, shows that increasing sample sizes do not reduce type I error rates, even though we are able to better estimate the placebo effects. The likely reason is that while larger sample sizes lead to better $\hat{\psi}$ estimates, they also increase the statistical power to detect very small effects, so that the advantage of a more precise estimate of $\hat{\psi}$ is counterbalanced by the increased propensity to detect small and spurious treatment effects as true signals. Results were based on data simulated from unblinded trials influenced by placebo effects and counfounders, as described in the Methods section.} \label{sfig:suppleconsitency} \end{figure} \begin{figure}[!b] \includegraphics[angle=270, scale = 0.61, clip]{rand_conf_int.eps} \caption{Randomization confidence intervals for placebo and treatment effects. The brown, dark-green and blue curves show the one-sided p-value profiles derived from randomization tests for 3 simulated data sets of increasing sizes (300, 900, and 2,700, respectively), generated under the unblinded setting influenced by confounders (all simulation parameters, other than sample size, were set to 1). The 95\% confidence intervals for the placebo (panel a) and treatment effects (panel b) are shown by the respective double-headed colored arrows. The red vertical line corresponds to the true parameter values, $\psi = 1$ and $\beta = 1$.} \label{fig:randconfint} \end{figure} A natural question, at this point, is whether larger sample sizes (and, hence, more precise estimates of $\hat{\psi}$) would be able to decrease the slightly inflated error rates produced by the two-step estimator in unblinded trials. Figure \ref{sfig:suppleconsitency} presents additional simulation experiments showing that, while the empirical power and the $\hat{\psi}$ and $\hat{\beta}$ estimates are greatly improved by larger sample sizes, the type I error rates stay roughly the same (likely because larger sample sizes increase the ability of a test to detect small effects, since the randomization null distributions tend to be more concentrated around 0, so that the improved $\hat{\psi}$ estimates are counterbalanced by the increased propensity to detect small and spurious treatment effects). These results suggest that special care must be taken while interpreting the results of hypothesis tests in the unblinded case, even for large sample sizes. In any case, when the goal is estimation rather than testing, the consistency of the two-step estimator guarantees that the treatment estimates will converge to the true value as the sample size increases. This observation is particularly important in view of the current trend in the biomedical field, where researchers are shifting from relying exclusively in p-values and are paying more attention to parameter estimates and confidence intervals. To meet this latter need, we also describe in the Methods how to generate confidence intervals (CIs) for placebo and treatment effects by inverting randomization tests. Figure \ref{fig:randconfint} shows 95\% CIs for the placebo and treatment effects, from 3 simulated data sets of increasing sizes. The randomization CIs inherit the statistical properties of the randomization tests, hence, the placebo effect CIs (and treatment effect CIs from blinded trials) are exact in the sense that a $100 (1 - \alpha)$\% interval will contain the true parameter value $100 (1 - \alpha)$\% of the time. Note that while the treatment effect CIs from unblinded trails won't be exact, they are still going to be centered around the estimated treatment effect, which will, nevertheless, converge to the true value as the sample size increases. \section{Discussion} Clinical trials traditionally employ blinding to control the influence of placebo effects. It has being pointed out, however, that even blinded studies might be influenced by placebo effects, as the patients perceptions and beliefs about the treatment they think they received are able to trigger strong placebo effects\cite{price2008,mcrae2004,bausell2005}. Recently, a number of statistical approaches have been proposed to quantify the contributions of treatment and placebo effects to a clinical outcome\cite{zhang2013,jamshidian2014,liu2016}. These approaches, nonetheless, are tailored to blinded trials, and leverage blinding assessment data to quantify the amount of unmasking taking place during the trial. Our IV approach, on the other hand, allows the quantification of treatment and placebo effects not only in blinded, but also in unblinded trials. The key idea underlying the IV approach (what actually allows the consistent estimation of both treatment and placebo effects in the presence of unmeasured confounders), is the use of randomization to separately manipulate the treatment assignment and encouragement messages. In this sense, the proposed approach is similar in spirit (but not exactly equivalent) to a randomized treatment-belief trial (RTB)\cite{roy2012}, where the treatment assignment is manipulated by randomization, whereas the belief is manipulated by varying the allocation ratio of participants assigned to control and treatment groups in a, necessarily, blinded trial. Hence, our IV approach can be viewed as a more flexible type of RTB that is applicable to both blinded and unblinded studies, and might be easier to administer than a standard RTB, which requires the stratification of study participants over several arms with distinct treatment/control allocation ratios in order to be able to assess placebo effects. The proposed IV approach enjoys appealing statistical properties. The IV estimators are consistent, meaning that the estimates converge to the true values as sample size increases. The randomization tests for placebo effects are exact in both blinded and unblinded trails, whereas the treatment effect tests are exact in blinded trials, but slightly liberal in unblinded ones. Furthermore, the confidence intervals obtained by inverting randomization tests inherit these appealing properties. An implicit assumption of the model in Figure \ref{fig:dags}a is that the placebo effect is mediated exclusively by the interplay of desire, expectation, and emotion. While it is believed that the desire-expectation model plays a key role in the triggering of placebo effects, other mechanisms, such as conditioning, might also be at work\cite{price2008,finniss2010}. Clearly, when this is the case, a treatment effect estimate, adjusted by the desire-expectation component alone, will still be biased (although less biased than the estimate computed without accounting for it). In any case, if we are also able to assess and measure these additional mechanisms, then the same statistical framework can be used to obtain consistent estimates of treatment effects in the presence of confounders (we only need additional IVs to manipulate the additional placebo related variables). Figure \ref{sfig:suppledag} shows an example. \begin{figure}[!h] $$ {\tiny \[email protected]{ *+[F-:<10pt>]{Z} \ar[dr] &&& U \ar@{.>}[dll] \ar@{.>}[drr] && (a) & \\ & *+[F-:<10pt>]{X} \ar[rrrr]^{\beta} \ar[dddddd] \ar[rrd] && && *+[F-:<10pt>]{Y} & \\ && C_4 \ar@{.>}[r] \ar@{.>}[lu] & *+[F-:<10pt>]{A} \ar[rru]^{\kappa} & V_4 \ar@{.>}[l] \ar@{.>}[ru] && \\ C_1 \ar@{.>}[uur] \ar@{.>}[ddddr] &&& *+[F-:<10pt>]{W} \ar[u] &&& V_1 \ar@{.>}[uul] \ar@{.>}[ddddl] \\ && C_3 \ar@{.>}[dr] \ar@{.>}[uuul] & & V_3 \ar@{.>}[dl] \ar@{.>}[uuur] && \\ C_2 \ar@{.>}[ddrrrrr] \ar@{.>}[uuuur] && L_1 \ar@{.>}[ddl] \ar@{.>}[r] & *+[F-:<10pt>]{M} \ar@/^0.25pc/[uuuurr]_{\psi} & L_2 \ar@{.>}[ddr] \ar@{.>}[l] && V_2 \ar@{.>}[uuuul] \ar@{.>}[ddlllll] \\ &&&&&& \\ & *+[F-:<10pt>]{E} \ar[rruu] \ar[rr] && *+[F-:<10pt>]{I} \ar[uu] && *+[F-:<10pt>]{D} \ar[lluu] \ar[ll] & \\ &&& L_3 \ar@{.>}[ull] \ar@{.>}[urr] &&& *+[F-:<10pt>]{Q} \ar[lu] \\ }} $$ \includegraphics[angle=270, scale = 0.61, clip]{supplefig2.eps} \caption{A more complex example. Panel a presents a more complex model where the placebo effect is mediated by $M$ (according to the desire-expectation model) but also by an additional variable $A$. Assuming that a randomized instrument, $W$, is available to manipulate $A$, we can estimate the treatment effect using the estimator $\hat{\beta}^\ast = \widehat{\cov}(Z, \hat{R}^\ast)/\widehat{\cov}(Z, X)$ where $\hat{R}^\ast = Y - \hat{\psi} \, M - \hat{\kappa} \, A$. Panel b shows the empirical type I error rates for a simulation experiment under the unblinded setting influenced by confounders. The IV estimator adjusted by the true $\psi$ and $\kappa$ values is able to control error rates at the nominal levels (dark-orange). The IV estimator adjusted by $\hat{\psi}$ and $\hat{\kappa}$ shows slightly inflated errors (dark-green). As expected, adjustment with $\hat{\psi}$ alone (blue) leads to higher error rates than adjustment with both $\hat{\psi}$ and $\hat{\kappa}$. Similarly, the IV estimator using no adjustment (red) has higher errors than adjustment by $\hat{\psi}$ alone. The regression based estimator (brown) is adjusted by both $M$ and $A$ covariates, but still leads to inflated errors due to the presence of confounders. Panel c shows the empirical power results.} \label{sfig:suppledag} \end{figure} From a pragmatic perspective, the proposed method is easy to implement. It only requires the ability to assess expectation, desire, and emotion, as well as, the development of a psychological encouragement IV, capable of manipulating the level of desire of a study participant. For example, in trials run into a clinic, a simple encouragement conversation with a caregiver would work as the ``active treatment" of the psychological encouragement IV. The desire and emotional level could then be recorded by a questionnaire or interview after the encouragement treatment, but prior to the measurement of the outcome variable. Another application of the proposed method (the one that actually motivated this work) is in the personalized monitoring of treatment response in mobile health. The statistical validity of using treatment assignment as an IV, in the context of longitudinal data provided by a single patient, has been established in reference\cite{chaibubneto2016}. However, as pointed out by the authors, it is impossible to disentangle treatment and placebo effects based on the treatment assignment IV alone, since it is impossible to blind the patient to a self administered treatment. Implementation of the proposed IV approach in mobile health applications is also strait-forward. For instance, the psychological treatment could be delivered by encouragement messages popping up in the screen of a smartphone (according to a randomized schedule, where every day the participant has an equal chance of receiving, or not, the encouragement message), and the measurement of the emotional and desire levels can be assessed by short electronic surveys/quentionnaires delivered by the participant's smartphone on a daily basis. We expect the proposed method to play an important role in these personalized medicine\cite{schork2015,topol2012} applications. Finally, for both (population-based) clinical trials and personalized monitoring of treatment response, the instrument $Q$ serves the double role of disentangling placebo from treatment effects, and increasing the desire for improved symptoms. This latter capacity can induce a placebo effect and ultimately lead to more positive clinical outcomes. While the manipulation of the expectation for symptom intensity could, in principle, be used to consistently estimate a placebo effect under the proposed approach (i.e., we could have an IV influencing $E$ instead of $D$), the manipulation of expectation levels needs to be accompanied by the honest disclosure of the expected benefits of a treatment (and, in some cases, might raise ethical issues)\cite{finniss2010}. Manipulation of the desire for improved symptoms, on the other hand, provides an ethically defensible practice in the design of clinical trials and in the personalized monitoring of patients. \section{Methods} \subsection{Identification of causal effects using instrumental variables} We subscribe to the mechanism-based account of causation championed by Pearl\cite{pearl2000}. In this framework, the qualitative description of the assumptions regarding the causal relations between the variables involved in our proposed method, is encoded by the directed acyclic graph presented in Figure \ref{fig:dags}a. Assuming a linear relation between the outcome, $Y$, and the unobserved somatic and psychosomatic state variables, $S$ and $P$, we have that, \begin{equation} Y = \mu_Y + \lambda \, S + \tau \, P + f_Y(\bfU, \bfmV, \bfmH) + \epsilon_Y~, \label{eq:linearYfull} \end{equation} where $\bfmV = (\bfV_1, \bfV_2, \bfV_3)^T$, $\bfmH = (\bfH_1, \ldots, \bfH_{11})^T$, $\epsilon_Y$ represents an error term accounting for the unmeasured variables influencing exclusively $Y$, and $f_Y(\bfU, \bfmV, \bfmH)$ represents is a general scalar function of the variables in $(\bfU, \bfmV, \bfmH)$ influencing $Y$. Since $S$ and $P$ are unobserved variables, we need to derive the reduced model for the outcome variable that is not a function of $S$ and $P$. Assuming a linear relation between $P$ and $M$, and between $S$ and $P$ and $X$, we have that, \begin{align} P &= \mu_P + \phi \, M + f_P(\bfmH) + \epsilon_P~, \label{eq:linearP} \\ S &= \mu_S + \eta \, X + \delta \, P + f_S(\bfmH) + \epsilon_S~, \label{eq:linearS} \end{align} where $f_P(\bfmH)$ and $f_S(\bfmH)$ are arbitrary scalar functions of $\bfmH$, and $\epsilon_P$ and $\epsilon_S$ are the respective error terms influencing $P$ and $S$, respectively (we also assume that all variable specific error terms are uncorrelated). Substituting equations (\ref{eq:linearP}) and (\ref{eq:linearS}) into equation (\ref{eq:linearYfull}), we obtain the reduced outcome model, \begin{equation} Y = \mu_Y^\ast + \beta \, X + \psi \, M + f^\ast(\bfU, \bfmV, \bfmH) + \epsilon_Y^\ast \label{eq:linearYreduced} \end{equation} where $\beta = \eta \, \lambda$, $\psi = \phi \, \tau + \phi \, \delta \, \lambda$, $\mu_Y^\ast = \mu_Y + \lambda \, \mu_S + (\tau + \delta \, \lambda) \, \mu_P$, $\epsilon_Y^\ast = \epsilon_Y + \lambda \, \epsilon_S + (\tau + \delta \, \lambda) \, \epsilon_P$, and $f^\ast(\bfU, \bfmV, \bfmH) = f_Y(\bfU, \bfmV, \bfmH) + \lambda \, f_S(\bfmH) + (\tau + \delta \, \lambda) \, f_P(\bfmH)$. Equation (\ref{eq:linearYreduced}) represents the outcome model in Figure \ref{fig:dags}b. Because the instrumental variable $Q$ is randomized, and hence statistically independent of any variables that are not directly or indirectly influenced by $Q$, it follows from equation (\ref{eq:linearYreduced}) and standard properties of the covariance operator that, \begin{align} \cov(Q, Y) &= \cov(Q, \mu_Y^\ast) + \beta \, \cov(Q, X) + \psi \, \cov(Q, M) + \\ \nonumber & \;\;\;\; + \cov(Q, f^\ast(\bfU, \bfmV, \bfmH)) + \cov(Q, \epsilon_Y^\ast) \\ \nonumber &= \psi \, \cov(Q, M)~, \end{align} since $Q \ci \mu_Y^\ast$, $Q \ci X$, $Q \ci f^\ast(\bfU, \bfmV, \bfmH)$, and $Q \ci \epsilon_Y^\ast$, and the respective covariance terms are 0 (here, the symbol $\ci$ stands for statistical independence). Therefore, $\psi$ can be identified as, \begin{equation} \psi = \frac{\cov(Q, Y)}{\cov(Q, M)}~, \label{eq:placeboeffect} \end{equation} as long as $\cov(Q, M) \not= 0$ (in practice, this condition is met if the psychological encouragement treatment can effectively manipulate the desire for improved symptoms, which, by its turn influences the emotional state, $M$). Now, if we let $R = Y - \psi \, M$ represent the residual of the outcome variable, after removal of the placebo effect, then we can rewrite equation (\ref{eq:linearYreduced}) as, \begin{equation} R = \mu_Y^\ast + \beta \, X + f^\ast(\bfU, \bfmV, \bfmH) + \epsilon_Y^\ast~. \label{eq:residualY} \end{equation} Because $Z$ is also randomized, it follows from equation (\ref{eq:residualY}) and the properties of the covariance operator that, \begin{align} \cov(Z, R) &= \cov(Z, \mu_Y^\ast) + \beta \, \cov(Z, X) + \\ \nonumber & \;\;\;\; + \cov(Z, f^\ast(\bfU, \bfmV, \bfmH)) + \cov(Z, \epsilon_Y^\ast) \\ \nonumber &= \beta \, \cov(Z, X)~, \end{align} since $Z \ci \mu_Y^\ast$, $Z \ci f^\ast(\bfU, \bfmV, \bfmH)$, and $Z \ci \epsilon_Y^\ast$. Hence, the treatment effect $\beta$ can be identified as, \begin{equation} \beta = \frac{\cov(Z, R)}{\cov(Z, X)}~, \label{eq:treatmenteffect} \end{equation} as long as $\cov(Z, X) \not= 0$ (in practice, this condition is met whenever there is some degree of compliance between assigned and received treatments). Note that in addition to the three core assumptions required by an IV\cite{didelez2010} (namely, that it is statistically independent of any unmeasured confounders; is marginally associated with the treatment variable; and is associated with the outcome variable exclusively through its influence on the treatment variable), the above derivations require that $X$ and $M$ are linearly related to $Y$, but make no assumptions about the relationship between $Y$ and the unmeasured confounders. Estimators for the placebo and treatment effects in equations (\ref{eq:placeboeffect}) and (\ref{eq:treatmenteffect}) are presented in the next subsection. An alternative statistical framework, based on Rubin's potential outcomes approach to causality\cite{rubin1978,imbensrubin2015}, has been proposed in the literature to address partial compliance in studies involving binary instrumental and treatment variables\cite{angrist1996,imbensrubin2015}. While the method in reference\cite{angrist1996} is not directly applicable to the estimation of the placebo effects, it could be used to estimate treatment effects (after removal of the placebo effect). We point out, however, that the estimator obtained from the potential outcome approach is still identical to the estimator derived from the mechanism based approach, so that statistical inferences based on randomization tests are still the same, independent of the causality framework one is willing to adopt. \subsection{Two-step estimation procedure} Adopting a method of moments approach, we have that a consistent estimator for $\psi$ is given by, \begin{equation} \hat{\psi} = \frac{\widehat{\cov}(Q, Y)}{\widehat{\cov}(Q, M)} = \frac{\frac{1}{n} \sum_{k=1}^{n} Q_{k} Y_{k} - (\frac{1}{n} \sum_{k=1}^{n} Q_{k}) (\frac{1}{n} \sum_{k=1}^{n} Y_{k})}{\frac{1}{n} \sum_{k=1}^{n} Q_{k} M_{k} - (\frac{1}{n} \sum_{k=1}^{n} Q_{k}) (\frac{1}{n} \sum_{k=1}^{n} M_{k})}~. \label{eq:placeboIVestimator} \end{equation} Note that the above placebo effect estimator requires measurements of $M$, but not of $E$ or $D$. We point out, however, that if expectation and desire measurements are also available, then we can evaluate the validity of the desire-expectation model for the data at hand by checking whether the $E$, $D$, and $I$ variables are able to predict the $M$ measurements. We can also assess the effectiveness of the psychological treatment in influencing desire for better symptoms by estimating $\mbox{Cor}(Q, D)$. Direct estimation of the treatment effect in equation (\ref{eq:treatmenteffect}) using an IV estimator is unfeasible, as it would involve the unmeasured quantities $R_k = Y - \psi \, M_k$. Therefore, in order to obtain a consistent estimator of the treatment effect, we adopt a two-step approach where we first estimate $R_k$ as $\widehat{R}_{k} = Y_k - \hat{\psi} \, M_k$, for $k = 1, \ldots, n$, and then estimate $\beta$ using, \begin{equation} \hat{\beta} = \frac{\widehat{\cov}(Z, \widehat{R})}{\widehat{\cov}(Z, X)} = \frac{\frac{1}{n} \sum_{k=1}^{n} Z_{k} \widehat{R}_{k} - (\frac{1}{n} \sum_{k=1}^{n} Z_{k}) (\frac{1}{n} \sum_{k=1}^{n} \widehat{R}_{k})}{\frac{1}{n} \sum_{k=1}^{n} Z_{k} X_{k} - (\frac{1}{n} \sum_{k=1}^{n} Z_{k}) (\frac{1}{n} \sum_{k=1}^{n} X_{k})}~. \label{eq:treatmentIVestimator} \end{equation} Note that the IV estimators in equations (\ref{eq:placeboIVestimator}) and (\ref{eq:treatmentIVestimator}) can produce highly inflated estimates when $\widehat{\cov}(Q, M) \approx 0$ and $\widehat{\cov}(Z, X) \approx 0$. Hence, in practice, it is important to check the assumptions that psychological encouragement influences the emotion levels, and that the compliance between assigned and received treatments is not negligible. \subsection{Randomization tests for $H_0: \psi = 0$ and $H_0: \beta = 0$} We implemented randomization tests\cite{ernst2004} for testing the presence of a placebo effect ($H_0: \psi = 0$ versus $H_1: \psi \not= 0$), and of a treatment effect ($H_0: \beta = 0$ versus $H_1: \beta \not= 0$). The randomization null distribution for the placebo effect is generated by evaluating the statistic $\hat{\psi}$ in equation (\ref{eq:placeboIVestimator}) on a large number of shuffled versions of the data, where the $Y_k$ measurements are shuffled relative to the $(Q_k, M_k)$ measurements (whose connection is kept intact in order to preserve the association between the $Q$ and $M$ variables). The randomization null for treatment effect is generated by first calculating the residuals, $\widehat{R}_{k} = Y_k - \hat{\psi} \, M_k$, where $\hat{\psi}$ is computed in the observed (not permuted) data, and then evaluating the statistic $\hat{\beta}$ in equation (\ref{eq:treatmentIVestimator}) in shuffled data sets, where $R_k$ is shuffled relative to $(Z_k, X_k)$ data (whose connection is kept intact to preserve the association between $Z$ and $X$). These randomization tests are non-parametric procedures and don't make any distributional assumptions about the data. However, because the identification of the causal effects assumes a linear relation between $Y$ and $X$ and $M$, the validity of the tests is still contingent on this assumption. \subsection{Randomization confidence intervals} Here we describe how to build confidence intervals for placebo and treatment effects using the p-values from randomization tests\cite{garthwaite1996,ernst2004}. Throughout this section we use $\theta$ to represent either the placebo effect, $\psi$, or the treatment effect, $\beta$. The procedure is strait-forward but requires a considerable amount of computation (which, nonetheless, can be easily parallelized). Assume for a moment that randomization tests for testing $H_0: \theta = \theta_j$ against one-sided alternative hypotheses $H_1: \theta < \theta_j$ and $H_1: \theta > \theta_j$ are available. Exploring the correspondence between confidence intervals and hypothesis tests, we obtain a $100 (1 - 2 \alpha)$\% confidence interval (CI) for $\theta$ by searching for a lower bound value, $\theta_L$, such that $H_0: \theta = \theta_L$ is rejected in favor of $H_1: \theta > \theta_L$ at a significance $\alpha$, and by searching for an upper bound value, $\theta_U$, such that $H_0: \theta = \theta_U$ is rejected in favor of $H_1: \theta < \theta_U$ at the same significance level\cite{garthwaite1996}. While an efficient algorithm for finding CI bounds has been proposed\cite{garthwaite1996}, the approach requires the specification of the significant level before hand. In order to avoid this constraint, we generate a one-sided randomization p-value profile which can be used to determine the $100 (1 - 2 \alpha)$\% CI for any desired $\alpha$ level. This p-value profile is generated as follows: ($i$) compute the observed placebo or treatment effect estimate, $\hat{\theta}$; ($ii$) for each $\theta_j < \hat{\theta}$, in a grid of decreasing $\theta_j$ values, compute the randomization p-value from the one-sided test $H_0: \theta = \theta_j$ vs $H_1: \theta > \theta_j$; ($iii$) repeat step $ii$ until a p-value equal to zero is reached; ($iv$) for each $\theta_j > \hat{\theta}$, in a grid of increasing $\theta_j$ values, compute the p-value from the one-sided test $H_0: \theta = \theta_j$ vs $H_1: \theta < \theta_j$; ($v$) repeat step $iv$ until a randomization p-value equal to zero is found. Before we explain how to generate null distributions for placebo effects different from zero, consider first the intention-to-treat (ITT) estimator, \begin{equation} \widehat{ITT}_\psi = \frac{\sum_{k=1}^{n} Y_k \, \ind\{ Q_k = 1 \}}{\sum_{k=1}^{n} \ind\{ Q_k = 1 \}} - \frac{\sum_{k=1}^{n} Y_k \, \ind\{ Q_k = 0 \}}{\sum_{k=1}^{n} \ind\{ Q_k = 0\}} = \frac{\widehat{\cov}(Q, Y)}{\widehat{\mbox{Var}}(Q)}~. \end{equation} Instead of directly generating a randomization distribution under the null $H_0: \psi = \psi_j$, we generate a randomization distribution under the equivalent null hypothesis that the intention-to-treat effect is equal to $\psi_j \, K_1$, where $K_1 = \widehat{\cov}(Q, M)/\widehat{\mbox{Var}}(Q)$ is constant across all permutations of the response data used in the construction of the randomization null. (Note that, because $\widehat{ITT}_\psi = K_1 \, \hat{\psi}$ the randomization tests based on $\hat{\psi}$ and $\widehat{ITT}_\psi$ estimators produce exactly the same p-value if we use the same permutations of the response data in the construction of their null distributions.) The practical advantage of the test based on $\mbox{ITT}_\psi$ effects is that it amounts to a simple two sample location problem for testing whether the difference in average response between the assigned treatment (psychological encouragement) and assigned control (no encouragement) groups is equal to $\psi_j \, K_1$. The implementation of randomization tests for this two sample location problem is strait-forward\cite{garthwaite1996}: we only need to add $\psi_j \, K_1$ for each $Y_k$ data point in the assigned control group (i.e., $k$ for which $Q_k = 0$), while leaving the response data from the assigned treatment group, $Q_k = 1$, unchanged, and then run a randomization test for testing the null hypothesis that the $\mbox{ITT}_\psi$ effect is equal to zero, against the alternative one-sided hypothesis that it is positive, and against the alternative that it is negative. Similarly, for the treatment effects we consider the two-step ITT estimator, \begin{equation} \widehat{ITT}_\beta = \frac{\sum_{k=1}^{n} \hat{R}_k \, \ind\{ Z_k = 1 \}}{\sum_{k=1}^{n} \ind\{ Z_k = 1 \}} - \frac{\sum_{k=1}^{n} \hat{R}_k \, \ind\{ Z_k = 0 \}}{\sum_{k=1}^{n} \ind\{ Z_k = 0\}} = \frac{\widehat{\cov}(Z, \hat{R})}{\widehat{\mbox{Var}}(Z)}~, \end{equation} and generate randomization distributions under the equivalent null hypotheses $H_0: \mbox{ITT}_\beta = \beta_j \, K_2$, where $K_2 = \widehat{\cov}(Z, X)/\widehat{\mbox{Var}}(Z)$, by simply adding $\beta_j \, K_2$ for each $\hat{R}_k$ data point in the assigned control group, $Z_k = 0$, while leaving the residual data from the assigned treatment group, $Z_k = 1$, unchanged (and then testing for the null that the $\mbox{ITT}_\beta$ is equal to zero, against the alternative one-sided hypotheses that it is positive and the alternative that it is negative0. \subsection{Adjustment for observed confounders} If measured confounders influencing both $X$ and $Y$ are available, it is possible to adjust for them by simply working with the residuals of $X$ and $Y$ (computed by separately regressing $X$ and $Y$ on the confounders). Similarly, if measured confounders influencing both $M$ and $Y$ are available, it is possible to adjust for them by working with the respective residuals. \subsection{Regression based estimators and tests} We compare the proposed IV estimators, and their respective randomization tests, to standard estimators and analytical hypothesis tests based on the linear regression of the outcome variable, $Y$, on both the received treatment, $X$, and emotion level, $M$, according to the model, $Y = \mu_Y + \beta \, X + \psi \, M + \epsilon_Y$. Under this regression based approach, we estimate $\beta$ and $\psi$ using ordinary least squares, and test the null hypotheses $H_0: \psi = 0$ and $H_0: \beta = 0$ using standard t-tests. In our simulations (described next), we generate data using gaussian errors, so that the distributional assumptions underlying the analytical t-tests are met. \subsection{Simulation experiments details} We simulated data from blinded and unblinded settings, in the presence or absence of confounding, according to the models presented in Figure \ref{fig:simdags}. For each of these settings, we run 4 separate simulation studies generating data: (i) under the null hypothesis that both treatment and placebo effect are zero, $H_0: \beta = 0$ and $H_0: \psi = 0$; (ii) under the alternative for treatment effects, $H_1: \beta \not= 0$, but null for placebo effects, $H_0: \psi = 0$; (iii) the other way around, $H_0: \beta = 0$ and $H_1: \psi \not= 0$; and (iv) under the alternative for both treatment and placebo effects, $H_1: \beta \not= 0$ and $H_1: \psi \not= 0$. Each simulated data set was generated as follows. The IVs $Z$ and $Q$ were sampled from $\mbox{Bernoulli}(1/2)$ distributions. All confounding variables were sampled from $\mbox{Normal}(0, 1)$ distributions. The binary variables $X$, $E$, and $D$ were generated by the threshold models, \begin{align} X &= \ind\{ \theta_{XZ} \, Z + \theta_{XU} \, U + \theta_{XC_1} \, C_1 + \theta_{XC_2} \, C_2 + \theta_{XC_3} \, C_3 + \epsilon_{X} > 0 \}~, \\ E &= \ind\{ \theta_{EX} \, X + \theta_{EC_1} \, C_1 + \theta_{EL_1} \, L_1 + \theta_{EV_2} \, V_2 + \theta_{EL_3} \, L_3 + \epsilon_{E} > 0 \}~, \\ D &= \ind\{ \theta_{DQ} \, Q + \theta_{DV_1} \, V_1 + \theta_{DC_2} \, C_2 + \theta_{DL_2} \, L_2 + \theta_{DL_3} \, L_3 + \epsilon_{D} > 0 \}~, \end{align} where $\epsilon_{X}$, $\epsilon_{E}$, and $\epsilon_{D}$ were sampled from $\mbox{Normal}(0, 1)$ distributions. The interaction $I$ was generated as the product of $E$ and $D$. Finally, the emotion and outcome data were generated from the linear models, \begin{equation} M = \theta_{ME} \, E + \theta_{MD} \, D + \theta_{MI} \, I + \theta_{ML_1} \, L_1 + \theta_{ML_2} \, L_2 + \theta_{MC_3} \, C_3 + \theta_{MV_3} \, V_3 + \epsilon_{M}~, \vspace{-0.3cm} \end{equation} \begin{equation} Y = \theta_{YX} \, X + \theta_{YM} \, M + \theta_{YU} \, U + \theta_{YV_1} \, V_1 + \theta_{YV_2} \, V_2 + \theta_{YV_3} \, V_3 + \epsilon_{Y}~, \end{equation} where $\epsilon_{M}$ and $\epsilon_{Y}$ were sampled from $\mbox{Normal}(0, 1)$ distributions. (Note that the explicit form of the desire-expectation model of emotions is unimportant, as the estimator for $\psi$ depends on the observed values of $M$, but not of $E$, $D$, and $I$, and does not require an explicit description of the functional relationships between $M$ and $E$, $D$, and $I$. Hence, for simplicity, we adopt a simple linear relation, even though more sophisticated relations could have been used.) Each simulation experiment comprised 10,000 distinct synthetic data sets. Each simulated data set was generated using a unique combination of simulation parameter values. In order to select parameter values spread as uniformly as possible over the entire parameter range we employed a Latin hypercube design\cite{santner2003}, optimized according to the maximin distance criterium \cite{johnson1990}, in the determination of the parameter values used on each of the 10,000 simulated data sets for each simulation experiment. We selected wide ranges for all model parameters. Explicitly, the parameters representing the effect of confounders on the observed variables (namely, $\theta_{XU}$, $\theta_{XC_1}$, $\theta_{XC_2}$, $\theta_{XC_3}$, $\theta_{EC_1}$, $\theta_{EL_1}$, $\theta_{EV_2}$, $\theta_{EL_3}$, $\theta_{DV_1}$, $\theta_{DC_2}$, $\theta_{DL_2}$, $\theta_{DL_3}$, $\theta_{ML_1}$, $\theta_{ML_2}$, $\theta_{MC_3}$, $\theta_{MV_3}$, $\theta_{YU}$, $\theta_{YV_1}$, $\theta_{YV_2}$, and $\theta_{YV_3}$) were selected in the range $[-2, 2]$ for the simulations under the influence of confounders, but were set to 0 in the simulations under unconfounded conditions. The effect of $Z$ on $X$ ($\theta_{XZ}$), and of $Q$ on $D$ ($\theta_{DQ}$), as well as, the effects of $E$, $D$, and $I$ on $M$ ($\theta_{ME}$, $\theta_{MD}$, and $\theta_{MI}$) were selected in the range $[1, 2]$. The effect of $X$ on $E$ ($\theta_{EX}$) was set to 0 in the blinded setting simulations, and selected in the range $[1, 2]$ in the unblinded simulations. The treatment effect ($\beta$) and the placebo effect ($\psi$) parameters were set to 0 in the simulations under the null hypothesis, and were selected in the range $[-2, 2]$ for the simulations under the alternative hypothesis. The range of sample size parameter, $n$, was set to realistic values we expect to see in practice, $\{100, 101, \ldots, 1000\}$. For any fixed significance level $\alpha$, the empirical type I error rate was computed as the fraction of the p-values smaller than $\alpha$ over the data sets simulated under the null hypothesis, whereas the empirical power was calculated as the fraction of p-value smaller than $\alpha$ over data sets generated under the alternative hypothesis. \section{Acknowledgements} This work was funded by the Robert Wood Johnson Foundation.
{'timestamp': '2016-06-22T02:16:21', 'yymm': '1606', 'arxiv_id': '1606.04896', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04896'}
arxiv
\section{Introduction} Can we effectively predict one of $K$ classes in polylogarithmic time in $K$? This question gives rise to the area of extreme multiclass classification~\cite{bengio2010label,FilterTree,bhatia2015locally,Lomtree,morin2005hierarchical,prabhu2014fastxml,weston2013label}, in which $K$ is very large. If efficiency is not a concern, the most common and generally effective representation for multiclass prediction is a one-against-all (OAA) structure. Here, inference consists of computing a score for each class and returning the class with the maximum score. An attractive strategy for picking one of $K$ items efficiently is to use a tree; unfortunately, this often comes at the cost of increased error. A general replacement for the one-against-all approach must satisfy a difficult set of desiderata. \begin{itemize}[noitemsep,nolistsep] \item High accuracy: The approach should provide accuracy competitive with OAA, a remarkably strong baseline\cite{rifkin2004defense} which is the standard ``output layer'' of many learning systems such as winners of the ImageNet contest~\cite{resnet,VGG}. \item High speed at training time \emph{and} test time: A multiclass classifier must spend at least $\Omega(\log K)$ time~\cite{Lomtree}) so this is a natural benchmark to optimize against. \item Online operation: Many learning algorithms use either online updates or mini-batch updates. Approaches satisfying this constraint can be easily composed into an end-to-end learning system for solving complex problems like image recognition. For algorithms which operate in batch fashion, online components can be easily used. \item Linear space: In order to have a drop-in replacement for OAA, an approach must not take much more space than OAA. Memory is at a premium when $K$ is very large, especially for models trained on GPUs, or deployed to small devices. \end{itemize} We use an OAA-like structure to make a final prediction, but instead of scoring \emph{every} class, we only score a small subset of $O(\log K)$ classes. We call this ``one-against-some'' (OAS). How can you efficiently determine what classes should be scored? We use a \emph{dynamically} built tree to efficiently whittle down the set of candidate classes. The goal of the tree is to maximize the \emph{recall} of the candidate set so we call this approach ``The Recall Tree.'' Figure~\ref{fig:inference} depicts the inference procedure for the Recall Tree: an example is routed through a tree until termination, and then the set of eligible classes compete to predict the label. We use this inference procedure at training time, to facilitate end-to-end joint optimization of the predictors at each internal node in the tree (the ``routers''), the tree structure, and the final OAS predictors. The Recall Tree achieves good accuracy, improving on previous online approaches~\cite{Lomtree} and sometimes surpassing the OAA baseline. The algorithm requires only $\mathrm{poly}(\log K)$ time during training and testing. In practice, the computational benefits are substantial when $K\geq 1000$.\footnote{Our implementation of baseline approaches, including OAA, involve vectorized computations that increase throughput by a factor of $10$ to $20$, making them much more difficult to outpace than na\"ive implementations.} The Recall Tree constructs a tree and learns parameters in a fully online manner as a reduction allowing composition with systems trained via online updates. All of this requires only a factor of 2 more space than OAA approaches. Our contributions are the following: \begin{itemize}[noitemsep,nolistsep] \item We propose a new online tree construction algorithm which jointly optimizes the construction of the tree, the routers and the underlying OAS predictors (see section~\ref{sec:recall}). \item We analyze elements of the algorithm, including a new boosting bound (see section~\ref{sec:boosting}) on multiclass classification performance and a representational trick which allows the algorithm to perform well if \emph{either} a tree representation does well or a OAA representation does well as discussed in section~\ref{sec:path}. \item We experiment with the new algorithm, both to analyze its performance relative to baselines and understand the impact of design decisions via ablation experiments. \end{itemize} The net effect is a theoretically motivated algorithm which empirically performs well providing a plausible replacement for the standard one-against-all approach in the large $K$ setting. \begin{figure} \hspace{1em} \begin{subfigure}{0.4\textwidth} \begin{center} \begin{algorithm}[H] \TitleOfAlgo{Recall\_Tree\_Test} \KwInput{Example $x$; Root Node $\mathrm{n}$} \KwResult{Predicted class $\hat y$} \Do{n.leaf is false}{ $\mathrm{r} \leftarrow f_\mathrm{n}(x) > 0$ ? n.left : n.right \; \If{$\widehat{\mathbf{recall}} (\mathrm{n}) > \widehat{\mathbf{recall}} (\mathrm{r})$}{ \textbf{break} } $\mathrm{n} \leftarrow \mathrm{r}$ \; $x \leftarrow x \wedge \{ (n:1) \}$ } $\hat y \leftarrow \argmax\limits_{y \in \mathrm{n.candidates}} \mbox{Predict}_y(x)$ \end{algorithm} \end{center} \end{subfigure} \begin{subfigure}{0.49 \textwidth} \begin{center} \hspace{-8ex} \includegraphics[width=0.9\textwidth,trim={248mm 115mm 155mm 17mm},clip]{inferencepic.pdf} \end{center} \end{subfigure} \caption{Left: Pseudocode for prediction where $f_\mathrm{n}(x)$ evaluates the node's route, $\mbox{Predict}_y(x)$ evaluates a per-class regressor, $\widehat{\mathbf{recall}} (\circ)$ is an empirical bound on the recall of a node $(\circ)$ (see section~\ref{sec:recall}), and $x \wedge \{ (n:1) \}$ indicates the addition of a sparse feature with index $n$ and value $1$. Right: An example is routed through the tree to a leaf node associated with a set of eligible classes. } \label{fig:inference} \end{figure} \subsection{Prior Work} The LOMTree\cite{CCB16,Lomtree} is the closest prior work. It misses on space requirements: up to a factor of 64 more space than OAA was used experimentally. Despite working with radically less space we show the Recall Tree typically provides better predictive performance. The key differences here are algorithmic: A tighter reduction at internal nodes and the one-against-some approach yields generally better performance despite much tighter resource constraints. Boosting trees~\cite{KMBoosting} for multiclass learning~\cite{TM03} on a generalized notion of entropy are known to results in low 0/1 loss. Relative to these works we show \emph{how} to efficiently achieve weak learning by reduction to binary classification making this approach empirically practical. We also address a structural issue in the multiclass analysis (see section~\ref{sec:boosting}). Other approaches such as hierarchical softmax (HSM) and the the Filter Tree~\cite{FilterTree} use a fixed tree structure~\cite{morin2005hierarchical}. In domains in which there is no prespecified tree hierarchy, using a random tree structure can lead to considerable underperformance as shown previously~\cite{bengio2010label,Lomtree}. Most other approaches in extreme classification either do not work online \cite{mnih2009scalable,prabhu2014fastxml} or only focus on speeding up either prediction time or training time but not both. Most of the works that enjoy sublinear inference time (but (super)linear training time) are based on tree decomposition approaches. In \cite{mnih2009scalable} the authors try to add tree structure learning to HSM via iteratively clustering the classes. While the end result is a classifier whose inference time scales logarithmically with the number of classes, the clustering steps are batch and scale poorly with the number of classes. Similar remarks apply to \cite{bengio2010label} where the authors propose to learn a tree by solving an eigenvalue problem after (OAA) training. The work of~\cite{weston2013label} is similar in spirit to ours, as the authors propose to learn a label filter to reduce the number of candidate classes in an OAA approach. However they learn the tree after training the underlying OAA predictors while here we learn and, more crucially, use the tree during training of the OAS predictors. Among the approaches that speed up training time we distinguish exact ones~\cite{de2015exploration, NIPS2015_5865} that have only been proposed for particular loss functions and approximate ones such as negative sampling as used e.g.\ in~\cite{weston2011wsabie}. Though these techniques do not address inference time, separate procedures for speeding up inference (given a trained model) have been proposed \cite{shrivastava2014asymmetric}. However, such two step procedures can lead to substantially suboptimal results. \section{The Recall Tree Algorithm} Here we present a concrete description of the Recall Tree and defer all theoretical results that motivate our decisions to the next section. The Recall Tree maintains one predictor for each class and a tree whose purpose is to eliminate predictors from consideration. We refer to the per-class predictors as one-against-some (OAS) predictors. The tree creates a high recall set of candidate classes and then leverages the OAS predictors to achieve precision. Crucially, the leaves of the tree do \emph{not} partition the set of classes: classes can (and do) have support at multiple leaves. \begin{figure}[t] \hspace{1em} \begin{subfigure}{0.46 \textwidth} \begin{algorithm}[H] \TitleOfAlgo{Recall\_Tree\_Train} \KwInput{Example $(x, y)$; Root node $n$} \KwResult{Updated tree with root at $n$} \Do{n.leaf is false}{ $\mathbf{update\_router} (x, y, \mathrm{n})$ \; $\mathrm{r} \leftarrow f_\mathrm{n} (x) > 0$ ? n.left : n.right \; $\mathbf{update\_candidates} (x, y, \mathrm{r})$ \; \If{$\widehat{\mathbf{recall}} (\mathrm{n}) > \widehat{\mathbf{recall}} (\mathrm{r})$}{ \textbf{break} } $\mathrm{n} \leftarrow \mathrm{r}$\; $x \leftarrow x \cup \{ (n:1) \}$ } $\mathbf{update\_predictors} (x, y, \mathrm{n.candidates})$ \; \end{algorithm} \caption{An input labeled example descends the tree updating routers at the nodes until reaching a leaf or a recall estimate declines, leading to an early break. Here, $\mathbf{update\_candidates}$ updates the set of candidate labels at each node and $\mathbf{update\_predictors}$ updates the one-against-some predictors upon breaking; and $\widehat{\mathbf{recall}} (\circ)$ is a an empirical bound on the recall of a node $(\circ)$ (see section~\ref{sec:recall}).} \label{subfig:learning} \end{subfigure} \hspace{0.03\textwidth} \begin{subfigure}{0.46 \textwidth} \begin{algorithm}[H] \TitleOfAlgo{update\_router} \KwInput{Example $(x, y)$; Node $n$} \KwResult{Update node $n$} $\hat H_{\mathrm{left}}, \hat H_{\mathrm{left}}' \doteq \mathbf{entropy} (\mathrm{n.left},y)$ \; $\hat H_{\mathrm{right}}, \hat H_{\mathrm{right}}' \doteq \mathbf{entropy} (\mathrm{n.right},y)$ \; $\hat H_{\mathrm{|left}} \doteq \frac{\mathrm{n.left.total}}{\mathrm{n.total}} \hat H_{\mathrm{left}}' +\frac{\mathrm{n.right.total}}{\mathrm{n.total}} \hat H_{\mathrm{right}}$ \; $\hat H_{\mathrm{|right}} \doteq \frac{\mathrm{n.left.total}}{\mathrm{n.total}} \hat H_{\mathrm{left}} +\frac{\mathrm{n.right.total}}{\mathrm{n.total}} \hat H_{\mathrm{right}}'$ \; $\widehat{\Delta H}_{\mathrm{post}} \leftarrow \hat H_{\mathrm{|left}} -\hat H_{\mathrm{|right}}$ \; $\mathrm{Learn}_n (x, | \widehat{\Delta H}_{\mathrm{post}}|, \mathrm{sign} (\widehat{\Delta H}_{\mathrm{post}}))$ \end{algorithm} \caption{Here, $\mathbf{entropy}$ computes the empirical entropy of labels incident on a node without and with (respectively) an extra label $y$. $\hat H_{\mathrm{|left}}$ is an estimate of the average entropy if the example is routed left. $\mathrm{Learn}_n (x, w, y)$ is an importance-weighted update to the binary classifier $f(x)$ for node $n$ with features $x$, label $y$, and weight $w$.} \label{subfig:updaterouter} \end{subfigure} \\ \caption{Learning procedure.} \label{fig:learning} \end{figure} Figure~\ref{fig:learning} outlines the learning procedures, which we now describe in more detail. Each node in the tree maintains a set of statistics. First, each node $n$ maintains a \emph{router}, denoted $f_\mathrm{n}$, that maps an example to either a left or right child. This router is implemented as a binary classifier. Second, each node maintains a histogram of the labels of all training examples that have been routed to, or through, that node. This histogram is used in two ways: (1) the most frequent classes form the competitor set for the OAS predictors; (2) the histogram is used to decide whether the statistics at each node can be trusted. This is a crucial issue with trees because a child node sees fewer data than its parent. Therefore we do not simply rely on the \emph{empirical recall} (i.e.\ the observed fraction of labels that fall into the most frequent $F$ labels at this node) of a node since such estimate can have considerable variance at deep nodes. Instead, we use a lower bound of the true recall which we compute via an empirical Bernstein inequality (see Section~\ref{sec:recall}). \textbf{Learning the predictors for each class} In Figure~\ref{subfig:learning} $\mathbf{update\_predictors}$ updates the candidate set predictors using the standard OAA strategy restricted to the set of eligible classes. If the true label is not in the $F$ most frequent classes at this node then no update occurs. \textbf{Learning the set of candidates in each node} In Figure~\ref{subfig:learning} $\mathbf{update\_candidates}$ updates the count of the true label at this node. At each node, the most frequent $F$ labels are the candidate set. \textbf{Learning the routers at each node} In Figure~\ref{subfig:updaterouter} $\mathbf{update\_router}$ updates the router at a node by optimizing the decrease in the entropy of the label distribution (the label entropy) due to routing. This is in accordance with our theory (Section~\ref{sec:boosting}). The label entropy for a node is estimated using the empirical counts of each class label entering the node. These counts are reliable as $\mathbf{update\_router}$ is only called for the root or nodes whose true recall bound is better than their children. The expected label entropy after routing is estimated by averaging the estimated label entropy of each child node, weighted by the fraction of examples routing left or right. Finally, we compute the advantage of routing left vs.\ right by taking the difference of the expected label entropies for routing left vs.\ right. The sign of this difference determines the binary label for updating the router. \textbf{Tree depth control} \label{para:structure} We calculate a lower bound $\widehat{\mathbf{recall}} (\mathrm{n})$ on the true recall of node $n$ (Section~\ref{sec:recall}), halting descent as in Figure~\ref{subfig:learning}. As we descend the tree, the bound first increases (empirical recall increases) then declines (variance increases). We also limit the maximum depth $d$ of the tree. This parameter is typically not operative but adds an additional safety check and sees some use on datasets where multipasses are employed. \section{Theoretical Motivation} Online construction of an optimal logarithmic time predictor for multiclass classification given an arbitrary fixed representation at each node appears deeply intractable. A primary difficulty is that decisions have to be \emph{hard} since we cannot afford to maintain a distribution over all class labels. Choosing a classifier so as to minimize error rate has been considered for cryptographic primitives~\cite{HardBlum} so it is plausibly hard on averager rather than merely hard in the worst case. Furthermore, the \emph{joint} optimization of all predictors does not nicely decompose into independent problems. Solving the above problems requires an implausible break-through in complexity theory which we do not achieve here. Instead, we use learning theory to assist the design by analyzing various simplifications of the problem. \subsection{One-Against-Some Prediction and Recall} \label{sec:recall} For binary classification, branching programs~\cite{MMBoosting} result in exponentially more succinct representations than decision trees~\cite{KMBoosting} by joining nodes to create directed acyclic graphs. The key observation is that nodes in the same level with a similar distribution over class labels can be joined into one node, implying that the number of nodes at one level is only $\theta(1/\gamma)$ where $\gamma$ is the weak learning parameter rather than exponential in the depth. This approach generally fails in the multiclass setting because covering the simplex of multiclass label distributions requires $(K-1)^{\theta(1/\gamma)}$ nodes. One easy special case exists. When the distribution over class labels is skewed so one label is the majority class, learning a minimum entropy classifier is equivalent to predicting whether the class is the majority or not. There are only $K$ possible OAS predictors of this sort so maintaining one for each class label is computationally tractable. Using OAS classifiers creates a limited branching program structure over predictions. Aside from the space savings generated, this also implies that nodes deep in the tree use many more labeled examples than are otherwise available. In finite sample regimes, which are not covered by these boosting analyses, having more labeled samples implies a higher quality predictor as per standard sample complexity analysis. A fundamental issue with a tree-structured prediction is that the number of labeled examples incident on the root is much larger than the number of labeled examples incident on a leaf. This potentially leads to: (1) underfitting toward the leaves; and (2) insufficient representation complexity toward the root. Optimizing recall, rather than accuracy, ameliorates this drawback. Instead of halting at a leaf, we can halt at an internal node $n$ for which the top $F$ most frequent labels contain the true answer with a sufficiently high probability. When $F = O(\log K)$ this does not compromise the goal of achieving logarithmic time classification. Nevertheless, as data gets divided down the branches of the tree, empirical estimates for the ``top $F$ most frequent labels'' suffer from a substantial missing mass problem~\cite{GoodTuring}. Thus, instead of computing \emph{empirical recall} to determine when to halt descent, we use an empirical Bernstein (lower) bound \cite{maurer2009empirical}, which is summarized by the following proposition. \begin{prop}\label{prop:bernstein} For all learning problems $D$ and all nodes $n$ in a fixed tree there exists a constant $\lambda > 0$ such that with probability $1-\delta$: \begin{align}\label{eqn:bernstein} r_n \geq \hat{r}_n - \sqrt{\frac{\lambda \hat{r}_n (1 - \hat{r}_n)}{m_n}} - \frac{\lambda}{m_n} \end{align} where $\hat{r}_n$ is the empirical frequency amongst $m_n$ events that the true label is in the top $F$ labels and $r_n$ is the expected value in the population limit. \end{prop} Reducing the depth of the tree by using a bound on $r_n$ and joining labeled examples from many leaves in a one-against-some approach both relieves data sparsity problems and allows greater error tolerance by the root node. \subsection{Path Features}\label{sec:path} \begin{figure} \begin{subfigure}{0.45\textwidth} \includegraphics[width=\textwidth]{linear.pdf} \end{subfigure} \hspace{0.05\textwidth} \begin{subfigure}{0.45\textwidth} \includegraphics[width=\textwidth]{tree.pdf} \end{subfigure} \caption{Two different distributions over class labels in the plane with each color/pattern representing support for a single class label. The left distribution is easily solved with an OAA classifier while the right distribution is easily solved with a decision tree.} \label{fig:representation} \end{figure} The relative representational power of different solutions is an important consideration. Are OAA types of representations inherently more or less powerful than a tree based representation? Figure~\ref{fig:representation} shows two learning problems illustrating two extremes under the assumption of a linear representation. {\bf Linear OAA:} If all the class parameter vectors happen to have the same magnitude then OAA classification is equivalent to finding the nearest neighbor amongst a set of vectors (one per class) which partition the space into a Voronoi diagram as in~\ref{fig:representation} on the left. The general case, with unequal vectors corresponds to a weighted Voronoi diagram where the magnitude of two vectors sharing a border determines the edge of the partition. No weighted Voronoi diagram can account for the partition on the right. {\bf Trees:} If the partition of a space can be represented by a sequence of conditional splits, then a tree can represent the solution accurately as in~\ref{fig:representation} on the right. On the other hand, extra work is generally required to represent a Voronoi diagram as on the left. In general, the number of edges in a multidimensional Voronoi diagram may grow at least quadratically in the number of points implying that the number of nodes required for a tree to faithfully represent a Voronoi diagram is at least $\Theta(n^2)$. Based on this, neither tree-based nor OAA style prediction is inherently more powerful, with the best solution being problem dependent. Since we are interested in starting with a tree-based approach and ending with a OAS classifier there is a simple representational trick which provides the best of both worlds. We can add features which record the path through the tree. To be precise, let $T$ be a tree and $\mbox{path}_T(x)$ be a vector with one dimension per node in $T$ which is set to $1$ if $x$ traverses the node and $0$ otherwise. The following proposition holds. \begin{prop*} For any learning problem $D$ for which a tree $T$ achieves error rate $\epsilon$, $\mbox{OAA}(x,\mbox{path}_T(x))$ with a linear representation can achieve error rate $\epsilon$. \end{prop*} Linear representations are special, because they are tractably analyzed and because they are the fundamental building blocks around which many more complex representations are built. Hence, this representational change eases prediction in many common settings. \begin{proof} A linear OAA classifier is defined by a matrix $w_{iy}$ where $i$ ranges over the input and $y$ ranges over the labels. Let $w_{iy} = 0$ by default and $1$ when $i$ corresponds to a leaf for which the tree predicts $y$. Under this representation, the prediction of $\mbox{OAA}(x,\mbox{path}_{T}(x))$ is identical to $T(x)$, and hence achieves the same error rate. \end{proof} \subsection{Optimization Objective}\label{sec:boosting} The Shannon Entropy of class labels is optimized in the router of figure~\ref{subfig:updaterouter}. Why? Since the Recall Tree jointly optimizes over many base learning algorithms, the systemic properties of the joint optimization are important to consider. A theory of decision tree learning as boosting~\cite{KMBoosting} provides a way to understand these joint properties in a population limit (or equivalently on a training set iterated until convergence). In essence, the analysis shows that each level of the decision tree boosts the accuracy of the resulting tree with this conclusion holding for several common objectives. In boosting for multiclass classification~\cite{CCB16, Lomtree, TM03}, it is important to achieve a weak dependence on the number of class labels. Shannon Entropy is particularly well-suited to this goal, because it has only a logarithmic dependence on the number of class labels. Let $\pi_{i|n}$ be the probability that the correct label is $i$, conditioned on the corresponding example reaching node $n$. Then $H_{n}=\sum_{i=1}^{K}\pi_{i|n}\log_2 \frac{1}{\pi_{i|n}}$ is the Shannon entropy of class labels reaching node $n$. For this section, we consider a simplified algorithm which neglects concerns of finite sample analysis, how optimization is done, and the leaf predictors. What's left is the value of optimizing the router objective. We consider an algorithm which recursively splits the leaf with the largest fraction $f$ of all examples starting at the root and reaching the leaf. The leaf is split into two new leaves to the left $l$ and right $r$. If $f_l$ and $f_r$ are the fraction of examples going left and right, the split criterion minimizes the expectation over the leaves of the average class entropy, $f_l H_l+f_r H_r$. This might be achieved by $\mathbf{update\_router}$ in Figure~\ref{subfig:learning} or by any other means. With this criterion we are in a position to directly optimize information boosting. \begin{defn} ($\gamma$-Weak Learning Assumption) For all distributions $n(x,y)$ a learning algorithm using examples $(x,y)^*$ IID from $n$ finds a binary classifier $c:X\rightarrow\{l,r\}$ satisfying \[ f_l H_l + f_r H_r\leq H_n-\gamma\,\,\,\,. \] \end{defn} This approach is similar to previous~\cite{TM03} except that we boost in an \emph{additive} rather than a \emph{multiplicative} sense. This is good because it suppresses an implicit dependence on $K$ (since for any nontrivial $\gamma$ there exists a $K$ such that with a uniform distribution $U$, $H_U(1-\gamma) > 1$), yeilding a strictly stronger result. As long as Weak Learning occurs, we can prove the following theorem. \begin{thm}\label{thm:boost} If $\gamma$ Weak Learning holds for every node in the tree and nodes with the largest fraction of examples are split first, then after $t>2$ splits the multiclass error rate $\epsilon$ of the tree is bounded by: \[ \epsilon \leq H_1 - \gamma (1 + \ln t ) \] where $H_1$ is the entropy of the marginal distribution of class labels. \end{thm} The proof in appendix~\ref{sec:boostproof} reuses techniques from~\cite{Lomtree, KMBoosting} but has a tighter result. The most important observation from the theorem is that as $t$ (the number of splits) increases, the error rate is increasingly bounded. This rate depends on $\ln t$ agreeing with the intuition that boosting happens level by level in the tree. The dependence on the initial entropy $H_1$ shows that skewed marginal class distributions are inherently easier to learn than uniform marginal class distributions, as might be expected. These results are similar to previous results~\cite{CCB16, Lomtree, KMBoosting, TM03} with advantages. We handle multiclass rather than binary classification~\cite{KMBoosting}, we bound error rates instead of entropy~\cite{CCB16, Lomtree}, and we use additive rather than multiplicative weak learning~\cite{TM03}. \section{Empirical Results} We study several questions empirically. \begin{enumerate}[noitemsep,nolistsep] \item What is the benefit of using one-against-some on a recall set? \item What is the benefit of path features? \item Is the online nature of the Recall Tree useful on nonstationary problems? \item How does the Recall Tree compare to one-against-all statistically and computationally? \item How does the Recall Tree compare to LOMTree statistically and computationally? \end{enumerate} Throughout this section we conduct experiments using learning with a linear representation. \subsection{Datasets} \begin{table}[h] \caption{Datasets used for experimentation.} \label{tab:datasets} \begin{center} \begin{tabular}{|c|c|r|r|} \hline Dataset & Task & Classes & Examples \\ \hline ALOI\cite{geusebroek2005amsterdam} & Visual Object Recognition & $1k$ & $10^5$ \\ Imagenet\cite{Oquab14} & Visual Object Recognition & $\approx 20k$ & $\approx 10^7$ \\ LTCB\cite{mahoney2009large} & Language Modeling & $\approx 80k$ & $\approx 10^8$ \\ ODP\cite{bennett2009refined} & Document Classification & $\approx 100k$ & $\approx 10^6$ \\ \hline \end{tabular} \end{center} \end{table} Table~\ref{tab:datasets} overviews the data sets used for experimentation. These include the largest datasets where published results are available for LOMTree (Aloi, Imagenet, ODP), plus an additional language modeling data set (LTCB). Implementations of the learning algorithms, and scripts to reproduce the data sets and experimental results, are available at (url redacted). Additional details about the datasets can be found in Appendix~\ref{app:datasets}. \subsection{Comparison with other Algorithms} In our first set of experiments, we compare Recall Tree with a strong computational baseline and a strong statistical baseline. The computational baseline is LOMTree, the only other online logarithmic-time multiclass algorithm we know of. The statistical baseline is OAA, whose statistical performance we want to match (or even exceed), and whose linear computational dependence on the number of classes we want to avoid. Details regarding the experimental methodology are in Appendix~\ref{app:expmethodology}. Results are summarized in Figure~\ref{fig:results}. \begin{figure} \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\textwidth]{statperf.pdf} \end{subfigure} \begin{subfigure}[t]{0.49\textwidth} \includegraphics[width=\textwidth]{compperf.pdf} \end{subfigure} \caption{Empirical comparison of statistical (left) and computational (right) performance of Recall Tree against two strong competitors: OAA (statistically good) and LOMTree (computationally good). Recall Tree has $\mathrm{poly} (log)$ dependence upon number of classes (like LOMTree) but can surpass OAA statistically.} \label{fig:results} \end{figure} \paragraph{Comparison with LOMTree} The Recall Tree uses a factor of 32 less state than the LOMTree which makes a dramatic difference in feasibility for large scale applications. Given this state reduction, the default expectation is worse prediction performance by the Recall Tree. Instead, we observe superior or onpar statistical performance despite the state constraint. This typically comes with an additional computational cost since the Recall Tree evaluates a number of per-class predictors. \paragraph{Comparison with OAA} On one dataset (Aloi) prediction performance is superior to OAA while on the others it is somewhat worse. Computationally OAA has favorable constant factors since it is highly amenable to vectorization. Conversely, the conditional execution pattern of the Recall Tree frustrates vectorization even with example mini-batching. Thus on ALOI although Recall Tree does on average 50 hyperplane evaluations per example while OAA does 1000, OAA is actually faster: larger numbers of classes are required to experience the asymptotic benefits. For ODP with $\sim{}10^5$ classes, with negative gradient subsampling and using 24 cores in parallel, OAA is about the same wall clock time to train as Recall Tree on a single core.\footnote{While not yet implemented, Recall Tree can presumably also leverage multicore for acceleration.} Negative gradient sampling does not improve inference times, which are roughly 300 times slower for OAA than Recall Tree on ODP. \subsection{Online Operation} In this experiment we leverage the online nature of the algorithm to exploit nonstationarity in the data to improve results. This is not something that is easily done with batch oriented algorithms, or with algorithms that post-process a trained predictor to accelerate inference. \begin{figure} \begin{subfigure}[t]{0.475 \textwidth} \includegraphics[width=\textwidth]{onlineperf.pdf} \caption{When the LTCB dataset is presented in the original order, Recall Tree is able to exploit sequential correlations for improved performance. After all examples are processed, the average progressive accuracy is 73.3\% vs. 74.6\%.} \label{fig:online} \end{subfigure} \hspace{0.025 \textwidth} \begin{subfigure}[t]{0.475 \textwidth} \includegraphics[width=\textwidth]{sweepperf.pdf} \caption{Test error on ALOI for various candidate set sizes, with or without path features (all other parameters held fixed). Using multiple predictors per leaf and including path features improves performance.} \label{fig:design} \end{subfigure} \caption{} \end{figure} We consider two versions of LTCB. In both versions the task is to predict the next word given the previous 6 tokens. The difference is that in one version, the Wikipedia dump is processed in the original order (``in-order''); whereas in the other version the training data is permuted prior to input to the learning algorithm (``permuted''). We assess progressive validation loss~\cite{PV} on the sequence. The result in Figure~\ref{fig:online} confirms the Recall Tree is able to take advantage of the sequentially revealed data; in particular, the far-right difference in accuracies is significant at a factor $P<0.0001$ according to an $N-1$ Chi-squared test. \subsection{Path Features and Multiple Predictors} Two differences between Recall Tree and LOMTree are the use of multiple predictors at each tree node and the augmentation of the example with path features. In this experiment we explore the impact of these design choices using the ALOI dataset. Figure~\ref{fig:design} shows the effect of these two aspects on statistical performance. As the candidate set size is increased, test error decreases, but with diminishing returns. Disabling path features degrades performance, and the effect is more pronounced as the candidate set size increases. This is expected, as a larger candidate set size decreases the difficulty of obtaining good recall (i.e., a good tree) but increases the difficulty of obtaining good precision (i.e., good class predictors), and path features are only applicable to the latter. All differences here are significant at a $P<0.0001$ according to an $N-1$ Chi-squared test, except for when the candidate set size is $2$, where there is no significant difference. \subsection{The Empirical Bernstein Bound} Is the empirical Bernstein bound used helpful? To test this we trained on the LTCB dataset with a multiplier on the bound of either $0$ (i.e. just using empirical recall directly) or $1$. The results are stark: with a multiplier of $1$, the test error was $78\%$ while with a multiplier of $0$ the test error was $91\%$. Clearly, in the small samples per class regime this form of direct regularization is extraordinarily helpful. \section{Conclusion} In this work we proposed the Recall Tree, a reduction of multiclass to binary classification, which operates online and scales logarithmically with the number of classes. Unlike the LOMTree~\cite{Lomtree}, we share classifiers among the nodes of the tree which alleviates data sparsity at deep levels while greatly reducing the required state. We also use a tighter analysis which is more closely followed in the implementation. These features allow us to reduce the statistical gap with OAA while still operating many orders of magnitude faster for large $K$ multiclass datasets. In the future we plan to investigate multiway splits in the tree since $O(\log K)$-way splits does not affect our $O(\textrm{poly}\log K)$ running time and they might reduce contention in the root and nodes high in the tree. {\bf Acknowledgements} We would like to thank an anonymous reviewer for NIPS who spotted an error in the theorem proof and made several good suggestions for improving it. \bibliographystyle{plain}
{'timestamp': '2016-12-02T02:01:55', 'yymm': '1606', 'arxiv_id': '1606.04988', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04988'}
arxiv
\section{Introduction }\label{sec:introduction} \lettrine[lines=2]{M}{assive} Multiple-input Multiple-output (massive MIMO) is an emerging technology with the potential to be included in next generation wireless systems, such as fifth-generation (5G) cellular systems. Massive MIMO departs from traditional multi-user MIMO approaches by operating with a large number of base station (BS) antennas, typically in the order of hundreds or even thousands, to serve a relatively small number of mobile terminals \cite{LUP2174140}. Such a system setup results in a multitude of BS antennas that can be used in an advantageous manner from multiple points of view \cite{LUP4305564}. One major challenge of operating with a large number BS antennas is that it renders explicit channel estimation in the downlink impractical. Basically, the overhead of channel estimation in the downlink and feeding back the channel estimate to the BS, scales linearly with the number of BS antennas, and quickly becomes unsupportable in mobile time-varying channels \cite{978730}. To deal with this challenge, the approach adopted is to operate in time-division-duplex (TDD) mode, rely on channel reciprocity, and use uplink channel state information (CSI) for downlink precoding purposes \cite{Marzetta}. However, the presence of the analog front-end circuitry in practical radio units complicates the situation and makes the baseband-to-baseband channel non-reciprocal. Explained briefly, the baseband representation of the received signals \cite{Proakis} experience channels that are not only determined by the propagation conditions, but also by the transceiver front-ends at both sides of the radio link. While it is generally agreed that the propagation channel is reciprocal \cite{Balanis}, the transceiver radio frequency (RF) chains at both ends of the link are generally not \cite{5722383}. Hence, in order to make use of the reciprocity assumption and rely on the uplink CSI to compute precoding coefficients, the non-reciprocal transceiver responses need to be calibrated. Such a procedure is often termed reciprocity calibration, and contains two steps: (i) estimation of calibration coefficients, and (ii) compensation by applying those to the uplink channel estimates.\footnote{ However, with the term reciprocity calibration, we will interchangeably refer to the estimation step, compensation step, or both. The context will, hopefully, make clear which of the previous cases is being addressed.} Reciprocity calibration of small scale TDD MIMO channels has been a matter of study in recent years. Depending on the system setup and requirements, the approach adopted can take many forms. For example, \cite{5722383} proposed a methodology based on bi-directional measurements between the two ends of a MIMO link to estimate suitable reciprocity calibration coefficients. This calibration approach falls in the class of "over-the-air" calibration schemes where users are involved in the calibration process. A different approach is to rely on dedicated hardware circuitry for calibration purposes, see \cite{6573241,966592}. Despite the possibilities of extending both mentioned calibration approaches to a massive MIMO context, e.g., \cite{6963664,7416977}, recent calibration works suggest this is more difficult than previously thought. For example, \cite{7239634} questions the feasibility of having dedicated circuits for calibration when the number of transceivers to be calibrated grows large, and \cite{6760595} argues that the calibration protocols should preferably not rely on mobile units. It thus appears that an increasing trend in massive MIMO systems is to carry out the calibration entirely at the BS side only through over-the-air measurements. The first proposal in this vein was presented in \cite{ArgosThesis}. The work proposes an estimator for the calibration coefficients, which only makes use of channel measurements between BS antennas. More specifically, bi-directional channel measurements between a given BS antenna, so-called reference antenna, and all other antennas. This estimator was later generalized in order to calibrate large-scale distributed MIMO networks \cite{6502966,6760595}. The estimation problem is formulated as constrained least-squares (LS) problem where the objective function uses channel measurements from a set of arbitrary antenna pairs of the network. The generality of this approach spurred many publications dealing with particular cases \cite{Wei2015,7032189,J7037384}. Parallel work in mutual coupling based calibration was also conducted in \cite{7239634}. An estimator for the calibration coefficients, which enables maximum ratio transmission (MRT), was proposed for BS antenna arrays with special properties. Although it appears that over-the-air reciprocity calibration only involving the BS side is feasible, some matters need further investigation. Firstly, the approaches available in the literature for co-located BSs are not of great practical convenience. They either rely on antenna elements that need to be (carefully) placed in front of the BS antenna array solely for calibration purposes \cite{ArgosThesis}, or are only available for a restrictive case of antenna arrays \cite{7239634}. Secondly, most estimators for calibration have been derived from empirical standpoints, e.g., \cite{7239634,ArgosThesis}, and respective extensions \cite{6502966,7032189,J7037384}. It is not clear how far from fundamental estimation performance bounds, or how close to Maximum likelihood (ML) performance, such estimators are. Thirdly, most available calibration approaches are proposed for narrow-band systems. Such systems bandwidths are usually defined by the frequency selectivity of the propagation channel, which is typically much smaller than the frequency selectivity of the transceiver responses. This results in similar calibration coefficients for adjacent narrowband channels. Thus, it is of interest to model the statistical dependency of such calibration coefficients, and provide means to exploit this dependency in order to reduce the calibration error across frequency. Lastly, there is little publicly available work on validation of massive MIMO calibration schemes. The need for validation is high, as it helps answering many questions of practical nature. For example, \cite{7340979} raises the question whether the channel reciprocity assumption holds when strong coupling between BS antennas exist, and \cite{EURECOM+4463} questions if calibration assumptions similar to the ones used in this work, hold for massive MIMO arrays. \subsection{Main Contributions of the Paper } Below, we summarize the main contributions of this work. \begin{itemize} \item We propose a convenient calibration method mainly relying on mutual coupling between BS antennas to calibrate its non-reciprocal analog front-ends. We make no assumptions other than channels due to mutual coupling being reciprocal. \item We show that the narrow-band calibration coefficients can be estimated by solving a joint penalized-ML estimation problem. We provide an asymptotically efficient algorithm to compute the joint solution, which is a particular case of the EM algorithm. \item We validate our calibration method experimentally using a software-defined radio massive MIMO testbed. More specifically, we verify how the measured Error-Vector-Magnitude (EVM) of the downlink equalized signals decreases as the calibration accuracy increases, in a setup where three closely spaced single-antenna users are spatially multiplexed by one hundred BS antennas. \item We propose a non-white Gaussian model for the narrow-band calibration error based on the properties of the proposed estimator, and partially validate this model with measurements. \end{itemize} \subsection{Notation} \label{sec:NotationAndOutline} The operators $(\cdot)^*$, $(\cdot)^{ T}$, $(\cdot)^{ H}$, and $(\cdot)^{ \dagger}$ denote element-wise complex conjugate, transpose, Hermitian transpose, and Moore-Penrose pseudo-inverse, respectively. The element in the $n$th row and $m$th column of matrix $\bf A$ is denoted by $\big[ {\bf A} \big]_{n,m}$. The operator $\mathrm{E}\left\{ \cdot \right\}$ denotes the expected value. $\operatorname{Re}\left\{\cdot\right\}$ and $\operatorname{Im}\left\{\cdot\right\}$ return the real and imaginary part of their arguments. The matrix ${\bf I}$ denotes the identity matrix, and ${\rm diag}\left\{a_1, a_2, \hdots a_M \right\} $ denotes an $M \times M$ diagonal matrix with diagonal entries given by $a_1, a_2, \hdots, a_M$. The operator $\ln$ denotes the natural logarithm. The set of the complex numbers and the set containing zero and the real positive numbers are denoted by $\mathbb{C}$ and $\mathbb{R}_{\geq 0}$, respectively. The operator $\setminus$ denotes the relative set complement. Finally, $||\cdot||$ denotes the Frobenius norm. \subsection{Paper Outline} The remaining sections of the paper are as follows. Section \ref{sec:ChannelModel} presents the signal models. Section \ref{sec:CREC} introduces the state-of-the-art estimator for the calibration coefficients, proposes a novel estimator, and provides a comparative analysis by means of MSE and downlink sum-rate capacities. Section \ref{sec:Validation} validates the proposed calibration method experimentally. Using the estimated calibration coefficients obtained from the experiments, the purpose of Section \ref{sec:WB_EM} is twofold: \textit{i)} it studies several aspects of the calibration coefficients across $4.5$ MHz of transceiver bandwidth, \textit{ii)} it proposes a model for the calibration error of a narrowband system. Lastly, Section \ref{sec:conclusions} summarizes the key takeaways from this work. \section{Signal Models } \label{sec:ChannelModel} This section starts by introducing the uplink and downlink signal models, and shows how downlink precoding can be performed using calibrated uplink channel estimates. Finally, it models the channels between BS antennas which we use for calibration purposes. \subsection{Uplink and Downlink Signal models } Let $K$ single-antenna users simultaneously transmit a pilot symbol in the uplink of a narrow-band MIMO system (e.g., a particular sub-carrier of an OFDM-MIMO system). Collecting the pilot symbols in the vector ${\bf p} = [p_1 \cdots p_K]^{ T}$, the received signal by an $M$-antenna base station can be written as \begin{align} \label{eq:UpLinkCh} {\bf y}_{\rm UP} & = {\bf H}_{\rm UP} \, {\bf p} + {\bf w} \nonumber \\ & = {\bf R}_{\rm B} {\bf H}_{\rm P} {\bf T}_{\rm U} \, {\bf p}+ {\bf w}. \end{align} In (\ref{eq:UpLinkCh}), the matrix ${\bf R}_{\rm B}~=~{\rm diag}\left\{\! r^{\rm B}_{1},\cdots, r^{\rm B}_{M} \!\right\}$ models the hardware response of $M$ BS receive RF chains (one RF chain per antenna), and the matrix ${\bf T}_{\rm U}~=~{\rm diag}\left\{\! t^{\rm U}_{1},\cdots,t^{\rm U}_{K} \!\right\}$ models the hardware response of $K$ transmit RF chains (one chain per user). ${\bf H}_{\rm P}$ is the propagation channel matrix, ${\bf H}_{\rm UP}$ is the, so-called, uplink radio channel, and ${\bf w}$ is a vector modeling uplink noise. Under the reciprocal assumption of the propagation channel, the received downlink signal can be written as \begin{align} \label{eq:DownLinkCh} {\bf y}_{\rm DL} = & {\bf H}_{\rm DL} \, {\bf z}{\rm '} + {\bf w}{\rm '} \nonumber \\ = & {\bf R}_{\rm U} {\bf H}_{\rm P}^{ T} {\bf T}_{\rm B} \, {\bf z}{\rm '}+ {\bf w}{\rm '}. \end{align} In (\ref{eq:DownLinkCh}), the matrix ${\bf R}_{\rm U}~=~{\rm diag}\left\{\! r^{\rm U}_{1},\cdots, r^{\rm U}_{K} \!\right\}$ models the hardware response of the receive RF chains of the $K$ users, and the matrix ${\bf T}_{\rm B}~=~{\rm diag}\left\{\! t^{\rm B}_{1},\cdots,t^{\rm B}_{M} \!\right\}$ models the hardware response of $M$ BS transmit RF chains. The entries of $\bf w{\rm '}$ model downlink noise, ${\bf H}_{\rm DL}$ is the downlink radio channel, and ${\bf z}{\rm '}$ is a vector with linearly precoded QAM symbols. In particular, ${\bf z}{\rm '}=\bf Px$, where $\bf P$ is the precoding matrix, and the entries of $\bf x$ contain QAM symbols. \subsection{Calibration Coefficients } Assume that an error free version of the uplink radio channel, ${\bf H}_{\rm UP}$, is available at the BS. The transpose of the result of pre-multiplying ${\bf H}_{\rm UP}$ with the matrix $\alpha {\bf T}_{\rm B}{\bf R}_{\rm B}^{-1}$, where $\alpha \in \mathbb{C}\setminus 0$ and $r_m \neq 0, \forall \; m$, is a matrix ${\bf G}$ that, if used for precoding purposes by means of a linear filtering, is sufficient for spatially multiplexing terminals in the downlink with reduced crosstalk. This can be visualized by expanding ${\bf G}$ as \begin{align} {\bf G} = & \left( \left( \alpha {\bf T}_{\rm B}{\bf R}_{\rm B}^{-1} \right) { \bf H}_{\rm UP} \right)^{ T} \nonumber \\ = & \; \alpha {\bf T}_{\rm U} {\bf H}_{\rm P}^{ T} {\bf T}_{\rm B} \nonumber \\ \label{eq:lastEq} = & \; \alpha {\bf T}_{\rm U} {\bf R}_{\rm U}^{-1} {\bf H}_{\rm DL}. \end{align} From (\ref{eq:lastEq}) we have that ${\bf G}$ is effectively the \textit{true} downlink radio channel ${\bf H}_{\rm DL}$ pre-multiplied with a diagonal matrix with unknown entries accounting for the user terminals responses $ {\bf T}_{\rm U} {\bf R}_{\rm U}^{-1}$, and $\alpha$. The row space of ${\bf G}$ is thus the same as of the downlink radio channel ${\bf H}_{\rm DL}$. This is a sufficient condition to cancel inter-user interference if, for example, ZF precoding is used (i.e., ${\bf H}_{\rm DL} {\bf G}^\dagger $ is a diagonal matrix). From (\ref{eq:lastEq}), it can also be seen that any non-zero complex scalar $\alpha$ provides equally good calibration.\footnote{This follows since both magnitude and phase of $\alpha$ are not relevant in this calibration setup. The former holds since any real scaled channel estimate provides the same precoder matrix $\bf P$, if the precoder has a fixed norm. The latter follows from (\ref{eq:lastEq}), since the (uniform phases of the) diagonal entries of $ {\bf T}_{\rm U} {\bf R}_{\rm U}^{-1}$ are unknown to the precoder in this calibration setup.} Thus, the matrix \begin{align} {\bf C} = & { \rm diag\{c_1,\cdots,c_M \}} \nonumber \\ = & {\bf T}_{\rm B}{\bf R}_{\rm B}^{-1} \end{align} is the, so-called, calibration matrix, and $\left\{c_m\right\}$ are the calibration coefficients which can be estimated up to a common complex scalar $\alpha$. We remark that, although not strictly necessary to build estimators, the concept of a reference transceiver \cite{ArgosThesis} can be used to deal with the ambiguity of estimating $\left\{c_m\right\}$ up to $\alpha$.\footnote{Explained briefly, assuming $c_\textit{ref}=1$ and solving for $\left\{c_m\right\}\setminus c_\textit{ref}$, where $c_\textit{ref}$ is the calibration coefficient associated with a reference transceiver. } The remainder of the paper deals with estimation aspects of $c_m= t^{\rm B}_m/r^{\rm B}_m$. Thus, for notational simplicity, we write $t_m=t^{\rm B}_m$, $r_m=r^{\rm B}_m$, ${\bf R} = {\bf R}_{\rm B}$, and ${\bf T} = {\bf T}_{\rm B}$. Also, we stack $\left\{c_m\right\}$ in the vector ${\bf c} = [c_1 \cdots c_M]^{ T}$, for later use. \subsection{Inter-BS Antennas Signal model } To estimate the calibration coefficients $c_m$ we sound the $M$ antennas one-by-one by transmitting a sounding signal from each one and receiving on the other $M-1$ silent antennas. Let the sounding signal transmitted by antenna $m$ be $s_m = 1, \forall \; m$, unless explicitly said otherwise. Also, let $y_{n,m}$ denote the signal received at antenna $n$ when transmitting at antenna $m$. It follows that the received signals between any pair of antennas can be written as \begin{equation} \label{eq:SystemModel33} \left[ \begin{array}{cc} y_{n,m}\\ y_{m,n} \end{array} \right] = h_{n,m} \left[ \begin{array}{cc} r_{n} t_{m} & 0 \\ 0 & r_{m} t_{n} \end{array} \right] \left[ \begin{array}{cc} s_{m} \\ s_{n} \end{array} \right] + \left[ \begin{array}{cc} n_{n,m} \\ n_{m,n} \end{array} \right], \end{equation} where \begin{align} \label{eq:CouplingMOdel} h_{n,m} = & \; \bar{h}_{n,m} + \tilde{h}_{n,m} \\ = & \; |\bar{h}_{n,m}| \exp( j2\pi\phi_{n,m} ) + \tilde{h}_{n,m} \; \end{align} models the (reciprocal) channels between BS antennas. The first term $\bar{h}_{n,m}$ describes a channel component due to mutual coupling between antenna elements, often stronger for closely spaced antennas, which we lay down a model for in Sec. \ref{sec:ModMutualCoupling}. The terms $|\bar{h}_{n,m}|$ and $\phi_{n,m}$ denote the magnitude and phase of $\bar{h}_{n,m}$, respectively. The term $\tilde{h}_{n,m}$, which absorbs all other channel multipath contributions except for the mutual coupling (e.g., reflections by scatterers in front of the BS) is modeled by an i.i.d. zero-mean circularly symmetric complex Gaussian random variable with variance $\sigma^2$. Non-reciprocal channel components are modeled by $r_m$ and $t_m$ which materially map to the cascade of hardware components, mainly in the analog front-end stage of the receiver and transmitter, respectively. We assume i.i.d. circularly symmetric zero-mean complex Gaussian noise contributions $n_{m,n}$ with variance $N_0$. Letting $\big[ {\bf Y} \big]_{m,n} = y_{m,n}$, the received signals can be expressed more compactly as \begin{equation} \label{eq:SignalModel} \bf Y = R H T + N. \end{equation} Note that ${\bf H} = {\bf H}^{ T}$ is assumed, and the diagonal entries in the $M \times M$ matrix $\bf Y$ are undefined. \subsection{Modeling Mutual Coupling} \label{sec:ModMutualCoupling} The purpose of this section is to provide a model for the mutual coupling between antenna elements, i.e. $\bar{h}_{m,n}$, as a function of their distance. Instead of pursuing a circuit theory based approach to model the effect of mutual coupling \cite{7340979}, our modeling approach uses S-parameter measurements from a massive MIMO BS antenna array \cite{1142529}. We note that this model is used only for simulation purposes, and not to derive any of the upcoming estimators of $\bf c$. \subsubsection{Test Array Description} \label{sec:TestArray} The antenna array considered for modeling is a 2-dimensional planar structure with dual-polarized patch elements spaced by half a wavelength. More information about the antenna array can be found in \cite{BasestationPaper}. The dimensional layout of the array adopted for this work corresponds to the $4 \times 25$ rectangular grid in the upper part of the array shown in Fig. \ref{fig:DownlinkSetup}. Only one antenna port is used per antenna element. For a given antenna, the polarization port is chosen such that its adjacent antennas - the antennas spaced by half wavelength - are cross-polarized. This setting provides, so-called, polarization diversity, and reduces mutual coupling effects between adjacent antennas since co-polarized antennas couple stronger \cite{1142529}. \begin{figure}[t] \centering \includegraphics[scale=.067]{SetupJPGCompressed.jpg} \caption{The massive MIMO lab setup used throughout this work. The BS is on the left side where a "T" shaped antenna array can be seen. Three closely spaced user antennas stand the middle of the picture.} \label{fig:DownlinkSetup} \end{figure} \subsubsection{Modeling coupling gains between antennas} \label{subsec:Modelingcoup} The channel magnitude $|\bar{h}_{n,m}|$ between several pairs of cross and co-polarized antennas were measured in an anechoic chamber using a Vector Network Analyzer, at 3.7 GHz - the center frequency of the array. Fig. \ref{fig:CouplingModelling} shows the measured channel magnitudes. Different channel magnitudes for the very same measured distance and polarization cases, are due mostly to the relative orientation of the antenna pair with respect to their polarization setup. For example, vertically (co-)polarized antennas couple more strongly when they are oriented horizontally. A linear LS fit was performed to model the coupling gain $|\bar{h}_{n,m}|$ as a function of antenna distance. The phase $\phi_{m,n}=\phi_{n,m}$ is modeled uniformly in $[0,1]$, as a clear dependence with distance was not found. \begin{figure}[t] \centering \includegraphics[scale=.73]{CouplingModelling} \caption{Measured coupling magnitudes $|\bar{h}_{n,m}|$ between different antenna pairs. The circles corresponds to measurements between co-polarized antenna elements, and the crosses between cross polarized antenna elements. The variable $\rm d$ corresponds to the physical distance between antenna elements. The straight lines represent the corresponding linear LS fits. } \label{fig:CouplingModelling} \end{figure} \section{Estimation of the Calibration Coefficients} \label{sec:CREC} In this section we deal with estimation aspects of the calibration matrix ${\bf C=TR}^{-1}$. We introduce the state-of-art estimator of $\bf C$ \cite{6502966,6760595}, and propose a novel iterative penalized-ML estimator.\footnote{We note that the only assumption used to derive the estimators is ${\bf H} = {\bf H}^{ T}$. The generality of this assumption allows the estimators to be used in other calibration setups than those of co-located MIMO systems, as it will be pointed out later.} A comparative numerical analysis is made by means of MSE and sum-rate capacity. We conclude the section with two interesting remarks. \subsection{The Generalized Method of Moments estimator } \label{sec:GMMe} Calibration of large-scale distributed MIMO systems using a similar system model to (\ref{eq:SignalModel}) was performed in \cite{6760595} and \cite{6502966}.\footnote{In their work, $h_{m,n}$ denotes the propagation channel between antennas of different BSs. The reciprocal model adopted for $h_{m,n}$ accounts for large-scale and small-scale fading.} Based on the structure of the system model, the authors identified that \begin{equation} \label{eq:MomentCondition} \mathrm{E} \left\{ y_{n,m}c_n - y_{m,n}c_m \right\} = 0 . \end{equation} Define $ g_{m,n} \triangleq y_{n,m}c_n - y_{m,n}c_m $, and ${ \boldsymbol{g}({\bf c}) }= \left[ g_{1,2} \dots g_{1,M} \, g_{2,3} \dots g_{2,M} \dots g_{M-1,M} \right] ^T$.\footnote{The dependency of $ \boldsymbol{g}({\bf c})$ on $y_{n,m}$ is explicitly left out, for notational convenience.} An estimator for $\bf c$ was proposed by solving \begin{equation} \label{eq:GMMeCost} \hat{\boldsymbol{c}}_{\rm GMM} = \arg \min_{ \substack{\boldsymbol{c} \\ s.t.\; f_c(\boldsymbol{c})=1 }} { \boldsymbol{g}^{ H}({\bf c}) \boldsymbol{W} \boldsymbol{g}({\bf c}}) \end{equation} with $\bf \boldsymbol{W} = \boldsymbol{I}$. Two constraints were suggested to avoid the all-zero solution, namely $f_c(\boldsymbol{c})=c_1$ or $f_c(\boldsymbol{c})=||{\bf c} ||^2$. By setting the gradient with respect to ${\bf c}$ to zero, an estimator in closed-form was given. Next, we provide a few remarks on this estimation approach. A fact not identified in \cite{6760595} and \cite{6502966}, is that this estimator is an instance of a estimation framework widely used for statistical inference in econometrics, namely the generalized method of moments (GMM). The variable $g_{m,n}$ - whose expectation is zero - is termed a moment condition within GMM literature \cite{hall2004generalized}. With a proper setting of the weighting matrix $\bf \boldsymbol{W}$, it can be shown that the solution to ($\ref{eq:GMMeCost}$) provides an estimator that is asymptotically efficient\cite{hall2004generalized}. However, no such claim can be made in the low signal-to-noise (SNR) regime, where an optimal form of $\bf \boldsymbol{W}$ is not available in the literature. This typically leads to empirical settings of $\bf \boldsymbol{W}$, e.g., $\bf \boldsymbol{W} = \boldsymbol{I}$. As a result, moment conditions comprising measurements with low SNR constrain the performance since they are weighted equally. It thus appears that an inherent problem of the GMM estimator is the selection of $\bf \boldsymbol{W}$. Nevertheless, it provides a closed-form estimator based on a cost function where nuisance parameters for calibration, as $h_{m,n}$, are conveniently left out. \subsection{Joint Maximum Penalized-Likelihood estimation} Here we address joint maximum penalized-likelihood estimation for $\bf c$ and for the equivalent channel $\bf \Psi \triangleq RHR$. Noting that (\ref{eq:SignalModel}) can be written as \begin{align} \bf Y = & \; \bf R H R C + N \nonumber \\ = & \; \bf \Psi C + N, \label{eq:EqModel} \end{align} the optimization problem can be put as \begin{align} \label{eq:JointLikeIni} \bf [ \hat{c}, \; \hat{\Psi}] & = \arg \max_{ \bf c, \Psi } \ln p( {\bf Y | C, \Psi } ) + {\rm Pen}({\bf C,\Psi},\epsilon') \nonumber \\ & = \arg \min_{ {\bf c}, \Psi } J_{\rm ML}( {\bf Y, C, \Psi},\epsilon) \end{align} with $ J_{\rm ML}( {\bf Y, C, \Psi},\epsilon) = || {\bf Y - \Psi C } ||^2 + {\rm Pen}({\bf C,\Psi},\epsilon). $ Here, $p( {\bf Y | C, \Psi })$ denotes the probability density function (PDF) of $\bf Y$ conditioned on $\bf C$ and $\bf \Psi$, and ${\rm Pen}({\bf C,\Psi},\epsilon)$ is a penalty term parametrized by $\epsilon=\epsilon' N_0$ with $\epsilon \in \mathbb{R}_{\geq 0}$. There are many uses for the penalty term in ML formulations \cite{Bishop}. Here, we use it mainly to control the convergence rate of the algorithm (presented in Sec. \ref{subsec:EMalg}), and use $\epsilon$ as a tuning parameter. With this in mind, we pursue Ridge Regression and set the penalty term as\footnote{Ridge Regression \cite{Hoerl} is an empirical regression approach widely used in many practical fields, e.g., Machine Learning \cite{Bishop}, as it provides estimation robustness when the model is subject to a number of degeneracies. This turns out to the case in this work, and we point out why this occurs later. However, we emphasize that the main reason of adding the penalty terms is to control the convergence of the algorithm, which we also point out later why this is the case. To finalize, we parametrize the penalty term (\ref{eq:Penaltyterm}) with a single parameter in order simplify the convergence analysis and be able to extract meaningful insights.} \begin{equation} \label{eq:Penaltyterm} {\rm Pen}({\bf C,\Psi},\epsilon) = \epsilon ( || {\bf C}||^2 + ||{\bf \Psi}||^2 ). \end{equation} After some re-modeling, a vectorized version of (\ref{eq:EqModel}) can be written as \begin{equation} \label{eq:EqModel10} \bf \widetilde{Y} = \bf \Psi_{\rm eq}({\bf \tilde{\Psi}}) c + \widetilde{N}, \end{equation} or as \begin{equation} \label{eq:EqModel11} \bf {\bf Y'} = \bf C_{\rm eq}({\bf c }) {\bf \tilde{\Psi}} + N', \end{equation} where ${\bf \tilde{\Psi}}$ stacks all $\psi_{n,m}=[{\bf \Psi}]_{n,m}$ into an $ (M^2-M)/2 \times 1$ vector, and $\bf \Psi_{\rm eq}({\bf \tilde{\Psi}})$ and $\bf C_{\rm eq}({\bf c })$ are equivalent observation matrices which are constructed from ${\bf \tilde{\Psi}}$ and $\bf c$, respectively. The structure of these matrices is shown in Appendix A, but it can be pointed out that $\bf \Psi_{\rm eq}({\bf \tilde{\Psi}})$ and $\bf C_{\rm eq}({\bf c })$ are a block diagonal, where each block is a column vector. From (\ref{eq:EqModel11}), it is seen that for a given $\bf \bf C_{\rm eq}({\bf c })$, the penalized-ML estimator of ${\bf \tilde{\Psi}}$ is given by\footnote{The factor $2$ in the regularization term of (\ref{eq:LS}) appears since $\psi_{m,n}=\psi_{n,m}$. Note that $\epsilon$ is considered as a constant during the optimization, otherwise it is obvious that $\epsilon=0$ minimizes (\ref{eq:Penaltyterm}).} \begin{equation} \label{eq:LS} {\bf \tilde{\Psi}}_{\rm ML} = \Big( {\bf C}_{\rm eq}^{ H}({\bf c}) {\bf C_{\rm eq}(\bf c)} + 2 \epsilon {\bf I} \Big)^{-1} {\bf C}_{\rm eq}^{ H}(\bf c){\bf Y'}, \end{equation} If in (\ref{eq:EqModel11}), we replace ${\bf \tilde{\Psi}}$ by its estimate ${\bf \tilde{\Psi}}_{\rm ML}$, then the penalized ML solution for $\bf c$ is \iftoggle{2Collumn}{% \begin{align} \label{eq:EqModel5} {\hat{{\bf c}}_{\rm ML}} = \arg \min_{ {\bf c} } || { \bf Y' - \bf C_{\rm eq}({\bf c })}&\Big( {\bf C}_{\rm eq}^{ H}({\bf c}) {\bf C_{\rm eq}(\bf c)} + 2 \epsilon {\bf I} \Big)^{-1} \nonumber \\ & \times {\bf C}_{\rm eq}^{ H}({\bf c}){\bf Y'} ||^2, \end{align} }{ \begin{equation} \label{eq:EqModel5} {\hat{{\bf c}}_{\rm ML}}=\arg \min_{ {\bf c} } ||{ \bf Y' - \bf C_{\rm eq}({\bf c })}\Big( {\bf C}_{\rm eq}^{ H}({\bf c}) {\bf C_{\rm eq}(\bf c)} + 2 \epsilon {\bf I} \Big)^{-1} {\bf C}_{\rm eq}^{ H}({\bf c}){\bf Y'} ||^2, \end{equation} } It is possible to further simplify $(\ref{eq:EqModel5})$ for the case of unpenalized ML estimation ($\epsilon =0$) and attack the optimization problem with gradient-based methods \cite{scharf1991statistical}. We have implemented the conjugate gradient method in a Fletcher-Reeves setting with an optimized step-size through a line-search. However, this turns out to be far less robust than, and computationally more expensive to, the method provided next. Therefore we omit to provide the gradient in closed form. \subsection{An EM Algorithm to find the joint Penalized-ML Estimate} \label{subsec:EMalg} Here we provide a robust and computational efficient algorithm to find the joint penalized-ML estimate of $\bf c$ and $\bf \Psi$. Instead of pursuing an approach similar to the one used to reach (\ref{eq:EqModel5}), the algorithm has its roots in the joint solution found by setting the gradient of $ J_{\rm ML}( {\bf Y, C, \Psi,\epsilon})$ to zero. Before presenting the algorithm, we therefore briefly address this gradient approach. Each entry of ($\ref{eq:EqModel}$) is given by $y_{n,m} = \psi_{n,m}c_m + n_{n,m}$. The derivative of $J_{\rm ML}( {\bf Y, C, \Psi,\epsilon})$ with respect to $c_m^*$ is given by \begin{equation} \label{eq:Grad} \frac{ \partial J_{\rm ML}( {\bf Y, C, \Psi,\epsilon}) } { \partial c_m^* } = \epsilon c_m + \sum\limits_{\substack{n =1 \\ n\neq m}}^{M} |\psi_{n,m}|^2 c_m - y_{n,m}\psi^*_{n,m}. \end{equation} Setting (\ref{eq:Grad}) to zero and solving for $c_m$ yields \begin{equation} \label{eq:CmInScalars} c_m = \left( \epsilon + \sum\limits_{\substack{n =1 \\ n\neq m}}^{M} |\psi_{n,m}|^2 \right)^{-1} \sum\limits_{\substack{n =1 \\ n\neq m}}^{M} \psi^*_{n,m} y_{n,m} , \end{equation} which can be expressed in a vector form as \begin{equation} \label{eq:LSCss} \hat{{\bf c}}_{\rm ML} = \Big( {\bf \Psi}^{ H}_{\rm eq}({\bf \tilde{\Psi}} ) {\bf \Psi}_{\rm eq}({\bf \tilde{\Psi}} ) + \epsilon {\bf I} \Big)^{-1} {\bf \Psi}^{ H}_{\rm eq}({\bf \tilde{\Psi}} ) { \bf \widetilde{Y}}. \end{equation} In a similar fashion, setting the derivative of $J_{\rm ML}( {\bf Y, C, \Psi,\epsilon})$ with respect to $\psi_{n,m}^*$ to zero and solving for $\psi_{n,m}$ provides \begin{equation} \label{eq:PsiInScalars} \psi_{n,m} = \left( |c_{n}|^2 + |c_{m}|^2 +2 \epsilon \right)^{-1} \left( y_{m,n} c^*_{n} + y_{n,m} c^*_{m} \right), \end{equation} which can be expressed in a vector form as (\ref{eq:LS}). Equations (\ref{eq:CmInScalars}) and (\ref{eq:PsiInScalars}) show the analytical form for each entry of the penalized-ML vector estimates, which will prove to be useful during the complexity analysis. Combining the results from (\ref{eq:LSCss}) and (\ref{eq:LS}) yield the joint solution \begin{equation} \label{eq:JointMLsol} \begin{bmatrix} { \hat{ \bf c }}_{\rm ML} \\ {\bf \tilde{\Psi}}_{\rm ML} \end{bmatrix} = \begin{bmatrix} \Big( {\bf \Psi}^{ H}_{\rm eq}({\bf {\bf \tilde{\Psi}}_{\rm ML}} ) {\bf \Psi}_{\rm eq}({\bf {\bf \tilde{\Psi}}_{\rm ML}} ) + \epsilon {\bf I} \Big)^{-1} {\bf \Psi}^{ H}_{\rm eq}({\bf {\bf \tilde{\Psi}}_{\rm ML}} ) { \bf \widetilde{Y}} \\ \Big( {\bf C}_{\rm eq}^{ H}({\hat{{\bf c}}_{\rm ML} }) {\bf C_{\rm eq}({\hat{{\bf c}}_{\rm ML} })} + 2 \epsilon {\bf I} \Big)^{-1} {\bf C}_{\rm eq}^{ H}({\hat{{\bf c}}_{\rm ML} }){\bf Y'} \end{bmatrix} \end{equation} The particular structure of (\ref{eq:JointMLsol}) suggests that a pragmatic approach for solving can be pursued. More specifically, (\ref{eq:JointMLsol}) can be separated into two sub-problems, i.e., solving for $ { \hat{ {\bf c}}}_{\rm ML} $ and ${\bf \tilde{\Psi}}_{\rm ML}$ separately. Since each of the solutions depend on previous estimates, the joint solution can be computed iteratively, by sequentially solving two separate regularized LS problems, given an initial guess. Since each iteration estimates $\bf c$ and ${\bf \tilde{\Psi}}$ separately, this approach can be seen as an instance of the EM algorithm \cite{Kay}, where the - often challenging - \textit{Expectation step} is performed by estimating only the first moment of the nuisance parameters $\left\{\psi_{m,n}\right\}$. The convergence of the algorithm can be analyzed using standard methods, such as a distance between consecutive point estimates. The GMM estimator can be used to compute a reliable initial guess for iteration - in contrast to a purely random initialization. This is often good practice to ensure convergence to a \textit{suitable} local optimum since $J_{\rm ML}( {\bf Y, C, \Psi},\epsilon)$ is not a convex function of its joint parameter space. For sake of clarity, Algorithm 1 summarizes the proposed iterative procedure. Observe that $\epsilon$, i.e. the penalty term parameter in (\ref{eq:Penaltyterm}), ends up regularizing both matrix inversions. This is of notable importance from two points-of-view: \textit{i)} from an estimation (robustness) point-of-view, since the matrices to be inverted are constructed from parameter estimates (and thus are subject to estimation errors) and no favorable guarantee exists on their condition number, e.g., see (\ref{eq:CeqStruct}). \textit{ii)} from a convergence point-of-view, as it is well-known that the convergence rate of regularized LS adaptive filters is inversely proportional to their eigenvalue spread \cite{Haykin}; This property combo justifies why Ridge Regression was pursued in the first place. \begin{algorithm}[t] \caption{ Expectation-Maximization } \small \begin{algorithmic}[1] \REQUIRE Measurement matrix $\bf Y$, convergence threshold $\Delta_{\rm ML}$, penalty parameter $\epsilon$, initial guess $\hat{\bf c}$ \STATE \textbf{Initialization}: set $\Delta = \delta$ where $\delta > \Delta_{\rm ML} $ \WHILE{$ \Delta \geq \Delta_{\rm ML} $} \STATE ${\bf \tilde{\Psi}}_{\rm ML} = \Big( {\bf C}_{\rm eq}^{ H}({\bf \hat{c}}) {\bf C_{\rm eq}(\bf \hat{c})} + 2 \epsilon {\bf I} \Big)^{-1} {\bf C}_{\rm eq}^{ H}(\bf \hat{c}) { \bf Y'}$ \STATE $\hat{{\bf c}}_{\rm ML} = \Big( {\bf \Psi}^{ H}_{\rm eq}({\bf \tilde{\Psi}}_{\rm ML} ) {\bf \Psi}_{\rm eq}({\bf \tilde{\Psi}}_{\rm ML} ) + \epsilon {\bf I} \Big)^{-1} {\bf \Psi}^{ H}_{\rm eq}({\bf \tilde{\Psi}}_{\rm ML} ) { \bf \widetilde{Y}}$ \STATE $\Delta = || \hat{{\bf c}}_{\rm ML} - \hat{{\bf c}} ||^2$ \STATE $\bf \hat{c}=\hat{{\bf c}}_{\rm ML}$ \ENDWHILE \OUTPUT Calibration coefficients estimate $\hat{{\bf c}}_{\rm ML}$ \end{algorithmic} \normalsize \label{table:iterativeML} \end{algorithm} A side remark regarding an application of the EM algorithm follows. We highlight that the calibration coefficients $\bf c$ and the equivalent channels $\psi_{m,n}=r_m h_{m,n} r_n$ are jointly estimated. As previously mentioned, this a feature is not present in the GMM estimator. Noticeably, this feature makes the EM algorithm robust and hence very suitable to calibrate distributed MIMO systems since channel fading (i.e., high variations of $|h_{m,n}|$) often occurs \cite{6760595}. As mentioned in Sec. \ref{sec:GMMe}, the system model used can be also representative to that of distributed systems. \subsection{Complexity Analysis } \label{subsec:Complexity} The complexity of each iteration of Algorithm \ref{table:iterativeML} is dominated by steps 3 and 4. Fortunately the block diagonal structure of the equivalent matrices allows for the inversions to be of reduced complexity, as detailed next. From (\ref{eq:PsiInScalars}), each calculation of $\psi_{m,n}$ requires a few multiplications and additions. Since $\big(M^2 - M\big)/2$ such calculations are needed to compute (\ref{eq:LS}), the complexity order of step 3 is $\mathcal{O}(M^2)$. Similarly, the complexity of step 4 is $\mathcal{O}(M^2)$ which can be seen directly from (\ref{eq:CmInScalars}). The explanation of the $\mathcal{O}(M^2)$ behavior is that the complexity of each calibration coefficient $c_m$ is $\mathcal{O}(M)$, and $M$ such calibration coefficients need to be computed. Overall, each iteration of the EM algorithm is of complexity $\mathcal{O}(M^2)$, and the algorithm's complexity is $\mathcal{O}(N_{\rm ite} \, M^2)$, with $N_{\rm ite}$ being the number of iterations needed for convergence. The number of iterations needed for convergence is studied in Sec. \ref{subsubsec:ConvEM}. As for the GMM estimator, the closed-form solutions presented in \cite{6760595} and \cite{6502966} have complexity orders of $\mathcal{O}(M^3)$, as they consist of an inverse of a Hermitian matrix of size $M-1$, and of the eigenvector associated with the smallest eigenvalue of a Hermitian matrix of size $M$. On a practical note, we remark that the computational complexity of both approaches does not stand as a prohibitive factor for BS arrays using hundreds or even several thousands of antennas. This is because calibration typically needs to be performed on a hourly basis \cite{ArgosThesis,BasestationPaper}. \subsection{Performance Assessment} \subsubsection{Simulation setup for the MSE analysis} \label{Sec:SimSetup} We simulate reciprocity calibration over a $4 \times 25$ rectangular array as the one in Fig. \ref{fig:DownlinkSetup}. The linear regression parameters obtained in Sec. \ref{subsec:Modelingcoup} are used to model the coupling gains $\bar{h}_{m,n}$. The $m$th transceiver maps to the antenna in row $a_{\rm row}$ and column $a_{\rm col}$ of the array as $m= 25 (a_{\rm row}-1) + a_{\rm col}$. The reference transceiver index is set to $\textit{ref}=38$, as it is associated with one of the most central antenna elements of the 2-D array. The Cram\'{e}r-Rao Lower Bound (CRLB) is computed to verify the asymptotical properties of the estimators' error \cite{Kay}. From (\ref{eq:CouplingMOdel}) and (\ref{eq:SignalModel}), it can be seen that if $\bar{h}_{m,n}$ is assumed to be known, the PDF of $\bf Y$ conditioned on $\bf R$ and $\bf T$ is a multivariate Gaussian PDF. This makes the CRLB of $\bf c$ to have a well known closed-form, which is computed in Appendix B. The transmitter $t_m$ and receiver $r_m$ gains are set to $ t_m = ( 0.9 + \frac{0.2 m}{M} \exp(-j2 \pi m/M) ) / t_\textit{ref}$ and $ r_m = ( 0.9 + \frac{0.2 (M-m)}{M} \exp(j2 \pi m/M) ) / r_\textit{ref}$, respectively. We used this deterministic setting for the transceivers, as it allows for a direct comparison of the parameter estimates' MSE with the CRLB. Moreover, this setting incorporates eventual mismatches within the transceivers complex amplitude which are in line with the magnitude variations measured from the transmitters/receivers of our testbed, i.e., spread of around 10-percent around the mean magnitude (and uniform phase). This spread is in line with transceiver models adopted in other calibration works \cite{6760595}. The variance $\sigma^2$ of the multipath propagation contribution during calibration is set to $-60$ dB. Our motivation for this value is as follows. If the closest physical scatter to the BS is situated, say, 15 meters away, then by Friis' law \cite{molisch2010wireless} we have a path loss of around $ 10 \log_{10}( \frac{4 \pi d }{\lambda} ) = 10 \log_{10}( \frac{4 \pi (2\times 15m) }{ 3 \times 10^8/(3.7 \times 10^9) } ) = 73$ dB per path. This number does not account for further losses due to reflections and scattering. Based on this, we use $-60$ dB as the power (variance) of the resulting channel stemming from a large number of such uncorrelated paths. For consistency with the reference antenna concept used in the CRLB computations, the MSE of the EM algorithm output $\hat{{\bf c}}_{\rm ML}$, is defined as \begin{align} \label{eq:MSENewDef} \mathrm{MSE}_m & = \mathrm{E} \left\{ | c_m - \left[ \hat{{\bf c}}_{\rm ML} \right]_{ m,1} / \left[ \hat{{\bf c}}_{\rm ML}\right]_{ \textit{ref},1} |^2 \right\}, \end{align} since the estimated "reference" coefficient $\left[ \hat{{\bf c}}_{\rm ML}\right]_{ \textit{ref},1}$ is not necessarily equal to $1$. This is because the concept of reference antenna is not used by the EM algorithm. As for the GMM estimator, the constraint provided in \cite{6502966} is adopted, i.e., $c_\textit{ref}=1$ in (\ref{eq:GMMeCost}), which is already coherent with the computed CRLB. The results are averaged over 1000 Monte-Carlo simulations, and the threshold $\Delta_{\rm ML}$ is set to $10^{-6}$ which, based on our experience, ensures that convergence is reached in many parameter settings. The initial guess for the EM algorithm is produced by the GMM estimator. \subsubsection{Estimators' MSE vs CRLB} \label{subsubsec:MSEvsCRLB} Fig. \ref{fig:CRLBvsGMMvsML} compares the MSE of the estimators with the CRLB for two transceiver cases. Both estimators appear to be asymptotically efficient. Noticeably, the performance gains of the EM algorithm can be grossly superior to the GMM (up to $10$ dB), as it approaches the CRLB at much smaller values of $N_0$. As mentioned previously, this is mainly because the GMM estimator does not appropriately weight moment conditions with less quality. Two remarks about the CRLB itself are now in place. \textit{i)} As mentioned in Appendix B, the assumptions used during the CRLB computations, could result in an underestimated CRLB. Indeed, the results in Fig. \ref{fig:CRLBvsGMMvsML} suggest that the assumptions used during the CRLB computations do not affect its final value since the estimators' MSE asymptotically converges to the computed CRLB. This is convenient since (asymptotically) efficient estimators can still be built with limited information. \textit{ii)} It was assumed that $\phi_{m,n}$ - the phase of $\bar{h}_{m,n}$ - is known during the CRLB computations, although it is originally modeled as a random variable in Sec.\ref{subsec:Modelingcoup}. However, if $\phi_{m,n}$ is assumed to be known, the CRLB is independent of the value of $\phi_{m,n}$. This is because a phase rotation in $\boldsymbol{\mu}_{n,m}$, does not influence (\ref{eq:CRLBgen}), due to the structure of $\boldsymbol{\Sigma}^{-1}$. Thus, any realization of $h_{m,n}$ - from the model proposed in Sec. \ref{sec:ModMutualCoupling} - provides the same CRLB result. From the previous two remarks and standard estimation theory \cite{Kay}, it follows that the (narrowband) calibration error - in the high SNR regime - produced by the studied estimators can be well modeled as a multivariate zero-mean Gaussian distribution with covariance matrix given by the transformed inverse Fisher information matrix, found in (\ref{eq:CLRB}). The Gaussianity of the calibration error is further verified (experimentally) in Sec. \ref{subsec:CalErrorMod}. \begin{figure*} \center \begin{tabular}{cc} \includegraphics[scale=.77]{CRLBvsGMM-NeighboorAntTry6}\hspace{0.1cm} \includegraphics[scale=.77]{CRLBvsGMM-EdgeAntTry6}\hspace{0.1cm} \end{tabular} \caption{MSE of the GMM estimator and the EM algorithm (with $\epsilon=0$), versus their CRLB (solid line), for 2 extreme transceiver cases. Namely, a transceiver associated with an antenna at the edge of the array, and a transceiver associated with an antenna adjacent to the reference. The CRLB plotted by a dashed line is discussed in Sec. \ref{subsec:CalRedMeas}.} \label{fig:CRLBvsGMMvsML} \end{figure*} \subsubsection{Convergence of the EM algorithm} \label{subsubsec:ConvEM} The convergence is analyzed for $N_0=-40$ dB, which from Fig. \ref{fig:CRLBvsGMMvsML} appears to be a region where EM-based estimation provides significant gains compared to GMM. Fig. \ref{fig:NiterationsML} illustrates the role played by the regularization constant $\epsilon$ in terms of convergence rate and MSE. Noticeably, the higher $\epsilon$ the faster the algorithm appears to converge. The number of iterations until convergence $N_{\rm ite}$ is seen to be much smaller than $M$ with large enough $\epsilon$ (i.e., around $5$ iterations when $\epsilon=0.1$).\footnote{If, instead, the initial guess is chosen randomly (e.g., calibration coefficients with unit-norm and i.i.d. uniform phases) then our simulations indicate that the order of $N_{\rm ite}$ is $\mathcal{O}(M)$.} However, increasing $\epsilon$ indefinitely is not an option as it degrades the performance. Moreover, the results also indicate that proper tuning of $\epsilon$ can provide MSE gains compared to the unregularized case which is asymptotically efficient (notice that this does not conflict with the CRLB theorem, as an estimator built with $\epsilon \neq 0$ is not necessarily unbiased). This was - to some extent - expected due the benefits of Ridge Regression as discussed in Sec.\ref{subsec:EMalg}. With that, we identify that a fine tuning of $\epsilon$ can provide many-fold improvements. We note that in the literature there is a number of approaches available that deal with optimization of regularization constants in standard (non-iterative) LS problems \cite{Bishop}. However, they are not directly applicable to this work as they typically optimize single error metrics, and are in general computationally expensive. Here, our main use for $\epsilon$ is to accelerate the convergence and provide estimation robustness to the algorithm, all achieved at no complexity cost. For this matter, we treat $\epsilon$ as a hyperparameter (an approach widely adopted in regularized LS adaptive filtering \cite{Haykin}). Further investigation on fully automatizing the EM algorithm is an interesting matter of future work. For the remainder of the paper, we set $\epsilon = 0$ and proceed accordingly, for simplicity. \begin{figure*} \center \begin{tabular}{cc} \includegraphics[scale=.75]{AdjAntennaNite}\hspace{0.1cm} \includegraphics[scale=.75]{EdgeAntennaNite}\hspace{0.1cm} \end{tabular} \caption{ MSE per iteration of the EM algorithm, for different regularization constants $\epsilon$. The plots are for $N_0=-40$ dB, and the remaining simulation settings are the same as Fig. \ref{fig:CRLBvsGMMvsML}. Note the different scales of the plots. } \label{fig:NiterationsML} \end{figure*} \subsubsection{Simulation Setup for Sum-rate Capacity Analysis } The same parameter setting as in Sec. \ref{Sec:SimSetup} is kept in this setup, and the remaining simulation framework is defined next. We assume that the uplink channel ${\bf H}_{\rm UP}$ is perfectly know to the BS, and that there are two noise sources in the system. The first noise source is downlink additive noise modeled by $\bf w'$, see ({\ref{eq:DownLinkCh}}). Here, $\bf w'$ have i.i.d. zero-mean circularly symmetric complex Gaussian distributed random entries with variance $N_w$ equal to 1. The same model is used for the entries of the downlink channel matrix ${\bf H}_{\rm DL}$. The second noise source is the error during estimation of $\bf c$ (i.e., calibration error). With that, the precoded signal ${\bf z'} = {\bf P x}$ is subject to calibration errors. The transmit power constraint $\mathbb{E}{\left\{||{\bf z'}||^2\right\}}= K$ is used. Also, we set $K=10$ single antenna users, and assume $t^U_k = t^B_k$ and $r^U_k = r^B_k$ for sake of simplicity. The sum-rate capacities \cite{Paulraj} are evaluated for different calibration cases. More specifically, when no calibration is employed (i.e., $\hat{c}_m =1$), when calibration is performed with the GMM or the EM algorithm, for the case of perfect calibration (i.e., $\hat{c}_m = c_m$), and as a baseline, when precoding is performed using the \textit{true} downlink channel ${\bf H}_{\rm DL}$. The analysis is performed with $N_0=-40$ dB, for the reasons mentioned during the convergence analysis. \subsubsection{Sum-rate Capacity Results} \begin{figure*} \center \begin{tabular}{cc} \includegraphics[scale=.74]{Sum-rateCapZF}\hspace{0.1cm} \includegraphics[scale=.74]{Sum-rateCapMRT}\hspace{0.1cm} \end{tabular} \caption{ CDFs of the sum-rates capacities for different calibration cases. Left) ZF precoder; Right) MRT precoder. } \label{fig:ZfandMRTcap} \end{figure*} Fig. \ref{fig:ZfandMRTcap} shows the obtained sum-rates cumulative distribution functions (CDFs) for different precoding schemes \cite{LUP4305564}. Similarly to the MSE results, EM-based calibration provides significant gains compared to the GMM case. The magnitude of these gains obviously depend on both the calibration (and communication system) setup. For example, there are no sum-rate differences when $N_0 \rightarrow 0$ or $N_0 \rightarrow \infty$, as both GMM and EM approaches converge to that of perfect calibration, or to the uncalibrated case, respectively. Thus, it in only in a certain region of $N_0$ values that EM based calibration provides gains.\footnote{Our analysis based on a wide range of parameter values also indicates that, in general, stricter calibration requirements need to be met in order to release the full potential of ZF compared to MRT precoding (i.e., no sum-rate difference compared to the perfect calibrated case). Noticeably, this observation is in line with previous calibration studies \cite{7434053}.} It is interesting that - for this setup - there is no fundamental loss in capacity between this calibration approach (i.e., precoding with perfectly calibrated uplink CSI) and precoding with the true downlink CSI. Quantifying this loss is out of scope of this work, however, the interested reader is referred to \cite{7018038} for an overview on the loss of different types of reciprocity calibration. We now finalize the section with two interesting remarks. \subsection{Remark 1: Calibration with Reduced Measurement Sets } \label{subsec:CalRedMeas} There are several benefits of using a reduced measurement set for calibration (e.g., by only relying on high quality measurements). This is possible as long as (\ref{eq:EqModel}) is not under-determined. As an illustrative example, the dashed line in Fig. \ref{fig:CRLBvsGMMvsML} shows the CRLB when a reduced measurements set - comprising the measurements between antenna pairs whose elements are distanced by at most $1/\sqrt{2}$ wavelengths - is used. The number of measurement signals in this case drops from $M(M-1)$ to less than $8M$, since one antenna signals to, at most, $8$ other antennas. The performance loss turns out to be insignificant, i.e. $2$ dB for the neighbor case and $4$ dB for the edge case, considering the number of signals discarded. This indicates that the channels between neighbor antennas, which are dominated by mutual coupling, are the most important for calibration. Thus, there is an interesting trade-off between the asymptotic performance of an estimator and its computational complexity (proportional to the number of measurements). Another benefit of using reduced measurement sets is a possible reduction of resource overhead dedicated for calibration. This can be very important from a system deployment point-of-view. To finalize, we remark that ML closed form estimators can be also reached when reduced measurement sets are used. This can be the case for the current (general) calibration setup when a reduced set of measurements is used, or for the case of working with a full set of measurements when the calibration setup is a special case. An example of the latter is given next. \subsection{Remark 2: Closed-form Unpenalized ML Calibration for Linear arrays } \label{sec:LinearArray} Consider an $M$-antenna linear array, and let $m$ index the antennas in ascending order starting at one edge of the linear array. Assume that mutual coupling only exists between adjacent antenna elements, and that the channel between any other antenna pairs is weak enough so that it can be neglected without any noticeable impact on performance. We summarize our findings in Proposition 1. \textit{Proposition 1:} Using a reference antenna as a starting point, say $c_{1}=1$, the unpenalized ML solution for any $c_{\ell+1}$, with $1\leq \ell \leq M-1$, can be obtained sequentially by \begin{equation} \label{eq:closedFormML} \hat{c}_{\ell+1} = \hat{c}_{\ell}\frac{ y^*_{\ell+1,\ell} y_{\ell,\ell+1} }{ |y_{\ell+1,\ell}|^2 }. \end{equation} \iftoggle{2Collumn}{ \textit{Proof:} See Appendix C. \hspace*{45mm} \rule{2.5mm}{2.5mm}}{ \textit{Proof:} See Appendix C. \hspace*{116mm} \rule{2.5mm}{2.5mm}} We can also deduce the following interesting corollary. \textit{Corollary 1:} For any of the two constraints considered in (\ref{eq:GMMeCost}), the GMM (vector) estimator coincides with (\ref{eq:closedFormML}) up to a common complex scalar. \iftoggle{2Collumn}{ \textit{Proof:} See Appendix C. \hspace*{45mm} \rule{2.5mm}{2.5mm}}{ \textit{Proof:} See Appendix C. \hspace*{116mm} \rule{2.5mm}{2.5mm}} \section{Validation of the calibration method in a massive MIMO testbed} \label{sec:Validation} In this section, we detail the experiment performed to validate the proposed mutual coupling based calibration method. More specifically, we implemented it in a software-defined radio testbed, and performed a TDD transmission from 100 BS antennas to 3 single antenna terminals. Note that the analysis conducted in this section and in Sec. \ref{sec:WB_EM} is measurement based. As stationarity is assumed in the analysis, we monitored the system temperature throughout the measurements and verified no significant changes. We also made an effort to keep static propagation conditions, and performed the experiments at late hours in our lab with no people around. \subsection{Brief Description of the Testbed} Here we briefly outline the relevant features of the testbed for this work. Further information can be found in \cite{BasestationPaper}. \subsubsection{Antenna/Transceiver setup} \label{sub:ANteTrans} The BS operates with 100 antennas, each antenna connected to one distinct transceiver. For simplicity, the same transceiver settings (e.g., power amplifier gain and automatic gain control) are used in both calibration and data communication stages for all radio units. This ensures that the analog front-ends yield the same response during both stages, thus the estimated calibration coefficients are valid during the communication stage \subsubsection{Synchronization of the radios} Time and Frequency synchronization is achieved by distributing reference signals to all radio units. However, this does not guarantee phase alignment between all BS transceiver radio chains which motivates reciprocity calibration. \subsection{Communication Protocol used} \footnotesize \begin{table}[t] \caption{High-level OFDM parameters} \noindent\begin{tabular*}{\columnwidth}{@{\extracolsep{\stretch{1}}}*{7}{l}@{}} \toprule \textbf{Parameter} & \textbf{Variable} & \textbf{Value} \\ \midrule Carrier frequency & $f_{\rm c}$ & 3.7\;GHz \\ Sampling Rate & $F_{\rm s}$ & 7.68\,MS/s \\ FFT Size & $N_{\rm FFT}$ & 2048 \\ \# Used sub-carriers & $N_{\rm SUB}$ & 1200 \\ \bottomrule \end{tabular*} \label{table:SystemParam} \end{table} \normalsize Once the measurements to construct the observation matrix $\bf Y $ are performed, $\bf c$ is estimated using the unpenalized EM algorithm. The following sequence of events is then performed periodically: \subsubsection{Uplink Channel Estimation and Calibration}Users simultaneously transmit frequency orthogonal pilot symbols. The BS performs LS-based channel estimation, and interpolates the estimates between pilot symbols. Reciprocity calibration is then performed independently per subcarrier, i.e. as in (\ref{eq:lastEq}), for coherence purposes with Sec. \ref{sec:ChannelModel}. This calibrated version of the downlink channel is then used to construct a ZF precoder. \subsubsection{Downlink channel estimation and data transmission} Downlink pilot symbols are precoded in the downlink and each user performs LS-based channel estimation. Using the estimates, each user recovers the payload data using a one-tap equalizer. We note that 4-QAM signaling per OFDM sub-carrier is used for uplink channel estimation and data transmission. The main parameters are shown in Table \ref{table:SystemParam}. Further information on the signaling protocol (e.g., uplink/downlink frame structure or uplink pilot design) is found on \cite{BasestationPaper}. \subsection{Measurement Description} The setup used in our experiments is shown in Figure \ref{fig:DownlinkSetup}. Although not being a typical propagation scenario found in cellular systems, this extreme setup - closely located users under strong line-of-sight conditions - requires high calibration requirements to be met if spatial separation of users is to be achieved. In addition, we use ZF precoding as it is known to be very sensitive to calibration errors \cite{7018038}. The EVM \cite{schenk2008rf} of the downlink equalized received samples at each mobile station was evaluated, and used as performance metric for validation purposes. The rationale is that, with multiple mobile terminals, calibration errors are translated into downlink inter-user interference (and loss of array gain), which increases the EVM. Letting $r$ be the downlink equalized received sample when symbol $s$ is transmitted, the EVM is defined as \begin{equation} \label{eq:EVMs} \mathrm{EVM} = \mathrm{E}\left\{ \frac{ |r-s|^2 }{ |s|^2}\right\}, \end{equation} where the expectation is taken over all system noise sources (e.g., hardware impairments and thermal noise). Our estimate of (\ref{eq:EVMs}) was obtained by averaging realizations of $|r-s|^2 / |s|^2$ over all OFDM sub-carriers and over received OFDM symbols. We estimated the EVM for different energy values of the uplink pilots and calibration signals. We do so in order to be able to extract insightful remarks for the analysis of the results. In particular, letting $E_{\rm Pilot}=\mathrm{E} \left\{ p_k p_k^* \right\}$ in (\ref{eq:UpLinkCh}) denote the energy of the uplink pilot, which, for simplicity, is the same for all users, and let $E_{\rm Cal}$ denote the energy of the sounding signal $s_{m}$ in (\ref{eq:SystemModel33}), we estimated the EVM for a 2-dimensional grid of $E_{\rm Pilot}$ and $E_{\rm Cal}$. The results reported next are given with respect to the relative energies $Er_{\rm Pilot}= E_{\rm Pilot} / E^{\rm max}_{\rm Pilot} $ and $Er_{\rm Cal}= E_{\rm Cal} / E^{\rm max}_{\rm Cal}$, where $E^{\rm max}_{\rm Pilot}$ and $ E^{\rm max}_{\rm Cal}$ are the maximum energies of the uplink pilot and calibration signal used in the experiments. Other systems parameters (e.g., transmit power in the downlink) were empirically set and kept constant throughout the experiment. \subsection{Validation Results} Fig. \ref{fig:AntennaCouplingNo2} shows the measured EVMs for the $3$ user terminals in our experiment. Before discussing the results, we remark that analyzing the EVM when $Er_{\rm Cal}$ is reduced beyond $-30$ dB is not of fundamental interest, as it approaches the uncalibrated case (where high EVMs are to be expected). Overall, a positive trend is observed with increasing $Er_{\rm Cal}$ until $-10$ dB. This reflects the BS ability of spatially separating users which increases with increasing the calibration quality. The fact that downlink EVMs down to $-10$ dB are achieved, which are much smaller than the EVMs when $Er_{\rm Cal}= -30$ dB, i.e. close to the uncalibrated case, motivates our validation claim. It is possible to observe a saturation of the EVMs at high enough $Er_{\rm Cal}$ and $Er_{\rm Pilot}$ for all user cases. This is an expected effect in practical systems. Explained briefly, system impairments other than the calibration or the uplink channel estimation error, become the dominant error sources that bound the EVM performance\footnote{Mobile terminals error sources (e.g., in-phase and quadrature imbalance or thermal noise) qualify for such impairments. For a given downlink transmit power, it is straightforward to understand how such impairments bound the downlink EVMs regardless of the calibration and uplink estimation quality.}. Remarkably, this saturation effect implies that the calibration SNR - available in a practical array as ours - is sufficiently large not to be the main impairment to constrain the system performance. Mutual coupling channels are thus reliable (and reciprocal enough), so that they can be used for signaling in order to calibrate the system.\footnote{We note there exists an interesting theoretical trade-off between the calibration quality and the capacity of downlink channels with respect to the strength of mutual coupling. In practice, the proposed calibration method can be used in compact antenna arrays with very low coupling (say $-30$ dB between adjacent elements) provided that the transmit power during calibration is sufficient to provide good enough estimation SNR. In such a setup, the impact of coupling in the capacity is negligible.} \begin{figure*}[t] \center \includegraphics[scale=.80]{EVM_MS0_1and2} \caption{Measured EVM at each of the three user terminals during a massive MIMO downlink transmission.} \label{fig:AntennaCouplingNo2} \end{figure*} \section{Aspects of Wideband Calibration and Error Modeling} \label{sec:WB_EM} A short summary of this section follows. Using the measurements from the Sec. \ref{sec:Validation}, we treat the estimated calibration coefficients across OFDM sub-carriers as realizations of a discrete stochastic process. Using low rank approximation theory, we propose a parametrized low dimensional basis that characterizes the subspace spanned by this process accurately. Based on the reduced basis, we propose a wideband estimator that averages out the calibration error across frequency. Using the wideband estimator results, we validate the narrowband calibration error model proposed in Sec. \ref{subsubsec:MSEvsCRLB}. We remark that our experiment makes use of a bandwidth of $ F_s N_{\rm sub} / N_{\rm FFT} = 4.5$MHz. \subsection{Wideband Remarks for the Calibration Coefficients} Denote the calibration coefficient of BS antenna $m$ at the $k$th OFDM sub-carrier as $C_m[k] = t_m^k / r_m^k $. The variable $\hat{C}_m [k]$ is the estimate of $C_m[k]$ at sub-carrier $k$ - obtained, e.g., with the EM algorithm - and is modeled as \begin{align} \label{eq:CCsMod} \hat{C}_m [k] = & C_m[k] + E_m[k] \nonumber \\ =& |C_m[k]|\exp(j2\pi\zeta_m[k]) + E_m[k] \end{align} where $E_m[k]$ is an i.i.d. random process representing the calibration error which is assumed zero-mean and independent of $C_m[k]$. Let the random phasor process $\exp(j2\pi\zeta_m[k])$ in ($\ref{eq:CCsMod}$) absorb the phase shift stemming from the arbitrary time that a local oscillator needs to lock to a reference signal. Such phase shift is often modeled as uniformly distributed, and thus \begin{equation} \label{eq:ZR-mean} \mathrm{E}\left\{\exp(j2\pi\zeta_m[k])\right\}= 0. \end{equation} Moreover, since local oscillators associated with different transceivers lock at arbitrary times, it is safe to assume \begin{equation} \label{eq:UncProc} \mathrm{E}\left\{\exp(j2\pi\zeta_m[k_1]) \exp(-j 2\pi\zeta_n[k_2]) \right\}= 0, \; m\neq n. \end{equation} Not making further assumptions on the statistics of $\hat{C}_m [k]$, we now proceed with a series expansion, but before doing so we make one last remark. The series expansion conducted next is performed based on measurements from the 100 testbed transceivers, and serves as an example approach to obtain a suitable basis for $\hat{C}_m [k]$. This can well apply to mass-production transceiver manufactures that can reliably estimate the statistical properties of the hardware produced. However, as our testbed operates with relatively high-end transceivers - compared to the ones expected to integrate commercial massive MIMO BSs - the dimensionality of the subspace verified in our analysis might be underestimated. Intuitively, the higher transceiver quality, the less basis functions are needed to accurately describe $\hat{C}_m [k]$. Nevertheless, the upcoming remarks apply for smaller bandwidths - than $4.5$MHz - depending on the properties of the transceivers. \subsection{Principal Component Analysis} From the assumption (\ref{eq:ZR-mean}), it follows that the element at the $v_1$th row and $v_2$th column of the covariance matrix ${\bf K}_m$ of $\hat{C}_m [k]$ is defined as \begin{equation} \label{eq:Kmat} [{\bf K}_m]_{[v_1,v_2]}= \mathrm{E}\left\{ \hat{C}_m[v_1] \; \hat{C}^*_m[v_2] \right\}. \end{equation} From the assumption (\ref{eq:UncProc}), it follows that the principal components of $\hat{C}_m[k]$ are obtained by singular value decomposition (SVD) of ${\bf K}_m$ only \cite{van2004detection}. Let the SVD of ${\bf K}_m$ be written as \begin{equation} \label{eq:SVD} {\bf K}_m = \sum_{i=1}^{\rm N_{SUB}} {\bf u}^{ m}_i \lambda^{ m}_i ({\bf u}^{ m}_i)^{ H}, \end{equation} where $\left\{ {\bf u}^m_i \right\}_{i=1}^{\rm N_{SUB}}$ are the principal components, and $ { \lambda}^m_i $ is the power (variance) of the coefficient obtained from projecting $\hat{C}_m [k]$ into ${\bf u}^m_i$. We use the convention $ \lambda^m_1 \geq \lambda^m_2 \dots \geq \lambda^m_{N_{\rm SUB}}$, and $ {\bf u}^m_i = \big[ [{u}^m_i[1], \cdots, {u}^m_i[N_{\rm SUB}] \big]^{\rm T} $. \begin{figure*}[t] \centering \includegraphics[scale=.83]{PlotSVD} \caption{ Principal component and coefficients of $\hat{C}_m [k]$. \textit{Left)} The 10 strongest normalized singular values for 20 transceivers; \textit{Middle)} Magnitude of the principal component for 3 transceivers; \textit{Right)} Phase of the principal component for 3 transceivers.} \label{fig:SVD} \end{figure*} Fig. \ref{fig:SVD} shows several coefficients and basis functions of the expansion, that were estimated based on 100 realizations of $\hat{C}_m [k]$, each measured with $Er_{\rm Cal} = 5$ dB (which from Fig. \ref{fig:AntennaCouplingNo2} provides a relatively high calibration SNR). Noticeably, it appears that all processes (one per transceiver) live mostly in a one-dimensional sub-space and thus can be well described by their first principal component ${\bf u}^{ m}_1$. This fact also indicates that the contribution of the calibration error in the expansion is small, and thus the first principal component of $\hat{C}_m [k]$ is also representative for the true coefficients $C_m [k]$. Visual inspection indicates that both magnitude and phase of the first principal component can be well approximated with a linear slope across frequency. The inherent error of this approximation is very small compared to the magnitude of the process itself. We note that this linear trend holds for any transceiver of the array (not only for the ones shown in Fig. \ref{fig:SVD}). \subsection{Wideband Modeling and Estimation} The previous analysis indicates that any first principal component can be well described by a linear magnitude slope $\gamma_m$, and a linear phase $\xi_m$ across frequency. Such properties are well captured by the Laplace kernel $\exp( (\gamma_m + j2\pi \xi_m)k ),$ for small values of $|\gamma_m|$ (since the range of $k$ is finite). The final parameter to model a realization of the process is the complex offset $A_m$. With that, the general model (\ref{eq:CCsMod}) can thus be re-written as \begin{equation} \label{eq:ModelC} \hat{C}_m[k] = A_m\exp( (\gamma_m + j2\pi \xi_m)k ) + w_m[k], \end{equation} where $w_m[k]$ is a random process that absorbs: the calibration error $E_m[k]$, the error due to the low rank approximation, and the error due to the linear modeling of the first principal component ${\bf u}^{ m}_1$. Given an observation $\{ \hat{C}_m[k]\}_{k=1}^{ N_{\rm SUB}}$, the ML estimator of $A_m$, $\xi_m$ and $\gamma_m$, namely, $\hat{A}_m$, $\hat{\xi}_m$ and $\hat{\gamma}_m$ is straightforward to derive \cite{Kay}. Thus, we define the wideband estimator of $\hat{C}_m[k]$ as \begin{equation} \label{eq:MLfit} \hat{C}_m[k]^{ \rm WB} = \hat{A}_m\exp( (\hat{\gamma}_m + j2\pi \hat{\xi}_m)k ). \end{equation} For illustration purposes, a realization of the ML wideband estimator $\hat{C}_m[k]^{\rm WB}$ is contrasted with that of the narrow-band estimator $\hat{C}_m[k]$ in Fig. \ref{fig:MLfit}. The obtained error reduction is evident. \begin{figure}[t] \centering \includegraphics[scale=.80]{MLfit} \caption{ A realization of the narrow-band estimator $\hat{C}_m[k]$, and the proposed wideband estimator $ \hat{C}_i[k]^{\rm WB}$.} \label{fig:MLfit} \end{figure} \subsection{A Model for the Calibration Error} \label{subsec:CalErrorMod} Here, we use the wideband estimator results to verify the Gaussianity of the narrow-band calibration error proposed in Sec. \ref{subsubsec:MSEvsCRLB}. This is done under the two following main assumptions. \textit{1) The residual process $ E_m[k] = \hat{C}_m[k] - C_m[k]$ is well described by $ \hat{E}_m[k] = \hat{C}_m[k] - \hat{C}_m[k]^{\rm WB}$}. This is reasonable if $ \mathrm{E}\left\{ | \hat{C}_m[k]^{\rm WB} - C_m[k] |^2 \right\} \ll \mathrm{E}\left\{ | \hat{C}_m[k] - C_m[k] |^2 \right\} $. To justify, the estimation gains scale linearly in the number of realizations \cite{Kay}, which is $ N_{\rm SUB}=1200$ in this case. Assuming that: the estimation error is independent across realizations, the underlying model (\ref{eq:ModelC}) describes the first principal component well, and the low rank approximation error is minuscule, there are gains of $10\log_{10}N_{\rm SUB}\approx 30$ dB which justify the first main assumption. \textit{2) The residual process $ E_m[k] $ is ergodic}.\footnote{Ergodicity is necessary since each (independent) measurement of $\hat{C}_m[k]$ takes about ten minutes with our test system (due to the locking time of the local oscillator to the reference signal). As potential system temperature drifts during the measurements can result in varying statistical properties, it is safer to perform the analysis based on one solely realization of $E_m[k]$.} This is met if $E_m[k]$ is stationary and the ensemble of $N_{\rm SUB}$ samples is representative for statistical modeling. The former holds for small OFDM bandwidths (e.g., $4.5$ MHz) as the hardware impairments do not vary significantly across the band. The latter is also met, as we have $N_{\rm SUB}=1200$ narrow-band estimators whose estimated errors $\{ \hat{E}_m[k] \}_{k=1}^{N_{\rm SUB}}$ were found to be mutually uncorrelated. Fig. \ref{fig:CDFerror} shows the empirical CDF of both real and imaginary parts of $\{ \hat{E}_m[k] \}_{k=1}^{N_{\rm SUB}}$ - which we found to the uncorrelated - for two transceiver cases. Each of the empirical CDFs is contrasted with a zero-mean Gaussian distribution of equal variance. Overall, the empirical CDFs for both transceivers resemble a Gaussian CDF extremely well. The Gaussianity of the calibration error was further verified by passing a Kolmogorov-Smirnov test with $0.05$ significance level \cite{daniel1990applied}. We note that these observations hold not only for the two transceivers in Fig. \ref{fig:CDFerror}, but for all transceivers of the array. Noticeably, the empirical distribution of the calibration error is in line with the asymptotic properties of ML estimators, i.e. the error can be modeled by an additive zero-mean Gaussian multivariate. The final element for a full characterization is its covariance matrix, relating the errors across antennas. A good approximation (at high SNR) is the inverse of the transformed Fisher Information matrix in (\ref{eq:CLRB}). Noticeably, future calibration works can benefit from the convenience of safely assuming a non-white Gaussian calibration error. \begin{figure}[t] \centering \includegraphics[scale=.79]{CDFs_error} \caption{ Empirical CDFs for the real and imaginary parts of the calibration error, for a transceiver at the edge of the array, and for an adjacent transceiver to the reference antenna. A Gaussian CDF of equal variance is plotted for both cases for comparison.} \label{fig:CDFerror} \end{figure} \section{Conclusions} \label{sec:conclusions} We have proposed and validated a convenient calibration method which rely on mutual coupling to enable the reciprocity assumption in TDD massive MIMO systems. We verified that in a practical antenna array, the channels due to mutual coupling are reliable and reciprocal enough, so that they can be used for signaling in order to calibrate the array. The iterative ML algorithm is asymptotically efficient and outperforms current state-of-the-art estimators in an MSE and sum-rate capacity sense. Further improvements - in terms of MSE and convergence rate - can be harvested by proper tuning of its regularization hyperparameter. The calibration error can be further reduced by proper averaging over the radio bandwidth. More importantly, it did not stand as the main impairment to constraint the performance of the system, from our experiments. Our measurements also verified that the narrow-band calibration error (at high SNR) is Gaussian distributed, which is coherent with the theory of the estimator proposed. The convenience of safely assuming a non-white Gaussian calibration error can, hopefully, open the door for future analytical studies of calibrated TDD massive MIMO systems. \section*{Acknowledgments} This work was funded by the Swedish foundation for strategic research SSF, VR, the strategic research area ELLIIT, and the E.U. Seventh Framework Programme (FP7/2007-2013) under grant agreement n 619086 (MAMMOET). We also thank the Comm. Systems group in Bristol University, for letting us replicate several of our results in their testbed. \section*{Appendix A: Equivalent Channel Matrices} \label{Appendix:A} Here we show the structure of the equivalent models. Define the column vector ${\bf\Psi}_{m} = \left[ \psi_{1,m} \dots \psi_{m-1,m} \; \psi_{m+1,m} \dots \psi_{M,m} \right]^T$. The equivalent channel matrix in (\ref{eq:EqModel10}) is written as \begin{equation} \label{eq:PsiEqStruct} {\bf\Psi_{\rm eq}({\bf \tilde{\Psi}})} = {\rm diag}\left\{ {\bf\Psi}_{1}, {\bf\Psi}_{2}, \hdots, {\bf\Psi}_{M} \right\}. \end{equation} Now define \begin{equation} \label{eq:smallC} {\bf \boldsymbol{\bar{c}}}_{n,m} = [ c_{n} \; c_{m} ]^T. \end{equation} Noting that $\psi_{m,n} = \psi_{n,m}$, the equivalent matrix and the parameter vector in (\ref{eq:EqModel11}) are written as \begin{equation} \label{eq:CeqStruct} {\bf C_{\rm eq}({\bf c })} = {\rm diag}\left\{ {\bf \boldsymbol{\bar{c}}}_{1,2},\cdots, {\bf \boldsymbol{\bar{c}}}_{1,M} , {\bf \boldsymbol{\bar{c}}}_{2,3}, \cdots , {\bf \boldsymbol{\bar{c}}}_{2,M} , \cdots \right\}, \end{equation} and \begin{equation} {\bf \tilde{\Psi}} = \begin{bmatrix} \psi_{2,1} \dots \psi_{M ,1} \; \psi_{3,2} \dots \psi_{M ,2} \dots \psi_{M ,M-1} \end{bmatrix}^T. \end{equation} \section*{Appendix B: The Cram\'{e}r-Rao Lower Bound} Here we compute the CRLB for the calibration coefficients $\left\{c_m\right\}\setminus c_\textit{ref}$. The exclusion of $ c_\textit{ref}$ is justified in the end of the calculations. This is achieved by assuming $t_{ ref}=r_\textit{ref}=1$, and treating $c_\textit{ref} = t_\textit{ref}/r_\textit{ref}$ as known for estimation purposes. Define the $(4M-4) \times 1$ vector \begin{align} \label{eq:ThetaDef} {\bf \boldsymbol{\theta}}\!=\!\left[ \operatorname{Re}\!\left\{ t_{1} \right\} \; \operatorname{Im}\!\left\{ t_{1} \right\} \; \operatorname{Re}\!\left\{ r_{1} \right\} \;\operatorname{Im}\!\left\{ r_{1} \right\} \; \operatorname{Re}\!\left\{ t_{2} \right\} \dots \operatorname{Im}\!\left\{ r_{M} \right\} \right]^T, \end{align} where $t_\textit{ref}$ and $r_\textit{ref}$ do not enter. The CRLB for $\left\{c_m\right\}\setminus c_\textit{ref}$ is given by the diagonal entries of the transformed inverse Fisher information matrix \cite{Kay} \begin{equation} \label{eq:CLRB} \text{var} ( \hat{c}_m ) \geq \left[ \frac{ q( \boldsymbol{\theta}) }{\partial \boldsymbol{\theta}} \textbf{I}^{-1}( \boldsymbol{\theta} ) \frac{ q( \boldsymbol{\theta} )}{\partial \boldsymbol{\theta}}^{\rm H} \right]_{m,m}, \; m\neq \textit{ref}, \end{equation} where $\textbf{I}( \boldsymbol{\theta} )$ is the Fisher information matrix of $\boldsymbol{\theta}$. The transformation of $\boldsymbol{\theta}$ into the calibration coefficients is given by $$ q(\boldsymbol{\theta}) = \left[ \frac{ \operatorname{Re}\!\left\{ t_{1} \right\} + j\operatorname{Im}\!\left\{ t_{1} \right\} }{ \operatorname{Re}\!\left\{ r_{1} \right\} + j \operatorname{Im}\!\left\{ r_{1} \right\} } \dots \frac{ \operatorname{Re}\!\left\{ t_{M} \right\} + j \operatorname{Im}\!\left\{ t_{M} \right\} }{ \operatorname{Re}\!\left\{ r_{M} \right\} + j \operatorname{Im}\!\left\{ r_{M} \right\} } \right]^T.$$ We now compute $\textbf{I}( \boldsymbol{\theta} )$. Assuming that $\bar{h}_{m,n}$, $\sigma^2$ and $N_0$ are at hand,\footnote{These assumptions are only used for the CRLB calculations, and were not used to derive any of the estimators. A possible implication is that the CRLB can be underestimated, but we will see that this is not the case from the simulations' results.} the mean $\boldsymbol{\mu}_{n,m}$ and the covariance matrix $\boldsymbol{\Sigma}_{n,m}$ of ${\bf y}_{n,m} = [y_{n,m} \; y_{m,n}]^T$ are given by \begin{equation} \label{eq:subMean} \boldsymbol{\mu}_{n,m} = \mathrm{E}\left\{ {\bf \boldsymbol{y}}_{n,m} \right\} = \bar{h}_{n,m} \left[ r_nt_m \; r_mt_n \right]^T, \end{equation} \begin{align} \label{eq:subCov} \boldsymbol{\Sigma}_{n,m} & = \mathrm{E}\left\{ ({\bf\boldsymbol{y}}_{n,m} - \boldsymbol{\mu}_{n,m}) ({\bf\boldsymbol{y}}_{n,m}-\boldsymbol{\mu}_{n,m})^H \right\} \nonumber \\ & = \begin{bmatrix} |r_n|^2 |t_m|^2 \sigma^2 + N_0 & r_n t_m r_m^* t_n^* \sigma^2 \\ r_m t_n r_n^* t_m^* \sigma^2 & |r_m|^2 |t_n|^2 \sigma^2 + N_0 \\ \end{bmatrix}. \end{align} We can observe that the PDF of ${\bf Y}''$, where $$ {\bf Y}'' = \left[ {\bf\boldsymbol{y}}^T_{1,2} \dots {\bf\boldsymbol{y}}^T_{1,M} \; {\bf\boldsymbol{y}}^T_{2,3} \dots {\bf\boldsymbol{y}}^T_{2,M} \dots {\bf\boldsymbol{y}}^T_{M-1,M} \right]^T, $$ conditioned on $\bf \boldsymbol{\theta}$, follows a multivariate Gaussian distribution, i.e., $p({\bf Y''} \vert \boldsymbol{\theta}) \sim \mathcal{CN}(\boldsymbol{\mu},\boldsymbol{\Sigma})$, with mean $\boldsymbol{\mu} = \left[ \boldsymbol{\mu}^T_{1,2} \dots \boldsymbol{\mu}^T_{1,M} \boldsymbol{\mu}^T_{2,3} \dots \boldsymbol{\mu}^T_{2,M} \dots \boldsymbol{\mu}^T_{M-1,M} \right]^T$ and block diagonal covariance \begin{equation} \boldsymbol{\Sigma} = {\rm diag}\left\{ \boldsymbol{\Sigma}_{1,2}, \cdots , \boldsymbol{\Sigma}_{1,M} , \boldsymbol{\Sigma}_{2,3}, \cdots , \boldsymbol{\Sigma}_{2,M} , \cdots , \boldsymbol{\Sigma}_{M-1,M} \right\}. \end{equation} With that, we have \begin{equation} \label{eq:CRLBgen} \left[ \textbf{I}( \boldsymbol{\theta} ) \right]_{i,j} = \; \Tr \left\{ \boldsymbol{\Sigma}^{-1} \frac{ \partial \boldsymbol{\Sigma} }{ \partial \theta_i } \boldsymbol{\Sigma}^{-1} \frac{ \partial \boldsymbol{\Sigma} }{ \partial \theta_j } \right\} + 2 \operatorname{Re} \left\{ \frac{ \partial \boldsymbol{\mu}^H }{\partial \theta_i} \boldsymbol{\Sigma}^{-1} \frac{ \partial \boldsymbol{\mu} }{\partial \theta_j} \right\}, \end{equation} with $1 \leq i \leq (4M-4)$ and $1 \leq j \leq (4M-4)$. The remaining computations of $\left[ \textbf{I}( \boldsymbol{\theta} ) \right]_{i,j}$ are straightforward and thus omitted. We note that without the convention of $t_\textit{ref}=r_\textit{ref}=1$ - and thus $\boldsymbol{\theta}$ is a $4M \times 1$ vector instead - it can be shown that the map $\boldsymbol{\theta} \mapsto \boldsymbol{\mu}$ is not injective which renders $\textbf{I}( \boldsymbol{\theta} )$ not invertible. Thus, the convention of reference antenna is needed to be able to compute the CRLB. \section*{Appendix C - Closed-form Unpenalized ML estimator for Linear Arrays } Here we derive the closed-form unpenalized (i.e. $\epsilon=0$) ML estimator for the linear array setup described in Sec. \ref{sec:LinearArray}. By leaving out the terms that do not depend on $\bf c$, it follows that, after a few manipulations, the optimization problem of (\ref{eq:EqModel5}) can be written as \iftoggle{2Collumn}{% \begin{align} \label{eq:HardCostLinear} \left\{ \hat{c}_m \right\} = & \arg \max_{ {\bf c} } { {\bf Y'}^H \bf C_{\rm eq}({\bf c })} {\bf C}_{\rm eq}^{ \dagger}( {\bf c}){\bf Y'} \nonumber \\ = & \arg \max_{ \left\{ c_m \right\} } \sum_{\ell=1}^{M-1‎} f_{\rm L}(c_\ell,c_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell}), \end{align} with $$f_{\rm L}(c_\ell,c_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell}) = {\bf \boldsymbol{y}}_{\ell+1,\ell}^{ H} {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1} {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1}^H {\bf \boldsymbol{y}}_{\ell+1,\ell} / {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1}^H {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1}.$$ See (\ref{eq:smallC}) for structure of ${\boldsymbol{\bar{c}}}_{\ell,\ell+1}$, and (\ref{eq:subCov}) for structure of ${\bf \boldsymbol{y}}_{m,n}$. }{% \begin{equation} \label{eq:HardCostLinear} \left\{ \hat{c}_m \right\} = \arg \max_{ {\bf c} } { {\bf Y'}^H \bf C_{\rm eq}({\bf c })} {\bf C}_{\rm eq}^{ \dagger}( {\bf c}){\bf Y'} = \arg \max_{ \left\{ c_m \right\} } \sum_{\ell=1}^{M-1‎} f_{\rm L}(c_\ell,c_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell}), \end{equation} with $f_{\rm L}(c_\ell,c_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell}) = {\bf \boldsymbol{y}}_{\ell+1,\ell}^{ H} {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1} {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1}^H {\bf \boldsymbol{y}}_{\ell+1,\ell} / {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1}^H {\bf \boldsymbol{\bar{c}}}_{\ell,\ell+1}.$ See (\ref{eq:smallC}) for structure of ${\boldsymbol{\bar{c}}}_{\ell,\ell+1}$, and (\ref{eq:subMean}) for structure of ${\bf \boldsymbol{y}}_{m,n}$. } Our ability to solve (\ref{eq:HardCostLinear}) is due to the following property. \textit{Property 1:} For the function $f_{\rm L}(c_\ell,c_{\ell+1},{\bf\boldsymbol{y}}_{\ell+1,\ell})$, the maximum over $c_{\ell+1}$ equals $||{\bf\boldsymbol{y}}_{\ell+1,\ell}||^2$, and thus it does not depend on $c_\ell$ Hence, the ML estimate of $c_{\ell+1}$, i.e. $\hat{c}_{\ell+1}$, can be found for a given $c_{\ell}$. With that, the joint maximization problem (\ref{eq:HardCostLinear}) can be split into \begin{equation*} \label{eq:HardCostLinear3} \hat{c}_{\ell+1} = \arg \max_{ x } f_{\rm L}(\hat{c}_\ell,x,{\bf\boldsymbol{y}}_{\ell+1,\ell}). \end{equation*} This optimization is a particular case of the Rayleigh quotient problem, and the solution is given in (\ref{eq:closedFormML}) when the reference element (i.e., the starting point) is chosen to be $c_1$. We now provide a short proof for Corollary 1. For the case of linear arrays with coupling solely between adjacent antennas, the optimization problem in (\ref{eq:GMMeCost}) can be written - ignoring any constraint for now - as \begin{equation} \label{eq:HardCostLineard} \hat{\boldsymbol{c}}_{\rm GMM}= \arg \min_{ \substack{\boldsymbol{c} }} \sum_{\ell=1}^{M-1‎} f_{\rm G}(c_\ell,c_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell}) \end{equation} where $ f_{\rm G}(c_\ell,c_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell})=|y_{\ell+1,\ell} c_{\ell+1} -y_{\ell,\ell+1} c_{\ell}|^2$. We solve (\ref{eq:HardCostLineard}) using the following property. \textit{Property 2:} Letting $\hat{c}_{\ell}$ be the ML estimator from (\ref{eq:closedFormML}), it follows that \begin{equation} \label{eq:HardCostLineardd} f_{\rm G}(\hat{c}_{\ell} ,\hat{c}_{\ell+1},{\bf \boldsymbol{y}}_{\ell+1,\ell} )=0, \; \forall \ell. \end{equation} Thus, the GMM solution (under any of the $2$ constraints) coincides with that of the ML up to a common complex scalar. Uniqueness follows since the GMM cost function is quadratic. \input{CalBib.bbl} \end{document}
{'timestamp': '2017-02-22T02:07:49', 'yymm': '1606', 'arxiv_id': '1606.05156', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05156'}
arxiv
\section{Introduction} \label{sec:intro} Smart devices connected to the Internet, including mobile phones, wearables, home appliances, sensors and vehicles, have become a part of everyday life in many parts of the world. The data collected by these devices could be an invaluable asset to hardware designers and application developers. For instance, a smartphone maker with its own customized UI such as Samsung TouchWiz could learn about the usage patterns of the various UI features such as Multi Window and One-Handed Mode, and focus on improving the popular ones. However, privacy concerns remain a major hurdle in collecting users' data. For example, the user may not want others to know her web browsing history, apps installed and locations visited. Even if the user (reluctantly) allows trusted organizations to collect her data, the possession of large amounts of sensitive personal data poses a major security risk. Accidental leakage of such personal data, which happened to AOL\footnote{\small \url{https://en.wikipedia.org/wiki/AOL_search_data_leak}}, Netflix\footnote{\small \url{http://www.wired.com/2009/12/netflix-privacy-lawsuit/}} and Ashley Madison\footnote{\small \url{http://edition.cnn.com/2015/08/27/opinions/yang-ashley-madison-hack/}}, led to serious consequences and substantial damage. So, organizations with a large user base commonly face a dilemma: either they collect users' personal data and become exposed to the risk of privacy breaches, or they do not collect such data and lose the opportunity of mining them. Local differential privacy (LDP), which has been used in Google's Chrome browser \cite{RAPPOR2014}, addresses the above dilemma. The idea is to compute aggregates of users' data without collecting individuals precise personal information. Unlike other models of differential privacy \cite{DworkLaplace, dwork2004privacy}, which publish randomized aggregates but still collect the exact sensitive data, LDP avoids collecting exact personal information in the first place, thus providing a stronger assurance to the users and to the aggregator. Meanwhile, LDP satisfies the strong and rigorous privacy guarantees of differential privacy, i.e., the adversary cannot infer sensitive information of an individual with high confidence, regardless of the adversary's background knowledge. Google's LDP solution in its Chrome browser, namely Rappor \cite{RAPPOR2014}, has rather limited functionalities. The core of Rappor is a randomized response mechanism \cite{Warner65} for a user to answer a yes/no question to the aggregator. A classic example is to collect statistics about a sensitive group (e.g., communists in the US), in which the aggregator asks each individual: ``Are you a communist?'' To answer this question, each individual tosses a coin, gives the true answer if it is a head, and a random yes/or answer otherwise. Clearly, this randomized approach provides plausible deniability to the individuals. Meanwhile, it is shown to satisfy $\epsilon$-differential privacy, and the strength of privacy protection (i.e., $\epsilon$) can be controlled by using an unfair coin \cite{RAPPOR2014}. Based on the collected randomized answers, the aggregator estimates the percentage of users whose true answer is ``yes'' (resp. ``no''). Besides simple counting, a follow-up paper \cite{FantiPE15} shows that Rappor can also compute other types of statistics such as joint-distribution estimation and association testing. However, three major limitations remain: first, Rappor cannot compute aggregates on numeric attributes, e.g., the average running time of an app. Second, the accuracy of Rappor deteriorates quickly with increasing number of attributes; as we show later in Section \ref{sec:basic-categorical}, to compute aggregates on $d$ independent attributes, the error of Rappor grows linearly with $d$, which is sub-optimal \cite{duchi2013local, DuchiJW14}. Third, it is unclear whether/how Rappor can handle complex and yet commonly used machine learning tasks, such as logistic regression and SVM classification. LDP has also drawn considerable interest from the theory community. However, as we review in Section~\ref{sec:related}, their focus lies mostly in analyzing the asymptotical performance of basic building blocks of LDP, rather than practical systems and performance. In other words, the problem they study is ``what is the best that LDP can do'', rather than ``how to design a practical LDP solution''. Perhaps due to this reason, as we show in Section \ref{sec:basic-numeric}, the state-of-the-art solution (to our knowledge) for estimating mean values of multiple attributes under LDP is buggy and requires a fix. Meanwhile, we are not aware of any systematic approach that can perform common machine learning tasks under LDP on a large data domain containing both numeric and categorical attributes. Motivated by this, we have been building Harmony, an advanced data analytics tool that conforms to LDP requirements. Harmony supports a multitude of common data analysis tasks over an arbitrary number of numerical or categorical attributes. Further, Harmony achieves both non-trivial asymptotical error bounds and improved accuracy in practice, compared to the current state of the art. As a case study, we show how Harmony can improve diagnostic information reporting in Samsung smartphones with strong privacy guarantees, as follows. \subsection{Potential Use Case} \label{sec:usecase} Samsung currently collects mobile phone usage information from users through a diagnostic tool bundled with the Samsung Android OS\footnote{The tool is available in the system under ``Settings > About device > Report diagnostic info''.}. The information collected include the mobile phone's settings (e.g., display settings, whether or not the location functionality is turned on), memory and battery usage, as well as other log data. The tool transmits the data in an unperturbed format to Samsung, and the transmission explicitly requires users' consent. However, as the collected information could potentially reveal sensitive information, it is beneficial to enhance the tool with privacy protection mechanisms, so as to provide rigorous privacy assurance to users. Towards this end, local differential privacy is an attractive approach due to its strong privacy guarantee, and its practicability that has been demonstrated in Rappor \cite{RAPPOR2014}. However, Rappor's LDP mechanism focuses on collecting a single categorical attribute, whereas the data collected by the Samsung diagnostic tool include both numeric ones (e.g., battery usage) and categorical ones (e.g., display settings). Furthermore, Rappor does not support complex learning tasks (e.g., regressions, SVM), whereas such tasks are important for Samsung to build analytical models from the data, e.g., building an early symptom model to predict system errors based on other measurements such as battery usage, memory usage, active applications, etc. This necessitates the development of new data collection technique based on local differential privacy. In the following, Section \ref{sec:prelim} provides the necessary background on LDP. Sections \ref{sec:basic} presents the fundamental LDP mechanisms in Harmony. Section \ref{sec:riskmini} applies Harmony to common data analytics tasks based on empirical risk minimization, including linear regression, logistic regression and SVM classification. Section \ref{sec:exp} contains an extensive set of experiments. Section \ref{sec:related} reviews related work. Finally, Section \ref{sec:conclusion} concludes with directions for future work. \section{Preliminaries} \label{sec:prelim} \begin{table}[t] \caption{Notations} \centering \label{tbl:notations} \begin{tabular}{|l|l|} \hline $pdf(x)$ & Probability density at $x$ \\ \hline $\langle a, b \rangle$ & A tuple of $a$ and $b$ \\ \hline $a || b$ & A concatenation of $a$ and $b$ \\ \hline $\operatorname{Bern}(p)$ & A Bernoulli distribution with parameter $p$ \\ \hline $\log(x)$ & Natural logarithm of $x$ \\ \hline $\operatorname{Dom}(f)$ & Domain of function $f$ \\ \hline $[d]$ & Set of natural numbers $\{1, 2, \ldots, d\}$ \\ \hline \end{tabular} \end{table} In our setting, an \emph{aggregator} (e.g., Samsung) collects data from a set of \emph{users} (e.g., smart device owners), and computes statistical models of the collected data. The goal is to maximize the accuracy of these statistical models, while preserving the privacy of the users. Following the local differential privacy model \cite{RAPPOR2014, BS15, DuchiJW14}, we assume that the aggregator already knows the identities (e.g., IP addresses) of the users, but not their private data. Formally, let $n$ be the total number of users, and $u_i$ ($1 \leq i \leq n$) denote the $i$-th user. Each user $u_i$'s private data is represented by a tuple $t_i$, which contains $d$ attributes $A_1, A_2, \ldots, A_d$. These attributes can be either numerical or categorical. Without loss of generality, we assume that each numeric attribute has a domain $[-1, 1]$, and each categorical attribute with $k$ distinct values has a discrete domain $\{1, 2, \ldots, k\}$. To protect privacy, each user $u_i$ first perturbs her tuple $t_i$ using a randomized \emph{perturbation function} $f$. Then, she sends the perturbed data $f(t_i)$ to the aggregator instead of her true data record $t_i$. The perturbation function determines the privacy / utility tradeoff. As an extreme case, if $f(t_i) = t_i$ (i.e., no perturbation), the aggregator obtains perfect utility since it computes the statistical models based on the exact data; however, the privacy of the users is completely lost as the aggregator receives their sensitive data. The other extreme is that $f$ simply outputs a random tuple regardless of $t_i$, which leads to the highest level of privacy and zero utility, i.e., the aggregator learns nothing about the users' data. Given a privacy parameter $\epsilon > 0$ that controls the privacy-utility tradeoff, we require that $f$ satisfies $\epsilon$-\emph{local differential privacy} ($\epsilon$-LDP) \cite{RAPPOR2014}, defined as follows: \begin{definition}[$\epsilon$-local differential privacy]\label{def:ldp} A randomized function $f$ satisfies $\epsilon$-local differential privacy if and only if for any two input tuples $t, t^\prime \in \text{Dom(f)}$ and for any possible output $t^*$ of $f$, we have: \begin{displaymath} \Pr[f(t) = t^*] \leq e^\epsilon \times \Pr[f(t^\prime) = t^*]. \end{displaymath} \end{definition} Basically, local differential privacy is a special case of differential privacy \cite{dwork2004privacy} where the random perturbation is performed by the users, not by the aggregator. In other words, the aggregator never possesses the exact private data of any user. According to the above definition, the aggregator, who receives the perturbed tuple $t^*$, cannot distinguish whether the true tuple is $t$ or another tuple $t'$ with high confidence (controlled by parameter $\epsilon$), regardless of the background information of the aggregator. This provides plausible deniability to the user. Note that in $\epsilon$-LDP, since random perturbation is done at each user, it is possible to achieve \emph{personalized privacy protection} by using different values of the privacy parameter $\epsilon$ at different users, depending on their respective privacy requirements. In this paper, we assume a universal $\epsilon$ for the ease of presentation and analysis. We aim to support the following types of analytics tasks under $\epsilon$-LDP: \begin{enumerate}[topsep = 6pt, parsep = 6pt, itemsep = 0pt, leftmargin=22pt] \item {Mean value and frequency estimation.} These are two basic types of statistics. For each numeric attribute $A_j$, we aim to estimate the mean value of $A_j$ over all $n$ users, $\frac{1}{n} \sum_{i=1}^n {t_i[A_j]}$. For each categorical attribute $A_j'$, we aim to estimate the frequency of each possible value of $A_j'$, i.e., a histogram. Note that it is also possible to build such a histogram for a numeric attribute with a finite number of possible values. \item {Empirical Risk Minimization.} These are advanced statistics commonly used in machine learning. Examples include linear regression, logistic regression, and support vector machines (SVM) \cite{CortesV95}. \end{enumerate} Unless otherwise specified, all expectations in this paper are taken over the random choices made by the algorithms considered. \vspace{2.5mm} \noindent {\bf Remark.} In practice, the tuple $t_i$ of a user may change overtime (e.g., the phone usage information of a user would change day by day); accordingly, the aggregator may want to re-collect information from users after a certain time period (e.g., one week). In that case, we aim to ensure that the collection of each individual snapshot of $t_i$ satisfies $\epsilon$-differential privacy. One may argue that it is more desirable to ensure that all collected snapshots jointly achieve $\epsilon$-differential privacy, but to our knowledge, this is an open problem when the number of snapshots to be collected can be arbitrarily large. \section{Estimating Means and Frequencies} \label{sec:basic} This section investigates the design of the perturbation function $f$ to support accurate estimation of mean values (resp.\ frequencies) of numeric (resp.\ categorical) attributes. For ease of exposition, Section~\ref{sec:basic-numeric} considers the case when all attributes $A_1, A_2, \ldots, A_d$ in the users' data have a numeric domain $[-1, 1]$; after that, Section~\ref{sec:basic-categorical} extends our discussions to the case when both numeric and categorical attributes are present. \subsection{Estimating Mean Values for Numeric Attributes} \label{sec:basic-numeric} Given a tuple $t_i$ containing $d$ numeric attributes, a naive design of the perturbation function $f$ is to apply the \emph{Laplace Mechanism} \cite{DworkLaplace}. In particular, let $t^*_i = f(t_i)$ be the perturbed tuple of user $u_i$, we have: $$\forall j \in [d], t^*_i[A_j] = t_i[A_j] + \operatorname{Lap}\left(\frac{2d}{\epsilon}\right),$$ where $\operatorname{Lap}(\lambda)$ denotes a random variable that follows a Laplace distribution of scale $\lambda$, with the following probability density function: $$pdf(x) = \frac{1}{2\lambda} \exp\left(-\frac{|x|}{\lambda}\right).$$ Once the aggregator receives all perturbed tuples, it simply computes their average $\frac{1}{n} \sum_{i = 1}^n t^*_i[A_j]$ as an estimate of the mean of $A_j$. Clearly, this estimate is unbiased, since the injected Laplace noise $\operatorname{Lap}\left(\frac{2d}{\epsilon}\right)$ in each $t^*_i[A_j]$ has zero mean. Meanwhile, it is easy to calculate that the expected error incurred by this estimator is $O\left(\frac{d}{\epsilon \sqrt{n}}\right)$, which is linear to the number of attributes $d$ and, thus, could be excessively large when there are many attributes. Note that this is a fundamental problem that also exists in the traditional differential privacy setting, when publishing statistics for multiple independent attributes. Perhaps rather surprisingly, this problem has not received much attention in the differential privacy literature; the first and only solution we are aware of is proposed by Duchi \emph{et al.}~\cite{DuchiJW14,Duchi2013} under the local differential privacy setting, presented below. \vspace{2.5mm} \noindent {\bf Duchi \emph{et al.}'s method.} Algorithm~\ref{mech:pubduchi} shows the pseudo-code of Duchi \emph{et al.}'s method. The authors claim that this method satisfies $\epsilon$-local differential privacy, yields unbiased estimates for the mean value of each attribute, and incurs $O\big(\sqrt{d \log d} / (\epsilon \sqrt{n})\big)$ expected error for each attribute, which is proven to be asymptotically optimal. As we explain later, all three claims are incorrect, i.e., their method can violate differential privacy, lead to a biased estimate and incur a much higher amount of error. It takes as input the exact tuple $t_i \in [-1, 1]^d$ of user $u_i$ and a privacy parameter $\epsilon$, and outputs a perturbed vector $t^*_i \in \{-B, B\}^d$, where $B$ is a constant decided by $d$ and $\epsilon$. Note that the output is binary for each attribute, i.e., it is either $B$ or $-B$. Therefore, it suffices for each user to transmit only one bit for each attribute to the aggregator. Upon receiving the perturbed tuples, the aggregator simply computes the average value for each attribute over all users, and outputs these averages as the estimates of the mean values for their corresponding attributes. Next we focus on the calculation of $B$, which is rather complicated. Essentially, $B$ is a scaling factor to ensure that the expected value of a perturbed attribute is the same as that of the exact attribute value. First, we calculate: \begin{equation} \label{eqn:basic-Cd} C_d = \begin{cases} 2^{d-1}, &\text{if $d$ is odd}\\ 2^{d-1} - \frac{1}{2} \binom{d}{d/2}, &\text{otherwise} \end{cases} \end{equation} Then, $B$ is calculated by: \begin{equation} \label{eqn:basic-B} B = \begin{cases} \displaystyle \frac{2^d + C_d \cdot (e^\epsilon-1)}{ \binom{d-1} {(d-1)/2} \cdot (e^\epsilon - 1)}, &\text{if $d$ is odd} \vspace{3mm} \\ \displaystyle \frac{2^d + C_d \cdot (e^\epsilon-1)}{ \binom{d-1} {d/2} \cdot (e^\epsilon - 1)}, &\text{otherwise} \end{cases} \end{equation} Duchi \emph{et al.}~show that $\frac{1}{n} \sum_{i = 1}^n t^*_i[A_j]$ is an unbiased estimator of the mean of $A_j$, and \begin{equation} \label{eqn:basic-error} \mathbb{E}\left[\max_{j \in [d]} \left|\frac{1}{n} \sum_{i = 1}^n t^*_i[A_j] - \frac{1}{n} \sum_{i = 1}^n t_i[A_j]\right|\right] = O\left(\frac{\sqrt{d \log d}}{\epsilon \sqrt{n}}\right), \end{equation} which is asymptotically optimal \cite{DuchiJW14}. \begin{algorithm}[t] \begin{small} \caption{Duchi \emph{et al.}'s Method \cite{DuchiJW14,Duchi2013}}\label{mech:pubduchi} \SetKwInOut{Input}{input} \SetKwInOut{Output}{output} \Input{tuple $t_i \in [-1,1]^d$ and privacy parameter $\epsilon.$} \Output{tuple $t^*_i \in \{-B, B\}^d.$} Generate a random tuple $v \in \{-1, 1\}^d$ by sampling each $v[A_j]$ independently from the following distribution: \parbox{62mm}{\begin{equation*} \Pr[v[A_j] = x] = \begin{cases} \frac{1}{2} + \frac{1}{2} t_i[A_j], & \text{if $x = 1$} \vspace{2mm} \\ \frac{1}{2} - \frac{1}{2} t_i[A_j], & \text{if $x = -1$}\\ \end{cases} \end{equation*}}\; Let $T^+$ (resp.\ $T^-$) be the set of all tuples $t^* \in \{-B, B\}^d$ such that $t^* \cdot v > 0$ (resp.\ $t^* \cdot v \le 0$)\; Sample a Bernoulli variable $u$ that equals $1$ with ${e^\epsilon / (e^\epsilon + 1)}$ probability\; \If{$u = 1$} { \Return a tuple uniformly at random from $T^+$\; } \Else { \Return a tuple uniformly at random from $T^-$\; } \end{small} \end{algorithm} \vspace{2.5mm} \noindent {\bf Problems in Duchi \emph{et al.}'s method and a possible fix.} We implemented and evaluated Duchi \emph{et al.}'s method, but found that whenever the number $d$ of attribute is even, the method yields a biased estimation of the mean of each attribute and incurs significant error. Then, we also found that it violates differential privacy when $d$ is even. To illustrate, consider that $d=2$ and we have an input tuple $t_i = \langle 1, 1 \rangle$, i.e., $t_i[A_1] = t_i[A_2] = 1$. Then, Line 1 in Algorithm~\ref{mech:pubduchi} would generates a tuple $v = \langle 1, 1\rangle$. Let $B$ be as defined in Equation~\eqref{eqn:basic-B}, and $T^+$ and $T^-$ be as defined in Line 2 in Algorithm~\ref{mech:pubduchi}. It can be verified that $T^+$ and $T^-$ contain $1$ and $3$ tuples, respectively, with \begin{align*} T^+ &= \big\{\ \langle B, B \rangle \big\}, \textrm{ and} \\ T^- &= \big\{\ \langle -B, -B \rangle, \langle -B, B \rangle, \langle B, -B \rangle \big\}. \end{align*} Then, by Lines 3-8 in Algorithm~\ref{mech:pubduchi}, the method outputs $\langle B, B \rangle$ with $\frac{e^\epsilon}{e^\epsilon + 1}$ probability. In contrast, each tuple in $T^-$ has only $\frac{1}{3e^\epsilon + 3}$ probability to be output. Now consider another input tuple $t^\prime_i = \langle -1, -1 \rangle$. It follows that, for $t^\prime_i$, the algorithm outputs $\langle B, B \rangle$ with only $\frac{1}{3e^\epsilon + 3}$ probability. As a consequence, \begin{align*} \Pr[f(t_i) = \big\langle B, B \rangle \big] & = 3 e^\epsilon \cdot \Pr\big[f(t^\prime_i) = \langle B, B \rangle\big] \\ & > e^\epsilon \cdot \Pr\big[f(t^\prime_i) = \langle B, B \rangle\big], \end{align*} which indicates that the algorithm does not satisfy $\epsilon$-differential privacy. We find that the above problem is caused by Line 3 in Algorithm~\ref{mech:pubduchi}, in that the Bernoulli variable $u$ is incorrectly defined for the case for $d$ is even. To address the problem, one possible fix we found is to re-define $u$ as a Bernoulli variable such that \begin{equation*} \Pr[u = 1] = \frac{e^\epsilon \cdot C_d}{(e^\epsilon - 1)C_d + 2^d}. \end{equation*} It can be shown that, with this revised choice of $u$, Algorithm~\ref{mech:pubduchi} achieves $\epsilon$-differential privacy and ensures the error bound in Equation~\ref{eqn:basic-error}. We omit the proofs for brevity. \vspace{2.5mm} \noindent {\bf Proposed method.} In what follows, we present an algorithm used in Harmony for perturbing a tuple that is conceptually simpler than Duchi \emph{et al.}'s method, but achieves the same privacy assurance and asymptotic error bound. Furthermore, our experiments (in Section~\ref{sec:exp}) show that the algorithm slightly outperforms Duchi \emph{et al.}'s method in terms of the empirical accuracy of the estimated means of numeric attributes. Additionally, our method is more efficient: in particular, each user only needs to transmit one bit to the aggregator, which is clearly optimal. Our algorithm is inspired by an existing approach \cite{BS15} for publishing categorical data, which we will discuss in Section~\ref{sec:basic-categorical}. \begin{algorithm}[t] \begin{small} \caption{Proposed Method for Handling Numeric Attributes}\label{mech:pubreal} \SetKwInOut{Input}{input} \SetKwInOut{Output}{output} \Input{tuple $t_i \in [-1,1]^d$ and privacy parameter $\epsilon.$} \Output{tuple $t^*_i \in \left\{-\frac{e^\epsilon+1}{e^\epsilon-1}d, \:\: 0, \:\: \frac{e^\epsilon+1}{e^\epsilon-1} d\right\}^d.$} Let $t^*_i = \langle 0, 0, \ldots, 0\rangle$\; Sample $j$ uniformly at random from $[d]$\; Sample a Bernoulli variable $u$ such that \parbox{55mm}{$$\Pr[u = 1] = \frac{t_i[A_j]\cdot (e^\epsilon-1) + e^\epsilon + 1}{2e^\epsilon + 2}$$}\; \If{$u = 1$} { $t^*[A_j] = \frac{e^\epsilon+1}{e^\epsilon-1} \cdot d$\; } \Else { $t^*[A_j] = -\frac{e^\epsilon+1}{e^\epsilon-1} \cdot d$\; } \Return $t^*_i$ \end{small} \end{algorithm} Algorithm~\ref{mech:pubreal} shows the pseudo-code of our method. Given a tuple $t_i \in [-1, 1]^d$, the algorithm returns a perturbed tuple $t^*_i$ that has non-zero value on only one attribute $A_j$ ($j \in [d]$). Specifically, $A_j$ is selected uniformly at random from all $d$ attributes of $t_i$, and $t^*_i[A_j]$ is sampled from the following distribution: \begin{equation} \label{eqn:basic-improved} \Pr\big[t^*_i[A_j] = x\big] = \begin{cases} \frac{t_i[A_j]\cdot (e^\epsilon-1) + e^\epsilon + 1}{2e^\epsilon + 2}, & \textrm{if $x = \frac{e^\epsilon+1}{e^\epsilon-1} \cdot d$} \vspace{2mm} \\ \frac{-t_i[A_j]\cdot (e^\epsilon-1) + e^\epsilon + 1}{2e^\epsilon + 2}, & \textrm{if $x = -\frac{e^\epsilon+1}{e^\epsilon-1} \cdot d$} \end{cases} \end{equation} Observe that in the above method, the output $t^*_i$ contains only one non-zero value, for the randomly chosen attribute $A_j$. This value is binary; hence, the user $u_i$ only needs to transmit 1 bit to the aggregator indicating its sign, and the latter can re-scale it using parameters $\epsilon$ and $d$. Further, as we show below the correctness of this method does not depend on the choice of $A_j$ as long as it is chosen uniformly at random. Therefore, the value of $j$ can be obtained, e.g., using a public source of random numbers such as a hash value of the user's ID. Therefore, the communication overhead between each user and the aggregator is exactly 1 bit. The following lemmas establish the theoretical guarantees of Algorithm~\ref{mech:pubreal}. \begin{lemma} \label{lmm:basic-privacy} Algorithm~\ref{mech:pubreal} satisfies $\epsilon$-local differential privacy. \end{lemma} \begin{proof} Let $t^*$ be an output of Algorithm~\ref{mech:pubreal}, and $A_j$ be the only attribute such that $t^*[A_j] \ne 0$. Let $t$ and $t^\prime$ be any two tuples, and $u$ (resp.\ $u^\prime$) be the Bernoulli variable generated in Line 3 of Algorithm~\ref{mech:pubreal} given $t$ (resp.\ $t^\prime)$ as the input. In the following, we focus on the case when $t^*[A_j] = \frac{e^\epsilon + 1}{e^\epsilon - 1}d$; the case when $t^*[A_j] = -\frac{e^\epsilon + 1}{e^\epsilon - 1}d$ can be analyzed in a similar manner. By Algorithm~\ref{mech:pubreal}, we have \begin{align*} \frac{\Pr [t^* \mid t]}{\Pr[t^* \mid t^\prime]} & = \frac {1/d \cdot \Pr[u = 1 \mid t]}{1/d \cdot \Pr[u^\prime = 1 \mid t^\prime] } \; \leq \frac {\max_t \Pr[u = 1 \mid t]} {\min_{t^\prime} \Pr[u^\prime = 1 \mid t^\prime]}\\ & = \frac{\max_{t[A_j]\in [-1,1]} \left(t[A_j] \cdot (e^\epsilon-1) + e^\epsilon + 1\right)}{\min_{t^\prime[A_j]\in [-1,1]} \left(t^\prime[A_j]\cdot (e^\epsilon-1) + e^\epsilon + 1\right)} = e^\epsilon. \end{align*} This completes the proof. \end{proof} \begin{lemma} \label{lmm:basic-unbias} Let $t^*_i$ be the output of Algorithm~\ref{mech:pubreal} given an input tuple $t_i$. Then, for any $j \in [d]$, $\mathbb{E}[t^*[A_j]] = t[A_j]$. \end{lemma} \begin{proof} By Equation~\eqref{eqn:basic-improved}, \begin{align*} \mathbb{E}[t^*[A_j]] = & \textstyle \Pr\left[t^*[A_j] = \frac{e^\epsilon+1}{e^\epsilon-1}\cdot d\right] \cdot \frac{e^\epsilon+1}{e^\epsilon-1} \cdot d\\ & {} \textstyle + \Pr\left[t^*[A_j] = -\frac{e^\epsilon+1}{e^\epsilon-1} \cdot d\right] \cdot \left(- \frac{e^\epsilon+1}{e^\epsilon-1} \cdot d \right) \\ & {} \textstyle + \Pr\left[t^*[A_j] = 0\right] \cdot 0 \\ = & \frac{2 t[A_j] \cdot (e^\epsilon - 1)}{2e^\epsilon - 2} \; = t[A_j]. \end{align*} \end{proof} By Lemma~\ref{lmm:basic-unbias}, the server can use $\frac{1}{n} \sum_{i = 1}^n t^*[A_j]$ as an unbiased estimator of the mean of $A_j$. The following lemma shows the accuracy guarantee of this estimator. \begin{lemma} \label{lmm:basic-accuracy} For any $j \in [d]$, let $Z[A_j] = \frac{1}{n} \sum_{i=1}^n t^*_i[A_j]$ and $X[A_j] = \frac{1}{n} \sum_{i=1}^n t_i[A_j]$. With at least $1 - \beta$ probability, $$\max_{j \in [d]} \big|Z[A_j] - X[A_j]\big| = O\left(\frac{\sqrt{d \log(d/\beta)}}{\epsilon \sqrt{n}}\right).$$ \end{lemma} \begin{proof} First, observe that for any $i \in [d]$ and any $j \in [d]$, the variance of $t^*_i[a_j] - t_i[a_j]$ equals: \begin{align*} \operatorname{Var}[t^*_i[a_j] - t_i[a_j]] &= \operatorname{Var}[t^*_i[a_j]] \\ &= \mathbb{E}\left[(t^*_i[a_j])^2\right] - (\mathbb{E}[t^*_i[a_j])^2 \\ &= \textstyle \frac{1}{d} \left(\frac{e^\epsilon+1}{e^\epsilon-1} \cdot d\right)^2 - \left(t_i[a_j]\right)^2 \; \le \textstyle \left(\frac{e^\epsilon+1}{e^\epsilon-1}\right)^2 \! \cdot d. \end{align*} By Bernstein's inequality, \begin{align*} & \Pr\big[|Z[a_j] - X[a_j]| \ge \lambda\big] \\ & {} \le 2 \cdot \exp\left(-\frac{n\lambda^2}{\frac 2 n \sum_{i=1}^n \operatorname{Var}[t^*_i[a_j] - t_i[a_j]] + \frac{2}{3}\lambda \cdot \frac{e^\epsilon + 1}{e^\epsilon-1} \cdot 2d}\right) \\ & {} = 2\cdot \exp \left(-\frac {n \lambda^2}{2d \cdot \left(O(1/\epsilon^2) + \lambda \cdot O(1/\epsilon) \right)} \right). \end{align*} By the union bound, there exists $\lambda = O\left(\frac{\sqrt{d \log (d/\beta)}}{\epsilon \sqrt{n}}\right)$ such that $\max_{j \in [d]} |Z[a_j] - X[a_j]| < \lambda$ holds with at least $1-\beta$ probability. \end{proof} \subsection{Estimating Frequencies for Categorical Attributes} \label{sec:basic-categorical} We now focus on the case where each user's data record contains not only numeric attributes but also categorical ones. For each categorical attribute, the aggregator aims to build an accurate histogram containing the frequency estimate for each possible value in the attribute's domain. For example, Samsung may want to know the percentage of users who enable a specific setting, through the diagnostic information report app described in Section \ref{sec:usecase}. Note that we can convert a numeric attribute a categorical one (e.g., display brightness can be discretized to three levels: low, medium and high) and build a histogram accordingly. \vspace{2.5mm} \noindent \textbf{Randomized response for binary attributes.} For a single binary attribute (e.g., WiFi on/off), it suffices to use the classic randomized response method \cite{Warner65} (also used in Rappor \cite{RAPPOR2014}) to estimate the distribution of users. Specifically, suppose that the domain of the binary attribute (let $A_j$) contains two possible values, $-1$ and $+1$. Each user $u_i$ reports her true answer $t_i[A_j]$ with probability $p$, and a random answer with probability $1-p$. The latter has the same probability to be $-1$ and $+1$; hence, its expected value is zero. Therefore, the expected value for $u_i$'s reported value is $p \cdot t_i[A_j]$; thus, we can obtain an unbiased estimate by multiplying the reported value by a scaling factor $c_\epsilon = 1/p$. Meanwhile, comparing $u_i$'s true attribute value and her reported one, the two are the same with probability ${p+(1-p)/2}$, and they are different with probability $(1-p)/2$. According to Definition \ref{def:ldp}, $\epsilon$-local differential privacy requires that $\frac{p+(1-p)/2}{(1-p)/2} \leq e^{\epsilon}$. The equality holds when $p = \frac{e^\epsilon - 1}{e^\epsilon + 1}$. We thus arrive at the following unbiased mechanism that satisfies $\epsilon$-LDP: each user $u_i$ reports $c_\epsilon \cdot t_i[A_j] = \frac{e^\epsilon + 1}{e^\epsilon - 1}\cdot t_i[A_j]$ with probability $p+(1-p)/2 = \frac{e^\epsilon}{e^\epsilon + 1}$, and $-c_\epsilon \cdot t_i[A_j]$ otherwise (i.e., with probability $\frac{1}{e^\epsilon + 1}$). Once the aggregator receives all reported values for attribute $A_j$, it computes the average over all users, which is an estimate of the mean value $\mathbb{E}[A_j]$ for $A_j$. Since $A_j$ can be either $+1$ or $-1$, the percentage of users with $+1$ (resp. $-1$) is $\frac{1+\mathbb{E}[A_j]}{2}$ (resp. $\frac{1-\mathbb{E}[A_j]}{2}$). \begin{algorithm}[t] \begin{small} \caption{Bassily and Smith's method \cite{BS15}}\label{mech:pubbinvec} \SetKwInOut{Input}{input} \SetKwInOut{Output}{output} \Input{$t_i[A_j] \in [k]$ for each user $u_i$, privacy budget $\epsilon$, confidence of the error bound $\beta$} \Output{Frequency estimate for each of the $k$ values in attribute $A_j$} Compute $\gamma = \sqrt{\frac{\log(2k/\beta)}{\epsilon^2 n}}$\, and $m = \frac{\log(k+1) \log(2/\beta)}{\gamma^2}$\; Generate random matrix $\Phi \in \{\pm \frac 1 {\sqrt m}\}^{m \times k}$\; \For{$i$ = $1$ to $n$} { User $u_i$: draw $s ~\sim \text{Uniform}(\{1,2\dots, m\})$\; User $u_i$: draw $t \sim \text{Bern}(\frac{e^\epsilon}{e^\epsilon + 1})$\; User $u_i$: \textbf{if} $t=1$ \textbf{then} $\alpha = c_\epsilon m \Phi[s, t_i[A_j]]$ \textbf{else} $\alpha = -c_\epsilon m \Phi[s, t_i[A_j]]$, where $c_\epsilon = \frac{e^\epsilon+1}{e^\epsilon - 1}$\; User $u_i$: submit $\langle s, \alpha\rangle$, which represents a $k$-dimensional vector $z_i$ where the $s$-th entry is $\alpha$ and the other entries are $0$\; } Compute $\bar z = \frac 1 n \sum_{i=1}^n z_i$\; \For{$l$ = $1$ to $k$} { Estimate the frequency of the $l$-th value by the inner product of the $l$-th column of $\Phi$ and $\bar z$; } \Return $k$ frequency estimates obtained above; \end{small} \end{algorithm} \vspace{2.5mm} \noindent \textbf{Bassily and Smith's method.} The problem is more complicated when the categorical attribute $A_j$ contains $k>2$ possible values. In this situation, the aggregator aims to build a histogram that contains the estimated frequency for each of the $k$ possible values. The current state-of-the-art to our knowledge is by Bassily and Smith \cite{BS15}, shown in Algorithm \ref{mech:pubbinvec}, which is proven to satisfy $\epsilon$-LDP and achieve an optimal asymptotical error bound. There are two main ideas in this method. First, the authors assume that the number of possible values $k$ in the categorical attribute is far larger than the number of users $n$; hence, the method applies random projection to reduce the dimensionality from $k$ to $m$. The value of $m$ is chosen carefully so as to obtain the asymptotically optimal error bound. This step essentially transforms the categorical attribute into $m$ binary ones. Specifically, the random projection is done with a $m \times k$ matrix $\Phi$ in which each element is randomly set to either $+\frac{1}{\sqrt m}$ or $-\frac{1}{\sqrt m}$ with equal probability. This ensures that (i) the inner product of any column in $\Phi$ with itself is $1$ (which is where the absolute value of each element $\frac{1}{\sqrt m}$ comes from) and (ii) the inner product of two different columns in $\Phi$ has zero expected value, since the signs are randomly generated. Each user $u_i$'s attribute value $t_i[A_j]$ is then transformed to $m$ binary values by taking the $t_i[A_j]$-th column in $\Phi$. The second idea is for each user to randomly pick one of the converted $m$ binary attributes, and report a randomized response using the method described earlier. Note that the randomized response needs to be scaled by a factor of $m$, since each of the $m$ binary attributes has probability $1/m$ to be chosen. The aggregator collects the average for each of the $m$ binary attributes, which is stored as a vector $\bar z$. To obtain the frequency estimate of a particular attribute value $l$, the method takes the inner product of $\bar z$ and the $l$-th column of $\Phi$, which can be proven to yield an unbiased frequency estimate for the $l$-th value in $A_j$. Meanwhile, the frequency estimate is proven to be within $O\left(\frac{\sqrt{\log(k/\beta)}}{\epsilon \sqrt{n}}\right)$ error with probability $1-\beta$ \cite{BS15}, where $\beta$ is an input to the algorithm. \vspace{2.5mm} \noindent \textbf{Proposed method for a single categorical attribute.} Harmony generally follows Bassily and Smith's method to estimate value frequencies for a categorical attribute. However, we found that although Bassily and Smith's method achieves optimal asymptotic accuracy, in practice its accuracy tends to be unstable, especially for relatively small categorical domains. The reason is that the random projection matrix $\Phi$ introduces considerable noise; in particular, the inner product of two different columns is often non-zero unless $k$ is very large, which is magnified by a large number of users $n$. Hence, we propose an alternative solution that obtains higher accuracy when $k = o(n)$. In particular, instead of generating random matrix $\Phi$ (size $m \times k$ where $m = O(n)$), we construct a binary matrix of size $k \times k$ satisfying that any two column vectors are always orthogonal. The construction algorithm of this matrix can be found in the appendix. \vspace{2.5mm} \noindent \textbf{Proposed method for multiple numeric and categorical attributes.} Bassily and Smith's method is limited to a single categorical attribute. To extend it to multiple categorical attributes, a straightforward approach is to apply the method once for each attribute separately. In that case, however, the privacy budget $\epsilon$ needs to be divided among all attributes, so as to ensure $\epsilon$-LDP as a whole. Without loss of generality, assume that we have $d$ categorical attributes, and we assign $\epsilon/d$ budget to each of them. Then, the amount of noise incurred by Bassily and Smith's method on each attribute is increased $d$ times to $O\left(\frac{d\sqrt{\log(d/\beta)}}{\epsilon \sqrt{n}}\right)$, which is unsatisfactory when $d$ is large. Another approach for extension is to (i) convert the $d$ categorical attributes into a ``composite'' attribute whose domain equals the Cartesian product of the individual attribute domains, and then (ii) apply Bassily and Smith's method on the composite attribute. This, however, only allows us to (accurately) derive the frequency each composite value (i.e., combination of values from all $d$ individual attributes), but does not provide quality estimation of the frequency of each individual value. Note that these limitations are not specific to Bassily and Smith's method; to our knowledge, there is no existing work (including Rappor) that are designed to handle multiple categorical attributes, let alone a mixture of numeric and categorical ones. In Harmony, we use a simple and elegant solution to handle multiple attributes: for each numerical attribute, the aggregator estimates its mean value; for each categorical attribute, the aggregator estimates its value frequencies. In particular, given $d$ attributes $A_1, A_2, \ldots, A_d$, the solution asks each user to perform the following: \begin{enumerate}[topsep = 6pt, parsep = 6pt, itemsep = 0pt, leftmargin=22pt] \item Draw $j$ uniformly at random from set $\{1, 2, \ldots, d\}$; \item If $A_j$ is a numeric attribute, then submit a noisy version of $t[A_j]$ computed as in Lines $3$-$7$ of Algorithm~\ref{mech:pubreal}; \item Otherwise (i.e., $A_j$ is a categorical attribute), compute ${\langle s, \alpha\rangle}$ as in Lines $4$-$8$ of Algorithm~\ref{mech:pubbinvec}, then submits ${\langle s, d \cdot \alpha\rangle}$ to represent a $d$-dimensional vector where the $s$-th entry is $d \cdot \alpha$ and all other entries are zero. \end{enumerate} The above solution satisfies $\epsilon$-LDP, which follows from the fact that (i) each user randomly selects one attribute to submit, and (ii) the algorithm used for submitting the selected attribute is $\epsilon$-differentially private. For each numeric attribute, it is easy to see that the solution provides the same accuracy guarantee as Algorithm~\ref{mech:pubreal}, since both methods handle numeric attributes in exactly the same way. The following lemma states the accuracy guarantee of our solution for categorical attributes. \begin{lemma} \label{lmm:basic-accuracy2} For each categorical attribute $A_j$ with a domain $\{1, 2, \ldots, k\}$, let $x_l$ be the frequency of the $l$-th value of $A_j$, and $y_l$ be the estimation of $x_l$ returned by our solution. With at least $1 - \beta$ probability, $$\max_{l \in [k]} \big|y_l - x_l\big| = O\left(\frac{\sqrt{d \log(k/\beta)}}{\epsilon \sqrt{n}}\right).$$ \end{lemma} \begin{proof}[(Sketch)] Consider any user with a tuple $t$. With respect to $A_j$, our solution can be regarded as a method that (i) outputs nothing with ${d-1}/d$ probability, and (ii) with the remaining $1/d$ probability, applies Bassily and Smith's algorithm on $A_j$ and scale its output up by $d$ times. It follows that the variance of each of our frequency estimators for $A_j$ is $d$ times that of Bassily and Smith's estimator. Based on the analysis in \cite{BS15}, it can be shown that the variance of Bassily and Smith's estimator is $O\left(\frac{1}{n \epsilon^2}\right)$. Therefore, the variance of each of our frequency estimators is $O\left(\frac{d}{n \epsilon^2}\right)$. Combining this with Bernstein's inequality and the union bound, it can be proven that with at least $1-\beta$ probability, the error in any $k$ of our estimators is $O\left(\frac{\sqrt{d \log(k/\beta)}}{\epsilon \sqrt{n}}\right).$ \end{proof} By Lemma~\ref{lmm:basic-accuracy2}, when there exist multiple categorical attributes, the error incurred by our approach is a factor of $O(\sqrt{d})$ smaller than that of a solution that repeatedly apply Bassily and Smith's method on each categorical attribute. \section{Building Machine Learning Models using Stochastic Gradient Descent} \label{sec:riskmini} This section investigates building a large class of machine learning models that can be expressed as empirical risk minimization under $\epsilon$-local differential privacy. In particular, we focus on three common types of learning tasks: linear regression, logistic regression, and SVM classification. Section~\ref{sec:riskmini-methods} introduces the basic approaches for building these models, while Section~\ref{sec:riskmini-improve} discusses optimizations that lead to improved results in practice. \subsection{Basic Methods} \label{sec:riskmini-methods} Suppose that each user $u_i$ has a pair $\langle x_i, y_i\rangle$, where $x_i \in [-1, 1]^d$ and $y_i \in [-1, 1]$ (for linear regression) or $y_i \in \{-1, 1\}$ (for logistic regression and SVM classification). Let $\ell(\cdot)$ be a {\em loss function} that (i) maps a $d$-dimensional {\em parameter vector} $\beta$ into a real number and (ii) is parameterized by $x_i$ and $y_i$. We aim to identify a parameter vector $\beta^*$ such that \vspace{-2mm} $$\beta^* = \arg\min_{\beta} \frac{1}{n}\left(\sum_{i=1}^n \ell(\beta; x_i, y_i)\right) + \frac{\lambda}{2} \|\beta\|^2_2,$$ where $\lambda > 0$ is a regularization parameter. We consider three specific loss functions: \begin{enumerate}[topsep = 6pt, parsep = 6pt, itemsep = 0pt, leftmargin=22pt] \item Linear regression: $\ell(\beta; x_i, y_i) = (x_i^T \beta - y_i)^2$; \item Logistic regression: $\ell(\beta; x_i, y_i) = \log\left(1 + e^{-y_ix_i^T\beta}\right)$; \item SVM (hinge loss): $\ell(\beta; x_i, y_i) = \max\{0, 1 -y_i x_i^T\beta\}$. \end{enumerate} For convenience, we define $$\ell^\prime(\beta; x_i, y_i) = \ell(\beta; x_i, y_i) + \frac{\lambda}{2} \|\beta\|^2_2.$$ One of the most common solutions to compute $\beta^*$ is {\em stochastic gradient descent (SGD)}. It starts from an initial parameter vector $\beta_0$, and iteratively updates it into $\beta_1, \beta_2, \ldots$ based on the following equation: $$\beta_{k+1} = \beta_k - \gamma_k \cdot \nabla \ell^\prime(\beta_k; x, y),$$ where $\langle x, y \rangle$ is the tuple of a randomly selected user, $\nabla \ell^\prime(\beta_k; x, y)$ is the gradient of $\ell^\prime$ at $\beta_k$, and $\gamma_k$ is a constant typically set to $O(1/\sqrt{k})$. It terminates when the difference between $\beta_{k+1}$ and $\beta_k$ is sufficiently small. Under our problem setting, however, $\nabla \ell^\prime$ is not directly available to the aggregator, and needs to be collected in a private manner. Towards this end, existing work \cite{HammCCBX15,DuchiJW14} has suggested that the aggregator may ask the selected user in each iteration to submit a noisy version of $\nabla \ell^\prime$, by using the Laplace mechanism or Duchi \emph{et al.}'s method (i.e., Algorithm~\ref{mech:pubduchi}). We can straightforwardly improve these existing approaches by perturbing $\nabla \ell^\prime$ using Algorithm~\ref{mech:pubreal} instead; however, we observe that such a solution is insufficient for our target application, as we explain in Section~\ref{sec:riskmini-improve}. \subsection{Improvements} \label{sec:riskmini-improve} \vspace{2.5mm} \noindent{\bf \noindent Mini-batching.} We observe in our experiments that the aforementioned SGD approach yields rather inaccurate results, due to the noise injected in the gradient $\nabla \ell^\prime$ returned by each user. In particular, if each user applies Algorithm~\ref{mech:pubreal} to compute $\nabla \ell^\prime(\beta_k; x, y)$, the amount of noise in $\nabla \ell^\prime$ is $O\left(\frac{\sqrt{d \log d}}{\epsilon}\right)$, which is excessively large given that $x \in [-1, 1]^d$. To address this issue, we adopt {\em mini-batch} gradient descent instead of SGD. That is, each iteration of the algorithm, we involve a group $G$ of users, and ask each of them to submit a noisy version of the gradient; after that, we update the parameter vector $\beta_k$ with the mean of the noisy gradients, i.e., $$\textstyle \beta_{k+1} = \beta_k - \gamma_k \cdot \frac{1}{|G|}\sum_{i=1}^{|G|} \nabla \ell^*_i,$$ where $\nabla \ell^*_i$ is the noisy gradient submitted by the $i$-th user in $G$. This helps because the amount of noise in the average gradient is $O\left(\frac{\sqrt{d \log d}}{\epsilon \sqrt{|G|}}\right)$, which could be acceptable if $|G| = \Omega\left(d \log d/\epsilon^2\right)$. However, when $d$ is sizable, $|G| = \Omega\left(d \log d/\epsilon^2\right)$ is large. As a consequence, when we allow each user to participate in at most one iteration of the algorithm, the maximum number of iterations (i.e., $n/|G|$) is small. In that case, the algorithm may terminate prematurely and return an inferior parameter vector. One may attempt to mitigate this problem by allowing each user to be involved in $m > 1$ iterations, but it would further increase the amount of noise in each gradient returned. To explain this, suppose that the $i$-th ($i \in [1, m]$) gradient returned by the user satisfies $\epsilon_i$-differential privacy. By the composition property of differential privacy \cite{McSherryT07}, if we are to enforce $\epsilon$-differential privacy for the user's data, we should have $\sum_{i=1}^m \epsilon_i \le \epsilon$. Consider that we set $\epsilon_i = \epsilon/m$. Then, the amount of noise in each gradient becomes $O\left(\frac{m \sqrt{d \log d}}{\epsilon}\right)$; accordingly, the acceptable mini-batch size becomes $|G| = \Omega\left(m^2 d \log d/\epsilon^2\right)$, which is $m^2$ times the acceptable size when we allow each user to participate in at most one iteration. It then follows that the total number of iterations in the algorithm is inversely proportional to $1/m$, i.e., setting $m > 1$ only degrades the performance of the algorithm. \vspace{2.5mm} \noindent{\bf \noindent Dimension reduction.} For linear regression, instead of increasing $m$, we propose to apply dimensionality reduction on each user's data, so as to reach an acceptable size of mini-batches. Specifically, the curator first generates a random $r \times d$ matrix $P$ where $r < d$ and each entry has an equal probability to be assigned $1/d$ or $-1/d$. Then, the curator shares $P$ with all users, and asks each user to convert her tuple $\langle x_i, y_i\rangle$ into a reduced tuple $\langle x^\prime_i, y_i\rangle$, where $x^\prime_i = P x$. In other words, we project $\{x_i\}$ into a random $r$-dimensional sub-space, and such a projection is known to preserve several important characteristics of the original data \cite{Achlioptas01}. It can be verified that $x^\prime_i \in [-1, 1]^r$. Subsequently, each user uses the reduced tuple $\langle x^\prime_i, y_i\rangle$ to participate in the mini-batch gradient descent algorithm. In other words, each noisy gradient $\nabla \ell^*_i$ returned by the user is $r$-dimensional instead of $d$-dimensional. As such, the average noisy gradient obtained from a mini-batch $G$ of users has an error of $O\left(\frac{\sqrt{r \log r}}{\epsilon \sqrt{|G|}}\right)$ instead of $O\left(\frac{\sqrt{d \log d}}{\epsilon \sqrt{|G|}}\right)$. Accordingly, the acceptable mini-batch size is reduced to $|G| = \Omega\left(r \log r/\epsilon^2\right)$. Algorithm~\ref{mech:pubiter} shows the pseudo-code of our mini-batch gradient descent method with dimension reduction, in the context of the Samsung diagnostic tool. The aggregator first generates a random $r \times d$ matrix $P$, and maintains a $r$-dimensional parameter vector $\alpha$ (Lines 1-3). (We use $\alpha$ instead of $\beta$ to denote the parameter vector to avoid confusion on its dimensionality.) After that, whenever a user with a tuple $\langle x_i, y_i\rangle$ comes online, she obtains $P$ and the current $\alpha$ from the aggregator (Line 6). Then, the user computes a reduced tuple $\langle x^\prime_i, y_i\rangle$, as well as the gradient $\nabla_i = \nabla \ell^\prime(\alpha; x^\prime_i, y_j)$ (Line 7). If any entry of $\nabla_i$ is larger than $1$ (resp.\ smaller than $-1$), then the user resets the entry to $1$ (resp.\ $-1$) (Lines 8-9). This ensures that $\nabla_i \in [-1, 1]^d$, so that it can be a valid input to Algorithm~\ref{mech:pubreal}. After that, the user computes a noisy gradient $\nabla^*_i$ using Algorithm~\ref{mech:pubreal}, submits it to the aggregator, and then logs off (Line 10). The aggregator computes the average noisy gradient from every $g$ users (where $g$ is an input parameter), and updates the parameter vector $\alpha$ accordingly (Lines 11-14). When the update to $\alpha$ is sufficiently small or when a sufficiently large number of users have participated, the aggregator terminates the algorithm (Lines 15-16). \begin{algorithm}[t] \begin{small} \caption{An Iterative Method for Empirical Risk Minimization}\label{mech:pubiter} \SetKwInOut{Input}{input} \SetKwInOut{Output}{output} \Input{positive integer $r$, mini-batch size $g$, privacy parameter $\epsilon$} \Output{parameter vector $\alpha \in \mathbb{R}^r$} generates a random $r \times d$ matrix $P$ each entry has an equal probability to $1/d$ or $-1/d$\; initialize a counter $k = 0$, and learning rate $\gamma$\; initialize a $r$-dimensional vector $\nabla = \langle 0, 0, \ldots, 0\rangle$\; \While{true} { \If{a user with a tuple $\langle x_i, y_i\rangle$ comes online} { send $P$ to the user\; the user computes $x^\prime_i = P x_i$, and derives $\nabla_i = \nabla \ell^\prime(\alpha; x^\prime_i, y_j)$\; \If{$\nabla_i \notin [-1, 1]^r$} { the user projects $\nabla_i$ onto $[-1, 1]^r$\; } the user applies Algorithm~\ref{mech:pubreal} on $\nabla_i$, and submits a noisy gradient $\nabla^*_i$\; $k = k + 1$, and $\nabla = \nabla + \nabla^*_i$\; \If{$k \mod g = 0$} { $\nabla = \frac{\nabla}{g}$, and $\gamma = 1/\sqrt{k/g}$\; $\alpha = \alpha - \gamma \cdot \nabla$\; } \If{$k$ is sufficiently large or $\alpha$ changes sufficiently small in the last update} { {\bf break}\; } } } \Return $\alpha$\; \end{small} \end{algorithm} \begin{figure*}[t] \large \centering \begin{subfigure}[b]{0.24\textwidth} \begin{tikzpicture}[scale=0.5] \begin{axis}[xmode=log,ymin=0,ymax=1.5,xtick={0.05, 0.1, 0.2, 0.4, 0.8}, xticklabels={0.05, 0.1, 0.2, 0.4, 0.8}, ylabel={$L_\infty$ error},xmin=0.05, xmax=0.8, xlabel={privacy budget $\epsilon$},] \addplot [mark=o,mark size=4pt,color=black] coordinates{ (0.05, 0.204176 ) (0.1, 0.104995) (0.2, 0.053417) (0.4, 0.028152 ) (0.8, 0.014394 )}; \addplot [mark=square,mark size=4pt,color=black] coordinates{ (0.05,1.308343 ) (0.1, 0.620373) (0.2, 0.310137) (0.4, 0.147693 ) (0.8, 0.078879 )}; \addlegendentry{Our method} \addlegendentry{Hybrid} \end{axis} \end{tikzpicture} \caption{US - Categorical} \end{subfigure} \begin{subfigure}[b]{0.24\textwidth} \begin{tikzpicture}[scale=0.5] \begin{axis}[xmode=log,ymin=0,ymax=0.85,xtick={0.05, 0.1, 0.2, 0.4, 0.8}, xticklabels={0.05, 0.1, 0.2, 0.4, 0.8}, ylabel={$L_\infty$ error},xmin=0.05, xmax=0.8, xlabel={privacy budget $\epsilon$},] \addplot [mark=o,mark size=4pt,color=black] coordinates{ (0.05, 0.204090 ) (0.1, 0.096314) (0.2, 0.046303) (0.4, 0.023612 ) (0.8, 0.013039 )}; \addplot [mark=square,mark size=4pt,color=black] coordinates{ (0.05,0.803837 ) (0.1, 0.355229) (0.2, 0.206760) (0.4, 0.092176 ) (0.8, 0.049845 )}; \addlegendentry{Our method} \addlegendentry{Hybrid} \end{axis} \end{tikzpicture} \caption{BR - Categorical} \end{subfigure} \begin{subfigure}[b]{0.24\textwidth} \begin{tikzpicture}[scale=0.5] \begin{axis}[xmode=log,ymin=0,ymax=0.07,xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, ylabel={$L_\infty$ error},xmin=0.05, xmax=0.8, xlabel={privacy budget $\epsilon$},] \addplot [mark=o,mark size=4pt,color=black] coordinates{ ( 0.05 , 0.0539382070707 ) ( 0.1 , 0.0266372106599 ) ( 0.2 , 0.0133722994315 ) ( 0.4 , 0.0068858221519 ) ( 0.8 , 0.00349457242252 ) }; \addplot [mark=square,mark size=4pt,color=black] coordinates{ ( 0.05 , 0.06685048625 ) ( 0.1 , 0.031690375625 ) ( 0.2 , 0.01639815375 ) ( 0.4 , 0.00790808125 ) ( 0.8 , 0.00414400875 ) }; \addlegendentry{Our method} \addlegendentry{Hybrid} \end{axis} \end{tikzpicture} \caption{US - Numeric} \end{subfigure} \begin{subfigure}[b]{0.24\textwidth} \begin{tikzpicture}[scale=0.5] \begin{axis}[xmode=log,ymin=0,xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8},xmin=0.05, xmax=0.8, ylabel={$L_\infty$ error}, y tick label style={ /pgf/number format/.cd, fixed, precision=2, /tikz/.cd }, xlabel={privacy budget $\epsilon$},] \addplot [mark=o,mark size=4pt,color=black] coordinates{ ( 0.05 , 0.0810361946734 ) ( 0.1 , 0.0405761457413 ) ( 0.2 , 0.0202238597716 ) ( 0.4 , 0.00992819381313 ) ( 0.8 , 0.00531713430013 ) }; \addplot [mark=square,mark size=4pt,color=black] coordinates{ ( 0.05 , 0.105065722222 ) ( 0.1 , 0.0521644610245 ) ( 0.2 , 0.0257926524664 ) ( 0.4 , 0.0124129617978 ) ( 0.8 , 0.00603039954853 ) }; \addlegendentry{Our method} \addlegendentry{Hybrid} \end{axis} \end{tikzpicture} \caption{BR - Numeric} \end{subfigure} \caption{Experiments on estimating means and frequencies.} \label{fig:exp-mean-freq} \end{figure*} \section{Experiments} \label{sec:exp} \subsection{Experimental Settings} \begin{figure*}[t] \large \centering \begin{tikzpicture} \small \begin{customlegend}[legend columns=4,legend style={align=left,draw=none,column sep=2ex},legend entries={Private SGD, Private MGD, Private MGD-DR, Non-Private}] \csname pgfplots@addlegendimage\endcsname{mark=o,mark size=3pt,solid,line legend} \csname pgfplots@addlegendimage\endcsname{mark=square,mark size=3pt,solid} \csname pgfplots@addlegendimage\endcsname{mark=triangle,mark size=3pt,solid} \csname pgfplots@addlegendimage\endcsname{dashed,mark size=3pt} \end{customlegend} \end{tikzpicture} \hspace{10ex} \begin{subfigure}[b]{0.32\textwidth} \begin{tikzpicture}[scale=0.55] \begin{axis}[ xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, ymode = log, xmin=0.05, xmax=0.8, xmode=log, ylabel={MSE}, xlabel={privacy budget $\epsilon$},] \addplot [mark=o, mark size=6pt,color=black] coordinates{ ( 0.05 , 6287122.48686 ) ( 0.1 , 960241.758476 ) ( 0.2 , 121961.847655 ) ( 0.4 , 14780.8136734 ) ( 0.8 , 1528.65032144 ) }; \addplot [mark=triangle, mark size=6pt,color=black] coordinates{ ( 0.05 , 0.3088838 ) ( 0.1 , 0.291185325 ) ( 0.2 , 0.2049374 ) ( 0.4 , 0.167753388889 ) ( 0.8 , 0.158758444444 ) }; \addplot [mark=square, mark size=6pt,color=black] coordinates{ ( 0.05 , 48.2389715575 ) ( 0.1 , 10.5001094074 ) ( 0.2 , 4.85417782407 ) ( 0.4 , 1.53365133333 ) ( 0.8 , 0.756012703704 ) }; \addplot [dashed, mark size=6pt,color=black] coordinates{ (0.05 , 0.105894) (0.1 , 0.105894) (0.2 , 0.105894) (0.4 , 0.105894) (0.8 , 0.105894) }; \end{axis} \end{tikzpicture} \caption{\textsf{US} - Linear} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \begin{tikzpicture}[scale=0.55] \begin{axis}[ xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, xmin=0.05, xmax=0.8, xmode=log, ylabel={misclassification rate}, xlabel={privacy budget $\epsilon$},] \addplot [mark=o, mark size=6pt,color=black] coordinates{ (0.05,0.424135041667) (0.1,0.397075727273) (0.2,0.374881722222) (0.4,0.35487325) (0.8,0.3364076875) }; \addplot [mark=square, mark size=6pt,color=black] coordinates{ (0.05,0.400542926606) (0.1,0.377820103774) (0.2,0.35351575) (0.4,0.32545315534) (0.8,0.290787339806) }; \addplot [dashed, mark size=6pt,color=black] coordinates{ (0.05,0.246063) (0.1,0.246063) (0.2,0.246063) (0.4,0.246063) (0.8,0.246063)}; \end{axis} \end{tikzpicture} \caption{\textsf{US} - Logistic} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \begin{tikzpicture}[scale=0.55] \begin{axis}[ xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, xmode=log, xmin=0.05, xmax=0.8, ylabel={misclassification rate}, xlabel={privacy budget $\epsilon$},] \addplot [mark=o, mark size=6pt,color=black] coordinates{ (0.05,0.4376538) (0.1,0.405204425) (0.2,0.3754819) (0.4,0.353484657895) (0.8,0.332550764706) }; \addplot [mark=square, mark size=6pt,color=black] coordinates{ (0.05,0.388824658915) (0.1,0.363690742188) (0.2,0.344229) (0.4,0.312033403226) (0.8,0.281063243902) }; \addplot [dashed, mark size=6pt,color=black] coordinates{ (0.05,0.246172) (0.1,0.246172) (0.2,0.246172) (0.4,0.246172) (0.8,0.246172) }; \end{axis} \end{tikzpicture} \caption{\textsf{US} - SVM} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \begin{tikzpicture}[scale=0.55] \begin{axis}[ xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, ymode = log, xmode=log, xmin=0.05, xmax=0.8, ylabel={MSE}, xlabel={privacy budget $\epsilon$},] \addplot [mark=o, mark size=6pt,color=black] coordinates{ ( 0.05 , 6889569.38021 ) ( 0.1 , 866543.579075 ) ( 0.2 , 70792.4341219 ) ( 0.4 , 8071.96353976 ) ( 0.8 , 760.210399583 ) }; \addplot [mark=triangle, mark size=6pt,color=black] coordinates{ ( 0.05 , 0.329723727941 ) ( 0.1 , 0.279884066667 ) ( 0.2 , 0.235770195489 ) ( 0.4 , 0.185013687023 ) ( 0.8 , 0.171521885496 ) }; \addplot [mark=square, mark size=6pt,color=black] coordinates{ ( 0.05 , 252.754903683 ) ( 0.1 , 42.5536999464 ) ( 0.2 , 10.3221948333 ) ( 0.4 , 2.40070314815 ) ( 0.8 , 1.74559125926 ) }; \addplot [dashed, mark=+, mark size=6pt,color=black] coordinates{ (0.05 , 0.12416333333) (0.1 , 0.12416333333) (0.2 , 0.12416333333) (0.4 , 0.12416333333) (0.8 , 0.12416333333) }; \end{axis} \end{tikzpicture} \caption{\textsf{BR} - Linear} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \begin{tikzpicture}[scale=0.55] \begin{axis}[ xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, xmin=0.05, xmax=0.8, xmode=log, ylabel={misclassification rate}, xlabel={privacy budget $\epsilon$},] \addplot [mark=o, mark size=6pt,color=black] coordinates{ (0.05,0.44105747) (0.1,0.407447836735) (0.2,0.379633322917) (0.4,0.357206666667) (0.8,0.346549819149) }; \addplot [mark=square, mark size=6pt,color=black] coordinates{ (0.05,0.4394718) (0.1,0.386306875) (0.2,0.351691315) (0.4,0.32011164) (0.8,0.291095995) }; \addplot [dashed, mark size=6pt,color=black] coordinates{ (0.05,0.263119833333333) (0.1,0.263119833333333) (0.2,0.263119833333333) (0.4,0.263119833333333) (0.8,0.263119833333333) }; \end{axis} \end{tikzpicture} \caption{\textsf{BR} - Logistic} \end{subfigure} \begin{subfigure}[b]{0.32\textwidth} \begin{tikzpicture}[scale=0.55] \begin{axis}[ xtick={0.05,0.1,0.2,0.4,0.8}, xticklabels={0.05,0.1,0.2,0.4,0.8}, xmode=log, xmin=0.05, xmax=0.8, ylabel={misclassification rate}, xlabel={privacy budget $\epsilon$},] \addplot [mark=o, mark size=6pt,color=black] coordinates{ (0.05,0.43822852) (0.1,0.41570793) (0.2,0.381309575) (0.4,0.3522503) (0.8,0.344796745) }; \addplot [mark=square, mark size=6pt,color=black] coordinates{ (0.05,0.4275431) (0.1,0.376935815) (0.2,0.335387385) (0.4,0.309327135) (0.8,0.283983395) }; \addplot [dashed, mark size=6pt,color=black] coordinates{ (0.05,0.2714201875) (0.1,0.2714201875) (0.2,0.2714201875) (0.4,0.2714201875) (0.8,0.2714201875) }; \end{axis} \end{tikzpicture} \caption{\textsf{BR} - SVM} \end{subfigure} \caption{Experimental results for empirical risk minimization.}\label{fig:exp-ERM} \end{figure*} For experimental repeatability, we use two public datasets extracted from the \textit{Integrated Public Use Microdata Series} \cite{IPUMS}, US and BR, which contains census records from the United States and Brazil, respectively. US contains $9$M tuples and $23$ attributes, among which $6$ are numeric (e.g., age) and $17$ are categorical (e.g., gender); BR has $4$M records and $18$ attributes, among which $6$ are numeric and $12$ are categorical. Both datasets contain a numeric attribute ``total income'', which we use as the dependent attribute in linear regression, logistic regression, and SVM. We normalize the domain of each numeric attribute into $[-1, 1]$. \subsection{Estimating Means and Frequencies} In the first set of experiments, we consider the task of collecting a noisy tuple from each user to estimate the mean of each numeric attribute and the frequency of each categorical value. As mentioned in Section~\ref{sec:intro}, none of the existing solutions can directly support this task, since they are designed for either numeric or categorical attributes, but not both. To address this issue, we construct a method (referred to as {\em Hybrid}) by combining the best existing solutions as follows. Let $t$ be a tuple with $d_n$ numeric attributes and $d_c$ categorical attributes. Given $t$ and a privacy budget $\epsilon$, {\em Hybrid} first constructs a $d_n$-dimensional tuple $t^\prime$ that contains all numeric values in $t$, and then release a noisy version of $t^\prime$ by invoking Duchi \emph{et al.}'s method (see Section~\ref{sec:basic-numeric}) on $t^\prime$, using a privacy budget of $d_n\epsilon/d$. After that, for each categorical value in $t$, {\em Hybrid} applies Bassily and Smith's method (see Section~\ref{sec:basic-categorical}) to release a noisy version with a privacy budget of $\epsilon/d$. By the composition property of differential privacy \cite{McSherryT07}, {\em Hybrid} ensures $\epsilon$-LDP. Intuitively, {\em Hybrid} is a best-effort approach to incorporate two states of the art that are designed only for numeric attributes (i.e., Duchi \emph{et al.}'s method) and a single categorical attribute (i.e., Bassily and Smith's method), respectively. We apply our solution in Section~\ref{sec:basic} and {\em Hybrid} on both US and BR to generate noisy tuples, and then use the noisy tuples to estimate the frequency of each value in each categorical domain in US and BR. For each method, we measure the $L_\infty$ error in the estimated value frequencies, and we take the average measurement from $100$ runs. Figures \ref{fig:exp-mean-freq}a and \ref{fig:exp-mean-freq}b illustrate the results as $\epsilon$ varies. Observe that our method is significantly more accurate than {\em Hybrid} in all cases, and its error is only around $1/4$ of the error incurred by {\em Hybrid}. This is consistent with the analysis in Section~\ref{sec:basic-categorical} that (i) our method has $O\left(\frac{\sqrt{d\log k}}{\epsilon \sqrt{n}}\right)$ estimation error, and (ii) repeatedly applying Bassily and Smith's method on each categorical leads to $O\left(\frac{d\sqrt{\log k}}{\epsilon \sqrt{n}}\right)$ error. We also use the noisy tuples to estimate the mean of each numeric attribute, and we measure the $L_\infty$ error of each method, averaged over $100$ runs. Figure \ref{fig:exp-mean-freq}c (resp.\ \ref{fig:exp-mean-freq}d) shows the results on US (resp.\ BR) as a function of the privacy budget $\epsilon$. Observe that our solution slightly outperforms {\em Hybrid}, regardless of the dataset used and the value of $\epsilon$. We also note that, compared with {\em Hybrid} (which applies Duchi \emph{et al.}'s method to handle numeric attributes), our solution has a much lower communication cost on each user (since it only requires each user to transfer $1$ bit), and is much simpler. \subsection{Empirical Risk Minimization} In the second set of experiments, we consider linear regression, logistic regression, and SVM classification on US and BR. For both datasets, we use the numeric attribute ``total income'' as the dependent variable, and all other attributes as independent variables. Following the standard practice, we transform each categorical attribute $A_j$ with $k$ values into $k-1$ binary attributes with a domain $\{-1, 1\}$, such that (i) the $l$-th ($l < k$) value in $A_j$ is represented by a $1$ on the $l$-th binary attribute and a $-1$ on each of the remaining $k-2$ attributes, and (ii) the $k$-th value in $A_j$ is represented by $-1$ on all binary attributes. After this transformation, the dimensionality of US (resp.\ BR) becomes $85$ (resp.\ $95$). For logistic regression and SVM (which requires the dependent variable to be binary), we convert ``total income'' into a binary attribute by mapping all values which are greater than or equal to the mean to $1$, and all other values to $-1$. We evaluate four methods: (i) a private version of SGD that involves one user in each iteration, and asks the user to submit a noisy gradient using Duchi \emph{et al.}'s method; (ii) mini-batch gradient descent (MGD), which involves $g$ users in each iteration, and uses the average noisy gradients of those users (generated with Algorithm~\ref{mech:pubreal}) to update the parameter vector; (iii) MGD with dimension reduction (DR), which is an improved version of MGD that projects the users' data onto an $r$-dimensional sub-space before the learning task (this method is applied for linear regression only); (iv) a non-private version of SGD. Based on the analysis in Section~\ref{sec:riskmini}, we set the mini-batch size for MGD and MGD-DR to $g = \max \{ 2d\log d /\epsilon^2, n/1000\}$ and $g = \max \{2r\log r / \epsilon^2, n/1000\}$, respectively. The term $n/1000$ is to guarantee that our mini-batch size is not too small when $\epsilon$ is large. In addition, we set $r = 20$. For all methods, we set the regularization factor $\lambda = 10^{-4}$. On each dataset, we use $10$-fold cross validation to assess the performance of each method. Figure \ref{fig:exp-ERM}a (resp.\ \ref{fig:exp-ERM}d) shows the mean squared error (MSE) of the linear regression model generated by each method, under various values of $\epsilon$. Private SGD incurs prohibitive errors in all cases, due to the large amount of noise in the gradient that it obtains in each iteration. MGD alleviates this issue with mini-batches, but still provides unsatisfactory accuracy for linear regression. The reason, as we mentioned in Section~\ref{sec:riskmini-improve}, is that MGD requires using a large mini-batch size $g$ when $d$ is large, which in turn leads to a small total number of iterations and degrades its performance. MGD-DR overcomes the drawback of MGD by incorporating dimension reduction to reduce the required mini-batch size, and hence, it is able to achieve an accuracy that is close to the non-private SGD. Figures \ref{fig:exp-ERM}b and \ref{fig:exp-ERM}e (\ref{fig:exp-ERM}c and \ref{fig:exp-ERM}f) illustrate the misclassification rate of each method for logistic regression (resp.\ SVM). Overall, our experimental results demonstrate the effectiveness of mini-batches and dimension reduction for empirical risk minimization under local differential privacy. \section{Related Work} \label{sec:related} Differential privacy \cite{dinur2003revealing, dwork2004privacy, DworkLaplace} is a strong, mathematically rigorous framework for privacy protection. Unlike earlier privacy-preserving data publication methods which are largely syntactic, differential privacy provides semantic, information-theoretic guarantees on individuals' privacy. Hence, since its proposal in 2003 it had attracted much attention from various research communities in computer science, including theory \cite{DworkR14}, machine learning \cite{SarwateC13}, data management \cite{YangZMWX12}, and systems \cite{ShiCRCS11}. Earlier models of differential privacy assume a trusted data curator, who collects and manages the exact private information of individuals, and releases statistics derived from the data under differential privacy requirements. In practice, however, users may not want to share private information with anyone, including the central data curator. Recently, much attention has been shifted to the local differential privacy model, which eliminates the data curator and the collection of exact private information. Specifically, Duchi \emph{et al.} \cite{duchi2013local} systematically investigate the concept of local differential privacy, propose the minimax framework for LDP based on the information theory, prove upper and lower error bounds of LDP-compliant methods, and analyze the trade-off between privacy and accuracy. Kairouz \emph{et al.}~\cite{kairouz2014differentially} show that a version of randomized response is an optimal mechanism for frequency estimation on a single binary attribute. Kairouz \emph{et al.}~\cite{kairouz2014extremal} study the problem with a categorical attribute with an arbitrary number of possible values, propose two mechanisms: binary and randomized response mechanisms, and prove their optimality when the privacy budget is low and high, respectively. Bassily and Smith \cite{BS15} propose an asymptotically optimal solution for building succinct histograms over a large categorical domain under LDP. Erlingsson \emph{et al.}~\cite{RAPPOR2014} propose the RAPPOR framework, which is based on the randomized response mechanism for publishing a vector of binary values under LDP. They use this mechanism with a Bloom filter, which intuitively adds another level of protection and increases the difficulty for the adversary to infer private information. As a result, it also becomes more difficult derive statistics from the collected data, and they propose a sophisticated solution for this purpose. A follow-up paper \cite{FantiPE15} extends Rappor to more complex statistics such as joint distributions and association testing, as well as categorical attributes that contain a large number of potential values, such as a user's home page. \section{Conclusion}\label{sec:conclusion} This work systematically investigates the problem of collecting and analyzing users' personal data under $\epsilon$-local differential privacy, in which the aggregator only collects randomized data from the users, and computes statistics based on such data. The proposed solution Harmony is able to collect data records that contain multiple numeric and categorical attributes, and compute accurate statistics from simple ones such as mean and frequency to complex machine learning models such as linear regression, logistic regression and SVM classification. Harmony achieves both optimal asymptotic error bound and high accuracy in practice. Meanwhile, it is highly efficient in terms of communication and computational overhead. Extensive experiments demonstrate its effectiveness on real data. In the next step, we plan to investigate the application of Harmony in a real use case such as Samsung's diagnostic info report app. \bibliographystyle{abbrv}
{'timestamp': '2016-06-17T02:05:52', 'yymm': '1606', 'arxiv_id': '1606.05053', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05053'}
arxiv
\section*{Keywords} clustering, mixed data, phenotypic data, SNP data, metabolic syndrome. \section{Introduction} \label{sec:intro} Many large cohort based studies collect high dimensional continuous phenotypic and categorical genotypic data. The pan European LIPGENE-SU.VI.MAX (SUpplementation en VItamines et Min\'{e}raux AntioXydants) study ({\tt www.ucd.ie/lipgene}) is one such study which focuses on the need to account for both phenotypic and genetic factors when studying the metabolic syndrome (MetS). The MetS is a complex disorder that can lead to increased risk of developing type 2 diabetes and cardiovascular disease. The MetS is the term used to describe a clustering of several risk factors for cardiovascular disease, namely obesity, abnormal blood lipids, insulin resistance and high blood pressure. Obesity is on the rise globally and is considered to be a principle factor in the development of insulin resistance and the metabolic syndrome. The World Health Organisation estimates that the global prevalence of diabetes will almost double from 171 million people in 2000 to 300 million people by the year 2030. Given the strain this will place on health and health systems all over the world there is a need to gain greater understanding of the MetS, thereby reducing its adverse health effects. In particular, the influence of both phenotypic and genetic factors (and their interaction) on the MetS has recently come to the fore, and is the focus of the LIPGENE-SU.VI.MAX project. Valuable introductions and contributions to the LIPGENE-SU.VI.MAX project include \cite{phillips09a} and \cite{ferguson2010}. Under the LIPGENE-SU.VI.MAX study, high dimensional data of mixed type were collected on a group of participants. Continuous phenotypic variables (e.g. anthropometric and biochemical variables such as waist circumference and plasma fatty acid levels) as well as categorical (binary and nominal) genotypic single nucleotide-polymorphism (SNP) variables were recorded. Here, interest lies in clustering the participants into homogeneous groups or \emph{sub-phenotypes}, based on jointly modelling their phenotypic and genotypic data, to uncover groups with similar phenotypic-genotypic profiles. In the LIPGENE-SU.VI.MAX study, a large number of phenotypic and genotypic variables were recorded; determining which variables discriminate between the resulting sub-phenotypes is therefore of interest. Moreover, given the ethos of the LIPGENE-SU.VI.MAX study, whether the set of discriminatory variables includes both phenotypic and genotypic variables is of key interest. The developed methodology has wide applicability beyond the LIPGENE-SU.VI.MAX study, in any setting seeking to uncover subgroups in a cohort on which high dimensional data of mixed type have been recorded. Joint modelling approaches for data of mixed type are gaining attention in a range of statistical and applied areas (see \cite{dunson05, faes08, wagner10, deLeon11, chen14}, among others, for example). In particular \cite{deLeon13} provides a comprehensive overview of recent methodological and applied advances in the mixed data modelling area. Latent factor models in particular have been successfully employed to jointly model mixed data; \cite{quinn04, gruhl13} and \cite{murray13} use factor analytic models to analyse mixed data but not in a clustering context. In a similar vein to the approach taken here, \cite{Huang2014} consider a joint analysis of SNP and gene expression data in studies of complex diseases such as asthma, but again not in the clustering context. The MetS has had recent exposure in the statistical and computational literature -- \cite{Matsunaga2005, vattikuti2012} and \cite{Gostev2011} employ computational approaches to learn about the disease, but mainly from a genetic point of view. Latent variable based clustering models have been successfully utilised to analyse high dimensional data. For example, \cite{ghahramani97} propose a mixture of factor analysers model with a cluster specific parsimonious covariance matrix. A suite of similar models with varying levels of parsimony is developed in \cite{mcnicholas08} and the mixture of factor analysers model is fitted in a Bayesian framework in \cite{fokoue03}. Mixtures of structural equation models are developed in \cite{yung1997} and \cite{zhu2001}. More recent developments in this area include those in \cite{baek08}, \cite{baek10} and \cite{viroli2010}, among others. However, while these models can efficiently model high dimensional data, none of them can cluster observed mixed data while also correctly handling each variable type. Clustering data of mixed type is a challenging statistical problem. Early attempts to address the problem include the use of mixture models and location mixture models \cite{everitt88a,everitt88b, muthen99, hunt99, hunt03} as well as non-model based approaches \cite{huang97, ahmad07}; \cite{vermunt02} clusters mixed categorical data using a latent class analysis approach. More recently \cite{cai11, browne12, morlini11, cagnone12, gollini13} attempt to cluster mixed categorical data using latent variable models and \cite{biernacki15} cluster multivariate ordinal data using a stochastic binary search algorithm. However none of these can analyse the specific combination of continuous and categorical variables without transforming the original variables in some way, or can feasibly accommodate high dimensional data. An alternative model-based approach to clustering mixed continuous and categorical data, clustMD, is introduced in \cite{mcparland16}. While this approach can explicitly model the inherent nature of continuous and categorical variables directly, it is again computationally infeasible to use for high dimensional data. In particular, clustMD cannot accommodate large numbers of nominal variables. Copula models for clustering mixed data \cite{marbac14, kosmidis15} while showing distinct promise, also have limitations in high dimensional settings. The recent mixture of factor analysers for mixed data (MFA-MD) \cite{mcparland14a} is a hybrid of latent variable models for different data types and provides the machinery for clustering mixed categorical data. Here, the MFA-MD model is extended to facilitate clustering of high dimensional, mixed continuous and categorical data. Specifically, the joint model is composed of a factor analysis model for continuous data, an item response theory model for binary/ordinal data and a multinomial probit type model is used for nominal data. The clustering machinery is provided by a finite mixture model. The MFA-MD model is ideal for high dimensional data settings as its factor analytic roots provide a parsimonious covariance structure. However large numbers of variables, as are present in the LIPGENE-SU.VI.MAX data, hamper the substantive interpretability of the resulting clusters and place a heavy computational burden on model fitting. Existing approaches to variable selection in a clustering context include reversible jump Markov chain Monte Carlo methods \cite{tadesse05}, approximate Bayes factors are used in \cite{raftery06} and \cite{maugis09} to compare nested sets of variables and \cite{wang08} use penalised model based clustering in the context of microarray data. Such methods would be computationally expensive given the latent variable aspect of the MFA-MD model, and given the large number of variables in LIPGENE-SU.VI.MAX data. Therefore, here an efficient novel online variable selection algorithm is incorporated when fitting the extended MFA-MD model, improving substantive interpretability and computational costs. Inspired by \cite{andrews14}, variable selection is based on a within cluster variance to overall variance criterion, efficiently leading to an interpretative clustering solution. Model fitting is performed in the Bayesian paradigm and is achieved via a Gibbs sampling algorithm. As in any clustering setting, uncovering the number of underlying clusters is a key, and often difficult, question. In the context of the extended MFA-MD model, the dimension of the latent factor aspect of the model also requires selection. Typical likelihood based model selection criteria such as the Bayesian Information Criterion (BIC) \cite{schwarz78, kass95} have been demonstrated to perform well in many general clustering settings \cite{fraley02, gormley06}, and marginal likelihood evaluation \cite{fruhwirth04} or the use of over fitting mixture models have gained warranted attention \cite{vanhavre15, malsinerwalli16} in the Bayesian literature. The likelihood function of the MFA-MD model is intractable however, rendering such approaches unusable. Therefore, here a novel approximation of the likelihood function is incorporated with the BIC-MCMC criterion \cite{fruhwirth11}, to efficiently select the optimal model (i.e. the optimal number of clusters and the optimal number of latent factors) in the context of the extended MFA-MD model. The extended MFA-MD model, with variable selection, is used to cluster the LIPGENE-SU.VI.MAX participants within a Bayesian framework. A range of models with varying numbers of clusters and latent factor dimensions are fitted. The BIC-MCMC criterion suggests two clusters or sub-phenotypes of participants, and a set of just 25 of the original 738 variables are deemed discriminatory. Examination of the cluster specific parameters reveals a `healthy' sub-phenotype and an `at risk' sub-phenotype. Notably the set of discriminatory variables contains both phenotypic and genotypic variables, highlighting the need to jointly consider both data types. Some of the discriminatory variables are intuitive and have been highlighted previously in the literature, but some of the discriminating SNPs in particular are novel discoveries. Seven years after the LIPGENE-SU.VI.MAX data analysed here were collected, each of the participants underwent further analysis to diagnose the presence or absence of the MetS, based on a criterion which considers continuous phenotypic data only. The two clusters uncovered here from the initial LIPGENE-SU.VI.MAX data strongly correspond to the seven year follow up disease classification, highlighting the role of phenotypic and genetic factors in the MetS and, perhaps most importantly, the potential utility of the clustering approach in early screening. The model-based nature of the MFA-MD approach to clustering provides a global view of the group structure in the set of LIPGENE-SU.VI.MAX participants. However, it additionally provides detailed insight to sub-phenotype membership at the participant level, through quantification of the probability of sub-phenotype membership for each participant. This ability to define the uncertainty of cluster membership is an important development for the application of the metabotyping concept in precision medicine and nutrition \cite{odonovan16}. The remainder of the paper is organised into the following sections. Section \ref{sec:data} provides background to the LIPGENE-SU.VI.MAX study, and specific details on the data collected. Section \ref{sec:methods} contains the three modelling contributions of the paper: (i) details of the extended MFA-MD model for high dimensional, mixed continuous and categorical data (ii) an outline of the variable selection and inference procedure and (iii) the development of the approximate BIC-MCMC model selection tool. Simulation studies, diverted to the Supplementary Material for clarity, provide evidence to support the modelling and selection approaches taken. Section \ref{sec:results} discusses the results of fitting the extended MFA-MD model for high dimensional data to the LIPGENE-SU.VI.MAX data, and considers model fit. The paper concludes in Section \ref{sec:discussion} with a discussion and some future research directions. \section{The LIPGENE-SU.VI.MAX study} \label{sec:data} LIPGENE-SU.VI.MAX is a European Union Sixth Framework Integrated Programme entitled `Diet, genomics and the metabolic syndrome: an integrated nutrition, agro-food, social and economic analysis' conducted by 25 research centres across Europe. The primary focus of LIPGENE-SU.VI.MAX is the interaction of nutrients and genotype in the metabolic syndrome (MetS). The MetS is the term used to describe a clustering of several risk factors for cardiovascular disease, namely obesity, abnormal blood lipids (such as high blood cholesterol and raised triglyceride levels), insulin resistance and high blood pressure (hypertension). One quarter of the world's adult population have the metabolic syndrome and increasing numbers of children and adolescents have it as the worldwide obesity epidemic accelerates. Table \ref{tab:diagnosis} details the MetS diagnosis criterion used here which relates to insulin resistance, dyslipidaemia, cholesterol, blood pressure and abdominal obesity. Many closely related definitions of the MetS are also in use \cite{alberti05, alberti06, huang2009}. \begin{table}[h] \caption{ A person with 3 or more of the abnormalities listed below is diagnosed as having the MetS.\label{tab:diagnosis}} \begin{center} \begin{tabular}{ll}\hline \hline Fasting glucose & $\geq$5.5 mmol l$^{-1}$ \\ concentration & or treatment of previously diagnosed diabetes.\\\hline Serum TAG & $\geq$ 1.5 mmol l$^{-1}$ \\ concentration & or treatment of previously diagnosed lipidemia.\\\hline Serum HDL-c & $<$ 1.04 mmol l$^{-1}$ (Men) \\ concentration & $<$ 1.29 mmol l$^{-1}$ (Women)\\\hline Blood pressure & Systolic BP $\geq 130$ mm Hg, Diastolic BP $\geq 85$ mm Hg\\ & or treatment of previously diagnosed hypertension.\\\hline Waist & $> 94$ cm (Men), $>80$ cm (Women)\\ Circumference & \\\hline \end{tabular} \end{center} \end{table} Under LIPGENE-SU.VI.MAX, data from a prospective population-based study were available \cite{ferguson2010, hercberg2004}. Twenty-six continuous phenotypic measurements in addition to 801 categorical SNP variables were recorded for each of 1754 participants. Examples of the continuous phenotypic measurements include fasting glucose concentration, waist circumference and plasma fatty acid levels. An example of a categorical genotypic variable is the nominal SNP {\tt rs512535} of the \emph{APOB} gene which has three genotypes, $AA$, $GG$ or $AG$ in the data. The 801 genotypic variables were selected using a candidate gene approach based on pathways adversely affected in the metabolic syndrome, and their relevant genes, as previously described in \cite{deEdelenyi08, phillips06}. Biological variables were based on characteristics of the metabolic syndrome \cite{alberti05, alberti06, huang2009} and plasma fatty acid profiles were determined as biomarkers of habitual dietary intake as previously described \cite{phillips09a}. Some data cleaning was conducted prior to analysis. Without loss of generality, the nominal SNP variables were coded with the convention 0 = dominant homozygous, 1 = recessive homozygous and 2 = heterozygous. Any SNP variable with more than 100 missing values was removed, as were SNPs for which all 3 genotypes were not observed in the data (most of which only had one observed genotype and therefore are non-discriminatory in a clustering setting). A total of 990 participants were then removed as they still had at least one missing value across the remaining SNPs. Some of the remaining SNPs had a small number ($<$ 10\% of the number of participants) of counts of the recessive homozygous genotype. In such cases, for reasons of computational efficiency and stability, the recessive homozygous and the heterozygous categories were merged, thus resulting in some SNPs becoming binary variables. The merged category can be thought of as a `compound genotype'. For example, the SNP {\tt rs17777371} of the \emph{ADD1} gene became a binary SNP with genotypes $GG$ and $CG/CC$ in the data. While losing some information, merging of at least one sparsely observed genotype with another will not largely impact the findings in terms of uncovering clusters, or highlighting variables which discriminate between clusters. A total of 371 SNPs were collapsed to binary variables, leaving 341 nominal SNP variables. Finally the SNP data were combined with the continuous phenotypic data and participants that had any missing values for the continuous variables were removed. This left a final complete data set of 505 participants and 738 variables (26 continuous variables, 371 binary SNPs and 341 nominal SNPs); this data set is analysed here. No genotypes were removed solely as a result of missing data from other variables, and the continuous variables were standardised before any analysis was performed. The full list of 738 variables analysed here is given in the Supplementary Material. As stated LIPGENE-SU.VI.MAX was a prospective study. Seven years after the data analysed here were collected, new continuous phenotypic data were recorded on the LIPGENE-SU.VI.MAX participants in order to diagnose the presence or absence of the MetS, according to the criterion detailed in Table \ref{tab:diagnosis}. The correspondence between the clusters uncovered from the initial phenotypic and genotypic data and the seven year follow-up disease diagnosis is examined in Section \ref{sec:results}. \section{Modelling and inference} \label{sec:methods} A model-based approach is taken to cluster the LIPGENE-SU.VI.MAX participants, based on their initial mixed continuous, binary and nominal data. The mixture of factor analysers model for mixed ordinal and nominal data, MFA-MD, is introduced in \cite{mcparland14a}. Here the MFA-MD model is extended to also allow for continuous data, a variable selection procedure is proposed which facilitates feasible handling of high dimensional data, details of Bayesian inference are provided, and an approximate BIC-MCMC criterion for model selection is developed. \subsection{Modelling the continuous phenotypic variables} \label{subsec:cnsvars} A factor analysis model \cite{spearman1904} is used to model the multivariate continuous phenotypic data. Specifically, the observed $J$ continuous phenotypic measurements, $\underline{z}_i$, on participant $i$ are modelled as $$\underline{z}_i = \underline{\mu} + \Lambda \underline{\theta}_i + \underline{\epsilon}_i$$ where $\underline{\mu}$ is a mean vector, $\Lambda$ is a loadings matrix and $\underline{\theta}_i$ is a participant specific latent trait. The error vector $\underline{\epsilon}_i$ follows a zero mean multivariate Gaussian distribution with diagonal covariance matrix $\Psi$. The dimension of the latent trait $\underline{\theta}_i$ is $Q$ where $Q \ll J$. The factor analysis model offers parsimony as the marginal covariance $\Sigma = \Lambda\Lambda^T + \Psi$ requires estimation of only $J(Q+1)$ parameters. \subsection{Modelling the binary SNP variables} \label{subsec:binSNPs} As described in Section \ref{sec:data} some SNPs are treated as binary variables and are modelled using item response theory (IRT) models. Suppose that SNP {\tt rs17777371} is the $j^{th}$ variable (for $j = 1, \ldots, J$). IRT models assume that, for participant $i$, a latent Gaussian variable $z_{ij}$ corresponds to each observed binary response $y_{ij}$. A Gaussian link function is assumed, though other link functions, such as the logit, are detailed in the IRT literature \cite{lord68, fox10}. If $z_{ij} < 0$ then the binary response will be $y_{ij} = 0$ while if $z_{ij} > 0$ then $y_{ij} = 1$. Relating this to SNP {\tt rs17777371}, say, if $z_{ij} < 0$ then the observed genotype for participant $i$ will be $GG$ while if $z_{ij} > 0$ then observed genotype will be $CG/CC$. In a standard IRT model, a factor analytic structure is then used to model the underlying latent variable $z_{ij}$. It is assumed that the value of $z_{ij}$ depends on a $Q$ dimensional, participant specific, latent trait $\underline{\theta}_i$ (often termed the ability parameter) and on some variable specific parameters. Specifically, the underlying latent variable $z_{ij}$ for respondent $i$ and variable $j$ is assumed to be distributed as $$z_{ij}| \underline{\theta}_i \sim N(\mu_j + \underline{\lambda}_j^T\underline{\theta}_i, 1).$$ The parameters $\underline{\lambda}_j$ and $\mu_j$ are usually termed the item discrimination parameters and the negative item difficulty parameter respectively. As in \cite{albert93}, a probit link function is used so the conditional variance of $z_{ij}$ is $1$. Under this model, the conditional probability that $y_{ij}=1$ is $$P(y_{ij}=1 |\mu_j, \underline{\lambda}_j, \underline{\theta}_i) = \Phi\left(\mu_j + \underline{\lambda}_j^T\underline{\theta}_i\right)$$ where $\Phi$ denotes the standard Gaussian cumulative distribution function. \subsection{Modelling nominal SNP variables} \label{nomSNPs} Modeling nominal data is challenging, due to the fact that the set of possible responses is not ordered. In the LIPGENE-SU.VI.MAX data, the possible responses for nominal SNPs is a set of three genotypes. For example, the nominal SNP {\tt rs512535} of the \emph{APOB} gene has three levels or genotypes, $AA$, $GG$ or $AG$, in the data. These response levels are coded as 0, 1 and 2 respectively, but no order is implied. As detailed in Section \ref{subsec:binSNPs}, the IRT model for binary SNP variables posits a one dimensional latent variable for each observed binary SNP. In the factor analytic model for nominal SNP variables, a two-dimensional latent \emph{vector} is required for each observed nominal SNP. That is, the latent vector for participant $i$ corresponding to nominal SNP $j$ is denoted $\underline{z}_{ij} = (z_{ij}^1, z_{ij}^{2})^T.$ The observed nominal response is then assumed to be a manifestation of the values of the elements of $\underline{z}_{ij}$ relative to each other and to a cut-off point, assumed to be $0$. That is, $$y_{ij} = \left\{ \begin{array}{ll} 0 & \mbox{if $ \displaystyle \max\{z_{ij}^1, z_{ij}^{2}\} < 0$} \vspace{0.1cm}\\ 1 & \mbox{if $z_{ij}^{1} = \displaystyle \max\{z_{ij}^1, z_{ij}^{2}\}$ and $z_{ij}^{1} > 0$} \vspace{0.1cm}\\ 2 & \mbox{if $z_{ij}^{2} = \displaystyle \max\{z_{ij}^1, z_{ij}^{2}\}$ and $z_{ij}^{2} > 0$}.\\\end{array} \right. $$ Similar to the IRT model, the latent vector $\underline{z}_{ij}$ is modelled via a factor analytic model. The mean of the conditional distribution of $\underline{z}_{ij}$ depends on a respondent specific, $Q$-dimensional, latent trait, $\underline{\theta}_i$, and item specific parameters i.e. $$\underline{z}_{ij}| \underline{\theta}_i \sim \mbox{MVN}_{2}(\underline{\mu}_j + \Lambda_j \underline{\theta}_i, \mathbf{I})$$ where $\mathbf{I}$ denotes the identity matrix. The loadings matrix $\Lambda_{j}$ is a $2 \times Q$ matrix, analogous to the item discrimination parameter in the IRT model of Section \ref{subsec:binSNPs}; likewise, the mean $\underline{\mu}_{j}$ is analogous to the item difficulty parameter in the IRT model. It should be noted that binary data could also be regarded as nominal. The model proposed here is equivalent to the model proposed in Section \ref{subsec:binSNPs} when the number of possible levels is two. \subsection{A factor analysis model for mixed mixed continuous and categorical data} \label{subsec:famixed} The factor analysis model for continuous phenotypic variables, the IRT model for binary SNPs and the factor analysis model for nominal SNPs all have a common structure. These models are combined to produce a unifying model for mixed continuous, binary and nominal data. For each participant $i$ there are $A = 26$ observed continuous phenotypic variables, $B = 371$ latent continuous variables corresponding to the binary SNP variables and $C = 341$ latent continuous vectors corresponding to the nominal SNPs. These are collected together in a single $D$ dimensional vector $\underline{z}_{i}$ where $D = A + B + 2C$. That is, underlying participant $i$'s set of $J = 738 (=A+B+C)$ continuous, binary and nominal variables lies \begin{eqnarray*} \underline{z}_i & = &\left(z_{i1}, \ldots, z_{iA}, z_{i(A+1)} \ldots, z_{i(A+B)}, z_{i(A+B+1)}^1, z_{i(A+B+1)}^2\ldots, z_{iJ}^1, z_{iJ}^{2} \right). \end{eqnarray*} The first $A$ entries of this vector are the observed continuous measurements. The remaining entries are latent data underlying the categorical responses. This vector is then modelled using a factor analytic structure i.e. $$\underline{z}_{i}| \underline{\theta}_i \sim \mbox{MVN}_{D}(\underline{\mu} + \Lambda\underline{\theta}_i, \Psi).$$ The $D \times Q$ dimensional matrix $\Lambda$ is termed the loadings matrix and $\underline{\mu}$ is the mean vector. The entries of the diagonal covariance matrix $\Psi$ are 1 along the diagonal, with the exception of the first $A$ entries which correspond to the continuous variables. This model provides a parsimonious factor analysis model for the high dimensional latent vector $\underline{z}_{i}$ which underlies the observed mixed data. Marginally the latent vector is distributed as $\underline{z}_{i} \sim \mbox{MVN}_{D}(\underline{\mu}, \Lambda \Lambda^{T} + \Psi)$ resulting in a parsimonious covariance structure for $\underline{z}_{i}$. \subsection{A mixture of factor analyzers model for mixed continuous and categorical data} \label{subsec:HybMix} To facilitate clustering, the hybrid model defined in Section \ref{subsec:famixed} is placed within a mixture modeling framework resulting in the extended mixture of factor analyzers model for mixed data (MFA-MD). In the MFA-MD model, clustering occurs at the latent variable level. That is, under the MFA-MD model the distribution of the observed and latent data $\underline{z}_i$ is modeled as a mixture of $G$ Gaussian densities i.e. $$f(\underline{z}_i) = \sum_{g=1}^{G}\pi_g \mbox{MVN}_{D}\left( \underline{\mu}_g, \:\: \Lambda_g \Lambda_g^T +\Psi \right).$$ The probability of belonging to cluster $g$ is denoted by $\pi_g$ ($\sum_{g=1}^{G}\pi_g = 1$, $\pi_g > 0$ $\forall$ $g$). The mean and loadings are cluster specific, while $\Psi$ is equal across clusters for additional parsimony. Constraining the loadings matrices to be equal across clusters, similar in ethos to the mixture of common factor analysers \cite{baek08, baek10}, would offer further parsimony but result in a subtly yet importantly different model. As is standard in a model-based approach to clustering \cite{mclachlan88, fraley98, mclachlan00, celeux00, fraley02}, a latent indicator variable, $\underline{\ell}_i = (\ell_{i1}, \ldots, \ell_{iG})$ is introduced for each participant $i$. This binary vector indicates the cluster to which participant $i$ belongs i.e. $l_{ig} = 1$ if $i$ belongs to cluster $g$; all other entries in the vector are $0$. Under the MFA-MD model for mixed continuous and categorical data, the augmented likelihood function for the $N = 505$ participants is \begin{eqnarray}\nonumber & &\prod_{i=1}^{N} \prod_{g=1}^{G} \left\{ \pi_g \left[ \prod_{j=1}^{A} N(z_{ij} |\tilde{\underline{\lambda}}_{gj}^{T} \tilde{\underline{\theta}}_{i}, \psi_{jj})\right] \right.\\ \nonumber && \left. \times \left[ \prod_{j=A+1}^{B} \prod_{k=0}^{1 }N^{T}(z_{ij} |\tilde{\underline{\lambda}}_{gj}^{T} \tilde{\underline{\theta}}_{i}, 1)^{\mathbb{I} \{y_{ij} = k\}} \right] \right . \\ && \left. \times \left[\prod_{j=A+B+1}^{J} \prod_{k=1}^{2} \prod_{s=0}^{2} N^T(z_{ij}^{k} | \tilde{\underline{\lambda}}_{gj}^{k^{T}} \tilde{\underline{\theta}}_{i}, 1)^{\mathbb{I}(y_{ij}=s)}\right] \right\}^{\ell_{ig}}\label{eqn:like} \end{eqnarray} where $\tilde{\underline{\theta}}_i = (1, \theta_{i1}, \ldots, \theta_{iq})^T$ and $\tilde{\Lambda}_g$ is the matrix resulting from the combination of $\underline{\mu}_g$ and $\Lambda_g$ so that the first column of $\tilde{\Lambda}_g$ is $\underline{\mu}_g$. In the binary part of the model, the Gaussian is truncated between $-\infty$ and 0 if $y_{ij} = 0$, and between 0 and $\infty$ otherwise. In the nominal part of the model, The Gaussian is also truncated, depending on the observed $y_{ij}$ i.e. \begin{itemize} \item If $y_{ij}=0$ then $ \displaystyle \max\{z_{ij}^1, z_{ij}^{2}\} < 0$. \item If $y_{ij}=1$ then $z_{ij}^{1} = \displaystyle \max\{z_{ij}^1, z_{ij}^{2}\}$ and $z_{ij}^{1} > 0$, $z_{ij}^2$ is restricted so that $z_{ij}^2 < z_{ij}^{1}$. \item If $y_{ij}=2$ then $z_{ij}^{2} = \displaystyle \max\{z_{ij}^1, z_{ij}^{2}\}$ and $z_{ij}^{2} > 0$, $z_{ij}^1$ is restricted so that $z_{ij}^1 < z_{ij}^{2}$. \end{itemize} The MFA-MD model proposed here is related to the mixture of factor analyzers model \cite{ghahramani97, mclachlan00} which is appropriate when the observed data are all continuous in nature. A Bayesian treatment of such a model is detailed in \cite{fokoue03}; \cite{mcnicholas08} detail a suite of parsimonious mixture of factor analyzer models. \subsection{Variable selection} \label{subsec:varsel} The LIPGENE-SU.VI.MAX data contain a large number of variables, particularly categorical variables. A variable selection algorithm that removes variables which have no clustering information would ease the computational burden of the model fitting process and also provide substantive interpretation advantages by only retaining variables which discriminate between clusters. A simple but effective online variable selection procedure is incorporated here. For an informative or discriminatory variable, the within cluster variance will be lower than the overall variance for that variable in the data. Variables for which the within cluster and overall variances are similar do not discriminate between clusters and are not interesting in a clustering context. Specifically, for each variable $j$, a variance ratio $VR_{j}$ is computed where \begin{eqnarray} {VR}_j & = & \displaystyle \sum_{g=1}^{G}\sum_{\substack{i=1\\ \forall i \in g}}^{n_g}(z_{ij} - \bar{z}_{gj})^2 / \sum_{i=1}^N(z_{ij} - \bar{z}_j)^2. \label{eqn:vrj} \end{eqnarray} The variance ratio is computed in an online manner in that at an iteration of the model fitting algorithm $n_g$ denotes the number of participants currently classified as members of cluster $g$. In turn, the empirical cluster mean for cluster $g$ and variable $j$ is denoted by $\bar{z}_{gj}$, while the overall mean for variable $j$ is denoted by $\bar{z}_j$. Small values for $VR_j$ indicate that variable $j$ discriminates between clusters while larger values indicate that variable $j$ takes similar values across all clusters and therefore contains no clustering information. A user specified threshold $\varepsilon$ is set such that if $VR_j > \varepsilon$, variable $j$ is dropped from the model and otherwise it is retained. Selection of $\varepsilon$ is application specific and its choice within the LIPGENE-SU.VI.MAX analysis is discussed in Section \ref{sec:results}. The choice of $\epsilon$ can be thought of as the choice of how many variables the model will highlight as discriminatory; $\epsilon$ doesn't have an `optimal' value as is typical of many tuning parameters. Decreasing $\epsilon$ is equivalent to indicating that a more aggressive variable selection is desirable. This variable selection method is shown to perform well in simulation studies, provided in the Supplementary Material. \subsection{Bayesian inference} \label{subsec:ParEst} The Bayesian paradigm is a natural framework for the estimation of latent variable models. Fitting the proposed MFA-MD model in a Bayesian framework requires specification of prior distributions for all parameters. Conjugate prior distributions are employed here. Specifically, $ \tilde{\underline{\lambda}}_{gd} \sim \mbox{MVN}_{(Q+1)}(\underline{\mu}_{\lambda}, \Sigma_{\lambda}), \hspace{0.2cm} \underline{\pi} \sim \mbox{Dir}(\underline{\alpha})$ and $\psi_{jj} \sim \mathcal{G}^{-1}(\beta_1, \beta_2)$. For participant $i$, it is assumed the latent trait $\underline{\theta}_i$ follows a standard multivariate Gaussian distribution while the latent indicator variable $\underline{\ell}_i$ follows a Multinomial$(1, \underline{\pi})$ distribution. Further, conditional on membership of cluster $g$, the latent variable $\underline{z}_{i}| l_{ig} = 1 \sim \mbox{MVN}_{D}(\underline{\mu}_{g}, \Lambda_{g} \Lambda_{g}^{T} + \mathbf{\Psi})$. Combining these latent variable distributions and prior distributions with the augmented likelihood function specified in (\ref{eqn:like}) results in the joint posterior distribution, from which samples of the model parameters and latent variables are drawn using a Gibbs sampling MCMC scheme. Full conditional distributions for the latent variables and model parameters are detailed below; derivations and definitions of the distributional parameters are given in the Supplementary Material. \begin{itemize} \item Allocation vectors: $\underline{\ell}_i|\ldots \sim \mbox{Multinomial}(1,\underline{p})$. \item Mixing proportions: $\underline{\pi} | \ldots \sim \mbox{Dirichlet}(\underline{\delta}_\pi)$. \item Latent traits: $\underline{\theta}_i| \ldots \sim \mbox{MVN}_Q\left( \underline{\mu}_\theta, \Sigma_\theta \right)$. \item Item parameters: $\tilde{\underline{\lambda}}_{gd} | \ldots \sim \mbox{MVN}_{(q+1)} \left(\underline{\zeta}_\lambda, \Omega_\lambda\right)$. \item Error variance parameters: $\psi_{jj} \sim \mathcal{G}^{-1}(b_{1j}, b_{2j})$. \end{itemize} The full conditional distribution for the latent data $\mathbf{z}$ follows a truncated Gaussian distribution. The point of truncation depends on the form of the corresponding variable, the observed response, and the previously sampled values of $\mathbf{z}$ in the MCMC chain. The distributions are truncated to satisfy the conditions detailed in Section \ref{subsec:HybMix}. The latent variable $z_{ij}$ is therefore updated as detailed below. Note that $z_{ij}$ is not sampled for $j = 1, \ldots, A$ as in the case of the continuous variables $y_{ij} = z_{ij}$. \begin{itemize} \item If variable $j$ is binary and $y_{ij}=0$ then $z_{ij}| \ldots \sim N^T\left(\tilde{\underline{\lambda}}_{gj}^T\tilde{\underline{\theta}}_i, 1 \right)$ where the distribution is truncated on the interval $(-\infty, 0)$. The truncation interval is $(0, \infty)$ if $y_{ij}=1$. \item If item $j$ is nominal then $z_{ij}^k | \ldots \sim N^T \left( \tilde{\underline{\lambda}}_{gj}^{k^T}\tilde{\underline{\theta}}_i, 1\right)$ where $\tilde{\underline{\lambda}}_{gj}^k$ is the row of $\tilde{\Lambda}_g$ corresponding to $z_{ij}^k$ and the truncation intervals are defined as follows: \begin{itemize} \item if $y_{ij}=0$ then $z_{ij}^k \in (-\infty,0)$ for $k = 1,2$. \item if $y_{ij}=k$ for $k=1,2$ then: \begin{enumerate} \item $z_{ij}^{k} \in (\tau, \infty)$ where $\tau = \max\left(0, \displaystyle \max_{l \neq k}\{z_{ij}^l\}\right)$. \item for $l \neq k$ then $z_{ij}^{l} \in \left( - \infty, z_{ij}^{k}\right)$. \end{enumerate} \end{itemize} \end{itemize} Note that in the case of $y_{ij} = k \neq 0$, the value $z_{ij}^{l}$ in the evaluation of $\tau$ in step 1 is the previously sampled value in the MCMC chain. The value of $z_{ij}^{k}$ in step 2 is the value sampled in step 1. The variable selection method presented in Section \ref{subsec:varsel} is incorporated into the outlined Gibbs sampler, and thus the proposed MFA-MD model is fitted in three stages: \begin{enumerate} \item \emph{Burn in phase}: In the first phase of the model fitting procedure all variables are included and the Gibbs sampling algorithm is run until convergence. \item \emph{Variable selection phase}: After the burn in phase the algorithm moves into the variable selection phase. Given the current clustering, the variance ratio $VR_j$ is computed for each variable $j$. All variables for which $VR_j$ is greater than $\varepsilon$ are dropped from the model. The algorithm is allowed to burn in again before another variable selection step is performed, with a user specified frequency. The variable selection phase ends when no variables are removed from the model at a number of successive variable selection steps. \item \emph{Posterior sampling phase}: During this phase the Gibbs sampling algorithm proceeds, given the discriminating variables. \end{enumerate} Given its factor analytic roots, the MFA-MD model is not identifiable. Here, the loadings matrices are unconstrained and a Procrustean rotation is employed to solve the problem of their rotational invariance, following ideas in \cite{hoff02}, \cite{handcock07} and as detailed in \cite{mcparland14a}. Further, the well known clustering label switching problem is addressed using a loss function approach as in \cite{stephens00}. \subsection{Model selection via an approximate BIC-MCMC criterion} \label{sec:modelselection} As with any clustering problem, the number $G$ of clusters is unknown. Moreover, in the case of the MFA-MD model, the dimension of the latent trait $Q$ is also unknown. Under a model based approach to clustering, such as that taken here, the use of principled, statistical model selection tools to choose both $G$ and $Q$ are available. Formal likelihood based criteria such as the Bayesian Information Criterion (BIC) \cite{schwarz78, kass95} have been demonstrated to perform well in many general clustering settings (e.g. \cite{fraley02, gormley06}), and also in clustering settings involving latent factor models (e.g. \cite{mcnicholas08}) and variable selection (e.g. \cite{raftery06, houseman2008}). There is also a rich Bayesian literature regarding model evidence; model selection tools based on the marginal likelihood \cite{friel12, fruhwirth06, mcparland13} are a natural approach to general model selection within the Bayesian paradigm, with reversible jump MCMC methods \cite{richardson97} and Markov birth-death methods \cite{stephens00b} popular in the context of clustering. More recently, overfitting approaches to model selection within clustering using Bayesian finite mixtures have gained warranted attention \cite{vanhavre15, malsinerwalli16}. In the context of choosing $Q$ in latent factor models, \cite{lopes04} provide a comprehensive overview of Bayesian model assessment. Such approaches naturally require evaluation of the joint likelihood of the observed continuous and categorical data $Y$ which for the MFA-MD model is intractable as it requires integrating a multidimensional truncated Gaussian distribution, where truncation limits differ and are dependent across the dimensions. These approaches also require the variables in the data to be the same when comparing models. Thus, in order to select the optimal MFA-MD model an approximation of the observed data likelihood is constructed which involves both variables retained and removed during the variable selection steps. Recall that for participant $i$ their observed data consists of $A$ continuous phenotypic variables, $B$ binary SNP variables and $C$ nominal SNP variables collected in $\underline{y}_i = (y_{i1}, \ldots, y_{iJ})$ where $J = A + B + C.$ Denoting the $\ddot{A}$ continuous, $\ddot{B}$ binary and $\ddot{C}$ nominal variables with clustering information collectively as $\underline{\ddot{y}}_{i}$ and the $\dot{A}$ continuous, $\dot{B}$ binary and $\dot{C}$ nominal variables with no clustering information collectively by $\underline{\dot{y}}_{i}$, the contribution to the likelihood function for participant $i$ is approximated as \begin{eqnarray}\nonumber \mathcal{\tilde{L}}_i & = & f(\underline{\ddot{y}}_{i}) f(\underline{\dot{y}}_{i})\\\nonumber & = & \left[ \sum_{g=1}^{G} \pi_g \left\{ \mbox{MVN}_{\ddot{A}}(\mu_g, \Lambda_{g} \Lambda_{g}^{T} + \Psi) \prod_{j=1}^{\ddot{B}+\ddot{C}} P(\ddot{y}_{ij}| i \in g) \right\}\right] \\ & & \times \left[ \mbox{MVN}_{\dot{A}}(\mu, \Lambda \Lambda^{T} + \Psi) \prod_{j=1}^{\dot{B}+\dot{C}} P(\dot{y}_{ij}) \right]. \label{eqn:approxl} \end{eqnarray} That is, independence is first assumed between the set of discriminating and the set of non-clustering variables. Further, for the discriminating variables, conditional independence between the set of $\ddot{A}$ continuous and the set of $\ddot{B}+\ddot{C}$ categorical variables is assumed, and within the set of $\ddot{B}+\ddot{C}$ categorical variables. Additionally, independence between the set of continuous and the set of categorical variables without clustering information is also assumed, and within the set of non-clustering categorical variables. The multivariate Gaussian densities for the continuous variables in (\ref{eqn:approxl}) are straight forward to evaluate; a single Bayesian factor analysis model is fitted to the $\dot{A}$ removed variables. For the categorical variables in (\ref{eqn:approxl}), simple empirical probabilities are calculated from the observed data. For the $\ddot{B}+\ddot{C}$ categorical discriminating variables, these probabilities are the observed response probabilities, within each cluster. For the $\dot{B}+\dot{C}$ non-clustering categorical variables, the probabilities are the observed response probabilities among the $N$ participants. Thus a tractable approximation to the intractable likelihood is available, and can be used to compare models with varying values of $G$ and $Q$, and with varying sets of discriminating variables. This approximated observed likelihood function is incorporated in the BIC-MCMC \cite{fruhwirth11} criterion to perform model selection with the MFA-MD model. Analogous to the traditional BIC, the BIC-MCMC is derived from the largest observed log likelihood value generated across the MCMC draws, penalised for lack of parsimony. In the context of the MFA-MD model the approximate BIC-MCMC is defined as: $$\mbox{BIC-MCMC } = 2 \times \log \mathcal{\tilde{L}} - \nu \times \log(N)$$ where $\mathcal{\tilde{L}} = \prod_{i=1}^{N} \mathcal{\tilde{L}}_{i}$ denotes the largest observed approximate likelihood value across the MCMC draws and $\nu$ denotes the number of parameters in (\ref{eqn:approxl}). Thus for $G = 1, \ldots, G_{\max}$ and $Q = 1, \ldots, Q_{\max}$, the approximate observed likelihood function $\mathcal{\tilde{L}}$ is evaluated at each MCMC iteration, and the largest value used to compute the associated BIC-MCMC. The model with largest BIC-MCMC is chosen as the optimal model. The BIC-MCMC has been shown to perform well in the context of mixture models generally \cite{fruhwirth11}; its performance in combination with the likelihood approximation within the MFA-MD context is also shown to perform well in the simulation studies provided in the Supplementary Material. \section{Results} \label{sec:results} In order to cluster the set of LIPGENE-SU.VI.MAX participants, a number of MFA-MD models with $G=1, \ldots, G_{\max} = 4$ and $Q=1, \ldots, Q_{\max} = 10$ were fitted to the initial mixed phenotypic and genotypic data. The maximum value considered for $G$ was motivated by expert opinion on the expected structure of the set of participants; the maximum value of $Q$ considered was motivated by the observed performance of the $G = 1$ model (see Figure \ref{fig:BICMCMC}), and by run time considerations. The Jeffreys prior, Dirichlet$(0.5, \ldots, 0.5)$, was specified for the mixing proportions $\underline{\pi}$. An inverse gamma prior, with shape and scale parameters of 7, was specified for the $A$ diagonal elements of $\Psi$ corresponding to continuous variables. The mode of this relatively uninformative prior is just less than 1. A zero mean multivariate Gaussian prior was specified for $\tilde{\underline{\lambda}}_{gd}$ with $\Sigma_\lambda = 5\mathbf{I}$, which again is relatively uninformative. Prior sensitivity was assessed by trialling different values of the hyperparameters. The results were relatively insensitive to changes in the hyperparameters for $\underline{\pi}$ and $\tilde{\underline{\lambda}}_{gd}$ but somewhat sensitive to the hyper parameters for $\psi_{jj}$. Sensitivity to these inverse gamma hyperparameter values is a known problem for Bayesian inference of models of this type \cite{gelman06}. For each of the forty models fitted, the \emph{burn in phase} was run for 20,000 iterations and in the \emph{variable selection phase} the variance ratio criterion was computed every 1000 iterations. This period between variable selection steps allowed the MCMC algorithm to `burn in' again after variables have been removed. In the LIPGENE-SU.VI.MAX setting, the variable selection threshold $\varepsilon$ was fixed at $0.95$ for continuous phenotypic variables and at $0.99$ for categorical SNP variables. These thresholds are very conservative so that only the most uninformative variables were removed. The thresholds could be lowered to facilitate a more aggressive variable selection procedure. The model fitting algorithm remained in the \emph{variable selection phase} until no variables were removed from the model for four successive variable selection steps. When this occurred the algorithm moved into the \emph{posterior sampling phase} which was then run for 100,000 iterations, thinned every $100^{th}$ iteration. Convergence of the Markov chains was assessed using trace and auto-correlation plots. Computation times for these models are variable as the speed will depend on how many variables are removed and on both the dimension of the latent trait and the number of clusters fitted to the data. The $G=1$, $Q=1$ model took approximately 11 hours while the $G=4$, $Q=10$ model took approximately 25 hours. It should be noted that no variable selection can be applied if only one cluster is fitted to the data. The optimal model described below took less than 5 hours to fit as only a small number of variables were deemed discriminatory. These timings were measured by fitting the model using one processor of a quad core (2.83GHz) desktop PC with 4GB of RAM. The optimal MFA-MD model was selected using the approximate BIC-MCMC criterion developed in Section \ref{sec:modelselection}. Figure \ref{fig:BICMCMC} illustrates the approximate BIC-MCMC for each of the forty models fitted; the optimal model is indicated to have $G = 2$ clusters and $Q = 8$ latent factors. During fitting of the optimal $G = 2, Q=8$ MFA-MD model, a large number of variables is dropped at the beginning of the \emph{variable selection phase} but as the phase proceeds the model converges on a relatively small number of discriminatory variables. A plot showing the evolution of the number of variables retained during the \emph{variable selection phase} is given in the Supplementary Material. Only 25 of the original 738 variables are retained under the $G = 2, Q = 8$ model. Of those retained, 12 are continuous phenotypic variables, 2 are binary SNP variables and 11 are nominal SNP variables. Notably, in the nearest competing model $G = 2, Q = 9$, a total of 22 variables were retained, 16 of which were the same as those retained in the optimal $G = 2, Q = 8$ model; this pattern was observed in general within models with the same number of groups. Alternative variable selection criteria to (\ref{eqn:vrj}) are possible: the set of 40 models were also fitted using a weighted version of $VR_j$ where each squared difference in the numerator in (\ref{eqn:vrj}) is multiplied by the posterior probability that observation $i$ belongs to cluster $g$ and a `fuzzy' clustering version of the cluster specific means $\bar{z}_{gj}$ is also used. This fuzzy version of $VR_j$ allows observations that are not assigned to a cluster with a high degree of certainty to contribute to the within cluster variances of multiple clusters. In the case of the LIPGENE-SU.VI.MAX study, it was found that this fuzzy version of $VR_j$ had no effect on the optimal models: the same variables were chosen and the same clustering solutions were found, thus giving the same interpretation. Of particular note, in the context of the LIPGENE-SU.VI.MAX study, is that both phenotypic and genotypic variables are deemed to be informative. The reduction from 738 to 25 variables aids the substantive interpretation of the model output significantly and ensures model fitting efficiency. Examination of the cluster specific parameters under the optimal model provides insight to the clustering structure in the set of LIPGENE-SU.VI.MAX participants; posterior inferences from the optimal MFA-MD model are discussed in what follows. \begin{figure}[ht] \centerline{\includegraphics[height=0.5\textheight,width=0.9\textwidth]{BICMCMC.eps}} \caption{The approximate BIC-MCMC for each of the MFA-MD models fitted to the set of LIPGENE-SU.VI.MAX participants. The dashed grey line indicates the largest approximate BIC-MCMC value achieved; the optimal model has two clusters and eight latent dimensions. }\label{fig:BICMCMC} \end{figure} \subsection{Examining the cluster specific parameters for the set of discriminatory variables} The reduced cardinality of the set of variables facilitates interpretation of the substantive differences between the resulting clusters or `sub-phenotypes'. \begin{figure}[htp] \begin{center} \includegraphics[height = 0.5\textheight, width=0.9\textwidth]{CnsMuBoxplots.eps} \caption{Box plots of the MCMC samples of mean parameters in each cluster, for the discriminating continuous phenotypic variables. All variables were standardised prior to analysis. The original units for each variable are detailed in the Supplementary Material.} \label{fig:cnsBox} \end{center} \end{figure} \begin{table} \caption{Empirical posterior probabilities of each retained SNP genotype conditional on cluster membership. Associated uncertainties are all less than 0.01. } \label{tab:PostProb} \centering \begin{subtable}{.5\textwidth} \caption{\emph{ADD1} ({\tt rs17777371})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $CG/CC$ & \\ \hline Cluster 1 & 0.80 & 0.20 & \\ Cluster 2 & 0.91 & 0.09 & \\ \hline \end{tabular} \end{subtable \begin{subtable}{.5\textwidth} \caption{\emph{APOB} ({\tt rs512535})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AA$ & $AG$ \\ \hline Cluster 1 & 0.22 & 0.23 & 0.55 \\ Cluster 2 & 0.30 & 0.23 & 0.47 \\ \hline \end{tabular} \end{subtable \\ \begin{subtable}{.5\textwidth} \caption{\emph{APOL1} ({\tt rs136147})} \centering \begin{tabular}{c|ccc} \hline & $CC$ & $AA$ & $AC$ \\ \hline Cluster 1 & 0.33 & 0.21 & 0.46 \\ Cluster 2 & 0.21 & 0.32 & 0.48 \\ \hline \end{tabular} \end{subtable \begin{subtable}{.5\textwidth} \caption{\emph{CETP} ({\tt rs4784744})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AA$ & $AG$ \\ \hline Cluster 1 & 0.52 & 0.10 & 0.38 \\ Cluster 2 & 0.32 & 0.11 & 0.57 \\ \hline \end{tabular} \end{subtable \\ \begin{subtable}{.5\textwidth} \caption{\emph{FABP1} ({\tt rs2970901})} \centering \begin{tabular}{c|ccc} \hline & $CC$ & $AA$ & $AC$ \\ \hline Cluster 1 & 0.25 & 0.18 & 0.57 \\ Cluster 2 & 0.37 & 0.17 & 0.46 \\ \hline \end{tabular} \end{subtable \begin{subtable}{.5\textwidth} \caption{\emph{GYS1} ({\tt rs2270938})} \centering \begin{tabular}{c|ccc} \hline & $TT$ & $AA$ & $AT$ \\ \hline Cluster 1 & 0.34 & 0.21 & 0.45 \\ Cluster 2 & 0.35 & 0.13 & 0.52 \\ \hline \end{tabular} \end{subtable \\ \begin{subtable}{.5\textwidth} \caption{\emph{INSIG1} ({\tt rs9770068})} \centering \begin{tabular}{c|ccc} \hline & $CC$ & $TT$ & $TC$ \\ \hline Cluster 1 & 0.32 & 0.13 & 0.55 \\ Cluster 2 & 0.35 & 0.20 & 0.45 \\ \hline \end{tabular} \end{subtable \begin{subtable}{.5\textwidth} \caption{\emph{LRP2} ({\tt rs2544377})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AA$ & $AG$ \\ \hline Cluster 1 & 0.48 & 0.11 & 0.41 \\ Cluster 2 & 0.44 & 0.08 & 0.48 \\ \hline \end{tabular} \end{subtable \\ \begin{subtable}{.5\textwidth} \caption{\emph{OLR1} ({\tt rs1050289})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AG/AA$ & \\ \hline Cluster 1 & 0.75 & 0.25 & \\ Cluster 2 & 0.83 & 0.17 & \\ \hline \end{tabular} \end{subtable \begin{subtable}{.5\textwidth} \caption{\emph{SLC25A14} ({\tt rs2235800})} \centering \begin{tabular}{c|ccc} \hline & $TT$ & $AA$ & $AT$ \\ \hline Cluster 1 & 0.38 & 0.35 & 0.26 \\ Cluster 2 & 0.60 & 0.30 & 0.11 \\ \hline \end{tabular} \end{subtable \\ \begin{subtable}{.5\textwidth} \caption{\emph{SLC27A6} ({\tt rs185411})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AA$ & $AG$ \\ \hline Cluster 1 & 0.46 & 0.07 & 0.47 \\ Cluster 2 & 0.47 & 0.16 & 0.37 \\ \end{tabular} \end{subtable \begin{subtable}{.5\textwidth} \caption{\emph{SLC6A14} ({\tt rs2071877})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AA$ & $AG$ \\ \hline Cluster 1 & 0.63 & 0.17 & 0.19 \\ Cluster 2 & 0.70 & 0.23 & 0.08 \\ \hline \end{tabular} \end{subtable \\ \begin{subtable}{.5\textwidth} \caption{\emph{THYN1} ({\tt rs570113})} \centering \begin{tabular}{c|ccc} \hline & $GG$ & $AA$ & $AG$ \\ \hline Cluster 1 & 0.40 & 0.12 & 0.48 \\ Cluster 2 & 0.48 & 0.09 & 0.43 \\ \hline \end{tabular} \end{subtable \end{table} The means of the retained continuous phenotypic variables for each cluster are illustrated in Figure~\ref{fig:cnsBox}. Examination of these posterior parameter estimates provides particular insight to the structure of the two clusters. Cluster 1 appears to be a `healthy' sub-phenotype in that the phenotypic variable means are lower in general in cluster 1 than in cluster 2. It is well known that lower values of such phenotypic variables are typically associated with better health. For example, the mean levels of triglycerides, waist circumference, body mass index (BMI) and systolic and diastolic blood pressure variables (SBP and DBP respectively) are notably lower in cluster 1 than cluster 2. The exception is Apo A-1, the major structural protein of the high density lipoprotein (HDL) particle, low levels of which are a recognised risk factor for cardiovascular disease \cite{wilson98, gordon89}. Apo A-1 levels are usually low when HDL cholesterol levels are reduced, thus it is intuitive that higher Apo A-1 levels are reported in the healthy cluster. Table~\ref{tab:PostProb} details the empirical posterior probability of each genotype across the thirteen retained SNPs, conditional on cluster membership. Clear differences in the distributions between clusters are visible. For example, in both retained binary SNPs {\tt rs17777371} of the \emph{ADD1} gene and {\tt rs1050289} of the \emph{OLR1} gene participants in both clusters are most likely to take the dominant homozygous genotype. However, for both SNPs, cluster 1 is more likely to take the compound recessive homozygous/heterozygous genotype (the second level) than cluster 2. In terms of retained nominal SNPs, the probability distributions between clusters for the {\tt rs4784744} SNP of the \emph{CETP} gene and the {\tt rs2235800} SNP of the \emph{SLC25A14} gene also show some disparities, for example. For the {\tt rs4784744} SNP of the \emph{CETP} gene, participants in cluster 1 are more likely to have the dominant homozygous genotype than those in cluster 2, with those in cluster 2 more likely to have the heterozygous genotype. For the {\tt rs2235800} SNP of the \emph{SLC25A14} gene, 60\% of participants assigned to cluster 2 have the dominant homozygous genotype compared to 38\% of those in cluster 1. The probability distribution is much more evenly spread across the genotypes for participants in cluster 1 than for those in cluster 2. The 13 SNP variables deemed to be discriminatory are also listed in Table~\ref{tab:SNPdetails}, which provides details on characteristics of the discriminating SNPs and the biological pathways to which they are associated. Most of the SNPs deemed to be discriminatory are involved in lipid metabolism, glucose homeostasis or blood pressure regulation. Associations between polymorphisms of a number of genes involved in fatty acid and lipid metabolism, inflammation, appetite control and adiposity with risk of the MetS or its features have previously been identified in the LIPGENE-SU.VI.MAX cohort \cite{phillips12b, phillips12a, phillips11a, phillips10c, phillips10b, phillips10a, phillips10d, phillips09a, phillips09b, phillips09c}; some of these SNPs are also highlighted here, in addition to some novel discoveries. Of particular interest in the current analysis is the \emph{APOB} {\tt rs512535} SNP which has previously been reported to have association with MetS risk \cite{phillips11a}. Apo B is the main apolipoprotein associated with low density lipoprotein and the triglyceride rich lipoproteins \cite{chan92}. Other findings of note are {\tt rs9770068} of the \emph{INSIG1} gene which is involved in cholesterol metabolism \cite{radhakrishnan07} and {\tt rs4784744} of the \emph{CETP} gene which is involved in mediating exchange of lipids between lipoproteins and reverse cholesterol transport \cite{kuivenhoven98}; {\tt rs2544377} of the \emph{LRP2} gene and the {\tt rs1050289} SNP of the \emph{OLR1} gene, both of which are involved in lipid homeostasis \cite{lillis08, sawamura97}; {\tt rs2970901} of the \emph{FABP1} gene and {\tt rs185411} of the \emph{SLC27A6} gene both of which are involved in fatty acid metabolism \cite{pelsers03, auinger12} and {\tt rs17777371} of the \emph{ADD1} gene which is involved in blood pressure regulation \cite{barlassina97}. Examination of the posterior parameter estimates across all discriminating variables suggests that cluster 1 could be termed a `healthy' sub-phenotype and cluster 2 an `at risk' sub-phenotype. Further, some of the phenotypic and SNP variables deemed to be discriminatory appear intuitive, while others are suggestive of potentially interesting relationships for further research. \begin{landscape} \begin{table}[h] \begin{center} \caption{Characteristics of the set of 13 binary and nominal SNP variables deemed to be discriminatory.(Source: NCBI SNP data base \url{http://www.ncbi.nlm.nih.gov/SNP/})} \label{tab:SNPdetails} \begin{tabular}{lllll}\hline \hline Gene & SNP & SNP type & Chromosome & Associated biological\\ &&&& pathway\\\hline \emph{ADD1} &{\tt rs17777371}& Adducin 1 & Flanking\_3UTR & Blood pressure \\ & && chromosome 4 & regulation \\\hline \emph{APOB} & {\tt rs512535} & Apolipoprotein B& Intronic chromosome 2 & Lipid metabolism\\ \hline \emph{APOL1} & {\tt rs136147} & Apolipoprotein L1 & Intronic chromosome 22 & Lipid metabolism\\ \hline \emph{CETP} & {\tt rs4784744} & Cholesterol ester transfer protein & Intronic chromosome 16& Lipid metabolism\\ \hline \emph{FABP1} & {\tt rs2970901} & Fatty acid binding protein 1, & Flanking\_5UTR & Lipid metabolism\\ & & liver & chromosome 2 & \\\hline \emph{GYS1} & {\tt rs2270938} &Glycogen synthase 1& Intronic chromosome 19 & Glucose homeostasis\\ \hline \emph{INSIG1} & {\tt rs9770068} & Insulin Induced Gene 1 & Intronic chromosome 7& Lipid metabolism, \\ &&&&innate immunity. \\ \hline \emph{LRP2} & {\tt rs2544377} & LDL receptor related protein 2 & Intronic chromosome 2 & Lipid metabolism\\ \hline \emph{OLR1} & {\tt rs1050289} & Oxidized low density & 3UTR chromosome 12 &Lipid metabolism \\ && lipoprotein (lectin-like) & &\\ && receptor 1 & &\\\hline \emph{SLC25A14} & {\tt rs2235800} & Solute Carrier Family 25 &Intronic x chromosome & Oxidative \\ & & (Mitochondrial Carrier, Brain), & & phosphorylation\\ && Member 14 or UCP5 & & \\ \hline \emph{SLC27A6} & {\tt rs185411} &Solute Carrier Family 27 &Intronic chromosome 5 & Lipid metabolism\\ & & (Fatty acid transported), member 6 & & \\ \hline \emph{SLC6A14} & {\tt rs2071877} & Solute carrier family 6 & Intronic x chromosome & Amino acid \\ && (amino acid transporter), & & transporter \\ && member 14 & & \\\hline \emph{THYN1} & {\tt rs570113} & Thymocyte nuclear protein 1 &Intronic chromosome 11 &Amino acid \\ & & & & metabolism\\ \hline \end{tabular} \end{center} \end{table} \end{landscape} \subsection{Correspondence between sub-phenotype membership and the seven year follow-up MetS diagnosis} As stated, the data analysed here are an initial set of measurements under the LIPGENE-SU.VI.MAX study. At a seven year follow-up, new continuous phenotypic data on each of the 505 participants were recorded. Each participant was then diagnosed as having the MetS or not based on the criterion in Table~\ref{tab:diagnosis}, which considers continuous phenotypic data only. It is therefore of interest to compare the cluster or sub-phenotype membership of each LIPGENE-SU.VI.MAX participant based on their initial phenotypic and genotypic data to their subsequent MetS diagnosis, seven years later. The cluster or sub-phenotype membership for each participant is obtained by first computing the conditional probability that participant $i$ belongs to each cluster based on the MCMC samples, and a `hard' clustering is then obtained by assigning each participant to the cluster for which they have largest membership probability. Table~\ref{tab:rand} details the cross tabulation of the initial sub-phenotypes and the follow-up MetS diagnosis. It can be seen that traits of the MetS are apparent in the initial data, as the cross-tabulation shows good agreement, with a Rand index of 0.73 (and an adjusted Rand index of 0.46). Notably, Figure \ref{fig:BICMCMC} suggests there are five closely competing models to the optimal $G = 2, Q = 8$ model i.e. the $G = 2, Q = 5, 6, 7, 9, 10$ models. Comparing the resulting clusterings from these models to the follow-up MetS diagnosis results in Rand indices ranging from 0.71 to 0.74 and in adjusted Rand indices ranging from 0.42 to 0.48, suggesting that the models deemed optimal by the BIC-MCMC criterion all indeed have similar performance and perform well. \begin{table}[ht] \caption{Cross tabulation of sub-phenotype membership (based on fitting the MFA-MD model to the initial phenotypic and genotypic data) and MetS diagnosis (based on the diagnosis criterion in Table \ref{tab:diagnosis} on seven year follow up phenotypic data only). The Rand index is 0.73 (adjusted Rand index = 0.46).} \label{tab:rand} \begin{center} \begin{tabular}{llll} &&\multicolumn{2}{c}{Follow up data} \\ && Healthy & MetS \\ \hline \multirow{ 2}{*}{Initial data} & Cluster 1 (`Healthy') & 220 & 42 \\ & Cluster 2 (`At risk') & 39 & 204 \\\hline \end{tabular} \end{center} \end{table} Of further interest is whether the level of correspondence between the sub-phenotypes and the follow-up MetS diagnosis is stronger than that observed between the MetS diagnoses from both time points based on the phenotypic data only. One of the abnormalities required for diagnosis involves HDL cholesterol -- HDL cholesterol data are not available in the initial measurements however. Therefore the current diagnosis criterion in Table~\ref{tab:diagnosis} cannot be applied to the initial data. Hence, participants are diagnosed as MetS cases if they satisfy two or more of the remaining four diagnostic conditions relating to waist circumference, blood pressure, TAG and glucose concentration. Table ~\ref{tab:MetS_t0} details the cross tabulation of the `initial diagnosis' compared to the `follow-up diagnosis' based on the phenotypic data only. Notably, the follow up diagnosis does not change here if it is based on 2 of the 4 available variables rather than on the criterion outlined in Table~\ref{tab:diagnosis}. Table ~\ref{tab:MetS_t0} also suggests that the traits of the MetS are apparent in the initial data, as the MetS diagnoses from the two time points agree well, with a Rand index of 0.69 (adjusted Rand index of 0.38). However, the level of agreement is lower in Table ~\ref{tab:MetS_t0} than that observed in Table~\ref{tab:rand}, highlighting the importance of utilising \emph{both} phenotypic and genotypic factors, and the potential utility of the clustering approach in early screening. \begin{table}[ht] \caption{Cross tabulation of MetS diagnoses from initial and follow up data. The Rand index is 0.69 (adjusted Rand index is 0.38)} \label{tab:MetS_t0} \begin{center} \begin{tabular}{llll} &&\multicolumn{2}{c}{Follow up data} \\ && Healthy & MetS \\ \hline \multirow{ 2}{*}{Initial data} & Healthy & 194 & 31 \\ & MetS & 65 & 215 \\\hline \end{tabular} \end{center} \end{table} Further, to explore the influence of modelling each data type in its innate form, a $k$-means clustering algorithm with $k = 2$ was applied to all the 738 variables, treating all the SNP variable codes as continuous values. Comparing the resulting clustering to the follow up MetS diagnosis gave a Rand index of 0.60 (adjusted Rand index = 0.21). Applying $k$-means clustering (again with $k = 2$) to the set of 25 variables selected as discriminatory under the optimal $G = 2, Q = 8$ model gave a Rand index of 0.68 (adjusted Rand index = 0.37) when compared to the follow-up MetS diagnosis. As noted the MFA-MD model achieved a Rand index of 0.73 (adjusted Rand index = 0.46) highlighting the benefit of modelling the variables in their innate form. Finally, the MFA-MD model outlined above was fitted to only the continuous phenotypic variables from the initial LIPGENE-SU.VI.MAX data. The optimal model, according to the approximate BIC-MCMC, was the $G = 2, Q = 7$ model, which gave a Rand index of 0.50 (adjusted Rand of 0.005) with the follow-up MetS diagnosis. This model under-performs when compared to analysing the phenotypic and genetic data jointly, again highlighting the importance of considering phenotypic and genotypic factors simultaneously with regard to early screening for the MetS. \subsection{Quantifying uncertainty in sub-phenotype membership at the participant level} One of the main advantages of a model-based approach to clustering is the inherent assessment of the uncertainty about cluster membership \cite{bensmail97, gormley06}. In the LIPGENE-SU.VI.MAX context, the model-based approach allows quantification of the probability of sub-phenotype membership for each participant. As stated, the cluster membership for each participant is obtained by first computing the conditional probability that participant $i$ belongs to each cluster based on the MCMC samples, and a `hard' clustering is then obtained by assigning each participant to the cluster for which they have largest membership probability. The uncertainty with which participant $i$ is assigned to its cluster may then be estimated by \[U_i = \min_{g=1,\ldots, G} \{1 - \mathbf{P}(\mbox{cluster } g \ | \ \mbox{participant }i)\}. \] If participant $i$ is strongly associated with cluster $g$ then $U_i$ will be close to zero. Figure \ref{fig:Uncert} illustrates the clustering uncertainties under the optimal MFA-MD model. Figure \ref{fig:UncertB} illustrates the clustering uncertainty for each LIPGENE-SU.VI.MAX participant. The maximum uncertainty observed is 0.496, associated with participant number 445. This participant is clustered with the `healthy' sub-phenotype, but there is high uncertainty associated with this clustering. Examination of this participant's data provides insight to this high clustering uncertainty -- participant 445 has much higher SBP and DBP, and much lower Apo A-1 levels than the mean levels in the `healthy' sub-phenotype. Further, participant 445 differs from the modal genotypes observed in the `healthy' sub-phenotype for SNPs \emph{APOB} ({\tt rs512535}), \emph{FABP1} ({\tt rs2970901}) and \emph{INSIG1} ({\tt rs9770068}). Thus while this participant is clustered with the `healthy' sub-phenotype they have large probability of being `at risk'. Thus, the model-based nature of the MFA-MD approach to clustering provides a global view of the group structure in the LIPGENE-SU.VI.MAX participants, but also provides detailed insight to sub-phenotype membership at the participant level; the ability to define the uncertainty in cluster membership is an important development for the application of the metabotyping concept in precision medicine and nutrition \cite{odonovan16}. Overall, the vast majority of LIPGENE-SU.VI.MAX participants have very small clustering uncertainty, as illustrated by Figure \ref{fig:UncertA}. \begin{figure}[htp] \centering \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.95\linewidth]{UncertaintyB.eps} \caption{} \label{fig:UncertB} \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=0.95\linewidth]{UncertaintyA.eps} \caption{} \label{fig:UncertA} \end{subfigure} \caption{(a) The participant specific clustering uncertainties and (b) the histogram of the clustering uncertainties across all participants, under the optimal MFA-MD model.} \label{fig:Uncert} \end{figure} \subsection{Assessing model fit} In order to assess how well the selected MFA-MD model fits the LIPGENE-SU.VI.MAX data, Bayesian residuals and Bayesian latent residuals are utilised \cite{johnson99, fox10}. For continuous phenotypic variables the Bayesian residual for participant $i$ on variable $j$ is $$\epsilon_{ij} = \left(z_{ij} - \tilde{\underline{\lambda}}_{gj}^T\tilde{\theta}_i\right)/\psi_{jj}.$$ The continuous phenotypic data are observed so this residual may be calculated explicitly by subtracting $\tilde{\underline{\lambda}}_{gj}^T\tilde{\theta}_i$ at each MCMC iteration from $z_{ij}$ and dividing this quantity by $\psi_{jj}$ from that iteration. For a well fitting model, this residual follows a standard Gaussian distribution. However, $z_{ij}$ corresponding to a categorical SNP variable is not observed but sampled during the MCMC scheme. A Bayesian \emph{latent} residual for these variables may be defined as $$\epsilon_{ij} = z_{ij} - \tilde{\underline{\lambda}}_{gj}^T\tilde{\theta}_i.$$ The sampled values of $z_{ij}$, $ \tilde{\underline{\lambda}}_{gj}$ and $\tilde{\theta}_i$ are used to calculate this residual at each MCMC iteration. If the model fits well such residuals should follow a standard Gaussian distribution. For the nominal SNP variables this residual will be multivariate since two latent dimensions are required to model each nominal SNP. The Bayesian residuals and latent residuals follow their theoretical distribution reasonably well for the optimal $G=2$, $Q=8$ MFA-MD model. As an example, Figure~\ref{fig:BLRbin} illustrates kernel density estimates of Bayesian latent residuals corresponding to the \emph{ADD1} ({\tt rs17777371}) SNP for 50 randomly selected participants. The densities are estimated based on the residuals calculated at each MCMC iteration. Curves that do not follow a standard Gaussian distribution correspond to participants whose genotype was unusual given the cluster to which they were assigned. Kernel density estimate plots for other Bayesian residuals and Bayesian latent residuals are provided in the Supplementary Material. \begin{figure}[ht] \centerline{ \includegraphics[height = 0.4\textheight, width=0.7\textwidth]{BLRadd1_notitle.eps}} \caption{Density estimates of the Bayesian latent residuals for the {\tt rs17777371} SNP of the \emph{ADD1} gene for 50 randomly selected participants. The standard Gaussian density curve is shown by the black dashed line.}\label{fig:BLRbin} \end{figure} \section{Discussion} \label{sec:discussion} The primary focus of the pan European LIPGENE-SU.VI.MAX project is to study the interaction of nutrients and genotype in the metabolic syndrome. Data collected under LIPGENE-SU.VI.MAX are high dimensional and of mixed type, and interest lies in exploring the set of LIPGENE-SU.VI.MAX participants to uncover subgroups with homogeneous phenotypic and genotypic profiles. Examining the link between the resulting clusters and seven-year follow-up MetS diagnosis aids understanding of the role of both phenotypic and genotypic factors in the MetS and provides the opportunity to identify subjects at risk. A clustering method that takes account of different data types and models each one appropriately is therefore necessary. While factor analytic methods for data of mixed type and latent factor based clustering methods have already been well developed, the proposed MFA-MD methodology contributes a number of novel advances to the area: \begin{itemize} \item the MFA-MD model provides a single, unifying and elegant model for data which notably includes any combination of continuous, binary or nominal response variables. \item the MFA-MD approach models nominal response variables in their innate form, rather than requiring a dummy variable representation as is typically necessary in other approaches to clustering nominal response variables. \item the variable selection approach permits high dimensional data to be feasibly and efficiently handled, which is theoretically possible but practically challenging for some latent factor models. \item the model based approach to clustering and the novel likelihood function approximation facilitates the use of an objective model selection criterion to select the optimal number of clusters and factors rather than relying on subjective heuristic tools. \end{itemize} The MFA-MD approach proposed here jointly and elegantly models continuous phenotypic, binary SNP and nominal SNP data, while providing clustering facilities. The suitability of the MFA-MD model for this task is due to its basis in and the relations between a factor analysis model for continuous data, item response theory for binary data and multinomial probit models for nominal data. Further, the parsimonious factor analysis covariance structure is ideal for modelling such high dimensional data. Most of the large number of LIPGENE-SU.VI.MAX data set variables have little to offer in terms of clustering information; a simple and efficient variable selection algorithm is intertwined with the MFA-MD fitting process, thereby highlighting variables that contribute clustering information. This greatly simplifies the task of interpreting the clusters substantively. A key aspect of the proposed approach to variable selection is that variables are removed from the model online, thus dramatically reducing the computational burden of fitting the MFA-MD model to high-dimensional data. Several penalisation based variable selection approaches have previously been proposed for latent factor clustering models, for example in \cite{pan2007, galimberti2009, xie2010}; these only consider continuous data in a maximum likelihood framework however. The fact that non-discriminating variables are removed from the MFA-MD model rather than shrinking their associated parameters to zero (meaning all variables are still included in the modelling procedure) ensures the dramatic increase in computational efficiency of the proposed approach. As with any clustering problem, of key interest is inferring the number of clusters present in the set of LIPGENE-SU.VI.MAX participants. Standard information criteria approaches in a model based clustering setting involve the evaluation of the observed likelihood function and are not feasible under the MFA-MD model -- it employs latent variables and evaluation of the observed likelihood function relies on intractable multidimensional integrals. Here an approximation of the observed data likelihood is constructed, and employed in the BIC-MCMC criterion to select both the number of clusters and the dimension of the underlying latent factors in the MFA-MD model. Simulation studies suggest the approximate model selection criterion exhibits desirable performance, as does the variable selection approach taken. When applied to the initial mixed phenotypic and genotypic LIPGENE-SU.VI.MAX data, the MFA-MD model uncovers two clusters or `sub-phenotypes' of participants; exploration of the cluster specific parameters suggests one cluster is a `healthy' sub-phenotype and the other an `at risk' sub-phenotype. Both phenotypic and genotypic variables are identified as discriminatory; some are novel discoveries and are indicative of further directions of research. Further, when comparing the resulting clusters to the MetS diagnosis seven years later, the proposed approach out-performs both the use of the standard MetS diagnosis criterion, and the result when clustering using the continuous phenotypic data only, thus emphasising the importance of jointly considering both phenotypic and genotypic profiles when screening for MetS. The proposed MFA-MD approach to clustering provides a global view of the group structure in the set of LIPGENE-SU.VI.MAX participants, but also provides detailed insight to sub-phenotype membership at the participant level, synonymous with the concepts of precision medicine and nutrition. The developed methodology has wide applicability beyond the LIPGENE-SU.VI.MAX study, in any setting seeking to uncover subgroups in a cohort on which high dimensional data of mixed type have been recorded. There are many potential areas of future research for the MFA-MD methodology proposed here. Covariate data such as ethnicity and gender are potentially important when studying MetS, and are currently involved in some of the varying MetS diagnosis criteria \cite{alberti05, alberti06}. Incorporating such covariate information in the MFA-MD model could provide understanding of cause-effect relationships in the clustering context. Such information could be incorporated into the MFA-MD model in a mixture of experts framework \cite{jacobs91,gormley08}. Within the LIPGENE-SU.VI.MAX cohort a large number of participants were removed from the original data set prior to analysis due to the presence of missing data. To ensure generalisability of the proposed approach it would be advantageous to address such missingness in a more elegant manner. The latent variable and Bayesian origins of the developed model and methodology would allow missing data to be treated as latent variables that can be naturally imputed as part of the MCMC inferential sampling scheme. Such missing data would be required to be missing at random, which was deemed not to be the case in the LIPGENE-SU.VI.MAX cohort. The approximate model selection criterion developed demonstrated good performance but can be computationally expensive to compute and other approaches have potential merit. Non-parametric approaches to clustering such as the Dirichlet process (or infinite) mixture model \cite{teh10} provide an alternative to the finite mixture approach taken here, and do not require a model selection tool to choose $G$. However, in the case of MFA-MD the value of $Q$ still requires inference; considering an infinite factor model \cite{bhattacharya11} would again avoid the need for a model selection criterion for $Q$, and allow the latent factor dimension to vary across clusters, in a similar manner to that considered in \cite{murphy17}. Such approaches may provide computationally cheaper ways to find the optimal values of $G$ and $Q$ without requiring an expensive grid search. Considering more parsimonious versions of the model \cite{mcnicholas08} would increase modelling flexibility, as would extending the model to include other data types, such as count data, for example. Including such further complexity in the MFA-MD methodology would serve to increase the computational cost of model fitting which, even with the efficiency inducing variable selection procedure, is still somewhat onerous. A variational Bayes approach to estimation of the MFA-MD model \cite{ghahramani99} may have potential in terms of feasibly implementing the model at increased scale and complexity, and may also aid some of the intractable likelihood difficulties. Further, exploring other latent variable representations, for nominal variables in particular, may be fruitful in terms of achieving parsimony and computational efficiency. \section*{Acknowledgements} The authors would like to acknowledge the members of the Working Group on Statistical Learning at University College Dublin and the members of the Working Group on Model-based Clustering at the University of Washington for numerous discussions that contributed enormously to this work. The authors would also like to acknowledge the LIPGENE-SU.VI.MAX cohort as the source of these data (FOOD-CT-2003-505944), our cohort co-investigators Serge Hercberg, Denis Larion, Richard Planells, Sandrine Bertrais and Emmanuelle Kesse-Guyot; as well as the LIPGENE-SU.VI.MAX participants. Finally, the authors would like to thank the reviewers and editors who added considerably to this work through their thorough and thought provoking reviews. The authors acknowledge LIPGENE-SU.VI.MAX subjects and investigators, funded by European Commission FP6 (FOOD-CT-2003-505944). ICG was supported by Science Foundation Ireland (SFI/09/RFP/MTH2367) and the Insight Research Centre (SFI/12/RC/2289). DMcP was supported by Science Foundation Ireland (SFI/09/RFP/MTH2367). LB was supported by Science Foundation Ireland (SFI/14/JPI\_HDHL/B3075). HMR was supported by Science Foundation Ireland (SFI/PI/11/1119).
{'timestamp': '2018-05-25T02:09:36', 'yymm': '1606', 'arxiv_id': '1606.05107', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05107'}
arxiv
\section{Introduction} Scientists in diverse areas, such as statistics, epidemiology and economics, aim to unveil relationships within variables from collected data. This process can be seen as the task of reconstructing a graph (i.e., finding the hidden edges of a graph) by asking queries to an oracle. In this graph, each vertex is a variable, and each edge denotes the relationship between two variables. For instance, in cancer research, biologists try to discover the causal relationships between genes. By providing a specific treatment to a particular gene (origin), biologists can observe whether there is an effect in another gene (target). This effect can be either direct (if the two genes are connected with a directed edge) or indirect (if there is a directed path from the origin to the target gene.) In the above example, we can think of nature as the oracle that is answering whether there is a directed path from an origin to a target node. Arguably, the cost of asking queries is very high in several application domains. Thus, we are interested on the reconstruction of graphs that do not require the trivial $n^2$ queries for $n$ nodes (i.e., one query for every possible pair of nodes.) Prior work on reconstructing graphs has exclusively focused on \emph{undirected} graphs. In~\cite{Hein89}, a $\O(dn\log n)$ algorithm was provided for recovering undirected trees of $n$ nodes and maximum node degree $d$, by using queries that return the path length between two given nodes. Authors of~\cite{Beerliova06} provide a $\O(dn)$ algorithm for reconstructing undirected trees of $n$ nodes and maximum node degree $d$, and for a query that returns the distance from a given node to every other node. The results in~\cite{Alon04,Alon04b,Angluin04} pertain to queries that answer whether there exists at least one edge between a given set of nodes. While~\cite{Alon04,Alon04b} focused on matchings and stars, the work of~\cite{Angluin04} provides a $\O(m\log n)$ algorithm for undirected graphs of $n$ nodes and $m$ edges. The results in~\cite{Grebinski00,Reyzin07} pertain to queries that return the number of edges between a given set of nodes. A $\O(dn)$ algorithm was provided in~\cite{Grebinski00} for undirected graphs of $n$ nodes and maximum node degree $d$, while a $\O(m\log n)$ algorithm was given in~\cite{Reyzin07} for undirected graphs of $n$ nodes and $m$ edges. Other works have focused on the recovery of \emph{weighted} undirected graphs. The work of~\cite{Culberson89} provides a $O(dn\log n)$ algorithm for recovering \emph{weighted} undirected trees of $n$ nodes and maximum node degree $d$, by using queries that return the sum of edge weights on the path between two given nodes. The work of~\cite{Choi13,Mazzawi10} pertains to the reconstruction of \emph{weighted} undirected graphs of $n$ nodes and $m$ edges. A $\O(m\log n)$ algorithm was provided for a query that gives the sum of edge weights between a given set of nodes. The closest work to ours is~\cite{Jagadish13}, which provides a $\O(dn\log^2 n)$ randomized algorithm for \emph{undirected} trees of $n$ nodes and maximum node degree $d$, and for \emph{separator queries}. A separator query takes three nodes $i$, $k$, $j$ as input, and answers whether $k$ is on the \emph{undirected} path between $i$ and $j$. In contrast, our work pertains to \emph{directed rooted} trees. Furthermore, we use a different type of query which we call \emph{path query}. A path query takes an ordered pair of nodes $i$, $j$ as input, and answers whether there exists a directed path from $i$ to $j$. We provide a randomized algorithm for reconstructing directed rooted trees of $n$ nodes and node degree at most $d$, in $\O(dn\log^2 n)$ time. To the best of our knowledge, there is no simple reduction to transform our problem to the problem of~\cite{Jagadish13} or any of the above mentioned literature. Our algorithm relies on the \emph{divide and conquer} approach, the use of \emph{even separators}~\cite{Chung90} and sorting. Regarding lower bounds, we show that any randomized algorithm requires at least $\Omega(n\log n)$ queries, while any deterministic algorithm requires at least $\Omega(dn)$ queries. We also present a $\O(dn\log^3 n)$ randomized algorithm for a \emph{noisy} regime, in which the bit that represents the oracle's answer gets flipped with some probability, by an adversary, before it is revealed to the algorithm. Furthermore, we present a $\O(dn\log^2 n)$ randomized algorithm for reconstructing weighted trees by using \emph{additive} queries that return the sum of the edge weights on the directed path between two given nodes. We finish the paper by showing some negative results that provide some motivation for our assumptions. We show that any deterministic or randomized algorithm requires at least $\Omega(n^2)$ queries in order to recover more general directed acyclic graphs. We also show that any deterministic algorithm requires at least $\Omega(n^2)$ queries for recovering a family of sparse disconnected graphs, as well as a family of sparse connected graphs. \section{Preliminaries} \label{sec:prelims} In this section, we provide several formal definitions which will be useful later for the detailed description of our algorithm. For clarity, we also provide some preliminary introduction to the main aspects of our algorithm. Let $G=(V,E)$ be a directed acyclic graph with vertex set $V$ and edge set $E$. For clarity, when $G$ is a directed rooted tree, we will use $T$ instead of $G$. In this paper, we assume that $T$ has $n$ nodes, i.e., $|V|=n$. Furthermore, we also assume that the node degree is at most $d$. (In a directed acyclic graph, the node degree is the sum of the indegree and the outdegree of the node.) Recall that a path in $G$ from node $i$ to node $j$ (both in $V$) is a sequence of nodes $i, x_1, x_2, \dots x_k, j$ such that $\{(i, x_1), (x_1, x_2), \dots (x_{k-1}, x_k), (x_k, j)\}$ is a subset of the edge set $E$. Our algorithm reconstructs a directed rooted tree, by using \emph{path queries}. Next, we formally define path queries. \begin{definition} \label{def:query} Let $G=(V,E)$ be a directed acyclic graph. A \emph{path query} is a function $Q_G : V \times V \to \{0,1\}$ such that $Q_G(i, j) = 1$ if there exists a path in $G$ from $i$ to $j$, and $Q_G(i, j) = 0$ otherwise. \end{definition} Note that the above query only reveals a single bit of information, and it does not provide any information regarding the length of the path, thus making graph reconstruction a nontrivial task. In this paper, we assume that the node set $V$ is known, while edge set $E$ is unknown. Our main problem is indeed to reconstruct $E$ by using path queries. We will use $Q(i,j)$ to denote $Q_T(i,j)$ since for our problem, the directed rooted tree $T$ is fixed (but unknown). \begin{figure} \begin{center} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \node[mdpvertex][label=center:$1$](x0) at (1,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[mdpvertex][label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][label=center:$6$](x5) at (0.675,0) {}; \node[vertex][label=center:$7$](x6) at (1.325,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x5) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x8)(x2) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={->, red}} \Edge(x1)(x0) \Edge(x2)(x1) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \hspace{0.4in} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \node[mdpvertex][label=center:$1$](x0) at (1,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[mdpvertex][label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][label=center:$6$](x5) at (0.675,0) {}; \node[vertex][label=center:$7$](x6) at (1.325,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \Edge(x0)(x5) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x8)(x2) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={red}} \Edge(x1)(x0) \Edge(x2)(x1) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \\ \vspace{-0.2in}\makebox[1.7in]{}\makebox[0.4in]{(a)}\hspace{0.4in}\makebox[1.7in]{}\makebox[0.4in]{(b)} \end{center} \vspace{-0.25in} \caption{(a) A directed rooted tree with \emph{multidirectional path} of nodes $1, 2, 3, 4, 5$. Nodes and edges in the multidirectional path are shown in red. (b) Skeleton graph of the directed rooted tree on the left, with path of nodes $1, 2, 3, 4, 5$. Nodes and edges in the path are shown in red.} \label{fig:multidirpath} \end{figure} A key step in our algorithm is the recovery of what we call \emph{multidirectional paths}. A multidirectional path consists of the \emph{directed} edges associated to an \emph{undirected} path in the skeleton graph (i.e., the graph obtained by replacing each directed edge with an undirected edge in the original graph.) Figure~\ref{fig:multidirpath} provides a visual illustration for intuitive understanding. Next, we formally define multidirectional paths. \begin{definition} Let $G=(V,E)$ be a directed acyclic graph. A \emph{multidirectional path} of $G$ between $i$ and $j$ is a sequence of nodes $i, x_1, x_2, \dots , x_{k-1}, x_k, j$ such that each node in $V$ appears at most once in the sequence, and that there is an edge on either direction between each pair of adjacent nodes in the sequence. That is, either $(i, x_1) \in E$ or $(x_1, i) \in E$, either $(x_1, x_2) \in E$ or $(x_2, x_1) \in E$, $\dots$ either $(x_{k-1}, x_k) \in E$ or $(x_k, x_{k-1}) \in E$, and either $(x_k, j) \in E$ or $(j, x_k) \in E$. \end{definition} Next, we show that for directed rooted trees, a multidirectional path between any two arbitrary nodes always exists and is unique. More importantly, we show that a \emph{multidirectional} path is either a \emph{directed} path, or two \emph{directed} paths that share the same origin (i.e., the \emph{lowest common ancestor}.) Later, we leverage this property for recovering multidirectional paths. \begin{lemma} \label{lem:multidirpathfortrees} Let $T=(V,E)$ be a directed rooted tree. Given any two arbitrary nodes $i$ and $j$, a multidirectional path of $T$ between $i$ and $j$ always exists and is unique. Furthermore, a multidirectional path of $T$ between $i$ and $j$, is either a path from $i$ to $j$, or a path from $j$ to $i$, or two paths (one from $k$ to $i$, and one from $k$ to $j$, for some $k \in V - \{i,j\}$.) In this case, node $k$ is the \emph{lowest common ancestor} of $i$ and $j$. \end{lemma} (See Appendix~\ref{sec:detailedproofs} for detailed proofs.) \vspace{0.1in} \begin{figure} \begin{center} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{bag}=[color=blue!50, fill=blue!5, thick] \filldraw[bag] (0.3,-0.5)rectangle (2.45,1.5); \filldraw[bag] (2.6,-1.5)rectangle (5.4,1.5); \node[mdpvertex][label=center:$1$](x0) at (1,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[mdpvertex][label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][label=center:$6$](x5) at (0.675,0) {}; \node[vertex][label=center:$7$](x6) at (1.325,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x5) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x8)(x2) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={->, red}} \Edge(x1)(x0) \Edge(x2)(x1) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \end{center} \vspace{-0.25in} \caption{A directed rooted tree with multidirectional path of nodes $1, 2, 3, 4, 5$. Nodes and edges in the multidirectional path are shown in red. The edge $(2,3)$ in the multidirectional path is an \emph{even separator}. Our algorithm will recursively recover each of the two generated subtrees (shown as blue boxes.)} \label{fig:evenseparator} \end{figure} Our algorithm relies on the divide and conquer approach. In order to apply the above approach in our problem, it is important to introduce the concepts of \emph{even separators} and \emph{bags}. Next, we introduce even separators. \begin{definition} \label{def:evenseparator} Let $T=(V,E)$ be a directed rooted tree of bounded degree $d$ and let $n=|V|$. An \emph{even separator} of $T$ is an edge $e \in E$ that when removed from $T$, divides $T$ into two subtrees $T_1$ and $T_2$, where each of the subtrees have a number of nodes between $n/d$ and $(d-1)n/d$. \end{definition} The existence of even separators is pivotal for using divide and conquer in our problem. Corollary 2.3 in~\cite{Chung90} shows that if a graph is a bounded-degree directed tree, then an even separator exists. For our graph reconstruction problem, once the even separator is identified, we cut the tree through the even separator. This operation splits the tree into two subtrees. We then recursively call the algorithm for both subtrees. We illustrate this in Figure~\ref{fig:evenseparator}. While even separators exist~\cite{Chung90}, it remains to know whether they can be efficiently found. We show later that (on average) there is an even separator \emph{in the multidirectional path} between two nodes chosen independently and uniformly at random (See Theorem~\ref{thm:complexity}.) \begin{figure} \begin{center} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{lcavertex}=[circle, fill=red!70, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{bag}=[color=blue!50, fill=blue!5, thick] \filldraw[bag] (0,-0.5)rectangle (1.4,1.5); \filldraw[bag] (1.55,-0.5)rectangle (2.4,1.5); \filldraw[bag] (2.55,-1.5)rectangle (3.4,1.5); \filldraw[bag] (3.55,0.5)rectangle (4.4,1.5); \filldraw[bag] (4.55,-0.5)rectangle (5.4,1.5); \node[lcavertex][minimum size=16 pt, double=black, double distance=1.5pt, label=center:$1$](x0) at (0.7,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[mdpvertex][label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][label=center:$6$](x5) at (0.375,0) {}; \node[vertex][label=center:$7$](x6) at (1.025,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x5) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x2)(x8) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={->, red}} \Edge(x0)(x1) \Edge(x1)(x2) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \hspace{0.4in} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{lcavertex}=[circle, fill=red!70, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{bag}=[color=blue!50, fill=blue!5, thick] \filldraw[bag] (0,-0.5)rectangle (1.4,1.5); \filldraw[bag] (1.55,-0.5)rectangle (2.45,1.5); \filldraw[bag] (2.6,-1.5)rectangle (3.4,1.5); \filldraw[bag] (3.55,0.5)rectangle (4.4,1.5); \filldraw[bag] (4.55,-0.5)rectangle (5.4,1.5); \node[mdpvertex][label=center:$1$](x0) at (0.7,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[lcavertex][minimum size=16 pt, double=black, double distance=1.5pt, label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][label=center:$6$](x5) at (0.375,0) {}; \node[vertex][label=center:$7$](x6) at (1.025,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x5) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x2)(x8) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={->, red}} \Edge(x1)(x0) \Edge(x2)(x1) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \\ \vspace{-0.2in}\makebox[1.85in]{}\makebox[0.4in]{(a)}\hspace{0.4in}\makebox[1.85in]{}\makebox[0.4in]{(b)}\vspace{0.1in} \\ \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{lcavertex}=[circle, fill=red!70, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{bag}=[color=blue!50, fill=blue!5, thick] \filldraw[bag] (0,-0.5)rectangle (1.4,1.5); \filldraw[bag] (1.55,-0.5)rectangle (2.4,1.5); \filldraw[bag] (2.55,-1.5)rectangle (3.4,1.5); \filldraw[bag] (3.55,0.5)rectangle (4.4,1.5); \filldraw[bag] (4.55,-0.5)rectangle (5.4,1.5); \node[lcavertex][label=center:$1$](x0) at (0.7,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[mdpvertex][label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][minimum size=16 pt, double=black, double distance=1.5pt, label=center:$6$](x5) at (0.375,0) {}; \node[vertex][label=center:$7$](x6) at (1.025,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x5)(x0) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x2)(x8) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={->, red}} \Edge(x0)(x1) \Edge(x1)(x2) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \hspace{0.4in} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{mdpvertex}=[circle, fill=red!20, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{lcavertex}=[circle, fill=red!70, draw, inner sep=0pt, minimum size=15pt] \tikzstyle{bag}=[color=blue!50, fill=blue!5, thick] \filldraw[bag] (0,-0.5)rectangle (1.4,1.5); \filldraw[bag] (1.55,-0.5)rectangle (2.45,1.5); \filldraw[bag] (2.6,-1.5)rectangle (3.4,1.5); \filldraw[bag] (3.55,0.5)rectangle (4.4,1.5); \filldraw[bag] (4.55,-0.5)rectangle (5.4,1.5); \node[mdpvertex][label=center:$1$](x0) at (0.7,1) {}; \node[mdpvertex][label=center:$2$](x1) at (2,1) {}; \node[lcavertex][label=center:$3$](x2) at (3,1) {}; \node[mdpvertex][label=center:$4$](x3) at (4,1) {}; \node[mdpvertex][label=center:$5$](x4) at (5,1) {}; \node[vertex][label=center:$6$](x5) at (0.375,0) {}; \node[vertex][label=center:$7$](x6) at (1.025,0) {}; \node[vertex][label=center:$8$](x7) at (2,0) {}; \node[vertex][minimum size=16 pt, double=black, double distance=1.5pt, label=center:$9$](x8) at (3,0) {}; \node[vertex][label=center:$10$](x9) at (3,-1) {}; \node[vertex][label=center:$11$](x10) at (5,0) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x5) \Edge(x0)(x6) \Edge(x1)(x7) \Edge(x8)(x2) \Edge(x8)(x9) \Edge(x4)(x10) \tikzset{EdgeStyle/.style={->, red}} \Edge(x1)(x0) \Edge(x2)(x1) \Edge(x2)(x3) \Edge(x3)(x4) \end{tikzpicture} \\ \vspace{-0.2in}\makebox[1.85in]{}\makebox[0.4in]{(c)}\hspace{0.4in}\makebox[1.85in]{}\makebox[0.4in]{(d)} \end{center} \vspace{-0.25in} \caption{Four different directed rooted trees, and their \emph{bags} with respect to the multidirectional path of nodes $1, 2, 3, 4, 5$. Nodes and edges in the multidirectional path are shown in red. The lowest common ancestor of nodes $1$ and $5$ in the multidirectional path is shown in darker red. A tree root is shown as a thick circle. Bags are shown as blue boxes. Note that a multidirectional path can be a path (a,c) or two paths (b,d). The root can be in the multidirectional path (a,b). Otherwise, the root can be an ancestor of a node in the multidirectional path (c,d).} \label{fig:bag} \end{figure} In what follows, we formally define \emph{bags}, which are also important for the divide and conquer approach taken here. \begin{definition} \label{def:bag} Let $T=(V,E)$ be a directed rooted tree, and $S$ be the set of edges in a multidirectional path of $T$. Define $T_S=(V, E - S)$ as the subgraph of $T$ after we remove all edges in $S$. A \emph{bag} with respect to a node $i$ in a multidirectional path with edges $S$, is a subset of nodes in $V$ that contains $i$ and all the nodes that are reachable from $i$ in the (undirected) skeleton graph of $T_S$. \end{definition} Intuitively speaking, we can think of edges in a tree as ``ropes''. If we ``nail'' all nodes of a multidirectional path into the ``wall'', then all other nodes will ``hang'' from one of the nodes in the path. Nodes that hang from the same particular node belong to the same bag. We include a visual example in Figure~\ref{fig:bag}. In our algorithm, we recover \emph{exactly} all the directed edges \emph{in a multidirectional path}. Bags are used to count the number of nodes associated to each node in the multidirectional path (without the need to recover all the directed edges.) For each edge in the multidirectional path, one can then count the number of nodes on the two subtrees that would be generated if we were to cut the tree through the given edge. This process is used for identifying even separators. Finally, our algorithm also performs sorting of nodes with a properly defined order relation, which is used for instance in the recovery of the directed edges in multidirectional paths. \begin{definition} \label{def:orderrelation} Define the order relation of two nodes $i$ and $j$ as follows. If $Q(i, j) = 1$ we say that $i$ is ``less than'' $j$, and ``greater than'' otherwise. \end{definition} \section{Algorithm} \label{sec:algorithm} In this section, we present our randomized algorithm and analyze its time complexity. Our algorithm is similar in spirit to~\cite{Jagadish13} which applies to \emph{undirected} trees and \emph{separator queries}. In this paper, we focus on \emph{directed rooted} trees and \emph{path queries}. We remind the reader that path queries only reveal a single bit of information, and they do not provide any information regarding the length of the path. (We discuss noisy and additive extensions in Section~\ref{sec:extensions}.) \begin{figure*} \vspace{-0.25in} \begin{center} \begin{tikzpicture}[scale=1.0] \tikzstyle{mainalgo}=[rectangle, fill=red!20, draw, inner sep=2pt, minimum height=30pt] \tikzstyle{subroutine}=[rectangle, fill=white, draw, inner sep=2pt, minimum height=30pt] \node[mainalgo][minimum width=135pt, text width=130pt, align=center](reconstructtree) at (5.5,4.1) {Alg.~\ref{alg:reconstructtree}: Reconstruct tree\\$\O(dn\log^2 n)$}; \node[subroutine][minimum width=215pt, text width=210pt, align=center](findmultidirpath) at (0.7,2.5) {Alg.~\ref{alg:findmultidirpath}: Reconstruct multidirectional path\\$\O(n\log n)$}; \node[subroutine][minimum width=95pt, text width=90pt, align=center](findbag) at (6.8,2.5) {Alg.~\ref{alg:findbag}: Find bag\\$\O(\log n)$}; \node[subroutine][minimum width=95pt, text width=90pt, align=center](splittree) at (10.9,2.5) {Alg.~\ref{alg:splittree}: Split tree\\$\O(n)$}; \node[subroutine][minimum width=195pt, text width=190pt, align=center](findcommonancestor) at (0.7,0.5) {Alg.~\ref{alg:findcommonancestor}: Find lowest common ancestor\\$\O(n\log n)$}; \node[subroutine][minimum width=150pt, text width=145pt, align=center](findroot) at (8.9,0.5) {Alg.~\ref{alg:findroot}: Find path from root\\$\O(n\log n)$}; \tikzset{EdgeStyle/.style={->}} \Edge(reconstructtree)(findmultidirpath) \Edge(reconstructtree)(findbag) \Edge(reconstructtree)(splittree) \Edge[label=if multidirectional path consists of two paths, labelstyle=right](findmultidirpath)(findcommonancestor) \Edge(findcommonancestor)(findroot) \path[->, thick] (reconstructtree) edge [loop left] node {} (); \end{tikzpicture} \end{center} \vspace{-0.25in} \caption{Main algorithm (in red), subroutines, and their time complexity.} \label{fig:algorithm} \end{figure*} In what follows, we explain our divide and conquer approach in our main Algorithm~\ref{alg:reconstructtree}. A high-level overview is shown in Figure~\ref{fig:algorithm}. (See Appendix~\ref{sec:detailedalgorithms} for detailed algorithms.) First, we randomly pick two nodes and recover the sequence of nodes in the \emph{multidirectional path} between those two randomly chosen nodes (Algorithm~\ref{alg:findmultidirpath}.) Then, we divide the rest of the nodes (not in the multidirectional path) into \emph{bags} defined by the multidirectional path (Algorithm~\ref{alg:findbag}.) Later, we count the number of nodes on each bag, and determine if there exists an even separator in the multidirectional path. We repeat the whole procedure (i.e., from choosing a new pair of random nodes) until we find an even separator. Finally, we cut the tree through the even separator, thus effectively splitting the tree into two subtrees (Algorithm~\ref{alg:splittree}.) We then recursively call our Algorithm~\ref{alg:reconstructtree} for both subtrees (until the input tree contains a single node.) On a more technical side, reconstructing a multidirectional path that consists of two paths that share the same origin, is more involved than reconstructing single paths. The former requires finding the lowest common ancestor of the two randomly chosen nodes (Algorithm~\ref{alg:findcommonancestor}) as well as finding the root of the tree (Algorithm~\ref{alg:findroot}.) In our main Algorithm~\ref{alg:reconstructtree}, finding out the bag of a particular node with respect to a \emph{directed} path is relatively easier than with respect to a \emph{multidirectional} path. Note that by Lemma~\ref{lem:multidirpathfortrees}, a \emph{multidirectional} path is either a \emph{directed} path, or two \emph{directed} paths that share the same origin (i.e., the lowest common ancestor.) In Algorithm~\ref{alg:reconstructtree}, we simplify the bag assignment task, by splitting a \emph{multidirected} path (that is not a single path) into its two constituent \emph{directed} paths. The algorithm first recovers the lowest common ancestor, and then breaks the multidirectional path into two paths. For instance, the multidirectional path $1,2,3,4,5$ in Figure~\ref{fig:bag}(d) with lowest common ancestor $3$ would become two paths $3,2,1$ and $3,4,5$. Next, we explain each subroutine used in our main Algorithm~\ref{alg:reconstructtree}. The first key step is to recover the multidirectional path between two randomly chosen nodes. Algorithm~\ref{alg:findmultidirpath} recovers the sequence of nodes in the multidirectional path between any two nodes. The idea behind Algorithm~\ref{alg:findmultidirpath} is as follows. Let $i,j \in V$ be two arbitrary nodes in the directed rooted tree $T=(V,E)$. Recall that some \emph{multidirectional} paths are a single \emph{directed} path. We can easily detect this case by asking whether there is a path from $i$ to $j$ (i.e., whether $Q(i,j)=1$), or whether there is a path from $j$ to $i$ (i.e., whether $Q(j,i)=1$.) Without loss of generalization, assume there is a path in the directed rooted tree $T$ from $i$ to $j$. (We could similarly assume that there is a path from $j$ to $i$.) We can find out the set of all nodes $\{x_1, x_2, \dots x_k\}$ on the path from $i$ to $j$, by using path queries. For all nodes $k \in V - \{i,j\}$, we ask the oracle about $Q(i, k)$ and $Q(k, j)$. Note that $k$ is on the path from $i$ to $j$, if and only if $Q(i, k)=Q(k, j)=1$. After finding out the set of all nodes $\{x_1, x_2, \dots x_k\}$ on the path from $i$ to $j$, it remains to sort the nodes in order to obtain the correct sequence, thus recovering the path. We sort the list of nodes $\{i, x_1, x_2, \dots x_k, j\}$ by using the order relation given in Definition~\ref{def:orderrelation}. Some \emph{multidirectional} paths consist of two \emph{directed} paths that share the same origin $m$. In this case, Algorithm~\ref{alg:findmultidirpath} first recovers the lowest common ancestor $m$ and then reconstructs two \emph{directed} paths: one from $m$ to $i$, and one from $m$ to $j$, by following the approach explained before. In Algorithm~\ref{alg:findmultidirpath}, reconstructing a multidirectional path that consists of two paths requires finding the lowest common ancestor of the two randomly chosen nodes. Our Algorithm~\ref{alg:findcommonancestor} finds the lowest common ancestor of a multidirectional path between any two arbitrary nodes. Algorithm~\ref{alg:findcommonancestor} works as follows. Let $i,j \in V$ be two arbitrary nodes of the directed rooted tree $T=(V,E)$. First, we recover the \emph{directed} path from the root to $i$. We assume that the order of the nodes in the above path follow the order relation given in Definition~\ref{def:orderrelation}. Thus, the tree root is the first element on such path. Then, we iterate through all nodes in the path, in order to find the last ancestor of $j$ in the path from the root. This last ancestor is indeed the lowest common ancestor of $i$ and $j$. In Algorithm~\ref{alg:findcommonancestor}, in order to find the lowest common ancestor, one has to find the root of the directed tree. Our Algorithm~\ref{alg:findroot} identifies the path from the root to a given arbitrary node. The inner workings of Algorithm~\ref{alg:findroot} are as follows. Let $i \in V$ be an arbitrary node in the directed rooted tree $T = (V,E)$. For each node $j \in V - \{i\}$, we ask the oracle about $Q(j,i)$. If $Q(j,i)=1$ then there is a path from $j$ to $i$, and therefore we add node $j$ to the list of nodes that reach $i$. In order to recover the \emph{directed} path from the root to $i$, we sort the aforementioned list of nodes, by using the order relation given in Definition~\ref{def:orderrelation}. That is, the first element on the sorted list is the tree root. The second key step in our main Algorithm~\ref{alg:reconstructtree} is to divide the nodes (which are not in the multidirectional path) into bags defined by the multidirectional path. As argued before, if the \emph{multidirectional} path consists of two \emph{directed} paths, then Algorithm~\ref{alg:reconstructtree} breaks the \emph{multidirectional} path into its two constituent \emph{directed} paths, by using the least common ancestor. Thus, the bag assigment task needs only to consider directed paths, as we do in Algorithm~\ref{alg:findbag}. Here we give an intuitive explanation of the bag assignment task in Algorithm~\ref{alg:findbag}. For instance, consider finding out the bag of node $10$ in the directed path $1,2,3,4,5$ in Figure~\ref{fig:bag}(a). We see that nodes $1$, $2$ and $3$ are all ancestors of node $10$ (i.e., $Q(1,10)=Q(2,10)=Q(3,10)=1$.) We also see that nodes $4$ and $5$ are not ancestors of node $10$ (i.e., $Q(4,10)=Q(5,10)=0$.) Note that node $10$ belongs to the bag of node $3$. The above suggests that the task of finding out the bag of node $10$ can be done by searching for a node $i$ for which $Q(i,10)=1$ and $Q(j,10)=0$ where $(i,j)$ is an edge in the path. This can be efficiently done by performing binary search. There are two exceptions to the above rule: when queries for all nodes in the path return $1$, and when queries for all nodes in the path return $0$. As an example for the first case (when all queries return $1$), consider finding out the bag of node $11$ in the directed path $1,2,3,4,5$ in Figure~\ref{fig:bag}(a). We see that nodes $1$, $2$, $3$, $4$ and $5$ are all ancestors of node $11$ (i.e., $Q(1,11)=Q(2,11)=Q(3,11)=Q(4,11)=Q(5,11)=1$.) In this case, we assign node $11$ to the bag of the last node in the path, i.e., $5$. As an example for the second case (when all queries return $0$), consider finding out the bag of node $10$ in the directed path $3,4,5$ in Figure~\ref{fig:bag}(d). We see that neither nodes $3$, $4$ or $5$ are ancestors of node $10$ (i.e., $Q(3,10)=Q(4,10)=Q(5,10)=0$.) In this case, we assign node $10$ to the bag of the lowest common ancestor, i.e., $3$. Fortunately, all the cases analyzed above are naturally handled by binary search. The final step in our main Algorithm~\ref{alg:reconstructtree} is to cut the tree through the even separator, which splits the tree into two subtrees. Our Algorithm~\ref{alg:splittree} splits a directed rooted tree into two subtrees, by cutting the original tree through any arbitrary edge. The idea behind Algorithm~\ref{alg:splittree} is as follows. Let $e = (i,j) \in E$ be an arbitrary edge in the directed rooted tree $T=(V,E)$. Let $T_1$ and $T_2$ be two subtrees that result from removing $e$ from $T$. Note that every node must belong to either $T_1$ or $T_2$. Without loss of generality, let $i \in T_1$ and $j \in T_2$. Since $T$ is a directed rooted tree, $j$ has one parent in $T$, which is indeed $i$. Removing $(i, j)$ from $T$ makes $j$ have no parents in $T_2$. Therefore, $j$ is the root of $T_2$. For all nodes $k \in V - \{j\}$, we ask the oracle about $Q(j, k)$. If $Q(j, k) = 1$, then $k$ belongs to $T_2$, otherwise $k$ belongs to $T_1$. We finish the section by analyzing the time complexity of our randomized algorithm. \begin{theorem} \label{thm:complexity} Algorithm~\ref{alg:reconstructtree} takes $\O(dn \log^2 n)$ expected time, in order to reconstruct a directed rooted tree of $n$ nodes and node degree at most $d$. Furthermore, for a fixed probability of error $\delta \in (0,1)$, Algorithm~\ref{alg:reconstructtree} takes at most $\O(\frac{1}{\delta} \, dn \log^2 n)$ time, with probability at least $1-\delta$. \end{theorem} (See Appendix~\ref{sec:detailedproofs} for detailed proofs.) \section{Lower Bound and Extensions} \label{sec:extensions} In this section, we study lower bounds for reconstructing directed rooted trees from path queries. We also extend our original algorithm for the case of noisy queries, as well as the reconstruction of weighted trees from additive queries. Finally, we provide negative results for directed acyclic graphs that provide some motivation for our assumptions. \subsection{Lower Bounds} Here, we present lower bounds for reconstructing directed rooted trees from path queries. \begin{theorem} \label{thm:lowerboundrandomized} In order to reconstruct a directed rooted tree of $n$ nodes and node degree at most $d$, any \emph{randomized} algorithm requires at least $\Omega((1-\delta) \, n\log n)$ queries, otherwise it would fail with probability at least $\delta$. \end{theorem} \begin{theorem} \label{thm:lowerbounddeterministic} In order to reconstruct a directed rooted tree of $n$ nodes and node degree at most $d$, any \emph{deterministic} algorithm requires at least $\Omega(dn)$ queries. \end{theorem} Given the above results and Theorem~\ref{thm:complexity}, our algorithm is only a factor of $\O(d\log n)$ from the lower bound for any \emph{randomized} algorithm, and a factor of $\O(\log^2 n)$ from the lower bound for any \emph{deterministic} algorithm. Both of these factors are small when compared to the time complexity of our algorithm, which is $\O(dn\log^2 n)$. \subsection{Noisy Queries} Here, we analyze a \emph{noisy} regime, in which the bit that represents the oracle's answer gets flipped with some probability, by an adversary, before it is revealed to the algorithm. Next, we formally define noisy queries. \begin{definition} \label{def:noisyquery} Let $G=(V,E)$ be a directed acyclic graph, and let $Q_G$ be a path query. A \emph{noisy path query} with noise parameter $\varepsilon \in (0,1/2)$ is a function $\widetilde{Q}_G : V \times V \to \{0,1\}$ such that $\widetilde{Q}_G(i, j) = Q_G(i,j)$ with probability $1-\varepsilon$, and $\widetilde{Q}_G(i, j) = 1 - Q_G(i,j)$ with probability $\varepsilon$. \end{definition} In order to make use of our original algorithm, we proceed with the following strategy. Algorithm~\ref{alg:reconstructnoisytree} works as follows. For each node pair, we will perform majority voting on $m$ noisy path queries. If $m$ is large enough, noise will be removed with high probability. (See Appendix~\ref{sec:detailedalgorithms} for details.) The above opens up a question on the number of queries $m$ per node pair, that are sufficient to guarantee graph recovery success. A second question is whether $m$ depends on the number of nodes $n$ and maximum node degree $d$, thus affecting the time complexity of our randomized algorithm. The following theorem answers both questions. \begin{theorem} \label{thm:complexitynoisy} For a fixed probability of error $\delta \in (0,1)$ and noise parameter $\varepsilon \in (0,1/2)$, Algorithm~\ref{alg:reconstructnoisytree} takes at most $\O(\frac{1}{\delta} \, \frac{1}{(1/2-\varepsilon)^2} \, dn \log^2 n(\log d + \log n + \log\frac{1}{\delta}))$ time, with probability at least $1-\delta$, in order to reconstruct a directed rooted tree of $n$ nodes and node degree at most $d$, provided that the number of queries per node pair fulfills $m \in \Theta(\frac{1}{(1/2-\varepsilon)^2} \, (\log d + \log n + \log\frac{1}{\delta}))$. \end{theorem} In practice we do not need to know the exact value of the noise parameter $\varepsilon$. A lower bound of $\varepsilon$ suffices to define the number of queries $m$ per node pair. \subsection{Additive Queries on Weighted Trees} Here, we focus on the reconstruction of \emph{weighted} directed rooted trees by using additive queries. An additive path query returns the sum of the edge weights on the directed path between two given nodes, if such a path exists, or zero otherwise. Next, we formally define additive path queries. \begin{definition} Let $T=(V,E,W)$ be a weighted directed rooted tree, with positive weights for each edge, i.e., $w_{i,j} > 0$ for all $(i,j) \in E$, and $w_{i,j} = 0$ for all $(i,j) \notin E$. An \emph{additive path query} is a function $\widehat{Q}_T : V \times V \to [0,+\infty)$ such that if there exists a path in $T$ from $i$ to $j$ then $\widehat{Q}_T(i, j)$ is the sum of the weights of the edges in the path, and $\widehat{Q}_T(i, j) = 0$ otherwise. \end{definition} Note that the above query reveals much more information compared to the path query in Definition~\ref{def:query} which only reveals a single bit of information. In Algorithm~\ref{alg:reconstructweightedtree}, our strategy is to convert the \emph{additive query} problem into our original problem for recovering the edge set. Afterwards, we recover the edge weights by calling the \emph{additive} queries for each edge. (See Appendix~\ref{sec:detailedalgorithms} for details.) The time complexity of the above algorithm is as follows. \begin{theorem} \label{thm:complexityweighted} Algorithm~\ref{alg:reconstructweightedtree} takes $\O(dn \log^2 n)$ expected time, in order to reconstruct a weighted directed rooted tree of $n$ nodes and node degree at most $d$. Furthermore, for a fixed probability of error $\delta \in (0,1)$, Algorithm~\ref{alg:reconstructweightedtree} takes at most $\O(\frac{1}{\delta} \, dn \log^2 n)$ time, with probability at least $1-\delta$. \end{theorem} \subsection{Negative Results for Directed Acyclic Graphs} As argued before, the cost of asking queries is very high in several application domains. Thus, we are interested on the reconstruction of graphs that do not require the trivial $n^2$ queries for $n$ nodes (i.e., one query for every possible pair of nodes.) A natural question is whether more general directed acyclic graphs could be recovered efficiently by asking less than $\Omega(n^2)$ queries. Here, we provide a negative answer for the above. First note that some directed acyclic graphs are non-identifiable by using path queries. For instance, consider the two graphs shown in Figure~\ref{fig:nonidentifiabledag}. In both graphs, we have that $Q(1,2)=Q(2,3)=Q(1,3)=1$. Thus, by using path queries, it is impossible to discern whether the edge $(1,3)$ exists or not. Next, we formalize the above intuition. \begin{figure} \begin{center} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \node[vertex][label=center:$1$](x0) at (1.5,2) {}; \node[vertex][label=center:$2$](x1) at (1,1) {}; \node[vertex][label=center:$3$](x2) at (2,1) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x1) \Edge(x0)(x2) \Edge(x1)(x2) \end{tikzpicture} \hspace{0.4in} \begin{tikzpicture}[scale=1.0] \tikzstyle{vertex}=[circle, fill=white, draw, inner sep=0pt, minimum size=15pt] \node[vertex][label=center:$1$](x0) at (1.5,2) {}; \node[vertex][label=center:$2$](x1) at (1,1) {}; \node[vertex][label=center:$3$](x2) at (2,1) {}; \tikzset{EdgeStyle/.style={->}} \Edge(x0)(x1) \Edge(x1)(x2) \end{tikzpicture} \end{center} \vspace{-0.25in} \caption{Two directed acyclic graphs that produce the same answers when using path queries.} \label{fig:nonidentifiabledag} \end{figure} \begin{definition} Let $G=(V,E)$ be a directed acyclic graph. We say that an edge $(i,j) \in E$ is \emph{transitive} if there exists a directed path from $i$ to $j$ of length greater than 1. \end{definition} In Figure~\ref{fig:nonidentifiabledag}, edge $(1,3)$ is transitive, since there is a directed path $1,2,3$ (i.e., a directed path of length 2.) Transitive edges are not possible to be recovered by using path queries for the following reason. Let $i$ and $j$ be two fixed nodes. Assume there is a directed path from $i$ to $j$ of length greater than 1. Due to this path, we have that $Q(i,j)=1$, regardless of whether $(i,j) \in E$ or $(i,j) \notin E$. A trivial algorithm for reconstructing directed acyclic graphs of $n$ nodes, without transitive edges, is to ask $n^2$ queries (i.e., one query for every possible pair of nodes.) Next, we show that this trivial algorithm is indeed optimal. \begin{theorem} \label{thm:lowerbounddags} In order to reconstruct a directed acyclic graph of $n$ nodes, \emph{without transitive edges}, any \emph{deterministic} algorithm requires at least $\Omega(n^2)$ queries. Furthermore, any \emph{randomized} algorithm requires at least $\Omega((1-\delta) \, n^2)$, otherwise it would fail with probability at least $\delta$. \end{theorem} Recall that our algorithm pertains to directed rooted trees with a maximum node degree. These graphs are not only sparse but also \emph{weakly} connected (i.e., their undirected skeleton graphs are connected.) One could ask whether connectedness is a necessary condition, and whether sparsity makes graph reconstruction easier. Next, we show that an algorithm requires $\Omega(n^2)$ queries for recovering a family of sparse disconnected graphs, as well as a family of sparse connected graphs. \begin{theorem} \label{thm:lowerboundedge} In order to reconstruct a \emph{sparse disconnected} directed acyclic graph of $n$ nodes, any \emph{deterministic} algorithm requires at least $\Omega(n^2)$ queries. \end{theorem} \begin{theorem} \label{thm:lowerboundsparse} In order to reconstruct a \emph{sparse connected} directed acyclic graph of $n$ nodes, any \emph{deterministic} algorithm requires at least $\Omega(n^2)$ queries. \end{theorem} \section{Concluding Remarks} \label{sec:conclusions} There are several ways of extending this research. The analysis of the reconstruction of other families of graphs in $\O(n\log n)$ time would be of great interest. Given our results for directed rooted trees, it would be interesting to analyze other families of sparse connected graphs, such as graphs with bounded tree-width as well as graphs with bounded arboricity. \bibliographystyle{plain}
{'timestamp': '2017-11-20T02:02:57', 'yymm': '1606', 'arxiv_id': '1606.05183', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05183'}
arxiv
\section{Motivation} Influence maximization \cite{kempe:03} is a well explored problem in social network analysis. It has widespread applications in political campaigning, viral marketing and understanding the spread of memes and other contagion on social media. The problem first requires a specification of diffusion model, which specifies how the set of influenced nodes at time $t$ affects the set of non-influenced node at time $t+1$, or in other words, how the influence spreads through the graph $G=(V,E)$. Given a diffusion model, the influence maximization problem aims to find the best initial set of $k$ nodes which have the maximum expected influence at the end of the diffusion process. The function $\sigma(S)$ denotes the expected number of nodes influenced at the end of the diffusion process. A hypergraph is a generalization of a graph, where the hyperedges are subsets of vertices (rather than just pairs). More formally, a hypergraph $H=(V,E)$ has a set of vertices $V$, and every $e \in E$ is such that $e \subseteq V$. It is not always possible to represent the relationships between actors (nodes/vertices) through the edge, which is a pairwise (dyadic) relation. For instance, in a research setting, researchers collaborate in small groups to write scientific publications. Co-membership of a group in such a setting becomes a super-dyadic relation. A co-authorship network (e.g the arXiv Astrophysics co-authorship network \cite{leskovec2007graph}) can be formed from these collaborations, where every node is a researcher and an edge $(a,b)$ represents $a$ having collaborated with $b$ on a certain publication. However, this representation is lossy, since we lose the information of whether the collaboration of $a$ and $b$ involved a third node $c$. Consider two cases - one where $a$ and $b$, $b$ and $c$, $a$ and $c$ (each pair) worked separately on three publications, and the other where $a$,$b$ and $c$ worked together on one publication. A simple co-authorship network will not be able to distinguish between the two cases. However, a hypergraph representation where every hyperedge is a publication, with its nodes being the researchers who authored the publication, will be able to capture this difference correctly. \begin{figure}[H] \centering \includegraphics[scale=0.2]{ExampleHypergraph.png} \caption{An example hypergraph. $e_1$, $e_2$, $e_3$ and $e_4$ represent the hyperedges} \label{fig:exampleHypergraph} \end{figure} In the past decade, many standard problems in social network analysis have explored in the context of hypergraphs. \cite{zhou2006learning} looks at spectral clustering and transductive classification with data which can be represented as a hypergraph. \cite{neubauer2009towards} developed algorithms to detect communities in hypergraphs. \cite{satchidanand2015extended} extends random walk based semi-supervised learning to hypergraphs, also handling class imbalance. There are ways of reducing a hypergraph to a simple graph, but none of these are lossless. For example, one method of reducing a hypergraph to a simple graph, known as the clique construction method, adds an edge to a simple graph between $a$ and $b$ when they share atleast one hyperedge. It is however possible to represent a hypergraph as a heterogenous, bipartite graph where one partition consists of the nodes, while the other partition consists of the hyperedges. Conversely, any bipartite graph can be represented as a hypergraph considering one partition to be hyperedges and the other partition to be nodes. The problem of influence maximization in a hypergraph has remained hitherto unexplored. \cite{roy2015measuring} is the only work we found which looks at influence maximization in hypergraphs. However, the primary objective of the work is to define Shapley Value based centrality measures for hypergraphs which can be computed on various simple graph reductions constructed from the hypergraph. Influence maximization is just used to evaluate the efficacy of the centrality measures. Moreover, the influence maximization experiments are performed on a clique reduction of a hypergraph rather than the exact hypergraph representation. Hence, the authors simply use existing diffusion models for simple graphs such as IC and LT. Hence, to the best of our knowledge, there are no diffusion models defined which directly model the spread of influence on a hypergraph. Our first motivation, hence is to define a diffusion model for hypergraphs, and analyze whether it is submodular. In a hypergraph, the nodes represent actors while the hyperedges could be thought of as representing groups or affiliations. At the end of a diffusion process, every hyperedge could have some influenced incident nodes and some non-influenced incident nodes. One may seek to extend the notion of a node being influenced to a affiliation (hyperedge) being influenced. A affiliation is considered influenced if a majority of its nodes (members) are influenced at the end of the diffusion process. There may exist situations where one seeks to maximize the number of affiliations influenced rather than the number of nodes influenced. For instance, consider a political campaign on a social network such as Facebook, where the hyperedges correspond to Facebook groups while the nodes correspond to Facebook users. By controlling or influencing a Facebook group, one can dominate the content on the group's page. However, one cannot directly influence an affiliation, since the mechanism of influence propagation takes place through users getting converted in support of the political campaign. The manager of the political campaign here would be interested in selecting the set of initial users (who can be made to support the campaign through promotions or other incentives) which would maximize the number of groups influenced. This is a distinct objective from maximizing the number of nodes influenced, as we shall illustrate now through an example. We refer to this new variant of influence maximization as HEMI (Hyperedge Majority Influence Maximization). $\sigma^{HEMI}(S)$ is the expected number of hyperedges a majority of whose nodes are influenced at the end of the diffusion process. Consider a hypergraph H where the hyperedges are $e_1=\{v_1,v_2,v_3\}, e_2=\{ v_3,v_4,v_6 \}, e_3 = \{v_3,v_5,v_7\}$. Maximizing the number of nodes would not distinguish between the case where $S_1=\{v_1,v_2,v_3\}$ and $S_2=\{v_3,v_4,v_5\}$ are the final set of nodes influenced, since $\sigma()=3$. However, $\sigma_{HEMI}()=1$ in the first case and $2$ in the second. An added motivation of solving HEMI rather than maximizing the number of nodes directly would be the diversification it achieves. Attaining diversity for problems such as graph centrality based ranking \cite{mei2010divrank} and k nearest neighbours \cite{ranu2014answering} has been looked at in the past. In an influence maximization setting, one may be interested in having a final set of influenced nodes which is sufficiently diverse. For instance, a cellphone company targeting users to buy its connection, may want the set of users adopting the connection after its first advertising campaign to be well spread through various professions and class verticals. \section{Influence Maximization - Preliminaries} \label{introduction} The Independent Cascade Model is a well-known diffusion model. Under this model, a node $u$ which is influenced at time $t$ gets one opportunity to influence each of its neighbors $v$ with probability $p_{u,v}$ for time step $t+1$. The probability $p_{u,v}$ is either set to a small constant (e.g $0.1$) or set to $\frac{1}{k_v}$, where $v$ is the target node and $k_v$ is its degree. Another well-known diffusion model is the Linear Threshold (LT) model, where every node $v$ first randomly chooses a threshold $\alpha_v$ $\in [0,1]$. A node $v$ gets influenced at time $t+1$ if more than a fraction $\alpha_v$ of its neighbors are influenced at time $t$. The major contribution of \cite{kempe:03} was their observation that if the $\sigma()$ function for a diffusion model is both monotone and submodular, the greedy algorithm for growing the candidate set $S$ gives a $(1-\frac{1}{e})$ approximation. Since the brute force algorithm for this problem requires enumerating all the $2^{|V|}-1$ candidate sets, this result provided the first tractable way of solving this problem. The function $\sigma()$ is monotone if $\sigma(S) \leq \sigma(T)$ when $S \subseteq T$. The function $\sigma()$ is submodular if it exhibits a diminishing returns property - in other words for two sets $S$ and $T$ such that $S \subset T$, adding a node $v \notin T$ to S leads to a greater increase in $\sigma()$ than adding $v$ to $T$. \begin{equation} \sigma(S \cup v) - \sigma(S) \geq \sigma (T \cup v) - \sigma (T) \end{equation} The authors then went onto prove that both the IC and LT diffusion models were submodular, i.e they had a submodular $\sigma()$ function. In section \ref{ICProof}, we revisit the proof of submodularity for the IC model, since it is relevant for understanding the proof for submodularity (and counterexample for non-submodularity), which we present later on. \section{Proof of submodularity for IC model} \label{ICProof} In the IC model, an edge $(u,v)$ is used in the diffusion process with probability $p_{u,v}$. Instead of determining whether $(u,v)$ is used at the time of diffusion, one can perform a trial with respect to each edge $(u,v)$, and form a set of live edges $X \subseteq E$. Only these live edges participate in the diffusion process. We denote by $\sigma_{X}(S)$ the number of nodes influenced given the initial set $S$ and the live edge set $S$. Note that once the live edges are fixed, there is no randomness in the process. Now, one can easily see that $\sigma_{X}(S)$ is simply the size of the set of nodes reachable from $S$ under the graph $G_{X}=(V,X)$. Since reachability is submodular. \begin{equation} \sigma_{X}(S \cup v) - \sigma_{X}(S) \geq \sigma_{X} (T \cup v) - \sigma_{X} (T) \end{equation} Taking expectation on both sides, we get \begin{equation} \sigma(S \cup v) - \sigma(S) \geq \sigma (T \cup v) - \sigma (T) \end{equation} \section{Diffusion Model} Our diffusion model is a simple generalization of the Independent Cascade Model to hypergraphs. Here, we consider a graph $G^{aug}=(V \cup E, E_{aug})$, where the set of nodes $V_{aug}$ is the union of the set of nodes and the set of hyperedges. An edge $e_{aug} = (v,e)$ or $(e,v) \in E_{aug}$ if $v \in V, e \in E v \in e$. For a node-hyperedge pair $(v,e)$ such that $v \in e$, we add edges in both directions ($(e,v)$ and $(v,e)$). This allows us to have independent probabilities of the influence flowing in either direction. In our model, the hyperedges act as carriers of the influence, allowing it to flow from one node to another through them. However, note that in the HEMI objective, we include a hyperedge only if a majority of its nodes are influenced, regardless of whether it has acted as a carrier. A node $v$ which is influenced at time step $t$ can influence an incident hyperedge $e$ with probability $p_{v,e}$ for time step $t+1$ through the edge $(v,e)$. A hyperedge $e$ which is influenced at time step $t$ can influence an incident node $v$ with probability $p_{e,v}$ for time step $t+1$ through the edge $(e,v)$. Though the probabilities $p_{e,v}$ and $p_{v,e}$ could be set in any way, we use the following two schemes for setting them \begin{itemize} \item $p_{e,v}=p_1$ and $p_{v,e}=p_2$ $\forall v \in V$, $e \in E, v \in e$. Here $p_1$ and $p_2$ are constants. This is similar to the scheme used in \cite{kempe:03}, where the probability of an edge being live is set to a constant for some of the experiments. \item Another scheme would be to normalize all the probabilities of edges incident onto a node in the augmented graph (which could be a node or a hyperedge) to sum to 1. In this case, $p_{e,v}=\frac{1}{k_v}$ and $p_{v,e}=\frac{1}{|e|}$. \end{itemize} Here $k_v$ is the degree of the node $v$, while $|e|$ is the size of the hyperedge. Note that our diffusion model does not simplify to a diffusion model on some simple graph reduction of the hypergraph. To understand why this is the case, consider the hypergraph $H$ in Figure \ref{fig:diffusiondepiction} where a hyperedge $e$ has 4 nodes $u$, $v$, $z$ and $w$ incident on it. Also, $u$, $v$, $w$ and $z$ do not have any other hyperedges incident on them. \begin{figure}[H] \centering \includegraphics[scale=0.4]{DiffusionDepiction.jpg} \caption{Hypergraph $H$, with a single hyperedge incident on $u$,$v$, $w$, $z$} \label{fig:diffusiondepiction} \end{figure} Suppose $w$ is already influenced. Now, note that the hyperedge $e$ will get influenced (as a carrier) with probability $0.5$. Let $X_{e}$ denote the 0-1 random variable, which is $1$ if $e$ is influenced, and $0$ otherwise. Similarly, let $X_{u}$, $X_{v}$, $X_{z}$ and $X_{w}$ be the 0-1 random variables corresponding to whether the respective node is influenced or not. $X_{u}$, $X_{v}$ and $X_{z}$ are conditionally independent given $X_e$. We can see this from the fact that $P(X_{u}|X_{e},X_{w}=1)=P(X_{u}|X_{v},X_{e},X_{w}=1)=0.5$. Symmetrically, this holds for the other pairs. However, they are not conditionally independent given only $X_w$. We can see that $P(X_{u}|X_{w}=1) = P(X_{u}|X_{e}=1)P(X_{e}=1|X_{w}=1) = 0.5 \times 0.5 = 0.25$. Let us now find the value of $P(X_{u}|X_{w}=1,X_{v}=1)$. \tiny \begin{align} P(X_{u}=1|X_{w}=1,X_{v}=1) &= P(X_{u}=1|X_{e}=1)P(X_e=1|X_w=1,X_v=1) \\ &= 0.5\frac{P(X_v=1|X_e=1)P(X_e=1|X_w=1)}{P(X_v=1|X_w=1)} \\ &= 0.5 \frac{P(X_v=1|X_e=1)P(X_e=1|X_w=1)}{P(X_v=1|X_w=1)} \\ &=0.5 \\ \end{align} \normalsize Since $P(X_{u}|X_{w}=1,X_{v}=1) > P(X_{u}|X_{w}=1)$, we can see that $X_{u}$ and $X_{v}$ are not conditionally independent given only $X_{w}$. A simple graph based representation, with the IC diffusion model will not be able to model the dependence between $X_{u}$ and $X_{v}$, given $X_{w}$ at time $t$. This is because the state of $X_{u}$ and $X_{v}$ at the next time step (t+1), only depends on whether the respective edges $(w,u)$ and $(w,v)$ become live. The triadic relation captured by the hyperedge between $w$, $u$ and $v$ is not captured here. \cite{agarwal2006higher} had shown that most of the hypergraph based Laplacians were reducible to the Laplacians of two simple graph constructions - the star expansion and the clique expansion. However, for our diffusion model, we have shown that it is necessary to work with the exact hypergraph representation. \section{Proof of submodularity} We shall first prove that the function $\sigma(S)$ where $S$ is the number of initially influenced nodes and $\sigma(S)$ is the final number of nodes influenced, is submodular under our diffusion model. Our proof is a simple generalization of the proof for submodularity of Independent Cascade in simple graphs. Consider the graph $G^{aug}$. Assume, as in the original IC proof, that the set of live edges $X$ is decided by performing all the trials prior to the diffusion process. Consider sets of nodes in the original hypergraph $S \subseteq V, T \subseteq V, S \subset T$, and a node in the original hypergraph $v \notin T$. Now, $\sigma(S)$ is the set of augmented graph nodes which were nodes in the original graph and are reachable from the set $S$ in the augmented graph. Note that this does not include the augmented graph nodes which correspond to hyperedges, though the paths which are used to reach a node $v \in V$ from $u \in S$ may have hyperedges as intermediate nodes. Using the same argument as in the KKT proof, since reachability is submodular, we get \begin{equation} \sigma_{X}(S \cup v) - \sigma_{X}(S) \geq \sigma_{X} (T \cup v) - \sigma_{X} (T) \end{equation} Taking the expectation over all X, \begin{equation} \sigma(S \cup v) - \sigma(S) \geq \sigma (T \cup v) - \sigma (T) \end{equation} \section{The HEMI Objective - Formal Definition} Consider the state of the hypergraph $H=(V,E)$ at the end of a trial of the diffusion process, for a given initial set $S$. Some of the nodes will be influenced, and some will not be influenced. Let the set of influenced nodes be $I$. The set of non-influenced nodes will be $V-I$. Clearly $\sigma(S)$, the expected number of nodes influenced, is equal to $E[|I|]$. Let $V_{e}$ denote the set of nodes incident on a given hyperedge $e$. For HEMI, we are interested in the number of hyperedges, a majority of whose nodes are influenced. We define $Y$ to be this set. More formally, \begin{equation} Y = \{e \in E| V_e \cap I \geq \frac{|V_e|}{2}+1 \} \end{equation} Now, $\sigma^{HEMI}(S) = E[|Y|]$. \section{Non-submodularity of HEMI:Counterexample} \begin{figure}[H] \centering \includegraphics[scale=0.4]{HypergraphMajority.jpg} \caption{Hypergraph $H$; the red ovals correspond to hyperedges while the blue ovals correspond to nodes.} \label{fig:HEMICounter} \end{figure} Consider the hypergraph $H$ shown in Figure \ref{fig:HEMICounter}. $H$ has hyperedges $e_1 = \{v_1, v_2, v_4\}$, $e_2=\{v_1, v_2, v_3, v_5,v_6\}$, $e_3= \{v_2,v_3,v_4\}$. The augmented graph $G^{aug}$ will have $2\times(3+5+3)=22$ edges. Let $\sigma^{HEMI}(S)$ be the number of hyperedges with a majority of their nodes influenced at the end of the diffusion process. Let $\sigma^{HEMI}_{X}(S)$ be the number of majority-influenced hyperedges given a set of live edges $X$ in the augmented graph. One can exactly compute $\sigma(S)$ by enumerating over all possible live sets $X$. \begin{equation} \sigma^{HEMI}(S) = \sum_{X} P(X) \sigma^{HEMI}_{X}(S) \end{equation} where P(X) is given by \begin{equation} P(X) = \Pi_{e_{aug} \in X} p(e_{aug}) \end{equation} Here $p(e_{aug})=p_{e,v}$ or $p_{v,e}$ depending on the directionality of the edge i.e whether it goes from a node to a hyperedge or in the reverse direction. However, note that using this method of enumerating outcomes even for this small example, would require us to enumerate $2^{22}$ outcomes. Instead, we find an estimate of $\sigma^{HEMI}(S)$ using a simulation-based method. Consider the sets $S=\{v_5\}$, $T=\{v_1,v_3,v_5\}$ and $v=v_2$. Now, we run simulations to estimate $\sigma^{H}(S)$, $\sigma^{H}(S \cup v)$, $\sigma^{H}(S \cup v)$ and $\sigma^{H}(T \cup v)$. For a given set, we run $10^5$ trials. In each trial, we start with the initial set influenced at time step $0$, and then run the diffusion model until convergence (set of influenced nodes stops growing). We then find the number of hyperedges a majority of whose nodes are influenced. We find this number averaged over all the trials. We can see that submodularity is violated for a wide range of $p_1$ and $p_2$ values. The intuition here is that node $v_2$, which is incident on all the hyperedges, can act as a swing vertex (converting a non-majority into a majority) only when one less than majority of the nodes in a hyperedge it belongs to are influenced. A larger initial set helps having more influenced nodes in the end, thus helping $v$ perform the role of converting a non-majority into a majority in more hyperedges. Hence, a larger initial set results in a larger marginal gain on adding $v$ to the initial set. \begin{table} \centering \begin{center} \begin{tabular}{ | c | c | c | c |} \hline \hline $p_{v,e}$ & $p_{v,e}$ & $\sigma^H(S \cup v) - \sigma^H(S)$ & $\sigma^H(T \cup v) - \sigma^H(T)$ \\ \hline \hline 0.1 & 0.1 & 0.08 & 1.92 \\ \hline 0.1 & 0.2 & 0.13 & 1.85 \\ \hline 0.1 & 0.3 & 0.17 & 1.79 \\ \hline 0.2 & 0.1 & 0.15 & 1.85 \\ \hline 0.2 & 0.2 & 0.26 & 1.71 \\ \hline 0.2 & 0.3 & 0.33 & 1.60 \\ \hline 0.3 & 0.1 & 0.22 & 1.78 \\ \hline 0.3 & 0.2 & 0.38 & 1.60 \\ \hline 0.3 & 0.3 & 0.48 & 1.43 \\ \hline $\frac{1}{|e|}$ & $\frac{1}{d(v)}$ & 0.80 & 0.85 \\ \hline \end{tabular} \end{center} \end{table} Thus, we can see that the HEMI objective $\sigma^{HEMI}(S)$ is non-submodular. This means the greedy algorithm is no longer guaranteed to provide a $(1-\frac{1}{e})$ approximation. \section{Future Work} Although we have proved that the HEMI objective is non-submodular, we are yet to devise an algorithm which can solve the problem with some provable guarantee. Devising such an algorithm is a point of future interest. One possible direction could be to formulate the HEMI objective as a difference of two submodular functions, or having submodular upper and lower bounds. \bibliographystyle{named} \section{Introduction} Signed networks \cite{leskovec2010signed} are networks with both positive and negative interactions between nodes. They may occur as explicit edges, as in the Slashdot \cite{kunegis2009slashdot} and Epinions \cite{massa2005controversial} social networks, or be inferred from interactions such as administrator elections on Wikipedia \cite{maniu2011building} or conversations on Twitter \cite{kouloumpis2011twitter}. Mathematically, a signed network can be specified as $(V,E^{+},E^{-})$, where $V$ is the set of vertices, with $E^{+}$ and $E^{-}$ being sets of directed edges of the form $(a,b)$, denoting $a$ \textit{trusts} $b$ or $a$ \textit{distrusts} $b$, for $E^{+}$ and $E^{-}$ respectively. In a social network, a centrality measure assigns each node a value, which denotes its importance within the network. The notion of importance may vary based on the application, leading to a wide variety of such measures, based on position \cite{okamoto2008ranking}, betweenness \cite{brandes2001faster,newman2005measure} and prestige\cite{bonacich2007some}. A centrality measure for a signed network needs to incorporate two sources of information and the interplay between them - namely the positive and negative edges. This, in addition to the imbalance in real-world signed networks between positive and negative edges, makes defining signed network centrality measures a non-trivial task. A simple centrality measure for signed social networks, first proposed in \cite{kunegis2009slashdot}, is the simple net positive in- degree, also called Fans Minus Freaks (FMF) centrality measure - where fans are nodes with positive edges to pointing to the node under consideration, while freaks are the one with negative edges. Other measures, such as eigenvector centrality \cite{bonacich2007some} and PageRank \cite{page1999pagerank}, have also been generalized to signed networks. A disadvantage of some of these centrality measures is that they consider every node in isolation when computing the centrality. This ignores the synergy between nodes, where a node is important by virtue of its combination with other groups of nodes. Moreover, ignoring the synergy can also make some of these centrality measures vulnerable to attacks wherein groups of nodes work together, as noted in \cite{kumar2014accurately}, to boost their individual centralities or reduce other nodes's centralities. One approach to incorporate this synergy is to define a cooperative game, which assigns a value to every possible subset of nodes $C \subseteq V$ given by the characteristic function $\nu(C)$ of the game. The value assigned to a node is a weighted sum of the marginal contributions it makes to the values of all possible subsets, also known as the Shapley Value (SV). SV based centrality provides an intuitive way of capturing a node's centrality in combination with different groups of other nodes in the network. \subsection{Shapley Value Centrality - Preliminaries} A cooperative game is defined by a set of agents $A=\{a_1,a_2 \ldots a_{N}\}$ and a characteristic function $\nu() : P(A) \mapsto R$, where $P(A)$ represents the power set of $A$, and $R$ is the set of real numbers. $\nu(C)$ essentially maps every $C \subseteq A$ to a real number, which represents the payoff of the subset, or the coalition \footnote{The terms subset and coalition are used here interchangeably}. Generally, $\nu(C)$ is defined such that $\nu(\phi)=0$, where $\phi$ is the null set, which corresponds to the coalition with no agents. Shapley value, first proposed in \cite{shapley1952value}, is a way of distributing the payoff of the grand coalition (the coalition of all agents) amongst each agent. It proposes that the individual payoff of an agent should be determined by considering the marginal contribution of the agent to every possible coalition it is a part of. Such a scheme of distribution is also found to obey certain desirable criteria. Let $\pi \in \Pi(A)$ be a permutation of $A$, and let $C_\pi(i)$ denote the coalition of all the predecessors of agent $a_i$ in $\pi$, then the Shapley value is defined as \begin{equation*} SV(a_i) = \frac{1}{|A|!} \sum_{\pi \in \Pi(A)} (\nu(C_\pi(i) \cup a_i)-\nu(C_\pi(i))) \end{equation*} For defining a SV based centrality measure on a graph $G=(V,E)$ , we consider $A=V$. $\nu(C)$ is defined such that it represents the a measure of power/centrality/influence of the coalition $C$. The centrality of each node $v_i$ is then given by its Shapley value $SV(v_i)$. \subsection{Computing the SV} Earlier methods for SV based centrality, such as \cite{suri2008determining} used a Monte-Carlo sampling based approximation to compute $SV(v_i)$ for each $v_i$. This essentially involves uniformly sampling a large number of permutations from $\Pi(V)$, and then finding the average marginal contribution of $v_i$ as per the definition above. This approach is expensive (since one has to sample a large number of permutations), as well as inexact. Moreover, since the number of permutations grows as $O(n!)$, where $n=|V|$ is the number of vertices in the graph. \cite{aadithya2010efficient} first proposed that by defining $\nu(C)$ conveniently, one could compute the SV exactly in closed form. This approach is naturally more preferable than the MC sampling based one, although it requires defining $\nu$, such that SV can be easily derived using arguments from probability and combinatorics. \section{Contributions} To the best of our knowledge, ours is the first work to define cooperative game theoretic centrality measures for signed social networks. Moreover, we are also the first to evaluate such measures for a centrality-based ranking task, in traditional or signed networks. Earlier works have evaluated these measures for other tasks such as influence maximization \cite{suri2008determining}, or selecting gatekeeper nodes \cite{narayanam2014shapley}. Here, we consider the task of ranking users to detect trolls or malicious users in a social network. Intuitively, these users are expected to have a a highly negative reputation amongst the users of the network. In the availability of ground truth about trolls, one can evaluate a signed network centrality measure by considering how low these ``trolls" rank in a list of users ranked according to the measure. \section{Measures} We now define several Shapley value based centrality measures for directed, signed networks, given by $G = (V,E^+,E^-)$, where each edge $(a,b) \in E^{+}$ denotes $a$ \textit{trusts} $b$ and each edge $(a,b) \in E^{-}$ denotes $a$ \textit{distrusts} $b$. We take $G$ to be a signed, directed network, since in the context of Slashdot, a positive/negative edge denotes that user $a$ approves/disapproves or trusts/distrusts user $b$'s content. Hence, the directionality is of importance. Each of our measures is based on a different definition of $\nu(C)$. We denote the positive and negative in-degrees by $d^{+}_{in}(V)$ and $d^{-}_{in}(V)$, and the corresponding out-degrees by $d^{+}_{out}(V)$ and $d^{-}_{out}(V)$. The positive and negative in-neighbor sets are denoted by $N^{+}_{in}(V)$ and $N^{-}_{in}(V)$, and the corresponding out-neighbor sets by $N^{+}_{out}(V)$ and $N^{-}_{out}(V)$. \subsection{Game Definitions \& Closed Form Expressions} \subsubsection{Fans Minus Freaks (FMF)} This is a simple generalization of the degree centrality measure to directed, signed networks. More formally, \begin{equation*} FMF(v_i) = d^{+}_{in}(v_i) - d^{-}_{in}(v_i) \end{equation*} We attempt to generalize this measure to sets of nodes by appropriate definitions of $\nu(C)$, and then compute individual centralities of nodes using the $SV$ of $\nu$. \subsubsection{Net Positive Fringe (NPF)} We first define the sets $\nu^{+}(C)$ and $\nu^{-}(C)$ \footnote{Note the slight overloading of $\nu$ here. $\nu^{+}$ and $\nu^{-}$ denote sets, not real values}. $\nu^{+}(C)$ is the set of all nodes $v_j$ such that \begin{itemize} \item $v_j$ has atleast one positive out-neighbor $v_i \in C$ OR \item $v_j \in C$ \end{itemize} The second clause results from the intuitive assumption that $v_i$ always trusts itself. $\nu^{-}(C)$ is the set of all nodes $v_j$ such that $v_j$ has atleast one negative out-neighbor $v_i \in C$. Note that $v_j$ itself may be present inside or outside the coalition, and this does not affect $\nu^{-}(C)$. The characteristic function $\nu(C)$ is given by \begin{equation*} \nu(C) = |\nu^{+}(C)| - |\nu^{-}(C)| \end{equation*} We can think of the $\nu(C)$ as the difference between two characteristic functions, namely $|\nu^{+}(C)|$ and $|\nu^{-}(C)|$. Hence the $SV(v_i)$ of $\nu$ will be the difference between the Shapley values $SV^{+}(v_i)$ and $SV^{-}(v_i)$ for the characteristic functions $|\nu^{+}(C)|$ and $|\nu^{-}(C)|$. Let us refer to these games as Game 1 and Game 2 respectively. \begin{itemize} \item \textbf{Game 1} \\ Consider a permutation $\pi$ sampled uniformly from $\Pi(V)$. Let $C$ be the set of nodes preceding $v_i$ in the coalition. Let $v_j$ by any node $\in V$. Note that $v_j$ could also be $v_i$ itself. We denote $B_{v_i,v_j}$ as the random variable denoting the contribution made by $v_i$ through $v_j$. Here, ``$v_i$ through $v_j$" means that as a result of $v_i$ being added to $C$, what is the effect on the membership of $v_j$ in $\nu^{+}(C)$. The Shapley Value of $SV(v_i)$ of $v_i$, is then given by $\sum_{v_j \in V} E[B_{v_i,v_j}]$. Note that since we are taking the expectation over a permutation drawn uniformly from $\Pi(V)$, it is equivalent to averaging over every possible permutation. Now, we can easily see that $B_{v_i,v_j}$ can be non-zero only if $v_j \in v_i \cup N^{+}_{in}(v_i)$, since in all other cases, $v_j$ can neither be added or removed from $\nu^{+}(C)$ as a result of $v_i$ being added. Now, consider the case where $v_j \in v_i \cup N^{+}_{in}(v_i)$. $E[B_{v_i,v_j}]$ will be equal to the fraction of permutations in which $v_i$ is able to add $v_j$ to the set $\nu^{+}(C)$. This can happen only if $v_j$ is neither itself in $C$, nor is any other out-neighbor of $v_j$. Note that as a result, the event of $v_i$ adding $v_j$ only depends on the ordering of these $d^{+}_{out}(v_j)+1$ nodes within the permutation. Hence , we can directly consider the ordering of these nodes, ignoring the other nodes in our calculation. $v_i$ must be the first node amongst these $d^{+}_{out}(v_j)+1$ in the permutation $\pi$, for it to contribute $v_j$. Hence, \begin{align*} E[B_{v_i,v_j}] &= \frac{(d^{+}_{out}(v_j))!}{(d^{+}_{out}(v_j)+1)!} \\ &= \frac{1}{(d^{+}_{out}(v_j)+1)} \end{align*} Now, $SV^{+}(v_i)$, the Shapley value of Game 1, is consequently given by \begin{align*} SV^{+}(v_i) &= \sum_{v_j \in v_i \cup N^{+}_{in}(v_i)} \frac{1}{(d^{+}_{out}(v_j)+1)} \end{align*} \item \textbf{Game 2} \\ Using arguments similar to Game 1, we get \begin{align*} SV^{-}(v_i) &= \sum_{v_j \in N^{-}_{in}(v_i)} \frac{1}{(d^{-}_{out}(v_j))} \end{align*} Note that the +1 term in the denominator for the $SV^{+}(v_i)$ expression is not present here, since the node $v_j$ cannot add itself to $\nu^{-}(C)$ \end{itemize} The final expression of $SV(v_i)$ for the NPF game is thus given by \small \begin{align*} SV(v_i) &= \sum_{v_j \in v_i \cup N^{+}_{in}(v_i)} \frac{1}{(d^{+}_{out}(v_j)+1)} - \sum_{v_j \in \cup N^{-}_{in}(v_i)} \frac{1}{(d^{-}_{out}(v_j))} \end{align*} \normalsize The time taken to compute the NPF, $T_{NPF}$ would be given by \begin{align*} T_{NPF} &= O(\sum_{v \in V} (1 + d^{+}_{in}(v) + d^{-}_{in}(v))) \\ T_{NPF} &= O(V+E) \end{align*} \subsubsection{Fringe Of Absolute Trust (FAT)} Note that we refer to $\nu^{+}(C)$ and $\nu^{-}(C)$, as defined in the previous game. In this game, a node is included in the coalition's value if it satisfies both the conditions below \begin{itemize} \item It either belongs to the coalition or has a positive out neighbor in the coalition. \item It does not have a negative out neighbor in the coalition. \end{itemize} The intuition underlying this measure is that every node contributing to the set's value should be such that it does not distrust any node in the set. Most signed networks have more positive edges than negative ones. For instance, Slashdot has only 23.9\% of its edges marked as negative. Hence, the negative edges may be interpreted strongly as an explicit ``vote of distrust". Note that distrusting even a single member in the coalition removes a node from the coalition's value. Previous work proposes similarly motivated solutions to overcome imbalance. For instance, in \cite{leskovec2010predicting}, the authors undersample the positive edges to be equal to the negative edges. If node $v_j \in N^{+}_{in}(v_i)\cup v_i$, then $B_{v_i,v_j}$ is +1 if $v_i$ is the first of any of the out-neighbours of $v_j$ (positive or negative) or the node $v_j$ itself to occur in the permutation. This is because if a $v_k \in N^{+}_{out}(v_j) \cup v_j$ is in $C$, without any negative out neighbor of $v_j$ being in $C$, then $v_j$ already is such that $v_j \in \nu^{+}(C)-\nu^{-}(C)$. Also, if any negative out neighbor of $v_j \in C$, then $v_j$ can never belong to $\nu^{+}(C)-\nu^{-}(C)$, hence adding $v_i$ to $C$ would have no effect. This argument holds good even if $v_i=v_j$ . Therefore, for $v_j \in N^{+}_{in}(v_i)\cup v_i$ \begin{align*} E[B_{v_i,v_j}] &= \frac{1}{d^{+}_{out}(v_j)+d^{-}_{out}(v_j)+1} \end{align*} Now consider $v_j \in N^{-}_{in}(v_i)$. We can see that $B_{v_i,v_j} \neq 0$ iff \begin{itemize} \item A node $v_k \in N^{+}_{out}(v_j) \cup v_j$ belongs to C \item No negative out-neighbor $v_k$ of $v_j$ belongs to C. \end{itemize} In fact, $B_{v_i,v_j}=-1$ if both the conditions above are satisfied. The expectation is given by \begin{align*} \tiny E[B_{v_i,v_j}] &= -\frac{\sum_{x=1}^{x=d^{+}_{out}(v_j)+1} \binom{d^{+}_{out}(v_j)+1}{x} x! (d^{total}_{out}(v_j)-x)! }{(d^{total}_{out}(v_j)+1)!} \\ \end{align*} where $d^{total}_{out}(v_j) = d^{+}_{out}(v_j) + d^{-}_{out}(v_j)$ \normalsize Note that $\binom{n}{r}$ represents the number of ways of choosing r distinct things from n distinct things. Since computing factorials for large values can become infeasible in code due to limits on the value of variables, we simplify the expression into a product of fractions form. \begin{align*} E[B_{v_i,v_j}] &= \frac{-1}{d^{total}_{out}(v_j)+1}\sum_{x=1}^{z=d^{+}_{out}(v_j)+1} \frac{\prod_{\alpha=1}^{\alpha=x}(d^{+}_{out}(v_j)-x+\alpha)}{\prod_{\alpha=1}^{\alpha=x}(d^{total}_{out}(v_j)-x+\alpha)} \end{align*} The final expression for $SV(v_i)$ for NPF is given by \begin{equation*} SV(v_i) = \sum_{v_j \in v_i \cup N^{+}_{in}(v_i) \cup N^{+}_{in}(v_i)} B_{v_i,v_j} \end{equation*} The complexity of computing FAT, $T_{FAT}$ would be \begin{align*} T_{FAT} &= O(\sum_{v \in V} d^{+}_{in}(v_i)+1+d^{-}_{in}(v_i){(\Delta^{+}_{out})}^{2}) \\ T_{FAT} &= O(V+E+E{(\Delta^{+}_{out})}^{2})) \end{align*} where $\Delta^{+}_{out}$ is the maximum positive out degree. \subsubsection{Negated Fringe Of Absolute Distrust (NFADT)} This game is in some sense like FAT, but with the roles of distrust and trust reversed. $\nu(C)$ here is given by $-|\nu^{-}(C)-\nu^{+}(C)|$. The negative sign is because $|\nu^{-}(C)-\nu^{+}(C)|$ would be a measure of disrepute (negative reputation). We omit the expression here for the sake of brevity. The complexity expression of NFADT would be similar to that of $T_{FAT}$, with $\Delta^{+}_{out}$ replaced by $\Delta^{-}_{out}$. \subsubsection{Net Trust Votes (NTV)} The intuition underlying this measure is that the collective importance of a group of nodes is the net number of ``votes" or edges in its favour, by nodes outside the group. Given a coalition C, let $E^{+}$ be the set of positive in-edges from a node outside the coalition to a node in the coalition. Similarly, $E^{-}$ is the set of negative in-edges from a node outside the coalition into the coalition. Note that we do not consider internal edges in either term. In the NTV game, $\nu(C)$ is given by $|E^{+}|-|E^{-}|$. Let us now consider the derivation of a closed form expression for this game. Consider the node $v_i$ being added to the $C$. $v_i$ can contribute to the value of $|E^{+}|-|E^{-}|$ in four different ways, as stated below \begin{enumerate} \item Positive out-edges from $v_i$ to nodes $v_k \in C$. These edges become internal when $v_i$ is added to the coalition, decreasing the value of $|E^{+}|-|E^{-}|$ by 1. \item Negative out-edges from $v_i$ to nodes $v_k \in C$. These edges become internal when $v_i$ is added to the coalition, increasing the value of $|E^{+}|-|E^{-}|$ by 1. \item Positive in-edges from $v_k, v_k \notin C$ to $v_i$. These edges become a part of $E^{+}$, increasing $\nu(C)$ by 1 \item Negative in-edges from $v_k, v_k \notin C$ to $v_i$. These edges become a part of $E^{-}$, decreasing $\nu(C)$ by 1. \end{enumerate} Consider case 1. This case only happens for $v_i$, $v_j \in N^{+}_{out}(v_i)$. For this event to happen, $v_j \in C$. In other words, it should precede $v_i$ in the permutation. This will happen in exactly half the permutations, and will result in a contribution of $\frac{-1}{2}$. The cumulative contribution as a result of case 1 will be $\sum_{v_j \in N^{+}_{out}(v_i)} -\frac{1}{2} = -\frac{d^{+}_{out}(v_i)}{2}$. Symmetrically, in case 2, the cumulative contribution will be $\sum_{v_j \in N^{-}_{out}(v_i)} \frac{1}{2} = \frac{d^{-}_{out}(v_i)}{2}$. Case 3 can only happen for $v_i$, $v_j \in N^{+}_{in}(v_i)$. Here $v_j$ should follow $v_i$ in the permutation i.e. it should not be in $C$. This will happen in exactly half the permutations. Hence, the cumulative contribution will be $\sum_{v_j \in N^{+}_{in}(v_i)} \frac{1}{2} = \frac{d^{+}_{in}(v_i)}{2}$. Symetrically in case 4, we have the cumulative contribution given by $\sum_{v_j \in N^{-}_{in}(v_i)} -\frac{1}{2} = -\frac{d^{-}_{in}(v_i)}{2}$. Summing over the contributions from the 4 cases we get \begin{equation*} SV(v_i) = \frac{1}{2} (d^{+}_{in}(v_j) - d^{-}_{in}(v_j)) - \frac{1}{2} (d^{+}_{out}(v_j) - d^{-}_{out}(v_j)) \end{equation*} This expression also exhibits a relation to status theory \cite{leskovec2010signed}, where a positive edge from a to b, indicates that b has a higher status than a, while a negative edge indicates the opposite. Thus for a node $a$, there are $d^{+}_{in}(v_j) + d^{-}_{out} (v_j)$ nodes with a status lower than it, and $d^{-}_{in}(v_j) + d^{+}_{out} (v_j)$ nodes with a status higher than it. The expression above, is in some sense, an indicator of the node's status relative to its neighbors. Since this expression involves only the node degrees, $T_{NTV}=O(V)$, provided we maintain the in-degrees and out-degrees separately. \subsection{k-Hop NPF} We can generalize the \textbf{NPF} measure to $k$ hops, considering the sets of in-neighbours $N^{+}_{in}(v_i,k)$ and $N^{-}_{in}(v_i,k)$ to be the set of neighbors within a distance of k-hops using in-edges. The notion of a path being positive or negative is determined using the principle ``The enemy of my enemy is my friend", motivated by balance theory \cite{leskovec2010signed}. However, unlike the traditional balance theory setting, we consider the direction of the edges i.e. we only consider paths where edges are pointing from the source to the destination. The sign of the path is given by the product of its edge signs. Note that $N^{+}_{in}(v_i,k)$ and $N^{-}_{in}(v_i,k)$ may now have a non-zero intersection unlike the simple one-hop neighbor sets. Hence, we do not generalize the $FAT$ and $NFADT$ measures to the $k$ hop case, since these measures do not consider the neighbor sets independently. \subsection{Strong Balance Shapley Value (SBSV)} This measure has its motivation in balance theory \cite{cartwright1956structural}, which has also been used in the literature to define energy functions \cite{marvel2009energy}, to characterize a signed graph's stability. Balanced triads (where the product of signs is positive) are considered stable and having negative energy, while unbalanced triads are considered unstable. Here, we consider the un-normalized \footnote{We do not normalize the energy by the largest possible number of triads $\binom{|C|}{3}$, or the total number of triangles, since this makes computing the closed form difficult} energy of a set of nodes $C$ as the number of balanced triads minus the number of unbalanced triads. \begin{equation} \nu(C) = \sum_{\{v_i,v_j,v_k\} \in T(C)} -s_{ij}s_{jk}s_{ik} \end{equation} where $T(C)$ is the set of triads in $C$, and $s_{ij}$ represents the sign of the edge between $i$ and $j$. We can easily see that the marginal contribution of a node $i$ to $C$ would be only dependent on the number of triangles $v_i$ is a part of. If the other two nodes of a triad to which $i$ belongs are already present in $C$, then $i$ can make a marginal contribution through the triad. For a given pair of adjacent neighbors j and k of a node i, this will only happen in $\frac{1}{3}$ of the permutations. Thus, the shapley value $SV(v_i)$ will be given by \begin{equation} SV(v_i) = \sum_{\{v_j,v_k\}, v_j \in N(v_k), v_j,v_k \in N(v_i)} \frac{1}{3} (- s_{ij}s_{jk}s_{ik}) \end{equation} The time complexity $T_{SBSV}$ will be $O(\sum_{v_i \in V} (d^{total}_{in}(v_i))^2)$. \subsection{Weak Balance Shapley Value (WBSV)} Weak balance is a variant of balance theory \cite{leskovec2010predicting}, according to which the triad with three negative signs (all nodes are mutual enemies), is not considered as unbalanced. As a result, triads where $s_{ij}$, $s_{jk}$ and $s_{ik}$ are all $-1$ are not included in the value function, and consequently, in the Shapley Value. The time complexity will be the same as that of WBSV. \subsection{Evaluation and Results} We consider the task of ranking users to detect trolls in the Slashdot signed network \footnote{http://konect.uni-koblenz.de/networks/slashdot-zoo }, with 96 users annotated as trolls. The network has 71512 nodes, with 487751 edges. About 24\% of these edges are negative. We evaluate a centrality measure by first ranking the nodes of the graph in ascending order according to them, and then evaluating these ranklists based on how high the ground truth trolls rank in them. For evaluation, we consider two metrics \begin{enumerate} \item The number of trolls in the top $g$ elements of the ranklist, where $g$ is the number of ground truth trolls \item The average precision (AP) metric from IR \cite{najork2007hits}, with the trolls corresponding to ``relevant documents". The metric is defined as follows \begin{equation} AP = \sum_{k=1}^{k=n} \frac{P(k) \times Mal(k)}{g} \end{equation} Here, $P(k)$ is the precision (fraction of ground truth trolls) in the top $k$ elements of the ranklist. $Mal(k)$ is 1 if the kth user is a troll, while $g$ is the number of ground truth trolls. $n$ is the size of the ranklist. \end{enumerate} Besides computing these for the full graph, we also compute the mean of the AP (MAP) over $50$ subgraphs formed by deleting 5 \%, 10 \% and 20\% of the nodes. We observe that the \textbf{NPF}, \textbf{FAT} and \textbf{NFADT} measures perform considerably better than \textbf{FMF}, both on the full graph as well as on each of the random subsamples. Moreover, the \textbf{3-Hop NPF} gives the highest average precision amongst all the measures, while the performance of \textbf{k-Hop FMF} decreases when we go to 3 hops. \tiny \begin{table}[t] \caption{Comparison of Measures For Troll Detection} \label{Results} \begin{center} \begin{tabular}{ | c | c | c | c | c | c | } \hline Approach & In Top 96 & AP & MAP-5 & MAP-10\\ \hline FMF & 10 & 0.031 & 0.031 & 0.033 \\ \hline NTV & 7 & 0.044 & 0.043 & 0.045 \\ \hline NPF & 18 & \textbf{0.104} & 0.104 & 0.107 \\ \hline FAT & 15 & \textbf{0.092} & 0.092 & 0.094 \\ \hline NFADT & \textbf{19} & \textbf{0.130} & 0.131 & 0.134 \\ \hline 2 Hop FMF & \textbf{25} & 0.158 & 0.157 & 0.153 \\ \hline 3 Hop FMF & 7 & 0.023 & 0.025 & 0.025 \\ \hline 2 Hop NPF & 16 & 0.148 & 0.139 & 0.143 \\ \hline 3 Hop NPF & \textbf{22} & \textbf{0.193} & 0.193 & 0.193 \\ \hline WBSV & 4 & 0.039 & 0.039 & 0.039 \\ \hline SBSV & 4 & 0.024 & 0.024 & 0.024 \\ \hline \end{tabular} \end{center} \end{table} \normalsize \bibliographystyle{named}
{'timestamp': '2016-06-17T02:06:43', 'yymm': '1606', 'arxiv_id': '1606.05065', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05065'}
arxiv
\section{Introduction} \label{sec:intro} Previous work suggests that syntactic machine translation such as Hiero~\cite{hierarchical} and Neural Machine Translation (NMT)~\cite{kalchbrenner,sutskever,choPhraseRepresentation,bahdanau} are very different and have complementary strengths and weaknesses~\cite{neubigAtwat2015,sgnmt}. Recent attempts to combine syntactic SMT and NMT report large gains over both baselines. Authors in~\cite{neubigAtwat2015} used NMT to rescore $n$-best lists which were generated with a syntax-based system. They report that even with 1000-best lists, the gains of using the NMT rescorer often do not saturate. Syntactically Guided NMT~\cite[SGNMT]{sgnmt} constrains the NMT search space to Hiero translation lattices which contain significantly more hypotheses than $n$-best lists. In SGNMT, an NMT beam decoder with a relatively small beam can explore spaces much larger than $n$-best lists, yielding BLEU score improvements with far fewer expensive NMT evaluations. However, these rescoring approaches enforce an exact match between the NMT and syntactic decoders. In general, this kind of hard restriction is best avoided when combining diverse systems~\cite{joint-decoding,pangloss}. For example, in speech recognition, ROVER~\cite{rover} is a system combination approach based on a soft voting scheme. In machine translation, minimum Bayes-risk (MBR) decoding~\cite{mbr} can be used to combine multiple systems~\cite{mbr-morph}. MBR also does not enforce exact agreement between systems as it distinguishes between the {\em hypothesis space} and the {\em evidence space}~\cite{goel2000minimum,tromble-lmbr}. We find that Hiero lattices generated by grammars extracted with the usual heuristics~\cite{hierarchical} do not provide enough variety to explore the full potential of neural models, especially when using NMT ensembles. Therefore, we present a ``soft'' lattice-based combination scheme which uses standard operations on finite state transducers such as composition. Our method replaces the hard combination in previous methods with a similarity measure based on the edit distance, and gives the NMT decoder more freedom to diverge from the Hiero translations. We find that this loose coupling scheme is especially useful when using NMT ensembles. \begin{figure*}[!t] \centering \subfigure[Standard edit distance transducer.]{\label{fig:flower} \hspace{4em}\includegraphics[scale=0.25]{edit_distance_fst.png}\hspace{4em} } \subfigure[Modified edit distance transducer $E$. `a' is an NMT OOV.]{\label{fig:modified-flower} \hspace{4em}\includegraphics[scale=0.25]{edit_distance_fst_modified.png}\hspace{4em} } \caption{``Flower automata'' for calculating edit distances over the alphabet $\{\text{a},\text{b},\text{UNK}\}$.} \label{fig:flowers} \end{figure*} \section{Combining Hiero and NMT via Edit Distance Transducer} \label{sec:combi-edit-distance} In contrast to the strict coupling in SGNMT, we propose to loosely couple Hiero and NMT via an edit distance transducer and shortest distance search. With loose coupling, the NMT decoder is not restricted to the Hiero lattice as in previous work, but runs independently to produce translation lattices on its own, which are then combined with the Hiero lattices. The combination does not require an exact match. Instead, we will describe a procedure for combining NMT and Hiero that captures similarity under the edit distance and both the NMT and Hiero translation system scores. This scheme is implemented efficiently using standard FST operations~\cite{openfst}. First, we introduce the FST composition operation and the edit distance transducer. We will describe the whole pipeline in Sec.~\ref{ssec:loose-coupling}. \subsection{Composition of Finite State Transducers} \label{ssec:fstcompose} The composition of two weighted transducers $T_1$, $T_2$ (denoted as $T_1 \circ T_2$) over a semiring $(\mathbb{K},\oplus,\otimes)$ is defined following~\cite{fstalg} \begin{equation} [T_1 \circ T_2](x,y)=\bigoplus_z T_1(x,z)\otimes T_2(z,y). \end{equation} We will make extensive use of this operation as tool for building complex automata which make use of both the NMT and Hiero translation lattices. \subsection{The Edit Distance Transducer} \label{ssec:edit-distance} Composition can be used together with a ``flower automaton'' to calculate the edit distance between two sequences~\cite{mohri2003edit}. The edit distance transducer shown in Fig.~\ref{fig:flower} transduces a sequence $x$ to another sequence $y$ over the alphabet $\{\text{a},\text{b}\}$ and accumulates the number of edit operations via the transitions with cost 1. In our case, $x$ corresponds to an NMT hypothesis which is to be combined with a Hiero hypothesis $y$. In contrast to SGNMT, where we require an exact match between NMT and Hiero (up to UNKs), our edit-distance-based scheme allows different hypotheses to be combined. We replaced the standard definition of the edit distance transducer~\cite{mohri2003edit} by a finer-grained model designed to work well for combining NMT and Hiero. Instead of uniform costs, we lower the cost for UNK substitutions as we want to encourage substituting NMT UNKs by words in the Hiero translation. We distinguish between three types of edit operations. \begin{itemize} \item {\bf Type I}: Substituting UNK with a word outside the NMT vocabulary is free. \item {\bf Type II}: For substitutions of UNK with a word inside the NMT vocabulary we add the cost $\lambda_{sub}$. \item {\bf Type III}: All other edit operations are penalized with cost $\lambda_{edit}$ (and $\lambda_{edit}>\lambda_{sub}$). \end{itemize} We will refer to the modified edit distance transducer as $E$. Fig.~\ref{fig:modified-flower} shows $E$ over the alphabet $\{\text{a},\text{b},\text{UNK}\}$, with `a' being an NMT OOV. \begin{figure*}[!t] \centering \subfigure[Example Hiero lattice $H$.]{\label{fig:hifst}\includegraphics[width=1\linewidth]{hifst.png}} \subfigure[Example NMT lattice $N$.]{\label{fig:nmt}\includegraphics[width=0.8\linewidth]{nmt.png}} \subfigure[Transducer with UNK insertion arcs: $\text{Replace}(N,\mathtt{UNK},U)$.]{\label{fig:nmt_with_unk}\includegraphics[width=0.96\linewidth]{nmt_with_unk.png}} \subfigure[Best path in the combined transducer $C$. Hiero scores are omitted in this figure.]{\label{fig:bestpath}\includegraphics[width=1\linewidth]{bestpath.png}} \subfigure[Projection of the best path: $\Pi_{UNK}(\text{ShortestPath}(C))$. The final hypothesis is {\em die regionale Politik in Grosswahlstadt darf jedoch nicht leiden}.]{\label{fig:projected}\includegraphics[width=0.93\linewidth]{projected.png}} \caption{Combining Hiero and NMT via edit distance transducer.} \label{fig:edit_distance_coupling} \end{figure*} \begin{figure}[!b] \centering \includegraphics[width=0.8\linewidth]{unk_fst.png} \caption{UNK extension transducer $U$.} \label{fig:unk_fst} \end{figure} \subsection{Loose Coupling of Hiero and NMT} \label{ssec:loose-coupling} Our edit-distance-based scheme combines an NMT translation lattice $N$ with a Hiero translation lattice $H$. Weights in $N$ and $H$ are scaled by $\lambda_{nmt}$ and $\lambda_{hiero}$, respectively. The similarity measure between NMT and Hiero translations is parametrized with $\lambda_{ins}$, $\lambda_{edit}$, and $\lambda_{sub}$. We keep the various costs separated by using transducers with tropical sparse tuple vector semirings~\cite{disambiguation}. Instead of single real-valued arc weights, this semiring uses vectors which can hold multiple features. The inner product of these vectors with a constant parameter vector determines the final weights on the arcs\footnote{The ucam-smt tutorial contains details to the tropical sparse tuple vector semiring: http://ucam-smt.github.io/tutorial/basictrans.html\#lmert\_veclats\_tst}. The sparse tuple vector semiring enables us to optimize the $\lambda$-parameters with LMERT~\cite{lmert} on a development set. Examples for $H$ and $N$ are shown in Fig.~\ref{fig:hifst} and Fig.~\ref{fig:nmt}. The shortest path in $H$ containing the string {\em nicht erlaubt sein sollte zu} has grammatical and stylistic flaws but is complete, whereas there is a better path in $N$ with an UNK. Our goal is to merge these two hypotheses by using the NMT translation in $N$ with the UNK replaced by a word from the Hiero lattice~$H$. \begin{enumerate} \item {\bf Adding UNK insertions}. We found that often NMT produces an isolated UNK token, even if multiple tokens are required. Therefore, we allow extending a single UNK token to a sequence of up to three UNK tokens. This is realized by replacing UNK arcs in $N$ with the transducer $U$ shown in Fig.~\ref{fig:unk_fst} using OpenFST's \texttt{Replace} operation. Fig.~\ref{fig:nmt_with_unk} shows the result of the replace operation when applied to the example lattice $N$ in Fig.~\ref{fig:nmt}. We denote this operation as follows: \begin{equation} \text{Replace}(N,\mathtt{UNK},U) \end{equation} \item {\bf Composition with the edit distance transducer}. The next step finds the edit distances to the Hiero hypotheses as described in Sec.~\ref{ssec:edit-distance}. \begin{equation} C := \text{Replace}(N,\mathtt{UNK},U)\circ E \circ H \end{equation} \item {\bf Shortest path}. The above operation generates very large lattices, and dumping all of them is not feasible. We could use disambiguation~\cite{disambiguation,mohri2015disambiguation} on the combined transducer $C$ to find the best alignment for each unique NMT hypothesis. However, we only need the single shortest path in order to generate the combined translation. \begin{equation} \text{ShortestPath}(C) \end{equation} \item {\bf Projection}. A complete path in the transducer $C$ has an NMT hypothesis on the input labels (marked green in Fig.~\ref{fig:bestpath}) and a Hiero hypothesis on the output labels (marked blue in Fig.~\ref{fig:bestpath}). Therefore, we can generate different translations from the best path in~$C$. If we project the input labels on the output labels with OpenFST's \texttt{Project}, we obtain a hypothesis $\widehat{t}_{NMT}$ in the NMT lattice $N$. \begin{equation} \widehat{t}_{NMT} = \Pi_1(\text{ShortestPath}(C)) \label{eq:loose-nmt} \end{equation} However, $\widehat{t}_{NMT}$ still contains UNKs. If we project on the input labels, we end up with the aligned Hiero hypothesis without UNKs (blue labels in Fig.~\ref{fig:bestpath}) \begin{equation} \widehat{t}_{Hiero} = \Pi_2(\text{ShortestPath}(C)) \label{eq:loose-hiero} \end{equation} but we do not use the NMT translation directly. Therefore, we introduce a new projection function $\Pi_{UNK}$ which switches between preserving symbols on the input and output tapes: if the input label on an arc is UNK, we write the output label over the input label. Otherwise, we write the input label over the output label. This is equivalent to projecting the output labels to the input labels only if the input label is UNK, and then projecting the input labels to the output labels. As shown in Fig.~\ref{fig:projected}, we obtain the NMT hypothesis, but the UNK is replaced by the matching word {\em Grosswahlstadt} from the Hiero lattice. Thus, the final combined translation is described by the following term: \begin{equation} \widehat{t}_{comb} = \Pi_{UNK}(\text{ShortestPath}(C)) \label{eq:loose} \end{equation} \end{enumerate} In general, the final hypothesis $\widehat{t}_{comb}$ is a mix of an NMT and a Hiero hypothesis. We do not search for $\widehat{t}_{comb}$ directly but for pairs of NMT and Hiero translations which optimize the individual model scores as well as the distance between them. Stated more formally, the shortest path in $C$ yields a pair $(\widehat{t}_{NMT},\widehat{t}_{Hiero})$ for which holds \begin{equation} \label{eq:non-fst} \begin{aligned} \widehat{t}_{NMT},\widehat{t}_{Hiero} =\operatornamewithlimits{argmin}_{(t_{N},t_{H})\in N \times H} \Big( d_{edit}(t_{N},t_{H})\\ +\lambda_{nmt}\cdot S_{N}(t_{N}|s)+\lambda_{hiero}\cdot S_{H}(t_{H}|s)\Big) \end{aligned} \end{equation} where $d_{edit}(t_{N},t_{H})$ is the modified edit distance between $t_{N}$ and $t_{H}$ (according $E$ and $U$), and $S_{N}(t_{N}|s)$ and $S_{H}(t_{H}|s)$ are the scores NMT and Hiero assign to the translations given source sentence $s$. If we interpret these scores as negative log-likelihoods, we arrive at a probabilistic interpretation of Eq.~\ref{eq:non-fst}. \begin{equation} \label{eq:non-fst-prob} \begin{aligned} \widehat{t}_{NMT},\widehat{t}_{Hiero} &=\operatornamewithlimits{argmax}_{(t_{N},t_{H})\in N \times H} \Big(\\ & \mathrm{e}^{-d_{edit}(t_{N},t_{H})}\cdot P(t_{N},t_{H}|s) \Big) \\ \end{aligned} \end{equation} with (assuming independence) \begin{equation*} P(t_{N},t_{H}|s):=P_{N}(t_{N}|s)^{\lambda_{nmt}}\cdot P_{H}(t_{H}|s)^{\lambda_{hiero}}. \end{equation*} Eq.~\ref{eq:non-fst-prob} suggests that we maximize the product of two quantities -- the similarity between Hiero and NMT hypotheses and their joint probability. The FST operations allow to optimize over the set $N \times H$ efficiently. Note that the NMT lattice $N$ is rather small in our case ($|N|\leq 20$) due to the small beam size used in NMT decoding. This makes it possible to solve Eq.~\ref{eq:non-fst} almost always without pruning~\footnote{We limit the Hiero lattices to a maximum of 100,000 nodes with OpenFST's \texttt{Prune} to remove the worst outliers.}. \section{Experimental Setup} \label{sec:setup} The parallel training data includes {\em Europarl v7}, {\em Common Crawl}, and {\em News Commentary v10}. Sentence pairs with sentences longer than 80 words or length ratios exceeding 2.4:1 were deleted, as were {\em Common Crawl} sentences from other languages~\cite{langDetect}. We use {\em news-test2014} (the filtered version) as a development set, and keep {\em news-test2015} and {\em news-test2016} as test sets. The NMT systems are built using the Blocks framework~\cite{blocks} based on the Theano library~\cite{theano} with the network architecture and hyper-parameters as in~\cite{bahdanau}: the encoder and decoder networks consist of 1000~gated recurrent units~\cite{choPhraseRepresentation}. The decoder uses a single maxout~\cite{maxout} output layer with the feed-forward attention model described in~\cite{bahdanau}. In our final ensemble, we use 8 independently trained NMT systems with vocabulary sizes between 30,000 and 60,000. Rules for our En-De Hiero system were extracted as described in~\cite{hifst-grammar}. A 5-gram language model for the Hiero system was trained on WMT16 parallel and monolingual data~\cite{Heafield-estimate}. We apply gentle post-processing to the German output for fixing small number and currency formatting issues. The English source sentences in the training corpus are lower-cased. During decoding, we lower case only in-vocabulary words, and pass through OOVs with correct casing. We apply a simple heuristic for recognizing surnames to avoid literal translation of them into German\footnote{We mark a word as surname if it has occurred after a first name, is on a census list of known surnames, and is written with a capitalized initial letter.}. \begin{table*} \small \centering \begin{tabular}{|ll|r|r|r|} \hline \textbf{Setup} && \textbf{news-test2014} & \textbf{news-test2015} & \textbf{news-test2016} \\ \hline \multicolumn{2}{|l|}{Best in competition\footnotemark} & 20.6 & 25.2 & 34.8 \\ \hhline{|==|=|=|=|} \multicolumn{2}{|l|}{Hiero baseline} & 18.9 & 21.2 & 26.0 \\ \hline Single NMT & Pure NMT & 17.5 & 19.6 & 23.2 \\ & SGNMT (lattice rescoring) & 21.2 & 23.5 & 28.7 \\ & Edit distance transducer based combination & 21.7 & 24.1 & 28.6 \\ \hline Ensemble NMT & Pure NMT & 19.4 & 21.7 & 25.4 \\ & SGNMT (lattice rescoring) & 21.9 & 24.6 & 29.7 \\ & Edit distance transducer based combination & {\bf 22.9} & {\bf 25.7} & {\bf 31.3} \\ \hline \end{tabular} \caption{\label{tab:results} English-German lower-cased BLEU scores calculated with Moses \texttt{mteval-v13a.pl}.} \end{table*} \begin{table}[t!] \small \centering \begin{tabular}{|l|r|} \hline {\bf Method} & {\bf BLEU} \\ \hline NMT baseline: $\text{ShortestPath}(N)$ & 25.4 \\ Hiero baseline: $\text{ShortestPath}(H)$ & 26.4 \\ \hline NMT hypothesis used for combination: $\widehat{t}_{NMT}$ & 26.7 \\ Hiero hypothesis used for combination: $\widehat{t}_{Hiero}$ & 30.4 \\ Combined translation: $\widehat{t}_{comb}$ & 31.3 \\ \hline \end{tabular} \caption{\label{tab:projection} Projection methods on {\em news-test2016} with NMT 8-ensemble. } \end{table} \section{Results} \label{sec:results} \begin{table*} \small \centering \begin{tabular}{|l|r|r|} \hline {\bf Distance measure component} & {\bf Avg.\ number per sentence} & {\bf Percentage of affected sentences} \\ \hline UNK insertions ($U$) & 0.16 & 12.9\% \\ UNK$\rightarrow$non-OOV substitutions (Type II) & 1.34 & 55.9\% \\ Other edit operations (Type III) & 1.74 & 61.7\% \\ \hline \end{tabular} \caption{\label{tab:alignment} Breakdown of the distances measured between NMT and Hiero along the shortest path in $C$ on {\em news-test2016}.} \end{table*} \footnotetext{http://matrix.statmt.org/} Tab.~\ref{tab:results} reports performance on {\em news-test2014}, {\em news-test2015}, and {\em news-test2016}\footnote{The code we used for SGNMT and ensembling is available at http://ucam-smt.github.io/sgnmt/html/.}. Similarly to previous work~\cite{sgnmt}, we observe that rescoring Hiero lattices with NMT (SGNMT) outperforms both NMT and Hiero baselines significantly on all test sets. For SGNMT, we see further improvements of between +0.7 BLEU ({\em news-test2014}) and +1.1 BLEU ({\em news-test2015}) by using NMT ensembles rather than single NMT. However, these gains are rather small considering the improvements from using ensembles for the (pure) NMT baseline (between +1.9 BLEU and +2.2 BLEU). Our combination scheme makes better use of the ensembles. We report 31.3 BLEU on {\em news-test2016}, which in the English-German WMT'16 evaluation is among the best systems (within 0.1 BLEU) which do not use back-translation~\cite{backtranslation}. Back-translation is a technique for making use of monolingual data in NMT training, and we expect our system could benefit from back-translation, although we leave this analysis to future work. The combination procedure we propose is non-trivial. It is not immediately clear how the gains arise as the final scores are mixtures between edit distance costs, NMT scores, and Hiero scores. In the remainder we will try to provide some insight. Unless stated otherwise, we report investigations into the Hiero + NMT 8-system ensemble which yields the best results in Tab.~\ref{tab:results}. \begin{figure}[b!] \centering \includegraphics[width=1\linewidth]{nbest-lookup.png} \caption{Percentage of $\widehat{t}_{Hiero}$ hypotheses found in the baseline Hiero $n$-best list.} \label{fig:nbest-lookup} \end{figure} First, we focus on the projection function $\Pi_{UNK}(\cdot)$ which switches between preserving the input and output label at the UNK symbol to produce the combined translation $\widehat{t}_{comb}$ (Eq.~\ref{eq:loose}). As explained in Sec.~\ref{ssec:loose-coupling}, we can use OpenFST's \texttt{Project} operation to fetch the NMT and Hiero hypotheses $\widehat{t}_{NMT}$ and $\widehat{t}_{Hiero}$ which have been used to produce the combined translation (Eq.~\ref{eq:loose-nmt} and \ref{eq:loose-hiero}). Tab.~\ref{tab:projection} shows that the hypotheses that are aligned in the final transducer are often not the 1-best translations of any of the baseline systems. Remarkably, using the $\widehat{t}_{Hiero}$ translations results in 30.4 BLEU, which is a very substantial improvement over the baseline Hiero system (26.0 BLEU). Note that this BLEU score is achieved with hypotheses from the original Hiero lattice $H$ but weighted in combination with the NMT scores and the edit distance. However, these selected paths are often given very low scores by Hiero: in only 8.6\% of the sentences is the Hiero hypothesis left unchanged. If we look for $\widehat{t}_{Hiero}$ in the Hiero $n$-best list, we find that even very deep 20,000-best lists contain only 63.5\% of the Hiero hypotheses which were selected by the combination scheme (Fig.~\ref{fig:nbest-lookup}). This indicates the benefit in using lattice-based approaches over $n$-best lists. Next, we investigate the distance measure between NMT and Hiero translations, which is realized with the UNK insertion transducer $U$ and the modified edit distance transducer $E$ (Sec.~\ref{ssec:loose-coupling}). Tab.~\ref{tab:alignment} shows that UNK insertions are relatively rare compared to the edit operations of types II and III allowed by $E$ (Sec.~\ref{ssec:loose-coupling}). The average edit distance between NMT and Hiero disregarding UNKs on the best path (type III) is 1.74. In 61.7\% of the cases the input and output labels differ not only at UNK -- i.e.\ in only 38.3\% of the sentences do we have an exact match between NMT and Hiero. We note that UNK is often replaced with an NMT in-vocabulary word (55.9\% of the sentences). It seems that NMT often produces an UNK even if a better word is in the NMT vocabulary. This could be due to the over-representation of UNK in the NMT training corpus. To study the effectiveness of our edit distance transducer based combination scheme in correcting NMT UNKs, we trained individual NMT systems with vocabulary sizes between 10,000 and 60,000. Tab.~\ref{tab:voc-size} shows that nearly one in six tokens (16.3\%) produced by our pure NMT system with a vocabulary size of 30,000 are UNKs. Increasing the NMT vocabulary to 50k or 60k does improve pure NMT very significantly, but results show that these improvements are already captured by the combination scheme with Hiero. As in the literature, we see large variation in performance over individual NMT systems even with the same vocabulary size~\cite{bpe}, which could explain the small performance drop when increasing the vocabulary size from 50k to 60k. \begin{table}[t!] \small \centering \begin{tabular}{|r|r|r|r|} \hline {\bf Vocabulary} & \multicolumn{2}{c|}{{\bf Pure NMT}} & {\bf NMT+Hiero} \\ \multicolumn{1}{|c|}{{\bf size}} & {\bf BLEU} & {\bf \# of UNKs} & \multicolumn{1}{c|}{{\bf BLEU}} \\ \hline 10,000 & 18.9 & 18.0\% & 28.1 \\ 30,000 & 21.6 & 16.3\% & 28.8 \\ 50,000 & 23.2 & 9.1\% & 28.6 \\ 60,000 & 22.9 & 9.9\% & 28.5 \\ \hline \end{tabular} \caption{\label{tab:voc-size} BLEU scores on {\em news-test2016} for different vocabulary sizes (single NMT). Each individual NMT system is combined with Hiero as described in Sec.~\ref{ssec:loose-coupling}.} \end{table} \begin{figure}[t!] \centering \includegraphics[width=1\linewidth]{ensemble-size.png} \caption{BLEU score over the number of systems in the ensemble on {\em news-test2016}.} \label{fig:ensemble-size} \end{figure} One important practical issue for system building is the number of systems to be ensembled as training each individual NMT system takes a significant amount of time. Fig.~\ref{fig:ensemble-size} indicates that even for 8-ensembles the gains for pure NMT do not seem to saturate. The combination with Hiero via edit distance transducer also greatly benefits from using ensembles, but most of the gains are gotten with fewer systems. \section{Conclusion and Future Work} \label{sec:conclusion} We have presented a method based on the edit distance that is effective in combining Hiero SMT systems with NMT ensembles. Our approach makes use of standard WFST operations, and we showed the effectiveness of the approach with a successful WMT'16 submission for English-German. In the future, we are planning to add back-translation~\cite{backtranslation} and investigate the use of character- or subword-based NMT~\cite{bpe,chitnis-denero:2015:EMNLP,char-nmt,no-seg-nmt,hybrid-nmt} within our combination framework. \section*{Acknowledgements} This work was supported by the U.K. Engineering and Physical Sciences Research Council (EPSRC grant EP/L027623/1).
{'timestamp': '2016-06-17T02:00:37', 'yymm': '1606', 'arxiv_id': '1606.04963', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04963'}
arxiv
\section{Introduction} A fundamental challenge of computational neuroscience is to understand how information about the external world is processed and represented in the brain. Each individual neuron aggregates the incoming information into a single sequence of spikes--an output which is too simplistic by itself to capture the full complexity of sensory input. Only by combining the signals from massive ensembles of neurons is it possible to reconstruct our complex representation of the world. Nevertheless, neurons form hierarchies of specialization within neural circuits, which are further organized in various specialized regions of the brain. At the lowest level of the hierarchy--individual neurons, it is possible to infer and interpret the functional relationship between a neuron and stimulus features of interest using single-cell recording technologies. Due to the inherent stochasticity of the neural output, it is natural to view the neuron as a noisy channel, and use mutual information to quantify how much of the stimulus information is encoded by the neuron. Moving up the hierarchy to the the macroscale level of organization in the brain requires both different experimental methodologies and new approaches for summarizing and inferring measures of information in the brain. Shannon's mutual information $I(X; Y)$ is fundamentally a measure of dependence between random variables $X$ and $Y$, and is defined as \[ I(X;Y) = \int p(x, y) \log \frac{p(x, y)}{p(x)p(y)}dxdy. \] Various properties of $I(X; Y)$ make it ideal for quantifying the information between a random stimulus $X$ and the signaling behavior of an ensembles of neurons, $Y$ [1]. A leading metaphor is that of a noisy communications channel; the mutual information describes the rate at which $Y$ can communicate bits from $X$. This framework is well-suited for summarizing the properties of a single neuron coding external stimulus information; indeed, experiments studying the properties of a single or a small number of neurons often make use of the concept of mutual information in summarizing or interpreting their results [2]. See discussions in [3]. However, estimating mutual information for multiple channels requires large and over-parameterized generative models. Machine learning algorithms showed a way forward: a seminal work by Haxby [4] proposed to quantify the information in multiple channels by measuring how well the stimulus can be identified from the brain responses, in what is known as ``multivariate pattern analysis'' (MVPA). To demonstrate that a particular brain region responds to a certain type of sensory information, one employs supervised learning to build a classifier that classifies the stimulus class from the brain activation in that region. Classifiers that achieve above-chance classification accuracy indicate that information from the stimulus is represented in the brain region. In principle, one could just as well test the statistical hypothesis that the Fisher information or mutual information between the stimulus and the activation patterns is nonzero. But in practice, the machine learning approach enjoys several advantages: First, it is invariant to the parametric representation of the stimulus space, and is opportunistic in the parameterization of the response space. This is an important quality for naturalistic stimulus-spaces, such as faces or natural images. Second, it scales better with the dimensionality of both the stimulus space and the responses space, because a slimmer discriminative model can be used rather than a fully generative model. Nevertheless, classification error is problematic for quantifying the strength of the relation between stimulus and outputs due to its arbitrary scale and strong dependence on experimental choices. Classification accuracy depends on the particular choice of stimuli exemplars employed in the study and the number of partitions ($k$) used to define the classes for the classification task. The difficulty of the classification task depends on the number of classes defined: high classification accuracy can be achieved relatively easily by using a coarse partition of stimuli exemplars into classes. Often $k$ is an arbitrary design constraint, and researchers try to extrapolate the error for alternative number of classes [5]. In a meta-analysis on visual decoding, Coutanche et al (2016) [6] quantified the strength of a classification study using the formula \[ \text{decoding strength} = \frac{\text{accuracy} - \text{chance}}{\text{chance}}. \] Such an approach may compensate for the differences in accuracy due purely to choice of number of classes defined; however, no theory is provided to justify the formula. In contrast, mutual information has ideal properties for quantitatively comparing information between different studies, or between different brain regions, subjects, feature-spaces, or modalities. Not only is the mutual information defined independently of the arbitrary definition of stimulus classes (albeit still dependent on an implied distribution over stimuli), it is even meaningful to discuss the difference between the mutual information measured for one system and the mutual information for a second system. Hence, a popular approach which combines the strengths of the machine learning approach and the advantages of the information theoretic approach is to obtain a lower bound on the mutual information by using the confusion matrix of a classifier. Treves [7] first proposed using the empirical mutual information of the classification matrix in order to obtain a lower bound of the mutual information $I(X; Y)$; this confusion-matrix-based lower bound has subsequently enjoyed widespread use in the MVPA literature [2]. Even earlier that this, the idea of linking classification performance to mutual information can be found in the beginnings of information theory. Fano's inequality provides a lower bound on mutual information in relation to the optimal prediction error, or Bayes error. In practice, the bound obtained may be a vast underestimate [8]. \subsection{Our contributions} In this paper, we propose a new way to link classification performance to the implied mutual information. To create this link we need to overcome the arbitrary choice of exemplars, and the arbitrary number of classes k. Towards this end, we define a notion of $k$-class \emph{average Bayes error} which is uniquely defined for any given stimulus distribution and stochastic mapping from stimulus to response. The $k$-class average Bayes error is the expectation of the Bayes error (the classification error of the optimal classifier) when $k$ stimuli exemplars are drawn i.i.d. from the stimulus distribution, and treated as distinct classes. Hence the average Bayes error can in principle be estimated if the appropriate randomization is employed for designing the experiment. Specifically, we establish a relationship between the mutual information $I(X; Y)$ and the average $k$-class Bayes error, $e_{ABE, k}$. In short, we will identify a function $\pi_k$ (which depends on $k$), \begin{equation}\label{abepi} e_{ABE, k} \approx \pi_k(\sqrt{2 I(X; Y)}) \end{equation} and that this approximation becomes accurate under a limit where $I(X; Y)$ is small relative to the dimensionality of $X$, and under the condition that the components of $X$ are approximately independent. The function $\pi_k$ is given by \[ \pi_k(c) = 1 - \int_{\mathbb{R}} \phi(z - c) \Phi(z)^{k-1} dz. \] This formula is not new to the information theory literature: it appears as the error rate of an orthogonal constellation [9]. What is surprising is that the same formula can be used to approximate the error rate in much more general class of classification problems\footnote{An intuitive explanation for this fact is that points from any high-dimensional distribution lie in an orthogonal configuration with high probability.}--this is precisely the universality result which provides the basis for our proposed estimator. Figure \ref{fig:pi} displays the plot of $\pi_k$ for several values of $k$. For all values of $k$, $\pi_k(\mu)$ is monotonically decreasing in $\mu$, and tends to zero as $\mu \to \infty$, which is what we expect since if $I(X; Y)$ is large, then the average Bayes error should be small. Another intuitive fact is that $ \pi_k(0) = 1 - \frac{1}{k}, $ since after all, an uninformative response cannot lead to above-chance classification accuracy. \begin{figure} \centering \begin{tabular}{ccrl} \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0 0.2in 0 0.5in]{illus_piK_flat.pdf}} & \multirow{5}{*}{\includegraphics[scale = 0.5, clip=true, trim=0 0.2in 0.4in 0.5in]{ihat_comp.pdf}} & & \\ & & & \\ & & \crule[color3]{0.2cm}{0.2cm} & $\hat{I}_{HD}$\\ & & \crule[color1]{0.2cm}{0.2cm} & $\hat{I}_{Fano}$\\ & & & \\ & & & \\ & & & \\ & & & \end{tabular} \caption{Left: The function $\pi_k(\mu)$ for $k = \{2, 10\}$. Right: $\hat{I}_{HD}$ with $\hat{I}_{Fano}$ as functions of $\hat{e}_{gen}$, for $k = 3$. While $\hat{I}_{Fano}$ is bounded from above by $\log(k)$ (dotted line), $\hat{I}_{HD}$ is unbounded. \label{fig:pi}} \end{figure} The estimator we propose is \[ \hat{I}_{HD} = \frac{1}{2}(\pi_{k}^{-1}(\hat{e}_{gen, \alpha}))^2, \] obtained by inverting the relation \eqref{abepi}, then substituting an estimate of generalization error $\hat{e}_{gen, \alpha}$ for the $e_{ABE, k}$. As such, our estimator can be directly compared to the $\hat{I}_{Fano}$, since both are functions of $\hat{e}_{gen,\alpha}$ (Figure 1.) As the estimate of generalization error goes to zero, $\hat{I}_{Fano}$ approaches $\log(k)$ while $\hat{I}_{HD}$ goes to infinity. This difference in behavior is due to the fact that in contrast to Fano's inequality, the asymptotic relationship \eqref{abepi} is independent of the number of classes $k$. In the paper we argue for the advantages of our method in comparison to alternative discriminative estimators under the assumption that the discriminative model approximates the Bayes rule. While this is an unrealistic assumption, it simplifies the theoretical discussion, and allows us to clearly discuss the principles behind our method. Alternatively, we can take the view that any observed classification error is a lower bound on the Bayes prediction, therefore interpreting our result as establishing a usually tighter lower bound on $I(X,Y)$. The organization of the paper is as follows. We outline our framework in Section 2.1. In Section 2.2 we present our key result, which links the asymptotic average Bayes error to the mutual information, under an asymptotic setting intended to capture the notion of high dimensionality\footnote{Namely, one where the number of classes is fixed, and where the information $I(X; Y)$ remains fixed, while the dimensionality of the input $X$ and output $Y$ both grow to infinity. We make a number of additional regularity conditions to rule out scenarios where $(X, Y)$ is really less ``high-dimensional'' than it appears, since most of the variation is captured a low-dimensional manifold. }. In Section 2.3 we apply this result to derive our proposed estimator, $\hat{I}_{HD}$ (where HD stands for ``high-dimensional.'') Section 3 presents simulation results, and Section 4 concludes. All proofs are given in the supplement. \section{Theory} \subsection{Setting} Let us assume that the variables $X, Y$ have a joint distribution $F$, and that one can define a conditional distribution of $Y$ given $X$, $Y|X \sim F_X,$ and let $G$ denote the marginal distribution of $X$. We assume that data is collected using \emph{stratified sampling}. For $j = 1,\hdots, k$, sample i.i.d. \emph{exemplars} $X^{(1)},\hdots, X^{(k)} \sim G$. For $i = 1,\hdots, n$, draw $Z^i$ iid from the uniform distribution on $1,\hdots, k$, then draw $Y^i$ from the conditional distribution $F_{X^{(Z_i)}}$. Stratified sampling is commonly seen in controlled experiments, where an experimenter chooses an input $X$ to feed into a black box, which outputs $Y$. An example from fMRI studies is an experimental design where the subject is presented a stimulus $X$, and the experimenter measures the subject's response via the brain activation $Y$. \footnote{Note the asymmetry in our definition of stratified sampling: our convention is to take $X$ to be the variable preceding $Y$ in causal order. Such causal directionality constrains the stratified sampling to have repeated $X$ rather than repeated $Y$ values, but has no consequence for the mutual information $I(X; Y)$, which is a symmetric function.} When stratified sampling is employed, one can define an \emph{exemplar-based} classification task. One defines the \emph{class function} $Z$ by \[ Z: \{X^{(1)}, \hdots, X^{(k)}\} \to \{1,\hdots, k\}, \] \[ Z(X^{(i)}) = i\text{ for }i = 1, \hdots, k. \] One defines the generalization error by \begin{equation}\label{egendef} e_{gen}(f) = \frac{1}{k} \sum_{i=1}^k\Pr[f(Y) \neq Z|X = X^{(i)}]. \end{equation} In an exemplar-based classification, there is no need to specify an arbitrary partition on the input space (as is the case in category-based classification), but note that the $k$ classes are \emph{randomly} defined. One consequence is that the Bayes error $e_{Bayes}$ is a random variable: when the sampling produces $k$ similar exemplars, $e_{Bayes}$ will be higher, and when the sampling produces well-separated exemplars $e_{Bayes}$ may be lower. Therefore, it is useful to consider the \emph{average Bayes error}, \begin{equation}\label{abedef} e_{ABE, k} = \textbf{E}_{X^{(1)},\hdots, X^{(k)}}[e_{Bayes}], \end{equation} where the expectation is taken over the joint distribution of $X^{(1)},\hdots, X^{(k)} \stackrel{iid}{\sim} G$. We use the terminology \emph{classifier} to refer to any algorithm which takes data as input, and produces a classification rule $f$ as output. Mathematically speaking, the classifier is a functional which maps a set of observations to a classification rule, $ \mathcal{F}: \{(x^{1},y^{1}),\hdots, (x^{m}, y^{m})\} \mapsto f(\cdot). $ The data $(x^1,y^1),\hdots, (x^m, y^m)$ used to obtain the classification rule is called \emph{training data.} When the goal is to obtain \emph{inference} about the generalization error $e_{gen}$ of the classification rule $f$, it becomes necessary to split the data into two independent sets: one set to train the classifier, and one to evaluate the performance. The reason that such a splitting is necessary is because using the same data to test and train a classifier introduces significant bias into the empirical classification error [10]. The classification rule is obtained via $ f = \mathcal{F}(S_{train}), $ where $S_{train}$ is the training set, and the performance of the classifier is evaluated by predicting the classes of the test set. The results of this test are summarized by a $k \times k$ \emph{confusion matrix} $M$ with $ M_{ij} = \sum_{\ell=r_1 + 1}^r I(f(y^{(i), r}) = j). $ The $i, j$th entry of $M$ counts how many times a output in the $i$th class was classified to the $j$th class. The \emph{test error} is the proportion of off-diagonal terms of $M$, $ e_{test} = \frac{1}{kr} \sum_{i \neq j} M_{ij}, $ and is an unbiased estimator of $e_{gen}$. However, in small sampling regimes the quantity $e_{test}$ may be too variable to use as an estimator of $e_{gen}$. We recommend the use of Bayesian smoothing, defining an $\alpha$-smoothed estimate $\hat{e}_{gen, \alpha}$ by $ \hat{e}_{gen, \alpha} = (1 - \alpha) e_{test} + \alpha \frac{k-1}{k}, $ which takes a weighted average of the unbiased estimate $e_{test}$, and the natural prior of \emph{chance classification}. We define a discriminative estimator to be a function which maps the misclassification matrix to a positive number, $ \hat{I}: \mathbb{N}^{k \times k} \to \mathbb{R}. $ We are aware of the following examples of discriminative estimators: (1) estimators $\hat{I}_{Fano}$ derived from using Fano's inequality, and (2) the empirical information of the confusion matrix, $\hat{I}_{CM}$, as introduced by Treves [7]. We discuss these estimators in Section 3. \subsection{Universality result} We obtain the universality result in two steps. First, we link the average Bayes error to the moments of some statistics $Z_i$. Secondly, we use taylor approximation in order to express $I(X; Y)$ in terms of the moments of $Z_i$. Connecting these two pieces yields the formula \eqref{abepi}. Let us start by rewriting the average Bayes error: \[ e_{ABE, k} = \Pr[p(Y|X_1) \leq \max_{j \neq 1} p(Y|X_j)| X = X_1]. \] Defining the statistic $Z_i = \log p(Y|X_i) - \log p(Y|X_1)$, where $Y \sim p(y|X_1)$, we obtain $ e_{ABE} = \Pr[\max_{j > 1} Z_i > 0]. $ The key assumption we need is that $Z_2,\hdots, Z_k$ are asymptotically multivariate normal. If so, the following lemma allows us to obtain a formula for the misclassification rate. \textbf{Lemma 1. } \emph{ Suppose $(Z_1, Z_2, \hdots, Z_k)$ are jointly multivariate normal, with $\textbf{E}[Z_1 - Z_i]= \alpha$, $\text{Var}(Z_1) = \beta \geq 0$, $\text{Cov}(Z_1, Z_i) = \gamma$, $\text{Var}(Z_i)= \delta$, and $\text{Cov}(Z_i, Z_j) = \epsilon$ for all $i, j = 2, \hdots, k$, such that $\beta + \epsilon - 2\gamma > 0$. Then, letting \[ \mu = \frac{\textbf{E}[Z_1 - Z_i]}{\sqrt{\frac{1}{2}\text{Var}(Z_i - Z_j)}} = \frac{\alpha}{\sqrt{\delta - \epsilon}}, \] \[ \nu^2 = \frac{\text{Cov}(Z_1 -Z_i, Z_1 - Z_j)}{\frac{1}{2}\text{Var}(Z_i - Z_j)} = \frac{\beta + \epsilon - 2\gamma}{\delta - \epsilon}, \] we have \begin{align*} \Pr[Z_1 < \max_{i=2}^k Z_i] &= \Pr[W < M_{k-1}] \\&= 1 - \int \frac{1}{\sqrt{2\pi\nu^2}} e^{-\frac{(w-\mu)^2}{2\nu^2}} \Phi(w)^{k-1} dw, \end{align*} where $W \sim N(\mu, \nu^2)$ and $M_{k-1}$ is the maximum of $k-1$ independent standard normal variates, which are independent of $W$. } To see why the assumption that $Z_2,\hdots, Z_k$ are multivariate normal might be justified, suppose that $X$ and $Y$ have the same dimensionality $d$, and that joint density factorizes as \[ p(x^{(j)}, y) = \prod_{i=1}^d p_i(x^{(j)}_i, y_i) \] where $x_i^{(j)}, y_i$ are the $i$th scalar components of the vectors $x^{(j)}$ and $y$. Then, \[ Z_i = \sum_{m=1}^d \log p_m(y_m | x^{(i)}_m) - \log p_m(y_m | x^{(m)}_1) \] where $x_{i, j}$ is the $i$th component of $x_j$. The $d$ terms $\log p_m(y_m | x_{m, i}) - \log p_m(y_m | x_{m, 1})$ are independent across the indices $m$, but dependent between the $i = 1,\hdots, k$. Therefore, the multivariate central limit theorem can be applied to conclude that the vector $(Z_2,\hdots, Z_k)$ can be scaled to converge to a multivariate normal distribution. While the componentwise independence condition is not a realistic assumption, the key property of multivariate normality of $(Z_2,\hdots, Z_k)$ holds under more general conditions, and appears reasonable in practice. It remains to link the moments of $Z_i$ to $I(X;Y)$. This is accomplished by approximating the logarithmic term by the Taylor expansion \[ \log \frac{p(x, y)}{p(x) p(y)} \approx \frac{p(x, y) - p(x) p(y)}{p(x) p(y)} - \left(\frac{p(x, y) - p(x) p(y)}{p(x) p(y)}\right)^2 + \hdots. \] A number of assumptions are needed to ensure that needed approximations are sufficiently accurate; and additionally, in order to apply the central limit theorem, we need to consider a \emph{limiting sequence} of problems with increasing dimensionality. We now state the theorem. \textbf{Theorem 1.} \emph{Let $p^{[d]}(x, y)$ be a sequence of joint densities for $d = 1,2,\hdots$. Further assume that \begin{itemize} \item[A1.] $\lim_{d \to \infty} I(X^{[d]}; Y^{[d]}) = \iota < \infty.$ \item[A2.] There exists a sequence of scaling constants $a_{ij}^{[d]}$ and $b_{ij}^{[d]}$ such that the random vector $(a_{ij}\ell_{ij}^{[d]} + b_{ij}^{[d]})_{i, j = 1,\hdots, k}$ converges in distribution to a multivariate normal distribution, where $\ell_{ij} = \log p(y^{(i)}|x^{(i)})$ for independent $y^{(i)} \sim p(y|x^{(i)})$. \item[A3.] Define \[ u^{[d]}(x, y) = \log p^{[d]}(x, y) - \log p^{[d]}(x) - \log p^{[d]}(y). \] There exists a sequence of scaling constants $a^{[d]}$, $b^{[d]}$ such that \[ a^{[d]}u^{[d]}(X^{(1)}, Y^{(2)}) + b^{[d]} \] converges in distribution to a univariate normal distribution. \item[A4.] For all $i \neq k$, \[\lim_{d \to \infty}\text{Cov}[u^{[d]}(X^{(i)}, Y^{(j)}), u^{[d]}(X^{(k)}, Y^{(j)})] = 0.\] \end{itemize} Then for $e_{ABE, k}$ as defined above, we have \[ \lim_{d \to \infty} e_{ABE, k} = \pi_k(\sqrt{2 \iota}) \] where \[ \pi_k(c) = 1 - \int_{\mathbb{R}} \phi(z - c) \Phi(z)^{k-1} dz \] where $\phi$ and $\Phi$ are the standard normal density function and cumulative distribution function, respectively.} Assumptions A1-A4 are satisfied in a variety of natural models. One example is a multivariate Gaussian sequence model where $X \sim N(0, \Sigma_d)$ and $ Y = X + E $ with $ E \sim N(0, \Sigma_e), $ where $\Sigma_d$ and $\Sigma_e$ are $d \times d$ covariance matrices, and where $X$ and $E$ are independent. Then, if $d \Sigma_d$ and $\Sigma_e$ have limiting spectra $H$ and $G$ respectively, the joint densities $p(x, y)$ for $d = 1,\hdots, $ satisfy assumptions A1 - A4. Another example is the multivariate logistic model, which we describe in Section 3. We further discuss the rationale behind A1-A4 in the supplement, along with the detailed proof. \subsection{High-dimensional estimator} As stated in the introduction, we propose the estimator \[ \hat{I}_{HD}(M) = \frac{1}{2}(\pi_{k}^{-1}(\hat{e}_{gen, \alpha}))^2. \] For sufficiently high-dimensional problems, $\hat{I}_{HD}$ can accurately recover $I(X; Y) > \log k$, supposing also that the classifier $\mathcal{F}$ consistently estimates the Bayes rule. The number of observations needed depends on the convergence rate of $\mathcal{F}$ and also the complexity of estimating $e_{gen, \alpha}$. Therefore, without making assumptions on $\mathcal{F}$, the sample complexity is at least exponential in $I(X; Y)$. This is because when $I(X; Y)$ is large relative to $\log(k)$, the Bayes error $e_{ABE, k}$ is exponentially small. Hence $O(1/e_{ABE, k})$ observations in the test set are needed to recover $e_{ABE, k}$ to sufficient precision. While the sample complexity exponential in $I(X; Y)$ is by no means ideal, by comparison, the nonparametric estimation approaches have a complexity exponential in the dimensionality. Hence, $\hat{I}_{HD}$ is favored over nonparametric approaches in settings with high dimensionality and low signal-to-noise ratio. \section{Simulation} We compare the discriminative estimators $\hat{I}_{CM}$, $\hat{I}_{Fano}$, $\hat{I}_{HD}$ with a nonparametric estimator $\hat{I}_0$ in the following simulation, and the correctly specified parametric estimator $\hat{I}_{MLE}$. We generate data according to a multiple-response logistic regression model, where $ X \sim N(0, I_p) $, and $Y$ is a binary vector with conditional distribution \[ Y_i|X = x \sim \text{Bernoulli}(x^T B_i) \] where $B$ is a $p \times q$ matrix. One application of this model might be modeling neural spike count data $Y$ arising in response to environmental stimuli $X$ [12]. We choose the naive Bayes for the classifier $\mathcal{F}$: it is consistent for estimating the Bayes rule. \begin{figure} \begin{center} \begin{tabular}{ccrl} &\multirow{10}{*}{\includegraphics[scale = 0.5, clip=true, trim=0.4in 0.5in 0 0.5 in]{fig4b.pdf}}&&\\ & Sampling distribution of $\hat{I}$& &\\ & & &\\ & & \crule[color3]{0.2cm}{0.2cm} &$\hat{I}_{HD}$\\ & & \crule[black]{0.2cm}{0.2cm} &$\hat{I}_{MLE}$\\ & &\crule[color4]{0.2cm}{0.2cm} &$\hat{I}_{0}$ \\ $\hat{I}$& & \crule[color1]{0.2cm}{0.2cm} &$\hat{I}_{CM}$\\ & & \crule[color2]{0.2cm}{0.2cm} &$\hat{I}_{Fano}$\\ & & &\\ & & &\\ & & &\\ & $I(X; Y)$& &\\ \end{tabular} \end{center} \caption{Sampling distributions of $\hat{I}$ for data generated from the multiple-response logistic model. $p = q = 10$; $k= 20$; $B = sI_{10}$, where $s \in [0, \sqrt{200}]$; and $r = 1000$.} \end{figure} The estimator $\hat{I}_{Fano}$ is based on Fano's inequality, which reads \[ H(Z|Y) \leq H(e_{Bayes}) + e_{Bayes} \log ||\mathcal{Z}| - 1| \] where $H(e)$ is the entropy of a Bernoulli random variable with probability $e$. Replacing $H(Z|Y)$ with $H(X|Y)$ and replacing $e_{Bayes}$ with $\hat{e}_{gen, \alpha}$, we get the estimator \[ \hat{I}_{Fano}(M) = log(K) - \hat{e}_{gen, \alpha} log(K-1) + \hat{e}_{gen, \alpha} log(p) + (1-\hat{e}_{gen, \alpha}) log(1-\hat{e}_{gen, \alpha}). \] Meanwhile, the confusion matrix estimator computes \[ \hat{I}_{CM}(M) = \frac{1}{k^2} \sum_{i=1}^k \sum_{j=1}^k \log \frac{M_{ij}}{r/k}, \] which is the empirical mutual information of the discrete joint distribution $(Z, f(Y))$. It is known that $\hat{I}_{CM}$, $\hat{I}_0$ tend to underestimate the mutual information. Quiroga et al. [2] discussed two sources of `information loss' which lead to $\hat{I}_{CM}$ underestimating the mutual information: the discretization of the classes, and the error in approximating the Bayes rule. Meanwhile, Gastpar et al. [11] showed that $\hat{I}_0$ is biased downwards due to undersampling of the exemplars: to counteract this bias, they introduce the anthropic correction estimator $\hat{I}_\alpha$\footnote{However, without a principled approach to choose the parameter $\alpha \in (0,1]$, $\hat{I}_\alpha$ could still vastly underestimate or overestimate the mutual information.}. In addition to the sources of information loss discussed by Quiroga et al., an additional reason why $\hat{I}_{CM}$ and $\hat{I}_{Fano}$ underestimate the mutual information is that they are upper bounded by $\log(k)$, where $k$ is the number of classes. As $I(X; Y)$ exceeds $\log(k)$, the estimate $\hat{I}$ can no longer approximate $I(X; Y)$, even up to a constant factor. In contrast, $\hat{I}_{HD}$ is unbounded and may either underestimate or overestimate the mutual information in general, but performs well when the high-dimensionality assumption is met. In Figure 2 we show the sampling distributions of the five estimators as $I(X; Y)$ is varied in the interval $[0, 4]$. The estimator $\hat{I}_{MLE}$ is a plug-in estimator using $\hat{B}$, the coefficient matrix estimated via multinomial regression of $Y$ on $X$; it recovers the true mutual information within $\pm 2\%$ with a probability of 90\%. We see that $\hat{I}_{CM}$, $\hat{I}_{Fano}$, and $\hat{I}_0$ indeed begin to asymptote as they approach $\log(k) = 2.995$. In contrast, $\hat{I}_{HD}$ remains a good approximation of $I(X; Y)$ within the range, although it begins to overestimate at the right endpoint. The reason why $\hat{I}_{HD}$ loses accuracy as the true information $I(X; Y)$ increases is that the multivariate normality approximation used to derive the estimator becomes less accurate when the conditional distribution $p(y|x)$ becomes highly concentrated. \section{Discussion} Discriminative estimators of mutual information have the potential to estimate mutual information in high-dimensional data without resorting to fully parametric assumptions. However, a number of practical considerations also limit their usage. First, one has to find a good classifier $\mathcal{F}$ for the data: techniques for model selection can be used to choose $\mathcal{F}$ from a large library of methods. However, there is no way to guarantee how well the chosen classifier approximates the optimal classification rule. Secondly, one has to estimate the generalization error from test data: the complexity of estimating $e_{gen}$ could become the bottleneck when $e_{gen}$ is close to 0. Thirdly, for previous estimators $\hat{I}_{Fano}$ and $\hat{I}_{CM}$, the ability of the estimator to distinguish high values of $I(X; Y)$ is limited by the number of classes $k$. Our estimator $\hat{I}_{HD}$ is subject to the first two limitations, along with any conceivable discriminative estimator, but overcomes the third limitation under the assumption of stratified sampling and high dimensionality. It can be seen that additional assumptions are indeed needed to overcome the third limitation, the $\log(k)$ upper bound. Consider the following worst-case example: let $X$ and $Y$ have joint density $ p(x, y) = \frac{1}{k}I(\lfloor kx \rfloor = \lfloor ky \rfloor) $ on the unit square. Under partition-based classification, if we set $Z(x) = \lfloor kx \rfloor + 1$, then no errors are made under the Bayes rule. We therefore have a joint distribution which maximizes any reasonable discriminative estimator but has \emph{finite} information $I(X; Y) = \log(k)$. The consequence of this is that under partition-based classification, we cannot hope to distinguish distributions with $I(X; Y) > \log(k)$. The situation is more promising if we specialize to stratified sampling: in the same example, a Bayes of zero is no longer likely due to the possibility of exemplars being sampled from the same bin (`collisions')--we obtain an approximation to the average Bayes error through a Poisson sampling model: $e_{ABE, k} \approx \frac{1}{e}\sum_{j=1}^\infty \frac{1}{j(j!)}= 0.484$. By specializing further to the high-dimensional regime, we obtain even tighter control on the relation between Bayes error and mutual information. Our estimator therefore provides more accurate estimation at the cost of more additional assumptions, but just how restrictive are these assumptions? The assumption of stratified sampling is usually not met in the most common applications of classification where the classes are defined \emph{a priori}. For instance, if the classes consist of three different species of iris, it does not seem appropriate to model the three species as i.i.d. draws from some distribution on a space of infinitely many potential iris species. Yet, when the classes have been pre-defined in an arbitrary manner, the mutual information between a latent class-defining variable $X$ and $Y$ may be only weakly related to the classification accuracy. We rely on the stratified sampling assumption to obtain the necessary control on how the classes in the classification task are defined. Fortunately, in many applications where one is interested in estimating $I(X; Y)$, a stratified sampling design can be practically implemented. The assumption of high dimensionality is not easy to check: having a high-dimension response $Y$ does not suffice, since even then $Y$ could still lie close to a low-dimensional manifold. In such cases, $\hat{I}_{HD}$ could either overestimate or underestimate the mutual information. In situations where $(X, Y)$ lie on a manifold, one could effectively estimate mutual information by would be to combining dimensionality reduction with nonparametric information estimation [13]. We suggest the following diagnostic to determine if our method is appropriate: subsample within the classes collected and check that $\hat{I}_{HD}$ does not systematically increase or decrease with the number of classes $k$. The assumption of approximating the Bayes rule is impractical to check, as any nonparametric estimate of the Bayes error requires exponentially many observations. Hence, while the present paper studies the `best-case' scenario where the model is well-specified, it is even more important to understand the robustness of our method in the more realistic case where the model is misspecified. We leave this question to future work. Even given a classifier which consistently estimates the Bayes error, the estimator $\hat{I}_{HD}$ can still be improved. One can employ more sophisticated methods to estimate $e_{ABE, k}$: for example, extrapolating from learning curves [14]. Furthermore, depending on the risk function, one may debias or shrink the estimate $\hat{I}_{HD}$ to achieve a more favorable bias-variance tradeoff. All of the necessary assumptions are met in our simulation experiment, hence our proposed estimator is seen to dramatically outperform existing estimators. It remains to assess the utility of our estimation procedure in a real-world example, where both the high-dimensional assumption and the model specification assumption are likely to be violated. In a forthcoming work, we apply our framework to evaluate visual encoding models in human fMRI data. \subsubsection*{Acknowledgments} We thank John Duchi, Youngsuk Park, Qingyun Sun, Jonathan Taylor, Trevor Hastie, Robert Tibshirani for useful discussion. CZ is supported by an NSF graduate research fellowship. \section*{References} \small [1] Borst, A. \& Theunissen, F. E. (1999). ``Information theory and neural coding'' \emph{Nature Neurosci.}, vol. 2, pp. 947-957. [2] Quiroga, R. Q., \& Panzeri, S. (2009). ``Extracting information from neuronal populations: information theory and decoding approaches''. \emph{Nature Reviews Neuroscience}, 10(3), 173-185. [3] Paninski L. , ``Estimation of entropy and mutual information,'' \emph{Neural Comput.}, vol. 15, no. 6, pp. 1191-1253, 2003. [4] Haxby, J.V., et al. (2001). "Distributed and overlapping representations of faces and objects in ventral temporal cortex." \emph{Science} 293.5539: 2425-2430. [5] Kay, K. N., et al. ``Identifying natural images from human brain activity.'' \emph{Nature} 452.7185 (2008): 352-355. [6] Coutanche, M.N., Solomon, S.H., and Thompson-Schill S. L., ``A meta-analysis of fMRI decoding: Quantifying influences on human visual population codes.'' \emph{Neuropsychologia} 82 (2016): 134-141. [7] Treves, A. (1997). ``On the perceptual structure of face space.'' \emph{Bio Systems}, 40(1-2), 189?96. [8] Beirlant, J., Dudewicz, E. J., Gy\:{o}rfi, L., \& der Meulen, E. C. (1997). ``Nonparametric Entropy Estimation: An Overview.'' \emph{International Journal of Mathematical and Statistical Sciences}, 6, 17-40. [9] Tse, D., \& Viswanath, P. (2005). \emph{Fundamentals of wireless communication.} Cambridge university press, [10] Friedman, J., Hastie, T., \& Tibshirani, R. (2008). \emph{The elements of statistical learning.} Vol. 1. Springer, Berlin: Springer series in statistics. [11] Gastpar, M. Gill, P. Huth, A. \& Theunissen, F. (2010). ``Anthropic Correction of Information Estimates and Its Application to Neural Coding.'' \emph{IEEE Trans. Info. Theory}, Vol 56 No 2. [12] Banerjee, A., Dean, H. L., \& Pesaran, B. (2011). "Parametric models to relate spike train and LFP dynamics with neural information processing." \emph{Frontiers in computational neuroscience} 6: 51-51. [13] Theunissen, F. E. \& Miller, J.P. (1991). ``Representation of sensory information in the cricket cercal sensory system. II. information theoretic calculation of system accuracy and optimal tuning-curve widths of four primary interneurons,'' \emph{J. Neurophysiol.}, vol. 66, no. 5, pp. 1690-1703. [14] Cortes, C., et al. "Learning curves: Asymptotic values and rate of convergence." (1994). \emph{Advances in Neural Information Processing Systems.} \section{Appendix} \textbf{Lemma 1. } \emph{ Suppose $(Z_1, Z_2, \hdots, Z_k)$ are jointly multivariate normal, with $\textbf{E}[Z_1 - Z_i]= \alpha$, $\text{Var}(Z_1) = \beta$, $\text{Cov}(Z_1, Z_i) = \gamma$, $\text{Var}(Z_i)= \delta$, and $\text{Cov}(Z_i, Z_j) = \epsilon$ for all $i, j = 2, \hdots, k$, such that $\beta + \epsilon - 2\gamma > 0$. Then, letting \[ \mu = \frac{\textbf{E}[Z_1 - Z_i]}{\sqrt{\frac{1}{2}\text{Var}(Z_i - Z_j)}} = \frac{\alpha}{\sqrt{\delta - \epsilon}}, \] \[ \nu^2 = \frac{\text{Cov}(Z_1 -Z_i, Z_1 - Z_j)}{\frac{1}{2}\text{Var}(Z_i - Z_j)} = \frac{\beta + \epsilon - 2\gamma}{\delta - \epsilon}, \] we have \begin{align*} \Pr[Z_1 < \max_{i=2}^k Z_i] &= \Pr[W < M_{k-1}] \\&= 1 - \int \frac{1}{\sqrt{2\pi\nu^2}} e^{-\frac{(w-\mu)^2}{2\nu^2}} \Phi(w)^{k-1} dw, \end{align*} where $W \sim N(\mu, \nu^2)$ and $M_{k-1}$ is the maximum of $k-1$ independent standard normal variates, which are independent of $W$. } \textbf{Proof.} We can construct independent normal variates $G_1$, $G_2,\hdots, G_k$ such that \[ G_1 \sim N(0, \beta + \epsilon - 2 \gamma) \] \[ G_i \sim N(0, \delta - \epsilon)\text{ for }i > 1 \] such that \[ Z_1 - Z_i = \alpha + G_1 + G_i \text{ for }i > 1. \] Hence \begin{align*} \Pr[Z_1 < \max_{i=2}^k Z_i] &= \Pr[\min_{i > 1} Z_1 - Z_i < 0]. \\&= \Pr[\min_{i=2}^{k} G_1 + G_i + \alpha < 0] \\&= \Pr[\min_{i=2}^{k} G_i < -\alpha - G_1] \\&= \Pr[\min_{i=2}^{k} \frac{G_i}{\sqrt{\delta - \epsilon}} < -\frac{\alpha - G_1}{\sqrt{\delta - \epsilon}}]. \end{align*} Since $\frac{G_i}{\sqrt{\delta - \epsilon}}$ are iid standard normal variates, and since $-\frac{\alpha - G_1}{\sqrt{\delta - \epsilon}} \sim N(\mu,\nu^2)$ for $\mu$ and $\nu^2$ given in the statement of the Lemma, the proof is completed via a straightforward computation. $\Box$ \textbf{Theorem 1.} Let $p^{[d]}(x, y)$ be a sequence of joint densities for $d = 1,2,\hdots$ as given above. Further assume that \begin{itemize} \item[A1.] $\lim_{d \to \infty} I(X^{[d]}; Y^{[d]}) = \iota < \infty.$ \item[A2.] There exists a sequence of scaling constants $a_{ij}^{[d]}$ and $b_{ij}^{[d]}$ such that the random vector $(a_{ij}\ell_{ij}^{[d]} + b_{ij}^{[d]})_{i, j = 1,\hdots, k}$ converges in distribution to a multivariate normal distribution. \item[A3.] There exists a sequence of scaling constants $a^{[d]}$, $b^{[d]}$ such that \[ a^{[d]}u(X^{(1)}, Y^{(2)}) + b^{[d]} \] converges in distribution to a univariate normal distribution. \item[A4.] For all $i \neq k$, \[\lim_{d \to \infty}\text{Cov}[u(X^{(i)}, Y^{(j)}), u(X^{(k)}, Y^{(j)})] = 0.\] \end{itemize} Then for $e_{ABE, k}$ as defined above, we have \[ \lim_{d \to \infty} e_{ABE, k} = \pi_k(\sqrt{2 \iota}) \] where \[ \pi_k(c) = 1 - \int_{\mathbb{R}} \phi(z - c) \Phi(z)^{k-1} dz \] where $\phi$ and $\Phi$ are the standard normal density function and cumulative distribution function, respectively. \textbf{Proof.} For $i = 2,\hdots, k$, define \[ Z_i = \log p(Y^{(1)}|X^{(i)}) - \log p(Y^{(1)}|X^{(1)}). \] Then, we claim that $\vec{Z} = (Z_2,\hdots, Z_k)$ converges in distribution to \[ \vec{Z} \sim N\left(-2\iota, \begin{bmatrix} 4\iota & 2\iota & \cdots & 2\iota\\ 2\iota & 4\iota & \cdots & 2\iota\\ \vdots & \vdots & \ddots & \vdots\\ 2\iota & 2\iota & \cdots & 4\iota \end{bmatrix} \right). \] Combining the claim with the lemma (stated below this proof) yields the desired result. To prove the claim, it suffices to derive the limiting moments \[\textbf{E}[Z_i] \to -2\iota,\] \[\text{Var}[Z_i] \to 4\iota,\] \[\text{Cov}[Z_i, Z_j] \to 2\iota,\] for $i \neq j$, since then assumption A2 implies the existence of a multivariate normal limiting distribution with the given moments. Before deriving the limiting moments, note the following identities. Let $X' = X^{(2)}$ and $Y = Y^{(1)}$. \[ \textbf{E}[e^{u(X', Y)}] = \int p(x) p(y) e^{u(x, y)} dx dy = \int p(x, y) dx dy = 1. \] Therefore, from assumption A3 and the formula for gaussian exponential moments, we have \[ \lim_{d \to \infty} \textbf{E}[u(X', Y)]-\frac{1}{2}\text{Var}[u(X', Y)] = 0. \] Let $\sigma^2 = \lim_{d \to \infty} \text{Var}[u(X', Y)]$. Meanwhile, by applying assumption A2, \begin{align*} \lim_{d \to \infty} I(X; Y) &= \lim_{d \to \infty} \int p(x, y) u(x, y) dx dy = \lim_{d \to \infty} \int p(x) p(y) e^{u(x, y)} u(x, y) dx dy \\&= \lim_{d \to \infty} \textbf{E}[e^{u(X, Y')}u(X, Y')] \\&= \int_{\mathbb{R}} e^z z \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{(z + \sigma^2/2)^2}{2\sigma^2}} \text{ (applying A2)} \\&= \int_{\mathbb{R}} z \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\frac{(z - \sigma^2/2)^2}{2\sigma^2}} \\&= \frac{1}{2}\sigma^2. \end{align*} Therefore, \[ \sigma^2 = 2\iota, \] and \[ \lim_{d \to \infty} \textbf{E}[u(X', Y)] = -\iota. \] Once again by applying A2, we get \begin{align*} \lim_{d \to \infty} \text{Var}[u(X, Y)] &= \lim_{d \to \infty} \int (u(x, y) - \iota)^2 p(x, y) dx dy \\&= \lim_{d \to \infty} \int (u(x, y) - \iota)^2 e^{u(x, y)} p(x) p(y) dx dy \\&= \lim_{d \to \infty} \textbf{E}[(u(X', Y) - \iota)^2 e^{u(X', Y)}] \\&= \int (z - \iota)^2 e^z \frac{1}{\sqrt{4\pi\iota}} e^{-\frac{(z+\iota)^2}{4\iota}} dz \text{ (applying A2)} \\&= \int (z - \iota)^2 \frac{1}{\sqrt{4\pi\iota}} e^{-\frac{(z-\iota)^2}{4\iota}} dz \\&= 2\iota. \end{align*} We now proceed to derive the limiting moments. We have \begin{align*} \lim_{d \to \infty} \textbf{E}[Z] &= \lim_{d \to \infty} \textbf{E}[ \log p(Y|X') - \log p(Y|X)] \\&= \lim_{d \to \infty} \textbf{E}[ u(X', Y) - u(X, Y) ] = -2\iota. \end{align*} Also, \begin{align*} \lim_{d \to \infty} \text{Var}[Z] &= \lim_{d \to \infty} \text{Var}[ u(X', Y) - u(X, Y) ] \\&= \lim_{d \to \infty} \text{Var}[ u(X', Y)] +\text{Var}[ u(X, Y) ]\text{ (using assumption A4) } \\&= 4\iota, \end{align*} and similarly \begin{align*} \lim_{d \to \infty} \text{Cov}[Z_i, Z_j] &= \lim_{d \to \infty} \text{Var}[ u(X, Y)]\text{ (using assumption A4) } \\&= 2\iota. \end{align*} This concludes the proof. $\Box$. \subsection{Assumptions of theorem 1} Assumptions A1-A4 are satisfied in a variety of natural models. One example is a multivariate Gaussian model where \[ X \sim N(0, \Sigma_d) \] \[ E \sim N(0, \Sigma_e) \] \[ Y = X + E \] where $\Sigma_d$ and $\Sigma_e$ are $d \times d$ covariance matrices, and where $X$ and $E$ are independent. Then, if $d \Sigma_d$ and $\Sigma_e$ have limiting spectra $H$ and $G$ respectively, the joint densities $p(x, y)$ for $d = 1,\hdots, $ satisfy assumptions A1 - A4. We can also construct a family of densities satisfying A1 - A4, which we call an \emph{exponential family sequence model} since each joint distribution in the sequence is a member of an exponential family. A given exponential family sequence model is specified by choice of a base carrier function $b(x, y)$ and base sufficient statistic $t(x, y)$, with the property that carrier function factorizes as \[ b(x, y) = b_x(x) b_y(y) \] for marginal densities $b_x$ and $b_y$. Note that the dimensions of $x$ and $y$ in the base carrier function are arbitrary; let $p$ denote the dimension of $x$ and $q$ the dimension of $y$ for the base carrier function. Next, one specifies a sequence of scalar parameters $\kappa_1, \kappa_2,\hdots$ such that \[ \lim_{d \to \infty} d \kappa_d = c < \infty. \] for some constant $c$. For the $d$th element of the sequence, $X^{[d]}$ is a $pd$-dimensional vector, which can be partitioned into blocks \[ X^{[d]} = (X_1^{[d]},\hdots, X_d^{[d]}) \] where each $X_i^{[d]}$ is $p$-dimensional. Similarly, $Y^{[d]}$ is partitioned into $Y_i^{[d]}$ for $i = 1,\hdots, d$. The density of $(X^{[d]}, Y^{[d]})$ is given by \[ p^{[d]}(x^{[d]}, y^{[d]}) = Z_d^{-1} \left(\prod_{i=1}^d b(x_i^{[d]}, y_i^{[d]}) \right) \exp\left[\kappa_d \sum_{i=1}^d t(x_i^{[d]}, y_i^{[d]}) \right], \] where $Z_d$ is a normalizing constant. Hence $p^{[d]}$ can be recognized as the member of an exponential family with carrier measure \[ \left(\prod_{i=1}^d b(x_i^{[d]}, y_i^{[d]}) \right) \] and sufficient statistic \[ \sum_{i=1}^d t(x_i^{[d]}, y_i^{[d]}). \] One example of such an exponential family sequence model is a multivariate Gaussian model with limiting spectra $H = \delta_1$ and $G = \delta_1$, but scaled so that the marginal variance of the components of $X$ and $Y$ are equal to one. This corresponds to a exponential family sequence model with \[ b_x(x) = b_y(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \] and \[t(x, y) = xy.\] Another example is a multivariate logistic regression model, given by \[ X \sim N(0, I) \] \[ Y_i \sim \text{Bernoulli}(e^{\beta X_i}/(1 + e^{\beta X_i})) \] This corresponds to an exponential family sequence model with \[ b_x(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2/2} \] \[ b_y(y) = \frac{1}{2}\text{ for }y = \{0, 1\}, \] and \[ t(x, y) = x\delta_1(y) - x\delta_0(y). \] The multivariate logistic regression model (and multivariate Poisson regression model) are especially suitable for modeling neural spike count data; we simulate data from such a multivariate logistic regression model in section X. \section{Additional simulation results} Multiple-response logistic regression model \[ X \sim N(0, I_p) \] \[ Y \in \{0,1\}^q \] \[ Y_i|X = x \sim \text{Bernoulli}(x^T B_i) \] where $B$ is a $p \times q$ matrix. Multiple-response logistic regression model \[ X \sim N(0, I_p) \] \[ Y \in \{0,1\}^q \] \[ Y_i|X = x \sim \text{Bernoulli}(x^T B_i) \] where $B$ is a $p \times q$ matrix. \emph{Methods.} \begin{itemize} \item \text{Nonparametric}: $\hat{I}_0$ naive estimator, $\hat{I}_\alpha$ anthropic correction. \item \text{ML-based}: $\hat{I}_{CM}$ confusion matrix, $\hat{I}_F$ Fano, $\hat{I}_{HD}$ high-dimensional method. \end{itemize} Sampling distribution of $\hat{I}$ for \small{$\{p = 3$, $B = \frac{4}{\sqrt{3}} I_3$, $K = 20$, $r = 40\}$.} True parameter $I(X; Y) = 0.800$ \emph{(dotted line.)} \begin{center} \includegraphics[scale = 0.5, clip = true, trim = 0 0.5in 0 0.5in]{fig1.pdf} \end{center} Na\"{i}ve estimator performs best! $\hat{I}_{HD}$ not effective. Sampling distribution of $\hat{I}$ for \small{$\{p = 50$, $B = \frac{4}{\sqrt{50}} I_{50}$, $K = 20$, $r = 8000\}$.} True parameter $I(X; Y) = 1.794$ \emph{(dashed line.)} \begin{center} \includegraphics[scale = 0.5, clip = true, trim = 0 0.5in 0 0.5in]{fig2.pdf} \end{center} Non-parametric methods extremely biased. Estimation path of $\hat{I}_{HD}$ and $\hat{I}_\alpha$ as $n$ ranges from $10$ to $8000$. \small{$\{p = 10$, $B = \frac{4}{\sqrt{10}} I_{10}$, $K = 20\}$. True parameter $I(X; Y) = 1.322$ \emph{(dashed line.)}} \begin{center} \includegraphics[scale = 0.4]{fig3.pdf} \end{center} \begin{center} \textbf{Estimated $\hat{I}$ vs true $I$.} \includegraphics[scale = 0.5, clip=true, trim=0.4in 0.5in 0 0.5in]{fig4.pdf} \end{center} Sampling distribution of $\hat{I}_{HD}$ for \small{$\{p = 10$, $B = \frac{4}{\sqrt{10}} I_{10}$, $N = 80000\}$, and $K = \{5, 10, 15, 20, \hdots, 80\}$, $r = N/k$.} True parameter $I(X; Y) = 1.322$ \emph{(dashed line.)} \begin{center} \includegraphics[scale = 0.6, clip = true, trim = 0 0.5in 0 0.5in]{fig5a.pdf} \end{center} Decreasing variance as $K$ increases. Bias at large and small $K$. $p = 20$ and $q = 40$, entries of $B$ are iid $N(0, 0.025)$. $K=20$, $r = 8000$, true $I(X; Y) = 1.86$ \emph{(dashed line.)} \begin{center} \textbf{Sampling distribution of $\hat{I}$.} \includegraphics[scale = 0.6, clip = true, trim = 0 0.5in 0 0.5in]{fig6.pdf} \end{center} \end{document}
{'timestamp': '2016-10-11T02:12:24', 'yymm': '1606', 'arxiv_id': '1606.05229', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05229'}
arxiv
\section{Introduction} Sets and their characterisitic vectors will not be distinguished. We refer to Bondy and Murty \cite{Bondy and Murty 2008} about graph theory terminolgy and facts. \newline Given an undirected graph $G = (V, E)$ and positive weights $w_{ij} = w_{ji}$ on the edges $(i, j)\in E$, the maximum cut problem (MAX CUT) is that of finding the set of vertices $S$ that maximizes the weight of the edges in the cut $(S, V\backslash S)$ or $\delta (S)$ or $\delta (V\backslash S)$; that is, the weight of the edges with one endpoint in $S$ and the other in $V\backslash S$. The (decision variant of the) MAX CUT is one of the Karp’s original NP-complete problems \cite{Karp 1972}, and has long been known to be NP-complete even if the problem is unweighted; that is, if $w_{ij} = 1$ for all $(i, j)\in E$ \cite{Garey et al. 1976}. This motivates the research to solve the MAX CUT problem in special classes of graphs. The MAX CUT problem is solvable in polynomial time for the following special classes of graphs: planar graphs \cite{Barahona 1990, Hadlock 1975, Orlova and Dorfman 1972}, line graphs \cite{Guruswami 1999}, graphs with bounded treewidth, or cographs \cite{Bodlaender and Jansen 2000}. But the problem remains NP-complete for chordal graphs, undirected path graphs, split graphs, tripartite graphs, graphs that are the complement of a bipartite graph \cite{Bodlaender and Jansen 2000} and planar graphs if the weights are of arbitrary sign \cite{Terebenkov 1991}. Besides its theoretical importance, the MAX CUT problem has applications in circuit layout design and statistical physics \cite{Barahona et al. 1988}. For a comprehensive survey of the MAX CUT problem, the reader is referred to Poljak and Tuza \cite{Poljak and Tuza 1995} and Ben-Ameur et al. \cite{Ben-Ameur et al. 2014}. The best known algorithm for MAX CUT in planar graphs has running time complexity $O(n^{3/2} log n)$, where $n$ is the number of vertices of the graph \cite{Shih et al. 1990}. The main result of this paper is to exhibit a linear time algorithm for a special variant of MAX CUT in series parallel graphs. \newline Let us give some definitions. Given an undirected graph $G = (V, E)$ and a subset of vertices $U$, a connected sides cut $\delta (U)$ is a cut where both induced subgraphs $G[U]$ and $G[V\backslash U]$ are connected. Special connected sides cuts are trivial cuts, i.e. cuts with one single vertex in one side. The corresponding weighted variant of MAX CUT for connected sides cuts is called MAX CONNECTED SIDES CUT problem (MAX CS CUT). It is clear that MAX CUT and MAX CS CUT are the same problem for complete graphs. Since MAX CUT is NP-hard for complete graphs (see \cite{Karp 1972}) then MAX CS CUT is NP-hard in the general case. Another motivation is that MAX CS CUT gives a lower bound for MAX CUT. \newline A parallel closure of a graph is an induced subgraph on two vertices. A series extension of the graph $G = (V, E)$ based on the edge $e\in E$ is adding a vertex $v$ of degree 2 in the middle of $e$ in order to have two edges instead of $e$. A parallel extension of $G$ based on the edge $e$ is adding an edge $f$ having the same incident vertices as $e$. Series parallel graphs are graphs obtained by applying recursively series and/or parallel extensions starting from one edge. A series degree of a vertex $v$ in a graph $G$ is the degree of $v$ after replacing every parallel closure of $G$ by one single edge. A series labeling of the vertices of a series parallel graph is a labeling of the vertices from 0 to $n-1 = |V|-1$ starting from the first two vertices $v_0$ and $v_1$ and so on to the last added vertex. Any series parallel graph contains at least one vertex of series degree 2. So, given a vertex $v$ of series degree 2 with the two parallel closures $P_0$ and $P_1$ incident to $v$, and the two adjacent vertices $u_0$ and $u_1$ to $v$, we can contract all edges of $P_0$ (or $P_1$) and replace $v$ by $u_0$ (or $u_1$), and we obtain a new series parallel graph with a new vertex of series degree 2. Each involved graph in any step of this process is labeled $G_j, 0 \leq j\leq n-1$, with $G_{n-1} = G$ and $G_1$ is the induced subgraph on the two vertices $v_0$ and $v_1$. \newline Let $G_1$ and $G_2$ be two graphs with $e_j$ an edge of $G_j, j = 1, 2$. The 2-sum of $G_1$ and $G_2$, denoted $G_1\oplus_e G_2$, based on the edges $e_1$ and $e_2$ is the graph obtained by identifying $e_1$ and $e_2$ on an edge $e$, and keeping $G_j/e_j, j = 1, 2$, as it is. \newline We say that MAX CS CUT is linear for a class of graphs if there is a linear time algorithm to solve it in such class. \newline The remaining of the paper is organized as follows: in section 2, we give a linear time algorithm for MAX CS CUT in series parallel graphs, in section 3, we prove that 2-sums preserve the linearity of MAX CS CUT. We deduce a linear time algorithm for MIN CUT in series parallel graphs in section 4, and we conclude in section 5. \section{MAX CS CUT is linear for series parallel graphs} MAXCSCUTSP Algorithm: \newline Input: A series parallel graph $G = (V, E)$ with a series labeling of $V$, a positive weight function $w$ defined on $E$. \newline Output: A $w$-maximum connected sides cut $\Omega$ in $G$. \newline 0) Begin \newline 1) $j := n-1$; \newline 2) While $j > 1$ do \newline 3) Begin \newline 4) Let $P_0$ and $P_1$ be the two parallel closures incident to $v_j$ in $G_j$: \newline 5) If $w(P_0) > w(P_1)$ then contract $P_1$; \newline 6) Else: contract $P_0$; \newline 7) $j := j-1$; \newline 6) End of While \newline 7) $j := 2$; \newline 8) $\Omega := E(G_1)$; \newline 9) While $j\leq n-1$ do \newline 10) Begin \newline 11) Let $P_0$ and $P_1$ the two parallel closures incident to $v_j$ in $G_j$: \newline 12) If $w(P_0)+w(P_1)>w(\Omega)$ then $\Omega := P_0\cup P_1$; \newline 13) $j := j+1$; \newline 14) End of While \newline 15) End of MAXCSCUTSP algorithm. \newline This algorithm has two phases: Phase I (steps 1-6) and Phase II (steps 7-14). In each step, we do roughly $n$ operations, so the complexity of MAXCSCUTSP is $O(n)$, where $n=|V|$. \begin{thm} MAXCSCUTSP algorithm solves MAX CS CUT in series parallel graphs. \end{thm} \begin{proof} The summary of the algorithm is as follows: MAXCSCUT chooses a vertex v with series degree 2 (step 4) and contract the less weighted parallel closure incident to v (steps 5 and 6). And so on the resulted graph until it reaches $G_1$ , the starting single parallel closure (Phase I). In $G_1$, the $w$-maximum connected sides cut is $E(G_1)$ (step 8). After that, it goes in the reverse path (Phase II): the $w$-maximum connected sides cut is either the trivial cut based on the current vertex $v_j$ with series degree 2 or the current computed connected sides cut (step 12). Let $v_j$ be the chosen vertex with series degree 2 in $G_j$, $P_0$ and $P_1$ the two parallel closures incident to $v_j$. Without loss of generality, we can suppose that $w(P_0)<w(P_1)$ and $G_{j-1}=G_j/P_0$. Let $\Omega_j$ be the w-maximum connected sides cut in $G_j, 1\leq j\leq n-1$. It suffices to prove that $w(\Omega_j) = Max \{w(\Omega_{j-1}), w(P_0\cup P_1)\}$. \newline Let $\Omega$ be a connected sides cut in $G_j$ distinct from $P_0\cup P_1$. Since $w(P_0)<w(P_1)$, we have only two cases: \newline \textbf{Case 1:} $P_1\subseteq \Omega$ then $\Omega$ is a connected sides cut in $G_{j-1} = G_j/P_0$ containing $P_1$. And vice versa, any connected sides cut in $G_{j-1} = G_j/P_0$ containing $P_1$ is a connected sides cut in $G_j$ containing $P_1$. \newline \textbf{Case 2:} $P_1\nsubseteq \Omega$ then $\Omega$ is a connected sides cut in $G_{j-1}=G_j/P_0$ not containing $P_1$. And vice versa, any connected sides cut in $G_{j-1}=G_j/P_0$ not containing $P_1$ is a connected sides cut in $G_j$ not containing $P_1$. \newline So the connected sides cuts candidates for the $w$-maximum connected sides cut in $G_j$ and $G_{j-1}$ are the same, except $P_0\cup P_1$. \end{proof} Note that MAXCSCUT algorithm solves MAX CS CUT in series parallel graphs even for arbitrary sign weight functions. \section{2-sums preserve linearity of MAX CS CUT} Let $\mathcal C(G)$ be the class of connected sides cuts of $G$. We need the following lemma. \begin{lem} $\mathcal C(G_1\oplus_e G_2)=\{ \Omega_j\in \mathcal C(G_j) : e_j\notin \Omega_j, j=1, 2\}\cup \{ \Omega_1\oplus_e \Omega_2 : \Omega_j\in \mathcal C(G_j)$ and $e_j\in \Omega_j, j = 1, 2\}$. \end{lem} It follows that a $w$-maximum connected sides cut in $G_1\oplus_e G_2$ is one of the three following connected sides cuts: \newline (cases 1-2) one of the two $w$-maximum connected sides cuts in $G_j$ which does not contain $e_j, j = 1, 2$, \newline (case 3) or the 2-sum of the $w$-maximum connected sides cuts containing $e_j, j = 1, 2$. \newline To find a $w$-maximum connected sides cut in $G_j$ which does not contain $e_j, j = 1, 2$ (case 2), we have to contract $e_j$. We need then to perform at most $c(n_j-1)$ operations, where $c$ is the linearity coefficient and $n_j, j=1, 2$ is the number of vertices of $G_j$ (by induction). \newline To find $\Omega_1\oplus_e \Omega_2$ (case 3), we have to put $w(e_j), j = 1, 2$, as big as possible, e.g. sum of the positive weights of all edges, and find $\Omega_j, j = 1, 2$. In this case, we need to perform at most $c(n_1+n_2)$ operations (by induction). \newline So we have to compute MAX CS CUT twice in each graph and compare three cuts. The total number of operations is bounded then by $2c(n_1+n_2-1)=2c(n-1)$, where $n$ is the number of vertices of $G_1\oplus_e G_2$. So linearity of the problem is preserved. \section{MIN CUT is linear for series parallel graphs} MINCUTSP Algorithm: \newline Input: A series parallel graph $G = (V, E)$ with a series labeling of $V$, a positive weight function $w$ defined on $E$. \newline Output: A $w$-minimum connected sides cut $\Omega$ in $G$. \newline We keep the same steps as MAXCSCUTSP algorithm except the following changes in two steps: \newline 5) If $w(P_0) < w(P_1)$ then contract $P_1$; \newline 12) If $w(P_0)+w(P_1)<w(\Omega)$ then $\Omega := P_0\cup P_1$; \newline Since this algorithm is similar to MAXCSCUTSP, then its complexity is $O(n)$, where $n=|V|$. \newline And it is not difficult to see, similarly to MAXCSCUTSP, that MINCUTSP gives the minimum weighted connected sides cut in a series parallel graph without computing the maximum flow. \newline We can conclude with the following result. \begin{thm} Given a connected graph $G=(V, E)$ and a positive weight function $w$ defined on $E$. Then any $w$-minimum cut is a connected sides cut of $G$. \end{thm} \begin{proof} Let $\delta (U)$ be a cut with $G[U]$ disconnected. It suffices to prove that $\delta (U)$ is not a $w$-minimum cut. Let $G[U_1]$ be one connected component of $G[U]$. Since $G$ is connected, then $w(V\backslash U, U_1)>0$ (i.e. there are edges between $V\backslash U$ and $U_1$). It follows that $w(\delta (U\backslash U_1))=w(\delta (U))-w(V\backslash U, U_1)<w(\delta (U))$. \end{proof} Another consequence of Lemma 3.1 and Theorem 4.1 is the following corollary. \begin{cor} 2-sums preserves the linearity of MIN CUT. \end{cor} \section{Conclusion} We have introduced a new variant of MAX CUT: MAX CS CUT, which is also NP-hard. We have provided two linear time algorithms for MAX CS CUT and MIN CUT, respectively, in series parallel graphs. We have proved that 2-sums preserve the linearity of MAX CS CUT and MIN CUT. Further directions are to study MAX CS CUT in larger classes of graphs than series parallel graphs. \noindent{ \bf Acknowledgements} The author is grateful to the deanship of Scientific Research at Al Imam Mohammad Ibn Saud Islamic University (IMSIU) for supporting financially this research under the grant No 331203.
{'timestamp': '2017-03-21T01:03:41', 'yymm': '1606', 'arxiv_id': '1606.05240', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05240'}
arxiv
\section{Introduction \label{sec:Introduction}} Online social networking platforms are being increasingly used by campaigners, activists and marketing managers for promoting ideas, brands and products. In particular, the ability to recommend news articles \cite{Leskovec2009}, videos, and even products \cite{Leskovec2006} by friends and acquaintances through online social networking platforms is being increasingly recognized by marketing gurus as well as political campaigners and activists. Influencing the spread of content through social media enables campaigners to mold the opinions of a large group of individuals. In most cases, campaigners and advertisers aim to spread their message to as many individuals as possible while respecting budget constraints. This calls for a judicious allocation of limited resources, like money and manpower, for ensuring highest possible outreach, i.e., the proportion of individuals who receive the message. \par Individuals share information with other individuals in their social network using Twitter tweets, Facebook posts or simply face to face meetings. These individuals may in turn pass the same to their friends and so on, leading to an information epidemic. However, individuals may also become bored or disillusioned with the message over time and decide to stop spreading it. { Past research suggests that such social effects may lead to opinion polarization in social systems \cite{Sinha2006}}. This can be exploited by a campaigner who desires to influence such spreading or opinion formation by incentivizing individuals to evangelize more vigorously by providing them with referral rewards in the form of discounts, cash back or other attractive offers. Due to budget constraints, it may not be feasible to incentivize all, or even a majority of the population. Individuals have varying amount of influence over others, e.g., ordinary individuals may have social connections extending to only close family and friends, while others may have a large number of social connections which can enable them to influence large groups \cite{Goldenberg2009}. Thus, it would seem that incentivizing highly influential individuals would be the obvious strategy. However, recruiting influential people can be very costly, which may result in the campaigner running out of funds after recruiting just a handful of celebrities, which in turn may result in suboptimal outreach size. \par A resource constrained campaigner, for a given cost budget, may want to maximize the proportion of informed individuals, while other campaigners who care more about campaign outreach than resource costs, may desire to minimize costs for achieving a given number of informed individuals. We address both the resource allocation challenges by formulating and solving two optimization problems with the help of \emph{bond percolation theory}. \par A similar problem of preventing epidemics through vaccinations has received a lot of attention \cite{Cohen2003,Shaw2010,Ruan2012,Starnini2013,Peng2013}. However, in these problems the cost of vaccination is uniform for all individuals, and hence it is sufficient to calculate the minimum number of vaccinations. Information diffusion can also be maximized by selecting an optimal set of seeds, i.e., individuals best suited to \emph{start} an epidemic \cite{Kempe2003,Chen2009a,Chen2010a}. This is different from our strategy which involves incentivizing individuals to \emph{spread} the message. It is possible to address the problem posed here using optimal control theory, which involves computing the optimal resource allocation in real time for ensuring maximum possible outreach size by a give deadline \cite{Karnik2012,Dayama2012, Kandhway2014a,Kandhway2014,Kandhway2014b}. However, the optimal control solution is not only difficult to compute, but also very hard to implement as it requires a centralized real time controller. Furthermore, recent work, \cite{Karnik2012,Dayama2012, Kandhway2014a,Kandhway2014,Kandhway2014b}, on optimal campaigning in social networks does not address the problem of minimizing the cost while gurantering an outreach size. Our formulation allows us to solve both the problems. \par Our model assumes two types of individuals viz. the \emph{`ordinary'} and the \emph{`selected'}, and they are connected to one another through a social network. Before the campaign starts, the selected individuals are incentivized to spread the message more vigorously than the ordinary. We use the \emph{Susceptible Infected Recovered} (SIR) model for modeling the information epidemic. For a given set of selected individuals, we first calculate the size of the information outbreak using network percolation theory, and then find the set of selected nodes which, 1. minimizes the cost for achieving a given proportion of informed individuals, and 2. maximize the fraction of informed individual for a given cost budget. We believe that our approach of using percolation theory to formulate an optimization problem is the first of its kind. \par The detailed model description can be found in Sec. \ref{sec:Model}, percolation analysis in Sec. \ref{sec:Analysis}, the problem formulation in Sec. \ref{sec:Problem Formulation}, numerical results in Sec. \ref{sec:Numerical Results}, and finally conclusions are discussed in Sec. \ref{sec:Conclusion}. \section{Model \label{sec:Model}} We divide the total population of $N$ individuals in two types: the ordinary (type $1$) and the selected (type $2$). Before the campaign starts selected individuals are provided incentives to spread the information more vigorously. These individuals are connected with one another through a social network, which is represented by an undirected graph (network). Nodes represent individuals while a link embodies the communication pathways between individuals. Let $P(k)$ be the degree distribution of the social network. For analytical tractability, we assume that the network is uncorrelated \cite{Barrat2008}. We generate an uncorrelated network using the configuration model \cite{molloy1995}. A sequence of $N$ integers, called the degree sequence, is obtained by sampling the degree distribution. Thus each node is associated with an integer which is assumed to be the number of half edges or stubs associated with the node. Assuming that the total number of stubs is even, each stub is chosen at random and joined with another randomly selected stub. The process continues until all stubs are exhausted. Self loops and multiple edges are possible, but the number of such self loops and multiple edges goes to zero as $N \to \infty$ with high probability. We assume that $N$ is large but finite. Let $\phi (k)$ be the proportion of individuals with $k$ degrees that are provided incentives for vigorously spreading the message, i.e., proportion of nodes with degree $k$ that are type 2 nodes. The goal is to find the optimum $\phi(k)$ for maximizing the epidemic size (or minimizing the cost). The actual individuals can be identified by sampling from a population of individuals with degree $k$ with probability $\phi(k)$. \par We assume that the information campaign starts with a randomly chosen individual, who may pass the information to her neighbors, who in turn may pass the same to their neighbors and so on. However, as the initial enthusiasm wanes, individuals may start loosing interest in spreading the information message. This is similar to the diffusion of infectious diseases in a population of susceptible individuals. Since, we account for individuals loosing interest in spreading the message, we use a continuous time SIR process to model the information diffusion. The entire population can be divided into three classes, those who haven't heard the message (susceptible class), those who have heard it and are actively spreading it (infected class) and those who have heard the message but have stopped spreading it (recovered class). \par Let $\beta_1$ be the rate of information spread for an ordinary node (Type 1), while $\beta_2$ for a selected node (Type 2). In other words, the probability that a type $i$ individual `infects' her susceptible neighbors in small time $dt$ is $\beta_idt +o(dt)$. Note that this is independent of the type of the susceptible node. Let $\mu_i$ be the rate at which type $i$ infected individuals move to the recovered state. The larger the $\mu_i$ the lesser the time an individual spends in spreading the message. Since type $2$ individuals are incentivized to spread information more vigorously, $\beta_2 > \beta_1$ and $\mu_2 < \mu_1$. Let $T_i$ be the probability that a type $i$ infected node infects its susceptible neighbors (any type) before it recovers ($i \in \{0,1\}$). It can be easily shown that $T_i = \frac{\beta_i}{\beta_i + \mu_i}$, see \cite{Newman2002}. Therefore, $T_2 > T_1$. $T_i$ can be interpreted as the probability that a link connecting type $i$ infected node to any susceptible node is occupied. We refer to such links as type $i$ links and $T_i$ the occupation probability for link of type $i$. This mapping allows us to apply bond percolation theory for obtaining the size of the information epidemic \cite{Newman2010}. \section{Analysis \label{sec:Analysis}} We first aim to calculate the proportion of individuals who have received the message, or in other words, the proportion of recovered individuals at $t \to \infty$. Let $P(k' \mid k)$ be the probability of encountering a node of degree $k'$ by traversing a randomly chosen link from a node of degree $k$. In other words, $P(k' \mid k)$ is the probability that a node with degree $k$ has a neighbor with degree $k'$. For a network generated by configuration model, $P(k' \mid k)= \frac{k'P(k')}{\langle k \rangle}$ \cite{Newman2010}, where $\langle k^i \rangle$ is the $i^{th}$ moment of $P(k)$. \par Let $q$ be the probability of encountering a type 2 node by traversing a randomly chosen link from a node of degree $k$. Therefore, $q = \sum\limits_{k'=1}^{\infty}Pr($Neighboring node is type 2 $\mid$ neighboring node has degree $k')\cdot Pr($Neighboring node has degree $k'\mid$ original node has degree $k)$. \begin{align*} q= \frac{1}{\langle k \rangle}\sum_{k=1}^{\infty}k\phi(k)P(k) \end{align*} The probability that a randomly chosen node has $k_1$ type 1 and $k_2$ type 2 neighbors $= P(k_1,k_2) = \sum\limits_{k:k=k_1+k_2}^{\infty} Pr(k_1,k_2\mid$node has degree $k)P(k) $. \par For a large $N$, the event that a given node has degree $k$, can be approximated to be independent of the event that another node, having a common neighbor with the given node, has degree $k'$. This is true since the degree sequence is generated by independent samples from the distribution, and for a large $N$ the effect of sampling without replacement is negligible. The probability that a node is selected (type 2), is a function of its degree, hence the event that a node is type 1 (or 2) is independent of the event that any other node is type 1 (or 2). This allows us to write: \begin{align*} P(k_1,k_2)= {k_1+k_2 \choose k_2}q^{k_2}(1-q)^{k_1}P(k_1+k_2) \end{align*} Let $Q(k)$ be the excess degree distribution, i.e., the degree distribution of a node arrived at by following a randomly chosen link without counting that link. For the configuration model $Q(k) = (k+1)P(k+1)/ <k>$. Let $Q(k_1,k_2)$ be the excess degree distribution for connections to type 1 and type 2 nodes. \begin{align*} Q(k_1,k_2) = {k_1+k_2 \choose k_2}q^{k_2}(1-q)^{k_1}Q(k_1+k_2) \end{align*} Let $\tilde{P}(\tilde{k}_1,\tilde{k}_2)$ and $\tilde{Q}(\tilde{k}_1,\tilde{k}_2)$ be the distribution and the excess distribution of the number of type 1 and type 2 neighbors that have received the information message. In other words the distribution and the excess distribution of type $i$ occupied links. {\small \begin{align*} \tilde{P}(\tilde{k}_1,\tilde{k}_2) &= \sum_{k_1=\tilde{k}_1}^{\infty}\sum_{k_2=\tilde{k}_2}^{\infty}P(k_1,k_2)\prod_{i=1}^{2}{k_i \choose \tilde{k}_i}T_i^{\tilde{k}_i}(1-T_i)^{k_i-\tilde{k}_i} \\ \tilde{Q}(\tilde{k}_1,\tilde{k}_2) &= \sum_{k_1=\tilde{k}_1}^{\infty}\sum_{k_2=\tilde{k}_2}^{\infty}Q(k_1,k_2)\prod_{i=1}^{2}{k_i \choose \tilde{k}_i}T_i^{\tilde{k}_i}(1-T_i)^{k_i-\tilde{k}_i} \end{align*} } \begin{table}[!t] \centering \begin{tabular}{l l} \hline Generating function & Distribution \\ \hline $G(u_1,u_2)$ & $P(k_1,k_2)$ \\ $F(u_1,u_2)$ & $Q(k_1,k_2)$ \\ $\tilde{G}(u_1,u_2)$ & $\tilde{P}(\tilde{k}_1,\tilde{k}_2)$ \\ $\tilde{F}(u_1,u_2)$ & $\tilde{Q}(\tilde{k}_1,\tilde{k}_2)$ \\ $\tilde{H}_i(u_1,u_2)$ & Proportion of type 1 and type 2 nodes, \\ & who have received the message, in a component \\ & reached from a type $i$ link.\\ $\tilde{J}_i(u_1,u_2)$ & No. of type 1 and type 2 nodes \\ & who have received the message, in a component \\ & reached from a node $i$.\\ $\tilde{J}(u_1,u_2)$ & No. of type 1 and type 2 nodes \\ & who have received the message, in a component \\ & reached from a randomly chosen node.\\ \hline \end{tabular} \caption{List of probability generating functions.} \label{table:pgf} \end{table} The probability generating functions for the distributions used in the analysis above are listed in Table \ref{table:pgf}. For example $G(u_1,u_2)$ is given by : \begin{align*} G(u_1,u_2) = \sum\limits_{k_1,k_2=0}^{\infty} u_1^{k_1}u_2^{k_2}P(k_1,k_2) \end{align*} Now, $\tilde{G}(u_1,u_2)$ is given by \begin{align*} & \sum_{\tilde{k}_1,\tilde{k}_2}^{\infty}u_1^{\tilde{k}_1}u_2^{\tilde{k}_2}\sum_{k_1 = \tilde{k}_1}\sum_{k_2=\tilde{k}_2}P(k_1,k_2)\prod_{i=1}^{2}{k_i \choose \tilde{k}_i}T_i^{\tilde{k}_i}(1-T_i)^{k_i-\tilde{k}_i} \\ &= \sum_{k_1,k_2}^{\infty}(1+(u_1-1)T_1)^{k_1}(1+(u_2-1)T_2)^{k_2}P(k_1,k_2) \\ &= G\left(1+(u_1-1)T_1,1+(u_2-1)T_2\right) \end{align*} Similarly, $\tilde{F}(u_1,u_2) = F(1+(u_1-1)T_1,1+(u_2-1)T_2)$ \par A component is a \emph{small} cluster of nodes that have received the information message. By small we mean that the cluster is finite and does not scale with the network size. However, at the phase transition, the average size of the cluster diverges (as $N \to \infty$). An information epidemic outbreak is possible only when the average size of the cluster diverges. In this regime the component is termed as a giant connected component (GCC) and it grows with the network size. Let $\tilde{H}_i(u_1,u_2)$ be the generating function of the distribution of the number of type 1 and type 2 nodes in a component arrived at from a type $i$ link. Let $\tilde{J}_i(u_1,u_2)$ and $\tilde{J}(u_1,u_2)$ be the generating functions of the distribution of the number of type 1 and type 2 nodes in a component arrived at from node $i$ and a randomly chosen node, respectively. \par \begin{figure} \centering \includegraphics[width = 0.6\textwidth]{Percolation.pdf} \caption{(Color Online) Illustration of components. The red boxes represent the components reached by type $1$ link while green boxes represent components reached by a type $2$ link. A type 2 node is represented by a green circle while a red circle represents a type 1 node. } \label{fig:percolation} \end{figure} Let random variable $Y_i$ be the number of type 1 and 2 nodes, that have received the message, in a component arrived at from a type $i$ link. The probability of encountering closed loops in finite cluster is $O(N^{-1})$ \cite{Newman2002} which can be neglected for large $N$. The tree like structure of the cluster allows us to write the size of the component encountered by traversing the link, as the sum of the size of components encountered after traversing the links emanating from the node at the end of the initial link. This is illustrated in Fig. \ref{fig:percolation}. Hence, $Y_i$ can be written as: \begin{align*} Y_i = 1 + \tilde{K}_1Y_1 + \tilde{K}_2Y_2 \end{align*} where random variable $\tilde{K}_i$ is the number of type $i$ neighbors of the end node of type $i$ link that have received the message; the arrival link is not counted (excess degree). Since, the size of the components along different links are mutually independent (absence of loops) we can write the above equation in terms of probability generating functions. \begin{align*} \tilde{H}_i(u_1,u_2) &= u_i\tilde{H}_1(u_1,u_2)^{\tilde{K}_1}\tilde{H}_2(u_1,u_2)^{\tilde{K}_2} \\ &= u_i \sum_{\tilde{k}_1,\tilde{k}_2}^{\infty} \tilde{H}_1^{k_1}(u_1,u_2)\tilde{H}_2^{k_2}(u_1,u_2)\tilde{Q}(\tilde{k}_1,\tilde{k}_2) \\ &= u_i\tilde{F}(\tilde{H}_1(u_1,u_2) ,\tilde{H}_2(u_1,u_2) ) \\ \end{align*} Which can also be written as \begin{align} \tilde{H}_i(u_1,u_2) = u_iF\left(1+(\tilde{H}_1(u_1,u_2)-1)T_1,1+(\tilde{H}_2(u_1,u_2)-1)T_2 \right) \label{eqn:pgfCluster} \end{align} Similarly, $\tilde{J}(u_1,u_2)$ can be expressed as : \begin{align*} \tilde{J}_i(u_1,u_2) &= u_i\sum_{\tilde{k}_1,\tilde{k}_2}^{\infty} \tilde{H}_1^{k_1}(u_1,u_2)\tilde{H}_2^{k_2}(u_1,u_2)\tilde{P}(\tilde{k}_1,\tilde{k}_2) \\ &= u_i\tilde{G}(\tilde{H}_1(u_1,u_2) ,\tilde{H}_2(u_1,u_2) ) \\ \tilde{J}(u_1,u_2) &= (1-p)\tilde{J}_1(u_1,u_2) +p \tilde{J}_2(u_1,u_2) \end{align*} where $p$ is the probability of choosing a type 2 node, $p = \sum \limits_{k=1}^{\infty}P(k)\phi(k)$. The following theorem describes the phase transition conditions required for an outbreak and the size of the such an outbreak. The proof can be found in \ref{appendix:theorem1}. \begin{thm} The condition required for a small cluster to become a giant connected component is given by: $\tilde{\nu}\geq 1 $, where \begin{align*} \tilde{\nu} = T_1\sum_{k_1,k_2}^{\infty}k_1Q(k_1,k_2) + T_2\sum\limits_{k_1,k_2}^{\infty}k_2Q(k_1,k_2) \end{align*} and the proportion of nodes in the giant connected component (size of GCC) is given by $1-\psi$, \begin{align*} \psi = \sum_{k_1,k_2}^{\infty}(1+(u^*-1)T_1)^{k_1}(1+(u^*-1)T_2)^{k_2}P(k_1,k_2) \end{align*} where $u^*$ is the solution of the fixed point equation \begin{align*} u = \sum_{k_1,k_2}^{\infty}(1+(u-1)T_1)^{k_1}(1+(u-1)T_2)^{k_2}Q(k_1,k_2) \end{align*} \end{thm} \par The size of the information epidemic outbreak can now be used for formulating the optimization problem. \section{Problem Formulation \label{sec:Problem Formulation}} Providing incentives in the form of referral rewards for low degree nodes, or sponsorship offers for celebrities (high degree nodes) is costly. Since, the cost is a function of the degree let $c(k)$ be the cost of providing incentivizing a node with degree $k$. The average cost, $\bar{c}(\boldsymbol{\phi})$, is given by $\sum\limits_{k=1}^{\infty}c(k)Pr($node is selected $\mid$ node has degree $k)P(k) = \sum\limits_{k=1}^{\infty} c(k)\phi(k)P(k)$. The proportion of type 2 individuals is given by $\sum\limits_{k=1}^{\infty}\phi(k)P(k)$. \par We formulate two optimization problems, viz., one which minimizes cost while enforcing a lower bound on the epidemic size, and the other which maximizes the epidemic size for a given cost budget. For both the problems, the evaluation of the size of the epidemic requires one to numerically solve a fixed point equation. Thus, there is no straightforward method to solve the optimization problem such as the Karush Kuhn Tucker (KKT) conditions, because evaluating the objective function requires one to solve a fixed point equation. We show that this problem can be reduced to a linear program, which can then be solved easily using any off the shelf LP solver. \subsection{Cost minimization problem} Providing guarantees on the minimum number of individuals who will be informed about the campaign is appropriate for campaigns with large funding, such as election campaigns where message penetration is more important than the cost. The guarantee on epidemic size is written as a constraint to the optimization problem. The cost $\bar{c}(\boldsymbol{\phi})$ is minimized subject to $1 - \psi \geq \gamma$ where $\gamma \ \in \ [0,1]$ and $\boldsymbol{\phi}$ is the control variable. If $\gamma = 0$, the constraint becomes $\tilde{\nu} \leq 1$, as $\gamma = 0$ implies $\psi = 1$ which is the same as $\tilde{\nu} \leq 1$. A finite amount of money, may put a constraint on the number of type 2 individuals. The proportion of type 2 individuals is given by $\sum_{k=1}^{\infty} \phi(k)P(k)$. This translates in to the constraint : $\sum_{k=1}^{\infty} \phi(k)P(k) \leq B$, where budget $B \ \in \ [0,1]$. \par The following theorem which is our principle contribution allows us to solve a possible non convex problem by solving a linear program. The key insight is that the probability of outbreak is monotonically decreasing in $q$, which then allows one to write the optimization problem as a linear program. The intuition behind this claim is that since $q$ is the probability of finding a type 2 node on a randomly chosen link, increase in $q$ is equivalent to the increase in number of type 2 individuals resulting in a higher epidemic size. \begin{thm} \label{theorem2} If $T_2 > T_1$, then $\psi \ \in \ (0,1)$, is strictly decreasing with respect to $q$, i.e, $\frac{d\psi}{dq} <0$ for all $q \ \in \ [0,1] $. For the $\psi =0$ case $(\tilde{\nu}\geq 1)$, $\tilde{\nu}$ is strictly increasing with respect to $q$, i.e, $\frac{d\tilde{\nu}}{dq} > 0, \ \forall \ \ q \ \in \ [0,1]$, where $q = \frac{1}{\langle k \rangle}\sum\limits_{k=1}^{\infty}k\phi(k)P(k)$. \end{thm} \begin{proof} The proof follows from Lemmas \ref{lemma2} and \ref{lemma3} detailed in Appendix \ref{appendix:theorem2}. \end{proof} Since, $\frac{d\psi}{dq} < 0$, the epidemic size constraint can be written as $\frac{1}{\langle k \rangle}\sum\limits_{k=1}^{\infty}k\phi(k)P(k) \geq q^*$, where $ \psi(q) \mid_{q=q^*} \ = 1-\gamma$. The optimization problem can now be written as follows: \begin{align} \begin{aligned} & \underset{\boldsymbol{\phi}}{\text{minimize}} \ \ \ \ \sum_{k=1}^{\infty} c(k)\phi(k)P(k) \\ & \text{subject to:} \ \ \\ & \frac{1}{\langle k\rangle}\sum_{k=1}^{\infty}k\phi(k)P(k) \geq q^* \\ & \sum_{k=1}^{\infty} \phi(k)P(k) \leq B \\ & \boldsymbol{0} \leq \boldsymbol{\phi} \leq \boldsymbol{1} \label{eqn:LinOpt1} \end{aligned} \end{align} The above problem is a linear program which can be solved by any off-the-shelf LP solver. \par The optimization problem described above may not be feasible for all values of $T_1$ and for all possible degree distributions. Assume, $B=1$, the problem becomes infeasible if $1 - \psi \leq \gamma$ when $T_2$ is at the maximum possible value, i.e., all individuals are incentivized and yet $1 - \psi \leq \gamma$. \subsection{Epidemic Size Maximization Problem} We now look at the problem of maximizing the information epidemic size (outreach) in a resource constrained scenario. More, specifically we study a scenario where the cost budget is finite. Thus the outbreak size $1-\psi$ must be maximized subject to a cost constraint. Since $\frac{d\psi}{dq} < 0$, maximizing $q$ is equivalent to maximizing $1-\psi$. Thus the problem is equivalent to the following linear program. \begin{align} \begin{aligned} & \underset{\boldsymbol{\phi}}{\text{maximize}} \ \ \ \ \sum_{k=1}^{\infty}k\phi(k)P(k) \\ & \text{subject to:} \ \ \\ & \sum_{k=1}^{\infty} c(k)\phi(k)P(k) \leq C \\ & \sum_{k=1}^{\infty} \phi(k)P(k) \leq B \\ & \boldsymbol{0} \leq \boldsymbol{\phi} \leq \boldsymbol{1} \label{eqn:linOpt2} \end{aligned} \end{align} The linear program can now be solved using any standard linear programing solver. Note that constants $T_1, T_2$ do not play any role in problem (\ref{eqn:linOpt2}), while they do play a role in problem (\ref{eqn:LinOpt1}) because $q^*$ is a function of $T_1$ and $T_2$. \section{Numerical Results \label{sec:Numerical Results}} As an illustration, we study the solution of the optimization problem for a linear cost, i.e., $c(k)=k$. The higher the degree, the higher the cost. Note that even if cost is non linear in $k$, the optimization problem remains a linear program. In the real world, the cost may be different, but whatever the cost function, the solution can be obtained by simply solving a linear program. \par We used an uncorrelated random graph generated using the configuration model technique with power law degree distribution ($P(k)\propto k^{- \alpha}$), $\alpha = 2.5$. \subsection{Cost Minimization Problem} \begin{figure} \centering \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width = \textwidth]{CostMinimizationSoln.pdf} \caption{} \label{fig:CostMinSoln} \end{subfigure} \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width = \textwidth]{NumSelectedvsT1.pdf} \caption{} \label{fig:Type2ForT1} \end{subfigure} \caption{(Color Online) (a) Solution $\boldsymbol{\phi}$, for different values of $T_1$; (b) Optimal proportion of type 2 nodes required to meet outreach constraint. Parameters: $T_2 = 0.6,\ B = 0.7, \ \gamma = 0.2$.} \end{figure} We solved the cost minimization linear program using the `\emph{linprog}' MATLAB solver; $q^*$ was computed numerically using the bisection method. In Fig. \ref{fig:CostMinSoln}, we plot the solution $\boldsymbol{\phi}$ for different values of $T_1$. The solution shows that only about $50 \%$ of high degree nodes need to be incetivized for $T_1$ values ranging from $0.3$ to $0.43$. As $T_1$ decreases from $0.47$ to $0.3$ , the proportion of high degree nodes that are incentivized remain fairly constant (50\%), while the proportion of incentivized low degree nodes increase. In Fig. \ref{fig:Type2ForT1}, we plot the optimal proportion of individuals that need to be incentivized for achieving the given outreach size. \subsection{Epidemic Size Maximization Problem} \begin{figure} \centering \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width = \textwidth]{SizeVsCost.pdf} \caption{} \label{fig:SizeVsCost} \end{subfigure} \begin{subfigure}[b]{0.49\textwidth} \includegraphics[width = \textwidth]{NumSelectedVsCost.pdf} \caption{} \label{fig:Type2ForCost} \end{subfigure} \caption{(Color Online) (a) Size of the information epidemic for varying cost budget (C). (b) Optimal proportion of type 2 nodes required to meet outreach constraint as a function of cost budget (C). Parameters: $T_2 = 0.6,\ B = 0.7$.} \end{figure} The solution, $\boldsymbol{\phi}$, is very similar to the one in problem (\ref{eqn:LinOpt1}), and hence we do not show it here. In Fig. \ref{fig:SizeVsCost}, we plot the size of the epidemic for varying cost budget $C$. As expected, the epidemic size increases with $C$ because higher the budget, the higher the proportion of incentivized individuals. However, at some point epidemic size saturates, this is because all nodes have been incentivized and therefore nothing more can be done to increase the outreach size. This is verified by Fig. \ref{fig:Type2ForCost}, the fraction of type 2 nodes hit $1$, when $C=3$. \section{Conclusion and Future Work\label{sec:Conclusion}} To summarize, we studied the problem of maximizing information spreading in a social networks. More specifically, we considered a scenario where individuals are incentivized to vigorously spread the campaign message to their neighbors, and we proposed a mechanism to identify the individuals who should be incetivized. Using bond percolation theory we calculated the size of the information epidemic outbreak and the conditions for the occurrence of such outbreaks. We then formulated an optimization problem for minimizing the expected cost of incentivizing individuals while providing guarantees on the information epidemic size. Although the optimization problem could not be addressed using standard analytical tools, Theorem \ref{theorem2} enabled us to compute the global optimum by solving a linear program. We believe that our approach of using percolation theory to formulate an optimization problem is the first of its kind. \par { For the sake of analytical tractability we assumed an uncorrelated network, however in reality real world social networks have positive degree-degree correlations \cite{Newman2003b}. Such networks with positive degree associativity percolate more easily compared to uncorrelated networks \cite{Newman2002b, Noh2007}. Therefore, for the problem of minimizing cost the given campaign size could be achieved with a slightly lesser cost, while in the second problem, the theoretical optimal size would be a lower bound and the actual campaign size would be slightly larger than the theoretical. Apart from positive degree associativity, social networks are also found to contain community structures \cite{Newman2003b}. The presence of communities may slow down information spreading leading to a reduction in the campaign size. This may happen as most links point inside the community rather than outside it, thus localizing the information spread \cite{Wu2008}. However, if the network contains high degree nodes that bridge different communities, then incetivizing such nodes may substantially increase the campaign size. A similar finding was reported in \cite{Salathe2010}, where authors investigated usefulness of targeted vaccinations on nodes that bridge communities.} \par { Although SIR models are widely used to model epidemics, they have some limitations. They fail to capture the fact that individuals may stop spreading when they perceive that most of their neighbors already known the information. This is captured by the Maki-Thompson model \cite{Nekovee2007} which forces the recovery rate to be an increasing function of the number of informed individuals she contacts. Thus the recovery rate for an infected node is a function of her degree. An SIR process has a fixed recovery rate and hence the current results would approximately hold for an Maki Thompson process on Erdos-Renyi networks, where every node on average has the same degree. However, our results for SIR may not generalize for the Maki Thompson spread model on scale free networks. High degree nodes may have a higher chance of being connected to informed individuals which may lead them to stop spreading to other uninformed nodes. } \par { An interesting extension to this problem, which was suggested by the anonymous referee, is to compute a targeted incentivization strategy for two interacting campaigns. For example, the campaigner may want to maximize campaign $A$ given that campaign $B$, which has either run its course or is simultaneously running along with $A$, either reinforces or hinders campaign $A$. This is an important problem since such interacting campaigns are often observed during parliamentary or presidential elections. Although the current results may not shed much light on such questions, we believe that they lay the foundation for investigating such problems which we hope to address in the future. }
{'timestamp': '2016-06-17T02:11:21', 'yymm': '1606', 'arxiv_id': '1606.05209', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05209'}
arxiv
\section{Introduction} \label{sec:intro} Several rich strands of work in the behavioral sciences have been concerned with characterizing the nature and sources of human error. These include the broad of notion of {\em bounded rationality} \cite{simon-models-of-man} and the subsequent research beginning with Kahneman and Tversky on heuristics and biases \cite{tversky-heuristics-biases}. With the growing availability of large datasets containing millions of human decisions on fixed, well-defined, real-world tasks, there is an interesting opportunity to add a new style of inquiry to this research --- given a large stream of decisions, with rich information about the context of each decision, can we algorithmically characterize and predict the instances on which people are likely to make errors? This genre of question --- analyzing human errors from large traces of decisions on a fixed task --- also has an interesting relation to the canonical set-up in machine learning applications. Typically, using instances of decision problems together with ``ground truth'' showing the correct decision, an algorithm is trained to produce the correct decisions in a large fraction of instances. The analysis of human error, on the other hand, represents a twist on this formulation: given instances of a task in which we have both the correct decision {\em and} a human's decision, the algorithm is trained to recognize future instances on which the human is likely to make a mistake. Predicting human error from this type of trace data has a history in human factors research \cite{kirwan-human-reliability,salvendy-human-error}, and a nascent line of work has begun to apply current machine-learning methods to the question \cite{lakkaraju-bail-working-paper,lakkaraju-sdm15-eval}. \xhdr{Model systems for studying human error} As the investigation of human error using large datasets grows increasingly feasible, it becomes useful to understand which styles of analysis will be most effective. For this purpose, as in other settings, there is enormous value in focusing on model systems where one has exactly the data necessary to ask the basic questions in their most natural formulations. What might we want from such a model system? \begin{itemize} \item[(i)] It should consist of a task for which the context of the human decisions has been measured as thoroughly as possible, and in a very large number of instances, to provide the training data for an algorithm to analyze errors. \item[(ii)] So that the task is non-trivial, it should be challenging even for highly skilled human decision-makers. \item[(iii)] Notwithstanding the previous point (ii), the ``ground truth'' --- the correctness of each candidate decision --- should be feasibly computable by an algorithm. \end{itemize} Guided by these desiderata, we focus in this paper on chess as a model system for our analysis. In doing so, we are proceeding by analogy with a long line of work in behavioral science using chess as a model for human decision-making \cite{charness-psych-chess-review,chase-simon-perception-chess,degroot-thought-choice-chess}. Chess is a natural domain for such investigations, since it presents a human player with a sequence of concrete decisions --- which move to play next --- with the property that some choices are better than others. Indeed, because chess provides data on hard decision problems in such a pure fashion, it has been described as the ``drosophila of psychology'' \cite{didierjean-chess-since-degroot,halpern-wai-scrabble}. (It is worth noting our focus here on {\em human} decisions in chess, rather than on designing algorithms to play chess \cite{newborn-computer-chess}. This latter problem has also, of course, generated a rich literature, along with a closely related tag-line as the ``drosophila of artificial intelligence'' \cite{mccarthy-chess-drosophila}.) \xhdr{Chess as a model system for human error} Despite the clean formulation of the decisions made by human chess players, we still must resolve a set of conceptual challenges if our goal is to assemble a large corpus of chess moves with ground-truth labels that classify certain moves as errors. Let us consider three initial ideas for how we might go about this, each of which is lacking in some crucial respect for our purposes. First, for most of the history of human decision-making research on chess, the emphasis has been on focused laboratory studies at small scales in which the correct decision could be controlled by design \cite{charness-psych-chess-review}. In our list of desiderata, this means that point (iii), the availability of ground truth, is well under control, but a significant aspect of point (i) --- the availability of a vast number of instances --- is problematic due to the necessarily small scales of the studies. A second alternative would be to make use of two important computational developments in chess --- the availability of databases with millions of recorded chess games by strong players; and the fact that the strongest chess programs --- generally referred to as {\em chess engines} --- now greatly outperform even the best human players in the world. This makes it possible to analyze the moves of strong human players, in a large-scale fashion, comparing their choices to those of an engine. This has been pursued very effectively in the last several years by Biswas and Regan \cite{biswas-regan-icmla15,biswas-regan-icaart15,regan-biswas-cig13}; they have used the approach to derive interesting insights including proposals for how to estimate the depth at which human players are analyzing a position. For the current purpose of assembling a corpus with ground-truth error labels, however, engines present a set of challenges. The basic difficulty is that even current chess engines are far from being able to provide guarantees regarding the best move(s) in a given position. In particular, an engine may prefer move $m$ to $m'$ in a given position, supplementing this preference with a heuristic numerical evaluation, but $m'$ may ultimately lead to the same result in the game, both under best play and under typical play. In these cases, it is hard to say that choosing $m'$ should be labeled an error. More broadly, it is difficult to find a clear-cut rule mapping an engine's evaluations to a determination of human error, and efforts to label errors this way would represent a complex mixture of the human player's mistakes and the nature of the engine's evaluations. Finally, a third possibility is to go back to the definition of chess as a deterministic game with two players (White and Black) who engage in alternating moves, and with a game outcome that is either (a) a win for White, (b) a win for Black, or (c) a draw. This means that from any position, there is a well-defined notion of the outcome with respect to optimal play by both sides --- in game-theoretic terms, this is the {\em minimax value} of the position. In each position, it is the case that White wins with best play, or Black wins with best play, or it is a draw with best play, and these are the three possible minimax values for the position. This perspective provide us with a clean option for formulating the notion of an error, namely the direct game-theoretic definition: a player has committed an error if their move worsens the minimax value from their perspective. That is, the player had a forced win before making their move but now they don't; or the player had a forced draw before making their move but now they don't. But there's an obvious difficulty with this route, and it's a computational one: for most chess positions, determining the minimax value is hopelessly beyond the power of both human players and chess engines alike. We now discuss the approach we take here. \xhdr{Assessing errors using tablebases} In our work, we use minimax values by leveraging a further development in computer chess --- the fact that chess has been solved for all positions with at most $k$ pieces on the board, for small values of $k$ \cite{url-lomonosov-tablebases,url-nalimov-tablebases,kopec-advances-man-machine}. (We will refer to such positions as {\em $\leq$$k$-piece positions}.) Solving these positions has been accomplished not by forward construction of the chess game tree, but instead by simply working backward from terminal positions with a concrete outcome present on the board and filling in all other minimax values by dynamic programming until all possible $\leq$$k$-piece positions have been enumerated. The resulting solution for all $\leq$$k$-piece positions is compiled into an object called a {\em $k$-piece tablebase}, which lists the game outcome with best play for each of these positions. The construction of tablebases has been a topic of interest since the early days of computer chess \cite{kopec-advances-man-machine}, but only with recent developments in computing and storage have truly large tablebases been feasible. Proprietary tablebases with $k = 7$ have been built, requiring in excess of a hundred terabytes of storage \cite{url-lomonosov-tablebases}; tablebases for $k = 6$ are much more manageable, though still very large \cite{url-nalimov-tablebases}, and we focus on the case of $k = 6$ in what follows.\footnote{There are some intricacies in how tablebases interact with certain rules for draws in chess, particularly {\em threefold-repetition} and {\em the 50-move rule}, but since these have essentially negligible impact on our use of tablebases in the present work, we do not go into further details here.} Tablebases and traditional chess engines are thus very different objects. Chess engines produce strong moves for arbitrary positions, but with no absolute guarantees on move quality in most cases; tablebases, on the other hand, play perfectly with respect to the game tree --- indeed, effortlessly, via table lookup --- for the subset of chess containing at most $k$ pieces on the board. Thus, for arbitrary $\leq$$k$-piece positions, we can determine minimax values, and so we can obtain a large corpus of chess moves with ground-truth error labels: Starting with a large database of recorded chess games, we first restrict to the subset of $\leq$$k$-piece positions, and then we label a move as an error if and only it worsens the minimax value from the perspective of the player making the move. Adapting chess terminology to the current setting, we will refer to such an instance as a {\em blunder}. This is our model system for analyzing human error; let us now check how it lines up with desiderata (i)-(iii) for a model system listed above. Chess positions with at most $k = 6$ pieces arise relatively frequently in real games, so we are left with many instances even after filtering a database of games to restrict to only these positions (point (i)). Crucially, despite their simple structure, they can induce high error rates by amateurs and non-trivial error rates even by the best players in the world; in recognition of the inherent challenge they contain, textbook-level treatments of chess devote a significant fraction of their attention to these positions \cite{fine-basic-chess-endings} (point (ii)). And they can be evaluated perfectly by tablebases (point (iii)). Focusing on $\leq$$k$-piece positions has an additional benefit, made possible by a combination of tablebases and the recent availability of databases with millions of recorded chess games. The most frequently-occurring of these positions arise in our data thousands of times. As we will see, this means that for some of our analyses, we can control for the exact position on the board and still have enough instances to observe meaningful variation. Controlling for the exact position is not generally feasible with arbitrary positions arising in the middle of a chess game, but it becomes possible with the scale of data we now have, and we will see that in this case it yields interesting and in some cases surprising insights. Finally, we note that our definition of blunders, while concrete and precisely aligned with the minimax value of the game tree, is not the only definition that could be considered even using tablebase evaluations. In particular, it would also be possible to consider ``softer'' notions of blunders. Suppose for example that a player is choosing between moves $m$ and $m'$, each leading to a position whose minimax value is a draw, but suppose that the position arising after $m$ is more difficult for the opponent, and produces a much higher empirical probability that the opponent will make a mistake at some future point and lose. Then it can be viewed as a kind of blunder, given these empirical probabilities, to play $m'$ rather than the more challenging $m$. This is sometimes termed {\em speculative play} \cite{jansen-speculative-play}, and it can be thought of primarily as a refinement of the coarser minimax value. This is an interesting extension, but for our work here we focus on the purer notion of blunders based on the minimax value. \section{Setting Up the Analysis} \label{sec:features} In formulating our analysis, we begin from the premise that for analyzing error in human decisions, three crucial types of features are the following: \begin{itemize} \itemsep0em \item[(a)] the skill of the decision-maker; \item[(b)] the time available to make the decision; and \item[(c)] the inherent difficulty of the decision. \end{itemize} Any instance of the problem will implicitly or explicitly contain features of all three types: an individual of a particular level of skill is confronting a decision of a particular difficulty, with a given amount of time available to make the decision. In our current domain, as in any other setting where the question of human error is relevant, there are a number of basic genres of question that we would like to ask. These include the following. \begin{itemize} \itemsep0em \item For predicting whether an error will be committed in a given instance, which types of features (skill, time, or difficulty) yield the most predictive power? \item In which kinds of instances does greater skill confer the largest relative benefit? Is it for more difficult decisions (where skill is perhaps most essential) or for easier ones (where there is the greatest room to realize the benefit)? Are there particular kinds of instances where skill does not in fact confer an appreciable benefit? \item An analogous set of questions for time in place of skill: In which kinds of instances does greater time for the decision confer the largest benefit? Is additional time more beneficial for hard decisions or easy ones? And are there instances where additional time does not reduce the error rate? \item Finally, there are natural questions about the interaction of skill and time: is it higher-skill or lower-skill decision-makers who benefit more from additional time? \end{itemize} These questions motivate our analyses in the subsequent sections. We begin by discussing how features of all three types (skill, time, and difficulty) are well-represented in our domain. Our data comes from two large databases of recorded chess games. The first is a corpus of approximately 200 million games from the Free Internet Chess Server (FICS), where amateurs play each other on-line\footnote{This data is publicly available at {\url{ficsgames.org}}.}. The second is a corpus of approximately 1 million games played in international tournaments by the strongest players in the world. We will refer to the first of these as the FICS dataset, and the second as the GM dataset. (GM for ``grandmaster,'' the highest title a chess player can hold.) For each corpus, we extract all occurrences of $\leq$$6$-piece positions from all of the games; we record the move made in the game from each occurrence of each position, and use a tablebase to evaluate all possible moves from the position (including the move that was made). This forms a single instance for our analysis. Since we are interested in studying errors, we exclude all instances in which the player to move is in a theoretically losing position --- where the opponent has a direct path to checkmate --- because there are no blunders in losing positions (the minimax value of the position is already as bad as possible for the player to move). There are 24.6 million (non-losing) instances in the FICS dataset, and 880,000 in the GM dataset. We now consider how feature types (a), (b), and (c) are associated with each instance. First, for skill, each chess player in the data has a numerical rating, termed the {\em Elo rating}, based on their performance in the games they've played \cite{elo-chess-ratings,herbrich-trueskill}. Higher numbers indicate stronger players, and to get a rough sense of the range: most amateurs have ratings in the range 1000-2000, with extremely strong amateurs getting up to 2200-2400; players above 2500-2600 belong to a rarefied group of the world's best; and at any time there are generally about fewer than five people in the world above 2800. If we think of a game outcome in terms of points, with 1 point for a win and 0.5 points for a draw, then the Elo rating system has the property that when a player is paired with someone 400 Elo points lower, their expected game outcome is approximately $0.91$ points --- an enormous advantage.\footnote{In general, the system is designed so that when the rating difference is $400d$, the expected score for the higher-ranked player under the Elo system is $1 / (1 + 10^{-d})$.} For our purposes, an important feature of Elo ratings is the fact that a single number has empirically proven so powerful at predicting performance in chess games. While ratings clearly cannot contain all the information about players' strengths and weaknesses, their effectiveness in practice argues that we can reasonably use a player's rating as a single numerical feature that approximately represents their skill. With respect to temporal information, chess games are generally played under time limits of the form, ``play $x$ moves in $y$ minutes'' or ``play the whole game in $y$ minutes.'' Players can choose how they use this time, so on each move they face a genuine decision about how much of their remaining allotted time to spend. The FICS dataset contains the amount of time remaining in the game when each move was played (and hence the amount of time spent on each move as well); most of the games in the FICS dataset are played under extremely rapid time limits, with a large fraction of them requiring that the whole game be played in 3 minutes for each player. To avoid variation arising from the game duration, we focus on this large subset of the FICS data consisting exclusively of games with 3 minutes allocated to each side. Our final set of features will be designed to quantify the difficulty of the position on the board --- i.e. the extent to which it is hard to avoid selecting a move that constitutes a blunder. There are many ways in which one could do this, and we are guided in part by the goal of developing features that are less domain-specific and more applicable to decision tasks in general. We begin with perhaps the two most basic parameters, analogues of which would be present in any setting with discrete choices and a discrete notion of error --- these are the number of legal moves in the position, and the number of these moves that constitute blunders. Later, we will also consider a general family of parameters that involve looking more deeply into the search tree, at moves beyond the immediate move the player is facing. To summarize, in a single instance in our data, a player of a given rating, with a given amount of time remaining in the game, faces a specific position on the board, and we ask whether the move they select is a blunder. We now explore how our different types of features provide information about this question, before turning to the general problem of prediction. \section{Fundamental Dimensions} \label{sec:basic} \subsection{Difficulty} \label{subsec:difficulty} We begin by considering a set of basic features that help quantify the difficulty inherent in a position. There are many features we could imagine employing that are highly domain-specific to chess, but our primary interest is in whether a set of relatively generic features can provide non-trivial predictive value. Above we noted that in any setting with discrete choices, one can always consider the total number of available choices, and partition these into the number that constitute blunders and the number that do not constitute blunders. In particular, let's say that in a given chess position $P$, there are $n(P)$ legal moves available --- these are the possible choices --- and of these, $b(P)$ are blunders, in that they lead to a position with a strictly worse minimax value. Note that it is possible to have $b(P) = 0$, but we exclude these positions because it is impossible to blunder. Also, by the definition of the minimax value, we must have $b(P) \leq n(P) - 1$; that is, there is always at least one move that preserves the minimax value. \begin{figure}[t] \centering \includegraphics[width=0.4\textwidth]{blunder_rate_heatmap_fics2009_2015.pdf} \vspace{-2mm} \caption{A heat map showing the empirical blunder rate as a function of the two variables $(n(P),b(P))$, for the FICS dataset.} \label{fig:blunder-rate-heat-map} \vspace{-3mm} \end{figure} A global check of the data reveals an interesting bimodality in both the FICS and GM datasets: positions with $b(P) = 1$ and positions with $b(P) = n(P) - 1$ are both heavily represented. The former correspond to positions in which there is a unique blunder, and the latter correspond to positions in which there is a unique correct move to preserve the minimax value. Our results will cover the full range of $(n(P),b(P))$ values, but it is useful to know that both of these extremes are well-represented. Now, let us ask what the empirical blunder rate looks like as a bivariate function of this pair of variables $(n(P),b(P))$. Over all instances in which the underlying position $P$ satisfies $n(P) = n$ and $b(P) = b$, we define $r(n,b)$ to be the fraction of those instances in which the player blunders. How does the empirical blunder rate vary in $n(P)$ and $b(P)$? It seems natural to suppose that for fixed $n(P)$, it should generally increase in $b(P)$, since there are more possible blunders to make. On the other hand, instances with $b(P) = n(P) - 1$ often correspond to chess positions in which the only non-blunder is ``obvious'' (for example, if there is only one way to recapture a piece), and so one might conjecture that the empirical blunder rate will be lower for this case. In fact, the empirical blunder rate is generally monotone in $b(P)$, as shown by the heatmap representation of $r(n,b)$ in Figure \ref{fig:blunder-rate-heat-map}. (We show the function for the FICS data; the function for the GM data is similar.) Moreover, if we look at the heavily-populated line $b(P) = n(P) - 1$, the blunder rate is increasing in $n(P)$; as there are more blunders to compete with the unique non-blunder, it becomes correspondingly harder to make the right choice. \begin{figure}[t] \centering \includegraphics[width=0.23\textwidth]{blunder_rate_vs_blunder_potential_GM.pdf} \includegraphics[width=0.23\textwidth]{blunder_rate_vs_blunder_potential_log_cmodel_GM.pdf}\\ (a) GM data \\ \includegraphics[width=0.23\textwidth]{blunder_rate_vs_blunder_potential_fics2009_2015.pdf} \includegraphics[width=0.23\textwidth]{blunder_rate_vs_blunder_potential_log_cmodel_fics2009_2015.pdf} \\ (b) FICS data \vspace{-2mm} \caption{The empirical blunder rate as a function of the blunder potential, shown for both the GM and the FICS data. On the left are standard axes, on the right are logarithmic y-axes. The plots on the right also show an approximate fit to the $\gamma$-value defined in Section \ref{subsec:difficulty}.} \label{fig:blunder-rate-blunder-potential} \vspace{-3mm} \end{figure} \xhdr{Blunder Potential} Given the monotonicity we observe, there is an informative way to combine $n(P)$ and $b(P)$: by simply taking their ratio $b(P) / n(P)$. This quantity, which we term the {\em blunder potential} of a position $P$ and denote $\beta(P)$, is the answer to the question, ``If the player selects a move uniformly at random, what is the probability that they will blunder?''. This definition will prove useful in many of the analyses to follow. Intuitively, we can think of it as a direct measure of the {\em danger} inherent in a position, since it captures the relative abundance of ways to go wrong. In Figure \ref{fig:blunder-rate-blunder-potential} we plot the function $y = r(x)$, the proportion of blunders in instances with $\beta(P) = x$, for both our GM and FICS datasets on linear as well as logarithmic $y$-axes. The striking regularity of the $r(x)$ curves shows how strongly the availability of potential mistakes translates into actual errors. One natural starting point for interpreting this relationship is to note that if players were truly selecting their moves uniformly at random, then these curves would lie along the line $y = x$. The fact that they lie below this line indicates that in aggregate players are preferentially selecting non-blunders, as one would expect. And the fact that the curve for the GM data lies much further below $y = x$ is a reflection of the much greater skill of the players in this dataset, a point that we will return to shortly. \xhdr{The $\gamma$-value} We find that a surprisingly simple model qualitatively captures the shapes of the curves in Figure \ref{fig:blunder-rate-blunder-potential} quite well. Suppose that instead of selecting a move uniformly at random, a player selected from a biased distribution in which they were preferentially $c$ times more likely to select a non-blunder than a blunder, for a parameter $c > 1$. \begin{figure}[t] \centering \includegraphics[width=0.3\textwidth]{blunder_rate_vs_elo_GM.pdf} \includegraphics[width=0.3\textwidth]{blunder_rate_vs_elo_fics2009_2015.pdf} \vspace{-2mm} \caption{The empirical blunder rate as a function of player rating, shown for both the (top) GM and (bottom) FICS data.} \label{fig:blunder-rate-rating} \end{figure} If this were the true process for move selection, then the empirical blunder rate of a position $P$ would be $$\gamma_c(P) = \frac{b(P)}{c (n(P) - b(P)) + b(P)}.$$ We will refer to this as the {\em $\gamma$-value} of the position $P$, with parameter $c$. Using the definition of the blunder potential $\beta(P)$ to write $b(P) = \beta(P) n(P)$, we can express the $\gamma$-value directly as a function of the blunder potential: $$\gamma_c(P) = \frac{\beta(P) n(P)}{c (n(P) - \beta(P) n(P)) + \beta(P) n(P)} = \frac{\beta(P)}{c - (c-1) \beta(P)}.$$ We can now find the value of $c$ for which $\gamma_c(P)$ best approximates the empirical curves in Figure \ref{fig:blunder-rate-blunder-potential}. The best-fit values of $c$ are $c \approx 15$ for the FICS data and $c \approx 100$ for the GM data, again reflecting the skill difference between the two domains. These curves are shown superimposed on the empirical plot in the figure (on the right, with logarithmic $y$-axes). We note that in game-theoretic terms the $\gamma$-value can be viewed as a kind of {\em quantal response} \cite{mckelvey-quantal-resp-extensive}, in which players in a game select among alternatives with a probability that decreases according to a particular function of the alternative's payoff. Since the minimax value of the position corresponds to the game-theoretic payoff of the game in our case, a selection rule that probabilistically favors non-blunders over blunders can be viewed as following this principle. (We note that our functional form cannot be directly mapped onto standard quantal response formulations. The standard formulations are strictly monotonically decreasing in payoff, whereas we have cases where two different blunders can move the minimax value by different amounts --- in particular, when a win changes to a draw versus a win changes to a loss --- and we treat these the same in our simple formulation of the $\gamma$-value.) \subsection{Skill} \begin{figure}[t] \centering \includegraphics[width=0.42\textwidth]{blunder_rate_vs_elo_by_blunder_opportunity_onepanel_GM.pdf} \vspace{-2mm} \centering \includegraphics[width=0.42\textwidth]{blunder_rate_vs_elo_by_blunder_opportunity_fics2009_2015.pdf} \vspace{-2mm} \caption{The empirical blunder rate as a function of Elo rating in the (top) GM and (bottom) FICS data, for positions with fixed values of the blunder potential.} \label{fig:blunder-rate-potential-rating} \vspace{-3mm} \end{figure} A key focus in the previous subsection was to understand how the empirical blunder rate varies as a function of parameters of the instance. Here we continue this line of inquiry, with respect to the skill of the player in addition to the difficulty of the position. Recall that a player's {\em Elo rating} is a function of the outcomes of the games they've played, and is effective in practice for predicting the outcomes of a game between two rated players \cite{elo-chess-ratings}. It is for this reason that we use a player's rating as a proxy for their skill. However, given that ratings are determined by which games a player wins, draws, or loses, rather than by the extent to which they blunder in $\leq$$6$-piece positions, a first question is whether the empirical blunder rate in our data shows a clean dependence on rating. In fact it does. Figure \ref{fig:blunder-rate-rating} shows the empirical blunder rate $f(x)$ averaged over all instances in which the player has rating $x$. The blunder rate declines smoothly with rating for both the GM and FICS data, with a flattening of the curve at higher ratings. \xhdr{The Skill Gradient} We can think of the downward slope in Figure \ref{fig:blunder-rate-rating} as a kind of {\em skill gradient}, showing the reduction in blunder rate as skill increases. The steeper this reduction is in a given setting, the higher the empirical benefit of skill in reducing error. It is therefore natural to ask how the skill gradient varies across different conditions in our data. As a first way to address this, we take each possible value of the blunder potential $\beta$ (rounded to the nearest multiple of $0.1$), and define the function $f_\beta(x)$ to be the empirical error rate of players of rating $x$ in positions of blunder potential $\beta$. Figure \ref{fig:blunder-rate-potential-rating} shows plots of these curves for $\beta$ equal to each multiple of $0.1$, for both the GM and FICS datasets. \begin{figure}[t] \centering \includegraphics[width=0.48\textwidth]{blunder_rate_vs_elo_numerdenom_fics2009_2015_2x2.pdf} \caption{The empirical blunder rate as a function of Elo rating in the FICS data, for positions with fixed values of $(n(P),b(P))$.} \label{fig:skill-gradient} \vspace{-3mm} \end{figure} \begin{figure}[t] \centering \hspace*{-0.03\textwidth} \includegraphics[width=0.50\textwidth]{blunder_rate_vs_elo_samepos_15pos_fics2009_2015_3x3.pdf} \\ \caption{The empirical blunder rate as a function of Elo rating, for a set of frequently-occurring positions.} \label{fig:skill-gradient-position} \end{figure} We observe two properties of these curves. First, there is remarkably little variation among the curves. When viewed on a logarithmic y-axis the curves are almost completely parallel, indicating the same rate of proportional decrease across all blunder potentials. A second, arguably more striking, property is how little the curves overlap in their ranges of $y$-values. In effect, the curves form a kind of ``ladder'' based on blunder potential: for every value of the discretized blunder potential, every rating in 1200-1800 range on FICS has a lower empirical blunder rate at blunder potential $\beta$ than the best of these ratings at blunder potential $\beta + 0.2$. In effect, each additional $0.2$ increment in blunder potential contributes more, averaging over all instances, to the aggregate empirical blunder rate than an additional 600 rating points, despite the fact that 600 rating points represent a vast difference in chess performance. We see a similar effect for the GM data, where small increases in blunder potential have a greater effect on blunder rate than the enormous difference between a rating of 2300 and a rating of 2700. (Indeed, players rated 2700 are making errors at a greater rate in positions of blunder potential 0.9 than players rated 1200 are making in positions of blunder potential 0.3.) And we see the same effects when we separately fix the numerator and denominator that constitute the blunder potential, $b(P)$ and $n(P)$, as shown in Figure \ref{fig:skill-gradient}. To the extent that this finding runs counter to our intuition, it bears an interesting relation to the {\em fundamental attribution error} --- the tendency to attribute differences in people's performance to differences in their individual attributes, rather than to differences in the situations they face \cite{jones-fundamental-attrib}. What we are uncovering here is that a basic measure of the situation --- the blunder potential, which as we noted above corresponds to a measure of the {\em danger} inherent in the underlying chess position --- is arguably playing a larger role than the players' skill. This finding also relates to work of Abelson on quantitative measures in a different competitive domain, baseball, where he found that a player's batting average accounts for very little of the variance in their performance in any single at-bat \cite{abelson-paradox}. We should emphasize, however, that despite the strong effect of blunder potential, skill does play a fundamental role role in our domain, as the analysis of this section has shown. And in general it is important to take multiple types of features into account in any analysis of decision-making, since only certain features may be under our control in any given application. For example, we may be able to control the quality of the people we recruit to a decision, even if we can't control the difficulty of the decision itself. \xhdr{The Skill Gradient for Fixed Positions} Grouping positions together by common $(n(P),b(P))$ values gives us a rough sense for how the skill gradient behaves in positions of varying difficulty. But this analysis still aggregates together a large number of different positions, each with their own particular properties, and so it becomes interesting to ask --- how does the empirical blunder rate vary with Elo rating {\em when we fix the exact position on the board?} The fact that we are able to meaningfully ask this question is based on a fact noted in Section \ref{sec:intro}, that many non-trivial $\leq$$6$-piece positions recur in the FICS data, exactly, several thousand times.\footnote{To increase the amount of data we have on each position, we cluster together positions that are equivalent by symmetry: we can apply a left-to-right reflection of the board, or we can apply a top-bottom reflection of the board (also reversing the colors of the pieces and the side to move), or we can do both. Each of the four resulting positions is equivalent under the rules of chess.} For each such position $P$, we have enough instances to plot the function $f_P(x)$, the rate of blunders committed by players of rating $x$ in position $P$. Let us say that the function $f_P(x)$ is {\em skill-monotone} if it is decreasing in $x$ --- that is, if players of higher rating have a lower blunder rate in position $P$. A natural conjecture would be that every position $P$ is skill-monotone, but in fact this is not the case. Among the most frequent positions, we find several that we term {\em skill-neutral}, with $f_P(x)$ remaining approximately constant in $x$, as well as several that we term {\em skill-anomalous}, with $f_P(x)$ increasing in $x$. Figure \ref{fig:skill-gradient-position} shows a subset of the most frequently occurring positions in the FICS data that contains examples of each of these three types: skill-monotone, skill-neutral, and skill-anomalous.\footnote{For readers interested in looking at the exact positions in question, each position in Figure \ref{fig:skill-gradient-position} is described in Forsyth-Edwards notation (FEN) above the panel in which its plot appears.} The existence of skill-anomalous positions is surprising, since there is a no {\em a priori} reason to believe that chess as a domain should contain common situations in which stronger players make more errors than weaker players. Moreover, the behavior of players in these particular positions does not seem explainable by a strategy in which they are deliberately making a one-move blunder for the sake of the overall game outcome. In each of the skill-anomalous examples in Figure \ref{fig:skill-gradient-position}, the player to move has a forced win, and the position is reduced enough that the worst possible game outcome for them is a draw under any sequence of moves, so there is no long-term value in blundering away the win on their present move. \subsection{Time} Finally, we consider our third category of features, the time that players have available to make their moves. Recall that players have to make their own decisions about how to allocate a fixed budget of time across a given number of moves or the rest of the game. The FICS data has information about the time remaining associated with each move in each game, so we focus our analysis on FICS in this subsection. Specifically, as noted in Section \ref{sec:features}, FICS games are generally played under extremely rapid conditions, and for uniformity in the analysis we focus on the most commonly-occurring FICS time constraint --- the large subset of games in which each player is allocated 3 minutes for the whole game. As a first object of study, let's define the function $g(t)$ to be the empirical blunder rate in positions where the player begins considering their move with $t$ seconds left in the game. Figure \ref{fig:blunder-rate-time-left} shows a plot of $g(t)$; it is natural that the blunder rate increases sharply as $t$ approaches $0$, though it is notable how flat the value of $g(t)$ becomes once $t$ exceeds roughly 10 seconds. \begin{figure}[t] \centering \includegraphics[width=0.3\textwidth]{blunder_rate_time_used_fics2009_2015.pdf} % \vspace{-2mm} \caption{The empirical blunder rate as a function of time remaining.} \label{fig:blunder-rate-time-left} \end{figure} \begin{figure}[t] \centering \vspace{-2mm} \includegraphics[width=0.47\textwidth]{blunder_rate_vs_timeleftbucket_by_blunder_opportunity_fics2009_2015_all1500.pdf} \vspace{-2mm} \caption{The empirical blunder rate as a function of the time remaining, for positions with fixed blunder potential values.} \label{fig:blunder-rate-potential-time-left} \vspace{-3mm} \end{figure} \begin{figure}[t] \centering \hspace*{-0.03\textwidth} \vspace{-2mm} \includegraphics[width=0.5\textwidth]{blunder_rate_timeleftbucket_by_rating_and_blundopp_fics2009_2015_2x2.pdf} \vspace{-2mm} \caption{The empirical blunder rate as a function of time remaining, fixing the blunder potential and player rating.} \label{fig:time-gradient} \vspace{-3mm} \end{figure} \xhdr{The Time Gradient} This plot in Figure \ref{fig:blunder-rate-time-left} can be viewed as a basic kind of {\em time gradient}, analogous to the skill gradient, showing the overall improvement in empirical blunder rate that arises from having extra time available. Here too we can look at how the time gradient restricted to positions with fixed blunder potential, or fixed blunder potential and player rating. We start with Figure \ref{fig:blunder-rate-potential-time-left}, which shows $g_\beta(t)$, the blunder rate for players within a narrow skill range (1500-1599 Elo) with $t$ seconds remaining in positions with blunder potential $\beta$. In this sense, it is a close analogue of Figure \ref{fig:blunder-rate-potential-rating}, which plotted $f_\beta(x)$, and for values of $t$ above $8$ seconds, it shows a very similar ``ladder'' structure in which the role of blunder potential is dominant. Specifically, for every $\beta$, players are blundering at a lower rate with $8$ to $12$ seconds remaining at blunder potential $\beta$ than they are with over a minute remaining at blunder potential $\beta + 0.2$. A small increase in blunder potential has a more extensive effect on blunder rate than a large increase in available time. We can separate the instances further both by blunder potential and by the rating of the player, via the function $g_{\beta,x}(t)$ which gives the empirical blunder rate with $t$ seconds remaining when restricted to players of rating $x$ in positions of blunder potential $\beta$. Figure \ref{fig:time-gradient} plots these functions, with a fixed value of $\beta$ in each panel. We can compare curves for players of different rating, observing that for higher ratings the curves are steeper: extra time confers a greater relative empirical benefit on higher-rated players. Across panels, we see that for higher blunder potential the curves become somewhat shallower: more time provides less relative improvement as the density of possible blunders proliferates. But equally or more striking is the fact that all curves retain a roughly constant shape, even as the empirical blunder rate climbs by an order of magnitude from the low ranges of blunder potential to the highest. Comparing across points in different panels helps drive home the role of blunder potential even when considering skill and time simultaneously. Consider for example (a) instances in which players rated 1200 (at the low end of the FICS data) with 5-8 seconds remaining face a position of blunder potential 0.4, contrasted with (b) instances in which players rated 1800 (at the high end of the FICS data) with 42-58 seconds remaining face a position of blunder potential 0.8. As the figure shows, the empirical blunder rate is lower in instances of type (a) --- a weak player in extreme time pressure is making blunders at a lower rate because they're dealing with positions that contain less danger. \xhdr{Time Spent on a Move} Thus far we've looked at how the empirical blunder rate depends on the amount of time remaining in the game. However, we can also ask how the probability of a blunder varies with the amount of time the player actually spends considering their move before playing it. When a player spends more time on a move, should we predict they're less likely to blunder (because they gave the move more consideration) or more likely to blunder (because the extra time suggests they didn't know what do)? The data turns out to be strongly consistent with the latter view: the empirical blunder rate is higher in aggregate for players who spend more time playing a move. We find that this property holds across the range of possible values for the time remaining and the blunder potential, as well as when we fix the specific position. \section{Prediction} \label{sec:prediction} We've now seen how the empirical blunder rate depends on our three fundamental dimensions: difficulty, the skill of the player, and the time available to them. We now turn to a set of tasks that allow us to further study the predictive power of these dimensions. \subsection{Greater Tree Depth} \label{sec:complex} In order to formulate our prediction methods for blunders, we first extend the set of features available for studying the difficulty of a position. Once we have these additional features, we will be prepared to develop the predictions themselves. Thus far, when we've considered a position's difficulty, we've used information about the player's immediate moves, and then invoked a tablebase to determine the outcome after these immediate moves. We now ask whether it is useful for our task to consider longer sequences of moves beginning at the current position. Specifically, if we consider all $d$-move sequences beginning at the current position, we can organize these into a {\em game tree} of depth $d$ with the current position $P$ as the root, and nodes representing the states of the game after each possible sequence of $j \leq d$ moves. Chess engines use this type of tree as their central structure in determining which moves to make; it is less obvious, however, how to make use of these trees in analyzing blunders by human players, given players' imperfect selection of moves even at depth 1. Let us introduce some notation to describe how we use this information. Suppose our instance consists of position $P$, with $n$ legal moves, of which $b$ are blunders. We will denote the moves by $m_1, m_2, ..., m_n$, leading to positions $P_1, P_2, \ldots, P_n$ respectively, and we'll suppose they are indexed so that $m_1, m_2, \ldots, m_{n-b}$ are the non-blunders, and $m_{n-b+1}, \ldots, m_n$ are the blunders. We write $T_0$ for the indices of the non-blunders $\{1, 2, \ldots, n-b\}$ and $T_1$ for the indices of the blunders $\{n-b+1, \ldots, n\}$. Finally, from each position $P_i$, there are $n_i$ legal moves, of which $b_i$ are blunders. The set of all pairs $(n_i,b_i)$ for $i = 1, 2, \ldots, n$ constitutes a potentially useful source of information in the depth-2 game tree from the current position. What might it tell us? First, suppose that position $P_i$, for $i \in T_1$, is a position reachable via a blunder $m_i$. Then if the blunder potential $\beta(P_i) = b_i/n_i$ is large, this means that it may be challenging for the opposing player to select a move that capitalizes on the blunder $m_i$ made at the root position $P$; there is a reasonable chance that the opposing will instead blunder, restoring the minimax value to something larger. This, in turn, means that it may be harder for the player in the root position of our instance to see that move $m_i$, leading to position $P_i$, is in fact a blunder. The conclusion from this reasoning is that when the blunder potentials of positions $P_i$ for $i \in T_1$ are large, it suggests a larger empirical blunder rate at $P$. It is less clear what to conclude when there are large blunder potentials at positions $P_i$ for $i \in T_0$ --- positions reachable by non-blunders. Again, it suggests that player at the root may have a harder time correctly evaluating the positions $P_i$ for $i \in T_0$; if they appear better than they are, it could lead the player to favor these non-blunders. On the other hand, the fact that these positions are hard to evaluate could also suggest a general level of difficulty in evaluating $P$, which could elevate the empirical blunder rate. There is also a useful aggregation of this information, as follows. If we define $b(T_1) = \sum_{i \in T_1} b_i$ and $n(T_1) = \sum_{i \in T_1} n_i$, and analogously for $b(T_0)$ and $n(T_0)$, then the ratio $\beta_1 = b(T_1)/n(T_1)$ is a kind of aggregate blunder potential for all positions reachable by blunders, and analogously for $\beta_0 = b(T_0)/n(T_0)$ with respect to positions reachable by non-blunders. In the next subsection, we will see that the four quantities $b(T_1)$, $n(T_1)$, $b(T_0)$, $n(T_0)$ indeed contain useful information for prediction, particularly when looking at families of instances that have the same blunder potential at the root position $P$. We note that one can construct analogous information at greater depths in the game tree, by similar means, but we find in the next subsection that these do not currently provide improvements in prediction performance, so we do not discuss greater depths further here. \subsection{Prediction Results} \label{subsec:prediction} We develop three nested prediction tasks: in the first task we make predictions about an unconstrained set of instances; in the second we fix the blunder potential at the root position; and in the third we control for the exact position. \xhdr{Task 1} In our first task we formulate the basic error-prediction problem: we have a large collection of human decisions for which we know the correct answer, and we want to predict whether the decision-maker will err or not. In our context, we predict whether the player to move will blunder, given the position they face and the various features of it we have derived, how much time they have to think, and their skill level. In the process, we seek to understand the relative value of these features for prediction in our domain. We restrict our attention to the 6.6 million instances that occurred in the 320,000 empirically most frequent positions in the FICS dataset. Since the rate of blundering is low in general, we down-sample the non-blunders so that half of our remaining instances are blunders and the other half are non-blunders. This results in a balanced dataset with 600,000 instances, and we evaluate model performance with accuracy. For ease of interpretation, we use both logistic regression and decision trees. Since the relative performance of these two classifiers is virtually identical, but decision trees perform slightly better, we only report the results using decision trees here. Table~\ref{tab:features} defines the features we use for prediction. In addition the notation defined thus far, we define: $S=\{\textrm{Elo},\textrm{Opp-elo}\}$ to be the skill features consisting of the rating of the player and the opponent; $a(P)=n(P)-b(P)$ for the number of non-blunders in position $P$; $D_1=\{a(P),b(P),\beta(P)\}$ to be the difficulty features at depth 1; $D_2=\{a(T_0), b(T_0), a(T_1),\allowbreak b(T_1), \beta_0(P), \beta_1(P)\}$ as the difficulty features at depth 2 defined in the previous subsection; and $t$ as the time remaining. \begin{table}[t] \begin{tabular}{p{2cm}p{5.6cm}} \toprule Feature & Description \\ \midrule $\beta(P)$ & Blunder potential ($b(P)/n(P)$) \\ $a(P)$, $b(P)$ & \# of non-blunders, \# of blunders \\ $a(T_0)$, $b(T_0)$ & \# of non-blunders and blunders available to opponent following a non-blunder \\ $a(T_1)$, $b(T_1)$ & \# of non-blunders and blunders available to \newline opponent following a blunder \\ $\beta_0(P)$ & Opponent's aggregate $\beta$ after a non-blunder \\ $\beta_1(P)$ & Opponent's aggregate $\beta$ after a blunder \\ Elo, Opp-elo & Player ratings (skill level) \\ $t$ & Amount of time player has left in game \\ \bottomrule \end{tabular} \caption{Features for blunder prediction.} \label{tab:features} \vspace*{-4mm} \end{table} In Table~\ref{tab:task1results}, we show the performance of various combinations of our features. The most striking result is how dominant the difficulty features are. Using all of them together gives 0.75 accuracy on this balanced dataset, halfway between random guessing and perfect performance. In comparison, skill and time are much less informative on this task. The skill features $S$ only give 55\% accuracy, time left $t$ yields 53\% correct predictions, and neither adds predictive value once position difficulty features are in the model. The weakness of the skill and time features is consistent with our findings in Section~\ref{sec:basic}, but still striking given the large ranges over which the Elo ratings and time remaining can extend. In particular, a player rated 1800 will almost always defeat a player rated 1200, yet knowledge of rating is not providing much predictive power in determining blunders on any individual move. Similarly, a player with 10 seconds remaining in the entire game is at an enormous disadvantage compared to a player with two minutes remaining, but this too is not providing much leverage for blunder prediction at the move level. While these results only apply to our particular domain, it suggests a genre of question that can be asked by analogy in many domains. (To take one of many possible examples, one could similarly ask about the error rate of highly skilled drivers in difficult conditions versus bad drivers in safe conditions.) Another important result is that most of the predictive power comes from depth 1 features of the tree. This tells us the immediate situation facing the player is by far the most informative feature. Finally, we note that the prediction results for the GM data (where we do not have time information available) are closely analogous; we get a slightly higher accuracy of $0.77$, and again it comes entirely from our basic set of difficulty features for the position. \begin{table}[t] \begin{tabular}{p{4.6cm}P{3cm}} \toprule Model & Accuracy \\ \midrule Random guessing & 0.50 \\ $\beta(P)$ & 0.73 \\ $D_1$ & 0.73 \\ $D_2$ & 0.72 \\ $D_1 \cup D_2$ & \textbf{0.75} \\ $S$ & 0.55 \\ $S \cup D_1 \cup D_2$ & \textbf{0.75} \\ $\{t\}$ & 0.53 \\ $\{t\} \cup D_1 \cup D_2$ & \textbf{0.75} \\ $S \cup \{t\} \cup D_1 \cup D_2$ & \textbf{0.75} \\ \bottomrule \end{tabular} \caption{Accuracy results on Task 1.} \label{tab:task1results} \vspace*{-1mm} \end{table} \xhdr{Human Performance on a Version of Task 1} Given the accuracy of algorithms for Task 1, it is natural to consider how this compares to the performance of human chess players on such a task. To investigate this question, we developed a version of Task 1 as a web app quiz and promoted it on two popular Internet chess forums. Each quiz question provided a pair of $\leq$6-piece instances with White to move, each showing the exact position on the board, the ratings of the two players, and the time remaining for each. The two instances were chosen from the FICS data with the property that White blundered in one of them and not the other, and the quiz question was to determine in which instance White blundered. In this sense, the quiz is a different type of chess problem from the typical style, reflecting the focus of our work here: rather than ``White to play and win,'' it asked ``Did White blunder in this position?''. Averaging over approximately 6000 responses to the quiz from 720 participants, we find an accuracy of $0.69$, non-trivially better than random guessing but also non-trivially below our model's performance of $0.79$.\footnote{Note that the model performs slightly better here than in our basic formulation of Task 1, since there instances were not presented in pairs but simply as single instances drawn from a balanced distribution of positive and negative cases.} The relative performance of the prediction algorithm and the human forum participants forms an interesting contrast, given that the human participants were able to use domain knowledge about properties of the exact chess position while the algorithm is achieving almost its full performance from a single number -- the blunder potential --- that draws on a tablebase for its computation. We also investigated the extent to which the guesses made by human participants could be predicted by an algorithm; our accuracy on this was in fact lower than for the blunder-prediction task itself, with the blunder potential again serving as the most important feature for predicting human guesses on the task. \vspace{-1mm} \xhdr{Task 2} Given how powerful the depth 1 features are, we now control for $b(P)$ and $n(P)$ and investigate the predictive performance of our features once blunder potential has been fixed. Our strategy on this task is very similar to before: we compare different groups of features on a binary classification task and use accuracy as our measure. These groups of features are: $D_2$, $S$, $S \cup D_2$, $\{t\}$, $\{t\} \cup D_2$, and the full set $S\cup \{t\} \cup D_2$. For each of these models, we have an accuracy score for every $(b(P),n(P))$ pair. The relative performances of the models are qualitatively similar across all $(b(P),n(P))$ pairs: again, position difficulty dominates time and rating, this time at depth 2 instead of depth 1. In all cases, the performance of the full feature set is best (the mean accuracy is 0.71), but $D_2$ alone achieves 0.70 accuracy on average. This further underscores the importance of position difficulty. Additionally, inspecting the decision tree models reveals a very interesting dependence of the blunder rate on the depth 1 structure of the game tree. First, recall that the most frequently occurring positions in our datasets have either $b(P)=1$ or $b(P) = n(P)-1$. In so-called ``only-move'' situations, where there is only one move that is not a blunder, the dependence of blunder rate on $D_2$ is as one would expect: the higher the $b(T_1)$ ratio, the more likely the player is to blunder. But for positions with only one blunder, the dependence reverses: blunders are {\em less} likely with higher $b(T_1)$ ratios. Understanding this latter effect is an interesting open question. \vspace{-1mm} \xhdr{Task 3} Our final prediction question is about the degree to which time and skill are informative once the position has been fully controlled for. In other words, once we understand everything we can about a position's difficulty, what can we learn from the other dimensions? To answer this question, we set up a final task where we fix the position completely, create a balanced dataset of blunders and non-blunders, and consider how well time and skill predict whether a player will blunder in the position or not. We do this for all 25 instances of positions for which there are over 500 blunders in our data. On average, knowing the rating of the player alone results in an accuracy of 0.62, knowing the times available to the player and his opponent yields 0.54, and together they give 0.63. Thus once difficulty has been completely controlled for, there is still substantive predictive power in skill and time, consistent with the notion that all three dimensions are important. \section{Discussion} \label{sec:discussion} We have used chess as a model system to investigate the types of features that help in analyzing and predicting error in human decision-making. Chess provides us with a highly instrumented domain in which the time available to and skill of a decision-maker are often recorded, and, for positions with few pieces, the set of optimal decisions can be determined computationally Through our analysis we have seen that the inherent difficulty of the decision, even approximated simply by the proportion of available blunders in the underlying position, can be a more powerful source of information than the skill or time available. We have also identified a number of other phenomena, including the ways in which players of different skill levels benefit differently, in aggregate, from easier instances or more time. And we have found, surprisingly, that there exist {\em skill-anomalous} positions in which weaker players commit fewer errors than stronger players. We believe there are natural opportunities to apply the paper's framework of skill, time, and difficulty to a range of settings in which human experts make a sequence of decisions, some of which turn out to be in error. In doing so, we may be able to differentiate between domains in which skill, time, or difficulty emerge as the dominant source of predictive information. Many questions in this style can be asked. For a setting such as medicine, is the experience of the physician or the difficulty of the case a more important feature for predicting errors in diagnosis? Or to recall an analogy raised in the previous section, for micro-level mistakes in a human task such as driving, we think of inexperienced and distracted drivers as a major source of risk, but how do these effects compare to the presence of dangerous road conditions? Finally, there are a number of interesting further avenues for exploring our current model domain of chess positions via tablebases. One is to more fully treat the domain as a competitive activity between two parties. For example, is there evidence in the kinds of positions we study that stronger players are not only avoiding blunders, but also steering the game toward positions that have higher blunder potential for their opponent? More generally, the interaction of competitive effects with principles of error-prone decision-making can lead to a rich collection of further questions. {\small\xhdr{Acknowledgments} We thank Tommy Ashmore for valuable discussions on chess engines and human chess performance, the {\url{ficsgames.org}} team for providing the FICS data, Bob West for help with web development, and Ken Rogoff, Dan Goldstein, and S\'{e}bastien Lahaie for their very helpful feedback. This work has been supported in part by a Simons Investigator Award, an ARO MURI grant, a Google Research Grant, and a Facebook Faculty Research Grant.}
{'timestamp': '2016-06-17T02:00:26', 'yymm': '1606', 'arxiv_id': '1606.04956', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04956'}
arxiv
\section{Introduction} Scale-appropriate signaling methods become important as systems shrink to the nanoscale. For systems with feature sizes of microns and smaller, electromagnetic and acoustic communication become increasingly inefficient because energy coupling from the transmitter to the medium and from the medium to the receiver becomes difficult at usable frequencies. Biological systems, with the benefit of lengthy evolutionary experimentation, seem to have arrived at a ubiquitous solution to this signaling problem at small and not so small scales: use of ``inscribed matter'' (an ensemble of discrete particles) which travels through some material bearing a message from one entity to another. Broad classes of such particles include \begin{itemize} \item {\em Molecules} such as electronically activated species, ions, chemicals, biopolymers, and macromolecular complexes. \item {\em Membrane-bound structures} such as intra- and extracellular vesicles (for instance, exosomes, microvesicles, apoptotic bodies, ectosomes, endosomes, lysosomes, autophagosomes, and vacuoles) and intracellular organelles (for instance, nuclei, mitochondria, and chloroplasts). \item {\em Cells} such as stem cells, tumor cells, and hematocytes. \item {\em Acellular, unicellular and multicellular life forms} (organisms for brevity) such as viruses, viroids, phages, plasmids, bacteria, archaea, fungi, protists, plants, and animals. \item {\em Objects} such as matter in the natural world (for instance pollen grains, seeds, and proteinaceous aggregates such as prions); and human artifacts (for example, Voyager Golden Records). \end{itemize} Studies of engineered nano-scale communication systems have focused on the encoding, transmission, and decoding of information using patterns of one category of discrete particles, namely molecules. A large portion of this work in ``molecular communication'' has considered time-varying concentration profiles of molecules as the fundamental signal measurement \cite{fekriisit11,akyildiz_nanonet,akyildiz_diffusion,Eckbook,ISIT2013_Arash,arash_wireless2013,ICC2014_Arash}. However, concentration is a {\em collective} property of the process and masks the underlying physics of molecule release by the sender and capture by the receiver. This begs the questions of truly fundamental limits for communication using ensembles of molecules in particular, discrete particles more broadly, and what we term ``tokens'' in general. This paper is organized as follows: First, we discuss communication using inscribed matter from biological and engineering perspectives. We illustrate how scenarios spanning a wide range of spatial and temporal scales and from seemingly disparate disciplines can be understood within a unified framework: the token timing and/or token payload channel, a communication scheme wherein information is carried from sender to receiver by tokens via their timed release, their composition, or both.We will assume tokens always (eventually) arrive, and are removed from circulation upon first seizure by the receiver. This abstraction encompasses not only token timing but also the token concentration and token counting models prevalent in the molecular communication literature \cite{fekriisit11,akyildiz_nanonet,akyildiz_diffusion,Eckbook,ISIT2013_Arash,arash_wireless2013,ICC2014_Arash,farsad_isit16,farsadIT16}. Next, we describe the token timing channel wherein information is encoded {\em only} in the release time of {\em identical} tokens as opposed to inscribed onto tokens (tokens with payloads) or in the number of tokens released (token counting). Though seemingly limited, this pure timing model supplies the mathematical machinery to precisely consider both token payload and token counting communication schemes. To this end, we provide a mathematical formulation of token timing channel: identical tokens emitted with independent stochastic (but asymptotically assured, one-time) arrivals. We formalize the signaling model so that the typical energy-dependent asymptotic sequential channel use coding results based on mutual information between input and output can be applied \cite[(chapt 8 \& 10)]{cover}. We then show how these results can be applied to token counting and tokens with payloads. We focus on molecular tokens -- particularly DNA and protein sequences since their energy requirements (and information content) are well-understood -- and show that information transfer using {{inscribed matter}} can be extremely efficient. We find that megabit per second rates could be supported theoretically with on the order of $100$ femtoWatts of transmitter power. Finally, we explore how our studies and the attendant insights could aid biological understanding of and inform engineering approaches to {{inscribed matter}} communication. \section{Inscribed Matter} \subsection{Communication using discrete particles: a natural world perspective} Networks of intercommunicating biological entities occur at whatever level one cares to consider: (macro)molecules, cells, tissues, organisms, populations, microbiomes, ecosystems, and so on. An ancient yet still widespread method for one entity to convey a message to another is via inscribed matter. The typical scenario is as follows: information-bearing discrete particles are released by a source, travel through a material, and are captured by a target where they are interpreted. The following examples illustrate the diversity and complexity of such inscribed matter communication (the particles are italicized). \begin{itemize} \item {\em Electrons} from an electron donor flow through an electron transport chain to an electron acceptor where the electrochemical gradient is used convert mechanical work into chemical energy as part of a cellular process such as photosynthesis or respiration. In microbial communities, electrons are transferred from one individual to another through bacterial nanowires (electrically conductive appendages), bacterial cables (thousands of individuals lined up end-to-end with electron donors located in the deeper regions of marine sediment and electron acceptors positioned in its upper layers where oxygen is more abundant), and biofilms (community members embedded in a self-produced three-dimensional matrix of extrapolymeric substances) \cite{ubli15}. \item {\em Free radicals} produced from molecules in the nucleoplasm by the direct or indirect action of ionizing radiation diffuse to the genome where they alter/damage nucleotide bases and sugars. \item {\em messenger RNA (mRNA) molecules} transcribed from a eukaryotic genome in a nucleus migrate to ribosomes in the cytoplasm where they are translated into proteins. \item {\em Acetylcholine (ACh) molecules} released by a vertebrate motor neuron diffuse across the synapse to nicotinic ACh receptors on the plasma membrane of the muscle fiber where binding triggers muscular contraction. \item {\em Homing endonuclease (HE) containing inteins} self-excised from bacterial, archaeal, eukaryotic or viral host proteins home to a target site in the genome of the same or different organism where the genetic parasitic element reinserts itself into the intein-free allele of the host gene (horizontal dissemination); inteins without a functioning HE are mainly transferred vertically but may move horizontally along with the host gene. \item {\em Ions, molecules, organelles, bacteria and viruses} present in one cell travel through a thin membrane channel (tunneling nanotube) to the physically connected cell where they elicit a response. \item {\em Semiochemicals} (chemical substances or mixtures of volatile molecules) emitted by one individual travel to another of the same (pheromones) or different species (allelochemicals) where they elicit a response -- allomones benefit only the sender, kairomone benefit only the receiver, and synomones benefit both. \item {\em Extracellular vesicles} secreted by all living cells -- including bacteria, archaea and eukaryotes -- and harboring specific cargo materials (for instance, proteins, nucleic acids, lipids, metabolites, antigens, and viruses) traverse the extracellular space or body fluids (for instance, blood and urine) to a local or distal recipient cell where they transfer their bioactive contents. \item {\em Cargo-bearing molecular motors} shuttle along a track system of cytoskeletal filaments to another point in the cell compartment where their freight such as vesicles containing molecules and tubes is unloaded. \item {\em Single and clusters of metastatic cells} that have escaped from a primary tumor circulate through the blood or lymph to a secondary organ site where, after extravasation, they can seed a new tumor. \item {\em Organic particles} such as microorganisms, fungal spores, small insects, and pollen grains associated with a macroorganism, geological site or geographic location relocate to another host or region where they influence the local biochemistry, geochemistry and climate \cite{MorSan12}-- long distance transport (including movement within and between continents and oceans) can occur via the same meteorological phenomena and processes, such as jetstreams and hurricanes, that translocate non-biological particles such as sea salt and dust. \item {\em Crustal material} ejected by a Solar System body travels to another body where if it carries microbial spores or building blocks such as amino acids, nucleobases and lipid-like molecules has the potential to seed life. Ejecta (potentially carrying microbial spores) travel from Ceres (the largest object in the asteroid belt which lies between the orbits of Mars and Jupiter) to terrestrial planets in the solar system (Earth, Mars or Venus) \cite{Hou11}; the presence of water on Ceres \cite{KupORo14} suggests the dwarf planet's potential as a home for extraterrestrial life. \end{itemize} Irrespective of the precise nature of the components of the inscribed matter communication system -- the discrete particles (information carriers), source (sender), spatial gap (transmission medium), and target (receiver) -- two fundamental questions are ``How reliable is communication?,'' and ``How is useful information conveyed given constraints on resources?.'' Here, we investigate token timing (discrete particle release and capture times) and token payload (energy required to manufacture discrete particles, to assemble symbolic strings from a set of building blocks -- we do not consider the energy required for de novo synthesis of the building blocks). And although not explicitly stated, please note that our energy model could also include token sequestration, token ejection, and token transport, the active movement of discrete particles (the energetics of translocating vesicles by a molecular motor system which converts chemical or other form of energy into mechanical energy). The only requirement is that the energy cost per token is independent of the information carried. In the token timing channel model we will elaborate later on, tokens are neither lost nor modified: the number and makeup of the tokens emitted by the source is the same as the ones arriving at the target, all that differs are their times of emission and their times of arrival. While accommodating tokens that are delayed temporarily, our mathematical model does not directly consider tokens that are detained permanently, removed entirely, never arrive, or are changed en route. In the natural world, discrete particles often interact with the material through which they travel resulting in their immurement and ultimate removal or detention and eventual discharge. Examples include: \begin{itemize} \item {\em Free radicals} produced by radiolysis may react chemically with neighboring materials. \item {\em mRNAs} may be modified post-transcriptionally. \item {\em ACh} can be degraded by the enzyme acetylcholine esterase present in synapses. \item The random path of a {\em semiochemical} diffusing through air, soil or water may result in a trajectory that leads away from the destined individual. \item {\em Circulating tumor cells} may be destroyed by the immune system. \item {\em Microscopic particles} may be immobilized within mucus -- the polymer-based hydrogel covering the inner linings of the body -- depending on the density of the mucin network and environmental factors such as pH and ionic strength. \item {\em Bacteria}, particularly plant pathogens, present in the atmosphere can nucleate the formation of ice in clouds resulting in snow, rain and hail \cite{MorSan12}. \end{itemize} Nonetheless, our model does provide an organizing principle for all forms of molecular communications since these sorts of impediments -- token loss or corruption -- can only decrease the capacity of the system we analyze. Furthermore, the analysis is ``compartmental'' in the sense that token corruption and loss can be treated separately without invalidating the fundamental ``outer bound'' results. \subsection{Communication using physical objects: an engineering perspective} \label{sect:bioperspective} Inscribed matter can often be the most energy-efficient means of communication when delay can be tolerated. In fact, a once popular communication networks textbook \cite{tannenbaum} contains the passage: \begin{quote} {\em Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway. \hfill {\small -- A.S. Tanenbaum, {\em Computer Networks}, 4th ed., p. 91} } \end{quote} This somewhat tongue-in-cheek ``folklore'' should come as no surprise. From early antiquity, private persons, governments, the military, press agencies, stockbrokers and others have used carrier pigeons to convey messages. Today, ``sneakernets'' \cite{microsoft} have been proposed as a low-latency high-fidelity network architecture for quantum computing across global distances: ships carry error-corrected quantum memories installed in cargo containers \cite{DevGre14}. Previous work on mobile wireless communication found that network capacity could be increased if delay-tolerant traffic was queued until the receiver and sender were close to one another -- perhaps close enough to exchange physical storage media \cite{Frenkiel,wcnc12_rose, infostations-vtc,irvine,infostation1,dect,infostations-pc,ana,alap_book,ana-thesis,iacono,mineminemine,demonfuruzan,furuzan_ciss}. This recognition prompted a careful consideration of the energetics involved in delivery of physical messages, and a series of papers \cite{rose_IM_asilomar,rose_IM,rose_wright_nature} revealed the surprising results that {{inscribed matter}} can be many orders of magnitude more efficient than radiative methods even with moderate delay constraints and over a variety of size scales. In fact, \cite{rose_wright_nature} showed that over interstellar distances (10k light years), {{inscribed matter}} could be on the order of $10^{15}$ times more energy-efficient than radiated messages, suggesting that evidence of extraterrestrial civilizations would more likely come from artifacts than from radio messages if energy requirements are a proxy for engineering difficulty \cite{NSF_ET_Discoveries}. At the other end of the size scale there has been increasing interest in biologically-inspired {{inscribed matter}} communication at the nano/microscale \cite{JSACmesocom} where the information carrier ranges from timed release of identical signaling agents to specially constructed information carriers \cite{bassler1999,bassler2002,fekriisit11,akyildiz_nanonet,akyildiz_diffusion,eckford1,Eckbook,ISIT2013_Arash,arash_wireless2013,ICC2014_Arash,eckford_press_vodka}. Although this field of molecular communication is in its infancy with seemingly futuristic application plans currently out of reach (for instance, {\em in vivo} biological signaling, surgical/medicinal/environmental microbot swarms, or process-on-a-chip), the theoretical potential rates and energy efficiencies, especially through media unfriendly to radiation, are sufficiently large \cite{icc15} to warrant careful theoretical and practical consideration. From an engineering perspective, the basic idea of {{inscribed matter}} communication is very simple (FIGURE~\ref{figure:imchannel}). Information is coded in the structure of the signaling agent and/or its release time at the sender. These agents traverse some spatial gap to the receiver where they are captured and the information decoded. There are, of course, many details and variations on the theme. As explicitly mentioned for biological systems, the signaling agents (or tokens as we call them) could be identical, implying that timing (which includes time-varying concentration) is {\em \bf the only} information carrier, or tokens could themselves carry data payloads (in addition to, or in lieu of timing). However, unlike the award-winning paper ``Bits Through Queues'' by Anantharam and Verd\'u \cite{bits-Qs} and later by Sundaresan and Verd\'u \cite{sundaresan1, sundaresan2}, we do not know which arrival times correspond to which emission times. The ``gap'' (channel) could be a medium through which tokens diffuse stochastically, or some form of active transport might be employed. In addition, tokens could be deliberately ``eaten'' by gettering agents injected by the sender, channel or receiver. Similarly, tokens could be corrupted during passage through the channel or might simply get ``lost'' and never reach the receiver \cite{eckford1,farsadIT16}. Furthermore, the reception process itself could be noisy. If we sought to mimic biological systems, a typical receptor structure is stereochemically matched to a particular signaling molecule (token) and the kinetics of the ligand binding/unbinding process must be considered as well as the number and density of receptors. Furthermore, a given receptor may preferentially bind to a ligand (token), but there may be other different or identical (but from another source) {\em interfering} ligands which bind to the same receptor. When one considers networks of molecular transceivers, this sort of ``cross talk'' or outright interference must be considered. \subsection{Inscribed matter communication: model distillation} While the various engineering and biological scenarios require slightly different information theoretic formulations, they can {\em all} be understood within a unified framework: the identical token timing channel wherein \begin{itemize} \item Token release and capture timing is the only mechanism for information transfer. \item Tokens always (eventually) arrive at the receiver. \item Tokens are removed promptly from circulation (or deactivated) after first reception. \end{itemize} \begin{figure} \begin{center} \vspace{-0.25in} \includegraphics[height=0.85in,width=2.5in]{sourcesink.pdf} \includegraphics[height=1.5in,width=2.5in]{timingdiagram.pdf} \end{center} \caption{An Abstraction of an {{Inscribed Matter}} Communication Channel. A sender transmits an ensemble of tokens (``inscribed matter'') to a receiver across a spatial gap (of length $R$ in the figure). The tokens are released at (unordered) times $\{T_m\}$, propagate through a transmission medium and are captured at corresponding times $\{S_m\}$. For identical tokens, the receiver sees ordered arrivals $\{ \vec{S}_m \}$ which may differ in index from the unordered arrivals $\{ S_m\}$.} \label{figure:imchannel} \end{figure} The identical token timing channel abstraction \cite{wcnc12_rose, SonRos13,isit13,isit14,icc15,farsad_isit16} encompasses token concentration or token counting models since time-varying concentration (or token counts in ``bit intervals'') at a receiver is a coarse-time approximation to the precise individual token timing model. The timing channel is also important for understanding information carriage via payload-charged tokens whose information packets may need resequencing at the receiver. That is, timing channel results provide tight bounds on resequencing overhead and are especially important if it is technologically difficult to construct tokens with large payloads. In addition, the operation of the timing channel also sheds light on channels wherein the number of tokens sent is the information carrier during signaling intervals \cite{farsad_isit16}. In addition, as mentioned at the end of section~\ref{sect:bioperspective}, the timing channel provides {\em outer bounds} since the uncertainty associated with various receptor and channel models can only {\em decrease} the information-carrying capacity of the channel via the data processing theorem \cite[(chapt 2)]{cover}. For instance, re-capture processes owing to receptor binding kinetics \cite{eckford1} and token loss (erasure) can only decrease the channel capacity. Likewise, token processing/corruption/loss can again only decrease channel capacity. Thus, the timing channel not only allows upper limits on capacity to be obtained, but also permits the overall channel to be treated as a cascade, each constituent of which can be analyzed separately and compared to identify potential information transfer bottlenecks. \section{Mathematical Formulation} TABLE~\ref{table:glossary} is a glossary of key quantities that will be discussed in what follows. For continuity and clarity, the identical table is included in the companion paper, Part-II \cite{RoseMian16_2}. \begin{table}[h] \begin{tabular}{p{2.0cm}|p{5.9cm}} \hline {\bf \em Token} & {\small A unit released by the transmitter and captured by the receiver}\\ \hline {\bf \em Payload} & {\small Physical information ({inscribed matter}) carried by a token}\\ \hline {\bf \em ${\lambda}$} & {\small The average rate at which tokens are released/launched into the channel}\\ \hline {\bf ${\bf T}$} & {\small A vector of token release/launch times}\\ \hline {\bf \em First-Passage} & {\small The time between token release/launch and token capture at the receiver}\\ \hline {\bf ${\bf D}$} & {\small A vector of first-passage times associated with launch times ${\bf T}$}\\ \hline {\bf $G(\cdot)$} & {\small The cumulative distribution function for first-passage random variable $D$}\\ \hline {\bf $1/{\mu}$} & {\small Average/mean first-passage time}\\ \hline {\bf ${\rho}$} & {\small ${\lambda}/{\mu}$, a measure of system token ``load'' }\\ \hline {\bf ${\bf S}$} & {\small A vector of token arrival times, ${\bf S} = {\bf T} + {\bf D}$} \\ \hline {\bf $P_k({\bf x})$} & {\small A permutation operator which rearranges the order of elements in vector ${\bf x}$}\\ \hline {\bf $\Omega$} & {\small The ``sorting index'' which produces $\vec{{\bf S}}$ from ${\bf S}$, {\em i.e.}, $\vec{{\bf S}} = P_{\Omega}({\bf S})$}\\ \hline {\bf $\vec{{\bf S}}$} & {\small An {\em ordered} vector of arrival times obtained by sorting the elements of ${\bf S}$ (note, the receiver only sees $\vec{{\bf S}}$ not ${\bf S}$)}\\ \hline {\bf $I({\bf S};{\bf T})$} & {\small The mutual information between the launch times (input) and the arrival times (output)}\\ \hline {\bf $I(\vec{{\bf S}};{\bf T})$} & {\small The mutual information between the launch times (input) and the {\em ordered} arrival times (output)}\\ \hline {\bf $h({\bf S})$} & {\small The differential entropy of the arrival vector ${\bf S}$}\\ \hline {\bf $H(\Omega|\vec{{\bf S}},{\bf T})$} & {\small The {\em ordering entropy} given the input ${\bf T}$ and the output $\vec{{\bf S}}$} \\ \hline {\bf ${H^{\uparrow}}({\bf T})$} & {\small An upper bound for $H(\Omega|\vec{{\bf S}},{\bf T})$}\\ \hline {\bf $C_q$ {\rm and } $C_t$} & {\small The asymptotic per token and per unit time capacity between input and output}\\ \hline \end{tabular} $\mbox{ }$\\ \caption{Glossary of useful terms} \label{table:glossary} \end{table} Following \cite{isit11,wcnc12_rose, isit13, isit14, icc15}, assume emission of $M$ identical tokens at times $\{T_m\}$, and their capture at times $\{S_m \}$, $m = 1,2,\cdots,M$. The duration of token $m$'s first-passage between source and destination is $D_m$. These $D_m$ are assumed i.i.d. with $f_{D_m}(d) = g(d) = G^{\prime}(d)$ where $g(\cdot)$ is some causal probability density with mean $\frac{1}{{\mu}}$ and cumulative distribution function (CDF) $G(\cdot)$. We also assume that $g(\cdot)$ contains no singularities. Thus, the first portion of the channel is modeled as a sum of random $M$-vectors \begin{IEEEeqnarray}{c} {\bf S} = {\bf T} + {\bf D} \end{IEEEeqnarray} as shown in FIGURE~\ref{figure:channel} prior to the sorting operation. We therefore have \begin{IEEEeqnarray}{rCl} \label{eq:f_s_def} f_{{\bf S}}({\bf s}) & = & { \int_{{\bf 0}}^{{\boldsymbol{\infty}}}} f_{{\bf T}}({\bf t}) f_{{\bf S}|{\bf T}}({\bf s}|{\bf t}) d {\bf t} \nonumber\\ & = & {\int_{{\bf 0}}^{{\bf s}}} f_{{\bf T}}({\bf t}) \prod_{m=1}^M g(s_m - t_m) d {\bf t} \nonumber\\ & = & {\int_{{\bf 0}}^{{\bf s}}} f_{{\bf T}}({\bf t}) {\mathbf{g}}({\bf s} - {\bf t}) d {\bf t} \end{IEEEeqnarray} where \begin{IEEEeqnarray*}{c} {\mathbf{g}}({\bf s} - {\bf t}) = \prod_{m=1}^M g(s_m - t_m) \end{IEEEeqnarray*} \begin{figure} \begin{center} \vspace{-0.5in} \includegraphics[height=2.0in,width=2.0in]{channel.pdf} \end{center} \caption{The token release with reordering {{Inscribed Matter}} communication channel. For token $m$ released at time $T_m$, the duration of its first-passage between the sender and receiver is $D_m$ so it arrives at time $S_m$. The $\{S_m \}$ are then sorted by order of arrival. Since the $M$ tokens are identical, the ordered arrival time $\vec{S}_m$ may not correspond to $S_m$. } \label{figure:channel} \end{figure} We impose an emission deadline, $T_m \le \tau$, $\forall m \in \{ 1,2,\cdots,M \}$. The associated emission time ensemble probability density $f_{{\bf T}}({\bf t})$ is assumed causal, but otherwise arbitrary. Had we imposed a mean constraint instead of a deadline, the channel between ${\bf T}$ and ${\bf S}$ would be the parallel version of Anantharam and Verd\'u's {\em Bits Through Queues} \cite{bits-Qs}. However, since the tokens are identical we cannot necessarily determine which arrival corresponds to which emission time. That is, the final output of the channel is a reordering of the $\{ s_m \}$ to obtain a set $\{ \vec{s}_m \}$ where $\vec{s}_m \le \vec{s}_{m+1}$, $m=1,2,\cdots, M-1$, as shown on the right hand side of FIGURE~\ref{figure:channel} after the sorting operation. We write this relationship as \begin{IEEEeqnarray}{c} \label{eq:permutationdef} \vec{{\bf S}} = P_{{\Omega}}({\bf S}) \end{IEEEeqnarray} where $P_{{\Omega}}(\cdot)$, ${{\Omega}}=1,2,\cdots,M!$, is a permutation operator and ${\Omega}$ is that permutation index which produces ordered $\vec{{\bf S}}$ from the argument ${\bf S}$. We define $P_1(\cdot)$ as the identity permutation operator, $P_1({\bf s}) = {\bf s}$. We note that the event $S_i = S_j$ ($i \ne j$) is of zero measure owing to the no-singularity assumption on $g(\cdot)$, Thus, for analytic convenience we will assume that $f_{{\bf S}}({\bf s}) = 0$ whenever two or more of the $s_m$ are equal and therefore that the $\{ \vec{s}_m \}$ are strictly ordered wherever $f_{\vec{{\bf S}}}(\cdot) \ne 0$ ({\em i.e.}, $\vec{s}_m < \vec{s}_{m+1}$). Thus, the density $f_{\vec{{\bf S}}}(\vec{\sv})$ can be found by ``folding'' the density $f_{{\bf S}}({\bf s})$ about the hyperplanes described by one or more of the $s_m$ equal until the resulting probability density is nonzero only on the region where $s_m < s_{m+1}$, $m=1,2,\cdots,M-1$. Analytically we have \begin{IEEEeqnarray}{c} \label{eq:svv_def} f_{\vec{{\bf S}}}(\vec{\sv}) = \sum_{n=1}^{M!} f_{{\bf S}}(P_{n}(\vec{\sv})) \end{IEEEeqnarray} Then, since $f_{S|T}(s|t) = g(s-t)$, we can likewise describe $f_{\vec{{\bf S}}|{\bf T}}({\bf s}|{\bf t})$ as \begin{IEEEeqnarray}{c} \label{eq:svvT_def} f_{\vec{{\bf S}}|{\bf T}}({\bf s}|{\bf t}) = \sum_{n=1}^{M!} {\mathbf{g}}(P_n({\bf s}) - {\bf t}) \prod_{m=1}^M u([P_n({\bf s})]_m - t_m) \end{IEEEeqnarray} again for ${s_1 < s_2 < \cdots < s_m}$ and zero otherwise. With exponential first-passage, $g(d) = {\mu} e^{-{\mu} d}u(d)$, becomes \begin{IEEEeqnarray}{c} \label{eq:econd} f_{\vec{{\bf S}}|{\bf T}}({\bf s}|{\bf t}) = {\mu}^M e^{ - {\mu} \displaystyle{\sum_{i=1}^M} (s_i - t_i)} \left ( \sum_{n=1}^{M!} {\bf u}(P_n({\bf s}) - {\bf t}) \right ) \end{IEEEeqnarray} again assuming $s_1 < s_2 < \cdots < s_m$. It is worth mentioning explicitly that \equat{econd} {\em does not assume} arguments $s_i \ge t_i$ as might be implicit in \equat{f_s_def}. Finally, the problem structure will allow us to make use of multi-dimensional function symmetry (hypersymmetry) arguments, $f({\bf x}) = f(P_n({\bf x}))$ $\forall$ permutations $n$. The following property of expectations of hypersymmetric functions over hypersymmetric random variables will later prove useful. {\em \begin{theorem} {\bf Hypersymmetric Expectation:} \thmlabel{Ehypersymmetry} Suppose $Q({\bf x})$ is a hypersymmetric function, $Q({\bf x}) = Q(P_k({\bf x}))$ $\forall k$, and ${\bf X}$ is a hypersymmetric random vector. Then, when $\vec{{\bf X}}$ is the ordered version of random vector ${\bf X}$ we have \begin{IEEEeqnarray}{c} \label{eq:hyperexpect} E_{\vec{{\bf X}}} \left [Q(\vec{{\bf X}}) \right ] = E_{{\bf X}} \left [Q({\bf X}) \right ] \end{IEEEeqnarray} \end{theorem}} \begin{Proof}{\Thmref{Ehypersymmetry}} $\tilde{{\bf X}}$ is a deterministic function of ${\bf X}$; i.e., $\theta({\bf X}) = {\tilde{{\bf X}}}$. Thus, \begin{IEEEeqnarray}{c} E \left [ Q(\tilde{{\bf X}}) \right ] = E \left [ Q(\theta({\bf X})) \right ] = E \left [ Q({\bf X}) \right ] \end{IEEEeqnarray} where the last equality results from the hypersymmetry of $Q(\cdot)$. \end{Proof} With these preliminaries done, we can now begin to examine the mutual information between the unordered emission times ${\bf T}$, the unordered arrival times ${\bf S}$, and the ordered (sorted) arrival times $\vec{{\bf S}}$. \section{Information Theoretic Analysis} \subsection{Formalizing The Signaling Model} \label{sect:channeluse} To determine whether the mutual information between ${\bf T}$ the input and $\vec{{\bf S}}$ the output is a measure of channel capacity, it suffices to have a signaling model which patently supports the usual asymptotically large block length and repeated independent sequential channel uses paradigm \cite[(chapt 8 \& 10)]{cover}. In addition, we must also pay attention to the channel use energetics since lack of energy constraints can lead to unrealistic results. Thus, we have defined a channel use as the launch and capture of $M$ tokens under an emission deadline constraint, $\tau$, with the further constraint that \begin{IEEEeqnarray}{c} \label{eq:rhodef} {\lambda} \tau = M \end{IEEEeqnarray} where ${\lambda}$, the token launch average intensity, has units of tokens per time. \Equat{rhodef} is implicitly a constraint on average power assuming a fixed per-token energy cost for construction/sequestration/release/delivery. We also note that the signaling interval $\tau$ is now an explicit function of $M$ as in \begin{IEEEeqnarray*}{c} \label{eq:rhodef2} \tau = \tau(M) = \frac{M}{{\lambda}} \end{IEEEeqnarray*} So, consider FIGURE~\ref{fig:channeluse} where sequential $M$-token transmissions -- channel uses -- are depicted. We will assume a ``guard interval'' of some duration $\gamma(M,\epsilon)$ between successive transmissions so that all $M$ tokens are received before the beginning of the next channel use with probability ($1-\epsilon$) for arbitrarily small $\epsilon > 0$. \begin{figure} [h] \begin{center} \includegraphics[height=0.75in,width=3.0in]{channeluse.pdf} \end{center} \vspace{-0.25in} \caption{Successive $M$-emission channel uses. For a given use of the token timing channel, the sender emits $M$ tokens over the transmission interval $\tau(M) = \frac{M}{{\lambda}}$. $\gamma(M,\epsilon)$ is the waiting period (guard interval) before the next channel use. } \label{fig:channeluse} \end{figure} We further require that the average emission rate, ${M}/(\tau(M) + \gamma(M,\epsilon))$ satisfies \begin{IEEEeqnarray}{c} \label{eq:limitlambda} \lim_{\epsilon \rightarrow 0} \lim_{M\rightarrow \infty} \frac{M}{\tau(M) + \gamma(M,\epsilon)} = {\lambda} \end{IEEEeqnarray} We then require that the last token arrival time $\vec{S}_M$ occurs before the start of the next channel use with probability 1. That is, given arbitrarily small $\epsilon$ we can always find a finite $M^*$ such that \begin{IEEEeqnarray}{c} \label{eq:timelimit1} \mbox{Prob}\{\vec{S}_M \le \tau(M) + \gamma(M,\epsilon) \} > 1-\epsilon \end{IEEEeqnarray} $\forall M \ge M^*$. We now derive a sufficient condition on first-passage time densities for which \equat{timelimit1} is true. Calculating a CDF for $\vec{S}_M$ is in general difficult since emission times $T_m$ might not be independent. However, for a fixed emission interval $[0, \tau(M)]$ we can readily calculate a worst case CDF for $\vec{S}_M$ and thence an upper bound on the guard interval duration that satisfies the arrival condition of \equat{timelimit1}. That is, for a given emission schedule ${\bf t}$, the ${\bf S}$ are conditionally independent and the CDF for the final arrival is \begin{IEEEeqnarray}{c} F_{\vec{{\bf S}}_M|{\bf t}}(s|{\bf t}) = \prod_{m=1}^M G(s-t_m)u(s-t_m) \end{IEEEeqnarray} so that \begin{IEEEeqnarray}{c} F_{\vec{{\bf S}}_M}(s) = \int_{{\bf 0}}^{{\bf \tau(M)}} f_{{\bf T}}({\bf t})\prod_{m=1}^M G (s-t_m)u(s-t_m) d {\bf t} \IEEEeqnarraynumspace \label{eq:overrun} \end{IEEEeqnarray} However, it is easy to see that \begin{IEEEeqnarray}{c} F_{\vec{{\bf S}}_M}(s) \ge G^M(s-\tau(M)) u(s-\tau(M)) \end{IEEEeqnarray} since $G(s-t)$ is monotone decreasing in $t$. The end of the guard interval is $\tau(M) + \gamma(M,\epsilon)$, so the probability that the last arrival time $\vec{{\bf S}}_M$ occurs before the next signaling interval obeys \begin{IEEEeqnarray}{c} \label{eq:timelimit2} F_{\vec{{\bf S}}_M}(\tau(M) + \gamma(M,\epsilon)) \ge G^M \left ( \gamma(M,\epsilon) \right ) \end{IEEEeqnarray} And to meet the requirement of \equat{timelimit1} we must have \begin{IEEEeqnarray}{c} \label{eq:timelimit2a} \lim_{M \rightarrow \infty} G^M \left ( \gamma(M,\epsilon) \right ) = 1 \end{IEEEeqnarray} which for convenience, we rewrite as \begin{IEEEeqnarray}{c} \label{eq:timelimit3} \lim_{M \rightarrow \infty} M \log G \left ( \gamma(M,\epsilon) \right ) = 0 \end{IEEEeqnarray} If rewrite $\log G \left ( \gamma(M,\epsilon) \right )$ in terms of the CCDF (complementary CDF) ${\bar{G}}(\cdot)$ (which must be vanishingly small in large $M$ if we are to meet the conditions of \equat{timelimit1}) and note that $\log(1-x) \approx -x$ for $x$ small, we have \begin{IEEEeqnarray*}{c} - \log \left ( 1 - {\bar{G}} \left (\gamma(M,\epsilon) \right ) \right ) \approx {\bar{G}} \left (\gamma(M,\epsilon) \right ) \end{IEEEeqnarray*} for sufficiently large $M$. Thus, a first-passage distribution whose CCDF satisfies \begin{IEEEeqnarray}{c} \label{eq:timelimit4} \lim_{M \rightarrow \infty} M {\bar{G}} \left (\gamma(M,\epsilon) \right ) = 0 \end{IEEEeqnarray} with some suitable $\gamma(M,\epsilon)$ will also allow satisfaction of \equat{timelimit1}. However, the satisfaction of \equat{timelimit4} requires that $1/{\bar{G}} \left ( \gamma(M,\epsilon) \right )$ be {\em asymptotically supralinear} in $M$. We then note that since all first-passage times are non-negative random variables, the mean first-passage time is given by \cite{papoulis} \begin{IEEEeqnarray}{c} \label{eq:meanintegral} E[D] = \int_0^{\infty} {\bar{G}}(x) dx \end{IEEEeqnarray} The integral of \equat{meanintegral} exists {\bf iff} $1/{\bar{G}}(x)$ is asymptotically supralinear in $x$. Thus, the existence of $E[D]$ in turn implies that choosing $\gamma(M,\epsilon) = \epsilon M$ allows satisfaction of \equat{timelimit4}. So, in the limit of vanishing $\epsilon$ we then have \begin{IEEEeqnarray*}{c} \lim_{\epsilon \rightarrow 0} \lim_{M \rightarrow \infty} \frac{M}{\tau(M) + \gamma(M,\epsilon)} \ge \lim_{\epsilon \rightarrow 0} \frac{{\lambda}}{1+\epsilon} = {\lambda} \end{IEEEeqnarray*} \blankout{ and \begin{IEEEeqnarray*}{c} \lim_{\epsilon \rightarrow 0} \lim_{M \rightarrow \infty} \frac{M}{\tau(M) + \gamma(M,\epsilon)} \le \lim_{\epsilon \rightarrow 0} {\lambda} = {\lambda} \end{IEEEeqnarray*} } and the energy requirement of \equat{limitlambda} is met in the limit while assuring asymptotically independent sequential channel uses. The above development proves the following theorem: {\em \begin{theorem}{\bf Asymptotically Independent Sequential Channel Uses:} \thmlabel{channeluse} Consider the channel use discipline depicted in FIGURE~\ref{fig:channeluse} where tokens are emitted on an interval $[0,\tau(M)]$ with $\tau(M) = \frac{M}{{\lambda}}$ and guard intervals of duration $\gamma(M,\epsilon)$ are imposed between channel uses. If the mean first-passage time $E[D]$ is finite, then guard intervals can always be found such that the sequential channel uses approach asymptotic independence as $\epsilon \rightarrow 0$, and the relative duration of the guard interval, $\gamma(M,\epsilon)$ vanishes compared to $\tau(M)$ as $M \rightarrow \infty$. \end{theorem}} \begin{Proof}{\Thmref{channeluse}} See the development leading to the statement of \Thmref{channeluse}. \end{Proof} Now, suppose the transport process from source to destination has infinite first passage time, implying that $1/{\bar{G}}(x)$ is linear or sublinear in $x$. Is asymptotically independent sequential channel use possible? The answer seems to be no. As a best case, the minimum probability of tokens arriving outside $\tau(M) + \gamma(M,\epsilon)$ is obtained if all emissions occur at $t=0$ (see \equat{overrun}). Any other token emission distribution must have larger probability of interval overrun. For asymptotically independent sequential channel use we then must have, following \equat{rhodef2} and \equat{timelimit4}, \begin{IEEEeqnarray}{c} \label{eq:timelimitsublin} \lim_{M \rightarrow \infty} M {\bar{G}} \left ( \frac{M}{\lambda} + \gamma(M,\epsilon) \right ) = 0 \end{IEEEeqnarray} We notice that the argument of ${\bar{G}}(\cdot)$ is at least linear in $M$, and a linear-in-$M$ argument will not drive ${\bar{G}}(\cdot)$ to zero faster than $1/M$ because $1/{\bar{G}}(\cdot)$ is not supralinear. Thus, the argument of ${\bar{G}}(\cdot)$ must be supralinear in $M$ to drive ${\bar{G}} \left ( \frac{M}{\lambda} + \gamma(M,\epsilon) \right )$ to zero faster than $1/M$ which in turn implies that $\gamma(M,\epsilon)$ must be supralinear in $M$. However, if $\gamma(M,\epsilon)$ is supralinear in $M$, then \equat{limitlambda} cannot be satisfied and we have proved the following theorem: {\em \begin{theorem}{\bf Infinite Mean First Passage Does Not Allow Asymptotically Independent Sequential Channel Uses:} \thmlabel{infinitemean} Consider the channel use discipline depicted in FIGURE~\ref{fig:channeluse} where tokens are emitted on an interval $[0,\tau(M)]$ with $\tau(M) = \frac{M}{{\lambda}}$ and guard intervals of duration $\gamma(M,\epsilon)$ are imposed between channel uses. If the mean first-passage time $E[D]$ is infinite, then guard intervals can never be found such that the sequential channel uses approach asymptotic independence as $\epsilon \rightarrow 0$, and the relative duration of the guard interval, $\gamma(M,\epsilon)$ vanishes compared to $\tau(M)$ as $M \rightarrow \infty$. \end{theorem}} \begin{Proof}{\Thmref{infinitemean}} See the development leading to the statement of \Thmref{infinitemean}. \end{Proof} To summarize, if the mean first passage time exists, then asymptotically independent sequential channel uses are possible and the mutual information $I(\vec{{\bf S}};{\bf T})$ is the proper measure of information transport through the channel. Conversely, if the mean first passage time is infinite, then asymptotically independent sequential channel uses are impossible and the associated channel capacity problem is ill-posed. It is worth noting that free-space diffusion (without drift) has infinite $E[D]$. However, since all physical systems have finite extent, $E[D]$ is always finite for any realizable ergodic token transport process. \subsection{Channel Capacity Definitions} \label{sect:chandef} The maximum $I(\vec{{\bf S}};{\bf T})$ is the {\em channel capacity} in units of bits/nats per channel use. However, we will find it useful to define the maximum mutual information between ${\bf T}$ and $\vec{{\bf S}}$ {\em per token}. That is, the channel capacity per token $C_q$ is \begin{IEEEeqnarray}{c} \label{eq:pertokenCtauM} C_q(M, \tau(M)) \equiv \frac{1}{M} {\displaystyle \max_{f_{{\bf T}}(\cdot)}} I(\vec{{\bf S}};{\bf T}) \end{IEEEeqnarray} Since $\tau(M)= M/{\lambda}$, it is easy to see that $C_q(M, \tau(M))$ will be monotone increasing in $M$ since concatenation of two emission intervals with durations $\tau(M/2)$ and $M/2$ tokens each is more constrained than a single interval of twice the duration $\tau(M)$ with $M$ tokens. We can thus say that \begin{IEEEeqnarray}{c} \label{eq:CmGTCmover2} C_q(M,\tau(M)) \ge 2 C_q(M/2, \tau(M/2)) \end{IEEEeqnarray} We can then define the limiting capacity in nats per token as \begin{IEEEeqnarray}{c} \label{eq:pertokenCtauinf} C_q \equiv \lim_{M \rightarrow \infty} C_q(M,\tau(M)) \end{IEEEeqnarray} with no stipulation as yet to whether the limit exists or is bounded away from zero. Now consider the capacity per unit time. The duration of a channel use (or signaling epoch) is $\tau(M) + \gamma(M,\epsilon)$ (see FIGURE~\ref{fig:channeluse}). Thus, for a given number $M$ of emissions per channel use and a probability $(1-\epsilon)$ that all the tokens are received before the next channel use, we define the channel capacity in nats per unit time as \begin{IEEEeqnarray*}{rCl} C_t(M,\epsilon) & \equiv & {\displaystyle \max_{f_{{\bf T}}(\cdot)} \frac{I(\vec{{\bf S}};{\bf T})}{\tau(M) + \gamma(M,\epsilon)}}\\ & = & {\displaystyle C_q(M, \tau(M)) \left (\frac{M}{\tau(M) + \gamma(M,\epsilon)} \right )} \end{IEEEeqnarray*} which in the limits of $\epsilon \rightarrow 0$ and $M \rightarrow \infty$ becomes \begin{IEEEeqnarray}{c} \lim_{\epsilon \rightarrow 0} \lim_{M \rightarrow \infty} C_t(M,\epsilon) = \lambda C_q \label{eq:Ctinf} \end{IEEEeqnarray} via \equat{limitlambda} and \equat{pertokenCtauinf}. The above development proves the following theorem: {\em \begin{theorem}{\bf Capacity of the identical-token timing channel:} \thmlabel{timelimit_firstpassage} If the mean first-passage time $E[D]$ exists, then the channel capacity in nats per unit time obeys \begin{IEEEeqnarray}{c} \label{eq:CtislambdaCq} C_t = {\lambda} C_q \end{IEEEeqnarray} where $C_q$ is the capacity per token defined in \equat{pertokenCtauinf} and ${\lambda}$ is the average token emission rate. \end{theorem}} \begin{Proof}{\Thmref{timelimit_firstpassage}} See \Thmref{channeluse} and the development leading to the statement of \Thmref{timelimit_firstpassage}. \end{Proof} It is worth noting that Theorem \thmref{timelimit_firstpassage} is {\em general} and applies to {\em any} system with finite first-passage time. Now, we more carefully examine the mutual information $I(\vec{{\bf S}};{\bf T})$ to determine whether the limits implied of \equat{pertokenCtauinf} and \equat{Ctinf} exist and are bounded away from zero. \subsection{Mutual Information Between Input ${\bf T}$ and Output $\vec{{\bf S}}$} \label{sect:mutualinfo} The mutual information between ${\bf T}$ and ${\bf S}$ is \begin{IEEEeqnarray}{c} \label{eq:unorderedMI} I({\bf S}; {\bf T}) = h({\bf S}) - h({\bf S}|{\bf T}) = h({\bf S}) - M h(S|T) \end{IEEEeqnarray} Since the $S_i$ given the $T_i$ are mutually independent each with density $g(s_i - t_i)$, $h({\bf S}|{\bf T})$ does not depend on $f_{{\bf T}}({\bf t})$. Thus, maximization of \equat{unorderedMI} is simply a maximization of $h({\bf S})$ which is in turn maximized by maximizing the marginal $h(S)$ over the marginal $f_T(t)$, a problem explicitly considered and solved in closed form for a mean $T_m$ constraint by Anantharam and Verd\'u in \cite{bits-Qs} and for a deadline constraint in \cite{isit11,RoseMian16_2}, both for exponential first-passage. The corresponding expression for the mutual information between ${\bf T}$ and $\vec{{\bf S}}$ is \begin{IEEEeqnarray}{c} \label{eq:orderedMI} I(\vec{{\bf S}}; {\bf T}) = h(\vec{{\bf S}}) - h(\vec{{\bf S}}|{\bf T}) \end{IEEEeqnarray} Unfortunately, $h(\vec{{\bf S}}|{\bf T})$ now {\em does} depend on the input distribution and the maximization of $h(\vec{{\bf S}})$ is non-obvious. So, rather than attempting a brute force optimization of \equat{orderedMI} by deriving order distributions $f_{\vec{{\bf S}}}(\cdot)$ \cite{eckford1}, we explore -- {\em with no loss of generality} -- simplifying symmetries. Consider that an emission vector ${\bf t}$ and any of its permutations $P_n({\bf t})$ produce statistically identical outputs $\vec{{\bf S}}$ owing to the reordering operation as depicted in FIGURES~\ref{figure:imchannel} and ~\ref{figure:channel}. Thus, any $f_{{\bf T}}(\cdot)$ which optimizes \equat{orderedMI} can be ``balanced'' to form an optimizing input distribution which obeys \begin{IEEEeqnarray}{c} \label{eq:Tsymm} f_{{\bf T}} ({\bf t}) = f_{{\bf T}} (P_n({\bf t})) \end{IEEEeqnarray} for $n=1,2,\cdots,M!$ and $P_n(\cdot)$ the previously defined permutation operator (see \equat{permutationdef}). We can therefore restrict our search to hypersymmetric densities $f_{{\bf T}}({\bf t})$ as defined by \equat{Tsymm}. Now, hypersymmetric ${\bf T}$ implies hypersymmetric ${\bf S}$ which further implies that $f_{{\bf S}}({\bf s}) = f_{{\bf S}}(P_k({\bf s}))$. The same non-zero corner and folding argument used in the derivation of \equat{svv_def} produces the following key theorem: {\em \begin{theorem}{\bf The entropy $h(\vec{{\bf S}})$ relative to the entropy $h({\bf S})$:} \thmlabel{orderedS} If $f_{{\bf T}}(\cdot)$ is a hypersymmetric probability density function on emission times $\{T_m\}$, $m=1,2,..,M$, and the first-passage density $g(\cdot)$ is non-singular, then the entropy of the time-ordered outputs $\vec{{\bf S}}$ is \begin{IEEEeqnarray*}{c} h(\vec{{\bf S}}) = h({\bf S}) - \log M! \end{IEEEeqnarray*} \end{theorem}} \begin{Proof}{\Thmref{orderedS}} The hypersymmetry of $f_{{\bf S}}({\bf s})$ implies \begin{IEEEeqnarray}{rCl} h(\vec{{\bf S}}) & = & -\int_{\vec{\sv}} M! f_{{\bf S}}(\vec{\sv}) \log \left (M! f_{{\bf S}}(\vec{\sv}) \right ) d\vec{\sv} \nonumber\\ & = & -log M! -\int_{\vec{\sv}} M! f_{{\bf S}}(\vec{\sv}) \log f_{{\bf S}}(\vec{\sv}) d\vec{\sv} \nonumber\\ & = & -log M! -\int_{{\bf s}} f_{{\bf S}}({\bf s}) \log f_{{\bf S}}({\bf s}) d{\bf s} \nonumber\\ & = & -log M! + h({\bf S}) \end{IEEEeqnarray} \end{Proof} It is worth noting that hypersymmetric densities on ${\bf T}$ are completely equivalent (from a mutual information maximization standpoint) to their ``unbalanced'' cousins. Remember that each and every $I(\vec{{\bf S}};{\bf T})$-maximizing $f_{{\bf T}}(\cdot)$ can be ``balanced'' and made into a hypersymmetric density without affecting the resulting value of $I(\vec{{\bf S}};{\bf T})$. Likewise, any hypersymmetric density has a corresponding ordered density that produces the same $I(\vec{{\bf S}};{\bf T})$. So, the assumption of hypersymmetric input densities is simply an analytic aid. Next we turn to $h(\vec{{\bf S}}|{\bf T})$. A zero-measure edge-folding argument on the conditional density is not easily applicable here, so we resort to some information-theoretic sleight of hand. As before we define $\Omega$ as the permutation index number that produces an ordered output from ${\bf S}$ so that $P_{\Omega}({\bf S}) = \vec{{\bf S}}$. We first note the equivalence \begin{IEEEeqnarray}{c} \label{eq:equivalence} \{ \Omega,\vec{{\bf S}} \} \Leftrightarrow {\bf S} \end{IEEEeqnarray} That is, specification of $\{ \Omega,\vec{{\bf S}} \}$ specifies ${\bf S}$ and {\em vice versa} because as in our derivation of $h(\vec{{\bf S}})$, this equivalence requires that we exclude the zero-measure ``edges'' and ``corners'' of the density where two or more of the $s_i$ are equal. Thus, there is no ambiguity in the ${\bf S} \rightarrow \vec{{\bf S}}$ map. We then have, \begin{IEEEeqnarray}{c} \label{eq:jointdiscretedef} h({\bf S}|{\bf T}) = h(\Omega, \vec{{\bf S}}|{\bf T}) = h(\vec{{\bf S}}|{\bf T}) + H(\Omega|\vec{{\bf S}}, {\bf T}) \end{IEEEeqnarray} which also serves as an {\em en passant} definition for the entropy of a joint mixed distribution ($\Omega$ is discrete while $\vec{S}$ is continuous). We then rearrange \equat{jointdiscretedef} to prove a key theorem: {\em \begin{theorem}{\bf The Ordering Entropy, $H(\Omega|\vec{{\bf S}},{\bf T})$:} \thmlabel{Homega} \begin{IEEEeqnarray}{c} \label{eq:Homega} h(\vec{{\bf S}}|{\bf T}) = h({\bf S}|{\bf T}) - H(\Omega|\vec{{\bf S}}, {\bf T}) \end{IEEEeqnarray} where $H(\Omega|\vec{{\bf S}}, {\bf T})$, the {\em ordering entropy}, is the uncertainty about which $S_m$ corresponds to which $\vec{S}_m$ given both ${\bf T}$ and $\vec{{\bf S}}$. \end{theorem}} \begin{Proof}{\Thmref{Homega}} See \equat{jointdiscretedef}. \end{Proof} We note that \begin{IEEEeqnarray}{c} \label{eq:HOeasybounds} 0 \le H(\Omega|\vec{{\bf S}}, {\bf T}) \le \log M! \end{IEEEeqnarray} with equality on the right for any singular density, $f_{{\bf T}}(\cdot)$, where all the $T_m$ are equal with probability $1$. We can then, after assuming that $f_{{\bf T}}(\cdot)$ is hypersymmetric, write the ordered mutual information in an intuitively pleasing form: {\em \begin{theorem}{\bf The mutual information $I(\vec{{\bf S}};{\bf T})$ relative to the mutual information $I({\bf S};{\bf T})$:} \thmlabel{Isvv} For a hypersymmetric density $f_{{\bf T}}({\bf t}) = f_{{\bf T}}(P_k({\bf t}))$, $k=1,2, \cdots, M!$, the mutual information between launch times ${\bf T}$ and ordered arrival times $\vec{{\bf S}}$ satisfies \begin{IEEEeqnarray}{c} \label{eq:orderedMI_decomp} I(\vec{{\bf S}}; {\bf T}) = I({\bf S};{\bf T}) - \left ( \log M! - H(\Omega|\vec{{\bf S}},{\bf T}) \right ) \end{IEEEeqnarray} \end{theorem}} \begin{Proof}{\Thmref{Isvv}} Combine \Thmref{orderedS} and \Thmref{Homega} with \equat{orderedMI}. \end{Proof} Put another way, an average {\em information degradation} of $\log M! - H(\Omega|\vec{{\bf S}},{\bf T}) \ge 0$ is introduced by the sorting operation, ${\bf S} \rightarrow \vec{{\bf S}}$. Mutual information is convex in $f_{{\bf T}}({\bf t})$ and the space ${\cal F}_{{\bf T}}$ of feasible hypersymmetric $f_{{\bf T}}({\bf t})$ is convex. That is, for any two hypersymmetric probability functions $f_{{\bf T}}^{(1)}$ and $f_{{\bf T}}^{(2)}$ we have \begin{IEEEeqnarray}{c} \label{eq:convexf_T} \kappa f_{{\bf T}}^{(1)}({\bf t}) + (1-\kappa) f_{{\bf T}}^{(2)}({\bf t}) \in {\cal F}_{{\bf T}} \end{IEEEeqnarray} where $0 \le \kappa \le 1$. Thus, we can in principle apply variational \cite{hild} techniques to find that hypersymmetric $f_{{\bf T}}(\cdot)$ which attains the unique maximum of \equat{orderedMI_decomp}. However, in practice, direct application of this method leads to grossly infeasible $f_{{\bf T}}(\cdot)$, implying that the optimizing $f_{{\bf T}}(\cdot)$ lies along some ``edges'' or in some ``corners'' of the convex search space. \subsection{An Analytic Bound for Ordering Entropy $H(\Omega|\vec{{\bf S}}, {\bf T})$} The maximization of \equat{orderedMI_decomp} hinges on specification of $H(\Omega|\vec{{\bf S}},{\bf T})$, the {\em ordering entropy} given $\vec{{\bf S}}$ and ${\bf T}$. To determine analytic expressions for $H(\Omega|\vec{{\bf S}},{\bf T})$, consider that given ${\bf t}$ and $\vec{\sv}$, the probability that $\vec{\sv}$ was produced by the $k^{\mbox{th}}$ permutation of the underlying ${\bf s}$ is \begin{IEEEeqnarray}{c} \label{eq:Pst} \mbox{Prob}(\Omega = k| \vec{\sv}, {\bf t}) = \frac{f_{{\bf S}|{\bf T}}(P_k^{-1}(\vec{\sv})| {\bf t})} {\displaystyle{\sum_{n=1}^{M!}} f_{{\bf S}|{\bf T}}(P_n(\vec{\sv})| {\bf t})} \end{IEEEeqnarray} where $\vec{\sv} = P_{k}({\bf s})$. Some permutations will have zero probability (are {\em inadmissible}) since the specific $\vec{\sv}$ and ${\bf t}$ may render them impossible via the causality of $g(\cdot)$. Using \equat{svvT_def}, the definition of entropy, and \equat{Pst} we have \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{H(\Omega|\vec{\sv},{\bf t})} \nonumber \\ \quad & = & - \!\!\sum_{n=1}^{M!} \left [ \frac{{\mathbf{g}}(P_n(\vec{\sv}) \!-\! {\bf t})}{\displaystyle{\sum_{j=1}^{M!}}{\mathbf{g}}(P_j(\vec{\sv}) \!- \!{\bf t})} \right ] \!\log \!\!\left [ {\frac{{\mathbf{g}}(P_n(\vec{\sv}) \!- \!{\bf t})}{\displaystyle{\sum_{j=1}^{M!}}{\mathbf{g}}(P_j(\vec{\sv})\! -\! {\bf t})}} \right ] \IEEEeqnarraynumspace \label{eq:HstG} \end{IEEEeqnarray} and as might be imagined, \equat{HstG} is difficult to work with in general. Nonetheless, let us define the number of nonzero terms in the sum of \equat{HstG} as $|\Omega|_{\vec{\sv},{\bf t}}$. Now, consider that for exponential $g(\cdot)$, we can use \equat{econd} to write \equat{Pst} as \begin{IEEEeqnarray}{c} \label{eq:PstE} \mbox{Prob}(\Omega = k| \vec{\sv}, {\bf t}) = \frac{{\bf u}(P_k^{-1}(\vec{\sv})- {\bf t})} {\displaystyle{\sum_{n=1}^{M!}} {\bf u}(P_n(\vec{\sv})- {\bf t})} \end{IEEEeqnarray} where ${\bf u}(\cdot)$ is a multidimensional unit step function. \Equat{PstE} is a {\em uniform} probability mass function with $\sum_{n=1}^{M!}{\bf u}(P_n(\vec{\sv})- {\bf t}) = |\Omega|_{\vec{\sv},{\bf t}}$ elements -- the same as the number of non-zero terms in the sum of \equat{HstG}. Thus, \begin{IEEEeqnarray}{c} \label{eq:He} H(\Omega|\vec{\sv},{\bf t}) \le \log \displaystyle{\sum_{n=1}^{M!}} {\bf u}(P_n(\vec{\sv})- {\bf t}) \end{IEEEeqnarray} for {\em all possible causal first-passage time densities}, $g(\cdot)$. In addition, it can be shown that exponential first-passage time is the {\em only} first-passage density which maximizes $H(\Omega|\vec{\sv},{\bf t})$, a result we state as a theorem: {\em \begin{theorem}{\bf A General Upper Bound for $H(\Omega|\vec{\sv},{\bf t})$:} \thmlabel{Homegaupperbound} If we define the number of admissible combinations $\{ P_n(\vec{\sv}), {\bf t} \}$ as \begin{IEEEeqnarray*}{c} \left | \Omega \right |_{\vec{\sv},{\bf t}} \equiv \sum_{n=1}^{M!} {\bf u}(P_n(\vec{\sv})- {\bf t}) \end{IEEEeqnarray*} where ${\bf u}(\cdot)$ is a multidimensional unit step function, then \begin{IEEEeqnarray*}{c} H(\Omega|\vec{\sv},{\bf t}) \le \log \left | \Omega \right |_{\vec{\sv},{\bf t}} \end{IEEEeqnarray*} with equality {\bf iff} $g(\cdot)$ is exponential. \end{theorem}} \begin{Proof}{\Thmref{Homegaupperbound}} We have already shown via \equat{PstE} that exponential first passage renders $\mbox{Prob}(\Omega = k| \vec{\sv}, {\bf t})$ uniform. Now, consider that the probability mass function (PMF) of \equat{Pst} can be written as \begin{IEEEeqnarray*}{c} \mbox{Prob}(\Omega = k| \vec{\sv}, {\bf t}) = \frac{{\mathbf{g}}(P_k^{-1}(\vec{\sv}) - {\bf t})}{\displaystyle{\sum_{j=1}^{M!}}{\mathbf{g}}(P_j(\vec{\sv}) - {\bf t})} \end{IEEEeqnarray*} This PMF is uniform {\bf iff} for all $n$ and $k$ where $P_n(\vec{\sv})$ and $P_k(\vec{\sv})$ {\em are both causal with respect to ${\bf t}$} we have \begin{IEEEeqnarray}{c} \label{eq:permute} {\mathbf{g}}(P_n(\vec{\sv}) - {\bf t}) = {\mathbf{g}}(P_k(\vec{\sv}) - {\bf t}) \end{IEEEeqnarray} That is, \equat{permute} must hold for all pairs $(P_n(\vec{\sv}), {\bf t})$ and $(P_k(\vec{\sv}), {\bf t})$ that are {\em admissible}. Since the maximum number of non-zero probability $\Omega$ is exactly the cardinality of admissible $(P_n(\vec{\sv}), {\bf t})$, any density which produces a uniform PMF over admissible $\Omega$ thereby maximizes $H(\Omega|\vec{\sv},{\bf t})$, which proves the inequality. We then note that any given permutation of a list can be achieved by sequential pairwise swapping of elements. Thus, \equat{permute} is satisfied {\bf iff} \begin{IEEEeqnarray}{c} \label{eq:product} g(x_1 - t_1)g(x_2-t_2) = g(x_2 - t_1)g(x_1-t_2) \end{IEEEeqnarray} $\forall$ admissible $\{ (x_1,x_2)$, $(t_1,t_2) \}$. Rearranging \equat{product} we have \begin{IEEEeqnarray*}{c} \frac{g(x_1-t_1)}{g(x_1-t_2)} = \frac{g(x_2-t_1)}{g(x_2-t_2)} \end{IEEEeqnarray*} which implies that \begin{IEEEeqnarray*}{c} \frac{g(x-t_1)}{g(x-t_2)} = \mbox{Constant w.r.t. $x$} \end{IEEEeqnarray*} Differentiation with respect to $x$ yields \begin{IEEEeqnarray*}{c} \frac{g^\prime(x-t_1)}{g(x-t_2)} - \frac{g(x-t_1)g^\prime(x-t_2)}{g^2(x-t_2)} =0 \end{IEEEeqnarray*} which we rearrange to obtain \begin{IEEEeqnarray*}{c} \frac{g^\prime(x-t_1)}{g(x-t_1)} = \frac{g^\prime(x-t_2)}{g(x-t_2)} \end{IEEEeqnarray*} which further implies that \begin{IEEEeqnarray}{c} \label{eq:Ediffeq} \frac{g^\prime(x-t_1)}{g(x-t_1)} = c \end{IEEEeqnarray} since $t_1$ and $t_2$ are free variables. The only solution to \equat{Ediffeq} is \begin{IEEEeqnarray*}{c} g(x) \propto e^{cx} \end{IEEEeqnarray*} Thus, exponential $g(\cdot)$ is the only first-passage time density that can produce a maximum cardinality uniform distribution over $\Omega$ given $\vec{\sv}$ and ${\bf t}$ -- which completes the proof. \end{Proof} Now consider that $\left | \Omega \right |_{\vec{\sv},{\bf t}}$, as defined in \Thmref{Homegaupperbound}, is a hypersymmetric function of $\vec{\sv}$ and ${\bf t}$ and thus invariant under any permutation of its arguments $\vec{\sv}$ or ${\bf t}$. That is, \begin{IEEEeqnarray*}{rCl} {\sum_{n=1}^{M!}} {\bf u}(P_n(\vec{\sv}) - {\bf t}) & = & {\displaystyle \sum_{n=1}^{M!}} {\bf u}(P_n(\vec{\sv})- \vec{\tv}) \\ & = & {\displaystyle \sum_{n=1}^{M!}} {\bf u}(P_{n}({\bf s})- \vec{\tv}) \\ & = & {\displaystyle \sum_{n=1}^{M!}} {\bf u}(P_n({\bf s})- {\bf t}) \end{IEEEeqnarray*} because the summation is over all $M!$ permutations. Therefore, \begin{IEEEeqnarray}{c} \label{eq:symmetry} \left | \Omega \right |_{\vec{\sv},{\bf t}} = \left | \Omega \right |_{\vec{\sv},\vec{\tv}} = \left | \Omega \right |_{{\bf s},\vec{\tv}} = \left | \Omega \right |_{{\bf s},{\bf t}} \end{IEEEeqnarray} We must now enumerate this number of admissible permutations. Owing to \equat{symmetry} and \Thmref{Ehypersymmetry} we can assume time-ordered inputs $\vec{\tv}$ with no loss of generality. So, let us define contiguous ``bins'' ${\cal B}_k = \{t| t \in [\vec{t}_k, \vec{t}_{k+1}) \}$, $k=1,2,...,M$ ($\vec{t}_{M+1} \equiv \infty$) and then define $\sigma_m$ as bin occupancies. That is, $\sigma_m = q$ if there are exactly $q$ arrivals in ${\cal B}_m$. The benefit of this approach is that the $\sigma_m$ do not depend on whether $\vec{\sv}$ or ${\bf s}$ is used to count the arrivals. Thus, expectations can be taken over ${\bf S}$ whose components are mutually independent given the ${\bf t}$ and no order distributions for $\vec{{\bf S}}$ need be derived. To determine the random variable $\left | \Omega \right |_{{\bf S},\vec{\tv}}$ we start by defining \begin{IEEEeqnarray*}{c} \eta_m = \sum_{j=1}^{m} \sigma_j \end{IEEEeqnarray*} the total number of arrivals up to and including bin ${\cal B}_m$. Clearly $\eta_m$ is monotonically increasing in $m$ with $\eta_0 = 0$ and $\eta_M = M$. We then observe that the $\sigma_m$ arrivals on $[\vec{t}_m,\vec{t}_{m+1})$ can be assigned to any of the $\vec{t}_1, \vec{t}_2, ..., \vec{t}_m$ known emission times {\em except} for those $\eta_{m-1}$ previously assigned. The number of possible new assignments is $(m-\eta_{m-1})!/(m - \eta_m)!$ which when applied iteratively leads to \begin{IEEEeqnarray}{c} \label{eq:Omegacardb} \left | \Omega \right |_{{\bf S},\vec{\tv}} = \prod_{m=1}^M \frac{(m - \eta_{m-1})!}{(m - \eta_{m})!} = \prod_{m=1}^{M-1} (m + 1 - \eta_m) \end{IEEEeqnarray} We then define the random variable \begin{IEEEeqnarray*}{c} X_i^{(m)} = \twodef{1}{S_i < \vec{t}_{m+1}}{0}{\mbox{otherwise}} \end{IEEEeqnarray*} for $i=1,2,...m$. The PMF of $X_i^{(m)}$ is then \begin{IEEEeqnarray}{c} p_{X_i^{(m)}}(x) = \twodef{G(\vec{t}_{m+1} - \vec{t}_i)}{x = 1}{\bar{G}(\vec{t}_{m+1} - \vec{t}_i)}{x = 0} \label{eq:probX} \end{IEEEeqnarray} where we note that for a given $m$, $X_i^{(m)}$ and $X_j^{(m)}$ are independent, $i \ne j$, and as previously defined, $G(\cdot)$ is the CDF of the causal first-passage density $g(\cdot)$. $\bar{G}(\cdot) = 1 - G(\cdot)$ is the corresponding CCDF. We can then write \begin{IEEEeqnarray*}{c} \eta_m = \sum_{i=1}^m X_i^{(m)} \end{IEEEeqnarray*} It is then convenient to define $\bar{X}_i = 1 - X_i$ which allows us to define $\bar{\eta}_m = m - \eta_m$. We can then write \begin{IEEEeqnarray}{c} \label{eq:Omegacardbbar} \left | \Omega \right |_{{\bf S},\vec{\tv}} = \prod_{m=1}^{M-1} (1 + \bar{\eta}_m) \end{IEEEeqnarray} Since we seek the expected value of \equat{Omegacardbbar}, we can use \equat{probX} to calculate each individual $E_{{\bf S}|\vec{\tv}} [\log (1 + \bar{\eta}_m) ]$ as \begin{IEEEeqnarray}{c} \label{eq:Homega_etabar} \sum_{\bar{{\bf x}}} \log (1 \! + \! \sum_{i=1}^m \! \bar{x}_i) \prod_{j=1}^m \bar{G}^{\bar{x}_j}({\vec{t}_{m+1} \! - \! \vec{t}_j}) G^{1 -\bar{x}_j}({\vec{t}_{m+1} \! - \! \vec{t}_j}) \IEEEeqnarraynumspace \end{IEEEeqnarray} which allows us to define ${H^{\uparrow}}({\bf t})$, an upper bound on $H(\Omega|\vec{{\bf S}},{\bf t})$, as \begin{IEEEeqnarray}{rCl} {{H^{\uparrow}}({\bf t})} & \equiv & \sum_{m=1}^{M-1} \sum_{\bar{{\bf x}}} \log (1 + \sum_{i=1}^m \bar{x}_i) \nonumber \\ & & \times \>{\prod_{j=1}^m \bar{G}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1 -\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j)} \label{eq:Hexpurg} \end{IEEEeqnarray} where an ordering permutation on ${\bf t}$ is part of the function ${H^{\uparrow}}({\bf t})$. \Equat{Hexpurg} can be rearranged as \begin{IEEEeqnarray}{rCl} \IEEEeqnarraymulticol{3}{l}{{H^{\uparrow}}({\bf t}) = \sum_{\ell=1}^{M-1} \log(1 + \ell)} \nonumber \\ \quad & \times & {\sum_{m=\ell}^{M-1}} { \sum_{|\bar{{\bf x}}| = \ell}} { \prod_{j=1}^m {\bar{G}}^{\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j) G^{1 -\bar{x}_j}(\vec{t}_{m+1} - \vec{t}_j)} \IEEEeqnarraynumspace \label{eq:Hexpurg3} \end{IEEEeqnarray} We then note that \begin{IEEEeqnarray*}{c} \begin{array}{rcl} H(\Omega|\vec{{\bf S}},{\bf T}) & \equiv & E_{{\bf T}} \left [ E_{\vec{{\bf S}}|{\bf T}} [ H(\Omega|\vec{\sv}, {\bf t}) ] \right ]\\ & \le & E_{{\bf T}} \left [E_{\vec{{\bf S}}|\vec{{\bf T}}} [ \log \left | \Omega \right |_{\vec{\sv},{\bf t}} ] \right ]\\ & = & E_{\vec{{\bf T}}} \left [E_{{\bf S}|\vec{{\bf T}}} [ \log \left | \Omega \right |_{{\bf s},\vec{\tv}} ] \right ] \end{array} \end{IEEEeqnarray*} follow from \equat{Hexpurg3} in conjunction with \Thmref{Homegaupperbound} and through hypersymmetric expectations (\Thmref{Ehypersymmetry}) of hypersymmetric functions $\left | \Omega \right |_{{\bf s},\vec{\tv}}$ (\equat{symmetry}). Adding in the result of \Thmref{Homegaupperbound} we have proven the following theorem: {\em \begin{theorem} {\bf A General and Computable Upper Bound for $H(\Omega|\vec{{\bf S}},{\bf T})$: } \thmlabel{Hbound} \begin{IEEEeqnarray}{c} E \left [ H(\Omega|\vec{\sv},{\bf t}) \right ] \equiv H(\Omega|\vec{{\bf S}},{\bf T}) \le {H^{\uparrow}}({\bf T}) \end{IEEEeqnarray} with equality {\bf iff} the first-passage time density $g(\cdot)$ is exponential. \end{theorem}} \begin{Proof}{\Thmref{Hbound}} See the development leading to the statement of \Thmref{Hbound}. \Thmref{Homegaupperbound} establishes equality {\bf iff} the first passage density is exponential. \end{Proof} Theorem~\ref{thm:Hbound} gives us ${H^{\uparrow}}({\bf T})$, a computable analytic upper bound for $H(\Omega|\vec{{\bf S}},{\bf T})$, and an exact expression if the first-passage time is exponential. \subsection{Capacity Bounds For Timing Channels} \label{sect:timingcap} Despite significant effort, direct optimization of mutual information, $I(\vec{{\bf S}};{\bf T})$ (see \equat{orderedMI_decomp}) remained elusive. The key issue is that $h({\bf S})$ and $H(\Omega|{\bf T},\vec{{\bf S}})$ are ``conflicting'' quantities with respect to $f_{{\bf T}}(\cdot)$. That is, independence of the $\{ T_m \}$ favors larger $h({\bf S})$ (i.e., $h({\bf S}) \le \sum_m h(S_m)$) while tight correlation of the $\{ T_m\}$ (as in $T_i=T_j$, $i,j = 1,2,...,M$) produces the maximum $H(\Omega|\vec{{\bf S}},{\bf T}) = \log M!$. In light of these difficulties, we sought analytic expressions in the companion to this paper (Part~II {\cite{RoseMian16_2}}) for $h({\bf S})$ and $I({\bf S};{\bf T})$ which we restate here as \Thmref{maxhs} and \Thmref{minmaxexp} without proof. {\em \begin{theorem}{\bf Maximum $h(s)$ for exponential first passage under a deadline constraint:} \thmlabel{maxhs} For first-passage time $D$ with density $f_D(d)= g(d) = {\mu} e^{-{\mu} d}$, and launch time $T$ constrained to $[0,\tau]$, the maximum entropy of $S=T+D$ is \begin{IEEEeqnarray}{c} \label{eq:minmaxhS} \max_{f_T(\cdot)} h(S) = \log \left ( \frac{e + {\mu} \tau}{{\mu}} \right ) \end{IEEEeqnarray} The input density $f_T(\cdot)$ which produces the maximum $h(S)$ is \begin{IEEEeqnarray}{c} \label{eq:expoptfT} \begin{array}{rcl} f_T(t) & = & \delta(t) \frac{1}{e + {\mu} \tau} + \delta(t-\tau) \frac{1-e}{e+{\mu} \tau}\\ & + & \frac{{\mu}}{e+{\mu} \tau} (u(t) - u(t-\tau)) \end{array} \end{IEEEeqnarray} \end{theorem}} {\em \begin{theorem}{\bf Maximum $I(S;T)$ For Exponential First Passage Under A Deadline Constraint:} \thmlabel{minmaxexp} For first-passage time $D$ with density $f_D(d)= g(d) = {\mu} ^{-{\mu} d}$, and launch time $T$ constrained to $[0,\tau]$, the maximum mutual information between $S=T+D$ and $T$ is \begin{IEEEeqnarray}{c} \label{eq:inequality} \max_{f_T} I(S;T) = \log \left (1 + \frac{{\mu} \tau}{e} \right ) \end{IEEEeqnarray} \end{theorem}} The definition of $C_q$ and $C_t$ in \Thmref{timelimit_firstpassage} requires we consider the asymptotic value of $H(\Omega|\vec{{\bf S}},{\bf T})/M$. A lower bound is provided in Part-II \cite{RoseMian16_2} assuming exponential first passage, a result we restate here as \Thmref{HOasympt} without proof. {\em \begin{theorem} {\bf \boldmath Asymptotic $H(\Omega|\vec{{\bf S}},{\bf T})/M$ For Exponential First-Passage Under A Deadline Constraint {\boldmath ${\bf T} \in [{\bf 0},{\boldsymbol{\tau}}]$}:} \thmlabel{HOasympt} For exponential first-passage with mean $1/{\mu}$, token launch intensity ${\lambda}$, and i.i.d. input distribution $f_{{\bf T}}({\bf t}) = \prod_{m=1}^M f_T(t)$ where $f_T(\cdot)$ maximizes $I(S;T)$ as in \Thmref{minmaxexp}, the asymptotic ordering entropy per token is \begin{IEEEeqnarray}{c} \label{eq:limHO} \lim_{M \rightarrow \infty} \frac{H(\Omega|\vec{{\bf S}},{\bf T})}{M} = \sum_{k=2}^{\infty} e^{-{\rho}} \frac{{\rho}^k}{k!} (\frac{k}{{\rho}} - 1) \log k! \end{IEEEeqnarray} where ${\rho} = {\lambda}/{\mu}$ is defined as a measure of system token ``load'' similar to a queueing system. \blankout{\Equat{limHO} can also be rewritten as an expectation over a Poisson random variable $K$ with parameter ${\rho}$: \begin{IEEEeqnarray}{c} \label{eq:limHOPoisson} \sum_{k=0}^{\infty} e^{-{\rho}} \frac{{\rho}^k}{k!} (\frac{k}{{\rho}} - 1) \log k! = E_K \left [ (\frac{K}{{\rho}} - 1) \log K! \right ] \end{IEEEeqnarray}} \end{theorem}} We can rewrite the summation term in \equat{limHO} more compactly noting that \begin{IEEEeqnarray}{c} {\displaystyle \sum_{k=1}^{\infty}} \frac{{\rho}^k}{k!} (\frac{k}{{\rho}} - 1) \log k! = {\displaystyle \sum_{\ell=1}^{\infty}} \log \ell {\displaystyle \sum_{k=\ell}^{\infty}} \frac{{\rho}^k}{k!} {(\frac{k}{{\rho}} - 1)} \end{IEEEeqnarray} Then \begin{IEEEeqnarray}{c} \sum_{k=\ell}^{\infty} {\rho}^k \frac{1}{k!} = e^{{\rho}} - \sum_{k=0}^{\ell - 1} {{\rho}}^k \frac{1}{k!} \end{IEEEeqnarray} and \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} \frac{k}{{\rho}} {\rho}^k \frac{1}{k!} = \sum_{k=\ell-1}^{\infty} {\rho}^k \frac{1}{k!} \end{IEEEeqnarray*} \blankout{ which leads to \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} (\frac{k}{{\rho}} - 1)\left {\rho}^k \frac{1}{k!} = \sum_{k=\ell-1}^{\infty} {\rho}^k \frac{1}{k!} + \sum_{k=0}^{\ell - 1} {\rho}^k \frac{1}{k!} - e^{{\rho}} \end{IEEEeqnarray*}} can be used to obtain \begin{IEEEeqnarray*}{c} \sum_{k=\ell}^{\infty} \frac{{\rho}^k}{k!} {(\frac{k}{{\rho}} - 1)} = \frac{1}{(\ell - 1)!} {\rho}^{\ell -1} = \ell {\rho}^{\ell} \frac{1}{\ell!{\rho}} \end{IEEEeqnarray*} We then note that \begin{IEEEeqnarray}{c} \label{eq:p_ell} p_\ell = e^{-{\rho}} \frac{{\rho}^\ell}{\ell!} \end{IEEEeqnarray} $\ell = 0, 1, \cdots, \infty$ is a Poisson probability mass function and obtain the more compact \begin{IEEEeqnarray}{c} \label{eq:HOsimple} {\displaystyle \sum_{k=1}^{\infty}} {\rho}^k (k/{\rho} - 1) \frac{\log k!}{k!} = \frac{1}{{\rho}} E_\ell \left [ \ell \log \ell \right ] \end{IEEEeqnarray} Now turning toward capacity, \equat{orderedMI_decomp} and \Thmref{minmaxexp} are easily combined to show \begin{IEEEeqnarray*}{c} \frac{1}{M} I({\bf S};{\bf T}) - \frac{1}{M} \log M! \ge \log \left (1 + \frac{{\mu} \tau}{e} \right ) - \frac{1}{M}\log M! \end{IEEEeqnarray*} Then, since $\tau = M/{\lambda}$ we have \begin{IEEEeqnarray}{c} \label{eq:left} \lim_{M \rightarrow \infty} \frac{1}{M} I({\bf S};{\bf T}) - \frac{1}{M} \log M! \ge \log \frac{1}{{\rho}} \end{IEEEeqnarray} Noting that $I(\vec{{\bf S}};{\bf T}) = I({\bf S};{\bf T}) - \log M! + H(\Omega|\vec{{\bf S}},{\bf T})$ and $H(\Omega|\vec{{\bf S}},{\bf T})\ \ge 0$ proves the following theorem: {\em \begin{theorem} {\bf \boldmath A Simple Lower Bound for $C_q$ under exponential first passage:} \thmlabel{IDlowerbound} Given a token launch intensity ${\lambda} = M/\tau$ and exponential first-passage time distribution with mean ${\mu}^{-1}$, the timing channel capacity $C_q({\rho})$ in nats per token obeys \begin{IEEEeqnarray}{c} \label{eq:Cqlo} C_{q}({\rho}) \ge \max \left \{-\log{\rho},0 \right \} \end{IEEEeqnarray} where ${\rho} = \frac{{\lambda}}{{\mu}}$ \end{theorem}} \begin{Proof}{\Thmref{IDlowerbound}} See the development leading to the statement of \Thmref{IDlowerbound}. \end{Proof} We can, however, combine \equat{left}, \Thmref{HOasympt} and \equat{HOsimple} to obtain a better lower bound on capacity: {\em \begin{theorem}{\bf Lower Bound for $C_q$ and $C_t$ for Exponential First Passage:} \thmlabel{CqCtloexp} In the limit of large $M$, with mean $1/{\mu}$ exponential first-passage, the channel capacities, $C_q$ and $C_t$ must obey \begin{IEEEeqnarray}{c} C_q({\rho}) \ge \log \frac{1}{{\rho}} + \frac{1}{{\rho}} E \left [ \ell \log \ell \right ] \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} C_t({\rho}) \ge {\lambda} \left ( \log \frac{1}{{\rho}} + \frac{1}{{\rho}} E \left [ \ell \log \ell \right ] \right ) \end{IEEEeqnarray} where $\ell$ is Poisson with PMF \begin{IEEEeqnarray}{c} p_{\ell} = e^{-{\rho}} \frac{{\rho}^\ell}{\ell!} \end{IEEEeqnarray} where ${\rho} = {\lambda}/{\mu}$. \end{theorem}} \begin{Proof}{\Thmref{CqCtloexp}} Combine \equat{left}, \Thmref{HOasympt} and \equat{HOsimple}. \end{Proof} Finally, from Part-II \cite{RoseMian16_2, isit14} we have the following upper bound on $C_q$ (and the concomitant bound on $C_t = {\lambda} C_q$) as: {\em \begin{theorem}{\bf Upper Bound for $C_q$ and $C_t$ for Exponential First Passage:} \thmlabel{Iupbound} If the first-passage density $f_D(\cdot)$ is exponential with parameter ${\mu}$ and the rate at which tokens are released is ${\lambda}$, then the capacity per token, $C_q$ is upper bounded by \begin{IEEEeqnarray}{c} \label{eq:Cmup} C_q \le \log \left (\frac{1}{{\rho}} + 4 \right ) \end{IEEEeqnarray} and the capacity per unit time is upper bounded by \begin{IEEEeqnarray}{c} \label{eq:Ctup} C_t \le {\lambda} \log \left (\frac{1}{{\rho}} + 4 \right ) \end{IEEEeqnarray} where ${\rho} = \frac{{\lambda}}{{\mu}}$ \end{theorem}} \begin{Proof}{\Thmref{Iupbound}} Theorem 11 in Part-II \cite{RoseMian16_2} provides the bound for $C_q$ and application of \Thmref{timelimit_firstpassage} provides the bound for $C_t$. \end{Proof} We have now concluded our treatment of the identical token timing channel. In the next sections we show how these results can be applied to molecular communication channels where tokens can carry information payloads. \subsection{Tokens With Payloads} \label{sect:payload} In sections~\ref{sect:channeluse} through \ref{sect:timingcap} we developed all the machinery necessary to provide capacity bounds for channels with identical tokens where timing is the only means of information carriage. However, one can also imagine scenarios where the token itself carries information, much as a ``packet'' carries information over the Internet. That is, assume the token is a finite string of symbols over a finite alphabet. Having constructed tokens from these ``building blocks,'' a sender launches them into the channel and they are captured by a receiver. In this scenario a DNA sequence is a symbolic string drawn from a 4-character alphabet so that each nucleotide could carry 2 bits of information. Similarly, a protein sequence is a symbolic string drawn from a 20-character alphabet so that each amino acid could carry a little over 4 bits of information. Thus, a DNA token constructed from $100$ nucleotides would carry $200$ bits whereas a corresponding protein token would carry $>400$ bits. However, there are myriad other possibilities for coding information in structure. For example, a third major class of biological macromolecules, carbohydrates (polysaccharides), are linear and branched polymers constructed from a larger alphabet of monosaccharides. In addition to the composition information inherent in the makeup of a linear or non-linear concatenations of building blocks, one could imagine a layer of structural information as well \cite{Bro03} -- as is the case with biological macromolecules where the spatiotemporal architecture of a polymer is as important as the order and frequencies of nucleotide, amino acid or monosaccharide residues in the sequence string. However, as the issue of ``structural'' information (the amount of information contained in an arbitrary 3-dimensional object) is as yet an open problem, we will not consider such constructions in detail. Nonetheless, the bounds we will derive are applicable to {\em any} method of information transfer wherein tokens carry information payload, either as string sequences or in some other structural way. So, for now consider only string tokens -- as exemplified by DNA and protein sequences -- where each token in the ensemble released by the sender carries a portion of the message. Thus, irrespective of their individual lengths, such ``inscribed matter'' tokens must be ``strung together'' to recover the original message, which implies that {\em each token must be identifiable}. Just as in human engineered systems like the Internet where information packets could arrive out of order, a sequence number could be appended to each packet to ensure proper reconstruction at the destination. Thus, given $M$ tokens per channel use, we could append $\log M$ bits to each token. We will defer detailed discussion of this scenario until section~\ref{sect:discussion} as this approach is asymptotically impractical with $\log M$ tending toward $\infty$. Alternatively, one could employ gross differences to convey sequence information such as sending tokens of distinct lengths $1,2,\cdots, K$ where $M= K(K+1)/2$, and there may be other clever ways to embed structural side-information to establish token sequence. Nonetheless, the myriad possibilities notwithstanding, $H(\Omega|\vec{{\bf S}},{\bf T})$ provides the measure of essential token ``overhead'' or ``side-information'' (of any form) necessary to maintain proper sequence. Consider that operation of the timing channel involves construction of ``blocks'' $\{{\bf t}_1, \cdots, {\bf t}_N \}$ where each ${\bf t}_n$ represents the launch schedule for $M$ tokens (a channel use). These blocks, ``codewords'' of blocklength $N$, are launched into the channel. If capacity is not exceeded, the receiver can reliably recover the information embedded in the codewords and since we generally assume the receiver has access to the coding method, a correctly decoded message implies knowledge of the codewords $\{{\bf t}_1, \cdots, {\bf t}_N \}$. However, the channel imposes residual uncertainty about the mapping ${\bf S} \rightarrow \vec{{\bf S}}$ -- the ambiguity about which $\vec{s}_i$ is associated with which $s_j$. For this reason, the payload-inscribed tokens cannot yet be correctly strung together to recover the message. However, given the observed arrivals $\vec{\sv}$ and the correctly decoded ${\bf t}$, $H(\Omega|\vec{\sv}, {\bf t})$ is {\em the definition} of the uncertainty about that ordering, $\Omega$. Likewise, the average uncertainty is $H(\Omega|\vec{{\bf S}},{\bf T})$. Thus, the source coding theorem implies that at least $H(\Omega|\vec{{\bf S}},{\bf T})$ bits must be used, on average, to resolve the mapping ambiguity. So, consider a message ${\bf P}$ to be carried as token payload that we break into equal size ordered submessages $p_m$, $m=1,2,\cdots, M$. We can summarize the previous discussion as a theorem: {\em \begin{theorem} {\bf Sequencing Information for Tokens with Payload:} \thmlabel{Hseq} If a message $P$ is broken into equal size ``payload'' submessages $\{ p_m \}$, $m=1,2,\cdots, M$ and inscribed into otherwise identical tokens launched at times $\{t_m\}$, we must provide, on average, additional ``sequencing information'' $\frac{1}{M}H(\Omega|\vec{{\bf S}},{\bf T})$ per token at the receiver to assure recovery of the full payload message ${\bf P} = p_1p_2 \cdots p_M$. \end{theorem}} \begin{Proof}{\Thmref{Hseq}} Given arrivals $\vec{\sv}$ and known departures ${\bf t}$, the uncertainty about the mapping between the $\{ \vec{s}_m \}$ and the $\{ s_m\}$ (and thus the associated $\{ t_m \}$) is exactly the ordering entropy $H(\Omega|\vec{\sv}, {\bf t})$. Considering $\Omega$ as a letter from a random i.i.d. source, the source coding theorem \cite{cover, gallagerit} requires at least $H(\Omega|\vec{\sv}, {\bf t})$ bits on average to uniquely specify $\Omega$ -- or asymptotically over many channel uses, at least $H(\Omega|\vec{{\bf S}},{\bf T})$ bits on average. Therefore the information necessary at the receiver to recover the proper sequence and thence the message $P$ is greater than or equal to $\frac{1}{M}H(\Omega|\vec{{\bf S}},{\bf T})$. \end{Proof} It is important to note that we have not actually provided a {\em method} for message reconstruction, only a lower bound on the amount of ``side information'' necessary at the receiver to assure proper reconstruction. However, as a practical matter, the quantity $\frac{1}{M}H(\Omega|\vec{{\bf S}},{\bf T})$ does provide some guidance. In the worst case where the order of token arrival is completely random, $H(\Omega|\vec{{\bf S}},{\bf T}) = \log M!$ which amounts to each packet carrying a header of size $\frac{1}{M} \log M! \approx \log M$ for large $M$ -- essentially numbering the packets from $1$ to $M$. If $\frac{1}{M}H(\Omega|\vec{{\bf S}},{\bf T})$ is much smaller, then one could imagine cyclic packet numbers since smaller $\frac{1}{M}H(\Omega|\vec{{\bf S}},{\bf T})$ implies that packets launched far apart in time are unlikely to arrive out of order. The sequence header could then be commensurately smaller. In either case, the total amount information necessary to resolve the ordering $\Omega$ is $\frac{1}{M}H(\Omega|\vec{{\bf S}},{\bf T})$ on average. \subsection{Energy Costs} \label{sect:energy} System energy is a critical resource which limits capacity in all communication systems. In the case of molecular communication, there are a variety of potential costs, most notably manufacture, launch and transport. So, assume the minimum cost of fabricating a token without a payload is $c_0$ Joules and with a payload $c_{1}$ Joules. Symbolic string tokens incur a ``per character'' cost which we define as $\Delta c_{1}$ per character per token. For example, adding a nucleotide to double-stranded DNA requires $2$ ATP ($1.6 \times 10^{-19}$ J) while adding an amino acid to a protein requires $4$ ATP ($3.2 \times 10^{-19}$ J) \cite{lehninger2005}. Apart from the per residue per token cost, there may be other energy involved in sequestration, release and/or token transport across a gap. However, the key assumption is constant energy use per token. Without considering the details as in \cite{kurana} we will denote the combination of these and any other relevant energies as $c_e$ Joules per token. Thus, our power for the timing only channel is \begin{IEEEeqnarray}{c} \label{eq:Ptimingonly} {\cal P}_T = {\lambda} (c_0 + c_e) \end{IEEEeqnarray} and for the timing plus payload channel, \begin{IEEEeqnarray}{c} \label{eq:Ppayload} {\cal P}_{T+P} \le {\lambda} \left ( c_1 + c_e + \left ( \frac{{H^{\uparrow}}({\bf T})}{\log b}+ K \right ) \Delta c_1 \right ) \end{IEEEeqnarray} where $K$ is the string length of information-laden tokens, and $b$ is the alphabet size used to construct the strings. For amino acids (alphabet) are used to construct proteins (strings), and in general, monomers are used to construct oligomers. The inequality in \equat{Ppayload} results from the fact that ${H^{\uparrow}}({\bf T})$ is an upper bound on the ordering entropy $H(\Omega|\vec{{\bf S}},{\bf T})$ over all possible first-passage distributions (\Thmref{Hbound}). We also note that information could be carried {\em only} with payload (and not timing). The power budget would be identical to that of \equat{Ppayload} except that ${H^{\uparrow}}({\bf T})$ would be replaced by $\lim_{M\rightarrow \infty} \min_{{\bf t}} H(\Omega|\vec{{\bf S}},{\bf t})/M$. However, since $H(\Omega|\vec{{\bf S}},{\bf T}) \ge \min_{{\bf t}} H(\Omega|\vec{{\bf S}},{\bf t})$, \equat{Ppayload} provides an upper bound for the payload-only power as well. \blankout{ \note{placeholder equation} \begin{IEEEeqnarray}{c} \label{eq:Ppayloadonly} {\cal P}_{P} \ge {\lambda} \left ( c_1 + c_e + \left ( \frac{\frac{1}{{\rho}} E_\ell \left [ \ell \log \ell \right ]}{\log b}+ K \right ) \Delta c_1 \right ) \end{IEEEeqnarray}} \section{Results} We can now define the capacities for the token timing (only), token timing plus token payload and token payload (only) channels as follows: \begin{IEEEeqnarray}{c} \label{eq:CTO} {\cal C}_T = {\lambda} C_q({\rho}) \end{IEEEeqnarray} \begin{IEEEeqnarray}{c} \label{eq:CT+P} {\cal C}_{T+P} = {\lambda} \left ( C_q({\rho}) + K \log b \right ) \end{IEEEeqnarray} and \begin{IEEEeqnarray}{c} {\cal C}_P = {\lambda} K \log b = {\cal C}_{T+P} - {\cal C}_T \end{IEEEeqnarray} \begin{figure} \begin{center} \includegraphics[width=3.5in]{CtE.pdf} \end{center} \caption{Lower bound (dashed line: \Thmref{CqCtloexp}) and upper bound (solid line: \Thmref{Iupbound}) for the token timing channel capacity $C_t$ (in nats per passage time $1/{\mu}$) as a function of channel load ${\rho}$, the ratio of the token launch rate ${\lambda}$ to the token uptake rate ${\mu}$. } \label{figure:upperC} \end{figure} In FIGURE~\ref{figure:upperC} we use \Thmref{CqCtloexp} and \Thmref{Iupbound} to plot lower and upper bounds for ${\cal C}_T$ versus ${\rho}$, a proxy for power budget, ${\cal P}$ assuming some unit cost per token ($c_0+c_e = 1$). {\em It is important to note} that first-passage time {\em variance} (jitter) produces disordered tokens. That is, the mean first-passage time is only a measure of channel {\em latency} -- the ``propagation delay'' so to speak -- and does not itself impact token order uncertainty. However, for exponential first-passage the standard deviation also happens to be the first passage time $1/{\mu}$. At small values of ${\rho}$ the bounds are tight. At larger ${\rho}$ the bounds diverge and the upper bound offers the tantalizing hint that timing channel capacity increases with increased token load ${\rho}$ (see also \cite{farsad_isit16,farsadIT16}). Unfortunately, we have as yet been unable to find an empirical density $f_{{\bf T}}({\bf t})$ which displays capacity growth similar to the upper bound and suspect that timing capacity flattens with increasing ${\rho}$ owing to a more rapidly increasing probability of token confusion at the output. \begin{figure} \begin{center} \includegraphics[width=3.5in]{CtCtpK0-4_power.pdf} \end{center} \caption{Lower bounds for the capacities of the token timing (${\rho} {\cal C}_T$) and token timing plus token payload (${\rho} {\cal C}_{P+T}$) channels as a function of power budget (${\cal P}_T$ and ${\cal P}_{P+T}$) for DNA string tokens with exponential first-passage times (\Thmref{CqCtloexp}). Capacity is in units bits per first-passage time $1/{\mu}$. Power is in units of $2$-ATP ($1.6 \times 10^{-19}$ J) per passage time $1/{\mu}$ and a nucleotide residue is assumed to carry 2-bits of information. Solid lines: aggregate capacity of $n=1,2,4$ separate (independent or parallel) token timing channels where DNA string tokens carry no information payload. Dashed/Dotted lines: aggregate capacity of token timing plus token payload channels for DNA string tokens of different lengths, $K=1,2,4$-residue payloads. } \label{figure:capacities} \end{figure} In FIGURE~\ref{figure:capacities}, we use \Thmref{CqCtloexp} to plot lower bounds in bits per first-passage time, $1/{\mu}$, as a function of power budget ${\cal P}$ assuming DNA-based tokens. For token timing plus token payload signaling we show plots for $K=1,2,4$ DNA-residue tokens. For timing-only signaling we also include plots where different identifiable tokens (different molecule types or physically separate channels) are used ({\em i.e.}, $n=1,2,4$ parallel timing channels as shown) for comparison with payload channels. We have assumed costs $c_0 =\Delta c_1 = 2$ ATP. Furthermore, we assume $c_1 = c_e = \Delta c_1$ since it seems likely that the absolute minimum energy for token release, $c_e$, in a purely diffusive channel is probably comparable to the cost of creating (or breaking) the covalent bond used to append a nucleotide residue. If we assume $1/{\mu} = 1$ms, then the ordinate of FIGURE~\ref{figure:capacities} is in kbit/s and the abscissa is in units of $1.6 \times 10^{-16}$W. If $1/{\mu} = {\mu} s$, (as might be the case for smaller gaps in a nano-system) the ordinate is in $Mbit/s$ and the abscissa is in units of $1.6\times 10^{-13}$W. These data rates are many many orders of magnitude larger than the fractional bit/second data rates previously reported for simple demonstrations of molecule communication \cite{eckford3}, and the predicted power efficiencies are startling. Comparison of our results to \cite{eckford3} and others would be relatively straightforward if passage time jitter for the experimental setup were provided, although in \cite{eckford3} Avogradrian numbers of molecules were release with each alcohol ``puff'' so precise timing at the molecular level was not attempted. Finally, it is worth noting that increasing the rate at which tokens with payload are launched will increase the bit rate but not increase the required energy per bit. Of particular note, at low power, timing-only signaling provides the best rates while at higher power, inscribed matter tokens may be preferred. However, if it is difficult to synthesize long strings (heavily information-laden tokens), even a single bit of information (two distinguishable species used in parallel) markedly increases capacity. \section{Discussion \& Conclusion} \label{sect:discussion} We have provided a general and fundamental mathematical framework for molecular channels and derived some associated capacity bounds. We now discuss the results in the context of selected prior work and also touch upon ideas for further work suggested by the results. We separate these into two tranches: \begin{itemize} \item {\em Engineering Implications} where we consider how molecular communication can be extended to other known communication scenarios as well where we might look for inspiration from biology that has had eons to evolve solutions. \item {\em Biological Implications} where we consider how the results might impact/support known biology and suggest new avenues for investigation. \end{itemize} \subsection{Engineering Implications} \noindent {\bf Capacity Bounds and Coding Methods:} Our upper bound on capacity $C_t$, the timing capacity for identical tokens, is tight for low token load ${\rho}$ but diverges for large ${\rho}$. However, no empirical distributions with rates higher than the lower bound have yet been found. So, does the capacity of the timing-only channel truly flatten with increasing ${\rho}$ as in FIGURES~\ref{figure:capacities} and \ref{figure:upperC}, or is there a benefit to increasing the intensity of timing-token release as suggested in \cite{farsad_isit16, farsadIT16}? In addition, since exponential first-passage is not the worse case corruption, what {\em is} the minmax capacity of the molecular timing channel? Likewise, how much better than exponential might be other first-passage densities imposed by various physical channels, and what are good codes for reliable transmission of information over molecular channels? While we have focused on tokens in the form of linear symbolic strings, DNA and protein sequences in particular, what benefits might string tokens with a branched structure, exemplified by carbohydrates, confer for sequencing and/or payload? Should we vigorously pursue technology to produce large payload (many residue) tokens \cite{churchDNAstorage16}, or should a pool of smaller pre-fabricated payloads be used to deliver information? The bunching seen in FIGURE~\ref{figure:capacities} for payload tokens with increasing $K$ may suggest the latter when rapid token construction is difficult. That is, the capacity per power output does not scale linearly in $K$ owing to the increased power required by adding more bases to tokens. This implies a tradeoff between timing-only and increasingly larger payloads -- completely aside from the fact that payload size, shape and composition can have an effect on transport properties. \noindent {\bf Precise Timing, Fuzzy Timing and Concentration:} Of particular importance is establishing a careful quantitative relationship between our finest-grain timing model and other less temporally precise ones \cite{bassler1999,bassler2002,fekriisit11,akyildiz_nanonet,akyildiz_diffusion,eckford1, Eckbook,ISIT2013_Arash, arash_wireless2013, ICC2014_Arash, eckford_press_vodka}. To begin, consider that our model seems to imply infinitely precise control over the release times ${\bf T}$ and infinite precision measurement of the arrival times $\vec{{\bf S}}$. However, release time and measurement time imprecision are both easily incorporated into the transit time vector ${\bf D}$. Thus, application of our model to the ``fuzzier'' release and detection times associated with practical/real systems is straightforward. Put another way, first passage time jitter already imposes limits on timing precision. Thus, so long as timing precision is significantly better than passage time jitter, the bounds presented here will be moderately tight. In addition, we are hopeful that the upper bound of Theorem~\Thmref{Iupbound} will be useful for evaluating molecular timing channel capacity for arbitrary first passage time distributions since it requires only knowledge of the timing channel capacity coupled to average properties of the corresponding input distribution. Concentration is derived from considering temporal windows and counting the arrivals within them. Therefore, via the data processing theorem, our precise timing model {\em \bf must} undergird all concentration-based methods which, even with perfect concentration detection, {\em cannot possibly exceed the capacity of the finest grain timing model presented here}. Of particular note for the asymptotic nature of our analysis here, an individual emission schedule ${\bf t}$ for large $M$ is {\em exactly} a temporal emission concentration sequence as time resolution coarsens. That said, we have not as yet tried to show a graceful degradation toward coarse timing concentration from precise timing. Regardless, the results here provide crisp bounds on the capacities derived from concentration-based models. As a specific example, there are channel models where information is carried by the {\em number} of molecules released and received (most recently, see \cite{farsadIT16,farsadsurvey16}). In this case, the capacity per channel use, $C_N$, is upper bounded by $\log (M+1)$ since between $0$ and $M$ tokens can be released during a symbol interval of duration $\tau(M)$. Smaller $\tau(M)$ increases the capacity in bits per second. Larger $M$ increases the capacity in bits per channel use. If we assume a fixed signaling interval $\tau(M)$ during which $m=0,1, \cdots M$ tokens are emitted, then we can also fix the average token rate ${\lambda}$ as a proxy for power. Assuming a uniform distribution on the number of tokens sent we then have \begin{IEEEeqnarray}{c} \tau(M) = \frac{M}{2 {\lambda}} \label{eq:tauMconcentration} \end{IEEEeqnarray} since the average number of tokens released is $M/2$. Assuming exponential first passage, the probability that all tokens arrive by $\tau(M)$ is minimized when all tokens are launched at $t=0$. For exponential first passage and with arrival probability criterion $1-\epsilon$ as in section~\ref{sect:channeluse} we have \begin{IEEEeqnarray}{c} \tau(M) = - \frac{1}{{\mu}} \log \left ( 1- (1-\epsilon)^{\frac{1}{M}} \right ) \label{eq:tauM} \end{IEEEeqnarray} which assures that even when $M$ tokens are emitted, they will all arrive before $\tau(M)$ with probability $1-\epsilon$. However, \equat{tauM} in combination with the power limit of \equat{tauMconcentration} sets ${\lambda}$ to \begin{IEEEeqnarray}{c} {\lambda}(M) = -\frac{{\mu} M}{2 \log \left ( 1- (1-\epsilon)^{\frac{1}{M}} \right )} \label{eq:lambdaMconcentration} \end{IEEEeqnarray} Then, since $C_N \le \log (M+1)$, after setting a successful channel use criterion of $1-\epsilon$ we have \begin{IEEEeqnarray}{c} \frac{C_N(M)}{\tau(M)} \le - \frac{{\mu} \log(M+1)}{\log \left ( 1- (1-\epsilon)^{\frac{1}{M}} \right )} \label{eq:Cnumber} \end{IEEEeqnarray} which we rewrite as \begin{IEEEeqnarray}{c} \frac{C_N(M)}{{\mu} \tau(M)} \le - \frac{\log(M+1)}{\log \left ( 1- (1-\epsilon)^{\frac{1}{M}} \right )} \label{eq:Cnumberrho} \end{IEEEeqnarray} with normalized power constraint \begin{IEEEeqnarray}{c} {\cal P}(M) = \frac{{\lambda}(M)}{{\mu}} = -\frac{M}{2 \log \left ( 1- (1-\epsilon)^{\frac{1}{M}} \right )} \end{IEEEeqnarray} However, except for small $\epsilon$, $\frac{C_N(M)}{{\mu} \tau(M)}$ is not a reliable indicator of capacity since with increased $\epsilon$, $\tau(M)$ decreases but the probability of intersymbol interference (ISI) increases. Since calculating the capacity of this channel with ISI is difficult, we roughly approximate by normalizing $\frac{C_N(M)}{{\mu} \tau(M)}$ by the expected number of intervals over which a given emission burst of $M$ tokens will span (thereby corrupting potentially them). Noting that $(1-\epsilon^z)^M$ is the probability that all tokens arrive before the end of the $z+1^{\mbox{st}}$ interval after emission we have \begin{IEEEeqnarray}{rCl} \bar{z}(M) & = & \sum_{z=0}^\infty (1 - (1 - \epsilon^z)^M) \nonumber \\ & = & -\sum_{n=1}^{M} {M \choose n} \frac{(-1)^{n}}{1-\epsilon^{n}} \label{eq:zbar} \end{IEEEeqnarray} and we obtain \begin{IEEEeqnarray}{rCl} \tilde{C}_N(M) & \equiv & \frac{C_N(M)}{\bar{z}(M) {\mu} \tau(M)}\nonumber \\ & \le & \frac{\log \left ( M+1 \right ) }{- \bar{z}(M) \log \left ( 1- (1-\epsilon)^{\frac{1}{M}} \right )} \IEEEeqnarraynumspace \label{eq:numbersimplifytilde} \end{IEEEeqnarray} as an approximation to capacity for the number/concentration channel. In FIGURE~\ref{figure:numberVtiming} we plot the upper bound of $\tilde{C}_N(M)$ in \equat{numbersimplifytilde} versus ${\cal P}(M)$ (i.e., parametrized in $M$) for a range of $\epsilon$ as compared to the timing channel lower bound in FIGURE~\ref{figure:upperC}. The timing channel capacity lower bound is always significantly greater than $\tilde{C}_N(M)$. Nonetheless, the coding simplicity of the number/concentration channel could make it an attractive option. \begin{figure} \begin{center} \includegraphics[width=3.5in]{numberVtiming.pdf} \end{center} \caption{Lower bound for $\rho {\cal C}_t$ versus tokens per passage (dashed line) compared to $\tilde{C}_N$ vs. tokens per passage for different values of $\epsilon$ as shown. Token construction and emission are assumed unit energy for both the timing channel and the number/concentration channel.} \label{figure:numberVtiming} \end{figure} \noindent {\bf Identifiable Tokens Without Payload:} In section~\ref{sect:payload} we mentioned the possibility of uniquely identifying each of $M$ emitted tokens with a sequence number of length $\log M$ bits. We treat this scenario as distinct from ensemble timing channel coding which resolves residual orderering ambiguity (see section \ref{sect:payload}) because if the tokens are individually identifiable, the potential emission schedules are not constrained to ensemble timing channel coding. Thus, the $M$ identifiable tokens constitute $M$ parallel single-token timing channels, which for exponential first passage have aggregate capacity $M \log (1 + \frac{M}{{\rho} e})$. However, ${\rho}$ is limited by the power budget ${\cal P}$ (in units of energy per passage, $1/{\mu}$) \begin{IEEEeqnarray}{c} {\rho} {\log M} \le {\cal P} \label{eq:identified} \end{IEEEeqnarray} because each token requires $\log M$ bits of sequencing information energy. Following \ref{sect:channeluse} we have ${\lambda} \tau(M)= M$ so the capacity in nats per passage time is \begin{IEEEeqnarray}{c} C = {\rho} \log \left ( 1 + \frac{M}{{\rho} e} \right ) \le {\rho} \log \left ( 1 + \frac{e^{\frac{\cal P}{{\rho}}}}{{\rho} e} \right ) \label{eq:identifiedC} \end{IEEEeqnarray} the last inequality owed to \equat{identified}. However, in the limit of $M \rightarrow \infty$ we have ${\rho} \rightarrow 0$ so we have \begin{IEEEeqnarray}{c} \lim_{{\rho} \rightarrow 0} C = {\cal P} \end{IEEEeqnarray} in units of nats per passage time (and assuming unit per-bit cost of the token identfier string). Thus, the identifiable token timing channel capacity exceeds the identical token timing channel lower bound with increasing power budget and scales linearly in power as does the timing channel upper bound (see FIGURE~\ref{figure:upperC}) -- while still lying below it. \noindent {\bf Token Corruption and Receptor Noise:} Certain channel properties we have so far ignored must also be studied, such as the potential for lost or corrupted tokens and potential binding noise at receptor sites. However, as previously stated, token erasure (tokens which do not arrive) or payload token corruption (tokens which are altered in passage) or receptor noise (tokens bind stochastically to the receptor) can only decrease capacity (via the data processing theorem). Thus, the results here provide upper bounds. Nonetheless it is worth considering how the analytic machinery developed might be modified to take into account such impediments. First, consider alteration of payload-carrying tokens {\em en route}. If the corruption is i.i.d. for each token, then the usual error correcting coding methods can be applied individually, or to the token ensemble. The resulting overall channel capacity will be degraded by the coding overhead necessary to preserve payload message integrity (including the sequencing headers). Then consider token erasure where a token never arrives (and is assume to not arrive in a later signaling interval). Since each signaling interval uses $M$ tokens, we will know whether tokens get ``lost'' in transit and can arbitrarily assign a faux arrival time to such tokens. However, the problem this poses for our analysis is two-fold. First, tokens released later in the signaling interval are more likely to be lost which implies that the first passage density is not identical for each token. Second, the first passage density for each token would then contain a singularity equal to the probability of loss, violating one of our key assumptions and making hypersymmetric probability density folding arguments invalid. That said, an erasure channel approach where tokens were deleted randomly from the output could be pursued and owing to its i.i.d. nature (with respect to which tokens were erased) would likely provide a worst case scenario, since the information associated with erasures being more likely to be derived from a later release would be absent. Finally, we have previously mentioned that a token may ``arrive'' multiple times owing to receptor binding kinetics. It was previously shown that given the first binding (first-passage) time the information content of subsequent bindings by the same token is nil \cite{eckford1}. In addition, as shown in section~\ref{sect:channeluse}, information-theoretically patent channel use requires that tokens from a given emission interval be eventually cleared at the receiver. Otherwise, lingering tokens can interfere with subsequent emission intervals. So, one could imagine that the rebinding process results in a characteristic finite-mean ``burst'' of arrivals associated with a given token which could perhaps be resolved into a single first-arrival time estimate -- effectively adding more jitter to the first-passage time $D$. If so, our model applies directly with appropriate modification. However, we have not attempted to analyze this scenario nor quantify the associated estimation noise. Thus, our results are most appropriately applied to systems where ligands bind tightly or where tokens are removed with high probability after first capture/detection. The addition of noisy ligand binding can only depress the capacity bounds presented here and we leave the question of exactly how much to future work. \noindent {\bf Interference and Multiple Users:} Multi-user communication in a molecular setting is a critical question, and a better understanding of the single-user channel will certainly help with multi-user studies where transmissions interfere. There is some work to inspire an information-theoretic edifice \cite{moewin16} similar to how the current work builds on \cite{bits-Qs}, but the multi-user molecular signaling problem has not yet been rigorously considered. Of particular interest would be a version of MIMO since FIGURE~\ref{figure:capacities} shows capacity benefits to parallel channels. One could imagine apposed arrays of emitters and receivers which could be engineered to collaborate to encode and decode information in a variety of ways, from parallel non-interfering channels to grossly interfering channels where joint/distributed coding might be employed. One could even imagine channels with chemically reactive species in which emitted tokens elicited spatially structured propagation of detectable reaction products \cite{chemwaves1,chemwaves2,chemwaves3}. \noindent {\bf Other Applications:} It is interesting to note that although our work is couched in terms of molecular communication, the notion of token inscription applies to any system where discrete emissions experience random transport delay between sender and receiver. The most obvious example is the Internet where packets experience variable delay and may arrive out of order. Our results provide crisp bounds on the amount of sequencing overhead necessary for proper message reconstruction and even suggest that (at least for low payload packets traveling over independent routes) timing information could be an interesting adjunct to payload, depending upon the amount of timing jitter between the source and destination. There is also the potential for cross pollination from biology to communication systems. As a simple example, there may be some selective benefit to hiding information from competitors. So, perhaps biological systems, where signaling chemicals are often detectable by other organisms, convey secrets over molecular communication channels in ways that can be mimicked in engineered systems. An obvious application, biosteganography \cite{biosteganography16}, comes to mind in the context of tokens with payloads, although in such schemes timing plays no role as yet. \subsection{Biological Implications} Clearly, the natural world clearly offers a dizzying array of processes and phenomena through which the same and different tasks, communication or otherwise, might be accomplished (see, for example, \cite{Joussineau_filopod,GorYan06,GurBar08,WanVer10,purcell_chemophys,Bassler09}). It is no wonder therefore that communication theorists have plied their trade heavily in this scientific domain (for a relatively recent review, see \cite{todd_ITspecial10}). Identifying the underlying mechanisms (signaling modality, signaling agent, signal transport, and so on) as well as the molecules and structures implementing the mechanisms is no small undertaking. Consequently, experimental biologists use a combination of prior knowledge and what can only be called instinct to choose those systems on which to expend effort. Guidance may be sought from evolutionary developmental biology -- a field that compares the developmental processes of different organisms to determine their ancestral relationship and to discover how developmental processes evolved. Insights may be gained by using statistical machine learning techniques to analyze heterogeneous data such as the biomedical literature and the output of so-called ``omics'' technologies -- genomics (genes, regulatory, and non-coding sequences), transcriptomics (RNA and gene expression), proteomics (protein expression), metabolomics (metabolites and metabolic networks), pharmacogenomics (how genetics affects hosts' responses to drugs), physiomics (physiological dynamics and functions of whole organisms), and so on. Frequently, the application of communication theory to biology starts by selecting a candidate system whose components and operations have been already elucidated to varying degrees using methods in the experimental and/or computational biology toolbox \cite{HH4,Long09} and then applying communication and/or information theoretic methods \cite{todd_ITspecial10,wojtek,donjohnson10,emery04,Bassler09,MouDia16,MouKav16,UdaKur16}. However, we believe that communication theory in general and information theory in particular are not mere system analysis tools for biology but new lenses on the natural world \cite{MianRose11}. Here, we have sought to demonstrate the potential of {\em communication theory as an organizing principle for biology}. That is, given energy constraints and some general physics of a problem, an information-theoretic treatment can be used to provide outer bounds on information transfer in a {\em mechanism-blind} manner. Thus, rather than simply elucidating and quantifying known biology, communication theory can winnow the plethora of possibilities (or even suggest new ones) amenable to experimental and computational pursuit. Likewise, general application of communication-theoretic principles to biology affords a new set of application areas for communication theorists. Examples of the implications of our main communication theoretic results are as follows: \begin{itemize} \item {\em We have derived a model and methodology for determining the amount of information a system using chemical signaling can convey under given power constraints.} Do (or How do) biological systems achieve this extremely -- even outrageously -- low value? \item {\em Using tokens with large payloads can be very efficient.} Is one example of this the transmission of hereditary material such as a genome over evolutionary time scales (periods spanning the history of groups and species)? \item {\em If it is difficult to synthesize long strings (information-laden tokens), even a single bit of information (two distinguishable species) increases capacity.} {Is the transmission of hormones, semiochemicals and other small molecules over developmental time scales (periods spanning the life of individuals) indicative of some efficiency tradeoff?} \item {\em Although the production rate of tokens can be increased, the channel capacity might not increase if tokens are emitted at intervals smaller than the variability of arrival time.} {Does the material through which tokens travel hold the key to addressing this and the aforementioned questions and problems about engineered systems -- particularly the issues of concentration versus timing, token corruption and interference and multiple users? In biological systems, discrete particles propagate through a cornucopia of substances en route from the source to the target: solids, liquids, gases or plasmas in the biosphere, lithosphere, atmosphere, hydrosphere, interstellar space or intergalactic space -- for instance cytoplasm, nucleoplasm, mitochondrial matrix, extracellular matrix, extracellular polymeric substances, blood, lymph, phloem, xylem, bones, soil, rocks, air, water, steam, ice, and molecular clouds. Clearly, the ``propagation delay'' (jitter) experienced by a particular category and type of discrete particle is a function of the intrinsic physicochemical properties of the material. The standard deviation of arrival times will depend also on environmental factors such as temperature, pH, pressure and light.} \end{itemize} Our results could guide studies aimed at answering three key questions biologists ask of a living organism: How does it work?, How is it built?, and How did it get that way? \cite{Bre12}. This is because our models of token timing, payload and timing+payload channels are inspired, at least in part, by fundamental ``systems'' problems about the dynamic and reciprocal relationship(s) between individuals in multicellular systems -- whether microrganisms in communities or cells in metazoan tissues. Inscribed matter communication is a keystone of how individuals learn what to become or to be by a combination of internal and external cues and how, in turn, they teach others when to change or remain the same. Thus, the seemingly esoteric theoretical studies of channel capacities described here and discussed further in our companion paper might help pave the way to elucidating the origins (evolutionary developmental biology), generation (embryogenesis, and morphogenesis), maintenance (homeostasis, tolerance, and resilience), subversion (infectious and chronic diseases such as cancer and immune disorders), and decline (aging) of complex biological form and function \cite{MianRose11}. A key virtue of the token timing model is its implicit acknowledgment of the importance of the ``transmission medium'' in the spatial gap between sender and receiver and through which tokens move. Consider molecular inscribed matter communication from the microscopic to the macroscopic levels: within and between cells in tissues and organisms in (agro)ecosystems. Since the presence of obstacles influences the mobility of discrete particles through a material, a crowded environment will increase the mean arrival time relative to unhindered diffusion but should have less of an impact on the mean emission time. Decades of laboratory {\em in vitro} studies have promulgated the view of the cellular interior as a place proteins, nucleic acids, carbohydrates, lipids and other molecules exist as highly purified entities that act in isolation, diffusing more or less freely until they find their cognate binding partner. In its natural milieu however, a molecule lives and operates in an extremely structured, complex and confining environment: one where it is surrounded by other molecules of the same or different chemical nature, the bystanders in the crowd having positive or negative effects on its mobility, biochemistry and cell biology \cite{MitCho15,KuzZas15}. Widening the spatial and temporal horizon, semiochemicals diffusing through soil, water, and air mediate the complex ways crops, livestock, and microbes interact with one another. Whether molecule release and capture occurs among organisms in the above- and below-ground environments or between cells in the tissue microenvironment, the basic physics is similar. For this reason we feel that our fundamental treatment of {{inscribed matter}} communication presented here could help guide biological understanding and experimentation. \section*{Acknowledgments} Profound thanks are owed to A. Eckford, N. Farsad, S. Verd\'u and V. Poor for useful discussions and guidance. We are also extremely grateful to the editorial staff and the raft of especially careful and helpful anonymous reviewers. This work was supported in part by NSF Grant CDI-0835592. \bibliographystyle{unsrt}
{'timestamp': '2016-12-20T02:01:19', 'yymm': '1606', 'arxiv_id': '1606.05023', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05023'}
arxiv
\section{Introduction} \label{sec:intro} Guarded recursion is a technique for defining and reasoning about infinite objects. Its applications include the definition of productive operations on data structures more commonly defined via coinduction, such as streams, and the construction of models of program logics for modern programming languages with features such as higher-order store and concurrency~\cite{Birkedal:Step}. This is done via the type-former $\later$, called `later', which distinguishes data which is available immediately from data only available after some computation, such as the unfolding of a fixed-point. For example, guarded recursive streams are defined by the equation \[ \gstream{A} \;=\; A \times \later{\gstream{A}} \] rather than the more standard $\gstream{A} = A \times\gstream{A}$, to specify that the head is available now but the tail only later. The type for fixed-point combinators is then $(\later A\to A)\to A$, rather than the logically inconsistent $(A\to A)\to A$, disallowing unproductive definitions such as taking the fixed-point of the identity function. Guarded recursive types were developed in a simply-typed setting by Clouston et al.~\cite{Clouston:Programming}, following earlier work~\cite{Nakano:Modality,Atkey:Productive,Abel:Formalized}, alongside a logic for reasoning about such programs. For large examples such as models of program logics, we would like to be able to formalise such reasoning. A major approach to formalisation is via \emph{dependent types}, used for example in the proof assistants Coq~\cite{Coq:manual} and Agda~\cite{Norell:thesis}. Bizjak et al.~\cite{Bizjak-et-al:GDTT}, following earlier work~\cite{Birkedal+:topos-of-trees,Mogelberg:tt-productive-coprogramming}, introduced guarded dependent type theory ($\ensuremath{\mathsf{GDTT}}$), integrating the $\later$ type-former into a dependently typed calculus, and supporting the definition of guarded recursive types as fixed-points of functions on universes, and guarded recursive operations on these types. We wish to formalise non-trivial theorems about equality between guarded recursive constructions, but such arguments often cannot be accommodated within \emph{intensional} Martin-L\"{o}f type theory. For example, we may need to be able to reason about the extensions of streams in order to prove the equality of different stream functions. Hence $\ensuremath{\mathsf{GDTT}}$ includes an equality reflection rule, which is well known to make type checking undecidable. This problem is close to well-known problems with functional extensionality~\cite[Sec. 3.1.3]{Hofmann:Extensional}, and indeed this analogy can be developed. Just as functional extensionality involves mapping terms of type $(x:A)\to\term{Id} B\, (fx)\, (gx)$ to proofs of $\term{Id}\,(A\to B)\, f\, g$, extensionality for guarded recursion requires an extensionality principle for later types, namely the ability to map terms of type $\later\term{Id} A\,t\,u$ to proofs of $\term{Id}\,(\later A)\,(\pure{t})\,(\pure{u})$, where $\pure{}$ is the constructor for $\later$. These types are isomorphic in the intended model, the presheaf category $\psh{\omega}$ known as the \emph{topos of trees}, and so in $\ensuremath{\mathsf{GDTT}}$ their equality was asserted as an axiom. But in a calculus without equality reflection we cannot merely assert such axioms without losing canonicity. \emph{Cubical type theory} ($\ensuremath{\mathsf{CTT}}$)~\cite{Cubical} is a new type theory with a computational interpretation of functional extensionality but without equality reflection, and hence is a candidate for extension with guarded recursion, so that we may formalise our arguments without incurring the disadvantages of fully extensional identity types. $\ensuremath{\mathsf{CTT}}$ was developed primarily to provide a computational interpretation of the univalence axiom of Homotopy Type Theory~\cite{hottbook}. The most important novelty of $\ensuremath{\mathsf{CTT}}$ is the replacement of inductively defined identity types by \emph{paths}, which can be seen as maps from an abstract interval $\ensuremath{\mathbbm{I}}$, and are introduced and eliminated much like functions. $\ensuremath{\mathsf{CTT}}$ can be extended with identity types which model all rules of standard Martin-L\"of type theory~\cite[Sec. 9.1]{Cubical}, but these are equivalent to path types, and in our paper it suffices to work with path types only. $\ensuremath{\mathsf{CTT}}$ has sound denotational semantics in (fibrations in) \emph{cubical sets}, a presheaf category that is used to model homotopy types. Many basic syntactic properties of $\ensuremath{\mathsf{CTT}}$, such as the decidability of type checking, and canonicity for base types, are yet to be proved, but a type checker has been implemented% \footnote{\url{https://github.com/mortberg/cubicaltt}} that confers some confidence in such properties. In Sec.~\ref{sec:type-theory-examples} of this paper we propose \emph{guarded cubical type theory} ($\ensuremath{\mathsf{GCTT}}$), a combination of the two type theories% \footnote{with the exception of the \emph{clock quantification} of $\ensuremath{\mathsf{GDTT}}$, which we leave to future work.} which supports non-trivial proofs about guarded recursive types via path equality, while retaining the potential for good syntactic properties such as decidable type-checking and canonicity. In particular, just as a term can be defined in $\ensuremath{\mathsf{CTT}}$ to witness functional extensionality, a term can be defined in $\ensuremath{\mathsf{GCTT}}$ to witness extensionality for later types. Further, we use elements of the interval of $\ensuremath{\mathsf{CTT}}$ to annotate fixed-points, and hence control their unfoldings. This ensures that fixed-points are path equal, but not judgementally equal, to their unfoldings, and hence prevents infinite unfoldings, an obvious source of non-termination in any calculus with infinite constructions. The resulting calculus is shown via examples to be useful for reasoning about guarded recursive operations; we also view it as potentially significant from the point of view of $\ensuremath{\mathsf{CTT}}$, extending its expressivity as a basis for formalisation. In Sec.~\ref{sec:semantics} we give sound semantics to this type theory via the presheaf category over the product of the categories used to define semantics for $\ensuremath{\mathsf{GDTT}}$ and $\ensuremath{\mathsf{CTT}}$. This requires considerable work to ensure that the constructions of the two type theories remain sound in the new category, particularly the glueing and universe of $\ensuremath{\mathsf{CTT}}$. The key technical challenge is to ensure that the $\later$ type-former supports the \emph{compositions} that all types must carry in the semantics of $\ensuremath{\mathsf{CTT}}$. We have implemented a prototype type-checker for this extended type theory% \footnote{\url{http://github.com/hansbugge/cubicaltt/tree/gcubical}}, which provides confidence in the type theory's syntactic properties. All examples in this paper, and many others, have been formalised in this type checker. For reasons of space many details and proofs are omitted from this paper, but are included in a technical appendix\footnote{
{'timestamp': '2016-06-29T02:09:22', 'yymm': '1606', 'arxiv_id': '1606.05223', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05223'}
arxiv
\section{Introduction: decoding needs model evaluation} Decoding, \emph{ie} predicting behavior or phenotypes from brain images or signals, has become a central tool in neuroimage data processing \cite{haynes2006,haynes2015primer,kamitani2005decoding,norman2006,varoquaux2014machine,yarkoni2016choosing}. In clinical applications, prediction opens the door to diagnosis or prognosis \cite{mouraomiranda2005,fu2008pattern,demirci2008review}. To study cognition, successful prediction is seen as evidence of a link between observed behavior and a brain region \cite{haxby2001} or a small fraction of the image \cite{kriegeskorte2006}. Decoding power can test if an encoding model describes well multiple facets of stimuli \cite{mitchell2008,naselaris2011}. Prediction can be used to establish what specific brain functions are implied by observed activations \cite{schwartz2013,poldrack2009decoding}. All these applications rely on measuring the predictive power of a decoder. Assessing predictive power is difficult as it calls for characterizing the decoder on prospective data, rather than on the data at hand. Another challenge is that the decoder must often choose between many different estimates that give rise to the same prediction error on the data, when there are more features (voxels) than samples (brain images, trials, or subjects). For this choice, it relies on some form of regularization, that embodies a prior on the solution \cite{hastie2009elements}. The amount of regularization is a parameter of the decoder that may require tuning. Choosing a decoder, or setting appropriately its internal parameters, are important questions for brain mapping, as these choice will not only condition the prediction performance of the decoder, but also the brain features that it highlights. \smallskip Measuring prediction accuracy is central to decoding, to assess a decoder, select one in various alternatives, or tune its parameters. The topic of this paper is cross-validation, the standard tool to measure predictive power and tune parameters in decoding. The first section is a primer on cross-validation giving the theoretical underpinnings and the current practice in neuroimaging. In the second section, we perform an extensive empirical study. This study shows that cross-validation results carry a large uncertainty, that cross-validation should be performed on full blocks of correlated data, and that repeated random splits should be preferred to leave-one-out. Results also yield guidelines for decoder parameter choice in terms of prediction performance and stability. \section{A primer on cross-validation} This section is a tutorial introduction to important concepts in cross validation for decoding from brain images. \subsection{Cross-validation: estimating predictive power} In neuroimaging, a decoder is a predictive model that, given brain images $\B{X}$, infers an external variable $\B{y}$. Typically, $\B{y}$ is a categorical variable giving the experimental condition or the health status of subjects. The accuracy, or predictive power, of this model is the expected error on the prediction, formally: \begin{equation} \text{accuracy} = \mathbb{E}\bigl[ \mathcal{E}(\B{y}^\text{pred}, \B{y}^\text{ground truth}) \bigr] \label{eq:accuracy} \end{equation} where $\mathcal{E}$ is a measure of the error, most often\footnote{For multi-class problems, where there is more than 2 categories in $\B{y}$, or for unbalanced classes, a more elaborate choice is advisable, to distinguish misses and false detections for each class.} the fraction of instances for which $\B{y}^\text{pred} \neq \B{y}^\text{ground truth}$. Importantly, in equation (\ref{eq:accuracy}), $\mathbb{E}$ denotes the \emph{expectation}, \emph{ie} the average error that the model would make on infinite amount of data generated from the same experimental process. In decoding settings, the investigator has access to labeled data, \emph{ie} brain images for which the variable to predict, $\B{y}$, is known. These data are used to train the model, fitting the model parameters, and to estimate its predictive power. However, the same observations cannot be used for both. Indeed, it is much easier to find the correct labels for brain images that have been seen by the decoder than for unknown images\footnote{A simple strategy that makes no errors on seen images is simply to store all these images during the training and, when asked to predict on an image, to look up the corresponding label in the store.}. The challenge is to measure the ability to \emph{generalize} to new data. The standard approach to measure predictive power is \emph{cross-validation}: the available data is split into a \emph{train set}, used to train the model, and a \emph{test set}, unseen by the model during training and used to compute a prediction error (figure \ref{fig:cross_val}). Chapter 7 of \cite{hastie2009elements} contains a reference on statistical aspects of cross-validation. Below, we detail important considerations in neuroimaging. \paragraph{Independence of train and test sets} Cross-validation relies on independence between the train and test sets. With time-series, as in fMRI, the autocorrelation of brain signals and the temporal structure of the confounds imply that a time separation is needed to give truly independent observations. In addition, to give a meaningful estimate of prediction power, the test set should contain new samples displaying all confounding uncontrolled sources of variability. For instance, in multi-session data, it is harder to predict on a new session than to leave out part of each session and use these samples as a test set. However, generalization to new sessions is useful to capture actual invariant information. Similarly, for multi-subject data, predictions on new subjects give results that hold at the population level. However, a confound such as movement may correlate with the diagnostic status predicted. In such a case the amount of movement should be balanced between train and test set. \paragraph{Sufficient test data} Large test sets are necessary to obtain sufficient power for the prediction error for each split of cross-validation. As the amount of data is limited, there is a balance to strike between achieving such large test sets and keeping enough training data to reach a good fit with the decoder. Indeed, theoretical results show that cross-validation has a negative bias on small dataset \cite[sec.5.1]{arlot2010} as it involves fitting models on a fraction of the data. On the other hand, large test sets decrease the variance of the estimated accuracy \cite[sec.5.2]{arlot2010}. A good cross-validation strategy balances these two opposite effects. Neuroimaging papers often use \emph{leave one out} cross-validation, leaving out a single sample at each split. While this provides ample data for training, it maximizes test-set variance and does not yield stable estimates of predictive accuracy\footnote{One simple aspect of the shortcomings of small test sets is that they produce unbalanced dataset, in particular leave-one-out for which there is only one class represented in the test set.}. From a decision-theory standpoint, it is preferable to leave out 10\% to 20\% of the data, as in 10-fold cross-validation \cite[chap.\,7.12]{hastie2009elements} \cite{breiman1992submodel,kohavi1995study}. Finally, it is also beneficial to increase the number of splits while keeping a given ratio between train and test set size. For this purpose k-fold can be replaced by strategies relying on repeated random splits of the data (sometimes called repeated learning-testing\footnote{Also related is bootstrap CV, which may however duplicate samples inside the training set of the test set.} \cite{arlot2010} or \emph{ShuffleSplit} \cite{pedregosa2011}). As discussed above, such splits should be consistent with the dependence structure across the observations (using \emph{eg} a \emph{LabelShuffleSplit}), or the training set could be stratified to avoid class imbalance \cite{Raamana2014ThickNetFusion_NBA}. In neuroimaging, good strategies often involve leaving out sessions or subjects. \begin{figure}[t] \hfill% \begin{minipage}[T]{.45\linewidth}% \caption{\textbf{Cross-validation}: the data is split multiple times into a train set, used to train the model, and a test set, used to compute predictive power. \label{fig:cross_val}}% \end{minipage} \hfill \begin{minipage}[T]{.45\linewidth}% \includegraphics[width=\linewidth]{cross_validation} \end{minipage} \end{figure} \subsection{Hyper-parameter selection} \paragraph{A necessary evil: one size does not fit all} In standard statistics, fitting a simple model on abundant data can be done without the tricky choice of a meta-parameter: all model parameters are estimated from the data, for instance with a maximum-likelihood criterion. However, in high-dimensional settings, when the number of model parameters is much larger than the sample size, some form of regularization is needed. Indeed, adjusting model parameters to best fit the data without restriction leads to \emph{overfit}, \emph{ie} fitting noise \cite[chap.\,7]{hastie2009elements}. Some form of regularization or prior is then necessary to restrict model complexity, \emph{e.g.} with low-dimensional PCA in discriminant analysis \cite{chen2006exploring}, or by selecting a small number of voxels with a sparse penalty \cite{yamashita2008,carroll2009}. If too much regularization is imposed, the ensuing models are too constrained by the prior, they \emph{underfit}, \emph{ie} they do not exploit the full richness of the data. Both underfitting and overfitting are detrimental to predictive power and to the estimation of model weights, the decoder maps. Choosing the amount of regularization is a typical bias-variance problem: erring on the side of variance leads to overfit, while too much bias leads to underfit. In general, the best tradeoff is a data-specific choice, governed by the statistical power of the prediction task: the amount of data and the signal-to-noise ratio. \begin{figure}[t] \hfill% \begin{minipage}[T]{.3\linewidth}% \caption{\textbf{Nested cross-validation}: two cross-validation loops are run one inside the other. \label{fig:nested_cross_val}}% \end{minipage} \hfill% \begin{minipage}[T]{.68\linewidth}% \includegraphics[width=\linewidth]{nested_cross_validation} \end{minipage} \end{figure} \paragraph{Nested cross-validation} Choosing the right amount of regularization can improve the predictive power of a decoder and controls the appearance of the weight maps. The most common approach to set it is to use cross-validation to measure predictive power for various choices of regularization and to retain the value that maximizes predictive power. Importantly, with such a procedure, the amount of regularization becomes a parameter adjusted on data, and thus the predictive performance measured in the corresponding cross-validation loop is not a reliable assessment of the predictive performance of the model. The standard procedure is then to refit the model on the available data, and test its predictive performance on new data, called a \emph{validation} set. Given a finite amount of data, a \emph{nested cross-validation} procedure can be employed: the data are repeatedly split in a validation set and a decoding set to perform decoding. The decoding set itself is split in multiple train and test sets with the same validation set, forming an inner ``nested'' cross-validation loop used to set the regularization hyper-parameter, while the external loop varying the validation set is used to measure prediction performance --see figure \ref{fig:nested_cross_val}. \paragraph{Model averaging} Choosing the best model in a family of good models is hard. One option is to average the predictions of a set of suitable models \cite[chap.\,35]{penny2007}, \cite{kuncheva2010classifier,churchill2014comparing,hoyos2015} --see \cite[chap.\,8]{hastie2009elements} for a description outside of neuroimaging. A simple version of this idea is \emph{bagging} \cite{breiman1996bagging}: using \emph{bootstrap}, random resamplings of the data, to generate many train sets and corresponding models, the predictions of which are then averaged. The benefit of these approaches is that if the errors of each model are sufficiently independent, they average out: the average model performs better and displays much less variance. With linear models often used as decoders in neuroimaging, model averaging is appealing as it boils down to averaging weight maps. To benefit from the stabilizing effect of model averaging in parameter tuning, we can use a variant of both cross-validation and model averaging\footnote{The combination of cross-validation and model averaging is not new (see \emph{eg} \cite{hoyos2015}), but it is seldom discussed in the neuroimaging literature. It is commonly used in other areas of machine learning, for instance to set parameters in bagged models such as trees, by monitoring the out-of-bag error (\emph{eg} in the \emph{scikit-learn} library \cite{pedregosa2011}).}. In a standard cross-validation procedure, we repeatedly split the data in train and test set and for each split, compute the test error for a grid of hyper-parameter values. However, instead of selecting the hyper-parameter value that minimizes the mean test error across the different splits, we select \emph{for each split} the model that minimizes the corresponding test error and average these models across splits. \label{sec:averaging}% \subsection{Model selection for neuroimaging decoders} Decoding in neuroimaging faces specific model-selection challenges. The main challenge is probably the scarcity of data relative to their dimensionality, typically hundreds of observations\footnote{While in imaging neuroscience, hundreds of observations seems acceptably large, it is markedly below common sample sizes in machine learning. Indeed, data analysis in brain imaging has historically been driven by very simple models while machine learning has tackled rich models since its inception.}. Another important aspect of decoding is that, beyond predictive power, interpreting model weights is relevant. \paragraph{Common decoders and their regularization} Both to prefer simpler models and to facilitate interpretation, linear models are ubiquitous in decoding. In fact, their weights form the common brain maps for visual interpretation. \begin{figure}[b] \hfill% \includegraphics[width=.34\linewidth]{svm_non-convex_few_sv}% \llap{\sffamily Large $C$\qquad}% \hfill% \includegraphics[width=.34\linewidth]{svm_non-convex_many_sv}% \llap{\sffamily Small $C$\qquad}% \hfill\vbox{}% \caption{\textbf{Regularization with SVM-$\ell_2$}: blue and brown points are training samples of each class. The SVM learns a separating line between the two classes. In a weakly regularized setting (large $C$, this line is supported by few observations --called support vectors--, circled in black on the figure, while in a strongly-regularized case (small $C$), it is supported by the whole data. \label{fig:svm_reg}}% \end{figure} \begin{figure*}[bt] \hspace*{-.025\linewidth}% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/empty.pdf}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=$10^{-5}$}}}% \end{minipage}% \hfill \hspace*{-.075\linewidth}% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/haxby_log_reg_l1_1_000000e+00.pdf}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=1.}}}% \end{minipage}% \hfill \hspace*{-.075\linewidth}% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/haxby_log_reg_l1_1_000000e+02.pdf}% \llap{\makebox[1.5\linewidth][c]{% \raisebox{.9\linewidth}{\color{white}\sffamily\bfseries Log-reg $\mathbf{\ell_1}$}}}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=$10^2$}}}% \end{minipage}% \hfill \hspace*{-.075\linewidth}% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/haxby_log_reg_l1_1_000000e+05.pdf}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=$10^{5}$}}}% \end{minipage}% \hfill% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/haxby_svm_l2_1_000000e-05.pdf}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=$10^{-5}$}}}% \end{minipage}% \hfill \hspace*{-.075\linewidth}% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/haxby_svm_l2_1_000000e+00.pdf}% \llap{\makebox[\linewidth][c]{% \raisebox{.9\linewidth}{\color{white}\sffamily\bfseries SVM $\mathbf{\ell_2}$}}}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=1}}}% \end{minipage}% \hfill \hspace*{-.075\linewidth}% \begin{minipage}{.2\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/haxby_svm_l2_1_000000e+05.pdf}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.01\linewidth}{\color{white}\small C=$10^{5}$}}}% \end{minipage}% \hspace*{-.025\linewidth}% \caption{\textbf{Varying amount of regularization} on the face vs house discrimination in the Haxby 2001 data \cite{haxby2001}. \textbf{Left}: with a log-reg $\ell_1$, more regularization (small C) induces sparsity. \textbf{Right}: with an SVM $\ell_2$, small C means that weight maps are a combination of a larger number of original images, although this has only a small visual impact on the corresponding brain maps. \label{fig:maps}} \end{figure*} The classifier used most often in fMRI is the support vector machine (SVM) \cite{mouraomiranda2005,chen2006exploring,laconte2005support}. However, logistic regressions (Log-Reg) are also often used \cite{ryali2010,varoquaux2012icml,chen2006exploring,yamashita2008,rasmussen2012model}. Both of these classifiers learn a linear model by minimizing the sum of a \emph{loss} $\mathcal{L}$ --a data-fit term-- and a \emph{penalty} $p$ --the regularizing energy term that favors simpler models: \begin{equation*} \hat{\mathbf{w}} = \underset{\mathbf{w}}{\text{argmin}}\bigl( \mathcal{L}(\mathbf{w}) + \frac{1}{C} \, p(\mathbf{w}) \bigr) \qquad \smash{\mathcal{L} = \begin{cases} \text{\raisebox{-1ex}{% \includegraphics[height=3ex]{hinge_loss}}% } & \hspace*{-1.5ex}\text{SVM} \\ \text{\raisebox{-1ex}{% \includegraphics[height=3ex]{logistic_loss}}% } & \hspace*{-1.5ex}\text{logistic} \end{cases}} \end{equation*} where $C$ is the regularization parameter that controls the bias-variance tradeoff: small $C$ means strong regularization. The SVM and logistic regression model differ only by the loss used. For the SVM the loss is a hinge loss: flat and exactly zero for well-classified samples and with a misclassification cost increasing linearly with distance to the decision boundary. For the logistic regression, it is a logistic loss, which is a soft, exponentially-decreasing, version of the hinge \cite{hastie2009elements}. By far the most common regularization is the $\ell_2$ penalty. Indeed, the common form of SVM uses $\ell_2$ regularization, which we will denote SVM-$\ell_2$. Combined with the large zero region of the hinge loss, strong $\ell_2$ penalty implies that SVMs build their decision functions by combining a small number of training images (see figure \ref{fig:svm_reg}). Logistic regression is similar: the loss has no flat region, and thus every sample is used, but some very weakly. Another frequent form of penalty, $\ell_1$, imposes sparsity on the weights: a strong regularization means that the weight maps $\mathbf{w}$ are mostly comprised of zero voxels (see Fig.\,\ref{fig:maps}). \paragraph{Parameter-tuning in neuroimaging} In neuroimaging, many publications do not discuss their choice of decoder hyper-parameters; while others state that they use the default value, \emph{eg} $C = 1$ for SVMs. Standard machine learning practice advocates setting the parameters by nested cross-validation \cite{hastie2009elements}. For non sparse, $\ell_2$-penalized models, the amount of regularization often does not have a strong influence on the weight maps of the decoder (see figure \ref{fig:maps}). Indeed, regularization in these models changes the fraction of input maps supporting the hyperplane (see \ref{fig:svm_reg}). As activation maps for the same condition often have similar aspects, this fraction impacts weakly decoders' maps. For sparse models, using the $\ell_1$ penalty, sparsity is often seen as a means to select relevant voxels for prediction \cite{carroll2009,ryali2010}. In this case, the amount of regularization has a very visible consequence on weight maps and voxel selection (see figure \ref{fig:maps}). Neuroimaging studies often set it by cross-validation \cite{carroll2009}, though very seldom nested (exceptions comprise \cite{churchill2014comparing,varoquaux2012icml}). Voxel selection by $\ell_1$ penalty on brain maps is unstable because neighboring voxels respond similarly and $\ell_1$ estimators will choose somewhat randomly few of these correlated features \cite{varoquaux2012icml,rondina2013stability}. Hence various strategies combining sparse models are used in neuroimaging to improve decoding performance and stability. Averaging weight maps across cross-validation folds \cite{hoyos2015,varoquaux2012icml}, as described above, is interesting, as it stays in the realm of linear models. Relatedly, \cite{grosenick2013} report the median of weight maps, thought it does not correspond to weights in a predictive model. Consensus between sparse models over data perturbations gives theoretically better feature selection \cite{meinshausen2010stability}. In fMRI, it has been used to screen voxels before fitting linear models \cite{rondina2013stability,varoquaux2012icml} or to interpret selected voxels \cite{yamashita2008}. For model selection in neuroimaging, prediction performance is not the only relevant metric and some control over the estimated model weights is also important. For this purpose, \cite{laconte2003,strother2002quantitative,rasmussen2012model} advocate using a tradeoff between prediction performance and stability of decoder maps. Stability is a proxy for estimation error on these maps, a quantity that is not accessible without knowing the ground truth. While very useful it gives only indirect information on estimation error: it does not control whether all the predictive brain regions were found, nor whether all regions found are predictive. Indeed, a decoder choosing its maps independently from the data would be very stable, though likely with poor prediction performance. Hence the challenge is in finding a good prediction-stability tradeoff \cite{strother2014stability, rasmussen2012model}. \section{Empirical studies: cross-validation at work} Here we highlight practical aspects of cross-validation in brain decoding with simple experiments. We first demonstrate the variability of prediction estimates on MRI, MEG, and simulated data. We then explore how to tune decoders parameters. \subsection{Experiments on real neuroimaging data} \paragraph{A variety of decoding datasets} To achieve reliable empirical conclusions, it is important to consider a large number of different neuroimaging studies. We investigate cross-validation in a large number of 2-class classification problems, from 7 different fMRI datasets (an exhaustive list can be found in \ref{sec:table}). We decode visual stimuli within subject (across sessions) in the classic Haxby dataset \cite{haxby2001}, and across subjects using data from \cite{duncan2009consistency}. We discriminate across subjects \emph{i)} affective content with data from \cite{wager2008neural}, \emph{ii)} visual from narrative with data from \cite{moran2012social}, \emph{iii)} famous, familiar, and scrambled faces from a visual-presentations dataset \cite{henson2002face}, and \emph{iv)} left and right saccades in data from \cite{knops2009recruitment}. We also use a non-published dataset, ds009 from openfMRI \cite{poldrack2013openfmri}. All the across-subject predictions are performed on trial-by-trial response (Z-score maps) computed in a first-level GLM. Finally, beyond fMRI, we perform prediction of gender from VBM maps using the OASIS data \cite{marcus2007}. Note that all these tasks cover many different settings, range from easy discriminations to hard ones, and (regarding fMRI) recruit very different systems with different effect size and variability. The number of observations available to the decoder varies between 80 (40 per class) and 400, with balanced classes. The results and figures reported below are for all these datasets. We use more inter-subject than intra-subject datasets. However 15 classification tasks out of 31 are intra-subject (see Tab.\,\ref{tab:results}). In addition, when decoding is performed intra-subject, each subject gives rise to a cross-validation. Thus in our cross-validation study, 82\% of the data points are for intra-subject settings. All MR data but \cite{knops2009recruitment} are openly available from openfMRI \cite{poldrack2013openfmri} or OASIS \cite{marcus2007}. Standard preprocessing and first-level analysis were applied using SPM, Nipype and Nipy (details in \ref{sec:fmri_data_analysis}). All MR data were variance-normalized\footnote{Division of each time series voxel/MEG sensor by its standard deviation} and spatially-smoothed at 6\,mm FWHM for fMRI data and 2\,mm FWHM for VBM data. \paragraph{MEG data} Beyond MR data, we assess cross-validation strategies for decoding of event-related dynamics in neurophysiological data. We analyze magneteoencephalography (MEG) data from a working-memory experiment made available by the Human Connectome Project~\cite{larson2013adding}. We perform intra-subject decoding in 52 subjects with two runs, using a temporal window on the sensor signals (as in \cite{sitt2014large}). Here, each run serves as validation set for the other run. We consider two-class decoding problems, focusing on either the image content (faces vs tools) or the functional role in the working memory task (target vs low-level and high-level distractors). This yields in total four classification analyzes per subject. For each trial, the feature set is a time window constrained to 50\,ms before and 300\,ms after event onset, emphasizing visual components. We use the cleaned single-trial outputs from the HCP ``tmegpreproc'' pipeline. MEG data analysis was performed with the MNE-Python software~\cite{gramfort2013meg, gramfort2014mne}. Full details on the analysis are given in \ref{sec:meg_data_analysis}. \paragraph{Experimental setup} Our experiments make use of nested cross-validation for an accurate measure of prediction power. As in figure \ref{fig:nested_cross_val}, we repeatedly split the data in a validation set and a decoding set passed on to the decoding procedure (including parameter-tuning for experiments in \ref{sec:cv_for_tuning} and \ref{sec:stability}). To get a good measure of predictive power, we choose large validation sets of 50\% of the data, respecting the sample dependence structure (leaving out subjects, or sessions). We use 10 different validation sets that each contribute a data point in results. We follow standard decoding practice in fMRI \cite{pereira2009machine}. We use univariate feature selection on the training set to select the strongest 20\% of voxels and train a decoder on the selected features. As a choice of decoder, we explore classic linear models: SVM and logistic regression with $\ell_1$ and $\ell_2$ penalty\footnote{Similar decoders adding a regularization that captures spatio-temporal correlations among the voxels are well suited for neuroimaging \cite{gramfort2013,michel2011tv,grosenick2013,karahanouglu2013totalactivation}. Also, random forests, based on model averaging discussed above, have been used in fMRI \cite{langs2011gini,kuncheva2010classifier}. However, this review focuses on the most common practice. Indeed, these decoders entail computational costs that are intractable given the number of models fit in the experiments. }. We use scikit-learn for all decoders \cite{pedregosa2011,abraham2014}. In a first experiment, we compare decoder performance estimated by cross-validation on the decoding set, with performance measured on the validation set. In a second experiment, we investigate the use of cross-validation to tune the model's regularization parameter, either using the standard \emph{refitting} approach, or \emph{averaging} as described in section \ref{sec:averaging}, as well as using the default $C=1$ choice of parameter, and a value of $C = 1000$. \subsection{Results: cross-validation to assess predictive power} \begin{figure}[b] \centerline{% \includegraphics[height=.65\linewidth, trim={0 .4cm 0 0}]{experiments/standardized_refitting_cv_error_10}% }% \caption{\textbf{Prediction error: cross-validated versus validation set}. Each point is a measure of predictor error in the inner cross-validation loop (10 splits, leaving out 20\%), or in the left-out validation set. The dark line is an indication of the tendency, using a lowess local regression. The two light lines indicate the boundaries above and below which fall 5\% of the points. They are estimated using a Gaussian kernel density estimator, with a bandwidth set by the Scott method, and computing the CDF along the y direction. \label{fig:cv_error}} \end{figure} \paragraph{Reliability of the cross-validation measure} Considering that prediction error on the large left-out validation set is a good estimate of predictive power, we use it to assess the quality of the estimate given by the nested cross-validation loop. Figure \ref{fig:cv_error} shows the prediction error measured by cross-validation as a function of the validation-set error across all datasets and validation splits. It reveals a small negative bias: as predicted by the theory, cross-validation is pessimistic compared to a model fit on the complete decoding set. However, models that perform poorly are often reported with a better performance by cross-validation. Additionally, cross-validation estimates display a large variance: there is a scatter between estimates in the nested cross-validation loop and in the validation set. \begin{figure}\smallskip {\small\sffamily Cross-validation\hfill {\bfseries Difference in accuracy measured}\hfill\vbox{}\vspace*{-.4ex} strategy\hfill\hfill {\bfseries ~~by cross-validation and on validation set}\hfill\vbox{}} \includegraphics[width=\linewidth]{experiments/comparing_cv_strategies_horizontal}\\[-.55em] {\sffamily\tiny\hspace*{.195\linewidth}\scalebox{1.15}{cross-validation $<$ validation set} \hfill \scalebox{1.15}{cross-validation $>$ validation set}} \caption{\textbf{Cross-validation error: different strategies}. Difference between accuracy measured by cross-validation and on the validation set, in intra and inter-subject settings, for different cross-validation strategies: leave one sample out, leave one block of samples out (where the block is the natural unit of the experiment: subject or session), or random splits leaving out 20\% of the blocks as test data, with 3, 10, or 50 random splits. For inter-subject settings, leave one sample out corresponds to leaving a session out. The box gives the quartiles, while the whiskers give the 5 and 95 percentiles.\label{fig:cv_strategies}} \end{figure} \paragraph{Different cross-validation strategies} Figure \ref{fig:cv_strategies} summarizes the discrepancy between prediction accuracy measured by cross validation and on the validation set for different cross-validation strategies: leaving one sample out, leaving one block of data out --where blocks are the natural units of the experiment, sessions or subjects-- and random splits leaving out 20\% of the blocks of data with 3, 10, and 50 repetitions. Ideally, a good cross-validation strategy would minimize this discrepancy. We find that leave-one-sample out is very optimistic in within-subject settings. This is expected, as samples are highly correlated. When leaving out blocks of data that minimize dependency between train and test set, the bias mostly disappears. The remaining discrepancy appears mostly as variance in the estimates of prediction accuracy. For repeated random splits of the data, the larger the number of splits, the smaller the variance. Performing 10 to 50 splits with 20\% of the data blocks left out gives a better estimation than leaving successively each blocks out, at a fraction of the computing cost if the number of blocks is large. While intra and inter subject settings do not differ strongly when leaving out blocks of data, intra-subject settings display a larger variance of estimation as well as a slight negative bias. These are likely due to non-stationarity in the time-series, \emph{eg} scanner drift or loss of vigilance. In inter-subject settings, heterogeneities may hinder prediction \cite{strother2014stability}, yet a cross-validation strategy with multiple subjects in the test set will yield a good estimate of prediction accuracy\footnote{The probability of correct classification for each subject is also an interesting quantity, though it is not the same thing as the prediction accuracy measured by cross-validation \cite[sec 7.12]{hastie2009elements}. It can be computed by non-parametric approaches such as bootstrapping the train set \cite{platt1999probabilistic}, or using a posterior probability, as given by certain classifiers.}. \paragraph{Other modalities: MEG and simulations} We run the experiments on the MEG decoding tasks and the simulations. We generate simple simulated data that mimic brain imaging to better understand trends and limitations of cross-validation. Briefly, we generate data with 2 classes in 100 dimensions with Gaussian noise temporally auto-correlated and varying the separation between the class centers (more details in \ref{sec:simulated_data}). We run the experiments on a decoding set of 200 samples. \begin{figure}\smallskip {\small\sffamily Cross-validation\hfill {\bfseries Difference in accuracy measured}\hfill\vbox{}\vspace*{-.4ex} strategy\hfill\hfill {\bfseries ~~by cross-validation and on validation set}\hfill\vbox{}} \includegraphics[width=\linewidth]{cv_strategies_meg_and_simulations}\\[-.55em] {\sffamily\tiny\hspace*{.195\linewidth}\scalebox{1.15}{cross-validation $<$ validation set} \hfill \scalebox{1.15}{cross-validation $>$ validation set}} \caption{\textbf{Cross-validation error: non-MRI modalities}. Difference between accuracy measured by cross-validation and on the validation set, for MEG data and simulated data, with different cross-validation strategies. Detailed simulation results in \ref{sec:simulated_data}. \label{fig:cv_strategies_other_data}} \end{figure} The results, displayed in figure \ref{fig:cv_strategies_other_data}, reproduce the trends observed on MR data. As the simulated data is temporally auto-correlated, leave-one-sample-out is strongly optimistic. Detailed analysis varying the separability of the classes (\ref{sec:simulated_data}) shows that cross-validation tends to be pessimistic for high-accuracy situations, but optimistic when prediction is low. For MEG decoding, the leave-one-out procedure is on trials, and thus does not suffer from correlations between samples. Cross-validation is slightly pessimistic and display a large variance, most likely because of inhomogeneities across samples. In both situations, leaving blocks of data out with many splits (\emph{e.g.} 50) gives best results. \begin{figure* \hspace*{-.01\linewidth}% \begin{minipage}{.29\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/scissors_scramble_svm_l2.pdf}% \llap{\makebox[.7\linewidth][c]{% \raisebox{.64\linewidth}{\small\sffamily SVM $\ell_2$}}} \end{minipage}% \hfill \hspace*{-.06\linewidth}% \begin{minipage}{.29\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/scissors_scramble_log_reg_l2.pdf}% \llap{\makebox[.65\linewidth][l]{% \raisebox{.64\linewidth}{\small\sffamily Log-reg $\ell_2$}}} \end{minipage}% \hfill \hspace*{-.06\linewidth}% \begin{minipage}{.29\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/scissors_scramble_svm_l1.pdf}% \llap{\makebox[.8\linewidth][l]{% \raisebox{.64\linewidth}{\small\sffamily SVM $\ell_1$}}} \end{minipage}% \hfill \hspace*{-.06\linewidth}% \begin{minipage}{.29\linewidth} \includegraphics[width=\linewidth]{experiments_summer_2015/scissors_scramble_log_reg_l1.pdf}% \llap{\makebox[.82\linewidth][l]{% \raisebox{.64\linewidth}{\small\sffamily Log-reg $\ell_1$}}} \end{minipage}% \hfill \caption{\textbf{Tuning curves} for SVM $\ell_2$, logistic regression $\ell_2$, SVM $\ell_1$, and logistic regression $\ell_1$, on the scissors / scramble discrimination for the Haxby dataset \cite{haxby2001}. The thin colored lines are test scores for each of the internal cross-validation folds, the thick black line is the average of these test scores on all folds, and the thick dashed line is the score on left-out validation data. The vertical dashed line is the parameter selected on the inner cross-validation score. \label{fig:tuning_curves}} \end{figure*} \subsection{Results on cross-validation for parameter tuning} \label{sec:cv_for_tuning} We now evaluate cross-validation as a way of setting decoder hyperparameters. \paragraph{Tuning curves: opening the black box} Figure \ref{fig:tuning_curves} is a didactic view on the parameter-selection problem: it gives, for varying values of the meta-parameter $C$, the cross-validated error and the validation error for a given split of validation data\footnote{For the figure, we compute cross-validated error with a leave-one-session-out on the first 6 sessions of the scissor / scramble Haxby data, and use the last 6 sessions as a validation set.}. The validation error is computed on a large sample size on left out data, hence it is a good estimate of the generalization error of the decoder. Note that the parameter-tuning procedure does not have access to this information. The discrepancy between the tuning curve, computed with cross-validation on the data available to the decoder, and the validation curve, is an indication of the uncertainty on the cross-validated estimate of prediction power. Test-set error curves of individual splits of the nested cross-validation loop show plateaus and a discrete behavior. Indeed, each individual test set contains dozens of observations. The small combinatorials limit the accuracy of error estimates. Figure \ref{fig:tuning_curves} also shows that non-sparse --$\ell_2$-penalized-- models are not very sensitive to the choice of the regularization parameter C: the tuning curves display a wide plateau\footnote{This plateau is due to the flat, or nearly flat, regions of their loss that renders them mostly dependent only on whether samples are well classified or not.}. However, for sparse models ($\ell_1$ models), the maximum of the tuning curve is a more narrow peak, particularly so for SVM. A narrow peak in a tuning curve implies that a choice of optimal parameter may not alway carry over to the validation set. \begin{figure}[!b] \setlength{\mylength}{20cm}% \includegraphics[height=.238\mylength, trim={0 .4cm 0 0}]{experiments/standardized_l2_bar_plot}% \llap{\raisebox{.232\mylength}{% \rlap{\small\bfseries\sffamily Non-sparse models}}% \hspace*{.34\linewidth}% }% \hfill% \includegraphics[height=.238\mylength, trim={0 .4cm 0 0}]{experiments/standardized_l1_bar_plot}% \llap{\raisebox{.232\mylength}{% \rlap{\small\bfseries\sffamily Sparse models}}% \hspace*{.34\linewidth}% } \caption{\textbf{Prediction accuracy: impact of the parameter-tuning strategy}. For each strategy, difference to the mean prediction accuracy in a given validation split. \label{fig:parameter_tuning}} \end{figure} \paragraph{Impact of parameter tuning on prediction accuracy} Cross-validation is often used to select regularization hyper-parameters, \emph{eg} to control the amount of sparsity. On figure \ref{fig:parameter_tuning}, we compare the various strategies: refitting with the best parameters selected by nested cross-validation, averaging the best models in the nested cross-validation, or simply using either the default value of C or a large one, given that tuning curves can plateau for large C. For non-sparse models, the figure shows that tuning the hyper-parameter by nested cross validation does not lead in general to better prediction performance than a default choice of hyper-parameter. Detailed investigations (figure \ref{fig:parameter_tuning_ext}) show that these conclusions hold well across all tasks, though refitting after nested cross-validation is beneficial for good prediction accuracies, \emph{ie} when there is either a large signal-to-noise ratio or many samples. For sparse models, the picture is slightly different. Indeed, high values of C lead to poor performance --presumably as the models are overly sparse--, while using default value $C=1$, refitting or averaging models tuned by cross-validation all perform well. Investigating how these compromises vary as a function of model accuracy (figure \ref{fig:parameter_tuning_ext}) reveals that for difficult decoding situations (low prediction) it is preferable to use the default $C=1$, while in good decoding situations, in is beneficial to tune C by nested cross-validation and rely on model averaging, which tends to perform well and displays less variance. \subsection{Results: stability of model weights} \label{sec:stability} \begin{figure}[!b] \setlength{\mylength}{20cm}% \includegraphics[height=.238\mylength, trim={0 .4cm 0 0}]{experiments/standardized_l2_weights_bar_plot}% \llap{\raisebox{.234\mylength}{% \rlap{\small\bfseries\sffamily Non-sparse models}}% \hspace*{.34\linewidth}% }% \hfill% \includegraphics[height=.238\mylength, trim={0 .4cm 0 0}]{experiments/standardized_l1_weights_bar_plot}% \llap{\raisebox{.234\mylength}{% \rlap{\small\bfseries\sffamily Sparse models}}% \hspace*{.34\linewidth}% } \caption{\textbf{Stability of the weights: impact of the parameter-tuning strategy}: for each strategy, difference to the mean stability of the model weights, where the stability is the correlation of the weights across validation splits. As the stability is a correlation, the unit is a different between correlation values. The reference is the mean stability across all models for a given prediction task. \label{fig:stability}} \end{figure} \begin{figure}[!b] \centerline{% \includegraphics[width=.78\linewidth, trim={0 0cm .1cm 0}]{experiments/standardized_summary_stability_tradeoff_differences}}% \caption{\textbf{Prediction -- stability tradeoff} The figure summarize figures \ref{fig:parameter_tuning} and \ref{fig:stability}, reporting the stability of the weights, relative to the split's average, as a function of the delta in prediction accuracy. It provides an overall summary, with errors bar giving the first and last quartiles (more detailed figures in \ref{sec:stability_prediction_appendix}) \label{fig:tradeoff}} \end{figure} \paragraph{Impact of parameter tuning on stability} The choice of regularization parameter also affects the stability of the weight maps of the classifier. Strongly regularized maps underfit, thus depending less on the train data, which may lead to increased stability. We measure stability of the decoder maps by computing their correlation across different choices of validation split for a given task. Figure \ref{fig:stability} summarizes the results on stability. For all models, sparse and non-sparse, model averaging does give more stable maps, followed by refitting after choosing parameters by nested cross-validation. Sparse models are much less stable than non-sparse ones \cite{varoquaux2012icml}. \paragraph{Prediction power -- stability tradeoff} The choice of decoder with the best predictive performance might not give the most stable weight maps, as seen by comparing figures \ref{fig:parameter_tuning} and \ref{fig:stability}. Figure \ref{fig:tradeoff} shows the prediction--stability tradeoff for different decoders and different parameter-tuning strategies. Overall, SVM and logistic-regression perform similarly and the dominant effect is that of the regularization: non-sparse, $\ell_2$-penalized, models are much more stable than sparse, $\ell_1$-penalized, models. For non-sparse models, averaging stands out as giving a large gain in stability albeit with a decrease of a couple of percent in prediction accuracy compared to using $C=1$ or $C=1000$, which gives good prediction and stability (figures \ref{fig:parameter_tuning} and \ref{fig:tradeoff}). With sparse models, averaging offers a slight edge for stability and, for SVM performs also well in prediction. $C=1000$ achieves low stability (figure \ref{fig:stability}), low prediction power (figure \ref{fig:parameter_tuning}), and a poor tradeoff. \ref{sec:stability_prediction_trends_appendix} shows trends on datasets where the prediction is easy or not. For non-sparse models, averaging brings a larger gain in stability when prediction accuracy is large. Conversely, for sparse models, it is more beneficial to average in case of poor prediction accuracy. Note that these experimental results are for common neuroimaging settings, with variance-normalization and univariate feature screening. \section{Discussion and conclusion: lessons learned} Decoding seeks to establish a predictive link between brain images and behavioral or phenotypical variables. Prediction is intrinsically a notion related to new data, and therefore it is hard to measure. Cross-validation is the tool of choice to assess performance of a decoder and to tune its parameters. The strength of cross-validation is that it relies on few assumptions and probes directly the ability to predict, unlike other model-selection procedures --\emph{eg} based on information theoretic or Bayesian criteria. However, it is limited by the small sample sizes typically available in neuroimaging\footnote{There is a trend in inter-subject analysis to acquire databases with a larger number of subjects, \emph{eg} ADNI, HCP. Conclusions of our empirical study might not readily transfer to these settings.}. \paragraph{An imprecise assessment of prediction} The imprecision on the estimation of decoder performance by cross-validation is often underestimated. Empirical confidence intervals of cross-validated accuracy measures typically extend more than 10 points up and down (figure \ref{fig:cv_error} and \ref{fig:cv_strategies}). Experiments on MRI (anatomical and functional), MEG, and simulations consistently exhibit these large error bars due to data scarcity. Such limitations should be kept in mind for many MVPA practices that use predictive power as a form of hypothesis testing --\emph{eg} searchlight \cite{kriegeskorte2006} or testing for generalization \cite{knops2009recruitment}-- and it is recommended to use permutation to define the null hypothesis \cite{kriegeskorte2006}. In addition, in the light of cross-validation variance, methods publications should use several datasets to validate a new model. \paragraph{Guidelines on cross-validation} Leave-one-out cross-validation should be avoided, as it yields more variable results. Leaving out blocks of correlated observations, rather than individual observations, is crucial for non-biased estimates. Relying on repeated random splits with 20\% of the data enables better estimates with less computation by increasing the number of cross-validations without shrinking the size of the test set. \paragraph{Parameter tuning} Selecting optimal parameters can improve prediction and change drastically the aspects of weight maps (Fig.\,\ref{fig:maps}). However, our empirical study shows that for variance-normalized neuroimaging data, non-sparse decoders ($\ell_2$-penalized) are only weakly sensitive to the choice of their parameter, particularly for the SVM. As a result, relying on the default value of the parameter often outperforms parameter tuning by nested cross-validation. Yet, such parameter tuning tends to improve the stability of the maps. For sparse decoders ($\ell_1$-penalized), default parameters also give good prediction performance. However, parameter tuning with model averaging increases stability and can lead to better prediction. Note that it is often useful to variance normalize the data (see \ref{sec:not_standardized}). \paragraph{Concluding remarks} Evaluating a decoder is hard. Cross-validation should not be considered as a silver bullet. Neither should prediction performance be the only metric. To assess decoding accuracy, best practice is to use repeated learning-testing with 20\% of the data left out, while keeping in mind the large variance of the procedure. Any parameter tuning should be performed in nested cross-validation, to limit optimistic biases. Given the variance that arises from small samples, the choice of decoders and their parameters should be guided by several datasets. Our extensive empirical validation (31 decoding tasks, with 8 datasets and almost 1\,000 validation splits with nested cross-validation) shows that sparse models, in particular $\ell_1$ SVM with model averaging, give better prediction but worst weight-maps stability than non-sparse classifiers. If stability of weight maps is important, non-sparse SVM with $C=1$ appears to be a good choice. Further work calls for empirical studies of decoder performance with more datasets, to reveal factors of the dataset that could guide better the choice of a decoder for a given task. \subsection*{Acknowledgments} This work was supported by the EU FP7/2007-2013 under grant agreement no. 604102 (HBP). Computing resource were provided by the NiConnect project (ANR-11-BINF-0004\_NiConnect) and an Amazon Webservices Research Grant. The authors would like to thank the developers of nilearn\footnote{\url{https://github.com/nilearn/nilearn/graphs/contributors}}, scikit-learn\footnote{\url{https://github.com/scikit-learn/scikit-learn/graphs/contributors}} and MNE-Python\footnote{\url{https://github.com/mne-tools/mne-python/graphs/contributors}} for continuous efforts in producing high-quality tools crucial for this work. In addition, we acknowledge useful feedback from Russ Poldrack on the manuscript. \small \bibliographystyle{model1b-num-names}
{'timestamp': '2016-11-08T02:12:30', 'yymm': '1606', 'arxiv_id': '1606.05201', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05201'}
arxiv
\section{Introduction} Cyber security has become a critical problem in industrial processes, since nowadays they incorporate information and communication technologies that are prone to cyber threats. Cyber attacks can disrupt the normal operation of services that are critical to the society as they can cause financial losses and environmental damages. It is thus essential to ensure cyber security of existing infrastructures and design new cyber-attack-resilient ones. Literature on cyber security points out cyber threats against industrial control systems utilized in many fields (see \cite{cardenas2008research} and the references therein). Vulnerabilities of the channels used for transmission of measurement and control data pose a critical issue for the security of control systems. This is because the channels are recently connected via the Internet or wireless communications \cite{fawzi2014,wholejournal2015}. Communication channels, for instance, may face jamming attacks initiated by malicious agents \cite{xu2005feasibility,pelechrinis2011}. Such attacks block the communication link and effectively prevent transmission of packets between the plant and the controller. It is mentioned in \cite{pelechrinis2011} that jamming attacks pose a major security threat, as they can be easily performed with devices that target various wireless communication protocols. In recent works \cite{amin2009,lee2013modeling,bhattacharya2013,HSF-SM:ct-13,depersis2014,de2015inputtran,liu2014stochastic,li2015jamming}, networked control problems under jamming attacks were investigated using control and/or game-theoretic methods. However, jamming may not be the only cause of malicious packet losses. Compromised routers in a network may also intentionally drop packets \cite{mizrak2009detecting,shu2015privacy}. The work \cite{d2013fault} explored the control problem over a multihop network with malicious nodes that intentionally stop forwarding packets or alter packet contents. In addition to actions of malicious agents, state measurement and control input packets may also fail to be transmitted at times due to network congestion or errors in communication. Stochastic models provide accurate characterization of such nonmalicious network issues \cite{khayam2003markov,altman2005}. In the literature, unreliability of a network is often characterized through random models for packet loss events \cite{schenato2007,hespanha2007}. For instance, in \cite{Xiong2007,ishii2009,Lemmon:2011:ASS:1967701.1967744}, Bernoulli processes are used for modeling packet losses in a network. Furthermore, in \cite{gupta2009,okano2014}, packet loss events are characterized in a more general way by employing Markov chains. In those studies, a variety of control methods are also proposed to ensure stability of networked control systems that face random packet losses. In this paper, we propose a stochastic representation of packet transmission failures in a network between a plant and a controller. Our proposed model is sufficiently general and allows us to explore some of the existing random and malicious packet loss scenarios in a unified manner. At the core of this characterization, we have a tail probability condition on the average number of state measurement and control input packet failures in the network. We demonstrate that random packet losses, malicious attacks, as well as the combination of those two phenomena satisfy the condition with different parameters. We model random losses by using a binary-valued \emph{time-inhomogeneous} Markov chain. Furthermore, to characterize malicious attacks, we use a model similar to the one in \cite{depersis2014}. Specifically, this model allows attacks to happen arbitrarily as long as the total number of packet exchange attempts that face malicious attacks are almost surely bounded by a certain ratio of the number of total packet exchange attempts between the plant and the controller. The almost sure bound used in our model in fact allows not only deterministic strategies but also stochasticity in the generation of malicious attacks. As a result, the model captures attacks that are generated based on randomly varying information such as state and control input or the random packet losses. Besides, an attacker may also intentionally use randomness to imitate packet losses that occur due to congestion or channel noise. Through our malicious attack model, we consider scenarios where the attacker targets the network only when the plant and the controller attempt to exchange packets. In a jamming attack scenario, our characterization, hence, can be considered as a model for \emph{reactive} jamming discussed in \cite{xu2005feasibility} for wireless networks. The classification in \cite{xu2005feasibility} divides attackers into two groups: \emph{active} and \emph{reactive} ones. An \emph{active} jamming attacker tries to block a communication channel regardless of whether the channel is being used or not, whereas a \emph{reactive} attacker continuously monitors the channel and attacks only when there is transmission. It is mentioned in \cite{xu2005feasibility} that it may be harder to detect a \emph{reactive} jamming attacker as packets may also be lost due to nonmalicious network issues and hence the reason for packet losses may not be known with certainty. A similar issue where packet losses occur due to both malicious and nonmalicious reasons exists also in the context of multihop networks. For instance \cite{shu2015privacy} investigates combined effects of malicious packet drops and nonmalicious channel errors. Motivated by the scenarios mentioned above, we utilize our probabilistic characterization also to investigate networks that are subject to the combination of random transmission errors due to unreliability of the channel and attacks conducted by malicious agents. In our analysis, we consider two cases: (i) when the attacks and random packet losses are modeled as independent processes and (ii) when the attack strategy is dependent on the random packet losses. The dependent case is essential to model the situation where the attacker has information of the random packet losses in the communication channel and utilizes this information in the attack strategy. Furthermore, we may also consider situations when the attacker decides to attack based on the content of packets. In the case of jamming attacks, this corresponds to selective jamming discussed in \cite{proano2010selective,proano2012packet}, where the intelligent jamming attacker listens to the communication channel and decides whether to interfere or not depending on the packet being transmitted. For example, a jamming attacker may decide not to interfere with the communication when the packet being transmitted is already corrupted by channel noise. Moreover, in a network of multiple nodes malicious ones may intentionally drop certain packets based on their content \cite{xiao2007chemas}. The main theoretical challenge in dealing with the combination of random packet losses and malicious attacks stems from the fact that these two phenomena are of different nature and hence have different models. By utilizing a tail probability inequality for the sum of processes that represent random packet losses and malicious attacks, we show that our proposed probabilistic characterization allows us to deal with both independent and dependent loss cases. By utilizing our probabilistic packet transmission model, we investigate the networked control problem of a linear plant through an event-triggered framework. Event-triggered control methods have recently been employed in many studies (see \cite{tabuada2007event,heemels2012cdc,liu2014survey} and the references therein). We follow the approach in \cite{velasco2009,heemels2013periodic} and utilize Lyapunov-like functions to determine the triggering times at which the plant and the controller attempt to exchange state and control input information. The triggering conditions that we propose ensure that the value of a Lyapunov-like function of the state stays within certain limits. Packet exchanges are attempted only before the value of the Lyapunov-like function is predicted to exceed the limit. In a successful packet exchange scenario, state measurements are sent from the plant to the controller, which computes a control input and sends it back to the plant. However, state measurement or control input packets may fail to be transmitted due to random packet losses and malicious attacks. Our packet failure characterization and control system analysis differ from those of the recent studies \cite{qu2015event,rabi2009scheduling,quevedo2014stochastic}, which also investigate the event-triggered control problem under packet losses. Specifically, in \cite{qu2015event}, the number of consecutive packet losses is assumed to be upper-bounded, and a deterministic Lyapunov function approach is used for the closed-loop stability analysis. Moreover, in \cite{rabi2009scheduling,quevedo2014stochastic} the packet losses are modeled by a Bernoulli process. The stability analysis in \cite{quevedo2014stochastic} is based on investigating the evolution of the expectation of a Lyapunov function. Despite the similarity to our malicious attack model, our stability analysis also differs from that of \cite{depersis2014}, where the analysis relies on a deterministic approach for obtaining an exponentially decreasing upper bound for the norm of the state. Our approach for stability analysis is related to obtaining an upper bound on the \emph{top Lyapunov exponent} (see \cite{fang1995stability,ezzine1997almost,bolzern2004almost}) of the system and in that sense it is more similar to the stability analysis conducted in \cite{kellett2005stability,Lemmon:2011:ASS:1967701.1967744} for networked systems without event-triggering. Specifically, we find a stochastic upper bound for a Lyapunov-like function and show that this stochastic upper bound tends to zero under certain conditions indicating \emph{almost sure asymptotic stability}. In addition to stability analysis, we also address the question of finding \emph{instability} conditions under which the state of the closed-loop system diverges almost surely. We observe that an attack strategy that causes sufficiently frequent packet losses can destabilize the closed-loop dynamics. This instability result allows us to investigate effects of potential malicious attacks on a networked control system. The rest of the paper is organized as follows. In Section~\ref{sec:Network-Control-Problem}, we describe the networked control problem under random and malicious packet losses. We present an event-triggered control framework and provide sufficient conditions for almost sure asymptotic stability of the closed-loop system in Section~\ref{sec:Event-Triggered-Control-Design}. In Section~IV, we look at the networked problem from the attacker's perspective and provide conditions for instability of the system. We present illustrative numerical examples in Section~\ref{sec:Numerical-Example}. Finally, in Section~VI, we conclude the paper. We note that part of the results in Sections~\ref{sec:Network-Control-Problem} and \ref{sec:Event-Triggered-Control-Design} appeared without proofs in our preliminary report \cite{ahmetcdc2015}. Here, we provide a more detailed discussion with complete proofs. We use a fairly standard notation in the paper. Specifically, we denote positive and nonnegative integers by $\mathbb{N}$ and $\mathbb{N}_{0}$, respectively. Moreover, $\|\cdot\|$ denotes the Euclidean vector norm and $\left\lfloor \cdot\right\rfloor $ denotes the largest integer that is less than or equal to its real argument. The notation $\mathrm{\mathbb{P}}[\cdot]$ denotes the probability on a probability space $(\Omega,\mathcal{F},\mathbb{P})$ with filtration $\{\mathcal{F}_{i}\}_{i\in\mathbb{N}_{0}}$ such that $\mathcal{F}_{i_{1}}\subset\mathcal{F}_{i_{2}}\subset\mathcal{F}$ for $i_{1},i_{2}\in\mathbb{N}_{0}$ with $i_{1}<i_{2}$. \section{Networked Control Problem and Characterization of Network with Random and Malicious Packet Losses \label{sec:Network-Control-Problem}} In this section we introduce the networked control problem and present a characterization for a network with random packet losses and those caused by malicious agents. \subsection{Networked Control System} Consider the linear dynamical system \begin{align} x(t+1) & =Ax(t)+Bu(t),\quad x(0)=x_{0},\quad t\in\mathbb{N}_{0},\label{eq:system} \end{align} where $x(t)\in\mathbb{R}^{n}$ and $u(t)\in\mathbb{R}^{m}$ denote the state and the control input, respectively; furthermore, $A\in\mathbb{R}^{n\times n}$ and $B^{n\times m}$ are the state and input matrices, respectively. In our networked control problem, the plant and the controller exchange information packets over a communication channel to achieve stabilization of the zero solution $x(t)\equiv0$. We consider the case where packets are transmitted without delay, but they may get lost. In a successful packet exchange scenario, at a certain time instant, measured plant states are transmitted to the controller, which generates a control input signal and sends it to the plant. The transmitted control input is applied at the plant side. In the case of an unsuccessful packet exchange attempt, either the measured state packet or the control input packet may get dropped, and in such cases control input at the plant side is set to $0$, which is a common approach in the literature (e.g., \cite{kellett2005stability,hespanha2007,gupta2009,okano2014}). In this setup, the plant is informed about a packet exchange failure by the lack of an incoming control input. Specific acknowledgement messages are thus not needed. This allows the practical implementation by using a UDP-like communication protocol discussed in \cite{schenato2007}. We use $\tau_{i}\in\mathbb{N}_{0},i\in\mathbb{N}_{0}$, (with $\tau_{i}<\tau_{i+1}$) to denote the time instants at which packet exchanges between the plant and the controller are attempted. In this paper, we consider both the case where packet exchanges are attempted at all time instants and the case where an event-triggering mechanism decides the successive packet exchange attempt times. In both cases, the control input $u(t)$ applied to the plant is given by \begin{align} u(t) & \triangleq\left(1-l(i)\right)Kx(\tau_{i}),\,t\in\{\tau_{i},\ldots,\tau_{i+1}-1\},\label{eq:control-input} \end{align} where $K\in\mathbb{R}^{m\times n}$ denotes the feedback gain and $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is a binary-valued process that characterizes success or failure of packet exchange attempts. When $l(i)=0$, the packet exchange attempt at time $\tau_{i}$ is successful and the piecewise-constant control input at the plant side is set to $u(\tau_{i})=Kx(\tau_{i})$. On the other hand, $l(i)=1$ indicates that either the packet sent from the plant or the packet sent from the controller is lost at time $\tau_{i}$. Again, in such situations, control input at the plant side is set to $0$. We emphasize that the framework described above allows us to deal with dropouts in both state and control input channels of the network illustrated in Fig.~\ref{operation}. In particular, the process $l(\cdot)$ is an \emph{overall} indicator of the packet exchange failures over these channels. \subsection{Network Characterization} Packet transmission failures in a network may have different reasons. In what follows we characterize the effects of certain stochastic and malicious packet loss models in a unified manner by exploring dynamical evolution of the total number of packet exchange failures. First, we define a nonnegative integer-valued process $\{L(k)\in\mathbb{N}_{0}\}_{k\in\mathbb{N}}$ by \begin{align} L(k) & \triangleq\sum_{i=0}^{k-1}l(i),\quad k\in\mathbb{N}.\label{eq:bigldefinition} \end{align} Note that $L(k)$ denotes the total number of \emph{failed} packet exchange attempts during the time interval $[0,\tau_{k-1}]$, where $k$ attempts have been made. In our packet loss model, we place a bound on the ratio of failed attempts in a probabilistic and asymptotic sense. \begin{assumption} \label{MainAssumption} There exists a scalar $\rho\in[0,1]$ such that \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[L(k)>\rho k] & <\infty.\label{eq:lcond1} \end{align} \end{assumption} The condition (\ref{eq:lcond1}) provides a probabilistic characterization of the evolution of the total number of packet exchange failures through the scalar $\rho\in[0,1]$, representing their average ratio. Note also that (\ref{eq:lcond1}) describes a condition on the tail probability $\mathbb{P}[L(k)>\rho k]=\mathbb{P}[\frac{L(k)}{k}>\rho]$ of loss ratio $\frac{L(k)}{k}$. This condition is sufficiently general and includes some of the existing packet loss models in the literature. We illustrate its generality by establishing that condition (\ref{eq:lcond1}) holds for four different cases: \begin{enumerate} \item random packet losses, \item malicious packet losses, \item combination of the two losses in 1) and 2) when they are independent, and finally \item combination but when they are dependent. \end{enumerate} Note that for any packet loss model, Assumption~\ref{MainAssumption} is trivially satisfied with $\rho=1$, since $\mathbb{P}[L(k)>k]=0$. On the other hand, as we see below, for certain random and malicious packet loss models, $\rho$ can be obtained to be strictly smaller than $1$. A closely related characterization for packet dropouts is presented in \cite{Lemmon:2011:ASS:1967701.1967744}; the scalar $\rho$ in (\ref{eq:lcond1}) corresponds to the notion of \emph{dropout rate} discussed there. \subsubsection{Random Packet Losses} \label{RemarkRandomPacketLoss} To characterize nonmalicious network issues such as packet drops due to network congestion or communication errors, we utilize time-inhomogeneous Markov chains. Specifically, let $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ be a time-inhomogeneous Markov chain adapted to filtration $\{\mathcal{F}_{i}\}_{i\in\mathbb{N}_{0}}$. Here, the $\sigma$-algebra $\mathcal{F}_{i}$ contains all random packet transmission success/failure events for the first $i+1$ packet exchange attempt times $\{\tau_{0},\tau_{1},\ldots,\tau_{i}\}.$ The Markov chain $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is characterized by initial distributions $\vartheta_{q}\in[0,1]$, $q\in\{0,1\}$, and time-varying transition probabilities $p_{q,r}\colon\mathbb{N}_{0}\to[0,1]$, $q,r\in\{0,1\}$, such that \begin{align} \begin{array}{c} \mathbb{P}[l_{\mathrm{R}}(0)=q]=\vartheta_{q},\\ \mathbb{P}[l_{\mathrm{R}}(i+1)=r|l_{\mathrm{R}}(i)=q]=p_{q,r}(i),\quad i\in\mathbb{N}_{0}. \end{array}\label{eq:markov-chain-def} \end{align} The state $l_{\mathrm{R}}(i)=1$ indicates that the network faces random packet losses at time $\tau_{i}$, and hence the packet exchange attempt at $\tau_{i}$ results in failure. Here, success/failure of a packet exchange attempt depends on the states of the previous packet exchange attempts. Furthermore, transition probabilities between success ($l_{\mathrm{R}}(i)=0$) and failure ($l_{\mathrm{R}}(i)=1$) states are time-dependent. It is important to note that the time-inhomogeneous Markov chain characterization with time-varying transition probabilities allows us to take into account the variation in the network between consecutive packet transmission instants. Furthermore, this characterization generalizes the Bernoulli and \emph{time-homogeneous} Markov chain models that are often used in the literature. In what follows we show that Assumption~\ref{MainAssumption} is satisfied when the network faces random packet losses described by \emph{time-inhomogeneous }Markov chains. In characterization of the scalar $\rho$ used in Assumption~\ref{MainAssumption} we use upper-bounds for transmission failure and success probabilities denoted respectively by $p_{1}\in[0,1]$ and $p_{0}\in[0,1]$ such that \begin{align} p_{q,1}(i) & \leq p_{1},\label{eq:p1condition-1}\\ p_{q,0}(i) & \leq p_{0},\quad q\in\{0,1\},\quad i\in\mathbb{N}_{0}.\label{eq:p0condition-1} \end{align} Note that even though $p_{q,r}(i)$ provide precise information about the transitions between the states of random packet losses, this information cannot be utilized when the network faces the combination of malicious attacks and random packet losses (discussed in Sections~\ref{RemarkCombinedIndependent} and \ref{RemarkCombinedDependent}). In such cases, information about the probability of malicious attacks for each transmission attempt is not available, and as a result, transition probabilities $p_{q,r}(i)$ for random packet losses cannot be utilized to obtain the overall packet exchange failure probabilities. On the other hand, we can employ the upper-bounds $p_{1}$ and $p_{0}$ when we show that the overall packet exchange failures satisfy Assumption~\ref{MainAssumption}. \begin{lemma} \label{Lemma-Random-Loss} For the time-inhomogeneous process $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with transmission failure probability upper-bound $p_{1}\in(0,1)$ that satisfy (\ref{eq:p1condition-1}), we have \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)>\rho_{\mathrm{R}}k] & <\infty,\label{eq:random-loss-satisfies-assumption} \end{align} for all $\rho_{\mathrm{R}}\in(p_{1},1)$. \end{lemma} \begin{IEEEproof} We use Lemma~\ref{KeyMarkovLemma} in the Appendix to prove this result. Specifically, let $\tilde{p}=p_{1}$, $\tilde{w}=1$, and define the processes $\{\xi(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ and $\{\chi(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with $\xi(i)=l_{\mathrm{R}}(i)$ and $\chi(i)=1$, $i\in\mathbb{N}_{0}$. Since the conditions in (\ref{eq:xicond}) and (\ref{eq:chicond}) are satisfied, it follows from Lemma~\ref{KeyMarkovLemma} that $\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)>\rho_{\mathrm{R}}k]\leq\psi_{k}$, where $\psi_{k}\triangleq\phi^{-\rho_{\mathrm{R}}k+1}\frac{\left((\phi_{1}-1)p_{1}+1\right)^{k}-1}{(\phi-1)p_{1}}$ with $\phi\triangleq\frac{\rho_{\mathrm{R}}(1-p_{1})}{p_{1}(1-\rho_{\mathrm{R}})}$, and $\sum_{k=1}^{\infty}\psi_{k}<\infty$, which implies (\ref{eq:random-loss-satisfies-assumption}). \end{IEEEproof} Lemma~\ref{Lemma-Random-Loss} indicates that when packet exchange failures occur due to random packet losses (i.e., $l(i)=l_{\mathrm{R}}(i)$), Assumption~\ref{MainAssumption} holds for all $\rho\in(p_{1},1)$. \subsubsection{Packet Losses Due to Malicious Activity} \label{RemarkJammingAttacks} Packet transmissions in a channel may get interrupted due to malicious activities. For example, a compromised router in a network may deny to forward incoming packets. In addition, packet losses may also be caused by jamming attacks. A model for the attack strategy of a malicious agent has been proposed in \cite{depersis2014}. In that study, the sum of the length of attack durations is assumed to be bounded by a certain ratio of total time. By following the approach of \cite{depersis2014}, let $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ denote the state of attacks. The state $l_{\mathrm{M}}(i)=1$ indicates that the packet transmission faces an attack at time $\tau_{i}$. We consider the case where the number of packet exchange attempts that face attacks are upper bounded almost surely by a certain ratio of the total number of packet exchange attempts, that is, $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ satisfies \begin{align} \mathbb{P}\big[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)\leq\kappa+\frac{k}{\tau}\big]=1,\quad k\in\mathbb{N},\label{eq:jammingcondition} \end{align} where $\kappa\ge0$ and $\tau>1$. In this characterization, among $k$ packet exchange attempts, at most $\kappa+\frac{k}{\tau}$ of them are affected by attacks. Note that when $\kappa=0$, (\ref{eq:jammingcondition}) implies no attack in the beginning: $l_{\mathrm{M}}(i)=0$, $i\in\{0,\ldots,\lfloor\tau\rfloor\}$, almost surely. Scenarios that involve possible attacks during the first few packet exchange attempts can be modeled by setting $\kappa>0$. In what follows, we would like to highlight the relations of the malicious packet loss model in (\ref{eq:jammingcondition}) to those in the literature. First, since the attacks only happen at packet exchange attempt instants, the characterization in (\ref{eq:jammingcondition}) can be considered as a \emph{reactive jamming} model \cite{xu2005feasibility}, where the attacker attacks the channel only when there is a packet being transmitted. To avoid being detected, an attacker may refrain from causing all packets to be lost. The ratio $\frac{1}{\tau}$ in (\ref{eq:jammingcondition}) characterizes the average portion of the packet transmission attempts that face attacks. Furthermore, in the case of jamming attacks, in addition to avoid being detected, the attacker may also need to take into account the energy requirements of jamming. The ratio $\frac{1}{\tau}$ in this case corresponds to the notion \emph{jamming rate} discussed in \cite{anantharamu2011}, and it is related to the energy usage of the jammer. \begin{remark}A packet loss model that may be used to capture behavior of an intelligent attacker is also discussed in \cite{Xiong2007}, where transmissions between the plant and the controller are attempted at all time instants and the proposed model allows packet losses to occur arbitrarily as long as the lengths of intervals between consecutive successful packet transmissions are not more than a given fixed length. A similar model has also been used in \cite{qu2015event}, where an event-triggered control method is used and the number of consecutive packet losses is assumed to be upper-bounded by a constant. Note that the packet loss model discussed in \cite{Xiong2007,qu2015event} can be described within the framework provided by (\ref{eq:jammingcondition}) through setting $\tau=\frac{s+1}{s}$, where $s\geq1$ denotes the upper-bound on the number of consecutive packet losses. Under this setting, the condition (\ref{eq:jammingcondition}) provides more freedom to the attacker as it does not necessarily require lengths of intervals between consecutive successful packet transmission times to be upper-bounded by a fixed constant. In fact for any $\tau>1$, (\ref{eq:jammingcondition}) allows the attacker to cause any number of consecutive packet losses after waiting sufficiently long without attacking. Notice that the number of consecutive packet losses is not restricted to be bounded also in the case of random packet loss models (see Section~\ref{RemarkRandomPacketLoss}, as well as \cite{hespanha2007,gupta2009,quevedo2012}). \end{remark} As pointed out in \cite{depersis2014}, the condition (\ref{eq:jammingcondition}) also shares some similarities with the socalled average dwell time condition \cite{hespanha1999stability} utilized in switched systems. In switched systems, the average dwell time condition requires the number $N(k_{2},k_{1})$ of switches in between times $k_{1}$ and $k_{2}\geq k_{1}$ to satisfy \begin{align} N(k_{2},k_{1}) & \leq\kappa+\frac{k_{2}-k_{1}}{\tau},\quad k_{2}\geq k_{1}\geq0,\label{eq:average-dwell-time-condition} \end{align} where $\tau>0$ denotes the average dwell time. The inequality (\ref{eq:average-dwell-time-condition}) guarantees that the switches occur slowly on average. In this study, we do not require a condition on the number of switches between packet exchange success and failure states. Rather than that we utilize (\ref{eq:jammingcondition}), which is a condition on the total number of packet exchange failures due to attacks. The condition (\ref{eq:jammingcondition}) guarantees that attacks happen rarely on average. Note also that when $N(k_{2},k_{1})$ is defined to denote the number of packet exchange failures due to attacks over all packet exchange attempts at times $\tau_{k_{1}},\tau_{k_{1}+1},\ldots,\tau_{k_{2}-1}$, (\ref{eq:average-dwell-time-condition}) implies (\ref{eq:jammingcondition}). Specifically, (\ref{eq:average-dwell-time-condition}) reduces to (\ref{eq:jammingcondition}) by setting $N(k_{2},k_{1})\triangleq\sum_{i=k_{1}}^{k_{2}-1}l_{\mathrm{M}}(i)$, $k_{1}=0$, and $k_{2}=k$. As we have observed so far, the attack model in (\ref{eq:jammingcondition}) is sufficiently general to cover known models. We further generalize it, because even though the model in (\ref{eq:jammingcondition}) allows stochasticity in the generation of $l_{\mathrm{M}}(\cdot)$, it is not enough to characterize certain stochastic attacks. An example is the case where each packet exchange attempt faces an attack with a fixed probability (e.g., $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is a Bernoulli process). To cover such stochastic attacks as well as attacks characterized in (\ref{eq:jammingcondition}), we consider a model where $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is given through conditions similar to (\ref{eq:lcond1}). Specifically, we assume that there exists a scalar $\rho_{\mathrm{M}}\in[0,1]$ such that \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{\mathrm{M}}k] & <\infty.\label{eq:general-attack-condition} \end{align} The following lemma shows that the characterization with (\ref{eq:general-attack-condition}) is more general than the one provided by (\ref{eq:jammingcondition}). \begin{lemma} \label{JammingLemma} Suppose the binary-valued process $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ satisfies (\ref{eq:jammingcondition}) with $\kappa\ge0$ and $\tau>1$. Then (\ref{eq:general-attack-condition}) holds for all $\rho_{\mathrm{M}}\in(\frac{1}{\tau},1)$. \end{lemma} \begin{IEEEproof}Using Markov's inequality we obtain \begin{align} & \mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{\mathrm{M}}k]\leq\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)\geq\rho_{\mathrm{M}}k]\nonumber \\ & \quad=\mathbb{P}[e^{\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)}\geq e^{\rho_{\mathrm{M}}k}]\leq e^{-\rho_{\mathrm{M}}k}\mathbb{E}[e^{\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)}]\label{eq:markovsineqforattack} \end{align} for $k\in\mathbb{N}$. By (\ref{eq:jammingcondition}), we have $\mathbb{E}[e^{\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)}]\leq\mathbb{E}[e^{\kappa+\frac{k}{\tau}}]=e^{\kappa+\frac{k}{\tau}}$. Therefore, it follows from (\ref{eq:markovsineqforattack}) that $\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{\mathrm{M}}k]\leq e^{\kappa-(\rho_{\mathrm{M}}-\frac{1}{\tau})k},$ $k\in\mathbb{N}$. Thus, for all $\rho_{\mathrm{M}}\in(\frac{1}{\tau},1)$, \begin{align*} & \sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{\mathrm{M}}k]\leq\sum_{k=1}^{\infty}e^{\kappa-(\rho_{\mathrm{M}}-\frac{1}{\tau})k}\\ & \quad=e^{\kappa}e^{-(\rho_{\mathrm{M}}-\frac{1}{\tau})}\left(1-e^{-(\rho_{\mathrm{M}}-\frac{1}{\tau})}\right)^{-1}<\infty, \end{align*} which completes the proof. \end{IEEEproof} Thus, if the only cause of packet losses is attacks (i.e., $l(i)=l_{\mathrm{M}}(i)$), then Assumption~\ref{MainAssumption} holds with $\rho=\rho_{\mathrm{M}}$. \subsubsection{Combination of Random and Malicious Packet Losses (independent case)} \label{RemarkCombinedIndependent} In order to model the case where the network is subject to both random and malicious packet losses, we define $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ by \begin{align} l(i) & =\begin{cases} 1,\quad & l_{\mathrm{R}}(i)=1\,\,\mathrm{or}\,\,l_{\mathrm{M}}(i)=1,\\ 0,\quad & \mathrm{otherwise}, \end{cases}\,\,\,i\in\mathbb{N}_{0},\label{eq:ldefinitionforcombinedcase} \end{align} where $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is a time-inhomogeneous Markov chain given in (\ref{eq:markov-chain-def}) characterizing random packet losses (from Section~\ref{RemarkRandomPacketLoss}) and $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ satisfying (\ref{eq:general-attack-condition}) is a binary-valued process that represents attacks of a malicious agent (from Section~\ref{RemarkJammingAttacks}). Proposition~\ref{PropositionCombinedCase} below provides a range of values for $\rho\in(0,1)$ that satisfy Assumption~\ref{MainAssumption} in the case where the network faces both random and malicious packet losses. \begin{proposition} \label{PropositionCombinedCase} Consider the packet exchange failure indicator process $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ given by (\ref{eq:ldefinitionforcombinedcase}) where $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ and $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ are mutually independent. Assume \begin{align} p_{1}+p_{0}\rho_{\mathrm{M}} & <1,\label{eq:propositioncondition1} \end{align} where $p_{1},p_{0}\in(0,1)$ are scalars that satisfy (\ref{eq:p1condition-1}), (\ref{eq:p0condition-1}). Then (\ref{eq:lcond1}) holds for all $\rho\in(p_{1}+p_{0}\rho_{\mathrm{M}},1)$. \end{proposition} \begin{IEEEproof} From (\ref{eq:ldefinitionforcombinedcase}), the overall loss process can be given by \begin{align*} l(i) & =l_{\mathrm{R}}(i)+(1-l_{\mathrm{R}}(i))l_{\mathrm{M}}(i),\quad i\in\mathbb{N}_{0}, \end{align*} and hence, by (\ref{eq:bigldefinition}), \begin{align} L(k) & =\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)+\sum_{i=0}^{k-1}(1-l_{\mathrm{R}}(i))l_{\mathrm{M}}(i),\quad k\in\mathbb{N}.\label{eq:Linusefulform} \end{align} Now, let $\epsilon\triangleq\rho-p_{1}-p_{0}\rho_{\mathrm{M}}$, $\epsilon_{2}\triangleq\min\{\frac{\epsilon}{2},\frac{\rho_{\mathrm{M}}-p_{0}\rho_{\mathrm{M}}}{2}\}$, $\epsilon_{1}\triangleq\epsilon-\epsilon_{2}$, and define $\rho_{1}\triangleq p_{1}+\epsilon_{1}$, $\rho_{2}\triangleq p_{0}\rho_{\mathrm{M}}+\epsilon_{2}$. Furthermore, let $L_{1}(k)\triangleq\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)$ and $L_{2}(k)\triangleq\sum_{i=0}^{k-1}(1-l_{\mathrm{R}}(i))l_{\mathrm{M}}(i)$. We then have \begin{align} \mathbb{P}[L(k)>\rho k] & =\mathbb{P}[L_{1}(k)+L_{2}(k)>\rho_{1}k+\rho_{2}k]\nonumber \\ & \leq\mathbb{P}[\left\{ L_{1}(k)>\rho_{1}k\right\} \cup\left\{ L_{2}(k)>\rho_{2}k\right\} ]\nonumber \\ & \leq\mathbb{P}[L_{1}(k)>\rho_{1}k]+\mathbb{P}[L_{2}(k)>\rho_{2}k].\label{eq:keyprobabilityinequality} \end{align} In the following we will show that the series $\sum_{k=1}^{\infty}\mathbb{P}[L_{1}(k)>\rho_{1}k]$ and $\sum_{k=1}^{\infty}\mathbb{P}[L_{2}(k)>\rho_{2}k]$ are convergent. First, note that \begin{align} \rho_{1} & =p_{1}+\epsilon-\epsilon_{2}=\max\{p_{1}+\frac{\epsilon}{2},p_{1}+\epsilon-\frac{\rho_{\mathrm{M}}-p_{0}\rho_{\mathrm{M}}}{2}\}\nonumber \\ & =\max\{\frac{p_{1}+\rho-p_{0}\rho_{\mathrm{M}}}{2},\rho-p_{0}\rho_{\mathrm{M}}-\frac{\rho_{\mathrm{M}}-p_{0}\rho_{\mathrm{M}}}{2}\}\nonumber \\ & =\max\{\frac{p_{1}+\rho-p_{0}\rho_{\mathrm{M}}}{2},\frac{2\rho-\rho_{\mathrm{M}}(1+p_{0})}{2}\}.\label{eq:rho1ineq} \end{align} As $\frac{p_{1}+\rho-p_{0}\rho_{\mathrm{M}}}{2}<1$ and $\frac{2\rho-\rho_{\mathrm{M}}(1+p_{0})}{2}<1$, it holds from (\ref{eq:rho1ineq}) that $\rho_{1}\in(p_{1},1)$. Consequently, $\sum_{k=1}^{\infty}\mathbb{P}[L_{1}(k)>\rho_{1}k]<\infty$ follows from Lemma~\ref{Lemma-Random-Loss} with $\rho_{\mathrm{R}}$ replaced with $\rho_{1}$. Next, we will use Lemma~\ref{KeyMarkovLemma} to show that $\sum_{k=1}^{\infty}\mathbb{P}[L_{2}(k)>\rho_{2}k]<\infty$. To obtain this result, we first observe that $\rho_{2}>p_{0}\rho_{\mathrm{M}}$, since $\epsilon_{2}>0$. Moreover, \begin{align*} \rho_{2} & =p_{0}\rho_{\mathrm{M}}+\min\{\frac{\epsilon}{2},\frac{\rho_{\mathrm{M}}-p_{0}\rho_{\mathrm{M}}}{2}\}\leq p_{0}\rho_{\mathrm{M}}+\frac{\rho_{\mathrm{M}}-p_{0}\rho_{\mathrm{M}}}{2}\\ & <p_{0}\rho_{\mathrm{M}}+\rho_{\mathrm{M}}-p_{0}\rho_{\mathrm{M}}=\rho_{\mathrm{M}}, \end{align*} and hence, we have $\rho_{2}\in(p_{0}\rho_{\mathrm{M}},\rho_{\mathrm{M}})$. As a consequence of (\ref{eq:jammingcondition}), conditions (\ref{eq:xicond}), (\ref{eq:chicond}) in the Lemma~\ref{KeyMarkovLemma} hold with $\tilde{p}=p_{0}$ and $\tilde{w}=\rho_{\mathrm{M}}$, together with processes $\{\xi(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ and $\{\chi(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ defined by setting $\xi(i)=1-l_{\mathrm{R}}(i)$, $\chi(i)=l_{\mathrm{M}}(i)$, $i\in\mathbb{N}_{0}$. Now, we have $L_{2}(k)=\sum_{i=0}^{k-1}\xi(i)\chi(i)$ and hence, Lemma~\ref{KeyMarkovLemma} implies $\sum_{k=1}^{\infty}\mathbb{P}[L_{2}(k)>\rho_{2}k]<\infty$. Finally, by (\ref{eq:keyprobabilityinequality}), we arrive at \begin{align*} & \sum_{k=1}^{\infty}\mathbb{P}[L(k)>\rho k]\\ & \quad\leq\sum_{k=1}^{\infty}\mathbb{P}[L_{1}(k)>\rho_{1}k]+\sum_{k=1}^{\infty}\mathbb{P}[L_{2}(k)>\rho_{2}k]<\infty, \end{align*} which completes the proof. \end{IEEEproof} \subsubsection{Combination of Random and Malicious Packet Losses (dependent case)} \label{RemarkCombinedDependent} So far, in Proposition~\ref{PropositionCombinedCase}, we assumed that packet exchange attempt failures due to attacks are independent of those due to random packet losses. Next, we consider the case where the two processes $\{l_{\mathrm{R}}(i)\}_{i\in\mathbb{N}_{0}}$ and $\{l_{\mathrm{M}}(i)\}_{i\in\mathbb{N}_{0}}$ may be dependent. This is clearly the case when the attacker has information of the random packet losses in the channel. Furthermore, as we discussed in the Introduction, the attacker may decide to attack based on the content of packets. In such cases $l_{\mathrm{M}}(\cdot)$ would depend on state and control input, which in turn depend on $l_{\mathrm{R}}(\cdot)$. Proposition~\ref{PropositionDependentCombinedCase} below deals with such cases. \begin{proposition} \label{PropositionDependentCombinedCase} Consider the packet exchange failure indicator process $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$. Assume \begin{align} p_{1}+\rho_{\mathrm{M}} & <1,\label{eq:prop25cond} \end{align} where $p_{1}\in(0,1)$ is a scalar that satisfies (\ref{eq:p1condition-1}). Then (\ref{eq:lcond1}) holds for all $\rho\in(p_{1}+\rho_{\mathrm{M}},1)$. \end{proposition} \begin{IEEEproof}It follows from (\ref{eq:ldefinitionforcombinedcase}) that \begin{align*} L(k) & \leq\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)+\sum_{i=0}^{k-1}l_{\mathrm{M}}(i),\quad k\in\mathbb{N}. \end{align*} Now, using arguments similar to the ones used for obtaining (\ref{eq:keyprobabilityinequality}) in the proof of Proposition~\ref{PropositionCombinedCase}, we have \begin{align} & \mathbb{P}[L(k)>\rho k]\leq\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)+\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho k]\nonumber \\ & \,\,\leq\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)>\rho_{1}k]+\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{2}k],\,\,k\in\mathbb{N},\label{eq:separatedprobabilityterms} \end{align} and consequently \begin{align} & \sum_{k=1}^{\infty}\mathbb{P}[L(k)>\rho k]\nonumber \\ & \,\,\leq\sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{R}}(i)>\rho_{1}k]+\sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{2}k],\label{eq:sum-inequality-for-r-and-m} \end{align} where $\rho_{1}\triangleq p_{1}+\frac{\epsilon}{2}$, $\rho_{2}\triangleq\rho_{\mathrm{M}}+\frac{\epsilon}{2}$, and $\epsilon\triangleq\rho-p_{1}-\rho_{\mathrm{M}}$. Observe that $\rho_{1}=p_{1}+\frac{\rho-p_{1}-\rho_{\mathrm{M}}}{2}=\frac{\rho+p_{1}-\rho_{\mathrm{M}}}{2}.$ Since $\frac{\rho+p_{1}-\rho_{\mathrm{M}}}{2}<1$ and $\epsilon>0$, we have $\rho_{1}\in(p_{1},1)$. By using Lemma~\ref{Lemma-Random-Loss} with $\rho_{\mathrm{R}}=\rho_{1}$, we obtain \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[L_{1}(k) & >\rho_{1}k]<\infty.\label{eq:first-sum-r} \end{align} Furthermore, note that $\rho_{2}=\rho_{\mathrm{M}}+\frac{\rho-p_{1}-\rho_{\mathrm{M}}}{2}=\frac{\rho+\rho_{\mathrm{M}}-p_{1}}{2}.$ Also, by $\frac{\rho+\rho_{\mathrm{M}}-p_{1}}{2}<1$ and $\epsilon>0$, we have $\rho_{2}\in(\rho_{\mathrm{M}},1)$. Since $\rho_{2}>\rho_{\mathrm{M}}$, by the characterization of $\{l_{\mathrm{M}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$, \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{2}k] & \leq\sum_{k=1}^{\infty}\mathbb{P}[\sum_{i=0}^{k-1}l_{\mathrm{M}}(i)>\rho_{\mathrm{M}}k]<\infty.\label{eq:second-sum-m} \end{align} The result then follows from (\ref{eq:sum-inequality-for-r-and-m})--(\ref{eq:second-sum-m}). \end{IEEEproof} In comparison with Proposition~\ref{PropositionCombinedCase}, the result above provides a more restricted range of values for $\rho$ that satisfies Assumption~\ref{MainAssumption}. This is because in Proposition~\ref{PropositionDependentCombinedCase} we find $\rho$ for the worst case scenario where the attacker may be knowledgeable about all random packet losses in the network and may have access to the information of the transmitted state and control input vectors. An example scenario is where the attacker avoids placing malicious attacks when there is already a random packet loss, increasing the total number of packet exchange failures, which is clearly to the disadvantage of the controller to maintain closed-loop stability. We note that the condition (\ref{eq:prop25cond}) guarantees that the range $\rho\in(p_{1}+\rho_{\mathrm{M}},1)$ identified in Proposition~\ref{PropositionDependentCombinedCase} is well defined. If $p_{1}+\rho_{M}\geq1$, then Assumption~\ref{MainAssumption} holds with $\rho=1$. We also note that Proposition~\ref{PropositionDependentCombinedCase} may introduce some conservativeness when it is applied to other scenarios where malicious attacks and random packet losses are dependent, but not as in the worst case scenario mentioned above. In such cases additional information about the malicious attacks and random packet losses may be employed to show that Assumption~\ref{MainAssumption} holds with $\rho<1$ even if $p_{1}+\rho_{\mathrm{M}}\geq1$. \begin{remark} There may be situations where the attacker has limited knowledge. For instance, the attacker may have access only to certain entries of the state and control input vectors. This situation arises in a multi-hop network with multiple paths (see, e.g., \cite{d2013fault,smarra2015}); different parts of the state and control input vectors may be sent over different paths on the network and the attacker may have access to the data only on some of those paths. In this case the attacker would need an estimation mechanism to have information about the state/control input vectors. Note that the operator may also utilize encryption methods to prevent the attacker gain any information about the system behavior. In the situations where the attacker is not knowledgeable about the random packet losses and has no information of state and control input vectors, Proposition~\ref{PropositionCombinedCase} can be used. \end{remark} \section{Event-Triggered Control Design \label{sec:Event-Triggered-Control-Design}} In this section we investigate event-triggered control of (\ref{eq:system}) over an unreliable and potentially attacked network characterized through Assumption~\ref{MainAssumption}. As a first step, we introduce the event-triggering scheme for communication between the plant and the controller. This scheme will determine the time instants $\tau_{i}\in\mathbb{N}_{0}$, $i\in\mathbb{N}_{0}$, at which packet exchanges are attempted. For this purpose, we utilize the quadratic Lyapunov-like function $V\colon\mathbb{R}^{n}\to[0,\infty)$ given by $V(x)\triangleq x^{\mathrm{T}}Px$, where $P>0$. Letting $\tau_{0}=0$, we describe $\tau_{i}$, $i\in\mathbb{N}$, by \begin{align} \tau_{i+1} & \triangleq\min\Big\{ t\in\{\tau_{i}+1,\tau_{i}+2,\ldots\}\colon t\geq\tau_{i}+\theta\nonumber \\ & \quad\quad\quad\mathrm{or}\,\,\,V(Ax(t)+Bu(\tau_{i}))>\beta V(x(\tau_{i}))\Big\},\label{eq:attemptedpacketexchangetimes} \end{align} where $\beta\in(0,1)$, $\theta\in\mathbb{N}$. The triggering condition (\ref{eq:attemptedpacketexchangetimes}) involves two parts. The part $V(Ax(t)+Bu(\tau_{i}))>\beta V(x(\tau_{i}))$ ensures that after a successful packet exchange attempt at $\tau_{i}$, the value of $V(\cdot)$ stays below the level $\beta V(x(\tau_{i}))$ until the next packet exchange attempt. Furthermore, the triggering condition $t\geq\tau_{i}+\theta$ ensures that two consecutive packet exchange attempt instants are at most $\theta\in\mathbb{N}$ steps apart, that is, $\tau_{i+1}-\tau_{i}\leq\theta$, $i\in\mathbb{N}_{0}$. Although the specific value of $\theta$ does not affect the results developed below, the boundedness of packet exchange attempt intervals guarantees that $\tau_{i}$ (and hence $V(x(\tau_{i}))$) is well-defined for each $i\in\mathbb{N}$. In practice, the value of $\theta$ can be selected considering how frequent the plant state is desired to be monitored by the controller side. \begin{figure} \centering \includegraphics[width=0.95\columnwidth]{newdiscreteoperationnewlegend2} \caption{{[}Top{]} Networked control system with successful (left) and failed (right) packet transmissions. \newline {[}Bottom{]} Response of the Lyapunov-like function.} \vskip -10pt \label{operation} \end{figure} The operation of the event-triggered networked control system is illustrated in Fig.~\ref{operation}. The triggering condition (\ref{eq:attemptedpacketexchangetimes}) is checked at the plant side at each step $t\in\mathbb{N}_{0}$. At times $t=\tau_{i}$, $i\in\mathbb{N}$, the triggering condition is satisfied and packet exchanges are attempted. In this example, a packet exchange is attempted at time $t=\tau_{1}$, since $V(Ax(t)+Bu(\tau_{0}))>\beta V(x(\tau_{0}))$. At this time instant, the plant and the controller successfully exchange state and control input packets over the network, and as a result, control input on the plant side is updated to $Kx(\tau_{1})$. Note that packet exchange attempts are not always successful, and may fail due to loss of packets in the network. In the figure, the packet exchange attempt at time $\tau_{2}$ fails. In this case, it follows from (\ref{eq:control-input}) with $l(2)=1$ that the control input at the plant side is set to $0$ at time $\tau_{2}$, which results in an unstable behavior. A packet exchange is attempted again at the very next time step $\tau_{3}$, since the triggering condition is also satisfied at that time instant. \subsection{Stability Analysis} Next, we investigate stability of the closed-loop event-triggered networked control system (\ref{eq:system}), (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}), which is a stochastic dynamical system due to the probabilistic characterization of packet losses. Below we define almost sure asymptotic stability for stochastic dynamical systems. \begin{definition}The zero solution $x(t)\equiv0$ of the stochastic system (\ref{eq:system}), (\ref{eq:control-input}), and (\ref{eq:attemptedpacketexchangetimes}) is \emph{almost surely stable} if, for all $\epsilon>0$ and $\bar{p}>0$, there exists $\delta=\delta(\epsilon,\bar{p})>0$ such that if $\|x(0)\|<\delta$, then \begin{align} \mathbb{P}[\sup_{t\in\mathbb{N}_{0}}\|x(t)\|>\epsilon] & <\bar{p}.\label{eq:almost-sure-stability} \end{align} Moreover, the zero solution $x(t)\equiv0$ is \emph{asymptotically stable almost surely} if it is almost surely stable and \begin{align} \mathbb{P}[\lim_{t\to\infty}\|x(t)\|=0] & =1.\label{eq:definition-convergence} \end{align} \end{definition} In our stability analysis for the networked control system (\ref{eq:system}), (\ref{eq:control-input}), we utilize an upper bound for the long run average of the total number of failed packet exchanges. The following result is a direct consequence of the Borel-Cantelli lemma (see \cite{klenke2008}) and shows that under Assumption~\ref{MainAssumption}, the long run average of the total number of failed packet exchanges is upper bounded by $\rho$ characterized in (\ref{eq:lcond1}). \begin{lemma} \label{key-lemma1} If there exists a scalar $\rho\in[0,1]$ such that (\ref{eq:lcond1}) holds, then \begin{align} \limsup_{k\to\infty}\frac{L(k)}{k} & \leq\rho,\label{eq:long-run-average-bound} \end{align} almost surely. \end{lemma} In Propositions~\ref{PropositionCombinedCase} and \ref{PropositionDependentCombinedCase}, we obtained a range of values for $\rho$ that satisfy (\ref{eq:lcond1}). In those results the range was given as an open interval. In the following result we show that when Assumption~\ref{MainAssumption} holds for a range of values, then (\ref{eq:long-run-average-bound}) also holds with $\rho$ given as the infimum of the range. \begin{lemma} \label{Lemma-underbar-rho} Suppose (\ref{eq:lcond1}) is satisfied for all $\rho\in(\underline{\rho},1)$ where $\underline{\rho}\in[0,1)$. Then (\ref{eq:long-run-average-bound}) holds with $\rho=\underline{\rho}$, almost surely. \end{lemma} \begin{IEEEproof}The proof resembles the sufficiency part of the proof of Proposition 5.6 in \cite{karrprobabilitybook}. First, by Lemma~\ref{key-lemma1}, \begin{align} \mathbb{P}[\limsup_{k\to\infty}\frac{L(k)}{k}-\underline{\rho}>\epsilon] & =0,\label{eq:lemma-epsilon-version} \end{align} for any $\epsilon>0$. Now, it follows from (\ref{eq:lemma-epsilon-version}) that \begin{align*} & \mathbb{P}[\limsup_{k\to\infty}\frac{L(k)}{k}-\underline{\rho}>0]=\mathbb{P}[\cup_{j=1}^{\infty}\{\limsup_{k\to\infty}\frac{L(k)}{k}-\underline{\rho}>\frac{1}{j}\}]\\ & \quad\quad\leq\sum_{j=1}^{\infty}\mathbb{P}[\limsup_{k\to\infty}\frac{L(k)}{k}-\underline{\rho}>\frac{1}{j}]=0, \end{align*} which implies that $\mathbb{P}[\limsup_{k\to\infty}\frac{L(k)}{k}\leq\underline{\rho}]=1$. \end{IEEEproof} \begin{remark} Note that the term $\limsup_{k\to\infty}\frac{L(k)}{k}$ in (\ref{eq:long-run-average-bound}) corresponds to the ``discrete event rate'' used in \cite{hassibi1999control,zhang2001stability} for deterministic systems, when $\lim_{k\to\infty}\frac{L(k)}{k}$ exists. In this paper, Assumption~\ref{MainAssumption} allows the binary-valued process $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ to be a non-ergodic stochastic process, for which $\lim_{k\to\infty}\frac{L(k)}{k}$ may not be equal for all sample paths. For instance, let $l(i)\triangleq l_{\mathrm{M}}(i),i\in\mathbb{N}_{0}$, and \begin{align*} l_{\mathrm{M}}(i) & \triangleq\begin{cases} 1,\quad & i\in\{\alpha,2\alpha,3\alpha\ldots\},\\ 0,\quad & \mathrm{otherwise}, \end{cases} \end{align*} where $\alpha:\Omega\to\{2,4\}$ is a random variable with $\mathbb{P}[\alpha=2]=\mathbb{P}[\alpha=4]=\frac{1}{2}$. In this setting, the attacker decides the period of attacks based on a random variable $\alpha:\Omega\to\{2,4\}$. Depending on the value of $\alpha$, malicious packet losses occur either at every $2$ packet exchange attempts or at every $4$ packet exchange attempts. Thus, the discrete event rate would be a random variable that depends on the value of $\alpha$. On the other hand, regardless of the value of $\alpha$, (\ref{eq:jammingcondition}) is satisfied with $\tau=2$, and hence Lemmas~\ref{JammingLemma} and \ref{Lemma-underbar-rho} imply that $\limsup_{k\to\infty}\frac{L(k)}{k}\leq\frac{1}{2},$ almost surely. Note that here $\frac{1}{2}$ represents the worst-case upper bound for the long run average of the total number of failed packet exchanges. \end{remark} We are now ready to state the main result of this paper. It provides a sufficient condition for almost sure asymptotic stability of the networked control system (\ref{eq:system}), (\ref{eq:control-input}) with packet exchange failure indicator $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ satisfying (\ref{eq:long-run-average-bound}). \begin{theorem} \label{TheoremMain} Consider the linear dynamical system (\ref{eq:system}). Suppose that the process $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ characterizing packet exchange failures\begin{footnote}{We set (\ref{eq:long-run-average-bound}) as a condition for packet exchange failures as it allows more generality in comparison to Assumption~\ref{MainAssumption}. Note that by Lemma~\ref{key-lemma1}, Assumption~\ref{MainAssumption} implies (\ref{eq:long-run-average-bound}). Furthermore, Lemma~\ref{Lemma-underbar-rho} shows that (\ref{eq:long-run-average-bound}) also holds when $\rho$ is given as the infimum of an open interval where all values satisfy Assumption~\ref{MainAssumption}.}{}\end{footnote} in the network satisfies (\ref{eq:long-run-average-bound}) with scalar $\rho\in[0,1]$. If there exist a matrix $K\in\mathbb{R}^{m\times n}$, a positive-definite matrix $P\in\mathbb{R}^{n\times n}$, and scalars $\beta\in(0,1),$ $\varphi\in[1,\infty)$ such that \begin{align} & \left(A+BK\right)^{\mathrm{T}}P\left(A+BK\right)-\beta P\leq0,\label{eq:betacond}\\ & A^{\mathrm{T}}PA-\varphi P\leq0,\label{eq:varphicond}\\ & (1-\rho)\ln\beta+\rho\ln\varphi<0,\label{eq:betaandvarphicond} \end{align} then the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) guarantees almost sure asymptotic stability of the zero solution $x(t)\equiv0$ of the closed-loop system dynamics. \end{theorem} \begin{IEEEproof}The proof is composed of three steps. In the initial step, we obtain an inequality concerning the evolution of the Lyapunov-like function $V(x)\triangleq x^{\mathrm{T}}Px$, $x\in\mathbb{R}^{n}$. Then, we will establish almost sure stability, and then finally we show almost sure asymptotic stability of the closed-loop system. First, we use (\ref{eq:system}) and (\ref{eq:control-input}) together with $V(\cdot)$ to obtain \begin{align} V(x(\tau_{i}+1)) & =x^{\mathrm{T}}(\tau_{i})\left(A+\left(1-l(i)\right)BK\right)^{\mathrm{T}}P\nonumber \\ & \quad\,\cdot\left(A+\left(1-l(i)\right)BK\right)x(\tau_{i}),\,i\in\mathbb{N}_{0}.\label{eq:vattauplush} \end{align} Now, for the case $l(i)=0$, (\ref{eq:betacond}) and (\ref{eq:vattauplush}) imply \begin{align} V(x(\tau_{i}+1)) & =x^{\mathrm{T}}(\tau_{i})\left(A+BK\right)^{\mathrm{T}}P\left(A+BK\right)x(\tau_{i})\nonumber \\ & \leq\beta x^{\mathrm{T}}(\tau_{i})Px(\tau_{i}).\label{eq:betaineq} \end{align} Since $\tau_{i+1}\geq\tau_{i}+1$, it follows from (\ref{eq:attemptedpacketexchangetimes}) and (\ref{eq:betaineq}) that \begin{align} V(x(t)) & \leq\beta x^{\mathrm{T}}(\tau_{i})Px(\tau_{i})\nonumber \\ & =\beta V(x(\tau_{i})),\quad t\in\{\tau_{i}+1,\ldots,\tau_{i+1}\}.\label{eq:betaresult} \end{align} On the other hand, for the case $l(i)=1$, we have from (\ref{eq:varphicond}) and (\ref{eq:vattauplush}) that \begin{align} V(x(\tau_{i}+1)) & =x^{\mathrm{T}}(\tau_{i})A^{\mathrm{T}}PAx(\tau_{i})\leq\varphi x^{\mathrm{T}}(\tau_{i})Px(\tau_{i}).\label{eq:varphiineq} \end{align} Now if $\tau_{i+1}=\tau_{i}+1$, we have $V(x(\tau_{i+1}))\leq\varphi V(x(\tau_{i}))$ due to (\ref{eq:varphiineq}). Otherwise, that is, if $\tau_{i+1}>\tau_{i}+1$, it means that $V(x(t))\leq\beta V(x(\tau_{i}))$ for $t\in\{\tau_{i}+2,\ldots,\tau_{i+1}\}$. Therefore, since $\beta\leq\varphi$, \begin{align} V(x(t)) & \leq\varphi V(x(\tau_{i})),\quad t\in\{\tau_{i}+1,\ldots,\tau_{i+1}\}.\label{eq:varphiresult} \end{align} Using (\ref{eq:betaresult}) and (\ref{eq:varphiresult}) we obtain \begin{align} V(x(\tau_{i+1})) & \leq(1-l(i))\beta V(x(\tau_{i}))+l(i)\varphi V(x(\tau_{i})),\label{eq:vineq} \end{align} for $i\in\mathbb{N}_{0}$. Note that the inequality given in (\ref{eq:vineq}) provides an upper bound on $V(\cdot)$. Now, let $\eta(k)\triangleq\prod_{i=0}^{k-1}\left[(1-l(i))\beta+l(i)\varphi\right]$. Then, by (\ref{eq:vineq}), \begin{align} V(x(\tau_{k})) & \leq\eta(k)V(x(0)),\quad k\in\mathbb{N}.\label{eq:vetaineq} \end{align} Furthermore, since $\ln\left[(1-q)\beta+q\varphi\right]=(1-q)\ln\beta+q\ln\varphi$ for $q\in\{0,1\}$, we have \begin{align*} \ln\eta(k) & =\sum_{i=0}^{k-1}\ln\left[(1-l(i))\beta+l(i)\varphi\right]\\ & =\sum_{i=0}^{k-1}(1-l(i))\ln\beta+\sum_{i=0}^{k-1}l(i)\ln\varphi\\ & =(k-L(k))\ln\beta+L(k)\ln\varphi, \end{align*} where $L(k)=\sum_{i=0}^{k-1}l(i)$ by (\ref{eq:bigldefinition}). Now by $\beta\in(0,1)$, and $\varphi\in[1,\infty)$, it follows from (\ref{eq:long-run-average-bound}) and (\ref{eq:betaandvarphicond}) that \begin{align*} \limsup_{k\to\infty}\frac{\ln\eta(k)}{k} & =\limsup_{k\to\infty}\frac{1}{k}\left[(k-L(k))\ln\beta+L(k)\ln\varphi\right]\\ & \leq(1-\rho)\ln\beta+\rho\ln\varphi<0, \end{align*} almost surely. As a consequence, $\lim_{k\to\infty}\ln\eta(k)=-\infty$, and hence, $\lim_{k\to\infty}\eta(k)=0$, almost surely. Thus, for any $\epsilon>0$, $\lim_{j\to\infty}\mathbb{P}[\sup_{k\geq j}\eta(k)>\epsilon^{2}]=0$. Therefore, for any $\epsilon>0$ and $\bar{p}>0$, there exists a positive integer $N(\epsilon,\bar{p})$ such that \begin{align} \mathbb{P}[\sup_{k\geq j}\eta(k) & >\epsilon^{2}]<\bar{p},\quad j\geq N(\epsilon,\bar{p}).\label{eq:supetainequalit} \end{align} In what follows, we employ (\ref{eq:vetaineq}) and (\ref{eq:supetainequalit}) to show almost sure stability of the closed-loop system. Note that (\ref{eq:betaresult}), (\ref{eq:varphiresult}), and $\varphi\geq1>\beta$ imply that $V(x(t+1))\leq\varphi V(x(t)),\,t\in\{\tau_{i},\ldots,\tau_{i+1}-1\},$ $i\in\mathbb{N}_{0}$. Since $\|x\|^{2}\leq\frac{1}{\lambda_{\min}(P)}V(x)$ and $V(x)\leq\lambda_{\max}(P)\|x\|^{2}$, $x\in\mathbb{R}^{n}$, we have \begin{align} \|x(t)\|^{2} & \leq\varphi\nu\|x(\tau_{i})\|^{2},\,t\in\{\tau_{i},\ldots,\tau_{i+1}-1\}\label{eq:xtnuineq} \end{align} for $i\in\mathbb{N}_{0}$, where $\nu\triangleq\frac{\lambda_{\max}(P)}{\lambda_{\min}(P)}$. Now, let $\mathcal{T}_{k}\triangleq\{\tau_{k},\ldots,\tau_{k+1}-1\}$, $k\in\mathbb{N}_{0}$. Then by using (\ref{eq:vetaineq}) and (\ref{eq:xtnuineq}), we obtain $\eta(k)\geq\frac{V(x(\tau_{k}))}{V(x(0))}\geq\frac{\lambda_{\min}(P)}{\lambda_{\max}(P)}\frac{\|x(\tau_{k})\|^{2}}{\|x(0)\|^{2}}\geq\frac{1}{\nu^{2}\varphi}\frac{\|x(t)\|^{2}}{\|x(0)\|^{2}}$ for all $t\in\mathcal{T}_{k}$, $k\in\mathbb{N}$. Hence, $\eta(k)\geq\frac{1}{\nu^{2}\varphi}\frac{\max_{t\in\mathcal{T}_{k}}\|x(t)\|^{2}}{\|x(0)\|^{2}}$, $k\in\mathbb{N}$. By (\ref{eq:supetainequalit}), it follows that for all $\epsilon>0$ and $\bar{p}>0$, \begin{align*} & \mathbb{P}[\sup_{k\geq j}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon\nu\sqrt{\varphi}\|x(0)\|]\\ & \quad=\mathbb{P}[\sup_{k\geq j}\max_{t\in\mathcal{T}_{k}}\|x(t)\|^{2}>\epsilon^{2}\nu^{2}\varphi\|x(0)\|^{2}]\\ & \quad=\mathbb{P}[\sup_{k\geq j}\frac{1}{\nu^{2}\varphi}\frac{\max_{t\in\mathcal{T}_{k}}\|x(t)\|^{2}}{\|x(0)\|^{2}}>\epsilon^{2}]\\ & \quad\leq\mathbb{P}[\sup_{k\geq j}\eta(k)>\epsilon^{2}]<\bar{p},\quad j\geq N(\epsilon,\bar{p}). \end{align*} We now define $\delta_{1}\triangleq\frac{1}{\nu\sqrt{\varphi}}$. Note that if $\|x(0)\|\leq\delta_{1}$, then (since $\nu\sqrt{\varphi}\|x(0)\|\leq1$) for all $j\geq N(\epsilon,\bar{p})$, we have \begin{align} & \mathbb{P}[\sup_{k\geq j}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon]\nonumber \\ & \quad\leq\mathbb{P}[\sup_{k\geq j}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon\nu\sqrt{\varphi}\|x(0)\|]<\bar{p}.\label{eq:epsilon-result-part1} \end{align} On the other hand, since $\varphi\geq1>\beta$, it follows from (\ref{eq:vineq}) that $V(x(\tau_{k}))\leq\varphi^{k}V(x(0))\leq\varphi^{N(\epsilon,\bar{p})-1}V(x(0))$ for all $k\in\{0,1,\ldots,N(\epsilon,\bar{p})-1\}$. Therefore, $\|x(\tau_{k})\|^{2}\leq\varphi^{N(\epsilon,\bar{p})-1}\frac{\lambda_{\max}(P)}{\lambda_{\min}(P)}\|x(0)\|^{2}=\varphi^{N(\epsilon,\bar{p})-1}\nu\|x(0)\|^{2}$. Furthermore, as a result of (\ref{eq:xtnuineq}), \begin{align*} \max_{t\in\mathcal{T}_{k}}\|x(t)\|^{2} & \leq\varphi\nu\|x(\tau_{k})\|^{2}\leq\nu^{2}\varphi^{N(\epsilon,\bar{p})}\|x(0)\|^{2}, \end{align*} and hence, $\max_{t\in\mathcal{T}_{k}}\|x(t)\|\leq\nu\sqrt{\varphi^{N(\epsilon,\bar{p})}}\|x(0)\|$ for all $k\in\{0,1,\ldots,N(\epsilon,\bar{p})-1\}$. Let $\delta_{2}\triangleq\epsilon\nu^{-1}\sqrt{\varphi^{-N(\epsilon,\bar{p})}}$. Now, if $\|x(0)\|\leq\delta_{2}$, then $\max_{t\in\mathcal{T}_{k}}\|x(t)\|\leq\epsilon$, $k\in\{0,1,\ldots,N(\epsilon,\bar{p})-1\}$, which implies \begin{eqnarray} \mathbb{P}[\max_{k\in\{0,1,\ldots,N(\epsilon,\bar{p})\}}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon] & = & 0.\label{eq:epsilon-result-part2} \end{eqnarray} It follows from (\ref{eq:epsilon-result-part1}) and (\ref{eq:epsilon-result-part2}) that for all $\epsilon>0$, $\bar{p}>0$, \begin{align*} & \mathbb{P}[\sup_{t\in\mathbb{N}_{0}}\|x(t)\|>\epsilon]=\mathbb{P}[\sup_{k\in\mathbb{N}_{0}}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon]\\ & \quad=\mathbb{P}[\{\max_{k\in\{0,1,\ldots,N(\epsilon,\bar{p})-1\}}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon\}\\ & \quad\quad\quad\cup\,\{\sup_{k\geq N(\epsilon,\bar{p})}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon\}]\\ & \quad\leq\mathbb{P}[\max_{k\in\{0,1,\ldots,N(\epsilon,\bar{p})-1\}}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon]\\ & \quad\quad+\mathbb{P}[\sup_{k\geq N(\epsilon,\bar{p})}\max_{t\in\mathcal{T}_{k}}\|x(t)\|>\epsilon]<\bar{p}, \end{align*} whenever $\|x(0)\|<\delta\triangleq\min(\delta_{1},\delta_{2})$, which implies almost sure stability. Finally, in order to establish almost sure \emph{asymptotic} stability of the zero solution, it remains to show (\ref{eq:definition-convergence}). To this end, observe that $\mathbb{P}[\lim_{k\to\infty}\eta(\tau_{k})=0]=1$. It follows from (\ref{eq:vetaineq}) that $\mathbb{P}[\lim_{k\to\infty}V(x(\tau_{k}))=0]=1$, which implies (\ref{eq:definition-convergence}). Hence the zero solution of the closed-loop system (\ref{eq:system}), (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) is asymptotically stable almost surely.\end{IEEEproof} Theorem~\ref{TheoremMain} provides a sufficient condition under which the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) guarantees almost sure asymptotic stability of the system (\ref{eq:system}) for the case of packet losses satisfying Assumption~\ref{MainAssumption}. Note that the scalars $\beta\in(0,1)$ and $\varphi\in[1,\infty)$ in conditions (\ref{eq:betacond}) and (\ref{eq:varphicond}) characterize upper bounds on the growth of the Lyapunov-like function, and they are also related to closed-loop and open-loop bounds utilized in \cite{kellett2005stability,quevedo2014stochastic}. Specifically, when a packet exchange attempt between the plant and the controller is successful at time $\tau_{i}$, the condition (\ref{eq:betacond}) together with (\ref{eq:attemptedpacketexchangetimes}) guarantees that $V(x(\tau_{i+1}))\leq\beta V(x(\tau_{i}))$. On the other hand, if a packet exchange is unsuccessful at time $\tau_{i}$, it follows from (\ref{eq:attemptedpacketexchangetimes}) and (\ref{eq:varphicond}) that $V(x(\tau_{i+1}))\leq\varphi V(x(\tau_{i}))$. If successful packet exchanges are sufficiently frequent such that (\ref{eq:betaandvarphicond}) is satisfied, then the closed-loop stability is guaranteed. We remark that the analysis for the closed-loop system stability in the proof above is technically involved partly due to the general characterization in Assumption~\ref{MainAssumption}, which captures not only random packet losses but attacks as well. If we consider only random packet losses, we may employ methods from discrete-time Markov jump systems theory \cite{costa2004discrete} for obtaining conditions of stability. Furthermore, in the case $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is an ergodic process, the results presented in \cite{kellett2005stability} can be directly employed to show stability. On the other hand packet losses due to attacks (Section~\ref{RemarkJammingAttacks}) cannot be described using Markov processes and they may not be ergodic. Stability of a system under denial-of-service attacks is explored in \cite{depersis2014}, where the analysis relies on a deterministic approach for obtaining an exponentially decreasing upper bound for the norm of the state. In contrast, in our analysis, we use probabilistic approaches similar to \cite{kellett2005stability,Lemmon:2011:ASS:1967701.1967744} to show almost sure asymptotic stability. Specifically, we use tools from probability theory to find a stochastic upper bound for a Lyapunov-like function and show that this bound tends to zero even though it may increase at certain times. This approach is related to obtaining an upper bound on the \emph{top Lyapunov exponent} (see \cite{fang1995stability,ezzine1997almost,bolzern2004almost}) of a stochastic system. Theorem~\ref{TheoremMain} provides conditions that guarantee both (\ref{eq:almost-sure-stability}) and (\ref{eq:definition-convergence}) implying almost sure asymptotic stability. In this stability definition, (\ref{eq:definition-convergence}) is concerned with the convergence of solutions to zero, while (\ref{eq:almost-sure-stability}) ensures that states sufficiently close to the origin are likely to stay close to the origin. However note that (\ref{eq:almost-sure-stability}) allows states to leave any given ball in a finite time with positive (even if small) probability. For instance, if many consecutive packet transmission attempts fail, the state magnitude may grow due to lack of control action. We emphasize that Assumption~\ref{MainAssumption} and hence (\ref{eq:long-run-average-bound}) ensure packet failures to be statistically rare so that the state eventually converges to the origin. \begin{remark}In addition to almost sure stability, there are other stochastic stability and performance notions that are useful for the analysis of networked control systems. In particular, moment stability and moment-based performance notions have been utilized when random packet losses are considered (see \cite{hespanha2007,schenato2007} and the references therein). In comparison with those works, in our problem setting, we must take into account also the effect of malicious attacks. We remark that in contrast with random packet losses, precise information of the probabilities of malicious attacks is not available. Hence, it is difficult to characterize the evolution of the moments of the state and establish moment stability. On the other hand, both random packet losses and malicious attacks, as well as their combination provide us information about the asymptotic ratio of packet exchange failures, which can be employed in the analysis when we consider almost sure asymptotic stability. \end{remark} In the following corollary of Theorem~\ref{TheoremMain}, we discuss the special case of random packet losses described with time-homogeneous Markov chains. \begin{corollary} \label{CorollaryRandom} Consider the linear dynamical system (\ref{eq:system}). Suppose that the process $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ is an irreducible time-homogeneous Markov chain with constant transition probabilities $p_{q,r}\in[0,1]$, $q,r\in\{0,1\}$. If there exist a matrix $K\in\mathbb{R}^{m\times n}$, a positive-definite matrix $P\in\mathbb{R}^{n\times n}$, and scalars $\beta\in(0,1),$ $\varphi\in[1,\infty)$ such that (\ref{eq:betacond}), (\ref{eq:varphicond}) and (\ref{eq:betaandvarphicond}) hold with $\rho\triangleq\frac{p_{0,1}}{p_{0,1}+p_{1,0}}$, then the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) guarantees almost sure asymptotic stability of the zero solution $x(t)\equiv0$ of the closed-loop system dynamics. \end{corollary} \begin{IEEEproof} By the ergodic theorem for irreducible Markov chains \cite{norris2009}, we have $\lim_{k\to\infty}\frac{L(k)}{k}=\rho$. Now, since (\ref{eq:long-run-average-bound}) holds, the result follows from Theorem~\ref{TheoremMain}. \end{IEEEproof} When we consider transmission attempts at all times by setting $\theta=1$ in (\ref{eq:attemptedpacketexchangetimes}), Corollary~\ref{CorollaryRandom} recovers a specialization of the result in \cite{kellett2005stability} for linear systems. Furthermore, if we consider $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ to be a Bernoulli process, then $\rho$ in Corollary~\ref{CorollaryRandom} is given by $\rho=p$, where $p=p_{0,1}=p_{1,1}$ denotes the packet loss probability. In this setting, the almost sure stability condition in Corollary~\ref{CorollaryRandom} is tighter than the second-moment stability condition in \cite{quevedo2014stochastic}. Specifically, for this problem setting, the results in \cite{quevedo2014stochastic} can be used to obtain the second-moment stability condition $(1-\rho)\beta+\rho\varphi<1$ or equivalently $\ln[(1-\rho)\beta+\rho\varphi]<0$. In comparison to this condition, the stability condition (\ref{eq:betaandvarphicond}) in Corollary~\ref{CorollaryRandom} is tighter. This is because $(1-\rho)\ln\beta+\rho\ln\varphi<\ln[(1-\rho)\beta+\rho\varphi]$ by Jensen's inequality, since $\beta<\varphi$ and $\rho\notin\{0,1\}$. \subsection{Feedback Gain Design for Event-Triggered Control \label{sub:Feedback-Gain-Design}} In the following, we outline a numerical method for designing the feedback gain $K\in\mathbb{R}^{m\times n}$, as well as the positive-definite matrix $P\in\mathbb{R}^{n\times n}$ and the scalar $\beta\in(0,1)$ used in the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}). \begin{corollary} \label{Corollary} Consider the linear dynamical system (\ref{eq:system}). Suppose that the process $\{l(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ characterizing packet exchange failures in the network satisfies (\ref{eq:long-run-average-bound}) with scalar $\rho\in[0,1]$. If there exist a matrix $M\in\mathbb{R}^{m\times n}$, a positive-definite matrix $Q\in\mathbb{R}^{n\times n}$, and scalars $\beta\in(0,1),$ $\varphi\in[1,\infty)$ such that (\ref{eq:betaandvarphicond}), \begin{align} \left[\begin{array}{cc} \beta Q & \left(AQ+BM\right)^{\mathrm{T}}\\ AQ+BM & Q \end{array}\right] & \geq0,\label{eq:corolcond1}\\ \left[\begin{array}{cc} \varphi Q & (AQ){}^{\mathrm{T}}\\ AQ & Q \end{array}\right] & \geq0,\label{eq:corolcond2} \end{align} hold, then the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) with $P\triangleq Q^{-1}$ and $K\triangleq MQ^{-1}$ guarantees almost sure asymptotic stability of the zero solution $x(t)\equiv0$ of the closed-loop system dynamics. \end{corollary} \begin{IEEEproof}Using Schur complements (see \cite{bernstein2009matrix}), we transform (\ref{eq:corolcond1}) and (\ref{eq:corolcond2}), respectively, into \begin{align} \beta Q-\left(AQ+BM\right)^{\mathrm{T}}Q^{-1}\left(AQ+BM\right) & \geq0,\label{eq:oldcorolcond1}\\ \varphi Q-(AQ)^{\mathrm{T}}Q^{-1}AQ & \geq0.\label{eq:oldcorolcond2} \end{align} By multiplying both sides of (\ref{eq:oldcorolcond1}) and (\ref{eq:oldcorolcond2}) from left and right by $Q^{-1}$, we obtain (\ref{eq:betacond}) and (\ref{eq:varphicond}) with $P=Q^{-1}$ and $K=MQ^{-1}$. Thus, the result follows from Theorem~\ref{TheoremMain}. \end{IEEEproof} \begin{figure} \centering \includegraphics[width=0.65\columnwidth]{newsearchspacefigure}\vskip -7pt\caption{Region for $\beta\in(0,1)$ and $\varphi\in[1,\infty)$ that satisfy (\ref{eq:betaandvarphicond}) for $\rho=0.4$ } \vskip -15pt \label{FigBetaandVarphi} \end{figure} We remark that the matrix inequalities (\ref{eq:corolcond1}) and (\ref{eq:corolcond2}) are linear in $M\in\mathbb{R}^{m\times n}$ and $Q\in\mathbb{R}^{n\times n}$ for fixed $\beta\in(0,1)$ and $\varphi\in[1,\infty)$. In our method we seek feasible solutions $M$ and $Q$ for linear matrix inequalities (\ref{eq:corolcond1}) and (\ref{eq:corolcond2}) by iterating over a set of values for $\beta\in(0,1)$ and $\varphi\in[1,\infty)$ restricted by the condition (\ref{eq:betaandvarphicond}). It is however noted that we do not need to search $\beta$ and $\varphi$ in the entire range characterized by (\ref{eq:betaandvarphicond}). It turns out to be sufficient to check for larger values of $\beta$ and $\varphi$ that are close to the boundary of the range identified by $(1-\rho)\ln\beta+\rho\ln\varphi=0$. Specifically, we set $\Delta>0$ as a small positive real number, and then we iterate over a set of values for $\beta$ in the range $(0,e^{-\frac{\Delta}{1-\rho}}]$ to look for feasible solutions $M$ and $Q$ for the linear matrix inequalities (\ref{eq:corolcond1}) and (\ref{eq:corolcond2}) with $\varphi=e^{-\frac{(1-\rho)\ln\beta+\Delta}{\rho}}$. In this approach, we use only $\beta\in(0,1)$, $\varphi\in[1,\infty)$ that are on the curve $(1-\rho)\ln\beta+\rho\ln\varphi=-\Delta$. We illustrate this curve with the solid red line in Fig.~\ref{FigBetaandVarphi}, where the shaded region corresponds to $\beta$ and $\varphi$ that satisfy (\ref{eq:betaandvarphicond}). Note that picking smaller values for $\Delta>0$ moves the curve towards the boundary. Also, there is no conservatism in \emph{not} considering $\beta$ and $\varphi$ such that $(1-\rho)\ln\beta+\rho\ln\varphi<-\Delta$. This is because if there exist $M$ and $Q$ that satisfy (\ref{eq:corolcond1}) and (\ref{eq:corolcond2}) for values $\beta=\tilde{\beta}$ and $\varphi=\tilde{\varphi}$, then the same $M$ and $Q$ satisfy (\ref{eq:corolcond1}) and (\ref{eq:corolcond2}) also for larger values $\beta>\tilde{\beta}$ and $\varphi>\tilde{\varphi}$. \section{Attacker's Perspective \label{sec:Attacker's-Perspective}} In order to design \emph{cyber-secure} control systems, it is essential to understand the risks in networked operation. In this regard, it may be useful to consider the control problem from the perspective of an attacker. An attacker knowledgeable about the networked control system may generate an attack strategy that causes sufficiently frequent packet losses which can result in instability of the closed-loop dynamics. However, the attacker may want to keep the number of attacks as small as possible. One reason in the case of jamming attacks is that monitoring the channel and producing jamming signals consume energy \cite{xu2005feasibility}. Moreover, the attacks should be kept minimal to make them less detectable by the system operators. In this section, we address the question of finding conditions under which the state diverges almost surely (i.e., $\mathbb{P}[\lim_{t\to\infty}\|x(t)\|=\infty]=1$). For the discussions and results presented in this section, we consider the case where the plant and the controller attempt to exchange packets at all time instants, that is, $\tau_{i}=i$, $i\in\mathbb{N}_{0}$. In the event-triggered scheme, this corresponds to the case with $\theta=1$ in (\ref{eq:attemptedpacketexchangetimes}). First, we obtain a \emph{lower-bound} for the long run average number of packet exchange failures by utilizing a characterization that is complementary to (\ref{eq:lcond1}) in Assumption~\ref{MainAssumption}. \begin{lemma} \label{key-lemma1-1} If there exists a scalar $\sigma\in[0,1]$ such that \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[L(k)<\sigma k] & <\infty,\label{eq:c1-1} \end{align} where $L(k)\triangleq\sum_{i=0}^{k-1}l(t)$, $k\in\mathbb{N}$, then \begin{align} \liminf_{k\to\infty}\frac{L(k)}{k} & \geq\sigma,\label{eq:long-run-average-bound-1} \end{align} almost surely. \end{lemma} \begin{IEEEproof} Using (\ref{eq:c1-1}), we obtain $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l(t))>(1-\sigma)k]<\infty$, and hence, by Borel-Cantelli lemma (see \cite{klenke2008}), \begin{align} \limsup_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}(1-l(t)) & \leq1-\sigma,\label{eq:bc} \end{align} almost surely. Noting that $\limsup_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}(1-l(t))=1-\liminf_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}l(t)$, we obtain (\ref{eq:long-run-average-bound-1}) from (\ref{eq:bc}). \end{IEEEproof} The inequality (\ref{eq:c1-1}) can be considered as a complementary characterization to (\ref{eq:lcond1}) in Assumption~\ref{MainAssumption}. Observe that by Lemma~\ref{key-lemma1}, $\rho\in[0,1]$ in (\ref{eq:lcond1}) characterizes an \emph{upper-bound} on the long run average number of packet exchange failures. In comparison, as implied by (\ref{eq:long-run-average-bound-1}), the scalar $\sigma\in[0,1]$ in (\ref{eq:c1-1}) provides a \emph{lower-bound} on the long run average number of packet exchange failures. Notice that a large $\sigma\in[0,1]$ in (\ref{eq:long-run-average-bound-1}) indicates that due to random losses and malicious attacks, packet exchange failures happen statistically frequently. In such cases, the overall dynamics may become unstable. As mentioned earlier, since malicious attacks often consume energy, the attacker would want to disrupt normal operation and cause unstable behavior with a fewer number of attacks. In the case of jamming attacks, recent works considered game-theoretic methods to investigate the optimal strategy of an attacker when the jamming energy is a constraint in the problem \cite{li2015jamming} and when it is part of the attacker's cost function \cite{alpcan2010network,liu2014stochastic}. The results obtained there are not directly applicable here, as we investigate sufficient attack rates that cause divergence of the state rather than finding optimal attack strategies. Our next result indicates how frequently the attacker should cause packet exchange failures to induce instability. \begin{theorem} \label{TheoremMain-Attackers-Perspective} Consider the linear networked control system (\ref{eq:system}), (\ref{eq:control-input}) where packet exchanges between the plant and the controller are attempted at all time instants. Suppose that the process $\{l(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ characterizing packet exchange failures in the network satisfies (\ref{eq:long-run-average-bound-1}) with $\sigma\in[0,1]$. If there exist a positive-definite matrix $\hat{P}\in\mathbb{R}^{n\times n}$ and scalars $\hat{\beta}\in(0,1),$ $\hat{\varphi}\in[1,\infty)$ such that \begin{align} & \left(A+BK\right)^{\mathrm{T}}\hat{P}\left(A+BK\right)-\hat{\beta}\hat{P}\geq0,\label{eq:betacond-1}\\ & A^{\mathrm{T}}\hat{P}A-\hat{\varphi}\hat{P}\geq0,\label{eq:varphicond-1}\\ & (1-\sigma)\ln\hat{\beta}+\sigma\ln\hat{\varphi}>0,\label{eq:betaandvarphicond-1} \end{align} then $\lim_{t\to\infty}\|x(t)\|=\infty$, almost surely. \end{theorem} \begin{IEEEproof} Consider the Lyapunov-like function $V(\cdot)$ given by $V(x)\triangleq x^{\mathrm{T}}\hat{P}x$, $x\in\mathbb{R}^{n}$. For the case $\tau_{i}=i$, $i\in\mathbb{N}_{0}$, by (\ref{eq:system}), (\ref{eq:control-input}), we have \begin{align} V(x(t+1)) & =x^{\mathrm{T}}(t)\left(A+\left(1-l(t)\right)BK\right)^{\mathrm{T}}\hat{P}\nonumber \\ & \quad\,\cdot\left(A+\left(1-l(t)\right)BK\right)x(t),\,t\in\mathbb{N}_{0}.\label{eq:vattauplush-1} \end{align} From (\ref{eq:betacond-1}), (\ref{eq:varphicond-1}), and (\ref{eq:vattauplush-1}), this can be bounded by \begin{align} V(x(t+1)) & \geq(1-l(t))\hat{\beta}V(x(t))+l(t)\hat{\varphi}V(x(t))\label{eq:vineq-1} \end{align} for $t\in\mathbb{N}_{0}$. Now, let $\eta(k)\triangleq\prod_{t=0}^{k-1}\left((1-l(t))\hat{\beta}+l(t)\hat{\varphi}\right)$. It follows from (\ref{eq:vineq-1}) that \begin{align} V(x(k)) & \geq\eta(k)V(x(0))\label{eq:vetaineq-1} \end{align} for $k\in\mathbb{N}$. Furthermore, since $\ln\left[(1-q)\hat{\beta}+q\hat{\varphi}\right]=(1-q)\ln\hat{\beta}+q\ln\hat{\varphi}$ for $q\in\{0,1\}$, we have \begin{align*} \ln\eta(k) & =\sum_{t=0}^{k-1}(1-l(t))\ln\hat{\beta}+\sum_{t=0}^{k-1}l(t)\ln\hat{\varphi} \end{align*} Now since $\hat{\beta}\in(0,1)$, we have $\ln\hat{\beta}<0$, and hence by (\ref{eq:long-run-average-bound-1}), \begin{align*} & \liminf_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}(1-l(t))\ln\hat{\beta}=(\ln\hat{\beta})\limsup_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}(1-l(t))\\ & \,\,=(\ln\hat{\beta})(1-\liminf_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}l(t))\geq(\ln\hat{\beta})(1-\sigma). \end{align*} Furthermore, since $\ln\hat{\varphi}\geq0$, it follows from (\ref{eq:long-run-average-bound-1}) that $\liminf_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}l(t)\ln\hat{\varphi}\geq\sigma\ln\hat{\varphi}$. Consequently, by (\ref{eq:betaandvarphicond-1}), \begin{align*} & \liminf_{k\to\infty}\frac{\ln\eta(k)}{k}\geq\liminf_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}(1-l(t))\ln\hat{\beta}\\ & \quad+\liminf_{k\to\infty}\frac{1}{k}\sum_{t=0}^{k-1}l(t)\ln\hat{\varphi}\geq(1-\sigma)\ln\hat{\beta}+\sigma\ln\hat{\varphi}>0, \end{align*} almost surely. As a consequence, $\lim_{k\to\infty}\ln\eta(k)=\infty$, and hence, $\lim_{k\to\infty}\eta(k)=\infty$, almost surely. Thus, it follows from (\ref{eq:vetaineq-1}) that $\mathbb{P}[\lim_{t\to\infty}V(x(t))=\infty]=1$, which implies that $\lim_{t\to\infty}\|x(t)\|=\infty$, almost surely. \end{IEEEproof} \vskip 5pt Theorem~\ref{TheoremMain-Attackers-Perspective} provides sufficient conditions (\ref{eq:betacond-1})--(\ref{eq:betaandvarphicond-1}) to assess \emph{instability} of the closed-loop system (\ref{eq:system}), (\ref{eq:control-input}). These conditions are complementary to the \emph{stability} conditions (\ref{eq:betacond})--(\ref{eq:betaandvarphicond}) in Theorem~\ref{TheoremMain}. This point is further illustrated by focusing on the scalar systems case. \begin{newexample}Consider the scalar system (\ref{eq:system}) with $A,B\in\mathbb{R}$. Then, conditions (\ref{eq:betacond-1}), (\ref{eq:varphicond-1}) as well as (\ref{eq:betacond}), (\ref{eq:varphicond}) can be satisfied by $\hat{P}=P=1$, $\hat{\beta}=\beta=(A+BK)^{2}$, and $\hat{\varphi}=\varphi=A^{2}$. Now, if $\lim_{k\to\infty}\frac{L(k)}{k}$ exists and is a fixed constant, we can set $\sigma=\rho=\lim_{k\to\infty}\frac{L(k)}{k}$ in (\ref{eq:betaandvarphicond}) and (\ref{eq:betaandvarphicond-1}) to obtain the stability condition \begin{align} (1-\lim_{k\to\infty}\frac{L(k)}{k})(A+BK)^{2}+\lim_{k\to\infty}\frac{L(k)}{k}A^{2} & <0,\label{eq:scalar-stability} \end{align} and the instability condition \begin{align} (1-\lim_{k\to\infty}\frac{L(k)}{k})(A+BK)^{2}+\lim_{k\to\infty}\frac{L(k)}{k}A^{2} & >0.\label{eq:scalar-instability} \end{align} The limit $\lim_{k\to\infty}\frac{L(k)}{k}$ is a fixed constant for example when the packet losses are Bernoulli-type or periodic. In those cases, (\ref{eq:scalar-stability}) and (\ref{eq:scalar-instability}) indicate that Theorems~\ref{TheoremMain} and \ref{TheoremMain-Attackers-Perspective} provide tight stability/instability conditions for scalar systems. On the other hand, for multi-dimensional systems, scalars $\beta$ and $\hat{\beta}$ as well as $\varphi$ and $\hat{\varphi}$ may not always be selected equal to obtain tight results. Furthermore, under random packet losses and malicious attacks, $\lim_{k\to\infty}\frac{L(k)}{k}$ may not always exist and hence there may be a discrepancy between $\rho$ and $\sigma$ in (\ref{eq:long-run-average-bound}) and (\ref{eq:long-run-average-bound-1}). \end{newexample} Proposition~\ref{PropositionIndependentAttackStrategy} below provides a range of values for $\sigma$ that satisfy (\ref{eq:c1-1}) in the case where the network faces random and malicious packet losses. \begin{proposition} \label{PropositionIndependentAttackStrategy} Consider the packet exchange failure indicator process $\{l(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ given by (\ref{eq:ldefinitionforcombinedcase}) where $\{l_{\mathrm{R}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ and $\{l_{\mathrm{M}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ are mutually independent. Suppose there exists $\sigma_{\mathrm{M}}\in(0,1)$ such that \begin{align} \sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{\mathrm{M}}k] & <\infty.\label{eq:reverse-jamming-condition} \end{align} Furthermore, suppose $\{l_{\mathrm{R}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ satisfies (\ref{eq:p0condition-1}) with $p_{0}\in(0,1)$. Then (\ref{eq:c1-1}) holds for all $\sigma\in(0,1-p_{0}(1-\sigma_{\mathrm{M}}))$. \end{proposition}\begin{IEEEproof} First, by using (\ref{eq:ldefinitionforcombinedcase}), we obtain \begin{align} & \mathbb{P}[\sum_{t=0}^{k-1}l(t)<\sigma k]=\mathbb{P}[\sum_{t=0}^{k-1}(1-l(t))>(1-\sigma)k]\nonumber \\ & \,\,=\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))(1-l_{\mathrm{M}}(t))>(1-\sigma)k],\,\,k\in\mathbb{N}.\label{eq:sigmavarrhorelation} \end{align} Furthermore, it follows from (\ref{eq:reverse-jamming-condition}) that $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{M}}(t))>(1-\sigma_{\mathrm{M}})k]=\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(i)<\sigma_{\mathrm{M}}k]<\infty.$ Hence, $\{\chi(i)\triangleq\{0,1\}\}_{i\in\mathbb{N}_{0}}$ defined by $\chi(i)=1-l_{\mathrm{\mathrm{M}}}(i),i\in\mathbb{N}_{0}$, satisfies (\ref{eq:chicond}) with $\tilde{w}=1-\sigma_{\mathrm{M}}<1$. Furthermore, $\{\xi(i)\triangleq\{0,1\}\}_{i\in\mathbb{N}_{0}}$ defined by $\xi(i)=1-l_{\mathrm{R}}(i),i\in\mathbb{N}_{0}$, satisfies (\ref{eq:xicond}) with $\tilde{p}=p_{0}\in(0,1)$. We then have from Lemma~\ref{KeyMarkovLemma} that \begin{align} & \sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))(1-l_{\mathrm{M}}(t))>\varrho k]<\infty,\label{eq:oneminussigmainf} \end{align} for all $\varrho\in(p_{0}(1-\sigma_{\mathrm{M}}),1-\sigma_{\mathrm{M}})$. In the rest of the proof, we will show that (\ref{eq:oneminussigmainf}) holds also for $\varrho\in[1-\sigma_{\mathrm{M}},1)$. To this end, let $\varrho'\triangleq\frac{p_{0}(1-\sigma_{\mathrm{M}})+1-\sigma_{\mathrm{M}}}{2}$. Since $\varrho'\in(p_{0}(1-\sigma_{\mathrm{M}}),1-\sigma_{\mathrm{M}})$, by (\ref{eq:oneminussigmainf}), we get $\lambda\triangleq\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))(1-l_{\mathrm{M}}(t))>\varrho'k]<\infty$. Furthermore, for all $\varrho\in[1-\sigma_{\mathrm{M}},1)$ we have $\varrho\geq\varrho'$ and hence \begin{align*} & \mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))(1-l_{\mathrm{M}}(t))>\varrho k]\\ & \quad\leq\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))(1-l_{\mathrm{M}}(t))>\varrho'k],\quad k\in\mathbb{N}. \end{align*} Thus, for $\varrho\in[1-\sigma_{\mathrm{M}},1)$, $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))(1-l_{\mathrm{M}}(t))>\varrho k]\leq\lambda<\infty$. Therefore, (\ref{eq:oneminussigmainf}) holds for all $\varrho\in(p_{0}(1-\sigma_{\mathrm{M}}),1)=(p_{0}(1-\sigma_{\mathrm{M}}),1-\sigma_{\mathrm{M}})\cup[1-\sigma_{\mathrm{M}},1)$. Now since $\sigma=1-\varrho$, it follows from (\ref{eq:sigmavarrhorelation}) that (\ref{eq:c1-1}) holds for all $\sigma\in(0,1-p_{0}(1-\sigma_{\mathrm{M}}))$. \end{IEEEproof} Proposition~\ref{PropositionIndependentAttackStrategy} shows that when malicious attacks are independent of the random losses and they satisfy (\ref{eq:reverse-jamming-condition}), the inequalities (\ref{eq:c1-1}) and (\ref{eq:long-run-average-bound-1}) (due to Lemma~ \ref{key-lemma1-1}) hold for a range of values of $\sigma$. This result indicates the effects of independent random packet losses and malicious attacks on the asymptotic ratio of packet exchange attempt failures over all attempts. The next result is concerned with the scenarios where random packet losses and malicious attacks need not be independent. \begin{proposition} \label{PropositionDependentAttackStrategy-1} Consider the packet exchange failure indicator process $\{l(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ given by (\ref{eq:ldefinitionforcombinedcase}). Suppose there exists $\sigma_{\mathrm{M}}\in(0,1)$ such that (\ref{eq:reverse-jamming-condition}) holds. Furthermore, suppose $\{l_{\mathrm{R}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ satisfies (\ref{eq:p0condition-1}) with $p_{0}\in(0,1)$. Then (\ref{eq:c1-1}) holds for all $\sigma\in(0,\max\{1-p_{0},\sigma_{\mathrm{M}}\})$. \end{proposition}\begin{IEEEproof} We will show that (\ref{eq:c1-1}) holds for the cases: 1) $\max\{1-p_{0},\sigma_{\mathrm{M}}\}=1-p_{0}$ and 2) $\max\{1-p_{0},\sigma_{\mathrm{M}}\}=\sigma_{\mathrm{M}}$. First, if $\max\{1-p_{0},\sigma_{\mathrm{M}}\}=1-p_{0}$, then noting that $\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)\leq\sum_{t=0}^{k-1}l(t)$, we obtain \begin{align} \mathbb{P}[\sum_{t=0}^{k-1}l(t)<\sigma k] & =\mathbb{P}[\sum_{t=0}^{k-1}(1-l(t))>(1-\sigma)k]\nonumber \\ & \leq\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))>(1-\sigma)k],\label{eq:lrineqp0} \end{align} for $k\in\mathbb{N}$. Now, $\{\chi(i)\triangleq\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with $\chi(i)=1,i\in\mathbb{N}_{0}$, satisfies (\ref{eq:chicond}) with $\tilde{w}=1$. Furthermore, $\{\xi(i)\triangleq\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with $\xi(i)=1-l_{\mathrm{R}}(i),i\in\mathbb{N}_{0}$, satisfies (\ref{eq:xicond}) with $\tilde{p}=p_{0}\in(0,1)$. Since $1-\sigma>p_{0}$, we have from Lemma~\ref{KeyMarkovLemma} that $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))>(1-\sigma)k]<\infty$. Hence, by (\ref{eq:lrineqp0}), we have (\ref{eq:c1-1}). Next, if $\max\{1-p_{0},\sigma_{\mathrm{M}}\}=\sigma_{\mathrm{M}}$, then since $\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)\leq\sum_{t=0}^{k-1}l(t)$ and $\sigma<\sigma_{\mathrm{M}}$, we get \begin{align} \mathbb{P}[\sum_{t=0}^{k-1}l(t)<\sigma k] & \leq\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{\mathrm{M}}k],\quad k\in\mathbb{N}.\label{eq:lmineqsigmam} \end{align} Consequently, (\ref{eq:reverse-jamming-condition}) and (\ref{eq:lmineqsigmam}) imply (\ref{eq:c1-1}).\end{IEEEproof} Proposition~\ref{PropositionDependentAttackStrategy-1} provides a range for $\sigma$ in (\ref{eq:c1-1}) when we consider the case where random packet losses and malicious attacks may be dependent. This range is smaller in comparison to the one provided in Proposition~\ref{PropositionIndependentAttackStrategy} for the independent case. This is because Proposition~\ref{PropositionDependentAttackStrategy-1} deals with scenarios including \emph{the worst case from the perspective of the attacker}. In that scenario, the malicious attacks and random packet losses happen at the same time instants, and hence, the statistical frequency of the overall packet exchange failures cannot exceed the maximum of the frequencies of malicious attacks and random packet losses. We remark that there are other scenarios where the attacks depend on the random packet losses. For instance, the attacker may intentionally avoid attacking when there is already a random packet loss. This scenario is characterized in the mathematical setting by $l_{\mathrm{R}}(t)l_{\mathrm{M}}(t)=0$, $t\in\mathbb{N}_{0}$. For this scenario, the following proposition provides a range of $\sigma$ that satisfy (\ref{eq:c1-1}). \begin{proposition} \label{PropositionDependentAttackStrategy-2} Consider the packet exchange failure indicator process $\{l(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ given by (\ref{eq:ldefinitionforcombinedcase}). Suppose $\{l_{\mathrm{R}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ satisfies (\ref{eq:p0condition-1}) with $p_{0}\in(0,1)$. Furthermore, suppose $l_{\mathrm{R}}(t)l_{\mathrm{M}}(t)=0$, $t\in\mathbb{N}_{0}$, and there exists $\sigma_{\mathrm{M}}\in(0,1)$ such that (\ref{eq:reverse-jamming-condition}) holds. If $1-p_{0}+\sigma_{\mathrm{M}}\leq1$, then (\ref{eq:c1-1}) holds for all $\sigma\in(0,1-p_{0}+\sigma_{\mathrm{M}})$. \end{proposition}\begin{IEEEproof} First let $\epsilon\triangleq1-p_{0}+\sigma_{\mathrm{M}}-\sigma$, and define $\sigma_{1}\triangleq\max\{0,1-p_{0}-\frac{\epsilon}{2}\}$, $\sigma_{2}\triangleq\max\{0,\sigma_{\mathrm{M}}-\frac{\epsilon}{2}\}$. Note that $\sigma_{1}+\sigma_{2}\geq\sigma$. Now since $l_{\mathrm{R}}(t)l_{\mathrm{M}}(t)=0$, $t\in\mathbb{N}_{0}$, we have from (\ref{eq:ldefinitionforcombinedcase}) that $\sum_{t=0}^{k-1}l(t)=\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)+\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)$. As a result \begin{align} & \mathbb{P}[\sum_{t=0}^{k-1}l(t)<\sigma k]=\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)+\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma k]\nonumber \\ & \,\,\leq\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)+\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{1}k+\sigma_{2}k]\nonumber \\ & \,\,\leq\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)<\sigma_{1}k]+\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{2}k],\,\,k\in\mathbb{N}.\label{eq:dep2sum} \end{align} If $\sigma_{1}=0$, then $\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)<\sigma_{1}k]=0$, and hence $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)<\sigma_{1}k]=0<\infty$. If, on the other hand, $\sigma_{1}>0$, then we can utilize Lemma~\ref{KeyMarkovLemma}. Specifically, $\{\chi(i)\triangleq\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with $\chi(i)=1,i\in\mathbb{N}_{0}$, satisfies (\ref{eq:chicond}) with $\tilde{w}=1$. Furthermore, $\{\xi(i)\triangleq\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with $\xi(i)=1-l_{\mathrm{R}}(i),i\in\mathbb{N}_{0}$, satisfies (\ref{eq:xicond}) with $\tilde{p}=p_{0}\in(0,1)$. Since $\sigma_{1}>0$, it means that $\sigma_{1}=1-p_{0}-\frac{\epsilon}{2}$. Now, since $\epsilon>0$, we have $(1-\sigma_{1})\in(p_{0},1)$. Consequently, we obtain from Lemma~\ref{KeyMarkovLemma} that $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))>(1-\sigma_{1})k]<\infty$, and hence, \begin{align} & \sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{R}}(t)<\sigma_{1}k]\nonumber \\ & \quad=\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{R}}(t))>(1-\sigma_{1})k]<\infty.\label{eq:firstsumdep2} \end{align} Similarly, if $\sigma_{2}=0$, then $\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{2}k]=0$, and hence $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{2}k]=0<\infty$. On the other hand, if $\sigma_{2}=\sigma_{\mathrm{M}}-\frac{\epsilon}{2}>0$, since $\epsilon>0$, we have $\sigma_{2}<\sigma_{\mathrm{M}}$. Thus, $\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{2}k]\leq\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{\mathrm{M}}k]$. It then follows from (\ref{eq:reverse-jamming-condition}) that \begin{align} & \sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{2}k]\leq\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{\mathrm{M}}k]<\infty.\label{eq:secondsumdep2} \end{align} Finally, (\ref{eq:c1-1}) follows from (\ref{eq:dep2sum})--(\ref{eq:secondsumdep2}).\end{IEEEproof} An attacker that is knowledgeable about the random packet losses in the network may avoid placing malicious attacks when random packet losses occur. Proposition~\ref{PropositionDependentAttackStrategy-2} provides a range of values of $\sigma$ such that the inequality (\ref{eq:c1-1}) holds when the attacker follows this strategy. Compared to the case where attacks and random packet losses are independent, this strategy would increase the overall number of packet exchange failures, even though the number of attacks may be the same. The reason is that in the independent case, the attacks and random packet losses may occasionally happen at the same time, reducing the total packet failure count. Noe that the range of $\sigma$ in Proposition~\ref{PropositionDependentAttackStrategy-2} is larger than that in Proposition~\ref{PropositionIndependentAttackStrategy}, where the attacks and random packet losses are independent, even though in both results the malicious attacks satisfy (\ref{eq:reverse-jamming-condition}) with the same $\sigma_{\mathrm{M}}\in(0,1)$. In Section~\ref{sec:Numerical-Example}-B, we discuss and compare two attack strategies independent/dependent on random packet losses. Both strategies cause instability for certain feedback gain and event-triggering mechanism parameters. It is important to note that particular choices of the controller parameters may result in instability when $\sigma\in[0,1]$ is large. If the packet exchange failures are known to happen statistically frequently, that is, if $\sigma$ is large, then the feedback gain $K$ and the event-triggering mechanism parameters $\beta$ and $P$ should be redesigned to ensure stability. In such cases, Theorem~\ref{TheoremMain} and Corollary~\ref{Corollary} can be employed with $\rho\geq\sigma$ that satisfies (\ref{eq:lcond1}) or (\ref{eq:long-run-average-bound}). \section{Numerical Examples \label{sec:Numerical-Example}} In this section we present numerical examples to illustrate our results provided in Sections~\ref{sec:Network-Control-Problem}--\ref{sec:Attacker's-Perspective}. \subsubsection*{A) Example 1} We consider the system (\ref{eq:system}) with \begin{align*} A\triangleq\left[\begin{array}{cc} 1 & 0.1\\ -0.5 & 1.1 \end{array}\right], & \quad B\triangleq\left[\begin{array}{c} 0.1\\ 1.2 \end{array}\right]. \end{align*} We use the event-triggering control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) for stabilization of (\ref{eq:system}) over a network that faces independent random packet losses and malicious attacks. Specifically, random packet losses are assumed to be characterized by the Markov chain $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ with initial distribution $\vartheta_{0}=0$, $\vartheta_{1}=1$, and transition probabilities $p_{0,1}(i)\triangleq0.2+0.03\sin^{2}(0.1i),$ $p_{1,1}(i)\triangleq0.2+0.03\cos^{2}(0.1i)$, and $p_{q,0}(i)=1-p_{q,1}(i)$, $q\in\{0,1\}$, $i\in\mathbb{N}_{0}$. Note that $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ satisfies (\ref{eq:p1condition-1}) and (\ref{eq:p0condition-1}) with $p_{1}=0.23$ and $p_{0}=0.8$. Furthermore, the network is subject to jamming attacks that is independent of $\{l_{\mathrm{R}}(i)\in\{0,1\}\}_{i\in\mathbb{N}_{0}}$ and satisfies (\ref{eq:jammingcondition}) with $\kappa=2$ and $\tau=5$. By Lemma~\ref{JammingLemma}, (\ref{eq:general-attack-condition}) holds with $\rho_{\mathrm{M}}=0.21$ since $\rho_{\mathrm{M}}=0.21>\frac{1}{\tau}=0.2$. Furthermore, note that $p_{1}+p_{0}\rho_{\mathrm{M}}<0.4$. Hence, it follows from Proposition~\ref{PropositionCombinedCase} that for $\rho=0.4$, (\ref{eq:lcond1}) of Assumption~\ref{MainAssumption} holds, which implies (\ref{eq:long-run-average-bound}) through Lemma~\ref{key-lemma1}. We designed the controller based on the procedure in Section~\ref{sub:Feedback-Gain-Design} and obtained the matrices \begin{align*} Q & =\left[\begin{array}{cc} 0.618 & -2.119\\ -2.119 & 28.214 \end{array}\right],\,\,M=\left[\begin{array}{cc} 0.202 & -20.405\end{array}\right], \end{align*} and scalars $\beta=0.55$, $\varphi=2.4516$ satisfy (\ref{eq:corolcond1}), (\ref{eq:corolcond2}), and (\ref{eq:betaandvarphicond}) with $\rho=0.4$. Hence, it follows from Corollary~\ref{Corollary} that the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) with $P=Q^{-1}$ and $K=MQ^{-1}$ guarantees almost sure asymptotic stabilization. \begin{figure}[t] \begin{center}\includegraphics[width=0.87\columnwidth]{rho_0_4_sample_trajectories}\end{center}\vskip -20pt\caption{Sample paths of the state norm} \vskip -15pt \label{Flo:statenorm} \end{figure} \begin{figure}[t] \begin{center}\includegraphics[width=0.87\columnwidth]{rho_0_4_sp_92_v}\end{center}\vskip -20pt\caption{A sample path of Lyapunov-like function $V(\cdot)$} \vskip -10pt \label{Flo:v1} \end{figure} We generated $250$ sample state trajectories using the same initial condition $x_{0}=\left[1,\,1\right]^{\mathrm{T}}$ and the event-triggering mechanism parameter $\theta=1000$, but with different sample paths for $l_{\mathrm{R}}(\cdot)$ and $l_{\mathrm{M}}(\cdot)$. We can check in Fig.~\ref{Flo:statenorm} that all state trajectories go to the origin. The same is true for the Lyapunov-like function $V(x(t))$. We show a single sample trajectory of $V(\cdot)$ in Fig.~\ref{Flo:v1}. The Lyapunov-like function $V(\cdot)$ converges to zero, but notice that it is not monotonically decreasing. The Lyapunov-like function $V(\cdot)$ increases in two situations. First, when packet exchange attempts fail, $V(\cdot)$ may grow and take a larger value at the next packet exchange attempt instant due to unstable dynamics of the uncontrolled system. Second, $V(\cdot)$ may also increase some time after a successful packet exchange between the plant and the controller. This is because the constant control input updated with the packet exchange becomes ineffective after some time. Note that eventually a new packet exchange attempt is triggered before $V(\cdot)$ leaves the bound identified in the event-triggering condition (\ref{eq:attemptedpacketexchangetimes}). \subsubsection*{B) Example 2} \label{sub:AttackExample} Our goal in this example is to illustrate effects of different attack strategies discussed in Section~\ref{sec:Attacker's-Perspective}. Here, we consider a scalar linear system (\ref{eq:system}) with $A=2$ and $B=1$. Its initial state is set to $x_{0}=1$. Furthermore, the feedback gain and the event-triggering mechanism parameters in (\ref{eq:control-input}) and (\ref{eq:attemptedpacketexchangetimes}) are given by $K=-1.75$, $\beta=0.0625$, $P=1$. We set the packet exchange events to be triggered at all time instants. This is done with $\theta=1$ in (\ref{eq:attemptedpacketexchangetimes}). The random packet losses in the network are characterized by the Markov chain $\{l_{\mathrm{R}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$ with initial distribution $\vartheta_{0}=0$, $\vartheta_{1}=1$, and transition probabilities $p_{0,1}(t)\triangleq0.4+0.01\cos(0.1t),$ $p_{1,1}(t)\triangleq0.4+0.01\sin(0.1t)$, and $p_{q,0}(t)=1-p_{q,1}(t)$, $q\in\{0,1\}$, $t\in\mathbb{N}_{0}$. Note that $l_{\mathrm{R}}(\cdot)$ satisfies (\ref{eq:p1condition-1}) and (\ref{eq:p0condition-1}) with $p_{1}=0.41$ and $p_{0}=0.61$. We consider two attack strategies described by (\ref{eq:jammingcondition}) and discuss stability properties of the closed-loop system. \begin{figure}[t] \begin{center}\includegraphics[width=0.9\columnwidth]{independent_whenever_possible_tau_3_k_1_75_tend_1000_sample_v}\end{center}\vskip -20pt\caption{Sample paths of $\ln V(x(\cdot))$ under malicious attack (\ref{eq:strategy-one}) with $\tau=3$} \vskip -10pt \label{Flo:lnvcase1tau3} \end{figure} \begin{figure}[t] \begin{center}\includegraphics[width=0.9\columnwidth]{l_independent_whenever_possible_tau_3_k_1_75_tend_5000_sample_l}\end{center}\vskip -20pt\caption{Sample paths of the average number of packet exchange attempt failures ($L(k)/k$) under malicious attack (\ref{eq:strategy-one}) with $\tau=3$} \vskip -10pt \label{Flo:lcase1tau3} \end{figure} \emph{(i) Random-Loss-Independent Attack Strategy:} We consider the strategy given by $l_{\mathrm{M}}(0)\triangleq0$, and \begin{align} l_{\mathrm{M}}(t)\triangleq\begin{cases} 1, & \mathrm{if}\,\,\sum_{i=0}^{t-1}l_{\mathrm{M}}(i)\leq\frac{t+1}{\tau}-1,\\ 0, & \mathrm{otherwise}, \end{cases}\quad & t\in\mathbb{N}.\label{eq:strategy-one} \end{align} Note that (\ref{eq:strategy-one}) satisfies (\ref{eq:jammingcondition}) with $\kappa=0$. In this strategy, the attacker uses the total count of all attacks prior to time $t$ to check whether placing an attack at time $t$ would meet the requirement in (\ref{eq:jammingcondition}) or not. The attacker causes a packet exchange failure at time $t$ if (\ref{eq:jammingcondition}) still holds at time $t$ (i.e., $\sum_{i=0}^{t}l_{\mathrm{M}}(i)\leq\frac{t+1}{\tau}$). Under this strategy, attacks are independent of random packet losses and the attack times become periodic with period $\tau$ when $\tau$ is an integer. We will assess stability/instability of the closed-loop system with two different values of $\tau$. \begin{figure}[t] \begin{center}\includegraphics[width=0.9\columnwidth]{l_independent_whenever_possible_tau_2_k_1_75_tend_5000_sample_l}\end{center}\vskip -20pt\caption{Sample paths of the average number of packet exchange attempt failures ($L(k)/k$) under malicious attack (\ref{eq:strategy-one}) with $\tau=2$} \vskip -10pt \label{Flo:lcase1tau2} \end{figure} First, we consider $\tau=3$, that is, the attacker prevents packet exchanges once in every $3$ steps. In this case the closed-loop system is stable despite the attack. We use Theorem~\ref{TheoremMain} to show stability as follows. By Lemma~\ref{JammingLemma}, (\ref{eq:general-attack-condition}) holds with $\rho_{\mathrm{M}}=0.3334>\frac{1}{\tau}=\frac{1}{3}$. Now, note that $p_{1}+p_{0}\rho_{\mathrm{M}}<0.62$. Since $l_{\mathrm{R}}(\cdot)$ and $l_{\mathrm{M}}(\cdot)$ are independent, it follows from Proposition~\ref{PropositionCombinedCase} that (\ref{eq:lcond1}) in Assumption~\ref{MainAssumption} holds for $\rho=0.62$, which implies (\ref{eq:long-run-average-bound}) through Lemma~\ref{key-lemma1}. Further, (\ref{eq:betacond})--(\ref{eq:betaandvarphicond}) hold with $P=1$, $\beta=0.0625$, and $\varphi=4$. By Theorem~\ref{TheoremMain}, the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) with $P=1$, $\beta=0.0625$, and $K=-1.75$ guarantees \emph{almost sure asymptotic stabilization}. Fig.~\ref{Flo:lnvcase1tau3} shows $50$ sample trajectories of $\ln V(x(\cdot))$ where $V(x(t))\triangleq x^{2}(t)$. These trajectories are obtained under malicious attack (\ref{eq:strategy-one}) but with different sample paths for $\{l_{\mathrm{R}}(t)\in\{0,1\}\}_{t\in\mathbb{N}_{0}}$. Note that all trajectories of $\ln V(x(\cdot))$ approach $-\infty$, indicating convergence of the state to $0$. Moreover, in Fig.~\ref{Flo:lcase1tau3}, we show sample trajectories of the average number of packet exchange attempt failures. Observe that the long run average number of packet failures is small enough to guarantee stability ($\limsup_{k\to\infty}\frac{L(k)}{k}\leq\rho=0.62$). Next, we consider (\ref{eq:strategy-one}) with $\tau=2$, i.e., the malicious attacker prevents every other packet exchange attempt. With $\tau=2$, the closed-loop system becomes \emph{unstable}. We can show this through Theorem~\ref{TheoremMain-Attackers-Perspective} as follows. First, note that in this case, (\ref{eq:strategy-one}) implies (\ref{eq:reverse-jamming-condition}) with $\sigma_{\mathrm{M}}\triangleq0.49$. To see this, we observe that $\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)\geq\frac{k}{\tau}-1=\frac{k}{2}-1$ for all $k\in\mathbb{N}$. Next, using Markov's inequality we obtain \begin{align*} & \mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{\mathrm{M}}k]=\mathbb{P}[\sum_{t=0}^{k-1}(1-l_{\mathrm{M}}(t))>(1-\sigma_{\mathrm{M}})k]\\ & \quad\leq\mathbb{P}[e^{\sum_{t=0}^{k-1}(1-l_{\mathrm{M}}(t))}\geq e^{(1-\sigma_{\mathrm{M}})k}]\\ & \quad\leq e^{-(1-\sigma_{\mathrm{M}})k}\mathbb{E}[e^{\sum_{t=0}^{k-1}(1-l_{\mathrm{M}}(t))}]\leq e^{-(1-\sigma_{\mathrm{M}})k}e^{1+\frac{k}{2}}, \end{align*} for $k\in\mathbb{N}$. Consequently, since $\sigma_{\mathrm{M}}<\frac{1}{\tau}=\frac{1}{2}$, we have $\sum_{k=1}^{\infty}\mathbb{P}[\sum_{t=0}^{k-1}l_{\mathrm{M}}(t)<\sigma_{\mathrm{M}}k]\leq\sum_{k=1}^{\infty}e^{-(1-\sigma_{\mathrm{M}})k}e^{1+\frac{k}{2}}=e^{\frac{1}{2}+\sigma_{\mathrm{M}}}(1-e^{\sigma_{\mathrm{M}}-\frac{1}{2}})^{-1}<\infty,$ which implies (\ref{eq:reverse-jamming-condition}). Now, note that $1-p_{0}(1-\sigma_{\mathrm{M}})>0.68$. Hence, by Proposition~\ref{PropositionIndependentAttackStrategy}, we have (\ref{eq:c1-1}) for $\sigma=0.68$. Consequently, by Lemma~\ref{key-lemma1-1}, (\ref{eq:long-run-average-bound-1}) holds for $\sigma=0.68$. Furthermore, inequalities (\ref{eq:betacond-1})--(\ref{eq:betaandvarphicond-1}) hold with $\hat{P}=1$, $\hat{\beta}=0.0625$, and $\hat{\varphi}=4$. It follows from Theorem~\ref{TheoremMain-Attackers-Perspective} that the closed-loop system with $K=-1.75$ is \emph{unstable}. This example shows that an attacker can destabilize the system by reducing $\tau$ from $3$ to $2$ and hence causing higher number of packet losses on average. As illustrated in Fig.~\ref{Flo:lcase1tau2}, when $\tau=2$, in the long run, the average number of packet failures becomes larger ($\liminf_{k\to\infty}\frac{L(k)}{k}\geq\sigma=0.68$) compared to the case with $\tau=3$ in Fig.~\ref{Flo:lcase1tau3}. \emph{(ii) Selective Attack Strategy: }Next, we consider the case where the attacker is knowledgeable about the random packet losses in the network. To describe this strategy we let \begin{eqnarray} \,l_{\mathrm{M}}(t)\triangleq\begin{cases} 1, & \mathrm{if}\,\,l_{\mathrm{R}}(t)=0\,\,\mathrm{and}\,\,\sum_{i=0}^{t-1}l_{\mathrm{M}}(i)\leq\frac{t+1}{\tau}-1,\\ 0, & \mathrm{otherwise}, \end{cases}\label{eq:strategy-two} \end{eqnarray} for $t\in\mathbb{N}$ and $l_{\mathrm{M}}(0)=0$. This strategy is similar to the one given by (\ref{eq:strategy-one}) in that it satisfies (\ref{eq:jammingcondition}) with $i=t$ and $\kappa=0$. However, an attacker following (\ref{eq:strategy-two}) utilizes random packet loss information at time $t$, by not placing an attack when $l_{\mathrm{R}}(t)=1$ (indicating packet failures due to random errors). \begin{figure}[t] \begin{center}\includegraphics[width=0.95\columnwidth]{dependent_whenever_possible_tau_3_k_1_75_tend_1000_sample_v}\end{center}\vskip -20pt\caption{Sample paths of $\ln V(x(\cdot))$ under malicious attack (\ref{eq:strategy-two}) with $\tau=3$} \vskip -12pt \label{Flo:lnvcase2tauk175} \end{figure} \begin{figure}[t] \begin{center}\includegraphics[width=0.95\columnwidth]{l_dependent_whenever_possible_tau_3_k_1_9_tend_10000_sample_l}\end{center}\vskip -20pt\caption{Sample paths of the average number of packet exchange attempt failures ($L(k)/k$) under malicious attack (\ref{eq:strategy-two}) with $\tau=3$} \vskip -12pt \label{Flo:lcase2} \end{figure} To compare, we set $\tau=3$, under which the first strategy (\ref{eq:strategy-one}) cannot destabilize the system. From the simulations, we notice that with $\tau=3$, the selective attack strategy causes the system state to diverge (see Fig.~\ref{Flo:lnvcase2tauk175} for $50$ sample paths of $\ln V(x(t))$ with $V(x(t))\triangleq x^{2}(t)$). In fact, we observe from Fig.~\ref{Flo:lcase2} that (\ref{eq:long-run-average-bound-1}) holds with $\sigma=0.7$. This $\sigma$ satisfies condition (\ref{eq:betaandvarphicond-1}) of Theorem~\ref{TheoremMain-Attackers-Perspective}, indicating instability. Next, we consider an extension to the attack model in (\ref{eq:strategy-two}). In this model, the attacker places attacks whenever $l_{\mathrm{R}}(t)=0$, $\sum_{i=0}^{t-1}l_{\mathrm{M}}(i)\leq\frac{t+1}{\tau}-1$, and $\ln V(x(t))\leq\zeta$. From the simulations with $\zeta=50$ and $\tau=3$, we see that the state does not diverge, but the attacker is able to keep it around the level identified with $\ln V(x(t))=\zeta$ (see Fig. \ref{Flo:lnvcase2tauk175-statedependent}). We also observe that in the long run, the average number of packet failures approaches $\frac{2}{3}$. We remark that $\frac{2}{3}$ is a critical value for this example in the sense that $\rho<\frac{2}{3}$ in (\ref{eq:betaandvarphicond}) implies convergence of the state, and $\sigma>\frac{2}{3}$ in (\ref{eq:betaandvarphicond-1}) implies divergence. \begin{figure}[t] \begin{center}\includegraphics[width=0.95\columnwidth]{logv_50_1000_sample_v}\end{center}\vskip -20pt\caption{Sample paths of $\ln V(x(\cdot))$ under state-dependent attacks } \vskip -16pt \label{Flo:lnvcase2tauk175-statedependent} \end{figure} Finally, we show that by redesigning the feedback gain $K$, we can reensure closed-loop system stability. To this end we set $K=-1.9$. It follows from Theorem~\ref{TheoremMain} that the event-triggered control law (\ref{eq:control-input}), (\ref{eq:attemptedpacketexchangetimes}) with $P=1$, $\beta=0.01$, guarantees \emph{almost sure asymptotic stability} of the closed-loop system. This can be checked as follows. By Lemma~\ref{JammingLemma}, the attack strategy (\ref{eq:strategy-two}) and its extension above satisfy (\ref{eq:general-attack-condition}) with $\rho_{\mathrm{M}}=0.3334$. Now, note that $p_{1}+\rho_{\mathrm{M}}<0.744$. Since $l_{\mathrm{R}}(\cdot)$ and $l_{\mathrm{M}}(\cdot)$ are \emph{not }independent, it follows from Proposition~\ref{PropositionDependentCombinedCase} that (\ref{eq:lcond1}) of Assumption~\ref{MainAssumption} holds for $\rho=0.744$, which implies (\ref{eq:long-run-average-bound}) through Lemma~\ref{key-lemma1}. Notice that Proposition~\ref{PropositionDependentCombinedCase} provides a tight bound ($\rho=0.744$) for the average number of packet exchange attempt failures for the attack strategy (\ref{eq:strategy-two}) (Fig.~\ref{Flo:lcase2}). Moreover, (\ref{eq:betacond})--(\ref{eq:betaandvarphicond}) hold with $P=1$, $\beta=0.01$, and $\varphi=4$. \section{Conclusion } In this paper, we explored control of linear dynamical systems over networks that face random packet losses and malicious attacks. We proposed a probabilistic characterization of the evolution of the total number of packet exchange failures. Based on this characterization, we obtained sufficient conditions for almost sure asymptotic stabilization and presented a method for finding a stabilizing feedback gain and parameters for our proposed event-triggered control framework. Furthermore, to investigate potential cyber risks in networked control operations, we studied the problem from the perspective of an attacker. We obtained conditions under which combined effects of random and malicious packet losses can destabilize the closed-loop system. The framework developed in this paper has been utilized to investigate the \emph{output feedback control} problem in \cite{cetinkaya2015output}. The probabilistic characterization developed in this paper is utilized there for modeling random and malicious packet losses in transmission of the output information from the plant sensors to the estimator in the controller side. A direction for future research is to explore the networked control problem when wireless communication is used. There, several communication nodes and routers can be involved, and some of them may be compromised by adversaries. Our proposed network model can be incorporated to describe random failures and malicious attacks observed in such problems \cite{ahmetnecsys2016}. Furthermore, there are other important issues discussed in the networked control literature such as system and measurement noise \cite{hespanha2007}, transmission delays \cite{schenato2007,donkers2011}, and the modeling of the communication protocol \cite{schenato2007,smarra2015}. Investigation of these issues within our framework remains as a future work. \bibliographystyle{ieeetr}
{'timestamp': '2016-06-17T02:12:40', 'yymm': '1606', 'arxiv_id': '1606.05245', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05245'}
arxiv
\subsection{Related Work} \label{sec:related-work} Calculating optimal solutions to POMDP is computationally intractable (PSPACE-complete) \cite{Papadimitriou87math} for all but the smallest problems. The vast research area of approximate approaches (with reduced computational complexity) can be roughly segmented into point-based value iteration methods \cite{Pineau06jair, Kurniawati08rss}, simulation based \cite{Stachniss05rss} and sampling based approaches \cite{Prentice09ijrr, Bry11icra, AghaMohammadi14ijrr}, and direct trajectory optimization \cite{VanDenBerg12ijrr, Patil14wafr, Indelman15ijrr} methods. In all cases, finding the (locally) optimal actions involves evaluating a given objective function while considering future observations to be acquired as a result of each candidate action. They all assume \texttt{DAS}{}. For example, it is typically assumed that the robot can be localised by making observations of known landmarks or beacons (see, e.g.~\cite{Prentice09ijrr, AghaMohammadi14ijrr}), while assuming to correctly associate each future measurement with an appropriate landmark. Though reasonable in certain scenarios, \texttt{DAS}{} becomes unrealistic in the presence of perceptually aliased environments (two scenes that look alike) and localisation uncertainty, as in this work. The issue of perceptual aliasing has been considered in the earlier works on POMDP planning, though again with highly simplified scenarios, since the data-association further complicates the problem. In a slightly separate line of research, the approaches that study the issue were in the context of multiple hypothesis tracking(see~\cite{Reid79itac} for earliest work on MHT) or more recently, of active robust perception. Both these approaches rely on passive and often non-parametric approaches, through various filtering techniques; we refer an interested reader to the book~\cite{Jazwinsky70} and tutorial~\cite{Arulampalam02} for further details. For example, \cite{Vo06tsp} proposed using Gaussian mixture probability hypothesis density (PHD) filter. To the best of our knowledge, such approaches are not considered in the context of active planning. Coming back to scalable planning methods such as BSP, we note that while the traditional BSP approaches had typically assumed the environment to be accurately known (e.g.~a given map), recent works, including \cite{Chaves14iros, Chaves15iros, Walls15iros, Kim14ijrr, Indelman15ijrr}, relax this assumption and model the uncertainty of the environment mapped thus far within the belief. The corresponding framework is thus tightly related to active SLAM, with the well known trade-off between exploration and exploitation. Recent work \cite{Kim14ijrr, Indelman15ijrr, Chaves15iros, Walls15iros} in this branch focused in particular on probabilistically modelling what future observations will be obtained given a candidate action. Though none of them relax \texttt{DAS}{} assumption. In the last few years, the SLAM research community has investigated approaches to be resilient to false data association (outliers) overlooked by front-end algorithms (e.g.~image matching), see e.g.~\cite{Sunderhauf12icra, Olson13ijrr, Carlone14iros, Indelman14icra, Indelman16csm}. However these approaches, also known as robust graph optimization approaches, are developed only for the passive problem setting, i.e.~robot actions are given and externally determined. In contrast, we consider a complimentary \emph{active} framework that incorporates data association aspects within BSP. Our approach is also tightly related with recent work on active hypothesis disambiguation in the context object detection and classification \cite{Atanasov14tro, Sankaran15arxiv, Lauri15rssws, Wong15ijrr, Patten16ral}. Given hypotheses regarding object class and pose, these approaches aim to find a sequence future viewpoints that will lead to disambiguation, i.e.~identifying the correct hypothesis. However, these approaches assume the sensor is perfectly localized and can be shown to be a specific case of DA-BSP. Probably the closest work to our approach is by Agarwal et al.~\cite{Agarwal15arxiv}, where the authors also consider hypotheses due to ambiguous data association and develop a BSP approach for active disambiguation. However, unlike them, DA-BSP considers ambiguous data association also in posterior and thus does not require a guarantee of fully disambiguating action in the future. \subsection{Contributions} To summarize, our main contributions in this paper\footnote{Earlier versions of this paper appeared in \cite{Pathak16icra_ws} and \cite{Pathak16ecai}.} are as follows: (a) relaxing the data-association-is-solved assumption for a general data-association aware BSP framework (DA-BSP) with GMM priors (b) considering active data-association aspect for both planning and inference, hence providing a closed-loop framework (c) reducing some of the known recent BSP approaches to a degenerate cases of DA-BSP (d) demonstrating empirical results in support of two claims: data-association is crucial for a robust BSP and the principled approach of DA-BSP can be scalable enough to be applied on practical problems. \subsection{Computing the term (a) : $\mathbb{P}(z_{k+1}|\mathcal{H}_{k+1}^-)$}\label{sec:TermA} Applying total probability over non-overlapping scene space $\ensuremath{\{\event{\mathbb{N}}\}}\xspace$ and marginalizing over all possible robot poses, yields \begin{equation} \prob{z_{k+1} | \mathcal{H}_{k+1}^-} \!\! \equiv \!\! \sum_i^{|A_{\mathbb{N}}|} \! \int_x \! \prob{z_{k+1}, x, A_i \! \mid \! \mathcal{H}_{k+1}^-} \!\! \doteq \!\! \sum_i^{|A_{\mathbb{N}}|} \!\! w_{k+1}^i. \label{eq:TermA_Wi} \end{equation} As seen from the above equation, to calculate the likelihood of obtaining some observation $z_{k+1}$, we consider separately, for each scene $A_i \in \ensuremath{\{\event{\mathbb{N}}\}}\xspace$, the likelihood that this observation was generated by scene $A_i$. This probability is captured for each scene $A_i$ by a corresponding weight $w_{k+1}^i$; these weights are then summed to get the actual likelihood of observation $z_{k+1}$. As will be seen below, these weights naturally account for perceptual aliasing aspects for each considered $z_{k+1}$. In practice, instead of considering the entire scene space \ensuremath{\{\event{\mathbb{N}}\}}\xspace that could be huge, the availability of the belief $b[X_{k+1}^-]$ makes it possible to consider only those scenes that could be actually observed from viewpoints with non-negligible probability according $b[X_{k+1}^-]$, e.g.~within $3$ standard deviations of uncertainty for each GMM component. In the following, however, we proceed while reasoning about the entire scene space \ensuremath{\{\event{\mathbb{N}}\}}\xspace. Proceeding with the derivation further, using the chain rule we compute \begin{equation} \sum_i \int_x \prob{z_{k+1} \mid x, A_i, \mathcal{H}_{k+1}^-} \prob{A_i, x \mid \mathcal{H}_{k+1}^-} \end{equation} However, since $\prob{A_i, x \mid \mathcal{H}_{k+1}^-} = \prob{A_i | x \mid \mathcal{H}_{k+1}^-} b[x_{k+1}^- = x]$, we get \begin{equation} \sum_i^{|A_{\mathbb{N}}|} \int_x \prob{z_{k+1} | x, A_i, \mathcal{H}_{k+1}^-} \prob{A_i | \mathcal{H}_{k+1}^-, x } b[x_{k+1}^-=x]. \end{equation} Thus, \begin{eqnarray} w_{k+1}^i \! \doteq \!\! \int_x \! \!\prob{z_{k+1} | x, A_i, \mathcal{H}_{k+1}^-} \prob{A_i | \mathcal{H}_{k+1}^-, x } b[x_{k+1}^-\!\!=\!x]. \label{eq:wi_def} \end{eqnarray} Since the propagated belief (\ref{eq:PredictedBelief_step1GMM}), from which $b[x_{k+1}^-]$ is calculated, is a GMM, we can replace $b[x_{k+1}^-=x]$ with $\sum_{j=1}^{M_k} \xi_{k+1,j}^- b[x_{k+1,j}^-=x]$. Here, $\prob{z_{k+1} \mid \event{i}, x, \mathcal{H}_{k+1}^-}\equiv \prob{z_{k+1} \mid \event{i}, x}$ is the standard measurement likelihood term, while $\prob{\event{i}\mid \mathcal{H}_{k+1}^-,x}$ represents the \emph{event likelihood}, which denotes the probability of scene $A_i$ to be observed from viewpoint $x$. In other words, this scenario-dependent term encodes from what viewpoints each scene $A_i$ is observable and could also model occlusion and additional aspects. As such, this term can be determined given a model of the environment and thus, in this work, we consider this term to be given. The weights $w_{k+1}^i$ (\ref{eq:wi_def}) naturally capture \emph{perceptual aliasing} aspects: consider some observation $z_{k+1}$ and the corresponding generative model $z_{k+1}=h(x^{tr},A^{tr})+v$ with appropriate unknown \emph{true} robot pose $x^{tr}$ and scene $A^{tr}\in \ensuremath{\{\event{\mathbb{N}}\}}\xspace$. Clearly, the measurement likelihood $\prob{z_{k+1} \mid x, A_i, \mathcal{H}_{k+1}^-}$ will be high when evaluated for $A_i=A^{tr}$ and in vicinity of $x^{tr}$. Note that we will necessarily consider such a case, since according to Eq.~(\ref{eq:TermA_Wi}) we separately consider each scene $A_i$ in \ensuremath{\{\event{\mathbb{N}}\}}\xspace, and, given $A_i$, we reason about all poses $x$ in Eq.~(\ref{eq:wi_def}). In case of perceptual aliasing, however, there will be also another scene(s) $A_j$ which could generate the same observation $z_{k+1}$ from appropriate robot pose $x'$. Thus, the corresponding measurement likelihood term to $A_j$ will also be high for $x'$. However, the actual value of $w_i$ (for each $A_i \in \ensuremath{\{\event{\mathbb{N}}\}}\xspace$) depends, in addition to the measurement likelihood, also on the mentioned-above event likelihood and on the GMM belief $b[x_{k+1}^-]$, with the latter weighting the probability of each considered robot pose $x$. This correctly captures the intuition that those observations $z$ with low-probability poses $b[x_{k+1}^-=x^{tr}]$ will be unlikely to be actually acquired, leading to low value of $w_i$ with $A_i=A^{tr}$. Since $b[x_{k+1}^-]$ is a GMM with $M_k$ components, low-probability pose $x^{tr}$ corresponds to low probabilities $b[x_{k+1}^{j-}=x^{tr}]$ for each component $j\in\{1,\ldots,M_k\}$. However, the likelihood term (\ref{eq:TermA_Wi}) could still go up in case of perceptual aliasing, where the aliased scene $A_j$ generates a similar observation to $z_{k+1}$ from viewpoint $x'$ with latter being more probable, i.e.~high probability $b[x_{k+1}^-=x']$. In practice, calculating the integral in Eq.~(\ref{eq:wi_def}) can be done efficiently considering separately each component of the GMM $b[x_{k+1}^-]$. Each such component is a Gaussian that is multiplied by the measurement likelihood $\prob{z_{k+1} \mid \event{i}, x, \ensuremath{{\cal H}}\xspace}$ which is also a Gaussian and it is known that a product of Gaussians remains a Gaussian. The integral can then be only calculated for the window where event likelihood is non-zero i.e $\prob{\event{i} \mid x, \ensuremath{{\cal H}}\xspace} > 0$. For general probability distributions, the integral in Eq.~(\ref{eq:wi_def}) should be computed numerically. Since in practical applications $\prob{\event{i} \mid x, \ensuremath{{\cal H}}\xspace}$ is sparse w.r.t. $x$, this computational cost is not severe. \subsection{Computing the term (b) : $\prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}}$}\label{sec:TermB} The term $(b)$, $\prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}}$, represents the posterior probability conditioned on observation $z_{k+1}$. This term can be similarly calculated, with a key difference: since the observation $z_{k+1}$ is given, it must have been generated by \emph{one} specific (but unknown) scene $A_i$ according to measurement model (\ref{eq:MotionObsModel}). Hence, also here, we consider all possible such scenes and weight them accordingly, with weights $\tilde{w}_{k+1}^i$ representing the probability of each scene $A_i$ to have generated the observation $z_{k+1}$. As will be seen next, the posterior $\prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}}$ is a GMM with $M_{k+1}$ components. Applying total probability over non-overlapping \ensuremath{\{\event{\mathbb{N}}\}}\xspace and chain-rule, we get: \begin{equation} \prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}} = \sum_{i=1}^{|A_{\mathbb{N}}|} \prob{X_{k+1} \mid \mathcal{H}_{k+1}^-, z_{k+1}, \event{i}} \cdot \prob{\event{i} \mid \mathcal{H}_{k+1}^-, z_{k+1}}. \end{equation} The first term, $\prob{X_{k+1} \mid \mathcal{H}_{k+1}^-, z_{k+1}, \event{i}}$, is the posterior belief conditioned on observation $z_{k+1}$, history $\mathcal{H}_{k+1}^-$, as well as a candidate scene \event{i} that supposedly generated the observation $z_{k+1}$. It is not difficult to show that this posterior is actually the GMM \begin{equation} \prob{X_{k+1} \mid \mathcal{H}_{k+1}^-, z_{k+1}, \event{i}} = \sum_{j=1}^{M_k}\xi_{k}^j b[X_{k+1}^{j+}|A_i], \label{eq:PosteriorGMM} \end{equation} where $b[X_{k+1}^{j+}|A_i]\doteq \mathbb{P}(X_{k+1}|\mathcal{H}_{k+1}^-,\gamma=j, A_i, z_{k+1})$ is the posterior of the $j$th GMM component of the propagated belief $b[X_{k+1}^{-}]$, see Eq.~(\ref{eq:PredictedBelief_step1GMM}). Plugging in Eq.~(\ref{eq:PosteriorGMM}) back into $\prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}}$ yields from Eq.~(\ref{eq:Posterior_givenAi}): \begin{equation} b[X_{k+1}]\equiv\prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}} = \sum_{i=1}^{|A_{\mathbb{N}}|} \sum_{j=1}^{M_k}\xi_{k}^j \prob{\event{i} \mid \mathcal{H}_{k+1}^-, z_{k+1}} b[X_{k+1}^{j+}|A_i]. \label{eq:Posterior_BeforePrun} \end{equation} The term, $\prob{\event{i} \mid \ensuremath{{\cal H}}\xspace_k, u_k, z_{k+1}}$, is merely the likelihood of \event{i} being actually the one which generated the observation $z_{k+1}$. This term can be evaluated, in a similar fashion to Section \ref{sec:TermA}, accounting for $b[x_{k+1}^{j-}]$ for each considered $j$th component as $\prob{\event{i} \mid \mathcal{H}_{k+1}^-, z_{k+1}} = \int_x \prob{\event{i}, x \mid \mathcal{H}_{k+1}^-, z_{k+1}}$, and applying Bayes' rule yields \begin{equation} \tilde{w}_{k+1}^{ij} \!\! \doteq \! \eta' \!\!\! \int_x \!\! \prob{\! z_{k+1} | A_i, x, \mathcal{H}_{k+1}^-\!} \prob{A_i | \mathcal{H}_{k+1}^-, x \!} b[x_{k+1}^{j-} \!\!=\! x], \label{eq:WeightGMMcomponent} \end{equation} with $\eta' = 1/ \prob{z_{k+1} \mid \mathcal{H}_{k+1}^-}$. Note that for each component $j$, $\sum_i \tilde{w}_{k+1}^{ij}=1$. Finally, we can re-write Eq.~(\ref{eq:Posterior_BeforePrun}) as \begin{equation} \prob{X_{k+1}|\mathcal{H}_{k+1}^-,z_{k+1}\!} \!= \!\! \sum_{r=1}^{M_{k+1}} \!\! \xi_{k+1}^r \mathbb{P}(\!X_{k+1}|\mathcal{H}_{k+1},\gamma=r\!), \label{eq:Posterior_afterPrune} \end{equation} or in short, $b[X_{k+1}] = \sum_{r=1}^{M_{k+1}} \xi_{k+1}^r b[X_{k+1}^{r+}]$, where \begin{equation} \xi_{k+1}^r \doteq \xi_{k+1}^{ij} \equiv \xi_{k}^j \tilde{w}_{k+1}^{ij} \ \ , \ \ b[X_{k+1}^{r+}]\doteq b[X_{k+1}^{j+}|A_i]. \label{eq:WeightGMMcomponent_final} \end{equation} As seen, we got a new GMM with $M_{k+1}$ components, where each component $r\in [1,M_{k+1}]$, with appropriate mapping to indices $(i,j)$ from Eq.~(\ref{eq:Posterior_BeforePrun}), is represented by weight $\xi_{k+1}^r$ and posterior conditional belief $b[X_{k+1}^{r+}]$. The latter can be evaluated as the Gaussian $b[X_{k+1}^{r+}] \propto b[X_{k+1}^{j-}] \prob{z_{k+1} \mid x_{k+1}, A_i}=\mathcal{N}(\hat{X}^{r}_{k+1}, \Sigma^{r}_{k+1})$, where the mean $\hat{X}^{r}_{k+1}$ and covariance $\Sigma^{r}_{k+1}$ can be efficiently recovered via MAP inference. \subsection{Summary thus Far} To summarize the discussion thus far, we have shown that for the myopic case, the objective function (\ref{eq:cost_function}) can be re-written as \begin{equation} J(u_k) = \int_{z_{k+1}} (\sum_i^{|A_{\mathbb{N}}|} w_{k+1}^i) \cdot c\left(\sum_r^{M_{k+1}} \xi_{k+1}^r b[X_{k+1}^{r+}] \right). \label{eq:ObjFuncNew} \end{equation} One can observe that according to Eq.~(\ref{eq:Posterior_BeforePrun}), each of the $M_k$ components from the belief at a previous time, is split into $|A_{\mathbb{N}}|$ new components with appropriate weights. This would imply an explosion in the number of components, making the proposed framework hardly applicable. However, in practice, the majority of the weights will be negligible, and therefore can be pruned, while the remaining number of components is denoted by $M_{k+1}$ in Eq.~(\ref{eq:Posterior_afterPrune}). Depending on the scenario and the degree of perceptual aliasing, this can correspond to \emph{full} or \emph{partial} disambiguation. Having shown incorporating data association within belief space planning leads to Eq.~(\ref{eq:ObjFuncNew}), we now proceed with the exposition of our approach. \subsection{Simulating Future Observations $\{z_{k+1}\}$ given $b[X_{k+1}^-]$} \label{sec:SimObservations} Calculating the objective function (\ref{eq:ObjFuncNew}) for each candidate action $u_k$ involves considering all possible realizations of $z_{k+1}$. One approach to perform this in practice, is to simulate future observations $\{z_{k+1}\}$ given propagated GMM belief $b[X_{k+1}^-]$, scenes $\ensuremath{\{\event{\mathbb{N}}\}}\xspace$ and observation model (\ref{eq:MotionObsModel}). One can then evaluate Eq.~(\ref{eq:ObjFuncNew}) considering all observations in $\{z_{k+1}\}$. We now briefly describe how this concept can be realised. First, viewpoints $\{x\}$ are sampled from $b[X_{k+1}^-]$. For each viewpoint $x \in \{x\}$, an observed scene $A_i$ is determined according to event likelihood $\prob{\event{i}\mid \mathcal{H}_{k},x}$. Together, $x$ and $A_i$ are then used to generate nominal $\hat{z}=h(x,A_i)$ and noise-corrupted observations $\{z\}$ according to observation model (\ref{eq:MotionObsModel}): $z=h(x,A_i)+v$. The set $\{z_{k+1}\}$ is then the union of all such generated observations $\{z\}$. Note that while generating $\{z_{k+1}\}$, the true association is known (scene $A_i$), it is unknown to our algorithm, i.e.~while evaluating Eq.~(\ref{eq:ObjFuncNew}). \subsection{Computing Mixture of Posterior Beliefs $\sum_i \tilde{w}_i b[X_{k+1}^{i+}]$} As seen from Eq.~(\ref{eq:ObjFuncNew}), reasoning about data association aspects resulted in a mixture of posteriors within the cost $c(.)$, i.e.~$\sum_i \tilde{w}_i b[X_{k+1}^{i+}]$, for each possible observation $z_{k+1}\in \{z_{k+1}\}$. In this section we briefly describe how one can actually calculate the corresponding posterior distributions, given some specific observation $z_{k+1}\in \{z_{k+1}\}$. For simplicity, we consider the belief at planning time $k$ is a Gaussian $b[X_k]=\mathcal{N}(\hat{X}_k, \Sigma_k)$. However, our approach could be applied also to more general cases (e.g.~mixture of Gaussians) with a certain price in terms of computational complexity. Further investigation of these aspects is left to future research. Under this setting, each of the components $b[X_{k+1}^{i+}]$ in the mixture pdf can be written as $b[X_{k+1}^{i+}] \propto b[X_{k}] \prob{x_{k+1} \mid x_k, u_k} \prob{z_{k+1} \mid x_{k+1}, A_i}$. It is then not difficult to show that the above belief is a Gaussian $b[X_{k+1}^{i+}] = \mathcal{N}(\hat{X}^{i}_{k+1}, \Sigma^{i}_{k+1})$ and to find its first two moments via MAP inference. Obviously, the mixture of posterior beliefs in the cost $c(.)$ from Eq.~(\ref{eq:ObjFuncNew}) is now a mixture of Gaussians: \begin{eqnarray} \sum_i \tilde{w}_i b[X_{k+1}^{i+}] = \sum_i \tilde{w}_i \mathcal{N}(\hat{X}^{i}_{k+1}, \Sigma^{i}_{k+1}). \label{eq:mixtureGaussians} \end{eqnarray} \subsection{Designing a Specific Cost Function} \label{sec:design-specific-cost} The treatment so far has been agnostic to the structure of the cost function $c(.)$. Recalling Eq.~(\ref{eq:ObjFuncNew}) we see that the belief over which the cost function is defined, is multimodal in general. Standard cost functions in literature, typically include terms such as control usage $c_u$, distance to goal $c_G$ and uncertainty $c_{\Sigma}$, see e.g.~\cite{VanDenBerg12ijrr, Indelman15ijrr}. In our case, however, the specific form of the latter should be re-examined and an additional term quantifying ambiguity level can be introduced. In this section we thus briefly discuss these two terms, starting with the cost over posterior uncertainty. Since, unlike in usual BSP, the posterior belief in our case is multimodal and represented as mixture of Gaussians $\sum_i \tilde{w}_i \mathcal{N}(\hat{X}^{i}_{k+1}, \Sigma^{i}_{k+1})$, see Eq.~(\ref{eq:mixtureGaussians}), we could define several different cost structures depending on how we treat the different modes. Two particular such costs are taking the worst-case covariance among all covariances $\Sigma^{i}_{k+1}$ in the mixture, e.g.~$\Sigma=\max_i \{tr(\Sigma_i)\}$, or to collapse the mixture into a single Gaussian $\mathcal{N}(., \Sigma)$, see e.g.~\cite{BarShalom04book}. In both cases, we can define the cost due to uncertainty as $c_\Sigma = trace(\hat\Sigma)$. The cost due to ambiguity, $c_w$, should penalise ambiguities such as those arising out of perceptual aliasing. Here, we note that non-negligible weights $w_i$ in Eq.~(\ref{eq:ObjFuncNew}) arise due to perceptual aliasing, whereas in case of no aliasing, all but one of these weights are zero. In most severe case of aliasing (all scenes or objects $A_i$ are identical), all of these weights are comparable among each other. Thus we take Kullback-Leibler divergence $KL_u(\{\tilde{w}_i\})$ of these weights $\{\tilde{w}_i\}$ from a uniform distribution to penalise higher aliasing, and define $c_w(\{\tilde{w}_i\})\doteq \frac{1}{ KL_u(\{\tilde{w}_i\})+\epsilon}$, where $\epsilon$ is a small number to avoid division-by-zero in case of extreme perceptual aliasing. With user-defined weights $M_u, M_G, M_{\Sigma}$ and $M_w$, the overall cost then can be defined as a combination \begin{equation} c \doteq M_uc_u + M_Gc_G + M_{\Sigma} c_\Sigma + M_w c_w, \label{eq:overall_cost} \end{equation} \subsection{Formal Algorithm for DA-BSP} We now have all the ingredients to present the overall framework of data-association aware belief space planning, calling it DA-BSP for brevity. It is summarised in Algorithm~\ref{alg:bsp-no-da} and briefly described below. Given a GMM belief $b[X_k]$ and candidate action $u_k$, we first propagate the belief to get $b[X_{k+1}^-]$ and then simulate future observations $\{z_{k+1}\}$ (line \ref{lst:line:sim-msr}). The algorithm then calculates the contribution of each observation $z_{k+1}\in \{z_{k+1}\}$ to the objective function (\ref{eq:ObjFuncNew}). In particular, on lines \ref{lst:line:compute-wt} and \ref{lst:line:compute-wt_accum} we calculate the weights $w_{k+1}^i$ that are used in evaluating the likelihood $w_s$ of obtaining observation $z_{k+1}$. On lines \ref{lst:line:eval_posterior-start}-\ref{lst:line:eval_posterior-end} we compute the posterior belief: this involves updating each $j$th component from the propagated belief $b[X_{k+1}^{j-}]$ with observation $z_{k+1}$, considering each of the possible scenes $A_i$. After pruning (line \ref{lst:line:pruning}), this yields a posterior GMM with $M_{k+1}$ components. We then evaluate the cost $c(.)$ (line \ref{lst:line:evaluate-cost}) and use $w_s$ to update the value of the objective function $J$ with the weighted cost for measurement $z_{k+1}$ (line \ref{lst:line:updateJ}). \begin{algorithm} \scriptsize \caption{Data association aware belief-space planning \label{alg:bsp-no-da}} \begin{algorithmic}[1] \Require{Current GMM belief $b[X_k]$ at step-$k$, history $\ensuremath{{\cal H}}\xspace_k$, action $u_k$, scenes \ensuremath{\{\event{\mathbb{N}}\}}\xspace, event likelihood $\prob{\event{i}\mid \mathcal{H}_{k},x}$ for each $A_i\in\ensuremath{\{\event{\mathbb{N}}\}}\xspace$} \Statex \Let{$b[X_{k+1}^-]$}{$b[X_k] \prob{x_{k+1} \mid x_k,u_k}$} \Comment{Eq.~(\ref{eq:PredictedBelief_step1GMM})} \Let{$\{z_{k+1}\}$}{ {\tt SimulateObservations}($b[X_{k+1}^-]$, \ensuremath{\{\event{\mathbb{N}}\}}\xspace)}\label{lst:line:sim-msr} \Let{$J$}{0} \For{$\forall z_{k+1} \in \{z_{k+1}\}$} \Let{$w_s$}{0} \For{$i \in [1\dots |\event{}|]$} \LineComment{{compute weight}, Eq.~(\ref{eq:wi_def})} \Let{$w^i_{k+1}$}{{\tt CalcWeights}($z_{k+1},\prob{\event{i}\mid \mathcal{H}_{k+1}^-,x}, b[X_{k+1}^-]$)}\label{lst:line:compute-wt} \Let{$w_s$}{$w_s + w_i$} \label{lst:line:compute-wt_accum} % \For{$\forall j \in [1,\ldots,M_k]$} \label{lst:line:eval_posterior-start} \LineComment{{compute weight $\tilde{w}^{ij}_{k+1}$ for each GMM component}, Eq.~(\ref{eq:WeightGMMcomponent})} \Let{$\tilde{w}^{ij}_{k+1}$}{{\tt CalcWeights}($z_{k+1},\prob{\event{i}\mid \mathcal{H}_{k+1}^-,x}, b[X_{k+1}^{j-}]$)} \Let{$\xi_{k+1}^{ij}$}{$\xi_{k}^j \tilde{w}_{k+1}^{ij}$} \Comment{Eq.~(\ref{eq:WeightGMMcomponent_final})} % \LineComment{Calculate posterior of $b[X_{k+1}^{j-}]$, given $A_i$} \Let{$b[X_{k+1}^{ij+}]$}{ {\tt UpdateBelief}($b[X_{k+1}^{j-}], z_{k+1}, A_i$)}\label{lst:line:conditional-posterior} \EndFor \label{lst:line:eval_posterior-end} % % % \EndFor % \State{Prune components with weights $\xi_{k+1}^{ij}$ below a threshold} \label{lst:line:pruning} % % \State{{Construct $b[X_{k+1}^{+}]$ from the remaining $M_{k+1}$ components} via Eq.~(\ref{eq:Posterior_afterPrune})} % \Let{$c$}{ {\tt CalcCost}($b[X_{k+1}^{+}]$)} \Comment{Eq.~\ref{eq:overall_cost} }\label{lst:line:evaluate-cost} \Let{$J$}{$J+w_s\cdot c$} \label{lst:line:updateJ} \EndFor % \State \Return{$J$} \end{algorithmic} \end{algorithm} \subsection{An Abstract Example for DA-BSP} Consider the problem of robotic manipulation of objects in the kitchen. For simplicity, let us abstract it to a simpler domain of three objects, $|\ensuremath{\{\event{\mathbb{N}}\}}\xspace| = 3$. We consider a single step control at time step $k$, from a given belief $b[X_k]$, as well as that of one step ahead $b[X_{k+1}^-]$, and assume the following motion and observation models $f$ and $h$ \begin{align} \label{eq:models} \begin{split} f(x,u) = \left( \begin{array}{cc} 1 & 0\\0 & 1 \end{array}\right) \cdot x + d \; \bigg\{ \begin{array}{cr} [0, 1]^T & \text{if ${u}$ = \emph{up}} \\ \relax [1, 0]^T & \text{if $u$ = \emph{right}} \\ \end{array}, \\ h(x, A_i) = h_i(x) = \left( \begin{array}{cc} 1 & 0\\0 & 1 \end{array}\right) \cdot (x - x_i) + s_i. \end{split} \end{align} where observations as well as the shift $s_i$ is in an object-centric frame, with $x_i$ representing location of $A_i$. Intuitively, $s_i$ is a simple mechanism to model perceptual aliasing between objects; e.g., identical objects $A_i$ would have the same $s_i$. Figure \ref{fig:obs_generative} illustrates the process of simulating future observations $\{z_{k+1}\}$ for ${u}_k$ = \emph{up}, considering unique and perceptually aliased scenes (Figures~\ref{fig:obs_no_alias}-\ref{fig:obs_alias}). In particular, a sampled pose $x^{tr}$ used to generate an observation $z_{k+1}\in \{z_{k+1}\}$ is shown in Figure~\ref{fig:gen_xk1}. Figure \ref{fig:toy-posteriors} demonstrates key aspects in our approach, considering each time a single observation $z_{k+1}$. Our approach reasons about data association and hence we consider each $z_{k+1}$ could have been generated by one of the 3 objects; each such association would fetch us a conditional posterior belief $b[X^{i+}_{k+1}]$ as denoted by small ellipses. Finally, we compute the total cost according to Algorithm~\ref{alg:bsp-no-da}. \newcommand{\myfig}[2]{\includegraphics[trim=0.5cm 6cm 0.5cm 6cm,scale=#1]{#2}} \renewcommand{\myfig}[2]{\includegraphics[scale=#1]{#2}} \begin{figure*} \centering \subfloat[Sampled viewpoints]{ \myfig{0.25}{generative_X.pdf} \label{fig:gen_x}}\hspace{0.1\linewidth} \subfloat[Event likelihood $\prob{A_i|x,\mathcal{H}}$ $\forall i$]{ \includegraphics[trim=0.5cm 6cm 0.5cm 6cm,scale=0.25]{center_describe_events.pdf} \label{fig:gen_xk1}}\\ \subfloat[No aliasing, \alias{\Phi}]{ \myfig{0.25}{generative_no_alias.pdf} \label{fig:obs_no_alias}}\hspace{0.1\linewidth} \subfloat[$\alias{\event{1},\event{3}}$]{ \myfig{0.25}{generative_1_w_2.pdf} \label{fig:obs_alias}} \caption{ Pose and observation space. (a) black-colored samples $\{x_{k}\}$ are drawn from $b[X_k]\doteq{\cal N}([0,0]^T, \Sigma_k)$, from which, given control $u_k$, samples $\{x_{x+1}\}$ are computed, colored according to different scenes \event{i} being observed, and used to generate observations $\{z_{k+1}\}$. (b) Stripes represent locations from which each scene $A_i$ is observable, histogram represents distribution of $\{x_{x+1}\}$, which corresponds to $b[X^-_{k+1}]$. (c)-(d) distributions of $\{z_{k+1}\}$ without aliasing and when $\alias{\event{1},\event{3}}$. } \label{fig:obs_generative} \end{figure*} Figures~\ref{fig:posterior_NN_c}-\ref{fig:posterior_AA_c} denote the situation when the true pose $x^{tr}$ is close to center and observe \event{2}, while in Figures~\ref{fig:posterior_NN_s}-\ref{fig:posterior_AA_s} it is at the left side and observe \event{1}. Different degrees of aliasing are considered. Both weights $w_i$ and $\tilde w_i$ are shown in the inset histograms. Note that the unnormalised weight $w_i$ is higher when the object is at the centre, because the overall likelihood of the observation is higher. Also, with no aliasing, for any other scene \event{j} than the true one, the normalised weight $w_j$ is small irrespective of where $x^{tr}$ is. In other words, weights are also related to how likely the objects are to be the causes behind an observation; in case of no aliasing, this can be negligibly small. This is crucial since it implies that DA-BSP in practical applications with infrequent aliasing, would not require any significant additional computational effort w.r.t.~usual BSP. \renewcommand{\myfig}[1]{\includegraphics[trim=0.5cm 6cm 0.5cm 6cm,scale=0.19]{#1}} \begin{figure*} \centering \subfloat[\scriptsize No aliasing i.e., $\alias{\Phi}$, $A^{tr}\!\!=\!\!A_2$]{ \myfig{center_no_alias.pdf}\label{fig:posterior_NN_c}} \subfloat[\scriptsize $\alias{\event{1},\event{2}}$, $A^{tr}\!\!=\!\!A_2$]{ \myfig{center_1_w_2.pdf}\label{fig:posterior_TA1_c}} \subfloat[\scriptsize $\alias{\event{1},\event{3}}$, $A^{tr}\!\!=\!\!A_2$]{ \myfig{center_1_w_3.pdf}\label{fig:posterior_TA2_c}}\\ \subfloat[$\alias{\event{1},\event{2}, \event{3}}$, $A^{tr}\!\!=\!\!A_2$]{ \myfig{center_all_alias.pdf}\label{fig:posterior_AA_c}} \subfloat[\scriptsize $\alias{\Phi}$, $A^{tr}=A_1$]{ \myfig{side_no_alias.pdf}\label{fig:posterior_NN_s}} \subfloat[\scriptsize $\alias{\event{1},\event{2}}$, $A^{tr}\!\!=\!\!A_1$]{ \myfig{side_1_w_2.pdf}\label{fig:posterior_TA1_s}}\\ \subfloat[\scriptsize $\alias{\event{1}, \event{3}}$, $A^{tr}\!\!=\!\!A_1$]{ \myfig{side_1_w_3.pdf}\label{fig:posterior_TA2_s}} \subfloat[\scriptsize $\alias{\event{1},\event{2}, \event{3}}$, $A^{tr}\!\!=\!\!A_1$]{ \myfig{side_all_alias.pdf}\label{fig:posterior_AA_s}} \caption{ DA-BSP for a single observation $z_{k+1}$. Red-dotted ellipse denotes $b[X^-_{k+1}]$, while the true pose that generated $z_{k+1}$ is shown by inverted triangle. Smaller ellipses are the posterior beliefs $b[X^{i+}_{k+1}]$. \textbf{(a-d)} $x^{tr}$ is near center, observing $\event{2}$; \textbf{(e-f)} $x^{tr}$ is on the left, observing $\event{1}$. Weights $w_i$ and $\tilde{w}_i$, corresponding to each scene $\event{i}$ are shown in the inset bar-graphs.} \label{fig:toy-posteriors} \end{figure*} Figures~\ref{fig:posterior_TA1_c}-\ref{fig:posterior_AA_c} depict $\alias{\event{1},\event{2}}$, $\alias{\event{1},\event{3}}$ and $\alias{\event{1},\event{2}, \event{3}}$. When $\alias{\event{1},\event{3}}$, the weights $w_i$ are similar, and indeed our cost $c_w$ of weights (in Eq.~(\ref{eq:overall_cost})) is high. For similar uncertainty in pose, this cost would remain constant. Hence, in the presence of identical objects placed similarly within the current belief, optimization of general cost function would be guided towards \emph{active localization}. On the other hand, if one object $j$ lies closer to the current nominal pose, it will have slightly higher $w_j$. In case $\alias{\event{1},\event{2}, \event{3}}$, i.e.~\emph{all} objects are identical, the weights $w_i$ are simply an indication of the prior. This is reasonable since in such a case, considering different data association does not yield any new information. Finally, in Table~\ref{fig:eval_table}, we present the numerical analysis of cost computation (see Eq.~(\ref{eq:overall_cost})) of these configurations, as well as a metric $\{ \epsilon_{BSP}, \epsilon_{DA} \}$ quantifying estimation error, defined over incorrect (w.r.t ground-truth) associations through random sampling of various modes. Intuitively $\epsilon_{BSP} \text{ and } \epsilon_{DA}$ evaluate how \emph{good} the posterior mean is w.r.t. ground-truth $x^{tr}$ for usual BSP and DA-BSP respectively (lower is better). Recall that unlike action $u_1$, action $u_2$ leads to fully unambiguous observations, around most-likely value (see Fig.~\ref{fig:toy-posteriors}) and consequently, $\epsilon_{BSP} \simeq \epsilon_{DA}$. \begin{table}[ht] \centering \begin{threeparttable} \caption{Evaluating different cost functions for various configurations (see Fig.~\ref{fig:toy-posteriors})} \label{fig:eval_table} \scalebox{1}{ \resizebox{\columnwidth}{!}{% \begin{tabular}{ cc|cccc|cc|r } \hline \multicolumn{2}{c|}{\multirow{ 2}{*}{config}} & \multicolumn{4}{c|}{cost} & \multicolumn{2}{c|}{est. err.} & ${\cal U}$\\ \cline{3-9} \multicolumn{2}{c|}{} & worst & max-wt. & $KL_u$ & mode & $\epsilon_{BSP}$ & $\epsilon_{DA}$ & $u_1/u_2$\\ \cline{1-9} \multirow{ 8}{*}{} & $\alias{\Phi}$ & 0.0977 & 0.0977 & 0.3496 & 1.1000 & 1.0851 & 0.1717 & $u_1$ \\ & \alias{\Phi} & 0.1009 & 0.1009 & -na- & 1.0000 & 0.3461 & 0.3999 & $u_2$ \\ & \alias{\event{1},\event{2}, \event{3}} & 0.0508 & 0.0508 & 0.5072 & 3.0000 & 1.1654 & 0.4772 & $u_1$ \\ & \alias{\event{1},\event{2}, \event{3}} & 0.1009 & 0.1009 & -na- & 1.0000 & 0.3832 & 0.3990 & $u_2$ \\ & \alias{\event{1},\event{2}} & 0.0833 & 0.0833 & 0.3757 & 1.5500 & 1.2197 & 0.2114 & $u_1$ \\ & \alias{\event{1},\event{2}} & 0.1009 & 0.1009 & -na- & 1.0000 & 0.3912 & 0.3992 & $u_2$ \\ & \alias{\event{1}, \event{3}} & 0.0849 & 0.0849 & 0.3649 & 1.4000 & 1.0552 & 0.4197 & $u_1$ \\ & \alias{\event{1},\event{3}} & 0.1009 & 0.1009 & -na- & 1.0000 & 0.4101 & 0.3940 & $u_2$ \\ \hline \end{tabular}}} \end{threeparttable} \end{table} \subsection{Gazebo World} To demonstrate generality of DA-BSP, we compared (in simulation) it with current state of the art (denoted as \texttt{BSP}) and the approach proposed in \cite{Agarwal15arxiv}. For the latter case (see Fig.~\ref{fig:counter-example}), we have a simulated environment of rectangular corridors with shelfs($s_i$) and elevator($e$), where a pioneer robot has a non-Gaussian belief prior (shown with $p_1$, $p_2$); as it can be in either of the two corridors, with localization as its objective. We evaluate our algorithm for inference (\texttt{infer}) as well as active planning (\texttt{plan}) (see Table \ref{fig:eval_da_bsp}). The absence of pose uncertainty, which is the case in \cite{Agarwal15arxiv}, would lead us to a wrong inference and estimate the robot to be at pose $p_1$ (corridor 1) initially, whereas our approach which considers pose uncertainty will lead to correct inference with high weight for being in corridor 2 (Fig.~\ref{fig:counter-example}). \renewcommand{\myfig}[2]{\includegraphics[scale=#1]{#2}} \begin{figure*} \centering \subfloat[Four floors]{ \myfig{0.25}{four_floors} \label{fig:four_floors}} \subfloat[Counter-example]{ \myfig{0.135}{gazebo_world} \label{fig:counter-example}} \caption{ Using Pioneer robot in Gazebo simulation. (a) four-floor aliased world. (b) counter-example for hypothesis reduction in absence of pose-uncertainty in prior. The inference incorrectly deduces that the robot is in mode 1.} \end{figure*} To compare with the current state of the art, we consider another scenario with 4 floors. Floor 1 has the same configuration as in Fig.~\ref{fig:counter-example}, floor 2 and floor 3 have the left and the right shelves (w.r.t floor 1) removed respectively and floor 4 has no shelves at all. We use the metric $\eta_{da}$ as one of the possible ways to quantify data association performance by computing the probability of picking the right mode in the posterior GMM (which corresponds to ground-truth position of robot). Thus, for two equally weighted GMM components, $\eta_{da}=0.5\, \text{or} \,0$ if the correct component is one of them or if it has been pruned. The number of modes in the posterior is also indicated (for planning, the total number of modes for \emph{all} the considered future observations is shown). As seen, many of the data associations considered within BSP are wrong ($\eta_{da}=0.29$), while also in inference an incorrect association is made ($\eta_{da}=0$). This can lead to (possibly catastrophic) mission failure; in this case, failure to associate to the correct corridor. We also show a counter-example (Fig.~\ref{fig:counter-example})) for \cite{Agarwal15arxiv} ($\eta_{da}=0$) since that approach does not model uncertainty within each of the GMM components. In contrast, DA-BSP outperforms both approaches within planning and inference. \renewcommand{\myfig}[2]{\includegraphics[scale=#1]{#2}} \begin{table}[ht] \begin{threeparttable} \caption{Evaluating DA-BSP} \label{fig:eval_da_bsp} \scriptsize \begin{tabular}{ lrr|cc|c|c } \hline \multicolumn{3}{c|}{\multirow{ 2}{*}{config}} & \multicolumn{2}{c|}{cost} & \multicolumn{2}{c}{metrics}\\ \cline{4-7} \multicolumn{3}{c|}{} & $KL_u$ & Worst-Cov & modes & $\eta_{da}$\\ \cline{1-7} \multirow{ 6}{*}{\rotatebox[origin=c]{90}{\textbf{compare}}} & \multirow{ 2}{*}{\texttt{DA-BSP}} & \texttt{plan} & 2.60 & 5.48 & 21 & \textbf{0.41}\\ & & \texttt{infer} & 8.14 & 5.08 & 4 & \textbf{0.26}\\ & \multirow{ 2}{*}{\texttt{BSP}} & \texttt{plan} & -8.67 & 5.36 & 13 & 0.29\\ & & \texttt{infer} & -4.35 & 2.95 & 2 & 0\\ & \multirow{ 2}{*}{\texttt{\cite{Agarwal15arxiv}}} & \texttt{plan} & -na- & -na- & -na- & -na-\\ & & \texttt{infer} & -63.76 & 2.82 & 2 & 0\\ \hline \end{tabular} \end{threeparttable} \end{table} In order to evaluate DA-BSP, we consider a simplistic set of actions, namely $\{\texttt{$fwd_1$},\texttt{$fwd_2$},\texttt{$bwd_1$}\}$ for a one-step forward, two-step forward and one-step backward movements, respectively (see Table~\ref{tab:da_bsp_actions}). These actions highlight the challenges of data-association aware planning, even in the context of a simplistic scenario. Note that number of modes (which signifies different associations planner is considering at that step) is significantly higher in the planning, than in the inference. However, when there exists a disambiguating action, such as \texttt{$fwd_2$} is, the planner is able to associate to the correct association all the time (demonstrated by $\eta_{da} = 1$). \begin{table}[ht] \begin{threeparttable} \caption{DA-BSP for candidate actions} \label{tab:da_bsp_actions} \scriptsize \begin{tabular}{ lrr|cc|c|c } \hline \multicolumn{3}{c|}{\multirow{ 2}{*}{config}} & \multicolumn{2}{c|}{cost} & \multicolumn{2}{c}{metrics}\\ \cline{4-7} \multicolumn{3}{c|}{} & $KL_u$ & Worst-Cov & modes & $\eta_{da}$\\ \cline{1-7} \multirow{ 6}{*}{\rotatebox[origin=c]{90}{\textbf{DA-BSP}}} & \multirow{ 2}{*}{\texttt{$bwd_1$}} & \texttt{plan} & 6571.29& 28.74& 48& 0.08\\ & & \texttt{infer} & 6567.86& 30.53& 4& 0.08\\ & \multirow{ 2}{*}{\texttt{$fwd_1$}} & \texttt{plan} & -1160.93& 6.22& 22& 0.18\\ & & \texttt{infer} & -1300.72& 6.98& 2& 0.16\\ & \multirow{ 2}{*}{\texttt{$fwd_2$}} & \texttt{plan} & -166.03& 0.66& 2& 1\\ & & \texttt{infer} & -227.03& 0.91& 1& 1\\ \hline \end{tabular} \end{threeparttable} \end{table} \subsection{Aliased Multi-Floor Environment} Since, incorporating data-association implies that (at least theoretically) an exponential blow-up of number of unimodal beliefs maintained in the posterior, we therefore evaluated \texttt{DA-BSP} in simple but real-world scene by deploying a real Pioneer robot in a 3-floor aliased environment (see Fig.~\ref{fig:pioneer}), with similar objective of floor and position disambiguation. When not reasoning about perceptual aliasing, the robot takes greedy (w.r.t. control cost and position uncertainty) action and fails to disambiguate, whereas \texttt{DA-BSP} successfully tackles planning with data-association, as shown in Figure \ref{fig:pioneer_tree}. Although not witnessed here, BSP can not guarantee global optimum solution (w.r.t. control and uncertainty cost) and DA-BSP similarly can not provide a global least cost path for full disambiguation - a problem known to be NP-hard~\cite{Dudek98}. \begin{figure*} \centering \subfloat[Real world]{ \myfig{0.35}{pioneer_floor} \label{fig:pioneer}} \subfloat[Partial decision tree]{ \myfig{0.35}{pioneer_graph} \label{fig:pioneer_tree}} \caption{ Using Pioneer robot in the real-world. (a) two (of three) severely-aliased floors, and belief space planning for it (b) DA-BSP can plan for fully disambiguating path (otherwise sub-optimal, due to path-length) while usual BSP with \emph{maximum likelihood} assumption can not (as shown by almost equi-probable modes in the histogram).} \end{figure*} \section{Introduction} \label{sec:introduction} \input{01-intro} \section{Notations and Problem Formulation} \label{sec:problem-formulation} \input{02a-ProblemFormulation} \section{Approach} \label{sec:concept} \input{02b-Concept} \section{Experimental results} \label{sec:results} \input{03-Results} \section{Conclusions} \label{sec:conclusions} \input{04-Conclusions} \bibliographystyle{plain}
{'timestamp': '2016-06-17T02:08:42', 'yymm': '1606', 'arxiv_id': '1606.05124', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05124'}
arxiv
\section{Introduction} Linear quadratic Gaussian (LQG) team problems have been studied extensively under the framework of classical stochastic control with single controller and perfect recall~\cite[Ch.7]{KuVa86}. In such a system, the state evolves linearly and the controller makes a noisy observation of the state which is also linear in the state and noise. The controller incurs a quadratic instantaneous cost. With all basic random variables being independent and Gaussian, the problem is modeled as a partially observed Markov decision process (POMDP). The belief state process under any control law happens to be Gaussian and thus can be sufficiently described by the corresponding mean and covariance processes, which can be updated by the Kalman filter equations. Moreover, the covariance can be computed offline and thus the mean (state estimate) is a sufficient statistic for control. Finally, due to the quadratic nature of the costs, the optimal control strategy is linear in the state. Thus, unlike most POMDP problems, the LQG stochastic control problem can be solved analytically and admits an easy-to-implement optimal strategy. LQG team problems have also been studied under non-classical information structure such as in multi-agent decentralized team problems where two controllers with different information sets minimize the same objective. Such systems with asymmetric information structure are of special interest today because of the emergence of large scale networks such as social or power networks, where there are multiple decision makers with local or partial information about the system. It is well known that for decentralized LQG team problems, linear control policies are not optimal in general~\cite{Wi68}. However there exist special information structures, such as partially nested~\cite{HoCh72} and stochastically nested~\cite{Yu09}, where linear control is shown to be optimal. Furthermore, due to their strong appeal for ease of implementation, linear strategies have been studied on their own for decentralized teams even at the possibility of being suboptimal (see~\cite{MaNa15} and references therein). When controllers (or players) are strategic, the problem is classified as a dynamic game and an appropriate solution concept is some notion of equilibrium. When players have different information sets, such games are called games with asymmetric information. There are several notions of equilibrium for such games, including perfect Bayesian equilibrium (PBE), sequential equilibrium, trembling hand equilibrium \cite{OsRu94,FuTi91}. Each of these notions of equilibrium consists of a strategy and a belief profile of all players where the equilibrium strategies are optimal given the beliefs and the beliefs are derived from the equilibrium strategy profile and using Bayes' rule (whenever possible), with some equilibrium concepts requiring further refinements. Due to this circular argument of beliefs being consistent with strategies which are in turn optimal given the beliefs, finding such equilibria is a difficult task. To date, there is no known sequential decomposition methodology to find such equilibria for general dynamic games with asymmetric information. Authors in~\cite{Ba78} studied a discrete-time dynamic LQG game with one step delayed sharing of observations. Authors in~\cite{NaGuLaBa14} studied a class of dynamic games with asymmetric information under the assumption that player's posterior beliefs about the system state conditioned on their common information are independent of the strategies used by the players in the past. Due to this independence of beliefs and past strategies, the authors of~\cite{NaGuLaBa14} were able to provide a backward recursive algorithm similar to dynamic programming to find Markov perfect equilibria~\cite{MaTi01} of a transformed game which are equivalently a class of Nash equilibria of the original game. The same authors specialized their results in~\cite{GuNaLaBa14} to find non-signaling equilibria of dynamic LQG games with asymmetric information. Recently, we considered a general class of dynamic games with asymmetric information and independent private types in \cite{VaAn16} and provided a sequential decomposition methodology to find a class of PBE of the game considered. In our model, beliefs depend on the players' strategies, so our methodology allows the possibility of finding signaling equilibria. In this paper, we build on this methodology to find signaling equilibria for two-player dynamic LQG games with asymmetric information. We show that players' strategies that are linear in their private types in conjunction with consistent Gaussian beliefs form a PBE of the game. Our contributions are: \bit{ \item[(a)] Under strategies that are linear in players' private types, we show that the belief updates are Gaussian and the corresponding mean and covariance are updated through Kalman filtering equations which depend on the players' strategies, unlike the case in classical stochastic control and the model considered in~\cite{GuNaLaBa14}. Thus there is signaling~\cite{Ho80,KrSo94}. \item[(b)] We sequentially decompose the problem by specializing the forward-backward algorithm presented in~\cite{VaAn16} for the dynamic LQG model. The backward algorithm requires, at each step, solving a fixed point equation in `partial' strategies of the players for all possible beliefs. We show that in this setting, solving this fixed point equation reduces to solving a matrix algebraic equation for each realization of the state estimate covariance matrices. \item[(c)] The cost-to-go value functions are shown to be quadratic in the private type and state estimates, which together with quadratic instantaneous costs and mean updates being linear in the control action, implies that at every time $t$ player $i$ faces an optimization problem which is quadratic in her control. Thus linear control strategies are shown to satisfy the optimality conditions in~\cite{VaAn16}. \item[(d)] For the special case of scalar actions, we provide sufficient algorithmic conditions for existence of a solution of the algebraic matrix equation. Finally, we present numerical results on the steady state solution for specific parameters of the problem. } The paper is structured as follows. In Section~\ref{sec:model}, we define the model. In Section~\ref{sec:prelim}, we introduce the solution concept and summarize the general methodology in~\cite{VaAn16}. In Section~\ref{sec:results}, we present our main results where we construct equilibrium strategies and belief through a forward-backward recursion. In Section~\ref{sec:disc} we discuss existence issues and present numerical steady state solutions. We conclude in Section~\ref{sec:concl}. \subsection{Notation} We use uppercase letters for random variables and lowercase for their realizations. We use bold upper case letters for matrices. For any variable, subscripts represent time indices and superscripts represent player identities. We use notation $ -i$ to represent the player other than player $i$. We use notation $a_{t:t'}$ to represent vector $(a_t, a_{t+1}, \ldots a_{t'})$ when $t'\geq t$ or an empty vector if $t'< t$. We remove superscripts or subscripts if we want to represent the whole vector, for example $ a_t$ represents $(a_t^1, a_t^2) $. We use $\delta(\cdot)$ for the Dirac delta function. We use the notation $X\sim F$ to denote that the random variable $X$ has distribution $F$. For any Euclidean set $\mathcal{S}$, $\mathcal{P}(\mathcal{S})$ represents the space of probability measures on $\mathcal{S}$ with respect to the Borel sigma algebra. We denote by $P^g$ (or $\mathbb{E}^g$) the probability measure generated by (or expectation with respect to) strategy profile $g$. We denote the set of real numbers by $\mathbb{R}$. For any random vector $X$ and event A, we use the notation $sm(\cdot|\cdot)$ to denote the conditional second moment, $sm(X|A) : = \mathbb{E}[XX^{\dagger}|A]$. For any matrices $\mathbf{A}$ and $\mathbf{B}$, we will also use the notation $quad(\cdot;\cdot)$ to denote the quadratic function, $quad(\mathbf{A};\mathbf{B}) :=\mathbf{B}^{\dagger}\mathbf{A}\mathbf{B}$. We denote trace of a matrix $\mathbf{A}$ by $tr(\mathbf{A})$. $N(\hat{x},\mathbf{\Sigma})$ represents the vector Gaussian distribution with mean vector $\hat{x}$ and covariance matrix $\mathbf{\Sigma}$. All equalities and inequalities involving random variables are to be interpreted in \emph{a.s.} sense and inequalities in matrices are to be interpreted in the sense of positive definitedness. All matrix inverses are interpreted as pseudo-inverses. \section{Model} \label{sec:model} We consider a discrete-time dynamical system with 2 strategic players over a finite time horizon $\mathcal{T} := \{1, 2, \ldots T\}$ and with perfect recall. There is a dynamic state of the system $x_t := (x_t^1, x_t^2)$, where $x_t^i \in \mathcal{X}^i :=\mathbb{R}^{n_i}$ is private type of player $i$ at time $t$ which is perfectly observed by her. Player $i$ at time $t$ takes action $u_t^i \in \mathcal{U}^i := \mathbb{R}^{m_i}$ after observing $u_{1:t-1}$, which is common information between the players, and $x_{1:t}^i$, which it observes privately. Thus at any time $t\in \mathcal{T}$, player $i$'s information is $u_{1:t-1},x_{1:t}^i$. Players' types evolve linearly as \eq{ x_{t+1}^i = \mathbf{A}_t^ix_t^i + \mathbf{B}_t^i u_t + w_t^i, \label{eq:sys_evol} } where $\mathbf{A}_t^i, \mathbf{B}_t^i$ are known matrices. $(X^1_1,X_1^2,(W_t^i)_{t\in\mathcal{T}})$ are basic random variables of the system which are assumed to be independent and Gaussian such that $X_1^i\sim N(0,\mathbf{\Sigma}^i_1)$ and $W_t^i \sim N(0,\mathbf{Q}^i)$. As a consequence, types evolve as conditionally independent, controlled Markov processes, \eq{ P(x_{t+1}|u_{1:t},x_{1:t}) &= P(x_{t+1}|u_{t},x_{t} )=\prod_{i=1}^2 Q^i(x_{t+1}^i|u_{t},x_{t}^i ) . } where $Q^i(x_{t+1}^i|u_{t},x_{t}^i ):= P(w_t^i =x_{t+1}^i -\mathbf{A}_t^ix_t^i - \mathbf{B}_t^i u_t )$. At the end of interval $t$, player $i$ incurs an instantaneous cost $R^i(x_t,u_t)$, \eq{ R^i(x_t,u_t) &= u_t^{\dagger}\mathbf{T}^iu_t + x_t^{\dagger}\mathbf{P}^ix_t + 2u_t^{\dagger}\mathbf{S}^ix_t \nonumber \\ &= \bm{u_t^{\dagger} & x_t^{\dagger}} \bm{\mathbf{T}^i &\mathbf{S}^i \\ \mathbf{S}^{i\dagger} & \mathbf{P}^i}\bm{u_t \\ x_t}, } where $\mathbf{T}^i, \mathbf{P}^i, \mathbf{S}^i$ are real matrices of appropriate dimensions and $\mathbf{T}^i,\mathbf{P}^i$ are symmetric. We define the instantaneous cost matrix $\mathbf{R}^i$ as $\mathbf{R}^i := \bm{\mathbf{T}^i &\mathbf{S}^i \\ \mathbf{S}^{i\dagger} & \mathbf{P}^i}$. Let $g^i = ( g^i_t)_{t \in \mathcal{T}}$ be a probabilistic strategy of player $i$, where $g^i_t : (\mathcal{U}^i)^{t-1}\times (\mathcal{X}^i)^t \to \mathcal{P}(\mathcal{U}^i)$ such that player $i$ plays action $u_t^i$ according to distribution $ g^i_t(\cdot|u_{1:t-1},x_{1:t}^i)$. Let $ g :=(g^i)_{i=1,2}$ be a strategy profile of both players. The distribution of the basic random variables and their independence structure together with the system evolution in (\ref{eq:sys_evol}) and players strategy profile $g$ define a joint distribution on all random variables involved in the dynamical process. The objective of player $i$ is to maximize her total expected cost \eq{ J^{i,g} := \mathbb{E}^g \left\{ \sum_{t=1}^T R^i(X_t,U_t) \right\} . \label{eq:J_obj} } With both players being strategic, this problem is modeled as a dynamic LQG game with asymmetric information and with simultaneous moves. \section{Preliminaries} \label{sec:prelim} In this section we introduce the equilibrium concept for dynamic games with asymmetric information and summarize the general methodology developed in~\cite{VaAn16} to find a class of such equilibria. \subsection{Solution concept} Any history of this game at which players take action is of the form $h_t = (u_{1:t-1},x_{1:t})$. Let $\mathcal{H}_t$ be the set of such histories at time $t$ and $\mathcal{H} := \cup_{t=0}^T \mathcal{H}_t $ be the set of all possible such histories. At any time $t$ player $i$ observes $h^i_t = (u_{1:t-1},x_{1:t}^{i})$ and both players together have $h^c_t = u_{1:t-1}$ as common history. Let $\mathcal{H}^i_t$ be the set of observed histories of player $i$ at time $t$ and $\mathcal{H}^c_t$ be the set of common histories at time $t$. An appropriate concept of equilibrium for such games is the PBE \cite{FuTi91} which consists of a pair $(\beta^*,\mu^*)$ of strategy profile $\beta^* = (\beta_t^{*,i})_{t \in \mathcal{T},i=1,2}$ where $\beta_t^{*,i} : \mathcal{H}_t^i \to \mathcal{P}(\mathcal{U}^i)$ and a belief profile $\mu^* = (\mu_t^{*,i})_{t \in \mathcal{T},i=1,2}$ where $\mu_t^{*,i}: \mathcal{H}^i_t \to \mathcal{P}(\mathcal{H}_t)$ that satisfy sequential rationality so that for $ i =1,2, \forall t \in \mathcal{T}, h^{i}_t \in \mathcal{H}^i_t, {\beta^{i}}$ \eq{ \mathbb{E}^{(\beta^{*,i} \beta^{*,-i},\, \mu^*)}\left\{ \sum_{n=t}^T R^i(X_n, U_n)\big\lvert h^i_t\right\} \leq \mathbb{E}^{({\beta}^{i} \beta^{*,-i},\, \mu^*)}\left\{ \sum_{n=t}^T R^i(X_n, U_n)\big\lvert h^i_t\right\}, \;\; \;\; \label{eq:seqeq} } and the beliefs satisfy consistency conditions as described in~\cite[p. 331]{FuTi91}. \subsection{Structured perfect Bayesian equilibria} A general class of dynamic games with asymmetric information was considered in \cite{VaAn16} by the authors where players' types evolve as conditionally independent controlled Markov processes. A backward-forward algorithm was provided to find a class of PBE of the game called structured perfect Bayesian equilibria (SPBE). In these equilibria, player $i$'s strategy is of the form $U_t^i \sim m_t^i(\cdot|\pi^1_t, \pi^2_t ,x_t^i)$ where $m_t^i: \mathcal{P}(\mathcal{X}^1) \times \mathcal{P}(\mathcal{X}^2) \times \mathcal{X}^i \to \mathcal{P}(\mathcal{U}^i)$. Specifically, player $i$'s action at time $t$ depends on her private history $x_{1:t}^i$ only through $x_t^i$. Furthermore, it depends on the common information $u_{1:t-1}$ through a common belief vector $\underline{\pi}_t:=(\pi_t^1,\pi_t^2)$ where $\pi_t^i\in \mathcal{P}(\mathcal{X}^i)$ is belief on player $i$'s current type $x_t^i$ conditioned on common information $u_{1:t-1}$, i.e. $\pi_t^i(x_t^i):= P^g(X_t^i = x_t^i|u_{1:t-1})$. The common information $u_{1:t-1}$ was summarized into the belief vector $(\pi_t^1,\pi_t^2)$ following the common agent approach used for dynamic decentralized team problems \cite{NaMaTe13}. Using this approach, player $i$'s strategy can be equivalently described as follows: player $i$ at time $t$ observes $u_{1:t-1}$ and takes action $\gamma_t^i$, where $\gamma_t^i : \mathcal{X}^i \to \mathcal{P}(\mathcal{U}^i)$ is a partial (stochastic) function from her private information $x_t^i$ to $u_t^i$ of the form $U_t^i \sim \gamma_t^i(\cdot|x_t^i)$. These actions are generated through some policy $\psi^i = (\psi^i_t)_{t \in \mathcal{T}}$, $\psi^i_t : (\mathcal{U}^i)^{t-1} \to \left\{ \mathcal{X}^i \to \mathcal{P}(\mathcal{U}^i) \right\}$, that operates on the common information $u_{1:t-1}$ so that $\gamma_t^i = \psi_t^i[u_{1:t-1}]$. Then any policy of the player $i$ of the form $U_t^i \sim g_t^i(\cdot|u_{1:t-1},x_t^{i})$ is equivalent to $U_t^i \sim \psi^i_t[u_{1:t-1}] (\cdot|x_t^i)$ \cite{NaMaTe13}. The common belief $\pi_t^i$ is shown in Lemma~2 of~\cite{VaAn16} to be updated as \seq{ \label{eq:pi_update} \eq{ \pi_{t+1}^i(x_{t+1}^i) = \frac{ \int_{x^i_t} \pi_t^{{i}}(x_t^i) \gamma_t^i(u_t^i|x_t^i)Q_t^i(x_{t+1}^i|x_t^i ,u_t) dx_t^i} % { \int_{\tilde{x}_t^i}\pi_t^{{i}}(\tilde{x}_t^i) \gamma_t^i(u_t^i|\tilde{x}_t^i)d\tilde{x}_t^i}, } if the denominator is not 0, and as \eq{ \pi_{t+1}^i(x_{t+1}^i) = \int_{x^i_t} \pi_t^{{i}}(x_t^i) Q_t^i(x_{t+1}^i|x_t^i ,u_t) dx_t^i, } } if the denominator is 0. The belief update can be summarized as, \eq{ \pi^{i}_{t+1} = {\bar{F}}(\pi^{i}_t,\gamma^i_t,u_t), } where ${\bar{F}}$ is independent of players' strategy profile $g$. The SPBE of the game can be found through a two-step backward-forward algorithm. In the backward recursive part, an equilibrium generating function $\theta$ is defined based on which a strategy and belief profile ($\beta^*,\mu^*$) are defined through a forward recursion. In the following we summarize the algorithm and results of~\cite{VaAn16}. \subsubsection{Backward Recursion} An equilibrium generating function $\theta=(\theta^i_t)_{i=1,2,t\in\mathcal{T}}$ and a sequence of value functions $(V_t^i)_{i=1,2, t\in \{ 1,2, \ldots T+1\}}$ are defined through backward recursion, where $\theta^i_t : \mathcal{P}(\mathcal{X}^1)\times \mathcal{P}(\mathcal{X}^2) \to \left\{\mathcal{X}^i \to \mathcal{P}(\mathcal{U}^i) \right\}$, $V_t^i : \mathcal{P}(\mathcal{X}^1)\times \mathcal{P}(\mathcal{X}^2) \times \mathcal{X}^i \to \mathbb{R}$, as follows. \bit{ \item[(a)] Initialize $\forall \underline{\pi}_{T+1}\in \mathcal{P}(\mathcal{X}^1)\times \mathcal{P}(\mathcal{X}^2) , x_{T+1}^i\in \mathcal{X}^i$, \eq{ V^i_{T+1}(\underline{\pi}_{T+1},x_{T+1}^i) := 0. \label{eq:VT+1} } } \bit{ \item[(b)] For $t = T,T-1, \ldots 1$, $ \forall \underline{\pi}_t \in \mathcal{P}(\mathcal{X}^1)\times \mathcal{P}(\mathcal{X}^2) $, let $\theta_t[\underline{\pi}_t] $ be generated as follows. Set $\tilde{\gamma}_t = \theta_t[\underline{\pi}_t]$ where $\tilde{\gamma}_t$ is the solution of the following fixed point equation, $\forall i \in \mathcal{N},x_t^i\in \mathcal{X}^i$, \eq{ \tilde{\gamma}^{i}_t(\cdot|x_t^i) \in &\arg\min_{\gamma^i_t(\cdot|x_t^i)} \mathbb{E}^{\gamma^i_t(\cdot|x_t^i) \tilde{\gamma}^{-i}_t} \left\{ R^i(X_t,U_t) + V_{t+1}^i (F(\underline{\pi}_t, \tilde{\gamma}_t, U_t), X_{t+1}^i) \big\lvert \underline{\pi}_t ,x_t^i \right\} , \label{eq:M_FP} } where expectation in (\ref{eq:M_FP}) is with respect to random variables $(x_t^{-i},u_t ,x_{t+1}^i)$ through the measure \\ ${\pi}_t^{-i}(x_t^{-i})\gamma^i_t(u^i_t|x_t^i) \tilde{\gamma}^{-i}_t(u^{-i}_t|x_t^{-i})Q^i(x_{t+1}^i|x_t^i,u_t)$ and $F(\underline{\pi}_t,\gamma_t,u_t):=(\bar{F}(\pi_t^1,\gamma_t^1,u_t),\bar{F}(\pi_t^2,\gamma_t^2,u_t))$ . Also define \eq{ V^i_{t}(\underline{\pi}_t,x_t^i) &:= \;\; \mathbb{E}^{\tilde{\gamma}^{i}_t(\cdot|x_t^i) \tilde{\gamma}^{-i}_t}\left\{ {R}^i (X_t,U_t) +V_{t+1}^i (F(\underline{\pi}_t, \tilde{\gamma}_t, U_t), X_{t+1}^i)\big\lvert \underline{\pi}_t, x_t^i \right\}. \label{eq:Vdef} } } From the equilibrium generating function $\theta$ defined though this backward recursion, the equilibrium strategy and belief profile ($\beta^*,\mu^*$) are defined as follows. \subsubsection{Forward Recursion} \begin{itemize} \item[(a)] Initialize at time $t=1$, \eq{ \mu^{*}_1[\phi](x_1) &:= \prod_{i=1}^N Q^i(x_1^i). \label{eq:mu*def0} } \item[(b)] For $t =1,2 \ldots T, \forall i =1,2, u_{1:t}\in \mathcal{H}_{t+1}^c, x_{1:t}^i \in(\mathcal{X}^i)^t$ \eq{ \beta_{t}^{*,i}(u_{t}^i|u_{1:t-1}x_{1:t}^i) &:= \theta_{t}^i[\mu_{t}^*[u_{1:t-1}]](u^i_{t}|x_{t}^i) \label{eq:beta*def} } and \seq{ \eq{ \mu^{*,i}_{t+1}[u_{1:t}] &:= \bar{F}(\mu_t^{*,i}[u_{1:t-1}], \theta_t^i[\mu_t^*[u_{1:t-1}]], u_t) \\ \mu^{*}_{t+1}[u_{1:t}](x_t^1,x_t^2)&:= \prod_{i=1}^2\mu^{*,i}_{t+1}[u_{1:t}](x_t^i). \label{eq:mu*def} } } \end{itemize} The strategy and belief profile $(\beta^{*}, \mu^*)$ thus constructed form an SPBE of the game~\cite[Theorem 1]{VaAn16}. \section{SPBE of the dynamic LQG game} \label{sec:results} In this section, we apply the general methodology for finding SPBE described in the previous section, on the specific dynamic LQG game model described in Section~\ref{sec:model}. We show that players' strategies that are linear in their private types in conjunction with Gaussian beliefs, form an SPBE of the game. We prove this result by constructing an equilibrium generating function $\theta$ using backward recursion such that for all Gaussian belief vectors $\underline{\pi}_t$, $\tilde{\gamma}_t=\theta_t[\underline{\pi}_t]$, $\tilde{\gamma}_t^i$ is of the form $\tilde{\gamma}_t^i(u_t^i | x_t^i) =\delta(u_t^i -\mathbf{\tilde{L}}_t^i x^i - \tilde{m}_t^i) $ and satisfies (\ref{eq:M_FP}). Based on $\theta$, we construct an equilibrium belief and strategy profile. The following lemma shows that common beliefs remain Gaussian under linear deterministic $\gamma_t$ of the form $\gamma_t^i(u_t^i | x_t^i) =\delta(u_t^i - \mathbf{L}_t^i x_t^i - m_t^i) $. \begin{lemma} \label{lemma:belief_update} If $\pi^i_t$ is a Gaussian distribution with mean $\hat{x}_{t}^i$ and covariance $\mathbf{\Sigma}_{t}^i$, and $\gamma_t^i(u_t^i | x_t^i)=\delta(u_t^i - \mathbf{L}_t^i x_t^i - m_t^i) $ then $\pi_{t+1}^i$, given by (\ref{eq:pi_update}), is also Gaussian distribution with mean $\hat{x}_{t+1}^i$ and covariance $\mathbf{\Sigma}_{t+1}^i$, where \seq{ \eq{ \hat{x}_{t+1}^i &= \mathbf{A}_t^i\hat{x}_t^i + \mathbf{B}_t^i u_t + \mathbf{A}_t^i\mathbf{G}_t^i (u_t^i - \mathbf{L}_t^i\hat{x}_t^i-m_t^i)\label{eq:mean_update}\\ \mathbf{\Sigma}_{t+1}^i &= \mathbf{A}_t^i(\mathbf{I} - \mathbf{G}_t^i\mathbf{L}_t^i)^{\dagger}\mathbf{\Sigma}_t^i(\mathbf{I} - \mathbf{G}_t^i\mathbf{L}_t^i)\mathbf{A}_t^{i\dagger}+ \mathbf{Q}^i, \label{eq:cov_update} } \label{eq:meancov_update} } where \eq{\mathbf{G}_t^i = \mathbf{\Sigma}_t^i\mathbf{L}_t^{i\dagger}(\mathbf{L}_t^i\mathbf{\Sigma}_t^i\mathbf{L}_t^{i\dagger})^{-1}. \label{eq:g_def} } \end{lemma} \begin{proof} See Appendix~\ref{app:belief_update} \end{proof} Based on previous lemma, we define $\phi_x^i,\phi_s^i $ as update functions of mean and covariance matrix, respectively, as defined in (\ref{eq:meancov_update}), such that \seq{ \label{eq:phi_def} \eq{ \hat{x}_{t+1}^i &= \phi_x^{i}(\hat{x}_t^i,\mathbf{\Sigma}_t^i,\mathbf{L}_t^i,m_t^i, u_t)\label{eq:phix_def}\\ \mathbf{\Sigma}_{t+1}^i &= \phi_s^{i}(\mathbf{\Sigma}_t^i,\mathbf{L}_t^i)\label{eq:phis_def} . } } We also say, \eq{ \hat{x}_{t+1} &= \phi_x(\hat{x}_t,\mathbf{\Sigma}_t,\mathbf{L}_t,m_t, u_t)\label{eq:phix_def2}\\ \mathbf{\Sigma}_{t+1} &= \phi_s(\mathbf{\Sigma}_t,\mathbf{L}_t) \label{eq:phis_def2} . } The previous lemma shows that with linear deterministic $\gamma^i_t$, the next update of the mean of the common belief, $\hat{x}_{t+1}^i$ is linear in $\hat{x}_t^i$ and the control action $u_t^i$. Furthermore, these updates are given by appropriate Kalman filter equations. It should be noted however that the covariance update in (\ref{eq:cov_update}) depends on the strategy through $\gamma_t^i$ and specifically through the matrix $\mathbf{L}_t^i$. This specifically shows how belief updates depend on strategies on the players which leads to signaling, unlike the case in classical stochastic control and the model considered in~\cite{GuNaLaBa14}. Now we will construct an equilibrium generating function $\theta$ using the backward recursion in (\ref{eq:VT+1})--(\ref{eq:Vdef}). The $\theta$ function generates linear deterministic partial functions $\gamma_t$, which, from Lemma~\ref{lemma:belief_update} and the fact that initial beliefs (or priors) are Gaussian, generates only Gaussian belief vectors $(\pi_t^1,\pi_t^2)_{t\in\mathcal{T}}$ for the whole time horizon. These beliefs can be sufficiently described by their mean and covariance processes $(\hat{x}_t^1,\mathbf{\Sigma}_t^1)_{t\in\mathcal{T}}$ and $(\hat{x}_t^2,\mathbf{\Sigma}_t^2)_{t\in\mathcal{T}}$ which are updated using (\ref{eq:meancov_update}). For $t = T+1,T,\ldots, 1 $, we define the vectors \eq{ e_t^i := \bm{ x_t^i\\ \hat{x}_{t}^1\\ \hat{x}_{t}^2} \quad z_t^i := \bm{u_t^i\\ x_t^i\\ \hat{x}_{t}^1\\ \hat{x}_{t}^2} \quad % y_t^i := \bm{u_t^1\\u_t^2\\x_t^1\\x_t^2\\x_{t+1}^i\\ \hat{x}_{t+1}^1\\ \hat{x}_{t+1}^2}. \label{eq:ezy_def} } \begin{theorem} \label{thm:back_recr} The backward recursion (\ref{eq:VT+1})--(\ref{eq:Vdef}) admits\footnote{Under certain conditions, stated in the proof.} a solution of the form $\theta_t[\pi_t] = \theta_t[\hat{x}_t,\mathbf{\Sigma}_t] = \tilde{\gamma}_t$ where ${ \tilde{\gamma}^{i}_t}(u_t^{i}|x^{i}_t) = \delta(u_t^i - \mathbf{\tilde{L}}_t^{i}x_t^{i} - \tilde{m}_t^{i})$ and $\mathbf{\tilde{L}}_t^i, \tilde{m}_t^i$ are appropriately defined matrices and vectors, respectively. Furthermore, the value function reduces to \seq{ \eq{ V_t^i(\underline{\pi}_t,x_t^i) &= V_t^i(\hat{x}_t,\mathbf{\Sigma}_t,x_t^i) \\ &= quad(\mathbf{V}_t^i(\mathbf{\Sigma}_t); e_t^i) + \rho_t^i(\mathbf{\Sigma}_t). } } with $\mathbf{V}_t^i(\mathbf{\Sigma}_t)$ and $\rho_t^i(\mathbf{\Sigma}_t)$ as appropriately defined matrix and scalar quantities, respectively. \end{theorem} \begin{proof} We construct such a $\theta$ function through the backward recursive construction and prove the properties of the corresponding value functions inductively. \bit{ \item[(a)] For $i=1,2,\forall \ \mathbf{\Sigma}_{T+1},$ let $\mathbf{V}^i_{T+1}(\mathbf{\Sigma}_{T+1}) := \mathbf{0}, \rho_{T+1}^i(\mathbf{\Sigma}_{T+1}) := 0$. Then $\forall \ \hat{x}_{T+1}^1, \hat{x}_{T+1}^2$,\\$ \mathbf{\Sigma}_{T+1}^1,\mathbf{\Sigma}_{T+1}^2, x_{T+1}^i$ and for $ \underline{\pi}_{t}= (\pi_{t}^1,\pi_{t}^2)$, where $\pi_{t}^i$ is $N(\hat{x}_{t}^i,\mathbf{\Sigma}_{t}^i)$, \seq{ \eq{ V^i_{T+1}(\underline{\pi}_{T+1},x_{T+1}^i) &:=0\\ &= V_{T+1}^i(\hat{x}_{T+1},\mathbf{\Sigma}_{T+1},x_{T+1}^i)\\ &=quad(\mathbf{V}_{T+1}^i(\mathbf{\Sigma}_{T+1}),e_{T+1}^i) + \rho_{T+1}^i(\mathbf{\Sigma}_{T+1}). } } \item[(b)] For all $t\in \{T,T-1,\ldots, 1 \}, i=1,2$, Suppose $V^i_{t+1}(\underline{\pi}_{t+1},x_{t+1}^i) = quad(\mathbf{V}_{t+1}^i(\mathbf{\Sigma}_{t+1}),e_{t+1}^i) + \rho_{t+1}^i(\mathbf{\Sigma}_{t+1})$ (from induction hypothesis) where $\mathbf{V}^i_{t+1}$ is a symmetric matrix defined recursively. Define $\bar{\mathbf{V}}_t^i$ as \eq{ \bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{L}_t) &:= \bm{\mathbf{T}^i&\mathbf{S}^{i} & \mathbf{0} \\ \mathbf{S}^{i\dagger}&\mathbf{P}^i & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & \mathbf{V}^i_{t+1}(\phi_s(\mathbf{\Sigma}_t,\mathbf{L}_t)) }. \label{eq:bVb_def} } Since $\mathbf{T}^i,\mathbf{P}^i$ are symmetric by assumption, $\bar{\mathbf{V}}_t^i$ is also symmetric. For ease of exposition, we will assume $i=1$ and for player $2$, a similar argument holds. At time $t$, the quantity that is minimized for player $i=1$ in (\ref{eq:M_FP}) can be written as \eq{ &\mathbb{E}^{\gamma^1_t(\cdot|x_t^1)}\left[ \mathbb{E}^{ \tilde{\gamma}^{2}_t} \left[ R^1(X_t,U_t) + V_{t+1}^1 (F(\underline{\pi}_t, \tilde{\gamma}_t, U_t), X_{t+1}^1) \big\lvert \underline{\pi}_t ,x_t^1,u_t^1 \right] \big\lvert \underline{\pi}_t ,x_t^1\right]. } The inner expectation can be written as follows, where ${ \tilde{\gamma}^{2}_t}(u_t^{2}|x^{2}_t) =\delta(u_t^2- \mathbf{\tilde{L}}_t^{2}x_t^{2} - \tilde{m}_t^{2})$, \seq{ \eq{ &\mathbb{E}^{ \tilde{\gamma}^{2}_t} \left[quad\left(\bm{\mathbf{T}^1&\mathbf{S}^{1}\\\mathbf{S}^{1\dagger}&\mathbf{P}^1};z_t^i\right) + quad\left(\mathbf{V}_{t+1}^1(\phi_s(\mathbf{\Sigma}_{t},\mathbf{\tilde{L}}_t));e_{t+1}^i\right) + \rho_{t+1}^1(\phi_s(\mathbf{\Sigma}_{t},\mathbf{\tilde{L}}_t)) \big\lvert \pi_t,x_t^1, u_t^i\right]\\ &= \mathbb{E}^{ \tilde{\gamma}^{2}_t} \left[ quad\left(\bar{\mathbf{V}}_t^1(\mathbf{\Sigma}_{t},\mathbf{\tilde{L}}_t); y_t^1\right) + \rho_{t+1}^1(\phi_s(\mathbf{\Sigma}_{t},\mathbf{\tilde{L}}_t)) \big\lvert \pi_t,x_t^1, u_t^1\right] \\ % % &= quad\left(\bar{\mathbf{V}}_t^1(\mathbf{\Sigma}_{t},\mathbf{\tilde{L}}_t); \mathbf{D}_t^1z_t^1+ \mathbf{C}_t^1 \bm{m_t^1\\ \tilde{m}_t^2} \right) + \rho_{t}^1(\mathbf{\Sigma}_t), \label{eq:term2min} } } where $\bar{\mathbf{V}}_t^i$ is defined in (\ref{eq:bVb_def}) and function $\phi_s$ is defined in (\ref{eq:phis_def2}); $y_t^i, z_t^i $ are defined in (\ref{eq:ezy_def}); $\rho_t^i$ is given by \eq{ \rho_t^i(\mathbf{\Sigma}_t) &= tr\left(\mathbf{\Sigma}_t^{-i} quad\left(\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t); \mathbf{J}_t^i \right)\right) +tr(\mathbf{Q}^iV_{11,t+1}^i(\phi_s(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t))) + \rho_{t+1}^i(\phi_s(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)), \label{eq:rho_update} } where $V_{11,t+1}^i$ is the matrix corresponding to $x_{t+1}^i$ in $V_{t+1}^i$ i.e. in the first row and first column of the matrix $V_{t+1}^i$; and matrices $\mathbf{D}_t^i, \mathbf{C}_t^i, \mathbf{J}_t^i$ are as follows, \seq{ \eq{ &\mathbf{D}_t^1:= \bm{\mathbf{I} &\mathbf{0} &\mathbf{0} &\mathbf{0} \\\mathbf{0} & \mathbf{0}&\mathbf{0} &\mathbf{\tilde{L}}_t^2 \\\mathbf{0}&\mathbf{I}&\mathbf{0}&\mathbf{0}\\ \mathbf{0}&\mathbf{0}&\mathbf{0} & \mathbf{I}\\\mathbf{B}^1_{1,t} &\mathbf{A}_t^1 & \mathbf{0}&\mathbf{B}_{2,t}^1\mathbf{\tilde{L}}_t^2 \\\mathbf{A}_t^1\mathbf{G}_t^1+\mathbf{B}_{1,t}^1 &\mathbf{0} &\mathbf{A}_t^1(\mathbf{I} - \mathbf{G}_t^1\mathbf{L}_t^1) & \mathbf{B}_{2,t}^1\mathbf{\tilde{L}}_t^2\\\mathbf{B}_{1,t}^2 &\mathbf{0} &\mathbf{0} &\mathbf{A}_t^2 + \mathbf{B}_{2,t}^2\mathbf{\tilde{L}}_t^2 } } \eq{ & \mathbf{D}_t^2:= \bm{\mathbf{0} &\mathbf{0} &\mathbf{\tilde{L}}_t^1 &\mathbf{0} \\\mathbf{I} & \mathbf{0}&\mathbf{0} & \mathbf{0} \\ \mathbf{0}&\mathbf{0}&\mathbf{I}&\mathbf{0}\\ \mathbf{0}&\mathbf{I} &\mathbf{0} & \mathbf{0}\\\mathbf{B}^2_{2,t} &\mathbf{A}_t^2 &\mathbf{B}_{1,t}^2\mathbf{\tilde{L}}_t^1&\mathbf{0} \\ \mathbf{B}_{2,t}^1 &\mathbf{0} &\mathbf{A}_t^1+ \mathbf{B}_{1,t}^1\mathbf{\tilde{L}}_t^1&\mathbf{0} \\\mathbf{A}_t^2\mathbf{G}_t^2+\mathbf{B}_{2,t}^2 &\mathbf{0}& \mathbf{B}_{1,t}^2\mathbf{\tilde{L}}_t^1 &\mathbf{A}_t^2 (\mathbf{I}- \mathbf{G}_t^2\mathbf{L}_t^2) } % } } \eq{ \mathbf{C}_t^1&:= \bm{\mathbf{0} & \mathbf{0} \\\mathbf{0} & \mathbf{I} \\\mathbf{0} & \mathbf{0}\\\mathbf{0} & \mathbf{0} \\ \mathbf{0} & \mathbf{B}_{2,t}^1 \\-\mathbf{A}_t^1\mathbf{G}_t^1& \mathbf{B}_{2,t}^1 \\\mathbf{0} & \mathbf{B}_{2,t}^2 } \quad % \mathbf{C}_t^2 := \bm{\mathbf{I} & \mathbf{0} \\ \mathbf{0} & \mathbf{0}\\\mathbf{0} & \mathbf{0}\\\mathbf{0} & \mathbf{0} \\\mathbf{B}_{1,t}^2& \mathbf{0} \\\mathbf{B}_{1,t}^1 & \mathbf{0} \\ \mathbf{B}_{1,t}^2& -\mathbf{A}_t^2\mathbf{G}_t^2 }\label{eq:DC_def} } \eq{ % & \mathbf{J}_t^{1\dagger}:= \bm{\mathbf{0} & \mathbf{L}_t^2 & \mathbf{0} & \mathbf{I} & \mathbf{B}_{2,t}^1\mathbf{L}_t^2 & \mathbf{B}_{2,t}^1\mathbf{L}_t^2 & (\mathbf{B}_{2,t}^2+ \mathbf{A}_t^2\mathbf{G}_t^2)\mathbf{L}_t^2}^{\dagger}\nonumber \\ % & \mathbf{J}_t^{2\dagger}:=\bm{\mathbf{L}_t^1& \mathbf{0}& \mathbf{I} & \mathbf{0} & \mathbf{B}_{1,t}^2\mathbf{L}_t^1 & (\mathbf{B}_{1,t}^1 + \mathbf{A}_t^1\mathbf{G}_t^1)\mathbf{L}_t^1 & \mathbf{B}_{1,t}^2\mathbf{L}_t^1}^{\dagger}\label{eq:J_def} } where $\mathbf{B}_t^i =: \bm{\mathbf{B}_{1,t}^i & \mathbf{B}_{2,t}^i}$, $\mathbf{B}_{1,t}^i, \mathbf{B}_{2,t}^i$ are the parts of the matrix $\mathbf{B}_{t}^i$ that corresponds to $u_t^1,u_t^2$ respectively. Let $\mathbf{D}_t^1 =:\bm{\mathbf{D}_t^{u1} &\mathbf{D}_t^{e1}}$ where $\mathbf{D}_t^{u1}$ is the first column matrix of $\mathbf{D}_t^1$ corresponding to $u_t^1$ and $\mathbf{D}_t^{e1}$ is the matrix composed of remaining three column matrices of $\mathbf{D}_t^1$ corresponding to $e_t^1$. The expression in (\ref{eq:term2min}) is averaged with respect to $u_t^1$ using the measure $\gamma_t^1(\cdot|x_t^1)$ and minimized in (\ref{eq:M_FP}) over $\gamma_t^1(\cdot|x_t^1)$. This minimization can be performed component wise leading to a deterministic policy $\tilde{\gamma}_t^1(u_t^1|x_t^1) = \delta(u_t^1 - \mathbf{\tilde{L}}_t^1x_t^1 - \tilde{m}_t^1)=\delta(u_t^1 - u_t^{1*})$, assuming that the matrix $\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}\mathbf{\tilde{D}}_t^{u1}$ is positive definite\footnote{This condition is true if the instantaneous cost matrix $\mathbf{R}^i =\bm{\mathbf{T}^i &\mathbf{S}^i \\ \mathbf{S}^{i\dagger} & \mathbf{P}^i}$ is positive definite and can be proved inductively in the proof by showing that $\mathbf{V}_t^{i}$ and $\bar{\mathbf{V}}_t^{i}$ are positive definite.}. In that case, the unique minimizer $u_t^{1*} = \mathbf{\tilde{L}}_t^1 x_t^1 + \tilde{m}_t^1$ can be found by differentiating (\ref{eq:term2min}) w.r.t. $u_t^{1\dagger}$ and equating it to $\mathbf{0}$, resulting in the equation, \seq{ \eq{ \mathbf{0}&=2\bm{\mathbf{I}&\mathbf{0}&\mathbf{0}&\mathbf{0}}\mathbf{\tilde{D}}_t^{1\dagger}\bar{\mathbf{V}}_t^{1}(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)\left(\mathbf{\tilde{D}}_t^1z_t^1+\mathbf{\tilde{C}}_t^1\tilde{m}_t \right)\\ \mathbf{0}&=\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)\left(\mathbf{\tilde{D}}_t^{u1} u_t^{1*} + \mathbf{\tilde{D}}_t^{e1}e_t^1 + \mathbf{\tilde{C}}_t^1\tilde{m}_t\right)\\ \mathbf{0}&=\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)\left(\mathbf{\tilde{D}}_t^{u1} (\mathbf{\tilde{L}}_t^1 x_t^1 + \tilde{m}_t^1) + [\mathbf{\tilde{D}}_t^{e1}]_1x_t^1 + [\mathbf{\tilde{D}}_t^{e1}]_{23}\hat{x}_t + \mathbf{\tilde{C}}_t^1\tilde{m}_t\right),\label{eq:M_FP_eqv} } } where $[\mathbf{D}^{ei}]_{1}$ is the first matrix column of $\mathbf{D}^{ei}$, $[\mathbf{D}^{ei}]_{23}$ is the matrix composed of the second and third column matrices of $\mathbf{D}^{ei}$. Matrices $\mathbf{\tilde{D}}_t^i, \mathbf{\tilde{C}}_t^i$ are obtained by substituting $\mathbf{\tilde{L}}_t^i,\mathbf{\tilde{G}}_t^i$ in place of $\mathbf{L}_t^i,\mathbf{G}_t^i$ in the definition of $\mathbf{\tilde{D}}_t^i, \mathbf{\tilde{C}}_t^i$ in (\ref{eq:DC_def}), respectively, and $\mathbf{\tilde{G}}_t^i$ is the matrix obtained by substituting $\mathbf{\tilde{L}}_t^i$ in place of $\mathbf{L}_t^i$ in (\ref{eq:g_def}). Thus (\ref{eq:M_FP_eqv}) is equivalent to (\ref{eq:M_FP}) and with a similar analysis for player 2, it implies that $\mathbf{\tilde{L}}_t^i$ is solution of the following algebraic fixed point equation, \seq{ \label{eq:L_fp} \eq{ &\left(\mathbf{\tilde{D}}_t^{ui\dagger}\bar{\mathbf{V}}_t^{i}(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)\mathbf{\tilde{D}}_t^{ui} \right)\mathbf{\tilde{L}}_t^i = -\mathbf{\tilde{D}}_t^{ui\dagger}\bar{\mathbf{V}}_t^{i}(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t) [\mathbf{\tilde{D}}_t^{ei}]_1. } For player 1, it reduces to, \eq{ \label{eq:L_fp2} &\hspace{-10pt}\left[\mathbf{T}_{11}^{1} + \bm{\mathbf{B}_{1,t}^1 \\ \mathbf{A}_t^1\mathbf{G}_t^1+ \mathbf{B}_{1,t}^1\\ \mathbf{B}_{1,t}^2 }^{\dagger}\mathbf{V}_{t+1}^{1}(\phi_s(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)) \bm{ \mathbf{B}_{1,t}^1 \\ \mathbf{A}_t^1\mathbf{G}_t^1+ \mathbf{B}_{1,t}^1 \\\mathbf{B}_{1,t}^2 } \right] \mathbf{\tilde{L}}_t^1 \nonumber \\ &= - \left[ \mathbf{S}_{11}^{1\dagger} + \bm{\mathbf{B}_{1,t}^1 \\ \mathbf{A}_t^1\mathbf{G}_t^1+ \mathbf{B}_{1,t}^1\\ \mathbf{B}_{1,t}^2 }^{\dagger}\mathbf{V}_{t+1}^{1}(\phi_s(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)) \bm{\mathbf{A}_t^1\\0\\0}\right], } } and a similar expression holds for player 2. In addition, $\tilde{m}_t$ can be found from (\ref{eq:M_FP_eqv}) as \seq{ \eq{ &\bm{\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}\mathbf{\tilde{D}}_t^{u1} & \mathbf{0} \\ \mathbf{0} &\mathbf{\tilde{D}}_t^{u2\dagger}\bar{\mathbf{V}}_t^{2}\mathbf{\tilde{D}}_t^{u2} }\tilde{m}_t = -\bm{\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}[\mathbf{\tilde{D}}_t^{e1} ]_{23}\\ \mathbf{\tilde{D}}_t^{u2\dagger}\bar{\mathbf{V}}_t^{2}[ \mathbf{\tilde{D}}_t^{e2}]_{23}} \hat{x}_t- \bm{\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1} \mathbf{\tilde{C}}_t^1\\\mathbf{\tilde{D}}_t^{u2\dagger}\bar{\mathbf{V}}_t^{2} \mathbf{\tilde{C}}_t^2} \tilde{m}_t \\ \tilde{m}_t &= -\left[ \bm{\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}\mathbf{\tilde{D}}_t^{u1} & \mathbf{0} \\ \mathbf{0} &\mathbf{\tilde{D}}_t^{u2\dagger}\bar{\mathbf{V}}_t^{2}\mathbf{\tilde{D}}_t^{u2} } +\bm{\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1} \mathbf{\tilde{C}}_t^1\\ \mathbf{\tilde{D}}_t^{u2\dagger}\bar{\mathbf{V}}_t^{2} \mathbf{\tilde{C}}_t^2} \right]^{-1} \bm{\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}[\mathbf{\tilde{D}}_t^{e1}]_{23}\\ \mathbf{\tilde{D}}_t^{u2\dagger}\bar{\mathbf{V}}_t^{2} [\mathbf{\tilde{D}}_t^{e2}]_{23}} \hat{x}_t\\ &=:\mathbf{\tilde{M}}_t \hat{x}_t =: \bm{\mathbf{\tilde{M}}_t^1\\\mathbf{\tilde{M}}_t^2} \hat{x}_t, \label{eq:m_eq} } } Finally, the resulting cost for player $i$ is, \seq{ \eq{ V^i_{t}(\underline{\pi}_t,x_t^i) &= V^i_{t}(\hat{x}_t,\mathbf{\Sigma}_t,x_t^i) \\ &:=quad\left(\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t); \bm{\mathbf{\tilde{D}}_t^{ui} & \mathbf{\tilde{D}}_t^{ei}} \bm{ \mathbf{\tilde{L}}_t^i x_t^i + \mathbf{\tilde{M}}_t^i\hat{x}_t\\ e_t^i }+ \mathbf{\tilde{C}}_t^i\mathbf{\tilde{M}}_t\hat{x}_t \right) + \rho_t^i(\mathbf{\Sigma}_t)\\ &=quad\left(\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t); \mathbf{\tilde{D}}_t^{ui}(\mathbf{\tilde{L}}_t^i x_t^i + \mathbf{\tilde{M}}_t^i\hat{x}_t )+ \mathbf{\tilde{D}}_t^{e1}e_t^i + \mathbf{\tilde{C}}_t^i \mathbf{\tilde{M}}_t \hat{x}_t \right) + \rho_t^i(\mathbf{\Sigma}_t)\\ &=quad\left(\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t); \left(\bm{\mathbf{\tilde{D}}_t^{ui}\mathbf{\tilde{L}}_t^i & \mathbf{\tilde{D}}_t^{ui}\mathbf{\tilde{M}}_t^i+ \mathbf{\tilde{C}}_t^i\mathbf{\tilde{M}}_t} + \mathbf{\tilde{D}}_t^{ei}\right)e_t^i \right) + \rho_t^i(\mathbf{\Sigma}_t)\\ &=quad\left(\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t);\mathbf{\tilde{F}}_t^ie_t^i \right) + \rho_t^i(\mathbf{\Sigma}_t)\\ &=quad\left(\mathbf{\tilde{F}}_t^{i\dagger}\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)\mathbf{\tilde{F}}_t^i; e_t^i \right) + \rho_t^i(\mathbf{\Sigma}_t)\\ &=quad\left(\mathbf{V}_t^i(\mathbf{\Sigma}_{t}); e_t^i \right) + \rho_t^i(\mathbf{\Sigma}_t), } } where, \seq{ \label{eq:V_update} \eq{ \mathbf{\tilde{F}}_t^i &:=\bm{\mathbf{\tilde{D}}_t^{ui}\mathbf{\tilde{L}}_t^i & \mathbf{\tilde{D}}_t^{ui}\mathbf{\tilde{M}}_t^i+ \mathbf{\tilde{C}}_t^i\mathbf{\tilde{M}}_t} + \mathbf{\tilde{D}}_t^{ei}\\ \mathbf{V}_t^i(\mathbf{\Sigma}_{t}) &:= \mathbf{\tilde{F}}_t^{i\dagger}\bar{\mathbf{V}}_t^i(\mathbf{\Sigma}_t,\mathbf{\tilde{L}}_t)\mathbf{\tilde{F}}_t^i. \label{eq:bV_def} } } Since $\bar{\mathbf{V}}_t^i$ is symmetric, so is $\mathbf{V}_t^i$. Thus the induction step is completed. } \end{proof} Taking motivation from the previous theorem and with slight abuse of notation, we define \eq{ \tilde{\gamma}_t &= \theta_t[\underline{\pi}_t] = \theta_t[\hat{x}_t,\mathbf{\Sigma}_t], } and since $\tilde{\gamma}_t^i(u_t^i|x_t^i) = \delta(u_t^i- \mathbf{\tilde{L}}_t^i x_t^i - \tilde{m}_t^i)$, we define a reduced mapping $(\theta^L,\theta^m)$ as \eq{ \theta_t^{Li}[\hat{x}_t,\mathbf{\Sigma}_t] = \theta_t^{Li}[\mathbf{\Sigma}_t] := \mathbf{\tilde{L}}_t^i \;\; \text{ and } \;\; \theta_t^{mi}[\hat{x}_t,\mathbf{\Sigma}_t] := \tilde{m}_t^i, } where $\mathbf{\tilde{L}}_t^i$ does not depend on $\hat{x}_t$ and $\tilde{m}_t^i$ is linear in $\hat{x}_t$ and is of the form $\tilde{m}_t^i = \mathbf{\tilde{M}}_t^i\hat{x}_t$. Now we construct the equilibrium strategy and belief profile $(\beta^*,\mu^*)$ through the forward recursion in (\ref{eq:mu*def0})--(\ref{eq:mu*def}), using the equilibrium generating function $\theta \equiv (\theta^L,\theta^m)$. \bit{ \item[(a)] Let \eq{ \mu^{*,i}_1[\phi](x_1^i)= N(0,\mathbf{\Sigma}_1^i). } \item[(b)] For $t =1,2 \ldots T-1, \forall u_{1:t} \in \mathcal{H}_{t+1}^c$, if $\mu_t^{*,i}[u_{1:t-1}] = N(\hat{x}_{t}^i, \mathbf{\Sigma}_t^i)$, let $\mathbf{\tilde{L}}_t^i = \theta_t^{Li}[\mathbf{\Sigma}_t], \tilde{m}_t^i = \theta_t^{mi}[\hat{x}_t,\mathbf{\Sigma}_t] = \mathbf{\tilde{M}}_t^i\hat{x}$. Then $ \forall x_{1:t}^i \in(\mathcal{X}^i)^t$ \seq{ \label{eq:meancov_update_FI} \eq{ \beta_{t}^{*,i}(u_{t}^i|u_{1:t-1}x_{1:t}^i) &:= \delta(u_t^i - \mathbf{\tilde{L}}_t^ix_t^i - \mathbf{\tilde{M}}_t^i\hat{x}_t)\\ \mu_{t+1}^{*,i}[u_{1:t}] &:= N(\hat{x}_{t+1}^i ,\mathbf{\Sigma}_{t+1}^i) \\ \mu^{*}_{t+1}[u_{1:t}](x_t^1,x_t^2)&:= \prod_{i=1}^2\mu^{*,i}_{t+1}[u_{1:t}](x_t^i), } } where $\hat{x}_{t+1}^i = \phi_x^{i}(\hat{x}_t^i, \mathbf{\tilde{L}}_t^i, \tilde{m}_t^i, u_t)$ and $\mathbf{\Sigma}_{t+1}^i = \phi_s^{i}(\mathbf{\Sigma}_t^i,\mathbf{\tilde{L}}_t^i)$. } \begin{theorem} $(\beta^*,\mu^*)$ constructed above is a PBE of the dynamic LQG game. \end{theorem} \begin{proof} The strategy and belief profile $(\beta^*,\mu^*)$ is constructed using the forward recursion steps (\ref{eq:mu*def0})--(\ref{eq:mu*def}) on equilibrium generating function $\theta$, which is defined through backward recursion steps (\ref{eq:VT+1})--(\ref{eq:Vdef}) implemented in the proof Theorem~\ref{thm:back_recr}. Thus the result is directly implied by Theorem 1 in~\cite{VaAn16}. \end{proof} \section{Disussion} \label{sec:disc} \subsection{Existence} In the proof of Theorem~\ref{thm:back_recr}, $\mathbf{\tilde{D}}_t^{u1\dagger}\bar{\mathbf{V}}_t^{1}\mathbf{\tilde{D}}_t^{u1}$ is assumed to be positive definite. This can be achieved if $\mathbf{R}^i$ is positive definite, through which it can be easily shown inductively in the proof of Theorem~\ref{thm:back_recr} that the matrices $\mathbf{V}_t^1,\bar{\mathbf{V}}_t^1$ are also positive definite. Constructing the equilibrium generating function $\theta$ involves solving the algebraic fixed point equation in (\ref{eq:L_fp}) for $\mathbf{\tilde{L}}_t$ for all $\mathbf{\Sigma}_t$. In general, the existence is not guaranteed, as is the case for existence of $\tilde{\gamma}_t$ in (\ref{eq:M_FP}) for general dynamic games with asymmetric information. At this point, we don't have a general proof for existence. However, in the following lemma, we provide sufficient conditions on the matrices $\mathbf{A}_t^i, \mathbf{B}_t^i, \mathbf{T}^i, \mathbf{S}^i, \mathbf{P}^i,\mathbf{V}_{t+1}^i$ and for the case $m^i=1$, for a solution to exist. \begin{lemma} \label{lemma:exist} For $m^1=m^2=1$, there exists a solution to (\ref{eq:L_fp}) if and only if for $i=1,2$, $\exists\ l^i\ \in \mathbb{R}^{n^i}$ such that $l^{i\dagger}\mathbf{\Delta}^i(l^1,l^2) l^i\geq 0$, or sufficiently $\mathbf{\Delta}^i(l^1,l^2) + \mathbf{\Delta}^{i,\dagger}(l^1,l^2)$ is positive definite, where $\mathbf{\Delta}^i, i=1,2$ are defined in Appendix~\ref{app:exist_proof}. \end{lemma} \begin{proof} See Appendix~\ref{app:exist_proof}. \end{proof} \subsection{Steady state} In Section~\ref{sec:prelim}, we presented the backward/forward methodology to find SPBE for finite time-horizon dynamic games, and specialized that methodology in this chapter, in Section~\ref{sec:results}, to find SPBE for dynamic LQG games with asymmetric information, where equilibrium strategies are linear in players' types. It requires further investigation to find the conditions for which the backward-forward methodology could be extended to infinite time-horizon dynamic games, with either expected discounted or time-average cost criteria. Such a methodology for infinite time-horizon could be useful to characterize steady state behavior of the games. Specifically, for time homogenous dynamic LQG games with asymmetric information (where matrices $\mathbf{A}^i, \mathbf{B}^i$ are time independent), under the required technical conditions for which such a methodology is applicable, the steady state behavior can be characterized by the fixed point equation in matrices $(\mathbf{L}^i, \mathbf{\Sigma}^i ,\mathbf{V}^i)_{i=1,2}$ through \eqref{eq:phis_def2}, (\ref{eq:L_fp2}) and (\ref{eq:V_update}), where the time index is dropped in these equations, i.e. for $i=1,2,$ \bit{ \item[1.] \hfill \makebox[0pt][r]{% \begin{minipage}[b]{\textwidth} \begin{equation} \mathbf{\Sigma} = \phi_s(\mathbf{\Sigma},\mathbf{L}) \label{eq:SS1} \end{equation} \end{minipage}} \item[2.] \hfill \makebox[0pt][r]{% \begin{minipage}[b]{\textwidth} \begin{equation} \left(\mathbf{D}^{ui\dagger}\bar{\mathbf{V}}^{i}\mathbf{D}^{ui} \right)\mathbf{L}^i = -\mathbf{D}^{ui\dagger}\bar{\mathbf{V}}^{i} [\mathbf{D}^{ei}]_1 \label{eq:SS2} \end{equation} \end{minipage}} \item[3.] \hfill \makebox[0pt][r]{% \begin{minipage}[b]{\textwidth} \begin{equation} \mathbf{V}^i = \mathbf{F}^{i\dagger}\bar{\mathbf{V}}^i\mathbf{F}^i,\label{eq:SS3} \end{equation} \end{minipage}} } where $\bar{\mathbf{V}}^i = \bm{\mathbf{T}^i&\mathbf{S}^{i} & \mathbf{0} \\ \mathbf{S}^{i\dagger}&\mathbf{P}^i & \mathbf{0} \\ \mathbf{0} & \mathbf{0} & \mathbf{V}^i }$. Observe that in the above equations the matrices $\mathbf{V}^i$ and $\bar{\mathbf{V}}^i$ do not appear as functions of $\mathbf{\Sigma}$, as in the finite horizon case described in \eqref{eq:bVb_def}, \eqref{eq:bV_def}, in the proof of Theorem~\ref{thm:back_recr}. The reason for that is as follows. The steady state behavior for a general dynamic game with asymmetric information and independent types, if it exists, would involve fixed point equation in value functions $(V^i(\cdot))_i$. However, for the LQG case, it reduces to a fixed point equation in $(V^i(\mathbf{\Sigma}))_i$, i.e. value functions evaluated at a specific value of $\mathbf{\Sigma}$. This is so because the functions $V^i$ are evaluated at $\mathbf{\Sigma}$ and $\phi(\mathbf{\Sigma},\mathbf{L})$, which at steady state are exactly the same (see \eqref{eq:SS1}). As a result, the fixed point equation reduces to the three algebraic equations as shown above with variables the matrices $\mathbf{\Sigma}$, $\mathbf{L}$, $\bar{\mathbf{V}}$ and $\mathbf{V}$, which represents an enormous reduction in complexity. \subsubsection{Numerical examples} In this section, we present numerically found solutions for steady state, assuming that our methodology extends to the infinite horizon problem for the model considered. We assume $\mathbf{B}^i=0$ which implies that the state process $(X_t^i)_{t\in \mathcal{T}}$ is uncontrolled. \bit{ \item[1.] For $i=1,2$, $ m^i=1, n^i=2, \mathbf{A}^i = 0.9\mathbf{I}, \mathbf{B}^i=\mathbf{0}, \mathbf{Q}^i = \mathbf{I}$, \eq{ \mathbf{T}^1 = \bm{\mathbf{I} & \frac{1}{4}\mathbf{I}\\\frac{1}{4}\mathbf{I} &\mathbf{0} }, \quad \mathbf{T}^2 = \bm{\mathbf{0} & \frac{1}{4}\mathbf{I}\\\frac{1}{4}\mathbf{I} &\mathbf{I} }, \quad \mathbf{P}^1 = \bm{\mathbf{I} &\mathbf{0} \\ \mathbf{0} & \mathbf{0} }, \nonumber \\ \mathbf{P}^2 = \bm{\mathbf{0} &\mathbf{0} \\ \mathbf{0} & \mathbf{I} }, \quad \mathbf{S}^1 = \bm{ \mathbf{1} &\mathbf{0} \\ \mathbf{0} & \mathbf{0} }, \quad \mathbf{S}^2 = \bm{ \mathbf{0} &\mathbf{0} \\\mathbf{0} & \mathbf{1} }, } there exists a symmetric solution as, for $i=1,2,$ \eq{ \mathbf{L}^i = -\bm{1.062 & 1.062} , \mathbf{\Sigma}^i = \bm{3.132 & -2.132 \\ -2.132 & 3.132}. } \item[2.] For $i=1,2$, $ m^i=2, n^i=2, \mathbf{A}^1 = \bm{0.9 & 0 \\ 0 & 0.8}, \mathbf{A}^2 =0.9\mathbf{I}, $ and $\mathbf{B}^i,\mathbf{T}^i,\mathbf{P}^i,\mathbf{S}^i$ used as before with appropriate dimensions, there exists a solution, \eq{ \mathbf{L}^1 =-\bm{ 1.680 &1.600 \\ 0.191 &0.286 },\quad \mathbf{L}^2 = -\bm{ 1.363 &1.363 \\ 1.363 &1.363 } \nonumber \\ \hspace{-1cm}\mathbf{\Sigma}^1 =\mathbf{I}, \; \quad \mathbf{\Sigma}^2 = \bm{ 3.132 &-2.132 \\ -2.132 &3.132 }. } It is interesting to note that for player 1, where $\mathbf{A}^1$ does not weigh the two components equally, the corresponding $\mathbf{L}^1$ is full rank, and thus reveals her complete private information. Whereas for player 2, where $\mathbf{A}^2$ has equal weight components, the corresponding $\mathbf{L}^2$ is rank deficient, which implies, at equilibrium player 2 does not completely reveal her private information. Also it is easy to check from (\ref{eq:cov_update}) that with full rank $\mathbf{L}^i$ matrices, steady state $\mathbf{\Sigma}^i = \mathbf{Q}^i$. } \section{Conclusion} \label{sec:concl} In this paper, we study a two-player dynamic LQG game with asymmetric information and perfect recall where players' private types evolve as independent controlled Markov processes. We show that under certain conditions, there exist strategies that are linear in players' private types which, together with Gaussian beliefs, form a PBE of the game. We show this by specializing the general methodology developed in~\cite{VaAn16} to our model. Specifically, we prove that (a) the common beliefs remain Gaussian under the strategies that are linear in players' types where we find update equations for the corresponding mean and covariance processes; (b) using the backward recursive approach of~\cite{VaAn16}, we compute an equilibrium generating function $\theta$ by solving a fixed point equation in linear deterministic partial strategies $\gamma_t$ for all possible common beliefs and all time epochs. Solving this fixed point equation reduces to solving a matrix algebraic equation for each realization of the state estimate covariance matrices. Also, the cost-to-go value functions are shown to be quadratic in private type and state estimates. This result is one of the very few results available on finding signaling perfect Bayesian equilibria of a truly dynamic game with asymmetric information. \appendices \section{} \label{app:belief_update} This lemma could be interpreted as Theorem~2.30 in \cite[Ch. 7]{KuVa86} with appropriate matrix substitution where specifically, their observation matrix $C_k$ should be substituted by our $L_k$. We provide an alternate proof here for convenience. $\pi_{t+1}^i$ is updated from $\pi_t^i$ through (\ref{eq:pi_update}). Since $\pi_t^i$ is Gaussian, $\gamma_t^i(u_t^i|x_t^i) = \delta(u_t^i - L_t^ix_t^i - m_t^i)$ is a linear deterministic constraint and kernel $Q^i$ is Gaussian, thus $\pi_{t+1}^i $ is also Gaussian. We find its mean and covariance as follows. We know that $x_{t+1}^i=\mathbf{A}_t^i x_t^i + \mathbf{B}_t^i u_t + w_t^i$. Then, \seq{ \eq{ &\mathbb{E}[X_{t+1}^i| \pi^i_t,\gamma_t^i, u_t] \nonumber \\ &= \mathbb{E}[\mathbf{A}_t^i X_t^i + \mathbf{B}_t^i U_t + W_t^i| \pi^i_t,\gamma_t^i, u_t] \\ &= \mathbf{A}_t^i\mathbb{E}[X_t^i | \pi^i_t,\gamma_t^i, u_t] + \mathbf{B}_t^i u_t\label{eq:a1_w0}\\ &= \mathbf{A}_t^i \mathbb{E}[X_t^i | \mathbf{L}_t^iX_t^i = u_t^i-m_t^i ] + \mathbf{B}_t^i u_t \label{eq:a1_ci} } } where (\ref{eq:a1_w0}) follows because $W_t^i$ has mean zero. Suppose there exists a matrix $\mathbf{G}_t^i$ such that $X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i$ and $\mathbf{L}_t^iX_t^i$ are independent. Then \seq{ \eq{ &\mathbb{E}[X_t^i\big|\mathbf{L}_t^iX_t^i = u_t^i-m_t^i] \\ &= \mathbb{E}[X_t^i - \mathbf{G}_t^i\mathbf{L}_t^iX_t^i + \mathbf{G}_t^i\mathbf{L}_t^iX_t^i \big| \mathbf{L}_t^iX_t^i = u_t^i-m_t^i] \\ &= \mathbb{E}[X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i] + \mathbf{G}_t^i(u_t^i-m_t^i)\\ &= \hat{x}_t^i + \mathbf{G}_t^i(u_t^i- \mathbf{L}_t^i\hat{x}_t^i - m_t^i), } } where $\mathbf{G}_t^i$ satisfies \seq{ \eq{ \mathbb{E}[(X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i)&(\mathbf{L}_t^iX_t^i)^{\dagger}]\nonumber \\ &\hspace{-1cm}= \mathbb{E}[(X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i)]\mathbb{E}[(\mathbf{L}_t^iX_t^i)^{\dagger}]\\ (\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i)\mathbb{E}[X_t^iX_t^{i\dagger}]\mathbf{L}_t^{i\dagger} &= (\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i)\mathbb{E}[X_t^i]\mathbb{E}[X_t^{i\dagger}]\mathbf{L}_t^{i\dagger}\\ (\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i)(\mathbf{\Sigma}_t^i + \hat{x}_t^i\hat{x}_t^{i\dagger})\mathbf{L}_t^{i\dagger} &= (\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i) \hat{x}_t^i\hat{x}_t^{i\dagger} \mathbf{L}_t^{i\dagger}\\ \mathbf{G}_t^i & = \mathbf{\Sigma}_t^i \mathbf{L}_t^{i\dagger}(\mathbf{L}_t^i\mathbf{\Sigma}_t^i \mathbf{L}_t^{i\dagger})^{-1}. } } \seq{ \eq{ &\mathbf{\Sigma}_{t+1}^i = sm\left(\mathbf{A}_t^iX_t^i-\mathbb{E}[\mathbf{A}_t^iX_t^i|\mathbf{L}_t^iX_t^i = u_t^i-m_t^i] |\mathbf{L}_t^iX_t^i = u_t^i-m_t^i\right) + \mathbf{Q}^i } } Now \seq{ \eq{ &sm\left(X_t^i-\mathbb{E}[X_t^i|\mathbf{L}_t^iX_t^i = u_t^i-m_t^i] |\mathbf{L}_t^iX_t^i = u_t^i-m_t^i\right) \\ &= sm\left((X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i)-(\mathbb{E}[X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i|\mathbf{L}_t^iX_t^i = u_t^i-m_t^i] ) | \mathbf{L}_t^iX_t^i = u_t^i-m_t^i\right)\\ &= sm\left((X_t^i-\mathbf{G}_t^i\mathbf{L}_t^iX_t^i) -(\mathbb{E}[X_t^i - \mathbf{G}_t^i\mathbf{L}_t^iX_t^i] )\right) \\ &= sm\left((\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i)(X_t^i-\mathbb{E}[X_t^i])\right) \\ &= (\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i)\mathbf{\Sigma}_t^i(\mathbf{I}-\mathbf{G}_t^i\mathbf{L}_t^i)^{\dagger} } } \section{} \label{app:exist_proof} We prove the lemma for player 1 and the result follows for player 2 by similar arguments. For the scope of this appendix, we define $\mathbf{\bar{B}}_t^1 = \bm{\mathbf{B}_{1,t}^1 \\ \mathbf{B}_{1,t}^1\\ \mathbf{B}_{1,t}^2 }$ and for any matrix $\mathbf{V}$, we define $\mathbf{V}_{*i}, \mathbf{V}_{i*}$ as the $i^{th}$ column and the $i^{th}$ row of $\mathbf{V}$, respectively. Then the fixed point equation (\ref{eq:L_fp}) can be written as, \eq{ &0 =\left[\mathbf{T}_{11}^{1} + (\mathbf{A}_t^1\mathbf{G}_t^1)^{\dagger}\mathbf{V}_{22,t+1}^{1} ( \mathbf{A}_t^1\mathbf{G}_t^1) + \right. \nonumber \\ &\left.\hspace{-5pt} \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{*2,t+1}^1\mathbf{A}_t^1\mathbf{G}_t^1 + (\mathbf{A}_t^1\mathbf{G}_t^1)^{\dagger}\mathbf{V}_{2*,t+1}^1\mathbf{\bar{B}}_t^1 + \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{t+1}^1\mathbf{\bar{B}}_t^1\right] \mathbf{L}_t^1 \nonumber \\ &+ \left[ \mathbf{S}_{11}^{1\dagger} + (\mathbf{A}_t^1\mathbf{G}_t^1)^{\dagger}\mathbf{V}_{21,t+1}^{1} \mathbf{A}_t^1 + \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{*1,t+1}^1\mathbf{A}_t^1\right]. \label{eq:app3_48} } It should be noted that $\mathbf{V}^i_{t+1}$ is a function of $\mathbf{\Sigma}_{t+1}$, which is updated through $\mathbf{\Sigma}_t$ and $\mathbf{L}_t$ as $\mathbf{\Sigma}_{t+1} = \phi_s(\mathbf{\Sigma}_{t},\mathbf{L}_t)$ (we drop this dependence here for ease of exposition). Substituting $\mathbf{G}_t^1 = \mathbf{\Sigma}_t^1\mathbf{L}_t^{1\dagger}(\mathbf{L}_t^1\mathbf{\Sigma}_t^1\mathbf{L}_t^{1\dagger})^{-1}$ and multiplying (\ref{eq:app3_48}) by $(\mathbf{L}_t^1\mathbf{\Sigma}_t^1\mathbf{L}_t^{1\dagger})$ from left and $(\mathbf{\Sigma}_t^1\mathbf{L}_t^{1\dagger})$ from right, we get \eq{ 0&=\mathbf{L}_t^1\mathbf{\Sigma}_t^1\left[ \mathbf{L}_t^{1\dagger}(\mathbf{T}_{11}^{1} + \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{t+1}^1\mathbf{\bar{B}}_t^1 ) \mathbf{L}_t^{1} + \mathbf{A}_t^{1\dagger}\mathbf{V}_{22,t+1}^{1} \mathbf{A}_t^1\right. \nonumber \\ & + \mathbf{L}_t^{1\dagger}(\mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{*2,t+1}^1\mathbf{A}_t^1+ \mathbf{S}_{11}^{1\dagger} + \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{*1,t+1}^1\mathbf{A}_t^1 ) \nonumber \\ &\left.+ (\mathbf{A}_t^{1\dagger}\mathbf{V}_{2*,t+1}^1\mathbf{\bar{B}}_t^1+ \mathbf{A}_t^{1\dagger}\mathbf{V}_{21,t+1}^{1} \mathbf{A}_t^1)\mathbf{L}_t^{1} \right] \mathbf{\Sigma}_t^1\mathbf{L}_t^{1\dagger} } Let $\mathbf{\bar{L}}_t^i = \mathbf{L}_t^i (\mathbf{\Sigma}_t^i)^{1/2}, \mathbf{\bar{A}}_t^i = \mathbf{A}_t^i(\mathbf{\Sigma}_t^i)^{1/2}$, \seq{ \label{eq:Lambda_def} \eq{ \mathbf{\Lambda}^1_a(\mathbf{L}_t) & :=\mathbf{T}_{11}^{1} + \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{t+1}^1\mathbf{\bar{B}}_t^1 \\ \mathbf{\Lambda}^1_b(\mathbf{L}_t) &:=\mathbf{\bar{A}}_t^{1\dagger}\mathbf{V}_{22,t+1}^{1} \mathbf{\bar{A}}_t^1 \\ \mathbf{\Lambda}^1_c(\mathbf{L}_t) & := \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{*2,t+1}^1\mathbf{\bar{A}}_t^1+ \mathbf{S}_{11}^{1\dagger}(\mathbf{\Sigma}_t^1)^{1/2} + \mathbf{\bar{B}}_t^{1\dagger} \mathbf{V}_{*1,t+1}^1\mathbf{\bar{A}}_t^1 \\ \mathbf{\Lambda}^1_d(\mathbf{L}_t) &:= \mathbf{\bar{A}}_t^{1\dagger}\mathbf{V}_{2*,t+1}^1\mathbf{\bar{B}}_t^1+ \mathbf{\bar{A}}_t^{1\dagger}\mathbf{V}_{21,t+1}^{1} \mathbf{\bar{A}}_t^1. } } Then, \eq{ 0&= \mathbf{\bar{L}}_t^1\mathbf{\bar{L}}_t^{1\dagger}\mathbf{\Lambda}^1_a(\mathbf{L}_t) \mathbf{\bar{L}}_t^{1}\mathbf{\bar{L}}_t^{1\dagger} + \mathbf{\bar{L}}_t^1\mathbf{\Lambda}^1_b(\mathbf{L}_t) \mathbf{\bar{L}}_t^{1\dagger} + \mathbf{\bar{L}}_t^1\mathbf{\bar{L}}_t^{1\dagger}\mathbf{\Lambda}^1_c(\mathbf{L}_t) \mathbf{\bar{L}}_t^{1\dagger} + \mathbf{\bar{L}}_t^1\mathbf{\Lambda}^1_d(\mathbf{L}_t) \mathbf{\bar{L}}_t^{1} \mathbf{\bar{L}}_t^{1\dagger} \label{eq:Lmatquad} } Since m=1, $\Lambda^1_a$ is a scalar. Let $\mathbf{\bar{L}}_t^i=\lambda^i l^{i\dagger}$, where $\lambda^i= || \mathbf{\bar{L}}_t^i ||_2$ and $l^i$ is a normalized vector and $t^1 =T_{11}$. Moreover, since the update of $\mathbf{\Sigma}_t$ in \eqref{eq:cov_update} is scaling invariant, $\mathbf{V}^1_{t+1}$ only depends on the directions $l= (l^1,l^2)$. Then, (\ref{eq:Lmatquad}) reduces to the following quadratic equation in $\lambda^1$ \eq{ (\lambda^1)^2 \Lambda^1_a(l) + \lambda^1 (\mathbf{\Lambda}^1_c(l) l^1 + l^{1\dagger}\mathbf{\Lambda}^1_d(l)) + l^{1\dagger}\mathbf{\Lambda}^1_b(l) l^1 = 0. } There exists a real-valued solution\footnote{Note that a negative sign of $\lambda^1$ can be absorbed in $l^1$.} of this quadratic equation in $\lambda^1$ if and only if \seq{ \eq{ (\mathbf{\Lambda}_c(l) l^1 + l^{1\dagger}\mathbf{\Lambda}^1_d(l))^2 \geq 4 \Lambda^1_a(l) l^{1\dagger}\mathbf{\Lambda}^1_b(l) l^1 \\ l^{1\dagger}(\mathbf{\Lambda}^{1\dagger}_c (l)\mathbf{\Lambda}^1_c(l) + \mathbf{\Lambda}^1_d(l) \mathbf{\Lambda}^{1\dagger}_d(l) + 2\mathbf{\Lambda}^1_d(l)\mathbf{\Lambda}^1_c(l) - 4 \Lambda^1_a(l) \mathbf{\Lambda}^1_b(l)) l^1 \geq 0. \label{eq:suff_cond} } } \eq{ \text{Let } \mathbf{\Delta}^1(l):= (\mathbf{\Lambda}^{1\dagger}_c(l) \mathbf{\Lambda}^1_c(l) + \mathbf{\Lambda}^1_d(l) \mathbf{\Lambda}^{1\dagger}_d(l) + 2\mathbf{\Lambda}^1_d(l)\mathbf{\Lambda}^1_c(l) - 4 \Lambda^1_a(l) \mathbf{\Lambda}^1_b(l)).} There exists a solution to the fixed point equation (\ref{eq:L_fp}) if and only if $\exists l^1,l^2\in \mathbb{R}^n$ such that $l^{1\dagger}\mathbf{\Delta}^1(l) l^1\geq 0$, or sufficiently $\mathbf{\Delta}^1(l) + \mathbf{\Delta}^{1\dagger}(l)$ is positive definite. \bibliographystyle{IEEEtran} \input{root_final.bbl} \end{document}
{'timestamp': '2016-06-17T02:00:33', 'yymm': '1606', 'arxiv_id': '1606.04960', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04960'}
arxiv
\section{Introduction} \label{intro} Music is the ultimate language. Many amazing composers throughout history have composed pieces that were both creative and deliberate. Composers such as Bach were well known for being very precise in crafting pieces with a great deal of underlying musical structure. Is it possible then for a computer to also learn to create such musical structure? Inspired by a blog post that was able to create polyphonic music that seemed to have a melody and some harmonization \cite{hexahedria_music}, we decide to tackle the same problem. We try to answer two main questions \begin{enumerate} \item Is there a meaningful way to represent notes in music as a vector? That is, does a method of characterizing meaning of words like word2vec\cite{mikolov} translate to music? \item Can we build interesting generative neural network architectures that effectively express the notions of harmony and melody? Most pieces have a main melody throughout the piece that it might expand on; can our neural network do the same? \end{enumerate} \section{Background and Related Work} \label{background} One of the earliest papers on deep learning-generated music, written by Chen et al \cite{chen}, generates one music with only one melody and no harmony. The authors also omitted dotted notes, rests, and all chords. One of the main problems they cited is the lack of global structure in the music. This suggests that there are two main directions to improve upon \begin{enumerate} \item create music with musical rhythm, more complex structure, and utilizing all types of notes including dotted notes, longer chords, and rests. \item create a model capable of learning long-term structure and possessing the ability to build off a melody and return to it throughout the piece \end{enumerate} Liu et al. \cite{liu} tackle the same problem but are unable to overcome either challenge. They state that their music representation does not properly distinguish between the melody and other parts of the piece and in addition do not address the full complexity of most classical pieces. They cite two papers that try to tackle each of the aforementioned problems. Eck et al. \cite{eck} use two different LSTM networks -- one to learn chord structure and local note structure and one to learn longer term dependencies in order to try to learn a melody and retain it throughout the piece. This allows the authors to generate music that never diverges far from the original chord progression melody. However, this architecture trains on a set number of chords and is not able to create a more diverse combination of notes. On the other hand Boulanger-Lewandowski et al. \cite{boulanger} try to deal with the challenge of learning complex polyphonic structure in music. They use a recurrent temporal restricted Boltzmann machine (RTRBM) in order to model unconstrained polyphonic music. Using the RTRBM architecture allows them to represent a complicated distribution over each time step rather than a single token as in most character language models. This allows them to tackle the problem of polyphony in generated music. In our project, we will mainly tackle the problem of learning complex structure and rhythms and compare our results to Boulanger-Lewandowski et al. \section{Data} \label{data} One of the primary challenges in training models for music generation is choosing the right data representation. We chose to focus on two primary types: midi files with minimal preprocessing and a "piano-roll" representation of midi files. \subsection{Midi data} Midi files are structured as a series of concurrent tracks, each containing a list of meta messages and messages. We extract the messages pertaining to the notes and their duration and encode the entire message as a unique token. For example, "note-on-60-0" followed by "note-off-60-480" would translate into two separate messages or tokens. Together, these two messages would instruct a midi player to play "middle-C" for 480 ticks, which translates to a quarter note for most midi time scales. We flatten the tracks so that the tokens of the separate tracks of a piece would be concatenated end-to-end. We started by downloading the entire Bach corpus from MuseData \footnotemark because Bach was comparatively the most prolific composer on that website. In total, there were 417 pieces for 1,663,576 encoded tokens in our Bach corpus. We also made sure to normalize the ticks per beat for each piece. We did not, however, transpose every piece into the same key, which has been shown to improve performance \cite{boulanger}. \footnotetext{The data for the Bach corpus was pulled directly from the MuseData website at \url{http://musedata.org/}.} \begin{figure}[ht] \begin{center} \includegraphics[width=0.4\linewidth]{bach-freq-distribution} \includegraphics[width=0.4\linewidth]{more-data-classical-2000-freq-distribution-dat} \end{center} \caption{Message or token distribution for both the Bach only corpus (left) and for the truncated version of the classical music corpus (right).\label{fig:tokens}} \end{figure} Furthermore, we scraped additional midi files from other online repositories\footnotemark that had a mix of different classical composers. This expanded our corpus from around 1 million tokens to around 25 million tokens. Due to memory constraints on our model, we primarily operated on a truncated version of this dataset that contained 2000 pieces. \footnotetext{The sites we scraped additional midi files from include \url{http://classicalmidiresource.com/}, \url{http://midiworld.com/}, and \url{http://piano-midi.de/}} \begin{center} \begin{tabular} {c c c c} Corpus & Words & Unique Tokens \\ \hline Bach Only & 1,663,576 & 35,509 \\ Full Classical & 24,654,390 & 175,467 \\ Truncated Classical & 11,413,884 & 132,437 \\ \end{tabular} \end{center} We also compared the token distribution for both the Bach only midi corpus and the entire classical midi corpus as seen in figure \ref{fig:tokens}. We see that there are many messages with very low frequency in both datasets. Indeed, for both datasets more than two-thirds of the unique tokens occurred less than 10 times. More importantly however, the drawback of encoding midi messages directly is that it does not effectively preserve the notion of multiple notes being played at once through the use of multiple tracks. Since we concatenate tracks end-to-end, we posit that it will be difficult for our model to learn that multiple notes in the same position across different tracks can really be played at the same time. \subsection{Piano roll data} In order to address the drawbacks outlined above, we turn to a different data representation. Instead of having tokens split by track, we represent each midi file as a series of time steps where each time step is a list of note ids that are playing. \begin{figure}[ht] \begin{center} \includegraphics[width=0.4\linewidth]{pr-kept-all-distribution} \end{center} \caption{Frequency distribution of all the tokens in the 'Muse-All' piano roll dataset.} \end{figure} We retrieved the piano roll representation of all the pieces on MuseData from \footnotemark. The dataset was created by sampling each midi file at eighth note intervals; the pieces were also transposed to C-Major/C-minor. The training set provided had 524 pieces for a total of 245,202 time steps. We encode each time step by concatenating the note ids together to form a token (e.g. a C-Major chord would be represented as "60-64-67"). Furthermore, as we were concerned about the number of unique tokens, we randomly chose 3 notes if the polyphony exceeded 4 at any particular time step. \footnotetext{The MuseData piano roll dataset is available on Boulanger-Lewandowski's website at \url{http://www-etud.iro.umontreal.ca/~boulanni/icml2012}.} \begin{center} \begin{tabular} {c c} Dataset & Unique Tokens \\ \hline Muse-All & 39,289 \\ Muse-Truncated & 21,510 \\ \end{tabular} \end{center} \section{Approach} \label{approach} We use a 2-layered Long Short Term Memory (LSTM) recurrent neural network (RNN) architecture to produce a character level model to predict the next note in a sequence. In our midi data experiments, we treat a midi message as a single token, whereas in our piano roll experiment, we treat each unique combination of notes across all time steps as a separate token. We create an embedding matrix which maps each token into a learned vector representation. A sequence of tokens in a piece is then concatenated into a list of embedding vectors that forms the time sequence input that is fed into the LSTM. The output of the LSTM is fed into softmax layer over all the tokens. The loss corresponds to the cross entropy error of our predictions at each time step compared to the actual note played at each time step. Our architecture allows the user to set various hyperparameters such as number of layers, hidden unit size, sequence length, batch size, and learning rate. We clip our gradients to prevent our gradients from exploding. We also anneal our learning rate when we see that the rate that our training error is decreasing is slowing. We generate music by feeding a short seed sequence into our trained model. We generate new tokens from the output distribution from our softmax and feed the new tokens back into our model. We used a combination of two different sampling schemes: one which chooses the token with maximum predicted probability and one which chooses a token from the entire softmax distribution. We ran our experiments on AWS g2.2xlarge instances. Our deep learning implementation was done in TensorFlow. \section{Experiments} \label{experiments} \subsection{Baseline} For our midi baseline, we had our untrained model generate sequences. As you can see in figure \ref{baselines}, our model was not able to learn the "on-off" structure of the midi messages, which results in many rests. For our piano roll baseline, we sample random chords from our piano roll representation weighted by how frequent they occur in our corpus. \begin{figure}[ht] \begin{center} \includegraphics[width=0.8\linewidth]{stream-random-snippet} \includegraphics[width=0.8\linewidth]{weighted-random-snippet} \end{center} \caption{(Top): Generated baseline midi files from an untrained model. (Bottom): Weighted sample of tokens from the piano roll representation. \label{baselines}} \end{figure} We see that for the piano roll the music is very dissonant, and while each chord may sound reasonable, there is no local structure from chord to chord. \subsection{Bach midi experiment} We first train our model on the "Bach Only" midi dataset. We trained for around 50 epochs, which took about 4 hours to train on a GPU. \begin{center} \begin{tabular} {c l} Hidden State & 128 \\ Token Embedding Size & 128 \\ Batch Size & 50 \\ Sequence Length & 50 \\ \end{tabular} \end{center} \begin{figure}[ht] \begin{center} \includegraphics[width=0.8\linewidth]{exp3-bach-stream} \end{center} \caption{Music generated from 'Bach Only' dataset.} \end{figure} \subsection{Classical midi experiment} We use the same architecture as in the Bach-Midi experiment on the "Truncated Classical" dataset due to time constraints. 15 epochs took 22 hours on a GPU. Furthermore, due to limitations on device memory on AWS's g2.2xlarge, we were forced to reduce the batch size and the sequence length. \begin{center} \begin{tabular} {c l} Hidden State & 128 \\ Token Embedding Size & 128 \\ Batch Size & 25 \\ Sequence Length & 25 \\ \end{tabular} \end{center} \begin{figure}[ht] \begin{center} \includegraphics[width=0.8\linewidth]{exp13-snippet} \end{center} \caption{Music generated from the 'Truncated Classical' dataset.} \end{figure} \subsection{Discussion} Interestingly, we found that the sequences produced by the model trained on the "Bach Only" data were more aesthetically pleasing than the one trained on a grab bag of different classical pieces. We believe that relative size of the character set of the classical midi model relative to the Bach model severely hindered its ability to learn effectively. We also use t-SNE to visualize our embedding vectors for our character model as a measure of success. We can see the results in figure \ref{fig:tsne_midi}. \begin{figure}[h] \begin{center} \includegraphics[width=\linewidth]{midistream_exp13_tsne} \end{center} \caption{t-SNE visualization of embedding vectors from the classical midi experiment.\label{fig:tsne_midi}} \end{figure} The circles denote midi ON messages while the x's represent midi OFF messages. The numbers represent midi note ids (lower numbers represent lower frequency), which are also color-coded from blue to red (low to high respectively). Since we have so many tokens in our model, we filter our visualization to only show notes that were played for 60 ticks. Note that there are clear clusters between the on and off messages for the medium frequency notes (the notes that are played most often), while the the rare low and high notes are clumped together in an indistinct cloud in the center. In addition, the model seems to learn to group similar pitches close together and to have some sort of linear progression from low pitches to high pitches. The on notes and off notes both have a general pattern of lower pitches in the top right to higher pitches in the bottom left. \subsection{Piano roll experiment} We ran this experiment with the same parameters as the "Bach-Midi Experiment." We ran it with for 800 epochs, which took 7 hours on a AWS g2.2xlarge instance. We also ran the same configuration on the truncated dataset for 100 epochs, which took 7 hours on a CPU. \begin{figure}[ht] \begin{center} \includegraphics[width=0.8\linewidth]{pr-exp3-snippet} \end{center} \begin{center} \includegraphics[width=0.8\linewidth]{pr-exp4-snippet} \end{center} \caption{Music generated from the Muse piano roll data. The top 4 lines are from the 'Muse-All' dataset and the last two lines are from the 'Muse-Truncated' dataset.} \end{figure} We again use t-SNE to visualize our embedding vectors for our new model as seen in figure \ref{fig:tsne_pianoroll}. \begin{figure}[h] \begin{center} \includegraphics[width=0.6\linewidth]{exp3_tsne} \end{center} \caption{t-SNE visualization of single note embedding vectors from the piano roll experiment. \label{fig:tsne_pianoroll}} \end{figure} In this model, since we have tens of thousands of different combinations of notes, we first look at the tokens that encode a single note being played. Here we see a similar result where the model is able to disambiguate among the lower and higher pitches cleanly. We again see that the lowest and highest pitches however are also grouped together and are slightly separated from the other note embeddings. \section{Evaluation} One of the major challenges of evaluating the quality of our model was incorporating the notion of musical aesthetic. That is, how "good" is the music that our model ultimately generates? As such, we devised a blind experiment where we asked 26 volunteers to offer their opinion on 3 samples of generated music. \begin{itemize} \item We asked them to hear the 3 samples back-to-back. \item We asked them to rate on a scale from 1 to 10. \begin{itemize} \item A 1 rating would be "completely random noise" \item A 5 rating would be "musically plausible" \item A 10 rating would be "composed by a novice composer" \end{itemize} \end{itemize} The identify of the samples was as follows: \begin{tabular} {c | l} Sample 1 & 10 second clip of the "Bach Midi" model \\ Sample 2 & 16 second clip of the "7\_RNN-NADE sequence" from \cite{boulanger}.\footnotemark\\ Sample 3 & 11 second clip of the "Piano roll" model trained on the "Muse-All" dataset \end{tabular} \footnotetext{This sequence can be downloaded from \url{http://www-etud.iro.umontreal.ca/~boulanni/icml2012}. Click the "MP3 samples" link.} We chose to compare our sequences with a RNN-Neural Autoregressive Distribution Estimator (RNN-NADE) sequence from \cite{boulanger} because it achieved similar results as other commonly used techniques such as RNN-RBM and RTRBM and is robust as a distribution estimator\cite{boulanger}. Our results indicate that our models did in fact produce music that is at least comparable in aesthetic quality to the RNN-NADE sequence. Indeed, in figure \ref{fig:raw-volunteer-ratings}, we see that only 3 out of the 26 volunteers said that they liked the sequence from the RNN-NADE better. (An additional 3 said that they liked it just as much as one of our sequences.) That being said, in the histogram in figure \ref{fig:raw-volunteer-ratings}, we see that the samples had an average rating of 7.0$\pm$1.87, 5.3$\pm$1.7, and 6.2$\pm$2.4 respectively, which suggests that our sample size was too small to distinguish the different samples statistically. \begin{figure}[ht] \begin{center} \includegraphics[width=0.49\linewidth]{raw-volunteer-ratings} \includegraphics[width=0.49\linewidth]{distribution-of-blind-ratings} \end{center} \caption{(Left): Raw voting values for each sequence for 26 volunteers. (Right): Histogram of ratings.\label{fig:raw-volunteer-ratings}} \end{figure} \section{Conclusion and Future Work} We were able show that a multi-layer LSTM, character-level language model applied to two separate data representations is capable of generating music that is at least comparable to sophisticated time series probability density techniques prevalent in the literature. We showed that our models were able to learn meaningful musical structure. This paper's writing comes at an interesting time in the space of deep learning generated art. In the last week, Google has announced its new Magenta program\footnotemark, a TensorFlow-backed machine learning platform for generating art. Google also released a 90-second clip computer-generated melody with an accompanying drum line. \footnotetext{Blog post introducing Magenta can be found here: \url{http://magenta.tensorflow.org/welcome-to-magenta}} Given the recent enthusiasm in machine learning inspired art, we hope to continue our work by introducing more complex models and data representations that effectively capture the underlying melodic structure. Furthermore, we feel that more work could be done in developing a better evaluation metric of the quality of a piece -- only then will we be able to train models that are truly able to compose original music! \label{conclusion}
{'timestamp': '2016-06-16T02:13:35', 'yymm': '1606', 'arxiv_id': '1606.04930', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04930'}
arxiv
\section{Conclusions} \label{sec:conc} We presented Smart Reply, a novel end-to-end system for automatically generating short, complete email responses. The core of the system is a state-of-the-art deep LSTM model that can predict full responses, given an incoming email message. To successfully deploy this system in {\it Inbox by Gmail}, we addressed several challenges: \begin{itemize} \item{We ensure that individual response options deliver {\it quality} by selecting them from a carefully constructed response space. The responses are identified by a novel method for semantic clustering.} \item{We increase the total {\it utility} of our chosen combination of suggestions by enforcing diversity among them, and filtering traffic for which suggestions would not be useful.} \item{We build a {\it scalable} system by efficiently searching the target response space.} \end{itemize} Our clearest metric of success is the fact that $10\%$ of mobile replies in {\it Inbox} are now composed with assistance from the Smart Reply system. Furthermore, we have designed the system in such a way that it is easily extendable to address additional user needs; for instance, the architecture of our core response scoring model is language agnostic, therefore accommodates extension to other languages in addition to English. \section{Suggestion Diversity} \label{sec:diversity} As discussed in Section~\ref{sec:response_selection}, the LSTM first processes an incoming message and then selects the (approximate) best responses from the target response set created using the method described in Section~\ref{sec:response_generation}. Recall that we follow this by some light normalization to penalize responses that may be too general to be valuable to the user. The effect of this normalization can be seen by comparing columns 1 and 2 of Table~\ref{fig:eg_ranked_responses}. For example, the very generic "Yes!" falls out of the top ten responses. Next, we need to choose a small number of options to show the user. A straight-forward approach would be to just choose the $N$ top responses and present them to the user. However, as column 2 of Table~\ref{fig:eg_ranked_responses} shows, these responses tend to be very similar. The likelihood of at least one response being useful is greatest when the response options are not redundant, so it would be wasteful to present the user with three variations of, say, \sentence{I'll be there.} The job of the diversity component is to select a more varied set of suggestions using two strategies: omitting redundant responses and enforcing negative or positive responses. \subsection{Omitting Redundant Responses} This strategy assumes that the user should never see two responses of the same \emph{intent}. An intent can be thought of as a cluster of responses that have a common communication purpose, e.g. confirming, asking for time or rejecting participation. In Smart Reply, every target response is associated with exactly one intent. Intents are defined based on automatic clustering followed by human validation as discussed in Section \ref{sec:response_generation}. The actual diversity strategy is simple: the top responses are iterated over in the order of decreasing score. Each response is added to the list of suggestions, unless its intent is already covered by a response on the suggestion list. The resulting list contains only the highest-scored representative of each intent, and these representatives are ordered by decreasing score. \\ \subsection{Enforcing Negatives and Positives} We have observed that the LSTM has a strong tendency towards producing positive responses, whereas negative responses such as \sentence{I can't make it} or \sentence{I don't think so} typically receive low scores. We believe that this tendency reflects the style of email conversations: positive replies may be more common, and where negative responses are appropriate, users may prefer a less direct wording. Nevertheless, we think that it is important to offer negative suggestions in order to give the user a real choice. This policy is implemented through the following strategy: \begin{quote} If the top two responses (after omitting redundant responses) contain at least one positive response and none of the top three responses are negative, the third response is replaced with a negative one. \end{quote} A positive response is one which is clearly affirmative, e.g. one that starts with \emph{Yes}, \emph{Sure} or \emph{Of course}. In order to find the negative response to be included as the third suggestion, a second LSTM pass is performed. In this second pass, the search is restricted to only the negative responses in the target set (refer Table~\ref{fig:eg_ranked_responses} for scored negative response examples). This is necessary since the top responses produced in the first pass may not contain any negatives. Even though missing negatives are more common, there are also cases in which an incoming message triggers exclusively negative responses. In this situation, we employ an analogous strategy for enforcing a positive response. \\ The final set of top scoring responses (bottom row in Table~\ref{fig:eg_ranked_responses}) are then presented to the user as suggestions. \begin{table} \begin{tabular}{|l||l|} \hline Unnormalized Responses & Normalized Responses\\ \hline Yes, I'll be there. & Sure, I'll be there.\\ Yes, I will be there. & Yes, I can.\\ I'll be there. & Yes, I can be there.\\ Yes, I can. & Yes, I'll be there.\\ What time? & Sure, I can be there.\\ I'll be there! & Yeah, I can.\\ I will be there. & Yeah, I'll be there.\\ Sure, I'll be there. & Sure, I can.\\ Yes, I can be there. & Yes. I can.\\ Yes! & Yes, I will be there.\\ \hline \hline \multicolumn{2}{|l|}{Normalized Negative Responses} \\ \hline \multicolumn{2}{|l|}{Sorry, I won't be able to make it tomorrow.} \\ \multicolumn{2}{|l|}{Unfortunately I can't.} \\ \multicolumn{2}{|l|}{Sorry, I won't be able to join you.} \\ \multicolumn{2}{|l|}{Sorry, I can't make it tomorrow.} \\ \multicolumn{2}{|l|}{No, I can't.} \\ \multicolumn{2}{|l|}{Sorry, I won't be able to make it today.} \\ \multicolumn{2}{|l|}{Sorry, I can't.} \\ \multicolumn{2}{|l|}{I will not be available tomorrow.} \\ \multicolumn{2}{|l|}{I won't be available tomorrow.} \\ \multicolumn{2}{|l|}{Unfortunately, I can't.} \\ \hline \hline \multicolumn{2}{|l|}{Final Suggestions} \\ \hline \multicolumn{2}{|l|}{Sure, I'll be there.} \\ \multicolumn{2}{|l|}{Yes, I can.} \\ \multicolumn{2}{|l|}{Sorry, I won't be able to make it tomorrow.} \\ \hline \end{tabular} \caption{Different response rankings for the message \emph{``Can you join tomorrow's meeting?''} \label{fig:eg_ranked_responses} } \end{table} \section{Introduction} \label{sec:intro} Email is one of the most popular modes of communication on the Web. Despite the recent increase in usage of social networks, email continues to be the primary medium for billions of users across the world to connect and share information \cite{ipsos}. With the rapid increase in email overload, it has become increasingly challenging for users to process and respond to incoming messages. It can be especially time-consuming to type email replies on a mobile device. An initial study covering several million email-reply pairs showed that $\sim$25\% of replies have 20 tokens or less. Thus we raised the following question: can we assist users with composing these short messages? More specifically, would it be possible to suggest brief responses when appropriate, just one tap away? \begin{figure}[h] \centering \includegraphics[scale=0.11]{smartreply_screenshot2.png} \caption{Example Smart Reply suggestions.} \label{fig:screenshot} \end{figure} \newpage To address this problem, we leverage the sequence-to-sequence learning framework \cite{SutskeverVL14}, which uses long short-term memory networks (LSTMs) \cite{lstm} to predict sequences of text. Consistent with the approach of the Neural Conversation Model \cite{vinyals_conversation}, our {\it input} sequence is an incoming message and our {\it output} distribution is over the space of possible replies. Training this framework on a large corpus of conversation data produces a fully generative model that can produce a response to any sequence of input text. As \cite{vinyals_conversation} demonstrated on a tech support chat corpus, this distribution can be used to decode coherent, plausible responses. However, in order to deploy such a model into a product used globally by millions, we faced several challenges not considered in previous work: \begin{itemize} \item{{\bf Response quality} How to ensure that the individual response options are {\it always} high quality in language and content.} \item{{\bf Utility} How to select multiple options to show a user so as to maximize the likelihood that one is chosen.} \item{{\bf Scalability} How to efficiently process millions of messages per day while remaining within the latency requirements of an email delivery system.} \item{{\bf Privacy} How to develop this system without ever inspecting the data except aggregate statistics.} \end{itemize} \input{inference_diagram} To tackle these challenges, we propose Smart Reply (Figure ~\ref{fig:screenshot}), a novel method and system for automated email response suggestion. Smart Reply consists of the following components, which are also shown in Figure~\ref{fig:inference_overview}: \begin{enumerate} \item {\bf Response selection:} At the core of our system, an LSTM neural network processes an incoming message, then uses it to predict the most likely responses. LSTM computation can be expensive, so we improve {\it scalability} by finding only the approximate best responses. We explain the model in detail in Section \ref{sec:response_selection}. \item {\bf Response set generation:} To deliver high {\it response quality}, we only select responses from response space which is generated offline using a semi-supervised graph learning approach. This is discussed in Section \ref{sec:response_generation}. \item {\bf Diversity:} After finding a set of most likely responses from the LSTM, we would like to choose a small set to show to the user that maximize the total {\it utility}. We found that enforcing diverse semantic intents is critical to making the suggestions useful. Our method for this is described further in Section \ref{sec:diversity}. \item {\bf Triggering model:} A feedforward neural network decides whether or not to suggest responses. This further improves {\it utility} by not showing suggestions when they are unlikely to be used. We break this out into a separate component so that we have the option to use a computationally cheaper architecture than what is used for the scoring model; this keeps the system {\it scalable}. This model is described in Section \ref{sec:triggering}. \end{enumerate} The combination of these components is a novel end-to-end method for generating short, complete responses to emails, going beyond previous works. For response selection it exploits state-of-the-art deep learning models trained on billions of words, and for response set generation it introduces a new semi-supervised method for semantic understanding of user-generated content. Moreover, since it directly addresses all four challenges mentioned above, it has been successfully deployed in {\emph Inbox}. Currently, the Smart Reply system is responsible for assisting with $10$\% of email replies for {\emph Inbox} on mobile. Next, we discuss the related work in Section~\ref{sec:related}, followed by a description of our core system components in Sections \ref{sec:response_selection}, \ref{sec:response_generation}, \ref{sec:diversity}, and \ref{sec:triggering}. We close by showing modeling results in Section~\ref{sec:eval_results} and our conclusions in Section~\ref{sec:conc}. \section{Related work} \label{sec:related} As we consider related work, we note that building an automated system to suggest email responses is not a task for which there is existing literature or benchmarks, nor is this a standard machine learning problem to which existing algorithms can be readily applied. However, there is work related to two of our core components which we will review here: predicting responses and identifying a target response space. \\ \noindent{\bf Predicting full responses.} Much work exists on analyzing natural language dialogues in public domains such as Twitter, but it has largely focused on social media tasks like predicting whether or not a response is made \cite{artzi-pantel-gamon:2012}, predicting next word only \cite{pang-ravi:2012}, or curating threads \cite{Backstrom:2013}. Full response prediction was initially attempted in \cite{ritter}, which approached the problem from the perspective of machine translation: given a Twitter post, "translate" it into a response using phrase-based statistical machine translation (SMT). Our approach is similar, but rather than using SMT we use the neural network machine translation model proposed in \cite{SutskeverVL14}, called "sequence-to-sequence learning". Sequence-to-sequence learning, which makes use of long short-term memory networks (LSTMs) \cite{lstm} to predict sequences of text, was originally applied to Machine Translation but has since seen success in other domains such as image captioning \cite{vinyals_image} and speech recognition \cite{chan}. Other recent works have also applied recurrent neural networks (RNNs) or LSTMs to full response prediction \cite{sordoni}, \cite{shang}, \cite{serban}, \cite{vinyals_conversation}. In \cite{sordoni} the authors rely on having an SMT system to generate n-best lists, while \cite{serban} and \cite{vinyals_conversation}, like this work, develop fully generative models. Our approach is most similar to the Neural Conversation Model \cite{vinyals_conversation}, which uses sequence-to-sequence learning to model tech support chats and movie subtitles. The primary difference of our work is that it was deployed in a production setting, which raised the challenges of response quality, utility, scalability, and privacy. These challenges were not considered in any of these related works and led to our novel solutions explained in the rest of this paper. Furthermore, in this work we approach a different domain than \cite{sordoni}, \cite{shang}, \cite{serban}, and \cite{vinyals_conversation}, which primarily focus on social media and movie dialogues. In both of those domains it can be acceptable to provide a response that is merely related or on-topic. Email, on the other hand, frequently expresses a request or intent which must be addressed in the response. \\ \noindent{\bf Identifying a target response space.} Our approach here builds on the Expander graph learning approach \cite{expander}, since it scales well to both large data (vast amounts of email) and large output sizes (many different underlying semantic intents). While Expander was originally proposed for knowledge expansion and classification tasks \cite{emailcateg2016}, our work is the first to use it to discover semantic intent clusters from user-generated content. Other graph-based semi-supervised learning techniques have been explored in the past for more traditional classification problems \cite{Zhu03ssl, Bengio+al-ssl-2006}. Other related works have explored tasks involving semantic classification~\cite{li:2010} or identifying word-level intents~\cite{SahaRoy:2015} targeted towards Web search queries and other forums~\cite{chen-EtAl:2013}. However, the problem settings and tasks themselves are significantly different from what is addressed in our work. \\ Finally, we note that Smart Reply is the first work to address these tasks together and solve them in a single end-to-end, deployable system. \section{Response Set Generation} \label{sec:response_generation} Two of the core challenges we face when building the end to end automated response system are {\it response quality} and {\it utility}. Response quality comes from suggesting ``high quality'' responses that deliver a positive user experience. Utility comes from ensuring that we don't suggest multiple responses that capture the same intent (for example, minor lexical variations such as ``{\it Yes, I'll be there.}'' and ``{\it I will be there.}''). We can consider these two challenges jointly. We first need to define a target response space that comprises high quality messages which can be surfaced as suggestions. The goal here is to generate a structured response set that effectively captures various intents conveyed by people in natural language conversations. The target response space should capture both variability in language and intents. The result is used in two ways downstream---(a) define a response space for scoring and selecting suggestions using the model described in Section~\ref{sec:response_selection}, and (b) promote diversity among chosen suggestions as discussed in Section~\ref{sec:diversity}. We construct a response set using only the most frequent anonymized sentences aggregated from the preprocessed data (described in Section~\ref{sec:data}). This process yields a few million unique sentences. \subsection{Canonicalizing email responses} The first step is to automatically generate a set of canonical responses messages that capture the variability in language. For example, responses such as ``{\it Thanks for your kind update.}'', ``{\it Thank you for updating!}'', ``{\it Thanks for the status update.}'' may appear slightly different on the surface but in fact convey the same information. We parse each sentence using a dependency parser and use its syntactic structure to generate a canonicalized representation. Words (or phrases) that are modifiers or unattached to head words are ignored. \subsection{Semantic intent clustering} In the next step, we want to partition all response messages into ``semantic'' clusters where a cluster represents a meaningful response intent (for example, ``{\it thank you}'' type of response versus ``{\it sorry}'' versus ``{\it cannot make it}''). All messages within a cluster share the same semantic meaning but may appear very different. For example, ``{\it Ha ha}'', ``{\it lol}'' and ``{\it Oh that's funny!}'' are associated with the {\it funny} cluster. This step helps to automatically digest the entire information present in frequent responses into a coherent set of semantic clusters. If we were to build a semantic intent prediction model for this purpose, we would need access to a large corpus of sentences annotated with their corresponding semantic intents. However, this is neither readily available for our task nor at this scale. Moreover, unlike typical machine learning classification tasks, the semantic intent space cannot be fully defined a priori. So instead, we model the task as a semi-supervised machine learning problem and use scalable graph algorithms~\cite{expander} to automatically learn this information from data and a few human-provided examples. \subsection{Graph construction} We start with a few manually defined clusters sampled from the top frequent messages (e.g., {\it thanks}, {\it i love you}, {\it sounds good}). A small number of example responses are added as ``seeds'' for each cluster (for example, {\it thanks} $\rightarrow$ ``{\it Thanks!}'', ``{\it Thank you.}'').\footnote{In practice, we pick $100$ clusters and on average $3$--$5$ labeled seed examples per cluster.} \begin{figure*}[ht!] \centering \includegraphics[width=0.85\textwidth,height=6.3cm]{clustering} \caption{Semantic clustering of response messages.} \label{fig:clustering} \end{figure*} We then construct a base graph with frequent response messages as nodes ($V_R$). For each response message, we further extract a set of lexical features (ngrams and skip-grams of length up to 3) and add these as ``feature'' nodes ($V_F$) to the same graph. Edges are created between a pair of nodes $(u, v)$ where $u \in V_R$ and $v \in V_F$ if $v$ belongs to the feature set for response $u$. We follow the same process and create nodes for the manually labeled examples $V_L$. We make an observation that in some cases an incoming original message could potentially be treated as a response to another email depending on the context. For example, consider the following (original, response) message pairs: \begin{center} \noindent{\it Let us get together soon.} $\rightarrow$ {\it When should we meet?}\\ \noindent{\it When should we meet?} $\rightarrow$ {\it How about Friday?}\\ \end{center} Inter-message relations as shown in the above example can be modeled within the same framework by adding extra edges between the corresponding message nodes in the graph. \subsection{Semi-supervised learning} The constructed graph captures relationships between similar canonicalized responses via the feature nodes. Next, we learn a semantic labeling for all response nodes by propagating semantic intent information from the manually labeled examples through the graph. We treat this as a semi-supervised learning problem and use the distributed EXPANDER~\cite{expander} framework for optimization. The learning framework is scalable and naturally suited for semi-supervised graph propagation tasks such as the semantic clustering problem described here. We minimize the following objective function for response nodes in the graph: \begin{equation} \begin{split} &s_{i}||\hat{C}_i - C_i||^2 + \mu_{pp}||\hat{C}_i - U||^2 \\ &+ \mu_{np} \Big( \sum_{j\in {\cal N_F}(i)} w_{ij}||\hat{C}_i - \hat{C}_j||^2 + \sum_{j\in {\cal N_R}(i)}w_{ik}||\hat{C}_i - \hat{C}_k||^2 \Big) \end{split} \end{equation} where $s_{i}$ is an indicator function equal to 1 if the node $i$ is a seed and 0 otherwise, $\hat{C}_i$ is the learned semantic cluster distribution for response node $i$, $C_i$ is the true label distribution (i.e., for manually provided examples), ${\cal N_F}(i)$ and ${\cal N_R}(i)$ represent the feature and message neighborhood of node $i$, $\mu_{np}$ is the predefined penalty for neighboring nodes with divergent label distributions, $\hat{C}_j$ is the learned label distribution for feature neighbor $j$, $w_{ij}$ is the weight of feature $j$ in response $i$, $\mu_{pp}$ is the penalty for label distribution deviating from the prior, a uniform distribution $U$. The objective function for a feature node is alike, except that there is no first term, as there are no seed labels for feature nodes: \begin{equation} \mu_{np}\sum_{i\in {\cal N}(j)}w_{ij}||\hat{C}_j - \hat{C}_i||^2 + \mu_{pp}||\hat{C}_j - U||^2 \end{equation} The objective function is jointly optimized for all nodes in the graph. The output from EXPANDER is a learned distribution of semantic labels for every node in the graph. We assign the top scoring output label as the semantic intent for the node, labels with low scores are filtered out. Figure~\ref{fig:clustering} illustrates this process. To discover new clusters which are not covered by the labeled examples, we run the semi-supervised learning algorithm in repeated phases. In the first phase, we run the label propagation algorithm for 5 iterations. We then fix the cluster assignment, randomly sample 100 new responses from the remaining unlabeled nodes in the graph. The sampled nodes are treated as potential new clusters and labeled with their canonicalized representation. We rerun label propagation with the new labeled set of clusters and repeat this procedure until convergence (i.e., until no new clusters are discovered and members of a cluster do not change between iterations). The iterative propagation method thereby allows us to both expand cluster membership as well as discover (up to 5X) new clusters, where each cluster has an interpretable semantic interpretation. \subsection{Cluster Validation} Finally, we extract the top $k$ members for each semantic cluster, sorted by their label scores. The set of (response, cluster label) pairs are then validated by human raters. The raters are provided with a response $R_i$, a corresponding cluster label $C$ (e.g., {\it thanks}) as well as few example responses belonging to the cluster (e.g., ``{\it Thanks!}'', ``{\it Thank you.}'') and asked whether $R_i$ belongs to $C$. The result is an automatically generated and validated set of high quality response messages labeled with semantic intent. This is subsequently used by the response scoring model to search for approximate best responses to an incoming email (described earlier in Section~\ref{sec:response_selection}) and further to enforce diversity among the top responses chosen (Section~\ref{sec:diversity}). \section{Evaluation and Results} \label{sec:eval_results} In this section, we describe the training and test data, as well as preprocessing steps used for all messages. Then, we evaluate different components of the Smart Reply system and present overall usage statistics. \subsection{Data} \label{sec:data} To generate the training data for all Smart Reply models from sampled accounts, we extracted all pairs of an incoming message and the user's response to that message. For training the triggering model (see Section~\ref{sec:triggering}), we additionally sampled a number of incoming personal messages which the user didn't reply to. At the beginning of Smart Reply pipeline (Figure~\ref{fig:inference_overview}), data is preprocessed in the following way: \begin{description} \itemsep-0.1em \item[Language detection] The language of the message is identified and non-English messages are discarded. \item[Tokenization] Subject and message body are broken into words and punctuation marks. \item[Sentence segmentation] Sentences boundaries are identified in the message body. \item[Normalization] Infrequent words and entities like personal names, URLs, email addresses, phone numbers etc. are replaced by special tokens. \item[Quotation removal] Quoted original messages and forwarded messages are removed. \item[Salutation/close removal] Salutations like \sentence{Hi John} and closes such as \sentence{Best regards, Mary} are removed. \end{description} After the preprocessing steps, the size of the training set is 238 million messages, which include 153 million messages that have no response. \subsection{Results} \label{sec:results} The most important end-to-end metric for our system is the fraction of messages for which it was used. This is currently $10$\% of all mobile replies. Below we describe in more detail evaluation stats for different components of the system. We evaluate all parts in isolation using both offline analysis as well as online experiments run on a subset of accounts. \subsubsection{Triggering results} In order to evaluate the triggering model, we split the data set described in Section~\ref{triggering:data_features} into train ($80$\%) and test ($20$\%) such that all test messages are delivered after train messages. This is to ensure that the test conditions are similar to the final scenario. We use a set of standard binary classifier metrics: precision, recall and the area under the ROC curve. The AUC of the triggering model is $0.854$. We also compute the fraction of triggered messages in the deployed system, which is $11$\%. We observed that it may be beneficial to slightly over-trigger, since the cost of presenting a suggestion, even if it is not used, is quite low. \subsubsection{Response selection results} \label{sec:results_lstm} We evaluate the LSTM scoring model on three standard metrics: Perplexity, Mean Reciprocal Rank and Precision@K. \paragraph{Perplexity} Perplexity is a measure of how well the model has fit the data: a model with lower perplexity assigns higher likelihood to the test responses, so we expect it to be better at predicting responses. Intuitively, a perplexity equal to $k$ means that when the model predicts the next word, there are on average $k$ likely candidates. In particular, for the ideal scenario of perplexity equal to $1$, we always know exactly what should be the next word. The perplexity on a set of $N$ test samples is computed using the following formula: \[ P_r = \exp(- \frac{1}{W} \sum_{i=1}^{N} \ln(\hat{P}(r^{i}_{1}, ..., r^{i}_{m} | o^{i}_{1}, ..., o^{i}_{n}))) \] \noindent where $W$ is the total number of words in all $N$ samples, $\hat{P}$ is the learned distribution and $\mathbf{r}^i$, $\mathbf{o}^i$ are the $i$-th response and original message. Note that in the equation above only response terms are factored into $P_r$. The perplexity of the Smart Reply LSTM is $17.0$. By comparison, an n-grams language model with Katz backoff \cite{katz} and a maximum order of $5$ has a perplexity of $31.4$ on the same data (again, computed only from response terms). \paragraph{Response ranking} \newcommand{\operatornamewithlimits{argmin}}{\operatornamewithlimits{argmin}} While perplexity is a quality indicator, it does not actually measure performance at the scoring task we are ultimately interested in. In particular, it does not take into account the constraint of choosing a response in $R$. Therefore we also evaluate the model on a response ranking task: for each of $N$ test message pairs $(o, r)$ for which $r \in R$, we compute $s = P(r | o)$ and $\forall_i \: x_i = P(w_i | o)$, where $w_i$ is the $i$-th element of $R$. Then we sort the set $R = \{s, x_1, \ldots, x_N \}$ in descending order. Finally, we define $rank_i = \operatornamewithlimits{argmin}_j (R_j | R_j = s)$. Put simply, we are finding the rank of the actual response with respect to all elements in $R$. \newpage Using this value, we can compute the Mean Reciprocal Rank: \vspace{-0.3cm} \[ MRR = \frac{1}{N} \sum_{i=1}^{N} \frac{1}{rank_i} \] Additionally we can compute Precision@K. For a given value of $K$ it is computed as the number of cases for which target response $r$ was within the top$K$ responses that were ranked by the model. We compare the Smart Reply response selection model to three baselines on the same ranking task. The {\it Random} baseline ranks $R$ randomly. The {\it Frequency} baseline ranks them in order of their frequency in the training corpus. This baseline captures the extent to which we can simply suggest highly frequent responses without regard for the contents of the original message. The {\it Multiclass-BOW} baseline ranks $R$ using a feedforward neural network whose input is the original message, represented with bag of words features, and whose output is a distribution over the elements of {$R$} (a softmax). As shown in Table~\ref{fig:response_ranking}, the Smart Reply LSTM significantly improves on the {\it Frequency} baseline, demonstrating that conditioning on the original message is effective; the model successfully extracts information from the original message and uses it to rank responses more accurately. It also significantly outperforms the {\it Multiclass-BOW} baseline. There are a few possible explanations for this. First, the recurrent architecture allows the model to learn more sophisticated language understanding than bag of words features. Second, when we pose this as a mulitclass prediction problem, we can only train on messages whose response is in $R$, a small fraction of our data. On the other hand, the sequence-to-sequence framework allows us to take advantage of all data in our corpus: the model can learn a lot about original-response relationships even when the response does not appear in $R$ exactly. Note that an added disadvantage of the multiclass formulation is that it tightly couples the training of the model to the construction of $R$. We expect $R$ to grow over time, given the incredible diversity with which people communicate. While a simpler application such as chat might only need a small number of possible responses, we find that for email we will need a tremendous number of possible suggestions to really address users' needs. \begin{table} \centering \begin{tabular}{|c|c|c|c|} \hline Model & Precision@10 & Precision@20 & MRR \\ \hline Random & $5.58e-4$ & $1.12e-3$ & $3.64e-4$ \\ \hline Frequency & $0.321$ & $0.368$ & $0.155$ \\ \hline Multiclass-BOW & $0.345$ & $0.425$ & $0.197$ \\ \hline Smart Reply & $0.483$ & $0.579$ & $0.267$ \\ \hline \end{tabular} \caption{Response ranking}\label{fig:response_ranking} \end{table} \begin{figure}[t] \centering \includegraphics[scale=0.7]{used_responses} \caption{Usage distribution for top suggested responses.} \label{fig:used_responses} \end{figure} \subsubsection{Diversity results} We justify the need for both the diversity component and a sizable response space $R$ by reporting statistics around unique suggestions and clusters in Table~\ref{fig:diversity_counts}. The Smart Reply system generates daily $12.9$k unique suggestions that belong to $376$ unique semantic clusters. Out of those, people decide to use $4,115$, or $31.9$\% of, unique suggestions and $313$, or $83.2$\% of, unique clusters. Note, however, that many suggestions are never seen, as column 2 shows: the user may not open an email, use the web interface instead of mobile or just not scroll down to the bottom of the message. Also, only one of the three displayed suggestions will be selected by the user. These statistics demonstrate the need to go well beyond a simple system with 5 or 10 canned responses. \begin{table} \centering \begin{tabular}{|c|c|c|c|} \hline & Daily Count & Seen & Used \\ \hline Unique Clusters & $376$ & $97.1$\% & $83.2$\% \\ \hline Unique Suggestions & $12.9$k & $78$\% & $31.9$\% \\ \hline \end{tabular} \caption{Unique cluster/suggestions usage per day}\label{fig:diversity_counts} \end{table} Figure~\ref{fig:used_responses} and Figure~\ref{fig:used_clusters} present, respectively, the distribution of the rank for suggested responses and the distribution of suggested clusters. The tail of the cluster distribution is long, which explains the poor performance of {\it Frequency} baseline described in Section~\ref{sec:results_lstm}. We also measured how Smart Reply suggestions are used based on their location on a screen. Recall that Smart Reply always presents $3$ suggestions, where the first suggestion is the top one. We observed that, out of all used suggestions, $45$\% were from the $1st$ position, $35$\% from the $2$nd position and $20$\% from the $3$rd position. Since usually the third position is used for diverse responses, we conclude that the diversity component is crucial for the system quality. Finally, we measured the impact of enforcing a diverse set of responses (e.g., by not showing two responses from the same semantic cluster) on user engagement: when we completely disabled the diversity component and simply suggested the three suggestions with the highest scores, the click-through rate decreased by roughly $7.5$\% relative. \begin{figure}[t] \centering \includegraphics[scale=0.7]{used_clusters} \caption{Usage distribution for semantic clusters corresponding to top suggested responses.} \label{fig:used_clusters} \end{figure} \section{Selecting responses} \label{sec:response_selection} The fundamental task of the Smart Reply system is to find the most likely response given an original message. In other words, given original message $\mathbf{o}$ and the set of all possible responses $R$, we would like to find: \[\mathbf{r^*} =\underset{r \in R}{\mathrm{argmax}} \hspace{2pt} P(\mathbf{r}|\mathbf{o})\] To find this response, we will construct a model that can score responses and then find the highest scoring response. We will next describe how the model is formulated, trained, and used for inference. Then we will discuss the core challenges of bringing this model to produce high quality suggestions on a large scale. \subsection{LSTM model} Since we are scoring one sequence of tokens $\mathbf{r}$, conditional on another sequence of tokens $\mathbf{o}$, this problem is a natural fit for sequence-to-sequence learning \cite{SutskeverVL14}. The model itself is an LSTM. The input is the tokens of the original message $\{o_1, ..., o_n\}$, and the output is the conditional probability distribution of the sequence of response tokens given the input: \vspace{-0.3cm} \[P(r_1, ..., r_m | o_1, ..., o_n)\] As in \cite{SutskeverVL14}, this distribution can be factorized as: \[P(r_1, ..., r_m | o_1, ..., o_n) = \prod_{i=1}^mP(r_i|o_1, ..., o_n, r_1, ..., r_{i-1}) \] First, the sequence of original message tokens, including a special end-of-message token $o_n$, are read in, such that the LSTM's hidden state encodes a vector representation of the whole message. Then, given this hidden state, a softmax output is computed and interpreted as $P(r_1|o_1, ..., o_n)$, or the probability distribution for the first response token. As response tokens are fed in, the softmax at each timestep $t$ is interpreted as $P(r_t|o_1, ..., o_n, r_1, ..., r_{t-1})$. Given the factorization above, these softmaxes can be used to compute $P(r_1, ..., r_m | o_1, ..., o_n)$. \\ \noindent{\bf Training} Given a large corpus of messages, the training objective is to maximize the log probability of observed responses, given their respective originals: \[ \sum_{(\mathbf{o}, \mathbf{r})} \log P(r_1, ..., r_m | o_1, ..., o_n)\] We train against this objective using stochastic gradient descent with AdaGrad \cite{duchi}. Ten epochs are run over a message corpus which will be described in Section \ref{sec:data}. Due to the size of the corpus, training is run in a distributed fashion using the TensorFlow library \cite{tensorflow}. Both our input and output vocabularies consist of the most frequent English words in our training data after preprocessing (steps described in Section~\ref{sec:data}). In addition to the standard LSTM formulation, we found that the addition of a recurrent projection layer \cite{sak} substantially improved both the quality of the converged model and the time to converge. We also found that gradient clipping (with the value of $1$) was essential to stable training. \\ \noindent{\bf Inference} At inference time we can feed in an original message and then use the output of the softmaxes to get a probability distribution over the vocabulary at each timestep. These distributions can be used in a variety of ways: \begin{enumerate} \item To draw a random sample from the response distribution $P(r_1, ..., r_m | o_1, ..., o_n)$. This can be done by sampling one token at each timestep and feeding it back into the model. \item To approximate the most likely response, given the original message. This can be done greedily by taking the most likely token at each time step and feeding it back in. A less greedy strategy is to use a beam search, i.e., take the top $b$ tokens and feed them in, then retain the $b$ best response prefixes and repeat. \item To determine the likelihood of a specific response candidate. This can be done by feeding in each token of the candidate and using the softmax output to get the likelihood of the next candidate token. \end{enumerate} Table \ref{fig:generative_examples} shows some example of generating the approximate most likely responses using a beam search. \\ \begin{table} \begin{tabular}{|p{3.5cm} |p{4.0 cm} |} \hline Query & Top generated responses\\ \hline Hi, I thought it would be & I can do Tuesday. \\ great for us to sit down & I can do Wednesday. \\ and chat. I am free & How about Tuesday? \\ Tuesday and Wenesday. & I can do Tuesday! \\ Can you do either of & I can do Tuesday. What \\ those days? & time works for you? \\ & I can do Wednesday! \\ Thanks! & I can do Tuesday or \\ & Wednesday. \\ --Alice & How about Wednesday? \\ & I can do Wednesday. What time works for you?\\ & I can do either.\\ \hline \end{tabular} \caption{Generated response examples.} \label{fig:generative_examples} \end{table} \subsection{Challenges}\label{sec:lstm_challenges} As described thus far, the model can generate coherent and plausible responses given an incoming email message. However, several key challenges arise when bringing this model into production. \\ \noindent{\bf Response quality} In order to surface responses to users, we need to ensure that they are {\it always} high quality in style, tone, diction, and content. Given that the model is trained on a corpus of real messages, we have to account for the possibility that the most probable response is not necessarily a high quality response. Even a response that occurs frequently in our corpus may not be appropriate to surface back to users. For example, it could contain poor grammar, spelling, or mechanics ({\it your the best!}); it could convey a familiarity that is likely to be jarring or offensive in many situations ({\it thanks hon!}); it could be too informal to be consistent with other {\it Inbox} intelligence features ({\it yup, got it thx}); it could convey a sentiment that is politically incorrect, offensive, or otherwise inappropriate ({\it Leave me alone}). While restricting the model vocabulary might address simple cases such as profanity and spelling errors, it would not be sufficient to capture the wide variability with which, for example, politically incorrect statements can be made. Instead, we use semi-supervised learning (described in detail in Section \ref{sec:response_generation}) to construct a target response space $R$ comprising only high quality responses. Then we use the model described here to choose the best response in $R$, rather than the best response from any sequence of words in its vocabulary. \\ \noindent{\bf Utility} Our user studies showed that suggestions are most useful when they are highly specific to the original message and express diverse intents. However, as column 1 in Table ~\ref{fig:eg_ranked_responses} shows, the raw output of the model tends to (1) favor common but unspecific responses and (2) have little diversity. First, to improve specificity of responses, we apply some light normalization that penalizes responses which are applicable to a broad range of incoming messages. The results of this normalization can be seen in column 2 of Table~\ref{fig:eg_ranked_responses}. For example, the very generic "Yes!" has fallen out of the top ten. Second, to increase the breadth of options shown to the user, we enforce diversity by exploiting the semantic structure of $R$, as we will discuss in Section \ref{sec:diversity}. The results of this are also shown at the bottom of Table~\ref{fig:eg_ranked_responses}. We further improve the utility of suggestions by first passing each message through a triggering model (described in Section \ref{sec:triggering}) that determines whether suggestions should be generated at all. This reduces the likelihood that we show suggestions when they would not be used anyway. \\ \noindent{\bf Scalability} Our model needs to be deployed in a production setting and cannot introduce latency to the process of email delivery, so scalability is critical. Exhaustively scoring every response candidate $r \in R$, would require $O(|R|l)$ LSTM steps where $l$ is the length of the longest response. In previous work \cite{SutskeverVL14}, this could be afforded because computations were performed in a batch process offline. However, in the context of an email delivery pipeline, time is a much more precious resource. Furthermore, given the tremendous diversity with which people communicate and the large number of email scenarios we would like to cover, we can assume that $R$ is very large and only expected to grow over time. For example, in a uniform sample of 10 million short responses (say, responses with at most 10 tokens), more than $40$\% occur only once. Therefore, rather than performing an exhaustive scoring of every candidate $r \in R$, we would like to efficiently search for the best responses such that complexity is $not$ a function of $|R|$. Our search is conducted as follows. First, the elements of $R$ are organized into a trie. Then, we conduct a left-to-right beam search, but only retain hypotheses that appear in the trie. This search process has complexity $O(bl)$ for beam size $b$ and maximum response length $l$. Both $b$ and $l$ are typically in the range of 10-30, so this method dramatically reduces the time to find the top responses and is a critical element of making this system deployable. In terms of quality, we find that, although this search only approximates the best responses in $R$, its results are very similar to what we would get by scoring and ranking all $r \in R$, even for small $b$. At $b = 128$, for example, the top scoring response found by this process matches the true top scoring response $99\%$ of the time. Results for various beam sizes are shown in Figure \ref{fig:beam_search}. Additionally, requiring that each message first pass through a triggering model, as mentioned above, has the additional benefit of reducing the total amount of LSTM computation. \\ \noindent{\bf Privacy} Note that all email data (raw data, preprocessed data and training data) was encrypted. Engineers could only inspect aggregated statistics on anonymized sentences that occurred across many users and did not identify any user. Also, only frequent words are retained. As a result, verifying model's quality and debugging is more complex.\\ Our solutions for the first three challenges are described further in Sections \ref{sec:response_generation}, \ref{sec:diversity}, and \ref{sec:triggering}. \input{beam_search_figure} \section{Acknowledgments} The authors would like to thank Oriol Vinyals and Ilya Sutskever for many helpful discussions and insights, as well as Prabhakar Raghavan for his guidance and support. \bibliographystyle{abbrv} \scriptsize \section{Life of a message} \label{sec:system} As described earlier, we break down our overall goal into multiple components---constructing a target response space (described in Section~\ref{sec:response_generation}) and then using it to predict and suggest responses for an incoming email message. Here we give an overview of the end to end prediction system, explain the idea and motivation behind specific parts. \input{inference_diagram} Refer to the diagram in Figure~\ref{fig:inference_overview}. When a new email arrives, we apply the following steps: \todo{It looks bad because Sec numbers are not in order} \begin{enumerate} \item \textbf{Preprocessing:} This includes sentence segmentation and tokenization, normalization of the text, removal of boilerplate text and more. We leave discussion of data and preprocessing details to Section~\ref{sec:data}. \item \textbf{Triggering:} We run the triggering model based on feedforward neural network to decide if we want to generate a Smart Reply for the message. The details of the triggering model are covered in Sec.~\ref{sec:triggering}. \item \textbf{Scoring:} The next step is to score all responses from a pre-computed whitelist using an LSTM-based model. The details of this step can be found in Sec.~\ref{sec:response_selection}. We describe the system that we used to generate the whitelist in Sec.~\ref{sec:response_generation}. \item \textbf{Diversity:} Finally, in Sec.~\ref{sec:diversity} we present the component responsible for ensuring that our suggestions are diverse. \end{enumerate} We describe the details of individual steps in the following sections. \section{Triggering} \label{sec:triggering} The \emph{triggering} module is the entry point of the Smart Reply system. It is responsible for filtering messages that are bad candidates for suggesting responses. This includes emails for which short replies are not appropriate (e.g., containing open-ended questions or sensitive topics), as well as emails for which no reply is necessary at all (e.g., promotional emails and auto-generated updates). The module is applied to every incoming email just after the preprocessing step. If the decision is negative, we finish the execution and do not show any suggestions (see Figure~\ref{fig:inference_overview}). Currently, the system decides to produce a Smart Reply for roughly $11$\% of messages, so this process vastly reduces the number of useless sugestions seen by the users. An additional benefit is to decrease the number of calls to the more expensive LSTM inference, which translates into smaller infrastructure cost. There are two main requirements for the design of the triggering component. First, it has to be good enough to figure out cases where the response is not expected. Note that this is a very different goal than just scoring a set of responses. For instance, we could propose several valid replies to a newsletter containing a sentence ``{\it Where do you want to go today?}'', but most likely all of the responses would be useless for our users. Second, it has to be fast: it processes hundreds of millions of messages daily, so we aim to process each message within milliseconds. The main part of the triggering component is a feedforward neural network which produces a probability score for every incoming message. If the score is above some threshold, we {\it trigger} and run the LSTM scoring. We have adopted this approach because feedforward networks have repeatedly been shown to outperform linear models such as SVM or linear regression on various NLP tasks (see for example \cite{DBLP:journals/corr/Goldberg15c}). \subsection{Data and Features}\label{triggering:data_features} In order to label our training corpus of emails, we use as positive examples those emails that have been responded to. More precisely, out of the data set described in Section~\ref{sec:data}, we create a training set that consists of pairs ($\mathbf{o}$, $y$), where $\mathbf{o}$ is an incoming message and $y \in \{true, false\}$ is a boolean label, which is {\it true} if the message had a response and {\it false} otherwise. For the positive class, we consider only messages that were replied to from a mobile device, while for negative we use a subset of all messages. We downsample the negative class to balance the training set. Our goal is to model $P(y = true \mid \mathbf{o})$, the probability that message $\mathbf{o}$ will have a response on mobile. After preprocessing (described in Section~\ref{sec:data}), we extract content features (e.g. unigrams, bigrams) from the message body, subject and headers. We also use various social signals like whether the sender is in recipient's address book, whether the sender is in recipient's social network and whether the recipient responded in the past to this sender. \subsection{Network Architecture and Training} We use a feedforward multilayer perceptron with an embedding layer (for a vocabulary of roughly one million words) and three fully connected hidden layers. We use feature hashing to bucket rare words that are not present in the vocabulary. The embeddings are separate for each sparse feature type (eg. unigram, bigram) and within one feature type, we aggregate embeddings by summing them up. Then, all sparse feature embeddings are concatenated with each other and with the vector of dense features (those are real numbers and boolean values mentioned in Section~\ref{triggering:data_features}). We use the ReLu \cite{relu} activation function for non-linearity between layers. The dropout \cite{dropout} layer is applied after each hidden layer. We train the model using AdaGrad \cite{duchi} optimization algorithm with logistic loss cost function. Similarly to the LSTM, the training is run in a distributed fashion using the TensorFlow library \cite{tensorflow}.
{'timestamp': '2016-06-16T02:12:10', 'yymm': '1606', 'arxiv_id': '1606.04870', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.04870'}
arxiv
\section{Introduction} \IEEEPARstart{I}{n} practice, a decision maker often requires to consider optimising multiple conflicting objectives. This type of optimisation problems are usually referred to as {\em multiobjective optimisation problems (MOPs)}. Since the objectives of the problems usually conflict with each other, there does not exist a unique solution that can optimise all the objectives simultaneously. Therefore, a set of Pareto optimal solutions, named as \emph{Pareto set (PS)}, exists for an MOP~\cite{1999Miettinen}. A solution is considered to be `Pareto optimal' if it is impossible to make any one objective better off without making at least another one worse off. Finding the PS often challenges greatly on computational capacity and algorithm intelligence~\cite{2001Deb}. In the last three decades, extensive research on \emph{evolutionary algorithms (EAs)} have shown that the EA paradigm is very powerful in handling MOPs, in the sense that a set of solutions that approximates to the PS, named as approximated set, can be obtained in a single run without requiring much computational effort~\cite{2011Zhou}\cite{zhang2015self}. EAs simulate the genetic evolution of a population of individuals to best fit their living environment~\cite{yu2010introduction}. To design an effective EA, effective recombination for fit offspring generation is a key. Research has shown that a problem's domain knowledge, if any, can greatly improve the search efficiency if the knowledge is properly collected or learned during the search process~\cite{2008ZhangZJ}. For an $m$-objective optimisation problem, it has been proved that the distribution of the PS exhibits an ($m-1$)-dimensional manifold structure under mild conditions~\cite{regularity}. This property is often referred to as the regularity property. From the point view of EA design, an effective EA is expected if the manifold structure can be discovered and applied for offspring generation. Some EAs have been developed to combine {\em machine learning} techniques for the discovery of the intrinsic manifold structure to aid the search for the PS. For examples, in regularity model-based estimation of distribution algorithm (RM-MEDA)~\cite{2008ZhangZJ}, the local principal component analysis (local PCA) approach is applied at each generation. It uses the learned principal components to approximate the manifold structure. Some EAs adopted other machine learning techniques to approximate the manifold structure~\cite{wang2012regularity}. All these algorithms apply the machine learning techniques at {\em every generation}. These learning algorithms often need to visit all data several times (iterations) until converge. Thus, a considerable amount of computational resources is consumed on learning. To reduce the computational overhead, the \emph{multiobjective EA (MOEA)} proposed by Zhang et al.~\cite{zhang2015self} couples the population evolution and the model inference. In their MOEA, only one iteration of the learning algorithm is applied at each generation. This scheme provides an important development on saving computational resources. The evolution procedure can also be seen as a learning procedure; intrinsic PS's structure of an MOP is expected to be learned dynamically from the changing candidate solutions. However, there is a fundamental issue in this scheme. As well known, one of the main assumptions in machine learning is that sample observations are assumed to be effectively \emph{i.i.d. (independent and identically distributed)} for the purposes of statistical inference. But, under the scheme in~\cite{zhang2015self}, along the evolution procedure, the assumption is largely violated. First, solutions at adjacent generations have rather different qualities in terms of their respective objectives, which indicate that they might not be sampled from the same underlying distribution (i.e. these solutions are not identically distributed). Second, the generation of new solutions at present generation depends on collective information from previous generation, which indicates solutions at adjacent generations are not independent. Look deeply into the data (i.e. offsprings created during the evolution search) we try to learn from, some special characteristics can be observed: 1) the structure to be discovered along evolution is temporal and changing dynamically. In other words, these data are produced by a non-stationary process\footnote{A process is stationary if and only if the joint distribution of the data at different time are the same. Specifically, if we let $t = 1,\cdots$ be the generations of the evolution, and $\mathbf{y}_t$ be a $n$-dimensional solution. The sequence $\mathbf{y}_t$ is a stationary stochastic process if the joint probabilistic distribution of $(\mathbf{y}_{t_1+h}, \cdots, \mathbf{y}_{t_N+h})$ and $(\mathbf{y}_{t_1}, \cdots, \mathbf{y}_{t_N})$ are the same for all $h = 0, 1, \cdots, $ and an arbitrary selection of $t_1, \cdots, t_N$. This is obviously not the case for the stream of offsprings created during the evolution process.}; 2) the structure determined by the data is scale-variant. On a short time scale, the structure is pseudo-stationary, while on a long time scale, the structure has a sequential and converging property. That is, along the evolution process, the underlying structure is similar between adjacent generations, while the structure will finally be converging to the PS's manifold structure of the considered optimisation problem. In this paper, we present the first-ever MOEA based on an online machine learning\footnote{In computer science, online machine learning methods learn patterns from data which are available in a sequential order as opposed to batch learning techniques which generate the best predictor by learning on the entire training data set at once.} from a stream of non-stationary data. In our algorithm, a modified algorithm to the online agglomerative clustering algorithm presented in~\cite{guedalia1999line} is developed to learn the PS's structure addressing the above mentioned characteristics. Obvious advantages of the proposed \emph{online clustering based evolutionary algorithm (OCEA)} include 1) a perfect match between the search dynamics and the non-stationary structure learning and 2) a significantly reduced computational cost on learning (data need to be visited only once in the context of online learning). To successfully implement the proposed algorithm, we need to address three main issues. First, how to modify the online agglomerative clustering in accordance with the evolution process to discover the underlying structure? Second, how to properly use the learned structure to create offsprings effectively? Finally, how to select the fittest individuals to drive the search towards the PS? These issues will be discussed in the following sections. The rest of the paper is organised as follows. The background and previous work on multiobjective evolutionary algorithms is introduced in Section~\ref{background}. Section~\ref{algorithm} presents the proposed algorithm in detail. Experimental studies are shown in Section~\ref{expStu} and \ref{furtherDis}. The analysis of parameters effect to algorithmic performance is discussed in Section~\ref{senStudy}. Section~\ref{conclusion} concludes the paper. \section{Background and Previous Work}\label{background} A box-constrained continuous MOP can be stated as follows: \begin{equation} \begin{array}{ll} \min & \mathbf{F}(\mathbf{x})=(f_1(\mathbf{x}),\cdots,f_m(\mathbf{x}))^\intercal\\ \mathrm{s.t. } & \mathbf{x}=(x_1,\cdots,x_n)^\intercal \in \Omega \end{array} \label{eq.1} \end{equation}where $\Omega=\prod_{i=1}^n[a_i, b_i] \subseteq \mathbb{R}^n$ defines the decision (search) space; $a_i$ and $b_i$ are the lower and upper boundaries of variable $x_i$, respectively; $\mathbf{x}=(x_1, \cdots, x_n)^\intercal $ is a vector of decision variable; $\mathbf{F}: \Omega \to \mathbb{R}^{m}$ represents the mapping from search space to objective space where $m$ objective functions $f_i(\mathbf{x}), i=1,\ldots,m$ are to be considered. Suppose that $\mathbf{u}=(u_1,\cdots,u_m)^\intercal, \mathbf{v}=(v_1,\cdots,v_m)^\intercal \in \mathbb{R}^m$ are two vectors. If $u_i \leq v_i$ for all $i\in \{1,\cdots, m\}$, but there exists at least one index $j$, such that $u_j < v_j$, then $\mathbf{u}$ is said to dominate $\mathbf{v}$\footnote{The definition of domination is for minimization. ``Dominate" means ``be better than".}, denoted by $\mathbf{u}\prec \mathbf{v}$. A solution $\mathbf{x}^*\in \Omega$ is called (\emph{globally}) \emph{Pareto optimal} if there is no $\mathbf{x}\in \Omega$ such that $\mathbf{F}(\mathbf{x}) \prec \mathbf{F}(\mathbf{x^*})$. The set of all Pareto optimal solutions, denoted by \emph{PS}, are named as \emph{Pareto set}. The set of the objective vectors of the Pareto optimal solutions is called \emph{Pareto front}, denoted by \emph{PF}. The goal of an MOEA for an MOP is to find a set of approximated solutions whose objective vectors (the objective vectors constitute an approximated front) are as close to the PF as possible (i.e. the convergence requirement), and distribute along the PF as widely and evenly as possible (i.e. the diversity requirement). Great efforts have been made to deal with MOPs in the evolutionary computation community~\cite{2011Zhou}. These developed approaches focus either on establishing a mechanism to balance convergence and diversity, or on developing effective recombination. MOEAs concerning the balance between convergence and diversity basically fall into three categories. In the first category, the Pareto dominance relationship is applied for promising solution selection. The nondominated sorting developed by Deb et al.~\cite{2002DebPAM} is the most known method. Its primary use is to drive the search towards the PF which favours convergence. It needs to incorporate other strategies, such as crowding distance~\cite{2002DebPAM} and K-nearest neighbor method~\cite{zitzler2001spea2}, to preserve the population diversity. It has been found out that dominance-based sorting method is not able to provide enough comparability for many-objective ($\geq 4$ objectives) optimization problems. Typical dominance-based MOEAs include NSGA-II~\cite{2002DebPAM}, SPEA2~\cite{zitzler2001spea2}, PESA-II~\cite{corne2001pesa}, NSGA-III~\cite{deb2014evolutionary}, and others. In the second category, MOEAs based on performance metrics, such as \emph{hypervolume (HV)}, R2 and $\Delta_p$, were developed. The performance metrics embed the convergence and diversity requirements together so that they can be employed to directly guide the selection of solutions for a good balance of convergence and diversity. Representative MOEAs include SMS-EMOA~\cite{beume2007sms}, HyPE~\cite{2011BaderZ}, R2-IBEA~\cite{phan2013r2} and DDE~\cite{rodriguez2012new}. The computation of the performance metrics becomes much more difficult and time-consuming in dealing with many-objective optimisation problems. The third category is the decomposition-based MOEAs. In this category, a number of reference vectors in the objective space are used to decompose the problem into a set of single objective subproblems~\cite{2009LiZ}, or several simple multiobjective subproblems~\cite{Liu2013}. The convergence is controlled by the objective values of the subproblems; while the diversity is managed by computing the distances of the solutions to the reference vectors. Representative decomposition-based MOEAs include MOEA/D~\cite{2007ZhangL}, MOEA/D-DE~\cite{2009LiZ}, MOEA/D-STM~\cite{li2014stable}, MOEA/D-M2M~\cite{Liu2013} and others. Regarding MOEAs focusing on effective recombination, they are almost all designed based on the regularity property of MOPs. The underlying assumption is that the manifold structure could be used to greatly improve the search efficiency since high-quality offsprings can be generated if the regularity structure is properly modelled and learned. The first work on applying the regularity property in designing MOEA, i.e., aforementioned RM-MEDA, was proposed in 2008~\cite{2008ZhangZJ}, where the manifold structure is approximated by the first $(m-1)$ principal components. This work was improved later by using help from the modelling on the PF~\cite{zhou2009approximating}. Various regularity based MOEAs have been developed since then, such as a reducing redundant cluster based RM-MEDA~\cite{wang2012regularity}, a RM-MEDA with local learning strategy~\cite{li2013improved}, evolutionary multiobjective optimisation via manifold learning~\cite{Li2014learning}, and others. Moreover, in~\cite{zhang2015self}, a self-organising map method is incorporated within the evolution procedure to search for the manifold PS structure. \section{The Algorithm}\label{algorithm} As discussed previously, existing regularity based MOEAs usually spend a high computational cost on learning. To reduce the consumption of computational resources, we propose to adopt an online machine learning scheme. Offsprings are considered as a stream of data since they come in order along the evolution process, and can only be accessed once or a small number of generations. Moreover, it is observed that along the evolution process, the stream of solutions is dependent, and non-stationary. Therefore, the application of online learning algorithm is able to reduce the number of visits and account for the non-stationary nature. This can significantly reduce the computational resources. Note that a finite mixture of Gaussian clusters can be used to well approximate the distribution of a set of data points statistically.\footnote{It is well acknowledged that mixtures of Gaussian distributions are dense in the set of probability distributions with respect to weak topology~\cite{bacharoglou10}.} This motives us to approximate the manifold structure by using an online {\em clustering} algorithm. The cluster statistics, including the number of clusters, cluster mean and variance-covariance, will evolve over time. To model this non-stationary process, we propose to modify an online agglomerative clustering algorithm called AddC~\cite{guedalia1999line} and use it to dynamically estimate the cluster statistics. In the following, we first describe the online agglomerative clustering algorithm developed in~\cite{guedalia1999line} and discuss how it should be modified to adapt to the evolution process of MOEAs. The other details of the developed algorithm are then presented. \subsection{Online Agglomerative Clustering} AddC, presented by Guedalia et al.~\cite{guedalia1999line} in 1998, is developed for clustering a stream of non-stationary data. AddC's clustering procedures are shown in Alg.~\ref{online_clustering}. From line~\ref{oac.1} to \ref{oac.2}, an arriving new data point $\mathbf{y}$ is assigned to the cluster that is closest to it at first. This step attempts to minimise the within cluster variance. Afterwards, from line~\ref{oac.3} to~\ref{oac.6}, if there are less than $K_{\max}$ clusters, $\mathbf{y}$ is employed as a centroid to create a new cluster; otherwise, from line~\ref{oac.4} to~\ref{oac.6}, two redundant clusters which are closest to each other are merged, and $\mathbf{y}$ is also treated as a centroid to create a new cluster for replacing the redundant cluster (i.e. $\mathcal{C}^\delta$ in line~\ref{oac.6}). The merging operation is aimed to maximise the distances between the centroids and to remove redundant clusters. The creation of new clusters is to consider the temporal changes in the distribution of the data. In line \ref{oac.7}, if there still exist data points to be clustered, the clustering operations are repeated. Otherwise, a post process is conducted to remove clusters with a negligible number ($\epsilon$) of data in line \ref{oac.8}. The post process is to eliminate outliers if any. \begin{algorithm}[htbp] \caption{Online Agglomerative Clustering AddC}\label{online_clustering} \begin{algorithmic}[1] \REQUIRE an arriving new data point $\mathbf{y}$, centroids $\mathbf{z}^k$ and counters $c^k$ of $m$ existing clusters $\mathcal{C}^1, \cdots, \mathcal{C}^m$, $1\leq k \leq m$, and the maximum number of clusters allowed $K_{\max}$. \ENSURE a new set of clusters. \STATE The centroid which is closest to the data point $\mathbf{y}$ is defined as the winner, \[j = \arg\min\limits_{1\leq k \leq m} ||\mathbf{y} - \mathbf{z}^k||.\]\label{oac.1}\\ \STATE Update the closest centroid and its counter, \[\mathbf{z}^j = \mathbf{z}^j +\frac{\mathbf{y} - \mathbf{z}^j}{c^j};~c^j = c^j + 1,\]where $c^j$ is the number of data points in $\mathcal{C}^j$.\label{oac.2}\\ \STATE If $m < K_{\max}$, set $m = m + 1$ and $\delta = m$. Goto step~\ref{oac.6}.\label{oac.3}\\ \STATE Find a pair of closest (redundant) centroids, \[(\gamma, \delta) = \arg\min\limits_{\gamma, \delta, \gamma \neq \delta} ||\mathbf{z}^\gamma -\mathbf{z}^\delta||.\]\label{oac.4}\\ \STATE Merge redundant clusters and update the cluster statistics, \[\mathbf{z}^\gamma = \frac{\mathbf{z}^\gamma c^\gamma + \mathbf{z}^\delta c^\delta}{c^\gamma + c^\delta};~c^\gamma = c^\gamma + c^\delta.\]\label{oac.5}\\ \STATE Initialise a new cluster $\mathcal{C}^\delta$, $\mathbf{z}^\delta = \mathbf{y}$ and $c^\delta = 0$.\label{oac.6}\\ \STATE If there still exist data points to be clustered, take a new point $\mathbf{y}$ and goto Step~\ref{oac.1}.\label{oac.7}\\ \STATE Post process: $\forall k$, if $c^k < \epsilon$, perform steps \ref{oac.6} and \ref{oac.7}.\label{oac.8}\\ \end{algorithmic} \end{algorithm} \subsection{Algorithmic Framework} The framework of OCEA is presented in Alg.~\ref{framework}. In line~\ref{fw.1} to~\ref{fw.2}, an initial population $\cal P$ is yielded, an external archive $\mathcal{A}$ is initialised to be the same as $\cal P$. In the first generation, each solution is considered as a cluster where itself is initialised to be the centroid $\mathbf{z}^i = \mathbf{x}^i$ and counter $c^i = 1$, $i=1,\cdots,N$. Afterwards, at each generation, an offspring $\mathbf{y}^i$ is generated around each solution $\mathbf{x}^i$ (lines~\ref{fw.7} to \ref{fw.9}). To generate $\mathbf{y}^i$, a mating control parameter $\beta \in [0,1]$ is applied to balance exploration and exploitation. With $\beta$, the solution generation will be in favour of exploitation. That is, the reference (or parent) solutions are chosen from the cluster that $\mathbf{x}^i$ locates. With $1-\beta$, the reference individuals are chosen from the global mating pool specified in line~\ref{fw.5}. This is to favour exploration. After recombination, the generated offspring $\mathbf{y}^i$ is then used to update external archive and current population by environmental selection, and the clustering information (lines~\ref{fw.9} and~\ref{fw.10}). The solution generation and the updating procedures for population and clusters will be described in the following subsections. \begin{algorithm}[htbp] \caption{OCEA framework}\label{framework} \begin{algorithmic}[1] \REQUIRE population size $N$, maximum evolutionary generations $T$, mating control parameter $\beta$. \ENSURE population $\cal P$. \STATE Intialization $\mathcal{P} = \{ {\mathbf{x}^1}, \cdots ,{\mathbf{x}^N}\}$ and an external archive $\mathcal{A} = \mathcal{P}$.\label{fw.1}\\ \STATE Take each $\mathbf{x}^i \in \mathcal{P}$ as a cluster ${\cal C}^i$ with centroid $\mathbf{z}^i = \mathbf{x}^i$ and counter $c^i = 1$.\label{fw.2}\\ \FOR{$t\leftarrow 1$ to $T$}\label{fw.3} \STATE Set $m = $\#clusters.\label{fw.4}\\ \STATE Construct a global mating pool $\mathcal{M}$ by randomly choosing a solution from a $\mathcal{C}^i, 1\leq i \leq m$.\label{fw.5}\\ \FOR{$i \leftarrow 1$ to $N$\label{fw.6}} \STATE Construct a mating pool $\mathcal{Q}^i$ for each $\mathbf{x}^i$ as follows: \begin{equation}\mathcal{Q}^i = \left\{ {\begin{array}{ll} {\mathcal{C}^{k_i}}&{\mbox{if}{\kern 1pt} {\kern 1pt} rand() < \beta }\\ {\mathcal{M}}&{\mbox{otherwise}}\nonumber \end{array}} \right.,\end{equation}where $\mathcal{C}^{k_i}$ represents that $\mathbf{x}^i$ loactes in $\mathcal{C}^k$, $rand()$ is a random number generator in $[0,1]$.\label{fw.7}\\ \STATE Generate ${\mathbf{y}^i}$ = \textsc{SolGen} $({\mathcal{Q}^i},{\mathbf{x}^i})$.\label{fw.8}\\ \STATE Update and clustering $[\mathcal{A}, \mathcal{C}]$ = \textsc{Esoc}~$(\mathcal{A}, \mathbf{y}^i, \mathcal{C})$.\label{fw.9}\\ \ENDFOR \STATE Set $\mathcal{P}=\mathcal{A}$ and pass the clustering results of $\mathcal{A}$ to $\mathcal{P}$.\label{fw.10}\\ \ENDFOR \end{algorithmic} \end{algorithm} \subsection{New Solution Generation} In this paper, the \emph{differential evolution (DE)} and \emph{polynomial mutation (PM)} operators are adopted to generate offsprings as presented in Alg.~\ref{sg}. The recombination operator takes the current solution $\mathbf{x}$ and its mating pool $\mathcal{Q}$ as input and outputs an offspring $\mathbf{y}$. DE~\cite{price2006differential} is firstly used to generate a trial solution (line~\ref{sg.2}), a repair mechanism is employed to correct any component that is outside the search boundary of that component (line~\ref{sg.3}). After repair, the PM~\cite{2001Deb} operator is applied to generate a new solution (line~\ref{sg.4}). The new solution is repaired again if necessary and the final solution is returned (line~\ref{sg.5}). In Alg.~\ref{sg}, $F$ and $CR$ are the two control parameters for the DE operator, $p_m$ and $\eta_m$ are the parameters for the PM operator. If $CR=1$, the DE operator in Alg.~\ref{sg} is rotation invariant, which is of advantage to deal with complicated PS~\cite{2009LiZ}. Therefore DE is selected to generate new offsprings in OCEA. Obviously, the use of other recombination operators is not limited; e.g. we could use the recombination operators in~\cite{XQiu2015}. \begin{algorithm}[htbp] \caption{Solution generation (\textsc{SolGen}) operator}\label{sg} \begin{algorithmic}[1] \REQUIRE a current solution $\mathbf{x}$ and its mating pool $\cal Q$ \ENSURE a trial solution $\mathbf{y}$ \STATE Choose randomly two distinct parent individuals $\mathbf{x}^1$ and $\mathbf{x}^2$ from $\mathcal{Q}$\label{sg.1}\\ \STATE Generate $\mathbf{y}^{'}=(y^{'}_1,\cdots,y^{'}_n)^\intercal$ as follows: \[ y^{'}_i = \left \{ \begin{array}{ll} x_i+F \times (x_i^{1}-x_i^{2})&\text{if}~rand()\leq CR\\ x_i&\text{otherwise}\\ \end{array} \right.. \]\label{sg.2}\\ \STATE Repair $\mathbf{y}^{'}$, \[ y^{''}_i = \left \{ \begin{array}{ll} a_i & \text{if}~y^{'}_i < a_i\\ b_i & \text{if}~y^{'}_i > b_i\\ y^{'}_i & \text{otherwise} \end{array} \right., \]where $\mathbf{x}_i \in [a_i, b_i]$.\label{sg.3}\\ \STATE Mutate $\mathbf{y}^{''}$, \[ y_i = \left \{ \begin{array}{ll} y^{''}_i+\delta_i \times (b_i-a_i) & \text{if}~rand()< p_m\\ y^{''}_i & \text{otherwise} \end{array} \right., \]where $r=rand()$ if a uniform random generator in [0,1], and{\small \[ \delta_i = \left \{ \begin{array}{ll} \left[2r+(1-2r)(\frac{b_i-y_i^{''}}{b_i-a_i})^{\eta_m+1}\right]^{\frac{1}{\eta_m+1}}-1 & \text{if}~r<0.5,\\ 1-\left[2-2r+(2r-1)(\frac{y_i^{''}-a_i}{b_i-a_i})^{\eta_m+1}\right]^{\frac{1}{\eta_m+1}} & \text{otherwise} \end{array} \right. \]}\label{sg.4}\\ \STATE If necessary, repair $\mathbf{y}^{''}\rightarrow\mathbf{y}$\label{sg.5}\\ \end{algorithmic} \end{algorithm} \subsection{Updating on Population and Clusters} In Alg.~\ref{framework} line~\ref{fw.9}, function $\textsc{Esco}$ is applied to carry out environmental selection and clustering updating. OCEA adopts the environmental selection method proposed in SMS-EMOA~\cite{beume2007sms} which is based on the hypervolume metric. The hypervolume metric is the only known unitary metric that is Pareto compliant~\cite{zitzler2003performance}. It has shown better performance over decomposition-based and Pareto dominance-based environmental selection approaches~\cite{2011BaderZ}. Regarding cluster updating, we modify the online agglomerative clustering algorithm AddC (Alg.~\ref{online_clustering}) so that it can be fitted into the evolutionary search mechanism. The modified AddC is fused in OCEA to update/refine the clusters to adaptively learn the PS's structure. Alg.~\ref{es} presents the details of \textsc{Esoc}. For each new solution $\mathbf{y}$, $\mathcal{A}$ is updated by the hypervolume metric based environmental selection. Specifically, the fast non-dominanted sorting approach proposed in NSGA-II~\cite{2002DebPAM} is applied to partition the external archive ${\mathcal{A}} \cup \{\mathbf{y}\}$ into $L$ non-dominanted fronts $\{\mathcal{B}^1,\cdots,\mathcal{B}^L\}$, where $\mathcal{B}^1$ is the best front and $\mathcal{B}^L$ is the worst one (line~\ref{es.1}). $L>1$ which indicates that there are more than one front in ${\mathcal{A}} \cup \{\mathbf{y}\}$. If it is the case, the solution $\mathbf{x}^*$ in $\mathcal{B}^L$ with the largest $d(\mathbf{x},{\mathcal{A}} \cup \{\mathbf{y}\})$ value is removed, where $d(\mathbf{x},\mathcal{A} \cup \{\mathbf{y}\})$ denotes the number of solutions in $\mathcal{A} \cup \{\mathbf{y}\}$ that dominates $\mathbf{x}$. Otherwise, if $L=1$, the solution $\mathbf{x}^*$ that least contributes to the hypervolume, i.e. $\Delta_{\varphi}(\mathbf{x},\mathcal{B}^1)$ (line~\ref{es.3} to \ref{es.4}, and \ref{es.9}), is excluded. The calculation of $\Delta_{\varphi}$ can be found in~\cite{beume2007sms}. \begin{algorithm}[ht] \caption{The updating procedure (\textsc{Esoc}).}\label{es} \begin{algorithmic}[1] \REQUIRE a new solution $\mathbf{y}$, external archive $\mathcal{A}$, centroids $\mathbf{z}^k$ and counters $c^k$ of current existing clusters $\mathcal{C}^1, \cdots, \mathcal{C}^m$, $1\leq k \leq m$, and the maximum number of clusters allowed $K_{\max}$. \ENSURE External archive ${\mathcal{A}}$ and its cluster information. \STATE Apply the fast non-dominanted sorting approach on ${\mathcal{A}} \cup \{\mathbf{y}\}$ to obtain $L$ fronts $\{\mathcal{B}^1,\cdots,\mathcal{B}^L\}$.\label{es.1}\\ \IF{$L>1$\label{es.2}} \STATE Determine the worst solution, \[\mathbf{x}^* = \arg\max\limits_{\mathbf{x}\in \mathcal{B}^L}d(\mathbf{x},{\mathcal{A}} \cup \{\mathbf{y}\}).\]\label{es.3} \ELSE \STATE Determine the worst solution, \[\mathbf{x}^* = \arg\min\limits_{\mathbf{x}\in {\mathcal{A}}\cup \{\mathbf{y} \}}\Delta_{\varphi}(\mathbf{x},\mathcal{B}^1).\]\label{es.4} \ENDIF \IF{$\mathbf{x}^*\neq \mathbf{y}$}\label{es.17} \STATE If $\mathbf{x}^* \in \mathcal{C}^k, k\in\{1,\cdots,m\}$, then remove $\mathbf{x}^*$ from $\mathcal{C}^k$: $\mathcal{C}^k=\mathcal{C}^k\backslash\{\mathbf{x}^*\}$. \label{es.5}\\ \IF{$\mathcal{C}^k=\emptyset$\label{es.6}} \STATE Remove cluster $\mathcal{C}^k$, set $m=m-1$.\label{es.7}\\ \ELSE \STATE Update cluster $\mathcal{C}^k$: \[c^k=c^k-1, \mathbf{z}^k = \mathbf{z}^k - \frac{\mathbf{x}^*-\mathbf{z}^k}{c^k}.\]\label{es.8} \ENDIF\label{es.15} \STATE Delete the worst solution ${\mathcal{A}}= {\mathcal{A}}\cup \{\mathbf{y}\}\backslash\{\mathbf{x}^*\}$.\label{es.9} \STATE Set $m=m+1$, construct a new cluster $\mathcal{C}^m$, set $c^m=1$, $\mathbf{z}^m=\mathbf{y}$.\label{es.10}\\ \IF{$m>K_{\max}$}\label{es.11} \STATE Find two closest clusters, \[(\gamma, \delta) = \arg\min\limits_{\gamma, \delta, \gamma \neq \delta} ||\mathbf{z}^\gamma -\mathbf{z}^\delta\|.\]\label{es.12} \STATE Merge the two clusters, \[\mathbf{z}^\gamma = \frac{\mathbf{z}^\gamma c^\gamma + \mathbf{z}^\delta c^\delta}{c^\gamma + c^\delta},~c^\gamma = c^\gamma + c^\delta.\]\label{es.13} \ENDIF\label{es.16} \ELSE \label{es.18} \STATE Delete the worst solution in ${\mathcal{A}}= {\mathcal{A}}\cup \{\mathbf{y}\}\backslash\{\mathbf{x}^*\}$.\label{es.14}\\ \ENDIF \end{algorithmic} \end{algorithm} If $\mathbf{y}$ is kept in $\mathcal{A}$ after environmental selection, i.e., $\mathbf{x}^*\neq \mathbf{y}$, the online clustering operation is invoked. First, $\mathbf{x}^*$ is removed from its cluster ${\cal C}^*$, and its cluster's centroid and counter are updated following equations in line~\ref{es.8}. It differs from AddC where no data points are to be removed during the online clustering process. Then $\mathbf{y}$ is taken as a new centroid to construct a new cluster (line~\ref{es.10}). If there are more than $K_{\max}$ clusters in $\mathcal{A}$, two clusters that are closest to each other are emerged (lines~\ref{es.11} to \ref{es.13}) to complete the clustering operation. \subsection{Notes on OCEA} It is necessary to emphasize that: \begin{itemize} \item The evolution procedure of OCEA is also an online clustering procedure working on a stream of offsprings which are created and updated during the evolution process. We would expect that the clustering structure is to be gradually emerged during evolution and finally gets well shaped at termination. \item Different from the original AddC (Alg.~\ref{online_clustering}), (a) the clustering procedure in OCEA starts from the $N$ initial clusters composed of the $N$ solutions in the initial population (line~\ref{fw.2} in Alg.~\ref{framework}); (b) During the evolution, some solutions are dominated and need to be removed. An extra operation is added to account for the removal of solutions, including the updating of cluster statistics and the discarding of any empty cluster (lines~\ref{es.5} to \ref{es.15} in Alg.~\ref{es}); (c) In our online clustering procedure, $\mathbf{y}$ is not assigned to its closest cluster as opposed to Alg.~\ref{online_clustering} where a new data need to be assigned to its closest cluster (line~\ref{es.10} in Alg.~\ref{es}). \item OCEA incorporates the online clustering tightly within the evolution search. The online clustering discovers adaptively the PS structure along with the evolution. New solutions are created taking the cluster information into account at each generation. As a result, it can be seen that the online clustering closely adapts to the search procedure; and accounts for the non-stationary of the evolution dynamics. \item Different from existing regularity model-based MOEAs in which the learning at each generation has a time complexity linearly to the number of training iterations. The number of generations should be large enough to make sure the convergence of the learning algorithm. On the contrary, in our scheme, each solution is visited only once. This can significantly reduce the computational burden. \item In our scheme, we do not require a post-process which is different from the original AddC algorithm. \end{itemize} \section{Experimental Study}\label{expStu} To investigate the performance of OCEA, it is compared with two decomposition-based MOEAs (MOEA/D-DE~\cite{2009LiZ} and TMOEA/D~\cite{liu2010t}), one regularity model based MOEA (RM-MEDA~\cite{2008ZhangZJ}), one popular performance metric based MOEA (SMS-EMOA~\cite{beume2007sms}), and one typical Pareto dominance based MOEA (NSGA-II~\cite{2002DebPAM}). Among these algorithms, MOEA/D-DE decomposes the MOP into a set of single-objective problems with uniformly distributed weights. It might be not able to obtain approximated fronts with good diversity for MOPs with complex PFs. TMOEA/D transforms the objective functions into those that are easy to be addressed by MOEA/D. This is to make MOEA/D perform well on MOPs with complex PFs. RM-MEDA is developed based on the regularity property. It learns some local principle components at each generation, and uses the principle components to approximate the manifold structure. SMS-MOEA uses the hypervolume metric as the selection criterion. NSGA-II, on the other hand, uses the Pareto dominance relationship among individuals and crowding distance to carry out environmental selection. These comparison algorithms cover all the main streams of MOEAs in the literatures. \subsection{Test Instances and Performance Metrics} MOPs with complex PF and complicated PS structures are particularly focused in this paper. The GLT test suite from~\cite{zhang2015self} are used in the comparison experiments. The test suite includes a variety of problems with various characteristics that challenge MOEAs greatly. Those characteristics include disconnected PF, convex PF, nonlinear variable linkage, etc. Two commonly-used performance metrics, \emph{inverted generational distance (IGD)}~\cite{2008ZhangZJ} and \emph{hypervolume (HV)}~\cite{zitzler1999multiobjective}, are employed to measure the algorithm's performance. These two metrics can measure both the convergence and diversity of the final approximated fronts found by MOEAs. Lower IGD and larger HV metric values imply better performance of MOEAs. To calculate the HV metric value of an approximated front, a reference point which can be dominated by all the objective vectors in the final approximated front need to be set. The reference points chosen for the test instances are as follows: for GLT1, $\mathbf{r}=(2,2)^\intercal$, for GLT2 $\mathbf{r}=(2,11)^\intercal$, for GLT3 $\mathbf{r}=(2,2)^\intercal$ and for GLT4 $\mathbf{r}=(2,3)^\intercal$, for GLT5-GLT6, $\mathbf{r}=(2,2,2)^\intercal$. \subsection{Experimental Settings}\label{expSet} It has been well acknowledged that for the GLT test instances, the DE and PM operators are more able to produce promising solutions than other operators~\cite{zhang2015self}. Therefore, to make a fair comparison, the recombination operators in NSGA-II and SMS-EMOA are replaced by the DE and PM operators used in this paper. Furthermore, all parameters in the experiments are adjusted through preliminary experiments for optimal performance on these test instances. All algorithms are implemented in Matlab and tested in the same computer. The parameter settings for these algorithms are as follows: \begin{itemize} \item Common parameters: \begin{itemize} \item population size: $N=100$ for bi-objective and 105 for tri-objective instances; \item search space dimension: $n=10$ for GLT1-GLT6; \item runs: each algorithms independently runs each test instance for 33 times; \item termination: maximum evolutionary generation $T=300$. \end{itemize} \item Parameters for OCEA: \begin{itemize} \item maximum number of clusters allowed: $K_{\max}=7$; \item mating control parameter: $\beta=0.6$; \item DE control parameters: $F=0.6,~CR=1$; \item PM control parameters: $p_m=1/n,~\eta_m=20$. \end{itemize} \item Parameters for MOEA/D-DE: \begin{itemize} \item neighbourhood size: $NS=5$; \item mating control parameter: $\beta=0.7$; \item maximum number of solutions to be replaced by an offspring: 2; \item DE control parameters: $F=0.9,~CR=0.6$; \item PM control parameters: $p_m=1/n,~\eta_m=20$. \end{itemize} \item Parameters for TMOEA/D: \begin{itemize} \item neighbourhood size: $NS=30$; \item generations for the first stage: $T1=T/10$; \item generations for the second stage: $T2=\alpha T$,\\$\alpha= \{0.01,~0.02,~\cdots,~0.1,~0.1,~0.1,~0.15\}$; \item DE control parameters: $F=0.5,~CR=1$. \end{itemize} \item Parameters for RM-MEDA: \begin{itemize} \item number of clusters in local PCA: 5; \item maximum iterations used in local PCA: 50; \item sampling extension ratio: 0.25. \end{itemize} \item Parameters for NSGA-II and SMS-EMOA: \begin{itemize} \item DE control parameters: $F=0.5,~CR=1$; \item PM control parameters: $p_m=1/n,~\eta_m=20$. \end{itemize} \end{itemize} To get statistically sound conclusions in the experiments, each algorithm independently runs 33 times for each instance, and the comparisons are performed based on the statistics of the performance metric values, i.e., mean and standard deviation values. In the comparison table, the mean IGD and HV metric values for each instance are sorted in an ascending and descending order, respectively, and the ranks are given in the square brackets of the table. The best mean metric values are highlighted in bold face with gray background. The Wilcoxon's rank sum test at a 5\% significance level is also performed to test the significance of differences between the mean metric values of each instance obtained by each pair of algorithms. In the tables, ``$\dag$", ``$\S$", and ``$\approx$" are used to denote that the mean metric values obtained by OCEA is better than, worse than, or similar to those achieved by the comparison algorithm, respectively. \subsection{Comparison Study} To study the statistical performance of OCEA, Table~\ref{GLT_Test} shows the statistics of IGD and HV metric values obtained by MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II, SMS-EMOA and OCEA on the GLT test suite averaged over 33 independent runs. In general, OCEA obtains 8 out of 12 best mean metric values, while the rest algorithms only obtain 4. According to the mean ranks, the algorithms' performance ranked from the best to the worst are OCEA, RM-MEDA, TMOEA/D, SMS-EMOA, NSGA-II and MOEA/D-DE. Specifically, according to the Wilcoxon's rank sum test, in the 12 comparisons with each of MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II and SMS-EMOA, OCEA achieves 12, 11, 11, 12, 11 better, 0, 1, 1, 0, 0 worse, and 0, 0, 0, 0, 1 similar mean metric values, respectively. Table~\ref{GLT_Test} denotes that OCEA performs the best overall on the GLT test suite. \begin{table*}[!htb]\scriptsize \centering \caption{Statistics (mean(std. dev.)[rank]) of IGD and HV metric values of final approximated fronts obtained by MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II, SMS-EMOA and OCEA algorithms over 33 independent runs on the GLT test suite}\label{GLT_Test} \begin{tabular}{lcccccc}\toprule Instance&MOEA/D-DE&TMOEA/D&RM-MEDA&NSGA-II&SMS-EMOA&OCEA\\ \cmidrule{2-7} &\multicolumn{6}{c}{IGD}\\ \midrule GLT1&7.042e-03$^\dag_{9.92e-04}$[3]&5.472e-03$^\dag_{1.20e-03}$[2]&1.324e-02$^\dag_{1.87e-02}$[4]&1.550e-02$^\dag_{9.58e-03}$[5]&2.100e-02$^\dag_{1.01e-02}$[6]&\cellcolor{gray25}\textbf{2.041e-03}$_{4.45e-04}$[1]\\ GLT2&3.569e-01$^\dag_{7.33e-02}$[6]&3.636e-02$^\S_{9.69e-03}$[2]&\cellcolor{gray25}\textbf{3.327e-02}$^\S_{1.15e-03}$[1]&4.146e-02$^\dag_{2.66e-03}$[4]&4.955e-02$^\dag_{2.88e-02}$[5]&3.720e-02$_{1.54e-03}$[3]\\ GLT3&3.829e-02$^\dag_{1.12e-02}$[6]&2.212e-02$^\dag_{5.61e-02}$[5]&2.018e-02$^\dag_{1.11e-02}$[4]&1.405e-02$^\dag_{8.67e-03}$[2]&1.929e-02$^\dag_{1.02e-02}$[3]&\cellcolor{gray25}\textbf{6.432e-03}$_{3.13e-03}$[1]\\ GLT4&1.985e-02$^\dag_{3.42e-03}$[2]&4.462e-02$^\dag_{1.14e-01}$[5]&4.147e-02$^\dag_{5.41e-02}$[4]&4.106e-02$^\dag_{4.65e-02}$[3]&5.505e-02$^\dag_{5.33e-02}$[6]&\cellcolor{gray25}\textbf{5.769e-03}$_{9.19e-05}$[1]\\ GLT5&8.079e-02$^\dag_{3.14e-03}$[6]&4.409e-02$^\dag_{9.69e-04}$[3]&5.130e-02$^\dag_{1.95e-03}$[4]&6.419e-02$^\dag_{4.26e-03}$[5]&3.018e-02$^\dag_{3.93e-04}$[2]&\cellcolor{gray25}\textbf{2.942e-02}$_{5.11e-04}$[1]\\ GLT6&5.582e-02$^\dag_{2.18e-02}$[6]&4.059e-02$^\dag_{3.31e-02}$[4]&3.835e-02$^\dag_{2.15e-03}$[3]&5.384e-02$^\dag_{3.97e-03}$[5]&2.225e-02$^\approx_{4.01e-04}$[2]&\cellcolor{gray25}\textbf{2.223e-02}$_{6.98e-04}$[1]\\ \toprule &\multicolumn{6}{c}{HV}\\ \cmidrule{2-7} GLT1&3.367e+00$^\dag_{4.98e-03}$[2]&3.366e+00$^\dag_{2.58e-03}$[3]&3.316e+00$^\dag_{3.72e-02}$[4]&3.312e+00$^\dag_{2.31e-02}$[5]&3.297e+00$^\dag_{2.39e-02}$[6]&\cellcolor{gray25}\textbf{3.369e+00}$_{4.31e-03}$[1]\\ GLT2&1.943e+01$^\dag_{6.62e-02}$[6]&1.977e+01$^\dag_{3.93e-02}$[2]&1.970e+01$^\dag_{6.87e-03}$[5]&1.972e+01$^\dag_{7.86e-03}$[3]&1.972e+01$^\dag_{1.13e-01}$[4]&\cellcolor{gray25}\textbf{1.981e+01}$_{1.14e-03}$[1]\\ GLT3&3.941e+00$^\dag_{2.10e-03}$[6]&3.943e+00$^\dag_{1.92e-02}$[5]&3.944e+00$^\dag_{1.88e-03}$[4]&3.946e+00$^\dag_{1.64e-03}$[2]&3.946e+00$^\dag_{2.01e-03}$[3]&\cellcolor{gray25}\textbf{3.948e+00}$_{9.82e-04}$[1]\\ GLT4&4.980e+00$^\dag_{2.51e-03}$[2]&4.869e+00$^\dag_{4.10e-01}$[6]&4.961e+00$^\dag_{3.85e-02}$[3]&4.954e+00$^\dag_{5.36e-02}$[4]&4.953e+00$^\dag_{3.50e-02}$[5]&\cellcolor{gray25}\textbf{4.993e+00}$_{5.82e-04}$[1]\\ GLT5&7.939e+00$^\dag_{1.78e-03}$[5]&7.958e+00$^\dag_{9.53e-04}$[3]&7.951e+00$^\dag_{1.45e-03}$[4]&7.939e+00$^\dag_{3.24e-03}$[6]&7.968e+00$^\dag_{1.96e-04}$[2]&\cellcolor{gray25}\textbf{7.969e+00}$_{2.67e-04}$[1]\\ GLT6&7.937e+00$^\dag_{1.35e-02}$[5]&7.947e+00$^\dag_{1.89e-02}$[4]&7.948e+00$^\dag_{1.52e-03}$[3]&7.933e+00$^\dag_{3.19e-03}$[6]&7.960e+00$^\dag_{2.82e-04}$[2]&\cellcolor{gray25}\textbf{7.961e+00}$_{4.16e-04}$[1]\\ \midrule Mean Rank&4.583&3.667&3.583&4.167&3.833&1.167\\ $\dag$/$\S$/$\approx$&12/0/0&11/1/0&11/1/0&12/0/0&11/0/1&\\ \bottomrule \end{tabular} \end{table*} To observe the search efficiency of OCEA, Fig.~\ref{IGDEvolution} shows the evolution of the statistics of the IGD metric values obtained by the six algorithms on GLT1-GLT6. From the figure, it can be seen that for GLT1 and GLT3-GLT6, OCEA reaches the fastest to the lowest mean IGD metric values. For GLT2, OCEA has the slower, similar and faster speed in comparison with RM-MEDA, TMOEA/D and the other algorithms, respectively. Moreover, when dealing with GLT2, OCEA actually performs better than RM-MEDA at the early stage compared with RM-MEDA. From the evolution of the standard deviations of the metrics, it also can be observed that within 300 generations, OCEA has achieved robust performance on all the instances except for GLT3. Fig.~\ref{IGDEvolution} indicates that OCEA approaches the fastest to the PFs and maintains the most diverse populations among the comparison algorithms on average. \begin{figure*}[!htb] \centering \includegraphics[width=0.32\textwidth]{GLT1Trace_IGD.eps} \includegraphics[width=0.32\textwidth]{GLT2Trace_IGD.eps} \includegraphics[width=0.32\textwidth]{GLT3Trace_IGD.eps}\\ \includegraphics[width=0.32\textwidth]{GLT4Trace_IGD.eps} \includegraphics[width=0.32\textwidth]{GLT5Trace_IGD.eps} \includegraphics[width=0.32\textwidth]{GLT6Trace_IGD.eps} \caption{Evolution of the statistics of IGD metric values obtained by MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II, SMS-EMOA and OCEA on GLT1-GLT6}\label{IGDEvolution} \end{figure*} To reveal the search processes, Fig.~\ref{AFEvo} plots the evolution of the approximated fronts obtained by RM-MEDA, NSGA-II, MOEA/D-DE and OCEA on GLT4. It is noted that the evolution of the approximated front obtained by each algorithm plotted in the figure is representative. The representative evolution of an algorithm here indicates the final approximated front yielded by the evolution is with the median IGD metric value in 33 independent runs. It can be seen from the figure that, at the 100th generation, the approximated front yielded by OCEA has reached the PF completely, and almost covered the whole PF. After 300 generations, it has reached the approximated front with excellent convergence and diversity. On the other hand, after 300 generations, the final approximated fronts obtained by RM-MEDA, NSGA-II, MOEA/D-DE still cannot cover the whole PF, are not distributed unevenly. Fig.~\ref{AFEvo} shows that OCEA can indeed greatly improve the search efficiency. \begin{figure*}[htbp] \centering \includegraphics[width=0.24\textwidth]{GLT4_RMMEDA_m2.eps} \includegraphics[width=0.24\textwidth]{GLT4_NSGAIIDE_m2.eps} \includegraphics[width=0.24\textwidth]{GLT4_MOEADDE_m2.eps} \includegraphics[width=0.24\textwidth]{GLT4_OACDE_m2.eps}\\ \includegraphics[width=0.24\textwidth]{GLT4_RMMEDA_m3.eps} \includegraphics[width=0.24\textwidth]{GLT4_NSGAIIDE_m3.eps} \includegraphics[width=0.24\textwidth]{GLT4_MOEADDE_m3.eps} \includegraphics[width=0.24\textwidth]{GLT4_OACDE_m3.eps}\\ \includegraphics[width=0.24\textwidth]{GLT4_RMMEDA_m4.eps} \includegraphics[width=0.24\textwidth]{GLT4_NSGAIIDE_m4.eps} \includegraphics[width=0.24\textwidth]{GLT4_MOEADDE_m4.eps} \includegraphics[width=0.24\textwidth]{GLT4_OACDE_m4.eps}\\ \includegraphics[width=0.24\textwidth]{GLT4_RMMEDA_m5.eps} \includegraphics[width=0.24\textwidth]{GLT4_NSGAIIDE_m5.eps} \includegraphics[width=0.24\textwidth]{GLT4_MOEADDE_m5.eps} \includegraphics[width=0.24\textwidth]{GLT4_OACDE_m5.eps}\\ \includegraphics[width=0.24\textwidth]{GLT4_RMMEDA_m6.eps} \includegraphics[width=0.24\textwidth]{GLT4_NSGAIIDE_m6.eps} \includegraphics[width=0.24\textwidth]{GLT4_MOEADDE_m6.eps} \includegraphics[width=0.24\textwidth]{GLT4_OACDE_m6.eps}\\ \subfigure[RM-MEDA] {\includegraphics[width=0.24\textwidth]{GLT4_RMMEDA_m6.eps}\label{a}} \subfigure[NSGA-II] {\includegraphics[width=0.24\textwidth]{GLT4_NSGAIIDE_m6.eps}\label{b}} \subfigure[MOEA/D-DE] {\includegraphics[width=0.24\textwidth]{GLT4_MOEADDE_m6.eps}\label{c}} \subfigure[OCEA] {\includegraphics[width=0.24\textwidth]{GLT4_OACDE_m6.eps}\label{d}} \caption{Evolution of the approximated fronts obtained by RM-MEDA, NSGA-II, MOEA/D-DE and OCEA on GLT4}\label{AFEvo} \end{figure*} \begin{figure*}[htbp] \centering \includegraphics[width=0.24\textwidth]{GLT1_PFs_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT1_PFs_OCEA.eps} \includegraphics[width=0.24\textwidth]{GLT1_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT1_OCEA.eps}\\ \includegraphics[width=0.24\textwidth]{GLT2_PFs_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT2_PFs_OCEA.eps} \includegraphics[width=0.24\textwidth]{GLT2_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT2_OCEA.eps}\\ \includegraphics[width=0.24\textwidth]{GLT3_PFs_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT3_PFs_OCEA.eps} \includegraphics[width=0.24\textwidth]{GLT3_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT3_OCEA.eps}\\ \includegraphics[width=0.24\textwidth]{GLT4_PFs_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT4_PFs_OCEA.eps} \includegraphics[width=0.24\textwidth]{GLT4_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT4_OCEA.eps}\\ \includegraphics[width=0.24\textwidth]{GLT5_PFs_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT5_PFs_OCEA.eps} \includegraphics[width=0.24\textwidth]{GLT5_RMMEDA.eps} \includegraphics[width=0.24\textwidth]{GLT5_OCEA.eps}\\ \subfigure[overall fronts] {\includegraphics[width=0.24\textwidth]{GLT6_PFs_RMMEDA.eps}\label{a}} \subfigure[overall fronts] {\includegraphics[width=0.24\textwidth]{GLT6_PFs_OCEA.eps}\label{b}} \subfigure[representative fronts] {\includegraphics[width=0.24\textwidth]{GLT6_RMMEDA.eps}\label{c}} \subfigure[representative fronts] {\includegraphics[width=0.24\textwidth]{GLT6_OCEA.eps}\label{d}} \caption{Final approximated fronts obtained by OCEA and RM-MEDA}\label{PFcmp} \end{figure*} To further investigate the effect of OCEA, Fig.~\ref{PFcmp} plots the final approximated fronts obtained by RM-MEDA and OCEA on GLT1-GLT6. All the final approximated fronts of each instance obtained by RM-MEDA and OCEA, are plotted in Fig.~\ref{a} and~\ref{b}. The final approximated front of each instance with median IGD metric value (called representative front) obtained by RM-MEDA and OCEA, respectively, over 33 independent runs are plotted in Fig.~\ref{c} and~\ref{d}. From Fig.~\ref{a} and \ref{b}, it can be seen that through 33 independent runs, the final approximated fronts of each instance achieved by RM-MEDA and OCEA, respectively, both can cover the whole PF of that instance. However, compared with RM-MEDA, OCEA performs more stably. From Fig.~\ref{c} and \ref{d}, it is observed that the representative fronts of GLT5-GLT6 yielded by RM-MEDA do not reach the PFs. For GLT1-GLT4, although the representative fronts yielded by RM-MEDA all reach the PFs, the PFs are not completely covered. By contrast, the representative fonts obtained by OCEA for each instance all converge to the PFs and distributed well over them. Fig.~\ref{PFcmp} implies that for the GLT test instances, OCEA is stable and robust in terms of convergence and diversity. In summary, we may conclude that OCEA has shown an excellent performance for dealing with MOPs with complicated PSs and complex PFs. \section{Further Discussions}\label{furtherDis} \subsection{Performance on WFG test suite} To deeply understand the performance of OCEA, OCEA is also applied to the WFG test suite~\cite{WFG} and compared with the five algorithms mentioned above. It is well known that the WFG test instances have complex PFs and are with various complicated characteristics, such as nonseparable, multimodal, degenerate, deceptive, etc. In this section, 9 bi-objective WFG test instances with 30 dimensional decision variables are taken as the test-bed. The maximum evolutionary generation is set as 450. Through preliminary optimisation over parameters, part of the parameter settings of these algorithms are listed in Table~\ref{WFGParameter}; while the rest is the same as in Section~\ref{expSet}. Again 33 independent runs of these algorithms are carried out on each test instance. Table~\ref{WFG_Test} shows the statistics of the IGD and HV metric values obtained by MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II, SMS-EMOA and OCEA on the WFG test instances over 33 independent runs. \begin{table}[htbp]\scriptsize \centering \caption{Parameter settings for MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II, SMS-EMOA and OCEA on the WFG test suite}\label{WFGParameter} \begin{tabular}{ll}\toprule Algs.& Parameters\\\midrule MOEA/D-DE&$NS=20, \beta=0.9, F=0.5, CR=0.2$\\ TMOEA/D&$F=0.5, CR=0.2$\\ RM-MEDA&$K=5$\\ NSGA-II&$F=0.3, CR=0.2$\\ SMS-EMOA&$F=0.5, CR=0.2$\\ OCEA&$K_{\max}=4, F=0.3, CR=0.6, \beta=0.9$\\ \bottomrule \end{tabular} \end{table} \begin{table*}[htbp]\scriptsize \centering \centering \caption{Statistics (mean(std. dev.)[rank]) of the IGD and HV metric values of final approximated fronts obtained by MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II, SMS-EMOA and OCEA algorithms over 33 independent runs on the WFG test suite.}\label{WFG_Test} \begin{tabular}{lcccccc}\toprule test instances &MOEA/D-DE&TMOEA/D&RM-MEDA&NSGA-II&SMS-EMOA&OCEA\\ \cmidrule{2-7} &\multicolumn{6}{c}{IGD}\\ \midrule WFG1&1.105e+00$^\S_{1.15e-02}$[2]&\cellcolor{gray25}\textbf{9.327e-01}$^\S_{1.68e-02}$[1]&1.169e+00$^\S_{7.95e-03}$[3]&1.435e+00$^\dag_{7.17e-02}$[5]&1.446e+00$^\dag_{6.26e-02}$[6]&1.306e+00$_{6.37e-02}$[4]\\ WFG2&3.781e-02$^\dag_{6.18e-04}$[6]&2.860e-02$^\dag_{3.40e-03}$[4]&3.030e-02$^\dag_{4.58e-03}$[5]&1.431e-02$^\approx_{8.48e-04}$[3]&\cellcolor{gray25}\textbf{1.357e-02}$^\S_{8.05e-04}$[1]&1.429e-02$_{8.94e-04}$[2]\\ WFG3&1.456e-02$^\dag_{3.21e-04}$[4]&1.237e-02$^\dag_{5.17e-04}$[2]&3.399e-02$^\dag_{4.46e-03}$[6]&1.869e-02$^\dag_{7.05e-04}$[5]&1.245e-02$^\dag_{2.46e-04}$[3]&\cellcolor{gray25}\textbf{1.184e-02}$_{1.11e-04}$[1]\\ WFG4&\cellcolor{gray25}\textbf{3.400e-02}$^\S_{5.46e-03}$[1]&4.921e-02$^\S_{1.09e-02}$[3]&9.385e-02$^\dag_{2.92e-03}$[6]&5.692e-02$^\approx_{5.76e-03}$[5]&4.581e-02$^\S_{4.01e-03}$[2]&5.512e-02$_{7.60e-03}$[4]\\ WFG5&6.762e-02$^\dag_{2.51e-04}$[3]&7.776e-02$^\dag_{9.13e-03}$[5]&1.116e-01$^\dag_{1.38e-02}$[6]&6.895e-02$^\dag_{3.92e-04}$[4]&\cellcolor{gray25}\textbf{6.656e-02}$^\approx_{7.22e-05}$[1]&6.657e-02$_{7.97e-05}$[2]\\ WFG6&3.325e-01$^\dag_{1.33e-02}$[5]&3.531e-01$^\dag_{2.96e-02}$[6]&3.249e-01$^\dag_{2.54e-03}$[2]&3.321e-01$^\dag_{5.92e-03}$[4]&3.318e-01$^\dag_{1.65e-02}$[3]&\cellcolor{gray25}\textbf{3.249e-01}$_{1.15e-02}$[1]\\ WFG7&1.873e-02$^\dag_{4.30e-04}$[3]&4.113e-02$^\dag_{2.13e-02}$[6]&3.935e-02$^\dag_{7.71e-03}$[5]&2.860e-02$^\dag_{1.54e-03}$[4]&1.192e-02$^\dag_{2.62e-04}$[2]&\cellcolor{gray25}\textbf{1.137e-02}$_{2.45e-04}$[1]\\ WFG8&4.930e-02$^\dag_{7.11e-03}$[3]&4.484e-02$^\approx_{1.73e-02}$[2]&1.628e-01$^\dag_{1.36e-02}$[6]&6.190e-02$^\dag_{8.42e-03}$[5]&5.474e-02$^\dag_{6.73e-03}$[4]&\cellcolor{gray25}\textbf{3.763e-02}$_{1.12e-02}$[1]\\ WFG9&2.451e-01$^\dag_{3.14e-02}$[3]&2.687e-01$^\dag_{2.66e-02}$[5]&\cellcolor{gray25}\textbf{2.073e-01}$^\approx_{2.51e-03}$[1]&2.673e-01$^\dag_{1.95e-02}$[4]&2.703e-01$^\approx_{1.10e-02}$[6]&2.422e-01$_{3.56e-02}$[2]\\ \toprule &\multicolumn{6}{c}{HV}\\ \cmidrule{2-7} WFG1&5.942e+00$^\S_{4.52e-02}$[2]&\cellcolor{gray25}\textbf{6.718e+00}$^\S_{8.16e-02}$[1]&5.607e+00$^\S_{4.38e-02}$[3]&4.427e+00$^\dag_{2.63e-01}$[5]&4.398e+00$^\dag_{2.33e-01}$[6]&4.889e+00$_{2.22e-01}$[4]\\ WFG2&1.144e+01$^\S_{1.19e-03}$[2]&\cellcolor{gray25}\textbf{1.145e+01}$^\S_{4.20e-03}$[1]&1.127e+01$^\dag_{3.44e-02}$[6]&1.141e+01$^\dag_{4.67e-03}$[5]&1.143e+01$^\S_{3.66e-03}$[3]&1.142e+01$_{6.53e-03}$[4]\\ WFG3&1.092e+01$^\dag_{3.32e-03}$[4]&1.093e+01$^\dag_{1.26e-02}$[3]&1.077e+01$^\dag_{2.81e-02}$[6]&1.089e+01$^\dag_{4.86e-03}$[5]&1.094e+01$^\dag_{2.98e-03}$[2]&\cellcolor{gray25}\textbf{1.094e+01}$_{1.53e-03}$[1]\\ WFG4&\cellcolor{gray25}\textbf{8.527e+00}$^\S_{3.47e-02}$[1]&8.337e+00$^\approx_{1.23e-01}$[5]&8.107e+00$^\dag_{1.68e-02}$[6]&8.341e+00$^\approx_{7.72e-02}$[4]&8.420e+00$^\S_{2.49e-02}$[2]&8.350e+00$_{5.13e-02}$[3]\\ WFG5&8.140e+00$^\dag_{3.32e-02}$[4]&7.815e+00$^\dag_{2.38e-01}$[6]&7.962e+00$^\dag_{1.02e-01}$[5]&8.144e+00$^\dag_{4.56e-02}$[3]&8.197e+00$^\approx_{6.18e-02}$[2]&\cellcolor{gray25}\textbf{8.199e+00}$_{5.41e-02}$[1]\\ WFG6&6.351e+00$^\dag_{6.78e-02}$[5]&6.245e+00$^\dag_{1.10e-01}$[6]&6.388e+00$^\dag_{1.40e-02}$[2]&6.351e+00$^\dag_{3.08e-02}$[4]&6.355e+00$^\dag_{8.39e-02}$[3]&\cellcolor{gray25}\textbf{6.391e+00}$_{5.88e-02}$[1]\\ WFG7&8.643e+00$^\dag_{3.73e-03}$[3]&7.979e+00$^\dag_{5.89e-01}$[6]&8.459e+00$^\dag_{5.19e-02}$[5]&8.579e+00$^\dag_{8.67e-03}$[4]&8.666e+00$^\dag_{2.52e-03}$[2]&\cellcolor{gray25}\textbf{8.672e+00}$_{1.91e-03}$[1]\\ WFG8&8.450e+00$^\approx_{4.27e-02}$[2]&8.274e+00$^\dag_{2.26e-01}$[5]&7.674e+00$^\dag_{7.98e-02}$[6]&8.329e+00$^\dag_{5.08e-02}$[4]&8.373e+00$^\dag_{4.01e-02}$[3]&\cellcolor{gray25}\textbf{8.463e+00}$_{7.02e-02}$[1]\\ WFG9&6.181e+00$^\dag_{1.61e-01}$[3]&6.038e+00$^\dag_{1.32e-01}$[6]&\cellcolor{gray25}\textbf{6.411e+00}$^\S_{2.17e-02}$[1]&6.119e+00$^\dag_{1.05e-01}$[4]&6.114e+00$^\dag_{5.25e-02}$[5]&6.246e+00$_{1.68e-01}$[2]\\ \midrule Mean Rank&3.111&4.056&4.444&4.278&3.111&2.000\\ $\dag$/$\S$/$\approx$&12/5/1&12/4/2&14/3/1&15/0/3&11/4/3&\\ \bottomrule \end{tabular} \end{table*} Table~\ref{WFG_Test} shows that OCEA achieves 9 out of the 18 best mean metrics. The rest five algorithms obtain only 9. The performance of these algorithms ranked from the best to the worst is OCEA, MOEA/D-DE, SMS-EMOA, TMOEA/D, NSGA-II and RM-MEDA according to the mean ranks. The Wilcoxon's rank sum test suggests that OCEA performs better than MOEA/D-DE, TMOEA/D, RM-MEDA, NSGA-II and SMS-EMOA in 12, 12, 14, 15 and 11 out of the 18 mean metric values; performs worse in 5, 4, 3, 0 and 4; and similar in 1, 2, 1, 3 and 3. From Table~\ref{WFG_Test}, we may conclude that OCEA performs very well in solving the WFG test instances. It also indicates that OCEA is able to deal with MOPs with complex PFs and with complicated problem characteristics. \section{Parameter Sensitivity Analysis}\label{senStudy} The sensitivity of OCEA to its parameters is analysed in this section. The GLT test suite is used for the analysis. \subsection{Maximum Number of Clusters} To test how $K_{\max}$ affects the performance of OCEA, $K_{\max}=\{$4,~5,~7,~10,~20$\}$ are chosen to do analysis. The rest parameters are the same as those in Section~\ref{expSet}. OCEA was run on each test instances independently 22 times with different $K_{\max}$ values. Fig.~\ref{Kmax} shows the mean and standard deviation values of the IGD metric values obtained by OCEA. From Fig.~\ref{Kmax}, it can be seen that for GLT2, GLT5-GLT6, OCEA can always achieve similar performance robustly for different $K_{\max}$ values. But for GLT1, GLT3-GLT4, different $K_{\max}$ leads to relatively large performance differences. Especially, when $K_{\max}$ is large, the performance of OCEA is not well enough. In general, a small $K_{\max}$ can result in good search results by OCEA on the GLT test instances. This implies that OCEA is not very sensitive to the $K_{\max}$ values on the GLT test instances. Therefore, $K_{\max}=7$ is chosen in Section~\ref{expStu} to carry out the comparison. It should be noted that the optimal $K_{\max}$ depends on individual problem. \begin{figure*}[htbp] \centering \subfigure[$K_{\max}$] {\includegraphics[width=0.4\textwidth]{Kmax_bar.eps} \label{Kmax}} \subfigure[$\beta$] {\includegraphics[width=0.4\textwidth]{Beta_bar.eps} \label{beta}}\\ \subfigure[$F$] {\includegraphics[width=0.4\textwidth]{F_bar.eps} \label{F}} \subfigure[$CR$] {\includegraphics[width=0.4\textwidth]{CR_bar.eps} \label{CR}} \caption{The mean values and standard deviations of the IGD metric values of approximated fronts obtained by OCEA with different $K_{\max}, \beta, F, CR$ values over 22 independent runs on GLT1-GLT6} \end{figure*} \subsection{Clustering Effectiveness Analysis} The evolution procedure couples naturally with the online clustering procedure in OCEA. It is expected that the approximated set will present a clustering effect when the evolution procedure has converged. To justify the effectiveness of the online clustering, Fig.~\ref{clustanalysis} plots the clustering results in the first 3-dimensional search space on the GLT1-GLT6 test instances. In the figure, the solutions in each different cluster are marked with different colors and symbols. It can be seen that the final approximated sets are partitioned into 7 clusters clearly (note that $K_{\max}$ is set as 7). This figure indicates that OCEA can indeed approximate the clustering structure effectively. \begin{figure*}[htbp] \centering \includegraphics[width=0.32\textwidth]{GLT1_CLUST.eps} \includegraphics[width=0.32\textwidth]{GLT2_CLUST.eps} \includegraphics[width=0.32\textwidth]{GLT3_CLUST.eps}\\ \includegraphics[width=0.32\textwidth]{GLT4_CLUST.eps} \includegraphics[width=0.32\textwidth]{GLT5_CLUST.eps} \includegraphics[width=0.32\textwidth]{GLT6_CLUST.eps} \caption{The clusters of final approximated sets obtained by OCEA for GLT1-GLT6}\label{clustanalysis} \end{figure*} \subsection{Mating Restriction Probability} To test the sensitivity of the OCEA's performance to the mating control parameter $\beta$, $\beta=\{$0.5,~0.6,~0.7,~0.8,~0.9$\}$ are used for the analysis. The rest parameters are the same as those in Section~\ref{expSet}. Again, for different $\beta$ value, OCEA independently run 22 time on the test instances. Fig.~\ref{beta} shows the statistics of the obtained IGD metric values. From Fig.~\ref{beta}, it is observable that for GLT5 and GLT6, different $\beta$ values bring a similar performance for OCEA; but for GLT1-GLT4, OCEA with different $\beta$ values performs very differently. Nevertheless, when $\beta=0.6$, OCEA has relatively better performance for all the instances. The observation in Fig.~\ref{beta} indicates that OCEA is not so sensitive to the setting of $\beta$ in solving the GLT test instances. Therefore, $\beta=0.6$ is chosen in Section~\ref{expStu} for the controlled comparison experiments. Again, it is necessary to point out that an optimal $\beta$ setting should depend on the problem characteristics. \subsection{Control Parameters of Differential Evolution Operator} The effect of the DE parameters, i.e., $F$ and $CR$, are to be evaluated in this section. $F~(CR)=\{$0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1$\}$ are chosen to proceed analysis. The rest parameters are the same as in Section~\ref{expSet}. When different $F$ ($CR$) values are set, $CR$ ($F$) is set as 1 (0.6). The mean and standard deviation values of the IGD metric values obtained by OCEA with different $F$ or $CR$ over 22 independent runs are shown in Figs.~\ref{F} and \ref{CR}. Fig.~\ref{F} shows that the $F$ value has a crucial effect on the OCEA performance for GLT1, GLT3-GLT4, and a large $F$ value can lead to a good OCEA performance. However, for GLT2, GLT5-GLT6, different $F$ settings do not affect the OCEA performance acutely. Fig.~\ref{CR} shows that the $CR$ value has a significant effect on OCEA for GLT1-GLT4, and a small $CR$ value is better. But OCEA performs rather stably for GLT5-GLT6 with different $CR$ values. In case $F=\{0.6,~0.8\}$ ($CR=1$) and $CR=\{0.9,~1\}$ ($F=0.6$), OCEA can always find good IGD metric values for all the GLT test instances. In general, Figs.~\ref{F} and \ref{CR} denote that OCEA is not very sensitive to the $F$ and $CR$ settings. \section{Conclusion}\label{conclusion} This paper presented a first-ever MOEA that incorporate an {\em online clustering} to address the non-stationary nature of the evolutionary search. The underlying consideration is 1) to learn the manifold structure of the PS (i.e. the so-called regularity property of MOPs) through clustering; and 2) to adapt to the non-stationary search dynamics. The online agglomerative clustering approach developed in~\cite{guedalia1999line} is modified to accommodate the evolution search dynamics. Experimental study has shown that the online clustering can address the non-stationary search process well, and is able to adaptively learn the clustering structure of the PS. The comparison against five well-known MOEAs has also shown that the structures learned adaptively by the online clustering can indeed improve the search efficiency (in terms of search speed) and effectiveness (in terms of the quality of the final approximated sets and fronts). Future work includes 1) the development of intelligent recombination operators that can be well fitted in the online learning mechanism; 2) the development and/or incorporation of other online learning strategies; and 3) the study of the developed framework for many-objective optimisation problems.
{'timestamp': '2016-06-17T02:10:11', 'yymm': '1606', 'arxiv_id': '1606.05169', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05169'}
arxiv
\section{Introduction} Many statistical methods have been proposed for forecasting age-specific mortality rates \citep[see][for reviews]{CDE04,Booth06,BT08,GK08,SBH11,BT14}. Of these, a significant milestone in demographic forecasting was the work by \cite{LC92}. They applied a principal component method to age-specific mortality rates and extracted a single time-varying index of the level of mortality rates, from which the forecasts are obtained by a random-walk with drift. The method has since been extended and modified. For example, \citet{RH03} proposed the age-period-cohort Lee-Carter method; \cite{HU07} proposed a functional data model that utilizes nonparametric smoothing and high-order principal components; \cite{GK08} and \cite{WSB+15} considered Bayesian techniques for Lee-Carter model estimation and forecasting; and \cite{LLG13} extended the Lee-Carter method to model the rotation of age patterns for long-term projections. These works mainly focused on forecasting mortality for a single population, or several populations individually. However, individual forecasts, even when based on similar extrapolative procedures, may imply increasing divergence in mortality rates in the long run, counter to the expected and observed trend toward a global convergence \citep{LL05,Pampel05,Li13}. Thus, joint modeling mortality for two or more populations simultaneously is paramount, as it allows one to model the correlations among two or more populations, distinguish between long-term and short-term effects in the mortality evolution, and explore the additional information contained in the experience of other populations to further improve forecast accuracy. These populations can be grouped by sex, state, ethnic group, socioeconomic status and other attributes. In these cases, it is often desirable to produce coherent forecasts that do not diverge over time (e.g., in demography, \citeauthor{LL05}, \citeyear{LL05}, \citeauthor{BC10}, \citeyear{BC10}, \citeauthor{ARG+11}, \citeyear{ARG+11}, \citeauthor{RLS+12}, \citeyear{RLS+12}, \citeauthor{RCG+13}, \citeyear{RCG+13}, \citeauthor{Li13}, \citeyear{Li13}, \citeauthor{RLG14}, \citeyear{RLG14}, \citeauthor{SLK+15}, \citeyear{SLK+15}; in actuarial science, \citeauthor{JK11}, \citeyear{JK11}, \citeauthor{LH11}, \citeyear{LH11}, \citeauthor{CBD+11}, \citeyear{CBD+11b}, \citeauthor{DCB+11}, \citeyear{DCB+11}). The definition of coherent in demography varies, but here it means joint modeling of populations, and further that the mortality forecasts do not overlap. In the case of two-sex populations, there may be common features in the groups of data that can first be captured with the common principal components. Further, we can prevent the forecasts of the groups from diverging by requiring the difference in each sex-specific principal component scores to be stationary for different populations $i$ and $j$, so that \begin{equation*} \limsup_{t\rightarrow \infty} \text{E}||f_{t,i} - f_{t,j}||<\infty, \quad \text{for all} \ i \ \text{and} \ j, \end{equation*} where $\text{E}||f_{t,i} - f_{t,j}|| = \int_{\mathcal{I}}[f_{t,j}(x) - f_{t,i}(x)]^2dx$ is the $L_2$ norm, $f_t(x)$ represents age-specific mortality for year $t$, and $\mathcal{I}$ denotes a function support range. The problem of jointly forecasting mortality rates for a group of populations has been considered by \cite{Lee00, LL05, Lee06, DDG+06} and \cite{SLK+15} in the context of the Lee-Carter model. These authors proposed the augmented common factor model that extracts a common trend for a group of populations, while acknowledging their individual differences in level, age pattern and short-term trend \citep{LL05}. On the other hand, \cite{HBY13} proposed a functional data model to jointly model the gap between female and male age-specific mortality rates, and \cite{RLG14} proposed a Bayesian method to jointly model the gap between female and male life expectancies at birth. Based on the work of \cite{LL05}, a general framework is presented by \cite{Lee06} for forecasting life expectancy at birth as the sum of a common trend and the population-specific trend. Coherent forecasting in the framework of \citeauthor{LC92}'s \citeyearpar{LC92} model has recently been extended to the coherent functional data model by \citet*{HBY13}. These authors proposed the product-ratio method, which models the product and ratio functions of the age-specific mortality rates of different populations through a functional principal component decomposition, and forecasts age- and sex-specific mortality coherently by constraining the forecast ratio function via stationary time-series model. The forecasts of product and ratio functions are obtained using the independent functional data method given in \cite{HU07}; the forecast product and ratio functions are then transformed back into the male and female age-specific mortality rates. Illustrated by empirical studies, they found that the product-ratio method generally gives slightly less accurate female mortality forecasts and produces much more accurate male mortality forecasts than the independent functional data method, in which the latter one does not impose a coherent structure. As an extension of \cite{LL05} and \cite{HBY13}, we consider a multilevel functional data model motivated by the work of \cite{DCC+09}, \cite{CSD09}, \cite{CG10} and \cite{GCC+10}, among many others. The objective of the multilevel functional data method is to model multiple sets of functions that may be correlated among groups. In this paper, we apply this technique to forecast age-specific mortality and life expectancy at birth for a group of populations. We found the multilevel functional data model captures the correlation among populations, models the forecast uncertainty through Bayesian paradigm, and is adequate for use within a probabilistic population modeling framework \citep{RLS+12}. Similar to the work of \cite{LL05,Lee06,DDG+06} and \cite{Li13}, the multilevel functional data model captures the common trend and the population-specific trend. It produces forecasts that are comparable with the ones from the product-ratio method, which themselves are also more accurate than the independent functional data method for male age-specific mortality and life expectancy forecasts. The multilevel functional data model is described in Section~\ref{sec:2}. In Section~\ref{sec:relate}, we outline the differences among the multilevel functional data, augmented common factor and independent functional data methods. In Section~\ref{sec:3}, we illustrate the multilevel functional data method by applying it to the age- and sex-specific mortality rates for the United Kingdom (UK). In Section~\ref{sec:4}, we compare the point and interval forecast accuracy among five methods for 32 populations. In Section~\ref{sec:5}, we investigate the performance of the multilevel functional data method with the age-, and sex- and state-specific mortality rates in Australia. In Section~\ref{sec:6}, we provide some concluding remarks, along with some reflections on how the method presented here can be further extended. More information on some theoretical properties of multilevel functional principal component decomposition are deferred to the Supplementary Material A \citep{Shang16}. \section{A multilevel functional data model}\label{sec:2} We first present the problem in the context of forecasting male and female age-specific mortality rates, although the method can easily be generalized to any number of populations. Let $y_t^{j}(x_i)$ be the log central mortality rates observed at the beginning of each year for year $t=1,2,\dots,n$ at observed ages $x_1,x_2,\dots,x_p$ where $x$ is a continuous variable, $p$ is the number of ages, and superscript $j$ represents either male or female in the case of two populations. Following the functional data framework, we assume there is an underlying continuous and smooth function $f_t^{j}(x)$ that is observed at discrete data points with error. That is \begin{equation} y_t^{j}(x_i) = f_t^{j}(x_i) + \delta_t^{j}(x_i)\varepsilon^{j}_{t,i},\label{eq:21} \end{equation} where $x_i$ represents the center of each age or age group for $i=1,\dots,p$, $\varepsilon_{t,i}^{j}$ is an independent and identically distributed (iid) standard normal random variable for each age in year $t$, and $\delta_{t}^{j}(x_i)$ measures the variability in mortality at each age in year $t$ for the $j^{\text{th}}$ population. Together, $\delta_t^{j}(x_i)\varepsilon^{j}_{t,i}$ represents the smoothing error. Let $m_t^j(x_i) = \exp\left\{y_t^j(x_i)\right\}$ be the observed central mortality rates for age $x_i$ in year $t$ and define $N_t^j(x_i)$ to be the total $j^{\text{th}}$ population of age $x_i$ at 1st January of year $t$. The observed mortality rate approximately follows a binomial distribution with estimated variance \begin{equation} \text{Var}\left[m_t^j(x_i)\right] \approx \frac{m_t^j(x_i)\times \left[1-m_t^j(x_i)\right]}{N_t^j(x_i)}. \end{equation} Via Taylor's series expansion, the estimated variance associated with the log mortality rate is given by \begin{equation} \left(\widehat{\delta}_t^j\right)^2(x_i)\approx \text{Var}\left\{\ln\left[m_t^j(x_i)\right]\right\} = \frac{1-m_t^j(x_i)}{m_t^j(x_i) \times N_t^j(x_i)}. \end{equation} Since $m_t^j(x_i)$ is often quite small, $(\delta_t^j)^2(x_i)$ can be approximated by a Poisson distribution with estimated variance \begin{equation} \left(\widehat{\delta}_t^j\right)^2(x_i) \approx \frac{1}{m_t^j(x_i)\times N_t^j(x_i)}.\label{eq:smoo} \end{equation} As suggested by \cite{HU07}, we smooth mortality rates using weighted penalized regression splines with a partial monotonic constraint for ages above 65, where the weights are equal to the inverse variances given in~\eqref{eq:smoo}. The weights are used to model heterogeneity (different variances) in mortality across different ages. Let the weights be the inverse variances $w_t^j(x_i) = 1/\big[(\delta_t^j)^2(x_i)\big]$, the penalized regression spline can be written as: \begin{equation} \widehat{f}_t^j(x_i) = \argmin_{\theta_t(x_i)}\sum^M_{i=1}w_t^j(x_i)\Big|y_t^j(x_i) - \theta_t(x_i)\Big|+\alpha\sum^{M-1}_{i=1}\Big|\theta^{'}_t(x_{i+1})-\theta^{'}_t(x_i)\Big|, \end{equation} where $i$ represents different ages (grid points) in a total of $M$ grid points, $\alpha$ is a smoothing parameter, and $^{'}$ symbolizes the first derivative of a function. While the $L_1$ loss function and the $L_1$ roughness penalty are employed to obtain robust estimates, the monotonic increasing constraint helps to reduce the noise from estimation of older ages \citep[see also][]{HN99}. In the multilevel functional data model, we first apply~\eqref{eq:21} to smooth multiple sets of curves from different populations that may be correlated. The multilevel functional data model can be related to a two-way functional analysis of variance model studied by \cite{MVB+03}, \cite{CF10} and \citet[][Section 5.4]{Zhang14}, it is a special case of the general `functional mixed model' proposed in \cite{MC06}. In the case of two populations, the basic idea is to decompose curves among different populations into an average of total mortality $\mu(x)$, a sex-specific deviation from the averaged total mortality $\eta^{j}(x)$, a common trend across populations $R_t(x)$, a sex-specific residual trend $U_t^{j}(x)$, and measurement error $e_t^{j}(x)$ with finite variance $(\sigma^2)^{j}$. The common and sex-specific residual trends are modeled by projecting them onto the eigenvectors of covariance operators of the aggregate and population-specific centered stochastic processes, respectively. To express our idea, the smoothed mortality rate at year $t$ can be written as: \begin{equation} f_t^{j}(x) = \mu(x) + \eta^{j}(x) + R_t(x) + U_t^{j}(x),\qquad x\in \mathcal{I}.\label{eq:2} \end{equation} To ensure identifiability, we assume two stochastic processes $R(x)$ and $U^j(x)$ are uncorrelated but we allow correlations among their realizations. Because the centered stochastic processes $R(x)$ and $U^j(x)$ are unknown in practice, the population eigenvalues and eigenfunctions can only be approximated through a set of realizations $\bm{R}(x) = \left\{R_1(x),\dots,R_n(x)\right\}$ and $\bm{U}^j(x) = \left\{U_1^j(x),\dots,U_n^j(x)\right\}$. From the covariance function of $\bm{R}(x)$, we can extract a set of functional principal components and their corresponding scores, along with a set of residual functions. Based on the covariance function of residual functions, we can then extract a second set of functional principal components and their associated scores. While the first functional principal component decomposition captures the common trend from total mortality rates, the second functional principal component decomposition captures the sex-specific residual trend. The sample versions of the aggregate mean function, sex-specific mean function deviation, common trend, and sex-specific residual trend, for a set of dense and regularly spaced functional data, can be estimated by: \begin{align} \widehat{\mu}(x)&=\frac{1}{n}\sum^n_{t=1}f_t^{\text{T}}(x), \label{eq:31}\\ \widehat{\eta}^{j}(x) &= \widehat{\mu}^{j}(x)-\widehat{\mu}(x),\label{eq:32}\\ \widehat{R}_t(x) &= \sum^{\infty}_{k=1}\widehat{\beta}_{t,k}\widehat{\phi}_k(x) \approx \sum^K_{k=1}\widehat{\beta}_{t,k}\widehat{\phi}_k(x),\label{eq:3}\\ \widehat{U}^{j}_t(x) &= \sum^{\infty}_{l=1}\widehat{\gamma}^{j}_{t,l}\widehat{\psi}_l^{j}(x) \approx \sum^L_{l=1}\widehat{\gamma}^{j}_{t,l}\widehat{\psi}_l^{j}(x),\label{eq:4} \end{align} where $\{f_1^{\text{T}}(x),\dots,f_n^{\text{T}}(x)\}$ represents a set of smoothed functions for the age-specific total mortality; $\widehat{\mu}(x)$ represents the simple average of the total mortality, whereas $\widehat{\mu}^j(x)$ represents the simple average of females or males; $\{\widehat{\bm{\beta}}_k = (\widehat{\beta}_{1,k},\dots,\widehat{\beta}_{n,k}); k=1,\dots,K\}$ represents the $k^{\text{th}}$ sample principal component scores of $\bm{R}(x)$, $\bm{\Phi}=\left[\widehat{\phi}_1(x),\dots,\widehat{\phi}_{K}(x)\right]$ are the corresponding orthogonal sample eigenfunctions in a square integrable function space. Similarly, $\{\widehat{\bm{\gamma}}_l^j = (\widehat{\gamma}^{j}_{1,l},\dots,\widehat{\gamma}^{j}_{n,l}); l=1,\dots,L\}$ represents the $l^{\text{th}}$ sample principal component scores of $\bm{U}^{j}(x)$, $\bm{\Psi}=\left[\widehat{\psi}_1^{j}(x),\dots,\widehat{\psi}_L^{j}(x)\right]$ are the corresponding orthogonal sample eigenfunctions, $K$, $L$ are truncation lags. As two stochastic processes $R(x)$ and $U^j(x)$ are uncorrelated, $\widehat{\bm{\beta}}_k$ are uncorrelated with $\widehat{\bm{\gamma}}_l^j$. Substituting Equations~\eqref{eq:31}--\hspace{-.05in}~\eqref{eq:4} into Equations~\eqref{eq:2}--\hspace{-.05in}~\eqref{eq:21}, we obtain \begin{equation*} y_t^{j}(x)=\widehat{\mu}(x)+\widehat{\eta}^{j}(x)+\sum^K_{k=1}\widehat{\beta}_{t,k}\widehat{\phi}_k(x)+\sum^L_{l=1}\widehat{\gamma}_{t,l}^{j}\widehat{\psi}_l^{j}(x)+e_t^{j}(x)+\delta^j_t(x)\varepsilon_{t}^{j}, \end{equation*} where $\widehat{\beta}_{t,k}\sim \text{N}\Big(0,\widehat{\lambda}_k\Big)$, and $\widehat{\lambda}_k$ represents the $k^{\text{th}}$ eigenvalue of empirical covariance operator associated with the common trend; $\widehat{\gamma}_{t,l}^{j}\sim \text{N}\left(0,\widehat{\lambda}_l^{j}\right)$, and $\widehat{\lambda}_l^{j}$ represents the $l^{\text{th}}$ eigenvalue of empirical covariance operator associated with the sex-specific residual trend; and $e_t^{j}(x)\sim N\left(0, (\widehat{\sigma}^2)^j\right)$ represents model errors due to finite truncation. Selecting the number of principal components, $K$ and $L$, is an important practical issue. Four common approaches are cross validation \citep{RS91}, Akaike's information criterion \citep{YMW05}, bootstrap method \citep{HV06}, and explained variance \citep{CG10, Chiou12}. We use a cumulative percentage of total variation to determine $K$ and $L$. The optimal numbers of $K$ and $L$ are determined by: \begin{align} K &= \argmin_{K: K\geq 1}\left\{\sum_{k=1}^K\widehat{\lambda}_k\Big/\sum_{k=1}^{\infty}\widehat{\lambda}_k\mathds{1}{\big\{\widehat{\lambda}_k>0\big\}}\geq P_1\right\},\\ L &= \argmin_{L: L\geq 1}\left\{\sum_{l=1}^L\widehat{\lambda}_l^j\Big/\sum_{l=1}^{\infty}\widehat{\lambda}_l^j\mathds{1}{\big\{\widehat{\lambda}_l^j>0\big\}}\geq P_2\right\}, \end{align} where $\mathds{1}\{\cdot\}$ denotes a binary indicator function. Following \cite{Chiou12}, we chose $P_1=P_2=0.9$. An important parameter is the proportion of variability explained by aggregate data, which is the variance explained by the within-cluster variability \citep{DCC+09}. A possible measure of within-cluster variability is given by: \begin{equation} \frac{\sum^{\infty}_{k=1}\lambda_k}{\sum^{\infty}_{k=1}\lambda_k+\sum^{\infty}_{l=1}\lambda_l}=\frac{\int_{\mathcal{I}} \text{Var}\left[\bm{R}(x)\right]dx}{\int_{\mathcal{I}}\text{Var}\left[\bm{R}(x)\right]dx + \int_{\mathcal{I}}\text{Var}\left[\bm{U}^{j}(x)\right]dx}.\label{eq:cluster} \end{equation} When the common factor can explain the main mode of total variability, the value of within-cluster variability is close to 1. For multiple populations, the other important parameter is the total variability for a population, given by \begin{equation} \frac{1}{n}\sum^n_{t=1}[f_t(x) - \bar{f}(x)][f_t(w) - \bar{f}(w)], \qquad x, w\in \mathcal{I}.\label{eq:total_var} \end{equation} This allows us to identify the population with larger variability. Conditioning on the estimated principal components $\bm{\Phi}$, $\bm{\Psi}$ and continuous functions $\bm{y}^{j}=\Big[y_1^{j}(x),\dots,y_n^{j}(x)\Big]$, the $h$-step-ahead point forecasts of $y_{n+h}^{j}(x)$ are given by: \begin{align*} \widehat{y}_{n+h|n}^{j}(x)&=\text{E}\left[y_{n+h}(x)\middle|\mu(x), \eta(x), \bm{\Phi},\bm{\Psi},\bm{y}^{j}\right]\\ &=\widehat{\mu}(x)+\widehat{\eta}^{j}(x)+\sum^K_{k=1}\widehat{\beta}_{n+h|n,k}\widehat{\phi}_k(x)+\sum^L_{l=1}\widehat{\gamma}^{j}_{n+h|n,l}\widehat{\psi}_l^{j}(x), \end{align*} where $\widehat{\beta}_{n+h|n,k}$ and $\widehat{\gamma}_{n+h|n,l}^{j}$ are the forecast principal component scores, obtained from a univariate time-series forecasting method, such as the random walk with drift (rwf) or autoregressive integrated moving average (ARIMA)$(p,d,q)$ model. The automatic algorithm of \cite{HK08} is able to choose the optimal orders $p, q$ and $d$ automatically. $d$ is selected based on successive Kwiatkowski-Phillips-Schmidt-Shin (KPSS) unit-root test \citep{KPSS92}. KPSS tests are used for testing the null hypothesis that an observable time series is stationary around a deterministic trend. We first test the original time series for a unit root; if the test result is significant, then we test the differenced time series for a unit root. The procedure continues until we obtain our first insignificant result. Having identified $d$, the orders of $p$ and $q$ are selected based on the Akaike information criterion \citep{Akaike74} with a correction for finite sample sizes. The maximum likelihood method can then be used to estimate these parameters. It is noteworthy that a multivariate time-series method, such as vector autoregressive model, can also be used to model and forecast stationary principal component scores \citep[see for example,][]{ANH15}. \cite{HBY13} used the autoregressive fractionally integrated moving average (ARFIMA) in the product-ratio method (see Section~\ref{sec:pr}), which allows non-integer values for the difference parameter, to forecast the principal component scores. For any two populations, convergent forecasts are obtained when $\left\{\widehat{\gamma}_{n+h|n,l}^{\text{F}}-\widehat{\gamma}_{n+h|n,l}^{\text{M}}\right\}$ is stationary for each $l$. As pointed out by \cite{LL05}, if $\left\{\widehat{\gamma}_{n+h|n,l}^{\text{F}}-\widehat{\gamma}_{n+h|n,l}^{\text{M}}; l=1,\dots,L\right\}$ has a trending long-term mean, the Li and Lee method fails to achieve convergence. As an extension of the Li and Lee method, the proposed method may also fail to achieve convergence. However, if the common mean function and common trend capture the long-term effect, the Li-Lee and multilevel functional data methods produce convergent forecasts, as the forecasts of residual trends would be flat. To quantify forecast uncertainty, the interval forecasts of $y_{n+h}^{j}(x)$ can be obtained through a Bayesian paradigm equipped with Markov chain Monte Carlo (MCMC) for estimating all variance parameters and drawing samples from the posterior of principal component scores. Given errors are assumed to be normally distributed, a hierarchical regression model is able to capture fixed and random effects \citep[see for example][Chapter 11.1]{RCG+13, Hoff09}. With a set of MCMC outputs, the forecasts of future sample path are given by: \begin{align} \widehat{y}_{n+h|n}^{b,j}(x) = \ & \text{E}\left[y_{n+h}(x)\middle|\mu(x), \eta(x), \bm{\Phi},\bm{\Psi},\bm{y}^{j}\right]\notag\\ = \ & \widehat{f}_{n+h}^{b,j}(x) + \widehat{\delta}_{n+h}^{b,j}(x)\varepsilon_{n+h}^{b,j}, \notag\\ = \ & \widehat{\mu}(x)+\widehat{\eta}^{j}(x)+\sum^K_{k=1}\widehat{\beta}_{n+h|n,k}^b\widehat{\phi}_k(x)+\sum^L_{l=1}\widehat{\gamma}_{n+h|n,l}^{b,j}\widehat{\psi}_l^{j}(x)+ \label{eq:interval} \\ &\widehat{e}_{n+h}^{b,j}(x)+\widehat{\delta}_{n+h}^{b,j}(x)\varepsilon_{n+h}^{b,j},\notag \end{align} for $b=1,\dots,B$. We first simulate $\left\{\widehat{\beta}^b_{1,k},\dots,\widehat{\beta}^b_{n,k}\right\}$ drawn from its full conditional density, and then obtain $\widehat{\beta}_{n+h|n,k}^b$ using a univariate time-series forecasting method for each simulated sample; similarly, we first simulate $\left\{\widehat{\gamma}^{b,j}_{1,l},\dots,\widehat{\gamma}^{b,j}_{n,l}\right\}$ drawn from its full conditional density, and then obtain $\widehat{\gamma}_{n+h|n,l}^{b,j}$ for each simulated sample; $\left(\widehat{\sigma}^2\right)^{b,j}$ is drawn from its full conditional density. The derivation of full conditional densities is given in the Supplement B \citep{Shang16}, while some WinBUGS computation code is presented in the Supplement C \citep{Shang16}. As we pre-smooth the functional data, we must add the smoothing error $\widehat{\delta}_{n+h}^{b,j}(x)\varepsilon_{n+h}^{b,j}$, where $\widehat{\delta}_{n+h}^{b,j}(x)$ is simulated from its posterior and $\varepsilon_{n+h}^{b,j}$ is drawn from $N(0,1)$. The total number of MCMC draws is 20,000 iterations, the first 10,000 iterations are used for the burn-in, whereas the remaining 10,000 iterations are recorded. Among these recorded draws, we keep every $10^{\text{th}}$ draw in order to reduce autocorrelation. The prediction interval is constructed from the percentiles of the bootstrapped mortality forecasts. The point and interval forecasts of life expectancy are obtained from the forecast age-specific mortality rates using the life table method \citep[see for example,][]{PHG01}. In this paper, we focus on forecasting life expectancy at birth, described simply as life expectancy hereafter. \section{Relationship to two existing coherent methods}\label{sec:relate} \subsection{Relationship to the augmented common factor method}\label{sec:aug} The multilevel functional data method can be viewed as a generalization of the augmented common factor method of \cite{LL05}. They proposed the following model for the two-sex case, which can be expressed using a functional data model notation: \begin{equation*} y_t^j(x_i) = \widehat{\mu}^j(x_i)+\widehat{\beta}_t\widehat{\phi}(x_i)+\widehat{\gamma}_{t}^j\widehat{\psi}^j(x_i)+e_t^j(x_i), \end{equation*} where $x_i$ represents a discrete age or age group, $\widehat{\mu}^j(x_i)$ is the age- and sex-specific mean, $(\widehat{\beta}_1,\dots,\widehat{\beta}_n)$ is the mortality index of the common factor, which can be forecast by random walk with drift; $\widehat{\phi}(x_i)$ is the first estimated principal component of the common factor of \possessivecite{LC92} model (based on log mortality), and it measures the sensitivity of the log total mortality to changes in $\{\beta_1,\dots,\beta_n\}$ over time; $\widehat{\gamma}_t^j$ is the time component of the additional factor, and it can be forecast by an autoregressive (AR) process of order 1; $\widehat{\psi}^j(x_i)$ is the first estimated principal component of the residual matrix that is specific to males or females; and $e_t^j(x_i)$ is the error term. $\widehat{\beta}_t\widehat{\phi}(x_i)$ specifies the long-term trend in mortality change and random fluctuations that are common for all populations, whereas $\widehat{\gamma}_t^j\widehat{\psi}^j(x_i)$ describes the short-term changes that are specific only for $j^{\text{th}}$ population. The augmented common factor model takes into account the mortality trends in all populations by applying the Lee-Carter method twice, subject to identifiability constraints $\sum_{i=1}^p\widehat{\phi}(x_i)=1$ and $\sum^n_{t=1}\widehat{\beta}_t=0$. The eventual constant ratio between the age-specific mortality rates will thus be adjusted to the short term according to the population-specific deviations from the common pattern and trend \citep*{JVK13}. If the $|\widehat{\gamma}_{n+h|n}^{\text{F}}-\widehat{\gamma}_{n+h|n}^{\text{M}}|$ values become constant, this model leads to non-divergent forecasts in the long run but not necessarily in the short term in the case of two populations \citep{LL05}. There are two main differences between the proposed multilevel functional data method and \possessivecite{LL05} method. First, \possessivecite{LL05} method uses a single principal component to capture the largest amount of variation. In contrast, the multilevel functional data method includes the option of incorporating more than just one component by selecting the number of components based on the cumulative percentage of total variation in the data \citep{CG10,Chiou12}. An examination of the residual contour plots can help to reveal the existence of any systematic patterns not being accounted for. In such cases, the additional principal components capture patterns in the data that may not necessarily be explained by the first principal component. As noted by \cite{HBY13}, the use of multiple principal components does not introduce additional model complexity because the scores are uncorrelated and components are orthogonal by construction. In a similar vein, \cite{BMS02} considered up to three components in total when analyzing data of both sexes combined, and found that clustering in the residuals was diminished after the addition of extra components. \cite{DDG+06} modeled five countries' data simultaneously with a number of components, and \cite{Li13} modeled Australian female and male mortality and life expectancy jointly using more than one component. The second main difference between the proposed multilevel functional data method and that of \cite{LL05} is that the latter restricted the univariate time-series forecasting method to be random-walk with drift for $\widehat{\beta}_t$ and AR(1) for $\widehat{\gamma}_{t}^j$. These choices for the univariate time-series forecasting method may not necessarily be optimal for a given time series. In contrast, we implemented the \textit{auto.arima} algorithm of \cite{HK08}, which selects the optimal order of ARIMA process based on the corrected Akaike information criterion. \subsection{Relationship to the product-ratio method}\label{sec:pr} Let us again consider modeling mortality in the two-sex case. The product-ratio method begins by obtaining the product and ratio functions of all series. The product function can be seen as the sum of all series in the log scale, whereas the ratio function can be seen as the differences among series in the log scale. It first applies an independent functional data method to forecast the future realizations of product and ratio functions, then transforms the forecasts of product and ratio functions back to the original male and female age-specific mortality rates. The convergent forecasts are achieved through the ARFIMA modeling of the ratio function, which implicitly prevents it from diverging in a long-run. This constraint ultimately results in a better forecast accuracy than the independent functional data method for males, but worse forecast accuracy for females. A possible explanation is that the product-ratio method improves the goodness of fit for males at the cost of reduced goodness of fit for females. The prediction intervals of mortality are constructed based on the normality assumption in \cite{HBY13}, although it is possible to use a bootstrap method \citep[see for example,][]{HS09}. In contrast, in the multilevel functional data method, the prediction intervals of mortality were constructed based on Bayesian paradigm. The validity of Bayesian paradigm for principal component scores has been given in \citet[][supplement A]{DCC+09}. For a small sample size, a Bayesian sampling technique is known to produce more accurate interval forecast accuracy than the one based on the normality assumption \citep[see][p.174 for details]{Chernick08}. \section{Application to UK age- and sex-specific mortality}\label{sec:3} Age- and sex-specific raw mortality data for the UK between 1922 and 2009 are available from the \cite{HMD13}. For each sex in a given calendar year, the mortality rates obtained by the ratio between ``number of deaths" and ``exposure to risk", are arranged in a matrix for age and calendar year. By analyzing the changes in mortality as a function of both age $x$ and year $t$, it can be seen that mortality rates have shown a gradual decline over time. To provide an idea of this evolution, we present the functional time-series plot for male and female log mortality rates in Figure~\ref{fig:1}. Mortality rates dip from their early childhood high, climb in the teen years, stabilize in the early 20s, and then steadily increase with age. We further notice that for both males and females, mortality rates are declining over time, especially in the younger and older ages. Despite the higher male mortality rates in comparison to females, the difference becomes smaller and smaller over years at the older ages. \begin{figure}[!htbp] \centering \includegraphics[width=8.3cm]{UK_male_raw_plot} \quad \includegraphics[width=8.3cm]{UK_female_raw_plot} \\ \includegraphics[width=8.3cm]{UK_male_plot} \quad \includegraphics[width=8.3cm]{UK_female_plot} \caption{Observed and smoothed age-specific male and female log mortality rates in the UK. Data from the distant past are shown in light gray, and the most recent data are shown in dark gray.}\label{fig:1} \end{figure} In the top panel of Figure~\ref{fig:2}, we display the estimated common mean function $\widehat{\mu}(x)$, first estimated common principal component $\widehat{\phi}_1(x)$ and corresponding principal component scores $\left\{\widehat{\beta}_{1,1},\dots,\widehat{\beta}_{n,1}\right\}$ along with 30-years-ahead forecasts. The first common functional principal component captures more than 98\% of the total variation in the age-specific total mortality. In the middle panel of Figure~\ref{fig:2}, we display the estimated mean function deviance of females from the overall mean function $\widehat{\eta}^{\text{F}}(x)$, first functional principal component for females $\widehat{\psi}_1^{\text{F}}(x)$ and corresponding principal component scores $\left\{\widehat{\gamma}_{1,1}^{\text{F}},\dots,\widehat{\gamma}_{n,1}^{\text{F}}\right\}$ with 30-years-ahead forecasts. In the bottom panel of Figure~\ref{fig:2}, we display the estimated mean function deviance of males from the overall mean function $\widehat{\eta}^{\text{M}}(x)$, first functional principal component for males $\widehat{\psi}_1^{\text{M}}(x)$ and corresponding principal component scores $\left\{\widehat{\gamma}_{1,1}^{\text{M}},\dots,\widehat{\gamma}_{n,1}^{\text{M}}\right\}$ with 30-years-ahead forecasts. In this data set, the first three functional principal components explain at least 90\% of the remaining 10\% total variations for both females and males. Due to limited space, we present only the first functional principal component, which captures more than 64\% and 50\% of the remaining 10\% total variations for females and males, respectively. Based on~\eqref{eq:cluster}, the proportion of variability explained by the total mortality is 94\% for females and 95\% for males, respectively. \begin{figure}[!htbp] \centering \includegraphics[width=\textwidth]{UK_female_pca_common} \caption{Estimated common mean function, first common functional principal component, and associated scores for UK total mortality (top); estimated mean function deviation for females, first functional principal component, and associated scores for UK female mortality (middle); estimated mean function deviation for males, first functional principal component, and associated scores for UK male mortality (bottom). The dark and light gray regions show the 80\% and 95\% prediction intervals, respectively.}\label{fig:2} \end{figure} From Figure~\ref{fig:2}, it is apparent that the basis functions are modeling different movements in mortality rates: $\widehat{\phi}_1(x)$ primarily models mortality changes in children and adults, $\widehat{\psi}_1^{\text{F}}(x)$ models mortality changes between late-teens and 40, and $\widehat{\psi}_1^{\text{M}}(x)$ models the differences between young adults and those over 60. From the forecast common principal component scores, the mortality changes in children and adults are likely to continue in the future with increasing forecast uncertainty. From the forecasts of sex-specific principal component scores, there are no clear trends associated with each sub-population, as the forecasts would be flat. Thus, it is likely to achieve convergent forecasts between female and male sub-populations. In the first column of Figure~\ref{fig:3}, we plot the historical mortality sex ratios (Male/Female) from 1922 to 1979, alongside the 30-years-ahead forecasts of mortality sex ratios from 1980 to 2009 by the non-coherent forecasting methods, namely Lee and Carter's method and the independent functional data method. In the second column, we show the 30-years-ahead forecasts of mortality sex ratios from 1980 to 2009, using coherent forecasting methods, including Li and Lee's method, and the product-ratio and multilevel functional data methods. We found that all the coherent forecasting methods exhibit a quite similar pattern, with much smaller sex ratios than the non-coherent forecasting methods. Our results confirm the expected trend toward convergence, where the gap in mortality forecasts between males and females gradually converges to a constant for each age. The convergent forecasts demonstrate biological characteristics, for example, the mortality of females has been lower than that of males, it would be counter-intuitive if forecasts of the recent convergence of mortality which has been observed in many developed countries leads to the opposite situation. Our results further reflect the importance of joint modeling, which has already been adopted for the official mortality projection in New Zealand \citep{WD14}. \begin{figure}[!htbp] \centering \includegraphics[width=7.5cm]{mort_ratio_part0} \quad \includegraphics[width=7.5cm]{mort_ratio_part2} \\ \includegraphics[width=7.5cm]{mort_ratio_part1} \quad \includegraphics[width=7.5cm]{mort_ratio_part4} \\ \includegraphics[width=7.5cm]{mort_ratio_part3} \quad \includegraphics[width=7.5cm]{mort_ratio_part5} \caption{30-years-ahead forecasts of mortality sex ratios from 1980 to 2009 in the UK data using Lee and Carter's method, Li and Lee's method, the independent functional data method, the product-ratio method, and the multilevel functional data method (rwf). The forecast curves are plotted using a rainbow color palette; the most recent forecast curves are shown in red, whereas the long-term forecast curves are shown in purple.}\label{fig:3} \end{figure} \section{Multi-country comparison}\label{sec:4} While joint modeling mortality for multiple populations offers the advantage of avoiding possible undesirable divergence in the forecasts, little is known about whether these methods can improve forecast accuracy at various lengths of forecast horizon. In order to investigate the forecast accuracy of the multilevel functional data method, we consider 15 other developed countries for which data are also available in the \cite{HMD13}. These raw mortality rates are shown in Table~\ref{tab:multi}, along with their respective data periods, within-cluster variability in~\eqref{eq:cluster} and total variance in~\eqref{eq:total_var}. The selected countries are all developed countries with relatively long data series commencing at or before 1950. It was desirable to have a long available data period, in order to obtain consistent sample estimators \citep*{BJR08}. Including the UK data, 32 sex-specific populations were obtained for all analyses. Note that the age groups are single years of age from 0 to 94 and then a single age group for 95 and above, in order to avoid the excessive fluctuations at older ages. \begin{table}[!htbp] \centering \setlength{\tabcolsep}{7.2pt} \caption{Data period and within-cluster variability for each country.}\label{tab:multi} \begin{tabular}{@{}lcccc@{}}\toprule Country & Data period & \multicolumn{2}{c}{Within-cluster variability} & Variance ratio \\ & & Female & Male & Female vs Male \\\toprule Australia & 1921 : 2011 & 0.91 & 0.92 & 1 : 1.18 \\ Austria & 1947 : 2010 & 0.92 & 0.94 & 1 : 1.24 \\ Belgium & 1841 : 2012 & 0.95 & 0.96 & 1 : 1.13 \\ Canada & 1921 : 2009 & 0.91 & 0.94 & 1 : 1.17 \\ Denmark & 1835 : 2011 & 0.95 & 0.96 & 1 : 1.11 \\ France & 1816 : 2012 & 0.95 & 0.94 & 1 : 1.14 \\ Finland & 1878 : 2009 & 0.93 & 0.93 & 1 : 1.24 \\ Italy & 1872 : 2009 & 0.95 & 0.94 & 1 : 1.14 \\ Japan & 1947 : 2012 & 0.94 & 0.97 & 1 : 1.18 \\ Netherlands & 1850 : 2009 & 0.97 & 0.97 & 1 : 1.10 \\ Norway & 1846 : 2009 & 0.94 & 0.96 & 1 : 1.16 \\ Spain & 1908 : 2009 & 0.95 & 0.96 & 1 : 1.19 \\ Sweden & 1751 : 2011 & 0.96 & 0.96 & 1 : 1.11 \\ Switzerland & 1876 : 2011 & 0.95 & 0.97 & 1 : 1.16 \\ United Kingdom & 1922 : 2009 & 0.94 & 0.94 & 1 : 1.16 \\ United States of America & 1933 : 2010 & 0.92 & 0.94 & 1 : 1.20 \\\bottomrule \end{tabular} \end{table} \subsection{Forecast accuracy evaluation} \subsubsection{Evaluation of point forecast accuracy}\label{sec:evalpoint} We split our age- and sex-specific data into a training sample (including data from years $1$ to $(n-30)$) and a testing sample (including data from years $(n-29)$ to $n$), where $n$ represents the total number of years in the data. The length of the fitting period differs by country (see Table~\ref{tab:multi}). We implement a rolling origin approach, following \cite{HBY13} and \cite{SBH11}. A rolling origin analysis of a time-series model is commonly used to assess model and parameter stabilities over time. A common technique to assess the constancy of a model's parameter is to compute parameter estimates and their forecasts over a rolling origin of a fixed size through the sample \citep[see][Chapter 9 for more details]{ZW06}. The advantage of the rolling origin approach is that it allows us to assess the point and interval forecast accuracy among methods for different forecast horizons. With the initial training sample, we produce one- to 30-year-ahead forecasts, and determine the forecast errors by comparing the forecasts with actual out-of-sample data. As the training sample increases by one year, we produce one- to 29-year-ahead forecasts and calculate the forecast errors. This process continues until the training sample covers all available data. We compare these forecasts with the holdout samples to determine the out-of-sample point forecast accuracy. To measure overall point forecast accuracy and bias, we use the root mean squared forecast error (RMSFE), mean absolute forecast error (MAFE), and mean forecast error (MFE), averaged across ages and forecasting years. Averaged over 16 countries, they are defined as: \begin{align*} \text{RMSFE}(h) &= \frac{1}{16}\sum^{16}_{c=1}\sqrt{\frac{1}{(31-h)\times p}\sum^{n}_{k=n-30+h}\sum^p_{i=1}\left[m_k^{c}(x_i)-\widehat{m}_k^c(x_i)\right]^2},\\ \text{MAFE}(h) &= \frac{1}{16}\sum^{16}_{c=1}\frac{1}{(31-h)\times p}\sum^{n}_{k=n-30+h}\sum^p_{i=1}\left|m_k^c(x_i)-\widehat{m}_k^c(x_i)\right|,\\ \text{MFE}(h) &= \frac{1}{16}\sum^{16}_{c=1}\frac{1}{(31-h)\times p}\sum^{n}_{k=n-30+h}\sum^p_{i=1}\left[m_k^c(x_i)-\widehat{m}_k^c(x_i)\right], \end{align*} where $m_k^c(x_i)$ denotes mortality rate at year $k$ in the forecasting period for age $x_i$ in country $c$, and $\widehat{m}_k^c(x_i)$ denotes the point forecast. The ordering of the 16 countries are given in Table~\ref{tab:multi}. The RMSFE and MAFE are the average of squared and absolute errors and they measure forecast precision regardless of sign. The MFE is the average of errors and it measures bias. \subsubsection{Evaluation of interval forecast accuracy} To assess interval forecast accuracy, we use the interval score of \cite{GR07} \citep[see also][]{GK14}. For each year in the forecasting period, one-year-ahead to 30-year-ahead prediction intervals were calculated at the $(1-\alpha)\times 100\%$ nominal coverage probability. We consider the common case of symmetric $(1-\alpha)\times 100\%$ prediction interval, with lower and upper bounds that are predictive quantiles at $\alpha/2$ and $1-\alpha/2$, denoted by $m_k(x_l)$ and $m_k(x_u)$ for a given year $k$. As defined by \cite{GR07}, a scoring rule for the interval forecast of mortality at age $x_i$ is: \begin{align*} S_{\alpha}\left[m_k(x_l), m_k(x_u); m_k(x_i)\right] = \left[m_k(x_u)-m_k(x_l)\right]+&\frac{2}{\alpha}[m_k(x_l)-m_k(x_i)]\mathds{1}\{m_k(x_i)<m_k(x_l)\}+\\ &\frac{2}{\alpha}\left[m_k(x_i)-m_k(x_u)\right]\mathds{1}\{m_k(x_i)>m_k(x_u)\}, \end{align*} where $\alpha$ denotes the level of significance, customarily $\alpha=0.2$. The interval score rewards for a narrow prediction interval, if and only if the true observation lies within the prediction interval. The optimal score is achieved when $m_k(x_i)$ lies between $m_k(x_l)$ and $m_k(x_u)$, and the distance between $m_k(x_l)$ and $m_k(x_u)$ is minimal. From different ages, countries and years in the forecasting period, the mean interval score averaged across 16 countries is defined by: \begin{align*} \bar{S}_{\alpha}(h) &= \frac{1}{16\times (31-h)\times p}\sum^{16}_{c=1}\sum_{k=n-30+h}^{n}\sum_{i=1}^{p}S_{\alpha,k}^{c}[m_k(x_l),m_k(x_u);m_k(x_i)]. \end{align*} \subsection{Multi-country comparison of point forecast accuracy} Based on the averaged MAFE and RMSFE across 30 horizons shown in Table~\ref{tab:multicount}, the Lee-Carter method performs overall the worst among the methods considered. \cite{LM01} and \cite{LLG13} stated that mortality at older ages has been declining more quickly (on a log scale) than at younger ages, which contradicts the stationarity assumption of mortality improvement in the Lee-Carter method. Thus, it has been systematically under-predicting improvements in life expectancy over time. This confirms the fact that progress in life expectancy has been and continues to rise \citep[see also][]{OV02}. \begin{table}[!htbp] \centering \tabcolsep 0.12in \caption{Point forecast accuracy of mortality and life expectancy for females and males by method, as measured by the averaged MAFE, RMSFE, and MFE. For mortality, the forecast errors were multiplied by 100 in order to keep two decimal places. The minimal forecast errors are underlined for females and males, whereas the minimal overall forecast error is highlighted in bold. FDM represents functional data model.}\label{tab:multicount} \begin{tabular}{@{}lccc|ccc|ccc@{}}\toprule Method & \multicolumn{3}{c|}{MAFE} & \multicolumn{3}{c|}{RMSFE} & \multicolumn{3}{c}{MFE} \\ & F & M & $\frac{\text{F+M}}{2}$ & F & M &$\frac{\text{F+M}}{2}$ & F & M & $\frac{\text{F+M}}{2}$\\\midrule \multicolumn{6}{l}{\hspace{-.1in}{\underline{Mortality ($\times 100$)}}} \\ Lee-Carter & 0.76 & 0.89 & 0.83 & 1.68 & 1.74 & 1.71 & -0.74 & -0.85 & -0.80 \\ Li-Lee & 0.84 & 0.65 & 0.75 & 1.76 & 1.36 & 1.56 & -0.83 & -0.57 & -0.70 \\ Independent FDM & \underline{0.42} & 0.69 & 0.56 & \underline{1.00} & 1.33 & \textBF{1.17} & \underline{-0.28} & -0.60 & -0.44 \\ Product-ratio & 0.60 & \underline{0.58} & 0.59 & 1.32 & \underline{1.22} & 1.27 & -0.51 & \underline{-0.44} & -0.48 \\ Multilevel FDM (arima) & 0.49 & 0.60 & \textBF{0.55} & 1.13 & \underline{1.22} & 1.18 & -0.36 & -0.47 & \textBF{-0.42} \\ Multilevel FDM (rwf) & 0.72 & 0.60 & 0.66 & 1.54 & 1.24 & 1.39 & -0.68 & -0.50 & -0.59 \\ \\ \multicolumn{6}{l}{\hspace{-.1in}{\underline{e(0)}}} \\ Lee-Carter & 2.33 & 3.04 & 2.69 & 2.36 & 3.10 & 2.73 & 2.26 & 2.97 & 2.62 \\ Li-Lee & 3.00 & 1.92 & 2.46 & 3.03 & 2.00 & 2.52 & 3.00 & 1.73 & 2.37 \\ Independent FDM & \underline{1.53} & 3.06 & 2.30 & \underline{1.62} & 3.11 & 2.37 & \underline{1.24} & 3.05 & 2.15 \\ Product-ratio & 2.19 & 1.91 & 2.05 & 2.26 & 2.02 & 2.14 & 1.95 & 1.76 & 1.86 \\ Multilevel FDM (arima) & 1.65 & 2.19 & \textBF{1.92} & 1.73 & 2.28 & \textBF{2.00} & 1.30 & 2.13 & \textBF{1.72} \\ Multilevel FDM (rwf) & 2.57 & \underline{1.84} & 2.21 & 2.61 & \underline{1.90} & 2.26 & 2.53 & \underline{1.66} & 2.10 \\ \bottomrule \end{tabular} \end{table} The functional data methods use the automatic ARIMA algorithm for selecting the optimal difference operator $d$, for which the mortality improvement will then be stationary. Generally, the functional data methods give more accurate forecasts than the Lee-Carter and Li-Lee methods. The independent functional data method performs consistently the best for forecasting female mortality, followed by the multilevel functional data (arima) and product-ratio methods. The superiority of the independent functional data method over the coherent forecasting methods is manifested by a population with small variabilities over age and time, such as in female mortality. In terms of male and overall forecast errors, the product-ratio and multilevel functional data methods perform similarly: they both produce more accurate forecasts than those from the independent functional data method. From the averaged MFE across 30 horizons, the coherent forecasting methods produce less-biased forecasts than the non-coherent forecasting methods for males. The independent functional data method gives the least-biased forecasts of female mortality. For male mortality, the product-ratio method and multilevel functional data method (arima) perform about the same in terms of bias, and they both produce less-biased forecasts than the ones from the independent functional data method. With the forecast age-specific mortality, we can also forecast life expectancy \citep[see][for details]{PHG01}. Based on the averaged MAFE, RMSFE, and MFE across 30 horizons, we again found that the functional data methods generally give smaller overall forecast errors and bias across two sexes, in comparison to the Lee-Carter and Li-Lee methods. The independent functional data method performs the best for forecasting female life expectancy, followed by the multilevel functional data (arima) and product ratio methods. For male data, the multilevel functional data method (rwf) gives the most accurate point forecasts. The product-ratio and multilevel functional data methods both produce more accurate point forecasts than the ones from the independent functional data method. Of the two approaches, the multilevel functional data method (arima) performs the best based on simple averaging of the forecast errors over two sub-populations. To achieve optimal point forecast accuracy and bias, the independent functional data method should be used for forecasting female mortality and life expectancy, whereas the product-ratio or multilevel functional data method (rwf) should be implemented for forecasting male mortality and male life expectancy, respectively. Based on the simple average of two sub-populations, the multilevel functional data method (arima) generally performs the overall best in all. With respect to the automatic ARIMA and random-walk with drift (rwf), the automatic ARIMA method is recommended to forecast principal component scores in the multilevel functional data method for age-specific female mortality and life expectancy. In contrast, the rwf method is suitable to forecast principal component scores for age-specific male mortality and life expectancy. \subsection{Multi-country comparison of interval forecast accuracy} The prediction intervals for age-specific mortality are obtained from~\eqref{eq:interval}, and the prediction intervals for life expectancy are obtained from the percentiles of simulated life expectancies. The simulation method takes the nonlinear relationship between age-specific mortality and life expectancy into account, thus giving an asymmetric prediction interval \citep{HBY13}. Based on the averaged mean interval scores shown in Table~\ref{tab:score_multicount}, the independent functional data method produces the most accurate forecasts for female mortality, followed by the multilevel functional data (arima) method. For male mortality, the multilevel functional data model (rwf) performs the best, followed by the Li-Lee method. Averaged across both sexes, the multilevel functional data method (arima) performs the best. For forecasting female life expectancy, the multilevel functional data method (arima) produces the most accurate interval forecasts, followed by the independent functional data method. For forecasting male life expectancy, the multilevel functional data method (rwf) gives the best interval forecast accuracy. Averaged across both sexes, the multilevel functional data method (arima) performs the best. \begin{table}[htbp] \centering \tabcolsep 0.25in \caption{Interval forecast accuracy of mortality and life expectancy for females and males by method, as measured by the averaged mean interval score. For mortality, the mean interval scores were multiplied by 100 in order to keep two decimal places.}\label{tab:score_multicount} \begin{tabular}{@{}lcccrrr@{}} \toprule Method & \multicolumn{3}{c}{Mortality ($\times 100$)} & \multicolumn{3}{c}{e(0)} \\ & F & M & $\frac{\text{F+M}}{2}$ & F & M &$\frac{\text{F+M}}{2}$ \\\midrule Lee-Carter & 6.14 & 7.25 & 6.70 & 11.41 & 55.54 & 33.48 \\ Li-Lee & 4.51 & 3.01 & 3.76 & 19.61 & 9.04 & 14.33 \\ Independent FDM & \underline{2.05} & 3.66 & 2.86 & 8.09 & 17.93 & 13.01 \\ Product-ratio & 3.17 & 3.64 & 3.41 & 12.93 & 8.46 & 10.70 \\ Multilevel FDM (arima) & 2.45 & 3.04 & \textBF{2.75} & \underline{7.76} & 10.49 & \textBF{9.13} \\ Multilevel FDM (rwf) & 3.99 & \underline{2.92} & 3.46 & 14.95 & \underline{7.66} & 11.31 \\ \bottomrule \end{tabular} \end{table} Apart from the mean forecast errors and mean interval scores, we also consider the maximum absolute forecast error, maximum root squared forecast error, and maximum interval score, for measuring the extreme point and interval errors across different ages and years in the forecasting period. Their results in the multi-country comparison are included in the supplement D \citep{Shang16}. \subsection{Comparison between the functional data models and a Bayesian method} \cite{RLG14} proposed a Bayesian hierarchical model for joint probabilistic projection of male and female life expectancies that ensures coherence between them by projecting the gap between female life expectancy and male life expectancy. This method starts with probabilistic projection of life expectancy for females obtained from a Bayesian hierarchical model, then models the gap in life expectancy between females and males. The probabilistic projection of life expectancy for males can be obtained by combining the former two quantities. Computationally, this method is implemented in the \textit{bayesLife} package \citep{SR15} in R \citep{Team13}. In Tables~\ref{tab:bay_1} and~\ref{tab:bay_2}, we compare the forecast accuracy between the multilevel functional data and Bayesian methods for forecasting life expectancy. \begin{table}[!htbp] \centering \tabcolsep 0.07in \caption{Point and interval forecast accuracy between the multilevel functional data method and Bayesian method for forecasting female life expectancy at birth (e(0)). Using the data until 1979, we forecast the e(0) for years 1984, 1989, 1994, 1999, 2004 and 2009.}\label{tab:bay_1} \begin{tabular}{@{}lrrrrrr|rrrrrr@{}} \toprule & \multicolumn{6}{c}{Multilevel functional data method} & \multicolumn{6}{c}{Bayesian method} \\ Country & 1984 & 1989 & 1994 & 1999 & 2004 & 2009 & 1984 & 1989 & 1994 & 1999 & 2004 & 2009 \\ \hline \\[-1.8ex] \multicolumn{13}{l}{\hspace{-.09in} \underline{MAFE}} \\ AUS & $0.54$ & $1.84$ & $2.22$ & $2.81$ & $3.51$ & $4.55$ & $0.98$ & $0.78$ & $1.49$ & $2.02$ & $2.51$ & $2.74$ \\ AUT & $0.71$ & $1.46$ & $1.74$ & $2.30$ & $2.96$ & $3.13$ & $0.78$ & $1.30$ & $1.43$ & $1.84$ & $2.35$ & $2.43$ \\ BEL & $1.63$ & $2.40$ & $3.07$ & $3.56$ & $4.17$ & $4.39$ & $0.94$ & $1.15$ & $1.39$ & $1.53$ & $1.79$ & $1.66$ \\ CAN & $0.20$ & $1.01$ & $1.85$ & $2.41$ & $2.78$ & $3.02$ & $0.74$ & $0.40$ & $0.03$ & $0.17$ & $0.10$ & $0.11$ \\ DEN & $0.20$ & $0.04$ & $0.06$ & $0.40$ & $0.99$ & $1.91$ & $0.58$ & $1.29$ & $1.83$ & $1.78$ & $1.56$ & $1.02$ \\ FRA & $1.78$ & $2.81$ & $3.65$ & $3.89$ & $4.87$ & $5.10$ & $0.74$ & $1.09$ & $1.50$ & $1.25$ & $1.92$ & $1.74$ \\ FIN & $1.66$ & $1.65$ & $2.60$ & $3.13$ & $4.03$ & $4.55$ & $0.61$ & $0.40$ & $0.10$ & $0.14$ & $0.27$ & $0.33$ \\ ITA & $1.79$ & $2.59$ & $2.86$ & $3.40$ & $4.43$ & $4.33$ & $0.78$ & $1.09$ & $0.99$ & $1.24$ & $1.99$ & $1.65$ \\ JPN & $0.53$ & $1.25$ & $1.62$ & $1.97$ & $2.95$ & $3.25$ & $0.94$ & $1.24$ & $1.29$ & $1.38$ & $2.18$ & $2.30$ \\ NET & $1.41$ & $1.52$ & $1.58$ & $1.35$ & $1.96$ & $2.80$ & $0.43$ & $0.06$ & $0.36$ & $0.84$ & $0.48$ & $0.07$ \\ NOR & $0.99$ & $0.74$ & $1.47$ & $1.62$ & $2.51$ & $2.98$ & $0.21$ & $0.44$ & $0.11$ & $0.24$ & $0.34$ & $0.43$ \\ SPA & $1.42$ & $1.79$ & $2.21$ & $2.05$ & $2.55$ & $2.96$ & $1.27$ & $1.01$ & $1.26$ & $1.05$ & $1.42$ & $1.74$ \\ SWE & $1.40$ & $1.76$ & $2.33$ & $2.59$ & $3.12$ & $3.56$ & $0.60$ & $0.39$ & $0.37$ & $0.09$ & $0.11$ & $0.09$ \\ SWI & $1.26$ & $1.82$ & $2.23$ & $2.64$ & $3.28$ & $3.59$ & $0.41$ & $0.21$ & $0.05$ & $0.13$ & $0.00$ & $0.10$ \\ UK & $0.74$ & $0.60$ & $1.20$ & $1.10$ & $1.86$ & $2.50$ & $0.74$ & $0.48$ & $0.98$ & $0.80$ & $1.46$ & $2.00$ \\ USA & $1.02$ & $2.03$ & $2.88$ & $3.84$ & $4.31$ & $4.53$ & $0.21$ & $0.26$ & $0.61$ & $1.10$ & $1.01$ & $0.80$ \\ \hline \\[-1.8ex] Mean & 1.08 & 1.58 & 2.10 & 2.44 & 3.14 & 3.57 & \textBF{0.68} & \textBF{0.72} & \textBF{0.86} & \textBF{0.98} & \textBF{1.22} & \textBF{1.20} \\\midrule \multicolumn{13}{l}{\hspace{-.042in}\underline{Mean interval score}} \\ AUS & $1.83$ & $3.13$ & $4.81$ & $7.29$ & $9.49$ & $13.13$ & $2.06$ & $2.78$ & $3.48$ & $4.22$ & $5.52$ & $5.30$ \\ AUT & $2.92$ & $5.24$ & $8.92$ & $13.94$ & $20.97$ & $27.48$ & $2.10$ & $3.28$ & $4.17$ & $5.02$ & $5.75$ & $6.42$ \\ BEL & $5.51$ & $10.75$ & $17.32$ & $19.93$ & $26.41$ & $25.64$ & $2.12$ & $3.12$ & $4.01$ & $4.65$ & $5.38$ & $6.03$ \\ CAN & $1.80$ & $2.59$ & $3.42$ & $6.10$ & $6.07$ & $7.09$ & $1.96$ & $2.94$ & $3.72$ & $4.50$ & $5.02$ & $5.78$ \\ DEN & $3.34$ & $4.18$ & $5.03$ & $6.40$ & $11.54$ & $19.91$ & $1.97$ & $2.96$ & $3.74$ & $4.47$ & $5.16$ & $5.75$ \\ FRA & $6.31$ & $14.65$ & $21.48$ & $23.77$ & $32.17$ & $35.97$ & $2.05$ & $3.21$ & $4.11$ & $4.79$ & $5.43$ & $6.04$ \\ FIN & $8.90$ & $4.16$ & $11.13$ & $14.58$ & $23.71$ & $26.42$ & $2.25$ & $3.47$ & $4.66$ & $5.61$ & $6.45$ & $7.23$ \\ ITA & $4.03$ & $9.51$ & $11.21$ & $17.16$ & $27.69$ & $24.23$ & $2.16$ & $3.28$ & $4.11$ & $4.96$ & $5.68$ & $6.28$ \\ JPN & $2.08$ & $3.88$ & $5.57$ & $6.73$ & $8.17$ & $9.30$ & $2.17$ & $3.35$ & $4.24$ & $4.90$ & $5.58$ & $6.25$ \\ NET & $3.83$ & $4.93$ & $5.85$ & $6.22$ & $6.75$ & $7.05$ & $1.80$ & $2.56$ & $3.28$ & $3.86$ & $4.30$ & $4.65$ \\ NOR & $2.75$ & $2.51$ & $5.60$ & $6.36$ & $15.46$ & $19.65$ & $1.85$ & $2.53$ & $3.15$ & $3.68$ & $4.16$ & $4.69$ \\ SPA & $3.62$ & $5.88$ & $10.81$ & $8.35$ & $17.02$ & $20.55$ & $4.48$ & $3.11$ & $3.87$ & $4.59$ & $5.33$ & $5.80$ \\ SWE & $3.22$ & $4.13$ & $7.05$ & $9.15$ & $14.60$ & $15.85$ & $1.86$ & $2.78$ & $3.36$ & $4.07$ & $4.71$ & $5.29$ \\ SWI & $2.62$ & $3.90$ & $7.51$ & $9.20$ & $14.75$ & $17.56$ & $1.96$ & $3.06$ & $4.06$ & $5.06$ & $5.94$ & $6.68$ \\ UK & $4.15$ & $2.60$ & $7.85$ & $7.93$ & $14.89$ & $21.47$ & $2.00$ & $2.90$ & $3.67$ & $4.15$ & $4.71$ & $5.32$ \\ USA & $1.81$ & $2.45$ & $3.02$ & $3.41$ & $3.64$ & $4.04$ & $2.06$ & $3.01$ & $3.76$ & $4.57$ & $5.18$ & $5.71$ \\\midrule Mean & 3.67 & 5.28 & 8.54 & 10.41 & 15.83 & 18.46 & \textBF{2.18} & \textBF{3.02} & \textBF{3.84} & \textBF{4.57} & \textBF{5.27} & \textBF{5.83} \\\bottomrule \end{tabular} \end{table} \begin{table}[!htbp] \centering \tabcolsep 0.07in \caption{Point and interval forecast accuracy between the multilevel functional data method and Bayesian method for forecasting male life expectancy at birth (e(0)). Using the data until 1979, we forecast the e(0) for years 1984, 1989, 1994, 1999, 2004 and 2009.}\label{tab:bay_2} \begin{tabular}{@{}lrrrrrr|rrrrrr@{}} \toprule & \multicolumn{6}{c}{Multilevel functional data method} & \multicolumn{6}{c}{Bayesian method} \\ Country & 1984 & 1989 & 1994 & 1999 & 2004 & 2009 & 1984 & 1989 & 1994 & 1999 & 2004 & 2009 \\ \hline \\[-1.8ex] \multicolumn{13}{l}{\hspace{-.085in} \underline{MAFE}} \\ AUS & $1.32$ & $1.70$ & $2.97$ & $4.01$ & $5.28$ & $5.97$ & $1.61$ & $1.90$ & $3.08$ & $4.19$ & $5.44$ & $6.07$ \\ AUT & $0.09$ & $0.69$ & $0.96$ & $1.79$ & $2.66$ & $2.98$ & $0.72$ & $1.73$ & $2.13$ & $2.96$ & $3.89$ & $4.22$ \\ BEL & $1.04$ & $1.85$ & $2.28$ & $2.72$ & $3.82$ & $4.52$ & $0.81$ & $1.46$ & $1.83$ & $2.06$ & $2.97$ & $3.53$ \\ CAN & $1.13$ & $1.32$ & $1.69$ & $2.36$ & $3.32$ & $4.09$ & $1.56$ & $1.62$ & $1.87$ & $2.43$ & $3.31$ & $3.99$ \\ DEN & $0.00$ & $0.23$ & $0.07$ & $1.02$ & $1.51$ & $2.77$ & $0.35$ & $0.67$ & $0.43$ & $0.39$ & $0.76$ & $1.89$ \\ FRA & $0.39$ & $0.99$ & $1.66$ & $2.50$ & $3.84$ & $4.57$ & $0.57$ & $0.92$ & $1.21$ & $1.65$ & $2.59$ & $2.93$ \\ FIN & $1.27$ & $0.81$ & $2.06$ & $2.42$ & $3.46$ & $4.20$ & $1.42$ & $0.86$ & $1.95$ & $2.03$ & $2.82$ & $3.21$ \\ ITA & $0.70$ & $1.08$ & $1.09$ & $1.81$ & $3.10$ & $3.53$ & $1.00$ & $1.53$ & $1.60$ & $2.43$ & $3.74$ & $4.20$ \\ JPN & $0.26$ & $0.23$ & $0.85$ & $1.43$ & $1.02$ & $1.02$ & $0.34$ & $0.27$ & $0.34$ & $0.84$ & $0.44$ & $0.32$ \\ NET & $0.74$ & $0.92$ & $0.73$ & $0.58$ & $0.43$ & $1.62$ & $0.72$ & $1.13$ & $1.79$ & $2.27$ & $3.52$ & $4.90$ \\ NOR & $0.01$ & $0.70$ & $0.49$ & $0.65$ & $2.06$ & $2.75$ & $0.26$ & $0.17$ & $1.18$ & $1.35$ & $2.72$ & $3.38$ \\ SPA & $0.67$ & $0.20$ & $0.19$ & $0.17$ & $0.58$ & $1.48$ & $0.90$ & $0.17$ & $0.17$ & $0.31$ & $1.09$ & $2.02$ \\ SWE & $0.16$ & $0.25$ & $0.95$ & $1.48$ & $2.38$ & $3.03$ & $0.86$ & $1.09$ & $1.71$ & $2.15$ & $2.86$ & $3.24$ \\ SWI & $1.02$ & $0.89$ & $1.14$ & $2.00$ & $2.97$ & $3.45$ & $0.60$ & $0.43$ & $0.70$ & $1.59$ & $2.49$ & $2.99$ \\ UK & $1.03$ & $1.20$ & $1.94$ & $2.23$ & $3.43$ & $4.30$ & $1.10$ & $1.25$ & $2.00$ & $2.29$ & $3.44$ & $4.26$ \\ USA & $0.13$ & $0.30$ & $0.39$ & $0.33$ & $0.59$ & $0.94$ & $0.99$ & $0.73$ & $0.83$ & $1.71$ & $2.08$ & $2.57$ \\\midrule Mean & $\textBF{0.62}$ & $\textBF{0.83}$ & $\textBF{1.22}$ & $\textBF{1.72}$ & $\textBF{2.53}$ & $\textBF{3.20}$ & $0.86$ & $1.00$ & $1.43$ & $1.92$ & $2.76$ & $3.36$ \\\hline \\[-1.8ex] \multicolumn{13}{l}{\hspace{-.04in}\underline{Mean interval score}} \\ AUS & $5.87$ & $6.07$ & $17.17$ & $27.12$ & $24.19$ & $17.86$ & $6.58$ & $4.56$ & $14.18$ & $22.25$ & $31.65$ & $35.93$ \\ AUT & $1.83$ & $2.51$ & $2.95$ & $7.67$ & $14.82$ & $16.00$ & $2.62$ & $3.83$ & $4.83$ & $5.78$ & $9.44$ & $8.90$ \\ BEL & $2.47$ & $5.21$ & $6.31$ & $6.79$ & $9.78$ & $16.47$ & $2.52$ & $3.76$ & $4.87$ & $5.84$ & $6.71$ & $7.54$ \\ CAN & $1.67$ & $2.11$ & $2.58$ & $6.36$ & $15.08$ & $21.74$ & $5.58$ & $3.47$ & $4.31$ & $5.27$ & $8.89$ & $12.18$ \\ DEN & $1.84$ & $2.28$ & $2.63$ & $2.84$ & $2.74$ & $5.76$ & $2.34$ & $3.48$ & $4.17$ & $4.91$ & $5.54$ & $6.13$ \\ FRA & $4.75$ & $6.53$ & $7.86$ & $8.93$ & $10.70$ & $11.78$ & $2.57$ & $3.97$ & $5.23$ & $6.35$ & $7.40$ & $8.53$ \\ FIN & $3.86$ & $5.34$ & $6.37$ & $7.02$ & $16.47$ & $21.92$ & $3.14$ & $4.22$ & $5.41$ & $6.62$ & $7.59$ & $8.66$ \\ ITA & $3.94$ & $4.99$ & $5.92$ & $6.44$ & $7.63$ & $7.89$ & $2.59$ & $3.88$ & $4.89$ & $5.77$ & $8.81$ & $9.50$ \\ JPN & $1.61$ & $1.83$ & $2.24$ & $2.35$ & $2.24$ & $2.59$ & $2.91$ & $4.55$ & $6.09$ & $7.32$ & $8.51$ & $9.61$ \\ NET & $4.30$ & $5.17$ & $6.54$ & $6.95$ & $8.19$ & $8.40$ & $2.26$ & $3.31$ & $4.08$ & $4.74$ & $14.80$ & $26.17$ \\ NOR & $2.24$ & $2.97$ & $3.84$ & $4.23$ & $4.73$ & $5.10$ & $2.31$ & $3.29$ & $4.00$ & $4.61$ & $6.35$ & $10.30$ \\ SPA & $4.04$ & $5.14$ & $5.82$ & $6.76$ & $6.64$ & $6.80$ & $2.61$ & $3.83$ & $4.72$ & $5.61$ & $6.39$ & $7.23$ \\ SWE & $3.19$ & $3.80$ & $8.15$ & $8.94$ & $10.25$ & $11.53$ & $2.27$ & $3.29$ & $4.09$ & $4.71$ & $7.45$ & $9.94$ \\ SWI & $1.90$ & $2.37$ & $2.71$ & $7.93$ & $8.81$ & $9.86$ & $2.43$ & $3.60$ & $4.54$ & $5.49$ & $6.26$ & $6.84$ \\ UK & $1.57$ & $2.16$ & $5.44$ & $6.63$ & $17.44$ & $25.34$ & $2.46$ & $3.56$ & $4.37$ & $5.22$ & $10.36$ & $15.70$ \\ USA & $1.45$ & $1.87$ & $2.44$ & $2.64$ & $2.87$ & $3.24$ & $2.53$ & $3.74$ & $4.78$ & $5.68$ & $6.51$ & $7.30$ \\\midrule Mean & \textBF{2.91} & \textBF{3.77} & 5.56 & 7.47 & 10.16 & 12.02 & 2.98 & \textBF{3.77} & \textBF{5.29} & \textBF{6.64} & \textBF{9.54} & \textBF{11.90} \\\bottomrule \end{tabular} \end{table} For females, the Bayesian method is recommended. For males, the multilevel functional data method is preferable, in terms of point forecast accuracy. In terms of interval forecast accuracy, the Bayesian method is slightly advantageous for long-term forecasts. We found that the Bayesian (a simpler and direct) method outperforms the multilevel functional data method for long-term projection of life expectancy. The Bayesian method shows a superior interval forecast accuracy for two reasons: \begin{inparaenum} \item[1)] the Bayesian method uses the historical life expectancy data to produce forecasts, whereas the multilevel functional data method uses the historical age-specific mortality to produce these age-specific mortality rate forecasts, which are then combined non-linearly to give life expectancy forecasts. Oftentimes, the direct forecasting method outperforms the indirect forecasting method. \item[2)] the Bayesian method uses the prior information to assist its forecasts, in particular at longer forecast horizon. \end{inparaenum} By contrast, the multilevel functional data method is a time-series extrapolation, which works reasonably well in the short time. However, it does not work well for long term. Given that different changes are at play at different phases of a mortality transition, the age components of change in the past are not necessarily informative of longer-term future. \section{Application to Australian age- and sex- and state-specific mortality}\label{sec:5} First, we consider the age- and state-wise total mortality rates from 1950 to 2003 in Australia, available in the \textit{addb} package of \cite{Hyndman10} in R \citep{Team13}. This data set contains mortality rates for six states of Australia: Victoria (VIC), New South Wales (NSW), Queensland (QLD), South Australia (SA), Western Australia (WA), and Tasmania (TAS). The Australian Capital Territory and the Northern Territory are excluded from the analysis due to many missing values in the available data. In Figure~\ref{fig:20}, we show the estimated overall mean function $\widehat{\mu}(x)$, first common functional principal component $\widehat{\phi}_1(x)$ and corresponding scores $\left\{\widehat{\beta}_{1,1},\dots,\widehat{\beta}_{n,1}\right\}$ with 30-years-ahead forecasts. The first common functional principal component accounts for at least 90\% of total variation in the total mortality. The retained number of functional principal components for each state is the one that explains at least 90\% of the remaining 10\% total variations in the data. Due to limited space, we present only the first principal components for the six states, which explain 27\%, 68\%, 26\%, 22\%, 22\%, and 28\% of the remaining 10\% total variations for VIC, NSW, TAS, QLD, SA, WA, respectively. Based on~\eqref{eq:cluster}, the proportion of variability explained by the aggregate data (the simple average of total mortality across states) is $71\%, 71\%, 33\%, 63\%, 50\%$, and $50\%$ for VIC, NSW, TAS, QLD, SA, WA, respectively. \begin{figure}[!htbp] \centering \includegraphics[width=16.5cm]{state_1} \includegraphics[width=16.5cm]{state_2} \includegraphics[width=16.5cm]{state_3} \includegraphics[width=16.5cm]{state_4} \includegraphics[width=16.5cm]{state_5} \caption{The first common functional principal component and its associated scores for the aggregate mortality data (top), followed by the first functional principal component and associated scores for the state-wise total age-specific mortality rates in VIC, NSW, TAS, QLD, SA and WA, respectively. The dark and light gray regions show the 80\% and 95\% prediction intervals.}\label{fig:20} \end{figure} In Figure~\ref{fig:20}, we also show the estimated mean function deviation, first state-specific functional principal component $\widehat{\psi}_1^s(x)$ and principal component scores $\{\widehat{\gamma}^s_{1,1},\dots,\widehat{\gamma}^s_{n,1}\}$ with 30-years-ahead forecasts, where $s$ denotes a state. The convergence in forecasts is likely to be achieved by the multilevel functional data method, because the forecasts of principal component scores for each state do not show a long-term trend, with the exception of NSW. From a statistical perspective, this may be because the NSW has the largest proportion of variability that can not be explained by the aggregate data. From a social perspective, NSW is the state that attracts the most migrants in Australia (\url{http://www.abs.gov.au/ausstats/[email protected]/mf/3412.0}). Figure~\ref{fig:22} shows 30-years-ahead forecasts of median log mortality rates and life expectancy from 2004 to 2033 for all states, for the independent functional data, product-ratio and multilevel functional data methods. We focus on these three methods in this application, because they generally outperform the Lee-Carter and Li-Lee methods as demonstrated in Section~\ref{sec:4}. For the independent functional data method, the gap in mortality and life expectancy forecasts among states diverges. In contrast, the product-ratio and multilevel functional data methods are quite similar, and the gaps between female and male age-specific mortality and life expectancy converge, respectively. \begin{figure}[!htbp] \centering {\includegraphics[width=5.5cm]{mort_ind_plot}} {\includegraphics[width=5.5cm]{mort_fdm_plot}} {\includegraphics[width=5.5cm]{mort_coherent_plot}} \\ {\includegraphics[width=5.5cm]{e0_ind_plot}} {\includegraphics[width=5.5cm]{e0_fdm_plot}} {\includegraphics[width=5.5cm]{e0_coherent_plot}} \caption{Based on historical mortality rates (1950--2003), we forecast future mortality rates and life expectancy from 2004 to 2033, for the independent functional data, product-ratio, and multilevel functional data methods.}\label{fig:22} \end{figure} \subsection{Comparisons of point and interval forecast accuracy}\label{sec:6.1} Table~\ref{tab:state_point_accuracy} displays the point and interval forecast accuracy for both age- and state-specific total mortality rates and life expectancy at each forecast horizon. As measured by the averaged MAFE, RMSFE, MFE and averaged mean interval score across 30 horizons, the independent functional data method performs the worst, whereas the multilevel functional data method (rwf) performs the best, for forecasting age- and state-specific total mortality and life expectancy. As the product-ratio and multilevel functional data methods perform similarly, it is paramount to incorporate correlation among sub-populations in forecasting, as this allows us to search for characteristics within and among series. \begin{table}[!htbp] \begin{small} \centering \setlength\tabcolsep{9.5pt} \caption{Point and interval forecast accuracy of mortality and life expectancy (e(0)) across different states by method and forecast horizon, as measured by the averaged MAFE, RMSFE, MFE, and averaged mean interval score. The minimal forecast errors are underlined for each state, whereas the minimal overall forecast error is highlighted in bold.}\label{tab:state_point_accuracy} \begin{tabular}{@{}llrrrrrrr@{}} \toprule & & VIC & NSW & QLD & TAS & SA & WA & Mean \\ \hline Mortality & \underline{\text{MAFE}} \\ ($\times 100$) & Independent FDM & 0.61 & 0.63 & 0.77 & 0.96 & 0.70 & 0.70 & 0.73 \\ & Product-ratio & 0.56 & 0.55 & 0.45 & 0.53 & 0.47 & 0.53 & 0.51 \\ & Multilevel FDM (arima) & 0.53 & 0.51 & 0.47 & 0.53 & 0.46 & 0.52 & 0.51 \\ & Multilevel FDM (rwf) & \underline{0.47} & \underline{0.47} & \underline{0.41} & \underline{0.49} & \underline{0.41} & \underline{0.46} & \textBF{0.45} \\ \\ & \underline{\text{RMSFE}} \\ & Independent FDM & 1.36 & 1.42 & 1.69 & 1.96 & 1.48 & 1.53 & 1.57 \\ & Product-ratio & 1.08 & 1.04 & 0.87 & 1.26 & 0.97 & 1.06 & 1.05 \\ & Multilevel FDM (arima) & 1.03 & 0.97 & 0.95 & 1.23 & 0.96 & 1.05 & 1.03 \\ & Multilevel FDM (rwf) & \underline{0.91} & \underline{0.88} & \underline{0.82} & \underline{1.18} & \underline{0.86} & \underline{0.93} & \textBF{0.93} \\ \\ & \underline{\text{MFE}} \\ & Independent FDM & \underline{-0.31} & \underline{-0.16} & -0.41 & -0.86 & -0.48 & -0.40 & -0.43 \\ & Product-ratio & -0.52 & -0.49 & -0.32 & -0.25 & -0.35 & -0.43 & -0.39 \\ & Multilevel FDM (arima) & -0.48 & -0.43 & -0.32 & -0.25 & -0.33 & -0.42 & -0.37 \\ & Multilevel FDM (rwf) & -0.42 & -0.39 & \underline{-0.20} & \underline{-0.14} & \underline{-0.26} & \underline{-0.33} & \textBF{-0.29} \\ \\ & \underline{\text{Mean interval score}} \\ & Independent FDM & 4.00 & 3.55 & 5.42 & 4.95 & 5.01 & 4.52 & 4.58 \\ & Product-ratio & 2.85 & 2.78 & 2.75 & 2.44 & 2.43 & 2.69 & 2.66 \\ & Multilevel FDM (arima) & 2.47 & 2.14 & 2.42 & 1.81 & 1.85 & 2.50 & 2.20 \\ & Multilevel FDM (rwf) & \underline{2.10} & \underline{2.06} & \underline{2.01} & \underline{1.55} & \underline{1.58} & \underline{2.04} & \textBF{1.89} \\ \\ e(0) & \underline{\text{MAFE}} \\ & Independent FDM & 2.34 & 2.75 & 3.19 & 4.63 & 3.06 & 3.08 & 3.17 \\ & Product-ratio & 3.07 & 3.30 & 2.83 & 2.08 & 2.46 & 2.93 & 2.78 \\ & Multilevel FDM (arima) & 2.96 & 3.05 & 2.81 & 2.39 & 2.39 & 2.88 & 2.75 \\ & Multilevel FDM (rwf) & \underline{2.79} & \underline{3.01} & \underline{2.49} & \underline{1.76} & \underline{2.17} & \underline{2.64} & \textBF{2.48} \\ \\ & \underline{\text{RMSFE}} \\ & Independent FDM & 2.92 & \underline{3.05} & 3.75 & 4.67 & 3.35 & 3.56 & 3.55 \\ & Product-ratio & 3.14 & 3.38 & 2.94 & 2.20 & 2.61 & 3.03 & 2.88 \\ & Multilevel FDM (arima)& 3.04 & 3.16 & 2.95 & 2.53 & 2.53 & 2.99 & 2.87 \\ & Multilevel FDM (rwf) & \underline{2.86} & 3.10 & \underline{2.60} & \underline{1.89} & \underline{2.32} & \underline{2.75} & \textBF{2.59} \\ \\ & \underline{\text{MFE}} \\ & Independent FDM & \underline{2.26} & \underline{1.75} & 2.62 & 4.63 & 2.79 & \underline{2.53} & 2.76 \\ & Product-ratio & 3.07 & 3.29 & 2.81 & 2.05 & 2.45 & 2.93 & 2.77 \\ & Multilevel FDM (arima)& 2.95 & 3.03 & 2.79 & 2.37 & 2.37 & 2.87 & 2.73 \\ & Multilevel FDM (rwf) & 2.78 & 3.00 & \underline{2.47} & \underline{1.69} & \underline{2.16} & 2.64 & \textBF{2.46} \\ \\ & \underline{\text{Mean interval score}} \\ & Independent FDM & 21.04 & 25.05 & 30.46 & 24.20 & 19.85 & 16.34 & 22.82 \\ & Product-ratio & 22.70 & 24.66 & 13.53 & 19.95 & 17.10 & 21.14 & 19.85 \\ & Multilevel FDM (arima) & 20.79 & 20.64 & 15.04 & 18.44 & 15.79 & 19.59 & 18.38 \\ & Multilevel FDM (rwf) & \underline{17.09} & \underline{18.81} & \underline{9.41} & \underline{14.26} & \underline{12.27} & \underline{15.79} & \textBF{14.60} \\ \bottomrule \end{tabular} \end{small} \end{table} \subsection{Application to Australian age-, sex- and state-specific mortality} We extend the multilevel functional data method to two or more sub-populations in a hierarchy. This is related to hierarchical/grouped time series \citep[see, for example,][]{HAA+11}. A grouped structure is depicted in the two-level hierarchical diagram, presented in Figure~\ref{fig:hier_2}. \begin{figure}[!htbp] \centering \begin{tikzpicture} \tikzstyle{every node}=[circle,draw,inner sep=0.5pt] \tikzstyle[level distance=.1cm] \tikzstyle[sibling distance=.05cm] \tikzstyle{level 3}=[sibling distance=6mm,font=\tiny] \tikzstyle{level 2}=[sibling distance=10mm,font=\footnotesize] \tikzstyle{level 1}=[sibling distance=21mm,font=\small] \node{Total child {node {VIC} child {node {Female}} child {node {Male}} } child {node {NSW} child {node {Female}} child {node {Male}} } child {node {QLD} child {node {Female}} child {node {Male}} } child {node {TAS} child {node {Female}} child {node {Male}} } child {node {SA} child {node {Female}} child {node {Male}} } child {node {WA} child {node {Female}} child {node {Male}} }; \end{tikzpicture} \caption{A two-level hierarchical tree diagram.}\label{fig:hier_2} \end{figure} Following a bottom-up hierarchical structure, we first extract a common trend from the total mortality within each state. For the $j^{\text{th}}$ population in state $s$, the multilevel functional data model can be written as: \begin{equation} f_t^{j,s}(x) = \mu^{j,s}(x) + R_t^{s}(x) + U_t^{j, s}(x), \label{eq:mult1} \end{equation} where $f_t^{j,s}(x)$ represents the female or male mortality in state $s$ at year $t$; $\mu^{j,s}(x)$ is the mean function of female or male mortality in state $s$; $R_t^{s}(x)$ captures the common trend across two populations for a state; and $U_t^{j, s}(x)$ captures the sex-specific residual trend for a state. Based on~\eqref{eq:cluster}, the proportion of variability explained by the total mortality in each state is 65\%, 69\%, 25\%, 53\%, 43\%, and 37\% for females, and 59\%, 59\%, 22\%, 54\%, 41\%, and 38\% for males. We can also extract the common trend from the averaged mortality across all states for females and males. For the $j^{\text{th}}$ population in state $s$, the multilevel functional data model can be written as: \begin{equation} f_t^{j,s}(x) = \mu^{j,s}(x) + S_t^{j}(x)+W_t^{j,s}(x),\label{eq:mult2} \end{equation} where $S_t^{j}(x)$ captures the common trend across six populations; and $W_t^{j,s}(x)$ captures the state-specific residual trend. By combining~\eqref{eq:mult1} and~\eqref{eq:mult2}, we obtain \begin{align} f_t^{j,s}(x) &= \mu^{j,s}(x) + \frac{R_t^{s}(x) + U_t^{j, s}(x) + S_t^{j}(x)+W_t^{j,s}(x)}{2}. \end{align} \begin{table}[!htbp] \begin{small} \centering \setlength\tabcolsep{12pt} \caption{Point forecast errors ($\times 100$) of mortality across states and sexes by method, as measured by the averaged MAFE, RMSFE, and MFE. The minimal forecast errors are underlined for each state and each sex, whereas the minimal overall forecast error is highlighted in bold.}\label{tab:state_point_mort} \begin{tabular}{@{}llrrrrrrr@{}}\toprule Sex & Method & VIC & NSW & QLD & TAS & SA & WA & Mean \\\midrule & \multicolumn{6}{l}{\underline{\text{MAFE}}} & \\ F & Independent FDM & 0.46 & 0.41 & 0.90 & 0.56 & 0.59 & 0.76 & 0.61 \\ & Product-ratio & 0.58 & 0.56 & \underline{0.47} & 0.60 & 0.51 & 0.50 & 0.54 \\ & Multilevel FDM (arima) & 0.39 & \underline{0.37} & 0.48 & 0.35 & \underline{0.35} & 0.36 & 0.38 \\ & Multilevel FDM (rwf) & \underline{0.38} & \underline{0.37} & \underline{0.47} & \underline{0.32} & \underline{0.35} & \underline{0.35} & \textBF{0.37} \\ \\ M & Independent FDM & 0.90 & 0.85 & 1.31 & 1.12 & 1.03 & 1.20 & 1.07 \\ & Product-ratio & \underline{0.75} & \underline{0.71} & \underline{0.59} & 0.83 & \underline{0.67} & \underline{0.83} & \textBF{0.73} \\ & Multilevel FDM (arima) & 0.98 & 0.94 & 1.13 & 0.85 & 0.88 & 1.08 & 0.98 \\ & Multilevel FDM (rwf) & 0.91 & 0.86 & 0.93 & \underline{0.73} & 0.79 & 0.98 & 0.87 \\ \\ $\frac{\text{F+M}}{2}$ & Independent FDM & 0.68 & 0.63 & 1.11 & 0.84 & 0.81 & 0.98 & 0.84 \\ & Product-ratio & 0.66 & 0.63 & \underline{0.53} & 0.72 & 0.59 & \underline{0.66} & 0.63 \\ & Multilevel FDM (arima) & 0.69 & 0.66 & 0.80 & 0.60 & 0.62 & 0.72 & 0.68 \\ & Multilevel FDM (rwf) & \underline{0.65} & \underline{0.62} & 0.70 & \underline{0.53} & \underline{0.57} & \underline{0.66} & \textBF{0.62} \\ \\ & \multicolumn{6}{l}{\underline{\text{RMSFE}}} \\ F & Independent FDM & 1.20 & 0.99 & 2.02 & 1.34 & 1.35 & 1.63 & 1.42 \\ & Product-ratio & 1.19 & 1.14 & \underline{0.99} & 1.48 & 1.12 & 1.08 & 1.17 \\ & Multilevel FDM (arima) & 0.85 & 0.79 & 1.28 & 0.82 & \underline{0.81} & 0.86 & 0.90 \\ & Multilevel FDM (rwf) & \underline{0.81} & \underline{0.78} & 1.26 & \underline{0.73} & 0.82 & \underline{0.81} & \textBF{0.87} \\ \\ M & Independent FDM & 1.90 & 1.66 & 2.91 & 2.59 & 2.09 & 2.53 & 2.28 \\ & Product-ratio & \underline{1.58} & \underline{1.41} & \underline{1.26} & 2.22 & \underline{1.51} & \underline{1.98} & \textBF{1.66} \\ & Multilevel FDM (arima) & 1.94 & 1.77 & 2.58 & 1.70 & 1.83 & 2.36 & 2.03 \\ & Multilevel FDM (rwf) & 1.77 & 1.58 & 2.30 & \underline{1.51} & 1.63 & 2.12 & 1.82 \\ \\ $\frac{\text{F+M}}{2}$ & Independent FDM & 1.55 & 1.33 & 2.46 & 1.97 & 1.72 & 2.08 & 1.85 \\ & Product-ratio & 1.39 & 1.28 & \underline{1.12} & 1.85 & 1.32 & 1.53 & 1.41 \\ & Multilevel FDM (arima) & 1.40 & 1.28 & 1.93 & 1.26 & 1.32 & 1.61 & 1.46 \\ & Multilevel FDM (rwf) & \underline{1.29} & \underline{1.18} & 1.78 & \underline{1.12} & \underline{1.23} & \underline{1.46} & \textBF{1.35} \\ \\ & \multicolumn{6}{l}{\underline{\text{MFE}}}\\ F & Independent FDM & -0.16 & -0.09 & -0.77 & -0.23 & -0.50 & -0.60 & -0.39 \\ & Product-ratio & -0.55 & -0.51 & -0.37 & -0.38 & -0.42 & -0.41 & -0.44 \\ & Multilevel FDM (arima) & \underline{-0.34} & \underline{-0.30} & \underline{-0.15} & -0.21 & \underline{-0.21} & -0.23 & -0.24 \\ & Multilevel FDM (rwf) & \underline{-0.34} & -0.32 & \underline{-0.15} & \underline{-0.16} & -0.22 & \underline{-0.20} & \textBF{-0.23} \\ \\ M & Independent FDM & -0.66 & -0.71 & -1.07 & -0.79 & -0.73 & -0.98 & -0.82 \\ & Product-ratio & \underline{-0.65} & \underline{-0.61} & \underline{-0.36} & \underline{-0.24} & \underline{-0.41} & \underline{-0.66} & \textBF{-0.49} \\ & Multilevel FDM (arima) & -0.87 & -0.82 & -0.69 & -0.65 & -0.62 & -0.91 & -0.76 \\ & Multilevel FDM (rwf) & -0.83 & -0.77 & \underline{-0.36} & -0.48 & -0.58 & -0.84 & -0.64 \\ \\ $\frac{\text{F+M}}{2}$ & Independent FDM & \underline{-0.41} & \underline{-0.40} & -0.92 & -0.51 & -0.62 & -0.79 & -0.60 \\ & Product-ratio & -0.60 & -0.56 & -0.37 & \underline{-0.31} & -0.42 & -0.54 & -0.46 \\ & Multilevel FDM (arima) & -0.60 & -0.56 & -0.42 & -0.43 & -0.42 & -0.57 & -0.50 \\ & Multilevel FDM (rwf) & -0.59 & -0.54 & \underline{-0.26} & -0.32 & \underline{-0.40} & \underline{-0.52} & \textBF{-0.43} \\\bottomrule \end{tabular} \end{small} \end{table} \begin{table}[!htbp] \begin{small} \centering \setlength\tabcolsep{12pt} \caption{Point forecast accuracy of life expectancy across states and sexes by method, as measured by the averaged MAFE, RMSFE, and MFE. The minimal forecast errors are underlined for each state and each sex, whereas the minimal overall forecast error is highlighted in bold.}\label{tab:state_point_e0} \begin{tabular}{@{}llrrrrrrr@{}}\toprule Sex & Method & VIC & NSW & QLD & TAS & SA & WA & Mean \\\midrule &\multicolumn{6}{l}{\underline{\text{MAFE}}} & \\ F & Independent FDM & \underline{1.92} & \underline{1.94} & 4.48 & 2.49 & 2.91 & 3.87 & 2.93 \\ & Product-ratio & 2.94 & 3.07 & 2.67 & 2.26 & 2.42 & 2.68 & 2.67 \\ & Multilevel FDM (arima) & 1.97 & 2.05 & 1.62 & 1.82 & \underline{1.48} & \underline{1.76} & \textBF{1.78} \\ & Multilevel FDM (rwf) & 2.08 & 2.26 & \underline{1.32} & \underline{1.76} & 1.57 & \underline{1.76} & \textBF{1.78} \\ \\ M & Independent FDM & 3.44 & 3.65 & 5.51 & 4.24 & 4.47 & 4.80 & 4.35 \\ & Product-ratio & \underline{3.18} & \underline{3.44} & 2.93 & \underline{2.24} & \underline{2.53} & \underline{3.07} & \textBF{2.90} \\ & Multilevel FDM (arima) & 3.91 & 4.08 & 4.09 & 3.85 & 3.33 & 3.95 & 3.87 \\ & Multilevel FDM (rwf) & 3.95 & 4.20 & \underline{2.84} & 3.63 & 3.29 & 3.87 & 3.63 \\ \\ $\frac{\text{F+M}}{2}$ & Independent FDM & \underline{2.68} & \underline{2.79} & 5.00 & 3.36 & 3.69 & 4.33 & 3.64 \\ & Product-ratio & 3.06 & 3.26 & 2.80 & \underline{2.25} & 2.48 & 2.87 & 2.78 \\ & Multilevel FDM (arima) & 2.94 & 3.06 & 2.86 & 2.83 & \underline{2.40} & 2.85 & 2.83 \\ & Multilevel FDM (rwf) & 3.02 & 3.23 & \underline{2.08} & 2.69 & 2.43 & \underline{2.81} & \textBF{2.71} \\ \\ & \multicolumn{6}{l}{\underline{\text{RMSFE}}} & \\ F & Independent FDM & 2.45 & 2.18 & 4.55 & 3.02 & 3.23 & 4.11 & 3.26 \\ & Product-ratio & 3.03 & 3.20 & 2.83 & 2.42 & 2.61 & 2.82 & 2.82 \\ & Multilevel FDM (arima) & \underline{2.09} & \underline{2.17} & 1.77 & 2.01 & \underline{1.66} & 1.92 & \textBF{1.93} \\ & Multilevel FDM (rwf) & 2.18 & 2.36 & \underline{1.51} & \underline{1.91} & 1.75 & \underline{1.91} & \textBF{1.93} \\ \\ M & Independent FDM & 3.71 & 3.86 & 5.55 & 4.58 & 4.66 & 5.05 & 4.57 \\ & Product-ratio & \underline{3.23} & \underline{3.49} & 3.00 & \underline{2.32} & \underline{2.61} & \underline{3.14} & \textBF{2.96} \\ & Multilevel FDM (arima) & 4.06 & 4.25 & 4.25 & 4.04 & 3.54 & 4.14 & 4.05 \\ & Multilevel FDM (rwf) & 4.00 & 4.25 & \underline{2.92} & 3.70 & 3.39 & 3.94 & 3.70 \\ \\ $\frac{\text{F+M}}{2}$ & Independent FDM & 3.08 & \underline{3.02} & 5.05 & 3.80 & 3.94 & 4.58 & 3.91 \\ & Product-ratio & 3.13 & 3.35 & 2.91 & \underline{2.37} & 2.61 & 2.98 & 2.89 \\ & Multilevel FDM (arima) & \underline{3.07} & 3.21 & 3.01 & 3.02 & 2.60 & 3.03 & 2.99 \\ & Multilevel FDM (rwf) & 3.09 & 3.30 & \underline{2.21} & 2.81 & \underline{2.57} & \underline{2.92} & \textBF{2.82} \\ \\ & \multicolumn{6}{l}{\underline{\text{MFE}}} & \\ F & Independent FDM & \underline{0.98} & \underline{1.00} & 4.48 & \underline{1.48} & 2.90 & 3.27 & 2.35 \\ & Product-ratio & 2.93 & 3.06 & 2.66 & 2.25 & 2.41 & 2.68 & 2.67 \\ & Multilevel FDM (arima)& 1.97 & 2.03 & 1.61 & 1.80 & \underline{1.45} & \underline{1.76} & \textBF{1.77} \\ & Multilevel FDM (rwf) & 2.08 & 2.25 & \underline{1.26} & 1.75 & 1.54 & \underline{1.76} & \textBF{1.77} \\ \\ M & Independent FDM & 3.43 & 3.62 & 5.51 & 3.95 & 4.47 & 4.71 & 4.28 \\ & Product-ratio & \underline{3.17} & \underline{3.44} & 2.91 & \underline{2.23} & \underline{2.51} & \underline{3.07} & \textBF{2.89} \\ & Multilevel FDM (arima)& 3.91 & 4.06 & 4.09 & 3.82 & 3.28 & 3.94 & 3.85 \\ & Multilevel FDM (rwf) & 3.95 & 4.19 & \underline{2.81} & 3.62 & 3.29 & 3.87 & 3.62 \\ \\ $\frac{\text{F+M}}{2}$ & Independent FDM & \underline{2.21} & \underline{2.31} & 5.00 & 2.72 & 3.69 & 3.99 & 3.32 \\ & Product-ratio & 3.05 & 3.25 & 2.79 & \underline{2.24} & 2.46 & 2.87 & 2.78 \\ & Multilevel FDM (arima) & 2.94 & 3.05 & 2.85 & 2.81 & \underline{2.37} & 2.85 & 2.81 \\ & Multilevel FDM (rwf) & 3.02 & 3.22 & \underline{2.03} & 2.68 & 2.42 & \underline{2.81} & \textBF{2.70} \\\bottomrule \end{tabular} \end{small} \end{table} \begin{table}[!htbp] \centering \setlength\tabcolsep{8.5pt} \caption{Interval forecast accuracy of mortality and life expectancy across states and sexes by method, as measured by the averaged mean interval score. The minimal forecast errors are underlined for each state and each sex, whereas the minimal overall forecast error is highlighted in bold.}\label{tab:state_interval} \begin{tabular}{@{}llrrrrrrr@{}}\toprule Sex & Method & VIC & NSW & QLD & TAS & SA & WA & Mean \\\midrule &\multicolumn{6}{l}{\underline{\text{Mortality} ($\times 100$)}} & \\ F & Independent FDM & 3.12 & 2.28 & 4.93 & 3.57 & 3.46 & 4.44 & 3.63 \\ & Product-ratio & 2.76 & 2.64 & 3.11 & 2.30 & 2.43 & 2.64 & 2.65 \\ & Multilevel FDM (arima) & 1.83 & 1.74 & 2.41 & 1.66 & \underline{1.70} & \underline{1.71} & 1.84 \\ & Multilevel FDM (rwf) & \underline{1.78} & \underline{1.73} & \underline{2.36} & \underline{1.54} & 1.72 & \underline{1.71} & \textBF{1.81} \\ \\ M & Independent FDM & 6.00 & 5.10 & 7.50 & 7.37 & 6.79 & 7.35 & 6.68 \\ & Product-ratio & \underline{3.63} & \underline{3.52} & \underline{4.10} & \underline{3.12} & \underline{3.46} & \underline{3.84} & \textBF{3.61} \\ & Multilevel FDM (arima) & 6.71 & 6.62 & 6.57 & 5.57 & 5.63 & 6.99 & 6.35 \\ & Multilevel FDM (rwf) & 4.61 & 4.50 & 4.68 & 3.81 & 4.07 & 4.81 & 4.41 \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 4.56 & 3.69 & 6.22 & 5.47 & 5.12 & 5.90 & 5.16 \\ & Product-ratio & \underline{3.20} & \underline{3.08} & 3.60 & 2.71 & 2.94 & \underline{3.24} & 3.13 \\ & Multilevel FDM (arima) & 4.27 & 4.18 & 4.49 & 3.62 & 3.66 & 4.35 & 4.10 \\ & Multilevel FDM (rwf) & \underline{3.20} & 3.11 & \underline{3.52} & \underline{2.68} & \underline{2.90} & 3.26 & \textBF{3.11} \\ \\ &\multicolumn{6}{l}{\underline{\text{e(0)}}} & \\ F & Independent FDM & \underline{7.76} & 13.31 & 33.49 & 13.91 & 8.09 & 11.75 & 14.72 \\ & Product-ratio & 20.09 & 21.50 & 14.10 & 17.84 & 15.49 & 17.70 & 17.79 \\ & Multilevel FDM (arima) & 9.43 & 9.74 & 6.98 & 8.37 & 6.46 & 7.37 & 8.06 \\ & Multilevel FDM (rwf) & 8.07 & \underline{8.93} & \underline{5.29} & \underline{6.51} & \underline{5.88} & \underline{6.50} & \textBF{6.86} \\ \\ M & Independent FDM & 33.67 & 35.66 & 49.16 & 37.06 & 34.50 & 29.49 & 36.59 \\ & Product-ratio & \underline{22.01} & \underline{24.30} & \underline{11.71} & \underline{18.38} & \underline{15.97} & \underline{20.81} & \textBF{18.86} \\ & Multilevel FDM (arima) & 32.51 & 33.57 & 29.37 & 31.44 & 27.92 & 32.57 & 31.23 \\ & Multilevel FDM (rwf) & 26.07 & 28.34 & 16.58 & 22.55 & 20.28 & 25.37 & 23.20 \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 20.72 & 24.49 & 41.32 & 25.48 & 21.30 & 20.62 & 25.65 \\ & Product-ratio & 21.05 & 22.90 & 12.90 & 18.11 & 15.73 & 19.25 & 18.32 \\ & Multilevel FDM (arima) & 20.97 & 21.66 & 18.17 & 19.90 & 17.19 & 19.97 & 19.64 \\ & Multilevel FDM (rwf) & \underline{17.07} & \underline{18.63} & \underline{10.94} & \underline{14.53} & \underline{13.08} & \underline{15.94} & \textBF{15.03} \\ \bottomrule \end{tabular} \end{table} Tables~\ref{tab:state_point_mort},~\ref{tab:state_point_e0} and~\ref{tab:state_interval} show the point and interval forecast accuracy among different functional data methods. As measured by the averaged MAFE, RMSFE, MFE and averaged mean interval score across 30 horizons, the multilevel functional data method (rwf) gives the smallest errors for forecasting female mortality rate and life expectancy, as well as the smallest overall errors, whereas the product-ratio method produces the most accurate forecasts for male mortality rate and life expectancy. Apart from the expected error loss function, we also consider the maximum point and interval forecast error criteria. Their results are also included in the supplement D \citep{Shang16}. \section{Conclusion}\label{sec:6} In this paper, we adapt the multilevel functional data model to forecast age-specific mortality and life expectancy for a group of populations. We highlight the relationships among the adapted multilevel functional data, augmented common factor method and product-ratio method. As demonstrated by the empirical studies consisting of two populations, we found that the independent functional data method gives the best forecast accuracy for females, whereas the multilevel functional data and product-ratio methods produce more accurate forecasts for males. Based on their averaged forecast errors, the multilevel functional data method (arima) should be used in the case of two sub-populations, in particular for females. In the case of more than two populations, it is evident that the multilevel functional data and product-ratio methods consistently outperform the independent functional data method. The multilevel functional data method (rwf) gives the most accurate mortality and life expectancy forecasts for age- and state-specific total mortality. When we further disaggregated the age- and state-specific total mortality by sex, we found that the multilevel functional data method (rwf) should be used for forecasting female mortality and life expectancy, whereas the product-ratio method should be applied for forecasting male mortality and life expectancy. The superiority of the product-ratio and multilevel functional data methods over the independent functional data method is manifested by a population with large variability over age and year. For example, the male data generally show greater variability over age and year than do the female data; as a result the product-ratio and multilevel functional data methods perform better in terms of forecast accuracy than the independent functional data method. Because the product-ratio and multilevel functional data methods produce better forecast accuracy than the independent functional data method overall, this may lead to their use by government agencies and statistical bureaus involved in short-term demographic forecasting. For long-term forecast horizons, any time-series extrapolation methods, including the proposed one, may not be accurate as the underlying model may no longer be optimal. Given that different changes are at play in different phases of a mortality transition, the age components of change in the past are not necessarily informative of the longer-term future. By incorporating prior knowledge, the Bayesian method of \cite{RLG14} demonstrated the superior forecast accuracy of the long-term projection of life expectancy. A limitation of the current study is that the comparative analysis among the five methods focuses on errors that aggregate over all age groups for one- to 30-step-ahead mortality forecasts. In future research, it is possible that the analysis of the forecast errors for certain key age groups, such as those above 65, might shed light on the results of more detailed analysis. For a relatively long time series, geometrically decaying weights can be imposed on the computation of functional principal components \citep[see, for example,][]{HS09} for achieving potentially improved forecast accuracy. In addition, the product-ratio and multilevel functional data methods could be applied to model and forecast other demographic components, such as age-specific immigration, migration, and population size by sex or other attributes for national and sub-national populations. Reconciling these forecasts across different levels of a hierarchy is worthwhile to investigate in the future \citep[see an early work by][]{SH16}. \begin{singlespace} \section*{Supplement to: ``Mortality and life expectancy forecasting for a group of populations in developed countries: A multilevel functional data method." by H. L. Shang} This supplement contains a PDF divided into four sections. \begin{description} \item[Supplement A:] Some theoretical properties of multilevel functional principal component decomposition; \item[Supplement B:] Derivation of posterior density of principal component scores and other variance parameters; \item[Supplement C:] WinBUGS computational code used for sampling principal component scores and estimating variance parameters from full conditional densities; \item[Supplement D:] Additional results for point and interval forecast accuracy of mortality and life expectancy, based on maximum forecast error measures. \end{description} \end{singlespace} \begin{center} \textbf{Supplement to ``Mortality and life expectancy forecasting for a group of populations in developed countries: A multilevel functional data method} by H. L. Shang \end{center} \vspace{.1in} \begin{center} \large Supplement A: Some theoretical properties of multilevel functional principal component decomposition \end{center} Let $R$ and $U^{j}$ be two stochastic processes defined on a compact set $\mathcal{I}$, with finite variance. The covariance functions of $R$ and $U^{j}$ are defined to be the function $\mathcal{K}: \mathcal{I}\times \mathcal{I}\rightarrow R$, such that \begin{align*} \mathcal{K}^R(w,v) &= \text{cov}\{R(w), R(v)\} = \text{E}\left\{[R(w)-\mu(w)]\otimes [R(v)-\mu(v)]\right\},\\ \mathcal{K}^{U^{j}}(w,v) &= \text{cov}\left\{U^{j}(w), U^{j}(v)\right\} = \text{E}\left\{[U^{j}(w)-\mu(w)]\otimes [U^{j}(v)-\mu(v)]\right\}, \end{align*} where $\otimes$ represents the tensor product and $j$ represents the index of sub-populations. In a finite dimension, the tensor product reduces to matrix multiplication. Mercer's theorem \citep[][Chapter 4]{Indritz63} provides the following consistent spectrum decomposition, \begin{align*} \mathcal{K}^R(w,v) &= \text{cov}\left\{R(w), R(v)\right\}= \sum^{\infty}_{k=1}\lambda_k \phi_k(w)\phi_k(v),\\ \mathcal{K}^{U^{j}}(w,v) &= \text{cov}\left\{U^{j}(w), U^{j}(v)\right\}= \sum^{\infty}_{l=1}\lambda^{j}_l\psi_l^{j}(w)\psi_l^{j}(v), \end{align*} \noindent where $\lambda_1\geq \lambda_2\geq \dots$ are the ordered population eigenvalues and $\phi_k(\cdot)$ is the $k^{\text{th}}$ orthonormal eigenfunction of $\mathcal{K}^{R}(\cdot,\cdot)$ in the $L^2$ norm. Similarly, $\lambda^{j}_1\geq \lambda^{j}_2\geq\dots$ are the ordered population eigenvalues and $\psi_l^{j}(\cdot)$ is the $l^{\text{th}}$ orthonormal eigenfunction of $\mathcal{K}^{U^{j}}(\cdot,\cdot)$ in the $L^2$ norm. With Mercer's lemma, stochastic processes $R$ and $U^{j}$ can be expressed by the Karhunen-Lo\`{e}ve expansion \citep{Karhunen46, Loeve46}. In practice, we reduce the dimensionality of functional data by truncating the infinite series to finite dimension, such as the first $K$ number of principal components \citep*{YMW05, HH06,Hossein13}. These can be expressed as: \begin{align*} R_t(x) &= \sum^{\infty}_{k=1}\beta_{t,k}\phi_k(x)\approx \sum^{K}_{k=1}\beta_{t,k}\phi_k(x),\\ U_t^{j}(x) &= \sum^{\infty}_{l=1}\gamma_{t,l}^{j}\psi_{l}^{j}(x)\approx \sum^{L}_{l=1}\gamma_{t,l}^{j}\psi_{l}^{j}(x), \end{align*} \noindent where $\beta_{t,k}=\int_{\mathcal{I}} R_t(x)\phi_k(x)dx$, $\gamma_{t,l}^{j}=\int_{\mathcal{I}}U_t^{j}(x)\psi_l^{j}(x)dx$ are the uncorrelated principal component scores with $\text{E}(\beta_{t,k}) = \text{E}\left(\gamma_{t,l}^{j}\right)=0$, $\text{Var}(\beta_{t,k})=\lambda_k<\infty$, $\text{Var}(\gamma_{t,l}^{j})=\lambda_l^{j}<\infty$, $K$ and $L$ represent the retained numbers of principal components, and $\mathcal{I}$ represents the domain of $x$ variable, such as $x\in [0,95+]$ in our context. \newpage \begin{center} \large Appendix B: Derivation of posterior density of principal component scores \end{center} We present derivations for the multilevel functional data model, including its specification and full conditional densities. The full conditionals are also given in \cite{DCC+09}, which provides a foundation for this work. Here, we extend it by adding an additional stochastic variance for the pre-smoothing step. This stochastic variance takes into account the varying uncertainty across observations. \[ \left\{ \begin{array}{ll} y_t^j(x_i) = f_t^j(x_i)+\delta_t^j(x_i)\epsilon_{t,i}^j \\ f_t^j(x_i) = \mu(x_i) + \eta^j(x_i) + \sum^K_{k=1}\beta_{t,k}\phi_k(x_i) + \sum^L_{l=1}\gamma_{t,l}^j\psi_l^j(x_i)+\varepsilon_t^j(x_i) \\ \beta_{t,k}\sim N\left(0,\lambda_k\right); \gamma_{t,l}^j\sim N\left(0,\lambda_l^{j}\right); \varepsilon_t^j(x_i)\sim N(0,(\sigma^2)^j); \delta_t^j(x_i) \sim N(0, (\kappa_i^2)^j) \\ \frac{1}{(\sigma^2)^j} \sim \text{Gamma}(\alpha_1,\alpha_2) \end{array} \right. \] \begin{enumerate} \item The full conditional density of inverse error variance given other parameters is \begin{align*} 1/\left(\sigma^2\right)^j\big|\text{others} \sim \text{Gamma}\left(\alpha_1^{\text{post}},\alpha_2^{\text{post}}\right), \end{align*} where \begin{align*} \alpha_1^{\text{post}} &= \alpha_1 + \frac{1}{2}Jnp \\ \alpha_2^{\text{post}} &= \alpha_2 + \frac{1}{2}\sum^J_{j=1}\sum^n_{t=1}\sum^p_{i=1}\left[\varepsilon_t^j(x_i)\right]^2 \end{align*} and \begin{equation*} \varepsilon_t^j(x_i) = f_t^j(x_i) - \mu(x_i) - \eta^j(x_i) - \sum^K_{k=1}\beta_{t,k}\phi_k(x_i) - \sum^L_{l=1}\gamma_{t,l}^j\psi_l^j(x_i), \end{equation*} where $J$ denotes the number of populations, $n$ denotes the sample size, and $p$ denotes the total number of age groups. \item The full conditional density of principal component scores for the common trend given other parameters is \begin{equation*} \beta_{t,k}\big|\text{others}\sim N\left(\mu_{\beta_{t,k}}^{\text{post}}, v_{\beta_{t,k}}^{\text{post}}\right) \end{equation*} where \begin{align*} \mu_{\beta_{t,k}}^{\text{post}} &= \frac{\lambda_k J \sum^p_{i=1}\phi_k(x_i)^2}{\lambda_k J \sum^p_{i=1}\phi_k(x_i)^2 + (\sigma^2)^j}\cdot \frac{\sum^J_{j=1}\sum^p_{i=1}\phi_k(x_i)\left[\varepsilon_t^j(x_i)+\beta_{t,k}\phi_k(x_i)\right]}{J\sum^p_{i=1}\phi_k(x_i)^2}, \\ v_{\beta_{t,k}}^{\text{post}} &= \frac{\lambda_k (\sigma^2)^j}{\lambda_k J\cdot \sum_{i=1}^p\phi_k(x_i)^2+(\sigma^2)^j}, \end{align*} where $\lambda_k$ denotes the $k$th eigenvalue of the common covariance function. \item The full conditional density of principal component scores for the population-specific residual trend given other parameters is \begin{equation*} \gamma_{t,l}^j|\text{others} \sim N\left(\mu_{\gamma_{t,l}^j}^{\text{post}}, v_{\gamma_{t,l}^j}^{\text{post}}\right), \end{equation*} where \begin{align*} \mu_{\gamma_{t,l}^j}^{\text{post}} &= \frac{\lambda_l^j\cdot \sum^{p}_{i=1}\psi_l^j(t_i)^2}{\lambda_l^j\cdot \sum_{i=1}^p\psi_l^j(x_i)^2+(\sigma^2)^j}\cdot \frac{\sum_{i=1}^p\phi_k(x_i)\left[\varepsilon_{t}^j(x_i)+\gamma_{t,l}^j\psi_l^j(x_i)\right]}{\sum_{i=1}^p\psi_l^{j}(x_i)^2}, \\ v_{\gamma_{t,l}^j}^{\text{post}}&=\frac{\lambda_l^j(\sigma^2)^j}{\lambda_l^j\cdot\sum_{i=1}^p\psi_l^j(x_i)^2+(\sigma^2)^j}, \end{align*} where $\lambda_l^j$ denotes the $l$th eigenvalue of the population-specific covariance function. \end{enumerate} Since the first step involves a nonparametric smoothing with heteroscedastic of unknown form. We can incorporate this nonparametric smoothing step in our Markov chain Monte Carlo (MCMC) iterations. For different ages or age groups, variances are unequal as shown in equation (2.4) of the main manuscript. Following the early work by \citet[][Chapter 6.4]{Koop03}, we consider a linear regression with heterscedastic errors and its Bayesian computation algorithm is documented in \citet[][pp. 127-128]{Koop03} Let $(\omega_1,\omega_2,\dots,\omega_p)=\left[1/\delta^2(x_1),1/\delta^2(x_2),\dots,1/\delta^2(x_p)\right]$ be the precision parameters for different ages. Consider the following Gamma prior for $\omega_i$: \begin{equation*} \pi(\omega_i) = f_{\text{G}}(1,v_{\omega}),\qquad i=1,2,\dots,p, \end{equation*} where the prior for $\omega_i$ depends upon a hyperparameter $v_{\omega}$ and assume that each precision $\omega_i$ comes from the same distribution, but can differ from each other in values. Each of the conditional posteriors for $\omega_i$ has the form of a Gamma density, given by \begin{align*} \pi(\omega_i|v_{\omega}, \text{others}) &= f_{\text{G}}\left(\frac{v_{\omega}+1}{\sum^n_{t=1}\left[y_t(x_i) - f_t(x_i)\right]^2+v_{\omega}}, v_{\omega}+1 \right), \\ \pi(v_{\omega}|\omega_i,\text{other}) &\propto \left(\frac{v_{\omega}}{2}\right)^{p\cdot \frac{v_{\omega}}{2}}\Gamma\left(\frac{v_{\omega}}{2}\right)^{-p}e^{-\eta \cdot v_{\omega}}, \end{align*} where $\eta = \frac{1}{v_{\omega}}+\frac{1}{2}\sum^p_{i=1}\left[\ln \left(\frac{1}{\omega_i}\right)+\omega_i\right]$, and $\Gamma(\cdot)$ denotes a Gamma function. \newpage \begin{center} \large Supplement C: WinBUGS code used for estimating variance parameters \end{center} Statistical software WinBUGS is used to estimate variances in the principal component scores and error function. From the estimated variances, the principal component scores and error function are simulated from normal distributions with zero mean. Below is a modified version of WinBUGS given by \cite{CG10}, for modeling age- and sex-specific mortality rates. \lstloadlanguages{R} \lstset{stringstyle=\rmfamily\normalsize, basicstyle=\rmfamily\normalsize, mathescape=true, escapeinside=||, autogobble} \begin{lstlisting} model { for (i in 1:N_subj) { for (t in 1:N_obs) { W_1[i,t] ~ dnorm(m_1[i,t], taueps_1) W_2[i,t] ~ dnorm(m_2[i,t], taueps_2) m_1[i,t] <- X[i,t] + U_1[i,t] m_2[i,t] <- X[i,t] + U_2[i,t] X[i,t] <- inprod(xi[i,], psi_1[t,]) U_1[i,t] <- inprod(zi[i,], psi_2[t,]) U_2[i,t] <- inprod(fi[i,], psi_3[t,]) } for(k in 1:dim_space_b) { xi[i,k] ~ dnorm(0.0, ll_b[k]) } for(l in 1:dim_space_w) { zi[i,l] ~ dnorm(0.0, ll_w[l]) } for(j in 1:dim_space_f) { fi[i,j] ~ dnorm(0.0, ll_f[j]) } } for(k in 1:dim_space_b) { ll_b[k] ~ dgamma(1.0E-3, 1.0E-3) lambda_b[k] <- 1/ll_b[k] } for(l in 1:dim_space_w) { ll_w[l] ~ dgamma(1.0E-3, 1.0E-3) lambda_w[l] <- 1/ll_w[l] } for(j in 1:dim_space_f) { ll_f[j] ~ dgamma(1.0E-3, 1.0E-3) lambda_f[j] <- 1/ll_f[j] } taueps_1 ~ dgamma(1.0E-3, 1.0E-3) taueps_2 ~ dgamma(1.0E-3, 1.0E-3) } \end{lstlisting} \noindent The definition of all variables is given below: \begin{enumerate} \item $\text{N}\_\text{subj}$ is the number of subjects (sample size) \item $\text{N}\_\text{obs}$ is the number of observations within subjects \item $\text{W}\_1$[i,t] and $\text{W}\_2$[i,t] are the functional observations at the aggregated level and sex-specific level, for subject i at time t. Both matrices $\text{W}\_1$[,] and $\text{W}\_2$[,] are $\text{N}\_\text{subj} \times \text{N}\_\text{obs}$, are loaded as data and may contain missing observations \item $\text{m}\_1$[i,t] and $\text{m}\_2$[i,t] are the smoothed means of $\text{W}\_1$[i,t] and $\text{W}\_2$[i,t], respectively, are unknown and their joint distribution is simulated \item $\text{X}$[i,t] is the mean process at the aggregated level. $\text{X}$[,] is a $\text{N}\_\text{subj}\times \text{N}\_\text{obs}$ dimensional matrix of parameters that are estimated from the model \item $\text{U}\_1$[i,t] and $\text{U}\_2$[i,t] are the sex-specific mean process at the individual level. $\text{U}\_1$[i,t] and $\text{U}\_2$[i,t] are the $\text{N}\_\text{subj} \times \text{N}\_\text{obs}$ dimensional matrices of parameters that are estimated from the model \item $\text{psi}\_1$[t,], $\text{psi}\_2$[t,], $\text{psi}\_3$[t,] are eigenfunctions at both the aggregated level and sex-specific level, evaluated at the time t. The matrices $\text{psi}\_1$, $\text{psi}\_2$, $\text{psi}\_3$ are $\text{N}\_\text{obs}\times \text{K}\_1$, $\text{N}\_\text{obs} \times \text{K}\_2$, $\text{N}\_\text{obs} \times \text{K}\_3$, where $\text{K}\_1$ is the number of retained components that explains at least 90\% of total variations in total mortality data, $\text{K}\_2$ and $\text{K}\_3$ are the number of retained components that explains at least 90\% of the remaining 10\% total variations in sex-specific data. The matrices of $\text{psi}\_1$, $\text{psi}\_2$, $\text{psi}\_3$ do not contain any missing value, and are loaded as data \item $\text{xi}$[i,k] are the scores for the subject i on the kth eigenfunction $\text{psi}\_1$[t,k] \item $\text{zi}$[i,l] are the scores for the subject i on the lth eigenfunction $\text{psi}\_2$[t,l] \item $\text{fi}$[i,j] are the scores for the subject i on the jth eigenfunction $\text{psi}\_3$[t,j] \item $\text{ll}\_{\text{b}}$[k] are the precisions for the distribution of scores $\text{xi}$[i,k] \item $\text{ll}\_{\text{w}}$[l] are the precisions for the distribution of scores $\text{zi}$[i,l] \item $\text{ll}\_{\text{f}}$[j] are the precisions for the distribution of scores $\text{fi}$[i,j] \item $\text{taueps}\_1$ is the precision of the error process due to imperfect observations of $\text{W}\_1$[i,t] around its smooth mean $\text{m}\_1$[i,t]. This is a parameter of the model that is estimated \item $\text{taueps}\_2$ is the precision of the error process due to imperfect observations of $\text{W}\_2$[i,t] around its smooth mean $\text{m}\_2$[i,t]. This is a parameter of the model that is estimated \item All precision priors are Gamma priors with mean 1 and variance 1000 \end{enumerate} \newpage \begin{center} \large Supplement D: Additional results for point and interval forecast accuracy of mortality and life expectancy \end{center} Apart from the averaged forecast error criteria, we also consider the maximum absolute forecast error (Max AFE), maximum root squared forecast error (Max RSFE), and maximum interval score for measuring the extreme errors across different ages ($x_i$) and years in the forecasting period (year $k$). Averaging across 16 countries, they are defined as \begin{align*} \text{Max AFE}(h) &= \frac{1}{16}\sum^{16}_{c=1}\max_{k,i}\left|m_k^c(x_i)-\widehat{m}_k^c(x_i)\right|, \\ \text{Max RSFE}(h) &= \frac{1}{16}\sum^{16}_{c=1}\sqrt{\max_{k,i}\left[m_k^c(x_i)-\widehat{m}_k^c(x_i)\right]^2}, \\ \text{Max interval score}(h) &= \frac{1}{16}\sum^{16}_{c=1}\max_{k,i} S_{\alpha,k}^{c}(x_l,x_u;x_i). \end{align*} Tables~\ref{tab:1} to~\ref{tab:2} present the Max AFE, Max RSFE, and Max interval score for comparing point and interval forecast accuracies of the age-specific mortality and life expectancy by method, in the case of two populations. \begin{table*}[!htbp] \centering \tabcolsep 0.26cm \caption{Point and interval forecast accuracy of mortality and life expectancy for females and males by method, as measured by the Max AFE, Max RSFE and Max interval score. For mortality, the forecast errors were multiplied by 100, in order to keep two decimal places. The minimal forecast errors are underlined for female and male data given in Section 5, whereas the minimal overall forecast error is highlighted in bold.}\label{tab:1} \begin{tabular}{@{}lrrrrrrrrr@{}}\toprule Method & \multicolumn{3}{c}{Max AFE} & \multicolumn{3}{c}{Max RSFE} & \multicolumn{3}{c}{Max interval score} \\ & F & M & $\frac{\text{F+M}}{2}$ & F & M & $\frac{\text{F+M}}{2}$ & F & M & $\frac{\text{F+M}}{2}$ \\\midrule \underline{Mortality ($\times 100$)} \\ Lee-Carter & 7.96 & 9.37 & 8.67 & 0.71 & 0.99 & 0.85 & 77.78 & 97.47 & 87.63 \\ Li-Lee & 8.05 & 8.00 & 8.03 & 0.72 & 0.75 & 0.74 & 46.89 & 40.47 & 43.68 \\ Independent FDM & \underline{7.11} & 8.05 & \textBF{7.58} & \underline{0.55} & 0.72 & 0.64 & 35.13 & 39.32 & 37.23 \\ Product-ratio & 7.52 & 7.95 & 7.74 & 0.64 & 0.69 & 0.67 & 38.20 & 43.81 & 41.01 \\ Multilevel FDM (arima) & 7.25 & 7.90 & \textBF{7.58} & 0.57 & 0.68 & \textBF{0.63} & \underline{32.06} & \underline{38.11} & \textBF{35.09} \\ Multilevel FDM (rwf) & 7.95 & \underline{7.85} & 7.90 & 0.70 & \underline{0.67} & 0.69 & 40.03 & 38.36 & 39.20 \\ \\ \underline{e(0)} \\ Lee-Carter & 2.85 & 3.77 & 3.31 & 9.19 & 16.63 & 12.91 & 15.74 & 62.29 & 39.02 \\ Li-Lee & 3.54 & 2.62 & 3.08 & 14.23 & 7.91 & 11.07 & 24.75 & 12.57 & 18.66 \\ Independent FDM & \underline{2.22} & 3.69 & 2.96 & \underline{6.34} & 17.48 & 11.91 & 12.39 & 24.61 & 18.50 \\ Product-ratio & 2.98 & 2.86 & 2.92 & 11.38 & 10.04 & 10.71 & 18.35 & 12.93 & 15.64 \\ Multilevel FDM (arima) & 2.31 & 3.01 & \textBF{2.66} & 6.66 & 11.75 & \textBF{9.21} & \underline{10.62} & 14.05 & \textBF{12.34} \\ Multilevel FDM (rwf) & 3.07 & \underline{2.45} & 2.76 & 12.02 & \underline{7.35} & 9.69 & 18.86 & \underline{9.47} & 14.17 \\\bottomrule \end{tabular} \end{table*} \begin{table}[!htbp] \centering \setlength\tabcolsep{7pt} \caption{Point and interval forecast accuracy of mortality and life expectancy across different states (described in Section 6.1) by method, as measured by the Max AFE, Max RSFE, and maximum interval score. The minimal forecast errors are underlined for each state in Section 6, whereas the minimal overall forecast error is highlighted in bold.} \begin{tabular}{@{}llrrrrrrr@{}} \toprule & & VIC & NSW & QLD & TAS & SA & WA & Mean \\ \hline Mortality & \textit{Max AFE} \\ ($\times 100$) & Independent FDM & 9.01 & 10.43 & 12.12 & 14.47 & 10.91 & 10.44 & 11.23 \\ & Product-ratio & 7.57 & 7.36 & 6.42 & 11.93 & 8.85 & 8.20 & 8.39 \\ & Multilevel FDM (arima) & 6.78 & 6.86 & 7.55 & \underline{10.99} & 8.73 & 8.18 & 8.18 \\ & Multilevel FDM (rwf) & \underline{6.13} & \underline{6.01} & \underline{6.14} & 11.03 & \underline{7.86} & \underline{7.78} & \textBF{7.49} \\ \\ & \textit{Max RSFE} \\ & Independent FDM & 0.85 & 1.13 & 1.53 & 2.16 & 1.22 & 1.10 & 1.33 \\ & Product-ratio & 0.58 & 0.55 & 0.43 & 1.56 & 0.85 & 0.69 & 0.78 \\ & Multilevel FDM (arima) & 0.47 & 0.48 & 0.59 & \underline{1.35} & 0.83 & 0.69 & 0.73 \\ & Multilevel FDM (rwf) & \underline{0.38} & \underline{0.37} & \underline{0.41} & 1.37 & \underline{0.69} & \underline{0.65} & \textBF{0.65} \\ \\ & \textit{Maximum interval score} \\ & Independent FDM & 9.71 & 7.12 & 7.59 & 10.40 & 9.00 & 7.80 & 8.60 \\ & Product-ratio & 4.17 & 4.25 & 3.87 & 3.47 & 3.69 & 3.98 & 3.90 \\ & Multilevel FDM (arima) & 4.66 & 4.11 & 3.58 & 3.51 & 2.92 & 4.29 & 3.84 \\ & Multilevel FDM (rwf) & \underline{4.08} & \underline{3.82} & \underline{3.17} & \underline{3.05} & \underline{2.45} & \underline{3.45} & \textBF{3.34} \\ \\ e(0) & \textit{Max AFE} \\ & Independent FDM & 5.04 & 4.78 & 6.06 & 5.33 & 4.80 & 5.50 & 5.25 \\ & Product-ratio & 4.13 & 4.50 & 4.07 & 3.20 & 3.75 & 4.16 & 3.97 \\ & Multilevel FDM (arima) & 3.97 & 4.38 & 4.22 & 3.97 & 3.72 & 4.08 & 4.06 \\ & Multilevel FDM (rwf) & \underline{3.94} & \underline{4.30} & \underline{3.80} & \underline{2.96} & \underline{3.58} & \underline{3.95} & \textBF{3.75} \\ \\ & \textit{Max RSFE} \\ & Independent FDM & 30.80 & 27.51 & 42.28 & 32.41 & 26.44 & 35.11 & 32.43 \\ & Product-ratio & 19.85 & 23.14 & 19.02 & 11.99 & 15.88 & 19.61 & 18.25 \\ & Multilevel FDM (arima) & 18.47 & 22.00 & 20.43 & 18.26 & 15.59 & 18.98 & 18.95 \\ & Multilevel FDM (rwf) & \underline{18.13} & \underline{21.25} & \underline{16.85} & \underline{10.45} & \underline{14.41} & \underline{17.82} & \textBF{16.48} \\ \\ & \textit{Maximum interval score} \\ & Independent FDM & 31.56 & 37.77 & 48.15 & 39.13 & 29.77 & 27.51 & 35.65 \\ & Product-ratio & 33.95 & 37.31 & 23.67 & 32.42 & 29.60 & 33.73 & 31.78 \\ & Multilevel FDM (arima) & 31.69 & 35.27 & 28.16 & 33.12 & 28.47 & 31.94 & 31.44 \\ & Multilevel FDM (rwf) & \underline{28.10} & \underline{31.34} & \underline{18.18} & \underline{25.98} & \underline{24.35} & \underline{27.93} & \textBF{25.98} \\ \bottomrule \end{tabular} \end{table} \begin{table}[!htbp] \centering \begin{small} \setlength\tabcolsep{9pt} \caption{Point and interval forecast accuracy of mortality ($\times 100$) across states and sexes (described in Section 6.2) by method, as measured by the Max AFE, Max RSFE, and maximum interval score. The minimal forecast errors are underlined for female and male data and their average, whereas the minimal overall forecast error is highlighted in bold.} \begin{tabular}{@{}llrrrrrrr@{}}\toprule Sex & Method & VIC & NSW & QLD & TAS & SA & WA & Mean \\\midrule &\multicolumn{6}{l}{\textit{Max AFE}} & \\ F & Independent FDM & 9.26 & 8.90 & 17.32 & 10.07 & 10.44 & 10.48 & 11.08 \\ & Product-ratio & 7.42 & 7.41 & \underline{7.14} & 14.52 & 8.88 & 8.14 & 8.92 \\ & Multilevel FDM (arima) & 6.45 & 6.20 & 13.94 & 7.64 & \underline{7.65} & 7.81 & 8.28 \\ & Multilevel FDM (rwf) & \underline{5.81} & \underline{5.85} & 13.63 & \underline{5.67} & \underline{7.65} & \underline{7.34} & \textBF{7.66} \\ \\ M & Independent FDM & 15.22 & 11.96 & 28.65 & 24.66 & 16.12 & 20.76 & 19.56 \\ & Product-ratio & 13.59 & 11.26 & \underline{12.67} & 27.04 & 13.78 & 19.17 & 16.25 \\ & Multilevel FDM (arima) & 14.39 & 11.54 & 27.27 & \underline{13.62} & 13.79 & 20.03 & 16.77 \\ & Multilevel FDM (rwf) & \underline{12.40} & \underline{10.22} & 27.03 & 14.49 & \underline{13.16} & \underline{18.52} & \textBF{15.97} \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 12.24 & 10.43 & 22.98 & 17.37 & 13.28 & 15.62 & 15.32 \\ & Product-ratio & 10.50 & 9.34 & \underline{9.90} & 20.78 & 11.33 & 13.66 & 12.59 \\ & Multilevel FDM (arima) & 10.42 & 8.87 & 20.61 & 10.63 & 10.72 & 13.92 & 12.52 \\ & Multilevel FDM (rwf) & \underline{9.11} & \underline{8.04} & 20.33 & \underline{10.08} & \underline{10.41} & \underline{12.93} & \textBF{11.82} \\ \\ & \multicolumn{6}{l}{\textit{Max RSFE}} & \\ F & Independent FDM & 0.89 & 0.85 & 3.09 & 1.04 & 1.10 & 1.12 & 1.35 \\ & Product-ratio & 0.56 & 0.56 & \underline{0.53} & 2.27 & 0.82 & 0.70 & 0.91 \\ & Multilevel FDM (arima) & 0.42 & 0.40 & 2.18 & 0.61 & \underline{0.64} & 0.65 & 0.82 \\ & Multilevel FDM (rwf) & \underline{0.35} & \underline{0.37} & 2.10 & \underline{0.35} & \underline{0.64} & \underline{0.59} & \textBF{0.73} \\ \\ M & Independent FDM & 2.36 & 1.51 & 9.92 & 6.76 & 2.66 & 4.47 & 4.61 \\ & Product-ratio & 1.87 & 1.30 & \underline{1.78} & 9.67 & 2.06 & 3.86 & 3.42 \\ & Multilevel FDM (arima) & 2.11 & 1.38 & 9.67 & \underline{1.95} & 2.02 & 4.16 & 3.55 \\ & Multilevel FDM (rwf) & \underline{1.57} & \underline{1.09} & 9.89 & 2.36 & \underline{1.89} & \underline{3.66} & \textBF{3.41} \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 1.62 &1.18 & 6.50 & 3.90 & 1.88 & 2.80 & 2.98 \\ & Product-ratio & 1.22 & 0.93 & \underline{1.16} & 5.97 & 1.44 & 2.28 & 2.17 \\ & Multilevel FDM (arima) & 1.26 & 0.89 & 5.92 & \underline{1.28} & 1.33 & 2.41 & 2.19 \\ & Multilevel FDM (rwf) & \underline{0.96} & \underline{0.73} & 6.00 & 1.36 & \underline{1.26} & \underline{2.12} & \textBF{2.07} \\ \\ & \multicolumn{6}{l}{\textit{Maximum interval score}} \\ F & Independent FDM & 9.75 & 4.33 & 7.76 & 8.19 & 6.29 & 7.15 & 7.24 \\ & Product-ratio & 4.15 & 4.20 & 4.48 & 3.50 & 3.70 & 3.76 & 3.97 \\ & Multilevel FDM (arima) & 3.33 & 3.30 & 3.88 & 3.19 & 2.95 & 2.98 & 3.27 \\ & Multilevel FDM (rwf) & \underline{2.99} & \underline{2.98} & \underline{3.72} & \underline{2.53} & \underline{2.85} & \underline{2.87} & \textBF{2.99} \\ \\ M & Independent FDM & 11.45 & 8.21 & 10.76 & 11.70 & 9.82 & 10.70 & 10.44 \\ & Product-ratio & \underline{4.71} & \underline{4.50} & 6.10 & 3.98 & \underline{4.62} & \underline{5.35} & \textBF{4.88} \\ & Multilevel FDM (arima) & 10.45 & 10.15 & 10.58 & 8.60 & 8.98 & 11.00 & 9.96 \\ & Multilevel FDM (rwf) & 6.84 & \underline{4.50} & \underline{4.68} & \underline{3.81} & 6.30 & 7.43 & 5.59 \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 10.60 & 6.27 & 9.26 & 9.95 & 8.06 & 8.92 & 8.84 \\ & Product-ratio & \underline{4.42} & 4.35 & 5.29 & 3.74 & \underline{4.16} & \underline{4.56} & 4.42 \\ & Multilevel FDM (arima) & 6.89 & 6.72 & 7.23 & 5.90 & 5.96 & 6.99 & 6.62 \\ & Multilevel FDM (rwf) & 4.92 & \underline{3.74} & \underline{4.20} & \underline{3.17} & 4.58 & 5.15 & \textBF{4.29} \\ \bottomrule \end{tabular} \end{small} \end{table} \begin{table}[!htbp] \begin{small} \centering \setlength\tabcolsep{11pt} \caption{Point and interval forecast accuracy of life expectancy across states and sexes (described in Section 6.2) by method, as measured by the Max AFE, Max RSFE, and maximum interval score. The minimal forecast errors are underlined for female and male data and their average, whereas the minimal overall forecast error is highlighted in bold.}\label{tab:2} \begin{tabular}{@{}llrrrrrrr@{}}\toprule Sex & Method & VIC & NSW & QLD & TAS & SA & WA & Mean \\\midrule &\multicolumn{6}{l}{\textit{Max AFE}} & \\ F & Independent FDM & 5.16 & \underline{3.28} & 5.82 & 5.44 & 4.64 & 5.51 & 4.97 \\ & Product-ratio & 4.13 & 4.46 & 4.06 & 3.63 & 3.93 & 4.03 & 4.04 \\ & Multilevel FDM (arima) & \underline{3.12} & \underline{3.28} & \underline{2.73} & \underline{3.23} & \underline{2.72} & \underline{3.01} & \textBF{3.02} \\ & Multilevel FDM (rwf) & 4.98 & 5.34 & 3.98 & 4.83 & 4.56 & 5.06 & 4.79 \\ \\ M & Independent FDM & 5.56 & 5.24 & 6.34 & 6.38 & 5.65 & 6.18 & 5.89 \\ & Product-ratio & 3.96 & 4.36 & 3.89 & 3.21 & 3.55 & 4.02 & 3.83 \\ & Multilevel FDM (arima) & 5.11 & 5.41 & 5.40 & 5.26 & 4.66 & 5.30 & 5.19 \\ & Multilevel FDM (rwf) & \underline{3.18} & \underline{3.45} & \underline{2.57} & \underline{3.01} & \underline{2.94} & \underline{3.03} & \textBF{3.03} \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 5.36 & 4.26 & 6.08 & 5.91 & 5.14 & 5.84 & 5.43\\ & Product-ratio & \underline{4.04} & 4.41 & 3.97 & \underline{3.42} & \underline{3.74} & \underline{4.03} & 3.94 \\ & Multilevel FDM (arima) & 4.12 & 4.34 & 4.07 & 4.25 & 3.69 & 4.15 & 4.11 \\ & Multilevel FDM (rwf) & 4.08 & \underline{4.39} & \underline{3.27} & 3.92 & 3.75 & 4.04 & \textBF{3.91} \\ \\ &\multicolumn{6}{l}{\textit{Max RSFE}} & \\ F & Independent FDM & 30.75 & \underline{11.86} & 36.29 & 33.57 & 23.94 & 33.93 & 28.39 \\ & Product-ratio & 19.04 & 22.00 & 18.15 & 14.21 & 16.51 & 17.77 & 17.95 \\ & Multilevel FDM (arima) & \underline{10.72} & 11.87 & \underline{7.78} & \underline{11.26} & \underline{7.78} & \underline{9.74} & \textBF{9.86} \\ & Multilevel FDM (rwf) & 29.88 & 34.01 & 19.49 & 28.14 & 24.54 & 29.94 & 27.67 \\ \\ M & Independent FDM & 37.78 & 33.52 & 44.37 & 47.57 & 37.09 & 44.34 & 40.78 \\ & Product-ratio & 19.30 & 22.58 & 17.90 & 11.76 & 14.98 & 19.17 & 17.61 \\ & Multilevel FDM (arima) & 31.55 & 34.65 & 34.52 & 32.76 & 25.62 & 32.61 & 31.95 \\ & Multilevel FDM (rwf) & \underline{11.16} & \underline{13.03} & \underline{7.07} & \underline{9.89} & \underline{9.08} & \underline{9.91} & \textBF{10.02} \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 34.27 & 22.69 & 40.33 & 40.57 & 30.52 & 39.14 & 34.59 \\ & Product-ratio & \underline{19.17} & \underline{22.29} & 18.02 & \underline{12.98} & \underline{15.75} & \underline{18.47} & \textBF{17.78} \\ & Multilevel FDM (arima) & 21.14 & 23.26 & 21.15 & 22.01 & 16.70 & 21.18 & 20.91 \\ & Multilevel FDM (rwf) & 20.52 & 23.52 & \underline{13.28} & 19.02 & 16.81 & 19.93 & 18.84 \\ \\ &\multicolumn{6}{l}{\textit{Maximum interval score}} & \\ F & Independent FDM & 17.59 & 25.84 & 50.67 & 27.77 & 16.03 & 25.19 & 27.18 \\ & Product-ratio & 32.12 & 35.33 & 26.88 & 31.40 & 29.39 & 31.15 & 31.04 \\ & Multilevel FDM (arima) & 17.63 & 18.90 & 14.29 & 17.62 & 14.03 & 14.77 & 16.20 \\ & Multilevel FDM (rwf) & \underline{15.04} & \underline{17.22} & \underline{9.69} & \underline{12.82} & \underline{12.64} &\underline{13.19} & \textBF{13.43} \\ \\ M & Independent FDM & 43.97 & 47.23 & 61.70 & 51.64 & 43.99 & 49.21 & 49.62 \\ & Product-ratio & \underline{29.89} & \underline{33.59} & \underline{19.73} & \underline{27.43} & \underline{25.54} & \underline{30.54} & \textBF{27.79} \\ & Multilevel FDM (arima) & 44.50 & 46.50 & 42.08 & 44.72 & 40.85 & 45.26 & 43.98 \\ & Multilevel FDM (rwf) & 38.28 & 41.93 & 27.04 & 35.80 & 34.05 & 38.96 & 36.01 \\ \\ $\frac{\text{F}+\text{M}}{2}$ & Independent FDM & 30.78 & 36.53 & 56.19 & 39.71 & 30.01 & 37.20 & 38.40 \\ & Product-ratio & 31.00 & 34.46 & 23.30 & 29.41 & 27.46 & 30.85 & 29.41 \\ & Multilevel FDM (arima) & 31.06 & 32.70 & 28.19 & 31.17 & 27.44 & 30.01 & 30.09 \\ & Multilevel FDM (rwf) & \underline{26.66} & \underline{29.58} & \underline{18.36} & \underline{24.31} & \underline{23.35} & \underline{26.08} & \textBF{24.72} \\ \bottomrule \end{tabular} \end{small} \end{table} \newpage \bibliographystyle{ims}
{'timestamp': '2016-06-17T02:06:46', 'yymm': '1606', 'arxiv_id': '1606.05067', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05067'}
arxiv
\section{Introduction} Currently, most of the energy produced worldwide uses coal or natural gas. However, much of this energy is wasted. In the United States of America, approximately 58\% of energy produced is wasted \cite{batt_2013}. Furthermore, 40\% of this wasted energy is due to industrial and residential buildings. By reducing energy wastage in the electric power industry, we reduce damage to the environment and reduce the dependence on fossil fuels. Short-term load forecasting (STLF) (i.e., one hour to a few weeks) can assist since, by predicting load, one can do more precise planning, supply estimation and price determination. This leads to decreased operating costs, increased profits and a more reliable electricity supply for the customer. Over the past decades of research in STLF there have been numerous models proposed to solve this problem. These models have been classified into classical approaches like moving average \cite{Andrade_09} and regression models \cite{Hong_11}, as well as machine learning based techniques, regression trees \cite{Mori_01}, support vector machines \cite{Niu2006} and Artificial Neural Networks \cite{Lee_92}. In recent years, many deep learning methods have been shown to achieve state-of-the-art performance in various areas such as speech recognition \cite{Hinton_12}, computer vision \cite{Krizhevsky_2012} and natural language processing \cite{Collobert_2008}. This promise has not been demonstrated in other areas of computer science due to a lack of thorough research. Deep learning methods are representation-learning methods with multiple levels of representation obtained by composing simple but non-linear modules that each transform the representation at one level (starting with the raw input) into a representation at a higher, slightly more abstract level \cite{LeCun_15}. With the composition of enough such transformations, very complex functions can be learned. In this paper, we compare deep learning and traditional methods when applied to our STLF problem and we also provide a comprehensive analysis of numerous deep learning models. We then show how these methods can be used to assist in the pricing of electricity which can lead to less energy wastage. To the best of our knowledge, there is little work in such comparisons for power usage in an electrical grid. The data we use is based on one year of smart meter data collected from residential customers. We apply each of the deep and traditional algorithms to the collected data while also noting the corresponding computational runtimes. Due to differences in electricity usage between the week and the weekend, we then split the data into two new datasets: weekends and weekly data. The algorithms are applied to these new datasets and the results are analyzed. The results show that the deep architectures are superior to the traditional methods by having the lowest error rate, but they do have the longest run-time. Due to space limitations we do not provide details of the traditional approaches but do provide references. \section{Analysis} \subsection{Data Description} Our dataset consists of 8592 samples of 18 features that were collected from several households. The dataset was broken into 3 parts for training, validation and testing of sizes 65\%, 15\%, 20\% respectively. The readings were recorded at hourly intervals throughout the year. Some of the features were electrical load readings for the previous hour, the previous two hours, the previous three hours, the previous day same hour, the previous day previous hour, the previous day previous two hours, the previous 2 days same hour, the previous 2 days previous hour, the previous 2 days previous two hours, the previous week same hour, the average of the past 24 hours and the average of the past 7 days. The rest of the features (which do not contain electrical load readings) are the day of the week, hour of the day, if it is a weekend, if it is a holiday, temperature and humidity. These features were selected as they are typically used for STLF. In addition, the total electrical load does not change significantly throughout the year since the households are located in a tropical country where the temperature remains fairly constant throughout the year. \begin{table}[!t] \caption{Baseline algorithms} \label{tab:1} \centering \begin{tabular}{rrrr} \toprule Algorithm & MAPE & MPE & Time (s)\\ \midrule WMA & 9.51 & -1.96 & 100\\ MLR & 24.25 & -1.47 & 1\\ MQR & 12.91 & -7.63& 7\\ RT & \textbf{7.23}& -1.71& 15\\ SVR & 13.65 & \text{ }3.16 &19\\ \bottomrule \end{tabular} \end{table} \subsection{Comparison Method} As a preprocessing step, the data is cleaned and scaled to zero mean and unit variance. All traditional methods use cross-validation to determine appropriate values for the hyper-parameters. A random grid search was used to determine the hyper-parameters for the deep learning methods. Several baseline algorithms were chosen. They include the Weighted Moving Average (WMA) where $y_{t+1} = \alpha y_{i} + \beta y_{i-167}$ with $\alpha = 0.05$ and $\beta = 0.95$, Multiple Linear Regression (MLR) and quadratic regression (MQR), Regression Tree (RT) with the minimum number of branch nodes being 8, Support Vector Regression (SVR) with a linear kernel and Multilayer Perception (MLP), with the number of hidden neurons being 100. For our Deep Neural Network methods we used Deep Neural Network without pretraining (DNN-W), DNN with pretraining using Stacked Autoencoders (DNN-SA) \cite{Hoo_11}, Recurrent Neural Networks (RNN) \cite{Hermans_2013}, RNNs and Long Short Term Memory (RRN-LSTM) \cite{Gers2001}, Convolutional Neural Networks (CNN) \cite{Siripurapu_15} and CNNs and Long Short Term Memory (CNN-LSTM)] \cite{Sainath_15} To evaluate the goodness of fit of these algorithms we use the Mean Absolute Percentage Error (MAPE) defined as: \begin{equation} \text{MAPE} = \frac{100}{n} \sum_{t=1}^{n} \frac{|y_t - \widehat{y}_t|}{y_t} \end{equation} where $n$ is the number of data points, $t$ is the particular time step, $y_t$ is the target or actual value and $\widehat{y}_t$ is the predicted value. In order to determine the cost of the prediction errors (i.e. whether the prediction is above or below the actual value) the Mean Percentage Error (MPE) is used, which is defined as: \begin{equation} \text{MPE} = \frac{100}{n} \sum_{t=1}^{n} \frac{y_t - \widehat{y}_t}{y_t} \end{equation} \subsection{Numerical Results} \begin{table}[!t] \caption{DNN algorithms (subscript denotes number of layers)} \label{tab:2} \centering \footnotesize\setlength{\tabcolsep}{3pt} \begin{tabular}{rrrrrrr} \toprule Algorithm & \multicolumn{3}{c}{200 Epocs} &\multicolumn{3}{c}{400 Epocs}\\ \cmidrule(l){2-7} & \text{MAPE} & \text{MPE} & \text{Time(s)} & \text{MAPE} & \text{MPE} & \text{Time(s)}\\ \midrule MLP & 5.62 & -5.62 & 14 & 4.55 & -4.54 & 25\\ $\text{DNN-W}_3$ & \textbf{2.64} &\text{ }1.61 & 30 & \text{ }2.50 & 1.98 & 56\\ $\text{DNN-W}_4$ & 5.71 & -5.36 & 37 & 5.48 & -5.32 & 72\\ $\text{DNN-W}_5$ & 4.40 & \text{ }1.79 & 38 & 5.98 & 5.45 & 69\\ $\text{DNN-SA}_3$ & 2.97 & \text{ }1.23 & 23 & 2.01 & \text{ }0.74 & 25\\ $\text{DNN-SA}_4$ & 2.88 & \text{ }0.23 & 29 & 2.37 & \text{ }0.79 & 42\\ $\text{DNN-SA}_5$ & 2.92 & \text{ }0.91 & 37 & \textbf{1.84} & \text{ }0.53 & 49\\ RNN & 5.23 & \text{ }0.89 & 174 & 5.13 & -0.37 & 359\\ RNN-LSTM & 5.36 & -1.26 & 880 & 5.27 & -1.17 & 1528\\ CNN-LSTM & 5.74 & -3.85 & 1029 & 6.43 & -5.96 & 1912\\ CNN & 3.15 & -3.53 & 799 & 4.60 & \text{ }4.23 & 1188\\ \bottomrule \end{tabular} \end{table} We first look at the baseline methods, (with the exception of MLP) in Table \ref{tab:1}. From the table we see that MLR performs the worst, with a MAPE of 24.25\%, which would indicate that the problem is not linear (see Figure \ref{fig:week_and_weekend}). However, the RT algorithm outperforms the rest of the methods by a noticeable margin. This shows that the problem can be split into some discrete segments which would accurately forecast the load. This can be confirmed by looking at the load in Figure \ref{fig:week_and_weekend} where it is clear that, depending on the time of day, there is significant overlap of the value of the load between days. Thus, having a node in the RT determining the time of the day would significantly improve accuracy. The run-time for these algorithms was quite short with WMA taking the longest due to the cross-validation step where we determined all possible coefficients in steps of 0.05. Due to the typically long running time of DNN architectures, the algorithms were restricted to 200 and 400 epocs. From Table \ref{tab:2}, there is a clear difference when looking at the 200 epocs and the 400 epocs MAPE columns, as most of the algorithms have a lower MAPE after running for 400 epocs when compared with 200 epocs. This is especially true for the $\text{DNN-SA}_3$ which saw significant drops in the MAPE. The MLP did not perform the worst in both epocs but it was always in the lower half of accuracy. This indicates that the shallow network might not be finding the patterns or structure of the data as quickly as the DNN architectures. However, it outperformed RT in both the 200 and 400 epocs. This alludes to the fact that the hidden layer is helping to capture some of the underlying dynamics that a RT cannot. \begin{table}[!t] \caption{Daily MAPE Values} \label{tab:3} \centering \footnotesize\setlength{\tabcolsep}{3pt} \begin{tabular}{rrrrrrrr} \toprule Algorithm & Sun & Mon & Tue & Wed & Thu & Fri& Sat\\ \midrule WMA & 5.71 & 10.05 & 8.87 & 10.24 & 10.74 & 10.37 & 10.67\\ MLR & 65.46 & 27.61 & 12.55 & 11.39 & 9.01 & 9.38 & 35.59\\ MQR & 1.17 & 11.92 & 9.88 & 14.24 & 14.11 & 17.11 & 13.24\\ RT & 7.45 & 5.99 & 7.63 & 7.37 & 5.98 & 7.26 & 8.87\\ SVR & 20.70 & 12.96 & 10.73 & 11.53 & 11.63 & 10.90 & 17.40\\ MLP & 5.18 & 4.62 & 4.43 & 4.27 & 4.31 & 4.70 & 4.34\\ $\text{DNN-W}_3$ & 2.95 & 1.88 & 2.12 & 2.49 & 2.54 & 2.46 & 3.12\\ $\text{DNN-W}_4$ & 6.67 & 5.45 & 5.25 & 4.88& 4.61 & 5.65 &5.83\\ $\text{DNN-W}_5$ & 7.23 &5.53 & 5.56 & 6.14 & 6.13 & 5.81 & 5.48\\ $\text{DNN-SA}_3$ & 2.29 & 1.84 & 1.76 &1.97& 1.87 & 2.03 & 2.35\\ $\text{DNN-SA}_4$ & 2.67 & 2.19 & 2.00 & 2.14 & 2.27 & 2.55 & 2.82\\ $\text{DNN-SA}_5$ & 2.28 & 1.47 & 1.63 & 1.93 & 1.60 & 1.76 & 2.22\\ RNN & 5.38 & 5.30 & 4.41 & 5.14 & 5.11 & 5.35 & 5.45\\ RNN-LSTM & 4.25 & 4.34 & 4.96 & 4.55 & 5.64 & 6.97 & 6.13\\ CNN-LSTM & 7.79 & 6.86 & 6.04 & 6.05 & 5.65 & 6.44 & 6.21\\ CNN & 6.39 & 4.20 & 4.27 & 3.32 & 3.87 & 4.18 & 5.03\\ \bottomrule \end{tabular} \end{table} Looking at the 200 epocs column, we see that $\text{DNN-W}_3$ performs the best with a MAPE of 2.64\%. On the other hand, the most stable architecture is the DNN-SA with a MAPE consistently less than 3\%. This robustness is shown when the epocs are increased to 400 where the DNN-SA architecture outperforms all the other methods (both the baseline and deep methods). The pretraining certainly gave these methods a boost over the other methods as it guides the learning towards basins of attraction of minima that support better generalization from the training data set \cite{Erhan_2010}. RNNs, and to an extent LSTM, have an internal state which gives it the ability to exhibit dynamic temporal behavior. However, they require a much longer time to compute which is evident in Table \ref{tab:2} since these methods had trouble mapping those underlying dynamics of the data in such a small number of epocs. CNNs do not maintain internal state, however with load forecasting data, one can expect a fair amount of auto-correlation that requires memory. This could explain their somewhat low but unstable MAPE for 200 and 400 epocs. Taking both tables into consideration, most of the DNN architectures vastly outperform the traditional approaches, but DNNs require significantly more time to run and thus there is a trade-off. For STLF, which is a very dynamic environment, one cannot wait for a new model to complete its training stage. Hence, this is another reason we limited the number of epocs to 200 and 400. Table \ref{tab:2} shows that limiting the epocs did not adversely affect many of the DNN architectures as most were able to surpass the accuracy of the traditional methods (some by a lot). When selecting a model, one would have to determine if the length of time to run the model is worth the trade-off between accuracy and runtime. \subsection{Daily Analysis} We know that people have different electrical usage patterns on weekdays when compared to weekends. This difference can be seen in Figure \ref{fig:week_and_weekend} which illustrates usage for a sample home. This household uses more energy during the weekdays than on weekends. There are electrical profiles that may be opposite, i.e., where the weekend electrical load is more. Whatever the scenario, there are usually different profiles for weekdays and weekends. \begin{figure}[!t] \subfloat[Weekday Electrical Usage]{\includegraphics[width=\columnwidth]{usage_week.jpg} \label{fig:week}} \\ \subfloat[Weekend Electrical Usage]{\includegraphics[width=\columnwidth]{weekend_usage.jpg} \label{fig:weekend}} \caption{Electrical Profiles} \label{fig:week_and_weekend} \end{figure} To see how our models handle weekdays and weekends, we calculated the average MAPE for each day of the week in the test set (the 400 epoc models was used for the DNNs calculations). The average for each day of the week is tabulated in Table \ref{tab:3}. From the table, it is clear that most of the DNN algorithms have their lowest MAPE during the week. This is indicative that the patterns for weekdays are similar and as a result have more data. By having more data, DNNs are better able to capture the underlying structure of the data and thus are able to predict the electrical load with greater accuracy. Weekend predictions have a higher MAPE since DNNs require a lot of data to perform accurate predictions and for weekends this data is limited. The WMA and MQR seem to have their best day on Sunday, but have a very poor MAPE for the rest of the days. This indicates that the models have an internal bias towards Sunday and as a result fail to accurately predict the values for other days. It is clear, again, that DNNs outperform the traditional methods. \subsection{Mean Percentage Error} In this particular domain, an electricity provider will also be interested in changes of electrical load, as opposed to absolute error, in order to adjust generation accordingly, mostly because starting up additional plants takes time. This is why the Mean Percentage Error (MPE) was used. The MPE would tell that a model with a positive value "under-predicts" the load while a negative value "over-predicts" the actual value and they can then adjust their operations accordingly. Many of the traditional methods had predicted more electrical load than the actual load, including MLP. However, most of the DNNs have under-predicted the load value. Looking at the best in Table \ref{tab:2}, DNN-SAs MPE values (for 400 epocs), they are all under 1\% and positive, which indicates that it under-predicts the value. However, one should not use the MPE alone. An example is RNNs which have a low positive MPE, however it's MAPE in both epocs is around 5\%. This indicates that RNN had a slightly larger sum of values that "under-predicts" than "over-predicts", but its overall accuracy is not as good as other deep architectures. \subsection{Applications to Energy Efficiency} Using the results from STLF (MAPE and MPE), a company can now accurately predict upcoming load. This would mean that a power generating company can now produce energy at a much more precise amount rather than producing excess energy that would be wasted. Since most of these companies use fossil fuels which are non-renewable sources of energy, we would be conserving them as well as reducing levels of carbon dioxide released into the atmosphere and the toxic byproducts of fossil fuels. Another benefit of accurate load forecasting is that of dynamic pricing. Many residential customers pay a fixed rate per kilowatt. Dynamic pricing is an approach that allows the cost of electricity to be based on how expensive this electricity is to produce at a given time. The production cost is based on many factors, which in this paper, is characterized by the algorithms for STLF. By having a precise forecast of electrical load, companies now have the ability to determine trends, especially at peak times. An example of this would be in the summer months when many people may want to turn on their air conditioners and thus electricity now becomes expensive to produce as the company could have to start up additional power generating plants to account for this load. If the algorithms predict that there would be this increase in electrical load around the summer months, this would be reflected in the higher price that consumers would need to pay. As a result, most people would not want to keep their air conditioner on all the time (as per usual) but use it only when necessary. Taking this example and adding on washing machines, lights and other appliances, we can see the immense decrease in energy that can be achieved on the consumer side. \section{Related Work} The area of short-term load forecasting (STLF) has been studied for many decades but deep learning has only recently seen a surge of research into its applications. Significant research has been focused on Recurrent Neural Networks (RNNs). In the thesis by \cite{mishra_08}, RNNs was used to compare other methods for STLF. These methods included modifications of MLP by training with algorithms like Particle Swarm Optimization, Genetic Algorithms and Artificial Immune Systems. Two other notable papers that attempt to apply DNN for STLF are \cite{Busseti_12} and \cite{Connor_92}. In \cite{Busseti_12}, they compare Deep Feedfoward Neural Networks, RNNs and kernelized regression. In the paper by \cite{Connor_92} a RNN is used for forecasting loads and the result is compared to a Feedfoward Neural Network. However, a thorough comparison of various DNN architectures is lacking and any applications to dynamic pricing or energy efficiency is absent. \section{Conclusion} In this paper, we focused on energy wastage in the electrical grid. To achieve this, we first needed to have an accurate algorithm for STLF. With the advent of many deep learning algorithms, we compared the accuracy of a number of deep learning methods and traditional methods. The results indicate that most DNN architectures achieve greater accuracy than traditional methods even when the data is split into weekdays and weekends. However such algorithms have longer runtimes. We also discussed how these algorithms can have a significant impact in conserving energy at both the producer and consumer levels.
{'timestamp': '2016-06-17T02:03:55', 'yymm': '1606', 'arxiv_id': '1606.05018', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05018'}
arxiv
\section{Conclusions}\label{Sec:Conclusions} In this work, we provided a general communication-theoretic point of view on the benefits of combining \gls{amc} and \gls{harq} in point-to-point transmissions. Using the throughput as a comparison criterion, the main conclusions are the following: i)~in slow-fading channels, the throughput increases thanks to \gls{harq} but the improvements are very moderate, especially when \gls{amc} ignores the presences of \gls{harq}, ii)~in fast-fading channels, \gls{harq} is beneficial only in low \gls{snr}s and is counterproductive in high \gls{snr}s, irrespectively of the adaptation efforts of \gls{amc}. Then, since \gls{harq} provides very small (if any) throughput gains, the error-free operation may be taken in charge by the upper layer (\gls{llc}). Following the identified sources of deficiencies of \gls{harq} used on top of \gls{amc}, we also proposed a simple modification to the \gls{harq} protocol, which terminates the \gls{harq} cycle on the basis of the observed \gls{mcs}. This modification can be implemented without any additional signaling or change at \gls{phy}, and removes the observed throughput penalty in fast fading channels. We pursued the idea of a closer interaction between \gls{phy} and \gls{harq}, and evaluated the possibility of using packet dropping (\gls{pdharq}) which provide a simply remedy to the throughput penalty. At the cost of more complicated implementation, the variable-length coding (\gls{vlharq}) leads to a moderate---yet notable---improvement of the throughput in the region of high \gls{snr}. The conclusions and observations we make hold for delay-insensitive applications, and do not take into account the overhead necessary to retransmit the packet at the \gls{llc}. Thus, a more realistic evaluation should differentiate between the cost of \gls{phy} and \gls{llc} transmissions. Other important challenges would be to evaluate the performance of \gls{harq} and \gls{amc} in the interference-limited scenario or for a delay-sensitive traffic. \balance \bibliographystyle{IEEEtran} \section{AMC}\label{Sec:AMC} The throughput is a the long-term average number of correctly received bits per transmitted symbol. Since the errors in the \gls{amc} are block-wise memoryless, the throughput is unaffected by the fading type (slow or fast) and we can take expectation for each block \begin{align \eta^\tnr{amc} &\triangleq \Ex_{\SNRrv}\Big[\R_{\hat{l}}\big(1-\PER_{\hat{l}}(\SNRrv)\big)\Big]\label{eta.amc.2} \\ &=\sum_{l=1}^L \int_{\SNR\in\mc{D}_{l}}\pdf_{\SNRrv}(x) \eta_l(x) \dd x, \end{align} where we used \eqref{hat.l} to obtain \eqref{eta.amc.2}, with \begin{align}\label{eta.l.amc} \eta_l(\SNR)\triangleq\R_l(1-\PER_l(\SNR)) \end{align} being the ``instantaneous'' throughput defined for an \gls{snr}, $\SNR$. The optimal \gls{snr} decision region is hence given by \begin{align}\label{mcD.l} \mc{D}^{\tnr{amc}}_l=\set{\SNR: \eta_l(\SNR) \ge \eta_k(\SNR), \quad \forall k\neq l}. \end{align} \begin{proposition}\label{Prop:Intersection} If the \gls{per} function is defined by \eqref{PER.SNR}, the optimal decision regions are intervals $\mc{D}^{\tnr{amc}}_l=[\gamma_l, \gamma_{l+1})$. \begin{proof} It is enough to show that there exists $\SNR_\tnr{o}\ge\SNR_{\tr{th},l+1}$ such that $\eta_{l+1}(\SNR)<\eta_{l}(\SNR)$ for $\SNR\leq\SNR_\tnr{o}$, and $\eta'_{l+1}(\SNR)>\eta'_{l}(\SNR)$ for $\SNR\geq\SNR_\tnr{o}$. Then, it can be easily shown with basic algebra that there is only one value of $\SNR$ solving $\eta_{l+1}(\SNR)=\eta_{l}(\SNR)$. \end{proof} \end{proposition} Indeed, in most of the practically interesting cases, the decision regions of \gls{amc} are intervals \cite{Alouini00} with boundaries $\gamma_l$ defined by the intersection of $\eta_l(\SNR)$ and $\eta_{l-1}(\SNR)$ \begin{align}\label{kkt.eta} &R_l\big(1-\PER_l(\gamma_l ) \big) =R_{l-1}\big(1-\PER_{l-1}(\gamma_l ) \big), \end{align} where also, for notational convenience, we use $\gamma_0\triangleq0$ and $\gamma_{L+1}=\infty$. This expression may be further simplified assuming that the probability of decoding error when transmitting with rate $R_{l-1}$ is very small at the right border of $\mc{D}^{\tnr{amc}}_{l-1}$.\footnote{It is, indeed, the case if $\gamma_{l-1}\ll\gamma_l$ and the \gls{per} function decays quickly with $\SNR$ as per \eqref{PER.SNR}.} Then, \eqref{kkt.eta} becomes \begin{align}\label{WEP.R.R} \PER_{l} (\gamma_l)\approx 1-\frac{R_{l-1}}{R_l}, \quad l=2,\ldots,L. \end{align} Here, we see that if $R_l$ is much larger than $R_{l-1}$, the nominal error rate at the interval border $\gamma_l$ may be quite high. For example, if $R_{l-1}=1$ and $R_{l}=2$, we obtain $\PER_{l} (\gamma_l)=0.5$. This result may be contrasted with the ``hard'' limits imposed on the \gls{per}, $\PER_{l} (\gamma_l)=\PER_\tnr{t}$, suggested in~\cite{Liu04} and specified by the \gls{lte} as $\PER_\tnr{t}=10^{-1}$ \cite{3GPP_TS_36.213}. Finally, we express the throughput compactly as follows: \begin{align}\label{eta.amc} \eta^\tnr{amc}&=\sum_{l=1}^L R_l \cdot (1-f_{1,l})p_l, \end{align} where \begin{align}\label{} f_{1,l}&\triangleq \frac{1}{p_{l}}\int_{\gamma_l}^{\gamma_{l+1}} \pdf_{\SNRrv}(x) \PER_l(x) \dd x,\quad \label{p.l} p_{l}\triangleq \int_{\gamma_l}^{\gamma_{l+1}} \pdf_{\SNRrv}(x) \dd x. \end{align} Using \eqref{WEP.R.R} in \eqref{Delta.epsilon}, we can calculate the border of the decision region as \begin{align} \label{gamma.l.Delta} \gamma_l &=\SNR_{\tnr{th},l}\Big(1+ \frac{1}{\tilde{a}}\ln \frac{R_l}{\R_l-\R_{l-1}}\Big). \end{align} Therefore, not surprisingly, an increased strength of the coding (large $\tilde{a}$) moves the borders of the decision region closer to the decoding threshold, while a weak coding will result in larger $\gamma_l$; this, via \eqref{p.l}, will also move the throughput curve to the regions of higher \gls{snr}. \subsection{Discussion} We note that, according to the observations in \secref{Sec:LLC}, the above results hold also when \gls{arq} is used on top of the \gls{amc}. Since a similar setup is considered in \cite{Liu04}, it is instructive to contrast both results. The main difference is that, according to our results, the throughput-optimal intervals defined by $\gamma_l$ do not change with $M$ the number of \gls{arq} rounds. This is exactly the strength of the throughput criterion which does not change when \gls{arq} is added on top of a particular \gls{phy} transmission strategy. On the other hand, \cite{Liu04} imposed limits on the packet loss $P_{\tnr{loss}}$, and the \gls{snr} thresholds $\check{\gamma}_l$ were adjusted by solving the equation $[\PER_l(\check{\gamma}_l)]^M=P_{\tnr{loss}}$, or \begin{align}\label{gamma.check} \PER_l(\check{\gamma}_l)=P_{\tnr{t}}, \end{align} where $P_\tnr{t}=P^{1/M}_\tnr{loss}$ is the target \gls{per} at each interval boundary $\check{\gamma}_l$. Hence, for a small $P_\tnr{loss}$, with a growing $M$ it is possible to increase $P_\tnr{t}$ and then $\check{\gamma}_l$ decreases approaching the throughput-optimal value $\gamma_l$; this effect was also observed in \cite{Liu04}. However, a caution is required because $\check{\gamma}_l$ should never be smaller than $\gamma_l$, which may happen using \eqref{gamma.check} for large $M$. \begin{example}\label{Ex:AMC} To illustrate the importance of the decision regions, we show in \figref{Fig:th_comp_AMC} the throughput of \gls{amc} for the (optimal) decision intervals based on \eqref{WEP.R.R} (as they are practically the same as with \eqref{kkt.eta}), and based on \eqref{gamma.check}, for both cases $P_\tnr{t}=10^{-1}$ and $P_\tnr{t}=10^{-2}$. We use $L=5$ rates from the set $\mc{R}=\set{R_l}_{l=1}^L$, where $R_l=l\cd0.75$. From \eqref{WEP.R.R}, we find that $\PER(\gamma_l)\approx 0.5, 0.33, 0.25, 0.2$. To get an insight into the importance of the coding strength, we use $\tilde{a}\in\set{4, 0.5}$, where the weaker code throughput curve is right-shifted by $\sim6\tr{dB}$ due to the increased borders $\gamma_l$ of the decision regions, cf.~\eqref{gamma.l.Delta}. Quite clearly, the strict constraints on the packet loss (small $P_\tnr{t}$) move the \gls{snr} boundaries $\check{\gamma}_l$ to the right; this decreases the throughput and is particularly notable for weak codes (here, $\tilde{a}=0.5$). Adding more \gls{arq} rounds (increasing $M$) increases $P_\tnr{t}$ and moves $\gamma_l$ to the left (\cf \eqref{gamma.check}), hence improving the throughput which approaches the optimal solution derived in~\eqref{WEP.R.R}. \begin{figure}[bt] \psfrag{xlabel}[ct][ct][\siz]{$\SNRav$~[dB] } \psfrag{ylabel}[ct][ct][\siz]{$\eta^\tnr{amc}$} \psfrag{OPT}[lc][lc][\siz]{Eq.~\eqref{WEP.R.R}} \psfrag{Ploss1XX}[lc][lc][\siz]{$P_\tnr{t}=10^{-1}$} \psfrag{Ploss2XX}[lc][lc][\siz]{$P_\tnr{t}=10^{-2}$} \psfrag{G=0.5}[lc][lc][\siz]{$\tilde{a}=0.5$} \psfrag{G=1}[lc][lc][\siz]{$\tilde{a}=1$} \psfrag{G=4}[lc][lc][\siz]{$\tilde{a}=4$} \begin{center} \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/AMC_OPTvsPloss}} \caption{The throughput $\eta^\tnr{amc}$ with the decision intervals based on \eqref{WEP.R.R} and \eqref{gamma.check}, for $P_\tnr{t}=10^{-1}$ and $P_\tnr{t}=10^{-2}$.}\label{Fig:th_comp_AMC} \end{center} \end{figure} \end{example} \section{Definition of \gls{wep} in \eqref{Pe.2}}\label{sec.appendix.A} \section{Proof of \theref{Thm22}}\label{sec.appendix.E} Our objective is to derive a sufficient conditions under which $\displaystyle{\eta=\frac{R(1-f_{K})}{1+\sum_{k=1}^{K} f_{k}}}$ is increasing with $K$, where, for brevity, the relationship on $l$ and $\SNR$ is removed from \eqref{eta.harq.slow.l}. \begin{align}\label{eta.harq.appendix} \eta_{K}&\leq\eta_{K+1}\\ \frac{R\big(1-f_{K}\big)}{1+\sum_{k=1}^{K-1} f_{k}} &\le\frac{R\big(1-f_{K+1}\big)}{1+\sum_{k=1}^{K} f_{k}}\\ f_{K+1}\big(1 + \sum_{k=1}^{K-1} f_{k}\big) &\le f_{K}\sum_{k=1}^{K} f_{k}\\ \label{final.cond} \sum_{k=1}^{K} f_{K+1} f_{k-1} &\le \sum_{k=1}^{K} f_{K} f_{k}. \end{align} Obviously, \eqref{final.cond} is sufficient and necessary condition for the throughput be increasing with $K$. To remove the dependence on the sum we strengthen \eqref{final.cond} imposing inequality on each term which yields sufficient (not necessary) condition \begin{align}\label{} f_{K+1} f_{k-1}\le f_{K} f_{k}\quad \forall k\le K, \end{align} that is \begin{align}\label{eq:condition1} \frac{f_{K+1}}{f_{K}} \le \frac{f_{k}}{f_{k-1} }\quad \forall k\le K . \end{align} Since \eqref{eq:condition1} must hold $\forall K \ge 1$, we obtain \eqref{fk.cond.sup}. Any strict inequality in \eqref{eq:condition1} will make the inequality in \eqref{eta.harq.appendix} strict as well. This terminates the proof. \section{HARQ: Fast Fading}\label{Sec:Block.fading} In the case of fast-fading channels, the throughput can again be expressed using the renewal-reward theorem \eqref{eta.renew.reward.slow} \begin{align}\label{eta.renew.reward} \eta^{\tnr{harq}}=\frac{\Ex[\mf{R}]}{\Ex[\mf{T}]}, \end{align} where $\mf{R}$ is the random reward. Since the \gls{snr}s vary independently from one transmission round to another (and from one \gls{harq} cycle to another), the expectations in \eqref{eta.renew.reward} are taken also with respect to all the \gls{snr}s affecting the transmission (unlike in \eqref{eta.harq.slow}, where the expectation over $\SNRrv_1$ was taken outside of the fraction). Consequently, unlike~\eqref{eta.renew.reward.slow}, Since the rate is random from one \gls{harq} cykle to another, the expected reward is given by \begin{align} \Ex[\mf{R}]&=\sum_{l=1}^L \R_l (1-f_{K,l}) p_l, \end{align} where $p_l$ is the probability of choosing the rate $\R_l$ in the first \gls{harq} round, given by \begin{align}\label{} p_l\triangleq \PR{\SNRrv \in \mc{D}_l}, \end{align} with $\mc{D}^{\tnr{harq}}_l$ being the decision regions we have to define. Again, $f_{k,l}$ that denotes the probability of $k$ consecutive errors (conditioned on starting the \gls{harq} cycle with the rate $\R_l$) is given by \begin{align} f_{k,l}&\triangleq\PR{ \nack_k | \R_l } \label{Pr.Error.2} =\frac{1}{p_l}\int_{\mc{D}_l} \pdf_{\SNRrv_1}(x)f_{k,l}(x)\dd x,\\ \label{f.klx} f_{k,l}(x) &=\Ex_{\set{\SNRrv_l}_{l=2}^k } \big[\PER_l(x,\SNRrv_2,\ldots,\SNRrv_k) \big]. \end{align} Both \eqref{Pr.Error.2} and \eqref{f.klx} require a one-dimensional integration respectively over $\SNRrv_1\in\mc{D}_l$ and an aggregate \gls{snr} (merging $\SNR_1=x$ with $\SNRrv_2,\ldots, \SNRrv_k$ via~\eqref{aggreg.SNR}). Similarly, the expected number of~\gls{harq} rounds is given by \begin{align}\label{} \Ex[\mf{T}]&=\sum_{l=1}^L \int_{\mc{D}_l}\pdf_{\SNRrv}(x) T_{K,l}(x) \dd x =\sum_{l=1}^L\ov{T}_{K,l} p_l, \end{align} where $T_{K,l}(\SNR)=1+\sum_{k=1}^{K-1} f_{k,l}(\SNR)$ is the expected number of rounds with the first being carried out over $\SNR\in\mc{D}^{\tnr{harq}}_l$, and $\ov{T}_{K,l}=1+\sum_{k=1}^{K-1} f_{k,l}$. The throughput of \gls{harq} is then given by \begin{align}\label{eta.harq} \eta^{\tnr{harq}}_K=\frac{\sum_{l=1}^L R_l (1-f_{K,l})p_l}{\sum_{l=1}^L \ov{T}_{K,l}p_l }, \end{align} where both the numerator and the denominator depend on $\mc{D}^{\tnr{harq}}_l$, $l=1, \ldots, L$. For the moment, we do not make any assumption about the coding, \ie we make no distinction between \gls{irharq} and \gls{rrharq}. \subsection{Decision Regions} The regions $\mc{D}^{\tnr{harq}}_l$ that maximize~\eqref{eta.harq} are in general non-convex and must by represented as a union of intervals. Since this would lead to a tedious optimization problem, we restrict our considerations to the \gls{amc}-like decision regions \begin{align}\label{} \tilde{\mc{D}}^{\tnr{harq}}_l=[\gamma_l,\gamma_{l+1}), \end{align} which, as we will see, become an insightful proxy to the optimal solution despite their suboptimality. Denoting \eqref{eta.harq} as $\eta^{\tnr{harq}}_K(\boldsymbol{\gamma})$, where $\boldsymbol{\gamma}\triangleq[\gamma_1,\ldots, \gamma_L]$, we solve the following optimization problem \begin{align}\label{opt_prob} \hat{\eta}^{\tnr{harq}}_K\triangleq &\max_{\boldsymbol{\gamma}} \eta^{\tnr{harq}}_K(\boldsymbol{\gamma}) \quad \text{s.t.}\quad \gamma_1\le \gamma_2 \le\ldots\le\gamma_L\le\gamma_{L+1}, \end{align} where $\gamma_1=0, \gamma_{L+1}=\infty$ are adopted for notational convenience. Since the numerator and the denominator of \eqref{eta.harq} depend on $\boldsymbol{\gamma}$, we will use the fractional programming approach \cite[Proposition~2.1]{crouzeix1991}. We define the following function \begin{align}\label{lagrangian} F(\boldsymbol{\gamma},\lambda)\triangleq \sum_{l=1}^L R_l &p_l\big(1-f_{K,l}\big) -\lambda \big (\sum_{l=1}^L \ov{T}_{K,l} p_l\big), \end{align} and solve the new optimization problem \begin{align}\label{opt_prob1} \boldsymbol{\gamma}_{\lambda}\triangleq &\mathop{\mr{argmax}}_{\boldsymbol{\gamma}} F (\boldsymbol{\gamma},\lambda) \quad\text{s.t.} \quad 0=\gamma_1\le \gamma_2 \le\ldots\le\gamma_L\le\infty. \end{align} Then, the optimal solution of \eqref{opt_prob} is found examining the sign of $F(\boldsymbol{\gamma},\lambda)$ due to the simple relationships \cite{crouzeix1991} \begin{align} F(\boldsymbol{\gamma}_{\lambda},\lambda)>0 & \iff \lambda<\hat{\eta}^{\tnr{harq}}_K, \\ F(\boldsymbol{\gamma}_{\lambda},\lambda)<0 & \iff \lambda>\hat{\eta}^{\tnr{harq}}_K, \\ F(\boldsymbol{\gamma}_{\lambda},\lambda)=0 & \iff \lambda=\hat{\eta}^{\tnr{harq}}_K . \end{align} Consequently, to solve \eqref{opt_prob}, it is enough to solve \eqref{opt_prob1} for each $\lambda$, and find $\lambda$ such that $F(\boldsymbol{x}_{\lambda},\lambda)=0$. The latter can be done efficiently using simple numerical methods (a bisection search, for instance). To solve \eqref{opt_prob1}, we differentiate \eqref{lagrangian} with respect to $\gamma_l$, and obtain the following \gls{kkt} equations \begin{align}\nonumber R_{l-1}\big(1-\Ex_{\set{\SNRrv_l}_{l=2}^K } \big[\PER_{l-1}(\SNR^\Sigma_K(\gamma_l)) \big]\big) &-R_{l}\big(1-\Ex_{\set{\SNRrv_l}_{l=2}^K } \big[\PER_l(\SNR^\Sigma_K(\gamma_l)) \big]\big)\\ \label{HARQ_opt1} &\qquad=\lambda\big( T_{K,l-1}(\gamma_l) -T_{K,l}(\gamma_l) \big), \end{align} that may be solved for each $\gamma_l$ under the constraints $\gamma_l\leq\gamma_{l+1}$, $l=1,\ldots, L$. We note that it is possible to obtain $\gamma_l=\gamma_{l+1}$; in which case the decision region is degenerate $\tilde{\mc{D}}^{\tnr{harq}}_l=\emptyset$. \begin{figure}[ht] \psfrag{xlabel}[ct][ct][\siz]{$\SNRav$~[dB] } \psfrag{ylabel}[ct][ct][\siz]{$\gamma_l$ [dB]} \psfrag{gamma2}[cl][cl][\siz]{$\gamma_2$} \psfrag{gamma3}[cl][cl][\siz]{$\gamma_3$} \psfrag{gamma4}[cl][cl][\siz]{$\gamma_4$} \psfrag{gamma5}[cl][cl][\siz]{$\gamma_5$} \psfrag{\gls{amc}}[cl][cl][\siz]{\gls{amc}} \psfrag{\gls{amc}-HARQ-IR}[cl][cl][\siz]{\gls{irharq}} \psfrag{\gls{amc}-HARQ-RR}[cl][cl][\siz]{\gls{rrharq}} \begin{center} \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_AMC_IID_thr_g4}}\\ \scalebox{\siz}{a)}\\ \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_AMC_IID_thr_g05}}\\ \scalebox{\siz}{b)} \caption{Optimal thresholds $\gamma_l$ defining the decision regions $\tilde{\mc{D}}^{\tnr{harq}}_l$ for fast-fading channels with a)~$\tilde{a}=4$, and b)~$\tilde{a}=0.5$. The filled circles on the $\SNRav$ axis indicate the value $\SNRav_{\tnr{low},l}$ such that if $\SNRav<\SNRav_{\tnr{low},l}$; $\tilde{\mc{D}}^{\tnr{harq}}_l$ is not degenerate, \ie $\gamma_l>\gamma_{l-1}$. We note that in a)~we have $\SNRav_{\tnr{low},4}=\SNRav_{\tnr{low},5}$. The hollow circle indicates the value $\SNRav_{\tnr{high}}$ (common to all decision regions) such that if $\SNRav>\SNRav_{\tnr{high}}$; $\tilde{\mc{D}}^{\tnr{harq}}_l$ is not degenerate.}\label{Fig:IID.Thresholds} \end{center} \end{figure} \begin{example} \label{Ex:Thresholds} Considering the same set of rates $\mc{R}$ as in previous examples, we show in \figref{Fig:IID.Thresholds} the thresholds $\set{ \gamma_2,\gamma_3,\gamma_4,\gamma_5}$ obtained after solving \eqref{opt_prob}. The optimal thresholds for the \gls{amc}, which do not depend on $\SNRav$, are shown as a reference. The relationship between $\gamma_l$ and $\SNRav$ is quite complex, and it provides an immediate indication on how tedious it will be to find the optimal regions $\mc{D}^{\tnr{harq}}_l$ (as a union of intervals). Some intuition about the potential gains of using \gls{harq} on top of \gls{amc} may be obtained from~\figref{Fig:IID.Thresholds}a. For high (average) \gls{snr}s, the thresholds of \gls{harq} are higher compared to the \gls{amc}, this more ``conservative" choice of rates is meant to avoid errors and, hence, not to use \gls{harq}. On the other hand, for low \gls{snr}s, the thresholds of \gls{harq} are lower compared to the \gls{amc}: the rates are adopted in a more ``aggressive" way indicating that the retransmissions would be beneficial. This becomes particularly clear with medium \gls{snr}s, where the regions degenerate and only $\tilde{\mc{D}}_5=[0,\infty)$; this occurs with \gls{irharq} for $\SNRav\in (1~\!\tnr{dB}, 9~\!\tnr{dB})$, and this interval is indicated with the markers on the $\SNRav$ axis. Similar conclusions may be drawn from~\figref{Fig:IID.Thresholds}b, where the relationship is slightly more complex due to a much less steeper \gls{per} curve of the decoder. We also observe that, for high \gls{snr}s, all decision regions are not degenerate, and we conjecture that it would be always true. We adopt the following reasoning: we know that the region $\mc{D}^{\tnr{harq}}_L$ is not degenerate because, if it was, it would not be possible to attain a throughput that is close to $R_L$. Now, for all $\SNR<\SNR_{\tnr{th},L}$, transmitting with the rate $\R_L$ provokes an error, so we ask a question: is it more beneficial to avoid errors or to count on retransmissions? This can be answered comparing the rewards, $\mf{R}$, associated with the selections of rates (actions). The assignment $\SNR\in\mc{D}^{\tnr{harq}}_{L-1}$ yields an expected immediate reward of $\mf{R}=\R_{L-1}(1-f_{L-1,1})$; on the other hand, if $\SNR\in\mc{D}^{\tnr{harq}}_L$, the reward is at most $\mf{R}=\R_L/2$ because it takes at least two \gls{harq} rounds. Thus, for $\R_{L-1}\gg \R_L/2$ and a sufficiently small $f_{l,1}$, we will assign $\SNR$ to $\mc{D}_l$. A similar reasoning holds when $\R_{L-1}\gg \R_L/k$. We thus conclude that the region $\mc{D}^{\tnr{harq}}_{L-1}$ is not degenerate. Furthermore, with the same arguments for $\SNR<\SNR_{\tnr{th},L-1}$, we can find that the regions $\mc{D}^{\tnr{harq}}_{L-2}$ is not degenerate. \end{example} \subsection{Throughput} \propref{Thm22} answered the important question about the value of using \gls{harq} on top of the \gls{amc} in slow-fading channels. In fast-fading channels, however, the derivations are more complicated due to the sums appearing in the numerator and the denominator in~\eqref{eta.harq}. To obtain answers in this case, we will consider separately the regimes of high- and low- average \gls{snr}s. From the results in \exref{Ex:Thresholds}, we have already obtained an indication about the added-value of \gls{harq}: retransmissions were more valuable in the low- than in the high-\gls{snr} regime. However, the final conclusions will be drawn by looking at the throughput. \begin{example}\label{Ex:Throughput.fast} The throughput obtained by adopting the decision regions shown in~\exref{Ex:Thresholds} is represented in~\figref{Fig:IID.fading}. The results may seem surprising at the first glance, but they are completely in line with the behavior of the decision regions: the advantage of \gls{harq} is well pronounced in low $\SNRav$. On the other hand, for high $\SNRav$, adding \gls{harq} on top of the \gls{amc} is counterproductive. The throughput penalty is small but clearly observable, \eg considering $\tilde{a}=4$ and \gls{rrharq}, this effect occurs above $3~\!\tnr{dB}$, and above $9~\!\tnr{dB}$ for \gls{irharq}; these break-points are indicated with markers on the figure. We also note that using the optimized decision regions $\tilde{\mc{D}}^{\tnr{harq}}_l$ is beneficial for \gls{amc}-\gls{irharq} when the break-points move to the high-\gls{snr}s. However, this gain is moderate for strong codes ($\tilde{a}=4$), and the general conclusion holds: there are regions of \gls{snr} for which it is counterproductive to use \gls{harq}. Finally, \figref{Fig:IID.fading}b shows the throughput with \gls{irharq} in the range $\SNRav\in(1~\!\tnr{dB}, 9~\!\tnr{dB})$ for $\tilde{a}=4$, where $\tilde{\mc{D}}^{\tnr{harq}}_5=[0, \infty)$ (cf.~\exref{Ex:Thresholds}) implies that we effectively ignore the \gls{csi}; meaning that the adaptation to the channel is counterproductive. This observation is explained by the fact that \gls{amc}-\gls{harq} cannot be considered as a fully adaptive transmission since it ignores the \gls{csi} after the first round. In fact, this is the source of a surprising and disappointing behavior of \gls{harq} in high-\gls{snr}s. \end{example} \begin{figure}[ht] \psfrag{xlabel}[ct][ct][\siz]{$\SNRav$ [dB] } \psfrag{ylabel}[ct][ct][\siz]{Throughput} \psfrag{G=0.5}[cl][cl][\siz]{$\tilde{a}=0.5$} \psfrag{G=1}[cl][cl][\siz]{$\tilde{a}=1$} \psfrag{G=4}[cl][cl][\siz]{$\tilde{a}=4$} \psfrag{AMC}[cl][cl][\siz]{\gls{amc}} \psfrag{AMC-HARQ-RR}[cl][cl][\siz]{\gls{rrharq}, $\tilde{\mc{D}}^{\tnr{harq}}_l$} \psfrag{HARQ-IR-opt}[cl][cl][\siz]{\gls{irharq}, $\tilde{\mc{D}}^{\tnr{harq}}_l$} \psfrag{HARQ-IR-amc}[cl][cl][\siz]{\gls{irharq}, $\mc{D}^\tnr{amc}_l$} \begin{center} \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_RR_AMC_IID}}\\ \scalebox{\siz}{a)}\\ \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_IR_AMC_IID}}\\ \scalebox{\siz}{b)} \caption{The throughput of \gls{amc} and \gls{amc}-\gls{harq} over fast-fading channels for a)~\gls{rrharq} and b)~\gls{irharq}. The markers on the $\SNRav$ axis indicate the points where the \gls{harq} throughput curves cross the throughput curve of \gls{amc}. Filled and hollow markers correspond to \gls{harq} based on $\tilde{\mc{D}}^{\tnr{harq}}_l$ and $\mc{D}^\tnr{amc}_l$, respectively.}\label{Fig:IID.fading} \end{center} \end{figure} We will explain now more formally the results we have observed in the examples. We will show that, in the low-\gls{snr} regime, \gls{harq} is more productive, but at high $\SNRav$, \gls{amc} outperforms \gls{amc}-\gls{harq} under mild conditions on the \gls{per} curves of the decoder. \begin{proposition}[Low SNR]\label{Prop:harq.wins} Denote by $\hat{\eta}^{\tnr{harq}}_K$ the optimal throughput of \gls{harq} based on $\mc{D}^{\tnr{harq}}_l$. There exists $\SNRav_\tnr{o}$ such that, for all $\SNRav<\SNRav_\tnr{o}$, \begin{align}\label{harq.wins} \hat{\eta}^{\tnr{harq}}_K \geq \eta^\tnr{amc}. \end{align} \begin{proof} We denote by $\check{\eta}^{\tnr{harq}}_K$ the throughput of \gls{harq} based on $\mc{D}^\tnr{amc}_l$ where, due to the non-optimized choice of the decision regions, we have $\check{\eta}^{\tnr{harq}}_K\leq \hat{\eta}^{\tnr{harq}}_K$. Since $\lim_{\SNRav\rightarrow 0}p_l f_{K,l}=0, l>1$, and $\lim_{\SNRav\rightarrow 0}f_{K,1}p_1=f_{K,1}$, we compare the throughputs using the terms appearing in the limits \begin{align} \label{lim0.harq} \lim_{\SNRav\rightarrow 0}\check{\eta}^{{\tnr{harq}}}_K&= \frac{R_1(1-f_{K,1})}{\ov{T}_{K,1}},\\ \label{lim0.amc} \lim_{\SNRav\rightarrow 0}\eta^{\tnr{amc}}&= R_1(1-f_{1,1}). \end{align} Thus, in the low-\gls{snr} regime, both \gls{harq} and the \gls{amc} may be considered as single-rate transmission schemes (\ie without rate adaptation). So, from \propref{Thm22} we have $\check{\eta}^{{\tnr{harq}}}_K \ge \eta^{\tnr{amc}}$. \end{proof} \end{proposition} For high $\SNRav$, the situation is slightly more involved, and we cannot use \eqref{lim0.harq} because all terms $f_{K,l}p_l$ have the same limit, $\lim_{\SNRav\rightarrow\infty}f_{K,l}p_l=0$. To compare the throughputs of \gls{harq} and \gls{amc}, we will thus define a \gls{trp} as a hypothetical \gls{harq} transmission which, in the first round, behaves just like a conventional \gls{harq} (and is described by the same probability of decoding error), while in the second transmission round, it guarantees that the message is decoded, \ie $f_{2,l}=0$. The throughput of \gls{trp} is given by \begin{align}\label{eta.bound} \eta^{{\tnr{2r}}} &\triangleq\frac{\sum_{l=1}^L R_l p_l}{1 + \sum_{l=1}^L f_{1,l} p_l } \nonumber\\ &=\frac{\sum_{l=1}^L R_l p_l}{1 + \ov{f}_{1} }, \end{align} where $\ov{f}_{1}\triangleq \sum_{l=1}^L f_{1,l} p_l$ is the average probability of error in the first round, \ie the probability that re-transmissions are required, $\ov{f}_{1}=\PR{\nack_1}$.\footnote{This should not be confused with the average \gls{per}.} Comparing \eqref{eta.bound} and \eqref{eta.harq}, we see that the throughput of \gls{trp} upper bounds the throughput of \gls{harq}, $\eta^{\tnr{harq}}_K <\eta^{{\tnr{2r}}}$. To focus the discussion, we start with the assumption that the decision regions $\mc{D}^{\tnr{harq}}_l$ are not degenerate. \begin{proposition}\label{Prop:amc.ge.harq} Let $x_{l}\triangleq \lim_{\SNRav\rightarrow\infty}\frac{f_{1,l}p_l}{f_{1,L}p_L}$. If $x_l>0$, $l=1,\ldots, L-1$, then there is a $\SNRav_\tnr{o}$ such that, for all $\SNRav>\SNRav_\tnr{o}$, \begin{align}\label{harq.le.amc} \eta^{{\tnr{harq}}}_K < \eta^\tnr{amc}. \end{align} \begin{proof} Since $\eta^{\tnr{harq}}_K \le\eta^{{\tnr{2r}}}$, it is enough to prove that $\eta^{{\tnr{2r}}}<\eta^{\tnr{amc}}$ to obtain a sufficient condition for \eqref{harq.le.amc}. We have \begin{align}\label{harq.amc.condition} \eta^{{\tnr{2r}}}&<\eta^{\tnr{amc}} \\ \frac{\sum_{l=1}^L R_l p_l}{1 + \ov{f}_{1} }&<\sum_{l=1}^L R_l (1-f_{1,l})p_l\\ \sum_{l=1}^L R_l p_l&<(1 + \ov{f}_{1})\sum_{l=1}^L R_l (1-f_{1,l})p_l\\ \sum_{l=1}^L R_l f_{1,l}p_l&<\ov{f}_{1}\eta^\tnr{amc}, \label{eta.harq.simple} \end{align} and by taking the limit $\SNRav\rightarrow\infty$ of both sides of \eqref{eta.harq.simple}, we get \begin{align} \sum_{l=1}^L R_l x_{l,L} &< \sum_{l=1}^L R_L x_{l,L}, \end{align} which is obviously true if $x_l>0$. Thus, for sufficiently large $\SNRav$, $\eta^{\tnr{amc}}>\eta^{{\tnr{2r}}}>\eta^{\tnr{harq}}_K$. \end{proof} \end{proposition} The value of \propref{Prop:amc.ge.harq} is that it is obtained using solely the model of the decoding errors in the first transmission. Hence, we do not need to consider approximations with regard to the way the redundancy is introduced by \gls{harq}. We also quickly note that, using the model of the decoding errors from~\eqref{PER.SNR} and~\cite[Eq. (8)]{Liu04}, we obtain $x_{l,L}>0, \forall l$, provided that the decision regions $\mc{D}^{\tnr{harq}}_l$ are not degenerate (\ie when $p_l>0$). This brings us to the following question: will we be able to obtain gains by using \gls{harq} on top of \gls{amc} if the decision regions $\mc{D}^{\tnr{harq}}_l$ are optimized? The answer is ``no'', because \propref{Prop:amc.ge.harq} does not assume anything about the decision regions $\mc{D}^{\tnr{harq}}_l$, except that there are at least two (in which case there are at least two non-zero terms $x_l$). This condition materializes for the high-\gls{snr} regime under the conjecture we made in \exref{Ex:Thresholds}. Another interesting question is whether we can decrease the gap between $\eta^{\tnr{amc}}$ and $\eta^{{\tnr{2r}}}$ by increasing the number of rated in the set $\mc{R}$? The question may be difficult to answer. Nevertheless we consider here a particular and practical case where we cannot use coding rates below $\R_1$ which is determined by the minimum implementable encoding rate (\eg the coding rate of $1/3$ in the popular turbo-codes) and the minimum modulation rate (\eg \gls{bpsk}). Also, a finite size of the constellation, \eg $16$-\gls{qam}, implies that there is a maximum rate $\R_L$ which cannot be exceeded. We can manipulate, however, the granularity of the set $\mc{R}$, \ie we can increase the number of rates, $L$, while keeping $\R_1$ and $\R_L$ constant. \begin{corollary}\label{Corr:gap} For $\tilde{a}=\infty$, keeping $\R_1$ and $\R_L$ constant, the difference $ \eta^{\tnr{amc}}-\eta^{{\tnr{2r}}}$ increases with $L$. \end{corollary} \begin{proof} We first rewrite \eqref{harq.amc.condition} as follows \begin{align} \eta^{\tnr{amc}}-\eta^{{\tnr{2r}}}= \frac{\ov{f}_{1}(\eta^{\tnr{amc}}-R_1)}{1+\ov{f}_{1}}. \end{align} Then, for $\tilde{a}=\infty$, $\ov{f}_{1}$ is independent from $L$ because the only source of error is the event $\set{\SNRrv\in (0, \SNR_{\tnr{th},1} )}$. Since $\R_1$ is fixed by assumption, and $\eta^{\tnr{amc}}$ is increasing with $L$, the difference $\eta^{\tnr{amc}}-\eta^{{\tnr{2r}}}$ can only increase with $L$. \end{proof} Although \corref{Corr:gap} does not talk about the gap $\eta^{\tnr{amc}}-\eta^{{\tnr{harq}}}$, according to our observations, for high-\gls{snr} regime, we obtain a $\eta^{{\tnr{harq}}}$ indistinguishable from $\eta^{\tnr{2r}}$. Moreover, setting a practical (finite) value for $\tilde{a}$ does not change the results, and we indeed observe that the difference $\eta^{\tnr{amc}}-\eta^{{\tnr{harq}}}$ increases with $L$ even if $\tilde{a}<\infty$. \subsection{Discussion}\label{Sub:discussion} The presented results indicate that adding \gls{harq} on top of the \gls{amc} may be counterproductive in terms of throughput. This finding is not only counterintuitive; but goes against the general belief that both the \gls{amc} and \gls{harq} complement each other in their operations. We try to provide more intuition about this unusual---at first glance---behavior. We do it in two ways: first, by exploring the temporal relationships of \gls{csi}, and second, by reinterpreting the equation in the proof of~\propref{Prop:amc.ge.harq}. \subsubsection{Temporal evolution of the channel states}\label{Sec:Temporal} Let us start with the relationship between the channel state in two different time instants assuming operation in high $\SNRav$. Then, the \gls{amc} is very likely to choose a high transmission rate, \eg $R_L$. A small rate, \eg $R_1$, may be chosen as well, which happens when the measured \gls{snr}, $\SNR[n]$, falls into the interval $(0,\gamma_2)$; this event has a probability $p_1>0$. Let us assume that the error occurs when transmitting with the rate $R_1$, so the reward in time $n$ is zero, $\mf{R}[n]=0$. We can now compare the expected reward in the block $n+1$ due to the adoption of \gls{amc} or \gls{amc}-\gls{harq}. With the \gls{amc}-\gls{harq}, the error is handled by the second \gls{harq} round where the chances for a successful decoding (both for \gls{irharq} and \gls{rrharq}), $f_{1,2}$ are high; the expected reward in this second round is thus given by \begin{align}\label{reward.harq.2} \Ex\big[\mf{R}[n+1]\big]=R_1(1-f_{1,2})\approx R_1. \end{align} On the other hand, with the \gls{amc}, the error is handled by the \gls{llc}, so the \emph{new} packet is transmitted in time $n+1$ with the rate $R_l$. The expected reward in this case with the \gls{amc} in time $n+1$ is thus \begin{align}\label{reward.amc.1} \Ex\big[\mf{R}[n+1]\big]=\R_l(1-f_{l,1})>R_{l-1}, \end{align} where the loose lower bound is obtained by using~\eqref{WEP.R.R} and the fact that $f_{l,1}<\PER_l(\gamma_l)$. We can see that the reward \eqref{reward.harq.2} due to a small probability of error, $f_{1,2}\approx 0$ (obtained thanks to \gls{harq}), is negligible corresponding to the worst-case gain of the \gls{amc} given by \eqref{reward.amc.1}. In other words, even if the selection of the rate $R_1$ occurs with a very small probability $p_1$, its effect propagates to the following time instants. \subsection{Probabilistic interpretation}\label{Sec:Proba} Let us transform~\eqref{eta.harq.simple} and evaluate its limits \begin{align}\label{} \frac{\sum_{l=1}^L R_l f_{1,l}p_l}{\ov{f}_{1}} = \frac{\sum_{l=1}^L R_l \PR{\nack, \R_l}}{\PR{\nack} \label{proba.ineq} &= \sum_{l=1}^L R_l \PR{\R_l|\nack}<\eta^{\tnr{amc}},\\ \label{proba.limit} &\sum_{l=1}^L R_l \PR{\R_l|\nack}<\R_L, \end{align} where \eqref{proba.limit} is obtained by taking the limits of both sides of~\eqref{proba.ineq} for~$\SNRav\rightarrow\infty$. If, for all $l<L$, $\PR{\R_l|\nack}>0$, then~\eqref{proba.limit} is satisfied. This is another version of the conditions required in \propref{Prop:amc.ge.harq}. It can be verbalized as follows: knowing that an error occurred (\ie $\nack$ is observed), the a posteriori probability of choosing a rate $R_l$, $l=1,\ldots, L-1$ does not go to zero. This means that, for the high-\gls{snr} regime, the error event $\nack$ provides information about the realization of the \gls{snr} which led to the error. The most obvious interpretation of this relationship is obtained for $\tilde{a}=\infty$ with the decision regions $\mc{D}^{\tnr{harq}}_l=\mc{D}^\tnr{amc}_l$, where $\gamma_1=0$ and $\gamma_l=\SNR_{\tnr{th},l}$ for $l>1$. Then, the only source of error is the event $\SNRrv\in (0, \SNR_{\tnr{th},1} )$. Since this event occurs only when the rate $\R_1$ is selected, we can write $\PR{\R_1|\nack}=1$. That is, even if the a priori probability $p_1=\PR{\R=\R_1}$ can be arbitrarily small, the a posteriori probability can be very large. \section{Introduction} \gls{amc} and \gls{harq} are two transmission strategies commonly used in modern wireless systems to communicate over error-prone and time-varying channels. The main objective of this work is to compare \gls{amc} and \gls{harq} from the throughput point of view, which is a well-established reference criterion particularly suited for transmission of delay-insensitive contents. In broad terms, \gls{amc} consists in adjusting the transmission parameters (such as the modulation type, the coding rate, and/or the transmission power) to the channel conditions \cite{Alouini00,Goeckel99}; these are most often defined by a predefined set of \glspl{mcs}. The receiver selects a suitable \gls{mcs} and conveys its index to the transmitter via a feedback channel. Transmission errors, unavoidable in any practical system, are handled by the retransmission protocol known as \gls{arq}\cite{Lin03_Book}, where the receiver uses a feedback channel to inform the transmitter about a successful decoding---via a \gls{ack} message---or about a decoding failure---via a \gls{nack} message. Each \gls{nack} triggers a new \emph{transmission round} (or a \emph{retransmission}), and increasing their number improves reliability. In this work, we consider the retransmission protocol known as \emph{hybrid} \gls{arq} (\gls{harq}) in which coding is done across the transmission rounds and thus is intimately related to the \gls{amc} for which coding and modulation are the core elements. In more general terms, both \gls{amc} and \gls{harq} may be seen as variable rate transmission strategies: the former, due to the explicit variation of the number of bits conveyed over the channel, the latter, due to the variability of the transmission time resulting from variable number of transmission rounds. Both are thus naturally coupled and, in this work we want to clarify to what extent this coupling should be preserved or exploited. Therefore, although the formalism of the communication layers tend to separate the \gls{amc} from \gls{harq}, the practice may call for their holistic view. In particular, the \gls{lte} standard specifies the \gls{harq} operation as part of the \gls{mac} layer \cite[Sec.~5.4.2]{3GPP_TS_36.321}, whereas the channel measurements procedures are defined in the \gls{phy} \cite[Sec.~7.2]{3GPP_TS_36.213}. However, the \gls{amc}, \ie the way the \gls{mcs} should be chosen based on the reported channel measurement is unspecified and left for implementation. We will consider the \gls{amc} and \gls{harq} as mechanisms of \gls{phy}. The main difficulty in providing a qualitative insight into the relationship between \gls{harq} and the \gls{amc} lies in the fact that they are affected by various elements, such as the adopted channel model, the available coding/modulation schemes, or the power adaptation strategies. It is thus critical to strike a realistic balance between the general model and the plethora of clumsy technical details of the practical systems or standards. With this idea in mind, the channel model must be kept simple and we will consider two extreme cases of the operating conditions with respect to the channel correlation between \gls{harq} rounds: i)~in fast block-fading channels, all transmission rounds are carried out over independent fading realizations, and ii)~in slow block-fading channels, all \gls{harq} transmission rounds (of the same packet) are carried out in the same operating conditions (are thus perfectly correlated). Under these models, the relationship between \gls{amc} and \gls{harq} becomes tractable while still allowing us to extrapolate the findings to the situations where the channel correlation is only partial -- a case which is difficult to tackle analytically and a numerical approach might be necessary. Another important point is the choice of a suitable performance criterion. The throughput seen by the upper layers provides a simple and fair comparison baseline, but ignores most of the considerations related to delay or packet loss. The former is acceptable by assuming a delay-insensitive traffic and a saturated buffer operating mode; the latter requires a few assumptions about the upper \gls{llc} layer taking care of all residual retransmission errors which then become irrelevant to the analysis (more on this in \secref{Sec:LLC}). The numerical examples that will illustrate our conclusions and findings will be based on a simple model of the decoding errors which may be fit to the experimental data obtained with practical decoders. We will then use simplifications to characterize the behavior of \gls{irharq} when different parts of the codeword are transmitted in the different rounds \cite{Hagenauer88,Caire01}, and of \gls{rrharq} when each round carried the same codeword \cite{Benelli85,Chase85}. The contributions of this work can be summarized as follows: \begin{itemize} \item We provide a general model which leads to a qualitative evaluation of the relationship between \gls{amc} and \gls{harq}. We provide the throughput expressions valid for fast- and slow-fading channel models, and compare to the formulations appearing in the literature. \item We discuss how the transmission rate should be chosen based on the observed \gls{csi}, to maximize the throughput of \gls{amc} and \gls{amc}-\gls{harq} for fast- and slow-fading channels. \item We prove that, in the high average \gls{snr} regime, combining \gls{harq} with the \gls{amc} affects negatively the system throughput in fast-fading channel, and we provide an intuitive explanation of this result. We also show that \gls{harq} is always productive for slow-fading channel. \item Finally, we propose en evaluate two strategies to enhance the performance of \gls{harq} for fast-fading channels which remove the throughput penalty introduced by the conventional \gls{harq}. \end{itemize} The rest of this paper is organized as follows. The system model is described in \secref{Sec:Model}, where -- somewhat unconventionally -- \secref{Sec:state.of.art} positions this work with respect to the literature. We found it the most appropriate because \gls{amc} and \gls{harq} have been studied under many different modeling assumptions, and it is difficult to discuss them before the model is introduced. The throughput analysis of \gls{amc} and \gls{harq} is presented in \secref{Sec:AMC}, \secref{Sec:slow.fading}, and \secref{Sec:Block.fading}. The directions towards the improvement of AMC-HARQ systems are explored in \secref{Sec:Boosting.HARQ} and we present our conclusions in \secref{Sec:Conclusions}. \section{Model}\label{Sec:Model} \subsection{Channel Model} We consider the communication over a block flat-fading channel, so the received signal can be written as \begin{align}\label{y.s.snr} \boldsymbol{y}[n]=\sqrt{\SNR[n]}\boldsymbol{s}[n]+\boldsymbol{z}[n], \end{align} where $\boldsymbol{z}[n]$ is a zero-mean, unit-variance complex Gaussian noise, $\boldsymbol{s}[n]$ is the signal composed of $\Ns$ symbols carrying the encoded message, and $\SNR[n]$ is the value of the \gls{snr} in the block-time $n$. We assume that the user is granted access to the channel in predefined, non-consecutive, time blocks. The time-difference between the beginning of the blocks $\boldsymbol{s}[n], \boldsymbol{s}[n+1],\ldots$ is given by $(1+q)\Ns$. It is convenient to think about $q$ as an integer, which should be interpreted as the number of blocks left between two consecutive transmission. We assume also a transmission with a constant power and, thus, the \gls{snr} $\SNR[n]$ captures the variation of the channel. The relationship between the \gls{snr}s $\SNR[n], \SNR[n+1]\ldots$, depends on the channel coherence time $\tau_\tr{coh}$, and we consider two different cases% \begin{enumerate} \item \textbf{Fast fading}, where $q\Ns\gg\tau_\tr{coh}$, and then the \gls{snr}s $\SNR[n], \SNR[n+1], \ldots$ may be modeled as independent random variables. This corresponds to the case of fast-moving users where channel conditions change quickly from one block to another. \item \textbf{Slow fading}, where $q\Ns \ll \tau_\tr{coh}$, and then the transmissions experience the same \gls{snr} in many subsequent blocks, \ie $\SNR[n]\approx\SNR[n+1]\approx\SNR[n+2]\approx\ldots$; this model is suitable for slowly-moving users. \end{enumerate} In the numerical examples, we will use the Rayleigh fading so the \gls{snr} is modeled by a random variable $\SNRrv$ following an exponential distribution \begin{align}\label{PDF_Nakagami_inst_SNR} \pdf_{\SNRrv}(\SNR)=(1/\SNRav)\exp\bigl(-\SNR/\SNRav\bigr), \end{align} where $\SNRav$ is the average \gls{snr}.% \subsection{Physical Layer (PHY): AMC and HARQ} The role of \gls{amc} consists in encoding the information bits, $\boldsymbol{b}$ obtained from the \gls{llc}, and transmitting them over the channel. We assume that the transmission rates to be adopted are taken from the set $\mc{R}=\set{R_l}_{l=1}^L$ (measured in [bits/symbols]); each transmission thus carries an encoded version of $R_lN_s$ bits. This corresponds to the reality of current systems which use predefined sets of transmission rates, each corresponding to a particular \gls{mcs} supported by both the transmitter and the receiver \cite[Sec.~7.2]{3GPP_TS_36.213}. This is different from the approach used in \cite{Kim07}, where the optimized rates depended on $\SNRav$. We note that the performance of the system is, of course, affected by the choice of \gls{mcs}s, nevertheless, the methodology of comparison and the main conclusions we draw are valid independently of a particular choice. The transmitter uses the rate $R_{\hat{l}}$, where $\hat{l}\in\set{1,\ldots,L}$ is the \gls{mcs} index sent by the receiver over the error-free feedback channel, see \figref{fig:HARQ.AMC.model}. Due to the block-fading model \eqref{y.s.snr}, it is enough to discretize the \gls{snr}, $\SNR$ which we also assume to be perfectly estimated at the receiver, \ie \begin{align}\label{hat.l} \hat{l}=\sum_{l=1}^L l~\IND{\SNR\in \mc{D}_l}, \end{align} where $\mc{D}_l$ is the \gls{mcs} \emph{decision region} that can be adjusted in order to maximize the criterion of interest (here, the throughput). It will be formally defined later. \begin{figure}[tb] \hspace{-0.5cm} \scalebox{.7}{\input{./figures/HARQ_MODEL.tex}} \caption{Model of the transmission with the \gls{arq} implemented by the \gls{llc}; \gls{amc} and \gls{harq} belong to \gls{phy}. }\label{fig:HARQ.AMC.model} \end{figure} Another role of \gls{amc} is to prepare the upcoming \gls{harq} transmission rounds. To this end, \gls{amc} encodes the packet into $K$ sub-codewords $\boldsymbol{x}_{1},\ldots, \boldsymbol{x}_{K}$ of equal length. The role of \gls{harq} is to transmit successively these sub-codewords upon reception of \gls{nack} messages. For the moment, we assume that each sub-codeword occupies the whole available block $\boldsymbol{s}[n]$, thus, the information in each round is transmitted with the rate $\R_l$ determined by the \gls{amc} in the first round. This is an important assumption, which allows us to focus the analysis; we will relaxe it later. In \gls{harq}, the information packet $\boldsymbol{b}$ is sent using many channel blocks, so it is convenient to use a packet-oriented notation and denote the respective variables using subindices, \eg $\boldsymbol{y}_{t}$ and $\SNR_t$ will denote the channel outcome and the respective \gls{snr} of the $t$-th round of the packet $\boldsymbol{b}$. The \gls{phy}-related actions terminate when \gls{ack} is received or when the final $K$-th \gls{harq} round is reached. The receiver then discards the channel outcomes and sends a final acknowledgement that is shared with the \gls{llc} layer which takes over the communication process. \subsection{Logical Link Control Layer}\label{Sec:LLC} In our model, the final acknowledgement of \gls{harq} is shared with the \gls{llc} layer as shown schematically in \figref{fig:HARQ.AMC.model}. \gls{llc} ignores the details of the operations of \gls{phy} and only relies on the final \gls{ack}/\gls{nack}, implementing thus a basic form of \gls{arq}: upon reception of \gls{ack}, the packet $\boldsymbol{b}$ is removed from the \gls{llc} buffer; if \gls{nack} is received, the contents (bits) of $\boldsymbol{b}$ are kept in the buffer. Then, a new packet $\boldsymbol{b}'$ is formed, which contains $\Ns \R_{\hat{l}}$ bits ($\hat{l}$ is the \gls{mcs} index obtained by the transmitter at the moment it has to form the packet $\boldsymbol{b}'$). The new packet $\boldsymbol{b}'$ may contain some (or all) of the bits from the previously ``NACKed" packet $\boldsymbol{b}$ which, in general, used a rate $\R_k\neq\R_{\hat{l}}$. The feedback channel carrying one-bit \gls{ack}/\gls{nack} messages at \gls{phy} and \gls{llc} is assumed to be error-free as. theoretically, these bits can be protected with arbitrary strength, whose overhead may be neglected for sufficiently large $\Ns$.\footnote{In practice, the acknowledgement messages for \gls{harq} are received with a non-zero error probability; \eg the \gls{lte} specifies a minimum \gls{snr} requirement for reception of the \gls{ack} messages with errors no greater than 1\% \cite[Sec.~8.3.2.1]{3GPP_TS_36.104}. On the other hand, the acknowledgement messages at the \gls{llc} are grouped for various packets and protected against errors through coding; then they are considered error-free. For tractability, we do not include these elements in our model.} Since the packet is discarded from the \gls{llc} buffer only after \gls{ack} is received, there is no loss of data independently of how unreliable \gls{phy} is. We thus implicitly assumed that we deal with delay-tolerant but loss-sensitive applications, which is justified, for example, when files with critical contents are being transmitted. Because it might not be immediately obvious, we emphasize that implementing \gls{arq} at the \gls{llc} does not change the \gls{llc} throughput seen by the upper layers. In other words, retransmitting the NACKed packets does not degrade the throughput because this criterion is blind to which bits are actually being transmitted -- the fact that the same bits are retransmitted is irrelevant in the throughput evaluation. In fact, the throughput remains the same independently of the number of allowed \gls{arq} rounds at \gls{llc}, \ie truncated \gls{arq} does not change the throughput neither.\footnote{In practice, the addition delay induced by the retransmissions may be a source of the throughput degradation. For example, the TCP may interpret the delay as a congestion and respond by decreasing the size of the transmitted packets, which lowers the throughput. } This is formally stated in \cite{Jabi16}, and it holds in absence of other system-related considerations such as the communication overhead in the feedback channel, or the buffer overflow probability, which we ignore here. In our case, assuming an unlimited number of \gls{arq} rounds leads to the lossless communication which is particularly useful from the theoretical point of view, as it allows us to make a fair comparison between various \gls{phy} strategies using a single criterion -- the throughput. \subsection{Decoding Errors: AMC}\label{Sec:Errors.AMC} The probability of error in the first transmission round, $\err_1$, depends on the experienced \gls{snr} and the adopted rate $R_l$, \ie $\PR{\err_1|R_l,\SNR}=\PER_l(\SNR)$ and it might be established experimentally for a given encoding and decoding. However, for the numerical analysis, it is convenient to use the parametric description of the \gls{per} function \begin{align} \label{PER.SNR} \PER_l(\SNR)&= \begin{cases} 1 &\text{if}\quad \SNR<\SNR_{\tr{th},l}\\ \exp[-\tilde{a}_l (\SNR/\SNR_{\tr{th},l}-1) ] &\text{if}\quad \SNR\geq\SNR_{\tr{th},l} \end{cases} \end{align} where the thresholds $\SNR_{\tr{th},l}$ and the decay parameters $\tilde{a}_l$ should be found from the empirical/measured data. A form similar to \eqref{PER.SNR} has been also used in \cite{Liu04}, which provided tabulated values of $\exp(\tilde{a}_l)$, $\SNR_{\tr{th},l}$, and $\tilde{a}_l/\SNR_{\tr{th},l}$ for a particular class of encoders/modulators and decoders. We found that, a common decay value $\tilde{a}_l=\tilde{a}$ allows for a compact description of the \gls{snr}-\gls{per} relationship for the same family of encoders/decoders: for convolutional codes, $\tilde{a}\approx 4$ fits well the experimental data, while $\tilde{a}\approx 15$ should be used for turbo-coded transmissions with large codewords.\footnote{\cite[Table I]{Liu04} shows the values $a_l=\exp(\tilde{a}_l)$, \ie $\tilde{a}_l=\log{a}_l\in\set{5.6, 4.4, 4.2, 3.9, 4.0, 3.5}$. It is not clear how these $a_l$ were obtained, but the \gls{per} curves in \cite[Fig.~10]{Liu04} may be approximated using a common value $\tilde{a}_l=4$.} Here, instead of matching the value of $\tilde{a}$ to a particular family of \gls{per} curves as done in \cite{Liu04}, we treat $\tilde{a}$ as a parameter which defines how quickly the \gls{per} curve decays as a function of \gls{snr}. Its operational meaning may be defined from \eqref{PER.SNR} in terms of \gls{snr}, $\Delta\cdot\SNR_{\tr{th},l}$, necessary to achieve the desired level of the \gls{per}, $\PER_l(\Delta\cdot\SNR_{\tr{th},l})=\epsilon$, as \begin{align}\label{Delta.epsilon} \Delta={\ln(1/\epsilon)}/{\tilde{a}}+1. \end{align} For example, setting $\epsilon=10^{-2}$, we obtain $\Delta=3.3\dBval$ for $\tilde{a}=4$, and $\Delta=10\dBval$ for $\tilde{a}=0.5$. We also use $I(\SNR_{\tr{th},l})=\R_l$, where $I(\SNR)=\mf{I}(S;Y)$ is the mutual information between the random variables $S$ and $Y$ modeling the transmitted and the received signals $\boldsymbol{s}[n]$ and $\boldsymbol{y}[n]$. This coincides with the threshold decoding of the capacity achieving codes which can be modelled with $\tilde{a}=\infty$; it is convenient because, the results are then comparable to those already presented in the literature for \gls{amc} \cite{Kim07} or \gls{harq} \cite{Caire01}. \subsection{Decoding Errors: HARQ}\label{Sec:Errors} Let $\nack_k=\set{\err_1,\ldots, \err_k}$ be the event of $k$ consecutive decoding errors. Each error event $\err_t$, $t=1,\ldots, k$, depends on the \gls{snr}s experienced in $t$ rounds and on the transmission rate $\R=\R_l$ adopted in the first round. As in \secref{Sec:Errors.AMC}, the probability of this event is given by the \gls{per} function $\PR{\err_t|\R_l}=\PER_l(\SNR_1, \ldots,\SNR_t)$ which now depends on $t$ different \gls{snr}s. However, a multidimensional representation of the \gls{per} is not tractable, and we adopt the simplifying approach of \cite{Wan06, Pauli2007} which reduces the multidimensional function to the following scalar representation \begin{align}\label{MD.2.1D} \PER_l(\SNR_1,\ldots,\SNR_k)\approx\PER_l(\SNR^\Sigma_k), \end{align} where the ``aggregate'' \gls{snr} obtained as \begin{align}\label{aggreg.SNR} \SNR^\Sigma_k=h^{-1}\Big( \sum_{t=1}^k h(\SNR_t)\Big); \end{align} the function $h(\cdot)$ and its inverse $h^{-1}(\cdot)$ depend on the encoding; \ie on the type of \gls{harq}. For \gls{rrharq}, each codeword is the same, \ie $\boldsymbol{x}_1=\ldots=\boldsymbol{x}_K$, and the receiver applies a \gls{mrc}\footnote{\gls{rrharq} is also known as ``Chase combining'' \gls{harq}.} to combine the received signals $\boldsymbol{y}_1,\ldots,\boldsymbol{y}_k$. We thus can use $h(x)=x$, and then $\SNR^\Sigma_k=\sum_{t=1}^k\SNR_k$ is the ``accumulated'' \gls{snr} \cite{Caire01}. In this case, \eqref{MD.2.1D} is exact, and the approximation sign may be removed. In the case of \gls{irharq}, codewords $\boldsymbol{x}_k$, $k=1,\ldots, K$, are obtained by taking non-overlapping elements of the ``mother'' codeword $\boldsymbol{x}_\tr{o}=[\boldsymbol{x}_1,\ldots,\boldsymbol{x}_K]$.\footnote{Codewords $\boldsymbol{x}_k$ are \emph{punctured} versions of $\boldsymbol{x}_\tr{o}$; for example, $\boldsymbol{x}_k$ may consist of new parity symbols/bits in each \gls{harq} round.} As in \cite{Wan06, Park15,Alvarado15}, we will use $h(x)=I(x)$, which is concave so we guarantee that in the case of \gls{irharq} $\SNR^\Sigma_k>\sum_{t=1}^k\SNR_k$. That is, as expected, \gls{irharq} yields smaller probabilities of error compared to \gls{rrharq}. For simplicity, we use $I(\SNR)=\log_2(1+\SNR)$; although this corresponds to a Gaussian model for $S$, it is done merely to simplify the modelling. The final step requires finding the probability of the event $\nack_k$, and we use here the backward error implication assumption, $\err_k \Rightarrow \err_{k-1}\Rightarrow\ldots\Rightarrow\err_1$, already proposed in \cite{Long09, Gu06}, which yields \begin{align} \PR{\nack_k}&=\PR{\err_1,\ldots,\err_k} \label{NACK.ERR} =\PR{\err_k}\approx\PER_k(\SNR_k^\Sigma). \end{align} We quickly note that, although formally $\PR{\nack_k}\leq\PR{\err_k}$, the approximation \eqref{NACK.ERR} is very accurate and should be preferred to the very imprecise $\PR{\nack_k}=\prod_{l=1}^k\PR{\err_l}$, which also appeared in the literature, \eg \cite{Zheng05, Lagrange10}. \subsection{Relation to Previous Works}\label{Sec:state.of.art} The interaction between the \gls{amc} and \gls{harq} has raised a considerable interest in the literature. For instance, the throughput of \gls{harq} with the \gls{amc} was analyzed in \cite{Liu04,Zheng05,Kim08b,Yu10,Ramis11,Zhang13}, and their delay in \cite{Le06,Wang07,Le07,Ishizaki07,Femenias09}. However, the available results do not allow us to draw clear-cut conclusions, mainly because they are based on different assumptions very often connected to a particular coding or channel models. The difficulty is to strike a balance between the simplicity of the analysis and the generality of the conclusions. To address this challenge, we use arguably the simplest non-trivial decoding error model, and consider extreme assumptions with regard to the channel model (slow and fast fading), while all the remaining cases (\eg correlated channels) are expected to yield intermediate results. Furthermore, we initially make no efforts to optimize the operation of \gls{harq}, as done for example in \cite{Ramis11}, providing thus a ``canonical" model for an interaction between the \gls{amc} and \gls{harq}. However, the main difference with the previous works is that we adopt the throughput at \gls{phy} as the unique performance criterion, allowing the \gls{llc} to handle the residual errors of \gls{harq} or the \gls{amc}, at the cost of buffering and delay for the individual packets. The conclusions (and the analysis) change when packet loss or delay are taken into consideration. For example, the authors of \cite{Liu04} analyze the \gls{llc} with \emph{truncated} the \gls{arq} operating on top of the \gls{amc}: under constraints on the probability of packet loss at \gls{llc}, increasing the number of the \gls{arq} rounds allows the \gls{amc} to select rather aggressively the rates providing hence a higher throughput. In our perspective, the loss is irrelevant and the highest throughput is attained by optimizing the \gls{amc} without any constraints, letting the \gls{llc} to deal with the errors. \section{Improving the Throughput via AMC-HARQ Interaction}\label{Sec:Boosting.HARQ} With the lessons from \secref{Sec:Block.fading}, we explore in this section two simple solutions to limit the throughput penalty incurred by the adoption of \gls{harq} on top of the \gls{amc} in fast-fading channels. We do it in two steps. First, we will try to remove the source of the throughput penalty by making \gls{harq} aware of the \gls{csi}; next, we will explore the possibility of increasing the throughput with a more advanced coding. \subsection{AMC-Aware HARQ: Packet dropping}\label{Sec:Aware.harq} The main point from the previous analysis is that, while the receiver observes the \gls{csi}, the adaptation has a very limited scope: the parameters of \gls{harq} are fixed in the first round, and the subsequent ones ($k=2,\ldots, K$) are not affected by the varying \gls{csi}. In \secref{Sub:discussion}, we have also identified situations where \gls{harq} used on top of the \gls{amc} is counterproductive: suppose we observe in the $k$-th round the \gls{mcs} index, $\hat{l}_k$. Using the \gls{amc} the reward can be close to $\R_{\hat{l}_k}$, see \eqref{eta.l.amc}. On the other hand, the reward related to \gls{harq} depends on the first round \gls{mcs} index, $\hat{l}_1$, and may be close to $\R_{\hat{l}_1}$. Therefore, if $\R_{\hat{l}_k}$ is greater than $\R_{\hat{l}_1}$, the \gls{amc} should be used; this modifies the protocol for rounds $k>1$ in the following manner \begin{align} \label{cont.harq} \text{if }\hat{l}_k \leq \hat{l}_1 &\implies\quad \text{continue HARQ}\\ \label{stop.harq} \text{if }\hat{l}_k > \hat{l}_1 &\implies\quad \text{restart HARQ (drop the packet)}. \end{align} In this way, we adapt the number of \gls{harq} transmission rounds to the observed \gls{mcs} indices. Quite clearly, only the performance of \gls{harq} in fast-fading channels will be affected because, under slow-fading model, we observe $\hat{l}_1=\hat{l}_2=\ldots=\hat{l}_K$, and subsequently \eqref{cont.harq} applies in all rounds. Using \eqref{stop.harq}, the \gls{harq} the number of rounds of one cycle may depend on the rate used in the cycle which follows. Thus, to calculate the throughput of the \gls{pdharq} we have just introduced, we cannot directly use the previous formulas based on the expected reward and the expected duration in \emph{one} \gls{harq} cycle. However, this is not an issue since we are merely interested in the throughput with fixed transmission strategy parameters, and we will also use the predefined decision regions of \gls{amc}, $\mc{D}^\tnr{amc}_l$. Therefore, to obtain the results we show in \figref{Fig:MultiPacket}, we used a Monte Carlo integration. We can appreciate that the packet dropping proposed in \eqref{stop.harq} practically eliminates the throughput loss introduced by \gls{harq}. This is an indirect confirmation that the main source of the throughput gap was correctly identified in \secref{Sub:discussion}. \begin{figure}[ht] \psfrag{xlabel}[ct][ct][\siz]{$\SNRav$~[dB] } \psfrag{ylabel}[ct][ct][\siz]{$\gamma_l$ [dB]} \psfrag{G=0.5}[cl][cl][\siz]{$\tilde{a}=0.5$} \psfrag{G=1}[cl][cl][\siz]{$\tilde{a}=1$} \psfrag{G=4}[cl][cl][\siz]{$\tilde{a}=4$} \psfrag{AMC}[cl][cl][\siz]{\gls{amc}} \psfrag{HARQ-packet-drop}[cl][cl][\siz]{\gls{pdharq}} \psfrag{HARQ-VL}[cl][cl][\siz]{\gls{vlharq}} \begin{center} \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_RR_packet_droping}}\\ \scalebox{\siz}{a)}\\ \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_IR_packet_droping}}\\ \scalebox{\siz}{b)} \caption{The throughput obtained using packet-dropping \gls{pdharq} for a)~\gls{rrharq}, and b)~\gls{irharq}, and using variable-length \gls{vlharq}, which can be implemented only for \gls{irharq}.}\label{Fig:MultiPacket} \end{center} \end{figure} \subsection{Adaptive HARQ: Variable-Length Coding}\label{Sec:vlharq} Here, we would like to improve the throughput beyond what \gls{amc} alone can offer, especially in the high-\gls{snr} regime. We follow \cite{Uhlemann03,Visotsky03,Gopalakrishnan08, Kim11,Szczecinski13}, which proposed to use variable-length coding for \gls{harq}; the main idea of \gls{vlharq} is to reduce the number of symbols involved in the transmission of a packet. This can be done by decreasing the length of the codewords in rounds $k=2,\ldots, \kmax$. In order to comply with the constant-length channel block assumptions we used previously, modifications are needed regarding the way the packets are encoded and transmitted in a channel block. First, we redefine the operation of the \gls{amc}. Previously, the rate $\R_l$ was interpreted as a transmitting of one packet containing $\R_l\Ns$ bits per block. We assume henceforth that the packet contents is fixed to $\Nb=R_1\Ns$ bits so selecting the rate $\R_l$ means that the transmission requires $\Nsl{l}=\Nb/\R_l=\ell_l\Ns$ symbols, where $\ell_l=R_1/R_l$ is the normalized length of the codeword.\footnote{Equivalently, $\ell_l$ is the fraction of $\Ns$ required to transmit the packet with the rate $\R_l$.} If we also use $\R_l=l \R_1$, $l=1,\ldots, L$ (as we already did in the numerical examples), then the \gls{amc} transmission with the rate $\R_l$ means that $l$ packets are transmitted in one channel block, as done also in \cite{Liu04,Le06,Szczecinski13}. Since the relationship between the rate $\R_l$ and the length $\ell_l$ is bijective, it is convenient to reformulate the discussion in terms of packet length. The first transmission round of \gls{harq} is done using codewords $\boldsymbol{x}_1$ with the predefined length taken from the set $\mc{L}=\set{1,1/2,\ldots, 1/L}$; we are thus compatible with the \gls{amc}. On the other hand, in the subsequent \gls{harq} rounds we are allowed to use the subcodewords $\boldsymbol{x}_k$ with arbitrary length taken from $\mc{L}$. Since the idea is to use shorter subcodewords in order to decrease the channel use, we may also expand the decision space and use auxiliary set of codewords lengths $\mc{L}'={\ell_{L+1}, \ldots, \ell_{L'}}$, where $\ell_{k-1}<\ell_{k}, k=L+1,\ldots, L'$. Since it is allowed to transmit in the same channel block the ``fresh'' (not transmitted) packets as well as the redundancy codewords for the \gls{nack}ed packets, the operation of \gls{harq} needs to be modified. To do so, we assume that all packets, which are candidates for the transmission are gathered in the \gls{harq} buffer and we index them with $h\in\set{1,\ldots, H}$, where $H\leq \kmax\cdot L $ is the maximum number of packets we need to consider. Let $\set{\ell_h}_{h=1}^H$ denote the length we will assign to each packets in the \gls{harq} buffer, where setting $\ell_h=0$ means, de facto, that the packet is not ``scheduled" for transmission. We will maximize the instantaneous reward for a given \gls{snr}, $\SNR$. As all the packets carry $\Nb$ bits, we solve the following problem: \begin{align}\label{Opt.MultiPacket.Throughput} \set{\hat{\ell}_h}&=\mathop{\mr{argmax}}_{\set{\ell_h}} \sum_{h=1}^H (1-f(h)), \quad\text{s.t.}\quad \sum_{h=1}^H \ell_h\leq1 \end{align} where $f(h)$ is the conditional probability of error for the $h$-th packet, calculated as \begin{align}\label{f.h.def} f(h)=\PR{\err_{k(h)+1}|\err_{k(h)}} \end{align} and $k(h)$ is the \gls{harq} counter of the $h$-th packet (\ie the number of time the packet was scheduled for transmission). To calculate \eqref{f.h.def} we first express the probability of decoding error after $k(h)$ transmissions with the codewords' lengths $\ell_{1}(h),\ldots,\ell_{k(h)}(h)\in\set{\mc{L},\mc{L}'}$ using \eqref{MD.2.1D}--\eqref{aggreg.SNR} \begin{align}\label{PER:multipacket} \PR{\err_k|\ell_{1}(h),\ldots,\ell_{k(h)}(h) }=\PER_{l(h)}(\SNR^\Sigma(h)), \end{align} where, $l(h)$ is the index of the first transmission (\ie $\ell_{l(h)}=\ell_{1}(h)$), and for \gls{irharq} the $\SNR^\Sigma(h)$ is given by \begin{align}\label{aggreg.SNR.Multi} \SNR^\Sigma(h)=I^{-1}\Big( \frac{1}{\ell_{1}(h)}\sum_{t=1}^{k(h)} \ell_{t}(h) I(\SNR_t(h))\Big), \end{align} where $\SNR_{t}(h)$ is the \gls{snr} experienced by the $h$-th packet during the $t$-th round and \eqref{aggreg.SNR.Multi} expresses the fact that the \gls{mi} accumulation depends on the subcodeword lengths. Note that, as expected, \eqref{PER:multipacket} is equivalent to \eqref{MD.2.1D} if $\ell_{1}(h)=\ldots=\ell_{k(h)}(h)$. Thus, using \eqref{NACK.ERR} we calculate \eqref{f.h.def} as \begin{align} f(h)=\frac{\PER_{l(h)}(\SNR'(h))}{\PER_{l(h)}(\SNR^\Sigma(h))}, \end{align} where \begin{align}\label{SNR.prime} \SNR'(h) &= I^{-1}\Big(I(\SNR^\Sigma(h))+\frac{ \ell_h}{\ell_1(h)}\SNR\Big) \end{align} is the aggregate \gls{snr} that will be experienced by the $h$-th packet provided it is scheduled for transmission. After erroneous decoding of the $h$-th packet, signaled by a \gls{nack} message, $k(h)$ is incremented if $k(h)<\kmax-1$ (otherwise the packet is discarded from the \gls{harq} buffer), and $\SNR^\Sigma(h)$ is updated using \eqref{aggreg.SNR.Multi} \begin{align}\label{SNR.sigma.next} \SNR^\Sigma(h)&\leftarrow\SNR'(h). \end{align} We thus see that it is not necessary to keep track of all lengths used to transmit the packet $h$: observing the current \gls{snr}, $\SNR$, and knowing the triplet $\big(k(h), \ell_{1}(h), \SNR^{\Sigma}(h)\big)$, for all the packets $h=1,\ldots, H$, we have enough information to calculate the probability of error for each scheduled packet. We note that, if all the packets in the buffer are fresh, the optimization problem \eqref{Opt.MultiPacket.Throughput} is equivalent to finding the throughput-maximizing rates as done for \gls{amc} when the decision regions are defined by~\eqref{mcD.l}. On the other hand, in presence of packets with \gls{harq} counters $k(h)>0$, the notion of decision regions is less clear; since they become dependent on the parameters of all the packets in the \gls{harq} buffer via \eqref{Opt.MultiPacket.Throughput}, the simple one-to-one relationship between the packet and the transmission rate does not exist anymore. To make a comparison with the \gls{amc} fair, we assume that in order to have a decodable first transmission (\ie $f(h)<1$) we must use the length $\ell\in\mc{L}$. Again, this is motivated by the practical considerations: for example, using a finite-size constellation, such as 16-\gls{qam}, any transmission with rate $\R>4$ (or $\ell<R_1/4$) fails. Therefore, using the instantaneous throughput criterion, the first transmission length must be taken from $\mc{L}$ so we cannot exploit $\mc{L}'$ to improve the throughput of the \gls{amc}. We terminate noting that the memoryless scheduling decisions obtained solving \eqref{Opt.MultiPacket.Throughput} are suboptimal in terms of long-term throughput. In general, finding the optimal set $\set{\hat{\ell}_h}_{h=1}^H$ is difficult mainly due to the dependence of the throughput on the future decisions and would have to be solved using a framework of \gls{mdp}; a problem is compounded by the dimensionality of the observation space. The numerical results we show in \figref{Fig:MultiPacket} are obtained by Monte Carlo simulations, where the set of lengths $\mc{L}=\set{1,1/2,1/3,1/4,1/5}$ is the same as in all previous examples, and the auxiliary set is given by $\mc{L}' =\set{1/8, 1/12, 1/16}$. The discrete optimization problem defined in \eqref{Opt.MultiPacket.Throughput} was solved by exhaustive search over the entire solution space; this is possible here due to a relatively small dimensionality of the sets $\mc{L}$ and $\mc{L}'$. The improvement of the throughput of \gls{vlharq} comparing to \gls{amc}-\gls{harq} is clear for high values of $\SNRav$ despite of the sub-optimality of the objective function \eqref{Opt.MultiPacket.Throughput}. We conducted more experiments including smaller length $\ell$ in $\mc{L}'$, but changes in the throughput we observed were not significant. On the other hand, it is was indeed necessary to use $\mc{L}'$ in order to improve the throughput in high \gls{snr}. This is because, under such operating conditions, the first transmission is very likely to use the shortest codewords from $\mc{L}$ and thus, to decrease the average transmission time, we need to use shorter codewords from $\mc{L}'$. \section{Numerical results}\label{Sec:Numerical.Res} \section{HARQ: Slow Fading}\label{Sec:slow.fading} In the case of slow-fading channels, we may assume that the \gls{snr}, $\SNR$, remains constant during many blocks $\boldsymbol{s}[n]$, which we treat together as a ``super channel-block''. We may then apply the same approach we already used to analyze \gls{amc}, and calculate the throughput as \begin{align}\label{eta.harq.slow} \eta^{\tnr{harq}}_{K}&=\sum_{l=1}^L \int_{x \in\mc{D}_{l}}\pdf_{\SNRrv}(x) \eta^{{\tnr{harq}}}_{K,l}(x) \dd x, \end{align} where again $\mc{D}_{l}$ is the \gls{snr} decision region in which we use the transmission rate $\R_l$, and $ \eta^{{\tnr{harq}}}_{K,l}(x)$ is the throughput of \gls{harq} carried out with the rate $\R_l$ over \gls{snr} $x$. The main questions are: how to calculate $\eta^{{\tnr{harq}}}_{K,l}(x)$, and how to find the optimal decision regions $\mc{D}_l$? As to the throughput, $\eta^{{\tnr{harq}}}_{K,l}(x)$, the number of channel blocks used to transmit the information packet is now variable due to the decoding errors whose probability is captured by the \gls{per} function in~\eqref{PER.SNR}. Modeling \gls{harq} rounds by the states of a Markov process, the beginning of the \gls{harq} cycle corresponds to the renewal of the process. Thus, we can use the renewal-reward theorem to obtain \cite{Zorzi96,Caire01,Zheng05},\cite[Ch.~2.3]{Wolff89_Book} \begin{align}\label{eta.renew.reward.slow} \eta^{{\tnr{harq}}}_{K,l}(\SNR)=\frac{\Ex[\mf{R}_l]}{\Ex[\mf{T}_l]}, \end{align} where $\mf{R}_l\in\set{\R_l,0}$ is a random ``reward'' (here, the number of successfully delivered bits normalized by the number of symbols, $\Ns$) at the end of the \gls{harq} cycle, and $\mf{T}_l\in\set{1,\ldots,K}$ is a random inter-renewal time, \ie the number of \gls{harq} rounds. The expectations in \eqref{eta.renew.reward.slow} are taken with respect to the decoding errors $\err_1, \ldots, \err_K$ which, conditioned on $\SNRrv=\SNR$, are independent from one \gls{harq} cycle to another. Thus, the reward $\mf{R}_l$ and the time $\mf{T}_l$ are also independent between cycles. This is, in fact, the necessary condition to use the renewal-reward theorem~\eqref{eta.renew.reward.slow} \cite[Ch.~2.3]{Wolff89_Book}. On the other hand, $\mf{R}_l$ and the time $\mf{T}_l$ are not \emph{unconditionally} independent, because they depend on the same realization of the \gls{snr}. For this reason, the expectation cannot be taken with respect to $\SNRrv$ as it would imply that the \gls{snr} is independent between the \gls{harq} cycles; while this approach may be suitable in bursty communication scenarios~\cite[Sec.~IV.B]{Shen09}\cite[Sec.~IV]{Makki14}, it is inappropriate in our case.\footnote{A direct consequence of bursty communications assumption is that the transmissions over ``better'' channels require shorter times than those made over ``worse'' channels. This creates a coupling between the channel model and the transmission protocol \cite{Makki14} which is undesirable in our communication model.} The throughput can be hence calculated as \cite{Caire01,Zheng05} \begin{align}\label{eta.harq.slow.l} \eta^{{\tnr{harq}}}_{K,l}(\SNR)=\frac{\R_l(1-f_{K,l}(\SNR))}{1+\sum_{k=1}^{K-1} f_{k,l}(\SNR)}, \end{align} where \begin{align}\label{} f_{k,l}(\SNR)=\PR{\err_1,\ldots,\err_k| \R_l} \end{align} is the probability of $k$ consecutive decoding errors conditioned on having the first \gls{harq} round carried out with the rate $\R_l$. These are calculated using the approach explained in~\eqref{NACK.ERR} \begin{align}\label{} f_{k,l}(\SNR)\approx\PER_l (\SNR_k^\Sigma), \end{align} where $\SNR_k^\Sigma$ is obtained from \eqref{aggreg.SNR}, and thus depends on the type of \gls{harq}. In particular, for \gls{rrharq} we have $\SNR_k^\Sigma=k\SNR$, while for \gls{irharq} it is obtained through $I(\SNR_k^\Sigma)=kI(\SNR)$, where $I(x)=\log_2(1+x)$ (see also \secref{Sec:Errors}). For notational convenience, we use $f_{0,l}(\SNR)\triangleq1$. Before progressing any further, we first address the following simple question: does the throughput of \gls{harq} increase with then number of allowed transmissions, $\kmax$? \begin{proposition}\label{Thm22} If \begin{align}\label{fk.cond.sup} \frac{f_{k+1,l}(\SNR)}{f_{k,l}(\SNR)} \leq \frac{f_{k,l}(\SNR)}{f_{k-1,l}(\SNR)}, \quad \forall k\ge 1 \end{align} then, for $\eta^{{\tnr{harq}}}_{K,l}(\SNR)$ given by \eqref{eta.harq.slow.l}, the following holds: $\eta^{{\tnr{harq}}}_{K,l}(\SNR)\leq\eta^{{\tnr{harq}}}_{K+1,l}(\SNR)$. Moreover, if there exists $k$ for which the inequality in~\eqref{fk.cond.sup} is strict, then we obtain a strict inequality $\eta^{{\tnr{harq}}}_{K,l}(\SNR)<\eta^{{\tnr{harq}}}_{K+1,l}(\SNR)$. \begin{proof} Our objective is to derive a sufficient condition, under which the expression \begin{align}\label{} \eta_K=\frac{R(1-f_{K})}{1+\sum_{k=1}^{K-1} f_{k}} \end{align} is increasing with $K$, where the dependence on $l$ and $\SNR$ is removed from \eqref{eta.harq.slow.l} for notational brevity. That is we require \begin{align}\label{eta.harq.appendix} \eta_{K}\leq\eta_{K+1}&\implies \frac{R\big(1-f_{K}\big)}{1+\sum_{k=1}^{K-1} f_{k}} \le\frac{R\big(1-f_{K+1}\big)}{1+\sum_{k=1}^{K} f_{k}}\\ &\implies f_{K+1}\big(1 + \sum_{k=1}^{K-1} f_{k}\big) \le f_{K}\sum_{k=1}^{K} f_{k}\implies \label{final.cond} \sum_{k=1}^{K} f_{K+1} f_{k-1} \le \sum_{k=1}^{K} f_{K} f_{k}. \end{align} Obviously, \eqref{final.cond} is a necessary and sufficient condition for the throughput to be increasing with $K$. To remove the dependence on the sum, we strengthen \eqref{final.cond} by imposing the inequality on each term yielding the sufficient (not necessary) condition $f_{K+1} f_{k-1}\le f_{K} f_{k}\quad \forall k\le K$, which must hold $\forall K \ge 1$; this is \eqref{fk.cond.sup}. Any strict inequality will make the inequality in \eqref{eta.harq.appendix} strict as well. This terminates the proof. \end{proof} \end{proposition} The above proposition rectifies the conditions exposed in~\cite[Sec.~IV]{Caire01}, where the ``subgeometric'' property $f_{k,l}< f_{1,l}^k$ was conjectured as a sufficient condition for the throughput to be increasing with $K$. In fact, it is not, as we may show by constructing a subgeometric relationship and yet obtaining a non-increasing throughput with $K$. For example: the subgeometric terms $f_{2}=0.5f_{1}^2, f_{3}=0.75f_{1}^3$ yield $\eta^{{\tnr{harq}}}_{2}>\eta^{{\tnr{harq}}}_{3}$, which invalidates the conjecture of~\cite{Caire01}. The value of \propref{Thm22} is that, if the error probabilities in \gls{harq} satisfy the conditions \eqref{fk.cond.sup}, we can guarantee that \gls{harq} will improve the throughput of \gls{amc} provided the same \gls{snr} decision regions are used, \ie $\mc{D}_l=\mc{D}^{\tnr{amc}}_l$. It is easy to show that the conditions in \propref{Thm22} are satisfied using \gls{rrharq} and \gls{irharq} under the decoding model of \secref{Sec:Errors}. Thus, \gls{harq} will outperform the \gls{amc} in the slow-fading channels, and the gains may be larger if the decision regions \eqref{mcD.l} take into account the reality of \gls{harq} and are redefined as follows \begin{align}\label{mcD.l.harq} \mc{D}^{{\tnr{harq}}}_l=\set{\SNR: \eta^{{\tnr{harq}}}_{K,l}(\SNR) \ge \eta^{{\tnr{harq}}}_{K,k}(\SNR), \quad \forall k\neq l}. \end{align} \begin{figure}[bt] \psfrag{xlabel}[ct][ct][\siz]{$\SNR$~[dB] } \psfrag{ylabel}[ct][ct][\siz]{$\eta^{{\tnr{harq}}}_{K,l}(\SNR)$} \psfrag{R-1}[lc][lc][\siz]{$R_4$} \psfrag{R-2}[lc][lc][\siz]{$R_5$} \psfrag{etaAMC1}[rc][cc][\siz]{$\eta_4(\SNR)$~~} \psfrag{etaAMC2}[lc][lc][\siz]{$\eta_5(\SNR)$} \psfrag{etaHARQ1}[lc][lc][\siz]{$\eta^{{\tnr{harq}}}_{K,5}(\SNR)$} \psfrag{etaHARQ2}[lc][lc][\siz]{$\eta^{{\tnr{harq}}}_{K,4}(\SNR)$} \begin{center} \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/th_compare_Slow}} \caption{In slow-fading channels, decision regions $\mc{D}^{\tnr{harq}}_l$ are unions of intervals. Here, $R_4=3$, $R_5=3.75$, and we assume \gls{irharq} with $K=4$. $\tilde{a}=4$.}\label{Fig:th_comp_slow} \end{center} \end{figure} Here, however, we may run into a difficulty because the throughput $\eta^{{\tnr{harq}}}_{K,l}(\SNR)$ is not a concave function of $\SNR$. Since then, the unique intersection condition we obtained in~\propref{Prop:Intersection} cannot be guaranteed, the decision regions $\mc{D}^{{\tnr{harq}}}_l$, in general, are non-convex sets and should be represented by the union of intervals as shown in the following example. \begin{example}\label{Ex:2.eta.harq.slow} With two rates $R_5=3.75$ and $R_4=3$ -- as in~\exref{Ex:AMC}, and \gls{irharq} with $K=4$, we can see from~\figref{Fig:th_comp_slow} that each decision region $\mc{D}^{\tnr{harq}}_4$ (shaded) and $\mc{D}^{\tnr{harq}}_5$ (white) is the union of intervals. The boundary of the right-most piece of $\mc{D}^{\tnr{harq}}_5$ is shown with a black marker, where we can observe it being close to the boundary of $\mc{D}^\tnr{amc}_5$ (shown with a white marker). Moreover, in most of the practical cases the rates are relatively close to each other, then if $R_l>R_{l-1}/2$ is ensured, it means that the boundary of $\mc{D}^{\tnr{harq}}_l$ will be very close to the boundary of $\mc{D}^\tnr{amc}_l$. Furthermore, if sufficiently ``dense" set of rates $\mc{R}$ is available, the region of the achievable throughput is well covered. \end{example} While, in theory, the system may operate with arbitrary $\mc{D}^{{\tnr{harq}}}_l$, it is much more convenient to use intervals as in the case of \gls{amc}. In fact, using $\mc{D}^\tnr{amc}_l$ is not a bad idea since \propref{Thm22} confirms that the throughput will increase when using \gls{harq} on top of the \gls{amc}. \begin{figure}[bt!] \psfrag{xlabel}[ct][ct][\siz]{$\SNRav$ [dB] } \psfrag{ylabel}[ct][ct][\siz]{Throughput} \psfrag{G=0.5}[lc][lc][\siz]{$\tilde{a}=0.5$} \psfrag{G=4}[cl][cl][\siz]{$\tilde{a}=4$} \psfrag{AMC}[bl][bl][\siz]{AMC} \psfrag{HARQ-RR-xxx}[bl][bl][\siz]{\gls{rrharq}, $\mc{D}^{\tnr{harq}}_l$} \psfrag{HARQ-IR-opt}[bl][bl][\siz]{\gls{irharq}, $\mc{D}^{\tnr{harq}}_l$} \psfrag{HARQ-IR-AMC}[bl][bl][\siz]{\gls{irharq}, $\mc{D}^\tnr{amc}_l$} \begin{center} \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_RR_AMC_SLOW}}\\ \scalebox{\siz}{a)}\\ \scalebox{\sizf}{\includegraphics[width=\linewidth]{./figures/HARQ_IR_AMC_SLOW}}\\ \scalebox{\siz}{b)} \caption{Throughput of \gls{amc} and \gls{amc}-\gls{harq} for slow-fading channels using a)~\gls{rrharq}, and b)~\gls{irharq}.}\label{Fig:Slow.fading} \end{center} \end{figure} \begin{example} In~\figref{Fig:Slow.fading}, we compare the throughput obtained using the \gls{amc} and \gls{harq} with rates from the set $\mc{R}$ as in \exref{Ex:AMC}. Both \gls{irharq} and \gls{rrharq} are considered with $K=4$ rounds, where we also consider two cases for the decision regions for \gls{harq}, namely, $\mc{D}^\tnr{amc}_l$ and $\mc{D}^{\tnr{harq}}_l$. Two coding strengths are considered: $\tilde{a}\in\set{0.5, 4}$. As expected, the throughput of \gls{harq} is improved with respect to the \gls{amc} even if ${\mc{D}}^{\tnr{amc}}_{l}$ is used. The gains of using the optimal decision regions $\mc{D}^{{\tnr{harq}}}_{l}$ are important only for \gls{irharq}; they are notable in low \gls{snr} and are pronounced for weak codes. On the other hand, in the case of \gls{rrharq}, we obtain $\mc{D}^{{\tnr{harq}}}_{l}\approx\mc{D}^{\tnr{amc}}_{l}$ and that is why we do not show two distinct curves in this case. \end{example}
{'timestamp': '2016-06-17T02:10:24', 'yymm': '1606', 'arxiv_id': '1606.05177', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05177'}
arxiv
\section{Introduction} \label{sec:intro} \input{introduction.tex} \label{sec:related} \section{Data and Context} \label{sec:data} \input{data.tex} \section{Feature Engineering} \label{sec:features} \begin{figure*}[htb!] \centering \begin{minipage}[t]{0.55\linewidth} \includegraphics[width=3.5in]{./figs/states.png} \caption{Deterministic Finite Automaton\label{fig:states}} \end{minipage} \begin{minipage}[t]{0.4\linewidth} \includegraphics[width=3in]{./figs/tree.png} \caption{Tree-based feature classification \label{fig:tree}} \end{minipage} \end{figure*} \input{features.tex} \section{Results} \label{sec:results} \label{sec:methods} \input{results.tex} \section{Discussion and Conclusions} \label{sec:discussion} \label{sec:conclusion} \input{discussion.tex} \clearpage \subsection{Predicting Mobile Money Use} We use a variety of supervised learning algorithms to attempt two classification tasks: Voice Only vs. Registered User, and Voice Only vs. Active User. For this task, we drew a stratified random sample of 10,000 subscribers from each of the three user types from each of the three countries. Here, we focus on the results from gradient boosting \cite{friedman2001greedy}, which marginally outperformed other common classifiers including logistic regression, svm, and so forth. As shown in the Figure \ref{fig:accuracy}, the gradient boosting with DFA based features significantly outperforms the naive baseline, and we achieve marginally better success in identifying Active Mobile Money users than Registered Mobile Money users in all of the countries. We will return to the interpretation of these results in Section \ref{sec:discussion}. \begin{figure*}[htb] \centering \begin{minipage}[t]{0.48\linewidth} \includegraphics[width=3in]{./figs/Accuracy.png}% \end{minipage} \begin{minipage}[t]{0.48\linewidth} \includegraphics[width=3in]{./figs/transfer.png}% \end{minipage} \caption{Model Accuracy. Left figure shows accuracy in identifying Mobile Money users within each country; Right figure shows Accuracy when model is trained in one country and evaluated in another\label{fig:accuracy}.} \end{figure*} \subsection{Determinants of Mobile Money Adoption} To investigate the prominant denominators of Mobile Money adoption, we calculate the \textit{AUC} from a bivariate logistic regression of the response variable on each individual feature. We also calculate the \textit{normalized feature importance (NFI)} as the {relative} significance of each feature in the final gradient boosting classifier operating on all of the features. The distribution of unconditional AUC values for all the features generated through the methods explained in section \ref{sec:features} is shown in Figure \ref{fig:ghana_vio} (left panel), using Ghana as a test case. Each violin plot shows the distribution of AUC values for all features of a given type - such as all ``ego'' features, or all ``movement'' features. While a large number of features have AUC values near 0.5, there are a small number of highly predictive features with AUC$\geq$0.75. The right panel of Figure \ref{fig:ghana_vio} shows the distribution of AUC values for the subset of features related to the subscriber's first degree network (Actor=``Voice Alters'' and Type=``All''), a subset that is generally more predictive of Mobile Money use in Ghana. Here, the range of AUC values is significantly higher than in the full set of features, and some sub-classes such as ``Network'', which capture the structure of the subscriber's first degree network, have uniformly high predictive power.% \begin{figure*}[htb!] \centering \begin{minipage}[t]{0.48\linewidth} \includegraphics[width=.92\textwidth]{./figs/ghana_vio1.png} \end{minipage} \begin{minipage}[t]{0.48\linewidth} \includegraphics[width=.92\textwidth]{./figs/ghana_vio2.png} \end{minipage} \caption{Distribution of AUC values for each feature category. Left figure shows all features in Ghana; Right figure shows the subset of features in Ghana where Actor=`Voice Alters' and Type=`All'\label{fig:ghana_vio}} \end{figure*} Figure \ref{fig:nfi} shows the NFI distribution obtained through gradient boosting model operating on all of the features. Just like unconditional ranking, each class of features in this case also contains a mass of features with low predictive power, but perhaps most striking in Figure \ref{fig:nfi} are the differences between countries in the relative importance of each class of features. \begin{figure*}[htb] \centering \begin{minipage}[t]{0.32\linewidth} \includegraphics[width=.98\textwidth]{./figs/nfi_ghana_v3.png} \end{minipage} \begin{minipage}[t]{0.32\linewidth} \includegraphics[width=.98\textwidth]{./figs/nfi_pakistan_v3.png} \end{minipage} \begin{minipage}[t]{0.32\linewidth} \includegraphics[width=.98\textwidth]{./figs/nfi_zambia_v3.png} \end{minipage} \caption{Normalized feature importance\label{fig:nfi}} \end{figure*} \subsection{Learning Across Cultures?} Our standardized methods and analysis performed across all three countries. This makes it possible to answer a question that has been elusive in prior studies of the adoption of new technologies in developing countries: \textit{Do the behavioral determinants of adoption identified in one context generalize to another?} Based on the analysis we have performed, our short answer to this question appears to be, ``No." The right panel of Figure \ref{fig:accuracy} shows the performance of a classifier trained in one country and evaluated in another. The first set of six bars shows that the classifiers trained in Ghana perform well in Ghana (the first two grey bars), replicating the results in Figure \ref{fig:accuracy}. However, that same Ghana model does quite poorly when evaluated in Zambia (the next two blue bars) or Pakistan (the final two green bars). While it is almost certain that a more sophisticated approach to transductive transfer learning would perform better \cite{pan_domain_2011}, the naive application of a model out of context is quite ineffective.
{'timestamp': '2016-06-17T02:08:08', 'yymm': '1606', 'arxiv_id': '1606.05105', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05105'}
arxiv
\section{INTRODUCTION} Kernel methods such as support vector machines and Gaussian processes are very popular in machine learning. While early work relied on dual optimization, recent large-scale kernel methods focus on the primal optimization problem where the input data are mapped to a finite-dimensional feature space and the weights are learned using fast \mbox{linear} optimization techniques, e.g., stochastic gradient descent. \citet{rahimi2007random} proposed to approximate shift-invariant kernels by mapping the inputs to so-called \emph{random features}, constructed so that the inner product of two mapped data points approximates the kernel evaluated at those two points (which is the inner product in the feature space corresponding to the kernel). \citet{rahimi2007random} proposed two random feature construction schemes: \emph{random Fourier features}, where data points are projected onto random vectors drawn from the Fourier transform of the kernel and then passed through suitable non-linearities; and \emph{random binning}, where the input space is partitioned by a random regular grid into bins and data points are mapped to indicator vectors identifying which bins they end up in. Both of these approaches require specifying the kernel hyperparameters in advance, so that the appropriate distribution is used for sampling the random vectors or random grids, respectively. However, a suitable kernel width (length-scale) is often not known a priori and is found by cross-validation, or, where available, marginal likelihood optimization. In practice, this entails constructing a new feature space and training a linear learner from scratch for each kernel width, which is computationally expensive. Using a suitable kernel width is often more important than the choice of kernel type \citep{scholkopf_learning_2001}, so a fast kernel width selection method is desirable. We describe a connection between the Laplace kernel and the Mondrian process \citep{RT09}, and leverage it to develop a random feature approximation to the Laplace kernel that addresses the kernel width selection problem. This approximation, which we call the \emph{Mondrian kernel}, involves random partitioning of data points using a Mondrian process, which can be efficiently reused for all kernel widths. The method preserves the nonparametric nature of kernel learning and is also suitable for online learning. The Mondrian kernel reveals an interesting link between kernel methods and decision forests \citep{RF,DF}, another popular class of nonparametric methods for black-box prediction tasks. The Mondrian kernel resembles \emph{Mondrian forests}, a decision-forest variant introduced by \citet{MF}, where a Mondrian process is used as the randomization mechanism. The efficiently trainable Mondrian forests excel in the online setting, where their distribution is identical to the corresponding batch Mondrian forest, and have been successfully applied to both classification and regression \citep{MF, MFreg}. Mondrian forests and the Mondrian kernel both lead to randomized, non-linear learning algorithms whose randomness stems from a Mondrian process. The former fits parameters corresponding to different Mondrian trees independently, while the latter fits them jointly. We compare these methods theoretically and thus establish a novel connection between the Laplace kernel and Mondrian forests via the Mondrian kernel. The contributions of this paper are: \begin{itemize} \item a review of the Mondrian process using the simple notion of competing exponential clocks (Section~\ref{sec:TheMondrianProcess}); \item a novel connection between the Mondrian process and the Laplace kernel (Section~\ref{sec:TheMondrianKernel}), yielding a fast approximation to learning with the Laplace kernel; \item an efficient procedure for learning the kernel width from data (Section~\ref{sec:LengthscaleLearning}); and \item a comparison between Mondrian kernel and Mondrian forest that provides another connection between kernel learning and random forests (Section~\ref{sec:ForestConnection}). \end{itemize} \section{MONDRIAN PROCESS} \label{sec:TheMondrianProcess} For completeness, we review the Mondrian process \citep[Chapter 5]{RT09,RoyThesis}. Although simple and perhaps well known to experts, our exposition through competing exponential clocks has not explicitly appeared in this form in the literature. Readers familiar with the Mondrian process may skip this section on first reading. \subsection{TERMINOLOGY} An \emph{axis-aligned box} $\mathcal{X} = \mathcal{X}_1 \times \cdots \times \mathcal{X}_D \subseteq \Reals^D$ is a Cartesian product of $D$ bounded intervals $\mathcal{X}_d \subseteq \Reals$. Their total length $|\mathcal{X}_1| + \cdots + |\mathcal{X}_D|$ is the \emph{linear dimension of} $\mathcal{X}$. A \emph{guillotine partition} of $\mathcal{X}$ is a hierarchical partitioning of $\mathcal{X}$ using axis-aligned cuts. Such a partition can be naturally represented using a strictly binary tree. An \emph{exponential clock with rate} $r$ takes a random time $T \sim \Exp(r)$ to ring after being started, where $\Exp(r)$ is the exponential distribution with rate (inverse mean) $r$. The notion of \emph{competing exponential clocks} refers to $D$ independent exponential clocks with rates $r_1, \ldots, r_D$, started at the same time. It can be shown that (1) the time until some clock rings has $\Exp( \sum r_d)$ distribution, (2) it is the $d$-th clock with probability proportional to $r_d$, and (3) once a clock rings, the remaining $D - 1$ clocks continue to run independently with their original distributions. \subsection{GENERATIVE PROCESS} \label{sec:MondrianGenerativeProcess} The Mondrian process on an axis-aligned box $\mathcal{X} \subseteq \Reals^D$ is a time-indexed stochastic process taking values in guillotine-partitions of $\mathcal{X}$. It starts at time $0$ with the trivial partition of $\mathcal{X}$ (no cuts) and as time progresses, new axis-aligned cuts randomly appear, hierarchically splitting $\mathcal{X}$ into more and more refined partitions. The process can be stopped at a lifetime $\lambda \in [0, \infty)$, which amounts to ignoring any cuts that would appear after time $\lambda$. To describe the distribution of times and locations of new cuts as time progresses, we associate an independent exponential clock with rate $|\mathcal{X}_d|$ to each dimension $d$ of $\mathcal{X}$. Let $T$ be the first time when a clock rings and let $d$ be the dimension of that clock. If $T > \lambda$ then this process terminates. Otherwise, a point $a$ is chosen uniformly at random from $\mathcal{X}_d$ and $\mathcal{X}$ is split into $\mathcal{X}^{<} = \{ \mathbf{x} \in \mathcal{X} \mid x_d < a \}$ and $\mathcal{X}^{>} = \{ \mathbf{x} \in \mathcal{X} \mid x_d > a \}$ by a hyperplane in dimension $d$ that is perpendicular to $\mathcal{X}_d$ at point $a$. After making this first cut, the remaining $D - 1$ clocks are discarded and the generative process restarts recursively and \emph{independently} on $\mathcal{X}^{<}$ and $\mathcal{X}^{>}$. However, those processes start at time $T$ rather than $0$ and thus have less time left until the lifetime $\lambda$ is reached. The specification of the generative process on $\mathcal{X}$ is now complete. % Due to the properties of competing exponential clocks, the time until the first cut appears in $\mathcal{X}$ has exponential distribution with rate equal to the linear dimension of $\mathcal{X}$ and the dimension $d$ in which the cut is made is chosen proportional to $|\mathcal{X}_d|$. This confirms equivalence of our generative process to the one proposed by \citet{RT09}. Finally, we note that a.s.~the Mondrian process does not explode, i.e., for every lifetime $\lambda \in [0, \infty)$, the process generates finitely many cuts with probability $1$ \citep{RoyThesis}. \begin{figure}[tb] \centering \begin{subfigure}[t]{0.20\textwidth} \centering \includegraphics[width=\linewidth]{figures/mondrian-sample-1x1} \caption{} \end{subfigure}% ~ \begin{subfigure}[t]{0.28\textwidth} \centering \includegraphics[width=\linewidth]{figures/mondrian-sample-1x1-tree} \caption{} \end{subfigure}% \caption{(a) Sample of a Mondrian process on the axis-aligned box $\mathcal{X} = [0, 1] \times [0, 1] \subseteq \Reals^2$ with lifetime $\lambda = 1.0$. Numbers on the cuts (shown in green) indicate the times when they appeared. The first cut appeared at time $T = 0.23$, in dimension $d = 1$, at location $a = 0.66 \in \mathcal{X}_1$. (b) Representing the Mondrian sample as a strictly binary tree, with new nodes (shown as circles) appearing as time (y-axis) progresses. The two numbers below each node show the rates of the two exponential clocks competing to split that node, with the winning clock's rate shown in green.} \label{fig:MondrianSample} \end{figure} \subsection{PROJECTIVITY} If a Mondrian process runs on $\mathcal{X}$, what distribution of random partitions does it induce on an axis-aligned subbox $\mathcal{A} \subseteq \mathcal{X}$? (See Figure~\ref{fig:ConsistencySubfigure1} for an illustration in $D = 2$ dimensions.) The Mondrian process was constructed so that the answer is the Mondrian process itself \citep{RoyThesis}. Here we explain this projectivity property using the notion of competing exponential clocks. To argue that the resulting process on $\mathcal{A}$ is indeed a Mondrian process, we show that the process running on $\mathcal{X}$ generates cuts in $\mathcal{A}$ in the same way as a Mondrian process running directly on $\mathcal{A}$ would. Recall that each dimension $d$ of $\mathcal{X}$ is associated with an exponential clock with rate $|\mathcal{X}_d|$ and if it rings first, the cut location is chosen uniformly at random from $\mathcal{X}_d$. This procedure can be equivalently represented using two competing clocks for each dimension (rather than just one): \begin{itemize} \item Clock $\mathcal{C}^d_{\mathcal{A}}$ with rate $|\mathcal{A}_d|$. If this clock rings first, the cut location is chosen uniformly at random from $\mathcal{A}_d$. \item Clock $\mathcal{C}^d_{\lnot \mathcal{A}}$ with rate $|\mathcal{X}_d| - |\mathcal{A}_d|$. If it rings first, the cut location is sampled uniformly from $\mathcal{X}_d \setminus \mathcal{A}_d$. \end{itemize} (See Figure~\ref{fig:ConsistencySubfigure2}.) Note that the clocks $\mathcal{C}^1_{\mathcal{A}}, \ldots, \mathcal{C}^D_{\mathcal{A}}$ represent the same cut distribution as a Mondrian process running on $\mathcal{A}$ would. If a clock $\mathcal{C}^d_{\lnot \mathcal{A}}$ rings first, a cut is made outside of $\mathcal{A}$ and all of $\mathcal{A}$ remains on one side of this cut. None of the clocks $\mathcal{C}^d_{\mathcal{A}}$ have rung in that case and would usually be discarded and replaced with fresh clocks of identical rates, but by property (3) of competing exponential clocks, we can equivalently reuse these clocks (let them run) on the side of the cut containing $\mathcal{A}$. (Figure~\ref{fig:ConsistencySubfigure3} shows a cut in dimension $d=1$ that misses $\mathcal{A}$ and the reused clocks $\mathcal{C}^d_{\mathcal{A}}$). Hence, cuts outside $\mathcal{A}$ do not affect the distribution of the first cut crossing $\mathcal{A}$, and this distribution is the same as if a Mondrian process were running just on $\mathcal{A}$. When a cut is made within $\mathcal{A}$ (see Figure~\ref{fig:ConsistencySubfigure4}), the process continues on both sides recursively and our argument proceeds inductively, confirming that the Mondrian process on $\mathcal{X}$ generates cuts in $\mathcal{A}$ in the same way as a Mondrian process on $\mathcal{A}$ would. \begin{figure}[t!] \vspace{-0.5em} \begin{subfigure}[t]{0.25\textwidth} \hspace{0.5em} \includegraphics[scale=0.74]{figures/consistency-fig1} \caption{} \label{fig:ConsistencySubfigure1} \end{subfigure}% ~ \begin{subfigure}[t]{0.25\textwidth} \hspace{-0.1em} \includegraphics[scale=0.74]{figures/consistency-fig2} \caption{} \label{fig:ConsistencySubfigure2} \end{subfigure}% \begin{subfigure}[t]{0.25\textwidth} \hspace{0.5em} \includegraphics[scale=0.74]{figures/consistency-fig3} \caption{} \label{fig:ConsistencySubfigure3} \end{subfigure}% ~ \begin{subfigure}[t]{0.25\textwidth} \hspace{0.9em} \includegraphics[scale=0.74]{figures/consistency-fig4} \caption{} \label{fig:ConsistencySubfigure4} \end{subfigure} \caption{(a) A Mondrian process running on $\mathcal{X} = \mathcal{X}_1 \times \mathcal{X}_2$ generates cuts (dashed lines), some of which intersect $\mathcal{A} = \mathcal{A}_1 \times \mathcal{A}_2$ (green lines) and thus induces a random partition of $\mathcal{A}$. (b) Representing the first cut distribution using $2D = 4$ competing exponential clocks: in each dimension $d$, clock $\mathcal{C}^d_{\mathcal{A}}$ corresponds to the region where making a cut splits $\mathcal{A}$ (shown in green) and clock $\mathcal{C}^d_{\lnot \mathcal{A}}$ to the (disconnected) region where making a cut misses $\mathcal{A}$ (shown in red). (c) Cut outside $\mathcal{A}$: reusing the clocks $\mathcal{C}^1_{\mathcal{A}}$, $\mathcal{C}^2_{\mathcal{A}}$ on the side of the cut containing $\mathcal{A}$. (d) Cut inside $\mathcal{A}$ (shown in black): the argument proceeds by induction on both sides.} \label{fig:ConsistencyIntuitionFigure} \end{figure} \subsection{MONDRIAN PROCESS ON $\Reals^D$} \label{sec:MondrianProcessUnbounded} The Mondrian process on $\Reals^D$ is defined implicitly as a time-indexed stochastic process such that its restriction to any axis-aligned box $\mathcal{X} \subseteq \Reals^D$ is a Mondrian process as defined in section~\ref{sec:MondrianGenerativeProcess}. Fortunately, this infinite-dimensional object can be compactly represented by instantiating the Mondrian process only in regions where we have observed data. As we observe new data points, the Mondrian sample can be extended using the \emph{conditional Mondrian} algorithm \citep{RT09}, a simple and fast sampling procedure for extending a Mondrian sample in an axis-aligned box $\mathcal{A}$ to a larger axis-aligned box $\mathcal{X} \supseteq \mathcal{A}$. The conditional Mondrian is useful for online learning and prediction, as it can be used to extend Mondrian samples to (yet) unobserved parts of the input space \citep{MF}. \section{MONDRIAN KERNEL} \label{sec:TheMondrianKernel} For concreteness, our running example will be regression: the problem of learning a function $f : \Reals^D \to \Reals$ from a set of $N$ training examples $(\mathbf{x}_1, y_1), \ldots, (\mathbf{x}_N, y_N)$. However, the Mondrian kernel applies equally well to classification, or any other learning task. Learning with kernels involves choosing a kernel function $k : \Reals^D \times \Reals^D \to \Reals$ to act as a similarity measure between input data points. Evaluating $k(\cdot, \cdot)$ on all pairs of $N$ data points takes $\Omega(N^2)$ operations, with some models also requiring a $\Theta(N^3)$ operation on an $N \times N$ kernel matrix. This generally makes exact kernel methods unsuitable for large-scale learning. \citet{rahimi2007random} proposed a fast approximation through a randomized construction of a low-dimensional feature map $\phi : \Reals^D \to \Reals^C$ such that \begin{equation*} \forall{\mathbf{x}, \mathbf{x}' \in \Reals^D} \hspace{2em} k(\mathbf{x}, \mathbf{x}') \approx \phi(\mathbf{x})^T \phi(\mathbf{x}') \end{equation*} and then using a linear learning method in the feature space $\Reals^C$ implied by $\phi$. For example, linear regression $\mathbf{y}\approx\mathbf{\Phi}\mathbf{w}$, where $\mathbf{\Phi} \in \Reals^{N \times C}$ is the feature matrix with $n$-th row $\phi(\mathbf{x}_n)^T$, is solvable exactly in time linear in $N$. In general, the primal problem also lends itself naturally to stochastic gradient descent approaches for learning $\mathbf{w}$. We use the Mondrian process to construct a randomized feature map for the (isotropic) \emph{Laplace kernel}: \begin{equation*} k(\mathbf{x}, \mathbf{x}') = \exp(- \lambda \| \mathbf{x} - \mathbf{x}' \|_1) = \exp(- \lambda \sum_{d = 1}^D |x_d - x'_d|). \end{equation*} Here $\lambda \geq 0$ is the inverse kernel width (inverse length-scale), which we call the \emph{lifetime} parameter of the kernel. We use a non-standard parametrization as this lifetime parameter will be linked to the Mondrian process lifetime. \subsection{MONDRIAN KERNEL} \label{sec:MondrianKernel} Consider the following randomized construction of a feature map $\phi : \Reals^D \to \Reals^C$: \begin{enumerate} \item Sample a partition of $\Reals^D$ via a Mondrian process on $\Reals^D$ with lifetime $\lambda$. Label the cells of the generated partition by $1, 2, \ldots$ in arbitrary order. \item To encode a data point $\mathbf{x} \in \Reals^D$, look up the label $c$ of the partion cell $\mathbf{x}$ falls into and set $\phi(\mathbf{x})$ to be the (column) indicator vector that has a single non-zero entry at position $c$, equal to $1$. \end{enumerate} The Mondrian process on $\Reals^D$ generates infinitely many partition cells and cannot be stored in memory, but projectivity comes to the rescue. As we only ever need to evaluate $\phi$ on finitely many data points, it suffices to run the Mondrian on the smallest axis-aligned box containing all these points. Also, we only label partition cells containing at least one data point, in effect removing features that would be $0$ for all our data points. Then, the dimensionality $C$ of $\phi$ equals the number of non-empty partiton cells and each data point has a single non-zero feature, equal to $1$. \begin{figure}[H] \centering \begin{minipage}{.23\textwidth} \centering \includegraphics[scale=0.7]{figures/mondrian-features} \end{minipage} ~ \begin{minipage}{.23\textwidth} \centering \begin{tabular}{ c | c c c } $\mathbf{x}$ & $\phi(\mathbf{x})^T$ & \\\hline $\mathbf{x}_1$ & [0 1 0] \\ $\mathbf{x}_2$ & [0 1 0] \\ $\mathbf{x}_3$ & [0 0 1] \\ $\mathbf{x}_4$ & [1 0 0] \end{tabular} \end{minipage} \caption{Feature expansions of $4$ data points in $\Reals^2$.} \label{fig:MondrianFeaturesExample} \end{figure} However, note that the set of points on which the feature map $\phi$ is evaluated need not be known in advance and can even grow in an online fashion. Indeed, the conditional Mondrian algorithm discussed in section~\ref{sec:MondrianProcessUnbounded} allows us to extend Mondrian samples to larger boxes as necessary, and we can increase the dimensionality of $\phi$ whenever a data point is added to a previously empty partition cell. This feature map $\phi$ induces a kernel \begin{align} k_1(\mathbf{x}, \mathbf{x}') &:= \phi(\mathbf{x})^T \phi(\mathbf{x}') \nonumber \\ &= \begin{dcases} 1 & \text{ if } \mathbf{x}, \mathbf{x}' \text{ in same partition cell } \\ 0 & \text{ otherwise } \end{dcases} \label{eq:k1} \end{align} which we call a \emph{Mondrian kernel} of order $1$. Instead of using a single Mondrian sample (partition), we can use $M$ independent samples and construct a feature map $\phi$ by concatenating and normalizing the feature maps $\phi^{(1)}, \ldots, \phi^{(M)}$ obtained from each individual sample as above: \begin{equation} \phi(\mathbf{x}) := \frac{1}{\sqrt{M}} \left[ \phi^{(1)}(\mathbf{x})^T \;\;\cdots\;\; \phi^{(M)}(\mathbf{x})^T \right]^T. \label{eq:PhiConcat} \end{equation} This feature expansion is \emph{sparse}: every data point has exactly $M$ non-zero features. The corresponding kernel, which we call a \emph{Mondrian kernel of order} $M$, is \begin{align*} k_M(\mathbf{x}, \mathbf{x}') &:= \phi(\mathbf{x})^T \phi(\mathbf{x}') \\ &= \frac{1}{M} \sum_{m = 1}^M \phi^{(m)}(\mathbf{x})^T \phi^{(m)}(\mathbf{x}'). \end{align*} This is the empirical frequency with which points $\mathbf{x}$ and $\mathbf{x}'$ end up in the same partition cell of a Mondrian sample. \begin{algorithm}[H] \caption{Mondrian kernel} \begin{algorithmic}[1] \For{$m = 1$ \textbf{to} $M$} \State construct feature map $\phi^{(m)}$ \algcomment{section~\ref{sec:MondrianKernel}} \EndFor \State join and rescale $\phi^{(1)}, \ldots, \phi^{(M)}$ into $\phi$ \algcomment{equation (\ref{eq:PhiConcat})} \State map data $\mathbf{X}$ to feature representations $\mathbf{\Phi}$ using $\phi$ \State use linear learning method on $\mathbf{\Phi}$ \end{algorithmic} \end{algorithm} \subsection{MONDRIAN--LAPLACE LINK} \label{sec:MondrianLaplacianLink} By independence of the $M$ Mondrian samples, a.s. \begin{equation*} \lim_{M \to \infty} k_M(\mathbf{x}, \mathbf{x}') = \IE\left[ \phi^{(1)}(\mathbf{x})^T \phi^{(1)}(\mathbf{x}') \right] = \IE\left[ k_1(\mathbf{x}, \mathbf{x}') \right] \end{equation*} with convergence at the standard rate $\mathcal{O}_p(M^{-1/2})$. We thus define the \emph{Mondrian kernel of order} $\infty$ as \begin{equation*} k_{\infty}(\mathbf{x}, \mathbf{x}') := \IE[ k_1(\mathbf{x}, \mathbf{x}')]. \end{equation*} \begin{proposition}[Mondrian-Laplace link] The Mondrian kernel of order $\infty$ coincides with the Laplace kernel. \begin{proof} As $k_1(\mathbf{x}, \mathbf{x}')$ (defined in (\ref{eq:k1})) is a binary random variable, $k_{\infty}(\mathbf{x}, \mathbf{x}')$ equals the probability that $\mathbf{x}$ and $\mathbf{x}'$ fall into the same partition cell of a Mondrian sample, which is equivalent to the sample having no cut in the minimal axis-aligned box spanned by $\mathbf{x}$ and $\mathbf{x}'$. \begin{figure}[H] \centering \includegraphics[width=0.75\columnwidth]{figures/mondrian-laplace} \label{fig:MondrianLaplacianProofIllustration} \vspace{-0.25em} \end{figure} By projectivity, this probability is the same as the probability of not observing any cuts in a Mondrian process with lifetime $\lambda$ running on just this minimal box. Noting that the linear dimension of this box is $\| \mathbf{x} - \mathbf{x}' \|_1$, we obtain \begin{align*} k_{\infty}(\mathbf{x}, \mathbf{x}') & = \IP(\text{no cut between } \mathbf{x}, \mathbf{x}' \text{ until time } \lambda ) \\ & = \IP\left( T > \lambda \right) \text{ where } T \sim \text{Exp}\left( \| \mathbf{x} - \mathbf{x}' \|_1 \right) \\ & = e^{- \lambda \| \mathbf{x} - \mathbf{x}' \|_1}. \qedhere \end{align*} \end{proof} \end{proposition} Note that the lifetime (inverse width) $\lambda$ of the Laplace kernel corresponds to the lifetime of the Mondrian process used in the construction of the Mondrian kernel. This link allows us to approximate the Laplace kernel with a Mondrian kernel $k_M$, which, unlike the Laplace kernel, admits a finite-dimensional feature expansion. The finite order $M$ trades off kernel approximation error and computational costs (indirectly through the complexity of $\phi$). The following result confirms that the convergence of the Mondrian kernel approximation is exponentially fast in $M$ \emph{uniformly} on any fixed bounded input domain $\mathcal{X}$. \begin{proposition} For any bounded input domain $\mathcal{X} \subseteq \Reals^D$ and $\delta > 0$, as $M \to \infty$, \begin{align*} &\;\;\;\;\; \IP\left[ \sup_{\mathbf{x}, \mathbf{x}' \in \mathcal{X}} \left| k_M(\mathbf{x}, \mathbf{x}') - k_{\infty}(\mathbf{x}, \mathbf{x}') \right| > \delta \right] \\ &= \mathcal{O}\left( M^{2/3} e^{- M \delta^2 / (12D + 2)} \right). \end{align*} \begin{proof} Given in Supplement~\ref{sec:AppendixConvergenceBounds}. \end{proof} \end{proposition} \section{FAST KERNEL WIDTH LEARNING} \label{sec:LengthscaleLearning} This section discusses the main advantage of our Mondrian approximation to the Laplace kernel: the efficient learning of kernel width from data. In particular, the approximation allows for efficient evaluation of all kernel lifetimes (inverse widths) $\lambda \in [0, \Lambda]$, where the terminal lifetime $\Lambda > 0$ need not be fixed a priori. \subsection{FEATURE SPACE REUSAL} We make the following recollections from earlier sections: \begin{itemize} \item the Mondrian process runs through time, starting at time $0$ and only refining the generated partition as time progresses (cuts are never removed) \item the Mondrian process with lifetime $\lambda$ is obtained by ignoring any cuts that would occur after time $\lambda$ \item the lifetime $\lambda$ of the Mondrian process used in constructing an explicit feature map $\phi$ for a Mondrian kernel corresponds to the lifetime (inverse width) of the Laplace kernel that it approximates \end{itemize} Running the Mondrian process from time $0$ to some terminal lifetime $\Lambda$ thus sweeps through feature spaces approximating all Laplace kernels with lifetimes $\lambda \in [0, \Lambda]$. More concretely, we start with $\lambda = 0$ and $\phi$ the feature map corresponding to $M$ trivial partitions, i.e., for any data point $\mathbf{x}$, the vector $\phi(\mathbf{x})$ has length $M$ and all entries set to the normalizer $M^{-1/2}$. As we increase $\lambda$, at discrete time points new cuts appear in the $M$ Mondrian samples used in constructing $\phi$. Suppose that at some time $\lambda$, the partition cell corresponding to the $c$-th feature in $\phi$ is split into two by a new cut that first appeared at this time $\lambda$. We update the feature map $\phi$ by removing the $c$-th feature and appending two new features, one for each partition cell created by the split. See Figure~\ref{fig:MondrianFeaturesLifetimeUpdate} for an example with $M = 1$. \begin{figure}[t!] \centering \begin{minipage}{.23\textwidth} \centering \includegraphics[scale=0.7]{figures/mondrian-features-update} \end{minipage} ~ \begin{minipage}{.23\textwidth} \centering \includegraphics[scale=0.9]{figures/mondrian-features-lifetime-update-table} \end{minipage} \caption{A new cut (shown in thick blue) appeared, splitting cell $c = 2$ (cf.~Figure~\ref{fig:MondrianFeaturesExample}) into two new cells $c = 4$ and $c = 5$. The table shows the update to $\phi$, with the removed feature in gray italics and the two new features in bold blue.\vspace{-0.15em}} \label{fig:MondrianFeaturesLifetimeUpdate} \end{figure} This procedure allows us to approximate all Laplace kernels with lifetimes $\lambda \in [0, \Lambda]$ without having to resample new feature spaces for each lifetime. The total computational cost is the same (up to a multiplicative constant) as of constructing a single feature space just for the terminal lifetime $\Lambda$. This is because a strictly binary tree with $C^{(m)}$ leaves (partition cells in the $m$-th Mondrian sample at time $\Lambda$) contains at most $C^{(m)} - 1$ internal nodes (features that had to be removed at some time point $\lambda < \Lambda$). \subsection{LINEAR LEARNER RETRAINING} Evaluating suitability of a lifetime (inverse kernel width) $\lambda$ requires training and evaluating a linear model in the feature space implied by $\phi$. This can also be done more efficiently than retraining a new model from scratch every time a new cut is added and $\phi$ updated. We discuss the example of ridge regression with exact solutions, and a general case of models trainable using gradient descent methods. \subsubsection{Ridge regression} \label{sec:LinearLearnerRetrainingRidgeRegression} The MAP weights of the primal ridge regression problem are $\hat{\mathbf{w}} = \mathbf{A}^{-1} \mathbf{\Phi}^T \mathbf{y}$, where $\mathbf{A} := (\mathbf{\Phi}^T \mathbf{\Phi} + \delta^2 \mathbf{I}_C)$ is the regularized feature covariance matrix and $\delta^2$ is the regularization hyperparameter. Instead of inverting $\mathbf{A}$, it is numerically more stable to work with its Cholesky factor $\chol(\mathbf{A})$ \citep{seeger_bayesian_2003}. Phrasing the problem as Bayesian linear regression with, say, observation noise variance $\sigma_{y}^2 = \delta^2$ and prior weights variance $\sigma_{w}^2 = 1$, we can also obtain the log marginal likelihood $\mathcal{L}(\lambda)$ of the form \begin{equation*} \mathcal{L}(\lambda) = - \frac{\| \mathbf{y} - \mathbf{\Phi} \hat{\mathbf{w}} \|_2^2}{2 \delta^2} - \frac{\| \hat{\mathbf{w}} \|_2^2}{2} - \frac{1}{2} \ln \det \mathbf{A} + \text{const}, \end{equation*} where the dependence on $\lambda$ is implicit through $\phi$. When a new cut appears in one of the $M$ Mondrian samples and $\phi$ is updated by deleting the $c$-th feature and appending two new ones, the corresponding update to the regularized feature covariance matrix $\mathbf{A}$ is to delete its $c$-th row and $c$-th column, and append two new rows and columns. Then both $\mathbf{A}^{-1}$ and $\chol(\mathbf{A})$ can be appropriately updated in $\mathcal{O}(C^2)$ time, faster than $\mathcal{O}(C^3)$ recomputation from scratch. Updating the Cholesky factor when the $c$-th row and column are removed is slightly involved but can be achieved by first permuting the rows and columns so that the ones to be removed are the last ones \citep{EPFL-REPORT-161468}, after which the Cholesky factor is updated by deleting its last row and column. If $C$ is the number of features at the terminal lifetime $\Lambda$, this $\mathcal{O}(C^2)$ update is performed $\mathcal{O}(C)$ times, for a total computational cost $\mathcal{O}(C^3)$. Note that performing the inversion or Cholesky factorization at just the terminal lifetime $\Lambda$ would have the same time complexity. After updating $\mathbf{A}^{-1}$ or $\chol(\mathbf{A})$, the optimal weights $\hat{\mathbf{w}}$ can be updated in $\mathcal{O}(C^2 + N)$ time and the determinant of $\mathbf{A}$ required for the marginal likelihood $\mathcal{L}(\lambda)$ can be obtained from $\chol(\mathbf{A})$ as the squared product of its diagonal elements in $\mathcal{O}(C)$ time. Exploiting sparsity of $\phi$, evaluating the model on $N_{\text{test}}$ data points takes $\mathcal{O}(N_{\text{test}} M)$ time. Finally, we note that computing the marginal likelihood $\mathcal{L}(\lambda)$ for all $\lambda \in [0, \Lambda]$ and combining it with a prior $p(\lambda)$ supported on $[0, \Lambda]$ allows Bayesian inference over the kernel width $\lambda^{-1}$. We refer to Supplement~\ref{sec:bayesian kernel width learning} for more details. \subsubsection{Models trainable using gradient descent} Consider a linear model trained using a gradient descent method. If (an approximation to) the optimal weight vector $\mathbf{w}$ is available and then $\phi$ is updated by removing the $c$-th feature and appending two new features, a natural way of reinitializing the weights for subsequent gradient descent iterations is to remove the $c$-th entry of $\mathbf{w}$ and append two new entries, both set to the removed value (as points in the split cell are partitioned into the two new cells, this preserves all model predictions). Note that we have the freedom of choosing the number of gradient descent iterations after each cut is added, and we can opt to only evaluate the model (on a validation set, say) at several $\lambda$ values on the first pass through $[0, \Lambda]$. One iteration of stochastic gradient descent takes $O(M)$ time thanks to sparsity of $\phi$. This efficient kernel width selection procedure can be especially useful with models where hyperparameters cannot be tweaked by marginal likelihood optimization (e.g., SVM). \section{ONLINE LEARNING} \label{sec:OnlineLearning} In this section, we describe how the Mondrian kernel can be used for online learning. When a new data point $\mathbf{x}_{N + 1} \in \Reals^D$ arrives, incorporating it into $M$ existing Mondrian samples (using the conditional Mondrian algorithm discussed in section~\ref{sec:MondrianProcessUnbounded}) can create $0 \leq k \leq M$ new non-empty partition cells, increasing the dimensionality of the feature map $\phi$. We set the new features to $0$ for all previous data points $\mathbf{x}_1, \ldots, \mathbf{x}_N$. In our running example of ridge regression, exact primal updates can again be carried out efficiently. The inverse $\mathbf{A}^{-1}$ or Cholesky factor $\chol(\mathbf{A})$ of the regularized feature covariance matrix $\mathbf{A}$ can be updated in two steps: \begin{enumerate} \item extend $\mathbf{A}^{-1}$ or $\chol(\mathbf{A})$ to incorporate the $k$ new features (set to $0$ for all existing data points) in $\mathcal{O}(C^2)$ \item incorporate the new data point $\mathbf{x}_{N + 1}$, which is now a simple rank-1 update on $\mathbf{A}$, so $\mathbf{A}^{-1}$ or $\chol(\mathbf{A})$ can again be updated efficiently in $\mathcal{O}(C^2)$ time \end{enumerate} We refer to Supplement~\ref{sec:SuppOnlineRidgeRegression} for more details. With gradient descent trainable models, we maintain (an approximation to) the optimal weights $\mathbf{w}$ directly. When a new data point arrives, we expand the dimensionality of $\phi$ as described above. The previously optimal weights can be padded with $0$'s in any newly added dimensions, and then passed to the gradient descent method as initialization. \section{LINK TO MONDRIAN FOREST} \label{sec:ForestConnection} We contrast Mondrian kernel with Mondrian forest \citep{MF, MFreg}, another non-linear learning method based on the Mondrian process. They both start by sampling $M$ independent Mondrians on $\Reals^D$ to provide $M$ independent partitions of the data. However, these partitions are then used differently in the two models: \begin{itemize} \item In a Mondrian forest, parameters of predictive distributions in each tree are fitted independently of all other trees. The prediction of the forest is the average prediction among the $M$ trees. \item With Mondrian kernel, the weights of all random features are fitted jointly by a linear learning method. \end{itemize} Let $C^{(m)}$ count the leaves (non-empty partition cells) in the $m$-th Mondrian sample and let $C = \sum_{m = 1}^M C^{(m)}$ be the total number of leaves. Let $\bphi^{(m)}_n := \phi^{(m)}(\mathbf{x}_n) \in \Reals^{C^{(m)}}$ be the indicator of the partition cell in the $m$-th sample into which the $n$-th data point falls (as in section~\ref{sec:MondrianKernel}). Also, as in equation~(\ref{eq:PhiConcat}), let $\bphi_n := \phi(\mathbf{x}_n) \in \Reals^C$ be the normalized concatenated feature encoding of the $n$-th data point. Recall that each vector $\bphi_n \in \Reals^C$ contains exactly $M$ non-zero entries, all of which equal the normalizer $M^{-1/2}$. For simplicity, we restrict our attention to ridge regression in this section and compare the learning objective functions of Mondrian kernel and Mondrian forest. \subsection{MONDRIAN KERNEL OBJECTIVE} The primal ridge regression problem in the feature space implied by $\phi$ is \begin{equation*} \min_{\mathbf{w} \in \Reals^C}\; \sum_{n = 1}^N (y_n - \mathbf{w}^T \bphi_n)^2 + \delta^2 \| \mathbf{w} \|_2^2. \end{equation*} Decomposing $\mathbf{w} = M^{-1/2} [ \mathbf{w}^{(1)T} \cdots \mathbf{w}^{(M)T}]^T$, so that each (rescaled) subvector $\mathbf{w}^{(m)}$ corresponds to features from the $m$-th Mondrian, denoting by $\hat{y}_n^{(m)} := \mathbf{w}^{(m)T} \bphi_n^{(m)}$ the ``contribution" of the $m$-th Mondrian to the prediction at the $n$-th data point, and writing $\text{loss}(y, \hat{y}) := (y - \hat{y})^2$, the Mondrian kernel objective function can be restated as \begin{equation} \min_{\mathbf{w} \in \Reals^C} \sum_{n = 1}^N \text{loss}\left(y_n, \frac{1}{M} \sum_{m = 1}^M \hat{y}_n^{(m)} \right) + \delta^2 \| \mathbf{w} \|_2^2. \label{eq:MondrianKernelObjective} \end{equation} \subsection{MONDRIAN FOREST OBJECTIVE} Assuming a factorizing Gaussian prior over the leaves in each Mondrian tree (i.e., without the hierarchical smoothing used by \citet{MFreg}), the predictive mean parameters $\mathbf{w}^{(m)}$ in the leaves of the $m$-th Mondrian tree are fitted by minimizing \begin{equation*} \min_{\mathbf{w}^{(m)} \in \Reals^{C^{(m)}}} \sum_{n = 1}^N (y_n - \mathbf{w}^{(m)T} \bphi^{(m)}_n)^2 + \gamma^2 \| \mathbf{w}^{(m)} \|_2^2 \end{equation*} where $\gamma^2$ is the ratio of noise and prior variance in the predictive model. The parameters $\mathbf{w}^{(m)}$ are disjoint for different trees, so these $M$ independent optimization problems are equivalent to minimizing the average of the $M$ individual objectives. Writing $\hat{y}_n^{(m)} := \mathbf{w}^{(m)T} \bphi_n^{(m)}$ for the $m$-th tree's prediction at the $n$-th data point and concatenating the parameters $\mathbf{w} := M^{-1/2} [\mathbf{w}^{(1)T} \cdots \mathbf{w}^{(M)T}]^T$, the Mondrian forest objective can be stated as \begin{equation} \min_{\mathbf{w} \in \Reals^C} \sum_{n = 1}^N \frac{1}{M} \sum_{m = 1}^M \text{loss}(y_n, \hat{y}_n^{(m)}) + \gamma^2 \| \mathbf{w} \|_2^2. \label{eq:MondrianForestObjective} \end{equation} \subsection{DISCUSSION} Comparing \eqref{eq:MondrianKernelObjective} and \eqref{eq:MondrianForestObjective}, we see that subject to regularization parameters (priors) chosen compatibly, the two objectives only differ in the contribution of an individual data point $n$ to the total loss: \begin{align*} \text{Mondrian kernel:} \hspace{1em} & \text{loss}\left(y_n, \frac{1}{M} \sum_{m = 1}^M \hat{y}_n^{(m)} \right) \\ \text{Mondrian forest:} \hspace{1em} & \frac{1}{M} \sum_{m = 1}^M \text{loss}(y_n, \hat{y}_n^{(m)}) \end{align*} Specifically, the difference is in the order in which the averaging $\frac{1}{M} \sum_{m = 1}^M$ over Mondrian samples/trees and the non-linear $\text{loss}$ function are applied. In both models predictions are given by $\hat{y} = \frac{1}{M} \sum_{m = 1}^M \hat{y}^{(m)}$, so the Mondrian kernel objective is consistent with the aim of minimizing empirical loss on the training data, while the forest objective minimizes average loss across trees, not the loss of the actual prediction (when $M > 1$) \citep{ren_global_2015}. \citet{ren_global_2015} address this inconsistency between learning and prediction by proposing to extend random forests with a \emph{global refinement} step that optimizes all tree parameters jointly, minimizing the empirical training loss. Our approximation of the Laplace kernel via the Mondrian kernel can be interpreted as implementing this joint parameter fitting step on top of Mondrian forest, revealing a new connection between random forests and kernel methods. \begin{figure}[H] \centering \includegraphics[width=0.95\columnwidth]{figures/forest-kernel} \label{fig:ForestKernelConnection} \end{figure} \section{RELATED WORK} The idea of \citet{rahimi2007random} to approximate shift-invariant kernels by constructing random features has been further developed by \citet{fastfood} and \citet{yang_carte_2014}, providing a faster method of constructing the random features when the input dimension $D$ is high. The fast method of \citet{dai2014scalable} can adapt the number of random features, making it better-suited for streaming data. To the best of our knowledge, these methods require random features to be reconstructed from scratch for each new kernel width value; however, our solution allows us to efficiently learn this hyperparameter for the Laplace kernel. Decision forests are popular for black-box classification and regression thanks to their competitive accuracy and computational efficiency. The most popular variants are Breiman's Random Forest \citep{RF} and Extremely Randomized Trees \citep{ERT}. \citet{infinitytheory} established a link between the Laplace kernel and random forests with an infinite number of trees, but unlike our work, made two additional strong assumptions, namely infinite data and a uniform distribution of features. From a computational perspective, \citet{shen2006fast} approximated evaluation of an isotropic kernel using $kd$-trees, reducing computational complexity as well as memory requirements. \citet{davies2014random} constructed `supervised' kernels using random forests and demonstrated that this can lead to linear-time inference. We refer to \citep{scornet2015random} for a recent discussion on the connection between decision forests and kernel methods. A key difference between decision forests and kernel methods is whether parameters are fit independently or jointly. In decision forests, the leaf node parameters for each tree are fit independently, whereas the weights of random features are fit jointly. \citet{scornet2015random} shows that random forests can be interpreted as adaptive kernel estimates and discusses the theoretical properties of fitting parameters jointly. \citet{ren_global_2015} propose to extend random forests with a \emph{global refinement} step, optimizing all tree parameters jointly to minimize empirical training loss. The proposed Mondrian kernel establishes a link between Mondrian trees and Laplace kernel for finite data, without any assumptions on the distribution of the features. Unlike prior work, we exploit this connection to construct an adaptive random feature approximation and efficiently learn the kernel width. % \section{EXPERIMENTS} We conducted three sets of experiments, with these goals: \begin{enumerate} \item verify that Mondrian kernel approximates the Laplace kernel, and compare to other random feature generation schemes (Section~\ref{sec:ExperimentLaplaceKernelApproximation}); \item demonstrate usefulness of our efficient kernel width selection procedure, showing that it can quickly learn a suitable kernel width from data (Section~\ref{sec:FastKernelWidthLearning}); and \item empirically compare the Mondrian kernel and Mondrian forests, supporting the insight into their relationship from Section~\ref{sec:ForestConnection} (Section~\ref{sec:ExperimentKernelVsForest}). \end{enumerate} With the exception of two experiments on synthetic data, we carried out our evaluation on the CPU dataset from \citep{rahimi2007random}, containing $N = 6554$ training and $N_{\text{test}} = 819$ test points with $D = 21$ attributes. Note that the CPU dataset is an adversarial choice here, as \citet{rahimi2007random} report that random Fourier features perform better than binning schemes on this task. In all experiments, the ridge regularization constant was set to $\delta^2 = 10^{-4}$, the value used by \citet{rahimi2007random}, and the primal optimization problems were solved using stochastic gradient descent. \subsection{LAPLACE KERNEL APPROXIMATION} \label{sec:ExperimentLaplaceKernelApproximation} First we examined the absolute kernel approximation error $|k_{\infty}(\cdot, \cdot) - k_M(\cdot, \cdot)|$ directly. To this end, we sampled $N = 100$ data points uniformly at random in the unit square $[0, 1]^2$ and computed the maximum absolute error over all $N^2$ pairs of points. The Laplace kernel $k_{\infty}$ and Mondrian kernels $k_M$ had a common lifetime (inverse width) $\lambda = 10$, so that several widths fit into the input domain $[0, 1]^2$. We repeated the experiment $5$ times for each value of $M$, showing the results in Figure~\ref{fig:ExperimentLaplaceKernelApproximationDirect}. We plot the maximum error against the number $M$ of non-zero features per data point, which is relevant for solvers such as Pegasos SVM \citep{shalev-shwartz_pegasos:_2007}, whose running time scales with the number of non-zero features per data point. Under this metric, the Mondrian kernel and Random binning converged to the Laplace kernel faster than random Fourier features, showing that in some cases they can be a useful option. (The error of Random Fourier features would decrease faster when measured against the \emph{total} number of features, as Mondrian kernel and Random binning generate sparse feature expansions.) \begin{figure}[t!] \centering \includegraphics[scale=0.5]{figures/2016-02-24_12-58-44_random_features_Mmax_50_N_100.pdf} \caption{Maximum absolute kernel approximation error on all pairs of $N = 100$ data points in $[0, 1]^2$.} \label{fig:ExperimentLaplaceKernelApproximationDirect} \end{figure} Second, we examined the approximation error indirectly via test set error on the CPU dataset. We repeated the experiment $5$ times for each value of $M$ and show the results in Figure~\ref{fig:ExperimentLaplaceKernelApproximationCPU}. Even though Fourier features are better suited to this task, for a fast approximation with few ($M < 15$) non-zero features per data point, random binning and Mondrian kernel are still able to outperform the Fourier features. \begin{figure}[H] \centering \includegraphics[scale=0.5]{figures/2016-02-27_17-06-14_convergence_RMSE_Mmax_50_CPU.pdf} \caption{Test set error on the CPU dataset. The horizontal line at $3.1\%$ indicates the error achieved with an exact, but expensive computation using the Laplace kernel.} \label{fig:ExperimentLaplaceKernelApproximationCPU} \end{figure} \subsection{FAST KERNEL WIDTH LEARNING} \label{sec:FastKernelWidthLearning} First, using a synthetic regression dataset generated from a Laplace kernel with known ground truth lifetime $\lambda_0 = 10$, we verified that the lifetime could be recovered using our kernel width selection procedure from Section~\ref{sec:LengthscaleLearning}. To this end, we let the procedure run until a terminal lifetime $\Lambda = 100$ and plotted the error on a held-out validation set as a function of the lifetime $\lambda$. The result in Figure~\ref{fig:ExperimentKernelWidthRecoverySynthetic} shows that the ground truth kernel lifetime $\lambda_0 = 10$ was recovered within an order of magnitude by selecting the lifetime $\hat{\lambda}$ minimizing validation set error. Moreover, this value of $\hat{\lambda}$ led to excellent performance on an independent test set. \begin{figure}[b] \centering \includegraphics[scale=0.45]{figures/2016-03-01_10-40-18_width_recovery_D_2_M_50.pdf} \caption{Recovering the ground truth lifetime $\lambda_0 = 10$ by selecting the value $\hat{\lambda} \approx 19$ minimizing validation set error.} \label{fig:ExperimentKernelWidthRecoverySynthetic} \end{figure} \pagebreak Second, we evaluated our kernel width selection procedure on the CPU dataset in order to demonstrate its practical usefulness. While the Mondrian kernel allows to efficiently sweep through lifetimes $\lambda$, Fourier features and random binning need to be reconstructed and retrained for each attempted lifetime value. We started the Fourier features and random binning at $\lambda = 1$, and in each step, we either doubled the maximum lifetime or halved the minimum lifetime considered so far, based on which direction seemed more promising. Once a good performing lifetime was found, we further optimized using a binary search procedure. All schemes were set to generate $M = 350$ non-zero features per datapoint. Figure~\ref{fig:ExperimentTimeToBestSolution} shows the performance of each scheme on a held-out validation set as a function of computation time. The result suggests that our kernel width learning procedure can be used to discover suitable lifetimes (inverse kernel widths) at least an order of magnitude faster than random Fourier features or random binning. \subsection{MONDRIAN KERNEL VS FOREST} \label{sec:ExperimentKernelVsForest} \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{figures/2016-02-29_10-20-11_performance_vs_time_CPU_M_350.pdf} \caption{Validation set error as a function of computation time. Even though Fourier features are better suited to the CPU dataset \citep{rahimi2007random} and eventually outperform the Mondrian kernel, the latter discovers suitable kernel widths at least an order of magnitude faster.} \label{fig:ExperimentTimeToBestSolution} \end{figure} We compared the performance of Mondrian kernel and ``Mondrian forest" (quotes due to omission of hierarchical smoothing) based on the same $M = 50$ Mondrian samples, using the CPU dataset and varying the lifetime $\lambda$. Recall that higher values of $\lambda$ lead to more refined Mondrian partitions, allowing more structure in the data to be modeled, but also increasing the risk of overfitting. Figure~\ref{fig:ExperimentMondrianKernelVsForest} shows that Mondrian kernel exploits the joint fitting of parameters corresponding to different trees and achieves a lower test error at lower lifetime values, thus producing a more compact solution based on simpler partitions. Figure~\ref{fig:ExperimentMondrianKernelVsForestWeights} shows the parameter values learned by Mondrian kernel and Mondrian forest at the lifetime $\lambda = 2 \times 10^{-6}$. The distribution of weights learned by Mondrian kernel is more peaked around $0$, as the joint fiting allows achieving more extreme predictions by adding together several smaller weights. \begin{figure}[t!] \centering \includegraphics[scale=0.464]{figures/2016-05-23_19-23-27_kernel_vs_forest_CPU_M_50.pdf} \caption{Comparison of Mondrian kernel and Mondrian forest models based on the same set of Mondrian samples.} \label{fig:ExperimentMondrianKernelVsForest} \end{figure} \begin{figure}[t!] \centering \includegraphics[width=\linewidth]{figures/2016-05-23_19-27-16_kernel_vs_forest_weights_CPU_M_50.pdf} \caption{Weights learned by Mondrian forest and Mondrian kernel at the lifetime $\lambda = 2 \times 10^{-6}$ in Figure~\ref{fig:ExperimentMondrianKernelVsForest}.} \label{fig:ExperimentMondrianKernelVsForestWeights} \end{figure} \section{CONCLUSION} We presented the Mondrian kernel, a fast approximation to the Laplace kernel that admits efficient kernel width selection. When a different kernel or a different approximation is used, our procedure can provide a fast and simple way of initializing the kernel width for further optimization. While a Gaussian kernel is often considered a default choice, in many situations it imposes an inappropriately strong smoothness assumption on the modelled function and the Laplace kernel may in fact be a preferable option. Our approach revealed a novel link between the Mondrian process and the Laplace kernel. We leave the discovery of similar links involving other kernels for future work. \subsubsection*{Acknowledgements} We would like to thank Nilesh Tripuraneni for useful discussions. Part of this research was carried out while MB was at the University of Oxford. BL gratefully acknowledges generous funding from the Gatsby Charitable Foundation. ZG acknowledges funding from the Alan Turing Institute, Google, Microsoft Research and EPSRC Grant EP/N014162/1. DMR is supported by an NSERC Discovery Grant. YWT's research leading to these results has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP7/2007-2013) ERC grant agreement no. 617071. \subsubsection*{References}
{'timestamp': '2016-06-17T02:12:35', 'yymm': '1606', 'arxiv_id': '1606.05241', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05241'}
arxiv
\section{Introduction} Massive data are now abundant throughout research and industry, in areas such as biology, chemistry, economics, digital libraries and data management systems. In most of these fields, extracting meaningful knowledge from a vast amount of data is now the key challenge. For example, to remain competitive, e-commerce companies need to constantly analyze huge data of user reviews and purchasing histories~\cite{McAuley13}. In biology, detection of functional interactions of compounds and proteins is an important part in genomic drug discovery~\cite{Stockwell00,Dobson2004Chemical} and requires analysis of a huge number of chemical compounds~\cite{Chen09} and proteins coded in fully sequenced genomes~\cite{UniProt10}. There is thus a strong and growing demand for developing new, more powerful methods to make better use of massive data and to discover meaningful knowledge on a large scale. Learning statistical models from data is an attractive approach for making use of massive high-dimensional data. However, due to high runtime and memory costs, learning of statistical models from massive data --- especially models that have high interpretability --- remains a challenge. \begin{table*}[t] \caption{Summary of scalable learning methods of linear models.} \label{tab:related} \label{methods} {\small \begin{center} \setlength{\tabcolsep}{2pt} \begin{tabular}{c||c|c|c|c|c} & Approach & Compression Type & \# of parameters & Interpretability & Optimization \\ \hline PCA-SL~\cite{Jolliffe86,Elgamal15} & Orthogonal rotation & Lossy & 2 & Limited & Stable \\ bMH-SL~\cite{Li11} & Hashing & Lossy & 3 & Unable & Stable \\ SGD~\cite{Tsuruoka09, Duchi11} & Sampling & - & 1 & Limited & Unstable \\ \hline \hline cPLS (this study) & Grammar compression & Lossless & 1 & High & Stable \\ \end{tabular} \end{center} } \end{table*} {\em Partial least squares regression (PLS)} is a linear statistical model with latent features behind high-dimensional data~\cite{Rosipal06,Wold75,Wold01} that greedily finds the latent features by optimizing the objective function under the orthogonal constraint. PLS is suitable for data mining, because extracted latent features in PLS provide a low-dimensional feature representation of the original data, making it easier for practitioners to interpret the results. From a technical viewpoint, the optimization algorithm in PLS depends only on elementary matrix calculations of addition and multiplication. Thus, PLS is more attractive than other machine learning methods that are based on computationally burdensome mathematical programming and complex optimization solvers. In fact, PLS is the most common chemoinformatics method in pharmaceutical research. However, applying PLS to massive high-dimensional data is problematic. While the memory for the optimization algorithm in PLS depends only on the size of the corresponding data matrix, storing all high-dimensional feature vectors in the data matrix consumes a huge amount of memory, which limits large-scale applications of PLS in practice. One can use {\em lossy compression} (e.g., PCA~\cite{Jolliffe86,Elgamal15} and $b$-bit minwise hashing~\cite{Gio99,Li10}) to compactly represent data matrices and then learn linear models on the compact data matrices~\cite{Li11}. However, although these lossy compression-based methods effectively reduce memory usage~\cite{Li11,Tabei13}, their drawback is that they cannot extract informative features from the learned models, because the original data matrices cannot be recovered from the compressed ones. {\em Grammar compression}~\cite{Charikar05,Rytter03,Kieffer00} is a method of {\em lossless compression} (i.e., the original data can be completely recovered from grammar-compressed data) that also has a wide variety of applications in string processing, such as pattern matching~\cite{Yamamoto11}, edit-distance computation~\cite{Hermelin09}, and $q$-gram mining~\cite{Bille13}. Grammar compression builds a small context-free grammar that generates only the input data and is very effective at compressing sequences that contain many repeats. In addition, the set of grammar rules has a convenient representation as a forest of small binary trees, which enables us to implement various string operations without decompression. To date, grammar compression has been applied only to string (or sequence) data; however, as we will see, there remains high potential for application to other data representations. A fingerprint (or bit vector) is a powerful representation of natural language texts~\cite{Manning99}, bio-molecules~\cite{Todeschini2002}, and images~\cite{Forsyth02}. Grammar compression is expected to be effective for compressing a set of fingerprints as well, because fingerprints belonging to the same class share many identical features. \smallskip {\em Contribution}. In this paper, we present a new scalable learning algorithm for PLS, which we call {\em lossless compression-based PLS (cPLS)}, to learn highly-interpretable predictive linear models from massive high-dimensional data. A key idea is to convert high-dimensional data with fingerprint representations into a set of sequences and then build grammar rules for representing the sequences in order to compactly store data matrices in memory. To achieve this, we propose a novel grammar-compressed representation of a data matrix capable of supporting row and column access {\em while the data matrix is in a compressed format}. The original data matrix is grammar-compressed, and then a linear model is learned on the compressed data matrix, which allows us to significantly reduce working space. cPLS has the following desirable properties: \vspace{-0.5\baselineskip} { \setlength{\leftmargini}{15pt} \begin{enumerate} \setlength{\itemsep}{0cm} \setlength{\parskip}{0cm} \setlength{\itemindent}{0pt} \setlength{\labelsep}{3pt} \item {\bf Scalability}: cPLS is applicable to massive high-dimensional data. \item {\bf Prediction Accuracy}: cPLS can achieve high prediction accuracies for both classification and regression. \item{\bf Usability}: cPLS has only one hyper parameter, which enhances the usability of cPLS. \item {\bf Interpretability}: Unlike lossy compression-based methods, cPLS can extract features reflecting the correlation structure between data and class labels/response variables. \end{enumerate} } \vspace{-0.5\baselineskip} We experimentally test cPLS on its ability to learn linear models for classification, regression and feature extraction with various massive high-dimensional data, and show that cPLS performs superiorly in terms of prediction accuracy, computational efficiency, and interpretability. \section{Literature Review}\label{sec:related} Several efficient algorithms have been proposed for learning linear models on a large scale. We now briefly review the state of the art, which is also summarized in Table~\ref{tab:related}. {\em Principal component analysis (PCA)}~\cite{Jolliffe86} is a widely used machine learning tool, and is a method of lossy compression, i.e., the original data cannot be recovered from compressed data. There have been many attempts to extend PCA~\cite{Tipping00,Scholkopf98} and present a scalable PCA in distributed settings for analyzing big data~\cite{Elgamal15}. For classification and regression tasks, a data matrix is compressed by PCA, and linear models are learned on the compressed data matrix by a {\em supervised learning method (SL)}, which is referred to as {\em PCA-SL}. Despite these attempts, PCA and its variants do not look at the correlation structure between data and output variables (i.e., class labels/response variables), which results in not only the inability of feature extractions in PCA but also the inaccurate predictions by PCA-SL. Li et al.~\cite{Li11} proposed a compact representation of fingerprints for learning linear models by applying {\em $b$-bit minwise hashing (bMH)}. A $d$-dimensional fingerprint is conceptually equivalent to the set $s_{i} \subset \{1,...,d\}$ that contains element $i$ if and only if the $i$-th bit in the fingerprint is $1$. Li et al.'s method works as follows. We first pick $h$ random permutations $\pi_i$, $i=1,..,h$, each of which maps $[1,d]$ to $[1,d]$. We then apply a random permutation $\pi$ on a set $s_i$, compute the minimum element as $\min(\pi(s_i))$, and take as a hash value its lowest $b$ bits. Repeating this process $h$ times generates $h$ hash values of $b$ bits each. Expanding these $h$ values into a ($2^b \times h$)-dimensional fingerprint with exactly $h$ $1$'s builds a compact representation of the original fingerprint. Linear models are learned on the compact fingerprints by SL, which is referred to as {\em bMH-SL}. Although bMH-SL is applicable to large-scale learning of linear models, bMH is a method of lossy compression and cannot extract features from linear models learned by SL. Other hashing-based approaches have been proposed such as Count-Min sketch~\cite{Cormode05}, Vowpal Wabbit~\cite{Weinberger09}, and Hash-SVM~\cite{Mu14}. However, like bMH-SL, these algorithms cannot extract features, which is a serious problem in practical applications. {\em Stochastic gradient descent (SGD)}~\cite{Duchi11, Tsuruoka09} is a computationally efficient algorithm for learning linear models on a large-scale. SGD samples $\nu$ feature vectors from an input dataset and computes the gradient vector from the sampled feature vectors. The weight vector in linear models is updated using the gradient vector and the learning rate $\mu$, and this process is repeated until convergence. Unfortunately however, learning linear models using SGD is numerically unstable, resulting in low prediction accuracy. This is because SGD has three parameters ($\nu$, $\mu$, and $C$) that must be optimized if high classification accuracy is to be attained. Online learning is a specific version of SGD that loads an input dataset from the beginning and updates the weight vector in a linear model for each feature vector. {\em AdaGrad}~\cite{Duchi11} is an efficient online learning that automatically tunes parameters of $\nu$ and $\mu$ in SGD. Although online learning is space-efficient (owing to its online nature), it is also numerically unstable. Even worse, AdaGrad is applicable only to differentiable loss functions, which limits its applicability to simple linear models, e.g., SVM and logistic regression, making the learned model difficult to interpret. Despite the importance of scalable learning of interpretable linear models, no previous work has been able to achieve high prediction accuracy for classification/regression tasks and high interpretability of the learned models. We present a scalable learning algorithm that meets both these demands and is made possible by learning linear models on grammar-compressed data in the framework of PLS. Details of the proposed method are presented in the next section. \section{Grammar Compression} Given a sequence of integers $S$, a {\em grammar-compressor} generates a context-free grammar (CFG) that generates $S$ and only $S$. The grammar consists of a set of rules\footnote{In this paper we assume without loss of generality that the grammar is in Chomsky Normal Form.}. Each rule is of the form $Z_i\to ab$. Symbols that appear on the left-hand side of any rule are called {\em non-terminals}. The remaining symbols are called {\em terminals}, all of which are present in the input sequence. Informally, a rule $Z_i\to ab$ indicates that on the way to recovering the original sequence from its grammar-compressed representation, occurrences of the symbol $Z_i$ should be replaced by the symbol pair $ab$ (the resulting sequence may then be subject to yet more replacements). A data structure storing a set of grammar rules is called a {\em dictionary} and is denoted by $D$. Given a non-terminal, the dictionary supports access to the symbol pair on the right-hand of the corresponding grammar rule, i.e., $D[Z_i]$ returns $ab$ for rule $Z_i\to ab$. The original sequence can be recovered from the compressed sequence and $D$. The set of grammar rules in $D$ can be represented as a forest of (possibly small) binary trees called {\em grammar trees}, where each node and its left/right children correspond to a grammar rule. See Figure~\ref{fig:grammar} for an illustration. The size of a grammar is measured as the number of rules plus the size of compressed sequence. The problem of finding the minimal grammar producing a given string is known to be NP-complete~\cite{Charikar05}, but several approximation algorithms exist that produce grammars that are small in practice (see, e.g.,~\cite{Rytter03,Larsson99,Kieffer00}). Among these is the simple and elegant Re-Pair~\cite{Larsson99} algorithm, which we review next. \begin{figure} \begin{center} \begin{tabular}{c} \includegraphics[width=0.4\textwidth]{./fig/grammar} \end{tabular} \end{center} \vspace{-1cm} \caption{Illustration of grammar compression.} \label{fig:grammar} \end{figure} \subsection{Re-Pair Algorithm} The Re-Pair grammar compression algorithm by Larsson and Moffat~\cite{Larsson99} builds a grammar by repeatedly replacing the most frequent symbol pair in an integer sequence with a new non-terminal. Each iteration of the algorithm consists of the following two steps: (i) find the most frequent pair of symbols in the current sequence, and then (ii) replace the most frequent pair with a new non-terminal symbol, generating a new grammar rule and a new (and possibly much shorter) sequence. Steps (i) and (ii) are then applied to the new sequence and iterated until no pair of adjacent symbols appears twice. Apart from the dictionary $D$ that stores the rules as they are generated, Re-Pair maintains a hash table and a priority queue that together allow the most frequent pair to be found in each iteration. The hash table, denoted by $H$, holds the frequency of each pair of adjacent symbols $ab$ in the current sequence, i.e., $H:ab\to \textbf{N}$. The priority queue stores the symbol pairs keyed on frequency and allows the most frequent symbol to be found in step~(i). In step~(ii), a new grammar rule $Z_1\to ab$ is generated where $ab$ is the most frequent symbol pair and $Z_1$ is a new non-terminal not appearing in a sequence. The rule is stored in the dictionary $D$. Every occurrence of $ab$ in the sequence is then replaced by $Z_1$, generating a new, shorter sequence. This replacement will cause the frequency of some symbol pairs to change, so the hash table and priority queue are then suitably updated. Let $s^c$ denote a sequence generated at $c$-th iteration in the Re-Pair algorithm. For input sequence $s$ in Figure~\ref{fig:grammar}, the most frequent pair of symbols is $12$. Thus, we generate rule $Z_1\to 12$ to be added to the dictionary $D$ and replace all the occurrences of $12$ by non-terminal $Z_1$ in $s$. After four iterations, the current sequence $s^4$ has no repeated pairs, and thus the algorithm stops. Dictionary $D$ has four grammar rules that correspond to a forest of two small trees. As described by Larsson and Moffat~\cite{Larsson99}, Re-Pair can be implemented to run in linear time in the length of the input sequence, but it requires the use of several heavyweight data structures to track and replace symbol pairs. The overhead of these data structures (at least 128 bits per position) prevents the algorithm from being applied to long sequences, such as the large data matrices. Another problem that arises when applying Re-Pair to long sequences is the memory required for storing the hash table: a considerable number of symbol pairs appear twice in a long sequence, and the hash table stores something for each of them, consuming large amounts of memory. In the next section, we present scalable Re-Pair algorithms that achieve both space-efficiency and fast compression time on large data matrices. Specifically, our algorithms need only constant working space. \section{Our Grammar-Compressed Data Matrix} Our goal is to obtain a compressed representation of a data matrix ${\textbf X}$ of $n$ rows and $d$ columns. Let $x_i$ denote the $i$th row of the matrix represented as a fingerprint (i.e. binary vector). An alternative view of a row that will be useful to us is as a sequence of integers $s_i=(p_1,p_2,...,p_m)$, $p_1<p_2<\cdots < p_m$, where $p_i \in s_i$ if and only if $x_i[p_i] = 1$. In other words the sequence $s_i$ indicates the positions of the 1 bits in $x_i$. In what follows we will deal with a differentially encoded form of $s_i$ in which the difference for every pair of adjacent elements in $s_i$ is stored, i.e., $s_i=(p_1,p_2,...,p_m)$ is encoded as $s_{gi}=(p_1,p_2-p_1,p_3-p_2,...,p_m-p_{m-1})$. This differential encoding tends to increase the number of repeated symbol pairs, which allows the sequences $s_{gi}$ to be more effectively compressed by the Re-Pair algorithm. A grammar compressor captures the underlying correlation structure of data matrices: by building the same grammar rules for the same (sequences of) integers, it effectively compresses data matrices with many repeated integers. \subsection{Re-Pair Algorithms in Constant Space} We now present two ideas to make Re-Pair scalable without seriously deteriorating its compression performance. Our first idea is to modify the Re-Pair algorithm to identify top-$k$ frequent symbol pairs in all rows $s^c_{gi}$ in step~(i) and replace all the occurrences of the top-$k$ symbol pairs in all rows $s^c_{gi}$ in step~(ii), generating new $k$ grammar rules and new rows $s^{c+1}_{gi}$. This new replacement process improves scalability by reducing the number of iterations required by roughly a factor of $k$. Since we cannot replace both frequent symbol pairs $ab$ and $bc$ in triples $abc$ in step~(ii), we replace the first appearing symbol pair $ab$, preferentially. However, such preferential replacement can generate a replacement of a pair only once and can add redundant rules to a dictionary, adversely affecting compression performance. To overcome this problem, we replace the first and second appearances of each frequent pair at the same time and replace the next successive appearance of the frequent pair as usual, which guarantees generating grammar rules that appear at least twice. Our second idea is to reduce the memory of the hash table by removing infrequent symbol pairs. Since our modified Re-Pair algorithm can work storing compressed sequences $s_{gi}^c$ at each iteration $c$ in a secondary storage device, the hash table consumes most of the memory in execution. Our modified Re-Pair generates grammar rules from only top-$k$ frequent symbol pairs in the hash table, which means only frequent symbol pairs are expected to contribute to the compression. Thus, we remove infrequent symbol pairs from the hash table by leveraging the idea behind stream mining techniques originally proposed in~\cite{Karp03,DemaineLM02,MankuM12} for finding frequent items in data stream. Our method is a counter-based algorithm that computes the frequency of each symbol pair and removes infrequent ones from the hash table at each interval in step~(i). We present two Re-Pair algorithms using lossy counting and frequency counting for removing infrequent symbol pairs from the hash table. We shall refer to the Re-Pair algorithms using lossy counting and frequency counting as Lossy-Re-Pair and Freq-Re-Pair, respectively. \subsection{Lossy-Re-Pair} The basic idea of lossy counting is to divide a sequence of symbols into intervals of fixed length and keep symbol pairs in successive intervals in accordance with their appearance frequencies in a hash table. Thus, if a symbol pair has appeared $h$ times in the previous intervals, it is going to be kept in the next $h$ successive intervals. Let us suppose a sequence of integers made by concatenating all rows $s_{gi}$ of ${\bf X}$ and let $N$ be the length of the sequence. We divide the sequence into intervals of fixed-length $\ell$. Thus, the number of intervals is $N/\ell$. We use hash table $H$ for counting the appearance frequency of each symbol pair in the sequence. If symbol pair $ab$ has count $H(ab)$, it is ensured that $ab$ is kept in hash table $H$ until the next $H(ab)$-th interval. If symbol pair $ab$ first appears in the $q$-th interval, $H(ab)$ is initialized as $qN/\ell + 1$, which ensures that $ab$ is kept until at least the next interval, i.e., the $(qN/\ell+1)$-th interval. Algorithm~\ref{alg:lossy} shows the pseudo-code of lossy counting. The estimated number of symbol pairs in the hash table is $O(\ell)$~\cite{MankuM12}, resulting in $O(\ell \log\ell)$ bits consumed by the hash table. \begin{algorithm} \caption{Lossy counting. $H$: hash table, $N$: length of an input string at a time point, $\ell$: length of each interval. Note that lossy counting can be used in step~(i) in the Re-Pair algorithm.} \label{alg:lossy} \begin{algorithmic}[1] \State Initialize $N=0$ and $\Delta=0$ \Function{LossyCounting}{$a,b$} \State $N=N+1$ \If{$H(ab) \neq 0$} \State $H(ab)=H(ab)+1$ \Else \State $H(ab)=\Delta + 1$ \EndIf \If{$\lfloor\frac{N}{\ell} \rfloor \neq \Delta$} \State $\Delta=\lfloor \frac{N}{\ell} \rfloor$ \For{each symbol pair $ab$ in $H$} \If{$H(ab)<\Delta$} \State Remove $ab$ from $H$ \EndIf \EndFor \EndIf \EndFunction \end{algorithmic} \end{algorithm} \subsection{Freq-Re-Pair} The basic idea of frequency counting is to place a limit, $v$, on the maximum number of symbol pairs in hash table $H$ and then keep only the most frequent $v$ symbol pairs in $H$. Such frequently appearing symbol pairs are candidates to be replaced by new non-terminals, which generates a small number of rules. The hash table counts the appearance frequency for each symbol pair in step~(i) of the Re-Pair algorithm. When the number of symbol pairs in the hash table reaches $v$, Freq-Re-Pair removes the bottom $\epsilon$ percent of symbol pairs with respect to frequency. We call $\epsilon$ the vacancy rate. Algorithm~\ref{alg:freq} shows the pseudo-code of frequency counting. The space consumption of the hash table is $O(v \log{v})$ bits. \begin{algorithm} \caption{Frequency counting. $H$: hash table, $|H|$: number of symbol pairs in $H$, $v$: the maximum number of symbol pairs in $H$, $\epsilon$: vacancy rate. Note that frequency counting can be used in step~(i) in the Re-Pair algorithm.} \label{alg:freq} \begin{algorithmic}[1] \Function{FrequencyCounting}{$a,b$} \If{$H(ab) \neq 0$} \State $H(ab)=H(ab)+1$ \Else \If{$|H| \geq v$} \While{$v(1-\epsilon/100)<|H|$} \For{each symbol pair $a^\prime b^\prime$ in H} \State $H(a^\prime b^\prime)=H(a^\prime b^\prime)-1$ \If{$H(a^\prime b^\prime)=0$} \State Remove $a^\prime b^\prime$ from $H$ \EndIf \EndFor \EndWhile \EndIf \State $H(ab)=1$ \EndIf \EndFunction \end{algorithmic} \end{algorithm} \section{Direct Access to Row and Column} \label{sec:rowcol} In this section, we present algorithms for directly accessing rows and columns of a grammar-compressed data matrix, which is essential for us to be able to apply PLS on the compressed matrix in order to learn linear regression models. \subsection{Access to Row} Accessing the $i$-th row corresponds to recovering the original $s_i$ from grammar-compressed $s_{gi}^c$. We compute this operation by traversing the grammar trees. For recovering the $i$-th row $s_{i}$, we start traversing the grammar tree having a node of the $q$-th symbol $s_{gi}^c[q]$ as a root for each $q$ from $1$ to $|s_{gi}^c|$. Leaves encountered in the traversal must have integers in sequence $s_{gi}$, which allows us to recover $s_{gi}$ via tree traversals, starting from the nodes with non-terminal $s^c_{gi}[q]$ for each $q\in [1,|s_{gi}^c|]$. We recover the original $i$-th row $s_i$ from $s_{gi}$ by cumulatively adding integers in $s_{gi}$ from $1$ to $|s_{gi}|$, i.e, $s_i[1]=s_{gi}[1]$, $s_i[2]=s_{gi}[2]+s_i[1]$,...,$s_i[|s_{gi}|]=s_{gi}[|s_{gi}|]+s_i[|s_{gi}|-1]$. \subsection{Access to Column} Accessing the $j$-th column of a grammar-compressed data matrix requires us to obtain a set of row identifiers $R$ such that $x_{ij}=1$ for $i\in [1,n]$, i.e., $R=\{i\in [1,n]; x_{ij}=1 \}$. This operation enables us to compute the transpose ${\textbf X}^\intercal$ from ${\textbf X}$ in compressed format, which is used in the optimization algorithm of PLS. $P[Z_i]$ stores a summation of terminal symbols as integers at the leaves under the node corresponding to terminal symbol $Z_i$ in a grammar tree. For example, in Figure~\ref{fig:grammar}, $P[Z_1]=3$, $P[Z_2]=6$, $P[Z_3]=8$ and $P[Z_4]=4$. $P$ can be implemented as an array that is randomly accessed from a given non-terminal symbol. We shall refer to $P$ as the weight array. The size of $P$ depends only on the grammar size. The $j$-th column is accessed to check whether or not $x_{ij} = 1$ in compressed sequence $s^c_{gi}$, for each $i \in [1,n]$. We efficiently solve this problem on grammar-compressed data matrix by using the weight array $P$. Let $u_q$ store the summation of weights from the first symbol $s^c_{gi}[1]$ to the $q$-th symbol $s^c_{gi}[q]$, i.e., $u_q=P[s^c_{gi}[1]]+P[s^c_{gi}[2]]+\cdots+P[s^c_{gi}[q]]$, and let $u_0=0$. If $u_{q}$ is not less than $j$, the grammar tree with the node corresponding to a symbol $s^c_{gi}[q]$ as a root can encode $j$ at a leaf. Thus, we traverse the tree in depth-first order from the node corresponding to symbol $s^c_{gi}[q]$ as follows. Suppose $Z=s^c_{gi}[q]$ and $u=u_{q-1}$. Let $Z_\ell$ (resptively $Z_r$) be $a$ (respectively $b$) of $Z\to ab$ in $D$. (i) if $j < u$, we go down to the left child in the tree; (ii) otherwise, i.e., $j \geq u$, we add $P[Z_\ell]$ to $u$ and go down to the right child. We continue the traversal until we reach a leaf. If $s=j$ at a leaf, this should be $x_{ij}=1$ at row $i$; thus we add $i$ to solution set $R$. Algorithm~\ref{alg:column} shows the pseudo-code for column access. \begin{algorithm}[t] \caption{Access to the $j$-th column on grammar-compressed data matrix. $R$: solution set of row identifiers $i$ at column $j$ s.t. $x_{ij}=1$.} \label{alg:column} \begin{algorithmic}[1] \Function{AccessColumn}{$j$} \For{$i$ in $1..n$} \State $u_{0}=0$ \For{$q$ in $1..|s^c_{gi}|$} \State $u_{q}=u_{q-1}+P[S^c_{gi}[q]]$ \If{$j \leq u_{q}$} \State {\sc Recursion}$(i,j,s^c_{gi}[q],u_{q-1})$ \State break \EndIf \EndFor \EndFor \EndFunction \end{algorithmic} \begin{algorithmic}[1] \Function{Recursion}{$i$,$j$,$Z$,$u$} \If{$Z$ is a terminal symbol} \If{$u+Z=j$} \State Add $i$ to $R$ \EndIf \State return \EndIf \State Set $Z_l$ (resp. $Z_r$) as $a$ (resp. $b$) of $Z\to ab$ in $D$ \If{$u+P[Z_{l}] > j$} \State {\sc Recursion}($i$,$j$,$Z_l$,$u$) \Comment{Go to left child} \Else \State {\sc Recursion}($i$,$j$,$Z_r$,$u+P[Z_l]$) \Comment{Go to right child} \EndIf \EndFunction \end{algorithmic} \end{algorithm} \section{cPLS} In this section we present our cPLS algorithm for learning PLS on grammar-compressed data matrices. We first review the PLS algorithm on uncompressed data matrices. NIPALS~\cite{Wold75} is the conventional algorithm for learning PLS and requires the deflation of the data matrix involved. We thus present a non-deflation PLS algorithm for learning PLS on compressed data matrices. \subsection{NIPALS} Let us assume a collection of $n$ data samples and their output variables $(x_1,y_1),$ $(x_2,y_2),...,(x_n,y_n)$ where $y_i \in \Re$. The output variables are assumed to be centralized as $\sum_{i=1}^{n}y_i=0$. Denote by $y\in \Re^n$ the vector of all the training output variables, i.e., $y=(y_1,y_2,...,y_n)^\intercal$. The regression function of PLS is represented by the following special form, \[ f(x) = \sum_{i=1}^m \alpha_i w_i^\intercal x, \] where the $w_i$ are weight vectors reducing the dimensionality of $x$; they satisfy the following orthogonality condition: \begin{eqnarray} \label{eq:ortho} w_i^\intercal\textbf{X}^\intercal\textbf{X}w_j = \left\{ \begin{array}{cl} 1 & i = j \\ 0 & i \neq j \end{array}. \right. \end{eqnarray} We have two kinds of variables $w_i$ and $\alpha_i$ to be optimized. Denote by ${\textbf W} \in \Re^{d\times m}$ the weight matrix $i$-th column of which is weight vector $w_i$, i.e., ${\textbf W}=(w_1,w_2,...,w_m)$. Let $\alpha \in \Re^m$ be a vector whose $i$-th element is $\alpha_i$, i.e., $\alpha=(\alpha_1,\alpha_2,...,\alpha_m)^\intercal$. Typically, ${\textbf W}$ is first optimized and then $\alpha$ is determined by minimizing the least squares error without regularization, \begin{eqnarray} \label{eq:alpha} \min_{\alpha} ||y-\textbf{X}\textbf{W}\alpha||^2_2. \end{eqnarray} By computing the derivative of equation (\ref{eq:alpha}) with respect to $\alpha$ and setting it to zero, $\alpha$ is obtained as follows: \begin{eqnarray}\label{eq:sol} \alpha = (\textbf{W}^\intercal\textbf{X}^\intercal\textbf{X}\textbf{W})^{-1}\textbf{W}^\intercal \textbf{X}^\intercal y. \end{eqnarray} The weight vectors are determined by the following greedy algorithm. The first vector $w_1$ is obtained by maximizing the squared covariance between the mapped feature $\textbf{X}w$ and the output variable $y$ as follows: $w_1 = \operatornamewithlimits{argmax}_{w} cov^2(\textbf{X}w,y)$, subject to $w^\intercal \textbf{X}^\intercal \textbf{X} w=1$, where $cov(\textbf{X}w,\textbf{y})=y^\intercal \textbf{X}w$. The problem can be analytically solved as $w_1=\mathbf{X}^\intercal y$. For the $i$-th weight vector, the same optimization problem is solved with additional constraints to maintain orthogonality, \begin{eqnarray} \label{eq:cov-i} w_i = \operatornamewithlimits{argmax}_{w} cov^2(\textbf{X}w,y), \end{eqnarray} subject to $w^\intercal \textbf{X}^\intercal \textbf{X} w=1$, $w^\intercal \textbf{X}^\intercal\textbf{X}^\intercal w_j=0$, $j=1,...,i-1$. The optimal solution of this problem cannot be obtained analytically, but NIPALS solves it indirectly. Let us define the $i$-th latent vector as $t_i=\textbf{X}w_i$. The optimal latent vectors $t_i$ are obtained first and the corresponding $w_i$ is obtained later. NIPALS performs the deflation of design matrix $\textbf X$ to ensure the orthogonality between latent components $t_i$ as follows, $\textbf{X} = \textbf{X} - t_it_i^\intercal \textbf{X}$. Then, the optimal solution has the form, $w_i = \mathbf{X}^\intercal y$. Due to the deflation, ${\mathbf X} = {\mathbf X} - t_it_i^\intercal {\mathbf X}$, NIPALS completely destroys the structure of ${\mathbf X}$. Thus, it cannot be used for learning PLS on grammar-compressed data matrices. \subsection{cPLS Algorithm}\label{sec:cpls} \begin{table*}[t] \caption{Summary of datasets.} \label{tab:statistics} \begin{center} {\footnotesize \begin{tabular}{l|rrrrr} Dataset & Label type & Number & Dimension & \#nonzeros & Memory (mega bytes) \\ \hline Book-review & binary & 12,886,488 & 9,253,464 & 698,794,696 & 2,665 \\ Compound & binary & 42,682 & 52,099,292 & 914,667,811 & 3,489 \\ Webspam & binary & 350,000 & 16,609,143 & 1,304,697,446 & 4,977 \\ CP-interaction & binary & 216,121,626 & 3,621,623 & 32,831,736,508 & 125,243 \\ CP-intensity & real & 1,329,100 & 682,475 & 28,865,055,991 & 110,111 \\ \end{tabular} } \end{center} \end{table*} \begin{figure*} \begin{center} \begin{tabular}{ccccc} {\bf Book-review} & {\bf Compound} & {\bf Webspam} & {\bf CP-interaction} & {\bf CP-intensity} \\ \includegraphics[width=0.18\textwidth]{./fig/book-review} & \includegraphics[width=0.18\textwidth]{./fig/compound} & \includegraphics[width=0.18\textwidth]{./fig/webspam} & \includegraphics[width=0.18\textwidth]{./fig/interaction} & \includegraphics[width=0.18\textwidth]{./fig/intensity} \end{tabular} \end{center} \vspace{-0.9cm} \caption{Compression size in mega bytes (MB) and compression time in seconds (sec) for various top-$k$} \label{fig:topk} \end{figure*} We present a non-deflation PLS algorithm for learning PLS on grammar-compressed data matrices. Our main idea here is to avoid deflation by leveraging the connection between NIPALS~\cite{Wold75} and the Lanczos method~\cite{Lanczos1950} which was originally proposed for recursive fitting of residuals without changing the structure of a data matrix. We define residual $r_{i+1}=(r_i - (y^\intercal t_{i-1})t_{i-1})$ that is initialized as $r_1=y$. The $i$-th weight vector is updated as $w_i = {\textbf X}^\intercal (r_{i-1} - (y^\intercal t_{i-1})t_{i-1})$, which means $w_i$ can be computed without deflating the original data matrix $\textbf{X}$. The $i$-th latent vector is computed as $t_i={\textbf X}w_i$ and is orthogonalized by applying the Gram-Schmidt orthogonalization to the $i$-th latent vector $t_i$ and previous latent vectors $t_1$,$t_2$,...,$t_{i-1}$ as follows, $t_i = (\textbf{I} - \textbf{T}_{i-1}\textbf{T}_{i-1}^\intercal)\textbf{X}w_i$, where $\textbf{T}_{i-1}=(t_1,t_2,...,t_{i-1}) \in \Re^{n\times (i-1)}$. The non-deflation PLS algorithm updates the residual $r_i$ instead of deflating ${\textbf X}$, thus enabling us to learn PLS on grammar-compressed data matrices. cPLS is the non-deflation PLS algorithm that learns PLS on grammar-compressed data matrices. The input data matrix is grammar-compressed and then the PLS is learned on the compressed data matrix by the non-deflation PLS algorithm. Our grammar-compressed data matrix supports row and column accesses directly on the compressed format for computing matrix calculations of addition and multiplication, which enables us to learn PLS by using the non-deflation PLS algorithm. Let ${\textbf X}_G$ be the grammar-compressed data matrix of ${\textbf X}$. Algorithm~\ref{alg:1} shows the pseudo-code of cPLS. Since our grammar-compression is lossless, the cPLS algorithm on grammar-compressed data matrices learns the same model as the non-deflation PLS algorithm on uncompressed data matrices and so achieves the same prediction accuracy. \begin{algorithm}[h] \caption{The cPLS algorithm. ${\textbf X}_G$: the grammar-compressed data matrix of ${\textbf X}$.} \label{alg:1} \begin{algorithmic}[1] \State $r_1=y$ \For{$i=1,...,m$} \State $w_i = \textbf{X}_G^\intercal r_i$ \label{line:fec} \Comment{access to column} \If{$i=1$} \State $t_1=\textbf{X}_G w_i$ \Comment{access to row} \Else \State $t_i=(\textbf{I}-\textbf{T}_{i-1}\textbf{T}_{i-1}^\intercal)\textbf{X}_Gw_{i}$ \Comment{access to row} \EndIf \State $t_i=t_i/||t_i||_2$ \State $r_{i+1}=r_i-(y^\intercal t_i)t_i$ \EndFor \State Compute the coefficients $\alpha$ using equation~(\ref{eq:sol}). \end{algorithmic} \end{algorithm} We perform feature extraction after line~\ref{line:fec} at each iteration in Algorithm~\ref{alg:1}. The features corresponding to the top-$u$ largest weights $w_i$ are extracted. Due to the orthogonality condition~(\ref{eq:ortho}), the extracted features give users a novel insight for analyzing data, which is shown in Section~\ref{sec:exp}. The cPLS algorithm has three kinds of variables to be optimized: $w_i$, $r_i$, and $t_i$. The memory for $w_m$ is $O(md)$ and the memory for $t_m$ and $r_i$ is $O(mn)$. Thus, the total memory for the variables in cPLS is $O(m\min(n,d))$ highly depending on parameter $m$. The parameter $m$ controls the amount of fitting of the model to the training data and is typically chosen to optimize the cross validation error. Since the cPLS algorithm learns the model parameters efficiently, $m$ can be set to a small value, which results in overall space-efficiency. \begin{comment} We present the cPLS algorithm that learns PLS on grammar-compressed data matrices. Our grammar-compressed data matrix supports row and column accesses directly on the compressed format, which enables us to compute matrix calculations of addition and multiplication, resulting in significant reductions of working space for learning PLS. Let us assume a collection of $n$ data and outputs $(x_1,y_1), ...,(x_n,y_n)$ where $y_i \in \Re$. The outputs are assumed to be centralized as $\sum_{i=1}^{n} y_i = 0$ and $y=(y_1,y_2,...,y_n)^\intercal$. $\textbf{X}$ of rows $x_1$,$x_2$,...,$x_i$ is grammar-compressed into $\textbf{X}_{G}$. Let $\textbf{W}$ be the $m$-dimensional projection matrix. PLS solves a constrained least squares problem as follows: \begin{eqnarray} &\min_{\alpha}& ||y - \textbf{X}_G\alpha||_2^2 \nonumber \\ &\mbox{such that ~ }& \alpha \in span(\textbf{W}), \nonumber \end{eqnarray} where $span(\textbf{W})$ indicates that the projection matrix $\textbf{W}$ lies in $m$-dimensional Krylov subspace, \begin{eqnarray} && K_m(\textbf{X}_G^\intercal \textbf{X}_G, \textbf{X}_G^\intercal \textbf{y}) \nonumber \\ && = span\{\textbf{X}_G^\intercal \textbf{y}, \textbf{X}_G^\intercal \textbf{X}_G \textbf{X}_G^\intercal \textbf{y},...,(\textbf{X}_G^\intercal \textbf{X}_G)^{m-1} \textbf{X}_G^\intercal \textbf{y}\}. \nonumber \end{eqnarray} Thus, one can solve PLS's problem as a two step method; i) it first projects $\textbf{X}_G$ onto $\textbf{W}$; ii) it then fits regression coefficient vector $\tilde{\alpha}$ in low dimensional projected space $\textbf{X}_G\textbf{W}$. The column vectors of $\textbf{W}=(w_1,w_2,...,w_m)$ are called weight vectors. Thus, regression problem in the projected space can be written as \begin{eqnarray} \label{eq:alpha} \min_{\tilde{\alpha}}||y - \textbf{X}_G\textbf{W}\tilde{\alpha}||_2^2. \end{eqnarray} NIPALS~\cite{Wold75} is a conventional learning algorithm for computing $\textbf{W}$ and $\tilde{\alpha}$. This algorithm requires the deflation of a data matrix and it subtracts a dense matrix from the data matrix in each iteration, resulting in breaking compressions of data matrix~(see Algorithm~\ref{alg:nipals}). Thus, NIPALS is not suitable for learning PLS on grammar-compressed data matrices. Here, we present an non-deflation algorithm for cPLS by leveraging the idea behind the Lanczos method~\cite{Lanczos1950} that was originally proposed for recursive fitting of residuals. cPLS optimizes parameters $w_i$ and $\tilde{\alpha_i}$ on grammar-compressed data matrix $X_G$. The weights $w_i$ are first learned and then the coefficients $\tilde{\alpha_i}$ are determined. The first vector $w_1$ is obtained by maximizing the squared covariance between the mapped feature $\textbf{X}_Gw_1$ and the outputs $\textbf{y}$ as follows: $w_1 = \operatornamewithlimits{argmax}_{w} cov^2(\textbf{X}_Gw,\textbf{y})$, subject to $w^\intercal \textbf{X}_G^\intercal \textbf{X}_G w=1$, where $cov(\textbf{X}_Gw,\textbf{y})=\textbf{y}^\intercal \textbf{X}_Gw$. The problem can analytically be solved as $w_1=\mathbf{X}_G^\intercal \textbf{y}$. For the $i$-th weight vector, the same optimization problem is solved with additional constraints to keep orthogonality, $w_i = \operatornamewithlimits{argmax}_{w} cov^2(\textbf{X}_Gw,\textbf{y})$, subject to $w^\intercal \textbf{X}_G^\intercal \textbf{X}_G w=1$, $w^\intercal \textbf{X}_G^\intercal\textbf{X}_G^\intercal w_j=0$, $j=1,...,i-1$. The optimal solution of this problem cannot be analytically obtained but can be determined in a greedy manner. Let the $i$-th latent vector $t_i=\textbf{X}_G w_i$ and latent matrix $\textbf{T}_i=(t_1,t_2,...,t_i) \in \Re^{n\times i}$. Latent vector $t_i$ is orthogonalized by the Gram-Schmit algorithm at each iteration. Let $r_i$ be the $i$-th residual vector that is initialized as $r_1=\textbf{y}$ for $i=1$ and computed as $r_i=(r_i-(\textbf{y}^\intercal t_{i-1})t_{i-1})$ for $i=2,3,...,m$. Finally, the $i$-th weight vector can be obtained as follows, $w_i=\textbf{X}_G^\intercal(r_{i-1}-(\textbf{y}^\intercal t_{i-1})t_{i-1})$. By computing the derivative of equation~(\ref{eq:alpha}) with respect to $\tilde{\alpha}$ and setting it to zero, $\tilde{\alpha}$ is obtained as follows: \begin{eqnarray}\label{eq:sol} \tilde{\alpha} = (\textbf{W}^\intercal\textbf{X}^\intercal_G\textbf{X}_G\textbf{W})^{-1}\textbf{W}^\intercal \textbf{X}^\intercal_G \textbf{y}. \end{eqnarray} Algorithm~\ref{alg:1} shows the pseudo-code of cPLS. We extract features corresponding to $u$ largest weights $w_i$ at line 3 in Algorithm~\ref{alg:1}. Since these weights lie in a Krylov subspace $K_m(\textbf{X}^\intercal_G\textbf{X}_G,\textbf{X}_G^\intercal \textbf{y})$ of data matrix $\textbf{X}_G$ and outputs $\textbf{y}$, extracted features are highly interpretable (See Section~\ref{sec:exp}). \end{comment} \section{Experiments}\label{sec:exp} \begin{comment} \begin{figure*} \begin{center} \begin{tabular}{ccccc} {\bf Book-review} & {\bf Compound} & {\bf Webspam} & {\bf CP-interaction} & {\bf CP-intensity} \\ \includegraphics[width=0.18\textwidth]{./fig/book-review} & \includegraphics[width=0.18\textwidth]{./fig/compound} & \includegraphics[width=0.18\textwidth]{./fig/webspam} & \includegraphics[width=0.18\textwidth]{./fig/interaction} & \includegraphics[width=0.18\textwidth]{./fig/intensity} \end{tabular} \end{center} \caption{Compression size in mega bytes (MB) and compression time in seconds (sec) for various $k$.} \label{fig:topk} \end{figure*} \end{comment} \begin{comment} \begin{table*} \caption{Compression size in mega bytes (MB), compression time in seconds (sec), and working space for hash table (MB) for varying the top-$k$ parameter.} \begin{center} {\tiny \begin{tabular}{r|ccccc} \hline \multicolumn{6}{c}{{\bf Book-review}} \\ \hline top-k & 10000 & 25000 & 50000 & 75000 & 100000 \\ \hline compression size~(MB) & 1498 & 1503 & 1504 & 1503 & 1502 \\ compression time~(sec) & 57290 & 39681 & 28478 & 21839 & 20004 \\ working space~(MB) & 8451 & 8540 & 8595 & 8610 & 8603 \\ \hline\hline \multicolumn{6}{c}{{\bf Compound}} \\ \hline top-k & 10000 & 25000 & 50000 & 75000 & 100000 \\ \hline compression size~(MB) & 798 & 808 & 817 & 821 & 825 \\ compression time~(sec) & 24508 & 15450 & 11071 & 8838 & 7787 \\ working space~(MB) & 4822 & 4899 & 4960 & 5000 & 5030 \\ \hline\hline \multicolumn{6}{c}{{\bf Webspam}} \\ \hline top-k & 10000& 25000 & 50000& 75000 & 100000 \\ \hline compression size~(MB) & 909 & 920 & 930 & 936 & 940 \\ compression time~(sec) & 36425 & 21621 & 15216 & 12256 & 10584 \\ working space~(MB) & 6962 & 6935 & 7059 & 7135 & 7075 \\ \hline\hline \multicolumn{6}{c}{{\bf CP-interaction}} \\ \hline top-k & 100000 & 250000 & 500000 & 750000 & 1000000 \\ \hline compression size~(MB) & - & 5030 & 5030 & 5030 & 5036 \\ compression time~(sec) & 24hours & 85235 & 61635 & 49761 & 44756 \\ working space~(MB) & - & 16180 & 16201 & 16445 & 16635 \\ \hline\hline \multicolumn{6}{c}{{\bf CP-intensity}} \\ \hline top-k & 100000 & 250000 & 500000 & 750000 & 1000000 \\ \hline compression size size~(MB) & 384 &423& 488 & 502 & 535 \\ compression time~(sec) & 7795 & 6953 & 6763 & 6623 & 6507 \\ working space~(MB) & 2895 & 3106 & 3482 & 3512 & 3738 \\ \hline \end{tabular} } \end{center} \label{tab:res1} \end{comment} \begin{figure*}[t] \begin{center} \begin{tabular}{c} \includegraphics[width=0.72\textwidth]{./fig/chem3} \end{tabular} \end{center} \vspace{-0.8cm} \caption{Extracted features for the top 10 latent components in the application of cPLS to the Compound dataset. Each column represents the highly weighted features (chemical substructures) of a latent component.} \label{fig:com} \end{figure*} \begin{table*} \caption{Compression size in mega bytes (MB), compression time in seconds (sec), and working space for hash table (MB) for varying parameter $\ell$ in Lossy-Re-Pair and $v$ in Freq-Re-Pair for each dataset.} \begin{center} {\footnotesize \begin{tabular}{r|cccc|cccc} \hline \multicolumn{1}{c}{} &\multicolumn{8}{c}{{\bf Book-review}} \\ \hline \multicolumn{1}{c}{} &\multicolumn{4}{|c|}{{\bf Lossy-RePair} $\ell$(MB)} & \multicolumn{4}{c}{{\bf Freq-RePair} $v$(MB)} \\ \hline & 1 & 10 & 100 & 1000 & 1 & 10 & 100 & 1000\\ \hline compression size~(MB) & 1836 & 1685 & 1502 & 1501 & 2021 & 1816 & 1680 & 1501 \\ compression time~(sec) & 9904 & 12654 & 19125 & 20004 & 2956 &2355 & 3165 & 21256 \\ working space (MB) & 1113 & 1931 & 7988 & 8603 & 292 & 616 & 3856 & 6724 \\ \hline\hline \multicolumn{1}{c}{} & \multicolumn{8}{c}{{\bf Compound}} \\ \hline \multicolumn{1}{c}{} &\multicolumn{4}{|c|}{{\bf Lossy-RePair} $\ell$(MB)} & \multicolumn{4}{c}{{\bf Freq-RePair} $v$(MB)} \\ \hline & 1 & 10 & 100 & 1000 & 1 & 10 & 100 & 1000\\ \hline compression size~(MB) & 1288 & 859 & 825 & 825 & 1523 & 1302 & 825 & 825 \\ compression time~(sec) & 5096 & 7053 & 7787 & 7946 & 1362 & 1587 & 8111 & 8207 \\ working space~(MB) & 1113 & 1926 & 5030 & 5030 & 292 & 616 & 3535 & 3535 \\ \hline\hline \multicolumn{1}{c}{} & \multicolumn{8}{c}{{\bf Webspam}} \\ \hline \multicolumn{1}{c}{} &\multicolumn{4}{|c|}{{\bf Lossy-RePair} $\ell$(MB)} & \multicolumn{4}{c}{{\bf Freq-RePair} $v$(MB)} \\ \hline & 1 & 10 & 100 & 1000 & 1 & 10 & 100 & 1000\\ \hline compression size~(MB) & 1427 & 948 & 940 & 940 & 2328 & 2089 & 1050 & 940 \\ compression time~(sec) & 6953 & 10585 & 10584 & 10964 & 2125 & 2799 & 7712 & 11519 \\ working space~(MB) & 1112 & 1923 & 7075 & 7075 & 292 & 616 & 3856 & 5539 \\ \hline\hline \multicolumn{1}{c}{} &\multicolumn{8}{c}{{\bf CP-interaction}} \\ \hline \multicolumn{1}{c}{} &\multicolumn{4}{|c|}{{\bf Lossy-RePair} $\ell$(MB)} & \multicolumn{4}{c}{{\bf Freq-RePair} $v$(MB)} \\ \hline & 10 & 100 & 1000 & 10000 & 10 & 100 & 1000 & 10000 \\ \hline compression size~(MB) & - & 5199 & 5139 & 5036 & 20307 & 9529 & 5136 & 5136 \\ compression time~(sec) & 24hours & 55919 & 44853 & 43756 & 24565 & 39647 & 47230 & 48653 \\ working space~(MB) & - & 9914 & 16650 & 16635 & 616 & 3856 & 13796 & 13796 \\ \hline\hline \multicolumn{1}{c}{} & \multicolumn{8}{c}{{\bf CP-intensity}} \\ \hline \multicolumn{1}{c}{} &\multicolumn{4}{|c|}{{\bf Lossy-RePair} $\ell$(MB)} & \multicolumn{4}{c}{{\bf Freq-RePair} $v$(MB)} \\ \hline & 10 & 100 & 1000 & 10000 & 10 & 100 & 1000 & 10000 \\ \hline compression size~(MB) & 558 & 543 & 540 & 535 & 588 & 535 & 535 & 535 \\ compression time~(sec) & 8103 & 6479 & 6494 & 6657 & 5423 & 5848 & 5859 & 5923 \\ working space~(MB) & 1936 & 3552 & 3722 & 3738 & 616 & 2477 & 2477 & 2477 \\ \hline \end{tabular} } \end{center} \label{tab:res2} \caption{Results of cPLS, PCA-SL, bMH-SL and SGD for various datasets. Dspace: the working space for storing data matrix (MB), Ospace: the working space for optimization algorithm and Ltime: learning time (sec). } \vspace{-0.2cm} {\footnotesize \begin{center} \begin{tabular}{r|c|c|c|c|c|c} \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{{\bf cPLS}} \\ \hline Data & $m$ & Dspace(MB) & Ospace(MB) & Ltime(sec) & AUC/PCC \\ \hline Book-review & 100 & 1288 & 15082 & 21628 & 0.96 \\ Compound & 20 & 786 & 7955 & 1089 & 0.83 \\ Webspam & 60 & 890 & 7736 & 4171 & 0.99 \\ CP-interaction & 40 & 4367 & 53885 & 35880 & 0.77 \\ CP-intensity & 60 & 472 & 10683 & 33969 & 0.67 \\ \hline \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{{\bf PCA-SL}} \\ \hline Data & $m/C$ & Dspace(MB) & Ospace(MB) & Ltime(sec) & AUC/PCC \\ \hline Book-review & 100/1 & 14747 & 110 & 6820 & 0.70 \\ Compound & 25/0.1 & 12 & 1 & 6 & 0.65 \\ Webspam & 50/1 & 200 & 2 & 129 & 0.99 \\ CP-interaction & - & - & - & >24hours & - \\ CP-intensity & 100/0.1 & 1521 & 11 & 42 & 0.11 \\ \hline \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{{\bf bMH-SL}} \\ \hline Data & $b/h/C$ & Dspace(MB) & Ospace(MB) & Ltime(sec) & AUC/PCC \\ \hline Book-review & 100/16/0.01 & 2457 & 110 & 1033 & 0.95 \\ Compound & 30/16/10 & 2 & 1 & 1 & 0.62 \\ Webspam & 30/16/10 & 20 & 2 & 2 & 0.99 \\ CP-interaction & 30/16/0.1 & 12366 & 1854 & 10054 & 0.77 \\ CP-intensity & 100/16/0.1 & 253 & 11 & 45 & 0.54 \\ \hline \multicolumn{1}{c|}{} & \multicolumn{5}{c|}{{\bf SGD}} \\ \hline Data & $C$ & Dspace(MB) & Ospace(MB) & Ltime(sec) & AUC/PCC \\ \hline Book-review & 10 & - & 1694 & 57 & 0.96 \\ Compound & 10 & - & 9539 & 83 & 0.82 \\ Webspam & 10 & - & 3041 & 85 & 0.99 \\ CP-interaction & 1 & - & 663 & 3163 & 0.75 \\ CP-intensity & 0.1 & - & 124 & 280 & 0.04 \\ \hline \end{tabular} \end{center} } \label{tab:acc} \end{table*} In this section, we demonstrate the effectiveness of cPLS with massive datasets. We used five datasets, as shown in Table~\ref{tab:statistics}. "Book-review" consists of 12,886,488 book reviews in English from Amazon~\cite{McAuley13}. We eliminated stop-words from the reviews and then represented them as 9,253,464 dimensional fingerprints, where each dimension of the fingerprint represents the presence or absence of a word. "Compound" is a dataset of 42,682 chemical compounds that are represented as labeled graphs. We enumerated all the subgraphs of at most 10 vertices from the chemical graphs by using gSpan~\cite{Yan02} and then converted each chemical graph into a 52,099 dimensional fingerprint, where each dimension of the fingerprint represents the presence or absence of a chemical substructure. "Webspam" is a dataset of 16,609,143 fingerprints of 350,000 dimensions\footnote{The dataset is downloadable from \url{http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html}.}. "CP-interaction" is a dataset of 216,121,626 compound-protein pairs, where each compound-protein pair is represented as a 3,621,623 dimensional fingerprint and 300,202 compound-protein pairs are interacting pairs according to the STITCH database~\cite{Kuhn10}. We used the above four datasets for testing the binary classification ability. "CP-intensity" consists of 1,329,100 compound-protein pairs represented as 682,475 dimensional fingerprints, where the information about compound-protein interaction intensity was obtained from several chemical databases (e.g., ChEMBL, BindingDB and PDSP Ki). The intensity was observed by IC50 (half maximal (50\%) inhibitory concentration). We used the "CP-intensity" dataset for testing the regression ability. The number of all the nonzero dimensions in each dataset is summarized in the \#nonzero column in Table~\ref{tab:statistics}, and the size for storing fingerprints in memory by using 32bits for each element is written in the memory column in Table~\ref{tab:statistics}. We implemented all the methods by C++ and performed all the experiments on one core of a quad-core Intel Xeon CPU E5-2680 (2.8GHz). We stopped the execution of each method if it had not finished within 24hours in the experiments. In the experiments, cPLS did not use a secondary storage device for compression, i.e., cPLS compressed data matrices by loading all data in memory. \subsection{Compression Ability and Scalability}\label{sec:comp} First, we investigated the influence on compression performance of the top-$k$ parameter in our Re-Pair algorithms. For this setting, we used the Lossy-Re-Pair algorithm, where parameter $\ell$ is set to the total length of all rows in an input data matrix in order to keep all the symbols in the hash table. We examined $k=\{1\times 10^4, 2.5\times 10^4, 5\times 10^4, 7.5\times 10^4, 10\times 10^4 \}$ for the Book-review, Compound and Webspam datasets and examined $k=\{1\times 10^5, 2.5\times 10^5, 5\times 10^5, 7.5\times 10^5, 10\times 10^5\}$ for the CP-interaction and CP-intensity datasets. Figure~\ref{fig:topk} shows compression size and compression time for various top-$k$. We observed a trade-off between compressed size and compression time for all the datasets. The smaller the compressed size, the larger the compression time for larger values of $k$. In particular, significantly faster compression time was possible at the cost of only slightly worse compression. For example, Lossy-Re-Pair took 57,290 seconds to compress the Book-review dataset and its size was 1,498 mega bytes (MB) for $k$=10000. When $k$=100000, compression time dropped to 20,004 seconds (less than half), while compressed size increased negligibly to 1,502MB. The same trends for the Book-review dataset were observed in the other datasets, which suggests that in practice a large value of $k$ can be chosen for fast compression, without adversely affecting compression performance. Notably, we observed our compression method to be particularly effective for the larger datasets: CP-interaction and CP-intensity. The original sizes of CP-interaction and CP-intensity were 125GB and 110GB, respectively, while the compressed sizes of CP-interaction and CP-intensity were at most 5GB and at 535MB, respectively. Our compression method thus achieved compression rates of 4\% and less than 1\% for CP-interaction and CP-intensity, respectively. Such significant reductions in data size enable the PLS algorithm to scale to massive data. Next, we evaluated the performance of Lossy-Re-Pair and Freq-Re-Pair, where parameters $\ell$$=$$\{1$MB, $10$MB, $100$MB, $1000$MB$\}$ were examined for Lossy-Re-Pair, and parameters $v$ $=$$\{1$MB, $10$MB, $100$MB, $1000$MB$\}$ and $\epsilon=\{30\}$ were examined for Freq-Re-Pair. Table~\ref{tab:res2} shows the compressed size, compression time and the working space used for the hash table in Lossy-Re-Pair and Freq-Re-Pair. We observed that both Lossy-Re-Pair and Freq-Re-Pair achieved high compression rates using small working space. Such efficiency is crucial when the goal is to compress huge data matrices that exceed the size of RAM; our Re-Pair algorithm can compress data matrices stored in external memory (disk). For compressing the CP-interaction dataset, Lossy-Re-Pair and Freq-Re-Pair consumed 16GB and 13GB, respectively, achieving a compressed size of 5GB. We observed the same tendency for the other datasets (See Table~\ref{tab:res2}). \subsection{Prediction Accuracy}\label{sec:pred} We evaluated the classification and regression capabilities of cPLS, PCA-SL, bMH-SL and SGD. Following the previous works~\cite{Yu10, Li11}, we randomly selected 20\% of samples for testing and used the remaining 80\% of samples for training. cPLS has one parameter $m$, so we selected the best parameter value among $m=\{10, 20,...,100\}$ that achieved the highest accuracy for each dataset. The PCA phase of PCA-SL has one parameter deciding the number of principal components $m$, which was chosen from $m=\{10,25,50,75,100\}$ whose maximum value of $100$ is the same as that of cPLS's parameter $m$. Linear models were learned with LIBLINEAR~\cite{Fan08}, one of the most efficient implementations of linear classifiers, on PCA's compact feature vectors, where the hinge loss of linear SVM for classification and the squared error loss for regression were used with $L_2$-regularization. The learning process of PCA-SL~\cite{Jolliffe86,Elgamal15} has one parameter $C$ for $L_2$-regularization, which was chosen from $C=\{10^{-5}, 10^{-4},$ $...,10^{5}\}$. For PCA-SL~\cite{Jolliffe86,Elgamal15}, we examined all possible combinations of two parameters ($m$ and $C$) and selected the best combination achieving the highest accuracy for each dataset. The hashing process of bMH-SL~\cite{Li11} has two parameters (the number of hashing values $h$ and the length of bits $b$), so we examined all possible combinations of $h=\{10, 30, 100\}$ and $b=\{8, 16\}$. As in PCA-SL, linear models were learned with LIBLINEAR~\cite{Fan08} on bMH's compact feature vectors, where the hinge loss of linear SVM for classification and the squared error loss for regression were used with $L_2$-regularization. The learning process of bMH-SL~\cite{Li11} has one parameter $C$ for $L_2$-regularization, which was chosen from $C=\{10^{-5}, 10^{-4},$ $...,10^{5}\}$. For bMH-SL, we examined all possible combinations of three parameters ($h$, $b$, and $C$) and selected the best combination achieving the highest accuracy for each dataset. We implemented SGD on the basis of the AdaGrad algorithm~\cite{Duchi11} using the logistic loss for classification and the squared error loss for regression with $L_2$-regularization. SGD~\cite{Duchi11} has one parameter $C$ for $L_2$-regularization, which was also chosen from $C=\{10^{-5}, 10^{-4},...,10^{5}\}$. We measured the prediction accuracy by the area under the ROC curve (AUC) for classification and Pearson correlation coefficient (PCC) for regression. Note that AUC and PCC return 1 for perfect inference in classification/regression, while AUC returns 0.5 for random inference and PCC returns 0 for random inference. We report the best test accuracy under the above experimental settings for each method below. Table~\ref{tab:acc} shows the prediction accuracy, working space and training time of cPLS, PCA-SL, bMH-SL, and SGD. The working space for the storing data matrix and the working space needed for optimizations were separately evaluated. While PCA-SL and bMH-SL significantly reduced the working space for storing data matrices, the classification and regression accuracies were low. Since PCA-SL and bMH-SL compress data matrices without looking at the correlation structure between data and output variables for compressing data matrices, high classification and regression accuracies were difficult to achieve SGD significantly reduced the working space, since it did not store data matrices in memory. Classification and regression accuracies of SGD were not high, because of the instability of the optimization algorithm. In addition, SGD is applicable only to simple linear models, making the learned model difficult to interpret. Our proposed cPLS outperformed the other methods (PCA-SL, bMH-SL, and SGD) in terms of AUC and PCC and significantly reduced the working space. The results showed cPLS's efficiency for learning PLS on compressed data matrices while looking at the correlation structure between data and output variables. Such a useful property enables us to extract informative features from the learned model. \subsection{Interpretability}\label{seq:int} Figure~\ref{fig:com} shows the top-$10$ highly-weighted features that were extracted for each component in the application of cPLS to the Compound dataset, where one feature corresponds to a compound chemical substructure. It was observed that structurally similar chemical substructures were extracted together as important features in the same component, and the extracted chemical substructures differed between components. This observation corresponds to a unique property of cPLS. Analysing large-scale compound structure data is of importance in pharmaceutical applications, especially for rational drug design. For example, the extracted chemical substructures are beneficial for users who want to identify important chemical fragments involved in therapeutic drug activities or adverse drug reactions. \begin{comment} \begin{table*}[t] \begin{center} \caption{Extracted features by cPLS from the book-review dataset. Each column represents the features of a latent component.} \begin{tabular}{|r|r|r|r|r|r|r|r|r|r|} \hline 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline great & good & books & life & read & recommend & character & great & life & story\\ life & excellent & good & amazing & good & time & story & buy & buy & author \\ love & bit & amazing & character & great & not & reader & great & good & buy \\ read & easy & author & writing & recommend & good & buy & history & reading & men \\ wonderful & characters & fun & people & books & years & bad & bad & men & society \\ story & books & lot & good & amazing & work & great & society & author & recommend \\ excellent & time & worth & society & life & bad & history & men & society & enjoyed\\ recommend & enjoyed & bit & heart & bad & society & society & wonderful & enjoyed & character\\ years & human & favorite & thought & reading & books & stories & excellent & bought & excellent \\ easy & amazing & easy & plot & worth & fact & men & bought & lot & bought \\ \hline \end{tabular} \label{tab:amazonbook} \end{center} \end{table*} \end{comment} \section{Conclusions and Future Work} We presented a scalable algorithm for learning interpretable linear models --- called cPLS --- which is applicable to large-scale regression and classification tasks. Our method has the following appealing properties: \vspace{-0.5\baselineskip} { \setlength{\leftmargini}{10pt} \begin{enumerate} \setlength{\parskip}{0.02cm} \setlength{\itemsep}{0.02cm} \setlength{\itemindent}{0pt} \setlength{\labelsep}{3pt} \item {\bf Scalability}: cPLS is applicable to large numbers of high-dimensional fingerprints (see Sections~\ref{sec:comp} and ~\ref{sec:pred}). \item {\bf Prediction Accuracy}: The optimization of cPLS is numerically stable, which enables us to achieve high prediction accuracies (see Section~\ref{sec:pred}). \item{\bf Usability}: cPLS has only one hyperparameter to be tuned in cross-validation experiments (see Section~\ref{sec:cpls}). \item {\bf Interpretability}: Unlike lossy compression-based methods, cPLS can extract informative features reflecting the correlation structure between data and class labels (or response variables), which makes the learned models easily interpretable (see Section~\ref{seq:int}). \end{enumerate} } \vspace{-0.5\baselineskip} In this study, we applied our proposed grammar compression algorithm to scaling up PLS, but in principle it can be used for scaling up other machine learning methods or data mining techniques. An important direction for future work is therefore the development of scalable learning methods and data mining techniques based on grammar-compression techniques. Such extensions will open the door for machine learning and data mining methods to be applied in various large-scale data problems in research and industry. \section{Acknowledgments} This work was supported by MEXT/JSPS Kakenhi (24700140, 25700004 and 25700029), the JST PRESTO program, the Program to Disseminate Tenure Tracking System, MEXT and Kyushu University Interdisciplinary Programs in Education and Projects in Research Development, and the Academy of Finland via grant 294143. \bibliographystyle{plain}
{'timestamp': '2016-06-17T02:04:34', 'yymm': '1606', 'arxiv_id': '1606.05031', 'language': 'en', 'url': 'https://arxiv.org/abs/1606.05031'}
arxiv
\section{Introduction} \label{sec:introduction} Mobile augmented reality (AR) has attracted increasing interest from academia and industry to better engage users by allowing seamless integration of physical and virtual environments~\cite{Google_for_Education_undated-rj,Inter_IKEA_Systems_B_V2017-iv,Andrews2019-qh}. The current mobile AR ecosystem is infused with new hardware development~\cite{ipad-lidar}, improved frameworks~\cite{arkit}, advancing vision and graphics algorithms~\cite{pointar_eccv2020}, as well as end-user facing applications ranging from e-commerce ones to educational ones~\cite{Amazon_undated-vp}. Given the interactive nature of AR applications, users often prefer virtual objects of high visual quality. The rendered virtual objects should look realistic and feel like they belong to the physical surroundings, a property commonly referred to as \emph{visual coherence}. For example, virtual sunglasses that are overlaid on a user's face should look like physical sunglasses (realistic) and reflect the correct physical environment (visually coherent). To achieve both realistic and visually coherent rendering, mobile AR applications require access to an accurate representation of omnidirectional environment lighting (often represented as \emph{environment map} for image-based lighting) at the user-specified rendering position~\cite{pointar_eccv2020,prakash2019gleam}. However, obtaining a high-quality environment map for mobile AR has to overcome several key challenges. First, the inherently spatial variation of indoor environment lighting makes the environment map at the \emph{observation position}---which can be more easily reconstructed with more camera observations---a poor approximation of the \emph{rendering position} environment map. This challenge was demonstrated in prior work~\cite{Garon2019,pointar_eccv2020} and our motivating example (see Figure~\ref{fig:motivation}). Second, the natural user mobility of mobile AR usage can induce noise to necessary data (such as 6DoF tracking and RGB image data) for lighting estimation. For example, we observe that the tracking data provided by ARKit can show that consecutive camera frames are misaligned, although they represent the same physical space. Third, mobile devices can have heterogeneous sensing capability, e.g., in terms of cameras' field-of-view (FoV) or their depth-sensing ability, which makes it necessary to consider auxiliary components (such as depth estimation~\cite{zhang-indepth,Alhashim2018,Ranftl2020}) for obtaining accurate lighting. Fourth, mobile devices have relatively limited resources compared to their desktop counterpart, while the interactivity nature often requires 30 fps rendering. The computational limitation makes it challenging to directly use computational-intensive models designed to run on powerful GPU servers~\cite{Song2019}, and motivates minimal usage or optimization of time-consuming operations (such as point cloud registration~\cite{besl1992method} and mesh reconstruction~\cite{bernardini-ball-pivoting}). In this work, we investigate the problem of \emph{providing high-quality lighting information for mobile AR} by addressing the above four key challenges. Our key goal is to support realistic and visually coherent rendering of virtual objects with various geometries and materials. Figure~\ref{fig:teaser} compares the visual effect of virtual objects rendered with lighting information obtained with our proposed system called \textsc{FusedAR}\xspace and ARKit. We show that \textsc{FusedAR}\xspace achieves high-quality rendering with structurally similar reflections with the physical object and more visually coherent reflection than objects rendered with ARKit. \textsc{FusedAR}\xspace involves a novel technique called \emph{distance-based lighting reconstruction\xspace} and several complementary components that work together to deliver a high-quality environment map with low-performance impact. We design the distance-based lighting reconstruction\xspace with the insight of dividing the camera observations into two types, i.e., the near-field and far-field observations, to speed up lighting reconstruction while maintaining the visual quality. This technique shares a similar spirit to the well-known screen space reflection~\cite{mcguire2014efficient} and is tailored to mobile AR by fully exploring user mobility. Specifically, \textsc{FusedAR}\xspace generates a multi-view dense point cloud to represent \emph{near-field} observations, corresponding to the portion of the environment map that receives more accurate and higher confidence depth information surrounding the rendering position. This design helps produce geometrically accurate lighting transformation between the observation and rendering positions, thus supporting key rendering features like reflections and providing visually coherent results. Furthermore, \textsc{FusedAR}\xspace leverages far-field observations to handle the anisotropic lighting property by reconstructing sparse point clouds to reduce visual errors. On top of the distance-based lighting reconstruction\xspace, we incorporate two noise-tolerant data capturing policies, i.e., guided bootstrapped movement and motion-based automatic capturing, to improve the data quality. The \emph{guided bootstrapped movement} policy directs the camera views to capture required near-field and far-field observations efficiently. This policy also brings other benefits, such as enlarged FoVs and reduced user movement, for reconstructing high-quality lighting. It is worth noting that \textsc{FusedAR}\xspace can leverage new observations, e.g., device orientation and user movement, to improve the quality of the environment map progressively. The \emph{motion-based automatic capturing} policy leverages multi-sensory information to capture spatially and temporally new observations. Moreover, we propose two performance optimizations that significantly reduce the time reconstructing the final environment map from the intermediate 3D point clouds. The first optimization uses a lightweight multi-resolution projection\xspace instead of the traditional expensive mesh reconstruction to generate the near-field portion. The second optimization uses a unit sphere-based approach called \emph{anchor extrapolation} to generate gradient coloring and blurring effect of the far-field portion. Lastly, \textsc{FusedAR}\xspace supports reconstruction quality and time trade-offs to account for dynamic lighting conditions. By default, \textsc{FusedAR}\xspace provides three quality presets for mobile AR developers. We implement \textsc{FusedAR}\xspace as an edge-assisted framework that consists of about 2.2K lines of code running on both the mobile device and the edge server. Specifically, the client-side component works with various sensors, including color, depth, and motion sensors, to capture near-field and far-field observations. The resulting data is encoded and sent to the edge server to generate a fixed-size unit sphere point cloud and multi-view dense point clouds with good alignment and visual pixel continuity. Mobile AR applications built with Unity ARFoundation can directly use \textsc{FusedAR}\xspace to render realistic virtual objects. We also implement a reference iOS AR application for our testbed-based evaluation. To evaluate \textsc{FusedAR}\xspace in a controlled environment, we develop a simulator based on Unreal Engine that exposes multiple knobs for controlling physical factors such as camera location and FoV while providing ground truth lighting information. The testbed-based system evaluation shows that \textsc{FusedAR}\xspace achieves more visually coherent rendering results and higher PSNR/SSIM values than ARKit for three real-world scenes. The end-to-end latency measurements show that \textsc{FusedAR}\xspace can generate about 22 environment maps per second, effectively supporting 22 fps which is sufficient for most mobile AR applications~\cite{Xu2021-sn, Yi2020-na}. Our simulator-based evaluations include one realistic indoor scene and six virtual objects of different shapes and materials. We evaluate the performance of \textsc{FusedAR}\xspace with various observation-rendering position pairs. We show that it achieves 36.7\% and 17.1\% higher rendering PSNR compared to a recent deep learning-based lighting approach~\cite{xihe_mobisys2021} and the environment lighting captured by 360$^{\circ}$ cameras at the observation position, respectively. Related work on generating spatially-varying lighting includes classical physical probe-based techniques~\cite{debevec2006image,debevec2008rendering,prakash2019gleam} and learning-based solutions~\cite{Garon2019,pointar_eccv2020,Song2019,Somanath2020-of}. Physical probe-based techniques often produce high-quality environment maps but have more constrained usage scenarios since they require additional setup~\cite{Somanath2020-of}. On the other hand, the applicability of learning-based solutions is often limited by the access to extensive training datasets, e.g., Matterport3D~\cite{chang2017matterport3d}, and their suitability to run on heterogeneous mobile devices~\cite{Song2019}. Another side effect is the difficulty of conducting comprehensive comparisons due to the lack of publicly available source code and benchmark dataset~\cite{Somanath2020-of}. In this work, we are interested in designing a mobile-specific lighting framework that circumvents the above-mentioned limitations by considering mobile characteristics from the outset. Compared to a recent method by Somanath et al.~\cite{Somanath2020-of} that generates HDR environment maps using a neural network based on adversarial training, \textsc{FusedAR}\xspace has the advantage of simplicity yet achieving good visual coherence. In summary, we make the following key contributions: \begin{itemize}[leftmargin=.12in,topsep=4pt] \item We design a novel technique called distance-based lighting reconstruction\xspace, which generates high-quality environment maps from mobile cameras with limited FoV. Each environment map consists of near-field and far-field portions, separately constructed from near-field and far-field observations. The resulting environment map captures spatial and directional variances and is suitable for reflective rendering. \item We develop several complementary approaches to handle mobility-induced noise, limited mobile sensing capabilities, and the computation intensity that naturally arises during the lighting reconstruction process. For example, our multi-resolution projection\xspace and anchor extrapolation techniques efficiently project the intermediate 3D point clouds to the final 2D environment maps. These techniques ensure high data input quality, good usability, and low reconstruction time. \item We implement the entire framework as an edge-assisted system called \textsc{FusedAR}\xspace and develop a simulator based on Unreal Engine for evaluation purposes. The system implementation provides a platform to compare \textsc{FusedAR}\xspace to the commercial framework ARKit. The simulator facilitates controlled experiments and allows easy comparisons between lighting techniques and ground truth lighting. Our source code and related artifacts are available at \url{https://github.com/cake-lab/LitAR} to encourage follow-up research. \item We evaluate the performance of \textsc{FusedAR}\xspace on a small-scale testbed using the simulator. The testbed-based system evaluation shows that \textsc{FusedAR}\xspace (at all three quality presets) outperforms ARKit in three real-world indoor scenes. \textsc{FusedAR}\xspace also delivers environment maps at 22 fps or even higher, depending on the quality settings. The simulation-based evaluation shows that \textsc{FusedAR}\xspace can achieve up to 36.7\% higher PSNR values on objects with various geometries and materials than a recent lighting framework~\cite{xihe_mobisys2021}. \end{itemize} \section{Background: Lighting For Mobile AR} Obtaining lighting information is a classic problem in computer vision and computer graphics~\cite{Einabadi2021-vq}. Access to accurate environment lighting information is crucial to many applications related to photorealistic rendering and image manipulation, such as 3D object composition~\cite{Gardner2019-gc} and portrait relighting~\cite{Pandey2021-wn}. As the capability of mobile devices improves and AR re-emerges in user-facing applications~\cite{Amazon_undated-vp, Inter_IKEA_Systems_B_V2017-iv}, obtaining environment lighting for photorealistic rendering has gained increasing interests in various research communities~\cite{ChengSCDZ18_graph,prakash2019gleam,pointar_eccv2020,Somanath2020-of,xihe_mobisys2021}. In addition to these mobile-specific lighting techniques, researchers have investigated image-based lighting~\cite{debevec2006image,corsini2008stereo,karis2013real}, generating environment lighting representations from camera videos~\cite{havran2005interactive,unger2013temporally,grosch2007consistent}, and assisted lighting reconstruction with physical probes~\cite{debevec2008rendering}, object cues~\cite{Sun2019-rw}, or scene geometry~\cite{Maier2017-qp,Azinovic2019-nz}. Recent work is mostly deep learning-based and can be broadly categorized based on the output: estimating low-frequency lighting~\cite{Garon2019,xihe_mobisys2021} or high-quality lighting~\cite{Gardner2017,Song2019}. This paper aims to provide lighting support for mobile augmented reality (AR), an emerging application that augments the real world by overlaying with virtual objects in indoor scenes. Our work will develop a non-learning-based approach by leveraging \emph{lighting reconstruction} (\S\ref{sec:lighting_reconstruction_premier}) to address the following two issues: {\em (i)} the typical limitations of deep learning based methods such as training data availability and inference performance on heterogeneous mobile resources; {\em (ii)} the underexploited mobile characteristics. Note that techniques commonly used for creating realistic virtual worlds, such are screen space rendering~\cite{mcguire2014efficient} that only ray traces what is being presented on the screen, can fall short in delivering the visual coherence required by AR. This shortcoming is mainly due to the key difference in perceivable lighting impact on virtual objects; unlike in fully immersive environments, AR users can observe environment lighting outside screen space and potentially perceive incoherent visual artifacts. Furthermore, we will focus on developing lighting understanding techniques for image-based rendering~\cite{debevec2006image}, e.g., representing lighting in the form of an \emph{environment map} to render virtual objects with different materials. Our key goal is to generate high-quality environment maps for visually coherent rendering for mobile AR while keeping the time cost low. Specifically, we aim to reduce the overall time to obtain the final environment map and the component-wise time for intermediate outputs (such as point cloud projection). \begin{figure} \centering \includegraphics[width=\linewidth]{assets/lighting_reconstruction_workflow.pdf} \caption{A simplified workflow of mobile AR lighting reconstruction. \textnormal{ In this example, the mobile device starts at position $P_{t1}$ and points toward the rendering position on the table specified by the mobile user. Data such as color and depth images, as well as device tracking data, will be captured. The device will further capture more data (e.g., color/depth images from a different viewing direction) at position $P_{t2}$, which naturally overlaps with the data captured at $P_{t1}$. The data is maintained in a fixed-size buffer and will be aggregated to generate a global multi-view point cloud. We will update the point cloud as new data arrives and use it to generate the final environment map for virtual object rendering. } } \label{fig:ar_workflow} \end{figure} \subsection{Lighting Reconstruction Primer} \label{sec:lighting_reconstruction_premier} In this section, we present the critical information of \emph{multi-view lighting reconstruction} (refer to Figure~\ref{fig:ar_workflow}), which serves as the basis for understanding our proposed lighting reconstruction framework \textsc{FusedAR}\xspace. At a high level, we define \emph{lighting reconstruction} as a task similar to multi-view 3D reconstruction~\cite{openmvs2020,moulon2016openmvg} with the key difference in the reconstruction target. Our key insight is that by leveraging multiple captures of the physical environment that are often required by commercial AR frameworks~\cite{arkit,arcore}, we can use typical techniques used by 3D reconstruction to understand the environment lighting. Conceptually simple, we have to address several challenges specific to the mobile AR environment (detailed in \S\ref{sec:motivation}). Next, we describe the general procedure for the lighting reconstruction task. \subsubsection{Step 1: Capture Environment Data.} Several different types of data, e.g., color images and depth information, are needed in lighting reconstruction. The common way to obtain these required data is to leverage a modern mobile device with a reasonable camera directly and to have the mobile AR users move the mobile device to scan the surroundings manually. The resulting captured data is often in the format of LDR or HDR images, which can then be used to reconstruct the environment's appearance and geometry. To improve the reconstruction quality and performance, one can also resort to additional setups such as using a physical chrome ball~\cite{prakash2019gleam,debevec2006image} or additional mobile sensors such as depth sensors~\cite{Huawei_undated-ca,ipad-lidar} and accelerometers. Ambient light sensors can also be used to observe the ambient color, which helps match the object's color tone with the environment's lighting. In this work, we focus on mobile devices that can capture color and depth images and provide device tracking data, e.g., a LiDAR-equipped iPad Pro. Data will be captured from different viewing positions and used in the next step for generating a multi-view point cloud. \subsubsection{Step 2: Generate a Point Cloud.} Similar to other 3D reconstruction tasks~\cite{openmvs2020,moulon2016openmvg}, we convert the camera color, depth images, and device tracking data, into a point cloud-based representation in the world space. The point cloud data structure allows us to combine the subsequent view data more efficiently than directly stitching 2D images. Two practical issues often need to be addressed. First, real-world device tracking data can be noisy; one way to handle this issue is to use point cloud registration techniques such as the iterative closest point registration~\cite{besl1992method} to align the points. Second, some points might not have accurate depth information; to ensure the reconstruction quality, only points with high depth confidence values, which measure the accuracy of depth data, should be used. Note that we will update the point cloud based on newer data; conceptually, such an update helps deal with both spatial and temporal variance by initializing/overriding points in the 3D space at different times. \subsubsection{Step 3: Finalize Environment Lighting.} The generated multi-view point cloud consists of rich environment information and is equivalent to having an enlarged virtual camera FoV at the rendering position. It is worth noting that enlarging the camera FoV at the observation position can also increase the camera observation coverage, though less effective than multi-view enlargement. To directly use modern rendering engines to support realistic rendering, we convert the point cloud to lighting formats, such as spherical image format or environment map. For example, one can project the point cloud into a 2D environment map that captures the omnidirectional environment lighting. \section{Motivation and Challenges} \label{sec:motivation} \begin{figure}[t] \begin{subfigure}[b]{0.47\columnwidth} \centering \includegraphics[width=\linewidth]{assets/lighting_variance.pdf} \caption{Spatial lighting variance} \label{fig:motivation:lighting_variance} \end{subfigure}\quad \begin{subfigure}[b]{0.47\columnwidth} \centering \includegraphics[width=\linewidth]{assets/mobility_induced_noise.pdf} \caption{Mobility-induced noise} \label{fig:motivation:noise} \end{subfigure} \caption{ Motivating examples. \textnormal{ (a) The same mirror ball object rendered with environment maps at the AR mobile device's position and the mirror ball placement position can have very different visual appearances. (b) The mobility-induced tracking noise leads to a misaligned point cloud generated from two consecutive frames. } } \label{fig:motivation} \end{figure} \subsection{Spatial and Temporal Variance} Indoor lighting can be both spatially and temporally varying~\cite{srinivasan20lighthouse,pointar_eccv2020,Garon2019}. Rendering virtual objects using lighting information from locations other than the \emph{rendering position} may lead to potential visual degradation. To demonstrate the impact of such variances on the rendering effect, we compare a virtual object rendered with the lighting information at the rendering position and at the \emph{observation position} in Figure~\ref{fig:motivation:lighting_variance}. We can see that the mirror ball on the right does not have the desired visual appearance, i.e., neither of the zoomed-in views contains the correct reflections of the chair and the table. Thus, it is crucial to account for spatial variance when designing the reconstruction framework. Intuitively, lighting can change temporally even at the same rendering position. In this work, we handle the temporal variance by periodically reconstructing lighting. \subsection{Mobility-induced Noise} The inherent user mobility can naturally introduce noise to data required by the lighting reconstruction pipeline. For example, when a mobile user engages with an AR application, the user might move around, introducing measurement errors into the 6DoF tracking data or leading to blurred RGB images. Other factors, such as the mobile camera's position relative to the rendering position, can also impact the quality of camera observations. Both tracking and camera data are commonly used for lighting estimation~\cite{pointar_eccv2020,xihe_mobisys2021}. Figure~\ref{fig:motivation:noise} shows that the point cloud can have incorrect alignment when naively using two consecutive color and depth images. We note that misalignment is a common error in current AR applications that uses ARKit's world tracking data~\cite{dilek2018detecting}. \subsection{Limited Sensing Capability} Mobile vision sensors have become more potent over the past few years, especially with the newly equipped depth-sensing capability. However, most commercial mobile cameras still have limited FoVs ($<$ 120$^\circ$)~\cite{pixel6specs,iphone13prospecs}, much less than the desired 360$^\circ$ cameras commonly used by the movie industry to reconstruct lighting information~\cite{Li_2021_CVPR}. Furthermore, many modern phones still do not have access to depth sensors and rely on different algorithms to estimate depth~\cite{Du2020DepthLab,zhang-indepth}. Depth estimation errors can significantly impact the 3D point cloud generation process. In short, the limited mobile sensing capability can make capturing high-quality data for lighting reconstruction challenging. \subsection{Resource-quality Trade-offs} The task of generating high-quality environment lighting information can be very compute-intensive. State-of-the-art lighting models, which support visually coherent reflection, often require running on a powerful GPU server to achieve reasonable performance~\cite{Song2019}. With an additional setup of physical light probes, for example, GLEAM can take from 30ms to 400ms to update scene lighting estimation~\cite{prakash2019gleam}. By sacrificing the lighting quality, Zhao et al. achieved real-time lighting estimation (20.1ms) with low-fidelity spherical harmonics coefficients\xspace~\cite{xihe_mobisys2021}; Somanath et al. trained a deep learning model that can generate an HDR environment map in less than 9ms on recent iPhones but severely sacrifices visual coherence~\cite{Somanath2020-of}. It is challenging to navigate the resource-quality trade-offs in providing visually coherent lighting. \section{\textsc{FusedAR}\xspace Design} \label{sec:design} \subsection{Overview} \label{subsec:overview} We design \textsc{FusedAR}\xspace to address the challenges mentioned above to reconstruct high-quality environment lighting information. \textsc{FusedAR}\xspace is an adaptive framework that progressively, e.g., as AR users naturally move around the indoor environment, reconstructs environment lighting for any user-specified reconstruction positions. In contrast to prior estimation-based work~\cite{Song2019,Gardner2017,pointar_eccv2020,li2020inverse}, the core of \textsc{FusedAR}\xspace lies in how to effectively \emph{reconstruct} environment lighting information from a sequence of limited camera observations. Our reconstruction-based approach promises to obtain more accurate lighting information and achieves better visual results without requiring expensive data collection, model training, or physical setup~\cite{prakash2019gleam}. Specifically, \textsc{FusedAR}\xspace proposes a novel \emph{distance-based lighting reconstruction\xspace} technique (\S\ref{subsec:two_field_lighting_recon}) to produce geometrically accurate transformations to handle the challenge of spatial variance by transforming indirect scene observations to the desired lighting information. Figure~\ref{fig:reconstruction_diagram} presents an overview of \textsc{FusedAR}\xspace. To mitigate the impact of mobility-induced noise on the reconstruction quality, \textsc{FusedAR}\xspace proposes two policies for guiding bootstrapped device movement (\S\ref{subsec:bootstrapping_guided_startup_movement}) and automatically capturing required data based on motion (\S\ref{subsec:motion_based_automatic_capturing}). To account for limited mobile sensing capability, \textsc{FusedAR}\xspace only requires depth information on some camera observations (i.e., \emph{near-field observations} that have the reconstruction position in the view) and applies point cloud registration to correct the device tracking errors (\S\ref{subsec:point_cloud_registration}). The resource intensity is dealt with from the outset with a mobile-centered design. Specifically, \textsc{FusedAR}\xspace divides camera observations and has them go through two separate execution branches to a multi-view dense point cloud and a fixed-size point cloud. This two-branch design effectively reduces the computational cost and memory consumption of \textsc{FusedAR}\xspace. We propose two novel performance optimization techniques, i.e., multi-resolution projection\xspace (\S\ref{subsec:env_map_renderer}) and anchor extrapolation (\S\ref{subsec:anchor_extrapolation}), to render environment maps in real time at the edge. While many knobs can impact the quality and efficiency of lighting reconstruction, \textsc{FusedAR}\xspace allows mobile AR developers to make such trade-offs via a configurable design (\S\ref{subsubsec:session_init}). \subsection{Two-Field Lighting Reconstruction} \label{subsec:two_field_lighting_recon} \begin{figure} \includegraphics[width=\linewidth]{assets/litar_workflow.pdf} \caption{\textsc{FusedAR}\xspace's overview. \textnormal{ \textsc{FusedAR}\xspace separately reconstruct for the near-field (\S\ref{subsec:spatial_variance_aware_near_field_reconstruction}) and far-field (\S\ref{subsec:distant_field_scanning}) regions from camera observations strategically guided and automatically captured. The near-field data, which has a higher impact on spatial variance and consists of more accurate depth information, will be used to generate a multi-view dense point cloud. The far-field data will be projected to color a unit-sphere point cloud (USPC) with the sampling technique from~\cite{xihe_mobisys2021}, and then will be extrapolated to fill neighboring pixels in the environment map. Finally, the dense point cloud will be projected to multi-resolution environment maps which will be combined, using our \emph{multi-resolution projection\xspace} technique (\S\ref{subsec:dpcp}). } } \label{fig:reconstruction_diagram} \end{figure} At the high level, our distance-based lighting reconstruction\xspace technique divides the task of lighting reconstruction into two sub-tasks: one that leverages depth information to produce high-quality lighting from near-field observations and one lightweight task for reconstructing lighting from far-field observations. In other words, \textsc{FusedAR}\xspace will generate two intermediate point clouds from camera observations for rendering environment maps. A \emph{multi-view dense point cloud} is the outcome of judiciously applying the geometrically accurate transformation and dense sampling on near-field observations; A \emph{unit-sphere point cloud} is the sampling outcome of the sparse point clouds from the far-field observations and the dense point clouds. Recall that we divide the camera observations into two types, \emph{near-field observation} that includes the reconstruction position in the view and \emph{far-field observation} that does not. As explained below, such division is based on the key insight that camera observations are subject to varying levels of spatial variance. Figure~\ref{fig:spatial_variance_near_far_fields} illustrates the different importance of considering spatial variance, depending on the relative position of the interested pixel to the observation and reconstruction positions. Assume a position $P_{env}$ in the physical environment. To render $P_{env}$ on a virtual object surface, $P_{env}$ should be observable from the reconstruction position $P_{rec}$. To perceive any position $P_{env}$ in the environment, one has to observe light emitted/reflected from $P_{env}$. Without loss of generality, in Figure~\ref{subfig:sv_near_fields}, we show the intersection $l_{rec}$ of vector $\langle P_{env}, P_{rec} \rangle$ and the surface of the unisphere (with $P_{rec}$ being the center) represents the desired reflection. However, if we directly reconstruct the light ray from the camera observation position $P_{obs}$, we end up with $l_{obs}$, the intersection between vector $\langle P_{env}, P_{obs} \rangle$ and the surface of the $P_{obs}$-centered unisphere. If we translate $l_{obs}$ to the $P_{rec}$-centered unisphere by applying the vector $\langle P_{obs}, P_{rec} \rangle$, we will get a third intersection $l'_{obs}$. Observe that the light ray represented by $\langle P_{rec}, l'_{obs} \rangle$ can differ significantly (i.e., larger $\Delta\alpha$) from $\langle P_{rec}, l_{rec} \rangle$, the light ray that should be perceived at $P_{rec}$. In short, near-field observations are impacted much more by spatial variance. On the contrary, as shown in Figure~\ref{subfig:sv_far_fields}, if the $P_{env}$ is in the far-field, $l'_{obs}$ can be a good approximation for $l_{rec}$ (i.e., much smaller $\Delta\alpha$). In short, far-field observations are impacted much less by spatial variance. Other benefits of separating camera observations into near-field and far-field include better tolerance of limited mobile depth-sensing capability and resource efficiency. A naive alternative design of applying the same reconstruction pipeline to all camera observations can lead to incorrect point clouds and demand resources proportional to the indoor scene space (i.e., the total number of points). In contrast, our design of processing far-field observations demands less memory and computation resources by using a fixed-size point cloud~\cite{xihe_mobisys2021}. \begin{figure} \centering \begin{subfigure}[b]{0.3\linewidth} \centering \includegraphics[width=\linewidth]{assets/sv_near_field.pdf} \caption{Spatial variance in near-field} \label{subfig:sv_near_fields} \end{subfigure}\hfill \begin{subfigure}[b]{0.3\linewidth} \centering \includegraphics[width=\linewidth]{assets/sv_far_field.pdf} \caption{Spatial variance in far-field} \label{subfig:sv_far_fields} \end{subfigure} \hfill \begin{subfigure}[b]{0.3\linewidth} \centering \includegraphics[width=\linewidth]{assets/near_fields_fov.pdf} \caption{Near-field boundary size} \label{subfig:sv_near_field_projection} \end{subfigure} \caption{Illustration of spatial variance impact. \textnormal{ We visualize the near-field and far-field observations in a 2D front view. $P_{obs}$ and $P_{rec}$ represent observation position and reconstruction position, respectively. (a) \& (b) It is more important to consider spatial variance for pixels observed in near-field than ones in far-fields, i.e., larger $\Delta\alpha$. (c) Increasing the near-field boundary size (e.g., from $r$ to $2r$ vs. $2r$ to $3r$) has a diminishing impact on the reflection surface. } } \label{fig:spatial_variance_near_far_fields} \end{figure} \subsubsection{Spatial Variance-Aware Near-Field Reconstruction} \label{subsec:spatial_variance_aware_near_field_reconstruction} To effectively transform camera observation(s) to the environment map at the reconstruction position, \textsc{FusedAR}\xspace leverages the increasingly popular depth sensor in mobile camera system~\cite{Huawei_undated-ca,ipad-lidar}. Depth sensors enable the possibility of capturing geometrically accurate environment observations. First, we densely sample color and depth buffers of the camera images for each near-field observation. Then, the image buffers and the camera transformation matrix (i.e., rotation and translation) are used to generate the geometry and color of a dense 3D point cloud. In our implementation, we use the camera transformation matrix information provided by commercial AR frameworks. Such information is often referred to as device tracking data. The point cloud generation process can be time-consuming. To speed up this process, we separate the geometry and color generation tasks and then execute both tasks on the GPU. Finally, the output dense point cloud (i.e., geometry and color information) is written to a global point cloud buffer that maintains a multi-view point cloud for the current reconstruction session. To support multi-view reconstruction, \textsc{FusedAR}\xspace uses a motion-based automatic capturing scheme (\S\ref{subsec:motion_based_automatic_capturing}) to supply the reconstruction pipeline with new near-field observation. \textsc{FusedAR}\xspace assigns a unique indexing identifier for each near-field observation. This identifier is subsequently used for other data, including the camera transformation matrix and the derived dense point cloud. The global point cloud buffer is updated with the least-recently observed policy, i.e., the points associated with the oldest near-field observation will be replaced. We define \emph{near-field boundary} as a constrained cubic space that contains points belonging to the near-field observations that will undergo further processing. For points outside the near-field boundary, we will not perform multi-resolution projection\xspace (\S\ref{subsec:dpcp}). Theoretically, this boundary can be as big as the indoor scene. However, having a too large boundary may have undesirable implications on both the memory and computation consumption and is often unnecessary. Figure~\ref{subfig:sv_near_field_projection} shows that increasing the near-field boundary size has a diminishing return on the reflection surface. For example, increasing the boundary from 2X to 3X of the virtual object size only increases the coverage by 8.13$^\circ$, a 1.13X. In short, we use a configurable near-field boundary for a trade-off between resource consumption and reconstruction quality. We set the near-field boundary side length to two meters based on the AR virtual objects we use for testing. It is worth noting that AR developers should adjust this boundary for large virtual objects or divide the large object into smaller objects to have multiple reconstruction positions. The dense near-field point cloud generation allows us to produce geometrically accurate camera observation transformations and produce continuous lighting representations. Our spatial variance-aware observation transformation still generates an approximated observation at the reconstruction position due to the lighting variance from different observation directions. We assume that the light does not change between different observation directions, which suffices for mobile AR rendering in most cases. However, such an assumption may lead to visually incorrect results if the environment around the reconstruction position contains reflective physical objects, e.g., mirrors. It is possible to further address such concerns by meticulously selecting light ray directions between observations, which we leave as future work. \subsubsection{Directional-Aware Far-Field Reconstruction} \label{subsec:distant_field_scanning} Mobile depth sensors usually only capture the surrounding environment within a limited range. For example, the LiDAR sensor on iPhone 13 Pro can capture depth up to 5 meters away~\cite{iphonelidar_range}. Thus, it might not be suitable for sensing large physical environments. However, the desired environment lighting for AR rendering varies directionally depending on the surrounding physical world environment. To address the directional variations, i.e., the anisotropy of environment lighting, LitAR reconstructs far-field lighting by sparsely sampling camera observation to provide omnidirectional lighting. Even with the recent advancements in hardware, modern cameras still have small FoVs and thus capture only a small portion of the environment covering limited directions. However, reconstructing a dense point cloud to address the anisotropic lighting property from far-field observations is impractical as generating a dense point cloud for a far-field environment can be potentially unconstrained regarding computation and data storage. In addition, objects in the far-field observations may exceed the range limit of mobile depth sensors, which makes it difficult to obtain geometrically accurate transformation. The inherent nature of the far-field environment thus leads to lower confident far-field depth observations, which makes it ill-suited for dense point cloud reconstruction. To address these limitations, we design a lightweight process to reconstruct far-field lighting from sparsely sampled camera images. Recall that a camera observation is considered a far-field observation if the reconstruction position falls outside the camera view. For a far-field observation, we sparsely sample a low-resolution camera image and obtain the current camera transformation matrix, similar to \S\ref{subsec:spatial_variance_aware_near_field_reconstruction}. Note that we do not capture depth data for the far-field observation as its depth information may be inaccurate, and the spatial variance has less impact. To generate the sparse point cloud, we assume the depth of all pixels to be one and scale the camera intrinsic values accordingly. We use a similar design to \cite{xihe_mobisys2021} by projecting the sparse point cloud to a set of uniformly distributed points, referred to \emph{anchors}, on a unit sphere. The resulting data structure is a \emph{unit sphere-based point cloud\xspace} (USPC). As demonstrated in prior work~\cite{xihe_mobisys2021}, the design of USPC is aware of directional lighting variance and thus addresses the anisotropy property of environmental lighting. In this work, we set the number of anchors of the USPC to be $1280$, the same as prior work~\cite{xihe_mobisys2021}. The anchor points are colored by combining the color data from the sparse point cloud and ambient light sensor readings. Recall that we want USPC to represent the lighting from all directions, including near-field observations. Therefore, we sparsely sample the dense point cloud generated from the near-field observation; then, the resulting sparse point cloud is similarly projected to the same USPC. In short, the reconstructed far-field lighting is represented as a unit-sphere point cloud with a much smaller memory footprint (proportional to the anchor size) while still providing sufficient directional-aware lighting information. \subsection{Noise-tolerant Data Capturing Policies} \subsubsection{Guided Bootstrapped Movement} \label{subsec:bootstrapping_guided_startup_movement} Another key design of \textsc{FusedAR}\xspace to reconstruct high-quality lighting is to exploit user movement, a feature of mobile AR. We observe that commercial mobile AR frameworks such as ARKit have built-in support for explicitly guiding mobile AR users to scan their physical surrounding environment before using the app. Note such practice is often used for calibrating world tracking data, but not for lighting estimation~\cite{arkitcoachingoverlay}. However, this commonly adopted movement practice typically leads to a biased sampling of environment lighting in concentrated observation directions. This biased sampling is due to the narrow focus on increasing the observation of the nearby environment around the reconstruction position. Although commercial frameworks use deep learning-based models to estimate environment lighting from observations, such biased observations create a barrier to more accurate estimation. As we will show in \S\ref{subsec:eval_near_field_recon}, increasing observations with the common practice shows little improvement in rendering results. \begin{figure} \centering \begin{subfigure}[b]{0.29\linewidth} \centering \includegraphics[width=0.85\linewidth]{assets/front_and_back_facing_obs.pdf} \caption{Front \& back facing observations} \label{subfig:front_and_back_facing_obs} \end{subfigure}\quad \begin{subfigure}[b]{0.3\linewidth} \centering \includegraphics[width=0.75\linewidth]{assets/horizontal_and_vertical_mov.pdf} \caption{Horizontal \& vertical movement} \label{subfig:horizontal_and_vertical_mov} \end{subfigure} \quad \begin{subfigure}[b]{0.36\linewidth} \centering \includegraphics[width=\linewidth]{assets/movement_grid.pdf} \caption{Movement direction grid} \label{subfig:movement_grid} \end{subfigure} \caption{Guided bootstrapped movement. \textnormal{ Our guided bootstrapping movement technique directs users to point the mobile camera toward the opposite direction $\vec{V}_{guide}$ of the virtual object viewing direction $\vec{V}_{obj}$ and rotate along horizontal and vertical directions to increase the far-field observations. The movement follows a grid-style pattern, where ($\theta$ and $\phi$) denote the observation direction in spherical coordinates. } } \label{fig:guided_movement_diagram} \end{figure} Instead, we propose a novel yet simple guided movement policy to look at the \emph{backward environment}, i.e., observable from the opposite direction to the virtual object viewing direction. This guided movement is designed to increase the observation directions rather than the observation overlapping and to help address the anisotropic lighting property. In other words, our guided movement policy provides bootstrapped data at the AR application startup time to increase the far-field observations. As illustrated in Figure~\ref{fig:guided_movement_diagram}, our policy guides the user to look at the backside of the intended virtual object observation direction. We use a grid-style pattern to partition the observation directions and provide guided viewing directions for the user. Specifically, as shown in Figure~\ref{subfig:movement_grid}, the optimal choices on the number of observations could be $\{1,3,5,9\}$ based on the horizontal and vertical direction partitions. The number of observations corresponds to the combination of moving \emph{left} and \emph{right} in horizontal direction, as well as \emph{up} and \emph{down} in vertical direction. We currently use an angular difference of 30 degrees in horizontal and vertical directions. Furthermore, as our far-field reconstruction method does not reconstruct detailed observations, our guided movement can be performed without the user focusing on each camera observation orientation for a long time. In \S~\ref{subsec:eval_far_field}, we will show that by using the guided movement, \textsc{FusedAR}\xspace can find more accurate color tones to fill unseen areas and produce more accurate renderings. \subsubsection{Motion-based Automatic Capturing.} \label{subsec:motion_based_automatic_capturing} Continuously capturing all camera observations or relying on the mobile AR user to manually capture them can lead to poor usability, low-quality data (e.g., images with motion blur), and high consumption of mobile resources. For example, prior work has demonstrated that motion blur is a common occurrence in mobile AR---which we also observe---and can lead to low accuracy for AR tasks~\cite{Liu2020-fy}. Additionally, a recent low-frequency lighting estimation framework has demonstrated that strategically skipping the capture of specific camera frames has little impact on the estimation accuracy~\cite{xihe_mobisys2021}. Intending to provide good usability, capture high-quality data, and reduce resource consumption, we design a \emph{motion-based automatic capturing} technique that leverages multi-sensor data to automatically select camera frames and AR data for lighting reconstruction. In a nutshell, this technique will only capture observation data that is new spatially (i.e., by checking device position and rotation information) and temporally (i.e., by updating a previously captured frame with the same device information). Specifically, \textsc{FusedAR}\xspace uses a simple timer-based policy to assess the need to capture new data by checking if the mobile device has exhibited significant movement. In this work, we leverage the device accelerometer and gyroscope sensors to maintain a moving window of the device's most recent $K$ position and rotation information (i.e., 6DoF). Every $C$ milliseconds, \textsc{FusedAR}\xspace will compare the device 6DoF information at the current frame to the ones in the moving window to assess the likelihood of motion blur. If the device pose has changed for more than 10cm and 10$^\circ$, the device is considered to have significant movement in a short time window, and the current frame is skipped. \textsc{FusedAR}\xspace will re-run the check every frame until a new frame is found while the device is relatively stable. Otherwise, the current frame is captured. The timer will be reset once a new frame is captured in both cases. Our motion-based automatic capturing will produce new data at least every $C$ millisecond, depending on the mobility. Both the moving window and capturing frequency can be configured. In our implementation, we set $K$ = 5 and $C$ = 300. \subsection{Real-time Environment Map Rendering Techniques} \label{subsec:env_map_renderer} Thus far, our distance-based lighting reconstruction\xspace has generated two intermediate point clouds. To support high-quality multi-view lighting reconstruction for mobile AR, we need to convert the point cloud presentation into a lighting representation commonly supported by modern rendering engines. In this work, we choose \emph{environment map} as the final lighting representation, which most mobile rendering engines can directly use. At the high level, to generate a high-quality environment map (i.e., visually continuous pixels) from a point cloud that consists of discrete points, one often needs to handle occlusion and inter-point connection. One common way to recreate the inter-point connections and calculate occlusion is to resort to conventional 3D reconstruction methods, e.g., Ball-Pivoting surface mesh reconstruction algorithms~\cite{bernardini-ball-pivoting}. However, such a method is ill-suited for real-time applications as surface mesh reconstruction can be computationally expensive, e.g., we observe that it takes about 3 seconds to perform mesh reconstruction on a five-view dense point cloud. In this section, we describe two novel techniques called \emph{multi-resolution projection\xspace} and \emph{anchor extrapolation\xspace} for generating near-field and far-field portions of the environment map in real-time. \begin{figure} \centering \begin{subfigure}[b]{0.78\linewidth} \centering \includegraphics[width=\linewidth]{assets/illustration_dpcp.pdf} \caption{Multi-resolution projection} \label{subfig:illustration_dpcp} \end{subfigure}\hfill \begin{subfigure}[b]{0.2\linewidth} \centering \includegraphics[width=\linewidth]{assets/illustration_ae.pdf} \caption{Anchor extrapolation} \label{subfig:illustration_ae} \end{subfigure} \caption{Illustration of multi-resolution projection\xspace and anchor extrapolation. \textnormal{ (a) We show an example of multi-resolution projection\xspace with three levels. The dense point cloud will be projected three times. The higher projection resolution leads to more visual details but has more discrete pixels; the lower projection resolution has more continuous pixels but fewer visual details and exhibits pixelation. We obtain a high-quality final environment map by scaling and overlaying each intermediate environment map. (b) We show that a larger $w$ value leads to a less blurry environment map and that our nearest-anchor acceleration has minimal visual impact. } } \label{fig:env_map_rendering} \end{figure} \subsubsection{Multi-resolution Projection.} \label{subsec:dpcp} We propose a lightweight technique called multi-resolution projection\xspace to convert the near-field dense point cloud to the respective portion in the environment map. We use the common equirectangular format to present the environment map. Specifically, multi-resolution projection\xspace projects a point cloud into a set of environment map images with decreasing resolutions and addresses the inter-point connection and occlusion at the 2D-pixel level. When projecting a point cloud onto one environment map image, multi-resolution projection\xspace first converts the position of the point cloud from the Cartesian coordinate system to the Spherical coordinate system. Then, for each point, we calculate its 2D projection coordinate on the environment map based on the angle values of its spherical coordinates. Then, we assign the point cloud color to the corresponding pixel on the environment map. As multiple points can be projected to the same pixel of the environment map, for each pixel, we handle the point occlusion by selecting the shortest-distant projected point to color the pixel. Figure~\ref{subfig:illustration_dpcp} illustrates an example of three-level projection. However, when the point cloud density is low, e.g., due to low capturing resolution, projecting point cloud only onto one environment map image resolution may lead to degraded visual quality. For example, it might result in an image with discretely projected points rather than a continuous view of the scene, and it might not adequately represent the inter-point occlusion. To address these issues, we assign different size values for projected points via multi-resolution image projection. We first project the point cloud into a series of images with decreasing resolutions. Then we scale all the projected images to the largest resolution via the nearest pixel interpolation. Finally, the multi-resolution projection\xspace results are merged into a single environment map by selecting the shortest-distant projected point to the reconstruction position from each projected image per pixel. If multiple projections have the same distance, we select the one from the highest resolution as it has more visual details. We note that the number of resolution levels and per-level resolution can be adjusted for different combinations of dense point clouds and reconstruction positions. However, our design of the near-field boundary described previously in \S\ref{subsec:spatial_variance_aware_near_field_reconstruction} suggests that all reconstructed near-field dense point clouds will be confined to a cubic space. Thus, it is possible to have a relatively fixed configuration to handle various scenes. In this work, we choose two resolution levels with per-level resolution as 1024x512 and 512x256, unless otherwise specified. \subsubsection{Anchor Extrapolation.} \label{subsec:anchor_extrapolation} Recall that by now, our distance-based lighting reconstruction\xspace has generated a colored unit sphere-based point cloud\xspace (USPC) for the far-field lighting. To generate the corresponding environment map in the equirectangular format, we use the anchor points to color each environment map pixel. However, the USPC, by design, only has a fixed number of anchor points. Therefore, directly projecting anchor points to the environment map is likely to lead to many empty pixel values. To address this problem, we design an \emph{anchor extrapolation} technique that calculates each pixel value as a weighted average of USPC anchor values. This technique, in essence, assigns color value to pixels by extrapolating from their nearby anchor colors and will result in a gradient coloring and blurring effect. Specifically, we first initialize each pixel of the environment map with a normal vector, i.e., a unit vector from the sphere center to the pixel position. The initialization is feasible as a pixel in the equirectangular format of an environment map can be easily presented in the spherical coordinate system. We then calculate the $i^{th}$ pixel color $c_i$ using the following equation: \begin{equation} c_i =\frac{2}{N}\sum^{N}_{j=1}{\max(\vec{p}_j \cdot \vec{n}_i, 0)^w c_j}, \label{eq:anchor} \end{equation} where $\vec{n}_i$ represents the pixel normal vector, $N$ is the number of anchors, $\vec{p}_j$ and $c_j$ are the normal vector and color for the $j$-th anchor, respectively. Note that the dot product between $\vec{p}_j \cdot \vec{n}_i$ is effectively the cosine value of the angle between these vectors, as $|\vec{p}_j|=|\vec{n}_i| = 1$. The $\max$ function effectively filters out all the anchor points in the hemisphere opposite the $i^{th}$ pixel. Furthermore, $w$ is an exponent controlling the blurring level of far-field reconstruction. Intuitively, a smaller $w$ value will lead to more anchor points used for the pixel calculation. Thus, a smaller $w$ value will result in a blurrier environment map, while a larger $w$ will produce a clearer environment map, as demonstrated in Figure~\ref{subfig:illustration_ae}. In this work, we set $w$ to be 128. Note that calculating the pixel color using Equation~\eqref{eq:anchor} can be time-consuming as the weighted average has to iterate through all anchor points. However, anchors do not contribute equally to the pixel color calculation. Intuitively, an anchor $j$ that has a smaller $\max(\vec{p}_j \cdot \vec{n}_i, 0)$ decreases more quickly with the power $w$. Such anchors are also farther away from the pixel of interest than anchors with a larger $\max(\vec{p}_j \cdot \vec{n}_i, 0)$ value. In fact, we find that when $w=128$, only the 32 nearest anchors out of the 1280 contribute significantly (i.e., $\max(\vec{p}_j \cdot \vec{n}_i, 0)$ > 0.1). Thus, to speed up the pixel color calculation, we precompute the 32 nearest anchors for each pixel and their respective cosine values. The precomputation effectively reduces the number of anchors by a factor of 40 and allows the use of cached results for the weighted average calculation. Figure~\ref{subfig:illustration_ae} shows that our acceleration has minimal visual impact. \subsection{\textsc{FusedAR}\xspace Quality-Performance Configurations} \subsubsection{Reconstruction Session Settings and Initialization} \label{subsubsec:session_init} \textsc{FusedAR}\xspace uses a \emph{lighting reconstruction session\xspace} to manage each multi-view reconstruction task. A lighting reconstruction session\xspace has the same lifecycle as its corresponding virtual object; the session is created when a virtual object placement request is issued and is destroyed when the placed object is removed from the scene. As AR applications might need multiple virtual objects in the view, \textsc{FusedAR}\xspace supports multiple active lighting reconstruction session\xspace per AR session (i.e., during the AR application's lifetime). At the beginning of each session, \textsc{FusedAR}\xspace collects static device-specific information, e.g., camera intrinsic, current ambient lighting data, and camera image native resolutions, to bootstrap subsequent lighting reconstruction operations. \textsc{FusedAR}\xspace supports configuring several knobs, including color image sampling rate, number of views, multi-resolution projection\xspace resolution levels, and environment map size, that trade-off visual quality and reconstruction performance. These knobs can be categorized into three types, i.e., data capturing, distance-based lighting reconstruction\xspace, and environment map rendering. Thus, the startup latency of each session and the subsequent near/far-field reconstruction depend on the specific configurations. The users (e.g., mobile AR developers) can configure each lighting reconstruction session\xspace based on performance requirements or select one of the three presets: low, medium, and high. In \S\ref{subsec:eval_quality_perf_trade_offs}, we will show that all three presets achieve better visual quality than ARKit but take an increasing amount of time to generate an environment map. \subsubsection{Point Cloud Management.} \label{subsec:point_cloud_registration} To achieve low-latency point cloud operations, \textsc{FusedAR}\xspace leverages the edge to generate, manage, and transform both the sparse and multi-view dense point clouds. To exploit the inherent parallelism of point cloud operations, \textsc{FusedAR}\xspace performs these operations on the GPU. However, even with unified memory, the managed memory still must be copied to the GPU memory (by the driver) for data access. A naive implementation may lead to expensive GPU memory access overhead. Thus, we carefully design the memory layout using a continuous memory buffer to store the multi-view dense point cloud and a fixed number of anchor points. When new view data is processed, \textsc{FusedAR}\xspace overwrites the point cloud memory buffer by replacing the oldest data for \emph{temporal} consistency or replacing the data with the same view identifier for \emph{spatial} consistency. This fixed-view design keeps the memory layout unchanged, thus avoiding paging setup overhead while still producing high-quality environment maps. Additionally, \textsc{FusedAR}\xspace includes an asynchronous point cloud registration to address the mobility-induced noises, which can lead to misaligned point positions. In other words, \textsc{FusedAR}\xspace runs point cloud registration in parallel to the main distance-based lighting reconstruction\xspace and will update the environment map with the aligned point cloud once the registration completes. We note that the point misalignment is mainly due to the inaccurate device tracking data provided by the AR framework, in this case, ARKit. Providing accurate device tracking information is an essential but orthogonal research question; prior work such as ORB-SLAM2~\cite{murORB2} and Edge-SLAM~\cite{Ben_Ali2020-ri} can achieve good tracking in about 26ms-50ms. In this work, we use the iterative closest point registration~\cite{besl1992method} to mitigate the impact of noisy tracking data on the lighting reconstruction. During our preliminary study, we found that point cloud registration is not always necessary (e.g., when mobile AR users are relatively static) and can take significantly longer than other operations (e.g., 200ms for handling five views with 1024x768 points). In our implementation, the point cloud registration is turned off by default. \section{Implementations} \label{sec:implementations} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{assets/sys_architecture.pdf} \caption{A system architecture overview of \textsc{FusedAR}\xspace. \textnormal{ The framework provides high-quality lighting as an environment map for mobile AR applications with two logical components: client-side and edge service. \textsc{FusedAR}\xspace can support lighting for multiple reconstruction positions per AR session on the client-side and allows multi-user scene data sharing via the edge service. } } \label{fig:system_architecture} \end{figure} We implement all the techniques described in \S\ref{sec:design} in a prototype system called \textsc{FusedAR}\xspace (\S\ref{subsec:system_implementation}). To facilitate experiments in a controlled manner, we also develop a mobile AR simulator based on Unreal Engine (\S\ref{subsec:simulator}). \subsection{Edge-Based Prototype} \label{subsec:system_implementation} We implement \textsc{FusedAR}\xspace in C\# and Python with about $2.2$K lines of code. Figure~\ref{fig:system_architecture} shows an architecture overview of \textsc{FusedAR}\xspace. \textsc{FusedAR}\xspace consists of two logical modules: a client-side that captures, encodes, and sends the data necessary for the lighting reconstruction sessions; an edge-side that decodes the keyframe data, generates intermediate point clouds, and renders the environment map. \textsc{FusedAR}\xspace currently supports AR applications built with Unity3D~\cite{unity3d} and AR Foundation~\cite{arfoundation}. \subsubsection{Client-side.} The client module of \textsc{FusedAR}\xspace is implemented as a Unity package. We provide an entry script called \emph{ARLightingReconstructionManager} as a \emph{MonoBehavior} subclass to allow the developer to specify system configurations and visual quality-related information via the Unity editor UI. \emph{ARLightingReconstructionManager} also manages the memory usage and function calls of all lighting reconstruction sessions in an application's lifecycle. We implement the \emph{motion-based automatic capturer} by leveraging the AR device tracking data provided by AR Foundation to automatically capture environment data that will not be subjected to camera motion blurs. We perform the nearest neighbor sampling on the device's native color and depth image data for the visual data. Specifically, for the AR application running on our testing device, iPad Pro, we sample color and depth images in the format of YCbCr 4:2:0 and float32, respectively. The captured color and depth images are then encoded with a one-byte unique package identifier and device tracking information into three binary data packages, i.e., session initialization, near-field, and far-field. We refer to these data packages as \emph{keyframe data}. \textsc{FusedAR}\xspace also manages a WebSocket session for low latency communication with the edge server, i.e., sending keyframe data and receiving environment map. \subsubsection{Edge-side.} On the edge side, we implement a Tornado-based \cite{tornadoframework} WebSocket service to communicate with the client. The WebSocket server dispatches the package to different operations for each received binary data package based on its package identifier. We leverage NumPy~\cite{harris2020array} to decode and convert the received binary packages into different data types and structures. To improve the performance of point cloud-related operations, including point cloud generation, multi-resolution projection\xspace, and anchor extrapolation, we implement them in CUDA kernels using the Numba library~\cite{lam-numba}. As such, these operations run on the edge GPU. In our edge system memory management, we leverage the unified memory~\cite{cudaunifiedmemeory} to avoid time-consuming data copying between CPU and GPU. Our edge server implementation can also fall back to traditional GPU memory without any modification to support other GPU hardware that does not have unified memory. \subsubsection{Mobile-edge communication.} We design a low-overhead and compact networking communication scheme to support the goal of low-latency lighting reconstruction. Both the near and far-field data are serialized into binary formats. Specifically, we stream only the device's native color and depth data for near-field data and reconstruct the point cloud on the edge side. Compared to directly streaming float32-encoded point cloud in the XYZRGB format, we need at most 22.9\% of the bytes. Also, as we only capture sparse camera images during far-field reconstruction, the far-field keyframe data is significantly smaller than the near-field counterpart (1189 bytes vs. 270389 bytes). \begin{figure}[t] \includegraphics[width=\linewidth]{assets/simulator_and_data.pdf} \caption{Unreal engine-based simulator and synthetic dataset generation process. \textnormal{ We generate an indoor synthetic dataset using an Unreal Engine-based simulator. We use an orbit trajectory at each manually chosen position to build observations around the position and place the virtual camera to capture images. We extract camera positions, orientations, RGB-D images, and ground truth environment map. } } \label{fig:simulation_exp_workflow} \end{figure} \subsection{Unreal Engine-Based Mobile AR Simulator} \label{subsec:simulator} We implement a mobile AR simulator by leveraging a high-fidelity 3D graphics rendering engine, Unreal Engine~\cite{ue4}. Figure~\ref{fig:simulation_exp_workflow} presents the workflow of our simulator. First, we use Unreal Engine 4 to create a photorealistic indoor scene based on the \emph{ArchViz}\footnote{https://docs.unrealengine.com/4.27/en-US/Resources/Showcases/ArchVisInterior/} project, which provides high-quality architectural visualization for interior design. Next, we create a virtual camera using the Blueprints Visual Scripting\footnote{https://docs.unrealengine.com/5.0/en-US/blueprints-visual-scripting-in-unreal-engine/} system that takes controlled variables to modify the camera's movement and internal properties, e.g., FoV. We simulate the device/user movement by moving the virtual camera within a photorealistic 3D indoor scene. Finally, we can configure the simulator with desired variable values to generate a synthetic dataset for rendering purposes, including camera observations and environment physical properties. Our simulator can be extended to support future studies and bears the following advantages over a device-based setup: {\em (i)} our simulator makes it easier to extract high-quality environment lighting and physical information to serve as the ground truth. At the same time, obtaining such information can be expensive or unpractical due to physical limitations on measurement and observation. {\em (ii)} it is easier to study individual factors in isolation by applying controlled changes to the scene environment and simulated mobile devices. \subsubsection{AR Virtual Object Rendering.} We develop a browser-based renderer using the Three.js rendering framework~\cite{threejs} to automate the process of rendering virtual objects of interest. Specifically, our renderer uses information, including reconstructed lighting, the camera position, and properties, from our synthetic dataset to render a 3D virtual object at the resolution of 1024x768. The renderer then trims empty pixels outside rendered objects to remove the object-to-frame size impact on PSNR calculation when using different camera FoV settings. The resulting images of rendered objects serve as the basis for comparing different lighting reconstruction methods. \section{Evaluation} \label{sec:eval} We evaluate the performance of \textsc{FusedAR}\xspace using a lab testbed and the simulator. The lab testbed includes a LiDAR-enabled iPad Pro serving as the client and a Jetson Xavier NX~\cite{jetsonagxxavier} board serving as the edge server. The iPad and the Jetson board communicate via resident WiFi with an average latency of 7.08 ms ($\pm$ 3.31 ms) and network bandwidth of 508 Mbits/sec ($\pm$ 12 Mbits/sec). For testbed-based experiments, we choose three different indoor scenes and compare \textsc{FusedAR}\xspace with three different baselines: {\em (i)} ARKit 5~\cite{arkit}, a commercial AR framework developed by Apple; {\em (ii)} \textsc{FusedAR}\xspace with \emph{point cloud registration} turned on; {\em (iii)} \textsc{FusedAR}\xspace with \emph{mesh reconstruction} instead of the lightweight multi-resolution projection\xspace module. We use the Environment Probe~\cite{arkit-envprobe} feature of ARKit to generate environment maps. The lighting estimation feature of ARKit is backed up by EnvMapNet~\cite{Somanath2020-of}. We measure both the reconstruction time and visual quality for all the methods. We use the Peak signal-to-noise ratio (PSNR) and Structural Similarity Index (SSIM) for quantitative visual quality comparison. The PSNR and SSIM values of each method are calculated by comparing the rendered virtual object to the physical object. In this work, we use the classical physical mirror ball as it can be easily acquired. The higher the values of PSNR and SSIM, the better the visual performance. We use the simulator to evaluate \textsc{FusedAR}\xspace's performance in a wider range of scenarios. Our simulator allows easy extraction of ground truth lighting information at any reconstruction position in a photorealistic 3D indoor scene. For simulation-based evaluations, \textsc{FusedAR}\xspace is evaluated with six objects of different shapes and materials and is compared to two baselines: {\em (i)} using a 360$^\circ$ camera at the observation position, akin to \cite{tuceryan2019ar360}; and {\em (ii)} Xihe\xspace, a recent academic framework that produces real-time low-frequency lighting estimation from RGB-D images~\cite{xihe_mobisys2021}. We describe the synthetic dataset used in our study in \S\ref{subsec:simulation_environment_setup}. To provide an in-depth evaluation of \textsc{FusedAR}\xspace's performance, we also conduct a number of ablation studies that demonstrate the quality-performance trade-offs (\S\ref{subsec:eval_quality_perf_trade_offs}), highlight our design choices for near-field and far-field reconstructions, as well as identify applicable scenarios (\S\ref{subsec:eval_near_field_recon} and \ref{subsec:eval_far_field}). The three quality presets for near-field reconstruction are configured as following: {\em (i)} \textsc{FusedAR}\xspace (low): number of views is 3, color image resolution is 256x192, multi-resolution projection\xspace resolutions are [512x256, 256x128, 64x32], environment map resolution is 512x256; {\em (ii)} \textsc{FusedAR}\xspace (medium): number of views is 4, color image resolution is 512x384, multi-resolution projection\xspace resolutions are [768x384, 384x192], environment map resolution is 512x256; {\em (iii)} \textsc{FusedAR}\xspace (high): number of views is 5, color image resolution is 1024x768, multi-resolution projection\xspace resolutions are [1024x512, 512x256], environment map resolution is 1024x512. All three presets for far-field reconstruction have the color image resolution of 32x24 and share the same environment map resolution configurations as near-field reconstruction. \subsection{Testbed-Based System Performance} \begin{figure}[t] \includegraphics[width=0.95\linewidth]{assets/real_world_rendering_visualization.pdf} \caption{ Qualitative comparison between \textsc{FusedAR}\xspace and ARKit on three real-world indoor scenes. \textnormal{ Each row represents an indoor scene. \emph{Column 1:} the panorama view of a scene at the reconstruction position by unwrapping the physical mirror ball reflection~\cite{debevec2006image}. \emph{Column 2:} \textsc{FusedAR}\xspace's environment maps have good visual quality and rich details for the near-field portion while maintaining the structural similarity to the corresponding physical scene. \emph{Column 3:} ARKit's environment maps show varying performance, sometimes completely different from the scene (the first row), while others with less visual details. } } \label{fig:end_to_end_sys_rendering} \end{figure} \begin{figure}[t] \centering \begin{subfigure}[b]{0.48\linewidth} \centering \includegraphics[width=\linewidth, trim=0px 25px 0px 3px,clip]{assets/visual_quality_psnr.pdf} \caption{PSNR comparison} \label{subfig:visual_quality_psnr} \end{subfigure}\quad \begin{subfigure}[b]{0.48\linewidth} \centering \includegraphics[width=\linewidth, trim=0px 25px 0px 3px,clip]{assets/visual_quality_ssim.pdf} \caption{SSIM comparison} \label{subfig:visual_quality_ssim} \end{subfigure} \caption{ Quantitative comparison between \textsc{FusedAR}\xspace and ARKit in terms of PSNR and SSIM. \textnormal{ \textsc{FusedAR}\xspace outperforms ARKit for all three real-world scenes. Further, using the conventional mesh reconstruction in place of our lightweight multi-resolution projection\xspace only increases the PSNR/SSIM values slightly by 2\%/1\%. Similarly, turning on the asynchronous point cloud registration has only minor improvement by 3\%/1.5\%. Recall that mesh reconstruction and point cloud registration can take a few seconds (\S\ref{subsec:env_map_renderer}) and a couple hundred milliseconds (\S\ref{subsec:point_cloud_registration}), respectively. In short, \textsc{FusedAR}\xspace achieves the best trade-off between visual quality and runtime performance. } } \label{fig:e2e_profiling} \end{figure} \subsubsection{End-to-end Evaluation.} We compare the end-to-end rendering visual results and the runtime performance of \textsc{FusedAR}\xspace and ARKit. As shown in Figure~\ref{fig:end_to_end_sys_rendering} (last two columns), the virtual mirror balls rendered with \textsc{FusedAR}\xspace have more reflection details and better color tune than those rendered with ARKit's learning-based method. Specifically, for all three scenes, \textsc{FusedAR}\xspace's virtual balls have higher visual similarity than physical mirror balls. In contrast, the virtual balls rendered using ARKit either reflect incorrect indoor scenes (especially on the far-field portion of the environment) or lack fine-grained visual details, e.g., the text on the book cover. We can more easily observe such visual quality differences by comparing the generated environment maps (the second and third columns) to the unwrapped images from the physical mirror ball. Note that the unwrapped images do not represent the ground truth lighting as they are often distorted but can serve as a visual guide of the panorama view at the reconstruction position. By comparing the environment maps generated by \textsc{FusedAR}\xspace to the unwrapped images, we see that \textsc{FusedAR}\xspace can accurately reconstruct scene elements from near-field observations while faithfully recovering environmental geometry and color tone information from far-field observations. Figure~\ref{fig:e2e_profiling} quantifies the visual quality using two commonly used image metrics, i.e., PSNR and SSIM, by comparing the rendered object to a physical mirror ball image at the same reconstruction position. We see that \textsc{FusedAR}\xspace outperforms ARKit on all three real-world captured scenes, with up to 14.3\% higher PSNR and 5.5\% higher SSIM. When replacing our lightweight multi-resolution projection\xspace component of \textsc{FusedAR}\xspace with the Ball-Pivoting surface mesh reconstruction~\cite{bernardini-ball-pivoting}, we only notice a minor increase in the PSNR/SSIM values. This observation demonstrates the effectiveness of multi-resolution projection\xspace for generating high-quality near-field reflections. Similarly, we do not observe significant improvement when running \textsc{FusedAR}\xspace with the point cloud registration component. We suspect this is because AR frameworks such as ARKit can provide reasonable device tracking data in most cases with slow movement. We observe that the tracking data of ARKit often drifts in cases of fast movement, making the point cloud registration component integral. We omit their visual effect comparisons as both of the \textsc{FusedAR}\xspace's variations do not show noticeable visual quality differences to \textsc{FusedAR}\xspace. Finally, the average end-to-end latency of near-field and far-field reconstruction is 134.4 ms and 57.5 ms, respectively. Detailed component-wise time breakdown is discussed in the next section. These latencies translate to updating high-quality lighting roughly at 22 fps, i.e., every 134.4 ms \textsc{FusedAR}\xspace can provide one near-field and two far-field environment maps. Such update frequency should be sufficient for most AR applications~\cite{Xu2021-sn,Yi2020-na}. For AR applications that require higher update frequency, we can either resort to more powerful edge servers (currently using an energy-efficient Jetson board) or use a lower quality setting, as discussed in the next section. \subsubsection{Trade-Offs Between Rendering Quality and Runtime Performance } \label{subsec:eval_quality_perf_trade_offs} \begin{figure}[t] \begin{subfigure}[b]{\linewidth} \centering \includegraphics[width=0.95\linewidth]{assets/rendering_quality_comparision.pdf} \caption{Rendering visualization on different quality presets} \label{subfig:preset_visualization} \end{subfigure} \vspace{0.1em} \centering \begin{minipage}{.29\linewidth} \begin{subfigure}[b]{\linewidth} \centering \includegraphics[width=\linewidth]{assets/visual_quality_configs_ssim_and_psnr.pdf} \caption{Visual quality comparison } \label{subfig:visual_quality_comparision} \end{subfigure} \end{minipage} \quad \begin{minipage}{.65\linewidth} \scriptsize \centering \begin{tabular}{lrrrrrr} \toprule \multirow{2}{*}{\textbf{System Component}} & \multicolumn{3}{c}{\textbf{Near-field (ms)}} & \multicolumn{3}{c}{\textbf{Far-field (ms)}} \\ \cmidrule(lr){2-4}\cmidrule(lr){5-7} & low & Medium & High & low & Medium & High \\ \midrule Data Encode & 5.11 & 15.01 & 50.13 & 0.18 & 0.18 & 0.18 \\ Data Offload & 4.07 & 7.78 & 18.24 & 0.55 & 0.55 & 0.55 \\ Dense Point Cloud Generation & 8.39 & 9.71 & 15.62 & N/A & N/A & N/A \\ Multi-resolution Projection & 9.02 & 9.89 & 14.56 & N/A & N/A & N/A \\ Sparse Point Cloud Generation & N/A & N/A & N/A & 0.03 & 0.03 & 0.03 \\ Anchor Extrapolation & N/A & N/A & N/A & 19.03 & 20.32 & 21.72 \\ Environment Map Download & 20.01 & 29.11 & 35.83 & 20.02 & 29.71 & 35.03 \\ \midrule End-to-end Reconstruction & 46.6 & 71.5 & 134.38 & 39.81 & 50.79 & 57.51 \\ \bottomrule \end{tabular}\vspace{0.5em} \subcaption{Reconstruction latency} \label{tab:sys_profiling} \end{minipage} \caption{ \textsc{FusedAR}\xspace rendering quality-performance trade-offs. \textnormal{ We show the time breakdown for \textsc{FusedAR}\xspace to generate a near-field and far-field environment map. All quality settings achieve better SSIM than ARKit. A large portion of time, at least 26.46\%, was spent on edge-related operations (data encode/offload and environment map download). This observation suggests that \textsc{FusedAR}\xspace has the promise to deliver high-quality environment maps directly on the device as mobile device GPU becomes more powerful. } } \label{fig:breakdown} \end{figure} We compare the rendering quality and latency of \textsc{FusedAR}\xspace under different presets. Figure~\ref{subfig:preset_visualization} shows the corresponding visual results. We note that the environment maps generated at all three settings present visually coherent near-field reflection and correct anisotropic far-field color tones. We can observe some pixelation effects in the environment map and the rendered mirror ball object for the low-quality preset due to low capturing resolution. All three settings achieve better quality than ARKit in terms of PSNR and SSIM values. For example, the low-quality preset has a 4.5\% higher SSIM value than ARKit. Moreover, the difference in visual quality among the three presets is marginal, with only up to 3.5\% between low and high quality. Furthermore, we measure the time breakdown of \textsc{FusedAR}\xspace's near-field and far-field reconstructions. Table~\ref{tab:sys_profiling} shows the average performance over three runs. For near-field reconstruction, the processing time of each component increases with the quality setting. For example, the time to encode the camera observations sees similar increases as the capturing resolutions, about 10X with 16X more pixels. We note that with the high-quality setting, the total time to encode and upload data takes 68.4 ms, about 1.9X of the environment map downloading time, even though the uploading/downloading resolution ratio is 1.5X. In contrast, in the medium-quality setting, with the same uploading/downloading resolution ratio, it is 21.7\% faster to encode and upload data than to download. This is because the device data is uploaded in the format of YCbCr 4:2:0, which has a smaller data size than the RGB environment map under the same resolution. Note that we are sending back the uncompressed RGB environment map for quality consideration. This observation suggests an interesting trade-off presented by the data encoding scheme in a real-world deployment. Moreover, this result also demonstrates that network-related operations (an artifact of using the GPU-based edge device) take up most of the end-to-end time, at 62.6\%, 72.6\%, and 77.5\% for low, medium, and high-quality settings, respectively. The network performance bottleneck implies an immediate performance gain by directly using mobile GPU to run the entire reconstruction pipeline. The far-field reconstruction presents a similar but slower upward increase in total time with the quality presets. In particular, the time to decode/offload image data and generate a sparse point cloud is the same for all three quality presets. In all settings of far-field reconstruction, we downsample the native color images from 1920x1440 to a fixed resolution of 32x24. The anchor extrapolation and environment map downloading time increase slightly with the environment map size. To put the latency performance of \textsc{FusedAR}\xspace in context, we note that a recent physical probe-based framework requires 30$\sim$400 ms to generate environment map~\cite{prakash2019gleam}. To understand the ARKit's performance, we use the inference time of its underlying deep learning model EnvMapNet~\cite{Somanath2020-of} since ARKit does not expose APIs to measure the end-to-end environment map generation. Even though the EnvMapNet model can run in 9 ms, as reported by Somanath et al.~\cite{Somanath2020-of}, we have shown previously that it often leads to inferior visual quality compared to \textsc{FusedAR}\xspace. Moreover, the total time for ARKit to generate an environment map is likely to be similar to \textsc{FusedAR}\xspace if accounting for other necessary steps, including data capturing and memory copying. In short, this detailed breakdown analysis demonstrates that far-field reconstruction can achieve real-time performance for all presets; when used in conjunction with near-field reconstruction, the mobile AR applications can receive a sufficient number of environment map updates per second. \subsubsection{Impacts of User Movement and Dynamic Scene} We investigate the impact of user movement on the rendering quality of \textsc{FusedAR}\xspace. Specifically, we are interested in understanding the need for our motion-based automatic capturing policy. One of the authors (referred to as the participant) used the \textsc{FusedAR}\xspace-powered AR app on the iPad to perform a virtual object placement following a pre-determined trajectory. The participant was instructed to keep the same distance to the placement position and only to move the iPad around the placement position, resulting in a semi-circular trajectory. Further, the participant was asked to pause the movement every 30 degrees and to keep the camera views centered at the placement position. The experiment was repeated with three timer values, i.e., disabled, 300 ms, and 500 ms, which control the frequency to check the movement. First, we observe that our motion-based automatic capturing policy successfully detected the movement and resulted in six captured views (captured when the participant was static). Second, when comparing the generated environment map to the ground truth environment map captured by the mirror ball (at the same placement position), we did not observe noticeable visual quality differences for all three timer values. For example, the PSNR values for the timer=$300$ ms stayed relatively the same for the entire experiment, at 13.37 db ($\pm$ 0.25 db). Our observations suggest that \textsc{FusedAR}\xspace can provide visually coherent renderings under user movement when the physical scene is static. Additionally, increasing the number of views (i.e., from one to six) provides limited visual quality improvement. This is intuitive as most near-field observations can be captured in a single view when the environment is simple and static. In a second experiment, we created a simple dynamic scene by manually moving the physical object within the near-field observations. Specifically, the participant was asked to fix the iPad's position and select the placement position on a math book (similar to Figure~\ref{fig:teaser}). While using the AR app, the participant moved the book in various directions. We observed that \textsc{FusedAR}\xspace could update the virtual object reflection to present details of different parts of the book. Even though the lighting reconstruction task does not block the rendering task, we still observed slightly choppy reflections. Please refer to the accompanying video for the visual quality demonstration. Two key factors impact the choppiness: {\em (i)} the physical scene change rate and {\em (ii)} the reconstruction time. If the physical scene changes very rapidly (e.g., faster than the reconstruction time), the virtual object reflection will be perceived to lag. In addition to further speed up the lighting reconstruction, we suspect techniques that smooth the transition between two distinct environment maps (e.g., image fade in) and policies that pipeline the lighting reconstruction requests to mask network latency can also improve the user-perceived performance. We leave such investigations as future work. \subsection{Simulation-Based Performance Evaluation} \label{subsec:end2end} \subsubsection{Synthetic Dataset Generation} \label{subsec:simulation_environment_setup} We describe the methodology we followed to generate a synthetic dataset using the Unity-based simulator (see Figure~\ref{fig:simulation_exp_workflow}). In a synthetic indoor scene, we first manually choose ten reasonable positions to be considered as lighting reconstruction positions for placing virtual objects. Example reconstruction positions include on the floor or table. We vary several factors for each reconstruction position, including the number of capturing positions, mobile user/device height, and observation distance, to generate 72 camera observations. Specifically, we set up a circular capturing trajectory with eight positions by evenly dividing the trajectory. We decide the height and radius of the capturing trajectory by simulating possible scenarios when the mobile user is holding the device at chest height from a reasonable distance to the reconstruction position. We choose three typical human height values at $\{160, 170, 180\}$ centimeters and calculate the height of the trajectory by multiplying the user's height by 0.8~\cite{standard_proportions_of_the_human_body}. We further measure the radius of the trajectory using the number of steps and choose three possible values of $\{0.5, 1, 1.5\}$ steps and use the height multiplied by 0.3 as the step length~\cite{stepping_science}. For each camera observation, we export the camera HDR observation image, depth image, position, orientation, and ground truth lighting in the format of an equirectangular panorama image. \begin{figure}[t] \centering \begin{subfigure}[b]{0.45\linewidth} \centering \includegraphics[width=\linewidth]{assets/end_to_end.pdf} \caption{PSNR comparison} \label{subfig:sim_end2end} \end{subfigure}\quad \begin{subfigure}[b]{0.45\linewidth} \centering \includegraphics[width=\linewidth]{assets/eval_rendering.pdf} \caption{Rendering visual comparison} \label{subfig:sim_rendering} \end{subfigure} \caption{ Simulator-based visual quality comparison. \textnormal{ \textsc{FusedAR}\xspace achieves better rendering effects, i.e., higher PSNR values (calculated against ground truth rendering), than other techniques for all objects. The PSNR comparisons to Xihe\xspace are omitted for the first four virtual objects as Xihe\xspace only provides spatial-variant low-frequency lighting estimation~\cite{xihe_mobisys2021}. Virtual objects are rendered with lighting provided by ground truth lighting, 360$^\circ$ camera, Xihe\xspace~\cite{xihe_mobisys2021}, and \textsc{FusedAR}\xspace. } } \label{fig:end_to_end} \end{figure} \subsubsection{End-to-end Visual Quality Comparison} We compare the end-to-end rendering performance quantitatively and qualitatively on six different virtual objects. For this experiment, we configure the simulator to run the distance-based lighting reconstruction\xspace to process one near-field observation and nine far-field observations based on the guided movement policy. For near-field reconstruction, we use mesh reconstruction instead of multi-resolution projection\xspace to support the high-quality point projection. The following results showcase the upper bound of visual quality that \textsc{FusedAR}\xspace can achieve. Figure~\ref{fig:end_to_end} shows the comparisons of PSNR values. Specifically, on complex objects with physically-based materials (i.e., \emph{Damaged Helmet} and \emph{Flight Helmet}), \textsc{FusedAR}\xspace achieves 44.1\% and 12.1\% higher values of PSNR than a recent deep learning-based AR lighting estimation system~\cite{xihe_mobisys2021} and the lighting information captured by a 360$^{\circ}$ camera, respectively. This result indicates that by correctly leveraging user movement and scene geometry information, \textsc{FusedAR}\xspace can generate highly accurate lighting from limited camera observations. In addition, as we will see in Figure~\ref{fig:near_fields_rendering_alblation}, the rendering performance of \textsc{FusedAR}\xspace is roughly the same with fewer observations. Note that we omit the comparison to the rendering PSNR by Xihe\xspace on metallic objects (\emph{Metallic Sphere} and \emph{Metallic Box}) because Xihe\xspace only provides low-frequency lighting in SH coefficients\xspace format, which does not support reflective rendering. Figure~\ref{subfig:sim_rendering} compares the visual effect of objects rendered with different lighting information. We observe that \textsc{FusedAR}\xspace produces visually coherent virtual objects. This observation suggests \textsc{FusedAR}\xspace is effective in generating a complete high-quality environment map. Compared to those rendered with the 360$^{\circ}$ camera observations, helmets rendered with \textsc{FusedAR}\xspace exhibit higher structural similarity to the ones rendered with ground truth lighting. For example, the two reflective regions in the lower bottom of the \emph{Damaged Helmet} are visually separated. \subsubsection{Ablation Study of Near-Field Lighting Reconstruction} \label{subsec:eval_near_field_recon} \begin{figure}[t] \includegraphics[width=0.83\linewidth]{assets/near_fields_rendering_psnr_by_model.pdf} \smallskip \includegraphics[width=0.83\linewidth]{assets/near_fields_rendering_ssim_by_rpid.pdf} \caption{ Quantitative comparison of rendering quality with different numbers of camera observations. \textnormal{ The performance of \textsc{FusedAR}\xspace, measured in PSNR, only exhibits slight improvement with more observations, while the SSIM values increase significantly for reflective materials. } } \label{fig:near_fields_rendering_alblation} \end{figure} This section demonstrates the effectiveness of our distance-based lighting reconstruction\xspace for the near-field observation and highlights the importance of \textsc{FusedAR}\xspace's far-field design. As we have designed \textsc{FusedAR}\xspace to progressively improve the intermediate point cloud by naturally exploiting mobile user/device movement, we evaluate the impact of the number of near-field observations on the rendering results We set up the experiment using our simulator as follows: {\em (i)} for each observation position, we combine camera observations from ${3, 5, 7}$ nearby positions on the orbiting trajectory; {\em (ii)} we use mesh reconstruction with \textsc{FusedAR}\xspace for combined observations. To eliminate the impact of far-field observations, we use a single dominant image color to fill the far-field portion of the environment map to simulate the ambient light sensor data. Figure~\ref{fig:near_fields_rendering_alblation} compares the rendering accuracy for different numbers of observations. We observe that the rendering PSNR values only increase \emph{slightly} with the number of observations. This observation suggests that only a small portion of the environment map needs to be processed with depth information, further motivating our design choice of reconstructing near-field and far-field observations separately. Furthermore, we show that rendering SSIM values increase significantly, 0.057 on average across the tested positions in Figure~\ref{fig:near_fields_rendering_alblation}, with the number of observations for the \emph{Metallic Sphere} object for all ten tested reconstruction positions. This result is intuitive since more complete near-field reflections will improve the structural similarity. However, higher SSIM values do not always guarantee better PSNR values, thus implying the necessity to use both metrics in quantitative studies for lighting reconstruction. \subsubsection{Ablation Study of Far-Field Lighting Reconstruction} \label{subsec:eval_far_field} So far, we have demonstrated the effectiveness of \textsc{FusedAR}\xspace and its spatial variance-aware near-field reconstruction component. In this section, we evaluate the performance of \textsc{FusedAR}\xspace's directional-aware far-field lighting reconstruction and the effectiveness of our guided movement policy. We evaluate the rendering performance with different numbers of guided far-field observations. Recall that guided movements naturally increase the observed scene, allowing \textsc{FusedAR}\xspace to extrapolate environment map pixel color closer to the ground truth. Figure~\ref{fig:guided_movement_rendering} shows the comparison of rendering performance. We observe that for all tested objects, having access to more guided observations improves the PSNR value by up to 31.04\%. Furthermore, far-field observations present different levels of impact on objects with different shapes. For example, both box-shaped objects are improved more significantly than spherical objects. This finding, if generalized, can help further improve usability by providing guided movements for different objects. \begin{figure}[t] \includegraphics[width=0.82\linewidth]{assets/npxsvcp1.pdf} \caption{ Quantitative comparison of rendering quality for guided movements. \textnormal{ Increasing the number of backward far-field observations have different levels of improvement for tested objects. } } \label{fig:guided_movement_rendering} \vspace{-3mm} \end{figure} % \section{Related Work} \label{sec:related} \subsection{Mobile-specific Lighting Support} As mobile device capability increases and AR re-emerges in user-facing applications~\cite{Amazon_undated-vp, Inter_IKEA_Systems_B_V2017-iv}, obtaining environment lighting for photorealistic rendering has garnered increasing interests in the research communities~\cite{ChengSCDZ18_graph,prakash2019gleam,pointar_eccv2020,Somanath2020-of,xihe_mobisys2021}. For brevity, we only discuss techniques targeted at lighting for indoor scenes. On the more theoretical front, Cheng et al. leveraged both the rear and front cameras to estimate spherical harmonics coefficients\xspace~\cite{ChengSCDZ18_graph}, which is a low-frequency lighting representation that does not support reflection. Zhao et al. proposed a two-staged pipeline called PointAR that leverages the mobile depth sensor to estimate spatially-variant lighting~\cite{pointar_eccv2020}. Somanath et al. introduced an efficient deep learning (DL) model called EnvMapNet that generates HDR environment maps from LDR images~\cite{Somanath2020-of}. In contrast to previous learning-based approaches, our work \textsc{FusedAR}\xspace directly generates high-quality environment maps with the core technique of distance-based lighting reconstruction\xspace and several practical optimizations, including multi-resolution projection\xspace. As such, \textsc{FusedAR}\xspace is not subject to common limitations of DL-based methods such as training data availability and inference performance on heterogeneous mobile resources. We also note that \textsc{FusedAR}\xspace includes a simulator that leverages 3D indoor scenes to conduct controlled experiments, thus avoiding the need for an expensive manual process of obtaining ground truth lighting information. \subsection{System Supports for Lighting} On the system front, commercial SDKs such as ARKit~\cite{arkit} and ARCore~\cite{arcore} provide easy-to-use lighting estimation APIs for mobile AR application development. Two recent academic frameworks improved upon commercial solutions: GLEAM provides a real-time mobile illumination framework that supports reflective virtual objects with the use of physical probes~\cite{prakash2019gleam}; Xihe\xspace introduced a 3D-vision based framework that provides adaptive lighting estimation~\cite{xihe_mobisys2021}. We design \textsc{FusedAR}\xspace from the outset by considering mobile characteristics, including limited FoVs, natural device/user movements, and leveraging edge GPU assistance, which well positions it for high-quality and efficient reconstruction of environment maps. \subsection{Image-based Lighting} In addition to methods for mobile-specific lighting discussed above, many researchers have investigated image-based lighting~\cite{debevec2006image,corsini2008stereo,karis2013real}. For example, numerous works designed approaches for generating environment lighting representations from camera videos~\cite{havran2005interactive,unger2013temporally,grosch2007consistent}, and assisted lighting reconstruction with physical probes~\cite{debevec2008rendering}, object cues~\cite{Sun2019-rw}, or scene geometry~\cite{Maier2017-qp,Azinovic2019-nz}. Recent work is DL-based primarily and can broadly fall into two types based on the output, i.e., estimating low-frequency lighting~\cite{Garon2019,srinivasan20lighthouse} or high-frequency lighting~\cite{Gardner2017,Song2019}. For example, Gardner et al. proposed to divide the HDR environment map learning task into two subtasks and generated one lighting estimation result per image~\cite{Gardner2017}. Even though this work can handle the rendering of specular objects, it does not consider spatial variance. On the contrary, both Garon et al.~\cite{Garon2019} and Lighthouse~\cite{srinivasan20lighthouse} support spatially-variant lighting but are limited in rendering reflective materials. Our work falls in between these two types of work by generating an environment map that consists of near-field and far-field components. This hybrid environment map allows more effective reconstruction within mobile constraints such as user movement and depth-sensing accuracy while still achieving visually coherent rendering for various objects, including reflective ones. \section{Conclusion} In this work, we introduced an end-to-end lighting reconstruction system called \textsc{FusedAR}\xspace that generates high-quality environment maps for mobile AR applications. As quantitatively and qualitatively demonstrated, AR applications can use environment maps reconstructed by \textsc{FusedAR}\xspace to render objects of various properties, including reflective materials, with 14.3\%/5.5\% higher PSNR/SSIM and better visual coherence than ARKit. We showed that \textsc{FusedAR}\xspace could produce virtual objects with more realistic and visually coherent reflection, as well as fine-grained visual details. We used physical object images for testbed-based experiments to serve as the basis of desired visual quality. Furthermore, using our simulator, we compared against other techniques, including Xihe and 360$^\circ$ camera, by having access to ground truth lighting. We have released our research artifacts at \url{https://github.com/cake-lab/LitAR} to facilitate future research work in our community. Aside from the realistic and visually coherent rendering goal, we designed \textsc{FusedAR}\xspace with mobile-specific constraints, e.g., limited sensing and data noise, in mind. By exploring mobile user behaviors and working within mobile sensing constraints, we proposed the distance-based lighting reconstruction\xspace scheme that divides camera observations into near-field and far-field observations based on pixels' relative distance to the reconstruction position. \textsc{FusedAR}\xspace can work with as few as one camera observation and can progressively improve the quality of generated environment maps, especially for metallic objects, with more camera observations. Keeping usability in mind, we further introduced the motion-based automatic capture and guided bootstrapped movement policies to help AR users capture higher quality data and more suitable camera observations. \textsc{FusedAR}\xspace significantly speeds up both the near-field and far-field reconstructions by two novel point cloud techniques, i.e., multi-resolution projection\xspace and anchor extrapolation\xspace. Last but not least, \textsc{FusedAR}\xspace provides three quality presets and exposes several knobs for mobile AR applications to make reconstruction quality and time trade-offs based on their specific use cases. We evaluated \textsc{FusedAR}\xspace's performance with a lab-based testbed and a game engine-based simulator. We observed that \textsc{FusedAR}\xspace could generate higher-quality environment maps than ARKit and result in rendered objects with up to 14.3\%/5.5\% higher PSNR/SSIM compared to the physical counterpart. Furthermore, we showed that multi-resolution projection\xspace significantly reduces the point cloud projection from 3 seconds (using mesh reconstruction) to 14.6ms. Overall, \textsc{FusedAR}\xspace can generate about 22 high-quality environment maps per second when point cloud registration is not required. As we design the point cloud registration to run asynchronously, the registration step will not block the main reconstruction pipeline; once completed, \textsc{FusedAR}\xspace will send an updated environment map to the mobile device. As part of the future work, we will explore techniques to improve the details of the generated environment maps and design runtime policies to handle temporally variant lighting more robustly. \begin{acks} We thank the anonymous reviewers for their constructive reviews. This work is partly supported by NSF Grants CNS-1815619, NGSDI-2105564, and VMWare. \end{acks} \balance{ \bibliographystyle{ACM-Reference-Format}
{'timestamp': '2023-01-18T02:15:09', 'yymm': '2301', 'arxiv_id': '2301.06184', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06184'}
arxiv
\section{Introduction}\label{sec:intro} \IEEEPARstart{T}he rapid development of deep learning technologies has made it easy to construct and train complex neural networks \cite{srivastava2015}. The deep structure of neural networks has thus gained tremendous success. However one of their critical challenges is that it needs large amounts of data. Training a model for a specific task on a limited data can lead to poor generalization due to over-fitting. Although lots of data can be now collected online, data annotation is always an expensive and time-consuming task. Therefore, more often in practice, one would fine-tune existing networks by continuing training it on the new task data. This can benefit many applications not having sufficient data by transferring learned knowledge from multiple sources to a domain-specific task \cite{bansal2020, lih2020}. Fine-tuning can process a pre-trained network in three different ways. The first is to freeze all the weights of the pre-trained network, but optimise only classifier layers using new task data. The second is to optimise the weights of all layers. The last one is done by adapting the weights of a subset layers of the pre-trained model as they would be more useful to learn dataset-specific features than other layers. In our preliminary experiments, we noticed that randomly tuning few individual layers of a pre-trained deep network can yield different performances, and occasionally outperform the first two fine-tuning methods mentioned above. We thus hypothesised that fine-tuning a group of layers may lead to some interesting results. Although fine-tuning a subset of layers seems to be more instinctively reasonable than the first two, it is not yet fully investigated how to determine which layers in the pre-trained network can have a greater contribution than other layers, when being tuned on new task data. We therefore propose a novel framework using block-wise fine-tuning in this paper and aim to explore an efficient way to find out the salient layers relevant to the features of new task data and improve fine-tuning reliability. The block-wise mechanism is conducted by dividing a deep network into blocks, each of which consists of a group of layers. To find out the most salient block to the target of a new task, the block-wise fine-tuning can be implemented in four different ways in our work. The first way is layer-wise fine-tuning, which aims to search for the most salient individual layer according to the obtained accuracy on target data. The second way is based on the results of layer-wise adaptation. It aims to jointly fine-tune the weights of several top-ranked layers instead of using only an individual layer since multiple layers could benefit fine-tuning as more parameters are to be adapted. The third way is block wise fine-tuning, where the layers of a deep network are segmented into blocks by non-weighting layers, such as the MaxPooling layer and Activation layer. The last one is to use a fixed-length sliding window to group layers block by block. The most salient block is identified in terms of the accuracy performance obtained by fine-tuning a subset layers. The details of our proposed approaches will be introduced in the next sections. The rest of this paper is organised as follows: Section 2 introduces the previous studies in relation to fine-tuning; the theoretical framework is presented in detail in Section 3; Section 4 and 5 describe the data set used in this work and experimental set-up; The results and analysis of our experiments are presented in Section 6, and finally conclusions are drawn in the last section. \section{Related Work}\label{sec:related_work} Within the framework of transfer learning and relying on the architecture of a pre-trained model (PTM), fine-tuning can adapt the model parameters on the target data and has become one of the most promising deep learning techniques in different research fields, such as computer vision (CV), natural language processing (NLP), and speech processing. \subsection{Fine-tuning in Computer vision}\label{subsec:ft_cv} In computer vision community, the annual ImageNet Large Scale Visual Recognition Challenge (ILSVRC) \cite{imagenet} provided multiple images sources and has resulted in a number of innovations in the architecture, such as VGG\cite{vgg16}, Inception\cite{inception, christian2016}, MobileNetV2\cite{mobilenetv2}, and ResNet50\cite{resnet50}. By fine-tuning, these high-performing pre-trained models are now widely used in image generation\cite{yaxing2018, zhou2017}, image classification\cite{simon_cvpr2019, tanveer2021, jung2015, younmgin2021}, image caption\cite{jiamei2022, jaemin2022}, anomaly detection\cite{hamdi2020,rippel2021, wu2021}, image retrieval \cite{xu2018, radenovic2019}, etc. In these previous studies, the development of fine-tuning techniques in CV can be found. The first aspect of fine-tuning is layer wise adaptation. Regarding the studies on the roles of hidden layers, Yosinski et al. \cite{yosinski2014} conducted empirical study to quantify the degree of generality and specificity of each layer in deep networks. The related studies \cite{yosinski2014, zeiler2014} further claimed that the low-level layers extract general features and the high-level layers extract task-specific features in a deep network. Since then, further works have been conducted to exploits the role of each layer. In \cite{tajbakhsh2016}, Tajbakhsh et al. showed that tuning only a few high-level layers is more effective than tuning all layers. Guo et al. \cite{guo2019} proposed an auxiliary policy network that decides whether to use the pre-trained weights or fine-tune them in layer-wise manner for each instance. In \cite{younmgin2021}, Ro et al. proposed an algorithm that improves fine-tuning performance and reduces network complexity through layer-wise pruning and auto-tuning of layer-wise learning rates. To further reinforce auto-tuning of layer-wise learning rate, Tanvir et al. \cite{tanvir2022} proposed RL-Tune, a layer-wise fine-tuning framework for transfer learning which leverages reinforcement learning (RL) to adjust learning rates as a function of the target data shift. The second aspect of fine-tuning is in relation to hyper-parameter optimisation. This is because the increasing complexity of deep learning architectures slow training partly caused by ``vanishing gradients''. In which the gradients used by back-propagation are extremely large for weights connecting deep layers (layers near the output layer), and extremely small for shallow layers (near the input layer); this results in slow learning in the shallow layers\cite{bharat2015}. So, Bharat et al. \cite{bharat2015} proposed a method to allow larger learning rates to compensate for the small size of gradients in shallow layers. Since then, various approaches have been explored for better regularization of the transfer learning with effective hyper-parameter selection. In \cite{kornblith2019} Kornblith et al. proposed a grid-search based approach to search for better hyper-parameters, and Li et al. \cite{lih2020} provided an elaborate guideline of learning rates and other hyper-parameter selections. Furthermore, Parker et al. proposed provably efficient online hyperparameter optimization with population-based bandits, which is found to be effective in optimizing RL training \cite{parker2020} . To improve fine-tuning by using optimiser, Loshchilov et al. \cite{adamW} designed two robust optimisers, SGDW and AdamW, by combining SGD \cite{bottou2012} and Adam \cite{kingma2015} with decoupled weight decay. The work in \cite{alexey2021, ananya2022} also explored the use of two optimisers, SGD and AdamW, on ImageNet like domains in terms of fine-tuning accuracy. Recently, \cite{kumar2022} found that large gaps in performance between SGD and AdamW occur when the fine-tuning gradients in the first “embedding” layer are much larger than in the rest of the model, and claimed that freezing only the embedding layer can lead to SGD performing competitively with AdamW while using less memory. The third aspect is neural architecture search (NAS), aiming to adapt the architecture of a pre-trained network to match to the characteristics of new task data. Liu et al. \cite{liuc2018} used a sequential model-based optimization to guide the search through the architecture of the network. Pham et al. \cite{pham2018} proposed an efficient NAS (ENAS) with parameter sharing, which focuses on reducing the computational cost of NAS by reusing the trained weights of candidate architectures in subsequent evaluations. Lu et al. \cite{lu2021} proposed neural architecture transfer (NAT) to efficiently generate task-specific custom NNs across multiple objectives. Kim et al. \cite{kim2022} proposed to reduces the search cost using given architectural information and cuts NAS costs by early stopping to terminate the search process in advance. In \cite{tanveer2021}, Tanveer et al. developed differentiable neural architecture search method by introducing a differentiable and continuous search space instead of a discrete search space and achieves remarkable efficiency, incurring a low search cost. \subsection{Fine-tuning in Natural Language Processing}\label{subsec:ft_nlp} Compared to CV, NLP models was typically more shallow and thus require different fine-tuning methods \cite{jeremy2018}. In NLP, Mikolov et al. \cite{mikolov2013} proposed a simple transfer technique by fine-tuning pre-trained word embeddings, a model's first layer, but has had a large impact in practice and is now used in most state-of-the-art models. To mitigate LMs' overfitting to small datasets, Jeremy et al. \cite{jeremy2018} proposed discriminative language model fine-tuning to retain previous knowledge and avoid catastrophic forgetting. In the last couple of years, large language models, such as GPT \cite{gpt2020} and BLOOM \cite{bloom2022}, were developed by using mask learning on large amounts of text data. Given the size of these large language models, fine-tuning all the model parameters can be compute and memory intensive \cite{fedus2021}. Some recent studies \cite{liang2021, hej2022} have proposed new parameter efficient fine-tuning methods that update only a subset of the model’s parameters. As adversarial samples of new task are usually out-of-distribution, adversarial fine-tuning fails to memorize all the robust and generic linguistic features already learned during pre-training. To mitigate the impacts caused by this, Dong \cite{dong2021} et al. proposed to use mutual information to measure how well an objective model memorizes the useful features captured before. Furthermore, Mireshghallah et al. \cite{Mireshghallah2022} empirically studied memorization of fine-tuning methods using membership inference and extraction attacks as large models have a high capacity for memorizing training samples during pre-training. \subsection{Fine-tuning in Speech Processing}\label{subsec:ft_sp} For speech processing, fine-tuning can work not only for language model adaptation \cite{huang2021, guilaume2022}, but also for tuning acoustic models \cite{violeta2022, tsiamas2022, vanek2019, peng2021}. Fine-tuning language models in speech processing is same as its use in NLP. Guillaume et al. \cite{guilaume2022} developed a method using a transformer architecture to tune a generic pre-trained representation model for phonemic recognition. For acoustic model adaptation, Violeta et al. \cite{violeta2022} proposed an intermediate fine-tuning step that uses imperfect synthetic speech to close the domain shift gap between the pre-training and target data. Tsiamas et al. \cite{tsiamas2022} proposed to use an efficient fine-tuning technique that trains only specific layers of our system, and explore the use of adapter modules for the non-trainable layers. Peng et al. \cite{peng2021} used fine-tuning to learn robust acoustic representation to alleviate the mismatch between a pre-trained model and new task data. The similar work can be also found in \cite{haidar2021}, where Haidar et al. employed Generative Adversarial Network (GAN) \cite{goodfellow2014} to fine-tune a pre-trained model to match to the acoustic characteristics of new task data. \begin{figure*} \centering \includegraphics[scale=0.7]{flowchart_theory3.png} \caption[center]{Architectures of source model and four target models: (a) source model (b) fine-tuning only classifier layers of source model , (c)fine-tuning all layers of source model, (d)target model adapted by layer-wise fine-tuning, and (e) target model adapted by block-wise fine-tuning.} \label{fig:th2} \end{figure*} \section{Theoretical Framework}\label{sec:theory} \noindent Fine-tuning (\textbf{FT}) in this work is to adapt the weights ($\textbf{W}$) of a group of layers ($\textbf{Ls}$) of a pre-trained deep neural network (\textbf{DN}) given input data matrices $\textbf{X} = \{X_1,X_2,\ldots, X_M\}$ , where $M$ is the number of training samples of a new task, and $X_m$ represents the $m$-th sample matrix. The aim of the proposed approach is to find out the block $\textbf{B}_{Ls}$ most relevant to the target data. This can be represented by: \begin{equation} \textbf{B}_{Ls,W} = \arg\max_{\textbf{Ls,W}} Accuray(\textbf{DN}(\textbf{X})) \end{equation} To attain the aim, we designed block-wise fine-tuning alongside the work on layer-wise fine-tuning. Fig. \ref{fig:th2} shows the architectures of source model and four target models for fine-tuning. Fig. \ref{fig:th2}(a) is the pre-trained source model. Fig.~\ref{fig:th2}(b) shows the target model (Baseline I) where only classifier layers marked blue are to be adapted and the weights of other layers will be freezed. Fig.~\ref{fig:th2}(c) is the target model (Baseline II), where all layers are to be re-optimised. The two target models will be used as baseline models for a comparison in this paper. Fig.~\ref{fig:th2}(c) and (d) show the architectures of layer-wise and block-wise fine-tuning, respectively. The dash box means when a layer or a group layers are being tuned, the weights of other layers, except classifier layers, keep fixed. \subsection{Layer-wise Fine-tuning}\label{subsec:layerwise} As aforementioned in the first two sections, domain shift between the pre-trained model and target data is the main reason why fine-tuning is needed. The shift is actually accumulated by each individual layer of the pre-trained model. So, our study in fine-tuning starts from layer-wise adaptation. As shown in Fig.~\ref{fig:th2}(d), the weights of each layer will be adapted to search for the layer, which can result in a salient improvement after its weights are adapted on new task data. The pseudo code in Algorithm \ref{alg:layerwise} shows the implementation of layer-wise fine-tuning, where a while loop is used to search for the salient layer. In our approach, the use of a small part of data, e.g. $10\%$, is to identify the most salient layer and thus improve the fine-tuning efficiency. \begin{algorithm} \caption{Layer-wise fine-tuning (\textbf{FT})}\label{alg:layerwise} \begin{algorithmic}[1] \State Load the weights, $\textbf{W}$, of a pre-trained model (\textbf{$\text{DN}$}) \State Preprocess input data, $\textbf{X}$, and select 10\% data for training and 30\% data for evaluation \State $N =$ \# layers of $\textbf{\text{DN}}$ \State Initialise layer index, $i=1$, \State Initialise accuracy array, $Acc=zeros(N)$ \State \textbf{Training:} \State ~~While {$i < N$} \State ~~~~~~tune the weights of the $i^{th}$ layer, $L_{i}$, and classifier \State ~~~~~~$Acc[i] = \textbf{FT}(\textbf{\text{DN}}(L_{i},C))$ \State ~~~~~~$i = i + 1$ \State ~~EndWhile \State ~~Identify the most salient layer, $L_{opt}$, using $Acc$ \State \textbf{Evaluation:} \State ~~Fine-tune the layer, $L_{opt}$, of the pre-trained model using all training data $(70\%)$ \State ~~Evaluate the tuned model on the test data \end{algorithmic} \end{algorithm} \subsection{Block-wise Fine-tuning}\label{subsec:blockwise} In a deep neural network, several adjacent layers with a similar function can be often grouped into a block. Tuning the weights of these layers in a block rather than all layers is an efficient way to match the learned knowledge to a specific task since only a relatively small part of parameters will be adapted. Fig. \ref{fig:th2}(d) shows the architecture of block-wise fine-tuning, starting from the input end of a deep network. For block-wise fine-tuning, its critical step is to divide the structure of a deep neural network into blocks. In our work, the division can be done by non-weighting layers, such as the Maxpooling layer and Activation layer. In some typical deep neural networks, such as VGG16\cite{vgg16} and ResNet50\cite{resnet50}, there include not only Convolutional layers, but also MaxPooling, Batch Normalization, and Activation layers. The convolutional layers in these models generally contain major parameters, and only a relatively small number of parameters are from other layers. This means Maxpooling layer, Batch Normalization layer, and even Activation layers could be viewed as a delimiter to segment a deep neural network into blocks. Fig. \ref{fig:vgg16_param} shows the number of parameters of each layer of VGG16, a classical deep neural network for image classification. In this figure, MaxPooling layers are corresponding to the valleys of the curve since they are non-weighting layers. \begin{figure}[tbh] \centering \includegraphics[width=0.9\linewidth]{Figs/VGG16_layers.png} \caption[center]{Distribution of the number of parameters of each layer of VGG16 model.} \label{fig:vgg16_param} \end{figure} \begin{algorithm} \caption{Block-wise fine-tuning (\textbf{FT})}\label{alg:blockwise} \begin{algorithmic}[1] \State Load the weights, $\textbf{W}$, of a pre-trained model ($\textbf{\text{DN}}$) \State Preprocess input data, $\textbf{X}$, and select 10\% data for training and 30\% data for evaluation \State $N =$ \# Blocks of $\textbf{\text{DN}}$ \State Initialise layer index, $i=1$, \State Initialise accuracy array, $Acc=zeros(N)$ \State \textbf{Training:} \State ~~While {$i < N$} \State ~~~~~~tune the weights of the layers in the $i^{th}$ block, $B_{i}$, \State ~~~~~~and classifier \State ~~~~~~$Acc[i] = \textbf{FT}(\textbf{\text{DN}}(B_{i},C))$ \State ~~~~~~$i = i + 1$ \State ~~EndWhile \State ~~Identify the most salient block, $B_{opt}$, using $Acc$ \State \textbf{Evaluation:} \State ~~Fine-tune $B_{opt}$ of the pre-trained model using all training data (70\%) \State ~~Evaluate the tuned model on the test data \end{algorithmic} \end{algorithm} Algorithm~\ref{alg:blockwise} shows the pseudo code of implementing block-wise fine-tuning, where a while loop is run over blocks instead of individual layers used in Algorithm~\ref{alg:layerwise}. As an alternative, we can also use a sliding window instead of non-weight layers to segment the long layer sequence into block. The difference is that the length of the sliding window is fixed and the number of layers in each block will thus be the same. The window length is set to be three in our experiments. \subsection{Block-wise Fine-tuning using ranked layers}\label{subsec:ft_ranked} Unlike Algorithm \ref{alg:blockwise} to segment layers into blocks, another block-wise fine-tuning approach is to select multiple layers, whose contributions to target performance are top-ranked. We thus make use of the evaluation performance on each individual layer obtained by using Algorithm \ref{alg:layerwise}. In our experiments, we select top three layers to make up a block. \begin{algorithm} \caption{Block-wise fine-tuning using ranked layers}\label{alg:blockwise_ranked} \begin{algorithmic}[1] \State Load the weights, $\textbf{W}$, of a pre-trained model ($\textbf{\text{DN}}$) \State Preprocess input data, $\textbf{X}$, to match to the input layer of $\text{DN}$ \State $N =$ \# layers of $\textbf{\text{DN}}$ \State Initialise layer index, $ii=0$ \State ~~Initialise accuracy array, $Acc=zeros(N)$ \State \textbf{Training:} \State ~~\textbf{ Implement Algorithm} \ref{alg:layerwise} \State ~~~Identify three top-ranked layers in terms of $Acc$ \State \textbf{Evaluation:} \State ~~fine-tune the selected three layers of pre-trained model using all training data $(70\%)$ \State ~~test the tuned model on the test data \end{algorithmic} \end{algorithm} \section{Data set} The algorithms were tested on the Tf\_flowers dataset \cite{tfflowers}. The Tf\_flowers dataset is a collection of images of flowers, divided into five different classes: daisy, dandelion, roses, sunflowers, and tulips. There are a total of 3670 images in the dataset. The images are high quality color images resized to a resolution of $224\times224$ pixels, then we scaled RGB to 0-1 range. The dataset is intended for use in image classification tasks, and can be used to train machine learning models to recognize different types of flowers \cite{datasetapply}. \section{Experimental set-up} The training process for this experiment involves using the pre-trained models as a starting point, and then fine-tuning the models on the TensorFlow Flowers dataset. We used TensorFlow Keras library to build and train the models. The training process will involve using a small number of training samples, i.e., 10\% of the dataset, to identify the best performing layers (for Layer-wise FT), block (for Block-wise FT ), or Ranked block (for Block-wise with ranked layers FT). Then using the remaining training dataset (70\% of the whole dataset) to evaluate the accuracy. We have evaluated the performance of the algorithms on five commonly used pre-trained models, i.e., VGG16 \cite{vgg16}, MobileNet \cite{mobilenetv1}, MobileNetV2 \cite{mobilenetv2}, MobileNetV3 \cite{mobilenetv3}, and ResNet50 \cite{resnet50}. The models were pre-trained on the imagenet wights. The classifier layers, we started with a Flatting layer \cite{kerasflat}, to which flattens the dimensions of the output to prepare it for use in Fully Connected (FC) layers \cite{Chollet}. Then a dense layers \cite{kerasdense}, with 128 units, followed by a dropout layer \cite{kerasdropout} with a rate of 0.5, to reduce the probability of overfitting. \cite{Srivastava}. Then two dense layers with 64 and 5 units respectively. The 64 units layer is activated by a `relu' function, and the final dense layer has five units, activated by `softmax' for the multi-class classification \cite{Goodfellow}. The model is then compiled with loss function ``categorical cross-entropy", an optimizer ``Adam" with a learning rate of $ 5 \times 10^{-5}$ and metrics as ``accuracy". A ``Reduce LR On Plateau" callback is then defined, which reduces the learning rate when the validation accuracy plateaus. \cite{Chollet}. The model is then trained on the training data with batch size of 4, 50 epochs and validation data and callbacks. \section{Results and Analysis} In this paper, we began our investigation by evaluating the performance of a Baseline I model, which only tunes the classifier layers, a Baseline II model, which tunes all layers, and a model that randomly tunes three layers using only 10\% of the dataset for training. As shown in Fig. \ref{fig:random}, the model with randomly chosen layers outperforms the Baseline I method in all tested models, and achieves a comparable performance with Baseline II. \begin{figure}[tbh] \centering \includegraphics[width=0.9\linewidth]{Figs/pdfs/random3layers.pdf} \caption[center]{Comparison between the baseline models and FT three randomly selected layers using 10\% of the dataset.} \label{fig:random} \end{figure} Afterwards we investigated the performance of the layer-wise FT approach. As shown in Fig. \ref{fig:D10SL}, the classifier accuracy varies significantly between different layers. A very few layer are able to identify the classes with a high accuracy, even exciting both Baseline approaches, while the vast majority would not achieve high accuracy. \begin{figure*} \centering \includegraphics[scale=0.9]{Figs/pdfs/D10_SL.pdf} \caption[center]{Layer-wise fine tuning accuracy using 10\% of the dataset for all tested models.} \label{fig:D10SL} \end{figure*} For the block-wise FT, we implemented it using the pre-trained models with the 10\% of the dataset. The results shown in Fig. \ref{fig:D10_Block}. We can observe that the classification accuracy has been significantly improved with the use of block wise FT, and the accuracy has a certain observable pattern. We can also note that the highest accuracy blocks are not usually convective. \begin{figure*} \centering \includegraphics[width=0.9\linewidth]{Figs/D10_blockwise.png} \caption[center]{Block wise fine tuning accuracy using 10\% of the dataset. Showing the best performing block with a white filling with vertical dash.} \label{fig:D10_Block} \end{figure*} The next part of the investigation we evaluated the SW approach. Unlike the block-wise approach the SW approach all the blocks has a fixed number of trainable layers. Thus to asses the accuracy we had to loop through all the layers as shown in Fig. \ref{fig:D10_SW}. Although the number of trained layers in each `window' are relatively small, the achieved accuracy was comparable with the block-wise and the Baseline II approaches. \begin{figure*}[h] \centering \includegraphics[scale=0.9]{Figs/pdfs/D10_SW.pdf} \caption[center]{Sliding window fine tuning accuracy using 10\% of the dataset.} \label{fig:D10_SW} \end{figure*} To summarise we have obtained the optimal layer, block, and `window' using only 10\% of the data set. As shown in Fig. \ref{fig:D10_summary}, all the tested approaches outperform Baseline I approach and few outperform Baseline II approach. Consequently we leveraged these findings to FT the models on the 70\% of the dataset. \begin{figure}[tbh] \centering \includegraphics[width=0.9\linewidth]{Figs/summary/D10_summary.png} \caption[center]{Fine Tuning validation accuracy using 10\% of the dataset. Showing the different approaches and the baseline performance.} \label{fig:D10_summary} \end{figure} The fine-tinning accuracy using all the approaches using 70\% of the dataset is shown in Fig. \ref{fig:D70_summary}. We can observe that the block-wise approach had been consistent in achieving high accuracy. As it has always either score higher or equal to the Baseline II approach. To validate this findings we have repeated the experiments few time and results for the block-wise and the SW approaches are shown in Appendix\ref{sec:repeated}. \begin{figure}[tbh] \centering \includegraphics[width=0.9\linewidth]{Figs/summary/D70_summary.png} \caption[center]{Block wise fine tuning accuracy using 70\% of the dataset. Showing the best performing block with a white filling with vertical dash.} \label{fig:D70_summary} \end{figure} To evaluate the reliability and accuracy of the FT we evaluated the classification accuracy on all the models using all the baseline and proposed approaches, as show in Table \ref{tab:mean}. We can observe that the Block-wise approach has the highest average validation accuracy outperforming the Baseline II approach. Moreover it has a lower accuracy variance, thus yield a consistent reliable performance. \begin{table*}[] \caption{Fine tuning validation accuracy showing both the mean and the variance of the tested approaches using 70\% of the data. LW refers to layer-wise, BW refers to block-wise, BWT3 refers to block-wise with the 3 top ranked layers, and BWSW refers to the sliding-window approach.} \centering \begin{tabular}{llllllll}\hline & \multicolumn{1}{c}{Baseline I} & \multicolumn{1}{c}{Baseline II} & \multicolumn{1}{c}{LW} & \multicolumn{1}{c}{BW} & \multicolumn{1}{c}{BWT3} & \multicolumn{1}{c}{BWT5} & \multicolumn{1}{c}{BWSW} \\ \hline VGG16 & 0.713896 & 0.873751 & 0.864668 & 0.875568 & 0.86921 & 0.881926 & 0.877384 \\ MN1 & 0.828338 & 0.875568 & 0.847411 & 0.877389 & 0.875568 & 0.883742 & 0.879201 \\ MN2 & 0.811081 & 0.86921 & 0.823797 & 0.867393 & 0.833787 & 0.86921 & 0.839237 \\ MN3 Small & 0.30881 & 0.762035 & 0.438692 & 0.790191 & 0.516803 & 0.648501 & 0.667575 \\ RestNet & 0.778383 & 0.828338 & 0.857402 & 0.848320 & 0.86921 & 0.868302 & 0.849228 \\ \hline Variance & 0.046867 & 0.002364 & 0.033797 & \textbf{0.001318} & 0.024095 & 0.010383 & 0.007806 \\ Mean & 0.688102 & 0.84178 & 0.766394 & \textbf{0.851771} & 0.792916 & 0.830336 & 0.822525 \\ \hline \end{tabular}\label{tab:mean} \end{table*} \section{Conclusions and future work} Our preliminary experiments suggest that randomly tuning individual layers of a pre-trained deep network can yield intriguing results, with few even outperforming traditional fine-tuning methods. We proposed a novel framework using block-wise fine-tuning to explore an efficient way to find the salient layers relevant to the features of new task data and improve fine-tuning reliability. Our proposed approach includes four different methods for determining the most salient block: layer-wise fine-tuning, layer-wise adaptation, block-wise fine-tuning, and a fixed-length sliding window. This work can be extended in several approaches such as building an automated FT approach, that can automatically identify the best performing blocks and FT them. \begin{appendices}\label{sec:repeated} \section{Repeated experiments} To validate our findings we have repeated the experiments for the block-wise and the SW approaches. The results shown in Figs \ref{fig:D70_Block_rep}, and \ref{fig:D70_SW_rep}, shows that both approaches yield consistent performance. \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figs/pdfs/D70block.pdf} \caption[center]{Block wise fine tuning accuracy using 70\% of the dataset.Showing the four repeated experiment and the resulting average.} \label{fig:D70_Block_rep} \end{figure} \begin{figure} \centering \includegraphics[width=0.9\linewidth]{Figs/pdfs/D70SW.pdf} \caption[center]{Sliding window fine tuning accuracy using 70\% of the dataset.Showing the four repeated experiment and the resulting average.} \label{fig:D70_SW_rep} \end{figure} \end{appendices}
{'timestamp': '2023-01-18T02:13:42', 'yymm': '2301', 'arxiv_id': '2301.06133', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06133'}
arxiv
\section{Introduction} \label{sec:introduction} Lighting estimation is an important and long-standing task in computer vision and graphics communities~\cite{legendre-facelight,somanath-envmapnet,Garon2019}. Over the past few years, we have observed a wide adoption of lighting estimation methods for end-user-facing applications. For example, scene lighting estimation is essential to render visually-coherent virtual objects in mobile AR applications~\cite{somanath-envmapnet,zhao2022litar}; in computational photography, lighting estimation is useful because photos can be post-edited to have different lighting conditions~\cite{legendre-facelight}. In this work, we explore the key research questions in lighting understanding for an emerging application domain, \emph{front-facing\xspace mobile AR}, particularly try-on applications where end users leverage handheld mobile devices such as smartphones to overlay products of interest on their faces. Mobile AR try-on apps promote online shopping and often require photorealism to provide user experiences on par with physical try-on. Front-Facing\xspace mobile AR try-on shares many practical challenges with other lighting estimation apps, e.g., limited field-of-views (FoVs), but also has its own unique challenges and opportunities. For instance, even though commercial AR SDKs support the world-space device pose tracking via back-facing\xspace cameras, they do not currently support such tracking via the front-facing\xspace camera. Adding such support is not a mere integration of front-facing\xspace camera streams to existing algorithms but requires solving challenges that are rooted in moving objects (face in this case) and limited overlaps between images. On the other hand, front-facing\xspace mobile AR try-on is less sensitive to spatial variance because of the proximity of the observation (the phone camera) and the rendering (the face) positions~\cite{xihe_mobisys2021}. This insensitivity allows us to operate in the 2D image space---rather than the more computation-intensive 3D space~\cite{xihe_mobisys2021}---when generating the proper lighting information. Providing a photorealistic and visually-coherent try-on experience can be boiled down to supporting reflection, shadow, and correct color tone~\cite{zhao2022litar}. All three features can be achieved by utilizing a 360$^{\circ}$ HDR environment map~\cite{debevec2006image}. However, obtaining such an environment map on mobile devices is difficult for key reasons, including small FoVs and limited support for HDR streaming. Even in cases when high-end phones could capture HDR videos, they do not support \emph{simultaneous multi-camera streaming}. Furthermore, front-facing\xspace AR, compared to back-facing\xspace AR, has an even more limited FoV, and the camera often fails to observe important environmental information that is useful for reflective rendering. In short, it is challenging to obtain high-quality environment maps even on modern mobile devices. This paper outlines a research roadmap that leverages \emph{multi-camera} to deliver high-quality lighting information for front-facing\xspace mobile AR. State-of-the-art approaches either only support a subset of the features~\cite{zhao2022litar} or generate incoherent reflection~\cite{somanath-envmapnet}. To overcome the limitations of prior work, our key idea is to generate a high-quality environment map by \emph{combining multi-view lighting reconstruction and parametric directional lighting estimation}. Our system design uses LDR multi-camera video streaming as input because streaming dual-camera LDR images requires less energy, compared to HDR streaming, and is better supported across recent mobile devices. Our proposed three directions are grounded on our preliminary investigation of dual-camera streaming (\S\ref{sec:the_promise_of_multi_view_cameras}). To efficiently increase mobile device observation, we propose to regulate the back-facing\xspace camera usage by \emph{time and mobility} to conserve energy. We propose a simple and lightweight face-tracking component for stitching camera views to generate an environment map. Lastly, we propose further improving the completeness and color tone of the environment map and supporting shadow casting by extending our parametric directional lighting estimation model with the back-facing\xspace camera streaming. In summary, we make the following key contributions: \begin{itemize}[leftmargin=.12in,topsep=4pt] \item We characterize the challenges of supporting photorealistic front-facing\xspace mobile AR, an important and emerging application domain of the lighting estimation task. \item We demonstrate that using a dual-camera setup can improve the mobile AR try-on experience with more visually-coherent rendering, especially for reflective objects. \item We describe key questions and promising designs for achieving a visually-coherent virtual try-on experience in a dual-camera AR system, including reflection, accurate color tone, and shadow casting. \end{itemize} \section{Challenges} \label{sec:motivation_for_photorealism} \begin{figure}[t] \centering \includegraphics[width=0.9\linewidth]{assets/reflection_direction.pdf} \caption{ The challenge of reflective rendering. \textnormal{ Mobile phones and example light rays are illustrated in green and blue, respectively. } } \label{fig:reflection_directions} \vspace{-2mm} \end{figure} Front-Facing\xspace mobile AR try-on, an emerging application of lighting estimation, exhibits new and unique challenges compared to other mobile AR shopping apps, e.g., IKEA Place\footnote{\url{https://tinyurl.com/yrruy65r}}. Because these AR apps often use the back-facing\xspace camera, in this paper, we refer to them as \emph{back-facing\xspace AR}. Figure~\ref{fig:reflection_directions} illustrates the key usage difference between these two types of AR apps and the implication on reflective rendering. In the back-facing\xspace AR, the user often points the mobile camera toward a rendering position; the environment information required for rendering is often included in the corresponding camera views. In contrast, users often hold the mobile camera relatively closer to their faces when they use front-facing\xspace AR apps. Because of the capturing direction of the front-facing\xspace camera, it often misses the relevant environment information, making reflection rendering more challenging. \begin{table}[t] \caption{ Comparisons of AR framework lighting estimation support for front-facing\xspace mobile AR apps. \textnormal{ } } \vspace{-2mm} \label{tab:ar_framework_comparision} \scriptsize \centering \begin{tabular}{lrrrr} \toprule \textbf{Framework} & \textbf{Ambient} & \textbf{Directional} & \textbf{Spherical Harmonics} & \textbf{Env. Map} \\ \midrule ARKit\tablefootnote{\url{https://developer.apple.com/augmented-reality/}} & Yes & Yes & Yes & No \\ ARCore\tablefootnote{\url{https://developers.google.com/ar}} & Yes & No & No & No \\ Proposed & Yes & Yes & Yes & Yes \\ \bottomrule \vspace{-5mm} \end{tabular}\end{table} Existing mobile AR-based try-on apps leverage depth estimation, 3D face modeling~\cite{paysan-baselfacemodel}, and real-time rendering to improve object fitting and pose tracking. However, due to the usage of reflective materials in many product designs, visual incoherence can occur if the 3D product objects are not rendered with the correct environmental lighting. At a high level, environment lighting requires a complex data structure representing omnidirectional environment observations and directional intensity variations. Traditionally, high-quality environment lighting can be obtained using specialized hardware like physical light probes or 360$^\circ$ cameras, which are cumbersome to be integrated into mobile AR apps. Table~\ref{tab:ar_framework_comparision} shows that existing mobile AR frameworks only provide partial lighting support and cannot effectively leverage the new features on modern mobile phones like multi-camera streaming. In contrast, our proposed framework will provide a comprehensive set of lighting-related features for front-facing\xspace mobile AR. \section{The Promise of Multi-Camera} \label{sec:the_promise_of_multi_view_cameras} We show that dual-camera streaming, a recent hardware advancement supported by major phone vendors, can improve the visual results for front-facing\xspace AR-based try-on. Furthermore, we show that EnvMapNet~\cite{somanath-envmapnet}, a state-of-the-art lighting estimation model, cannot fully utilize the dual-camera inputs. Additional setup details are described below, and the research challenges and proposed solutions are presented in \S\ref{sec:research_roadmap}. \begin{figure*}[t] \centering \includegraphics[width=\linewidth]{assets/visuals_revision.pdf} \caption{Reflection rendering comparisons of different rendering setups. \textnormal{ Warby Parker uses a static environment map which leads to incorrect reflections. Switching from front-facing\xspace to dual-camera streaming results in a more complete environment map and improved reflection rendering. } } \label{fig:visuals} \vspace{-3mm} \end{figure*} \para{Setup.} We used a tripod to fix the mobile phone position and then captured the front-facing\xspace and back-facing\xspace camera images, for three indoor scenes. Specifically, we used the front-facing\xspace, wide, and ultra-wide back-facing\xspace cameras, with 70$^{\circ}$, 75$^{\circ}$, and 120$^{\circ}$ FoVs, on iPhone 14 Pro. Next, we imported the captured images into \texttt{Blender} and generated virtual sunglasses on top of the user's face using the front-facing\xspace camera image. We tested the energy usage of multi-camera streaming using Apple's sample dual-camera capturing code\footnote{\url{https://tinyurl.com/mr32e7ab}}. We measured the device battery usage by running the dual-camera streaming app for 10-minute sessions on an iPhone 11 Pro. We set the screen brightness value to 50\% and disabled all background tasks and networking, and measured the idle device battery consumption. After each measurement, we recharged the battery to 90\%. We tested 6 configurations by keeping the front-facing\xspace camera always on and turning on/off the back-facing\xspace camera programmatically. We repeated the measurement 3 times for each configuration and reported the average value. \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{assets/EnvMapNet_training.pdf} \caption{ Visual comparisons of EnvMapNet~\cite{somanath-envmapnet} with different masks. \textnormal{We apply different masks to simulate different camera view setups. In addition to EnvMapNet~\cite{somanath-envmapnet}'s original mask inputs, we provide two mask setups with 70$^\circ$ front-camera FoV and a 120$^\circ$ back-camera FoV. We observe that even though dual-camera improves the prediction accuracy, the environment map details and light source directionalities are still inaccurate.} \textnormal{ } } \label{fig:envmapnet} \end{figure*} \subsection{Rendering Result Analysis} \label{subsec:rendering_visual_impacts} Figure~\ref{fig:visuals} shows the rendering visual results using different camera setups and a commercial try-on app Warby Parker~\footnote{\url{https://www.warbyparker.com}}. We observe that combining front-facing\xspace and back-facing\xspace camera views improves the environment map's quality and, consequently, the rendering quality. Specifically, the rendered sunglasses in the camera setup with the largest FoV, i.e., \emph{front-facing\xspace and (ultra-wide) back-facing\xspace cameras}, are more visually realistic and coherent than the other two renderings. Capturing high-quality ground truth lighting information is often challenging and requires using specialized hardware~\cite{reinhard:2010:high}. Prior work used a sphere metal ball to recover lighting information. Still, the resulting environment map can often show distortion and lower quality (compared to direct camera capture)~\cite{zhao2022litar}. In this work, we use the rendering results from the \emph{front-facing\xspace and (ultra-wide) back-facing\xspace cameras} as the basis to calculate the PSNR. To avoid the impact of non-virtual objects on the calculation, we only calculate the PSNR of rendered virtual sunglasses between different camera setups. For front-only and front+wide back-facing\xspace camera setups, we calculated the average PSNR of 25.70db and 27.05db, respectively. The results align with the visual appearances and indicate the lower qualities of the front-facing\xspace camera setup. To quantify the environment map's completeness, we used a metric from our prior work that calculates the environment observation coverage over uniformly sampled directions~\cite{xihe_mobisys2021}. Assume that the front-facing\xspace and back-facing\xspace wide cameras share the same origin and the image ratio of 4:3. This setup covers 22.81\% of the observation directions, 2.14x of using the front-facing\xspace camera only.Switching from the wide to the ultra-wide camera leads to 38.28\% direction coverage, 3.6x of using front-facing\xspace camera alone. \subsection{Evaluating the Performance of EnvMapNet} We evaluated EnvMapNet's ability to generate HDR environment maps for dual-camera setup (dual camera mask) by training the model following the hyper-parameters and training setting described in the paper~\cite{somanath-envmapnet}. The masks are generated assuming a 70$^\circ$ front-camera FoV and a 120$^\circ$ back-camera FoV. We constructed a dataset using 450 online free HDR environment maps and 2100 data items from the Laval HDR dataset~\cite{Gardner2017}. We observe that the dual-camera setup improves the average PSNR of predicted environment maps from 10.3db/11.7db (original/single camera mask) to 12.1db. Figure~\ref{fig:envmapnet} shows an example of visual comparisons. As we can see, even though dual-camera improves the prediction accuracy, the environment map details and light source directionalities are still inaccurate. \begin{table}[tb] \caption{ Battery usage for dual-camera streaming. \textnormal{ } } \vspace{-2mm} \label{tab:battery_measurement} \scriptsize \centering \begin{tabular}{llr} \toprule \textbf{Front-Facing\xspace (mins)} & \textbf{Back-Facing\xspace (mins)} & \textbf{Battery Usage} \\ \midrule 0 & 0 & <1\% \\ 10 & 0 & 2\% \\ 10 & 1 & 2\% \\ 10 & 3 & 3\% \\ 10 & 5 & 4\% \\ 10 & 7 & 5\% \\ 10 & 10 & 5\% \\ \bottomrule \end{tabular}\vspace{-5mm} \end{table} \subsection{Energy Consumption Measurement} Table~\ref{tab:battery_measurement} shows the relationship between various dual-camera streaming configurations and battery usage. For a 10-minute session, simultaneously streaming front-facing\xspace and back-facing\xspace cameras takes on average 5\% of total battery, 2.5x of capturing video using the front-facing\xspace camera alone. When reducing the back-facing\xspace camera capturing time to 3 minutes, the total battery usage drops to 3\%. This suggests that selectively turning on and off the back-facing\xspace camera when it is not needed can conserve battery. This observation provides an important insight for our adaptive dual-camera capturing policy design, as will be described in \S\ref{subsec:simultaneous_front_and_back_view_capturing}. Further, our testing app consumes 62.7MB of memory in the front-facing\xspace-only mode while using 78MB of memory when streaming with both cameras, a 24.4\% increase. Our empirical observation aligns with a recent work that leverages two back-facing\xspace cameras to remove face motion blur~\cite{lai-facedeblurring}. \begin{figure*}[t] \centering \includegraphics[width=0.9\linewidth]{assets/application_workflow.pdf} \caption{Example workflow. \textnormal{ Our proposed system fuses dual-camera images to generate high-quality environment maps (\S\ref{subsec:simultaneous_front_and_back_view_capturing}) by leveraging a controlled movement pattern (\S\ref{subsec:multi_frame_environment_map_reconstruction}) to stitch multi-view images and a parametric directional lighting model to improve the environment map's completeness and support correct color tone and shadow (\S\ref{subsec:parametric_directional_light_estimation}). } } \label{fig:applicaiton_workflow} \vspace{-3mm} \end{figure*} \section{Research Roadmap} \label{sec:research_roadmap} This section presents three key questions and promising designs for achieving a visually-coherent virtual try-on experience in \emph{a dual-camera AR system}, including reflection, accurate color tone, and shadow casting. Figure~\ref{fig:applicaiton_workflow} illustrates how solutions to these questions could improve the existing front-facing\xspace mobile AR workflow. \begin{itemize} \item \textbf{Q1:} How to efficiently increase the mobile device observation? The ideal solution should fully utilize the existing mobile hardware in an energy-conserving way. \item \textbf{Q2:} How to effectively fuse camera observations to generate an environment map? The ideal solutions should handle temporal visual data in a noisy environment. \item \textbf{Q3:} How to leverage learning-based models to estimate out-of-camera views and support shadow casting? The ideal solution should work nicely with dual-camera LDR image inputs. \end{itemize} \subsection{Dual-Camera Streaming Policies} \label{subsec:simultaneous_front_and_back_view_capturing} Based on our preliminary investigation that dual-camera streaming can increase the observation, but at the expense of mobile energy (\S\ref{sec:the_promise_of_multi_view_cameras}), we propose to regulate the back-facing\xspace camera usage by \emph{time and mobility} to conserve energy. Our proposed two policies are extended from our recent work LitAR's noise-tolerant data capturing policies for back-facing\xspace AR~\cite{zhao2022litar} and are inspired by the adaptive policy from Lai et al. for deblurring~\cite{lai-facedeblurring}. First, we propose to use a simple timer-based policy to turn on and off the back-facing\xspace camera to capture potential environmental changes. The timer starts at a larger interval $w$, e.g., more than the rendering interval of 33 ms, and will be adjusted based on observed changes. Once the back-facing\xspace camera is on, we will stream for $w$ before turning it off to mitigate the tail energy phenomenon~\cite{Huang2012-yq}. We will decrease the timer interval by half if we observe sufficient environmental changes, indicating a more dynamic scene, over the capturing window. We could effectively determine the change between two consecutive images with metrics such as SSIM or PSNR. If little change is observed, we will gradually increase the timer interval. This policy is similar to the additive increase/multiplicative decrease algorithm. Second, we propose to leverage the inertial measurement unit (IMU) sensor data to trigger \emph{early capturing} when significant device movement is detected. To avoid capturing images with an undesirable visual artifact, e.g., motion blur, the back-facing\xspace camera will only start streaming once the mobile device is stable. Every motion-triggered capturing will reset the timer. \subsection{LDR Environment Map Generation} \label{subsec:multi_frame_environment_map_reconstruction} Obtaining 360$^{\circ}$ HDR images for visually coherent lighting rendering is a challenging task for mobile AR. Even with the dual-camera streaming strategies described above, obtaining the 360$^{\circ}$ HDR environment map is still challenging because modern mobile cameras only have limited pixel intensity range support. Consequently, we propose to use LDR environment maps and parametric directional lighting model (\S\ref{subsec:parametric_directional_light_estimation}) to approximate the HDR environment maps. This section describes our proposal to leverage guided user movement to combine multi-view images (both front-facing\xspace and back-facing\xspace) to generate LDR environment maps. \para{Image-Based Stitching Via Face Tracking.} We propose a simple and lightweight component to exploit device mobility and the dual-camera streaming feature to obtain high-quality device pose tracking data and generate high-quality environment maps. The key idea is to use a controlled movement pattern and leverage the user's faces in front-facing\xspace camera images to establish \emph{a shared anchor point}, which can then be used as the reference for tracking device poses across frames. Our design is driven by the advancement of 3D face modeling research. Using face geometry and camera parameters estimation models, e.g. MediaPipe\footnote{\url{https://mediapipe.dev}} face mesh~\cite{grishchenko2020attention}, we could obtain the relative pose of the camera to the user's face. To combine multi-frame camera images, we propose to use the user's face as a shared anchor point by asking the user to fix their head pose during capturing. To ease the user experiences, we propose to design an onscreen instruction for guiding the users to keep their head static while moving the mobile device along the trajectory of the great circle (with the radius of the user's arm length)\footnote{Guided movement is a common design for mobile applications such as taking panorama~\cite{kan2015interactive}.}. Figure~\ref{fig:applicaiton_workflow} illustrates the idea of controlled movement. We only ask the user to perform this guided movement at the app launch time and when significant movement is detected while using the app. \para{Stitching Image Views for Environment Maps.} To leverage the additional environment observations for improving reflection rendering quality, we first stitch the front and back camera images into a partial 360$^\circ$ environment map. Specifically, we assume the front-facing\xspace and back-facing\xspace cameras share the same origin and map the camera image pixels to an environment map based on camera physical parameters and the pinhole camera model~\cite{wiki-pinholecamera}. To bootstrap the user experiences when the AR application starts, we initialize the environment map data from the guided control movement at the beginning of the try-on app. During application usage, we progressively update the environment map using image feature matching methods, e.g., \cite{harris1988combined}, and merge new back-facing\xspace camera images into the reconstructed environment map. For front-facing\xspace camera image, as the user's head pose and facial expressions might change during the app usage, we propose to only use the current frame for environment map reconstruction. \para{Analysis of Environment Observation.} We present an analysis of the environment observation increase when combing multi-frame images. To test the observation increase, we manually created a setup in Blender with 3 back-facing\xspace camera images, each with 120$^{\circ}$ FoV. We set the image pose along a horizontal movement trajectory to simulate a $\pm$30$^{\circ}$ movement. We used the same observation coverage measurement metric as in \S\ref{sec:the_promise_of_multi_view_cameras} and found that the environment observation can be increased to cover 50\% directions, 1.3x of using one back-facing\xspace camera image alone. \subsection{Parametric Directional Light Estimation} \label{subsec:parametric_directional_light_estimation} HDR environment maps are commonly used for rendering shadows of virtual objects. However, directly reconstructing 360$^{\circ}$ HDR environment maps requires prolonged user engagement for scanning and can be prone to quality issues. Furthermore, our prior work shows that using learning-based models to inpaint camera views to 360$^{\circ}$ HDR environment maps can be highly inaccurate for complex real-world indoor scenes~\cite{zhao2022litar}. To address these limitations, we propose to approximate the HDR environment maps by combining reconstructed LDR environment maps and estimated parametric directional lights. At a high level, our proposed directional light estimation model will work in tandem with the environment map reconstruction pipeline described in previous sections. The estimation model will improve the prediction of the color tone and the completeness of the environment map, as well as supporting shadow rendering. Specifically, we propose to extend the estimation model~\cite{legendre-facelight} to use the back-facing\xspace camera images to improve the lighting color estimation accuracy. We expect that this design will improve the estimation accuracy of the environment color even when unseen objects or unnatural environmental lighting appear in the image. This is because back-facing\xspace camera images greatly enriches the environment lighting information in the input data, leading to more accurate light color estimation. Besides parametric directional lights, our estimation model also outputs a low-resolution environment map. We plan to use the estimated environment map to fill unseen regions on the reconstructed environment map. This design will further improve the reflection rendering and overall color tone accuracy. As the reconstructed environment map is refined progressively during AR app usage, we expect the completeness of the environment map and directional light color to also be improved. \section{Related Work} \label{sec:realted_work} \para{Lighting Estimation.} Recent deep learning-based work has investigated recovering lighting information in both outdoor and indoor scenes~\cite{Garon2019}, leverages images of arbitrary scenes, portraits~\cite{legendre-facelight}, and shadows~\cite{liu2020arshadowgan}. Although DL-based approaches can often deliver good visual appearances, they require training on large datasets with the lighting ground truth and can have a longer than hundreds of milliseconds inference time~\cite{zhao2020pointar}. Prior mobile-oriented work, including our own~\cite{xihe_mobisys2021,zhao2022litar}, addressed the above two issues by either forgoing the DL route~\cite{prakash2019gleam,zhao2022litar} or exploring the advancement in the mobile camera system for the back-facing\xspace mobile AR applications~\cite{cheng2018learning,xihe_mobisys2021,somanath-envmapnet}. Our proposed work combines a promising set of existing lighting estimation techniques to deliver tailored experiences for mobile AR try-on applications. \para{Virtual Try-On Applications.} Recent work on virtual try-on has demonstrated good progress in overlaying clothes on a human body with little deformation and correct occlusion~\cite{meng2010interactive}. Earlier work on image-based try-on takes two inputs, images of a person and the desired clothes, and generates a new image where the same person is now wearing the desired clothes~\cite{han2018viton}. Other fashion items, such as shoes, cosmetics, and glasses, have recently received more attention~\cite{kim2008adoption}. For example, ARShoe proposed a real-time mobile AR-based shoe try-on system~\cite{an2021arshoe} that improved upon PIVTONS~\cite{chou2018pivtons}. Despite the growing interest in virtual try-on applications, very few works address the visual coherency of the rendered fashion items, which is the focus of our work. \para{Multi-Camera Mobile System.} To address the limitation of low FoV associated with a single camera, several works have proposed to fuse the inputs from multiple cameras to improve the quality of lighting estimation. GLEAM supported an optional feature that allows different mobile devices (hence cameras) to share lighting information~\cite{prakash2019gleam}. Li et al. proposed to use a $360^{\circ}$ panoramic stereo installed in the targeted indoor scene to estimate the scene properties, including lighting~\cite{li2021lighting}. Multi-camera systems have also been proposed for other tasks, such as removing face blurs~\cite{lai-facedeblurring} and estimating depth~\cite{zhang20202}. Our proposed work shares the key idea of leveraging multiple cameras to increase the scene observations but tackles three unsolved challenges for front-facing\xspace mobile AR. \section{Conclusion} \label{sec:conclusion} Lighting estimation has attracted a lot of attention over the past few years to improve the realism and visual details of AR apps~\cite{zhao2020pointar,Garon2019,Gardner2017,xihe_mobisys2021}. In this paper, we aim to bring photorealism to front-facing\xspace mobile AR try-on apps, a promising method for empowering consumers with a try-before-purchase experience in e-commerce. Our proposed techniques take inspiration from our prior work in lighting estimation~\cite{zhao2020pointar,xihe_mobisys2021,li2021lighting,legendre-facelight} and will address the unique challenges in front-facing\xspace mobile AR. Two baselines we plan to compare against include dual-camera LitAR and EnvMapnet, variants based on their single-camera designs~\cite{zhao2022litar,somanath-envmapnet}. We expect the first baseline to generate lower-quality environment maps and does not support shadow and the second baseline to output environment maps that do not match the physical environments. We believe the key idea of employing multi-camera can open many interesting directions for mobile AR applications. This paper focuses on a specific case of front-facing\xspace and back-facing\xspace dual-camera streaming to improve lighting understanding. Our proposed techniques could also benefit other deployment scenarios, such as dual back-facing\xspace cameras and edge-based $360^{\circ}$ cameras. As the number of cameras increases, obtaining high-quality environment maps will become easier via coordinated streaming. However, questions regarding the energy and quality trade-offs remain unclear and need to be studied further. \begin{acks} We thank the anonymous reviewers for their constructive reviews. This work is partly supported by NSF Grants CNS-1815619, NGSDI-2105564, CNS-2236987 and VMWare. \end{acks} \balance \scriptsize{ \bibliographystyle{ACM-Reference-Format}
{'timestamp': '2023-01-18T02:13:51', 'yymm': '2301', 'arxiv_id': '2301.06143', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06143'}
arxiv
\section{Introduction} \label{Ch:introduction} \acrfull*{iot} has become a central focus in the technology industry, with the development of smart devices that collect and exchange data over the internet. These devices, including sensors, actuators, and other \gls*{iot}-enabled technologies, are used for a variety of purposes such as analysis, processing, and automation. It is estimated that there will be approximately 75 billion \gls*{iot} devices in use by 2025 \cite{nord2019}. The use of \gls*{iot} technology has expanded into various fields including smart energy, industrial factories, transportation, and home automation. However, the widespread integration of \gls*{iot} systems in our daily lives also leads to an increase in the amount of data being collected and exchanged over the internet, raising concerns about scalability and the protection of sensitive and private data. Many \gls*{iot} systems rely on centralised architectures, which process and perform security operations on the cloud \cite{kouicem2018}. These architectures have limitations such as scalability, transaction speeds, interoperability, and privacy/security \cite{farahani2021}, and may also be a single point of failure in the event of a breach. Centralised servers that manage keys and act as a single trust authority can pose a significant security risk to other devices on the network, as these keys often form the foundation of security systems, cryptography algorithms, and device authentication/verification \cite{kouicem2018}. To address these issues, distributed infrastructures have emerged, allowing modern \gls*{iot} edge devices to perform their own processing and transmit data at the edge. These devices feature robust security mechanisms for secure authentication and secret key storage, which can be used for encryption in a secure, hardware-enforced manner to improve end-device security for \gls*{iot} systems and data integrity \cite{johnson2015}. \acrfull*{fpga} offer such security features through the use of programmable logic and reconfigurability after manufacturing. This reconfigurability allows devices to be updated in order to keep up with the constantly evolving technology landscape and emerging security threats. The main contribution of this article is the development and implementation of a secure, efficient, and reconfigurable surveillance and monitoring \gls*{iot} system using dedicated hardware. By utilising the \acrfull*{mpsoc}'s \acrfull*{pl} to securely store and authenticate a symmetric key, the proposed system improves the security and integrity of data transmitted from an edge device. Additionally, the use of \glspl*{mpsoc} allow the edge device to simultaneously publish and route a camera stream using a lightweight communication protocol, achieving a high capture rate. The proposed system addresses many of the challenges faced by current \gls*{iot} systems, including scalability, security, and efficiency. The remainder of this article is organized as follows: relevant literature and related works to the proposed \gls*{iot} system proposed in this article is reviewed in Chapter \ref{Ch:lit_rev}, the methodology used to develop and implement the proposed system is described in Chapter \ref{Ch:methods}, the results and analysis of the proposed system are presented in Chapter \ref{Ch:results}, and finally, the conclusion and future work are discussed in Chapter \ref{Ch:concl_future}. \section{Related Work}\label{Ch:lit_rev} The \gls*{iot} is a technology that aims to provide an infrastructure for applications that can coordinate the interaction of people, things, and systems for a specific purpose \cite{wortmann2015}. These applications do not necessarily have a universally adopted standard, but the architectural model of an \gls*{iot} system typically consists of three main layers: the perception layer, which uses sensors and microcontrollers to perceive the physical environment; the communication or network layer, which processes and transports data; and the application layer, which uses the data to deliver application-specific services to the user \cite{nord2019}. The communication/network layer uses various technologies to package and transmit data due to the processing and bandwidth restrictions of many \gls*{iot} devices. \gls*{http}, which is commonly used for communication between devices on the internet, is not suitable for low-powered \gls*{iot} devices due to its fully connection-oriented architecture, large header size, and latency \cite{patel2020, ref1}. Established communication protocols that are more suitable for these power and bandwidth-restricted \gls*{iot} requirements include \gls*{coap}, \gls*{mqtt}, and \gls*{xmpp}. Corak et al. \cite{corak2018} evaluated and compared the performance of these protocols in a real-world \gls*{iot} testbed. The metrics considered were packet creation time and packet delivery speed to determine the delay differences. The study found that \gls*{xmpp} had the worst performance due to its use of \gls*{xml} format, which increased latency. \gls*{mqtt} and \gls*{coap} had similar overall performance in terms of packet creation and transmission time, but \gls*{mqtt} was found to be more optimized and standardised. Van der Westhuizen and Hancke \cite{van2018} conducted a more in-depth comparison between \gls*{coap} and \gls*{mqtt} to determine which was the most suitable for use with constrained devices, specifically sensors. The comparison considered communication delay and network traffic. Both protocols were found to be good choices for resource-constrained devices, with similar performance and response times. However, the most suitable protocol depended on the overall requirements of the system. \gls*{coap} was found to be the optimal choice for interfacing with business systems, due to its small average packet sizes and minimal battery/data usage. \gls*{mqtt}, on the other hand, was found to be the preferred solution for systems such as home automation and sensor networks, where device heterogeneity is more pronounced. \gls*{mqtt} was easier to configure for new devices and had the most effective data flow thanks to its publish/subscribe model and use of \gls*{qos}. Edge computing is a network architecture that involves processing sensory (e.g. visual data) data closer to the source, rather than on the cloud \cite{khan2019}. This allows for fast processing and efficient handling of data intensive operations in real-world scenarios such as the \gls*{iot}. While edge computing can offer benefits for \gls*{iot} systems, there are also limitations in terms of security. Khan et al. \cite{khan2019, ref2} found that further development is needed in areas such as authentication and access control, and that tamper-proof architectures may be one solution to addressing these security issues. However, securing large scale and time-critical \gls*{iot} systems can also be challenging due to the cost of methods such as encryption in terms of latency, energy consumption, and network bandwidth \cite{mohanty2020}. Additionally, the heterogeneity of devices that communicate across these networks without a well-established protocol can also pose challenges \cite{nord2019}. Fortunately, professionals in the field are working to overcome these limitations and improve the safety and efficiency of communication between \gls*{iot} devices. \glspl*{fpga} are specialised hardware devices that have gained popularity in the edge computing space due to their ability to solve problems through reconfigurable hardware circuits. These circuits can be described using \gls*{hdl} such as Verilog and \gls*{vhdl}, and are made up of various logic units such as look-up tables, flip-flops, and multiplexers. \glspl*{fpga} offer several benefits for security, parallel computing, and flexibility to update hardware designs after deployment \cite{elnawawy2019, ref3, ref4}. They have also been advanced through the use of \gls*{soc}, which integrate programmable logic with real-time processors. An example of this is the AMD-Xilinx Zynq Ultrascale+ \gls*{mpsoc}\footnote{Available online, \protect\url{https://www.xilinx.com/products/silicon-devices/soc/zynq-ultrascale-mpsoc.html}, last accessed 07/01/2023}, which includes an \gls*{arm} \gls*{cpu}, programmable logic, and units for graphics and video processing. While \glspl*{fpga} and \glspl*{soc} have similarities with microcontrollers, \glspl*{fpga} offer advantages in physical and cybersecurity through encrypted bitstreams and key loading mechanisms, and can act as a \gls*{rot} by holding security private keys and critical algorithms. \glspl*{fpga} also show greater efficiency in processing algorithms for image processing and video transcoding due to their parallel computing capabilities. While \glspl*{fpga} offer significant advantages for \gls*{iot}, they are considered complex due to the low-level hardware knowledge required, such as \gls*{vhdl} and Verilog. To address this, \gls*{fpga} vendors have been promoting the use of high-level design flows and tools that allow for the creation of \gls*{rtl} designs using high-level languages like C, C++, System C and \gls*{opencl}. However, the question remains as to how well these high-level designs compare to manually written \gls*{rtl} designs in terms of optimisation. Guo et al. \cite{guo2017} discussed that while \gls*{hls} may not be as optimized as manually written \gls*{rtl} designs for complex designs, the use of directives like loop unrolling and loop merging and pipelining can significantly improve resource utilisation, reduce latency, increase resource sharing, and optimize logic for video processing algorithms. These findings suggest that \gls*{fpga} technology can be more accessible to designers without strong low-level hardware knowledge, while still maintaining good performance. In summary, the reviewed articles have demonstrated the various considerations and challenges faced in the design and implementation of an \gls*{iot} system. Communication protocols such as \gls*{mqtt} and \gls*{coap} have been shown to be effective in resource constrained environments, but the choice between them ultimately depends on the specific requirements of the system. Edge computing has the potential to improve the efficiency and security of \gls*{iot} networks, but also comes with its own limitations that require further development. \gls*{fpga} technology offers advanced security and parallel processing capabilities for \gls*{iot}, but can be complex to implement. High level synthesis tools, such as the AMD-Xilinx Vivado \gls*{hls}\footnote{Available online, \protect\url{https://www.xilinx.com/support/documentation-navigation/design-hubs/dh0090-vitis-hls-hub.html}, last accessed 07/01/2023}, have been shown to improve the productivity and performance of \gls*{fpga} designs for real time image processing applications, but may not always be as optimised as manually written designs. These findings highlight the importance of carefully evaluating the various technologies and approaches available for a particular \gls*{iot} system in order to ensure optimal performance and security. \section{Methods}\label{Ch:methods} The proposed \gls*{iot} system utilises the \acrfull*{ultra96} equipped with a powerful AMD-Xilinx Zynq UltraScale+ \gls*{mpsoc} ZU3EG\footnote{Available online, \protect\url{https://www.xilinx.com/content/dam/xilinx/imgs/products/zynq/zynq-eg-block.PNG}, last accessed 07/01/2023} device as the main processing system at the perception layer. The performance of the \gls*{ultra96} was compared to a \acrfull*{njn} and a \acrfull*{rpi4} under the same testing conditions. To establish a fair comparison, each processing device (i.e. \gls*{ultra96}, \gls*{rpi4} and \gls*{njn}) runs an \gls*{mqtt} client to publish data from its connected \gls*{usb} webcam to an \gls*{mqtt} broker, which acts as an intermediary to route the data to interested parties. The camera feed is then displayed on a Node-RED\footnote{Available online, \protect\url{https://nodered.org/}, last accessed 07/01/2023} dashboard at the application layer for subscribers to view. The use of \gls*{mqtt} and the Node-RED dashboard allows for efficient and flexible communication and data management within the system. The system also implements security measures, such as bitstream authentication, to protect against potential attacks. Overall, the proposed \gls*{iot} system utilises a variety of technologies to coordinate the interaction of people, things, and systems for a specific purpose (see Figure~\ref{fig:arch}). \begin{figure}[] \centering \includegraphics[scale=0.5]{figures/ArchFlow.png} \caption{Architecture Diagram} \label{fig:arch} \end{figure} The Avnet \gls*{ultra96}, which is powered by an AMD-Xilinx Zynq UltraScale+ \gls*{mpsoc} device that combines an \gls*{arm} processor and \gls*{fpga}. The \gls*{ultra96} is energy efficient and performs well due to designated processors being responsible for specific tasks. The \gls*{ps} in the AMD-Xilinx Zynq UltraScale+ \gls*{mpsoc} runs an \gls*{arm}64v8 Linux environment for running a web server while also interfacing with the programmable logic via the \gls*{axi4} for user authentication and on-field reconfigurability. \gls*{arm}64v8 is a version of the \gls*{arm} architecture that supports 64-bit instructions. It is used in some 64-bit \gls*{arm} processors, such as those used in the Avnet \gls*{ultra96}. The \gls*{njn}\footnote{Available online, \protect\url{https://developer.nvidia.com/embedded/jetson-nano-developer-kit}, last accessed 15/01/2023} is a small, powerful computer designed for use in image and video processing applications. It is powered by a quad-core \gls*{arm} Cortex-A57 \gls*{cpu} and a 128-core NVIDIA Maxwell \gls*{gpu}, running on an \gls*{arm}64v8 Linux environment. Programming the \gls*{njn} is typically done using the \gls*{njpsdk}, which includes a Linux-based development environment and a variety of software libraries for working with the \gls*{cpu} and \gls*{gpu}. \gls*{opencv} compiled with the CUDA library was used to achieve maximum performance when processing visual data. The \gls*{rpi4}\footnote{Available online, \protect\url{https://www.raspberrypi.com/products/raspberry-pi-4-model-b/}, last accessed {15/01/2023}} is a low-cost, single-board computer designed for educational and hobbyist use. It is powered by a Broadcom BCM2711, quad-core Cortex-A72 (\gls*{arm}v8) 64-bit SoC @ 1.5GHz and runs on a Linux-based operating system, typically Raspbian. \gls*{opencv} was used to achieve maximum performance when processing visual data. The \gls*{rpi4} is known to be cost-effective solution but with lower frame rate compared to other devices. The \gls*{iot} system was not initially configured with any software or input sensors, so a USB webcam was connected to the \gls*{usb} 3.0 Type A port to capture the camera feed. The Micro-B upstream port was used to connect to a host workstation on the same local network, although the board also supports WiFi connectivity. The \gls*{usd} Card Slot was used to boot the device with a \gls*{usd} card containing either a PYNQ image for the \gls*{ultra96}, . PYNQ is an open-source framework that allows developers to use Python to program AMD-Xilinx \gls*{fpga} devices. It is designed to be used in embedded systems and provides a set of libraries, drivers and Jupyter notebooks to enable easy programmability of \glspl*{fpga} through high-level programming languages like Python. This setup allows for the physical connection and control of the camera feed, which can be streamed in the proposed system. \subsection{PYNQ Framework} Booting the device required software to be loaded onto an SD card, in order to leverage the security and parallel hardware execution benefits of the Ultra92-V2 programmable logic, the approach was to use the PYNQ Framework version 2.6 \footnote{Available online, \protect\url{http://www.pynq.io/}, last accessed: 05/05/2022} Framework. This platform features a Linux operating system, along with the Python software package and a Jupyter\footnote{Available online, \protect\url{https://jupyter.org/}, last accessed: 05/05/2022} web server for developing solutions on the board for rapid on-field development and reconfigurability over a network. This image should be flashed onto a \gls*{usd} card with a capacity of at least 16GB and inserted into the board. Once the board was loaded with the boot image, it could be powered on by connecting the power supply and pressing the button labelled SW4. By connecting a USB Micro-B cable to a host PC, the board will be reachable on the local network, alternatively a WIFI connection can also be set up. By default, the board uses the IP address of 192.168.3.1, from this address the Jupyter web server can be reached locally. \subsection{CUDA} To develop and execute various components which run on the board, there are prerequisites that should be installed during the setup phase. \gls*{opencv} version 4.5.1\footnote{Available online, \protect\url{https://opencv.org/}, last accessed: 05/05/2022} for Python is used to retrieve frames from an input device, such as a webcam or IP camera. NumPy version 1.16.0\footnote{Available online, \protect\url{https://numpy.org/}, last accessed: 05/05/2022} is also used within the Jupyter notebook to manipulate data structures, such as arrays. This was used to read and write user's credential files. An \gls*{mqtt} broker should also be installed to route the data between publisher and subscribers, so the Mosquitto-\gls*{mqtt} version 1.4.15 \footnote{Available online, \protect\url{https://mosquitto.org/}, last accessed: 05/05/2021} was installed from Ubuntu's open-source universe repository. Finally, to create an \gls*{mqtt} client to publish the stream from the embedded processing system, the Paho-\gls*{mqtt} \footnote{Available online, \protect\url{https://pypi.org/project/paho-mqtt/}, last accessed: 05/05/2022} Python package was installed. At this point, all the prerequisites to develop and execute the system are in place on the PYNQ Linux environment. A detailed list of the tools and equipment used in the system can be found in Table \ref{tab:equip}. \begin{longtable}{ |p{3.4cm}|p{2.2cm}|p{4.7cm}| } \caption{List of equipment and tools}\label{tab:equip}\\ \hline Resource&Type&Description\\ \hline Anvet \gls*{ultra96}&Equipment&System on Chip device for authenticating user key and running the various components of project\\ \hline \gls*{njn}&Equipment&Embedded system capable of achieving higher frame rates and running the various components of project\\ \hline \gls*{rpi4}&Equipment& Low cost embedded system, equipped with 2GB of DDR, ideal for reducing the costs and running the various components of project\\ \hline Full HD 1080p Web Camera&Equipment&Camera used to capture environment for smart camera \\ \hline Vivado \gls*{hls} 2020.1&Development Tool&AMD-Xilinx tool used for creating custom authentication \gls*{ip} core\\ \hline Vivado 2020.1&Development Tool&AMD-Xilinx tool used for creating hardware design and generating the secure bitstream\\ \hline PYNQ&Framework&Framework for booting the \gls*{ultra96} board with Ubuntu 18.04 and interfacing with the programmable logic\\ \hline OpenCV&Library&Library used to capture input streams, such as camera and online video stream\\ \hline NVIDIA CUDA 11&Development Tool&NVIDIA tool used for accelerating the video streaming using CUDA \gls*{ip} cores\\ \hline NumPy&Library&Various array manipulation functionalities and for saving/reading the user credentials file\\ \hline Paho \gls*{mqtt}&Library&Used to create an \gls*{mqtt} client on the \gls*{ultra96} to publish the camera stream to a topic\\ \hline Mosquitto-\gls*{mqtt}&Software&Used to run a \gls*{mqtt} broker which listens to client publishing to manage and route to the correct subscribers\\ \hline Node-RED&Development Tool&The application layer is created using Node-RED to create a \gls*{iot} flow\\ \hline PuTTY&Terminal Emulator&An emulator which has built in protocols such as SSH to connect to the \gls*{ultra96}\\ \hline \end{longtable} \subsection{Designing the Secure Bitstream of the \gls*{ultra96}} To secure the system, a bitstream file was created to provide confidentiality through a 256-bit secret key and method of authentication. The key is described in the \gls*{fpga} logic and is embedded within the \gls*{fpga} unit, allowing the system to securely store the key and prevent it from being exposed in the RAM. Additionally, the system uses a public key and private key pair for authentication. The public key is used to encrypt a message and the private key is used to decrypt it. In this case, the public key is used to encrypt the authentication message and the private key embedded in the \gls*{fpga} is used to decrypt it. This ensures that only authorised devices with the correct private key can access the system and the camera stream, providing an extra layer of security to the system. This file, which is a hardware description of the \gls*{fpga} and cannot be easily read or reverse engineered, was created using the AMD-Xilinx Vivado Design Suite. The High Level Design flow was used to develop the hardware design at a higher level of abstraction using C/C++ code, which was then converted into optimized \gls*{rtl} code by a compiler. Custom Intellectual Property cores were also included in the design and interfaced with via the PYNQ framework to run on the \gls*{ultra96} programmable logic. The process of building the authentication \gls*{ip} core begins with using AMD-Xilinx Vivado \gls*{hls} \footnote{Available online, \protect\url{https://www.xilinx.com/products/design-tools/vivado.html}, last accessed: 05/05/2022} software. Using the \gls*{hls} software, the top level function was written in C containing a secret key, authentication method to compare the valid key with the input key, along with the required I/O ports for the \gls*{pl} to interface with the \gls*{ip} block. In this case there were two ports, one of which was the key with a size of 256-bits and the other being the authentication result which was a single bit boolean value to represent whether the input key was valid or not. Due to the size of these ports being relatively small, the AXI4-Lite protocol was utilised for the \gls*{ultra96} processing system to interface with the \gls*{ip} block, as this is generally a suitable design choice for smaller data transfers. To optimise the design, various loop and array optimisation directives were tested in the hope to reduce the estimated clock time and maximum clock cycles. By using the pipeline \textit{Pragma} in the loop to compare the keys, the maximum clock cycles was reduced from 64 to 34. This directive works by reducing the initiation interval for the loop by allowing concurrent execution of the operations. To verify the output of the top level function a test bench was written, this test bench was used by the \gls*{hls} tool during C simulation, synthesis and C/\gls*{rtl} co-simulation to validate that the produced \gls*{rtl} was functionally identical to the C code that was written and therefore confirming that the \gls*{ip} is working as intended to be packed and exported. The timing and latency summary for the \gls*{ip} is presented in Figure \ref{fig:timing}. \begin{figure}[] \centering \includegraphics[scale=0.65]{figures/hardware_performance.PNG} \caption{Timing and latency summary} \label{fig:timing} \end{figure} To verify the functionality of the custom \gls*{ip} block, a test bench was written in C. This test bench was used by the \gls*{hls} tool during C simulation, synthesis, and C/\gls*{rtl} co-simulation to validate that the produced \gls*{rtl} was functionally identical to the C code, and therefore confirm that the \gls*{ip} was working as intended. Once the custom \gls*{ip} block was exported, it could be used as part of the wider system by importing it into the AMD-Xilinx Vivado Design Suite. This tool has an \gls*{ip} Integrator, which was used to build the hardware design by integrating the custom \gls*{ip} block with \glspl*{ip} available in the AMD-Xilinx's \gls*{ip} catalogue. A block diagram, shown in Figure \ref{fig:ip}, was generated using the Vivado Tool, containing the Zynq UltraScale+ \gls*{mpsoc} block, which represents the processor of the \gls*{ultra96} and configures clocks, peripherals, and other settings. To transfer the authentication data between the PS and the custom \gls*{ip}, a single memory-mapped \gls*{axi} master and \gls*{axi} slave Interconnect was included. The reset signals were handled by the Processor System Reset \gls*{ip} block. The custom \gls*{ip} block was integrated into the wider system using the AMD-Xilinx Vivado Design Suite. The \gls*{ip} Integrator tool was used to build the hardware design by combining the created \gls*{ip} block with \glspl*{ip} available in the AMD-Xilinx catalogue. The design was then simulated, synthesized, and implemented to generate a bitstream. The bitstream, .hwh file, and driver file were transferred to the \gls*{ultra96} device to be imported using the PYNQ Overlay class. This process allows for the custom \gls*{ip} block to be used in the system to provide secure authentication. The \gls*{ip} block is lightweight and only uses a small portion of the programmable logic resources on the device. \begin{figure}[] \centering \includegraphics[scale=0.3]{figures/ip_integrator.PNG} \caption{\gls*{ip} Integrator Block Design} \label{fig:ip} \end{figure} The \gls*{ip} block is lightweight and only uses a small portion of the programmable logic resources on the device. Figure \ref{fig:ip_resource} shows the resource utilisation. \begin{figure}[H] \hspace*{-1cm} \centering \includegraphics[scale=0.5]{figures/hardware_resources.PNG} \caption{\gls*{ip} Resource utilisation} \label{fig:ip_resource} \end{figure} PYNQ is accessed through a local Jupyter web server at 192.168.3.1. It allows the execution of Python packages and libraries on the \gls*{ultra96} board. The PYNQ Overlay class can be used to view and interface with the PL of the \gls*{ultra96} using the previously created bitstream and default overlay driver to access the IP's ports configured in the drivers file. The authentication result is retrieved using three specific addresses: the start control signal (0x000), the offset of the input key port (0x080), and the offset of the data out port (0x100). The user's symmetric key can be loaded into the input key port a 4-byte integer at a time. The start control signal is set to high to start the \gls*{ip} and the authentication output is read from the data out port. If the key is valid, the camera is initialized and published to the \gls*{mqtt} broker. The \gls*{mqtt} broker was configured to automatically start on boot and run on localhost with the port 1883. \gls*{opencv} and Paho-\gls*{mqtt} were also imported for use in capturing and publishing the camera stream. A configuration file was placed on the device to define system parameters such as camera settings, \gls*{mqtt} settings, and the path to the credentials file. This file allows the user to easily update system parameters without requiring knowledge of the system. The data visualisation at the application layer was the final component for the project. This layer is responsible for connecting the clients or subscribers to the \gls*{mqtt} broker and displaying the secured camera feed. Node-RED is a browser-based editor, where flows can be built using a catalogue of nodes to fit custom \gls*{iot} requirements. Additional nodes can also be installed via node package manager. This tool was chosen for the project due to being open source and high productivity, where additional nodes can be quickly inserted into the flow and deployed instantly. The flow that was designed consisted of an \gls*{mqtt} input node, which is configured to the \gls*{mqtt} broker running on the host workstation. This node receives the message payload from the broker as a base64 string and then passes this into an HTML image template, which is finally connected to a dashboard widget template where it is displayed automatically. Once this flow is deployed, the dashboard can be accessed on the local network at the URL 127.0.0.1:1880/ui. The designed flow is shown in Figure \ref{fig:node_red_flow}. \begin{figure}[H] \centering \includegraphics[scale=0.5]{figures/Node-REDflow.PNG} \caption{Node-RED Flow} \label{fig:node_red_flow} \end{figure} \section{Results}\label{Ch:results} The aim of this project was to build a flexible and reconfigurable edge device that could protect the integrity of data within a surveillance and monitoring \gls*{iot} system. To achieve this, a secure authentication mechanism was implemented to guarantee that the edge device could only publish the camera stream when data integrity and authenticity could be assured. This was accomplished by concealing a 256-bit secret key and method of authentication inside a bitstream file, which is the hardware description of an \gls*{fpga} and is difficult to reverse engineer due to being a stream of bits that only describe the hardware logic itself. This provided the necessary confidentiality to protect the key. The proposed system was tested under the same conditions on the \gls*{ultra96}, \gls*{njn} and \gls*{rpi4} to ensure that each version of the \gls*{iot} device delivered the expected functionality and behaviour. Several tests focused on the integration of the \gls*{ip} within the overall system were carried out to ensure that the system is working as intended. This involved testing the end-to-end process of capturing the camera stream, publishing the data over \gls*{mqtt}, and displaying the stream on the dashboard. These tests were carried out by setting up the Ultra96 board, NJN and RPI4 with the boot image and prerequisites, importing the bitstream, and running the python script to capture and publish the camera data. The Node-RED flow was then set up, and the dashboard accessed to verify that the stream was being displayed as expected on all devices. Additionally, the system was tested under various scenarios such as using the correct key, using an incorrect key, and attempting to access the stream without providing a key, to ensure that the system was functioning as intended and that the authorisation process was secure (see Figure \ref{fig:auth_ip_unit_tests}). These tests were important to ensure that the \gls*{ultra96}, \gls*{njn} and \gls*{rpi4} provide optimal solution, balanced frame rate and secure key storage. It is clear from Table~\ref{tab:result1} that the hardware implementation (i.e. \gls*{ultra96}) had the same performance has the software implementation (i.e. \gls*{njn} and \gls*{rpi4}) but without exposing the private key into the \gls*{ram}. \begin{figure}[] \centering \includegraphics[scale=0.6]{figures/Unit_tests.PNG} \caption{Authorisation \gls*{ip} Unit Tests} \label{fig:auth_ip_unit_tests} \end{figure} \gls*{ultra96}, the top level function was written in C, containing the secret key and authentication method to compare the valid key with the input key, along with the required I/O ports for the \gls*{ps} to interface with the \gls*{ip} block. The \gls*{axi4}-Lite protocol was used for the \gls*{ultra96} processing system to interface with the \gls*{ip} block, as it is suitable for smaller data transfers. To optimize the design, various loop and array optimization directives were tested to reduce the estimated clock time and maximum clock cycles. By using the pipeline \textit{Pragma} in the loop to compare the keys, the maximum clock cycles was reduced from 64 to 34. \begin{table}[htb!] \caption{Authentication process (number of attempts) per each processing system} \label{tab:result1} \centering \begin{tabular}{lcccccc}\hline Tests & \multicolumn{2}{l}{\gls*{rpi4}} & \multicolumn{2}{l}{\gls*{njn}} & \multicolumn{2}{l}{\gls*{ultra96}} \\\hline \hline Correct Key & 10 & & 10 & & 10 & \\ Invalid Key & 5 & & 5 & & 5 & \\ Incomplete Key & 7 & & 7 & & 7 & \\ Empty Key & 4 & & 4 & & 4 & \\ Wrong key & 6 & & 6 & & 6 & \\\hline Successful authentications & 10 & & 10 & & 10 & \\ Unsuccessful authentications & 22 & & 22 & & 22 & \\\hline \end{tabular} \end{table} To verify the output of the top level function, in the \gls*{ultra96}, a test bench was written and used by the \gls*{hls} tool during C simulation, synthesis, and C/\gls*{rtl} co-simulation to validate that the produced \gls*{rtl} was functionally identical to the C code and that the \gls*{ip} was working as intended. Once the custom \gls*{ip} block was exported, it could be used as part of the wider system by importing it into the AMD-Xilinx Vivado Design Suite. This tool has an \gls*{ip} Integrator, which was used to build the hardware design by integrating the created \gls*{ip} block with \glspl*{ip} from the AMD-Xilinx's \gls*{ip} catalogue. A single memory-mapped \gls*{axi} master and \gls*{axi} slave Interconnect was included to ensure that the system was able to handle various scenarios that may occur during operation. These tests included different combinations of correct and incorrect keys, as well as edge cases such as missing or incorrect bytes in the key. It was essential that all of these tests passed in order to consider the \gls*{ip} secure and fit for purpose. In addition to these unit tests, the overall system was also tested to ensure that it functioned as intended. This included testing the \gls*{mqtt} communication protocol, the PYNQ framework, and the Node-RED dashboard. Overall, the testing of the system showed that the objective of building a flexible and reconfigurable edge device was met, as the system was able to securely store and use a secret key and authentication method, and was also easily configurable and adjustable through the use of a configuration file and various software tools. A demo video \cite{murray2023} is available on YouTube\footnote{Available online, \protect\url{https://youtu.be/8AXlf6tRZyo}, last accessed 07/01/2023} demonstrating the system working. \begin{figure}[H] \centering \includegraphics[scale=0.6]{figures/resources.PNG} \caption{\gls*{ultra96} \protect\gls*{cpu} resource consumption} \label{fig:auth_ip_unit_tests} \end{figure} The final results obtained for all the devices are listed in Table \ref{tab:results}. \begin{table}[!hbt]\caption{Results comparison} \label{tab:results} \resizebox{12cm}{!}{\begin{tabular}{|l|l|c|c|l|} \hline Device & Security aspects & \multicolumn{1}{l|}{Frame rate} & \multicolumn{1}{l|}{Image size} & Average price \\ \hline Ultra96 & \begin{tabular}[c]{@{}l@{}}Safest because the private key is \\ never exposed to memory.\end{tabular} & \begin{tabular}[c]{@{}c@{}}14\\ near real-time\end{tabular} & $1920\times1080$ & £300.29 GBP\footnote{Available online, \protect\url{https://uk.farnell.com/avnet/aes-ultra96-v2-g/sbc-arm-cortex-a53-cortex-r5/dp/3050481}, last accessed 15/01/2023} \\ \hline \gls*{rpi4} & \begin{tabular}[c]{@{}l@{}}Unsafe because the secure key was\\ exposed to the memory.\end{tabular} & \begin{tabular}[c]{@{}c@{}}6\\ far real-time\end{tabular} & $1920\times1080$ & £52.00 GBP\footnote{Available online, \protect\url{https://thepihut.com/products/raspberry-pi-4-model-b?variant=20064052674622}, last accessed 15/01/2023} \\ \hline \gls*{njn} & \begin{tabular}[c]{@{}l@{}}Unsafe because the secure key was\\ exposed to the memory.\end{tabular} & \begin{tabular}[c]{@{}c@{}}30\\ real-time\end{tabular} & $1920\times1080$ & £61.00 GBP\footnote{Available online, \protect\url{https://thepihut.com/products/nvidia-jetson-nano-2gb-developer-kit}, last accessed 15/01/2023} \\ \hline \end{tabular}} \end{table} The proposed system was tested under the same conditions on the \gls*{ultra96}, \gls*{njn} and \gls*{rpi4} to evaluate the performance and security of the \gls*{iot} device. The results showed that the \gls*{njn} achieved the highest frame rate of 30 \gls*{fps} (real-time), making it the best in terms of frame rate. The \gls*{rpi4} offered a more cost-effective solution but with a lower frame rate of 6 fps, making it the worst in terms of frame rate. And the \gls*{ultra96} achieved a frame rate of 14 \gls*{fps} and offered a safer solution by securely storing the encryption key in the \gls*{fpga} unit, making it the best in terms of security and performance. \section{Discussion and Future Work}\label{Ch:concl_future} In comparison to other authentication systems that rely solely on the use of a \gls*{cpu}, the proposed \gls*{iot} system utilizing an \gls*{fpga} has several advantages. One main advantage is the improved security provided by storing the secret key and authentication method within the \gls*{fpga} bitstream, as it is not accessible in a readable format outside the device. This is in contrast to a \gls*{cpu}-only system where the secret key and authentication method may be stored in plaintext or encrypted in memory, which could potentially be accessed by an attacker with the appropriate tools and knowledge. Another advantage of the proposed system is its reconfigurability and flexibility. With the use of a configuration file, the user is able to easily update the location of the bitstream, as well as change the camera input and \gls*{mqtt} settings without requiring in-depth knowledge of the system. This is not necessarily possible with a \gls*{cpu}-only system, as changes to the system may require modifications to the codebase and potentially require the expertise of a software developer. Therefore, the user can decide which programming system to use based on the budget, security and frame rate restrictions. In terms of performance, the \gls*{ultra96} is able to stream the camera feed at a maximum of 14 \gls*{fps}, which is higher than the aim of 6 \gls*{fps} offered by the \gls*{rpi4}. This is due to the efficient resource utilization of the \gls*{fpga}, as seen in Figure \ref{fig:auth_ip_unit_tests} where the device is only utilizing 63.6\% of its \gls*{cpu} resources. In comparison, a \gls*{cpu}-only system may struggle to handle the processing demands of the camera streaming and \gls*{mqtt} communication simultaneously, potentially resulting in lower frame rates or slower performance. Overall, the proposed \gls*{iot} system utilising an \gls*{fpga} for authentication offers improved security, reconfigurability, and performance compared to systems that rely solely on a \gls*{cpu}. There are many directions in which future work on this project could go. One possible avenue of research is to improve the security of the system by implementing more advanced forms of authentication. For example, instead of using a simple symmetric key, a more secure method such as a public-private key pair could be used. This would require the use of a cryptographic accelerator or hardware security module to ensure that the key operations can be performed quickly and efficiently on the edge device. Another possibility is to incorporate additional security measures to protect against physical tampering with the device. This could include the use of tamper-evident seals or hardware-based intrusion detection to alert the user if the device has been opened or tampered with. Another area for improvement could be to optimize the system for better resource utilization. This could involve using more advanced optimization techniques during the design phase, or implementing more efficient protocols for communication between the different components of the system. Finally, it would be interesting to explore the possibility of implementing machine learning algorithms on the edge device to enable more advanced forms of data analysis and decision-making. This could involve training a model on the device to identify certain patterns or characteristics in the data, and then using this model to make decisions about how to handle the data. Overall, there are many exciting directions in which this project could be taken, and we believe that it has the potential to make a significant impact in the field of edge computing and \gls*{iot} security. \section*{Acknowledgements} The authors would like to express their gratitude to Mr Flemming Christensen and Sundance Multiprocessor Technology for their invaluable support and assistance in the form of AMD-Xilinx training. \newpage
{'timestamp': '2023-01-18T02:14:52', 'yymm': '2301', 'arxiv_id': '2301.06180', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06180'}
arxiv
\section{Introduction}\label{sec:intro} \begin{Ruleset} \ruleset{Hnefatafl}\ is a combinatorial game played on the spaces of a $(2n+1) \times (2n+1)$ grid, where $n$ is a positive odd integer. The center space is known as the \emph{throne}; the four corners are known as the \emph{havens}. The Attacking player begins with $2k$ \emph{soldiers}, usually represented by black pieces. The Defending player begins with one \emph{King} and $k$ soldiers, usually represented by white pieces. The King is the only piece that can be moved onto or through the throne and havens. A starting configuration consists of the King on the throne, the Defenders surrounding it in a tight diamond pattern. The Attackers begin in four groups, each resembling an isosceles triangle along each board edge. No pieces start on the havens. Each turn, a player chooses one piece to move as many spaces as desired in one orthogonal direction (as a rook moves in \ruleset{Chess}, except it can't move onto an opposing piece's space). If the moved piece ends adjacent to an opposing piece (\emph{target}), and also adjacent to the target piece on the opposite side of the moved piece is either (1) another piece of the current player, or (2) a haven or the throne, then the target is captured and removed from the board\footnote{This is known as a ``Hammer and Anvil'' move, as there are other forms of capture in variants.}. If the King moves onto any of the havens or if all the Attacker's pieces are captured, then the Defender wins. If the King is captured, then the Attacker wins. (In other words, for all-small versions of these rulesets there are no options for either player once any of those three conditions are met.) A player may also lose if none of their pieces can move. \end{Ruleset} Note about these rules: a piece moving in between two opposing pieces does not cause a ``self-capture''; a piece can only be captured as a result of an opposing move. Of important note is that \ruleset{Hnefatafl}\ is not a symmetric game; the Attacker has nearly twice as many pieces, but their victory condition is (arguably) more difficult. Experimentally, most variants of Tafl games favor the Defender (see \cite{taflBalance}), and hence the Attacker tends to be given the first move. Since \ruleset{Hnefatafl}\ is a reconstruction of a historic game, the exact rules played originally are uncertain. Indeed, regional variants by the names of \ruleset{Brandubh}, \ruleset{Tablut}, \ruleset{Tafl}, \ruleset{Ard R\'{i}}, and more employ additional rules that overlap from one game to the next (and may or may not be consistent). In this paper, we allow the inclusion of any of the following rules without modifying the results: \begin{itemize} \item \textbf{Traps}: If a piece is completely surrounded by opposing pieces, edges of the board, havens and/or the throne, then it is captured and removed from the board. \item \textbf{King on the throne}: If the King is on the throne, then adjacent Defenders cannot be captured. If they would be removed from the board, they remain instead. \item \textbf{Throne isn't an anvil}: The throne cannot be used as ``the anvil'' in a capture. \iffalse \item[Throne movement]: There are multiple levels of what can move onto and through the throne. The rules above are the most restrictive, and we continue to least restrictive: \begin{itemize} \item Defenders can move through the throne, but cannot end their movement on it. \item Attackers and Defenders can move through the throne, but cannot be placed on it. \item Defenders can move through the throne and end their movement on it. \item All pieces can move through and on the throne as through it were any normal space on the board. \end{itemize} \fi \end{itemize} \iffalse \craig{I re-did this in tabular. I think it looks better but I'm happy to talk about it.} \begin{tabular}{p{0.25\linewidth} p{0.7\linewidth}} Traps & If a piece is completely surrounded by opposing pieces, edges of the board, havens and/or the throne, then it is captured and removed from the board. \\ King on the throne & If the King is on the throne, then adjacent Defenders cannot be captured. If they would be removed from the board, they instead remain on the board.\\ Throne $\neq$ anvil & The throne cannot be used as ``the anvil'' in a capture. \end{tabular} \fi Which pieces are permitted to move onto and through the throne differs between variants, as well. Below are some less restrictive variations. \begin{itemize} \item Defender's pieces can move through the throne, but cannot end their movement on it. \item Attacker's and Defender's pieces can move through the throne, but cannot be placed on it. \item Defender's pieces can move through the throne and end their movement on it. \item All pieces can move through and on the throne as through it were any normal space on the board. \end{itemize} Other rule variations that don't work (immediately) with the results here include rules for capturing the King. In some rules, the King must be captured in a trap (surrounded on all sides as listed above), as outlined in the first English translation of Linnaeus's journal on his tour of Lapland in 1732 \cite{von1811lachesis}. Sometimes this is amended so that the trap cannot include edges of the board. A very recent development proves the \cclass{EXPTIME}-hardness of the symmetric kingless \ruleset{Custodial Capture} game \cite{a14030070}. This game is similar to \ruleset{Hnefatafl}, except there are neither havens nor escape points, a player wins after they have captured a total of $k$ soldiers of the opponent, and two soldiers can capture as many opposing soldiers as are between them (in an straight path with no gaps). We go in a different direction, and study a new variant of \ruleset{Hnefatafl}\ that requires players to make capturing and immediate-winning moves when available. \begin{Ruleset} \ruleset{Forced-Capture Hnefatafl}\ is the same ruleset as \ruleset{Hnefatafl}, except that when a player has at least one option that results in a capture or the immediate end of the game, then the player must move to one of those options. \end{Ruleset} With this change, we show that determining the winner of this \ruleset{Forced-Capture Hnefatafl}\ game is \cclass{PSPACE}-hard. \section{Computational Complexity} \label{sec:complexity} \begin{Theorem}\label{thm:hardness} \ruleset{Forced-Capture Hnefatafl}\ is \cclass{PSPACE}-hard. \end{Theorem} \begin{proof} We reduce from \ruleset{Bounded 2-Player Constraint Logic} (\ruleset{B2CL}). In order to complete the reduction, it is sufficient to find gadgets for Variables, Fanout, Choice, AND, OR, Victory, and Wires to connect the gadgets \cite{DBLP:books/daglib/0023750}. (This is because these Constraint Logic gadgets are enough to show that \ruleset{B2CL}\ is \cclass{PSPACE}-complete, using the reduction from \ruleset{Positive-CNF} \cite{DBLP:books/daglib/0023750, DBLP:journals/jcss/Schaefer78}.) We build these gadgets to model winnability from the start for both the Attacker and Defender perspectives. Since all soldiers follow the same rules, most of our gadgets work for both players. We will only need team-specific situations in the victory gadgets. The overview of the reduction follows. Players will begin by choosing variables. For each variable chosen by White, that activates that gadget's output. In our \ruleset{Forced-Capture Hnefatafl}\ gadgets, this means that a white soldier will be able to move from one gadget to capture a black soldier in another. In each gadget, when an input becomes activated by such a move, Black will immediately have to respond in that gadget because a capturing move will have been created. Then (depending on whether there are other inputs) there will be a sequence of moves so that White activates the output(s), meaning a white soldier leaves that gadget to activate other gadgets. In the case of the Fanout gadget, two outputs will be activated, so two white soldiers will be able to leave the gadget. White and Black will make all possible plays on the variables first. As stated above, the variables White chooses will have activated outputs. The variables that Black chooses will have inactive outputs. Since the reduction comes from a game on formulas without negations, there is no detriment for White to have a variable activate. After all variables are chosen, there are no longer any difficult decisions for the players. White will activate all the gadgets they can. Every activation play has a responding Black play, so after all activations are made, either the Victory gadget will be activated (meaning White will have won or be able to win shortly thereafter) or the Victory gadget will remain inactive. In this latter case, it will be White's turn, but they will be unable to prevent Black from winning in Black's next two turns. We continue the proof by describing how to implement these gadgets in \ruleset{Forced-Capture Hnefatafl}. The most basic gadget, our Wire gadget (shown in Figure \ref{fig:wireTurn}) fulfills three purposes: \begin{itemize} \item Provides a connection between all other gadgets, \item Turns the signal 90 degrees, which allows us to line up inputs to outputs as necessary, and \item Acts as a diode, preventing backwards moves from being made. \end{itemize} The wire is activated when a white soldier enters from underneath in the file (column) c, marked with an arrow. Black is then forced to make the responding capturing move, and then White's other soldier is free to move on to the another gadget positioned to the right. White will be forced to make that move, since moving to the receiving gadget will result in a capture. All other gadgets have been carefully designed so as not to allow for wire pieces to interact out of their designated turn. \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=d5, setfen=2p1/Pp2/3p/4/4, pgfstyle=straightmove, markmoves={c1-c4}, showmover=false ] \caption{A white soldier moves in from the bottom to c4 to make a capture.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=d5, setfen=2p1/P1P1/3p/4/4, pgfstyle=straightmove, markmoves={d3-c3}, showmover=false ] \caption{Black responds with their capturing move.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=d5, setfen=2p1/P3/2p1/4/4, pgfstyle=straightmove, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](a4)--(d4);}, showmover=false ] \caption{The remaining white soldier is free to move into the next gadget.} \end{center}\end{subfigure} \caption{Turn in a wire gadget. If and only if the input is activated (the white soldier moves in from below) then the white soldier in a4 will be able to activate a gadget positioned to the right in it's path.} \label{fig:wireTurn} \end{center}\end{figure} In Figure \ref{fig:diode}, we show how the wire turn acts as a diode: White cannot play backwards through the gadgets. Because of this, we will make sure there is at least one wire gadget between any pair of other gadgets that must be connected. \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.47\textwidth}\begin{center} \chessboard[ maxfield=d5, setfen=2p1/Pp2/3p/4/2P1, pgfstyle=straightmove, markmoves={d4-c4}, showmover=false ] \caption{If White enters from the right, they can still capture.} \end{center}\end{subfigure} \hfill \begin{subfigure}[b]{.47\textwidth}\begin{center} \chessboard[ maxfield=d5, setfen=2p1/P1P1/3p/4/2P1, pgfstyle=straightmove, markmoves={d3-c3}, showmover=false ] \caption{Black captures as when the wire is played normally.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=d5, setfen=2p1/P3/2p1/4/4, pgfstyle=straightmove, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](c4)--(c1);}, showmover=false ] \caption{The remaining white soldier is not in the correct file to propagate the signal backwards.} \end{center}\end{subfigure} \caption{The turn in a wire acts as a diode. If White can ever push a signal backwards, they will not be able to continue that signal past the turn.} \label{fig:diode} \end{center}\end{figure} Next we describe the victory gadgets, which we will need two of: one when White is acting as True, and one when White is acting as False. We begin with the Defender Victory gadget as in Figure \ref{fig:defenderVictory}. White, as the defender, will be able to win if they can activate the gadget. However, if Black ever has a turn where they are not compelled to make a capture, they can set up a capture on White's King that White cannot avoid. \begin{figure} \centering \chessboard[ maxfield=g7, setfen=3ppp1/2p1K2/4p2/3p1p1/7/7/7, pgfstyle=straightmove, markmoves={e1-e4}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](e6)--(g6);}, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](g6)--(g7);}, color=orange!80, pgfstyle=color, opacity=.5, markregion={g7-g7} ] \caption{Defender Victory gadget. The haven is orange and in the upper right hand corner of the board. White can win the game exactly if they can activate this gadget.} \label{fig:defenderVictory} \end{figure} This capture is possible because of the black soldier at e5. If the king tries to move anywhere, including below the haven, the soldier at e5 will follow it laterally and capture it. If the king doesn't move, then Black can capture it in two moves. White may be able to try to intervene by moving a soldier from elsewhere on the board into either file c or g to prepare to move to row 6, but Black can start by moving a soldier to the opposite side of the king (files f and d respectively) and then capture on their next turn. In the same vein, we have our Attacker Victory gadget, shown in Figure \ref{fig:attackerVictory}. In this gadget, if Black activates the gadget, then they win by capturing the King. If, however, White ever has a turn where they are not forced to make a capture, then they can move to e3, from where they can win on the next turn. \iffalse \begin{figure} \centering \chessboard[ maxfield=e4, setfen=P2p1/k4/1pppp/5, pgfstyle=straightmove, markmoves={a1-a2}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](a3)--(e3);}, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](e3)--(e4);}, color=orange!80, pgfstyle=color, opacity=.5, markregion={e4-e4} ] \caption{Attacker Victory gadget. White can win the game exactly if they can activate this gadget. If they can, they take the King immediately. If not, the black king can reach the Haven in two moves, which White cannot block.} \label{fig:attackerVictory} \end{figure} \fi \begin{figure} \centering \chessboard[ maxfield=e4, setfen=p2P1/K4/1PPPP/5, pgfstyle=straightmove, markmoves={a1-a2}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](a3)--(e3);}, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](e3)--(e4);}, color=orange!80, pgfstyle=color, opacity=.5, markregion={e4-e4} ] \caption{Attacker Victory gadget. The haven is orange. Black can win the game exactly if they can activate this gadget. If they can, they take the King immediately. If not, the King can reach the Haven in two moves, which Black cannot block.} \label{fig:attackerVictory} \end{figure} Whichever of the victory gadgets is used, the player acting as True (from the original \ruleset{Positive CNF} position, or White from the \ruleset{B2CL}\ position we directly reduce from) needs to activate it in order to win. If they cannot and ultimately end their turn in a situation where False is not forced to make a capture, then False can win in two moves. (For the remainder of our gadgets, we return to using white pieces for the White (True) \ruleset{B2CL}\ player.) The Variable gadget allows one of the two players to make a move in it. Whichever player makes that move decides the value of the corresponding variable. (As mentioned earlier, the \ruleset{B2CL}\ reduction is from \ruleset{PositiveCNF}, so there are no negations in the variables and each player can only set variables to their own value.) We represent a positive value for a variable (or on any wire) with a free white soldier that can move up and out of the gadget on a specific file on the game board. In our variable gadget, as shown in Figure \ref{fig:variable}, if White plays, they can move their rightmost soldier to the left and capture the middle black soldier, freeing up the lower soldier to move along the arrow. If Black plays first, they can move their leftmost soldier to the right and capture the middle white soldier, keeping the lower soldier blocked. \newcommand{\textcolor{red}{\huge{\textbf{F}}}}{\textcolor{red}{\huge{\textbf{F}}}} \newcommand{\textcolor{blue}{\huge{\textbf{T}}}}{\textcolor{blue}{\huge{\textbf{T}}}} \iffalse \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .7] \draw[step=1.0,black,thin] (0.5,0.5) grid (7.5,3.5); \draw[->, gray] (4.5, 1.5) -- (4.5, 4.0); \node (f1) at (1.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (3.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (4.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (6.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (true) at (4.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{Before either player has moved. Both have a capture move option.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .7] \draw[step=1.0,black,thin] (0.5,0.5) grid (7.5,3.5); \draw[->, gray] (4.5, 1.5) -- (4.5, 4.0); \node (f1) at (1.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (3.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t2) at (5.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (true) at (4.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{If True moves on the gadget; the True soldier is free to move out.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .7] \draw[step=1.0,black,thin] (0.5,0.5) grid (7.5,3.5); \draw[->, gray] (4.5, 1.5) -- (4.5, 4.0); \node (f1) at (2.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f2) at (4.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (6.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (true) at (4.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{False plays first. The lower True soldier cannot move up.} \end{center}\end{subfigure} \caption{Variable gadget. The variable is set to True if the bottom T soldier can move straight up along the arrow. The True player can make this happen if they play on it first by moving their rightmost T to the left, capturing the middle F. False can block the soldier by moving their leftmost F to the right, capturing the middle T.} \label{fig:variable} \end{center}\end{figure} \fi \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=f2, setfen=p1Pp1P/3P2, pgfstyle=straightmove, markmoves={f2-e2,a2-b2}, showmover=false ] \caption{Before either player has moved, both have a capture move option.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=f2, setfen=p1P1P1/3P2, pgfstyle=straightmove, showmover=false ] \caption{If White moves on the gadget, their soldier is free to move out.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \chessboard[ maxfield=f2, setfen=1p1p1P/3P2, pgfstyle=straightmove, showmover=false ] \caption{Black plays on the gadget. The lower White soldier cannot move up.} \end{center}\end{subfigure} \caption{Variable gadget. The variable is set to True if the bottom white soldier can move straight up along the arrow. The True/White player can make this happen if they play on it first by moving their rightmost soldier to the left, capturing the middle black soldier. Black can block the soldier output by moving their leftmost soldier to the right to capture.} \label{fig:variable} \end{center}\end{figure} Black cannot start making plays until after all variable gadgets have been chosen. If White decides to play on any of the wire gadgets before all variables are chosen, this also cannot help them win and could cause them to lose. This is because Black can respond by claiming extra variables instead of responding on the wires. White, without a move on the wire they played on, now has to respond on a variable. All this has accomplished for White is letting Black choose a variable before them. Since there are no negations, this cannot be advantageous to White. After all the variables have been chosen, it will be White's turn. (If necessary, we add a dummy variable so that there are an even number of variables and Black makes the last move on the variable gadgets. This is a variable gadget, but without the white soldier in row 1.) The freed-up white soldiers from the variables will each be able to move up and make capturing moves in other gadgets, activating them. Each of those capture moves will create a chain sequence of back and forth capture options, starting with False. If and only if the assignment of variables has made the original \ruleset{B2CL}\ position winnable for the first player, then the True player will be able to activate their victory gadget. \iffalse For some gadgets, we will need to ensure that soldiers from previous gadgets cannot move in to provide an unintended capture move. We may also need to shift incoming input signals left or right to line up with the outputs of other gadgets. To do this, we need wire gadgets that can turn the signals, which we show in Figure \ref{fig:wire}. The wire gadget passes a signal forward without interference, shifting it as necessary to the right. (Shifting to the left can be done by reflecting the gadget.) The T soldier in the lower left prevents lower gadgets from making an inappropriate capture move above it. \renewcommand{\textcolor{red}{\huge{\textbf{F}}}}{\textcolor{red}{\Large{\textbf{F}}}} \renewcommand{\textcolor{blue}{\huge{\textbf{T}}}}{\textcolor{blue}{\Large{\textbf{T}}}} \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,5.5); \draw[->, gray] (4.5, 0) -- (4.5, 3.5); \node (t1) at (1.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t2) at (2.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f1) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f2) at (4.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (5.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (7.5,0.5) grid (11.5,5.5); \node (f4) at (8.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[->, gray] (9.5, 1.5) -- (9.5, 6); \end{tikzpicture} \caption{Wire before becoming active.} \end{center}\end{subfigure}\hspace{.1cm} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,5.5); \draw[->, gray] (4.5, 0) -- (4.5, 3.5); \node (t1) at (1.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t2) at (2.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (4.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (5.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (true) at (4.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[step=1.0,black,thin] (7.5,0.5) grid (11.5,5.5); \node (f4) at (8.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[->, gray] (9.5, 1.5) -- (9.5, 6); \end{tikzpicture} \caption{True soldier moves in from the bottom.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,5.5); \node (t1) at (1.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t2) at (2.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (4.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (4.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (7.5,0.5) grid (11.5,5.5); \node (f4) at (8.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[->, gray] (9.5, 1.5) -- (9.5, 6); \end{tikzpicture} \caption{False responds with their only capture move.} \end{center}\end{subfigure}\hspace{.1cm} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,5.5); \node (t1) at (1.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (4.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (4.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (7.5,0.5) grid (11.5,5.5); \node (f4) at (8.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (9.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t3) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[->, gray] (9.5, 1.5) -- (9.5, 6); \end{tikzpicture} \caption{True makes their capturing move across to the right hand side.} \end{center}\end{subfigure}\hspace{.1cm} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,5.5); \node (t1) at (1.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (4.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (4.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (7.5,0.5) grid (11.5,5.5); \node (f4) at (8.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[->, gray] (9.5, 1.5) -- (9.5, 6); \end{tikzpicture} \caption{False makes a capturing move, but the lower True soldier is still free to move up.} \end{center}\end{subfigure} \caption{Wire gadget} \label{fig:wire} \end{center}\end{figure} \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.45\textwidth}\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=i5, setfen=3p2p2/1Pp5p/4p2p1/P6P1/3P5, pgfstyle=straightmove, markmoves={d1-d4}, showmover=false ] \caption{Wire before becoming active.} \end{center}\end{subfigure}\hspace{.1cm} \begin{subfigure}[b]{.45\textwidth}\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=i5, setfen=3p2p2/1P1P4p/4p2p1/P6P1/9, pgfstyle=straightmove, showmover=false ] \caption{True soldier moves from the bottom.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=i5, setfen=3p2p2/1P6p/3p3p1/P6P1/9, pgfstyle=straightmove, showmover=false ] \caption{False responds with their only capture move.} \end{center}\end{subfigure}\hspace{.1cm} \begin{subfigure}[b]{.45\textwidth}\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=i5, setfen=3p2p2/7Pp/3p5/P6P1/9, pgfstyle=straightmove, showmover=false ] \caption{True makes their capturing move across to the right hand side.} \end{center}\end{subfigure}\hspace{.1cm} \begin{subfigure}[b]{.45\textwidth}\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=i5, setfen=3p5/6p1p/3p5/P6P1/9, pgfstyle=straightmove, markmoves={h2-h5}, showmover=false ] \caption{False makes a capturing move, but the lower True soldier is still free to move up.} \end{center}\end{subfigure} \caption{Wire gadget} \label{fig:wire} \end{center}\end{figure} Note that the wires consist of two turning soldiers, and those turning soldiers act as diodes. If the True player attempts to go in the reverse direction through the turns, False will make the capturing move and True no longer has a soldier in the correct row or column. \fi Some signals need to be split into two, so we use the Fanout gadget, shown in Figure \ref{fig:fanout}, to accomplish this. If the input is activated, then both outputs can activate other gadgets. \begin{figure}[h!]\begin{center} \chessboard[ maxfield=d5, setfen=1p2/2pP/p3/2P1/4, pgfstyle=straightmove, markmoves={b1-b4}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](c2)--(c5);}, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](d4)--(a4);} ] \caption{Fanout gadget. The incoming white soldier takes the black soldier at c4. Black responds by moving to b3, allowing the white soldiers at both d4 and c2 to activate.} \label{fig:fanout} \end{center}\end{figure} \iffalse \begin{figure}[h!]\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=g9, setfen=1p5/1P1p3/1Pp4/4p2/7/7/Pp5/7/3P3, pgfstyle=straightmove, markmoves={d1-d7,e7-g7,e3-g3}, showmover=false ] \caption{Fanout gadget. T moves from d1 to d7, then F from e6 to d6. T leaves to the right from b7, after which F moves to b7 from b3. Finally, T leaves to the right from a3. This gadget requires diodes.} \label{fig:fanout} \end{center}\end{figure} \renewcommand{\textcolor{red}{\huge{\textbf{F}}}}{\textcolor{red}{\Large{\textbf{F}}}} \renewcommand{\textcolor{blue}{\huge{\textbf{T}}}}{\textcolor{blue}{\Large{\textbf{T}}}} \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[->, gray] (7.5, 0) -- (7.5, 4.5); \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,6.5); \draw[->, gray] (2.5, 2.5) -- (2.5, 7); \node (f1) at (1.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (2.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (10.5,6.5); \node (f4) at (6.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (7.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t4) at (9.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[->, gray] (8.5, 3.5) -- (8.5, 7); \end{tikzpicture} \caption{Fanout gadget before any moves are made. There is one input and two outputs.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[->, gray] (7.5, 0) -- (7.5, 4.5); \node(true) at (7.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,6.5); \draw[->, gray] (2.5, 2.5) -- (2.5, 7); \node (f1) at (1.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (2.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (10.5,6.5); \node (f4) at (6.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (7.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t4) at (9.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[->, gray] (8.5, 3.5) -- (8.5, 7); \end{tikzpicture} \caption{After the True soldier has moved in. The righthand True soldier is already free to move out.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,6.5); \draw[->, gray] (2.5, 2.5) -- (2.5, 7); \node (f1) at (1.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (2.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (10.5,6.5); \node (f4) at (7.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (7.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t4) at (9.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[->, gray] (8.5, 3.5) -- (8.5, 7); \end{tikzpicture} \caption{False makes their only free capturing response.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,6.5); \draw[->, gray] (2.5, 2.5) -- (2.5, 7); \node (f1) at (1.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f3) at (3.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (10.5,6.5); \node (f4) at (7.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (7.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t4) at (2.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[->, gray] (8.5, 3.5) -- (8.5, 7); \end{tikzpicture} \caption{True moves across to capture on the left part.} \end{center}\end{subfigure} \begin{subfigure}[b]{.45\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,6.5); \draw[->, gray] (2.5, 2.5) -- (2.5, 7); \node (f1) at (1.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f3) at (3.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (10.5,6.5); \node (f4) at (7.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f5) at (7.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[->, gray] (8.5, 3.5) -- (8.5, 7); \end{tikzpicture} \caption{False makes their final capture move. Now the other True soldier is also free to leave.} \end{center}\end{subfigure} \caption{Fanout gadget.} \label{fig:fanout} \end{center}\end{figure} \fi \iffalse \begin{figure}[h]\begin{center} \setchessboard{boardfontsize=15pt} \chessboard[ maxfield=i5, setfen=3p1p3/3P1P3/3ppp3/4p4/4P4, pgfstyle=straightmove, markmoves={a2-d2,i2-f2}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](e1)--(e5);} ] \caption{AND gadget. White soldiers need to land at d2 and f2 for the output to become active.} \label{fig:AND} \end{center}\end{figure} In our AND gadget, as shown in Figure \ref{fig:AND}, the output white soldier can move only after both inputs are activated and Black makes the two responding moves. The first white soldier to move in removes the black soldier above it. Either way, the black soldier in e3 can move into that now-empty space and capture the white soldier above that. When the second white soldier moves into position, it captures both the black soldier above it and the black soldier at e2. The black soldier that had begun at e3 then moves to capture horizontally to capture the remaining white soldier in row 4. White is then free to move the white soldier at e1 and activate another gadget. \fi \begin{figure} \centering \chessboard[ maxfield=g6, setfen=3p3/3P3/3pp1p/6P/7/7, pgfstyle=straightmove, markmoves={a5-c5,d1-d3}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](g3)--(g6);} ] \caption{AND gadget} \label{fig:AND} \end{figure} In our AND gadget shown in Figure \ref{fig:AND}, the output white soldier at g3 can only move forward after the black soldier at g4 has moved. This only happens if White enters both up to d3, followed by Black moving from e4 to d4, then White entering to d5, and finally Black moving from g4 to d4. \begin{figure}[h!] \begin{center} \chessboard[ maxfield=f6, setfen=6/1p4/2p3/pPp3/2p3/6, pgfstyle=straightmove, markmoves={d1-d3}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](d3)--(d6);}, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](d3)--(f3);} ] \caption{Choice gadget} \label{fig:choice} \end{center}\end{figure} In the Choice gadget, shown in Figure \ref{fig:choice}, there are two possible outputs leading to wires, only one of which can be activated. When a Choice gadget is activated, White can either decide to stop in the gadget at d3 or pass through the gadget and activate the wire gadget for the output above. If the white soldier stops at d3, Black responds by moving either of their other soldiers on the c file to the now-empty c3. The white soldier is now free to activate the output either above or to the right, but not both. \iffalse \begin{figure}[h!] \begin{center} \chessboard[ maxfield=g5, setfen=7/7/2p1p2/2p1P1p/4p2, pgfstyle=straightmove, markmoves={a4-e4, e5-e4}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](e4)--(g4);} ] \caption{OR gadget.} \label{fig:OR} \end{center}\end{figure} Finally, we describe the OR gadget in Figure \ref{fig:OR}, where the output can activate if either input is activated (or both). After the activating move, Black can move to capture the white soldier at e2. This allows White to activate the output. Once one soldier moves in, if the other input becomes active, it will not be able to activate this gadget a second time. There is an extra case based on the geometry of the OR gadget, however. If White activates the input on row 4, and they decide to continue through the gadget without stopping, activating the wire on the opposite side, the output will propagate as normal. If the other input becomes active, White can still make the vertical move in to e4, which Black will respond to, but the repeated signal will, appropriately, not continue. This is because the output wire cannot be reactivated. \fi \begin{figure} \centering \chessboard[ maxfield=h7, setfen=3P1p2/7/8/5pPp/8/8/7, pgfstyle=straightmove, markmoves={e1-e4,a4-e4}, showmover=false, addpgf={\tikz[overlay]\draw[black,line width=0.05em,-Stealth,dashed](d7)--(h7);} ] \caption{OR gadget} \label{fig:OR} \end{figure} Finally, we describe the OR gadget in Figure \ref{fig:OR}, where the output can activate if either input is activated (or both). If White moves a soldier either up column e or in along row 4, then Black will move down from f7 to f4. This frees up White to exit from d7. The gadgets shown above are all that are needed to reduce from \ruleset{B2CL}. If White is able to activate the victory gadget, then they win. Otherwise, after all activations are made, it will be White's turn, but they will be unable to move into a position that prevents Black from winning in Black's next two turns. \end{proof} \iffalse \renewcommand{\textcolor{red}{\huge{\textbf{F}}}}{\textcolor{red}{\huge{\textbf{F}}}} \renewcommand{\textcolor{blue}{\huge{\textbf{T}}}}{\textcolor{blue}{\huge{\textbf{T}}}} \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .7] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,5.5); \draw[->, gray] (2.5, 3.5) -- (2.5, 6.0); \node (f1) at (1.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (2.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (7.5,6.5); \draw[->, gray] (6.5, 0) -- (6.5, 3.5); \node (f4) at (6.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (6.5, 5.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[step=1.0,black,thin] (8.5,0.5) grid (12.5,5.5); \draw[->, gray] (10.5, 3.5) -- (10.5, 6.0); \node (f5) at (9.5, 4.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (10.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (10.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f7) at (11.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \end{tikzpicture} \caption{Before any moves have been made.} \end{center}\end{subfigure} \caption{Choice gadget, which is broken.} \label{fig:choice} \end{center}\end{figure} \fi \iffalse \renewcommand{\textcolor{red}{\huge{\textbf{F}}}}{\textcolor{red}{\large{\textbf{F}}}} \renewcommand{\textcolor{blue}{\huge{\textbf{T}}}}{\textcolor{blue}{\large{\textbf{T}}}} \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,4.5); \draw[->, gray] (3.5, 0) -- (3.5, 2.5); \node (t1) at (1.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f1) at (2.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f2) at (2.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (13.5,6.5); \draw[->, gray] (9.5, 1.5) -- (9.5, 7); \node (f4) at (6.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (7.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f5) at (8.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (tOut) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f7) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f8) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t4) at (10.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f9) at (10.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t5) at (11.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f10) at (12.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (14.5,0.5) grid (18.5,4.5); \draw[->, gray] (15.5, 0) -- (15.5, 2.5); \node (f11) at (15.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f12) at (16.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f13) at (16.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t6) at (17.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{AND gadget before any moves are made. There are two inputs and one input.} \end{center}\end{subfigure} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,4.5); \draw[->, gray] (3.5, 0) -- (3.5, 2.5); \node (t1) at (1.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f1) at (2.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (true) at (3.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (13.5,6.5); \draw[->, gray] (9.5, 1.5) -- (9.5, 7); \node (f4) at (6.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (7.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f5) at (8.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (tOut) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f7) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f8) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t4) at (10.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f9) at (10.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t5) at (11.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f10) at (12.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (14.5,0.5) grid (18.5,4.5); \draw[->, gray] (15.5, 0) -- (15.5, 2.5); \node (f11) at (15.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f12) at (16.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f13) at (16.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t6) at (17.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{Left side is activated by the True capture move.} \end{center}\end{subfigure} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,4.5); \node (t1) at (1.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f1) at (3.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (13.5,6.5); \draw[->, gray] (9.5, 1.5) -- (9.5, 7); \node (f4) at (6.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (7.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f5) at (8.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t3) at (8.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (tOut) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f7) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f8) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t4) at (10.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f9) at (10.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t5) at (11.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f10) at (12.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (14.5,0.5) grid (18.5,4.5); \draw[->, gray] (15.5, 0) -- (15.5, 2.5); \node (f11) at (15.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f12) at (16.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f13) at (16.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t6) at (17.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{False responds.} \end{center}\end{subfigure} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,4.5); \node (f1) at (3.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (13.5,6.5); \draw[->, gray] (9.5, 1.5) -- (9.5, 7); \node (t1) at (8.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f4) at (6.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (7.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (t3) at (8.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (tOut) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f7) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f8) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t4) at (10.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f9) at (10.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t5) at (11.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f10) at (12.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (14.5,0.5) grid (18.5,4.5); \draw[->, gray] (15.5, 0) -- (15.5, 2.5); \node (f11) at (15.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f12) at (16.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f13) at (16.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t6) at (17.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{True moves their soldier to the center part.} \end{center}\end{subfigure} \caption{AND gadget and first three moves starting on the left input.} \label{fig:fanout} \end{center}\end{figure} \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,4.5); \node (f1) at (3.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (13.5,6.5); \draw[->, gray] (9.5, 1.5) -- (9.5, 7); \node (t1) at (8.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f4) at (8.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (7.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (tOut) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f7) at (9.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f8) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t4) at (10.5, 4.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f9) at (10.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t5) at (11.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f10) at (12.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (14.5,0.5) grid (18.5,4.5); \draw[->, gray] (15.5, 0) -- (15.5, 2.5); \node (f11) at (15.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f12) at (16.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f13) at (16.5, 2.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t6) at (17.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{False responds. If the right hand input is never activated, this is how the gadget will end. \craig{F could have moved a diff't piece to this position, but it doesn't change the outcome.}} \end{center}\end{subfigure} \begin{subfigure}[b]{\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (4.5,4.5); \node (f1) at (3.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \draw[step=1.0,black,thin] (5.5,0.5) grid (13.5,6.5); \draw[->, gray] (9.5, 1.5) -- (9.5, 7); \node (t1) at (8.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f4) at (8.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t2) at (7.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f6) at (8.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (tOut) at (9.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f9) at (10.5, 5.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t5) at (11.5, 1.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f10) at (10.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t6) at (10.5, 2.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \draw[step=1.0,black,thin] (14.5,0.5) grid (18.5,4.5); \node (f11) at (15.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f12) at (15.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \end{tikzpicture} \caption{If the right-hand input is activated, a similar four moves on the right hand side will have the same effect and also remove the middle False soldier, producing the final state, so the output soldier can leave.} \end{center}\end{subfigure} \caption{AND gadget continued} \label{fig:fanout} \end{center}\end{figure} Note that in the AND gadget, the side pieces are both turning (diode) pieces from the wire gadget. We next describe the OR gadget by including only the main piece without the incoming diodes. For this reason, one of the two inputs will enter from the side of the gadget instead of the bottom. See Figure \ref{fig:or} for the details of the OR gadget. \begin{figure}[h!]\begin{center} \begin{subfigure}[b]{.3\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,4.5); \draw[->, gray] (4.5, 0) -- (4.5, 3.25); \draw[->, gray] (4.5, 3.75) -- (4.5, 5); \draw[->, gray] (6, 3.5) -- (4.75, 3.5); \node (f1) at (1.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (3.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f3) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \end{tikzpicture} \caption{OR before any moves are made} \end{center}\end{subfigure} \begin{subfigure}[b]{.3\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,4.5); \draw[->, gray] (4.5, 0) -- (4.5, 3.25); \draw[->, gray] (4.5, 3.75) -- (4.5, 5); \draw[->, gray] (6, 3.5) -- (4.75, 3.5); \node (f1) at (1.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (t1) at (2.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \node (f2) at (3.5, 1.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (true) at (4.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{OR after first T moves in} \end{center}\end{subfigure} \begin{subfigure}[b]{.3\textwidth}\begin{center} \begin{tikzpicture}[scale = .5] \draw[step=1.0,black,thin] (0.5,0.5) grid (6.5,4.5); \draw[->, gray] (4.5, 0) -- (4.5, 3.25); \draw[->, gray] (4.5, 3.75) -- (4.5, 5); \draw[->, gray] (6, 3.5) -- (4.75, 3.5); \node (f1) at (1.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (f2) at (3.5, 3.5) {\textcolor{red}{\huge{\textbf{F}}}}; \node (true) at (4.5, 3.5) {\textcolor{blue}{\huge{\textbf{T}}}}; \end{tikzpicture} \caption{False responds; the True piece is free.} \end{center}\end{subfigure} \caption{OR gadget. After it has been used by one input, it can't be used by the other.} \label{fig:or} \end{center}\end{figure} Unlike the previous gadgets, the victory gadgets need to be specific to the player (Attackers or Defenders). In the Defender victory gadget, if activated, the King will be able to escape to a haven. Otherwise, the Attackers will be able to capture the King. In the Attacker Victory gadget, if activated, the attackers will capture the King. If it is not activated, the King will be able to escape to a haven. The Defender victory gadget is shown in Figure \ref{fig:defenderVictory}. \begin{figure}[h!]\begin{center} \begin{tikzpicture}[scale = .7] \draw[step=1.0,black,thin] (0.5,0.5) grid (2.5,5); \draw[->, gray] (1.5, 0) -- (1.5, 1.5); \node (a1) at (1.5, 2.5) {\textcolor{red}{\huge{\textbf{A}}}}; \node (d1) at (1.5, 3.5) {\textcolor{blue}{\huge{\textbf{D}}}}; \node (a2) at (1.5, 4.5) {\textcolor{red}{\huge{\textbf{A}}}}; \draw[step=1.0,black,thin] (3.5,0.5) grid (6,5); \node (m) at (4.5, 3.5) {\textcolor{blue}{\Large{\textbf{M}}}}; \node (h) at (5.5, 4.5) {\textcolor{black}{\huge{\textbf{H}}}}; \end{tikzpicture} \caption{Defender Victory gadget. M is the King, A are Attackers, D is a Defender, and H is the haven. TODO: oh, this is broken, because if it's not activated, there's no way to capture the King!}} \label{fig:defenderVictory} \end{center}\end{figure} \begin{figure}[h!]\begin{center} \begin{tikzpicture}[scale = .7] \draw[step=1.0,black,thin] (0.5,0.5) grid (2.5,4.5); \draw[->, gray] (1.5, 0) -- (1.5, 1.5); \node (m) at (1.5, 2.5) {\textcolor{red}{\Large{\textbf{M}}}}; \node (a1) at (1.5, 3.5) {\textcolor{blue}{\huge{\textbf{A}}}}; \draw[step=1.0,black,thin] (3.5,0.5) grid (6,5); \node (d1) at (4.5, 3.5) {\textcolor{red}{\huge{\textbf{D}}}}; \node (d2) at (5.5, 1.5) {\textcolor{red}{\huge{\textbf{D}}}}; \node (h) at (5.5, 4.5) {\textcolor{black}{\huge{\textbf{H}}}}; \end{tikzpicture} \caption{Attacker Victory gadget. M is the King, A is an Attacker, D are the Defenders, and H is the haven. If the gadget is activated, then an attacker moves in and the King is captured. If it isn't activated, then the Defender will get a turn not needing to make a capturing move. They can move the King to the right, below the haven, and will able to win on their next turn.} \label{fig:attackerVictory} \end{center}\end{figure} \fi \section{Conclusions and open questions}\label{sec:conclusion} In this paper we demonstrate that our restricted version of \ruleset{Hnefatafl}\ is \cclass{PSPACE}-hard. Our reduction relies heavily on the fact that players have to choose capturing moves (or a winning move) if such a move exists on their turn. Indeed, if this was not the case, Black would be able to swiftly win the game in both roles. Since \ruleset{Forced-Capture Hnefatafl}\ is a loopy game, it is not necessarily in \cclass{PSPACE}. This leaves the exact complexity of the game unresolved. (Loopy rulesets are games where a position can be repeated during the course of play.) \begin{Open} Is \ruleset{Forced-Capture Hnefatafl}\ \cclass{PSPACE}-complete? Is it \cclass{EXPTIME}-hard? \end{Open} Naturally, we also want to know whether this could be a useful step towards proving the hardness of \ruleset{Hnefatafl}\ itself. This result is evidence that it might be \cclass{PSPACE}-hard, but so far this larger problem remains unsolved. One can devise positions that are easy to solve in \ruleset{Forced-Capture Hnefatafl}\ but difficult without the forced-capture rule, and vice versa. \begin{Open} What is the computational complexity of \ruleset{Hnefatafl}? \end{Open} In the introduction to \ruleset{Hnefatafl}, we mention many variant rules. It could be that these have a non-trivial influence on the computational complexity of the game. Perhaps some variants are easy and others are hard. \begin{Open} What effects do the variant rules have on the complexity of \ruleset{Hnefatafl}? \end{Open} Finally, we consider the case where the Defender only has a king remaining with no other pieces. Because of the very lopsided situation, we reason that this might even be in \cclass{NP}, because there might be a polynomial sequence of moves that either traps the king or reveals a path to escape. \begin{Open} What is the complexity of \ruleset{Hnefatafl}\ when the only defending piece remaining is the king? \end{Open} \section{Acknowledgments}\label{sec:acknowledgments} We thank the Ludcke family for their generous support. \bibliographystyle{plainurl}
{'timestamp': '2023-01-18T02:13:27', 'yymm': '2301', 'arxiv_id': '2301.06127', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06127'}
arxiv
\section{Additional Technical Results} The following lemma suggests an efficient method to estimate each unknown component of \eqref{eqn:true-opt-problem}. \begin{lemma} \label{prop:double-robust} For some $g: \mathcal{Y} \rightarrow \mathbb{R}$ and $h_w: \mathcal{W} \rightarrow \mathbb{R}$, let $\mu_{g,a}=\mathbb{E}[g(Y) \mid X,S, A=a]$, so $\eta=\{\pi_a, \mu_{g,a}\}$. Also, define our parameter and the corresponding estimator by $\psi_{g,a} = \mathbb{E}[g(Y^a)h_w(W)]$, $\widehat{\psi}_{g,a}=\mathbb{P}\{\varphi_a(g(Y);\widehat{\eta})h_w(W)\}$, respectively. If we assume that: \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:B1}{(B1)} either 1) $\widehat{\eta}$ are estimated using sample splitting or 2) the function class $\{\varphi_a(\cdot;\eta): \eta \in (0,1)^2\times \mathbb{R}^2\}$ is Donsker in $\eta$ \item \customlabel{assumption:B2}{(B2)} $\mathbb{P}(\widehat{\pi}_a \in [\epsilon, 1-\epsilon]) = 1$ for some $\epsilon > 0$ \item \customlabel{assumption:B3}{(B3)} $\Vert \widehat{\mu}_{g,a}- \mu_{g,a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(1)$, \end{enumerate} Then we have \begin{align*} \Vert \widehat{\psi}_a - \psi_a \Vert_2 &= O_\mathbb{P}\left(\Vert \widehat{\pi}_a - \pi_a \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{g,a}- \mu_{g,a} \Vert_{2,\mathbb{P}} \right). \end{align*} If we further assume that \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:B4}{(B4)} $ \begin{aligned}[t] &\Vert \widehat{\psi}_{g,a} - {\psi}_{g,a} \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{g,a} - \mu_{g,a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(n^{-1/2}), \end{aligned} $ \end{enumerate} then \begin{align} \label{eqn:asymptotic-psi} \sqrt{n}(\widehat{\psi}_{g,a} - {\psi}_{g,a}) \xrightarrow[]{d} N\left(0,\text{var}\left(\varphi_a(g(Y);\eta)h_w(W)\right)\right), \end{align} and the estimator $\widehat{\psi}_{g,a} $ is efficient, meaning no other estimators have smaller asymptotic variance. \end{lemma} \section{Proofs} \textbf{Extra notations.} We let $\mathbb{B}_r(z)$ denote an open ball of radius $r$ centered at $z$, and let $M_l$ and $v_l$ denote the $l$-th row and the $l$-th element in a matrix $M$ and a vector $v$, respectively. We use $(M)_{ij}$ to denote the $(i,j)$-element of the matrix $M$. Further, we let $\Vert M \Vert_F$ denote the Frobenius norm. $\Vert \cdot \Vert_2$ is understood as the spectral norm when it is used with a matrix. Further, we let $o_{x \rightarrow \alpha}(1)$ denote some function of $x$ that converges to $0$ when $x \rightarrow \alpha$, i.e., a function $\mathsf{h}_{\alpha}(x): \mathcal{X} \rightarrow \mathbb{R}^r$ such that $\underset{x \rightarrow \alpha}{\lim} \bar{\mathsf{h}}_{\alpha}(x)_j = 0$, $\forall j = 1,...,r$ where $r \geq 1$ is appropriately determined by context. This is to distinguish from typical little-o ($o$) asymptotic notation with respect to $n$ in our proofs. \subsection{Proof of Theorem \ref{thm:convergence-rates}} \label{appendix:proof-convergence-rates} We consider a more general case of stochastic nonlinear programming with the deterministic linear constraints; suppose we are concerned with the following true and approximating programs with some finite-dimensional decision variable $x$ in some compact subset $\mathcal{S} \in \mathbb{R}^k$. \begin{minipage}{.5\textwidth} \begin{equation} \label{eqn:true-nlp-linear-constraints} \begin{aligned} &\underset{x \in \mathcal{S}}{\text{minimize}} \quad f(x) \\ & \text{subject to} \quad Cx \leq d \end{aligned} \tag{$\mathsf{P}$} \end{equation} \end{minipage}% \hfill \begin{minipage}{.5\textwidth} \begin{equation} \label{eqn:approx-nlp-linear-constraints} \begin{aligned} & \underset{x \in \mathcal{S}}{\text{minimize}} \quad \widehat{f}(x) \\ & \text{subject to} \quad \widehat{C} x \leq \widehat{d} \end{aligned} \tag{$\widehat{\mathsf{P}}$} \end{equation} \end{minipage} We introduce the \textit{active index set} for our inequality constraints. \begin{definition}[Active set] For $\bar{x}$ in the feasible set, the active index set $J_0$ is defined by \[ J_0(\bar{x}) = \{1\leq j \leq m \mid C_j^\top\bar{x} = d_j \}. \] \end{definition} We first give the following useful lemmas. \begin{lemma} \label{lem:appendix-1} Let $\widehat{x}$ be an optimal solution of \ref{eqn:approx-nlp-linear-constraints}. Assume that both $f, \widehat{f}$ are twice Frechet-differentiable with respect to $x$. Then we have \begin{align*} \textsf{dist}\left(\widehat{x} , \mathsf{s}^*(\text{\ref{eqn:true-nlp-linear-constraints}})\right) &= O_\mathbb{P}\left(\Vert \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \Vert + \Vert \widehat{C} - C \Vert + \Vert\widehat{d} - d \Vert \right). \end{align*} Thus, $\widehat{x}$ is consistent if \ref{eqn:approx-nlp-linear-constraints} is componentwise consistent. \end{lemma} \begin{proof} First note that since \ref{eqn:true-nlp-linear-constraints} and \ref{eqn:approx-nlp-linear-constraints} have feasible sets that consist of only linear inequalities, the KKT optimality conditions hold for the both \citep[][Theorem 5.4]{faigle2013algorithmic}. Let $\gamma$ and $\widehat{\gamma}$ be the dual variables for \ref{eqn:true-nlp-linear-constraints} and \ref{eqn:approx-nlp-linear-constraints}, respectively. Pick $\forall x^* \in \mathsf{s}^*(\text{\ref{eqn:true-nlp-linear-constraints}})$. Then from the complementary slackness, for each $j \in \{1,...,m\}$, we have $\gamma_j (C_jx^*-d_j) =0$ and $\widehat{\gamma}_j (C_j\widehat{x}-\widehat{d}_j) =0$, and thus \begin{align*} \gamma_j (C_jx^*-d_j) - \widehat{\gamma}_j (\widehat{C}_j\widehat{x}-\widehat{d}_j) &= (\gamma_j - \widehat{\gamma}_j)(C_jx^*-d_j) + \widehat{\gamma}_j\left\{(C_jx^*-d_j) - (\widehat{C}_j\widehat{x}-\widehat{d}_j)\right\} \\ &= (\gamma_j - \widehat{\gamma}_j)(C_jx^*-d_j) + \widehat{\gamma}_jC_j(x^* -\widehat{x}) + \widehat{\gamma}_j\left\{ (C_j - \widehat{C}_j)\widehat{x} +\widehat{d}_j - d_j\right\} \\ & = 0. \end{align*} By Cauchy Schwarz inequality, this leads to \begin{equation} \label{aux-eqn:lemma-1-1} \begin{cases} j \notin J_0(x^*) \, \Rightarrow \, \widehat{\gamma}_j - \gamma_j = O\left( \Vert \widehat{x}- x^* \Vert + \Vert \widehat{C}_j- C_j \Vert + \vert \widehat{d}_j- d_j \vert \right), \\ j \in J_0(x^*) \, \Rightarrow \, \widehat{\gamma}_j = 0 . \end{cases} \end{equation} Now, from the stationary conditions, by adding and subtracting terms it follows \begin{align*} 0 &= \nabla_x\widehat{f}(\widehat{x}) - \nabla_xf(x^*) + \sum_j\left\{ \widehat{\gamma}_j\widehat{C}_j^\top - \gamma_jC_j^\top \right\} \\ &= \nabla_x\widehat{f}(\widehat{x}) - \nabla_x\widehat{f}(x^*) + \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) + \sum_j\left\{(\widehat{\gamma}_j-\gamma_j)\widehat{C}_j^\top + \gamma_j(\widehat{C}_j^\top- C_j^\top)\right\} \\ & = (\widehat{x} - x^*)^\top \nabla^2_{x}\widehat{f}(x^*) + (\widehat{x} - x^*) o_{\widehat{x} \rightarrow x^*}(1) + \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \\ & \quad + \sum_j\left\{(\widehat{\gamma}_j-\gamma_j)\widehat{C}_j^\top + \gamma_j(\widehat{C}_j^\top- C_j^\top)\right\}, \end{align*} where the last equality follows by Taylor's theorem. Hence, by applying \eqref{aux-eqn:lemma-1-1} to the last display above, we obtain \begin{align*} \Vert \widehat{x}-x^* \Vert\left\{O(1) + o_{\widehat{x} \rightarrow x^*}(1) \right\} & \leq \Vert \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \Vert + O\left(\sum_j \vert \widehat{\gamma}_j - \gamma_j \vert \right) \\ & \Vert \widehat{x}-x^* \Vert\left\{O(1) + o_{\widehat{x} \rightarrow x^*}(1) \right\} +\nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) + O\left( \sum_j \left\{ \vert \widehat{d}_j - d_j \vert + \Vert \widehat{C}_j^\top - {C}_j^\top \Vert \right\} \right) \\ & = 0. \end{align*} Hence, from the given consistency conditions that $\Vert \nabla_x\widehat{f} - \nabla_xf \Vert = o_\mathbb{P}(1)$, $\vert \widehat{d}_j - d_j \vert = o_\mathbb{P}(1)$ and $\Vert \widehat{C}_j^\top - {C}_j^\top \Vert = o_\mathbb{P}(1)$, we get \[ \Vert \widehat{x} - x^* \Vert = \] which leads to the conclusion $\Vert \widehat{x} - x^* \Vert = o_\mathbb{P}(1)$. From $\textsf{dist}(x^*, \mathsf{s}^*(\mathsf{P}(\widehat{x}))) \leq \Vert \widehat{x} - x^* \Vert$, the desired result follows. \end{proof} \begin{lemma} \label{lem:appendix-2} Under the same conditions of Lemma \ref{lem:appendix-1}, if we further assume that $f$ is convex, we have \begin{align*} \textsf{dist}\left(\widehat{x} , \mathsf{s}^*(\text{\ref{eqn:true-nlp-linear-constraints}})\right) = O_\mathbb{P}\left( \Vert \nabla_x^2\widehat{f}(x^*) - \nabla_x^2 f(x^*) \Vert \right). \end{align*} \end{lemma} \begin{proof} Pick $x^*$, $\widehat{x}$ such that $\Vert \widehat{x} - x^* \Vert = \textsf{dist}(x^*, \mathsf{s}^*(\mathsf{P}(\widehat{\theta})))$. By Taylor's theorem \begin{align*} \widehat{f}(\widehat{x}) = \widehat{f}(x^*) + \nabla_x\widehat{f}(x^*)^\top(\widehat{x}-x^*) + \frac{1}{2}(\widehat{x}-x^*)^\top \nabla_x^2\widehat{f}(x^*) (\widehat{x}-x^*) + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right). \end{align*} Since $\widehat{f}(\widehat{x}) - \widehat{f}(x^*) \leq 0$, $\forall x^*, \widehat{x} \in \mathcal{S}$, by adding and subtracting terms from the above equality, we get \begin{align}\label{eqn:proof-1-disp-1} 0 & \geq \nabla_x\widehat{f}(x^*)^\top(\widehat{x}-x^*) + \frac{1}{2}(\widehat{x}-x^*)^\top \nabla_x^2\widehat{f}(x^*) (\widehat{x}-x^*) + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right) \nonumber \\ & = \left\{\nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \right\}^\top(\widehat{x}-x^*) + \nabla_xf(x^*)^\top(\widehat{x}-x^*) \nonumber\\ & \quad + \frac{1}{2}(\widehat{x}-x^*)^\top \left\{ \nabla_x^2\widehat{f}(x^*) - \nabla_x^2 f(x^*) + \nabla_x^2 f(x^*) \right\} (\widehat{x}-x^*) + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right) \nonumber \\ & = \left\{\nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \right\}^\top(\widehat{x}-x^*) + \nabla_xf(x^*)^\top(\widehat{x}-x^*) \nonumber \\ & \quad + \frac{1}{2}(\widehat{x}-x^*)^\top \left\{ \nabla_x^2\widehat{f}(x^*) - \nabla_x^2 f(x^*) \right\} (\widehat{x}-x^*) + \frac{1}{2}(\widehat{x}-x^*)^\top \nabla_x^2 f(x^*) (\widehat{x}-x^*) + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right). \end{align} Since we only have linear inequalities in \ref{eqn:true-nlp-linear-constraints} and $\nabla_x^2 f(x^*)$ is positive definite, the quadratic growth condition holds at $x^*$ \citep[][Theorem 2.4]{still2018lectures}. Namely with some $\delta^* >0$ and $\kappa >0$ it holds: \[ f(\widehat{x}, {\theta}) - f(x^*, {\theta}) \geq \kappa \Vert \widehat{x}-x^* \Vert^2 \quad \forall \widehat{x} \in \mathbb{B}_{\delta}(x^*). \] Hence, again from Taylor's theorem it follows \begin{align*} &\nabla_xf(x^*, {\theta})^\top(\widehat{x}-x^*) + \frac{1}{2}(\widehat{x}-x^*)^\top \nabla_x^2f(x^*, {\theta}) (\widehat{x}-x^*) \\ &= f(\widehat{x}, {\theta}) - f(x^*, {\theta}) + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right)\\ & \geq \kappa \Vert \widehat{x}-x^* \Vert^2 + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right). \end{align*} By applying this result to \eqref{eqn:proof-1-disp-1}, we have \begin{align*} 0 &\geq \left\{\nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \right\}^\top(\widehat{x}-x^*) + \frac{1}{2}(\widehat{x}-x^*)^\top \left\{ \nabla_x^2\widehat{f}(x^*) - \nabla_x^2 f(x^*) \right\} (\widehat{x}-x^*) \\ & \quad + \kappa \Vert \widehat{x}-x^* \Vert^2 + o_{\widehat{x} \rightarrow x^*}\left(\Vert \widehat{x}-x^* \Vert^2 \right). \end{align*} By the Cauchy–Schwarz inequality, \begin{align*} \left\{1 + o_{\widehat{x} \rightarrow x^*}(1) \right\}\Vert \widehat{x}-x^* \Vert^2 \lesssim \Vert \widehat{x}-x^* \Vert \left\{ \Vert \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \Vert + \Vert \widehat{x}-x^*\Vert \Vert \nabla_x^2\widehat{f}(x^*) - \nabla_x^2 f(x^*) \Vert_F \right\}. \end{align*} Given that $\Vert \nabla_x^2\widehat{f}(x^*) - \nabla_x^2 f(x^*) \Vert_F = o_{\mathbb{P}}(1)$, the above inequality forces that $\left\Vert \widehat{x}-x^* \right\Vert = O_\mathbb{P} \left(\left \Vert \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \right\Vert\right)$. \end{proof} \begin{proof} Let $\gamma$ and $\widehat{\gamma}$ be the dual variables for \ref{eqn:true-nlp-linear-constraints} and \ref{eqn:approx-nlp-linear-constraints}, respectively. We first aim to show that \begin{align} \label{eqn:appendix-proof2-2} \Vert \widehat{\gamma}_j-\gamma_j \Vert = O_\mathbb{P} \left( \Vert \widehat{x} - x^* \Vert + n^{-1/2} \right). \end{align} To this end, we note that since \ref{eqn:true-nlp-linear-constraints} and \ref{eqn:approx-nlp-linear-constraints} have feasible sets that consist of only linear inequalities, the KKT optimality conditions hold for the both \citep[][Theorem 5.4]{faigle2013algorithmic}. From the stationary conditions, by adding and subtracting terms it follows \begin{align*} 0 &= \nabla_x\widehat{f}(\widehat{x}) - \nabla_xf(x^*) + \sum_j\left\{ \widehat{\gamma}_j\widehat{C}_j^\top - \gamma_jC_j^\top \right\} \\ &= \nabla_x\widehat{f}(\widehat{x}) - \nabla_x\widehat{f}(x^*) + \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) + \sum_j\left\{(\widehat{\gamma}_j-\gamma_j){C}_j^\top + \widehat{\gamma}_j(\widehat{C}_j^\top- C_j^\top)\right\} \\ & = (\widehat{x} - x^*)^\top \nabla^2_{x}\widehat{f}(x^*) + (\widehat{x} - x^*) o_{\widehat{x} \rightarrow x^*}(1) + \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \\ & \quad + \sum_j\left\{(\widehat{\gamma}_j-\gamma_j){C}_j^\top + \widehat{\gamma}_j(\widehat{C}_j^\top- C_j^\top)\right\}, \end{align*} where the last equality follows by Taylor's theorem. Since we have assumed non-zero rows in $C$, by the Cauchy–Schwarz and triangle inequalities we obtain \begin{align*} \Vert \widehat{\gamma}_j-\gamma_j \Vert &\lesssim \Vert \widehat{x} - x^* \Vert + \Vert \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \Vert + \Vert \widehat{C} - C \Vert \\ & \leq \Vert \widehat{x} - x^* \Vert + \Vert \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) \Vert_F + \Vert \widehat{C} - C \Vert_F. \end{align*} Note that under the nonparametric condition \ref{}, we get the desired result \eqref{eqn:appendix-proof2-2}. Next, consider the following perturbed parametrized program \ref{eqn:true-parametrized-nlp-linear-constraints}: \begin{equation} \label{eqn:true-parametrized-nlp-linear-constraints} \begin{aligned} &\underset{x \in \mathcal{S}}{\text{minimize}} \quad f(x) + x^\top\xi_1 \\ & \text{subject to} \quad Cx - d - \xi_2 \leq 0, \end{aligned} \tag{$\mathsf{P}_\xi$} \end{equation} for a parameter $\xi = (\xi_1, \xi_2) \in \mathbb{R}^k \times \mathbb{R}^m$. Let $\bar{x}(\xi)$ denote the solution of the program \ref{eqn:true-parametrized-nlp-linear-constraints}. Clearly, we get $\bar{x}(0) = x^*$. We have already shown that $\widehat{x} \xrightarrow[]{p} x^*$ in Theorem \ref{thm:convergence-rates}. Hence by \citet[][Theorem 3.1]{shapiro1993asymptotic}, we get \begin{align*} \widehat{x} = \bar{x}(\zeta) + o_\mathbb{P}(n^{-1/2}) \end{align*} where \begin{align*} \zeta = \begin{bmatrix} \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) - \sum_j\gamma_j\left\{ \widehat{C}_j^\top - C_j^\top \right\} \\ (\widehat{C} - C)x^* \end{bmatrix} \equiv \begin{bmatrix} \zeta_1 \\ \zeta_2 \end{bmatrix}. \end{align*} We are particularly interested in $\bar{x}(\zeta)$. If $\bar{x}(\xi)$ is Frechet differentiable at $\xi=0$, we have \begin{align*} \bar{x}(\xi) - x^* = D_0\bar{x}(\xi) + o(\Vert\xi\Vert), \end{align*} for some mapping $D_0\bar{x}: \mathbb{R}^k \rightarrow \mathbb{R}^k$. Under the given conditions this leads to \begin{align*} n^{1/2}\left(\widehat{x} - x^* \right) = D_0\bar{x}(n^{1/2}\zeta) + o_\mathbb{P}(1). \end{align*} By Lemma \ref{lem:} and the delta theorem, it follows that \begin{align*} n^{1/2}\zeta \xrightarrow{d} \begin{bmatrix} \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*) - \sum_j\gamma_j\left\{ \widehat{C}_j^\top - C_j^\top \right\} \\ (\widehat{C} - C)x^* \end{bmatrix}. \end{align*} Now we shall show that the mapping $D_0\bar{x}(\cdot)$ is linear. To this end, we first compute the directional derivative of $\bar{x}(\xi)$ and $\xi = 0$. This can be accomplished by showing that $\bar{x}(\xi)$ is locally totally differentiable at $\xi = 0$, followed by applying an appropriate form of the implicit function theorem. Define a vector-valued function $H \in \mathbb{R}^{(k+m)}$ by \[ H(x, \xi, \gamma) = \begin{pmatrix} \nabla_xf(x) + C^\top\gamma + \xi_1 \\ \diag(\gamma)(Cx - d - \xi_2) \end{pmatrix}. \] Under the additional assumptions \ref{} and \ref{}, the solution of $H(x, \xi, \gamma)=0$ satisfies the KKT condition for \ref{eqn:true-parametrized-nlp-linear-constraints}. In other words in our setting, $H(\bar{x}(\xi), \xi, \bar{\gamma}(\xi))=0$ where $\bar{\gamma}(\xi)$ is the corresponding multipliers. Now by the classical implicit function theorem \citep[e.g.,][Theorem 1B.1]{dontchev2009implicit}, the total derivative at $\xi=0$ can be computed by \[ \nabla_\xi \bar{x}(0) = - \begin{matrix} \bm{J}_{x,\gamma} H(\bar{x}(0), 0, \bar{\gamma}(0)) \end{matrix}^{-1} \begin{bmatrix} \bm{J}_{\xi} H(\bar{x}(0), 0, \bar{\gamma}(0)) \end{bmatrix}, \] where in our case, \[ \bm{J}_{x,\gamma} H(\bar{x}(0), 0, \bar{\gamma}(0)) = \begin{bmatrix} \nabla^2_xf(x^*) & C^\top \\ \diag(\gamma)C & \diag(Cx^*-d) \end{bmatrix}, \] and \[ \bm{J}_{\xi} H(\bar{x}(0), 0, \bar{\gamma}(0)) = \begin{bmatrix} \bm{1} \\ \diag(\gamma)\bm{1} \end{bmatrix}. \] Here the inverse of $\begin{matrix} \bm{J}_{x,\gamma} H(\bar{x}(0), 0, \bar{\gamma}(0)) \end{matrix}$ always exists. Therefore we finally obtain that \begin{align*} D_0\bar{x}(n^{1/2}\zeta) \xrightarrow{d} \begin{bmatrix} \nabla^2_xf(x^*) & C^\top \\ \diag(\gamma)C & \diag(Cx^*-d) \end{bmatrix}^{-1} \begin{bmatrix} \bm{1} \\ \diag(\gamma)\bm{1} \end{bmatrix} \Upsilon, \end{align*} which, by Slutsky's theorem, implies \begin{align*} n^{1/2}\left(\widehat{x} - x^* \right) \xrightarrow{d} . \end{align*} \end{proof} \section{Introduction} \label{sec:intro} \textit{Counterfactual (or potential) outcomes} (or counterfactuals) are used to describe how a unit would respond to a specific event or treatment, irrespective of whether the event actually takes place. They are commonly used in causal inference where we would like to intervene a factual prior event and then assess the consequences of that change \citep{rubin1974estimating, holland1986statistics,hofler2005causal}. More recently, counterfactual outcomes have also been proved to be useful to support decision making when there is a need for predicting outcomes under hypothetical interventions. This is commonly referred to as \textit{counterfactual prediction}. Counterfactual prediction can correctly aid an important decision making in health care when randomized clinical trials are not feasible; for example, to inform decision making about treatment initiation we often require predicted risks assuming no treatment is given \citep[see, e.g.,][for more examples]{dickerman2020counterfactual, lin2021scoping}. However, the problem of counterfactual prediction brings some interesting challenges that do not arise in typical prediction problems as underlying data that we need to build predictive models are inherently not fully observable. Surprisingly, while the development of modern prediction modeling has greatly enriched causal inference via non- and semi-parametric methods \citep{kennedy2016semiparametric}, the use of causal inference to improve prediction modeling has received far less attention, although its potential is well acknowledged \citep{dickerman2020counterfactual}. On the other hand, when building predictive models we often want to incorporate various constraints into our models. Such constraints allow us to use flexible penalization \citep{james2013penalized} or prior information \citep{gaines2018algorithms}, or to achieve fairness \citep{mishler2021fade}. In particular, we focus on the fairness constraints. By \textit{fairness}, we mean that our predictive models are not systematically biased so that the benefits (harms) do not accrue disproportionately to already (under-) privileged groups. The need of mitigating this unwanted algorithmic bias with respect to certain sensitive features (e.g., gender, race, etc.) gives rise to an unprecedented explosion of academic interest in algorithmic fairness lately \citep[see][for an overview]{barocas-hardt-narayanan}. In this work, we study counterfactual classification, a special case of counterfactual prediction where $Y$ is discrete, in a way that we can also minimize unfairness in models by incorporating fairness criteria. To this end, we turn our classification problem into a nonlinear constrained optimization problem where not only model accuracy but also unfairness is minimized. Then we propose an doubly robust estimator that can achieve fast root-n rates and tractable inference. \subsection{Related Work} Our work lies at the intersection of causal inference, algorithmic fairness, and stochastic optimization. Counterfactual prediction is closely related to conditional average treatment effect estimation, which plays a crucial role in precision medicine and individualized policy. Let $Y^a$ denote the counterfactual outcomes that would have been observed under $A=a$, $A \in \{0,1\}$. The conditional average treatment effect (CATE) for subjects with a covariate $X=x$ is defined by $\tau(x) = \mathbb{E}[Y^1 - Y^0 \mid X=x]$. There exists a vast literature on estimating the CATE. There are some important early works which assumed that $\tau(x)$ follows some known parametric form \citep[e.g.,][]{van2006statistical, robins2000marginal, van2003unified, vansteelandt2014structural}. More recently, people have moved toward leveraging flexible nonparametric and machine learning methods \citep[e.g.,][]{luedtke2016super, athey2016recursive, imai2013estimating, wager2018estimation, kunzel2017meta, nie2017quasi, kennedy2020optimal, alaa2017bayesian, lu2018estimating}. A desirable property commonly held in the CATE estimation methods is that the function $\tau$ may be more structured and simple than the main effect function $\mathbb{E}[Y^a \mid X=x]$. Here, we are concerned with the problem of estimating the counterfactual prediction of $\mathbb{E}[Y^a \mid X=x]$ under a single hypothetical intervention $A=a$, subject to fairness constraints. Without such constraints, the most straightforward approach is obtaining an identified expression for $\mathbb{E}[Y^a \mid X]$ and then fitting a corresponding regression or classification model. In randomized controlled trials, this is reduced to fitting a regression model $\mathbb{E}[Y \mid X]$ to the specific arm ($A=a$) \citep{nguyen2020counterfactual, li2016predictive}. A similar argument also applies to observational studies, which will be discussed in more detail in the next section. However, in this approach it is not clear how to incorporate the given fairness constraints into our setting, since with constraints in general our target parameter will not be given as a closed-form functional form. In our approach, we directly formulate and solve an optimization problem where we can flexibly incorporate fairness constraints. Most of the existing fairness literature that is concerned with observable fairness criteria. However, a growing number of recent literature have shown that counterfactuals are promising tools for algorithmic fairness. One set of fairness criteria consider counterfactuals with respect to the sensitive features \citep{kusner2017counterfactual, nabi2018fair, nabi2019learning, wang2019equal, zhang2018fairness}. This set of counterfactual fairness criteria has brought about some controversy over whether it gives meaningful interpretation or is practically useful \citep[e.g.,][]{vanderweele2014causal}. More recently, a distinct set of approaches consider counterfactuals with respect to a decision or treatment where one can actually give an intervention \citep{mishler2021fade,mishler2021fairness, coston2020counterfactual}. Our results are closest to \cite{mishler2021fade}, who explore counterfactual fairness-accuracy tradeoffs in the regression framework based on the closed-form penalized estimators. More broadly, our problem can be regarded as stochastic programming in the sense that their components are unknown and thus need to be estimated. Two most common approaches in stochastic programming are {stochastic approximation} (SA) and {sample average approximation} (SAA) \citep[e.g.,][]{nemirovski2009robust, shapiro2014lectures}. However, the standard SA and SAA approaches are not readily feasible in our setting, since we cannot compute sample moments or stochastic subgradients that involve unobserved counterfactual outcomes. Importantly, they cannot harness efficient estimators for counterfactual parameters: e.g., doubly-robust or semiparametric estimators with cross-fitting \citep[][]{Chernozhukov17, newey2018cross}. To address this issue, more general approaches beyond the SA and SAA settings may be considered \citep[e.g.,][]{dupacova1988asymptotic, shapiro1991asymptotic, shapiro1993asymptotic, shapiro2000statistical}, but these require stronger assumptions on behavior of the optimal solution and its estimator. \subsection{Contribution} \section{Problem and Setup} Suppose that we have access to an i.i.d. sample $(Z_{1}, ... , Z_{n})$ of tuples $Z=(Y,A,S,X) \sim \mathbb{P}$ for some distribution $\mathbb{P}$, binary outcome $Y \in \{0,1\}$, pretreatment covariates $X \in \mathcal{X} \subset \mathbb{R}^{d_x}$, binary sensitive feature $S \in \{0,1\}$, and intervention $A \in \mathcal{A}=\{0,1\}$. For simplicity, here we assume $A$, $S$ are binary, but in principle they can be multi-valued. Let $W=(A,S,X) \in \mathcal{W}$ be the collected covariates. We are concerned with the following constrained optimization problem: \begin{equation} \label{eqn:true-opt-problem-C} \begin{aligned} & \underset{\beta \in \mathcal{B}}{\text{minimize}} \quad \mathcal{L}_{\text{CE}}\left(Y^a,\sigma(\beta, \bm{b}(W))\right) \\ & \text{subject to } \quad \left\vert \mathcal{U}_{j}(\beta,W,Y^a) \right\vert \leq \delta_j \\ & \phantom{\text{subject to }} \quad \,\, C\beta \leq d, \end{aligned} \tag{$\mathsf{P}_C$} \end{equation} for some compact subset $\mathcal{B} \in \mathbb{R}^k$ and $C \in \mathbb{R}^{m\times k}$, $d \in \mathbb{R}^m$. Here, $\sigma(\cdot)$ is some $C^2$ function used to predict the score function and $\bm{b}(W)=[b_1(W),...,b_k(W)]^\top$ represents a set of basis functions for $W$ (e.g., truncated series, kernel, etc.). $\mathcal{L}_{\text{CE}}\left(Y^a,\sigma(\beta, \bm{b}(X))\right)$ is our classification risk based on the cross-entropy, and $\left\vert \mathcal{U}_{j}(\beta,W,Y^a) \right\vert$ is a magnitude of the unfairness with the $j$-th fairness criterion and corresponding tolerance level $\delta_j > 0$, each of which is defined as \begin{align} \mathcal{L}_{\text{CE}}\left(Y^a,\sigma(\beta, \bm{b}(W))\right) & \coloneqq -\mathbb{E}\left\{ Y^a\log \sigma(\beta, \bm{b}(W)) - (1-Y^a)\log(1-\sigma(\beta, \bm{b}(W))) \right\}, \label{eqn:ce-risk} \\ \mathcal{U}_{j}(\beta,W,Y^a) & \coloneqq \mathbb{E}\left\{g_{\text{fair},j}(W,Y^a)g_{\text{pred}}(\beta,\bm{b}(W),Y^a)\right\}, \label{eqn:unfairness-utility} \end{align} for some known function $g_{\text{fair},j}, g_{\text{pred}}$. We will provide more detailed explanation on $\mathcal{L}_{\text{CE}}$ and $\mathcal{U}$ shortly. The linear constraints $C\beta \leq d$ can be used for penalization or other practical restrictions \citep[e.g.,][]{gaines2018algorithms}. \eqref{eqn:true-opt-problem} solves our fair counterfactual classification task by minimizing both counterfactual risk and unfairness measures. We will discuss each component in further detail as follows. \textbf{Classification risk.} $\mathcal{L}(Y^a,\sigma(\beta, \bm{b}(W)))$ is the expected cross entropy loss for the counterfactual outcome $Y^a$ and our score function $\sigma(\beta, \bm{b}(W))$, and serves as our classification risk. Probably the most widely-used choice is the logistic regression with the given basis expansion $\bm{b}(\cdot)$, in which $\sigma(\cdot)$ is the sigmoid function that takes a single input of $\beta^\top\bm{b}(X)$ so $\mathcal{L}(Y^a,\sigma(\beta, \bm{b}(W)))$ is guaranteed to be convex. However, one may employ other more flexible classification modeling techniques such as neural networks, as long as we use a smooth, finite-dimensional parametric score function. Note that in \eqref{eqn:true-opt-problem}, we do not assume anything about the true functional relationship between $Y^a$ and $\beta$; $\beta$ is the parameter of the best-fitting function of the form $\sigma(\beta, \bm{b}(X))$. \textbf{Unfairness Measure.} Our unfairness measure is defined by the expected value of the two random components $g_{\text{fair}}(W,Y^a)$ and $g_{\text{pred}}(\beta,W,Y^a)$; $g_{\text{fair}}$ is a \textit{fairness function} that characterizes the nature of (un)fairness, and $g_{\text{pred}}$ is a \textit{prediction feature function} that determines which features of our predictions are to be constrained over different groups. The use of $g_{\text{fair}}$ allows us to accommodate a broad range of fairness criteria \citep[see][Section 2]{mishler2021fade}. For example, by using the following fairness functions \begin{align*} g_{\text{FPR}}(W,Y^a) = \frac{(1-Y^a)(1-A)}{\mathbb{E}[(1-Y^a)(1-A)]} - \frac{(1-Y^a)A}{\mathbb{E}[(1-Y^a)A]}, \, g_{\text{FNR}}(W,Y^a) = \frac{Y^aA}{\mathbb{E}[Y^aA]} - \frac{Y^a(1-A)}{\mathbb{E}[Y^a(1-A)]}, \end{align*} we can have the {false positive} and the {false negative rates} to be approximately equal across the two groups, in the sense that \begin{align} & \left\vert \mathbb{E}\left\{g_{\text{pred}}(\beta,W,Y^a) \mid S=0, Y^a=0 \right\} - \mathbb{E}\left\{g_{\text{pred}}(\beta,W,Y^a) \mid S=1, Y^a=0 \right\}\right\vert \leq \delta \label{eqn:false-positive-rate-disparity} \\ & \left\vert \mathbb{E}\left\{g_{\text{pred}}(\beta,W,Y^a) \mid S=0, Y^a=1 \right\} - \mathbb{E}\left\{g_{\text{pred}}(\beta,W,Y^a) \mid S=1, Y^a=1 \right\}\right\vert \leq \delta \label{eqn:false-negative-rate-disparity}. \end{align} This conditions require our predictions be independent of the sensitive features conditional on the counterfactual outcome $Y^a$. \eqref{eqn:false-negative-rate-disparity} alone measures violations of \textit{equal opportunity}, while \eqref{eqn:false-negative-rate-disparity} and \eqref{eqn:false-positive-rate-disparity} together measure violations of \textit{equalized odds} \citep{mishler2021fairness, hardt2016equality, barocas-hardt-narayanan}. One may use non-counterfactual fairness criteria as well. For example, by using the following fairness function \begin{align*} g_{\text{SR}}(W,Y^a) = \frac{(1-A)}{\mathbb{E}[1-A]} - \frac{A}{\mathbb{E}[A]}, \end{align*} we can pursue the criterion of \textit{independence}: \begin{align} \label{eqn:independence} \left\vert \mathbb{E}\left\{g_{\text{pred}}(\beta,W,Y^a) \mid S=0 \right\} - \mathbb{E}\left\{g_{\text{pred}}(\beta,W,Y^a) \mid S=1 \right\}\right\vert \leq \delta, \end{align} which requires our predictions to be independent of the sensitive features \citep{calders2010three, barocas-hardt-narayanan}. In this case, the corresponding fairness constraints will be non-counterfactual in the sense that they do not depend on the value of $Y^a$. \\ For $g_{\text{pred}}$, one may focus on constraining the mean predictions by simply letting $g_{\text{pred}}(\beta,W)=\sigma(\beta, \bm{b}(W))$ as in most studies in the fairness literature. However in our setting, one may consider more general features of our predictions to be constrained beyond mean. For example, with some known function $g_{\text{transform}}$ one may let $g_{\text{pred}}(\beta,W)=(g_{\text{transform}}\circ \sigma)(\beta, \bm{b}(W))$ where $g_{\text{transform}}$ can be used as a weight function or to make $g_{\text{pred}}$ convex. Or we can set $g_{\text{pred},l}(\beta,W)=\left[\sigma(\beta, \bm{b}(W))\right]^l$, $l \in \mathbb{N}$ if we want to require the higher order moments, not just mean, across groups to be approximately equal. Further, if we want the classification risk itself to be approximately equal across groups, we can set $g_{\text{pred}}(\beta,W,Y^a) = \mathcal{L}_{\text{CE}}\left(Y^a,\sigma(\beta, \bm{b}(W))\right)$ $g_{\text{pred}}$. In this case, $g_{\text{pred}}$ involves the counterfactual outcome $Y^a$ as well. This shows that our framework is more general than \cite{mishler2021fade}, still being compatible with a wide collection of existing fairness criteria. \textbf{Notation.} Here we give some notation used throughout this paper. For any fixed vector $v$, we let $\Vert v \Vert_2$ denote the Euclidean norm (or $L_2$-norm). $\Vert \cdot \Vert_2$ is understood as the spectral norm when it is used with a matrix. Let $\mathbb{P}_n$ denote the empirical measure over $(Z_1,...,Z_n)$. Given a sample operator $h$ (e.g., an estimated function), we let $\mathbb{P}$ denote the conditional expectation over a new independent observation $Z$, as in $\mathbb{P}(h)=\mathbb{P}\{h(Z)\}=\int h(z)d\mathbb{P}(z)$. Further, we use $\Vert h \Vert_{2,\mathbb{P}}$ to denote the $L_2(\mathbb{P})$ norm of $h$ defined by $\Vert h \Vert_{2,\mathbb{P}} = \left[\mathbb{P} (h^2) \right]^{1/2} = \left[\int h(z)^2 d\mathbb{P}(z)\right]^{1/2}$. Lastly, we let $\mathsf{s}^*(\mathsf{P})$ denote the set of optimal solutions of an optimization program $\mathsf{P}$, and define $\textsf{dist}(x, S) = \inf\left\{ \Vert x - y\Vert_2: y \in S \right\}$ to denote the distance from a point $x$ to a set $S$. \section{Estimation Algorithm} Let $\beta^*$ denote an optimal solution of the ``true" program \eqref{eqn:true-opt-problem} which is the parameter of interest. Since \eqref{eqn:true-opt-problem} is not directly solvable, in order to estimate $\beta^*$ we need to find an approximating program of \eqref{eqn:true-opt-problem}. To this end, we first discuss the problem of obtaining efficient estimates for functionals of the form $\psi_a = \mathbb{E}\left\{\mathbb{E}[h_1(Y) \mid X,S,A=a ]h_2(W)\right\}$ for some known, deterministic functions $h_1:\mathcal{Y} \rightarrow \mathbb{R}$, $h_2:\mathcal{W} \rightarrow \mathbb{R}$, based on the semiparametric approach in causal inference. To simplify notation, we let \begin{align*} & \varphi_a(h_1(Y);\eta) = \frac{\mathbbm{1}(A=a)}{\pi_a(X,S)}\left\{h_1(Y)- \mathbb{E}[h_1(Y) \mid X,S,A]\right\} + \mathbb{E}[h_1(Y) \mid X,S,A=a], \end{align*} denote the uncentered efficient influence functions for the parameter $\mathbb{E}\left\{\mathbb{E}[h_1(Y) \mid X,S,A=a ]\right\}$, where $\pi_a(X,S)=\mathbb{P}_n[A=a \mid X,S]$ is the propensity score function and $\eta=\{\pi_a(X,S), \mathbb{E}[h_1(Y) \mid X,S, A=a]\}$. Following \citep{}, we propose to use \textit{sample splitting} to allow for arbitrarily complex nuisance estimators $\widehat{\eta}$ and avoid empirical process conditions. Specifically, we split the data into $K$ disjoint groups by drawing variables $(B_1,..., B_n)$ independent of the data, with $B_i=b$ indicating that subject $i$ was split into group $b \in \{1,...,K\}$. Then the semiparametric estimator for $\psi_a$ based on the efficient influence function and sample splitting is given by \begin{align} \label{eqn:semiparametric-mean-regression} \widehat{\psi}_a = \frac{1}{K}\sum_{b=1}^K \mathbb{P}_n^b\left\{\varphi_a(h_1(Y);\widehat{\eta}_{-b})h_2(W)\right\} \equiv \mathbb{P}_n\left\{ \varphi_a(h_1(Y);\widehat{\eta}_{-B}) h_2(W) \right\}, \end{align} where we let $\mathbb{P}_n^b$ denote empirical averages only over the set of units $\{i : B_i=b\}$ in the group $b$ and let $\widehat{\eta}_{-b}$ denote the nuisance estimator constructed only using those units $\{i : B_i \neq b\}$. This semiparametric estimator attains the efficiency bound with the double robustness property, thus allows us to employ flexible machine learning methods while achieving the $\sqrt{n}$-rate of convergence and valid inference under weak conditions \citep{kennedy2016semiparametric}. Since each component of the program \eqref{eqn:true-opt-problem} can be represented as a smooth function of arguments of the form $\mathbb{E}[h_1(Y^a)h_2(W)] = \mathbb{E}\left\{\mathbb{E}[h_1(Y) \mid X,S,A=a ]h_2(W)\right\}$ for some deterministic functions $h_1, h_2$ in our setting, we can use \eqref{eqn:semiparametric-mean-regression}. With $\beta$ fixed, we estimate the classification risk as \begin{align*} \widehat{\mathcal{L}}_{\text{CE}}(\beta) = -\mathbb{P}_n\left\{ \varphi_a(Y;\widehat{\eta}_{-B}) \log \sigma(\beta, \bm{b}(W)) - (1-\varphi_a(Y;\widehat{\eta}_{-B}))\log(1-\sigma(\beta, \bm{b}(W))) \right\} \end{align*} For example, if we pursue the equal opportunity in our classification with some prediction feature function $g_{\text{pred}}$ that does not involve $Y^a$, we use the estimators \begin{align*} \widehat{\mathcal{U}}(\beta) = \frac{\mathbb{P}_n\left\{\varphi_a(Y;\widehat{\eta}_{-B})Ag_{\text{pred}}\left(\beta, b(W)\right)\right\}}{\mathbb{P}_n\left\{\varphi_a(Y;\widehat{\eta}_{-B})A\right\}} - \frac{\mathbb{P}_n\left\{\varphi_a(Y;\widehat{\eta}_{-B})(1-A)\left(\beta, b(W)\right)\right\}}{\mathbb{P}_n\left\{\varphi_a(Y;\widehat{\eta}_{-B})(1-A)\right\}}, \end{align*} for $\mathcal{L}_{\text{CE}}\left(Y^a,\sigma(\beta, \bm{b}(W))\right)$ and $\mathbb{E}\left\{g_{\text{FNR}}(W,Y^a)g_{\text{pred}}(\beta,W)\right\}$, respectively, where $\eta=\{\pi_a(X,S), \mathbb{E}[Y \mid X,S, A=a]\}$. In Appendix \ref{}, we enumerate our proposed estimators for other choices for $g_{\text{fair}}$ and $g_{\text{pred}}$ as well. Now that we have proposed the efficient methods to estimate each component of the true program \ref{eqn:true-opt-problem}, we give an approximating program that we aim to solve to estimate $\beta^*$. The most straightforward way is to estimate $\widehat{\mathcal{L}}_{\text{CE}}$ and $\widehat{\mathcal{U}}_j's$, and then plug back into the original program \ref{eqn:true-opt-problem-C}. Next, when all the $\widehat{\mathcal{U}}_j's$ are convex, we can instead aim to solve the following unfairness penalized (Lagrange) form for some $\lambda_j>0$: \begin{equation} \label{eqn:true-opt-problem-L} \begin{aligned} & \underset{\beta \in \mathcal{B}}{\text{minimize}} \quad \mathcal{L}_{\text{CE}}\left(Y^a,\sigma(\beta, \bm{b}(W))\right) + \sum_j \lambda_j\left\{ \mathcal{U}_{j}(\beta,W,Y^a) \right\}^2 \\ & \text{subject to } \quad C\beta \leq d. \end{aligned} \tag{$\mathsf{P}_L$} \end{equation} \begin{claim} Let $\beta^*$ denote an optimal solution in \ref{eqn:true-opt-problem-L} for some $\lambda_j>0$. If each $\widehat{\mathcal{U}}_j$ is convex, then $\beta^*$ is also an optimal solution in \ref{eqn:true-opt-problem-C} with $\delta_j^2 = \left(\mathbb{E}\left\{g_{\text{fair},j}(W,Y^a)g_{\text{pred}}(\beta^*,\bm{b}(W),Y^a)\right\}\right)^2$. If we further assume the Linear Independence Constraint Qualification (LICQ) for \ref{eqn:true-opt-problem-C}, then \ref{eqn:true-opt-problem-C} and \ref{eqn:true-opt-problem-L} are equivalent. \end{claim} Consequently, we consider the following two approximating programs \ref{eqn:approx-C} and \ref{eqn:approx-L}, and aim to compute their optimal solutions $\widehat{\beta}$ as our estimate for $\beta^*$. \begin{minipage}{.4\textwidth} \begin{equation} \label{eqn:approx-C} \begin{aligned} &\underset{\beta \in \mathcal{B}}{\text{minimize}} \quad \widehat{\mathcal{L}}_{\text{CE}}(\beta) \\ &\text{subject to} \,\, \begin{cases}\left\vert \widehat{\mathcal{U}}_j(\beta) \right\vert \leq \delta_j\\ C\beta \leq d\end{cases} \end{aligned} \tag{$\widehat{\mathsf{P}}_C$} \end{equation} \end{minipage}% \hfill \begin{minipage}{.5\textwidth} \begin{equation} \label{eqn:approx-L} \begin{aligned} & \underset{\beta \in \mathcal{B}}{\text{minimize}} \quad \widehat{\mathcal{L}}_{\text{CE}}(\beta) + \sum_j \lambda_j\left\{ \widehat{\mathcal{U}}_{j}(\beta) \right\}^2 \\ & \text{subject to} \quad C\beta \leq d \end{aligned} \tag{$\widehat{\mathsf{P}}_L$} \end{equation} \end{minipage} Although it seemed that \ref{eqn:approx-C} is the most natural way to estimate $\beta^*$, it requires very strong assumptions to establish consistency of our estimator $\widehat{\beta}$ due to its stochastic feasible set. On the other hand, \ref{eqn:approx-L} requires the convexity of $\widehat{\mathcal{U}}_j$ and only allows the indirect control over unfairness via penalization, but we can enjoy much weaker assumptions to achieve the fast rates of convergence for $\widehat{\beta}$. This will be discussed in more details in the following section. \section{Asymptotic Analysis} For some $h_y: \mathcal{Y} \rightarrow \mathbb{R}$, let $\mu_{a}=\mathbb{E}[h_y(Y) \mid X,S, A=a]$, so $\eta=\{\pi_a, \mu_{a}\}$. Assume the following: \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:A1}{(A1)} either i) $\widehat{\eta}$ are estimated using sample splitting or ii) the function class $\{\varphi_a(\cdot;\eta): \eta \in (0,1)^2\times \mathbb{R}^2\}$ is Donsker in $\eta$ \item \customlabel{assumption:A2}{(A2)} $\mathbb{P}(\widehat{\pi}_a \in [\epsilon, 1-\epsilon]) = 1$ for some $\epsilon > 0$ \item \customlabel{assumption:A3}{(A3)} $\Vert \widehat{\mu}_{a}- \mu_{a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(1)$, \item \customlabel{assumption:A4}{(A4)} $ \begin{aligned}[t] &\Vert \widehat{\pi}_{a} - {\pi}_{a} \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{a} - \mu_{a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(n^{-1/2}), \end{aligned} $ \end{enumerate} Assumptions \ref{assumption:A1} - \ref{assumption:A4} are commonly used in the semiparametric literature \citep{}. \begin{theorem}[Rate of Convergence] \label{thm:convergence-rates} Provided that $\widehat{\mathcal{U}}_j$ is a convex function of class $C^2$, let $\widehat{\beta}_L$ denote an optimal solution in \ref{eqn:approx-L}. If we assume \ref{assumption:A1} - \ref{assumption:A3}, then \begin{align*} \textsf{dist}\left(\widehat{\beta}_L , \mathsf{s}^*(\text{\ref{eqn:true-opt-problem-L}})\right) &= O_\mathbb{P}\left(\Vert \widehat{\pi}_a - \pi_a \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{a}- \mu_{a} \Vert_{2,\mathbb{P}} \right). \end{align*} If we further assume the nonparametric condition \ref{assumption:A4}, then we obtain \begin{align*} \textsf{dist}\left(\widehat{\beta}_L , \mathsf{s}^*(\text{\ref{eqn:true-opt-problem-L}})\right) &= O_\mathbb{P}\left(n^{-1/2} \right). \end{align*} \end{theorem} Note that other than the smoothness and convexity of $\widehat{\mathcal{U}}_j$, we do not require any regularity conditions (neither deterministic nor stochastic) on \ref{eqn:true-opt-problem-L} to derive the rate of convergence of $\widehat{\beta}_L$. This is generally not true in stochastic programming. \begin{theorem}[Asymptotic Distribution] \label{thm:asymptotics} Assume the same conditions of Theorem \ref{thm:convergence-rates}. Further assume that \end{theorem} \section{Simulation and Case Study} \subsection{Simulation} We first explore the finite sample properties of our estimators in the simulated dataset. The data generating process is as follows \subsection{Case Study: COMPAS Dataset} Next we apply our method in recidivism risk prediction using the COMPAS dataset \citep{}. This dataset comprises \section{Discussion} \section{Additional Technical Results} \textbf{Extra notations.} We let $\mathbb{B}_r(z)$ denote an open ball of radius $r$ centered at $z$, and let $\Vert M \Vert_F$ denote the Frobenius norm. $\Vert \cdot \Vert_2$ is understood as the spectral norm when it is used with a matrix. Further, for any vector-valued function $h : \mathbb{R}^{d_\theta} \rightarrow \mathbb{R}^{l}$ of arbitrary dimensionality $l$ whose first-order partial derivatives exist, we denote its Jacobian matrix with respect to a variable $\theta$ by $\bm{J}_\theta (h) \in \mathbb{R}^{l \times d_\theta}$. Here we present additional notions and results which we will use for proofs. \begin{definition}[Quadratic growth condition] For each $\beta^* \in \mathsf{s}^*(\mathsf{P})$, there exists a neighborhood $\mathbb{B}_r(\beta^*)$ with some $r>0$ and a positive constant $\kappa$ such that \[ \mathcal{L}(\beta) \geq \mathcal{L}(\beta^*) + \kappa \textsf{dist}\left(\beta, \mathsf{s}^*(\mathsf{P}) \right) \] for all $\beta \in \mathbb{B}_r(\beta^*)$. \end{definition} The above quadratic growth condition is widely used in nonlinear programming and can be ensured by various forms of second order sufficient conditions \citep[e.g.,][]{still2018lectures}. Next, we provide the following lemma that underpins the construction of our estimator in Section \ref{sec:estimation}. \begin{lemma} \label{lem:double-robust} For some fixed functions $g: \mathcal{Y} \rightarrow \mathbb{R}$ and $h: \mathcal{X} \rightarrow \mathbb{R}$, let $\mu_{g,a}=\mathbb{E}[g(Y) \mid X, A=a]$, so $\eta=\{\pi_a, \mu_{g,a}\}$. For any random variable $T$, let \begin{align*} & \varphi_a(T;\eta) = \frac{\mathbbm{1}(A=a)}{\pi_a(X)}\left\{T- \mathbb{E}[T \mid X, A]\right\} + \mathbb{E}[T \mid X, A=a], \end{align*} denote the uncentered efficient influence function for the parameter $\mathbb{E}\{\mathbb{E}[T \mid X,A=a]\}$. Also, define our parameter and the corresponding estimator by $\psi_{g,a} = \mathbb{E}[g(Y^a)h(X)]$ and $\widehat{\psi}_{g,a}=\mathbb{P}_n\{\varphi_a(g(Y);\widehat{\eta})h(X)\}$, respectively. If we assume that: \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:D1}{(D1)} either i) $\widehat{\eta}$ are estimated using sample splitting or ii) the function class $\{\varphi_a(\cdot;\eta): \eta \in (0,1)^2\times \mathbb{R}^2\}$ is Donsker in $\eta$ \item \customlabel{assumption:D2}{(D2)} $\mathbb{P}(\widehat{\pi}_a \in [\epsilon, 1-\epsilon]) = 1$ for some $\epsilon > 0$ \item \customlabel{assumption:D3}{(D3)} $\Vert \varphi_a(\cdot;\widehat{\eta})- \varphi_a(\cdot;\eta) \Vert_{2,\mathbb{P}} = o_\mathbb{P}(1)$, \end{enumerate} Then we have \begin{align*} \Vert \widehat{\psi}_{g,a}- \psi_{g,a} \Vert_2 &= O_\mathbb{P}\left(\Vert \widehat{\pi}_a - \pi_a \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{g,a}- \mu_{g,a} \Vert_{2,\mathbb{P}} + n^{-1/2} \right). \end{align*} If we further assume that \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:D4}{(D4)} $ \begin{aligned}[t] &\Vert \widehat{\psi}_{g,a} - {\psi}_{g,a} \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{g,a} - \mu_{g,a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(n^{-1/2}), \end{aligned} $ \end{enumerate} then \begin{align} \label{eqn:asymptotic-psi} \sqrt{n}(\widehat{\psi}_{g,a} - {\psi}_{g,a}) \xrightarrow[]{d} N\Big(0,\text{var}\big\{\varphi_a(g(Y);\eta)h(X)\big\}\Big), \end{align} and the estimator $\widehat{\psi}_{g,a} $ achieves the semiparametric efficiency bound, meaning that there are no regular asymptotically linear estimators that are asymptotically unbiased and with smaller variance\footnote{This is also a local asymptotic minimax lower bound.}. \end{lemma} \begin{proof} The proof is indeed very similar to that of the conventional doubly robust estimator for the mean potential outcome, and we only give a brief sketch here. Let us introduce an operator $\mathcal{IF}: \psi \rightarrow \varphi$ that maps functionals $\psi:\mathbb{P} \rightarrow \mathbb{R}$ to their influence functions $\varphi \in L_2(\mathbb{P})$. Then it suffices to show that $\mathcal{IF}(\psi_{g,a}) = \mathcal{IF}(\mathbb{E}[\mu_{g,a}(X)h(X)]) = \varphi_a(g(Y);\eta)h(X)$. In the derivation of the efficient influence function of the general regression function in Section 3.4 of \cite{kennedy2022semiparametric}, when $h$ is known and only depends on $X$, it is clear to see that pathwise differentiability \citep[][Equation (6)]{kennedy2022semiparametric} still holds when $h(x)$ is multiplied and thus \begin{align*} \mathcal{IF}(\mu_{g,a}(x)h(x)) &= \frac{\mathbbm{1}(X=x, A=a)}{\mathbb{P}(X=x, A=a)}\left\{g(Y)h(x) - \mu_{g,a}(x)h(x)\right\}\\ &= \mathcal{IF}(\mu_{g,a}(X))h(X). \end{align*} Hence, $\mathcal{IF}(\mathbb{E}[\mu_{g,a}(X)h(X)]) = \varphi_a(g(Y);\eta)h(X)$. Another way to see this is that since the influence function is basically a (pathwise) derivative (i.e., Gateaux derivative) we can think of multiplying by $h(x)$ as multiplying by a constant, which does not change the form of the original derivative, beyond multiplying by the "constant" $h(x)$. We refer the reader to \cite{kennedy2022semiparametric} and references therein for more details about the efficient influence function and influence function-based estimators. \end{proof} \section{Proofs}\label{appendix:proof} For proofs, let us consider the following more general form of stochastic nonlinear programming with deterministic constraints and some finite-dimensional decision variable $x$ in some compact subset $\mathcal{S} \in \mathbb{R}^k$: \begin{minipage}{.5\textwidth} \begin{equation} \label{eqn:true-general-nlp} \begin{aligned} &\underset{x \in \mathcal{S}}{\text{minimize}} \quad f(x) \\ & \text{subject to} \quad g_j(x) \leq 0, \quad j=1,...,m \end{aligned} \tag{$\mathsf{P}_{nl}$} \end{equation} \end{minipage}% \hfill \begin{minipage}{.5\textwidth} \begin{equation} \label{eqn:approx-general-nlp} \begin{aligned} & \underset{x \in \mathcal{S}}{\text{minimize}} \quad \widehat{f}(x) \\ & \text{subject to} \quad g_j(x) \leq 0, \quad j=1,...,m. \end{aligned} \tag{$\widehat{\mathsf{P}}_{nl}$} \end{equation} \end{minipage} We consider the case that $f, \widehat{f}$ are $C^1$ functions. In the proofs, the active set $J_0$ is defined with respect to $\mathsf{P}_{nl}$. \subsection{Proof of Theorem \ref{thm:convergence-rates}} \label{appendix:proof-convergence-rates} \begin{lemma} \label{lem:appendix-1} Let $\widehat{x} \in \mathsf{s}^*\left({\text{\ref{eqn:approx-general-nlp}}}\right)$ and assume that $f$ is twice differentiable with Hessian positive definite. Then under Assumption \ref{assumption:B1} we have \begin{align*} \textsf{dist}\left(\widehat{x} , \mathsf{s}^*(\text{\ref{eqn:true-general-nlp}})\right) &= O\left( \sup_{x'} \Vert \nabla_x\widehat{f}(x') - \nabla_xf(x') \Vert \right). \end{align*} \end{lemma} \begin{proof} Due to the positive definiteness of the Hessian of $f$, from the KKT condition at $x^* \in \mathsf{s}^*(\text{\ref{eqn:true-general-nlp}})$ with multipliers $\gamma_j^*$ \begin{align*} \nabla_x L(x^*,\gamma^*) = \nabla_x f(x^*) + \underset{j \in J_0(x^*)}{\sum}\gamma_j^* \nabla_x g_j(x^*) = 0, \end{align*} it follows that the following second order condition holds: \begin{align*} d^\top \nabla_x^2 L(x^*,\gamma^*) d >0 \quad \forall d. \end{align*} Hence, by \citet[][Theorem 2.4]{still2018lectures} the quadratic growth condition holds at $x^*$. Then by \citet[][Lemma 4.1]{shapiro1991asymptotic} and the mean value theorem, we have \begin{align*} \textsf{dist}\left(\widehat{x} , \mathsf{s}^*(\text{\ref{eqn:true-general-nlp}})\right) \leq \alpha \left( \sup_{x'} \Vert \nabla_x\widehat{f}(x') - \nabla_xf(x') \Vert \right) \end{align*} for some constant $\alpha > 0$, which completes the proof. \end{proof} Now, by the fact that both of the objective functions in \eqref{eqn:true-opt-problem} and \eqref{eqn:approx-opt-problem} are differentiable with respect to $\beta$, by Lemma \ref{lem:double-robust} and \ref{lem:appendix-1}, we obtain the result. \subsection{Proof of Theorem \ref{thm:asymptotics}} \label{appendix:proof-asymptotics} \begin{lemma} \label{lem:appendix-2} Assume that $f$ is twice differentiable whose Hessian is positive definite. Then under Assumption \ref{assumption:B1}, \ref{assumption:B2}, if LICQ and SC hold at $x^*$, we have \begin{align*} n^{1/2}\left(\widehat{x} - x^* \right) \xrightarrow{d} \begin{bmatrix} \nabla_x^2f(x^*) + \sum_j\gamma_j^*\nabla_x^2g_j(x^*) & \mathsf{B}(x^*) \\ \mathsf{B}^\top(x^*) & 0 \end{bmatrix}^{-1} \begin{bmatrix} \bm{1} \\ \bm{0} \end{bmatrix}\Upsilon, \end{align*} where \begin{align*} n^{1/2}\left(\nabla_x\widehat{f}(x^*) - \nabla_xf(x^*)\right) \xrightarrow{d} \Upsilon. \end{align*} \end{lemma} \begin{proof} First consider the following auxiliary parametric program with respect to \eqref{eqn:true-general-nlp} with the parameter vector $\xi \in \mathbb{R}^k$. \begin{equation} \label{eqn:aux-opt-problem-parametric} \begin{aligned} & \underset{x \in \mathcal{S}}{\text{minimize}} \quad f(x) + x^\top\xi \\ & \text{subject to } \quad g_j(x) \leq 0, \quad j=1,...,m. \end{aligned} \tag{$\mathsf{P}_\xi$} \end{equation} \eqref{eqn:aux-opt-problem-parametric} can be viewed as a perturbed program of \eqref{eqn:true-general-nlp}; for $\xi=0$, \eqref{eqn:aux-opt-problem-parametric} coincides with the program \eqref{eqn:true-general-nlp}. Here, the parameter $\xi$ will play a role of medium that contain all relevant stochastic information in \eqref{eqn:approx-general-nlp} \citep{shapiro1993asymptotic}. Let $\bar{x}(\xi)$ denote the solution of the program \ref{eqn:aux-opt-problem-parametric}. Clearly, we get $\bar{x}(0) = x^*$. We have already shown that $\widehat{x} \xrightarrow[]{p} x^*$ at the rate of $n^{1/2}$ and that the quadratic growth condition holds at $x^*$ under the given conditions in Theorem \ref{thm:convergence-rates}. Further, since the Hessian $\nabla_x^2f(x^*)$ is positive definite and LICQ holds at $x^*$, the uniform version of the quadratic growth condition also holds at $\bar{x}(\xi)$ (see \citet[][Assumption A3]{shapiro1993asymptotic}). Hence by \citet[][Theorem 3.1]{shapiro1993asymptotic}, we get \begin{align*} \widehat{x} = \bar{x}(\xi) + o_\mathbb{P}(n^{-1/2}) \end{align*} where \begin{align*} \xi = \nabla_x\widehat{f}(x^*) - \nabla_xf(x^*). \end{align*} If $\bar{x}(\xi)$ is Frechet differentiable at $\xi=0$, we have \begin{align*} \bar{x}(\xi) - x^* = D_0\bar{x}(\xi) + o(\Vert\xi\Vert), \end{align*} where the mapping $D_0\bar{x}: \mathbb{R}^k \rightarrow \mathbb{R}^k$ is the directional derivative of $\bar{x}(\cdot)$ at $\xi=0$. Since $\bar{x}(0) = x^*$, this leads to \begin{align*} n^{1/2}\left(\widehat{x} - x^* \right) = D_0\bar{x}(n^{1/2}\xi) + o_\mathbb{P}(1). \end{align*} Now we shall show that such mapping $D_0\bar{x}(\cdot)$ exists and is indeed linear. To this end, we will show that $\bar{x}(\xi)$ is locally totally differentiable at $\xi = 0$, followed by applying an appropriate form of the implicit function theorem. Define a vector-valued function $H \in \mathbb{R}^{(k+m)}$ by \[ H(x, \xi, \gamma) = \begin{pmatrix} \nabla_xf(x) + \sum_j\gamma_j\nabla_xg_j(x) + \xi \\ \diag(\gamma)(g(x)) \end{pmatrix} \] where a vector $g$ is understood as a stacked version of $g_j's$. Due to the SC and LICQ conditions, the solution of $H(x, \xi, \gamma)=0$ satisfies the KKT condition for \eqref{eqn:aux-opt-problem-parametric}: i.e., $H(\bar{x}(\xi), \xi, \bar{\gamma}(\xi))=0$ where $\bar{\gamma}(\xi)$ is the corresponding multipliers. Now by the classical implicit function theorem \citep[e.g.,][Theorem 1B.1]{dontchev2009implicit} and the local stability result \citep[][Theorem 4.4]{still2018lectures}, there always exists a neighborhood $\mathbb{B}_{\bar{r}}(0)$, for some $\bar{r}>0$, of $\xi = 0$ such that $\bar{x}(\xi)$ and its total derivative exist for $\forall \xi \in \mathbb{B}_{\bar{r}}(0)$. In particular, the derivative at $\xi=0$ is computed by \[ \nabla_\xi \bar{x}(0) = - \begin{matrix} \bm{J}_{x,\gamma} H(\bar{x}(0), 0, \bar{\gamma}(0)) \end{matrix}^{-1} \begin{bmatrix} \bm{J}_{\xi} H(\bar{x}(0), 0, \bar{\gamma}(0)) \end{bmatrix}, \] where in our case $\bar{x}(0) = x^*, \bar{\gamma}(0) = \gamma^*$, and thus \[ \bm{J}_{x,\gamma} H(\bar{x}(0), 0, \bar{\gamma}(0)) = \begin{bmatrix} \nabla_x^2f(x^*) + \sum_j\gamma_j^*\nabla_x^2g_j(x^*) & \mathsf{B}(x^*) \\ \mathsf{B}^\top(x^*) & 0 \end{bmatrix}, \] with $\mathsf{B} = \left[\nabla_x g_j(x^*)^\top, \, j \in J_0(x^*) \right]$, and \[ \bm{J}_{\xi} H(\bar{x}(0), 0, \bar{\gamma}(0)) = \begin{bmatrix} \bm{1} \\ \bm{0} \end{bmatrix}. \] Here the inverse of $\begin{matrix} \bm{J}_{x,\gamma} H(\bar{x}(0), 0, \bar{\gamma}(0)) \end{matrix}$ always exists (see \citet[][Ex 4.5]{still2018lectures}). Therefore we obtain that \begin{align*} D_0\bar{x}(n^{1/2}\xi) = \begin{bmatrix} \nabla_x^2f(x^*) + \sum_j\gamma_j^*\nabla_x^2g_j(x^*) & \mathsf{B}(x^*) \\ \mathsf{B}^\top(x^*) & 0 \end{bmatrix}^{-1} \begin{bmatrix} \bm{1} \\ \bm{0} \end{bmatrix} n^{1/2}\xi. \end{align*} Finally, if $n^{1/2}\xi \xrightarrow{d} \Upsilon$, by Slutsky's theorem it follows \begin{align*} n^{1/2}\left(\widehat{x} - x^* \right) \xrightarrow{d} \begin{bmatrix} \nabla_x^2f(x^*) + \sum_j\gamma_j^*\nabla_x^2g_j(x^*) & \mathsf{B}(x^*) \\ \mathsf{B}^\top(x^*) & 0 \end{bmatrix}^{-1} \begin{bmatrix} \bm{1} \\ \bm{0} \end{bmatrix}\Upsilon. \end{align*} \end{proof} Then, the desired result for Theorem \ref{thm:asymptotics} immediately follows by the fact that \begin{align*} \nabla_\beta \mathcal{L} = - \mathbb{E}\left\{ Y^a(Z;\eta)h_1(V,\beta)+(1-Y^a)h_0(V,\beta) \right\} \end{align*} where \begin{align*} h_1(V,\beta) & = \frac{1}{\log \sigma(\beta^\top\bm{b}(V))}\bm{b}(V)\sigma(\beta^\top\bm{b}(V))\{1 - \sigma(\beta^\top\bm{b}(V))\}, \\ h_0(V,\beta) & = -\frac{1}{\log(1- \sigma(\beta^\top\bm{b}(V)))}\bm{b}(V)\sigma(\beta^\top\bm{b}(V))\{1 - \sigma(\beta^\top\bm{b}(V))\}, \end{align*} followed by applying Lemma \ref{lem:double-robust}. \section*{Checklist} \begin{enumerate} \item For all authors... \begin{enumerate} \item Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope? \answerYes{} \item Did you describe the limitations of your work? \answerYes{See Section \ref{sec:discussion}.} \item Did you discuss any potential negative societal impacts of your work? \answerNA{Our work focuses on the methodological development and is not tied to particular applications. Also, our methods do not suggest any particular ways to quantify fairness. Hence discussion about potential negative societal impacts is not applicable to ours.} \item Have you read the ethics review guidelines and ensured that your paper conforms to them? \answerYes{} \end{enumerate} \item If you are including theoretical results... \begin{enumerate} \item Did you state the full set of assumptions of all theoretical results? \answerYes{See Section \ref{sec:asymptotics}.} \item Did you include complete proofs of all theoretical results? \answerYes{See Section \ref{appendix:proof} in the appendix.} \end{enumerate} \item If you ran experiments... \begin{enumerate} \item Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? \answerNo{} \item Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? \answerYes{} \item Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? \answerYes{} \item Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? \answerNA{} \end{enumerate} \item If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... \begin{enumerate} \item If your work uses existing assets, did you cite the creators? \answerNA{We have only used the public data and the open-source packages in R (see Section \ref{sec:experiments}).} \item Did you mention the license of the assets? \answerNA{} \item Did you include any new assets either in the supplemental material or as a URL? \answerNA{} \item Did you discuss whether and how consent was obtained from people whose data you're using/curating? \answerNA{} \item Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? \answerNA{} \end{enumerate} \item If you used crowdsourcing or conducted research with human subjects... \begin{enumerate} \item Did you include the full text of instructions given to participants and screenshots, if applicable? \answerNA{} \item Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? \answerNA{} \item Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? \answerNA{} \end{enumerate} \end{enumerate} \section{Introduction} \label{sec:intro} \textit{Counterfactual or potential outcomes} are often used to describe how an individual would respond to a specific treatment or event, irrespective of whether the event actually takes place. Counterfactual outcomes are commonly used for causal inference, where we are interested in measuring the effect of a treatment on an outcome variable \citep{rubin1974estimating, holland1986statistics,hofler2005causal}. Recently, counterfactual outcomes have also proved useful for predicting outcomes under hypothetical interventions. This is commonly referred to as \textit{counterfactual prediction}. Counterfactual prediction can be particularly useful to inform decision-making in clinical practice. For example, in order for physicians to make effective treatment decisions, they often need to predict risk scores assuming no treatment is given; if a patient’s risk is relatively low, then she or he may not need treatment. However, when a treatment is initiated after baseline, simply operationalizing the hypothetical treatment as another baseline predictor will rarely give the correct (counterfactual) risk estimates because of confounding \citep{westreich2013table}. Counterfactual prediction can be also helpful when we want our prediction model developed in one setting to yield predictions successfully transportable to other settings with different treatment patterns. Suppose that we develop our risk prediction model in a setting where most patients have access to an effective (post-baseline) treatment. However, if we deploy our factual prediction model in a new setting in which few individuals have access to the treatment, our model is likely to fail in the sense that it may not be able to accurately identify high-risk individuals. Counterfactual prediction may allow us to achieve more robust model performance compared to factual prediction, even when model deployment influences behaviors that affect risk. \citep[see, e.g.,][for more examples]{dickerman2020counterfactual, van2020prediction, lin2021scoping}. However, the problem of counterfactual prediction brings challenges that do not arise in typical prediction problems because the data needed to build the predictive models are inherently not fully observable. Surprisingly, while the development of modern prediction modeling has greatly enriched the counterfactual-outcome-based causal inference particularly via semi-parametric methods \citep{kennedy2016semiparametric,kennedy2022semiparametric}, the use of causal inference to improve prediction modeling has received less attention \citep[see, e.g.,][for a discussion on the subject]{dickerman2020counterfactual, schulam2017reliable}. In this work, we study counterfactual classification, a special case of counterfactual prediction where the outcome is discrete. Our approach allows investigators to flexibly incorporate various constraints into the models, not only to enhance their predictive performance but also to accommodate a wide range of practical constraints relevant to their classification tasks. Counterfactual classification poses both theoretical and practical challenges, as a result of the fact that in our setting, even without any constraints, the estimand is not expressible as a closed form functional unlike typical causal inference problems. We tackle this problem by framing counterfactual classification as nonlinear stochastic programming with counterfactual components. \subsection{Related Work} Our work lies at the intersection of causal inference and stochastic optimization. Counterfactual prediction is closely related to estimation of the conditional average treatment effect (CATE) in causal inference, which plays a crucial role in precision medicine and individualized policy. Let $Y^a$ denote the counterfactual outcome that would have been observed under treatment or intervention $A=a$, $A \in \{0,1\}$. The CATE for subjects with covariate $X=x$ is defined as $\tau(x) = \mathbb{E}[Y^1 - Y^0 \mid X=x]$. There exists a vast literature on estimating CATE. These include some important early works assuming that $\tau(x)$ follows some known parametric form \citep[e.g.,][]{van2006statistical, robins2000marginal, vansteelandt2014structural}. But more recently, there has been an effort to leverage flexible nonparametric machine learning methods \citep[e.g.,][]{luedtke2016super, athey2016recursive, wager2018estimation, kunzel2017meta, nie2017quasi, kennedy2020optimal, alaa2017bayesian, lu2018estimating}. A desirable property commonly held in the above CATE estimation methods is that the function $\tau(x)$ may be more structured and simple than its component main effect function $\mathbb{E}[Y^a \mid X=x]$. In counterfactual prediction, however, we are fundamentally interested in predicting $Y^a$ conditional on $X=x$ under a ``single" hypothetical intervention $A=a$, as opposed to the contrast of the conditional mean outcomes under two (or more) interventions as in CATE. Counterfactual prediction is often useful to support decision-making on its own. There are settings where estimating the contrast effect or relative risk is less relevant than understanding what may happen if a subject was given a certain intervention. As mentioned previously, this is particularly the case in clinical research when predicting risk in relation to treatment started after baseline \citep{schulam2017reliable, dickerman2020counterfactual, van2020prediction, lin2021scoping}. Moreover, in the context of multi-valued treatments, it can be more useful to estimate each individual conditional mean potential outcome separately than to estimate all the possible combinations of relative effects. With no constraints, under appropriate identification assumptions (e.g., \ref{assumption:c1}-\ref{assumption:c3} in Section \ref{sec:setup}), counterfactual prediction is equivalent to estimating a standard regression function $\mathbb{E}[Y \mid X,A=a]$ so in principle one could use any regression estimator. This direct modeling or \textit{plug-in} approach has been used for counterfactual prediction in randomized controlled trials \citep[e.g.,][]{nguyen2020counterfactual, li2016predictive} or as a component of CATE estimation methods \citep[e.g.,][]{athey2016recursive,lu2018estimating}. An issue arises when we are estimating a projection of this function onto a finite-dimensional model, or where we instead want to estimate $\mathbb{E}[Y^a \mid V] = \mathbb{E}\{\mathbb{E}[Y \mid X,A=a] \mid V\}$ for some smaller subset $V \subset X$ (e.g., under runtime confounding \citep[][]{coston2020RuntimeConfounding}), which typically renders the plug-in approach suboptimal. Moreover, the resulting estimator fails to have double robustness, a highly desirable property which provides an additional layer of robustness against model misspecification \citep{bang2005doubly}. On the other hand, we often want to incorporate various constraints into our predictive models. Such constraints are often used for flexible penalization \citep{james2013penalized} or supplying prior information \citep{gaines2018algorithms} to enhance model performance and interpretability. They can also be used to mitigate algorithmic biases \citep{calders2013controlling, hardt2016equality}. Further, depending on the scientific question, practitioners occasionally have some constraints which they wish to place on their prediction tasks, such as targeting specific sub-populations, restricting sign or magnitude on certain regression coefficients to be consistent with common sense, or accounting for the compositional nature of the data \citep{james2019penalized, chen2021hierarchical, lu2019generalized}. In the plug-in approach, however, it is not clear how to incorporate the given constraints into the modeling process. In our approach, we directly formulate and solve an optimization problem that minimizes counterfactual classification risk, where we can flexibly incorporate various forms of constraints. Optimization problems involving counterfactuals or \emph{counterfactual optimization} have not been extensively studied, with few exceptions \citep[e.g.,][]{luedtke2016optimal, mishler2021fairness, mishler2021fade, kim2022counterfactual}. Our results are closest to \cite{mishler2021fade} and \cite{kim2022counterfactual}, which study counterfactual optimization in a class of quadratic and nonlinear programming problems, respectively, yet this approach i) is not applicable to classification where the risk is defined with respect to the cross-entropy, and ii) considers only linear constraints. As in \cite{kim2022counterfactual}, we tackle the problem of counterfactual classification from the perspective of stochastic programming. The two most common approaches in stochastic programming are {stochastic approximation} (SA) and {sample average approximation} (SAA) \citep[e.g.,][]{nemirovski2009robust, shapiro2014lectures}. However, since i) we cannot compute sample moments or stochastic subgradients that involve unobserved counterfactuals, and ii) the SA and SAA approaches cannot harness efficient estimators for counterfactual components, e.g., doubly-robust or semiparametric estimators with cross-fitting \citep[][]{Chernozhukov17, newey2018cross}, more general approaches beyond the standard SA and SAA settings should be considered \citep[e.g.,][]{shapiro1991asymptotic, shapiro1993asymptotic, shapiro2000statistical} at the expense of stronger assumptions on the behavior of the optimal solution and its estimator. \subsection{Contribution} We study counterfactual classification as a new decision-making tool under hypothetical (contrary to fact) scenarios. Based on semiparametric theory for causal inference, we propose a doubly-robust, nonparametric estimator that can incorporate flexible constraints into the modeling process. Then we go on to analyze rates of convergence and provide a closed-form expression for the asymptotic distribution of our estimator. Our analysis shows that the proposed estimator can attain fast $\sqrt{n}$ rates even when its nuisance components are estimated using nonparametric machine learning tools at slower rates. We study the finite-sample performance of our estimator via simulation and provide a case based on real data. Importantly, our algorithm and analysis are applicable to other problems in which the estimand is given by the solutions to a general nonlinear optimization problem whose objective function involves counterfactuals, where closed-form solutions are not available. \section{Problem and Setup}\label{sec:setup} Suppose that we have access to an i.i.d. sample $(Z_{1}, ... , Z_{n})$ of $n$ tuples $Z=(Y,A,X) \sim \mathbb{P}$ for some distribution $\mathbb{P}$, binary outcome $Y \in \{0,1\}$, covariates $X \in \mathcal{X} \subset \mathbb{R}^{d_x}$, and binary intervention $A \in \mathcal{A}=\{0,1\}$. For simplicity, we assume $A$ and $Y$ are binary, but in principle they can be multi-valued. {We consider a general setting where only a subset of covariates $V \subseteq X$ can be used for predicting the counterfactual outcome $Y^a$. This allows for \textit{runtime confounding}, where factors used by decision-makers are recorded in the training data but are not available for prediction (see \cite{coston2020RuntimeConfounding} and references therein).} We are concerned with the following constrained optimization problem \begin{equation} \label{eqn:true-opt-problem} \begin{aligned} & \underset{\beta \in \mathcal{B}}{\text{minimize}} \quad \mathcal{L}\left(Y^a,\sigma(\beta, \bm{b}(V))\right) \coloneqq -\mathbb{E}\left\{ Y^a\log \sigma(\beta, \bm{b}(V)) + (1-Y^a)\log(1-\sigma(\beta, \bm{b}(V))) \right\} \\ & \text{subject to } \quad \beta \in \mathcal{S} \coloneqq \{\beta \mid g_j(\beta) \leq 0, j \in J \} \end{aligned} \tag{$\mathsf{P}$} \end{equation} for some compact subset $\mathcal{B} \in \mathbb{R}^k$, known $C^2$-functions $g_j:\mathcal{B} \rightarrow \mathbb{R}$, $\sigma:\mathcal{B}\times\mathbb{R}^{k^\prime} \rightarrow (0,1)$, and the index set $J=\{1,...,m\}$ for the inequality constraints. Here, $\sigma$ is the score function and $\bm{b}(V)=[b_1(V),...,b_{k^\prime}(V)]^\top$ represents a set of basis functions for $V$ (e.g., truncated power series, kernel or spline basis functions, etc.). Note that we do not need to have $k = k^\prime$; for example, depending on the modeling techniques, it is possible to have a much larger number of model parameters than the number of basis functions, i.e., $k > k^\prime$. $\mathcal{L}\left(Y^a,\sigma(\beta, \bm{b}(V))\right)$ is our classification risk based on the cross-entropy. $\mathcal{S}$ consists of deterministic inequality constraints\footnote{Equality constraint can be always expressed by a pair of inequality constraints.} and can be used to pursue a variety of practical purposes described in Section \ref{sec:intro}. Let $\beta^*$ denote an optimal solution in \eqref{eqn:true-opt-problem}. $\beta^*$ is our optimal model parameters (coefficients) that minimize the counterfactual classification risk under the given constraints. \textbf{Classification risk and score function.} Our classification risk $\mathcal{L}(Y^a,\sigma(\beta, \bm{b}(V)))$ is defined by the expected cross entropy loss between $Y^a$ and $\sigma(\beta, \bm{b}(V))$. In order to estimate $\beta^*$, we first need to estimate this classification risk. Since it involves counterfactuals, the classification risk cannot be identified from observed data unless certain assumptions hold, which will be discussed shortly. The form of the score function $\sigma(\beta, \bm{b}(V))$ depends on the specific classification technique we are using. Our default choice for $\sigma$ is the sigmoid function with $k=k^\prime$, which makes the classification risk strictly convex with respect to $\beta$. It should be noted, however, that more complex and flexible classification techniques (e.g., neural networks) can also be used without affecting the subsequent results, as long as they satisfy the required regularity assumptions discussed later in Section \ref{sec:asymptotics}. Importantly, our approach is nonparametric; $\beta^*$ is the parameter of the best linear classifier with the sigmoid score in the expanded feature space spanned by $\bm{b}(V)$, but we never assume an exact `log-linear' relationship between $Y^a$ and $\bm{b}(V)$ as in ordinary logistic regression models. \textbf{Identification.} To estimate the counterfactual quantity $\mathcal{L}(Y^a,\sigma(\beta, \bm{b}(V)))$ from the observed sample $(Z_{1}, ... , Z_{n})$, it must be expressed in terms of the observational data distribution $\mathbb{P}$. This can be accomplished via the following standard causal assumptions \citep[e.g.,][Chapter 12]{imbens2015causal}: \begin{itemize}[leftmargin=*] \item \customlabel{assumption:c1}{(C1)} \textit{Consistency}: $Y=Y^a$ if $A=a$ \item \customlabel{assumption:c2}{(C2)} \textit{No unmeasured confounding}: $A \perp\!\!\!\perp Y^a \mid X$ \item \customlabel{assumption:c3}{(C3)} \textit{Positivity}: $\mathbb{P}(A=a|X)> \varepsilon \text{ a.s. for some } \varepsilon >0$ \end{itemize} \ref{assumption:c1} - \ref{assumption:c3} will be assumed throughout this paper. Under these assumptions, our classification risk is identified as \begin{align} \label{eqn:identified-risk} \mathcal{L}(\beta) = -\mathbb{E}\left\{ \mathbb{E}\left[ Y \mid X, A=a \right]\log \sigma(\beta, \bm{b}(V)) + (1-\mathbb{E}\left[ Y \mid X, A=a \right])\log(1-\sigma(\beta, \bm{b}(V))) \right\}, \end{align} where we let $\mathcal{L}(\beta) \equiv \mathcal{L}(Y^a,\sigma(\beta, \bm{b}(V)))$. Since we use the sigmoid function with an equal number of model parameters as basis functions, for clarity, hereafter we write $\sigma(\beta^\top \bm{b}(V)) = \sigma(\beta, \bm{b}(V))$. It is worth noting that even though we develop the estimator under the above set of causal assumptions, one may extend our methods to other identification strategies and settings (e.g., those of instrumental variables and mediation), since our approach is based on the analysis of a stochastic programming problem with generic estimated objective functions (see Appendix \ref{appendix:proof}). \textbf{Notation.} Here we specify the basic notation used throughout the paper. For a real-valued vector $v$, let $\Vert v \Vert_2$ denote its Euclidean or $L_2$-norm. Let $\mathbb{P}_n$ denote the empirical measure over $(Z_1,...,Z_n)$. Given a sample operator $h$ (e.g., an estimated function), let $\mathbb{P}$ denote the conditional expectation over a new independent observation $Z$, as in $\mathbb{P}(h)=\mathbb{P}\{h(Z)\}=\int h(z)d\mathbb{P}(z)$. Use $\Vert h \Vert_{2,\mathbb{P}}$ to denote the $L_2(\mathbb{P})$ norm of $h$, defined by $\Vert h \Vert_{2,\mathbb{P}} = \left[\mathbb{P} (h^2) \right]^{\frac{1}{2}} = \left[\int h(z)^2 d\mathbb{P}(z)\right]^{\frac{1}{2}}$. Finally, let $\mathsf{s}^*({P})$ denote the set of optimal solutions of an optimization program ${P}$, i.e., $\beta^* \in \mathsf{s}^*({P})$, and define $\textsf{dist}(x, S) = \inf\left\{ \Vert x - y\Vert_2: y \in S \right\}$ to denote the distance from a point $x$ to a set $S$. \section{Estimation Algorithm} \label{sec:estimation} Since \eqref{eqn:true-opt-problem} is not directly solvable, we need to find an approximating program of the ``true" program \eqref{eqn:true-opt-problem}. To this end, we shall first discuss the problem of obtaining estimates for the identified classification risk \eqref{eqn:identified-risk}. To simplify notation, we first introduce the following nuisance functions \begin{align*} & \pi_a(X)=\mathbb{P}[A=a \mid X], \\ & \mu_a(X) = \mathbb{E}[Y \mid X,A=a], \end{align*} and let $\widehat{\pi}_a$ and $ \widehat{\mu}_a$ be their corresponding estimators. ${\pi}_a$ and ${\mu}_a$ are referred to as the propensity score and outcome regression function, respectively. A natural estimator for \eqref{eqn:identified-risk} is given by \begin{align} \label{eqn:plug-in-risk} \widehat{\mathcal{L}}(\beta) = -\mathbb{P}_n\left\{ \widehat{\mu}_a(X)\log \sigma(\beta^\top \bm{b}(V)) + (1-\widehat{\mu}_a(X))\log(1-\sigma(\beta^\top \bm{b}(V))) \right\}, \end{align} where we simply plug in the regression estimates $\widehat{\mu}_a$ into the empirical average of \eqref{eqn:identified-risk}. Here, we construct a more efficient estimator based on the semiparametric approach in causal inference \citep{kennedy2017semiparametric, kennedy2022semiparametric}. Let \begin{align*} & \varphi_a(Z;\eta) = \frac{\mathbbm{1}(A=a)}{\pi_a(X)}\left\{Y- \mu_A(X)\right\} + \mu_a(X), \end{align*} denote the uncentered efficient influence function for the parameter $\mathbb{E}\left\{\mathbb{E}[Y \mid X,A=a ]\right\}$, where nuisance functions are defined by $\eta=\{\pi_a(X), \mu_a(X) \}$. Then it can be deduced that for an arbitrary fixed real-valued function $h:\mathcal{X} \rightarrow \mathbb{R}$, the uncentered efficient influence function for the parameter $\psi_a \coloneqq \mathbb{E}\left\{\mathbb{E}[Y \mid X,A=a ]h(X)\right\}$ is given by $\varphi_a(Z;\eta)h(X)$ (Lemma \ref{lem:double-robust} in the appendix). Now we provide an influence-function-based semiparametric estimator for $\psi_a$. Following \citep{zheng2010asymptotic, Chernozhukov17, robins2008higher, kennedy2020optimal}, we propose to use \textit{sample splitting} to allow for arbitrarily complex nuisance estimators $\widehat{\eta}$. Specifically, we split the data into $K$ disjoint groups, each with size of $n/K$ approximately, by drawing variables $(B_1,..., B_n)$ independent of the data, with $B_i=b$ indicating that subject $i$ was split into group $b \in \{1,...,K\}$. Then the semiparametric estimator for $\psi_a$ based on the efficient influence function and sample splitting is given by \begin{align} \label{eqn:risk-component-estimator} \widehat{\psi}_a = \frac{1}{K}\sum_{b=1}^K \mathbb{P}_n^b\left\{\varphi_a(Z;\widehat{\eta}_{-b})h(X)\right\} \equiv \mathbb{P}_n\left\{ \varphi_a(Z;\widehat{\eta}_{-B_K}) h(X) \right\}, \end{align} where we let $\mathbb{P}_n^b$ denote empirical averages over the set of units $\{i : B_i=b\}$ in the group $b$ and let $\widehat{\eta}_{-b}$ denote the nuisance estimator constructed only using those units $\{i : B_i \neq b\}$. Under weak regularity conditions, this semiparametric estimator attains the efficiency bound with the double robustness property, and allows us to employ nonparametric machine learning methods while achieving the $\sqrt{n}$-rate of convergence and valid inference under weak conditions (see Lemma \ref{lem:double-robust} in the appendix for the formal statement). If one is willing to rely on appropriate empirical process conditions (e.g., Donsker-type or low entropy conditions \citep{van2000asymptotic}), then $\eta$ can be estimated on the same sample without sample splitting. However, this would limit the flexibility of the nuisance estimators. The classification risk $\mathcal{L}(\beta)$ is a sum of two functionals, each of which is in the form of $\psi_a$, Thus, for each $\beta$, we propose to estimate the classification risk using \eqref{eqn:risk-component-estimator} as follows \begin{align} \label{eqn:risk-estimator} \widehat{\mathcal{L}}(\beta) = -\mathbb{P}_n\left\{ \varphi_a(Z;\widehat{\eta}_{-B_K}) \log \sigma(\beta^\top \bm{b}(V)) + (1-\varphi_a(Z;\widehat{\eta}_{-B_K}))\log(1-\sigma(\beta^\top \bm{b}(V))) \right\}. \end{align} Now that we have proposed the efficient method to estimate the counterfactual component $\mathcal{L}(\beta)$, in what follows we provide an approximating program for \eqref{eqn:true-opt-problem} which we aim to actually solve by substituting $\widehat{\mathcal{L}}(\beta)$ for $\mathcal{L}(\beta)$ \begin{equation} \label{eqn:approx-opt-problem} \begin{aligned} & \underset{\beta \in \mathcal{B}}{\text{minimize}} \quad \widehat{\mathcal{L}}(\beta) \\ & \text{subject to } \quad \beta \in \mathcal{S}. \end{aligned} \tag{$\widehat{\mathsf{P}}$} \end{equation} Let $\widehat{\beta} \in \mathsf{s}^*(\widehat{\mathsf{P}})$. Then $\widehat{\beta}$ is our estimator for $\beta^*$. We summarize our algorithm detailing how to compute the estimator $\widehat{\beta}$ in Algorithm \ref{algo:DR-estimator}. \eqref{eqn:approx-opt-problem} is a smooth nonlinear optimization problem whose objective function depends on data. Unfortunately, unlike \eqref{eqn:true-opt-problem}, \eqref{eqn:approx-opt-problem} is not guaranteed to be convex in finite samples even if $\mathcal{S}$ is convex. Non-convex problems are usually more difficult than convex ones due to high variance and slow computing time. Nonetheless, substantial progress has been made recently \citep{rapcsak2013smooth, boumal2020introduction}, and a number of efficient global optimization algorithms are available in open-source libraries (e.g., \textsc{NLopt}). Also in order for more flexible implementation, one may adapt neural networks for our approach without the need for specifying $\sigma$ and $\bm{b}$; we discuss this in more detail in Section \ref{sec:discussion} as a promising future direction. \begin{algorithm}[t] \caption{Doubly robust estimator for counterfactual classification} \label{algo:DR-estimator} \textbf{input:} $\bm{b}(\cdot), K$ \\ Draw $(B_1,...,B_n)$ with $B_i \in \{1,...,K\}$ \\ \For{$b=1,...,K$}{ Let $D_0 = \{Z_i : B_i \neq b\}$ and $D_1 = \{Z_i : B_i = b\}$ \\ Obtain $\widehat{\eta}_{-b}$ by constructing $\widehat{\pi}_a, \widehat{\mu}_a$ on $D_0$\\ $M_{1,b}(\beta) \leftarrow$ empirical average of $\varphi_a(Z;\widehat{\eta}_{-b})\log \sigma(\beta^\top \bm{b}(V))$ over $D_1$\\ $M_{0,b}(\beta) \leftarrow$ empirical average of $\left( 1 - \varphi_a(Z;\widehat{\eta}_{-b}) \right) \log(1-\sigma(\beta^\top \bm{b}(V)))$ over $D_1$\\ } $\widehat{\mathcal{L}}(\beta) \leftarrow \sum_{b=1}^K\left\{\frac{1}{n}\sum_{i=1}^n \mathbbm{1}(B_i=b) \right\} \left(M_{1,b}(\beta) + M_{0,b}(\beta) \right)$ \\ \textbf{solve} \eqref{eqn:approx-opt-problem} with $\widehat{\mathcal{L}}(\beta)$ \end{algorithm} \section{Asymptotic Analysis} \label{sec:asymptotics} This section is devoted to analyzing the rates of convergence and asymptotic distribution for the estimated optimal solution $\widehat{\beta}$. Unlike stochastic optimization, analysis of the statistical properties of optimal solutions to a general counterfactual optimization problem appears much more sparse. In what was perhaps the first study of the problem, \cite{kim2022counterfactual} analyzed asymptotic behavior of optimal solutions for a particular class of nonlinear counterfactual optimization problems that can be cast into a parametric program with finite-dimensional stochastic parameters. However, the true program \eqref{eqn:true-opt-problem} does not belong to the class to which their analysis is applicable. Here, we derive the asymptotic properties of $\widehat{\beta}$ by considering similar assumptions as in \cite{kim2022counterfactual}. We first introduce the following assumptions for our counterfactual component estimator $\widehat{\mathcal{L}}$. \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:A1}{(A1)} $\mathbb{P}(\widehat{\pi}_a \in [\epsilon, 1-\epsilon]) = 1$ for some $\epsilon > 0$ \item \customlabel{assumption:A2}{(A2)} $\Vert \widehat{\mu}_{a}- \mu_{a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(1)$ or $\Vert \widehat{\pi}_{a}- \pi_{a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(1)$ \item \customlabel{assumption:A3}{(A3)} $ \begin{aligned}[t] &\Vert \widehat{\pi}_{a} - {\pi}_{a} \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{a} - \mu_{a} \Vert_{2,\mathbb{P}} = o_\mathbb{P}(n^{-\frac{1}{2}}) \end{aligned} $ \end{enumerate} Assumptions \ref{assumption:A1} - \ref{assumption:A3} are commonly used in semiparametric estimation in the causal inference literature \citep[][]{kennedy2016semiparametric}. Next, for a feasible point $\bar{\beta} \in \mathcal{S}$ we define the active index set. \begin{definition}[Active set] For $\bar{\beta} \in \mathcal{S}$, we define the active index set $J_0$ by \[ J_0(\bar{\beta}) = \{1\leq j \leq m \mid g_j(\bar{\beta}) = 0 \}. \] \end{definition} Then we introduce the following technical condition on $g_j$. \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:B1}{(B1)} For each $\beta^* \in \mathsf{s}^*(\mathsf{P})$, \[ d^\top\nabla_\beta^2g_j(\beta^*)d \geq 0 \quad \forall d \in \{d \mid \nabla_\beta g_j(\beta^*) = 0, j \in J_0(\bar{\beta}) \}. \] \end{enumerate} Assumption \ref{assumption:B1} holds, for example, if each $g_j$ is locally convex around $\beta^*$. In what follows, based on the result of \cite{shapiro1991asymptotic}, we characterize the rates of convergence for $\widehat{\beta}$ in terms of the nuisance estimation error under relatively weak conditions. \begin{theorem}[Rate of Convergence] \label{thm:convergence-rates} Assume that \ref{assumption:A1}, \ref{assumption:A2}, and \ref{assumption:B1}, hold. Then \begin{align*} \textsf{dist}\left(\widehat{\beta} , \mathsf{s}^*(\text{\ref{eqn:true-opt-problem}})\right) &= O_\mathbb{P}\left(\Vert \widehat{\pi}_a - \pi_a \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{a}- \mu_{a} \Vert_{2,\mathbb{P}} + n^{-\frac{1}{2}} \right). \end{align*} Hence, if we further assume the nonparametric condition \ref{assumption:A3}, we obtain \begin{align*} \textsf{dist}\left(\widehat{\beta} , \mathsf{s}^*(\text{\ref{eqn:true-opt-problem}})\right) &= O_\mathbb{P}\left(n^{-\frac{1}{2}} \right). \end{align*} \end{theorem} Theorem \ref{thm:convergence-rates} indicates that double robustness is possible for our estimator, and thereby $\sqrt{n}$ rates are attainable even when each of the nuisance regression functions is estimated flexibly at much slower rates (e.g., $n^{-1/4}$ rates for each), with a wide variety of modern nonparametric tools. Since $\mathcal{L}$ is continuously differentiable with bounded derivative, the consistency of the optimal value naturally follows by the result of Theorem \ref{thm:convergence-rates} and the continuous mapping theorem. More specifically, in the following corollary, we show that the same rates are attained for the optimal value under identical conditions. \begin{corollary}[Rate of Convergence for Optimal Value] \label{cor:convergence-rates-optval} Suppose \ref{assumption:A1}, \ref{assumption:A2}, \ref{assumption:A3}, \ref{assumption:B1} hold and let $v^*$ and $\widehat{v}$ be the optimal values corresponding to $\beta^* \in \mathsf{s}^*(\text{\ref{eqn:true-opt-problem}})$ and $\widehat{\beta}$, respectively. Then we have $\left\vert \widehat{v} - v^* \right\vert= O_\mathbb{P}\left(\Vert \widehat{\pi}_a - \pi_a \Vert_{2,\mathbb{P}} \Vert \widehat{\mu}_{a}- \mu_{a} \Vert_{2,\mathbb{P}} + n^{-\frac{1}{2}} \right)$. \end{corollary} In order to conduct statistical inference, it is also desirable to characterize the asymptotic distribution of $\widehat{\beta}$. This requires stronger assumptions and a more specialized analysis \citep{shapiro1991asymptotic}. Asymptotic properties of optimal solutions in stochastic programming are typically studied based on the generalization of the delta method for directionally differentiable mappings \citep[e.g.,][]{shapiro1993asymptotic, shapiro2000statistical,shapiro2014lectures}. Asymptotic normality is of particular interest since without asymptotic normality, consistency of the bootstrap is no longer guaranteed for the solution estimators \citep{fang2019inference}. We start with additional definitions of some popular regularity conditions with respect to \eqref{eqn:true-opt-problem}. \begin{definition}[LICQ] \textit{Linear independence constraint qualification} (LICQ) is satisfied at $\bar{\beta} \in \mathcal{S}$ if the vectors $\nabla_\beta g_j(\bar{\beta})$, $j \in J_0(\bar{\beta})$ are linearly independent. \end{definition} \begin{definition}[SC] Let $L({\beta},{\gamma})$ be the Lagrangian. \textit{Strict Complementarity} (SC) is satisfied at $\bar{\beta} \in \mathcal{S}$ if, with multipliers $\bar{\gamma}_j \geq 0$, $j \in J_0(\bar{\beta})$, the Karush-Kuhn-Tucker (KKT) condition \begin{align*} \nabla_\beta L(\bar{\beta},\bar{\gamma}) \coloneqq \nabla_\beta \mathcal{L}(\bar{\beta}) + \underset{j \in J_0(\bar{\beta})}{\sum}\bar{\gamma}_j \nabla_\beta g_j(\bar{\beta}) = 0, \end{align*} is satisfied such that $ \bar{\gamma}_j > 0, \forall j \in J_0(\bar{\beta}). $ \end{definition} LICQ is arguably one of the most widely-used constraint qualifications that admit the first-order necessary conditions. SC means that if the $j$-th inequality constraint is active, then the corresponding dual variable is strictly positive, so exactly one of them is zero for each $1 \leq j \leq m$. SC is widely used in the optimization literature, particularly in the context of parametric optimization \citep[e.g.,][]{still2018lectures, shapiro2014lectures}. We further require uniqueness of the optimal solution in \eqref{eqn:true-opt-problem}. \begin{enumerate}[label={}, leftmargin=*] \item \customlabel{assumption:B2}{(B2)} Program \eqref{eqn:true-opt-problem} has a unique optimal solution $\beta^*$ (i.e., $\mathsf{s}^*(\text{\ref{eqn:true-opt-problem}})\equiv\{\beta^*\}$ is singleton). \end{enumerate} Note that under \ref{assumption:B2} if LICQ holds at $\beta^*$, then the corresponding multipliers are determined uniquely \citep{wachsmuth2013licq}. In the next theorem, we provide a closed-form expression for the asymptotic distribution of $\widehat{\beta}$. \begin{theorem}[Asymptotic Distribution] \label{thm:asymptotics} Assume that \ref{assumption:A1} - \ref{assumption:A3}, \ref{assumption:B1}, and \ref{assumption:B2} hold, and that LICQ and SC hold at $\beta^*$ with the corresponding multipliers $\gamma^*$. Then \[ n^{-\frac{1}{2}} \left(\widehat{\beta} - \beta^* \right) = \begin{bmatrix} \nabla^2_\beta L(\beta^*, \gamma^*) & \mathsf{B} \\ \mathsf{B}^\top & 0 \end{bmatrix}^{-1} \begin{bmatrix} \bm{1} \\ \bm{0} \end{bmatrix}^\top \Upsilon + o_\mathbb{P}(1) \] for some $k \times \vert J_0(\beta^*) \vert$ matrix $\mathsf{B}$ and random variable $\Upsilon$ such that \begin{align*} \Upsilon \xrightarrow{d} N\left(0,\text{var}\left(\varphi_a(Z;\eta)h_1(V,\beta^*)+\{1-\varphi_a(Z;\eta)\}h_0(V,\beta^*)\right)\right), \end{align*} where \begin{align*} \mathsf{B} & = \left[\nabla_\beta g_j(\beta^*)^\top, \, j \in J_0(\beta^*) \right], \\ h_1(V,\beta) & = \frac{1}{\log \sigma(\beta^\top\bm{b}(V))}\bm{b}(V)\sigma(\beta^\top\bm{b}(V))\{1 - \sigma(\beta^\top\bm{b}(V))\}, \\ h_0(V,\beta) & = -\frac{1}{\log(1- \sigma(\beta^\top\bm{b}(V)))}\bm{b}(V)\sigma(\beta^\top\bm{b}(V))\{1 - \sigma(\beta^\top\bm{b}(V))\}. \end{align*} \end{theorem} The above theorem gives explicit conditions under which $\widehat{\beta}$ is $\sqrt{n}$-consistent and asymptotically normal. We harness the classical results of \cite{shapiro1993asymptotic} that use an expansion of $\widehat{\beta}$ in terms of an auxiliary parametric program. To show asymptotic normality of $\widehat{\beta}$, linearity of the directional derivative of optimal solutions in the parametric program is required. We have accomplished this based on an appropriate form of the implicit function theorem \cite{dontchev2009implicit}. This is in contrast to \cite{mishler2021fade} that relied on the structure of the smooth, closed-form solution estimator that enables direct use of the delta method. Lastly, our results in this section can be extended to a more general constrained nonlinear optimization problem where the objective function involves counterfactuals (see Lemmas \ref{lem:appendix-1}, \ref{lem:appendix-2} in the appendix). \section{Simulation and Case Study} \label{sec:experiments} \subsection{Simulation} We explore the finite sample properties of our estimators in the simulated dataset where we aim to empirically demonstrate the double-robustness property described in Section \ref{sec:estimation}. Our data generation process is as follows: \begin{gather*} V \equiv X=(X_1, ... ,X_6) \sim N(0,I),\\ \pi_a(X) = \text{expit}(-X_1 + 0.5X_2 - 0.25X_3 - 0.1X_4+0.05X_5 + 0.05X_6),\\ Y = A\mathbbm{1}\left\{X_1 + 2X_2 - 2X_3 -X_4 + X_5 + \varepsilon > 0 \right\} + (1-A)\mathbbm{1}\left\{X_1 + 2X_2 - 2X_3 -X_4 + X_6 + \varepsilon < 0 \right\},\\ \varepsilon \sim N(0,1). \end{gather*} Our classification target is $Y^1$. For $\bm{b}(X)$, we use $X$, $X^2$ and their pairwise products. We assume that we have box constraints for our solution: $\vert \beta_j^* \vert \leq 1$, $j=1,...,k$. Since there exist no other natural baselines, we compare our methods to the plug-in method where we use \eqref{eqn:plug-in-risk} for our approximating program \ref{eqn:approx-opt-problem}. For nuisance estimation we use the cross-validation-based Super Learner ensemble via the \textsc{SuperLearner} R package to combine generalized additive models, multivariate adaptive regression splines, and random forests. We use sample splitting as described in Algorithm \ref{algo:DR-estimator} with $K=2$ splits. We further consider two versions of each of our estimators, based on the correct and distorted $X$, where the distorted values are only used to estimate the outcome regression $\mu_a$. The distortion is caused by a transformation $X \mapsto (X_1X_3X_6, X_2^2, X_4/(1+\exp(X_5)), \exp(X_5/2))$. To solve \ref{eqn:approx-opt-problem}, we first use the StoGo algorithm \citep{norkin1998branch} via the \textsc{nloptr} R package as it has shown the best performance in terms of accuracy in the survey study of \citep{mullen2014continuous}. After running the StoGo, we then use the global optimum as a starting point for the BOBYQA local optimization algorithm \citep{powell2009bobyqa} to further polish the optimum to a greater accuracy. We use sample sizes $n=1k, 2.5k, 5k, 7.5k, 10k$ and repeat the simulation $100$ times for each $n$. Then we compute the average of $\vert v^* - \widehat{v} \vert$ and $\Vert \beta^* - \widehat{\beta} \Vert_2$. Using the estimated counterfactual predictor, we also compute the classification error on an independent sample with the equal sample size. Standard error bars are presented around each point. The results with the correct and distorted $X$ are presented in Figures \ref{fig:mu-correct} and \ref{fig:mu-distorted}, respectively. \begin{figure}[!t] \centering \begin{minipage}{.49\linewidth} \centering \includegraphics[width=\linewidth]{FIG/val.png} \end{minipage}% \hfill \begin{minipage}{.49\linewidth} \centering \includegraphics[width=\linewidth]{FIG/val-d.png} \end{minipage} \end{figure} \begin{figure}[!t] \centering \begin{minipage}{.49\linewidth} \centering \includegraphics[width=\linewidth]{FIG/sol.png} \end{minipage}% \hfill \begin{minipage}{.49\linewidth} \centering \includegraphics[width=\linewidth]{FIG/sol-d.png} \end{minipage} \end{figure} \begin{figure}[!t] \centering \begin{minipage}{.49\linewidth} \centering \includegraphics[width=\linewidth]{FIG/rate.png} \captionof{figure}{With correct $X$} \label{fig:mu-correct} \end{minipage}% \hfill \begin{minipage}{.49\linewidth} \centering \includegraphics[width=\linewidth]{FIG/rate-d.png} \captionof{figure}{With distorted $X$} \label{fig:mu-distorted} \end{minipage} \end{figure} With the correct $X$, it appears that the proposed estimator performs as well or slightly better than the plug-in methods. However, in Figure \ref{fig:mu-distorted} when $\widehat{\mu}_a$ is constructed based on the distorted $X$, the proposed estimator gives substantially smaller errors in general and improves better with $n$. This is indicative of the fact that the proposed estimator has the doubly-robust, second-order multiplicative bias, thus supporting our theoretical results in Section \ref{sec:asymptotics}. \subsection{Case Study: COMPAS Dataset} Next we apply our method for recidivism risk prediction using the Correctional Offender Management Profiling for Alternative Sanctions (COMPAS) dataset \footnote{\url{https://github.com/propublica/compas-analysis}}. This dataset was originally designed to assess the COMPAS recidivism risk scores, and has been utilized for studying machine bias in the context of algorithmic fairness \citep{angwin2016machine}. More recently, the dataset has been reanalyzed in the framework of counterfactual outcomes \citep{mishler2021fairness, mishler2019modeling,mishler2021fade}. Here, we focus purely on predictive purpose. We let $A$ represent pretrial release, with $A = 0$ if defendants are released and $A=1$ if they are incarcerated, following methodology suggested by \cite{mishler2021fairness}.\footnote{The dataset itself does not include information whether defendants were released pretrial, but it includes dates in and out of jail. So we set the treatment $A$ to 0 if defendants left jail within three days of being arrested, and 1 otherwise, as Florida state law generally requires individuals to be brought before a judge for a bail hearing within 2 days of arrest \citep[][Section 6.2]{mishler2021fairness}.} We aim to classify the binary counterfactual outcome $Y^0$ that indicates whether a defendant is rearrested within two years, should the defendant be released pretrial. We use the dataset for two-year recidivism records with five covariates: age, sex, number of prior arrests, charge degree, and race. We consider three racial groups: Black, White, and Hispanic. We split the data ($n=5787$) randomly into two groups: a training set with 3000 observations and a test set with the rest. Other model settings remain the same as our simulation in the previous subsection, including the box constraints. Figure \ref{fig:roc} and Table \ref{tbl:auc-acc} show that the proposed doubly-robust method achieves moderately higher ROC AUC and classification accuracy than both the plug-in and the raw COMPAS risk scores. This comparative advantage is likely to increase in settings where we expect the identification and regularity assumptions to be more likely to hold, for example, where we can have access to more covariates or more information about the treatment mechanism. \begin{figure}[t!] \centering \includegraphics[width=.7\linewidth]{FIG/roc.png} \caption{ROC curves} \label{fig:roc} \end{figure} \begin{table}[t!] \centering \begin{tabular}{ccc}\hline Method & AUC & Accuracy \\ \hline \hline Plug-in & 0.692 & 0.64 \\ Doubly-Robust & \textbf{0.718} & \textbf{0.68} \\ Raw COMPAS Score & 0.688 & 0.65 \\ \hline \end{tabular} \caption{AUC and classification accuracy} \label{tbl:auc-acc} \end{table} \section{Discussion} \label{sec:discussion} In this paper we studied the problem of counterfactual classification under arbitrary smooth constraints, and proposed a doubly-robust estimator which leverages nonparametric machine learning methods. Our theoretical framework is not limited to counterfactual classification and can be applied to other settings where the estimand is the optimal solution of a general smooth nonlinear programming problem with a counterfactual objective function; thus, we complement the results of \cite{mishler2021fade, kim2022counterfactual}, each of which considered a particular class of smooth nonlinear programming. We emphasize that one may use our proposed approach for other common problems in causal inference, e.g., estimation of the contrast effects or optimal treatment regimes, even under runtime confounding and/or other practical constraints. We may accomplish this by simply estimating each component $\mathbb{E}[Y^a \mid X]$ via solving \eqref{eqn:true-opt-problem} for different values of $a$, and then taking the conditional mean contrast of interest. We can also readily adapt our procedure \eqref{eqn:true-opt-problem} for such standard estimands, for example by replacing $Y^a$ with the desired contrast or utility formula, in which the influence function will be very similar to those already presented in our manuscript. In ongoing work, we develop extensions for estimating the CATE and optimal treatment regimes under fairness constraints. Although not explored in this work, our estimation procedure could be improved by applying more sophisticated and flexible modeling techniques for solving \eqref{eqn:true-opt-problem}. One promising approach is to build a neural network that minimizes the loss \eqref{eqn:risk-estimator} with the nuisance estimates $\{\varphi_a(Z_i;\widehat{\eta}_{-B_K})\}_i$ constructed on the separate independent sample; in this case, $\beta$ is the weights of the network where $k \gg k^\prime$. Importantly, in the neural network approach we do not need to specify and construct the score and basis functions; the ideal form of those unknown functions are learned through backpropagation. Hence, we can avoid explicitly formulating and solving a complex non-convex optimization problem. Further, one may employ a rich source of deep-learning tools. In future work, we plan to pursue this extension and apply our methods to a large-scale real-world dataset. We conclude with other potential limitations of our methods, and ways in which our work could be generalized. First, we considered the fixed feasible set that consists of only deterministic constraints. However, sometimes it may be useful to consider the general case where $g_j$'s need to be estimated as well. This can be particularly helpful when incorporating general fairness constraints \citep{hardt2016equality, mishler2021fade, mishler2021fairness}. Dealing with the varying feasible set with general nonlinear constraints is a complicated task and requires even stronger assumptions \citep{shapiro1993asymptotic}. As future work, we plan to generalize our framework to the case of a varying feasible set. Next, although we showed that the counterfactual objective function is estimated efficiently via $\widehat{\mathcal{L}}$, it is unclear whether the solution estimator $\widehat{\beta}$ is efficient too, due to the inherent complexity of the optimal solution mapping in the presence of constraints. We conjecture that one may show that the semiparametric efficiency bound can also be attained for $\widehat{\beta}$ possibly under slightly stronger regularity assumptions, but we leave this for future work.
{'timestamp': '2023-01-18T02:15:34', 'yymm': '2301', 'arxiv_id': '2301.06199', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06199'}
arxiv
\section{Acknowledgements} \section*{Acknowledgments} This work was supported by the UK Research and Innovation (UKRI) National Interdisciplinary Circular Economy Centres Research programme, as part of the Textiles Circularity Centre (TCC) [grant number EP/V011766/1]. For the purpose of open access, the author has applied a Creative Commons Attribution (CC BY) licence to any Author Accepted Manuscript version arising. \section{Appendix on Fibre taxonomy} This section presents the fibre taxonomy in \Cref{tab:fibre-tax}. The taxonomy for fibres is classified by its fibre categories (the four macro-types): animal, plant, synthetic and regenerated. There are 442,035 images in TextileNet-fibre, the number of images for the 33 fibre labels is shown in \Cref{fig:fibre}. For easy of overview, we use log in the y-axis and added the actual numbers. \input{tables/fibre} \subsection{} \begin{figure} \centering \centering \includegraphics[scale=0.7]{fiber_plot_log.pdf} \captionof{figure}{\textcolor{LightGreen}{Image number of fibre labels in each macro type: synthetic, regenerated, plant and animal.}} \label{fig:fibre_chart} \end{figure} Future scientists with new fibre types can add to \Cref{tab:fibre-tax}, but they would also need the raw material information to be able to complete the taxonomy. \section{Fabric taxonomy} Similar to the previous section, here we have the common clothing fabrics. Fabric can be made from different fibres and there is normally a production method involved when making fabrics from fibres. The Fabric taxonomy in \Cref{tab:fabric-tax} displays this mapping of the fibre-to-fabric production process. There are 318,914 images in TextileNet-fabric, the number of images for the 27 fabrics labels is shown in \Cref{fig:fabrics}. It is worth noting the mapping between fibre and fabric can aid in tracing fabric's origin, manufacturing method and what are possible raw materials. The fabric names in \Cref{tab:fabric-tax} are the TextileNte-fabric labels. \begin{table}[h] \centering \caption{Fabric taxonomy, each fabric is listed with common fibres making it. \textcolor{LightGreen}{* are non-woven fabric, they are formed directly by chemically bonded polymer (plastic).}} \label{tab:fabric-tax} \begin{tabular}{@{}ll@{}} \toprule \textbf{Fabric name} & \textbf{Common fibres/material for fabric} \\ \midrule canvas & cotton, hemp, flax \\ chambray & cotton, flax \\ chenille & wool, cotton, silk, rayon \\ chiffon & silk, cotton, nylon, polyester \\ corduroy & cotton, wool, silk, polyester, rayon \\ crepe & silk, wool, synthetic \\ denim & cotton, poly cotton \\ faux fur & acrylic, silk, wool, mohair, cotton, polypropylene(PP) \\ faux leather* \footnotemark & PU, PVC, polyvinyl \\ flannel & wool, cotton, synthetic fibres \\ fleece & polyester \\ gingham & cotton \\ jersey & wool, silk, cotton, synthetic fibres \\ knit & silk, linen, cotton, wool, viscose, rayon \\ lace & nylon, polyester, rayon, cotton, silk, flax \\ lawn & flax, cotton \\ neoprene & polychloroprene, synthetic rubber \\ organza & silk, nylon, rayon, polyester \\ plush & polyester, wool, cotton, viscose, silk \\ satin & silk, wool, nylon, polyester \\ serge & wool, silk \\ taffeta & silk, nylon, acetate, rayon, polyester \\ tulle & silk, cotton, polyester, nylon, rayon \\ tweed & wool, silk, rayon \\ twill & cotton, polyester \\ velvet & silk, cotton, flax, wool, rayon, polyester, nylon, acetate \\ vinyl* & polyvinyl \\ \bottomrule \end{tabular} \end{table} \begin{figure}[!h] \centering \centering \includegraphics[scale=0.7]{fabric_plot_lg.pdf} \captionof{figure}{\textcolor{LightGreen}{Image number of fabric labels.}} \label{fig:fabrics} \end{figure} \footnotetext{Fabric name with * are non-woven fabric, they are formed directly by chemically bonded polymer (plastic)} \section{Dataset construction and cleaning} As we introduced in the paper, our dataset combines existing datasets and results from Google Image Search. \subsection{Images from Google Images} \paragraph{Collecting Images from Google Images} \begin{table}[h!] \centering \caption{Garment categories for query phrases} \label{tab:categories} \begin{tabular}{@{}llllllll@{}} \toprule \multicolumn{8}{c}{\textbf{Category names}} \\ \midrule blazer & blouse & cardigan &dress &hoodie &jumpsuit & pants &shirt \\ shorts &skirt &sweater &vest &outerwear & sweatshirt &t-shirt &top \\ \bottomrule \end{tabular} \end{table} We used labels from our fibre and fabric taxonomies as keywords and combined them with clothing categories to build query phrases. There are 16 garment categories shown in \Cref{tab:categories}, they are commonly used in fashion datasets \cite{zheng/2018acmmm} and we used them to combine our label from taxonomy to build the query phrases. They are ``blazer, top, t-shirt, dress, hoodie, shirt, blouse, cardigan, pants, skirt, sweater, sweatshirt, shorts, vest, outerwear, jumpsuits". \textcolor{LightGreen}{Initially, we had 36 fibre labels and 30 fabric labels. This process results in a list of 576 fibre unique quires and a list of 480 fabric unique quires.} Then we feed these queries to the Google Image Search with the usage right under \textit{labelled-for-reuse-with-modifications}. The images are downloaded with their metadata including image descriptions, image filenames and URLs.\textcolor{LightGreen}{ A total of 359,078 images are collected from Google Images, which takes 41.65\% of the dataset.} \paragraph{Data Cleaning} We cross-checked the downloaded image descriptions with query phrases, and removed images without any label information in their descriptions. \textcolor{LightGreen}{After the removal based on metadata, We analysed the distributions of images returned from the queries. We then used random sampling and manually inspected for images. During the process, we removed following labels and images:} \begin{itemize} \item \textcolor{LightGreen}{We excluded \textit{coir}, \textit{kapok} and \textit{Azlon} in fibre taxonomy. Both \textit{coir} and \textit{kapok} are natural plant fibres, but they are commonly used in textile furniture such as matting and bedding. New sustainable regenerated fibre \textit{Azlon} is removed because neither the quantity nor quality of images is sufficient for the dataset.} \item We removed the query which has less than 100 images; \item \textcolor{LightGreen}{We randomly sampled query phrases for each fibre/ fabric label and manually went through the images with their associated labels;} \item \textcolor{LightGreen}{We removed unusable images that are of low resolution, incorrect for the label, multi objects or whose dominant objects are irrelevant to clothes.} \end{itemize} \textcolor{LightGreen}{We then randomly sampled a subset (around 0.1\%) of the dataset and manually went through the dataset with its associated labels. In this small subset, we suggest around 82\% of images are matching with our labels.} The images are then sorted by fibre and fabric labels described in the two taxonomies in \Cref{tab:fibre-tax} and \Cref{tab:fabric-tax}. \subsection{Collection of other fashion datasets} We combined and reconstructed based on two fashion datasets, iMaterialist \cite{guo2019imaterialist} (Creative Commons Attribution 4.0 License) and Amazon review data \cite{ni2019justifying} respectively, and imported some of their images into our dataset. \textcolor{LightGreen}{The number of images from iMaterialist is 480,558 images and 22,588 from Amazon Review, takes 55.73\% and 2.62\% of the dataset respectively.} When incorporating images in these datasets, we use their material attributes to assign images to our taxonomy-based labels. Images with attributes that do not match any of our taxonomy-based labels are then ignored. The iMaterialist dataset contains labels for materials, and some images have multiple labels. To prevent this from causing confusion and adding noise to our data, we remove images that have more than two material labels in the same taxonomy. The Amazon review dataset, on the other hand, is more complex. This dataset contains information of items on the Amazon site and also user reviews of these items. Obviously, the information of these fashion products would contain images. We then use the similar query phrase approach described in the previous subsection to collect data. We use fibre/fabric label + category as a query phrase, and use this query phrase to traverse the fashion part of the dataset (The Amazon dataset has several parts and the fashion part contains all the items in their fashion department). After combining all sources and giving them correct labels based on our taxonomies, we utilised a face detection model from \url{https://github.com/ageitgey/face\_recognition/} to detect whether these images contain human faces. This function returns the number of faces and the top, right, bottom, and left coordinates of each face (in pixels). We removed images with several faces and cropped images with a single human face from the bottom coordinates. We then similarly relied on body detection to remove images without plausible garments and when multiple garments are existing. \section{Training details} \textcolor{LightGreen}{\paragraph{Data processing} We resized the image to 256*256, then applied randomised cropping to size 224*224, this is then followed by a randomised horizontal flip. At evaluation time, all images are centralised and resized to size 224*224.} \paragraph{Baseline} The models that we evaluated on the proposed TextileNet dataset are trained from scratch, these models are ResNet18 \cite{he2016deep} and Vision Transformer (Vit) \cite{dosovitskiy2020image}. For both the ResNet18 and the ViT model, we use their standard architecture setup, \Cref{resnet} and \Cref{vits} show the parameters, respectively. \begin{table}[h] \caption{ResNet18 parameters \\ (* stands for the number of classes)} \label{resnet} \centering \begin{tabular}{ccccc} \toprule Layer Name & Output Size & kernel size & channels &stride \\ \midrule conv1 & $112 \times 112 \times 64$ & $7 \times 7$ & 64 & 2 \\ \midrule maxpool & & $3 \times 3$ & 64 & 2 \\ \midrule block\_0\_conv0\_x & \multirow{2}{*}{$56 \times 56 \times 64$} & $3 \times 3 $ &64 &2 \\ block\_0\_conv1\_x & & $3 \times 3$ & 64 & 1 \\ \midrule block\_1\_conv0\_x & \multirow{2}{*}{$28 \times 28 \times 128$} & $3 \times 3 $ &128 &2 \\ block\_1\_conv1\_x & & $3 \times 3$ & 128 & 1\\ \midrule block\_2\_conv0\_x & \multirow{2}{*}{$14 \times 14 \times 256$} & $3 \times 3 $ &256 &2 \\ block\_2\_conv1\_x & & $3 \times 3$ & 256 & 1\\ \midrule block\_3\_conv0\_x & \multirow{2}{*}{$7 \times 7 \times 512$} & $3 \times 3 $ &512 &2 \\ block\_3\_conv1\_x & & $3 \times 3$ & 512 & 1 \\ \midrule average pool & $1 \times 1 \times 512$ & $7\times7$ average pool \\ \midrule fully connected & n* &$512 \times n$&\\ \midrule softmax & n \\ \bottomrule \end{tabular} \end{table} \begin{table}[h] \caption{Vision Transformers parameters} \label{vits} \centering \begin{tabular}{cccc} \toprule Patch size & Embedding dimension & Depth & Number of heads \\ \midrule 16 & 192 & 12 & 3\\ \bottomrule \end{tabular} \end{table} We used the ADAM optimizer \cite{kingma2014adam} for these datasets and set the learning rate to $5e^{-4}$ and batch size to $256$. We train for 70 epochs on these datasets. We use $80\%$ of the data to train and evaluate the rest $20\%$ on the final model in the paper. \paragraph{More Result} We run each training 3 times with different random seeds and report their final test accuracy with mean and standard deviations. Different from the results presented in our paper, We use $80\%$ of the data to train and evaluate on the rest $20\%$ on the final model. \Cref{tab:results2} demonstrates the accuracy of different baseline models on this dataset setup, it shows a similar trend to the results presented in our paper. \begin{table}[tbp] \centering \caption{Top-1, top-3 and top-5 accuracy on TextileNet-fibre and TextileNet-fabric.} \label{tab:results2} \begin{tabular}{@{}c|ccc|ccc@{}} \toprule & \multicolumn{3}{c}{TextileNet-fibre} & \multicolumn{3}{c}{TextileNet-fabric} \\ \midrule Metric & top-1 & top-3 & top-5 & top-1 & top-3 & top-5 \\ \midrule ResNet18 & $49.35 \pm $0.22 & $74.45 \pm $0.17 & $82.93 \pm $0.04 & $58.17 \pm 0.40 $ & $81.14 \pm $0.36 & $88.68 \pm $0.19 \\%& & & \\ ViTs & $44.39 \pm $0.08 & $69.00 \pm $0.06 & $78.51 \pm $0.04 & $58.51 \pm $0.04 & $80.21 \pm $0.04 & $87.77 \pm $0.07 \\%& & & \\ \bottomrule \end{tabular} \end{table} All experiments complete in $<14$ GPU-days on a four NVIDIA GeForce GTX 1080 Ti system with an Intel(R) Xeon(R) CPU E5-2620 v4 at 2.10 GHz. \section{Discussion} Nowadays, a low-cost, high efficiency technique for the automatic identification of textile materials in garments is missing. The TextileNet is mainly built for image-based textile material retrieval and contributes to the textile circularity process. As described in the paper, the recycling process for textile materials relies heavily on raw materials. The TextileNet-fibre has the greatest number of fibre labels among existing fashion datasets, allowing it to meet the fundamental requirements of textile material classification. \textcolor{LightGreen}{We compare the related works in \Cref{tab:compare-fabric}.} \input{tables/compare} Apart from the post-consumed garments as we discussed, there are alternative material tracing solutions for new garments. One option is adopting blockchain for the clothing supply chain. Francisco \textit{et al.} built a conceptual clothing supply chain blockchain model to improve supply chain transparency and thus track the textile footprint \cite{francisco2018supply}. The textile industry is trying to integrate blockchain tokens into the supply chain to create a new way to manage carbon footprints \cite{lam2019textile}. Radio frequency identification (RFID) tags are among the most promising technologies for tracking objects and managing supply chains. However, RFID's use in textiles is still constrained by its high cost, potential security risks, and privacy concerns. \cite{nayak2015rfid}. \subsection{Potential negative social impact} Although we have tried to clear human faces and remove the majority part of human bodies in our photos using a body detection framework, this dataset still inevitably contains a small amount of human figure information (\textit{eg.} hair colour, skin color, \textit{etc.}). In a random sampling based inspection ($0.1\%$ of the dataset is sampled), there are only $0.3\%$ images contain visible human body information and these often partial information (\textit{eg.} skin colour on the forearm is the most popular one). This dataset contains garments made of different textiles. There is a chance that if one develops a customer-facing application using this dataset might misinterpret customer figures and cause unwanted racial-related output. For instance, the system might recognize customers with coloured skin to be suede or leather. However, for textile recycling based applications, no humans are involved and this potential social problem is avoided. \section{Data access and maintenance} All the information about the dataset, including links to the paper, code and future announcements will be accessible at \url{https://github.com/hahasue/TextileNet/}, this information will be maintained by the authors. For images without human faces, we provide the URLs that point to the original images uploaded by either the existing dataset or google images. This means that for reconstructed images, the original datasets retain full control of their data - any deleted from them will be automatically removed from the URLs. We hosted the face-cropped images on Google Drive, users can download them by URLs or from the script. We also provide an alternative download link on One Drive. Anyone can extend TextileNet using our taxonomies and collected data with the Creative Commons Attribution (CC By) licence. The data collection code is released with an MIT license. In the meantime, we also release the model training code for the ResNet and Vit models on our datasets, and the pre-trained checkpoints are also included in the Github Repository. The TexitleNet will be maintained on GitHub by the author: \begin{itemize} \item GitHub for download instructions and a download script. \item Images with face-cropped are hosted on Google Drive and One Drive. \item Images that could be downloaded from other resources could be automatically downloaded in our download script. \item \textbf{Maintenance}: our GitHub repository will be open to the public, and we will actively try to resolve the issues raised in this repository. \end{itemize} \end{document} \section{Conclusion} In this paper, we introduced the TextileNet dataset. This dataset is designed based on a fibre and a fabric taxonomy created with material domain experts. We demonstrate the definition of fibres, fabrics and textiles to better understand the use of the dataset. The TextileNet-fibre contains 33 labels and the TextileNet-fabric part has 27 labels. These two parts combined have around 760K images. TextileNet-fibre can be used to trace raw material by fibre taxonomy, and we presented a piece of fabric that can be traced back to its origins and manufacturing processes using our taxonomies. We then discussed how this image-based textile material retrial can be a crucial step to help the fashion industry to meet its sustainability goal. We present and report baseline models (CNN and ViT respectively) on TextileNet, and will open source both the dataset and these pre-trained models. \section{The TextileNet dataset} The TextileNet dataset consists of two parts, TextileNet-fiber and TextileNet-fabric, which were developed based on two taxonomies - fibre taxonomy and fabric taxonomy, respectively. Future users can also extend the fabric or fibre taxonomy for broader range of applications, for instance, an interactive design for customers will help them understand what is the garment made of and with the development of carbon footprint calculation, customers can raise awareness of sustainable fashion. \textbf{Taxonomy-informed image collection} We construct our dataset by combining Google Images (41.65\%) with existing fashion datasets (58.35\%) containing labels in our taxonomies. We have taxonomy-based labels first, and we collect images using query phrases derived from our taxonomies, as opposed to previous fashion datasets that crawl metadata and explore information of collected metadata to design labels. \begin{figure}[h] \centering \centering \includegraphics[scale=0.3]{images/sample.pdf} \captionof{figure}{Samples of fibre dataset (left) and fabric dataset (rights). This is a visualization to show what data is included in TextileNet, these are real images sampled from TextileNet.} \label{fig:sample} \vspace{-10pt} \end{figure} \textbf{Google images} We collected images from Google's Image Search. In practice, we found simply searching for the fabric or fibre names would not return meaningful results. Our solution was to bound this search to obtain garment items rather than textile items. We used labels from our fabric/fibre taxonomy as keywords and combined them with clothing categories to build a query to the Image Search, \textit{i.e.} ``fibre labels + category". For instance, for a clothing category such as ``cardigan", we can combine it with a fabric/fashion label keyword to build the search phrase ``wool cardigan". We use the fashion clothing category labels defined by Zheng \textit{et al.}, since these labels are widely utilised in fashion datasets \cite{zheng/2018acmmm}. \textbf{Reconstruct fashion datasets} As there are existing datasets with partial material labels, we reconstructed two fashion datasets with material labels to fit into our dataset, \textit{i.e.,} iMaterialist \cite{guo2019imaterialist} and Amazon review data \cite{ni2019justifying} based on our taxonomy-based labelling. We removed images with multiple human faces and cropped images with human faces. This process was applied to ensure that no human faces/identifiable information are included in our developed dataset. \Cref{fig:sample} shows the samples from the fibre dataset and fabric dataset. Our final fibre and fabric datasets have 33 and 27 classes respectively. \section{Dataset validation and baselines} This section provides a quantitative evaluation. In \Cref{sec:setup} we describe our evaluation setup and \Cref{sec:results} reports the accuracy of applying a CNN and a ViT model on our dataset. \textbf{Experiment setup} \label{sec:setup} We validated our dataset with popular Deep Learning models to establish a baseline comparison. We considered the following two models: \begin{itemize} \item \textcolor{black}{\textit{ResNet50}} \cite{he2016deep}: The ResNet family networks make use of the residual connections and we use the ResNet50 structure as a representative Convolutional Neural Network. \item \textit{Vision Transformer (ViT)} \cite{dosovitskiy2020image}: There is now a trend for Transformer models to become the de-facto standard architecture for various domains of tasks. We provide a ViT as a baseline model for our proposed TextileNet dataset. \end{itemize} For both the \textcolor{black}{ResNet50} and the ViT model (tiny), we use their standard architecture setup for training on the TextileNet-fibre and TextileNet-fabric in our TextileNet. We used the ADAM optimizer \cite{kingma2014adam} for these datasets, and set the learning rate to $5e^{-4}$ and batch size to $256$. We train for 70 epochs on these datasets. We partition our data to 0.7, 0.1 and 0.2 for training, validation and testing. The validation images are randomly sampled from our previous training set in the paper that had the 0.8 and 0.2 training and testing splitting. In our supplementary material, we provide the image process, detailed hyperparameters and more results when training models using $80\%$ to train and $20\%$ for testing. We run each training 3 times with different random seeds and report their final test accuracy with mean and standard deviations. All experiments complete in $<14$ GPU-days on a four NVIDIA GeForce GTX 1080 Ti system with an Intel(R) Xeon(R) CPU E5-2620 v4 at 2.10 GHz. \begin{table}[h] \centering \caption{Top-1, top-3 and top-5 accuracy on TextileNet-fibre and TextileNet-fabric with a validation set.} \label{tab:results} \begin{tabular}{@{}c|ccc|ccc@{}} \toprule & \multicolumn{3}{c}{TextileNet-fibre} & \multicolumn{3}{c}{TextileNet-fabric} \\ \midrule Metric & top-1 & top-3 & top-5 & top-1 & top-3 & top-5 \\ \midrule \textcolor{black}{ResNet50} & \textcolor{black}{$49.74 \pm $0.27} & \textcolor{black}{$76.04 \pm $0.13} & \textcolor{black}{$87.32 \pm $0.14} & \textcolor{black}{$65.28 \pm $0.67} & \textcolor{black}{$85.06 \pm $0.43} & \textcolor{black}{$90.36 \pm $0.31} \\ ViTs & $47.04 \pm $0.33 & $64.86 \pm $0.10 & $80.04 \pm $0.07 & $61.62 \pm $0.09 & $78.78 \pm $0.11 & $89.20 \pm $0.17 \\ \bottomrule \end{tabular} \end{table} \textbf{Results} \label{sec:results} \Cref{tab:results} summarizes the performance of different ML models on classification of different partitions of TextileNet. It is observed that the accuracy on Fabric is generally greater than the accuracy on Fibre. When we look at only the top-5 accuracy, both ML models show relatively good performance (above $80\%$). Our results in \Cref{tab:compare-table} also suggests that it is more challenging to recognise fibre than fabric. \Cref{tab:compare-table} shows that the top-1 accuracy of fibre classification is around $15\%$ lower compared to fabric model when we use a ResNet50 model, the same trend can be seen on the ViT model (the top-1 accuracy gap is around $14\%$). Intuitively, classifying fibre should naturally be a harder task, because fibre is closer to the start of the supply chain compared to fabric, as illustrated in \Cref{fig:textile}. This then makes the recognition of fibre a lot more challenging than fabric. \textcolor{black}{ The results also vary from different models, we assume that convolutions might be better at finding texture-related attributes and attention mechanisms might be less powerful on this since they focus on patched sequences. } We release these pre-trained models with our dataset so that future users can have direct access to our baseline ML models. \section{Discussion, broader impact and future work} Here, we address the future work that can be derived from this dataset, as well as its limits. \textbf{Standardizing textile materials labelling in datasets through taxonomies} In the booming textile industry, there is always a drive to discover new fibres and fabrics that are maybe more cost-effective or more environmentally friendly. There is always a worry that fashion datasets published today will soon be obsolete because fashion items get updated quickly. Our solution to this problem is to build TextileNet, a dataset that is based on fibre and fabric taxonomies collaboratively designed with material scientists, connecting the different elements in the production flow, starting from the source material. These taxonomies allow future extension with new fibre and fabric types using a taxonomy-informed image-based textile materials retrieval approach. \textbf{Broader impact} As discussed in \Cref{sec:related:why}, the fashion industry is actively thinking of a transformation to be more sustainable. With the global drive of Net Zero \cite{macarthurfashion}, it is now a recommended practice to ensure that textile materials of garments can be traced back to their original sources so that the recycling process can be more carefully designed and their carbon emissions can be more precisely estimated. The dataset presented in this paper shows the potential social and environmental impact in helping researchers and the industry to make progress by providing them with a large-scale dataset. Our dataset is also the first of its kind that provides an expert-designed taxonomy for image labelling. For the ML community, we bridge the knowledge gap between textile material research in the fashion industry and ML research, so that novel and existing ML techniques can be implemented and evaluated on our dataset to enable or optimise various fashion applications. From the material science perspective, we make sure that the designed taxonomies are extendable and can be used as a foundation taxonomy for new fibres and fabrics. \textbf{Limitations and future work opportunities} Although we have the greatest number of fibre labels compared to other available fashion datasets, there are several limitations in our data collection method: \begin{itemize} \item The query phrases for fashion items are limited by category types, not all fashion items are addressed; \item There is an imbalance between the number of samples from different labels. This is due to some fibre or fabric types being less popular. Some new fibre types, such as Soybean fibres and Milk casein, have fewer images than other typical fibres (cotton, wool, \textit{etc.}) due to they are not widely used yet; \item We have not included fibre blends in our taxonomy or dataset due to the lack of solid metadata for fibre blends. Fibre blends combine two or more fibres into a single fibre strand or yarn. Fibre blends are often developed to provide a particular level of comfort or reduce the costs of fibres \cite{ribul2021mechanical}. Many blends exist such as wool-acrylic blends for knitted garments, or cotton-polyester in different types of garments \cite{dissanayake2021fabric}. At the moment, it is challenging to identify and recycle them \cite{haslinger2019upcycling}. Future work can integrate fibre blends into the fibre taxonomy. \item Label noise is inescapable in large-scale datasets generated by online queries and crowdsourcing \cite{wei2021open}, such as the one we implemented here. This is another limitation imposed on our work. Due to the absence of blend fibres in the taxonomy, certain images labelled with two fibres or one fibre and one fabric may also be regarded to have closed-set noisy labels. A garment that was labelled as both wool and acrylic in our dataset is an example of closed-set noisy labelling, despite being made of a wool-acrylic blend containing both wool and acrylic. It is a missing piece in the industry and material research that textile material metadata lacks clear blend information for textiles online where it may only be found on the wash label on the garments and is not constant. \end{itemize} \textcolor{LightGreen}{ Despite these challenges, we expect our dataset can provide a standardization on labelling image data in the fashion industry. One potential drawback of the dataset is that its contained images are from online images and this inevitably contains label noises with varying image resolutions. The preferred method for upstream supply chain companies is to provide high quality images of their products.} Companies or organizations in the supply chain can also use their fetched high-quality images to construct their own datasets based on the fibre and fabric taxonomies provided in this paper. \textbf{Future work} We expect that this work will contribute to the development of a new fashion AI-based platform in the future. A textile recognition technique can be created based on this work. The TextileNet is mainly built for image-based textile material retrieval and contributes to the textile circularity process, including the supply chain and the consumer experience. \textcolor{LightGreen}{ We anticipate that the implementation of a taxonomy-based label can provide a standard for dataset and encourage material scientists to reflect on this labelling problem on fibre blends. Future work can investigate the image quality through image-wise manual inspection on the entire dataset.} For the textile supply chain, it is possible to develop advanced sorting techniques based on the taxonomy and TextileNet dataset. The TextileNet-fibre has the greatest number of fibre labels among existing fashion datasets, allowing it to meet the fundamental requirements of textile material classification. The designed taxonomies would also help identification of the raw materials and production methods for different textiles. This can be used in a coarse-grained classification before using professional spectrum-based analysis for material composition classification. The goal is to scale up recycling and optimize the textile circularity supply chain. As for consumers, they can take a picture of the garments and learn about the fabric and fibres that are likely used to make the garment. They can then use this to better understand whether the garment is made of natural fibres or synthetic fibres, what the raw material is and maybe learn how it can be recycled. \section{Introduction} Clothing and textiles are ubiquitous in our daily lives. Online shopping elevates individuals to a new level of purchasing experience - customised shopping with tons of options from a global market, simple checkout procedures, convenient delivery and returns. According to market estimates, the global fashion e-market is worth \$752.5 billion in 2020 \cite{coppola2021commerce}. This enormous economic value indicates an increased demand for e-commerce services by individuals. These rising demands in the fashion industry motivate the use of Machine Learning (ML) techniques to facilitate low-level pixel recognition, mid-level fashion comprehension and high-level fashion applications \cite{song2018multimedia}. Higher-level applications, such as outfit recommendations and virtual try-ons \cite{han2018viton}, are supported by lower-level fashion tasks, \textit{e.g.} parsing (segmentation) \cite{ge2019deepfashion2,jia2020fashionpedia}, landmark detection \cite{liu2016deepfashion}, \textit{etc.} A number of works have then developed apparel related datasets for all levels of fashion tasks, including landmark annotations \cite{liu2016deepfashion,jia2020fashionpedia,ge2019deepfashion2}, category classification \cite{guo2019imaterialist,zou2019fashionai,xiao2017fashion}, attributes labelling \cite{jia2020fashionpedia,he2016deep}, recognition-based retrieval \cite{huang2015cross,han2018viton,hadi2015buy}, \textit{etc.} Despite the development of ML techniques in the fashion industry, the textile industry still faces challenges in its chase of a more sustainable model to reduce the enormous volumes of textile wastes and to meet the global Net Zero goal \cite{macarthurfashion,boiten2017circular}. Textile materials play a critical role in garments due to the fact that it is selected based on their particular properties, which may include the level of comfort they provide and the degree to which they can be recycled, \textit{etc.} \cite{laitala2012sustainable}. Millions of tons of garments end up in landfill every year \cite{muthu2018circular}. Textiles circularity, a novel conceptual model of the circular economy, demonstrates an option for the fashion industry to reduce its carbon footprint and costs, maximise the life of textiles, and minimise waste. Textiles can be reused at many levels, being regenerated into new fibres or utilised textile wastes as energy fuel \textit{etc.}, thereby reducing the carbon footprint \cite{macarthur2013towards}. It is a recommended practice to ensure that textiles can be traced back to their original source so that the recycling process can be guaranteed. Yet, nowadays, textiles are mostly sorted manually \cite{norup2019evaluation}, despite recent research raise using near infrared spectroscopy (NIR spectroscopy) to recognize textiles for automated garments sorting line \cite{cura2021textile}. \textbf{A low-cost, high-efficiency technique for the automatic identification of textile materials in garments is missing}, so that the digitised fashion sector would be able to retrieve the materials they are composed of. This would help reduce a large amount of textile wastes and carbon emissions \cite{textileexchange2021preferred}. Given the significance of textile material identification in clothing, it is worth noticing that this identification process can be complicated because fibre and fabric refer to different textile materials. Fibre is the material to make fabric, however, most existing fashion datasets in ML mixed them in the same class. No dataset presently contains organized textile material labels; they do not provide a systematic picture of material-related labels \cite{liu2016deepfashion,guo2019imaterialist}. They contain partial textile material attributes; their annotation scheme lacks a rationale and is not systematically reviewed by material scientists. \begin{figure} \centering \centering \includegraphics[width=0.9\textwidth]{images/textileflow.pdf} \captionof{figure}{The general production flow of textiles. \textit{Textiles} is an umbrella term and it includes raw material, fibre, fabric and garments \textit{etc} (indicated in dashed box). The dataset labels are generated from two textile material taxonomies: a fibre taxonomy (\Cref{fig:fibre}) and a fabric taxonomy (in Supplementary material). Fibres have four macro-types and we show several fibre examples (flax, wool, aramids, and milk casein) in the figure. Fabrics have three macro-types of production methods, we also show several fabric examples (denim, tweed, velvet and taffeta) .} \label{fig:textile} \vspace{-15pt} \end{figure} Here we propose TextileNet, a material taxonomy-based fashion textile dataset to close the gap in current research on textile material identification in clothing. We developed the TextileNet dataset (illustrated in \Cref{fig:textile} and the detailed illustration is in \Cref{fig:fibre}) based on fibre and fabric labels. We achieved this through carefully designing two taxonomies, one for fibres and another for fabrics in close collaboration with material domain experts. We discuss the design details in \Cref{sec:fashion}. The goal of this TextileNet dataset is to contribute to textile material identification in the fashion industry and image-based textile material retrieval, at the same time, \textbf{standardize the digitized textile material labelling}. TextileNet can be deployed in various domains, including material science, fashion design, retails and the textile supply chain, \textit{etc}. Our contributions are: \begin{itemize} \item We present a fibre taxonomy and a fabric taxonomy created in collaboration with material domain experts; these taxonomies contain macro-types of textiles and are extendable for future new fibre/fabric types; \item Using the labels from these taxonomies, we collect and build material taxonomy-based fashion datasets for fibre and fabric. The built datasets, named TextileNet, TextileNet-fibre contains 33 fibre labels, 27 fabric labels in TextileNet-fabric, and have 760,949 images; \item We present and report two baseline models (CNNs and Vision Transformers) for fibre and fabric classification, both models achieve $>80\%$ top-5 accuracy on our datasets. \end{itemize} \section{Related work} \subsection{Why do we care about fibre, fabric and textiles?} \label{sec:related:why} The general production flow in the fashion industry contains the following intermediate stages: \textit{raw material}, \textit{fibre}, \textit{fabric} and \textit{garment} (as illustrated in \Cref{fig:textile}). The term textiles is commonly used as an umbrella term to describe any textile-related products; while fibre normally refers to the raw elements or materials that is used to manufacture fabric. In other words, fabric is a finished product made from fibre, and the term is defined by its manufacturing processes rather than to its constituent material (fibre). Velvet, for example, is a type of woven tufted fabric with evenly distributed cut threads and a short pile that can be fabricated from silk, rayon, and polyester \textit{etc}. We present a detailed definition of fibre, fabric and textile in \Cref{sec:textile} to clarify the difference between these concepts. Here we first elaborate on the importance of this research in the broader context of a circular economy. Recent years have witnessed the fashion industry, including brands and retailers, embrace the need for creating more sustainable fashion. Brands such as Stella McCartney, Nike, Doodlage \textit{etc.} have used recycled materials in their products and created recycling programmes for their customers \cite{khandual2019fashion}. Researchers developed bio-degradable techniques for existing textiles and created novel sustainable fibres \cite{ribul2021mechanical}. Multiple scientific domains, from material science, supply chain, to consumer experience, are contributing to the circular economy of sustainable textiles futures. Improving the sustainability of the fashion industry requires a comprehensive understanding of the fibres and fabrics used in garments. If we can track the origin of the raw material used in clothes, we can generate more accurate carbon footprint models for them \cite{macarthur2013towards} and material experts can begin to research and design novel recycling processes for garments \cite{laitala2012sustainable}. In a circular model, all textile materials are considered as resources, hence there is no waste \cite{textilecircularity}. Our TextileNet dataset can be seen as the first step in automating the process of tracing back the fibre and fabric origins of garments, linking together all steps in the textiles production flow. \subsection{Textile classification} Traditional material classifications in material science typically involve physical, chemical, or biological tests. \textcolor{LightGreen}{Classifications tasks are often assigned for fibres, whereas fabric-related tasks typically focus on defect detections.} \paragraph{Fibre} The infrared spectroscopy data were used to identify and classify textile fibres. Peets \textit{et al.} \cite{peets2017identification} used Principal Component Analysis (PCA) to analyse spectral data in chemometric methods, and only silk and wool could be distinguished partially. For textile fibre recognition tasks, all research is limited by sample size (a few hundred samples). Liu \textit{et al.} \cite{liu2020qualitative} demonstrated that CNN outperforms Support Vector Machines (SVM) and Multilayer Perceptron (MLP) algorithms with 263 samples tested from the near infrared spectroscopy (NIR) spectrum ; whereas Riba \textit{et al.} \cite{riba2020circular} integrated Attenuated total reflectance-Fourier transform infrared (ATR-FTIR) spectra with ML models to test 350 samples in 7 types of fibres (all included in our fibre taxonomy), achieving 100\% accuracy. In recognising cashmere and wool fibres, microscopic pictures coupled with ML approaches have proven to be effective \cite{xing2022application, zhong2017wool}. \textcolor{LightGreen}{We further compare these methods in our supplementary materials.} \paragraph{Fabric} Morphological analysis is widely used in fabric classification and defect detection \cite{zhang1995fabric,huang2000woven}. Longhini \textit{et al.} \cite{longhini2021textile} investigated how robotic actions, such as pulling and twisting of textiles, can be used to classify fabrics that are made of wool, cotton or polyester fibre but with different production methods (woven or knitted). They also summarized a production method based taxonomy with 7 fibres (used only 3 in their analysis) and 11 fabrics (used 2 meta-types), this is the similar taxonomy that appeared in \textit{``Textiles and Fashion Materials, Design and Technology''} by Sinclair \textit{et al.} \cite{sinclair2014textiles}. This taxonomy is small and incomplete, whereas our proposed taxonomy contains a greater number of fibre and fabric types and is based on their origins plus their production methods. Sun \textit{et al.} \cite{sun2016classification} used spectroscopy-based pattern recognition on textile fabrics. Fabric defect detection and classification using image analysis are discussed in \Cref{sec:fabricdataset}, these sample images are focused solely on pieces of fabric. Our proposed TextileNet dataset looks at this textile retrieval and classification problem from a very different angle, the data we source is simple ubiquitous RGB images. Fetching such data in the wild would require simply a camera-based system, without the need of using any specialised equipment (\textit{eg.} spectrum analysis). \subsection{Textile datasets} \label{dataset} Here we review existing image-based textile datasets both from the fashion and material domains. Fashion datasets include fashion items (e.g. garments), whereas material domain datasets focus on pieces of textile materials (e.g. fabric samples). \paragraph{Fashion datasets} \label{sec:fashion} Fashion-related datasets were built for different purposes, including fashion recommendation \cite{song2019gp,ni2019justifying}, categorization\cite{liu2016deepfashion,ge2019deepfashion2,zou2019fashionai,guo2019imaterialist}, 3D Modeling \cite{bertiche2020cloth3d,madadi2021cloth3d++,korosteleva2021generating}, \textit{etc.} As large scale datasets are typically a result of a huge crawl of online fashion retail stores, the majority of these works employ the highest frequency metadata for image labelling \cite{liu2016deepfashion}. In other words, these datasets create and use labels based on what was presented on these online fashion websites. Since these dataset labels are derived from the fashion website where the images are collected; labels can be influenced by the source and fashion trends \cite{holland2018dataset}. Despite the fact that these fashion datasets are multi-task datasets, a significant portion of their images lack material annotations. DeepFashion is the most popular fashion dataset and has the most extensive scale labels (1000 labels) generated by crawled online information \cite{liu2016deepfashion}. There are 218 labels in the class `fabric' among the thousand labels. Nonetheless, a great number of these labels are either duplicated or are fibres or may not even be textile materials. Take the first 10 listed fabric labels as an example: ``acid, acid wash, applique, bead, beaded, beaded chiffon, beaded sheer, bejeweled, bleach, bleached". Whereas acid is a fibre, bead is a round piece of plastic, acid wash and bleach are neither fibre nor fabric: they are textile manufacturing processes. In addition, certain essential fashion components, such as wool which had the largest market share in animal fibres \cite{textileexchange2021preferred}, are absent. Some fashion datasets contain textile material related labels, however, it is unclear how these labels are constructed, textile materials are labelled in the class either \textit{fabric} \cite{liu2016deepfashion, ge2019deepfashion2} or \textit{material} \cite{guo2019imaterialist, zou2019fashionai}. Fabric and fiber are in the same class named `Fabrics', and these labels do not aid in identifying the precise raw material of the clothing, making it difficult to distinguish between fibres and fabrics and track their origin for recycling. For instance, if we consider the iMaterialist Fashion Attribute Dataset \cite{guo2019imaterialist}, the first million level fashion dataset, $58.4\%$ of the dataset contains material/textile information, however, some images were labelled with multiple `material' labels without a clear definition of whether they are fibres or fabrics or even raw materials. \textcolor{LightGreen}{Another case is FashionAI \cite{zou2019fashionai}, they mentioned in the paper that they have material labels, such as \textit{cotton} and \textit{denim} in the material category, whereas denim is a fabric made from the fibre cotton. Unfortunately, this dataset is not fully disclosed to the public and we are unable to have further discussion.} \paragraph{Material datasets} \label{sec:fabricdataset} Apart from fashion-related datasets, there are several domain-specific datasets created by material scientists. \textcolor{LightGreen}{It is worth mentioning that the objective for this dataset is fashion textiles, works related to surface texture indoors and in the wild, such as Materials in Context Database (MINC) \cite{bell2015material}, were excluded from further discussion.} Existing fashion textile material datasets are small and focus solely on the fibre or fabric level without a full picture of the fashion item: Kampouris \textit{et al.} developed the Fabrics Dataset that consists of micro-geometry fine-grained fabric surfaces \cite{kampouris2016fine}; Chetverikov \textit{et al.} \cite{chetverikov2002finding} and Bissi \textit{et al.} \cite{bissi2013automated} used the Textile Texture Database (TILDA) \cite{groupworkgroup} for textile quality inspection. FabricID \cite{wang2018fabric} and Fabric 1.0 \cite{shen2019large} employed fabric images with Deep Learning methods to identify fabrics, however, they both used self-coded names in the dataset rather than the actual names of fabrics. \begin{table}[ht] \centering \caption{Comparison between TextileNet and the existing datasets with material labels. Material Labels* show the number of labels that are in both the dataset and our developed material taxonomy, either fibre taxonomy or fabric taxonomy; others refer to the labels are not in any taxonomy. TextileNet has rich information in fibre and fabric and is designed with material scientists.} \label{tab:compare-table} \begin{tabular}{lcccccc} \hline \multirow{2}{*}{Dataset} & \multirow{2}{*}{Images} & \multicolumn{3}{c}{Material-related Labels*} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}} Taxonomy \\ based\end{tabular}} \\ \cline{3-5} & & fibre & fabric & others & & \\ \hline DeepFashion \cite{liu2016deepfashion} & 800K & 2 & 16 & 200 & \xmark \\ \textcolor{LightGreen}{FashionAI} \cite{zou2019fashionai} & 357K & \multicolumn{3}{c}{dataset not fully disclosed} & \xmark \\ iMaterialist \cite{guo2019imaterialist} & 1M & 11 & 21 & 2 & \xmark \\ CLOTH3D \cite{madadi2021cloth3d++} & 11.3K & 2 & 2 & - & \xmark \\ FabricID \cite{wang2018fabric} & $\sim$20k & - & coded name & - & \xmark \\ Fabric 1.0 \cite{shen2019large} & $\sim$46k & - & not disclosed & - & \xmark \\ TILDA \cite{chetverikov2002finding} & 3.2K & - & 8 & - & \xmark \\ \textbf{TextileNet} (ours) & 761k & 33 & 27 & - & \cmark \\ \hline \end{tabular} \end{table} \Cref{tab:compare-table} summarises current datasets in the fashion and material domain, extended with our proposed TextileNet dataset. TextileNet contains a large number of images (only 4 other datasets in \Cref{tab:compare-table} have more than 500K images), and has detailed fibre and fabric labels (more than 50 labels combined) designed in close collaboration with experts in the material science domain. Unique to our dataset is that all labels are from the textile taxonomies we developed, and incorporate information on the material source (fibre) and links fibres to fabrics that are the basis for fashion design, that consumers can choose from. In this paper, we will demonstrate how this dataset and existing ML models can identify the material origins of user garments. \textbf{TextileNet is connecting the various elements in the production flow to benefit the fashion industry in the identification of materials, reduce fashion waste, and contribute to more sustainable fashion}. \section{Taxonomy-based approach to textiles} \label{sec:textile} Originally, the term ``textiles" referred to woven or knitted products; however, textiles is now an umbrella term to describe textile-related products, including materials, fibres, fabrics, \textit{etc} \cite{kadolph2016textiles,clark2011handbook,grishanov2011structure}. \textcolor{LightGreen}{Generally, fibre is defined as a small threadlike structure which is filament or staple \cite{sinclair2015understanding,textileexchange2021preferred}, fibres are the foundation for all textile products \cite{sinclair2014textiles,zhang1995fabric}. Fabric is a cloth produced by knitting, weaving or non-woven bonded (\textit{e.g.} felting) fibres \cite{zhang1995fabric,sinclair2014textiles}.} The taxonomies we developed of textiles, as a basis for our TextileNet dataset, are sub-divided into a fibre taxonomy and fabric taxonomy. The fibre and fabric taxonomies utilise the textiles classification depicted in \Cref{fig:textile}. \subsection{Fibre taxonomy} Fibres are categorized as \textit{natural} or \textit{man-made/artificial} \cite{hearle2008physical,grishanov2011structure,byrne2000technical}. Natural fibres are the fibres derived from natural habitats, they exist in the form of their raw states, such as cotton fibre from cotton plants or wool from animals \cite{kozlowski2012handbook,kozlowski2020handbook,Rowell2008,sinclair2014textiles}. Man-made or artificial fibres are created using industrial methods \cite{grishanov2011structure,horrocks2000handbook}. \Cref{fig:fibre} shows the fibre taxonomy with fibres in the following four main categories (macro-types): \begin{itemize} \item \textit{Plant fibres} are natural fibres that are composed of cellulose and used in their natural fibre shapes, such as cotton and flax \cite{sinclair2015understanding}. \item \textit{Animal fibres}, similar to plant fibre, are natural fibres. Fur, leather, and suede are special cases \textcolor{LightGreen}{classified as natural fibres in this category, they are outliers in the general definition of fibres \cite{eu2011regulationa, sinclair2015understanding,sinclair2014textiles}. We further discuss this in the supplementary material. } \item \textit{Synthetic fibres} are formed from petroleum, at the same time, they can also be derived from waste (discarded PET bottles) \cite{mcintyre2005synthetic}. Polyester, acrylic, polyamide (nylon, aramid), polyolefin, and elastane are examples of synthetic fibres in the textile industry \cite{mcintyre2005synthetic,sinclair2014textiles}. \item \textit{Regenerated fibres} can be obtained from a variety of raw sources, including plants (wood pulp, bamboo, soybeans), milk, eggs and waste (discarded cotton clothing) \textit{etc.} \cite{haule2016preparation, rex2019possible}. \textcolor{LightGreen}{ The difference between regenerated fibres and natural fibres is that regenerated fibres are reconstituted from the above-mentioned raw materials and manufactured to shape into new fibres rather than being used in their original form \cite{SINGH2022113,woodings2001regenerated}. Based on the raw sources, they can be named \textit{regenerated cellulose fibres} and \textit{regenerated protein fibres} respectively.} We further include this information in our supplementary material. \end{itemize} \begin{figure}[!ht] \centering \centering \includegraphics[scale=0.4]{images/fibretaxonomy.pdf} \captionof{figure}{Taxonomy for fibres, classified by its fibre category (the four macro-types): Natural fibres (animal and plant), Man-made/artificial fibres (Synthetic fibres and Regenerated fibres). The taxonomy then shows how each fibre can be categorized into these four different macro-types. * are "non-textile" .} \label{fig:fibre} \vspace{-10pt} \end{figure} The design of the taxonomy with those four macro-types allows future extensions and integration of new fibre categories by other researchers and users of our TextileNet dataset. \subsection{Fabric taxonomy} With regards to the fabric taxonomy, we closely collaborated with material science domain experts as well as drew on potential raw material sources (fibre) \cite{byrne2000technical,Rowell2008,mcintyre2005synthetic,kozlowski2012handbook,kozlowski2020handbook, hearle2008physical,clark2011handbook,bunsell2009handbook} to select the fabrics to be covered in our taxonomy. Since fabrics are made of fibres, we can extend the taxonomy shown in \Cref{fig:fibre}. Due to space limitations, we present the full fabric taxonomy in our Appendix. It is worth noting that it is possible for a fabric to be made of multiple fibres, and we characterise this complex relationship in our fabric taxonomy. The fabric taxonomy also contains three meta-types, and those are \textit{woven}, \textit{knitted} and \textit{non-woven} \cite{horrocks2000handbook}. \begin{figure}[!ht] \centering \centering \includegraphics[scale=0.45]{images/fabrics.pdf} \captionof{figure}{We present two garment examples in TextileNet-fabric to predict fabric labels (\textit{flannel} and \textit{lawn}), and show how they can use our taxonomies to create relations to different fibres and raw materials. For instance, for \textit{lawn}, we can connect it to \textit{nylon} and \textit{flax}, this then further connects us to the raw material space with \textit{flax} and \textit{petroleum}.} \label{fig:fabric} \end{figure} With the designed fibre and fabric taxonomies, one can now trace the origin and production flow of a particular fabric. To further illustrate how the fabric taxonomy and TextileNet-fabric could work in conjunction with the fibre taxonomy, in \Cref{fig:fabric}, we show the first use model to predict the fabric of garments which are \textit{flannel} and \textit{lawn}, and how to utilise the relational information in our taxonomies to build their manufacture flow (fabric taxonomy mapping is in green dash and fibre taxonomy is in red line). For example, for \textit{lawn}, we can connect it to \textit{nylon} and \textit{flax}, this then further connects us to the raw material space with \textit{flax} and \textit{petroleum}. It is worth noting that this trace back process not only characterises the manufacturing process but also identifies the raw material categories (\textit{animal-based or synthetic}). From the production point of view, these taxonomies would have the potential to help researchers or designers to estimate the life-cycle-analysis researchers can then assign \cite{macarthur2013towards} to garments. For instance, we can assign a certain carbon emission number to \textit{lawn} $\to$ \textit{flax} and \textit{lawn} $\to$ \textit{nylon} to model the transition between fibre to fabric. The carbon footprint can also be estimated based on these raw materials on the right of \Cref{fig:fabric}. These taxonomies then help materialise the idea of creating a textile circular economy discussed in material science \cite{laitala2012sustainable, macarthur2013towards}.
{'timestamp': '2023-01-18T02:14:19', 'yymm': '2301', 'arxiv_id': '2301.06160', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06160'}
arxiv
\section*{Acknowledgements} This work is supported by National Science Foundation Grant NSF CNS-1901048. \section*{Author contributions statement} S.X., and X.Z. designed research; S.X. and X.Z. performed research; S.X. analyzed data; and S.X., and X.Z. wrote the paper. \section*{Additional information} \textbf{Competing interests}: The authors declare no competing interest. \end{document} \section*{Introduction} Human cognition performance could be affected by both internal factors (\textit{e.g.}\xspace, age and practice effect \cite{steyvers2019large}) and external factors (\textit{e.g.}\xspace, time pressure \cite{cheng2017evaluation} and haptic feedback \cite{costa2019boostmeup}). Modeling cognition performance under such factors could help us understand how humans behave in front of tasks \cite{cheng2017evaluation} and potentially design feedback mechanisms to augment human cognition \cite{costa2019boostmeup}. Such models could also inspire the development of human-like robots\cite{8647331} and enhance human-agent collaboration \cite{schurmann2020personalizing}. In addition, whereas collecting and labeling human cognition data is a notoriously tedious task, cognition models \cite{palminteri2017importance} can generate synthetic data\cite{zweifel2021dynamical} and provide a simulation environment for cognitive science research, which could in turn provide insights into cognitive and neural functioning of biological systems\cite{de2021next}, and improve cognition modeling such as human decision prediction\cite{bourgin2019cognitive} and cognitive identity management\cite{9207385}. Prior literature has provided evidence support for feasibility of human cognition modeling \cite{de2019overview}. Traditional cognition models such as BEAST \cite{erev2017anomalies} and drift-diffusion model\cite{ratcliff2008diffusion, steyvers2019large} are closed-form. Recently, machine learning\cite{cichy2019deep} has been employed to simulate human behaviors \cite{PEYSAKHOVICH2017373,lake2017building,ma2020neural} in various tasks such as visual cognition \cite{mehrer2020individual,golan2020controversial,kumbhar2020anytime}, categorization \cite{battleday2017modeling,battleday2020capturing,singh2020end,peterson2018evaluating,battleday2021convolutional}, decision making\cite{peterson2021using, noti2016behavior, bourgin2019cognitive, plonsky2017psychological}, game strategy \cite{hartford2016deep}, visual perception \cite{wenliang2018deep}, word learning \cite{ritter2017cognitive}, probabilistic inference \cite{orhan2017efficient}, point-and-click \cite{do2021simulation, park2020intermittent} and so on. In particular, recurrent neural network (RNN) \cite{song2017reward, song2016training} has been adapted to perform many cognition tasks \cite{yang2019task} like humans, and simulate the tradeoff between accuracy and response time in biological vision \cite{spoerer2020recurrent}. However, existing work mostly focuses on modeling human cognition in a standard and ideal condition without any external stimuli\cite{do2021simulation,park2020intermittent}, or simply takes external stimuli as a constant presence \cite{bourgin2019cognitive} in the cognition process. We argue that a more fine-grained model is necessary to deal with external stimuli, especially for dynamic stimuli which can change over time (\textit{e.g.}\xspace, according to users' performance). A fine-grained model means that the stimuli can vary over fine time scale and impose a continuous effect on human cognition behaviors. For instance, an animated time pressure visual stimuli\cite{slobounov2000neurophysiological} could inform users that the time is passing, which will evoke feelings of pressure. Viewing the stimuli as a binary existence indicator will clearly misrepresent its nuances. Therefore, in this paper, we pose the question: \textbf{how can we simulate the effect of dynamic external stimuli on regulating human cognition behaviors in a fine-grained manner?} We seek to answer the question by investigating how dynamic time pressure feedback \cite{zur1981effect} regulates cognition performance, specifically in a math arithmetic task, which is widely used to evaluate human cognition performance \cite{lin2011spatial,judd2021training,daitch2016mapping}. The dynamics in time pressure may involve two aspects. First, the time pressure can be presented dynamically, \textit{e.g.}\xspace, it can deliver progressive visual frames over time (Fig.~\ref{f2}(a)) and convey a sense of urgency. Second, the existence of time pressure could be dynamic as well in different trials. Prior research has pointed out the effect of time pressure on human cognition behaviors and productivity \cite{moore2012time}. Time information could improve focus \cite{whittaker2016don} and arousal \cite{edland1993judgment}. But higher time pressure could result in excessive mental workload and deteriorated response \cite{cheng2017evaluation}. A recent visuomotor task study \cite{slobounov2000neurophysiological} revealed that time pressure could reduce user response time but increase behavioral errors. All in all, time pressure stimuli is a well-established feedback modality that can modulate human cognitive performance. Modeling cognition performance under dynamic time pressure could help us gain insights in cognition behaviors and develop adaptive intervention mechanisms for user performance regulation. \begin{figure* \centering \includegraphics[width=1\linewidth]{figure/f1.pdf} \caption{Illustration of the overall framework. First, we use math questions to train a math answer agent to solve them without considering users' response. Second, for each math question, we transfer features extracted from LSTM layer in math answer agent without time pressure to make predictions of user choice and response time using SVM (initial estimation). The initial estimated response time and predicted choice probability will generate evidence accumulation trajectory in the drift-diffusion model. Third, the DRL agent will take math question and each frame of dynamic time pressure stimuli as input and take specific action to modulate evidence accumulation process. When evidence accumulator achieves boundary threshold, the final prediction of response time is generated and DRL agent achieves terminate state.} \label{f1} \end{figure*} In this paper, we present a hybrid deep reinforcement learning (DRL) framework (Fig. \ref{f1}), which integrates classical closed-form cognitive model into a data-driven DRL, to model impacts of dynamic, fine-grained time pressure stimuli. It is well-known that neural network (NN) excels at function approximation and could be used for modeling cognition behaviors \cite{bourgin2019cognitive}. However, classical NN models are blackbox by nature and cannot represent the internal mechanism of cognition process. Therefore, it is hard to directly use a NN to simulate the dynamic effect of stimuli on cognition process in a fine-grained manner. To overcome this limitation, our framework integrates NN with drift-diffusion model (DDM), a sequential sampling method widely used for cognition modeling \cite{ratcliff2008diffusion, steyvers2019large}. DDM assumes that humans make decisions by accumulating evidence until it achieves a boundary threshold \cite{fudenberg2020testing}. The simulated choice and response time are then decided according to the corresponding boundary and accumulation time. DDM has the advantage of representing cognition process in an explicable and fine-grained way, but it focuses on posterior estimation of user decision instead of predicting users' future performance under stimuli. On the other hand, DRL (with NN in its core) could provide a step-by-step interaction environment, which can incorporate the fine-grained cognition process in DDM while maintaining the function approximation capabilities of NN. Our framework thus employs the DRL agent to represent how time pressure stimuli accelerate or decelerate the evidence accumulation (EA) process of DDM. Specifically, the time pressure visual stimuli is segmented into frames according to the steps in the EA process. For each step/frame, given corresponding time pressure visual stimuli as input, the DRL agent introduces positive, neutral, or negative bias in EA. Accordingly, the EA may achieve boundary threshold earlier or later, indicating faster or slower response than cases without the stimuli. This hybrid modeling scheme, and the ability to simulate external stimuli, sets our framework apart from previous work that models decision and response time with reinforcement learning \cite{viejo2015modeling,pedersen2017drift}. In what follows, we elaborate on the model architecture. To simulate the effect of dynamic time pressure, we need to first predict users' baseline performance without time pressure. The prediction model is inspired by prior work that models human subjects' time perception by capturing internal activities in perceptual classification networks\cite{roseboom2019activity}. Specifically, Roseboom \textit{et al.}\xspace \cite{roseboom2019activity} first built a neural network which is \textit{functionally similar with human visual processing for image classification}. Then the input videos of natural scenes drive changes in network activation, and accumulation of salient changes in activation are used to estimate duration (how much time has passed in the video felt by the user) with a Support Vector Machine (SVM). Similarly, our baseline prediction model trains a long short-term memory (LSTM) neural network to solve cognitive tasks\cite{yang2019task}. Specifically, we train an LSTM-based math answer agent (Fig. \ref{f1}(b)) to learn and answer math questions, \textit{e.g.}\xspace, to achieve \textit{functional similarity with human cognition in math tasks}. After that, the \textit{intermediate output} of the LSTM layer is used as input features into an SVM to estimate user choice and response time (Fig. \ref{f1}(c)). The study results (\textbf{Result} section) demonstrate that this baseline performance predictor could predict user choice with 0.8996 of F1-score and user response time with 0.3652 of MAPE (Mean Absolute Percentage Error) overall, which proves the feasibility of this design. The rationale is likely that different math questions may have different levels of difficulty, resulting in users' choice bias and variation of response time. The LSTM-based agent may capture the potential different difficulty levels, which could be mapped to user choice and response time through the SVM. Next, we need to simulate how dynamic time pressure changes user performance. We view the cognition process as an EA process according to DDM \cite{ratcliff2008diffusion} (Fig. \ref{f1}(e)). The EA segments users' cognition process into sequential steps, allowing us to model dynamic time pressure in a fine-grained manner. The boundary threshold and accumulation time in DDM come from predicted response from the previous SVM model. In order to simulate the dynamic effect of the time pressure visual stimuli, we introduce a DRL agent and segment the visual stimuli into frames, corresponding to steps in the EA process. For each frame, the specific visual stimuli is applied to the DRL agent (Fig. \ref{f1}(d)), which will then modulate the EA process, just like how participants' cognition process may be affected by each frame of stimuli. Specifically, given each frame of time pressure stimuli, the DRL agent modulates the EA process by introducing positive, neutral, or negative bias (action space of the DRL agent), which may in turn cause the evidence accumulator to achieve the boundary threshold earlier or later. The output from this DRL-modulated EA process will be the final prediction of user response time. More details of this framework design are depicted in Appendix S5. Experimental results demonstrate the feasibility of our framework, and verify that we could simulate the dynamic time pressure effects on human cognition process in a frame-level. \section*{Results} \subsection*{Dataset collection and analysis} We recruited participants to conduct math modular tasks (details in Fig. \ref{f2}(a)). The participants were randomly and uniformly divided into four groups: \textit{none} group: no time pressure is provided; \textit{static} group: time pressure is provided for each trial; \textit{random} group: there is 50\% chance that time pressure is provided for the current trial; \textit{rule} group: the time pressure is provided adaptively according to users' past performance (details in Appendix S2). Each participant was asked to finish a two-day study. For each day, there was one exercise session (20 trials, for users to get familiar with the task), and one formal session (300 trials). We recorded participants' choice and response time for each trial. During the formal session, participants were also asked to rate their current attention/anxiety status within a 7-point likert scale for every 30 trials. The final dataset consists of about 25k samples (trials). To eliminate the impact of chance factors, we segment 300 trials of the formal session into 5 blocks equally and calculate the average of accuracy, response time, attention, and anxiety score within each block. In addition, note that different users have different baseline performance. In order to eliminate users' individual differences and elucidate the impact of time pressure across different groups, we choose to compare the \textit{relative change} of user performance and status across the 4 groups. Specifically, we denote the average result of $Block_i$ as $R_i$, where $R_1$ ($Block_1$) is the baseline performance. The final relative result of $Block_i (i>1)$ is $(R_i-R_1)/R_1$ for accuracy and response time change and $R_i-R_1$ for attention and anxiety change. The reason is that attention/anxiety score will linearly reflect user status, \textit{i.e.}\xspace, the change from $score = 1$ to $score = 2$ should be the same as the change from $score = 2$ to $score = 3$. However, for response time/accuracy, different participants have different basic performance. The relative change should be divided by the initial performance to reflect how much change happens compared with user basic performance. The results were analyzed using repeated-measures ANOVA. Bonferroni corrected paired post hoc t-tests were used for pair-wise comparisons. \subsubsection*{Response Time} For between-subjects effects, ANOVA yielded a significant effect of Group ($F_{3,32} = 3.015, P = 0.044 < 0.05$) (Fig.\ref{f2}(i)). Specifically, significant difference was found between \textit{none} (mean $\pm$ SD: $-0.012 \pm 0.021$) and \textit{random} ($-0.105 \pm 0.025$) group: $p = 0.039 < 0.05$. The reduction of response time was larger in \textit{rule} group ($ -0.034 \pm 0.021$) compared with \textit{none} group but smaller compared with \textit{static} group ($ -0.054 \pm 0.022$). Overall, \textit{random} group had the largest reduction of response time. The results indicate that different types of time pressure stimuli may have different effects on response time. For within-subjects tests, significant effect was found across blocks ($F_{3,96} = 7.121, P < 0.001$)(Fig.\ref{f2}(b,i)), specifically between the following blocks: $Block_2$ ($ -0.031 \pm 0.011 $) v.s. $Block_4$ ($ -0.070 \pm 0.014 $): $p = 0.023 < 0.05$, $Block_2$ v.s. $Block_5$ ($ -0.072 \pm 0.014 $): $p = 0.026 < 0.05$, $Block_3$ ($ -0.033 \pm 0.013 $) v.s. $Block_4$: $p = 0.008 < 0.01$, $Block_3$ v.s. $Block_5$: $p = 0.025 < 0.05$. No interaction was found between Block and Group ($F_{9,96} = 0.958, P = 0.48$). There was no significant effect of Date ($F_{1,32} = 0.003, P = 0.959$)(Fig.\ref{f2}(c)), nor any other significant interaction effects (all $P > 0.05$). \subsubsection*{Accuracy} No significant effect was found in Group ($F_{3,32} = 0.081, P = 0.97 > 0.05$), Block ($F_{3,30} = 0.313, P = 0.816 > 0.05$) (Fig.\ref{f2}(b,j)) or Date ($F_{1,32} = 0.861, P = 0.36 > 0.05$) (Fig.\ref{f2}(d)), nor any other significant interaction effects (all $P > 0.05$). This is reasonable because we asked participants to always take accuracy as a priority over response time. Therefore, the accuracy of users' choices should be high in most cases, whereas response time varies depending on the stimuli. \begin{figure* \centering \includegraphics[width=1\linewidth]{figure/f2.pdf} \caption{a: Math arithmetic task user interface. Each math trial is composed of two two-digit numbers $Num_1, Num_2$ and one one-digit numer $Num_3$ in each trial, formatted as: $Num_1 \equiv Num_2 \, (\, mod \, Num_3)$. To solve this question, participants will first use $Num_1$ to subtract $Num_2$. Then they need to judge whether the subtraction result could be divisible by $Num_3$. If it is divisible, participants need to select "True" button. Otherwise, they will select "False" button. When the time pressure feedback happens, a progress bar will be shown on top of the math question, which will add one unit for each second and will reset and add again when it accumulates five units. b: overall trend of relative change of response time, accuracy, attention, and anxiety, respectively, across 4 blocks. c,d,e,f: overall distribution of relative change of response time (c), accuracy (d), attention (e), and anxiety (f), respectively, across 2 days. i,j,l,m: box plot of relative change of response time (i), accuracy (j), attention (l), and anxiety (m), respectively, across 4 groups and 4 blocks. g. Confusion matrix for testing set prediction of math answer agent whose neuron number of LSTM output layer is 256. h. Training loss and accuracy changes with training epochs across four different number of neurons from LSTM output layer of math answer agent. k. Performance of user choice classification of SVC model and response time estimation of SVR model across three kinds of math question representations: \textit{Feature} label: SVM takes features extracted from math answer agent as input, \textit{Encode} label: SVM takes encoded vectors of raw math numbers as input, \textit{Digits} label: SVM takes raw math numbers as input. } \label{f2} \end{figure*} \subsubsection*{Attention} No significant effect was found in Group ($F_{3,32} = 0.532, P = 0.664 > 0.05$) (Fig.\ref{f2}(l)). Moreover, significant effect was found in Block ($F_{3,96} = 27.366, P < 0.001$) (Fig.\ref{f2}(b,l)) and Date ($F_{1,32} = 8.693, P = 0.006 < 0.01$) (Fig.\ref{f2}(e)). Interaction was also found between Block and Date ($F_{3,96} = 9.012, P < 0.001$). No other significant interaction effects were found (all $P > 0.05$). \subsubsection*{Anxiety} No significant effect was found in Group ($F_{3,32} = 0.925, P = 0.44 > 0.05$) and Block ($F_{3,30} = 1.243, P = 0.312 > 0.05$) (Fig.\ref{f2}(b,m)). Significant effect was found in Date ($F_{1,32} = 4.165, P = 0.05$) (Fig.\ref{f2}(f)). Interaction was found between Block and Date ($F_{3,30} = 3.737, P = 0.022 < 0.05$), Date and Group ($F_{3,32} = 5.458, P = 0.004 < 0.01$). No other significant interaction effects were found (all $P > 0.05$). The above results indicate that both time pressure stimuli and block number may affect users' response time, which provide evidence support and prior knowledge to inform our cognition model design. \subsection*{Math answer agent to solve math questions} We hypothesize that the reason why a participant may have different responses to different math questions lies in features of the questions such as difficulty levels. Such features may affect user choice and response time even in the ideal condition (\textit{i.e.}\xspace, without external stimuli). Therefore, building the connections between these features and users' real response could help us make predictions of user choice and response time. In order to capture such features, we first train a math answer agent that could solve math questions just like humans. Then the feature representation could be extracted from the intermediate output of the math answer agent. Specifically, as illustrated in Fig. \ref{f1}, we train an LSTM-based math answer agent (architecture details in Appendix S5) that takes a math question as input and outputs the answer. For instance, given the sequence "61 $\equiv$ 26(mod 4)" as input, it outputs "3"\footnote{The remainder of the subtraction result ("35") of "61" and "26", divided by "4".}. Note that this is different from the data collection, where users need to \textit{choose} \textit{whether} the subtraction result ("35") of "61" and "26" is divisible by "4"--a binary selection task. In other words, the math answer agent aims to answer math arithmetic task correctly, rather than to predict user response. We use this design to train the math answer agent so that it could learn the potential arithmetic reasoning process and generate representative features of math questions instead of simply performing a binary classification. We prepare an independent dataset (Appendix S4) used specifically for math answer agent training (80\%) and testing (20\%). Because the first two numbers of math questions are both two-digits, the arithmetic reasoning result is selected from 0 to 8. Therefore, the ground truth includes 9 classes. We have explored different number of output neurons (32, 64, 128, 256) from the LSTM layer. After training 100 epochs, the training loss and accuracy achieve 0.0001 and 100\% respectively for 256 neurons, which has the best performance (Fig.~\ref{f2}(h)). Confusion matrix (Fig.~\ref{f2}(g)) in the testing set shows that this neuron number could achieve more than 99\% of accuracy for all classes. The overall test accuracy is 99.93\%. From the results, we conclude that the LSTM-based math answer agent could solve math arithmetic problems correctly in most cases, which is reasonable as existing work \cite{mickey2014neural,zaremba2014learning} has demonstrated the capability of neural networks in learning mathematical equivalence. This paves the way for extracting representative features from math questions to build cognition models. \subsection*{User baseline performance prediction with SVM} As mentioned before, the second step in our simulation framework (Fig.~\ref{f1}) is to use SVM models to predict users' baseline performance (without time pressure), by mapping the features produced by the LSTM-based math answer agent to users' real response. The features are intermediate output of the LSTM layer (Fig.~\ref{f1}). Here we set the output neuron number of the LSTM layer to be 256, meaning that we have 256 features captured by the math answer agent (Fig. \ref{f1}(b)). In the foregoing cognition performance analysis, we have found that users' performance is also affected by block number. Therefore, for each trial, we use question id as an additional input feature which is concatenated with the previous 256 features for SVM models. Here the question id represents the corresponding trial number in the dataset. So we totally have 257 features to predict the user response for each sample/trial (Fig. \ref{f1}(c)). Users' response consists of both user choice and response time. Hence, the SVM models are also composed of a binary SVM classifier (SVC) to predict user choice (True or False selection), and an SVM regressor (SVR) to estimate users' response time. We use accuracy, precision, recall, F1-score to evaluate the SVC model and use Mean Average Percentage Error (MAPE) to evaluate the SVR model. In order to demonstrate that math answer agent indeed has captured useful and representative features from the math questions, we also compare the SVM models with another two settings where the SVM models do not take features captured from math answer agent as input. Instead, they take raw three digit numbers from the math questions or encoded vectors (Appendix S3) of raw numbers as input with question id. SVM performance in the three settings is depicted in Fig.\ref{f2}(k), where we could find that SVM models with features from math answer agent have apparently higher accuracy (0.9613) and F1-score (0.8996) for user choice prediction and lower MAPE (0.3652) for response time estimation than another two settings. The results demonstrate the effectiveness of math answer agent in capturing representative features from math questions and the feasibility of predicting user baseline performance with the SVM models. \subsection*{Simulating effect of time pressure stimuli on user performance with the hybrid DRL agent} After obtaining users' baseline performance from SVM models, the next step is to model the effect of time pressure on user performance. Since the users' accuracy is almost unaffected by such stimuli, as revealed by the aforementioned user study, we focus on estimating users' response time instead. In order to demonstrate the merit of the hybrid DRL design, we implement a baseline DRL model (named as Pure DRL agent) that does not incorporate the DDM. Specifically, this Pure DRL does not segment time pressure visual stimuli into frames. Instead, for each trial from the dataset, if the time pressure stimuli exist, it will directly take the whole visual stimuli as input and output one action which represents the whole response time change due to time pressure. The final estimation of regulated response time is the sum of this action and basic response time estimated by SVR models (more details are depicted in Appendix S6). We compare the hybrid and pure DRL agent design in three aspects: response time estimation performance, agent training efficiency, and interpretability. \subsubsection*{Predicting response time} We use both Mean Average Percentage Error (MAPE) and Pearson correlation between prediction model and humans' real response time to compare performance of the hybrid DRL and Pure DRL agent. Additionally, we design four model training strategies for comparison: general-level, group-level, individual-level, and Leave-One-Participant-Out (LOPO)-level. General-level splits the whole dataset into training (80\%) and testing (20\%) set to evaluate the overall model performance. Group-level trains and tests a specific model from data of each group, which could reveal model performance across different groups. Individual-level trains and tests a specific model from data of specific participant, which could examine the feasibility of training personalized models for specific users. In our experiments, we shuffle the training and testing set to prevent overfitting artifacts. Since the shuffled testing breaks the temporal trend of user response time, LOPO-level is selected as additional training strategy, which selects all data of one participant to be the testing set and all data of other participants in the same group to be the training set. In this case, we could examine whether our model could capture the temporal trend of response time. Every participant's data has been traversed to be testing set in order to fully capture the model performance in LOPO-level. \begin{figure* \centering \includegraphics[width=1\linewidth]{figure/f3.pdf} \caption{a,b,c,d,e,f,g,h: Average MAPE for each participant (a,b,c,d)/group (e,f,g,h) in the prediction results of testing set from Hybrid DRL agent, Pure DRL agent, and SVM model in four training strategies (a,e. Individual-Level, b,f. Group-Level, c,g. General-Level, d,h. LOPO-Level), respectively. (The number around the circle represents participant id in a,b,c,d). i,j,k,l: Examples of user response time in chronological order from one participant in each group predicted from Hybrid DRL agent and Pure DRL agent in LOPO-level training, compared with ground truth. m: Pearson correlation between predictions from Hybrid/ Pure DRL agent (HD: Hybrid DRL, PD: Pure DRL) with human real response time (ground truth) in four training strategies (All: General-level, Group: Group-level, Ind: Individual-level, LOPO: LOPO-level). Small gray dots, medium dots, and large gray dots represent Pearson correlation of prediction results from each participant's testing set, each group's testing set (red:\textit{none}, yellow:\textit{static}, black:\textit{random}, blue:\textit{rule}) and whole testing set, respectively. The right y axis depicts overall average MAPE of two agents in four training strategies. n,o: Training curve for Pure DRL (n) and Hybrid DRL (o) model. p,q,r,s: Time pressure effect trajectories of four groups, respectively. t: Box plot of relative response time change across four groups in the whole dataset. u,v,w: Box plot of standard deviation of action trajectories (v), mean value of time pressure effect trajectories (u), slope of time pressure effect trajectories (w) of four groups in predicted testing dataset by Hybrid DRL agent. The slope of one trajectory is calculated from the start point to the end point of the trajectory.} \label{f3} \end{figure*} Fig.\ref{f3} depicts the average MAPE of the testing set from each individual user (a,b,c,d)/each group (e,f,g,h) using hybrid DRL and Pure DRL agent in the four training strategies, respectively. Baseline prediction results of SVM models without time pressure stimuli simulation are also shown. We could find that both hybrid DRL and Pure DRL agent could improve response time estimation compared with SVM results, but hybrid DRL agent could achieve lower MAPE compared with Pure DRL agent in most cases, demonstrating superiority of hybrid DRL agent in response time estimation. The overall average MAPE in the whole testing set by two agents is depicted in the right y axis of Fig. \ref{f3}(m), which also corroborates the conclusion. Fig. \ref{f3}(m) also reveals that the hybrid DRL agent has larger Pearson correlation in individual testing set (small dots), group testing set (medium dots), and whole testing set (large dots) compared with the Pure DRL in most cases, for all four training strategies. Both the MAPE and Pearson correlation demonstrate the superiority of the hybrid DRL agent modeling the effect of time pressure stimuli. In order to compare which agent design could better capture the trend of response time change in users' overall task, we visualize prediction results and real user response time of the testing set from one participant of each group in LOPO-level in chronological order (Fig.\ref{f3}(i,j,k,l)). Apparently, the predicted and real response time curves demonstrate that the hybrid DRL agent could better capture the trend of user response time. \subsubsection*{Training efficiency} The training curves of two agents are depicted in Fig.\ref{f3}(n,o). The Pure DRL and hybrid DRL agent converge at about 800,000 steps and 20,000 steps, respectively. However, the meanings of one step of two agents are different. For the hybrid DRL agent, one step represents one frame of time pressure stimuli during one trial, while one step of Pure DRL agent stands for the whole trial. Therefore, it is not meaningful to compare steps directly. Instead, we compare the training time to achieve convergence status of the two agents on the same hardware (GeForce RTX 2080 Ti) and same dataset. The results (Fig.\ref{f3}(n,o)) show that the hybrid DRL only takes around 1/10 of the time to converge compared with the Pure DRL agent (4.42 minutes vs. 38.30 minutes), demonstrating the advantage of incorporating an explicit cognitive model (\textit{i.e.}\xspace, the DDM) in the hybrid DRL agent. \subsubsection*{Interpretability} Another important merit of the hybrid DRL agent lies in its interpretability. The Pure DRL agent directly outputs estimated response time change for each trial, which obfuscates the internal mechanism regarding how time pressure stimuli modulate the cognition process. In contrast, the hybrid DRL agent could generate a trajectory of time pressure effect on response time corresponding to the users' cognition process. Therefore, by visualizing the trajectories of hybrid DRL agent, we could obtain new insights about how time pressure stimuli affect the human cognition process. We explore this benefit in Fig.\ref{f3}(p,q,r,s,t,u,v,w). Here the \textit{action trajectory} represents the trajectory of actions taken by hybrid DRL agent during one episode. Each episode corresponds to one trial of users. \textit{Time pressure effect trajectory} is the accumulated actions multiplied by $\delta_p$. \footnote{$\delta_p$ represents one unit of evidence per step. Each action of the hybrid DRL agent ranges from $-1$ to $+1$. $\delta_p$ could turn the normalized action value into the evidence accumulation process. More details in Appendix S5.}. We visualize the time pressure effect trajectories across the four groups in Fig.\ref{f3}(p,q,r,s). Each curve represents one trajectory predicted by the hybrid DRL agent during one trial. We find that the time pressure effect trajectories are more concentrated in the \textit{random} and \textit{rule} group, but divergent in the \textit{none} and \textit{static} group (Fig.\ref{f3}(p,q,r,s)). This indicates that participants in \textit{random} and \textit{rule} group (especially \textit{random} group) are better regulated by the corresponding type of time pressure stimuli in the group, so that all time pressure effect trajectories have similar trend in this group. Quantitatively, the \textit{random} group has lowest standard deviation (STD) of action trajectories (Fig.\ref{f3}(v)) and highest average value and slope for the time pressure effect trajectories (Fig.\ref{f3}(u,w)). All of these imply that \textit{random} group has the best regulation effect on user cognition performance. This is reasonable as users may quickly get used to \textit{none} time pressure or \textit{static} time pressure, and may no longer get regulated by them after a few trials. However, users may not anticipate the time pressure stimuli in the \textit{random} group, so the stimuli could have a long-lasting regulation effect. This result is also consistent with the previous user study results (Fig.\ref{f3}(t)), where participants in the \textit{random} group have apparently larger reduction of response time. This set of experiments verify the capability of the hybrid DRL agent in explaining and supporting the observations in the user study. \section*{Discussion} In this work, we have explored a DRL framework to model the effect of dynamic feedback on human cognition performance with DRL. We use math arithmetic task as a representative human cognition task and time pressure as external feedback. Our framework can be potentially extended to other task domains and external stimuli. For different tasks, we can first train a task agent (like the math answer agent in this paper), which simulates humans performing the tasks. This is feasible since existing work has demonstrated the capabilities of machine learning models in solving many cognition tasks \cite{yang2019task}. As for different stimuli, we can similarly input the modalities into the observation space of the DRL agent. We believe that our exploration provides new insights and important groundwork for cognition model with machine learning under dynamic external stimuli. Our framework could empower many potential applications such as synthetic data generation and adaptive cognitive regulation. \section*{Methods} \subsection*{Subjects} We recruited 50 participants in total (age 21.44 ± 3.22 y (mean ± SD); 27 female) from the campus of a large US public university to finish the math modular task (details in Fig. \ref{f2}(a)) in the user study, where time pressure visual stimuli (details in Fig. \ref{f2}(a)) might happen or not during each trial. Participants came from a variety of majors including engineering, computer science, biology, and so on. Six participants took part in the preliminary study to explore potential configurations of study design, whose results were removed. Other 44 participants were randomly and uniformly divided into 4 groups in order to fully capture the potential effects of time pressure in cognition performance, as described in \textbf{Results} section. Two participants withdrew from the study and three participants did not finish the study completely. We also removed another three participants' results which belonged to extreme outliers. Finally, we had 36 participants: \textit{none} group (10), \textit{static} group (9), \textit{random} group (7), \textit{rule} group (10). This study has been approved by IRB in the local institute. \subsection*{User Study Design} All participants took part in a two-day study. For each day, they were asked to first finish an exercise session containing 20 math trials and then finish a formal session containing 300 math trials. The exercise session aimed to familiarize the users with tasks and measure users' baseline performance (without time pressure). In the formal session, different time pressure mechanisms were provided for different groups as mentioned above. There was also a 5-min rest between exercise session and formal session. It took each participant an average of one hour for the study per day. In the study, participants were told to always take accuracy as the priority and then try their best to answer questions as soon as possible. The compensation rule for each participant (ranging from \$10 to \$100) also prioritized average accuracy over response time in order to encourage participants to follow our instructions. \subsection*{Data Availability} All data needed to reproduce the findings and analysis will be available to the public. \subsection*{Code Availability} All code needed to reproduce the findings and analysis will be available to the public.
{'timestamp': '2023-01-19T02:06:35', 'yymm': '2301', 'arxiv_id': '2301.06216', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06216'}
arxiv
\section{Introduction} Communication systems are used in all aspects of our lives and play an increasingly important role. Consequently, communication systems are being asked to play more roles than just disseminating words, sounds, and images. With the widespread deployment of communication systems and the continuous expansion of their purposes, we have to demand higher performance from the communication systems. Meanwhile, we wonder whether traditional metrics such as throughput and latency could continue to meet such demands. One of the major drawbacks of such traditional metrics is that they treat each update equally and ignore that not every update can provide the receiver with equally important information for communication purposes. Because of this, researchers seek to reconsider existing communication paradigms and look for new ones, among which semantic communication is an important attempt. The semantics of information is formally defined in~\cite{b1} as the significance of the messages relative to the purpose of the data exchange. Then, semantic communication is regarded as \textit{"the provisioning of the right piece of information to the right point of computation (or actuation) at the right point in time"}. Different from the classical metrics in data communication, semantic metrics incorporate the freshness of information, which is becoming increasingly important as real-time monitoring systems are ubiquitous in modern society. Typically in such systems, a monitor monitors one or more events simultaneously and transmits updates to allow one or more receivers at a distance to have a good knowledge of the events. Therefore, the timeliness of information is often one of the most important performance indicators. The Age of Information (AoI), first introduced in~\cite{b1}, is one of the most successful examples of capturing information freshness. AoI tracks the time elapsed since the generation of the last received update, which results in different treatments for different updates. For example, when the update is significantly fresher, it will be more important and worth the extra resources to transmit. Let $V(t)$ be the generation time of the last update received up to time $t$. Then, AoI at time $t$ is defined by $\Delta_{AoI}(t) = t-V(t)$. After the introduction, AoI has attracted extensive attention~\cite{b3,b4,b5,b25}. However, AoI assumes that the age of each update always increases over time, ignoring the information content of the update. Such neglect is not always desirable. For example, in a remote monitoring system, the updates that provide the remote monitor with accurate information about the source process it is interested in should be considered fresh, even if the update was generated earlier. This limitation leads to its poor performance in the problem of remote estimation. For example, we want to estimate a rapidly changing event remotely. In this case, a small AoI does not necessarily mean that the receiver has accurate information about the event. Likewise, receivers can make relatively accurate estimates without timely information when events change slowly. Inspired by the above limitation, the Age of Incorrect Information (AoII) is introduced in~\cite{b6}, which combines the timeliness of updates and the information content they convey. More specifically, AoII combines the degree of information mismatch between the receiver and the source and the aging process of mismatched information. According to the definition given in~\cite{b6}, AoII captures the aging process of conflicting information through a time penalty function that quantifies the time elapsed since the last time the receiver has the perfect information about the source. The mismatch between the receiver's information and the source is captured by the information penalty function, which quantifies the degree of information mismatch between the two. Because of the flexibility of the penalty functions, AoII can be adapted to various systems and communication objectives by choosing different penalty functions. Since the introduction of AoII, many works have been done to reveal its fundamental nature and performance in various communication systems. AoII minimization under resource constraints is investigated first. In~\cite{b6}, the authors investigate the minimization of AoII when there is a limit on the average number of transmissions allowed. Then, the authors extend the results to the case of the generic time penalty function in~\cite{b7}. However, in both papers, the measure of information mismatch is binary, either true or false. In~\cite{b8}, the authors investigate a similar system setting, but the AoII considers the quantified information mismatch between the source and the receiver. AoII in the context of scheduling is another critical problem. In scheduling problems, a base station observes multiple events and needs to select a part of the users to update. Under these general settings, \cite{b9} investigates the problem of minimizing AoII when the channel state information is available and the time penalty function is generic. The authors of~\cite{b10} consider a similar system, but the base station cannot know the states of the events before the transmission decision is made. In real-life applications, we usually have no knowledge of the statistical model of the source process. Therefore, the authors in~\cite{b27} investigate the problem of minimizing AoII for an unknown Markovian source. The relationship between the estimation error and AoII is studied in~\cite{b26}. Moreover, a variant of AoII - Age of Incorrect Estimates is introduced and studied in~\cite{b28}. Communication channels usually suffer random delays due to various influences in real-life applications. Under this system setup, the authors of~\cite{b11} compare the performances of AoII, AoI, and real-time error through extensive numerical simulations. This paper considers a similar system setup, but we investigate the problem from a theoretical perspective. We accurately calculate the expected AoII achieved by some canonical policies, which enables us to solve the problem of minimizing AoII over a channel with random delay. Communication channel with a random delay has also been studied in the context of remote estimation and AoI~\cite{b13,b14,b15,b16}. However, the problem considered in this paper is very different, as AoII is a combination of age-based metrics frameworks and error-based metrics frameworks. The main contributions of this paper can be summarized as follows. 1) We investigate the AoII minimization problem in a system where the communication channel suffers a random delay and characterize the optimization problem using the Markov decision process. 2) We analyze the characteristics of the threshold policy, under which the transmitter initiates transmission only when AoII exceeds the threshold, and calculate the expected AoII achieved by the threshold policy precisely. 4) We prove the existence of the optimal policy and introduce a computable value iteration algorithm to estimate the optimal policy. 5) We theoretically find the optimal policy using the policy improvement theorem. The remainder of this paper is organized in the following way. We introduce the system model and the optimization problem in Section~\ref{sec-SystemOverview}. Then, Section~\ref{sec-MDP} characterizes the problem using the Markov decision process. In Section~\ref{sec-ExpectedAoII}, we theoretically analyze and calculate the expected AoII achieved by the threshold policy. Then, we show the existence of the optimal policy, provide the value iteration algorithm to estimate the optimal policy, and theoretically find the optimal policy using the policy improvement theorem in Section~\ref{sec-OptimalPolicy}. Finally, Section~\ref{sec-NumericalResults} concludes the paper with numerical results that highlight the performance of the optimal policy. \section{System Overview}\label{sec-SystemOverview} \subsection{System Model}\label{sec-SystemModel} We consider a slotted-time system, where a transmitter observes a dynamic source and needs to decide when to send updates to a remote receiver so that the receiver can have a good knowledge of the current state of the dynamic source. The dynamic source is modeled by a two-state symmetric Markov chain with state transition probability $p$. The transmitter receives an update from the dynamic source at the beginning of each time slot. The update at time slot $k$ is denoted by $X_k$. The old update will be discarded upon the arrival of a new one. Then, the transmitter will decide whether to transmit the new update based on the current system status. When the channel is idle, the transmitter chooses between transmitting the new update and staying idle. When the channel is busy, the transmitter cannot do anything other than stay idle. The updates will be transmitted through an error-free communication channel that suffers a random delay. In other words, the update will not be corrupted during the transmission, but each transmission will take a random amount of time $T\in\mathbb{N}^*$. We denote by $p_t\triangleq Pr(T=t)$ the probability mass function (PMF) and assume $T$ is independent and identically distributed. When a transmission finishes, the communication channel is immediately available for the subsequent transmission. The receiver maintains an estimate of the current state of the dynamic source and modifies its estimate every time a new update is received. We denote by $\hat{X}_k$ the receiver's estimate at time slot $k$. According to~\cite{b16}, the best estimator when $p\leq\frac{1}{2}$ is the last received update. When $p>\frac{1}{2}$, the optimal estimator depends on the realization of transmission time. In this paper, we consider only the case of $p\leq\frac{1}{2}$. Hence, the receiver uses the last received update as the estimate. For the case of $p>\frac{1}{2}$, the results can be extended using the corresponding best estimator. The receiver uses $ACK/NACK$ packets to inform the transmitter of its reception of the new update. As is assumed in~\cite{b6}, the transmitter receives the $ACK/NACK$ packets reliably and instantaneously because the packets are generally very small compared to the size of the status updates. When $ACK$ is received, the transmitter knows that the receiver's estimate changes to the last sent update. When $NACK$ is received, the transmitter knows that the receiver's estimate does not change. In this way, the transmitter always knows the current estimate on the receiver side. A illustration of the system model is shown in Fig.~\ref{fig-SystemModel}. \begin{figure*} \centering \includegraphics[width=\textwidth]{Figure/SystemModel.pdf} \caption{An illustration of the system model, where $X_k$ and $\hat{X}_k$ are the state of the dynamic source and the receiver's estimate at time slot $k$, respectively.} \label{fig-SystemModel} \end{figure*} At the beginning of time slot $k$, the transmitter receives the update $X_k$ from the dynamic source. Then, the transmitter decides whether to transmit this update based on the system status. When the transmitter decides not to start transmission, it will stay idle. Otherwise, the transmitter will transmit the update through the communication channel, where the transmission of the update takes a random amount of time. Thus, the update received by the receiver has a delay of several time slots (i.e., $X_{k-T}$). Then, the receiver will modify its estimation $\hat{X_k}$ based on the received update and send an $ACK$ packet to inform the transmitter of its reception of the update. \subsection{Age of Incorrect Information}\label{sec-AoII} The system adopts the Age of Incorrect Information (AoII) as the performance metric. We first define $U_k$ as the last time slot up to time slot $k$ in which the receiver's estimate is correct. Mathematically, \[ U_k \triangleq \max\{h:h\leq k, X_h = \hat{X}_h\}. \] Then, in a slotted-time system, AoII at time slot $k$ can be written as \begin{equation}\label{eq-AoII} \Delta_{AoII}(X_k,\hat{X}_k,k) = \sum_{h=U_k+1}^k\bigg(g(X_h,\hat{X}_h) F(h-U_k)\bigg), \end{equation} where $g(X_k,\hat{X}_k)$ is the information penalty function. $F(k) \triangleq f(k) - f(k-1)$ where $f(k)$ is the time penalty function. In this paper, we choose $g(X_k,\hat{X}_k) = |X_k-\hat{X}_k|$ and $f(k) = k$. Hence, $F(k)=1$ and $g(X_k,\hat{X}_k)\in\{0,1\}$ as the dynamic source has two states. Then, equation \eqref{eq-AoII} can be simplified as \[ \Delta_{AoII}(X_k,\hat{X}_k,k) = k-U_k\triangleq\Delta_k. \] We can easily conclude from the simplified expression that, under the chosen penalty functions, AoII increases at the rate of $1$ per time slot when the receiver's estimate is incorrect. Otherwise, AoII is $0$. Next, we characterize the evolution of $\Delta_{k}$. To this end, we divide the evolution into the following cases. \begin{itemize} \item When $X_{k+1}=\hat{X}_{k+1}$, we have $U_{k+1} = k + 1$. Then, by definition, $\Delta_{k+1} = 0$. \item When $X_{k+1}\neq\hat{X}_{k+1}$, we have $U_{k+1} = U_k$. Then, by definition, $\Delta_{k+1}=k+1-U_k=\Delta_k +1$. \end{itemize} Combining together, we have \begin{equation}\label{eq-AoIIDynamics} \Delta_{k+1} = \mathbbm{1}\{X_{k+1}\neq\hat{X}_{k+1}\}(\Delta_k+1), \end{equation} where $\mathbbm{1}\{A\}$ is the indicator function, whose value is one when event $A$ occurs and zero otherwise. A sample path of $\Delta_k$ is shown in Fig.~\ref{fig-SamplePath}. \begin{figure*} \centering \includegraphics[width=\textwidth]{Figure/SamplePath.pdf} \caption{A sample path of $\Delta_k$, where $T_i$ and $D_i$ are the transmission start time and the delivery time of the $i$-th update, respectively. At $T_1$, the transmitted update is $X_3$. Note that the transmission decisions in the plot are taken randomly.} \label{fig-SamplePath} \end{figure*} Now that the evolution of AoII has been clarified, we further discuss the system's evolution. \subsection{System Dynamics}\label{sec-SystemDynamics} In this subsection, we tackle the system dynamics, which plays a key role in later sections. We notice that the system's status at the beginning of time slot $k$ can be fully captured by the triplet $s_k\triangleq(\Delta_k,t_k,i_k)$ where $t_k\in\mathbbm{N}^0$ indicates the time the current transmission has been in progress. We define $t_k=0$ if there is no transmission in progress. $i_k\in\{-1,0,1\}$ indicates the state of the channel. We define $i_k=-1$ when the channel is idle. $i_k=0$ if the channel is busy and the transmitting update is the same as the receiver's current estimate, and $i_k=1$ when the transmitting update is different from the receiver's current estimate. \begin{remark} According to the definitions of $t_k$ and $i_k$, $i_k=-1$ if and only if $t_k=0$. In this case, the channel is idle. \end{remark} Then, characterizing the system dynamics is equivalent to characterizing the value of $s_{k+1}$ using $s_k$ and the transmitter's action. We denote the transmitter's decision by $a_k\in\{0,1\}$. We define $a_k=0$ when the transmitter decides not to initiate a transmission and $a_k=1$ otherwise. Hence, the system dynamics can be fully characterized by $P_{s_k,s_{k+1}}(a_k)$, which is defined as the probability that action $a_k$ at $s_k$ leads to $s_{k+1}$. We will revisit $P_{s_k,s_{k+1}}(a_k)$ with an in-depth discussion in future sections. \subsection{Problem Formulation}\label{sec-ProblemFormulation} We define a policy $\phi$ as the one that specifies the transmitter's decision in each time slot. This paper aims to find the policy that minimizes the expected AoII of the system. Mathematically, the problem can be formulated as the following optimization problem. \begin{argmini}|l| {\phi \in \Phi} {\lim_{K\to\infty} \frac{1}{K}\mathbb{E}_{\phi}\left(\sum_{k=0}^{K-1}\Delta_k\right),}{\label{eq-goal}}{} \end{argmini} where $\mathbb{E}_{\phi}$ is the conditional expectation, given that policy $\phi$ is adopted, and $\Phi$ is the set of all admissible policies. \begin{definition}[Optimal policy]\label{def-OptimalPolicy} A policy is said to be \textit{optimal} if it yields the minimal expected AoII. \end{definition} In the next section, we will characterize the problem reported in \eqref{eq-goal} using a Markov Decision Process (MDP). \section{Markov Decision Process Characterization}\label{sec-MDP} The minimization problem reported in \eqref{eq-goal} can be characterized by an infinite horizon with average cost MDP $\mathcal{M}$, which consists of the following components. \begin{itemize} \item The state space $\mathcal{S}$. The state $s=(\Delta,t,i)$ is the triplet defined in Section~\ref{sec-SystemDynamics} without the time stamp. For the remainder of this paper, we will use $s$ and $(\Delta,t,i)$ to represent the state interchangeably. \item The action space $\mathcal{A}$. When $i=-1$, the feasible action is $a\in\{0,1\}$ where $a=0$ if the transmitter decides not to initiate a new transmission and $a=1$ otherwise. When $i\neq-1$, the feasible action is $a=0$. \item The state transition probability $\mathcal{P}$. The probability that action $a$ at state $s$ leads to state $s'$ is denoted by $P_{s,s'}(a)$, whose value will be discussed in the following subsection. \item The immediate cost $\mathcal{C}$. The immediate cost for being at state $s$ is $C(s)=\Delta$. \end{itemize} Let $V(s)$ be the value function of state $s\in\mathcal{S}$. It is well known that the value function satisfies the Bellman equation~\cite{b19}. \begin{equation}\label{eq-Bellman} V(s) + \theta = \min_{a\in\mathcal{A}}\left\lbrace C(s) + \sum_{s'\in\mathcal{S}}P_{s,s'}(a)V(s')\right\rbrace,\quad s\in\mathcal{S}, \end{equation} where $\theta$ is the expected AoII achieved by the optimal policy. We will write $V(s)$ as $V(\Delta,t,i)$ in some parts of this paper to better distinguish between states. The state transition probability is essential for solving the Bellman equation. Hence, we delve into $P_{s,s'}(a)$ in the following subsection. \subsection{State Transition Probability}\label{sec-STP} We recall that $P_{s,s'}(a)$ is the probability that action $a$ at state $s$ will lead to state $s'$. To make it easier to follow, we first characterize separately the transitions of the three elements that make up the state $s$. \begin{itemize} \item $\Delta'$ can be $0$ or $\Delta+1$, depending on whether the receiver's estimate at state $s'$ is correct. The specific evolution is given by \eqref{eq-AoIIDynamics}. \item $t'$ can be $t+1$ or $0$, depending on whether there is a transmission in progress at state $s'$. \item $i'=-1$ if and only if $t'=0$. Other than that, $i'$ can be $0$ or $1$, depending on whether the transmitting update is the same as the receiver's estimate at state $s'$. \end{itemize} With the individual transitions, we proceed to discuss their combined transitions and the corresponding probabilities. To this end, we define $Pr(T>k+1\mid t)$ as the probability that the current transmission will take more than $t+1$ time slots, given that the current transmission has been in progress for $t$ time slots. Hence, \[ Pr(T>t+1\mid t) = \frac{1-Pr(T\leq t+1)}{Pr(T>t)} = \frac{1-P_{t+1}}{1-P_t}, \] where $P_t \triangleq \sum_{k=1}^{t}p_k$. Leveraging the individual transitions and $Pr(T>t+1\mid t)$, $P_{s,s'}(a)$ can be obtained easily. For the sake of space, the complete state transition probabilities are provided in Appendix~\ref{app-STP}. We notice that we do not impose any restrictions on the update transmission time, which would make the theoretical analysis very difficult and would also lead to long channel occupancy by a single update. Therefore, in order to ease the theoretical analysis and to be closer to the practice, we consider the following two independent assumptions\footnote{The results presented in this paper apply to both assumptions unless stated otherwise.}. \begin{itemize} \item \textbf{Assumption 1}: We assume that the update will always be delivered and the transmission lasts for at most $t_{max}$ time slots. More precisely, we assume $1\leq T\leq t_{max}$ and \[ \sum_{t=1}^{t_{max}}p_t = 1,\quad p_t\geq0,\ 1\leq t\leq t_{max}. \] In practice, we can make the probability of the transmission time exceeding $t_{max}$ negligible by choosing a sufficiently large $t_{max}$. \item \textbf{Assumption 2}: We assume the transmission can last for a maximum of $t_{max}$ time slots. At the end of the $t_{max}$th time slot, the update will be discarded if not delivered, and the channel will be available for a new transmission immediately. We define $p_{t^+}\triangleq\sum_{t=t_{max}+1}^{\infty}p_t$ as the probability that the update will be discarded. In practice, similar techniques, such as time-to-live (TTL)~\cite{b22}, are used to prevent an update from occupying the channel for too long. \end{itemize} \begin{remark} $t_{max}$ is a predetermined system parameter and is not a parameter to be optimized. When $t_{max}=1$, the system reduces to the one considered in~\cite{b6}, according to which the optimal policy is to transmit a new update whenever possible. Therefore, in the rest of this paper, we focus on the case of $t_{max}>1$. \end{remark} Under both assumptions, the transmission will last at most $t_{max}$ time slots, and the channel will be immediately available for a new transmission when the current transmission finishes. Hence, the state space $\mathcal{S}$ is reduced as $t$ is now bounded by $1\leq t\leq t_{max}-1$. Moreover, the state transition probabilities in Appendix~\ref{app-STP} will be adjusted as follows. \begin{itemize} \item Under \textbf{Assumption 1}, updates are bound to be delivered after $t_{max}$ time slots. Hence, $Pr(T>t+1\mid t)=0$ for $t\geq t_{max}-1$. \item Under \textbf{Assumption 2}, updates will be discarded at the end of the $t_{max}$th time slot if not delivered. Hence, $s' = (\Delta',t_{max},i')$ will be replaced by $s' = (\Delta',0,-1)$. \end{itemize} Having clarified the state transition probabilities, we evaluate a canonical policy in terms of the achieved expected AoII in the next section. \section{Policy Performance Analysis}\label{sec-PolicyPerformance} As is proved in~\cite{b6,b7,b8}, the AoII-optimal policy often has a threshold structure. Hence, we consider the threshold policy. \begin{definition}[Threshold policy]\label{def-ThreholdPolicy} Under threshold policy $\tau$, the transmitter will initiate a transmission only when the current AoII is no less than threshold $\tau\in\mathbbm{N}^0$ and the channel is idle. Let $a_{\tau}(s)$ be the action at state $s$ suggested by the threshold policy $\tau$. Then, \[ a_{\tau}(s) = \mathbbm{1}\{\Delta\geq\tau\ and\ i=-1\}. \] \end{definition} \begin{remark} We define $\tau\triangleq\infty$ as the policy under which the transmitter never initiates any transmissions. \end{remark} We notice that the system dynamics under threshold policy can be characterized by a discrete-time Markov chain (DTMC). Without loss of generality, we assume the DTMC starts at state $(0,0,-1)$. Then, the state space of the Markov chain $\mathcal{S}^{MC}$ consists of all the states accessible from state $(0,0,-1)$. Since state $(0,0,-1)$ is positive recurrent and communicates with each state $s\in\mathcal{S}^{MC}$, the stationary distribution exists. Let $\pi_{s}$ be the steady-state probability of state $s$. Then, $\pi_s$ satisfies the following balance equation. \[ \pi_s = \sum_{s'\in\mathcal{S}^{MC}}P_{s',s}(a)\pi_{s'},\quad s\in\mathcal{S}^{MC}, \] where $P_{s',s}(a)$ is the single-step state transition probability as define in Section~\ref{sec-MDP}, and the action $a$ depends on the threshold policy. Then, the first step in calculating the expected AoII achieved by the threshold policy is to calculate the stationary distribution of the induced DTMC. However, the problem arises as the state space $\mathcal{S}^{MC}$ is infinite and intertwined. To simplify the state transitions, we recall that the transmitter can only stay idle (i.e., $a=0$) when the channel is busy. Let $\mathcal{S}^{MC}_{-1}=\{s=(\Delta,t,i):i\neq-1\}$ be the set of the state where the channel is busy. Then, for $s'\in\mathcal{S}^{MC}_{-1}$, $P_{s',s}(a) = P_{s',s}(0)$ and is independent of the threshold policy. Hence, for any threshold policy and each $s\in\mathcal{S}\setminus\mathcal{S}^{MC}_{-1}$, we can repeatedly replace $\pi_{s'}$, where $s'\in\mathcal{S}^{MC}_{-1}$, with the corresponding balance equation until we get the following equation. \begin{equation}\label{eq-CompactBalanceEq} \pi_{s} = \sum_{s'\in \mathcal{S}\setminus\mathcal{S}^{MC}_{-1}}P_{\Delta',\Delta}(a)\pi_{s'},\quad s\in\mathcal{S}\setminus\mathcal{S}^{MC}_{-1}, \end{equation} where $P_{\Delta',\Delta}(a)$ is the multi-step state transition probability from state $s'=(\Delta',0,-1)$ to state $s=(\Delta,0,-1)$ under action $a$. For simplicity, we write \eqref{eq-CompactBalanceEq} as \begin{equation}\label{eq-CompactBalanceEq2} \pi_{\Delta} = \sum_{\Delta'\geq0}P_{\Delta',\Delta}(a)\pi_{\Delta'},\quad \Delta\geq0. \end{equation} As we will see in the following subsections, $\pi_\Delta$ is sufficient to calculate the expected AoII obtained by any threshold policy. In the next subsection, we derive the expression of $P_{\Delta,\Delta'}(a)$. \subsection{Multi-step State Transition Probability}\label{sec-StateTransProb} We start with the case of $a=0$. In this case, no update will be transmitted, and $P_{\Delta,\Delta'}(0)$ is independent of the transmission delay. Then, according to Appendix~\ref{app-STP}, \[ P_{0,\Delta'}(0) = \begin{dcases} 1-p & \Delta'=0,\\ p & \Delta'=1, \end{dcases} \] and for $\Delta>0$, \[ P_{\Delta,\Delta'}(0) = \begin{dcases} p & \Delta'=0,\\ 1-p & \Delta' = \Delta+1. \end{dcases} \] In the sequel, we focus on the case of $a=1$. We define $P^{t}_{\Delta,\Delta'}(a)$ as the probability that action $a$ at state $s=(\Delta,0,-1)$ will lead to state $s'=(\Delta',0,-1)$, given that the transmission takes $t$ time slots. Then, under \textbf{Assumption 1}, \[ P_{\Delta,\Delta'}(1) = \sum_{t=1}^{t_{max}}p_tP^t_{\Delta,\Delta'}(1). \] Hence, it is sufficient to obtain the expressions of $P^t_{\Delta,\Delta'}(1)$. To this end, we define $p^{(t)}$ as the probability that the dynamic source will remain in the same state after $t$ time slots. Since the Markov chain is symmetric, $p^{(t)}$ is independent of the state and can be calculated by \[ p^{(t)} = \left(\begin{bmatrix} 1-p & p\\ p & 1-p \end{bmatrix}^t\right)_{11}, \] where the subscript indicates the row number and the column number of the target probability. For the consistency of notation, we define $p^{(0)}\triangleq1$. Then, we have the following lemma. \begin{lemma}\label{lem-MSTPAss1} Under \textbf{Assumption 1}, \begin{equation}\label{eq-MSTPAss1} P_{\Delta,\Delta'}(1) = \sum_{t=1}^{t_{max}}p_tP^t_{\Delta,\Delta'}(1), \end{equation} where \[ P^{t}_{0,\Delta'}(1) = \begin{dcases} p^{(t)} & \Delta'=0,\\ p^{(t-k)}p(1-p)^{k-1} & 1\leq\Delta'= k\leq t,\\ 0 & otherwise, \end{dcases} \] and for $\Delta>0$, \[ P^{t}_{\Delta,\Delta'}(1)=\begin{dcases} p^{(t)} & \Delta'=0,\\ (1-p^{(t-1)})(1-p) & \Delta'=1,\\ (1-p^{(t-k)})p^{2}(1-p)^{k-2} & 2\leq \Delta'=k\leq t-1,\\ p(1-p)^{t-1} & \Delta'=\Delta+t,\\ 0 & otherwise. \end{dcases} \] Under \textbf{Assumption 1}, equation \eqref{eq-MSTPAss1} can be written equivalently as \[ P_{\Delta,\Delta'}(1) =\\ \begin{dcases} \sum_{t=\Delta'}^{t_{max}}p_tP^t_{\Delta,\Delta'}(1) & 0\leq\Delta'\leq t_{max}-1,\Delta\geq\Delta',\\ \sum_{t=\Delta'}^{t_{max}}p_tP^t_{\Delta,\Delta'}(1) + p_{t'}P^{t'}_{\Delta,\Delta'}(1) & 0\leq\Delta'\leq t_{max}-1,\Delta<\Delta',\\ p_{t'}P^{t'}_{\Delta,\Delta'}(1) & \Delta'\geq t_{max}, \end{dcases} \] where $t'\triangleq\Delta'-\Delta$ and $P^{t'}_{\Delta,\Delta'}(1)\triangleq 0$ when $t'\leq0$ or when $t'>t_{max}$. Meanwhile, $P_{\Delta,\Delta'}(1)$ possesses the following properties. \begin{enumerate} \item $P_{\Delta,\Delta'}(1)$ is independent of $\Delta$ when $0\leq\Delta'\leq t_{max}-1$ and $\Delta\geq\Delta'$. \item $P_{\Delta,\Delta'}(1) = P_{\Delta+\delta,\Delta'+\delta}(1)$ when $\Delta'\geq t_{max}$ and $\Delta\geq0$ for any $\delta\geq1$. \item $P_{\Delta,\Delta'}(1)=0$ when $\Delta'>\Delta+t_{max}$ or when $t_{max}-1<\Delta'<\Delta+1$. \end{enumerate} \end{lemma} \begin{proof} The expression of $P^t_{\Delta,\Delta'}(1)$ is obtained by analyzing the system dynamics. The complete proof can be found in Appendix~\ref{pf-CompactTrans}. \end{proof} The state transition probabilities under \textbf{Assumption 2} can be obtained similarly. To this end, we define $P^{t^+}_{\Delta,\Delta'}(a)$ as the probability that action $a$ at state $s=(\Delta,0,-1)$ will result in state $s'=(\Delta',0,-1)$, given that the transmission is terminated. Then, we have the following lemma. \begin{lemma}\label{lem-MSTPAss2} Under \textbf{Assumption 2}, \begin{equation}\label{eq-MSTPAss2} P_{\Delta,\Delta'}(1) = \sum_{t=1}^{t_{max}}p_tP^{t}_{\Delta,\Delta'}(1) + p_{t^+}P^{t^+}_{\Delta,\Delta'}(1), \end{equation} where \[ P^{t}_{0,\Delta'}(1) = \begin{dcases} p^{(t)} & \Delta'=0,\\ p^{(t-k)}p(1-p)^{k-1} & 1\leq\Delta'= k\leq t,\\ 0 & otherwise, \end{dcases} \] \[ P^{t^+}_{0,\Delta'}(1) = P^{t_{max}}_{0,\Delta'}(1), \] and for $\Delta>0$, \[ P^{t}_{\Delta,\Delta'}(1) = \begin{dcases} p^{(t)} & \Delta'=0,\\ (1-p^{(t-1)})(1-p) & \Delta'=1,\\ (1-p^{(t-k)})p^{2}(1-p)^{k-2} & 2\leq\Delta'=k\leq t-1,\\ p(1-p)^{t-1} & \Delta'=\Delta+t,\\ 0 & otherwise, \end{dcases} \] \[ P^{t^+}_{\Delta,\Delta'}(1) = \begin{dcases} 1-p^{(t_{max})} & \Delta'=0,\\ (1-p^{(t_{max}-k)})p(1-p)^{k-1} & 1\leq\Delta'= k\leq t_{max}-1,\\ (1-p)^{t_{max}} & \Delta' = \Delta+t_{max},\\ 0 & otherwise. \end{dcases} \] Under \textbf{Assumption 2}, equation \eqref{eq-MSTPAss2} can be written equivalently as \[ P_{\Delta,\Delta'}(1) = \begin{dcases} \sum_{t=\Delta'}^{t_{max}}p_tP^t_{\Delta,\Delta'}(1)+ p_{t^+}P^{t^+}_{\Delta,\Delta'}(1) & 0\leq\Delta'\leq t_{max}-1,\Delta\geq\Delta',\\ \sum_{t=\Delta'}^{t_{max}}p_tP^t_{\Delta,\Delta'}(1) + p_{t'}P^{t'}_{\Delta,\Delta'}(1)+ p_{t^+}P^{t^+}_{\Delta,\Delta'}(1) & 0\leq\Delta'\leq t_{max}-1,\Delta<\Delta',\\ p_{t'}P^{t'}_{\Delta,\Delta'}(1)+ p_{t^+}P^{t^+}_{\Delta,\Delta'}(1) & \Delta'\geq t_{max},\\ 0 & otherwise. \end{dcases} \] Meanwhile, $P_{\Delta,\Delta'}(1)$ possesses the following properties. \begin{enumerate} \item $P_{\Delta,\Delta'}(1)$ is independent of $\Delta$ when $0\leq\Delta'\leq t_{max}-1$ and $\Delta\geq\max\{1,\Delta'\}$. \item $P_{\Delta,\Delta'}(1) = P_{\Delta+\delta,\Delta'+\delta}(1)$ when $\Delta'\geq t_{max}$ and $\Delta>0$ for any $\delta\geq1$. \item $P_{\Delta,\Delta'}(1)=0$ when $\Delta'>\Delta+t_{max}$ or when $t_{max}-1<\Delta'<\Delta+1$. \end{enumerate} \end{lemma} \begin{proof} The proof follows similar steps as presented in the proofs of Lemma~\ref{lem-MSTPAss1}. The complete proof can be found in Appendix~\ref{pf-Case2TransProb}. \end{proof} As the expressions and properties of $P_{\Delta,\Delta'}(a)$ under both assumptions are clarified, we solve for $\pi_{\Delta}$ in the next subsection. \subsection{Stationary Distribution}\label{sec-SteadyState} Let $ET$ be the expected transmission time of an update. Since the channel remains idle if no transmission is initiated and the expected transmission time of an update is $ET$, $\pi_{\Delta}$ satisfies the following equation. \begin{equation}\label{eq-TotalProbs} \sum_{\Delta=0}^{\tau-1}\pi_\Delta + ET\sum_{\Delta=\tau}^{\infty}\pi_\Delta = 1, \end{equation} where $ET= \sum_{t=1}^{t_{max}}tp_t$ under \textbf{Assumption 1} and $ET= \sum_{t=1}^{t_{max}}tp_t+t_{max}p_{t^+}$ under \textbf{Assumption 2}. We notice that there is still infinitely many $\pi_{\Delta}$ to calculate. To overcome the infinity, we recall that, under threshold policy, the suggested action is $a=1$ for all the state $(\Delta,0,-1)$ with $\Delta\geq\tau$. Hence, we define $\Pi\triangleq \sum_{\Delta=\omega}^{\infty}\pi_\Delta$ where $\omega \triangleq t_{max} + \tau+1$. As we will see in the following subsections, $\Pi$ and $\pi_{\Delta}$ for $0\leq\Delta<\omega-1$ are sufficient for calculating the expected AoII achieved by the threshold policy. With $\Pi$ in mind, we have the following theorem. \begin{theorem}\label{prop-StationaryDistribution} For $0<\tau<\infty$, $\Pi$ and $\pi_{\Delta}$ for $0\leq\Delta<\omega-1$ are the solution to the following system of linear equations. \[ \pi_0 = (1-p)\pi_0 + p\sum_{i=1}^{\tau-1}\pi_i+ P_{1,0}(1)\left(\sum_{i=\tau}^{\omega-1}\pi_i+\Pi\right). \] \[ \pi_1= p\pi_0 + P_{1,1}(1)\left(\sum_{i=\tau}^{\omega-1}\pi_i+\Pi\right). \] \[ \Pi = \sum_{i=\tau+1}^{\omega-1}\left(\sum_{k=\tau+1}^iP_{i,t_{max}+k}(1)\right)\pi_i + \sum_{i=1}^{t_{max}}\bigg(P_{\omega,\omega+i}(1)\bigg)\Pi. \] \[ \sum_{i=0}^{\tau-1}\pi_i + ET\left(\sum_{i=\tau}^{\omega-1}\pi_i+\Pi\right) = 1. \] For each $2\leq\Delta\leq t_{max}-1$, \[ \pi_\Delta =\\ \begin{dcases} (1-p)\pi_{\Delta-1} + P_{\tau,\Delta}(1)\left(\sum_{i=\tau}^{\omega-1}\pi_i+\Pi\right) & \Delta-1<\tau,\\ \sum_{i=\tau}^{\Delta-1}P_{i,\Delta}(1)\pi_i + P_{\Delta,\Delta}(1)\left(\sum_{i=\Delta}^{\omega-1}\pi_i+\Pi\right) & \Delta-1\geq\tau. \end{dcases} \] For each $t_{max}\leq\Delta\leq\omega-1$, \[ \pi_{\Delta} = \begin{dcases} (1-p)\pi_{\Delta-1} & \Delta-1<\tau,\\ \sum_{i=\tau}^{\Delta-1}P_{i,\Delta}(1)\pi_i & \Delta-1\geq\tau. \end{dcases} \] \end{theorem} \begin{proof} We delve into the definition of $\Pi$. By leveraging the structural property of the threshold policy and the properties of $P_{\Delta,\Delta'}(a)$, we obtain the above system of linear equations. The complete proof can be found in Appendix~\ref{pf-StationaryDistribution}. \end{proof} \begin{remark} The size of the system of linear equations detailed in Theorem~\ref{prop-StationaryDistribution} is $\omega+1$. \end{remark} \begin{corollary}\label{cor-StationaryDistributionSpecial} When $\tau=0$, \[ \pi_{0} = \frac{P_{1,0}(1)}{ET[1-P_{0,0}(1)+P_{1,0}(1)]}. \] \[ \pi_{\Delta} = \sum_{i=0}^{\Delta-1}P_{i,\Delta}(1)\pi_i + P_{\Delta,\Delta}(1)\left(\frac{1}{ET} - \sum_{i=0}^{\Delta-1}\pi_i\right),\quad 1\leq\Delta\leq t_{max}. \] \[ \Pi = \ddfrac{\sum_{i=1}^{t_{max}}\left(\sum_{k=1}^{i}P_{i,t_{max}+k}(1)\right)\pi_i}{1-\sum_{i=1}^{t_{max}}P_{t_{max}+1,t_{max}+1+i}(1)}. \] When $\tau=1$, \[ \pi_0 = \frac{P_{1,0}(1)}{pET+P_{1,0}(1)},\quad \pi_1 = \frac{pP_{1,0}(1)+pP_{1,1}(1)}{pET+P_{1,0}(1)}. \] \[ \pi_\Delta = \sum_{i=1}^{\Delta-1}P_{i,\Delta}(1)\pi_i + P_{\Delta,\Delta}(1)\left(\frac{1-\pi_0}{ET} - \sum_{i=1}^{\Delta-1}\pi_i\right),\quad 2\leq \Delta\leq t_{max}+1. \] \[ \Pi = \ddfrac{\sum_{i=2}^{t_{max}+1}\left(\sum_{k=2}^iP_{i,t_{max}+k}(1)\right)\pi_i}{1-\sum_{i=1}^{t_{max}}P_{t_{max}+2,t_{max}+2+i}(1)}. \] \end{corollary} \begin{proof} The calculations follow similar steps as detailed in the proof of Theorem~\ref{prop-StationaryDistribution}. The complete proof can be found in Appendix~\ref{pf-AoIISpecialCase1}. \end{proof} We will calculate the expected AoII in the next subsection based on the above results. \subsection{Expected AoII}\label{sec-ExpectedAoII} Let $\bar{\Delta}_{\tau}$ be the expected AoII achieved by threshold policy $\tau$. Then, \begin{equation}\label{eq-ExpectedAoII} \bar{\Delta}_{\tau} = \sum_{\Delta=0}^{\tau-1}C(\Delta,0)\pi_\Delta + \sum_{\Delta=\tau}^{\infty}C(\Delta,1)\pi_\Delta, \end{equation} where $C(\Delta,a)$ is the expected sum of AoII during the transmission of the update caused by the operation of $a$ at state $(\Delta,0,-1)$. Note that $C(\Delta,a)$ includes the AoII for being at state $(\Delta,0,-1)$. \begin{remark}\label{rem-CandP} In order to have a more intuitive understanding of the definition of $C(\Delta,a)$, we use $\eta$ to denote a possible path of the state during the transmission of the update and let $H$ be the set of all possible paths. Moreover, we denote by $C_{\eta}$ and $P_{\eta}$ the sum of AoII and the probability associated with path $\eta$, respectively. Then, \[ C(\Delta,a) = \sum_{\eta\in H}P_{\eta}C_{\eta}. \] For example, we consider the case of $p_2=1$, where the transmission takes $2$ time slots to be delivered. Also, action $a=1$ is taken at state $(2,0,-1)$. Then, a sample path $\eta$ of the state during the transmission can be the following. \[ (2,0,-1)\rightarrow(3,1,1)\rightarrow(4,0,-1). \] By our definition, $C_{\eta}=2+3=5$ and $P_{\eta} = Pr[(3,1,1)\mid (2,0,-1),a=1]\cdot Pr[(4,0,-1)\mid (3,1,1),a=1]$ for the above sample path. \end{remark} In the following, we calculate $C(\Delta,a)$. Similar to Section~\ref{sec-StateTransProb}, we define $C^{t}(\Delta,a)$ as the expected sum of AoII during the transmission of the update caused by action $a$ at state $(\Delta,0,-1)$, given that the transmission takes $t$ time slots. Then, under \textbf{Assumption 1}, \begin{equation}\label{eq-CompactCostAss1} C(\Delta,a) = \begin{dcases} \Delta & a=0,\\ \sum_{t=1}^{t_{max}}p_tC^{t}(\Delta,1) & a=1, \end{dcases} \end{equation} and, under \textbf{Assumption 2}, \begin{equation}\label{eq-CompactCostAss2} C(\Delta,a) = \begin{dcases} \Delta & a=0,\\ \sum_{t=1}^{t_{max}}p_tC^{t}(\Delta,1) + p_{t^+}C^{t_{max}}(\Delta,1) & a=1. \end{dcases} \end{equation} Hence, obtaining the expressions of $C^{t}(\Delta,1)$ is sufficient. To this end, we define $C^k(\Delta)$ as the expected AoII $k$ time slots after the transmission starts at state $(\Delta,0,-1)$, given that the transmission is still in progress. Then, we have the following lemma. \begin{lemma}\label{lem-CompactCost} $C^{t}(\Delta,1)$ is given by \[ C^{t}(\Delta,1) = \sum_{k=0}^{t-1}C^k(\Delta), \] where \[ C^k(\Delta) = \begin{dcases} \sum_{h=1}^{k} hp^{(k-h)}p(1-p)^{h-1} & \Delta=0,\\ \sum_{h=1}^{k-1} h(1-p^{(k-h)})p(1-p)^{h-1} + (\Delta+k)(1-p)^k & \Delta>0. \end{dcases} \] \end{lemma} \begin{proof} The expression of $C^k(\Delta)$ is obtained by analyzing the system dynamics. The complete proof can be found in Appendix~\ref{pf-ExpectedCost}. \end{proof} Next, we calculate the expected AoII achieved by the threshold policy. We start with the case of $\tau=\infty$. \begin{theorem}\label{prop-LazyPerformance} The expected AoII achieved by the threshold policy with $\tau=\infty$ is \[ \bar{\Delta}_\infty = \frac{1}{2p}. \] \end{theorem} \begin{proof} In this case, the transmitter will never initiate any transmissions. Hence, the state transitions are straightforward. The complete proof can be found in Appendix~\ref{pf-LazyPerformance}. \end{proof} In the following, we focus on the case where $\tau$ is finite. We recall that the expected AoII is given by \eqref{eq-ExpectedAoII}. The problem arises because of the infinite sum. To overcome this, we adopt a similar approach as proposed in Section~\ref{sec-SteadyState}. More precisely, we leverage the structural property of the threshold policy and define $\Sigma\triangleq \sum_{\Delta=\omega}^{\infty}C(\Delta,1)\pi_\Delta$. Then, equation \eqref{eq-ExpectedAoII} can be written as \[ \bar{\Delta}_{\tau} = \sum_{i=0}^{\tau-1}C(i,0)\pi_i + \sum_{i=\tau}^{\omega-1}C(i,1)\pi_i + \Sigma. \] As we have obtained the expressions of $\pi_\Delta$ and $C(\Delta,a)$ in previous subsections, it is sufficient to obtain the expression of $\Sigma$. \begin{theorem}\label{thm-Sigma} Under \textbf{Assumption 1} and for $0\leq\tau<\infty$, \[ \Sigma = \ddfrac{\sum_{t=1}^{t_{max}}\left[p_tP^t_{1,1+t}(1)\left(\sum_{i=\omega-t}^{\omega-1}C(i,1)\pi_i\right) + \Delta_t'\Pi_t\right]}{1-\sum_{t=1}^{t_{max}}\bigg(p_tP^t_{1,1+t}(1)\bigg)}, \] where \[ \Pi_t= p_{t}P^{t}_{1,1+t}(1)\left(\sum_{i=\omega-t}^{\omega-1}\pi_i + \Pi\right), \] \[ \Delta_t' = \sum_{i=1}^{t_{max}}p_i\left(\frac{t-t(1-p)^i}{p}\right). \] Under \textbf{Assumption 2} and for $0\leq\tau<\infty$, \[ \Sigma = \ddfrac{\sum_{t=1}^{t_{max}}\left[\left(\sum_{i=\omega-t}^{\omega-1}\Upsilon(i+t,t)C(i,1)\pi_i\right) + \Delta_t'\Pi_t\right]}{1-\sum_{t=1}^{t_{max}}\Upsilon(\omega+t,t)}, \] where \[ \Upsilon(\Delta,t)= p_tP^t_{\Delta-t,\Delta}(1) + p_{t^+}P^{t^+}_{\Delta-t,\Delta}(1), \] \[ \Pi_t = \sum_{i=\omega-t}^{\omega-1}\Upsilon(i+t,t)\pi_i + \Upsilon(\omega+t,t)\Pi, \] \[ \Delta_t' = \sum_{i=1}^{t_{max}}p_i\left(\frac{t-t(1-p)^i}{p}\right) + p_{t^+}\left(\frac{t-t(1-p)^{t_{max}}}{p}\right). \] \end{theorem} \begin{proof} We delve into the definition of $\Sigma$ and repeatedly use the properties of $C(\Delta,a)$ and $P_{\Delta,\Delta'}(a)$. The complete proof can be found in Appendix~\ref{pf-Performance}. \end{proof} \section{Optimal Policy}\label{sec-OptimalPolicy} In this section, we find the optimal policy for $\mathcal{M}$. To this end, we first prove that the optimal policy exists. \subsection{Existence of Optimal Policy}\label{sec-OptimalPolicyExistence} We first introduce the infinite horizon $\gamma$-discounted cost of $\mathcal{M}$, where $0 < \gamma < 1$ is a discount factor. Then, the expected $\gamma$-discounted cost under policy $\phi$ is \begin{equation}\label{eq-GammaDiscount} V_{\phi,\gamma}(s) = \mathbb{E}_{\phi}\left[\sum_{t=0}^{\infty}\gamma^tC(s_t)\mid s\right], \end{equation} where $s_t$ is the state of $\mathcal{M}$ at time slot $t$. We define $V_{\gamma}(s) \triangleq inf_{\phi} V_{\phi,\gamma}(s)$ as the best that can be achieved. Equivalently, $V_{\gamma}(s)$ is the value function associated with the $\gamma$-discounted version of $\mathcal{M}$. Hence, $V_{\gamma}(s)$ satisfies the corresponding Bellman equation. \[ V_{\gamma}(s) = \min_{a\in\mathcal{A}}\left\lbrace C(s)+\gamma\sum_{s'\in\mathcal{S}}P_{s,s'}(a)V_{\gamma}(s')\right\rbrace. \] Value iteration algorithm is a canonical algorithm to calculate $V_{\gamma}(s)$. Let $V_{\gamma,\nu}(s)$ be the estimated value function at iteration $\nu$. Then, the estimated value function is updated in the following way. \begin{equation}\label{eq-ValueIterationGammaDiscount} V_{\gamma,\nu+1}(s) = \min_{a\in\mathcal{A}}\left\lbrace C(s)+\gamma\sum_{s'\in\mathcal{S}}P_{s,s'}(a)V_{\gamma,\nu}(s')\right\rbrace. \end{equation} \begin{lemma}\label{lem-Converge} The estimated value function will converge to the value function as $\nu\rightarrow\infty$. More precisely, $\lim_{\nu\rightarrow\infty}V_{\gamma,\nu}(s)= V_{\gamma}(s)$. \end{lemma} \begin{proof} According to~\cite[Propositions 1 and 3]{b17}, it is sufficient to show that $V_{\gamma}(s)$ is finite. To this end, we consider the policy $\phi$ being the one that never initiate any transmissions. According to \eqref{eq-GammaDiscount}, we have \[ V_{\phi,\gamma}(s) = \mathbb{E}_{\phi}\left[\sum_{t=0}^{\infty}\gamma^tC(s_t)\ |\ s\right]\leq \sum_{t = 0}^{\infty}\gamma^t (\Delta+t) = \frac{\Delta}{1-\gamma} + \frac{\gamma}{(1-\gamma)^2} < \infty. \] Then, by definition, we have $V_{\gamma}(s)\leq V_{\gamma,\phi}(s)<\infty$. Then, we can conclude that the value iteration reported in \eqref{eq-ValueIterationGammaDiscount} will converge to the value function. \end{proof} Leveraging the convergence of the value iteration algorithm, we can prove the following structural property of $V_{\gamma}(s)$. \begin{lemma}\label{lem-Monotone} $V_{\gamma}(s)$ is increasing in $\Delta$ when $\Delta>0$. \end{lemma} \begin{proof} We recall that $V_{\gamma}(s)$ can be calculated using the value iteration algorithm. Hence, the monotonicity of $V_{\gamma}(s)$ can be proved via mathematical induction. The complete proof can be found in Appendix~\ref{pf-Monotone}. \end{proof} Now, we proceed with showing the existence of the optimal policy. To this end, we first define the stationary policy. \begin{definition}[Stationary policy] A stationary policy specifies a single action in each time slot. \end{definition} \begin{theorem}\label{thm-optimalexist} There exists a stationary policy that is optimal for $\mathcal{M}$. Moreover, the minimum expected AoII is independent of the initial state. \end{theorem} \begin{proof} We show that $\mathcal{M}$ verifies the two conditions given in~\cite{b17}. Then, the results in the theorem is guaranteed by~\cite[Theorem]{b17}. The complete proof can be found in Appendix~\ref{pf-optimalexist}. \end{proof} We denote by $\phi^*$ the optimal policy for $\mathcal{M}$. Then, the next problem is how to find $\phi^*$. To solve an MDP, the value iteration algorithm and the policy iteration algorithm are two of the best-known algorithms. In the value iteration algorithm, the value function $V(s)$ is computed iteratively until convergence. However, since the state space $\mathcal{S}$ is infinite, it is not feasible to compute the value function for all states. To make the calculation feasible, in Section~\ref{sec-VIA}, an approximation algorithm is applied to obtain an approximated optimal policy $\hat{\phi}^*$, and $\hat{\phi}^*$ is proved to converge to $\phi^*$. However, the choice of approximation parameters can significantly affect the algorithm's complexity and may even lead to a non-optimal policy. To avoid this problem, in Section~\ref{sec-PIA}, we introduce the policy iteration algorithm and find $\phi^*$ theoretically using the policy improvement theorem. We start with the value iteration algorithm in the following subsection. \subsection{Value Iteration Algorithm}\label{sec-VIA} In the subsection, we present the relative value iteration (RVI) algorithm that approximates $\phi^*$. Direct application of RVI becomes impractical as the state space $\mathcal{S}$ is infinite. Hence, we use approximating sequence method (ASM)~\cite{b23}. To this end, we construct another MDP $\mathcal{M}^{(m)} = (\mathcal{S}^{(m)},\mathcal{A},\mathcal{P}^{(m)},\mathcal{C})$ by truncating the value of $\Delta$. More precisely, we impose \[ \mathcal{S}^{(m)}:\begin{dcases} \Delta \in \{0,1,...,m\}, &\\ i \in \{-1,0,1\}, &\\ t \in \{0,1,...,t_{max}-1\}, & \end{dcases} \] where $m$ is the predetermined maximal value of $\Delta$. The transition probabilities from $s\in\mathcal{S}^{(m)}$ to $z\in\mathcal{S}\setminus\mathcal{S}^{(m)}$ are redistributed to the states $s'\in\mathcal{S}^{(m)}$ in the following way. \[ P^{(m)}_{s,s'}(a) = \begin{dcases} P_{s,s'}(a) &\ s'=(\Delta',t',i')\ where\ \Delta'<m, \\ P_{s,s'}(a) + \sum_{G(z,s')}P_{s,z}(a) &\ s'=(\Delta',t',i')\ where\ \Delta'=m, \\ \end{dcases} \] where $G(z,s') = \{z = (\Delta,t,i):\Delta>m,t=t',i=i'\}$. The action space $\mathcal{A}$ and the instant cost $\mathcal{C}$ are the same as defined in $\mathcal{M}$. \begin{theorem}\label{thm-ASMConvergence} The sequence of optimal policies for $\mathcal{M}^{(m)}$ will converge to the optimal policy for $\mathcal{M}$ as $m\rightarrow\infty$. \end{theorem} \begin{proof} The proof follows the same steps as those in the proof of~\cite[Theorem 1]{b8}. The complete proof can be found in Appendix~\ref{pf-ASMConvergence}. \end{proof} Then, we can apply RVI to $\mathcal{M}^{(m)}$ and treat the resulting policy as an approximation of $\phi^*$. The pseudocode of RVI is given in Algorithm~\ref{alg-RVIA}. \begin{figure}[ht] \centering \begin{minipage}{\columnwidth} \begin{algorithm}[H] \begin{algorithmic}[1] \Procedure{RVI}{$\mathcal{M}^{(m)}$,$\epsilon$} \State $V_0(s)\gets0$ for $s\in\mathcal{S}^{(m)}$; $\nu\gets0$ \State Choose $s^{ref}\in\mathcal{S}^{(m)}$ arbitrarily \Repeat \For{$s \in \mathcal{S}^{(m)}$} \For{$a \in \mathcal{A}$} \State $H_{s,a} \gets C(s) + \sum_{s'} P^{(m)}_{s,s'}(a) V_{\nu}(s')$ \EndFor \State $Q_{\nu+1}(s) \gets \min_a \{H_{s,a}\}$ \EndFor \For{$s \in \mathcal{S}^{(m)}$} \State $V_{\nu+1}(s) \gets Q_{\nu+1}(s) - Q_{\nu+1}(s^{ref})$ \EndFor \State $\nu \gets \nu + 1$ \Until{$\max_s\{\left|V_{\nu}(s)-V_{\nu-1}(s)\right|\}\leq\epsilon$} \State \Return $\hat{\phi}^* \gets \argmin_a \{H_{s,a}\}$ \EndProcedure \end{algorithmic} \caption{Relative Value Iteration} \label{alg-RVIA} \end{algorithm} \end{minipage} \end{figure} However, the choice of the approximation parameter $m$ is crucial. A large $m$ can add unnecessary computational complexity, while a small $m$ may lead to a non-optimal policy. Therefore, in the following subsections, we use the policy iteration algorithm and the policy improvement theorem to find $\phi^*$ theoretically. We start with introducing the policy iteration algorithm. \subsection{Policy Iteration Algorithm}\label{sec-PIA} The policy iteration algorithm is an iterative algorithm that iterates between the following two steps until convergence, which happens when two consecutive iterations produce equivalent policies. \begin{enumerate} \item The first step is policy evaluation. In this step, we calculate the value function $V^{\phi}(\cdot)$ and the expected AoII $\theta^{\phi}$ resulting from the adoption of some policy $\phi$. More precisely, the value function and the expected AoII are obtained by solving the following system of linear equations. \begin{equation}\label{eq-policyevaluate} V^{\phi}(s) + \theta^{\phi} = C(s) + \sum_{s'\in\mathcal{S}}P^{\phi}_{s,s'}V^{\phi}(s'),\quad s\in\mathcal{S}, \end{equation} where $P^{\phi}_{s,s'}$ is the state transition probability from $s$ to $s'$ when policy $\phi$ is adopted. Note that \eqref{eq-policyevaluate} forms a underdetermined system. Hence, we can select any state $s$ as a reference state and set the corresponding value function as $0$. In this way, we can obtain a unique solution. \item The second step is policy improvement. In this step, we obtain a new policy $\phi'$ by applying the $V^{\phi}(\cdot)$ obtained in the first step to the Bellman equation. More precisely, the action suggested by $\phi'$ at state $s$ is determined by \[ \phi'(s) = \argmin_{a\in\mathcal{A}}\left\lbrace C(s) + \sum_{s'\in\mathcal{S}}P_{s,s'}(a)V^{\phi}(s')\right\rbrace. \] \end{enumerate} The pseudocode for policy iteration algorithm is given in Algorithm~\ref{alg-PIA}. \begin{figure}[ht] \centering \begin{minipage}{\columnwidth} \begin{algorithm}[H] \begin{algorithmic}[1] \Procedure{PI}{$\mathcal{M}$} \State Choose $\phi'(s)\in\mathcal{A}$ arbitrarily for all $s\in\mathcal{S}$ \Repeat \State $\phi(s)\gets\phi'(s)$ for all $s\in\mathcal{S}$ \State $(V^{\phi}(s),\theta^{\phi})\leftarrow$ \textsc{PolicyEvaluation}$(\mathcal{M},\phi(s))$ \State $\phi'(s)\leftarrow$ \textsc{PolicyImprovement}$(\mathcal{M},V^{\phi}(s))$ \Until{$\phi'(s)=\phi(s)$ for all $s\in\mathcal{S}$} \State\Return $(\phi^*,\theta)\gets (\phi(s),\theta^{\phi})$ \EndProcedure \end{algorithmic} \caption{Policy Iteration} \label{alg-PIA} \end{algorithm} \end{minipage} \end{figure} With policy iteration algorithm in mind, we can proceed with presenting the policy improvement theorem. \begin{theorem}[Policy improvement theorem]\label{thm-PIT} Suppose that we have obtained the value function resulting from the operation of a policy $A$ and that the policy improvement step has produced a policy $B$. \begin{itemize} \item If $B$ is different from $A$, $\theta^A\geq \theta^B$. \item When policy improvement step converges (i.e., $A$ and $B$ are equivalent), the converged policy is optimal. \end{itemize} \end{theorem} \begin{proof} The proof follows the steps presented in~\cite[pp.~42-43]{b18}. The complete proof can be found in Appendix~\ref{pf-PIT}. \end{proof} Before finding $\phi^*$, we first simplify the Bellman equation shown in \eqref{eq-Bellman} in the next subsection to make the process of finding $\phi^*$ more concise and straightforward. \subsection{Simplifying the Bellman Equation} We note that state transitions are complex and intertwined. Consequently, the direct analysis of the Bellman equation \eqref{eq-Bellman} is complicated. In the following, we will simplify the Bellman equation. To this end, we leverage the fact that the action space depends on the state space. More specifically, when the channel is busy (i.e., $i\neq-1$), the feasible action is $a=0$. Hence, the transmitter's actions at these states are fixed, which leads to the fact that for these states, the minimum operators in \eqref{eq-Bellman} are avoided. Let $\mathcal{S}_{-1}\triangleq\{s=(\Delta,t,i):i=-1\}$ be the set of states at which the channel is idle. Then, \[ V(s) + \theta = \min_{a\in\mathcal{A}}\left\lbrace C(s) + \sum_{s'\in\mathcal{S}}P_{s,s'}(a)V(s')\right\rbrace=C(s) + \sum_{s'\in\mathcal{S}}P_{s,s'}(0)V(s'),\quad s\in\mathcal{S}\setminus\mathcal{S}_{-1}. \] Then, for each $s\in\mathcal{S}_{-1}$, by repeatedly replacing $V(s)$, where $s\in\mathcal{S}\setminus\mathcal{S}_{-1}$, with its corresponding Bellman equation, we can obtain the Bellman equation consists only $V(s)$ where $s\in\mathcal{S}_{-1}$. We know that $s=(\Delta,0,-1)$ for $s\in\mathcal{S}_{-1}$. Hence, we abbreviate $V(\Delta,0,-1)$ as $V(\Delta)$. Then, we obtain the following Bellman equation. \begin{equation}\label{eq-CompactBellman} V(\Delta) +\theta = \min_{a\in\{0,1\}}\left\lbrace C(\Delta,a) - \theta(a) + \sum_{\Delta'\geq0}P_{\Delta,\Delta'}(a)V(\Delta')\right\rbrace,\quad \Delta\geq0, \end{equation} where \[ \theta(a)= \begin{dcases} 0 & a=0,\\ (ET-1)\theta & a=1. \end{dcases} \] Note that $ET$, $P_{\Delta',\Delta}(a)$, and $C(\Delta,a)$ are those defined and discussion in Section~\ref{sec-PolicyPerformance}. Hence, it is sufficient to use \eqref{eq-CompactBellman} instead of \eqref{eq-Bellman} to determine the optimal action at state $(\Delta,0,-1)$. Although equation \eqref{eq-CompactBellman} may seem complicated at first glance, its advantages will be fully demonstrated later in the following subsection. \subsection{Optimal Policy via Policy Iteration Algorithm} In this subsection, we find $\phi^*$ theoretically. To this end, we first introduce two conditions that are essential to the analysis later on. \begin{condition}\label{con} The condition is the following. \[ \bar{\Delta}_1\leq\min\left\lbrace\bar{\Delta}_0, \frac{1+(1-p)\sigma}{2}\right\rbrace, \] where, for \textbf{Assumption 1}, \[ \sigma = \ddfrac{\sum_{t=1}^{t_{max}}p_t\left(\frac{1-(1-p)^{t}}{p}\right)}{1-\sum_{t=1}^{t_{max}}pp_t(1-p)^{t-1}}, \] and for \textbf{Assumption 2}, \[ \sigma = \ddfrac{\sum_{t=1}^{t_{max}}p_t\left(\frac{1-(1-p)^t}{p}\right) + p_{t^+}\left(\frac{1-(1-p)^{t_{max}}}{p}\right)}{1-\left(\sum_{t=1}^{t_{max}}pp_t(1-p)^{t-1} + p_{t^+}(1-p)^{t_{max}}\right)}. \] $\bar{\Delta}_0$ and $\bar{\Delta}_1$ are the expected AoII resulting from the adoption of the threshold policy with $\tau=0$ and $\tau=1$, respectively. \end{condition} \begin{theorem}\label{thm-optimalpolicy} Under Condition~\ref{con}, the optimal policy for $\mathcal{M}$ is the threshold policy with $\tau=1$. \end{theorem} \begin{proof} The value iteration algorithm detail in Section~\ref{sec-VIA} provides us with a good guess on the optimal policy. Then, we theoretically prove its optimality using the policy improvement theorem. The general procedure for the optimality proof can be summarized as follows. \begin{enumerate} \item \textit{Policy Evaluation}: We calculate the value function resulting from the adoption of the threshold policy with $\tau=1$. \item \textit{Policy Improvement}: We apply the value functions obtained in the previous step to Bellman equation and verify that the resulting policy remains the same. \end{enumerate} Then, the policy improvement theorem tells us that the resulting policy is optimal. The complete proof can be found in Appendix~\ref{pf-optimalpolicy}. \end{proof} \begin{remark} Note that Condition~\ref{con} is a sufficient condition for the threshold policy with $\tau=1$ to be optimal, but not a necessary condition. \end{remark} \begin{remark} When the system fails to satisfy Condition~\ref{con}, we can use the value iteration algorithm introduced in Section~\ref{sec-VIA} to obtain a good estimate of $\phi^*$. \end{remark} \section{Numerical Results}\label{sec-NumericalResults} In this section, we numerically verify Condition~\ref{con} and analyze the performance of the optimal policy. \subsection{Verification of Condition~\ref{con}}\label{sec-Verification} As the closed-form expressions of $\bar{\Delta}_0$ and $\bar{\Delta}_1$ are given in Section~\ref{sec-PolicyPerformance}, the inequality in Condition~\ref{con} is easy to verify. We numerically verify Condition~\ref{con} for the following systems. \begin{itemize} \item System adopts \textbf{Assumption 1}/\textbf{Assumption 2} and Geometric transmission delay with success probability $p_s$. More precisely, $p_t = (1-p_s)^{t-1}p_s$. \item System adopts \textbf{Assumption 1} and the transmission delay follows the Zipf distribution with constant $a$. More precisely, $p_t = \frac{t^{-a}}{\sum_{i=1}^{t_{max}}i^{-a}},\ 1\leq t\leq t_{max}$. \item System adopts \textbf{Assumption 1} and $p_t = \frac{1}{2}(\mathbbm{1}\{t=1\} + \mathbbm{1}\{t=t_{max}\})$. \end{itemize} For each of the above systems, the parameters take the following values. \begin{itemize} \item $0.05\leq p\leq 0.45$ with step size being equal to $0.05$. \item $2\leq t_{max}\leq 15$ with step size being equal to $1$. \item $0\leq p_s\leq 0.95$ with step size being equal to $0.05$. \item $0\leq a\leq 5$ with step size being equal to $0.25$. \end{itemize} The numerical results show that all the systems mentioned above satisfy Condition~\ref{con}. Then, we can conclude that the corresponding optimal policy is the threshold policy with $\tau=1$, the performance of which is presented in the next subsection. \begin{remark} Zipf distribution reduces to Uniform distribution when $a = 0$, and Geometric transmission delay reduces to deterministic transmission delay when $p_s = 0$. We ignore the case of $p=0$ because the dynamic source does not change state in this case. Similarly, we are not interested in the case of $p=0.5$ because the state of the dynamic source is independent of the previous state in this case. Also, we exclude the case of $p_s=1$ because, in this case, the transmission time is deterministic and equal to $1$ time slot. \end{remark} \subsection{Optimal Policy Performance}\label{sec-Performance} In this subsection, we analyze the performance of the optimal policy. To this end, we consider the system where the transmission delay follows a Geometric distribution with success probability $p_s$. Moreover, we compare the performance of the optimal policy with that of the threshold policies with $\tau=0$ and $\tau=\infty$. All the results are calculated using Section~\ref{sec-PolicyPerformance}. \paragraph{The effect of $p$} In this case, we fix $t_{max}=5$ and $p_s=0.7$. Then, we vary $p$ and plot the corresponding results in Fig.~\ref{fig-p}. In the figure, to better show the performance of the optimal policy, we only show parts of the results for the threshold policy with $\tau=\infty$. We notice that, as $p$ increases, the expected AoIIs achieved by the threshold policies with $\tau=0$ and $\tau=1$ increase. This is because when $p$ is large, the dynamic sources will be inclined to switch between states. Therefore, the state of the dynamic source is more unpredictable, leading to an increase in the achieved expected AoIIs. Meanwhile, the expected AoII achieved by the threshold policy with $\tau=\infty$ decreases as $p$ increases. To explain this, we first recall that, under the threshold policy with $\tau=\infty$, the receiver's estimate will not change. Also, when $p$ is large, the dynamic source will switch states frequently. Therefore, the probability of a situation where the receiver's estimate is always incorrect is small, which makes the resulting AoII small. Also, we notice that \textbf{Assumption 1} and \textbf{Assumption 2} lead to almost the same performance. To explain this, we first note that the only difference between \textbf{Assumption 1} and \textbf{Assumption 2} is whether the update is delivered or discarded when the transmission lasts to the $t_{max}$th time slot after the transmission starts. However, under our choices of $p_s$ and $t_{max}$, the transmission time of an update rarely reaches $t_{max}$ time slots. Even if it reaches $t_{max}$ time slots, delivery or discard does not significantly impact the performance, as the receiver's estimate can be correct or incorrect regardless of whether the update is delivered. Therefore, \textbf{Assumption 1} and \textbf{Assumption 2} yield almost the same performance. \begin{figure*} \centering \begin{subfigure}{3in} \centering \includegraphics[width=3in]{Figure/Performance_p_Ass1.pdf} \caption{Performance under \textbf{Assumption 1}.} \label{fig-pAss1} \end{subfigure}\hfill \begin{subfigure}{3in} \centering \includegraphics[width=3in]{Figure/Performance_p_Ass2.pdf} \caption{Performance under \textbf{Assumption 2}.} \label{fig-pAss2} \end{subfigure}\hfill \caption{Illustrations of the expected AoII in the function of $p$ and $\tau$. We set the upper limit on the transmission time $t_{max}=5$ and the success probability in Geometric distribution $p_s = 0.7$.} \label{fig-p} \end{figure*} \paragraph{The effect of $p_s$} In this case, we fix $t_{max}=5$ and $p=0.35$. Then, we vary $p_s$ and plot the corresponding results in Fig.~\ref{fig-ps}. The figure shows that the expected AoIIs achieved by the threshold policies with $\tau=0$ and $\tau=1$ decrease as $p_s$ increases. The reason behind this is as follows. As $p_s$ increases, the expected transmission time of an update decreases, meaning that updates are more likely to be delivered within the first few time slots. As a result, the receiver receives fresher information, and thus the expected AoII decreases. Moreover, the performance gap between the threshold policies with $\tau=1$ and $\tau=0$ is small when $p_s$ is large. To explain this, we notice that the gap exists because the updates transmitted when AoII is zero do not provide new information to the receiver. Meanwhile, the transmission will occupy the channel for a few time slots. Therefore, such action deprives the transmitter of the ability to send new updates for the next few time slots without providing the receiver with any new information. Hence, when $p_s$ is large, the expected transmission time of the update is small. Consequently, the transmission when AoII is zero becomes less costly. Hence, the gap narrows. \begin{figure*} \centering \begin{subfigure}{3in} \centering \includegraphics[width=3in]{Figure/Performance_ps_Ass1.pdf} \caption{Performance under \textbf{Assumption 1}.} \label{fig-psAss1} \end{subfigure}\hfill \begin{subfigure}{3in} \centering \includegraphics[width=3in]{Figure/Performance_ps_Ass2.pdf} \caption{Performance under \textbf{Assumption 2}.} \label{fig-psAss2} \end{subfigure}\hfill \caption{Illustrations of the expected AoII in the function of $p_s$ and $\tau$. We set the upper limit on the transmission time $t_{max}=5$ and the source dynamic $p = 0.35$.} \label{fig-ps} \end{figure*} \paragraph{The effect of $t_{max}$} In this case, we fix $p_s=0.7$ and $p=0.35$. Then, we vary $t_{max}$ and plot the corresponding results in Fig.~\ref{fig-tmax}. From the figure, we can see that the effect of $t_{max}$ on the performances of the policies is only noticeable when $t_{max}$ is small. This is because, under our choice of $p_s$, most updates will be delivered within the first few time slots. Therefore, increasing $t_{max}$ will not significantly affect the performance. \begin{figure*} \centering \begin{subfigure}{3in} \centering \includegraphics[width=3in]{Figure/Performance_tmax_Ass1.pdf} \caption{Performance under \textbf{Assumption 1}.} \label{fig-tmaxAss1} \end{subfigure}\hfill \begin{subfigure}{3in} \centering \includegraphics[width=3in]{Figure/Performance_tmax_Ass2.pdf} \caption{Performance under \textbf{Assumption 1}.} \label{fig-tmaxAss2} \end{subfigure}\hfill \caption{Illustrations of the expected AoII in the function of $t_{max}$ and $\tau$. We set the success probability in Geometric distribution $p_s = 0.7$ and the source dynamic $p = 0.35$.} \label{fig-tmax} \end{figure*} \section{Conclusion} In this paper, we investigate the problem of minimizing the Age of Incorrect Information over a channel with random delay. We study a slotted-time system where a transmitter observes a dynamic source and sends updates to a remote receiver through a channel with random delay. To facilitate the analysis, we consider two cases. The first case assumes that the transmission time has an upper bound and that the update will always be delivered. The second case assumes that the system automatically discards updates when transmission lasts too long. We aim to find when the transmitter should initiate transmission to minimize the AoII. To this end, we first characterize the optimization problem using the Markov decision process and calculate the expected AoII achieved by the threshold policy precisely using the Markov chain. Next, we prove that the optimal policy exists, and the relative value iteration algorithm is provided to estimate the optimal policy. Then, with the help of the policy improvement theorem, we prove that, under Condition~\ref{con}, the optimal policy is the threshold policy with $\tau=1$. Finally, we numerically verify Condition~\ref{con} for various system parameters and analyze the performance of the optimal policy. \bibliographystyle{IEEEtran}
{'timestamp': '2023-01-19T02:04:26', 'yymm': '2301', 'arxiv_id': '2301.06150', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06150'}
arxiv
\section{Introduction} \label{sec:intro} AI systems are frequently used in combination with human decision-makers, including in high-stakes settings like healthcare \citep{beede2020human}. In these scenarios, machine learning predictors should be able to defer to a human expert instead of predicting on difficult or unfamiliar examples. However, when AI systems are used to provide a \emph{second opinion} to the human, prior work shows that humans over-rely on the AI when it is incorrect \citep{jacobs2021machine,mozannar2021teaching}, and these systems rarely achieve performance higher than either the human or AI alone \citep[Proposition 1]{liu2021understanding}. This motivates deferral-style systems, where \emph{either} the classifier or the human predicts, to avoid over-reliance. As a motivating example, suppose we want to build an AI system to predict the presence of pneumonia from a patient's chest X-ray, jointly with an human radiologist. The goal in this work is to jointly learn a classifier that can predict pneumonia and a \textit{rejector}, which decides on each data point whether the classifier or the human should predict. By learning the classifier jointly with the rejector, the aim is for the classifier to \emph{complement} the radiologist so that the Human-AI team performance is higher. We refer to the error rate of the Human-AI team as the \emph{system error}. \textbf{Failure of Prior Approaches.} Existing literature has focused on \emph{surrogate loss functions} for deferral \citep{madras2018predict,mozannar2020consistent, verma2022calibrated} and confidence based approaches \citep{raghu2019algorithmic,okati2021differentiable}. We give a simple synthetic setting where all of these approaches fail to find a classifier/rejector pair with low system error. In this setting, there exists a halfspace classifier and halfspace rejector that have zero system error (illustrated in Figure \ref{fig:expert_gauss}), but our experiments in Section \ref{sec:exp_synthetic} demonstrate that all prior approaches fail to find a good classifier/rejector pair in this setting. To understand possible reasons for this failure, we first study the \textbf{computational complexity} of learning with deferral using halfspaces for the rejector and the classifier, which we call LWD-H. The computational complexity of learning with deferral has received little attention in the literature. We prove that even in our simple setting where the data is realizable (i.e., there exists a halfspace classifier and halfspace rejector achieving zero system error), there is no polynomial-time algorithm that finds an approximately optimal pair of halfspaces unless $NP=RP$. We also extend our hardness result to approximation algorithms and when the data is not realizable by halfspaces. In contrast, training a linear classifier in the realizable linear setting can be solved in polynomial time with linear programming \citep{boyd2004convex}. Learning with deferral using halfspaces is also of significant \emph{practical} importance. Sample efficiency is critical in learning with deferral since the training data is expensive to collect---it requires both human outputs \emph{and} ground-truth labels. This motivates restricting to smaller model classes, and in particular to linear classifiers and rejectors. Linear models have the benefit of being interpretable with respect to the underlying features, which can be crucial for a human-AI deferral system. Additionally, the \emph{head tuning} or \emph{linear probing} paradigm, where only the final (linear) layer of a pretrained deep neural network is fine-tuned on different tasks, has become increasingly common as pretrained representations improve in quality, and it can be more robust than full fine-tuning \citep{kumar2021fine}. However, as previously mentioned, existing surrogate approaches fail to find a good linear classifier and rejector even when one is guaranteed to exist. This motivates the need for an algorithm for {\bf exact minimization} of the system training error. We show that exact minimization of the system error can be formulated as a \textbf{mixed integer linear program} (MILP). This derivation overcomes a naive quadratic formulation of the problem. In addition to exactly minimizing the training loss, the MILP formulation allows us to easily incorporate constraints to govern the human-AI system. We show that modern commercial solvers such as Gurobi \citep{gurobi} are capable of solving fairly large instances of this MILP, making it a practical algorithm for the LWD-H problem. To obtain similar gains over prior approaches, but with a more scalable algorithm, we develop a new differentiable surrogate loss function $L_{RS}$, dubbed \textbf{\texttt{RealizableSurrogate} }, that can solve the LWD-H problem in the realizable setting by virtue of being \textit{realizable-consistent} \citep{long2013consistency} for a large class of hypothesis sets that includes halfspace classifier/rejector pairs. We also show empirically that $L_{RS}$ is competitive with prior work in the non-linear setting. In section \ref{sec:problem}, we formalize the learning with deferral problem. We then study the computational complexity of LWD-H in section \ref{sec:linear_case}. We introduce our MILP approach in section \ref{sec:milp} and our new surrogate \textbf{\texttt{RealizableSurrogate}} in section \ref{sec:new_method}. In section \ref{sec:experiments}, we evaluate our algorithms and baselines on a wide range of benchmarks in different domains, providing the most expansive evaluation of expert deferral algorithms to date. To summarize, the contributions of this paper are the following: \begin{itemize} \setlength\itemsep{0em} \item \textbf{Computational Complexity of Deferral:} We prove the computational hardness of PAC-learning with deferral in the linear setting. \item \textbf{Mixed Integer Linear Program Formulation and \texttt{RealizableSurrogate} :} We show how to formulate learning to defer with halfspaces as a MILP and provide a novel surrogate loss. \item \textbf{Experimental Evaluation:} We showcase the performance of our algorithms on a wide array of datasets and compare them to several existing baselines. We contribute a publicly available repository with implementations of existing baselines and datasets: \url{https://github.com/clinicalml/human_ai_deferral} \end{itemize} \section{Related Work}\label{sec:related_work} A natural baseline for the learning to defer problem is to first learn a classifier that minimizes average misclassification error, then learn a model that predicts the probability that the human makes an error on a given example, and finally defer if the probability that the classifier makes an error is higher than that of the human. This is the approach adapted by \citet{raghu2019algorithmic}. However, this does not allow the classifier to adapt to the human. Another natural approach is to model this problem as a mixture of experts: the human and the AI. This is the approach introduced by \citet{madras2018predict} and adapted by \citet{wilder2020learning,pradier2021preferential} by introducing mixture of experts surrogates. However, this approach has been to shown to fail empirically as the loss is not easily amenable to optimization. Subsequent work \citep{mozannar2020consistent} introduced consistent surrogate loss functions for the learning with deferral objective, with follow-up approaches addressing limitations including better calibration \citep{raman2021improving,liu2021incorporating}. Another consistent convex surrogate was proposed by \citet{verma2022calibrated} via a one-vs-all approach. \citet{charusaie2022sample} provides a family of convex surrogates for learning with deferral that generalize prior approaches, however, our proposed surrogate does not belong to that family. \citet{keswani2021towards} proposes a surrogate loss which is the sum of the loss of learning the classifier and rejector separately but that is not a consistent surrogate. \citet{de2020regression} proved hardness of linear regression (not classification) where some training points are allocated to the human (not deferral but subset selection of the training data). Finally, \citet{okati2021differentiable} proposes a method that iteratively optimizes the classifier on points where it outperforms the human on the training sample, and then learns a post-hoc rejector to predict who between the human and the AI has higher error on each point. \looseness=-1 The setting when the cost of deferral is constant, has a long history in machine learning and goes by the name of rejection learning \citep{cortes2016learning, chow1970optimum,bartlett2008classification,charoenphakdee2021classification} or selective classification (only predict on $x$\% of data) \citep{el2010foundations,geifman2017selective,gangrade2021selective,acar2020budget}. Our MILP formulation is inspired by work in binary linear classification that optimizes the 0-1 loss exactly \citep{ustun2016supersparse,nguyen2013algorithms}. \section{Learning with Deferral: Problem Setup}\label{sec:problem} We frame the learning with deferral setting as the task of predicting a target $Y \in \mathcal{Y}=\{1,\cdots,C\}$. The classifier has access to features $X \in \mathcal{X} = \mathbb{R}^d$, while the human (also referred to as the expert) has access to a potentially different set of features $Z \in \mathcal{Z}$ which may include side-information beyond $X$. The human is modeled as a fixed predictor $h: \mathcal{Z} \to \mathcal{Y}$. The AI system consists of a classifier $m: \mathcal{X} \to \mathcal{Y}$ and a rejector $r: \mathcal{X} \to \{0,1\}$. When $r(x)=1$, the prediction is deferred to the human and we incur a cost if the human makes an error, plus an additional, optional penalty term: $\ell_{\textrm{HUM}}(x,y,h) = \mathbb{I}_{h \neq y} + c_{\textrm{HUM}}(x,y,h)$. When $r(x)=0$, then the classifier makes the final decision and incurs a cost with a different optional penalty term: $\ell_{\textrm{AI}}(x,y,m) = \mathbb{I}_{m \neq y} + c_{\textrm{AI}}(x,y,m)$. We can put this together into a loss function for the classifier and rejector: \begin{align} \nonumber &L_{\mathrm{def}}(m,r)= \mathbb{E}_{X, Y, Z} \ [ \ \ell_{\textrm{AI}}\big(X,Y,m(X)\big) \cdot \mathbb{I}_{r(X) = 0} + \ell_{\textrm{HUM}}(X,Y,h(Z)) \cdot \mathbb{I}_{r(X)=1} \ ]. \end{align} In this paper we focus mostly on the cost of misclassification with no additional penalties, the deferral loss becomes a misclassification loss $L_{\mathrm{def}}^{0{-}1}(m,r)$ for the human-AI system, and the optimization problem is: \begin{align} &\minimize_{m, r} L_{\mathrm{def}}^{0{-}1}(m,r) := \P \left[ \left( \left(1-r(X) \right)m(X) + r(X) h(Z) \right) \ne Y \right]. \label{eq:01_reject_loss} \end{align} \textbf{Constraints.} We may wish to constrain the behavior of the human-AI team when learning the classifier and rejector pair. For example, we may have a limit on the percentage of times the AI can defer to the human, due to the limited time the human may have. We express this as a \textbf{coverage} constraint: \begin{equation}\label{eq:coverage} \mathbb{P}(r(X) = 1 ) \leq \beta. \end{equation} Finally, it is desirable that our system not perform differently across different demographic groups. Let $A \in \{1,\cdots,|A|\}$ denote the demographic identity of an individual. Then if we wish to equalize the error rate across demographic groups, we impose the \textbf{fairness} constraint $\forall a \in A$: \begin{align}\label{eq:fairness} \nonumber &\mathbb{P}( (1-r(X))m(X) + r(X) h(Z) \ne Y |A\neq a) \\&= \mathbb{P}( (1-r(X))m(X) + r(X) h(Z) \ne Y |A=a) \end{align} \textbf{Data.} We assume access to samples $S=\{(x_i,h(z_i), y_i)\}_{i=1}^n$ where $h(z_i)$ is the human's prediction on the example, but note that we do not observe $z_i$, the information used by the human. We emphasize that the label $y_i$ and human prediction $h(z_i)$ are different, even though $y_i$ could also come from humans. For example in our chest X-ray classification example, $y_i$ could come from a consensus of 3 or more radiologists, while $h(z_i)$ is the prediction of a single radiologist not involved with the label. Given the dataset $S$ the system \emph{training loss} is given by: \begin{equation}\label{eq:training_loss} \hat{L}_{\mathrm{def}}^{0{-}1}(m,r) := \frac{1}{n}\sum_{i=1}^n\mathbb{I}_{m(x_i) \neq y_i} \mathbb{I}_{r(x_i) = 0} + \mathbb{I}_{h(z_i) \neq y_i}\mathbb{I}_{r(x_i)=1} \end{equation} In the following section, we study the computational complexity of learning with deferral using halfspaces, which reduces to studying the optimization problem \eqref{eq:training_loss} when $m$ and $r$ are constrained to be halfspaces. \section{Computational Complexity of Learning with Deferral }\label{sec:linear_case} The misclassification error of the human-AI team in equation \eqref{eq:01_reject_loss} is challenging to optimize as it requires searching over a joint set of functions for the classifier and rejector, in addition to dealing with the nonconvex $0$-$1$ aspect. To study the computational complexity of minimizing the loss, we restrict our attention to a foundational setting: linear classifiers and linear rejectors in the binary label scenario. We begin with the realizable case when there exists a halfspace classifier and rejector that can achieve zero loss: \begin{assumption}[Realizable Linear Setting]\label{ass:realizability} Let $\mathcal{X} = \mathbb{R}^d$ and $\mathcal{Y} = \{0,1\}$. We assume that for the given expert $h$ there exists a linear classifier $m^*(x) = \mathbb{I}_{M^\top x > 0}$ and a linear rejector $r^*(x) = \mathbb{I}_{ R^\top x >0}$ that achieve 0 error: \begin{equation*} \mathbb{E}_{(x,y,z)\sim \mathbf{P}} \ [ \ \mathbb{I}_{m^*(x) \neq y} \mathbb{I}_{r^*(x) = 0} + \mathbb{I}_{h(z) \neq y}\mathbb{I}_{r^*(x)=1} \ ] = 0. \end{equation*} \end{assumption} This setting is illustrated in Figure \ref{fig:expert_gauss}. Since the decision regions of $m$ and $r$ are halfspaces, we also use the term ``halfspace'' interchangeably. Note that while the classifier is assumed to be linear, the human can have a non-linear decision boundary. The analog of this assumption in the binary classification without deferral setting is to assume that there exists a halfspace that can correctly classify all the data points. In that case, we can formulate the optimization problem as a linear program to efficiently find the optimal solution \citep{boyd2004convex}. \textbf{Hardness.} \looseness=-1 In contrast to learning without deferral, we will prove that in general, it is computationally hard to learn a linear $m$ and $r$ under Assumption \ref{ass:realizability}. Define the \emph{learning with deferral using halfspaces} (LWD-H) problem as that of finding halfspace $m$ and halfspace $r$ such that the system error in \eqref{eq:01_reject_loss} is approximately minimized. \begin{theorem} \label{prop:hardness} Let $\epsilon > 0$ be an arbitrarily small constant. Under a guarantee that there exist halfspaces $m^*$, $r^*$ with zero system loss (Assumption \ref{ass:realizability}), there is no polynomial-time algorithm to find a pair of classifier-rejector halfspaces with error $1/2 -\epsilon$ unless $NP=RP$. \end{theorem} This shows that even in the realizable setting (i.e., there exists a pair of halfspaces with zero system loss), it is hard to find a pair of halfspaces that even gets system error $1/2-\epsilon$. \begin{corollary } There is no efficient proper PAC-learner for LWD-H unless $NP=RP$. \end{corollary } \begin{sproof} First, because the true distribution of points could be supported on a finite set, the LWD-H problem boils down to approximately minimizing the training loss \eqref{eq:training_loss}. Our proof relies on a reduction from the problem of learning an intersection of two halfspaces in the realizable setting. Let $D=\{x_i,y_i\}_{i=1}^n$ and suppose there exists an intersection of two half-spaces $g_1,g_2$ that achieve 0 error for $D$. This is an instance of learning an intersection of two halfspaces in the realizable setting, which is hard to even \emph{weakly} learn \citep{khot2011hardness}. We show that this is an instance of the realizable LWD-H problem by setting $m = g_1$ and $r=\bar{g_2}$ and the human $H$ to always predict 0. Hence, an algorithm for efficiently finding a classifier/rejector pair with error $\frac{1}{2}-\epsilon$ would also find an intersection of halfspaces with error $\frac{1}{2} - \epsilon$, which is hard unless $NP=RP$. \end{sproof} All proofs can be found in the Appendix. This hardness result holds in the realizable setting, with proper learning, and with no further assumptions on the data distribution. \textbf{Extensions.} Even if the problem is not realizable and the goal is to find an approximation algorithm, this is still computationally hard as presented in the following corollary. \begin{corollary }\label{th:hardness_extension} When the data is not realizable (i.e., Assumption \ref{ass:realizability} is violated), there is no polytime algorithm for finding a pair of halfspaces with error $\frac{1}{2} - \epsilon$ unless $NP=RP$. \end{corollary } \textbf{Exact Solution}. These hardness results motivate the need for new approaches to solving the LWD-H problem. In the next section, we derive a scheme to exactly minimize the misclassification error of the human/AI system using mixed-integer linear programming (MILP). \section{Mixed Integer Linear Program Formulation}\label{sec:milp} In the previous section, we saw that in the linear setting it is computationally hard to learn an optimal classifier and rejector pair. As discussed in Section \ref{sec:intro}, we are interested in the linear setting due to the cost of labeling large datasets for learning with deferral. Linear predictors can perform similar to non-linear predictors in applications involving high-dimensional medical data \citep{razavian2015population}. Moreover, we can rely on pre-trained representations, which can allow linear predictors on top of embedded representations to attain performance comparable to non-linear predictors \citep{bengio2013representation}. \textbf{A First Formulation.} As a first step, we write down a mixed integer \emph{nonlinear} program for the optimization of the training loss $\hat{L}_{\mathrm{def}}^{0{-}1}$ in \eqref{eq:training_loss} over linear classifiers and linear rejectors with binary labels. For simplicity, let $\mathcal{Y} = \{-1,+1\}$. A direct translation of \eqref{eq:training_loss} with halfspace classifiers and rejectors yields the following: \begin{align} &M^*, R^*, \cdot = \altargmin_{M,R,m_i,r_i} \sum_{i=1}^n (1-r_i) \mathbb{I}_{m_i \neq y_i} + r_i \mathbb{I}_{h_i \neq y_i} \\ \label{eq:constraint_trivial_mip} & \text{s.t.} \quad m_i = \textrm{sign}(M^\top x_i), \ \ r_i = \mathbb{I}_{R^\top x_i \geq 0} \ \forall i \in [n], \\ & \quad M \in \mathbb{R}^d, R \in \mathbb{R}^d. \nonumber \end{align} The variables $m_i$ and $r_i$ are simply the binary outputs of the classifier and rejector. We observe that the objective involves a quadratic interaction between the classifier and rejector. Furthermore, the constraints \eqref{eq:constraint_trivial_mip} are indicator constraints that are difficult to optimize. \textbf{Making Objective Linear.} We observe that since the $r_i$'s are binary, the term $(1-r_i) \mathbb{I}_{m_i \neq y_i}$ can be equivalently rewritten as $\max(0,\mathbb{I}_{m_i \neq y_i} - r_i)$. This is a crucial simplification that avoids having a mixed integer quadratic program. Below we use this to create a binary variable $t_i = \mathbb{I}_{m_i \neq y_i}$ representing the error of the classifier and a second \emph{continuous} variable $\phi_i$ that upper bounds $\max(0,t_i - r_i)$ and represents the classifier error after accounting for deferral. \textbf{Making Constraints Linear.} Constraints \eqref{eq:constraint_trivial_mip} make sure that the binary variables $r_i$ and $m_i$ are the predictions of half-spaces $R$ and $M$ respectively. As mentioned above, we will formulate the problem using the classifier error variables $t_i$ instead of the classifier predictions $m_i$. To reformulate constraints \eqref{eq:constraint_trivial_mip} in a linear fashion, we have to make assumptions on the optimal $M$ and $R$: \begin{assumption}[Margin] \label{ass: margin} The optimal solution $(M,R)$ that minimizes the training loss \eqref{eq:training_loss} has margin and is bounded, meaning that $(M, R)$ satisfy the following for all $i \in [n]$ in the training set and some $\gamma_m, \gamma_r, K_m,$ $K_r > 0$: \begin{equation}\label{eq:margin_norm_bounds} \resizebox{0.43\textwidth}{!}{ $\gamma_m \leq |M^\top x_i| \leq K_m - \gamma_m, \ \gamma_r \leq |R^\top x_i| \leq K_r - \gamma_r$} \end{equation} \end{assumption} A similar assumption is made in \citep{ustun2016supersparse}. The upper bounds in \eqref{eq:margin_norm_bounds} are often naturally satisfied as we usually deal with bounded feature sets $\mathcal{X}$ such that we can normalize $x_i$ to have unit norm, and the norms of $M$ and $R$ are constrained for regularization. \iffalse \textbf{Mixed Integer Linear Program.} With the above ingredients and taking inspiration from the big-M approach of \citet{ustun2016supersparse}, we can write down the resulting mixed integer linear program (MILP): \begin{subequations} \begin{empheq}[box=\fbox]{align} \nonumber &M^*, R^*, \dots =\\& \altargmin_{M,R,\{r_i\},\{t_i\},\{\phi_i\}} \sum_{i} \phi_i + r_i \mathbb{I}_{h_i \neq y_i}, \ s.t. \\ & \phi_i \geq t_i - r_i, \qquad \phi_i \geq 0 \quad \forall i \in [n] \label{eq:milp_obj}\\ & K_m t_i \geq \gamma_m - y_i M^\top x_i \quad \forall i \in [n] \label{eq:H_constraint_milp_bin}\\ & R^{\top} x_i \leq K_r r_i + \gamma_r (r_i - 1) , \\& R^{\top} x_i \geq K_r (r_i - 1) + \gamma_r r_i \label{eqn:MILP_RLB} \quad \forall i \in [n]\\ & r_i \in \{0,1\}, t_i \in \{0,1\}, \\& \phi_i \in \mathbb{R}^+ \quad \forall i \in [n], \ M,R \in \mathbb{R}^d \label{eq:mil_last_cst} \end{empheq} \end{subequations} \fi \textbf{Mixed Integer Linear Program.} With the above ingredients and taking inspiration from the big-M approach of \citet{ustun2016supersparse}, we can write down the resulting mixed integer linear program (MILP): \begingroup \allowdisplaybreaks \begin{empheq}[box=\mymath]{align} \nonumber &M^*, R^*, \dots =\\& \altargmin_{M,R,\{r_i\},\{t_i\},\{\phi_i\}} \sum_{i} \phi_i + r_i \mathbb{I}_{h_i \neq y_i}, \ s.t. \\ & \phi_i \geq t_i - r_i, \qquad \phi_i \geq 0 \quad \forall i \in [n] \label{eq:milp_obj}\\ & K_m t_i \geq \gamma_m - y_i M^\top x_i \quad \forall i \in [n] \label{eq:H_constraint_milp_bin}\\ & R^{\top} x_i \leq K_r r_i + \gamma_r (r_i - 1) , \\& R^{\top} x_i \geq K_r (r_i - 1) + \gamma_r r_i \label{eqn:MILP_RLB} \quad \forall i \in [n]\\ & r_i \in \{0,1\}, t_i \in \{0,1\}, \\& \phi_i \in \mathbb{R}^+ \quad \forall i \in [n], \ M,R \in \mathbb{R}^d \label{eq:mil_last_cst} \end{empheq} \endgroup Please see Figure \ref{fig:expert_gauss} for a graphical illustration of the variables. We show that constraints \eqref{eqn:MILP_RLB} function as intended; the rest of the constraints are verified in the Appendix. When $r_i=0$, then we have the constraints $ R^{\top} x_i \leq - \gamma_r$ and $R^{\top} x_i \geq -K_r$: this correctly forces the rejector to be negative. When $r_i=1$, we have $R^{\top} x_i \geq \gamma_r$ and $R^{\top} x_i \leq K_r$: which means the rejector is positive. Note that we do not need to know the margin $\gamma_r$ exactly, only a lower bound $\gamma$, $0<\gamma \leq \gamma_r$; the formulation is still correct with $\gamma$ in place of $\gamma_r$. However, we cannot set $\gamma = 0$ as then the trivial solution $R=0$ is feasible and the constraint is void. The same statements apply to $\gamma_m$. This MILP has $2n$ binary variables, $n + 2d$ continuous variables and $4n$ constraints. Finally, note that the MILP minimizes the 0-1 error even when Assumption \ref{ass:realizability} is violated. \textbf{Regularization and Extension to Multiclass.} We can add $l_1$ regularization to our model by adding the $l_1$ norm of both $M$ and $R$ to the objective. This is done by defining two sets of variables constrained to be the $l_1$ norm of the classifier and rejector and adding their values to the objective in \eqref{eq:milp_obj}. Adding regularization can help prevent the MILP solution from overfitting to the training data. The above MILP only applies to binary labels, but can be generalized to the multi-class setting where $\mathcal{Y} = \{1,\cdots, C\}$ (see Appendix). \textbf{Generalization Bound.} Under Assumption \ref{ass: margin} and non-realizability, assume $\lVert x_i \rVert_1 \leq 1$ and constrain the search of the MILP to $M$ and $R$ with infinity norms of at most $K_m$ and $K_r$ respectively. We can relate the performance of MILP solution on the training set to the population 0-1 error. \begin{proposition} For any expert $h$ and data distribution $\mathbf{P}$ over $\mathcal{X} \times \mathcal{Y}$ that satisfies Assumption \ref{ass: margin}, let $0<\delta<\frac{1}{2}$. Then with probability at least $1-\delta$, the following holds for the empirical minimizers $(\hat{m}^*,\hat{r}^*)$ obtained by the MILP: \begin{align*} &L_{0{-}1}(\hat{m}^*,\hat{r}^*) \leq \hat{L}_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) \\&+ \frac{(K_m + K_r) d \sqrt{2 \log d} + 10 \sqrt{\log(2/\delta)}}{\sqrt{n \mathbb{P}(h(Z) \neq Y)}}. \end{align*} \end{proposition} This bound improves on surrogate optimization since the MILP will achieve a lower training error, $\hat{L}_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*)$, than the surrogate, which optimizes a different objective. \textbf{Adding Constraints.} A major advantage of the MILP formulation is that it allows us to provably integrate any linear constraints on the variables with ease. For example, the constraints mentioned in Section \ref{sec:problem} can be added to the MILP as follows in a single constraint: \begin{itemize} \item Coverage: $\sum_i r_i /n \leq \beta$ \item Fairness: $\sum_{i: A=1} \bigl(\phi_i + r_i \mathbb{I}_{h_i \neq y_i}\bigr) / \lvert\{i: A=1\}\rvert = \sum_{i: A=0} \bigl(\phi_i + r_i \mathbb{I}_{h_i \neq y_i}\bigr) / \lvert\{i: A=0\}\rvert $. \end{itemize} So far, we have provided an exact solution to the linear learning to defer problem. However, the MILP requires significant computational time to find an exact solution for large datasets. Moreover, we might need a non-linear classifier or rejector to achieve good error. The remaining questions are (i) how to efficiently find a good pair of halfspaces for large datasets and (ii) how to generalize to non-linear predictors. In the following section, we give a novel surrogate loss function that is optimal in the realizable LWD-H setting, performs well with non-linear predictors, and can be efficiently minimized (to a local optimum). \section{Realizable Consistent Surrogate}\label{sec:new_method} \looseness=-1 Most of machine learning practice is based on optimizing surrogate loss functions of the true loss that one cares about. The surrogate loss functions are chosen so that optimizing them also optimizes the true loss functions, and also chosen to be differentiable so that they are readily optimized. This first property is captured by the notion of \emph{consistency}, which was the main focus of much of the prior work on expert deferral: \citep{mozannar2020consistent,verma2022calibrated,charusaie2022sample}. We start by giving a formal definition of the consistency of a surrogate loss function: \begin{definition}[Consistency\footnote{This is also referred to as Fisher consistency \citep{lin2002support} and classification-calibration \citep{bartlett2006convexity}.}] A surrogate loss function $\Tilde{L}(m,r)$ is a consistent loss function for another loss $L_{\mathrm{def}}^{0{-}1}(m,r)$ if optimizing the surrogate over all measurable functions is equivalent to minimizing the original loss. \end{definition} For example, the surrogates $L_{CE}$ and $\Psi_{OvA}$ both satisfy consistency for $L_{\mathrm{def}}^{0{-}1}(m,r)$ \citep{mozannar2020consistent,verma2022calibrated}. It is crucial to note that consistency only applies when optimizing over \emph{all measurable functions}. Conversely, in LWD-H, and in the setting of Figure \ref{fig:expert_gauss}, when we optimize with linear functions, consistency does not provide any guarantees, which explains why these methods can fail in that setting. Since we normally optimize over a restricted model class, we want our guarantee for the surrogate to also hold for optimization under a certain model class. The notion of realizable $\mathcal{H}$-consistency is such a guarantee that has proven fruitful for classification \citep{long2013consistency,zhang2020bayes} and was extended by \citet{mozannar2020consistent} for learning with deferral. We recall the notion when extended for learning with deferral: \begin{definition}[realizable $(\mathcal{M},\mathcal{R})$-consistency] A surrogate loss function $\Tilde{L}(m,r)$ is a realizable $(\mathcal{M},\mathcal{R})$-consistent loss function for the loss $L_{\mathrm{def}}^{0{-}1}(m,r)$ if there exists a zero error solution $m^*,r^* \in \mathcal{M} \times \mathcal{R}$ with $L_{\mathrm{def}}^{0{-}1}(m^*,r^*)=0$. Then optimizing the surrogate returns such zero error solution: \begin{equation*} \tilde{m},\tilde{r} \in \arginf_{m,r \in \mathcal{M} \times \mathcal{R} } \Tilde{L}(m,r) \implies L_{\mathrm{def}}^{0{-}1}(\tilde{m},\tilde{r})=0 \end{equation*} \end{definition} Realizable $(\mathcal{M}, \mathcal{R})$-consistency guarantees that when our data comes from some ground-truth $m^*, r^* \in \mathcal{M} \times \mathcal{R}$, then minimizing the (population) surrogate loss will find an optimal $(m,r)$ pair. We propose a novel, differentiable, and $(\mathcal{M}, \mathcal{R})$-consistent surrogate for learning with deferral when $\mathcal{M}$ and $\mathcal{R}$ are \textit{closed under scaling}. \iffalse A class $\mathcal{H}$ is closed under scaling if $h \in \mathcal{H} \implies \alpha h \in \mathcal{H}$ for any $\alpha \in \mathbb{R}$. We parameterize our classifier with a set of functions from a class $\mathcal{G}$ where $g \in \mathcal{G}: \mathbb{R}^d \to \mathbb{R}$; an example is linear scoring functions where $g(x) = G^{\top}x$ and $G \in \mathbb{R}^d$. The class $\mathcal{G}$ can be arbitrary including, e.g., ReLU feedforward neural networks (FNN). Let $g_y: \mathcal{X} \to \mathbb{R}$ for $y \in \mathcal{Y}$ and define $m(x) = \arg \max_{y \in \mathcal{Y}}g_y$. Similarly let $g_\bot: \mathcal{X} \to \mathbb{R}$ and define $r(x)= \mathbb{I}_{\max_{y \in \mathcal{Y}}g_y(x) \leq g_\bot }$. The joint classifier-rejector model class $(\mathcal{M},\mathcal{R})$ is thus defined by the subclass $\mathcal{G}$, and we define $(\mathcal{M},\mathcal{R})$ to be closed under scaling if and only if $\mathcal{G}$ is closed under scaling. \fi A class $\mathcal{G}$ of scoring functions from $\mathcal{X}$ to $\mathbb{R}^C$ is closed under scaling if $\bm{g} \in \mathcal{G} \implies \alpha \bm{g} \in \mathcal{G}$ for any $\alpha \in \mathbb{R}$. For example, we can let $\mathcal{G}$ be the class of linear scoring functions $\bm{g}(x) = G^{\top}x$ and $G \in \mathbb{R}^{ d \times C}$. Our results hold for arbitrary $\mathcal{G}$ that are closed under scaling, e.g., ReLU feedforward neural networks (FNN). We parameterize the $(m,r)$ pair with $|\mathcal{Y}|+1$ dimensional scoring function $\bm{g}:(g_1,\ldots, g_{|\mathcal{Y}|}, g_\bot)$. We define $m(x) = \arg \max_{y \in \mathcal{Y}}g_y(x)$ and $r(x)= \mathbb{I}_{\max_{y \in \mathcal{Y}}g_y(x) \leq g_\bot(x) }$. The joint classifier-rejector model class $(\mathcal{M},\mathcal{R})$ is thus defined by $\mathcal{G}$, and we say $(\mathcal{M},\mathcal{R})$ is closed under scaling whenever $\mathcal{G}$ is closed under scaling. The proposed new surrogate loss $L_{RS}$, dubbed \emph{\texttt{RealizableSurrogate}}, is defined at each point $(x,y,h)$ as: \begin{empheq}[box=\mymath]{equation} L_{RS}(\mathbf{g},\cdot) = -2 \log\left(\frac{\exp(g_{y}(x)) + \mathbb{I}_{h = y} \exp(g_{\bot}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \right) \nonumber \end{empheq} \looseness=-1 Notice that when the human is incorrect, i.e. $\mathbb{I}_{h=y}=0$, the loss incentivizes the classifier to be correct, similar to cross entropy loss. However, when the human is correct, the learner has the \emph{choice} to either fit the target or defer: there is no penalty for choosing to do one or the other. This is what enables the classifier to complement the human and differentiates $L_{RS}$ from prior surrogates, such as $L_{CE}$ \citep{mozannar2020consistent}, that are not realizable-consistent (see Appendix) and penalize the learner for not fitting the target even when deferring. This property is showcased by the fact that our surrogate is realizable $(\mathcal{M},\mathcal{R})$-consistent for model classes that are closed under scaling. Moreover, it is an upper bound of the true loss $L_{\mathrm{def}}^{0{-}1}(m,r)$. The theorem below characterizes the properties of our novel surrogate function. \vspace{-0.13em} \begin{theorem} \label{thm:realizable-consistent} The \emph{\texttt{RealizableSurrogate}} $L_{RS}$ is a realizable $(\mathcal{M},\mathcal{R})$-consistent surrogate for $L_{\mathrm{def}}^{0{-}1}$ for model classes closed under scaling, and satisfies $L_{\mathrm{def}}^{0{-}1}(m,r) \le L_{RS}(m,r)$ for all $(m,r)$. \end{theorem} This theorem implies that when Assumption \ref{ass:realizability} is satisfied and $\mathcal{G}$ is the class of linear scoring functions, minimizing $L_{RS}$ yields a classifier-rejector pair with zero system error. The resulting classifier is the halfspace $\mathbb{I}((G_1-G_0)^\top x \geq 0)$ and the form of the rejector is $\mathbb{I}((G_{\bot}^\top x- \max(G_1^\top x,G_0^\top x)) \geq 0)$, which is an intersection of halfspaces. However, one can see that by setting $G_0 = 0$ and optimizing over only $G_1$ and $G_\bot$ we can recover a linear classifier and linear rejector; in practice we only do this when we explicitly want a linear rejector. \looseness=-1 The surrogate is differentiable but \emph{non}-convex in $\mathbf{g}$, though it is convex in each $g_i$. Indeed, a jointly convex surrogate that provably works in the realizable linear setting would contradict Theorem \ref{prop:hardness}. In practice, we observe that in the linear realizable setting, the local minima reached by gradient descent obtain zero training error despite the nonconvexity. The mixture-of-experts surrogate in \cite{madras2018predict} is realizable $(\mathcal{M},\mathcal{R})$-consistent, non-convex and not classification consistent as shown by \cite{mozannar2020consistent}, however, \cite{mozannar2020consistent} also showed that it leads to worse empirical results than simple baselines. We have not been able to prove or disprove that \texttt{RealizableSurrogate} is classification-consistent, unlike other surrogates like that of \citet{mozannar2020consistent}. It remains an open problem to find both a consistent \textbf{and} a realizable-consistent surrogate. \textbf{Underfitting the target.} Minimizing the proposed loss leads to a classifier that attempts to complement the human. One consequence is that the classifier might have high error on points that are deferred to the human, resulting in possibly high error across a large subset of the data domain. We can explicitly encourage the classifier to fit the target on all points by adding an extra term to the loss: \begin{empheq}[box=\mymath]{align} \label{eq:proposed_RS_loss+extemsopm} & \resizebox{0.48\textwidth}{!}{$L_{RS}^{\alpha}(\mathbf{g},x,y,h) = - \alpha \log\left(\frac{\exp(g_{y}(x) + \mathbb{I}_{h = y} \exp(g_{\bot}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \right)$} - (1-\alpha) \log\left(\frac{\exp(g_{y}(x)) }{\sum_{y' \in \mathcal{Y} }\exp(g_{y'}(x))} \right) \end{empheq} The new loss $L_{RS}^{\alpha}$ with $\alpha \in [0,1]$ (a hyperparameter) is a convex combination of $L_{RS}$ and the cross entropy loss for the classifier (with the softmax applied only over the functions $g_y$ rather than including $g_{\bot}$). Empirically, this allows the points that are deferred to the human to still help provide extra training signal to the classifier, which is useful for sample-efficiency when training complex, non-linear hypotheses. Finally, due to adding the parameter $\alpha$, the loss no longer remains realizable consistent, thus we let the rejector be $r(x) = \mathbb{I}_{g_{\bot}(x) - \max_y g_y(x) \geq \tau}$ and we learn $\tau$ with a line search to maximize system accuracy on a validation set. In the next section, we evaluate our approaches with an extensive empirical benchmark. \section{Experiments}\label{sec:experiments} \begin{table*}[t] \centering \caption{Datasets used for our benchmark for learning with deferral to humans. We note the total number of samples $n$, the target set size $|\mathcal{Y}|$, the number of tasks in each dataset (a task is a set of human and target labels), the human expert where 'random annotator' means that for each point we have multiple human annotations and we let the target be a consensus and the human label be a random sample while 'separate human annotation' means that the human label is completely separate from the label annotations and finally the model class for both the classifier and rejector.} \resizebox{1\textwidth}{!}{ \begin{tabular}{p{0.3 \textwidth}ccllp{0.4 \textwidth}} \toprule \textbf{Dataset} & $n$ & $\left| \mathcal{Y} \right|$ & \textbf{ Number of Tasks} & \textbf{Human} & \textbf{Model Class} \\ \toprule SyntheticData (ours) & arbitrary & 2 & 1 & synthetic &linear\\ CIFAR-K & 60k& 10 & 10 (per expert $k$) & synthetic (perfect on k classes) & CNN\\ \midrule CIFAR-10H \citep{battleday2020capturing} & 10k & 10 & 1 & separate human annotation & pretrained WideResNet \citep{zagoruyko2016wide} \\ Imagenet-16H \citep{kerrigan2021combining} & 1.2k & 16 & 4 (per noise version) & separate human annotation & pretrained DenseNet121 \citep{huang2017densely}, finetuning last layer only \\ HateSpeech \citep{davidson2017automated} & 25k & 3 & 1 & random annotator & FNN on embeddings from SBERT \citep{reimers2019sentence} \\ COMPASS \citep{dressel2018accuracy} & 1k & 2 & 1 & separate human annotation & linear\\ NIH Chest X-ray \citep{wang2017hospital,majkowska2020chest} & 4k & 2 & 4 (for different conditions) & random annotator& pretrained DenseNet121 on non-human labeled data \\ \bottomrule \end{tabular}} \label{tab:datasets} \end{table*} \subsection{Human-AI Deferral Benchmark} \textbf{Objective.} We investigate the empirical performance of our proposed approaches compared to prior baselines on a range of datasets. Specifically, we want to compare the accuracy of the human-AI team at the learned classifier-rejector pairs. We also check the accuracy of the system when we change the deferral policy by varying the threshold used for the rejector, this leads to an accuracy-coverage plot where \emph{coverage} is defined as the fraction of the test points where the classifier predicts. \textbf{Datasets.} In Table \ref{tab:datasets} we list the datasets used in our benchmark. We start with synthetic data described below, then semi-synthetic data with CIFAR-K \citep{mozannar2020consistent}. We then evaluate on 5 real world datasets with three image classification domains with multiple tasks per domain, a natural language domain and a tabular domain. Each dataset is randomly split 70-10-20 for training-validation-testing respectively. \textbf{Baselines.} We compare to multiple methods from the literature including: the confidence method from \citet{raghu2019algorithmic} (CompareConfidence), the surrogate $L_{CE}^\alpha$ from \citet{mozannar2020consistent} (CrossEntropySurrogate), the surrogate $\Psi_{\textrm{OvA}}$ from \citet{verma2022calibrated} (OvASurrogate), Diff-Triage from \citet{okati2021differentiable} (DifferentiableTriage), and finally a selective prediction baseline that thresholds classifier confidence for the rejector (SelectivePrediction). For all baselines and datasets, we train using Adam and use the same learning rate and number of training epochs to ensure an equal footing across baselines, each run is repeated for 5 trials with different dataset splits. We track the best model in terms of system accuracy on a validation set for each training epoch and return the best performing model. For \texttt{RealizableSurrogate} , we perform a hyperparameter search on the validation set over $\alpha \in [0,1]$, and do hyperparameter tuning over $L_{CE}^{\alpha}$. \begin{figure}[H] \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/cifar10h-2022-10-13_005144.pdf} \subcaption{CIFAR-10H} \end{subfigure}% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/broward_linear2022-10-12_014546.pdf} \subcaption{COMPASS} \end{subfigure} \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/hatespeech2022-10-11_090613.pdf} \subcaption{HateSpeech} \end{subfigure} \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/imagenet_110_2022-10-13_003646.pdf} \subcaption{ImageNet-16H} \end{subfigure} \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/Airspaceopacity2022-10-13_044316.pdf} \subcaption{ Chest X-ray - Airspace Opacity} \end{subfigure} \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/chextPneumothorax2022-10-13_044316.pdf} \subcaption{ Chest X-ray - Pneuomathorax} \end{subfigure} \caption{\looseness=-1 Accuracy vs coverage (fraction of points where classifier predicts) plots across the real world datasets showcasing the behavior of our method and the baselines. On each plot, we showcase the test accuracy of each method with a large marker, with the curve representing varying the rejector threshold on the test set. To achieve different levels of coverage, we sort the rejection score for each method on the test set and vary the threshold used, for \texttt{RealizableSurrogate} the rejector is defined as $r(x)=\mathbb{I}_{g_{\bot}(x) - \max_y g_y(x) \geq c}$ where the optimal solution is at $c=0$ and we vary $c \in \mathbb{R}$ to obtain the curve. } \label{fig:real_datasets} \end{figure} \subsection{Synthetic and Semi-Synthetic Data}\label{sec:exp_synthetic} \begin{figure}[H] \centering \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/plot_synth_data_realizable_2022-10-09_231910.pdf} \subcaption{Synthetic Data Sample Complexity} \label{fig:synthetic-res}% \end{subfigure}\hfill% \begin{subfigure}{0.5\textwidth} \centering \includegraphics[width=\textwidth]{figures/plot_cifark_2022-10-12_191344.pdf} \subcaption{CIFAR-K Semi-Synthetic} \label{fig:cifark-res}% \end{subfigure} \caption{(a) Test performance of the different methods on synthetic data as we increase the training data size and repeat the randomization over 10 trials to get standard errors. (b) Test performance on the semi-synthetic CIFAR-K dataset vs.~the number of classes $K$ for which the expert is perfect.} \vspace{-6mm} \label{fig:semi-and-synthetic_results} \end{figure} \textbf{Synthetic Data.} We create a set of synthetic data distributions that are realizable by linear functions (or nearly so) to benchmark our approach. For the input $X$, we set the dimension $d$, and experiment with two data distributions. (1) Uniform distribution: we draw points $X \sim \mathrm{Unif}(0,U)^d$ where $U \in \mathbb{R}^+$; (2) Mixture-of-Gaussians: we fix some $K \in \mathbb{N}$ and generate data from $K$ equally weighted Gaussians, each with random uniform means and variances. To obtain labels $Y$ that satisfy Assumption \ref{ass:realizability}, we generate two random halfspaces and denote one as the optimal classifier $m^*(x)$ and the other as the optimal rejector $r^*(x)$. We then set the labels $Y$ on the side where $r^*(x)=0$ to be consistent with $m^*(x)$ with probability $1-p_m$ and otherwise uniform. When $r^*(x)=1$, we sample the labels uniformly. Finally, we choose the human expert to have error $p_{h0} $ when $r^*(x)=0$ and have error $p_{h1}$ when $r^*(x)=1$. When $p_m=0, p_{h0} \in [0,1]$, and $p_{h1}=0$, this process generates datasets $D = \{x_i,y_i,h_i\}_{i=1}^n$ that satisfy Assumption \ref{ass:realizability}. \textbf{Sample Complexity.} \looseness=-1 For realizable data with a feature distribution that is mixture of Gaussians ($d=30$, $p_m=0, p_{h0}=0.3, p_{h1}=0$), Figure \ref{fig:synthetic-res} plots the test accuracy of the different methods on a held-out dataset of 5k points as we increase the training data size. We observe that MILP and \texttt{RealizableSurrogate} are able to get close to zero error, while all other methods fail at finding a near zero-error solution. We also experiment with non-realizable data. For example, when $p_m=0.1, p_{h0} =0.4, p_{h1}=0.1$ with $n=1000$, the optimal test error is $7.5 \pm 1.0 \%$ for the generated data: the MILP obtains $11.2$ error and \texttt{RealizableSurrogate} achieves $17.8 \pm 1.0$ error, while the best baseline CrossEntropySurrogate achieves $21.4 \pm 1.1$ error. In the Appendix, we show results on the uniform data distribution, which shows an identical pattern, and we study the run-time and performance of the MILP as we increase the error probabilities. \textbf{CIFAR-K.} We use the CIFAR-10 image classification dataset \citep{krizhevsky2009learning} and employ a simple convolution neural network (CNN) with three layers. We consider the human expert models from \citet{mozannar2020consistent,verma2022calibrated}: if the image is in the first $K$ classes the expert is perfect, otherwise the expert predicts randomly. Figure \ref{fig:cifark-res} shows the test accuracy of the different methods as we vary the expert strength $K$. \texttt{RealizableSurrogate} outperforms the second best method by 0.8\% on average and up to 2.8\% maximum showcasing that the method can perform well for non-linear predictors. \subsection{Realistic Data} \textbf{Models.} \looseness=-1 In Figure \ref{fig:real_datasets}, we showcase the test accuracy of the different baselines on the real datasets in Table \ref{tab:datasets}, and illustrate their behavior when we constrain our method and the baselines to achieve different levels of coverage. We can see that $L_{RS}^{\alpha}$ is competitive with the best baseline on each dataset/task. Moreover, we see that the human-AI team is often able to achieve performance that is higher than the human or classifier on their own. The methods often achieve peak performance at a coverage rate that is not at the extremes of [0,1], and on each of the six datasets we notice variability between the peak accuracy coverage rate indicating tat they are finding different solutions. This demonstrates that deferral using $L_{RS}^{\alpha}$ is able to achieve complementary human-AI team performance in practice. In summary, the new surrogate $L_{RS}$ performs as well as the MILP on synthetic data, and as well as all the baselines (or better) on real-world data. \paragraph{Recommendations: Which Method to Use?} Given our experimental results, the question to ask is which method should be used for a given dataset and model class. The simple and natural baseline of CompareConfidence should be the first tool one applies to their setting, it often achieves good performance, outperforming the naive baseline SelectivePrediction. However, CompareConfidence does not allow the classifier to adapt to the humans strengths and weaknesses. The surrogates CrossEntropySurrogate and OvASurrogate when applied with expressive model classes such as deep networks can find complementary classifiers. The surrogates offer other advantages, notably CrossEntropySurrogate has been shown to have better sample complexity over the CompareConfidence baseline, and can incorporate arbitrary costs of deferral and prediction \citep{mozannar2020consistent}. However, as our synthetic experiments have shown, there is a limit of the CrossEntropySurrogate and OvASurrogate surrogats to how much they can complement the human and defer accordingly. This is where our proposed methods MILPDefer and \texttt{RealizableSurrogate} come in. We recommend to use the MILP in settings with limited data where linear models are suitable as it can achieve optimal performance, however, one must carefully tune regularization parameters to not overfit. If the data is realizable, then the \texttt{RealizableSurrogate} is also optimal and is much more easy to optimize, one can apply the surrogate without knowing beforehand if the data is realizable. \texttt{RealizableSurrogate} works well with linear and non-linear model classes, and performs the best under model resource constraints, we recommend using it broadly when optimizing accuracy. \section{Conclusion} \looseness=-1 We have shown that properly learning halfspaces with deferral (LWD-H) is computationally hard and that existing approaches in the literature fail in this setting. Understanding the computational limits of learning to defer led to the design of a new exact algorithm (the MILP) and a new surrogate (\texttt{RealizableSurrogate}) that both obtain better empirical performance than existing surrogate approaches. Studying $(\mathcal{M},\mathcal{R})$-consistency in the non-realizable setting, obtaining conditions under which nonconvex surrogates like $L_{RS}$ can be provably and efficiently minimized, and considering \emph{online} versions of learning to defer are interesting directions for future work. As human-AI teams are deployed in real world decision-making scenarios, better and safer methods for training these systems are of critical interest. Giving the AI the power to allow the human to predict or not requires very careful optimization of the rejector so that we have favorable outcomes, this motivates the need for exact algorithms with guarantees. \subsubsection*{\bibname}} \title{\textbf{Who Should Predict? Exact Algorithms For Learning to Defer to Humans}} \pagestyle{fancy} \renewcommand{\headrulewidth}{0pt} \author[1,2]{Hussein Mozannar} \author[1,2]{Hunter Lang} \author[1,3]{Dennis Wei} \author[1,3]{Prasanna Sattigeri} \author[1,3]{Subhro Das} \author[1,2]{David Sontag} \affil[1]{MIT-IBM Watson AI Lab} \affil[2]{Massachusetts Institute of Technology} \affil[3]{IBM Research} \date{} \begin{document} \maketitle \begin{abstract} Automated AI classifiers should be able to defer the prediction to a human decision maker to ensure more accurate predictions. In this work, we jointly train a classifier with a \emph{rejector}, which decides on each data point whether the classifier or the human should predict. We show that prior approaches can fail to find a human-AI system with low misclassification error even when there exists a linear classifier and rejector that have zero error (the \emph{realizable} setting). We prove that obtaining a linear pair with low error is NP-hard even when the problem is realizable. To complement this negative result, we give a mixed-integer-linear-programming (MILP) formulation that can optimally solve the problem in the linear setting. However, the MILP only scales to moderately-sized problems. Therefore, we provide a novel surrogate loss function that is realizable-consistent and performs well empirically. We test our approaches on a comprehensive set of datasets and compare to a wide range of baselines. \end{abstract} \input{body} \section{Practitioner's guide to our approach}\label{apx:guide} \subsection{MILP} We implement the MILP \eqref{eq:milp_obj}-\eqref{eq:mil_last_cst} in the binary setting using the Gurobi Optimizer \cite{gurobi} in Python. \begin{python} class MILPDefer: def __init__(self, n_classes, time_limit=-1, add_regularization=False, lambda_reg=1, verbose=False): self.n_classes = n_classes self.time_limit = time_limit self.verbose = verbose self.add_regularization = add_regularization self.lambda_reg = lambda_reg def fit(self, dataloader_train, dataloader_val, dataloader_test): self.fit_binary(dataloader_train, dataloader_val, dataloader_test) def fit_binary(self, dataloader_train, dataloader_val, dataloader_test): data_x = dataloader_train.dataset.tensors[0] data_y = dataloader_train.dataset.tensors[1] human_predictions = dataloader_train.dataset.tensors[2] C = 1 gamma = 0.00001 Mi = C + gamma Ki = C + gamma max_data = len(data_x) hum_preds = 2*np.array(human_predictions) - 1 # add extra dimension to x data_x_original = torch.clone(data_x) norm_scale = max(torch.norm(data_x_original, p=1, dim=1)) last_time = time.time() # normalize data_x and then add dimension data_x = torch.cat((torch.ones((len(data_x)), 1), data_x/norm_scale), dim=1).numpy() data_y = 2*data_y - 1 # covert to 1, -1 max_data = max_data # len(data_x) dimension = data_x.shape[1] model = gp.Model("milp_deferral") model.Params.IntFeasTol = 1e-9 model.Params.MIPFocus = 0 if self.time_limit != -1: model.Params.TimeLimit = self.time_limit H = model.addVars(dimension, lb=[-C] * dimension, ub=[C]*dimension, name="H") Hnorm = model.addVars( dimension, lb=[0]*dimension, ub=[C]*dimension, name="Hnorm") Rnorm = model.addVars( dimension, lb=[0]*dimension, ub=[C]*dimension, name="Rnorm") R = model.addVars(dimension, lb=[-C] * dimension, ub=[C]*dimension, name="R") phii = model.addVars(max_data, vtype=gp.GRB.CONTINUOUS, lb=0) psii = model.addVars(max_data, vtype=gp.GRB.BINARY) ri = model.addVars(max_data, vtype=gp.GRB.BINARY) equal = np.array(data_y) == hum_preds * 1.0 human_err = 1-equal if self.add_regularization: model.setObjective(gp.quicksum([phii[i] + ri[i]*human_err[i] for i in range(max_data)])/max_data + self.lambda_reg * gp.quicksum( [Hnorm[j] for j in range(dimension)]) + self.lambda_reg * gp.quicksum([Rnorm[j] for j in range(dimension)])) else: model.setObjective(gp.quicksum( [phii[i] + ri[i]*human_err[i] for i in range(max_data)])/max_data) for i in range(max_data): model.addConstr(phii[i] >= psii[i] - ri[i], name="phii" + str(i)) model.addConstr(Mi*psii[i] >= gamma - data_y[i]*gp.quicksum( H[j] * data_x[i][j] for j in range(dimension)), name="psii" + str(i)) model.addConstr(gp.quicksum([R[j]*data_x[i][j] for j in range(dimension)]) >= Ki*( ri[i]-1) + gamma*ri[i], name="Riub" + str(i)) model.addConstr(gp.quicksum([R[j]*data_x[i][j] for j in range( dimension)]) <= Ki*ri[i] + gamma*(ri[i]-1), name="Rilb" + str(i)) model.update() if self.add_regularization: for j in range(dimension): model.addConstr(Hnorm[j] >= H[j], name="Hnorm1" + str(j)) model.addConstr(Hnorm[j] >= -H[j], name="Hnorm2" + str(j)) model.addConstr(Rnorm[j] >= R[j], name="Rnorm1" + str(j)) model.addConstr(Rnorm[j] >= -R[j], name="Rnorm2" + str(j)) model.ModelSense = 1 # minimize model._time = time.time() model._time0 = time.time() model._cur_obj = float('inf') # model.write('model.lp') if self.verbose: model.optimize() else: model.optimize() # check if halspace solution has 0 error error_v = 0 rejs = 0 for i in range(max_data): rej_raw = np.sum([R[j].X * data_x[i][j] for j in range(dimension)]) pred_raw = np.sum([H[j].X * data_x[i][j] for j in range(dimension)]) if rej_raw > 0: rejs += 1 error_v += (data_y[i] * hum_preds[i] != 1) else: pred = (pred_raw > 0) error_v += (data_y[i] != (2*pred-1)) self.H = [H[j].X for j in range(dimension)] self.R = [R[j].X for j in range(dimension)] self.run_time = model.Runtime self.norm_scale = norm_scale self.train_error = error_v/max_data \end{python} \subsection{Realizable Surrogate} We implement the \texttt{RealizableSurrogate} in PyTorch. We showcase the loss function $L_{RS}$ below: \begin{python} def realizable_surrogate_loss(outputs, human_is_correct, labels, lambdaa): ''' outputs (tensor): outputs of model with K+1 output heads (without softmax) human_is_correct (tensor): binary tensor indicating if human is correct on each point I_{h=y} labels (tensor): list of targets y_i lambdaa (float in [0,1]): trade-off parameter in loss return: loss (single tensor) ''' batch_size = outputs.size()[0] outputs_exp = torch.exp(outputs) rs_loss = -torch.log2(( m * outputs_exp[range(batch_size), -1] + outputs_exp[range(batch_size),labels] ) /(torch.sum(outputs_exp, dim = 1) +eps_cst )) ce_loss = -torch.log2(( outputs_exp[range(batch_size),labels] ) /(torch.sum(outputs_exp[range(batch_size),:-1], dim = 1) +eps_cst )) loss = lambdaa*rs_loss + (1-lambdaa)*ce_loss return torch.sum(loss)/batch_size \end{python} \section{MILP}\label{apx:milp} \subsection{Verification}\label{apx:milp_verify} The MILP in the binary setting is formulated as: \begin{align} M^*, R^*, . &= \arg \min_{M,R,\{r_i\},\{t_i\},\{\phi_i\}} \sum_{i} \phi_i + r_i \mathbb{I}_{h_i \neq y_i} \\ & \phi_i \geq t_i - r_i, \qquad \phi_i \geq 0 \quad \forall i \in [n] \\ & K_m t_i \geq \gamma_h - y_i M^\top x_i \quad \forall i \in [n] \label{eq: constraint_milp_ti} \\ & R^{\top} x_i \leq K_r r_i + \gamma_r (r_i - 1) , \quad R^{\top} x_i \geq K_r (r_i - 1) + \gamma_r r_i \quad \forall i \in [n]\\ & -C \leq R_i \leq C , \quad -C \leq M_i \leq C \quad \forall i \in [d] \\ & r_i \in \{0,1\}, t_i \in \{0,1\}, \phi_i \in \mathbb{R}^+ \quad \forall i \in [n], \ R,M \in \mathbb{R}^d \end{align} \textbf{Extension to Multiclass.} The above MILP only applies to binary labels but we can generalize it to the multiclass setting where $\mathcal{Y} = \{1,\cdots, C\}$. In this case, we have a coefficient vector $M_j$ for each class $j \in \mathcal{Y}$, and $m(x) = \arg \max_{j \in \mathcal{Y}} M_j^\top x$. Given a labeled point $(x,y)$, we let $c_j = \textrm{sign}( M_y^\top x - M_j^\top x) $ for $j \neq y$, and let $t_i = \mathbb{I}_{\sum_{j \neq y} c_j < C-1}$. Then if $m(x) = y$, we must have $c_j = 1$ for all $j \neq y$ and thus $t_i =0$ which means that the classifier is correct. Similarly, if there exists a $j \neq y$ for which $c_j = -1$, it means the classifier is incorrect and accordingly $t_i =1$. We can reformulate these indicator constraints using a similar big-M approach as above. The formulation is below: \begin{align} M^*, R^*, . &= \arg \min_{M,R,\{r_i\},\{t_i\}, \{c_{ij}\},\{\phi_i\}} \sum_{i} \phi_i + r_i \mathbb{I}_{h_i \neq y_i} \\ & \phi_i \geq t_i - r_i, \qquad \phi_i \geq 0 \quad \forall i \in [n] \\ & (M_{y_i} - M_{j})^\top x_i \leq 2K_h c_{ij} + \gamma_h (c_{ij} - 1) , \nonumber \\&(M_{y_i} - M_{j})^\top x_i \geq 2K_h (c_{ij} - 1) + \gamma_h c_{ij} \quad \forall i \in [n] \ \forall j \in [C] \neq y_i \\ & t_i \geq (C - 1 - \sum_{j \in [L], j != y_i} c_{ij})/(C-1) \\ & R^{\top} x_i \leq K_r r_i + \gamma_r (r_i - 1) , \quad R^{\top} x_i \geq K_r (r_i - 1) + \gamma_r r_i \quad \forall i \in [n]\\ & -C \leq R_i \leq C , \quad -C \leq M[i,l] \leq C \quad \forall i \in [d] \ \forall l \in [C] \\ & r_i \in \{0,1\}, t_i \in \{0,1\}, c_{ij} \in \{0,1\}, \phi_i \in \mathbb{R}^+ \quad \forall i \in [n], \ R,M \in \mathbb{R}^d \end{align} Let us verify the formulations above. The variable $\phi_i \geq \max(t_i- r_i,0)$, the RHS takes values either 0 or 1, since $\phi_i$ in the objective then the optimal value is either $0$ or $1$ as well so that $\phi_i = \max(t_i - r_i,0) = (1-r_i)t_i$. For $t_i$ in the binary case: when $y_i M^\top x_i$ is positive, then $\gamma_h - y_i M^\top x_i$ is negative since $|M^\top x_i| \geq \gamma_h$ by Assumption \ref{ass: margin}, so that to satisfy constraint \eqref{eq: constraint_milp_ti} either value of $0$ or $1$ are valid for $t_i$, however since $t_i$ shows up in the objective then the optimal value is $0$. On the other hand, when $y_i M^\top x_i$ is negative, then $\gamma_h - y_i M^\top x_i$ is positive, so that the only valid option for $t_i$ is $1$ and since $M^\top x_i \leq K_m$ then the constraint can be satisfied. So that we proved that $t_i = sign(y_i M^\top x_i)$. We previously verified constraint for $r_i$ and $R$ in the body. When $r_i=0$ then we have the constraints $ R^{\top} x_i \leq - \gamma_r$ and $R^{\top} x_i \geq -K_r$: this forces the rejector to be negative which is consistent. When $r_i=1$, we have $R^{\top} x_i \geq \gamma_r$ and $R^{\top} x_i \leq K_r$: which means the rejector is positive. Thus we proved $r_i = \mathbb{I}(R^\top x_i \geq 0 )$. For $t_i$ in the multiclass settings: by analogy to the constraints for $R$ and $r_i$ it is easy to see that the variable $c_{ij} = sign( H_{y_i}^\top x_i - H_{j}^\top x_i)$. For a given $x_{i},y_{i}$, the classification is only correct if $c_{ij}=1$ for all $j \in [C] \neq y_i$ so that $\arg\max_j H_i^\top x_i =y_i$. We can then see that we set $t_i = \mathbb{I}( \sum_{j \neq y_i} c_{ij} /(C-1) \neq 1 )$ so that $t_i$ denotes the error of our classifier on example $i$. \section{Experimental Details and Results}\label{apx:experiments} \subsection{Baseline Implementation}\label{apx:baselines} OvASurrogate \citep{verma2022calibrated}: We rely on the loss implementation available online at \footnote{\url{https://github.com/rajevv/OvA-L2D}}. DifferentiableTriage \citep{okati2021differentiable}: We rely on the implementation in \footnote{\url{https://github.com/Networks-Learning/differentiable-learning-under-triage}}. Note that the differentiable triage method implementation in \cite{okati2021differentiable} relies on having loss estimates of the human, particularly cross entropy loss estimates, which requires the conditional probabilities $\mathbb{P}(H=i|X=x)$ for each $i \in \mathcal{Y}$. However, in our setting, we only have samples of the human decisions $m_i$, not probabilistic estimates. The method can be summarized as a two-stage method: 1) classifier training: at each epoch, only train on points where classifier loss is lower than human loss, 2) rejector training: fit the rejector to predict who between the classifier and the human has lower loss. Since we only have samples of human behavior, we use the $0-1$ loss of the classifier and the human on an example basis for comparison. CrossEntropySurrogate \citep{mozannar2020consistent}: We rely on the implementation in \footnote{\url{https://github.com/clinicalml/learn-to-defer}}. We tune the parameter $\alpha$ over the grid $[0, 0.1, 0.5, 1]$ on the validation set. CompareConfidence \citep{raghu2019algorithmic}: we train the classifier using the cross entropy loss on all the data, we then train a model to predict if the human is correct or not on each example in the training set. For each test point, we compare the confidence of the classifier versus the human correctness model and defer accordingly. SelectivePrediction: we train the classifier using the cross entropy loss on all the data, for the rejector, we learn a single threshold on the validation set for the classifier confidence (probability of the predicted class) in order to maximize system accuracy. \subsection{Training Details} \begin{table}[H] \centering \caption{Training details for each dataset, we use the Adam optimizer \citep{kingma2014adam} and AdamW \citep{loshchilov2017decoupled} } \begin{tabular}{p{0.3 \textwidth}ccllp{0.4 \textwidth}} \toprule \textbf{Dataset} & Optimizer & Number of Epochs & Learning Rate \\ \toprule SyntheticData (ours) & Adam & 300 & 0.1\\ CIFAR-K & Adam & 100 & 0.001 \\ \midrule CIFAR-10H \citep{battleday2020capturing} & AdamW & 20 & 0.001 \\ Imagenet-16H \citep{kerrigan2021combining} & Adam & 20 & 0.001 \\ HateSpeech \citep{davidson2017automated} & Adam & 50 & 0.001 \\ COMPASS \citep{dressel2018accuracy} & Adam &300 & 0.1\\ NIH Chest X-ray \citep{wang2017hospital,majkowska2020chest} & AdamW & 3 & 0.001 \\ \bottomrule \end{tabular} \label{tab:training_details} \end{table} \subsection{Synthetic Data} \label{apx:synth_data} Figure \ref{fig:synthetic-res} in the main body shows the sample complexity of the different methods on the uniform data distribution. We show in Figure \ref{fig:synthetic-res-gaussain} the performance of the different methods with the same setup with the uniform data distribution. \begin{figure}[H] \centering \includegraphics[scale = 0.7]{figures/plot_synth_data_realizable_2022-10-18_210331.pdf} \caption{(Test performance of the different methods on realizable synthetic data as we increase the training data size and repeat the randomization over 10 trials to get standard errors on uniform data.} \label{fig:synthetic-res-uniform} \end{figure} We also experiment with making the data unrealizable by setting ($d=10$, $p_m=0.1, p_{h0}=0.4, p_{h1}=0.1$, Gaussian distribution with 20 clusters) in Figure \ref{fig:synthetic-res-gaussain-unrez}. \begin{figure}[H] \centering \includegraphics[scale = 0.7]{figures/plot_synth_data_nonrealizable_2022-10-18_235117.pdf} \caption{(Test performance of the different methods on unrealizable ($d=10$, $p_m=0.1, p_{h0}=0.4, p_{h1}=0.1$, Gaussian distribution with 20 clusters) synthetic data as we increase the training data size.} \label{fig:synthetic-res-gaussain-unrez} \end{figure} We also show average run-times for the MILP on the synthetic data as we increase the dimension in Figure \ref{fig:synthetic-res-dimension} and as we increase the training data size in Figure \ref{fig:synthetic-res-size}. The distribution was uniform and realizable with $p_m=0.0, p_{h0}=0.3, p_{h1}=0.0$. We observe that the run time increases with training set size which is the biggest bottleneck. The runtime also increases with dimension up until the dimension is of the same order as the number of training points, afterwards it is faster for the MILP to find a 0 error solution. \begin{figure}[t] \centering \begin{subfigure}{0.48\textwidth} \centering \includegraphics[width=\textwidth]{figures/plot_runtime_d2022-05-26_122258.pdf} \subcaption{Runtime with increasing dimension, $n=1000$} \label{fig:synthetic-res-dimension}% \end{subfigure}\hfill% \begin{subfigure}{0.48\textwidth} \centering \includegraphics[width=\textwidth]{figures/plot_runtime_n2022-05-26_093848.pdf} \subcaption{Runtime with increasing training data size, $d=30$} \label{fig:synthetic-res-size}% \end{subfigure} \caption{Runtime of the MILP on the realizable synthetic data with uniform data distribution. Note that the test accuracy of the MILP is demonstrated in Figure \ref{fig:synthetic-res} and the MILP always reaches 0 training error across the different data dimensions and training set sizes. } \vspace{-0em} \end{figure} \subsection{NIH Chest X-ray} \begin{figure}[H] \centering \begin{subfigure}{0.48\textwidth} \centering \includegraphics[width=\textwidth]{figures/chest0_2022-10-18_210849.pdf} \subcaption{Fracture} \label{fig:chest0}% \end{subfigure}\hfill% \begin{subfigure}{0.48\textwidth} \centering \includegraphics[width=\textwidth]{figures/chest3_2022-10-18_210849.pdf} \subcaption{Nodule or Mass} \label{fig:chest3}% \end{subfigure} \caption{NIH Chest X-ray results on the two remaining tasks with the baselines and our method and red with circle markers. We see that all methods aren't able to obtain a performance of a human-AI team with better performance than the human, our method on both tasks defers to the human. } \vspace{-0em} \end{figure} \section{Deferred Proofs and Derivations}\label{apx:proofs} \subsection{Section \ref{sec:linear_case} (Hardness)} \subsubsection{Background and Definitions} \paragraph{Realizable Intersection of Halfspaces.} For our purposes, an instance $\mathcal{I}$ of learning an intersection of halfspaces in the realizable setting is given by a finite dataset $\{(x_i,y_i)\}_{i=1}^n$, with $x_i \in \mathbb{R}^d$ and $y_i \in \{0,1\}$, such that there exist halfspaces $g_1^*: \mathbb{R}^d \to \{0,1\}$ and $g_2^*: \mathbb{R}^d \to \{0,1\}$ with zero error on the dataset: \[ err_{\mathcal{I}}(g_1^*, g_2^*) := \frac{1}{n}\sum_{i}\mathbb{I}_{g_1^*(x_i) \wedge g_2^*(x_i) \ne y_i} = 0. \] We consider two related problems: finding halfspaces $(g_1,g_2)$ with \emph{exact} and \emph{weak} agreement. \paragraph{Exact agreement.} Given an instance $\mathcal{I}$ of realizable intersection of halfspaces, the exact agreement problem is to find a pair of halfspaces $(g_1,g_2)$ such that $g_1(x_i) \wedge g_2(x_i) = y_i$ for all $i \in \{1,\ldots, n\}$. \paragraph{Weak agreement.} Given an instance $\mathcal{I}$ of realizable intersection of halfspaces, the weak agreement problem is to find a pair of halfspaces $(g_1,g_2)$ with error at most $1/2-\gamma$ for some $\gamma > 0$: \[ err_{\mathcal{I}}(g_1, g_2) := \frac{1}{n}\sum_{i}\mathbb{I}_{g_1(x_i) \wedge g_2(x_i) \ne y_i} \le \frac{1}{2}-\gamma. \] Note that there exists a pair $(g_1^*, g_2^*)$ with error 0 but the goal is just to obtain error $1/2-\gamma$. Quite a bit is known about the hardness of the exact and weak agreement problems. \begin{theorem*}[\citet{blum1988training} Theorem 1, rephrased] The exact agreement problem is NP-hard. \end{theorem*} \begin{theorem*}[\citet{khot2011hardness} Theorem 2, rephrased] There is no polynomial-time algorithm for the weak agreement problem unless $NP=RP$. \end{theorem*} We also consider finite-data versions of LWD-H: \paragraph{Finite-data realizable LWD-H.} An instance $\mathcal{J}$ of learning with deferral in the realizable setting is given by a finite dataset $\{(x_i,y_i,h_i)\}_{i=1}^n$, with $x_i \in \mathbb{R}^d$ and $y_i,h_i \in \{0,1\}$, such that there exist halfspaces $m^*: \mathbb{R}^d \to \{0,1\}$ and $r^*: \mathbb{R}^d \to \{0,1\}$ with zero error on the dataset: \[ err_{\mathcal{J}}(m^*, r^*) := \frac{1}{n}\sum_{i}\mathbb{I}_{r^*(x_i)=1}\mathbb{I}_{h_i\ne y_i} + \mathbb{I}_{r^*(x_i)=0}\mathbb{I}_{m^*(x_i) \ne y_i} = 0. \] As with intersection-of-halfspaces, we can consider finding halfspace classifier/rejector pairs $(m,r)$ with \emph{exact} and \emph{weak} agreement. \paragraph{Exact agreement.} Given an instance $\mathcal{J}$ of realizable LWD-H, the exact agreement problem is to find a pair of halfspaces $(m,r)$ such that for all $i$, if $r(x_i) = 0$, $m(x_i) = y_i$, and if $r(x_i) = 1$, $h_i=y_i$. That is, the error of the classifier/human system on the finite dataset is 0. \paragraph{Weak agreement.} Given an instance $\mathcal{J}$ of realizable LWD-H, the weak agreement problem is to find a pair of halfspaces $(m,r)$ with error at most $1/2-\gamma$ for some $\gamma > 0$: \[ err_{\mathcal{J}}(m, r) := \frac{1}{n}\sum_{i}\mathbb{I}_{r(x_i)=1}\mathbb{I}_{h_i\ne y_i} + \mathbb{I}_{r(x_i)=0}\mathbb{I}_{m(x_i)\ne y_i}\le \frac{1}{2}-\gamma. \] \subsubsection{Mapping between learning intersections and LWD-H} We show how to turn an instance $\mathcal{I}$ of realizable intersection of halfspaces into an instance of $\mathcal{J}$ of (finite-data) realizable LWD-H. Given an arbitrary instance $\mathcal{I}$ on dataset $\mathcal{D}$, Lemma \ref{apdx:prop:error-relation} shows how to construct an instance $\mathcal{J}$ of LWD-H and a bijection $(g_1, g_2) \longleftrightarrow (m,r)$ such that for arbitrary halfspaces $(g_1,g_2)$, the error $err_{\mathcal{I}}(g_1,g_2) = err_{\mathcal{J}}(m,r)$. In particular, since we assumed $\mathcal{I}$ is realizable and hence $\exists g_1^*, g_2^*$ with $err_{\mathcal{I}}(g_1^*,g_2^*) = 0$, Lemma \ref{apdx:prop:error-relation} shows how to construct an instance $\mathcal{J}$ of LWD-H with $err_{\mathcal{J}}(m^*, r^*) = 0$. This will allow us to reduce an arbitrary instance $\mathcal{I}$ of realizable intersection of halfspaces to an instance $\mathcal{J}$ of realizable LWD-H. Additionally, given an arbitrary classifier/rejector pair $(m,r)$ on this $\mathcal{J}$ with error $\epsilon$, Lemma \ref{apdx:prop:error-relation} shows how to map $(m,r)\to (g_1,g_2)$ with error $\epsilon$ on instance $\mathcal{I}$. \begin{lemma} \label{apdx:prop:error-relation} Consider an arbitrary instance $\mathcal{I}$ of learning an intersection of halfspaces on a dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^n$. Define $\tilde \mathcal{D} = \{(x_i,y_i,0)\}_{i=1}^n$. This corresponds to an instance $\mathcal{J}$ of LWD-H where the ``human expert'' always outputs label 0. Then: \begin{enumerate} \item Consider two arbitrary halfspaces $g_1, g_2$ and set $m(x) = g_1(x)$, $r(x) = 1-g_2(x)$. Note that $m$ and $r$ are also halfspaces. Then $err_{\mathcal{I}}(g_1,g_2) = err_{\mathcal{J}}(m,r)$. That is, \[ \frac{1}{n}\sum_{(x_i,y_i) \in \mathcal{D}} \mathbb{I}[g_1(x_i) \wedge g_2(x_i) \ne y_i] = \frac{1}{n}\sum_{(x_i, y_i, h_i) \in \tilde \mathcal{D}} \left(\mathbb{I}_{r(x_i)=1}\mathbb{I}_{h_i\ne y_i} + \mathbb{I}_{r(x_i) = 0}\mathbb{I}_{m(x_i) \ne y_i}\right). \] \item Suppose $\mathcal{I}$ is an instance of \emph{realizable} intersection of halfspaces. Then the instance $\mathcal{J}$ of LWD-H defined by the dataset $\tilde \mathcal{D}$ is an instance of \emph{realizable} LWD-H. That is, there exists $(m^*,r^*)$ with $err_{\mathcal{J}}(m^*, r^*) = 0$. \end{enumerate} \end{lemma} \begin{proof} For part 1, recall that by definition: \[ \textrm{err}_{\mathcal{J}}(m,r) = \frac{1}{n}\sum_{(x_i,h_i,y_i)\in \tilde \mathcal{D}}\left(\mathbb{I}_{r(x_i) = 1}\mathbb{I}_{h_i \ne y_i} + \mathbb{I}_{r(x_i)=0}\mathbb{I}_{m(x_i)\ne y_i}\right). \] Since $h_i = 0$ for all $i$, this is equal to \[ \frac{1}{n}\sum_{i}\left(\mathbb{I}_{r(x_i) = 1}\mathbb{I}_{y_i = 1} + \mathbb{I}_{r(x_i)=0}\mathbb{I}_{m(x_i)\ne y_i}\right). \] Using $r(x) = 1-g_2(x)$ and $m(x) = g_1(x)$, this simplifies further to: \begin{align}\label{apdx:eq:reduction-error} \frac{1}{n}\sum_{i}\left(\mathbb{I}_{g_2(x_i) = 0}\mathbb{I}_{y_i = 1} + \mathbb{I}_{g_2(x_i) = 1}\mathbb{I}_{g_1(x_i)\ne y_i}\right). \end{align} Consider the error of $err_{\mathcal{I}}(g_1,g_2)$. The model makes a mistake if $g_2(x)=0$ and $y(x)=1$, $g_2(x) = g_1(x) = 1$ and $y=0$, or $g_2(x) = 1, g_1(x) = 0$, and $y=1$. The first case is $\mathbb{I}_{g_2(x) = 0}\mathbb{I}_{y = 1}$ and the latter two cases can be expressed as $\mathbb{I}_{g_2(x)=1}\mathbb{I}_{g_1(x) \ne y}$. Hence \[ err_{\mathcal{I}}(g_1,g_2) = \frac{1}{n}\sum_{(x_i,y_i) \in \tilde \mathcal{D}} \mathbb{I}[g_1(x_i) \wedge g_2(x_i) \ne y_i] = \frac{1}{n}\sum_{i}\left(\mathbb{I}_{g_2(x_i) = 0}\mathbb{I}_{y_i = 1} + \mathbb{I}_{g_2(x_i) = 1}\mathbb{I}_{g_1(x_i)\ne y_i}\right), \] which is equal to \eqref{apdx:eq:reduction-error}, so $err_{\mathcal{I}}(g_1,g_2) = \textrm{err}_{\mathcal{J}}(m,r)$. For part 2, we assumed that $\mathcal{I}$ was realizable, so there exists $g_1^*$, $g_2^*$ with $err_{\mathcal{I}}(g_1^*, g_2^*) = 0$. Applying part 1 yields $m^*, r^*$ such that $err_{\mathcal{J}}(m^*, r^*) = 0$. Hence $\mathcal{J}$ is an instance of realizable LWD-H. \end{proof} Lemma \ref{apdx:prop:error-relation} takes an instance $\mathcal{I}$ of learning an intersection of halfspaces and constructs an instance $\mathcal{J}$ of LWD-H such that there is an error-preserving bijection between solutions of $\mathcal{I}$ and solutions of $\mathcal{J}$. This allows us to easily apply the existing hardness results for learning a realizable intersection of halfspaces, since if $\mathcal{I}$ is realizable then so is $\mathcal{J}$. \subsubsection{Hardness results for LWD-H} \begin{theorem} There is no polynomial-time algorithm for solving the exact agreement problem for LWD-H unless P=NP. \end{theorem} \begin{proof} Suppose there exists a polytime algorithm $\mathcal{A}$ for solving exact agreement on realizable LWD-H. Consider an arbitrary instance $\mathcal{I}$ of learning a realizable intersection of halfspaces. Lemma \ref{apdx:prop:error-relation} shows how to construct an instance $\mathcal{J}$ of realizable LWD-H. Run Algorithm $\mathcal{A}$ on $\mathcal{J}$ to obtain halfspaces $(m,r)$ with $err_{\mathcal{J}}(m,r) = 0$. Set $g_1 = m$, $g_2 = 1-r$. Lemma \ref{apdx:prop:error-relation} guarantees that $err_{\mathcal{I}}(g_1,g_2) = 0$. Hence, $\mathcal{A}$ is a polynomial-time algorithm for exact agreement for realizable intersection of halfspaces. \citet{blum1988training} shows that there is no polynomial-time algorithm for exact agreement for realizable intersection of halfspaces unless $P=NP$. \end{proof} \begin{corollary} There is no efficient, proper PAC learner for realizable LWD-H unless $NP=RP$. \end{corollary} \begin{proof}[Proof sketch] Suppose $\mathcal{A}$ is an efficient proper PAC learner for realizable LWD-H, so for any distribution $\mathcal{D}$, any $\epsilon > 0$, $\delta > 0$, given $poly(1/\delta, 1/\epsilon)$ samples from $\mathcal{D}$, $\mathcal{A}$ outputs a pair of halfspaces $(m,r)$ with (population) system error at most $\epsilon$ in time $poly(1/\epsilon, 1/\delta)$. Now let $\mathcal{D}$ be the uniform distribution over a dataset of $n$ points $\{(x_i,y_i,h_i)\}_{i=1}^n$. Set $\epsilon = 1/(2n)$ and $\delta=1/100$ and run $\mathcal{A}$. With probability at least $1-\delta$ $\mathcal{A}$ outputs $(m,r)$ with error at most $1/(2n)$. Of course, if $(m,r)$ has error at most $1/(2n)$ it must have error 0. This gives a randomized algorithm for solving the exact agreement problem for realizable finite-data LWD-H. \end{proof} These results show that exact agreement, and thus exact proper PAC learning, are hard. Next we consider the hardness of weak agreement. \textbf{Theorem \ref{prop:hardness}} \textit{ Let $\epsilon > 0$ be an arbitrarily small constant and suppose we have an instance $\mathcal{J}$ of realizable LWD-H. So we have data $\mathcal{D} = \{(x_i,y_i,h_i)\}_{i=1}^n$, where $x_i\in \mathbb{R}^d, y_i, h_i \in \{0,1\}$, and there exist halfspaces $m^*, r^*$ with zero loss on $\mathcal{D}$: \[ err_{\mathcal{J}}(m^*,r^*) := \frac{1}{n}\sum_{i}\left(\mathbb{I}_{r^*(x_i) = 1}\mathbb{I}_{h_i \ne y_i} + \mathbb{I}_{r^*(x_i)=0}\mathbb{I}_{m^*(x_i)\ne y_i}\right) = 0 \] Then there is no polynomial-time algorithm to find a classifier-rejector pair $(\hat{m}, \hat{r})$ with error $1/2 -\epsilon$, i.e.: \[ \frac{1}{n}\sum_{i}\left(\mathbb{I}_{\hat r(x_i)=1}\mathbb{I}_{h_i \ne y_i} + \mathbb{I}_{\hat r(x_i)=0}\mathbb{I}_{\hat m(x_i)\ne y_i}\right)\le \frac{1}{2} - \epsilon \] unless $NP=RP$. } \begin{proof} Suppose there exists a polynomial-time algorithm $\mathcal{A}$ and a $\gamma > 0$ such that given an instance $\mathcal{J}$ of realizable LWD-H, $\mathcal{A}$ returns a pair $(\hat m, \hat r)$ with error $err_{\mathcal{J}}(\hat m, \hat r)$ at most $1/2-\gamma$. Consider an arbitrary instance $\mathcal{I}$ of realizable intersection of halfspaces. Lemma \ref{apdx:prop:error-relation} shows how to reduce $\mathcal{I}$ to an instance $\mathcal{J}$ of realizable LWD-H. Run Algorithm $\mathcal{A}$ on $\mathcal{J}$ to obtain a pair of halfspace $(\hat m, \hat r)$ with error at most $err_{\mathcal{J}}(\hat m, \hat r) \le 1/2-\gamma$. Lemma \ref{apdx:prop:error-relation} guarantees that $g_1 = \hat m, g_2 = 1-\hat r$ satisfy $err_{\mathcal{I}}(g_1,g_2) \le 1/2-\gamma$. Hence $\mathcal{A}$ gives a deterministic algorithm for solving the weak agreement problem for realizable intersection of halfspaces. \citet[Theorem 4]{khot2011hardness} construct an algorithm/reduction showing that if we can efficiently solve weak agreement for realizable intersection of halfspaces, then Smooth Label Cover is in $RP$, but Smooth Label Cover is an NP-hard problem \citep[][Theorem 3]{khot2011hardness}. Hence there is no polynomial-time algorithm to find a classifier-rejector pair $(\hat{m}, \hat{r})$ with error $1/2 -\epsilon$ unless $NP=RP$. \end{proof} \begin{corollary} There is no efficient, proper, \emph{weak} PAC-learner for realizable LWD-H unless $NP=BPP$. \end{corollary} \begin{proof} Given a distribution $\mathcal{D}$ over points $(x,y,h)$, $x\in\mathbb{R}^d$, $y,h\in \{0,1\}$ and halfspaces $(m,r)$, let \[ err_{\mathcal{D}}(m,r) := \mathbb{P}_{(x,y,h)\sim \mathcal{D}}[r(x)=1 \wedge h\ne y \vee r(x) = 0 \wedge m(x) \ne y]. \] This is identical to the \emph{system loss} \eqref{eq:01_reject_loss} on distribution $\mathcal{D}$. Suppose there exists an efficient, proper, weak PAC-learner for realizable LWD-H. I.e., there exists some $\gamma$ such that for any distribution $\mathcal{D}$, under the guarantee that $\exists (m^*,r^*)$ with $err_{\mathcal{D}}(m^*, r^*) = 0$, given access to $poly(1/\delta)$ samples from $\mathcal{D}$, with probability at least $1-\delta$, $\mathcal{A}$ returns a pair $(m,r)$ with $err_{\mathcal{D}}(m,r) \le \frac{1}{2}-\gamma$ in $poly(1/\delta)$ time. By combining Lemma \ref{apdx:prop:error-relation} with the randomized reduction of \citet{khot2011hardness}, we can use $\mathcal{A}$ to construct an algorithm that implies Smooth Label Cover is in $BPP$. The definition of Smooth Label Cover is not important for our purposes beyond the following two results: \begin{theorem}{\citep[Theorem 3]{khot2011hardness}} \label{thm:smooth-label-cover-hardness} For any constant $t$ and arbitrarily small constants $\mu, \nu, \eta > 0$, there exist constants $k$ and $m$ such that given an instance $\mathcal{L}$ of $\textrm{Smooth-Label-Cover}(t, \mu , \nu , k, m)$ it is NP-hard to distinguish between the following two cases: \begin{itemize} \item YES Case/Completeness: There is a labeling to the vertices of $\mathcal{L}$ which satisfies all the edges. \item NO Case/Soundness: No labeling to the vertices of $\mathcal{L}$ satisfies more than $\eta$ fraction of the edges. \end{itemize} \end{theorem} \begin{theorem}{\citep[Theorem 4]{khot2011hardness}} \label{thm:smooth-label-cover-reduction} For any constant $\gamma > 0$ and integer $l > 0$, there is a randomized polynomial time reduction from an instance $\mathcal{L}$ of $\textrm{Smooth-Label-Cover}(t, \mu , \nu , k, m)$ to an instance $\mathcal{I}$ of Realizble Intersection of Halfspaces for appropriately chosen parameters $(t, \mu , \nu)$ and soundness $\eta$, such that \begin{itemize} \item YES Case/Completeness: If $\mathcal{L}$ is a YES instance, then there is an intersection of two halfspaces which correctly classifies all the points in instance $\mathcal{I}$. \item NO Case/Soundness: If $\mathcal{L}$ is a NO instance, then with probability at least 9/10, there is no function of up to $l$ halfspaces that correctly classifies more than $1/2 + \gamma$ fraction of points in instance $\mathcal{I}$. \end{itemize} \end{theorem} For our case, we can use Lemma \ref{apdx:prop:error-relation} to further reduce the instance $\mathcal{I}$ constructed by Theorem \ref{thm:smooth-label-cover-reduction} to an instance $\mathcal{J}$ of LWD-H, then run the weak PAC-learner $\mathcal{A}$ on $\mathcal{J}$. If $\mathcal{A}$ outputs a pair of halfspaces $(m,r)$ with error at most $1/2-\gamma$, we output YES. Otherwise we output NO. If $\mathcal{I}$ is a realizable instance, $\mathcal{A}$ returns a pair of halfspaces with error at most $1/2-\gamma$ with probability at least $1-\delta$. On the other hand, if $\mathcal{I}$ is not weakly realizable (w.r.) (i.e., there is no function of up to $l$ halfspaces that correctly classifies more than a $1/2 + \gamma$ fraction of points in $\mathcal{I}$), then clearly $\mathcal{A}$ never returns a good pair of halfspaces, since no such pair exists. \iffalse Therefore: \begin{align*} \mathbb{P}(\text{YES}|\mathcal{L} \text{ YES}) &= \mathbb{P}(\text{YES} | \mathcal{I} \text{ realizable})\mathbb{P}(\mathcal{I} \text{ realizable} | \mathcal{L} \text{ YES})\\ &= (1-\delta)\cdot 1 \end{align*} \begin{align*} \mathbb{P}(\text{NO}|\mathcal{L} \text{ NO}) &= \mathbb{P}(\text{NO} | \mathcal{I} \text{ realizable})\mathbb{P}(\mathcal{I} \text{ realizable} | \mathcal{L} \text{ NO}) + \mathbb{P}(\text{NO} | \mathcal{I} \text{ not realizable})\mathbb{P}(\mathcal{I} \text{ not realizable} | \mathcal{L} \text{ NO})\\ &\ge \mathbb{P}(\text{NO} | \mathcal{I} \text{ not realizable})\mathbb{P}(\mathcal{I} \text{ not realizable} | \mathcal{L} \text{ NO})\\ &\ge \mathbb{P}(\text{NO} | \mathcal{I} \text{ not realizable})\frac{9}{10}\\ &= \frac{9}{10}. \end{align*} \fi Therefore: \begin{align*} \mathbb{P}(\text{YES}|\mathcal{L} \text{ YES}) &= \mathbb{P}(\text{YES} | \mathcal{I} \text{ realizable})\mathbb{P}(\mathcal{I} \text{ realizable} | \mathcal{L} \text{ YES})\\ &= (1-\delta)\cdot 1 \end{align*} \begin{align*} \mathbb{P}(\text{NO}|\mathcal{L} \text{ NO}) &= \mathbb{P}(\text{NO} | \mathcal{I} \text{ w.r.})\mathbb{P}(\mathcal{I} \text{ w.r.} | \mathcal{L} \text{ NO}) + \mathbb{P}(\text{NO} | \mathcal{I} \text{ not w.r.})\mathbb{P}(\mathcal{I} \text{ not w.r.} | \mathcal{L} \text{ NO})\\ &\ge \mathbb{P}(\text{NO} | \mathcal{I} \text{ not w.r.})\mathbb{P}(\mathcal{I} \text{ not w.r.} | \mathcal{L} \text{ NO})\\ &\ge \mathbb{P}(\text{NO} | \mathcal{I} \text{ not w.r.})\frac{9}{10}\\ &= \frac{9}{10}. \end{align*} Hence we can use $\mathcal{A}$ to construct an algorithm for a Smooth-Label-Cover instance $\mathcal{L}$ that outputs YES when $\mathcal{L}$ is a YES with probability at least $(1-\delta)$, and outputs NO when $\mathcal{L}$ is a NO with probability at least 9/10. Since we assumed $\mathcal{A}$ runs in $poly(1/\delta)$, this implies Smooth Label Cover is in $BPP$. Together with Theorem \ref{thm:smooth-label-cover-hardness}, this shows that there is no efficient, proper, weak PAC learner for realizable LWD-H unless $NP=BPP$. \end{proof} Finally, we show that when realizability is violated, there is no efficient algorithm for weak agreement. \textbf{Corollary \ref{th:hardness_extension}} (formal). \textit{ Let $\delta, \epsilon > 0$ be arbitrarily small constants. Then, given a set of points $\{(x_i,y_i,h_i)\}$ with $x_i \in \mathbb{R}^d$, $y_i, h_i \in \{0,1\}$ with a guarantee that there is a classifier/rejector pair $(m^*,r^*)$ that classifies a $1 - \delta$ fraction of points correctly, there is no polynomial time algorithm to find a classifier-rejector pair that classifies $\frac{1}{2} + \epsilon$ fraction of points correctly unless P = NP. } \begin{proof} This is a simple reduction from learning a single halfspace in the presence of noise, which is hard by the following result: \begin{theorem*}{(\citet{guruswami2009hardness}, see also \citet[Theorem 1]{khot2011hardness})} Let $\delta, \epsilon > 0$ be arbitrarily small constants. Then, given a set of labeled points $\{(x_i,y_i)\}$ in $\mathbb{R}^d$ with a guarantee that there is a halfspace that classifies $1 -\delta$ fraction of points correctly, there is no polynomial time algorithm to find a halfspace that classifies $1/2 + \epsilon$ fraction of points correctly, unless P = NP. \end{theorem*} Suppose we have an algorithm $\mathcal{A}$ for solving LWD-H in the presence of noise. In particular, there exists some $\epsilon > 0, \delta > 0$ such that under the guarantee that there exists an $(m^*,r^*)$ pair with error at most $\delta$, $\mathcal{A}$ returns an $(m,r)$ pair with error at most $\frac{1}{2}-\epsilon$. Consider an instance $\mathcal{I}$ of learning a single halfspace in the presence of noise defined by a dataset $\mathcal{D} = \{(x_i,y_i)\}_{i=1}^n$, such that there exists a halfspace $c$ with error at most $\delta$ on $\mathcal{D}$. From $\mathcal{D}$, construct the dataset $\tilde \mathcal{D} = \{(x_i, y_i, 1-y_i)\}_{i=1}^n$. This is an instance $\mathcal{J}$ of LWD-H where the ``human expert'' is always wrong. Note that $(c,0)$ is a classifier/rejector pair with error at most $\delta$ on $\tilde \mathcal{D}$, so $\mathcal{J}$ is an instance of LWD-H with noise level $\delta$. Run algorithm $\mathcal{A}$ on $\mathcal{J}$ with parameter $\epsilon$ to obtain an $(m,r)$ pair with $err_{\mathcal{J}}(m,r) = 1/2 - \epsilon$. Then: \begin{align*} 1/2 - \epsilon \ge err_{\mathcal{J}}(m,r) &= \frac{1}{n}\sum_{i}\mathbb{I}_{r(x_i)=1}\mathbb{I}_{h_i\ne y_i} + \mathbb{I}_{r(x_i)=0}\mathbb{I}_{m(x_i)\ne y_i}\\ &= \frac{1}{|\{i : r(x_i) = 1\}|}\sum_{i: r(x_i)=1}\mathbb{I}_{h_i\ne y_i} + \frac{1}{|\{i : r(x_i) = 0\}|}\sum_{i: r(x_i)=0}\mathbb{I}_{m(x_i)\ne y_i}\\ &\ge \frac{1}{|\{i : r(x_i) = 1\}|}\sum_{i: r(x_i)=1}\mathbb{I}_{m(x_i)\ne y_i} + \frac{1}{|\{i : r(x_i) = 0\}|}\sum_{i: r(x_i)=0}\mathbb{I}_{m(x_i)\ne y_i}\\ &= \frac{1}{n}\sum_{i}\mathbb{I}_{m(x_i)\ne y_i}\\ &= err_{\mathcal{I}}(m). \end{align*} Therefore, there exists a $\delta$ and $\epsilon$ for which, given a dataset and the guarantee that there exists a halfspace with error at most $\delta$, we can output a halfspace with error at most $1/2 - \epsilon$. Combining this with the Theorem above shows that if $\mathcal{A}$ runs in polynomial time, $P=NP$. \end{proof} \iffalse \textit{Claim}: This is an instance of the realizable learning to defer problem. \textit{Proof}: let $m = g_1$ and $r=\bar{g_2}$ (complement of $g_2$, when $r(x_i)=1$, then the expert predicts, and we know that $y_i =0$ (because $r(x_i) = 1 \to g_2(x_i)=0$) so that we don't make a mistake because the expert will predict $0$ as $h_i=0$. When $r(x_i)=0$, then the classifier $m$ will predict, the label $y_i$ is then determined by $g_1(x_i) \wedge g_2(x_i) = g_1(x_i) \wedge 1 = g_1(x_i)$ exactly so that we make no mistake since $m(x_i) = g_1(x_i)$. We just showed that $\tilde{D}$ defines a realizable instance of the linear learning to defer problem. By assumption, we are able to return a linear $m$ and $r$ that can get $0$ error on $\tilde{D}$, we now see how we can go from any $m,r$ solution to the intersection of halfspaces. Let $g_1 = m$ and let $g_2 = \bar{r}$, we show that $g_1 \wedge g_2$ will correctly classify all the labels. When $g_1(x_i) =1 \wedge g_2(x_i)=1$, we know that that we did not defer to the expert ($r(x_i)=0$), and the classifier must predict and we know that when the classifier predicts they have 0 error so their prediction must coincide with $y_i$. Now, by cases when $g_2(x_i)=0$: then we deferred to the expert and we know that we have $0$ error so that the label $y_i$ must be $0$ as the expert always predicts $0$ and $y_i = g_1(x_i) \wedge 0 = 0$. On the other hand, when $g_2(x_i)=1$: we did not defer to the expert and so classifier must agree with the label which is the same as $g_1(x_i) \wedge g_2(x_i) = g_1(x_i) \wedge 1 = g_1(x_i)$. Therefore, if we are able to solve learning to defer problem then we can recover the two halfspaces that separate the data which completes the reduction. We have just proved that the consistency problem of finding linear $(m,r)$ that have 0 training error is hard. We now discuss PAC learning. Assume we have an algorithm that can PAC learn in the LWD-H setting with error $\epsilon$ and confidence $1-\delta$ in time polynomial in $(n, 1/\epsilon, 1/\delta)$. We will show that this is an algorithm in RP that solves an NP complete problem, namely intersection of halfspaces. Given the dataset $\tilde{D}$, define $U$ to be the uniform distribution over the elements of $\tilde{D}$ and let $\epsilon = 1/(2n)$ and $\delta = 1/100$. Sample a dataset $\tilde{D}' \sim U^n$, and run the PAC learning algorithm on it and returns a pair $(m,r)$. Since $\epsilon$ is smaller than $1/n$, then the algorithm will return a pair $(m,r)$ that has in fact 0 training error and solves the intersection of halfspace problem. Thus, with probability $1- \delta$, the PAC learning algorithm returns a pair $(m,r)$ that solves the intersection of halfspace problem. Note, that here we have assumed the problem is always realizable, we can extend the results by allowing the algorithms to say "NO" when there exists no intersection of halfpsaces that has 0 error. \fi \subsection{Section \ref{sec:milp} (MILP)} \textbf{Proposition 1.}\textit{ \noindent For any expert $H$ and data distribution $\mathbf{P}$ over $\mathcal{X} \times \mathcal{Y}$ that satisfies Assumption \ref{ass: margin}, let $0<\delta<\frac{1}{2}$, then with probability at least $1-\delta$, the following holds for the empirical minimizers $(\hat{m}^*,\hat{r}^*)$ obtained by the MILP: \begin{align*} L_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) &\leq \hat{L}_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) \frac{(K_m + K_r) d \sqrt{2 \log d} + 10 \sqrt{\log(2/\delta)}}{\sqrt{n \mathbb{P}(H(Z) \neq Y)}} \end{align*} } \begin{proof} We first start by recalling Theorem 2 in \cite{mozannar2020consistent}: \begin{align} L_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) &\leq \hat{L}_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) + \mathfrak{R}_n(\mathcal{M}) + \mathfrak{R}_{n}(\mathcal{R}) + \mathfrak{R}_{n \mathbb{P}(H(Z) \neq Y)/2}(\mathcal{R}) \nonumber \\ & + 2\sqrt{\frac{\log{(\frac{2}{\delta})}}{2n}} +\frac{\mathbb{P}(H(Z)\neq Y)}{2} \exp\left(- \frac{n \mathbb{P}(H(Z) \neq Y)}{8} \right) \label{eq:gen_bound_mozannar2020} \end{align} Note that here we avoid going through the optimal solution and just relate distribution performance to the training performance. In the bound \eqref{eq:gen_bound_mozannar2020}, $ \mathfrak{R}_n(\mathcal{M})$ and $ \mathfrak{R}_n(\mathcal{R})$ denote the Rademacher complexity of a halfspace in $d$ dimensions where the infinity norm of each element in the halfspace is constrained by $K_m$ and $K_r$ respectively. Let us now compute this Rademacher complexity, inspired by \cite{rademacherlinear}: \begin{align*} \mathfrak{R}_n(\mathcal{M}) &= \frac{1}{n} \mathbb{E} \left[ \sup_{M: ||M||_\infty \leq K_m} \sum_{i=1}^n \epsilon_i M^\top x_i \right]\\ &\leq \frac{1}{n} \mathbb{E} \left[ \sup_{M: ||M||_1 \leq d K_m} M^\top\sum_{i=1}^n \epsilon_i x_i \right] \quad \textrm{(since $||M||_1 \leq d ||M||_\infty$)}\\ &= \frac{d K_m}{n} \mathbb{E} \left[ \sum_{i=1}^n ||\epsilon_i x_i ||_{\infty} \right] \\ &= \frac{d K_m}{n} \mathbb{E} \left[ \sup_j \sum_{i=1}^n \epsilon_i [x_i]_j \right] \\ & \leq \frac{d K_m \sqrt{2 \log d}}{n} \sup_j \sqrt{\sum_{i=1}^n [x_i]^2_j} \quad \textrm{(Massart's finite lemma on $x_{ij}$)} \\ & \leq \frac{d K_m \sqrt{2 \log d}}{\sqrt{n}} \quad \textrm{(assume $||x_i||_1 \leq 1$ for all $i$ )} \end{align*} Let us use the Rademacher complexity calculation in the bound to get: \begin{align*} L_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) &\leq \hat{L}_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) + \frac{d K_m \sqrt{2 \log d}}{\sqrt{n}} + \frac{d K_r \sqrt{2 \log d}}{\sqrt{n}} + \frac{d K_m \sqrt{2 \log d}}{\sqrt{n \mathbb{P}(H(Z) \neq Y)}} \nonumber \\ & + 2\sqrt{\frac{\log{(\frac{2}{\delta})}}{2n}} +\frac{\mathbb{P}(H(Z)\neq Y)}{2} \exp\left(- \frac{n \mathbb{P}(H(Z) \neq Y)}{8} \right) \end{align*} note that $\frac{\mathbb{P}(H(Z)\neq Y)}{2} \exp\left(- \frac{n \mathbb{P}(H(Z) \neq Y)}{8} \right)$ is a term that does not depend on the optimization and shrinks much faster than $\frac{8}{\sqrt{n \mathbb{P}(H(Z) \neq Y)}}$, so that we can summarize things as: \begin{align} L_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) &\leq \hat{L}_{\mathrm{def}}^{0{-}1}(\hat{m}^*,\hat{r}^*) + \frac{(K_m + K_r) d \sqrt{2 \log d} + 10 \sqrt{\log(2/\delta)}}{\sqrt{n \mathbb{P}(H(Z) \neq Y)}} \end{align} \end{proof} \subsection{Section \ref{sec:new_method} (\texttt{RealizableSurrogate} )} \textbf{Theorem 2.}\textit{ \noindent The \emph{\texttt{RealizableSurrogate}} $L_{RS}$ is a realizable $(\mathcal{M},\mathcal{R})$-consistent surrogate for $L_{\mathrm{def}}^{0{-}1}$ for model classes closed under scaling, and satisfies $L_{\mathrm{def}}^{0{-}1}(m,r) \le L_{RS}(m,r)$ for all $(m,r)$. } \begin{proof} Let us recall the \texttt{RealizableSurrogate} loss pointwise: \begin{equation} \label{eq:proposed_RS_loss} L_{RS}(\mathbf{g},x,y,h) = -2 \log\left(\frac{\exp(g_{y}(x)) + \mathbb{I}_{h = y} \exp(g_{\bot}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \right) \end{equation} where $\mathbf{g}=\{g_{i}\}_{ i \in \mathcal{Y} \cup \bot} $. Recall that the classifier and rejector are defined as: $m(x) = \arg \max_{y \in \mathcal{Y}}g_y(x)$ and $r(x)= \mathbb{I}_{\max_{y \in \mathcal{Y}}g_y(x) \leq g_\bot(x) }$. We first prove that for every point, the \texttt{RealizableSurrogate} loss upper bounds the system 0-1 error: $L_{\mathrm{def}}^{0{-}1}(m,r,x,y,h) \le L_{RS}(\mathbf{g},x,y,h)$: \begin{enumerate} \item \textbf{Case 1:} consider $r(x)=0$ (classifier predicts): \begin{enumerate} \item \textbf{Case 1a:} if the classifier is incorrect, $\mathbb{I}_{m(x) \neq y}=1$: \begin{enumerate} \item \textbf{Case 1ai:} If the human is incorrect, $\mathbb{I}_{h = y}=0$: then the loss is:$ -2 \log\left(\frac{\exp(g_{y}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \right) $, we know since the classifier is incorrect, then it must be that $\frac{\exp(g_{y}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \leq 0.5$ (since $g_{y}$ is not the max), thus the loss is greater than $2$ (log is base 2), and the 0-1 loss is 1 in this case. \item \textbf{Case 1aii}: if the human is correct then $\mathbb{I}_{h=y}=1$: then the loss is:$ -2 \log\left(\frac{\exp(g_{y}(x)) + \exp(g_{\bot}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \right) $, we know since the classifier is incorrect, then it must be that $\frac{\exp(g_{y}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} + \frac{\exp(g_{\bot}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} < 2/3$ since $g_{y}$ is not the max neither is $g_{\bot}$, otherwise if the sum of these two fractions is greater than 2/3, then $\max_i \frac{\exp(g_{i}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} < 1/3 $ then the maximum must be one of $y$ or $\bot$ which is a contradiction. Finally, the loss is greater then $-2\log(2/3) = 1.17$ which is greater than $1$. \end{enumerate} \item \textbf{Case 1b:} if the classifier is correct $\mathbb{I}_{m(x)=y}=1$, then the 0-1 error is 0, since the \texttt{RealizableSurrogate} loss is $\geq 0$ then it is an upper bound. \end{enumerate} \item \textbf{Case 2:} consider $r(x)=1$ (human predicts): \begin{enumerate} \item \textbf{Case 2a:} if the human is correct then $\mathbb{I}_{h=y}=1$: then the 0-1 error is 0, since the \texttt{RealizableSurrogate} loss is $\geq 0$ then it is an upper bound. \item if the human is incorrect then $\mathbb{I}_{h=y}=0$: the loss is $ -2 \log\left(\frac{\exp(g_{y}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \right) $, we know since we defer, then it must be that $\frac{\exp(g_{y}(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(g_{y'}(x))} \leq 0.5$ (since $g_{y}$ is not the max), thus the loss is greater than $2$ (log is base 2), and the 0-1 loss is 1 in this case. \end{enumerate} \end{enumerate} this concludes the proof of the upper bound. We now prove that $L_{RS}$ is a realizable-consistent loss function. Consider a data distribution and a human under which there exists $m^*,r^* \in \mathcal{M} \times \mathcal{R}$ that have zero error $L_{\mathrm{def}}^{0{-}1}(m^*,r^*)=0$. Associated with $m^*,r^*$, is a set of functions $\mathbf{g}^* \in \mathcal{G}$ that give rise to $m^*,r^*$. Let $\hat{\mathbf{g}}$ be the minimizer of the surrogate loss $L_{RS}$ and the associated classifier and rejector be $\hat{m},\hat{r}$. We now upper bound the 0-1 loss of the pair $\hat{m},\hat{r}$. Let $u \in \mathbb{R}$ be any real number: \begin{align} \nonumber &L_{\mathrm{def}}^{0{-}1}(\hat{m},\hat{r}) \\&\leq \nonumber L_{RS}(\hat{m},\hat{r}) \quad \textrm{ (loss is upper bound)}\\ \nonumber &\leq L_{RS}(um^*,ur^*) \quad \textrm{(since $\hat{m}, \hat{r}$ is optimal for $L_{RS}$ and $\mathcal{M} \times \mathcal{R}$ is closed under scaling)}\\ &= \mathbb{E}[ L_{RS}(um^*,ur^*,x,y,h)|r^*=1] \mathbb{P}(r^*=1) + \mathbb{E}[ L_{RS}(um^*,ur^*,x,y,h)|r^*=0] \mathbb{P}(r^*=0) \label{eq:decompisition} \end{align} Let us investigate the two terms in equation \eqref{eq:decompisition}. The first term is when $r^*=1$, then we must have $g_{\bot}^* > \max_{y} g_{y}^*$ and $\mathbb{I}_{h=y}=1$ since the data is realizable and when we defer the human must be correct. Examining the first term and taking the limit: \begin{align*} & \lim_{u \to \infty} \mathbb{E}[ L_{RS}(um^*,ur^*,x,y,h)|r^*=1] \mathbb{P}(r^*=1) \\ &= \lim_{u \to \infty} \mathbb{E}[ -2 \log\left(\frac{\exp(ug_{y}^*(x)) + \mathbb{I}_{h = y} \exp(ug_{\bot}^*(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(ug_{y'}^*(x))} \right) |r^*=1] \mathbb{P}(r^*=1) \\ &= \lim_{u \to \infty} \mathbb{E}[ -2 \log\left(\frac{\exp(ug_{y}^*(x)) + \exp(ug_{\bot}^*(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(ug_{y'}^*(x))} \right) |r^*=1] \mathbb{P}(r^*=1) \\ &= \mathbb{E}[ -2 \log\left(1 \right) |r^*=1] \mathbb{P}(r^*=1) = 0 \quad \textrm{(applying monotone convergence theorem)} \end{align*} The second term is when $r^*=0$, then we must have $g_{y}^* > \max_{y'\in(\mathcal{Y}\backslash y)\cup\bot} g_{y'}^*$ since the data is realizable. Examining the second term and taking the limit: \begin{align*} & \lim_{u \to \infty} \mathbb{E}[ L_{RS}(um^*,ur^*,x,y,h)|r^*=0] \mathbb{P}(r^*=0) \\ &= \lim_{u \to \infty} \mathbb{E}[ -2 \log\left(\frac{\exp(ug_{y}^*(x)) + \mathbb{I}_{h = y} \exp(ug_{\bot}^*(x)) }{\sum_{y' \in \mathcal{Y} \cup \bot}\exp(ug_{y'}^*(x))} \right) |r^*=0] \mathbb{P}(r^*=0) \\ &= \mathbb{E}[ -2 \log\left(1 \right) |r^*=0] \mathbb{P}(r^*=0) = 0 \quad \textrm{(applying monotone convergence theorem)} \end{align*} Thus combining the above two derivations, we obtain: \begin{align} \nonumber &L_{\mathrm{def}}^{0{-}1}(\hat{m},\hat{r}) \leq 0. \end{align} We just proved that the optimal solution from minimizing \texttt{RealizableSurrogate} leads to a zero error solution in terms of system error which proves that the loss is realizable ($\mathcal{M},\mathcal{R})$-consistent. \end{proof} \begin{theorem} The CrossEntropySurrogate $L_{CE}$ \citep{mozannar2020consistent} is not a realizable $(\mathcal{M},\mathcal{R})$-consistent surrogate for $L_{\mathrm{def}}^{0{-}1}$. \end{theorem} \begin{proof} To prove that the surrogate $L_{CE}$ is not realizable-consistent, we will construct an example with a data distribution and a model class closed under scaling such that: 1) there exists a zero error solution in the model class and 2) the minimizer of $L_{CE}$ has non-zero error. Consider the data distribution illustrated and described in Figure \ref{fig:realizable_lce_proof} consisting of four regions R0,R1,R2 and R3. Each region respectively has mass $1/4+ \alpha, 1/4, 1/4-\alpha,1/4$ . Each region respectively has label $Y=0,Y=1,Y=0,Y=2$. The Human is perfectly accurate on Region 0 and inaccurate on every other region. \begin{figure}[H] \centering \includegraphics[scale=1]{figures/proof_pic_nonlce.pdf} \caption{Data Distribution for our example: the data consists of four regions R0,R1,R2 and R3. Each region respectively has mass $1/4+ \alpha, 1/4, 1/4-\alpha,1/4$ . Each region respectively has label $Y=0,Y=1,Y=0,Y=2$. The Human is only accurate on Region 0. } \label{fig:realizable_lce_proof} \end{figure} We consider a hypothesis class $\mathcal{F}$ parameterized by a scalar $c \in \mathbb{R}$ and four indices each in $i_0,i_1,i_2,i_{\bot} \in \{0,1,2,3\}$. Let $f_i(x) = c \mathbb{I}\{ x \in R_i\}$, a function $f \in \mathcal{F}$ defines a rejector and classifier as: $m(x) = \arg\max \{c \cdot f_{i0}(x), c \cdot f_{i1}(x),c \cdot f_{i2}(x)\}$ (ties are decided uniformly randomly) and $r(x) = \mathbb{I}\{c \cdot f_{\bot}(x) > \max \{c \cdot f_{i0}(x), c \cdot f_{i1}(x),c \cdot f_{i2}(x) \}$. This hypothesis class is closed under scaling. The error minimizing function $f^*$ in this hypothesis class is obtained by setting $c>0$, $i_0=2,i_1=1,i_2=3,i_{\bot}=0$ which obtains zero 0-1 error. No solution with $c<0$ is optimal, since the maximum will always coincide with at least two labels and we break ties in a consistent fashion. This data distribution and hypothesis class is realizable. \paragraph{Surrogate solution.} We will argue that one can obtain a lower $L_{CE}$ loss by deviating from the optimal solution $f^*$. The intuition for why this is the case is that the $L_{CE}$ penalizes misclassifying points even when they are deferred. Hence, when $\alpha$ is sufficiently large, $L_{CE}$ will try to classify the more probable region R0 as label 0 instead of simply deferring on this region and classifying region R2 as label 0. Consider the function $\hat{f}$ defined with arbitrary $c>0$ and $i_0=0,i_1=1,i_2=3,i_{\bot} =0$---note that this function disagrees with the optimal solution on $i_0$ only. Fixing $c$, we will compute the difference of $L_{CE}$ loss between $\hat{f}$ and $f^*$ with the same $c$, this defines only a deviation in terms of $i_0$. We will compute the difference in each region separately. \textbf{Region 1 and Region 3:} On both region 1 and region 3, the difference will be shown to be zero. In both regions, the human is incorrect and note that $i_1$ and $i_2$ are identical in both solutions. The loss of $\hat{f}$ in region 1 is: \begin{equation*} - \frac{1}{4} \log \left( \frac{e^c}{3+e^c} \right) \end{equation*} this is the same as the loss of $f^*$, by symmetry the loss is the same in region 3. We will now compute the sum of the difference in region 2 and region 0: \textbf{Region 2:} In this region the human is also incorrect, the difference in the loss of $\hat{f}$ and $f^*$ is: \begin{align*} \mathbb{E}_{x \in R2}[ L_{CE}(f^*) -L_{CE}(\hat{f}) ]= (\frac{1}{4} - \alpha) \cdot \left(\log \left( \frac{1}{4} \right) - \log \left( \frac{e^c}{3+e^c} \right) \right) \in [-(\frac{1}{4} - \alpha) \log(4), 0] \end{align*} \textbf{Region 0:} In this region the human is correct, the difference is : \begin{align*} &\mathbb{E}_{x \in R0} [L_{CE}(f^*) -L_{CE}(\hat{f})] \\& = (\frac{1}{4} + \alpha) \cdot \left(- \log \left( \frac{1}{3+e^c} \right) - \log \left( \frac{e^c}{3+e^c} \right) + \log \left( \frac{e^c}{2+2e^c} \right) + \log \left( \frac{e^c}{2+2e^c} \right) \right) \end{align*} To compute the difference in the loss between $\hat{f}$ and $f^*$, we sum the difference in Region 2 and Region 0: \begin{align*} &L_{CE}(f^*) -L_{CE}(\hat{f}) \\ &= \frac{1}{4} \left( \log \left( \frac{1}{4} \right) - \log \left( \frac{e^c}{3+e^c} \right) - \log \left( \frac{1}{3+e^c} \right) - \log \left( \frac{e^c}{3+e^c} \right) + 2\log \left( \frac{e^c}{2+2e^c} \right) \right) \\ &+ \alpha \left( - \log \left( \frac{1}{3+e^c} \right) + 2\log \left( \frac{e^c}{2+2e^c} \right) - \log \left( \frac{1}{4} \right) \right) \\ &= -(\frac{1}{4} + \alpha) \left( \log \left( \frac{1}{3+e^c} \right) - 2\log \left( \frac{e^c}{2+2e^c} \right) \right) - \frac{1}{2} \log \left( \frac{e^c}{3+e^c} \right) + (\frac{1}{4} - \alpha) \log \left( \frac{1}{4} \right) \end{align*} We can simplify this difference to further become: \begin{equation*} \frac{1}{4} \left(8 \alpha c - 2 \log(4) -2 (1+4\alpha) \log(1+e^c) + (3+4 \alpha) \log(3+e^c) \right) \end{equation*} Note that when $c=0$, the above difference is 0. Let us set $\alpha = 0.125$ for concreteness (other values of $\alpha$ also work, in particular larger values, but not all smaller values). We compute the derivative of the difference with respect to $c$, obtaining: \begin{align*} \frac{d}{dc} (L_{CE}(f^*) -L_{CE}(\hat{f})) &= \frac{1}{4} \left( \frac{3.5 e^c}{e^c + 3} - \frac{3 e^c}{e^c + 1} + 1 \right) \\ &= \frac{0.375 (2 - e^c + e^{2c}))}{(1 + e^c) (3 + e^c)} > 0 \end{align*} We just showed that the difference has derivative strictly larger than 0 with respect to $c$, moreover the difference is $0$ when $c=0$, thus when $c>0$ the difference is strictly bigger than 0. We just proved that with respect to the surrogate loss $L_{CE}$, the optimal solution with respect to $L_{\mathrm{def}}^{0{-}1}$ is not optimal, thus the surrogate is not a realizable $(\mathcal{M},\mathcal{R})$-consistent surrogate for $L_{\mathrm{def}}^{0{-}1}$ \end{proof}
{'timestamp': '2023-01-18T02:15:29', 'yymm': '2301', 'arxiv_id': '2301.06197', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06197'}
arxiv
\section{Introduction} Detecting buildings from remote sensing imagery has been extensively studied~\cite{liow1990use, li2008adaptive, ferraioli2009multichannel} as it is of great importance for many fields, such as urban planning, population estimation, economic development, and topographic map production. Since the amount of data cannot be processed manually, data-driven machine learning methods are needed to reduce the manual work required to obtain reliable urban development mappings. Segmenting buildings on a large scale is a challenging task because satellite or aerial images can be very diverse, for example, because of different styles of architecture, building materials, and topography. Quite a number of benchmarks for the segmentation of buildings have been published~\cite{maggiori2017dataset, MnihThesis, Jyhne2022, 9460988, roscher2020semcity, ji2018fully, rottensteiner2013isprs, li2021pointflow, weber2021artifive}. Since the silhouettes of buildings can be very different, combining several datasets with different characteristics can lead to more generally applicable building segmentation models. In this study, we propose a framework for building segmentaion referred to as \emph{BuildSeg}. We consider the Inria Aerial Image Labeling Benchmark~\cite{maggiori2017dataset} combined with the MapAI-competition dataset~\cite{Jyhne2022} to improve the segmentation performance of the latter. When designing the BuildSeg framework, our goal was to design a segmentation pipeline that is generally applicable. Therefore, several benchmarks and corresponding models are available within the framework~\cite{maggiori2017dataset, MnihThesis, Jyhne2022, 9460988, roscher2020semcity, ji2018fully, rottensteiner2013isprs, li2021pointflow, weber2021artifive}. \begin{figure} \centering \includegraphics[scale=0.16]{result.png} \caption{Examples from the MapAI-competition~\cite{Jyhne2022}. The left image~(a) shows the ground-truth data, and the right image~(b) the prediction created by the ConvNeXt model.} \label{fig:results} \end{figure} Neural networks and in particular convolutional neural networks (CNNs) have become the go-to methods for image segmentation, see \cite{wang2022comprehensive} for a recent review. The U-Net~\cite{ronneberger2015u} is one of the fundamental segmentation architectures, and we have been successfully applying it to remote sensing imagery (e.g., \cite{brandt:20,hellweg:22}). It uses an encoder/decoder structure which processes the input image at different scales and allows to detect high-frequency patterns while being computationally feasible. The original U-Net architecture can be generalized by replacing the encoder and decoder by tailored networks. This makes the U-Net very versatile and allows to utilize state-of-the-art encoders. In our framework, we consider two different U-Net variants, SegFormer~\cite{xie2021segformer} and ConvNeXt U-Net~\cite{ConvNeXt}, where the decoder of the ConvNeXt U-Net are backwards strided convolutions~\cite{long2015fully}. The main contributions of this study can be summarized as follows: (1) we propose a general framework called BuildSeg based on~\cite{mmseg2020} for segmenting buildings in aerial images of different resolutions; (2) we explore how 3D information from LiDAR affects the performance of deep CNN models; (3) we combine different datasets and apply rectangle-aware post-processing to create rectangular boundaries that match the labels more accurately. The proposed approach achieved the IOU of {0.7902} for the segmentation of images in \emph{MapAI: Precision in Building Segmentation}~\cite{Jyhne2022} benchmark. \begin{figure} \centering \includegraphics[scale=0.15]{prediction_seg.png} \caption{Building predictions with SegFormer, overlaid are the prediction result of the model.} \label{fig:prediction} \end{figure} \section{Method} We developed our framework for the MapAI challenge~\cite{Jyhne2022}, which provides both aerial images and LiDAR data. The challenge formulates two tasks. The first is the segmentation of buildings only using the aerial imagery. In the second task, the LiDAR data must be segmented either with or without aerial images. We additionally used the data from~\cite{maggiori2017dataset} to improve the performance. A subset of {5000} images was considered as additional training data. To align the image sizes, we cropped the input images to \(500\times500\). To further increase diversity in the data, we applied augmentations including random cropping, random vertical and horizontal axis flipping, and random changes to brightness ($\delta=32$), contrast (range: $0.5 - 1.5$), saturation (range: $0.5 - 1.5$), and hue ($\delta=18$). We tried different models such as the standard U-Net and variants of it, namely ConvNeXt and SegFormer~\cite{xie2021segformer}. For the ConvNeXt model, ConvNeXt~\cite{ConvNeXt} is used as encoder and backwards strided convolution~\cite{long2015fully} as decoder. We also tried EfficientNet~\cite{pmlr-v97-tan19a} as encoder but the results were not as good. All encoders were pre-trained on ImageNet. Two metrics were considered to measure the performance: intersection over union (IOU) and boundary intersection over union (BIOU)~\cite{cheng2021boundary}. LiDAR height data were added directly as an additional channel to the multi-spectral data when available. For post-processing, we applied a sequence of morphological opening and closing operations to detect lines and then removed points not matching the hypothesis of a rectangular structure. \section{Experimental Results} The results are summarized in Table~\ref{table:exp}. The model SegFormer-B5 performed best in terms of IOU and BIOU for the images. Note that SegFormer-B5 and SegFormer-B4 have more layers than SegFormer-B0. \begin{table} \caption{Performance of different models on the MapAI-competition image test set (without post-processing). As baseline we show a standard U-Net~\cite{ronneberger2015u}.} \label{table:exp} \begin{center} \begin{tabular}{@{}l|c c c@{}} Model & {IOU} & {BIOU} \\ U-Net & 0.7611 & 0.5823 \\ ConvNext & 0.7841 & 0.6105 \\ SegFormer-B0 & 0.7632 & 0.5901 \\ SegFormer-B4 & 0.7844 & 0.6116 \\ SegFormer-B5 & 0.7902 & 0.6185 \\ \end{tabular} \end{center} \end{table} Figure~\ref{fig:prediction} illustrates results of the SegFormer-B5 model, and it can be seen that the buildings were nicely captured. The averaged score, computed as the mean of IOU and BIOU, was {0.7044} without post-processing and slightly increased to {0.7045} after post-processing, so the latter should be preferred if IOU and BIOU weight the same. When combined with LiDAR, the method reached an IOU of {0.8506} and a BIOU of {0.7461}. \section{Conclusion} For the MapAI-competition, we proposed a solution that utilizes additional building datasets and current state-of-the-art deep learning architectures. The method achieved an IOU of {0.7902} and boundary IOU of {0.6185} for the task of segmenting buildings in aerial images. Using additional information from LiDAR further improved the results, increasing the IOU to {0.8506} and the BIOU to {0.7461}. \newpage \bibliographystyle{IEEEtran}
{'timestamp': '2023-01-18T02:15:20', 'yymm': '2301', 'arxiv_id': '2301.06190', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06190'}
arxiv
\section{Introduction} Resting state fMRI (rs-fMRI) is a popular paradigm for assessing brain activity and localize critical functions through steady state patterns of co-activation \cite{fox2007spontaneous}. Network-based approaches to rs-fMRI analysis often group voxels in the brain into regions of interest (ROIs) via a standard anatomical or dervied functional atlas~\cite{nandakumar2018defining},\cite{nandakumarmodified}. From here, the synchrony between the regional time courses can be summarized using a similarity matrix, which can be used as input for further analysis. In the context of neuropsychiatric disorders such as Autism, inter-patient variability often manifests as a spectrum of impairments, that clinicians quantify as ``behavioral score" of clinical severity obtained from an exam. Identifying sub-networks in the brain that are predictive of such severity can help us understand the social and behavioral implications of the disorder for developing effective behavioral therapy. Building predictive models at the patient level continues to remain as an open challenge due to the high data dimensionality and considerable inter-subject variation and noise in the resting state acquisition. From a frequentist perspective, predictive models often follow a two step procedure. To combat the data-dimensionality, feature selection is first applied to the raw correlation values i.e. obtained by vectorizing the entries in the similarity matrices. Examples approaches include graph theoretic measures (betweenness,node degree), statistical and/or embedding features obtained from representation learning techniques such as PCA, k-PCA or ICA \cite{khosla2019machine}. Next, regression models such as Random Forests/ Support Vector Regression are applied to the derived features to predict the clinical measures. These strategies have shown success at modeling the group-averaged functional connectivity across the cohort but often fail to accurately capture individual variability. Consequently, the generalization power of these techniques is limited \cite{d2021blending},\cite{d2020joint} \cite{d2019coupled} \iffalse \begin{figure*}[t!] \centering \includegraphics[scale=0.43]{Extraction.PNG} \caption{We group voxels in the brain into ROIs defined by a standard atlas and compute the average time courses for each ROI. The correlation matrix captures the synchrony in the average time courses}\label{Ex} \end{figure*} \fi In an attempt to address these limitations, recent focus has shifted towards mechanistic network models that are capable of modeling hierarchy onto existing connectivity notions. For example, community detection techniques are population-level models that are designed to identify interconnected subgraphs within a larger network. These techiniques have refined our understanding of the organization of complex systems such as brain networks \cite{bardella2016hierarchical},\cite{andersen2014non}. Extensions to Bayesian community detection algorithms \cite{venkataraman2016bayesian},\cite{venkataraman2013connectivity}, \cite{venkataraman2013connectivity}, \cite{venkataraman2015unbiased} have provided valuable insights in characterizing the social and communicative deficits in neurodevelopmental disorders such as schizophrenia and Autism. Unfortunately all of the above focus on group characterizations, and even studies that consider patient variability \cite{heinsfeld2018identification} or hierarchy in \cite{dai2017predicting} have little generalization power on new subjects. The recent success of network decomposition models \cite{batmanghelich2012generative} in this space largely based on their ability to simultaneously model the patient and group level information. For example, the work of \cite{eavani2015identifying} introduces a common principal components formulation, where multiple rank one matrix outer products capturing the underlying `generative' basis are combined using patient specific coefficients. The sparse basis networks identify meaningful co-activation patterns common to all the patients, and the coefficients model the patient variability. Similar to the joint network optimization model in \cite{d2020joint,d2018generative}, this project explores the `discriminative' nature of these coefficients. Specifically, we estimate clinical severity of every subject first by constructing bayesian regression models which map the subject-coefficients to the behavioral domain once the decomposition is estimated, and then in an end-to-end bayesian model. Through our experiments, we demonstrate the benefit of this joint bayesian formulation in terms of capturing the variability in the cohort, as well as for uncertainty quantification of the estimates. We have organised this letter as follows \footnote{This work was performed as a final project for graduate level Bayesian Statistics course offered by the Applied Mathematics and Statistics Department at Johns Hopkins University}. We first briefly describe the ASD dataset which we validate on. Next, our methods section briefly introduces the dictionary decomposition to jointly model group-averaged and patient-specific representations, along with the corresponding inference algorithm. From here, we construct two bayesian regression algorithms, the first of the vanilla variety and the second of the variable selection (SVSS) flavour to predict clinical severity from the subject specific coefficients and the estimation algorithms. We compare and this performance to classical penalized linear regression. Finally, we propose a joint heirarchical bayesian model that simultaneously infers the dictionary representation and regression model parameters given the correlation matrices and scores in an end-to-end fashion. \subsection{Dataset} \paragraph{\textbf{rs-fMRI Dataset and Preprocessing.}} We evaluate our method on a cohort of $52$ children with high-functioning ASD released as a part of ABIDE \cite{heinsfeld2018identification} from the KKI site. Rs-fMRI preprocessing was performed according to the prevalidated pipeline in \cite{venkataraman2016bayesian} We use the Automatic Anatomical Labeling (AAL) atlas to define $P=116$ cortical, subcortical and cerebellar regions. \paragraph{\textbf{Clinical Scores.}} We consider two measures of clinical severity: Autism Diagnostic Observation Schedule (ADOS) total raw score \cite{payakachat2012autism}, which captures the social and communicative interaction deficits of the patient along with repetitive behaviors (dynamic range: $0$-$30$), and the Social Responsiveness Scale (SRS) total raw score \cite{payakachat2012autism} which characterizes social responsiveness (dynamic range: $70$-$200$). \section{Methods} \subsection{Dictionary Learning on rs-fMRI correlation matrices} \begin{wrapfigure}[12]{R}{0.35\textwidth} \small \begin{center} \centerline{\fbox{\includegraphics[scale =0.42]{Scree_Plots_BS.PNG}}} \medskip {\caption{\footnotesize{Scree Plot for $\mathbf{\Gamma}_{n}$}}\label{Scree}} \end{center} \end{wrapfigure} We define $\mathbf{\Gamma}_{n} \in \mathcal{R}^{P \times P}$ as the correlation matrix for patient $n$, where $P$ is the number of regions given by the parcellation. We model $\mathbf{\Gamma}_{n}$ using a group average basis representation and a patient-specific network strength term. The matrix $\mathbf{B} \in \mathcal{R}^{P \times K}$ is a concatenation of $K$ elemental bases vectors $\mathbf{b}_{k} \in \mathcal{R}^{P \times 1}$, i.e. $\mathbf{B} := \mathbf{b}_{1} \quad \mathbf{b}_{2} \quad ... \quad \mathbf{b}_{K}$, where $K \ll P$. These bases capture steady state patterns of co-activation across regions in the brain. While the bases are common to all patients in the cohort, the combination of these subnetworks is unique to each patient and is captured by the non-negative coefficients $\mathbf{c}_{nk}$. We include a non-negativity constraint $\mathbf{c}_{nk}\geq 0$ on the coefficients to preserve the positive semi-definite structure of the correlation matrices $\{\mathbf{\Gamma}_{n}\}$. The orthonormality constraint on $\mathbf{B}$ helps us learn uncorrelated sub-networks that explain the rs-fMRI data well and implicitly regularize the optimization. Our complete rs-fMRI data representation is: \begin{equation} \mathbf{\Gamma}_{n} \approx \sum_{k}{\mathbf{c}_{nk}\mathbf{b}_{k}\mathbf{b}_{k}^{T}} \ \ \ s.t. \ \ \ \mathbf{c}_{nk}\geq 0 \ \ \ \ \mathbf{B}^{T}\mathbf{B} =\mathcal{I}_{K} \label{eqn1:Eqn1} \end{equation} $\mathcal{I}_{K}$ is the $K \times K$ identity matrix. As seen in Eq.~(\ref{eqn1:Eqn1}), we model the heterogeneity in the cohort using a patient specific term in the form of $\mathbf{c}_{n}: = \mathbf{c}_{n1}\quad ... \quad \mathbf{c}_{nK}^{T} \in \mathcal{R}^{K \times 1}$. Taking $\textbf{diag}(\mathbf{c}_{n})$ to be a diagonal matrix with the $K$ patient coefficients on the diagonal and off-diagonal terms set to zero, Eq.~(\ref{eqn1:Eqn1}) can be re-written in matrix form as follows: \begin{equation} \mathbf{\Gamma}_{n} \approx {\mathbf{B}\textbf{diag}({\mathbf{c}}_{n})\mathbf{B}^{T}} \ \ \ s.t. \ \ \ \mathbf{c}_{nk}\geq 0 \label{eqn:joint} \end{equation} Overall, this formulation is similar to common principal components from the statistics and manifold learning literature. Essentially, this strategically reduces the high dimensionality of the data, while providing a patient level description of the correlation matrices. We choose $K=15$ based on the eigenspectrum on $\{\mathbf{\Gamma}_{n}\}$ (See Fig.~\ref{Scree}). \subsubsection{Optimization} We use alternating minimization to optimize Eq.~(\ref{eqn:joint}) with respect to $\mathbf{B},\{\mathbf{c}_{n}\}$. Here, we cycle through the updates for the dictionary $\mathbf{B}$, and loadings $\{\mathbf{c}_{n}\}$, to obtain a \textit{joint solution}. \par We note that there is a closed-form Procrustes solution for quadratic objectives. However, Eq.~(\ref{eqn:joint}) is bi-quadratic in $\mathbf{B}$, so it cannot be directly applied. Therefore, we adopt the strategy in \cite{d2020joint}, by which we introduce the constraints of the form $\mathbf{D}_{n} = \mathbf{B}\mathbf{diag}(\mathbf{c}_{n})$, with corresponding augmented Lagrangian variables $\{\mathbf{\Lambda}_{n}\}$. Thus, our objective from Eq.~(\ref{eqn:joint}) now becomes: \begin{multline} \mathcal{J}_{c} = \sum_{n}{\vert\vert{\mathbf{\Gamma}_{n} - \mathbf{D}_{n}\mathbf{B}^{T}}\vert\vert}^{2}_{F} + \sum_{n}{\Big[{\text{Tr}{\left[{(\mathbf{\Lambda}_{n})^{T}({\mathbf{D}_{n}-\mathbf{B}\mathbf{diag}(\mathbf{c}_{n})})}\right]}}+{{\frac{1}{2}}~{\vert\vert{\mathbf{D}_{n}-\mathbf{B}\mathbf{diag}(\mathbf{c}_{n})}\vert\vert}_{F}^{2}}}\Big] \label{const} \end{multline} along with the constraints $\mathbf{c}_{nk} \geq 0$ and $\mathbf{B}^{T}\mathbf{B} = \mathcal{I}_{K}$. See Algorithm~\ref{Alg:1} \begin{algorithm}[b] \SetAlgoLined \KwResult{Dictionary $\mathbf{B}$ and patient-specific coefficients $\{\mathbf{c}_{n}\}$} Initialize $\mathbf{B}^{0}$ as the top eigenvectors of the mean of $\{\Gamma_{n}\}$\; \While{Not converged}{ \textbf{Step 1:} Compute quadratic programming solution for $\{\mathbf{c}_{n}\}$; \\ \textbf{Step 2:} Compute Procrustes solution for $\mathbf{B}$; \\ \textbf{Step 3:} Compute Augmented Lagrangian updates for $\{\mathbf{D}_{n},\mathbf{\Lambda}_{n}\}$; } \caption{Dictionary Learning on rs-fMRI correlation matrices} \label{Alg:1} \end{algorithm} \subsection{\textbf{Bayesian Regression Models}} We combine this representation learning with a bayesian regression models to map to clinical severity. Our first set of models consider two classes of Bayesian Regression frameworks to predict behavior from the coefficients $\{\mathbf{c}_{n}\}$. \subsubsection{Bayesian Linear Regression (BLR)} Let $\mathbf{y}_{n}$ be the scalar behavioral severity scores for a patient n. We model each $\mathbf{y}_{n} = \mathbf{\beta}_{0} + \mathbf{\beta}^{T} \mathbf{c}_{n} + \epsilon_{n}$, where $\epsilon_{n} \sim \mathcal{N}(0,\sigma^2)$. In this model, we consider that the samples are drawn iid given $\mathbf{c}_{n}$. Our likelihood function is parametrized by $\mathbf{\beta} \in \mathcal{R}^{K\times1} $ and takes the form: \begin{gather} \ell(\{\mathbf{y}_{n}\} \vert \{\mathbf{c}_{n}\},\mathbf{\beta},\mathbf{\beta}_{0},\sigma^2) = \prod_{n=1}^{N}{\ell(\mathbf{y}_{n} \vert \mathbf{c}_{n},\mathbf{\beta},\mathbf{\beta}_{0},\sigma^2)} = \prod_{n=1}^{N}{\mathcal{N}(\mathbf{y}_{n};\mathbf{\beta}^{T}\mathbf{c}_{n},\mathbf{\beta}_{0},\sigma^2)} \label{blm} \end{gather} We impose a conjugate prior on $(\mathbf{\beta},\sigma^2)$ of the normal inverse-gamma form as follows: \begin{gather*} P(\mathbf{\beta};\beta_{0}\vert\sigma^2) = \mathcal{N}(\mathbf{M},\sigma^2 \mathbf{V}) \ \ \text{and} \ \ \sigma^{2} \sim \text{IG}(a,b) \end{gather*} We set $\mathbf{M}=\mathbf{0} \in \mathcal{R}^{(K+1)\times 1}$ and $a=3,b=1$ as mild assumptions on the prior. For our experiments, we apriori assume that the entries in $\mathbf{\beta}$ are uncorrelated, i.e. $\mathbf{V} = \sigma_{\beta}^2 \cdot \mathcal{I}_{K+1}$. \par For our experiments, we consider different values of $\sigma^{2}_{\beta}$ to determine the model with the best fit as a grid search. We use a standard Gibbs Sampling algorithm (Implemented using Matlab's econometrics toolbox) to generate pairs of samples from the posterior $\mathbf{\beta},\mathbf{\beta}_{0},\sigma^2\vert \{\mathbf{c}_{n},\mathbf{y}_{n}\}$ as follows: \begin{itemize} \item[1] Initialize $\mathbf{\beta},\mathbf{\beta}_{0},\sigma^2$ \item[2] Sample $\mathbf{\beta};\mathbf{\beta}_{0}\vert \{\mathbf{c}_{n},\mathbf{y}_{n}\}, \sigma^2 \sim \mathcal{N}(\mu_{n},\mathbf{\Sigma}_{y} )$ where $\mathbf{\mu}_{n} = (\hat{\mathbf{C}}\hat{\mathbf{C}}^{T} + \sigma^2 \mathbf{V})^{-1}(\hat{\mathbf{C}}\hat{\mathbf{C}}^{T} \hat{\mathbf{\beta}} )$ and $\mathbf{\Sigma}_{y} = (\hat{\mathbf{C}}\hat{\mathbf{C}}^{T} + \sigma^2 \mathbf{V})$, $\hat{\mathbf{C}} = \mathbf{1};\mathbf{C}$ \item[3] Sample $ \sigma^2 \vert \{\mathbf{c}_{n},\mathbf{y}_{n}\}, \mathbf{\beta};\mathbf{\beta}_{0} \sim \text{IG}\Big(a +{n}/{2},b_{0} + (\sum{\mathbf{y}^{2}_{n}} - \mathbf{\mu}_{n}^{T}\mathbf{\Sigma}_{y}\mathbf{\mu}_{n})/{2} \Big) $ \item[4] After a burn-in, we keep the rest of the samples as generated from the posterior \end{itemize} \subsubsection{Bayesian Stochastic Search Variable Selection (SVSS)} The goal of variable selection over the linear regression model in Eq.~(\ref{blm}) is to only include only those predictors supported by data in the final regression model. However, analysing $2^{(K+1)}$ permutations of models is computationally inefficient. Instead, Stochastic Variable Selection looks at this problem from a Bayesian perspective. Here, if we wish to exclude a coefficient from a model, we assign it a degenerate posterior distribution that approximates a Dirac-Delta. Practically, if a coefficient is to be included, we draw the coefficient from an $\mathbf{\beta}_{k} \sim \mathcal{N}(\mathbf{0},\mathbf{V}_{1k})$, else $\mathbf{\beta}_{k} \sim \mathcal{N}(\mathbf{0},\mathbf{V}_{2k})$, where $\mathbf{V}_{2k}$ is small relative to $\mathbf{V}_{1k}$. We represent inclusion vs exclusion via a binary variable $\gamma_{k}$, $k =\{0, \dots K\}$. Thus the sample space $\gamma_{k}$ has cardinality $2^{(K+1)}$, and the coefficients $\mathbf{\beta}_{0}, \dots \mathbf{\beta}_{K}$ are independent apriori. Our likelihood model takes the form: \begin{gather*} \ell(\{\mathbf{y}_{n}\} \vert \{\mathbf{c}_{n}\},\mathbf{\beta},\mathbf{\beta}_{0},\sigma^2) = \prod_{n=1}^{N}{\mathcal{N}(\mathbf{y}_{n};\mathbf{\beta}^{T}\mathbf{c}_{n},\mathbf{\beta}_{0},\sigma^2)} \\ \text{If} \ \ \mathbf{\gamma}_{k} = 1 , \mathbf{\beta}_{k} \sim \mathcal{N}(0,\sigma^2\mathbf{V}_{1k}) \\ \text{If} \ \ \mathbf{\gamma}_{k} = 0 , \mathbf{\beta}_{k} \sim \mathcal{N}(0,\sigma^2\mathbf{V}_{2k}) \end{gather*} Given $\mathbf{\beta}_{k}$, $\gamma_{k}$ is conditionally independent of the data. Therefore, the full conditional posterior distribution of the probability that the variable $k$ is included in the model. \begin{gather*} P(\mathbf{\gamma}_{k}\vert \mathbf{\beta}_{0},\mathbf{\beta},\sigma^2,\mathbf{\gamma}_{\neq k}) \propto \mathbf{g}_{k} \mathcal{N}(\mathbf{\beta}_{k};0,\sigma^{2} \mathbf{V}_{1k}) \\ \mathbf{\gamma}_{k} \sim \text{Bernoulli}(\mathbf{g}_{k}) \end{gather*} We impose a conjugate prior structure on $\mathbf{\beta}_{0};\mathbf{\beta},\{\mathbf{\gamma}\},\sigma^2$ of the following form: \begin{gather*} p(\mathbf{\beta};\mathbf{\beta}_{0},\mathbf{\gamma},\sigma^2) = p(\sigma^2) \prod^{K}_{k=0} p(\beta_{k}\vert\gamma_{k})p(\gamma_{k}) \\ \mathbf{\beta}_{k} \vert \mathbf{\gamma}_{k} \sim \mathbb{I}(\gamma_{k}=0) \mathcal{N}(0,\sigma^2\mathbf{V}_{2k}) + \mathbb{I}(\gamma_{k}=1) \mathcal{N}(0,\sigma^2\mathbf{V}_{1k}) \\ \sigma^2 \sim \text{IG}(a,b) \end{gather*} Again, we use a diffuse prior with $a=3,b=1$ and $\mathbf{g}_{k} =0.5$. For our experiments, we consider different values of $\{\mathbf{V}_{1k},\mathbf{V}_{2k}\}$ to determine the model with the best fit as a grid search. We use a standard Gibbs Sampling algorithm (Implemented using Matlab's econometrics toolbox) to generate pairs of samples from the posterior. Although a closed-form posterior exists for conjugate mixture priors, since the prior $\{\mathbf{\beta}\}\vert\sigma^2,\{\gamma_{k}\}$ is marginalized by $\gamma$, this implementation uses MCMC to sample from the joint posterior $\mathbf{\beta},\mathbf{\beta}_{0},\{\mathbf{\gamma}_{k}\} \vert \{\mathbf{c}_{n},\mathbf{y}_{n}\},\sigma^2$. For both of these methods, we run the chains for $5000$ samples as burn in and generate $10000$ additional samples to approximate the posterior. \begin{wrapfigure}[20]{R}{0.48\textwidth} \small \begin{center} \centerline{{\includegraphics[scale =0.28]{Bayesian_SubN_ADOS.PNG}}} \medskip {\caption{\footnotesize{\textbf{(T)} Histogram for ADOS \textbf{(L)} true samples, \textbf{(M)} posterior from BLR \textbf{(R)} posterior from SVSS \textbf{(B)} Subnetworks from SVSS. \textbf{(L)} Visual \& Subcortical \textbf{(R)} Default Mode Network}}\label{SubN}} \end{center} \end{wrapfigure} \begin{figure*}[t!] \centering \includegraphics[scale=0.49]{Betas_PP.PNG} \caption{Prior and Posterior Densities for $\mathbf{\beta},\beta_{0}$ by Bayesian Linear Regression on ADOS. The blue line represents the posterior, while the dotted red line is the prior }\label{posterior_densities} \end{figure*} \subsubsection{Evaluation and Results} We evaluate the generalization performance of the model using a five fold cross validation like strategy. In each fold, eighty percent of the examples are used for estimation, and the rest of the twenty percent as forecasting. First, we vary the free parameters $\sigma_{\beta}^2$ for BLR and $\{\mathbf{V}_{1k},\mathbf{V}_{2k}\}$ for SVSS and determine the parameters that fit the estimation points the best. We then evaluate the performance on the held-out forecasting examples. Table~\ref{table:1} compares the performance based on the root mean square error (rMSE) and normalized mutual information (NMI) metric, between the predicted and true samples. SVSS performs better than BLR for both scores. As a baseline, we also report the performance of a classical ridge regression on $\mathbf{c}_{n}$ to predict $\mathbf{y}_{n}$ as well. Using bayesian approaches, we obtain more than a point estimate of each $\mathbf{y}_{n}$ as in frequentist methods. We can also quantify the uncertainty of the estimate around the a posteriori maximum as summary statistics. \begin{table}[t!] \footnotesize \centering {\caption{\footnotesize{Performance evaluation using \textbf{root Mean Squared Error (rMSE)} \& \textbf{Normalized Mutual Information (MI)}. Lower MAE \& higher MI indicate better performance.}}\label{table:1}} \begin{tabular}{|c |c | c| c| c|} \hline \textbf{Score} &\textbf{Method} &\textbf{rMSE Train} & \textbf{rMSE Test} & \textbf{MI Test} \\ \hline \hline \multirow{3}{4em}{ADOS} & BLR & 2.76~\rpm~{0.27} & 4.15~\rpm~{0.26} & 0.48 \\ & SVSS & 2.51~\rpm~{0.45} & 3.80~\rpm~{0.37} & 0.56 \\ & Ridge Regression & 2.70~\rpm~{2.32} & 3.35~\rpm~{2.11} & 0.41 \\ [0.2ex] \hline \multirow{3}{4em}{SRS} & BLR & 34.33~\rpm~{5.44} & 29.23~\rpm~{5.81} & 0.71 \\ & SVSS & 25.23~\rpm~{5.10} & 27.99~\rpm~{4.99} & 0.76\\ & Ridge Regression & 19.29~\rpm~{11.11} & 24.44~\rpm~{18.18} & 0.66 \\ [0.4ex] \hline \end{tabular} \label{Table:1} \end{table} In Fig.~\ref{SubN}, we compare the histograms of the true samples against the samples generated by one run of the BLM and SVSS models for the ADOS score, according to the parameters selected above. The overlap with the true distribution is indicative of how well the models are able to approximate the data generating process. Fig.~\ref{posterior_densities} compares the prior and posterior densities for the coefficients $\mathbf{\beta},\beta_{0}$ learned for BLR. Finally, SVSS allows us to isolate the coefficients $\beta_{k}$ which are consistently selected as predictors. For both ADOS and SRS, $\{\mathbf{c}_{n,7}, \mathbf{c}_{n,8}\}$ are the features that are selected most often (have the highest magnitude of $\beta_{k} > 90 \%$ of the times). We plot the corresponding subnetworks $\mathbf{B}_{k}$ for $k=7,8$ in Fig.~\ref{SubN}. Thus, SVSS offers us interpretability in terms of the features relevant to prediction. Altered connectivity in these networks, both default mode and in visual processing areas has been found to be associated with ASD previously \cite{venkataraman2011joint}. \begin{wrapfigure}[20]{R}{0.45\textwidth} \small \begin{center} \centerline{{\includegraphics[scale =0.50]{Bayesian_Graphical_Model.PNG}}} \medskip {\caption{\footnotesize{Hierarchical Bayesian Model for Joint Representation Learning and Prediction}}\label{GM}} \end{center} \end{wrapfigure} \subsection{A Bayesian Model for Joint Representation Learning and Prediction} In the previous two approaches, the feature extraction is combined with prediction in a pipelined fashion, decoupling the two. However, inherently, the two views of data are complementary to each other. In this section, we propose to use a bayesian model which mimics this representation learning step. At the same time, the patient-specific coefficients relate to prediction via a bayesian linear regression. By combining the dictionary learning directly with prediction, we expect to learn a joint rs-fMRI representation that is more aligned with clinical prediction, similar to the principles in \cite{d2020joint} \par Recall that the correlation matrices $\{\mathbf{\Gamma}_{n}\}$ are positive semi-definite. Recall that we use the common principal components decomposition $\mathbf{\Gamma}_{n} \approx \mathbf{B} \mathbf{diag}(\mathbf{c}_{n})\mathbf{B}^{T} $ Additionally, we center $\mathbf{y}_{n}$ to have zero mean. Accordingly, our data likelihood uses an Inverse Wishart distribution ($\mathbf{\Phi}_{W}$) on $\mathbf{\Gamma}_{n}$ centered around $\mathbf{B} \mathbf{diag}(\mathbf{c}_{n})\mathbf{B}^{T}$ with degrees of freedom $\nu_0$. We chose $\nu_0 = P+5$ to center $\{\mathbf{\Gamma}_{n}\}$ loosely around $\mathbf{B}\mathbf{diag}(\mathbf{c}_{n})\mathbf{B}^{T}$. Again, we predict the clinical scores via a linear regression $\mathbf{y}_{n} \approx \mathbf{c}^{T}_{n}\mathbf{w}$ with the linear regression weights $\mathbf{w} \in \mathcal{R}^{K\times 1}$. Let $\theta = (\sigma_{y}^2,\sigma_{c}^2,\sigma_{w}^2)$. Given $\{\mathbf{w},\{\mathbf{c}_{n}\}\}$, we assume that $\mathbf{y}_{n}$ are independent, while given $\{\mathbf{B},\{\mathbf{c}_{n}\}\}$, $\mathbf{\Gamma}_{n}$ are independent. Thus, if $Q =\nu_{0}-P-1$: \begin{gather} \ell(\{\mathbf{\Gamma}_{n},\mathbf{y}_{n}\} \vert \{\mathbf{c}_{n}\},\mathbf{w},\mathbf{B},\theta) = \prod_{n=1}^{N}{\mathcal{N}(\mathbf{y}_{n};\mathbf{c}_{n}^{T}\mathbf{w},\mathbf{\sigma}_{y}^2)} \ \mathbf{\Phi}_{W}\Bigg[\mathbf{\Gamma}_{n};\frac{\mathbf{B} \mathbf{diag}(\mathbf{c}_{n})\mathbf{B}^{T}}{Q},\nu_{0}\Bigg] \end{gather} We apriori assume that $\mathbf{\Theta} = \{\mathbf{B},\{\mathbf{c}_{n}\},\mathbf{w}\}$ are independent given $\mathbf{\theta}$. Therefore: \begin{gather} P(\mathbf{\Theta},\mathbf{\theta}) = P(\sigma^2_{w}) P(\sigma^2_{c}) P(\sigma^2_{y}) P(\mathbf{w}\vert \sigma^2_{w}) \prod_{k=1}^{K} P(\mathbf{b}_{k})\prod_{n=1}^{N} P(\mathbf{c}_{n}\vert \sigma_{c}^2) \end{gather} To approximate a basis $\mathbf{B}$ that is almost orthogonal [], we use a multivariate normal prior of the form: \begin{gather} P(\mathbf{b}_{k}) = \mathcal{N}(\mathbf{0},\sigma_{B}^2 \mathcal{I}_{P}) \ \ \ \text{s.t.} \ \ \sigma_{B}^2 = \frac{1}{P} \end{gather} We use a conjugate multivariate normal-inverse gamma prior on $\{\mathbf{w},\sigma^{2}_{w}\}$ and a half multivariate normal-inverse gamma prior (for non-negativity) on $\{\mathbf{c},\sigma^{2}_{c}\}$ and an inverse gamma prior on $\sigma_{y}^2$: \begin{gather} P(\mathbf{w},\sigma_{w}^{2}) = P(\mathbf{w}\vert\sigma_{w}^{2}) P(\sigma_{w}^{2}) = \mathcal{N}(\mathbf{0},\sigma_{w}^2 \mathcal{I}_{K}) \text{IG}(\sigma_{w}^2;a_{w},b_{w}) \\ P(\mathbf{C},\sigma_{c}^{2}) = P(\sigma_{c}^{2}) \prod_{n=1}^{N} P(\mathbf{c}_{n}\vert\sigma_{c}^{2}) = \text{IG}(\sigma_{c}^2;a_{c},b_{c}) \prod^{N}_{n=1} \mathcal{N}(\mathbf{0},\sigma_{c}^2 \mathcal{I}_{K}) \\ P(\sigma^{2}_{y}) = \text{IG}(\sigma_{y}^2;a_{y},b_{y}) \end{gather} Notice that the complete posterior distributions of $\mathbf{w},\sigma_{w}^2,\sigma_{y}^2,\sigma_{c}^2$ can be derived in closed form owing to the structure of the prior: \begin{gather} \mathbf{w}\vert \mathbf{B},\{\mathbf{c}_{n},\mathbf{\theta}\} \sim \mathcal{N}(\mathbf{w};\mathbf{\mu}_{w},\mathbf{\Sigma}_{w}) \ \ \text{s.t.} \ \ \mathbf{\Sigma}_{w} = \Bigg[ \frac{\mathcal{I}_{K}}{\sigma_{w}^2} + \frac{\sum_{n}{\mathbf{c}_{n}\mathbf{c}^{T}_{n}}}{{\sigma_{y}^2}} \Bigg]^{-1} \ \ \text{and} \ \ \mathbf{\mu}_{n} = \mathbf{\Sigma}_{w} \frac{\sum_{n}{\mathbf{c}^{2}_{n}}}{\sigma_{y}^2} \label{w} \\ \sigma^{2}_{w} \vert \mathbf{w},\mathbf{B},\{\mathbf{c}_{n}\},\sigma^{2}_{c},\sigma^{2}_{y} \sim \text{IG}\Bigg(a_{w}+\frac{K}{2},b_{w} + \frac{\sum_{k}\mathbf{w}^{2}_{k}}{2}\Bigg) \label{sig_w} \\ \sigma^{2}_{c} \vert \mathbf{w},\mathbf{B},\{\mathbf{c}_{n}\},\sigma^{2}_{w},\sigma^{2}_{y} \sim \text{IG}\Bigg(a_{c}+\frac{NK}{2},b_{c} + \frac{\sum_{n}\sum_{k}\mathbf{c}^{2}_{nk}}{2}\Bigg) \label{sig_c} \\ \sigma^{2}_{y} \vert \mathbf{w},\mathbf{B},\{\mathbf{c}_{n}\},\sigma^{2}_{c},\sigma^{2}_{w} \sim \text{IG}\Bigg(a_{y}+\frac{N}{2},b_{y} + \frac{\sum_{n}(\mathbf{c}^{T}_{n}\mathbf{w} -\mathbf{y}_{n})^{2}}{2}\Bigg) \label{sig_y} \end{gather} Thus, our inference algorithm performs a Gibbs-MH sampling based on the full conditionals for these variables and random-walk like proposal distributions to sample $\mathbf{B},\{\mathbf{c}_{n}\}$. Our inference algorithm is summarised below (Algorithm~\ref{Alg:2}). \begin{algorithm}[b!] \SetAlgoLined \KwResult{Posterior samples for $\{\mathbf{B},\{\mathbf{c}_{n}\},\mathbf{w},\mathbf{\theta}\}$} Initialize $\mathbf{B}^{0},\{\mathbf{c}^{0}_{n}\},\mathbf{w}^{0},\theta^{0}$ , $a_{c} = a_{w} = a_{y} =3, b_{c} = b_{w} = b_{y} =1$\\ \While{Not converged}{ \textbf{Step 1:} Sample $\mathbf{B}^{t} \sim q(\cdot \vert \mathbf{B}^{t-1})$ ; Determine whether to accept-reject samples \\ \textbf{Step 2:} Sample $\mathbf{C}^{t} \sim q(\cdot \vert \mathbf{C}^{t-1})$ ; Determine whether to accept-reject samples \\ \textbf{Step 3:} Sample $\mathbf{w}$ according to Eqn.~(\ref{w}); \\ \textbf{Step 4:} Sample $\sigma^{2}_{w}$ according to Eqn.~(\ref{sig_w}); \\ \textbf{Step 5:} Sample $\sigma^{2}_{c}$ according to Eqn.~(\ref{sig_c}); \\ \textbf{Step 6:} Sample $\sigma^{2}_{y}$ according to Eqn~(\ref{sig_y}); } \caption{Gibbs-MH Sampling for the joint model} \label{Alg:2} \end{algorithm} \begin{wrapfigure}[19]{H}{0.40\textwidth} \small \begin{center} \centerline{{\includegraphics[scale =0.30]{Bayesian_Proj_Hist.PNG}}} \medskip {\caption{\footnotesize{ Histogram of \textbf{(L)} True samples and \textbf{(R)} Samples from Alg.~\ref{Alg:2}, i.e $\mathbf{c}^{T}_{n}\mathbf{w}$ \textbf{(T)}: SRS \textbf{(B)}: ADOS}}\label{Posterior_Samples_2}} \end{center} \end{wrapfigure} \subsection{Implementation Details and Preliminary Results} We implement Alg.~\ref{Alg:2} in $R$ on an $8$-core machine with an Intel $i7$ processor ($16 $GB RAM). The approximate run time is about 10 hours to generate $10000$ samples. $8000$ of these were treated as burn-in. We experimented with several proposal distributions and found that a normal around the previous sample with a small variance to be the most stable (with acceptance ratio $0.21$ and $0.22$ for the two chains respectively) and concurs with best practices \cite{yildirim2012bayesian}. Also, we fold samples $\mathbf{C}^{t}$ to maintain non-negativity. \par We first examine the convergence of the chains for $\sigma^2_{w},\sigma^2_{c},\sigma^2_{y}$ via the trace plots and autocorrelation in Fig.~\ref{ACF}. Note that examining the convergence of the other latent variables is a less straightforward exercise. We observed that $\sigma^2_{c}$ has the slowest mixing of these with high autocorrelations between samples, even after running the chains for very long. Additionally, we compare the posterior samples generated by our model i.e. $\hat{\mathbf{y}}_{n} = \mathbf{c}^{T}_{n}\mathbf{w}$ against the distribution of the true scores $\mathbf{y}_{n}$ for both scores. The overlap gives us a sense of how well the generating process is approximated. We obtain an rMSE of $3.78~\rpm~{2.51}$ for ADOS and $19.51~\rpm~{7.51}$ for SRS when using all the samples, which is higher than those obtained in Table~\ref{table:1}. Additionally, as a sanity check, we plot the inner product measure the columns of $\mathbf{B}$ for a representative sample (Fig.~\ref{BA} (a)). Indeed, we see that our chains provide uncorrelated and nearly orthogonal bases. Finally, we plot side by side a correlation matrix sample and the corresponding mean approximation error over samples from the chain (Fig.~\ref{BA} (b)). We notice that while a large number of regions have relatively small approximation errors, the model has trouble determining the prominent patterns along the band diagonal. One of the reasons may be the scale of $\mathbf{B}$ and $\mathbf{C}$, which is difficult to simultaneously control in a random walk as can be seen with the trace plot for $\sigma^2_{c}$. \begin{figure*}[t!] \centering \includegraphics[scale=0.48]{ACF_SRS.PNG} \caption{\footnotesize{\textbf{(T)} Trace Plots and \textbf{(B)} Autocorrelation Plots for \textbf{(L)} $\sigma_{w}^2$ \textbf{(M)} $\sigma_{y}^2$ \textbf{(R)}$~ \sigma_{c}^2$ where $\mathbf{y}_{n}$ is the SRS score (Top Set) ADOS score (Bottom Set)} }\label{ACF} \end{figure*} \begin{figure*}[t!] \centering \includegraphics[scale=0.43]{Bayesian_approx.PNG} \caption{\footnotesize{\textbf{(a)} Inner Product between columns of a representative sample of $\mathbf{B}$ \textbf{(b)} Comparison between a true correlation matrix sample (left), and its mean approximation error (right)} }\label{BA} \end{figure*} \section{Discussion} In this letter, we first examined the efficacy of bayesian regression models coupled with dictionary learning to predict clinical severity from rs-fMRI correlation data. Of these, the stochastic variable selection generalized best and offered us with an approach to recognise features most relevant to clinical outcomes. Next, inspired by previous results, we took a fully bayesian approach to jointly learn an rs-fMRI representation and regression model. From the modeling standpoint, this framework presented several design challenges. For example, models selection in terms of order $K$, prior parameters, eg. $(\nu_{0}, a,b)$, currently chosen ad-hoc, and convergence (diagnostics/designing good proposal distributions) of the sampling procedure. Currently, our sampling procedure is computationally expensive and more work needs to be done to ensure that the proposals scan the latent parameter space better and avoid getting stuck in local models. Finally, another challenge is the inherent non-identifiability of the model (for example, scaling- $\{\alpha \mathbf{B},\frac{1}{\alpha^2} \mathbf{C}\}$, $\{\delta{C},\frac{1}{\delta}\mathbf{w}\}$, rotations of $\mathbf{B}$), which contributes to convergence issues when the prior parameters are incorrectly chosen. \textbf{Future Directions} An immediate future direction could be the extension of the framework to incorporate multimodal structural and functional connectivity data such as~\cite{d2020deep,d2021matrix,dsouza2021m} for behavioral prediction. Another interesting extension of the framework could be towards dynamic modeling of functional connectivity~\cite{d2021deep,nandakumar2020multi,andersen2014non} as it evolves over the scan. Overall, this preliminary analysis is a first step at exploring the nascent potential of joint bayesian modeling for brain connectivity and behavior. { \bibliographystyle{rusnat}
{'timestamp': '2023-01-18T02:15:02', 'yymm': '2301', 'arxiv_id': '2301.06182', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06182'}
arxiv
\section{Introduction} Fuzzy relations were introduced in Zadeh's seminal paper on Fuzzy set theory \cite{zadeh1995fuzzy}. The importance of fuzzy relations was stressed by Zadeh and Desoer in \cite{zadehlinear}, where they highlighted that the study of relations is equivalent to the study of systems, since a system can be viewed as relations between an input space and an output space. This perspective is emphasized in the foreword of \cite{di2013fuzzy}, where Zadeh wrote: ``human knowledge may be viewed as a collection of facts and rules, each of which may be represented as the assignment of a fuzzy relation to the unconditional or conditional possibility distribution of a variable. What this implies is that knowledge may be viewed as a system of fuzzy relational equations. In this perspective, then, inference from a body of knowledge reduces to the solution of a system of fuzzy relational equations''. \noindent Thanks to Sanchez's pioneering work on solving a system of fuzzy $\max-\min$ relational equations \cite{sanchez1976resolution}, many Artificial Intelligence (AI) applications based on systems of fuzzy relational equations have emerged \cite{baets2000analytical,di1991fuzzy,di2013fuzzy,dubois1995fuzzy,pedrycz1985applications}. Sanchez gave necessary and sufficient conditions for a system of $\max-\min$ fuzzy relational equations to be consistent i.e., to have solutions. In \cite{sanchez1977}, he also showed that, if the system is consistent, there is a greater solution and many minimal solutions, which leads him to describe the complete set of solutions. However, addressing the inconsistency of these systems remains a difficult problem, which has often been raised \cite{baets2000analytical,di2013fuzzy,li2009fuzzy,pedrycz1990inverse}. Many authors have tackled the issue of finding approximate solutions \cite{ cuninghame1995residuation,di2013fuzzy,gottwald1986characterizations,klir1994approximate, li2010chebyshev,pedrycz1990inverse, wangming1986fuzzy,WEN2022,wu2022analytical,xiao2019linear,yager1980lack}, and some numerical approaches were presented \cite{pedrycz1983numerical,pedrycz1990algorithms}. Among these works, one pioneer idea was introduced by Pedrycz in \cite{pedrycz1990inverse}. Given an inconsistent system, Pedrycz proposes to slightly modify its second member to obtain a consistent system. Cuninghame-Green and Cechlárová \cite{cuninghame1995residuation} and later Li and Fang \cite{li2010chebyshev} each proposed an algorithm to measure the minimal distance expressed with the $L_\infty$ norm $\Delta~=~\inf_{c \in \mathcal{C}} \Vert b -c \Vert$, where $b$ is the second member of a considered inconsistent system and $\mathcal{C}$ is the set of the second members of the consistent systems defined with the same matrix: that of the inconsistent system. This minimal distance is called the Chebyshev distance associated to the second member of the inconsistent system. \noindent In this article, the first main result of our work is an explicit analytical formula (Theorem \ref{th:Deltamin}), to compute, for a system whose matrix and second member are respectively denoted $A$ and $b$, the Chebyshev distance associated to its second member $b$. The Chebyshev distance is denoted $\Delta = \Delta(A,b)$ and is obtained by \textit{elementary calculations} involving only the components of the matrix $A$ and those of the second member $b$. Then, we tackle the study of the set $\mathcal{C}_b$ of Chebyshev approximations of the second member of the system, where a Chebyshev approximation is a vector $c$ such that $\Vert b -c \Vert = \Delta$ and the system formed by the matrix $A$ and the vector $c$ as second member is a consistent system. Moreover, we define the approximate solutions set $\Lambda_b$ of the system, and we relate $\Lambda_b$ to $\mathcal{C}_b$ in the following sense: an element of $\Lambda_b$ is a solution vector $x^\ast$ of a system whose matrix is $A$ and its second member is a Chebyshev approximation of $b$. \noindent Motivated by Sanchez's seminal results \cite{sanchez1976resolution}, we introduce an idempotent application denoted $F$, see (\ref{eq:F}), to check if a system defined with a fixed matrix and a given vector used as second member is a consistent system. The properties of $F$ allow us to compute the greatest element of each of the sets $\mathcal{C}_b$ and $\Lambda_b$, see (Proposition \ref{proposition:greatestcheb}) and (Proposition \ref{prop:greatestaprox}), i.e., we compute the greatest Chebyshev approximation of $b$ and the greatest approximate solution of the system from the components of the matrix $A$ and those of the vector $b$. Then, in order to give the structure of the set $\mathcal{C}_b$, we study its minimal elements. For this purpose, we give a first characterization of the set $\Lambda_b$ (Proposition \ref{proposition:firstlambdab}), which involves a system of $\max-\min$ inequalities. By relying on the results of \cite{matusiewicz2013increasing}, we give a method for constructing the set $\mathcal{C}_{b,\min}$ of minimal Chebyshev approximations (Corollary \ref{corollary:ctitlde}) and we prove that it is non-empty and finite (Corollary \ref{cor:nonemptyfinite}). The complete structure of the set $\mathcal{C}_b$ follows from this results, see (Theorem \ref{th:3}). In addition, we prove a structure theorem for the set $\Lambda_b$, see (Theorem \ref{th:2}). \noindent All these results let us introduce a paradigm to learn approximately a weight matrix relating input and output data from training data. To our knowledge, the $\max-\min$ learning of a weight matrix is commonly tackled by trying to adapt the classical gradient descent method to $\max-\min$ fuzzy neural networks \cite{blanco1994solving,blanco1995identification,blanco1995improved,ciaramella2006fuzzy,de1993neuron,hirota1982fuzzy,hirota1996solving,hirota1999specificity,ikoma1993estimation,li2017convergent,pedrycz1983numerical,pedrycz1991neurocomputations,pedrycz1995genetic,saito1991learning,stamou2000neural,teow1997effective,zhang1996min} with the aim of minimizing the learning error, which is expressed in terms of $L_2$ norm. However, the non-differentiability of the functions $\max$ and $\min$ is very challenging for developing an efficient gradient descent method for $\max-\min$ neural networks. In our learning paradigm, we choose to express the learning error in terms of the $L\infty$ norm. We give an \textit{explicit formula for computing the minimal value (denoted by $\mu$) of the learning error according to the training data}, see (Definition \ref{def:mu}) and (Corollary \ref{eq:muegalmin}). The value $\mu$ is computed in terms of Chebyshev distance of the second member of systems of $\max-\min$ fuzzy relational equations associated to the training data. We then give a method (Method \ref{method:defou}) for constructing approximate weight matrices, i.e., \textit{matrices whose learning error is equal to $\mu$}. Finally, we introduce analogous tools for a system of $\min-\max$ fuzzy relational equations to those already introduced for a system of $\max-\min$ fuzzy relational equations and we show their correspondences (Table \ref{tab:correspondences}). This allows us to extend our results in \cite{baaj2022learning}, i.e., we give a method for approximately learn rule parameters of a possibilistic rule-based system according to multiple training data. The article is structured as follows. In (Section \ref{sec:background}), we remind necessary and sufficient conditions for a system of $\max-\min$ fuzzy relational equations to be consistent. We introduce the application $F$ and we give some of its useful properties. In (Section \ref{sec:chebyshev}), we give the explicit analytical formula for computing the Chebyshev distance associated to the second member of a system. In (Section \ref{sec:chebyshevapprox}), we define the set of Chebyshev approximations of the second member and compute the greatest Chebyshev approximation. In (Section \ref{sec:relating}), we describe the structure of the set of Chebyshev approximations and that of the approximation solutions set of the system. In (Section \ref{sec:learning}), we introduce our learning paradigm. In (Section \ref{sec:applications}), we show the correspondences between a system of $\min-\max$ fuzzy relational equations and a system of $\max-\min$ fuzzy relational equations and we present our method for approximately learn rule parameters of a possibilistic rule-based system according to multiple training data. Finally, we conclude with some perspectives. \section{Background} \label{sec:background} In this section, we give the necessary background for solving a system of $\max-\min$ fuzzy relational equations. We remind Sanchez's necessary and sufficient condition for a system of $\max-\min$ fuzzy relational equations to be consistent. We reformulate this result as a fixed point property of a certain idempotent and increasing application, which we explicitly define. We show some of its useful properties. \subsection{Solving of a system of \texorpdfstring{$\max-\min$}{max-min} fuzzy relational equations} \noindent We use the following notation: \begin{notation} $[0,1]^{n\times m}$ denotes the set of matrices of size $(n,m)$ i.e., $n$ rows and $m$ columns, whose components are in $[0,1]$. In particular: \begin{itemize} \item $[0,1]^{n\times 1}$ denotes the set of column vectors of $n$ components, \item $[0,1]^{1\times m}$ denotes the set of row matrices of $m$ components. \end{itemize} \noindent In the set $[0,1]^{n\times m}$, we use the order relation $\leq$ defined by: \[ A \leq B \quad \text{iff we have} \quad a_{ij} \leq b_{ij} \quad \text{ for all } \quad 1 \leq i \leq n, 1 \leq j \leq m, \] \noindent where $A=[a_{ij}]_{1 \leq i \leq n, 1 \leq j \leq m}$ and $B=[b_{ij}]_{1 \leq i \leq n, 1 \leq j \leq m}$. \\ \end{notation} \noindent Let $A=[a_{ij}] \in [0,1]^{n\times m}$ be a matrix of size $(n,m)$ and $b=[b_{i}] \in [0,1]^{n\times 1}$ be a vector of $n$ components. The system of $\max-\min$ fuzzy relational equations associated to $(A,b)$ is of the form: \begin{equation}\label{eq:sys} (S): A \Box_{\min}^{\max} x = b, \end{equation} \noindent where $x = [x_j]_{1 \leq j \leq m} \in [0,1]^{m\times 1}$ is an unknown vector of $m$ components and the operator $\Box_{\min}^{\max}$ is the matrix product that uses the t-norm $\min$ as the product and $\max$ as the addition. The system can also be written as: \begin{equation*} \max_{1 \leq j \leq m} \min(a_{ij},x_j) = b_i,\, \forall i \in \{1, 2,\dots, n\}. \end{equation*} \noindent There are two competing notation conventions for studying systems of fuzzy relational equations: they differ in whether the unknown part and the second member are column vectors or row vectors. These two conventions are equivalent and the transpose map allows us to switch from one to the other. \noindent To check if the system $(S)$ is consistent, we compute the following vector: \begin{equation}\label{eq:egretestsol} e = A^t \Box_{\rightarrow_G}^{\min} b,\end{equation} \noindent where $A^t$ is the transpose of $A$ and the matrix product $\Box_{\rightarrow_G}^{\min}$ uses the Gödel implication $\rightarrow_G$ as the product and $\min$ as the addition. The Gödel implication is defined by: \begin{align}\label{eq:implication:godel} x \rightarrow_G y = \begin{cases}1 & \text{ if } x \leq y \\ y &\text{ if } x > y \end{cases}. \end{align} Thanks to Sanchez's seminal work \cite{sanchez1976resolution}, we have the following equivalence: \begin{equation} (S) \text{ is consistent}\Longleftrightarrow A \Box_{\min}^{\max} e = b. \end{equation} \noindent The set of solutions of the system $(S)$ is denoted by: \begin{equation}\label{eq:setofsolutionsS} {\cal S } = {\cal S }(A , b) = \{ v \in [0 , 1]^{m \times 1} \,\mid \, A \, \Box_{\min}^{\max} v = b \}. \end{equation} \noindent If the system $(S)$ is consistent, the vector $e$, see (\ref{eq:egretestsol}), is the greatest solution of the system $(S)$. Sanchez also showed in \cite{sanchez1977} that the system $(S)$ has many minimal solutions and he described its set $\mathcal{S}$ of solutions.\\ \noindent We begin our study by the following useful result: \begin{lemma}\label{lemma:increasing} The maps: \begin{equation}\label{eq:map:amaxminx} [0,1]^{m\times 1}\rightarrow [0,1]^{n \times 1} : x \mapsto A \Box_{\min}^{\max} x, \end{equation} \begin{equation}\label{eq:map:atmingc} [0,1]^{n \times 1} \rightarrow [0,1]^{m\times 1} : c \mapsto A^t \Box_{\rightarrow_G}^{\min} c \end{equation} \noindent are increasing with respect to the usual order relation between vectors. \end{lemma} \begin{proof} The first map is increasing because the $\max$ and $\min$ functions are increasing. For the second map, one can use that for a fixed $x \in [0 , 1]^{m \times 1}$ , the map $y \mapsto (x \rightarrow_G y)$ is increasing. \end{proof} \noindent As a consequence, we have the following well-known result: \begin{lemma}\label{lemma:appF} Let $c,c' \in {[0,1]}^{n \times 1}$ such that $c \leq c'$ then we have: \begin{equation} \forall v \in [0,1]^{m \times 1}, A \Box_{\min}^{\max} v = c \Longrightarrow v \leq A^t \Box_{\rightarrow_G}^{\min} c'. \end{equation} \end{lemma} \begin{proof} \noindent Let us remind that $e = A^t \Box_{\rightarrow_G}^{\min} c$ and $e' = A^t \Box_{\rightarrow_G}^{\min} c'$ are the potential greatest solutions of the systems $A \Box_{\min}^{\max} x = c$ and $A \Box_{\min}^{\max} x =c'$ respectively. Then, from (\ref{eq:map:atmingc}) we deduce $e \leq e'$.\\ Let $v \in [0,1]^{m \times 1}$ be such that $A \Box_{\min}^{\max} v = c$. Then the system $A \Box_{\min}^{\max} x = c$ is consistent and $v \leq e$. By transitivity of the relation order, we get $v \leq e'$. \end{proof} \noindent We illustrate the solving of the system $(S)$ by an example: \begin{example} Let: \begin{equation*} A = \begin{bmatrix} 0.06 & 0.87 & 0.95\\ 0.75 & 0.13 & 0.88\\ 0.82 & 0.06 & 0.19 \end{bmatrix}\text{ and } b = \begin{bmatrix} 0.4\\0.7\\ 0.7 \end{bmatrix}. \end{equation*} We have: $A^t = \begin{bmatrix}0.06& 0.75& 0.82\\ 0.87 &0.13& 0.06\\ 0.95 & 0.88 & 0.19 \end{bmatrix}$. We compute the potential greatest solution: \begin{equation*} e = A^t \Box_{\rightarrow_G}^{\min} b = \begin{bmatrix}\min(1.0,0.7,0.7)\\ \min(0.4,1.0,1.0)\\ \min(0.4,0.7,1.0)\end{bmatrix}= \begin{bmatrix} 0.7 \\ 0.4 \\ 0.4 \end{bmatrix}. \end{equation*} The system $A \Box_{\min}^{\max} x = b$ is consistent because: \[ A \Box_{\min}^{\max} e = \begin{bmatrix} 0.4\\0.7\\ 0.7 \end{bmatrix} = b.\] \end{example} \subsection{Reformulation of Sanchez's condition as a fixed point property} \noindent For the system $(S)$, we introduce the following application: \begin{equation}\label{eq:F} F : [0,1]^{n \times 1} \rightarrow [0,1]^{n \times 1} : c \mapsto F(c) = A \, \Box_{\min}^{\max} (A^t\, \Box_{\rightarrow_G}^{\min} c). \end{equation} \noindent The application $F$ allows us to check if a system of fuzzy relational equations $\max-\min$ is consistent: \begin{proposition}\label{proposition:appFreformulated} For any vector $c \in [0,1]^{n \times 1}$ the following conditions are equivalent: \begin{enumerate} \item $F(c) = c$, \item the system $ A \Box_{\min}^{\max} x = c$ is consistent. \end{enumerate} \end{proposition} \begin{proof} Reformulation of Sanchez's result. \end{proof} \noindent The properties of idempotence, growth and right-continuity of the application $F$ justify its introduction: \begin{proposition}\label{prop:threestatementF} \mbox{} \begin{enumerate} \item $\forall c \in [0,1]^{n \times 1}$, $F(c) \leq c$. \item $F$ is idempotent i.e., $\forall c \in [0,1]^{n \times 1}, F(F(c)) = F(c)$. \item $F$ is increasing and right-continuous. \end{enumerate} \end{proposition} \noindent The application $F$ being right-continuous at a point $c\in [0,1]^{n \times 1}$ means: for any sequence $(c^{(k)})$ in $[0,1]^{n \times 1}$ such that $(c^{(k)})$ converges to $c$ when $k \rightarrow \infty$ and verifying $\forall k, c^{(k)} \geq c$, we have: \begin{center} $F(c^{(k)}) \rightarrow F(c)$ when $k \rightarrow \infty$. \end{center} \begin{proof}\mbox{} \begin{enumerate} \item Let $i \in \{1,2,\dots,n\}$, we denote by ${F(c)}_i$ (resp. $c_i$) is the $i$-th component of the vector ${F(c)}$ (resp. $c$) and we must prove ${F(c)}_i \leq c_i$. We have: \begin{align} {F(c)}_i &= \max_{1 \leq j \leq m} \min[ a_{ij}, \min_{1 \leq k \leq n} a_{kj} \rightarrow_G c_k ] \nonumber\\ & \leq \max_{1 \leq j \leq m} \min[ a_{ij}, a_{ij} \rightarrow_G c_i ] \nonumber\\ &= \max_{1 \leq j \leq m} \min[ a_{ij}, c_i ] \quad (\text{because } \min(x,x\rightarrow_G y) = \min(x,y)) \nonumber\\ &\leq c_i.\nonumber \end{align} \item Consider the system $A \Box_{\min}^{\max} x = F(c)$. \\ By definition of the application $F$, we have $F(c) = A \, \Box_{\min}^{\max} e$ with $e = A^t \Box_{\rightarrow_G}^{\min} c$. By Sanchez's result, we have: $$e \leq A^t \Box_{\rightarrow_G}^{\min} F(c).$$ From (\ref{eq:map:amaxminx}) we get: \begin{equation*} F(c) = A \Box_{\min}^{\max} e \leq A \Box_{\min}^{\max} (A^t \Box_{\rightarrow_G}^{\min} F(c)) =F(F(c)). \end{equation*} \noindent But from the first statement of (Proposition \ref{prop:threestatementF}), we know that $F(F(c)) \leq F(c)$. Therefore, we have $F(F(c))=F(c)$. \item This follows from the fact that for a fixed $x \in [0 , 1]$, the map $y \mapsto (x \rightarrow_G y)$ is right-continuous. \end{enumerate} \end{proof} \noindent We illustrate the use of the application $F$: \begin{example} (continued) Based on the computations in the previous example, we check that $F(b) = b$. Let $c = \begin{bmatrix}0.36\\ 0.57\\ 0.24\end{bmatrix}$. The potential greatest solution of the system $A \Box_{\min}^{\max} x = c$ is $\begin{bmatrix}0.24\\ 0.36\\ 0.36\end{bmatrix}$. We have $F(c) = \begin{bmatrix}0.36\\ 0.36\\ 0.24\end{bmatrix} \neq c$, so the system $A \Box_{\min}^{\max} x = c$ is not consistent. \end{example} \section{Chebyshev distance associated to the second member of the system \texorpdfstring{$(S)$}{(S)}} \label{sec:chebyshev} In this section, we give an analytical method for computing the Chebyshev distance associated to the second member of the system $(S)$, see (\ref{eq:sys}). For this purpose, we begin by giving some notations and studying two inequalities involved in the computation of this Chebyshev distance. We relate the fundamental result (Theorem 1 of \cite{cuninghame1995residuation}) to the properties of the studied inequalities. This allows us to give an explicit formula for computing the Chebyshev distance associated to the second member $b$ of the system $(S)$. \subsection{Notations} For $x,y,z,u,\delta \in [0,1]$, we use the following notations: \begin{itemize} \item $x^+ = \max(x,0)$, \item $\overline{z}(\delta) = \min(z+\delta,1)$, \item $\underline{z}(\delta) = \max(z-\delta,0) = (z-\delta)^+$. \end{itemize} \noindent We remark that we have the following equivalence in $[0,1]$: \begin{equation}\label{ineq:xyxbarybar} \mid x - y \mid \leq \delta \Longleftrightarrow \underline{x}(\delta) \leq y \leq \overline{x}(\delta). \end{equation} \noindent For our work, to the second member $b = [b_i]_{1 \leq i \leq n}$ of the system $(S)$ and a number $\delta \in [0,1]$, we associate two vectors: \begin{equation}\label{def:bstarhautbas} \underline{b}(\delta) = [(b_i - \delta)^+]_{1 \leq i \leq n} \quad \text{and} \quad \overline{b}(\delta) = [\min(b_i + \delta , 1)]_{1 \leq i \leq n}.\end{equation} \noindent These vectors $\underline{b}(\delta)$ and $\overline{b}(\delta)$ were already introduced e.g., in \cite{cuninghame1995residuation} (with others notations) and in \cite{li2010chebyshev}. \\ \noindent Then, from (\ref{ineq:xyxbarybar}), we deduce for any $c = [c_i]_{1\leq i \leq n} \in [0,1]^{n \times 1}$: \begin{equation}\label{ineq:bbbar} \Vert b - c \Vert \leq \delta \Longleftrightarrow \underline{b}(\delta) \leq c \leq \overline{b}(\delta). \end{equation} \noindent where $ \Vert b - c \Vert = \max_{1 \leq i \leq n}\mid b_i-c_i\mid$. \subsection{Preliminaries} \noindent Let $x,y,z,u \in [0,1]$ be fixed. We study how to obtain the smallest value of $\delta \in [0,1]$ so that the following inequality is true: \begin{equation*} (x-\delta)^+ \leq y. \end{equation*} \begin{proposition}\label{proposition:ineq1} For any $\delta\in [0, 1]$, we have: \begin{equation}\label{ineq:gen:first}(x-\delta)^+ \leq y\Longleftrightarrow (x - y)^+ \leq \delta.\end{equation} \end{proposition} \begin{proof} For any $\delta\in [0, 1]$, we have: \begin{align} (x-\delta)^+ \leq y & \Longleftrightarrow \max(x - \delta, 0) - y \leq 0 \nonumber\\ & \Longleftrightarrow \max(x - y - \delta, - y) \leq 0 \nonumber\\ & \Longleftrightarrow x - y - \delta \leq 0 \nonumber\\ & \Longleftrightarrow x - y \leq \delta \nonumber\\ & \Longleftrightarrow (x - y)^+ \leq \delta. \nonumber \end{align} \end{proof} \noindent We deduce from (Proposition \ref{proposition:ineq1}) that we have: \begin{equation}\label{ineq:P1} (x - y)^+ = \min\{\delta\in [0, 1] \,\mid\, (x-\delta)^+ \leq y\}. \end{equation} \noindent Let us study the solving of the following inequality that involves the Gödel implication $\rightarrow_{G}$, see (\ref{eq:implication:godel}): \begin{equation} \underline{x}(\delta) \leq y \rightarrow_{G} \overline{z}(\delta), \end{equation} \noindent where: $ y \rightarrow_{G} \overline{z}(\delta) = \begin{cases}1 & \text{ if } y - z \leq \delta \\ z+ \delta & \text{ if } y -z > \delta\end{cases}.$\\ \noindent Let: \begin{equation} \sigma_G(x, y, z) = \min( \frac{(x - z)^+}{2},(y - z)^+). \end{equation} \noindent Then: \begin{proposition}\label{proposition:ineq2} For any $\delta\in [0, 1]$, we have: \begin{equation} \label{ineq:gen:tm} \underline{x}(\delta) \leq y \rightarrow_{G} \overline{z}(\delta) \Longleftrightarrow \sigma_G(x, y, z) \leq \delta. \end{equation} \end{proposition} \begin{proof}\mbox{}\\ \noindent $\Longrightarrow$ Let us assume $ \underline{x}(\delta) \leq y \rightarrow_G \overline z(\delta)$ and prove $\sigma_G(x,y,z) \leq \delta$. \noindent We remark that: \begin{itemize} \item If $y \leq z$ or $x \leq z$, then $\sigma_G(x, y, z) = 0 \leq \delta$. It remains for us to study the case where $y > z$ and $x > z$. \item If $y - z \leq \delta $, then $\sigma_G(x, y, z) = \min(\frac{ x - z }{2}, y - z) \leq y - z \leq \delta $. \\ It remains for us to study the case where $y - z > \delta$. \end{itemize} \noindent We have: \begin{align}\underline{x}(\delta) - (y \rightarrow_G \overline z(\delta)) & = \max(x - \delta, 0) - z - \delta \nonumber\\ &= \max(x - \delta - z - \delta, - z - \delta) \nonumber\\ &= \max(x - z - 2\delta , - z - \delta) \leq 0, \nonumber\end{align} so $x - z - 2\delta \leq 0$ and $\sigma_G(x, y, z) = \min(\frac{ x - z }{2}, y - z) \leq \frac{ x - z }{2} \leq \delta$.\\ \noindent $\Longleftarrow$ Let us assume $ \sigma_G(x, y, z) \leq \delta$ and prove $ \underline{x}(\delta) \leq y \rightarrow_G \overline z(\delta)$. \\ If $(x - \delta)^+ = 0$ or $y \rightarrow_G \overline z(\delta) = 1$, we trivially get the inequality $ (x - \delta)^+ \leq y \rightarrow_G \overline z(\delta)$. It remains for us to study the case where $(x - \delta)^+ = x - \delta > 0$ and $y \rightarrow_G \overline z(\delta) < 1$. \noindent From the inequality $y \rightarrow_G \overline z(\delta) < 1$, we deduce: $$y - z > \delta \text{ and } y \rightarrow_G \overline z(\delta) = z + \delta.$$ As $\sigma_G(x, y, z) = \min(\dfrac{(x - z)^+}{2}, (y - z)^+) = \min(\dfrac{(x - z)^+}{2}, y - z) \leq \delta$, we obtain: $$\sigma_G(x, y, z)=\dfrac{(x - z)^+}{2} \leq \delta.$$ This last inequality is equivalent to: $$\max(x - z - 2\delta, -2\delta) \leq 0.$$ So $x - z - 2\delta \leq 0$, which implies: $$(x - \delta)^+ = x - \delta \leq z + \delta = y \rightarrow_G \overline z(\delta).$$ \end{proof} \noindent We deduce from (Proposition \ref{proposition:ineq2}) that we have: \begin{equation}\label{ineq:P2} \sigma_G(x, y, z) = \min\{\delta\in [0, 1] \,\mid\, \underline{x}(\delta) \leq y \rightarrow_G \overline z(\delta)\}. \end{equation} \noindent We illustrate this result: \begin{example} Let $x = 0.56, y = 0.87$ and $z = 0.36$. We want to obtain the smallest value of $\delta \in [0,1]$ so that $ \underline{x}(\delta) \leq y \rightarrow_{G} \overline{z}(\delta)$ is true. We have $y \rightarrow_G z = z$ and $x > z$. \begin{align*} \delta &\!\begin{aligned}[t] &= \sigma_G(x, y, z) \\ &=\min( \frac{(x - z)^+}{2},(y - z)^+)\\ &=\min( \frac{(0.56 - 0.36)^+}{2},(0.87 - 0.36)^+)\\ &=\min( \frac{0.20}{2}, 0.51) \\ &= 0.10. \end{aligned} \end{align*} \noindent We have $\underline{x}(\delta)=x - 0.10 = 0.46$ and $\overline{z}(\delta)=z+0.10 = 0.46$. Therefore: \begin{equation*} \underline{x}(\delta) = y \rightarrow_G \overline{z}(\delta). \end{equation*} \end{example} \subsection{Analytical formula for computing the Chebyshev distance associated to the second member of the system \texorpdfstring{$(S)$}{(S)}} \label{sec:tool:cheb} \noindent To the matrix $A$ and the vector $b$ of the system $(S)$, let us associate the set of vectors $c = [c_i] \in [0,1]^{n \times 1}$ such that the system $A \Box_{\min}^{\max} x = c$ is consistent: \begin{equation}\label{def:setofsecondmembersB} \mathcal{C} = \{ c = [c_i] \in {[0,1]}^{n \times 1} \mid A \Box_{\min}^{\max} x = c \text{ is consistent} \}. \end{equation} \noindent This set allows us to define the Chebyshev distance associated to the second member $b$ of the system $(S)$. \begin{definition}\label{def:chebyshevdist} The Chebyshev distance associated to the second member $b$ of the system $(S): A \Box_{\min}^{\max}x = b$ is: \begin{equation}\label{eq:delta} \Delta = \Delta(A,b) = \inf_{c \in \mathcal{C}} \Vert b - c \Vert \end{equation} \end{definition} \noindent where: \[ \Vert b - c \Vert = \max_{1 \leq i \leq n}\mid b_i - c_i\mid.\] We have the following fundamental result, already proven in \cite{cuninghame1995residuation}: \begin{equation}\label{eq:delta1} \Delta = \min\{\delta\in [0, 1] \mid \underline b(\delta) \leq F(\overline b(\delta))\}. \end{equation} \noindent In the following, using only (\ref{eq:delta1}), we prove that the Chebyshev distance $\Delta$ associated to the second member $b$ of the system $(S)$ is given by the following formula: \begin{theorem}\label{th:Deltamin} \begin{equation} \label{eq:Deltamin} \Delta = \max_{1 \leq i \leq n}\,\delta_i \end{equation} where for $i = 1, 2, \dots n$: \begin{equation} \label{eq:Deltamini} \delta_i = \min_{1 \leq j \leq m}\,\max[ (b_i - a_{ij})^+, \max_{1 \leq k \leq n}\, \,\sigma_G\,(b_i, a_{kj}, b_k)]. \end{equation} \end{theorem} \noindent To prove this formula, let us first introduce some notations and a lemma: \begin{notation} \end{notation} \noindent For $1\leq i,k \leq n$ and $1 \leq j \leq m$ let: \begin{itemize} \item $K_i = \{\delta \in [0, 1] \mid {\underline{b}(\delta)}_i \leq {F(\overline b(\delta))}_i \}$, where ${\underline{b}(\delta)}_i$ (resp. ${F(\overline b(\delta))}_i$) is the $i$-th component of the vector ${\underline{b}(\delta)}$ (resp. ${F(\overline b(\delta))}$), \item $\beta_j = \min_{1\leq k \leq n}\, a_{kj} \rightarrow_G {\overline{b}(\delta)}_k$ where ${\overline{b}(\delta)}_k$ is the $k$-th component of the vector ${\overline{b}(\delta)}$, \item $D_{ij}^A = \{\delta \in [0, 1] \mid \underline b(\delta)_i \leq a_{ij}\}$, \item $D_{ij}^\beta = \{\delta \in [0, 1] \mid \underline b(\delta)_i \leq \beta_j\}$, \item $D_{ijk} = \{\delta \in [0, 1] \mid \underline b(\delta)_i \leq a_{kj} \rightarrow_G \overline{b}(\delta)_k\}$. \end{itemize} \begin{lemma}\label{L2} We have: \begin{equation*}\label{eq:deltamin}K_i = \bigcup_{1\leq j \leq m}\, D_{ij}^A\,\cap \,D_{ij}^\beta \text{ and } D_{ij}^\beta = \bigcap_{1 \leq k \leq n}\, D_{ijk}. \end{equation*} \end{lemma} \begin{proof} By definition of the function $F$, we have: $$F(\overline b(\delta))_i = \max_{1 \leq j \leq m}\, \min(a_{ij}, \beta_j).$$ \noindent This implies directly that we have: $$K_i = \bigcup_{1\leq j \leq m}\, D_{ij}^A \cap D_{ij}^\beta.$$ \noindent As $\beta_j = \min_{1 \leq k \leq n}\, a_{kj} \rightarrow_G \overline{b}(\delta)_k$, we also have: $$ D_{ij}^\beta = \bigcap_{1 \leq k \leq n}\, D_{ijk}. $$ \end{proof} \noindent The proof of (Theorem \ref{th:Deltamin}) is given in the following. \begin{proof} For any $i = 1, 2, \dots, n$ and $j = 1, 2, \dots, m$, we deduce from (Proposition \ref{proposition:ineq1}) and (Proposition \ref{proposition:ineq2}) that for any $\delta\in [0, 1]$, we have: $$\delta \in D_{ij}^A \,\Longleftrightarrow\, \delta \geq (b_i - a_{ij})^+ \text{ and } \delta \in D_{ij}^\beta \,\Longleftrightarrow\, \delta \geq \max_{1 \leq k \leq n}\, \,\sigma_G\,(b_i, a_{kj}, b_k).$$ Using (\ref{eq:deltamin}), we get: $$\delta \in K_i \,\Longleftrightarrow\, \exists \, j\in\{1, 2, \dots, m\} \text{ such that } \delta \geq \max[ (b_i - a_{ij})^+, \max_{1 \leq k \leq n}\, \,\sigma_G\,(b_i, a_{kj}, b_k) ]. $$ So, we obtain: $$\delta \in K_i \,\Longleftrightarrow\, \delta \geq \min_{1 \leq j \leq m}\, \max[ (b_i - a_{ij})^+, \max_{1 \leq k \leq n}\, \,\sigma_G\,(b_i, a_{kj}, b_k) ].$$ As by definition $\delta \in K_i \,\Longleftrightarrow\, \underline b(\delta)_i \leq F(\overline b(\delta))_i$ and $\Delta = \min\{\delta\in [0, 1] \mid \underline b(\delta) \leq F(\overline b(\delta))\}$, see (\ref{eq:delta1}), we get: $$\Delta = \max_{1 \leq i \leq n}\, \min_{1 \leq j \leq m}\, \max[ (b_i - a_{ij})^+, \max_{1 \leq k \leq n}\, \,\sigma_G\,(b_i, a_{kj}, b_k) ].$$ \end{proof} \noindent The following example illustrates the computation of the Chebyshev distance associated to the second member of the system $(S)$: \begin{example}\label{ex:number4} Let: \begin{equation}\label{ex:4:Aandb} A = \begin{bmatrix} 0.03&0.38&0.26\\ 0.98&0.10&0.03\\ 0.77&0.15&0.85\\ \end{bmatrix} \text{ and } b = \begin{bmatrix} 0.54 \\ 0.13 \\ 0.87 \\ \end{bmatrix}. \end{equation} \noindent We apply (Theorem \ref{th:Deltamin}). \noindent We compute: \begin{align*} \delta_1 &\!\begin{aligned}[t] &= \min_{1 \leq j \leq 3}\,\max[ (b_1 - a_{1j})^+, \max_{1 \leq k \leq 3}\, \,\sigma_G\,(b_1, a_{kj}, b_k)].\\ \end{aligned} \end{align*} We have: \begin{equation*} [(b_1 - a_{1j})^+]_{1 \leq j \leq 3} = \begin{bmatrix} 0.54 - 0.03\\ 0.54 - 0.38\\ 0.54 - 0.26\\ \end{bmatrix}= \begin{bmatrix} 0.51\\ 0.16\\ 0.28 \end{bmatrix}, \end{equation*} \begin{align*} [\sigma_G\,(b_1, a_{kj}, b_k)]_{1 \leq k \leq 3,1 \leq j \leq 3} &= \begin{bmatrix} \sigma_G\,(b_1, a_{11}, b_1) & \sigma_G\,(b_1, a_{12}, b_1) & \sigma_G\,(b_1, a_{13}, b_1) \\ \sigma_G\,(b_1, a_{21}, b_2) & \sigma_G\,(b_1, a_{22}, b_2) & \sigma_G\,(b_1, a_{23}, b_2) \\ \sigma_G\,(b_1, a_{31}, b_3) & \sigma_G\,(b_1, a_{32}, b_3) & \sigma_G\,(b_1, a_{33}, b_3) \\ \end{bmatrix} \\ &= \begin{bmatrix} \sigma_G\,(0.54, 0.03, 0.54) & \sigma_G\,(0.54, 0.38, 0.54) & \sigma_G\,(0.54, 0.26, 0.54)\\ \sigma_G\,(0.54, 0.98, 0.13) & \sigma_G\,(0.54, 0.10, 0.13) & \sigma_G\,(0.54, 0.03, 0.13) \\ \sigma_G\,(0.54, 0.77, 0.87) & \sigma_G\,(0.54, 0.15, 0.87) & \sigma_G\,(0.54, 0.85, 0.87) \\ \end{bmatrix}\\ &= \begin{bmatrix} 0.0&0.0&0.0\\ 0.205&0.0&0.0\\ 0.0&0.0&0.0\\ \end{bmatrix}. \end{align*} Therefore: \begin{equation*} \delta_1 = \min(\max(0.51,0.205),\max(0.16,0),\max(0.28,0))= 0.16. \end{equation*} Similarly, we obtain: $\delta_2 = 0$ and $\delta_3 = 0.02$. \noindent The Chebyshev distance associated to $b$ is $\Delta = \max(\delta_1,\delta_2,\delta_3) = 0.16$. \end{example} \section{Chebyshev approximations of the second member of the system \texorpdfstring{$(S)$}{(S)}} \label{sec:chebyshevapprox} \noindent In this section, we study the Chebyshev approximations of the second member $b$ of the system $(S)$, which are vectors $c \in [0,1]^{n \times 1}$ such that $\Vert b - c \Vert = \Delta$ and the system $A \Box_{\min}^{\max} x = c$ is consistent. We show that there is a greater Chebyshev approximation that we compute. We give the definition of the set of minimal Chebyshev approximations, which will be useful to determine the structure of the set of Chebyshev approximations. We define the set of Chebyshev approximations of $b$: \begin{definition} The set of Chebyshev approximations of $b$ is defined using the set $\mathcal{C}$, see (\ref{def:setofsecondmembersB}), and the Chebyshev distance associated to $b$ (Definition \ref{def:chebyshevdist}): \begin{equation}\label{def:chebyshevsetapproxB} {\cal C}_{b} = \{c \in {\cal C} \,\mid \, \Vert b - c\Vert = \Delta(A , b)\}. \end{equation} \end{definition} \noindent In the following, to prove that the set ${\cal C}_{b}$ is non-empty, we show that the greatest Chebyshev approximation exists, according to the usual order relation between vectors of $[0,1]^{n \times 1}$. \noindent \begin{proposition}\label{proposition:greatestcheb} \mbox{} \begin{enumerate} \item $F(\overline{b}(\Delta)) \in \mathcal{C}_b$, \item $\forall c \in {\cal C}_{b},\, c \leq F(\overline{b}(\Delta)).$ \end{enumerate} So, $F(\overline{b}(\Delta))$ is the greatest Chebyshev approximation of $b$. \end{proposition} \begin{proof} We deduce from (Proposition \ref{proposition:appFreformulated}) and (Proposition \ref{prop:threestatementF}) that $F(\overline{b}(\Delta)) \in \mathcal{C}$. From (\ref{eq:delta1}) and (Proposition \ref{prop:threestatementF}) we deduce: \[ \underline{b}(\Delta) \leq F(\overline{b}(\Delta)) \leq \overline{b}(\Delta).\] \noindent From relation (\ref{ineq:xyxbarybar}), we deduce $\Vert F(\overline{b}(\Delta)) - b\Vert \leq \Delta$. But $\Delta = \inf_{c \in \mathcal{C}} \Vert b - c \Vert$ (Definition \ref{def:chebyshevdist}), then $\Vert F(\overline{b}(\Delta)) - b\Vert \geq \Delta$. Finally, $\Vert F(\overline{b}(\Delta)) - b\Vert = \Delta$ i.e., $F(\overline{b}(\Delta)) \in \mathcal{C}_b$.\\ \noindent Let $c$ be a vector in $\mathcal{C}_b$. As $\Vert b -c \Vert = \Delta$, we deduce $c \leq \overline{b}(\Delta)$. Using that $F$ is increasing (Proposition \ref{prop:threestatementF}), we have $F(c) \leq F(\overline{b}(\Delta))$. But $F(c) =c$ (Proposition \ref{proposition:appFreformulated}), so $c \leq F(\overline{b}(\Delta))$. \end{proof} \noindent As a consequence of the first statement in (Proposition \ref{proposition:greatestcheb}), we have: \begin{corollary} \label{corollary:deltazero} $$\Delta = \min_{c \in \mathcal{C}} \Vert b - c \Vert.$$ \[ \Delta = 0 \Longleftrightarrow\text{ the system $(S)$ is consistent.} \] \end{corollary} \noindent Therefore, $\Delta = 0$ is a necessary and sufficient condition for the system $(S)$ to be consistent. \noindent It is much more difficult to obtain minimal Chebyshev approximations of $b$. In a fairly abstract way, one can prove that the set: \begin{equation}\label{eq:minimalChebB} {\cal C}_{b,\min} = \{c \in{\cal C}_{b} \mid c \,\text{minimal in ${\cal C}_{b}$}\} \end{equation} \noindent is non-empty and finite. In fact, we will show in the next section how to construct elements of ${\cal C}_{b,\min}$ and prove that this set is finite. \noindent We illustrate the computation of the greatest Chebyshev approximation of the second member of the system $(S)$: \begin{example}\label{ex:example5} (continued) We continue with the matrix $A$ and the vector $b$, see (\ref{ex:4:Aandb}), used in (Example \ref{ex:number4}). \\We remind that the Chebyshev distance associated to the second member $b$ of the system $A \Box_{\min}^{\max} x = b$ is $\Delta = 0.16$. \noindent From $b = \begin{bmatrix} 0.54 \\ 0.13 \\ 0.87 \\ \end{bmatrix}$, we compute $\overline{b}(\Delta) = \begin{bmatrix} 0.70\\ 0.29\\ 1.00 \end{bmatrix}$. \\ \noindent Then, the greatest Chebyshev approximation of $b$ is: \begin{equation*} F(\overline{b}(\Delta)) = A \, \Box_{\min}^{\max} (A^t\, \Box_{\rightarrow_G}^{\min} \overline{b}(\Delta)) = \begin{bmatrix} 0.38 \\ 0.29\\ 0.85 \\ \end{bmatrix}. \end{equation*} We check that the distance between the greatest Chebyshev approximation $\begin{bmatrix} 0.38 \\ 0.29\\ 0.85 \\ \end{bmatrix}$ and $b = \begin{bmatrix} 0.54 \\ 0.13 \\ 0.87 \\ \end{bmatrix}$ is equal to $\Delta$. \end{example} \section{Relating the approximate solutions set to the Chebyshev approximations set} \label{sec:relating} In this section, we study the approximate solutions set of the system $(S): A \Box_{\min}^{\max} x = b$, which we denote by $\Lambda_b$ and the set $\mathcal{C}_b$ of Chebyshev approximations of the second member $b$, see (\ref{def:chebyshevsetapproxB}). By definition, an approximate solution $x^\ast \in \Lambda_b$ is a column vector such that the vector $c= A \Box_{\min}^{\max} x^\ast$ is a Chebyshev approximation of $b$ i.e., $c \in \mathcal{C}_b$. Moreover, for all $c \in \mathcal{C}_b$, the solutions of the system $A \Box_{\min}^{\max} x=c$ belong to $\Lambda_b$ i.e., they are approximate solutions. This section is structured as follows. We begin by defining the set $\Lambda_b$ and we relate it to the set $\mathcal{C}_b$ (Subsection \ref{subsec:approxsolset}). We show that the set $\Lambda_b$ is non-empty (Proposition \ref{prop:nonemptylambdab}) and has a greater element (Proposition \ref{prop:greatestaprox}). In (Subsection \ref{subsec:characterizations}), we then give a characterization of $\Lambda_b$ (Proposition \ref{proposition:firstlambdab}) and we describe the structure of $\Lambda_b$ in (Theorem \ref{th:2}). These two results allow us to study the minimal elements of $\mathcal{C}_b$ and $\Lambda_b$ (Subsection \ref{subsec:minicheb}). Using the results and the method of \cite{matusiewicz2013increasing} to construct minimal elements of systems of $\max-\min$ inequalities, we show that the set of minimal Chebyshev approximations $\mathcal{C}_{b,\min}$ is non-empty and finite. We also give a finite set of minimal approximate solutions noted $\Lambda_{b,\min}$ associated to $\mathcal{C}_{b,\min}$ by the following equality: $\mathcal{C}_{b,\min} = \{ A \Box_{\min}^{\max}x \mid x \in \Lambda_{b,\min} \}$. Finally, we describe the structure of the set $\mathcal{C}_b$ of Chebyshev approximations of $b$ (Theorem \ref{th:3}). \subsection{Approximate solutions set \texorpdfstring{$\Lambda_b$}{Λb}} \label{subsec:approxsolset} We introduce a new notation and a new application: \begin{notation} $\Lambda = {[0,1]}^{m\times 1}$. \end{notation} \begin{proposition} \begin{equation} \theta: \Lambda \rightarrow \mathcal{C}: x \mapsto A\Box_{\min}^{\max} x \end{equation} \noindent where $\mathcal{C}$ is defined in ( \ref{def:setofsecondmembersB}). The application $\theta$ is a \textit{surjective} and increasing map from $\Lambda$ onto $\mathcal{C}$. \begin{proof} By (Lemma \ref{lemma:increasing}), we know that the map $\theta$ is increasing. As any $c\in {\cal C}$ gives rise to a consistent system $A \Box_{\min}^{\max} x = c$, the map $\theta$ is surjective. \end{proof} \end{proposition} \noindent We remark that: \begin{itemize} \item We have $\mathcal{C} = \{ \theta(x) \mid x \in \Lambda\}$. \item For any $u \in [0,1]^{n \times 1}$ we have: \begin{equation}\label{eq:reformulationidempot} F(u) = \theta(e) \text{ where } e = A^t \Box_{\rightarrow_G}^{\min} F(u). \end{equation} \noindent This is an equivalent reformulation of the idempotence property of the application $F$, see (Proposition \ref{prop:threestatementF}). \end{itemize} \noindent In the following, we introduce the subset $\Lambda_b \subseteq \Lambda$ which is the reciprocal image of the set $\mathcal{C}_{b}$ by the map $\theta$, i.e.: \begin{definition}\label{def:approxsetLambda} The approximate solutions set of the system $(S)$ is: \begin{equation} \Lambda_b = \theta^{-1}(\mathcal{C}_{b}) = \{x\in \Lambda \mid \theta(x) \in \mathcal{C}_{b}\}. \end{equation} \end{definition} As $\theta : \Lambda \rightarrow \mathcal{C}$ is a \textit{surjective} map, we have: \begin{equation}\label{eq:cbtolambdab} \mathcal{C}_b = \{ \theta(x) \mid x \in \Lambda_b \}. \end{equation} \noindent We define: \begin{definition}\label{def:approxsol} A vector $x \in \Lambda_b$ is called an \textit{approximate solution} of the system $(S)$. \\By definition of the set $\Lambda_b$, we have for all $x \in \Lambda$: \begin{equation}\label{eq:approxsol} x \in \Lambda_b \Longleftrightarrow \Vert A \Box_{\min}^{\max} x - b \Vert = \Delta(A,b). \end{equation} \noindent where $\Delta(A,b)$ is the Chebyshev distance associated to the second member $b$ of the system $(S)$, see (Theorem \ref{th:Deltamin}). \end{definition} (see other definitions of approximate solutions using another choice of norms in \cite{WEN2022,wu2022analytical}). \\ We have: \begin{proposition}\label{prop:nonemptylambdab} The approximate solutions set $\Lambda_b$ is non-empty. \end{proposition} \begin{proof} As we know by (Proposition \ref{proposition:greatestcheb}) that the set $\mathcal{C}_b$ is non-empty, we conclude by (\ref{eq:cbtolambdab}) that the set $\Lambda_b$ is also non-empty. \end{proof} In fact, we have a particular (and important) element in $\Lambda_b$: \begin{notation} $\eta := A^t \Box_{\rightarrow_G}^{\min} F(\overline{b}(\Delta))$. \end{notation} \begin{proposition}\label{prop:greatestaprox} The column vector $\eta$ satisfies the equality $\theta(\eta)=F(\overline{b}(\Delta))$, therefore $\eta \in \Lambda_b$ and $\eta$ is the greatest approximate solution, i.e., the greatest element of $\Lambda_b$. \end{proposition} \begin{proof} \noindent The equality $\theta(\eta) = F(\overline{b}(\Delta))$ follows from the idempotence property of the application $F$ (Proposition \ref{prop:threestatementF}). As by (Proposition \ref{proposition:greatestcheb}), $F(\overline{b}(\Delta))\in {\cal C}_b$, we obtain that $\eta\in \Lambda_b$, see (Definition \ref{def:approxsetLambda}). \noindent Let us show $x \in \Lambda_b \Longrightarrow x \leq \eta$. \\ Set $c = \theta(x)$ and $c' = F(\overline{b}(\Delta))$. As $c = \theta(x) \in \mathcal{C}_b$, we have $c \leq F(\overline{b}(\Delta)) =c'$ (Proposition \ref{proposition:greatestcheb}). We apply (Lemma \ref{lemma:appF}) to obtain $x \leq A^t \Box_{\rightarrow_G}^{\min} F(\overline{b}(\Delta)) = \eta$.\\ \end{proof} \noindent In what follows, we shall look for a finite non-empty set denoted $\Lambda_{b,\min}$ of minimal approximate solutions, which satisfies: \begin{equation}\label{eq:rellambdabmincbmin} \Lambda_{b,\min} \subseteq \Lambda_b \text{ and } \mathcal{C}_{b,\min} = \{ \theta(x) \mid x \in \Lambda_{b,\min} \}. \end{equation} The existence of such a set $\Lambda_{b,\min}$, which implies that the set $\mathcal{C}_{b,\min}$ is also non-empty and finite, will be deduced from a characterization (Proposition \ref{proposition:firstlambdab}) of the set $\Lambda_b$ and a sharp result of \cite{matusiewicz2013increasing} on the solving of a system of inequalities. \subsection{Characterizing the approximate solutions set \texorpdfstring{$\Lambda_b$}{Λb}} \label{subsec:characterizations} \noindent We give the following first characterization of $\Lambda_b$: \begin{proposition}\label{proposition:firstlambdab} For any $x\in \Lambda$, we have: \begin{equation}\label{rel:lambdachevB} x \text{ is an approximate solution i.e., } x\in \Lambda_{b} \Longleftrightarrow \underline{b}(\Delta) \leq \theta(x) \text{ and } x \leq \eta. \end{equation} \end{proposition} \begin{proof}\mbox{}\\ \noindent $\Longrightarrow$ \noindent $\bullet$ We know from (Proposition \ref{prop:greatestaprox}) that $x \in \Lambda_b \Longrightarrow x \leq \eta$. \noindent $\bullet$ Let us show $x \in \Lambda_b \Longrightarrow \underline{b}(\Delta) \leq \theta(x)$.\\ If $x \in \Lambda_b$, then $\Vert b-\theta(x) \Vert = \Delta$ which implies that for any $i \in \{1,2,\dots,n\}$, $b_i - {\theta(x)}_i \leq \Delta$ rewritten as $b_i - \Delta \leq {\theta(x)}_i$. As ${\theta(x)}_i \geq 0$, we deduce that: \[ \forall i \in \{1,2,\dots,n\}, (b_i - \Delta)^+ \leq {\theta(x)}_i.\] \noindent $\Longleftarrow$ \\We suppose $\underline{b}(\Delta) \leq \theta(x) \text{ and } x \leq \eta$ and we must prove $\Vert b-\theta(x) \Vert = \Delta$. As $x \leq \eta$ and $\theta$ is increasing, we have $\theta(x) \leq \theta(\eta) = F(\overline{b}(\Delta))$. \\ \noindent As $F(\overline{b}(\Delta)) \in \mathcal{C}_b$ (Proposition \ref{proposition:greatestcheb}), then, for any $i \in \{1,2,\dots,n\}$, we have: \[ -\Delta \leq b_i - {\theta(\eta)}_i \leq b_i - {\theta(x)}_i. \] \noindent On the other hand, $\underline{b}(\Delta) \leq \theta(x)$ implies that for any $i \in \{1,2,\dots,n\}$: \[ b_i - {\theta(x)}_i \leq \Delta. \] \noindent In conclusion, we have for $i \in \{1,2,\dots,n\}$: \[ -\Delta \leq b_i - {\theta(x)}_i \leq \Delta, \] \noindent which is equivalent to $\Vert b - \theta(x) \Vert \leq \Delta$. But, $\theta(x) \in \mathcal{C}$, so $\Vert b - \theta(x) \Vert \geq \Delta$. Therefore, $\Vert b - \theta(x) \Vert = \Delta$ i.e., $x \in \Lambda_b$. \end{proof} \noindent To introduce a sharp characterization of $\Lambda_b$, which describes completely its structure, we will first give some notations and a lemma. \begin{notation}\mbox{} \begin{itemize} \item For $j = 1 , 2 , \dots ,m$, let: \[ H_j = \{i \in \{1,2,\dots,n\} \mid a_{ij} < b_i - \Delta\}, \] \noindent \item For any $T \subseteq \{1 , \dots , m\}$, we denote by $T^c$ the complement of $T$. \item For $T \subseteq \{1 , \dots , m\}$, we put: \begin{equation*} I_T= \bigcap_{j\in T} H_j \text{ and } \xi_T = \max_{i \in I_T}(b_i - \Delta)^+, \end{equation*} \noindent with the convention $\max_\emptyset = 0$. \end{itemize} \end{notation} \noindent The map $T \mapsto \xi_T$ has the following properties: \begin{lemma}\label{lemma:txit}\mbox{} \begin{enumerate} \item For $T = \emptyset$, we have $\xi_\emptyset = \max_{i \in \{1,2,\dots,n\}}(b_i - \Delta)^+$. \item The map $T \mapsto \xi_T$ is decreasing i.e., $T \subseteq T' \Longrightarrow \xi_{T'} \leq \xi_{T}$. \item $\xi_{\{1,2,\dots,m\}}=0$. \end{enumerate} \end{lemma} \begin{proof}\mbox{} \begin{enumerate} \item This is true because $I_\emptyset = \bigcap\limits_{j \in \emptyset} H_j = \{1,2,\dots,n\}$. \item If $T \subseteq T'$, then $I_{T'} \subseteq I_T$ and $\xi_{T'} = \max_{i \in I_{T'}}(b_i - \Delta)^+ \leq \xi_T = \max_{i \in I_T}(b_i - \Delta)^+$. \item From (Proposition \ref{prop:greatestaprox}) and (Proposition \ref{proposition:firstlambdab}), we deduce: \[\underline{b}(\Delta) \leq \theta(\eta). \] Let us show $I_{\{1,2,\dots,m\}} = \emptyset$. \noindent In fact, for any $1 \leq i \leq n$, the inequality ${\underline{b}(\Delta)}_i \leq {\theta(\eta)}_i$ implies that there exists $1 \leq j \leq m$ such that: $${\underline{b}(\Delta)}_i = (b_i - \Delta)^+ \leq \min(a_{ij}, \eta_j) \leq a_{ij}.$$ \noindent Then, $i \notin H_j$, so $I_{\{1,2,\dots,m\}}=\bigcap\limits_{j \in \{1,2,\dots,m\}} H_j=\emptyset$ and by the convention $\max_\emptyset = 0$, we have $\xi_{\{1,2,\dots,m\}}=0$. \end{enumerate} \end{proof} \noindent The main characterization of the approximate solutions set $\Lambda_b$ is: \begin{theorem}\label{th:2} For any $x =\begin{bmatrix}{x}_j\end{bmatrix}_{1\leq j \leq m} \in [0,1]^{m \times 1}$, we have: \begin{equation}\label{rel:lambdachevB2} x\in \Lambda_{b} \,\Longleftrightarrow \forall T \subseteq \{1,2,\dots,m\},\quad \xi_T \leq \max_{j \in T^c} x_j \text{ and } x \leq \eta. \end{equation} \end{theorem} \noindent For the proof of (Theorem \ref{th:2}), we need first to establish for any $x =\begin{bmatrix}{x}_j\end{bmatrix}_{1\leq j \leq m} \in [0,1]^{m \times 1}$: \begin{proposition}\label{proposition:bcij} $$\underline{b}(\Delta) \leq \theta(x) \Longleftrightarrow \forall i \in \{1,2,\dots,n\}, \exists j \in \{1,2,\dots,m\}, \text{ such that } i\in {H_j}^c \text{ and } (b_i - \Delta)^+ \leq x_j.$$ \end{proposition} \begin{proof} \mbox{}\\ Let $i \in \{1,2,\dots,n\}$. We have: \begin{align*} {(b_i - \Delta)^+} \leq {\theta(x)}_i &\Longleftrightarrow \exists j \in \{1,2,\dots,m\} \text{ such that } (b_i - \Delta)^+ \leq \min(a_{ij}, x_j)\\ &\Longleftrightarrow \exists j \in \{1,2,\dots,m\} \text{ such that } (b_i - \Delta)^+ \leq a_{ij} \text{ and } (b_i - \Delta)^+ \leq x_j\\ &\Longleftrightarrow \exists j \in \{1,2,\dots,m\}, \text{ such that } i\in {H_j}^c \text{ and } (b_i - \Delta)^+ \leq x_j. \end{align*} \end{proof} \noindent The proof of (Theorem \ref{th:2}) is given in the following. \begin{proof} \mbox{}\\ \noindent $\Longrightarrow$\\ We know by (Proposition \ref{proposition:firstlambdab}) that $x \leq \eta$. Let $T \subseteq \{1,2,\dots,m\}$ and we must show $\xi_T \leq \max_{j \in T^c} x_j$. \begin{itemize} \item If $I_T = \emptyset$, we have $\xi_T = 0\leq \max_{j \in T^c} x_j$. \item If $I_T \neq \emptyset$, then take $i \in I_T$ such that $\xi_T = (b_i - \Delta)^+$. Using (Proposition \ref{proposition:bcij}), we have $j \in \{1,2,\dots,m\}$, such that $i\in {H_j}^c$ (which means that $(b_i - \Delta)^+ \leq a_{ij}$) and $(b_i - \Delta)^+ \leq x_j$. We conclude that $j \notin T$ i.e., $j \in T^c$ and: $$ \xi_T = (b_i - \Delta)^+ \leq x_j \leq \max_{l \in T^c} x_l. $$ \end{itemize} \noindent $\Longleftarrow$\\ To prove that $x\in\Lambda_b$, by (Proposition \ref{proposition:firstlambdab}), it is sufficient to have $\underline{b}(\Delta) \leq \theta(x)$. Let $i \in \{1,2,\dots,n\}$, we must show that $(b_i - \Delta)^+ \leq {\theta(x)}_i$.\\ Take $T = \{ j \in \{1,2,\dots,m\} \mid i \in {H_j} \}$. Clearly, $i \in I_T$ and then: $$(b_i - \Delta)^+ \leq \xi_T \leq \max_{l \in T^c} x_l.$$ We distinguish two cases: \begin{itemize} \item $T^c = \emptyset$, then $\max_{l \in T^c} x_l = 0$, and $(b_i - \Delta)^+ = 0 \leq {\theta(x)}_i$. \item $T^c \neq \emptyset$, and let $l' \in T^c$ such that $x_{l'} = \max_{l \in T^c} x_{l}$. We have: $$ (b_i - \Delta)^+ \leq \xi_T \leq x_{l'}. $$ \noindent But, $l' \in T^c$ means that $i \in {H_{l'}}^c$ i.e., $(b_i - \Delta)^+ \leq a_{il'}$. Finally, $$(b_i - \Delta)^+ \leq \min(a_{il'},x_{l'}) \leq {\theta(x)}_i.$$ \end{itemize} \end{proof} \subsection{Obtaining minimal Chebyshev approximations from minimal approximate solutions} \label{subsec:minicheb} \noindent From a practical point of view, one can obtain all the minimal Chebyshev approximations of the second member $b$ of the system $(S)$. For this purpose, we use (Proposition \ref{proposition:firstlambdab}) and the results of \cite{matusiewicz2013increasing}, where the authors showed that a system of $\max-\min$ relational inequalities has a finite non-empty set of solutions, and they gave an algorithm to obtain the minimal solutions of such a system that are lower than a given solution. In the following, we use this result of \cite{matusiewicz2013increasing}: \begin{notation}\label{notations:minimalsol} We denote by $\{ v^{(1)},v^{(2)},\dots,v^{(h)} \}$ the set of minimal solutions of the system of inequalities $\underline{b}(\Delta) \leq A \Box_{\min}^{\max} x$ (obtained using the algorithm of \cite{matusiewicz2013increasing}) such that $\forall i \in \{1,2,\dots,h\}, v^{(i)} \leq \eta$. \end{notation} We have: \begin{proposition}\label{proposition:minimalsol} \mbox{} \begin{enumerate} \item $\{v^{(1)},v^{(2)},\dots,v^{(h)}\}\subseteq \Lambda_b\text{ and } \{ \theta(v^{(1)}), \theta(v^{(2)}), \dots, \theta(v^{(h)}) \} \subseteq \theta(\Lambda_b) = \mathcal{C}_{b}$, \item $\forall x \in \Lambda_{b}, \exists i \in \{1 , 2 ,\dots , h\}, \text{ such that } v^{(i)} \leq x$, \item $\forall c \in \mathcal{C}_{b,\min}, \exists i \in \{1, 2, \dots , h\}, \text{ such that } c = \theta(v^{(i)})$. \end{enumerate} \end{proposition} \begin{proof} For the proof of the first statement, we observe that $\{v^{(1)},v^{(2)},\dots,v^{(h)}\}\subseteq \Lambda_b$ is a consequence of (Proposition~\ref{proposition:firstlambdab}) and $\{ \theta(v^{(1)}), \theta(v^{(2)}), \dots, \theta(v^{(h)}) \} \subseteq \theta(\Lambda_b) = \mathcal{C}_{b}$ is a consequence of (\ref{eq:cbtolambdab}). \noindent To prove the second statement, let $x_0 \in \Lambda_{b}$. From (Proposition \ref{proposition:firstlambdab}), we deduce: $$ \underline{b}(\Delta) \leq A \Box_{\min}^{\max} x_0 = \theta(x_0)\quad \text{and} \quad x_0 \leq\eta.$$ By the algorithm of \cite{matusiewicz2013increasing}, there is a minimal solution $v$ of the system of inequalities $\underline{b}(\Delta) \leq A \Box_{\min}^{\max} x$ such that $v \leq x_0$. As we have $x_0 \leq\eta$, we also have $v\leq \eta$, so there is an index $i\in\{1 , 2 , \dots , h\}$ such that $v= v^{(i)} \leq x_0$. \noindent To prove the last statement, let $c\in \mathcal{C}_{b,\min}$. From (\ref{eq:cbtolambdab}), there is an element $x_0\in \Lambda_{b}$ such that $c = \theta(x_0)$ and from the second statement (of (Proposition \ref{proposition:minimalsol})), there is an index $i\in\{1 , 2 , \dots , h\}$ such that $ v^{(i)} \leq x_0$. \noindent From the increasing of $\theta$ and $\theta(v^{(i)}) \in \mathcal{C}_{b}$, we deduce: $$\theta(v^{(i)}) \leq \theta(x_0) = c.$$ By minimality of $c$, we conclude that $c = \theta(v^{(i)})$. \end{proof} \noindent The following corollary allows us to efficiently obtain the minimal Chebyshev approximations in practice. \begin{corollary}\label{corollary:ctitlde}Using (Notation \ref{notations:minimalsol}), we put: \begin{equation}\label{eq:ctilde} \widetilde{\mathcal{C}} = \{ \theta(v^{(1)}),\theta(v^{(2)}),\dots,\theta(v^{(h)}) \} \end{equation} \noindent and \begin{equation}\label{eq:ctildemin} (\widetilde{\mathcal{C}})_{\min} = \{ c \in \widetilde{\mathcal{C}} \mid c \text{ is minimal in }\widetilde{\mathcal{C}}\}. \end{equation} \noindent Then, we have: \[\widetilde{\mathcal{C}} \subseteq \mathcal{C}_{b} \text{ and } \mathcal{C}_{b,\min} = (\widetilde{\mathcal{C}})_{\min}. \] \begin{proof} By the first statement of (Proposition \ref{proposition:minimalsol}), we have $ \widetilde{\mathcal{C}} \subseteq \mathcal{C}_b $. \noindent By the third statement of (Proposition \ref{proposition:minimalsol}), we have $\, \mathcal{C}_{b,\min} \subseteq \widetilde{\mathcal{C}}$. As $ \widetilde{\mathcal{C}} \subseteq \mathcal{C}_b $, we deduce $ \mathcal{C}_{b,\min} \subseteq (\widetilde{\mathcal{C}})_{\min}$. \noindent Let $c\in (\widetilde{\mathcal{C}})_{\min}$. To prove that $c\in \mathcal{C}_{b,\min} $, let $c'\in \mathcal{C}_{b}$ such that $c' \leq c$. We must prove that $c' =c$. \noindent By (\ref{eq:cbtolambdab}), there is an element $x_0\in \Lambda_b$ such that $c' = \theta(x_0)$. \noindent Using the second statement of (Proposition \ref{proposition:minimalsol}), we obtain an index $i \in \{1 , 2 ,\dots , h\}, \text{ such that } v^{(i)} \leq x_0$. Then we have $\theta(v^{(i)}) \in \widetilde{\mathcal{C} }$ and by the increasing of $\theta$, we get: $$\theta(v^{(i)}) \leq \theta(x_0) = c' \leq c.$$ By minimality of $c$ in $\widetilde{\mathcal{C}}$, we obtain $\theta(v^{(i)}) = c$ , so $c' =c$. \end{proof} \end{corollary} \noindent We have: \begin{corollary}\label{cor:nonemptyfinite} The set $\mathcal{C}_{b,\min}$ is non-empty and finite. \end{corollary} \begin{proof} As $\widetilde{\mathcal{C}}$ is a finite non-empty ordered set, the set ${(\widetilde{\mathcal{C}})}_{\min} = \mathcal{C}_{b,\min} $ is also finite and non-empty. \end{proof} \noindent We are able to define a set of minimal approximation solutions $\Lambda_{b,\min}$, see (\ref{eq:rellambdabmincbmin}): \begin{definition} \begin{equation} \Lambda_{b,\min} = \{ x \in \{ v^{(1)}, v^{(2)},\dots, v^{(h)} \} \mid \theta(x) \in \mathcal{C}_{b,\min} \}. \end{equation} \end{definition} It follows from the first and the last statements of (Proposition \ref{proposition:minimalsol}) that we have: \begin{equation*} \Lambda_{b,\min} \subseteq \Lambda_b \text{ and } \mathcal{C}_{b,\min} = \{ \theta(x) \mid x \in \Lambda_{b,\min} \}. \end{equation*} \noindent {\it Therefore, the set $\Lambda_{b,\min}$ is non-empty and finite}.\\ \noindent The structure of the set ${\cal C}_b$ is described by the following result: \begin{theorem}\label{th:3} For all $c\in [0 , 1]^{n \times 1}$, we have: \begin{equation}c \text{ is a Chebyshev approximation of } b \text{ i.e., } c\in {\cal C}_b \,\Longleftrightarrow \, F(c) = c \,\,\text{and}\,\,\exists \, c'\in {\cal C}_{b,\min} \,\, \text{s.t.}\,\, c' \leq c \leq F(\overline{b}(\Delta)).\end{equation} \end{theorem} \begin{proof}\mbox{}\\ $\Longrightarrow$ \noindent Let $c\in{\cal C}_b$. As ${\cal C}_b \subseteq {\cal C}$, we know from (Proposition \ref{proposition:appFreformulated}) that $F(c) = c$. From (\ref{eq:cbtolambdab}), we have an approximate solution $x_0 \in \Lambda_b$ such that $c = \theta(x_0)$. Then, by the second statement of (Proposition \ref{proposition:minimalsol}), there is an index $i \in \{1 , 2 , \dots , h\}$ such that $v^{(i)} \leq x_0$. Set $c_1 = \theta(v^{(i)})$. Then, by (Corollary \ref{corollary:ctitlde}), we have $c_1 \in \widetilde{\cal C}$ and there exist an element $c'\in \widetilde{\cal C}_{\min} = {\cal C}_{b , \min}$ such that $c' \leq c_1$. As $\theta$ is increasing and using (Proposition \ref{proposition:greatestcheb}), we have: $$c' \leq c_1 = \theta(v^{(i)}) \leq \theta(x_0) = c \leq F(\overline{b}(\Delta)).$$ $\Longleftarrow$ \noindent As $F(c) = c$, by (Proposition \ref{proposition:appFreformulated}), we have $c\in{\cal C}$. It remains us to prove that $\Vert b - c \Vert = \Delta$. \noindent Let $c' \in{\cal C}_{b,\min}$ such that $c' \leq c$. As we have: $$\Vert b - c' \Vert = \Vert b - F(\overline{b}(\Delta)) \Vert = \Delta \quad \text{and}\quad c' \leq c \leq F(\overline{b}(\Delta)),$$ we deduce for all $i\in \{1 , 2 , \dots , n\}:$ $$- \Delta \leq b_i - F(\overline{b}(\Delta))_i \leq b_i - c_i \leq b_i - c'_i \leq \Delta,$$ so $\Vert b - c \Vert \leq \Delta$. As $c\in {\cal C}$, we have also $\Vert b - c \Vert \geq \Delta$. Finally, we conclude $\Vert b - c \Vert = \Delta$, so $c$ is a Chebyshev approximation of $b$, i.e., $c \in \mathcal{C}_b$. \end{proof} We illustrate our method for obtaining the minimal Chebyshev approximations of $b$. \begin{example}(continued) We continue with the results in (Example \ref{ex:example5}). \\We remind that the Chebyshev distance associated to the second member $b$ of the system $A \Box_{\min}^{\max} x = b$ is $\Delta = 0.16$.\\ We compute: \begin{equation*}\label{eq:ex7:eta} \underline{b}(\Delta) = \begin{bmatrix} 0.38 \\ 0.00 \\ 0.71 \end{bmatrix}, \overline{b}(\Delta) = \begin{bmatrix} 0.70\\ 0.29\\ 1.00 \\ \end{bmatrix}\text{ and } \eta = A^t \Box_{\rightarrow_G}^{\min} F(\overline{b}(\Delta)) =\begin{bmatrix} 0.29\\ 1\\ 1 \end{bmatrix}. \end{equation*} The vector $\theta(\eta) = \begin{bmatrix} 0.38 \\ 0.29\\ 0.85 \\ \end{bmatrix}$ is the greatest Chebyshev approximation of the second member $b$ of the system. \noindent The system of inequalities $\underline{b}(\Delta) \leq A \Box_{\min}^{\max} x$ is: $ \begin{bmatrix} 0.38\\ 0.00\\ 0.71 \end{bmatrix} \leq \begin{bmatrix} 0.03&0.38&0.26\\ 0.98&0.10&0.03\\ 0.77&0.15&0.85\\ \end{bmatrix}\Box_{\min}^{\max} \begin{bmatrix} x_1\\ x_2\\ x_3\\ \end{bmatrix}$.\\ \noindent Using the approach of \cite{matusiewicz2013increasing}, we obtain two minimal solutions: $ v=\begin{bmatrix} 0.00 \\ 0.38 \\ 0.71 \end{bmatrix} \text{ and } v'=\begin{bmatrix} 0.71\\ 0.38\\ 0.00 \end{bmatrix}$ of the system of inequalities. Among these minimal solutions, only $v$ is lower than $\eta$. \\The set $\widetilde{\mathcal{C}}$, see (\ref{eq:ctilde}), contains one element, which is $A \Box_{\min}^{\max} v = \begin{bmatrix}0.38\\ 0.10\\ 0.71\end{bmatrix}$ and we have $\widetilde{\mathcal{C}} = (\widetilde{\mathcal{C}})_{\min}$. Therefore, from (Corollary \ref{corollary:ctitlde}), the unique minimal Chebyshev approximation of $b$ is $\check{b} = \begin{bmatrix}0.38\\ 0.10\\ 0.71\end{bmatrix}$.\\ \noindent Some approximate solutions of the system $(S)$ are the solutions of the system $\theta(\eta) = A \Box_{\min}^{\max} x$ and the solutions of the system $\check{b} = A \Box_{\min}^{\max} x$. \end{example} \section{Learning approximate weight matrices according to training data} \label{sec:learning} \noindent Numerous approaches have been proposed for learning a weight matrix relating input data to output data by $\max-\min$ composition \cite{blanco1994solving,blanco1995identification,blanco1995improved,ciaramella2006fuzzy,de1993neuron,hirota1982fuzzy,hirota1996solving,hirota1999specificity,ikoma1993estimation,li2017convergent,pedrycz1983numerical,pedrycz1991neurocomputations,pedrycz1995genetic,saito1991learning,stamou2000neural,teow1997effective,zhang1996min}. One of the pioneering works is that of Pedrycz \cite{pedrycz1991neurocomputations}. He highlighted that we can represent a system of $\max-\min$ fuzzy relational equations $W \Box_{\min}^{\max} x = y$ by a neural network, where $W = \begin{bmatrix} w_{ij} \end{bmatrix}_{1 \leq i \leq n, 1 \leq j \leq m} \in [0,1]^{n \times m}$ is called a weight matrix and $x = \begin{bmatrix} x_j \end{bmatrix}_{1\leq j \leq m} \in [0,1]^{m \times 1}$ and $y = \begin{bmatrix} y_i \end{bmatrix}_{1 \leq i \leq n} \in [0,1]^{n \times 1}$ are column vectors. The neural network (Figure \ref{fig:nnNew}) has $m$ input nodes corresponding to the components $x_1, x_2,\cdots, x_m$ of $x$, $n$ output nodes corresponding to the components $y_1, y_2, \cdots, y_n$ of $y$ and $n\cdot m$ edges such that each of the edges is weighted by the component $w_{ij}$ of $W$, and connects the input node $x_j$ to the output node $y_{i}$. For $1 \leq i \leq n$, the value of the output node $y_i$ is given by $y_i = \max_{1 \leq j \leq m} \min(w_{ij},x_j)$. \\ \begin{figure}[H] \centering \scriptsize \begin{neuralnetwork} [nodespacing=13mm, layerspacing=25mm, maintitleheight=0em, layertitleheight=0em, height=0, toprow=false, nodesize=20pt, style={}, title={}, titlestyle={}] \newcommand{\nodetextinput}[2]{ \ifnum1=#2 $i_{1}$ \fi \ifnum2=#2 $i_{2}$ \fi \ifnum3=#2 $\cdots$ \fi \ifnum4=#2 $i_{m}$ \fi } \newcommand{\nodetextinputvar}[2]{ \ifnum1=#2 $x_{1}$ \fi \ifnum2=#2 $x_{2}$ \fi \ifnum3=#2 $\cdots$ \fi \ifnum4=#2 $x_{m}$ \fi } \newcommand{\nodetextoutputvar}[2]{ \ifnum1=#2 $y_{1}$ \fi \ifnum2=#2 $y_{2}$ \fi \ifnum3=#2 $\cdots$ \fi \ifnum4=#2 $y_{n}$ \fi } \newcommand{\nodetextoutput}[2]{ \ifnum1=#2 $o_{1}$ \fi \ifnum2=#2 $o_{2}$ \fi \ifnum3=#2 $\cdots$ \fi \ifnum4=#2 $o_{n}$ \fi } \newcommand{\linklabelsEdgeO}[4]{ \ifnum1=#2 $w_{11}$ \fi \ifnum2=#2 $w_{12}$ \fi \ifnum4=#2 $w_{1m}$ \fi } \tikzstyle{inputoutput}=[neuron, fill=none]; \layer[count=4, bias=false,nodeclass=inputoutput,text=\nodetextinputvar] \inputlayer[count=4,bias=false,text=\nodetextinput] \link[from layer=0, to layer=1, from node=1, to node=1] \link[from layer=0, to layer=1, from node=2, to node=2] \link[from layer=0, to layer=1, from node=3, to node=3] \link[from layer=0, to layer=1, from node=4, to node=4] \outputlayer[count=4,bias=false, text=\nodetextoutput] \link[from layer=1, to layer=2, from node=1, to node=1, label=\linklabelsEdgeO,style=black!90] \link[from layer=1, to layer=2, from node=2, to node=1, label=\linklabelsEdgeO,style=black!90] \link[from layer=1, to layer=2, from node=3, to node=1, label=\linklabelsEdgeO,style=black!90] \link[from layer=1, to layer=2, from node=4, to node=1, label=\linklabelsEdgeO,style=black!90] \link[from layer=1, to layer=2, from node=1, to node=2] \link[from layer=1, to layer=2, from node=2, to node=2] \link[from layer=1, to layer=2, from node=3, to node=2] \link[from layer=1, to layer=2, from node=4, to node=2] \link[from layer=1, to layer=2, from node=1, to node=3] \link[from layer=1, to layer=2, from node=2, to node=3] \link[from layer=1, to layer=2, from node=3, to node=3] \link[from layer=1, to layer=2, from node=4, to node=3] \link[from layer=1, to layer=2, from node=1, to node=4] \link[from layer=1, to layer=2, from node=2, to node=4] \link[from layer=1, to layer=2, from node=3, to node=4] \link[from layer=1, to layer=2, from node=4, to node=4] \layer[count=4, bias=false,nodeclass=inputoutput,text=\nodetextoutputvar] \link[from layer=2, to layer=3, from node=1, to node=1] \link[from layer=2, to layer=3, from node=2, to node=2] \link[from layer=2, to layer=3, from node=3, to node=3] \link[from layer=2, to layer=3, from node=4, to node=4] \end{neuralnetwork} \caption{A system of $\max-\min$ fuzzy relational equations represented by a $\max-\min$ neural network. Green nodes are input nodes and red nodes are output nodes.} \label{fig:nnNew} \end{figure} \noindent To learn the weight matrix $W$ according to training data, most of the approaches try to adapt the classical gradient descent method to such a $\max-\min$ fuzzy neural network in order to minimize the learning error $E(W)$ expressed in the $L_2$ norm. However, since the functions $\max$ and $\min$ are not fully differentiable, it is rather difficult to adapt the classical gradient descent to this framework. This issue was recently again encountered in \cite{van2022analyzing}. \noindent In these approaches, it seems that the choice of the $L_2$ norm is motivated by its adequacy to the differentiable calculus, while being equivalent to the $L_\infty$ norm (two norms on the vector space $\mathbb{R}^n$ are equivalent). \noindent In this section, based on our results, we introduce a paradigm to approximately learn a weight matrix relating input and output data from the following training data: \begin{equation}\label{def:trainingdataIntro} (x^{(i)})_{1\leq i \leq N}, x^{(i)} \in [0 , 1]^{m \times 1} \quad ; \quad (y^{(i)})_{1\leq i \leq N}, y^{(i)} \in [0 , 1]^{n \times 1}. \end{equation} \noindent For $i=1,2,\dots,N$, each pair $(x^{(i)},y^{(i)})$ is a training datum, where $x^{(i)}$ is the input data vector and $y^{(i)}$ is the targeted output data vector. Our choice of norm to express the learning error is the $L_\infty$ norm: \begin{equation}\label{eq:ew} E(W) = \max_{1 \leq i \leq N} \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)} \Vert \end{equation} \noindent \textit{where the norm of a vector $z$ of $n$ components is $\Vert z \Vert = \max_{1 \leq k \leq n} \mid z_k \mid$}. \\ \noindent The first main result of this section is that we can compute by an analytical formula a positive constant $\mu$, which depends only on the training data, such that the following equality holds: \begin{equation}\label{eq:muequalminW} \mu = \min_{W \in {[0,1]^{n \times m}}} E(W). \end{equation} \noindent In other words, our positive constant $\mu$ minimizes the learning error. Whatever if $\mu=0$ or $\mu > 0$, we give a method to get a weight matrix $W^\ast$ such that $E(W^\ast) = \mu$. If $\mu = 0$, this method is based on the solving of $n$ consistent systems of $\max-\min$ fuzzy relational equations constructed from the training data that we will introduce. Otherwise, if $\mu > 0$, we get an approximate weight matrix $W^\ast$ by gathering approximate solutions (Definition \ref{def:approxsol}) of these same systems using (Section \ref{sec:relating}). \noindent This section is structured as follows. Considering a training data where the outputs are scalar (one value), we begin by relating the problem of learning a weight matrix connecting input data to output data to the solving of a system canonically associated to this training data (Subsection \ref{subsec:relatingchelou}). Then, we tackle the general problem (Subsection \ref{subsec:generalcase}). After giving some notations (Subsection \ref{subsec:notationslearning}) and defining the positive constant $\mu$ (Definition \ref{def:mu}) of (Subsection \ref{subsec:defest}), we prove (\ref{eq:muequalminW}) and give a method ((Method \ref{method:defou}) of (Subsection \ref{subsec:method})) for constructing approximate weight matrices i.e., matrices $W$ such that $E(W) = \mu$. Finally, in (Subsection \ref{subsec:example}), we illustrate our results with two examples. \subsection{Relating the problem of learning a weight matrix connecting input data to output data to the solving of a system canonically associated to these data} \label{subsec:relatingchelou} \noindent Assume a training data composed of $N$ piece of data as follows: \begin{equation}\label{def:trainingdatasingleoutput} (x^{(i)})_{1\leq i \leq N}, x^{(i)} \in [0 , 1]^{m \times 1} \quad ; \quad (y^{(i)})_{1\leq i \leq N}, y^{(i)} \in [0 , 1]. \end{equation} \noindent For $i=1,2,\dots,N$, each pair $(x^{(i)},y^{(i)})$ is a training datum, where $x^{(i)}$ is an input data vector and $y^{(i)}$ is the targeted output data value in $[0,1]$. \noindent We want to learn a weight matrix $V \in [0,1]^{1 \times m}$ such that: \begin{equation}\label{eq:problemxiyi} \forall i \in \{1,2,\dots,N\},\,\, V \Box_{\min}^{\max} x^{(i)} = y^{(i)}. \end{equation} \noindent To tackle this problem, the idea is to introduce the following system which is canonically associated to the training data: \begin{equation}\label{eq:slub} (S): L \Box_{\min}^{\max} u = b, \end{equation} \noindent where: \begin{equation}\label{eq:see38L} L = \begin{bmatrix} x_j^{(i)} \end{bmatrix}_{1 \leq i \leq N, 1 \leq j \leq m}=\begin{bmatrix} x_{1}^{(1)} & x_{2}^{(1)} & \cdots & x_{m}^{(1)} \\ x_{1}^{(2)} & x_{2}^{(2)} & \cdots & x_{m}^{(2)} \\ \vdots & \vdots & \vdots & \vdots \\ x_{1}^{(N)} & x_{2}^{(N)} & \cdots & x_{m}^{(N)} \end{bmatrix}\quad \text{and} \quad b = [y^{(i)}]_{1 \leq i \leq N} = \begin{bmatrix} y^{(1)}\\ y^{(2)}\\ \vdots\\ y^{(N)} \end{bmatrix}. \end{equation} So the rows of $L$ are the transpose of the input data column vectors $x^{(1)}, x^{(2)}, \dots,x^{(N)}$ and the components of $b$ are the targeted output values $y^{(1)},y^{(2)},\dots,y^{(N)}$. \noindent To relate the problem formulated in (\ref{eq:problemxiyi}) to the system $(S)$, we will use the following lemma: \begin{lemma}\label{lemma:v:rowmatrix} Let $v = \begin{bmatrix} v_1\\ v_2 \\ \vdots \\ v_m \end{bmatrix} \in[0 , 1]^{m \times 1}$ be a column-vector and $V = \begin{bmatrix} v_1& v_2& \cdots & v_m \end{bmatrix}\in[0 , 1]^{1 \times m}$ is the row matrix which is the transpose of $v$. We put $v' = \begin{bmatrix}v'_i\end{bmatrix}_{1\leq i \leq N} = L \Box_{\min}^{\max} v$. Then, we have: \begin{enumerate} \item $\forall i \in \{1 , 2 , \dots ,N\}\,,\,v'_i = V \Box_{\min}^{\max} x^{(i)}\in [0 , 1]$, \item $\Vert b - v' \Vert = \max_{1 \leq i \leq N} \mid y^{(i)} - V \Box_{\min}^{\max} x^{(i)} \mid$. \end{enumerate} The second statement implies that $V$ is a weight matrix of the training data $((x^{(i)})_{1\leq i \leq N}, (y^{(i)})_{1 \leq i \leq N})$, see (\ref{eq:problemxiyi}), if and only if $v$ is a solution of the system $(S)$. \end{lemma} \begin{proof} We have: \begin{align} \forall i \in \{1 , 2 , \dots ,N\}\,,\,v'_i & = \max_{1\leq j \leq m}\, \min(l_{ij} , v_j) \nonumber\\ & = \max_{1\leq j \leq m}\, \min(x^{(i)}_j , v_j) \nonumber\\ & = V \Box_{\min}^{\max} x^{(i)}.\nonumber \end{align} From these computations, we deduce the second statement: \begin{equation*} \Vert b - v' \Vert = \max_{ 1 \leq i \leq N}\, \,\mid y^{(i)}-v'_i\mid= \max_{ 1 \leq i \leq N}\,\mid y^{(i)} - V \Box_{\min}^{\max} x^{(i)} \mid. \end{equation*} \end{proof} \noindent The problem formulated in (\ref{eq:problemxiyi}) is related to the system $(S)$ by: \begin{proposition} Let $v = \begin{bmatrix} v_1\\ v_2 \\ \vdots \\ v_m \end{bmatrix} \in[0 , 1]^{m \times 1}$ be a column-vector and $V = \begin{bmatrix} v_1& v_2& \cdots & v_m \end{bmatrix}\in[0 , 1]^{1 \times m}$ is the row matrix which is the transpose of $v$. We have: \[ v \,\,\text{is a solution of the system $(S)$}\, \Longleftrightarrow\, \forall i \in \{1 , 2 , \dots ,N\}\, V \Box_{\min}^{\max} x^{(i)} = y^{(i)}.\] \end{proposition} \begin{proof} The proof of this proposition follows directly from the second statement of (Lemma \ref{lemma:v:rowmatrix}). \end{proof} \noindent We have: \begin{remark}The transpose map $[0,1]^{m \times 1} \rightarrow [0,1]^{1 \times m}: v \mapsto V = v^t$ defines a bijective correspondence between solutions of the system $(S)$ and weight matrices associated to the training data. \end{remark} \noindent In the case where the system $(S): L \Box_{\min}^{\max} u = b$ is inconsistent, we will show that the transpose map still defines a bijective correspondence between approximate solutions of the system $(S)$ (Definition \ref{def:approxsol}) and approximate weight matrices $V$ i.e., matrices satisfying the following equality: \begin{equation}\label{eq:defapproxV} \max_{1 \leq i \leq N}\, \mid y^{(i)} - V\Box_{\min}^{\max} x^{(i)}\mid = \Delta(L,b), \end{equation} \noindent where $\Delta(L,b)$ is the Chebyshev distance associated to the second member $b$ of the system $(S)$, see (Definition \ref{def:chebyshevdist}). \noindent The definition (\ref{eq:defapproxV}) of an approximate weight matrix $V$ is justified by: \begin{enumerate} \item For any approximate solution $v \in [0,1]^{m \times 1}$ of the system $(S)$, see (\ref{eq:slub}), we have $\Vert b - L \Box_{\min}^{\max} v \Vert = \Delta(L,b)$ (Definition \ref{def:approxsol}). \item It follows from the second statement of (Lemma \ref{lemma:v:rowmatrix}) and (Definition \ref{def:chebyshevdist}) that for any $V \in [0,1]^{1 \times m}$, we have: \begin{equation}\label{eq:onarrivealamaminimi} \max_{1 \leq i \leq N}\, \mid y^{(i)} - V\Box_{\min}^{\max} x^{(i)}\mid = \Vert b - L\Box_{\min}^{\max} v \Vert \geq \Delta(L,b). \end{equation} \end{enumerate} \noindent This leads to the definition of the positive constant $\mu$: \begin{definition} The positive constant $\mu$ minimizing the learning error $E(V)=\max_{1 \leq i \leq N} \mid y^{(i)} - V \Box_{\min}^{\max} x^{(i)} \mid$, see (\ref{eq:ew}), according to the training data, is the Chebyshev distance associated to the second member $b$ of the system $(S)$: \begin{equation} \mu = \Delta(L,b). \end{equation} \end{definition} \noindent This definition is justified by (\ref{eq:onarrivealamaminimi}), which we rewrite as \begin{equation} \forall V \in [0,1]^{1 \times m}, \, E(V) \geq \mu. \end{equation}\\ To get the equality $ \mu = \min_{V \in {[0,1]^{1 \times m}}} E(V)$, see (\ref{eq:muequalminW}), we establish the following result: \begin{proposition} Let $v = \begin{bmatrix} v_1\\ v_2 \\ \vdots \\ v_m \end{bmatrix} \in[0 , 1]^{m \times 1}$ be a column-vector and $V = \begin{bmatrix} v_1& v_2& \cdots & v_m \end{bmatrix}\in[0 , 1]^{1 \times m}$ is the row matrix which is the transpose of $v$. We have: \[ v \,\,\text{is an approximate solution of the system $(S)$}\, \Longleftrightarrow\, \max_{1 \leq i \leq N}\, \mid y^{(i)} - V\Box_{\min}^{\max} x^{(i)}\mid = \Delta(L,b)=\mu.\] \end{proposition} \begin{proof} This equivalence is deduced from the second statement of (Lemma \ref{lemma:v:rowmatrix}) and the equivalence (\ref{eq:approxsol}). \end{proof} \noindent We deduce: \begin{corollary}The equality $ \mu = \min_{V \in {[0,1]^{1 \times m}}} E(V)$ holds. \end{corollary} \begin{proof} This result is a consequence of the fact that the approximate solution set $\Lambda_b$ is non-empty, see (Proposition~\ref{prop:nonemptylambdab}). \end{proof} We illustrate this construction. \begin{example} \noindent Let us consider the following training data: \begin{table}[H] \centering \begin{tabular}{c|c} $x^{(1)} =(0.7, 0.4, 0.4)^t$ & $y^{(1)} =0.7$ \\ $x^{(2)} =(1.0, 0.2, 0.5)^t$ & $y^{(2)} =1.0$ \\ $x^{(3)} =(0.2, 0.3, 0.8)^t$ & $y^{(3)} =0.3$ \end{tabular} \caption{Training data. We have $N=3, m = 3$.} \label{tab:learning:ex22} \end{table} We construct the system $(S): L \Box_{\min}^{\max} u= b$ where $L= \begin{bmatrix}0.7 & 0.4 & 0.4 \\ 1.0 & 0.2 & 0.5 \\ 0.2 & 0.3 & 0.8 \end{bmatrix}$ and $b = \begin{bmatrix}0.7 \\ 1.0 \\ 0.3 \end{bmatrix}$. The system is consistent because the Chebyshev distance associated to $b$ is equal to zero: $\Delta(L,b)=0$, so $\mu= \Delta(L,b)=0$. The greatest solution of $(S)$ is $\begin{bmatrix} 1.0\\ 1.0\\ 0.3 \end{bmatrix}$ and there are two minimal solutions $\begin{bmatrix}1.0\\ 0.3\\ 0.0\end{bmatrix}$ and $\begin{bmatrix}1.0\\ 0.0\\ 0.3\end{bmatrix}$ computed using the algorithm of \cite{matusiewicz2013increasing}. Let us use the solution $v = \begin{bmatrix} 1.0\\ 0.7\\ 0.3 \end{bmatrix}$ of the system $(S)$ and we put $V = v^t=\begin{bmatrix} 1.0& 0.7& 0.3 \end{bmatrix}$. The weight matrix $V$ relates input and output data of the training data: \begin{gather*} V\Box_{\min}^{\max} x^{(1)} = y^{(1)}, \\ V \Box_{\min}^{\max} x^{(2)} = y^{(2)},\\ V \Box_{\min}^{\max} x^{(3)} = y^{(3)}. \end{gather*} \end{example} \subsection{Learning approximate weight matrices in the general case} \label{subsec:generalcase} \noindent We shall extend the above results in the case where the outputs of the training data are column vectors of $n$ components in $[0,1]$. Let us consider $N$ training datum as follows: \begin{equation}\label{def:trainingdata} (x^{(i)})_{1\leq i \leq N}, x^{(i)} \in [0 , 1]^{m \times 1} \quad ; \quad (y^{(i)})_{1\leq i \leq N}, y^{(i)} \in [0 , 1]^{n \times 1}. \end{equation} \noindent For $i=1,2,\dots,N$, each pair $(x^{(i)},y^{(i)})$ is a training datum, where $x^{(i)}$ is the input data vector and $y^{(i)}$ is the targeted output data vector. \noindent We study the following problems: \begin{enumerate} \item Is there a weight matrix $W$ of size $(n,m)$ such that: \[\forall i \in\{1 , 2 , \cdots , N\},\,\, W \Box_{\min}^{\max} x^{(i)} = y^{(i)}.\] \item If this not the case, how to define and get a suitable approximate weight matrix $W$ ? \end{enumerate} \noindent We will prove the following results: \begin{enumerate} \item There is a positive constant denoted $\mu$ which can be computed by an analytical formula according to the training data and which satisfies: \begin{equation}\label{Dict43} \forall W \in [0 , 1]^{n \times m}, \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert \geq \mu. \end{equation} \noindent This positive constant minimizes the learning error $E(W)$, see (\ref{eq:ew}), and is expressed in terms of Chebyshev distances associated to the second member of systems of $\max-\min$ fuzzy relational equations that we will introduce. \item We will show the following equivalence: having a weight matrix that perfectly relates the input data to the output data is equivalent to having $\mu=0$ i.e., \begin{equation}\label{Dict45} \exists W \in [0 , 1]^{n \times m} , \text{ s.t. }\forall i \in\{1 , 2 , \cdots , N\}, W \Box_{\min}^{\max} x^{(i)} = y^{(i)} \,\Longleftrightarrow \, \mu = 0. \end{equation} \item We will show that the set of approximate weight matrices: \begin{equation}\label{eq:learning:setA} {\cal A} = \bigg\{ W \in [0,1]^{n \times m} \, \bigl\vert \,\, \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert = \mu \bigg\} \end{equation} \noindent is non-empty. This implies that $\mu = \min_{W \in {[0,1]^{n \times m}}} E(W)$, see (\ref{eq:muequalminW}). \end{enumerate} \noindent In the following, we begin by giving some notations, then we define the positive constant $\mu$ and introduce our method for constructing an approximate weight matrix $W$ according to training data. \subsection{Notations} \label{subsec:notationslearning} \noindent We reuse the matrix $L= [l_{ij}]_{1 \leq i \leq N, 1 \leq j \leq m} = [x^{(i)}_j]_{1 \leq i \leq N, 1 \leq j \leq m}$ of size $(N,m)$, see (\ref{eq:see38L}), which is defined by the transpose of the input data column vectors $x^{(1)}, x^{(2)}, \dots,x^{(N)}$. \noindent To extend to the case where the output data are vectors of $n$ components, we associate to the training data $n$ systems of $\max-\min$ fuzzy relational equations denoted by $(S_1),(S_2),\dots,(S_n)$, which all use the same matrix $L$ and whose second members are $b^{(1)}, b^{(2)}, \dots, b^{(n)}$. For $1 \leq k \leq n$, the system $(S_k)$ is of the form: \begin{equation} (S_k) : L \Box_{\min}^{\max} u= b^{(k)}, \end{equation} \noindent where the unknown part is a column vector $u \in [0,1]^{m \times 1}$ and for $k=1,2,\dots,n$, the components of the column vector $b^{(k)}=[b_i^{(k)}]_{1 \leq i \leq N}$ are defined by: \begin{equation}\label{Dict462} b_i^{(k)} = y^{(i)}_k \text{ ; } 1 \leq i \leq N. \end{equation} \noindent We remark that for $k=1,2,\dots,n$ and $i=1,2,\dots,N$, each component $b_i^{(k)}$ of the second member $b^{(k)}$ of the system $(S_k)$ is equal to the component $y_k^{(i)}$ of the targeted output data vector $y^{(i)}$: \begin{equation}\label{eq:yi} b^{(k)}= \begin{bmatrix} y_{k}^{(1)} \\ y_{k}^{(2)} \\ \vdots \\ y_{k}^{(N)} \end{bmatrix}. \end{equation} \noindent To any matrix $W = [w_{kj}]_{1 \leq k \leq n , 1 \leq j \leq m}$, we associate the $n$ - tuple of column-vectors $(u^{(1)} , u^{(2)} , \dots , u^{(n)})$ where for all $1\leq k\leq n$, the column vector $u^{(k)}= \begin{bmatrix} u^{(k)}_j \end{bmatrix}_{1 \leq j \leq m}$ is the transpose of the $k$-th row of the matrix $W$: \begin{equation}\label{Dict47} u^{(k)}_j = w_{kj} \text{ ; } 1 \leq k \leq n, 1 \leq j \leq m. \end{equation} \noindent This defines the following bijective map between the sets $[0 , 1]^{n \times m} \,$ and $ \, ([0 , 1]^{m \times 1})^n$: \begin{equation}\label{Dict477} [0 , 1]^{n \times m} \rightarrow ([0 , 1]^{m \times 1})^n : W \mapsto (u^{(1)} , u^{(2)} , \dots , u^{(n)})\end{equation} Every $n$-tuple $(u^{(1)} , u^{(2)} , \dots , u^{(n)})$ of column-vectors in $[0 , 1]^{m \times 1}$ is the image by the above map of a unique matrix $W \in [0 , 1 ]^{n \times m}$. Graphically, if $(u^{(1)} , u^{(2)} , \dots , u^{(n)})$ is the image of $W$ by the above map, we have: \begin{equation*} W = \begin{bmatrix} w_{11} & w_{12} & \cdots & w_{1m} \\[8pt] w_{21} & w_{22} & \cdots & w_{2m} \\[8pt] \vdots & \vdots & \vdots & \vdots \\[8pt] w_{n1} & w_{n2} & \cdots & w_{nm} \end{bmatrix} = \begin{bmatrix} {u^{(1)}}^t\\[5pt] {u^{(2)}}^t\\[5pt] \vdots\\[5pt] {u^{(n)}}^t \end{bmatrix}. \end{equation*} \subsection{Definition of the positive constant \texorpdfstring{$\mu$}{mu(x,y)} minimizing the learning error \texorpdfstring{$E(W)$}{E(W)}} \label{subsec:defest} \noindent We relate the systems $(S_1): L \Box_{\min}^{\max} u = b^{(1)}, (S_2): L \Box_{\min}^{\max} u=b^{(2)}, \dots, (S_n): L \Box_{\min}^{\max}u= b^{(n)}$, associated to the training data to the learning error $E(W)$, see (\ref{eq:ew}) by the following useful result: \begin{lemma}\label{lemma:7egalitechelou} For all matrices $W$ of size $(n , m)$, we have: \begin{equation}\label{rel:wtos1s2sn} E(W) = \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert = \max_{1 \leq k \leq n}\, \Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert, \end{equation} where $u^{(k)}$ is the column vector corresponding to the transpose of the $k$-th row of the matrix $W$. \end{lemma} \begin{proof}For all $1 \leq i \leq N$, we have: \begin{align} \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert & = \max_{1 \leq k \leq n}\,\mid y^{(i)}_k - \max_{1 \leq j \leq m}\min(w_{kj} , x^{(i)}_j)\mid \nonumber\\ & = \max_{1 \leq k \leq n}\,\mid b^{(k)}_i - \max_{1 \leq j \leq m}\min(u^{(k)}_j , l_{ij})\mid. \nonumber\end{align} For all $1 \leq k \leq n$, we have: \begin{align} \Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert & = \max_{1 \leq i \leq N}\,\mid b^{(k)}_i - \max_{1 \leq j \leq m}\min(l_{ij} , u^{(k)}_j)\mid. \nonumber \end{align} Finally, we get: \begin{align} \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert & = \max_{1 \leq i \leq N}\, \max_{1 \leq k \leq n}\,\mid b^{(k)}_i - \max_{1 \leq j \leq m}\min(u^{(k)}_j , l_{ij})\mid \nonumber\\ &= \max_{1 \leq k \leq n}\, \max_{1 \leq i \leq N}\, \mid b^{(k)}_i - \max_{1 \leq j \leq m}\min(l_{ij} , u^{(k)}_j)\mid \nonumber\\ & = \max_{1 \leq k \leq n}\,\Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert.\nonumber\end{align} \end{proof} We remark that for $1 \leq k \leq n$, we have: \begin{itemize} \item If the system $(S_k)$ is consistent, the Chebyshev distance associated to its second member $b^{(k)}$ , see (Definition~\ref{def:chebyshevdist}), is equal to zero i.e., $\Delta(L, b^{(k)}) = 0$, so obviously, we have: $$\Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert \geq \Delta(L, b^{(k)}) = 0,$$ \noindent where $u^{(k)}$ is the transpose of the $k$-th row of $W$. \item If the system $(S_k)$ is inconsistent, we note that the system formed by the matrix $L$ and the vector $L \Box_{\min}^{\max} u^{(k)}$ as second member is consistent (one of its solution is $u^{(k)}$). By definition of the Chebyshev distance $\Delta(L, b^{(k)})$, we have: $$\Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert \geq \Delta(L, b^{(k)}) > 0, \quad \text{ see (Definition \ref{def:chebyshevdist}).}$$ \end{itemize} \noindent These remarks justify the introduction of the following definition: \begin{definition}\label{def:mu} The positive constant $\mu$ minimizing the learning error $E(W)$, see (\ref{eq:muequalminW}), according to the training data is: \begin{equation}\label{def:mu:error} \mu := \max_{1 \leq k \leq n}\, \Delta(L, b^{(k)}). \end{equation} \end{definition} \noindent From (\ref{rel:wtos1s2sn}), (\ref{def:mu:error}) and the above remarks, we immediately justify that $\mu$ minimizes the learning error $E(W)$: \begin{proposition}\label{prop:ewsupmu} For all matrix $W$ of size $(n , m)$, we have: \begin{equation}\label{Dict49} E(W)= \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert \geq \mu. \end{equation} \end{proposition} \noindent We observe that having a weight matrix $W$ that perfectly relates the input data to the output data i.e. $E(W)=0$, implies having $\mu=0$. In fact, we have: \begin{proposition}\label{prop:wequivmuzero} \begin{equation}\label{Dict415} \exists W \in [0 , 1]^{n \times m} , \text{ s.t. }\forall i \in\{1 , 2 , \cdots , N\}, W \Box_{\min}^{\max} x^{(i)} = y^{(i)} \,\Longleftrightarrow \, \mu = 0. \end{equation} \end{proposition}\label{eq:equivalencewtrainingmuzero} \begin{proof}\mbox{}\\ $\Longrightarrow\,$ follows from (\ref{Dict49}). \noindent $\Longleftarrow \,$ If $\mu = \max_{1 \leq k \leq n}\, \Delta(L, b^{(k)}) = 0$, then all the systems $(S_1),(S_2),\dots,(S_n)$ are consistent. \noindent For all $1 \leq k \leq n$, let $u^{(k)}\in [0 , 1]^{m \times 1}$ be a solution of the system $(S_k)$. Denote by $W \in [0 , 1]^{n \times m}$ the matrix whose rows are the transpose of the chosen column-vectors $(u^{(1)}, u^{(2)} \dots , u^{(n)})$ (see (\ref{Dict477})). By (Lemma \ref{lemma:7egalitechelou}), we have: $$E(W) = \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert = \max_{1 \leq k \leq n}\, \Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert = 0 = \mu,$$ i.e., $\forall i \in\{1 , 2 , \cdots , N\}, W \Box_{\min}^{\max} x^{(i)} = y^{(i)}$. \end{proof} \subsection{Method for learning approximate weight matrices} \label{subsec:method} \noindent In the proof of (Proposition \ref{prop:wequivmuzero}), when $ \mu = 0$, we have shown how to construct a weight matrix of the training data. We extend this construction to the general case where $\mu \geq 0$, i.e., we give a method for constructing an approximate weight matrix $W$ in the following sense: \begin{equation}\label{eq:muwbonapprox} \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert = \mu. \end{equation} By extending the method developed in (Subsection \ref{subsec:relatingchelou}) to the case of $n$ systems $(S_1),(S_2),\dots,(S_n)$, we construct such a matrix $W$. \begin{method}\label{method:defou} Let $W$ be a matrix defined row by row, which satisfies the following conditions: \begin{itemize} \item If the system $(S_k)$ is consistent, we define the $k$-th row of $W$ as the transpose of a solution $u^{(k)}$ of the system $(S_k)$. For instance, its greatest solution $L^t \Box_{\rightarrow_G}^{\min} b^{(k)}$. With this choice, we have: $$\Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert = 0 = \Delta(L, b^{(k)}).$$ \item If the system $(S_k)$ is inconsistent, we take a Chebyshev approximation $b^{(k),\ast}$ of $b^{(k)}$ (an element of the non-empty set $\mathcal{C}_{b^{(k)}}$, see (\ref{def:chebyshevsetapproxB})). With this choice, we define the $k$-th row of $W$ as the transpose of a solution $u^{(k)}$ of the system $L \Box^{\max}_{\min} u = b^{(k),\ast}$, for instance the greatest solution $L^t \Box_{\rightarrow_G}^{\min} b^{(k),\ast}$. With this choice, we have: $$\Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)}\Vert = \Delta(L, b^{(k)}).$$ \end{itemize} \noindent Thus, any matrix $W$ constructed row by row with the above procedure will satisfy (\ref{eq:muwbonapprox}). \end{method} We remind that the set ${\cal A}$, see (\ref{eq:learning:setA}), is the set formed by the matrices verifying (\ref{eq:muwbonapprox}). From (Method \ref{method:defou}), we have: \begin{proposition}\label{eq:anonvide} The set $\mathcal{A}$ is non-empty. \end{proposition} \begin{proof} \noindent For $1 \leq k \leq n$, we choose an approximate solution (or solution) $u^{(k)}$ of the system $(S_k)$. \\Let $W \in [0,1]^{n\times m}$ be the matrix defined by: \[W = \begin{bmatrix} {u^{(1)}}^t\\[5pt] {u^{(2)}}^t\\[5pt] \vdots\\[5pt] {u^{(n)}}^t \end{bmatrix}.\] \noindent From (Lemma \ref{lemma:7egalitechelou}), (Definition \ref{def:approxsol}) and (Definition \ref{def:mu}), we deduce: \begin{equation*} E(W)= \max_{1 \leq i \leq N}\, \Vert y^{(i)} - W \Box_{\min}^{\max} x^{(i)}\Vert = \max_{1 \leq k \leq n}\, \Vert b^{(k)} - L \Box_{\min}^{\max} u^{(k)} \Vert = \max_{1 \leq k \leq n}\, \Delta(L, b^{(k)})=\mu. \end{equation*} \noindent Thus $W \in \mathcal{A}$. \end{proof} We deduce our main result, i.e., the equality (\ref{eq:muequalminW}) holds: \begin{corollary}\label{eq:muegalmin} \[ \mu = \min_{W \in {[0,1]^{n \times m}}} E(W).\] \end{corollary} \begin{proof} This follows from (Proposition \ref{prop:ewsupmu}) and (Proposition \ref{eq:anonvide}). \end{proof} \noindent In what follows, we illustrate our constructions. \subsection{Examples} \label{subsec:example} The following examples illustrate the learning paradigm. In the first example we have $\mu > 0$, while in the second example, which was introduced by Pedrycz in \cite{pedrycz1991neurocomputations}, we have $\mu=0$. \begin{example}\label{subsec:ex1} \noindent Let us consider the following training data: \begin{table}[H] \centering \begin{tabular}{c|c} $x^{(1)} =(0.7, 0.4, 0.4)^t$ & $y^{(1)} =(0.7, 0.1, 0.3)^t$ \\ $x^{(2)} =(1.0, 0.2, 0.5)^t$ & $y^{(2)} =(1.0, 0.7, 0.0)^t$ \\ \end{tabular} \caption{Training data of the example. We have $N=2, m = 3$ and $n=3$.} \label{tab:learning:ex2} \end{table} \noindent We have $L = \begin{bmatrix} 0.7 & 0.4 & 0.4 \\ 1.0 & 0.2 & 0.5 \end{bmatrix}$, $b^{(1)} = \begin{bmatrix} 0.7\\ 1.0 \end{bmatrix}$, $b^{(2)} = \begin{bmatrix} 0.1\\ 0.7 \end{bmatrix}$ and $b^{(3)} = \begin{bmatrix} 0.3\\ 0.0 \end{bmatrix}$. \noindent We form three systems $(S_1), (S_2)$ and $(S_3)$: \begin{align*} (S_1): L \Box_{\min}^{\max} u_1 = b^{(1)}, \\ (S_2): L \Box_{\min}^{\max} u_2 = b^{(2)},\\ (S_3): L \Box_{\min}^{\max} u_3 = b^{(3)}. \end{align*} \noindent $\bullet$ The system $(S_1)$ is consistent because the Chebyshev distance associated to its second member is~$\Delta(L,b^{(1)}) =~0$. It has $\begin{bmatrix}1\\1 \\ 1 \end{bmatrix}$ as greatest solution, and it has a unique minimal solution $\begin{bmatrix}1 \\ 0\\ 0\end{bmatrix}$ computed using the method of \cite{matusiewicz2013increasing}.\\ \noindent $\bullet$ The system $(S_2)$ is inconsistent because the Chebyshev distance associated to its second member is $\Delta(L,b^{(2)}) = 0.3$. We get $\eta = \begin{bmatrix} 0.4 \\ 1 \\ 1\end{bmatrix}$ and the greatest Chebyshev approximation of $b^{(2)}$ is: $\begin{bmatrix} 0.4\\ 0.5 \end{bmatrix}$ because $L \Box_{\min}^{\max} \eta = \begin{bmatrix} 0.4\\ 0.5 \end{bmatrix}$. The vectors $\begin{bmatrix}0.4 \\0.0\\0.0\end{bmatrix}$ and $\begin{bmatrix}0.0 \\0.0\\0.4\end{bmatrix}$ are solutions of the system of inequalities $\underline{b^{(2)}}(\Delta(L,b^{(2)})) \leq L \Box_{\min}^{\max} x$ and lower than $\eta$. We have $L \Box_{\min}^{\max} \begin{bmatrix}0.4 \\0.0\\0.0\end{bmatrix} = L \Box_{\min}^{\max} \begin{bmatrix}0.0\\0.0\\0.4\end{bmatrix} = \begin{bmatrix} 0.4\\ 0.4 \end{bmatrix}$, therefore, from (Corollary \ref{corollary:ctitlde}), we have a unique minimal Chebyshev approximation of $b^{(2)}$ which is $\begin{bmatrix}0.4\\0.4\end{bmatrix}$. We use the greatest Chebyshev approximation. The system $(S'_2): \begin{bmatrix} 0.4\\ 0.5 \end{bmatrix} = \begin{bmatrix} 0.7 & 0.4 & 0.4 \\ 1.0 & 0.2 & 0.5 \end{bmatrix} \Box_{\min}^{\max} u'_2$ is consistent and it has $\begin{bmatrix}0.4\\ 1\\ 1\end{bmatrix}$ as greatest solution and one unique minimal solution $\begin{bmatrix}0\\ 0\\ 0.5\end{bmatrix}$.\\ \noindent $\bullet$ The system $(S_3)$ is inconsistent because the Chebyshev distance associated to its second member is $\Delta(L, b^{(3)}) = 0.15$. We use the greatest Chebyshev approximation of $b^{(3)}$: $\begin{bmatrix} 0.15\\ 0.15 \end{bmatrix}$. The system $(S'_3): \begin{bmatrix} 0.15\\ 0.15 \end{bmatrix} = \begin{bmatrix} 0.7 & 0.4 & 0.4 \\ 1.0 & 0.2 & 0.5 \end{bmatrix} \Box_{\min}^{\max} u'_3$ is consistent and it has $\begin{bmatrix}0.15\\ 0.15\\ 0.15 \end{bmatrix}$ as greatest solution and three minimal solutions $\begin{bmatrix}0.15 \\ 0\\ 0\end{bmatrix}$, $\begin{bmatrix}0 \\ 0.15\\ 0\end{bmatrix}$ and $\begin{bmatrix}0 \\ 0\\ 0.15\end{bmatrix}$. \noindent As, we have $\Delta(L, b^{(1)}) = 0$, $\Delta(L, b^{(2)}) = 0.3$ and $\Delta(L, b^{(3)}) = 0.15$, we have $\mu = 0.3$. \noindent From the solutions of $(S_1)$, $(S'_2)$ and $(S'_3)$, we can construct an approximate weight matrix $W$ row by row. For instance, $W = \begin{bmatrix} 1 & 0 & 0.2\\ 0.2 & 1 & 0.5 \\ 0.15 & 0.15 & 0.0 \end{bmatrix}$ where $\begin{bmatrix}1 \\ 0 \\ 0.2 \end{bmatrix}$ is a solution of $(S_1)$, $\begin{bmatrix}0.2 \\ 1.0 \\ 0.5 \end{bmatrix}$ is a solution of $(S'_2)$ and $\begin{bmatrix}0.15 \\ 0.15 \\ 0\end{bmatrix}$ is a solution of $(S'_3)$. From the training data, we observe that: \begin{align*} W \Box_{\min}^{\max} x^{(1)} = \begin{bmatrix}0.7\\ 0.4\\ 0.15\end{bmatrix} \text{ and } \Vert \begin{bmatrix}0.7\\ 0.4\\ 0.15\end{bmatrix} - y^{(1)} \Vert = 0.3 = \mu, \nonumber\\ W \Box_{\min}^{\max} x^{(2)} = \begin{bmatrix}1\\ 0.5\\ 0.15 \end{bmatrix} \text{ and } \Vert \begin{bmatrix}1\\ 0.5\\ 0.15\end{bmatrix} - y^{(2)} \Vert = 0.2 < \mu. \nonumber \end{align*} \end{example} \begin{example} In \cite{pedrycz1991neurocomputations}, Pedrycz learns a weight matrix according to the following training data: \begin{table}[H] \centering \begin{tabular}{c|c} $x^{(1)} = (0.3, 1.0, 0.5, 0.2)^t$ & $y^{(1)} = (0.7, 0.5, 0.6)^t$ \\ $x^{(2)} = (0.1, 1.0, 1.0, 0.5)^t$ & $y^{(2)} = (0.7, 1.0, 0.6)^t$ \\ $x^{(3)} = (0.5, 0.7, 0.2, 1.0)^t$ & $y^{(3)} = (0.7, 0.7, 0.6)^t$ \\ $x^{(4)} = (1.0, 0.7, 0.5, 0.3)^t$ & $y^{(4)} = (1.0, 0.5, 0.6)^t$ \\ \end{tabular} \caption{Training data used in \cite{pedrycz1991neurocomputations}. We have $N=4, m = 4$ and $n=3$.} \label{tab:learning:ex1} \end{table} \noindent We put $L=\begin{bmatrix} 0.3 & 1.0 & 0.5 & 0.2 \\ 0.1 & 1.0 & 1.0 & 0.5 \\ 0.5 & 0.7 & 0.2 & 1.0 \\ 1.0 & 0.7 & 0.5 & 0.3 \end{bmatrix}$, $b^{(1)}=\begin{bmatrix} 0.7 \\ 0.7 \\ 0.7 \\ 1.0 \end{bmatrix}$,$b^{(2)}= \begin{bmatrix} 0.5 \\ 1.0 \\ 0.7 \\ 0.5 \end{bmatrix}$ and $b^{(3)}= \begin{bmatrix} 0.6 \\ 0.6 \\ 0.6 \\ 0.6 \end{bmatrix}$. We form three systems $ (S_1): L\Box_{\min}^{\max} u_1 = b^{(1)}$, $ (S_2): L \Box_{\min}^{\max} u_2 = b^{(2)}$ and $(S_3): L \Box_{\min}^{\max} u_3 =b^{(3)}$. \noindent $\bullet$ The system $(S_1)$ is consistent because the Chebyshev distance associated to its second member is~$\Delta(L, b^{(1)}) =~0$. Its greatest solution is $\begin{bmatrix} 1.0 \\ 0.7 \\ 0.7\\ 0.7 \end{bmatrix}$ and it has a unique minimal solution~$\begin{bmatrix} 1.0 \\ 0.7 \\ 0.0 \\ 0.0 \end{bmatrix}$.\\ \noindent $\bullet$ The system $(S_2)$ is consistent because the Chebyshev distance associated to its second member is $\Delta(L, b^{(2)}) = 0$. Its greatest solution is $\begin{bmatrix}0.5\\ 0.5\\ 1.0 \\ 0.7\end{bmatrix}$ and it has a unique minimal solution~$\begin{bmatrix} 0.0\\ 0.0\\ 1.0\\ 0.7 \end{bmatrix}$. \\ \noindent $\bullet$ The system $(S_3)$ is consistent because the Chebyshev distance associated to its second member is $\Delta(L, b^{(3)}) =~0$. Its greatest solution is $\begin{bmatrix}0.6 \\ 0.6 \\ 0.6\\ 0.6\end{bmatrix}$ and it has a unique minimal solution~$\begin{bmatrix} 0.0 \\ 0.6 \\ 0.0 \\ 0.0 \end{bmatrix}$.\\ \noindent As, $\Delta(L, b^{(1)}) = \Delta(L, b^{(2)}) = \Delta(L, b^{(3)}) = 0.0$ we have: $\mu = 0.0$. \noindent Therefore, in the set of matrices $\mathcal{A}$, see (\ref{eq:learning:setA}), each of the weight matrices $W$ has three rows constructed from the minimal solution and the greatest solution of each of the three systems $(S_1), (S_2)$ and $(S_3)$: \begin{equation*} \begin{bmatrix} 1.0 \\ 0.7 \\ 0.0\\ 0.0 \end{bmatrix} \leq u_1 \leq \begin{bmatrix} 1.0 \\ 0.7 \\ 0.7 \\ 0.7 \end{bmatrix}, \, \begin{bmatrix} 0.0 \\ 0.0 \\ 1.0\\ 0.7 \end{bmatrix} \leq u_2 \leq \begin{bmatrix} 0.5 \\ 0.5 \\ 1.0 \\ 0.7 \end{bmatrix} \text{ and } \begin{bmatrix} 0.0 \\ 0.6 \\ 0.0\\ 0.0 \end{bmatrix} \leq u_3 \leq \begin{bmatrix} 0.6 \\ 0.6 \\ 0.6 \\ 0.6 \end{bmatrix}. \end{equation*} \noindent Let us consider for example the weight matrix $W = \begin{bmatrix} 1.0 & 0.7 & 0.3 & 0.3 \\ 0.4 & 0.4 & 1.0 & 0.7 \\ 0.1 & 0.6 & 0.2 & 0.2 \end{bmatrix} \in \mathcal{A}$. One can check from the training data that: \begin{gather*} W \Box_{\min}^{\max} x^{(1)} = y^{(1)}, \\ W \Box_{\min}^{\max} x^{(2)} = y^{(2)},\\ W \Box_{\min}^{\max} x^{(3)} = y^{(3)},\\ W \Box_{\min}^{\max} x^{(4)} = y^{(4)}. \end{gather*} \end{example} \section{Application} \label{sec:applications} In what follows, we study an application of our results: how to approximately learn the rule parameters of a possibilistic rule-based system. Recently, Dubois and Prade have emphasized the development of possibilistic learning methods that would be consistent with if-then rule-based reasoning \cite{dubois2020possibilistic}. For this purpose, the author of \cite{baaj2022learning} introduced a system of $\min-\max$ fuzzy relational equations for learning the rule parameters of a possibilistic rule-based system according to a training datum: \[(\Sigma): Y = \Gamma \Box_{\max}^{\min} X, \] \noindent where $\Box_{\max}^{\min}$ is the matrix product which takes $\max$ as the product and $\min$ as the addition. In the equation system $(\Sigma)$, the second member $Y$ describes an output possibility distribution, the matrix $\Gamma$ contains the possibility degrees of the rule premises and $X$ is an unknown vector containing the rule parameters. If the system $(\Sigma)$ is inconsistent, e.g., due to poor training data, an approximate solution is desirable. The general method that we introduced for obtaining approximate solutions of a system of $\max-\min$ fuzzy relational equations can be applied to the case of a system of $\min-\max$ fuzzy relational equations such as $(\Sigma)$. \noindent In what follows, we show how to switch from a system of $\min-\max$ fuzzy relational equations such as $(\Sigma)$ to a system of $\max-\min$ fuzzy relational equations and vice versa. We introduce analogous tools for a system of $\min-\max$ fuzzy relational equations to those already introduced for a system of $\max-\min$ fuzzy relational equations and we show their correspondences in (Table \ref{tab:correspondences}). From these results, we propose a method for finding approximate solutions of the rule parameters of possibilistic rule-based system when we have multiple training data. \subsection{Switching from a system of \texorpdfstring{$\max-\min$}{max-min} fuzzy relational equations to a system of \texorpdfstring{$\min-\max$}{min-max} fuzzy relational equations (and vice versa)} \label{subsec:switch} In this subsection, we use the following notation: \begin{notation} To any matrix $A = [a_{ij}]$, we associate the matrix $A^{\circ} = [1 - a_{ij}]$ and we have $(A^{\circ})^{\circ} = A$. \end{notation} \noindent Let $A$ and $B$ be matrices of respective size $(n,m)$ and $(m,p)$, the transformation $A \mapsto A^{\circ}$ switches the two matrix products $\Box_{\max}^{\min}$ and $\Box_{\min}^{\max}$ in the following sense: \begin{equation}\label{eq:Atensetruc} (A \Box_{\max}^{\min} B)^{\circ} = A^{\circ} \Box_{\min}^{\max} B^{\circ} \text{ and } (A \Box_{\min}^{\max} B)^{\circ} = A^{\circ} \Box_{\max}^{\min}B^{\circ}. \end{equation} \noindent This transformation establishes that the study of systems of $\max-\min$ fuzzy relational equations is equivalent to the study of systems of $\min-\max$ fuzzy relational equations in a precise sense that we will develop in what follows and summarize in (Table \ref{tab:correspondences}).\\ Let us remark that the transformation $t \mapsto 1 - t$ switches the Gödel product, see (\ref{eq:implication:godel}), to the $\epsilon$-product defined by: \[ x \epsilon y = \left\{\begin{array}{rrl} y & \text{if} & x < y\\ 0 & \text{if} & x \geq y \\\end{array}\right. \text{ in } [0, 1].\] Therefore, we deduce that the matrix product $\Box_{\rightarrow_G}^{\min}$ is switched to the matrix product $\Box_{\epsilon}^{\max}$ where we take the $\epsilon$-product as product and $\max$ as addition.\\ Let: \begin{itemize} \item $A \Box_{\min}^{\max} x = b$ be a system of $\max-\min$ fuzzy relational equations, \item $G \Box_{\max}^{\min} x = d$ be a system of $\min-\max$ fuzzy relational equations. \end{itemize} \noindent In (Table \ref{tab:correspondences}), for a system $G \Box_{\max}^{\min} x = d$, we introduce analogous tools (second column) to those already introduced for a system $A \Box_{\min}^{\max} x = b$ (first column). The last column shows how to relate the tools of the two systems iff \begin{equation} G = A^\circ\text{ and }d = b^\circ. \end{equation} \begin{table}[H] \footnotesize \centering \begin{tabular}{c|c|c|c|} \hhline{~---} & \multicolumn{1}{c|}{System: $A \Box_{\min}^{\max} x = b$} & \multicolumn{1}{c|}{System: $G \Box_{\max}^{\min} x = d$} & \multicolumn{1}{c|}{ \cellcolor[HTML]{C0C0C0} \begin{tabular}[c]{@{}l@{}} Relation \\ iff $G = A^\circ$ and $d= b^\circ$ \end{tabular}}\\\hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Set of solutions\\ $\quad$\end{tabular}} &{${\cal {S}}(A,b)$}& {${\cal {S}}(G,d)$}& {\cellcolor[HTML]{C0C0C0}${\cal {S}}(G,d)={\cal {S}}(A,b)^{\circ}$} \\ \hline \multicolumn{1}{|l|}{ \begin{tabular}[c]{@{}l@{}}Potential greatest/lowest\\ solution\end{tabular}} & \begin{tabular}[c]{@{}l@{}} $e=A^t\Box_{\rightarrow_G}^{\min} b$ \\ (greatest solution) \end{tabular} & \begin{tabular}[c]{@{}l@{}} $ r=G^t\Box_{\epsilon}^{\max} d $\\ (lowest solution) \end{tabular} & \cellcolor[HTML]{C0C0C0}$r= e^\circ$ \\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Application computing \\ the matrix product of\\ the system matrix and\\a given vector in $[0,1]^{m\times 1}$\end{tabular}}&{ \begin{tabular}[c]{@{}l@{}} $\theta: [0,1]^{m\times 1}\rightarrow[0,1]^{n\times 1}$\\ $\,\,\,\,\, : x \mapsto A \Box_{\min}^{\max} x$ \end{tabular} }& { \begin{tabular}[c]{@{}l@{}} $\psi: [0,1]^{m\times 1}\rightarrow[0,1]^{n\times 1}$ \\ $\,\,\,\,\,\, : x \mapsto G \Box_{\max}^{\min} x$ \end{tabular} }& { \cellcolor[HTML]{C0C0C0}$\psi(x)=\theta(x^{\circ})^{\circ}$ }\\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Set of second members\\ of the consistent systems \\ defined with the matrix\end{tabular}} & {${\cal {C}}= \{ \theta(x) \mid x \in [0,1]^{m\times 1} \}$}& {${\cal {T}}= \{ \psi(x) \mid x \in [0,1]^{m\times 1} \}$}& { \cellcolor[HTML]{C0C0C0}${\cal {T}}={\cal {C}}^{\circ}$ }\\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Application for checking\\ if a system defined with\\ the matrix and a given \\vector in $[0,1]^{n \times 1}$ as \\second member is a\\ consistent system\end{tabular}} & \begin{tabular}[c]{@{}l@{}} $F : [0,1]^{n \times 1} \rightarrow [0,1]^{n \times 1} $\\ $\,\,\,\,\,\,\,\,\,c \mapsto A \, \Box_{\min}^{\max} (A^t\, \Box_{\rightarrow_G}^{\min} c)$ \end{tabular} & \begin{tabular}[c]{@{}l@{}} $U : [0,1]^{n \times 1} \rightarrow [0,1]^{n \times 1} $\\ $\,\,\,\,\,\,\,\,\,c \mapsto G\Box_{\max}^{\min} (G^t\, \Box_{\epsilon}^{\max} c)$ \end{tabular} & \cellcolor[HTML]{C0C0C0} $U(c)=F(c^{\circ})^{\circ}$ \\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Chebyshev distance\\ associated to \\the second member\end{tabular}} & $\Delta=\Delta(A,b)$ & $\nabla=\nabla(G,d)$ & \cellcolor[HTML]{C0C0C0} $\nabla(G,d)=\Delta(A,b)$ \\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Set of Chebyshev\\ approximations of\\ the second member\end{tabular}} & $\mathcal{C}_b$ & $\mathcal{T}_{d}$ & \cellcolor[HTML]{C0C0C0} $\mathcal{T}_d = \mathcal{C}_b^\circ$ \\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Extremal Chebyshev\\ approximations \\ of the second member\end{tabular}} & \begin{tabular}[c]{@{}l@{}}greatest: $F(\overline{b}(\Delta))$\\ minimal approx. set: $\mathcal{C}_{b,\min}$ \end{tabular} & \begin{tabular}[c]{@{}l@{}}lowest: $U(\underline{d}(\nabla))$\\ maximal approx. set: $\mathcal{T}_{d,\max}$ \end{tabular} & \cellcolor[HTML]{C0C0C0} \begin{tabular}[c]{@{}l@{}} $U(\underline{d}(\nabla))={F(\overline{b}(\Delta))}^\circ$ \\ $\mathcal{T}_{d,\max} = \mathcal{C}_{b,\min}^\circ$ \end{tabular} \\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Approximate solutions set\vspace{1em}\end{tabular}} & \begin{tabular}[c]{@{}l@{}}$\Lambda_b$ \end{tabular} & \begin{tabular}[c]{@{}l@{}}$\Upsilon_d$ \end{tabular} & \cellcolor[HTML]{C0C0C0} \begin{tabular}[c]{@{}l@{}} $\Upsilon_d = \Lambda_b^\circ$ \end{tabular} \\ \hline \multicolumn{1}{|l|}{\begin{tabular}[c]{@{}l@{}}Extremal approximate \\ solutions\end{tabular}} & \begin{tabular}[c]{@{}l@{}}greatest: $\eta=A^t \Box_{\rightarrow_G}^{\min} F(\overline{b}(\Delta))$\\ a min. approx. sol. set: ${\Lambda}_{b,\min}$ \end{tabular} & \begin{tabular}[c]{@{}l@{}}lowest: $\nu=G^t \Box_{\epsilon}^{\max} U(\underline{d}(\nabla))$\\ a max. approx. sol. set: $\Upsilon_{d,\max}$ \end{tabular} & \cellcolor[HTML]{C0C0C0} \begin{tabular}[c]{@{}l@{}} $\nu = \eta^\circ$ \\ $\Upsilon_{d,\max} = \Lambda_{b,\min}^\circ$ \end{tabular} \\ \hline \end{tabular} \vspace{1em} \caption{Tools of the systems $A \Box_{\min}^{\max} x = b$ and $G \Box_{\max}^{\min} x = d$ and their relations iff $G = A^\circ$ and $d= b^\circ$.} \label{tab:correspondences} \end{table} \noindent The relations established for the first five rows of (Table \ref{tab:correspondences}) are justified by the general switch in (\ref{eq:Atensetruc}). Assuming the relation in the sixth row is established, the remaining rows are also justified by the general switch in (\ref{eq:Atensetruc}). In the following, we define the Chebyshev distance associated to the second member $d$ of the system $G \Box_{\max}^{\min} x = d$, denoted $\nabla(G,d)$ and we prove the last four relations. \begin{definition}\label{def:chebdistminmax} The Chebyshev distance associated to the second member $d$ of the system $G \Box_{\max}^{\min} x = d$ is: \begin{align*} \nabla(G,d) &= \inf_{ c \in \mathcal{T}} \Vert d - c \Vert. \end{align*} \end{definition} We remark that if $d=b^\circ$, then for all $c \in [0,1]^{n \times 1}$ we have $\Vert d - c \Vert = \Vert b - c^\circ \Vert.$ From this property, we deduce: \begin{proposition} If $G = A^\circ$ and $d=b^\circ$, then the Chebyshev distance associated to the second member $d$ of the system $G \Box_{\max}^{\min} x = d$ is equal to the Chebyshev distance associated to the second member $b$ of the system $A \Box_{\min}^{\max} x = b$: \begin{equation}\label{equaldeltas} \nabla(G,d) = \Delta(A,b). \end{equation} \end{proposition} \begin{proof} \begin{align*} \nabla(G,d) &= \inf_{ c \in \mathcal{T}} \Vert d - c \Vert\\ &= \inf_{ c \in \mathcal{T}} \Vert b - c^\circ \Vert\\ &= \inf_{ c'\in \mathcal{C}} \Vert b - c' \Vert \quad\quad \text{(because $\mathcal{C}= \mathcal{T}^\circ$)}\\ &= \Delta(A,b) \quad\quad\quad \text{(see (Definition \ref{def:chebyshevdist}))}\\ \end{align*} \end{proof} \noindent The equality $\nabla(G,d) = \Delta(A,b)$, allows us to establish analogous properties for $\nabla(G,d)$: \begin{corollary} $\nabla(G,d) = \min_{ c \in \mathcal{T}} \Vert d - c \Vert.$ \end{corollary} \noindent In order to give an explicit formula for $\nabla(G,d)$, we will use the following lemma: \begin{lemma}If $G = A^\circ$ and $d=b^\circ$, then we have: \begin{equation} \forall c \in [0 , 1]^{n \times 1}, \forall \delta\in [0 , 1],\quad U({\underline{c}(\delta)}) \leq {\overline{c}(\delta)}\,\Longleftrightarrow \, {\underline{c'}(\delta)} \leq F({\overline{c'}(\delta)}), \end{equation} \noindent where $c' = c^\circ$. \end{lemma} \begin{proof} This is a consequence of the relation $\forall c \in [0 , 1]^{n \times 1}, U(c)=F(c^{\circ})^{\circ}$. \end{proof} For a system of $\min-\max$ fuzzy relational equations, (Theorem 1 of \cite{cuninghame1995residuation}) becomes: \begin{corollary} $\nabla(G,d) = \min\{\delta\in [0, 1] \mid U(\underline{d}(\delta)) \leq \overline{d}(\delta) \}$. \end{corollary} For a system of $\min-\max$ fuzzy relational equations, (Theorem \ref{th:Deltamin}) of this article becomes: \begin{corollary} Let $G = [g_{ij}]_{1 \leq i \leq n, 1 \leq j \leq m} \in [0,1]^{n\times m}$ be a matrix and $d = [d_i]_{1 \leq i\leq n}$ be a column vector. The Chebyshev distance associated to the second member $d$ of the system $G \Box_{\max}^{\min} x = d$ is: \begin{equation}\label{eq:nablapremier} \nabla = \nabla(G,d) = \max_{1 \leq i \leq n}\,\nabla_i \end{equation} where for $i = 1, 2, \dots n$: \begin{equation} \label{eq:Nablamini} \nabla_i = \min_{1 \leq j \leq m}\,\max[ ( g_{ij}-d_i)^+, \max_{1 \leq k \leq n}\, \,\sigma_\epsilon\,(d_i, g_{kj}, d_k)] \end{equation} \noindent and \begin{equation}\label{eq:sigmaespi} \sigma_\epsilon\,(u,v,w) = \min(\frac{(w-u)^+}{2}, (w - v)^+). \end{equation} \end{corollary} \begin{proof} If we set $A = G^\circ$ and $b = d^\circ$, we deduce (\ref{eq:nablapremier}), (\ref{eq:Nablamini}) and (\ref{eq:sigmaespi}) from the equality $\Delta(A,b)=\nabla(G,d)$, see (\ref{equaldeltas}), (Theorem \ref{th:Deltamin}) and the relation $\sigma_G(x,y,z)=\sigma_\epsilon(u,v,w)$ where $x = u^\circ$, $y= v^\circ$ and $z= w^\circ$. \end{proof} We define the set of Chebyshev approximations of the second member $d$ of the system $G \Box_{\max}^{\min} x = d$: \begin{equation} \mathcal{T}_d = \{ c \in \mathcal{T} \mid \Vert d -c \Vert = \nabla(G,d) \}. \end{equation} \noindent If $G = A^\circ$ and $d=b^\circ$, then the equality $\mathcal{T}_d = \mathcal{C}^\circ_b$ follows from (\ref{equaldeltas}).\\ From $U(\underline{d}(\nabla))={F(\overline{b}(\Delta))}^\circ$, see (Table \ref{tab:correspondences}), we deduce: \begin{corollary} The lowest Chebyshev approximation of the second member $d$ of the system $G \Box_{\max}^{\min} x = d$ is $U(\underline{d}(\nabla))$. \end{corollary} \noindent The method for obtaining maximal Chebyshev approximations of the second member $d$ of the system $G \Box_{\max}^{\min} x = d$ is analogous to the practical method presented in (Subsection \ref{subsec:minicheb}). We use the following notation: \begin{notation}\label{notationwwww} Let $\{ w^{(1)},w^{(2)},\dots,w^{(h)} \}$ be the set of maximal solutions of the system of inequalities $ G \Box_{\max}^{\min} x \leq \overline{d}(\nabla)$ such that $\forall i \in \{1,2,\dots,h\}, w^{(i)} \geq \nu=G^t \Box_{\epsilon}^{\max} U(\underline{d}(\nabla))$. \end{notation} We have: \begin{corollary}\label{eq:maxsol} \noindent We put: \begin{equation*}\label{eq:ttilde} \widetilde{\mathcal{T}} = \{ \psi(w^{(1)}),\psi(w^{(2)}),\dots,\psi(w^{(h)}) \} \end{equation*} \noindent and \begin{equation*}\label{eq:ttildemin} (\widetilde{\mathcal{T}})_{\max} = \{ c \in \widetilde{\mathcal{T}} \mid c \text{ is maximal in }\widetilde{\mathcal{T}}\}. \end{equation*} \noindent Then, we have: \[\widetilde{\mathcal{T}} \subseteq \mathcal{T}_{d} \text{ and } \mathcal{T}_{d,\max} = (\widetilde{\mathcal{T}})_{\max}, \] \noindent where $\mathcal{T}_{d,\max}$ is the set formed by the maximal Chebyshev approximations of the second member $d$ of the system $G \Box_{\max}^{\min} x = d$. \end{corollary} \begin{proof} Let $A = G^\circ$ and $b = d^\circ$. From the equality $\nabla(G,d)=\Delta(A,b)$ and the general switch in (\ref{eq:Atensetruc}), we have for any $x \in [0,1]^{m \times 1}$: \[ G \Box^{\min}_{\max} x \leq \overline{d}(\nabla) \Longleftrightarrow \underline{b}(\Delta) \leq A \Box_{\min}^{\max} x^\circ, \] \[ x \geq \nu \Longleftrightarrow x^\circ \leq \eta=A^t \Box_{\rightarrow_G}^{\min} F(\overline{b}(\Delta)). \] \noindent From these two equivalences, we deduce: \[ \{ w^{(1)},w^{(2)},\dots,w^{(h)} \} = \{{v^{(1)}}^\circ,{v^{(2)}}^\circ,\dots,{v^{(h}}^\circ \} \] \noindent where the set $\{v^{(1)},v^{(2)},\dots,v^{(h)} \}$ is defined in (Notation \ref{notations:minimalsol}) for the system $A \Box_{\min}^{\max} x = b$. \\ \noindent Using the switch (\ref{eq:Atensetruc}), this last equality implies the claims of the Corollary. \end{proof} \begin{corollary}\label{eq:tdmaxnonempty} The set $\mathcal{T}_{d,\max}$ is non-empty and finite. \end{corollary} \begin{proof} As $\widetilde{{\cal T}}$ is a finite non-empty ordered set, the set $(\widetilde{\mathcal{T}})_{\max} = \mathcal{T}_{d,\max}$ is non-empty and finite. \end{proof} \noindent We study the approximate solutions set $\Upsilon_d$ of the system $G \Box_{\max}^{\min} x = d$: \begin{definition} The approximate solutions set of the system $G \Box_{\max}^{\min} x = d$ is: \begin{equation*} \Upsilon_d = \psi^{-1}(\mathcal{T}_{d}) = \{x\in[0,1]^{m\times 1} \mid \psi(x) \in \mathcal{T}_{d}\}. \end{equation*} \end{definition} \noindent If $A = G^\circ$ and $b = d^\circ$, we have $\Upsilon_{d}= \Lambda_b^\circ$. From this, we deduce a particular element of $\Upsilon_d$: \begin{proposition} The lowest approximate solution of the system $G \Box_{\max}^{\min} x = d$ is $\nu = G^t \Box_{\epsilon}^{\max} U(\underline{d}(\nabla))$. \end{proposition} \begin{proof} This follows from that the fact that, if $A = G^\circ$ and $b = d^\circ$, we have $\nu = \eta^\circ$. \end{proof} We have a set of maximal approximate solutions $\Upsilon_{d,\max}$ of the system $G \Box_{\max}^{\min} x = d$ that satisfies: \begin{equation}\label{eq:satisifactiontruc} \Upsilon_{d,\max} \subseteq \Upsilon_d \text{ and } \mathcal{T}_{d,\max} = \{ \psi(x) \mid x \in \Upsilon_{d,\max} \}, \end{equation} which is defined by: \begin{definition} $$\Upsilon_{d,\max}= \{ x \in \{ w^{(1)}, w^{(2)},\dots, w^{(h)} \} \mid \psi(x) \in \mathcal{T}_{d,\max} \}, \quad \text{see (Notation \ref{notationwwww})}.$$ \end{definition} We have: \begin{proposition} With the above definition of $\Upsilon_{d,\max}$, we have $\Upsilon_{d,\max} \subseteq \Upsilon_d \text{ and } \mathcal{T}_{d,\max} = \{ \psi(x) \mid x \in \Upsilon_{d,\max} \}$. Therefore, the set $\Upsilon_{d,\max}$ is non-empty and finite. \end{proposition} \begin{proof} If $A = G^\circ$ and $b = d^\circ$, we have: $\psi(x)=\theta(x^{\circ})^{\circ}$, $\Upsilon_{d} = \Lambda_{b}^\circ$ and $\Upsilon_{d,\max} = \Lambda_{b,\min}^\circ$. From these three equalities, we deduce immediately $\Upsilon_{d,\max} \subseteq \Upsilon_d$ and $\mathcal{T}_{d,\max} = \{ \psi(x) \mid x \in \Upsilon_{d,\max} \}$.\\ As we know that the set $\mathcal{T}_{d,\max}$ is non-empty and finite (Corollary \ref{eq:tdmaxnonempty}), we deduce from the equality $\mathcal{T}_{d,\max} = \{ \psi(x) \mid x \in \Upsilon_{d,\max} \}$ that the set $\Upsilon_{d,\max}$ is also non-empty and finite. \end{proof} The structure of the set ${\cal T}_d$ is described by the following result: \begin{corollary}\label{corollary:anologth3} For all $c\in [0 , 1]^{n \times 1}$, we have: \begin{equation}c \text{ is a Chebyshev approximation of } d \text{ i.e., } c\in {\cal T}_d \,\Longleftrightarrow \, U(c) = c \,\,\text{and}\,\,\exists \, c'\in {\cal T}_{d,\max} \,\, \text{s.t.}\,\, U(\underline{d}(\nabla)) \leq c \leq c'.\end{equation} \end{corollary} \begin{proof} This follows from that the fact that, if $A = G^\circ$ and $b = d^\circ$, we have $\mathcal{T}_d = \mathcal{C}_b^\circ$, $\mathcal{T}_{d,\max} = \mathcal{C}_{b,\min}^\circ$ and $U(\underline{d}(\nabla))={F(\overline{b}(\Delta))}^\circ$; by applying (Theorem \ref{th:3}), we get the result. \end{proof} \noindent In the following, we illustrate the switch from the system of $\min-\max$ fuzzy relations equations $(\Sigma)$ of \cite{baaj2022learning} to its associated system of $\max-\min$ fuzzy relational equations. \begin{example}\label{ex:example7poss} Let us reuse the example in \cite{baaj2022learning}. \begin{align*} (\Sigma): \, \,\, \, Y\, \,\, \, &= \Gamma \Box_{\max}^{\min} X\\ \begin{bmatrix} 0.3 \\ 1 \\ 0.3 \\ 0.8 \\ 0.3 \\ 0.7 \\ 0.3 \\ 0.7 \end{bmatrix} &= \begin{bmatrix} 0.1 & 1 & 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 1 & 1 & 1\\ 0.1 & 1 & 1 & 0.8 & 1 & 1\\ 1 & 1 & 1 & 0.8 & 1 & 1\\ 0.1 & 1 & 1 & 1 & 1 & 0.3\\ 1 & 1 & 1 & 1 & 1 & 0.3\\ 0.1 & 1 & 1 & 0.8 & 1 & 0.3\\ 1 & 1 & 1 & 0.8 & 1 & 0.3\\ \end{bmatrix}\Box_{\max}^{\min} \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ s_3 \\ r_3 \end{bmatrix}. \end{align*} \noindent where $s_1,r_1,s_2,r_2,s_3$, and $r_3$ are unknown rule parameters. The system $(\Sigma)$ is consistent. We have: \begin{align*} X=\begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ s_3 \\ r_3 \end{bmatrix}\text{ is a solution iff} \begin{bmatrix} 0.3 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0.7 \end{bmatrix} \leq \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ s_3 \\ r_3 \end{bmatrix} \leq \begin{bmatrix} 0.3 \\ 1 \\ 1 \\ 0.8\\ 1 \\ 0.7 \end{bmatrix}. \end{align*} \noindent Let $A = \Gamma^\circ$, $x= X^\circ$ and $b= Y^\circ$. We have: \begin{align*} \, \,\, \, b\, \,\, \, &= A \Box_{\min}^{\max} x\\ \begin{bmatrix} 0.7 \\ 0 \\ 0.7 \\ 0.2 \\ 0.7 \\ 0.3 \\ 0.7 \\ 0.3 \end{bmatrix} &= \begin{bmatrix} 0.9 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0\\ 0.9 & 0 & 0 & 0.2 & 0 & 0\\ 0 & 0 & 0 & 0.2 & 0 & 0\\ 0.9 & 0 & 0 & 0 & 0 & 0.7\\ 0 & 0 & 0 & 0 & 0 & 0.7\\ 0.9 & 0 & 0 & 0.2 & 0 & 0.7\\ 0 & 0 & 0 & 0.2 & 0 & 0.7\\ \end{bmatrix}\Box_{\min}^{\max} \begin{bmatrix} 1 - s_1 \\ 1 - r_1 \\ 1 - s_2 \\ 1 - r_2 \\ 1 - s_3 \\ 1 - r_3 \end{bmatrix}. \end{align*} We have: \begin{align*} x=\begin{bmatrix} 1-s_1 \\ 1-r_1 \\ 1-s_2 \\ 1-r_2 \\ 1-s_3 \\ 1-r_3 \end{bmatrix}\text{ is a solution iff} \begin{bmatrix} 0.7 \\ 0 \\ 0 \\ 0.2\\ 0 \\ 0.3 \end{bmatrix} \leq \begin{bmatrix} 1-s_1 \\ 1-r_1 \\ 1-s_2 \\ 1-r_2 \\ 1-s_3 \\ 1-r_3 \end{bmatrix} \leq \begin{bmatrix} 0.7 \\ 1 \\ 1 \\ 1 \\ 1 \\ 0.3 \end{bmatrix}. \end{align*} \end{example} \noindent Let $(\Sigma)$ be an inconsistent system. Using our results, we can obtain approximate solutions of the system $(\Sigma)$ which are solutions of the consistent systems defined by the matrix of $(\Sigma)$ and a Chebyshev approximation of the second member of $(\Sigma)$. For obtaining maximal Chebyshev approximations of the second member of the system $(\Sigma)$, we have to use (Corollary \ref{eq:maxsol}), which requires the solving of a particular system of $\min-\max$ fuzzy relational inequalities. The solving of such a system can be done by adapting the results of \cite{matusiewicz2013increasing} using an approach similar to the one we used to establish the correspondences (Table \ref{tab:correspondences}). \noindent We illustrate how to obtain approximate solutions of the system $(\Sigma)$ when it is inconsistent. \begin{example} (continued) Let us reuse the matrix $\Gamma$ of the previous example and a new second member $Y = \begin{bmatrix} 0.3 \\ 1 \\ 0.3 \\ 0.8 \\ 0.7 \\ 0.7 \\ 0.3 \\ 0.7 \end{bmatrix}$. In this case, the system $(\Sigma)$ is inconsistent and the Chebyshev distance associated to the second member $Y$ of $(\Sigma)$ is $\nabla = 0.2$. The lowest Chebyshev approximation of $Y$ is denoted $\check{Y}$ and from (Corollary \ref{eq:maxsol}) we find that there is a unique maximal Chebyshev approximation of $Y$ which is denoted $\hat{Y}$: \begin{equation} \check{Y} = \begin{bmatrix} 0.5\\ 1\\0.5\\ 0.8\\ 0.5\\ 0.5\\ 0.5\\ 0.5\end{bmatrix} \quad \text{and} \quad \hat{Y} = \begin{bmatrix} 0.5 \\1\\ 0.5\\ 1\\ 0.5\\ 0.9\\ 0.5\\ 0.9 \end{bmatrix}. \end{equation} \noindent Some approximate solutions of the system $(\Sigma) : Y = \Gamma \Box_{\max}^{\min} X$ are the solutions of the system $\check{Y} = \Gamma \Box_{\max}^{\min} X$ i.e., $ \begin{bmatrix} 0.5 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0.5 \end{bmatrix} \leq \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ s_3 \\ r_3 \end{bmatrix} \leq \begin{bmatrix} 0.5 \\ 1 \\ 1 \\ 0.8\\ 1 \\ 0.5 \end{bmatrix}$ and the solutions of the system $\hat{Y} = \Gamma \Box_{\max}^{\min} X$ i.e, $ \begin{bmatrix} 0.5 \\ 0 \\ 0 \\ 1 \\ 0 \\ 0.9 \end{bmatrix} \leq \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ s_3 \\ r_3 \end{bmatrix} \leq \begin{bmatrix} 0.5 \\ 1 \\ 1 \\ 1\\ 1 \\ 0.9 \end{bmatrix}$. One can check that $\begin{bmatrix} 0.5 \\ 1 \\ 1 \\ 1\\ 1 \\ 0.9 \end{bmatrix}$ belongs to $\Upsilon_{Y,\max}$ i.e., it is a maximal approximate solution. \end{example} \subsection{Finding approximate solutions of the rule parameters according to multiple training data} The equation system $(\Sigma)$ has been introduced for learning the rule parameters according to a training datum \cite{baaj2022learning}. Our results let us tackle the problem of determining values of the rule parameters when we have multiple training data as follows. \noindent Let us consider that we have $N$ equation systems $(\Sigma_1): Y_1 = \Gamma_1 \Box_{\max}^{\min} X, (\Sigma_2): Y_2 = \Gamma_2 \Box_{\max}^{\min} X, \dots, (\Sigma_N): Y_N = \Gamma_N \Box_{\max}^{\min} X$, where each of them is formed from a training datum using the procedure introduced in \cite{baaj2022learning}. From the matrices $\Gamma_1, \Gamma_2,\dots, \Gamma_N$ and the second members $Y_1, Y_2, \dots Y_N$ of the equation systems, we form a new matrix and a new column vector by block matrix construction: \begin{equation} \mathbf{\Gamma} = \begin{bmatrix} \Gamma_1\\ \Gamma_2\\ \vdots\\ \Gamma_N \end{bmatrix} \text{ and } \mathbf{Y} = \begin{bmatrix} Y_1\\ Y_2\\ \vdots \\ Y_N \end{bmatrix} \end{equation} \noindent We introduce the following equation system, which in fact stacks the equation systems $(\Sigma_1), (\Sigma_2),\dots,(\Sigma_N)$ into one: \begin{equation} (\mathbf{\Sigma}): \mathbf{Y} = \mathbf{\Gamma} \Box^{\min}_{\max} X. \end{equation} By solving $(\mathbf{\Sigma})$, we obtain solutions for the rule parameters that take into account all the training data. If the system $(\mathbf{\Sigma})$ is inconsistent, $\nabla(\mathbf{\Gamma},\mathbf{Y})$ is the Chebyshev distance associated to its second member $\mathbf{Y}$ and using our results, we can obtain approximate solutions of the rule parameters which are approximate solutions of the system $(\mathbf{\Sigma})$. We illustrate this paradigm by the following example. \begin{example} \noindent We consider two systems, each of them being built from a training datum using the method presented in~\cite{baaj2022learning}: \begin{align*} (\Sigma_1): \, \,\, \, Y_1\, \,\, \, &= \Gamma_1 \Box_{\max}^{\min} X\\ \begin{bmatrix} 0.3 \\ 1 \\ 0.3 \\ 0.8 \end{bmatrix} &= \begin{bmatrix} 0.4 & 1 & 1 & 1\\ 1 & 1 & 1 & 1 \\ 0.4 & 1 & 1 & 0.8\\ 1 & 1 & 1 & 0.8 \\ \end{bmatrix}\Box_{\max}^{\min} \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ \end{bmatrix} \end{align*} \noindent and \begin{align*} (\Sigma_2): \, \,\, \, Y_2\, \,\, \, &= \Gamma_2 \Box_{\max}^{\min} X\\ \begin{bmatrix} 1 \\ 0.8 \\ 0.3 \\ 0.3 \end{bmatrix} &= \begin{bmatrix} 1 & 1 & 1 & 1\\ 1 & 0.7 & 1 & 1 \\ 1 & 1 & 1 & 0.1\\ 1 & 0.7 & 1 & 0.1 \\ \end{bmatrix}\Box_{\max}^{\min} \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ \end{bmatrix}. \end{align*} \noindent We remind that $s_1,r_1,s_2,r_2$ are the unknown rule parameters. \noindent We form the system $(\mathbf{\Sigma}):$ \begin{align*} (\mathbf{\Sigma}): \, \,\, \, \mathbf{Y}\, \,\, \, &= \mathbf{\Gamma} \Box_{\max}^{\min} X\\ \begin{bmatrix} 0.3 \\ 1 \\ 0.3 \\ 0.8\\ 1 \\ 0.8 \\ 0.3 \\ 0.3 \end{bmatrix} &= \begin{bmatrix} 0.4 & 1 & 1 & 1\\ 1 & 1 & 1 & 1 \\ 0.4 & 1 & 1 & 0.8\\ 1 & 1 & 1 & 0.8 \\ 1 & 1 & 1 & 1\\ 1 & 0.7 & 1 & 1 \\ 1 & 1 & 1 & 0.1\\ 1 & 0.7 & 1 & 0.1 \\ \end{bmatrix}\Box_{\max}^{\min} \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ \end{bmatrix}. \\ \end{align*} \noindent The system $(\mathbf{\Sigma})$ is inconsistent, because the Chebyshev distance associated to its second member $\mathbf{Y}$ is $\nabla=0.1$. The lowest Chebyshev approximation of $\mathbf{Y}$ is denoted $ \mathbf{\check{Y}}$ and we find that we have a unique maximal Chebyshev approximation of $\mathbf{Y}$ denoted $\mathbf{\hat{Y}}$: \begin{equation*} \mathbf{\check{Y}} = \begin{bmatrix} 0.4\\ 1\\0.4\\ 0.8\\ 1\\ 0.7\\ 0.2 \\ 0.2 \end{bmatrix} \text{ and } \mathbf{\hat{Y}}= \begin{bmatrix}0.4\\ 1\\ 0.4\\ 0.8\\ 1\\ 0.9\\ 0.4 \\ 0.4\end{bmatrix}. \end{equation*} \noindent Some approximate solutions of the system $(\mathbf{\Sigma}) $ are the solutions of the system $\check{\mathbf{Y}} = \mathbf{\Gamma} \Box_{\max}^{\min} X$ i.e., $ \begin{bmatrix} 0 \\ 0.7 \\ 0 \\ 0.2 \\ \end{bmatrix} \leq \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \end{bmatrix} \leq \begin{bmatrix} 0.4 \\ 0.7 \\ 1 \\ 0.2 \end{bmatrix}$ and the solutions of the system $\hat{\mathbf{Y}} = \mathbf{\Gamma} \Box_{\max}^{\min} X$ i.e, $ \begin{bmatrix} 0 \\ 0.9 \\ 0 \\ 0.4\\ \end{bmatrix} \leq \begin{bmatrix} s_1 \\ r_1 \\ s_2 \\ r_2 \\ \end{bmatrix} \leq \begin{bmatrix} 0.4 \\ 0.9\\ 1 \\ 0.4 \end{bmatrix}$. \end{example} \section{Conclusion} In this article, for an inconsistent system of $\max-\min$ fuzzy relational equations denoted $(S): A \Box_{\min}^{\max}x =b$, we have described the approximate solutions set of the system and the set of Chebyshev approximations of the second member $b$. The main tool of our study is an explicit analytical formula to compute the Chebyshev distance $\Delta = \inf_{c \in {\cal C}} \Vert b - c \Vert$, which is expressed in $L_\infty$ norm, and where ${\cal C}$ is the set of second members of the consistent systems defined with the same matrix $A$. The Chebyshev distance is obtained by elementary calculations involving only the components of the matrix $A$ and those of the second member $b$. We defined an approximate solution of an inconsistent system $A \Box_{\min}^{\max}x =b$ as a solution of a consistent system $A \Box_{\min}^{\max}x = c$, where $c$ is a vector such that $\Vert b - c \Vert=\Delta$ ; $c$ is called a Chebyshev approximation of $b$. We first related the approximate solutions set to the set of Chebyshev approximation of $b$. We gave two sharp characterizations of the approximate solutions set and showed how to get minimal Chebyshev approximations of $b$ from minimal approximate solutions. As a consequence of our result, we proved that the set of minimal Chebyshev approximations of $b$ is non-empty and finite. Furthermore, we described the structure of the approximate solutions set and that of the set of Chebyshev approximations of $b$. We introduced a paradigm for $\max-\min$ learning approximate weight matrices relating input and output data from training data, where the learning error is expressed in terms of $L_\infty$ norm. For this purpose, we canonically associated to the training data systems of $\max-\min$ fuzzy relational equations. These systems allowed us to compute the minimal value $\mu$ of the learning error according to the training data. This minimal value $\mu$ is expressed in terms of the Chebyshev distances associated to the second member of the already introduced systems. Moreover, we gave a method for constructing approximate weight matrices whose learning error is equal to $\mu$. By introducing analogous tools for a system of $\min-\max$ fuzzy relational equations to those already introduced for a system of $\max-\min$ fuzzy relational equations, and then establishing the correspondences between them, we have shown that the study of the approximate solutions of a system of $\max-\min$ fuzzy relational equations is equivalent to the study of the approximate solutions of a system of $\min-\max$ fuzzy relational equations. This allowed us to extend the results of \cite{baaj2022learning}: we gave a method to approximately learn the rule parameters of a possibilistic rule-based system according to multiple training data. In perspectives, we are currently working on the development of analogous tools for systems of $\max-T$ fuzzy relational equations, where $T$ is the t-norm product or the t-norm of Łukasiewicz. For these systems, we already have analytical formulas to compute the Chebyshev distance associated to their second member. As applications, for the problem of the $\max-\min$ invertibility of a fuzzy relation, when a fuzzy matrix $A$ has no preinverse (resp. postinverse), we know how to compute, using the $L_\infty$ norm, an approximate preinverse (resp. postinverse) for $A$. We also tackle the development of new applications based on systems of $\max-T$ fuzzy relational equations where $T$ is a t-norm among $\min$, product or the one of Łukasiewicz. \bibliographystyle{plainnat}
{'timestamp': '2023-01-24T02:23:50', 'yymm': '2301', 'arxiv_id': '2301.06141', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06141'}
arxiv
\section{Introduction}\label{sec:introduction}} \IEEEPARstart{I}{n} recent years, \acp{cnn} have become increasingly adept at executing numerous complex image processing, classification and segmentation tasks. These improvements have been attained in large part at the expense of a continuous increase in size and complexity for new \ac{cnn} network topologies. ResNet-50~\cite{resnet} (introduced in 2015, with 26 million parameters), achieves a top-1 accuracy of 77.15\%, and a top-5 accuracy of 93.29\%. (Top-N accuracy corresponds to the proportion of scenarios for which the correct answer is contained in the network's $N$ best guesses, for a given classification problem.) In contrast, EfficientNet-B7~\cite{efficientnet} (introduced in 2019, with 66 million parameters, $2.5 \times$ larger than ResNet-50), achieves top-1 and top-5 accuracies for the ImageNet dataset of 84.40\% and 97.10\%, respectively. The upshot of this increase in the computational complexity is a substantial increase in the time and energy required to train and use them. The widespread adoption of \acp{cnn} is potentially most impactful in edge devices (e.g., autonomous vehicles, smartphones), which often come equipped with high-quality imaging sensors. However, these devices also carry very strict autonomy constraints, and are therefore unsuited to execute the complex and memory-intensive operations associated with conventional \acp{cnn}. The severity of this issue will continue to escalate in the near future, as newly proposed networks make use of increasingly large numbers of parameters, exacerbating their memory intensity and performance and energy overheads~\cite{energy-problem}. To curb the scaling challenges \cite{challenges} presented by these larger networks, while retaining as many of their benefits as possible, it is possible to \emph{quantize} \ac{cnn} parameters, yielding \acfp{qcnn}. Quantization consists in reducing the bit width of a network's parameters to alleviate their computational and data movement requirements, and has been demonstrated by many prior works \cite{qnn,dorefa-net,xnor-net,twn,ttq,vector_quantization,qcnn_for_mobile,incremental_quantization,hwgq_net,lq_nets,bi_real,tow_step_quantization,multiple_step_quantization,bwnh,pact,wrpn,syq,dist_quant,apprentice,loss_aware_binarization,defensive_quantization,reg_training_bnn,circulant_bcnns,bnn_plus,blended_coarse_gradient,proxquant,self_binarizing_net,acc_compact_bnn,bbg,bnn_r_to_b_conv,info_retention,pami_wang_learning_2021,pami_wang_gradient_2021,pami_bulat_hierarchical_2020,pami_sun_lazily_2020,pami_zhuang_effective_2021,pami_tang_towards_2020,pami_han_learning_2021,pami_li_learning_2021,pami_duan_learning_2019} to provide substantial performance and energy gains, with minimal losses in accuracy. Quantization allows 1) the use of less compute resources - less bits involved in logic operations - 2) the use of less memory to store the actual data and 3) the reduction of data movement. These lead to reductions on area footprints for computation hardware implementation and required memory. Other techniques can also alleviate computational requirements such as pruning \cite{brain_damage, automatic_pruning, neuron_pruning, pruning, channel_pruning}, fine-tuning \cite{fine_tuning}, compression \cite{deep_compression, prune_bin, deep_compression2}, decomposition \cite{low_rank_decomposition, circulant_projections, cp_decomposition}, knowledge distillation/transfer learning \cite{knowledge_distillation, kd_and_tl, abc_net, kd_adversarial_networks, darkrank}, or others \cite{cpu_optimization, linear_structure}, but this work only focus on quantization. Many recent works have demonstrated how it is possible to leverage \acp{qcnn} to greatly accelerate the training and inference in many specialized architectures, including \acp{gpu}~\cite{tensor-core, mixed_prec_training, mixed_prec_training2, mixed_prec_solvers, bfloat16, ampt_ga, mp_solver_matrix, mp_cluster, mp_cluster2, mp_cluster3}, \acp{fpga}~\cite{quantizationFPGA, openCL-FPGA-accelerator, scnn-fpga-accelerator, mnist-fpga-accelerator, dsc-fpga-accelerator}, \acp{asic}~\cite{yodann-asic-accelerator, cnn-fpga-asic-accelerator, deepopt-asic, dnn_accelerator} and low-power \acp{soc}~\cite{asic_soc}. A particular case of interest is binarization, i.e., the quantization of all parameters to 1-bit~\cite{review-bnns, bnn-survey}. In \acp{bcnn}, convolution operations can be performed exclusively with resort to bitwise logic operations, which enables high performance improvements~\cite{BNN_FPGA_implementation1,BNN_FPGA_implementation2}. This has been especially useful for emerging computing paradigms (e.g., \ac{pim}) which achieve very high throughput and energy efficiency for bitwise operations~\cite{drisa,ambit,neural-cache,dima,rebnn,rtl_lib-compiler}. It is vital to understand the effect of quantizing \ac{cnn} parameters, and the benefits and drawbacks of each of the quantization methods proposed in prior works. In this work, we not only present quantization methods and their results, but also study and compare them, by 1) fully training them with different weight/activation quantization levels, and 2) evaluating their performance for the MNIST, CIFAR-10 and ImageNet datasets. \textbf{To this end}, we introduce \textbf{\textit{{RedBit}\xspace}}, a PyTorch-based, open-source framework that enables the design space exploration of different quantization parameters and their impact on network accuracy. Using {RedBit}\xspace, we evaluate the accuracy of five leading quantization methods, as determined by a thorough survey of the literature, across $4500$ intermediate training processes. Through this analysis, we identify the quantization hyperparameters that maximize accuracy. Our results were generated over upwards of $20000$ hours of compute time on a pool of state-of-the-art GPUs, resulting in the training of over $2300$ unique network models using different quantization methods and parameters. All our results are available in the public Git repository, \href{https://github.com/IT-Coimbra/RedBit}{https://github.com/IT-Coimbra/RedBit}. We highly encourage readers to download and use the provided source code, and also to contribute their own GPU time to run experiments using {RedBit}\xspace, and to upload their accuracy results to our repository. Through these contributions, it is possible to make progress towards our end goal of quantifying the accuracy provided by as many quantization methods as possible. We also encourage readers to contribute to the development of the framework with improvements, e.g., support for more algorithms, quantization methods and further optimizations. \section{Background} \label{sec:background} This section provides an overview of key concepts related to state-of-the-art \ac{cnn} architectures and commonly used datasets, and introduces the concept of quantization and the quantization algorithms which we later analyze. \subsection{Convolutional Neural Networks} \label{sec:convolutional-neural-networks} \acp{cnn} are a class of deep neural networks often applied image-related machine learning tasks. Their name is derived from the fact that most of the layers in \acp{cnn} are \emph{convolutional layers}, wherein the convolution operation is performed between a given input and a (smaller) feature detector. Batch normalization, non-linearity and pooling layers are also present in \acp{cnn}. AlexNet~\cite{alexnet}, ResNet~\cite{resnet}, DenseNet~\cite{densenet}, VGG \cite{vgg}, Inception class \cite{inception}, Deep Networks \cite{deep_network}, MobileNet \cite{mobilenet_v1, mobilenet_v2}, ShuffleNet \cite{shufflenet_v1, shufflenet_v2}, SqueezeNet \cite{squeezenet} and EfficientNet~\cite{efficientnet} are popular types of \acp{cnn}. \acp{cnn} can train successfully because of the back propagation algorithm \cite{back_propagation1, back_propagation2, back_propagation3, back_propagation4}. \begin{figure*}[!htb] \centering \begin{tabular}{ccc} \subcaptionbox{\label{subfig:1D-conv-operation}}{\includegraphics[height = 30mm]{images/1d-conv-operation.png}} & \subcaptionbox{\label{subfig:convolution-kernel-movement}}{\includegraphics[height = 35mm]{images/3d-conv-kernel-movement.png}} & \subcaptionbox{\label{subfig:shortcut}}{\includegraphics[height = 35mm]{images/basic-block.png}} \end{tabular} \caption{\textbf{(a)} 1D convolution operation. Each element from input A is multiplied to the corresponding element in the kernel K, i.e., point-wise multiplication. The final result value is the sum of all multiplications. \textbf{(b)} Kernel movement in a convolutional layer. Depth represents the number of input channels. \textbf{(c)} Basic block in the ResNet CNN architecture. } \end{figure*} \subsubsection{The Convolutional/Fully connected Layers} \label{sec:conv-fully-connected-layers} In a convolutional layer the convolution operation is applied between a 3D kernel and the inputs of that layer. The convolution operation is a point-wise product followed by an addition reduction as it is shown in Figure \ref{subfig:1D-conv-operation}. CNNs also have fully connected layers, where the convolution operation also takes place. Throughout this work, the kernel parameters values are referred to as weights and the inputs of a layer referred to as input activations. Also, when we mention input activations, we are generally referring to the inputs of convolutional/fully connected layers. On \acp{cnn}, the convolution operation is expanded into 3D, as depicted in Figure \ref{subfig:convolution-kernel-movement}. This figure also shows how the kernel moves throughout the input. In this example, the input is an RGB image. \subsubsection{The Non-linearity Layer} With only convolutional/fully connected layers, it is difficult for a neural network to approach the solution for a problem. With the use of non-linear layers, it is proven that a neural network can be fitted to solve non-linear problems~\cite{non-linearity-cnn}. Examples of popular non-linear functions used in CNNs are Sigmoid, ReLU and HardTanh. \subsubsection{The Batch Normalization Layer} To train \acp{cnn} more effectively, Ioffe and Szegedy~\cite{batchnorm} introduce a type of layer known as batch normalization. Batch normalizations re-centers and re-scales input activations. The normalization helps reduce the internal covariate shift present in the input activations during training allowing the model to converge faster to the optimal solution, by using bigger values for the learning rate parameter. \subsubsection{The Pooling Layers} \label{sec:pooling-layers} Along the neural network, the number of feature maps, i.e., number of output channels of a layer, often changes and also their size. This change is often referred to as downsampling and help reduce the computational requirements. To downsample, CNNs make use of pooling layers. Most popular types are average pooling and maximum pooling, where a kernel passing across a feature map pools the average or maximum value, respectively. The output of pooling layers are also summarized versions of the input feature maps, making them more robust. \subsubsection{Shortcuts} Some \acp{cnn} (e.g., ResNet) employ \emph{shortcuts}, which facilitate the flow of information across the network. The key idea is to pass the input activations not only to the next layer, but also to the subsequent layers, as shown in \Cref{subfig:shortcut}. \subsection{Datasets} \label{sec:datasets} We evaluate the performance of several \acp{cnn} for three popular datasets: MNIST, CIFAR-10 and ImageNet. This section succinctly describes the characteristics of each of these datasets. \vspace{1mm} \noindent \textbf{MNIST}~\cite{lenet-5} contains 70,000 28x28 grey images of handwritten digits. 60,000 images compose the training set and the remain 10,000 belong to the test set. The digits have been size normalized and centered in a fixed-size image. \vspace{1mm} \noindent \textbf{CIFAR-10}~\cite{cifar-10} contains 60,000 32x32 color images equally distributed across the following 10 classes: \{airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck\}. This dataset contains 50,000 images in the training set and 10,000 images in the test set. \vspace{1mm} \noindent \textbf{ImageNet}~\cite{imagenet} contains over 14 million images of various sizes, across 1000 classes. There are multiple revisions of this dataset. In this work we use the \ac{ilsvrc} 2012 version. \section{Conclusion} We introduce {RedBit}\xspace, a framework that enables the user-friendly, systematic evaluation of a wide gamut of \acp{qcnn} by streamlining their training and testing procedures. Using {RedBit}\xspace, we implement and evaluate a total of $4500$ unique network configurations, using various methods, quantization levels, and datasets. Our results show that \acp{qcnn} achieve near state-of-the-art accuracy while simultaneously reducing the memory and computational footprint of modern \ac{cnn} models by up to $32\times$. All source code and results have been open-sourced. We actively encourage the community to build upon the $20000$+ hours of active compute time we provide as a starting point, and to contribute towards the development of additional models, quantization methods, and datasets, as well as their evaluation. Through a community-driven effort it will be possible to leverage {RedBit}\xspace to create the world's largest repository of \ac{qcnn} configurations, which will aid the prototyping, development, and application of \acp{qcnn}. \vspace{3mm} \begin{tcolorbox}[colback=repoboxback,colframe=repoboxborder,title=\textbf{\emph{Getting Started with {RedBit}\xspace}}] All source code and results are available at \textbf{\href{https://github.com/IT-Coimbra/RedBit}{https://github.com/IT-Coimbra/RedBit}}. Developers interested in contributing should refer to this repository, which includes instructions for reproducing our results and for contributing additional quantization models, methods, and results. \end{tcolorbox} \section{Design Space Exploration} \label{dse} Since both DoReFa-Net and QNN offer a wide degree of quantization levels, we trained a wide variety of quantized models and represent these data in \Cref{fig:plots_2d,fig:plots_3d}. The quantization methods used to obtain these results were DoReFa-Net and QNN applied to LeNet-5 (on the MNIST dataset) and to ResNet-20 (on the CIFAR-10 dataset). The 3D representation is made with a bar chart, where each bar represents the accuracy obtained with the quantized model to the desired bit width for weights and input activations. \subsection{Reducing Computational Cost and Model Size Without Compromising Accuracy} \label{sec:reducing-comp-cost} \begin{figure*}[t] \centering \begin{tabular}{cccc} \subcaptionbox{\label{subfig:lenet5-qnn}}{\includegraphics[width=0.23\textwidth]{images/mnist-lenet5-qnn-3d-curve.png}} & \subcaptionbox{\label{subfig:lenet5-dorefa-net}}{\includegraphics[width=0.23\textwidth]{images/mnist-lenet5-dorefa-net-3d-curve.png}} & \subcaptionbox{\label{subfig:resnet20-qnn}}{\includegraphics[width=0.23\textwidth]{images/cifar10-resnet20-qnn-3d-curve.png}} & \subcaptionbox{\label{subfig:resnet20-dorefa-net}}{\includegraphics[width=0.23\textwidth]{images/cifar10-resnet20-dorefa-net-3d-curve.png}} \end{tabular} \caption{3D scatterbar of quantization applied to LeNet-5 and ResNet-20, trained with MNIST and CIFAR-10, respectively, with QNN and DoReFa-Net methods. \textbf{(a)} QNN Quantization of LeNet-5. \textbf{(b)} DoReFa-Net Quantization of LeNet-5. \textbf{(c)} QNN Quantization of ResNet-20. \textbf{(d)} DoReFa-Net Quantization of ResNet-20. } \label{fig:plots_3d} \end{figure*} To reduce the computational cost of arithmetic operations, both the bit widths of weights and input activations can be reduced. \Cref{subfig:mnist-lenet5-quant-weights-activations,subfig:cifar10-resnet20-quant-weights-activations} show the accuracy curves when quantizing both weights and input activations to the desired bit width. Overall, both methods behave similarly, giving good results until 2-bit quantization. Binarization continues to be a challenge. In the case of LeNet-5 trained with MNIST using the DoReFa-Net method, the \ac{cnn} model can be quantized from 32 bits down to 2 bits with a 0.07\% accuracy loss. In the case of QNN, the model can only be quantized from 32 bits down to 3 bits with an accuracy loss of 0.17\%. For ResNet-20 trained with CIFAR-10, quantizing from 32 bits down to 2 bits, DoReFa-Net achieves an accuracy loss less than 2.2\%, with an average of 88.97\% accuracy. QNN can only present an accuracy degradation less than 2.5\% when quantizing from 32 bits down to 3 bits. Lower than 3 bits, QNN incurs higher accuracy degradation than DoReFa-Net. \Cref{subfig:mnist-lenet5-quant-weights-A32,subfig:cifar10-resnet20-quant-weights-A32} show that it is possible to achieve minimal accuracy losses (of less than $1$\%) with binarized weights. This corresponds to a model size reduction of up to 32$\times$, which provides savings in computational costs by reducing the bit width of the input activations. \Cref{subfig:mnist-lenet5-quant-activations-W1,subfig:cifar10-resnet20-quant-activations-W1} show the accuracy curves when the weights are always binarized and the input activations are quantized to the desired bit width. For the LeNet-5 results, QNN performs marginally worse than DoReFa-Net. DoRefa-Net achieves better stability on accuracy when quantizing down to 2 bits. For ResNet-20 applied to CIFAR-10, quantizing from 32 bits down to 2 bits, DoReFa-Net incurs in less than 2.4\% accuracy loss, resulting in an average accuracy of 87.82\%. QNN starts to show higher degradation on accuracy when quantizing to 2 bits. For binarization, both methods present a significant degradation on accuracy compared to 2-bit quantization, proving once more the importance of keeping input activations at higher bit widths. \gboxbegin{kobackteal}{koborderteal}{TAKEAWAY}{\rtasktak{kt}} \textbf{Models can be quantized with memory savings of up to 32$\times$ with minimal accuracy degradation.} Reducing the bit width of input activations down to 2 bits while also reducing weight bit widths results in minimal accuracy losses. The use of fewer bits helps reduce the computational cost of performing inference in quantized neural networks. \gboxend \subsection{Quantization of Weights and Input Activations vs. Accuracy} \label{sec:quant-wei-in-act} \Cref{subfig:lenet5-qnn,subfig:lenet5-dorefa-net} show the quantization results applying QNN and DoReFa-Net, respectively, obtained for the MNIST dataset with the LeNet-5 network. DoReFa-Net is more consistent than QNN. The importance of keeping the input activations at a higher bit width is clearly noticeable here, especially on \Cref{subfig:lenet5-dorefa-net} that shows the results for DoReFa-Net. Here, the blue bars at the left of the image correspond to the accuracy results obtained when the input activations were binarized. \Cref{subfig:resnet20-qnn,subfig:resnet20-dorefa-net} show the results obtained with QNN and DoReFa-Net, respectively, when quantizing ResNet-20 applied to CIFAR-10. Again, if the input activations are kept with bit widths greater than 1 bit, the accuracy results are consistent across all quantization plane. The accuracy loss due to quantization of weights is minimal all the way down to 3 bits. 2- and 1-bit quantization still offer acceptable results. This result continues to show the importance of input activations. \gboxbegin{kobackteal}{koborderteal}{TAKEAWAY}{\rtasktak{kt}} \textbf{The quantization of input activations has a greater effect on accuracy loss than the quantization of weights.} \Crefrange{subfig:lenet5-qnn}{subfig:resnet20-dorefa-net} show that it is possible to reduce the bit width of weights and/or input activations and still achieve good results with a minimal loss in accuracy. Binarization yields the worst accuracy, especially if input activations are binarized. The quantization of input activations is more prone to reducing classification accuracy than the quantization of weights. \gboxend \subsection{The Importance of the First Convolutional Layer and of the Final Fully Connected Layer} The quantization of the first convolutional layer and of the final fully connected layer is a key factor for the accuracy of the aforementioned quantization methods. In this section, we evaluate accuracy results of quantized models on multiple levels of bit width. Since both \ac{qnn}~\cite{qnn} and DoReFa-Net~\cite{dorefa-net} allow multiple levels of bit width quantization, we evaluate if the level of quantization applied to the parameters of these layers significantly impacts the accuracy of the network. The networks used for this study were LeNet-5, trained with MNIST, and ResNet-20, trained with CIFAR-10. The accuracy results obtained in this study are sumarized in Tables \ref{tab:FLL-quant-study-LeNet5} and \ref{tab:FLL-quantization-study-ResNet20}. \begin{table}[!b] \centering \begin{tabular}{|c|cccc|} \hline \multirow{2}{*}{Method} & \multicolumn{4}{c|}{Quantization of \textunderscore{W}eights and \textunderscore{A}ctivations} \\ & W8A8 & W4A4 & W2A2 & W1A1 \\ \hline \multicolumn{5}{|c|}{First and last layers NOT quantized} \\ \hline QNN~\cite{qnn} & 99.61\% & 99.56\% & 99.49\% & 99.33\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 99.69\% & 99.68\% & 99.62\% & 99.06\% \\ \hline \multicolumn{5}{|c|}{First layer quantized / Last layer NOT quantized} \\ \hline QNN~\cite{qnn} & 99.62\% & 99.54\% & 99.44\% & 99.25\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 99.65\% & 99.66\% & 99.61\% & 98.93\% \\ \hline \multicolumn{5}{|c|}{Last layer quantized / First layer NOT quantized} \\ \hline QNN~\cite{qnn} & 99.59\% & 99.57\% & 99.38\% & 98.98\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 99.65\% & 99.68\% & 99.57\% & 98.82\% \\ \hline \multicolumn{5}{|c|}{First and last layers quantized} \\ \hline QNN~\cite{qnn} & 99.52\% & 99.55\% & 99.45\% & 98.90\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 99.68\% & 99.62\% & 99.54\% & 98.44\% \\ \hline \end{tabular} \caption{Quantization of the first and last convolutional and fully connected layers. Results for LeNet-5 applied to MNIST. Single-precision results: QNN - 99.69\%; DoReFa-Net - 99.67\%} \label{tab:FLL-quant-study-LeNet5} \end{table} \begin{table}[!b] \centering \begin{tabular}{|c|cccc|} \hline \multirow{2}{*}{Method} & \multicolumn{4}{c|}{Quantization of (W)eights and (A)ctivations} \\ & W8A8 & W4A4 & W2A2 & W1A1 \\ \hline \multicolumn{5}{|c|}{First and last layers NOT quantized} \\ \hline QNN~\cite{qnn} & 88.41\% & 88.90\% & 86.37\% & 81.35\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 88.42\% & 88.27\% & 88.24\% & 62.70\% \\ \hline \multicolumn{5}{|c|}{First layer quantized / Last layer NOT quantized} \\ \hline QNN~\cite{qnn} & 88.71\% & 88.68\% & 85.55\% & 79.10\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 89.00\% & 89.25\% & 87.62\% & 60.62\% \\ \hline \multicolumn{5}{|c|}{Last layer quantized / First layer NOT quantized} \\ \hline QNN~\cite{qnn} & 89.35\% & 89.04\% & 83.64\% & 66.47\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 82.31\% & 80.85\% & 68.25\% & 47.92\% \\ \hline \multicolumn{5}{|c|}{First and last layers quantized} \\ \hline QNN~\cite{qnn} & 89.40\% & 89.29\% & 83.14\% & 58.10\% \\ \hline DoReFa-Net~\cite{dorefa-net} & 52.62\% & - & - & - \\ \hline \end{tabular} \caption{Quantization of the first and last convolutional and fully connected layers. Results for ResNet-20 applied to CIFAR-10. Single-precision results: QNN - 91.06\%; DoReFa-Net - 90.40\%} \label{tab:FLL-quantization-study-ResNet20} \end{table} \vspace{1mm} \noindent \textbf{MNIST.} Looking first at the results obtained with LeNet-5 trained with the MNIST dataset, DoReFa-Net achieves the best results when quantizing with 2 or more bits. The effect of quantizing the first or last layers is minimal on accuracy. When quantization is applied to both the first and last layers, there is a small degradation in accuracy. QNN only outperforms DoReFa-Net when binarizing the model. By default, DoReFa-Net does not quantize both layers, while QNN does. If these layers are not quantized in the QNN, it achieves better results than DoReFa-Net when applying binarization to the model. In conclusion, for the results obtained for LeNet-5, reducing the bit width only degrades accuracy by a small amount; the degradation resulting from quantizing both the first and last layers is less than 1\%. The accuracy loss is never more than 2\% for all results compared to single-precision results. \vspace{1mm} \noindent \textbf{CIFAR-10.} The results obtained with ResNet-20 lead to some different conclusions. The accuracy degradation is more evident when reducing the bit width on both methods. When quantizing to 4 or 8 bits, DoReFa-Net can achieve good results only if the last layer is not quantized, with less than 2\% accuracy degradation, compared to single-precision. In contrast, the accuracy degradation is significant if the last layer is quantized, ranging between 8 and 10\%. In the specific case of 2-bit quantization applied to both layers, DoReFa-Net does not converge to an optimal solution. QNN, in the same case of 4- or 8-bit quantization, achieves good results, independent of the quantization of the first and/or last layers, with less than 3\% accuracy degradation. For 2-bit quantization, QNN continues to achieve good results, if at least the last layer is not quantized. If quantization is only applied on the last layer, the accuracy degradation is significant. If quantizing both layers, DoReFa-Net does not converge to an optimal solution. In the case of QNN, it is more stable when quantizing these layers, but if these are not quantized, especially the last layer, the accuracy results are better, as mentioned above. QNN, for binarization, continues to show better results than DoReFa-Net. DoReFa-Net shows difficulties achieving good results, even when both layers are not quantized. The importance of at least the last layer not being quantized continues to be evident. QNN achieves good results when, at least, the last layer is not quantized. If both layers are not quantized, QNN achieves 81.35\% accuracy compared to 91.06\% in single-precision, less than 10\% accuracy degradation. In conclusion, for the ResNet-20 results, QNN continues to show its strength, achieving more stable results and good results for binarized models. The last layer is important, with both methods achieving better results when this layer is not quantized. DoReFa-Net shows difficulties when the last layer is quantized. If both layers are quantized, DoReFa-Net might not be able to converge on an optimal solution. \gboxbegin{kobackteal}{koborderteal}{TAKEAWAY}{\rtasktak{kt}} \textbf{Different networks tolerate the quantization of first and last layers differently.} In relatively small networks (e.g., LeNet-5), the effect of quantizing the first and last layers is minimal. In contrast, the accuracy of larger networks can be severely impacted by quantizing the last layer, and it is therefore important to preserve full precision in this case. \gboxend \section{Leading Quantization Methods} This section presents 5 quantization methods that are studied in more depth in the following sections. This section intends to present how quantization of \acp{cnn} happen and key characteristics that describe each quantization method. Figure \ref{fig:quant-process} shows how the quantization process occurs, in general. \begin{figure*}[!hbt] \centering \includegraphics[width =\textwidth]{images/quantization-process.png} \caption{Quantization process and training cycle.} \label{fig:quant-process} \end{figure*} Typical \acp{cnn} use 32-bit floating point parameters. Quantization can reduce by up to 32x the model size. Binarization, is a particular case of quantization that has been widely studied~\cite{qnn,xnor-net,dorefa-net,bi_real,reg_training_bnn,circulant_bcnns,bnn_plus,self_binarizing_net,acc_compact_bnn}. When both weights and input activations are binarized, convolution operations can be simplified to bit-wise logic operations making them more computationally efficient. These optimizations can be leveraged to develop efficient specialized accelerators (e.g., \ac{fpga}-~\cite{rtl_lib-compiler,quantizationFPGA,openCL-FPGA-accelerator, BNN_FPGA_implementation1, BNN_FPGA_implementation2}, \ac{asic}-~\cite{yodann-asic-accelerator, cnn-fpga-asic-accelerator, deepopt-asic, dnn_accelerator}, and \ac{pim}-based~\cite{rowclone,bitwise-operations,pim-instructions,drisa,ambit,neural-cache,dima,parapim,rebnn,ferreira2021pluto}). Due to the discretization of weights and/or input activations, the back propagation algorithm needs to be adjusted to properly determine the gradients of discrete functions. The straight-through estimator \cite{ste1, ste2} is mostly used by the following quantization methods to successfully obtain the correct gradients to update the single precision weights. \subsection{QNN: Quantized Neural Networks} % Courbariaux et al.~\cite{lpm,binary_connect,binarized_nn} study the impact of quantization in the multiplications that occur in \aclp{dnn} by employing three different representations during the training phase: floating point, fixed point, and dynamic fixed point. Building upon these studies, Hubara et al.~\cite{qnn} present a method to train \acp{qnn}. In this work, the authors study the effect of binarizing both the network's weights and input activations, and demonstrate that the quantization of gradients results in minimal accuracy degradation. The main focus of this work is the binarization of weights and input activations, but it also studies other levels of quantization using the linear method described in equation \ref{eq:linear-quant} where $minV$ and $maxV$ are the minimum and maximum scale range, respectively. \begin{equation} \label{eq:linear-quant} \begin{split} LinearQuant \left.(x,bit width\right) = \\ Clip \left(\frac{round \left(x \times 2^{bit width-1}\right)}{2^{bit width-1}}, minV, maxV \right) \end{split} \end{equation} This was the first work to successfully quantize all layers in CNNs without significant accuracy degradation. It achieves 99.04\% accuracy on the MNIST validation set and 88.60\% accuracy on the CIFAR-10 validation set while applying binarization to both weights and input activations. In the ImageNet validation set, using AlexNet, it achieves 56.6\% top-1 and 80.2\% top-5 accuracy, in single-precision. Binarizing both weights and input activations reduces the accuracy to 41.8\% top-1 and 67.1\% top-5. With 2-bit quantization of activations, keeping weights binary, the accuracy increases to 51.03\% top-1 and 73.67\% top-5. Both weights and input activations are binarized using the function \begin{equation} \label{eq:sign} q=\operatorname{sign}(r)=\left\{\begin{array}{ll} +1 & \text { if } r \geq 0 \\ -1 & \text { otherwise } \end{array}\right., \end{equation} \noindent where $r$ is a single precision value and $q$ can be represented as a 1-bit value, i.e., binary value. \subsection{XNOR-Net: Scaling Factor} Rastegari et al.~\cite{xnor-net} show that in order to minimize the Euclidian distance between single-precision weights and binarized weights, the tensor of single-precision weights $W$ can be approximated via the product $W \approx \alpha B$, where $\alpha$ is a scaling factor, and $B$ is a tensor of binary weights. Here, the scaling factors are single-precision values that serve to expand the range of representability when multiplied with normalized values. Using this scaling-factor-based approximation, the authors introduce the \ac{bwn}, whose weights are binarized, and the XNOR-Net, whose weights and input activations are binarized. This work further demonstrates that an optimal scaling factor can be given by \Cref{eq:optimal-alpha}, where $W$ is a vector in $\mathbb{R}^n$, $n=c \times w \times h$. $W$ contains the single-precision weight values. An optimal estimation of a binary weight can be simply achieved applying equation \ref{eq:sign}~\cite{qnn}. \begin{equation} \label{eq:optimal-alpha} \alpha^{*}=\frac{\mathbf{W}^{\top} \operatorname{sign}(\mathbf{W})}{n}=\frac{\sum\left|\mathbf{W}_{i}\right|}{n}=\frac{1}{n}\|\mathbf{W}\|_{\ell 1} \end{equation} \cite{xnor-net} also shows that scaling factors associated with input activations can improve accuracy, but by less than 1\%. For this reason, the authors do not use it. Likewise, we also do not implement it in our framework; instead, we only use scaling factors in association with the network's weights. In single-precision, AlexNet achieves 56.6\% top-1 and 80.2\% top-5 accuracy on the ImageNet validation set, according to the authors. When applying \ac{bwn}, i.e., binarizing only weights and using scaling factors, there is no accuracy loss, with final accuracy values of 56.8\% for top-1 and 79.4\% for top-5. If XNOR-Net is applied, input activations are also binarized, and the accuracy decreases to 44.2\% for top-1 and 69.2\% for top-5. \subsection{DoReFa-Net: Low Bit Width Parameters} Zhou et al.~\cite{dorefa-net} took some ideas from the works of Hubara et al.~\cite{qnn} and Rastegari et al.~\cite{xnor-net} and propose a new method, DoReFa-Net, to quantize weights, activations and gradients. Similar to the work of Rastegari et al. in~\cite{xnor-net}, the first and last layers are not quantized in DoReFa-Net. When binarizing weights, DoReFa-Net employs use a simpler approach than XNOR-Net, making it so that each scaling factor is equal to the mean of absolute values of each output channel of weights, instead of applying \Cref{eq:optimal-alpha}. This work also confirms that, while quantizing gradients, they need to be stochastically quantized instead of deterministically, as it was pointed out by Hubara et al. in~\cite{qnn}. According to its authors, DoReFa-Net applied to AlexNet achieves 55.9\% top-1 accuracy in single-precision. When applying 8-bit quantization, it achieves 53.0\% top-1. It also achieves 40.1\% top-1, 47.7\% top-1 and 50.3\% top-1 accuracy when binarizing the weights and quantizing the activations to 1, 2 or 4 bits, respectively. \subsection{Ternary Quantization: TWN and TTQ} Hubara et al.~\cite{qnn} and Zhou et al.~\cite{dorefa-net} show that quantizing weights or activations to larger values than 1-bit can regain some accuracy lost during quantization, compared to binarization, approaching single-precision results. Li et al.~\cite{twn} present \acp{twn} that apply ternarization to the weights of \acp{cnn}, i.e., converts 32-bit weights into -1, 0 and 1 (2-bit representation) values. \ac{twn} only applies ternarization to the weights, keeping activations and gradients unchanged. In order to improve the network even further, \ac{twn} seeks to minimize the Euclidian distance between the single-precision weights $W$ and the ternary-values weights $W^t$ along with a non-negative scaling factor $\alpha$, similar to the idea first introduced by Rastegari et al. in~\cite{xnor-net}. The authors of \ac{twn} arrive at an approximated solution with a threshold-based ternary function (equation \ref{eq:2}). $\Delta$ is a positive threshold parameter. \begin{equation} \label{eq:2} \mathrm{W}_{i}^{t}=f_{t}\left(\mathrm{W}_{i} | \Delta\right)=\left\{\begin{aligned} +1, & \text { if } \mathrm{W}_{i}>\Delta \\ 0, & \text { if }\left|\mathrm{W}_{i}\right| \leq \Delta \\ -1, & \text { if } \mathrm{W}_{i}<-\Delta \end{aligned}\right. \end{equation} \ac{twn} applied to LeNet-5 achieves 99.35\% accuracy on MNIST validation set compared to 99.41\% achieved in single-precision. Applied to ResNet-18B, \ac{twn} achieves 65.3\% top-1 and 86.2\% top-5 accuracy on the ImageNet validation set, compared to 67.6\% top-1 and 88.0\% top-5 accuracy obtained in single-precision. Zhu et al.~\cite{ttq} present \ac{ttq}, a similar concept as \ac{twn}. \ac{ttq} also ternarizes weights to -1, 0 and 1 using a symmetric threshold. Additionally, and where it starts to differ from \ac{twn}, it uses two scaling factors for positive and negative weights in each layer. Also, these scaling factors are learned during training, instead of calculated. Since the weights and scaling factors are trained, there are two independent gradients, one for weights and the other for scaling factors. Applying \ac{ttq} to ResNet-20 and ResNet-56, it achieves 91.13\% and 93.56\% accuracy, respectively, on the CIFAR-10 validation set, compared to single-precision accuracy of 91.77\% and 93.2\%, respectively. On AlexNet, it achieves 57.5\% top-1 and 79.7\% top-5 on the ImageNet validation set, compared to 57.2\% top-1 and 80.3\% in single-precision. \begin{table}[] \centering \begin{tabular}{|c|c|c|c|} \hline Method & \begin{tabular}[c]{@{}c@{}}First and Last\\ Conv/FC\\ Layers Quantized\end{tabular} & \begin{tabular}[c]{@{}c@{}}Scaling \\ Factor(s)\end{tabular} & \begin{tabular}[c]{@{}c@{}}Layer \\ Reordering\end{tabular} \\ \hline QNN~\cite{qnn} & \checkmark & X & X \\ \hline DoReFa-Net~\cite{dorefa-net} & X & \checkmark * & X \\ \hline XNOR-Net~\cite{xnor-net} & X & \checkmark & \checkmark \\ \hline TWN~\cite{twn} & \checkmark & \checkmark & X \\ \hline TTQ~\cite{ttq} & X & \checkmark & X \\ \hline \end{tabular} \caption{Key points used by each quantization method. Conv - Convolutional; FC - Fully Connected. * - Only when weights are binary} \label{tab:key-points} \end{table} \begin{table}[] \centering \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|c|ccc|c|} \hline \multirow{2}{*}{Neural Network} & \multirow{2}{*}{Work} & \multirow{2}{*}{Type} & \multicolumn{3}{c|}{Bit Width} & \multirow{2}{*}{Accuracy} \\ & & & W & A & G & \\ \hline \multicolumn{7}{|c|}{Single-Precision} \\ \hline LeNet-5 &~\cite{qnn} & Floating-Point & 32 & 32 & 32 & 99.41\% \\ \hline \multicolumn{7}{|c|}{Quantization} \\ \hline LeNet-5 &~\cite{twn} & TWN & 2 & 32 & 32 & 99.35\% \\ \hline \multicolumn{7}{|c|}{Binarization} \\ \hline Multilayer Perceptron *1 &~\cite{qnn} & BNN & 1 & 1 & 32 & 98.60\% \\ Multilayer Perceptron *2 &~\cite{qnn} & BNN & 1 & 1 & 32 & 99.04\% \\ \hline LeNet-5 &~\cite{twn} & BPWN & 1 & 32 & 32 & 99.05\% \\ \hline \end{tabular} \caption{State-of-the-art results obtained in multiple papers concerning the MNIST dataset. Despite the same Neural Network on various results, the Neural Network can have differences and/or the training method is different. *1: Neural Network implemented using the Torch7 framework. *2: Neural Network implemented using the Theano framework} \label{tab:MNIST-t-results} \end{table} \begin{table}[] \centering \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|c|ccc|c|} \hline \multirow{2}{*}{Neural Network} & \multirow{2}{*}{Work} & \multirow{2}{*}{Type} & \multicolumn{3}{c|}{Bit Width} & \multirow{2}{*}{Accuracy} \\ & & & W & A & G & \\ \hline \multicolumn{7}{|c|}{Single-Precision} \\ \hline ResNet-20 &~\cite{ttq} & Floating-Point & 32 & 32 & 32 & 91.77\% \\ ResNet-32 &~\cite{ttq} & Floating-Point & 32 & 32 & 32 & 92.33\% \\ ResNet-44 &~\cite{ttq} & Floating-Point & 32 & 32 & 32 & 92.82\% \\ ResNet-56 &~\cite{ttq} & Floating-Point & 32 & 32 & 32 & 93.20\% \\ \hline \multicolumn{7}{|c|}{Quantization} \\ \hline ResNet-20 &~\cite{ttq} & TTQ & 2 & 32 & 32 & 91.13\% \\ ResNet-32 &~\cite{ttq} & TTQ & 2 & 32 & 32 & 92.37\% \\ ResNet-44 &~\cite{ttq} & TTQ & 2 & 32 & 32 & 92.98\% \\ ResNet-56 &~\cite{ttq} & TTQ & 2 & 32 & 32 & 93.56\% \\ \hline \multicolumn{7}{|c|}{Binarization} \\ \hline ConvNet &~\cite{qnn} & BNN & 1 & 1 & 32 & 89.85\% \\ ConvNet &~\cite{qnn} & BNN & 1 & 1 & 32 & 88.60\% \\ \hline \end{tabular} \caption{State-of-the-art results obtained in multiple papers concerning the CIFAR-10 dataset. } \label{tab:CIFAR10-t-results} \end{table} \begin{table}[] \centering \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|c|ccc|cc|} \hline \multirow{2}{*}{Neural Network} & \multirow{2}{*}{Work} & \multirow{2}{*}{Type} & \multicolumn{3}{c|}{Bit Width} & \multicolumn{2}{c|}{Accuracy} \\ & & & W & A & G & Top-1 & Top-5 \\ \hline \multicolumn{8}{|c|}{Single-Precision} \\ \hline AlexNet &~\cite{ttq} & Floating-Point & 32 & 32 & 32 & 57.2\% & 80.3\% \\ ResNet-18 &~\cite{twn} & Floating-Point & 32 & 32 & 32 & 65.4\% & 86.76\% \\ ResNet-18B &~\cite{ttq} & Floating-Point & 32 & 32 & 32 & 69.6\% & 89.2\% \\ GoogLeNet &~\cite{qnn} & Floating-Point & 32 & 32 & 32 & 71.6\% & 91.2\% \\ \hline \multicolumn{8}{|c|}{Quantization} \\ \hline AlexNet &~\cite{dorefa-net} & DoReFa-Net & 8 & 8 & 8 & 53\% & - \\ AlexNet &~\cite{ttq} & TTQ & 2 & 32 & 32 & 57.5\% & 79.7\% \\ ResNet-18 &~\cite{twn} & TWN & 2 & 32 & 32 & 61.8\% & 84.2\% \\ ResNet-18B &~\cite{twn} & TWN & 2 & 32 & 32 & 65.3\% & 86.2\% \\ ResNet-18B &~\cite{ttq} & TTQ & 2 & 32 & 32 & 66.6\% & 87.2\% \\ GoogLeNet &~\cite{qnn} & QNN & 4 & 4 & 32 & 66.5\% & 83.4\% \\ GoogLeNet &~\cite{qnn} & QNN & 6 & 6 & 6 & 66.4\% & 83.1\% \\ \hline \multicolumn{8}{|c|}{Binarization} \\ \hline AlexNet &~\cite{xnor-net} & BWN & 1 & 32 & 32 & 56.8\% & 79.4\% \\ AlexNet &~\cite{dorefa-net} & DoReFa-Net & 1 & 4 & 32 & 50.3\% & - \\ AlexNet &~\cite{qnn} & QNN & 1 & 2 & 32 & 51.03\% & 73.67\% \\ AlexNet &~\cite{dorefa-net} & DoReFa-Net & 1 & 2 & 32 & 47.7\% & - \\ AlexNet &~\cite{qnn} & BNN & 1 & 1 & 32 & 41.8\% & 67.1\% \\ AlexNet &~\cite{dorefa-net} & DoReFa-Net & 1 & 1 & 32 & 40.1\% & - \\ AlexNet &~\cite{xnor-net} & XNOR-Net & 1 & 1 & 32 & 44.2\% & 69.2\% \\ ResNet-18B &~\cite{xnor-net} & BWN & 1 & 32 & 32 & 60.8\% & 83.0\% \\ ResNet-18B &~\cite{xnor-net} & XNOR-Net & 1 & 1 & 32 & 51.2\% & 73.2\% \\ GoogLeNet &~\cite{qnn} & BNN & 1 & 1 & 32 & 47.1\% & 69.1\% \\ GoogLeNet &~\cite{xnor-net} & BWN & 1 & 32 & 32 & 65.5\% & 86.1\% \\ \hline \end{tabular} \caption{State-of-the-art results obtained in multiple papers concerning the ImageNet dataset. } \label{tab:ImageNet-t-results} \end{table} Table \ref{tab:key-points} shows major features implemented by previous works mentioned. Tables \ref{tab:MNIST-t-results}, \ref{tab:CIFAR10-t-results} and \ref{tab:ImageNet-t-results} gather results obtained and previously mentioned by the works here depicted. Each method in their original work might select the same \acp{cnn} but, the implemented model structure in each work might have small differences between them. Due to these circumstances, it is difficult to fairly compare quantization results provided by each work and depicted on these tables. \section{Making the Leap to Hardware} The results reported above demonstrate that the reduction of bit width allows 1) the reduction of model size and 2) the reduction of logic operations performed. One can, therefore, exploit the implementation of specialized hardware accelerators for inferencing in \acp{cnn}. These implementations can reduce the requirements both in operations-related hardware and memory. Ultimately, lower energy consumption is achieved. Despite \acsp{cpu} offering lower capabilities in terms of number of cores, they still offer great performance due to their high frequency clock cycle. Some works explore quantization to improve \acs{cpu} performance~\cite{cpu_accelerator1, bitstream, cpu_accelerator2, cpu_accelerator3, dabnn, dsq}. It is also possible to develop tools that are hardware agnostic and can accelerate deep learning tasks on both \acsp{cpu} and \acp{gpu} \cite{bmxnet}. Most of the \acp{cnn} are trained on \acp{gpu}. \acp{gpu}, can also be exploited to take advantage of \acp{qcnn}. NVIDIA introduced TensorRT, a framework capable of using tensor cores to perform operations with 2D tensors \cite{tensor-core}. Tensor cores perform \acp{gemm} faster than it was previously possible, improving throughput and/or reducing latency. Tensor cores also work with mixed precision, i.e., lower than single precision operations, improving throughput and latency further more. \acp{qcnn} can exploit this new technology. Several works already explore mixed precision to improve throughput, latency and energy to performance ratio \cite{mixed_prec_training, mixed_prec_training2, mixed_prec_solvers, bfloat16, ampt_ga, mp_solver_matrix}. Some works even explored mixed precision on massive \ac{gpu} clusters for \acl{hpc} achieving significant gains in throughput per energy consumption \cite{mp_cluster, mp_cluster2, mp_cluster3}. Despite recent developments, \acp{gpu} still have a fixed amount of hardware built into them, which cannot not always can be fully utilized. This leads to lower efficiency. \subsection{Towards Hardware Specialization} In contrast to CPUs and \acp{gpu}, the flexible and reconfigurable nature of \acp{fpga} allows the prototyping and implementation of specific solutions for each project/task, reducing the required hardware. Depending on the level of quantization, \acp{fpga} allow the tuning of the level of optimization towards more efficient solutions, as reduced bit widths mitigate hardware design complexity. In some cases, such as binarization, most operations occurring in \acp{cnn} can be implemented efficiently using lookup tables. \acp{fpga} reduce the energy consumption and improve latency and throughput, compared to \acp{gpu}. Most works focus on \ac{fpga} accelerator implementations for \acp{bnn} \cite{semi_bin_bwn_fpga, fp_bnn_fpga, BNN_FPGA_implementation1, finn_fpga, finn_fpga2, fast_bnn_fpga, rebnet_fpga, binaryeye_fpga, fbna_fpga, dlbnn_fpga, memory_b_bnn_fpga, bnn_no_bn_fpga} but some also give their attention to other quantization bit widths \cite{low_precision_fpga, finn_r_fpga, ternary_fpga, lightnn_fpga}. \acp{asic}, like \acp{fpga}, allow the implementation of task-specific hardware acceleration \cite{yodann-asic-accelerator, cnn-fpga-asic-accelerator, deepopt-asic, dnn_accelerator, eyeriss, eyeriss2, eyeriss_v2}. Although they are not reprogrammable such as \acp{fpga}, they can offer better efficiency and throughput, compared to \acp{fpga}. Low power \acp{soc} with good deep learning accelerators allow more efficient edge computation \cite{asic_soc}. \subsection{Addressing the Data Movement Bottleneck} The reduction in model size afforded by \acp{qnn} considerably mitigates the overall requirements of data movement between the system's compute and memory units, which is a well-known major contributor to energy and performance overheads in modern systems~\cite{boroumand2018google}. However, this bottleneck can be addressed more fundamentally by processing data closer to where it resides; this is the guiding principle behind processing-in-memory (PIM) architectures, an emerging computational paradigm that confers substantial throughput and energy benefits. Under the \ac{pim} computing paradigm, data is processed either near-memory (Processing Near Memory, PNM), or using-memory (Processing Using Memory, PUM). Under the Processing Near Memory (PNM) paradigm, computation takes place close to where data resides, but in a different medium~\cite{devaux2019true,vcache,kwon202125,jun2017hbm,pawlowski2011hybrid}. This medium implements dedicated compute units, which can either be 1) general-purpose, in which case they are usually implemented as simple in-order cores, or 2) special-purpose, in which case performance and energy efficiency are maximized at the expense of general applicability. In contrast, Processing Using Memory (PUM) is a paradigm that takes advantage of the physical properties of the storage medium (i.e., the memory cells) to perform computation. Its range of applicability therefore tends to be narrower, but PUM mechanisms typically provide superior throughput and energy efficiency. Many prior PUM works~\cite{rowclone,bitwise-operations,pim-instructions,drisa,ambit,neural-cache,dima,parapim,rebnn,rtl_lib-compiler,mp_in_memory_computation,float_pim,ferreira2021pluto} introduce mechanisms which can be readily applied to perform inference in \acp{bnn}, since arithmetic operations in these networks can be expressed using bitwise logic operations, rather than conventional integer arithmetic. \section{A Methodology for Systematically \\ Evaluating Quantization Methods} \label{methodology} This section simultaneously describes the {RedBit}\xspace framework and demonstrates its application for the evaluation the following five state-of-the-art \ac{cnn} quantization methods: \ac{qnn}~\cite{qnn}, DoReFa-Net~\cite{dorefa-net}, XNOR-Net (including the \ac{bwn} variant)~\cite{xnor-net}, \ac{twn}~\cite{twn} and \ac{ttq}~\cite{ttq}. The baseline \ac{cnn} is the same for all quantization methods. We do not evaluate the effects of gradient quantization. The source code of {RedBit}\xspace is publicly available online, and we actively encourage the community to explore it and to contribute to its further development and testing. The ultimate goal of {RedBit}\xspace is to become a unified framework for reliably comparing Quantized Convolutional Neural Networks by aggregating results for many configurations. % Interested readers may refer to the following repository: \href{https://github.com/IT-Coimbra/RedBit}{https://github.com/IT-Coimbra/RedBit}. \subsection{Implemented CNNs} In this paper we show results only for a subset of networks for the CIFAR-10 and ImageNet datasets, due to the computational complexity required to train a greater number of models. For the MNIST dataset, we evaluate LeNet-5. For the CIFAR-10 dataset, we evaluate ResNet-20, ResNet-50, and VGG-16. For the ImageNet dataset, we evaluate AlexNet, ResNet-18 and VGG-16. We note, however, that {RedBit}\xspace can be used to train any variant of these \acp{cnn}. All associated implementation details can be found under the sections devoted to "CNN Architectures" in \href{https://github.com/IT-Coimbra/RedBit/wiki}{{RedBit}\xspace's GitHub wiki.} \subsection{Apparatus} \label{apparatus} \begin{table}[b] \centering \resizebox{0.9\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|c|c|c|} \hline \multicolumn{5}{|c|}{Hardware} \\ \hline Machine & \begin{tabular}[c]{@{}c@{}}CPU\\ (\#cores/threads)\end{tabular} & RAM & \begin{tabular}[c]{@{}c@{}}NVIDIA \\ GPU(s)\end{tabular} & \begin{tabular}[c]{@{}c@{}}GPU Memory\\ (per card)\end{tabular} \\ \hline 1 & 4/8 & 16GB & 1x 1050Ti & 4GB GDDR5 \\ \hline 2 & 4/8 & 32GB & 1x GTX Titan & 6GB GDDR5 \\ \hline 3 & 4/8 & 16GB & 1x RTX 2060 & 6GB GDDR6 \\ \hline 4 & 4/8 & 32GB & 2x RTX 2080Ti & 11GB GDDR6 \\ \hline 5 & 4/8 & 32GB & \begin{tabular}[c]{@{}c@{}}1x RTX 2080Ti\\ 1x GTX Titan X\end{tabular} & \begin{tabular}[c]{@{}c@{}}11GB GDDR6\\ 12GB GDDR5\end{tabular} \\ \hline 6 & 4/8 & 32GB & 1x RTX 3090 & 24GB GDDR6X \\ \hline 7 & 20/40 & 40GB & 2x V100 & 16GB HBM2 \\ \hline 8 & 20/40 & 40GB & 2x V100 & 16GB HBM2 \\ \hline \multicolumn{5}{|c|}{Software} \\ \hline Machine & \begin{tabular}[c]{@{}c@{}}Operating\\ System\end{tabular} & \multicolumn{3}{c|}{Other software} \\ \hline 1 & Ubuntu 20.04 & \multicolumn{3}{c|}{\multirow{8}{*}{\begin{tabular}[c]{@{}c@{}}NVIDIA driver 470.57\\ NVIDIA CUDA Toolkit 11.4\\ \\ Python 3.8\\ \\ PyTorch 1.9 with \\ CUDA 11.1 support\end{tabular}}} \\ \cline{1-2} 2 & CentOS 7 & \multicolumn{3}{c|}{} \\ \cline{1-2} 3 & Ubuntu 20.04 & \multicolumn{3}{c|}{} \\ \cline{1-2} 4 & CentOS 7 & \multicolumn{3}{c|}{} \\ \cline{1-2} 5 & Ubuntu 20.04 & \multicolumn{3}{c|}{} \\ \cline{1-2} 6 & Ubuntu 20.04 & \multicolumn{3}{c|}{} \\ \cline{1-2} 7 & CentOS 7 & \multicolumn{3}{c|}{} \\ \cline{1-2} 8 & CentOS 7 & \multicolumn{3}{c|}{} \\ \hline \end{tabular} } \caption{Machines used to train and inferencing multiple CNNs. All results in the following sections were obtained in these machines. All GPUs are from NVIDIA. Not all machines were available at the same time.} \label{tab:machines_used} \end{table} To collect all the data we intended, we used multiple machines with a variety of hardware. Table \ref{tab:machines_used} shows the hardware and software configurations we employed in our experiments. These machines accumulated over 20000 hours of GPU computing, performing over 4500 small hyperparameter-tuning tests and over 2300 complete training tests. % In the small tests, we trained \acp{cnn} for 30, 20 and 10 epochs on the MNIST, CIFAR-10 and ImageNet datasets, respectively. The execution of these small tests was motivated by our observation that it is important to adopt optimal hyperparameters, initial learning rates and optimizer algorithms for each test, to ensure optimal model convergence. In the complete training tests, we trained the \acp{cnn} for 100, 200 and 100 epochs on the MNIST, CIFAR-10 and ImageNet datasets, respectively. We trained all networks from scratch, i.e., we did not start the models with pre-trained weights. Machines 7 and 8 were kindly provisioned by the \ac{lca} at University of Coimbra. All hyperparameters used to obtain the final results and said results presented in this work can be found on our GitHub repository Wiki page \href{https://github.com/IT-Coimbra/RedBit/wiki/Quantization-Results}{"Quantization Results"}. The optimizer used can be Adam or SGD. When SGD is used, momentum is set to 0.9. In both optimizers, weight decay is set to 0, except for the baseline tests, where weight decay was set to $0.0001$. \subsection{Quantization Results} We performed a series of tests using all quantization methods previously described to show how quantization affects \acp{cnn} applied to MNIST, CIFAR-10, and ImageNet. Our goal is to evaluate different quantization methods and different levels of quantization, depending on the chosen bit width. \subsubsection{MNIST} Table \ref{tab:MNIST_LeNet5_ER} shows the best accuracy obtained in the validation set of MNIST with LeNet-5. Each quantization method can offer different levels of quantization bit widths. We were able to reproduce the results reported by the original works, as demonstrated by Table \ref{tab:MNIST-t-results}; the accuracy levels we observed are identical or superior. We make three key observations. First, QNN shows the biggest accuracy degradation when the LeNet-5 model is binarized. The binarized model (W1A1) obtains 98.90\% accuracy compared to 99.69\% obtained in single-precision (W32A32). If the input activations are quantized to 2 bits (W1A2), the quantized LeNet-5 model only gains 0.32\% of the 0.79\% accuracy loss between single-precision and the binarized model. Second, DoReFa-Net offers a wide degree of quantization levels and suffers minimal accuracy loss The quantized LeNet-5 model W1A2 using this quantization method achieves 99.61\% accuracy, representing an accuracy loss of just 0.06\% compared to single-precision. Third, the LeNet-5 model can have its 32-bit weights binarized, corresponding to a reduction in of 32$\times$ in model size, while achieving minimal accuracy loss (less than 0.13\%). \begin{table}[htb!] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|ccccccccc|} \hline \multirow{2}{*}{Method} & \multicolumn{9}{c|}{Quantization of Weights (W) and Input Activations (A)} \\ & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & 99.69\% & 99.52\% & 99.55\% & 99.63\% & 99.56\% & 99.45\% & 98.88\% & 99.22\% & 98.90\% \\ \hline DoReFa-Net & 99.67\% & 99.69\% & 99.68\% & 99.66\% & 99.69\% & 99.62\% & 99.07\% & 99.61\% & 99.06\% \\ \hline XNOR-Net & - & - & - & - & 99.63\% & - & - & - & 99.37\% \\ \hline TWN & 99.63\% & - & - & 99.63\% * & - & - & - & - & - \\ \hline TTQ & - & - & - & 99.47\% * & - & - & - & - & - \\ \hline \end{tabular} } \caption{Results for the LeNet-5 network applied to MNIST. Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2-bit representation; for quantization bit widths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the quantization formula presented by the original work. The baseline unmodified LeNet-5 CNN model achieves 99.59\% single-precision accuracy.} \label{tab:MNIST_LeNet5_ER} \end{table} \begin{table}[t] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|ccccccccc|} \hline \multirow{2}{*}{Method} & \multicolumn{9}{c|}{Quantization of Weights (W) and Input Activations (A)} \\ & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & 91.06\% & 89.40\% & 89.29\% & 89.19\% & 89.80\% & 83.14\% & 69.94\% & 82.73\% & 58.10\% \\ \hline DoReFa-Net & 90.40\% & 89.42\% & 88.27\% & 89.56\% & 89.42\% & 88.24\% & 62.17\% & 87.11\% & 62.70\% \\ \hline XNOR-Net & - & - & - & - & 88.95\% & - & - & - & 77.40\% \\ \hline TWN & 90.59\% & - & - & 90.60\% * & - & - & - & - & - \\ \hline TTQ & - & - & - & 89.11\% * & - & - & - & - & - \\ \hline \end{tabular} } \caption{Results for the ResNet-20 network applied to CIFAR-10. Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2-bit representation; for quantization bitwidths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the normal quantization formula presented by the original work. The baseline unmodified ResNet-20 CNN model achieves 91.70\% single-precision accuracy. \label{tab:CIFAR10_ResNet20_ER}} \end{table} \subsubsection{CIFAR-10} Tables \ref{tab:CIFAR10_ResNet20_ER}, \ref{tab:CIFAR10_ResNet50_ER} and \ref{tab:CIFAR10_VGG16_ER} show the quatization results from the tests performed for the CIFAR-10 dataset using ResNet-20, ResNet-50 and VGG-16 models, respectively. \noindent \textbf{ResNet.} \Cref{tab:CIFAR10_ResNet20_ER,tab:CIFAR10_ResNet50_ER} show that increasing the depth from 20 to 50 layers improves accuracy results for almost all quantization scenarios. These tables allow us to make five key observations. First, QNN is the only quantization method that shows accuracy degradation when increasing the depth of ResNet. It is also the method which offers the lowest accuracy when binarizing both weights and input activations on ResNet-20, with 58.10\% accuracy, compared to 77.40\% accuracy obtained by the binarized model using XNOR-Net. Second, DoReFa-Net achieves 62.70\% and 63.46\% accuracy when binarizing both weights and input activations of ResNet-20 and ResNet-50 models, respectively. But it can achieve 87.11\% and 88.78\% when increasing the bit width of input activations to 2 bits, an accuracy loss of 3.29\% and 2.86\% when compared to single-precision accuracy of ResNet-20 and -50 models, respectively. Third, columns W2A2, W2A1 and W1A2 show that input activations are more important than weights. The impact of lower bit widths of the input activations on accuracy is greater than that of the weights. Fourth, binarizing weights but keeping input activations in single-precision reduces the size of the quantized models by up to 32$\times$ while incurring less than 2.11\% and 2.23\% accuracy loss for ResNet-20 and -50 models, respectively. Finally, increasing the bit width to 2 bits or using ternary values for the weights while keeping the input activations in single-precision has little to no effect on accuracy gain when compared to the previously mentioned results, W1A32. \begin{table}[h] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|ccccccccc|} \hline \multirow{2}{*}{Method} & \multicolumn{9}{c|}{Quantization of Weights (W) and Input Activations (A)} \\ & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & 92.67\% & 88.83\% & 88.66\% & 91.42\% & 91.66\% & 82.92\% & 72.99\% & 81.93\% & DNC \\ \hline DoReFa-Net & 91.64\% & 89.46\% & 89.73\% & 91.26\% & 91.37\% & 89.11\% & 68.61\% & 88.78\% & 63.46\% \\ \hline XNOR-Net & - & - & - & - & 90.44\% & - & - & - & 81.90\% \\ \hline TWN & 92.45\% & - & - & 91.89\% * & - & - & - & - & - \\ \hline TTQ & - & - & - & 90.91\% * & - & - & - & - & - \\ \hline \end{tabular} } \caption{Results for the ResNet-50 network applied to CIFAR-10. Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2-bit representation; DNC - Does Not Converge; For quantization bitwidths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the normal quantization formula presented by the original work. The baseline unmodified ResNet-50 CNN model achieves 92.97\% single-precision accuracy.} \label{tab:CIFAR10_ResNet50_ER} \end{table} \noindent \textbf{VGG.} Table \ref{tab:CIFAR10_VGG16_ER} shows the results obtained with VGG-16. We make five key observations. First, VGG-16 achieves better results for single-precision than the ResNet models. Second, VGG-16 achieves the best result when binarizing the weights but keeping the input activations in single-precision with the DoReFa-Net quantization method. In this case, the model achieves 92.67\%, a degradation of 0.16\% compared to the accuracy using single-precision weights. Third, depending on the adopted bit width quantization, the model may struggle to converge on an optimal solution. Fourth, DoReFa-Net achieves a good result for binary weights and 2-bit quantization of input activations. It achieves an accuracy of 90.12\%, corresponding to a degradation of 2.71\%. Finally, our results for the CIFAR-10 dataset are in line with what is expected when compared to the state-of-the-art single-precision accuracy results shown in Table \ref{tab:CIFAR10-t-results}. \begin{table}[t] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|ccccccccc|} \hline \multirow{2}{*}{Method} & \multicolumn{9}{c|}{Quantization of Weights (W) and Activations (A)} \\ & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & 92.97\% & 88.40\% & 88.13\% & 91.99\% & DNC & 86.45\% & 35.99\% & DNC & DNC \\ \hline DoReFa-Net & 92.83\% & 70.39\% & 69.43\% & 90.84\% & 92.67\% & 68.24\% & DNC & 90.12\% & 73.96\% \\ \hline XNOR-Net & - & - & - & - & 92.23\% & - & - & - & 77.98\% \\ \hline TWN & 92.93\% & - & - & 92.30\% * & - & - & - & - & - \\ \hline TTQ & - & - & - & DNC & - & - & - & - & - \\ \hline \end{tabular} } \caption{Results for the VGG-16 network applied to CIFAR-10. Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2-bit representation; DNC - Does Not Converge; For quantization bit-widths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the normal quantization formula presented by the original work. The baseline unmodified VGG-16 CNN model achieves 93.37\% single-precision accuracy.} \label{tab:CIFAR10_VGG16_ER} \end{table} \begin{table}[b] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|ccccccccc|} \hline \multicolumn{2}{|c|}{\multirow{2}{*}{Method}} & \multicolumn{9}{c|}{Quantization of Weights (W) and Activations (A)} \\ \cline{3-11} \multicolumn{2}{|c|}{} & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}59.26\%\\ 81.56\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}55.48\%\\ 78.39\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}53.18\%\\ 76.62\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}46.44\%\\ 71.19\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}52.57\%\\ 76.26\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}37.09\%\\ 61.91\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}29.51\%\\ 53.53\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}45.63\%\\ 70.01\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}38.42\%\\ 62.96\%\end{tabular} \\ \hline DoReFa-Net & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}53.39\%\\ 72.90\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}50.52\%\\ 70.56\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}50.35\%\\ 70.92\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}51.10\%\\ 71.67\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}50.93\%\\ 71.47\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}48.95\%\\ 70.38\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}30.82\%\\ 53.80\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}47.96\%\\ 70.17\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}30.40\%\\ 53.29\%\end{tabular} \\ \hline XNOR-Net & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & - & - & - & - & \begin{tabular}[c]{@{}c@{}}52.06\%\\ 74.89\%\end{tabular} & - & - & - & \begin{tabular}[c]{@{}c@{}}42.53\%\\ 66.41\%\end{tabular} \\ \hline TWN & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}59.22\%\\ 81.60\%\end{tabular} & - & - & \begin{tabular}[c]{@{}c@{}}55.36\%*\\ 78.61\%*\end{tabular} & - & - & - & - & - \\ \hline TTQ & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & - & - & - & \begin{tabular}[c]{@{}c@{}}43.17\%*\\ 68.07\%*\end{tabular} & - & - & - & - & - \\ \hline \end{tabular} } \caption{Accuracy results (Top-1; Top-5) for AlexNet trained with ImageNet. Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2 bit representation; for quantization bit widths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the normal quantization formula presented by the original work. The baseline unmodified AlexNet CNN model achieves 61.01\% top-1 and 82.95\% top-5 single-precision accuracy.} \label{tab:ImageNet_AlexNet_ER} \end{table} \gboxbegin{kobackbright}{koborderbright}{OBSERVATION}{\rtaskobs{ko}} The following general key observation can be derived: across all evaluated models, the hyperparameter search for the best optimizer and initial learning rate is crucial to maximize the accuracy. \gboxend \subsubsection{ImageNet} For the ImageNet dataset, Tables \ref{tab:ImageNet_AlexNet_ER}, \ref{tab:ImageNet_ResNet18_ER} and \ref{tab:ImageNet_VGG16_ER} gather the best accuracy results achieved with AlexNet, ResNet-18, and VGG-16, respectively. \gboxbegin{kobackbright}{koborderbright}{OBSERVATION}{\rtaskobs{ko}} The quantization method of DoReFa-Net~\cite{dorefa-net} offers both a wide variety of quantization levels and more consistent results; \gboxend \noindent \textbf{AlexNet.} Table \ref{tab:ImageNet_AlexNet_ER} shows the results obtained with AlexNet. We make four key observations. First, the discrepancy in accuracy results between quantization methods in single-precision is justified by the architecture differences applied by each method on the baseline AlexNet \ac{cnn} model. Second, \ac{twn} achieves 55.36\% top-1 and 78.61\% top-5 when using ternary values for the weights and single-precision input activations. An accuracy degradation of 3.86\% top-1 and 2.99\% top-5 compared to single-precision weights. Third, keeping the input activations in single-precision but binarizing the weights (W1A32), \ac{qnn}, DoReFa-Net and \ac{bwn} achieve 52.57\% top-1 and 76.26\% top-5, 50.93\% top-1 and 71.47\% top-5 and 52.06\% top-1 and 74.89\% top-5, respectively. These models maintain an acceptable accuracy while using binary weights. Fourth, \ac{qnn} achieves 38.42\% top-1 and 62.96\% accuracy when binarizing both weights and input activations incurring in 20.84\% and 18.60\% accuracy loss for top-1 and top-5, respectively, compared to single-precision. XNOR-Net, by using scaling factors, not binarizing the first and last convolutional/fully connected layers and using layer reordering, increases the accuracy slightly to 42.53\% top-1 and 66.41\%. \noindent \textbf{ResNet.} Table \ref{tab:ImageNet_ResNet18_ER} shows the results obtained with ResNet-18. We make three key observations. First, DoReFa-Net is a stable quantization method, offering good performance accross all quantization levels. With DoReFa-Net, is possible to binarize the weights and keep input activations in single-precision, achieving 62.13\% top-1 and 83.66\% top-5 accuracy, incurring 0.29\% and 0.51\% accuracy degradation for top-1 and top-5, respectively, compared to single-precision. Second, looking at columns W2A2, W2A1 and W1A2, is evident that input activations have a greater effect on accuracy than weights. If input activations are kept with higher bit width, is possible to achieve better accuracies. Third, XNOR-Net continues to be the best quantization method to binarize both weights and input activations, achieving 49.26\% top-1 and 73.53\% top-5 accuracy. \gboxbegin{kobackbright}{koborderbright}{OBSERVATION}{\rtaskobs{ko}} The training of quantized \ac{bwn} and XNOR-Net~\cite{xnor-net} models revealed that the application of the ReLU non-linearity after the convolution operations yields better results. We apply this optimization in all \ac{bwn} and XNOR-Net results we report; \gboxend \begin{table}[htb!] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|ccccccccc|} \hline \multicolumn{2}{|c|}{\multirow{2}{*}{Paper / Method}} & \multicolumn{9}{c|}{Quantization of Weights (W) and Activations (A)} \\ \cline{3-11} \multicolumn{2}{|c|}{} & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}62.54\%\\ 84.45\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}61.43\%\\ 83.31\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}60.31\%\\ 82.67\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}53.46\%\\ 77.76\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}59.06\%\\ 82.01\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}38.00\%;\\ 63.82\%\end{tabular} & DNC & \begin{tabular}[c]{@{}c@{}}32.95\%\\ 58.57\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}15.18\%\\ 34.75\%\end{tabular} \\ \hline DoReFa-Net & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}62.42\%\\ 84.17\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}61.38\%\\ 83.29\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}61.11\%\\ 83.21\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}62.09\%\\ 83.90\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}62.13\%\\ 83.66\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}60.73\%\\ 82.99\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}26.58\%\\ 49.24\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}59.93\%\\ 82.03\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}41.17\%\\ 65.77\%\end{tabular} \\ \hline XNOR-Net & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & - & - & - & - & \begin{tabular}[c]{@{}c@{}}61.24\%\\ 83.33\%\end{tabular} & - & - & - & \begin{tabular}[c]{@{}c@{}}49.26\%\\ 73.53\%\end{tabular} \\ \hline TWN & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}62.70\%\\ 84.46\%\end{tabular} & - & - & \begin{tabular}[c]{@{}c@{}}60.59\%*\\ 82.80\%*\end{tabular} & - & - & - & - & - \\ \hline TTQ & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & - & - & - & \begin{tabular}[c]{@{}c@{}}51.62\%*\\ 74.85\%*\end{tabular} & - & - & - & - & - \\ \hline \end{tabular} } \caption{Accuracy results (Top-1; Top-5) for ResNet-18 trained with ImageNet. Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2 bit representation; DNC - Does Not Converge; For quantization bit widths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the normal quantization formula presented by the original work. The baseline unmodified ResNet-18 CNN model achieves 67.05\% top-1 and 87.66\% top-5 single-precision accuracy.} \label{tab:ImageNet_ResNet18_ER} \end{table} \noindent \textbf{VGG.} Table \ref{tab:ImageNet_VGG16_ER} shows results of VGG-16 trained with ImageNet. \textbf{These results were obtained with only 10 epochs of training}. We make five key observations. First, even with only 10 epochs trained, VGG-16 is capable of achieving better results than AlexNet in single precision. Second, for DoReFa-Net, is possible to reduce the VGG-16 model size by up to 32$\times$ by binarizing the weights and keeping the input activations in single precision and still achieve 57.65\% top-1 and 81.53\% top-5 accuracy, a 3.15\% and 2.19\% accuracy loss for top-1 and top-5, respectively, compared to single-precision. DoReFa-Net is unstable when quantizing the weights to bit widths different than 1. XNOR-Net also achieves similar results with 56.22\% top-1 and 80.38\% top-5 accuracy, when only the weights are quantized to 1 bit (\ac{bwn}). Third, \ac{twn} achieves 57.87\% top-1 and 81.78\% while using ternary weight values, an accuracy loss compared to single-precision of 1.38\% top-1 and 1.30\% top-5. Fourth, when both weights and input activations are binarized, the accuracy loss is significant. DoReFa-Net is the quantization method to get better results here, 29.92\% top-1 and 54.74\% top-5 accuracy, still a significant 30.88\% and 28.98\% accuracy loss for top-1 and top-5, respectively, compared to single-precision. Fifth, increasing the input activations bit width to 2 bits while keeping the weights binarized (W1A2), increases the accuracy. DoReFa-Net now achieves 53.83\% top-1 and 78.35\% top-5 accuracy. \begin{table}[t] \centering \resizebox{\columnwidth}{!}{ \renewcommand{\tabcolsep}{2pt} \begin{tabular}{|c|c|ccccccccc|} \hline \multicolumn{2}{|c|}{\multirow{2}{*}{Method}} & \multicolumn{9}{c|}{Quantization of Weights (W) and Activations (A)} \\ \cline{3-11} \multicolumn{2}{|c|}{} & W32A32 & W8A8 & W4A4 & W2A32 & W1A32 & W2A2 & W2A1 & W1A2 & W1A1 \\ \hline QNN & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}60.98\%\\ 83.77\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}45.15\%\\ 70.37\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}44.19\%\\ 69.66\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}47.01\%\\ 72.76\%\end{tabular} & DNC & \begin{tabular}[c]{@{}c@{}}40.59\%\\ 66.00\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}31.21\%\\ 55.85\%\end{tabular} & DNC & DNC \\ \hline DoReFa-Net & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}60.80\%\\ 83.72\%\end{tabular} & DNC & DNC & DNC & \begin{tabular}[c]{@{}c@{}}57.65\%\\ 81.53\%\end{tabular} & DNC & DNC & \begin{tabular}[c]{@{}c@{}}53.83\%\\ 78.35\%\end{tabular} & \begin{tabular}[c]{@{}c@{}}29.92\%\\ 54.74\%\end{tabular} \\ \hline XNOR-Net & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & - & - & - & - & \begin{tabular}[c]{@{}c@{}}56.22\%\\ 80.38\%\end{tabular} & - & - & - & \begin{tabular}[c]{@{}c@{}}16.48\%\\ 38.08\%\end{tabular} \\ \hline TWN & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & \begin{tabular}[c]{@{}c@{}}59.25\%\\ 83.08\%\end{tabular} & - & - & \begin{tabular}[c]{@{}c@{}}57.87\% *\\ 81.78\% *\end{tabular} & - & - & - & - & - \\ \hline TTQ & \begin{tabular}[c]{@{}c@{}}Top-1\\ Top-5\end{tabular} & - & - & - & DNC & - & - & - & - & - \\ \hline \end{tabular} } \caption{Accuracy results (Top-1; Top-5) for VGG-16 network trained with ImageNet (Results after 10 epochs). Methods marked with a star (*) use ternary values, i.e., use 3 of 4 possible values with 2-bit representation; for quantization bit widths equal to 1, the quantization formula used is the \texttt{sign()} function instead of the normal quantization formula presented by the original work. DNC - Does Not Converge. The baseline unmodified VGG-16 network achieves 60.82\% top-1 and 84.00\% top-5 accuracy.} \label{tab:ImageNet_VGG16_ER} \end{table} A holistic analysis of the above results allows us to derive the network-specific key observations regarding quantization, identified in boxes KEY OBESRVATION 1 to 4. \gboxbegin{kobackbright}{koborderbright}{OBSERVATION}{\rtaskobs{ko}} TWN~\cite{twn} is a good quantization method. It offers consistent results and is overall the best method to quantize to the W2A32 quantization level. \gboxend \section*{Acknowledgments} \else \section*{Acknowledgment} \fi The authors would like to thank the Laboratory for Advanced Computing of University of Coimbra \linebreak (\url{https://www.uc.pt/lca}) for the HPC and consulting resources provided, which made the attainment of the results reported in this paper possible. This work was also supported by Instituto de Telecomunicações and Fundação para a Ciência e a Tecnologia, Portugal, under grants UIDB/50008/2020 and EXPL/EEI-HAC/1511/2021. \ifCLASSOPTIONcaptionsoff \newpage \fi \bibliographystyle{IEEEtran}
{'timestamp': '2023-01-18T02:15:23', 'yymm': '2301', 'arxiv_id': '2301.06193', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06193'}
arxiv
\section{Proof that Example~\ref{ex:empty-strong-core} has an empty strong core} We claimed earlier that there exist four players games with an empty strong core, and gave an example of such a game in Example~\ref{ex:empty-strong-core}. Below, we present a table giving, for every action profile, a strong beneficial deviation for some set of players. The notation \(\{2 \mapsto 0, 4 \mapsto 1\}\) means that the coalition \(\{2,4\}\) have a strong beneficial deviation where player 2 plays \(0\) and player 4 player \(1\). Note that a strong beneficial deviation for a coalition does not require all players to change their action from the status quo. \begin{figure}[H] \begin{tabular}{llll} \toprule Action profile & Set of winning players & Strong beneficial deviation \\ \midrule \(0000\) & \(\{1,2\}\) & \(\{3 \mapsto 1 \}\) \\ \(0001\) & \(\{1,2\}\) & \(\{3 \mapsto 1\}\) \\ \(0010\) & \(\{1,3\}\) & \(\{2 \mapsto 1, 4 \mapsto 1\}\) \\ \(0011\) & \(\{1,3\}\) & \(\{2 \mapsto 1, 4 \mapsto 1\}\) \\ \(0100\) & \(\{1,2\}\) & \(\{3 \mapsto 1\}\) \\ \(0101\) & \(\{1,4\}\) & \(\{2 \mapsto 0\}\) \\ \(0110\) & \(\{1,3\}\) & \(\{2 \mapsto 1 ,4 \mapsto 1\}\) \\ \(0111\) & \(\{2,4\}\) & \(\{1 \mapsto 1\}\) \\ \(1000\) & \(\{3,4\}\) & \(\{1 \mapsto 0\}\) \\ \(1001\) & \(\{2,3\}\) & \(\{1 \mapsto 0\}\) \\ \(1010\) & \(\{2,3\}\) & \(\{1 \mapsto 0\}\) \\ \(1011\) & \(\{2,3\}\) & \(\{1 \mapsto 0\}\) \\ \(1100\) & \(\{1,2\}\) & \(\{3 \mapsto 1\}\) \\ \(1101\) & \(\{1,4\}\) & \(\{2 \mapsto 0\}\) \\ \(1110\) & \(\{2,3\}\) & \(\{1 \mapsto 0\}\) \\ \(1111\) & \(\{1,4\}\) & \(\{2 \mapsto 0\}\) \\ \bottomrule \end{tabular} \end{figure} This table illustrates that the provided game has an empty strong core. It is an easy, but somewhat tedious, task to verify that the deviating players win under all counter-responses under which the original winning players win. \section{Proof of Theorem~\ref{thm:strong-core-nonempty}} We will prove this theorem by assuming the existence of a three player game \(G\) with an empty strong core, and then proving two contradictory facts, which immediately implies the result. The two claims are: \begin{enumerate} \item There is some strategy \(\vec{\sigma}\) on \(G\) that models exactly two of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\). \item There is no strategy \(\vec{\sigma}\) on \(G\) that models exactly two of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\). \end{enumerate} We use the following lemma throughout: \begin{lemma} Let \(G\) be a three-player game with an empty strong core. Then there does not exist a strategy profile which satisfies the goals of all three players. \end{lemma} \begin{proof} If \(G\) had a strategy satisfying all of the players' goals, such a strategy would be in the strong core, which is a contradiction. \end{proof} The first claim we need to prove is the more straightforward of the two: \begin{lemma}\label{lmm:strong-core-three-player-non-empty-first-part} Let \(G\) be a three-player game with an empty strong core. Then there exists some strategy \(\vec{\sigma}\) on \(G\) that models exactly two of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\). \end{lemma} \begin{proof} Given claim 1, we know that every strategy on \(G\) must model exactly zero, one or two goals, but not three. Suppose, for contradiction, that \(G\) only has strategies modelling none or one of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\). First, note that if \(G\) only had strategies satisfying zero of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\), none of those strategies could admit a strong beneficial deviation, and so would all be in the \ccore. Hence, \(G\) must have a strategy satisfying exactly one of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\). Let such a strategy be denoted \(\vec{\sigma} = (\sigma_1, \sigma_2, \sigma_3)\), and without loss of generality, we may assume that it satisfies only \(\gamma_1\). Now, as by assumption \(\vec{\sigma}\) does not lie in \(\ccoreset{G}\), there must be a strong beneficial deviation from this strategy for some coalition \(C \subseteq \{2,3\}\). Since under a strong beneficial deviation, every member of the coalition is winning, and since we assumed that \(G\) only has strategies satisfying less than two of the goals, the coalition must be a singleton. Again, without loss of generality, we may assume that it is player 2 who has a deviation \(\sigma^\prime_2\). By assumption, we have that \(\sigma_1, \sigma_2^\prime, \sigma_3\) only models \(\gamma_2\). But again, \((\sigma_1, \sigma^\prime_2, \sigma_3)\) must have a strong beneficial deviation for \(1\) or \(3\) to a strategy satisfying only \(\gamma_1\), or only \(\gamma_3\), respectively. If the former case were true, then this would contradict the fact that \(\sigma_2^\prime\) was a strong beneficial deviation from \(\vec{\sigma}\). Hence, we must be in the latter case, and have a strong beneficial deviation \(\sigma^\prime_3\) for player 3. The new strategy, \((\sigma_1, \sigma^\prime_2, \sigma^\prime_3)\) must once again admit a strong beneficial deviation. If it admitted a strong beneficial deviation \(\sigma^\prime_1\) for \(1\) satisfying \(\gamma_1\) only, then the joint strategy \((\sigma^\prime_1, \sigma^\prime_3)\) would be a punishment for \(\sigma^\prime_2\). Otherwise, if a strong beneficial deviation \(\sigma''_2\) for 2 to a strategy satisfied \(\gamma_2\) only, then \((\sigma_1, \sigma''_2)\) would constitute a punishment for \(\sigma^\prime_3\). Either way, we reach a contradiction, concluding our proof. \end{proof} Before proving the second claim, we will need to appeal to two additional technical lemmas. The first is the following: \begin{lemma}\label{lmm:strong-core-three-player-non-empty-technical-lemma-1} Let \(\{a,b,c\}\) be a permutation of \(\{1,2,3\}\). Then there do not exist strategies \((\sigma_a, \sigma_b, \sigma_c)\), \((\sigma_a, \sigma_b, \sigma^\prime_c)\), \((\sigma^\prime_a, \sigma_b, \sigma^\prime_c)\) of \(G\) such that all of the following hold: \begin{itemize} \item{\((\sigma_a, \sigma_b, \sigma_c)\) satisfies \(\gamma_a\) and \(\gamma_b\) but not \(\gamma_c\)} \item{\((\sigma_a, \sigma_b, \sigma^\prime_c)\) satisfies \(\gamma_c\) only} \item{\((\sigma^\prime_a, \sigma_b, \sigma^\prime_c)\) satisfies \(\gamma_a\) only} \item{\(\sigma^\prime_c\) is a beneficial deviation for \(c\) from \((\sigma_a, \sigma_b, \sigma_c)\) to \((\sigma_a, \sigma_b, \sigma^\prime_c)\)} \item{\(\sigma^\prime_a\) is a beneficial deviation for \(a\) from \((\sigma_a, \sigma_b, \sigma^\prime_c)\) to \((\sigma^\prime_a, \sigma_b, \sigma^\prime_c)\)} \end{itemize} \end{lemma} \begin{proof} For a contradiction, we assume the statement of the lemma is not the case, and all of the statements hold. Without loss of generality, we can also assume that \(a=1\), \(b=2\), and \(c=3\). Now, the third strategy, \((\sigma^\prime_1, \sigma_2, \sigma^\prime_3)\) must have a strong beneficial deviation for \(2\), \(3\), or both. If it has a deviation \((\sigma^\prime_2, \sigma''_3)\) (with possibly \(\sigma^\prime_2 = \sigma_2\)) to a strategy that satisfies \(\gamma_3\) but not \(\gamma_1\), then it would be a punishment for \(\sigma^\prime_1\). Therefore, the only possible sets of winners in the new strategy are \(\{2\}\), \(\{1,2\}\) and \(\{1,3\}\). We consider each of these cases in turn. If player 2 is the only winner under the new strategy, the strong beneficial deviation must be \(\sigma^\prime_2\) by \(2\) only, to the strategy \((\sigma^\prime_1, \sigma^\prime_2, \sigma^\prime_3)\). Again, this strategy has to have a beneficial deviation for \(1\), \(3\), or both. Let that deviation be \((\sigma''_1, \sigma''_3)\) with possibly \(\sigma''_1\) = \(\sigma^\prime_1\) or \(\sigma''_3\) = \(\sigma^\prime_3\) but not both. Consider the following cases for the resulting strategy, \((\sigma''_1, \sigma^\prime_2, \sigma''_3)\): \begin{itemize} \item If only \(\gamma_1\), or exactly \(\gamma_1\) and \(\gamma_3\) are satisfied, then \((\sigma''_1, \sigma''_3)\) is a punishment for \(\sigma^\prime_2\); a contradiction. \item If exactly \(\gamma_1\) and \(\gamma_2\) are satisfied, then since \(3\) loses, we must necessarily have \(\sigma''_3 = \sigma^\prime_3\) (the deviation is just by \(1\)). In this case, the joint strategy \((\sigma''_1, \sigma^\prime_2)\) can take us from \((\sigma_1, \sigma_2, \sigma^\prime_3)\) to \((\sigma''_1, \sigma^\prime_2, \sigma''_3)\) and form a punishment for \(\sigma^\prime_3\); a contradiction. \item If only \(\gamma_3\), or exactly \(\gamma_2\) and \(\gamma_3\) are satisfied, then since either way \(1\) loses, we must have \(\sigma''_1 = \sigma^\prime_1\) and the joint strategy \((\sigma^\prime_2, \sigma''_3)\) can take us from \((\sigma^\prime_1, \sigma_2, \sigma^\prime_3)\) to \((\sigma''_1, \sigma^\prime_2, \sigma''_3)\) and form a punishment for \(\sigma^\prime_1\); a contradiction. \end{itemize} Now suppose that the winners in the new strategy are \(1\) and \(2\). Since \(1\) was a winner in \((\sigma^\prime_1, \sigma_2, \sigma^\prime_3)\) already, the strong beneficial deviation must once again be \(\sigma^\prime_2\) by \(2\) only, to the strategy \((\sigma^\prime_1, \sigma^\prime_2, \sigma^\prime_3)\). But now, we can see that the joint strategy \((\sigma^\prime_1, \sigma^\prime_2)\) is a punishment for \(\sigma^\prime_3\) (both \(1\) and \(2\) remain winners); a contradiction. Finally, suppose the winners in the new strategy are \(1\) and \(3\). Since \(1\) was a winner in \((\sigma^\prime_1, \sigma_2, \sigma^\prime_3)\) already, the strong beneficial deviation must this time be \(\sigma''_3\) by \(3\) only, to the strategy \((\sigma^\prime_1, \sigma_2, \sigma''_3)\). The only loser, \(2\), must have a strong beneficial deviation \(\sigma^\prime_2\) from this strategy. Now, see that: \begin{itemize} \item{If exactly \(\gamma_1\) and \(\gamma_2\) were satisfied in the resulting strategy --- \((\sigma^\prime_1, \sigma^\prime_2, \sigma''_3)\), then the joint strategy \((\sigma^\prime_1, \sigma^\prime_2)\) would be a punishment for \(\sigma^\prime_3\).} \item{If exactly \(\gamma_2\) and \(\gamma_3\) were satisfied in \((\sigma^\prime_1, \sigma^\prime_2, \sigma''_3)\) then the joint strategy \((\sigma^\prime_2, \sigma''_3)\) would be a punishment for \(\sigma^\prime_1\).} \end{itemize} Hence, \(2\) must be the only winner in \((\sigma^\prime_1, \sigma^\prime_2, \sigma''_3)\). Once again, this strategy must admit a strong beneficial deviation for \(1\), \(3\), or both. Let that deviation be \((\sigma''_1, \sigma'''_3)\) with possibly \(\sigma''_1\) = \(\sigma^\prime_1\) or \(\sigma'''_3\) = \(\sigma''_3\) but not both. Consider the following cases for the resulting strategy, \((\sigma''_1, \sigma^\prime_2, \sigma'''_3)\): \begin{itemize} \item{If only \(\gamma_1\), or exactly \(\gamma_1\) and \(\gamma_2\) were satisfied then we would necessarily have \(\sigma'''_3 = \sigma''_3\) and the joint strategy \((\sigma''_1, \sigma^\prime_2)\) would be a punishment for \(\sigma''_3\), contradiction.} \item{If exactly \(\gamma_1\) and \(\gamma_3\) were satisfied then \((\sigma''_1, \sigma'''_3)\) would be a punishment for \(\sigma^\prime_2\), contradiction.} \item{If only \(\gamma_3\), or exactly \(\gamma_2\) and \(\gamma_3\) were satisfied then we would necessarily have \(\sigma''_1 = \sigma^\prime_1\) and the joint strategy \((\sigma^\prime_2, \sigma'''_3)\) would be a punishment for \(\sigma^\prime_1\), contradiction.} \end{itemize} Thus all three possible sets of winners lead to a contradiction, yielding our result. \end{proof} The second of the two technical lemmas is then as follows: \begin{lemma}\label{lmm:strong-core-three-player-non-empty-technical-lemma-2} Let \(\{a,b,c\} = \{1,2,3\}\) be the set \(Ag\). There cannot be strategies \((\sigma_a, \sigma_b, \sigma_c)\), \((\sigma_a, \sigma_b, \sigma^\prime_c)\) of \(G\) such that all of the following hold: \begin{itemize} \item{\((\sigma_a, \sigma_b, \sigma_c)\) satisfies \(\gamma_a\) and \(\gamma_b\) but not \(\gamma_c\)} \item{\((\sigma_a, \sigma_b, \sigma^\prime_c)\) satisfies \(\gamma_c\) only} \item{\(\sigma^\prime_c\) is a strong beneficial deviation for \(c\) from \((\sigma_a, \sigma_b, \sigma_c)\) to \((\sigma_a, \sigma_b, \sigma^\prime_c)\)} \end{itemize} \end{lemma} \begin{proof} For contradiction, assume otherwise. Without loss of generality, we can again assume that \(a=1\), \(b=2\), and \(c=3\). The second strategy, \((\sigma_a, \sigma_b, \sigma^\prime_c)\) must admit a strong beneficial deviation for \(1\), \(2\), or both. However, see that a deviation to a strategy satisfying only \(\gamma_1\) or only \(\gamma_2\) would contradict Lemma~\ref{lmm:strong-core-three-player-non-empty-technical-lemma-1}. Hence, the new strategy must have exactly two winners. Moreover, if the winners in the new strategy were exactly \(1\) and \(2\), the deviation would provide a punishment for \(\sigma^\prime_3\). Therefore, without loss of generality, we can assume that \((\sigma_a, \sigma_b, \sigma^\prime_c)\) has a strong beneficial deviation \(\sigma^\prime_1\) for \(1\) to a strategy satisfying exactly \(\gamma_1\) and \(\gamma_3\). Now, the only loser in \((\sigma^\prime_1, \sigma_2, \sigma^\prime_3)\), \(2\), must have a strong beneficial deviation \(\sigma^\prime_2\). If however, exactly \(\gamma_1\) and \(\gamma_2\) were satisfied in \((\sigma^\prime_1, \sigma^\prime_2, \sigma^\prime_3)\), then \((\sigma^\prime_1, \sigma^\prime_2)\) would be a punishment for \(\sigma^\prime_3\). If exactly \(\gamma_2\) and \(\gamma_3\) were satisfied, \((\sigma^\prime_2, \sigma^\prime_3)\) would provide a punishment for \(\sigma^\prime_1\). Hence, \(2\) must be the only winner. Once again a strong beneficial deviation from \((\sigma^\prime_1, \sigma^\prime_2, \sigma^\prime_3)\) to a strategy satisfying only \(\gamma_1\) or only \(\gamma_3\) would contradict Lemma~\ref{lmm:strong-core-three-player-non-empty-technical-lemma-1}. Therefore, there must be a strong beneficial deviation by \(1\), \(3\), or both, to a strategy with exactly two winners. Now: \begin{itemize} \item{If the winners were \(1\) and \(3\), the deviation would provide a punishment for \(\sigma^\prime_2\).} \item{If the winners were \(1\) and \(2\) then the deviation must be \(\sigma''_1\) by \(1\) only (as \(3\) loses). But then, the joint strategy \((\sigma''_1, \sigma^\prime_2)\) would provide a punishment for the initial \(\sigma^\prime_3\).} \item{If the winners were \(2\) and \(3\) then the deviation must be \(\sigma''_3\) by \(3\) only. The joint strategy \((\sigma^\prime_2, \sigma''_3)\) would be a punishment for \(\sigma^\prime_1\).} \end{itemize} This exhausts all the cases, each of which lead to a contradiction, and finishes the proof of Lemma~\ref{lmm:strong-core-three-player-non-empty-technical-lemma-2}. \end{proof} With these two technical lemmas in place, we are ready to prove the second part of our claim. \begin{lemma}\label{lmm:strong-core-three-player-non-empty-second-part} Let \(G\) be a three-player game with an empty strong core. Then there does not exist a strategy profile \(\vec{\sigma}\) on \(G\) that models exactly two of \(\gamma_1\), \(\gamma_2\), \(\gamma_3\). \end{lemma} \begin{proof} For a contradiction, assume otherwise. Without a loss of generality, let \((\sigma_1, \sigma_2, \sigma_3)\) be a strategy satisfying exactly \(\gamma_1\) and \(\gamma_2\). It must admit a strong beneficial deviation \(\sigma^\prime_3\) for the lone loser, \(3\). Moreover, by Lemma~\ref{lmm:strong-core-three-player-non-empty-technical-lemma-2}, he cannot win alone in the new strategy. Therefore, without loss of generality, we can assume that \(1\) and \(3\) are winners in \((\sigma_1, \sigma_2, \sigma^\prime_3)\). Again, by Lemma~\ref{lmm:strong-core-three-player-non-empty-technical-lemma-2}, the new strategy must have a strong beneficial deviation \(\sigma^\prime_2\) by \(2\) to a strategy where exactly two players win. However, if \(1\) and \(2\) were winners, then \((\sigma_1, \sigma^\prime_2)\) would constitute a punishment for \(\sigma^\prime_3\). Therefore, exactly \(\gamma_2\) and \(\gamma_3\) must be satisfied in \((\sigma_1, \sigma^\prime_2, \sigma^\prime_3)\). But now, again by Lemma~\ref{lmm:strong-core-three-player-non-empty-technical-lemma-2}, there must be a strong beneficial deviation \(\sigma^\prime_1\) for \(1\) to another strategy with exactly two winners. However, if those were \(1\) and \(2\), \((\sigma^\prime_1, \sigma^\prime_2)\) would be a punishment for \(\sigma^\prime_3\). Else, if the winners were \(1\) and \(3\) then \((\sigma^\prime_1, \sigma^\prime_3)\) would form a punishment for \(\sigma^\prime_2\). This concludes our proof. \end{proof} Finally, the required result simply follows by combining the two lemmas. \begin{theorem} If \(G\) is a three-player game, then it has a non-empty strong core. \end{theorem} \begin{proof} Result follows by combining Lemma~\ref{lmm:strong-core-three-player-non-empty-first-part} and Lemma~\ref{lmm:strong-core-three-player-non-empty-second-part}. \end{proof} \section{Introduction}\label{secn:intro} Intelligent agents such as Siri, Alexa, and Cortana are now used by millions of people every day. Originally proposed in the early 1990s, the vision for such agents was that they would be pro-active assistants, working in pursuit of goals delegated to them by their human users. Current intelligent agents make use of an ever-increasing array of AI technologies, starting with natural language understanding in their interface, used to communicate with human users. The next step in the development of such agents is expected to be the ability of such agents to interact not just with human users but \emph{with each other} in pursuit of their delegated goals. Such multi-agent systems raise a raft of research challenges, which have been the subject of considerable research over the past thirty years. The issue to which we address ourselves in this article is that of understanding the dynamics of such systems. In particular, collections of interacting agents may exhibit undesirable and unpredictable dynamics. The question of \emph{verifying} the possible behaviours of multi-agent systems thus naturally arises. One increasingly popular approach to the problem of verifying multi-agent systems involves viewing a system as a game (in the sense of game theory), in which agents act rationally and strategically in pursuit of delegated goals. Given this, it is natural to ask what behaviours a system might exhibit under the assumption that agents act rationally---in accordance with game-theoretic solution concepts. This is the key idea that underpins the \emph{rational verification} paradigm~\cite{Gutierrez2015,Gutierrez2017a,WooldridgeGHMPT16,Abate2021}. Previous work on rational verification has used \emph{concurrent games} as a semantic model of multi-agent systems. Since they were first introduced~\cite{Alur2002}, concurrent games have been very widely adopted in both the AI community and the verification/computer science community~\cite{Gutierrez2015,Gutierrez2017a,WooldridgeGHMPT16}. A concurrent game~\cite{Alur2002} is a finite-state environment, populated by a collection of independent, self-interested agents. A game takes place over an infinite sequence of rounds, where at each round, each agent chooses an action to perform. Preferences in concurrent games are typically modelled by assuming that each agent is associated with a temporal logic goal formula~\cite{Emerson1990}, which it desires to see satisfied. The infinite plays generated by a game will either satisfy or fail to satisfy each player's goal, and players act rationally in an attempt to achieve their goal. Since the satisfaction of a player's goal may be dependent on the choices made by other players, then players must make choices strategically in order to play optimally. Now, in all previous studies that we are aware of, concurrent games are assumed to be \emph{non-cooperative}: players act alone, and binding agreements between players are ruled out. The game theoretic solution concepts used in previous studies of concurrent games have therefore been those studied in non-cooperative game theory---primarily Nash equilibrium and refinements thereof. In such a non-cooperative setting, the basic questions that we ask of a concurrent game are, for example, whether a particular temporal logic property holds on \emph{some} computation of the system that could arise through players selecting strategies that form a Nash equilibrium (the \textsc{E-Nash} problem) or whether a property holds on \emph{all} such computations (the \textsc{A-Nash} problem). These problems can be understood as game-theoretic counterparts of the conventional model checking problem~\cite{Clarke2002}: in model checking, we are typically interested in whether a particular property could hold on some or all possible computations of a system, whereas in rational verification, we are interested in whether a property holds on some or all computations \emph{that could arise through rational choices on the part of the players}. The complexity of the corresponding decision problems in concurrent games has been extensively studied, and there now exist a small number of software tools that support rational verification~\cite{Gutierrez2018,Lomuscio2017,Brenguier2013,Kwiatkowska2020}. Non-cooperative game theory, however, represents just one branch of game theory. \emph{Cooperative game theory} is a widely studied, albeit less well-known branch of game theory, which distinguishes itself from its non-cooperative counterpart in that it allows for the possibility that \emph{agents can make binding agreements with each other}. The possibility of binding agreements makes it possible for agents to work in teams, and to enjoy the benefits of cooperation. In the real world, we use contracts and other mechanisms (both formal and informal) to enable binding agreements. The aim of the present paper, therefore, is to extend the study of rational verification to include \emph{cooperative} solution concepts~\cite{OsborneR94,Maschler2013,Chalkiadakis2011}. Thus, we assume there is some (exogenous) mechanism through which players in a concurrent game can reach binding agreements and form teams (``coalitions'') in order to collectively achieve goals (although we emphasise that the nature of such a mechanism is beyond the scope of the present work). The possibility of binding cooperation and coalition formation eliminates some undesirable equilibria that arise in non-cooperative settings, and makes available a range of outcomes that cannot be achieved without cooperation. We focus on the \emph{core} as our key solution concept. The basic idea behind the core is that it consists of those strategy profiles from which no subset of players could benefit by collectively deviating. Now, in conventional cooperative games (characteristic function games with transferable utility~\cite{Chalkiadakis2011}), this intuition can be given a simple and natural formal definition, and as a consequence, the core is probably the most widely-studied solution concept for cooperative games. However, the conventional definition of the core does not naturally map into our concurrent game setting, because in our games, coalitions are subject to \emph{externalities}: whether a coalition has a beneficial deviation depends not just on the makeup of that coalition, \emph{but also on the behaviour of the remaining players}. We begin by introducing the framework of concurrent games, and then proceed to define two variations of the core for such settings. In the first, a coalition of players is assumed to have a beneficial deviation if they have some course of action available to them which they would benefit from \emph{no matter what the remaining players did} (\emph{cf.}, the concept of the \(\alpha\)-\core\ in the classic game theory literature~\cite{uyanik2015nonemptiness}). However, this ``worst case'' (maximin) formulation of the core requires a deviation to be beneficial against \emph{all} courses of action by the remaining players---even those that the remaining agents would not rationally choose. This motivates a second definition, where a deviation is only required to be beneficial against all courses of action by remaining players that are \emph{credible}, in the sense that those players would then be no worse off than they were originally. We also consider games where the agents have \emph{quantitative} preferences, modelled as some kind of reward in every round of the game. In each case, we formally define the relevant solution concept, identify some of its key computational properties, give logical characterisations, and where possible, provide complexity results, which range from properties that can be checked in \textsc{PSpace} to properties that can be checked in \textsc{3ExpTime}\@. We also study model theoretic properties related to the \core: in particular, whether it is guaranteed to be non-empty, and whether temporal logic properties hold across bisimilar systems over plays (computation runs) induced by elements in the \core\ of the game (a highly desirable property from a formal verification perspective). \noindent \paragraph*{\textbf{Structure of the paper}} The remainder of this article is organised as follows: \begin{itemize} \item In the following section, we summarise the key concepts from logic and concurrent games that are used throughout the paper. \item In Section~\ref{secn:core}, we define the \core\ and the main computational properties associated with it. In Section~\ref{secn:strong-core} we study the issue of credible coalition formations, with associated complexity results. \item In Section~\ref{secn:mean-payoff-games}, we study the core in the quantitative setting of concurrent mean-payoff games. \item Concluding remarks and related work are given in Section~\ref{secn:conc}, including a discussion around the implementation of our concepts using model checkers. \end{itemize} \section{Preliminaries}\label{secn:prelim} \subsection{Set and Sequences} Given any set \(S\), we use \(S^*\), \(S^\omega\), and \(S^+\) for, respectively, the sets of finite, infinite, and non-empty finite sequences of elements in \(S\). If \(w_1\in S^*\) and \(w_2\) is any other (finite or infinite) sequence, we write \(w_1w_2\) for their concatenation. For \(Q\subseteq S\), we write \(S_{-Q}\) for \(S\setminus Q\) and \(S_{-i}\) if \(Q=\set{i}\). We extend this notation to tuples \(u=(s_1,\ldots,s_k,\ldots,s_n)\) in \(S_1\times\cdots\times S_n\), and write \(u_{-k}\) for \((s_1,\ldots,s_{k-1},s_{k+1},\ldots,s_n)\), and similarly for sets of elements, that is, by~\(u_{-Q}\) we mean~\(u\) without each \(s_k\), for \(k\in Q\). Given a sequence \(w\), we write~\(w[t]\) for the element in position \(t+1\) in the sequence; for instance, \(w[0]\) is the first element of \(w\). We also use \emph{slice notation}: we write~\(w[l\ldots m]\) for the sequence \(w[l]\ldots w[m-1]\), \(w[l\ldots]\) for \(w[l]w[l+1]\ldots\), and \(w[\ldots m]\) for \(w[0]\ldots w[m-1]\); if \(m=0\), we let~\(w[l\ldots m]\) be the empty sequence, denoted~\(\epsilon\). \subsection{Games} We begin by introducing the model of multi-agent systems that we use throughout the remainder of the paper: \emph{concurrent game structures}~\cite{Alur2002}. Informally, a concurrent game consist of a set of players, a set of actions for each of those players, a set of system states, and a transition function which describes how the state of the game changes, given a current state and an action for each of the players. Formally, a concurrent game structure, \(M\), is given by a tuple, \begin{equation*} M = (\Ag, \St, {\{\Ac_i\}}_{i \in \Ag}, s^0, \transf), \end{equation*} where: \begin{itemize} \item \(\Ag\) and \(\St\) are finite, non-empty sets of \textbf{agents} and \textbf{states}, respectively---we usually identify \(\Ag\) with the set \(\{1, \ldots, n\}\); \item For each \(i\ \in \Ag\), \(\Ac_i\) is a finite, non-empty set of \textbf{actions} available to agent \(i\). We associate each state \(s\) with a set of actions available at that state, \(\Ac_i(s) \subseteq \Ac_i\), and we write \(\Ac\) for \(\Ac_1 \times \cdots \times \Ac_n\); \item \(s^0 \in \St\) is the \textbf{initial}/\textbf{start} state; and finally, \item \(\transf : \St \times \Ac \to \St\) is the \textbf{transition function} of the game. \end{itemize} As all the other components of the game can be derived from the transition function (the start state can be specified by listing its transitions first, say), the \emph{size} of \(M\) is the size of its transition function, given by \(|\St|\times|\Ac|^{|\Ag|}\). Given a concurrent game structure \(M\), we can \emph{play} a game on it as follows: the game starts in state \(s^0\), and each player \(i \in \Ag\) chooses an action available to them, \(\ac_i^0 \in \Ac_i(s^0)\). The game then moves to a new state, \begin{equation*} s^1 = \transf(s^0, \ac_1^0, \ldots, \ac_{n}^0). \end{equation*} This process is then repeated. We typically write \(s^i\) for the \(i^\text{th}\) state in the sequence, and \(\ac^i = (\ac_1^i, \ldots, \ac_n^i)\) for the \(i^\text{th}\) vector of actions played in the sequence. Thus for all \(t \in \Nat\), we have \begin{equation*} s^{t+1} = \transf(s^t, \ac^t) \end{equation*} A \textbf{run}, \(\rho\) is a infinite sequence \(\run = s^0 s^1 s^2 \ldots\) such that for every \(t \in \Nat\), there exists some \(\ac \in \Ac\) such that \(s^{t+1} = \transf(s^t, \ac)\). A \textbf{path}, \(\pi\) is a finite prefix of a run. A \textbf{strategy} for a player~\(i\) defines how player \(i\) chooses actions at each round of the game, as a function of the previous history of the game. Formally, a strategy is a function~\(\sigma_i\colon\St^+\to\Ac_i\) such that \(\sigma_i(\pi s)\in\Ac_{i}(s)\) for every \(\pi\in\St^*\) and \(s\in \St\). Thus, for every path \(\pi\), a strategy for a player \(i\) gives an action available to~\(i\) from the last state of that path. The set of strategies for player \(i\) is denoted by~\(\strategies_i\).\footnote{Here, we define strategies with respect to finite sequences of states. One can also define them in terms of finite sequences of action profiles. As the sequence of states can be derived from the action profiles, but not the other way around, these strategies are more powerful than the ones we use, and indeed, provide desirable properties such as the invariance of Nash equilibria under bisimilarity~\cite{Gutierrez2017b}. However, strategies defined relative to states are standard in the concurrent game structures~\cite{Alur2002} and rational verification~\cite{Gutierrez2017a} literature, so we use this model for consistency. For more details and further discussion, refer to~\cite{Gutierrez2017b}.} A \textbf{strategy profile} \(\vec{\sigma}\) is a tuple of strategies, one for each player: \(\vec\sigma=(\sigma_1,\dots,\sigma_n) \in \strategies_1\times\cdots\times\strategies_n\). Observe that a strategy profile, \(\vec\sigma\), together with a state \(s\), induces a unique run, \(\run(\vec\sigma,s)\), where: \begin{itemize} \item \(\run(\vec\sigma,s)[0]=s\); and \item \(\run(\vec\sigma,s)[t+1]=\transf(\run(\vec\sigma,s)[t],\sigma_1(\run(\vec\sigma,s)[\ldots t]),\ldots,\sigma_n(\run(\vec\sigma,s)[\ldots t]))\), for all \(t\in \Nat\). \end{itemize} We write \(\run(\vec\sigma)\) if \(s=s^0\). Note that viewing strategies as functions \(\sigma_i\colon\St^+\to\Ac_i\) is problematic with respect to computational analysis, because the domain of such a function is infinite. To be able to answer questions relating to (for example) computational complexity, we need a finite representation for strategies that must operate over an infinite number of rounds. For this purpose, we follow standard practice in the concurrent game's literature, and model strategies as \textbf{finite state machines with output} (transducers)~\cite{Gutierrez2015,Gutierrez2017a}. We note that, for players with LTL goals, such strategies are sufficient: no more powerful model of strategies is necessary~\cite{Gutierrez2015,Gutierrez2017a}. Formally, a strategy for player~\(i\) is a structure \[\sigma_i = (Q_i, q_i^0, \strtransf_i, \stroutf_i)\] where: \begin{itemize} \item \(Q_i\) is a finite, non-empty set of \textbf{strategy states}; \item \(q^0_i \in Q_i\) is the \textbf{initial} strategy state; \item \(\strtransf_i : Q_i\times \St \to Q_i\) is a \textbf{transition function}; and \item \(\stroutf_i : Q_i \to \Ac_i\) is an \textbf{output function}. \end{itemize} A machine strategy works as follows: it begins in the initial state, \(q_i^0\), and chooses an action based on this, \(\stroutf(q_i^0)\). The state of the game then follows the transition function into a new state. Based on this new (game) state, and the state of the strategy, the strategy then also moves into a new state, based on the strategy transition function. This process repeats, yielding a new action at each timestep. It is easy to see that a strategy profile consisting solely of machine strategies will be eventually periodic (i.e., it will eventually enter a configuration that it was in previously, at which point it will start to repeat its behaviour). Sometimes, we find we can use an even simpler model of strategies: \textbf{memoryless strategies}. A memoryless strategy \(\sigma_i\colon\St\to\Ac_i\) simply chooses an action based on the current state of the environment. Whilst memoryless strategies are not nearly as expressive as finite-memory strategies, they are still of great importance, owing to their conceptual simplicity, their ease of implementation, and the fact that in many types of game (such as two-player mean-payoff games~\cite{Ehrenfeucht1979}, and parity games~\cite{Emerson1991}), memoryless strategies are sufficient to act optimally.\footnote{For a characterisation of the types of games where memoryless strategies are sufficient for one or both players to play optimally, refer to~\cite{Gimbert2005,Kopczynski2006}.} \subsection{Logics} Broadly, we need to appeal to certain logics for two main reasons: expressing the preferences of agents, and reasoning about those agents and their preferences. For this, we will use three logics throughout this paper: \emph{Linear Temporal Logic} (LTL)~\cite{Pnueli77}, \emph{Alternating-Time Temporal Logic} (\atlstar)~\cite{Alur2002}, and \emph{Strategy Logic} (SL)~\cite{MogaveroMPV14}. We use LTL for modelling agent preferences, and \atlstar and SL for forming logical characterisations of the game-theoretic concepts we will study. Whilst it can be seen more formally from the syntax and semantics presented below, we note here that LTL can be seen as a subset of \atlstar, which can be seen as a subset of SL. \subsubsection{Linear Temporal Logic} LTL is a widely used logic for reasoning about the behaviours of concurrent systems, and while we present the key concepts here, we refer the reader to any standard temporal logic textbook for details (\emph{e.g.},~\cite{Baier2008}). Let \(\AP\) be a set of propositional variables. Then the syntax of an LTL formula \(\varphi\) is given by the following grammar: \begin{equation*} \varphi := p \mid \lnot \varphi \mid \varphi \lor \varphi \mid \temporalNext \varphi \mid \varphi \temporalUntil \varphi, \end{equation*} where \(p \in \AP\). The set of all LTL formulae over a set of propositional variables \(\AP\) is denoted \(\mathcal{L}(\AP)\). If \(\AP\) is clear from the context, we may instead just write \(\mathcal{L}\). We also introduce the traditional propositional abbreviations, \(\cdot \land \cdot\), \(\cdot \rightarrow \cdot\), \(\cdot \leftrightarrow \cdot\), defined in the usual way, as well as the abbreviations \(\temporalEventually \varphi\) for \(\true \temporalUntil \varphi\), and \(\temporalAlways \varphi\) for \(\lnot \temporalEventually \lnot \varphi\). Typically, in the context of model checking, the semantics of LTL formulae are defined relative to labelled transition systems~\cite{Keller1976}, or Kripke structures~\cite{Kripke1963}, but for our purposes, we define them with respect to the infinite runs generated by concurrent game structures. Formally, let \(M\) be a concurrent game structure, and let \(\lambda : \St \to \powerset{\AP}\) be a labelling function, mapping states to sets of propositional variables. Then given an infinite run \(\rho \in \St^\omega\) and an LTL formula \(\varphi\), we say that \((M, \lambda, \rho)\) \emph{models} \(\varphi\) and write \((M, \lambda, \rho) \models \varphi\) according to the following inductive definition: \begin{itemize} \item For \(p \in \AP\), we have \((M, \lambda, \rho) \models p\) if and only if \(p \in \lambda(\rho[0])\); \item For \(\varphi \in \mathcal{L}(\AP)\), we have \((M, \lambda, \rho) \models \lnot \varphi\) if and only if it is not the case that \((M, \lambda, \rho) \models \varphi\); \item For \(\varphi, \psi \in \mathcal{L}(\AP)\), we have \((M, \lambda, \rho) \models \varphi \land \psi\) if and only if we have both \((M, \lambda, \rho) \models \varphi\) and \((M, \lambda, \rho) \models \psi\); \item For \(\varphi \in \mathcal{L}(\AP)\), we have \((M, \lambda, \rho) \models \temporalNext \varphi\) if and only if \((M, \lambda, \rho[1\ldots]) \models \varphi\); \item For \(\varphi, \psi \in \mathcal{L}(\AP)\), we have \((M, \lambda, \rho) \models \varphi \temporalUntil \psi\) if and only if there exists some \(j \geq 0\) such that \((M, \lambda, \rho[j\ldots]) \models \psi\) and for all \(i < j\) we have \((M, \lambda, \rho[i\ldots]) \models \varphi\). \end{itemize} For notational convenience, we will write \((G, \run) \models \varphi\) as shorthand for \((M, \lambda, \run) \models \varphi\), and if \(G\) is apparent from the context, we will just write \(\run \models \varphi\). \subsubsection{Alternating-Time Temporal Logic} \atlstar is an extension of the branching-time temporal logic CTL\textsuperscript{*}~\cite{Emerson1986} --- we shall use this logic in our proofs to reason about coalitions of agents more effectively. The key operator in \atlstar is the cooperation modality \(\ATLEpath{C}\phi\), which asserts that the coalition \(C\) has the power to enforce the temporal property \(\phi\); more specifically, that there is a collection of strategies for \(C\) such that if \(C\) follow these strategies, then no matter what other agents do, \(\phi\) is guaranteed to be made true. Given a set of atomic propositions~\(\AP\) and a set of agents~\(\Ag\), the language of ATL\textsuperscript{*} formulae is defined by the following grammar: \begin{align*} \varphi ::= & p \mid \lnot \varphi \mid \varphi \lor \varphi \mid \ATLEpath{C} \psi \\ \psi ::= & \varphi \mid \lnot \psi \mid \psi \lor \psi \mid \temporalNext \psi \mid \psi\temporalUntil \psi \end{align*} where \(p\in\AP\) and \(C\subseteq\Ag\). We call the formulae produced by \(\varphi\) in the above grammar \textbf{\atlstar state formulae}, and denote the set that contains them by \(\mathcal{L}_s(\AP, \Ag)\) and those generated by \(\psi\) in the above grammar \textbf{\atlstar path formulae}, denoted by \(\mathcal{L}_p(\AP, \Ag)\). (They are given these names as their semantics are defined relative to states and paths respectively.) We emphasise that only \atlstar state formulae are well-formed \atlstar formulae, and thus, we write \(\mathcal{L}(\AP, \Ag)\) as shorthand for \(\mathcal{L}_s(\AP, \Ag)\). When either \(\AP\) or \(\Ag\), or both, are known, we may omit them. With \(\AP'\subseteq\AP\), we may write \(\varphi|_{\AP'}\) if \(\varphi\in\loglang(\AP',\Ag)\) for some set of agents \(\Ag\). In addition to the abbreviations used for LTL formulae as described above, we also use the shorthands \(\Epath\varphi\) for \(\ATLEpath{\Ag}\varphi\), \(\Apath\varphi\) for \(\ATLEpath\emptyset\varphi\), and \(\ATLApath{C}\varphi\) for \(\neg\ATLEpath{C}\neg\varphi\). Finally, we define the \emph{size} of an \atlstar formulae \(\varphi\) as its number of subformulae. To define the semantics of \atlstar formulae, we actually need to define two semantic relations, \(\models_s\) (for state formulae) and \(\models_p\) (for path formulae). So, let \(M\) be some concurrent game structure, along with a labelling function \(\lambda : \St \to \powerset{\AP}\). Then given a state, \(s \in St\) and an \atlstar formula \(\varphi\), we say that \((M, \lambda, s)\) \emph{models} \(\varphi\) and write \((M, \lambda, s) \models \varphi\) according to the following inductive definition: \begin{itemize} \item For \(\varphi \in \mathcal{L}_s(\AP, \Ag)\), we have \((M, \lambda, s) \models \varphi\) if and only if \((M, \lambda, s) \models_s \varphi\); \item For operators that lie in LTL, their inductive semantics are the same as in LTL; \item For \(\varphi \in \mathcal{L}_p(\AP, \Ag)\), we have \((M, \lambda, s) \models_s \ATLEpath{C} \varphi\) if and only if there is some strategy vector \(\vec{\sigma}_C\) for the coalition \(C\), such that for all complementary strategy profiles, \(\vec{\sigma}_{\Ag \setminus C}\), it is the case that \((M, \lambda, \rho((\vec{\sigma}_{\Ag \setminus C}, \vec{\sigma}_C), s)) \models_p \varphi\) holds; \item For \(\varphi \in \mathcal{L}_s(\AP, \Ag)\), we have \((M, \lambda, \rho) \models_p \varphi\) if and only if \((M, \lambda, \rho[0]) \models_s \varphi\); \end{itemize} Where the concurrent game and labelling function are clear from context, we will simply write \(s\models\phi\). Given a concurrent game structure \(M\) and a labelling function \(\lambda : \St \to \powerset{\AP}\), we say that \(\varphi\) is \textbf{satisfiable} if there exists some state \(s \in \St\) such that \((M, \lambda, s) \models \varphi\). Moreover, we say that \(\varphi\) is \textbf{equivalent} to \(\psi\) if for all states \(s \in \St\) we have \((M, \lambda, s) \models \varphi\) if and only if \((M, \lambda, s) \models \psi\). Note that LTL can been seen as the sublogic of \atlstar given by all formulae \(\Apath \varphi\), where the formula \(\varphi\) does not contain the ``coalition'' quantifiers \(\ATLEpath{C}\) or \(\ATLApath{C}\). Thus \atlstar is a particularly effective tool for reasoning about the LTL properties that coalitions can achieve, and this is exactly how we will use it when we come to prove the complexity bounds of our decision problems. Specifically, if we have an LTL game \(G\), we can write \((G, s) \models \varphi\) as shorthand for \((M, \lambda, s) \models \varphi\), and furthermore, if the game \(G\) is apparent from the context, we shall drop it and simply write \(s \models \varphi\) instead. The relevant decision problem here is the \textbf{model checking problem for \atlstar}, which we utilise heavily in the following section: \begin{quote} \underline{\textsc{\atlstar Model Checking}}:\\ \emph{Given}: Concurrent game \(M\), labelling function \(\lambda\), state \(s \in \St\), and \atlstar{} formula \(\varphi\).\\ \emph{Question}: Is it the case that \((M,\lambda,s) \models \varphi\)? \end{quote} This problem is \textsc{2ExpTime}-complete~\cite{Alur2002} for games with two or more players, and \textsc{PSpace}-complete for one-player games (as then, the problem reduces to LTL model checking)~\cite{SistlaC85}. \subsubsection{Strategy Logic} Whilst \atlstar\ is a powerful tool for reasoning about coalitions, it famously cannot represent certain game-theoretic concepts, such as the Nash equilibrium~\cite{MogaveroMPV14} --- explicit quantification over strategies is required to do this. For our purposes, we will be able to make most of the necessary logical characterisations using \atlstar, but when we come to the \emph{strong core} in Section~\ref{secn:strong-core}, we too will also need the ability to reason explicitly about strategies. SL extends LTL with two \textbf{strategy quantifiers}, \(\EExs{x}\) and \(\AAll{x}\), and an \textbf{agent binding} operator \((i, x)\), where \(i\) is an agent and \(x\) is a variable. These operators can be read as ``\emph{there exists a strategy \(x\)}'', ``\emph{for every strategy \(x\)}'', and ``\emph{bind agent \(i\) to the strategy associated with variable \(x\)}'', respectively. Formally, SL formulae are inductively built from a set of propositions \(\AP\), variables \(\VarSet\), and agents \(\Ag\), using the following grammar, where \(p \in \AP\), \(x \in \VarSet\), and \(i \in \Ag\): \begin{equation*} \varphi ::= p \mid \neg \varphi \mid \varphi \wedge \varphi \mid \temporalNext \varphi \mid \varphi \temporalUntil \varphi \mid \EExs{x} \varphi \mid \AAll{x} \varphi \mid (i, x) \varphi. \end{equation*} We can now present the semantics of SL\@. First, denoting the set of all strategies by \(\StrSet\), we define an assignment to be a partial function that maps variables and agents to strategies, \(\asgFun \in \AsgSet = (\VarSet \cup \Ag) \rightharpoonup \StrSet\). We then use the notation \(\asgFun[i \mapsto f] / \asgFun[x \mapsto f]\) to refer to the assignment which equals \(f\) on \(i/x\), and agrees with \(\asgFun\) on every other input on which it is defined. Then, given a concurrent game structure~\(M\), for all SL formulae \(\varphi\), states \(s \in \St\) in \(M\), and assignments \(\asgFun \in \AsgSet\), the relation \(M, \asgFun, s \models \varphi\) is defined as follows: \begin{enumerate} \item For LTL formulae embedded in SL, their inductive semantics are the same as in LTL\@; \item\label{def:sl(semantics:qnt)} For all formulae \(\varphi\) and variables \(x \in \VarSet\) we have: \begin{enumerate} \item\label{def:sl(semantics:eqnt)} \(M, \asgFun, s \models \EExs{x} \varphi\) if and only if there exists some \(\strFun \in \StrSet\) such that \(M,\asgFun[x \mapsto \strFun], s \models \varphi\); \item\label{def:sl(semantics:aqnt)} \(M, \asgFun, s \models \AAll{x} \varphi\) if and only if for all \(\strFun \in \StrSet\) we have \(M,\asgFun[x \mapsto \strFun], s \models \varphi\); \end{enumerate} \item\label{def:sl(semantics:bnd)} For every agent \(i \in \Ag\) and variable \(x \in \VarSet\), we have \(\ M, \asgFun, s \models (i, x) \varphi \ \) if and only if\(\ M, \asgFun[i \mapsto \asgFun(x)], s \models \varphi \ \). \end{enumerate} For a sentence \(\varphi\), that is, a formula with no free variables and agents~\cite{MogaveroMPV14}, we say that \(M\) satisfies \(\varphi\), and write \(M \models \varphi\) in that case, if \(M, \emptyset, s^0 \models \varphi\), where \(\emptyset\) is the empty assignment. We use the following abbreviations: \(\SLE{i}\varphi\) for \(\EExs{x}(i,x)\varphi\) and \(\SLA{i}\varphi\) for \(\AAll{x}(i,x)\varphi\), which can be intuitively understood as ``there is a strategy for agent~\(i\) such that \(\varphi\) holds'' and ``\(\varphi\) holds, for all strategies of agent~\(i\)'', respectively. We extend this notation to sets of players and write, for instance, \(\SLE{C}\varphi\) instead of \(\SLE{i}\ldots\SLE{j}\varphi\), where \(C = \set{i,\ldots,j}\), and similarly for the universal quantifier operator. Then, with \(\SLE{C}\varphi\) we mean that \emph{``coalition~\(C\) has a joint strategy such that \(\varphi\) holds.''} \subsection{LTL Games} We can now define \emph{LTL games}~\cite{Pnueli1989,Fisman2010,Gutierrez2015}. The key idea in an LTL game is that each player \(i\) is associated with an LTL goal formula \(\gamma_i\), which it desires to see satisfied. Formally, an LTL game, \(G\), is given by a structure \begin{equation*} G=(M, \AP, \lambda, {(\gamma_i)}_{i \in \Ag}), \end{equation*} where \(M\) is a concurrent game structure, \(\AP\) is a set of atomic propositions, \(\lambda : \St \to \powerset{\AP}\) is a labelling function, and for each \(i \in \Ag\), \(\gamma_i\) is an LTL formula over \(\AP\) that defines that player's preference relation over runs. We now describe how temporal goal formulae \(\gamma_i\) induce \textbf{preference relations} \(\succeq_i\) over runs. First, given that under a provided run, LTL goals are either satisfied or not, we can identify a set of ``winners'' and a set of ``losers'' for that run. Formally, let \(\Winners(\run)\) denote the set of players that get their goal achieved under \(\run\), and let \(\Losers(\run)\) denote the set of players that do not: \begin{align*} \Winners(\run) & = \{i \in \Ag \mid \run \models \gamma_i\} \\ \Losers(\run) & = \Ag \setminus \Winners(\run). \end{align*} We can now use winners and losers to define the preference relations of our agents. Intuitively, agent \(i\) will always strictly prefer a run that satisfies its goal \(\gamma_i\) over one that does not, but is indifferent between two runs that satisfy its goal, and is indifferent between two runs that fail to satisfy its goal. Formally, for two runs \(\run, \run'\), and a player \(i\), we have \(\run \succeq_i \run'\) if and only if \(i\) is a winner under \(\run\) (note the lack of dependence of \(\run^\prime\)) or \(i\) is a loser under both \(\run\) and \(\run^\prime\). Put alternatively, we have \(\run \succeq_i \run'\) if and only if \((M, \lambda, \run') \models \gamma_i\) implies that \((M, \lambda, \run) \models \gamma_i\). Strict preference relations \(\succ_i\) are defined in the standard way: \(\run \succ_i \run'\) if and only if \(\run \succeq_i \run'\) but not \(\run' \succeq_i \run\). We leave the reader to verify, first, that this definition matches our informal explanation of preferences above, and second, that the relations \(\succeq_i\) so defined are indeed preference relations (\emph{i.e.}, the binary relation \(\succeq_i\) is reflexive, complete, and transitive). Finally, we note that we use \(\mathcal{L}\) in two different senses in this paper: to denote the languages of various logics, and to denote the set of losers of a run. As these generally appear in different contexts, and take different inputs, there should be no ambiguity as to what interpretation should be taken. With preference relations defined, we can introduce game-theoretic solution concepts. For now, we will stick with non-cooperative solution concepts. First, a strategy profile \(\vec{\sigma}\) is said to be a \textbf{Nash equilibrium} if there is no player \(i \in \Ag\) and strategy \(\sigma_i'\) for \(i\) such that we have \((\vec{\sigma}_{-i}, \sigma_i') \succ_i \vec{\sigma}\). That is, \(\vec{\sigma}\) is a Nash equilibrium if no player can benefit by unilaterally changing its strategy (assuming all other players leave their strategies unchanged). Let \(\NE(G)\) denote the set of Nash equilibria of the game \(G\). We emphasise that Nash equilibrium only considers \emph{unilateral} deviations, \emph{i.e.}, deviations by individual players. Compare this to the notion of a \textbf{strong Nash equilibrium}~\cite{Aumann1959,Aumann1960}: a strategy profile \(\vec{\sigma}\) is a strong Nash equilibrium if there is no coalition \(C\) and no strategy \(\sigma_C'\) such that for all \(i \in C\) we have \((\vec{\sigma}_{-i}, \sigma_i') \succ_i \vec{\sigma}\). Thus, strong Nash equilibria are those strategy profiles that are immune to multilateral deviations. Finally, we mention in passing the notion of the \emph{coalition-proof Nash equilibrium}~\cite{Bernheim1987a,Bernheim1987b}. Whilst we refrain from giving a formal definition here, informally, this can be thought of as capturing the outcomes that would arise when players have unlimited, but non-binding, pre-play communication. \section{Cooperative Rational Verification}\label{secn:core} \subsection{Defining the Core} We want to define counterparts of the rational verification problems \textsc{E-Nash} and \textsc{A-Nash}, as studied in~\cite{Gutierrez2015,Gutierrez2017a}, but for cooperative settings. For this, we need a version of the \core\ for our concurrent game setting. The \core\ is probably the best-known solution concept in cooperative game theory. Like Nash equilibrium in the non-cooperative setting, the \core\ defines a notion of stability for games, but whereas Nash equilibrium only requires that an outcome is stable in the sense that it admits no \emph{individual} beneficial deviations, the \core\ requires that an outcome admits no beneficial deviations by \emph{coalitions}. In the ``standard'' model of cooperative games, (cooperative games with transferable utility in characteristic function form~\cite{Chalkiadakis2011}), this intuition is easily formalised, but in concurrent games, there is an important difficulty, as follows. Suppose a coalition of players \(C\subseteq \Ag\) are contemplating participating in a strategy profile \(\vec{\sigma}\), and in particular, are attempting to determine whether they have a cooperative beneficial deviation from \(\vec{\sigma}\). Now, as they consider possible beneficial deviations --- collective strategies \(\vec{\sigma}_{C} \in \prod_{i \in C} \Sigma_i\) --- \emph{what assumptions should \(C\) make about the behaviour of the remaining players \(\Ag \setminus C\)?} In particular, assuming that the remaining players will not respond, by potentially altering their strategy, is implausible in a cooperative setting.\footnote{This is the kind of behaviour that one has to assume to define strong Nash equilibrium, a non-cooperative solution concept.} Rational players who can cooperate will respond to the deviation rationally and in a cooperative way against the players in \(C\). And, crucially, whether or not \(C\)'s putative deviation is in fact beneficial may well depend upon the behaviour of the remaining players. In game theoretic terms, our concurrent game setting is subject to \emph{externalities}: the performance of the coalition \(C\) depends not just on the makeup of the coalition \(C\), but on the behaviour of the remaining players. It is well-known that cooperative solution concepts are difficult to define in the presence of externalities~\cite{Chalkiadakis2011}. In particular, there is no universally accepted definition of the \core\ for games with externalities. Our first definition of the \core\ for concurrent games, therefore, captures \emph{worst case} (maximin) reasoning. Thus, when coalition \(C\) is contemplating a deviation, it requires that this deviation will be beneficial \emph{no matter what the remaining players do}. This idea has been explored in the concept of the \(\alpha\)-\core\ in cooperative games~\cite{uyanik2015nonemptiness}. To make it formal, we need to formalise the notion of a beneficial deviation. Let \(\vec{\sigma}\) be a strategy profile and let \(C\) be a coalition; then we say that \(\vec{\sigma}_{C}'\) is a beneficial deviation from \(\vec{\sigma}\) if both: \begin{enumerate} \item \(C \subseteq \Losers(\rho(\vec{\sigma}))\); and \item For all \(\vec{\sigma'}_{-C}\), we have \(C \subseteq \Winners(\rho(\vec{\sigma}_{C}',\vec{\sigma}_{-C}'))\). \end{enumerate} In other words, \(\vec{\sigma}_{C}'\) is said to be a beneficial deviation from \(\vec{\sigma}\) if the players in \(C\) would be better off playing \(\vec{\sigma}_{C}'\), rather than their respective strategies in \(\vec{\sigma}\), \emph{no matter what strategies the players outside \(C\) play}. The \core\ of a game \(G\), denoted \(\coreset{G}\), is then defined to be the set of outcomes of \(G\) that no coalition has a beneficial deviation from. \begin{example}\label{ex:poorne} Consider the following game, which illustrates how cooperative and non-cooperative solution concepts differ: it contains a poor quality Nash equilibrium that is not in the \core\@. The ability to cooperate makes it possible for agents to avoid the undesirable equilibrium. The game contains two players, \(\Ag = \set{1,2}\) and two variables \(\AP = \set{p,q}\), with player~\(1\)'s action set being \(\Ac_1 = \set{pt,pf}\) and player~2's action set being \(\Ac_2 = \set{qt,qf}\), satisfying that, for every reachable state, if player~1/2 plays \(pt/qt\) then \(p/q\) will hold, and will not hold if \(pf/qf\) is played instead (\emph{i.e.}, player~1 ``controls'' the value of \(p\) and player~\(2\) the value of \(q\)). Their goals are identical (and so the game is a coordination game): \(\gamma_1 = \gamma_2 = \temporalAlways(p \wedge q)\). Now, consider the strategy profile \(\vec{\sigma}\) in which both players simply fix their respective variables to be false forever (\emph{i.e.}, play \(pf\) and \(qf\) forever). Neither player will have their goal achieved by such a strategy profile. However, the strategy profile forms a Nash equilibrium, because unilateral deviation cannot improve the situation: neither player has an alternative strategy which would make them better off. In fact, there are infinitely many such poor-quality Nash equilibria in this game, where neither player gets their goal achieved. However, this strategy profile is \emph{not} in the \core, because there is a cooperative beneficial deviation to the strategy profile in which both players fix their variables to be true forever (\emph{i.e.}, play \(pt\) and \(qt\) forever). And, in fact, in every strategy profile which lies in the core, both players get their goal achieved. Thus, using the core instead of Nash equilibrium eliminates poor quality equilibria from the game, leading to socially more desirable outcomes. \end{example} Before proceeding, we note that additional variations of the core have been proposed in the game theory literature on cooperative games with externalities, in particular, the \(\beta\)-core and \(\gamma\)-core. The \(\beta\)-core assumes that players outside a deviating coalition will choose strategies to maximally punish the deviating coalition, and that members of a deviating coalition will then collectively best respond to these punishment strategies. Thus, the \(\beta\)-core assumes a \emph{minimax} choice on behalf of the deviating coalition. In contrast, the \(\gamma\)-core assumes that players outside a deviating coalition will form singleton coalitions, with each non-deviator choosing individual strategies in a best response to the deviating coalition strategies. We note that these solution concepts are much less studied than the \(\alpha\)-core, and are arguably less natural and less well-motivated. We, therefore, leave them for future study (see also comments in the Related Work Section~\ref{secn:conc}). \subsection{Decision Problems} In rational verification~\cite{Gutierrez2015,Gutierrez2017a,WooldridgeGHMPT16} we are mainly interested in checking which temporal logic properties are satisfied in a given solution concept of a game; typically, in the non-cooperative setting, we study what LTL formulae hold in the Nash equilibria \(\NE(G)\) of a game \(G\). In the cooperative setting, as introduced here, we are instead interested in what properties hold in the \core\ of the game. The two main decision problems in rational verification are checking whether a temporal logic formula is satisfied by some/every stable strategy profile of the game. For the core, these problems are defined as follows---\emph{cf.}~\cite{Gutierrez2015,WooldridgeGHMPT16,Gutierrez2017a}. \begin{quote} \underline{\ecore}:\\ \emph{Given}: Game \(G\), LTL formula \(\varphi\).\\ \emph{Question}: Is it the case that \(\exists \vec{\sigma} \in \coreset{G} : \run(\vec{\sigma})\models\varphi\)? \end{quote} \begin{quote} \underline{\acore}:\\ \emph{Given}: Game \(G\), LTL formula \(\varphi\).\\ \emph{Question}: Is it the case that \(\forall \vec{\sigma} \in \coreset{G} : \run(\vec{\sigma})\models\varphi\)? \end{quote} One decision problem considered in the non-cooperative setting is the \textsc{Non-Emptiness} problem, which asks if the set of Nash equilibria of a given game is non-empty. However, as we shall show momentarily, the core of the game is always non-empty, so it does not make sense to consider the corresponding problem in the cooperative setting. We will also be interested in two additional decision problems: checking whether a given strategy profile is in the \core\ (\cmembership), and checking whether a given strategy vector for a coalition is a beneficial deviation with respect to a strategy profile (\bdeviation). Formally: \begin{quote} \underline{\cmembership}:\\ \emph{Given}: Game \(G\), strategy profile \(\vec{\sigma}\).\\ \emph{Question}: Is it the case that \(\vec{\sigma} \in \coreset{G}\)? \end{quote} \begin{quote} \underline{\bdeviation}:\\ \emph{Given}: Game \(G\), strategy profile \(\vec{\sigma}\), coalition \(C\), and deviation \(\vec{\sigma}_{C}'\).\\ \emph{Question}: Is \(\vec{\sigma}_{C}'\) a beneficial deviation from \(\vec{\sigma}\)? \end{quote} In what follows it is helpful to use the concept of a \textbf{fulfilled coalition}: a coalition is fulfilled if they are able to achieve their goals \emph{irrespective of what other players do}; that is, they have a collective strategy that will guarantee their goals are achieved. Formally, we say that a coalition of players~\(C\) is fulfilled if there is a joint strategy~\(\vec{\sigma}_C\) for~\(C\subseteq \Ag\) such that for all joint strategies \(\vec{\sigma}_{-C}\) for~\(\Ag\setminus C\) we have \begin{equation*} \run((\vec{\sigma}_C,\vec{\sigma}_{-C}))\models\bigwedge_{i\in C}\gamma_i. \end{equation*} Thus, a fulfilled coalition has a winning strategy to collectively achieve their goals. Since we are considering cooperative games, the question is whether such a coalition will form. We have the following: \begin{lemma}\label{lem:fc} \begin{enumerate} \item There are games \(G\), with strategy profiles \(\vec{\sigma}\in\coreset{G}\), containing fulfilled coalitions \(C\subseteq\Ag\) such that \(C\not\subseteq\Winners(\rho(\vec{\sigma}))\); \item For every game \(G\), strategy profile \(\vec{\sigma}\in\coreset{G}\), and fulfilled coalition \(C\), we have that \(C\cap\Winners(\rho(\vec{\sigma}))\neq\emptyset\); \item For every game~\(G\) and fulfilled coalition~\(C\), then there is~\(\vec{\sigma}\in\coreset{G}\) such that \(C\subseteq\Winners(\rho(\vec{\sigma}))\). \end{enumerate} \end{lemma} Informally, the first part of the lemma says that the fact that a coalition is fulfilled does not mean that every player in such a coalition is guaranteed to get its goal achieved under an arbitrary member of the core. However, the second part of the lemma says that in any member of the core, some agents of every fulfilled coalition must get their goals achieved. And, the third part of the lemma says that for every fulfilled coalition the \core\ contains a strategy profile in which every player of this coalition gets its goal achieved. \begin{proof}[Proof of~\ref{lem:fc}.1] Consider a game with three states, \(\start, \up, \down\), and three players, \(\{1,2,3\}\). Let \(\start\) be the start state of the game, and assume that players \(2\) and \(3\) have only one action available to them, and player \(1\) has two actions, \(\HEADS\) and \(\TAILS\). As such, the transition function can be defined solely in terms of player \(1\)'s action, and we let \(\transf(\start, \HEADS) = \up\) and \(\transf(\start, \TAILS) = \down\). The remaining two states are sink states, with \(\transf(\up, \HEADS) = \transf(\up, \TAILS) = \up\) and \(\transf(\down, \HEADS) = \transf(\down, \TAILS) = \down\). Further suppose we have \(\AP = \{p,q\} \), and that \(\lambda(\start) = \emptyset\), \(\lambda(\up) = \{p\}\) and \(\lambda(\down) = \{q\} \). Finally, let the goals of the players be as follows: \(\gamma_1 = \true\), \(\gamma_2 = \ltlX \ltlG p\), and \(\gamma_3 = \ltlX \ltlG q\). As the game will always end in one of two sink states after the first action, we can identify strategies simply by the first action of player 1: \(\HEADS\) or \(\TAILS\). Now, note that the coalition \(\{1,3\}\) is a fulfilled coalition: if player 1 plays \(\TAILS\), then the game will end up in the state \(\down\), and will permanently remain there, satisfying player 1's and player 3's goals. However, note that the strategy profile where player 1 plays \(\HEADS\) is a member of the core: player 1's and player 2's goals are satisfied, and as player 3 only has one action, they cannot deviate to get their goal achieved. Thus, we have a fulfilled coalition and a member of the core, such that the fulfilled coalition is not a subset of the winners of the member of the core. Note the same argument could have been applied the other way around --- \(\{1,2\}\) is a fulfilled coalition, and \(\TAILS\) is a member of the core whose winners are not a superset of \(\{1,2\}\). \end{proof} \begin{proof}[Proof of~\ref{lem:fc}.2] Let \(G\) be a game, \(\vec{\sigma}\) be a strategy profile that lies in the core, and \(C\) a fulfilled coalition. For the sake of a contradiction, further suppose that the intersection of \(C\) and \(\Winners(\rho(\vec{\sigma}))\) is empty. This means that for each \(i \in C\), we have \(\rho(\vec{\sigma}) \not \models \gamma_i\). But as \(C\) is a fulfilled coalition, there exists a strategy \(\vec{\sigma}_C^\prime\), such that for all counterstrategies \(\vec{\sigma}_{-C}\), we have \(\run((\vec{\sigma}_C,\vec{\sigma}_{-C}))\models\bigwedge_{i\in C}\gamma_i\). Naturally, this implies that \(\run((\vec{\sigma}_C,\vec{\sigma}_{-C}))\models\gamma_i\) for all \(i \in C\). But then this implies that \(\vec{\sigma}_C^\prime\) is a beneficial deviation for \(C\), contradicting the fact that \(\vec{\sigma}\) is a member of the core. Thus, we conclude that \(C\) and \(\Winners(\rho(\vec{\sigma}))\) have non-empty intersection. \end{proof} \begin{proof}[Proof of~\ref{lem:fc}.3] Let \(G\) be a game, and \(C\) be a fulfilled coalition. Let \(\vec{\sigma}^1 =(\vec{\sigma}_C, \vec{\sigma}_{-C})\) be any strategy profile under which \(C\) are fulfilled (that is, every member of \(C\) achieves their goal regardless of what the countercoalition does). If \(\vec{\sigma}^1\) is a member of the core, then we are done. If not, then there exists some coalition \(D \subseteq \Ag \setminus C\) with a beneficial deviation, \(\vec{\sigma}_D^\prime\). Then under the strategy \(\vec{\sigma}^2 = (\vec{\sigma}_C, \vec{\sigma}_D^\prime, \vec{\sigma}_{-(C \cup D)})\), every player in \(C\) gets their goal achieved. As before, if \(\vec{\sigma}^2\) is a member of the core, then we are done. If not, we can repeat this process, yielding a sequence of strategies, \(\vec{\sigma}^1, \vec{\sigma}^2, \vec{\sigma}^3 \ldots\). As the losers of the successive strategy profiles gets strictly smaller each time, this process can only continue a finite number of times. By construction, the final member of the sequence will model the goal of every player in \(C\), and will have no beneficial deviations, making it a member of the core. Thus, we see that there exists some strategy profile in the core such that \(C\) is a subset of the winners of the strategy profile. \end{proof} In fact, our proof of~\ref{lem:fc}.3 can be modified to give us a stronger result, namely that the core is always non-empty, a highly desirable game-theoretic property, as it ensures the existence of stable strategy profiles for every game, making them rationally implementable in practice. This contrasts with the conventional formulation of the core in transferable utility games~\cite{Chalkiadakis2011}. \begin{theorem}\label{thm:emptiness} For every game~\(G\), we have \(\coreset{G}\neq\emptyset\). \end{theorem} \begin{proof} Identical to the proof of Lemma~\ref{lem:fc}.3, but instead of setting \(\vec{\sigma}^1\) to be a strategy profile under which some coalition can be fulfilled, let it be any arbitrary strategy profile, and continue as before. \end{proof} As fulfilled coalitions can help us understand the coalition formation power in a game, we will also be interested in the following decision problem about coalitions. \begin{quote} \underline{\fcoalition}:\\ \emph{Given}: Game \(G\), coalition \(C\subseteq\Ag\).\\ \emph{Question}: Is \(C\) a fulfilled coalition of~\(G\)? \end{quote} In the next section, we will investigate these decision problems, as well as some model-theoretic properties of the \core. \subsection{Characterising the Core}\label{secn:results-core1} In this section we will study the complexity of the decision problems introduced in the previous section, and will establish some other properties of the \core. We have already seen in Theorem~\ref{thm:emptiness} that the core is always non-empty, and we shall go on to prove that the satisfaction of an LTL property on some/every outcome in the \core\ is bisimulation-invariant~\cite{Hennessy1985}. These two results sharply contrast with the rational verification problem in the non-cooperative setting: in these, the set of Nash equilibria of a game is not guaranteed to always be non-empty~\cite{Gutierrez2015}, nor does bisimulation-invariance hold in the general case~\cite{Gutierrez2017b}. The first of our own decision problems we will consider is \fcoalition, which we solve in the general case through a logical characterisation using \atlstar. \begin{theorem}\label{thm:fc} \fcoalition\ is \textsc{PSpace}-complete for one-player games, and it is \textsc{2ExpTime}-complete for games with more than one player. \end{theorem} \begin{proof} For membership we observe that given a game \(G=(M,\gamma_1,\ldots,\gamma_n)\) and a coalition~\(C\subseteq\Ag\), it is the case that~\(C\) is fulfilled if and only if \(s^0\models\ATLEpath{C}\bigwedge_{i\in C}\gamma_i\) holds. By appealing to \textsc{\text{ATL}\(^*\) Model Checking}, the two upper bounds immediately follow. For the lower bounds, we can reduce the problem of checking for the existence of a winning strategy in a two-player game with LTL goals as defined in~\cite{Alur2004} for \textsc{2ExpTime}-hardness and existential LTL model checking for \textsc{PSpace}-hardness~\cite{SistlaC85}. Note that, as such, \fcoalition\ with more than one player is \textsc{2ExpTime}-hard even for two-player zero-sum games, i.e., for games with $\gamma_1 = \neg\gamma_2$. \end{proof} Fulfilled coalitions give an indication of which stable coalitions may form, but are insufficient to characterise the \core, and therefore, to check \ecore\ and \acore\ properties of a multi-agent system. To do this, we adopt a different strategy and show that these two decision problems are, in general, also \textsc{2ExpTime}-complete. \begin{theorem}\label{thm:eacore} \ecore\ and \acore\ are \textsc{PSpace}-complete for one-player games and \textsc{2ExpTime}-complete for games with more than one player. \end{theorem} \begin{proof} Let us consider \ecore\ first. For membership we observe that given a game \(G\) and an LTL formula~\(\varphi\), it is the case that \((G,\varphi)\in\ecore\) if and only if \(s^0 \models\varphi_{\ecore}(G,\varphi)\) holds, where \(\varphi_{\ecore}(G,\varphi)\) is the following \atlstar\ formula: \begin{equation*} \bigvee_{W\subseteq\Ag} \left( \ATLEpath{\Ag} \left(\varphi\wedge \bigwedge_{i\in W}\gamma_i \wedge \bigwedge_{j\in \Ag\setminus W} \neg\gamma_j\right) \wedge \bigwedge_{L\subseteq\Ag\setminus W}\ATLApath{L}\bigvee_{j\in L}\neg\gamma_j \right) \end{equation*} which states that there is a path in \(G\) that satisfies \(\varphi\) as well as the goals of a set of players \(W\) (the ``winners''), and that for every subset of players \(L\) that do not get their goals achieved in such a path (the ``losers''), it is not the case that those players have a beneficial deviation from the path. As before, we appeal to \textsc{\text{ATL}\(^*\) Model Checking} to obtain the upper bounds; here we need to call a \textsc{2ExpTime} algorithm an exponential number of times---one for each coalition of winners, and accept if any single one of them accepts. For the lower bounds, as for \fcoalition, we can reduce the problem of checking for the existence of a winning strategy in a two-player game with LTL goals as defined in~\cite{Alur2004} for \textsc{2ExpTime}-hardness and existential LTL model checking for \textsc{PSpace}-hardness~\cite{SistlaC85}. In fact, note that for one-player games, \ecore\ and \fcoalition\ are equivalent when $\phi=\gamma_1$, as well as when $\gamma_1=\phi$, $\gamma_2=\neg\phi$, and $C=\set{1}$, which are the cases that arise in the two reductions above mentioned. Finally, for \acore, note that \((G,\varphi)\not\in\acore\) if and only if \((G,\neg\varphi)\in\ecore\): \((G,\varphi)\not\in\acore\) means it is not the case that for all members of the core \(\vec{\sigma}\) we have \(\rho(\vec{\sigma}) \models \varphi\). Pushing the negation through the quantifier, this implies that there exists a member of the core such that \(\rho(\vec{\sigma}) \not\models \varphi\), or \(\rho(\vec{\sigma}) \models \lnot\varphi\). The same argument can then be applied for the reverse direction. Then, since both \textsc{PSpace} and \textsc{2ExpTime} are deterministic complexity classes, we can conclude that \acore\ is \textsc{PSpace}-complete if \(|\Ag|=1\) and \textsc{2ExpTime}-complete if \(|\Ag|>1\), as it is for \ecore. \end{proof} We now study \cmembership\ and \bdeviation. For these two problems we first need to define how we will represent strategy profiles, as at present, strategies are defined as infinitary structures, which map finite histories to players' actions. Given this finite representation for strategies, we can establish the complexity of \cmembership\ and \bdeviation. \begin{theorem}\label{thm:cmembership} \cmembership\ is \textsc{PSpace}-complete for one-player games and \textsc{2ExpTime}-complete for games with more than one player. \end{theorem} \begin{proof} For membership, we first compute the winners and losers with respect to \(\vec{\sigma}=(\sigma_1,\ldots,\sigma_n)\), the outcome of the game. This can be done in \textsc{PSpace} (it is equivalent to LTL model checking over a ``product automata'' or ``concurrent program''~\cite{Kupferman2000}). Once we have computed \(W\), we can check, for every \(L\subseteq\Ag\setminus W\), whether \(L\) has a beneficial deviation. This is true if and only if \(L\) is a fulfilled coalition. Because this can be checked in \textsc{PSpace} for one-player games and in \textsc{2ExpTime} for games with more than one player, the two upper bounds immediately follow. For the lower bounds, we use Lemma~\ref{lem:fc} and Theorem~\ref{thm:fc} again. Consider the following game. Let \(\varphi\) be a satisfiable LTL formula and \(\vec{\sigma}\) an outcome that does not satisfy \(\varphi\). Then, \((G,\vec{\sigma})\in\cmembership\) if and only if \((G,\set{1})\not\in\fcoalition\), whenever \(\gamma_1=\varphi\) and \(\gamma_j=\neg\varphi\), for every player~\(j\in\Ag\setminus\set{1}\).% \end{proof} Let us now consider \bdeviation. This is the only ``easy'' problem for multi-player games: it can be solved in \textsc{PSpace}\@. To show this, we again need to find a different proof strategy. Consider any input instance \((G,\vec{\sigma},\vec{\sigma}_{C}')\) of the problem. We observe that, because \(\vec{\sigma}_{C}'\) is fixed, we can make it part of the arena where the game is played, and then check if players not in \(C\) have a joint strategy for \(\bigvee_{j\in C}\neg\gamma_j\). Due to the definition of beneficial deviation, we also need to check if \(\run(\vec{\sigma})\models\bigwedge_{j\in }\neg\gamma_j\) holds or not. In other words, the reason why this problem can be solved in \textsc{PSpace} for multi-player games, unlike all other decision problems we have studied so far (which, in general, can be solved in doubly exponential time), is that this decision problem can be reduced to a one-player game (given by coalition \(\Ag\setminus C\)) with an LTL goal (given by \(\gamma_{\Ag\setminus C}=\bigvee_{j\in C}\neg\gamma_j\)) over a ``product arena'' (denoted by \(M_{C}\)) built from a concurrent game structure \(M\) and the joint strategy \(\vec{\sigma}_{C}'\) that we want to check. \begin{theorem}\label{thm:bdeviation} \bdeviation\ is \textsc{PSpace}-complete, even for one-player games. \end{theorem} \begin{proof} Checking that \(\run(\vec{\sigma})\models\bigwedge_{j\in C}\neg\gamma_j\) holds can be done in \textsc{PSpace}\@. Again, this is equivalent to model checking LTL formulae over a ``product automata'' or ``concurrent program''~\cite{Kupferman2000}. If the statement does not hold, then, by definition, \(\vec{\sigma}'_{C}\) is not a beneficial deviation, as at least one player in~\(C\) already has its goal satisfied by \(\vec{\sigma}\). If the statement holds, then we check that \(\run(\vec{\sigma}'_{-C},\vec{\sigma}'_{C})\models\bigwedge_{j\in C}\gamma_j\) holds, for all joint strategies~\(\vec{\sigma}'_{-C}\) for players not in \(C\). We do this in \textsc{PSpace} by checking whether it is not the case that \((M_{C}, \valf', s^{0'}) \models\bigvee_{j\in C}\neg\gamma_j\) holds, where \(M_{C}=(\Ag',\Ac',\St',s^{0'},\transf')\) is the concurrent game structure defined as follows: \begin{itemize} \item \(\Ag'=\set{0}\), \(\Ac' = \Pi_{i\in \Ag\setminus C} \Ac_i\); \item \(\St' = \St \times \Pi_{j \in C}Q_j\); \item \(s^{0'} = (s^0,q^0_x,\ldots,q^0_y)\), such that \(\sigma_z=(Q_z,q^0_z,\strtransf_z,\stroutf_z)\), \(\vec{\sigma}'_{C} = (\sigma_x,\ldots,\sigma_y)\), and \(z\in\set{x,\ldots,y}\); \item \(\transf'((s,q_x,\ldots,q_y),(a,\ldots,b)) = (s',q'_x,\ldots,q'_y)\) such that \begin{itemize} \item \(s' = \transf(s,\stroutf(q_x),\ldots,\stroutf(q_y),a,\ldots,b)\), and \item \(q'_z = \strtransf(q_z,s)\), with \(z\in\set{x,\ldots,y}\). \end{itemize} \end{itemize} and \(\valf'\) is defined as, \begin{equation*} \valf'(s,q_x,\ldots,q_y) = \valf(s). \end{equation*} In other words, \(M_{C}\) transitions just like \(M\) save that it is restricted to the behaviour already defined by \(\vec{\sigma}'_{C}\). For the lower bound we use LTL model checking. \end{proof} In addition to the above complexity results, we also have a model-theoretic result. Before we can state it, however, we need to define the notion of bisimilarity~\cite{Milner1989,Hennessy1985}. Let \(M\) and \(M^\prime\) be two concurrent game structures with the same agents \(\Ag\), actions \(\Ac\) and atomic propositions \(\AP\). Moreover, let their respective sets of states and transition functions be denoted by \(\St/\St^\prime\) and \(\transf/\transf^\prime\) respectively. Finally, let \(\lambda\) be a labelling function on \(\St\) and \(\lambda^\prime\) a labelling function of \(\St^\prime\). Then a \emph{bisimulation} between \(s^* \in \St\) and \(t^* \in \St^\prime\) is a non-empty binary relation, \(\sim \subseteq \St \times \St^\prime\), such that, \begin{itemize} \item We have \(s^* \sim t^*\); \item For all \(s \in \St\) and for all \(t \in \St^\prime\), if \(s \sim t\) then \(\lambda(s) = \lambda^\prime(t)\); \item For all \(s_1, s_2 \in \St\) and for all \(t_1 \in \St^\prime\), if \(s_1 \sim t_1\) and \(\transf(s_1, \ac) = s_2\) for some \(\ac \in \Ac\), then \(\transf^\prime(t_1, \ac) = t_2\) for some \(t_2 \in \St^\prime\) with \(s_2 \sim t_2\); \item For all \(s_1 \in \St\) and for all \(t_1, t_2 \in \St^\prime\), if \(s_1 \sim t_1\) and \(\transf(t_1, \ac) = t_2\) for some \(\ac \in \Ac\), then \(\transf^\prime(s_1, \ac) = s_2\) for some \(s_2 \in \St^\prime\) with \(s_2 \sim t_2\). \end{itemize} We say two concurrent game structures are bisimilar if their start states are bisimilar. For further details of bisimilarity over concurrent game structures, refer to~\cite{Gutierrez2017b}. We then say that a property \(P\) is bisimulation-invariant when if \(M \sim N\), then \(P\) holds on \(M\) if and only if \(P\) holds on \(N\). We are now in a position to state our result: informally, we have that checking whether an LTL formula is satisfied by some outcome in the \core\ is a bisimulation-invariant property. This result is easy, and follows directly from the membership proof of \ecore. \begin{corollary}\label{cor:bisim} Let \(G=(M,\gamma_1,\ldots,\gamma_n)\) be a game, \(\varphi\) be an LTL formula, and~\(M'\) be a concurrent game structure that is bisimilar to \(M\). Then, \((G,\varphi)\in\ecore\) if and only if \((G',\varphi)\in\ecore\), where \(G'=(M',\gamma_1,\ldots,\gamma_n)\). \end{corollary} \begin{proof} Follows from the fact that \atlstar\ is bisimulation-invariant, and that the \core\ can be characterised in \atlstar\ using \(\varphi_{\ecore}\), as defined in the proof of Theorem~\ref{thm:eacore}. More specifically, it follows from the fact that \((M, \lambda, s^0)\models\varphi_{\ecore}(G,\varphi)\) if and only if \((M', \lambda', s^{0\prime})\models\varphi_{\ecore}(G',\varphi)\). \end{proof} \subsection{On Credible Coalition Formation: The Strong Core}\label{secn:strong-core} As we noted above, our definition of the core assumes worst-case reasoning: a deviation must be beneficial against \emph{all} counter-responses. This definition is robust in the sense that any core-stable outcome is stable in a very strong sense, but one could argue that in some cases it is \emph{too} strong. In particular, when a coalition \(C\) is contemplating a deviation \(\vec{\sigma}_{C}\), it can surely assume that the remaining players will not act against their own interests. Thus, one could argue that a deviation need not be beneficial for \emph{all} behaviours of the remaining players, but only those behaviours that are \emph{credible}, in the sense that the remaining players might rationally choose them. To make this discussion concrete, consider the following example. \begin{example}\label{ex:example-2} Suppose we have a two-player game \(G\), with a start state, \(s_0\) and three sink states, \(s_1, s_2\), and \(s_3\). Each player has two actions available to them, \(a\) and \(b\), and the transition function from the start state is defined as follows: \begin{align*} \transf(s_0, (a, a)) & = s_1, \\ \transf(s_0, (a,b)) & = s_2, \\ \transf(s_0, (b, a)) & = s_3, \\ \transf(s_0, (b,b)) & = s_3 \end{align*} Thus the game is as illustrated in Figure~\ref{fig:non-credible}. Additionally, suppose that the infinite run that ends up in \(s_1\) is the one run which satisfies player one's goal, and the run that ends up in \(s_2\) is the one which satisfies player two's goal. Now, in this game, the run which ends up in \(s_1\) lies in the core, but with the use of a non-credible (punishing) strategy by player 1. Notice that the only possible deviation from \((a, a)\) for player 2 is to play \(b\), to which player 1 could respond by also playing \(b\). Although this behaviour would prevent player 2 from achieving its goal, such a way of playing can be regarded as not rational for player 1 given their preference relation: player 1 certainly prefers the run which ends in \(s_1\) over the other two possible runs, but is indifferent otherwise. \begin{figure}[H]\label{fig:non-credible} \centering \input{figures/non_credible_strategy.tikz} \caption{A game with a non-credible strategy.} \end{figure} \end{example} Motivated by this phenomenon, we now present a stronger definition for the \core\@. More specifically, with this new definition we require that if a coalition \(C\) wants to deviate from a given strategy profile, then the remaining players can only credibly threaten \(C\) when they have a counter-response in which both at least one player in \(C\) does not get its goal achieved and every winner in the original strategy profile remains a winner in the new one, \emph{i.e.}, the counter-coalition act in accordance with their preference relations. In this solution concept, we are thus capturing the idea of remaining players being willing to punish deviators, but only up to a point: those left behind would prefer not to do worse than they were doing originally. We do not claim that this solution concept is always appropriate, as is the case with all solution concepts in cooperative games with externalities. But it captures another interesting variation of how a non-deviating coalition might respond to a deviation. We then reformulate the definition of a beneficial deviation, and now say that a deviation \(\vec{\sigma'}_{C}\) is a \emph{strong beneficial deviation} from \(\vec{\sigma}\) if the following conditions hold: \begin{enumerate} \item \(C \subseteq \Losers(\vec{\sigma})\); \item \(C\subseteq\Winners(\vec{\sigma}_{-C},\vec{\sigma'}_{C})\); \item For every joint strategy \(\vec{\sigma}_{-C}'\) for \(\Ag\setminus C\), we have that if \(\Winners(\vec{\sigma})\subseteq\Winners(\vec{\sigma}_{-C}',\vec{\sigma}_{C}')\), then \(C\subseteq\Winners(\vec{\sigma}_{-C}',\vec{\sigma}_{C}')\). \end{enumerate} With this definition in place we say that the \textbf{strong core} of a game, denoted \(\ccoreset{G}\), is the set of outcomes of \(G\) that admit no strong beneficial deviation. Then, with respect to Example~\ref{ex:example-2}, we see that while~\(\vec{\sigma}_{a_1a_1}\) is in \(\coreset{G}\), it is not the case that~\(\vec{\sigma}_{a_1a_1}\) is in \(\ccoreset{G}\), since player~2 can now strongly beneficially deviate from \(\vec{\sigma}_{a_1a_1}\) to \(\vec{\sigma}_{a_1b_1}\). It is worth pausing to reflect for a moment on the issue of formulating the core in the presence of externalities. The game theory literature on this topic is very large. The reason is that the existence of externalities leads to many different definitions of stable behaviour (see, \emph{e.g.},~\cite{OsborneR94,yi1997stable,uyanik2015nonemptiness,Finus2003} for many variants of the \core). Here, we propose one definition but by no means do we claim it is the only possibility. Essentially, with our definition, we require that for a punishing joint strategy to be credible, winners must remain winners after the presenting the threat. We will now study the complexity of the decision problems defined in previous sections, but with respect to the strong core. There are four decision problems whose definition depends on the nature of the \core: \ecore, \acore, \cmembership, and \bdeviation. We will use the same names for these problems, with the understanding that results in this section are with respect to the strong core. As we will show next, these four problems have the same complexities as with \core, but require a more complex logical characterisation, which we provide here using the two-alternation fragment of Strategy Logic (SL)~\cite{MogaveroMPV14}.\footnote{We were unable to find a logical characterisation of the strong core using \atlstar\@. In fact, we believe that such a logical characterisation in \atlstar\ is not possible for multi-player games.} \begin{theorem}\label{thm:core-membership} Given a game \(G=(M,\gamma_1,\ldots,\gamma_n)\) and LTL formula \(\varphi\), we have \((G,\varphi)\in\ecore\) if and only if \(M\models\varphi^+_{\ecore}(G,\varphi)\), where \(\varphi^+_{\ecore}(G,\varphi)\) is the SL formula: \begin{align*} \varphi^+_{\ecore}(G,\varphi) & = \bigvee_{W\subseteq\Ag}\SLE{\Ag}\left( \varphi \wedge \bigwedge_{i\in W} \gamma_i \wedge \bigwedge_{j\in\Ag\setminus W} \neg\gamma_j \wedge \bigwedge_{C\subseteq\Ag\setminus W} \varphi_{\mathrm{NoBD}}(G,W,C) \right) \end{align*} and the formula \(\varphi_{\mathrm{NoSBD}}(G,W,C)\) is defined as follows: \begin{align*} \varphi_{\mathrm{NoSBD}}(G,W,C) & = \SLA{C} \left(\bigwedge_{j\in C} \gamma_j \rightarrow \SLE{\Ag\setminus C} \left( \bigwedge_{i\in W}\gamma_i \wedge \bigvee_{j\in C}\neg\gamma_j \right)\right) \end{align*} \end{theorem} \begin{proof} This SL formula expresses that in the concurrent game structure, there exists a path \(\SLE{\Ag}\left(\ldots\right)\) under which \begin{enumerate} \item The formula \(\varphi\) holds; \item Some players get their goals achieved: \(\bigwedge_{i\in W}\gamma_i\); \item The remaining players do not: \(\bigwedge_{j\in \Ag\setminus W}\neg\gamma_j\); \item No coalition of losers has a strong beneficial deviation: \(\bigwedge_{C\subseteq\Ag\setminus W} \varphi_{\mathrm{NoSBD}}(G,W,C)\). \end{enumerate} We express the condition of a coalition of losers \(C\) not having a strong beneficial deviation with the SL formula \(\varphi_{\mathrm{NoSBD}}(G,W,C)\); this is broken down as follows: for every joint strategy of~\(C\), if every player in \(C\) is better off \(\left(\bigwedge_{j\in C}\gamma_j\right)\), then the coalition of players outside \(C\) have a joint strategy \(\left(\SLE{\Ag\setminus C}\ldots\right)\) such that both the winners in the original outcome remain winners after the threat is presented \(\left(\bigwedge_{i\in W}\gamma_i\right)\), and at least one player in the deviating coalition, \(C\), does not get its goal achieved \(\left(\bigvee_{j\in C}\neg\gamma_j\right)\). \end{proof} At this point, we would like to make a couple of observations. First, that the complexity of checking SL formulae is non-elementary and depends on the alternation-depth of the formula (\cite{MogaveroMPV14}): SL formulae of alternation-depth~\(n\) can be checked in \((n+1)\)-\textsc{ExpTime}, and in \textsc{PSpace} for formulae that are semantically equivalent to CTL\(^*\) formulae. Since \(\varphi^+_{\ecore}(G,\varphi)\) is an SL formula with two alternations, it can be checked in \textsc{3ExpTime} (and in \textsc{PSpace} if \(|\Ag|=1\)). Second, we also would like to recall that finite-state machine strategies, as those we use here, can be characterised in LTL using the technique presented in~\cite{Gutierrez2015,Gutierrez2017a}. Using these logical characterisations, we can obtain the following complexity results. \begin{theorem}\label{thm:credible} For multi-player games, while \ecore\ and \acore\ are in \textsc{3ExpTime}, \cmembership\ is \textsc{2ExpTime}-complete and \bdeviation\ is \textsc{PSpace}-complete. For one-player games, all problems are \textsc{PSpace}-complete. \end{theorem} Because we characterised the strong core using SL (which, in contrast to \atlstar, is not a bisimulation-invariant logic), we cannot conclude that the satisfaction of LTL properties by outcomes in the strong core is a bisimulation-invariant property. We believe that this is not the case. In our first formulation of the core, we saw that the core is always non-empty. Thus, a natural question is to ask whether the strong core is always non-empty. We begin by showing that this is the case for games with three or fewer players: \begin{theorem}\label{thm:strong-core-nonempty} For every two-player and three-player game, \(G\), we have \(\ccoreset{G} \neq\emptyset\). \end{theorem} \begin{proof} First, consider games with only two players. For a contradiction, let us suppose that for some game \(G\), the set of outcomes \(\ccoreset{G}\) is empty. This means that for every outcome either player~1 or player~2 or both have a strong beneficial deviation. Then, we know that no outcome can satisfy both goals, \(\gamma_1\) and \(\gamma_2\). Let us then consider the three remaining possible cases: outcomes that only satisfy \(\gamma_1\) (case~1), outcomes that only satisfy \(\gamma_2\) (case~2), and outcomes that satisfy neither \(\gamma_1\) nor \(\gamma_2\) (case~3). Let \(\vec{f}=(f_1,f_2)\) be an outcome, \(f'_1\) be a deviation by player~1, and \(f'_2\) be a deviation by player~2, and consider the three cases above. In case~1, only player~2 would deviate. Then, outcome \((f_1,f'_2)\) only satisfies \(\gamma_2\). Because \((f_1,f'_2)\) is not in the core either, from this outcome only player~1 would deviate, to another outcome \((f'_1,f'_2)\). Then, outcome \((f'_1,f'_2)\) only satisfies \(\gamma_1\). But, then, we have a contradiction, since this means that \((f_1,f_2)\) would be in \(\ccoreset{G}\). We can reason symmetrically to show that case~2 is not possible either. For case~3 we note that only single deviations would be possible. But any such deviations would be to an outcome that either only satisfies \(\gamma_1\) or only satisfies \(\gamma_2\), which are no longer possible. Since no other cases are possible, we have to reject our assumption and conclude that, for two-player games, \(\ccoreset{G}\) is not empty. For three-player games, the proof is similar, but requires a careful case-by-case analysis. For a full proof, see the appendix. \end{proof} In contrast, for games with four or more players, we find that the strong core may be empty, as the following example illustrates. \begin{example}\label{ex:empty-strong-core} Consider the following 4 player game, with a start state, \(s^0\), and six sink states, \(s^1, \ldots, s^6\). Let each player have two actions each, \(\{0,1\}\), and writing \(a_1a_2a_3a_4\) for the action \((a_1, a_2, a_3, a_4)\), our transition function from the start state looks like the following: \begin{align*} \transf(0000) & = s^1, \quad & & \transf(0001) = s^1, \\ \transf(0010) & = s^2, \quad & & \transf(0011) = s^2, \\ \transf(0100) & = s^1, \quad & & \transf(0101) = s^3, \\ \transf(0110) & = s^2, \quad & & \transf(0111) = s^5, \\ \transf(1000) & = s^6, \quad & & \transf(1001) = s^4, \\ \transf(1010) & = s^4, \quad & & \transf(1011) = s^4, \\ \transf(1100) & = s^1, \quad & & \transf(1101) = s^3, \\ \transf(1110) & = s^4, \quad & & \transf(1111) = s^3. \\ \end{align*} Moreover, suppose player one prefers the runs that end up in the states \(s^1, s^2, s^3\), player two prefers those that end up in \(s^1, s^4, s^5\), player three \(s^2, s^4, s^6\), and player four \(s^3,s^5, s^6\). The game is illustrated in~Figure\ref{fig:empty-ccore-example} --- we label states with the players that are winners in that state, and edges with the possible action tuples.\footnote{We would like to note that this (counter-)example was automatically generated using bounded exhaustive search of games of different size, which may explain why the game is so counter-intuitive, and most importantly why a game like this one is so hard to find, or be produced, by hand.} \begin{figure}[H] \centering \input{figures/empty_ccore.tikz} \caption{A game with an empty \ccore.}\label{fig:empty-ccore-example} \end{figure} With a careful case-by-case analysis, one can verify that for every state, there exists some coalition with a strong beneficial deviation. Thus, the strong core of the game is empty. For a complete analysis of the deviations that each coalition can make, please refer to the appendix where the full case-by-case analysis is presented. \end{example} \section{Mean-Payoff Games}\label{secn:mean-payoff-games} Thus far, we have considered games with \emph{qualitative} preferences---each player has a goal given by some temporal logic formula, which, under a given run, is either satisfied or unsatisfied. But this is a very coarse-grained approach to specifying preferences; it does not offer a way of expressing the \emph{intensity} of the individual player's preferences. One possible way to obtain a richer model of preferences would be to introduce multiple LTL goals for each player, and define some mapping from the set of satisfied formulae to the real numbers~\cite{Mavronicolas2007,Almagor2018,Kupferman2016}. However, an alternative approach, which has been widely studied in the literature, is to sidestep temporal logics entirely and assign weights to states, rather than atomic propositions. We then compute the \textbf{mean-payoff} of runs, with the idea that agents prefer runs which maximise their mean-payoff~\cite{Ehrenfeucht1979,Zwick1996,Ummels2011}. In this section, we will revisit the formulation of the core in this mean-payoff setting. Formally, a mean-payoff game, \(G\), is a tuple, \begin{equation*} G = (M, {\{w_i\}}_{i \in \Ag}), \end{equation*} where \(M\) is a concurrent game structure, and for each \(i \in \Ag\), \(w_i : \St \to \mathbb{Z}\) is a \textbf{weight} function, mapping states to integers. Games are played in an identical way to the LTL setting, but the agents' preference relations are defined differently here. Let \(\beta \in \mathbb{R}^\omega\) be an infinite sequence of real numbers. Then the mean-payoff of \(\beta\), denoted by \(\mp(\beta)\), is defined as follows: \begin{equation*} mp(\beta) = \liminf_{n\to\infty} \frac{1}{n} \sum_{i=0}^{n-1} \beta_i. \end{equation*} In a mean-payoff game, a run \(\rho = s^0 s^1 \ldots\) induces an infinite sequence of weights for each player, \(w_i(s^0)w_i(s^1)\ldots\) --- we denote this sequence by \(w_i(\rho)\) and for notational convenience, we will write \(\pay_i(\rho)\) for \(\mp(w_i(\rho))\). With this, we can define the preference relation for each player: given two runs, \(\rho\) and \(\rho'\), we have \(\rho \succeq_i \rho'\) if \(\pay_i(\rho) \geq \pay_i(\rho')\); the strict relation \(\succ_i\) is defined in the usual way. Now, recall that our definition of the core in the setting of LTL games relies on the notion of winners and losers of a game. In the mean-payoff setting, it clearly makes no sense to classify players as winners or losers---they can receive a wide spectrum of payoffs. Thus, we need to revisit the concept of a beneficial deviation. In the mean-payoff setting, we say that given a strategy profile \(\vec{\sigma}\), a beneficial deviation by a coalition \(C\) is a strategy vector \(\vec{\sigma}_C'\) such that for all complementary strategy profiles \(\vec{\sigma}_{\Ag \setminus C}'\), we have \(\rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}') \succ_i \rho(\vec{\sigma})\) for all \(i \in C\). We then say that \(\vec{\sigma}\) is a member of the core if there exists no coalition \(C\) which has a beneficial deviation from \(\vec{\sigma}\). \subsection{Non-Emptiness of the Core} We begin by asking whether mean-payoff games always have a non-empty core. Recall that in the LTL games case, we found the core was guaranteed to be non-empty: we find that this does not hold in general for mean-payoff games. Before proving this theorem, we need a small lemma showing that\ldots \begin{lemma}\label{lmm:mean-payoff-values-are-closed} Let \({\{\vec{\sigma}^j\}}_{j \in \mathbb{N}}\) be a sequence of strategy profiles, and suppose that for some player \(i\), we have \(\lim_{j \to \infty}\pay_i(\rho(\vec{\sigma}^j)) = x\) for some \(x \in \mathbb{R}\). Then there exists some strategy profile \(\vec{\sigma}^x\) such that \(\pay_i(\rho(\vec{\sigma}^x)) = x\). \end{lemma} \begin{proof} First note that the game will end up in a strongly-connected component. So let \(\mathcal{C}\) be the set of all simple cycles of the game graph of said strongly-connected component. Consider linear program with solution \(x\) --- this gives proportion of cycles \end{proof} \begin{theorem}\label{thm:empty-core} In mean-payoff games, if \(\abs{\Ag}\leq 2\), then the core is non-empty. For \(\abs{\Ag} >2\), there exist games with an empty core. \end{theorem} \begin{proof} If \(\abs{\Ag}=1\), it is straightforward to see that the core is always non-empty; we use Karp's algorithm for determining the maximum cycle in a weighted graph~\cite{Karp1978} to determine the maximum payoff that one player can achieve. For two-player games, let \(\vec{\sigma}=(\sigma_1,\sigma_2)\) be any strategy profile. If \(\vec{\sigma}\) is not in the core, then either Player~1, or Player~2, or the coalition consisting of both players has a beneficial deviation. If the latter is true, then there is a strategy profile, \(\vec{\sigma}' = (\sigma_1', \sigma_2')\) such that \(\vec{\sigma}' \succ_i \vec{\sigma}\) for both \(i \in \{1,2\}\). We repeat this process until the coalition of both players does not have a beneficial deviation. This must eventually be the case as 1) each player's payoff is capped by their maximum weight and 2) by Theorem~4 of~\cite{Brenguier2015}, we see that the set of payoffs that a coalition can achieve is a closed set, so any limit point can be attained.\footnote{The result of~\cite{Brenguier2015} actually refers to two-player, multi-mean-payoff games, whilst we are working with multi-player mean-payoff games. We will cover why this is not an issue momentarily.} So there must come a point when they cannot beneficially deviate together. At this point, we must either be in the core, or either player 1 or player 2 has a beneficial deviation. If player \(j \in \{1,2\}\) has a beneficial deviation, say \(\sigma_j\), then any strategy profile \((\sigma_j,\sigma_i)\), with \(i\neq j\), that maximises Player~\(i\)'s mean-payoff is in the core. Thus, for every two-player game, there exists some strategy profile that lies in the core. However, for mean-payoff games with three or more players, the core of a game may be empty. The following example illustrates this case. \begin{example}Consider the following three-player game \(G\), where each player has two actions, \(\HEADS, \TAILS\), and there are four states, \(P, R, B, Y\). The states are weighted for each player as follows: \begin{center} \begin{tabular}{cccc} \toprule \(w_i(s)\) & \(1\) & \(2\) & \(3\) \\ \midrule \(P\) & \(-1\) & \(-1\) & \(-1\) \\ \(R\) & \(2\) & \(1\) & \(0\) \\ \(B\) & \(0\) & \(2\) & \(1\) \\ \(Y\) & \(1\) & \(0\) & \(2\) \\ \bottomrule \end{tabular} \end{center} If the game is in any state other than \(P\), then no matter what set of actions is taken, the game will remain in that state. Thus, we only specify the transitions for the state \(P\): \begin{center} \begin{tabular}{cc} \toprule \(\Ac\) & \(\St\) \\ \midrule \((\HEADS, \HEADS, \HEADS)\) & \(R\) \\ \((\HEADS, \HEADS, \TAILS)\) & \(R\) \\ \((\HEADS, \TAILS, \HEADS)\) & \(B\) \\ \((\HEADS, \TAILS, \TAILS)\) & \(P\) \\ \((\TAILS, \HEADS, \HEADS)\) & \(P\) \\ \((\TAILS, \HEADS, \TAILS)\) & \(Y\) \\ \((\TAILS, \TAILS, \HEADS)\) & \(B\) \\ \((\TAILS, \TAILS, \TAILS)\) & \(Y\) \\ \bottomrule \end{tabular} \end{center} Figure~\ref{fig:empty-core} illustrates the structure of the game. \begin{figure}[H] \centering \input{figures/empty_mp_core.tikz} \caption{A game with an empty core.\label{fig:empty-core}} \end{figure} Note that strategies are characterised by the state that the game eventually ends up in. If the players stay in \(P\) forever, then they can all collectively change strategy to move to one of \(R, B, Y\), and each get a better payoff. Now, if the game ends up in \(R\), then players 2 and 3 can deviate by playing \((\TAILS, \HEADS)\), and no matter what player 1 plays, the game will be in state \(B\), leaving the two deviating players better off. But similarly, if the game is in \(B\), then players 1 and 3 can deviate by playing \((\TAILS, \TAILS)\) to enter state \(Y\), in which they both will be better off, regardless of what player 2 does. And finally, if in \(Y\), then players \(1\) and \(2\) can deviate by playing \((\HEADS, \HEADS)\) to enter \(R\) and will be better off regardless of what player \(3\) plays. Thus, no strategy profile lies in the core. \end{example} \end{proof} \subsection{Decision Problems} We now turn our attention to decision problems relating to the core in the mean-payoff setting. However, from a computational perspective, there is an immediate concern here---given a potential beneficial deviation, how can we verify that it is preferable to the status quo under \emph{all} possible counter-responses? Fortunately, as we show in the following lemma, we can restrict our attention to \emph{memoryless strategies} when thinking about potential counter-responses to players' deviations (see Section~\ref{secn:prelim} for the definition of memoryless strategies): \begin{lemma}\label{lemma:core-memoryless-counter-responses} Let \(G\) be a game, \(C \subseteq \Ag\) be a coalition and \(\vec{\sigma}\) be a strategy profile. Further suppose that \(\vec{\sigma}_C'\) is a strategy vector such that for all memoryless strategy vectors \(\vec{\sigma}_{\Ag \setminus C}'\), we have, \begin{equation*} \rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}') \succ_i \rho(\vec{\sigma}). \end{equation*} Then, for all strategy vectors, \(\vec{\sigma}_{\Ag \setminus C}'\), not necessarily memoryless, we have, \begin{equation*} \rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}') \succ_i \rho(\vec{\sigma}). \end{equation*} \end{lemma} Before we prove this, we need to introduce an auxiliary concept of \emph{two-player, turn-based, zero-sum, multi-mean-payoff games}~\cite{Velner2015} (we will simply refer to these as multi-mean-payoff games moving forward). Informally, these are similar to two-player, turn-based, zero-sum mean-payoff games, except player 1 has \(k\) weight functions associated with the edges, and they are trying to ensure the resulting \(k\)-vector of mean-payoffs is component-wise greater than a vector threshold. Formally, a multi-mean-payoff game is given by a structure \[G = (V_1, V_2, v^0, E, w, z^k)\] where \(V_1, V_2\) are sets of states controlled by players 1 and 2 respectively, with \(V = V_1 \cup V_2\) the state space, \(v^0 \in V\) the start state, \(E \subseteq V \times V\) a set of edges, \(w: E \to \mathbb{Z}^k\) a weight function, assigning to each edge a vector of weights, and \(z^k \in \mathbb{Q}^k\) is a threshold vector. The game is played by starting in the start state, \(v^0 \in V_i\), and player \(i\) choosing an edge \((v^0, v^1)\), and traversing it to the next state. From this new state, \(v^1 \in S_j\), player \(j\) chooses an edge and so on, repeating this process forever. Runs are defined in the usual way and the payoff of a run \(\rho\), \(\pay(\rho)\), is simply the vector \((\mp(w_1(\rho)), \ldots,\mp(w_k(\rho)))\). Player 1 wins if the \(\pay_i(\rho) \geq z_i\) for all \(i \in \{1,\ldots,k\}\), and loses otherwise. The basic question associated with these games is whether player 1 can force a win: \begin{quote} \underline{\textsc{Multi-Mean-Payoff-Threshold}}:\\ \emph{Given}: Multi-mean-payoff game \(G\).\\ \emph{Question}: Is it the case that player 1 has a winning strategy? \end{quote} As shown in~\cite{Velner2015}, this problem is co-NP-complete. Whilst we do not need to use this complexity result right now, we shall use this fact later. It is also worth noting that in our multi-player mean-payoff games, the weights are attached to states, whilst in multi-mean-payoff games, the weights are attached to edges. For our purposes, this difference is purely superficial---the former can be mapped into the latter simply by pushing the weights onto the outgoing edges, whilst the latter can be mapped into the former by adding more states, one for each edge. If you do this in the correct way, this gives you only a polynomial overhead. As we proceed, we shall use this mapping implicitly (and we in fact have already used it in the proof of Theorem~\ref{thm:empty-core}). With this decision problem introduced, we are now in a position to prove Lemma~\ref{lemma:core-memoryless-counter-responses}. \begin{proof}[Proof of Lemma~\ref{lemma:core-memoryless-counter-responses}] Let \(\vec{\sigma}_{\Ag \setminus C}^\prime\) be an arbitrary strategy and let \(i \in C\) be an arbitrary agent. Suppose it is not the case that \(\rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}') \succ_i \rho(\vec{\sigma})\). Thus, we have \(\rho(\vec{\sigma}) \succeq_i \rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}')\). Considering this as a two-player multi-mean-payoff game, where player 1's strategy is fixed and encoded into the game structure (\emph{i.e.}, player 1 follows \(\vec{\sigma}_C'\), but has no say in the matter), and the payoff threshold is \(\mp(\rho(\vec{\sigma}))\), then \(\vec{\sigma}_{\Ag \setminus C}'\) is a winning strategy for player~2 in this game. Now, by~\cite{Velner2015,Kopczynski2006}, if player~2 has a winning strategy, then they have a memoryless winning strategy. Thus, there is a memoryless strategy \(\vec{\sigma}_{\Ag \setminus C}^{\prime\prime}\) such that \(\rho(\vec{\sigma}) \succeq_i \rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}^{\prime\prime})\). But this contradicts the assumptions of the lemma, and thus we must have \(\rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}') \succ_i \rho(\vec{\sigma})\) \end{proof} We are now in a position to look at some complexity bounds for mean-payoff games in the cooperative setting. Let us begin by considering the following decision problem relating to beneficial deviations: \begin{quote} \underline{\textsc{Beneficial Deviation}}:\\ \emph{Given}: Game \(G\) and strategy profile \(\vec{\sigma}\). \\ \emph{Question}: Does some coalition have a beneficial deviation from \(\vec\sigma\)? That is, does there exist \(C\subseteq\Ag\) and \(\vec{\sigma}_C' \in \Sigma_C\) such that for all \(\vec{\sigma}_{\Ag \setminus C}' \in\Sigma_{\Ag \setminus C}\) and for all \(i \in C\), we have: \begin{equation*} \rho(\vec{\sigma}_C', \vec{\sigma}_{\Ag \setminus C}') \succ_i \rho(\vec{\sigma})? \end{equation*} \end{quote} We have: \begin{theorem}\label{thm:mp-bdeviation} If the provided strategy profile \(\vec{\sigma}\) is memoryless, then \textsc{Beneficial Deviation} is NP-complete. \end{theorem} \begin{proof} First correctly guess a deviating coalition \(C\) and a strategy profile \(\vec{\sigma}'_C\) for such a coalition of players. Then, use the following three-step algorithm. First, compute the mean-payoffs that players in \(C\) get on \(\rho(\vec{\sigma})\), that is, a set of values \(z^*_j = \pay_j(\rho(\vec{\sigma}))\) for every \(j\in C\) --- this can be done in polynomial time simply by `running' the strategy profile~\(\vec{\sigma}\). Then compute the graph \(G[\vec{\sigma}'_C]\), which contains all possible behaviours ({\em i.e.}, strategy profiles) for \(\Ag \setminus C\) with respect to \(\vec{\sigma}\) --- this construction is similar to the one used in the proof of Theorem~\ref{thm:bdeviation}, that is, the game when we fix \(\vec{\sigma}'_C\), and can be done in polynomial time. Finally, we ask whether every path \(\rho\) in \(G[\vec{\sigma}'_{C}]\) satisfies \(\pay_j(\rho) > z^*_j\), for every \(j\in C\) --- for this step, we can use Karp's algorithm~\cite{Karp1978} to answer the question in polynomial time for every \(j\in C\). If every path in \(G[\vec{\sigma}'_{C}]\) has this property, then we accept; otherwise, we reject. For hardness, we reduce from 3SAT, using a small variation of the construction in~\cite{SistlaC85}. Let \(P=\{x_1,\ldots,x_n\}\) be a set of atomic propositions. Given a Boolean formula \(\varphi = \bigwedge_{1\leq c \leq m} C_c\) (in conjunctive normal form) over \(P\) --- where each \(C_c = l_{c1} \vee l_{c2} \vee l_{c3}\), and each literal \(l_{ck}=x_j\) or \(\neg x_j\), with \(1\leq k\leq 3\), for some \(1\leq j \leq n\) --- we construct \(M = \left(\Ag, \St, s^0, {(\Ac_i)}_{i \in \Ag}, \transf\right)\), an \(m\)-player concurrent game structure defined as follows, and illustrated in Figure~\ref{fig:coop-bd-np-hard}: \begin{itemize} \item \(\Ag = \{1,\ldots,m\}\); \item \(\St = \{x_v \ | \ 1\leq v\leq n\} \cup \{x'_v \ | \ 1\leq v\leq n\} \cup \{y_0,y_n,y^0,y^*\}\); \item \(s^0 = y^0\); \item \(\Ac_{i} = \{t,f\}\), for every \(i\in\Ag\), and \(\Ac = \Ac_1 \times \cdots \times \Ac_m\); \item For \(\transf\), refer to the Figure~\ref{fig:coop-bd-np-hard}, such that \(T=\{(t_1,\ldots,t_m)\}\) and \(F=\Ac\setminus T\). \end{itemize} \begin{figure} \centering \resizebox{\columnwidth}{!}{ \input{figures/coop-bd-np-hard.tikz} } \caption{Concurrent game structure for the reduction from 3SAT.\label{fig:coop-bd-np-hard}} \end{figure} With \(M\) at hand, we build a mean-payoff game using the following weight function: \begin{itemize} \item \(w_i(x_v) = 1\) if \(x_v\) is a literal in \(C_i\) and \(w_i(x_v) = 0\) otherwise, for all \(i\in\Ag\) and \(1\leq v\leq n\) \item \(w_i(x'_v) = 1\) if \(\neg x_v\) is a literal in \(C_i\) and \(w_i(x'_v) = 0\) otherwise, for all \(i\in\Ag\) and \(1\leq v\leq n\) \item \(w_i(y_0)=w_i(y_n)=w_i(y^0)=w_i(y^*)=0\), for all \(i\in\Ag\) \end{itemize} Then, we consider the game \(G\) over \(M\) and any strategy profile (in memoryless strategies) such that \(\vec{\sigma}(s^0)=y^*\). For any of such strategy profiles the mean-payoff of every player is 0. However, if \(\varphi\) is satisfiable, then there is a path in \(M\), from \(y_0\) to \(y_n\), such that in such a path, for every player, there is a state in which its payoff is not 0. Thus, the grand coalition \(\Ag\) has an incentive to deviate since traversing that path infinitely often will give each player a mean-payoff strictly greater than 0. Observe two things. Firstly, that only if the grand coalition \(\Ag\) agrees, the game can visit \(y_0\) after \(y^0\). Otherwise, the game will necessarily end up in \(y^*\) forever after. Secondly, because we are considering memoryless strategies, the path from \(y_0\) to \(y_n\) followed at the beginning is the same path that will be followed thereafter, infinitely often. Then, we can conclude that there is a beneficial deviation (necessarily for \(\Ag\)) if and only if \(\varphi\) is satisfiable, as otherwise at least one of the players in the game will not have an incentive to deviate (because its mean-payoff would continue to be 0). We then conclude that \((G,\sigma)\in\text{\textsc{Beneficial Deviation}}\) if and only if \(\varphi\) is satisfiable. \end{proof} From Theorem~\ref{thm:mp-bdeviation} it follows that checking if no coalition of players has a beneficial deviation with respect to a given strategy profile is co-NP complete, and thus we have: \begin{corollary}\label{prop:coop-mem-complete-mless} If the provided strategy profile \(\vec{\sigma}\) is memoryless, then \textsc{Core Membership} is co-NP-complete. \end{corollary} We can also leverage \textsc{Beneficial Deviation} to obtain the following: \begin{theorem}\label{prop:coop-ecore-mless} If we restrict the existential quantification over strategies to consider only memoryless strategies, then \textsc{E-Core} is in \(\Sigma^P_2\). \end{theorem} \begin{proof} Given a game \(G\), we guess a strategy profile \(\vec{\sigma}\) and check that \((G,\vec{\sigma})\) is not an instance of \textsc{Beneficial Deviation}. While the former can be done in polynomial time, the latter can be solved in co-NP using an oracle for \textsc{Beneficial Deviation}. Thus, we have a procedure that runs in NP\,\(^{\text{co-NP}}\) = \(\Sigma^P_2\). \end{proof} Owing to the alternations present in the definition of the core and beneficial deviations, we believe the \textsc{E-Core} problem to be complete for \(\Sigma^P_2\), but we have been unable to find a proof of this. Note that suggests a contrast with the corresponding problem for Nash equilibrium in mean-payoff games, which lies in NP~\cite{Ummels2011}. More importantly, the result also shows that the (complexity) dependence on the type of coalitional deviation is only weak, in the sense that different types of beneficial deviations may be considered within the same complexity class, as long as such deviations can be checked with an NP or co-NP oracle. \subsection{Fulfilled Coalitions} We now generalise the idea of a fulfilled coalition. To do this, we introduce the notion of a \textbf{lower bound}. Let \(C\subseteq\Ag\) be a coalition in a game \(G\) and let \(\vec{z}_{C}\in \mathbb{Q}^C\). We say that \(\vec{z}_C\) is a {lower bound} for \(C\) if there is a joint strategy \(\vec{\sigma}_C\) for \(C\) such that for all strategies \(\vec{\sigma}_{-C}\) for \(\Ag\setminus C\), we have \(\pay_i(\rho(\vec{\sigma}_C,\vec{\sigma}_{-C}))\geq z_i\), for every \(i\in C\). Based on this definition, we can prove the following, which characterises the core in terms of lower bounds: \begin{lemma}\label{lmma:eq_to_path_finding_core} Let \(\rho\) be a run in \(G\). There is \(\vec{\sigma} \in \coreset{G}\) such that \(\rho = \rho(\vec{\sigma})\) if and only if for every coalition \(C\subseteq\Ag\) and lower bound \(\vec{z}_C \in \mathbb{Q}^C\) for \(C\), there is some \(i\in C\) such that \(z_i \leq \pay_i(\rho)\). \end{lemma} \begin{proof} To show the left-to-right direction, suppose that there exists a member of the core \(\vec{\sigma} \in \coreset{G}\) and suppose further that there is some coalition \(C\subseteq\Ag\) and lower bound \(\vec{z}_C \in \mathbb{Q}^C\) for \(C\), such that for every \(i\in C\) we have \(z_i > \pay_i(\rho)\). Because \(\vec{z}_C\) is a lower bound for \(C\), and \(z_i > \pay_i(\rho)\), for every \(i\in C\), then there is a joint strategy \(\vec{\sigma}_C\) for \(C\) such that for all strategies \(\vec{\sigma}_{-C}\) for \(\Ag\setminus C\), we have \(\pay_i(\rho(\vec{\sigma}_C,\vec{\sigma}_{-C}))\geq z_i > \pay_i(\rho)\), for every \(i\in C\). Then, it follows that \((G,\vec{\sigma})\in\text{\textsc{Beneficial Deviation}}\), which further implies that \(\vec{\sigma}\) cannot be in the core of \(G\) --- a contradiction to our initial hypothesis. For the right-to-left direction, suppose that there is \(\rho\) in \(G\) such that for every coalition \(C\subseteq\Ag\) and lower bound \(\vec{z}_C \in \mathbb{Q}^C\) for \(C\), there is \(i\in C\) such that \(z_i \leq \pay_i(\rho)\). We then simply let \(\vec{\sigma}\) be any strategy profile such that \(\rho = \rho(\vec{\sigma})\). Now, let \(C=\{j,\ldots,k\}\subseteq\Ag\) be any coalition and \(\vec{\sigma}'_{C}\) be any possible deviation of \(C\) from \(\vec{\sigma}\). Either \(\vec{z'}_C = (\pay_j(\rho(\vec{\sigma}_{-C},\vec{\sigma}'_C)),\ldots,\pay_k(\rho(\vec{\sigma}_{-C},\vec{\sigma}'_C)))\) is a lower bound for \(C\) or it is not. If we have the former, by hypothesis, we know that there is \(i\in C\) such that \(\pay_i(\rho(\vec{\sigma}_{-C},\vec{\sigma}'_C)) \leq \pay_i(\rho)\). Therefore, \(i\) will not have an incentive to deviate along with \(C\setminus\{i\}\) from \(\vec{\sigma}\), and as a consequence coalition \(C\) will not be able to beneficially deviate from \(\vec{\sigma}\). If, on the other hand, \(\vec{z'}_C\) is not a lower bound for \(C\), then, by the definition of lower bounds, we know that it is not the case that \(\vec{\sigma}'_C\) is a joint strategy for \(C\) such that for all strategies \(\vec{\sigma}'_{-C}\) for \(\Ag\setminus C\), we have \(\pay_i(\rho(\vec{\sigma}'_C,\vec{\sigma}'_{-C}))\geq \pay_i(\rho(\vec{\sigma}_{-C},\vec{\sigma}'_C))\), for every \(i\in C\). That is, there exists \(i\in C\) and \(\vec{\sigma}'_{-C}\) for \(\Ag\setminus C\) such that \(\pay_i(\rho(\vec{\sigma}'_C,\vec{\sigma}'_{-C})) < \pay_i(\rho(\vec{\sigma}_{-C},\vec{\sigma}'_C))\). We will now choose \(\vec{\sigma}'_{-C}\) so that, in addition, \(\pay_i(\rho) \geq \pay_i(\rho(\vec{\sigma}'_C,\vec{\sigma}'_{-C}))\) for some \(i\). Let \(\vec{z''}_C = (\pay_j(\rho(\vec{\sigma}^j_{-C},\vec{\sigma}'_C)),\ldots,\pay_k(\rho(\vec{\sigma}^k_{-C},\vec{\sigma}'_C)))\) where \(\pay_i(\rho(\vec{\sigma}^i_{-C},\vec{\sigma}'_C))\) is defined to be \(\min_{\vec{\sigma}'_{-C}\in\Sigma_{-C}} \pay_i(\rho((\vec{\sigma}'_{-C}, \vec{\sigma}'_C)))\). That is, \(\vec{\sigma}^i_{-C}\) is a strategy for \(\Ag\setminus C\) which ensures the lowest mean-payoff for \(i\) assuming that \(C\) is playing the joint strategy \(\vec{\sigma}'_C\). By construction \(\vec{z''}_C\) is a lower bound for \(C\) --- since each \(z''_i = \pay_i(\rho(\vec{\sigma}^i_{-C},\vec{\sigma}'_C))\) is the greatest mean-payoff value that \(i\) can ensure for itself when \(C\) is playing \(\vec{\sigma}'_C\), no matter what coalition \(\Ag\setminus C\) does---and therefore, by hypothesis we know that for some \(i\in C\) we have \(\pay_i(\rho(\vec{\sigma}^i_{-C},\vec{\sigma}'_C)) \leq \pay_i(\rho)\). As a consequence, as before, \(i\) will not have an incentive to deviate along with \(C\setminus\{i\}\) from \(\vec{\sigma}\), and therefore coalition \(C\) will not be able to beneficially deviate from \(\vec{\sigma}\). Because \(C\) and \(\vec{\sigma}'_C\) where arbitrarily chosen, we conclude that \(\vec{\sigma}\in\coreset{G}\), proving the right-to-left direction and finishing the proof. \end{proof} With this lemma in mind, we want to determine if a given vector, \(\vec{z}_C\), is in fact a lower bound and importantly, how efficiently we can do this. That is, to understand the following decision problem: \begin{quote} \underline{\textsc{Lower Bound}}:\\ \emph{Given}: Game \(G\), coalition \(C \subseteq \Ag\), and vector \(\vec{z}_C \in \mathbb{Q}^{\Ag}\). \\ \emph{Question}: Is \(\vec{z}_C\) a lower bound for \(C\) in \(G\)? \end{quote} Using the \textsc{Multi-Mean-Payoff-Threshold} decision problem introduced earlier, we can prove the following theorem: \begin{theorem} \textsc{Lower Bound} is co-NP-complete. \end{theorem} \begin{proof} We prove membership as well as hardness by reducing to and from \textsc{Multi-Mean-Payoff-Threshold} in the obvious way. First, we show that \textsc{Lower Bound} lies in co-NP by reducing it to \textsc{Multi-Mean-Payoff-Threshold}. Suppose we have an instance, \((G, C, \vec{z}_C)\), and we want to determine if it is in \textsc{Lower-Bound}. We can do this by forming a two-player, multi-mean-payoff game, \(G' = (V_1, V_2, v^0, E, w', z^k)\). Here we have \(V_1 = \St\), \(V_2 = \St \times \Ac_C\) and \(v^0 = s^0\). Additionally, the set of edges of \(G'\), \(E\), is defined as, \begin{align*} E & = \{(s, (s, \ac_C)) \mid s \in \St, \ac_C \in \Ac_C\} \\ & \cup \{((s, \ac_C), \transf(s, (\ac_C, \ac_{\Ag \setminus C}))) \mid \ac_{\Ag \setminus C} \in \Ac_{\Ag \setminus C}\}, \end{align*} and the weight function, \(w' : E \to \mathbb{Z}^{\abs{C}}\), is defined by the following two patterns: \begin{align*} & w_i'(s, (s, \ac_C)) =w_i(s); \\ & w_i'((s, \ac_C), \transf(s, (\ac_C, \ac_{\Ag \setminus C}))) = w_i(s). \end{align*} Finally, we set \(z^{\abs{C}}\) to be \(\vec{z}_c\). Informally, the two players of the game are \(C\) and \(\Ag \setminus C\), the vector weight function is given by aggregating the weight functions of \(C\) and the threshold is \(\vec{z}_C\). Now, if in this game, player 1 has a winning strategy, then there exists some strategy \(\vec{\sigma}_C\) such that for all strategies of player 2, \(\vec{\sigma}_{\Ag \setminus C}\), we have that \(\rho(\vec{\sigma}_C, \vec{\sigma}_{\Ag \setminus C})\) is a winning run for player 1. But this means that \(\pay_i(\rho(\vec{\sigma}_C, \vec{\sigma}_{\Ag \setminus C})) \geq z_i\) for all \(i \in C\). But it is easy to verify that this implies that \(\vec{z}_C\) is a lower bound for \(C\) in \(G\). Conversely, if player 1 has no winning strategy, then for all strategies, \(\vec{\sigma}_C\), there exists some strategy \(\vec{\sigma}_{\Ag \setminus C}\) such that \(\rho(\vec{\sigma}_C, \vec{\sigma}_{\Ag \setminus C})\) is not a winning run. This in turn implies that for some \(j \in C\), we have that \(\pay_j(\rho(\vec{\sigma}_C, \vec{\sigma}_{\Ag \setminus C})) < z_j\), which means that \(\vec{z}_C\) is not a lower bound for \(C\) in \(G\). Also note that this construction can be performed in polynomial time, giving us the co-NP upper bound. For the lower bound, we go the other way and reduce from \textsc{Multi-Mean-Payoff-Threshold}. Suppose we would like to determine if an instance \(G\) is in \textsc{Multi-Mean-Payoff-Threshold}. Then we form a concurrent mean-payoff game, \(G'\), with \(k+1\) players, where the states of \(G'\) coincide exactly with the states of \(G\). In this game, only the \(1^{\text{st}}\) and \({(k+1)}^{\text{th}}\) player have any influence on the strategic nature of the game. If the game is in a state in \(V_1\), player one can decide which state to move into next. Otherwise, if the game is in a state within \(V_2\), then the \({(k+1)}^{\text{th}}\) player makes a move. Note we only allow moves that agree with moves allowed within \(G\). Now, in \(G'\), the first \(k\) players have weight functions corresponding correspond to the \(k\) weight functions of player 1 in \(G\). The last player can have any arbitrary weight function. With this machinery in place, we ask if \(z^k\) is a lower bound for \(\{1,\ldots, k\}\). In a similar manner of reasoning to the above, it is easy to verify that \(G\) is an instance of \textsc{Multi-Mean-Payoff-Threshold} if and only if \(z^k\) is a lower bound for \(\{1,\ldots, k\}\) in the constructed concurrent mean-payoff game. Moreover, this reduction can be done in polynomial time and we can conclude that \textsc{Lower Bound} is co-NP-complete. \end{proof} A notable omission from this section is that we have not presented any bounds for the complexity of \textsc{E-Core} in the general case. One reason for the upper bounds remaining elusive to us is due to the fact that whilst in a multi-mean-payoff game, player 2 can act optimally with memoryless strategies, player 1 may require infinite memory~\cite{Velner2015, Kopczynski2006}. Given the close connection between the core in our concurrent, multi-agent setting and winning strategies in multi-mean-payoff games, this raises computational concerns for the \textsc{E-Core} problem. Additionally, in~\cite{Brenguier2015}, the authors study the Pareto frontier of multi-mean-payoff games, and provide an algorithm for constructing a representation of the achievable values of a given game, but this procedure takes an exponential amount of time in the size of the input. The same paper also establishes \(\Sigma^p_2\)-completeness for the \emph{polyhedron value problem}. Both of these problems appear to be intimately related to the core, and we hope we might be able to use these results to gain more insight into the \textsc{E-Core} in the future. \section{Discussion and Related Work}\label{secn:conc} In this section, we present some conclusions, briefly discuss related work, discuss some issues related to the \core, and speculate about how to implement our approach using model checking techniques. \subsection{Coalition formation in cooperative games} Coalition formation with externalities has been studied in the cooperative game-theory literature~\cite{yi1997stable,uyanik2015nonemptiness,Finus2003}. These works considered several possible formulations of the \core. For instance, the \(\alpha\)-\core\ takes the pessimistic approach that requires that all members of a deviating coalition, \(S\), will benefit from the deviation regardless of the behaviour of the other coalitions that may be formed. Our first definition of the \core\ follows this approach. In contrast, \(\beta\)-\core\ takes an optimistic approach, and requires that the members of a deviating coalition \(S\) will benefit from at least one possibility of coalition formation of the rest of the players. In addition, \(\gamma\)-\core~\cite{Chander2010,Chander2007} assumes that the coalition structure that will be created after a deviation will include the deviating coalition \(S\) and the rest of the coalition structure will consist of all singletons. The ``worth'' of \(S\) is now defined as equal to its payoff in the Nash equilibrium between \(S\) and the other players acting individually, in which the members of \(S\) play their joint best response strategy against the individually best response strategies of the remaining players. It is well-known that \(\alpha\)- and \(\beta\)-characteristic functions lead to large cores~\cite{ray1997equilibrium}, which is consistent with our observation that, with respect to our first definition, the \core\ is never empty. Coalition formation is important in multi-agent system~\cite{shehory1998methods}. However, even though coalition formation with externalities is a widely-studied problem in multi-agent systems, not much work has studied the concept of stability in multi-agent coalition formation with externalities~\cite{mutzari2021coalition}. Instead, in artificial intelligence and multi-agent systems, most research has focused on the structure formation itself~\cite{rahwan2012anytime}. Notice that, from the point of view of cooperative game theory, our games are games of non-transferable utility (i.e., NTU games)~\cite[p.71]{Chalkiadakis2011}. For certain types of NTU games, there are other possible approaches to defining the core, for example through a translation into a conventional (transferable utility) game (see, e.g.~\cite[p.238]{Borm2015}). This approach might conceivably be used in our setting. \subsection{Rational verification of concurrent games} The formal verification of temporal logic properties of multi-agent systems, while assuming rational behaviour of the agents in such a system, has been studied for almost a decade now; see, for instance,~\cite{Gutierrez2015,Gutierrez2017a,WooldridgeGHMPT16,Kupferman2016,Kupferman2007}. However, to the best of our knowledge, all these studies have considered a non-cooperative setting, even if coalitional power is allowed, for instance, as in a strong Nash equilibrium. Nonetheless, also in such non-cooperative settings, the complexity of checking whether a temporal logic property is satisfied in a stable outcome of the game is a \textsc{2ExpTime}-complete problem, even for two-player zero-sum games where only trivial coalitions can be formed. On the positive side, cooperative games seem to have better model-theoretic properties in the rational verification framework: with respect to our first definition of the \core\ (which corresponds to the concept of \(\alpha\)-\core\ in the literature of cooperative games), a witness in the core is always guaranteed (since the \core\ is never empty), preserved across bisimilar systems, and can be checked in practice using \atlstar\ model checking techniques, which are supported by, \emph{e.g.}, MCMAS~\cite{Lomuscio2017}, an automated formal verification tool that can perform \atlstar\ model checking (via an implementation of SL[1G], which subsumes \atlstar~\cite{CermakLM15}) and allows specifications of concurrent game structures in ISPL (Interpreted Systems Programming Language, the modelling language of MCMAS, based on the interpreted systems formalism~\cite{Fagin1995}).
{'timestamp': '2023-01-18T02:14:17', 'yymm': '2301', 'arxiv_id': '2301.06157', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06157'}
arxiv
\section{Remaining figures for main experiment} \begin{figure*}[h] \centering \begin{subfigure}{0.99\textwidth} \centering \hspace*{\fill} Relative NLL error $(\downarrow)$ \hfill Coefficient MSE $(\downarrow)$ \hfill Relative ROC $(\uparrow)$ \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}chemreact \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_chemreact_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_chemreact_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_chemreact_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}census \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_census_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_census_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_census_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}bank \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_bank_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_bank_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_bank_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \caption{All subsampling methods are compared over a range of 25 subsample sizes. Each row represents one dataset and each column represents a different evaluation metric. Each point represents a median of 50 replications, with shaded areas representing interquartile range. The three smaller datasets are shown here, with the remaining in the main paper.} \label{fig:main_more} \end{figure*} \FloatBarrier \clearpage \section{Effect of L2 regularization} \begin{figure*}[h] \centering \begin{subfigure}{0.99\textwidth} \centering \hspace*{\fill} $\lambda=10^{-3}$ \hfill $\lambda=10^{-1}$ \hfill $\lambda=10$ \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}KDD cup \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_kddcup_rel_nll_error_0.001.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_kddcup_rel_nll_error_0.1.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_kddcup_rel_nll_error_10.0.pdf} \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}Webb spam \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_webspam_rel_nll_error_0.001.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_webspam_rel_nll_error_0.1.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_webspam_rel_nll_error_10.0.pdf} \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}covertype \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_covtype_rel_nll_error_0.001.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_covtype_rel_nll_error_0.1.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_covtype_rel_nll_error_10.0.pdf} \hspace*{\fill} \end{subfigure} \caption{Additional results. Increasing L2 regularization noticeably improves the efficiency of uniform subsampling relative to other strong-performing methods. This shows concordance with the theoretical results in \cite{curtin2019coresets}.} \label{fig:l2_more} \end{figure*} \FloatBarrier \clearpage \section{Replicated analysis for weakened regularization} The final table was not shown in main paper due to space, and is a comparison among coreset methods with regularization $\lambda=10^{-7}$. \begin{table}[h] \centering \caption{Comparison of coreset methods with each other for logistic regression with further weakened regularization. In many cases one coreset method is significantly better than another, but not better than uniform random sampling as shown in \autoref{tbl:uniform_reg}. } \label{tbl:bases_reg} \adjustbox{max width=\columnwidth}{% \begin{tabular}{@{}llll@{}} \toprule \multicolumn{1}{c}{Comparison} & \multicolumn{1}{c}{NLL} & \multicolumn{1}{c}{MSE} & \multicolumn{1}{c}{ROC} \\ \midrule k-means - leverage & 1 & 1 & 1 \\ k-means - lewis & 1 & 1 & 1 \\ k-means - monotonic & \textbf{2.710E-6} & \textbf{4.969E-4} & \textbf{5.764E-5} \\ k-means - osmac\_mse & 0.769 & 1 & 1 \\ k-means - osmac\_vc & 1 & 1 & 1 \\ leverage - lewis & 1 & 1 & 1 \\ leverage - monotonic & \textbf{0.001} & \textbf{0.001} & \textbf{0.013} \\ leverage - osmac\_mse & 1 & 1 & 1 \\ leverage - osmac\_vc & 1 & 1 & 1 \\ lewis - monotonic & \textbf{5.800E-4} & \textbf{9.681E-5} & \textbf{0.016} \\ lewis - osmac\_mse & 1 & 1 & 1 \\ lewis - osmac\_vc & 1 & 1 & 1 \\ monotonic - osmac\_mse & 0.03 & \textbf{4.139E-4} & 0.09 \\ monotonic - osmac\_vc & \textbf{0.002} & \textbf{7.351E-5} & \textbf{0.008} \\ osmac\_mse - osmac\_vc & 1 & 1 & 1 \\ \bottomrule \end{tabular} } \end{table} \FloatBarrier \clearpage \section{L1 regularization} One may further ask how the subsampling methods perform with L1 regularization, which induces sparsity in the estimated coefficients. To study this question, we selected the three datasets with most features $d$, which are census, chemreact, and Webb spam, and repeated our experiment with the L1 penalty equal to $\lambda=0.001$. We measured the support accuracy, which refers to the average agreement between $\hat\beta_C$ and $\hat\beta_{MSE}$ on whether a feature should be in the model. All methods improve as the coreset size increases, and methods like osmac\_mse and leverage appear to be effective performers. However, it appears that feature selection with high accuracy requires subsampling at the high end of our tested range. As all prior theory for subsampling target quantities such as the coefficient MSE which are agnostic to sparsity, we think this area is of interest for future study. \begin{figure*}[h] \centering \begin{subfigure}{0.99\textwidth} \centering \hspace*{\fill} census \hfill chemreact \hfill Webb spam \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l1_exp/fig_census_sparse_acc_0.001.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l1_exp/fig_chemreact_sparse_acc_0.001.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l1_exp/fig_webspam_sparse_acc_0.001.pdf} \hspace*{\fill} % \end{subfigure} \caption{Support accuracy measures the average agreement between $\hat\beta_C$ and the $\hat\beta_{MSE}$ on whether a feature should be in the model, when L1 regularization is used to promote sparsity. The three datasets with the most features are shown here. $\lambda=0.001$ is used in all three figures. Higher is better.} \label{fig:l1} \end{figure*} \FloatBarrier \clearpage \section{Experiment details} \subsection{Datasets} We detail our dataset sources and preprocessing steps here and in our code. Most datasets have previously been used in coreset papers, which was our primary motivation for including them. However, we include more features where possible, including categorical. In many cases, prior works only used a few numerical columns, for which we sometimes observed worse performance on the same datasets when including more features. We believe this makes our evaluation more challenging and realistic. \textbf{chemreact, Webb spam, covtype}. For these datasets we directly used the preprocessed versions and code from \cite{huggins2016coresets} (\url{https://bitbucket.org/jhhuggins/lrcoresets/src/master/}). These match standard usage of the datasets, except for Webb spam. This dataset contained 126185 entries instead of 350000 which was reported in their paper. We used the version that was available. \textbf{KDD cup 99}. We obtained the 10\% subset from \url{http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html}. Columns 2-4 are categorical which we one-hot encoded. We applied min-max scaling to the range [-1, 1] and reserved 5\% for the test set. \textbf{bank}. We obtained the dataset from the UCI repository \url{https://archive.ics.uci.edu/ml/datasets/bank+marketing}. We kept the numerical variables age, duration, campaign, previous, emp.var.rate, cons.conf.idx, euribor3m, nr.employed and the categorical variables job, marital, education, default, housing, loan, contact, month, day\_of\_week, poutcome which we one-hot encoded. We applied min-max scaling and reserved 5\% for the test set. \textbf{census}. We obtained the dataset from the UCI repository \url{https://archive.ics.uci.edu/ml/datasets/census+income}. We identified and kept columns 1, 3, 5, 11, 12, 13 as numeric, and columns 2, 4, 6, 7, 8, 9, 10, 14 as categorical, which we one-hot encoded. We min-max scaled the dataset and reserved 5\% as the test set. \textbf{SUSY}. This is the most large-scale dataset we used in order to benchmark coresets on a more realistic application scale. We obtained it from \url{https://archive.ics.uci.edu/ml/datasets/SUSY}. All features are numeric so we applied min-max-scaling. As described in their readme, we reserved the final 500k rows as the test set, leaving 4.5 million for training. \textbf{bitcoin}. This is a dataset of bitcoin ransomware attacks vs benign transactions, obtained from \url{https://archive.ics.uci.edu/ml/datasets/BitcoinHeistRansomwareAddressDataset}. We also selected this dataset because it was one of the larger non-simulated datasets available. We kept the numeric columns length, weight, count, looped, neighbors, income. We also used the year and day columns as categorical: We one-hot encoded the year directly. For day, we binned the days into 12 groups roughly corresponding to months, and one-hot encoded that. We applied min-max scaling and reserved 5\% as the test set. \subsection{Coreset code sources} For $k$-means coreset we used their public code at \url{https://bitbucket.org/jhhuggins/lrcoresets/src/master/}. We modified their sampling function to return the entire $(X, y, w)$ coreset so we could fit the subsampled model. We found the R package for OSMAC from \url{https://rdrr.io/github/Ossifragus/OSMAC/}. We re-implemented the method in Python and referred to their code to resolve ambiguities. To the best of our knowledge, no code was available for any other coreset method so we re-implemented them based on their papers. \subsection{Computational details} We distributed the coreset experiments over a cluster of 250 CPUs. A single experiment with 50 replications runs relatively quickly, from a few seconds to a few minutes depending on the size of the data. It was important to precompute the full data coefficient MLEs to save on runtime. We used seeds 0-49 for the replications. All models were implemented using numpy and scipy routines. The $k$-means coreset uses Cython which was compiled following the instructions in their code. \FloatBarrier \clearpage \section{$k$-means coreset parameters} Below we compare the effects of varying $k$ and $R$. We show on two of the original datasets and metric (estimated test NLL) from the $k$-means coreset paper to be comparable to the original and not overfit in our main experiments. As seen, $R=1.0$ is the best, while $k$ does not make much difference. \begin{figure*}[h] \centering \begin{subfigure}{0.99\textwidth} \centering \hspace*{\fill} covertype \hfill Webb spam \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}Impact of $R$ \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.3\textwidth, trim=0cm 0cm 0cm 0cm]{figs/supp_kmeans/fig_l2_1e-05_covtype_est_test_nll.png} \hfill \includegraphics[width=0.3\textwidth, trim=0cm 0cm 0cm 0cm]{figs/supp_kmeans/fig_l2_1e-05_webspam_est_test_nll.png} \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer} Impact of $k$ \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.3\textwidth, trim=0cm 0cm 0cm 0cm]{figs/supp_kmeans/fig_1.0_l2_1e-05_covtype_est_test_nll.png} \hfill \includegraphics[width=0.3\textwidth, trim=0cm 0cm 0cm 0cm]{figs/supp_kmeans/fig_1.0_l2_1e-05_webspam_est_test_nll.png} \hspace*{\fill} \end{subfigure} \label{fig:k_vs_r} \end{figure*} \section{Introduction} \label{sec:intro} It has become common, even routine, for researchers to have massive datasets in reach for modeling and prediction. Using standard machine learning tools for datasets with over millions of observations $n$ or thousands of features $d$ is challenging when many algorithms have superlinear scaling with the data dimensions. In terms of time and resources, even training a simple linear model becomes an expensive endeavor. A natural workaround for excessively large data is to subsample a set of rows $m$ without losing significant information. The specific form of information to be preserved, and hence the best strategy to accomplish this, depends on the task. In the logistic regression setting, we have a data matrix $X\in \mathbb{R}^{n\times d}$, labels $y\in\{-1, 1\}^n$, and a loss function $f(x) = \log(1 + e^{-x})$, and the goal is to find the weights $\beta^\star$ which minimizes the objective function $L(\beta; X, y) = \sum_{i=1}^n f(y_i x_i^\top\beta)$. There are three natural quantities which a subsampling method may choose to approximate: \begin{enumerate} \item The model fit, measured as the sum of validation losses \item The maximum likelihood estimate (MLE) $\hat\beta_{MLE}$ \item The model's performance on unseen data \end{enumerate} By subsampling, a practitioner will fit a logistic regression over only $m$ points instead of $n$. Each of the $m$ points is permitted an instance weight $w_i$ for the fitting procedure, which indicates the level of representation of that point in the linear model. Recently a number of works proposed coresets for logistic regression which target quantity (1). A coreset consists of a set of $m\ll n$ weighted points whose objective function approximates that of the full dataset for any $\beta$. More precisely, if there is a subset $C$ of the data consisting of $x_{c_1}, \ldots, x_{c_m}$ and weights $w_1, \ldots, w_m$, such that for all $\beta \in \mathbb{R}^d$, $$ \bigg|\sum_{i=1}^m w_i f(y_{c_i} x_{c_i}^\top \beta) - L(\beta; X, y) \bigg| \leq \epsilon \cdot L(\beta; X, y)$$ then the points form an $(1+\epsilon)$-coreset of $X$. The coreset literature suggests sampling strategies, known as \textit{sensitivity sampling}, over the rows in $X$ so that with probability $1-\delta$ the resulting subsample is a $(1+\epsilon)$-coreset. The sensitivity can be viewed intuitively as the worst-case influence of a given data point on the objective over all values of $\beta$. Points which are highly influential should be more likely to be sampled into the coreset. While the sensitivity is intractable because it involves optimizing over all values of $\beta$, various strategies are used to approximate (and more specifically, upper-bound) the sensitivity in order to sample data. These include $k$-means clustering \cite{huggins2016coresets}, leverage scores \cite{munteanu2018coresets}, and row norms \cite{tolochinsky2018coresets}. Using theoretical frameworks based on \cite{feldman2011unified,braverman2016new}, probabilistic bounds are derived to relate a given subsample size $m$ to $\epsilon$ and $\delta$ (for example, the minimum $m$ needed to achieve some $\epsilon$). Because the primary quantity of interest has been approximating the objective function, attention has not been given to how the minimizer $\hat\beta_C$ of the coreset objective relates to $\hat\beta_{MLE}$. In particular, the standard $(1+\epsilon)$-coreset needs to hold for all $\beta$, whereas we may only be interested in the approximation performance of the coreset in a neighborhood of $\hat\beta_{MLE}$. Recently the statistics literature on optimal subsampling has investigated this area by focusing on target (2). \citet{wang2018optimal} proposes a subsampling procedure with conditions where $\hat\beta_C$ converges to $\hat\beta_{MLE}$. While the asymptotic performance of such procedures has been studied \cite{wang2018optimal,ting2018optimal}, finite sample bounds like those in the coreset literature have not yet been developed. Finally, while some of the above works have empirically examined coreset performance on (3), this has not been a main focus. Since large-scale logistic regression models are often trained in order to get predictive power over unseen data, it is crucial that prediction quality does not greatly deteriorate when subsampling is applied. Based on these frameworks, numerous sampling strategies have been presented in the literature with theoretical support. While each respective method was supported by experimental results, a comprehensive evaluation has been missing. Some limitations of previous studies are: \begin{itemize} \item Each method is benchmarked with at most one or two competitors on a small selection of real-world datasets. The datasets vary greatly in size depending on the study, from thousands of rows to millions. \item The evaluation metric has not consistent across these works, with some assessing objective function error, some measuring the error of estimating $\hat\beta$ itself, etc. \item Subsample size ranges: Some works examine coresets with only hundreds of samples even on large datasets, while others do not consider very small coreset sizes. In our work we find that some methods are more effective in certain size regimes. \end{itemize} In our experiment design we account for these limitations by benchmarking most known subsampling methods for logistic regression over a large variety of realistic datasets. We are the first to present a thorough empirical comparison of these approaches, over a range of important metrics. In the process we discover that most existing algorithms show inconsistencies in performance across datasets, with many of them not outperforming the uniform sampling baseline. Furthermore, we find that one of the earliest coreset methods still performs among the best, despite being ignored in all recent evaluations. We additionally show that our results are robust across regularization settings. In \autoref{sec:related_work} we give context on the importance of reproducibility research. We then detail the coreset and optimal subsampling algorithms in \autoref{sec:methods} and our evaluation procedure in \autoref{sec:evaluation}. Our results are shown and discussed in \autoref{sec:results}. Finally we conclude in \autoref{sec:conclusion}. \section{Related Work} \label{sec:related_work} The primary focus of our study is on the matter of reproducible research. Considerable work has been done in replicating research as described by the original manuscripts \cite{Raff2019_quantify_repro} and in developing repeatable infrastructure so that a manuscript's code can be easily re-run \cite{Claerbout1992,Forde2018,Zaharia2018AcceleratingTM,Forde2018ReproducingML}. While such research is valuable for understanding the nature of replication and its incentives \cite{Raff2020c,Raff2022,Raff2022a}, it also repeats any methodological errors from the original manuscript where conclusions could change under different evaluation \cite{pmlr-v97-bouthillier19a}. This methodological concern has grown in recent years, with many sub-fields in machine learning discovering different results when a more thorough evaluation is performed. \citet{Musgrave2020} showed that metric learning was not improving with new triplet mining and losses, but rather more general neural architectures, data augmentation, and optimization strategies. \citet{mlsys2020_73} found inconsistencies in neural architecture search and built a new benchmarking framework to standardize. \citet{Dacrema2019} and \citet{10.1145/3383313.3412489} also found that in recommender systems many results could be replicated as described in the original works, but when a simple baseline was properly tuned the advantage of proposed techniques disappeared. This is similar to our own work, except our baseline is naive uniform random sampling. \citet{Eggensperger2021} similarly showed hyper-parameter optimization conclusions could change in a thorough benchmark, though most methods did improve upon naive baselines. Our work follows in performing a through evaluation of coreset methods, where we find that most prior seminal methods often fail to improve upon the naive baseline of uniform random sampling. A sub-concern of methodological evaluation is the method by which conclusions about one method being ``better'' than another are drawn. Early work in the machine learning field proposed a number of alternative schemes on how to balance valid statistical testing with the computational limits of performing the necessary experiments ~\cite{Kubat1997,Bradley1997,Dietterich:1998:AST:303222.303237,Alpaydin:1999:CTC:339993.339999}, but multiple later results~\cite{Demsar:2006:SCC:1248547.1248548,JMLR:v17:benavoli16a} showed that using a non-parametric test was a highly effective means of drawing a valid conclusion, with computational limits mostly unnecessary given advancements in computing speed. This is not true in all cases. In particular deep learning can be highly compute intensive and needs alternative strategies \cite{Bouthillier2021}, but our work is focused on logistic regression coresets and so we can use the non-parametric test for robust conclusions. While other approaches to robust conclusions have been proposed recently we consider them beyond our intended scope ~\cite{Soboroff:2018:MRE:3269206.3271719,Berrar2016}. \section{Subsampling Methods} \label{sec:methods} \begin{table*}[t] \centering \adjustbox{max width=\textwidth}{% \begin{tabular}{lccl} \toprule Coreset & Weights & Coreset size & Details \\ \midrule $k$-means & $s_i = \frac{n}{1+\sum_{j=1}^k |G_j^{(-i)}| e^{-R \lVert \bar{G}_{j}^{(-i)} - Z_i\rVert} }$ & $O\big(\frac{\bar{s}}{\epsilon^2} (d+1)\log \bar{s} + \log\frac{1}{\delta} \big)$ & $G_j$ are $Z_i$ assigned to cluster $j$, $Z_i=X_i y_i$ \\ \texttt{Leverage} & $s_i = \lVert Q_i\rVert_2 + \frac{1}{n}$, where $Z=QR$ & $\tilde{O}\big(\frac{\mu_y(X) \sqrt{n} d^{3/2} }{\epsilon^2} \big)$ & $Z_i=-X_i y_i$, $X$ is $\mu$-complex\\ % \texttt{Monotonic} & $s_i=\frac{132\sqrt{k} \lVert p_i \rVert + 2}{i}$ & $O\big( \frac{t}{\epsilon^2}(d\log t + \log\frac{1}{\delta} ) \big)$ & $p_i=\mathrm{sorted}(x_i)$, $k=\frac{1}{2\lambda}$, $t=\sum s_i$ \\ \texttt{Lewis} & $s_i=\mathrm{Lewis}(X)$ & $\tilde{O}\big( \frac{\mu_y(X)^2 d }{\epsilon^2} \big)$ & $\mu$-complex, \texttt{Lewis} in \cite{cohen2015lp} \\ \texttt{OSMAC} (vc) & $s_i = |y_i - p_i(\hat\beta)| \cdot \lVert x_i\rVert$ & -- & $p_i$ estimated probs. using pilot $\hat\beta$\\ \texttt{OSMAC} (mse) & $s_i = |y_i - p_i(\hat\beta)| \cdot \lVert M_X^{-1} x_i\rVert$ & -- & $M_X=\frac{1}{n} \sum p_i(\hat\beta)(1-p_i(\hat\beta)) x_i x_i^\top$ \\ uniform & $s_i = 1$ & $\tilde{O}\big( \frac{n^{1-\kappa} d}{\epsilon^2} \big)$ & $\lVert x_i\rVert_2 \leq 1$, regularization $\lambda \propto n^\kappa$ \\ \bottomrule \end{tabular} } \caption{Computational expressions (corresponding to line 1 of Algorithm \ref{algo:procedure}) and theoretical size of a $(1+\epsilon)$-coreset for each coreset method evaluated. The notation $\tilde{O}$ suppresses logarithmic factors. This is used in some methods like \texttt{Leverage} where the $\log 1/\delta$ is re-expressed as a multiplicative logarithmic constant, or the expression is otherwise very lengthy. Throughout $X\in \mathbb{R}^{n\times d}$, $y \in \mathbb{R}^n$, $\lambda$ is the regularization parameter, and $\delta$ is the failure probability.} \label{tab:method_details} \end{table*} We identified and implemented several subsampling methods for logistic regression from the literature. All methods follow the same general procedure, as described in Algorithm \ref{algo:procedure}. The final weights are designed so that the sum of losses over the subsample is on the scale of the loss over all $n$ points, which enables the coreset objective to approximate the full data objective. The subsample is then used to fit a weighted logistic regression model, i.e. $\hat\beta_C$ minimizing $\sum_{j=1}^m w_i f(y_{c_j} x_{c_j}^\top \beta)$. This subsampled estimate is finally compared with the full data MLE. We next briefly describe the methods being evaluated along with implementation details that we found were necessary in order to reproduce the original results. We refer the reader to the original publications for the nuanced details of each method. This six prior methods, plus our naive baseline are detailed below. Furthermore, mathematical expressions for the coreset weights and theoretical sizes are shown in \autoref{tab:method_details}. \begin{algorithm}[h] \centering \caption{Coreset sampling procedure} \label{algo:procedure} \begin{algorithmic}[1] \Require Datasets $X\in \mathbb{R}^{n\times d}$, $y\in \mathbb{R}^n$, desired subsample size $m$, method to compute importance weights $\mathrm{CoresetMethod}$ \State Compute $\{s_i\}_{i=1}^n \gets \mathrm{CoresetMethod}(X, y)$ \For{$i$ in $1:n$} \State $p_i \gets s_i / \sum_{i=1}^n s_i$ \EndFor \State Sample $m$ rows from $X, y$ using probabilities $\{p_i\}$ to get $X_c, y_c$ \For{$j$ in $1:m$} \State $w_j \gets 1 / (p_{c_j} \cdot n)$ \EndFor \State \Return coreset $(X_c, y_c, w) = \{x_{c_j}, y_{c_j}, w_j\}_{j=1}^m$ \end{algorithmic} \end{algorithm} \textbf{$k$-means coreset} \cite{huggins2016coresets}. This was one of the first coresets proposed for logistic regression. The theoretical analysis is based on the framework developed in \cite{braverman2016new, feldman2011unified}, where the key step is to upper bound the sensitivity score of each data point. If the upper bound is too loose, then a larger $m$ is needed to achieve the same $\epsilon$ coreset. This work used $k$-means clustering on a uniform subsample of the data to compute the upper bound importance weights based on distance from cluster centers. The method has two hyperparameters, the number of clusters $k$ and the radius $R$ of the ball containing $\beta$. We found that the results were robust to $k$ and chose $k=6$. While the theory requires $\beta$ to be bounded for the results to hold, in practice we found $R=1$ usually performed the best even if $\max_d |\hat\beta_{MLE}|$ exceeded 1. The only other work to evaluate the $k$-means coreset is \cite{munteanu2018coresets}, where $R$ was set to be unbounded. However, as $R\to\infty$ the importance weights converge to the uniform distribution, so their results are not representative of the effectiveness of the $k$-means method. No other works have benchmarked this method, so we felt it was important to give it a fair chance. \textbf{Leverage coreset} \cite{munteanu2018coresets}. The $\ell_2$-leverage scores have been used to approximate $\lVert X \theta\rVert_2$ with $\lVert X' \theta \rVert_2$ for a row-wise reduced matrix $X'$ up to $(1+\epsilon)$ relative error \cite{cohen2015lp}. In \cite{munteanu2018coresets}, the root leverage scores are shown to be an effective upper bound on the sensitivities. The scores are computed by taking the row-wise L2-norm of an orthonormal basis of $X$. Such a basis was obtained with the QR-decomposition. A further step bins the sampling probabilities into multiples of 2 to reduce the complexity of the procedure. While an approximate QR-decomposition algorithm was used in the paper, it was faster for us to use the optimized \texttt{numpy.linalg.qr} routine for an exact solution. Another important detail for the method to give good results was to make sure any columns of 1s used to include the intercept were removed prior to computing $Q$. \textbf{Monotonic coreset} \cite{tolochinsky2018coresets}. Unlike the previous coreset works, this work develops bounds on the sensitivity of logistic regression when regularization is used. The sampling weights are computed to be proportional to the lengths of the data points, scaled by the relative index of each point in sorted order. The weights are further scaled by $\sqrt{k}$ where $k$ is the regularization parameter (which in our version is equivalent to $\frac{1}{2\lambda}$). Thus their framework requires the use of regularization. \textbf{Lewis coreset} \cite{mai2021coresets}. An $\ell_1$ analog of the leverage scores, the \texttt{Lewis} scores approximate the quantity $\lVert X\theta\rVert_1$ up to $(1+\epsilon)$ relative error. Using their similarity to hinge-like loss functions including the logistic loss, this work derives coreset results for such functions. While intuitively similar to the root leverage coreset, they are the first to show a linear rather than polynomial dependence on the feature dimension $d$ via their proof technique. In practice, computing the \texttt{Lewis} weights requires iteratively computing the leverage scores $t$ times using the algorithm of \cite{cohen2015lp}, thus giving an approximate runtime of $t$ times that of the \texttt{Leverage} coreset. As reported in their paper, we found that the method fully converged for $t=20$ while being acceptable for $t=5$, so we used $t=5$ to avoid excessive run times. \textbf{OSMAC} \cite{wang2018optimal}. This work shows that under relatively mild conditions, the MLE $\hat\beta$ under a subsampling distribution converges to the full data MLE as the coreset size increases. The \texttt{osmac\_{mse}} is proposed as such a subsampling method. Furthermore the distribution of $\hat\theta - \hat\theta_{MLE}$ is shown to be asymptotically normal, with the resulting covariance matrix being minimized by the \texttt{OSMAC\_{MSE}} weights. The scores are computed by taking into account the residual $(y - \hat y)$, normalized by a covariance matrix weighted by the expected binomial variance at each point. This has a similar form to the leverage while using label and model fit information, and can also be interpreted as the influence function as in \cite{ting2018optimal}. The authors additionally propose a second method \texttt{OSMAC\_{VC}} which replaces the covariance matrix with the identity for computational efficiency. Both methods require the actual MLE $\theta$ to estimate the residuals and weighted Hessian (in the first case) accurately, so an initial pilot estimate using a uniform subsample is required. In our experiments we used a subsample of $m/2$ for the pilot estimate. We found that results were unreliable at small sizes. Checking with the source code, we identified that the authors weighted the pilot sample to have evenly balanced classes. Implementing this ourselves led to more stable pilot estimates. \textbf{Influence subsampling} \cite{ting2018optimal}. The influence function uses a second-order approximation of the loss to estimate the effect of infinitessimally upweighting each point in the dataset, as motivated in \cite{hampel1974influence,koh2017understanding}. For the logistic regression case, the form of the influence is equivalent to the score used in \texttt{OSMAC\_{MSE}}. Thus we do not show this method separately. Like the previous, this work also proves the asymptotic optimality of influence sampling, albeit with a different framework. \textbf{Uniform coreset}. It was shown in \cite{munteanu2018coresets} that in unconstrained logistic regression there exist general datasets for which no sublinear coreset exists \cite{munteanu2018coresets}. In order to bound the sensitivity, they rely on the notion of $\mu$-complexity, which measures for a dataset, over all $\beta$, the worst-case ratio of sum-log-odds between incorrectly and correctly classified points. The smaller this quantity is, the more effective the \texttt{Leverage} coreset is. \cite{curtin2019coresets} pointed out that when sufficient regularization is used, the sensitivity of logistic regression is controlled over all datasets. Therefore, uniform subsampling is an effective coreset for all datasets and is in fact nearly optimal under sufficient regularization. In our experiments we use very weak regularization and will show that even in nearly unconstrained settings that the uniform coreset is competitive with other methods. \textbf{Combining coresets}. Coreset methods can be composed, e.g. by recursively applying the subsampling procedure. For example, \cite{munteanu2018coresets} give additional theoretical bounds for a recursive coreset. Due to the added complexity when stacking results, we consider these methods to be outside the scope of our evaluation. Thus in all methods we limit the coreset generation to a single round of subsampling. \section{Evaluation procedure} \label{sec:evaluation} \begin{table}[ht] \centering \begin{tabular}{lcccc} \toprule Dataset & $n$ & $d$ & $d$ (num.) & \% pos \\ \midrule chemreact & 24059 & 100 & 100 & 3.00 \\ census & 30932 & 100 & 6 & 24.1 \\ bank & 39128 & 51 & 8 & 11.3 \\ webspam & 126185 & 127 & 127 & 60.7 \\ kddcup & 469319 & 41 & 35 & 80.3 \\ covtype & 551961 & 54 & 10 & 51.2 \\ bitcoin & 2770862 & 24 & 6 & 1.42 \\ SUSY & 4500000 & 18 & 18 & 45.7 \\ \bottomrule \end{tabular} \caption{Characteristics of datasets used in the study, with rows $n$, features $d$, numeric features (i.e. not categorical columns which are one-hot encoded), and percent positive class. Additional details on dataset preprocessing and sources are in the Appendix.} \label{tab:data} \end{table} Our aim is to unify previous experimental methods into a single comprehensive procedure. In this procedure we aim to resolve the limitations from previous evaluations: \textbf{Datasets}. While previous work used at most 3 datasets, we evaluate on 8 datasets which include previously used ones as well as new ones. The sizes range from 24000 to nearly 5 million (\autoref{tab:data}). \textbf{Evaluation metric}. In accordance with the three aims of subsampling as described in the Introduction, we assess the following metrics: \begin{itemize} \item Relative negative log-likelihood (NLL) error to assess the model fit: $$|L(\hat\beta_C; X, y) - L(\hat\beta_{MLE}; X, y)| / L(\hat\beta_{MLE}; X, y)$$ \item The mean squared error (MSE) of the MLE: $$\lVert \hat\beta_C - \hat\beta_{MLE}\rVert_2^2$$ \item Relative ROC of the subsampled model on validation data: $ROC(\hat\beta_C, X, y) / ROC(\hat\beta_{MLE}, X, y)$ \end{itemize} \textbf{Subsample sizes}. We consider 25 subsample sizes on a logarithmically spaced grid from 200 to 100000. (For datasets with fewer rows we limit the upper end of the evaluation range.) We replicate each procedure 50 times and report the medians and inter-quartile intervals. This is a much broader range of evaluation than in previous work. \textbf{Regularization}. Most coreset methods directly handle regularization by adding the penalty to the loss function, giving for example $f(x; \beta)=\log(1 + e^{-x}) + \lambda \lVert \beta \rVert_2^2$. Some previous works, including \cite{munteanu2018coresets, wang2018optimal} only evaluate their methods on unconstrained logistic regression, while certain methods require the use of regularization \cite{tolochinsky2018coresets}. Furthermore, recent theoretical work has shown that the uniform subsampling method produces an effective coreset in the presence of regularization \cite{curtin2019coresets}. In our main experiments, we use weak L2 regularization at $\lambda=10^{-5}$ as some of the datasets produce unstable results without any regularization. Coefficient estimates generally did not further change when further weakening $\lambda$. We conduct additional analysis at varying $\lambda$ values and our main conclusions did not change. Our $\lambda$ is defined with respect to the objective $\frac{1}{2n} \sum f(y_ix_i^\top \beta) + \lambda \lVert \beta \rVert_2^2$. Because of the normalizing $n$, when we fit a subsampled logistic regression, we normalize the modeling weights $w_i$ to maintain the same level of regularization with respect to the data loss term. For loss parameterizations without the normalizing $n$, the original $w_i$ should be used. \begin{figure*} \centering \begin{subfigure}{0.99\textwidth} \centering \hspace*{\fill} Relative NLL error $(\downarrow)$ \hfill Coefficient MSE $(\downarrow)$ \hfill Relative ROC $(\uparrow)$ \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}Webb spam \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_webspam_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_webspam_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_webspam_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}KDD cup \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_kddcup_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_kddcup_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_kddcup_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}covertype \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_covtype_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_covtype_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_covtype_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}bitcoin \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_bitcoin_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_bitcoin_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_bitcoin_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}SUSY \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_susy_rel_nll_error.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_susy_err_theta.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/main_exp/main_susy_rel_roc.pdf} \hspace*{\fill} % \end{subfigure} \caption{All subsampling methods are compared over a range of 25 subsample sizes. Each row represents one dataset and each column represents a different evaluation metric. Each point represents a median of 50 replications, with shaded areas representing interquartile range. The five largest datasets are shown here, with the remaining deferred to \autoref{fig:main_more}.} \label{fig:main} \end{figure*} \section{Results} \label{sec:results} Our primary comparison is shown in \autoref{fig:main}, with remaining datasets in \autoref{fig:main_more}. The relative performance of subsampling algorithms vary by dataset but are generally consistent across metrics. This shows that accurately estimating $\hat\beta_{MLE}$ with $\hat\beta_C$ leads to effective logistic regression subsampling regardless of the metric of interest. Methods such as \texttt{Leverage}, \texttt{Lewis}, and \texttt{OSMAC\_{MSE}} are very effective on KDD cup relative to the \textit{uniform} baseline, but not so much on others. In fact, the uniform baseline frequently outperforms other coreset methods across datasets. In addition, while previous works which had stopped showing the \textit{$k$-means} coreset due to perceived lack of performance, our results find that despite being the earliest method, it turned out to be one of the most competitive when properly tuned. The \texttt{Monotonic} method was formulated to work with regularization, so we may expect it to perform weaker. However, increasing the L2 penalty still does not improve it over the uniform baseline (\autoref{fig:l2}). The \texttt{OSMAC} methods show large variability, with \texttt{OSMAC\_{MSE}} giving strong performances on Webb spam and bitcoin but worse performances on other datasets, especially at small subsampled sizes. This may be due to challenges in obtaining a reliable inverse Hessian matrix with small sample sizes. We follow recommendations by \cite{Demsar:2006:SCC:1248547.1248548,JMLR:v17:benavoli16a} and use a non-parametric test to determine if there is a significant difference between all coreset methods. We compute the non-parametric Dunn test using the JASP software. This software performs a multiple test correction per metric, but not across metrics. Since we have three metrics, this means the proper threshold for significance is $\alpha \leq 0.05/3 \approx 0.0167$. We first look at the results in \autoref{tbl:uniform}, where each method is compared against the uniform sampling baseline. This result shows that when accounting for the number of tests performed, only the \texttt{OSMAC} methods beat the uniform baseline and only when measuring by MSE of $\beta$. We remind the reader this is a somewhat Pyrrhic victory, as Figures \ref{fig:main} and \ref{fig:main_more} show that both \texttt{OSMAC} variants perform worse than uniform sampling in different regimes of the coreset size. \begin{table}[!h] \centering \caption{Comparisons with uniform baseline, with multiple test corrected $p$-value in the three right most columns. We can see that none of the coreset methods are significantly different than a uniform random sampling baseline by the NLL or ROC metrics. Only \texttt{OSMAC} outperforms uniform sampling for the MSE metric. } \label{tbl:uniform} \begin{tabular}{@{}lccc@{}} \toprule \multicolumn{1}{c}{Comparison} & NLL & $\beta$ MSE & ROC \\ \midrule \texttt{k-means} - uniform & 0.123 & 0.08 & 0.318 \\ \texttt{Leverage} - uniform & 1.000 & 0.527 & 1.000 \\ \texttt{Lewis} - uniform & 1.000 & 0.249 & 1.000 \\ \texttt{Monotonic} - uniform & 0.055 & 0.29 & 0.23 \\ \texttt{OSMAC\_MSE} - uniform & 0.758 & \textbf{0.004} & 1.000 \\ \texttt{OSMAC\_VC} - uniform & 0.057 & \textbf{0.006} & 0.075 \\ \bottomrule \end{tabular} \end{table} \begin{figure}[!h] \begin{subfigure}{\columnwidth} \centering \includegraphics[width=\columnwidth, trim=0cm 0cm 0cm 0cm]{figs/nll_dist.png} \includegraphics[width=\columnwidth, trim=0cm 0cm 0cm 0cm]{figs/mse_dist.png} \includegraphics[width=\columnwidth, trim=0cm 0cm 0cm 0cm]{figs/roc_dist.png} \end{subfigure} \caption{Comparing the distribution of scores between each method for all three metrics. In all cases the uniform baseline is as competitive as any other approach. We note the \texttt{Monotonic} method has worse outliers when measured by NLL or MSE, and that the \texttt{OSMAC} methods have a worse tail when measured by ROC.} \label{fig:dist_cmp} \end{figure} \begin{figure*}[h] \centering \begin{subfigure}{0.99\textwidth} \centering \hspace*{\fill} $\lambda=10^{-3}$ \hfill $\lambda=10^{-1}$ \hfill $\lambda=10$ \hspace*{\fill} \end{subfigure} \begin{subfigure}{0.99\textwidth} \begin{turn}{90} \phantom{BufferBuffer}KDD cup \end{turn} \centering \hspace*{\fill} \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_kddcup_rel_nll_error_0.001.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_kddcup_rel_nll_error_0.1.pdf} \hfill \includegraphics[width=0.29\textwidth, trim=0cm 0cm 0cm 0cm]{figs/l2_exp/fig_kddcup_rel_nll_error_10.0.pdf} \hspace*{\fill} % \end{subfigure} \caption{On the KDD Cup 99 dataset, increasing L2 regularization noticeably improves the efficiency of uniform subsampling relative to other methods. At high regularization, no advantage is observed from any other method. This shows concordance with the theoretical results in \cite{curtin2019coresets}. Similar effects can be seen on other datasets in \autoref{fig:l2_more}.} \label{fig:l2} \end{figure*} Given the apparent failure of these methods to beat the naive baseline, it is natural to wonder how such a situation came to be. First, we remind the reader that in \autoref{fig:main} the behavior of the coreset algorithms varies from dataset to dataset, and our work is testing more datasets than prior works have done. By chance and happenstance, testing on fewer datasets may lead one to make conclusions of superior results, a common issue in most sciences today \cite{Ioannidis2005} and in machine learning competitions \cite{10.1145/502512.502576}. For example, Webb spam and KDD cup were two of the most widely used datasets in the coreset literature, and coreset methods happen to perform well on those. Furthermore, most studies only included one or two baselines. It only takes one paper to draw conclusions of improvement against a baseline for later works to follow suit and exclude the ``beaten'' baseline in favor of newer methods. We highlighted an example of this where the $k$-means method turned out as one of the best performers but was never evaluated in later works. Through this lens it becomes clear how subsequent papers can, following reasonable practices of replicating prior methods as their baseline, result in an erroneous conclusion of improvement. This erroneous conclusion can still occur when even when testing on more datasets once a less ideal baseline model enters evaluation. Our experiment is in fact the first comprehensive comparison among several prior methods. As shown in \autoref{tbl:bases}, there may be a statistically significant difference between two methods while each has no statistical difference with the uniform random baseline. \begin{table}[!h] \centering \caption{Comparison of coreset methods with each other. In many cases one coreset method is significantly better than another, but not better than uniform random sampling as shown in \autoref{tbl:uniform}. This helps explain why many works have drawn conclusions of significance by comparing against other methods, but failing to include the competitive but naive baseline.} \label{tbl:bases} \adjustbox{max width=\columnwidth}{% \begin{tabular}{@{}lccc@{}} \toprule \multicolumn{1}{c}{Comparison} & NLL & $\beta$ MSE & ROC \\ \midrule \texttt{k-means} - \texttt{Leverage} & 1 & 1 & 1 \\ \texttt{k-means} - \texttt{Lewis} & 1 & 1 & 1 \\ \texttt{k-means} - \texttt{Monotonic} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} \\ \texttt{k-means} - \texttt{OSMAC\_MSE} & 1 & 1 & 1 \\ \texttt{k-means} - \texttt{OSMAC\_vc} & 1 & 1 & 1 \\ \texttt{Leverage} - \texttt{Lewis} & 1 & 1 & 1 \\ \texttt{Leverage} - \texttt{Monotonic} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} & \textbf{0.009} \\ \texttt{Leverage} - \texttt{OSMAC\_MSE} & 1 & 1 & 1 \\ \texttt{Leverage} - \texttt{OSMAC\_vc} & 1 & 1 & 1 \\ \texttt{Lewis} - \texttt{Monotonic} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} & 0.02 \\ \texttt{Lewis} - \texttt{OSMAC\_MSE} & 1 & 1 & 1 \\ \texttt{Lewis} - \texttt{OSMAC\_vc} & 1 & 1 & 0.645 \\ \texttt{Monotonic} - \texttt{OSMAC\_MSE} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} \\ \texttt{Monotonic} - \texttt{OSMAC\_vc} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} & \textbf{\textless{}1e-4} \\ \texttt{OSMAC\_MSE} - \texttt{OSMAC\_vc} & 1 & 1 & 1 \\ \bottomrule \end{tabular} } \end{table} Finally one may ask if the overall performance does not differ, does the distribution of the performances differ? We show that they do in \autoref{fig:dist_cmp}, but that the uniform baseline is still competitive in all cases. Instead we see that the \texttt{Monotonic} and \texttt{OSMAC} methods have poorly behaved outliers in their distribution of scores, depending on the method of evaluation being used. From visual inspection, we note that $k$-means, \texttt{Leverage}, and \texttt{Lewis} appear the most effective of the coreset methods. \subsection{Effect of regularization} As discussed in \autoref{sec:methods}, regularization impacts the effectiveness of coreset methods in logistic regression. In particular, although results from \cite{munteanu2018coresets} indicate that the availability of coresets depends on the complexity of the data, the uniform baseline is known to be effective on all datasets when the model is regularized \cite{curtin2019coresets}. We run a followup experiment where we vary the L2 penalty of the classifiers beyond that of our main experiment. Our findings in \autoref{fig:l2} confirm experimentally that increasing regularization makes the gap between uniform sampling and the best-performing methods vanish. One may ask whether further decreasing regularization strength in our main experiment would impact our findings by weakening the uniform subsample. We replicate our experiment with $\lambda=10^{-7}$ with results in \autoref{tbl:uniform_reg} and Appendix \autoref{tbl:bases_reg}. We find that the situation becomes worse, and no method outperforms uniform random sampling. Further lowering $\lambda$ hardly changed the regression coefficients, so we expect similar results for any $\lambda<10^{-7}$. Similarly, as we showed earlier in accordance with recent theoretical work that uniform sampling only improves with stronger regularization, we conclude that our results are likely to hold true over all $\lambda$. \begin{table}[h] \caption{Comparisons with uniform baseline for logistic regression coresets, with multiple test corrected $p$-value in the three right most columns. Regularization is further weakened to $\lambda=10^{-7}$ compared to the main experiment. Note the final column shows that \texttt{OSMAC\_vc} is significant \textit{worse than uniform}, so none of the methods are statistically improving over the naive baseline.} \label{tbl:uniform_reg} \centering \begin{tabular}{@{}lccc@{}} \toprule \multicolumn{1}{c}{Comparison} & NLL & $\beta$ MSE & ROC \\ \midrule \texttt{k-means} - uniform & 0.140 & 0.482 & 0.288 \\ \texttt{Leverage} - uniform & 1.000 & 0.733 & 1.000 \\ \texttt{Lewis} - uniform & 1.000 & 0.18 & 1.000 \\ \texttt{Monotonic} - uniform & 0.215 & 1.000 & 0.548 \\ \texttt{OSMAC\_MSE} - uniform & 1.000 & 0.433 & 1.000 \\ \texttt{OSMAC\_vc} - uniform & 1.000 & 0.152 & 1.000 \\ \bottomrule \end{tabular} \end{table} \section{Conclusions} \label{sec:conclusion} In this work we have performed a thorough evaluation against many seminal methods used in the coreset and sub-sampling literature, used with respect to logistic regression. When compared against a naive baseline of uniform random selection of a subset, and measured by three possible metrics of improvement, we find that almost none of these classic approaches improves upon the naive baseline. Our results call into question the need for larger diversity of evaluation sets and benchmarks to be used in coreset research.
{'timestamp': '2023-01-18T02:14:30', 'yymm': '2301', 'arxiv_id': '2301.06163', 'language': 'en', 'url': 'https://arxiv.org/abs/2301.06163'}
arxiv