Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- 1809.05679v3.txt +318 -0
- 1809.05720v1.txt +83 -0
- 1809.05724v2.txt +85 -0
- 1809.05793v2.txt +499 -0
- 1809.05818v2.txt +185 -0
- 1809.05852v2.txt +69 -0
- 1809.05870v1.txt +103 -0
- 1809.05910v2.txt +139 -0
- 1809.05972v5.txt +89 -0
- 1809.05996v3.txt +246 -0
- 1809.06004v2.txt +97 -0
- 1809.06098v2.txt +45 -0
- 1809.06214v1.txt +304 -0
- 1809.06227v1.txt +45 -0
- 1809.06297v2.txt +71 -0
- 1809.06404v3.txt +57 -0
- 1809.06416v1.txt +93 -0
- 1809.06452v2.txt +663 -0
- 1809.06481v1.txt +27 -0
- 1809.06486v2.txt +141 -0
- 1809.06508v2.txt +298 -0
- 1809.06569v2.txt +93 -0
- 1809.06590v1.txt +99 -0
- 1809.06709v2.txt +0 -0
- 1809.06858v2.txt +81 -0
- 1809.06963v3.txt +91 -0
- 1809.06987v3.txt +0 -0
- 1809.07016v4.txt +123 -0
- 1809.07023v1.txt +73 -0
- 1809.07122v1.txt +333 -0
- 1809.07260v2.txt +745 -0
- 1809.07282v3.txt +103 -0
- 1809.07358v1.txt +63 -0
- 1809.07394v3.txt +89 -0
- 1809.07483v1.txt +87 -0
- 1809.07599v2.txt +79 -0
- 1809.07657v1.txt +137 -0
- 1809.07845v2.txt +95 -0
- 1809.07888v3.txt +83 -0
- 1809.07889v4.txt +81 -0
- 1809.07893v2.txt +105 -0
- 1809.07952v2.txt +69 -0
- 1809.08151v4.txt +101 -0
- 1809.08205v1.txt +71 -0
- 1809.08267v3.txt +69 -0
- 1809.08440v3.txt +333 -0
- 1809.08510v1.txt +67 -0
- 1809.08545v3.txt +71 -0
- 1809.08700v2.txt +101 -0
- 1809.08733v2.txt +143 -0
1809.05679v3.txt
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Text classification is a fundamental problem in natural language processing (NLP). There are numerous applications of text classification such as document organization, news filtering, spam detection, opinion mining, and computational phenotyping~\cite{aggarwal2012survey,zeng2018natural}. An essential intermediate step for text classification is text representation. Traditional methods represent text with hand-crafted features, such as sparse lexical features (e.g., bag-of-words and n-grams). Recently, deep learning models have been widely used to learn text representations, including convolutional neural networks (CNN) ~\cite{kim2014convolutional} and recurrent neural networks (RNN) such as long short-term memory (LSTM) ~\cite{hochreiter1997long}. As CNN and RNN prioritize locality and sequentiality~\cite{battaglia2018relational}, these deep learning models can capture semantic and syntactic information in local consecutive word sequences well, but may ignore global word co-occurrence in a corpus which carries non-consecutive and long-distance semantics~\cite{peng2018large}.
|
| 3 |
+
|
| 4 |
+
Recently, a new research direction called graph neural networks or graph embeddings has attracted wide attention~\cite{battaglia2018relational,cai2018comprehensive}. Graph neural networks have been effective at tasks thought to have rich relational structure and can preserve global structure information of a graph in graph embeddings.
|
| 5 |
+
|
| 6 |
+
In this work, we propose a new graph neural network-based method for text classification. We construct a single large graph from an entire corpus, which contains words and documents as nodes. We model the graph with a Graph Convolutional Network (GCN)~\cite{kipf2017semi}, a simple and effective graph neural network that captures high order neighborhoods information. The edge between two word nodes is built by word co-occurrence information and the edge between a word node and document node is built using word frequency and word's document frequency. We then turn text classification problem into a node classification problem. The method can achieve strong classification performances with a small proportion of labeled documents and learn interpretable word and document node embeddings. Our source code is available at~\url{https://github.com/yao8839836/text_gcn}. To summarize, our contributions are as follows:
|
| 7 |
+
\begin{itemize}
|
| 8 |
+
\setlength\itemsep{0em}
|
| 9 |
+
\item We propose a novel graph neural network method for text classification. To the best of our knowledge, this is the first study to model a whole corpus as a heterogeneous graph and learn word and document embeddings with graph neural networks jointly.
|
| 10 |
+
\item Results on several benchmark datasets demonstrate that our method outperforms state-of-the-art text classification methods, without using pre-trained word embeddings or external knowledge. Our method also learn predictive word and document embeddings automatically.
|
| 11 |
+
\end{itemize}
|
| 12 |
+
\section{Related Work}
|
| 13 |
+
|
| 14 |
+
\subsection{Traditional Text Classification}
|
| 15 |
+
Traditional text classification studies mainly focus on feature engineering and classification algorithms. For feature engineering, the most commonly used feature is the bag-of-words feature. In addition, some more complex features have been designed, such as n-grams~\cite{wang2012baselines} and entities in ontologies~\cite{chenthamarakshan2011concept}. There are also existing studies on converting texts to graphs and perform feature engineering on graphs and subgraphs~\cite{luo2016bridging,rousseau2015text,skianis2016regularizing,luo2014automatic,luo2015subgraph}. Unlike these methods, our method can learn text representations as node embeddings automatically.
|
| 16 |
+
\subsection{Deep Learning for Text Classification}
|
| 17 |
+
Deep learning text classification studies can be categorized into two groups.
|
| 18 |
+
One group of studies focused on models based on word embeddings~\cite{mikolov2013distributed,pennington2014glove}. Several recent studies showed that the success of deep learning on text classification largely depends on the effectiveness of the word embeddings~\cite{Shen2018Baseline,joulin2017bag,P18-1216}. Some authors aggregated unsupervised word embeddings as document embeddings then fed these document embeddings into a classifier \cite{le2014distributed,joulin2017bag}. Others jointly learned word/document and document label embeddings~\cite{tang2015pte,P18-1216}. Our work is connected to these methods, the major difference is that these methods build text representations after learning word embeddings while we learn word and document embeddings simultaneously for text classification.
|
| 19 |
+
|
| 20 |
+
Another group of studies employed deep neural networks. Two representative deep networks are CNN and RNN. \cite{kim2014convolutional} used CNN for sentence classification. The architecture is a direct application of CNNs as used in computer vision but with one dimensional convolutions. \cite{zhang2015character} and \cite{conneau2017very} designed character level CNNs and achieved promising results. %
|
| 21 |
+
\cite{tai2015improved}, \cite{liu2016recurrent} and \cite{luo2017recurrent} used LSTM, a specific type of RNN, to learn text representation. To further increase the representation flexibility of such models, attention mechanisms have been introduced as an integral part of models employed for text classification~\cite{yang2016hierarchical,wang2016attention}.
|
| 22 |
+
Although these methods are effective and widely used, they mainly focus on local consecutive word sequences, but do not explicitly use global word co-occurrence information in a corpus.
|
| 23 |
+
\subsection{Graph Neural Networks}
|
| 24 |
+
The topic of Graph Neural Networks has received growing attentions recently~\cite{cai2018comprehensive,battaglia2018relational}. A number of authors generalized well-established neural network models like CNN that apply to regular grid structure (2-d mesh or 1-d sequence) to work on arbitrarily structured graphs~\cite{bruna2013spectral,henaff2015deep,defferrard2016convolutional,kipf2017semi}.
|
| 25 |
+
In their pioneering work, Kipf and Welling presented a simplified graph neural network model, called graph convolutional
|
| 26 |
+
networks (GCN), which achieved state-of-the-art classification results on a number of benchmark graph datasets ~\cite{kipf2017semi}.
|
| 27 |
+
GCN was also explored in several NLP tasks such as semantic role labeling~\cite{marcheggiani2017encoding}, relation classification~\cite{li2018gcrn} and machine translation~\cite{bastings2017graph}, where GCN is used to encode syntactic structure of sentences.
|
| 28 |
+
Some recent studies explored graph neural networks for text classification~\cite{henaff2015deep,defferrard2016convolutional,kipf2017semi,peng2018large,DBLP:conf/acl/ZhangLS18}.
|
| 29 |
+
However, they either viewed a document or a sentence as a graph of word nodes~\cite{defferrard2016convolutional,peng2018large,DBLP:conf/acl/ZhangLS18} or relied on the not-routinely-available document citation relation to construct the graph~\cite{kipf2017semi}. In contrast, when constructing the corpus graph, we regard the documents and words as nodes (hence heterogeneous graph) and do not require inter-document relations.
|
| 30 |
+
|
| 31 |
+
\begin{figure*}[t]
|
| 32 |
+
\centering
|
| 33 |
+
\includegraphics[height=50 mm]{gcn_graph.pdf}
|
| 34 |
+
\caption{Schematic of Text GCN. Example taken from Ohsumed corpus. Nodes begin with ``O" are document nodes, others are word nodes. Black bold edges are document-word edges and gray thin edges are word-word edges. $R(x)$ means the representation (embedding) of $x$. Different colors mean different document classes (only four example classes are shown to avoid clutter). CVD: Cardiovascular Diseases, Neo: Neoplasms, Resp: Respiratory Tract Diseases, Immun: Immunologic Diseases.}
|
| 35 |
+
\label{fig:framework}
|
| 36 |
+
\end{figure*}
|
| 37 |
+
\section{Method}
|
| 38 |
+
|
| 39 |
+
\subsection{Graph Convolutional Networks (GCN)}
|
| 40 |
+
A GCN~\cite{kipf2017semi} is a multilayer neural network that operates directly on a graph and induces embedding vectors of nodes based on properties of their neighborhoods. Formally, consider a graph $G = (V, E)$, where $V(|V| = n)$ and $E$ are sets of nodes and edges, respectively. Every node is assumed to be connected to itself, i.e., $(v, v) \in E$ for any $v$. Let $X \in \mathbb{R}^{n \times m}$ be a matrix containing all $n$ nodes with their features, where $m$ is the dimension of the feature vectors, each row $x_v \in \mathbb{R}^m$ is the feature vector for $v$.
|
| 41 |
+
We introduce an adjacency matrix $A$ of $G$ and its degree matrix $D$, where $D_{ii} = \sum_j A_{ij}$. The diagonal elements of $A$ are set to $1$ because of self-loops.
|
| 42 |
+
GCN can capture information only about immediate neighbors with one layer of convolution. When multiple GCN layers are stacked, information about larger neighborhoods are integrated. For a one-layer GCN, the new $k$-dimensional node feature matrix $L^{(1)} \in \mathbb{R}^{n \times k}$ is computed as
|
| 43 |
+
\begin{equation}
|
| 44 |
+
L^{(1)} = \rho(\tilde{A}XW_0)
|
| 45 |
+
\label{1stl}
|
| 46 |
+
\end{equation}
|
| 47 |
+
where $\tilde{A} = D^{-\frac{1}{2}}A D^{-\frac{1}{2}}$ is the normalized symmetric adjacency matrix and $W_0 \in \mathbb{R}^{m \times k}$ is a weight matrix. $\rho$ is an activation function, e.g. a ReLU $\rho(x) = \text{max}(0,x)$. As mentioned before, one can incorporate higher order neighborhoods information by stacking multiple GCN layers:
|
| 48 |
+
\begin{equation}
|
| 49 |
+
L^{(j+1)} = \rho(\tilde{A}L^{(j)}W_j)
|
| 50 |
+
\end{equation}
|
| 51 |
+
where $j$ denotes the layer number and $L^{(0)} = X$.
|
| 52 |
+
\subsection{Text Graph Convolutional Networks (Text GCN)}
|
| 53 |
+
We build a large and heterogeneous text graph which contains word nodes and document nodes so that global word co-occurrence can be explicitly modeled and graph convolution can be easily adapted, as shown in Figure \ref{fig:framework}. The number of nodes in the text graph $|V|$ is the number of documents (corpus size) plus the number of unique words (vocabulary size) in a corpus. We simply set feature matrix $X = I$ as an identity matrix which means every word or document is represented as a one-hot vector as the input to Text GCN. We build edges among nodes based on word occurrence in documents (document-word edges) and word co-occurrence in the whole corpus (word-word edges).
|
| 54 |
+
The weight of the edge between a document node and a word node is the term frequency-inverse document frequency (TF-IDF) of the word in the document, where term frequency is the number of times the word appears in the document, inverse document frequency is the logarithmically scaled inverse fraction of the number of documents that contain the word. We found using TF-IDF weight is better than using term frequency only. To utilize global word co-occurrence information, we use a fixed size sliding window on all documents in the corpus to gather co-occurrence statistics. We employ point-wise mutual information (PMI), a popular measure for word associations, to calculate weights between two word nodes. We also found using PMI achieves better results than using word co-occurrence count in our preliminary experiments. Formally, the weight of edge between node $i$ and node $j$ is defined as
|
| 55 |
+
\begin{align}
|
| 56 |
+
A_{ij} =
|
| 57 |
+
\begin{cases}
|
| 58 |
+
\quad\text{PMI}(i, j)& i,j \text{ are words, } \text{PMI}(i, j) > 0\\
|
| 59 |
+
\quad \text{TF-IDF}_{ij}& i \text{ is document, } j \text{ is word }\\
|
| 60 |
+
\quad 1 & i = j \\
|
| 61 |
+
\quad 0& \text{otherwise}
|
| 62 |
+
\end{cases}
|
| 63 |
+
\end{align}
|
| 64 |
+
The PMI value of a word pair $i, j$ is computed as
|
| 65 |
+
\begin{equation}
|
| 66 |
+
\text{PMI}(i, j) = \log \frac{p(i, j)}{p(i)p(j)}
|
| 67 |
+
\end{equation}
|
| 68 |
+
\begin{equation}
|
| 69 |
+
p(i, j) = \frac{\#W(i, j)}{\#W}
|
| 70 |
+
\end{equation}
|
| 71 |
+
\begin{equation}
|
| 72 |
+
p(i) = \frac{\#W(i)}{\#W}
|
| 73 |
+
\end{equation}
|
| 74 |
+
where $\#W(i)$ is the number of sliding windows in a corpus that contain word $i$, $\#W(i, j)$ is the number of sliding windows that contain both word $i$ and $j$, and $\#W$ is the total number of sliding windows in the corpus. A positive PMI value implies a high semantic correlation of words in a corpus, while a negative PMI value indicates little or no semantic correlation in the corpus. Therefore, we only add edges between word pairs with positive PMI values.
|
| 75 |
+
|
| 76 |
+
After building the text graph, we feed the graph into a simple two layer GCN as in \cite{kipf2017semi}, the second layer node (word/document) embeddings have the same size as the labels set and are fed into a \textit{softmax} classifier:
|
| 77 |
+
\begin{equation}
|
| 78 |
+
Z = \text{softmax}(\tilde{A}\text{ ReLU}(\tilde{A}XW_0)W_1)
|
| 79 |
+
\label{2layer}
|
| 80 |
+
\end{equation}
|
| 81 |
+
where $\tilde{A} = D^{-\frac{1}{2}}A D^{-\frac{1}{2}}$ is the same as in equation \ref{1stl}, and $\text{softmax}(x_i) = \frac{1}{\mathcal{Z}} \exp(x_i)$ with $\mathcal{Z} = \sum_i \exp(x_i)$. The loss function is defined as the cross-entropy error over all labeled documents:
|
| 82 |
+
\begin{equation}
|
| 83 |
+
\mathcal{L} = -\sum_{d \in \mathcal{Y}_D} \sum_{f=1}^F Y_{df} \ln Z_{df}
|
| 84 |
+
\end{equation}
|
| 85 |
+
where $\mathcal{Y}_D$ is the set of document indices that have labels and $F$ is the dimension of the output features, which is equal to the number of classes. $Y$ is the label indicator matrix. The weight parameters $W_0$ and $W_1$ can be trained via gradient descent. In equation~\ref{2layer}, $E_1 = \tilde{A}XW_0$ contains the first layer document and word embeddings and $E_2 = \tilde{A}\text{ ReLU}(\tilde{A}XW_0)W_1$ contains the second layer document and word embeddings. The overall Text GCN model is schematically illustrated in Figure \ref{fig:framework}.
|
| 86 |
+
|
| 87 |
+
A two-layer GCN can allow message passing among nodes that are at maximum two steps away. Thus although there is no direct document-document edges in the graph, the two-layer GCN allows the information exchange between pairs of documents.
|
| 88 |
+
In our preliminary experiment. We found that a two-layer GCN performs better than a one-layer GCN, while more layers did not improve the performances. This is similar to results in~\cite{kipf2017semi} and \cite{DBLP:conf/aaai/LiHW18}.
|
| 89 |
+
\section{Experiment}
|
| 90 |
+
In this section we evaluate our Text Graph Convolutional Networks (Text GCN) on two experimental tasks. Specifically we want to determine:
|
| 91 |
+
\begin{itemize}
|
| 92 |
+
\item Can our model achieve satisfactory results in text classification, even with limited labeled data?
|
| 93 |
+
\item Can our model learn predictive word and document embeddings?
|
| 94 |
+
\end{itemize}
|
| 95 |
+
\paragraph{Baselines.}
|
| 96 |
+
We compare our Text GCN with multiple state-of-the-art text classification and embedding methods as follows:
|
| 97 |
+
\begin{itemize}
|
| 98 |
+
\item \textbf{TF-IDF + LR} : bag-of-words model with term frequency-inverse document frequency weighting. Logistic Regression is used as the classifier.
|
| 99 |
+
\item \textbf{CNN}: Convolutional Neural Network~\cite{kim2014convolutional}. We explored CNN-rand which uses randomly initialized word embeddings and CNN-non-static which uses pre-trained word embeddings.
|
| 100 |
+
\item \textbf{LSTM}: The LSTM model defined in~\cite{liu2016recurrent} which uses the last hidden state as the representation of the whole text. We also experimented with the model with/without pre-trained word embeddings.
|
| 101 |
+
\item \textbf{Bi-LSTM}: a bi-directional LSTM, commonly used in text classification. We input pre-trained word embeddings to Bi-LSTM.
|
| 102 |
+
\item \textbf{PV-DBOW}: a paragraph vector model proposed by~\cite{le2014distributed}, the orders of words in text are ignored. We used Logistic Regression as the classifier.
|
| 103 |
+
\item \textbf{PV-DM}: a paragraph vector model proposed by~\cite{le2014distributed}, which considers the word order. We used Logistic Regression as the classifier.
|
| 104 |
+
\item \textbf{PTE}: predictive text embedding~\cite{tang2015pte}, which firstly learns word embedding based on heterogeneous text network containing words, documents and labels as nodes, then averages word embeddings as document embeddings for text classification.
|
| 105 |
+
\item \textbf{fastText}: a simple and efficient text classification method~\cite{joulin2017bag}, which treats the average of word/n-grams embeddings as document embeddings, then feeds document embeddings into a linear classifier. We evaluated it with and without bigrams.
|
| 106 |
+
\item \textbf{SWEM}: simple word embedding models~\cite{Shen2018Baseline}, which employs simple pooling strategies operated over word embeddings.
|
| 107 |
+
\item \textbf{LEAM}: label-embedding attentive models~\cite{P18-1216}, which embeds the words and labels in the same joint space for text classification. It utilizes label descriptions.
|
| 108 |
+
\item \textbf{Graph-CNN-C}: a graph CNN model that operates convolutions over word embedding similarity graphs~\cite{defferrard2016convolutional}, in which Chebyshev filter is used.
|
| 109 |
+
\item \textbf{Graph-CNN-S}: the same as Graph-CNN-C but using Spline filter~\cite{bruna2013spectral}.
|
| 110 |
+
\item \textbf{Graph-CNN-F}: the same as Graph-CNN-C but using Fourier filter~\cite{henaff2015deep}.
|
| 111 |
+
\end{itemize}
|
| 112 |
+
|
| 113 |
+
{\small
|
| 114 |
+
\begin{table*}[t]\footnotesize
|
| 115 |
+
\centering
|
| 116 |
+
\renewcommand{\arraystretch}{1.2}
|
| 117 |
+
\caption{Summary statistics of datasets.}
|
| 118 |
+
\begin{tabular}{c|ccccccc}
|
| 119 |
+
\hline
|
| 120 |
+
\bf{Dataset}& \bf{\# Docs} & \bf{\# Training}& \bf{\# Test}& \bf{\# Words} & \bf{\# Nodes}& \bf{\# Classes} & \bf{Average Length} \\
|
| 121 |
+
\hline
|
| 122 |
+
20NG & 18,846 & 11,314 & 7,532 & 42,757 & 61,603 & 20 & 221.26\\
|
| 123 |
+
|
| 124 |
+
R8 & 7,674 &5,485 & 2,189 & 7,688 & 15,362 & 8 & 65.72\\
|
| 125 |
+
|
| 126 |
+
R52& 9,100 & 6,532 & 2,568 & 8,892& 17,992 & 52 & 69.82\\
|
| 127 |
+
|
| 128 |
+
Ohsumed& 7,400 & 3,357 & 4,043 & 14,157 & 21,557 & 23 & 135.82\\
|
| 129 |
+
MR& 10,662 & 7,108 & 3,554 & 18,764 & 29,426 & 2 &20.39\\
|
| 130 |
+
\hline
|
| 131 |
+
\end{tabular}
|
| 132 |
+
\label{tab:statistics}
|
| 133 |
+
\end{table*}
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
\paragraph{Datasets.}
|
| 137 |
+
We ran our experiments on five widely used benchmark corpora including 20-Newsgroups (20NG), Ohsumed, R52 and R8 of Reuters 21578 and Movie Review (MR).
|
| 138 |
+
\begin{itemize}
|
| 139 |
+
\item The 20NG dataset\footnote{http://qwone.com/\url{~}jason/20Newsgroups/} (“bydate” version) contains 18,846 documents evenly categorized into 20 different categories. In total, 11,314 documents are in the training set and 7,532 documents are in the test set.
|
| 140 |
+
\item The Ohsumed corpus\footnote{http://disi.unitn.it/moschitti/corpora.htm} is from the MEDLINE database, which is a bibliographic database of important medical literature maintained by the National Library of Medicine. In this work, we used the 13,929 unique cardiovascular diseases abstracts in the first 20,000 abstracts of the year 1991. Each document in the set has one or more associated categories from the 23 disease categories. As we focus on single-label text classification, the documents belonging to multiple categories are excluded so that 7,400 documents belonging to only one category remain. 3,357 documents are in the training set and 4,043 documents are in the test set.
|
| 141 |
+
\item R52 and R8\footnote{https://www.cs.umb.edu/\url{~}smimarog/textmining/datasets/} (all-terms version) are two subsets of the Reuters 21578 dataset. R8 has 8 categories, and was split to 5,485 training and 2,189 test documents. R52 has 52 categories, and was split to 6,532 training and 2,568 test documents.
|
| 142 |
+
\item MR is a movie review dataset for binary sentiment classification, in which each review only contains one sentence ~\cite{pang2005seeing}\footnote{http://www.cs.cornell.edu/people/pabo/movie-review-data/}. The corpus has 5,331 positive and 5,331 negative reviews. We used the training/test split in~\cite{tang2015pte}\footnote{https://github.com/mnqu/PTE/tree/master/data/mr}.
|
| 143 |
+
\end{itemize}
|
| 144 |
+
We first preprocessed all the datasets by cleaning and tokenizing text as~\cite{kim2014convolutional}. We then removed stop words defined in NLTK\footnote{http://www.nltk.org/} and low frequency words appearing less than 5 times for 20NG, R8, R52 and Ohsumed. The only exception was MR, we did not remove words after cleaning and tokenizing raw text, as the documents are very short. The statistics of the preprocessed datasets are summarized in Table \ref{tab:statistics}.
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
\begin{table*}[t]\footnotesize
|
| 148 |
+
\centering
|
| 149 |
+
\renewcommand{\arraystretch}{1.2}
|
| 150 |
+
|
| 151 |
+
\caption{Test Accuracy on document classification task. We run all models 10 times and report mean $\pm$ standard deviation. Text GCN significantly outperforms baselines on 20NG, R8, R52 and Ohsumed based on student $t$-test ($p <0.05$).}
|
| 152 |
+
\begin{tabular}{c|c|c|c|c|c}
|
| 153 |
+
\hline
|
| 154 |
+
\bf{Model}& \bf{20NG} & \bf{R8}& \bf{R52}& \bf{Ohsumed} & \bf{MR}\\
|
| 155 |
+
\hline
|
| 156 |
+
TF-IDF + LR & 0.8319 $\pm$ 0.0000 & 0.9374 $\pm$ 0.0000 & 0.8695 $\pm$ 0.0000 & 0.5466 $\pm$ 0.0000 & 0.7459 $\pm$ 0.0000 \\
|
| 157 |
+
|
| 158 |
+
CNN-rand &0.7693 $\pm$ 0.0061&0.9402 $\pm$ 0.0057 & 0.8537 $\pm$ 0.0047 & 0.4387 $\pm$ 0.0100& 0.7498 $\pm$ 0.0070 \\
|
| 159 |
+
CNN-non-static &0.8215 $\pm$ 0.0052& 0.9571 $\pm$ 0.0052& 0.8759 $\pm$ 0.0048 & 0.5844 $\pm$ 0.0106& \bf{0.7775 $\pm$ 0.0072} \\
|
| 160 |
+
LSTM &0.6571 $\pm$ 0.0152& 0.9368 $\pm$ 0.0082& 0.8554 $\pm$ 0.0113 &0.4113 $\pm$ 0.0117 & 0.7506 $\pm$ 0.0044 \\
|
| 161 |
+
LSTM (pretrain) &0.7543 $\pm$ 0.0172& 0.9609 $\pm$ 0.0019&0.9048 $\pm$ 0.0086 &0.5110 $\pm$ 0.0150 & 0.7733 $\pm$ 0.0089 \\
|
| 162 |
+
Bi-LSTM &0.7318 $\pm$ 0.0185& 0.9631 $\pm$ 0.0033& 0.9054 $\pm$ 0.0091 &0.4927 $\pm$ 0.0107& 0.7768 $\pm$ 0.0086 \\
|
| 163 |
+
PV-DBOW &0.7436 $\pm$ 0.0018& 0.8587 $\pm$ 0.0010& 0.7829 $\pm$ 0.0011 & 0.4665 $\pm$ 0.0019& 0.6109 $\pm$ 0.0010 \\
|
| 164 |
+
PV-DM &0.5114 $\pm$ 0.0022& 0.5207 $\pm$ 0.0004& 0.4492 $\pm$ 0.0005& 0.2950 $\pm$ 0.0007& 0.5947 $\pm$ 0.0038 \\
|
| 165 |
+
PTE & 0.7674 $\pm$ 0.0029&0.9669 $\pm$ 0.0013 & 0.9071 $\pm$ 0.0014 & 0.5358 $\pm$ 0.0029 & 0.7023 $\pm$ 0.0036\\
|
| 166 |
+
fastText &0.7938 $\pm$ 0.0030& 0.9613 $\pm$ 0.0021& 0.9281 $\pm$ 0.0009 & 0.5770 $\pm$ 0.0049 & 0.7514 $\pm$ 0.0020\\
|
| 167 |
+
fastText (bigrams) & 0.7967 $\pm$ 0.0029& 0.9474 $\pm$ 0.0011& 0.9099 $\pm$ 0.0005 &0.5569 $\pm$ 0.0039 & 0.7624 $\pm$ 0.0012 \\
|
| 168 |
+
SWEM &0.8516 $\pm$ 0.0029& 0.9532 $\pm$ 0.0026& 0.9294 $\pm$ 0.0024 & 0.6312 $\pm$ 0.0055& 0.7665 $\pm$ 0.0063 \\
|
| 169 |
+
LEAM &0.8191 $\pm$ 0.0024& 0.9331 $\pm$ 0.0024 & 0.9184 $\pm$ 0.0023 & 0.5858 $\pm$ 0.0079& 0.7695 $\pm$ 0.0045 \\
|
| 170 |
+
Graph-CNN-C &0.8142 $\pm$ 0.0032& 0.9699 $\pm$ 0.0012& 0.9275 $\pm$ 0.0022& 0.6386 $\pm$ 0.0053& 0.7722 $\pm$ 0.0027\\
|
| 171 |
+
Graph-CNN-S &--& 0.9680 $\pm$ 0.0020& 0.9274 $\pm$ 0.0024 &0.6282 $\pm$ 0.0037 & 0.7699 $\pm$ 0.0014 \\
|
| 172 |
+
Graph-CNN-F &--&0.9689 $\pm$ 0.0006 & 0.9320 $\pm$ 0.0004 &0.6304 $\pm$ 0.0077& 0.7674 $\pm$ 0.0021 \\
|
| 173 |
+
Text GCN &\bf{0.8634 $\pm$ 0.0009}& \bf{0.9707 $\pm$ 0.0010}& \bf{0.9356 $\pm$ 0.0018}& \bf{0.6836 $\pm$ 0.0056}& 0.7674 $\pm$ 0.0020 \\
|
| 174 |
+
\hline
|
| 175 |
+
\end{tabular}
|
| 176 |
+
\label{tab:results}
|
| 177 |
+
\end{table*}
|
| 178 |
+
|
| 179 |
+
\paragraph{Settings.}
|
| 180 |
+
For Text GCN, we set the embedding size of the first convolution layer as 200 and set the window size as 20. We also experimented with other settings and found that small changes did not change the results much. We tuned other parameters and set the learning rate as 0.02, dropout rate as 0.5, $L_2$ loss weight as 0. We randomly selected $10\%$ of training set as validation set. Following \cite{kipf2017semi}, we trained Text GCN for a maximum of 200 epochs using Adam \cite{kinga2015method} and stop training if the validation loss does not decrease for 10 consecutive epochs.
|
| 181 |
+
For baseline models, we used default parameter settings as in their original papers or implementations. For baseline models using pre-trained word embeddings, we used 300-dimensional GloVe word embeddings~\cite{pennington2014glove}\footnote{http://nlp.stanford.edu/data/glove.6B.zip}.
|
| 182 |
+
|
| 183 |
+
\paragraph{Test Performance.}
|
| 184 |
+
Table \ref{tab:results} presents test accuracy of each model. Text GCN performs the best and significantly outperforms all baseline models ($p < 0.05$ based on student $t$-test) on four datasets, which showcases the effectiveness of the proposed method on long text datasets. For more in-depth performance analysis, we note that TF-IDF + LR performs well on long text datasets like 20NG and can outperform CNN with randomly initialized word embeddings. When pre-trained GloVe word embeddings are provided, CNN performs much better, especially on Ohsumed and 20NG. CNN also achieves the best results on short text dataset MR with pre-trained word embeddings, which shows it can model consecutive and short-distance semantics well. Similarly, LSTM-based models also rely on pre-trained word embeddings and tend to perform better when documents are shorter. PV-DBOW achieves comparable results to strong baselines on 20NG and Ohsumed, but the results on shorter text are clearly inferior to others. This is likely due to the fact that word orders are important in short text or sentiment classification. PV-DM performs worse than PV-DBOW, the only comparable results are on MR, where word orders are more essential. The results of PV-DBOW and PV-DM indicate that unsupervised document embeddings are not very discriminative in text classification. PTE and fastText clearly outperform PV-DBOW and PV-DM because they learn document embeddings in a supervised manner so that label information can be utilized to learn more discriminative embeddings. The two recent methods SWEM and LEAM perform quite well, which demonstrates the effectiveness of simple pooling methods and label descriptions/embeddings. Graph-CNN models also show competitive performances. This suggests that building word similarity graph using pre-trained word embeddings can preserve syntactic and semantic relations among words, which can provide additional information in large external text data.
|
| 185 |
+
|
| 186 |
+
The main reasons why Text GCN works well are two fold: 1) the text graph can capture both document-word relations and global word-word relations; 2) the GCN model, as a special form of Laplacian smoothing, computes the new features of a node as the weighted average of itself and its second order neighbors~\cite{DBLP:conf/aaai/LiHW18}. The label information of document nodes can be passed to their neighboring word nodes (words within the documents), then relayed to other word nodes and document nodes that are neighbor to the first step neighboring word nodes. Word nodes can gather comprehensive document label information and act as bridges or key paths in the graph, so that label information can be propagated to the entire graph. However, we also observed that Text GCN did not outperform CNN and LSTM-based models on MR. This is because GCN ignores word orders that are very useful in sentiment classification, while CNN and LSTM model consecutive word sequences explicitly. Another reason is that the edges in MR text graph are fewer than other text graphs, which limits the message passing among the nodes. There are only few document-word edges because the documents are very short. The number of word-word edges is also limited due to the small number of sliding windows. Nevertheless, CNN and LSTM rely on pre-trained word embeddings from external corpora while Text GCN only uses information in the target input corpus.
|
| 187 |
+
|
| 188 |
+
\begin{figure}[!htb]
|
| 189 |
+
\centering
|
| 190 |
+
\subfigure[R8]{
|
| 191 |
+
\label{fig:swin:a} %
|
| 192 |
+
\includegraphics[height = 29 mm]{window_R8.pdf}}
|
| 193 |
+
\subfigure[MR]{
|
| 194 |
+
\label{fig:swin:b} %
|
| 195 |
+
\includegraphics[height = 29 mm]{window_MR.pdf}}
|
| 196 |
+
\caption{Test accuracy with different sliding window sizes.}
|
| 197 |
+
\label{fig:swin}
|
| 198 |
+
\end{figure}
|
| 199 |
+
|
| 200 |
+
\begin{figure}[!htb]
|
| 201 |
+
\centering
|
| 202 |
+
\subfigure[R8]{
|
| 203 |
+
\label{fig:edim:a} %
|
| 204 |
+
\includegraphics[height = 29 mm]{dim_R8.pdf}}
|
| 205 |
+
\subfigure[MR]{
|
| 206 |
+
\label{fig:edim:b} %
|
| 207 |
+
\includegraphics[height = 29 mm]{dim_MR.pdf}}
|
| 208 |
+
\caption{Test accuracy by varying embedding dimensions.}
|
| 209 |
+
\label{fig:edim} %
|
| 210 |
+
\end{figure}
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
\begin{figure}[t]
|
| 214 |
+
\centering
|
| 215 |
+
\subfigure[20NG]{
|
| 216 |
+
\label{fig:proportion:a} %
|
| 217 |
+
\includegraphics[height = 30.5 mm]{proportion_20ng.pdf}}
|
| 218 |
+
\subfigure[R8]{
|
| 219 |
+
\label{fig:proportion:b} %
|
| 220 |
+
\includegraphics[height = 30.5 mm]{proportion_R8.pdf}}
|
| 221 |
+
\caption{Test accuracy by varying training data proportions.}
|
| 222 |
+
\label{fig:proportion}
|
| 223 |
+
\end{figure}
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
\begin{figure}[t]
|
| 227 |
+
\centering
|
| 228 |
+
\subfigure[Text GCN, 1st layer]{
|
| 229 |
+
\label{fig:doc2vec:a} %
|
| 230 |
+
\includegraphics[height = 25 mm]{20ng_gcn_doc_test_0.pdf}}
|
| 231 |
+
\subfigure[Text GCN, 2nd layer]{
|
| 232 |
+
\label{fig:doc2vec:b} %
|
| 233 |
+
\includegraphics[height = 25 mm]{20ng_gcn_doc_test_1.pdf}}
|
| 234 |
+
|
| 235 |
+
\subfigure[PV-DBOW]{
|
| 236 |
+
\label{fig:doc2vec:c} %
|
| 237 |
+
\includegraphics[height = 25 mm]{20ng_pvdbow_doc_test.pdf}}
|
| 238 |
+
\subfigure[PTE]{
|
| 239 |
+
\label{fig:doc2vec:d} %
|
| 240 |
+
\includegraphics[height = 25 mm]{20ng_pte.pdf}}
|
| 241 |
+
|
| 242 |
+
\caption{The t-SNE visualization of test set document embeddings in 20NG.}
|
| 243 |
+
\label{fig:doc2vec}
|
| 244 |
+
\end{figure}
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
\paragraph{Parameter Sensitivity.} Figure \ref{fig:swin} shows test accuracies with different sliding window sizes on R8 and MR. We can see that test accuracy first increases as window size becomes larger, but the average accuracy stops increasing when window size is larger than 15. This suggests that too small window sizes could not generate sufficient global word co-occurrence information, while too large window sizes may add edges between nodes that are not very closely related. Figure \ref{fig:edim} depicts the classification performance on R8 and MR with different dimensions of the-first layer embeddings. We observed similar trends as in Figure \ref{fig:swin}. Too low dimensional embeddings may not propagate label information to the whole graph well, while high dimensional embeddings do not improve classification performances and may cost more training time.
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
\paragraph{Effects of the Size of Labeled Data.}
|
| 252 |
+
|
| 253 |
+
In order to evaluate the effect of the size of the labeled data, we tested several best performing models with different proportions of the training data. Figure \ref{fig:proportion} reports test accuracies with $1\%$, $5\%$, $10\%$ and $20\%$ of original 20NG and R8 training set. We note that Text GCN can achieve higher test accuracy with limited labeled documents. For instance, Text GCN achieves a test accuracy of 0.8063 $\pm$ 0.0025 on 20NG with only $20\%$ training documents and a test accuracy of 0.8830 $\pm$ 0.0027 on R8 with only $1\%$ training documents which are higher than some baseline models with even the full training documents. These encouraging results are similar to results in \cite{kipf2017semi} where GCN can perform quite well with low label rate, which again suggests that GCN can propagate document label information to the entire graph well and our word document graph preserves global word co-occurrence information.
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
\paragraph{Document Visualization.}
|
| 258 |
+
We give an illustrative visualization of the document embeddings leaned by Text GCN. We use t-SNE tool~\cite{maaten2008visualizing} to visualize the learned document embeddings. Figure~\ref{fig:doc2vec} shows the visualization of 200 dimensional 20NG test document embeddings learned by GCN (first layer), PV-DBOW and PTE. We also show 20 dimensional second layer test document embeddings of Text GCN. We observe that Text GCN can learn more discriminative document embeddings, and the second layer embeddings are more distinguishable than the first layer.
|
| 259 |
+
|
| 260 |
+
\paragraph{Word Visualization.}
|
| 261 |
+
|
| 262 |
+
We also qualitatively visualize word embeddings learned by Text GCN.
|
| 263 |
+
Figure~\ref{fig:word2vec} shows the t-SNE visualization of the second layer word embeddings learned from 20NG. We set the dimension with the highest value as a word's label. We can see that words with the same label are close to each other, which means most words are closely related to some certain document classes. We also show top 10 words with highest values under each class in Table 3. We note that the top 10 words are interpretable. For example, ``jpeg'', ``graphics'' and ``image'' in column 1 can represent the meaning of their label ``comp.graphics'' well. Words in other columns can also indicate their label's meaning.
|
| 264 |
+
|
| 265 |
+
|
| 266 |
+
\begin{table}[t]\footnotesize
|
| 267 |
+
\centering
|
| 268 |
+
\renewcommand{\arraystretch}{1.2}
|
| 269 |
+
\label{table_1}
|
| 270 |
+
\caption{Words with highest values for several classes in 20NG. Second layer word embeddings are used. We show top 10 words for each class.}
|
| 271 |
+
\begin{tabular}{c|c|c|c}
|
| 272 |
+
\hline
|
| 273 |
+
|
| 274 |
+
comp.graphics & sci.space &sci.med & rec.autos \\
|
| 275 |
+
\hline
|
| 276 |
+
jpeg& space & candida & car\\
|
| 277 |
+
|
| 278 |
+
graphics & orbit & geb & cars\\
|
| 279 |
+
|
| 280 |
+
image & shuttle & disease & v12\\
|
| 281 |
+
|
| 282 |
+
gif & launch & patients & callison\\
|
| 283 |
+
|
| 284 |
+
3d & moon & yeast & engine\\
|
| 285 |
+
|
| 286 |
+
images & prb & msg & toyota\\
|
| 287 |
+
|
| 288 |
+
rayshade & spacecraft & vitamin & nissan \\
|
| 289 |
+
|
| 290 |
+
polygon & solar & syndrome & v8 \\
|
| 291 |
+
|
| 292 |
+
pov & mission & infection & mustang\\
|
| 293 |
+
|
| 294 |
+
viewer & alaska & gordon & eliot \\
|
| 295 |
+
\hline
|
| 296 |
+
\end{tabular}
|
| 297 |
+
\end{table}
|
| 298 |
+
|
| 299 |
+
\begin{figure}[t]
|
| 300 |
+
\centering
|
| 301 |
+
\includegraphics[height = 30 mm]{20ng_word_vectors_1.pdf}
|
| 302 |
+
\caption{The t-SNE visualization of the second layer word embeddings (20 dimensional) learned from 20NG. We set the dimension with the largest value as a word's label.}
|
| 303 |
+
\label{fig:word2vec}
|
| 304 |
+
\end{figure}
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
\paragraph{Discussion.}
|
| 308 |
+
From experimental results, we can see the proposed Text GCN can achieve strong text classification results and learn predictive document and word embeddings. However, a major limitation of this study is that the GCN model is inherently transductive, in which test document nodes (without labels) are included in GCN training. Thus Text GCN could not quickly generate embeddings and make prediction for unseen test documents. Possible solutions to the problem are introducing inductive~\cite{hamilton2017inductive} or fast GCN model~\cite{chen2018fastgcn}.
|
| 309 |
+
\section{Conclusion and Future Work}
|
| 310 |
+
In this study, we propose a novel text classification method termed Text Graph Convolutional Networks (Text GCN). We build a heterogeneous word document graph for a whole corpus and turn document classification into a node classification problem. Text GCN can capture global word co-occurrence information and utilize limited labeled documents well. A simple two-layer Text GCN demonstrates promising results by outperforming numerous state-of-the-art methods on multiple benchmark datasets.
|
| 311 |
+
|
| 312 |
+
In addition to generalizing Text GCN model to inductive settings, some interesting future directions include improving the classification performance using attention mechanisms~\cite{velivckovic2017graph} and developing unsupervised text GCN framework for representation learning on large-scale unlabeled text data.
|
| 313 |
+
\section*{Acknowledgments}
|
| 314 |
+
This work is supported in part by NIH grant R21LM012618.
|
| 315 |
+
|
| 316 |
+
|
| 317 |
+
\bibliographystyle{aaai}
|
| 318 |
+
\bibliography{aaai19}
|
1809.05720v1.txt
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
In online decision settings, an agent must select one out of several possible actions, e.g., recommending a movie to a particular user, or proposing a treatment to a patient in a clinical trial. Each of these actions is associated with a context, e.g., a user profile, and a feedback signal, e.g., the reward or rating, is only observed for the chosen option. In these online decision settings the agent must learn the inherent trade-off between exploration, which involves identifying and understanding the reward from an action, and exploitation, which means gathering as much reward as possible from an action. We consider cases where the behavior of the online agent may need to be restricted in its choice of an action for a given context by laws, values, preferences, or ethical principles (?). More precisely, we apply a set of behavioral constraints to the agent that are independent of the reward function. For instance, a parent or guardian group may want a movie recommender system (the agen)t to not recommend certain types of movies to children, even if the recommendation of such movies could lead to a high reward (?). In clinical settings, a doctor may want its diagnosis support system to not recommend a drug that typically works because of considerations related to the patients’ quality of life.
|
| 2 |
+
|
| 3 |
+
Many decision problems where an agent is responsive to online feedback are modeled as a multi-armed bandit (MAB) problem (?; ?). In the MAB setting there are K𝐾K arms, each associated with a fixed but unknown reward probability distribution (?; ?). At each time step, an agent plays an arm, i.e., recommends an item to a user, and receives a reward that follows the selected arm’s probability distribution, independent of the previous actions. A popular generalization of MAB is the contextual multi-armed bandit (CMAB) problem where the agent observes a d𝑑d-dimensional feature vector, or context, to use along with the rewards of the arms played in the past in order to choose an arm to play. Over time, the agent learns the relationship between contexts and rewards and select the best arm (?).
|
| 4 |
+
|
| 5 |
+
In giving the agent a set of behavioral constraints, we consider the case where only examples of the correct behaviors are given by a teacher agent, and our online agent must learn and respect these constraints in the later phases of decision making: As an example, a parent may give examples of movies that their children can watch (or that they cannot watch) when setting up a new movie account for them.
|
| 6 |
+
|
| 7 |
+
The idea of teaching machines right from wrong has become an important research topic in both AI (?) and in other disciplines (?). Much of the research at the intersection of artificial intelligence and ethics falls under the heading of machine ethics, i.e., adding ethics and/or constraints to a particular system’s decision making process (?). One very important task in machine ethics is value alignment, i.e., the idea that an agent can only pursue goals that are aligned to human values and are therefore beneficial to humans (?; ?; ?). However, this still leaves open the question of how to provide the values, or the behavioral constraints derived from the values, to the agent.A popular technique is called the bottom up approach, i.e., teaching a machine what is right and wrong by example (?). We adopt this technique in our paper, since we consider the case where only examples of both correct and incorrect behavior are given to the agent, that must learn from these.Note that having only examples of good and bad behavior means that we need to learn the constraints from such examples. On the contrary, if the constraints were known and we received feedback on them during the recommendation phase, then we could use the stochastic combinatorial semi-bandit setting (?). Also, if the constraints were known and budget-like, then we could use bandits with knapsacks (?). However, the case where we are only given examples of the behavioral constraints to guide the online agent’s behavior does not seem to be covered by the current literature.
|
| 8 |
+
|
| 9 |
+
To give flexibility to our agent, we let the system designer to decide how much the guidelines given by the behavioral constraints should weigh on the decision of the agent during the online phase. So, to control the tradeoff between following the learned behavioral constraints and pursuing a greedy online-only policy, we expose a parameter of the algorithm called σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online}. This parameter allows the system designer to smoothly transition between the two policy extremes, where σonline=0.0subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.0\sigma_{online}=0.0 means that we are only following the learned constraints and are insensitive to the online reward, while σonline=1.0subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒1.0\sigma_{online}=1.0 means we are only following the online rewards and not giving any weight to the learned constraints.
|
| 10 |
+
|
| 11 |
+
Contributions. We propose a novel extension of the contextual bandit setting that we call the Behavior Constrained Contextual Bandits Problem (BCCBP), where the agent is constrained by a policy that it has learned from observing examples of good and bad behavior. We provide a new algorithm for this setting, that we call Behavior Constrained Thompson Sampling (BCTS), that is able to trade-off between the constrained behavior learned from examples given by a teaching agent and reward-driven behavior learned during online recommendation. We prove an upper bound on the expected regret of this new algorithm and evaluate it empirically on data from two real world settings. The experimental evaluation shows that it is possible to learn and act in a constrained manner while not significantly degrading the performance.
|
| 12 |
+
|
| 13 |
+
Multi-armed Bandit Settings. The classic multi-armed bandit (MAB) problem is a model of the trade-off between exploration and exploitation, where an agent acting in a live, online environment wants to pick, within a finite set of decisions, the one maximizing the cumulative reward (?; ?). The MAB problem is a classic example of reinforcement learning, where the online agent receives signals that are then used to update their behavior. Reinforcement learning, and the MAB problem specifically, have been used to successfully solve a number of real-world problems (?; ?).
|
| 14 |
+
|
| 15 |
+
The contextual multi-armed bandit (CMAB) problem, a generalization of the MAB problem that exploits the presence of features for users of the online decision system, has been studied in multiple domains including recommender systems and online advertising. Optimal solutions have been provided by using a stochastic formulation (?; ?), a Bayesian formulation (?; ?; ?), and an adversarial formulation (?; ?).Both LINUCB (?; ?) and Contextual Thompson Sampling (CTS)(?) assume a linear dependency between the expected reward of an action and its context; the representation space is modeled using a set of linear predictors and provide bounds on the expected regret.
|
| 16 |
+
|
| 17 |
+
The literature shows some recent work on combining the contextual bandit formalism with constraints. (?) propose a contextual bandits with budget and time constraints, that are expressed over the number of times, and time period, that an arm can be pulled. Such coupling effects make it difficult to obtain oracle solutions that assume known statistics of bandits. The authors develop an approximation of the oracle, referred to as Adaptive-Linear-Programming (ALP), which achieves near-optimality and only requires the ordering of expected rewards.
|
| 18 |
+
|
| 19 |
+
Additionally, ? (?) consider multi-faceted budget constraints where each arm pull exhausts some facet of a budget that needs to be optimized under. ? (?) consider a novel formulation of the contextual bandit problem when there are constraints on the context, i.e., where only a limited number of features can be accessed by the learner at each iteration. This novel formulation is motivated by different online problems arising in clinical trials and recommender systems where accessing all parts of the context could be costly. None of these formalisms capture the setting we consider in this paper, as the budgets or time constraints are explicitly supplied a priori.
|
| 20 |
+
|
| 21 |
+
There are also a number of closely related bandit formalisms including matroid bandits, also called stochastic combinatorial semi-bandits, contextual bandits with history, and conservative bandits. (?) consider matroid bandits which are able to optimize combinatorial functions that are expressible as matroids, e.g., linear combinations of objectives. In relation to our work, if the constraints were known to the agent, then we could leverage these algorithms.However, we assume that our agent does not receive the constraints explicitly during the constraint learning phase and does not receive feedback on the constraints during the recommendation phase. We believe that in many settings we may not have access to the constraints as an explicit set of rules or a function, rather we may only have access to (positive and negative) examples of constrained behavior from a doctor, or a set of (good and bad) decisions made by a parent, and that this ”teaching” figure may not always be able to provide feedback on each recommendation.
|
| 22 |
+
|
| 23 |
+
? (?) introduces the setting called contextual bandit with history: an agent is furnished with examples of past behavior over the same reward function and leverages these observations to guide its future behavior. In our setting we instead have two separate reward functions, the constraints and the online reward, and hence the results are not directly applicable.
|
| 24 |
+
|
| 25 |
+
Finally, ? (?) introduces conservative bandits, which attempt to maximize the achieved reward of an online agent while keeping the cumulative reward above a certain threshold. These setting is useful, for example, when one wants to try out new advertisements but does not want revenue to fall below a certain threshold. This work is fundamentally different from our own as we want the agent to not exploit certain arms at all rather than maintain a minimum of overall reward.
|
| 26 |
+
|
| 27 |
+
Constrained and Ethical Decision Making. Humans often constrain the decisions that they take according to a number of exogenous priorities, derived by moral, ethical, religious, or business values (?). Constrained or ethical decision making has been studied in a variety of contexts in computer science with most of the work focused on teaching a computer system to act within guidelines (?). Broadly, our work fits into constrained reinforcement learning / Safe RL (?) and value alignment (?; ?; ?).
|
| 28 |
+
|
| 29 |
+
For example, ? (?) discusses a rule-based system applied to scenarios in which a robot should infer that a directive leads to undesirable behavior. In this system, given some instructions, the agent first reasons about a set of conditions including “Do I know how to accomplish the task?”, and “Does accomplishing this task violate any normative principles?”. Each of these conditions is formalized as a logical expression, along with inference rules that enable the agent to infer which directives to reject.
|
| 30 |
+
|
| 31 |
+
Having the agent learn about its ethical objective function while making decisions based on this objective function is a challenging problem. In (?) the authors consider this problem by exploring the consequences of an agent that uses Bayesian learning to update its beliefs about the “true” ethical objective function. At each time step, the agent makes decisions that maximize a utility function based on the agents beliefs about the ethical objective function.In reinforcement learning, Markov decision processes have been used to study both ethics and ethical decision making. In (?) the authors argue that the reinforcement learning framework achieves the appropriate generality required to theorize about an idealized ethical artificial agent.
|
| 32 |
+
|
| 33 |
+
None of these previously proposed approaches to ethical or behavior-constrained decision making leverage the contextual bandit setting. We instead feel that the bandit setting, which has broad application across computer science and decision making, is an ideal formalism for online decision making and can be fruitfully extended to include behavioral constraints.
|
| 34 |
+
|
| 35 |
+
Following ? (?), the contextual bandit problem is defined as follows.At each time t∈{1,…,T}𝑡1…𝑇t\in\{1,...,T\}, a player is presented with a context vector c(t)∈𝐑d𝑐𝑡superscript𝐑𝑑c(t)\in\mathbf{R}^{d} and must choose an arm k∈K={1,…,|K|}𝑘𝐾1…𝐾k\in K=\{1,...,|K|\}.Let 𝐫=(r1(t),…,{\bf r}=(r_{1}(t),..., rK(t))r_{K}(t)) denote a reward vector, where rk(t)∈[0,1]subscript𝑟𝑘𝑡01r_{k}(t)\in[0,1] is a reward at time t𝑡t associated with the arm k∈A𝑘𝐴k\in A.We assume that the expected reward is a linear function of the context, i.e. E[rk(t)|c(t)]=μkTc(t)𝐸delimited-[]conditionalsubscript𝑟𝑘𝑡𝑐𝑡superscriptsubscript𝜇𝑘𝑇𝑐𝑡E[r_{k}(t)|c(t)]=\mu_{k}^{T}c(t), where μksubscript𝜇𝑘\mu_{k} is an unknown weight vector (to be learned from the data) associated with arm k𝑘k.
|
| 36 |
+
|
| 37 |
+
The purpose of a contextual bandit algorithm A𝐴A is to minimize the cumulative regret. Let H:C→[K]:𝐻→𝐶delimited-[]𝐾H:C\rightarrow[K] where C𝐶C is the set of possible contexts and c(t)𝑐𝑡c(t) is the context at time t𝑡t, ht∈Hsubscriptℎ𝑡𝐻h_{t}\in H a hypothesis computed by the algorithm A𝐴A at time t𝑡t and ht∗=argmaxht∈Hrht(c(t))(t)subscriptsuperscriptℎ𝑡subscriptℎ𝑡𝐻argmaxsubscript𝑟subscriptℎ𝑡𝑐𝑡𝑡h^{*}_{t}=\underset{h_{t}\in H}{\operatorname{argmax}}\ r_{h_{t}(c(t))}(t) the optimal hypothesis at the same round. The cumulative regret is: R(T)=∑t=1Trht∗(c(t))(t)−rht(c(t))(t)𝑅𝑇subscriptsuperscript𝑇𝑡1subscript𝑟subscriptsuperscriptℎ𝑡𝑐𝑡𝑡subscript𝑟subscriptℎ𝑡𝑐𝑡𝑡R(T)=\sum^{T}_{t=1}{r_{h^{*}_{t}(c(t))}(t)-r_{h_{t}(c(t))}(t)}.
|
| 38 |
+
|
| 39 |
+
One widely used way to solve the contextual bandit problem is the Contextual Thompson Sampling algorithm (CTS) (?) given as Algorithm 1.In CTS, the reward rk(t)subscript𝑟𝑘𝑡r_{k}(t) for choosing arm k𝑘k at time t𝑡t follows a parametric likelihood function Pr(r(t)|μ~)𝑃𝑟conditional𝑟𝑡~𝜇Pr(r(t)|\tilde{\mu}).Following (?), the posterior distribution at time t+1𝑡1t+1, Pr(μ~|r(t))∝Pr(r(t)|μ~)Pr(μ~)proportional-to𝑃𝑟conditional~𝜇𝑟𝑡𝑃𝑟conditional𝑟𝑡~𝜇𝑃𝑟~𝜇Pr(\tilde{\mu}|r(t))\propto Pr(r(t)|\tilde{\mu})Pr(\tilde{\mu}) is given by a multivariate Gaussian distribution 𝒩(μk^(t+1)\mathcal{N}(\hat{\mu_{k}}(t+1), v2Bk(t+1)−1)v^{2}B_{k}(t+1)^{-1}), whereBk(t)=Id+∑τ=1t−1c(τ)c(τ)⊤subscript𝐵𝑘𝑡subscript𝐼𝑑subscriptsuperscript𝑡1𝜏1𝑐𝜏𝑐superscript𝜏topB_{k}(t)=I_{d}+\sum^{t-1}_{\tau=1}c(\tau)c(\tau)^{\top}, d𝑑d is the size of the context vectors c𝑐c, v=R24zd⋅ln(1γ)𝑣𝑅⋅24𝑧𝑑𝑙𝑛1𝛾v=R\sqrt{\frac{24}{z}d\cdot ln(\frac{1}{\gamma})} and we have R>0𝑅0R>0, z∈[0,1]𝑧01z\in[0,1], γ∈[0,1]𝛾01\gamma\in[0,1] constants, and μ^(t)=Bk(t)−1(∑τ=1t−1c(τ)rk(τ))^𝜇𝑡subscript𝐵𝑘superscript𝑡1subscriptsuperscript𝑡1𝜏1𝑐𝜏subscript𝑟𝑘𝜏\hat{\mu}(t)=B_{k}(t)^{-1}(\sum^{t-1}_{\tau=1}c(\tau)r_{k}(\tau)).
|
| 40 |
+
|
| 41 |
+
Every step t𝑡t consists of generating a d𝑑d-dimensional sample μk~(t)~subscript𝜇𝑘𝑡\tilde{\mu_{k}}(t) from 𝒩(μk^(t)\mathcal{N}(\hat{\mu_{k}}(t), v2Bk(t)−1)v^{2}B_{k}(t)^{-1}) for each arm. We then decide which arm k𝑘k to pull by solving for argmaxk∈Kc(t)⊤μk~(t)𝑎𝑟𝑔𝑚𝑎subscript𝑥𝑘𝐾𝑐superscript𝑡top~subscript𝜇𝑘𝑡argmax_{k\in K}c(t)^{\top}\tilde{\mu_{k}}(t). This means that at each time step we are selecting the arm that we expect to maximize the observed reward given a sample of our current beliefs over the distribution of rewards, c(t)⊤μk~(t)𝑐superscript𝑡top~subscript𝜇𝑘𝑡c(t)^{\top}\tilde{\mu_{k}}(t). We then observe the actual reward of pulling arm k𝑘k, rk(t)subscript𝑟𝑘𝑡r_{k}(t) and update our beliefs.
|
| 42 |
+
|
| 43 |
+
Here we define a new type of a bandit problem, the Behavior Constrained Contextual Bandits (BCCB), present a novel algorithm and agent for solving this problem, and derive an upper bound for both the expected online regret and the regret as a function of the number of constraint examples given by the teacher.
|
| 44 |
+
|
| 45 |
+
In this setting, the agent first goes through a constraint learning phase where it is allowed to query the user N𝑁N times and receive feedback rke(t)∈[0,1]subscriptsuperscript𝑟𝑒𝑘𝑡01r^{e}_{k}(t)\in[0,1] about whether or not the chosen decision is allowed under the desired constrained behavior during the recommendation phase. During the online recommendation phase, the goal of the agent is to maximize both rk(t)∈[0,1]subscript𝑟𝑘𝑡01r_{k}(t)\in[0,1], the reward of the action k𝑘k at time t𝑡t, while minimizing the (unobserved) rke(t)∈[0,1]subscriptsuperscript𝑟𝑒𝑘𝑡01r^{e}_{k}(t)\in[0,1], which models whether or not the pulling of arm k𝑘k violates the behavioral constraints. During the recommendation phase, the agent receives no feedback on the value of rke(t)subscriptsuperscript𝑟𝑒𝑘𝑡r^{e}_{k}(t), as the labeler may not be around to always provide this feedback. In order to follow and subsequently maximize alignment with the behavioral constraints the agent must learn an effective policy that implements the constraints during the first phase and apply it during the recommendation phase. In the second phase we are interested in the total behavioral error incurred by the agent, i.e., E(T)=∑t=1Trht(c(t))e(t)𝐸𝑇subscriptsuperscript𝑇𝑡1subscriptsuperscript𝑟𝑒subscriptℎ𝑡𝑐𝑡𝑡E(T)=\sum^{T}_{t=1}r^{e}_{h_{t}(c(t))}(t).
|
| 46 |
+
|
| 47 |
+
Our agent employs an extension of the classical Thompson sampling algorithm to first learn a constrained policy from observation and then use this constrained policy to guide the online learning task. Behavior Constrained Thompson Sampling (BCTS) contains two parts:
|
| 48 |
+
|
| 49 |
+
•Constraint Learning Phase:During this phase the agent learns the behavioral constraints through interaction with a teaching agent that is able to, at each iteration, provide a context to our agent as well as feedback as to whether or not the action chosen by our agent is allowed. This feedback takes the form of a binary reward revealed for the arm k𝑘k that is chosen at time t𝑡t, rke(t)∈[0,1]subscriptsuperscript𝑟𝑒𝑘𝑡01r^{e}_{k}(t)\in[0,1]. We use the classical Thompson sampling (CTS) algorithm (see Algorithm 2 line 2) in order to explore the constraint space and learn a policy. We also compare this against the setting where the agent chooses random arms during the teaching phase. We call the behavior that the agent learns during this phase the constrained policy μesuperscript𝜇𝑒\mu^{e} where μ^kesubscriptsuperscript^𝜇𝑒𝑘\hat{\mu}^{e}_{k} and B^ksubscript^𝐵𝑘\hat{B}_{k} denotes respectively the learned mean vector and the covariance matrix for each arm k𝑘k.•Online Recommendation Phase:During the recommendation phase the agent continually faces a dilemma: follow the constrained policy or follow the reward signal. Our algorithm uses the Thompson sampling strategy to estimate the expected rewards of the online policy for each arm (Algorithm 2 line 4–7), while using the constrained policy to estimate the expected behavior μk~(t)~subscript𝜇𝑘𝑡\tilde{\mu_{k}}(t). It then computes a weighted combination of μ~ke(t)subscriptsuperscript~𝜇𝑒𝑘𝑡\tilde{\mu}^{e}_{k}(t) and μk~(t)~subscript𝜇𝑘𝑡\tilde{\mu_{k}}(t) for each arm using σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online} as weight given by the user (line 15), this weight balances between following a reward driven policy and constrained policy. It then obtains the reward (line 16) and updates the parameters of the distribution for each μk^^subscript𝜇𝑘\hat{\mu_{k}} (line 17). Finally, the reward rk(t)subscript𝑟𝑘𝑡r_{k}(t) for the chosen arm k𝑘k is observed, and relevant parameters are updated.
|
| 50 |
+
|
| 51 |
+
We derive an upper bound on the regret R(T)𝑅𝑇R(T) of the policy computed by BCTS. We use the standard definition of the optimal policy from the Contextual MAB literature. Note that this definition is used for most bandit problems. We are also interested in studying the the behavioral error E(T)𝐸𝑇E(T) incurred by the agent for any policy it may follow in the online phase.
|
| 52 |
+
|
| 53 |
+
The above theorem tells us that, if the constrained policy μesuperscript𝜇𝑒\mu^{e} and the optimal policy μ~∗superscript~𝜇\tilde{\mu}^{*} are close to each other, then we can recover the bound on CTS given as a Lemma by ? (?). Hence, it is interesting for future work to study distributions of the data and find data driven bounds on the regret.
|
| 54 |
+
|
| 55 |
+
Theorem 2 is interesting in that, if we use Definition 2 as our optimal policy, the regret of our proposed solution is sub-linear in time T𝑇T and sub-linear in the number of training examples N𝑁N. We will compare using the CTS algorithm to a random baseline in our experiments in the next section.
|
| 56 |
+
|
| 57 |
+
To study the effect of imposing exogenous constraints on an online decision making agent and to demonstrate the soundness and flexibility of our techniques, we perform a set of experiments using real world data. As we are unaware of any prior work that we can directly compare with where a constraint is learned, or inferred, and then used to bound or control the behavior of an online agent,we construct three reasonable baselines for comparison. First, an agent who perfectly knows the constraints and is able to completely obey them, second, an agent who is follows a Thompson Sampling approach to learn the constraints, and finally, an agent that learns the constraints through random sampling of the space during the teaching phase.
|
| 58 |
+
|
| 59 |
+
We build an online movie recommendation agent (?) that learns online what movies to recommend to protected users (such as kids or older people) but also follows some guidelines set by parents or relatives over which movies are suitable (and which are not) for their kids (or older members of the family). For example, parents may think that young people should not be recommended movies with too much violence, and that older people should not be recommended horror movies.
|
| 60 |
+
|
| 61 |
+
Reward is given when the user reviews the movie, as in Netflix. We want the online agent to accrue as much reward as possible, while at the same time not violating or straying too far from the constraints. We now describe the data and how we created the constraints in this setting.
|
| 62 |
+
|
| 63 |
+
Data. We start from the MovieLens 20m dataset (?), which contains 20 million ratings of 27,000 movies by 138,000 users along with genre information. We subset this by taking the top 100 users by number of movies rated and top 1000 movies by number of ratings received. The subset of the data from MovieLens is sparse in terms of the ratings of the movies by the users. Since we resample to run many experiments over the same dataset, we create a complete rating matrix with a user based collaborative filtering pass, rounded to increments of 0.50.50.5 to match the rest of the data (?; ?).
|
| 64 |
+
|
| 65 |
+
The genre information, which defines the context vector, for movie m𝑚m is cd(m)superscript𝑐𝑑𝑚c^{d}(m) is a d=10𝑑10d=10 dimensional vector consisting of one or more of the categories: Action, Adventure, Comedy, Drama, Fantasy, Horror, Romance, Sci-Fi, Thriller. We impute ages to the users using the bands that marketers most often used in advertising: 12-17, 18-24, 25-34, 35-44, 45-54, 55-64, 65+ (?). This is drawn randomly for each user using the population by age and sex demographics from the US Census.111https://factfinder.census.gov/
|
| 66 |
+
|
| 67 |
+
Methodology. The MovieLens data does not contain any notion of constraints so we must construct the constraints to test our methods. While in the real world the we assume the behavior constraint is not given explicitly we create a behaviorally constrained training set derived from an explicit behavior constraint matrix to train our agent. The behavior constraint matrix is a {0,1}01\{0,1\} matrix of size a×d=7×10𝑎𝑑710a\times d=7\times 10 representing whether or not we can recommend a movie with genre type d𝑑d to someone of age type a𝑎a. We convert this to a behavioral training set (matrix) of size users×movies𝑢𝑠𝑒𝑟𝑠𝑚𝑜𝑣𝑖𝑒𝑠users\times movies where each cell contains the behavioral reward of recommending movie m𝑚m to user u𝑢u. We enforce a constraint in the most restricted sense, i.e., if a movie has multiple features then, if any feature is restricted, the movie is as well. For example, if the behavioral constraint matrix has a 00 in the entry at at the (12−17)×(Horror)1217Horror(12-17)\times(\text{Horror}) location then we are not allowed to suggest any movie m𝑚m which has c(m)(Horror)=1𝑐𝑚Horror1c(m)(\text{Horror})=1 to any user (arm) u𝑢u which has f(u)(12-17)=1f𝑢12-171\textbf{f}(u)(\text{12-17})=1. To learn the behaviorally constrained policy μesuperscript𝜇𝑒\mu^{e} during the constraint learning phase we use a disjoint subset of 200 movies (contexts), but the same arms (users), from those used in the recommendation phase. During this phase we use both the classic CTS algorithm as well as random exploration and vary the number queries allowed to learn μesuperscript𝜇𝑒\mu^{e}. For the recommendation phase we show the contexts (movies) to the agent as we vary σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online} between σonline=0subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0\sigma_{online}=0, always follow μesubscript𝜇𝑒\mu_{e} and σonline=1subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒1\sigma_{online}=1, always follow μ~~𝜇\tilde{\mu}. For each setting of σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online} we show the movies in the same order so our results are comparable across settings of σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online}.
|
| 68 |
+
|
| 69 |
+
Results. During the online runs we track the cumulative average regret at time T𝑇T, R(T)=∑t=1Trμ∗(t)−rμ~(t)/T𝑅𝑇subscriptsuperscript𝑇𝑡1subscript𝑟superscript𝜇𝑡subscript𝑟~𝜇𝑡𝑇R(T)=\nicefrac{{\sum^{T}_{t=1}{r_{\mu^{*}}(t)-r_{\tilde{\mu}}(t)}}}{{T}}, where rμ∗(t)subscript𝑟superscript𝜇𝑡r_{\mu^{*}}(t) is the reward for the best action the agent could have taken at time t𝑡t and rμ~subscript𝑟~𝜇r_{\tilde{\mu}} is the reward for the action actually taken. We also track the behavioral error at time T𝑇T which is given by E(T)=∑t=1Trμ~e(t)𝐸𝑇subscriptsuperscript𝑇𝑡1subscriptsuperscript𝑟𝑒~𝜇𝑡E(T)=\sum^{T}_{t=1}r^{e}_{\tilde{\mu}}(t). We vary the value of σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online} and compare these results to an omniscient agent who knows the constraints exactly and applies them as a mask, hence it never violates the behavioral constraints and is accumulating as much reward as possible under the constraints. The results of these experiments are depicted in Figure 1 as well as Table 3 and 3 where Constraint Mask is the agent who is given the constraints explicitly. For each of these experiments, we show the means over 5 cross validations using a different subset of 200 movies to train μesuperscript𝜇𝑒\mu^{e} each time. This gives us plots depicted in Figure 1 and the extended results in Tables 3 and 3. From this we can say that the agent is consistent within this setting.
|
| 70 |
+
|
| 71 |
+
Looking first at Figures 1a and 1b we see the results when we impose a number of constraints on the agent as we set σonlinesubscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒\sigma_{online} to various values; μesuperscript𝜇𝑒\mu^{e} was trained with 50,000 samples for all graphs. Recall that when σonline=0.0subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.0\sigma_{online}=0.0 the agent is not sensitive to the reward and hence has consistent behavior during the online phase, accumulating a larger amount of regret than the other agents but incurring less behavioral error. The interesting result comes when allowing some sensitivity to the online feedback (σonline=0.50subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.50\sigma_{online}=0.50) as we get, for both the CTS and the random pretraining, drastically better performance in terms of balancing R(t)𝑅𝑡R(t) and E(t)𝐸𝑡E(t) which can be seen by contrasting with Figures 1(d) and 1(e) which plot E(t)𝐸𝑡E(t). Encouragingly, looking at Figures 1(d) and 1(e) we see that while the masked agent never makes any errors, the σonline={0.0,0.25,0.50}subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.00.250.50\sigma_{online}=\{0.0,0.25,0.50\} agents are able to make a very small number of errors, indicating that we have been able to learn the constraints well from only the examples.
|
| 72 |
+
|
| 73 |
+
Turning to the question of which method of pretraining is better, random or CTS, Tables 3 and 3 give us a closer look. These tables show R(T)𝑅𝑇R(T) and E(T)𝐸𝑇E(T) with T=50,000𝑇50000T=50,000 for the movie domain when one agent was trained with CTS and the other with random. Surprisingly, we see that the random pretraining agent is better at learning the constraints across the board than the agent trained with CTS; making significantly fewer errors when σonline{0.00,0.25,0.50}subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.000.250.50\sigma_{online}\{0.00,0.25,0.50\} and decreasing the total error, E(T)𝐸𝑇E(T) as we train it with more examples. Going so far as to behave optimally when we set σonline=0.0subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.0\sigma_{online}=0.0 and pretrain with 100K examples. Most interestingly, we see in Table 3 that the random agent for σonline=0.25subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.25\sigma_{online}=0.25 and 100K examples is able to both make no behavioral errors, i.e., E(T)=0𝐸𝑇0E(T)=0 and out perform the Constraint Mask in terms of R(T)𝑅𝑇R(T). From this table we can infer two things: (1) that our random agent is able to learn a high quality constrained policy given only examples and (2) that it is able to deploy this policy in the online recommendation phase.
|
| 74 |
+
|
| 75 |
+
Turning to a more high stakes domain, we consider a dataset for the jealthcare domain, specifically about the Warfarin drug. Warfarin is one of the most used anticoagulants in the world and correct dosing is a standing challenge (?). Over 40,000 emergency room visits a year are related to Warfarin dosing (?) and, for this reason, large datasets are available that track upwards of 50 patient factors along with the appropriate dosing levels.
|
| 76 |
+
|
| 77 |
+
Data & Methods. In this dataset the context dimensionality d=39𝑑39d=39 and includes factors such as age, sex, and presence of interacting drugs including acetaminophen. The dosing options, the arms here, is in three levels: low, medium, and high. To create behavioral constraints we suppose that there are two additional features, randomly distributed amongst the patients, such that the presence of both of these features would cause a significant decrease in the quality of life of the patient. We add a no dose arm, and enforce, as a behavioral constraint, that patients should not be prescribed Warfarin if both additional features are present. Reward in the online case is obtained by the agent for prescribing the correct dosing level, hence there will always be a cost associated with following the behavioral constraints in this setting. The rest of our methodology is unchanged from the movie dataset.
|
| 78 |
+
|
| 79 |
+
Results. We track the same statistics as for the movie domain. The results are depicted in Figures 1c and 1f when we train μesubscript𝜇𝑒\mu_{e} with 50,000 teaching examples. First, we see that our agent is able to learn a very good constrained policy in this space and follow it. Again, Our σonline=0.25subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.25\sigma_{online}=0.25 agent with 50,000 examples is able to have regret on par with the Constraint Mask agent while only making 1,500 mistakes over 20,000 trials versus nearly 20,000 for all the other agents. Allowing increasing the sensitivity to the online reward improves the performance of the agent but, in this setting, the constraints are orthogonal to the rewards. Thus the only way to collect additional reward is to violate the constraints and we see this in the high number of errors necessary in order to decrease regret. However, the σonline=0.25subscript𝜎𝑜𝑛𝑙𝑖𝑛𝑒0.25\sigma_{online}=0.25 agent is able to perform on par with the Constraint Mask agent with only about 75 errors per 1,000 pulls. The high dimensionality the Warfarin data can cause problems for convergence when modeled as CMAB problem (?). However, we we still achieve good results for the constrained behavior in this setting.
|
| 80 |
+
|
| 81 |
+
Looking at both experimental domains, we see that using either random or CTS we are able to learn a high quality constrained policy described only by examples of appropriate behavior. While we have theoretical bounds for the quality of our CTS agent, we see that the random agent is able to outperform it in practice. Regardless, the agent is able to use this policy to guide the actions it takes during the recommendation phase. This agent is able to make decisions that very rarely (or never) violate the constrained policy, achieving performance on par with an agent that is given the behavioral constraints explicitly. Understanding the specific interaction between the distribution of the behavioral constraints and the rewards in the data is an important direction for future work. We saw that in some cases we are able to follow the constraints without affecting the accumulated rewards, while in other cases it had a large impact on the quality of the agents decisions. We also plan to use an active learning approach (?) to the problem, where the online agent is presented the option to query the omniscient constraint agent during the online phase.
|
| 82 |
+
|
| 83 |
+
In real life scenarios agents that recommend items to humans are subject to a plethora of exogenous priorities, given by ethical principles, moral values, social norms, and professional codes. It is essential that AI system are able to understand decisions based on their compliance to such constraints in order to reach suitable tradeoffs between satisfying user’s desires and behaving appropriately. We propose to achieve this tradeoff by extending the CMAB problem machinery to include exogenous constraints, modeled in the form of a policy learned during a constraint learning phase from observing a teaching agent. Our evaluation over real data shows that our system can act within these behavior constraints while not significantly degrading the reward. An important direction for future work is understanding the interaction between the behavioral constraints and the online rewards for various data distributions.
|
1809.05724v2.txt
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Natural Language Inference (NLI) – also known as textual entailment – is a fundamental task in Natural Language Understanding (NLU) (?). Progress on the NLI problem has been shown to improve performance on important tasks that require NLU, including semantic search, question answering, and text summarization. In accordance with this, multiple large-scale datasets for NLI have been released (?; ?; ?), and the task has garnered significant attention from the NLP community (?; ?; ?; ?; ?).
|
| 2 |
+
|
| 3 |
+
The main goal in the NLI problem is to determine whether a given natural language hypothesis h can be inferred from a natural language premise p. NLI is often cast as a classification problem: given two sentences – hypothesis and premise – the problem lies in classifying the relationship between them into one of three classes: ‘entailment’, ‘contradiction’, or ‘neutral’. In this paper, we restrict our focus in solving the NLI problem to the “entailment” class, as it is the most salient to down-stream tasks such as question answering (?); we group the other two options into the “neutral” class. Specifically, we develop a framework that accurately assesses whether a given premise entails a given hypothesis using background knowledge provided by external sources including WordNet (?), ConceptNet (?), and DBPedia (?).
|
| 4 |
+
|
| 5 |
+
Usable inference and reasoning methods have been a central contribution of artificial intelligence research. Specifically, reasoning methods and the knowledge bases that support them have played an important role in addressing formal reasoning tasks. Our own previous work (?) associates the QA task with the reasoning and knowledge types required to answer various types of science exam questions. While the introduction of large datasets for NLI has led to it being cast as a classification problem, the potential of pre-existing knowledge has been only minimally explored (?; ?). This knowledge may manifest itself in various forms: as facts consisting of entities and their relationships; as lexical knowledge about the synonyms of entities; or as common-sense concepts and relationships between them. Exploiting additional knowledge from different knowledge graphsmay well aid attempts to solve the NLI problem.
|
| 6 |
+
|
| 7 |
+
Figure 1 shows an example of a subgraph that can be derived from ConceptNet based on the concepts mentioned in a given premise and hypothesis111Example based on the SNLI dataset (?).. This subgraph includes connections between the concepts mentioned in the premise and the hypothesis, via concepts available in ConceptNet. Such subgraphs, enhances the concepts mentioned in the text with additional information and hence can improve the performance of learning-based systems (?; ?), particularly for NLI.
|
| 8 |
+
|
| 9 |
+
Contributions. In this paper, we introduce the ConSeqNet framework, which enables the use of various kinds of external knowledge bases to retrieve knowledge relevant to a given NLI instance, by retrieving information related to the premise and hypothesis. We describe our novel architecture and demonstrate its use with a specific external knowledge source – ConceptNet – and evaluate its performance on two other sources, WordNet and DBpedia. We compare the performance of three distinct approaches to augmenting the knowledge used to train for and to predict entailment relationships between given pairs of premises and hypotheses: graph-only, text-only, and text-and-graph. Using both qualitative and quantitative results, we demonstrate that introducing graph-based features boosts performance on the NLI problem, but only when text features are present as well. Our system has a competitive performance (accuracy) of 85.2%percent85.285.2\% on the SciTail entailment dataset, which is derived from science domain question answering datasets.
|
| 10 |
+
|
| 11 |
+
We consider prior work in the areas of both the Natural Language Inference, and Knowledge Graphs222We use External Knowledge and Knowledge Graphs interchangeably in this paper.; as well as work at their intersection.
|
| 12 |
+
|
| 13 |
+
Recently, the NLI task has gained significant attention due to the release of multiple crowd-sourced, large-scale datasets that can be used to train neural network classifiers (?; ?; ?; ?; ?). In particular, the SNLI (?) dataset has been a major catalyst of research on NLI facilitating learning-based approaches by providing a sufficient number of training examples for data-intensive learning algorithms. The Multi Genre NLI corpus (MultiNLI) (?) is an effort to address the limitations of SNLI. The dataset focuses on domain adaptation by introducing genre labels for each sentence pair. SciTail (?), derived from science domain multiple choice question datasets (?; ?), has the focus on the down-stream task of standardized-test question-answering.
|
| 14 |
+
|
| 15 |
+
Neural networks with an encoder-attention-classifier architecture are commonly used for NLI tasks (?; ?; ?). To encode the premise and hypothesis, most methods use RNNs, which are used for many NLP tasks. ? (?) used LSTMs to learn sentence representations for premise and hypothesis separately, concatenating them for classification. ? (?) introduced a word-by-word attention model that learns conditional encodings of premise and hypothesis for textual entailment. The match-LSTM model (?) extended the model presented by ? (?) to address the limitation of a single vector representation of the premise for learning attention weights. The next step in this direction was the multi-perspective matching mechanism introduced by ? (?). Most of these text-based models differ from each other in their attention mechanisms. While the above-mentioned approaches used word-by-word attention mechanisms, ? (?) has explored inter-sentence interactions for textual entailment on the SciTail dataset; however, other NLI datasets were not used for evaluation. Recently, ? (?) exposed the simplicity of the existing neural network models by showing that they do not perform well on a new test-set that has significantly lesser overlap between the premise and hypothesis. The best performing model on this test set is ? (?) which harnesses WordNet as external knowledge; providing added motivation to explore external knowledge sources for NLI.
|
| 16 |
+
|
| 17 |
+
Most openly available external knowledge sources are in the form of graphs, commonly known as Knowledge Graphs (KG). Some of the well known KGs include Freebase, DBpedia, Yago, and ConceptNet. A KG is defined as a set of concepts connected by relationships where the concepts form the nodes of the graph and the relationships are the labeled edges. A fact such as “Barack Obama is the spouse of Michelle Obama” is represented in a KG (for example on DBpedia) as dbr:Barack_Obama dbo:spouse dbr:Michelle_Obama, where dbr:Barack_Obama and dbr:Michelle_Obama are nodes and dbo:spouse is a labeled edge.
|
| 18 |
+
|
| 19 |
+
KGs have been used extensively in Information Retrieval (?), Recommendation Systems (?; ?) and Question Answering (?).The prominent concern when using KGs is the availability of relevant knowledge, both in terms of applicability to the task setting and to the domain/topic of interest. This is closely related to the way in which these knowledge graphs are created. For instance, DBpedia is a generic knowledge base with information extracted from Wikipedia infoboxes; these contain facts such as (Barack_Obama, spouseof, Michelle_Obama). By contrast, ConceptNet (?) consists of common-sense knowledge acquired through crowd sourcing. While DBpedia is well suited for entity-based tasks such as movie recommendation and entity disambiguation, ConceptNet may be more appropriate if common sense reasoning is required. WordNet is a lexical database offering synonyms, hypernyms, hyponyms, and antonyms. In this work, we experiment with DBpedia, ConceptNet, and WordNet.
|
| 20 |
+
|
| 21 |
+
Few prior approaches have exploited syntactic structures in the form of graphs for textual entailment (?; ?).However, the graph structures used in these models do not come from external knowledge sources and are not used to enhance the textual content of either the premise or hypothesis. One work which closely relates to the objective of the paper, i.e., enhancing the model with external knowledge is ? (?). This work harnesses WordNet as the external knowledge for NLI. WordNet, however, is a lexical database restricted to a small number of linguistic relationships among terms. Furthermore, ? (?) uses only four relationships to generate five features based on WordNet. In our work, including WordNet, we explore more expressive KGs such as DBpedia and ConceptNet. Also, the most important difference is the way we use KGs: our method enriches the texts (as graphs) and builds a matching model over the enriched texts for textual entailment. Another interesting alternative direction for using KGs such as WordNet for NLI is presented by ? (?). The approach generates adversarial examples for robust training of NLI systems, but this improves performance only during limited supervision.
|
| 22 |
+
|
| 23 |
+
In this section, we present the architecture of our system called ConSeqNet, and the approach underlying it. Figure 2 depicts the framework of ConSeqNet – the system can use both textual as well as structured information from KGs to assist in determining textual entailment. The framework can be clearly divided into two parts: (a) a text based model that takes in as input the premise and hypothesis text; and (2) a graph based model whose input is specific knowledge derived from the knowledge base using the given premise and hypothesis.
|
| 24 |
+
|
| 25 |
+
Most models developed for NLI have relied on the text of the given premise and hypothesis, without the aid of any external knowledge. These models follow an encode-attend-classify framework. First, the premise and hypothesis are encoded using recurrent neural networks (RNNs). Next, an attention layer is implemented on top of the encoders. The final layer is then used for classification. In our work, we have primarily used match-LSTM (?) as our text based model. We opted for match-LSTM for two main reasons: (1) match-LSTM as an entailment model has been proved useful for multiple NLP tasks (?; ?)and (2) our implementation of match-LSTM performed significantly better than the baselines (details in Section 4).
|
| 26 |
+
|
| 27 |
+
Given a premise P𝑃P (with K𝐾K words) and a hypothesis H𝐻H (with J𝐽J words), the model computes the matching results between them as follows:
|
| 28 |
+
|
| 29 |
+
•Context Encoding:A contextual representation of the premise and hypothesis is generated by first transforming premise P𝑃P and hypothesis H𝐻H into their embedding vectors 𝐭𝐢𝐩subscriptsuperscript𝐭𝐩𝐢\mathbf{t^{p}_{i}} and 𝐭𝐣𝐡subscriptsuperscript𝐭𝐡𝐣\mathbf{t^{h}_{j}}, where 𝐭𝐢𝐩subscriptsuperscript𝐭𝐩𝐢\mathbf{t^{p}_{i}} and 𝐭𝐣𝐡subscriptsuperscript𝐭𝐡𝐣\mathbf{t^{h}_{j}} are embedding vectors of i𝑖i-th word in premise and j𝑗j-th word in hypothesis. These embedding vectors are further encoded using BiLSTMs to generate the context encodings of premise and hypothesis. Let 𝐩isubscript𝐩𝑖\mathbf{p}_{i} and 𝐡jsubscript𝐡𝑗\mathbf{h}_{j} be the contextual representation of the i𝑖i-th word of premise and the j𝑗j-th word of hypothesis.•Word-by-Word Attention: This layer computes the inter-attention between the contextual embeddings of the premise and hypothesis. The entries of the (unnormalized) attention matrix 𝐄∈ℝK×J𝐄superscriptℝ𝐾𝐽\mathbf{E}\in\mathbb{R}^{K\times J} are defined as:Eij=𝐩i⋅𝐡jsubscript𝐸𝑖𝑗⋅subscript𝐩𝑖subscript𝐡𝑗E_{ij}=\mathbf{p}_{i}\cdot\mathbf{h}_{j}(1)we can then compute the soft alignment αjsubscript𝛼𝑗\alpha_{j} for the hypothesis as follows:αj=∑i=1Kexp(Eij)∑k=1Kexp(Ekj)𝐩isubscript𝛼𝑗superscriptsubscript𝑖1𝐾subscript𝐸𝑖𝑗superscriptsubscript𝑘1𝐾subscript𝐸𝑘𝑗subscript𝐩𝑖\alpha_{j}=\sum_{i=1}^{K}\frac{\exp(E_{ij})}{\sum_{k=1}^{K}\exp(E_{kj})}\mathbf{p}_{i}(2)•Matcher: We compare the soft aligned premise and hypothesis at each word position as a feature vector:𝐡~j=[𝐡j;αj;𝐡j−αj;𝐡j⊙αj],subscript~𝐡𝑗subscript𝐡𝑗subscript𝛼𝑗subscript𝐡𝑗subscript𝛼𝑗direct-productsubscript𝐡𝑗subscript𝛼𝑗\tilde{\mathbf{h}}_{j}=\left[\mathbf{h}_{j};\alpha_{j};\mathbf{h}_{j}-\alpha_{j};\mathbf{h}_{j}\odot\alpha_{j}\right],where ⊙direct-product\odot denotes the element-wise multiplication, and [;][;] denotes vector concatenation.The feature vectors for all the hypothesis positions are fed into a BiLSTM to get the matching states {𝐡jm}j=1:J=BiLSTM({𝐡~j}j=1:J)subscriptsuperscriptsubscript𝐡𝑗m:𝑗1𝐽BiLSTMsubscriptsubscript~𝐡𝑗:𝑗1𝐽\{\mathbf{h}_{j}^{\textrm{m}}\}_{j=1:J}=\textrm{BiLSTM}(\{\tilde{\mathbf{h}}_{j}\}_{j=1:J}).•Pooling: To get a fixed-sized vector representation for the matching result, we apply max-pooling:𝐱outtext=max([𝐡1m,𝐡2m,…,𝐡Jm])superscriptsubscript𝐱outtextsuperscriptsubscript𝐡1msuperscriptsubscript𝐡2m…superscriptsubscript𝐡𝐽m\mathbf{x}_{\text{out}}^{\text{text}}=\max\left(\left[\mathbf{h}_{1}^{\textrm{m}},\mathbf{h}_{2}^{\textrm{m}},\dots,\mathbf{h}_{J}^{\textrm{m}}\right]\right)(3)𝐱outtextsuperscriptsubscript𝐱outtext\mathbf{x}_{\text{out}}^{\text{text}} is then used for classification.
|
| 30 |
+
|
| 31 |
+
The input to the graph based model is a premise graph and a hypothesis graph respectively. As shown in Figure 2, the first step is to transform the given premise and hypothesis text into a relevant subgraph mapped to an external knowledge. Given premise text P𝑃P and hypothesis text H𝐻H, the transformation generates Pg=(Vp,Ep)subscript𝑃𝑔subscript𝑉𝑝subscript𝐸𝑝P_{g}=(V_{p},E_{p}) and Hg=(Vh,Eh)subscript𝐻𝑔subscript𝑉ℎsubscript𝐸ℎH_{g}=(V_{h},E_{h}) where Vp=(v1p,…,vKp)subscript𝑉𝑝subscriptsuperscript𝑣𝑝1…subscriptsuperscript𝑣𝑝𝐾V_{p}=(v^{p}_{1},...,v^{p}_{K}) and Vh=(v1h,…,vJh)subscript𝑉ℎsubscriptsuperscript𝑣ℎ1…subscriptsuperscript𝑣ℎ𝐽V_{h}=(v^{h}_{1},...,v^{h}_{J}) are a subset of concepts in the knowledge graph. Epsubscript𝐸𝑝E_{p} and Ehsubscript𝐸ℎE_{h} are labeled edges connecting concepts in Pgsubscript𝑃𝑔P_{g} and Hgsubscript𝐻𝑔H_{g} respectively. Hgsubscript𝐻𝑔H_{g} and Pgsubscript𝑃𝑔P_{g} are the input for our graph-based entailment model.
|
| 32 |
+
|
| 33 |
+
Premise and hypothesis graphs are generated by mapping text phrases to concepts in the external knowledge graph. For instance, as shown in Figure 1, given hypothesis “The farmers are ploughing the fields”, we map “farmers”, “ploughing, and “fields” in the sentence to their corresponding concepts in the external knowledge. We use the following techniques to generate three different types of subgraphs for each premise and each hypothesis separately:
|
| 34 |
+
|
| 35 |
+
•Concepts Only333Concepts in the Concepts Only graph are used to form the base set for One-Hop and Two-Hop graph generation techniques.: For each premise and hypothesis, we use lexical mappings within each knowledge source to map individual words and phrases to concepts. Those concepts make up the vertices of the Concepts Only subgraph. All edges connecting those vertices are also included in the subgraph.•One-Hop: The concepts in the Concepts Only graph for premise and hypothesis are expanded to include all their one hop neighbors in the external knowledge source.•Two-Hop: Two-Hop graphs were generated by adding two hop neighbors to the Concepts Only graph, but only if they constitute paths between vertices that were already in the Concepts Only graph. This can be thought of as a graph that increases interconnectedness by introducing minimal new concepts, hence reducing noise. We took this approach because we observed that One-Hop graphs turned to be noisy (on average, the One-Hop graphs generated using ConceptNet increased the number of concepts extracted from premise text from 9 to 326).We use the graphs constructed (under the three conditions above) for premise and hypothesis as the input to our neural network model for entailment. In this work, we explore two different neural network models: (1) Gmatch-LSTM; and (2) Graph concepts attention model (GconAttn).
|
| 36 |
+
|
| 37 |
+
Our first design choice was to use match-LSTM with the Concepts Only graphs Pgsubscript𝑃𝑔P_{g} and Hgsubscript𝐻𝑔H_{g}.The key idea is to treat each node (concept) in the vertex set of a given graph (Vpsubscript𝑉𝑝V_{p} or Vhsubscript𝑉ℎV_{h}) as a single token, and re-arrange them into a sequence of concepts. This sequence is ordered by the length of the concept and its positions in the original texts. Thus, match-LSTM can be applied to match the sequence of premise concepts and the sequence of hypothesis concepts.
|
| 38 |
+
|
| 39 |
+
In contrast with the text based model, where each word is first represented as its word embedding vector, in the graph based match-LSTM each concept is initialized using the corresponding Concept Embedding. The concept embeddings are trained by knowledge graph embedding techniques such as TransH (?), and CompleX (?) using the corresponding knowledge graph.
|
| 40 |
+
|
| 41 |
+
The use of match-LSTM is justified when the input is the Concepts Only graph, since the concept can be aligned in the order of their appearance in premise and hypothesis to form text sequences. However, it is non-trivial to order the concepts in the graphs generated by the One-Hop and Two-Hop strategies; this makes the use of match-LSTM unintuitive. We therefore develop a new model GconAttn (Graph Concepts Attention Model) to overcome this limitation.
|
| 42 |
+
|
| 43 |
+
The embeddings of premise and hypothesis concepts from the graph are the input to the neural network. An attention weighted representation of both premise and hypothesis is determined, and is transformed to a final fixed size representation using pooling. This representation of premise and hypothesis (concatenated) is used for classification. Below, we distinguish the graph based model from the match-LSTM (text based) model described previously:
|
| 44 |
+
|
| 45 |
+
•Context Encoding: Since the concept graphs may not have sequential structures, the GconAttn model directly starts with the concept embeddings.•Word-by-Word Attention: This layer computes the inter-attention between the embeddings of the concepts in premise and hypothesis to find the best aligned concepts between the respective graphs. The major difference from match-LSTM is that GconAttn performs two-way attention (?).The model computes the soft alignment for premise and hypothesis respectively as follows:βi=∑j=1Jexp(Eij)∑k=1Jexp(Eik)𝐡j,αj=∑i=1Kexp(Eij)∑k=1Kexp(Ekj)𝐩iformulae-sequencesubscript𝛽𝑖superscriptsubscript𝑗1𝐽subscript𝐸𝑖𝑗superscriptsubscript𝑘1𝐽subscript𝐸𝑖𝑘subscript𝐡𝑗subscript𝛼𝑗superscriptsubscript𝑖1𝐾subscript𝐸𝑖𝑗superscriptsubscript𝑘1𝐾subscript𝐸𝑘𝑗subscript𝐩𝑖\beta_{i}=\sum_{j=1}^{J}\frac{\exp(E_{ij})}{\sum_{k=1}^{J}\exp(E_{ik})}\mathbf{h}_{j},\quad\alpha_{j}=\sum_{i=1}^{K}\frac{\exp(E_{ij})}{\sum_{k=1}^{K}\exp(E_{kj})}\mathbf{p}_{i}•Matcher: Due to the lack of sequential structure, the matching nodes of each hypothesis concept j𝑗j or premise concept i𝑖i are computed with a projection feed-forward network:𝐩𝐢𝐦=F([𝐩i;βi;𝐩i−βi;𝐩i⊙βi])subscriptsuperscript𝐩𝐦𝐢𝐹subscript𝐩𝑖subscript𝛽𝑖subscript𝐩𝑖subscript𝛽𝑖direct-productsubscript𝐩𝑖subscript𝛽𝑖{\mathbf{p^{m}_{i}}}=F\left(\left[\mathbf{p}_{i};\beta_{i};\mathbf{p}_{i}-\beta_{i};\mathbf{p}_{i}\odot\beta_{i}\right]\right)𝐡𝐣𝐦=F([𝐡j;αj;𝐡j−αj;𝐡j⊙αj])subscriptsuperscript𝐡𝐦𝐣𝐹subscript𝐡𝑗subscript𝛼𝑗subscript𝐡𝑗subscript𝛼𝑗direct-productsubscript𝐡𝑗subscript𝛼𝑗{\mathbf{h^{m}_{j}}}=F\left(\left[\mathbf{h}_{j};\alpha_{j};\mathbf{h}_{j}-\alpha_{j};\mathbf{h}_{j}\odot\alpha_{j}\right]\right)where F(⋅)𝐹⋅F(\cdot) denotes a feed-forward network; ⊙direct-product\odot denotes the element-wise multiplication; and [;][;] denotes vector concatenation.•Pooling: Finally, we apply max-pooling and mean-pooling across all matching nodes in the premise and hypothesis. The output of pooling is concatenated, and is presented as the output of the graph model, which can then be used to make the final prediction. 𝐬∈{𝐡,𝐩}𝐬𝐡𝐩\mathbf{s}\in\{\mathbf{h},\mathbf{p}\}.𝐬max′=max([𝐬𝟏𝐦,𝐬𝟐𝐦,…,𝐬𝐍𝐦])subscriptsuperscript𝐬′subscriptsuperscript𝐬𝐦1subscriptsuperscript𝐬𝐦2…subscriptsuperscript𝐬𝐦𝐍\displaystyle\mathbf{s}^{\prime}_{\max}=\max\left(\left[{\mathbf{s^{m}_{1}}},{\mathbf{s^{m}_{2}}},\dots,{\mathbf{s^{m}_{N}}}\right]\right)(4)𝐬avg′=avg([𝐬𝟏𝐦,𝐬𝟐𝐦,…,𝐬𝐍𝐦])subscriptsuperscript𝐬′avgavgsubscriptsuperscript𝐬𝐦1subscriptsuperscript𝐬𝐦2…subscriptsuperscript𝐬𝐦𝐍\displaystyle\mathbf{s}^{\prime}_{\text{avg}}=\text{avg}\left(\left[{\mathbf{s^{m}_{1}}},{\mathbf{s^{m}_{2}}},\dots,{\mathbf{s^{m}_{N}}}\right]\right)𝐱outgraph=[𝐩max′;𝐩avg′;𝐡max′;𝐡avg′]superscriptsubscript𝐱outgraphsubscriptsuperscript𝐩′subscriptsuperscript𝐩′avgsubscriptsuperscript𝐡′subscriptsuperscript𝐡′avg\displaystyle\mathbf{x}_{\text{out}}^{\text{graph}}=\left[\mathbf{p}^{\prime}_{\max};\mathbf{p}^{\prime}_{\text{avg}};\mathbf{h}^{\prime}_{\max};\mathbf{h}^{\prime}_{\text{avg}}\right]
|
| 46 |
+
|
| 47 |
+
The final results of matching the text model 𝐱outtextsuperscriptsubscript𝐱outtext\mathbf{x}_{\text{out}}^{\text{text}} and the graph model 𝐱outgraphsuperscriptsubscript𝐱outgraph\mathbf{x}_{\text{out}}^{\text{graph}} are concatenated, and passed on to a feed forward network that classifies between entailment and neutral, which are the two classes in the SciTail dataset:
|
| 48 |
+
|
| 49 |
+
𝐩𝐫𝐞𝐝=F([𝐱outtext;𝐱outgraph])𝐩𝐫𝐞𝐝𝐹superscriptsubscript𝐱outtextsuperscriptsubscript𝐱outgraph\mathbf{pred}=F\left(\left[\mathbf{x}_{\text{out}}^{\text{text}};\mathbf{x}_{\text{out}}^{\text{graph}}\right]\right)(5)
|
| 50 |
+
|
| 51 |
+
It is important to note that the final hidden state of the graph model can be directly fed into a classifier. This can be considered an entailment model that uses only information from external knowledge.
|
| 52 |
+
|
| 53 |
+
In this section, we detail the experiments that we perform to evaluate our ConSeqNet system. We first describe each dataset, followed by the training setup of our best model and implementation details. We then compare that model’s performance to numbers from recent entailment models and baselines. In the latter parts of this section, we discuss the selection of knowledge graphs and the performance of graph construction techniques – specifically, the Concepts Only, One-Hop, and Two-Hop methods (c.f. Section 3).
|
| 54 |
+
|
| 55 |
+
We use the SciTail dataset (?), which is a textual entailment dataset derived from publicly released science domain multiple choice question answering datasets (?; ?). The dataset contains 27,0262702627,026 sentence pairs (premise and hypothesis), with binary labels denoting whether the relationship between each pair is entails or neutral. The hypothesis is created using the question and correct answer from the options; the premise is retrieved from the ARC corpus (data.allenai.org/arc/arc-corpus. The performance of the entailment models on this dataset is shown in Table 1; the evaluation metric is accuracy.
|
| 56 |
+
|
| 57 |
+
All words in the text model are initialized by 300D Glove vectors (Glove 840B 300D) (nlp.stanford.edu/projects/glove), and the concepts that act as the input for the graph model are initialized by 300D ConceptNet PPMI vectors (?); these are openly available for ConceptNet. We use the pre-trained embeddings without any fine tuning. We have adapted match-LSTM with GRUs as our text and graph based model. The system is trained by Adagraph with a learning rate of 0.0010.0010.001, and batch size of 404040. Both the text and graph based models are trained jointly. For the graph model, we use concepts from the Concepts Only graph, which is generated using the approach detailed in Section 3.2.
|
| 58 |
+
|
| 59 |
+
We used the AllenNLP (allennlp.org) library to implement all the models used in the experiments. While the previous section (Training Setup) specifically focused on our best performing model, here we provide implementation details for all the experiments that were performed. We used a plug-and-play approach where we varied: (a) text models (match-LSTM, DeCompAttn); (b) graph models (Gmatch-LSTM, GconAttn); (c) external knowledge sources (DBpedia, WordNet, and ConceptNet); (d) graph construction techniques (Concepts Only, One Hop, and Two Hop); and (e) graph embeddings (CN-PPMI, TransH).
|
| 60 |
+
|
| 61 |
+
In order to map text to concepts, we used DBpedia Spotlight (?) for DBpedia, and Spacy (spacy.io) to implement a max-substring match for WordNet and ConceptNet. While ConceptNet had openly available embeddings (CC-PPMI), we used TransH embeddings (?) generated using OpenKE (openke.thunlp.org) with default configurations for the other knowledge sources.
|
| 62 |
+
|
| 63 |
+
We compare our work to the following baselines: (1) Decomposable Attention Model (Decomp-Att) (?); (2) Decomposed Graph Entailment Model (DGEM) (?), which is the first of the entailment models to use graph structure from OpenIE as external knowledge and show improvements on SciTail; (3) Deep explorations of Inter-sentence interactions for Textual entailment (DeIsTe) (?); (4) BiLSTM-Maxout (?), the latest entailment model that has shown promise on the SciTail dataset444The details of the BiLSTM-Maxout (?) model are not available. We have reported the numbers provided in a pre-print of a publication that is to appear.; (4) match-LSTM (?), which has shown good performance on the SNLI dataset; (5) match-LSTM with GRU, which replaces LSTMs with GRUs for its encoding, since GRUs give better empirical results (this is also the match-LSTM model used in our ConSeqNet model); and (5) match-LSTM – WordNet features ? (?), which uses five features based on synonyms, antonyms, hypernyms, and co-hypernyms from WordNet (external knowledge) in its co-attention mechanism to improve performance on SNLI. We reimplement these five features and add them to baseline (5).
|
| 64 |
+
|
| 65 |
+
Table 1 shows the performance of our ConSeqNet model in comparison to other entailment models. Two of the five models in Table 1 use some kind of external knowledge (indicated by *). Almost all the match-LSTM variations exhibit accuracy greater than 84%, which is better than the recent entailment models on which the SciTail dataset has been tested. Similar to the results shown in (?), using GRUs with match-LSTM slightly improved the accuracy (particularly on the dev set). The accuracy of our jointly trained model ConSeqNet is 89.6%percent89.689.6\% on the dev set and 85.2%percent85.285.2\% on the test set. Later in this paper, we expound further on our model – this includes choices such as the use of different knowledge sources, graph models, and the graph construction technique.
|
| 66 |
+
|
| 67 |
+
In this work, we focus on openly available knowledge graphs. Based on the knowledge graphs’ availability for use and their distinct properties, we chose DBpedia, ConceptNet, and WordNet. In Table 2, we provide details on each of these knowledge graphs. DBpedia is the largest with more than 555 million entities and 333333 million facts. ConceptNet subsumes WordNet conceptually, and both contain general type information; however, the reliability of WordNet’s linguistic features is higher than ConceptNet’s.
|
| 68 |
+
|
| 69 |
+
For the NLI problem, WordNet has only been partially explored. WordNet is a lexical database with a restricted set of relationships between terms. ? (?) use WordNet by creating five new knowledge-based features that are added (for co-attention) to their model. The five features are derived from synonym/antonym and hypernym/hyponym relationships in WordNet between terms in the premise and hypothesis. In Table 1, we show that using the expanded set of features from WordNet – used in the attention mechanism of match-LSTM – has an accuracy of 84.3%percent84.384.3\% on the SciTail datset. While WordNet is useful, it is restrictive in terms of its applicability, particularly because of its coverage and the types of relationships available. DBpedia and ConceptNet are larger knowledge sources, as shown in Table 2.
|
| 70 |
+
|
| 71 |
+
In terms of the number of concepts mapped from text to external knowledge, ConceptNet has more concepts (9) on average in comparison to DBpedia (6). While it is important that the graphs are not noisy, it is also important to have enough information to exploit. In which case, ConceptNet is slightly better with few more concepts per sentence.
|
| 72 |
+
|
| 73 |
+
The types of relationships between concepts in DBpedia are factual and derived from Wikipedia. Based on qualitative analysis of these relationships, we found that they may not be suitable for NLI datasets, and specifically SciTail. On the other hand, we found that, ConceptNet with its 40 relationships expressing common sense knowledge may be more suitable. In order to quantitatively select the right knowledge source, we determined the impact of the each knowledge graph on SciTail. We created the Concepts Only graph from each of the available external knowledge sources, and evaluated them using our match-LSTM+GconAttn model on the dev set of SciTail. The results of this experiment are shown in Table 3; based on these results, we decided to use ConceptNet for all our graph-based experiments (detailed next).
|
| 74 |
+
|
| 75 |
+
In order to select the graph generation mechanism (c.f. Section 3.2) that has the highest impact on the NLI problem, we ran experiments with match-LSTM as our text model and GconAttn as our graph model. GconAttn was chosen because the concepts retrieved from One-Hop and Two-Hop do not have any specific sequence or ordering. Table 4 presents the results of these experiments with the same hyperparameters for all three graph generation experimental conditions.
|
| 76 |
+
|
| 77 |
+
All the graph+text models perform equally well. However, when only the graph model is considered, the One-Hop graph exhibits lower accuracy in comparison to the Concepts Only and Two-Hop graphs. This may be due to the noise induced from external knowledge and the addition of a large number of concepts in the One-Hop case. On average, premise and hypothesis sentences consist of 191919 and 121212 words respectively, but their respective One-Hop graphs have over 300300300 concepts. On the other hand, the Concepts Only graphs average 999 and 666 concepts with better performance than the One-Hop graphs (72.3%percent72.372.3\% vs 68.2%percent68.268.2\%). Based on these results, and the simplicity of the graph construction technique, we pursued further experiments with the Concepts Only graphs.
|
| 78 |
+
|
| 79 |
+
The accuracy of the graph only models are relatively low, whereas the graph+text and text only models are comparable. This might lead to the conclusion that the graph+text model is only driven by the text. However, an Oracle model condition, where we choose the correct answer between the text and graph models, indicates that the graph model contributes to improved accuracy on the dev set (88.5% for text only from Table 1 versus at least 91.6% for Oracle). With One-Hop, the graph model correctly predicts almost 40% of the answers that are incorrectly predicted by the text-only model. We thus conclude that there is value to using external knowledge for NLI on SciTail. This is contrary to ? (?)’s conclusion that external knowledge from ConceptNet is not useful in this domain.
|
| 80 |
+
|
| 81 |
+
We experimented with many text models and selected match-LSTM due to its superior performance on SciTail. In order to determine the best combination of the graph models (Gmatch-LSTM and GconAttn) with match-LSTM as the text model, we ran multiple experiments on the SciTail dev set. The results are shown in Table 5. Both GconAttn and Gmatch-LSTM are competitive in their performance. We also experimented with different knowledge graph embeddings to determine their impact on these models. ConceptNet-CN-PPMI clearly shows an improvement (89.6) in comparison to other models on the dev set. This model is used as our final model to be evaluated and compared against the baselines, leading to new state of the art performance numbers as shown in Table 1.
|
| 82 |
+
|
| 83 |
+
In this paper, we presented the ConSeqNet system: an entailment model for solving the Natural Language Inference (NLI) problem that utilizes ConceptNet as an external knowledge source. Our model provides performance that is close to state-of-the-art, with an accuracy of 85.2% on the SciTail dataset.We analyze various external knowledge sources and their effect on NLI, and show – in direct contrast to other recent studies – that there is promise in using knowledge graphs such as ConceptNet for textual entailment.
|
| 84 |
+
|
| 85 |
+
Our future work includes designing a framework to exploit multiple relevant knowledge sources based on the given dataset and context. Existing external knowledge sources are known to be extremely noisy, and new techniques must be developed in order to extract knowledge relevant to a specific task (such as NLI). Another interesting direction involves exploring new ways to represent the structure of premise and hypothesis subgraphs, and systematically using the relations between the concepts contained therein to improve performance on the NLI task.
|
1809.05793v2.txt
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Spiking neural networks, a sub-category of brain-inspired computing models, use spatio-temporal dynamics to mimic neural behaviors and binary spike signals to communicate between units. Benefit from the event-driven processing paradigm (computation occurs only when the unit receives spike event), SNNs can be efficiently implemented on specialized neuromorphic hardware for power-efficient processing, such as SpiNNaker \cite{Khan2008SpiNNaker}, TrueNorth \cite{Merolla2014Artificial}, and Loihi \cite{Davies2018Loihi}.
|
| 3 |
+
|
| 4 |
+
As well known, the powerful error backpropagation (BP) algorithm and larger and larger model size enabled by ANN-oriented programming frameworks (e.g. Tensorflow, Pytorch) has boosted the wide applications of ANNs in recent years. However, the rich spatio-temporal dynamics and event-driven paradigm make SNNs much different from conventional ANNs. Till now SNNs have not yet demonstrated comparable performance to ANNs due to the lack of effective learning algorithms and efficient programming frameworks, which greatly limit the network scale and application spectrum \cite{Tavanaei2018Deep}.
|
| 5 |
+
|
| 6 |
+
In terms of learning algorithms, three challenges exist for training large-scale SNNs. First, the complex neural dynamics in both spatial and temporal domains make BP obscure. Specifically, the neural activities not only propagate layer by layer in spatial domain, but also affect the states along the temporal direction, which is more complicated than typical ANNs. Second, the event-driven spiking activity is discrete and non-differentiable, which impedes the BP implementation based on gradient descent. Third, SNNs are more sensitive to parameter configuration because of binary spike representation. Especially in the training phase, we should simultaneously ensure timely response for presynaptic stimulus and avoid too many spikes that will probably degrade the neuronal selectivity. Although previous work has proposed many techniques to adjust firing rate, such as model-based normalization \cite{Diehl2015Fast} and spike-based normalization \cite{Sengupta2018Going}, all of them are specialized for ANNs-to-SNNs conversion learning, not for the direct training of SNNs as considered in this paper.
|
| 7 |
+
|
| 8 |
+
In terms of programming frameworks, we lack suitable platforms to support the training of deep SNNs. Although there exist several platforms serving for simulating biological features of SNNs with varied abstraction levels \cite{Brette2007Simulation,Carnevale2006The,Hazan2018BindsNET}, little work is designed for training deep SNNs. Researchers have to build application-oriented models from scratch and the training speed is usually slow. On the other hand, emerging ANN-oriented frameworks can provide much better efficiency, especially for large models, hence a natural idea is to map the SNN training onto these frameworks. However, these frameworks are designed for aforementioned ANN algorithms so that they cannot be directly applied to SNNs because of the neural dynamic of spiking neurons.
|
| 9 |
+
|
| 10 |
+
In this paper, we propose a full-stack solution towards faster, larger, and better SNNs from both algorithm and programming aspects. We draw inspirations from the recent work \cite{Wu2018Spatio}, which proposes the spatio-temporal back propagation (STBP) method for the direct training of SNNs, and significantly extend it to much deeper structure, larger dataset, and better performance. We first propose the NeuNorm method to balance neural selectivity and increase the performance. Then we
|
| 11 |
+
improve the rate coding to fasten the convergence and convert the LIF model into an explicitly iterative version to make it compatible with a machine learning framework (Pytorch). As a results, compared to the running time on Matlab, we achieve tens of times speedup that enables the direct training of deep SNNs. The best accuracy on neuromorphic datasets (N-MNIST and DVS-CIFAR10) and comparable accuracy as existing ANNs and pre-trained SNNs on non-spiking datasets (CIFAR10) are demonstrated. This work enables the exploration of direct training of high-performance SNNs and facilitates the SNN applications via compatible programming within the widely used machine learning (ML) framework.
|
| 12 |
+
\section{Related work}
|
| 13 |
+
We aims to direct training of deep SNNs. To this end, we mainly make improvements on two aspects: (1) learning algorithm design; (2) training acceleration optimization. We chiefly overview the related works in recent years.
|
| 14 |
+
|
| 15 |
+
\textbf{Learning algorithm for deep SNNs}. There exist three ways for SNN learning: i) unsupervised learning such as spike timing dependent plasticity (STDP); ii) indirect supervised learning such as ANNs-to-SNNs conversion; iii) direct supervised learning such as gradient descent-based back propagation. However, by far most of them limited to very shallow structure (network layer less than 4) or toy small dataset (e.g. MNIST, Iris), and little work points to direct training deep SNNs due to their own challenges.
|
| 16 |
+
|
| 17 |
+
STDP is biologically plausible but the lack of global information hinders the convergence of large models, especially on complex datasets \cite{Timoth2007Unsupervised,Diehl2015Unsupervised,Tavanaei2017Bio}.
|
| 18 |
+
|
| 19 |
+
The ANNs-to-SNNs conversion \cite{Diehl2015Fast,Cao2015Spiking,Sengupta2018Going,Hu2018Spiking} is currently the most successful method to model large-scale SNNs. They first train non-spiking ANNs and convert it into a spiking version. However, this indirect training help little on revealing how SNNs learn since it only implements the inference phase in SNN format (the training is in ANN format). Besides, it adds many constraints onto the pre-trained ANN models, such as no bias term, only average pooling, only ReLU activation function, etc. With the network deepens, such SNNs have to run unacceptable simulation time (100-1000 time steps) to obtain good performance.
|
| 20 |
+
|
| 21 |
+
The direct supervised learning method trains SNNs without conversion. They are mainly based on the conventional gradient descent. Different from the previous spatial backpropagation \cite{Lee2016Training,Jin2018Hybrid}, \cite{Wu2018Spatio} proposed the first backpropagation in both spatial and temporal domains to direct train SNNs, which achieved state-of-the-art accuracy on MNIST and N-MNIST datasets. However, the learning algorithm is not optimized well and the slow simulation hinders the exploration onto deeper structures.
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
\textbf{Normalization}. Many normalization techniques have been proposed to improve the convergence \cite{Ioffe2015Batch,Wu2018Group}. Although these methods have achieved great success in ANNs, they are not suitable for SNNs due to the complex neural dynamics and binary spiking representation of SNNs. Furthermore, in terms of hardware implementation, batch-based normalization techniques essentially incur lateral operations across different stimuluses which are not compatible with existing neuromorphic platforms \cite{Merolla2014Artificial,Davies2018Loihi}. Recently, several normalization methods (e.g. model-based normalization \cite{Diehl2015Fast}, data-based normalization \cite{Diehl2015Fast}, spike-based normalization \cite{Sengupta2018Going}) have been proposed to improve SNN performance. However, such methods are specifically designed for the indirect training with ANNs-to-SNNs conversion, which didn't show convincing effectiveness for direct training of SNNs targeted by this work.
|
| 26 |
+
|
| 27 |
+
\textbf{SNN programming frameworks}. There exist several programming frameworks for SNN modeling, but they have different aims. NEURON \cite{Carnevale2006The} and Genesis \cite{Bower1998The} mainly focus on the biological realistic simulation from neuron functionality to synapse reaction, which are more beneficial for the neuroscience community. BRIAN2 \cite{Goodman2009The} and NEST \cite{Gewaltig2007NEST} target the simulation of larger scale SNNs with many biological features, but not designed for the direct supervised learning for high performance discussed in this work. BindsNET \cite{Hazan2018BindsNET} is the first reported framework towards combining SNNs and practical applications. However, to our knowledge, the support for direct training of deep SNNs is still under development. Furthermore, according to the statistics from ModelDB \footnote{ModelDB is an open website for storing and sharing computational neuroscience models.}, in most cases researchers even simply program in general-purpose language, such as C/C++ and Matlab, for better flexibility. Besides the different aims, programming from scratch on these frameworks is user unfriendly and the tremendous execution time impedes the development of large-scale SNNs. Instead of developing a new framework, we provide a new solution to establish SNNs by virtue of mature ML frameworks which have demonstrated easy-to-use interface and fast running speed.
|
| 28 |
+
\section{Approach}
|
| 29 |
+
In this section, we first convert the LIF neuron model into an easy-to-program version with the format of explicit iteration. Then we propose the NeuNorm method to adjust the neuronal selectivity for improving model performance. Furthermore, we optimize the rate coding scheme from encoding and decoding aspects for faster response. Finally, we describe the whole training and provide the pseudo codes for Pytorch.
|
| 30 |
+
\subsection{Explicitly iterative LIF model}
|
| 31 |
+
LIF model is commonly used to describe the behavior of neuronal activities, including the update of membrane potential and spike firing. Specifically, it is governed by
|
| 32 |
+
|
| 33 |
+
\begin{footnotesize}
|
| 34 |
+
\begin{align}
|
| 35 |
+
\tau \frac{du}{dt} = -u + I, \quad u<V_{th}
|
| 36 |
+
\label{LIF_1}
|
| 37 |
+
\\
|
| 38 |
+
\text{fire a spike}~\&~u = u_{reset}, \quad u \ge V_{th}
|
| 39 |
+
\label{LIF_1_v}
|
| 40 |
+
\end{align}
|
| 41 |
+
\end{footnotesize}
|
| 42 |
+
where $u$ is the membrane potential, $\tau$ is a time constant, $I$ is pre-synaptic inputs, and $V_{th}$ is a given fire threshold. Eq. (\ref{LIF_1})-(\ref{LIF_1_v}) describe the behaviors of spiking neuron in a way of updating-firing-resetting mechanism (see Fig. \ref{LIF}a-b). When the membrane potential reaches a given threshold, the neuron will fire a spike and $u$ is reset to $u_{reset}$; otherwise, the neuron receives pre-synapse stimulus $I$ and updates its membrane potential according to Eq. (\ref{LIF_1}).
|
| 43 |
+
\begin{figure} [!htb]
|
| 44 |
+
\centering
|
| 45 |
+
\includegraphics[width=8.5cm]{fig-lif.jpg}
|
| 46 |
+
\caption{\textbf{Illustration of iterative LIF}. Spike communication between neurons; (b) The update of membrane potential according to Eq. (\ref{LIF_1})-Eq. (\ref{LIF_1_v}); (c) Iterative LIF described by Eq. (\ref{LIF_STD_1})-Eq. (\ref{LIF_STD_2}).}
|
| 47 |
+
\label{LIF}
|
| 48 |
+
\end{figure}
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
The above differential expressions described in continuous domain are widely used for biological simulations, but it is too implicit for the implementations on mainstream ML frameworks (e.g. Tensorflow, Pytorch) since the embedded automatic differentiation mechanism executes codes in a discrete and sequential way \cite{paszke2017automatic}. Therefore, it motivates us to convert Eq. (\ref{LIF_1})-(\ref{LIF_1_v}) into an explicitly iterative version for ensuring
|
| 52 |
+
computational tractability. To this end, we first use Euler method to solve the first-order differential equation of Eq. (\ref{LIF_1}), and obtain an iterative expression
|
| 53 |
+
\begin{footnotesize}
|
| 54 |
+
\begin{align}
|
| 55 |
+
u^{t+1} = (1-\frac{dt}{\tau}) u^{t} + \frac{dt}{\tau}I.
|
| 56 |
+
\label{LIF_2}
|
| 57 |
+
\end{align}
|
| 58 |
+
\end{footnotesize}
|
| 59 |
+
We denote the factor $ (1-\frac{dt}{\tau})$ as a decay factor $k_{\tau 1}$ and expand the pre-synaptic input $I$ to a linearing summation $\sum_j{W_{j}o(j)}$. The subscript $j$ indicates the index of pre-synapse and $o(j)$ denotes the corresponding pre-synaptic spike which is binary (0 or 1). By incorporating the scaling effect of $\frac{dt}{\tau}$ into synapse weights $W$, we have
|
| 60 |
+
\begin{footnotesize}
|
| 61 |
+
\begin{align}
|
| 62 |
+
u^{t+1} = k_{\tau 1} u^{t} + \sum_j{W_{j}o(j)}.
|
| 63 |
+
\label{LIF_3}
|
| 64 |
+
\end{align}
|
| 65 |
+
\end{footnotesize}
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
Next we add the firing-and-resetting mechanism to Eq. (\ref{LIF_3}). By assuming $u_{reset} = 0$ as usual, we get the final update equations as below
|
| 69 |
+
\begin{footnotesize}
|
| 70 |
+
\begin{align}
|
| 71 |
+
\label{LIF_STD_1}
|
| 72 |
+
u^{t+1,n+1}(i) &= k_{\tau 1}u^{t,n+1}(i)(1 - o^{t,n+1}(i))+\sum_{j=1}^{l(n )}w_{ij}^{n} o^{t+1,n}(j), \\
|
| 73 |
+
\label{LIF_STD_2}
|
| 74 |
+
o^{t+1,n+1}(i) &= f(u^{t+1,n+1}(i) - V_{th}),
|
| 75 |
+
\end{align}
|
| 76 |
+
\end{footnotesize}
|
| 77 |
+
where $n$ and $l(n)$ denote the $n$-th layer and its neuron number, respectively, $w_{ij}$ is the synaptic weight from the $j$-th neuron in pre-layer ($n$) to the $i$-th neuron in the post-layer ($n+1$). $f(\cdot)$ is the step function, which satisfies $f(x)=0$ when $x<0$, otherwise $f(x)=1$ . Eq (\ref{LIF_STD_1})-(\ref{LIF_STD_2}) reveal that firing activities of $o^{t,n+1}$ will affect the next state $o^{t+1,n+1}$ via the updating-firing-resetting mechanism (see Fig. \ref{LIF}c). If the neuron emits a spike at time step $t$, the membrane potential at $t+1$ step will clear its decay component $k_{\tau 1} u_{t}$ via the term $(1-o_j^{t,n+1})$, and vice versa.
|
| 78 |
+
|
| 79 |
+
Through Eq. (\ref{LIF_STD_1})-(\ref{LIF_STD_2}), we convert the implicit Eq. (\ref{LIF_1})-(\ref{LIF_1_v}) into an explicitly version, which is easier to implement on ML framework. We give a concise pseudo code based on Pytorch for an explicitly iterative LIF model in Algorithm \ref{Algorithm 1}.
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
\begin{algorithm}[!htb]
|
| 83 |
+
\caption{ State update for an explicitly iterative LIF neuron at time step $t+1$ in the $(n+1)$-th layer.}
|
| 84 |
+
\label{Algorithm 1}
|
| 85 |
+
\begin{small}
|
| 86 |
+
\begin{algorithmic}[1]
|
| 87 |
+
\REQUIRE Previous potential $u^{t,n+1}$ and spike output $o^{t,n+1}$, current spike input $o^{t+1,n}$, and weight vector $W$
|
| 88 |
+
\ENSURE Next potential $u^{t+1,n+1}$ and spike output $o^{t+1,n+1}$ \\
|
| 89 |
+
\textbf{Function} StateUpdate($W$,$u^{t,n+1}, o^{t,n+1}, o^{t+1,n})$\\
|
| 90 |
+
\STATE \quad $u^{t+1,n+1} = k_{\tau 1} u^{t,n+1}(1-o^{t,n+1})+Wo^{t+1,n }$;\\
|
| 91 |
+
\STATE \quad $o^{t+1,n+1} = f(u^{t+1,n+1}- V_{th})$ \quad
|
| 92 |
+
|
| 93 |
+
\RETURN $u^{t+1,n+1}, o^{t+1,n+1}$
|
| 94 |
+
|
| 95 |
+
\end{algorithmic}
|
| 96 |
+
\end{small}
|
| 97 |
+
\end{algorithm}
|
| 98 |
+
\subsection{Neuron normalization (NeuNorm)}
|
| 99 |
+
Considering the signal communication between two convolutional layers, the neuron at the location $(i, j)$ of the $f$-th feature map (FM) in the $n$-th layer receives convolutional inputs $I$, and updates its membrane potential by
|
| 100 |
+
\begin{footnotesize}
|
| 101 |
+
\begin{align}
|
| 102 |
+
\label{Conv_u}
|
| 103 |
+
u_f^{t+1,n+1}(i,j) &= k_{\tau 1}u_f^{t,n+1}(i,j)(1 - o_f^{t,n+1}(i,j) )+I_f^{t+1,n+1}(i,j),\\
|
| 104 |
+
\label{Conv_input}
|
| 105 |
+
I_f^{t+1,n+1}(i,j) &= \sum_{c}W_{c,f}^{n}\circledast o^{t+1,n}_c(R{(i,j)}),
|
| 106 |
+
\end{align}
|
| 107 |
+
\end{footnotesize}
|
| 108 |
+
where $W_{c,f}^{n}$ denotes the weight kernel between the $c$-th FM in layer $n$ and the $f$-th FM in layer $n+1$, $\circledast$ denotes the convolution operation, and $R{(i,j)}$ denotes the local receptive filed of location $(i, j)$.
|
| 109 |
+
\begin{figure} [!htbp]
|
| 110 |
+
|
| 111 |
+
\centering
|
| 112 |
+
\includegraphics[width=6cm]{fig-NeuNorm.jpg}
|
| 113 |
+
\caption{\textbf{Illustration of NeuNorm}. Blue squares represent the normal neuronal FMs, and orange squares represents the auxiliary neuronal FMs. The auxiliary neurons receive lateral inputs (solid lines), and fire signals (dotted lines) to control the strength of stimulus emitted to the next layer.}
|
| 114 |
+
\label{NeuNorm}
|
| 115 |
+
|
| 116 |
+
\end{figure}
|
| 117 |
+
|
| 118 |
+
An inevitable problem for training SNNs is to balance the whole firing rate because of the binary spike communication \cite{Diehl2015Fast,Wu2018Spatio}. That is to say, we need to ensure timely and selective response to pre-synaptic stimulus but avoid too many spikes that probably harm the effective information representation. In this sense, it requires that the strength of stimulus maintains in a relatively stable range to avoid activity vanishing or explosion as network deepens.
|
| 119 |
+
|
| 120 |
+
Observing that neurons respond to stimulus from different FMs, it motivates us to propose an auxiliary neuron method for normalizing the input strength at the same spatial locations of different FMs (see Fig. \ref{NeuNorm}). The update of auxiliary neuron status $x$ is described by
|
| 121 |
+
\begin{footnotesize}
|
| 122 |
+
\begin{align}
|
| 123 |
+
\label{Conv_x}
|
| 124 |
+
x^{t+1,n}(i,j)=k_{\tau 2}x^{t,n}(i,j)+ \frac{v}{F} \sum_f o^{t+1,n}_{f}(i,j),
|
| 125 |
+
\end{align}
|
| 126 |
+
\end{footnotesize}
|
| 127 |
+
where $k_{\tau 2}$ denotes the decay factor, $v$ denotes the constant scaling factor, and $F$ denotes the number of FMs in the $n$-th layer. In this way, Eq.(\ref{Conv_x}) calculates the average response to the input firing rate with momentum term $k_{\tau 2}x^{t,n}(i,j)$. For simplicity we set $k_{\tau_2}+vF = 1$.
|
| 128 |
+
|
| 129 |
+
Next we suppose that the auxiliary neuron receives the lateral inputs from the same layer, and transmits signals to control the strength of stimulus emitted to the next layer through trainable weights $U_c^n$, which has the same size as the FM. Hence, the inputs $I$ of neurons in the next layer can be modified by
|
| 130 |
+
\begin{footnotesize}
|
| 131 |
+
\begin{align}
|
| 132 |
+
\label{Modifed_Input}
|
| 133 |
+
\nonumber
|
| 134 |
+
I_f^{t+1,n+1}(i,j) = \sum_{c}W_{c,f}^{n} \circledast ( o_c^{t+1,n}(R(i,j))-...\\
|
| 135 |
+
U_{c}^n(R(i,j))\cdot x^{t+1,n}(R(i,j))).
|
| 136 |
+
\end{align}
|
| 137 |
+
\end{footnotesize}
|
| 138 |
+
|
| 139 |
+
Inferring from Eq. (\ref{Modifed_Input}), NeuNorm method essentially normalize the neuronal activity by using the input statistics (moving average firing rate). The basic operation is similar with the zero-mean operation in batch normalization. But NeuNorm has different purposes and different data processing ways (normalizing data along the channel dimension rather than the batch dimension). This difference brings several benefits which may be more suitable for SNNs. Firstly, NeuNorm is compatible with neuron model (LIF) without additional operations and friendly for neuromorphic implementation. Besides that, NeuNorm is more bio-plausible. Indeed, the biological visual pathways are not independent. The response of retina cells for a particular location in an image is normalized across adjacent cell responses in the same layer \cite{Carandini2012Normalization,Mante2008Functional}. And inspired by these founding, many similar techniques for exploiting channel features have been successfully applied to visual recognition, such as group normalization (GN) \cite{Wu2018Group}, DOG \cite{Dalal2005Histograms} and HOG \cite{Dalal2005Histograms}. For example, GN divides FMs of the same layer into several groups and normalizes the features within each group also along channel dimension.
|
| 140 |
+
\subsection{Encoding and decoding schemes}
|
| 141 |
+
To handle various stimulus patterns, SNNs often use abundant coding methods to process the input stimulus. For visual recognition tasks, a popular coding scheme is rate coding. On the input side, the real-valued images are converted into a spike train whose fire rate is proportional to the pixel intensity. The spike sampling is probabilistic, such as following a Bernoulli distribution or a Poisson distribution. On the output side, it counts the firing rate of each neuron in the last layer over given time windows to determine network output. However, the conventional rate coding suffers from long simulation time to reach good performance. To solve this problem, we take a simpler coding scheme to accelerate the simulation without compromising the performance.
|
| 142 |
+
|
| 143 |
+
\textbf{Encoding}.
|
| 144 |
+
One requirement for long simulation time is to reduce the sampling error when converting real-value inputs to spike signals. Specifically, given the time window $T$, a neuron can represent information by $T+1$ levels of firing rate, i.e. $\{0, \frac{1}{T},...,1\}$ (normalized). Obviously, the rate coding requires sufficient long window to achieve satisfactory precision. To address this issue, we assign the first layer as an encoding layer and allow it to receive both spike and non-spike signals (compatible with various datasets). In other words, neurons in the encoding layer can process the even-driven spike train from neuromorphic dataset naturally, and can also convert real-valued signals from non-spiking dataset into spike train with enough precision. In this way, the precision is remained to a great extent without depending much on the simulation time.
|
| 145 |
+
|
| 146 |
+
\textbf{Decoding}. Another requirement for long time window is the representation precision of network output. To alleviate it, we adopt a voting strategy \cite{Diehl2015Unsupervised} to decode the network output. We configure the last layer as a voting layer consisting of several neuron populations and each output class is represented by one population.
|
| 147 |
+
In this way, the burden of representation precision of each neuron in the temporal domain (firing rate in a given time windows) is transferred much to the spatial domain (neuron group coding). Thus, the requirement for long simulation time is significantly reduced. For initialization, we randomly assign a label to each neuron; while during training, the classification result is determined by counting the voting response of all the populations.
|
| 148 |
+
|
| 149 |
+
In a nutshell, we reduce the demand for long-term window from above two aspects, which in some sense extends the representation capability of SNNs in both input and output sides. We found similar coding scheme is also leveraged by previous work on ANN compression \cite{tang2017train,Hubara2016Binarized}. It implies that, regardless of the internal lower precision, maintaining the first and last layers in higher precision are important for the convergence and performance.
|
| 150 |
+
\subsection{Overall training implementation}
|
| 151 |
+
We define a loss function $L$ measuring the mean square error between the averaged voting results and label vector $Y$ within a given time window $T$
|
| 152 |
+
\begin{footnotesize}
|
| 153 |
+
\begin{align}
|
| 154 |
+
\label{loss}
|
| 155 |
+
L = \parallel Y - \frac{1}{T} \sum_{t=1}^T M o^{t,N} \parallel_2^2,
|
| 156 |
+
\end{align}
|
| 157 |
+
\end{footnotesize}
|
| 158 |
+
|
| 159 |
+
where $o^{t,N}$ denotes the voting vector of the last layer $N$ at time step $t$. $M$ denotes the constant voting matrix connecting each voting neuron to a specific category.
|
| 160 |
+
|
| 161 |
+
From the explicitly iterative LIF model, we can see that the spike signals not only propagate through the layer-by-layer spatial domain, but also affect the neuronal states through the temporal domain. Thus, gradient-based training should consider both the derivatives in these two domains. Based on this analysis, we integrate our modified LIF model, coding scheme, and proposed NeuNorm into the STBP method \cite{Wu2018Spatio} to train our network. When calculating the derivative of loss function $L$ with respect to $u$ and $o$ in the $n$-th layer at time step $t$, the STBP propagates the gradients $\frac{\partial L}{\partial o_i^{t,n+1}}$ from the $(n+1)$-th layer and $\frac{\partial L}{\partial o_i^{t+1,n}}$ from time step $t+1$ as follows
|
| 162 |
+
\begin{footnotesize}
|
| 163 |
+
\begin{align}
|
| 164 |
+
\label{stbp-o}
|
| 165 |
+
\frac{\partial L}{\partial o_i^{t,n}}
|
| 166 |
+
&=
|
| 167 |
+
\sum_{j=1}^{l(n+1)}\frac{\partial L}{\partial o_i^{t,n+1}}\frac{\partial o_j^{t,n+1}}{\partial o_i^{t,n}} + \frac{\partial L}{\partial o_i^{t+1,n}}\frac{\partial o_i^{t+1,n}}{\partial o_i^{t,n}} ,
|
| 168 |
+
\\
|
| 169 |
+
\label{stbp-u}
|
| 170 |
+
\frac{\partial L}{\partial u_i^{t,n}}
|
| 171 |
+
&=
|
| 172 |
+
\frac{\partial L}{\partial o_i^{t,n}} \frac{\partial o_i^{t,n}}{\partial u_i^{t,n}}+\frac{\partial L}{\partial o_i^{t+1,n}}\frac{\partial o_i^{t+1,n}}{\partial u_i^{t,n}} .
|
| 173 |
+
\end{align}
|
| 174 |
+
\end{footnotesize}
|
| 175 |
+
|
| 176 |
+
\begin{algorithm}[!ht]
|
| 177 |
+
\begin{threeparttable}
|
| 178 |
+
\caption{ Training codes for one iteration.}
|
| 179 |
+
\label{Algorithm 2}
|
| 180 |
+
\begin{small}
|
| 181 |
+
\begin{algorithmic}[1]
|
| 182 |
+
\REQUIRE Network inputs $\{X^t\}_t^T$, class label $Y$, parameters and states of convolutional layers ($\{W^{l}$, $U^{l}$ , $u^{0,l}$, $o^{0,l}\}_{l=1}^{N_1}$) and fully-connected layers ($\{W^{l}$, $u^{0,l}$, $o^{0,l}\}_{l=1}^{N_2}$), simulation windows $T$, voting matrix $M$\quad // Map each voting neuron to label.
|
| 183 |
+
\ENSURE Update network parameters.\\
|
| 184 |
+
~\\
|
| 185 |
+
\textbf{Forward (inference):} \\
|
| 186 |
+
\FOR{$t = 1$ to $T$}
|
| 187 |
+
\STATE $o^{t,1}$ $\leftarrow$ EncodingLayer($X^t$) \quad
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
\FOR{ $l = 2$ to $N_1 $ }
|
| 191 |
+
\STATE $x^{t,l-1}$ $\leftarrow$ AuxiliaryUpdate($x^{t-1,l-1}$, $o^{t,l-1}$)\quad // Eq. (\ref{Conv_x}).
|
| 192 |
+
\STATE ($u^{t,l }$, $o^{t,l}$) $\leftarrow$ StateUpdate($W^{l-1}$, $u^{t-1,l }$, $o^{t-1,l }$, $o^{t,l-1},U^{l-1}, x^{t,l-1 }$)\quad // Eq. (\ref{LIF_STD_2})-(\ref{Conv_u}), and (\ref{Conv_x})-(\ref{Modifed_Input})
|
| 193 |
+
\ENDFOR
|
| 194 |
+
|
| 195 |
+
\FOR{$l = 1$ to $N_2$}
|
| 196 |
+
\STATE ($u^{t,l}$, $o^{t,l}$) $\leftarrow$ StateUpdate($W^{l-1}$, $u^{t-1,l}$, $o^{t-1,l}$, $o^{t,l-1}$)\\ // Eq. (\ref{LIF_STD_1})-(\ref{LIF_STD_2})
|
| 197 |
+
|
| 198 |
+
\ENDFOR
|
| 199 |
+
\ENDFOR \\
|
| 200 |
+
~\\
|
| 201 |
+
\textbf{Loss:} \\
|
| 202 |
+
\STATE $L$ $\leftarrow$ ComputeLoss($Y$, $M$, $o^{t,N_2}$)\quad // Eq. (\ref{loss}). \\
|
| 203 |
+
~\\
|
| 204 |
+
\textbf{Backward:} \\
|
| 205 |
+
\STATE Gradient initialization: $\frac{\partial L}{\partial o^{T+1,*}} = 0$.
|
| 206 |
+
\FOR{ $t = T$ to 1 }
|
| 207 |
+
\STATE $\frac{\partial L}{\partial o^{t,N_2}}$ $\leftarrow$ LossGradient($L,M,\frac{\partial L}{\partial o^{t+1,N_2}}$)\\ // Eq. (\ref{LIF_STD_1})-(\ref{LIF_STD_2}), and (\ref{loss})-(\ref{stbp-u}).
|
| 208 |
+
|
| 209 |
+
\FOR{ $l = N_2-1$ to 1 }
|
| 210 |
+
\STATE ($\frac{\partial L}{\partial o^{t,l}}$, $\frac{\partial L}{\partial u^{t,l}}$, $\frac{\partial L}{\partial W^{l}}$) $\leftarrow$ BackwardGradient($\frac{\partial L}{\partial o^{t,l+1}},$ $\frac{\partial L}{\partial o^{t+1,l}}, W^l$)\quad // Eq. (\ref{LIF_STD_1})-(\ref{LIF_STD_2}), and (\ref{stbp-o})-(\ref{stbp-u}). \\
|
| 211 |
+
\ENDFOR
|
| 212 |
+
|
| 213 |
+
\FOR{ $l = N_1$ to 2}
|
| 214 |
+
\STATE ($\frac{\partial L}{\partial o^{t,l}}$, $\frac{\partial L}{\partial u^{t,l}}$, $\frac{\partial L}{\partial W^{l-1}}$, $\frac{\partial L}{\partial U^{l-1}}$) $\leftarrow$ BackwardGradient( $\frac{\partial L}{\partial o^{t,l+1}}$,$\frac{\partial L}{\partial o^{t+1,l}}, W^{l-1},U^{l-1}$)\\ // Eq. (\ref{LIF_STD_2})-(\ref{Conv_u}), (\ref{Conv_x})-(\ref{Modifed_Input}), and (\ref{stbp-o})-(\ref{stbp-u}).
|
| 215 |
+
\ENDFOR \\
|
| 216 |
+
|
| 217 |
+
\ENDFOR \\
|
| 218 |
+
~\\
|
| 219 |
+
\STATE \textbf{Update parameters based on gradients}. \\
|
| 220 |
+
~\\
|
| 221 |
+
\footnotesize Note: All the parameters and states with layer index $l$ in the $N_1$ or $N_2$ loop belong to the convolutional or fully-connected layers, respectively. For clarity, we just use the symbol of $l$.
|
| 222 |
+
\end{algorithmic}
|
| 223 |
+
\end{small}
|
| 224 |
+
\end{threeparttable}
|
| 225 |
+
|
| 226 |
+
\end{algorithm}
|
| 227 |
+
|
| 228 |
+
A critical problem in training SNNs is the non-differentiable property of the binary spike activities. To make its gradient available, we take the rectangular function $h(u)$ to approximate the derivative of spike activity \cite{Wu2018Spatio}. It yields
|
| 229 |
+
\begin{footnotesize}
|
| 230 |
+
\begin{align}
|
| 231 |
+
\label{Approximation}
|
| 232 |
+
h(u) = \frac{1}{a} sign(|u-V_{th}|<\frac{a}{2}),
|
| 233 |
+
\end{align}
|
| 234 |
+
\end{footnotesize}
|
| 235 |
+
where the width parameter $a$ determines the shape of $h(u)$. Theoretically, it can be easily proven that Eq. (\ref{Approximation}) satisfies
|
| 236 |
+
\begin{footnotesize}
|
| 237 |
+
\begin{align}
|
| 238 |
+
\lim \limits_{a\rightarrow0^{+}}h(u)=\frac{df}{du}.
|
| 239 |
+
\end{align}
|
| 240 |
+
\end{footnotesize}
|
| 241 |
+
Based on above methods, we also give a pseudo code for implementing the overall training of proposed SNNs in Pytorch, as shown in Algorithm \ref{Algorithm 2}.
|
| 242 |
+
\section{Experiment}
|
| 243 |
+
We test the proposed model and learning algorithm on both neuromorphic datasets (N-MNIST and DVS-CIFAR10) and non-spiking datasets (CIFAR10) from two aspects: (1) training acceleration; (2) application accuracy. The dataset introduction, pre-processing, training detail, and parameter configuration are summarized in Appendix.
|
| 244 |
+
\subsection{Network structure}
|
| 245 |
+
Tab. \ref{Table-structure1} and Tab. \ref{Table-structure2} provide the network structures for acceleration analysis and accuracy evaluation, respectively. The structure illustrations of what we call AlexNet and CIFARNet are also shown in Appendix, which are for fair comparison to pre-trained SNN works with similar structure and to demonstrate comparable performance with ANNs, respectively. It is worth emphasizing that previous work on direct training of SNNs demonstrated only shallow structures (usually 2-4 layers), while our work for the first time can implement a direct and effective learning for larger-scale SNNs (e.g. 8 layers).
|
| 246 |
+
|
| 247 |
+
\begin{table}[!htbp]
|
| 248 |
+
\centering
|
| 249 |
+
\caption{Network structures used for training acceleration.}
|
| 250 |
+
\label{Table-structure1}
|
| 251 |
+
|
| 252 |
+
\scalebox{0.85}{
|
| 253 |
+
\begin{tabular}{ll}
|
| 254 |
+
\hline
|
| 255 |
+
\multicolumn{2}{c}{\large Neuromorphic Dataset} \\ \hline
|
| 256 |
+
Small & 128C3(Encoding)-AP2-128C3-AP2-512FC-Voting \\
|
| 257 |
+
Middle & 128C3(Encoding)-128C3-AP2-256-AP2-1024FC-Voting \\
|
| 258 |
+
Large & 128C3(Encoding)-128C3-AP2-384C3-384C3-AP2-\\
|
| 259 |
+
& 1024FC-512FC-Voting \\ \hline
|
| 260 |
+
\multicolumn{2}{c}{\large Non-spiking Dataset} \\ \hline
|
| 261 |
+
Small & 128C3(Encoding)-AP2-256C3-AP2-256FC-Voting \\
|
| 262 |
+
Middle & 128C3(Encoding)-AP2-256C3-512C3-AP2-512FC-Voting \\
|
| 263 |
+
Large & 128C3(Encoding)-256C3-AP2-512C3-AP2-1024C3-512C3-\\
|
| 264 |
+
& 1024FC-512FC-Voting \\ \hline
|
| 265 |
+
\end{tabular}}
|
| 266 |
+
\end{table}
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
\begin{table}[!htbp]
|
| 270 |
+
\centering
|
| 271 |
+
\caption{Network structures used for accuracy evaluation.}
|
| 272 |
+
\label{Table-structure2}
|
| 273 |
+
\scalebox{0.85}{
|
| 274 |
+
\begin{tabular}{ll}
|
| 275 |
+
\hline
|
| 276 |
+
\multicolumn{2}{c}{\large Neuromorphic Dataset} \\ \hline
|
| 277 |
+
Our model & 128C3(Encoding)-128C3-AP2-128C3-256C3-AP2-\\
|
| 278 |
+
& 1024FC-Voting \\ \hline
|
| 279 |
+
|
| 280 |
+
\multicolumn{2}{c}{\large Non-spiking Dataset} \\ \hline
|
| 281 |
+
AlexNet & 96C3(Encoding)-256C3-AP2-384C3-AP2-384C3-\\
|
| 282 |
+
& 256C3-1024FC-1024FC-Voting \\
|
| 283 |
+
CIFARNet & 128C3(Encoding)-256C3-AP2-512C3-AP2-1024C3-\\
|
| 284 |
+
&512C3-1024FC-512FC-Voting \\ \hline
|
| 285 |
+
\end{tabular}}
|
| 286 |
+
|
| 287 |
+
\end{table}
|
| 288 |
+
\subsection{Training acceleration}
|
| 289 |
+
\textbf{Runtime}. Since Matlab is a high-level language widely used in SNN community, we adopt it for the comparison with our Pytorch implementation. For fairness, we made several configuration restrictions, such as software version, parameter setting, etc. More details can be found in Appendix.
|
| 290 |
+
|
| 291 |
+
Fig. \ref{runtime} shows the comparisons about average runtime per epoch, where batch size of 20 is used for simulation. Pytorch is able to provide tens of times acceleration on all three datasets. This improvement may be attributed to the specialized optimizations for the convolution operation in Pytorch. In contrast, currently these optimizations
|
| 292 |
+
have not been well supported in most of existing SNN platforms.
|
| 293 |
+
Hence building spiking model may benefit a lot from DL platform.
|
| 294 |
+
|
| 295 |
+
\begin{figure}[!htpp]
|
| 296 |
+
\centering
|
| 297 |
+
\includegraphics[width=0.48\textwidth]{fig-time.jpg}
|
| 298 |
+
\caption{{Average runtime per epoch}.}
|
| 299 |
+
\label{runtime}
|
| 300 |
+
|
| 301 |
+
\end{figure}
|
| 302 |
+
|
| 303 |
+
\textbf{Network scale}. If without acceleration, it is difficult to extend most existing works to large scale. Fortunately, the fast implementation in Pytorch facilitates the construction of deep SNNs. This makes it possible to investigate the influence of network size on model performance. Although it has been widely studied in ANN field, it has yet to be demonstrated on SNNs. To this end, we compare the accuracy under different network sizes, shown in Fig. \ref{Net_scale}. With the size increases, SNNs show an apparent tendency of accuracy improvement, which is consistent with ANNs.
|
| 304 |
+
|
| 305 |
+
\begin{figure}[!htpp]
|
| 306 |
+
\centering
|
| 307 |
+
\includegraphics[width=0.45\textwidth]{fig-scale.jpg}
|
| 308 |
+
\caption{\textbf{Influence of network scale}. Three different network scales are defined in Tab.\ref{Table-structure1}.}
|
| 309 |
+
\label{Net_scale}
|
| 310 |
+
|
| 311 |
+
\end{figure}
|
| 312 |
+
|
| 313 |
+
\textbf{Simulation length}. SNNs need enough simulation steps to mimic neural dynamics and encode information. Given simulation length $T$, it means that we need to repeat the inference process $T$ times to count the firing rate. So the network computation cost can be denoted as $O(T)$. For deep SNNs, previous work usually requires 100 even 1000 steps to reach good performance \cite{Sengupta2018Going}, which brings huge computational cost. Fortunately, by using the proposed coding scheme in this work, the simulation length can be significantly reduced without much accuracy degradation. As shown in Fig. \ref{T_length}, although the longer the simulation windows leads to better results, our method just requires a small length ($4-8$) to achieve satisfactory results. Notably, even if extremely taking one-step simulation, it can also achieve not bad performance with significantly faster response and lower energy, which promises the application scenarios with extreme restrictions on response time and energy consumption.
|
| 314 |
+
|
| 315 |
+
\begin{figure} [!htbp]
|
| 316 |
+
\centering
|
| 317 |
+
\includegraphics[width=0.48\textwidth]{fig-loss.jpg}
|
| 318 |
+
\caption{ {Influence of simulation length on CIFAR10.} }
|
| 319 |
+
\label{T_length}
|
| 320 |
+
|
| 321 |
+
\end{figure}
|
| 322 |
+
\subsection{Application accuracy}
|
| 323 |
+
\textbf{Neuromorphic datasets}. Tab. \ref{Table-NMNIST} records the current state-of-the-art results on N-MNIST datasets. \cite{Cai2018} proposes a technique to restore the N-MNIST dataset back to the static MNIST, and achieves 99.23\% accuracy using non-spiking CNNs. Our model can naturally handle raw spike streams using direct training and achieves significantly better accuracy. Furthermore, by adding NeuNorm technique, the accuracy can be improved up to 99.53\%.
|
| 324 |
+
|
| 325 |
+
\begin{table}[!htbp]
|
| 326 |
+
\centering
|
| 327 |
+
\caption{Comparison with existing results on N-MNIST.}
|
| 328 |
+
\label{Table-NMNIST}
|
| 329 |
+
\scalebox{0.82}{
|
| 330 |
+
\begin{tabular}{ccc}
|
| 331 |
+
\hline
|
| 332 |
+
Model & Method & Accuracy \\ \hline
|
| 333 |
+
|
| 334 |
+
\cite{Neil2016Phased} & LSTM & 97.38\% \\
|
| 335 |
+
|
| 336 |
+
\cite{Lee2016Training} &Spiking NN & 98.74\% \\
|
| 337 |
+
\cite{Wu2018Spatio} & Spiking NN & 98.78\% \\
|
| 338 |
+
\cite{Jin2018Hybrid} & Spiking NN & 98.93\% \\
|
| 339 |
+
\cite{Neil2016Effective} & Non-spiking CNN & 98.30\% \\
|
| 340 |
+
\cite{Cai2018} & Non-spiking CNN & 99.23\% \\ \hline
|
| 341 |
+
\begin{tabular}[c]{@{}c@{}} \large \textbf{Our model} \end{tabular} & without NeuNorm & \large \textbf{99.44\%} \\
|
| 342 |
+
\begin{tabular}[c]{@{}c@{}}\large \textbf{Our model} \end{tabular} & with NeuNorm & \large \textbf{99.53\%} \\ \hline
|
| 343 |
+
\end{tabular}}
|
| 344 |
+
|
| 345 |
+
\end{table}
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
|
| 349 |
+
\begin{table}[!htbp]
|
| 350 |
+
\centering
|
| 351 |
+
\caption{Comparison with existing results on DVS-CIFAR10.}
|
| 352 |
+
\label{Table-DVSCIFAR10}
|
| 353 |
+
\scalebox{0.9 }{
|
| 354 |
+
\begin{tabular}{ccc}
|
| 355 |
+
\hline
|
| 356 |
+
Model & Method & Accuracy \\ \hline
|
| 357 |
+
\cite{Orchard2015HFirst} & Random Forest & 31.0\% \\
|
| 358 |
+
\cite{Lagorce2017HOTS} & HOTS & 27.1\% \\
|
| 359 |
+
\cite{Sironi2018HATS} & HAT & 52.4\% \\
|
| 360 |
+
\cite{Sironi2018HATS} & Gabor-SNN & 24.5\% \\
|
| 361 |
+
\hline
|
| 362 |
+
\large \textbf{Our model} & without NeuNorm & \large \textbf{58.1\%} \\
|
| 363 |
+
\large \textbf{Our model} & with NeuNorm & \large \textbf{60.5\%} \\ \hline
|
| 364 |
+
\end{tabular}}
|
| 365 |
+
|
| 366 |
+
\end{table}
|
| 367 |
+
|
| 368 |
+
|
| 369 |
+
Tab. \ref{Table-DVSCIFAR10} further compares the accuracy on DVS-CIFAR10 dataset. DVS-CIFAR10 is more challenging than N-MNIST due to the larger scale, and it is also more challenging than non-spiking CIFAR10 due to less samples and noisy environment (Dataset introduction in Appendix). Our model achieves the best performance with 60.5\%. Moreover, experimental results indicate
|
| 370 |
+
that NeuNorm can speed up the convergence.Without
|
| 371 |
+
NeuNorm the required training epochs to get the best accuracy
|
| 372 |
+
58.1\% is 157, while it’s reduced to 103 with NeuNorm.
|
| 373 |
+
|
| 374 |
+
\textbf{Non-spiking dataset}. Tab. \ref{Table-cifar10} summarizes the results of existing state-of-the-art results and our CIFARNet on CIFAR10 dataset. Prior to our work, the best direct training method only achieves 75.42\% accuracy. Our model is significantly better than this result, with 15\% improvement (reaching 90.53\%). We also make a comparison with non-spiking ANN model and other pre-trained works (ANNs-to-SNNs conversion) on the similar structure of AlexNet, wherein our direct training of SNNs with NeuNorm achieves slightly better accuracy.
|
| 375 |
+
|
| 376 |
+
\begin{table} [!htbp]
|
| 377 |
+
\centering
|
| 378 |
+
\caption{Comparison with existing state-of-the-art results on non-spiking CIFAR10.}
|
| 379 |
+
\label{Table-cifar10}
|
| 380 |
+
\scalebox{0.9 }{
|
| 381 |
+
\begin{tabular}{ccc}
|
| 382 |
+
\hline
|
| 383 |
+
Model & Method & Accuracy \\ \hline
|
| 384 |
+
\cite{Panda2016Unsupervised} & Spiking NN & 75.42\% \\
|
| 385 |
+
\cite{Cao2015Spiking} & Pre-trained SNN & 77.43\% \\
|
| 386 |
+
|
| 387 |
+
\cite{Rueckauer2017Conversion} & Pre-trained SNN & 90.8\% \\
|
| 388 |
+
\cite{Sengupta2018Going} & Pre-trained SNN & 87.46\% \\
|
| 389 |
+
\hline
|
| 390 |
+
\large Baseline & Non-spiking NN & \large \textbf{90.49\%} \\
|
| 391 |
+
\large \textbf{Our model} & without NeuNorm & \large \textbf{89.83\%} \\
|
| 392 |
+
\large \textbf{Our model} & with NeuNorm & \large \textbf{90.53\%} \\ \hline
|
| 393 |
+
\end{tabular}}
|
| 394 |
+
|
| 395 |
+
\end{table}
|
| 396 |
+
|
| 397 |
+
\begin{table}[!htbp]
|
| 398 |
+
\centering
|
| 399 |
+
\caption{Comparison with previous results using similar AlexNet struture on non-spiking CIFAR10.}
|
| 400 |
+
\label{Table2-cifar10}
|
| 401 |
+
\scalebox{0.9}{
|
| 402 |
+
\begin{tabular}{ccc}
|
| 403 |
+
\hline
|
| 404 |
+
Model & Method & Accuracy \\ \hline
|
| 405 |
+
\cite{Hunsberger2015Spiking} & Non-spiking NN & 83.72\% \\
|
| 406 |
+
\cite{Hunsberger2015Spiking} & Pre-trained SNN & 83.52\% \\
|
| 407 |
+
\cite{Sengupta2018Going} & Pre-trained SNN & 83.54\% \\ \hline
|
| 408 |
+
\large \textbf{Our model} & --- & \large \textbf{85.24\%} \\ \hline
|
| 409 |
+
\end{tabular}}
|
| 410 |
+
\end{table}
|
| 411 |
+
|
| 412 |
+
\begin{figure} [!ht]
|
| 413 |
+
\centering
|
| 414 |
+
\includegraphics[width=8.0cm]{fig-voting.jpg}
|
| 415 |
+
\caption{\textbf{Confusion matrix of voting output with or without NeuNorm}. High values along the diagonal indicate correct recognition whereas high values anywhere else indicate confusion between two categories.}
|
| 416 |
+
\label{Confusion_matrix}
|
| 417 |
+
|
| 418 |
+
\end{figure}
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
Furthermore, to visualize the differences of learning with or without NeuNorm, Fig. \ref{Confusion_matrix} shows the average confusion matrix of network voting results on CIFAR10 over 500 randomly selected images. Each location in the 10$\times$10 tiles is determined by the voting output and the actual labels. High values along the diagonal indicate correct recognition whereas high values anywhere else indicate confusion between two categories. It shows that using NeuNorm brings a clearer contrast (i.e. higher values along the diagonal), which implies that NeuNorm enhances the differentiation degree among the 10 classes. Combining the results from Tab. \ref{Table-NMNIST}-\ref{Table-cifar10}, it also confirms the effectiveness of proposed NeuNorm for performance improvement.
|
| 422 |
+
\section{Conclusion}
|
| 423 |
+
In this paper, we present a direct training algorithm for {deeper and larger} SNNs with high performance. We propose the NeuNorm to effectively normalize the neuronal activities and improve the performance. Besides that, we optimize the rate coding from encoding aspect and decoding aspect, and convert the original continuous LIF model to an explicitly iterative version for friendly Pytorch implementation. Finally, through tens of times training accelerations and larger network scale, we achieve the best accuracy on neuromorphic datasets and comparable accuracy with ANNs on non-spiking datasets. To our best knowledge, this is the first time report such high performance with direct training on SNNs. The implementation on mainstream ML framework could facilitate the SNN development.
|
| 424 |
+
\section*{Acknowledgments}
|
| 425 |
+
The work was supported by the Project of NSFC (No. 61836004, 61620106010, 61621136008, 61332007, 61327902, 61876215), the National Key Research and Development Program of China (No. 2017YFA0700900), the Brain-Science Special Program of Beijing (Grant Z181100001518006), the Suzhou-Tsinghua innovation leading program 2016SZ0102, and the Project of NSF (No. 1725447, 1730309).
|
| 426 |
+
|
| 427 |
+
|
| 428 |
+
|
| 429 |
+
|
| 430 |
+
\selectfont
|
| 431 |
+
\bibliographystyle{AAAI}
|
| 432 |
+
\bibliography{bib_test}
|
| 433 |
+
|
| 434 |
+
\begin{appendices}
|
| 435 |
+
\section{Supplementary material}
|
| 436 |
+
In this supplementary material, we provide the details of our experiment, including the dataset introduction, training setting, and programing platform comparison.
|
| 437 |
+
\section{A $\quad$ Dataset Introduction}
|
| 438 |
+
\subsection{Neuromorphic dataset}
|
| 439 |
+
\textbf{N-MNIST} converts the frame-based MNIST handwritten digit dataset into its DVS (dynamic vision sensor) version \cite{Orchard2015Converting} with event streams (in Fig.\ref{fig2}). For each sample, DVS scans the static MNIST image along given directions and collects the generated spike train which is triggered by detecting the intensity change of pixels. Since the intensity change has two directions (increase or decrease), DVS can capture two kinds of spike events, denoted as On-event and Off-event. Because of the relative shift of images during moving process, the pixel dimension is expanded to 34$\times$34. Overall, each sample in N-MNIST is a spatio-temporal spike pattern with size of $34 \times 34 \times2 \times T$, where $T$ is the length of temporal window.
|
| 440 |
+
|
| 441 |
+
\textbf{DVS-CIFAR10} converts 10000 static CIFAR10 images into the format of spike trains (in Fig.\ref{fig2}), consisting of 1000 images per class with size of $128\times128$ for each image . Since different DVS types and different movement paths are used \cite{Li2017CIFAR10}, the generated spike train contains imbalanced spike events and larger image resolution. We adopt different parameter configurations, shown in Tab. \ref{Table-parameters}. DVS-CIFAR10 has 6 times less samples than the original CIFAR10 dataset, and we randomly choose 9000 images for training and 1000 for testing.
|
| 442 |
+
|
| 443 |
+
\begin{figure}[!hpt]
|
| 444 |
+
\centering
|
| 445 |
+
\includegraphics[width=7.0cm]{fig-dvs.jpg}
|
| 446 |
+
\caption{\textbf{Illustration of neuromorphic datasets}. The upper $32 \times 32 $ image and the lower $128 \times 128 $ image are sampled from N-MNIST and DVS-CIFAR10, respectively. Each sub-picture shows a 5 ms-width spike train.}
|
| 447 |
+
\label{Spike_dataset}
|
| 448 |
+
|
| 449 |
+
\end{figure}
|
| 450 |
+
\subsection{Non-spiking dataset}
|
| 451 |
+
\textbf{CIFAR10} is widely used in ANN domain, which contains 60000 color images belonging to 10 classes with size of $32\times32$ for each image. We divide it into 50000 training images and 10000 test images as usual.
|
| 452 |
+
|
| 453 |
+
|
| 454 |
+
|
| 455 |
+
\section{B $\quad$ Training setting}
|
| 456 |
+
|
| 457 |
+
\subsubsection{Data pre-processing}
|
| 458 |
+
On N-MNIST, we reduce the time resolution by accumulating the spike train within every 5 ms. On DVS-CIFAR10, we reduce the spatial resolution by down-sampling the original 128 $\times$128 size to 42$\times$42 size (stride = 3, padding = 0), and reduce the temporal resolution by similarly accumulating the spike train within every 5 ms. On CIFAR10, as usual, we first crop and flip the original images along each RGB channel, and then rescale each image by subtracting the global mean value of pixel intensity and dividing by the resulting standard variance along each RGB channel.
|
| 459 |
+
|
| 460 |
+
|
| 461 |
+
\subsubsection{Optimizer}On neuromorphic datasets, we use Adam (adaptive moment estimation) optimizer. On the non-spiking dataset, we use the stochastic gradient descent (SGD) optimizer with initial learning rate $r=0.1$ and momentum 0.9, and we let $r$ decay to $0.1r$ over each 40 epochs.
|
| 462 |
+
\begin{figure} [!htbp]
|
| 463 |
+
\centering
|
| 464 |
+
\includegraphics[width=8.0cm]{fig-structure.jpg}
|
| 465 |
+
\caption{\textbf{Illustration of network structures}. For simplicity, we denote the left as AlexNet and the right as CIFARNet.}
|
| 466 |
+
\label{fig2}
|
| 467 |
+
\end{figure}
|
| 468 |
+
|
| 469 |
+
\begin{table}[!htb]
|
| 470 |
+
\centering
|
| 471 |
+
\caption{Parameter configuration used for model evaluation.}
|
| 472 |
+
\label{Table-parameters}
|
| 473 |
+
\scalebox{1}{
|
| 474 |
+
\begin{tabular}{cccc}
|
| 475 |
+
\hline
|
| 476 |
+
Parameters & CIFAR10 & DVS-CIFAR10 & N-MNIST \\ \hline
|
| 477 |
+
$V_{th}$ & 0.75 & 0.05 & 0.25 \\
|
| 478 |
+
$a$ & 1.0 & 0.1 & 0.25 \\
|
| 479 |
+
|
| 480 |
+
|
| 481 |
+
$k_{\tau 1}$ & 0.25 & 0.35 & 0.3 \\
|
| 482 |
+
$k_{\tau 2}$ & 0.9 & 0.9 & 0.9 \\
|
| 483 |
+
Dropout rate & 0.5 & 0 & 0 \\
|
| 484 |
+
Max epoch & 150 & 200 & 200 \\ \hline
|
| 485 |
+
Adam & \multicolumn{3}{c}{$\lambda, \beta_1,\beta_2$ = 0.9,0.999, 1-$10^{-8}$} \\ \hline
|
| 486 |
+
\end{tabular}}
|
| 487 |
+
\end{table}
|
| 488 |
+
\subsubsection{Parameter configuration}The configuration of simulation parameters for each dataset is shown in Tab. \ref{Table-parameters}. The structures of what we call AlexNet and CIFARNet are illustrated in Fig. \ref{fig2}.
|
| 489 |
+
|
| 490 |
+
|
| 491 |
+
|
| 492 |
+
|
| 493 |
+
|
| 494 |
+
|
| 495 |
+
\section{C $\quad$ Details for Acceleration experiment}
|
| 496 |
+
A total of 10 experiments are counted for average. Considering the slow running time on the Matlab, 10 simulation steps and batch size of 20 per epoch are used. All codes run on server with i7-6700K CPU and GTX1060 GPU. The Pytorch version is 3.5 and the Matlab version is 2018b. Both of them enable GPU execution, but without parallelization.
|
| 497 |
+
|
| 498 |
+
It is worth noting that recently there emerge more supports on Matlab for deep learning, either official \footnote{Since 2017 version, Matlab provides deep learning libraries.} or unofficial (e.g. MatConvNet toolbox\footnote{A MATLAB toolbox designed for implementing CNNs. }). However, their highly encapsulated function modules are unfriendly for users to customize deep SNNs. Therefore, in terms of flexibility, all convolution operations we adopted are based on the officially provided operations (i.e. $conv$ function).
|
| 499 |
+
\end{appendices}
|
1809.05818v2.txt
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Learning-to-rank, which refers to machine learning techniques on automatically constructing a model (ranker) from data for ranking in search, has been widely used in current search systems. Existing algorithms can be categorized into pointwise, pairwise, and listwise approaches according to the loss functions they utilize (DBLP:series/synthesis/2014Li, ; DBLP:journals/ieicet/Li11, ; DBLP:journals/ftir/Liu09, ). Among the proposed algorithms, LambdaMART is a state-of-the-art algorithm (DBLP:journals/ir/WuBSG10, ; from-ranknet-to-lambdarank-to-lambdamart-an-overview, ). The data for training in learning-to-rank is usually labeled by human assessors so far, and the labelling process is often strenuous and costly. This raises the question of whether it is possible to train a ranker by using click data collected from the same search system. Click data is indicative of individual users’ relevance judgments and is relatively easy to collect with low cost. On the other hand, it is also noisy and biased (DBLP:conf/sigir/JoachimsGPHG05, ; DBLP:conf/www/YuePR10, ). Notably, the orders of documents in the search results affect users’ judgments. Users tend to more frequently click documents presented at higher positions, which is called position bias. This has been preventing practical use of click data in learning-to-rank.
|
| 2 |
+
|
| 3 |
+
Recently a new research direction, referred to as unbiased learning-to-rank, is arising and making progress. Unbiased learning-to-rank aims at eliminating bias in click data, particularly position bias, and making use of the debiased data to train a ranker. Wang et al. (DBLP:conf/sigir/WangBMN16, ) and Joachims et al. (DBLP:conf/wsdm/JoachimsSS17, ) respectively propose employing the inverse propensity weighting (IPW) principle (rose:rubi:cent:1983, ) to learn an ‘unbiased ranker’ from click data. It is proved that the objective function in learning using IPW is an unbiased estimate of the risk function defined on a relevance measure (a pointwise loss). The authors also develop methods for estimating position bias by randomization of search results online. Wang et al. (DBLP:conf/wsdm/WangGBMN18, ) further develop a method for estimating position bias from click data offline. More recently Ai et al. (DBLP:conf/sigir/AiBLGC18, ) propose a method that can jointly estimate position bias and train a ranker from click data, again on the basis of IPW. In the previous work, the IPW principle is limited to the pointwise setting in the sense that position biases are only defined on click positions.
|
| 4 |
+
|
| 5 |
+
In this paper, we address the problem of jointly estimating position biases and training a ranker from click data for pairwise learning-to-rank, particularly using a pairwise algorithm, LambdaMART. To do so, we extend the inverse propensity weighting principle to the pairwise setting, and develop a new method for jointly conducting position bias estimation and ranker training.
|
| 6 |
+
|
| 7 |
+
Specifically, we give a formulation of unbiased learning-to-rank for the pairwise setting and extend the IPW principle. We define position biases as the ratio of the click probability to the relevance probability at each position, as well as the ratio of the unclick probability to the irrelevance probability. This definition takes both the position biases at click positions and those at unclick positions into consideration. We prove that under the extended IPW principle, the objective function becomes an unbiased estimate of risk function defined on pairwise loss functions. In this way, we can learn an unbiased ranker using a pairwise ranking algorithm.
|
| 8 |
+
|
| 9 |
+
We then develop a method for jointly estimating position biases for both click and unclick positions and training a ranker for pairwise learning-to-rank, called Pairwise Debiasing. The position bias and the ranker can be iteratively learned through minimization of the same objective function. As an instance, we further develop Unbiased LambdaMART111Code is available at https://github.com/acbull/Unbiased_LambdaMart, an algorithm of learning an unbiased ranker using LambdaMART.
|
| 10 |
+
|
| 11 |
+
Experiments on the Yahoo learning-to-rank challenge benchmark dataset demonstrate that Unbiased LambdaMART can effectively conduct debiasing of click data and significantly outperform the baseline algorithms in terms of all measures, for example, 3-4% improvements in terms of NDCG@1. An online A/B Testing at a commercial news search engine, Jinri Toutiao, also demonstrates that Unbiased LambdaMART can enhance the performance of relevance ranking at the search engine.
|
| 12 |
+
|
| 13 |
+
The contribution of this paper includes the following proposals.•A general framework on unbiased learning-to-rank in the pairwise setting, particularly, an extended IPW.•Pairwise Debiasing, a method for jointly estimating position bias and training a pairwise ranker.•Unbiased LambdaMART, an algorithm of unbiased pairwise learning-to-rank using LambdaMART.
|
| 14 |
+
|
| 15 |
+
In this section, we introduce related work on learning-to-rank, click model, and unbiased learning to rank.
|
| 16 |
+
|
| 17 |
+
Learning-to-rank is to automatically construct a ranking model from data, referred to as a ranker, for ranking in search. A ranker is usually defined as a function of feature vector based on a query document pair. In search, given a query, the retrieved documents are ranked based on the scores of the documents given by the ranker. The advantage of employing learning-to-rank is that one can build a ranker without the need of manually creating it, which is usually tedious and hard. Learning-to-rank is now becoming a standard technique for search.
|
| 18 |
+
|
| 19 |
+
There are many algorithms proposed for learning-to-rank. The algorithms can be categorized as pointwise approach, pairwise approach, and listwise approach, based on the loss functions in learning (DBLP:series/synthesis/2014Li, ; DBLP:journals/ieicet/Li11, ; DBLP:journals/ftir/Liu09, ). The pairwise and listwise algorithms usually work better than the pointwise algorithms (DBLP:series/synthesis/2014Li, ), because the key issue of ranking in search is to determine the orders of documents but not to judge the relevance of documents, which is exactly the goal of the pairwise and listwise algorithms. For example, the pairwise algorithms of RankSVM (DBLP:conf/kdd/Joachims02, ; Cao:2006:ARS:1148170.1148205, ) and LambdaMART (DBLP:journals/ir/WuBSG10, ; from-ranknet-to-lambdarank-to-lambdamart-an-overview, ) are state-of-the-art algorithms for learning-to-rank.
|
| 20 |
+
|
| 21 |
+
Traditionally, data for learning a ranker is manually labeled by humans, which can be costly. To deal with the problem, one may consider using click data as labeled data to train a ranker. Click data records the documents clicked by the users after they submit queries, and it naturally represents users’ implicit relevance judgments on the search results. The utilization of click data has both pros and cons. On one hand, it is easy to collect a large amount of click data with low cost. On the other hand, click data is very noisy and has position bias, presentation bias, etc. Position bias means that users tend to more frequently click documents ranked at higher positions (DBLP:conf/sigir/JoachimsGPHG05, ; DBLP:conf/www/YuePR10, ). How to effectively cope with position bias and leverage click data for learning-to-rank thus becomes an important research issue.
|
| 22 |
+
|
| 23 |
+
One direction of research on click data aims to design a click model to simulate users’ click behavior, and then estimate the parameters of the click model from data. It then makes use of the learned click model for different tasks, for example, use them as features of a ranker.
|
| 24 |
+
|
| 25 |
+
Several probabilistic models have been developed. For example, Richardson et al. (DBLP:conf/www/RichardsonDR07, ) propose the Position Based Model (PBM), which assumes that a click only depends on the position and relevance of the document. Craswell et al. (DBLP:conf/wsdm/CraswellZTR08, ) develop the Cascade Model (CM), which formalizes the user’s behavior in browsing of search results as a sequence of actions. Dupret et al. (DBLP:conf/sigir/DupretP08, ) propose the User Browsing Model (UBM), asserting that a click depends not only on the position of a document, but also on the positions of the previously clicked documents. Chapelle et al. (DBLP:conf/www/ChapelleZ09, ) develop the Dynamic Bayesian Network Model (DBN), based on the assumption that the user’s behavior after a click does not depend on the perceived relevance of the document but on the actual relevance of the document. Borisov et al. (DBLP:conf/www/BorisovMRS16, ) develop the Neural Click Model, which utilizes neural networks and vector representations to predict user’s click behavior.Recently, Kveton et al. (DBLP:conf/icml/KvetonSWA15, ) propose a multi-armed bandit learning algorithm of the Cascade Model to identify the k𝑘k most attractive items in the ranking list. Li et al. (DBLP:conf/kdd/LiAKMVW18, ) makes use of click models to evaluate the performance of ranking model offline.
|
| 26 |
+
|
| 27 |
+
Click models can be employed to estimate position bias and other biases, as well as query document relevance. They are not designed only for the purpose of debiasing and thus could be sub-optimal for the task. In our experiments, we use the click models to generate synthetic click datasets for evaluating our proposed unbiased learning-to-rank algorithm offline.
|
| 28 |
+
|
| 29 |
+
Recently, a new direction in learning-to-rank, referred to as unbiased learning-to-rank, is arising and making progress.The goal of unbiased learning-to-rank is to develop new techniques to conduct debiasing of click data and leverage the debiased click data in training of a ranker(DBLP:conf/cikm/AiMLC18, ).
|
| 30 |
+
|
| 31 |
+
Wang et al. (DBLP:conf/sigir/WangBMN16, ) apply unbiased learning-to-rank to personal search. They conduct randomization of search results to estimate query-level position bias and adjust click data for training of a ranker in personal search on the basis of inverse propensity weighting (IPW) (rose:rubi:cent:1983, ). Joachims et al. (DBLP:conf/wsdm/JoachimsSS17, ) theoretically prove that with the inverse propensity weighting (IPW) principle, one can obtain an unbiased estimate of a risk function on relevance in learning-to-rank. They also utilize online randomization to estimate position bias and perform training of a RankSVM model. Wang et al. (DBLP:conf/wsdm/WangGBMN18, ) employ a regression-based EM algorithm to infer position bias by maximizing the likelihood of click data. The estimated position bias is then utilized in learning of LambdaMART. Recently, Ai et al. (DBLP:conf/sigir/AiBLGC18, ) design a dual learning algorithm which can jointly learn an unbiased propensity model for representing position bias and an unbiased ranker for relevance ranking, by optimizing two objective functions. Both models are implemented as neural networks. Their method is also based on IPW, while the loss function is a pointwise loss function.
|
| 32 |
+
|
| 33 |
+
Our work mainly differs from the previous work in the following points:•In previous work, position bias (propensity) is defined as the observation probability, and thus IPW is limited to the pointwise setting in which the loss function is pointwise and debiasing is performed at a click position each time. In this work, we give a more general definition of position bias (propensity), and extend IPW to the pairwise setting, in which the loss function is pairwise and debiasing is carried out at both click positions and unclick positions.•In previous work, estimation of position bias either relies on randomization of search results online, which can hurt user experiences (DBLP:conf/sigir/WangBMN16, ; DBLP:conf/wsdm/JoachimsSS17, ), or resorts to separate learning of a propensity model from click data offline, which can be suboptimal to relevance ranking (DBLP:conf/wsdm/WangGBMN18, ; DBLP:conf/sigir/AiBLGC18, ). In this paper, we propose to jointly conduct estimation of position bias and learning of a ranker through minimizing one objective function. We further apply this framework to the state-of-the-art LambdaMART algorithm.
|
| 34 |
+
|
| 35 |
+
In this section, we give a general formulation of unbiased learning-to-rank, for both the pointwise and pairwise settings. We also extend the inverse propensity weighting principle to the pairwise setting.
|
| 36 |
+
|
| 37 |
+
In learning-to-rank, given a query document pair denoted as x𝑥x, the ranker f𝑓f assigns a score to the document. The documents with respect to the query are then ranked in descending order of their scores. Traditionally, the ranker is learned with labeled data. In the pointwise setting, the loss function in learning is defined on a single data point x𝑥x.
|
| 38 |
+
|
| 39 |
+
Let q𝑞q denote the query and Dqsubscript𝐷𝑞D_{q} the set of documents associated with q𝑞q. Let disubscript𝑑𝑖d_{i} denote the i𝑖i-th document in Dqsubscript𝐷𝑞D_{q} and xisubscript𝑥𝑖x_{i} the feature vector of q𝑞q and disubscript𝑑𝑖d_{i} (see Table 1). Let ri+subscriptsuperscript𝑟𝑖r^{+}_{i} and ri−subscriptsuperscript𝑟𝑖r^{-}_{i} represent that disubscript𝑑𝑖d_{i} is relevant and irrelevant respectively (i.e., ri=1subscript𝑟𝑖1r_{i}=1 and ri=0subscript𝑟𝑖0r_{i}=0). For simplicity we only consider binary relevance here and one can easily extend it to the multi-level relevance case. The risk function in learning is defined as(1)Rrel(f)=subscript𝑅𝑟𝑒𝑙𝑓absent\displaystyle R_{{}_{rel}}(f)=∫L(f(xi),ri+)𝑑P(xi,ri+)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑟𝑖\displaystyle\int L(f(x_{i}),r^{+}_{i})\ dP(x_{i},r^{+}_{i})where f𝑓f denotes a ranker, L(f(xi),ri+)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖L(f(x_{i}),r^{+}_{i}) denotes a pointwise loss function based on an IR measure (DBLP:conf/wsdm/JoachimsSS17, ) and P(xi,ri+)𝑃subscript𝑥𝑖subscriptsuperscript𝑟𝑖P(x_{i},r^{+}_{i}) denotes the probability distribution on xisubscript𝑥𝑖x_{i} and ri+subscriptsuperscript𝑟𝑖r^{+}_{i}. Most ranking measures in IR only utilize relevant documents in their definitions, and thus the loss function here is defined on relevant documents with label ri+subscriptsuperscript𝑟𝑖r^{+}_{i}. Furthermore, the position information of documents is omitted from the loss function for notation simplicity.
|
| 40 |
+
|
| 41 |
+
Suppose that there is a labeled dataset in which the relevance of documents with respect to queries is given. One can learn a ranker f^relsubscript^𝑓𝑟𝑒𝑙\hat{f}_{{}_{rel}} throughthe minimization of the empirical risk function (objective function) as follows.(2)f^rel=subscript^𝑓𝑟𝑒𝑙absent\displaystyle\hat{f}_{{}_{rel}}=argminf∑q∑di∈DqL(f(xi),ri+)subscript𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝐷𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖\displaystyle\mathop{\arg\min_{f}}\sum_{\begin{subarray}{c}q\end{subarray}}\sum_{\begin{subarray}{c}d_{i}\in D_{q}\end{subarray}}\ L(f(x_{i}),r^{+}_{i})
|
| 42 |
+
|
| 43 |
+
One can also consider using click data as relevance feedbacks from users, more specifically, viewing clicked documents as relevant documents and unclicked documents as irrelevant documents, and training a ranker with a click dataset. This is what we call ���biased learning-to-rank’, because click data has position bias, presentation bias, etc. Suppose that there is a click dataset in which the clicks of documents with respect to queries by an original ranker are recorded. For convenience, let us assume that document disubscript𝑑𝑖d_{i} in Dqsubscript𝐷𝑞D_{q} is exactly the document ranked at position i𝑖i by the original ranker. Let ci+subscriptsuperscript𝑐𝑖c^{+}_{i} and ci−subscriptsuperscript𝑐𝑖c^{-}_{i} represent that document disubscript𝑑𝑖d_{i} is clicked and unclicked in the click dataset respectively (i.e., ci=1subscript𝑐𝑖1c_{i}=1 and ci=0subscript𝑐𝑖0c_{i}=0). The risk function and minimization of empirical risk function can be defined as follows.(3)Rclick(f)=subscript𝑅𝑐𝑙𝑖𝑐𝑘𝑓absent\displaystyle R_{{}_{click}}(f)=∫L(f(xi),ci+)𝑑P(xi,ci+)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑐𝑖\displaystyle\int L(f(x_{i}),c^{+}_{i})\ dP(x_{i},c^{+}_{i})(4)f^click=subscript^𝑓𝑐𝑙𝑖𝑐𝑘absent\displaystyle\hat{f}_{{}_{click}}=argminf∑q∑di∈DqL(f(xi),ci+)subscript𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝐷𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖\displaystyle\mathop{\arg\min_{f}}\sum_{\begin{subarray}{c}q\end{subarray}}\sum_{\begin{subarray}{c}d_{i}\in D_{q}\end{subarray}}\ L(f(x_{i}),c^{+}_{i})The loss function is defined on clicked documents with label ci+subscriptsuperscript𝑐𝑖c^{+}_{i}. The ranker f^clicksubscript^𝑓𝑐𝑙𝑖𝑐𝑘\hat{f}_{{}_{click}} learned in this way is biased, however.
|
| 44 |
+
|
| 45 |
+
Unbiased learning-to-rank aims to eliminate the biases, for example position bias, in the click data and train a ranker with the debiased data. The training of ranker and debiasing of click data can be performed simultaneously or separately. The key question is how to fill the gap between click and relevance, that is, P(ci+|xi)𝑃conditionalsubscriptsuperscript𝑐𝑖subscript𝑥𝑖P(c^{+}_{i}|x_{i}) and P(ri+|xi)𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖P(r^{+}_{i}|x_{i}). Here we assume that the click probability is proportional to the relevance probability at each position, where the ratio ti+>0subscriptsuperscript𝑡𝑖0t^{+}_{i}>0 is referred to as bias at a click position i𝑖i.(5)P(ci+|xi)𝑃conditionalsubscriptsuperscript𝑐𝑖subscript𝑥𝑖\displaystyle P(c^{+}_{i}|x_{i})=ti+P(ri+|xi)absentsubscriptsuperscript𝑡𝑖𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖\displaystyle=t^{+}_{i}P(r^{+}_{i}|x_{i})There are k𝑘k ratios corresponding to k𝑘k positions. The ratios can be affected by different types of bias, but in this paper, we only consider position bias.
|
| 46 |
+
|
| 47 |
+
We can conduct learning of an unbiased ranker f^unbiasedsubscript^𝑓𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑\hat{f}_{{}_{unbiased}}, through minimization of the empirical risk function as follows.(6)Runbiased(f)subscript𝑅𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑𝑓\displaystyle R_{{}_{unbiased}}(f)=∫L(f(xi),ci+)ti+𝑑P(xi,ci+)absent𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖subscriptsuperscript𝑡𝑖differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑐𝑖\displaystyle=\int\frac{L(f(x_{i}),c^{+}_{i})}{t^{+}_{i}}\ dP(x_{i},c^{+}_{i})(7)=∫L(f(xi),ci+)P(ci+|xi)P(ri+|xi)𝑑P(xi,ci+)absent𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑃conditionalsubscriptsuperscript𝑐𝑖subscript𝑥𝑖𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑐𝑖\displaystyle=\int\frac{L(f(x_{i}),c^{+}_{i})}{\frac{P(c^{+}_{i}|x_{i})}{P(r^{+}_{i}|x_{i})}}\ dP(x_{i},c^{+}_{i})(8)=∫L(f(xi),ci+)𝑑P(xi,ri+)absent𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑟𝑖\displaystyle=\int L(f(x_{i}),c^{+}_{i})\ dP(x_{i},r^{+}_{i})(9)=∫L(f(xi),ri+)𝑑P(xi,ri+)=Rrel(f)absent𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑟𝑖subscript𝑅𝑟𝑒𝑙𝑓\displaystyle=\int L(f(x_{i}),r^{+}_{i})\ dP(x_{i},r^{+}_{i})=R_{{}_{rel}}(f)(10)f^unbiasedsubscript^𝑓𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑\displaystyle\hat{f}_{{}_{unbiased}}=argminf∑q∑di∈DqL(f(xi),ci+)ti+absentsubscript𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝐷𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖subscriptsuperscript𝑡𝑖\displaystyle=\mathop{\arg\min_{f}}\sum_{\begin{subarray}{c}q\end{subarray}}\sum_{\begin{subarray}{c}d_{i}\in D_{q}\end{subarray}}\ \frac{L(f(x_{i}),c^{+}_{i})}{t^{+}_{i}}In (9) click label ci+subscriptsuperscript𝑐𝑖c^{+}_{i} in the loss function is replaced with relevance label ri+subscriptsuperscript𝑟𝑖r^{+}_{i}, because after debiasing click implies relevance.
|
| 48 |
+
|
| 49 |
+
One justification of this method is that Runbiasedsubscript𝑅𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑R_{unbiased} is in fact an unbiased estimate of Rrelsubscript𝑅𝑟𝑒𝑙R_{rel}. This is the so-called inverse propensity weighting (IPW) principle proposed in previous work. That is to say, if we can properly estimate position bias (ratio) ti+subscriptsuperscript𝑡𝑖t^{+}_{i}, then we can reliably train an unbiased ranker f^unbiasedsubscript^𝑓𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑\hat{f}_{{}_{unbiased}}.
|
| 50 |
+
|
| 51 |
+
An intuitive explanation of position bias (ratio) ti+subscriptsuperscript𝑡𝑖t^{+}_{i} can be found in the following relation, under the assumption that a clicked document must be relevant (c+⇒r+⇒superscript𝑐superscript𝑟c^{+}\Rightarrow r^{+}).(11)ti+=P(ci+|xi)P(ri+|xi)=P(ci+,ri+|xi)P(ri+|xi)=P(ci+|ri+,xi)subscriptsuperscript𝑡𝑖𝑃conditionalsubscriptsuperscript𝑐𝑖subscript𝑥𝑖𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖𝑃subscriptsuperscript𝑐𝑖conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖𝑃conditionalsubscriptsuperscript𝑐𝑖subscriptsuperscript𝑟𝑖subscript𝑥𝑖\displaystyle t^{+}_{i}=\frac{P(c^{+}_{i}|x_{i})}{P(r^{+}_{i}|x_{i})}=\frac{P(c^{+}_{i},r^{+}_{i}|x_{i})}{P(r^{+}_{i}|x_{i})}=P(c^{+}_{i}|r^{+}_{i},x_{i})It means that ti+subscriptsuperscript𝑡𝑖t^{+}_{i} represents the conditional probability of how likely a relevant document is clicked at position i𝑖i after examination of the document. In the original IPW, ti+subscriptsuperscript𝑡𝑖t^{+}_{i} is defined as the observation probability that the user examines the document at position i𝑖i before clicking the document (DBLP:conf/wsdm/JoachimsSS17, ; DBLP:conf/wsdm/WangGBMN18, ), which is based on the same assumption as (11).
|
| 52 |
+
|
| 53 |
+
In the pairwise setting, the ranker f𝑓f is still defined on a query document pair x𝑥x, and the loss function is defined on two data points xisubscript𝑥𝑖x_{i} and xjsubscript𝑥𝑗x_{j}. Traditionally, the ranker is learned with labeled data.
|
| 54 |
+
|
| 55 |
+
Let q𝑞q denote a query. Let disubscript𝑑𝑖d_{i} and djsubscript𝑑𝑗d_{j} denote the i𝑖i-th and j𝑗j-th documents with respect to query q𝑞q. Let xisubscript𝑥𝑖x_{i} and xjsubscript𝑥𝑗x_{j} denote the feature vectors from disubscript𝑑𝑖d_{i} and djsubscript𝑑𝑗d_{j} as well as q𝑞q. Let ri+subscriptsuperscript𝑟𝑖r^{+}_{i} and rj−subscriptsuperscript𝑟𝑗r^{-}_{j} represent that document disubscript𝑑𝑖d_{i} and document djsubscript𝑑𝑗d_{j} are relevant and irrelevant respectively. Let Iqsubscript𝐼𝑞I_{q} denote the set of document pairs (di,dj)subscript𝑑𝑖subscript𝑑𝑗(d_{i},d_{j}) where disubscript𝑑𝑖d_{i} is relevant and djsubscript𝑑𝑗d_{j} is irrelevant. For simplicity we only consider binary relevance here and one can easily extend it to the multi-level relevance case. The risk function and the minimization of empirical risk function are defined as(12)Rrel(f)=subscript𝑅𝑟𝑒𝑙𝑓absent\displaystyle R_{{}_{rel}}(f)=∫L(f(xi),ri+,f(xj),rj−)𝑑P(xi,ri+,xj,rj−)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑟𝑗differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑟𝑖subscript𝑥𝑗subscriptsuperscript𝑟𝑗\displaystyle\int L(f(x_{i}),r^{+}_{i},f(x_{j}),r^{-}_{j})\ dP(x_{i},r^{+}_{i},x_{j},r^{-}_{j})(13)f^rel=subscript^𝑓𝑟𝑒𝑙absent\displaystyle\hat{f}_{{}_{rel}}=argminf∑q∑(di,dj)∈IqL(f(xi),ri+,f(xj),rj−)subscript𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑟𝑗\displaystyle\mathop{\arg\min_{f}}\sum_{\begin{subarray}{c}q\end{subarray}}\sum_{\begin{subarray}{c}(d_{i},d_{j})\in I_{q}\end{subarray}}\ L(f(x_{i}),r^{+}_{i},f(x_{j}),r^{-}_{j})where L(f(xi),ri+,f(xj),rj−)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑟𝑗L(f(x_{i}),r^{+}_{i},f(x_{j}),r^{-}_{j}) denotes a pairwise loss function.
|
| 56 |
+
|
| 57 |
+
One can consider using click data to directly train a ranker, that is, to conduct ‘biased learning-to-rank’. Let ci+subscriptsuperscript𝑐𝑖c^{+}_{i} and cj−subscriptsuperscript𝑐𝑗c^{-}_{j} represent that document disubscript𝑑𝑖d_{i} and document djsubscript𝑑𝑗d_{j} are clicked and unclicked respectively. Let Iqsubscript𝐼𝑞I_{q} denote the set of document pairs (di,dj)subscript𝑑𝑖subscript𝑑𝑗(d_{i},d_{j}) where disubscript𝑑𝑖d_{i} is clicked and djsubscript𝑑𝑗d_{j} is unclicked. The risk function and minimization of empirical risk function can be defined as follows.(14)Rclick(f)=subscript𝑅𝑐𝑙𝑖𝑐𝑘𝑓absent\displaystyle R_{{}_{click}}(f)=∫L(f(xi),ci+,f(xj),cj−)𝑑P(xi,ci+,xj,cj−)𝐿𝑓subscript����𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑐𝑖subscript𝑥𝑗subscriptsuperscript𝑐𝑗\displaystyle\int L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})\ dP(x_{i},c^{+}_{i},x_{j},c^{-}_{j})(15)f^click=subscript^𝑓𝑐𝑙𝑖𝑐𝑘absent\displaystyle\hat{f}_{{}_{click}}=argminf∑q∑(di,dj)∈IqL(f(xi),ci+,f(xj),cj−)subscript𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗\displaystyle\mathop{\arg\min_{f}}\sum_{\begin{subarray}{c}q\end{subarray}}\sum_{\begin{subarray}{c}(d_{i},d_{j})\in I_{q}\end{subarray}}\ L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})The ranker f^clicksubscript^𝑓𝑐𝑙𝑖𝑐𝑘\hat{f}_{{}_{click}} is however biased.
|
| 58 |
+
|
| 59 |
+
Similar to the pointwise setting, we consider dealing with position bias in the pairwise setting and assume that the click probability is proportional to the relevance probability at each position and the unclick probability is proportional to the irrelevance probability at each position. The ratios ti+>0subscriptsuperscript𝑡𝑖0t^{+}_{i}>0 and tj−>0subscriptsuperscript𝑡𝑗0t^{-}_{j}>0 are referred to as position biases at a click position i𝑖i and an unclick position j𝑗j.(16)P(ci+|xi)𝑃conditionalsubscriptsuperscript𝑐𝑖subscript𝑥𝑖\displaystyle P(c^{+}_{i}|x_{i})=ti+P(ri+|xi)absentsubscriptsuperscript𝑡𝑖𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖\displaystyle=t^{+}_{i}P(r^{+}_{i}|x_{i})(17)P(cj−|xj)𝑃conditionalsubscriptsuperscript𝑐𝑗subscript𝑥𝑗\displaystyle P(c^{-}_{j}|x_{j})=tj−P(ri−|xj)absentsubscriptsuperscript𝑡𝑗𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑗\displaystyle=t^{-}_{j}P(r^{-}_{i}|x_{j})There are 2k2𝑘2k position biases (ratios) corresponding to k𝑘k positions.
|
| 60 |
+
|
| 61 |
+
We can conduct learning of an unbiased ranker f^unbiasedsubscript^𝑓𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑\hat{f}_{{}_{unbiased}}, through minimization of the empirical risk function as follows.(18)Runbiased(f)=subscript𝑅𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑𝑓absent\displaystyle R_{{}_{unbiased}}(f)=∫L(f(xi),ci+,f(xj),cj−)ti+⋅tj−𝑑P(xi,ci+,xj,cj−)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗⋅subscriptsuperscript𝑡𝑖subscriptsuperscript𝑡𝑗differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑐𝑖subscript𝑥𝑗subscriptsuperscript𝑐𝑗\displaystyle\int\frac{L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})}{t^{+}_{i}\cdot t^{-}_{j}}\ dP(x_{i},c^{+}_{i},x_{j},c^{-}_{j})(19)=\displaystyle=∫∫L(f(xi),ci+,f(xj),cj−)dP(ci+,xi)dP(cj−,xj)P(ci+|xi)P(cj−|xj)P(ri+|xi)P(ri−|xj)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗𝑑𝑃subscriptsuperscript𝑐𝑖subscript𝑥𝑖𝑑𝑃subscriptsuperscript𝑐𝑗subscript𝑥𝑗𝑃conditionalsubscriptsuperscript𝑐𝑖subscript𝑥𝑖𝑃conditionalsubscriptsuperscript𝑐𝑗subscript𝑥𝑗𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑖𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑗\displaystyle\int\int\frac{L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})dP(c^{+}_{i},x_{i})dP(c^{-}_{j},x_{j})}{\frac{P(c^{+}_{i}|x_{i})P(c^{-}_{j}|x_{j})}{P(r^{+}_{i}|x_{i})P(r^{-}_{i}|x_{j})}}(20)=\displaystyle=∫∫L(f(xi),ci+,f(xj),cj−)𝑑P(ri+,xi)𝑑P(ri−,xj)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗differential-d𝑃subscriptsuperscript𝑟𝑖subscript𝑥𝑖differential-d𝑃subscriptsuperscript𝑟𝑖subscript𝑥𝑗\displaystyle\int\int L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})dP(r^{+}_{i},x_{i})dP(r^{-}_{i},x_{j})(21)=\displaystyle=∫L(f(xi),ri+,f(xj),rj−)𝑑P(xi,ri+,xj,rj−)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑟𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑟𝑗differential-d𝑃subscript𝑥𝑖subscriptsuperscript𝑟𝑖subscript𝑥𝑗subscriptsuperscript𝑟𝑗\displaystyle\int L(f(x_{i}),r^{+}_{i},f(x_{j}),r^{-}_{j})dP(x_{i},r^{+}_{i},x_{j},r^{-}_{j})(22)=\displaystyle=Rrel(f)subscript𝑅𝑟𝑒𝑙𝑓\displaystyle R_{{}_{rel}}(f)(23)f^unbiased=subscript^𝑓𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑absent\displaystyle\hat{f}_{{}_{unbiased}}=argminf∑q∑(di,dj)∈IqL(f(xi),ci+,f(xj),cj−)ti+⋅tj−subscript𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗⋅subscriptsuperscript𝑡𝑖subscriptsuperscript𝑡𝑗\displaystyle\mathop{\arg\min_{f}}\sum_{\begin{subarray}{c}q\end{subarray}}\sum_{\begin{subarray}{c}(d_{i},d_{j})\in I_{q}\end{subarray}}\ \frac{L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})}{t^{+}_{i}\cdot t^{-}_{j}}In (18) it is assumed that relevance and click at position i𝑖i are independent from those at position j𝑗j. (Experimental results show that the proposed Unbiased LambdaMART works very well under this assumption, even one may think that it is strong.) In (21), click labels ci+subscriptsuperscript𝑐𝑖c^{+}_{i} and cj−subscriptsuperscript𝑐𝑗c^{-}_{j} are replaced with relevance labels ri+subscriptsuperscript𝑟𝑖r^{+}_{i} and rj−subscriptsuperscript𝑟𝑗r^{-}_{j} because after debiasing click implies relevance and unclick implies irrelevance.
|
| 62 |
+
|
| 63 |
+
One justification of this method is that Runbiasedsubscript𝑅𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑R_{unbiased} is an unbiased estimate of Rrelsubscript𝑅𝑟𝑒𝑙R_{rel}. Therefore, if we can accurately estimate the position biases (ratios), then we can reliably train an unbiased ranker f^unbiasedsubscript^𝑓𝑢𝑛𝑏𝑖𝑎𝑠𝑒𝑑\hat{f}_{{}_{unbiased}}. This is an extension of the inverse propensity weighting (IPW) principle to the pairwise setting.
|
| 64 |
+
|
| 65 |
+
Position bias (ratio) ti+subscriptsuperscript𝑡𝑖t^{+}_{i} has the same explanation as that in the pointwise setting. An explanation of position bias (ratio) tj−subscriptsuperscript𝑡𝑗t^{-}_{j} is that it represents the reciprocal of the conditional probability of how likely an unclicked document is irrelevant at position j𝑗j, as shown below.(24)tj−=P(cj−|xj)P(ri−|xj)=P(cj−|xj)P(rj−,cj−|xj)=1P(rj−|cj−,xj)subscriptsuperscript𝑡𝑗𝑃conditionalsubscriptsuperscript𝑐𝑗subscript𝑥𝑗𝑃conditionalsubscriptsuperscript𝑟𝑖subscript𝑥𝑗𝑃conditionalsubscriptsuperscript𝑐𝑗subscript𝑥𝑗𝑃subscriptsuperscript𝑟𝑗conditionalsubscriptsuperscript𝑐𝑗subscript𝑥𝑗1𝑃conditionalsubscriptsuperscript𝑟𝑗subscriptsuperscript𝑐𝑗subscript𝑥𝑗\displaystyle t^{-}_{j}=\frac{P(c^{-}_{j}|x_{j})}{P(r^{-}_{i}|x_{j})}=\frac{P(c^{-}_{j}|x_{j})}{P(r^{-}_{j},c^{-}_{j}|x_{j})}=\frac{1}{P(r^{-}_{j}|c^{-}_{j},x_{j})}It is under the assumption that an irrelevant document must be unclicked (r−⇒c−⇒superscript𝑟superscript𝑐r^{-}\Rightarrow c^{-}), which is equivalent to (c+⇒r+⇒superscript𝑐superscript𝑟c^{+}\Rightarrow r^{+}). Note that tj−subscriptsuperscript𝑡𝑗t^{-}_{j} is not a probability and it has a different interpretation from ti+subscriptsuperscript𝑡𝑖t^{+}_{i}. The unclicked document j𝑗j can be either examined or unexamined. Thus, in the extended IPW the condition on examination of document in the original IPW is dropped.
|
| 66 |
+
|
| 67 |
+
In this section, we present Pairwise Debiasing as a method of jointly estimating position bias and training a ranker for unbiased pairwise learning-to-rank. Furthermore, we apply Pairwise Debiasing on LambdaMart and describe the learning algorithm of Unbiased LambdaMART.
|
| 68 |
+
|
| 69 |
+
We first give a general strategy for pairwise unbiased learning-to-rank, named Pairwise Debiasing.
|
| 70 |
+
|
| 71 |
+
A key issue of unbiased learning-to-rank is to accurately estimate position bias. Previous work either relies on randomization of search results online, which can hurt user experiences (DBLP:conf/sigir/WangBMN16, ; DBLP:conf/wsdm/JoachimsSS17, ), or resorts to a separate learning of position bias from click data offline, which can be suboptimal to the ranker (DBLP:conf/wsdm/WangGBMN18, ; DBLP:conf/sigir/AiBLGC18, ). In this paper, we propose to simultaneously conduct estimation of position bias and learning of a ranker offline through minimizing the following regularized loss function (objective function).
|
| 72 |
+
|
| 73 |
+
(25)minf,t+,t−subscript𝑓superscript𝑡superscript𝑡\displaystyle\min_{f,t^{+},t^{-}}ℒ(f,t+,t−)ℒ𝑓superscript𝑡superscript𝑡\displaystyle\ \mathcal{L}(f,t^{+},t^{-})(26)=minf,t+,t−absentsubscript𝑓superscript𝑡superscript𝑡\displaystyle=\min_{f,t^{+},t^{-}}∑q∑(di,dj)∈IqL(f(xi),ci+,f(xj),cj−)ti+⋅tj−+‖t+‖pp+‖t−‖ppsubscript𝑞subscriptsubscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗⋅subscriptsuperscript𝑡𝑖subscriptsuperscript𝑡𝑗subscriptsuperscriptnormsuperscript𝑡𝑝𝑝subscriptsuperscriptnormsuperscript𝑡𝑝𝑝\displaystyle\ \sum_{q}\sum_{\begin{subarray}{c}(d_{i},d_{j})\in I_{q}\end{subarray}}\ \frac{L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})}{t^{+}_{i}\cdot t^{-}_{j}}+||t^{+}||^{p}_{p}+||t^{-}||^{p}_{p}(27)s.t.t1+=1,t1−=1formulae-sequence𝑠𝑡formulae-sequencesubscriptsuperscript𝑡11subscriptsuperscript𝑡11\displaystyle s.t.\ t^{+}_{1}=1,\ t^{-}_{1}=1where f𝑓f denotes a ranker, t+superscript𝑡t^{+} and t−superscript𝑡t^{-} denote position biases (ratios) at all positions, L𝐿L denotes a pairwise loss function, ||⋅||pp||\cdot||^{p}_{p} denotes Lpsubscript𝐿𝑝L_{p} regularization. Because the position biases are relative values with respect to positions, to simplify the optimization process we fix the position biases of the first position to 111 and only learn the (relative) position biases of the rest of the positions. Here p∈[0,+∞)𝑝0p\in[0,+\infty) is a hyper-parameter. The higher the value of p𝑝p is, the more regularization we impose on the position biases.
|
| 74 |
+
|
| 75 |
+
In the objective function, the position biases t+superscript𝑡t^{+} and t−superscript𝑡t^{-} are inversely proportional to the pairwise loss function L(f(xi),ci+,f(xj),cj−)𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j}), and thus the estimated position biases will be high if the losses on those pairs of positions are high in the minimization. The position biases are regularized and constrained to avoid a trivial solution of infinity.
|
| 76 |
+
|
| 77 |
+
It would be difficult to directly optimize the objective function in (26). We adopt a greedy approach to perform the task. Specifically, for the three optimization variables f𝑓f, t+superscript𝑡t^{+}, t−superscript𝑡t^{-}, we iteratively optimize the objective function ℒℒ\mathcal{L} with respect to one of them with the others fixed; we repeat the process until convergence.
|
| 78 |
+
|
| 79 |
+
Given a fixed ranker, we can estimate the position biases at all positions. There are in fact closed form solutions for the estimation.
|
| 80 |
+
|
| 81 |
+
The partial derivative of objective function ℒℒ\mathcal{L} with respect to position bias t+superscript𝑡t^{+} is(28)∂ℒ(f∗,t+,(t−)∗)∂ti+=∑q∑j:(di,dj)∈IqL(f∗(xi),ci+,f∗(xj),cj−)−(ti+)2⋅(tj−)∗+p⋅(ti+)p−1ℒsuperscript𝑓superscript𝑡superscriptsuperscript𝑡superscriptsubscript𝑡𝑖subscript𝑞subscript:𝑗subscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿superscript𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖superscript𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗⋅superscriptsuperscriptsubscript𝑡𝑖2superscriptsubscriptsuperscript𝑡𝑗⋅𝑝superscriptsuperscriptsubscript𝑡𝑖𝑝1\displaystyle\frac{\partial\mathcal{L}(f^{*},t^{+},(t^{-})^{*})}{\partial t_{i}^{+}}=\sum_{q}\sum_{\begin{subarray}{c}j:(d_{i},d_{j})\in I_{q}\end{subarray}}\frac{L(f^{*}(x_{i}),c^{+}_{i},f^{*}(x_{j}),c^{-}_{j})}{-(t_{i}^{+})^{2}\cdot(t^{-}_{j})^{*}}+p\cdot(t_{i}^{+})^{p-1}Thus, we have***The derivation is based on the fact p∈(0,+∞)𝑝0p\in(0,+\infty). The result is then extended to the case of p=0𝑝0p=0.(29)argminti+ℒ(f∗,t+,(t−)∗)=[∑q∑j:(di,dj)∈IqL(f∗(xi),ci+,f∗(xj),cj−)p⋅(tj−)∗]1p+1subscriptsubscriptsuperscript𝑡𝑖ℒsuperscript𝑓superscript𝑡superscriptsuperscript𝑡superscriptdelimited-[]subscript𝑞subscript:𝑗subscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿superscript𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖superscript𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗⋅𝑝superscriptsubscriptsuperscript𝑡𝑗1𝑝1\displaystyle\mathop{\arg\min_{t^{+}_{i}}}\mathcal{L}(f^{*},t^{+},(t^{-})^{*})=\left[\sum_{q}\sum_{\begin{subarray}{c}j:(d_{i},d_{j})\in I_{q}\end{subarray}}\frac{L(f^{*}(x_{i}),c^{+}_{i},f^{*}(x_{j}),c^{-}_{j})}{p\cdot(t^{-}_{j})^{*}}\right]^{\frac{1}{p+1}}(30)ti+subscriptsuperscript𝑡𝑖\displaystyle t^{+}_{i}=[∑q∑j:(di,dj)∈Iq(L(f∗(xi),ci+,f∗(xj),cj−)/(tj−)∗)∑q∑k:(d1,dk)∈Iq(L(f∗(x1),c1+,f∗(xk),ck−)/(tk−)∗)]1p+1absentsuperscriptdelimited-[]subscript𝑞subscript:𝑗subscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿superscript𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖superscript𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗superscriptsubscriptsuperscript𝑡𝑗subscript𝑞subscript:𝑘subscript𝑑1subscript𝑑𝑘subscript𝐼𝑞𝐿superscript𝑓subscript𝑥1subscriptsuperscript𝑐1superscript𝑓subscript𝑥𝑘subscriptsuperscript𝑐𝑘superscriptsubscriptsuperscript𝑡𝑘1𝑝1\displaystyle=\left[\frac{\sum_{q}\sum_{j:\begin{subarray}{c}(d_{i},d_{j})\in I_{q}\end{subarray}}(L(f^{*}(x_{i}),c^{+}_{i},f^{*}(x_{j}),c^{-}_{j})\ /\ (t^{-}_{j})^{*})}{\sum_{q}\sum_{k:\begin{subarray}{c}(d_{1},d_{k})\in I_{q}\end{subarray}}(L(f^{*}(x_{1}),c^{+}_{1},f^{*}(x_{k}),c^{-}_{k})\ /\ (t^{-}_{k})^{*})}\right]^{\frac{1}{p+1}}In (30) the result is normalized to make the position bias at the first position to be 111.
|
| 82 |
+
|
| 83 |
+
Similarly, we have(31)tj−subscriptsuperscript𝑡𝑗\displaystyle t^{-}_{j}=[∑q∑i:(di,dj)∈Iq(L(f∗(xi),ci+,f∗(xj),cj−)/(ti+)∗)∑q∑k:(dk,d1)∈Iq(L(f∗(xk),ck+,f∗(x1),c1−)/(tk+)∗)]1p+1absentsuperscriptdelimited-[]subscript𝑞subscript:𝑖subscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞𝐿superscript𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖superscript𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗superscriptsubscriptsuperscript𝑡𝑖subscript𝑞subscript:𝑘subscript𝑑𝑘subscript𝑑1subscript𝐼𝑞𝐿superscript𝑓subscript𝑥𝑘subscriptsuperscript𝑐𝑘superscript𝑓subscript𝑥1subscriptsuperscript𝑐1superscriptsubscriptsuperscript𝑡𝑘1𝑝1\displaystyle=\left[\frac{\sum_{q}\sum_{\begin{subarray}{c}i:(d_{i},d_{j})\in I_{q}\end{subarray}}(L(f^{*}(x_{i}),c^{+}_{i},f^{*}(x_{j}),c^{-}_{j})\ /\ (t^{+}_{i})^{*})}{\sum_{q}\sum_{\begin{subarray}{c}k:(d_{k},d_{1})\in I_{q}\end{subarray}}(L(f^{*}(x_{k}),c^{+}_{k},f^{*}(x_{1}),c^{-}_{1})\ /\ (t^{+}_{k})^{*})}\right]^{\frac{1}{p+1}}In this way, we can estimate the position biases (ratios) t+superscript𝑡t^{+} and t−superscript𝑡t^{-} in one step given a fixed ranker f∗superscript𝑓f^{*}. Note that the method here, referred to as Pairwise Debiasing, can be applied to any pairwise loss function. In this paper, we choose to apply the pairwise learning-to-rank algorithm LambdaMART.
|
| 84 |
+
|
| 85 |
+
Given fixed position biases, we can learn an unbiased ranker. The partial derivative of ℒℒ\mathcal{L} with respect to f𝑓f can be written in the following general form.(32)∂ℒ(f,(t+)∗,(t−)∗)∂f=∑q∑(di,dj)∈Iq1(ti+)∗⋅(tj−)∗∂L(f(xi),ci+,f(xj),cj−)∂fℒ𝑓superscriptsuperscript𝑡superscriptsuperscript𝑡𝑓subscript𝑞subscriptsubscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞1⋅superscriptsubscriptsuperscript𝑡𝑖superscriptsubscriptsuperscript𝑡𝑗𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗𝑓\displaystyle\frac{\partial\mathcal{L}(f,(t^{+})^{*},(t^{-})^{*})}{\partial f}=\sum_{q}\sum_{\begin{subarray}{c}(d_{i},d_{j})\in I_{q}\end{subarray}}\frac{1}{(t^{+}_{i})^{*}\cdot(t^{-}_{j})^{*}}\frac{\partial L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j})}{\partial f}
|
| 86 |
+
|
| 87 |
+
We employ LambdaMART to train a ranker. LambdaMART (DBLP:conf/nips/BurgesRL06, ; DBLP:journals/ir/WuBSG10, ) employs gradient boosting or MART (Friedman00greedyfunction, ) and the gradient function of the loss function called lambda function. Given training data, it performs minimization of the objective function using the lambda function.
|
| 88 |
+
|
| 89 |
+
In LambdaMART, the lambda gradient λisubscript𝜆𝑖\lambda_{i} of document disubscript𝑑𝑖d_{i} is calculated using all pairs of the other documents with respect to the query.
|
| 90 |
+
|
| 91 |
+
(33)λi=subscript𝜆𝑖absent\displaystyle\lambda_{i}=∑j:(di,dj)∈Iqλij−∑j:(dj,di)∈Iqλjisubscript:𝑗subscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞subscript𝜆𝑖𝑗subscript:𝑗subscript𝑑𝑗subscript𝑑𝑖subscript𝐼𝑞subscript𝜆𝑗𝑖\displaystyle\sum_{j:(d_{i},d_{j})\in I_{q}}{\lambda_{ij}-\sum_{j:(d_{j},d_{i})\in I_{q}}\lambda_{ji}}
|
| 92 |
+
|
| 93 |
+
(34)λij=subscript𝜆𝑖𝑗absent\displaystyle\lambda_{ij}=−σ1+eσ(f(xi)−f(xj))|ΔZij|𝜎1superscript𝑒𝜎𝑓subscript𝑥𝑖𝑓subscript𝑥𝑗Δsubscript𝑍𝑖𝑗\displaystyle\frac{-\sigma}{1+e^{\sigma(f(x_{i})-f(x_{j}))}}\left|\Delta Z_{ij}\right|where λijsubscript𝜆𝑖𝑗\lambda_{ij} is the lambda gradient defined on a pair of documents disubscript𝑑𝑖d_{i} and djsubscript𝑑𝑗d_{j}, σ𝜎\sigma is a constant with a default value of 2, f(xi)𝑓subscript𝑥𝑖f(x_{i}) and f(xj)𝑓subscript𝑥𝑗f(x_{j}) are the scores of the two documents given by LambdaMART, ΔZijΔsubscript𝑍𝑖𝑗\Delta Z_{ij} denotes the difference between NDCG(DBLP:journals/tois/JarvelinK02, ) scores if documents disubscript𝑑𝑖d_{i} and djsubscript𝑑𝑗d_{j} are swapped in the ranking list.
|
| 94 |
+
|
| 95 |
+
Following the discussion above, we can make an adjustment on the lambda gradient λ~isubscript~𝜆𝑖\tilde{\lambda}_{i} with the estimated position biases:(35)λ~i=subscript~𝜆𝑖absent\displaystyle\tilde{\lambda}_{i}=∑j:(di,dj)∈Iqλ~ij−∑j:(dj,di)∈Iqλ~jisubscript:𝑗subscript𝑑𝑖subscript𝑑𝑗subscript𝐼𝑞subscript~𝜆𝑖𝑗subscript:𝑗subscript𝑑𝑗subscript𝑑𝑖subscript𝐼𝑞subscript~𝜆𝑗𝑖\displaystyle\sum_{j:(d_{i},d_{j})\in I_{q}}{\tilde{\lambda}_{ij}-\sum_{j:(d_{j},d_{i})\in I_{q}}}\tilde{\lambda}_{ji}(36)λ~ij=subscript~𝜆𝑖𝑗absent\displaystyle\tilde{\lambda}_{ij}=λij(ti+)∗⋅(tj−)∗subscript𝜆𝑖𝑗⋅superscriptsubscriptsuperscript𝑡𝑖superscriptsubscriptsuperscript𝑡𝑗\displaystyle\frac{\lambda_{ij}}{(t^{+}_{i})^{*}\cdot(t^{-}_{j})^{*}}
|
| 96 |
+
|
| 97 |
+
Thus, by simply replacing the lambda gradient λisubscript𝜆𝑖\lambda_{i} in LambdaMART with the adjusted lambda gradient λ~isubscript~𝜆𝑖\tilde{\lambda}_{i}, we can reliably learn an unbiased ranker with the LambdaMART algorithm. We call the algorithm Unbiased LambdaMART.
|
| 98 |
+
|
| 99 |
+
Estimation of position biases in (30) and (31) needs calculation of the loss function Lij=L(f(xi),ci+,f(xj),cj−)subscript𝐿𝑖𝑗𝐿𝑓subscript𝑥𝑖subscriptsuperscript𝑐𝑖𝑓subscript𝑥𝑗subscriptsuperscript𝑐𝑗L_{ij}=L(f(x_{i}),c^{+}_{i},f(x_{j}),c^{-}_{j}). For LambdaMART the loss function can be derived from (34) as follows.(37)Lij=log(1+e−σ(f(xi)−f(xj)))|ΔZij|subscript𝐿𝑖𝑗1superscript𝑒𝜎𝑓subscript𝑥𝑖𝑓subscript𝑥𝑗Δsubscript𝑍𝑖𝑗\displaystyle L_{ij}=\log(1+e^{-\sigma{(f(x_{i})-f(x_{j}))}})\ \left|\Delta Z_{ij}\right|
|
| 100 |
+
|
| 101 |
+
The learning algorithm of Unbiased LambdaMART is given in Algorithm 1. The input is a click dataset 𝒟𝒟\mathcal{D}. The hyper-parameters are regularization parameter p𝑝p and total number of boosting iterations M𝑀M. The output is an unbiased ranker f𝑓f and estimated position biases at all positions t+superscript𝑡t^{+}, t−superscript𝑡t^{-}. As is outlined in Algorithm 1, Unbiased LambdaMART iteratively calculates adjusted lambda gradient in line 4, re-trains a ranker with the gradients in line 6, and re-estimates position biases in line 7. The time complexity of Unbiased LambdaMART is the same as that of LambdaMART.
|
| 102 |
+
|
| 103 |
+
In this section, we present the results of two experiments on our proposed algorithm Unbiased LambdaMART. One is an offline experiment on a benchmark dataset, together with empirical analysis on the effectiveness, generalizability, and robustness of the algorithm. The other experiment is an online A/B testing at a commercial search engine.
|
| 104 |
+
|
| 105 |
+
We made use of the Yahoo! learning-to-rank challenge dataset†††http://webscope.sandbox.yahoo.com to conduct an experiment. The Yahoo dataset is one of the largest benckmark dataset for learning-to-rank. It consists of 29921 queries and 710k documents. Each query document pair is represented by a 700-dimensional feature vector manually assigned with a label denoting relevance at 5 levels (DBLP:journals/jmlr/ChapelleC11, ).
|
| 106 |
+
|
| 107 |
+
There is no click data associated with the Yahoo dataset. We followed the procedure in (DBLP:conf/sigir/AiBLGC18, ) to generate synthetically click data from the Yahoo dataset for offline evaluation.‡‡‡We plan to release the synthetically generated click data as well as the source code of Unbiased LambdaMART.
|
| 108 |
+
|
| 109 |
+
We chose NDCG at position 1,3,5,10 and MAP as evaluation measures in relevance ranking.
|
| 110 |
+
|
| 111 |
+
The click data generation process in (DBLP:conf/sigir/AiBLGC18, ) is as follows. First, one trains a Ranking SVM model using 1% of the training data with relevance labels, and uses the model to create an initial ranking list for each query. Next, one samples clicks from the ranking lists by simulating the browsing process of users. The position-based click model (PBM) is utilized. It assumes that a user decides to click a document according to probability P(ci+)=P(oi+)P(ri+)𝑃subscriptsuperscript𝑐𝑖𝑃superscriptsubscript𝑜𝑖𝑃superscriptsubscript𝑟𝑖P(c^{+}_{i})=P(o_{i}^{+})P(r_{i}^{+}). Here P(oi+)𝑃superscriptsubscript𝑜𝑖P(o_{i}^{+}) and P(ri+)𝑃superscriptsubscript𝑟𝑖P(r_{i}^{+}) are the observation probability and relevance probability respectively.
|
| 112 |
+
|
| 113 |
+
The probability of observation P(oi+)𝑃superscriptsubscript𝑜𝑖P(o_{i}^{+}) is calculated byP(oi+|xi)=ρiθ𝑃conditionalsuperscriptsubscript𝑜𝑖subscript𝑥𝑖superscriptsubscript𝜌𝑖𝜃P(o_{i}^{+}|x_{i})=\rho_{i}^{\theta}where ρisubscript𝜌𝑖\rho_{i} represents position bias at position i𝑖i and θ∈[0,+∞]𝜃0\theta\in[0,+\infty] is a parameter controlling the degree of position bias.The position bias ρisubscript𝜌𝑖\rho_{i} is obtained from an eye-tracking experiment in (DBLP:conf/sigir/JoachimsGPHG05, ) and the parameter θ𝜃\theta is set as 1 by default.
|
| 114 |
+
|
| 115 |
+
The probability of relevance P(ri+)𝑃superscriptsubscript𝑟𝑖P(r_{i}^{+}) is calculated byP(ri+)=ϵ+(1−ϵ)2y−12ymax−1𝑃superscriptsubscript𝑟𝑖italic-ϵ1italic-ϵsuperscript2𝑦1superscript2subscript𝑦𝑚𝑎𝑥1P(r_{i}^{+})=\epsilon+(1-\epsilon)\frac{2^{y}-1}{2^{y_{max}}-1}where y∈[0,4]𝑦04y\in[0,4] represents a relevance level and ymaxsubscript𝑦𝑚𝑎𝑥y_{max} is the highest level of 4. The parameter ϵitalic-ϵ\epsilon represents click noise due to that irrelevant documents (y=0𝑦0y=0) are incorrectly perceived as relevant documents (y>0𝑦0y>0) , which is set as 0.1 by default.
|
| 116 |
+
|
| 117 |
+
We made comprehensive comparisons between our method and the baselines. The baselines were created by combining the state-of-the-art debiasing methods and learning-to-rank algorithms. There were six debiasing methods. To make fair comparison, we used click model to generate 165660 query sessions as training dataset, and utilized the same dataset for all debiasing methods. All the hyper-parameters of the baseline models were the same as those in the original papers.
|
| 118 |
+
|
| 119 |
+
Randomization: The method, proposed by Joachims et al. (DBLP:conf/wsdm/JoachimsSS17, ), uses randomization to infer the observation probabilities as position biases. We randomly shuffled the rank lists and then estimated the position biases as in (DBLP:conf/sigir/AiBLGC18, ).
|
| 120 |
+
|
| 121 |
+
Regression-EM: The method, proposed by Wang et al. (DBLP:conf/wsdm/WangGBMN18, ), directly estimates the position biases using a regression-EM model implemented by GBDT.
|
| 122 |
+
|
| 123 |
+
Dual Learning Algorithm: The method, proposed by Ai et al. (DBLP:conf/sigir/AiBLGC18, ), jointly learns a ranker and conducts debiasing of click data. The algorithm implements both the ranking model and the debiasing model as deep neural networks.
|
| 124 |
+
|
| 125 |
+
Pairwise Debiasing: Our proposed debiasing method, which is combined with LambdaMART.In this experiment, we set the hyper-parameter p𝑝p as 0 by default. As explained below, a further experiment was conducted with different values of p𝑝p.
|
| 126 |
+
|
| 127 |
+
Click Data: In this method, the raw click data without debiasing is used to train a ranker, whose performance is considered as a lower bound.
|
| 128 |
+
|
| 129 |
+
Labeled Data: In this method, human annotated relevance labels without any bias are used as data for training of ranker, whose performance is considered as an upper bound.
|
| 130 |
+
|
| 131 |
+
There were three learning-to-rank algorithms.
|
| 132 |
+
|
| 133 |
+
DNN: A deep neural network was implemented as a ranker, as in (DBLP:conf/sigir/AiBLGC18, ). We directly used the code provided by Ai et al.§§§ https://github.com/QingyaoAi/Dual-Learning-Algorithm-for-Unbiased-Learning-to-Rank.
|
| 134 |
+
|
| 135 |
+
RankSVM: We directly used the Unbiased RankSVM Software provided by Joachims et al.¶¶¶ https://www.cs.cornell.edu/people/tj/svm_light/svm_proprank.html, with hyper-parameter C𝐶C being 200.
|
| 136 |
+
|
| 137 |
+
LambdaMART: We implemented Unbiased LambdaMART by modifying the LambdaMART tool in LightGBM (DBLP:conf/nips/KeMFWCMYL17, ). We utilized the default hyper-parameters of the tool. The total number of trees was 300, learning rate was 0.05, number of leaves for one tree was 31, feature fraction was 0.9, and bagging fraction was 0.9.
|
| 138 |
+
|
| 139 |
+
In summary, there were 13 baselines to compare with our proposed Unbiased LambdaMART algorithm. Note that Dual Learning Algorithm and DNN are tightly coupled. We did not combine Pairwise Debiasing with RankSVM and DNN, as it is beyond the scope of this paper.
|
| 140 |
+
|
| 141 |
+
Table 2 summarizes the results. We can see that our method of Unbiased LambdaMART (LambdaMART + Pairwise Debiasing) significantly outperforms all the other baseline methods. The results of Regression-EM and Dual Learning Algorithm are compariable with those reported in the original papers. In particular, we have the following findings.•Our method of LambdaMART+Pairwise Debiasing (Unbiased LambdaMART) achieves better performances than all the state-of-the-art methods in terms of all measures. For example, in terms of NDCG@1, our method outperforms LambdaMART+Regression-EM by 3.2%, outperforms DNN+Dual Learning by 4.3%, and outperforms RankSVM+Randomization by 8.9%.•Pairwise Debiasing works better than the other debiasing methods. When combined with LambdaMART, Pairwise Debiasing outperforms Regression-EM by 3.2%, outperforms Randomization by 4.8% in terms of NDCG@1.•LambdaMART trained with human labeled data achieves the best performance (upper bound). An unbiased learning-to-rank algorithm can still not beat it. This indicates that there is still room for improvement in unbiased learning-to-rank.•When trained with Click Data, the performance of LambdaMART decreases significantly and gets closer to those of RankSVM and DNN. This implies that a sophisticated algorithm like LambdaMART is more sensitive to position bias.
|
| 142 |
+
|
| 143 |
+
We conducted additional experiments to investigate the effectiveness, generalizability, and robustness of Unbiased LambdaMART.
|
| 144 |
+
|
| 145 |
+
We investigated whether the performance improvement by Unbiased LambdaMART is indeed from reduction of position bias.
|
| 146 |
+
|
| 147 |
+
We first identified the documents at each position given by the original ranker.We then calculated the average positions of the documents at each original position after re-ranking by Pairwise Debiasing and the other debiasing methods, combined with LambdaMART. We also calculated the average positions of the documents after re-ranking by their relevance labels, which is the ground truth. Ideally, the average positions by the debiasing methods should get close to the average positions by the relevance labels. Figure 1 shows the results.
|
| 148 |
+
|
| 149 |
+
One can see that the curve of LambdaMART + Click Data (in grey) is away from that of relevance labels or ground truth (in brown), indicating that directly using click data without debiasing can be problematic. The curve of Pairwise Debiasing (in orange) is the closest to the curve of relevance labels, indicating that the performance enhancement by Pairwise Debiasing is indeed from effective debiasing.
|
| 150 |
+
|
| 151 |
+
Figure 2 shows the normalized (relative) position biases for click and unclick positions given by Unbiased LambdaMART. The result indicates that both the position biases at click positions and position biases at unclick positions monotonically decrease, while the former decrease at a faster rate than the latter. The result exhibits how Unbiased LambdaMART can reduce position biases in the pairwise setting.
|
| 152 |
+
|
| 153 |
+
The Position Based Model (PBM) assumes that the bias of a document only depends on its position, which is an approximation of user click behavior in practice.The Cascade Model (DBLP:conf/sigir/DupretP08, ), on the other hand, assumes that the user browses the search results in a sequential order from top to bottom, which may more precisely model user behavior. We therefore analyzed the generalizability of Unbiased LambdaMART by using simulated click data from both Position Based Model and Cascade Model, and studied whether regularization of position bias, i.e., hyper-parameter p𝑝p, affects performance.
|
| 154 |
+
|
| 155 |
+
We used a variant of Cascade Model which is similar to Dynamic Bayesian Model in (DBLP:conf/www/ChapelleZ09, ). There is a probability ϕitalic-ϕ\phi that the user is satisfied with the result after clicking the document. If the user is satisfied, he / she will stop searching; and otherwise, there is a probability β𝛽\beta that he / she will examine the next result and there is a probability 1−β1𝛽1-\beta that he / she will stop searching. Obviously, the smaller β𝛽\beta indicates that the user will have a smaller probability to continue reading, which means a more severe position bias. In our experiment, we set ϕitalic-ϕ\phi as half of the relevance probability and used the default value of β𝛽\beta i.e., 0.5.
|
| 156 |
+
|
| 157 |
+
We compared Unbiased LambdaMART (LambdaMART + Pairwise Debiasing) with LambdaMART + two different debiasing methods, Regression-EM and Randomization, and also Click Data without debiasing on the two datasets. Again, we found that Unbiased LambdaMART significantly outperforms the baselines, indicating that Pairwise Debiasing is indeed an effective method.
|
| 158 |
+
|
| 159 |
+
Figure 3 shows the results of the methods in terms of NDCG@1 and MAP, where we choose NDCG@1 as representative of NDCG scores. For Unbiased LambdaMART, it shows the results under different hyper-parameter values. We can see that Unbiased LambdaMART is superior to all the three baselines on both datasets generated by Position Based Model and Cascade Model. We can also see that in general to achieve high performance the value of p𝑝p in Lpsubscript𝐿𝑝L_{p} regularization should not be so high. For the dataset generated by Cascade Model, the performance with L1subscript𝐿1L_{1} regularization is better than that with L0subscript𝐿0L_{0} regularization. It indicates that when the data violates its assumption, Unbiased LambdaMART can still learn a reliable model with a higher order of regularization.
|
| 160 |
+
|
| 161 |
+
We further evaluated the robustness of Unbiased LambdaMART under different degrees of position bias.
|
| 162 |
+
|
| 163 |
+
In the above experiments, we only tested the performance of Unbiased LambdaMART with click data generated from a single click model, i.e., θ𝜃\theta as 111 for Position Based Model and β𝛽\beta as 0.50.50.5 for Cascade Model. Therefore, here we set the two hyper-parameters to different values and examined whether Unbiased LambdaMART can still work equally well.
|
| 164 |
+
|
| 165 |
+
Figure 4 shows the results in terms of NDCG@1 with different degrees of position bias. The results in terms of other measures have similar trends. When θ𝜃\theta in Position Based Model equals 00, and β𝛽\beta in Cascade Model equals 111, there is no position bias. The results of all debiasing methods are similar to that of using click data only. As we add more position bias, i.e., θ𝜃\theta increases and β𝛽\beta decreases, the performances of all the debiasing methods decrease dramatically. However, under all settings Unbiased LambdaMART can get less affected by position bias and consistently maintain the best results. This indicates that Unbiased LambdaMART is robust to different degrees of position bias.
|
| 166 |
+
|
| 167 |
+
Next, we investigate the robustness of Unbiased LambdaMart under different sizes of training data. We randomly selected a subset of training data, (i.e., 20% - 100%) to generate different sizes of click datasets, and used the datasets to evaluate the performances of LambdaMART with different debiasing methods. To make fair comparison, we used the same subsets of training data for running of the Randomization and Regression-EM algorithm.
|
| 168 |
+
|
| 169 |
+
As shown in Figure 5, when the size of training data decreases, the improvements obtained by the debiasing methods also decrease. The reason seems to be that the position bias estimated from insufficient training data is not accurate, which can hurt the performances of the debiasing methods. In contrast, Unbiased LambdaMART, which adopts a joint training mechanism, can still achieve the best performances in such cases. When the data size increases from 80% to 100%, the performance enhancement of LambdaMART + Click Data is quite small, while the performance enhancements of the debiasing methods are much larger. This result is in accordance with the observation reported in(DBLP:conf/wsdm/JoachimsSS17, ), that simply increasing the amount of biased training data cannot help build a reliable ranking model, but after debiasing it is possible to learn a better ranker with more training data. The experiment shows that Unbiased LambdaMART can still work well even with limited training data, and it can consistently increase its performances as training data increases.
|
| 170 |
+
|
| 171 |
+
We further evaluated the performance of Unbiased LambdaMART by deploying it at the search engine of Jinri Toutiao, a commercial news recommendation app in China with over 100 million daily active users. We trained two rankers with Unbiased LambdaMART and LambdaMART + Click Data using click data of approximately 19.6 million query sessions collected over two days at the search engine.Then we deployed the two rankers at the search system to conduct A/B testing. The A/B testing was carried out for 16 days. In each experiment group, the ranker was randomly assigned approximately 1.5 million queries per day.
|
| 172 |
+
|
| 173 |
+
In the online environment, we observed that different users have quite different click behaviors. It appeared to be necessary to have a tighter control on debiasing. We therefore set the hyper-parameter p𝑝p as 1, i.e., we conducted L1subscript𝐿1L_{1} regularization to impose a stronger regularization on the position biases. We validated the correctness of this hyper-parameter selection on a small set of relevance dataset.
|
| 174 |
+
|
| 175 |
+
We compared the results of the two rankers in terms of first click ratios, which are the percentages of sessions having first clicks at top 1,3,5 positions among all sessions. A ranker with higher first click ratios should have better performance.
|
| 176 |
+
|
| 177 |
+
As shown in Table 3, Unbiased LambdaMART can significantly outperform LambdaMART + Click Data in terms of first click ratios at the A/B Testing. It increases the first click ratios at positions 1,3,5 by 2.64%, 1.21% and 0.80%, respectively, which are all statistically significant (p-values ¡ 0.05). It indicates that Unbiased LambdaMART can make significantly better relevance ranking with its debiasing capability.
|
| 178 |
+
|
| 179 |
+
We next asked human assessors to evaluate the results of the two rankers.We collected all the different results of the same queries given by the two rankers during the A/B testing period, presented the results to the assessors randomly side-by-side,and asked assessors to judge which results are better. They categorized the results at the top five positions of 100 randomly chosen queries into three categories, i.e., ‘Win’, ‘Same’ and ‘Loss’.
|
| 180 |
+
|
| 181 |
+
As shown in Table 4, the win/loss ratio of Unbiased LambdaMart over LambdaMart + Click Data is as high as 1.91, indicating that Unbiased LambdaMART is indeed effective as an unbiased learning-to-rank algorithm.
|
| 182 |
+
|
| 183 |
+
In this paper, we have proposed a general framework for pairwise unbiased learning-to-rank, including the extended inverse propensity weighting (IPW) principle. We have also proposed a method called Pairwise Debiasing to jointly estimate position biases and train a ranker by directly optimizing a same objective function within the framework. We develop a new algorithm called Unbiased LambdaMART as application of the method. Experimental results show that Unbiased LambdaMART achieves significantly better results than the existing methods on a benchmark dataset, and is effective in relevance ranking at a real-world search system.
|
| 184 |
+
|
| 185 |
+
There are several items to work on in the future. We plan to apply Pairwise Debiasing to other pairwise learning-to-rank algorithms. We also consider developing a more general debiasing method that can deal with not only position bias but also other types of bias such as presentation bias. More theoretical analysis on unbiased pairwise learning-to-rank is also necessary.
|
1809.05852v2.txt
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Domain mapping or image-to-image translation, which targets at translating an image from one domain to another, has been intensively investigated over the past few years. Let X∈𝒳𝑋𝒳X\in\mathcal{X} denote a random variable representing source domain images and Y∈𝒴𝑌𝒴Y\in\mathcal{Y} represent target domain images.According to whether we have access to a paired sample {(xi,yi)}i=1Nsuperscriptsubscriptsubscript𝑥𝑖subscript𝑦𝑖𝑖1𝑁\{(x_{i},y_{i})\}_{i=1}^{N}, domain mapping can be studied in a supervised or unsupervised manner. While several works have successfully produced high-quality translations by focusing on supervised domain mapping with constraints provided by cross-domain image pairs [43, 24, 56, 55], the progress of unsupervised domain mapping is relatively slow.Unluckily, obtaining paired training examples is expensive and even infeasible in some situations. For example, if we want to learn translators between Monet’s paintings and Photographs, how can we collect sufficient well-defined (Monet’s painting, photograph) pairs for model training? By contrast, collecting unpaired sets is often convenient since infinite images are available online. From this viewpoint, unsupervised domain mapping has great potential for real-world applications in the long term.
|
| 2 |
+
|
| 3 |
+
In unsupervised domain mapping, from a probabilistic modeling perspective, our goal is to model the joint distribution PXYsubscript𝑃𝑋𝑌P_{XY} given samples drawn from the marginal distributions PXsubscript𝑃𝑋P_{X} and PYsubscript𝑃𝑌P_{Y} in individual domains. Since the two marginal distributions can be inferred from an infinite set of possible joint distributions, it is difficult to guarantee that an individual input x∈X𝑥𝑋x\in X and the output GXY(x)subscript𝐺𝑋𝑌𝑥G_{XY}(x) are paired up in a meaningful way without additional assumptions or constraints.
|
| 4 |
+
|
| 5 |
+
To address this problem, recent approaches have exploited the cycle-consistency assumption, i.e., a mapping GXYsubscript𝐺𝑋𝑌G_{XY} and its inverse mapping GYXsubscript𝐺𝑌𝑋G_{YX} should be bijections [62, 26, 58]. Specifically, when feeding an example x∈X𝑥𝑋x\in X into the networks GXY∘GYX:X→Y→X:subscript𝐺𝑋𝑌subscript𝐺𝑌𝑋→𝑋𝑌→𝑋G_{XY}\circ G_{YX}:X\to Y\to X, the output should be a reconstruction of x𝑥x and vise versa for y𝑦y, i.e., GYX(GXY(x))≈xsubscript𝐺𝑌𝑋subscript𝐺𝑋𝑌𝑥𝑥G_{YX}(G_{XY}(x))\approx x and GXY(GYX(y))≈ysubscript𝐺𝑋𝑌subscript𝐺𝑌𝑋𝑦𝑦G_{XY}(G_{YX}(y))\approx y. Further, DistanceGAN [5] showed that maintaining the distances between images within domains allows one-sided unsupervised domain mapping rather than simultaneously learning both GXYsubscript𝐺𝑋𝑌G_{XY} and GYXsubscript𝐺𝑌𝑋G_{YX}.
|
| 6 |
+
|
| 7 |
+
Existing constraints overlook the special properties of images that simple geometric transformations (global geometric transformations without shape deformation) do not change the image’s semantic structure. Here, semantic structure refers to the information that distinguishes different object/staff classes, which can be easily perceived by humans regardless of trivial geometric transformations such as rotation. Based on this property, we develop a geometry-consistency constraint, which helps in reducing the search space of possible solutions while still keeping the correct set of solutions under consideration, and results in a geometry-consistent generative adversarial network (GcGAN) for unsupervised domain mapping.
|
| 8 |
+
|
| 9 |
+
Our geometry-consistency constraint is motivated by the fact that a given geometric transformation f(⋅)𝑓⋅f(\cdot) between the input images should be preserved by related translators GXYsubscript𝐺𝑋𝑌G_{XY} and GX~Y~subscript𝐺~𝑋~𝑌G_{\tilde{X}\tilde{Y}}, if 𝒳~~𝒳\tilde{\mathcal{X}} and 𝒴~~𝒴\tilde{\mathcal{Y}} are the domains obtained by applying f(⋅)𝑓⋅f(\cdot) on the examples of X𝑋X and Y𝑌Y, respectively. Mathematically, given a random example x𝑥x from the source domain 𝒳𝒳\mathcal{X} and a predefined geometric transformation function f(⋅)𝑓⋅f(\cdot), geometry consistency can be expressed as f(GXY(x))≈GX~Y~(f(x))𝑓subscript𝐺𝑋𝑌𝑥subscript𝐺~𝑋~𝑌𝑓𝑥f(G_{XY}(x))\approx G_{\tilde{X}\tilde{Y}}(f(x)) and f−1(GX~Y~(f(x)))≈GXY(x)superscript𝑓1subscript𝐺~𝑋~𝑌𝑓𝑥subscript𝐺𝑋𝑌𝑥f^{-1}(G_{\tilde{X}\tilde{Y}}(f(x)))\approx G_{XY}(x), where f−1(⋅)superscript𝑓1⋅f^{-1}(\cdot) is the inverse function of f(⋅)𝑓⋅f(\cdot). Because it is unlikely that GXYsubscript𝐺𝑋𝑌G_{XY} and GX~Y~subscript𝐺~𝑋~𝑌G_{\tilde{X}\tilde{Y}} always fail in the same location, GXYsubscript𝐺𝑋𝑌G_{XY} and GX~Y~subscript𝐺~𝑋~𝑌G_{\tilde{X}\tilde{Y}} co-regularize each other by the geometry-consistency constraint and thus correct each others’ failures in local regions of their respective translations (see Figure 1 for an illustrative example). Our geometry-consistency constraint allows one-sided unsupervised domain mapping, i.e., GXYsubscript𝐺𝑋𝑌G_{XY} can be trained independently from GYXsubscript𝐺𝑌𝑋G_{YX}. In this paper, we employ two simple but representative geometric transformations as examples, i.e., vertical flipping (vf) and 90 degrees clockwise rotation (rot), to illustrate geometry consistency. Quantitative and qualitative comparisons with the baseline (GAN alone) and the state-of-the-art methods including CycleGAN [62] and DistanceGAN [5] demonstrate the effectiveness of our model in generating realistic images.
|
| 10 |
+
|
| 11 |
+
Generative Adversarial Networks.Generative adversarial networks (GANs) [19, 42, 14, 44, 48, 3] learn two networks, i.e., a generator and a discriminator, in a staged zero-sum game fashion to generate images from inputs. Many applications and computer vision tasks have recently been developed based on deep convolutional GANs (DCGANs), such as image inpainting, text to image synthesis, style transfer, and domain adaptation [7, 59, 43, 45, 29, 57, 9, 49, 21, 50, 60, 25, 47]. The key components enabling GANs is the proposed adversarial constraint, which enforces the generated images to be indistinguishable from real images. Our formulation also benefits from an adversarial constraint to learn translators between two individual domains.
|
| 12 |
+
|
| 13 |
+
Domain Mapping.Many well-known computer vision tasks, such as scene parsing and image colorization, follow similar settings to domain mapping or image-to-image translation. Specific to recent adversarial domain mapping, this problem has been studied in a supervised or unsupervised manner with respect to paired or unpaired inputs.
|
| 14 |
+
|
| 15 |
+
There are a variety of literatures [43, 29, 24, 56, 53, 55, 23, 34, 4, 10] on supervised domain mapping. One representative example is conditional GAN [24], which learns the discriminator to distinguish (x,y)𝑥𝑦(x,y) and (x,GXY(x))𝑥subscript𝐺𝑋𝑌𝑥(x,G_{XY}(x)) instead of y𝑦y and GXY(x)subscript𝐺𝑋𝑌𝑥G_{XY}(x), where (x,y)𝑥𝑦(x,y) is a meaningful pair across domains.Further, Wang et al. [56] showed that conditional GANs can be used to generate high-resolution images with a novel feature matching loss, as well as multi-scale generator and discriminator architectures.While there has been significant progress in supervised domain mapping, many real-word applications can not provide aligned images across domains because data preparation is expensive. Thus, different constraints and frameworks have been proposed for image-to-image translation in the absence of training pairs, i.e., unsupervised domain mapping.
|
| 16 |
+
|
| 17 |
+
In unsupervised domain mapping, only unaligned examples in individual domains are provided, making the task more practical but more difficult. Unpaired domain mapping has a long history, and some successes in adversarial networks have recently been presented [37, 62, 5, 36, 39, 35, 6, 11]. For example, Liu and Tuzel [37] introduced coupled GAN (CoGAN) to learn cross-domain representations by enforcing a weight-sharing constraint.Subsequently, CycleGAN [62], DiscoGAN [26], and DualGAN [58] enforced that translators GXYsubscript𝐺𝑋𝑌G_{XY} and GYXsubscript𝐺𝑌𝑋G_{YX} should be bijections. Thus, jointly learning GXYsubscript𝐺𝑋𝑌G_{XY} and GYXsubscript𝐺𝑌𝑋G_{YX} by enforcing cycle consistency can help to produce convincing mappings. Since then, many constraints and assumptions have been proposed to improve cycle consistency [8, 17, 22, 30, 32, 11, 2, 63, 18, 41, 36, 33, 1]. Recently, Benaim and Wolf [5] reported that maintaining the distances between samples within domains allows one-sided unsupervised domain mapping. GcGAN is also a one-sided framework coupled with our geometry-consistency constraint, and produces competitive and even better translations than the two-sided CycleGAN in various applications.
|
| 18 |
+
|
| 19 |
+
Let 𝒳𝒳\mathcal{X} and 𝒴𝒴\mathcal{Y} be two domains with unpaired training examples {xi}i=1Nsuperscriptsubscriptsubscript𝑥𝑖𝑖1𝑁\{x_{i}\}_{i=1}^{N} and {yj}j=1Msuperscriptsubscriptsubscript𝑦𝑗𝑗1𝑀\{y_{j}\}_{j=1}^{M}, where xisubscript𝑥𝑖x_{i} and yjsubscript𝑦𝑗y_{j} are drawn from the marginal distributions PXsubscript𝑃𝑋P_{X} and PYsubscript𝑃𝑌P_{Y}, where X𝑋X and Y𝑌Y are two random variables associated with 𝒳𝒳\mathcal{X} and 𝒴𝒴\mathcal{Y}, respectively. In the paper, we exploit style transfer without undesirable semantic distortions in unsupervised domain mapping, and have two goals.First, we need to learn a mapping GXYsubscript𝐺𝑋𝑌G_{XY} such that GXY(X)subscript𝐺𝑋𝑌𝑋G_{XY}(X) has the same distribution as Y𝑌Y, i.e., PGXY(X)≈PYsubscript𝑃subscript𝐺𝑋𝑌𝑋subscript𝑃𝑌P_{G_{XY}(X)}\approx P_{Y}. Second, the learned mapping function only changes the image style without distorting the semantic structures.
|
| 20 |
+
|
| 21 |
+
While many works have modeled the invertibility between GXYsubscript𝐺𝑋𝑌G_{XY} and GYXsubscript𝐺𝑌𝑋G_{YX} for convincing mappings since the success of CycleGAN, here we propose to enforce geometry consistency as a constraint that allows one-sided domain mapping, i.e., learning GXYsubscript𝐺𝑋𝑌G_{XY} without simultaneously learning GYXsubscript𝐺𝑌𝑋G_{YX}. Let f(⋅)𝑓⋅f(\cdot) be a predefined geometric transformation. We can obtain two extra domains 𝒳~~𝒳\tilde{\mathcal{X}} and 𝒴~~𝒴\tilde{\mathcal{Y}} with examples {x~i}i=1Nsuperscriptsubscriptsubscript~𝑥𝑖𝑖1𝑁\{\tilde{x}_{i}\}_{i=1}^{N} and {y~j}j=1Msuperscriptsubscriptsubscript~𝑦𝑗𝑗1𝑀\{\tilde{y}_{j}\}_{j=1}^{M} by applying f(⋅)𝑓⋅f(\cdot) on X𝑋X and Y𝑌Y, respectively. We learn an additional image-to-image translator GX~Y~:X~→Y~:subscript𝐺~𝑋~𝑌→~𝑋~𝑌G_{\tilde{X}\tilde{Y}}:\tilde{X}\to\tilde{Y} while learning GXY:X→Y:subscript𝐺𝑋𝑌→𝑋𝑌G_{XY}:X\to Y, and introduce our geometry-consistency constraint based on the predefined transformation such that the two networks can regularize each other. Our framework enforces that GXY(x)subscript𝐺𝑋𝑌𝑥G_{XY}(x) and GX~Y~(x~)subscript𝐺~𝑋~𝑌~𝑥G_{\tilde{X}\tilde{Y}}(\tilde{x}) should keep the same geometric transformation with the one between x𝑥x and x~~𝑥\tilde{x}, i.e., f(GXY(x))≈GX~Y~(x~)𝑓subscript𝐺𝑋𝑌𝑥subscript𝐺~𝑋~𝑌~𝑥f(G_{XY}(x))\approx G_{\tilde{X}\tilde{Y}}(\tilde{x}), where x~=f(x)~𝑥𝑓𝑥\tilde{x}=f(x). We denote the two adversarial discriminators as DYsubscript𝐷𝑌D_{Y} and DY~subscript𝐷~𝑌D_{\tilde{Y}} with respect to domains 𝒴𝒴\mathcal{Y} and 𝒴~~𝒴\tilde{\mathcal{Y}}, respectively.
|
| 22 |
+
|
| 23 |
+
We present our geometry-consistency constraint and GcGAN beginning with a review of the cycle-consistency constraint and the distance constraint. An illustration of the main differences between these constraints is shown in Figure 2.
|
| 24 |
+
|
| 25 |
+
Cycle-consistency constraint. Following the cycle-consistency assumption [26, 62, 58], through the translators GXY∘GYX:X→Y→X:subscript𝐺𝑋𝑌subscript𝐺𝑌𝑋→𝑋𝑌→𝑋G_{XY}\circ G_{YX}:X\to Y\to X and GYX∘GXY:Y→X→Y:subscript𝐺𝑌𝑋subscript𝐺𝑋𝑌→𝑌𝑋→𝑌G_{YX}\circ G_{XY}:Y\to X\to Y, the examples x𝑥x and y𝑦y in domain 𝒳𝒳\mathcal{X} and 𝒴𝒴\mathcal{Y} should recover the original images, i.e., x≈GYX(GXY(x))𝑥subscript𝐺𝑌𝑋subscript𝐺𝑋𝑌𝑥x\approx G_{YX}(G_{XY}(x)) and y≈GXY(GYX(y))𝑦subscript𝐺𝑋𝑌subscript𝐺𝑌𝑋𝑦y\approx G_{XY}(G_{YX}(y)). Cycle consistency is implemented by a bidirectional reconstruction process that requires GXYsubscript𝐺𝑋𝑌G_{XY} and GYXsubscript𝐺𝑌𝑋G_{YX} to be jointly learned, as shown in Figure 2 (CycleGAN). The cycle consistency loss ℒcyc(GXY,GYX,X,Y)subscriptℒ𝑐𝑦𝑐subscript𝐺𝑋𝑌subscript𝐺𝑌𝑋𝑋𝑌\mathcal{L}_{cyc}(G_{XY},G_{YX},X,Y) takes the form as:ℒcyc(GXY,GYX,X,Y)=𝔼x∼PX[‖GYX(GXY(x))−x‖1]+𝔼y∼PY[‖GXY(GYX(y))−y‖1].subscriptℒ𝑐𝑦𝑐subscript𝐺𝑋𝑌subscript𝐺𝑌𝑋𝑋𝑌subscript𝔼similar-to𝑥subscript𝑃𝑋delimited-[]subscriptdelimited-∥∥subscript𝐺𝑌𝑋subscript𝐺𝑋𝑌𝑥𝑥1subscript𝔼similar-to𝑦subscript𝑃𝑌delimited-[]subscriptdelimited-∥∥subscript𝐺𝑋𝑌subscript𝐺𝑌𝑋𝑦𝑦1\begin{split}\mathcal{L}_{cyc}(G_{XY},G_{YX},X,Y)&=\mathbb{E}_{x\sim P_{X}}[\|G_{YX}(G_{XY}(x))-x\|_{1}]\\&\quad+\mathbb{E}_{y\sim P_{Y}}[\|G_{XY}(G_{YX}(y))-y\|_{1}].\end{split}(1)
|
| 26 |
+
|
| 27 |
+
Distance constraint. The assumption behind the distance constraint is that the distance between two examples xisubscript𝑥𝑖x_{i} and xjsubscript𝑥𝑗x_{j} in domain X𝑋X should be preserved after mapping to domain Y𝑌Y, i.e., d(xi,xj)≈a⋅d(GXY(xi),GXY(xj))+b𝑑subscript𝑥𝑖subscript𝑥𝑗⋅𝑎𝑑subscript𝐺𝑋𝑌subscript𝑥𝑖subscript𝐺𝑋𝑌subscript𝑥𝑗𝑏d(x_{i},x_{j})\approx a\cdot d(G_{XY}(x_{i}),G_{XY}(x_{j}))+b, where d(⋅)𝑑⋅d(\cdot) is a predefined function to measure the distance between two examples and a𝑎a and b𝑏b are the linear coefficient and bias. In DistanceGAN [5], the distance consistency loss ℒdis(GXY,X,Y)subscriptℒ𝑑𝑖𝑠subscript𝐺𝑋𝑌𝑋𝑌\mathcal{L}_{dis}(G_{XY},X,Y) is the exception to the absolute differences between distances:ℒdis(GXY,X,Y)=𝔼xi,xj∼PX[|ϕ(xi,xj)−ψ(xi,xj)|],ϕ(xi,xj)=1σX(‖xi−xj‖1−μX),ψ(xi,xj)=1σY(‖GXY(xi)−GXY(xj)‖1−μY),formulae-sequencesubscriptℒ𝑑𝑖𝑠subscript𝐺𝑋𝑌𝑋𝑌subscript𝔼similar-tosubscript𝑥𝑖subscript𝑥𝑗subscript𝑃𝑋delimited-[]italic-ϕsubscript𝑥𝑖subscript𝑥𝑗𝜓subscript𝑥𝑖subscript𝑥𝑗formulae-sequenceitalic-ϕsubscript𝑥𝑖subscript𝑥𝑗1subscript𝜎𝑋subscriptdelimited-∥∥subscript𝑥𝑖subscript𝑥𝑗1subscript𝜇𝑋𝜓subscript𝑥𝑖subscript𝑥𝑗1subscript𝜎𝑌subscriptdelimited-∥∥subscript𝐺𝑋𝑌subscript𝑥𝑖subscript𝐺𝑋𝑌subscript𝑥𝑗1subscript𝜇𝑌\begin{split}\mathcal{L}_{dis}(G_{XY},X,Y)&=\mathbb{E}_{x_{i},x_{j}\sim P_{X}}[|\phi(x_{i},x_{j})-\psi(x_{i},x_{j})|],\\\phi(x_{i},x_{j})&=\frac{1}{\sigma_{X}}(\|x_{i}-x_{j}\|_{1}-\mu_{X}),\\\psi(x_{i},x_{j})&=\frac{1}{\sigma_{Y}}(\|G_{XY}(x_{i})-G_{XY}(x_{j})\|_{1}-\mu_{Y}),\end{split}(2)where μXsubscript𝜇𝑋\mu_{X}, μYsubscript𝜇𝑌\mu_{Y} (σXsubscript𝜎𝑋\sigma_{X}, σYsubscript𝜎𝑌\sigma_{Y}) are the means (standard deviations) of distances of all the possible pairs of (xi,xj)subscript𝑥𝑖subscript𝑥𝑗(x_{i},x_{j}) within domain 𝒳𝒳\mathcal{X} and (yi,yj)subscript𝑦𝑖subscript𝑦𝑗(y_{i},y_{j}) within domain 𝒴𝒴\mathcal{Y}, respectively, and are precomputed. Distance preservation makes one-sided unsupervised domain mapping possible.
|
| 28 |
+
|
| 29 |
+
Adversarial constraint. Taking GXYsubscript𝐺𝑋𝑌G_{XY} as an example, an adversarial loss ℒgan(GXY,DY,X,Y)subscriptℒ𝑔𝑎𝑛subscript𝐺𝑋𝑌subscript𝐷𝑌𝑋𝑌\mathcal{L}_{gan}(G_{XY},D_{Y},X,Y) [19] enforces GXYsubscript𝐺𝑋𝑌G_{XY} and DYsubscript𝐷𝑌D_{Y} to simultaneously optimize each other in an minimax game, i.e., minGXYmaxDYℒgan(GXY,DY,X,Y)subscriptminsubscript𝐺𝑋𝑌subscriptmaxsubscript𝐷𝑌subscriptℒ𝑔𝑎𝑛subscript𝐺𝑋𝑌subscript𝐷𝑌𝑋𝑌\text{min}_{G_{XY}}\text{max}_{D_{Y}}\mathcal{L}_{gan}(G_{XY},D_{Y},X,Y). In other words, DYsubscript𝐷𝑌D_{Y} aims to distinguish real examples {y}𝑦\{y\} from translated samples {GXY(x)}subscript𝐺𝑋𝑌𝑥\{G_{XY}(x)\}. By contrast, GXYsubscript𝐺𝑋𝑌G_{XY} aims to fool DYsubscript𝐷𝑌D_{Y} so that DYsubscript𝐷𝑌D_{Y} can label a fake example y′=GXY(x)superscript𝑦′subscript𝐺𝑋𝑌𝑥y^{\prime}=G_{XY}(x) as a sample satisfying y′∼PYsimilar-tosuperscript𝑦′subscript𝑃𝑌y^{\prime}\sim P_{Y}. The objective can be expressed as:ℒgan(GXY,DY,X,Y)=𝔼y∼PY[logDY(y)]+𝔼x∼PX[log(1−DY(GXY(x)))].subscriptℒ𝑔𝑎𝑛subscript𝐺𝑋𝑌subscript𝐷𝑌𝑋𝑌subscript𝔼similar-to𝑦subscript𝑃𝑌delimited-[]subscript𝐷𝑌𝑦subscript𝔼similar-to𝑥subscript𝑃𝑋delimited-[]1subscript𝐷𝑌subscript𝐺𝑋𝑌𝑥\begin{split}\mathcal{L}_{gan}(G_{XY},D_{Y},X,Y)&=\mathbb{E}_{y\sim P_{Y}}[\log D_{Y}(y)]\\&\quad+\mathbb{E}_{x\sim P_{X}}[\log(1-D_{Y}(G_{XY}(x)))].\end{split}(3)In the transformed domains 𝒳~~𝒳\tilde{\mathcal{X}} and 𝒴~~𝒴\tilde{\mathcal{Y}}, we employ the adversarial loss ℒgan(GX~Y~,DY~,X~,Y~)subscriptℒ𝑔𝑎𝑛subscript𝐺~𝑋~𝑌subscript𝐷~𝑌~𝑋~𝑌\mathcal{L}_{gan}(G_{\tilde{X}\tilde{Y}},D_{\tilde{Y}},\tilde{X},\tilde{Y}) that has the same form to ℒgan(GXY,DY,X,Y)subscriptℒ𝑔𝑎𝑛subscript𝐺𝑋𝑌subscript𝐷𝑌𝑋𝑌\mathcal{L}_{gan}(G_{XY},D_{Y},X,Y).
|
| 30 |
+
|
| 31 |
+
Geometry-consistency constraint. As shown in Figure 2 (GcGAN), given a predefined geometric transformation function f(⋅)𝑓⋅f(\cdot), we feed the images x∈X𝑥𝑋x\in X and x~=f(x)~𝑥𝑓𝑥\tilde{x}=f(x) into the translators GXYsubscript𝐺𝑋𝑌G_{XY} and GX~Y~subscript𝐺~𝑋~𝑌G_{\tilde{X}\tilde{Y}}, respectively. Following our geometry-consistency constraint, the outputs y′=GXY(x)superscript𝑦′subscript𝐺𝑋𝑌𝑥y^{\prime}=G_{XY}(x) and y~′=GX~Y~(x~)superscript~𝑦′subscript𝐺~𝑋~𝑌~𝑥\tilde{y}^{\prime}=G_{\tilde{X}\tilde{Y}}(\tilde{x}) should also satisfy y~′≈f(y′)superscript~𝑦′𝑓superscript𝑦′\tilde{y}^{\prime}\approx f(y^{\prime}) like x𝑥x and x~~𝑥\tilde{x}. Considering both f(⋅)𝑓⋅f(\cdot) and the inverse geometric transformation function f−1(⋅)superscript𝑓1⋅f^{-1}(\cdot), our complete geometry consistency loss ℒgeo(GXY,GX~Y~,X,Y)subscriptℒ𝑔𝑒𝑜subscript𝐺𝑋𝑌subscript𝐺~𝑋~𝑌𝑋𝑌\mathcal{L}_{{geo}}(G_{XY},G_{\tilde{X}\tilde{Y}},X,Y) has the following form:ℒgeo(GXY,GX~Y~,X,Y)=𝔼x∼PX[‖GXY(x)−f−1(GX~Y~(f(x)))‖1]+𝔼x∼PX[‖GX~Y~(f(x))−f(GXY(x))‖1].subscriptℒ𝑔𝑒𝑜subscript𝐺𝑋𝑌subscript𝐺~𝑋~𝑌𝑋𝑌subscript𝔼similar-to𝑥subscript𝑃𝑋delimited-[]subscriptdelimited-∥∥subscript𝐺𝑋𝑌𝑥superscript𝑓1subscript𝐺~𝑋~𝑌𝑓𝑥1subscript𝔼similar-to𝑥subscript𝑃𝑋delimited-[]subscriptdelimited-∥∥subscript𝐺~𝑋~𝑌𝑓𝑥𝑓subscript𝐺𝑋𝑌𝑥1\begin{split}\mathcal{L}_{{geo}}(G_{XY},G_{\tilde{X}\tilde{Y}},X,Y)&=\mathbb{E}_{x\sim P_{X}}[\|G_{XY}(x)-f^{-1}(G_{\tilde{X}\tilde{Y}}(f(x)))\|_{1}]\\&\quad+\mathbb{E}_{x\sim P_{X}}[\|G_{\tilde{X}\tilde{Y}}(f(x))-f(G_{XY}(x))\|_{1}].\end{split}(4)This geometry-consistency loss can be seen as a reconstruction loss that relies on the predefined geometric transformation function f(⋅)𝑓⋅f(\cdot).In this paper, we only take two common geometric transformations as examples, namely vertical flipping (vf) and 90°90° clockwise rotation (rot), to demonstrate the effectiveness of our geometry-consistency constraint. Note that, GXYsubscript𝐺𝑋𝑌G_{XY} and GX~Y~subscript𝐺~𝑋~𝑌G_{\tilde{X}\tilde{Y}} have the same architecture and share all the parameters.
|
| 32 |
+
|
| 33 |
+
Full objective. By combining our geometry-consistency constraint with the standard adversarial constraint, a remarkable one-sided unsupervised domain mapping can be targeted. The full objective for our GcGAN ℒGcGAN(GXY,GX~Y~,DY,DY~,X,Y)subscriptℒ𝐺𝑐𝐺𝐴𝑁subscript𝐺𝑋𝑌subscript𝐺~𝑋~𝑌subscript𝐷𝑌subscript𝐷~𝑌𝑋𝑌\mathcal{L}_{GcGAN}(G_{XY},G_{\tilde{X}\tilde{Y}},D_{Y},D_{\tilde{Y}},X,Y) will be:ℒGcGAN(GXY,GX~Y~,DY,DY~,X,Y)=ℒgan(GXY,DY,X,Y)+ℒgan(GX~Y~,DY~,X,Y)+λℒgeo(GXY,GX~Y~,X,Y),subscriptℒ𝐺𝑐𝐺𝐴𝑁subscript𝐺𝑋𝑌subscript𝐺~𝑋~𝑌subscript𝐷𝑌subscript𝐷~𝑌𝑋𝑌subscriptℒ𝑔𝑎𝑛subscript𝐺𝑋𝑌subscript𝐷𝑌𝑋𝑌subscriptℒ𝑔𝑎𝑛subscript𝐺~𝑋~𝑌subscript𝐷~𝑌𝑋𝑌𝜆subscriptℒ𝑔𝑒𝑜subscript𝐺𝑋𝑌subscript𝐺~𝑋~𝑌𝑋𝑌\begin{split}\mathcal{L}_{GcGAN}(G_{XY},G_{\tilde{X}\tilde{Y}},D_{Y},D_{\tilde{Y}},X,Y)&=\mathcal{L}_{gan}(G_{XY},D_{Y},X,Y)\\&\quad+\mathcal{L}_{gan}(G_{\tilde{X}\tilde{Y}},D_{\tilde{Y}},X,Y)\\&\quad+\lambda\mathcal{L}_{geo}(G_{XY},G_{\tilde{X}\tilde{Y}},X,Y),\end{split}(5)where λ𝜆\lambda (λ=20.0𝜆20.0\lambda=20.0 in all the experiments) is a trade-off hyperparameter to weight the contribution of ℒgansubscriptℒ𝑔𝑎𝑛\mathcal{L}_{gan} and ℒgeosubscriptℒ𝑔𝑒𝑜\mathcal{L}_{geo} during the model training. Because that we do not make great effects to choose λ𝜆\lambda, heavily tuning λ𝜆\lambda may give preferable results to specific translation tasks.
|
| 34 |
+
|
| 35 |
+
Network architecture.The full framework of our GcGAN is illustrated in Figure 2. Our experimental settings, network architectures, and learning strategies follow CycleGAN. We employ the same discriminator and generator as CycleGAN depending on the specific tasks. Specifically, the generator is a standard encoder-decoder, where the encoder contains two convolutional layers with stride 2 and several residual blocks [20] (6 / 9 blocks with respect to 128×128128128128\times 128 / 256×256256256256\times 256 of input resolution), and the decoder contains two deconvolutional layers also with stride 2. The discriminator distinguishes images at the patch level following PatchGANs [24, 31]. Like CycleGAN, we also use an identity mapping loss [52] in all of our experiments (except SVHN →→\to MNIST), including our baseline (GAN alone). For other details, we use LeakyReLU as nonlinearity for the discriminators and instance normalization [54] to normalize convolutional feature maps.
|
| 36 |
+
|
| 37 |
+
Learning and inference.We use the Adam solver [27] with a learning rate of 0.00020.00020.0002 and coefficients of (0.5, 0.999), where the latter is used to compute running averages of gradients and their squares. The learning rate is fixed in the initial 100 epochs, and linearly decays to zero over the next 100 epochs. Following CycleGAN, the negative log likelihood objective is replaced with a more stable and effective least-squares loss [40] for ℒgansubscriptℒ𝑔𝑎𝑛\mathcal{L}_{gan}. The discriminator is updated with random samples from a history of generated images stored in an image buffer [51] of size 50. The generator and discriminator are optimized alternately. In the inference phase, we feed an image only into the learned generator GXYsubscript𝐺𝑋𝑌G_{XY} to obtain a translated image.
|
| 38 |
+
|
| 39 |
+
We apply our GcGAN to a wide range of applications and make both quantitative and qualitative comparisons with the baseline (GAN alone) and previous state-of-the-art methods including DistanceGAN and CycleGAN. We also study different ablations (based on rot) to analyze our geometry-consistency constraint. Since adversarial networks are not always stable, every independent experiment could result in slightly different scores. The scores in the quantitative analysis are computed by the average on three independent experiments.
|
| 40 |
+
|
| 41 |
+
The results demonstrate that our geometry-consistency constraint can not only partially filter out the candidate solutions having mode collapse or semantic distortions and thus produce more sensible translations, but also compatible with other unsupervised constraints such as cycle consistency [62] and distance preservation [5].
|
| 42 |
+
|
| 43 |
+
Cityscapes. Cityscapes [12] contains 3975 image-label pairs, with 2975 used for training and 500 for validation (test in this paper). For a fair comparison with CycleGAN, the translators are trained at a resolution of 128×128128128128\times 128 in an unaligned fashion. We evaluate our domain mappers using FCN scores and scene parsing metrics following previous works [38, 12, 62]. Specifically, for parsing →→\to image, we assume that a high-quality translated image should produce qualitative semantic segmentation like real images when feeding it into a scene parser. Thus, we employ the pretrained FCN-8s [38] provided by pix2pix [24] to predict semantic labels for the 500 translated images. The label maps are then resized to the original resolution of 1024×2048102420481024\times 2048 and compared against the ground truth labels using some standard scene parsing metrics including pixel accuracy, class accuracy, and mean IoU [38]. For image →→\to parsing, since the fake labels are in the RGB format, we simply convert them into class-level labels using the nearest neighbor search strategy. In particular, we have 19 (category labels) ++ 1 (ignored label) categories for Cityscapes, each with a corresponding color value (RGB). For a pixel i𝑖i in a translated parsing, we compute the distances between the 20 groundtruth color values and the color value of pixel i𝑖i. The label of pixel i𝑖i should be the one with the smallest distance. Then, the aforementioned metrics are used to evaluate our mapping on the 19 category labels.
|
| 44 |
+
|
| 45 |
+
The parsing scores for both image →→\to parsing and parsing →→\to image tasks are presented in Table 1. Our GcGAN outperforms the baseline (GAN alone) by a large margin.We take the average of pixel accuracy, class accuracy, and mean IoU as the final score for analysis [61], i.e., score=(pixel acc+class acc+mean IoU)/3scorepixel accclass accmean IoU3\text{score}=(\text{pixel acc}+\text{class acc}+\text{mean IoU})/3. For image →→\to parsing, GcGAN (32.6%percent32.632.6\%) yields a slightly higher score than CycleGAN (32.0%percent32.032.0\%). For parsing →→\to image, GcGAN (29.0%∼29.5%similar-topercent29.0percent29.529.0\%\sim 29.5\%) obtains a convincing improvement of 1.3%∼1.8%similar-topercent1.3percent1.81.3\%\sim 1.8\% over the state-of-the-art approach distanceGAN (27.7%percent27.727.7\%).
|
| 46 |
+
|
| 47 |
+
We next perform ablation studies to investigate the robustness and compatibility of GcGAN, including GcGAN-rot-Seperate, GcGAN-Mix, and GcGAN-rot + Cycle. The scores are reported in Table 1. Specifically, GcGAN-rot-Seperate shows that the generator GXYsubscript𝐺𝑋𝑌G_{XY} employed in GcGAN is sufficient to handle both the style transfers (without shape deformation) X→Y→𝑋𝑌X\to Y and X~→Y~→~𝑋~𝑌\tilde{X}\to\tilde{Y}. GcGAN-Mix demonstrates that persevering a geometric transformation can filter out most of the candidate solutions having mode collapse or undesired shape deformation, but preserving more ones can not leach more. For GcGAN-rot + Cycle, we set the trade-off parameter for ℒcycsubscriptℒ𝑐𝑦𝑐\mathcal{L}_{cyc} to 10.010.010.0 as published in CycleGAN. The consistent improvement is a credible support that our geometry-consistency constraint is compatible with the widely-used cycle-consistency constraint.
|
| 48 |
+
|
| 49 |
+
SVHN →→\to MNIST. We then apply our approach to the SVHN →→\to MNIST translation task. The translation models are trained on 73257 and 60000 training images of resolution 32×32323232\times 32 contained in the SVHN and MNIST training sets, respectively. The experimental settings follow DistanceGAN [5], including the default trade-off parameters for ℒcycsubscriptℒ𝑐𝑦𝑐\mathcal{L}_{cyc} and ℒdissubscriptℒ𝑑𝑖𝑠\mathcal{L}_{dis}, and the network architectures for the generators and the discriminators. We compare our GcGAN with both DistanceGAN and CycleGAN in this translation task. To obtain quantitative results, we feed the translated images into a pretrained classifier trained on the MNIST training split, as done in [5]. Note that, the experimental settings for domain mapping (GcGAN) and domain adaptation are totally different, so is the captured classification accuracy. Domain adaptation methods have access to the source domain digit labels while image translation does not.
|
| 50 |
+
|
| 51 |
+
Classification accuracies are reported in Table 2. Both GcGAN-rot and GcGAN-vf outperform DistanceGAN and CycleGAN by a large margin (about 6%∼7%similar-topercent6percent76\%\sim 7\%). From the ablations, adding our geometry-consistency constraint to current unsupervised domain mapping frameworks will achieve different levels of improvements against the original ones. Note that, it seems that the distance-preservation constraint is not compatible with the cycle-consistency constraint, but our geometry-consistency constraint can improve both ones.
|
| 52 |
+
|
| 53 |
+
Google Maps. We obtain 2194 (map,aerial photo)mapaerial photo(\text{map},\text{aerial photo}) pairs of images in and around New York City from Google Maps [24], and split them into training and test sets with 1096 and 1098 pairs, respectively. We train Map ⇌⇌\rightleftharpoons Aerial photo translators with an image size of 256×256256256256\times 256 using the training set in an unsupervised manner (unpaired) by ignoring the pair information. For Aerial photo →→\to Map, we make comparisons with CycleGAN using average RMSE and pixel accuracy (%percent\%). Given a pixel i𝑖i with the ground-truth RGB value (ri,gi,bi)subscript𝑟𝑖subscript𝑔𝑖subscript𝑏𝑖(r_{i},g_{i},b_{i}) and the predicted RGB value (ri′,gi′,bi′)subscriptsuperscript𝑟′𝑖subscriptsuperscript𝑔′𝑖subscriptsuperscript𝑏′𝑖(r^{\prime}_{i},g^{\prime}_{i},b^{\prime}_{i}), if max(|ri−ri′|,|gi−gi′|,|bi−bi′|)<δ𝑚𝑎𝑥subscript𝑟𝑖subscriptsuperscript𝑟′𝑖subscript𝑔𝑖subscriptsuperscript𝑔′𝑖subscript𝑏𝑖subscriptsuperscript𝑏′𝑖𝛿max(|r_{i}-r^{\prime}_{i}|,|g_{i}-g^{\prime}_{i}|,|b_{i}-b^{\prime}_{i}|)<\delta, we consider this is an accurate prediction. Since maps only contain a limited number of different RGB values, it is reasonable to compute pixel accuracy using this strategy (δ1=5subscript𝛿15\delta_{1}=5 and δ2=10subscript𝛿210\delta_{2}=10 in this paper). For Map →→\to Aerial photo, we only show some qualitative results in Figure 3.
|
| 54 |
+
|
| 55 |
+
From the scores presented in Table 3, it can be seen that GcGAN produces superior translations to the baseline (GAN alone). In particular, GcGAN yields an 18.0%∼21.9%similar-topercent18.0percent21.918.0\%\sim 21.9\% improvement over the baseline with respect to pixel accuracy when δ=5.0𝛿5.0\delta=5.0, demonstrating that the fake maps obtained by our GcGAN contain more details. In addition, our one-sided GcGANs achieve competitive even slightly better scores compared with the two-sided CycleGAN.
|
| 56 |
+
|
| 57 |
+
The qualitative results are shown in Figure 3, Figure 4, and Figure 5. While GAN alone suffers from mode collapse, our geometry-consistency constraint can provide an effective remedy, thus helps to generate empirically more impressive translations on various applications. The following applications are trained in the image size of 256×256256256256\times 256 with the rot geometric transformation.
|
| 58 |
+
|
| 59 |
+
Horse →→\to Zebra. We apply GcGAN to the widely studied object transfiguration application task, i.e., Horse →→\to Zebra. The images are randomly sampled from ImageNet [13] using the keywords (i.e., wild horse and zebra). The numbers of training images are 939 and 1177 for horse and zebra, respectively. We find that training GcGAN without parameter sharing would produce preferable translations for the task.
|
| 60 |
+
|
| 61 |
+
Synthetic ⇌⇌\rightleftharpoons Real. We employ the 2975 training images from Cityscapes as the real-world scenes, and randomly select 3060 images from SYNTHIA-CVPR16 [46], which is a virtual urban scene benchmark, as the synthetic images.
|
| 62 |
+
|
| 63 |
+
Summer ⇌⇌\rightleftharpoons Winter. The images used for the season translation tasks are provided by CycleGAN. The training set sizes for Summer and Winter are 1273 and 854.
|
| 64 |
+
|
| 65 |
+
Photo ⇌⇌\rightleftharpoons Artistic Painting. We translate natural images to artistic paintings with different art styles, including Monet, Cezanne, Van Gogh, and Ukiyo-e. We also perform GcGAN on the translation task of Monet’s paintings →→\to photographs. We use the photos and paintings (Monet: 1074, Cezanne: 584, Van Gogh: 401, Ukiyo-e: 1433, and Photographs: 6853) collected by CycleGAN for training.
|
| 66 |
+
|
| 67 |
+
Day ⇌⇌\rightleftharpoons Night. We randomly extract 4500 training images for both Day and Night from the 91 webcam sequences captured by [28].
|
| 68 |
+
|
| 69 |
+
In this paper, we propose to enforce geometry consistency as a constraint, which can be viewed as a predefined geometric transformation f(⋅)𝑓⋅f(\cdot) preserving the geometry of a scene for unsupervised domain mapping. The geometry-consistency constraint makes the translation networks on the original images and transformed images co-regularize each other, which not only provides an effective remedy to the mode collapse problem suffered by standard GANs, but also reduces the semantic distortions in the translation. We evaluate our model, i.e., the geometry-consistent generative adversarial network (GcGAN), both qualitatively and quantitatively in various applications. Our experimental results demonstrate that GcGAN achieves competitive and sometimes even better translations than the state-of-the-art methods including DistanceGAN and CycleGAN. Finally, our geometry-consistency constraint is compatible with other well-studied unsupervised constraints.
|
1809.05870v1.txt
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Linear Dynamical Systems (LDS) are a key standard tool in modeling andforecasting time series, with an exceedingly large number of applications.In forecasting with an LDS, typically one learns the parameters of the LDSfirst, using a maximum likelihood principle, and then uses Kalmanfilter to generate predictions. The two features that seem to contributethe most to the success of LDS in practice are the ability ofLDS to model a wide range of behaviors, and the recursive nature ofKalman filter, which allows for fast, real-time forecasts viaa constant-time update of the previous estimate.On the other hand, a major difficulty with LDSs is that the process oflearning system parameters, via expectation maximization (EM) or directlikelihood optimization, may be time consuming and prone to getting stuck in local maxima.We refer toAnderson and Moore (1979); West and Harrison (1997); Hamilton (1994); Chui and Chen (2017)for book-length introductions.
|
| 2 |
+
|
| 3 |
+
Recently, there has been an interest in alternative,improper learning approaches, where one approximates thepredictions of LDSs by a linear function ofa few past observations. The advantage of such approaches is that itconvexifies the problem, i.e., learning the linear function amounts to aconvex problem, which avoids the issues brought by the non-convex natureof the likelihood function. The convexification allows for on-linealgorithms, which are typically fast and simple. A crucial advance ofthese recent approaches is the guarantee that the predictionsof the convexified, improper-learning algorithm are at least as good as thepredictions of the proper one. One therefore avoids the long learningtimes and issues related to non-convexity associated with the classical algorithms, whilemaintaining the statistical performance.
|
| 4 |
+
|
| 5 |
+
Leading examples of this approachAnava et al. (2013); Liu et al. (2016); Hazan, Singh, andZhang (2017)utilise a frameworkof regret bounds Cesa-Bianchi andLugosi (2006)to provide guarantees on the performance of the convexifications.In this framework, one considers a sequence of observations Ytsubscript𝑌𝑡Y_{t}, with orwithout additional assumptions. After observing Y0,…,Ytsubscript𝑌0…subscript𝑌𝑡Y_{0},\ldots,Y_{t}, analgorithm for improper learning produces a forecast Y^t+1subscript^𝑌𝑡1\hat{Y}_{t+1} ofthe next observation.Then, roughly speaking,one shows that the sum of errors of the forecast thus producedis close to the sum of errors of the best model (in hindsight)from within a certain class. It is said that the algorithm competesagainst a certain class.
|
| 6 |
+
|
| 7 |
+
In this paper, we take several steps towards developing guarantees for analgorithm, which competes against Kalman filters.Specifically, we ask what conditions make it possible to model thepredictions of Kalman filteras a regression of a few past observations?We show that for a natural, large, and well-knownclass of LDSs, the observable LDSs,the dependence of Kalman filter on the pastdecays exponentiallyif the process noise of the LDS isnon-degenerate.Consequently, predictions of such LDS can be modeledas auto-regressions.In addition, we show that at least some non-degeneracyof the process noise is necessary for the exponential decay. We provide an example with no process noise, where the dependence on the pastdoes not converge exponentially.
|
| 8 |
+
|
| 9 |
+
Next, based on the decay results, we give an on-linealgorithm for time-series prediction and prove regret bounds for it.The algorithm makes predictions in the formy^t+1=∑i=0s−1θi(t)Yt−isubscript^𝑦𝑡1superscriptsubscript𝑖0𝑠1subscript𝜃𝑖𝑡subscript𝑌𝑡𝑖\hat{y}_{t+1}=\sum_{i=0}^{s-1}\theta_{i}(t)Y_{t-i}, where Ytsubscript𝑌𝑡Y_{t}are observations, and θ(t)∈ℝs𝜃𝑡superscriptℝ𝑠\theta(t)\in\mathbb{R}^{s} is thevector of auto-regression (AR) coefficients, which is updated by the algorithm in an on-line manner.
|
| 10 |
+
|
| 11 |
+
For any LDS L𝐿L, denote by fL,t+1subscript𝑓𝐿𝑡1f_{L,t+1} the predicted value of Yt+1subscript𝑌𝑡1Y_{t+1} byKalman filter corresponding to L𝐿L, given Yt,…,Y0subscript𝑌𝑡…subscript𝑌0Y_{t},\ldots,Y_{0}.Denote by E(T)=∑t=1T−1|y^t+1−Yt+1|2𝐸𝑇superscriptsubscript𝑡1𝑇1superscriptsubscript^𝑦𝑡1subscript𝑌𝑡12E(T)=\sum_{t=1}^{T-1}\left|\hat{y}_{t+1}-Y_{t+1}\right|^{2}the total error made by the algorithm up to time T𝑇T, and byE(L,T)=∑t=1T−1|fL,t+1−Yt+1|2𝐸𝐿𝑇superscriptsubscript𝑡1𝑇1superscriptsubscript𝑓𝐿𝑡1subscript𝑌𝑡12E(L,T)=\sum_{t=1}^{T-1}\left|f_{L,t+1}-Y_{t+1}\right|^{2}the totalerror made by Kalman filter corresponding to L𝐿L.Let S𝑆S be any finite family of observable linear dynamical systems with non-degenerate process noise. We show that for an appropriate regression depth s𝑠s,for any bounded sequence {Yt}0Tsuperscriptsubscriptsubscript𝑌𝑡0𝑇\left\{Y_{t}\right\}_{0}^{T} we have1TE(T)≤1TminL∈SE(L,T)+1TCS+ε,1𝑇𝐸𝑇1𝑇subscript𝐿𝑆𝐸𝐿𝑇1𝑇subscript𝐶𝑆𝜀\frac{1}{T}E(T)\leq\frac{1}{T}\min_{L\in S}E(L,T)+\frac{1}{T}C_{S}+\varepsilon,(1)where CSsubscript𝐶𝑆C_{S} is a constant depending on the family S𝑆S.In words, up to an arbitrarily small ε𝜀\varepsilon given in advance, the average prediction error of the algorithm is as good orbetter than the average prediction error of the best Kalmanfilter in S𝑆S. We emphasize that while there is a dependence on S𝑆S in thebounds, via the constant CSsubscript𝐶𝑆C_{S}, the algorithm itself depends on S𝑆Sonly through the regression depth s𝑠s. In particular, the algorithm doesnot depend on the cardinality of S𝑆S, and the time complexity of eachiteration is O(s)𝑂𝑠O(s).
|
| 12 |
+
|
| 13 |
+
To summarize, our contributions are as follows:We show that the dependence of predictions of Kalman filters in asystem with non-degenerate process noise is exponentially decaying and thattherefore Kalman filters may be approximated by regressions on afew recent observations, cf. Theorem 2.We also show that the process noise is essential for theexponential decay. We given an on-line prediction algorithm and prove thefirst regret bounds against Kalman filters, cf. Theorem6.Experimentally, we illustrate the performance on a single example in themain body of the text, and further examples in the supplementary material.
|
| 14 |
+
|
| 15 |
+
In this section, we review the relevant literature and place the currentwork in context.
|
| 16 |
+
|
| 17 |
+
We refer to Hamilton (1994) for an exposition on LDSs, Kalmanfilter, and the classical approach to learning the LDS parameters via thamaximum likelihood optimization. See also Roweis and Ghahramani (1999) for a surveyof relations between LDSs and a large variety of other probabilisticmodels.A general exposition of on-line learning can be found inHazan (2016).
|
| 18 |
+
|
| 19 |
+
As discussed in the Introduction, we are concerned with improper learning, where we show that an alternative model can be shown to generate forecasts that are as good as Kalman filter, up to any given error. Perhaps the first example of animproper learning that is still used today is themoving average, or the exponential moving averageGardner . In this approach,predictions for a process – of a possibly complex nature – are madeusing a simple auto-regressive (AR) or AR-like model.This is very successful in a multitude of engineering applications.Nevertheless, until recently, there were very few guarantees for theperformance of such methods.
|
| 20 |
+
|
| 21 |
+
In Anava et al. (2013), the first guarantees regardingprediction of a (non-AR) subset of auto-regressive moving-average (ARMA) processes by AR processes were given, together with an algorithm for finding theappropriate AR. In Liu et al. (2016), these results were extended toa subset of autoregressive integrated moving average (ARIMA) processes, while at the same time the assumptions on the underlying ARMA model were relaxed.
|
| 22 |
+
|
| 23 |
+
In this paper, we show that AR modelsmay also be used to forecast as well as Kalman filters.One major difference between our results and the previous work is that weobtain approximation results on arbitrary bounded sequences.Indeed, regret results of Anava et al. (2013) and Liu et al. (2016) only holdunder the assumption that the data sequence was generated by aparticular fixed ARMA or ARIMA process. Moreover, the constants in theregret bounds of Anava et al. (2013) and Liu et al. (2016) depend on the generating model, and the guaranteed convergence may be arbitrarily slow, even when the sequence to forecast is generated by appropriate model.
|
| 24 |
+
|
| 25 |
+
In contrast, we show that up to an arbitrarily small error given inadvance, AR(s𝑠s) will perform as well as Kalman filter on any boundedsequence. We also obtain approximation results in the more generalcase of bounded difference sequences.
|
| 26 |
+
|
| 27 |
+
Another related work is Hazan, Singh, andZhang (2017), which addresses adifferent aspect of LDS approximation by ARs. In the case of LDSs withinputs, building on known eigenvalue-decay estimates of Hankelmatrices, it is shown that the influence of all past inputsmay be effectively approximated by an AR-type model.However, the arguments and the algorithms in Hazan, Singh, andZhang (2017) werenot designed to address model noise. In particular,the algorithm of Hazan, Singh, andZhang (2017) makes predictions based on thewhole history of inputs and on only one most recent observation, Ytsubscript𝑌𝑡Y_{t},and hence clearly can not compete with Kalman filters in situations withno inputs. We demonstrate this in the Experiments section.
|
| 28 |
+
|
| 29 |
+
Also, note that while on-line gradient descent (OGD) is used throughout much recent work in forecastingAnava et al. (2013); Hazan, Singh, andZhang (2017); Liu et al. (2016), there are important differences in the per-iteration run-time, as well as the problems solved. For example, the OGD of Hazan, Singh, andZhang (2017) requires O(t3)𝑂superscript𝑡3O(t^{3}) operations to forecast at time t𝑡t, as it does consider the whole history of t𝑡t inputs and an eigen-decomposition of an t×t𝑡𝑡t\times t matrix at each time t𝑡t, although this could be pre-computed.Our Algorithm 1 has a liner per-iteration complexity in the regression depth s���s, which can be as small as s=1𝑠1s=1. Notably, its run-time at time t𝑡t does not depend on time t𝑡t.
|
| 30 |
+
|
| 31 |
+
As usual in the literature West and Harrison (1997), we define a linear system L=(G,F,v,W)𝐿𝐺𝐹𝑣𝑊L=(G,F,v,W) as:
|
| 32 |
+
|
| 33 |
+
ϕt=Ght−1+ωtsubscriptitalic-ϕ𝑡𝐺subscriptℎ𝑡1subscript𝜔𝑡\displaystyle\phi_{t}=Gh_{t-1}+\omega_{t}(2)Yt=F′ϕt+νt,subscript𝑌𝑡superscript𝐹′subscriptitalic-ϕ𝑡subscript𝜈𝑡\displaystyle Y_{t}=F^{\prime}\phi_{t}+\nu_{t},(3)
|
| 34 |
+
|
| 35 |
+
where Ytsubscript𝑌𝑡Y_{t} are scalar observations, and ϕt∈ℝn×1subscriptitalic-ϕ𝑡superscriptℝ𝑛1\phi_{t}\in\mathbb{R}^{n\times 1}is the hidden state. G∈ℝn×n𝐺superscriptℝ𝑛𝑛G\in\mathbb{R}^{n\times n} is the state transitionmatrix which defines the system dynamics, and F∈ℝn×1𝐹superscriptℝ𝑛1F\in\mathbb{R}^{n\times 1}is the observation direction. The process-noise terms ωtsubscript𝜔𝑡\omega_{t}and observation-noise terms νtsubscript𝜈𝑡\nu_{t} are mean zero normal independentvariables. For all t≥1𝑡1t\geq 1 the covariance of ωtsubscript𝜔𝑡\omega_{t} isW𝑊W and the variance of νtsubscript𝜈𝑡\nu_{t} is v𝑣v. The initial state ϕ0subscriptitalic-ϕ0\phi_{0} is anormal random variable with mean m0subscript𝑚0m_{0} and covariance C0subscript𝐶0C_{0}.
|
| 36 |
+
|
| 37 |
+
For t≥1𝑡1t\geq 1 denotemt=𝔼(ϕt|Y0,…,Yt),subscript𝑚𝑡𝔼conditionalsubscriptitalic-ϕ𝑡subscript𝑌0…subscript𝑌𝑡m_{t}=\mathbb{E}\left(\phi_{t}|Y_{0},\ldots,Y_{t}\right),(4)and let Ctsubscript𝐶𝑡C_{t} be the covariance matrix of ϕtsubscriptitalic-ϕ𝑡\phi_{t} givenY0,…,Ytsubscript𝑌0…subscript𝑌𝑡Y_{0},\ldots,Y_{t}. Note that mtsubscript𝑚𝑡m_{t} is the estimate of the current hiddenstate, given the observations. Further, the central quantity of this paperisft+1=𝔼(Yt+1|Yt,…,Y0)=F′Gmt.subscript𝑓𝑡1𝔼conditionalsubscript𝑌𝑡1subscript𝑌𝑡…subscript𝑌0superscript𝐹′𝐺subscript𝑚𝑡f_{t+1}=\mathbb{E}\left(Y_{t+1}|Y_{t},\ldots,Y_{0}\right)=F^{\prime}Gm_{t}.(5)This is the forecast of the next observation, given the current data.The quantities mtsubscript𝑚𝑡m_{t} and ft+1subscript𝑓𝑡1f_{t+1} are known as Kalman Filter.In particular, in this paper we refer to the sequence ftsubscript𝑓𝑡f_{t} as theKalman filter associated with the LDS L=(G,F,v,W)𝐿𝐺𝐹𝑣𝑊L=(G,F,v,W).
|
| 38 |
+
|
| 39 |
+
The Kalman filter satisfies the following recursive update equations:Setatsubscript𝑎𝑡\displaystyle a_{t}=\displaystyle=Gmt−1𝐺subscript𝑚𝑡1\displaystyle Gm_{t-1}Rtsubscript𝑅𝑡\displaystyle R_{t}=\displaystyle=GCt−1G′+W𝐺subscript𝐶𝑡1superscript𝐺′𝑊\displaystyle GC_{t-1}G^{\prime}+WQtsubscript𝑄𝑡\displaystyle Q_{t}=\displaystyle=F′RtF+vsuperscript𝐹′subscript𝑅𝑡𝐹𝑣\displaystyle F^{\prime}R_{t}F+vAtsubscript𝐴𝑡\displaystyle A_{t}=\displaystyle=RtF/Qtsubscript𝑅𝑡𝐹subscript𝑄𝑡\displaystyle R_{t}F/Q_{t}Note that in this notation we haveft=F′at.subscript𝑓𝑡superscript𝐹′subscript𝑎𝑡f_{t}=F^{\prime}a_{t}.Then the update equations of Kalman filter are:mtsubscript𝑚𝑡\displaystyle m_{t}=\displaystyle=at+At(Yt−ft)=AtYt+(I−F⊗At)atsubscript𝑎𝑡subscript𝐴𝑡subscript𝑌𝑡subscript𝑓𝑡subscript𝐴𝑡subscript𝑌𝑡𝐼tensor-product𝐹subscript𝐴𝑡subscript𝑎𝑡\displaystyle a_{t}+A_{t}(Y_{t}-f_{t})=A_{t}Y_{t}+(I-F\otimes A_{t})a_{t}(6)Ctsubscript𝐶𝑡\displaystyle C_{t}=\displaystyle=Rt−AtQtAt′subscript𝑅𝑡subscript𝐴𝑡subscript𝑄𝑡subscriptsuperscript𝐴′𝑡\displaystyle R_{t}-A_{t}Q_{t}A^{\prime}_{t}(7)where x⊗ytensor-product𝑥𝑦x\otimes y is an ℝn×1→ℝn×1→superscriptℝ𝑛1superscriptℝ𝑛1\mathbb{R}^{n\times 1}\rightarrow\mathbb{R}^{n\times 1}operator which acts by z↦⟨z,x⟩y=yx′zmaps-to𝑧𝑧𝑥𝑦𝑦superscript𝑥′𝑧z\mapsto\left<z,x\right>y=yx^{\prime}z. The matrix ofx⊗ytensor-product𝑥𝑦x\otimes y is given by the outer product yx′𝑦superscript𝑥′yx^{\prime}, where x,y∈ℝn×1𝑥𝑦superscriptℝ𝑛1x,y\in\mathbb{R}^{n\times 1}.
|
| 40 |
+
|
| 41 |
+
An important property of Kalman Filter isthat while mtsubscript𝑚𝑡m_{t} depends on Y0,…,Ytsubscript𝑌0…subscript𝑌𝑡Y_{0},\ldots,Y_{t}, the covariance matrixCtsubscript𝐶𝑡C_{t} does not. Indeed, note that Rt,Qt,At,Ctsubscript𝑅𝑡subscript𝑄𝑡subscript𝐴𝑡subscript𝐶𝑡R_{t},Q_{t},A_{t},C_{t} are all deterministicsequences which do not depend on the observations.
|
| 42 |
+
|
| 43 |
+
We explicitly write the recurrence relation for Rtsubscript𝑅𝑡R_{t}:Rt+1=G(Rt−RtF⊗RtF⟨F,RtF⟩+v)G′+Wsubscript𝑅𝑡1𝐺subscript𝑅𝑡tensor-productsubscript𝑅𝑡𝐹subscript𝑅𝑡𝐹𝐹subscript𝑅𝑡𝐹𝑣superscript𝐺′𝑊R_{t+1}=G\left(R_{t}-\frac{R_{t}F\otimes R_{t}F}{\left<F,R_{t}F\right>+v}\right)G^{\prime}+W(8)Also write for convenienceat+1=Gmt=GAtYt+G(I−F⊗At)at.subscript𝑎𝑡1𝐺subscript𝑚𝑡𝐺subscript𝐴𝑡subscript𝑌𝑡𝐺𝐼tensor-product𝐹subscript𝐴𝑡subscript𝑎𝑡a_{t+1}=Gm_{t}=GA_{t}Y_{t}+G(I-F\otimes A_{t})a_{t}.(9)
|
| 44 |
+
|
| 45 |
+
A more explicit form of the prediction of Yt+1subscript𝑌𝑡1Y_{t+1} givenYt,…,Y0subscript𝑌𝑡…subscript𝑌0Y_{t},\ldots,Y_{0}, may be obtained byunrolling (6) and using (9):𝔼(Yt+1|Yt,…,Y0)𝔼conditionalsubscript𝑌𝑡1subscript𝑌𝑡…subscript𝑌0\displaystyle\mathbb{E}\left(Y_{t+1}|Y_{t},\ldots,Y_{0}\right)=\displaystyle=ft+1=F′at+1subscript𝑓𝑡1superscript𝐹′subscript𝑎𝑡1\displaystyle f_{t+1}=F^{\prime}a_{t+1}\quad\quad(10)=\displaystyle=F′GAtYt+F′G(I−F⊗At)atsuperscript𝐹′𝐺subscript𝐴𝑡subscript𝑌𝑡superscript𝐹′𝐺𝐼tensor-product𝐹subscript𝐴𝑡subscript𝑎𝑡\displaystyle F^{\prime}GA_{t}Y_{t}+F^{\prime}G(I-F\otimes A_{t})a_{t}(12)=\displaystyle=F′GAtYt+F′G(I−F⊗At)GAt−1Yt−1superscript𝐹′𝐺subscript𝐴𝑡subscript𝑌𝑡superscript𝐹′𝐺𝐼tensor-product𝐹subscript𝐴𝑡𝐺subscript𝐴𝑡1subscript𝑌𝑡1\displaystyle F^{\prime}GA_{t}Y_{t}+F^{\prime}G(I-F\otimes A_{t})GA_{t-1}Y_{t-1}+F′G(I−F⊗At)G(I−F⊗At−1)at−1.superscript𝐹′𝐺𝐼tensor-product𝐹subscript𝐴𝑡𝐺𝐼tensor-product𝐹subscript𝐴𝑡1subscript𝑎𝑡1\displaystyle+F^{\prime}G(I-F\otimes A_{t})G(I-F\otimes A_{t-1})a_{t-1}.
|
| 46 |
+
|
| 47 |
+
In general, set Zt=G(I−F⊗At)subscript𝑍𝑡𝐺𝐼tensor-product𝐹subscript𝐴𝑡Z_{t}=G(I-F\otimes A_{t}) and Z=G(I−F⊗A)𝑍𝐺𝐼tensor-product𝐹𝐴Z=G(I-F\otimes A).Chose and fix some s≥1𝑠1s\geq 1. Then for any t≥s+1𝑡𝑠1t\geq s+1,the expectation (10) has the form displayed inFigure 1.
|
| 48 |
+
|
| 49 |
+
Next, a linear system L=(G,F,v,W)𝐿𝐺𝐹𝑣𝑊L=(G,F,v,W) is said to be observable,West and Harrison (1997), ifspan{F,G′F,…,G′n−1F}=ℝn.span𝐹superscript𝐺′𝐹…superscriptsuperscript𝐺′𝑛1𝐹superscriptℝ𝑛\operatorname*{span}\left\{F,G^{\prime}F,\ldots,{G^{\prime}}^{n-1}F\right\}=\mathbb{R}^{n}.(14)Roughly speaking, the pair (G,F)𝐺𝐹(G,F) is observable if the state can berecovered from a sufficient number of observations, in a noiseless situation. Note thatif there were parts of the state that do not influence the observations,these parts would be irrelevant for forecast purposes. Thus we are onlyinterested in observable LDSs.
|
| 50 |
+
|
| 51 |
+
When L𝐿L is observable, it is known Harrison (1997) that the sequencesCt,Rt,Qt,Atsubscript𝐶𝑡subscript𝑅𝑡subscript𝑄𝑡subscript𝐴𝑡C_{t},R_{t},Q_{t},A_{t} converge. See also Anderson and Moore (1979); West and Harrison (1997).We denote the limits by C,R,Q𝐶𝑅𝑄C,R,Q and A𝐴Arespectively. Moreover, the limits satisfy the recursions as equalities. In particular we haveR=G(R−RF⊗RF⟨F,RF⟩+v)G′+W.𝑅𝐺𝑅tensor-product𝑅𝐹𝑅𝐹𝐹𝑅𝐹𝑣superscript𝐺′𝑊R=G\left(R-\frac{RF\otimes RF}{\left<F,RF\right>+v}\right)G^{\prime}+W.(15)
|
| 52 |
+
|
| 53 |
+
Finally, an operator P:ℝn→ℝn:𝑃→superscriptℝ𝑛superscriptℝ𝑛P:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n} isnon-negative, denoted L≥0𝐿0L\geq 0, if ⟨Px,x⟩≥0𝑃𝑥𝑥0\left<Px,x\right>\geq 0 forall x≠0𝑥0x\neq 0, and is positive, denoted P>0𝑃0P>0, if⟨Px,x⟩>0𝑃𝑥𝑥0\left<Px,x\right>>0 for all x≠0𝑥0x\neq 0. Note that W,Ct,Rt,C,R𝑊subscript𝐶𝑡subscript𝑅𝑡𝐶𝑅W,C_{t},R_{t},C,R areeither covariance matrices or limits of such matrices, and thus aresymmetric and non-negative.
|
| 54 |
+
|
| 55 |
+
In what follows, we denote by[x,y]=⟨Rx,y⟩,⟨⟨x,y⟩⟩=⟨Wx,y⟩formulae-sequence𝑥𝑦𝑅𝑥𝑦delimited-⟨⟩𝑥𝑦𝑊𝑥𝑦\left[x,y\right]=\left<Rx,y\right>,\hskip 5.69054pt\left<\left<x,y\right>\right>=\left<Wx,y\right>(16)the inner products induced by R𝑅R and W𝑊W on ℝnsuperscriptℝ𝑛\mathbb{R}^{n}, where R𝑅R is the limit of Rtsubscript𝑅𝑡R_{t} as described above.In particular, we set U=G′𝑈superscript𝐺′U=G^{\prime} and rewrite (15) as[x,y]=[Ux,Uy]−[Ux,F][Uy,F][F,F]+v+⟨⟨x,y⟩⟩.𝑥𝑦𝑈𝑥𝑈𝑦𝑈𝑥𝐹𝑈𝑦𝐹𝐹𝐹𝑣delimited-⟨⟩𝑥𝑦\left[x,y\right]=\left[Ux,Uy\right]-\frac{\left[Ux,F\right]{\left[Uy,F\right]}}{\left[F,F\right]+v}+\left<\left<x,y\right>\right>.(17)
|
| 56 |
+
|
| 57 |
+
Observe that since R=GCG′+W𝑅𝐺𝐶superscript𝐺′𝑊R=GCG^{\prime}+W, we have R≥W𝑅𝑊R\geq W, and in particularif W>0𝑊0W>0 then R>0𝑅0R>0. In other words, if W>0𝑊0W>0, then [⋅,⋅]⋅⋅\left[\cdot,\cdot\right] and ⟨⟨⋅,⋅⟩⟩delimited-⟨⟩⋅⋅\left<\left<\cdot,\cdot\right>\right> induce proper norms on ℝnsuperscriptℝ𝑛\mathbb{R}^{n}:[x,x]≥⟨⟨x,x⟩⟩>0 for all x≠0.𝑥𝑥delimited-⟨⟩𝑥𝑥0 for all x≠0\left[x,x\right]\geq\left<\left<x,x\right>\right>>0\mbox{ for all $x\neq 0$}.(18)
|
| 58 |
+
|
| 59 |
+
Next, consider the remainder term in the prediction equation(13), where we have replaced Zt−isubscript𝑍𝑡𝑖Z_{t-i} with their limit values Z𝑍Z:F′superscript𝐹′\displaystyle F^{\prime}(G(I−F⊗A))s+1at−ssuperscript𝐺𝐼tensor-product𝐹𝐴𝑠1subscript𝑎𝑡𝑠\displaystyle\left(G(I-F\otimes A)\right)^{s+1}a_{t-s}\quad\quad\quad=⟨F,(G(I−F⊗A))s+1at−s⟩absent𝐹superscript𝐺𝐼tensor-product𝐹𝐴𝑠1subscript𝑎𝑡𝑠\displaystyle=\left<F,\left(G(I-F\otimes A)\right)^{s+1}a_{t-s}\right>=⟨((I−A⊗F)U)s+1F,at−s⟩.absentsuperscript𝐼tensor-product𝐴𝐹𝑈𝑠1𝐹subscript𝑎𝑡𝑠\displaystyle=\left<\left((I-A\otimes F)U\right)^{s+1}F,a_{t-s}\right>.
|
| 60 |
+
|
| 61 |
+
Let us now state and prove the key result of this paper: if W>0𝑊0W>0, then((I−A⊗F)U)sFsuperscript𝐼tensor-product𝐴𝐹𝑈𝑠𝐹\left((I-A\otimes F)U\right)^{s}F converges to zero exponentially fastwith s𝑠s. The key to the proof will be to consider contractivityproperties with respect to the norm induced by [⋅,⋅]⋅⋅\left[\cdot,\cdot\right],rather than with respect to the the default inner product.
|
| 62 |
+
|
| 63 |
+
It is of interest to stress the fact that Theorem 1 doesnot assume any contractivity properties of G𝐺G. In particular,the very common assumption of the spectral radius of G𝐺G being boundedby 111 is not required.
|
| 64 |
+
|
| 65 |
+
Let us state and prove our main approximation result:
|
| 66 |
+
|
| 67 |
+
We first prove the bound on the remainder term in the prediction equation(13).
|
| 68 |
+
|
| 69 |
+
We now prove Theorem 2.
|
| 70 |
+
|
| 71 |
+
To conclude this section, we discuss the relation between exponentialconvergence and the non-degenerate noise assumption, W>0𝑊0W>0.Note that the crucial part of Theorem 1,inequality (26), holds if and only if we canguarantee that ⟨⟨x,x⟩⟩>0delimited-⟨⟩𝑥𝑥0\left<\left<x,x\right>\right>>0 for every x𝑥x for which[x,x]>0𝑥𝑥0\left[x,x\right]>0. In particular, this holds when W>0𝑊0W>0 – that is,the noise is full dimensional. We now demonstrate that at least somenoise is necessary for the exponential decay to hold.
|
| 72 |
+
|
| 73 |
+
Consider first a one dimensional example.
|
| 74 |
+
|
| 75 |
+
In this case, clearly the observations Ytsubscript𝑌𝑡Y_{t} are independent samplesof a fixed distribution with mean m0,truesubscript𝑚0𝑡𝑟𝑢𝑒m_{0,true} and variance v𝑣v.The Kalman filter in this situation is equivalent to a Bayesianmean estimator with prior distribution N(0,C0=1)𝑁0subscript𝐶01N(0,C_{0}=1). From generalconsiderations, it follows that Rt→R=0→subscript𝑅𝑡𝑅0R_{t}\rightarrow R=0 with t𝑡t. Indeed,if we start with C0=0subscript𝐶00C_{0}=0, then we have Rt=0subscript𝑅𝑡0R_{t}=0 for all t𝑡t.Since the limit R𝑅R does not depend on the initialization,Harrison (1997), we have R=0𝑅0R=0 for every initialization.As a side note, in this particular case it can be shown, either viathe Bayesian interpretation or directly, that Rtsubscript𝑅𝑡R_{t} decays as 1/t1𝑡1/t(that is, tRt→const→𝑡subscript𝑅𝑡𝑐𝑜𝑛𝑠𝑡tR_{t}\rightarrow const, with t𝑡t).Now, note that Zt=1−RtRt+v=vRt+v→1subscript𝑍𝑡1subscript𝑅𝑡subscript𝑅𝑡𝑣𝑣subscript𝑅𝑡𝑣→1Z_{t}=1-\frac{R_{t}}{R_{t}+v}=\frac{v}{R_{t}+v}\rightarrow 1,and that for any fixed j>0𝑗0j>0, At−j→0→subscript𝐴𝑡𝑗0A_{t-j}\rightarrow 0 as t𝑡t grows.Next, for fixed s>0𝑠0s>0, consider the prediction equation(13). On the one hand, we know that ft+1subscript𝑓𝑡1f_{t+1}converges to m0,true>0subscript𝑚0𝑡𝑟𝑢𝑒0m_{0,true}>0 in probability. This is clear for instancefrom the Bayesian estimator interpretation above. On the other hand,the coefficients of all Yt−jsubscript𝑌𝑡𝑗Y_{t-j} in (13) convergeto 00. It follows therefore, that the remainder term in(13), F′(∏i=0sZt−i)at−ssuperscript𝐹′superscriptsubscriptproduct𝑖0𝑠subscript𝑍𝑡𝑖subscript𝑎𝑡𝑠F^{\prime}\left(\prod_{i=0}^{s}Z_{t-i}\right)a_{t-s},converges in probability to m0,truesubscript𝑚0𝑡𝑟𝑢𝑒m_{0,true} as t→∞→𝑡t\rightarrow\infty. Inparticular, the remainder term does not converge to 00.This is in sharp contrast with the exponential convergence of this termto zero in the W>0𝑊0W>0 case, as given by Lemma 3.
|
| 76 |
+
|
| 77 |
+
The above example can be generalized as follows:
|
| 78 |
+
|
| 79 |
+
Considerations similar to those of the previous example imply that Rt→0→subscript𝑅𝑡0R_{t}\rightarrow 0 but ft+1subscript𝑓𝑡1f_{t+1} does not. Consequently, the remainder termwill not converge to zero.
|
| 80 |
+
|
| 81 |
+
In this section, we introduce our prediction algorithm and prove the associated regret bounds.Our on-line algorithm maintains astate estimate, which is represented by the regressioncoefficients θ∈ℝs𝜃superscriptℝ𝑠\theta\in\mathbb{R}^{s}, where s𝑠s is the regression depth, a parameter of the algorithm.At time step t𝑡t, the algorithm first produces a prediction of theobservation Ytsubscript𝑌𝑡Y_{t}, using the current state θ𝜃\theta and previousobservations, Yt−1,…,Y0subscript𝑌𝑡1…subscript𝑌0Y_{t-1},\ldots,Y_{0}.Specifically, we will predict Ytsubscript𝑌𝑡Y_{t} byy^t(θ)=∑i=0s−1θiYt−i−1.subscript^𝑦𝑡𝜃superscriptsubscript𝑖0𝑠1subscript𝜃𝑖subscript𝑌𝑡𝑖1\hat{y}_{t}(\theta)=\sum_{i=0}^{s-1}\theta_{i}Y_{t-i-1}.(45)After the prediction is made, the true observation Ytsubscript𝑌𝑡Y_{t} is revealed tothe algorithm, and a loss associated with the prediction is computed.Here we consider the quadratic loss for simplicity:We define ℓ(x,y)ℓ𝑥𝑦\ell(x,y) as (x−y)2superscript𝑥𝑦2(x-y)^{2}. The loss function at time t𝑡t will be given byℓt(θ):=ℓ(Yt,y^t(θ)).assignsubscriptℓ𝑡𝜃ℓsubscript𝑌𝑡subscript^𝑦𝑡𝜃\displaystyle\ell_{t}(\theta):=\ell(Y_{t},\hat{y}_{t}(\theta)).(46)In addition, the state is updated.We use the general scheme ofon-line gradient decent algorithms, Zinkevich (2003), where the update goes against the direction of the gradient of the current loss. In addition,it is useful to restrict the state to a bounded domain.We will usea Euclidean ball of radius D𝐷D as the domain, where D𝐷D is a parameter ofthe algorithm. We denote this domain by𝒟={x∈ℝs||x|≤D}𝒟conditional-set𝑥superscriptℝ𝑠𝑥𝐷\mathcal{D}=\left\{x\in\mathbb{R}^{s}\hskip 5.69054pt|\hskip 5.69054pt|x|\leq D\right\} and denote by π𝒟subscript𝜋𝒟\pi_{\mathcal{D}} the Euclidean projectiononto this domain.If the gradient step takes the state outside of the domain, the state isprojected back onto 𝒟𝒟\mathcal{D}.The pseudo-code is presented in Algorithm 1, where thegradient ∇θℓt(θ)subscript∇𝜃subscriptℓ𝑡𝜃\nabla_{\theta}\ell_{t}(\theta) of the cost at θ𝜃\theta at time t𝑡t is given by−2(Yt−∑i=0s−1θiYt−i−1)(Yt−1,Yt−2,…,Yt−s).2subscript𝑌𝑡superscriptsubscript𝑖0𝑠1subscript𝜃𝑖subscript𝑌𝑡𝑖1subscript𝑌𝑡1subscript𝑌𝑡2…subscript𝑌𝑡𝑠\displaystyle-2\left(Y_{t}-\sum_{i=0}^{s-1}\theta_{i}Y_{t-i-1}\right)\left(Y_{t-1},Y_{t-2},\ldots,Y_{t-s}\right).(47)
|
| 82 |
+
|
| 83 |
+
Note a slight abuse of notation inAlgorithm 1: the vectorθt∈ℝssubscript𝜃𝑡superscriptℝ𝑠\theta_{t}\in\mathbb{R}^{s} denotes the state at time t𝑡t, whilein (45) and elsewhere in the text, θisubscript𝜃𝑖\theta_{i}denotes the scalar coordinates of θ𝜃\theta. Whether the vector or thecoordinates are considered will always be clear from context.
|
| 84 |
+
|
| 85 |
+
For any LDS L𝐿L, let ft(L)subscript𝑓𝑡𝐿f_{t}(L), defined by (13), bethe prediction of Ytsubscript𝑌𝑡Y_{t} that Kalman filter associated with L𝐿L makes,given Yt−1,…,Y0subscript𝑌𝑡1…subscript𝑌0Y_{t-1},\ldots,Y_{0}. We start all filters with the initial statem0=0subscript𝑚00m_{0}=0, and initial covariance C0=Idssubscript𝐶0subscriptId𝑠C_{0}=\operatorname*{Id}_{s}, the s×s𝑠𝑠s\times s identity matrix.Let S𝑆S be any family of LDSs. Then forany sequence {Yt}0Tsuperscriptsubscriptsubscript𝑌𝑡0𝑇\left\{Y_{t}\right\}_{0}^{T}, the quantity∑t=0Tℓ(θt)−minL∈S∑t=0Tℓ(Yt,ft(L)),superscriptsubscript𝑡0𝑇ℓsubscript𝜃𝑡subscript𝐿𝑆superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript𝑓𝑡𝐿\sum_{t=0}^{T}\ell(\theta_{t})-\min_{L\in S}\sum_{t=0}^{T}\ell(Y_{t},f_{t}(L)),(48)where θtsubscript𝜃𝑡\theta_{t} are thesequence of states produced by Algorithm 1, is called theregret. As discussed in the introduction,∑t=0Tℓ(θt)superscriptsubscript𝑡0𝑇ℓsubscript𝜃𝑡\sum_{t=0}^{T}\ell(\theta_{t}) is the total error incurred by thealgorithm, and minL∈S∑t=0Tℓ(Yt,ft(L))subscript𝐿𝑆superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript𝑓𝑡𝐿\min_{L\in S}\sum_{t=0}^{T}\ell(Y_{t},f_{t}(L)) is theloss of the best (in hindsight) Kalman filter in S𝑆S. Therefore, small regretmeans that the algorithm performs on sequence {Yt}0Tsuperscriptsubscriptsubscript𝑌𝑡0𝑇\left\{Y_{t}\right\}_{0}^{T} as wellas the best Kalman filter in S𝑆S, even if we are allowed to select thatKalman filter in hindsight, after the whole sequence is revealed.
|
| 86 |
+
|
| 87 |
+
In the Supplementary Material, we provethe following bound on the regret of Algorithm 1:
|
| 88 |
+
|
| 89 |
+
Due to the limited space in the main body of the text,we describe only the main ideas of the proof here.Similarly to other proofs in this domain, it consists of two steps. In thefirst step we show that∑t=0Tℓt(θt)−minϕ∈𝒟∑t=0Tℓ(Yt,y^t(ϕ))≤2(D2+B02)T.superscriptsubscript𝑡0𝑇subscriptℓ𝑡subscript𝜃𝑡subscriptitalic-ϕ𝒟superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript^𝑦𝑡italic-ϕ2superscript𝐷2superscriptsubscript𝐵02𝑇\sum_{t=0}^{T}\ell_{t}(\theta_{t})-\min_{\phi\in\mathcal{D}}\sum_{t=0}^{T}\ell(Y_{t},\hat{y}_{t}(\phi))\leq 2(D^{2}+B_{0}^{2})\sqrt{T}.(50)
|
| 90 |
+
|
| 91 |
+
This means that Algorithm 1 performs as well as the best inhindsight fixed state vector ϕitalic-ϕ\phi. This follows from thegeneral results in Zinkevich (2003). In the second step, we use theapproximation Theorem 2 to find for eachL∈S𝐿𝑆L\in S an appropriate θL∈𝒟subscript𝜃𝐿𝒟\theta_{L}\in\mathcal{D}, such that thepredictions ft,Lsubscript𝑓𝑡𝐿f_{t,L} are approximated by y^t(θL)subscript^𝑦𝑡subscript𝜃𝐿\hat{y}_{t}(\theta_{L}). Itfollows from this step, that the best Kalman filter performsapproximately as well as the best θLsubscript𝜃𝐿\theta_{L}. Specifically, we haveminL∈S∑t=0Tℓ(Yt,y^t(θL))≤minL∈S∑t=0Tℓ(Yt,ft(L))+εTsubscript𝐿𝑆superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript^𝑦𝑡subscript𝜃𝐿subscript𝐿𝑆superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript𝑓𝑡𝐿𝜀𝑇\min_{L\in S}\sum_{t=0}^{T}\ell(Y_{t},\hat{y}_{t}(\theta_{L}))\leq\min_{L\in S}\sum_{t=0}^{T}\ell(Y_{t},f_{t}(L))+\varepsilon T(51)Because by construction θL∈𝒟subscript𝜃𝐿𝒟\theta_{L}\in\mathcal{D}, clearly it holds thatminϕ∈𝒟∑t=0Tℓ(Yt,y^t(ϕ))≤minL∈S∑t=0Tℓ(Yt,y^t(θL)),subscriptitalic-ϕ𝒟superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript^𝑦𝑡italic-ϕsubscript𝐿𝑆superscriptsubscript𝑡0𝑇ℓsubscript𝑌𝑡subscript^𝑦𝑡subscript𝜃𝐿\min_{\phi\in\mathcal{D}}\sum_{t=0}^{T}\ell(Y_{t},\hat{y}_{t}(\phi))\leq\min_{L\in S}\sum_{t=0}^{T}\ell(Y_{t},\hat{y}_{t}(\theta_{L})),and therefore combining (50) and(51) yields the statement of Theorem6.
|
| 92 |
+
|
| 93 |
+
To illustrate our results, we present experiments on a few well-knownexamples in the Supplementary Material.Out of those, we chose one to present here:
|
| 94 |
+
|
| 95 |
+
In Figure 2, we compare the prediction error for 4 methods:the standard baseline last-value prediction y^t+1:=ytassignsubscript^𝑦𝑡1subscript𝑦𝑡\hat{y}_{t+1}:=y_{t}, alsoknown as persistence prediction, the spectral filtering ofHazan, Singh, andZhang (2017), Kalman filter, and AR(2). Here AR(2) is thetruncation of Kalman filter, given by (13) withregression depth s=1𝑠1s=1 and no remainder term. Average error over 100observation sequences generated by (52) withv=w=0.5𝑣𝑤0.5v=w=0.5 isshown as solid line, and its standard deviation is shown a as shaded region.Note that from some time on, spectral filtering essentially performspersistence prediction, since the inputs are zero. Further, note that bothKalman filter and AR(2) considerably improve upon the performance of last-value prediction.
|
| 96 |
+
|
| 97 |
+
In Figure 3, we compare the performance of AR(2) andKalman filter under varying magnitude of noises v,w𝑣𝑤v,w.In particular, colour indicates the ratio of the errors of Kalman filter to the errors of AR(2), whereinthe errorsare the average prediction error over 10 trajectoriesof (52)for each cell of the heat-map, with each trajectory of length 50. (The formula is given in the Supplementary Material.)Consistent with our analysis, one can observe that increasing the variance of process noiseimproves the approximation of the Kalman filter by AR(2).
|
| 98 |
+
|
| 99 |
+
Finally, in Figure 4, we illustrate the decay of theremainder term by presenting the mean (line) and standard deviation(shaded area) of the error as a function of the regression depth s𝑠s.There, 4 choices of the covariance matrix W𝑊W of the process noise and the variance v𝑣v of the observation noise are considered within Example 7 and the error is averaged over N=100𝑁100N=100 runs of length T=200𝑇200T=200.Of course, as expected, increasing s𝑠sdecreases the error, until the error approaches that of the Kalman filter.Observe again that for a given value of the observation noise, the convergencew.r.t s𝑠s is slower for smaller process noise, consistentlywith our theoretical observations.
|
| 100 |
+
|
| 101 |
+
We have presented a forecasting method, which is applicable to arbitrary sequences and comes with a regret bound competing against a class of methods, which includes Kalman filters.
|
| 102 |
+
|
| 103 |
+
We could generalise the results.First, since Theorem2 provides approximation in absolute value forevery large-enough t𝑡t, our regret bounds may be easily extended to otherlosses. Second, for simplicity, we have considered only bounded sequences.While this is a standard assumption in the literature, it is somewhatrestrictive, since, at least theoretically, LDS observations may grow at a rate of t𝑡\sqrt{t}. For this reason, we have given theapproximation theorem also for bounded-difference (Lipschitz) sequences,and the regret results may be extended to this setting as well.One could also provide regret bounds for special cases of LDS, as surveyed by Roweis and Ghahramani (1999).
|
1809.05910v2.txt
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Three dimensional shapes are front and center in the field of computer graphics, but also a major commodity in related fields such as computer vision and computational geometry.Shapes around us, and in particular those describing natural entities, are commonly composed of continuous surfaces.
|
| 2 |
+
|
| 3 |
+
For computational reasons, and to facilitate data processing, various discrete approximations for 3D shapes have been suggested and utilized to represent shapes in an array of applications. A favorite of many, the polygonal mesh representation, or mesh, for short, approximates surfaces via a set of 2D polygons in 3D space [Botsch et al., 2010]. The mesh provides an efficient, non-uniform representation of the shape. On the one hand, only a small number of polygons are required to capture large, simple, surfaces. On the other hand, representation flexibility supports a higher resolution where needed, allowing a faithful reconstruction, or portrayal, of salient shape features that are often geometrically intricate. Another lucrative characteristic of the mesh is its native provision of connectivity information. This forms a comprehensiverepresentation of the underlying surface.
|
| 4 |
+
|
| 5 |
+
These advantages are apparent in comparison to another popular option: the point cloud representation. Despite its simplicity and direct relation to common data acquisition techniques (scanning), the point cloud representation falls short when a higher quality and preservation of sharp shape features are required.
|
| 6 |
+
|
| 7 |
+
In recent years, using convolutional neural networks (CNNs) on images has demonstrated outstanding performance on a variety of tasks such as classification and semantic segmentation [2013; 2014; 2018].The recipe for their success features a combination of convolution, non-linearity and pooling layers, resulting in a framework that is invariant (or robust) to irrelevant variations of the input [LeCun, 2012; Krizhevskyet al., 2012].However, since images are represented on a regular grid of discrete values, extending CNNs to work on irregular structures is nontrivial.
|
| 8 |
+
|
| 9 |
+
Initial approaches bypassed adapting CNNs to irregular data by using regular representations: mapping 3D shapes to multiple 2D projections [Suet al., 2015] or 3D voxel grids [Wu et al., 2015].While these approaches benefit from directly using well understood image CNN operators, their indirect representation requires prohibitively large amounts of memory with wasteful or redundant CNN computations (e.g., convolutions on unoccupied voxels).
|
| 10 |
+
|
| 11 |
+
More efficient approaches directly apply CNNs on the irregular and sparse point cloud representation [Qiet al., 2017a]. While these approaches benefit from a compact input representation, they are inherently oblivious to the local surface. Moreover, the notion of neighborhoods and connectivity is ill-defined, making the application of convolution and pooling operations nontrivial. This ambiguity has resulted in a wave of works geared towards overcoming this challenge [Monti et al., 2017; Wang et al., 2018a; Liet al., 2018; Yiet al., 2017].
|
| 12 |
+
|
| 13 |
+
Aiming to tap into the natural potential of the native mesh representation, we present MeshCNN: a neural network akin to the well-known CNN, but designed specifically for meshes.MeshCNN operates directly on irregular triangular meshes, performing convolution and pooling operations designed in harmony with the unique mesh properties.In MeshCNN, the edges of a mesh are analogous to pixels in an image, since they are the basic building blocks which all operations are applied on.We choose to work with edges since every edge is incident to exactly two faces (triangles), which defines a natural fixed-sized convolutional neighborhood of four edges (see Figure 2).We utilize the consistent face normal order to apply asymmetric convolution operation, which learns edge features thatare invariant to transformations in rotation, scale and translation.
|
| 14 |
+
|
| 15 |
+
A key feature of MeshCNN is the unique pooling operation, mesh pooling, which operates on irregular structures and spatially adapts to the task.In CNNs, pooling downsamples the number of features in the network, thereby learning to eliminate less informative features.Since features are on the edges, an intuitive approach for down-sampling is to use the well-known mesh simplification technique edge collapse [Hoppe, 1997].However, unlike conventional edge collapse, which removes edges that introduce a minimal geometric distortion, mesh pooling delegates the choice of which edges to collapse to the network in a task-specific manner.The purged edges are the ones whose features contribute the least to the used objective(see examples in figures 1 and 8).
|
| 16 |
+
|
| 17 |
+
To increase flexibility and support a variety of available data, each pooling layer simplifies the mesh to a predetermined constant number of edges.Moreover, while it produces any prescribed output edge count,MeshCNN is agnostic to the input mesh size and capable of handling different triangulations.We show, as demonstrated in Figure 1, that intermediate computational pooling steps, as well as the final output are semantically interpretable.To illustrate the aptitude of our method, we perform a variety of experiments on shape classification and segmentation tasks and demonstrate superior results to state-of-the-art approaches on common datasets and on highly non-uniform meshes.
|
| 18 |
+
|
| 19 |
+
Many of the operators that we present or use in our work are based on classic mesh processing techniques [Hoppe, 1999; Rusinkiewicz andLevoy, 2000; Botsch et al., 2010; Kalogerakiset al., 2010], or more specifically, mesh simplification techniques [Hoppe et al., 1993; Garland andHeckbert, 1997; Hoppe, 1997].In particular, we use the edge-collapse technique [Hoppe, 1997] for our task-driven pooling operator.While classic mesh simplification techniques aim to reduce the number of mesh elements with minimal geometric distortion [Tarini et al., 2010; Gaoet al., 2017], in this work we use the mesh simplification technique to reduce the resolution of the feature maps within the context of a neural network. In the following, we revisit relevant work on 3D data analysis using neural networks, organized according to input representation type.
|
| 20 |
+
|
| 21 |
+
Multi-view 2D projections. Leveraging existing techniques and architectures from the 2D domain is made possible by representing 3D shapes through their 2D projections from various viewpoints. These sets of rendered images serve as input to subsequent processing by standard CNN models. Su et al. [2015] were the first to apply a multi-view CNN for the task of shape classification, however, this approach (as is) cannot perform semantic-segmentation.Later, [Kalogerakis et al., 2017] suggested a more comprehensive multi-view framework for shape segmentation: generating image-level segmentation maps per view and then solving for label consistency using CRF (trained end-to-end).Qi et al. [2016] explored both view-based and volumetric approaches, and observed the superiority of the first compared to the methods available at that time.
|
| 22 |
+
|
| 23 |
+
Volumetric. Transforming a 3D shape into a binary voxel form provides a grid-based representation that is analogous to the 2D grid of an image. As such, operations that are applied on 2D grids can be extended to 3D grids in a straight-forward manner, thus allowing a natural transference of common image-based approaches to the shape domain. Wu et al. [2015] pioneered this concept, and presented a CNN that processes voxelized shapes for classification and completion. Following that, Brock et al. [2016] tackled shape reconstruction using a voxel-based variational autoencoder, and [Tchapmi et al., 2017] combined trilinear interpolation and Conditional Random Fields (CRF) with a volumetric network to promote semantic shape segmentation. Hanocka et al. [2018] used volumetric shape representations to train a network to regress grid-based warp fields for shape alignment, and applied the estimated deformation on the original mesh.
|
| 24 |
+
|
| 25 |
+
Despite their alluring simplicity, volumetric representations are computationally demanding, requiring significant memory usage. To alleviate this, several acceleration strategies have been proposed, where sparsity of shape occupancy within the volume is exploited for representation reduction [Liet al., 2016; Riegleret al., 2017; Wanget al., 2017; Grahamet al., 2017]
|
| 26 |
+
|
| 27 |
+
Graph. A common generalization of grid-based representations that allows non-regularity, is the graph structure. To support graph-based data analysis, considerable focus has been directed toward the application of neural networks to popular tasks involving data represented in graph form, mainly, social networks, sensor networks in communication, or genetic data. One approach advocates for the processing of the Laplacian of the graph representation [Brunaet al., 2014; Henaffet al., 2015; Defferrard et al., 2016; Kostrikov et al., 2018], and thus operates in the spectral domain.Another approach opts to process the graph directly by extracting locally connected regions and transforming them into a canonical form to be processed by a neural network [Niepertet al., 2016]. Atwood et al. [2016] proposed diffusion-convolution, where diffusion is applied on each node to determine its local neighborhood.Monti et al. [2017] parameterize the surface into local patches using the graph spatial domain.Xu et al. [2017] use directional convolutions on surface patches for the task of semantic segmentation.Yi et al. [2017] use graph convolutions in the spectral domain on the task of 3D segmentation.Kostrikov et al. [2018] use a laplacian surface network for developing a generative model for 3D shapes.Such et al. [2017] introduced the concept of vertex filtering on graphs, but did not incorporate pooling operations for feature aggregation. These methods commonly operate on the vertices of a graph.
|
| 28 |
+
|
| 29 |
+
Manifold. The pioneering work of Masci et al. [2015] introduced deep learning of local features on meshes (intrinsic mesh descriptors similar to the ones in [Kokkinos et al., 2012]), and has shown how to use these learned features for correspondence and retrieval. Specifically, they demonstrate how to make the convolution operations intrinsic to the mesh.
|
| 30 |
+
|
| 31 |
+
Often, local patches on a manifold shape are approximately Euclidean. This characteristic can be exploited for manifold shape analysis using standard CNNs, by parameterizing the 3D manifold to 2D [Henaffet al., 2015; Boscaini et al., 2016; Sinhaet al., 2016; Maron et al., 2017; Ezuzet al., 2017].Boscaini et al. [2015] use vertex-frequency analysis to learn a local intrinsic 3D shape descriptor.Another approach uses a toric topology to define the convolutions on the shape graph [Haimet al., 2018; Maron et al., 2017]. Poulenard et al. [2018] define a new convolutional layer that allows propagating geodesic information throughout the layers of the network.
|
| 32 |
+
|
| 33 |
+
Verma et al. [2018] proposed a graph neural network in which the neighborhood of each vertex for the convolution operation is not predefined but rather calculated dynamically based on its features.Tatarchenko et al. [2018] introduced tangent convolution, where a small neighborhood around each point is used to reconstruct the local function upon which convolution is applied. Unlike previous works, they incorporated pooling operations by subsampling on a regular 3D grid.Some generative models have been also proposed. Litany et. al. [2018] introduce an autoencoder that performs shape completion. Ranjan et. al. [2018] demonstrate how 3D faces can be generated by mesh autoencoders.
|
| 34 |
+
|
| 35 |
+
See [Bronstein et al., 2017] for a comprehensive survey on geometric deep learning. The uniqueness of our approach compared to the previous ones is that our network operations are specifically designed to adapt to the mesh structure. In particular, we learn a unique pooling operator that selects which areas to simplify, based on the target task.
|
| 36 |
+
|
| 37 |
+
To the best of our knowledge this is the first work that proposes (i) a convolution on the edges of a mesh and (ii) a learned mesh pooling operation that adapts to the task at hand.In [Ranjanet al., 2018], a fixed pooling operation has been proposed for meshes autoencoders. Learned pooling operations have been proposed in the context of graph neural networks [Ying et al., 2018; Cangea et al., 2018]. Yet, these operations do not take into account the unique triangular mesh properties.
|
| 38 |
+
|
| 39 |
+
A convolution that extracts edge features has been proposed with the dual graph convolution models [Monti et al., 2018] that extend the graph attention networks [Velickovic et al., 2018]. Yet, the attention and optimization mechanisms used in their work are very different than ours; in this work we define operators for meshes, which exploit their unique structure and properties. This allows us to define a symmetric convolution that leads to invariant network features.
|
| 40 |
+
|
| 41 |
+
Point clouds. Arguably the simplest of all representations, the point cloud representation provides a no-frills approximation for an underlying 3D shape. The close relationship to data acquisition, and ease of conversion from other representations, make the point cloud form a classic candidate for data analysis. Accordingly, recent effort has focused on developing techniques for point cloud shape analysis using neural networks. PointNet [Qiet al., 2017a] proposes to use 1x11𝑥11x1 convolutions followed by global max pooling for order invariance. In its followup work, PointNet++ [Qiet al., 2017b], points are partitioned to capture local structures better. Wang et al. [2018b] take into account local point neighborhood information, and perform dynamic updates driven by similarity calculation between points based on distance in feature space.While most point-based approaches focus on global or mid-level attributes, [Guerrero et al., 2018] proposed a network to estimate local shape properties, e.g., normal and curvature from raw point clouds,while [Williams et al., 2018] learn a geometric prior for surface reconstruction from point clouds.Atzmon et al [2018] defines an efficient convolution operator on point clouds by mapping the point clouds functions into volumetric functions. This makes the method invariant to the order of points and robust to some deformations in the data.Recently, Li et al. [2018] presented PointCNN, which extends the notion of convolution from a local grid to an χ𝜒\chi-convolution on points residing in its Euclidean neighborhood.
|
| 42 |
+
|
| 43 |
+
In this work, unlike previous work, we rely on mesh edges to provide non-uniform, geodesic neighborhood information and have a consistent number of conv-neighbors. Invariant feature computation is performed on the edges, while leveraging mesh decimation techniques, such as edge collapse, in a manner that adheres to shape geometry and topology.
|
| 44 |
+
|
| 45 |
+
The most fundamental and commonly used 3D data representation in computer graphics is the non-uniform polygonal mesh; large flat regions use a small number of large polygons, while detailed regions use a larger number of polygons.A mesh explicitly represents the topology of a surface: faithfully describing intricate structures while disambiguating proximity from nearby surfaces (see Figure 3).
|
| 46 |
+
|
| 47 |
+
Realizing our goal to apply the CNN paradigm directly onto triangular meshes, necessitates an analogous definition and implementation of the standard building blocks of CNN: the convolution and pooling layers.As opposed to images which are represented on a regular grid of discrete values, the key challenge in mesh analysis is its inherent irregularity and non-uniformity.In this work, we aim to exploit these challenging and unique properties, rather than bypassing them. Accordingly, we design our network to deliberately apply convolution and pooling operations directly on the constructs of the mesh, and avoid conversion to a regular and uniform representation.
|
| 48 |
+
|
| 49 |
+
Invariant convolutions. In our setting, all shapes are assumed to be represented as manifold meshes, possibly with boundary edges. Such an assumption guarantees that each edge is incident to two faces (triangles) at most, and is therefore adjacent to either two or four other edges.The vertices of a face are ordered counter-clockwise, defining two possible orderings for the four neighbors of every edge. For example, see Figure 4, where the 111-ring neighbors of e𝑒e can be ordered as (a,b,c,d)𝑎𝑏𝑐𝑑(a,b,c,d) or (c,d,a,b)𝑐𝑑𝑎𝑏(c,d,a,b), depending on which face defines the first neighbor. This ambiguates the convolutional receptive field, hindering the formation of invariant features.
|
| 50 |
+
|
| 51 |
+
We take two actions to address this issue and guarantee invariance to similarity transformations (rotation, translation and scale) within our network. First, we carefully design the input descriptor of an edge to contain only relative geometric features that are inherently invariant to similarity transformations. Second,we aggregate the four 111-ring edges into two pairs of edges which have an ambiguity (e.g., a𝑎a and c𝑐c, and b𝑏b and d𝑑d), and generate new features by applying simple symmetric functions on each pair (e.g., sum(a,c)𝑠𝑢𝑚𝑎𝑐sum(a,c)). The convolution is applied on the new symmetric features, thereby eliminating any order ambiguity.
|
| 52 |
+
|
| 53 |
+
Input features. The input edge feature is a 555-dimensional vector for every edge: the dihedral angle, two inner angles and two edge-length ratios for each face. The edge ratio is between the length of the edge and the perpendicular (dotted) line for each adjacent face.We sort each of the two face-based features (inner angles and edge-length ratios), thereby resolving the ordering ambiguity and guaranteeing invariance.Observe that these features are all relative, making them invariant to translation, rotation and uniform scale.
|
| 54 |
+
|
| 55 |
+
Global ordering. The global ordering of the edges is the order in which the edge data (input features) of a particular shape enters the network. This ordering has no influence during the convolutional stage since convolution is performed within local neighborhoods. By extension, fully convolutional tasks e.g., segmentation are unaffected by it.For tasks that require global feature aggregation, such as classification, we follow the common practice suggested by Qi et al. [2017a] in PointNet, and place a global average pooling layer that connects between the convolutional part and the fully-connected part of the network. This layer renders the initial ordering inconsequential and thus guarantees invariance to transformations.
|
| 56 |
+
|
| 57 |
+
Pooling. Mesh pooling is accomplished by an edge collapse process, as illustrated in Figure 2 (b) and (c). In (b), the dashed edge is collapsing to a point, and, subsequently, the four incident edges (blue) merge into the two (blue) edges in (c). Note that in this edge collapse operation, five edges are transformed into two.The operator is prioritized by the (smallest norm) edge features, thereby allowing the network to select which parts of the mesh to simplify, and which to leave intact. This creates a task-aware process, where the network learns to determine object part importance with respect to its mission (see Figure 1).
|
| 58 |
+
|
| 59 |
+
A notable advantage of the nature of our simplification, is that it provides flexibility with regards to the output dimensions of the pooling layer, just before it reaches the final fully connected layer.Pooling also contributes to robustness to initial mesh triangulation. While it does not provide equivariance to triangulation, in practice, by way of continuously collapsing edges and simplifying the mesh, we observe convergence to similar representations despite differences in initial tessellation.
|
| 60 |
+
|
| 61 |
+
A grid-based (e.g., image) representation conveniently provides both spatial neighbors (connectivity) and features in a single matrix.However, since irregular meshes do not conform to this format, we must define the features separately from the connectivity.We accomplish this by working within the standard constructs of a mesh.
|
| 62 |
+
|
| 63 |
+
A mesh is defined by the pair (V𝑉V, F𝐹F), where V={𝐯1,𝐯2⋯}𝑉subscript𝐯1subscript𝐯2⋯V=\left\{\mathbf{v}_{1},\mathbf{v}_{2}\cdots\right\} is the set of vertex positions in ℝ3superscriptℝ3\mathbb{R}^{3}, and F𝐹F defines the connectivity (triplets of vertices for triangular meshes). Given (V𝑉V, F𝐹F), the mesh connectivity is also defined using edges E𝐸E, a set of pairs of vertices.
|
| 64 |
+
|
| 65 |
+
All the mesh elements V𝑉V, F𝐹F and E𝐸E can be associated with various features (such as normals or colors). In this work, E𝐸E also holds a set of features. The edge features start out as a set of similarity-invariant geometric features (equivalent to RGB values in the case of an image), and develop a higher abstraction as they progress through the network layers.
|
| 66 |
+
|
| 67 |
+
In our setting, the mesh provides two attributes to the network: connectivity for convolutional neighbors and the initial geometric input features.The mesh vertices carry no meaning once the input features have been extracted. New vertex positions following edge collapse operations have no effect on the classification and segmentation tasksand they are computed for visualization purposes only.
|
| 68 |
+
|
| 69 |
+
In what follows, we expand and provide details about our mesh convolution, mesh pooling and mesh unpooling operations.
|
| 70 |
+
|
| 71 |
+
We define a convolution operator for edges, where the spatial support is defined using the four incident neighbors (Figure 3).Recall that convolution is the dot product between a kernel k𝑘k and a neighborhood, thus the convolution for an edge feature e𝑒e and its four adjacent edges is:(1)e⋅k0+∑j=14kj⋅ej,⋅𝑒subscript𝑘0superscriptsubscript𝑗14⋅subscript𝑘𝑗superscript𝑒𝑗e\cdot k_{0}+\sum\limits_{j=1}^{4}k_{j}\cdot e^{j},where ejsuperscript𝑒𝑗e^{j} is the feature of the jthsuperscript𝑗thj^{\textrm{th}} convolutional neighbor of e𝑒e. Note that as shown in Figure 4, the four neighbors of e𝑒e, i.e., (e1,e2,e3,e4)superscript𝑒1superscript𝑒2superscript𝑒3superscript𝑒4(e^{1},e^{2},e^{3},e^{4}), are either (a,b,c,d)𝑎𝑏𝑐𝑑(a,b,c,d) or (c,d,a,b)𝑐𝑑𝑎𝑏(c,d,a,b), such that each filter value operates on at most two possible edges (for example k1subscript𝑘1k_{1} on a𝑎a or c𝑐c).To guarantee convolution invariance to the ordering of the input data, we apply a set of simple symmetric functions to the ambiguous pairs. This generates a new set of convolutional neighbors that are guaranteed to be invariant. In our setting, the receptive field for an edge e𝑒e is given by(2)(e1,e2,e3,e4)=(|a−c|,a+c,|b−d|,b+d).superscript𝑒1superscript𝑒2superscript𝑒3superscript𝑒4𝑎𝑐𝑎𝑐𝑏𝑑𝑏𝑑(e^{1},e^{2},e^{3},e^{4})=(|a-c|,a+c,|b-d|,b+d).This leads to a convolution operation that is oblivious to the initial ordering of the mesh elements, and will therefore produce the same output regardless of it.Recall that convolution of a multi-channel tensor with a kernel can be implemented with general matrix multiplication (GEMM𝐺𝐸𝑀𝑀GEMM): by expanding (or unwrapping) the image into a column matrix (i.e., im2col [Jia, 2014]). Equivalently, we build an unwrapped matrix to perform the convolution operation efficiently.
|
| 72 |
+
|
| 73 |
+
In practice, we can use highly optimized batched operators (e.g., conv2D) by aggregating all edge features into a nc×ne×5subscript𝑛𝑐subscript𝑛𝑒5n_{c}\times n_{e}\times 5 feature-tensor, where nesubscript𝑛𝑒n_{e} is the number of edges, ncsubscript𝑛𝑐n_{c} is the number of feature channels, and 555 is for the edge and the convolutional neighbors (equation 2). This matrix is multiplied by a matrix of the weights of the convolutions using standard GEMM𝐺𝐸𝑀𝑀GEMM.
|
| 74 |
+
|
| 75 |
+
Following the convolution operation, a new batched-feature-tensor is generated, where the new number of features is equal to the number of convolution kernels (just as in images).Note that after each pooling phase, the new connectivity will define the new convolutional neighbors for the next convolution.
|
| 76 |
+
|
| 77 |
+
We extend conventional pooling to irregular data, by identifying three core operations that together generalize the notion of pooling:1)define pooling region given adjacency2)merge features in each pooling region3)redefine adjacency for the merged featuresFor pooling on regular data such as images, adjacency is inherently implied and, accordingly, the pooling region is determined directly by the chosen kernel size.Since features in each region are merged (e.g., via avg𝑎𝑣𝑔avg or max𝑚𝑎𝑥max) in a way that yields another uniformly spaced grid, the new adjacency is once again inherently defined. Having addressed the three general pooling operations defined above, it is evident that conventional pooling is a special case of the generalized process.
|
| 78 |
+
|
| 79 |
+
Mesh pooling is another special case of generalized pooling, where adjacency is determined by the topology.Unlike images, which have a natural reduction factor of, for example 444 for 2×2222\times 2 pooling, we define mesh pooling as a series of edge collapse operations, where each such edge collapse converts five edges into two. Therefore, we can control the desired resolution of the mesh after each pooling operator, by adding a hyper-parameter which defines the number of target edges in the pooled mesh.During runtime, extracting mesh adjacency information requires querying special data structures that are continually updated (see [Berget al., 2008] for details).
|
| 80 |
+
|
| 81 |
+
We prioritize the edge-collapse order (using a priority queue) by the magnitude of the edge features, allowing the network to select which parts of the mesh are relevant to solve the task.This enables the network to non-uniformly collapse certain regions which are least important to the loss. Recall that collapsing an edge which is adjacent to two faces results in a deletion of three edges (shown in Figure 2), since both faces become a single edge. Each face contains three edges: the minimum edge and two adjacent neighbors of the minimum edge (see minimum edge in red and adjacent neighbors in blue in Figure 2). Each of the features of the three edges in each face are merged into a new edge feature by taking the average over each feature channel.
|
| 82 |
+
|
| 83 |
+
Edge collapse is prioritized according to the strength of the features of the edge, which is taken as their ℓ2subscriptℓ2\ell_{2}-norm.The features are aggregated as illustrated in Figure 5, where there are two merge operations, one for each of the incident triangles of the minimum edge feature e𝑒e, resulting in two new feature vectors (denoted p𝑝p and q𝑞q). The edge features in channel index i𝑖i for both triangles is given by(3)pi=avg(ai,bi,ei), and, qi=avg(ci,di,ei),formulae-sequencesubscript𝑝𝑖𝑎𝑣𝑔subscript𝑎𝑖subscript𝑏𝑖subscript𝑒𝑖 and, subscript𝑞𝑖𝑎𝑣𝑔subscript𝑐𝑖subscript𝑑𝑖subscript𝑒𝑖p_{i}=avg(a_{i},b_{i},e_{i}),\textrm{ and, }q_{i}=avg(c_{i},d_{i},e_{i}),After edge collapse, the half-edge data structure is updated for the subsequent edge collapses.
|
| 84 |
+
|
| 85 |
+
Finally, note that not every edge can be collapsed.An edge collapse yielding a non-manifold face is not allowed in our setting, as it violates the four convolutional neighbors assumption.Therefore, an edge is considered invalid to collapse if it has three vertices on the intersection of its 111-ring, or if it has two boundary vertices.
|
| 86 |
+
|
| 87 |
+
Unpooling is the (partial) inverse of the pooling operation. While pooling layers reduce the resolution of the feature activations (encoding or compressing information), unpooling layers increase the resolution of the feature activations (decoding or uncompressing information). The pooling operation records the history from the merge operations (e.g., max locations), and uses them to expand the feature activation. Thus, unpooling does not have learnable parameters, and it is typically combined with convolutions to recover the original resolution lost in the pooling operation. The combination with the convolution effectively makes the unpooling a learnable operation.
|
| 88 |
+
|
| 89 |
+
Each mesh unpooling layer is paired with a mesh pooling layer, to upsample the mesh topology and the edge features.The unpooling layer reinstates the upsampled topology (prior to mesh pooling), by storing the connectivity prior to pooling. Note that upsampling the connectivity is a reversible operation (just as in images).For unpooled edge feature computation, we retain a graph which stores the adjacencies from the original edges (prior to pooling) to the new edges (after pooling). Each unpooled edge feature is then a weighted combination of the pooled edge features. The case of average unpooling is demonstrated in Figure 5.
|
| 90 |
+
|
| 91 |
+
MeshCNN is a general method for applying CNNs directly on triangular meshes, with many applications. Using the building blocks of MeshCNN described in Section 4, we can construct different network configurations for the purpose of solving different tasks. Like conventional CNNs, these building blocks provide a plug-and-play framework. For computational efficiency, in the pooling operation, we aggregate the features only once per pooling operation. While the edge sorting and collapse are performed sequentially, this relaxation allows performing the feature aggregation operation on a GPU, which improves the computational efficiency.
|
| 92 |
+
|
| 93 |
+
In what follows, we demonstrate MeshCNN performance on classification and segmentation tasks. Details on the network architectures used are given in Appendix A.
|
| 94 |
+
|
| 95 |
+
Across all sets, we simplified each mesh to roughly the same number of edges. Note that as mentioned earlier, MeshCNN does not require the same number of edges across all samples. However, similar to initial resize of images in CNNs, geometric mesh decimation helps to reduce the input resolution and with it the network capacity required for training. Since the classification task learns a global shape description, we usually use a lower resolution (750750750 edges), compared with the segmentation task (225022502250 edges).
|
| 96 |
+
|
| 97 |
+
Augmentation. Several forms of data augmentation exist for generating more data samples for the network. Note that since our input features are similarity-invariant, applying rotation, translation and isotropic scaling (same in x𝑥x, y𝑦y and z𝑧z) does not generate new input features. However, we can generate new features by applying anisotropic scaling on the vertex locations in x𝑥x, y𝑦y and z𝑧z, <Sx,Sy,Sz><S_{x},S_{y},S_{z}> (each randomly sampled from a normal distribution μ=1𝜇1\mu=1 and σ=0.1𝜎0.1\sigma=0.1), which will change the input features to the network. We also shift vertices to different locations on the mesh surface.Furthermore, we augment the tessellation of each object by performing random edge flips. Due to the flexible input resolution, we can also collapse a small random set of edges prior to training.
|
| 98 |
+
|
| 99 |
+
SHREC.
|
| 100 |
+
|
| 101 |
+
We performed classification on 303030 classes from the SHREC dataset [Lian et al., 2011], with 202020 examples per class. We follow the setup in [Ezuzet al., 2017], where split 161616 and 101010 are the number of training examples per class and we stop training after 200200200 epochs. Since we did not have the exact splits used in [2017], our result is averaged over 333 randomly generated split 161616 and 101010 sets. Table 1 reports the results.For comparison, we take the evaluations directly from [2017], who compare against: SG [Bronstein et al., 2011] (bag-of-features representation), SN [Wu et al., 2015] (volumetric CNN), GI [Sinhaet al., 2016] (CNN on fixed geometry images) and finally GWCNN [2017] (learned geometry images). The advantage of our method is apparent. We visualize some examples of mesh pooling simplifications of this dataset in Figure 6. We observe that mesh pooling behaves in a consistent semantic manner (see Figure 11).
|
| 102 |
+
|
| 103 |
+
Cube engraving.To illustrate the distinctive power of MeshCNN, we modeled a set of cubes with shallow icon engravings (see Figure 7).We use 232323 classes from the MPEG-7 binary shape [Latecki andLakamper, 2000] dataset, with roughly 202020 icons per class. We set aside three icons per class for the test set, and use the remainder for training. For each icon, we randomly sample 101010 different locations (position, rotation and cube face) to inset the icon. Each cube has approximately 500500500 faces, which means that detailed shapes have fewer triangles in the flat areas, while less detailed shapes have more triangles in flat areas. This set contains a total of 460046004600 shapes with 391039103910 / 690690690 in the train / test split.We plan to release this dataset as well as the data synthesis code after publication.
|
| 104 |
+
|
| 105 |
+
We train MeshCNN to classify the cubes. We show the quantitative results in Table 2. To visualize the effect of mesh pooling on the classification task, we extracted the intermediate results following each mesh pooling operation (shown in Figure 8). Observe how MeshCNN learned to reduce the edges irrelevant to the classification task (flat cube surfaces) while preserving the edges within and surrounding the icon engraving.
|
| 106 |
+
|
| 107 |
+
We also trained point-based approaches on this set and show results in Table 2. While this example may be considered contrived, it is meant to highlight that MeshCNN excels on 3D shapes that contain a large variance in geometric resolution.
|
| 108 |
+
|
| 109 |
+
Another application of MeshCNN is consistent shape segmentation, which is an important building block for many applications in shape analysis and synthesis.We used supervised learning to train MeshCNN to predict, for every edge, the probability of belonging to a particular segment on the COSEG [Wang et al., 2012] and Human Body Segmentation [Maron et al., 2017] datasets. Since both datasets provide ground truth segmentation per face, we generated edge-level semantic labeling on the simplified meshes based on the labels from the original resolution.
|
| 110 |
+
|
| 111 |
+
The most straightforward MeshCNN semantic segmentation configuration would be to use a sequence of mesh convolution layers (along with normalization and non-linear activation units). However, incorporating mesh pooling enables MeshCNN to learn a segmentation-driven edge collapse.Recall that mesh pooling reduces the input mesh resolution, which is no longer consistent with the ground truth edge-level labels.To this end, we use the mesh unpooling layer to upsample the resolution back to the original input size.
|
| 112 |
+
|
| 113 |
+
COSEG.We evaluate the performance of MeshCNN on the task of segmentation on the COSEG dataset, which contains three large sets: aliens, vases and chairs containing 200200200, 300300300 and 400400400 models in each respectively. We split each shape category into 85%/15%percent85percent1585\%/15\% train/test splits. We compare to PointNet, PointNet++ and PointCNN and report the best accuracy for all methods in Table 3.Our technique achieves better results than all the other methods on this dataset.
|
| 114 |
+
|
| 115 |
+
We believe that this is due to the fact that our network is tailored to the mesh structure, which gives it an advantage over the other strategies. To further show this, we report also the results for the case of random pooling (collapsed edges are picked randomly) and exhibit that this change reduces the performance of the network. In addition, the final segmentation predictions from MeshCNN semantic segmentation network with pooling and unpooling layers on a held out test set is shown in Figure 9. This also manifests how the pooling performed is adapted to the target problem.
|
| 116 |
+
|
| 117 |
+
Human Body Segmentation.We evaluated our method on the human body segmentation dataset proposed by [Maron et al., 2017]. The dataset consists of 370370370 training models from SCAPE [Anguelov et al., 2005], FAUST [Bogoet al., 2014], MIT [Vlasic et al., 2008] and Adobe Fuse [Adobe, 2016], and the test set is 181818 models from SHREC07 [Giorgiet al., 2007] (humans) dataset. The models are manually segmented into eight labels according to the labels in [Kalogerakiset al., 2010]. Recently, [Poulenard andOvsjanikov, 2018] reported results on this dataset for their method with comparisons to GCNN [Masci et al., 2015], PointNet++ [Qiet al., 2017b], Dynamic Graph CNN [Wang et al., 2018b], and Toric Cover [Maron et al., 2017]. We take the reported results directly from [Poulenard andOvsjanikov, 2018] and list them in Table 4.We added to the table the recent results by Haim et al. [2018], reporting state-of-the-art results on this set. Also in this case, MeshCNN has an advantage over the other methods (part are graph/manifold based and some are point based), which we believe results from the adaptivity of MeshCNN both to the mesh structure and the task at hand. Figure 10 presents some qualitative results of MeshCNN.
|
| 118 |
+
|
| 119 |
+
Computation Time.Our non-optimized PyTorch [Paszke et al., 2017] implementation takes an average of 0.21/0.130.210.130.21/0.13 seconds per example when training on segmentation / classification with 2250/75022507502250/750 edges using a GTX 108010801080 TI graphics card.
|
| 120 |
+
|
| 121 |
+
Tessellation Robustness.We examine the robustness of our method to differences in triangulations through several qualitative and quantitative experiments using the COSEG segmentation dataset.To this end, we generate two modified versions of the dataset. The first is obtained by applying a remeshing procedure (using Blender and MeshLab), and the second by randomly perturbing 30%percent3030\% of the vertex positions, realized as a shift towards a random vertex in its 111-ring. The minor differences in performance (see Table 5) imply resiliency to tessellation variation.See Figure 12 for qualitative results.
|
| 122 |
+
|
| 123 |
+
Invariant Features.A noteworthy advantage of working with relative features is that MeshCNN is guaranteed to be invariant to rotations, translations and uniform scaling. Inherently, the commonly used Cartesian coordinates, are sensitive to rigid transformations. To illustrate that, we train MeshCNN on the task of semantic segmentation: (i) using invariant geometric features and, (ii) using the edge midpoints (x,y,z)𝑥𝑦𝑧(x,y,z) as input features. To assess the learning generalization, we apply non-uniform scaling along the vertical axis (without training on these types of augmentations). Our relative geometric features achieve 98.44%percent98.4498.44\%, compared with 99.63%percent99.6399.63\% on the standard test set, while the absolute coordinates deteriorate to 78.27%percent78.2778.27\%, compared to 99.11%percent99.1199.11\% on the standard test set. Note that while our geometric features are not invariant to non-uniform scaling, they generalize better due to their insensitivity to positioning.
|
| 124 |
+
|
| 125 |
+
We have presented MeshCNN, a general method for employing neural networks directly on irregular triangular meshes. The key contribution of our work is the definition and application of convolution and pooling operations tailored to irregular and non-uniform structures.These operations facilitate a direct analysis of shapes represented as meshes in their native form, and hence benefit from the unique properties associated with the representation of surface manifolds with non-uniform structures.
|
| 126 |
+
|
| 127 |
+
Invariant Convolutions. Our choice of mesh edges as basic building blocks upon which the network operates, is of great importance, as the edge set dictates a simple means to define a local, fixed sized neighborhood for convolutions over irregular structures.By exploiting the unique symmetries specific to triangular meshes, we disambiguate the neighbor ordering duality to enable invariance to transformations. We complement this effort with our choice of input edge features, which are carefully curated to contain solely relative geometric properties rather than absolute positions. Thus, unlike common representations (e.g., point-based), the Cartesian coordinates of the vertices are ignored, and local and non-local features are position-oblivious, allowing better generalization of shape features, and facilitating invariance to similarity transformations. We emphasize that we use vertex positions solely for displaying the evolving meshes, but their positions have no impact on the task.
|
| 128 |
+
|
| 129 |
+
Spatially Adaptive Pooling. We have developed a pooling operation carried out by edge collapse, based on the learned edge features, leading to task-driven pooling guided by the network loss function. In the future, we would like to add dedicated and separate set of features for prioritizing the edge collapse, similar to attention models.Visualizing the series of features the network determined were important, led to profound insights with regards to what the network had actually learned.We observed that our differential features not only provide invariance to similarity transformations, but also inhibit overfitting, as opposed to the usage of absolute Cartesian coordinates. The generalization of the network was further demonstrated via its ability to perform semantically similar pooling across different objects, naturally leading to better results. Investigating this powerful mechanism may lead to a better understanding of the neural net behavior.
|
| 130 |
+
|
| 131 |
+
We regard this spatially-adaptive irregular task-driven pooling as an important contribution with the potential to also influence many image-based CNN tasks. For instance, high resolution image segmentation typically produces a low resolution segmentation map and upsamples it, possibly with skip connections. The pooling in MeshCNN semantically simplifies regions with uniform features, while preserving complex ones; therefore, in the future, we are interested in applying similar irregular pooling for image segmentation tasks to obtain high resolution segmentation maps, where large uniform regions in the image will be represented by a small number of triangles.
|
| 132 |
+
|
| 133 |
+
Currently, our implementation performs sequential edge collapses. This operation can potentially be parallelized on a GPU by using a parallel sorting technique [Bozidar andDobravec, 2015] for the edge features (calculated only once per pooling operation) and ensuring that only non-adjacent edges are collapsed simultaneously. Clearly, the pooled features in this non-sequential way might be different than in the sequential one.
|
| 134 |
+
|
| 135 |
+
Despite the robustness of our method to different triangulations (as demonstrated by our experiments), MeshCNN, like any other network, relies on good training data for a successful generalization. In this sense, much like adversarial noise in images, MeshCNN is vulnerable to adversarial remeshing attacks that may hinder performance. Robustness to such adversarial attacks is therefore an interesting direction for future work.
|
| 136 |
+
|
| 137 |
+
Another avenue for future research is generative modeling, mesh-upsampling and attribute synthesis for the modification of existing meshes. Our idea is to apply vertex-split in reverse order of the edge collapse operations by bookkeeping the list of edge collapses. This is similar to the bookkeeping that is used for the unpooling layer. Thus, when synthesizing new meshes, the network decides which vertex to split, for example, by splitting vertices that are adjacent to edges with high feature values.
|
| 138 |
+
|
| 139 |
+
Finally, we identify a promising endeavor in the extension of our proposed strategy, designed for triangular meshes, to general graphs. Edge-collapse based pooling and unpooling can be applied to general graphs in a similar manner to our proposed MeshCNN. As for convolution, we must consider an appropriate alternative suitable for the irregularity of general graphs. An interesting approach may be to process the edges using an attention mechanism [Monti et al., 2018].
|
1809.05972v5.txt
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Neural conversational models are effective in generating coherent and relevant responses [1, 2, 3, 4, etc.]. However, the maximum-likelihood objective commonly used in these neural models fosters generation of responses that average out the responses in the training data, resulting in the production of safe but bland responses [5].
|
| 2 |
+
|
| 3 |
+
We argue that this problem is in fact twofold. The responses of a system may be diverse but uninformative (e.g.,“I don’t know”, “I haven’t a clue”, “I haven’t the foggiest”, “I couldn’t tell you”), and conversely informative but not diverse (e.g., always giving the same generic responses such as “I like music”, but never “I like jazz”). A major challenge, then, is to strike the right balance between informativeness and diversity. On the one hand, we seek informative responses that are relevant and fully address the input query. Mathematically, this can be measured via Mutual Information (MI) [5], by computing the reduction in uncertainty about the query given the response. On the other hand, diversity can help produce responses that are more varied and unpredictable, which contributes to making conversations seem more natural and human-like.
|
| 4 |
+
|
| 5 |
+
The MI approach of [5] conflated the problems of producing responses that are informative and diverse, and subsequent work has not attempted to address the distinction explicitly. Researchers have applied Generative Adversarial Networks (GANs) [6] to neural response generation [7, 8]. The equilibrium for the GAN objective is achieved when the synthetic data distribution matches the real data distribution. Consequently, the adversarial objective discourages generating responses that demonstrate less variation than human responses.However, while GANs help reduce the level of blandness, the technique was not developed for the purpose of explicitly improving either informativeness or diversity.
|
| 6 |
+
|
| 7 |
+
We propose a new adversarial learning method, Adversarial Information Maximization (AIM), for training end-to-end neural response generation models that produce informative and diverse conversational responses.Our approach exploits adversarial training to encourage diversity, and explicitly maximizes a Variational Information Maximization Objective (VIMO) [9, 10] to produce informative responses. To leverage VIMO, we train a backward model that generates source from target. The backward model guides the forward model (from source to target) to generate relevant responses during training, thus providing a principled approach to mutual information maximization. This work is the first application of a variational mutual information objective in text generation.
|
| 8 |
+
|
| 9 |
+
To alleviate the instability in training GAN models, we propose an embedding-based discriminator, rather than the binary classifier used in traditional GANs.To reduce the variance of gradient estimation, we leverage a deterministic policy gradient algorithm [11] and employ the discrete approximation strategy in [12]. We also employ a dual adversarial objective inspired by [13, 14, 15], which composes both source-to-target (forward) and target-to-source (backward) objectives. We demonstrate that this forward-backward model can work synergistically with the variational information maximization loss. The effectiveness of our approach is validated empirically on two social media datasets.
|
| 10 |
+
|
| 11 |
+
Let 𝒟={(Si,Ti)}i=1N𝒟superscriptsubscriptsubscript𝑆𝑖subscript𝑇𝑖𝑖1𝑁\mathcal{D}=\{(S_{i},T_{i})\}_{i=1}^{N} denote a set of N𝑁N single-turn conversations, where Sisubscript𝑆𝑖S_{i} represents a query (i.e., source), Tisubscript𝑇𝑖T_{i} is the response to Sisubscript𝑆𝑖S_{i} (i.e., target). We aim to learn a generative model pθ(T|S)subscript𝑝𝜃conditional𝑇𝑆p_{\theta}(T|S) that produces both informative and diverse responses for arbitrary input queries.
|
| 12 |
+
|
| 13 |
+
To achieve this, we propose the Adversarial Information Maximization (AIM), illustrated in Figure 1, where (i𝑖i) adversarial training is employed to learn the conditional distribution pθ(T|S)subscript𝑝𝜃conditional𝑇𝑆p_{\theta}(T|S), so as to improve the diversity of generated responses over standard maximum likelihood training, and (ii𝑖𝑖ii) variational information maximization is adopted to regularize the adversarial learning process and explicitly maximize mutual information to boost the informativeness of generated responses.
|
| 14 |
+
|
| 15 |
+
In order to perform adversarial training, a discriminator Dψ(⋅,⋅)subscript𝐷𝜓⋅⋅D_{\psi}(\cdot,\cdot) is used to distinguish real query-response pairs (S,T)𝑆𝑇(S,T) from generated synthetic pairs (S,T~)𝑆~𝑇(S,\tilde{T}), where T~~𝑇\tilde{T} is synthesized from pθ(T|S)subscript𝑝𝜃conditional𝑇𝑆p_{\theta}(T|S) given the query S𝑆S. In order to evaluate the mutual information between S𝑆S and T~~𝑇\tilde{T}, a backward proposal network qϕ(S|T)subscript𝑞italic-ϕconditional𝑆𝑇q_{\phi}(S|T) calculates a variational lower bound over the mutual information. In summary, the objective of AIM is defined as followingminψmaxθ,ϕℒAIM(θ,ϕ,ψ)=ℒGAN(θ,ψ)+λ⋅ℒMI(θ,ϕ),subscript𝜓subscript𝜃italic-ϕsubscriptℒAIM𝜃italic-ϕ𝜓subscriptℒGAN𝜃𝜓⋅𝜆subscriptℒMI𝜃italic-ϕ\displaystyle\min_{\psi}\max_{\theta,\phi}\mathcal{L}_{\textrm{AIM}}(\theta,\phi,\psi)=\mathcal{L}_{\textrm{GAN}}(\theta,\psi)+\lambda\cdot\mathcal{L}_{\textrm{MI}}(\theta,\phi)\,,(1)where ℒGAN(θ,ψ)subscriptℒGAN𝜃𝜓\mathcal{L}_{\textrm{GAN}}(\theta,\psi) represents the objective that accounts for adversarial learning, while ℒMI(θ,ϕ)subscriptℒMI𝜃italic-ϕ\mathcal{L}_{\textrm{MI}}(\theta,\phi) denotes the regularization term corresponding to the mutual information, and λ𝜆\lambda is a hyperparameter that balances these two parts.
|
| 16 |
+
|
| 17 |
+
The conditional generator pθ(T|S)subscript𝑝𝜃conditional𝑇𝑆p_{\theta}(T|S) that produces neural response T=(y1,…,yn)𝑇subscript𝑦1…subscript𝑦𝑛T=(y_{1},\ldots,y_{n}) given the source sentence S=(x1,…,xm)𝑆subscript𝑥1…subscript𝑥𝑚S=(x_{1},\ldots,x_{m}) and an isotropic Gaussian noise vector Z𝑍Z is shown in Figure 2. The noise vector Z𝑍Z is used to inject noise into the generator to prompt diversity of generated text.
|
| 18 |
+
|
| 19 |
+
Specifically, a 3-layer convolutional neural network (CNN) is employed to encode the source sentence S𝑆S into a fixed-length hidden vector H0subscript𝐻0H_{0}. A random noise vector Z𝑍Z with the same dimension of H0subscript𝐻0H_{0} is then added to H0subscript𝐻0H_{0} element-wisely. This is followed by a series of long short-term memory (LSTM) units as decoder.In our model, the t𝑡t-th LSTM unit takes the previously generated word yt−1subscript𝑦𝑡1y_{t-1}, hidden state Ht−1subscript𝐻𝑡1H_{t-1}, H0subscript𝐻0H_{0} and Z𝑍Z as input, and generates the next word ytsubscript𝑦𝑡y_{t} that maximizes the probability over the vocabulary set. However, the argmax operation is used, instead of sampling from a multinomial distribution as in the standard LSTM. Thus, all the randomness during the generation is clamped into the noise vector Z𝑍Z, and the reparameterization trick [16] can be used (see Eqn. (4)).However, the argmax operation is not differentiable, thus no gradient can be backpropagated through ytsubscript𝑦𝑡y_{t}. Instead, we adopt the soft-argmax approximation [12] below:onehot(yt)≈softmax((V⋅Ht)⋅1/τ),onehotsubscript𝑦𝑡softmax⋅⋅𝑉subscript𝐻𝑡1𝜏\displaystyle\texttt{onehot}(y_{t})\approx\text{softmax}\Big{(}(V\cdot H_{t})\cdot 1/\tau\Big{)}\,,(2)where V𝑉V is a weight matrix used for computing a distribution over words.When the temperature τ→0→𝜏0\tau\rightarrow 0, the argmax operation is exactly recovered [12], however the gradient will vanish. In practice, τ𝜏\tau should be selected to balance the approximation bias and the magnitude of gradient variance, which scales up nearly quadratically with 1/τ1𝜏1/\tau. Note that when τ=1𝜏1\tau=1 this recovers the setting in [8]. However, we empirically found that using a small τ𝜏\tau would result in accumulated ambiguity when generating words in our experiment.
|
| 20 |
+
|
| 21 |
+
For the discriminator, we adopt a novel approach inspired by the Deep Structured Similarity Model (DSSM) [17]. As shown in Figure 3, the source sentence S𝑆S, the synthetic response T~~𝑇\tilde{T} and the human response T𝑇T are all projected to an embedding space with fixed dimensionality via different CNNs111Note that encoders based on RNN or pure word embedding [18] are also possible, nevertheless we limit our choice to CNN in this paper.. The embedding network for S𝑆S is denoted as Wssubscript𝑊𝑠W_{s}, while T~~𝑇\tilde{T} and T𝑇T share a network Wtsubscript𝑊𝑡W_{t}. Given these embeddings, the cosine similarities of Ws(S)subscript𝑊𝑠𝑆W_{s}(S) versus Wt(T~)subscript𝑊𝑡~𝑇W_{t}(\tilde{T}) and Wt(T)subscript𝑊𝑡𝑇W_{t}(T) are computed, denoted as Dψ(T,S)subscript𝐷𝜓𝑇𝑆D_{\psi}(T,S) and Dψ(T~,S)subscript𝐷𝜓~𝑇𝑆D_{\psi}(\tilde{T},S), respectively. ψ𝜓\psi represents all the parameters in the discriminator.
|
| 22 |
+
|
| 23 |
+
We empirically found that separate embedding for each sentence yields better performance than concatenating (S,T)𝑆𝑇(S,T) pairs. Presumably, mapping (S,T)𝑆𝑇(S,T) pairs to the embedding space requires the embedding network to capture the cross-sentence interaction features of how relevant the response is to the source. Mapping them separately to the embedding space would divide the tasks into a sentence feature extraction sub-task and a sentence feature matching sub-task, rather than entangle them together. Thus the former might be slightly easier to train.
|
| 24 |
+
|
| 25 |
+
The objective of our generator is to minimize the difference between Dψ(T,S)subscript𝐷𝜓𝑇𝑆D_{\psi}(T,S) and Dψ(T~,S)subscript𝐷𝜓~𝑇𝑆D_{\psi}(\tilde{T},S). Conversely, the discriminator tries to maximize such difference. The ℒGANsubscriptℒGAN\mathcal{L}_{\textrm{GAN}} part in Eqn. (1) is specified asℒGAN(θ,ψ)=−𝔼T,T~,S[f(Dψ(T,S)−Dψ(T~,S))],subscriptℒGAN𝜃𝜓subscript𝔼𝑇~𝑇𝑆delimited-[]𝑓subscript𝐷𝜓𝑇𝑆subscript𝐷𝜓~𝑇𝑆\displaystyle\mathcal{L}_{\textrm{GAN}}(\theta,\psi)=-\mathbb{E}_{T,\tilde{T},S}\Big{[}f\Big{(}D_{\psi}(T,S)-D_{\psi}(\tilde{T},S)\Big{)}\Big{]}\,,(3)where f(x)≜2tanh−1(x)≜𝑓𝑥2superscripttanh1𝑥f(x)\triangleq 2\text{tanh}^{-1}(x) scales the difference to deliver more smooth gradients.
|
| 26 |
+
|
| 27 |
+
Note that Eqn. (3) is conceptually related to [7] in which the discriminator loss is introduced to provide sequence-level training signals. Specifically, the discriminator is responsible for assessing both the genuineness of a response and the relevance to its corresponding source. The discriminator employed in [7] evaluates a source-target pair by operations like concatenation. However, our approach explicitly structures the discriminator to compare the embeddings using cosine similarity metrics, thus avoiding learning a neural network to match correspondence, which could be difficult. Presumably our discriminator delivers more direct updating signal by explicitly defining how the response is related to the source.
|
| 28 |
+
|
| 29 |
+
The objective in Eqn. (3) also resembles Wasserstein GAN (WGAN) [19] in that without the monotonous scaling function f𝑓f, the discriminator Dψsubscript𝐷𝜓D_{\psi} can be perceived as the critic in WGAN with embedding-structured regularization. See details in the Supplementary Material.
|
| 30 |
+
|
| 31 |
+
To backpropagate the learning signal from the discriminator Dψsubscript𝐷𝜓D_{\psi} to the generator pθ(T|S)subscript𝑝𝜃conditional𝑇𝑆p_{\theta}(T|S), instead of using the standard policy gradient as in [7], we consider a novel approach related to deterministic policy gradient (DPG) [11], which estimates the gradient as below:∇θ𝔼p(T~|S,Z)Dψ(T~,S)=𝔼p(Z)∇T~Dψ(T~,S)∇θT~(S,Z),subscript∇𝜃subscript𝔼𝑝conditional~𝑇𝑆𝑍subscript𝐷𝜓~𝑇𝑆subscript𝔼𝑝𝑍subscript∇~𝑇subscript𝐷𝜓~𝑇𝑆subscript∇𝜃~𝑇𝑆𝑍\displaystyle\nabla_{\theta}\mathbb{E}_{p(\tilde{T}|S,Z)}D_{\psi}(\tilde{T},S)=\mathbb{E}_{p(Z)}\nabla_{\tilde{T}}D_{\psi}(\tilde{T},S)\nabla_{\theta}\tilde{T}(S,Z)\,,(4)where the expectation in Eqn. (4) approximated by Monte Carlo approximation.T~(S,Z)~𝑇𝑆𝑍\tilde{T}(S,Z) is the generated response, as a function of source S and randomness Z.Note that ∇θT~(S,Z)subscript∇𝜃~𝑇𝑆𝑍\nabla_{\theta}\tilde{T}(S,Z) can be calculated because we use the soft-argmax approximation as in (2).The randomness in [7] comes from the softmax-multinomial sampling at each local time step; while in our approach, T~~𝑇\tilde{T} is a deterministic function of S𝑆S and Z𝑍Z, therefore, the randomness is global and separated out from the deterministic propagation, which resembles the reparameterization trick used in variational autoencoder [16]. This separation of randomness allows gradients to be deterministically backpropagated through deterministic nodes rather than stochastic nodes. Consequently, the variance of gradient estimation is largely reduced.
|
| 32 |
+
|
| 33 |
+
We further seek to explicitly boost the MI between S𝑆S and T~~𝑇\tilde{T}, with the aim of improving the informativeness of generated responses. Intuitively, maximizing MI allows the model to generate responses that are more specific to the source, while generic responses are largely down-weighted.
|
| 34 |
+
|
| 35 |
+
Denoting the unknown oracle joint distribution as p(S,T)𝑝𝑆𝑇p(S,T), we aim to find an encoder joint distribution pe(S,T)=pθ(T|S)p(S)superscript𝑝𝑒𝑆𝑇subscript𝑝𝜃conditional𝑇𝑆𝑝𝑆p^{e}(S,T)=p_{\theta}(T|S)p(S) by learning a forward model pθ(T|S)subscript𝑝𝜃conditional𝑇𝑆p_{\theta}(T|S), such that pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) approximates p(S,T)𝑝𝑆𝑇p(S,T), while the mutual information under pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) remains high. See Figure 1 for illustration.
|
| 36 |
+
|
| 37 |
+
Empirical success has been achieved in [5] for mutual information maximization. However their approach is limited by the fact that the MI-prompting objective is used only during testing time, while the training procedure remains the same as the standard maximum likelihood training. Consequently, during training the model is not explicitly specified for maximizing pertinent information. The MI objective merely provides a criterion for reweighing response candidates, rather than asking the generator to produce more informative responses in the first place. Further, the hyperparameter that balances the likelihood and anti-likelihood/reverse-likelihood terms is manually selected from (0,1)01(0,1), which deviates from the actual MI objective, thus making the setup ad hoc.
|
| 38 |
+
|
| 39 |
+
Here, we consider explicitly maximizing mutual information Ipe(S,T)≜𝔼pe(S,T)logpe(S,T)p(S)pe(T)≜subscript𝐼superscript𝑝𝑒𝑆𝑇subscript𝔼superscript𝑝��𝑆𝑇superscript𝑝𝑒𝑆𝑇𝑝𝑆superscript𝑝𝑒𝑇I_{p^{e}}(S,T)\triangleq\mathbb{E}_{p^{e}(S,T)}\log\frac{p^{e}(S,T)}{p(S)p^{e}(T)} over pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) during training. However, direct optimization of Ipe(S,T)subscript𝐼superscript𝑝𝑒𝑆𝑇I_{p^{e}}(S,T) is intractable. To provide a principled approach to maximizing MI, we adopt variational information maximization [9, 10]. The mutual information Ipe(S,T)subscript𝐼superscript𝑝𝑒𝑆𝑇I_{p^{e}}(S,T) under the encoder joint distribution pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) isIpe(S,T)≜𝔼pe(S,T)logpe(S,T)p(S)pe(T)≜subscript𝐼superscript𝑝𝑒𝑆𝑇subscript𝔼superscript𝑝𝑒𝑆𝑇superscript𝑝𝑒𝑆𝑇𝑝𝑆superscript𝑝𝑒𝑇\displaystyle I_{p^{e}}(S,T)\triangleq\mathbb{E}_{p^{e}(S,T)}\log\frac{p^{e}(S,T)}{p(S)p^{e}(T)}=\displaystyle=H(S)+𝔼pe(T)DKL(pe(S|T),qϕ(S|T))+𝔼pe(S,T)logqϕ(S|T)𝐻𝑆subscript𝔼superscript𝑝𝑒𝑇subscript𝐷𝐾𝐿superscript𝑝𝑒conditional𝑆𝑇subscript𝑞italic-ϕconditional𝑆𝑇subscript𝔼superscript𝑝𝑒𝑆𝑇subscript𝑞italic-ϕconditional𝑆𝑇\displaystyle H(S)+\mathbb{E}_{p^{e}(T)}D_{KL}(p^{e}(S|T),q_{\phi}(S|T))+\mathbb{E}_{p^{e}(S,T)}\log q_{\phi}(S|T)≥\displaystyle\geq𝔼p(S)𝔼pθ(T|S)logqϕ(S|T)≜ℒMI(θ,ϕ),≜subscript𝔼𝑝𝑆subscript𝔼subscript𝑝𝜃conditional𝑇𝑆subscript𝑞italic-ϕconditional𝑆𝑇subscriptℒMI𝜃italic-ϕ\displaystyle\mathbb{E}_{p(S)}\mathbb{E}_{p_{\theta}(T|S)}\log q_{\phi}(S|T)\triangleq\mathcal{L}_{\textrm{MI}}(\theta,\phi)\,,(5)
|
| 40 |
+
|
| 41 |
+
where H(⋅)𝐻⋅H(\cdot) denotes the entropy of a random variable, and DKL(⋅,⋅)subscript𝐷𝐾𝐿⋅⋅D_{KL}(\cdot,\cdot) denotes the KL divergence between two distributions.qϕ(S|T)subscript𝑞italic-ϕconditional𝑆𝑇q_{\phi}(S|T) is a backward proposal network that approximates the unknown pe(S|T)superscript𝑝𝑒conditional𝑆𝑇p^{e}(S|T). For this backward model qϕ(S|T)subscript𝑞italic-ϕconditional𝑆𝑇q_{\phi}(S|T), we use the same CNN-LSTM architecture as the forward model [20]. We denote the MI objective 𝔼p(S)𝔼pθ(T|S)logqϕ(S|T)subscript𝔼𝑝𝑆subscript𝔼subscript𝑝𝜃conditional𝑇𝑆subscript𝑞italic-ϕconditional𝑆𝑇\mathbb{E}_{p(S)}\mathbb{E}_{{p_{\theta}(T|S)}}\log{{q_{\phi}(S|T)}} as ℒMI(θ,ϕ)subscriptℒMI𝜃italic-ϕ\mathcal{L}_{\textrm{MI}}(\theta,\phi), as used in Eqn. (1).
|
| 42 |
+
|
| 43 |
+
The gradient of ℒMI(θ,ϕ)subscriptℒMI𝜃italic-ϕ\mathcal{L}_{\textrm{MI}}(\theta,\phi) w.r.t. θ𝜃\theta can be approximated by Monte Carlo samples using the REINFORCE policy gradient method [21]∇θℒMI(θ,ϕ)=𝔼pθ(T|S)[logqϕ(S|T)−b]⋅∇θlogpθ(T|S),subscript∇𝜃subscriptℒMI𝜃italic-ϕ⋅subscript𝔼subscript𝑝𝜃conditional𝑇𝑆delimited-[]subscript𝑞italic-ϕconditional𝑆𝑇𝑏subscript∇𝜃subscript𝑝𝜃conditional𝑇𝑆\displaystyle\nabla_{\theta}\mathcal{L}_{\textrm{MI}}(\theta,\phi)=\mathbb{E}_{p_{\theta}(T|S)}[\log q_{\phi}(S|T)-b]\cdot\nabla_{\theta}\log p_{\theta}(T|S)\,,∇ϕℒMI(θ,ϕ)=𝔼pθ(T|S)∇θlogqϕ(S|T),subscript∇italic-ϕsubscriptℒMI𝜃italic-ϕsubscript𝔼subscript𝑝𝜃conditional𝑇𝑆subscript∇𝜃subscript𝑞italic-ϕconditional𝑆𝑇\displaystyle\nabla_{\phi}\mathcal{L}_{\textrm{MI}}(\theta,\phi)=\mathbb{E}_{p_{\theta}(T|S)}\nabla_{\theta}\log q_{\phi}(S|T)\,,(6)where b𝑏b is denoted as a baseline. Here we choose a simple empirical average for b𝑏b [21]. Note that more sophisticated baselines based on neural adaptation [22] or self-critic [23] can be also employed. We complement the policy gradient objective with small proportion of likelihood-maximization loss, which was shown to stabilize the training as in [24].
|
| 44 |
+
|
| 45 |
+
As an alternative to the REINFORCE approach used in (2.3), we also considered using the same DPG-like approach as in (4) for approximated gradient calculation.Compared to the REINFORCE approach, the DPG-like method yields lower variance, but is less memory efficient in this case. This is because the ℒMI(θ,ϕ)subscriptℒMI𝜃italic-ϕ\mathcal{L}_{\textrm{MI}}(\theta,\phi) objective requires the gradient first back-propagated to synthetic text through all backward LSTM nodes, then from synthetic text back-propagated to all forward LSTM nodes, where both steps are densely connected. Hence, the REINFORCE approach is used in this part.
|
| 46 |
+
|
| 47 |
+
One issue of the above approach is that learning an appropriate qϕ(S|T)subscript𝑞italic-ϕconditional𝑆𝑇q_{\phi}(S|T) is difficult. Similar to the forward model, this backward model qϕ(S|T)subscript𝑞italic-ϕconditional𝑆𝑇q_{\phi}(S|T) may also tend to be “bland” in generating source from the target. As illustrated in Figure 4, supposing that we define a decoder joint distribution pd(S,T)=qϕ(S|T)p(T)superscript𝑝��𝑆𝑇subscript𝑞italic-ϕconditional𝑆𝑇𝑝𝑇p^{d}(S,T)=q_{\phi}(S|T)p(T), this distribution tends to be flat along T𝑇T axis (i.e., tending to generate the same source giving different target inputs). Similarly, pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) tends to be flat along the S𝑆S axis as well.
|
| 48 |
+
|
| 49 |
+
To address this issue, inspired by recent work on leveraging “cycle consistency” for image generation [25, 13], we implement a dual objective that treats source and target equally, by complementing the objective in Eqn. (1) with decoder joint distribution matching, which can be written asminψmaxθ,ϕℒDAIMsubscript𝜓subscript𝜃italic-ϕsubscriptℒDAIM\displaystyle\min_{\psi}\max_{\theta,\phi}\mathcal{L}_{\textrm{DAIM}}=−𝔼(T,T~,S)∼pθef(Dψ(S,T)−Dψ(S,T~))absentsubscript𝔼similar-to𝑇~𝑇𝑆subscriptsuperscript𝑝𝑒𝜃𝑓subscript𝐷𝜓𝑆𝑇subscript𝐷𝜓𝑆~𝑇\displaystyle=-\mathbb{E}_{(T,\tilde{T},S)\sim p^{e}_{\theta}}f(D_{\psi}(S,T)-D_{\psi}(S,\tilde{T}))−𝔼(T,S~,S)∼pϕdf(Dψ(S,T)−Dψ(S~,T))subscript𝔼similar-to𝑇~𝑆𝑆subscriptsuperscript𝑝𝑑italic-ϕ𝑓subscript𝐷𝜓𝑆𝑇subscript𝐷𝜓~𝑆𝑇\displaystyle-\mathbb{E}_{(T,\tilde{S},S)\sim p^{d}_{\phi}}f(D_{\psi}(S,T)-D_{\psi}(\tilde{S},T))+λ⋅𝔼p(S)𝔼pθ(T|S)logqϕ(S|T)⋅𝜆subscript𝔼𝑝𝑆subscript𝔼subscript𝑝𝜃conditional𝑇𝑆subscript𝑞italic-ϕconditional𝑆𝑇\displaystyle+\lambda\cdot\mathbb{E}_{p(S)}\mathbb{E}_{p_{\theta}(T|S)}\log q_{\phi}(S|T)+λ⋅𝔼p(T)𝔼qϕ(S|T)logpθ(T|S),⋅𝜆subscript𝔼𝑝𝑇subscript𝔼subscript𝑞italic-ϕconditional𝑆𝑇subscript𝑝𝜃conditional𝑇𝑆\displaystyle+\lambda\cdot\mathbb{E}_{p(T)}\mathbb{E}_{q_{\phi}(S|T)}\log p_{\theta}(T|S)\,,(7)
|
| 50 |
+
|
| 51 |
+
where λ𝜆\lambda is a hyperparameter to balance the GAN loss and the MI loss. An illustration is shown in Figure 5.
|
| 52 |
+
|
| 53 |
+
With this dual objective, the forward and backward model are symmetric and collaborative. This is because a better estimation of the backward model qϕ(S|T)subscript𝑞italic-ϕconditional𝑆𝑇q_{\phi}(S|T) will render a more accurate evaluation of the mutual information Ipe(S,T)subscript𝐼superscript𝑝𝑒𝑆𝑇I_{p^{e}}(S,T), which the optimization for the forward model is based on. Correspondingly, the improvement over the forward model will also provide positive impact on the learning of the backward model. As a consequence, the forward and backward models work in a synergistic manner to simultaneously make the encoder joint distribution pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) and decoder joint distribution pd(S,T)superscript𝑝𝑑𝑆𝑇p^{d}(S,T) match the oracle joint distribution p(S,T)𝑝𝑆𝑇p(S,T).Further, as seen in Eqn. (2.4), the discriminators for pe(S,T)superscript𝑝𝑒𝑆𝑇p^{e}(S,T) and pd(S,T)superscript𝑝𝑑𝑆𝑇p^{d}(S,T) are shared. Such sharing allows the model to borrow discriminative features from both sides, and augments the synthetic data pairs (both (S,T~)𝑆~𝑇(S,\tilde{T}) and (S~,T)~𝑆𝑇(\tilde{S},T)) for the discriminator. Presumably, this can facilitate discriminator training especially when source-target correspondence is difficult to learn.
|
| 54 |
+
|
| 55 |
+
We believe that this approach would also improve the generation diversity. To understand this, notice that we are maximizing a surrogate objective of Ipd(S,T)subscript𝐼superscript𝑝𝑑𝑆𝑇I_{p^{d}}(S,T), which can be written asIpd(S,T)=H(T)−H(T|S).subscript𝐼superscript𝑝𝑑𝑆𝑇𝐻𝑇𝐻conditional𝑇𝑆\displaystyle I_{p^{d}}(S,T)=H(T)-H(T|S).(8)When optimizing θ𝜃\theta, the backward model qϕd(S|T)subscriptsuperscript𝑞𝑑italic-ϕconditional𝑆𝑇q^{d}_{\phi}(S|T) is fixed and H(T|S)𝐻conditional𝑇𝑆H(T|S) remains constant. Thereby optimizing Ipd(S,T)subscript𝐼superscript𝑝𝑑𝑆𝑇I_{p^{d}}(S,T) with respect to θ𝜃\theta can be understood as equivalently maximizing H(T)𝐻𝑇H(T), which promotes the diversity of generated text.
|
| 56 |
+
|
| 57 |
+
Our work is closely related to [5], where an information-promoting objective was proposed to directlyoptimize an MI-based objective between source and target pairs. Despite the great success of this approach, the use of the additional hyperparameter for the anti-likelihood term renders the objective only an approximation tothe actual MI. Additionally, the MI objective is employed only during testing (decoding) time, while the training procedure does not involve such an MI objective and is identical to standard maximum-likelihood training. Compared with [5], our approach considers optimizing a principled MI variational lower bound during training.
|
| 58 |
+
|
| 59 |
+
Adversarial learning [6, 26] has been shown to be successful in dialog generation, translation, image captioning and a series of natural language generation tasks [7, 12, 27, 28, 29, 30, 31, 32, 33, 34].[7] leverages adversarial training and reinforcement learning to generate high quality responses. Our adversarial training differs from [7] in both the discriminator and generator design: we adopt an embedding-based structured discriminator that is inspired by the ideas from Deep Structured Similarity Models (DSSM) [17]. For the generator, instead of performing multinomial sampling at each generating step and leveraging REINFORCE-like method as in [7], we clamp all the randomness in the generation process to an initial input noise vector, and employ a discrete approximation strategy as used in [12]. As a result, the variance of gradient estimation is largely reduced.
|
| 60 |
+
|
| 61 |
+
Unilke previous work, we seek to make a conceptual distinction between informativeness and diversity, and combine the MI and GAN approaches, proposed previously, in a principled manner to explicitly render responses to be both informative (via MI) and diverse (via GAN).
|
| 62 |
+
|
| 63 |
+
Our AIM objective is further extended to a dual-learning framework. This is conceptually related to several previous GAN models in the image domain that designed for joint distribution matching [35, 25, 36, 37, 13]. Among these, our work is mostly related to the Triangle GAN [13]. However, we employ an additional VIMO as objective, which has a similar effect to that of “cycle-consistent” regularization which enables better communication between the forward and backward models. [14] also leverages a dual objective for supervised translation training and demonstrates superior performance. Our work differs from [14] in that we formulate the problem in an adversarial learning setup. It can thus be perceived as conditional distribution matching rather than seeking a regularized maximum likelihood solution.
|
| 64 |
+
|
| 65 |
+
We evaluated our methods on two datasets: Reddit and Twitter. The Reddit dataset contains 2 million source-target pairs of single turn conversations extracted from Reddit discussion threads. The maximum length of sentence is 53. We randomly partition the data as (80%, 10%, 10%) to construct the training, validation and test sets. The Twitter dataset contains 7 million single turn conversations from Twitter threads. We mainly compare our results with MMI [5]222We did not compare with [8] since the code is not available, and the original training data used in [8] contains a large portion of test data, owing to data leakage..
|
| 66 |
+
|
| 67 |
+
We evaluated our method based on relevance and diversity metrics. For relevance evaluation, we adopt BLEU [38], ROUGE [39] and three embedding-based metrics following [8, 40]. The Greedy metric yields the maximum cosine similarity over embeddings of two utterances [41]. Similarly, the Average metric [42] considers the average embedding cosine similarity. The Extreme metric [43] obtains sentence representation by taking the largest extreme values among the embedding vectors of all the words it contains, then calculates the cosine similarity of sentence representations.
|
| 68 |
+
|
| 69 |
+
To evaluate diversity, we follow [5] to use Dist-1 and Dist-2, which is characterized by the proportion between the number of unique n-grams and total number of n-grams of tested sentence. However, this metric neglects the frequency difference of n-grams. For example, token A and token B that both occur 50 times have the same Dist-1 score (0.02) as token A occurs 1 time and token B occurs 99 times, whereas commonly the former is considered more diverse that the latter. To accommodate this, we propose to use the Entropy (Ent-n) metric, which reflects how evenly the empirical n-gram distribution is for a given sentence:Ent=−1∑wF(w)∑w∈VF(w)logF(w)∑wF(w),Ent1subscript𝑤𝐹𝑤subscript𝑤𝑉𝐹𝑤𝐹𝑤subscript𝑤𝐹𝑤\displaystyle\textit{Ent}=-\frac{1}{\sum_{w}F(w)}\sum_{w\in V}F(w)\log\frac{F(w)}{\sum_{w}F(w)}\,,where V𝑉V is the set of all n-grams, F(w)𝐹𝑤F(w) denotes the frequency of n-gram w𝑤w.
|
| 70 |
+
|
| 71 |
+
We evaluated conditional GAN (cGAN), adversarial information maximization (AIM), dual adversarial information maximization (DAIM), together with maximum likelihood CNN-LSTM sequence-to-sequence baseline on multiple datasets. For comparison with previous state of the art methods, we also include MMI [5]. To eliminate the impact of network architecture differences, we implemented MMI-bidi [5] using our CNN-LSTM framework. The settings, other than model architectures, are identical to [5]. We performed a beam search with width of 200 and choose the hyperparameter based on performance on the validation set.
|
| 72 |
+
|
| 73 |
+
The forward and backward models were pretrained via seq2seq training. During cGAN training, we added a small portion of supervised signals to stabilize the training [24]. For embedding-based evaluation, we used a word2vec embedding trained on GoogleNews Corpus333https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM, recommended by [44]. For all the experiments, we employed a 3-layer convolutional encoder and an LSTM decoder as in [45]. The filter size, stride and the word embedding dimension were set to 555, 222 and 300300300, respectively, following [46]. The hidden unit size of H0subscript𝐻0H_{0} was set to 100. We set λ𝜆\lambda to be 0.1 and the supervised-loss balancing parameter to be 0.0010.0010.001. All other hyperparameters were shared among different experiments. All experiments are conducted using NVIDIA K80 GPUs.
|
| 74 |
+
|
| 75 |
+
We first evaluated our methods on the Reddit dataset using the relevance and diversity metrics. We truncated the vocabulary to contain only the most frequent 20,000 words. For testing we used 2,000 randomly selected samples from the test set444We did not use the full test set because MMI decoding is relatively slow..The results are summarized in Table 1. We observe that by incorporating the adversarial loss the diversity of generated responses is improved (cGAN vs. seq2seq). The relevance under most metrics (except for BLEU), increases by a small amount.
|
| 76 |
+
|
| 77 |
+
Compared MMI with cGAN, AIM and DAIM, we observe substantial improvements on diversity and relevance due to the use of the additional mutual information promoting objective in cGAN, AIM and DAIM.Table 2 presents several examples. It can be seen that AIM and DAIM produce more informative responses, due to the fact that the MI objective explicitly rewards the responses that are predictive to the source, and down-weights those that are generic and dull. Under the same hyperparameter setup, we also observe that DAIM benefits from the additional backward model and outperforms AIM in diversity, which better approximates human responses. We show the histogram of the length of generated responses in the Supplementary Material.Our models are trained until convergence. cGAN, AIM and DAIM respectively consume around 1.7, 2.5 and 3.5 times the computation time compared with our seq2seq baseline.
|
| 78 |
+
|
| 79 |
+
The distributional discrepancy between generated responses and ground-truth responses is arguably a more reasonable metric than the single response judgment. We leave it to future work.
|
| 80 |
+
|
| 81 |
+
Informativeness is not easily measurable using automatic metrics, so we performed a human evaluation on 600 random sampled sources using crowd-sourcing. Systems were paired and each pair of system outputs was randomly presented to 7 judges, who ranked them for informativeness and relevance555Relevance relates to the degree to which judges perceived the output to be semantically tied to the previous turn, and can be regarded as a constraint on informativeness. An affirmative response like “Sure” and “Yes” is relevant but not very informative.. The human preferences are shown in Table 3. A statistically significant (p < 0.00001) preference for DAIM over MMI is observed with respect to informativeness, while relevance judgments are on par with MMI. MMI has proved a strong baseline: the other two GAN systems are (with one exception) statistically indistinguishable from MMI, which in turn perform significantly better than seq2seq. Box charts illustrating these results can be found in the Supplementary Material.
|
| 82 |
+
|
| 83 |
+
We further compared our methods on the Twitter dataset. The results are shown in Table 4. We treated all dialog history before the last response in a multi-turn conversation session as a source sentence, and use the last response as the target to form our dataset. We employed CNN as our encoder because a CNN-based encoder is presumably advantageous in tracking long dialog history comparing to an LSTM encoder.We truncated the vocabulary to contain only 20k most frequent words due to limited flash memory capacity. We evaluated each methods on 2k test data.
|
| 84 |
+
|
| 85 |
+
Adversarial training encourages generating more diverse sentences, at the cost of slightly decreasing the relevance score. We hypothesize that such a decrease is partially attributable to the evaluation metrics we used. All the relevance metrics are based on utterance-pair discrepancy, i.e., the score assesses how close the system output is to the ground-truth response. Thus, the MLE system output tends to obtain a high score despite being bland, because a MLE response by design is most “relevant” to any random response. On the other hand, adding diversity without improving semantic relevance may occasionally hurt these relevance scores.
|
| 86 |
+
|
| 87 |
+
However the additional MI term seems to compensate for the relevance decrease and improves the response diversity, especially in Dist-n𝑛n and Ent-n𝑛n with a larger value of n𝑛n. Sampled responses are provided in the Supplementary Material.
|
| 88 |
+
|
| 89 |
+
In this paper we propose a novel adversarial learning method, Adversarial Information Maximization (AIM), for training response generation models to promote informative and diverse conversations between human and dialogue agents.AIM can be viewed as a more principled version of the classical MMI method in that AIM is able to directly optimize the (lower bounder of) the MMI objective in model training while the MMI method only uses it to rerank response candidates during decoding. We then extend AIM to DAIM by incorporating a dual objective so as to simultaneously learn forward and backward models.We evaluated our methods on two real-world datasets.The results demonstrate the our methods do lead to more informative and diverse responses in comparison to existing methods.
|
1809.05996v3.txt
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Human parsing is a fine-grained semantic segmentation task which aims at identifying the constituent parts (\eg body parts and clothing items) for a human image on pixel-level. Understanding the contents of the human image makes sense in several potential applications including e-commerce, human-machine interaction, image editing and virtual reality to name a few. Currently, human parsing has gained remarkable improvement with the development of fully convolutional neural networks on semantic segmentation.
|
| 3 |
+
|
| 4 |
+
For the semantic segmentation, researchers have developed many solutions from different views to tackle the challenging dense prediction task. In general, current solutions can be grossly divided into two types: 1) \textbf{High-resolution Maintenance} This kind of approaches are attempting to obtain high-resolution features to recover the desired detailed information. Due to consecutive spatial pooling and convolution strides, the resolution of the final feature maps is reduced significantly that the finer image information is lost. To generate high-resolution features, there are two typical solutions, \ie cutting several down-sampling (\eg max pooling) operations~\cite{Chen2016} and introducing details from low-level feature maps~\cite{Chen2018a}. For the latter case, it is usually embedded in an encoder-decoder architecture, in which the high-level semantic information is captured in the encoder and the details and spatial information are recovered in the decoder. 2) \textbf{Context Information Embedding} This kind of approaches is devoting to capture rich context information to handle the objects with multiple scales. Feature pyramid is one of the effective ways to mitigate the problem caused by various scales of objects, and atrous spatial pyramid pooling (ASPP) based on dilated convolution~\cite{Chen2018} and pyramid scene parsing (PSP)~\cite{Zhao2017} are two popular structures. ASPP utilizes parallel dilated convolution layers with different rates to incorporate multi-scale context. PSP designs pyramid pooling operation to integrate the local and global information together for more reliable prediction. Beyond these two typical types, some other works also propose to advantage the segmentation performance by introducing additional information such as edge~\cite{Liang2017,liumagic} or more effective learning strategy such as cascaded training~\cite{Li_2017_CVPR}.
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
Compare with the general semantic segmentation tasks, the challenges of human parsing is to produce finer predictions for every detailed region belonging to a person. Besides, the arms, legs and shoes are further divided into the left side and right side for more precise analysis, which makes the parsing more difficult. Despite the approaches mentioned above showing impressive results in semantic segmentation, it remains unclear how to develop an accurate human parsing system upon these solutions and most previous works did not explore and analyze how to leverage them to unleash the full potential in human parsing. In this work, we target on answering such a question: can we simply formulate a powerful framework for human parsing by exploiting the recent advantages in the semantic segmentation area?
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
To answer such a question, we conduct a great deal of rigorous experiments to clarify the key factors affecting the performance of human parsing. In particular, we perform an analysis of potential gains in mIoU score with different properties. The evaluated useful properties include feature resolution, context information and edge details. Based on the analysis, we present a simple yet effective Context Embedding with Edge Perceiving (CE2P) framework for single human parsing. The proposed CE2P consists of three key modules to learn for parsing in an end-to-end manner: 1) A high-resolution embedding module used to enlarge the feature map for recovering the details; 2) A global context embedding module used for encoding the multi-scale context information; 3) An edge perceiving module used to integrate the characteristic of object contour to refine the boundaries of parsing prediction. Our approach achieves state-of-the-art performance on all three human parsing benchmarks. Those results manifest that the proposed CE2P can provide consistent improvements over various human parsing tasks. The main contributions of our work are as follows:
|
| 11 |
+
|
| 12 |
+
\begin{itemize}
|
| 13 |
+
|
| 14 |
+
\item We analyze the effectiveness of several properties for human parsing, and reveal how to leverage them to benefit the human parsing task.
|
| 15 |
+
|
| 16 |
+
\item We design a simple yet effective CE2P framework by leveraging the useful properties to conduct human parsing in a simple and efficient way.
|
| 17 |
+
|
| 18 |
+
\item Our CE2P brings a significant performance boost to all three human parsing benchmarks, outperforming the current state-of-the-art method by a large margin.
|
| 19 |
+
|
| 20 |
+
\item Our code is available, which can serve as a solid baseline for the future research in single/multiple human parsing.
|
| 21 |
+
|
| 22 |
+
\end{itemize}
|
| 23 |
+
\section{Related Work}
|
| 24 |
+
|
| 25 |
+
\subsection{Human Parsing}
|
| 26 |
+
The study of human parsing has drawn more and more attention due to the wide range of potential application. The early works~\cite{Yamaguchi2012,Dong2013,Simo-Serra2014,Ladicky2013} performed the parsing with CRF framework and utilized the human pose estimation to assist the parsing. A Co-CNN~\cite{Liang2017} architecture was proposed to hierarchically integrate the local and global context information and improved the performance greatly. Recently, SSL~\cite{Gong2017} introduced a self-supervised structure-sensitive loss, which was used for enforcing the consistency between parsing results and the human joint structures, to assist the parsing task. Following previous work, JPPNet~\cite{Liang2018} incorporated the human parsing and pose estimation task into a unified network. With multi-scale feature connections and iterative refinement, the parsing and pose tasks boosted each other simultaneously. Considering the practical application, several current works~\cite{Li2017a,Li2017,Zhao2018} focus on handling the scenario with multiple persons. Usually, it consisted of three sequential steps: object detection~\cite{he2017mask}, object segmentation and part segmentation. Besides, many research efforts~\cite{Girshick2014,Wang2015,Chen2016a,Hariharan2015} have been devoted into the object parts segmentation, which was similar to human parsing. Most of those works leveraged the multi-scale features to enhance the performance.
|
| 27 |
+
\subsection{Semantic Segmentation}
|
| 28 |
+
Human parsing is a fine-grained semantic segmentation task. Hence, the methods used in human parsing is similar to semantic segmentation. Since the fully convolutional network (FCN)~\cite{Long2015} has shown numerous improvements in semantic segmentation, many researchers~\cite{Chen2016,Jegou2017,wei2018revisiting,wei2017object,wei2017stc} have made efforts based on the FCN. Several pieces of work~\cite{Badrinarayanan2017,Ronneberger2015,Lin2017}, leveraged an encoder-decoder architecture with skip connection to recover the dense feature responses. Another literatures~\cite{Chen2016,YuKoltun2016,Chen2018a} exploited the dilated convolution for higher resolution output. Besides, the local and global information are integrated for generating more reliable prediction, such as~\cite{Chen2018,Zhao2017}.
|
| 29 |
+
\section{Context Embedding with Edge Perceiving}
|
| 30 |
+
\begin{figure*}[!htb]
|
| 31 |
+
\centering
|
| 32 |
+
\includegraphics[width=1\textwidth, height=80mm]{framework.pdf}
|
| 33 |
+
\caption{The framework of our proposed CE2P. The overall architecture consists of three key modules: 1) high resolution embedding module 2) global context embedding module; 3) edge perceiving module. }
|
| 34 |
+
\label{fig:framework}
|
| 35 |
+
\end{figure*}
|
| 36 |
+
|
| 37 |
+
In this section, we first provide the architecture of our Context Embedding with Edge Perceiving(CE2P) approach. Within CE2P, we analyze the effectiveness of several key modules motivated from the previous state-of-the-art semantic segmentation models and reveal how they can work together to accomplish the single human parsing task. Then, we give the details of applying the CE2P to address the more challenging multiple human parsing task.
|
| 38 |
+
\subsection{Key Modules of CE2P}
|
| 39 |
+
Our CE2P integrates the local fine details, global context and semantic edge context into a unified network. The overview of our framework is shown in Fig.~\ref{fig:framework}. Specifically, it consists of three key components to learn for parsing in an end-to-end manner, \ie context embedding module, high-resolution embedding module and edge perceiving module. ResNet-101 is adopted as the feature extraction backbone.
|
| 40 |
+
|
| 41 |
+
\noindent \textbf{Context Embedding Module}
|
| 42 |
+
Global context information is useful to distinguish the fine-grained categories. For instance, the left and right shoe have relatively high similarity in appearance. To differentiate between the left and right shoe, the global information, like the orientation of leg and body, provides an effective context prior. As we know, feature pyramid is a powerful way to capture the context information. Draw on the previous work PSP~\cite{Zhao2017}, we utilize a pyramid pooling module to incorporate the global representations. We perform four average pooling operations on the features extracted from ResNet-101 to generate multiple scales of context features with size 1$\times$1, 2$\times$2, 3$\times$3, 6$\times$6 respectively. Those context features are upsampled to keep the same size with the original feature map by bilinear interpolation, which are further concatenated with the original feature. Then, the 1$\times$1 convolution is employed to reduce the channels and better integrate the multi-scale context information. Finally, the output of context embedding module is fed into the following high-resolution module as global context prior.
|
| 43 |
+
|
| 44 |
+
\noindent \textbf{High-resolution Embedding Module}
|
| 45 |
+
In human parsing, there exist several small objects to be segmented, \eg socks, shoes, sunglasses and glove. Hence, high-resolution feature for final pixel-level classification is essential to generate an accurate prediction. To recover the lost details, we adopt a simple yet effective method which embeds the low-level visual features from intermediate layers as complementary to the high-level semantic features. We exploit the feature from the \emph{conv2} to capture the high-resolution details. The global context feature is upsampled by factor 4 with bilinear interpolation, and concatenated with local feature after channel reduced by 1$\times$1 convolution. Finally, we conduct two sequential 1$\times$1 convolution on the concatenated feature to better fuse the local and global context feature. In this manner, the output of high-resolution module simultaneously acquires high-level semantic and high-resolution spacial information.
|
| 46 |
+
|
| 47 |
+
\noindent \textbf{Edge Perceiving Module}
|
| 48 |
+
This module aims at learning the representation of contour to further sharp and refine the prediction. We introduce three branches to detect multi-scale semantic edges. As illustrated in Fig.~\ref{fig:framework}, a 1$\times$1 convolution are conducted to \emph{conv2}, \emph{conv3} and \emph{conv4} to generate 2-channel score map for the semantic edge. And then, 1$\times$1 convolution is performed to obtain the fused edge map. Those intermediate features of edge branches, which can capture useful characteristics of object boundaries, are upsampled and concatenated with the features from high-resolution. Finally, 1$\times$1 convolution is performed on the concatenated feature map to predict the pixel-level human parts.
|
| 49 |
+
|
| 50 |
+
Our CE2P consisting of the three modules is learned with an end-to-end manner. The outputs of CE2P consist of two parsing results and edge prediction. Hence, the loss can be formulated as:
|
| 51 |
+
|
| 52 |
+
\begin{equation}
|
| 53 |
+
L = L_{Parsing} + L_{Edge} + L_{Edge-Parsing} ,
|
| 54 |
+
\end{equation}
|
| 55 |
+
where $L_{Edge}$ denotes the weighted cross entropy loss function between the edge map detected by edge module and the binary edge label map; $L_{Parsing}$ denotes the cross entropy loss function between the parsing result from high resolution module and the parsing label; $L_{Edge-Parsing}$ denotes the cross entropy loss function between the final parsing result, which is predicted from the edge perceiving branch, and the parsing label.
|
| 56 |
+
\subsection{Multiple Human Parsing (MHP)}
|
| 57 |
+
MHP is a more challenging task, which not only needs to classify the semantics of pixels but also identify the instance (\ie one unique person) that these pixels belong to. To achieve high-quality parsing results in the scenario of multiple persons, we design a framework called M-CE2P upon our CE2P and Mask R-CNN~\cite{he2017mask}. As shown in Fig.~\ref{fig:mhp_overall}, our M-CE2P leverages three branches, denoted by $B_g$, $B_{l\_1}$, $B_{l\_2}$, to make predictions from global to local views. The details of the three branches are introduced in the following.
|
| 58 |
+
|
| 59 |
+
\noindent \textbf{Global Parsing $B_g$}
|
| 60 |
+
In spite of the CE2P is proposed for single human parsing, we find it shows considerable performance on multiple human images as well. Hence, we first apply it over the entire image for global parsing. For the branch of $B_g$, we train a CE2P model with the entire images. Then, the output of this branch is leveraged as complementary to the following local parsing. The global parsing branch can provide context information when there exist occlusions among multiple persons. For instance, the same semantic parts form different persons can be easy to tell apart, and the spatial relationship among persons can be captured to handle the circumstance of occlusion. However, it does not concentrate on the relatively small human instances. As a result, body parts belonging to small-scale person are likely ignored by $B_g$.
|
| 61 |
+
|
| 62 |
+
\begin{figure}[t]
|
| 63 |
+
\begin{center}
|
| 64 |
+
\includegraphics[width=1.0\linewidth]{./mhp_overall.pdf}
|
| 65 |
+
\end{center}
|
| 66 |
+
\caption{The overall framework of CE2P for Multiple Human Parsing task.}
|
| 67 |
+
\label{fig:mhp_overall}
|
| 68 |
+
\end{figure}
|
| 69 |
+
|
| 70 |
+
\noindent \textbf{Local Parsing with Predicted Instance Masks $B_{l\_1}$}
|
| 71 |
+
To alleviate the problem of global parsing $B_g$, we consider locating the persons as a preprocessing step to generate accurate parsing results. Towards this end, we propose a two-stage branch devoting to human-level local parsing. Specifically, we employ Mask R-CNN~\cite{he2017mask} to extract all the person patches in the input image, and resize them to fit the input size of CE2P. And then, all the human-level sub-images are fed into CE2P to training the model for local view. During inference stage, the sub-images with single human instance of input images are extracted by Mask R-CNN, and further fed into the trained model to make parsing predictions. The predicted confidence maps are resized to the original size by bilinear interpolation for the following prediction over the entire image. Finally, the confidence maps for each sub-images are padded with zeros to keep the same size as the confidence map from $B_g$, and further fused together by element-wise summation on foreground channels and minimization on background channel.
|
| 72 |
+
|
| 73 |
+
\noindent \textbf{Local Parsing with Ground-truth Instance Masks $B_{l\_2}$} Considering that a human instance obtained from the ground-truth instance mask is more approximate to the real single human image, we introduce the branch $B_{l\_2}$ to train a model with the data generated from ground-truth instance mask. This branch is rather similar with $B_{l\_1}$, the only difference is that we obtain person patches with the guide of the ground truth bounding boxes in the training stage. With the $B_{l\_2}$, the performance of local parsing can be further boosted. Finally, the predictions generated by the three branches are fused by element-wise summation to obtain the final instance-agnostic parsing result. The predicted instance-agnostic parsing results are further fed into the following process to make the instance-level parsing.
|
| 74 |
+
|
| 75 |
+
\noindent \textbf{Instance-level Parsing and Label Refinement}
|
| 76 |
+
With the instance-agnostic parsing result obtained from M-CE2P, we consider two aspects to generate the instance-level label, \ie \emph{instance assignment} for predicting instance-aware results and \emph{label refinement} for solving the shortage of the under-segmentation phenomenon of Mask R-CNN. For instance assignment, we directly apply human masks generated by Mask R-CNN to assign instance-level part label of global body parts. Concretely, parts will be assigned with different part instance labels when they are same category while belonging to different masks. Through the experiments, we find that the parsing mask predicted from our CE2P is more reliable than human instance map. To further validate the reliability of parsing results, we introduce the label refinement by expanding the area of intersection with the neighbor pixels which have same parsing label while exceeding the human instance. For example, some regions of marginal parts(\eg hair, hands) are very likely to be outside of the area of predicted human masks. We use searching based method to alleviate this problem. Specifically, for each border pixel of the part obtained from the assignment step, we use Breadth-First Search to find the pixel that is endowed with an instance-agnostic class label but no part label due to the inaccuracy of segmentation prediction. With the proposed refinement, the body parts excluded by human mask can be effectively included in the final instance-level result.
|
| 77 |
+
\section{Experimental Results}
|
| 78 |
+
\begin{table*}[htbp]
|
| 79 |
+
\caption{Comparison of CE2P in various module settings on the validation set of LIP. The results are obtained without left-right flipping except for the last row. 'B' means baseline model. 'G', 'H' and 'E' denote global context, high resolution and edge perceiving module, respectively. }
|
| 80 |
+
\label{tab:IoU}
|
| 81 |
+
\centering
|
| 82 |
+
\resizebox*{!}{3.2cm}{
|
| 83 |
+
\begin{tabular}{llllllllllllllllllllll}
|
| 84 |
+
\toprule
|
| 85 |
+
Method & \rotatebox{90}{bkg} & \rotatebox{90}{hat} & \rotatebox{90}{hair} & \rotatebox{90}{glove} & \rotatebox{90}{glasses} & \rotatebox{90}{u-cloth} & \rotatebox{90}{dress} & \rotatebox{90}{coat} & \rotatebox{90}{socks} & \rotatebox{90}{pants} & \rotatebox{90}{j-suits} & \rotatebox{90}{scarf} & \rotatebox{90}{skirt} & \rotatebox{90}{face} & \rotatebox{90}{l-arm} & \rotatebox{90}{r-arm} & \rotatebox{90}{l-leg} & \rotatebox{90}{r-leg} & \rotatebox{90}{l-shoe} & \rotatebox{90}{r-shoe} & \rotatebox{90}{mIoU} \\
|
| 86 |
+
\midrule
|
| 87 |
+
B & 86.08 & 63.24 & 70.14 & 33.75 & 29.45 & 66.15 & 24.10 & 51.79 & 45.70 & 70.75 & 21.52 & 13.56 & 20.36 & 73.04 & 58.24 & 60.88 & 49.70 & 48.06 & 36.50 & 36.40 & 47.97 \\
|
| 88 |
+
B+H & 86.69 & 64.65 & 71.53 & 33.76 & 33.30 & 66.50 & 25.11 & 51.52 & 46.10 & 71.46 & 23.62 & 14.77 & 21.44 & 74.08 & 60.04 & 62.41 & 50.36 & 50.74 & 36.95 & 37.19
|
| 89 |
+
& 49.11 \\
|
| 90 |
+
B+G & 86.61 & 63.77 & 71.01 & 34.90 & 30.73 & 67.93 & 30.89 & 54.14 & 46.11 & 72.21 & 23.38 & 13.16 & 20.16 & 73.50 & 59.51 & 62.12 & 50.70 & 50.48 & 38.63 & 38.84 & 49.44 \\
|
| 91 |
+
B+E & 86.87 & 63.47 & 71.56 & 35.60 & 31.35 & 67.06 & 27.80 & 52.28 & 47.85 & 72.21 & 23.89 & 15.60 & 20.57 & 74.37 & 61.04 & 63.36 & 53.30 & 52.70 & 39.72 & 40.16 & 50.04 \\
|
| 92 |
+
B+G+H & 87.22 & 65.34 & 72.13 & 36.18 & 31.97 & 68.86 & 31.02 & 55.81 & 47.35 & 73.23 & 26.91 & 12.28 & 20.58 & 74.49 & 62.95 & 65.18 & 56.31 & 55.59 & 43.49 & 43.80 & 51.54 \\
|
| 93 |
+
\tabincell{c}{B+G+H+E\\(CE2P)} & 87.41 & 64.62 & 72.07 & 38.36 & 32.20 & 68.92 & 32.15 & 55.61 & 48.75 & 73.54 & 27.24 & 13.84 & 22.69 & 74.91 & 64.00 & 65.87 & 59.66 & 58.02 & 45.70 & 45.63 & 52.56 \\
|
| 94 |
+
\tabincell{c}{CE2P\\(Flipping)} & \bf{87.67} & 65.29 & \bf{72.54} & \bf{39.09} & \bf{32.73} & \bf{69.46} & \bf{32.52} & \bf{56.28} & \bf{49.67} & \bf{74.11} & 27.23 & \bf{14.19} & 22.51 & \bf{75.50} & \bf{65.14} & \bf{66.59} & \bf{60.10} & \bf{58.59} & \bf{46.63} & \bf{46.12} & \bf{53.10} \\
|
| 95 |
+
\bottomrule
|
| 96 |
+
\end{tabular}
|
| 97 |
+
}
|
| 98 |
+
\end{table*}
|
| 99 |
+
\subsection{Dataset and Metrics}
|
| 100 |
+
We compare the performance of single human parsing of our proposed approach with other state-of-the-arts on the LIP~\cite{Liang2018} dataset, and we further evaluate the multiple human parsing on CIHP~\cite{gong2018instance} and MHP v2.0~\cite{Li2017} dataset.
|
| 101 |
+
|
| 102 |
+
\noindent\textbf{LIP dataset}: The LIP~\cite{Liang2017} dataset is used in LIP challenge 2016, which is a large-scale dataset that focuses on single human parsing. There are 50,462 images with fine-grained annotations at pixel-level with 19 semantic human part labels and one background label. Those images are further divided into 30K/10K/10K for training, validation and testing, respectively.
|
| 103 |
+
|
| 104 |
+
\noindent\textbf{CIHP dataset}: CIHP~\cite{gong2018instance} provides a dataset with 38,280 diverse human images, in which contains 28,280 training, 5K validation and 5K test images. The images have pixel-wise annotation on 20 categories and instance-level identification.
|
| 105 |
+
|
| 106 |
+
\noindent\textbf{MHP v2.0 dataset}: The MHP v2.0 dataset is designed for multi-human parsing in the wild including 25,403 images with finer categories up to 58 semantic labels. The validation set and test set have 5K images respectively. The rest 15,403 are provided as the training set.
|
| 107 |
+
|
| 108 |
+
\noindent\textbf{Metrics}: We use mean IoU to evaluate the global-level predictions, and use the following three metrics to evaluate the instance-level predictions. $Mean~AP^r$ computes the area under the precision-recall curve with the limitation of a set of IoU threshold, and figure out the final averaging result, which is first introduced in~\cite{hariharan2014simultaneous}; $AP^p$~\cite{Li2017} computes the pixel-level IoU of semantic part categories within a person, instead of global circumstance; $PCP$~\cite{Li2017} elaborates how many body parts are correctly predicted of a certain person, guided with pixel-level IoU.
|
| 109 |
+
\subsection{Implement Details}
|
| 110 |
+
We implement the proposed framework in PyTorch~\cite{paszke2017automatic} based on~\cite{torch2018segment}, and adopt ResNet-101~\cite{He2016} as the backbone network. The input size of the image is 473$\times$473 during training and testing. We adopt the similar training strategies with Deeplab~\cite{Chen2018a}, \ie ``Poly'' learning rate policy with base learning rate 0.007. We fine-tune the networks for approximately 150 epochs. For data augmentation, we apply the random scaling (from 0.5 to 1.5), cropping and left-right flipping during training. Note that the edge annotation used in the edge perceiving module is directly generated from the parsing annotation by extracting border between different semantics.
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
\begin{table}[htbp]
|
| 115 |
+
\footnotesize
|
| 116 |
+
\caption{Comparison of performance on the validation set of LIP with state-of-arts methods.}
|
| 117 |
+
\label{tab:IoU_others}
|
| 118 |
+
\centering
|
| 119 |
+
\begin{tabular}{llll}
|
| 120 |
+
\toprule
|
| 121 |
+
Method & pixel acc. & mean acc. & mIoU \\ \midrule
|
| 122 |
+
DeepLab (VGG-16) & 82.66 & 51.64 & 41.64 \\
|
| 123 |
+
Attention & 83.43 & 54.39 & 42.92 \\
|
| 124 |
+
DeepLab (ResNet-101) & 84.09 & 55.62 & 44.80 \\
|
| 125 |
+
JPPNet~\cite{Liang2018} & 86.39 & 62.32 & 51.37 \\
|
| 126 |
+
CE2P & \bf{87.37} & \bf{63.20} & \bf{53.10} \\ \bottomrule
|
| 127 |
+
\end{tabular}
|
| 128 |
+
\end{table}
|
| 129 |
+
\subsection{Single Human Parsing}
|
| 130 |
+
To investigate the effectiveness of each module, we report the performance under several variants of CE2P in Tab.~\ref{tab:IoU}. We begin the experiment with a baseline model without any proposed modules. For our baseline, the prediction is directly performed on the final feature map extracted from ResNet-101. The resolution of the final feature map is $1/16$ to the input size. The results are shown in Tab.~\ref{tab:IoU}, and we can see the baseline model reaches 47.97\% accuracy. Some failure examples are shown in Fig.~\ref{fig:comparision}. Observing the per-classes performance and the visualized results, there exist the following problems. 1) Big-size objects have the discontinuous prediction. For instance, the dress is always parsed as a upper-clothes and skirt, and the jumpsuit is separated into a upper-clothes and pants. 2) The confusable categories are hard to distinguish. \ie the coat and upper-clothes. 3) The left and right parts are easily confused, which frequently occurs in the back-view human body and the front-view body with legs crossed.
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
\noindent\textbf{Global Context Embedding Module} To evaluate the effectiveness of each module, we first conduct experiments by introducing a global context embedding module. In our architecture, we leverage the pyramid pooling~\cite{Zhao2017} to generate multi-scale context information. As shown in Tab.~\ref{tab:IoU}, we can find it brings about 1.5\% improvements on mIoU, which demonstrates that the multi-scale context information can assist the fine-grained parsing. Particularly, it shows significant boosts (nearly 7\%) in the class of dress. Since the long-range context information can provide the more discriminated characteristic, the global context embedding module is helpful for the big-size objects.
|
| 134 |
+
|
| 135 |
+
\noindent\textbf{High Resolution Embedding Module} To figure out the importance of the high resolution, we conduct experiments by further introducing a high resolution module. From Tab.~\ref{tab:IoU}, we can find that the performance gains nearly 2\% improvement with the high resolution embedding module. As human parsing is a fine-grained pixel-wise classification, it requires a lot of detailed information to identify the various small-size parts accurately. With high resolution embedding module, the features from shallow and high-resolution layers provide more details not available in deep layers. The results demonstrate the effectiveness as well.
|
| 136 |
+
|
| 137 |
+
\noindent\textbf{Edge Perceiving Module} Finally, we report the performance with the edge perceiving module in Tab.~\ref{tab:IoU}. Based on the above two modules, appending edge perceiving module still brings nearly 1\% boosts. That's the contours of the parts can be underlying constraints during separating the semantic parts from a human body. In addition, the features from multiple edge branches carrying various details of the objects can further promote the human parts prediction. Finally, fusing with the flipped images gives 0.6\% gain.
|
| 138 |
+
|
| 139 |
+
\noindent \textbf{Comparison with State-of-the-Arts}
|
| 140 |
+
We evaluate the performance of CE2P on the validation dataset of LIP and compare it to other state-of-the-art approaches. The results are reported in Tab.~\ref{tab:IoU_others}. First, we note that the mIoU of our CE2P significantly outperforms other approaches. The improvement over the state-of-the-art method validates the effectiveness of our CE2P for human parsing. When comparing with the current state-of-the-art approach JPPNet, our method exceeds by 1.73\% in terms of mIoU. In particular, the performance on the small-size categories, \ie `socks' and `sunglasses', yields obviously improvement. Thanks to the high resolution embedding and edge perceiving module, the details and characteristic of small objects can be captured for further pixel-level classification. Besides, the JPPNet achieves the performance of 51.37\% by utilizing extra pose annotation with a complex network structure. Nevertheless, our CE2P obtains better performance with a simpler network structure and no need for extra annotation.
|
| 141 |
+
\begin{table}[htbp]
|
| 142 |
+
\footnotesize
|
| 143 |
+
\caption{Comparison of the performance on the test set of single and multiple human parsing datasets. Here the subscript $m$ in $X_{m}$ means the mean value of $X$.}
|
| 144 |
+
\label{tab:singleChallenge}
|
| 145 |
+
\centering
|
| 146 |
+
\begin{tabular}{lccc}
|
| 147 |
+
\toprule
|
| 148 |
+
Method & pixel acc. & mean acc. & mIoU \\ \midrule
|
| 149 |
+
\multicolumn{4}{l}{Single human parsing (Track 1)} \\
|
| 150 |
+
\bf{ours} & \bf{88.92} & \bf{67.78} & \bf{57.90} \\
|
| 151 |
+
\bf{ours (single model)} & 88.24 & 67.29 & 56.50 \\
|
| 152 |
+
JD\_BUPT & 87.42 & 65.86 & 54.44 \\
|
| 153 |
+
AttEdgeNet & 87.40 & 67.17 & 54.17 \\
|
| 154 |
+
\midrule
|
| 155 |
+
Method & mIoU & $AP^r_{m}$ & $AP^r_{0.5}$ \\\midrule
|
| 156 |
+
\multicolumn{4}{l}{Multiple human parsing on CIHP (Track 2)} \\
|
| 157 |
+
\bf{ours} & \bf{63.77} & \bf{45.31} & \bf{50.94} \\
|
| 158 |
+
DMNet(2nd place) & 61.51 & 41.50 & 46.12 \\
|
| 159 |
+
PGN~\cite{gong2018instance} & 55.80 & 33.60 & 35.80 \\\midrule
|
| 160 |
+
Method & $PCP_{0.5}$ & $AP^p_{0.5}$ & $AP^p_{m}$ \\\midrule
|
| 161 |
+
\multicolumn{4}{l}{Multiple human parsing on MHP v2.0 (Track 5)} \\
|
| 162 |
+
\bf{ours} & \bf{41.82} & \bf{33.34} & \bf{42.25} \\
|
| 163 |
+
S-LAB(2nd place) & 38.27 & 31.47 & 40.71 \\
|
| 164 |
+
NAN~\cite{Zhao2018} & 32.25 & 25.14 & 41.78 \\
|
| 165 |
+
\bottomrule
|
| 166 |
+
\end{tabular}
|
| 167 |
+
\end{table}
|
| 168 |
+
|
| 169 |
+
\begin{table*}[t]
|
| 170 |
+
\footnotesize
|
| 171 |
+
\begin{center}
|
| 172 |
+
\caption{Comparisons on MHP v2.0 validation dataset} \label{tab:res_on_mhpv2}
|
| 173 |
+
\begin{tabular}{lccccccc}
|
| 174 |
+
\toprule
|
| 175 |
+
Method & mIoU & $AP^r_{0.5}$ & Mean $AP^r$ & $AP^p_{0.5}$ & Mean $AP^p$ & $PCP_{0.5}$ & Mean $PCP$ \\
|
| 176 |
+
\midrule
|
| 177 |
+
NAN~\cite{Zhao2018} & - & - & - & 24.83 & 42.77 & 34.37 & - \\
|
| 178 |
+
\bottomrule
|
| 179 |
+
$B_g$ & 38.25 & 27.32 & 24.96 & 21.63 & 37.13 & 32.59 & 34.94 \\
|
| 180 |
+
$B_{l\_1}$ & 40.18 & 30.82 & 27.95 & 24.98 & 38.72 & 36.42 & 37.54 \\
|
| 181 |
+
$B_{l\_2}$ & 40.30 & 30.75 & 28.04 & 24.46 & 38.60 & 36.09 & 37.46 \\
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
$B_{l\_1} + B_g$ & 40.48 & 30.63 & 27.79 & 29.62 & 40.52 & 39.29 & 38.46 \\
|
| 185 |
+
$B_{l\_2} + B_g$ & 40.52 & 30.67 & 27.89 & 29.29 & 40.56 & 39.13 & 38.50 \\
|
| 186 |
+
$B_{l\_1} + B_{l\_2}$ & 41.05 & 31.63 & 28.82 & 28.71 & 40.37 & 39.32 & 38.90 \\
|
| 187 |
+
$B_{l\_1} + B_{l\_2} + B_g$(M-CE2P) & 41.11 & 31.50 & 28.60 & 30.92 & 41.29 & 40.58 & 39.32 \\
|
| 188 |
+
\midrule
|
| 189 |
+
$B_g$ with refinement & 38.25 & 29.70 & 26.94 & 24.04 & 38.21 & 35.09 & 36.36 \\
|
| 190 |
+
$B_{l\_1}$ with refinement & 40.18 & 33.69 & 30.34 & 28.20 & 40.03 & 39.56 & 39.21 \\
|
| 191 |
+
$B_{l\_2}$ with refinement & 40.30 & 33.66 & 30.41 & 27.43 & 39.84 & 39.09 & 39.11 \\
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
$B_{l\_1} + B_g$ with refinement & 40.48 & 33.39 & 30.08 & 32.84 & 41.90 & 42.32 & 40.19 \\
|
| 195 |
+
$B_{l\_2} + B_g$ with refinement & 40.52 & 33.54 & 30.22 & 32.62 & 41.88 & 42.14 & 40.19 \\
|
| 196 |
+
$B_{l\_1} + B_{l\_2}$ with refinement & 41.05 & \textbf{34.58} & \textbf{31.24} & 32.39 & 41.75 & 42.64 & 40.66 \\
|
| 197 |
+
$B_{l\_1} + B_{l\_2} + B_g$(M-CE2P) with refinement & \textbf{41.11} & 34.40 & 30.97 & \textbf{34.47} & \textbf{42.70} & \textbf{43.77} & \textbf{41.06} \\
|
| 198 |
+
\bottomrule
|
| 199 |
+
\end{tabular}
|
| 200 |
+
\end{center}
|
| 201 |
+
\end{table*}
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
\begin{figure}[t]
|
| 205 |
+
\centering
|
| 206 |
+
\includegraphics[width=0.46\textwidth]{comparisionexamples.pdf}
|
| 207 |
+
\caption{Some issues of baseline model on LIP dataset. (a) The left arm (leg) is wrongly predicted as right arm (leg). (b) The dress is separated into a upper-clothes and skirt. (c) The jumpsuits is parsed into a upper-clothes and pants. (d) The coat is mislabeled as upper-clothes. }
|
| 208 |
+
\label{fig:comparision}
|
| 209 |
+
\end{figure}
|
| 210 |
+
\subsection{Multiple Human Parsing}
|
| 211 |
+
We provide abundant experimental results on two large datasets of multiple human parsing task, named CIHP and MHP v2.0.
|
| 212 |
+
The results are exhibited in %
|
| 213 |
+
Tab.~\ref{tab:res_on_mhpv2}. Due to space limitation, we only show detailed results on the more challenging MHP v2.0 dataset. The detailed explanation will be given in the following paragraphs.
|
| 214 |
+
|
| 215 |
+
\noindent \textbf{Label Refinement}
|
| 216 |
+
A remarkable improvement attributes the success to the label refinement operation. As %
|
| 217 |
+
Tab.~\ref{tab:res_on_mhpv2} shows, it exactly brings performance boosting, despite of the combination strategies. As we mentioned before, the results provided by Mask R-CNN are likely to ignore some partial area of marginal body parts, especially on complex images. However, CE2P may catch these parts from the localized human sub images. Therefore, the refinement operation can alleviate the under segmentation problem. For clarity, the following analyses are all based on refined results.
|
| 218 |
+
|
| 219 |
+
\noindent \textbf{Comparison with Various Combination Strategies}
|
| 220 |
+
To prove the effectiveness of the multi-branch fusion strategies, we perform experiments with various branch combinations. From Tab.~\ref{tab:res_on_mhpv2}, we can notice that the results produced by the double-branch model are better than that produced by the single-branch model, and the all-branch model, \ie M-CE2P, catch the best performance on most of the metrics. Especially on more convincing human-centric metrics like $AP^p$ and $PCP$, M-CE2P shows out a significant performance boosting than all the other models. It proves that branches can make complements with each other. As mentioned in the previous section, the branch $B_g$ trained with the entire image lacks the ability to grab small-scale persons in a scene, such as the first image in Fig.~\ref{fig:mhp_expe}. Hence, it only achieves the performance of 24.04\% in terms of $AP^p_{0.5}$. Nevertheless, this shortcoming can be compensated by $B_{l\_1}$ and $B_{l\_2}$ to capture a more precise view of local context. On the other hand, the benefits from $B_g$ are still cannot be ignored. %
|
| 221 |
+
The global context that $B_g$ has makes a performance improvement of 2.08\% in terms of $AP^p_{0.5}$ than the result only utilizes $B_{l\_1}$ and $B_{l\_2}$. Finally, the all-branch fused M-CE2P can reach the best performance under the $AP^p$ and $PCP$ metrics.
|
| 222 |
+
|
| 223 |
+
\begin{figure}[t]
|
| 224 |
+
\begin{center}
|
| 225 |
+
\includegraphics[width=0.8\linewidth]{./mhp_expe.png}
|
| 226 |
+
\end{center}
|
| 227 |
+
\caption{A visualized example for Multiple Human Parsing task. The areas surrounded by white bounding boxes indicate the failure cases of predicted results.}
|
| 228 |
+
\label{fig:mhp_expe}
|
| 229 |
+
\end{figure}
|
| 230 |
+
|
| 231 |
+
\noindent \textbf{Comparison with State-of-the-Arts}
|
| 232 |
+
Compared to other state-of-the-art methods, our M-CE2P model still maintains a large-margin leading edge on major metrics, as Tab.~\ref{tab:singleChallenge} and Tab.~\ref{tab:res_on_mhpv2} illustrate. On validation set of MHP v2.0, our proposed model outperforms than~\cite{Zhao2018} 9.64\%, 9.40\% in terms of $AP^p_{0.5}$ and $PCP_{0.5}$, respectively;%
|
| 233 |
+
Furthermore, on the test set of MHP v2.0, we outperform than~\cite{Zhao2018} 8.20\%, 9.57\% and 0.47\% in terms of $AP^p_{0.5}$, $PCP_{0.5}$ and mean $AP^p$, respectively; On the test set of CIHP, our M-CE2P performs 63.77\%, 45.31\%, 50.94\% in terms of mIoU, mean $AP^r$ and $AP^r_{0.5}$, respectively, which all outperform than~\cite{gong2018instance}. Above all, we investigate and combine several useful properties to improve the parsing results. Each module plays an important role and makes improvements for the final results. Benefiting from our parsing network, the prediction on the whole multi-person image already has a comparable result with baseline methods. Based on the accurate parsing results, our fusion strategy and label refinement can make further boost.
|
| 234 |
+
|
| 235 |
+
\noindent \textbf{Visualization}
|
| 236 |
+
Some visualized results with their failure cases are shown in Fig.~\ref{fig:mhp_expe}. Generally speaking, our M-CE2P can handle a rather complex scene with multiple persons, and produce a satisfactory result. %
|
| 237 |
+
However, there are also some failure cases produced by our M-CE2P. From the perspective of fusion strategy, it has following problems: 1) Under some circumstances, the $B_g$ brings too much negative confidence to parts belong to human far away from camera, so that the confidence provided by local parsing may be drastically reduced; 2) When acting sub-image fusion, the local information of tightly closed humans may be disturbed with each other. For example, in bottom line of Fig.~\ref{fig:mhp_expe}, the man with black suit make the edge of woman's skirt strongly be mistaken as other semantics.
|
| 238 |
+
\subsection{Results in Challenge}
|
| 239 |
+
With our CE2P framework, we achieved the 1st places of all three human parsing tracks in the 2nd Look into Person (LIP) Challenge. Tab.~\ref{tab:singleChallenge} shows a few of the results on the single human parsing lead-board. By integrating the results from three models with different input size, our CE2P achieved 57.9\%. More importantly, our single model already attained the state-of-arts performance without any bells and whistles. Besides, we design a M-CE2P upon our CE2P for multiple human parsing with three branches to predict from global to local view. Benefiting from the M-CE2P model, we achieved high performance in all the multiple human parsing benchmarks without refinement process, \ie CIHP and MHP v2.0, respectively. Specifically, we yielded 45.31\% of Mean $AP^r$ and 33.34\% of $AP^p_{0.5}$, which outperform the second place more than 3.81\% 1.87\%, respectively.
|
| 240 |
+
\section{Conclusion}
|
| 241 |
+
In this paper, we investigate several useful properties for human parsing, including feature resolution, global context information and edge details. We design a simple yet effective CE2P system, which consists of three key modules to incorporate the context and detailed information into a unified framework. Specifically, we use a high-resolution embedding module to capture details from shallow layer, a global context embedding module for multi-scale context information, and an edge perceiving module to constrain object contours. For multiple human parsing, we fuse three CE2P based model to generate global parsing prediction, and use a straight-forward way to produce the instance-level result with the guide of human mask. The experimental results demonstrate the superiority of the proposed CE2P.
|
| 242 |
+
\section{Acknowledgment}
|
| 243 |
+
This work was supported in part by National Key Research and Development of China (No.2017YFC1703503), National Natural Science Foundation of China (No.61532005, No.61572065), Fundamental Research Funds for the Central Universities (No. 2017YJS048, No. 2018JBZ001), Joint Fund of Ministry of Education of China and China Mobile (No.MCM20160102), IBM-ILLINOIS Center for Cognitive Computing Systems Research (C3SR) - a research collaboration as part of the IBM AI Horizons Network.
|
| 244 |
+
|
| 245 |
+
\bibliographystyle{aaai}
|
| 246 |
+
\bibliography{aaai}
|
1809.06004v2.txt
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
An AI agent working in the real world must be able to recognize the classes of things that it has seen/learned before and detect new things that it has not seen and learn to accommodate the new things. This learning paradigm is called open-world learning (OWL) (Chen and Liu, 2018; Bendale and Boult, 2015; Fei et al., 2016).This is in contrast with the classic supervised learning paradigm which makes the closed-world assumption that the classes seen in testing must have appeared in training. With the ever-changing Web, the popularity of AI agents such as intelligent assistants and self-driving cars that need to face the real-world open environment with unknowns, OWL capability is crucial.
|
| 2 |
+
|
| 3 |
+
For example, with the growing number of products sold on Amazon from various sellers, it is necessary to have an open-world model that can automatically classify a product based on a set S𝑆S of product categories.An emerging product not belonging to any existing category in S𝑆S should be classified as “unseen” rather than one from S𝑆S.Further, this unseen set may keep growing. When the number of products belonging to a new category is large enough, it should be added to S𝑆S.An open-world model should easily accommodate this addition with a low cost of training since it is impractical to retrain the model from scratch every time a new class is added.As another example, the very first interface for many intelligent personal assistants (IPA) (such as Amazon Alexa, Google Assistant, and Microsoft Cortana) is to classify user utterances into existing known domain/intent classes (e.g., Alexa’s skills) and alsoreject/detect utterances from unknown domain/intent classes (that are currently not supported).But, with the support to allow the 3rd-party to develop new skills (Apps), such IPAs must recognize new/unseen domain or intent classes and include them in the classification model(Kumar et al., 2017; Kimet al., 2018). These real-life examples present a major challenge to the maintenance of the deployed model.
|
| 4 |
+
|
| 5 |
+
Most existing solutions to OWL are built on top of closed-world models (Bendale and Boult, 2015, 2016; Fei et al., 2016; Shu et al., 2017), e.g., by setting thresholds on the logits (before the softmax/sigmoid functions) to reject unseen classes which tend to mix with existing seen classes. One major weakness of these models is that they cannot easily add new/unseen classes to the existing model without re-training or incremental training (e.g., OSDN (Bendale and Boult, 2016) and DOC (Shu et al., 2017)). There are incremental learning techniques (e.g., iCaRL (Rebuffi et al., 2017) and DEN (Leeet al., 2017)) that can incrementally learn to classify new classes. However, they miss the capability of rejecting examples from unseen classes.This paper proposes to solve OWL with both capabilities in a very different way via meta-learning.
|
| 6 |
+
|
| 7 |
+
Problem Statement: At any point in time, the learning system is aware of a set of seen classes S={c1,…,cm}𝑆subscript𝑐1…subscript𝑐𝑚S=\{c_{1},\dots,c_{m}\} and has an OWL model/classifier for S𝑆S but is unaware of a set of unseen classes U={cm+1,…}𝑈subscript𝑐𝑚1…U=\{c_{m+1},\dots\} (any class not in S𝑆S can be in U𝑈U) that the model may encounter. The goal of an OWL model is two-fold: (1) classifying examples from classes in S𝑆S and reject examples from classes in U𝑈U, and (2) when a new class cm+1subscript𝑐𝑚1c_{m+1} (without loss of generality) is removed from U𝑈U (now U={cm+2,…}𝑈subscript𝑐𝑚2…U=\{c_{m+2},\dots\}) and added to S𝑆S (now S={c1,…,cm,cm+1}𝑆subscript𝑐1…subscript𝑐𝑚subscript𝑐𝑚1S=\{c_{1},\dots,c_{m},c_{m+1}\}, still being able to perform (1) without re-training the model.
|
| 8 |
+
|
| 9 |
+
Two main challenges for solving this problem are: (1) how to enable the model to classify examples of seen classes into their respective classes and also detect/reject examples of unseen classes, and (2) how to incrementally include the new/unseen classes when they have enough data without re-training the model.
|
| 10 |
+
|
| 11 |
+
As discussed above, existing methods either focus on the challenge (1) or (2), but not both. To tackle both challenges in an unified approach, this paper proposes an entirely new OWL method based on meta-learning (Thrun and Pratt, 2012; Andrychowicz et al., 2016; Fernando et al., 2017; Finnet al., 2017, 2018). The method is called Learning to Accept Classes (L2AC). The key novelty of L2AC is that the model maintains a dynamic set S𝑆S of seen classes that allow new classes to be added or deleted with no model re-training needed. Each class is represented by a small set of training examples. In testing, the meta-classifier only uses the examples of the maintained seen classes (including the newly added classes) on-the-fly for classification and rejection. That is, the learned meta-classifier classifies or rejects a test example by comparing it with its nearest examples from each seen class in S𝑆S. Based on the comparison results, it determines whether the test example belongs to a seen class or not. If the test example is not classified as any seen class in S𝑆S, it is rejected as unseen. Unlike existing OWL models,the parameters of the meta-classifier are not trained on the set of seen classes but on a large number of other classes which can share a large number of features with seen and unseen classes, and thus can work with any seen classification and unseen class rejection without re-training.
|
| 12 |
+
|
| 13 |
+
We can see that the proposed method works like a nearest neighbor classifier (e.g., k𝑘kNN). However, the key difference is that we train a meta-classifier to perform both classification and rejection based on a learned metric and a learned voting mechanism. Also,k𝑘kNN cannot do rejection on unseen classes.
|
| 14 |
+
|
| 15 |
+
The main contributions of this paper are as follows.
|
| 16 |
+
|
| 17 |
+
(1) It proposes a novel approach (called L2AC) to OWL based on meta-learning, which is very different from existing approaches.
|
| 18 |
+
|
| 19 |
+
(2) The key advantage of L2AC is that with the meta-classifier, OWL becomes simply maintaining the seen class set S𝑆S because both seen class example classification and unseen class example rejection/detection are based on comparing the test example with the examples of each class in S𝑆S. To be able to accept/classify any new class, we only need to put the class and its examples in S𝑆S.
|
| 20 |
+
|
| 21 |
+
The proposed approach has been evaluated on product classification and the results show its competitive performance.
|
| 22 |
+
|
| 23 |
+
As an overview, Fig. 1 depicts how L2AC classifies a test example into an existing seen class or rejects it as from an unseen class. The training process for the meta-classifier is not shown, which is detailed in Sec. 2.2.The L2AC framework has two major components: a ranker and a meta-classifier.The ranker is used to retrieve some examples from a seen class that are similar/near to the test example. The meta-classifier performs classification after it reads the retrieved examples from the seen classes. The two components work together as follows.
|
| 24 |
+
|
| 25 |
+
Assume we have a set of seen classes S𝑆S.Given a test example xtsubscript𝑥𝑡x_{t} that may come from either a seen class or an unseen class, the ranker finds a list of top-k𝑘k nearest examples to xtsubscript𝑥𝑡x_{t} from each seen class c∈S𝑐𝑆c\in S, denoted as xa1:k|csubscript𝑥conditionalsubscript𝑎:1𝑘𝑐x_{a_{1:k}|c}.The meta-classifier produces the probability p(c=1|xt,xa1:k|xt,c)𝑝𝑐conditional1subscript𝑥𝑡subscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑡𝑐p(c=1|x_{t},x_{a_{1:k}|x_{t},c}) that the test xtsubscript𝑥𝑡x_{t} belongs to the seen class c𝑐c based on c𝑐c’s top-k𝑘k examples (most similar to xtsubscript𝑥𝑡x_{t}).If none of these probabilities from the seen classes in S𝑆S exceeds a threshold (e.g., 0.50.50.5 for the sigmoid function), L2AC decides that xtsubscript𝑥𝑡x_{t} is from an unseen class (rejection); otherwise, it predicts xtsubscript𝑥𝑡x_{t} as from the seen class with the highest probability (for classification).We denote p(c=1|xt,xa1:k|xt,c)𝑝𝑐conditional1subscript𝑥𝑡subscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑡𝑐p(c=1|x_{t},x_{a_{1:k}|x_{t},c}) as p(c|xt,xa1:k)𝑝conditional𝑐subscript𝑥𝑡subscript𝑥subscript𝑎:1𝑘p(c|x_{t},x_{a_{1:k}}) for brevity when necessary.Note that although we use a threshold, this is a general threshold that is not for any specific classes as in other OWL approaches but only for the meta-classifier. More practically, this threshold is pre-determined (not empirically tuned via experiments on hyper-parameter search) and the meta-classifier is trained based on this fixed threshold.
|
| 26 |
+
|
| 27 |
+
As we can see, the proposed framework works like a supervised lazy learning model, such as the k𝑘k-nearest neighbor (k𝑘kNN) classifier.Such a lazy learning mechanism allows the dynamic maintenance of a set of seen classes, where an unseen class can be easily added to the seen class set S𝑆S.However, the key differences are that all the metric space, voting and rejection are learned by the meta-classifier.
|
| 28 |
+
|
| 29 |
+
Retrieving the top-k𝑘k nearest examples xa1:ksubscript𝑥subscript𝑎:1𝑘x_{a_{1:k}} for a given test example xtsubscript𝑥𝑡x_{t} needs a ranking model (the ranker).We will detail a sample implementation of the ranker in Sec. 3and discuss the details of the meta-classifier in the next section.
|
| 30 |
+
|
| 31 |
+
Meta-classifier serves as the core component of the L2AC framework. It is essentially a binary classifier on a given seen class. It takes the top-k𝑘k nearest examples (to the test example xtsubscript𝑥𝑡x_{t}) of the seen class as the input and determines whether xtsubscript𝑥𝑡x_{t} belongs to that seen class or not.In this section, we first describe how to represent examples of a seen class. Then we describe how the meta-classifier processes these examples together with the test example into an overall probability score (via a voting mechanism) for deciding whether the test example should belong to any seen class (classification) or not (rejection). Along with that we also describe how a joint decision is made for open-world classification over a set of seen classes. Finally, we describe how to train the meta-classifier via another set of meta-training classes and their examples.
|
| 32 |
+
|
| 33 |
+
Representation learning lives at the heart of neural networks.Following the success of using pre-trained weights from large-scale image datasets (such as ImageNet (Russakovskyet al., 2015)) as feature encoders, we assume there is an encoder that captures almost all features for text classification.
|
| 34 |
+
|
| 35 |
+
Given an example x𝑥x representing a text document (a sequence of tokens), we obtain its continuous representation (a vector) via an encoder h=g(x)ℎ𝑔𝑥h=g(x), where the encoder g(⋅)𝑔⋅g(\cdot) is typically a neural network (e.g., CNN or LSTM).We will detail a simple encoder implementation in Sec. 3.
|
| 36 |
+
|
| 37 |
+
Further, we save the continuous representations of the examples into the memory of the meta-classifier.So later, the top-k𝑘k examples can be efficiently retrieved via the index (address) in the memory.The memory is essentially a matrix E∈ℝn×|h|𝐸superscriptℝ𝑛ℎE\in\mathbb{R}^{n\times|h|}, where n𝑛n is the number of all examples from seen classes and |h|ℎ|h| is the size of the hidden dimensions.Note that we will still use x𝑥x instead of hℎh to refer to an example for brevity.Given the test example xtsubscript𝑥𝑡x_{t}, the meta-classifier first looks up the actual continuous representations xa1:ksubscript𝑥subscript𝑎:1𝑘x_{a_{1:k}} of the top-k𝑘k examples for a seen class. Then the meta-classifier computes the similarity score between xtsubscript𝑥𝑡x_{t} and each xaisubscript𝑥subscript𝑎𝑖x_{a_{i}} (1≤i≤k1𝑖𝑘1\leq i\leq k) individually via a 1-vs-many matching layer as described next.
|
| 38 |
+
|
| 39 |
+
To compute the overall probability between a test example and a seen class, a 1-vs-many matching layer in the meta-classifier first computes the individual similarity score between the test example and each of the top-k𝑘k retrieved examples of the seen class.The 1-vs-many matching layer essentially consists of k𝑘k shared matching networks as indicated by big yellow triangles in Fig. 1.We denote each matching network as f(⋅,⋅)𝑓⋅⋅f(\cdot,\cdot) and compute similarity scores r1:ksubscript𝑟:1𝑘r_{1:k} for all top-k𝑘k examples r1:k=f(xt,xa1:k)subscript𝑟:1𝑘𝑓subscript𝑥𝑡subscript𝑥subscript𝑎:1𝑘r_{1:k}=f(x_{t},x_{a_{1:k}}).
|
| 40 |
+
|
| 41 |
+
The matching network first transforms the test example xtsubscript𝑥𝑡x_{t} and xaisubscript𝑥subscript𝑎𝑖x_{a_{i}} from the continuous representation space to a single example in a similarity space.We leverage two similarity functions to obtain the similarity space.The first function is the absolute values of the element-wise subtraction:fabssub(xt,xai)=|xt−xai|subscript𝑓abssubsubscript𝑥𝑡subscript𝑥subscript𝑎𝑖subscript𝑥𝑡subscript𝑥subscript𝑎𝑖f_{\text{abssub}}(x_{t},x_{a_{i}})=|x_{t}-x_{a_{i}}|.The second one is the element-wise summation:fsum(xt,xai)=xt+xaisubscript𝑓sumsubscript𝑥𝑡subscript𝑥subscript𝑎𝑖subscript𝑥𝑡subscript𝑥subscript𝑎𝑖f_{\text{sum}}(x_{t},x_{a_{i}})=x_{t}+x_{a_{i}}.Then the final similarity space is the concatenation of these two functions’ results:fsim(xt,xai)=fabssub(xt,xai)⊕fsum(xt,xai)subscript𝑓simsubscript𝑥𝑡subscript𝑥subscript𝑎𝑖direct-sumsubscript𝑓abssubsubscript𝑥𝑡subscript𝑥subscript𝑎𝑖subscript𝑓sumsubscript𝑥𝑡subscript𝑥subscript𝑎𝑖f_{\text{sim}}(x_{t},x_{a_{i}})=f_{\text{abssub}}(x_{t},x_{a_{i}})\oplus f_{\text{sum}}(x_{t},x_{a_{i}}), where ⊕direct-sum\oplus denotes the concatenation operation.We then pass the result to two fully-connected layers (one with Relu activation) and a sigmoid function:(1)ri=f(xt,xai)=σ(W2⋅Relu(W1⋅fsim(xt,xai)+b1)+b2).subscript𝑟𝑖𝑓subscript𝑥𝑡subscript𝑥subscript𝑎𝑖𝜎⋅subscript𝑊2Relu⋅subscript𝑊1subscript𝑓simsubscript𝑥𝑡subscript𝑥subscript𝑎𝑖subscript𝑏1subscript𝑏2r_{i}=f(x_{t},x_{a_{i}})=\sigma\Big{(}W_{2}\cdot\text{Relu}\big{(}W_{1}\cdot f_{\text{sim}}(x_{t},x_{a_{i}})+b_{1}\big{)}+b_{2}\Big{)}.Since there are k𝑘k nearest examples, we have k𝑘k similarity scores denoted as r1:ksubscript𝑟:1𝑘r_{1:k}.The hyper-parameters are detailed in Sec. 3.
|
| 42 |
+
|
| 43 |
+
After getting the individual similarity scores, an aggregation layer in the meta-classifier merges the k𝑘k similarity scores into a single probability indicating whether the test example xtsubscript𝑥𝑡x_{t} belongs to the seen class.By having the aggregation layer, the meta-classifier essentially has a parametric voting mechanism so that it can learn how to vote on multiple nearest examples (rather than a single example) from a seen class to decide the probability.As a result, the meta-classifier can have more reliable predictions, which is studied in Sec. 3.
|
| 44 |
+
|
| 45 |
+
We adopt a (many-to-one) BiLSTM (Hochreiter andSchmidhuber, 1997; Schuster andPaliwal, 1997) as the aggregation layer.We set the output size of BiLSTM to 2 (1 per direction of LSTM).Then the output of BiLSTM is connected to a fully-connected layer followed by a sigmoid function that outputs the probability.The computation of the meta-classifier for a given test example xtsubscript𝑥𝑡x_{t} and xa1:ksubscript𝑥subscript𝑎:1𝑘x_{a_{1:k}} for a seen class c𝑐c can be summarized as:(2)p(c|xt,xa1:k)=σ(W⋅BiLSTM(r1:k)+b).𝑝conditional𝑐subscript𝑥𝑡subscript𝑥subscript𝑎:1𝑘𝜎⋅𝑊BiLSTMsubscript𝑟:1𝑘𝑏p(c|x_{t},x_{a_{1:k}})=\sigma\big{(}W\cdot\text{BiLSTM}(r_{1:k})+b\big{)}.Inspired by DOC (Shu et al., 2017),for each class c∈S𝑐𝑆c\in S, we evaluate Eq. 2 as:(3)y^={reject, if maxc∈Sp(c|xt,xa1:k)≤0.5;argmaxc∈Sp(c|xt,xa1:k), otherwise.^𝑦casesreject if subscript𝑐𝑆𝑝conditional𝑐subscript𝑥𝑡subscript𝑥subscript𝑎:1𝑘0.5missing-subexpressionsubscriptargmax𝑐𝑆𝑝conditional𝑐subscript𝑥𝑡subscript𝑥subscript𝑎:1𝑘 otherwise.\hat{y}=\left\{\begin{array}[]{c}\textit{reject},\text{ if }\max_{c\in S}p(c|x_{t},x_{a_{1:k}})\leq 0.5;\\\\\operatorname*{arg\,max}_{c\in S}p(c|x_{t},x_{a_{1:k}}),\text{ otherwise.}\end{array}\right.If none of existing seen classes S𝑆S gives a probability above 0.50.50.5, we reject xtsubscript𝑥𝑡x_{t} as an example from some unseen class.Note that given a large number of classes, eq. 3 can be efficiently implemented in parallel. We leave this to future work.To make L2AC an easily accessible approach, we use 0.50.50.5 as the threshold naturally and do not introduce an extra hyper-parameter that needs to be artificially tuned.Note also that as discussed earlier, the seen class set S𝑆S and its examples can be dynamically maintained (e.g., one can add to or remove from S𝑆S any class). So the meta-classifier simply performs open-world classification over the current seen class set S𝑆S.
|
| 46 |
+
|
| 47 |
+
Since the meta-classifier is a general classifier that is supposed to work for any class,training the meta-classifier pθ(c|xt,xa1:k|xt,c)subscript𝑝𝜃conditional𝑐subscript𝑥𝑡subscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑡𝑐p_{\theta}(c|x_{t},x_{a_{1:k}|x_{t},c}) requires examples from another set M𝑀M of classes called meta-training classes.A large |M|𝑀|M| is desirable so that meta-training classes have good coverage of features for seen and unseen classes in testing, which is in similar spirit to few-shot learning (Lake et al., 2011).We also enforce (S∪U)∩M=∅𝑆𝑈𝑀(S\cup U)\cap M=\varnothing in Sec. 3, so that all seen and unseen classes are totally unknown to the meta-classifier.
|
| 48 |
+
|
| 49 |
+
Next, we formulate the meta-training examples from M𝑀M, which consist of a set of pairs(with positive and negative labels).The first component of a pair is a training document xqsubscript𝑥𝑞x_{q} from a class in M𝑀M, and the second component is a sequence of top-k𝑘k nearest examples also from a class in M𝑀M.
|
| 50 |
+
|
| 51 |
+
We assume every example (document) of a class in M𝑀M can be a training document xqsubscript𝑥𝑞x_{q}.Assuming xqsubscript𝑥𝑞x_{q} is from class c∈M𝑐𝑀c\in M,a positive training pair is (xq,xa1:k|xq,c)subscript𝑥𝑞subscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑞𝑐(x_{q},x_{a_{1:k}|x_{q},c}), where xa1:k|xq,csubscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑞𝑐x_{a_{1:k}|x_{q},c} are top-k𝑘k examples from class c𝑐c that are most similar or nearest to xqsubscript𝑥𝑞x_{q};a negative training pair is (xq,xa1:k|xq,c′)subscript𝑥𝑞subscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑞superscript𝑐′(x_{q},x_{a_{1:k}|x_{q},c^{\prime}}), where c′∈Msuperscript𝑐′𝑀c^{\prime}\in M, c≠c′𝑐superscript𝑐′c\neq c^{\prime} and xa1:k|xq,c′subscript𝑥conditionalsubscript𝑎:1𝑘subscript𝑥𝑞superscript𝑐′x_{a_{1:k}|x_{q},c^{\prime}} are top-k𝑘k examples from class c′superscript𝑐′c^{\prime} that are nearest to xqsubscript𝑥𝑞x_{q}.We call c′superscript𝑐′c^{\prime} one negative class for xqsubscript𝑥𝑞x_{q}.Since there are many negative classes c′∈M\csuperscript𝑐′\𝑀𝑐c^{\prime}\in M\backslash c for xqsubscript𝑥𝑞x_{q}, we keep top-n𝑛n negative classes for each training example xqsubscript𝑥𝑞x_{q}.That is, each xqsubscript𝑥𝑞x_{q} has one positive training pair and n𝑛n negative training pairs.To balance the classes in the training loss, we give a weight ratio n:1:𝑛1n:1 for a positive and a negative pair, respectively.
|
| 52 |
+
|
| 53 |
+
Training the meta-classifier also requires validation classes for model selection (during optimization) and hyper-parameters (k𝑘k and n𝑛n) tuning (as detailed in Experiments).Since the classes tested by the meta-classifier are unexpected, we further use a set of validation classes M′∩M=∅superscript𝑀′𝑀M^{\prime}\cap M=\varnothing (also M′∩(S∪U)=∅superscript𝑀′𝑆𝑈M^{\prime}\cap(S\cup U)=\varnothing), to ensure generalization on the seen/unseen classes.
|
| 54 |
+
|
| 55 |
+
We want to address the following Research Questions (RQs):RQ1 - what is the performance of the meta-classifier with different settings of top-k𝑘k examples and n𝑛n negative classes?RQ2 - How is the performance of L2AC compared with state-of-the-art text classifiers for open-world classification (which all need some forms of re-training).
|
| 56 |
+
|
| 57 |
+
We leverage the huge amount of product descriptions from the Amazon Datasets (He and McAuley, 2016) and form the OWL task as the following.Amazon.com maintains a tree-structured category system.We consider each path to a leaf node as a class.We removed products belonging to multiple classes to ensure the classes have no overlapping.This gives us 2598 classes, where 1018 classes have more than 400 products per class.We randomly choose 1000 classes from the 1018 classes with 400 randomly selected products per class as the encoder training set;100 classes with 150 products per class are used as the (classification) test set, including both seen classes S𝑆S and unseen classes U𝑈U;another 1000 classes with 100 products per class are used as the meta-training set (including both M𝑀M and M′superscript𝑀′M^{\prime}).For the 100 classes of the test set, we further hold out 50 examples (products) from each class as test examples.The rest 100 examples are training data for baselines, or seen classes examples to be read by the meta-classifier (which only reads those examples but is not trained on those examples).To train the meta-classifier, we further split the meta-training set as 900 meta-training classes (M𝑀M) and 100 validation classes (M′superscript𝑀′M^{\prime}).
|
| 58 |
+
|
| 59 |
+
For all datasets, we use NLTK222https://www.nltk.org/ as the tokenizer, and regard all words that appear more than once as the vocabulary.This gives us 17,526 unique words.We take the maximum length of each document as 120 since the majority of product descriptions are under 100 words.
|
| 60 |
+
|
| 61 |
+
We use cosine similarity to rank the examples in each seen (or meta-training) class for a given test (or meta-training) example xtsubscript𝑥𝑡x_{t} (or xqsubscript𝑥𝑞x_{q})333Given many examples to process, the ranker can be implemented in a fully parallel fashion to speed up the processing, which we leave to future work as it is beyond the scope of this work..We apply cosine directly on the hidden representations of the encoder as cosine(h∗,hai)=h∗⋅hai|h∗|2|hai|2𝑐𝑜𝑠𝑖𝑛𝑒subscriptℎsubscriptℎsubscript𝑎𝑖⋅subscriptℎsubscriptℎsubscript𝑎𝑖subscriptsubscriptℎ2subscriptsubscriptℎsubscript𝑎𝑖2cosine(h_{*},h_{a_{i}})=\frac{h_{*}\cdot h_{a_{i}}}{|h_{*}|_{2}|h_{a_{i}}|_{2}}, where ∗* can be either t𝑡t or q𝑞q, |⋅|2|\cdot|_{2} denotes the l𝑙l-2 norm and ⋅⋅\cdot denotes the dot product of two examples.
|
| 62 |
+
|
| 63 |
+
Training the meta-classifier also requires a ranking of negative classes for a meta-training example xqsubscript𝑥𝑞x_{q}, as discussed in Sec. 2.2.We first compute a class vector for each meta-training class.This class vector is averaged over all encoded representations of examples of that class.Then we rank classes by computing cosine similarity between the class vectors and the meta-training example xqsubscript𝑥𝑞x_{q}.The top-n𝑛n (defined in the previous section) classes are selected as negative classes for xqsubscript𝑥𝑞x_{q}.We explore different settings of n𝑛n later.
|
| 64 |
+
|
| 65 |
+
Similar to (Shu et al., 2017), we choose 25, 50, and 75 classes from the (classification) test set of 100 classes as the seen classes for three (3) experiments.Note that each class in the test set has 150 examples, where 100 examples are for the training of baseline methods or used as seen class examples for L2AC and 50 examples are for testing both the baselines and L2AC.We evaluate the results on all 100 classes for those three (3) experiments.For example, when there are 25 seen classes, testing examples from the rest 75 unseen classes are taken as from one rejection class crejsubscript𝑐rejc_{\text{rej}}, as in (Shu et al., 2017).
|
| 66 |
+
|
| 67 |
+
Besides using macro F1 as used in (Shu et al., 2017), we also use weighted F1 score overall classes (including seen and the rejection class) as the evaluation metric.Weighted F1 is computed as(4)∑c∈S∪{crej}Nc∑c∈S∪{crej}Nc⋅F1c,subscript𝑐𝑆subscript𝑐rej⋅subscript𝑁𝑐subscript𝑐𝑆subscript𝑐rejsubscript𝑁𝑐subscriptF1𝑐\sum_{c\in S\cup\{c_{\text{rej}}\}}\frac{N_{c}}{\sum_{c\in S\cup\{c_{\text{rej}}\}}N_{c}}\cdot\text{F1}_{c},where Ncsubscript𝑁𝑐N_{c} is the number of examples for class c𝑐c and F1csubscriptF1𝑐\text{F1}_{c} is the F1 score of that class.We use this metric because macro F1 has a bias on the importance of rejection when the seen class set is small (macro F1 treats the rejection class as equally important as one seen class).For example, when the number of seen classes is small, the rejection class should have a higher weight as a classifier on a small seen set is more likely challenged by examples from unseen classes.Further, to stabilize the results, we train all models with 10 different initializations and average the results.
|
| 68 |
+
|
| 69 |
+
For simplicity, we leverage a BiLSTM (Hochreiter andSchmidhuber, 1997; Schuster andPaliwal, 1997) on top of a GloVe (Penningtonet al., 2014) embedding (840b.300d) layer as the encoder (other choices are also possible).Similar to feature encoders trained from ImageNet (Russakovskyet al., 2015), we train classification over the encoder training set with 1000 classes and use 5% of the encoding training data as encoder validation data.We apply dropout rates of 0.5 to all layers of the encoder.The classification accuracy of the encoder on validation data is 81.76%.The matching network (the shared network within the 1-vs-many matching layer) has two fully-connected layers, where the size of the hidden dimension is 512 with a dropout rate of 0.5.We set the batch size of meta-training as 256.
|
| 70 |
+
|
| 71 |
+
To answer RQ1 on two hyper-parameters k𝑘k (number of nearest examples from each class) and n𝑛n (number of negative classes), we use the 100 validation classes to determine these two hyper-parameters.We formulate the validation data similar to the testing experiment on 50 seen classes.For each validation class, we select 50 examples for validation. The rest 50 examples from each validation seen class are used to find top-k𝑘k nearest examples.We perform grid search of averaged weighted F1 over 10 runs for k∈{1,3,5,10,15,20}𝑘135101520k\in\{1,3,5,10,15,20\} and n∈{1,3,5,9}𝑛1359n\in\{1,3,5,9\}, where k=5𝑘5k=5 and n=9𝑛9n=9 reach a reasonably well weighted F1 (87.60%). Further increasing n𝑛n gives limited improvements (e.g., 87.69% for n=14𝑛14n=14 and 87.68% for n=19𝑛19n=19, when k=5𝑘5k=5). But a large n𝑛n significantly increases the number of training examples (e.g., n=14𝑛14n=14 ended with more than 1 million meta-training examples) and thus training time. So we decide to select k=5𝑘5k=5 and n=9𝑛9n=9 for all ablation studies below.Note the validation classes are also used to compute (formulated in a way similar to the meta-training classes) the validation loss for selecting the best model during Adam (Kingma and Ba, 2014) optimization.
|
| 72 |
+
|
| 73 |
+
To the best of our knowledge, DOC (Shu et al., 2017) is the only state-of-the-art baseline for open-world learning (with rejection) for text classification. It has been shown in (Shu et al., 2017) that DOC significantly outperforms the methods CL-cbsSVM and cbsSVM in (Fei et al., 2016) and OpenMax in (Bendale and Boult, 2016). OpenMax is a state-of-the-art method for image classification with rejection capability.
|
| 74 |
+
|
| 75 |
+
To answer RQ2, we use DOC and its variants to show that the proposed method has comparable performance with the best open-world learning method with re-training.Note that DOC cannot incrementally add new classes.So we re-train DOC over different sets of seen classes from scratch every time new classes are added to that set.It is thus actually unfair to compare our method with DOC because DOC is trained on the actual training examples of all classes. However, our method still performs better in general. We used the original code of DOC and created six (6) variants of it.
|
| 76 |
+
|
| 77 |
+
DOC-CNN: CNN implementation as in the original DOC paper without Gaussian fitting (using 0.5 as the threshold for rejection). It operates directly on a sequence of tokens. DOC-LSTM: a variant of DOC-CNN, where we replace CNN with BiLSTM to encode the input sequence for fair comparison. BiLSTM is trainable and the input is still a sequence of tokens. DOC-Enc: this is adapted from DOC-CNN, where we remove the feature learning part of DOC-CNN and feed the hidden representation from our encoder directly to the fully-connected layers of DOC for a fair comparison with L2AC. DOC-*-Gaus: applying Gaussian fitting proposed in (Shu et al., 2017) on the above three baselines, we have 3 more DOC baselines.Note that these 3 baselines have exactly the same models as above respectively. They only differ in the thresholds used for rejection. Gaussian fitting in (Shu et al., 2017) is used to set a good threshold for rejection.We use these baselines to show that the Gaussian fitted threshold improves the rejection performance of DOC significantly but may lower the performance of seen class classification. The original DOC is DOC-CNN-Gaus here.
|
| 78 |
+
|
| 79 |
+
The following baselines are variants of L2AC.L2AC-n𝑛n9-NoVote: this is a variant of the proposed L2AC that only takes one most similar example (from each class), i.e., k=1𝑘1k=1, with one positive class paired with n=9𝑛9n=9 negative classes in meta-training (n=9𝑛9n=9 has the best performance as indicated in answering RQ1 above).We use this baseline to show that the performance of taking only one sample may not be good enough.This baseline clearly does not have/need the aggregation layer and only has a single matching network in the 1-vs-many layer.L2AC-n𝑛n9-Vote3: this baseline uses exactly the same model as L2AC-n𝑛n9-NoVote. But during evaluation, we allow a non-parametric voting process (like k𝑘kNN) for prediction. We report the results of voting over top-3 examples per seen class as it has the best result (ranging from 3 to 10). If the average of the top-3 similar examples in a seen class has example scores with more than 0.50.50.5, L2AC believes the testing example belongs to that class.We use this baseline to show that the aggregation layer is effective in learning to vote and L2AC can use more similar examples and get better performance.L2AC-k𝑘k5-n𝑛n9-AbsSub/Sum: To show that using two similarity functions (fabssub(⋅,⋅)subscript𝑓abssub⋅⋅f_{\text{abssub}}(\cdot,\cdot) and fsum(⋅,⋅)subscript𝑓sum⋅⋅f_{\text{sum}}(\cdot,\cdot) ) gives better results, we further perform ablation study by using only one of those similarity functions at a time, which gives us two baselines.L2AC-k𝑘k5-n𝑛n9/14/19: this baseline has the best k=5𝑘5k=5 and n=9𝑛9n=9 on the validation classes, as indicated in the previous subsection. Interestingly, further increasing k𝑘k may reduce the performance as L2AC may focus on not-so-similar examples. We also report results on n=14𝑛14n=14 or 191919 to show that the results do not get much better.
|
| 80 |
+
|
| 81 |
+
From Table 1, we can see that L2AC outperforms DOC, especially when the number of seen classes is small.First, from Fig. 2 we can see that k=5𝑘5k=5 and n=9𝑛9n=9 gets reasonably good results.Increasing k𝑘k may harm the performance as taking in more examples from a class may let L2AC focus on not-so-similar examples, which is bad for classification. More negative classes give L2AC better performance in general but further increasing n𝑛n beyond 9 has little impact.
|
| 82 |
+
|
| 83 |
+
Next, we can see that as we incrementally add more classes, L2AC gradually drops its performance (which is reasonable due to more classes) but it still yields better performance than DOC. Considering that L2AC needs no training with additional classes, while DOC needs full training from scratch, L2AC represents a major advance. Note that testing on 25 seen classes is more about testing a model’s rejection capability while testing on 75 seen classes is more about the classification performance of seen class examples.From Table 1, we notice that L2AC can effectively leverage multiple nearest examples and negative classes.In contrast, the non-parametric voting of L2AC-n𝑛n9-Vote3 over top-3 examples may not improve the performance but introduce higher variances.Our best k=5𝑘5k=5 indicates that the meta-classifier can dynamically leverage multiple nearest examples instead of solely relying on a single example.As an ablation study on the choices of similarity functions, running L2AC on a single similarity function gives poorer results as indicated by either L2AC-k𝑘k5-n𝑛n9-AbsSub or L2AC-k𝑘k5-n𝑛n9-Sum.
|
| 84 |
+
|
| 85 |
+
DOC without encoder (DOC-CNN or DOC-LSTM) performs poorly when the number of seen classes is small.Without Gaussian fitting, DOC’s (DOC-CNN, DOC-LSTM or DOC-Enc) performance increases as more classes are added as seen classes. This is reasonable as DOC is more challenged by fewer seen training classes and more unseen classes during testing.As such, Gaussian fitting (DOC-*-Gaus) alleviates the weakness of DOC on a small number of seen training classes.
|
| 86 |
+
|
| 87 |
+
Open-world learning has been studied in text mining and computer vision (where it is called open-set recognition) (Bendale and Boult, 2015; Chen and Liu, 2018; Fei et al., 2016). Most existing approaches focus on building a classifier that can predict examples from unseen classes into a (hidden) rejection class.These solutions are built on top of closed-world classification models (Bendale and Boult, 2015, 2016; Shu et al., 2017). Since a closed-world classifier cannot detect/reject examples from unseen classes (they will be classified into some seen classes), some thresholds are used so that these closed-world models can also be used to do rejection. However, as discussed earlier, when incrementally learning new classes, they also need some form of re-training, either full re-training from scratch (Bendale and Boult, 2016; Shu et al., 2017) or partial re-training in an incremental manner (Bendale and Boult, 2015; Fei et al., 2016).
|
| 88 |
+
|
| 89 |
+
Our work is also related to class incremental learning (Rebuffi et al., 2017; Rusu et al., 2016; Leeet al., 2017), where new classes can be added dynamically to the classifier. For example,iCaRL (Rebuffi et al., 2017) maintains some exemplary data for each class and incrementally tunes the classifier to support more new classes. However, they also require training when each new class is added.
|
| 90 |
+
|
| 91 |
+
Our work is clearly related to meta-learning (or learning to learn) (Thrun and Pratt, 2012),which turns the machine learning tasks themselves as training data to train a meta-model and has been successfully applied to many machine learning tasks lately, such as(Andrychowicz et al., 2016; Fernando et al., 2017; Finnet al., 2017, 2018; Fanet al., 2018).Our proposed framework focuses on learning the similarity between an example and an arbitrary class and we are not aware of any open-world learning work based on meta-learning.
|
| 92 |
+
|
| 93 |
+
The proposed framework is also related to zero-shot learning (Lampertet al., 2009; Palatucci et al., 2009; Socheret al., 2013) (in that we do not require training but need to read training examples),k𝑘k-nearest neighbors (k𝑘kNN) (with additional rejection capability, metric learning (Xinget al., 2003) and learning to vote),and Siamese networks (Bromley et al., 1994; Kochet al., 2015; Vinyals et al., 2016) (regarding processing a pair of examples).However, all those techniques work in closed-worlds with no rejection capability.
|
| 94 |
+
|
| 95 |
+
Product classification has been studied in (Shenet al., 2011, 2012; Chen and Warren, 2013; Guptaet al., 2016; Cevahir andMurakami, 2016; Kozareva, 2015), mostly in a multi-level (or hierarchical) setting. However, given the dynamic taxonomy in nature, product classification has not been studied as an open-world learning problem.
|
| 96 |
+
|
| 97 |
+
In this paper, we proposed a meta-learning framework called L2AC for open-world learning. L2AC has been applied to product classification.Compared to traditional closed-world classifiers, our meta-classifier can incrementally accept new classes by simply adding new class examples without re-training.Compared to other open-world learning methods, the rejection capability of L2AC is trained rather than realized using some empirically set thresholds. Our experiments showed superior performances to strong baselines.
|
1809.06098v2.txt
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
In recent years, policy search methods deisenroth2013survey have proved to be valuable Reinforcement Learning (RL) sutton1998reinforcement approaches thanks to their successful achievements in continuous control tasks (e.g., lillicrap2015continuous, ; schulman2015trust, ; schulman2017proximal, ; schulman2015high, ), robotic locomotion (e.g., tedrake2004stochastic, ; kober2013reinforcement, ) and partially observable environments (e.g., ng2000pegasus, ). These algorithms can be roughly classified into two categories: action-based methods sutton2000policy ; peters2008reinforcement and parameter-based methods sehnke2008policy . The former, usually known as policy gradient (PG) methods, perform a search in a parametric policy space by following the gradient of the utility function estimated by means of a batch of trajectories collected from the environment sutton1998reinforcement . In contrast, in parameter-based methods, the search is carried out directly in the space of parameters by exploiting global optimizers (e.g., rubinstein1999cross, ; hansen2001completely, ; stanley2002evolving, ; szita2006learning, ) or following a proper gradient direction like in Policy Gradients with Parameter-based Exploration (PGPE) sehnke2008policy ; wierstra2008natural ; sehnke2010parameter . A major question in policy search methods is: how should we use a batch of trajectories in order to exploit its information in the most efficient way?On one hand, on-policy methods leverage on the batch to perform a single gradient step, after which new trajectories are collected with the updated policy. Online PG methods are likely the most widespread policy search approaches: starting from the traditional algorithms based on stochastic policy gradient sutton2000policy , like REINFORCE williams1992simple and G(PO)MDP baxter2001infinite , moving toward more modern methods, such as Trust Region Policy Optimization (TRPO) schulman2015trust . These methods, however, rarely exploit the available trajectories in an efficient way, since each batch isthrown away after just one gradient update.On the other hand, off-policy methods maintain a behavioral policy, used to explore the environment and to collect samples, and a target policy which is optimized. The concept of off-policy learning is rooted in value-based RL watkins1992q ; peng1994incremental ; munos2016safe and it was first adapted to PG in degris2012off , using an actor-critic architecture. The approach has been extended to Deterministic Policy Gradient (DPG) silver2014deterministic , which allows optimizing deterministic policies while keeping a stochastic policy for exploration. More recently,an efficient version of DPG coupled with a deep neural network to represent the policy has been proposed, named Deep Deterministic Policy Gradient (DDPG) lillicrap2015continuous . In the parameter-based framework, even though the original formulation sehnke2008policy introduces an online algorithm, an extension has been proposed to efficiently reuse the trajectories in an offline scenario zhao2013efficient . Furthermore, PGPE-like approaches allow overcoming several limitations of classical PG, like the need for a stochastic policy and the high variance of the gradient estimates.111Other solutions to these problems have been proposed in the action-based literature, like the aforementioned DPG algorithm, the gradient baselines peters2008reinforcement and the actor-critic architectures konda2000actor .
|
| 2 |
+
|
| 3 |
+
While on-policy algorithms are, by nature, online, as they need to be fed with fresh samples whenever the policy is updated, off-policy methods can take advantage of mixing online and offline optimization. This can be done by alternately sampling trajectories and performing optimization epochs with the collected data. A prime example of this alternating procedure is Proximal Policy Optimization (PPO) schulman2017proximal , that has displayed remarkable performance on continuous control tasks. Off-line optimization, however, introduces further sources of approximation, as the gradient w.r.t. the target policy needs to be estimated (off-policy) with samples collected with a behavioral policy. A common choice is to adopt an importance sampling (IS) mcbook ; hesterberg1988advances estimator in which each sample is reweighted proportionally to the likelihood of being generated by the target policy. However, directly optimizing this utility function is impractical since it displays a wide variance most of the times mcbook . Intuitively, the variance increases proportionally to the distance between the behavioral and the target policy; thus, the estimate is reliable as long as the two policies are close enough. Preventing uncontrolled updates in the space of policy parameters is at the core of the natural gradient approaches amari1998natural applied effectively both on PG methods kakade2002approximately ; peters2008natural ; wierstra2008natural and on PGPE methods miyamae2010natural . More recently, this idea has been captured (albeit indirectly) by TRPO, which optimizes via (approximate) natural gradient a surrogate objective function, derived from safe RL kakade2002approximately ; pirotta2013safe , subject to a constraint on the Kullback-Leibler divergence between the behavioral and target policy.222Note that this regularization term appears in the performance improvement bound, which contains exact quantities only. Thus, it does not really account for the uncertainty derived from the importance sampling. Similarly, PPO performs a truncation of the importance weights to discourage the optimization process from going too far. Although TRPO and PPO, together with DDPG, represent the state-of-the-art policy optimization methods in RL for continuous control, they do not explicitly encode in their objective function the uncertainty injected by the importance sampling procedure. A more theoretically grounded analysis has been provided for policy selection doroudi2017importance , model-free thomas2015high and model-based thomas2016data policy evaluation (also accounting for samples collected with multiple behavioral policies), and combined with options guo2017using . Subsequently, in thomas2015high2 these methods have been extended for policy improvement, deriving a suitable concentration inequality for the case of truncated importance weights. Unfortunately, these methods are hardly scalable to complex control tasks. A more detailed review of the state-of-the-art policy optimization algorithms is reported in Appendix A.
|
| 4 |
+
|
| 5 |
+
In this paper, we propose a novel, model-free, actor-only, policy optimization algorithm, named Policy Optimization via Importance Sampling (POIS) that mixes online and offline optimization to efficiently exploit the information contained in the collected trajectories. POIS explicitly accounts for the uncertainty introduced by the importance sampling by optimizing a surrogate objective function. The latter captures the trade-offbetween the estimated performance improvement and the variance injected by the importance sampling.The main contributions of this paper aretheoretical, algorithmic and experimental. After revising some notions about importance sampling (Section 3), we propose a concentration inequality, of independent interest, for high-confidence “off-distribution” optimization of objective functions estimated via importance sampling (Section 4). Then weshow how this bound can be customized into a surrogate objective function in order to either search in the space of policies (Action-based POIS) or to search in the space of parameters (Parameter-bases POIS). The resulting algorithm (in both the action-based and the parameter-based flavor) collects, at each iteration, a set of trajectories. These are used to perform offline optimization of the surrogate objective via gradient ascent (Section 5), after which a new batch of trajectories is collected using the optimized policy. Finally, we provide an experimental evaluation with both linear policies and deep neural policies to illustrate the advantages and limitations of our approach compared to state-of-the-art algorithms (Section 6) on classical control tasks duan2016benchmarking ; todorov2012mujoco . The proofs for all Theorems and Lemmas are reported in Appendix B. The implementation of POIS can be found at https://github.com/T3p/pois.
|
| 6 |
+
|
| 7 |
+
A discrete-time Markov Decision Process (MDP) puterman2014markov is defined asa tuple ℳ=(𝒮,𝒜,P,R,γ,D)ℳ𝒮𝒜𝑃𝑅𝛾𝐷\mathcal{M}=(\mathcal{S},\mathcal{A},P,R,\gamma,D) where𝒮𝒮\mathcal{S} is the state space, 𝒜𝒜\mathcal{A} is the action space,P(⋅|s,a)P(\cdot|s,a) is a Markovian transition model that assigns for each state-action pair (s,a)𝑠𝑎(s,a) the probability of reaching the next state s′superscript𝑠′s^{\prime}, γ∈[0,1]𝛾01\gamma\in{[0,1]} is the discount factor, R(s,a)∈[−Rmax,Rmax]𝑅𝑠𝑎subscript𝑅subscript𝑅R(s,a)\in[-R_{\max},R_{\max}] assigns the expected reward for performing action a𝑎a in state s𝑠s and D𝐷D is the distribution of the initial state. The behavior of an agent is described by a policy π(⋅|s)\pi(\cdot|s) that assigns for each state s𝑠s the probability of performing action a𝑎a. A trajectory τ∈𝒯𝜏𝒯\tau\in\mathcal{T} is a sequence of state-action pairs τ=(sτ,0,aτ,0,…,sτ,H−1,aτ,H−1,sτ,H)𝜏subscript𝑠𝜏0subscript𝑎𝜏0…subscript𝑠𝜏𝐻1subscript𝑎𝜏𝐻1subscript𝑠𝜏𝐻\tau=(s_{\tau,0},a_{\tau,0},\dots,s_{\tau,H-1},a_{\tau,H-1},s_{\tau,H}), where H𝐻H is the actual trajectory horizon. The performance of an agent is evaluated in terms of the expected return, i.e., the expected discounted sum of the rewards collected along the trajectory: 𝔼τ[R(τ)]subscript𝔼𝜏𝑅𝜏\operatorname*{\mathbb{E}}_{\tau}\left[R(\tau)\right], where R(τ)=∑t=0H−1γtR(sτ,t,aτ,t)𝑅𝜏superscriptsubscript𝑡0𝐻1superscript𝛾𝑡𝑅subscript𝑠𝜏𝑡subscript𝑎𝜏𝑡R(\tau)=\sum_{t=0}^{H-1}\gamma^{t}R(s_{\tau,t},a_{\tau,t}) is the trajectory return.
|
| 8 |
+
|
| 9 |
+
We focus our attention to the case in which the policy belongs to a parametric policy space ΠΘ={π𝜽:𝜽∈Θ⊆ℝp}subscriptΠΘconditional-setsubscript𝜋𝜽𝜽Θsuperscriptℝ𝑝\Pi_{\Theta}=\{\pi_{\bm{\mathbf{\theta}}}:\bm{\mathbf{\theta}}\in\Theta\subseteq\mathbb{R}^{p}\}. In parameter-based approaches, the agent is equipped with a hyperpolicy ν𝜈\nu used to sample the policy parameters at the beginning of each episode. The hyperpolicy belongs itself to a parametric hyperpolicy space 𝒩𝒫={ν𝝆:𝝆∈𝒫⊆ℝr}subscript𝒩𝒫conditional-setsubscript𝜈𝝆𝝆𝒫superscriptℝ𝑟\mathcal{N}_{\mathcal{P}}=\{\nu_{\bm{\mathbf{\rho}}}:\bm{\mathbf{\rho}}\in\mathcal{P}\subseteq\mathbb{R}^{r}\}.The expected return can be expressed, in the parameter-based case, as a double expectation: one over the policy parameter space ΘΘ\Theta and one over the trajectory space 𝒯𝒯\mathcal{T}:JD(𝝆)=∫Θ∫𝒯ν𝝆(𝜽)p(τ|𝜽)R(τ)dτd𝜽,subscript𝐽𝐷𝝆subscriptΘsubscript𝒯subscript𝜈𝝆𝜽𝑝conditional𝜏𝜽𝑅𝜏differential-d𝜏differential-d𝜽J_{D}(\bm{\mathbf{\rho}})=\int_{{\Theta}}\int_{\mathcal{T}}\nu_{\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})p(\tau|\bm{\mathbf{\theta}})R(\tau)\,\mathrm{d}\tau\,\mathrm{d}\bm{\mathbf{\theta}},(1)where p(τ|𝜽)=D(s0)∏t=0H−1π𝜽(at|st)P(st+1|st,at)𝑝conditional𝜏𝜽𝐷subscript𝑠0superscriptsubscriptproduct𝑡0𝐻1subscript𝜋𝜽conditionalsubscript𝑎𝑡subscript𝑠𝑡𝑃conditionalsubscript𝑠𝑡1subscript𝑠𝑡subscript𝑎𝑡p(\tau|\bm{\mathbf{\theta}})=D(s_{0})\prod_{t=0}^{H-1}\pi_{\bm{\mathbf{\theta}}}(a_{t}|s_{t})P(s_{t+1}|s_{t},a_{t}) is the trajectory density function. The goal of a parameter-based learning agent is to determine the hyperparameters 𝝆∗superscript𝝆\bm{\mathbf{\rho}}^{*} so as to maximize JD(𝝆)subscript𝐽𝐷𝝆J_{D}(\bm{\mathbf{\rho}}). If ν𝝆subscript𝜈𝝆\nu_{\bm{\mathbf{\rho}}} is stochastic and differentiable, the hyperparameters can be learned according to the gradient ascent update: 𝝆′=𝝆+α∇𝝆JD(𝝆)superscript𝝆′𝝆𝛼subscript∇𝝆subscript𝐽𝐷𝝆\bm{\mathbf{\rho}}^{\prime}=\bm{\mathbf{\rho}}+\alpha\nabla_{\bm{\mathbf{\rho}}}J_{D}(\bm{\mathbf{\rho}}), where α>0𝛼0\alpha>0 is the step size and ∇𝝆JD(𝝆)=∫Θ∫𝒯ν𝝆(𝜽)p(τ|𝜽)∇𝝆logν𝝆(𝜽)R(τ)dτd𝜽subscript∇𝝆subscript𝐽𝐷𝝆subscriptΘsubscript𝒯subscript𝜈𝝆𝜽𝑝conditional𝜏𝜽subscript∇𝝆subscript𝜈𝝆𝜽𝑅𝜏differential-d𝜏differential-d𝜽\nabla_{\bm{\mathbf{\rho}}}J_{D}(\bm{\mathbf{\rho}})=\int_{\Theta}\int_{\mathcal{T}}\nu_{\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})p(\tau|\bm{\mathbf{\theta}})\nabla_{\bm{\mathbf{\rho}}}\log\nu_{\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})R(\tau)\,\mathrm{d}\tau\,\mathrm{d}\bm{\mathbf{\theta}}. Since the stochasticity of the hyperpolicy is a sufficient source of exploration, deterministic action policies of the kind π𝜽(a|s)=δ(a−u𝜽(s))subscript𝜋𝜽conditional𝑎𝑠𝛿𝑎subscript𝑢𝜽𝑠\pi_{\bm{\mathbf{\theta}}}(a|s)=\delta(a-u_{\bm{\mathbf{\theta}}}(s)) are typically considered, where δ𝛿\delta is the Dirac delta function and u𝜽subscript𝑢𝜽u_{\bm{\mathbf{\theta}}} is a deterministic mapping from 𝒮𝒮\mathcal{S} to 𝒜𝒜\mathcal{A}. In the action-based case, on the contrary, the hyperpolicy ν𝝆subscript𝜈𝝆\nu_{\bm{\mathbf{\rho}}} is a deterministic distribution ν𝝆(𝜽)=δ(𝜽−g(𝝆))subscript𝜈𝝆𝜽𝛿𝜽𝑔𝝆\nu_{\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})=\delta(\bm{\mathbf{\theta}}-g({\bm{\mathbf{\rho}}})), where g(𝝆)𝑔𝝆g({\bm{\mathbf{\rho}}}) is a deterministic mapping from 𝒫𝒫\mathcal{P} to ΘΘ\Theta. For this reason, the dependence on 𝝆𝝆\bm{\mathbf{\rho}} is typically not represented and the expected return expression simplifies into a single expectation over the trajectory space 𝒯𝒯\mathcal{T}:JD(𝜽)=∫𝒯p(τ|𝜽)R(τ)dτ.subscript𝐽𝐷𝜽subscript𝒯𝑝conditional𝜏𝜽𝑅𝜏differential-d𝜏J_{D}(\bm{\mathbf{\theta}})=\int_{\mathcal{T}}p(\tau|\bm{\mathbf{\theta}})R(\tau)\,\mathrm{d}\tau.(2)An action-based learning agent aims to find the policy parameters 𝜽∗superscript𝜽\bm{\mathbf{\theta}}^{*} that maximize JD(𝜽)subscript𝐽𝐷𝜽J_{D}(\bm{\mathbf{\theta}}). In this case, we need to enforce exploration by means of the stochasticity of π𝜽subscript𝜋𝜽\pi_{\bm{\mathbf{\theta}}}. For stochastic and differentiable policies, learning can be performed via gradient ascent: 𝜽′=𝜽+α∇𝜽JD(𝜽)superscript𝜽′𝜽𝛼subscript∇𝜽subscript𝐽𝐷𝜽\bm{\mathbf{\theta}}^{\prime}=\bm{\mathbf{\theta}}+\alpha\nabla_{\bm{\mathbf{\theta}}}J_{D}(\bm{\mathbf{\theta}}), where ∇𝜽JD(𝜽)=∫𝒯p(τ|𝜽)∇𝜽logp(τ|𝜽)R(τ)dτsubscript∇𝜽subscript𝐽𝐷𝜽subscript𝒯𝑝conditional𝜏𝜽subscript∇𝜽𝑝conditional��𝜽𝑅𝜏differential-d𝜏\nabla_{\bm{\mathbf{\theta}}}J_{D}(\bm{\mathbf{\theta}})=\int_{\mathcal{T}}p(\tau|\bm{\mathbf{\theta}})\nabla_{\bm{\mathbf{\theta}}}\log p(\tau|\bm{\mathbf{\theta}})R(\tau)\,\mathrm{d}\tau.
|
| 10 |
+
|
| 11 |
+
In off-policy evaluation thomas2015high ; thomas2016data , we aim to estimate the performance of a target policy πTsubscript𝜋𝑇\pi_{T} (or hyperpolicy νTsubscript𝜈𝑇\nu_{T}) given samples collected with a behavioral policy πBsubscript𝜋𝐵\pi_{B} (or hyperpolicy νBsubscript𝜈𝐵\nu_{B}). More generally, we face the problem of estimating the expected value of a deterministic bounded function f𝑓f (‖f‖∞<+∞subscriptnorm𝑓\|f\|_{\infty}<+\infty) of random variable x𝑥x taking values in 𝒳𝒳\mathcal{X} under a target distribution P𝑃P, after having collected samples from a behavioral distribution Q𝑄Q. The importance sampling estimator (IS) cochran2007sampling ; mcbook corrects the distribution with the importance weights (or Radon–Nikodym derivative or likelihood ratio) wP/Q(x)=p(x)/q(x)subscript𝑤𝑃𝑄𝑥𝑝𝑥𝑞𝑥w_{P/Q}(x)=p(x)/q(x):μ^P/Q=1N∑i=1Np(xi)q(xi)f(xi)=1N∑i=1NwP/Q(xi)f(xi),subscript^𝜇𝑃𝑄1𝑁superscriptsubscript𝑖1𝑁𝑝subscript𝑥𝑖𝑞subscript𝑥𝑖𝑓subscript𝑥𝑖1𝑁superscriptsubscript𝑖1𝑁subscript𝑤𝑃𝑄subscript𝑥𝑖𝑓subscript𝑥𝑖\widehat{\mu}_{P/Q}=\frac{1}{N}\sum_{i=1}^{N}\frac{p(x_{i})}{q(x_{i})}f(x_{i})=\frac{1}{N}\sum_{i=1}^{N}w_{P/Q}(x_{i})f(x_{i}),(3)where 𝐱=(x1,x2,…,xN)T𝐱superscriptsubscript𝑥1subscript𝑥2…subscript𝑥𝑁𝑇\bm{\mathbf{x}}=(x_{1},x_{2},\dots,x_{N})^{T} is sampled from Q𝑄Q and we assume q(x)>0𝑞𝑥0q(x)>0 whenever f(x)p(x)≠0𝑓𝑥𝑝𝑥0f(x)p(x)\neq 0. This estimator is unbiased (𝔼𝐱∼Q[μ^P/Q]=𝔼x∼P[f(x)]subscript𝔼similar-to𝐱𝑄subscript^𝜇𝑃𝑄subscript𝔼similar-to𝑥𝑃𝑓𝑥\operatorname*{\mathbb{E}}_{\bm{\mathbf{x}}\sim Q}[\widehat{\mu}_{P/Q}]=\operatorname*{\mathbb{E}}_{x\sim P}[f(x)]) but it may exhibit an undesirable behavior due to the variability of the importance weights, showing, in some cases, infinite variance. Intuitively, the magnitude of the importance weights provides an indication of how much the probability measures P𝑃P and Q𝑄Q are dissimilar. This notion can be formalized by the Rényi divergence renyi1961measures ; van2014renyi , an information-theoretic dissimilarity indexbetween probability measures.
|
| 12 |
+
|
| 13 |
+
Let P𝑃P and Q𝑄Q be two probability measures on a measurable space (𝒳,ℱ)𝒳ℱ(\mathcal{X},\mathcal{F}) such that P≪Qmuch-less-than𝑃𝑄P\ll Q (P𝑃P is absolutely continuous w.r.t. Q𝑄Q) and Q𝑄Q is σ𝜎\sigma-finite. Let P𝑃P and Q𝑄Q admit p𝑝p and q𝑞q as Lebesgue probability density functions (p.d.f.), respectively. The α𝛼\alpha-Rényi divergence is defined as:Dα(P∥Q)=1α−1log∫𝒳(dPdQ)αdQ=1α−1log∫𝒳q(x)(p(x)q(x))αdx,subscript𝐷𝛼conditional𝑃𝑄1𝛼1subscript𝒳superscriptd𝑃d𝑄𝛼differential-d𝑄1𝛼1subscript𝒳𝑞𝑥superscript𝑝𝑥𝑞𝑥𝛼differential-d𝑥D_{\alpha}(P\|Q)=\frac{1}{\alpha-1}\log\int_{\mathcal{X}}\left(\frac{\,\mathrm{d}P}{\,\mathrm{d}Q}\right)^{\alpha}\,\mathrm{d}Q=\frac{1}{\alpha-1}\log\int_{\mathcal{X}}q(x)\left(\frac{p(x)}{q(x)}\right)^{\alpha}\,\mathrm{d}x,(4)where dP/dQd𝑃d𝑄\,\mathrm{d}P/\,\mathrm{d}Q is the Radon–Nikodym derivative of P𝑃P w.r.t. Q𝑄Q and α∈[0,∞]𝛼0\alpha\in[0,\infty]. Some remarkable cases are: α=1𝛼1\alpha=1 when D1(P∥Q)=DKL(P∥Q)subscript𝐷1conditional𝑃𝑄subscript𝐷KLconditional𝑃𝑄D_{1}(P\|Q)=D_{\mathrm{KL}}(P\|Q) and α=∞𝛼\alpha=\infty yielding D∞(P∥Q)=logesssup𝒳dP/dQsubscript𝐷conditional𝑃𝑄subscriptesssup𝒳d𝑃d𝑄D_{\infty}(P\|Q)=\log\operatorname*{ess\,sup}_{\mathcal{X}}\,\mathrm{d}P/\,\mathrm{d}Q.Importing the notation from cortes2010learning , we indicate the exponentiated α𝛼\alpha-Rényi divergence as dα(P∥Q)=exp(Dα(P∥Q))subscript𝑑𝛼conditional𝑃𝑄subscript𝐷𝛼conditional𝑃𝑄d_{\alpha}(P\|Q)=\exp\left(D_{\alpha}(P\|Q)\right).With little abuse of notation, we will replace Dα(P∥Q)subscript𝐷𝛼conditional𝑃𝑄D_{\alpha}(P\|Q) with Dα(p∥q)subscript𝐷𝛼conditional𝑝𝑞D_{\alpha}(p\|q) whenever possible within the context.
|
| 14 |
+
|
| 15 |
+
The Rényi divergence provides a convenient expression for the moments of the importance weights: 𝔼x∼Q[wP/Q(x)α]=dα(P∥Q)subscript𝔼similar-to𝑥𝑄subscript𝑤𝑃𝑄superscript𝑥𝛼subscript𝑑𝛼conditional𝑃𝑄\operatorname*{\mathbb{E}}_{x\sim Q}\left[w_{P/Q}(x)^{\alpha}\right]=d_{\alpha}(P\|Q). Moreover, 𝕍arx∼Q[wP/Q(x)]=d2(P∥Q)−1subscript𝕍arsimilar-to𝑥𝑄subscript𝑤𝑃𝑄𝑥subscript𝑑2conditional𝑃𝑄1\operatorname*{\mathbb{V}\mathrm{ar}}_{x\sim Q}\left[w_{P/Q}(x)\right]=d_{2}(P\|Q)-1 and esssupx∼QwP/Q��(x)=d∞(P∥Q)subscriptesssupsimilar-to𝑥𝑄subscript𝑤𝑃𝑄𝑥subscript𝑑conditional𝑃𝑄\operatorname*{ess\,sup}_{x\sim Q}w_{P/Q}(x)=d_{\infty}(P\|Q) cortes2010learning . To mitigate the variance problem of the IS estimator, we can resort to the self-normalized importance sampling estimator (SN) cochran2007sampling :μ~P/Q=∑i=1NwP/Q(xi)f(xi)∑i=1NwP/Q(xi)=∑i=1Nw~P/Q(xi)f(xi),subscript~𝜇𝑃𝑄superscriptsubscript𝑖1𝑁subscript𝑤𝑃𝑄subscript𝑥𝑖𝑓subscript𝑥𝑖superscriptsubscript𝑖1𝑁subscript𝑤𝑃𝑄subscript𝑥𝑖superscriptsubscript𝑖1𝑁subscript~𝑤𝑃𝑄subscript𝑥𝑖𝑓subscript𝑥𝑖\widetilde{\mu}_{P/Q}=\frac{\sum_{i=1}^{N}w_{P/Q}(x_{i})f(x_{i})}{\sum_{i=1}^{N}w_{P/Q}(x_{i})}=\sum_{i=1}^{N}\widetilde{w}_{P/Q}(x_{i})f(x_{i}),(5)where w~P/Q(x)=wP/Q(x)/∑i=1NwP/Q(xi)subscript~𝑤𝑃𝑄𝑥subscript𝑤𝑃𝑄𝑥superscriptsubscript𝑖1𝑁subscript𝑤𝑃𝑄subscript𝑥𝑖\widetilde{w}_{P/Q}(x)=w_{P/Q}(x)/\sum_{i=1}^{N}w_{P/Q}(x_{i}) is the self-normalized importance weight. Differently from μ^P/Qsubscript^𝜇𝑃𝑄\widehat{\mu}_{P/Q}, μ~P/Qsubscript~𝜇𝑃𝑄\widetilde{\mu}_{P/Q} is biased but consistent mcbook and it typically displays a more desirable behavior because of its smaller variance.333Note that |μ~P/Q|≤‖f‖∞subscript~𝜇𝑃𝑄subscriptnorm𝑓\left|\widetilde{\mu}_{P/Q}\right|\leq\|f\|_{\infty}. Therefore, its variance is always finite. Given the realization x1,x2,…,xNsubscript𝑥1subscript𝑥2…subscript𝑥𝑁x_{1},x_{2},\dots,x_{N} we can interpret the SN estimator as the expected value of f𝑓f under an approximation of the distribution P𝑃P made by N𝑁N deltas, i.e., p~(x)=∑i=1Nw~P/Q(x)δ(x−xi)~𝑝𝑥superscriptsubscript𝑖1𝑁subscript~𝑤𝑃𝑄𝑥𝛿𝑥subscript𝑥𝑖\widetilde{p}(x)=\sum_{i=1}^{N}\widetilde{w}_{P/Q}(x)\delta(x-x_{i}). The problem of assessing the quality of the SN estimator has been extensively studied by the simulation community, producing several diagnostic indexes to indicate when the weights might displayproblematic behavior mcbook . The effective sample size (ESSESS\mathrm{ESS}) was introduced in kong1992note as the number of samples drawn from P𝑃P so that the variance of the Monte Carlo estimator μ~P/Psubscript~𝜇𝑃𝑃\widetilde{\mu}_{P/P} is approximately equal to the variance of the SN estimator μ~P/Qsubscript~𝜇𝑃𝑄\widetilde{\mu}_{P/Q} computed with N𝑁N samples. Here we report the original definition and its most common estimate:ESS(P∥Q)=N𝕍arx∼Q[wP/Q(x)]+1=Nd2(P∥Q),ESS^(P∥Q)=1∑i=1Nw~P/Q(xi)2.formulae-sequenceESSconditional𝑃𝑄𝑁subscript𝕍arsimilar-to𝑥𝑄subscript𝑤𝑃𝑄𝑥1𝑁subscript𝑑2conditional𝑃𝑄^ESSconditional𝑃𝑄1superscriptsubscript𝑖1𝑁subscript~𝑤𝑃𝑄superscriptsubscript𝑥𝑖2\mathrm{ESS}(P\|Q)=\frac{N}{\operatorname*{\mathbb{V}\mathrm{ar}}_{x\sim Q}\left[w_{P/Q}(x)\right]+1}=\frac{N}{d_{2}(P\|Q)},\quad\widehat{\mathrm{ESS}}(P\|Q)=\frac{1}{\sum_{i=1}^{N}\widetilde{w}_{P/Q}(x_{i})^{2}}.(6)The ESSESS\mathrm{ESS} has an interesting interpretation: if d2(P∥Q)=1subscript𝑑2conditional𝑃𝑄1d_{2}(P\|Q)=1, i.e., P=Q𝑃𝑄P=Q almost everywhere, then ESS=NESS𝑁\mathrm{ESS}=N since we are performing Monte Carlo estimation. Otherwise, the ESSESS\mathrm{ESS} decreases as the dissimilarity between the two distributions increases. In the literature, other ESSESS\mathrm{ESS}-like diagnostics have been proposed that also account for the nature of f𝑓f martino2017effective .
|
| 16 |
+
|
| 17 |
+
The off-policy optimization problem thomas2015high2 can be formulated as finding the best target policy πTsubscript𝜋𝑇\pi_{T} (or hyperpolicy νTsubscript𝜈𝑇\nu_{T}), i.e., the one maximizing the expected return, having access to a set of samples collected with a behavioral policy πBsubscript𝜋𝐵\pi_{B} (or hyperpolicy νBsubscript𝜈𝐵\nu_{B}). In a more abstract sense, we aim to determine the target distribution P𝑃P that maximizes 𝔼x∼P[f(x)]subscript𝔼similar-to𝑥𝑃𝑓𝑥\operatorname*{\mathbb{E}}_{x\sim P}[f(x)] having samplescollected from the fixed behavioral distribution Q𝑄Q. In this section, we analyze the problem of defining a proper objective function for thispurpose. Directly optimizing the estimator μ^P/Qsubscript^𝜇𝑃𝑄\widehat{\mu}_{P/Q} or μ~P/Qsubscript~𝜇𝑃𝑄\widetilde{\mu}_{P/Q} is, in most of the cases, unsuccessful. With enough freedom in choosing P𝑃P, the optimal solution would assign as much probability mass as possible to the maximum value among f(xi)𝑓subscript𝑥𝑖f(x_{i}). Clearly, in this scenario, the estimator is unreliable and displays a large variance. For this reason, we adopt a risk-averse approach and we decide to optimize a statistical lower bound of the expected value 𝔼x∼P[f(x)]subscript𝔼similar-to𝑥𝑃𝑓𝑥\operatorname*{\mathbb{E}}_{x\sim P}[f(x)] that holds with high confidence.We start by analyzing the behavior of the IS estimator and we provide the following result that bounds the variance of μ^P/Qsubscript^𝜇𝑃𝑄\widehat{\mu}_{P/Q} in terms of the Renyi divergence.
|
| 18 |
+
|
| 19 |
+
When P=Q𝑃𝑄P=Q almost everywhere, we get 𝕍ar𝐱∼Q[μ^Q/Q]≤1N‖f‖∞2subscript𝕍arsimilar-to𝐱𝑄subscript^𝜇𝑄𝑄1𝑁superscriptsubscriptnorm𝑓2\operatorname*{\mathbb{V}\mathrm{ar}}_{\bm{\mathbf{x}}\sim Q}\left[\widehat{\mu}_{Q/Q}\right]\leq\frac{1}{N}\|f\|_{\infty}^{2}, a well-known bound on the variance of a Monte Carlo estimator. Recalling the definition of ESS (6) we can rewrite the previous bound as: 𝕍ar𝐱∼Q[μ^P/Q]≤‖f‖∞2ESS(P∥Q)subscript𝕍arsimilar-to𝐱𝑄subscript^𝜇𝑃𝑄superscriptsubscriptnorm𝑓2ESSconditional𝑃𝑄\operatorname*{\mathbb{V}\mathrm{ar}}_{\bm{\mathbf{x}}\sim Q}\left[\widehat{\mu}_{P/Q}\right]\leq\frac{\|f\|_{\infty}^{2}}{\mathrm{ESS}(P\|Q)}, i.e., the variance scales with ESS instead of N𝑁N.While μ^P/Qsubscript^𝜇𝑃𝑄\widehat{\mu}_{P/Q} can have unbounded variance even if f𝑓f is bounded, the SN estimator μ~P/Qsubscript~𝜇𝑃𝑄\widetilde{\mu}_{P/Q} is always bounded by ‖f‖∞subscriptnorm𝑓\|f\|_{\infty} and therefore it always has a finite variance. Since the normalization term makes all the samples w~P/Q(xi)f(xi)subscript~𝑤𝑃𝑄subscript𝑥𝑖𝑓subscript𝑥𝑖\widetilde{w}_{P/Q}(x_{i})f(x_{i}) interdependent, an exact analysis of its bias and variance is more challenging. Several works adopted approximate methods to provide an expression for the variance hesterberg1988advances . We propose an analysis of bias and variance of the SN estimator in Appendix D.
|
| 20 |
+
|
| 21 |
+
Finding a suitable concentration inequality for off-policy learning was studied in thomas2015high for offline policy evaluation and subsequently in thomas2015high2 for optimization. On one hand, fully empirical concentration inequalities, like Student-T, besides the asymptotic approximation, are not suitable in this case since the empirical variance needs to be estimated with importance sampling as well injecting further uncertainty mcbook . On the other hand, several distribution-free inequalities like Hoeffding require knowing the maximum of the estimator, which might not exist (d∞(P∥Q)=∞subscript𝑑conditional𝑃𝑄d_{\infty}(P\|Q)=\infty) for the IS estimator. Constraining d∞(P∥Q)subscript𝑑conditional𝑃𝑄d_{\infty}(P\|Q) to be finite often introduces unacceptable limitations. For instance, in the case of univariate Gaussian distributions, it prevents a step that selects a target variance larger than the behavioral one from being performed (see Appendix C).444Although the variancetends to be reduced in the learning process, there might be cases in which it needs to be increased (e.g., suppose we startwith a behavioral policy with small variance, it might be beneficial increasing the variance to enforce exploration). Even Bernstein inequalities bercu2015concentration , are hardly applicable since, for instance, in the case of univariate Gaussian distributions, the importance weights display a fat tail behavior (see Appendix C). We believe that a reasonable trade-off is to require the variance of the importance weights to be finite, that is equivalent to require d2(P∥Q)<∞subscript𝑑2conditional𝑃𝑄d_{2}(P\|Q)<\infty, i.e., σP<2σQsubscript𝜎𝑃2subscript𝜎𝑄\sigma_{P}<2\sigma_{Q} for univariate Gaussians. For this reason, we resort to Chebyshev-like inequalities and we propose the following concentration bound derived from Cantelli’s inequality and customized for the IS estimator.
|
| 22 |
+
|
| 23 |
+
The bound highlights the interesting trade-off between the estimated performance and the uncertainty introduced by changing the distribution. The latter enters in the bound as the 2-Rényi divergence between the target distribution P𝑃P and the behavioral distribution Q𝑄Q. Intuitively, we should trust the estimator μ^P/Qsubscript^𝜇𝑃𝑄\widehat{\mu}_{P/Q} as long as P𝑃P is not too far from Q𝑄Q.For the SN estimator, accounting for the bias, we are able to obtain a bound (reported in Appendix D), with a similar dependence on P𝑃P as in Theorem 4.1, albeit with different constants.Renaming all constants involved in the bound of Theorem 4.1 as λ=‖f‖∞(1−δ)/δ𝜆subscriptnorm𝑓1𝛿𝛿\lambda=\|f\|_{\infty}\sqrt{(1-\delta)/\delta}, we get a surrogate objective function. The optimization can be carried out in different ways. The following section shows why using the natural gradient could be a successful choice in case P𝑃P and Q𝑄Q can be expressed as parametric differentiable distributions.
|
| 24 |
+
|
| 25 |
+
We can look at a parametric distribution P𝝎subscript𝑃𝝎P_{\bm{\mathbf{\omega}}}, having p𝝎subscript𝑝𝝎p_{\bm{\mathbf{\omega}}} as a density function, as a point on a probability manifold with coordinates 𝝎∈Ω𝝎Ω\bm{\mathbf{\omega}}\in\Omega.If p𝝎subscript𝑝𝝎p_{\bm{\mathbf{\omega}}} is differentiable, the Fisher Information Matrix (FIM) rao1992information ; amari2012differential is defined as: ℱ(𝝎)=∫𝒳p𝝎(x)∇𝝎logp𝝎(x)∇𝝎logp𝝎(x)Tdxℱ𝝎subscript𝒳subscript𝑝𝝎𝑥subscript∇𝝎subscript𝑝𝝎𝑥subscript∇𝝎subscript𝑝𝝎superscript𝑥𝑇differential-d𝑥\mathcal{F}(\bm{\mathbf{\omega}})=\int_{\mathcal{X}}p_{\bm{\mathbf{\omega}}}(x)\nabla_{\bm{\mathbf{\omega}}}\log p_{\bm{\mathbf{\omega}}}(x)\nabla_{\bm{\mathbf{\omega}}}\log p_{\bm{\mathbf{\omega}}}(x)^{T}\,\mathrm{d}x. This matrix is, up to a scale, an invariant metric amari1998natural on parameter space ΩΩ\Omega, i.e., κ(𝝎′−𝝎)Tℱ(𝝎)(𝝎′−𝝎)𝜅superscriptsuperscript𝝎′𝝎𝑇ℱ𝝎superscript𝝎′𝝎\kappa{(\bm{\mathbf{\omega}}^{\prime}-\bm{\mathbf{\omega}})^{T}\mathcal{F}(\bm{\mathbf{\omega}})(\bm{\mathbf{\omega}}^{\prime}-\bm{\mathbf{\omega}})} is independent on the specific parameterization and provides a second order approximation of the distance between p𝝎subscript𝑝𝝎p_{\bm{\mathbf{\omega}}} and p𝝎′subscript𝑝superscript𝝎′p_{\bm{\mathbf{\omega}}^{\prime}} on the probability manifold up to a scale factor κ∈ℝ𝜅ℝ\kappa\in\mathbb{R}.Given a loss function ℒ(𝝎)ℒ𝝎\mathcal{L}(\bm{\mathbf{\omega}}), we define the natural gradient amari1998natural ; kakade2002natural as ∇~𝝎ℒ(𝝎)=ℱ−1(𝝎)∇𝝎ℒ(𝝎)subscript~∇𝝎ℒ𝝎superscriptℱ1𝝎subscript∇𝝎ℒ𝝎\widetilde{\nabla}_{\bm{\mathbf{\omega}}}\mathcal{L}(\bm{\mathbf{\omega}})=\mathcal{F}^{-1}(\bm{\mathbf{\omega}})\nabla_{\bm{\mathbf{\omega}}}\mathcal{L}(\bm{\mathbf{\omega}}), which represents the steepest ascent direction in the probability manifold. Thanks to the invariance property, there is a tight connection between the geometry induced by the Rényi divergence and the Fisher information metric.
|
| 26 |
+
|
| 27 |
+
This result provides an approximate expression for the variance of the importance weights, as 𝕍arx∼p𝝎[w𝝎′/𝝎(x)]=d2(p𝝎′∥p𝝎)−1≃α2(𝝎′−𝝎)Tℱ(𝝎)(𝝎′−𝝎)subscript𝕍arsimilar-to𝑥subscript𝑝𝝎subscript𝑤superscript𝝎′𝝎𝑥subscript𝑑2conditionalsubscript𝑝superscript𝝎′subscript𝑝𝝎1similar-to-or-equals𝛼2superscriptsuperscript𝝎′𝝎𝑇ℱ𝝎superscript𝝎′𝝎\operatorname*{\mathbb{V}\mathrm{ar}}_{x\sim p_{\bm{\mathbf{\omega}}}}\left[w_{\bm{\mathbf{\omega}}^{\prime}/\bm{\mathbf{\omega}}}(x)\right]=d_{2}(p_{\bm{\mathbf{\omega}}^{\prime}}\|p_{\bm{\mathbf{\omega}}})-1\simeq\frac{\alpha}{2}\left(\bm{\mathbf{\omega}}^{\prime}-\bm{\mathbf{\omega}}\right)^{T}\mathcal{F}(\bm{\mathbf{\omega}})\left(\bm{\mathbf{\omega}}^{\prime}-\bm{\mathbf{\omega}}\right). It also justifies the use of natural gradients in off-distribution optimization, since a step in natural gradient direction has a controllable effect on the variance of the importance weights.
|
| 28 |
+
|
| 29 |
+
In this section, we discuss how to customize the bound provided in Theorem 4.1 for policy optimization, developing a novel model-free actor-only policy search algorithm, named Policy Optimization via Importance Sampling (POIS). We propose two versions of POIS: Action-based POIS (A-POIS), which is based on a policy gradient approach, and Parameter-based POIS (P-POIS), which adopts the PGPE framework. A more detailed description of the implementation aspects is reported in Appendix E.
|
| 30 |
+
|
| 31 |
+
In Action-based POIS (A-POIS) we search for a policy that maximizes the performance index JD(𝜽)subscript𝐽𝐷𝜽J_{D}(\bm{\mathbf{\theta}}) within a parametric space ΠΘ={π𝜽:𝜽∈Θ⊆ℝp}subscriptΠΘconditional-setsubscript𝜋𝜽𝜽Θsuperscriptℝ𝑝\Pi_{\Theta}=\{\pi_{\bm{\mathbf{\theta}}}:\bm{\mathbf{\theta}}\in\Theta\subseteq\mathbb{R}^{p}\} of stochastic differentiable policies.In this context, the behavioral (resp. target) distribution Q𝑄Q (resp. P𝑃P) becomes the distribution over trajectories p(⋅|𝜽)p(\cdot|\bm{\mathbf{\theta}}) (resp. p(⋅|𝜽′)p(\cdot|\bm{\mathbf{\theta}}^{\prime})) induced by the behavioral policy π𝜽subscript𝜋𝜽\pi_{\bm{\mathbf{\theta}}} (resp. target policy π𝜽′subscript𝜋superscript𝜽′\pi_{\bm{\mathbf{\theta}}^{\prime}}) and f𝑓f is the trajectory return R(τ)𝑅𝜏R(\tau) which is uniformly bounded as |R(τ)|≤Rmax1−γH1−γ𝑅𝜏subscript𝑅1superscript𝛾𝐻1𝛾|R(\tau)|\leq R_{\max}\frac{1-\gamma^{H}}{1-\gamma}.555When γ→1→𝛾1\gamma\rightarrow 1 the bound becomes HRmax𝐻subscript𝑅HR_{\max}.The surrogate loss function cannot be directly optimized via gradient ascent since computing dα(p(⋅|𝜽′)∥p(⋅|𝜽))d_{\alpha}\left(p(\cdot|{\bm{\mathbf{\theta}}^{\prime}})\|p(\cdot|{\bm{\mathbf{\theta}}})\right) requires the approximation of an integral over the trajectory space and, for stochastic environments, to know the transition model P𝑃P, which is unknown in a model-free setting.Simple bounds to this quantity, like dα(p(⋅|𝜽′)∥p(⋅|𝜽))≤sups∈𝒮dα(π𝜽′(⋅|s)∥π𝜽(⋅|s))Hd_{\alpha}\left(p(\cdot|{\bm{\mathbf{\theta}}^{\prime}})\|p(\cdot|{\bm{\mathbf{\theta}}})\right)\leq\sup_{s\in\mathcal{S}}d_{\alpha}\left(\pi_{\bm{\mathbf{\theta}}^{\prime}}(\cdot|s)\|\pi_{\bm{\mathbf{\theta}}}(\cdot|s)\right)^{H}, besides being hard to compute due to the presence of the supremum, are extremely conservative since the Rényi divergence is raised to the horizon H𝐻H.We suggest the replacement of the Rényi divergence with an estimate d^2(p(⋅|𝜽′)∥p(⋅|𝜽))=1N∑i=1N∏t=0H−1d2(π𝜽′(⋅|sτi,t)∥π𝜽(⋅|sτi,t))\widehat{d}_{2}\left(p(\cdot|\bm{\mathbf{\theta}}^{\prime})\|p(\cdot|\bm{\mathbf{\theta}})\right)=\frac{1}{N}\sum_{i=1}^{N}\prod_{t=0}^{H-1}d_{2}\left(\pi_{\bm{\mathbf{\theta}}^{\prime}}(\cdot|s_{\tau_{i},t})\|\pi_{\bm{\mathbf{\theta}}}(\cdot|s_{\tau_{i},t})\right) defined only in terms of the policy Rényi divergence (see Appendix E.2 for details). Thus, we obtain the following surrogate objective:ℒλA−POIS(𝜽′/𝜽)=1N∑i=1Nw𝜽′/𝜽(τi)R(τi)−λd^2(p(⋅|𝜽′)∥p(⋅|𝜽))N,\mathcal{L}_{\lambda}^{\mathrm{A-POIS}}(\bm{\mathbf{\theta^{\prime}}}/\bm{\mathbf{\theta}})=\frac{1}{N}\sum_{i=1}^{N}w_{\bm{\mathbf{\theta}}^{\prime}/\bm{\mathbf{\theta}}}(\tau_{i})R(\tau_{i})-\lambda\sqrt{\frac{\widehat{d}_{2}\left(p(\cdot|\bm{\mathbf{\theta}}^{\prime})\|p(\cdot|\bm{\mathbf{\theta}})\right)}{N}},(9)where w𝜽′/𝜽(τi)=p(τi|𝜽′)p(τi|𝜽)=∏t=0H−1π𝜽′(aτi,t|sτi,t)π𝜽(aτi,t|sτi,t)subscript𝑤superscript𝜽′𝜽subscript𝜏𝑖𝑝conditionalsubscript𝜏𝑖superscript𝜽′𝑝conditionalsubscript𝜏𝑖𝜽superscriptsubscriptproduct𝑡0𝐻1subscript𝜋superscript𝜽′conditionalsubscript𝑎subscript𝜏𝑖𝑡subscript𝑠subscript𝜏𝑖𝑡subscript𝜋𝜽conditionalsubscript𝑎subscript𝜏𝑖𝑡subscript𝑠subscript𝜏𝑖𝑡w_{\bm{\mathbf{\theta}}^{\prime}/\bm{\mathbf{\theta}}}(\tau_{i})=\frac{p(\tau_{i}|\bm{\mathbf{\theta}}^{\prime})}{p(\tau_{i}|\bm{\mathbf{\theta}})}=\prod_{t=0}^{H-1}\frac{\pi_{\bm{\mathbf{\theta}}^{\prime}}(a_{\tau_{i},t}|s_{\tau_{i},t})}{\pi_{\bm{\mathbf{\theta}}}(a_{\tau_{i},t}|s_{\tau_{i},t})}. We consider the case in which π𝜽(⋅|s)\pi_{\bm{\mathbf{\theta}}}(\cdot|s) is a Gaussian distribution over actions whose mean depends on the state and whose covariance is state-independent and diagonal: 𝒩(u𝝁(s),diag(𝝈2))𝒩subscript𝑢𝝁𝑠diagsuperscript𝝈2\mathcal{N}(u_{\bm{\mathbf{\mu}}}(s),\mathrm{diag}(\bm{\mathbf{\sigma}}^{2})), where 𝜽=(𝝁,𝝈)𝜽𝝁𝝈\bm{\mathbf{\theta}}=(\bm{\mathbf{\mu}},\bm{\mathbf{\sigma}}). The learning process mixes online and offline optimization. At each online iteration j𝑗j, a dataset of N𝑁N trajectories is collected by executing in the environment the current policy π𝜽0jsubscript𝜋subscriptsuperscript𝜽𝑗0\pi_{\bm{\mathbf{\theta}}^{j}_{0}}. These trajectories are used to optimize the surrogate loss function ℒλA−POISsuperscriptsubscriptℒ𝜆APOIS\mathcal{L}_{\lambda}^{\mathrm{A-POIS}}. At each offline iteration k𝑘k, the parameters are updated via gradient ascent: 𝜽k+1j=𝜽kj+αk𝒢(𝜽kj)−1∇𝜽kjℒ(𝜽kj/𝜽0j)superscriptsubscript𝜽𝑘1𝑗superscriptsubscript𝜽𝑘𝑗subscript𝛼𝑘𝒢superscriptsubscriptsuperscript𝜽𝑗𝑘1subscript∇superscriptsubscript𝜽𝑘𝑗ℒsubscriptsuperscript𝜽𝑗𝑘subscriptsuperscript𝜽𝑗0\bm{\mathbf{\theta}}_{k+1}^{j}=\bm{\mathbf{\theta}}_{k}^{j}+\alpha_{k}{\mathcal{G}}(\bm{\mathbf{\theta}}^{j}_{k})^{-1}{\nabla}_{\bm{\mathbf{\theta}}_{k}^{j}}{\mathcal{L}}(\bm{\mathbf{\theta}}^{j}_{k}/\bm{\mathbf{\theta}}^{j}_{0}), where αk>0subscript𝛼𝑘0\alpha_{k}>0 is the step size which is chosen via line search (see Appendix E.1) and 𝒢(𝜽kj)𝒢subscriptsuperscript𝜽𝑗𝑘{\mathcal{G}}(\bm{\mathbf{\theta}}^{j}_{k}) is a positive semi-definite matrix (e.g., ℱ(𝜽kj)ℱsuperscriptsubscript𝜽𝑘𝑗{\mathcal{F}}(\bm{\mathbf{\theta}}_{k}^{j}), the FIM, for natural gradient)666The FIM needs to be estimated via importance sampling as well, as shown in Appendix E.3.. The pseudo-code of POIS is reported in Algorithm 1.
|
| 32 |
+
|
| 33 |
+
In the Parameter-based POIS (P-POIS) we again consider a parametrized policy space ΠΘ={π𝜽:𝜽∈Θ⊆ℝp}subscriptΠΘconditional-setsubscript𝜋𝜽𝜽Θsuperscriptℝ𝑝\Pi_{\Theta}=\{\pi_{\bm{\mathbf{\theta}}}:\bm{\mathbf{\theta}}\in\Theta\subseteq\mathbb{R}^{p}\}, but π𝜽subscript𝜋𝜽\pi_{\bm{\mathbf{\theta}}} needs not be differentiable. The policy parameters 𝜽𝜽\bm{\mathbf{\theta}} are sampled at the beginning of each episode from a parametric hyperpolicy ν𝝆subscript𝜈𝝆\nu_{\bm{\mathbf{\rho}}} selected in a parametric space 𝒩𝒫={ν𝝆:𝝆∈𝒫⊆ℝr}subscript𝒩𝒫conditional-setsubscript𝜈𝝆𝝆𝒫superscriptℝ𝑟{\mathcal{N}_{\mathcal{P}}=\{\nu_{\bm{\mathbf{\rho}}}:\bm{\mathbf{\rho}}\in\mathcal{P}\subseteq\mathbb{R}^{r}\}}. The goal is to learn the hyperparameters 𝝆𝝆\bm{\mathbf{\rho}} so as to maximize JD(𝝆)subscript𝐽𝐷𝝆J_{D}(\bm{\mathbf{\rho}}). In this setting, the distributions Q𝑄Q and P𝑃P of Section 4 correspond to the behavioral ν𝝆subscript𝜈𝝆\nu_{\bm{\mathbf{\rho}}} and target ν𝝆′subscript𝜈superscript𝝆′\nu_{\bm{\mathbf{\rho}}^{\prime}} hyperpolicies, while f𝑓f remains the trajectory return R(τ)𝑅𝜏R(\tau).The importance weights zhao2013efficient must take into account all sources of randomness, derived from sampling a policy parameter 𝜽𝜽\bm{\mathbf{\theta}} and a trajectory τ𝜏\tau: w𝝆′/𝝆(𝜽)=ν𝝆′(𝜽)p(τ|𝜽)ν𝝆(𝜽)p(τ|𝜽)=ν𝝆′(𝜽)ν𝝆(𝜽)subscript𝑤superscript𝝆′𝝆𝜽subscript𝜈superscript𝝆′𝜽𝑝conditional𝜏𝜽subscript𝜈𝝆𝜽𝑝conditional𝜏𝜽subscript𝜈superscript𝝆′𝜽subscript𝜈𝝆𝜽w_{\bm{\mathbf{\rho}}^{\prime}/\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})=\frac{\nu_{\bm{\mathbf{\rho}}^{\prime}}(\bm{\mathbf{\theta}})p(\tau|\bm{\mathbf{\theta}})}{\nu_{\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})p(\tau|\bm{\mathbf{\theta}})}=\frac{\nu_{\bm{\mathbf{\rho}}^{\prime}}(\bm{\mathbf{\theta}})}{\nu_{\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}})}.In practice, a Gaussian hyperpolicy ν𝝆subscript𝜈𝝆\nu_{\bm{\mathbf{\rho}}} with diagonal covariance matrix is often used, i.e., 𝒩(𝝁,diag(𝝈2))𝒩𝝁diagsuperscript𝝈2\mathcal{N}(\bm{\mathbf{\mu}},\mathrm{diag}(\bm{\mathbf{\sigma}}^{2})) with 𝝆=(𝝁,𝝈)𝝆𝝁𝝈\bm{\mathbf{\rho}}=(\bm{\mathbf{\mu}},\bm{\mathbf{\sigma}}). The policy is assumed to be deterministic: π𝜽(a|s)=δ(a−u𝜽(s))subscript𝜋𝜽conditional𝑎𝑠𝛿𝑎subscript𝑢𝜽𝑠\pi_{\bm{\mathbf{\theta}}}(a|s)=\delta(a-u_{\bm{\mathbf{\theta}}}(s)), where u𝜽subscript𝑢𝜽u_{\bm{\mathbf{\theta}}} is a deterministic function of the state s𝑠s (e.g., sehnke2010parameter, ; gruttnermulti, ).A first advantage over the action-based setting is that the distribution of the importance weights is entirely known, as it is the ratio of two Gaussians and the Rényi divergence d2(ν𝝆′∥ν𝝆)subscript𝑑2conditionalsubscript𝜈superscript𝝆′subscript𝜈𝝆d_{2}(\nu_{\bm{\mathbf{\rho}}^{\prime}}\|\nu_{\bm{\mathbf{\rho}}}) can be computed exactly burbea1984convexity (see Appendix C). This leads to the following surrogate objective:ℒλP−POIS(𝝆′/𝝆)=1N∑i=1Nw𝝆′/𝝆(𝜽i)R(τi)−λd2(ν𝝆′∥ν𝝆)N,superscriptsubscriptℒ𝜆PPOISsuperscript𝝆′𝝆1𝑁superscriptsubscript𝑖1𝑁subscript𝑤superscript𝝆′𝝆subscript𝜽𝑖𝑅subscript𝜏𝑖𝜆subscript𝑑2conditionalsubscript𝜈superscript𝝆′subscript𝜈𝝆𝑁\displaystyle\mathcal{L}_{\lambda}^{\mathrm{P-POIS}}(\bm{\mathbf{\rho}}^{\prime}/\bm{\mathbf{\rho}})=\frac{1}{N}\sum_{i=1}^{N}w_{\bm{\mathbf{\rho}}^{\prime}/\bm{\mathbf{\rho}}}(\bm{\mathbf{\theta}}_{i})R(\tau_{i})-\lambda\sqrt{\frac{d_{2}\left(\nu_{\bm{\mathbf{\rho}}^{\prime}}\|\nu_{\bm{\mathbf{\rho}}}\right)}{N}},(10)where each trajectory τisubscript𝜏𝑖\tau_{i} is obtained by running an episode with action policy π𝜽isubscript𝜋subscript𝜽𝑖\pi_{\bm{\mathbf{\theta}}_{i}}, and the corresponding policy parameters 𝜽isubscript𝜽𝑖\bm{\mathbf{\theta}}_{i} are sampled independently from hyperpolicy ν𝝆subscript𝜈𝝆\nu_{\bm{\mathbf{\rho}}}, at the beginning of each episode. The hyperpolicy parameters are then updated offline as 𝝆k+1j=𝝆kj+αk𝒢(𝝆kj)−1∇𝝆kjℒ(𝝆kj/𝝆0j)superscriptsubscript𝝆𝑘1𝑗superscriptsubscript𝝆𝑘𝑗subscript𝛼𝑘𝒢superscriptsubscriptsuperscript𝝆𝑗𝑘1subscript∇superscriptsubscript𝝆𝑘𝑗ℒsubscriptsuperscript𝝆𝑗𝑘subscriptsuperscript𝝆𝑗0\bm{\mathbf{\rho}}_{k+1}^{j}=\bm{\mathbf{\rho}}_{k}^{j}+\alpha_{k}\mathcal{G}(\bm{\mathbf{\rho}}^{j}_{k})^{-1}{\nabla}_{\bm{\mathbf{\rho}}_{k}^{j}}{\mathcal{L}}(\bm{\mathbf{\rho}}^{j}_{k}/\bm{\mathbf{\rho}}^{j}_{0}) (see Algorithm 2 for the complete pseudo-code).A further advantage w.r.t. the action-based case is that the FIM ℱ(𝝆)ℱ𝝆\mathcal{F(\bm{\mathbf{\rho}})} can be computed exactly, and it is diagonal in the case of a Gaussian hyperpolicy with diagonal covariance matrix, turning a problematic inversion into a trivial division (the FIM is block-diagonal in the more general case of a Gaussian hyperpolicy, as observed in miyamae2010natural ). This makes natural gradient much more enticing for P-POIS.
|
| 34 |
+
|
| 35 |
+
In this section, we present the experimental evaluation of POIS in its two flavors (action-based and parameter-based). We first provide aset of empirical comparisons on classical continuous control tasks with linearly parametrized policies; we then show how POIS can be also adopted for learning deep neural policies. In all experiments, for the A-POIS we used the IS estimator, while for P-POIS we employed the SN estimator. All experimental details are provided in Appendix F.
|
| 36 |
+
|
| 37 |
+
Linear parametrized Gaussian policies proved their ability to scale on complex control tasks rajeswaran2017towards . In this section, we compare the learning performance of A-POIS and P-POIS against TRPO schulman2015trust and PPO schulman2017proximal on classical continuous control benchmarks duan2016benchmarking .In Figure 1, we can see that both versions of POIS are able to significantly outperform both TRPO and PPO in the Cartpole environments, especially the P-POIS. In the Inverted Double Pendulum environment the learning curve of P-POIS is remarkable while A-POIS displays a behavior comparable to PPO. In the Acrobot task, P-POIS displays abetter performance w.r.t. TRPO and PPO, but A-POIS does not keep up. In Mountain Car, we see yet another behavior: the learning curves of TRPO, PPO and P-POIS are almost one-shot (even if PPO shows a small instability), while A-POIS fails to display such a fast convergence. Finally, in the Inverted Pendulum environment, TRPO and PPO outperform both versions of POIS. This example highlights a limitation of our approach. Since POIS performs an importance sampling procedure at trajectory level, it cannot assign credit to good actions in bad trajectories. On the contrary, weighting each sample, TRPO and PPO are able also to exploit good trajectory segments. In principle, this problem can be mitigated in POIS by resorting to per-decision importance sampling precup2000eligibility , in which the weight is assigned to individual rewards instead of trajectory returns.Overall, POIS displays a performance comparable with TRPO and PPO across the tasks. In particular, P-POIS displays a better performance w.r.t. A-POIS. However, this ordering is not maintained when moving to more complex policy architectures, as shown in the next section.
|
| 38 |
+
|
| 39 |
+
In Figure 2 we show, for several metrics, the behavior of A-POIS when changing the δ𝛿\delta parameter in the Cartpole environment. We can see that when δ𝛿\delta is small (e.g., 0.20.20.2), the Effective Sample Size (ESSESS\mathrm{ESS}) remains large and, consequently, the variance of the importance weights (𝕍ar[w]𝕍ar𝑤\operatorname*{\mathbb{V}\mathrm{ar}}[w]) is small. This means that the penalization term in the objective function discourages the optimization process from selecting policies which are far from the behavioral policy. As a consequence, the displayed behavior is very conservative, preventing the policy from reaching the optimum. On the contrary, when δ𝛿\delta approaches 1, the ESS is smaller and the variance of the weights tends to increase significantly. Again, the performance remains suboptimal as the penalization term in the objective function is too light. The best behavior is obtained with an intermediate value of δ𝛿\delta, specifically 0.40.40.4.
|
| 40 |
+
|
| 41 |
+
In this section, we adopt a deep neural network (3 layers: 100, 50, 25 neurons each) to represent the policy. The experiment setup is fully compatible with the classical benchmark duan2016benchmarking . While A-POIS can be directly applied to deep neural networks, P-POIS exhibits some critical issues. A highly dimensional hyperpolicy (like a Gaussian from which the weights of an MLP policy are sampled) can make d2(ν𝝆′∥ν𝝆)subscript𝑑2conditionalsubscript𝜈superscript𝝆′subscript𝜈𝝆d_{2}(\nu_{\bm{\mathbf{\rho}}^{\prime}}\|\nu_{\bm{\mathbf{\rho}}}) extremely sensitive to small parameter changes, leading to over-conservative updates.777This curse of dimensionality, related to dim(𝜽)dimension𝜽\dim(\bm{\mathbf{\theta}}), has some similarities with the dependence of the Rényi divergence on the actual horizon H𝐻H in the action-based case. A first practical variant comes from the insight that d2(ν𝝆′∥ν𝝆)/Nsubscript𝑑2conditionalsubscript𝜈superscript𝝆′subscript𝜈𝝆𝑁d_{2}(\nu_{\bm{\mathbf{\rho}}^{\prime}}\|\nu_{\bm{\mathbf{\rho}}})/N is the inverse of the effective sample size, as reported in Equation 6. We can obtain a less conservative (although approximate) surrogate function by replacing it with 1/ESS^(ν𝝆′∥ν𝝆)1^ESSconditionalsubscript𝜈superscript𝝆′subscript𝜈𝝆1/\widehat{\mathrm{ESS}}(\nu_{\bm{\mathbf{\rho}}^{\prime}}\|\nu_{\bm{\mathbf{\rho}}}). Another trick is to model the hyperpolicy as a set of independent Gaussians, each defined over a disjoint subspace of ΘΘ\Theta (implementation details are provided in Appendix E.5).In Table 1, we augmented the results provided in duan2016benchmarking withthe performance of POIS for the considered tasks. We can see that A-POIS is able to reach an overall behavior comparable with the best of the action-based algorithms, approaching TRPO and beating DDPG. Similarly, P-POIS exhibits a performance similar to CEM szita2006learning , the best performing among the parameter-based methods. The complete results are reported in Appendix F.
|
| 42 |
+
|
| 43 |
+
In this paper, we presented a new actor-only policy optimization algorithm, POIS, whichalternates online and offline optimization in order to efficiently exploit the collected trajectories, and can be used in combination withaction-based and parameter-based exploration. In contrast to the state-of-the-art algorithms,POIS has a strong theoretical grounding, since its surrogate objective functionderives from a statistical bound on the estimated performance, that is able to capturethe uncertainty induced by importance sampling. The experimental evaluationshowed that POIS, in both its versions (action-based and parameter-based), isable to achieve a performance comparable with TRPO, PPO and other classical algorithms on continuous control tasks.Natural extensions of POIS could focus on employing per-decision importance sampling, adaptive batch size, and trajectory reuse. Future work also includes scaling POIS to high-dimensional tasks and highly-stochastic environments.We believe that this work represents a valuable starting point for a deeperunderstanding of modern policy optimization and for the development of effective and scalablepolicy search methods.
|
| 44 |
+
|
| 45 |
+
The study was partially funded by Lombardy Region (Announcement PORFESR 2014-2020).F.F. was partially funded through ERC Advanced Grant (no: 742870).
|
1809.06214v1.txt
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
The image description generation (IDG) problem concerns about generating a natural language description that transcribes an input image. Over the years, tremendous effort has been dedicated to developing models that are descriptive. However, little effort is dedicated to generating descriptions that are \emph{stylish} (e.g.\ romantic, lyric, etc). Even for the handful of stylish IDG models that exist, they only have a loose control over the style. Ideally, a stylish IDG model should allow users to flexibly control over the generated descriptions as shown in Fig \ref{fig:Introduction}. Such a model would be useful for increasing user engagement in applications requiring human interaction such as chatbot and social media sharing.
|
| 3 |
+
|
| 4 |
+
A naive approach to tackle the stylish IDG problem is to collect new corpora of paired images and descriptions for training. However, this is expensive. For each style that we wish to generate, we have to ask human annotators to write the romantic descriptions for each image in the training dataset.
|
| 5 |
+
|
| 6 |
+
In this paper, we propose a controllable stylish IDG model. Our model is jointly trained with a paired unstylish image description corpus (source domain) and a monolingual corpus of the specific style (target domain). In this setting, our model can learn to generate various styles without collecting new paired data in the target domain. Our main contribution is to show that the layer normalization can be used to disentangle language styles from the content of source and target domains via a small tweak. This design enables us to use the shared content to generate descriptions that are more relevant to the image as well as control the style by plugging in a set of style-specific parameters. We refer this mechanism as Domain Layer Normalization (DLN) since we treat each style as the target domain in the domain transfer setting.%
|
| 7 |
+
|
| 8 |
+
We conduct an extensive experimental evaluation to validate the proposed approach using both subjective and objective performance metrics. We evaluate our model on four different styles, including fairy tale, romance, humor, and country song lyrics style (lyrics). Experiment results show that our model generates stylish descriptions that are more preferred by human subjects. It also outperforms prior works on the objective performance metrics.
|
| 9 |
+
\begin{figure}[t!]
|
| 10 |
+
\centering
|
| 11 |
+
\includegraphics[scale=0.26]{a3i_fig1.pdf}
|
| 12 |
+
\caption{An ideal IDG can generate stylish descriptions for the given image. The generated descriptions should relate to the image content with different language styles.}
|
| 13 |
+
\label{fig:Introduction}
|
| 14 |
+
\end{figure}
|
| 15 |
+
\section{Related Works}
|
| 16 |
+
\noindent \textbf{Visual style transfer.} Image style transfer has been widely studied in computer vision. Gatys et al.~\cite{gatys2015neural} synthesize a new stylish image by recombining image content with style features extracted from different images. Dumoulin et al.~\cite{45832} propose to learn the style embedding of visual artistic style by conditioning on the parameter of batch normalization~\cite{43442}. Huang et al.~\cite{huang2017arbitrary} use adaptive instance norm. More recent approaches use the generative adversarial network (GAN)~\cite{NIPS2014_5423} to align and transfer images from different domains. Liu et al.~\cite{NIPS2016_6544} employ weight-sharing assumption to learn the shared latent code between two domains and further propose translation stream in~\cite{NIPS2017_6672} to encourage the same image in two domains to be mapped into common latent code. While our method is similar to these works in high level, the discrete property of language required new model design.
|
| 17 |
+
|
| 18 |
+
\noindent \textbf{Language style transfer.} Supervised learning can be used to generate various linguistic attribute (e.g., different sentiments and different degrees of descriptiveness), but it requires a significant amount of labeled data. Many recent works assume there exist a share content space and a latent style vector between two non-parallel corpora for unsupervised language style transfer. Shen et al.~\cite{shen2017style} propose an encoder-decoder structure with adversarial training to learning this space. Following the same line, Melnyk et al.~\cite{melnyk2017improved} introduce content preservation loss and classification loss to improve the transfer performance. Fu et al.~\cite{fu2018style} propose to use a multi-decoder for different styles and a discriminator to learn a shared content code. Zhang et al.~\cite{zhang2018shaped} also use similar structure by using shared and private encoder-decoder. In a recent work, Prabhumoye et al.~\cite{prab2018style} introduce to ground the sentence in translation model, then apply adversarial training to get the desired style. What differs us from prior works is that we require generated stylish descriptions to match the visual content. Moreover, the style transferred in our work is more abstract instead of explicit styles such as sentiment, gender, or authorship in previous works.
|
| 19 |
+
|
| 20 |
+
\noindent\textbf{Image description generation.} Several works have been proposed to generate image descriptions by using paired image description data~\cite{vinyals2015show,krause2016paragraphs,liang2017recurrent}. To increase the naturalness and diversity of generated descriptions, Dai et al.~\cite{dai2017towards} apply adversarial training approach to train an evaluator to score the quality of generated descriptions. Chen et al.~\cite{chen2017show} propose an adversarial training procedure to adapt image captioning style using unpaired images and captions. A new objective is proposed in~\cite{dai2017contrastive} to enhance the distinctiveness of generated captions. On the other hand, there exist a few works proposed to enhance the attractiveness and style of the generated descriptions. Zhu et al.~\cite{zhu2015aligning} align the book and the corresponding movie release to a story-like description of the visual content. However, this method does not preserve the visual content. Matthews et al.~\cite{mathews2016senticap} propose the switch RNN to generate caption with positive and negative sentiments, which requires word level supervision and might not be able to scale. Recently, Gan et al.~\cite{gan2017semantic} investigate to generate tag-dependent caption by extending the weight matrix of LSTM to consider tag information. The following work StyleNet~\cite{gan2017stylenet} explores to decomposes LSTM matrix to incorporate the style information. One key difference is that we leverage an arbitrary stylish monolingual corpus that is not paired with any image dataset as target corpus instead of using paired images with stylish ground truth. The most similar to our work is~\cite{mathews2018semstyle}, the major differences are that we do not exploit the language features such as POS tag of corpus and we do not pre-process the target corpus to make it similar to the source one. Our approach is end to end with minimal pre-process of target corpus.
|
| 21 |
+
\section{Unsupervised Stylish Image Description Generation}
|
| 22 |
+
The goal of stylish Image Description Generation (IDG) is to generate a natural language description $d_T$ in space $\mathcal{D}_T$ given an image $I$ in the image space $\mathcal{I}$. The style of the description is implicitly captured in the description space $\mathcal{D}_T$, where we use subscript $T$ to emphasize the target style. There exist two settings for learning a stylish IDG model.
|
| 23 |
+
\paragraph{\bf Supervised stylish IDG.} In supervised stylish IDG, we are given a training dataset $\mathbb{D}=\{(I^{(n)},d_T^{(n)}), n=1,...,N\}$, where each sample $(I^{(n)},d_T^{(n)})$ is a pair of image and its target stylish description sampled from the joint distribution $p(\mathcal{I},\mathcal{D}_T)$. The goal is to learn the conditional distribution $p(\mathcal{D}_T|\mathcal{I})$ using $\mathbb{D}$ so that we can generate \mbox{stylish image descriptions for an input image.}
|
| 24 |
+
\paragraph{\bf Unsupervised stylish IDG.} In unsupervised stylish IDG, we are given two training datasets $\mathbb{D}_S$ and $\mathbb{D}_T$. $\mathbb{D}_S=\{(I^{(n)},d_S^{(n)}), n=1,...,N_S\}$ consists of pairs of image and its description $(I^{(n)},d_S^{(n)})$ sampled from $p(\mathcal{I},\mathcal{D}_S)$, where $S$ is referred to as the source domain which is typically unstylish. $\mathbb{D}_T=\{(d_T^{(n)}), n=1,...,N_T\}$ is a dataset of target stylish descriptions $d_T^{(n)}$ sampled from $p(\mathcal{D}_T)$, where the corresponding images are not available. Hence, the learning task is considered as unsupervised. The goal of unsupervised stylish IDG is to learn the conditional distribution $p(\mathcal{D}_T|\mathcal{I})$ using $\mathbb{D}_S$ and $\mathbb{D}_T$.
|
| 25 |
+
|
| 26 |
+
Unsupervised stylish IDG is an ill-posed problem since it is about learning the conditional distribution $p(\mathcal{D}_T|\mathcal{I})$ without using samples from the joint distribution $p(\mathcal{I},\mathcal{D}_T)$. Therefore, learning an unsupervised stylish IDG function is difficult without leveraging some useful assumptions. However, under the unsupervised setting, training data collection is greatly simplified: one could pair a general image description dataset (e.g., the MS-COCO dataset~\cite{lin2014microsoft}) with an existing corpus of the target style (e.g., some romantic novels) for learning. A solution to the unsupervised problem could enable many stylish image description generation applications.
|
| 27 |
+
\subsection{Unsupervised Stylish IDG via Domain Layer Norm}
|
| 28 |
+
\label{sec:framework}
|
| 29 |
+
\begin{figure*}[t]
|
| 30 |
+
\centering
|
| 31 |
+
\includegraphics[width=0.75\textwidth]{assumption_v4.pdf}
|
| 32 |
+
\caption{We make several assumptions to deal with the challenging unsupervised stylish image description generation problem. We first assume there exists a shared latent space $\mathcal{Z}$ so that a latent code $\mathbf{z}\in\mathcal{Z}$ can be mapped to the source description space $\mathcal{D}_S$ and the target stylish description space $\mathcal{D}_T$ via $G_S$ and $G_T$. We also assume there exists a stylish image description embedding function $E_T$ that can map a stylish description to a latent code. Finally, we assume there exists an image embedding function $E_I$ that can map an image to a latent code.
|
| 33 |
+
Once these functions are learned from data, we can generate a stylish image description for an image by applying $E_I$ and $G_T$ sequentially.
|
| 34 |
+
}
|
| 35 |
+
\label{fig::asssumption}
|
| 36 |
+
\end{figure*}
|
| 37 |
+
\paragraph{\bf Assumptions.}
|
| 38 |
+
To deal with the ill-posed unsupervised stylish IDG problem, we make several assumptions illustrated in Figure~\ref{fig::asssumption}. We first assume that there exists a latent space $\mathcal{Z}$ providing a common ground to effectively map to and from the image space $\mathcal{I}$, the source description space $\mathcal{D}_S$, and the target stylish description space $\mathcal{D}_T$.
|
| 39 |
+
From latent space to description space, we assume that there exists a source description generation function $G_S(\mathbf{z})\in\mathcal{D}_S$ and a target stylish description generation function $G_T(\mathbf{z})\in\mathcal{D}_T$.
|
| 40 |
+
From non-latent space to latent pace, we assume that there exist an image encoder $E_I(I)\in\mathcal{Z}$ and a target description encoder $E_T(d_T)\in\mathcal{Z}$.
|
| 41 |
+
Our goal is to learn the generation functions ($G_T$ and $G_S$) and the encoding functions ($E_I$ and $E_T$) from the unsupervised stylish IDG training data $\mathbb{D}_S$ and $\mathbb{D}_T$. Note that this is a challenging learning task if $G_T$ and $G_S$ is completely independent of each other. Hence, we assume that $G_T$ and $G_S$ share the ability to describe the same factual content but with different styles.
|
| 42 |
+
Once these functions are learned, we can simply first encode the image $I$ to a latent code using $E_I$ and then using $G_T$ to generate a stylish image description. In other words, the stylish image description is given by $G_T(E_I(I))$. We model the conditional distribution as $p(\mathcal{D}_T|\mathcal{I})=\delta(G_T(E_I(I)))$, where $\delta$ is the delta function.
|
| 43 |
+
\begin{figure*}[t]
|
| 44 |
+
\centering
|
| 45 |
+
\includegraphics[width=0.78\textwidth]{model_archicompo_0518.pdf}
|
| 46 |
+
\caption{The $E_{I}$ and $E_{T}$ map the image and the target stylish description to a shared latent space. Both $G_{S}$ and $G_{T}$ share all weights except the layer norm parameters to capture the similar content in two domains. To disentangled the style factor, we employ different sets of layer norm parameters denoted as $\{\boldsymbol{g}_{S},\boldsymbol{b}_{S}\}$ and $\{\boldsymbol{g}_{T},\boldsymbol{b}_{T}\}$ for source and target domain during training.}
|
| 47 |
+
\label{fig::model_archi}
|
| 48 |
+
\end{figure*}
|
| 49 |
+
Inspired by the success of deep learning, we model both of the generation and encoding functions using deep networks.
|
| 50 |
+
Specifically, we model $E_I$ using a deep convolutional neural network (CNN)~\cite{NIPS2012_4824} and model $E_T$, $G_T$, and $G_S$ using recurrent neural network as illustrated in Figure~\ref{fig::model_archi}. We also use Skip-Thought Vectors (STV)~\cite{kiros2015skip} to model $E_T$. For $G_T$ and $G_S$, we use Layer Normalized Long Short Term Memory unit (LN-LSTM) as their recurrent module~\cite{ba2016layer,hochreiter1997long}.
|
| 51 |
+
\begin{figure}[t]
|
| 52 |
+
\centering
|
| 53 |
+
\includegraphics[scale=0.18]{a3i_model_cell_tmp.pdf}
|
| 54 |
+
\caption{Inside the LN-LSTM cell (left) and the operation of layer normalization (right).}
|
| 55 |
+
\label{fig:DLNdetail}
|
| 56 |
+
\end{figure}
|
| 57 |
+
\paragraph{\bf Training sketch.}
|
| 58 |
+
With the source domain dataset $\mathbb{D}_S$, we can train $\boldsymbol{z}_S=E_I(I)$ and $d_S=G_S(\boldsymbol{z}_S)$ jointly by solving the supervised IDG learning task, where $\boldsymbol{z}_S$ is the learned latent representation in the source domain. On the other hand, with the target domain dataset $\mathbb{D}_T$, we can train $\boldsymbol{z}_T=E_T(d_T)$ and $d_T=G_T(\boldsymbol{z}_T)$ jointly by solving an unsupervised description reconstruction learning task, where $\boldsymbol{z}_T$ is the learned latent representation in the target domain. To ensure that the latent space is shared (i.e., $\boldsymbol{z}_T\in \mathcal{Z}$ and $\boldsymbol{z}_S\in \mathcal{Z}$), we further assume that the generation functions $G_S$ and $G_T$ share most of their parameters.
|
| 59 |
+
|
| 60 |
+
\paragraph{\bf Domain Layer Norm.}
|
| 61 |
+
Specifically, we assume $G_S$ and $G_T$ share all the parameters except those in their layer norm parameters~\cite{ba2016layer}. In other words, the domain description generators ($G_S$ and $G_T$) only defer in the layer norm parameters. We refer this weight-sharing scheme as the Domain Layer Norm (DLN) scheme. The intuition behind DLN is to encourage the shared weight to capture the factual content between two domains while the differences (i.e., styles) are captured in layer norm parameters. This design helps $G_T$ generate descriptions that are related to the image content even without the supervision of the corresponding images in training.
|
| 62 |
+
|
| 63 |
+
\noindent\textbf{Training $E_I$ and $G_S$ via Supervised IDG.}
|
| 64 |
+
The goal of supervised image description generation is to learn $p(\mathcal{D}_S|\mathcal{I})$ by using $\mathbb{D}_S$. The $G_S$ consists of an embedding matrix $\boldsymbol{\theta_W}$ that maps input text $x_k$ to a vector $\boldsymbol{e}_k$, an LN-LSTM module, and an output matrix $\boldsymbol{\theta_V}$ that maps hidden state to predicted token $\boldsymbol{\hat{y}}$. Formally,
|
| 65 |
+
\begin{align}\label{eq:1}%
|
| 66 |
+
(\boldsymbol{\hat{y}}_{k+1}, \boldsymbol{h}_{k+1}) = G_S(\boldsymbol{e}_k,\boldsymbol{h}_{k})~,\\ \boldsymbol{\hat{y}}_{k+1} = \boldsymbol{\theta_V}^T\boldsymbol{h}_{k}~,\\
|
| 67 |
+
\boldsymbol{e}_k = \boldsymbol{\theta_W}^T\boldsymbol{1}\{x_k\}~,\\
|
| 68 |
+
\boldsymbol{e}_{-1}= E_I(I), \boldsymbol{h}_{-1} = \boldsymbol{0}~,
|
| 69 |
+
\end{align}
|
| 70 |
+
where $\boldsymbol{h}_{k}$ is the hidden feature in the LN-LSTM, $k\in\{-1\ldots m-1\}$ is time step of description with length $m$, and $\boldsymbol{1}\{\}$ denotes the operator for one-hot encoding. To train the network, we minimize the sum of cross-entropy of correct words as follows,
|
| 71 |
+
\begin{align}
|
| 72 |
+
\mathcal{L}_{S} &= -\sum_{k=1}^{m}\textrm{log}(\boldsymbol{1}\{x_k\}^T\boldsymbol{\hat{y}}_k)~,
|
| 73 |
+
\end{align}
|
| 74 |
+
where $x_k$ is the $k^{th}$ word in the ground truth sentence.
|
| 75 |
+
|
| 76 |
+
\noindent\textbf{Training $E_T$ and $G_T$ via Stylish Image Description Reconstruction.}
|
| 77 |
+
The $G_T$ contains the LN-LSTM module, the same output matrix and embedding matrix used in $G_S$. Formally,
|
| 78 |
+
\begin{align}\label{eq:3} %
|
| 79 |
+
(\boldsymbol{\hat{y}}_{k+1}, \boldsymbol{h}_{k+1}) = G_T(\boldsymbol{e}_k,\boldsymbol{h}_{k})~,\\ \boldsymbol{\hat{y}}_{k+1} = \boldsymbol{\theta_V}^T\boldsymbol{h}_{k}~,\\
|
| 80 |
+
\boldsymbol{e}_k = \boldsymbol{\theta_W}^T\boldsymbol{1}\{d^k_T\}~,\\
|
| 81 |
+
\boldsymbol{e}_{-1} = E_T(d_T)~,\\
|
| 82 |
+
\boldsymbol{h}_{-1} = \boldsymbol{0}~,
|
| 83 |
+
\end{align}
|
| 84 |
+
|
| 85 |
+
where $d_T$ is the target style image description. To train the network, we minimize the reconstruction error as follows,
|
| 86 |
+
\begin{align}
|
| 87 |
+
\mathcal{L}_{T} &= -\sum_{k=1}^{m}\textrm{log}(\boldsymbol{1}\{d^k_T\}^T\boldsymbol{\hat{y}}_k)~,
|
| 88 |
+
\end{align}
|
| 89 |
+
where $d^k_T$ is the $k^{th}$ word in the target style image description.
|
| 90 |
+
|
| 91 |
+
\noindent\textbf{Relating $G_S$ and $G_T$ via Domain Layer Norm.}
|
| 92 |
+
We relate $G_{S}$ and $G_{T}$ by sharing all weights except layer norm parameters in the LN-LSTM. Details inside the LN-LSTM are shown in Fig \ref{fig:DLNdetail}, where the layer norm operation (LN) is applied to each gate of LSTM. Take the input gate as an example:
|
| 93 |
+
\begin{align}\label{eq:4}%
|
| 94 |
+
\boldsymbol{\hat{i}}_k &= \textrm{LN}(\boldsymbol{i}_k), \boldsymbol{i}_k = \boldsymbol{\theta}_{ie}\boldsymbol{e}_k+ \boldsymbol{\theta}_{ih}\boldsymbol{h}_{k-1}~,
|
| 95 |
+
\end{align}
|
| 96 |
+
where $\boldsymbol{\hat{i}}_k$ and $\boldsymbol{i}_k$ are the normalized and unnormalized input gates, $\boldsymbol{\theta}_{ie}$, $\boldsymbol{\theta}_{ih}$ are two projection matrices that map the embedding vector and the previous hidden state into the same dimension. The LN operation converts any input $\boldsymbol{a}$ to a normalized output $\boldsymbol{\hat{a}}$ as follows,
|
| 97 |
+
\begin{align}
|
| 98 |
+
\label{eq:5}%
|
| 99 |
+
\boldsymbol{\hat{a}} &= \frac{\boldsymbol{g}}{\sigma} \odot (\boldsymbol{a} - \mu)) + \boldsymbol{b}~,\\
|
| 100 |
+
\mu &= \frac{1}{p_{h}}\sum_{i=1}^{i=p_{h}}a_{i}~,\\
|
| 101 |
+
\sigma &= \sqrt{\frac{1}{p_{h}}\sum_{i=1}^{p_{h}}(a_{i} - \mu)^2}~,
|
| 102 |
+
\end{align}
|
| 103 |
+
where $a_i$ denotes the $i^{th}$ entry in the vector $\boldsymbol{a}$, $p_h$ is the dimention of the input $\boldsymbol{a}$, $\mu$ and $\sigma$ are the mean and standard deviation of the input $\boldsymbol{a}$, $\boldsymbol{g}$ and $\boldsymbol{b}$ are scaling and shifting vectors (i.e., layer norm parameters) learned from the data.
|
| 104 |
+
|
| 105 |
+
We train the whole network by jointly minimizing the supervised IDG loss $\mathcal{L}_{S}$ and the unsupervised image description reconstruction loss $\mathcal{L}_{T}$ subject to the architectural constraint set to $G_S$ and $G_T$ as below, where $\lambda$ is a hyperparameter.
|
| 106 |
+
\begin{multline}\label{eq:6}
|
| 107 |
+
\mathcal{L}(\boldsymbol{\theta}_{E_I} \boldsymbol{\theta}_{G_S},\boldsymbol{\theta}_{E_T},\boldsymbol{\theta}_{G_T}) = \lambda \mathcal{L}_{S}(\boldsymbol{\theta}_{E_I},\boldsymbol{\theta}_{G_S})\\
|
| 108 |
+
+ (1 - \lambda)\mathcal{L}_{T}(\boldsymbol{\theta}_{E_T},\boldsymbol{\theta}_{G_T})~.
|
| 109 |
+
\end{multline}
|
| 110 |
+
\paragraph{\bf Extension to New Target Styles.}
|
| 111 |
+
Given a model with parameters $\boldsymbol{\theta_{V}}$, $\boldsymbol{\theta_{W}}$, $\boldsymbol{\theta}_{E_I}$, and $\boldsymbol{\theta}_{G_S}$, pre-trained on a pair of the source and one target domain, we aim to adapt it to a new target domain (i.e, style) by enlarging $\boldsymbol{\theta_{V}}$ and $\boldsymbol{\theta_{W}}$ to $\boldsymbol{\theta}^{\prime}_{\boldsymbol{V}}$ and $\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}}$ to accommodate new vocabulary and finetuning the remaining parameters to $\boldsymbol{\theta}^{\prime}_{E_I}$, $\boldsymbol{\theta}^{\prime}_{E_T}$, $\boldsymbol{\theta}^{\prime}_{G_S}$ and $\boldsymbol{\theta}^{\prime}_{G_T}$. Hence, we define a new loss function as:
|
| 112 |
+
\begin{multline}\label{eq:7}
|
| 113 |
+
\mathcal{L}(\boldsymbol{\theta}^{\prime}_{E_{I}}, \boldsymbol{\theta}^{\prime}_{G_S},\boldsymbol{\theta}^{\prime}_{E_T},\boldsymbol{\theta}^{\prime}_{G_T}) = \lambda_1\mathcal{L}_{S}(\boldsymbol{\theta}^{\prime}_{E_I},\boldsymbol{\theta}^{\prime}_{G_S})\\ + (1 -\lambda_1)\mathcal{L}_{T}(\boldsymbol{\theta}^{\prime}_{E_T},\boldsymbol{\theta}^{\prime}_{G_T}) + \lambda_2R(\boldsymbol{\theta}^{\prime}_{E_{I}},\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}}, \boldsymbol{\theta}^{\prime}_{\boldsymbol{V}})~,
|
| 114 |
+
\end{multline}
|
| 115 |
+
where $\lambda_1$ and $\lambda_2$ are hyperparameters.
|
| 116 |
+
The regularization term $R(\boldsymbol{\theta}^{\prime}_{E_{I}},\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}}, \boldsymbol{\theta}^{\prime}_{\boldsymbol{V}})=\lVert \boldsymbol{\theta}^{\prime}_{E_{I}} - \boldsymbol{\theta}_{E_{I}}\rVert_{2} + \lVert \boldsymbol{\theta}^{\prime}_{\boldsymbol{W}} - \boldsymbol{\theta_{W}} \rVert_{2} + \lVert \boldsymbol{\theta}^{\prime}_{\boldsymbol{V}} - \boldsymbol{\theta_{V}} \rVert_{2}$ is used to prevent new weights from deviating the pretrained model. This encourages the adapted model to keep the information learned during the pretrained phase.
|
| 117 |
+
We use pretrained $\boldsymbol{\theta}_{E_I}$ and $\boldsymbol{\theta}_{G_S}$ as initialization of $\boldsymbol{\theta}^{\prime}_{E_I}$ and $\boldsymbol{\theta}^{\prime}_{G_S}$. For $\boldsymbol{\theta}^{\prime}_{G_T}$, we share all parameters in $\boldsymbol{\theta}^{\prime}_{G_S}$ except the layer norm parameters. $\boldsymbol{\theta}^{\prime}_{E_T}$ is trained from scratch. Note that we do not update the source domain layer norm parameters since we do not need to learn source style.
|
| 118 |
+
\section{Experiment}
|
| 119 |
+
We conduct two experiments to evaluate our proposed method. First, we demonstrate that our method can generate stylish descriptions based on paired image and unstylish description in the source domain and a stylish monolingual corpus that is not paired with any image dataset in the target domain. Then, we demonstrate the flexibility of our DLN to progressively include new styles one by one in the second experiment. The implementation details are in the supplementary.
|
| 120 |
+
\subsection{Evaluation Setting}
|
| 121 |
+
\noindent\textbf{Datasets.} We use paragraphs released in~\cite{krause2016paragraphs} (VG-Para) as our source domain dataset. We do not use caption dataset such as MS-COCO because we found captions are less stylish when transfer to target style domain. We use pre-split data which contain 14575, 2489 and 2487 for training, validation and testing. For target dataset, we use humor and romance novel collections in BookCorpus~\cite{zhu2015aligning}. We also collect country song lyrics and fairy tale to show that our method is effective on corpora with different syntactic structures and word usage. More details can be found in supplementary materials.\\
|
| 122 |
+
\noindent\textbf{Baselines.} We compare our method with four baselines: StyleNet~\cite{gan2017stylenet}, Neural Story Teller (NST)~\cite{kiros2015skip}, DLN-RNN and Random. Stylenet generates stylish descriptions in an end-to-end way but with paired image and stylish ground truth description. NST breaks down the task into two steps, which first generate unstylish captions then apply style shift techniques to generate stylish descriptions. DLN-RNN uses the same framework as DLN with only difference in using simple recurrent neural network. Random samples the the same number of nouns as that in the unstylished ground truth from the corresponding vocabulary of target domain. Although a concurrent work ~\cite{mathews2018semstyle} that attempts to solve similar task as ours, the major differences are we do not exploit linguistic features and pre-process the target corpus to facilitate the training. Moreover, it is not sure whether the concurrent work can be applied to other styles or even multiple styles as it only makes a step toward generating sentences with romantic style.\\
|
| 123 |
+
\noindent\textbf{Metrics of semantic relevance.} As there is no ground truth sentences for stylish image descriptions in unpaired setting, the conventional n-gram based metrics such as BLEU~\cite{papineni2002bleu}, METEOR~\cite{denkowski2014meteor} and CIDEr~\cite{vedantam2015cider} cannot be applied. It is also not suitable to calculate these metrics between stylish sentences and the unstylished ground truth because the goal of stylish description generation is to change the word usage while preserve certain semantic relevance between the stylish description and images.
|
| 124 |
+
|
| 125 |
+
We propose content similarity to evaluate the semantic relevance between generated stylish sentences and the unstylished ground truth. To calculate content similarity, we define $C_{S}$ as the set of nouns in the ground truth (source domain), and $C^{\prime}_{S}$ as the union between $C_{S}$ and synonyms for each noun in $C_{S}$, for the model may describe the same object with different words (e.g., cup and mug). Similar logic is applied to $C_{T}$ and $C^{\prime}_{T}$ in the generated description (target domain). We calculate:
|
| 126 |
+
\begin{align}
|
| 127 |
+
\label{eq:8}
|
| 128 |
+
p &= \frac{|C_T \cap C^{\prime}_{S}|}{|C_T|} & r = \frac{|C_S \cap C^{\prime}_T|}{|C_S|},~
|
| 129 |
+
\end{align}
|
| 130 |
+
We take the f-score of the $p$ and $r$ as the content similarity score. The overall content similarity score is averaged over the testing data. This is because we assume stylish descriptions should at least contain objects which appear in the image. We also report SPICE~\cite{anderson2016spice} score, which calculate the f-score of semantic tuples between untylished ground truth and the generated stylish descriptions. The final score is average over all testing data.\\
|
| 131 |
+
\noindent\textbf{Metrics of stylishness.} We use transfer accuracy to evaluate the stylishness of our generated description. The transfer accuracy is widely used in language style transfer task~\cite{shen2017style,melnyk2017improved,fu2018style}. It measures how often do descriptions have labels of target style on test dataset based on a pre-trained style classifier. We follow the definition of transfer accuracy in~\cite{fu2018style}, which is
|
| 132 |
+
\begin{equation}
|
| 133 |
+
\mathcal{T} =
|
| 134 |
+
\begin{cases}
|
| 135 |
+
1 & \text{if $s > 0.5$} \\
|
| 136 |
+
0 & \text{if $s \leq 0.5$}
|
| 137 |
+
\end{cases}
|
| 138 |
+
\end{equation}
|
| 139 |
+
where $s$ is the output probability score of the classifier. We define $R_{T} = \frac{N_{vt}}{N_{vs}}$ as our transfer accuracy, which is the fraction of number of testing $N_{vs}$ data in source domain and number of testing data that correctly transfer description with target style $N_{vt}$. The final score is average over all testing data.\\
|
| 140 |
+
\noindent\textbf{Human evaluation.} The difficulty in generating stylish sentence in unpaired setting is to remain semantic relevance. Therefore, we conduct a human study on Amazon Mechanical Turk (AMT) independently for each methods to judge the semantic relevance between image and description. For each model, we randomly sample 100 images then generate stylish descriptions for each style. Two workers are asked to vote the semantic relevance with following prompt: Given an image and a paragraph from the book (Our stylish corpus), how well does the paragraph content relate to objects in the image. Workers are forced to vote from unrelated to related. The criteria for eligible workers are having at least 100 successful HITs with 70\% acceptance rate. The total number of HIT is 2400. For each HIT, the order of options is randomized. Workers are forced to vote and all responses are counted without aggregation.
|
| 141 |
+
\begin{table*}[t!]
|
| 142 |
+
\centering
|
| 143 |
+
\begin{tabular}{lc|ccccccccc}
|
| 144 |
+
\toprule
|
| 145 |
+
Model & Data & CS & S & T & $p$ & $r$ & $n_{p}$ & $n_{r}$\\
|
| 146 |
+
\midrule
|
| 147 |
+
NST~\cite{kiros2015skip} & Lyrics& 0.037 & 0.016 & 100\% & 0.041 & 0.044 & 0.68 & 0.75 \\
|
| 148 |
+
StyleNet~\cite{gan2017stylenet}&Lyrics& 0.033 & 0.014 & 100\% &0.038 & 0.038 &0.57 &0.67 \\
|
| 149 |
+
Random & Lyrics & 0.008 & 0.002 & 55.2\% & 0.007 & 0.012 &0.13 &0.09 \\
|
| 150 |
+
DLN-RNN & Lyrics &0.072 & 0.030 &100\% & \textbf{0.101} & 0.069 &\textbf{1.65} &1.17 \\
|
| 151 |
+
DLN &Lyrics &\textbf{0.083}& \textbf{0.033} &99.2\% & 0.080& \textbf{0.115} &1.25 & \textbf{1.92} \\
|
| 152 |
+
\midrule
|
| 153 |
+
NST~\cite{kiros2015skip} & Romance& 0.088 & 0.039 & 100\% & 0.087 & 0.113 &\textbf{1.57} &1.90\\
|
| 154 |
+
StyleNet~\cite{gan2017stylenet} &Romance& 0.012 & 0.005 & 100\% & 0.032 &0.001 & 0.11&0.14 \\
|
| 155 |
+
Random & Romance& 0.005& 0.002& 100\% &0.004 &0.001 &0.07 &0.05 \\
|
| 156 |
+
DLN-RNN & Romance& 0.083& 0.034 & 94.3\% & 0.078 & 0.125 &1.27 &0.71 \\
|
| 157 |
+
DLN &Romance &\textbf{0.151} & \textbf{0.058} & 95.4\%& \textbf{0.193}& \textbf{0.148} &1.56 &\textbf{2.43}\\
|
| 158 |
+
\midrule
|
| 159 |
+
NST~\cite{kiros2015skip} & Humor& 0.103 & 0.041 & 99.7\%& 0.097&0.143 &2.22 &2.44 \\
|
| 160 |
+
StyleNet~\cite{gan2017stylenet}&Humor& 0.010 &0.005 & 99.8\% & 0.024& 0.001&0.12 &0.15 \\
|
| 161 |
+
Random & Humor& 0.007 & 0.002 & 100\% & 0.006 &0.014 &0.11 &0.07 \\
|
| 162 |
+
DLN-RNN & Humor &0.093 & 0.038 & 89.5\% & 0.095 &0.12 &1.58 &0.92 \\
|
| 163 |
+
DLN &Humor &\textbf{0.173} &\textbf{0.065} & 70.0\%&\textbf{0.205} &\textbf{0.182} &\textbf{2.32}&\textbf{2.99} \\
|
| 164 |
+
\midrule
|
| 165 |
+
NST~\cite{kiros2015skip} & Fairy tale& 0.116 &0.044 & 99.8\%&0.116 &\textbf{0.145} &\textbf{2.47} &\textbf{2.44} \\
|
| 166 |
+
StyleNet~\cite{gan2017stylenet} &Fairy tale& 0.028 &0.013 & 99.8\%& 0.045& 0.026& 0.34&0.46\\
|
| 167 |
+
Random & Fairy tale & 0.004 & 0.001 & 100\% &0.003 &0.010 &0.06 &0.04\\
|
| 168 |
+
DLN-RNN & Fairy tale & 0.084 & 0.033 & 79.5\% & 0.076 &0.140 &1.22 &0.72 \\
|
| 169 |
+
DLN &Fairy tale &\textbf{0.135} & \textbf{0.050} & 93.7\%&\textbf{0.194} &0.125 &1.29&2.06\\
|
| 170 |
+
\bottomrule
|
| 171 |
+
\end{tabular}
|
| 172 |
+
\caption{Performance comparison between DLN and several baselines. CS, S and T stand for content similarity, SPICE and transfer accuracy. $p$ and $r$ are as defined in Eq.~\ref{eq:8}. $n_{p}$ and $n_{r}$ are the numerator of each. DLN has generally higher score of content related metrics. Higher is better for all metrics except the transfer accuracy.}
|
| 173 |
+
\label{tab:exp1}
|
| 174 |
+
\end{table*}
|
| 175 |
+
\subsection{Results}
|
| 176 |
+
The result of the first experiment is summarized in Table~\ref{tab:exp1}. We also report $p$, $r$ and the numerator of each for further comparison. It is worth noting that the perfect transfer accuracy may not be the best since the model could greedily generate the vocabulary used in the target domain and digress from the image content. Therefore, an ideal stylish description is the one with the high content similarity score and an acceptable transfer accuracy. Our DLN consistently outperforms other baselines in term of all semantic related metrics with a marginal drop of transfer accuracy on most datasets. All baselines are better than Random, which suggests all baselines can generate semantic-related description to certain degree. We observe NST has large $n_{p}$ and $n_{r}$ in fairy tale. We think this is because NST tends to generate long sentences. For each style (Fairy, Humor, Romance, and Lyrics), the average sentence length of NST is $(119,109,103,84)$ while that of DLN is $(38,54,41,97)$. Therefore, it is possible that NST generates more nouns in the unstylish ground truth.
|
| 177 |
+
|
| 178 |
+
We also report the performance of DLN and DLN-RNN on unstylish description generation task in Table~\ref{tab:exp1-1}. We calculate the BLEU-4, METEOR and CIDEr scores between generated sentences and unstylished ground truth. Combined with the result of stylish description generation in Table~\ref{tab:exp1}, we can conclude that the proposed domain layer norm can benefit the unpaired image to stylish description as we have a better model in conventional image to text generation.
|
| 179 |
+
|
| 180 |
+
The result of human study is shown in Fig~\ref{fig:exp1_human_study}, we report the best of our model in Table~\ref{tab:exp1} (DLN) and other baselines for comparison. The DLN has the highest related and lowest unrelated votes while over half of descriptions are voted as unrelated in other baselines. Qualitative results in Fig~\ref{fig:exp1_example} shows that the description generated by DLN is related to images. Note that the goal of generated stylish description is not to match every factual aspect of images, it should better be judged whether the description is related to the image if the image appears in the target corpus.
|
| 181 |
+
\begin{figure}
|
| 182 |
+
\includegraphics[width=0.40\textwidth]{a3i_l.pdf}
|
| 183 |
+
\caption{Human study of semantic relevance of all methods. DLN has highest related and lowest unrelated votes compared to other baselines.}
|
| 184 |
+
\label{fig:exp1_human_study}
|
| 185 |
+
\end{figure}
|
| 186 |
+
\begin{table}[t!]
|
| 187 |
+
\begin{tabular}{lcccc}
|
| 188 |
+
\toprule
|
| 189 |
+
Model & BLEU-3 & BLEU-4 & METEOR & CIDEr\\
|
| 190 |
+
\midrule
|
| 191 |
+
DLN-RNN& 0.106 & 0.062 & 0.130 & 0.069 \\
|
| 192 |
+
DLN & \textbf{0.132} & \textbf{0.080} & \textbf{0.150} & \textbf{0.127} \\
|
| 193 |
+
\bottomrule
|
| 194 |
+
\end{tabular}
|
| 195 |
+
\caption{Performance on generate unstylish description. DLN is better than DLN-RNN in all metrics.}
|
| 196 |
+
\label{tab:exp1-1}
|
| 197 |
+
\end{table}
|
| 198 |
+
\begin{figure*}[t!]
|
| 199 |
+
\includegraphics[width=0.97\textwidth]{AAAI_typical.pdf}
|
| 200 |
+
\caption{Examples of stylish descriptions by DLN. Note the goal of stylish description is not to match every factual aspect of the image. It should be better judged whether the descriptions are related to the image if the image appears in the context of the target corpus. The semicolon (;) in lyrics serves as new line symbol.}
|
| 201 |
+
\label{fig:exp1_example}
|
| 202 |
+
\end{figure*}
|
| 203 |
+
|
| 204 |
+
\noindent\textbf{Multi-style.}
|
| 205 |
+
We progressively expand DLN to include three target domains (fairy, romance, lyrics) to demonstrate the flexibility of our model. In other words, we follow Eq~\ref{eq:7} to train source and fairy tale style then include romance and lyrics style, which is denoted as DLN-Multi. To generate the description, we use the same target decoder with a different style-specific embedding matrix, layer norm parameters, and output matrix. We conduct another human study by asking five workers to determine the best description given following priorities: content, style, and naturalness. This prompt forces workers to choose the better one if the two options are equally related to images. We sample 100 images for each and use the same criteria to select workers. The result is presented in Table~\ref{tab:exp2}, which shows the performance of DLN-Multi is competitive to DLN. DLN-Multi thus gives users the capability to include new style into the existing model, which is a novel feature not reported in other baselines.\\
|
| 206 |
+
\noindent\textbf{Discussion: transfer accuracy and domain shift.} We observe a drop in transfer accuracy on the source to humor transfer in DLN, and we believe this is related to the scale of domain shift. To quantify this, we analyze the percentage of shared noun between the source ($V_{src} = 6.2\textrm{k}$) and target domain, which are $(50\%, 68\%, 74\%, 60\%)$ for lyrics, romance humor and fairy tale. For the transfer from the source to humor domain, the shared nouns account for over 70\% nouns in the source domain, which means the domain shift between the source and humor is smaller than others. This makes it more difficult for the classifier to distinguish two domains. Therefore, the transfer accuracy of the source to humor is lower. We note Random get lowest transfer accuracy in lyrics style and we believe this is because sampling word from the vocabulary of lyrics alone cannot have sentences with new line symbol (i.e. ;), which is an important feature for being classified as stylish.
|
| 207 |
+
\begin{table}[t!]
|
| 208 |
+
\centering
|
| 209 |
+
\begin{tabular}{lc|cccc}
|
| 210 |
+
\toprule
|
| 211 |
+
Model & Style & CS& S &T & P\\
|
| 212 |
+
\midrule
|
| 213 |
+
DLN-Multi & Romance&0.116& 0.047 & 97.1\% & 36.7\%\\
|
| 214 |
+
DLN &Romance &\textbf{0.151}&0.058 & 95.4\% & \textbf{63.3}\%\\
|
| 215 |
+
\midrule
|
| 216 |
+
DLN-Multi & Lyrics& \textbf{0.118}& 0.047 & 99.7\% & \textbf{54.3}\%\\
|
| 217 |
+
DLN &Lyrics &0.083& 0.033 &99.2\% & 45.8\%\\
|
| 218 |
+
\midrule
|
| 219 |
+
DLN-Multi & Fairy tale&0.120& 0.048 & 99.0\% & 47.4\%\\
|
| 220 |
+
DLN &Fairy tale &\textbf{0.135}&0.050 & 93.7\% & \textbf{52.6}\%\\
|
| 221 |
+
\bottomrule
|
| 222 |
+
\end{tabular}
|
| 223 |
+
\caption{Result of DLN and DLN-Multi. CS, S, T and P are content similarity, SPICE, tansfer accuracy and human preference score. Overall, the performance of DLN-Multi is competitive to DLN in all metrics.}
|
| 224 |
+
\label{tab:exp2}
|
| 225 |
+
\end{table}
|
| 226 |
+
\section{Conclusion and future work}
|
| 227 |
+
We propose a novel unsupervised stylish IDG model via domain layer norm with the capability to progressively include new styles. Experiment results show that our stylish IDG results are more preferred by human subjects. We plan to invesitgate the intermediate style generated by interpolation of domain layer norm parameter and address the fluency of generated sentences in the future.
|
| 228 |
+
\small{
|
| 229 |
+
\bibliography{main}
|
| 230 |
+
\bibliographystyle{aaai}
|
| 231 |
+
}
|
| 232 |
+
\clearpage
|
| 233 |
+
\section{Appendix}
|
| 234 |
+
The content of this supplementary material is summarized as below:
|
| 235 |
+
\begin{itemize}
|
| 236 |
+
\item Data statistic
|
| 237 |
+
\item Implementation details of baselines and DLN
|
| 238 |
+
\item Interface of human evaluation
|
| 239 |
+
\item More qualitative examples
|
| 240 |
+
\end{itemize}
|
| 241 |
+
\section{Data Statistic}
|
| 242 |
+
For romance and humor data, we randomly sampled 50000 passages from BookCorpus~\cite{zhu2015aligning}. For fairy tale, we crawled from the website\footnote{http://www.loyalbooks.com} and also sample 50000 passages from it. For the country song lyrics, we use the data released by Kaggle\footnote{https://www.kaggle.com/gyani95/380000-lyrics-from-metrolyrics} and use all country song lyrics as our corpus. The Fig~\ref{fig:wordcloud} shows the word usage of each corpus.
|
| 243 |
+
\begin{figure*}[t!]
|
| 244 |
+
\centering
|
| 245 |
+
\includegraphics[width=0.6\textwidth]{wordcloud.pdf}
|
| 246 |
+
\caption{Word cloud of our four datasets}
|
| 247 |
+
\label{fig:wordcloud}
|
| 248 |
+
\end{figure*}
|
| 249 |
+
\section{Baselines}
|
| 250 |
+
\begin{itemize}
|
| 251 |
+
\item \textbf{Neural Story Teller}~\cite{kiros2015skip}: NST contains two separate modules: image to caption in the source domain and stylish story decoder in the target domain. The first module is used to extract the source domain textual representation of the image. They use pre-trained image caption alignment~\cite{kiros2014unifying} on MS-COCO to extract the top $N$ neighbor captions for an image. The textual representation of the image is calculated by averaging the skip-thought encoded vector of top $N$ captions. The second module is used to reconstruct target domain textual representation to original stylish story passage, where a decoder is trained to reconstruct the textual representation of stylish story passage to the original stylish story passage. The textual representation here is also the skip-thought encoded vector. To generate the description for given image, it first subtracts the mean of all skip-thought encoded MS-COCO caption and added the mean of skip-thought encoded stylish story passage to transform the source textual representation to the target one; then, feed it into the second module to generate the stylish story.
|
| 252 |
+
|
| 253 |
+
\item \textbf{StyleNet}~\cite{gan2017stylenet}: We re-implement StyleNet as one of our baseline. The StyleNet is based on factorized LSTM, which factorized the weights mapping inputs to hidden representation to $\boldsymbol{\theta_W} = \boldsymbol{U}\boldsymbol{S}\boldsymbol{V}$, where $\boldsymbol{U} \in \mathbb{R}^{p_e \times p_m}$, $\boldsymbol{S} \in \mathbb{R}^{p_m \times p_n}$ and $\boldsymbol{V} \in \mathbb{R}^{p_n \times p_h}$, where $p_e$,$p_h$ are dimension of embedding and hidden size, and $p_m$,$p_n$ are the dimension of the matrix. It contains a language model trained on target corpus and a source image to caption decoder where each factorized LSTM is associated with a style matrix $\boldsymbol{S}_{s}$ and $\boldsymbol{S}_{t}$. During inference, it replace the source style matrix with target style matrix and generate descriptions.
|
| 254 |
+
\end{itemize}
|
| 255 |
+
\section{Implementation Details}
|
| 256 |
+
\noindent\textbf{NST.} We follow the original setting and implementation\footnote{https://github.com/ryankiros/neural-storyteller} and train the decoder on our corpus till converge. We set the maximum length of text data equals to 100.
|
| 257 |
+
|
| 258 |
+
\noindent\textbf{DLN.} We use the same text length as used in NST. We use most common 10000 vocabularies in the source domain. For target domain, we use 10000 vocabularies for lyrics and 15000 vocabularies for romance, humor and fairy tale corpora.
|
| 259 |
+
|
| 260 |
+
We use skips-thought vector released by Tensorflow~\cite{abadi2016tensorflow} as our $E_{T}$. We follow the original NST implementation to stack uni-skip and bi-skip skips-thought vector to get 4800 dimension feature for text. We use pre-split training set in VG-Para~\cite{krause2016paragraphs}.
|
| 261 |
+
|
| 262 |
+
We use ResNet50 from Keras\footnote{https://keras.io/applications/} as our $E_{I}$. The dimension of our latent space is 620, which is the same as our word embedding dimension. In implementation, we fix $E_{I}$ and $E_{T}$ and append projection matrix $\boldsymbol{\theta}_{P_I}$ and $\boldsymbol{\theta}_{P_T}$ as the last layers. During training, we only update projection matrix. We initialize all weight matrix by uniform initialization. The number of hidden units used in LN-LSTM is 1000, and we optimize our model by Adam optimizer~\cite{kingma2014adam} with start learning rate as 0.001 and decayed factor as 0.5 every 80. We follow NST to use gradient clipping = 5 in DLN. The training epoch is 100 with batch size as 64. We choose $\lambda=0.5$ for DLN training.
|
| 263 |
+
|
| 264 |
+
\noindent\textbf{DLN-Multi} The vocabulary size of each domain is 5500. We choose $\lambda_1=0.2$ and $\lambda_2=0.1$. Other settings and hyperparamters are the same as DLN except the regularization term
|
| 265 |
+
\begin{align}
|
| 266 |
+
R=\lVert\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}} - \boldsymbol{\theta_{W}} \rVert_{2} + \lVert \boldsymbol{\theta}^{\prime}_{\boldsymbol{V}} - \boldsymbol{\theta_{V}} \rVert_{2} +
|
| 267 |
+
\lVert \boldsymbol{\theta}^{\prime}_{E_{I}} - \boldsymbol{\theta}_{E_{I}}\rVert_{2}
|
| 268 |
+
\end{align}
|
| 269 |
+
We implement the $\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}}$ by $\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}} = \boldsymbol{\theta_W} || \boldsymbol{\theta_{\Delta W}}$, where $||$ is the concatenation operation of matrix and $\boldsymbol{\theta_{\Delta W}}$ is the new vocabulary used in the new style. In the subtraction, we only subtract the $\boldsymbol{\theta_W}$ part in $\boldsymbol{\theta}^{\prime}_{\boldsymbol{W}}$ to match the dimension of matrix. Similar logic can be applied to $\boldsymbol{\theta}^{\prime}_{\boldsymbol{V}}$. We use the projection weight $\boldsymbol{\theta}_{P_I}$ learned during pre-training and the weight during the training of DLN-Mutli as our $\boldsymbol{\theta}^{\prime}_{E_{I}}$ and $\boldsymbol{\theta}_{E_{I}}$.
|
| 270 |
+
|
| 271 |
+
\noindent\textbf{StyleNet} To train StyleNet, we use the same hidden unit of LSTM as DLN and follow the iterative training method reported in the original paper except that we also update the share weight when training language model on target corpus, which we found this modification has better convergence in our task as shown in Fig~\ref{fig:loss_comparison}. We also apply our decay learning setting, which we found has faster convergence. During inference, we follow StyleNet and NST by using beam search with a beam width of 5 and the unknown token for all methods.
|
| 272 |
+
|
| 273 |
+
\noindent\textbf{Pretrained classifier in transfer accuracy.} For the classifier used in evaluation, we use convolutional network proposed in~\cite{kim2014convolutional}. We train the classifier to achieve over 99\% accuracy to distinguish $\mathcal{D}_S$ and $\mathcal{D}_T$.
|
| 274 |
+
\begin{figure*}[h!]
|
| 275 |
+
\centering
|
| 276 |
+
\includegraphics[width=0.6\textwidth]{loss_supp.pdf}
|
| 277 |
+
\caption{Comparison of training StyleNet by method mentioned in original paper (Original) and our modification (Ours). The LM\_loss and factual\_img\_loss refer to $\mathcal{L_{T}}$ and $\mathcal{L_{S}}$ respectively}
|
| 278 |
+
\label{fig:loss_comparison}
|
| 279 |
+
\end{figure*}
|
| 280 |
+
\section{Human Evaluation Setup }
|
| 281 |
+
We performed two human evaluation tasks using the Amazon Mechanical Turk\footnote{https://www.mturk.com} platform. The first was a relevance task, asking how well does descriptions relate to the image content on a four level scale. We provide screen-shots of the instructions given to workers in Fig~\ref{fig:human_study_1}. The second study aims to compare the attractiveness of descriptions generated by the DLN mode and DLN-Multi. Fig~\ref{fig:human_study_1} is the screen-shots given to works for this experiment.
|
| 282 |
+
To ensure reliable results and avoid workers who choose randomly, only workers with more than 70\% accuracy and 100 successful HITs previously are allowed to attend the study. In the second human study, we also provide a dummy text as trap option to monitor the labelling quality. The result shows almost no trap options are chosen, indicating experiment results to be reliable.
|
| 283 |
+
\begin{figure*}[h!]
|
| 284 |
+
\centering
|
| 285 |
+
\includegraphics[width=0.8\textwidth]{rebuttal.pdf}
|
| 286 |
+
\caption{A screen-shot of human study on semantic relevance of generated paragraphs.}
|
| 287 |
+
\label{fig:human_study_1}
|
| 288 |
+
\end{figure*}
|
| 289 |
+
|
| 290 |
+
\begin{figure*}[h!]
|
| 291 |
+
\centering
|
| 292 |
+
\includegraphics[width=0.8\textwidth]{multi.pdf}
|
| 293 |
+
\caption{A screen-shot of human study on paragraph attractiveness.}
|
| 294 |
+
\label{fig:human_study_2}
|
| 295 |
+
\end{figure*}
|
| 296 |
+
\section{Qualitative example of stylish image description generation}
|
| 297 |
+
\label{sec:example_naive}
|
| 298 |
+
We demonstrate more qualitative examples of stylish image description generated by DLN in Fig~\ref{fig:supp_exp1}.
|
| 299 |
+
\begin{figure*}[t!]
|
| 300 |
+
\centering
|
| 301 |
+
\includegraphics[width=0.99\textwidth]{AAAI_typical_supp.pdf}
|
| 302 |
+
\caption{Examples of stylistic image description by DLN.}
|
| 303 |
+
\label{fig:supp_exp1}
|
| 304 |
+
\end{figure*}
|
1809.06227v1.txt
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Image captioning Farhadi et al. (2010); Kulkarni et al. (2011); Yao et al. (2017); Lu et al. (2016); Dai et al. (2017); Li et al. (2017) aims at generating natural language descriptions of images. Advanced by recent developments of deep learning, many captioning models rely on an encoder-decoder based paradigm Vinyals et al. (2015), where the input image is encoded into hidden representations using a Convolutional Neural Network (CNN) followed by a Recurrent Neural Network (RNN) decoder to generate a word sequence as the caption. Further, the decoder RNN can be equipped with spatial attention mechanisms Xu et al. (2015) to incorporate precise visual contexts, which often yields performance improvements empirically.
|
| 2 |
+
|
| 3 |
+
Although the encoder-decoder framework can be effectively trained with maximum likelihood estimation (MLE) Salakhutdinov (2010), recent research Ranzato et al. (2015) have pointed out that the MLE based approaches suffer from the so-called exposure bias problem. To address this problem, Ranzato et al. (2015) proposed a Reinforcement Learning (RL) based training framework. The method, developed on top of the REINFORCE algorithm Williams (1992), directly optimizes the non-differentiable test metric (e.g. BLEU Papineni et al. (2002), CIDEr Vedantam et al. (2015), METEOR Banerjee and Lavie (2005) etc.), and achieves promising improvements. However, learning with RL is a notoriously difficult task due to the high-variance of gradient estimation. Actor-critic Sutton and Barto (1998) methods are often adopted, which involves training an additional value network to predict the expected reward. On the other hand, Rennie et al. (2017) designed a self-critical method that utilizes the output of its own test-time inference algorithm as the baseline to normalize the rewards, which leads to further performance gains.
|
| 4 |
+
|
| 5 |
+
Beside to the high-variance problem, we notice that there are two other drawbacks of RL-based captioning methods that are often overlooked in the literature. First, while these methods can directly optimize the non-differentiable rewards and achieve high test scores, the generated captions contain many repeated trivial patterns, especially at the end of the sequence. Table 1 shows examples of bad-endings generated by a self-critical based RL algorithm (model details refer to Section 4). Specifically, 46.44% generated captions end with phrases as “with a”, “on a”, “of a”, etc. (for detailed statistics see Appendix A), on the MSCOCO Chen et al. (2015) validation set with the standard data splitting by Karpathy and Li (2015). The reason is that the shaped reward function biases the learning. In Figure 1, we see these additive patterns at the end of captions, although make no sense to humans, yield to a higher reward. Empirically, removing these endings results in a huge performance drop of around 6%. Paulus et al. (2017) has also reported that in abstractive summarization, using RL only achieves high ROUGE Lin (2004) score, yet the human-readability is very poor. The second drawback is that RL-based text generation is sample-inefficient due to the large action space. Specifically, the search space is of size O(|𝒱|T)𝑂superscript𝒱𝑇O(|\mathcal{V}|^{T}), where 𝒱𝒱\mathcal{V} is a set of words, T𝑇T is the sentence length, and |⋅||\cdot| denotes the cardinality of a set. This often makes training unstable and converge slowly.
|
| 6 |
+
|
| 7 |
+
In this work, to tackle these two issues, we propose a simple yet effective solution by introducing coherent language constraints on local action selections in RL. Specifically, we first obtain word-level n𝑛n-gram Kneser and Ney (1995) model from the training set and then use it as an effective prior. During the action sampling step in RL, we reduce the search space of actions based on the constitution of the previous word contexts as well as our n𝑛n-gram model. To further promote samples with high rewards, we sample multiple sentences during the training and update the policy based on the best-rewarded one. Such simple treatments prevent the appearance of bad endings and expedite the convergence while maintaining comparable performance to the pure RL counterpart. In addition, the proposed framework is generic, which can be applied to many different kinds of neural structures and applications.
|
| 8 |
+
|
| 9 |
+
We adopt a similar structure as GNIC Vinyals et al. (2015), which first encodes an image I𝐼I to a dense vector hIsubscriptℎ𝐼h_{I} by CNN. The vector hIsubscriptℎ𝐼h_{I} is then fed as the input to an LSTM-based Hochreiter and Schmidhuber (1997) language model decoder. At each step t𝑡t, the LSTM receives the previous output wt−1subscript𝑤𝑡1w_{t-1} as the input; computes the hidden state htsubscriptℎ𝑡h_{t}; and predicts the next word wtsubscript𝑤𝑡w_{t} as below:ht=LSTM(ht−1,wt−1),lt=Wlhtformulae-sequencesubscriptℎ𝑡LSTMsubscriptℎ𝑡1subscript𝑤𝑡1subscript𝑙𝑡subscript𝑊𝑙subscriptℎ𝑡\displaystyle h_{t}=\text{LSTM}(h_{t-1},w_{t-1}),~{}~{}l_{t}=W_{l}h_{t}(1)wt∼softmax(lt),similar-tosubscript𝑤𝑡softmaxsubscript𝑙𝑡\displaystyle w_{t}\sim\text{softmax}(l_{t}),where w0=hIsubscript𝑤0subscriptℎ𝐼w_{0}=h_{I} and h0subscriptℎ0h_{0} and c0subscript𝑐0c_{0} are initialized to zero. The generation ends if a special token *end* is predicted.
|
| 10 |
+
|
| 11 |
+
Instead of utilizing a static representation of the image, attention mechanism dynamically reweights the spatial features from CNN to focus on the different region of the image at each word generation. We specifically consider the standard architecture used in Xu et al. (2015), where 𝒜={a1,a2,…,aL}𝒜subscript𝑎1subscript𝑎2…subscript𝑎𝐿\mathcal{A}=\{a_{1},a_{2},...,a_{L}\} is the spatial feature set and each ai∈RDsubscript𝑎𝑖superscript𝑅𝐷a_{i}\in R^{D} corresponds to features extracted at different image locations. Then the hidden states of the LSTM is computed aseti=fatt(ai,ht−1),βti=exp(eti)∑k=1Lexp(etk),formulae-sequencesubscript𝑒𝑡𝑖subscript𝑓attsubscript𝑎𝑖subscriptℎ𝑡1subscript𝛽𝑡𝑖expsubscript𝑒𝑡𝑖superscriptsubscript𝑘1𝐿expsubscript𝑒𝑡𝑘\displaystyle e_{ti}=f_{\text{att}}(a_{i},h_{t-1}),~{}~{}\beta_{ti}=\frac{\text{exp}(e_{ti})}{\sum_{k=1}^{L}\text{exp}(e_{tk})},(2)zt=∑k=1Lβtkak,ht=LSTM([ht−1,zt],wt−1),formulae-sequencesubscript𝑧𝑡superscriptsubscript𝑘1𝐿subscript𝛽𝑡𝑘subscript𝑎𝑘subscriptℎ𝑡LSTMsubscriptℎ𝑡1subscript𝑧𝑡subscript𝑤𝑡1\displaystyle z_{t}=\sum_{k=1}^{L}\beta_{tk}a_{k},~{}~{}h_{t}=\text{LSTM}([h_{t-1},z_{t}],w_{t-1}),where fattsubscript𝑓attf_{\text{att}} is an attention model, which we use a single fully connected layer conditioned on the previous hidden state. Once htsubscriptℎ𝑡h_{t} is obtained, the word generation is same as equation (1).
|
| 12 |
+
|
| 13 |
+
We follow the training procedure of Rennie et al. (2017). The decoder LSTM can be viewed as a “policy” denoted by pθsubscript𝑝𝜃p_{\theta}, where θ𝜃\theta is the set of parameters of the network. At each time step t𝑡t, the policy chooses an action by generating a word wtsubscript𝑤𝑡w_{t} and obtains a new “state” (i.e. hidden states of LSTM, attention weights, etc.). Once the end token is generated, a “reward” r𝑟r is given based on the score (e.g. CIDEr or BLEU) of the predicted sentence. The goal is to maximize the expected reward asL(θ)=𝔼ws∼pθ[r(ws)],𝐿𝜃subscript𝔼similar-tosuperscript𝑤𝑠subscript𝑝𝜃delimited-[]𝑟superscript𝑤𝑠L(\theta)=\mathbb{E}_{w^{s}\sim p_{\theta}}[r(w^{s})],(3)where ws={w1s,w2s,…,wTs}superscript𝑤𝑠subscriptsuperscript𝑤𝑠1subscriptsuperscript𝑤𝑠2…subscriptsuperscript𝑤𝑠𝑇w^{s}=\{w^{s}_{1},w^{s}_{2},...,w^{s}_{T}\} are sampled words at every time step. The REINFORCE algorithm Williams (1992) provides unbiased gradient estimation of θ𝜃\theta as∇θL(θ)≈r(ws)∇θlogpθ(ws),subscript∇𝜃𝐿𝜃𝑟superscript𝑤𝑠subscript∇𝜃subscript𝑝𝜃superscript𝑤𝑠\nabla_{\theta}{L}(\theta)\approx r(w^{s})\nabla_{\theta}{\log{p_{\theta}(w^{s})}},(4)using a single sequence.
|
| 14 |
+
|
| 15 |
+
We reduce the variance of the gradient estimator by using the self-critical approach as∇θL(θ)≈(r(ws)−r(w¯))∇θlogpθ(ws),subscript∇𝜃𝐿𝜃𝑟superscript𝑤𝑠𝑟¯𝑤subscript∇𝜃subscript𝑝𝜃superscript𝑤𝑠\nabla_{\theta}{L}(\theta)\approx(r(w^{s})-r(\bar{w}))\nabla_{\theta}{\log{p_{\theta}(w^{s})}},(5)where w¯tsubscript¯𝑤𝑡\bar{w}_{t} is the baseline reward calculated by the current model under the inference algorithm used at test time defined asw¯t=argmaxwtpθ(wt|ht).subscript¯𝑤𝑡subscriptsubscript𝑤𝑡subscript𝑝𝜃conditionalsubscript𝑤𝑡subscriptℎ𝑡\bar{w}_{t}=\mathop{\arg\max}_{w_{t}}p_{\theta}(w_{t}|h_{t}).(6)Then, sequences have rewards higher than w¯¯𝑤\bar{w} will be increased in probability, while samples result in lower reward will be suppressed.
|
| 16 |
+
|
| 17 |
+
We collect all n𝑛n-grams (n𝑛n=3 or 4 in our experiments) from a corpus of captions. We use the training set from MSCOCO to avoid the usage of the additional resource. Thus, a fair comparison to previous methods is guaranteed. Then, we filter the n𝑛n-grams with frequencies lower than five. The set of remaining ones is denoted as ℱℱ\mathcal{F}. During training, given the previous tokens predicted by the decoder, we constraint the sample space the current prediction bywt∼softmax(pθ(wts)⋅𝜶𝒕),similar-tosubscript𝑤𝑡softmax⋅subscript𝑝𝜃subscriptsuperscript𝑤𝑠𝑡subscript𝜶𝒕\vspace{-0.05in}w_{t}\sim\text{softmax}(p_{\theta}(w^{s}_{t})\cdot\boldsymbol{\alpha_{t}}),(7)where 𝜶𝒊subscript𝜶𝒊\boldsymbol{\alpha_{i}} is an indicator vector whose length is the vocabulary size |𝒱|𝒱|\mathcal{V}| and its elements are non-zero only if the corresponding word and the previous (n−1𝑛1n-1)-gram constitute a valid n𝑛n-gram in ℱℱ\mathcal{F} as𝜶𝒕[k]=subscript𝜶𝒕delimited-[]𝑘absent\displaystyle\boldsymbol{\alpha_{t}}[k]={1if {wt−n+1s,⋯,wt−1s,k}∈ℱ0otherwise.cases1if {wt−n+1s,⋯,wt−1s,k}∈ℱ0otherwise\displaystyle\begin{cases}1&\mbox{if $\{w^{s}_{t-n+1},\cdots,w^{s}_{t-1},k\}\in\mathcal{F}$}\\0&\mbox{otherwise}\end{cases}.(8)
|
| 18 |
+
|
| 19 |
+
The key motivation for applying the above constraint is two-fold: (1) this ensures generated captions always formed by valid n𝑛n-grams, which provides us a direct way of eliminating the repeated common phrases and bad-endings like the ones in Table 1; and (2) this shrinks the size of action space, which makes the training converges much faster. For MSCOCO, action space is changed from more than 9,000 to 56 on average.
|
| 20 |
+
|
| 21 |
+
We perform both quantitative and qualitative evaluations on MSCOCO dataset. The dataset contains 123,287 images and each image has at least five human captions. To seek fair comparison to others, we use the publicly available splits, which contains 82,783 training, 5,000 validation and 5,000 testing images.
|
| 22 |
+
|
| 23 |
+
Our implementations are based on the publiclyproject.222https://github.com/ruotianluo/self-critical.pytorch We use an ImageNet pre-trained 101-layered ResNet333https://github.com/KaimingHe/deep-residual-networks He et al. (2016) to extract visual features. We consider two types (see Section 2) of architectural training with RL: (1) the plain encoder-decoder, and (2) the encoder-decoder with attention. For the former one, we represent each image by a 2,048-dimension vector by extracting the features from the last convolutional layer with average pooling. For the attention model, we apply spatial adaptive max pooling and the output feature map has the size of 14×14×2,0481414204814\times 14\times 2,048. At each time step, the attention model produces weights over 196 spatial locations. The size of word embeddings and the hidden dimension of the LSTM are set to 512 for all experiments. More details are in Appendix B.
|
| 24 |
+
|
| 25 |
+
We report our results in four different settings, which include the combinations of with/without attention and using tri-/four-gram. We directly compare with our counterparts that have the same structures but no n𝑛n-gram modules. Specifically, they are encoder-decoder based self-critical (ED-SC), and the one with attention (Att-SC). In addition, since our experimental setup is almost identical to many existing works, we also include their reported results, which include Karpathy and Li (2015); Xu et al. (2015); Ranzato et al. (2015); Ren et al. (2017). At last, we also include the performance of our warm-start models - the models trained by MLE Vinyals et al. (2015) using cross entropy (ED-XE and Att-XE) - as a reference.
|
| 26 |
+
|
| 27 |
+
We report performance on FIVE metrics: BLEU4, METEOR, ROUGE-L,CIDEr and Bad Ending Rate. For the self-critical baselines, we report two sets of performances: 1) the captions directly generated by the model; and 2) the sequences of removing bad endings of the generated captions, based on the distribution in Appendix A.
|
| 28 |
+
|
| 29 |
+
Table 2 summarizes the performances of our models compared with other baselines. We see that without performance adjustments, the self-critical RL with attention performs the best. However, since it contains many bad endings, our method achieves supreme results after these repeated patterns are removed. We also provide some qualitative comparison between our attention model and self-critical in Appendix C.
|
| 30 |
+
|
| 31 |
+
We show that constraining the action space leads to a more efficient RL training in Figure 2. CIDEr score is calculated after removing bad endings. We plot three curves using architectures with/without attentions. The Green curve is the self-critical, the blue one is with prioritized sampling, and the red one is our final model with 4-gram constraint. We observe that we can speed up almost twice than its counterpart.
|
| 32 |
+
|
| 33 |
+
We also evaluate our attention model on COCO online server444https://competitions.codalab.org/competitions/3221 and results are reported in Table 3. Att-SC gets a higher score than ours in the online test, however, with a lot of bad endings where the bad ending ratio is 72.7%percent\%.
|
| 34 |
+
|
| 35 |
+
We also implement human evaluation on the results generated by our Att-4-gram compared with Att-SC. We randomly select 200 images from the test set. Each time, one image with two captions generated by two different models are shown to the volunteer and three choices are provided: (1) the first one is better; (2) both are the same level; (3) the second one is better. See more details in Appendix D. In Table 5, our model wins 400 times and performs more closely to human than Att-SC.
|
| 36 |
+
|
| 37 |
+
To further evaluate the quality of the caption model, we follow Shetty et al. (2017) to measure the diversity of the generated captions. We compute the novelty score of our 4-gram model, which is defined as whether a particular caption has been observed in the training set. When two models have the same level predictive performances (e.g. CIDEr), a higher novelty score usually indicates more diverse generations. We conduct the experiment five times and report the averaged novelty score of our 4-gram model and the Att-SC, which are 77.83% and 59.28% respectively. As the reference, the METEOR and novelty scores reported in Shetty et al. (2017) are 23.6, and 79.84%, respectively.
|
| 38 |
+
|
| 39 |
+
Inspired by the paper reviews, we extend our model by adopting another language prior to evaluating the effectiveness of constraining action space during REINFORCE training. We train our neural language model based on the MSCOCO caption corpus with an LSTM unit.
|
| 40 |
+
|
| 41 |
+
Given a word series {w0,w1,…,wT}subscript𝑤0subscript𝑤1…subscript𝑤𝑇\{w_{0},w_{1},...,w_{T}\}, the target of a neural language model is to maximize the log-likelihood as:maxθlogpθ(w0,w1,…,wT).subscript𝜃subscript𝑝𝜃subscript𝑤0subscript𝑤1…subscript𝑤𝑇\displaystyle\mathop{\max}_{\theta}\log p_{\theta}(w_{0},w_{1},...,w_{T}).(9)We model pθ(w0,w1,…,wT)subscript𝑝𝜃subscript𝑤0subscript𝑤1…subscript𝑤𝑇p_{\theta}(w_{0},w_{1},...,w_{T}) by an LSTM unit:logpθ(\displaystyle\log p_{\theta}(w0,…,wT)=∑t=1TlogpθLM(wt|ht−1)\displaystyle w_{0},...,w_{T})=\sum_{t=1}^{T}\log p_{\theta_{LM}}(w_{t}|h_{t-1})(10)ht=LSTMLM(ht−1,wt−1),subscriptℎ𝑡subscriptLSTM𝐿𝑀subscriptℎ𝑡1subscript𝑤𝑡1\displaystyle h_{t}=\text{LSTM}_{LM}(h_{t-1},w_{t-1}),where w0subscript𝑤0w_{0} is set to a *start* token for all sentences. h0subscriptℎ0h_{0} and c0subscript𝑐0c_{0} are initialized to zero. After obtaining the optimized θLM∗subscriptsuperscript𝜃𝐿𝑀\theta^{*}_{LM}, we can use it to constrain the action space similar to the N-gram language model. Specifically, given previous t−1𝑡1t-1 sampled words from current caption model, we compute pθLM∗(wt|w0,w1,…,wt−1)subscript𝑝subscriptsuperscript𝜃𝐿𝑀conditionalsubscript𝑤𝑡subscript𝑤0subscript𝑤1…subscript𝑤𝑡1p_{\theta^{*}_{LM}}(w_{t}|w_{0},w_{1},...,w_{t-1}), which is the probability of the next word over the entire vocabulary. We then apply a simple thresholding rule to form a subset of valid words for the captioning model.𝜶𝒕[k]={1if {k}∈ℱ0otherwise,wheresubscript𝜶𝒕delimited-[]𝑘cases1if {k}∈ℱ0otherwisewhere\displaystyle\boldsymbol{\alpha_{t}}[k]=\begin{cases}1&\mbox{if $\{k\}\in\mathcal{F}$}\\0&\mbox{otherwise}\end{cases},\text{where}(11)ℱ=ℱabsent\displaystyle\mathcal{F}={wt|pθLM∗(wt|w0,w1,…,wt−1)≥η}.conditional-setsubscript𝑤𝑡subscript𝑝subscriptsuperscript𝜃𝐿𝑀conditionalsubscript𝑤𝑡subscript𝑤0subscript𝑤1…subscript𝑤𝑡1𝜂\displaystyle\{w_{t}|p_{\theta^{*}_{LM}}(w_{t}|w_{0},w_{1},...,w_{t-1})\geq\eta\}.η𝜂\eta is a hyperparameter.
|
| 42 |
+
|
| 43 |
+
The word embedding size and hidden dimension of θLMsubscript𝜃𝐿𝑀\theta_{LM} are set to 256 for this experiment. We use Adam optimizer for training language model and the learning rate is set to 0.001. The batch size of language model training and REINFORCE training are both set to 20 in the experiments. η𝜂\eta is set to 0.00005 for the first word and increases by a factor of two for every timestep. We report our results in two settings, which include the combination of with/without attention for the caption model (termed ED-LSTM-LM and Att-LSTM-LM). We use the same warm-start models as in the N-gram experiments. The performances are summarized in Table 4 and Table 3. We see that the neural language model provides further performance gains compared to the N-gram model without introducing any bad-endings.This is because that the LSTM language model covers a larger context than N-gram, which helps to generate more accurate captions.
|
| 44 |
+
|
| 45 |
+
In this paper, we present a simple but efficient approach to RL-based image caption by considering n𝑛n-gram language prior to constrain the action space. Our method converges faster and achieves better results than self-critical setting after removing bad endings in the generated captions. In addition, captions generated by our models are more human readable and graceful. We further extend our ideas using neural language model. The results demonstrate that the captioning models are more beneficial from the neural language model than the N-gram model.
|
1809.06297v2.txt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Natural language generation is an important building block in many applications, such as machine translation [5], dialogue generation [36], and image captioning [14]. While these applications demonstrate the practical value of generating coherent and meaningful sentences in a supervised setup, unsupervised text generation, which aims to estimate the distribution of real text from a corpus, is still challenging.Previous approaches, that often maximize the log-likelihood of each ground-truth word given prior observed words [41], typically suffer from exposure bias [6, 47], i.e., the discrepancy between training and inference stages. During inference, each word is generated in sequence based on previously generated words, while during training ground-truth words are used for each timestep [27, 53, 58].
|
| 2 |
+
|
| 3 |
+
Recently, adversarial training has emerged as a powerful paradigm to address the aforementioned issues. The generative adversarial network (GAN) [21] matches the distribution of synthetic and real data by introducing a two-player adversarial game between a generator and a discriminator. The generator is trained to learn a nonlinear function that maps samples from a given (simple) prior distribution to synthetic data that appear realistic, while the discriminator aims to distinguish the fake data from real samples.GAN can be trained efficiently via back-propagation through the nonlinear function of the generator, which typically requires the data to be continuous (e.g., images). However, the discrete nature of text renders the model non-differentiable, hindering use of GAN in natural language processing tasks.
|
| 4 |
+
|
| 5 |
+
Attempts have been made to overcome such difficulties, which can be roughly divided into two categories. The first includes models that combine ideas from GAN and reinforcement learning (RL), framing text generation as a sequential decision-making process. Specifically, the gradient of the generator is estimated via the policy-gradient algorithm. Prominent examples from this category include SeqGAN [60], MaliGAN [8], RankGAN [37], LeakGAN [24] and MaskGAN [15]. Despite the promising performance of these approaches, one major disadvantage with such RL-based strategies is that they typically yield high-variance gradient estimates, known to be challenging for optimization [40, 61].
|
| 6 |
+
|
| 7 |
+
Models from the second category adopt the original framework of GAN without incorporating the RL methods (i.e., RL-free). Distinct from RL-based approaches, TextGAN [61] and Gumbel-Softmax GAN (GSGAN) [31] apply a simple soft-argmax operator, and a similar Gumbel-softmax trick [28, 40], respectively, to provide a continuous approximation of the discrete distribution (i.e., multinomial) on text, so that the model is still end-to-end differentiable. What makes this approach appealing is that it feeds the optimizer with low-variance gradients, improving stability and speed of training.In this work, we aim to improve the training of GAN that resides in this category.
|
| 8 |
+
|
| 9 |
+
When training GAN to generate text samples, one practical challenge is that the gradient from the discriminator often vanishes after being trained for only a few iterations. That is, the discriminator can easily distinguish the fake sentences from the real ones. TextGAN [61] proposed a remedy based on feature matching [49], adding Maximum Mean Discrepancy (MMD) to the original objective of GAN [22]. However, in practice, the model is still difficult to train. Specifically, (i) the bandwidth of the RBF kernel is difficult to choose; (ii) kernel methods often suffer from poor scaling; and (iii) empirically, TextGAN tends to generate short sentences.
|
| 10 |
+
|
| 11 |
+
In this work, we present feature mover GAN (FM-GAN), a novel adversarial approach that leverages optimal transport (OT) to construct a new model for text generation. Specifically, OT considers the problem of optimally transporting one set of data points to another, and is closely related to GAN. The earth-mover’s distance (EMD) is employed often as a metric for the OT problem. In our setting, a variant of the EMD between the feature distributions of real and synthetic sentences is proposed as the new objective, denoted as the feature-mover’s distance (FMD). In this adversarial game, the discriminator aims to maximize the dissimilarity of the feature distributions based on the FMD, while the generator is trained to minimize the FMD by synthesizing more-realistic text.In practice, the FMD is turned into a differentiable quantity and can be computed using the proximal point method [59].
|
| 12 |
+
|
| 13 |
+
The main contributions of this paper are as follows: (i) A new GAN model based on optimal transport is proposed for text generation. The proposed model is RL-free, and uses a so-called feature-mover’s distance as the objective. (ii) We evaluate our model comprehensively on unconditional text generation. When compared with previous methods, our model shows a substantial improvement in terms of generation quality based on the BLEU statistics [43] and human evaluation. Further, our model also achieves good generation diversity based on the self-BLEU statistics [63]. (iii) In order to demonstrate the versatility of the proposed method, we also generalize our model to conditional-generation tasks, including non-parallel text style transfer [54], and unsupervised cipher cracking [20].
|
| 14 |
+
|
| 15 |
+
We review the basic idea of adversarial distribution matching (ADM), which avoids the specification of a likelihood function.Instead, this strategy defines draws from the synthetic data distribution pG(𝒙)subscript𝑝𝐺𝒙p_{G}({\boldsymbol{x}}) by drawing a latent code 𝒛∼p(𝒛)similar-to𝒛𝑝𝒛{\boldsymbol{z}}\sim p({\boldsymbol{z}}) from an easily sampled distribution p(𝒛)𝑝𝒛p({\boldsymbol{z}}), and learning a generator function G(𝒛)𝐺𝒛G({\boldsymbol{z}}) such that 𝒙=G(𝒛)𝒙𝐺𝒛{\boldsymbol{x}}=G({\boldsymbol{z}}). The form of pG(𝒙)subscript𝑝𝐺𝒙p_{G}({\boldsymbol{x}}) is neither specified nor learned, rather we learn to draw samples from pG(𝒙)subscript𝑝𝐺𝒙p_{G}({\boldsymbol{x}}). To match the ensemble of draws from pG(𝒙)subscript𝑝𝐺𝒙p_{G}({\boldsymbol{x}}) with an ensemble of draws from the real data distribution pd(𝒙)subscript𝑝𝑑𝒙p_{d}({\boldsymbol{x}}), ADM introduces a variational function 𝕍(pd,pG;D)𝕍subscript𝑝𝑑subscript𝑝𝐺𝐷\mathbb{V}(p_{d},p_{G};D), where D(𝒙)𝐷𝒙D({\boldsymbol{x}}) is known as the critic function or discriminator.The goal of ADM is to obtain an equilibrium of the following objective:minGmaxD𝕍(pd,pG;D),subscript𝐺subscript𝐷𝕍subscript𝑝𝑑subscript𝑝𝐺𝐷\min_{G}\max_{D}\mathbb{V}(p_{d},p_{G};D)\,,(1)where 𝕍(pd,pG;D)𝕍subscript𝑝𝑑subscript𝑝𝐺𝐷\mathbb{V}(p_{d},p_{G};D) is computed using samples from pdsubscript𝑝𝑑p_{d} and pGsubscript𝑝𝐺p_{G} (not explicitly in terms of the distributions themselves), and d(pd,pG)=maxD𝕍(pd,pG;D)𝑑subscript𝑝𝑑subscript𝑝𝐺subscript𝐷𝕍subscript𝑝𝑑subscript𝑝𝐺𝐷d(p_{d},p_{G})=\max_{D}\mathbb{V}(p_{d},p_{G};D) defines a discrepancy metric between two distributions [3, 42].One popular example of ADM is the generative adversarial network (GAN), in which 𝕍JSD=𝔼𝒙∼pd(𝒙)logD(𝒙)+𝔼𝒛∼p(𝒛)log[1−D(G(𝒛))]subscript𝕍JSDsubscript𝔼similar-to𝒙subscript𝑝𝑑𝒙𝐷𝒙subscript𝔼similar-to𝒛𝑝𝒛1𝐷𝐺𝒛\mathbb{V}_{\text{JSD}}=\mathbb{E}_{{\boldsymbol{x}}\sim p_{d}({\boldsymbol{x}})}\log D({\boldsymbol{x}})+\mathbb{E}_{{\boldsymbol{z}}\sim p({\boldsymbol{z}})}\log[1-D(G({\boldsymbol{z}}))] recovers the Jensen-Shannon divergence (JSD) for d(pd,pG)𝑑subscript𝑝𝑑subscript𝑝𝐺d(p_{d},p_{G}) [21]; expectations 𝔼𝒙∼pd(𝒙)(⋅)subscript𝔼similar-to𝒙subscript𝑝𝑑𝒙⋅\mathbb{E}_{{\boldsymbol{x}}\sim p_{d}({\boldsymbol{x}})}(\cdot) and 𝔼𝒛∼p(𝒛)(⋅)subscript𝔼similar-to𝒛𝑝𝒛⋅\mathbb{E}_{{\boldsymbol{z}}\sim p({\boldsymbol{z}})}(\cdot) are computed approximately with samples from the respective distributions. Most of the existing work in applying GAN for text generation also uses this standard form, by combining it with policy gradient [60]. However, it has been shown in [2] that this standard GAN objective suffers from an unstably weak learning signal when the discriminator gets close to local optimal, due to the gradient-vanishing effect. This is because the JSD implied by the original GAN loss is not continuous wrt the generator parameters.
|
| 16 |
+
|
| 17 |
+
GAN models were originally developed for learning to draw from a continuous distribution.The discrete nature of text samples hinders the use of GANs, and thus a vectorization of a sequence of discrete tokens is considered.Let 𝒙={𝒔1,…,𝒔L}∈ℝv×L𝒙subscript𝒔1…subscript𝒔𝐿superscriptℝ𝑣𝐿{\boldsymbol{x}}=\{{\boldsymbol{s}}_{1},...,{\boldsymbol{s}}_{L}\}\in\mathbb{R}^{v\times L} be a sentence of length L𝐿L, where 𝒔t∈ℝvsubscript𝒔𝑡superscriptℝ𝑣{\boldsymbol{s}}_{t}\in\mathbb{R}^{v} denotes the one-hot representation for the t𝑡t-th word. A word-level vector representation of each word in 𝒙𝒙{\boldsymbol{x}} is achieved by learning a word embedding matrix 𝐖𝒆∈ℝk×vsubscript𝐖𝒆superscriptℝ𝑘𝑣{\bf W}_{\boldsymbol{e}}\in\mathbb{R}^{k\times v}, where v𝑣v is the size of the vocabulary. Each word is represented as a k𝑘k-dimensional vector 𝒘t=𝐖𝒆𝒔t∈ℝksubscript𝒘𝑡subscript𝐖𝒆subscript𝒔𝑡superscriptℝ𝑘{\boldsymbol{w}}_{t}={\bf W}_{\boldsymbol{e}}{\boldsymbol{s}}_{t}\in\mathbb{R}^{k}. The sentence 𝒙𝒙{\boldsymbol{x}} is now represented as a matrix 𝐖=[𝒘1,…,𝒘L]∈ℝk×L𝐖subscript𝒘1…subscript𝒘𝐿superscriptℝ𝑘𝐿{\bf W}=[{\boldsymbol{w}}_{1},...,{\boldsymbol{w}}_{L}]\in\mathbb{R}^{k\times L}. A neural network F(⋅)𝐹⋅F(\cdot), such as RNN [5, 10], CNN [29, 18, 52] or SWEM [51], can then be applied to extract feature vector 𝒇=F(��)𝒇𝐹𝐖{\boldsymbol{f}}=F({\bf W}).
|
| 18 |
+
|
| 19 |
+
GAN can be interpreted in the framework of optimal transport theory, and it has been shown that the Earth-Mover’s Distance (EMD) is a good objective for generative modeling [3]. Originally applied in content-based image retrieval tasks [48], EMD is well-known for comparing multidimensional distributions that are used to describe the different features of images (e.g.formulae-sequence𝑒𝑔e.g., brightness, color, and texture content). It is defined as the ground distance (i.e., cost function) between every two perceptual features, extending the notion of a distance between single elements to a distance between sets of elements. Specifically, consider two probability distribution x∼μsimilar-to𝑥𝜇x\sim\mu and y∼νsimilar-to𝑦𝜈y\sim\nu; EMD can be then defined as:𝒟EMD(μ,ν)=infγ∈Π(μ,ν)𝔼(x,y)∼γc(x,y),subscript𝒟EMD𝜇𝜈subscriptinfimum𝛾Π𝜇𝜈subscript𝔼similar-to𝑥𝑦𝛾𝑐𝑥𝑦\mathcal{D}_{\text{EMD}}(\mu,\nu)=\inf_{\gamma\in\Pi(\mu,\nu)}\mathbb{E}_{(x,y)\sim\gamma}\,\,c(x,y)\,,(2)where Π(μ,ν)Π𝜇𝜈\Pi(\mu,\nu) denotes the set of all joint distributions γ(x,y)𝛾𝑥𝑦\gamma(x,y) with marginals μ(x)𝜇𝑥\mu(x) and ν(y)𝜈𝑦\nu(y), and c(x,y)𝑐𝑥𝑦c(x,y) is the cost function (e.g., Euclidean or cosine distance). Intuitively, EMD is the minimum cost that γ𝛾\gamma has to transport from μ𝜇\mu to ν𝜈\nu.
|
| 20 |
+
|
| 21 |
+
We propose a new GAN framework for discrete text data, called feature mover GAN (FM-GAN). The idea of optimal transport (OT) is integrated into adversarial distribution matching. Explicitly, the original critic function in GANs is replaced by the Earth-Mover’s Distance (EMD) between the sentence features of real and synthetic data. In addition, to handle the intractable issue when computing (2) [3, 49], we define the Feature-Mover’s Distance (FMD), a variant of EMD that can be solved tractably using the Inexact Proximal point method for OT (IPOT) algorithm [59]. In the following sections, we discuss the main objective of our model, the detailed training process for text generation, as well as extensions. Illustration of the framework is shown in Figure 1.
|
| 22 |
+
|
| 23 |
+
In practice, it is not tractable to calculate the minimization over γ𝛾\gamma in (2) [3, 19, 50].In this section, we propose the Feature-Mover’s Distance (FMD) which can be solved tractably. Consider two sets of sentence feature vectors 𝐅={𝒇i}i=1m∈ℝd×m𝐅superscriptsubscriptsubscript𝒇𝑖𝑖1𝑚superscriptℝ𝑑𝑚{\bf F}=\{{\boldsymbol{f}}_{i}\}_{i=1}^{m}\in\mathbb{R}^{d\times m} and 𝐅′={𝒇j′}j=1n∈ℝd×nsuperscript𝐅′superscriptsubscriptsubscriptsuperscript𝒇′𝑗𝑗1𝑛superscriptℝ𝑑𝑛{\bf F}^{\prime}=\{{\boldsymbol{f}}^{\prime}_{j}\}_{j=1}^{n}\in\mathbb{R}^{d\times n} drawn from two different sentence feature distributions ℙ𝒇subscriptℙ𝒇\mathbb{P}_{{\boldsymbol{f}}} and ℙ𝒇′subscriptℙsuperscript𝒇′\mathbb{P}_{{\boldsymbol{f}}^{\prime}}; m𝑚m and n𝑛n are the total number of d𝑑d-dimensional sentence features in 𝐅𝐅{\bf F} and 𝐅′superscript𝐅′{\bf F}^{\prime}, respectively. Let 𝐓∈ℝm×n𝐓superscriptℝ𝑚𝑛{\bf T}\in\mathbb{R}^{m\times n} be a transport matrix in which 𝐓ij≥0subscript𝐓𝑖𝑗0{\bf T}_{ij}\geq 0 defines how much of feature vector 𝒇isubscript𝒇𝑖{\boldsymbol{f}}_{i} would be transformed to 𝒇j′subscriptsuperscript𝒇′𝑗{\boldsymbol{f}}^{\prime}_{j}. The FMD between two sets of sentence features is then defined as:𝒟FMD(ℙ𝒇,ℙ𝒇′)=min𝐓≥0∑i=1m∑j=1n𝐓ij⋅c(𝒇i,𝒇j′)=min𝐓≥0⟨𝐓,𝐂⟩,subscript𝒟FMDsubscriptℙ𝒇subscriptℙsuperscript𝒇′subscript𝐓0subscriptsuperscript𝑚𝑖1subscriptsuperscript𝑛𝑗1⋅subscript𝐓𝑖𝑗𝑐subscript𝒇𝑖subscriptsuperscript𝒇′𝑗subscript𝐓0𝐓𝐂\mathcal{D}_{\text{FMD}}(\mathbb{P}_{\boldsymbol{f}},\mathbb{P}_{{\boldsymbol{f}}^{\prime}})=\min_{{\bf T}\geq 0}\sum^{m}_{i=1}\sum^{n}_{j=1}{\bf T}_{ij}\cdot c({\boldsymbol{f}}_{i},{\boldsymbol{f}}^{\prime}_{j})=\min_{{\bf T}\geq 0}\,\,\langle{\bf T},{\bf C}\rangle\,,(3)where ∑j=1n𝐓ij=1msuperscriptsubscript𝑗1𝑛subscript𝐓𝑖𝑗1𝑚\sum_{j=1}^{n}{\bf T}_{ij}=\frac{1}{m} and ∑i=1m𝐓ij=1nsuperscriptsubscript𝑖1𝑚subscript𝐓𝑖𝑗1𝑛\sum_{i=1}^{m}{\bf T}_{ij}=\frac{1}{n} are the constraints, and ⟨⋅,⋅⟩⋅⋅\langle\cdot,\cdot\rangle represents the Frobenius dot-product. In this work, the transport cost is defined as the cosine distance:c(𝒇i,𝒇j′)=1−𝒇i⊤𝒇j′‖𝒇i‖2‖𝒇j′‖2𝑐subscript𝒇𝑖subscriptsuperscript𝒇′𝑗1superscriptsubscript𝒇𝑖topsubscriptsuperscript𝒇′𝑗subscriptnormsubscript𝒇𝑖2subscriptnormsubscriptsuperscript𝒇′𝑗2c({\boldsymbol{f}}_{i},{\boldsymbol{f}}^{\prime}_{j})=1-\frac{{\boldsymbol{f}}_{i}^{\top}{\boldsymbol{f}}^{\prime}_{j}}{\|{\boldsymbol{f}}_{i}\|_{2}\|{\boldsymbol{f}}^{\prime}_{j}\|_{2}}, and𝐂𝐂{\bf C} is the cost matrix such that 𝐂ij=c(𝒇i,𝒇j′)subscript𝐂𝑖𝑗𝑐subscript𝒇𝑖subscriptsuperscript𝒇′𝑗{\bf C}_{ij}=c({\boldsymbol{f}}_{i},{\boldsymbol{f}}^{\prime}_{j}). Note that during training, we set m=n𝑚𝑛m=n as the mini-batch size.
|
| 24 |
+
|
| 25 |
+
We propose to use the Inexact Proximal point method for Optimal Transport (IPOT) algorithm to compute the optimal transport matrix 𝐓∗superscript𝐓{\bf T}^{*}, which provides a solution to the original optimal transport problem (3) [59]. Specifically, IPOT iteratively solves the following optimization problem:𝐓(t+1)=argmin𝐓∈Π(𝒇,𝒇′)⟨𝐓,𝐂⟩+β𝔻h(𝐓,𝐓(t)),superscript𝐓𝑡1subscriptargmin𝐓Π𝒇superscript𝒇′𝐓𝐂𝛽subscript𝔻ℎ𝐓superscript𝐓𝑡{\bf T}^{(t+1)}=\text{argmin}_{{\bf T}\in\Pi({\boldsymbol{f}},{\boldsymbol{f}}^{\prime})}\langle{\bf T},{\bf C}\rangle+\beta\mathbb{D}_{h}({\bf T},{\bf T}^{(t)})\,,(4)where 𝔻h(𝐓,𝐓(t))=∑i,j𝐓ijlog𝐓ij𝐓ij(t)−∑i,j𝐓ij+∑i,j𝐓ij(t)subscript𝔻ℎ𝐓superscript𝐓𝑡subscript𝑖𝑗subscript𝐓𝑖𝑗subscript𝐓𝑖𝑗subscriptsuperscript𝐓𝑡𝑖𝑗subscript𝑖𝑗subscript𝐓𝑖𝑗subscript𝑖𝑗subscriptsuperscript𝐓𝑡𝑖𝑗\mathbb{D}_{h}({\bf T},{\bf T}^{(t)})=\sum_{i,j}{\bf T}_{ij}\log\frac{{\bf T}_{ij}}{{\bf T}^{(t)}_{ij}}-\sum_{i,j}{\bf T}_{ij}+\sum_{i,j}{\bf T}^{(t)}_{ij} denotes the Bregman divergence wrt the entropy functional h(𝐓)=∑i,j𝐓ijlog𝐓ijℎ𝐓subscript𝑖𝑗subscript𝐓𝑖𝑗subscript𝐓𝑖𝑗h({\bf T})=\sum_{i,j}{\bf T}_{ij}\log{\bf T}_{ij}.
|
| 26 |
+
|
| 27 |
+
Here the Bregman divergence 𝔻hsubscript𝔻ℎ\mathbb{D}_{h} serves as a proximity metric and β𝛽\beta is the proximity penalty.This problem can be solved efficiently by Sinkhorn-style proximal point iterations [13, 59], as detailed in Algorithm 1.
|
| 28 |
+
|
| 29 |
+
Notably, unlike the Sinkhorn algorithm [19], we do not need to back-propagate the gradient through the proximal point iterations, which is justified by the Envelope Theorem [1] (see the Supplementary Material (SM)). This accelerates the learning process significantly and improves training stability [59].
|
| 30 |
+
|
| 31 |
+
To integrate FMD into adversarial distribution matching, we propose to solve the following mini-max game:minGmaxFℒFM-GAN=minGmaxF𝔼𝒙∼p𝒙,𝒛∼p𝒛[𝒟FMD(F(𝐖𝒆𝒙),F(G(𝒛)))],subscript𝐺subscript𝐹subscriptℒFM-GANsubscript𝐺subscript𝐹subscript𝔼formulae-sequencesimilar-to𝒙subscript𝑝𝒙similar-to𝒛subscript𝑝𝒛delimited-[]subscript𝒟FMD𝐹subscript𝐖𝒆𝒙𝐹𝐺𝒛\min_{G}\max_{F}\mathcal{L}_{\text{FM-GAN}}=\min_{G}\max_{F}{\mathbb{E}}_{{\boldsymbol{x}}\sim p_{{\boldsymbol{x}}},{\boldsymbol{z}}\sim p_{{\boldsymbol{z}}}}[\mathcal{D}_{\text{FMD}}(F({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}),F(G({\boldsymbol{z}})))]\,,(5)where F(⋅)𝐹⋅F(\cdot) is the sentence feature extractor, and G(⋅)𝐺⋅G(\cdot) is the sentence generator. We call this feature mover GAN (FM-GAN).The detailed training procedure is provided in Algorithm 2.
|
| 32 |
+
|
| 33 |
+
Sentence generator The Long Short-Term Memory (LSTM) recurrent neural network [25] is used as our sentence generator G(⋅)𝐺⋅G(\cdot) parameterized by θ𝜃\theta.Let 𝐖𝒆∈ℝk×vsubscript𝐖𝒆superscriptℝ𝑘𝑣{\bf W}_{\boldsymbol{e}}\in\mathbb{R}^{k\times v} be our learned word embedding matrix, where v𝑣v is the vocabulary size, with each word in sentence 𝒙𝒙{\boldsymbol{x}} embedded into 𝒘tsubscript𝒘𝑡{\boldsymbol{w}}_{t}, a k𝑘k-dimensional word vector.All words in the synthetic sentence are generated sequentially, i.e.,𝒘t=𝐖𝒆 argmax(𝒂t), where 𝒂t=𝐕𝒉t∈ℝv,formulae-sequencesubscript𝒘𝑡subscript𝐖𝒆 argmaxsubscript𝒂𝑡 where subscript𝒂𝑡𝐕subscript𝒉𝑡superscriptℝ𝑣{\boldsymbol{w}}_{t}={\bf W}_{\boldsymbol{e}}\text{ argmax}({\boldsymbol{a}}_{t})\,,\text{\quad where\quad}{\boldsymbol{a}}_{t}={\bf V}{\boldsymbol{h}}_{t}\in\mathbb{R}^{v}\,,(6)where 𝒉tsubscript𝒉𝑡{\boldsymbol{h}}_{t} is the hidden unit updated recursively through the LSTM cell: 𝒉t=LSTM(𝒘t−1,𝒉t−1,𝒛)subscript𝒉𝑡LSTMsubscript𝒘𝑡1subscript𝒉𝑡1𝒛{\boldsymbol{h}}_{t}=\text{LSTM}({\boldsymbol{w}}_{t-1},{\boldsymbol{h}}_{t-1},{\boldsymbol{z}}), 𝐕𝐕{\bf V} is a decoding matrix, softmax(𝐕𝒉t)softmax𝐕subscript𝒉𝑡\text{softmax}({\bf V}{\boldsymbol{h}}_{t}) defines the distribution over the vocabulary. Note that, distinct from a traditional sentence generator, here, the argmax operation is used, rather than sampling from a multinomial distribution, as in the standard LSTM. Therefore, all randomness during the generation is clamped into the noise vector 𝒛𝒛{\boldsymbol{z}}.
|
| 34 |
+
|
| 35 |
+
The generator G𝐺G cannot be trained, due to the non-differentiable function argmax. Instead, an soft-argmax operator [61] is used as a continuous approximation:𝒘~t=𝐖𝒆 softmax(𝒂~t), where 𝒂~t=𝐕𝒉t/τ∈ℝv,formulae-sequencesubscript~𝒘𝑡subscript𝐖𝒆 softmaxsubscript~𝒂𝑡 where subscript~𝒂𝑡𝐕subscript𝒉𝑡𝜏superscriptℝ𝑣\tilde{{\boldsymbol{w}}}_{t}={\bf W}_{\boldsymbol{e}}\text{ softmax}(\tilde{{\boldsymbol{a}}}_{t})\,,\text{\quad where\quad}\tilde{{\boldsymbol{a}}}_{t}={\bf V}{\boldsymbol{h}}_{t}/\tau\in\mathbb{R}^{v}\,,(7)where τ𝜏\tau is the temperature parameter. Note when τ→0→𝜏0\tau\rightarrow 0, this approximates (6).We denote G(𝒛)=(𝒘~1,…,𝒘~L)∈ℝk×L𝐺𝒛subscript~𝒘1…subscript~𝒘𝐿superscriptℝ𝑘𝐿G({\boldsymbol{z}})=(\tilde{{\boldsymbol{w}}}_{1},\ldots,\tilde{{\boldsymbol{w}}}_{L})\in\mathbb{R}^{k\times L} as the approximated embedding matrix for the synthetic sentence.
|
| 36 |
+
|
| 37 |
+
Feature extractor We use the convolutional neural network proposed in [11, 29] as our sentence feature extractor F(⋅)𝐹⋅F(\cdot) parameterized by ϕitalic-ϕ\phi, which contains a convolution layer and a max-pooling layer. Assuming a sentence of length L𝐿L, the sentence is represented as a matrix 𝐖∈ℝk×L𝐖superscriptℝ𝑘𝐿{\bf W}\in\mathbb{R}^{k\times L}, where k𝑘k is the word-embedding dimension, and L𝐿L is the maximum sentence length. A convolution filter 𝐖conv∈ℝk×lsubscript𝐖𝑐𝑜𝑛𝑣superscriptℝ𝑘𝑙\mathbf{W}_{conv}\in\mathbb{R}^{k\times l} is applied to a window of l𝑙l words to produce new features. After applying the nonlinear activation function, we then use the max-over-time pooling operation [11] to the feature maps and extract the maximum values. While the convolution operator can extract features independent of their positions in the sentence, the max-pooling operator tries to capture the most salient features.
|
| 38 |
+
|
| 39 |
+
The above procedure describes how to extract features using one filter. Our model uses multiple filters with different window sizes, where each filter is considered as a linguistic feature detector. Assume d1subscript𝑑1d_{1} different window sizes, and for each window size we have d2subscript𝑑2d_{2} filters; then a sentence feature vector can be represent as 𝒇=F(𝐖)∈ℝd𝒇𝐹𝐖superscriptℝ𝑑{\boldsymbol{f}}=F({\bf W})\in\mathbb{R}^{d}, where d=d1×d2𝑑subscript𝑑1subscript𝑑2d=d_{1}\times d_{2}.
|
| 40 |
+
|
| 41 |
+
Style transfer Our FM-GAN model can be readily generalized to conditional generation tasks, such as text style transfer [26, 54, 44, 35]. The style transfer task is essentially learning the conditional distribution p(𝒙2|𝒙1;c1,c2)𝑝conditionalsubscript𝒙2subscript𝒙1subscript𝑐1subscript𝑐2p({\boldsymbol{x}}_{2}|{\boldsymbol{x}}_{1};c_{1},c_{2}) and p(𝒙1|𝒙2;c1,c2)𝑝conditionalsubscript𝒙1subscript𝒙2subscript𝑐1subscript𝑐2p({\boldsymbol{x}}_{1}|{\boldsymbol{x}}_{2};c_{1},c_{2}), where c1subscript𝑐1c_{1} and c2subscript𝑐2c_{2} represent the labels for different styles, with 𝒙1subscript𝒙1{\boldsymbol{x}}_{1} and 𝒙2subscript𝒙2{\boldsymbol{x}}_{2} sentences in different styles. Assuming 𝒙1subscript𝒙1{\boldsymbol{x}}_{1} and 𝒙2subscript𝒙2{\boldsymbol{x}}_{2} are conditionally independent given the latent code 𝒛𝒛{\boldsymbol{z}}, we have:p(𝒙1|𝒙2;c1,c2)=∫𝒛p(𝒙1|𝒛,c1)⋅p(𝒛|𝒙2,c2)𝑑𝒛=𝔼𝒛∼p(𝒛|𝒙2,c2)[p(𝒙1|𝒛,c1)].𝑝conditionalsubscript𝒙1subscript𝒙2subscript𝑐1subscript𝑐2subscript𝒛⋅𝑝conditionalsubscript𝒙1𝒛subscript𝑐1𝑝conditional𝒛subscript𝒙2subscript𝑐2differential-d𝒛subscript𝔼similar-to𝒛𝑝conditional𝒛subscript𝒙2subscript𝑐2delimited-[]𝑝conditionalsubscript𝒙1𝒛subscript𝑐1\displaystyle p({\boldsymbol{x}}_{1}|{\boldsymbol{x}}_{2};c_{1},c_{2})=\int_{\boldsymbol{z}}p({\boldsymbol{x}}_{1}|{\boldsymbol{z}},c_{1})\cdot p({\boldsymbol{z}}|{\boldsymbol{x}}_{2},c_{2})d{\boldsymbol{z}}={\mathbb{E}}_{{\boldsymbol{z}}\sim p({\boldsymbol{z}}|{\boldsymbol{x}}_{2},c_{2})}[p({\boldsymbol{x}}_{1}|{\boldsymbol{z}},c_{1})]\,.(8)Equation (8) suggests an autoencoder can be applied for this task. From this perspective,we can apply our optimal transport method in the cross-aligned autoencoder [54], by replacing the standard GAN loss with our FMD critic.We follow the same idea as [54] to build the style transfer framework. E:𝒳×𝒞→𝒵:𝐸→𝒳𝒞𝒵E:\mathcal{X}\times\mathcal{C}\rightarrow\mathcal{Z} is our encoder that infers the content 𝒛𝒛{\boldsymbol{z}} from given style c𝑐c and sentence 𝒙𝒙{\boldsymbol{x}}; G:𝒵×𝒞→𝒳:𝐺→𝒵𝒞𝒳G:\mathcal{Z}\times\mathcal{C}\rightarrow\mathcal{X} is our decoder that generates synthetic sentence 𝒙^^𝒙\hat{{\boldsymbol{x}}}, given content 𝒛𝒛{\boldsymbol{z}} and style c𝑐c.We add the following reconstruction loss for the autoencoder:ℒrec=𝔼𝒙1∼p𝒙1[−logpG(𝒙1|c1,E(𝒙1,c1))]+𝔼𝒙2∼p𝒙2[−logpG(𝒙2|c2,E(𝒙2,c2))],subscriptℒrecsubscript𝔼similar-tosubscript𝒙1subscript𝑝subscript𝒙1delimited-[]subscript𝑝𝐺conditionalsubscript𝒙1subscript𝑐1𝐸subscript𝒙1subscript𝑐1subscript𝔼similar-tosubscript𝒙2subscript𝑝subscript𝒙2delimited-[]subscript𝑝𝐺conditionalsubscript𝒙2subscript𝑐2𝐸subscript𝒙2subscript𝑐2\mathcal{L}_{\text{rec}}={\mathbb{E}}_{{\boldsymbol{x}}_{1}\sim p_{{\boldsymbol{x}}_{1}}}[-\log p_{G}({\boldsymbol{x}}_{1}|c_{1},E({\boldsymbol{x}}_{1},c_{1}))]+{\mathbb{E}}_{{\boldsymbol{x}}_{2}\sim p_{{\boldsymbol{x}}_{2}}}[-\log p_{G}({\boldsymbol{x}}_{2}|c_{2},E({\boldsymbol{x}}_{2},c_{2}))]\,,(9)where p𝒙1subscript𝑝subscript𝒙1p_{{\boldsymbol{x}}_{1}} and p𝒙2subscript𝑝subscript𝒙2p_{{\boldsymbol{x}}_{2}} are the empirical data distribution for each style.We also need to implement adversarial training on the generator G𝐺G with discrete data.First, we use the soft-argmax approximation discussed in Section 3.2; second, we also use Professor-Forcing [32] algorithm to match the sequence of LSTM hidden states.That is, the discriminator is designed to discriminate 𝒙^2=G(E(𝒙1,c1),c2)subscript^𝒙2𝐺𝐸subscript𝒙1subscript𝑐1subscript𝑐2\hat{{\boldsymbol{x}}}_{2}=G(E({\boldsymbol{x}}_{1},c_{1}),c_{2}) with real sentence 𝒙2subscript𝒙2{\boldsymbol{x}}_{2}.Unlike [54] which uses two discriminators, our model only needs to apply the FMD critic twice to match the distributions for two different styles:ℒadv=𝔼𝒙1∼p𝒙1,𝒙2∼p𝒙2[\displaystyle\mathcal{L}_{\text{adv}}={\mathbb{E}}_{{\boldsymbol{x}}_{1}\sim p_{{\boldsymbol{x}}_{1}},{\boldsymbol{x}}_{2}\sim p_{{\boldsymbol{x}}_{2}}}[𝒟FMD(F(G(E(𝒙1,c1),c2)),F(𝐖𝒆𝒙2))subscript𝒟FMD𝐹𝐺𝐸subscript𝒙1subscript𝑐1subscript𝑐2𝐹subscript𝐖𝒆subscript𝒙2\displaystyle\mathcal{D}_{\text{FMD}}(F(G(E({\boldsymbol{x}}_{1},c_{1}),c_{2})),F({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}_{2}))(10)+𝒟FMD(F(G(E(𝒙2,c2),c1)),F(𝐖𝒆𝒙1))],\displaystyle+\mathcal{D}_{\text{FMD}}(F(G(E({\boldsymbol{x}}_{2},c_{2}),c_{1})),F({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}_{1}))]\,,where 𝐖𝒆subscript𝐖𝒆{\bf W}_{\boldsymbol{e}} is the learned word embedding matrix.The final objective function for this task is:minG,EmaxFℒrec+λ⋅ℒadvsubscript𝐺𝐸subscript𝐹subscriptℒrec⋅𝜆subscriptℒadv\min_{G,E}\max_{F}\mathcal{L}_{\text{rec}}+\lambda\cdot\mathcal{L}_{\text{adv}}, where λ𝜆\lambda is a hyperparameter that balances these two terms.
|
| 42 |
+
|
| 43 |
+
Unsupervised decipher Our model can also be used to tackle the task of unsupervised cipher cracking by using the framework of CycleGAN [62].In this task, we have two different corpora, i.e., 𝐗1subscript𝐗1{\bf X}_{1} denotes the original sentences, and 𝐗2subscript𝐗2{\bf X}_{2} denotes the encrypted corpus using some cipher code, which is unknown to our model. Our goal is to design two generators that can map one corpus to the other, i.e., G1:𝐗1→𝐗2:subscript𝐺1→subscript𝐗1subscript𝐗2G_{1}:{\bf X}_{1}\rightarrow{\bf X}_{2}, G2:𝐗2→𝐗1:subscript𝐺2→subscript𝐗2subscript𝐗1G_{2}:{\bf X}_{2}\rightarrow{\bf X}_{1}. Unlike the style-transfer task, we define F1subscript𝐹1F_{1} and F2subscript𝐹2F_{2} as two sentence feature extractors for the different corpora.Here we denote p𝒙1subscript𝑝subscript𝒙1p_{{\boldsymbol{x}}_{1}} to be the empirical distribution of the original corpus, and p𝒙2subscript𝑝subscript𝒙2p_{{\boldsymbol{x}}_{2}} to be the distribution of the encrypted corpus. Following [20], we design two losses: the cycle-consistency loss (reconstruction loss) and the adversarial feature matching loss.The cycle-consistency loss is defined on the feature space as:ℒcyc=𝔼𝒙1∼p𝒙1[‖F1(G2(G1(𝒙1)))−F1(𝐖𝒆𝒙1)‖1]+𝔼𝒙2∼p𝒙2[‖F2(G1(G2(𝒙2)))−F2(𝐖𝒆𝒙2)‖1],subscriptℒcycsubscript𝔼similar-tosubscript𝒙1subscript𝑝subscript𝒙1delimited-[]subscriptnormsubscript𝐹1subscript𝐺2subscript𝐺1subscript𝒙1subscript𝐹1subscript𝐖𝒆subscript𝒙11subscript𝔼similar-tosubscript𝒙2subscript𝑝subscript𝒙2delimited-[]subscriptnormsubscript𝐹2subscript𝐺1subscript𝐺2subscript𝒙2subscript𝐹2subscript𝐖𝒆subscript𝒙21\mathcal{L}_{\text{cyc}}={\mathbb{E}}_{{\boldsymbol{x}}_{1}\sim p_{{\boldsymbol{x}}_{1}}}[\|F_{1}(G_{2}(G_{1}({\boldsymbol{x}}_{1})))-F_{1}({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}_{1})\|_{1}]+{\mathbb{E}}_{{\boldsymbol{x}}_{2}\sim p_{{\boldsymbol{x}}_{2}}}[\|F_{2}(G_{1}(G_{2}({\boldsymbol{x}}_{2})))-F_{2}({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}_{2})\|_{1}]\,,(11)where ∥⋅∥1\|\cdot\|_{1} denotes the ℓ1subscriptℓ1\ell_{1}-norm, and 𝐖𝒆subscript𝐖𝒆{\bf W}_{\boldsymbol{e}} is the word embedding matrix.The adversarial loss aims to help match the generated samples with the target:ℒadv=𝔼𝒙1∼p𝒙1,𝒙2∼p𝒙2[𝒟FMD(F1(G2(𝒙2)),F1(𝐖𝒆𝒙1))+𝒟FMD(F2(G1(𝒙1)),F2(𝐖𝒆𝒙2))].subscriptℒadvsubscript𝔼formulae-sequencesimilar-tosubscript𝒙1subscript𝑝subscript𝒙1similar-tosubscript𝒙2subscript𝑝subscript𝒙2delimited-[]subscript𝒟FMDsubscript𝐹1subscript𝐺2subscript𝒙2subscript𝐹1subscript𝐖𝒆subscript𝒙1subscript𝒟FMDsubscript𝐹2subscript𝐺1subscript𝒙1subscript𝐹2subscript𝐖𝒆subscript𝒙2\mathcal{L}_{\text{adv}}={\mathbb{E}}_{{\boldsymbol{x}}_{1}\sim p_{{\boldsymbol{x}}_{1}},{\boldsymbol{x}}_{2}\sim p_{{\boldsymbol{x}}_{2}}}[\mathcal{D}_{\text{FMD}}(F_{1}(G_{2}({\boldsymbol{x}}_{2})),F_{1}({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}_{1}))+\mathcal{D}_{\text{FMD}}(F_{2}(G_{1}({\boldsymbol{x}}_{1})),F_{2}({\bf W}_{\boldsymbol{e}}{\boldsymbol{x}}_{2}))]\,.(12)The final objective function for the decipher task is:minG1,G2maxF1,F2ℒcyc+λ⋅ℒadvsubscriptsubscript𝐺1subscript𝐺2subscriptsubscript𝐹1subscript𝐹2subscriptℒcyc⋅𝜆subscriptℒadv\min_{G_{1},G_{2}}\max_{F_{1},F_{2}}\mathcal{L}_{\text{cyc}}+\lambda\cdot\mathcal{L}_{\text{adv}}, where λ𝜆\lambda is a hyperparameter that balances the two terms.
|
| 44 |
+
|
| 45 |
+
GAN for text generation SeqGAN [60], MaliGAN [8], RankGAN [37], and MaskGAN [15] use reinforcement learning (RL) algorithms for text generation. The idea behind all these works are similar: they use the REINFORCE algorithm to get an unbiased gradient estimator for the generator, and apply the roll-out policy to obtain the reward from the discriminator.LeakGAN [24] adopts a hierarchical RL framework to improve text generation. However, it is slow to train due to its complex design.For GANs in the RL-free category, GSGAN [31] and TextGAN [61] use the Gumbel-softmax and soft-argmax trick, respectively, to deal with discrete data.While the latter uses MMD to match the features of real and synthetic sentences, both models still keep the original GAN loss function, which may result in the gradient-vanishing issue of the discriminator.
|
| 46 |
+
|
| 47 |
+
GAN with OT Wasserstein GAN (WGAN) [3, 23] applies the EMD by imposing the 1-Lipschitz1-Lipschitz1\textit{-Lipschitz} constraint on the discriminator, which alleviates the gradient-vanishing issue when dealing with continuous data (i.e., images). However, for discrete data (i.e., text), the gradient still vanishes after a few iterations, even when weight-clipping or the gradient-penalty is applied on the discriminator [20]. Instead, the Sinkhorn divergence generative model (Sinkhorn-GM) [19] and Optimal transport GAN (OT-GAN) [50] optimize the Sinkhorn divergence [13], defined as an entropy regularized EMD (2):Wϵ(𝒇,𝒇′)=minT∈Π(𝒇,𝒇′)⟨𝐓,𝐂⟩+ϵ⋅h(𝐓)subscript𝑊italic-ϵ𝒇superscript𝒇′subscript𝑇Π𝒇superscript𝒇′𝐓𝐂⋅italic-ϵℎ𝐓W_{\epsilon}({\boldsymbol{f}},{\boldsymbol{f}}^{\prime})=\min_{T\in\Pi({\boldsymbol{f}},{\boldsymbol{f}}^{\prime})}\langle{\bf T},{\bf C}\rangle+\epsilon\cdot h({\bf T}),where h(𝐓)=∑i,j𝐓ijlog𝐓ijℎ𝐓subscript𝑖𝑗subscript𝐓𝑖𝑗subscript𝐓𝑖𝑗h({\bf T})=\sum_{i,j}{\bf T}_{ij}\log{\bf T}_{ij} is the entropy term, and ϵitalic-ϵ\epsilon is the hyperparameter. While the Sinkhorn algorithm [13] is proposed to solve this entropy regularized EMD, the solution is sensitive to the value of the hyperparameter ϵitalic-ϵ\epsilon, leading to a trade-off between computational efficiency and training stability.Distinct from that, our method uses IPOT to tackle the original problem of OT. In practice, IPOT is more efficient than the Sinkhorn algorithm, and the hyperparameter β𝛽\beta in (4) only affects the convergence rate [59].
|
| 48 |
+
|
| 49 |
+
We apply the proposed model to three application scenarios: generic (unconditional) sentence generation, conditional sentence generation (with pre-specified sentiment), and unsupervised decipher.For the generic sentence generation task, we experiment with three standard benchmarks: CUB captions [57], MS COCO captions [38], and EMNLP2017 WMT News [24].
|
| 50 |
+
|
| 51 |
+
Since the sentences in the CUB dataset are typically short and have similar structure, it is employed as our toy evaluation.For the second dataset, we sample 130,000130000130,000 sentences from the original MS COCO captions.Note that we do not remove any low-frequency words for the first two datasets, in order to evaluate the models in the case with a relatively large vocabulary size.The third dataset is a large long-text collection from EMNLP2017 WMT News Dataset. To facilitate comparison with baseline methods, we follow the same data preprocessing procedures as in [24]. The summary statistics of all the datasets are presented in Table 1.
|
| 52 |
+
|
| 53 |
+
For conditional text generation, we consider the task of transferring an original sentence to the opposite sentiment, in the case where parallel (paired) data are not available. We use the same data as introduced in [54]. For the unsupervised decipher task, we follow the experimental setup in CipherGAN [20] and evaluate the model improvement after replacing the critic with the proposed FMD objective.
|
| 54 |
+
|
| 55 |
+
We employ test-BLEU score [60], self-BLEU score [63], and human evaluation as the evaluation metrics for the generic sentence generation task. To ensure fair comparison, we perform extensive comparisons with several strong baseline models using the benchmark tool in Texygen [63]. For the non-parallel text style transfer experiment, following [26, 54], we use a pretrained classifier to calculate the sentiment accuracy of transferred sentences. We also leverage human evaluation to further measure the quality of the transferring results. For the deciphering experiment, we adopt the average proportion of correctly mapped words as accuracy as proposed in [20]. Our code will be released to encourage future research.
|
| 56 |
+
|
| 57 |
+
In general, when evaluating the performance of different models, we desire high test-BLEU score (good quality) and low self-BLEU score (high diversity). Both scores should be considered: (i) a high test-BLEU score together with a high self-BLEU score means that the model might generate good sentences while suffering from mode collapse (i.e., low diversity); (ii) if a model generates sentences randomly, the diversity of generated sentence could be high but the test-BLEU score would be low.Figure 2 is used to compare the performance of every model. For each subplot, the x𝑥x-axis represents test-BLEU, and the y𝑦y-axis represents self-BLEU (here we only show BLEU-3 and BLEU-4 figures; more quantitative results can be found in the SM). For the CUB and MS COCO datasets, our model achieves both high test-BLEU and low self-BLEU, providing realistic sentences with high diversity. For the EMNLP WMT dataset, the synthetic sentences from SeqGAN, RankGAN, GSGAN and TextGAN is less coherent and realistic (examples can be found in the SM) due to the long-text nature of the dataset. In comparison, our model is still capable of providing realistic results.
|
| 58 |
+
|
| 59 |
+
To further evaluate the generation quality based on the EMNLP WMT dataset, we conduct a human Turing test on Amazon Mechanical Turk; 10 judges are asked to rate over 100 randomly sampled sentences from each model with a scale from 0 to 5. The means and standard deviations of the rating score are calculated and provided in Table 2. We also provide some examples of the generated sentences from LeakGAN and our model in Table 3.More generated sentences are provided in the SM.
|
| 60 |
+
|
| 61 |
+
Table 4 presents the sentiment transfer results on the Yelp review dataset, which is evaluated with the accuracy of transferred sentences, determined by a pretrained CNN classifier [29]. Note that with the same experimental setup as in [54], our model achieves significantly higher transferring accuracy compared with the cross-aligned autoencoder (CAE) model [54]. Moreover, our model even outperforms the controllable text generation method [26] and BST [44], where a sentiment classifier is directly pre-trained to guide the sentence generation process (on the contrary, our model is trained in an end-to-end manner and requires no pre-training steps), and thus should potentially have a better control over the style (i.e., sentiment) of generated sentences [54]. The superior performance of the proposed method highlights the ability of FMD to mitigate the vanishing-gradient issue caused by the discrete nature of text samples, and give rises to better matching between the distributions of reviews belonging to two different sentiments.
|
| 62 |
+
|
| 63 |
+
Human evaluations are conducted to assess the quality of the transferred sentences. In this regard, we randomly sample 100 sentences from the test set, and 5 volunteers rate the outputs of different models in terms of their fluency, sentiment, and content preservation in a double blind fashion. The rating score is from 0 to 5. Detailed results are shown in Table 4. We also provide sentiment transfer examples in Table 5.More examples are provided in the SM.
|
| 64 |
+
|
| 65 |
+
CipherGAN [20] uses GANs to tackle the task of unsupervised cipher cracking, utilizing the framework of CycleGAN [62] and adopting techniques such as Gumbel-softmax [31] that deal with discrete data. The implication of unsupervised deciphering could be understood as unsupervised machine translation, in which one language might be treated as an enciphering of the other. In this experiment, we adapt the idea of feature mover’s distance to the original framework of CipherGAN and test this modified model on the Brown English text dataset [16].
|
| 66 |
+
|
| 67 |
+
The Brown English-language corpus [30] has a vocabulary size of over one million. In this experiment, only the top 200200200 most frequent words are considered while the others are replaced by an “unknown” token. We denote this modified word-level dataset as Brown-W200. We use Vigenère [7] to encipher the original plain text. This dataset can be downloaded from this repository111https://github.com/for-ai/CipherGAN.
|
| 68 |
+
|
| 69 |
+
For fair comparison, all the model architectures and parameters are kept the same as CipherGAN while the critic for the discriminator is replaced by the FMD objective as shown in (3). Table 6 shows the quantitative results in terms of average proportion of words mapped in a given sequence (i.e., deciphering accuracy). The baseline frequency analysis model only operates when the cipher key is known. Our model achieves higher accuracy compared to the original CipherGAN.Note that some other experimental setups from [20] are not evaluated, due to the extremely high accuracy (above 99%percent9999\%); the amount of improvement would not be apparent.
|
| 70 |
+
|
| 71 |
+
We introduce a novel approach for text generation using feature-mover’s distance (FMD), called feature mover GAN (FM-GAN). By applying our model to several tasks, we demonstrate that it delivers good performance compared to existing text generation approaches.For future work, FM-GAN has the potential to be applied on other tasks such as image captioning [56], joint distribution matching [17, 46, 9, 34, 55, 45], unsupervised sequence classification [39], and unsupervised machine translation [4, 12, 33].
|
1809.06404v3.txt
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Reinforcement learning (RL) has emerged as a promising tool for solving complex decision-making and control tasks from predefined high-level reward functions (Sutton et al., 1998). However, defining an optimizable reward function that inculcates the desired behavior can be challenging for many robotic applications, which include learning social-interaction skills (Qureshi et al., 2018; 2017), dexterous manipulation (Finn et al., 2016b), and autonomous driving (Kuderer et al., 2015).
|
| 2 |
+
|
| 3 |
+
Inverse reinforcement learning (IRL) (Ng et al., 2000) addresses the problem of learning reward functions from expert demonstrations, and it is often considered as a branch of imitation learning (Argall et al., 2009). The prior work in IRL includes maximum-margin (Abbeel & Ng, 2004; Ratliff et al., 2006) and maximum-entropy (Ziebart et al., 2008) formulations. Currently, maximum entropy (MaxEnt) IRL is a widely used approach towards IRL, and has been extended to use non-linear function approximators such as neural networks in scenarios with unknown dynamics by leveraging sampling-based techniques (Boularias et al., 2011; Finn et al., 2016b; Kalakrishnan et al., 2013). However, designing the IRL algorithm is usually complicated as it requires, to some extent, hand engineering such as deciding domain-specific regularizers (Finn et al., 2016b).
|
| 4 |
+
|
| 5 |
+
Rather than learning reward functions and solving the IRL problem, imitation learning (IL) learns a policy directly from expert demonstrations. Prior work addressed the IL problem through behavior cloning (BC), which learns a policy from expert trajectories using supervised learning (Pomerleau, 1991). Although BC methods are simple solutions to IL, these methods require a large amount of data because of compounding errors induced by covariate shift (Ross et al., 2011). To overcome BC limitations, a generative adversarial imitation learning (GAIL) algorithm (Ho & Ermon, 2016) was proposed. GAIL uses the formulation of Generative Adversarial Networks (GANs) (Goodfellow et al., 2014), i.e., a generator-discriminator framework, where a generator is trained to generate expert-like trajectories while a discriminator is trained to distinguish between generated and expert trajectories. Although GAIL is highly effective and efficient framework, it does not recover transferable/portable reward functions along with the policies, thus narrowing its use cases to similar problem instances in similar environments. Reward function learning is ultimately preferable, if possible, over direct imitation learning as rewards are portable functions that represent the most basic and complete representation of agent intention, and can be re-optimized in new environments and new agents.
|
| 6 |
+
|
| 7 |
+
Reward learning is challenging as there can be many optimal policies explaining a set of demonstrations and many reward functions inducing an optimal policy (Ng et al., 2000; Ziebart et al., 2008). Recently, an adversarial inverse reinforcement learning (AIRL) framework (Fu et al., 2017), an extension of GAIL, was proposed that offers a solution to the former issue by exploiting the maximum entropy IRL method (Ziebart et al., 2008) whereas the latter issue is addressed through learning disentangled reward functions by modeling the reward as a function of state only instead of both state and action. However, AIRL fails to recover the ground truth reward when the ground truth reward is a function of both state and action. For example, the reward function in any locomotion or ambulation tasks contains a penalty term that discourages actions with large magnitudes. This need for action regularization is well known in optimal control literature and limits the use cases of a state-only reward function in most practical real-life applications. A more generalizable and useful approach would be to formulate reward as a function of both states and actions, which induces action-driven reward shaping that has been shown to play a vital role in quickly recovering the optimal policies (Ng et al., 1999).
|
| 8 |
+
|
| 9 |
+
In this paper, we propose the empowerment-regularized adversarial inverse reinforcement learning (EAIRL) algorithm111Supplementary material is available at https://sites.google.com/view/eairl. Empowerment (Salge et al., 2014) is a mutual information-based theoretic measure, like state- or action-value functions, that assigns a value to a given state to quantify the extent to which an agent can influence its environment. Our method uses variational information maximization (Mohamed & Rezende, 2015) to learn empowerment in parallel to learning the reward and policy from expert data. Empowerment acts as a regularizer to policy updates to prevent overfitting the expert demonstrations, which in practice leads to learning robust rewards. Our experimentation shows that the proposed method recovers not only near-optimal policies but also recovers robust, transferable, disentangled, state-action based reward functions that are near-optimal.The results on reward learning also show that EAIRL outperforms several state-of-the-art IRL methods by recovering reward functions that leads to optimal, expert-matching behaviors. On policy learning, results demonstrate that policies learned through EAIRL perform comparably to GAIL and AIRL with non-disentangled (state-action) reward function but significantly outperform policies learned through AIRL with disentangled reward (state-only) and GAN interpretation of Guided Cost Learning (GAN-GCL) (Finn et al., 2016a).
|
| 10 |
+
|
| 11 |
+
We consider a Markov decision process (MDP) represented as a tuple (𝒮,𝒜,𝒫,ℛ,ρ0,γ)𝒮𝒜𝒫ℛsubscript𝜌0𝛾(\mathcal{S},\mathcal{A},\mathcal{P},\mathcal{R},\rho_{0},\gamma) where 𝒮𝒮\mathcal{S} denotes the state-space, 𝒜𝒜\mathcal{A} denotes the action-space, 𝒫𝒫\mathcal{P} represents the transition probability distribution, i.e., 𝒫:𝒮×𝒜×𝒮→[0,1]:𝒫→𝒮𝒜𝒮01\mathcal{P}:\mathcal{S}\times\mathcal{A}\times\mathcal{S}\rightarrow[0,1], ℛ(s,a)ℛ𝑠𝑎\mathcal{R}(s,a) corresponds to the reward function, ρ0subscript𝜌0\rho_{0} is the initial state distribution ρ0:𝒮→ℝ:subscript𝜌0→𝒮ℝ\rho_{0}:\mathcal{S}\rightarrow\mathbb{R}, and γ∈(0,1)𝛾01\gamma\in(0,1) is the discount factor. Let q(a|s,s′)𝑞conditional𝑎𝑠superscript𝑠′q(a|s,s^{\prime}) be an inverse model that maps current state s∈𝒮𝑠𝒮s\in\mathcal{S} and next state s′∈𝒮superscript𝑠′𝒮s^{\prime}\in\mathcal{S} to a distribution over actions 𝒜𝒜\mathcal{A}, i.e., q:𝒮×𝒮×𝒜→[0,1]:𝑞→𝒮𝒮𝒜01q:\mathcal{S}\times\mathcal{S}\times\mathcal{A}\rightarrow[0,1]. Let π𝜋\pi be a stochastic policy that takes a state and outputs a distribution over actions such that π:𝒮×𝒜→[0,1]:𝜋→𝒮𝒜01\pi:\mathcal{S}\times\mathcal{A}\rightarrow[0,1]. Let τ𝜏\tau and τEsubscript𝜏𝐸\tau_{E} denote a set of trajectories, a sequence of state-action pairs (s0,a0,⋯sT,aT)subscript𝑠0subscript𝑎0⋯subscript𝑠𝑇subscript𝑎𝑇(s_{0},a_{0},\cdots s_{T},a_{T}), generated by a policy π𝜋\pi and an expert policy πEsubscript𝜋𝐸\pi_{E}, respectively, where T𝑇T denotes the terminal time. Finally, let Φ(s)Φ𝑠\Phi(s) be a potential function that quantifies a utility of a given state s∈𝒮𝑠𝒮s\in\mathcal{S}, i.e., Φ:𝒮→ℝ:Φ→𝒮ℝ\Phi:\mathcal{S}\rightarrow\mathbb{R}. In our proposed work, we use an empowerment-based potential function Φ(⋅)Φ⋅\Phi(\cdot) to regularize policy update under MaxEnt-IRL framework. Therefore, the following sections provide a brief background on MaxEnt-IRL, adversarial reward and policy learning, and variational information-maximization approach to learn the empowerment.
|
| 12 |
+
|
| 13 |
+
MaxEnt-IRL (Ziebart et al., 2008) models expert demonstrations as Boltzmann distribution using parametrized reward rξ(τ)subscript𝑟𝜉𝜏r_{\xi}(\tau) as an energy function, i.e.,pξ(τ)=1Zexp(rξ(τ))subscript𝑝𝜉𝜏continued-fraction1𝑍subscript𝑟𝜉𝜏p_{\xi}(\tau)=\cfrac{1}{Z}\exp(r_{\xi}(\tau))(1)where rξ(τ)=∑t=0Trξ(st,at)subscript𝑟𝜉𝜏superscriptsubscript𝑡0𝑇subscript𝑟𝜉subscript𝑠𝑡subscript𝑎𝑡r_{\xi}(\tau)=\sum_{t=0}^{T}r_{\xi}(s_{t},a_{t}) is a commutative reward over given trajectory τ𝜏\tau, parameterized by ξ𝜉\xi, and Z𝑍Z is the partition function. In this framework, the demonstration trajectories are assumed to be sampled from an optimal policy π∗superscript𝜋\pi^{*}, therefore, they get the highest likelihood whereas the suboptimal trajectories are less rewarding and hence, are generated with exponentially decaying probability. The main computational challenge in MaxEnt-IRL is to determine Z𝑍Z. The initial work in MaxEnt-IRL computed Z𝑍Z using dynamic programming (Ziebart et al., 2008) whereas modern approaches (Finn et al., 2016b; a; Fu et al., 2017) present importance sampling technique to approximate Z𝑍Z under unknown dynamics.
|
| 14 |
+
|
| 15 |
+
This section briefly describes Adversarial Inverse Reinforcement Learning (AIRL) (Fu et al., 2017) algorithm which forms a baseline of our proposed method. AIRL is the current state-of-the-art IRL method that builds on GAIL (Ho & Ermon, 2016), maximum entropy IRL framework (Ziebart et al., 2008) and GAN-GCL, a GAN interpretation of Guided Cost Learning (Finn et al., 2016b; a).
|
| 16 |
+
|
| 17 |
+
GAIL is a model-free adversarial learning framework, inspired from GANs (Goodfellow et al., 2014), where the policy π𝜋\pi learns to imitate the expert policy behavior πEsubscript𝜋𝐸\pi_{E} by minimizing the Jensen-Shannon divergence between the state-action distributions generated by π𝜋\pi and the expert state-action distribution by πEsubscript𝜋𝐸\pi_{E} through following objectiveminπmaxD∈(0,1)𝒮×𝒜𝔼π[logD(s,a)]+𝔼πE[log(1−D(s,a))]−λH(π)subscript𝜋subscript𝐷superscript01𝒮𝒜subscript𝔼𝜋delimited-[]𝐷𝑠𝑎subscript𝔼subscript𝜋𝐸delimited-[]1𝐷𝑠𝑎𝜆𝐻𝜋\min_{\pi}\max_{D\in(0,1)^{\mathcal{S}\times\mathcal{A}}}\mathbb{E}_{\pi}[\log D(s,a)]+\mathbb{E}_{\pi_{E}}[\log(1-D(s,a))]-\lambda H(\pi)(2)where D𝐷D is the discriminator that performs the binary classification to distinguish between samples generated by π𝜋\pi and πEsubscript𝜋𝐸\pi_{E}, λ𝜆\lambda is a hyper-parameter, and H(π)𝐻𝜋H(\pi) is an entropy regularization term 𝔼π[logπ]subscript𝔼𝜋delimited-[]𝜋\mathbb{E}_{\pi}[\log\pi]. Note that GAIL does not recover reward; however, Finn et al. (2016a) shows that the discriminator can be modeled as a reward function. Thus AIRL (Fu et al., 2017) presents a formal implementation of (Finn et al., 2016a) and extends GAIL to recover reward along with the policy by imposing a following structure on the discriminator:Dξ,φ(s,a,s′)=exp[fξ,φ(s,a,s′)]exp[fξ,φ(s,a,s′)]+π(a|s)subscript𝐷𝜉𝜑𝑠𝑎superscript𝑠′continued-fractionsubscript𝑓𝜉𝜑𝑠𝑎superscript𝑠′subscript𝑓𝜉𝜑𝑠𝑎superscript𝑠′𝜋conditional𝑎𝑠D_{\xi,\varphi}(s,a,s^{\prime})=\cfrac{\exp[f_{\xi,\varphi}(s,a,s^{\prime})]}{\exp[f_{\xi,\varphi}(s,a,s^{\prime})]+\pi(a|s)}(3)where fξ,φ(s,a,s′)=rξ(s)+γhφ(s′)−hφ(s)subscript𝑓𝜉𝜑𝑠𝑎superscript𝑠′subscript𝑟𝜉𝑠𝛾subscriptℎ𝜑superscript𝑠′subscriptℎ𝜑𝑠f_{\xi,\varphi}(s,a,s^{\prime})=r_{\xi}(s)+\gamma h_{\varphi}(s^{\prime})-h_{\varphi}(s) comprises a disentangled reward term rξ(s)subscript𝑟𝜉𝑠r_{\xi}(s) with training parameters ξ𝜉\xi, and a shaping term F=γhφ(s′)−hφ(s)𝐹𝛾subscriptℎ𝜑superscript𝑠′subscriptℎ𝜑𝑠F=\gamma h_{\varphi}(s^{\prime})-h_{\varphi}(s) with training parameters φ𝜑\varphi. The entire Dξ,φ(s,a,s′)subscript𝐷𝜉𝜑𝑠𝑎superscript𝑠′D_{\xi,\varphi}(s,a,s^{\prime}) is trained as a binary classifier to distinguish between expert demonstrations τEsubscript𝜏𝐸\tau_{E} and policy generated demonstrations τ𝜏\tau. The policy is trained to maximize the discriminative reward r^(s,a,s′)=log(D(s,a,s′)−log(1−D(s,a,s′)))^𝑟𝑠𝑎superscript𝑠′𝐷𝑠𝑎superscript𝑠′1𝐷𝑠𝑎superscript𝑠′\hat{r}(s,a,s^{\prime})=\log(D(s,a,s^{\prime})-\log(1-D(s,a,s^{\prime}))). Note that the function F=γhφ(s′)−hφ(s)𝐹𝛾subscriptℎ𝜑superscript𝑠′subscriptℎ𝜑𝑠F=\gamma h_{\varphi}(s^{\prime})-h_{\varphi}(s) consists of free-parameters as no structure is imposed on hφ(⋅)subscriptℎ𝜑⋅h_{\varphi}(\cdot), and as mentioned in (Fu et al., 2017), the reward function rξ(⋅)subscript𝑟𝜉⋅r_{\xi}(\cdot) and function F𝐹F are tied upto a constant (γ−1)c𝛾1𝑐(\gamma-1)c, where c∈ℝ𝑐ℝc\in\mathbb{R}; thus the impact of F𝐹F, the shaping term, on the recovered reward r𝑟r is quite limited and therefore, the benefits of reward shaping are not fully realized.
|
| 18 |
+
|
| 19 |
+
Mutual information (MI), an information-theoretic measure, quantifies the dependency between two random variables. In intrinsically-motivated reinforcement learning, a maximal of mutual information between a sequence of K𝐾K actions 𝒂𝒂\boldsymbol{a} and the final state 𝒔′superscript𝒔bold-′\boldsymbol{s^{\prime}} reached after the execution of 𝒂𝒂\boldsymbol{a}, conditioned on current state 𝒔𝒔\boldsymbol{s} is often used as a measure of internal reward (Mohamed & Rezende, 2015), known as Empowerment Φ(𝒔)Φ𝒔\Phi(\boldsymbol{s}), i.e.,Φ(𝒔)=maxI(𝒂,𝒔′|𝒔)=max𝔼p(s′|a,s)w(a|s)[log(p(𝒂,𝒔′|𝒔)w(𝒂|𝒔)p(𝒔′|𝒔))]Φ𝒔𝐼𝒂conditionalsuperscript𝒔bold-′𝒔subscript𝔼𝑝conditionalsuperscript𝑠′𝑎𝑠𝑤conditional𝑎𝑠delimited-[]continued-fraction𝑝𝒂conditionalsuperscript𝒔bold-′𝒔𝑤conditional𝒂𝒔𝑝conditionalsuperscript𝒔bold-′𝒔\Phi(\boldsymbol{s})=\max I(\boldsymbol{a},\boldsymbol{s^{\prime}}|\boldsymbol{s})=\max\mathbb{E}_{p(s^{\prime}|a,s)w(a|s)}\bigg{[}\log\bigg{(}\cfrac{p(\boldsymbol{a},\boldsymbol{s^{\prime}}|\boldsymbol{s})}{w(\boldsymbol{a}|\boldsymbol{s})p(\boldsymbol{s^{\prime}}|\boldsymbol{s})}\bigg{)}\bigg{]}(4)where p(𝒔′|𝒂,𝒔)𝑝conditionalsuperscript𝒔bold-′𝒂𝒔p(\boldsymbol{s^{\prime}}|\boldsymbol{a},\boldsymbol{s}) is a K𝐾K-step transition probability, w(𝒂|𝒔)𝑤conditional𝒂𝒔w(\boldsymbol{a}|\boldsymbol{s}) is a distribution over 𝒂𝒂\boldsymbol{a}, and p(𝒂,𝒔′|𝒔)𝑝𝒂conditionalsuperscript𝒔bold-′𝒔p(\boldsymbol{a},\boldsymbol{s^{\prime}}|\boldsymbol{s}) is a joint-distribution of K𝐾K actions 𝒂𝒂\boldsymbol{a} and final state 𝒔′superscript𝒔bold-′\boldsymbol{s^{\prime}}222In our proposed work, we consider only immediate step transitions i.e., K=1𝐾1K=1, hence variables 𝒔,𝒂𝒔𝒂\boldsymbol{s},\boldsymbol{a} and 𝒔′superscript𝒔bold-′\boldsymbol{s^{\prime}} will be represented in non-bold notations.. Intuitively, the empowerment Φ(s)Φ𝑠\Phi(s) of a state s𝑠s quantifies an extent to which an agent can influence its future. Thus, maximizing empowerment induces an intrinsic motivation in the agent that enforces it to seek the states that have the highest number of future reachable states.
|
| 20 |
+
|
| 21 |
+
Empowerment, like value functions, is a potential function that has been previously used in reinforcement learning but its applications were limited to small-scale cases due to computational intractability of MI maximization in higher-dimensional problems. Recently, however, a scalable method (Mohamed & Rezende, 2015) was proposed that learns the empowerment through the more-efficient maximization of variational lower bound, which has been shown to be equivalent to maximizing MI (Agakov, 2004). The lower bound was derived (for complete derivation see Appendix A.1) by representing MI in term of the difference in conditional entropies H(⋅)𝐻⋅H(\cdot) and utilizing the non-negativity property of KL-divergence, i.e.,Iw(s)=H(a|s)−H(a|s′,s)≥H(a)+𝔼p(s′|a,s)wθ(a|s)[logqϕ(a|s′,s)]=Iw,q(s)superscript𝐼𝑤𝑠𝐻conditional𝑎𝑠𝐻conditional𝑎superscript𝑠′𝑠𝐻𝑎subscript𝔼𝑝conditionalsuperscript𝑠′𝑎𝑠subscript𝑤𝜃conditional𝑎𝑠delimited-[]subscript𝑞italic-ϕconditional𝑎superscript𝑠′𝑠superscript𝐼𝑤𝑞𝑠I^{w}(s)=H(a|s)-H(a|s^{\prime},s)\geq H(a)+\mathbb{E}_{p(s^{\prime}|a,s)w_{\theta}(a|s)}[\log q_{\phi}(a|s^{\prime},s)]=I^{w,q}(s)(5)where H(a|s)=−𝔼w(a|s)[logw(a|s)]𝐻conditional𝑎𝑠subscript𝔼𝑤conditional𝑎𝑠delimited-[]𝑤conditional𝑎𝑠H(a|s)=-\mathbb{E}_{w(a|s)}[\log w(a|s)], H(a|s′,s)=−𝔼p(s′|a,s)w(a|s)[logp(a|s′,s)]𝐻conditional𝑎superscript𝑠′𝑠subscript𝔼𝑝conditionalsuperscript𝑠′𝑎𝑠𝑤conditional𝑎𝑠delimited-[]𝑝conditional𝑎superscript𝑠′𝑠H(a|s^{\prime},s)=-\mathbb{E}_{p(s^{\prime}|a,s)w(a|s)}[\log p(a|s^{\prime},s)], qϕ(⋅)subscript𝑞italic-ϕ⋅q_{\phi}(\cdot) is a variational distribution with parameters ϕitalic-ϕ\phi and wθ(⋅)subscript𝑤𝜃⋅w_{\theta}(\cdot) is a distribution over actions with parameters θ𝜃\theta.Finally, the lower bound in Eqn. 5 is maximized under the constraint H(a|s)<η𝐻conditional𝑎𝑠𝜂H(a|s)<\eta (prevents divergence, see (Mohamed & Rezende, 2015)) to compute empowerment as follow:Φ(s)=maxw,q𝔼p(s′|a,s)w(a|s)[−1βlogwθ(a|s)+logqϕ(a|s′,s)]Φ𝑠subscript𝑤𝑞subscript𝔼𝑝conditionalsuperscript𝑠′𝑎𝑠𝑤conditional𝑎𝑠delimited-[]continued-fraction1𝛽subscript𝑤𝜃conditional𝑎𝑠subscript𝑞italic-ϕconditional𝑎superscript𝑠′𝑠\Phi(s)=\max_{w,q}\mathbb{E}_{p(s^{\prime}|a,s)w(a|s)}[-\cfrac{1}{\beta}\log w_{\theta}(a|s)+\log q_{\phi}(a|s^{\prime},s)](6)where β𝛽\beta is η𝜂\eta dependent temperature term.
|
| 22 |
+
|
| 23 |
+
Mohamed & Rezende (2015) also applied the principles of Expectation-Maximization (EM) (Agakov, 2004) to learn empowerment, i.e., alternatively maximizing Eqn. 6 with respect to wθ(a|s)subscript𝑤𝜃conditional𝑎𝑠w_{\theta}(a|s) and qϕ(a|s′,s)subscript𝑞italic-ϕconditional𝑎superscript𝑠′𝑠q_{\phi}(a|s^{\prime},s). Given a set of training trajectories τ𝜏\tau, the maximization of Eqn. 6 w.r.t qϕ(⋅)subscript𝑞italic-ϕ⋅q_{\phi}(\cdot) is shown to be a supervised maximum log-likelihood problem whereas the maximization w.r.t wθ(⋅)subscript𝑤𝜃⋅w_{\theta}(\cdot) is determined through the functional derivative ∂I/∂w=0𝐼𝑤0\partial I/\partial w=0 under the constraint ∑aw(a|s)=1subscript𝑎𝑤conditional𝑎𝑠1\sum_{a}w(a|s)=1. The optimal w∗superscript𝑤w^{*} that maximizes Eqn. 6 turns out to be 1Z(s)exp(β𝔼p(s′|s,a)[logqϕ(a|s,s′)])continued-fraction1𝑍𝑠𝛽subscript𝔼𝑝conditionalsuperscript𝑠′𝑠𝑎delimited-[]subscript𝑞italic-ϕconditional𝑎𝑠superscript𝑠′\cfrac{1}{Z(s)}\exp(\beta\mathbb{E}_{p(s^{\prime}|s,a)}[\log q_{\phi}(a|s,s^{\prime})]), where Z(s)𝑍𝑠Z(s) is a normalization term. Substituting w∗superscript𝑤w^{*} in Eqn. 6 showed that the empowerment Φ(s)=1βlogZ(s)Φ𝑠continued-fraction1𝛽𝑍𝑠\Phi(s)=\cfrac{1}{\beta}\log Z(s) (for full derivation, see Appendix A.2).
|
| 24 |
+
|
| 25 |
+
Note that w∗(a|s)superscript𝑤conditional𝑎𝑠w^{*}(a|s) is implicitly unnormalized as there is no direct mechanism for sampling actions or computing Z(s)𝑍𝑠Z(s). Mohamed & Rezende (2015) introduced an approximation w∗(a|s)≈logπ(a|s)+Φ(s)superscript𝑤conditional𝑎𝑠𝜋conditional𝑎𝑠Φ𝑠w^{*}(a|s)\approx\log\pi(a|s)+\Phi(s) where π(a|s)𝜋conditional𝑎𝑠\pi(a|s) is a normalized distribution which leaves the scalar function Φ(s)Φ𝑠\Phi(s) to account for the normalization term logZ(s)𝑍𝑠\log Z(s). Finally, the parameters of policy π𝜋\pi and scalar function ΦΦ\Phi are optimized by minimizing the discrepancy, lI(s,a,s′)subscript𝑙𝐼𝑠𝑎superscript𝑠′l_{I}(s,a,s^{\prime}), between the two approximations (logπ(a|s)+Φ(s))𝜋conditional𝑎𝑠Φ𝑠(\log\pi(a|s)+\Phi(s)) and βlogqϕ(a|s′,s))\beta\log q_{\phi}(a|s^{\prime},s)) through either absolute (p=1𝑝1p=1) or squared error (p=2𝑝2p=2), i.e.,lI(s,a,s′)=|βlogqϕ(a|s′,s)−(logπθ(a|s)+Φφ(s))|pl_{I}(s,a,s^{\prime})=\big{|}\beta\log q_{\phi}(a|s^{\prime},s)-(\log\pi_{\theta}(a|s)+\Phi_{\varphi}(s))\big{|}^{p}(7)
|
| 26 |
+
|
| 27 |
+
We present an inverse reinforcement learning algorithm that learns a robust, transferable reward function and policy from expert demonstrations. Our proposed method comprises (i) an inverse model qϕ(a|s′,s)subscript𝑞italic-ϕconditional𝑎superscript𝑠′𝑠q_{\phi}(a|s^{\prime},s) that takes the current state s𝑠s and the next state s′superscript𝑠′s^{\prime} to output a distribution over actions 𝒜𝒜\mathcal{A} that resulted in s𝑠s to s′superscript𝑠′s^{\prime} transition, (ii) a reward rξ(s,a)subscript𝑟𝜉𝑠𝑎r_{\xi}(s,a), with parameters ξ𝜉\xi, that is a function of both state and action, (iii) an empowerment-based potential function Φφ(⋅)subscriptΦ𝜑⋅\Phi_{\varphi}(\cdot) with parameters φ𝜑\varphi that determines the reward-shaping function F=γΦφ(s′)−Φφ(s)𝐹𝛾subscriptΦ𝜑superscript𝑠′subscriptΦ𝜑𝑠F=\gamma\Phi_{\varphi}(s^{\prime})-\Phi_{\varphi}(s) and also regularizes the policy update, and (iv) a policy model πθ(a|s)subscript𝜋𝜃conditional𝑎𝑠\pi_{\theta}(a|s) that outputs a distribution over actions given the current state s𝑠s. All these models are trained simultaneously based on the objective functions described in the following sections to recover optimal policies and generalizable reward functions concurrently.
|
| 28 |
+
|
| 29 |
+
As mentioned in Section 2.3, learning the inverse model qϕ(a|s,s′)subscript𝑞italic-ϕconditional𝑎𝑠superscript𝑠′q_{\phi}(a|s,s^{\prime}) is a maximum log-likelihood supervised learning problem. Therefore, given a set of trajectories τ∼πsimilar-to𝜏𝜋\tau\sim\pi, where a single trajectory is a sequence states and actions, i.e., τi={s0,a0,⋯,sT,aT}isubscript𝜏𝑖subscriptsubscript𝑠0subscript𝑎0⋯subscript𝑠𝑇subscript𝑎𝑇𝑖\tau_{i}=\{s_{0},a_{0},\cdots,s_{T},a_{T}\}_{i}, the inverse model qϕ(a|s′,s)subscript𝑞italic-ϕconditional𝑎superscript𝑠′𝑠q_{\phi}(a|s^{\prime},s) is trained to minimize the mean-square error between its predicted action q(a|s′,s)𝑞conditional𝑎superscript𝑠′𝑠q(a|s^{\prime},s) and the action a𝑎a taken according to the generated trajectory τ𝜏\tau, i.e.,lq(s,a,s′)=(qϕ(⋅|s,s′)−a)2l_{q}(s,a,s^{\prime})=(q_{\phi}(\cdot|s,s^{\prime})-a)^{2}(8)
|
| 30 |
+
|
| 31 |
+
Empowerment will be expressed in terms of normalization function Z(s)𝑍𝑠Z(s) of optimal w∗(a|s)superscript𝑤conditional𝑎𝑠w^{*}(a|s), i.e., Φφ(s)=1βlogZ(s)subscriptΦ𝜑𝑠continued-fraction1𝛽𝑍𝑠\Phi_{\varphi}(s)=\cfrac{1}{\beta}\log Z(s). Therefore, the estimation of empowerment Φφ(s)subscriptΦ𝜑𝑠\Phi_{\varphi}(s) is approximated by minimizing the loss function lI(s,a,s′)subscript𝑙𝐼𝑠𝑎superscript𝑠′l_{I}(s,a,s^{\prime}), presented in Eqn. 7, w.r.t parameters φ𝜑\varphi, and the inputs (s,a,s′)𝑠𝑎superscript𝑠′(s,a,s^{\prime}) are sampled from the policy-generated trajectories τ𝜏\tau.
|
| 32 |
+
|
| 33 |
+
To train the reward function, we first compute the discriminator as follow:Dξ,φ(s,a,s′)=exp[rξ(s,a)+γΦφ′(s′)−Φφ(s)]exp[rξ(s,a)+γΦφ′(s′)−Φφ(s)]+πθ(a|s)subscript𝐷𝜉𝜑𝑠𝑎superscript𝑠′continued-fractionsubscript𝑟𝜉𝑠𝑎𝛾subscriptΦsuperscript𝜑′superscript𝑠′subscriptΦ𝜑𝑠subscript𝑟𝜉𝑠𝑎𝛾subscriptΦsuperscript𝜑′superscript𝑠′subscriptΦ𝜑𝑠subscript𝜋𝜃conditional𝑎𝑠D_{\xi,\varphi}(s,a,s^{\prime})=\cfrac{\exp[r_{\xi}(s,a)+\gamma\Phi_{\varphi^{\prime}}(s^{\prime})-\Phi_{\varphi}(s)]}{\exp[r_{\xi}(s,a)+\gamma\Phi_{\varphi^{\prime}}(s^{\prime})-\Phi_{\varphi}(s)]+\pi_{\theta}(a|s)}(9)where rξ(s,a)subscript𝑟𝜉𝑠𝑎r_{\xi}(s,a) is the reward function to be learned with parameters ξ𝜉\xi. We also maintain the target φ′superscript𝜑′\varphi^{\prime} and learning φ𝜑\varphi parameters of the empowerment-based potential function. The target parameters φ′superscript𝜑′\varphi^{\prime} are a replica of φ𝜑\varphi except that the target parameters φ′superscript𝜑′\varphi^{\prime} are updated to learning parameters φ𝜑\varphi after every n𝑛n training epochs. Note that keeping a stationary target Φφ′subscriptΦsuperscript𝜑′\Phi_{\varphi^{\prime}} stabilizes the learning as also mentioned in (Mnih et al., 2015). Finally, the discriminator/reward function parameters ξ𝜉\xi are trained via binary logistic regression to discriminate between expert τEsubscript𝜏𝐸\tau_{E} and generated τ��\tau trajectories, i.e.,𝔼τ[logDξ,φ(s,a,s′)]+𝔼τE[(1−logDξ,φ(s,a,s′))]subscript𝔼𝜏delimited-[]subscript𝐷𝜉𝜑𝑠𝑎superscript𝑠′subscript𝔼subscript𝜏𝐸delimited-[]1subscript𝐷𝜉𝜑𝑠𝑎superscript𝑠′\mathbb{E}_{\tau}[\log D_{\xi,\varphi}(s,a,s^{\prime})]+\mathbb{E}_{\tau_{E}}[(1-\log D_{\xi,\varphi}(s,a,s^{\prime}))](10)
|
| 34 |
+
|
| 35 |
+
We train our policy πθ(a|s)subscript𝜋𝜃conditional𝑎𝑠\pi_{\theta}(a|s) to maximize the discriminative reward r^(s,a,s′)=log(D(s,a,s′)−log(1−D(s,a,s′)))^𝑟𝑠𝑎superscript𝑠′𝐷𝑠𝑎superscript𝑠′1𝐷𝑠𝑎superscript𝑠′\hat{r}(s,a,s^{\prime})=\log(D(s,a,s^{\prime})-\log(1-D(s,a,s^{\prime}))) and to minimize the loss function lI(s,a,s′)=|βlogqϕ(a|s,s′)−(logπθ(a|s)+Φφ(s))|pl_{I}(s,a,s^{\prime})=\big{|}\beta\log q_{\phi}(a|s,s^{\prime})-(\log\pi_{\theta}(a|s)+\Phi_{\varphi}(s))\big{|}^{p} which accounts for empowerment regularization. Hence, the overall policy training objective is:𝔼τ[logπθ(a|s)r^(s,a,s′)]+λI𝔼τ[lI(s,a,s′)]subscript𝔼𝜏delimited-[]subscript𝜋𝜃conditional𝑎𝑠^𝑟𝑠𝑎superscript𝑠′subscript𝜆𝐼subscript𝔼𝜏delimited-[]subscript𝑙𝐼𝑠𝑎superscript𝑠′\mathbb{E}_{\tau}[\log\pi_{\theta}(a|s)\hat{r}(s,a,s^{\prime})]+\lambda_{I}\mathbb{E}_{\tau}\big{[}l_{I}(s,a,s^{\prime})](11)where policy parameters θ𝜃\theta are updated using any policy optimization method such as TRPO (Schulman et al., 2015) or an approximated step such as PPO (Schulman et al., 2017).
|
| 36 |
+
|
| 37 |
+
Algorithm 1 outlines the overall training procedure to train all function approximators simultaneously. Note that the expert samples τEsubscript𝜏𝐸\tau_{E} are seen by the discriminator only, whereas all other models are trained using the policy generated samples τ𝜏\tau. Furthermore, the discriminating reward r^(s,a,s′)^𝑟𝑠𝑎superscript𝑠′\hat{r}(s,a,s^{\prime}) boils down to the following expression (Appendix B.1):r^(s,a,s′)=f(s,a,s′)−logπ(a|s)^𝑟𝑠𝑎superscript𝑠′𝑓𝑠𝑎superscript𝑠′𝜋conditional𝑎𝑠\hat{r}(s,a,s^{\prime})=f(s,a,s^{\prime})-\log\pi(a|s)where f(s,a,s′)=rξ(s,a)+γΦφ′(s′)−Φφ(s)𝑓𝑠𝑎superscript𝑠′subscript𝑟𝜉𝑠𝑎𝛾subscriptΦsuperscript𝜑′superscript𝑠′subscriptΦ𝜑𝑠f(s,a,s^{\prime})=r_{\xi}(s,a)+\gamma\Phi_{\varphi^{\prime}}(s^{\prime})-\Phi_{\varphi}(s). Thus, an alternative way to express our policy training objective is 𝔼τ[logπθ(a|s)rπ(s,a,s′)]subscript𝔼𝜏delimited-[]subscript𝜋𝜃conditional𝑎𝑠subscript𝑟𝜋𝑠𝑎superscript𝑠′\mathbb{E}_{\tau}[\log\pi_{\theta}(a|s)r_{\pi}(s,a,s^{\prime})], where rπ(s,a,s′)=r^(s,a,s′)−λIlI(s,a,s′)subscript𝑟𝜋𝑠𝑎superscript𝑠′^𝑟𝑠𝑎superscript𝑠′subscript𝜆𝐼subscript𝑙𝐼𝑠𝑎superscript𝑠′r_{\pi}(s,a,s^{\prime})=\hat{r}(s,a,s^{\prime})-\lambda_{I}l_{I}(s,a,s^{\prime}), which would undoubtedly yield the same results as Eqn. 11, i.e., maximize the discriminative reward and minimize the loss lIsubscript𝑙𝐼l_{I}. The analysis of this alternative expression is given in Appendix B to highlight that our policy update rule is equivalent to MaxEnt-IRL policy objective (Finn et al., 2016a) except that it also maximizes the empowerment, i.e.,rπ(s,a,s′)subscript𝑟𝜋𝑠𝑎superscript𝑠′\displaystyle r_{\pi}(s,a,s^{\prime})=rξ(s,a,s′)+γΦ(s′)+λH^(⋅)absentsubscript𝑟𝜉𝑠𝑎superscript𝑠′𝛾Φsuperscript𝑠′𝜆^𝐻⋅\displaystyle=r_{\xi}(s,a,s^{\prime})+\gamma\Phi(s^{\prime})+\lambda\hat{H}(\cdot)(12)where, λ𝜆\lambda and γ𝛾\gamma are hyperparameters, and H^(⋅)^𝐻⋅\hat{H}(\cdot) is the entropy-regularization term depending on π(⋅)𝜋⋅\pi(\cdot) and q(⋅)𝑞⋅q(\cdot). Hence, our policy is regularized by the empowerment which induces generalized behavior rather than locally overfitting to the limited expert demonstrations.
|
| 38 |
+
|
| 39 |
+
Our proposed method, EAIRL, learns both reward and policy from expert demonstrations. Thus, for comparison, we evaluate our method against both state-of-the-art policy and reward learning techniques on several control tasks in OpenAI Gym. In case of policy learning, we compare our method against GAIL, GAN-GCL, AIRL with state-only reward, denoted as AIRL(s)AIRL𝑠\mathrm{AIRL}(s), and an augmented version of AIRL we implemented for the purposes of comparison that has state-action reward, denoted as AIRL(s,a)AIRL𝑠𝑎\mathrm{AIRL}(s,a). In reward learning, we only compare our method against AIRL(s)AIRL𝑠\mathrm{AIRL}(s) and AIRL(s,a)AIRL𝑠𝑎\mathrm{AIRL}(s,a) as GAIL does not recover rewards, and GAN-GCL is shown to exhibit inferior performance than AIRL (Fu et al., 2017). Furthermore, in the comparisons, we also include the expert performances which represents a policy learned by optimizing a ground-truth reward using TRPO (Schulman et al., 2015). The performance of different methods are evaluated in term of mean and standard deviation of total rewards accumulated (denoted as score) by an agent during the trial, and for each experiment, we run five randomly-seeded trials.
|
| 40 |
+
|
| 41 |
+
To evaluate the learned rewards, we consider a transfer learning problem in which the testing environments are made to be different from the training environments. More precisely, the rewards learned via IRL in the training environments are used to re-optimize a new policy in the testing environment using standard RL. We consider two test cases shown in the Fig. 1.
|
| 42 |
+
|
| 43 |
+
In the first test case, as shown in Fig. 1(a), we modify the agent itself during testing. We trained a reward function to make a standard quadruped ant to run forward. During testing, we disabled the front two legs (indicated in red) of the ant (crippled-ant), and the learned reward is used to re-optimize the policy to make a crippled-ant move forward. Note that the crippled-ant cannot move sideways (Appendix C.1). Therefore, the agent has to change the gait to run forward. In the second test case, shown in Fig 1(b), we change the environment structure. The agent learns to navigate a 2D point-mass to the goal region in a simple maze. We re-position the maze central-wall during testing so that the agent has to take a different path, compared to the training environment, to reach the target (Appendix C.2).
|
| 44 |
+
|
| 45 |
+
Fig. 2 compares the policy performance scores over five different trials of EAIRL, AIRL(s)AIRL𝑠\mathrm{AIRL}(s) and AIRL(s,a)AIRL𝑠𝑎\mathrm{AIRL}(s,a) in the aforementioned transfer learning tasks. The expert score is shown as a horizontal line to indicate the standard set by an expert policy. Table 1 summarizes the means and standard deviations of the scores over five trials. It can be seen that our method recovers near-optimal reward functions as the policy scores almost reach the expert scores in all five trials even after transfering to unseen testing environments. Furthermore, our method performs significantly better than both AIRL(s)AIRL𝑠\mathrm{AIRL}(s) and AIRL(s,a)AIRL𝑠𝑎\mathrm{AIRL}(s,a) in matching an expert’s performance, thus showing no downside to the EAIRL approach.
|
| 46 |
+
|
| 47 |
+
Next, we considered the performance of the learned policy specifically for an imitation learning problem in various control tasks.The tasks, shown in Fig. 3, include (i) making a 2D halfcheetah robot to run forward, (ii) making a 3D quadruped robot (ant) to move forward, (iii) making a 2D swimmer to swim, and (iv) keeping a friction less pendulum to stand vertically up. For each algorithm, we provided 20 expert demonstrations generated by a policy trained on a ground-truth reward using TRPO (Schulman et al., 2015). Table 2 presents the means and standard deviations of policy learning performance scores, over the five different trials. It can be seen that EAIRL, AIRL(s,a)AIRL𝑠𝑎\mathrm{AIRL}(s,a) and GAIL demonstrate similar performance and successfully learn to imitate the expert policy, whereas AIRL(s)AIRL𝑠\mathrm{AIRL}(s) and GAN-GCL fails to recover a policy.
|
| 48 |
+
|
| 49 |
+
This section highlights the importance of empowerment-regularized MaxEnt-IRL and modeling rewards as a function of both state and action rather than restricting to state-only formulation on learning rewards and policies from expert demonstrations.
|
| 50 |
+
|
| 51 |
+
In the scalable MaxEnt-IRL framework (Finn et al., 2016a; Fu et al., 2017), the normalization term is approximated by importance sampling where the importance-sampler/policy is trained to minimize the KL-divergence from the distribution over expert trajectories. However, merely minimizing the divergence between expert demonstrations and policy-generated samples leads to localized policy behavior which hinders learning generalized reward functions. In our proposed work, we regularize the policy update with empowerment i.e., we update our policy to reduce the divergence from expert data distribution as well as to maximize the empowerment (Eqn.12). The proposed regularization prevents premature convergence to local behavior which leads to robust state-action based rewards learning. Furthermore, empowerment quantifies the extent to which an agent can control/influence its environment in the given state. Thus the agent takes an action a𝑎a on observing a state s𝑠s such that it has maximum control/influence over the environment upon ending up in the future state s′superscript𝑠′s^{\prime}.
|
| 52 |
+
|
| 53 |
+
Our experimentation also shows the importance of modeling discriminator/reward functions as a function of both state and action in reward and policy learning under GANs framework. The reward learning results show that state-only rewards (AIRL(s)) does not recover the action dependent terms of the ground-truth reward function that penalizes high torques. Therefore, the agent shows aggressive behavior and sometimes flips over after few steps (see the accompanying video), which is also the reason that crippled-ant trained with AIRL’s disentangled reward function reaches only the half-way to expert scores as shown in Table 1. Therefore, the reward formulation as a function of both states and actions is crucial to learning action-dependent terms required in most real-world applications, including any autonomous driving, robot locomotion or manipulation task where large torque magnitudes are discouraged or are dangerous. The policy learning results further validate the importance of the state-action reward formulation. Table 2 shows that methods with state-action reward/discriminator formulation can successfully recover expert-like policies. Hence, our empirical results show that it is crucial to model reward/discriminator as a function of state-action as otherwise, adversarial imitation learning fails to learn ground-truth rewards and expert-like policies from expert data.
|
| 54 |
+
|
| 55 |
+
We present an approach to adversarial reward and policy learning from expert demonstrations by regularizing the maximum-entropy inverse reinforcement learning through empowerment. Our method learns the empowerment through variational information maximization in parallel to learning the reward and policy. We show that our policy is trained to imitate the expert behavior as well to maximize the empowerment of the agent over the environment. The proposed regularization prevents premature convergence to local behavior and leads to a generalized policy that in turn guides the reward-learning process to recover near-optimal reward. We show that our method successfully learns near-optimal rewards, policies, and performs significantly better than state-of-the-art IRL methods in both imitation learning and challenging transfer learning problems. The learned rewards are shown to be transferable to environments that are dynamically or structurally different from training environments.
|
| 56 |
+
|
| 57 |
+
In our future work, we plan to extend our method to learn rewards and policies from diverse human/expert demonstrations as the proposed method assumes that a single expert generates the training data. Another exciting direction would be to build an algorithm that learns from sub-optimal demonstrations that contains both optimal and non-optimal behaviors.
|
1809.06416v1.txt
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Motivation:Modern media (e.g., news feeds, microblogs, etc.)exhibit an increasing fraction of misleadingandmanipulative content, fromquestionable claims and “alternative facts” to completely faked news.The media landscape is becominga twilight zone and battleground.This societal challenge has led to the rise of fact-checking and debunking websites, such as Snopes.com and PolitiFact.com,where people research claims, manually assess their credibility, and present their verdict along with evidence (e.g., background articles, quotations, etc.). However, this manual verification istime-consuming.To keep up with the scale and speed at which misinformation spreads,we needtools to automate this debunking process.
|
| 2 |
+
|
| 3 |
+
State of the Art and Limitations:Prior work on “truth discovery”(see Li et al. (2016) for survey)111As fully objective and unarguable truth is often elusive or ill-defined,we use the term credibility rather than “truth”. largely focused on structured facts, typically in the form of subject-predicate-object triples,or on social media platforms like Twitter, Sina Weibo, etc.Recently,methods have been proposed to assess the credibility of claims in natural language formPopat et al. (2017); Rashkin et al. (2017); Wang (2017),such as newsheadlines, quotes from speeches,blog posts, etc.
|
| 4 |
+
|
| 5 |
+
The methods geared for general text input address the problem in different ways.On the one hand, methods like Rashkin et al. (2017); Wang (2017) train neural networks on labeled claims from sites like PolitiFact.com,providing credibility assessments without any explicit feature modeling. However, they use only the text of questionable claims and no external evidence or interactions that provide limited context for credibility analysis.These approaches also do not offer any explanation of their verdicts.On the other hand, Popat et al. (2017) considers external evidence in the form of other articles(retrieved from the Web) that confirm or refute a claim, and jointly assesses the language style (using subjectivity lexicons),the trustworthiness of the sources,and the credibility of the claim.This is achieved via a pipeline of supervised classifiers.On the upside, this method generates user-interpretable explanations by pointing to informative snippets of evidence articles.On the downside, it requires substantial feature modeling and rich lexicons to detect bias and subjectivity in the language style.
|
| 6 |
+
|
| 7 |
+
Approach and Contribution:To overcome the limitations of the prior works,we present DeClarE222Debunking Claims with Interpretable Evidence,an end-to-end neural network modelfor assessing and explaining the credibility of arbitrary claims in natural-language text form.Our approach combines the best of both families of prior methods.Similar to Popat et al. (2017), DeClarE incorporates external evidence or counter-evidence from the Webas well as signals from the language style and the trustworthiness of the underlying sources.However, our method does not require any feature engineering, lexicons, or other manual intervention. Rashkin et al. (2017); Wang (2017) also develop an end-to-end model, but DeClarE goes far beyond in terms of considering external evidence and joint interactions between several factors,and also in its ability to generate user-interpretable explanations in addition to highly accurate assessments.For example, given the natural-language input claim “the gun epidemic is the leading cause of death of young African-American men, more than the next nine causes put together”by Hillary Clinton, DeClarE draws on evidence from the Web to arrive at its verdictcredible,and returns annotated snippets like the one in Table 6 as explanation.These snippets, which contain evidence in the form of statistics and assertions, are automatically extracted from web articles from sources of varying credibility.
|
| 8 |
+
|
| 9 |
+
Given an input claim, DeClarE searches for web articles related to the claim.It considers the context of the claim via word embeddings and the (language of) web articlescaptured via a bidirectional LSTM (biLSTM), while using an attention mechanism to focus on parts of the articlesaccording to their relevance to the claim.DeClarE then aggregatesall the information about claim source, web article contexts, attention weights, and trustworthiness of the underlying sourcesto assess the claim.It also derives informative features for interpretability,like source embeddings that capture trustworthinessand salient wordscaptured via attention.Key contributions of this paper are:∙∙\bulletModel: An end-to-end neural network model which automatically assesses the credibility ofnatural-language claims,without any hand-crafted features or lexicons.∙∙\bulletInterpretability: An attention mechanism in our model thatgenerates user-comprehensible explanations, making credibility verdicts transparent and interpretable.∙∙\bulletExperiments: Extensive experiments on four datasets and ablation studies, demonstratingeffectiveness of our method over state-of-the-art baselines.
|
| 10 |
+
|
| 11 |
+
Consider a set of N𝑁N claims ��Cn⟩delimited-⟨⟩subscript𝐶𝑛\langle C_{n}\rangle from the respective origins/sources ⟨CSn⟩delimited-⟨⟩𝐶subscript𝑆𝑛\langle CS_{n}\rangle, where n∈[1,N]𝑛1𝑁n\in[1,N]. Each claim Cnsubscript𝐶𝑛C_{n} is reported by a set of M𝑀M articles ⟨Am,n⟩delimited-⟨⟩subscript𝐴𝑚𝑛\langle A_{m,n}\rangle along with their respective sources ⟨ASm,n⟩delimited-⟨⟩𝐴subscript𝑆𝑚𝑛\langle AS_{m,n}\rangle, where m∈[1,M]𝑚1𝑀m\in[1,M]. Each corresponding tuple of claim and its origin, reporting articles and article sources – ⟨Cn,CSn,Am,n,ASm,n⟩subscript𝐶𝑛𝐶subscript𝑆𝑛subscript𝐴𝑚𝑛𝐴subscript𝑆𝑚𝑛\langle C_{n},CS_{n},A_{m,n},AS_{m,n}\rangle forms a training instance in our setting, along with the credibility label of the claim used as ground-truth during network training. Figure 1 gives a pictorial overview of our model.In the following sections, we provide a detailed description of our approach.
|
| 12 |
+
|
| 13 |
+
The input claim Cnsubscript𝐶𝑛C_{n} of length l𝑙l is represented as [c1,c2,…,cl]subscript𝑐1subscript𝑐2…subscript𝑐𝑙[c_{1},c_{2},...,c_{l}] where cl∈ℜdsubscript𝑐𝑙superscript𝑑c_{l}\in\Re^{d} is the d𝑑d-dimensional word embedding of the l𝑙l-th word in the input claim. The source/origin of the claim CSn𝐶subscript𝑆𝑛CS_{n} is represented by a dssubscript𝑑𝑠d_{s}-dimensional embedding vector csn∈ℜds𝑐subscript𝑠𝑛superscriptsubscript𝑑𝑠cs_{n}\in\Re^{d_{s}}.
|
| 14 |
+
|
| 15 |
+
A reporting article Am,nsubscript𝐴𝑚𝑛A_{m,n} consisting of k𝑘k tokens is represented by [am,n,1,am,n,2,…,am,n,k]subscript𝑎𝑚𝑛1subscript𝑎𝑚𝑛2…subscript𝑎𝑚𝑛𝑘[a_{m,n,1},a_{m,n,2},...,a_{m,n,k}], where am,n,k∈ℜdsubscript𝑎𝑚𝑛𝑘superscript𝑑a_{m,n,k}\in\Re^{d} is the d𝑑d-dimensional word embedding vector for the k𝑘k-th word in the reporting article Am,nsubscript𝐴𝑚𝑛A_{m,n}. The claim and article word embeddings have shared parameters.The source of the reporting article ASm,n𝐴subscript𝑆𝑚𝑛AS_{m,n} is represented as a dssubscript𝑑𝑠d_{s}-dimensional vector, asm,n∈ℜds𝑎subscript𝑠𝑚𝑛superscriptsubscript𝑑𝑠as_{m,n}\in\Re^{d_{s}}. For the sake of brevity, we drop the notation subscripts n𝑛n and m𝑚m in the following sections by considering only a single training instance – the input claim Cnsubscript𝐶𝑛C_{n} from source CSn𝐶subscript𝑆𝑛CS_{n}, the corresponding article Am,nsubscript𝐴𝑚𝑛A_{m,n} and its sources ASm,n𝐴subscript𝑆𝑚𝑛AS_{m,n} given by: ⟨C,CS,A,AS⟩𝐶𝐶𝑆𝐴𝐴𝑆\langle C,CS,A,AS\rangle.
|
| 16 |
+
|
| 17 |
+
To create a representation of an article, which may capture task-specific features such as whether it contains objective language,we use a bidirectional Long Short-Term Memory (LSTM) network as proposed by Graves et al. (2005). A basic LSTM cell consists of various gates to control the flow of information through timesteps in a sequence, making LSTMs suitablefor capturing long and short range dependencies in text that may be difficult to capture with standard recurrent neural networks (RNNs). Given an input word embedding of tokens ⟨ak⟩delimited-⟨⟩subscript𝑎𝑘\langle a_{k}\rangle, an LSTM cell performs various non-linear transformations to generate a hidden vector state hksubscriptℎ𝑘h_{k} for each token at each timestep k𝑘k.
|
| 18 |
+
|
| 19 |
+
We use bidirectional LSTMs in place of standard LSTMs. Bidirectional LSTMs capture both the previous timesteps (past features) and the future timesteps (future features) via forward and backward states respectively. Correspondingly, there are two hidden states that capture past and future information that are concatenated to form the final output as:hk=[hk→,hk←]subscriptℎ𝑘→subscriptℎ𝑘←subscriptℎ𝑘h_{k}=[\overrightarrow{h_{k}},\overleftarrow{h_{k}}].
|
| 20 |
+
|
| 21 |
+
As we previously discussed, it is important to consider the relevance of an article with respect to the claim; specifically, focusing or attending to parts of the article that discuss the claim. This is in contrast to prior works Popat et al. (2017); Rashkin et al. (2017); Wang (2017) that ignore either the article or the claim, and therefore miss out on this important interaction.
|
| 22 |
+
|
| 23 |
+
We propose an attention mechanism to help our model focus on salient words in the article with respect to the claim. To this end, we compute the importance of each term in an article with respect to an overall representation of the corresponding claim. Additionally, incorporating attention helps in making our model transparent and interpretable, because it provides a way to generate the most salient words in an article as evidence of our model’s verdict.
|
| 24 |
+
|
| 25 |
+
Following Wieting et al. (2015), theoverall representation of an input claim is generated by taking an average of the word embeddings of all the words therein:c¯¯𝑐\displaystyle\bar{c}=1l∑lclabsent1𝑙subscript𝑙subscript𝑐𝑙\displaystyle=\frac{1}{l}\sum_{l}c_{l}
|
| 26 |
+
|
| 27 |
+
We combine this overall representation of the claim with each article term:a^ksubscript^𝑎𝑘\displaystyle\hat{a}_{k}=ak⊕c¯absentdirect-sumsubscript𝑎𝑘¯𝑐\displaystyle=a_{k}\oplus\bar{c}where, a^k∈ℜd+dsubscript^𝑎𝑘superscript𝑑𝑑\hat{a}_{k}\in\Re^{d+d} and ⊕direct-sum\oplus denotes the concatenate operation.We then perform a transformation to obtain claim-specific representations of each article term:ak′subscriptsuperscript𝑎′𝑘\displaystyle a^{\prime}_{k}=𝐟(Waa^k+ba)absent𝐟subscript𝑊𝑎subscript^𝑎𝑘subscript𝑏𝑎\displaystyle=\mathbf{f}(W_{a}\hat{a}_{k}+b_{a})
|
| 28 |
+
|
| 29 |
+
where Wasubscript𝑊𝑎W_{a} and basubscript𝑏𝑎b_{a} are the corresponding weight matrix and bias terms, and 𝐟𝐟\mathbf{f} is an activation function333In our model, the tanh activation function gives best results., such as ReLU𝑅𝑒𝐿𝑈ReLU, tanh𝑡𝑎𝑛ℎtanh, or the identity function.Following this, we use a softmax activation to calculate an attention score αksubscript𝛼𝑘\alpha_{k} for each word in the article capturing its relevance to the claim context:αksubscript𝛼𝑘\displaystyle\alpha_{k}=exp(ak′)∑kexp(ak′)absentsubscriptsuperscript𝑎′𝑘subscript𝑘subscriptsuperscript𝑎′𝑘\displaystyle=\frac{\exp(a^{\prime}_{k})}{\sum_{k}\exp(a^{\prime}_{k})}(1)
|
| 30 |
+
|
| 31 |
+
Now that we have article term representations given by ⟨hk⟩delimited-⟨⟩subscriptℎ𝑘\langle h_{k}\rangle and their relevance to the claim given by ⟨αk⟩delimited-⟨⟩subscript𝛼𝑘\langle\alpha_{k}\rangle, we need to combine them to predict the claim’s credibility.In order to create an attention-focused representation of the article considering both the claim and the article’s language,we calculate a weighted average of the hidden state representations for all article tokens based on their corresponding attention scores:g𝑔\displaystyle g=1k∑kαk⋅hkabsent1𝑘subscript𝑘⋅subscript𝛼𝑘subscriptℎ𝑘\displaystyle=\frac{1}{k}\sum_{k}{\alpha_{k}\cdot h_{k}}(2)
|
| 32 |
+
|
| 33 |
+
We then combine all the different feature representations: the claim source embedding (cs)𝑐𝑠(cs), the attention-focused article representation (g𝑔g), and the article source embedding (as𝑎𝑠as). In order to merge the different representations and capture their joint interactions, we process them with two fully connected layers with non-linear activations.d1subscript𝑑1\displaystyle d_{1}=relu(Wc(g⊕cs⊕as)+bc)absent𝑟𝑒𝑙𝑢subscript𝑊𝑐direct-sum𝑔𝑐𝑠𝑎𝑠subscript𝑏𝑐\displaystyle=relu(W_{c}(g\oplus cs\oplus as)+b_{c})d2subscript𝑑2\displaystyle d_{2}=relu(Wdd1+bd)absent𝑟𝑒𝑙𝑢subscript𝑊𝑑subscript𝑑1subscript𝑏𝑑\displaystyle=relu(W_{d}d_{1}+b_{d})
|
| 34 |
+
|
| 35 |
+
where, W𝑊W and b𝑏b are the corresponding weight matrix and bias terms.
|
| 36 |
+
|
| 37 |
+
Finally, to generate the overall credibility label of the article for classification tasks, or credibility score for regression tasks, we process the final representation with a final fully connected layer:Classification: sClassification: 𝑠\displaystyle\text{Classification: }\ s=sigmoid(d2)absent𝑠𝑖𝑔𝑚𝑜𝑖𝑑subscript𝑑2\displaystyle=sigmoid(d_{2})(3)Regression: sRegression: 𝑠\displaystyle\text{Regression: }\ s=linear(d2)absent𝑙𝑖𝑛𝑒𝑎𝑟subscript𝑑2\displaystyle=linear(d_{2})(4)
|
| 38 |
+
|
| 39 |
+
The credibility score in the above step is obtained considering a single reporting article. As previously discussed, we have M𝑀M reporting articles per claim. Therefore, once we have the per-article credibility scores from our model, we take an average of these scores to generate the overall credibility score for the claim:cred(C)𝑐𝑟𝑒𝑑𝐶\displaystyle cred(C)=1M∑msmabsent1𝑀subscript𝑚subscript𝑠𝑚\displaystyle=\frac{1}{M}\sum_{m}{s_{m}}(5)
|
| 40 |
+
|
| 41 |
+
This aggregation is done after the model is trained.
|
| 42 |
+
|
| 43 |
+
We evaluate our approach and demonstrate its generality by performing experiments on four different datasets: a general fact-checking website, a political fact-checking website, a news review community, and a SemEval Twitter rumour dataset.
|
| 44 |
+
|
| 45 |
+
Snopes (www.snopes.com) is a general fact-checking website where editors manually investigate various kinds of rumors reported on the Internet. We used the Snopes dataset provided by Popat et al. (2017). This dataset consists of rumors analyzed on the Snopes website along with their credibility labels (true or false), sets of reporting articles, and their respective web sources.
|
| 46 |
+
|
| 47 |
+
PolitiFact is a political fact-checking website (www.politifact.com) in which editors rate the credibility of claims made by various political figures in US politics. We extract all articles from PolitiFact published before December 2017. Each article includes a claim, the speaker (political figure) who made the claim, and the claim’s credibility rating provided by the editors.
|
| 48 |
+
|
| 49 |
+
PolitiFact assigns each claim to one of six possible ratings: true, mostly true, half true, mostly false, false and pants-on-fire. Following Rashkin et al. (2017), we combine true, mostly true and half true ratings into the class label true and the rest as false – hence considering only binary credibility labels. To retrieve the reporting articles for each claim (similar to Popat et al. (2017)), we issue each claim as a query to a search engine444We use the Bing search API. and retrieve the top 30 search results with their respective web sources.
|
| 50 |
+
|
| 51 |
+
NewsTrust is a news review community in which members review the credibility of news articles. We use the NewsTrust dataset made available by Mukherjee and Weikum (2015). This dataset contains NewsTrust stories from May 2006 to May 2014. Each story consists of a news article along with its source, and a set of reviews and ratings by community members. NewsTrust aggregates these ratings and assigns an overall credibility score (on a scale of 1 to 5) to the posted article.We map the attributes in this data to the inputs expected by DeClarE as follows: the title and the web source of the posted (news) article are mapped to the input claim and claim source, respectively. Reviews and their corresponding user identities are mapped to reporting articles and article sources, respectively. We use this dataset for the regression task of predicting the credibility score of the posted article.
|
| 52 |
+
|
| 53 |
+
As the fourth dataset, we consider the benchmark dataset released by SemEval-2017 for the task of determining credibility and stance of social media content (Twitter) Derczynski et al. (2017). The objective of this task is to predict the credibility of a questionable tweet (true, false or unverified) along with a confidence score from the model. It has two sub-tasks: (i) a closed variant in which models only consider the questionable tweet, and (ii) an open variant in which models consider both the questionable tweet and additional context consisting of snapshots of relevant sources retrieved immediately before the rumor was reported, a snapshot of an associated Wikipedia article, news articles from digital news outlets, and preceding tweets about the same event.Testing and development datasets provided by organizers have 28 tweets (1021 reply tweets) and 25 tweets (256 reply tweets), respectively.
|
| 54 |
+
|
| 55 |
+
In order to have a minimum support for training, claim sources with less than 5 claims in the dataset are grouped into a single dummy claim source, and article sources with less than 10 articles are grouped similarly (5 articles for SemEval as it is a smaller dataset).
|
| 56 |
+
|
| 57 |
+
For Snopes and PolitiFact, we need to extract relevant snippets from the reporting articles for a claim. Therefore, we extract snippets of 100 words from each reporting article having the maximum relevance score: sim=simbow×simsemantic𝑠𝑖𝑚𝑠𝑖subscript𝑚bow𝑠𝑖subscript𝑚semanticsim=sim_{\text{bow}}\times sim_{\text{semantic}}
|
| 58 |
+
|
| 59 |
+
where simbow𝑠𝑖subscript𝑚bowsim_{\text{bow}} is the fraction of claim words that are present in the snippet, and simsemantic𝑠𝑖subscript𝑚semanticsim_{\text{semantic}} represents the cosine similarity between the average of claim word embeddings and snippet word embeddings. We also enforce a constraint that the sim𝑠𝑖𝑚sim score is at least δ𝛿\delta.We varied δ𝛿\delta from 0.2 to 0.8 and found 0.5 to give the optimal performance on a withheld dataset.We discard all articles related to Snopes and PolitiFact websites from our datasets to have an unbiased model.Statistics of the datasets after pre-processing is provided in Table 1. All the datasets are made publicly available at https://www.mpi-inf.mpg.de/dl-cred-analysis/.
|
| 60 |
+
|
| 61 |
+
We evaluate our approach by conducting experiments on four datasets, as described in the previous section. We describe our experimental setup and report our results in the following sections.
|
| 62 |
+
|
| 63 |
+
When using the Snopes, PolitiFact and NewsTrust datasets, we reserve 10% of the data as validation data for parameter tuning. We report 10-fold cross validation results on the remaining 90% of the data; the model is trained on 9-folds and the remaining fold is used as test data. When using the SemEval dataset, we use the data splits provided by the task’s organizers. The objective for Snopes, PolitiFact and SemEval experiments is binary (credibility) classification, while for NewsTrust the objective is to predict the credibility score of the input claim on a scale of 1 to 5 (i.e., credibility regression).We represent terms using pre-trained GloVe Wikipedia 6B word embeddings Pennington et al. (2014).Since our training datasets are not very large, we do not tune the word embeddings during training.The remaining model parameters are tuned on the validation data; the parameters chosen are reported in Table 2.We use Keras with a Tensorflow backend to implement our system. All the models are trained using Adam optimizer Kingma and Ba (2014) (learning rate: 0.002) with categorical cross-entropy loss for classification and mean squared error loss for regression task. We use L2-regularizers with the fully connected layers as well as dropout. For all the datasets, the model is trained using each claim-article pair as a separate training instance.
|
| 64 |
+
|
| 65 |
+
To evaluate and compare the performance of DeClarE with other state-of-the-art methods, we report the following measures:∙∙\bulletCredibility Classification (Snopes, PolitiFact and SemEval): accuracy of the models in classifying true and false claims separately, macro F1-score and Area-Under-Curve (AUC) for the ROC (Receiver Operating Characteristic) curve.∙∙\bulletCredibility Regression (NewsTrust): Mean Square Error (MSE) between the predicted and true credibility scores.
|
| 66 |
+
|
| 67 |
+
We compare our approach with the following state-of-the-art models: (i) LSTM-text, a recent approach proposed by Rashkin et al. (2017).(ii) CNN-text: a CNN based approach proposed by Wang (2017).(iii) Distant Supervision: state-of-the-art distant supervision based approach proposed by Popat et al. (2017). (iv) DeClare (Plain): our approach with only biLSTM (no attention and source embeddings). (v) DeClarE (Plain+Attn): our approach with only biLSTM and attention (no source embeddings). (vi) DeClarE (Plain+SrEmb): our approach with only biLSTM and source embeddings (no attention). (vii) DeClarE (Full): end-to-end system with biLSTM, attention and source embeddings.
|
| 68 |
+
|
| 69 |
+
The results when performing credibility classification on the Snopes and PolitiFact datasets are shown inTable 3.DeClarE outperforms LSTM-text and CNN-text models by a large margin on both datasets.On the other hand, for the Snopes dataset, performance of DeClarE (Full) is slightly lower than the Distant Supervision configuration (p-value of 0.04 with a pairwise t-test). However, the advantage of DeClarE over Distant Supervision approach is that it does not rely on hand crafted features and lexicons, and can generalize well to arbitrary domains without requiring any seed vocabulary. It is also to be noted that both of these approaches use externalevidencein the form of reporting articles discussing the claim, which are not available to the LSTM-text and CNN-text baselines. Thisdemonstrates the value of externalevidencefor credibility assessment.
|
| 70 |
+
|
| 71 |
+
On the PolitiFact dataset, DeClarE outperforms all the baseline models by a margin of 7-9% AUC (p-value of 9.12e−059.12e059.12\mathrm{e}{-05} with a pairwise t-test) with similar improvements in terms of Macro F1.A performance comparison of DeClarE’s various configurations indicates the contribution of each component of our model, i.e, biLSTM capturing article representations, attention mechanism and source embeddings. The additions of both the attention mechanism and source embeddings improve performance over the plain configuration in all cases when measured by Macro F1 or AUC.
|
| 72 |
+
|
| 73 |
+
When performing credibility regression onthe NewsTrust dataset, we evaluate the models in terms of mean squared error (MSE; lower is better) for credibility rating prediction.We use the first three models described in Section 4.2 as baselines. For CNN-text and LSTM-text, we add a linear fully connected layer as the final layer of the model to support regression. Additionally, we also consider the state-of-the-art CCRF+SVR model based on Continuous Conditional Random Field (CCRF) and Support Vector Regression (SVR) proposed by Mukherjee and Weikum (2015).The results are shown in Table 4. We observe that DeClarE (Full) outperforms all four baselines, with a 17% decrease in MSE compared to the best-performing baselines (i.e., LSTM-text and Distant Supervision). The DeClarE (Plain) model performs substantially worse than the full model, illustrating the value of including attention and source embeddings.CNN-text performs substantially worse than the other baselines.
|
| 74 |
+
|
| 75 |
+
On the SemEval dataset, the objective is to perform credibility classification of a tweet while also producing a classification confidence score.We compare the following approaches and consider both variants of the SemEval task:(i) NileTMRG Enayet and El-Beltagy (2017): the best performing approach for the close variant of the task, (ii) IITP Singh et al. (2017): the best performing approach for the open variant of the task, (iii) DeClare (Plain): our approach with only biLSTM (no attention and source embeddings), and (iv) DeClarE (Full): our end-to-end system with biLSTM, attention and source embeddings.
|
| 76 |
+
|
| 77 |
+
We use the evaluation measure proposed by the task’s organizers:macro F1-score for overall classification and Root-Mean-Square Error (RMSE) over confidence scores.Results are shown in Table 5.We observe that DeClarE (Full) outperforms all the other approaches — thereby, re-affirming its power in harnessingexternal evidence.
|
| 78 |
+
|
| 79 |
+
In order to assess how our model separates articles reporting false claims from those reporting true ones, we employ dimensionality reduction using Principal Component Analysis (PCA) to project the article representations (g𝑔g in Equation 2) from a high dimensional space to a 2d plane. The projections are shown in Figure 2a. We observe that DeClarE obtains clear separability between credible versus non-credible articles in Snopes dataset.
|
| 80 |
+
|
| 81 |
+
Similar to the treatment of article representations, we perform an analysis with the claim and article source embeddings by employing PCA and plotting the projections. We sample a few popular news sources from Snopes and claim sources from PolitiFact. These news sources and claim sources are displayed in Figure 2b and Figure 2c, respectively. From Figure 2b we observe that DeClarE clearly separates fake news sources like nationalreport, empirenews, huzlers, etc. from mainstream news sources like nytimes, cnn, wsj, foxnews, washingtonpost, etc. Similarly, from Figure 2c we observe that DeClarE locates politicians with similar ideologies and opinions close to each other in the embedding space.
|
| 82 |
+
|
| 83 |
+
Attention weights help understand what DeClarE focuses on during learning and how it affects its decisions – thereby, making our model transparent to the end-users.Table 6 illustrates some interesting claims and salient words (highlighted) that DeClarE focused on during learning. Darker shades indicate higher weights given to the corresponding words. As illustrated in the table, DeClarE gives more attention to important words in the reporting article that are relevant to the claim and also play a major role in deciding the corresponding claim’s credibility.In the first example on Table 6, highlighted words such as “..barely true…” and “..sketchy evidence…” help our system to identify the claim as not credible. On the other hand, highlighted words in the last example, like, “..reveal…” and “..documenting reports…” help our system to assess the claim as credible.
|
| 84 |
+
|
| 85 |
+
Our work is closely related to the following areas:
|
| 86 |
+
|
| 87 |
+
Credibility analysis of Web claims:Our work builds upon approaches for performing credibility analysis of natural language claims in an open-domain Web setting. The approach proposed in Popat et al. (2016, 2017) employs stylistic language features and the stance of articles to assess the credibility of the natural language claims. However, their model heavily relies on handcrafted language features.Rashkin et al. (2017); Wang (2017) propose neural network based approaches for determining the credibility of a textual claim, but it does not consider external sources like web evidence and claim sources. These can be important evidence sources for credibility analysis.The method proposed by Samadi et al. (2016) uses the Probabilistic Soft Logic (PSL) framework to estimate source reliability and claim correctness. Vydiswaran et al. (2011) proposes an iterative algorithm which jointly learns the veracity of textual claims and trustworthiness of the sources. These approaches do not consider the deeper semantic aspects of language, however.Wiebe and Riloff (2005); Lin et al. (2011); Recasens et al. (2013) study the problem of detecting bias in language, but do not consider credibility.
|
| 88 |
+
|
| 89 |
+
Truth discovery: Prior approaches for truth discovery Yin et al. (2008); Dong et al. (2009, 2015); Li et al. (2011, 2014, 2015); Pasternack and Roth (2011, 2013); Ma et al. (2015); Zhi et al. (2015); Gao et al. (2015); Lyu et al. (2017) have focused on structured data with the goal of addressing the problem of conflict resolution amongst multi-source data.Nakashole and Mitchell (2014) proposed a method to extract conflicting values from the Web in the form of Subject-Predicate-Object (SPO) triplets and uses language objectivity analysis to determine the true value. Like the other truth discovery approaches, however, this approach is mainly suitable for use with structured data.
|
| 90 |
+
|
| 91 |
+
Credibility analysis in social media: Mukherjee et al. (2014); Mukherjee and Weikum (2015) propose PGM based approaches to jointly infer a statement’s credibility and the reliability of sources using language specific features. Approaches like Castillo et al. (2011); Qazvinian et al. (2011); Yang et al. (2012); Xu and Zhao (2012); Gupta et al. (2013); Zhao et al. (2015); Volkova et al. (2017) propose supervised methods for detecting deceptive content in social media platforms like Twitter, Sina Weibo, etc.Similarly, approaches like Ma et al. (2016); Ruchansky et al. (2017) use neural network methods to identify fake news and rumors on social media. Kumar et al. (2016) studies the problem of detecting hoax articles on Wikipedia.All these rely on domain-specific and community-specific features like retweets, likes, upvotes, etc.
|
| 92 |
+
|
| 93 |
+
In this work, we propose a completely automated end-to-end neural network model, DeClarE, for evidence-aware credibility assessment of natural language claims without requiring hand-crafted features or lexicons. DeClarE captures signals from external evidence articles and models joint interactions between various factors like the context of a claim, the language of reporting articles, and trustworthiness of their sources. Extensive experiments on real world datasets demonstrate our effectiveness over state-of-the-art baselines.
|
1809.06452v2.txt
ADDED
|
@@ -0,0 +1,663 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
The widespread deployment of %
|
| 3 |
+
machine learning models,
|
| 4 |
+
coupled with the discovery of their fragility against carefully crafted manipulation of training and/or test samples \cite{biggio2017wild,grosse2017statistical,szegedy2013intriguing}, calls for safe approaches to AI to enable their use in %
|
| 5 |
+
safety-critical applications, as argued, e.g., in \cite{seshia2016towards,dreossi2017compositional}. %
|
| 6 |
+
Bayesian techniques, in particular, provide a principled way of combining a-priori information into the training process, so as to obtain an a-posteriori distribution on test data, which also takes into account the uncertainty in the learning process. %
|
| 7 |
+
Recent advances in Bayesian learning include adversarial attacks
|
| 8 |
+
\cite{grosse2017wrong} and methods to compute pointwise uncertainty estimates in Bayesian deep learning %
|
| 9 |
+
\cite{gal2016dropout}.
|
| 10 |
+
However, much of the work on formal guarantees for machine learning models %
|
| 11 |
+
has focused on non-Bayesian models, such as deep neural networks (NNs) \cite{huang2017safety,hein2017formal} %
|
| 12 |
+
and, to the best of our knowledge, %
|
| 13 |
+
there is no work directed at providing formal guarantees for the absence of
|
| 14 |
+
adversarial local input perturbations in Bayesian prediction settings. %
|
| 15 |
+
|
| 16 |
+
Gaussian processes (GPs) are a class of stochastic processes that are, due to their many favourable properties, widely employed for Bayesian learning \cite{rasmussen2004gaussian},
|
| 17 |
+
with applications spanning robotics, control systems and biological processes \cite{sadigh2015safe,laurenti2017reachability,bortolussi2018central}. %
|
| 18 |
+
Further, driven by pioneering work that first recognized the convergence of fully-connected NNs to GPs in the limit of infinitely many neurons \cite{neal2012bayesian}, %
|
| 19 |
+
GPs have been used recently as a model to characterize the behaviour of NNs in terms of convergence analysis \cite{matthews2018gaussian}, approximated Bayesian inference \cite{lee2017deep} and training algorithms \cite{chouza2018gradient}.
|
| 20 |
+
|
| 21 |
+
In this paper we compute formal local robustness guarantees for Bayesian inference with GP priors. The resulting guarantees are probabilistic, as they take into account the uncertainty intrinsic in the Bayesian learning process and explicitly work with the a-posteriori output distribution of the GP.
|
| 22 |
+
More specifically, given a GP model trained on a given data set, a test input point and a neighborhood around the latter, we are interested in computing the probability that there exists a point in the neighbourhood such that the prediction of the GP on the latter differs from the initial test input point by at least a given threshold. This %
|
| 23 |
+
implicitly gives guarantees on the absence of adversarial examples, that is, input samples that trick a machine learning model into performing wrong predictions.
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
Unfortunately, computing such a probability is far from trivial. In fact,
|
| 27 |
+
given a compact set $T\subseteq \mathbb{R}^m,m>0,$ and $x^* \in T,$ the above measure reduces to computing the probability that there exists a function $f$ sampled from the GP such that there exists $x \in T$ for which $||f(x^*)-f(x) ||> \delta$, where $\delta>0$ and $|| \cdot ||$ is a metric norm. Since the set $T$ is composed of an infinite number of points, computing such a measure for general stochastic processes is extremely challenging. %
|
| 28 |
+
However, for GPs we can obtain tight upper bounds on the above probability by making use of inequalities developed in the theory of GPs, such as the \emph{Borell-TIS inequality} \cite{adler2009random} and the \emph{Dudley's Entropy Integral} \cite{dudley1967sizes}. %
|
| 29 |
+
To do this, we need to obtain lower and upper bounds on the extrema of the a-posteriori GP mean and variance functions on neighborhoods of a given test point.
|
| 30 |
+
We obtain these bounds by constructing lower and upper approximations for the GP kernel as a function of the test point, which are then propagated through the GP inference formulas. Then, safe approximations for these values are obtained by posing a series of optimization problems that can be solved either analytically or by standard {quadratic} convex optimization techniques.
|
| 31 |
+
We illustrate the above framework with explicit algorithmic techniques for GPs built with squared-exponential and ReLU kernel.
|
| 32 |
+
|
| 33 |
+
Finally, we apply the methods presented here to characterize the robustness of GPs with ReLU kernel trained on a subset of images included in the MNIST dataset.
|
| 34 |
+
Relying on the weak convergence between fully-connected NNs with ReLU activation functions and the corresponding GPs with ReLU kernel, we analyze the behaviour of %
|
| 35 |
+
such networks on adversarial images in a Bayesian setting.
|
| 36 |
+
We use SIFT \cite{lowe2004distinctive} to focus on important patches of the image, and perform feature-level safety analyses of test points included in the dataset.
|
| 37 |
+
We apply the proposed methods to evaluate the resilience of features against (generic) adversarial perturbations bounded in norm, and discuss how this is affected by stronger perturbations and different misclassification thresholds.
|
| 38 |
+
We perform a parametric optimization analysis of maximum prediction variance around specific test points in an effort to characterize active defenses against adversarial examples that rely on variance thresholding.
|
| 39 |
+
In the examples we studied, we have consistently observed that, while an increased number of training samples may significantly help detect adversarial examples by means of prediction uncertainty, the process may be undermined by more complex architectures.
|
| 40 |
+
|
| 41 |
+
In summary, the paper makes the following main contributions:
|
| 42 |
+
\begin{itemize}
|
| 43 |
+
\item We provide tight upper bounds on the probability that the prediction of a Gaussian process remains close to a given test point in a neighbourhood, which can be used to quantify local robustness against adversarial examples. %
|
| 44 |
+
\item %
|
| 45 |
+
We develop algorithmic methods for the computation of extrema of GP mean and variance over a compact set.
|
| 46 |
+
\item Relying on convergence between fully-connected NNs and GPs, we apply the developed methods to provide feature-level analysis of the behaviour of the former on %
|
| 47 |
+
the MNIST dataset.
|
| 48 |
+
\end{itemize}
|
| 49 |
+
\subsubsection{Why probabilistic local robustness guarantees?}
|
| 50 |
+
Our results provide formal local robustness guarantees in the sense that the resulting bounds are sound with respect to a neighbourhood of an input, and %
|
| 51 |
+
numerical methods %
|
| 52 |
+
have not been used. %
|
| 53 |
+
This enables certification for Bayesian methods that is necessary in safety-critical applications, %
|
| 54 |
+
and is in contrast with many existing pointwise approaches to detect adversarial examples in Bayesian models, which are generally based on heuristics, such as to reject test points with high uncertainty \cite{li2017dropout,feinman2017detecting}.
|
| 55 |
+
We illustrate the intuition with the following simple example.
|
| 56 |
+
|
| 57 |
+
\begin{myexam}\label{IntroExample}
|
| 58 |
+
Let $(\GP(x),x \in \mathbb{N})$ be a zero-mean stochastic process with values in $\mathbb{R}$. Consider the following widely used definition of safety for a set $T=[x_{1},...,x_{10}]$%
|
| 59 |
+
\begin{align}
|
| 60 |
+
\label{SafetyDefinitionIntroExample}
|
| 61 |
+
P_{safe}(\GP,T,\delta)=\text{Prob}( \forall x \in T,\, \GP(x) < \delta ),
|
| 62 |
+
\end{align}
|
| 63 |
+
where $\delta\in \mathbb{R}$ is a given threshold.
|
| 64 |
+
Assume that, for all $x_i,x_j \in T$, $\GP(x_i)$ and $\GP(x_j)$ are independently and equally distributed random variables such that for each $x \in T$ we have
|
| 65 |
+
$ \text{Prob}( \GP(x) < \delta )=0.85. $
|
| 66 |
+
Then, if we compute the above property we obtain
|
| 67 |
+
$$ P_{safe}(\GP,T,\delta)=0.85^{10}\approx 0.197 .$$
|
| 68 |
+
Thus, even though at each point $\GP(x)$ has relatively high probability of being safe, $P_{safe}(\GP,T,\delta)$ is still small. This is because safety, as defined in Eqn \ref{SafetyDefinitionIntroExample}, depends on a set of points, and this must be accounted for to give robustness guarantees for a given stochastic model. Note that, to simplify, we used a discrtete set $T$, but the same reasoning remains valid even if $T\subseteq \mathbb{R}^m,m>0$, as in this paper.
|
| 69 |
+
\end{myexam}
|
| 70 |
+
\subsection{Related Work}
|
| 71 |
+
Existing formal approaches for machine learning models mostly focus on computing non-probabilistic local safety guarantees \cite{raghunathan2018certified,huang2017safety,ruan2018reachability} and generally neglect the uncertainty {of} the learning process, which %
|
| 72 |
+
is intrinsic in a Bayesian model.
|
| 73 |
+
Recently, empirical methods to detect adversarial examples for Bayesian NNs that utilise pointwise uncertainty have been introduced \cite{li2017dropout,feinman2017detecting}.
|
| 74 |
+
However, these approaches can be fooled by attacks that generate adversarial examples with small uncertainty as shown in \cite{carlini2017adversarial}. %
|
| 75 |
+
Unfortunately, obtaining formal guarantees for Bayesian NNs is challenging since their posterior distribution, which can be obtained in closed form for GPs, is generally analytically intractable \cite{gal2016dropout}. %
|
| 76 |
+
In \cite{grosse2017wrong} attacks for Bayesian inference with Gaussian processes based on local perturbations of the mean have been presented.
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
Notions of safety for Gaussian processes have been recently studied in the context of system design for stochastic models (see, e.g. \cite{wachi2018safe,bartocci2015system,sadigh2015safe,sui2015safe}). In \cite{sadigh2015safe}, the authors synthesize safe controllers against \emph{Probabilistic Signal Temporal Logic (PrSTL)} specifications, which suffer from the %
|
| 81 |
+
issue illustrated in Example \ref{IntroExample}. %
|
| 82 |
+
Another related approach is that in \cite{sui2015safe}, where the authors build on %
|
| 83 |
+
\cite{srinivas2010gaussian} and introduce SAFEOPT, a Bayesian optimization algorithm that additionally guarantees that, for the optimized parameters, with high probability the resulting objective function (sampled from a GP) is greater than a threshold. However, they do not give guarantees against perturbation of the synthesized parameters. {For instance, their method cannot guarantee that the resulting behaviour will still be safe and close to the optimal value if parameters corrupted by noise are applied.} %
|
| 84 |
+
Our approach %
|
| 85 |
+
allows one to quantify such a probability.
|
| 86 |
+
We should also stress that, while it is often the case that the guarantees provided by existing algorithms are statistical (i.e., given in terms of confidence intervals), the bounds presented in this paper are probabilistic.%
|
| 87 |
+
\section{Problem Formulation}
|
| 88 |
+
We consider a Gaussian process $\big(\GP(x),x \in \mathbb{R}^m,m>0\big) $ with values in $\mathbb{R}^n,n>0$ and with a Gaussian probability measure $P$ such that, for any $x_1,x_2,...,x_k \in \mathbb{R}^m$, $P(\GP(x_1),\GP(x_2),...,\GP(x_k))$ is a multivariate normal distribution\footnote{In this paper we assume $\GP$ is a separable stochastic process. This is a standard and common assumption \cite{adler2009random}. The separability of $\GP$ guarantees that Problem \ref{BoundedVariationSingleCOmponentDefiniton} and \ref{BoundedVariationDefinition} are measurable.}. We consider Bayesian inference for $\GP$. That is, as illustrated in detail in the next section, given a dataset $\mathcal{D}=\{\GP(x_i)=y_i, i \in \{1,...,\tss \} \}$ {of $\vert \mathcal{D} \vert :=\tss$} samples, we consider the process
|
| 89 |
+
$$ \GP(x) | \mathcal{D}, \, x \in \mathbb{R}^m, $$
|
| 90 |
+
which represents the conditional distribution of $\GP$ given the set of observations in $\mathcal{D}$.
|
| 91 |
+
The first problem we examine is Problem \ref{BoundedVariationSingleCOmponentDefiniton}, where we want to compute the probability that local perturbations of a given test point result
|
| 92 |
+
in predictions that remain close to the original. %
|
| 93 |
+
\begin{myprobl}\label{BoundedVariationSingleCOmponentDefiniton}{(Probabilistic Safety).}
|
| 94 |
+
Consider the training dataset $\mathcal{D}$. Let $T\subseteq \mathbb{R}^m$ and fix $x^* \in T.$ For $\delta> 0$
|
| 95 |
+
call
|
| 96 |
+
\begin{align*}
|
| 97 |
+
\phi_1^{i} (x^*,&T,\delta\, | \, \mathcal{D})=\\
|
| 98 |
+
&P( \exists x' \in T\, s.t.\, \big( \GP^{(i)}(x^*)-\GP^{(i)}(x') \big ) > \delta \, | \, \mathcal{D}),
|
| 99 |
+
\end{align*}
|
| 100 |
+
where $\GP^{(i)}$ is the i-th component of $\GP.$
|
| 101 |
+
Then we say that component $i$ in $\GP$ is safe with probability $1-\epsilon >0$ for $x^*$ with respect to set $T$ and perturbation $\delta> 0$ iff
|
| 102 |
+
\begin{align}
|
| 103 |
+
\phi_1^{i} (x^*&,T,\delta | \mathcal{D}) \leq \epsilon .
|
| 104 |
+
\label{def:SAFETYGPSingle}
|
| 105 |
+
\end{align}
|
| 106 |
+
\end{myprobl}
|
| 107 |
+
\noindent
|
| 108 |
+
Intuitively, we consider a test point $x^*$ and a compact set $T$ containing $x^*$, and compute the probability that the predictions of $\GP$ remain $\delta-$close for each $x' \in T$.
|
| 109 |
+
We consider the components of the GP individually and with sign, enabling one-sided analysis.
|
| 110 |
+
Note that $T$ is composed of an uncountable number of points, making the probability computation challenging.
|
| 111 |
+
{Moreover, Problem \ref{BoundedVariationSingleCOmponentDefiniton} will still represent a sound notion of safety even in the case that a distribution on the input space can be assumed.}
|
| 112 |
+
Problem \ref{BoundedVariationSingleCOmponentDefiniton} can be generalized to local invariance of $\GP$ with respect to a given metric (Problem \ref{BoundedVariationDefinition} below). In the next section, for the corresponding solution, %
|
| 113 |
+
we will work with the $L_1$ norm, but all the results can be easily extended to any $L_p$ norm, including $L_{\infty}$. %
|
| 114 |
+
|
| 115 |
+
\begin{myprobl}{(Probabilistic Invariance)}\label{BoundedVariationDefinition}
|
| 116 |
+
Consider the training dataset $\mathcal{D}$.
|
| 117 |
+
Let $T\subseteq \mathbb{R}^m$ and assume $x^* \in T.$
|
| 118 |
+
For metric $|| \cdot ||_d: \mathbb{R}^n \to \mathbb{R}_{\geq 0}$ and $\delta >0$ call
|
| 119 |
+
\begin{align*}
|
| 120 |
+
\phi_2(x^*,&T,\delta | \mathcal{D})=P( \exists x' \in T\, s.t.\, || \GP(x')-\GP(x^*)) ||_d > \delta | \mathcal{D} )
|
| 121 |
+
\end{align*}
|
| 122 |
+
Then we say that $\GP$ is $\delta-$invariant with respect to metric $|| \cdot ||_d$ for $x^*$ in $T$ and perturbation $\delta> 0$ with probability $1-\epsilon>0$ iff
|
| 123 |
+
\begin{align}
|
| 124 |
+
\label{def:SAFETYGPextended}
|
| 125 |
+
\phi_2(x^*,&T,\delta | \mathcal{D}) \leq \epsilon.
|
| 126 |
+
\end{align}
|
| 127 |
+
\end{myprobl}
|
| 128 |
+
Probabilistic invariance, as defined in Problem \ref{BoundedVariationDefinition}, bounds the probability that each function sampled from $\GP$ remains within a distance of at most $\delta$ to the initial point.
|
| 129 |
+
Note that both Problem \ref{BoundedVariationSingleCOmponentDefiniton} and \ref{BoundedVariationDefinition} quantify the probability of how the output of a learning process changes its value in a set around a given test input point, which implicitly gives probabilistic guarantees for local robustness against adversarial examples.
|
| 130 |
+
In the next section, in Theorem \ref{BoundsSIngleBoundedVariation} and \ref{Theorem-Invariance}, we give analytic upper bounds for Problem \ref{BoundedVariationSingleCOmponentDefiniton} and \ref{BoundedVariationDefinition}.
|
| 131 |
+
In fact, analytic distributions of the supremum of a GP, which would allow one to solve the above problems, are known only for a very limited class of GPs (and always for GPs evolving over time) \cite{adler2009random}, making exact computation impossible.
|
| 132 |
+
However, first, we illustrate the intuition behind the problems studied here on a GP regression problem. %
|
| 133 |
+
|
| 134 |
+
\begin{myexam}\label{ex:run_ex1}
|
| 135 |
+
We consider a regression problem taken from \cite{bach2009exploring},
|
| 136 |
+
where we generate 128 samples from a random two-dimensional covariance matrix, and define labels as a (noisy) quadratic polynomial of the two input variables.
|
| 137 |
+
We train a GP with squared-exponential kernel on this dataset, using a maximum likelihood estimation of the kernel hyper-parameters \cite{rasmussen2004gaussian}.
|
| 138 |
+
The mean and variance of the GP obtained after training are plotted in Figure \ref{fig:example_mean_var}, along with the samples used for training.
|
| 139 |
+
\begin{figure}
|
| 140 |
+
\centering
|
| 141 |
+
\subfloat[Mean.]{\includegraphics[width = .49\columnwidth]{figures/heatmap_prova_no_lines_up_05_eps_converted_to.pdf}} \hfill
|
| 142 |
+
\subfloat[Variance.]{\includegraphics[ width = .49\columnwidth]{figures/heatmap_prova_no_lines_up_var_05_eps_converted_to.pdf}}
|
| 143 |
+
\caption{Results of GP training.}\label{fig:example_mean_var}
|
| 144 |
+
\end{figure}
|
| 145 |
+
Consider the origin point $x^o = \left( 0 , 0 \right)$, let $\gamma = (0.1,0.1)$ and define $T^o_\gamma = [x^o - \gamma, x^o + \gamma ]$. As $x^o$ is a saddle point for the mean function, variations of the mean around it are relatively small.
|
| 146 |
+
Analogously, the variance function exhibits a flat behaviour around $x^o$, meaning greater confidence of the GP in performing predictions around $x^o$. %
|
| 147 |
+
As such we expect realizations of the GP to be consistently stable in a neighbourhood of $x^o$, which in turn translates to low values for $\phi_1 (x^o,T^o_\gamma,\delta )$ and $\phi_2 (x^o,T^o_\gamma,\delta),$ where in $\phi_1$ and $\phi_2$, to simplify the notation, we omit the dataset used for training.
|
| 148 |
+
On the other hand, around $x^* = (3,3)$ the a-posteriori mean changes quickly and the variance is high, reflecting higher uncertainty. %
|
| 149 |
+
Hence, letting $T^*_\gamma = [x^* - \gamma, x^* + \gamma ]$, we expect the values of $\phi_1 (x^*,T^*_\gamma,\delta)$ and $\phi_2 (x^*,T^*_\gamma,\delta)$
|
| 150 |
+
to be greater than those computed for $x^o$.
|
| 151 |
+
|
| 152 |
+
In the next section we show how $\phi_1 (x,T_\gamma,\delta)$ and $\phi_2 (x,T_\gamma,\delta)$ can be computed to quantify the uncertainty and variability of the predictions around $x^o$ and $x^*.$
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
\end{myexam}
|
| 157 |
+
\section{Theoretical Results}
|
| 158 |
+
Since $\GP$ is a Gaussian process, its distribution is completely defined by its mean $\mu: \mathbb{R}^m \to \mathbb{R}^n$ and covariance (or kernel) function $\Sigma: \mathbb{R}^m \times \mathbb{R}^m \to \mathbb{R}^{n\times n}.$
|
| 159 |
+
Consider a set of training data $\mathcal{D}=\{\GP(x_i)=y_i, i \in \{1,...,\tss \} \},$ and call $\mathbf{y}=[y_1,...,y_{\tss}].$ %
|
| 160 |
+
Training $\GP$ in a Bayesian framework is equivalent to computing the distribution of ${\GP}$ given the dataset $\mathcal{D}$, that is, the distribution of the process
|
| 161 |
+
$$ \bar{\GP}=\GP \, |\,\mathcal{D}. $$
|
| 162 |
+
Given a test point $x^*\in \mathbb{R}^m$ and $x_1,...,x_{\tss}$ training inputs in $\mathcal{D}$, consider the joint distribution
|
| 163 |
+
$[\GP(x^*),\GP(x_1),...,\GP(x_{\tss})]$, which is still Gaussian with mean and covariance matrix given by
|
| 164 |
+
$$ \mu=\begin{bmatrix}
|
| 165 |
+
\mu(x^*) ,
|
| 166 |
+
\mu(x_1) ,..., \mu(x_{\tss})
|
| 167 |
+
\end{bmatrix}
|
| 168 |
+
\quad \Sigma=\begin{bmatrix}
|
| 169 |
+
\Sigma_{x^*,x^*} & \Sigma_{x^*,\mathcal{D}} \\[0.3em]
|
| 170 |
+
\Sigma_{x^*,\mathcal{D}}^T & \Sigma_{\mathcal{D},\mathcal{D}}
|
| 171 |
+
\end{bmatrix}, $$ %
|
| 172 |
+
where $\Sigma_{D,D}$ is the covariance matrix relative to vector $[\GP(x_1),...,\GP(x_{|\mathcal{D}|})].$
|
| 173 |
+
Then, it follows that $\bar{\GP}$ is still Gaussian with mean and covariance matrix defined as follows:
|
| 174 |
+
\begin{align}
|
| 175 |
+
\label{Eq:COnditionMean}& \bar{\mu}(x^*)= \mu(x^*) + \Sigma_{x^*,\mathcal{D}}\Sigma_{\mathcal{D},\mathcal{D}}^{-1}(\mathbf{y}-\mu_{\mathcal{D}})\\
|
| 176 |
+
&\bar{\Sigma}_{x^*,x^*}= \Sigma_{x^*,x^*}-\Sigma_{x^*,\mathcal{D}}\Sigma_{\mathcal{D},\mathcal{D}}^{-1}\Sigma_{x^*,\mathcal{D}}^T,\label{Eq:ConditionalVariance}
|
| 177 |
+
\end{align}
|
| 178 |
+
where $\mu_{\mathcal{D}}=[\mu(x_1),...,\mu(x_{\tss})].$
|
| 179 |
+
Hence, for GPs the distribution of $\bar{\GP}(x^*)$ can be computed exactly. %
|
| 180 |
+
|
| 181 |
+
Given two test points $x^*_1,{x^*_2}$ and $x^*=[x^*_1,{x^*_2}]$, the above calculations can still be applied to compute the joint distribution
|
| 182 |
+
$$\bar{\GP}(x^*)=\big([\GP(x^*_1),\GP(x^*_2)]\, |\,\mathcal{D}\big) . $$ %
|
| 183 |
+
In particular, $\bar{\GP}(x^*)$ is still Gaussian and with mean $\bar{\mu}$ and covariance matrix $\bar{\Sigma}$ given by Eqns \eqref{Eq:COnditionMean} and \eqref{Eq:ConditionalVariance}
|
| 184 |
+
but with $\mu(x^*)=[\mu(x^*_1),\mu(x^*_2)]$ and
|
| 185 |
+
$ \Sigma_{x^*,x^*}=\begin{bmatrix}
|
| 186 |
+
\Sigma_{x^*_1,x^*_1} & \Sigma_{x^*_1,x^*_2} \\[0.3em]
|
| 187 |
+
\Sigma_{x^*_1,x^*_2}^T & \Sigma_{x^*_2,x^*_2}
|
| 188 |
+
\end{bmatrix}. $
|
| 189 |
+
From $\bar{\GP}(x^*)$ we can obtain the distribution of the following random variable
|
| 190 |
+
$$\GP^o(x^*_1,x^*_2)=\big( \GP(x^*_1)-\GP(x^*_2)\big)\, | \, \mathcal{D},$$
|
| 191 |
+
which represents the difference of $\GP$ at two distinct test points after training. It is straightforward to show that, given $B\in \mathbb{R}^{n\times 2 n}$ such that $B=[I;-I],$ where $I$ is the identity matrix of dimension $n,$
|
| 192 |
+
$\GP^o(x^*_1,x^*_2)$ is Gaussian with mean and variance
|
| 193 |
+
$$\mu^{o}(x^*_1,x^*_2)=B \bar{\mu}(x^*) \quad \quad \Sigma^o_{x^*_1,x^*_2}=B \bar{\Sigma}_{x^*,x^*} B^T. $$
|
| 194 |
+
$\GP^o(x^*_1,x^*_2)$ is the distribution of how $\GP,$ after training, changes with respect to two different test points.
|
| 195 |
+
However, to solve Problem \ref{BoundedVariationSingleCOmponentDefiniton} and \ref{BoundedVariationDefinition}, we need to take into account all the test points in $T\subseteq \mathbb{R}^m$ and compute the probability that in at least one of them $\GP^o$ exits from a given set of the output space. %
|
| 196 |
+
This is done in Theorem \ref{BoundsSIngleBoundedVariation} by making use of the Borell-TIS inequality and of the Dudley's entropy integral \cite{adler2009random,dudley1967sizes}.
|
| 197 |
+
The above inequalities allow one to study Gaussian processes by appropriately defining a metric on the variance of the GPs.
|
| 198 |
+
In order to define such a metric we call $\hat \GP^o$ the GP with the same covariance matrix as $\GP^o$ but with zero mean and $\hat \GP^{o,(i)}$ its $i$-th component.
|
| 199 |
+
For $i \in \{1,...,n\}$, a test point $ x^* \in \mathbb{R}^{m}, $ and $x_1,x_2 \in \mathbb{R}^m$ we define the (pseudo-)metric $d^{(i)}_{x^*}(x_1,x_2)$ by
|
| 200 |
+
\begin{align}\label{Eqn:dNormdefinition}
|
| 201 |
+
d^{(i)}_{x^*}(x_1,x_2)=&\sqrt{ \mathbb{E}[(\hat \GP^{o,(i)}(x^*,x_1)- \hat \GP^{o,(i)}(x^*,x_2))^2] }\\
|
| 202 |
+
=&\sqrt{\mathbb{E}[(\hat \GP^{(i)}(x_2)- \hat \GP^{(i)}(x_1))^2]}, \nonumber
|
| 203 |
+
\end{align}
|
| 204 |
+
where $\hat \GP^{(i)}$ is the $i$-th component of the zero-mean version of $\bar{\GP}$. Note that $d^{(i)}_{x^*}(x_1,x_2)$ does not depend on $x^*.$
|
| 205 |
+
Additionally, we assume there exists a constant $K_{x^*}^{(i)}>0$ such that for a compact $T\subseteq \mathbb{R}^m$ and $x^*,x_1,x_2 \in T$\footnote{Note that here we work with the $L_2$ norm, but any other $L_p$ metric would work.}
|
| 206 |
+
$$ d^{(i)}_{x^*}(x_1,x_2)\leq K^{(i)}_{x^*} \vert \vert x_1-x_2 \vert \vert_2. $$
|
| 207 |
+
Now, we are finally ready to state the following theorem.
|
| 208 |
+
\begin{theorem}\label{BoundsSIngleBoundedVariation}
|
| 209 |
+
Assume $T\subseteq \mathbb{R}^m,m>0,$ is a hyper-cube with layers of length $D>0$.
|
| 210 |
+
For $ {x^*} \in T, \delta >0,$ and $i \in \{1,\ldots,n \}$ let
|
| 211 |
+
\begin{align*}
|
| 212 |
+
&\eta_i = \delta -\big( \, sup_{x \in T}\mu^{o,(i)}({x^*}, x)\, + \\
|
| 213 |
+
&12 \int_{0}^{\frac{1}{2}sup_{x_1,x_2 \in T} d^{(i)}_{{x^*}}(x_1,x_2)}\sqrt{ ln \left(\big( \frac{\sqrt{m} K^{(i)}_{{x^*}} D\, }{ z}+ 1\big)^m \right) } d z\big).
|
| 214 |
+
\end{align*}
|
| 215 |
+
Assume $\eta_i > 0$. Then, it holds that
|
| 216 |
+
\begin{equation*}
|
| 217 |
+
\phi_1^{i} (x^*,T,\delta | \mathcal{D}) \leq \hat{\phi}_1^{i} (x^*,T,\delta | \mathcal{D}) := e^{ -\frac{\eta_i^2}{2 \xi^{(i)} }},
|
| 218 |
+
\end{equation*}
|
| 219 |
+
where $\xi^{(i)} = \sup_{x\in T} \Sigma^{o,(i,i)}_{{x^*},x}$ is the supremum of the component $(i,i)$ of the covariance matrix $\Sigma^{o}_{{x^*},x}$.
|
| 220 |
+
\end{theorem}
|
| 221 |
+
\begin{proof}{[Sketch.]}{
|
| 222 |
+
\begin{align*}
|
| 223 |
+
& \phi_1^{i} (x^*,T,\delta | \mathcal{D})\\
|
| 224 |
+
&\quad \quad \text{(By definition of $\phi_1$)}\\
|
| 225 |
+
=& P( \exists x \in T\, s.t.\, \big( \GP^{(i)}(x)-\GP^{(i)}(x^*)>\delta \, | \, \mathcal{D} \big)\\ & \quad \quad \text{(By definition of supremum)}\\
|
| 226 |
+
=&P\big( \sup_{x \in T}\, \GP^{o,(i)}(x^*, x)>\delta \big)\\ & \quad \quad \text{(By linearity of GPs)}\\
|
| 227 |
+
=&P\big( \sup_{x \in T}\,\hat \GP^{o,(i)}(x^*, x) + \mathbb{E}[\GP^{o,(i)}(x^*, x)]>\delta \big)\\ & \quad \quad \text{(By definition of supremum)}\\
|
| 228 |
+
\leq &P\big( \sup_{x \in T}\, \hat \GP^{o,(i)}(x^*, x) >\delta- sup_{x_1 \in T}\mathbb{E}[\GP^{o,(i)}( x^*,x_1)] \big).
|
| 229 |
+
\end{align*}
|
| 230 |
+
where $\hat \GP^{o,(i)}(x^*, x)$ is the zero mean Gaussian process with same variance of $\GP^{o,(i)}(x^*, x).$
|
| 231 |
+
The last inequality can be bounded from above using the Borell-TIS inequality \cite{adler2009random}.
|
| 232 |
+
To use such an inequality we need to derive an upper bound of $\mathbb{E}[sup_{t \in T} \GP^{o,(i)}(x^*,x)]$. This can be done by employing the Dudley's Entropy integral \cite{dudley1967sizes}.
|
| 233 |
+
|
| 234 |
+
The extended version of the proof can be found in the Appendix.
|
| 235 |
+
}
|
| 236 |
+
\end{proof}
|
| 237 |
+
\noindent
|
| 238 |
+
In Theorem \ref{BoundsSIngleBoundedVariation}{we derive $\hat{\phi}_1^{i} (x^*,T,\delta | \mathcal{D})$ as an} upper bound for $\phi_1^{i} (x^*,T,\delta | \mathcal{D})$. Considering that $\GP$ is a Gaussian process, it is interesting to note that the resulting bounds still follow an exponential distribution.
|
| 239 |
+
From Theorem \ref{BoundsSIngleBoundedVariation} we have the following result.
|
| 240 |
+
\begin{theorem}\label{Theorem-Invariance}
|
| 241 |
+
Assume $T\subseteq \mathbb{R}^m,m>0$ is a hyper-cube with layers of length $D>0$.
|
| 242 |
+
For $ {x^*} \in T, \delta >0$ let
|
| 243 |
+
\begin{align*}
|
| 244 |
+
&\bar \eta_i = \frac{\delta\, -\, sup_{x \in T}|\mu^{o}({x^*}, x)|_1}{n}\, - \\
|
| 245 |
+
& 12 \int_{0}^{\frac{1}{2}sup_{x_1,x_2 \in T} d^{(i)}_{{x^*}}(x_1,x_2)} \sqrt{ln \left(\big( \frac{\sqrt{m} K^{(i)}_{{x^*}} D\, }{ z}+ 1\big)^m \right)}d z.
|
| 246 |
+
\end{align*}
|
| 247 |
+
For each $i \in \{1,...,n\}$ assume $\bar \eta_i > 0$. Then, it holds that
|
| 248 |
+
\begin{equation*}
|
| 249 |
+
\phi_2 (x^*,T,\delta | \mathcal{D}) \leq \hat{\phi}_2 (x^*,T,\delta | \mathcal{D}) := 2 \sum_{i=1}^{n} e^{ -\frac{\bar \eta_i^2}{2 \xi^{(i)} }},
|
| 250 |
+
\end{equation*}
|
| 251 |
+
where $\xi^{(i)} = \sup_{x\in T} \Sigma^{o,(i,i)}_{{x^*},x}$.
|
| 252 |
+
\end{theorem}
|
| 253 |
+
\noindent
|
| 254 |
+
Note that in Theorem \ref{BoundsSIngleBoundedVariation} and \ref{Theorem-Invariance} we assume that $T$ is a hyper-cube. However, proofs of both theorems (reported in the Supplementary Materials) can be easily extended to more general compact sets, at a cost of more complex analytic expressions or less tight bounds.
|
| 255 |
+
|
| 256 |
+
Both theorems require the computation of a set of constants, which depends on the particular kernel. %
|
| 257 |
+
In particular, $\xi^{(i)}$ and $ \sup_{x \in T}\mu^{o,(i)}(x^*,x)$ are upper bound of variance and mean a-posteriori while, for a test point $x^*,$ $K^{(i)}_{x^*} $ and $\sup_{x_1,x_2 \in T} d^{(i)}_{x^*}(x_1,x_2)$ represent local Lipschitz constant and upper bound for $d^{(i)}_{x^*}$ in $T.$
|
| 258 |
+
In the next section, we show how these constants can be computed. %
|
| 259 |
+
|
| 260 |
+
\begin{myexam}
|
| 261 |
+
\begin{figure*}[h]
|
| 262 |
+
\centering{\includegraphics[width = 0.98 \columnwidth]{figures/new_example_fig_1_eps_converted_to.pdf}}{\includegraphics[width = 0.98 \columnwidth]{figures/new_example_fig_2_eps_converted_to.pdf}}
|
| 263 |
+
\caption{{Upper bounds (solid lines) and sampling approximation (dashed lines) for $\phi_1$ (left plot) and $\phi_2$ (right plot) on $x^o$ and $x^*$.}}
|
| 264 |
+
\label{fig:phi_all_run_ex}
|
| 265 |
+
\end{figure*}
|
| 266 |
+
|
| 267 |
+
We illustrate the upper bounds for $\phi_1$ and $\phi_2$, as given by Theorem \ref{BoundsSIngleBoundedVariation} and \ref{Theorem-Invariance}, %
|
| 268 |
+
on the GP introduced in Example \ref{ex:run_ex1}. %
|
| 269 |
+
Figure \ref{fig:phi_all_run_ex} shows the values obtained for $\hat{\phi}_1$ and $\hat{\phi}_2$ on $x^o$ and $x^*$ for $\delta$ between $0$ and $0.2$.
|
| 270 |
+
We observe that values computed for $x^*$ are consistently greater than those computed for $x^o$, which captures and probabilistically quantifies the increased uncertainty of the GP around $x^*$, as well as the increased ratio of mean variation around it (see Figure \ref{fig:example_mean_var}).
|
| 271 |
+
Notice also that values for $\hat{\phi}_1$ are always smaller than the corresponding $\hat{\phi}_2$ values. This is a direct consequence of the fact that probabilistic invariance is a stronger requirement than probabilistic safety, as defined in Problem \ref{BoundedVariationSingleCOmponentDefiniton}, as the latter is not affected by variations that tend to increase the value of the GP output (translating to increased confidence in classification settings).
|
| 272 |
+
{In Figure \ref{fig:phi_all_run_ex} we also compare the upper bounds obtained with estimation for $\phi_1$ and $\phi_2$ based on sampling of the GP in a discrete grid around the test points.
|
| 273 |
+
Specifically, we sample 10000 functions from the GP and evaluate them in 2025 points uniformly spaced around the test point.
|
| 274 |
+
We remark that this provides us with just an empirical under-approximation of the actual values of $\phi_1$ and $\phi_2$, referred to as $\bar{\phi}_1$ and $\bar{\phi}_2$ respectively.
|
| 275 |
+
Note also that $\bar{\phi}_1$ and $\bar{\phi}_2$ have an exponential decay.
|
| 276 |
+
The results suggest that the approximation is tighter around $x^o$ than around $x^*$.
|
| 277 |
+
In fact, higher variance will generally imply a looser bound, also due to the over-approximations introduced in the computation of the constants required in the theorems.
|
| 278 |
+
}
|
| 279 |
+
\end{myexam}
|
| 280 |
+
\subsection{Constant Computation}
|
| 281 |
+
We introduce a general framework for the computation of the constants involved in the bounds presented in the previous section with an approach based on a generalisation of that of \cite{jones1998efficient} for squared-exponential kernels in the setting of Kriging regression. %
|
| 282 |
+
Namely, we assume the existence of a suitable decomposition of the kernel function as $\Sigma_{x,x_i} = \psi_\Sigma \left( \varphi_\Sigma \left( x,x_i \right) \right)$ for all $x$ and $x_i \in \mathbb{R}^m$, such that:
|
| 283 |
+
\begin{enumerate}
|
| 284 |
+
\item $\varphi_\Sigma : \mathbb{R}^m \times \mathbb{R}^m \rightarrow \mathbb{R} $ is a continuous function;
|
| 285 |
+
\item $\psi_\Sigma : \mathbb{R} \rightarrow \mathbb{R}$ is differentiable, with $\frac{d \psi_\Sigma }{d \varphi_\Sigma}$ continuous;
|
| 286 |
+
\item $\sup_{x \in T} \sum_{i = 1}^{\tss} c_i \varphi_\Sigma \left(x, x_i \right) $ can be computed for each $c_i \in \mathbb{R}$ and $x_i \in \mathbb{R}^m$, $i = 1, \ldots, \tss$.
|
| 287 |
+
\end{enumerate}
|
| 288 |
+
While assumptions 1 and 2 usually follow from smoothness of the kernel used, assumption 3 depends on the particular $\varphi_\Sigma$ defined.
|
| 289 |
+
Intuitively, $\varphi_\Sigma$ should represent the smallest building block of the kernel which captures the dependence on the two input points.
|
| 290 |
+
For example for the squared exponential kernel this has the form of a separable quadratic polynomial so that assumption 3 is verified.
|
| 291 |
+
Similarly, for the ReLU kernel $\varphi_\Sigma$ can be defined as the dot product between the two input points.
|
| 292 |
+
{A list of commonly used kernels that satisfy assumptions 1 to 3 is given in the Supplementary Materials, along with valid decomposition functions $\varphi_\Sigma $ and $\psi_\Sigma $.}
|
| 293 |
+
|
| 294 |
+
Assumptions 1 and 2 guarantee the existence for every $x_i \in \mathbb{R}^m$ of a set of constants $a^i_L$, $b^i_L$, $a^i_U$ and $b^i_U$ such that:
|
| 295 |
+
\begin{equation}\label{eq:lin_approx}
|
| 296 |
+
a_L^i + b_L^i \varphi_\Sigma \left( x, x_i \right) \leq \Sigma_{x,x_i} \leq a_U^i + b_U^i \varphi_\Sigma \left( x, x_i \right) \quad \forall x \in T.
|
| 297 |
+
\end{equation}
|
| 298 |
+
In fact, %
|
| 299 |
+
it follows from those that $\psi_\Sigma$ has a finite number of flex points.
|
| 300 |
+
Hence, we can iteratively find lower and upper approximation in convex and concave parts, and merge them together as detailed in the Supplementary Material. %
|
| 301 |
+
The key point is that, due to linearity, this upper and lower bound on the kernel can be propagated through the inference equations for Gaussian processes, so as to obtain lower and upper linear bounds on the a-posteriori mean and variance with respect to $\varphi_\Sigma$.
|
| 302 |
+
Thanks to assumption 3, these bounds can be solved for optimal points exactly, thus providing formal lower and upper values on optimization over a-posteriori mean and variance of the Gaussian process in $T$.
|
| 303 |
+
The described approach can be used to compute $\xi^{(i)}$, $K^{(i)}_{x^*}$ and $\sup_{x \in T}\mu^{o}(x^*,x)$ . In the following subsection we give details for the computation of $\sup_{x \in T}\mu^{o}$.
|
| 304 |
+
We refer to the Supplementary Materials for the details for the other constants and for squared-exponential and ReLU kernels.
|
| 305 |
+
\subsubsection{Mean Computation}
|
| 306 |
+
As $x^*$ is fixed, we have that $\sup_{x \in T}\mu^{o} = \bar{\mu}(x^*) - \inf_{x \in T} \bar{\mu}(x)$, hence we need just to compute $\inf_{x \in T} \bar{\mu}(x)$.
|
| 307 |
+
Using Eqn \eqref{eq:lin_approx} we can compute a lower and upper bound to this inferior, which can be refined using standard branch and bound techniques.
|
| 308 |
+
Let $t =\Sigma_{\mathcal{D},\mathcal{D}}^{-1}(\mathbf{y}-\mu_{\mathcal{D}})$, then by the inference formula for Gaussian processes and Eqn \eqref{eq:lin_approx} we have that:
|
| 309 |
+
\begin{align*}
|
| 310 |
+
\bar{\mu}(x) = \sum_{i = 1}^\tss t_i \Sigma_{x,x_i} \geq \sum_{i = 1}^\tss t_i \left( a^i + b^i \varphi_\Sigma \left( x, x_i \right) \right) \quad \forall x \in T
|
| 311 |
+
\end{align*}
|
| 312 |
+
where we choose: %
|
| 313 |
+
$
|
| 314 |
+
(a^i , b^i) = \begin{cases}
|
| 315 |
+
(a^i_L , b^i_L), & \text{if $t_i \geq 0$}.\\
|
| 316 |
+
(a^i_U , b^i_U), & \text{otherwise}.
|
| 317 |
+
\end{cases}.
|
| 318 |
+
$
|
| 319 |
+
Let $\bar{x}$ be an inferior point for $ x \in T$ to the right-hand side Equation (that can be computed thanks to Assumption 3, with $c_1 := t_i b^i $), then, by the definition of inferior we have that:
|
| 320 |
+
\begin{align*}
|
| 321 |
+
\bar{\mu}(\bar{x}) \geq \inf_{x \in T} \bar{\mu}(x) \geq \sum_{i = 1}^\tss t_i a_i + \sum_{i = 1}^\tss t_i b_i \varphi_\Sigma \left( \bar{x}, x_i \right).
|
| 322 |
+
\end{align*}
|
| 323 |
+
The latter provide bounds on $\inf_{x \in T} \bar{\mu}(x)$ that can be used within a branch and bound algorithm for further refinement. %
|
| 324 |
+
\subsection{Computational Complexity}
|
| 325 |
+
Performing inference with GPs has a cost that is $\mathcal{O}(\tss^3),$ where $\tss$ is the size of the dataset. Once inference has been performed the cost of computing upper and lower bounds for $\sup_{x \in T} \mu^{o,(i)}(x^*,x)$ is $\mathcal{O}(\tss C),$ where $C$ is a constant that depends on the particular kernel. For instance, for the squared-exponential kernel $C=1,$ while for the ReLU kernel (Eqn \eqref{KernelSquaredExponential}) $C=L,$ where $L$ is the number of layers of the corresponding neural network. The computation of the bounds for $\xi^{(i)}$ requires solving a convex {quadratic} problem in $m+\tss + 1$ variables, while $K^{(i)}_{x^*}$ and $\sup_{x_1,x_2 \in T}d_{x^*}^{(i)}(x_1,x_2)$ can be bounded in constant time. Refining the bounds with a branch and bound approach has a worst-case cost that is exponential in $m,$ the dimension of the input space.
|
| 326 |
+
Hence, sparse approximations, which mitigate the cost of performing inference with GP \cite{seeger2003fast}, are appealing.
|
| 327 |
+
\section{Experimental Evaluation: Robustness Analysis of Deep Neural Networks}
|
| 328 |
+
\begin{figure*}[!h]
|
| 329 |
+
\centering
|
| 330 |
+
\includegraphics[width = .5\textwidth, clip = on, trim = 0mm 50mm 0mm 0mm]{figures/legend_mnist-eps-converted-to.pdf}\\
|
| 331 |
+
\hspace*{2cm}{\includegraphics[ width = .15\textwidth]{figures/Figure1conFeatures.jpg}} \hfill{\includegraphics[width = .15\textwidth]{figures/Figure2conFeatures.jpg}} \hfill{\includegraphics[width = .15\textwidth]{figures/Figure3conFeatures.jpg}}\hspace*{1.3cm} \\
|
| 332 |
+
{\includegraphics[clip = on,trim = 0mm 0mm 15mm 0mm, width = .33\textwidth]{figures/mnist_1_2_05_eps_converted_to.pdf}} \hfill{\includegraphics[clip = on,trim = 0mm 0mm 15mm 0mm,width = .33\textwidth]{figures/mnist_2_2_05_eps_converted_to.pdf}} \hfill{\includegraphics[clip = on,trim = 0mm 0mm 15mm 0mm,width = .33\textwidth]{figures/mnist_4_2_05_eps_converted_to.pdf}} \\
|
| 333 |
+
{\includegraphics[clip = on,trim = 0mm 0mm 15mm 0mm,width = .33\textwidth]{figures/mnist_1_2_15_eps_converted_to.pdf}} \hfill{\includegraphics[clip = on,trim = 0mm 0mm 15mm 0mm,width = .33\textwidth]{figures/mnist_2_2_15_eps_converted_to.pdf}} \hfill{\includegraphics[clip = on,trim = 0mm 0mm 15mm 0mm,width = .33\textwidth]{figures/mnist_4_2_15_eps_converted_to.pdf}}
|
| 334 |
+
\caption{First row: three images randomly selected from the MNIST test set, along with detected SIFT features. Second row: respective $\hat{\phi}_1$ values for $\gamma = 0.05$. Third row: respective $\hat{\phi}_1$ values for $\gamma = 0.15$.
|
| 335 |
+
}
|
| 336 |
+
\label{fig:feat_analysis}
|
| 337 |
+
\end{figure*}
|
| 338 |
+
|
| 339 |
+
|
| 340 |
+
In this section we apply the methods presented above to GP defined with deep kernels, in an effort to provide a probabilistic %
|
| 341 |
+
analysis of adversarial examples.
|
| 342 |
+
This analysis is exact for GPs, but only approximate for fully-connected NNs,
|
| 343 |
+
by virtue of \textit{weak convergence} of the induced distributions between deep kernel GPs and deep fully-connected NNs.
|
| 344 |
+
\subsection{Experimental Setting}
|
| 345 |
+
We focus on GPs with ReLU kernel, which directly correspond to fully-connected NNs with ReLU activation functions.
|
| 346 |
+
Given the number of layers $L$, the regularization parameters $\sigma_w$ (prior variance on the weights) and $\sigma_b$ (prior variance on the bias), the ReLU covariance $\Sigma^L \left(x_1,x_2\right)$ between two input points is iteratively defined by the set of equations \cite{lee2017deep}:
|
| 347 |
+
\begin{align}
|
| 348 |
+
\nonumber
|
| 349 |
+
\Sigma^l(x_1,x_2) &= \sigma^2_b+\frac{\sigma^2_w}{2 \pi} \sqrt{\Sigma^{l-1}(x_1,x_1)\Sigma^{l-1}(x_2,x_2)} \nonumber \\
|
| 350 |
+
& \left( \sin \beta^{l-1}_{x_1,x_2} + (\pi - \beta^{l-1}_{x_1,x_2}) \cos \beta^{l-1}_{x_1,x_2} \right) \label{KernelSquaredExponential} \\
|
| 351 |
+
\beta^{l}_{x_1,x_2}&=\cos^{-1}\left( \frac{\Sigma^l(x_1,x_2)}{\sqrt{\Sigma^l(x_1,x_1)\Sigma^l(x_2,x_2)}} \right) \nonumber
|
| 352 |
+
\end{align}
|
| 353 |
+
for $l = 1,\ldots,L$, where $\Sigma^0(x_1,x_2) = \sigma^2_b+\frac{\sigma^2_w}{m} x_1 \cdot x_2$.%
|
| 354 |
+
\paragraph{Training} We follow the experimental setting of \cite{lee2017deep}, that is, we train a selection of ReLU GPs on a subset of the MNIST dataset using least-square classification (i.e. posing a regression problem to solve the classification task) and rely on optimal hyper-parameter values estimated in the latter work.
|
| 355 |
+
Note that the methods we presented are not constrained to specific kernels or classification models, and can be generalized by suitable modifications to the constant computation part. %
|
| 356 |
+
Classification accuracy obtained on the full MNIST test set varied between $77\%$ (by training only on 100 samples) to $95\%$ (training on 2000 samples).
|
| 357 |
+
Unless otherwise stated, we perform analysis on the best model obtained using $1000$ training samples, that is, a two-hidden-layer architecture with $\sigma_w^2 = 3.19$ and $\sigma_b^2 = 0.00$.
|
| 358 |
+
\paragraph{Analysis}
|
| 359 |
+
For scalability purposes we adopt the idea from %
|
| 360 |
+
\cite{wicker2018feature,ruan2018reachability} of performing a feature-level analysis.
|
| 361 |
+
Namely, we pre-process each image using SIFT \cite{lowe2004distinctive}.
|
| 362 |
+
From its output, we keep salient points and their relative magnitude, which we use to extract relevant patches from each image, in the following referred to as \textit{features}.
|
| 363 |
+
We apply the analysis to thus extracted features.
|
| 364 |
+
Unless otherwise stated, feature numbering follows the descending order of magnitude.
|
| 365 |
+
\begin{figure*}
|
| 366 |
+
\centering{\includegraphics[width = .3\textwidth]{figures/variance11_eps_converted_to.pdf}} \hfill{\includegraphics[width = .3\textwidth]{figures/variance12_eps_converted_to.pdf}} \hfill{\includegraphics[width = .3\textwidth]{figures/variance13_eps_converted_to.pdf}}
|
| 367 |
+
\caption{Normalized variance $\bar{\sigma}^2$ as a function of $L$ (number of layers of the corresponding NN) and $\vert D \vert$ (number of training point).}
|
| 368 |
+
\label{fig:VarianceNN}
|
| 369 |
+
\end{figure*}
|
| 370 |
+
\subsection{Feature-based Analysis}
|
| 371 |
+
In the first row of Figure \ref{fig:feat_analysis} we consider three images from the MNIST test data, and for each we highlight the first five features extracted by SIFT (or less if SIFT detected less than five features).
|
| 372 |
+
For each image $x_i$, feature $\mathrm{f}_j$ and $\gamma >0$ we consider the set of images $T^{\mathrm{f}_j,\gamma}_{x_i}$ given by the images differing from $x_i$ in only the pixels included in $\mathrm{f}_j$ and by no more than $\gamma$ for each pixel.
|
| 373 |
+
|
| 374 |
+
We plot the values obtained for $\hat{\phi}_1$ as a function of $\delta$ for $\gamma = 0.05$ and $\gamma = 0.15$, respectively, on the second and third row of Figure \ref{fig:feat_analysis}.
|
| 375 |
+
Recall that $\hat{\phi}_1$ represents an upper-bound on the probability of finding $x \in T^{\mathrm{f}_j,\gamma}_{x_i}$ such that the classification confidence for the correct class in $x$ drops by more than $\delta$ compared to that of $x_i$.
|
| 376 |
+
Since a greater $\gamma$ value implies a larger neighborhood $T^{\mathrm{f}_j,\gamma}_{x_i}$, intuitively $\hat{\phi}_1$ will monotonically increase along with the value of $\gamma$.
|
| 377 |
+
Interestingly, the rate of increase is significantly different for different features.
|
| 378 |
+
In fact, while most of the 14 features %
|
| 379 |
+
analyzed in Figure \ref{fig:feat_analysis} have similar $\hat{\phi}_1$ values for $\gamma = 0.05$, the values computed for %
|
| 380 |
+
some of the features using $\gamma = 0.15 $ are almost double (e.g.\ feature 4 for the third image), and remains fairly similar for others (e.g.\ feature 3 for the first image).
|
| 381 |
+
Also the relative ordering in robustness for different features is not consistent for different values of $\gamma$ (e.g.\ features 2 and 5 from the first image).
|
| 382 |
+
This highlights the need of performing parametric analysis of adversarial attacks, which take into account different strengths and misclassification thresholds, as suggested in \cite{biggio2017wild}.
|
| 383 |
+
Finally, notice that, though only 14 features are explored here, the experiment shows no clear relationship between feature magnitude as estimated by SIFT and feature robustness, which calls for caution in adversarial attacks and defences that rely on feature importance. {Note also that an empirical analysis of the robustness based on sampling, as performed in Figure \ref{fig:phi_all_run_ex}, becomes infeasible for this example as, in order to have good accuracy, a fine grid over a high-dimensional input space would be required. }
|
| 384 |
+
\subsection{Variance Analysis}
|
| 385 |
+
Most active defences are based upon rejecting input samples characterized by high uncertainty values.
|
| 386 |
+
After uncertainty is estimated, defences of this type usually proceed by setting a meta-learning problem whose goal is to distinguish between low and high variance input points, so as to flag potential adversarial examples \cite{grosse2017wrong,feinman2017detecting}.
|
| 387 |
+
However, mixed results are %
|
| 388 |
+
obtained with this approach \cite{carlini2017adversarial}.
|
| 389 |
+
|
| 390 |
+
In this subsection we aim at analyzing how the variance around test samples changes with different training settings for the three test points previously discussed.
|
| 391 |
+
We use the method developed for variance optimisation to compute:
|
| 392 |
+
$$
|
| 393 |
+
\bar{\sigma}^2 (x^*) = \frac{1}{ \bar{\Sigma}_{x^*,x^*} } \sup_{x \in T^{\mathrm{f}_1,\gamma}_{x^*}} \bar{\Sigma}_{x,x},
|
| 394 |
+
$$
|
| 395 |
+
that is, we look for the highest variance point in the $T^{\mathrm{f}_1,\gamma}_{x^*}$ neighbourhood of $x^*$, and normalise its value with respect to the variance at $x^*$.
|
| 396 |
+
We use $\gamma = 0.15$ and perform the analysis only on feature 1 of each image.
|
| 397 |
+
|
| 398 |
+
Figure \ref{fig:VarianceNN} plots values of $\bar{\sigma}^2 (x^*)$ as a function of the number of layers (from 1 to 10) and samples (from 100 to 2000) included in the training set.
|
| 399 |
+
Firstly, notice how maximum values of $\bar{\sigma}^2 (x^*)$ are perfectly aligned with the results of Figure \ref{fig:feat_analysis}. That is, less robust features are associated with higher values of $\bar{\sigma}^2 (x^*)$ (e.g.\ feature 1 for image 1).
|
| 400 |
+
This %
|
| 401 |
+
highlights
|
| 402 |
+
the relationship between the existence of adversarial examples in the neighbourhood of a point and model uncertainty.
|
| 403 |
+
We observe the normalised variance value to consistently monotonically increase with respect to the number of training samples used.
|
| 404 |
+
This suggests that, as more and more training samples are input into the training model, the latter become more confident in predicting ``natural'' test samples compared to ``artificial'' ones.
|
| 405 |
+
Unfortunately, as the number of layers increases, the value of $\bar{\sigma}^2 (x^*)$ decreases rapidly to a plateau.
|
| 406 |
+
This seems to point to the fact that defence methods based on a-posteriori variance thresholding become less %
|
| 407 |
+
effective with more complex neural network architectures, which could be a justification for the mixed results obtained so far using active defences.
|
| 408 |
+
\section{Conclusion}
|
| 409 |
+
In this paper we presented a formal approach for safety analysis of Bayesian inference with Gaussian process priors with respect to adversarial examples and invariance properties. As the properties considered in this paper cannot be computed exactly for general GPs, we compute their safe over-approximations. Our bounds are based on the Borell-TIS inequality and the Dudley entropy integral, which are known to give tight bounds for the study of suprema of Gaussian processes \cite{adler2009random}.
|
| 410 |
+
On examples %
|
| 411 |
+
of regression tasks for GPs and deep neural networks, we showed how our results allow one to quantify the uncertainty associated to a given prediction, also taking into account of local perturbations of the input space.
|
| 412 |
+
Hence, we believe our results represent a step towards the application of Bayesian models in safety-critical applications.
|
| 413 |
+
|
| 414 |
+
|
| 415 |
+
|
| 416 |
+
|
| 417 |
+
\bibliographystyle{aaai}
|
| 418 |
+
|
| 419 |
+
\bibliography{main.bib}
|
| 420 |
+
\newpage
|
| 421 |
+
\appendix
|
| 422 |
+
|
| 423 |
+
\onecolumn
|
| 424 |
+
\section{Supplementary Materials}
|
| 425 |
+
In what follows we report the supplementary material of the paper. We first report the proofs of the main results and then give further details of the algorithmic framework we develop to compute the constants required in Theorem \ref{BoundsSIngleBoundedVariation} and \ref{Theorem-Invariance}.
|
| 426 |
+
Finally, we give details for the case of the squared-exponential kernel and ReLu kernel.
|
| 427 |
+
\section*{Proofs}
|
| 428 |
+
\label{Appendix:Proofs}
|
| 429 |
+
|
| 430 |
+
\paragraph{\textbf{Proof of Theorem \ref{BoundsSIngleBoundedVariation}}}
|
| 431 |
+
\begin{align*}
|
| 432 |
+
& P( \exists x \in T\, s.t.\, \big( \GP^{(i)}(x^*)-\GP^{(i)}(x)>\delta \, | \, \mathcal{D}\big)\\ & \quad \quad \text{(By definition of supremum)}\\
|
| 433 |
+
=&P\big( \sup_{x \in T}\, \GP^{o,(i)}(x^*, x)>\delta \big)\\ & \quad \quad \text{(By linearity of GPs)}\\
|
| 434 |
+
=&P\big( \sup_{x \in T}\,\hat \GP^{o,(i)}(x^*, x) + \mathbb{E}[\GP^{o,(i)}(x^*, x)]>\delta \big)\\ & \quad \quad \text{(By definition of supremum)}\\
|
| 435 |
+
\leq &P\big( \sup_{x \in T}\, \hat \GP^{o,(i)}(x^*, x) >\delta- sup_{x_1 \in T}\mathbb{E}[\GP^{o,(i)}( x^*,x_1)] \big).
|
| 436 |
+
\end{align*}
|
| 437 |
+
where $\hat \GP^{o,(i)}(x^*, x)$ is the zero mean Gaussian process with same variance of $\GP^{o,(i)}(x^*, x).$
|
| 438 |
+
The last inequality can be bound from above using the following inequality, called Borell-TIS inequality \cite{adler2009random}.
|
| 439 |
+
|
| 440 |
+
\begin{theorem}{(Borell-TIS inequality)}\label{BorellInequalityTheorem}
|
| 441 |
+
Let $\hat \GP$ a zero-mean unidimensional Gaussian process with covariance matrix $\Sigma$. Assume $E[sup_{x\in T}\hat \GP(x)]<\infty$. Then, for any $u>\mathbb{E}[sup_{x\in T}\hat \GP(x)]$ it holds that
|
| 442 |
+
\begin{align}\label{BorellInequalityEquation}
|
| 443 |
+
P(sup_{x\in T}\hat \GP(x)>u)\leq e^{\frac{(u-\mathbb{E}[sup_{t\in T}\hat \GP(x)])^2}{2 \sigma_T^2}},
|
| 444 |
+
\end{align}
|
| 445 |
+
where $\sigma_T^2=sup_{x\in T}\Sigma (x)$.
|
| 446 |
+
\end{theorem}
|
| 447 |
+
\noindent
|
| 448 |
+
In order to use the Borell-TIS inequality we need to bound from above $\mathbb{E}[sup_{t\in T}\hat \GP(x)]$, the expectation of the supremum of $\hat \GP$. For Gaussian processes we can use the Dudley's entropy integral \cite{adler2009random}, which guarantees that
|
| 449 |
+
\begin{align*}
|
| 450 |
+
\mathbb{E}[\sup_{x\in T}&\, \hat \GP(x)]\leq 12 \int_{0}^{sup_{x_1,x_2 \in T} d(x_1,x_2)} \sqrt{ln(N(d,x,T))} dx,
|
| 451 |
+
\end{align*}
|
| 452 |
+
where $N(d,x,T)$ is the smallest number of balls of radius $x$ according to metric $d$ that completely cover $T$ (see \cite{adler2009random} for further details).
|
| 453 |
+
For a hyper-cube $T$ of dimension $D$, in order to compute $N(d,x,T),$ we first need to compute $N(L_2,r,T) $, the number of covering balls of diameter $r$ of $T$ under $L_2$ norm. As the largest hyper-cube contained inside a $m-$sphere of diameter $r$ has a side of length $\frac{r}{\sqrt{m}},$ we obtain
|
| 454 |
+
|
| 455 |
+
$$ N(L_2,r,T) \leq \big( 1 + \frac{D \sqrt{m}}{r}\big)^m . $$
|
| 456 |
+
\noindent
|
| 457 |
+
Now we know that for $x^* \in T$
|
| 458 |
+
$$sup_{x_1,x_2 \in T} d^{(i)}_{x^*}(x_2,x_1) \leq K_{\hat x}^{(i)} \vert \vert x_2-x_1 \vert \vert_2,$$
|
| 459 |
+
Thus, this implies that
|
| 460 |
+
all the points inside a ball of radius $r=\frac{x}{K_{\hat x}^{(i)}}$ will have a distance in the d metric smaller or equal than $x$.
|
| 461 |
+
Thus, the number of covering balls of radius $x$ for $T$, according to pseudo-metric $d$ is upper-bounded by
|
| 462 |
+
$$ N(d,x,T) \leq \big( \frac{\sqrt{m} D K_{\hat x}^{(i)}}{x} +1 \big)^m. $$
|
| 463 |
+
|
| 464 |
+
|
| 465 |
+
|
| 466 |
+
|
| 467 |
+
\paragraph{\textbf{Proof of Theorem \ref{Theorem-Invariance}}}
|
| 468 |
+
|
| 469 |
+
|
| 470 |
+
\begin{align*}
|
| 471 |
+
& P( \exists x \in T\, s.t.\, \vert \vert \GP(x^*)-\GP(x) \vert \vert_1>\delta \, | \, \mathcal{D} \big)\\ & \quad \quad \text{(By definition of supremum)}\\
|
| 472 |
+
=&P\big( \sup_{x \in T}\, \vert \vert \GP^{o}(x^*, x) \vert \vert_1>\delta \big)\\ & \quad \quad \text{(By definition of $L_1$ norm)}\\
|
| 473 |
+
= &P\big( \sup_{x \in T}\, \sum_{i=1}^n| \GP^{o,(i)}(x^*, x)|>\delta \big)\\ & \quad \quad \text{(By closure of GPs wrt linear operations)}\\
|
| 474 |
+
\leq &P\big( \sup_{x \in T}\, \sum_{i=1}^n| \hat\GP^{o,(i)}(x^*, x)|>\delta- sup_{x_1 \in T}\vert \vert\mu^{o}(x_1, x^*) \vert \vert_1 \big)\\ & \quad \quad \text{(By the fact that $\forall i \in \{1,...,n \} | \hat \GP^{(i)}(x)-\hat \GP^{(i)}(x^*)|\geq 0 $)}\\
|
| 475 |
+
\leq &P\big( \vee_{i \in \{1,...,n \}} \sup_{x \in T}\, | \hat \GP^{o,(i)}(x^*, x)|> \frac{\delta- sup_{x_1 \in T}\vert \vert\mu^{o}(x_1, x^*) \vert \vert_1}{n} \big) \\ & \quad \quad \text{(By the union bound and symmetric properties of Gaussian distributions)}\\
|
| 476 |
+
\leq &2 \sum_{i=1}^n P\big( \sup_{x \in T}\, \hat \GP^{o,(i)}(x,x^*)>\frac{\delta- sup_{x_1 \in T}\vert \vert\mu^{o}(x_1, x^*) \vert \vert_1}{n} \big)\\.
|
| 477 |
+
\end{align*}
|
| 478 |
+
Last term can be bounded by using the Borell-TIS inequality and Dudley's entropy integral, as shown in the proof of Theorem \ref{BoundsSIngleBoundedVariation}.
|
| 479 |
+
\section{Constants Computation}
|
| 480 |
+
\label{Appendix:ConstantComputation}
|
| 481 |
+
\subsection{Lower and Upper bound to Kernel Function}
|
| 482 |
+
In this subsection we describe a method for computing lower and linear approximation to the kernel function.
|
| 483 |
+
Namely, given $x \in T$ and $x^* \in \mathbb{R}^m$, in this we show how to compute $a_L$, $b_L$ such that:
|
| 484 |
+
$$
|
| 485 |
+
a_L + b_L \varphi_\Sigma \left( x, x^* \right) \leq \Sigma_{x,x^*} \quad \forall x \in T.
|
| 486 |
+
$$
|
| 487 |
+
Notice that the same techniques can be used to find $a_U$ and $b_U$ coefficients of an upper-bound, simply by considering $-\Sigma_{x,x^*}$.
|
| 488 |
+
Let $\varphi_\Sigma^L$ and $\varphi_\Sigma^U$ be maximum and minimum values of $\varphi_\Sigma(x,x^*)$ for $x \in T$, and consider the univariate and unidimensional function $\psi_\Sigma (\varphi_\Sigma) : [\varphi_\Sigma^L, \varphi_\Sigma^U ] \rightarrow \mathbb{R} $.
|
| 489 |
+
We can then compute $a_L$ and $b_L$ by using the methods described below.
|
| 490 |
+
\paragraph{Case 1}
|
| 491 |
+
If $\psi_\Sigma$ happens to be concave function, than by definition of concave function, a lower bound is given by the line that links the points $(\varphi_\Sigma^L,\psi_\Sigma (\varphi_\Sigma^L) )$ and $(\varphi_\Sigma^U,\psi_\Sigma (\varphi_\Sigma^U) )$.
|
| 492 |
+
\paragraph{Case 2}
|
| 493 |
+
If on the other hand $\psi_\Sigma$ happens to be a convex function, than by definition of convex function, a valid lower bound is given by the tangent line in the middle point $(\varphi_\Sigma^L + \varphi_\Sigma^L)/2$ of the interval.
|
| 494 |
+
\paragraph{Case 3}
|
| 495 |
+
Assume now, that $\psi_\Sigma$ is concave in $[\varphi_\Sigma^L, \varphi_\Sigma^C ]$, and convex in $ [\varphi_\Sigma^C, \varphi_\Sigma^U ]$, for a certain $\varphi_\Sigma^C \in [\varphi_\Sigma^L, \varphi_\Sigma^U ]$ (the same line of arguments can be used by reversing convexity and concavity). Let $a_L^1$, $b_L^1$ coefficients for linear lower approximation in $[\varphi_\Sigma^L, \varphi_\Sigma^C ]$ and $a_L^2$, $b_L^2$ analogous coefficients in $[\varphi_\Sigma^C, \varphi_\Sigma^U ]$ (respectively computed as for Case 1 and 2), and call $f_1$ and $f_2$ the corresponding functions.
|
| 496 |
+
Define $F$ to be the linear function of coefficients $a_L$ and $b_L$ that goes through the two points $(\varphi_\Sigma^L , \min(f_1(\varphi_\Sigma^L),f_2(\varphi_\Sigma^L) ) )$ and $(\varphi_\Sigma^U, f_2(\varphi_\Sigma^U))$.
|
| 497 |
+
We then have that $F$ is a valid linear lower bound in $[\varphi_\Sigma^L, \varphi_\Sigma^U ]$ in fact:
|
| 498 |
+
\begin{enumerate}
|
| 499 |
+
\item if $f_1(\varphi_\Sigma^L) = \min(f_1(\varphi_\Sigma^L),f_2(\varphi_\Sigma^L)$: in this case we have that $F(\varphi_\Sigma^L) = f_1(\varphi_\Sigma^L) \leq f_2(\varphi_\Sigma^L) $, and $F(\varphi_\Sigma^U) = f_2(\varphi_\Sigma^U)$. Hence $F(\varphi_\Sigma) \leq f_2(\varphi_\Sigma)$ in $[\varphi_\Sigma^L,\varphi_\Sigma^U]$, in particular in $[\varphi_\Sigma^C,\varphi_\Sigma^U]$ as well. This also implies that $F(\varphi_\Sigma^C) \leq f_2(\varphi_\Sigma^C) \leq f_1(\varphi_\Sigma^C)$. On the other hand, $F(\varphi_\Sigma^L) = f_1(\varphi_\Sigma^L)$, hence $F(\varphi_\Sigma) \leq f_1(\varphi_\Sigma)$ in $[\varphi_\Sigma^l,\varphi_\Sigma^C]$. Combining these two results and for contrsuction of $f_1$ and $f_2$ we have that $F(\varphi_\Sigma) \leq \psi_\Sigma(\varphi_\Sigma)$ in $[\varphi_\Sigma^L,\varphi_\Sigma^U]$.
|
| 500 |
+
\item if $f_2(\varphi_\Sigma^L) = \min(f_1(\varphi_\Sigma^L),f_2(\varphi_\Sigma^L)$: In this case we have $F = f_2$, we just have to show that $F(\varphi_\Sigma) \leq f_1(\varphi_\Sigma)$ in $[\varphi_\Sigma^L,\varphi_\Sigma^C]$. This immediately follow noticing that $f_2(\varphi_\Sigma^C) \leq f_1(\varphi_\Sigma^C)$ and $f_2(\varphi_\Sigma^L) \leq f_1(\varphi_\Sigma^L)$.
|
| 501 |
+
\end{enumerate}
|
| 502 |
+
|
| 503 |
+
\paragraph{Case 4}
|
| 504 |
+
In the general case, assuming to have a finite number of flex points, we can divide the interval $[\varphi_\Sigma^L, \varphi_\Sigma^U ]$ in subintervals in which $\psi_\Sigma$ is either convex or concave.
|
| 505 |
+
We can then proceed iteratively from the two left-most intervals by repeatedly applying case 3.
|
| 506 |
+
\subsection{Variance}
|
| 507 |
+
In this subsection we show how to compute lower and upper bound on $\xi^{(i)} = \sup_{x \in T} \Sigma_{x^*,x}^{o,(i,i)}$.
|
| 508 |
+
Though a similar approach to that used for the mean can be used to compute analytic bound on the variance, empirically a convex relaxation of the problem is more efficient.
|
| 509 |
+
By definition of $\Sigma_{x^*,x}^{o,(i,i)}$ and applying the GP inference equations, we have that:
|
| 510 |
+
\begin{align*}
|
| 511 |
+
\Sigma_{x^*,x}^{o,(i,i)} = \left( \Sigma_{x^*,x^*} + \Sigma_{x,x} - 2 \Sigma_{x,x^*} \right) - ( \Sigma_{x^*,\mathcal{D}} \Sigma^{-1}_{\mathcal{D},\mathcal{D}} \Sigma_{x^*,\mathcal{D}}^T + \Sigma_{x,\mathcal{D}} \Sigma^{-1}_{\mathcal{D},\mathcal{D}} \Sigma_{x,\mathcal{D}}^T - 2 \Sigma_{x^*,\mathcal{D}} \Sigma^{-1}_{\mathcal{D},\mathcal{D}} \Sigma_{x,\mathcal{D}}^T).
|
| 512 |
+
\end{align*}
|
| 513 |
+
As such, the computation of $\xi$ boils down to the computation of:
|
| 514 |
+
\begin{align}\label{eq:prob_xi_inf}
|
| 515 |
+
\inf_{x \in T} \left(\Sigma_{x,\mathcal{D}} \Sigma^{-1}_{\mathcal{D},\mathcal{D}} \Sigma_{x,\mathcal{D}}^T + 2 \Sigma_{x,x^*} - 2 \Sigma_{x^*,\mathcal{D}} \Sigma^{-1}_{\mathcal{D},\mathcal{D}} \Sigma_{x,\mathcal{D}}^T \right)
|
| 516 |
+
\end{align}
|
| 517 |
+
as all the other terms involved in the optimization are constant with respect to $x$.
|
| 518 |
+
The approach is based on a quadratic convexification of the above problem, which can hence be solved by standard optimisation methods.
|
| 519 |
+
By defining the slack variable vector $r = \Sigma_{x,\mathcal{D}} = \left(\Sigma_{x,x_1}, \Sigma_{x,x_2}, \ldots ,\Sigma_{x,x_{\vert \mathcal{D} \vert}} \right) $ of covariances between point $x$ and points included in the training set, and $r^* = \Sigma_{x,x^*}$ of covariance between $x$ and the test sample $x^*$, we can rewrite the optimization Problem \ref{eq:prob_xi_inf} as:
|
| 520 |
+
\begin{align*}
|
| 521 |
+
&\inf_{x \in T} \left( r \Sigma^{-1}_{\mathcal{D},\mathcal{D}} r^T + 2 r^* - 2 \Sigma_{x^*,\mathcal{D}} \Sigma^{-1}_{\mathcal{D},\mathcal{D}} r^T \right) \\
|
| 522 |
+
&\textrm{subject to: } \quad r_l = \Sigma_{x,x_l} \quad l = 1,\ldots, \vert \mathcal{D} \vert \\
|
| 523 |
+
& \qquad \qquad \quad \; \, r_* = \Sigma_{x,x_*}.
|
| 524 |
+
\end{align*}
|
| 525 |
+
Notice that the objective function of the problem is convex with respect to the variable vector $(x,r,r^*)$, since $\Sigma^{-1}_{\mathcal{D},\mathcal{D}}$ is symmetric and positive definite.
|
| 526 |
+
Notice that the constraints of the problem are still generally non-convex, but can be over-approximated using the methods presented in \cite{jones1998efficient}.
|
| 527 |
+
This lead to the definition of a convex problem on the variable vector $(x,r,r^*)$, that can be solved to compute lower and upper bound on $\xi^{(i)}$.
|
| 528 |
+
\subsection{Bounds on $\sup_{x_1,x_2 \in T} d^{(i)}_{x^*} (x_1,x_2)$}
|
| 529 |
+
An upper bound to $\sup_{x_1,x_2 \in T} d^{(i)}_{x^*} (x_1,x_2)$ follows directly from the computation of $\xi^{(i)}$.
|
| 530 |
+
By the fact that $d^{(i)}_{x^*}$ is a pseudometric, it follows that for every $x_1$ and $x_2$ in $T$:
|
| 531 |
+
$$
|
| 532 |
+
d^{(i)}_{x^*} (x_1,x_2) \leq d^{(i)}_{x^*} (x^*,x_1) + d^{(i)}_{x^*} (x^*,x_2)
|
| 533 |
+
$$
|
| 534 |
+
hence:
|
| 535 |
+
$$
|
| 536 |
+
\sup_{x_1,x_2 \in T} d^{(i)}_{x^*} (x_1,x_2) \leq \sup_{x_1,x_2 \in T} \left( d^{(i)}_{x^*} (x^*,x_1) + d^{(i)}_{x^*} (x^*,x_2)\right) = \sup_{x_1 \in T} d^{(i)}_{x^*} (x^*,x_1) + \sup_{x_2 \in T} d^{(i)}_{x^*} (x^*,x_2) = 2 \xi^{(i)}.
|
| 537 |
+
$$
|
| 538 |
+
\subsection{Bounds on $K^{(i)}_{x^*}$}
|
| 539 |
+
In this subsection we describe how to over approximate $K^{(i)}_{x^*}$.
|
| 540 |
+
Recall that for $x^*,x_1,x_2 \in \mathbb{R}^m$ we work with the pseudo-norm $d^{(i)}_{x^*}(x_1,x_2)$ defined as in Eqn \eqref{Eqn:dNormdefinition} and for $i\in \{1,...,m \}$ need to find a constant $K^{(i)}$ such that
|
| 541 |
+
$$ d^{(i)}_{x^*}(x_1,x_2)\leq K^{(i)}_{x^*} ||x_1-x_2||_2.$$
|
| 542 |
+
In order to simplify our task we can derive over approximations of $K^{(i)}$ by working only with the priors distributions. In fact, it is easy to show that
|
| 543 |
+
\begin{align*}
|
| 544 |
+
d^{(i)}(x_1,x_2)=&\sqrt{ \Sigma_{x_1,x_1}^{o,(i,i)} + \Sigma_{x_2,x_2}^{o,(i,i)} - 2 \Sigma_{x_1,x_2}^{o,(i,i)} }\\=
|
| 545 |
+
&\sqrt{ \Sigma_{x_1,x_1}^{(i,i)} + \Sigma_{x_2,x_2}^{{(i,i)}} - 2 \Sigma_{x_1,x_2}^{(i,i)} - (\Sigma_{x_1,\mathcal{D}}^{(i,i),T}\Sigma_{\mathcal{D}}^{-1}\Sigma_{x_1,\mathcal{D}}^{(i,i)} + (\Sigma_{x_2,\mathcal{D}}^{(i,i)})^T\Sigma_{\mathcal{D}}^{-1}\Sigma_{x_2,\mathcal{D}}^{(i,i)} - 2 (\Sigma_{x_1,\mathcal{D}}^{(i,i)})^T\Sigma_{\mathcal{D}}^{-1}\Sigma_{x_2,\mathcal{D}}^{(i,i)} ) }\\
|
| 546 |
+
\leq& \sqrt{ \Sigma_{x_1,x_1}^{(i,i)} + \Sigma_{x_2,x_2}^{{(i,i)}} - 2 \Sigma_{x_1,x_2}^{(i,i)}},
|
| 547 |
+
\end{align*}
|
| 548 |
+
where the last inequality follows from the fact that $\Sigma_{\mathcal{D}}^{-1}$ is symmetric and positive definite. Thus, to get over-approximations of $K^{(i)}_{x^*}$, it is enough to consider consider only the prior distributions of the system. Note also that if $m=1$, then over-approximations can be simply obtained using the mean value theorem.
|
| 549 |
+
\section{Squared-Exponential Kernel}
|
| 550 |
+
\label{Appendix:ExponentialKernel}
|
| 551 |
+
In this Section we provide constant computation details for squared-exponential kernel.
|
| 552 |
+
\subsection{Definition of $\varphi_\Sigma$ and $\psi_\Sigma$}
|
| 553 |
+
According to the squared-exponential kernel we have $$\Sigma_{x_1,x_2}=\sigma^2 \exp \left(-\sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2 \right). $$
|
| 554 |
+
By defining:
|
| 555 |
+
\begin{align*}
|
| 556 |
+
\varphi_\Sigma(x_1,x_2) &= \sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2 \\
|
| 557 |
+
\psi_\Sigma(\varphi_\Sigma) &= \sigma^2 \exp{ \left( - \varphi_\Sigma(x_1,x_2) \right) }
|
| 558 |
+
\end{align*}
|
| 559 |
+
we have that $\Sigma_{x_1,x_2} = \psi_\Sigma(\varphi_\Sigma \left(x_1,x_2\right)) $, and $\varphi_\Sigma$ and $\psi_\Sigma$ satisfy the assumptions 1 to 3 stated in the main text (Section Constant Computation).
|
| 560 |
+
\subsection{Computation of $K^{(i)}_{x^*}$}
|
| 561 |
+
Relying only on the prior, we have
|
| 562 |
+
\begin{align*}
|
| 563 |
+
\frac{ d^{(i)}(x_1,x_2)}{|x_1-x_2|_2}&\leq \frac{\sqrt{2 \sigma^2(1 - exp(-\sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2 )) } }{||x_1 - x_2||_2}.
|
| 564 |
+
\end{align*}
|
| 565 |
+
|
| 566 |
+
Without any lost of generality, we assume $\forall j \in {1,...,m}, \, 0\leq \theta_j \leq 1$
|
| 567 |
+
and that $x_1,x_2$ are such that for each $j \in \{1,...,m \}$ $0\leq x_1^{(j)} \leq 1, 0\leq x_2^{(j)} \leq 1. $ Then
|
| 568 |
+
.
|
| 569 |
+
|
| 570 |
+
\begin{align*}
|
| 571 |
+
\frac{ ( d^{(i)}(x_1,x_2))^2}{|x_1-x_2|_2}& \leq \frac{{2 \sigma^2(1 - exp(-\sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2 )) } }{ { \sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2 }}
|
| 572 |
+
\end{align*}
|
| 573 |
+
|
| 574 |
+
|
| 575 |
+
Now we can introduce the variable $r=\sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2$ and we obtain
|
| 576 |
+
\begin{align*}
|
| 577 |
+
\frac{ (d^{(i)}(x_1,x_2))^2}{||x_1-x_2||_2}\leq& \frac{{2 \sigma^2 (1-exp(-r)) }}{r}
|
| 578 |
+
\end{align*}
|
| 579 |
+
As everything is positive and the square root is a monotonic function we obtain:
|
| 580 |
+
\begin{align*}
|
| 581 |
+
\bar K_{\bar{x}}^{(i)}\leq \sqrt{\sup_{r \in [0, ub ]} \frac{{2 \sigma^2 (1-exp(-r)) }}{r}}=\sqrt{2 \sigma^2}=\sqrt{2}\sigma
|
| 582 |
+
\end{align*}
|
| 583 |
+
where $ub = sup_{x_1,x_2 \in T} \sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2$.
|
| 584 |
+
\section{ReLu Kernel}
|
| 585 |
+
\label{Appendix:ReLu}
|
| 586 |
+
In this Section we provide constant computation details for the ReLU kernel.
|
| 587 |
+
For simplicity we focus the discussion on a single layer ReLU kernel, and notice that by the recursion of the kernel definition with more than one hidden layer, the results here presented are generalisable to an arbitrary number of layers.
|
| 588 |
+
\subsection{Definition of $\varphi_\Sigma$ and $\psi_\Sigma$}
|
| 589 |
+
By following the kernel computation procedure outlined by \cite{lee2017deep}, we pre-process each input point to have norm one before inputting it into the GP.
|
| 590 |
+
By doing this the one-layer ReLU kernel simplifies to:
|
| 591 |
+
\begin{equation*}
|
| 592 |
+
\Sigma_{x_1,x_2} = \sigma_b^2 + \frac{\sigma_w^2}{2\pi} \left( \sigma_b^2 + \frac{\sigma_w^2}{m} \right) \left( \sin{ \left( \cos^{-1}{ \frac{\sigma_b^2 + \frac{\sigma_w^2}{m} (x_1 \cdot x_2) }{\sigma_b^2 + \frac{\sigma_w^2}{m}} } \right)} + \frac{\sigma_b^2 + \frac{\sigma_w^2}{m} (x_1 \cdot x_2) }{\sigma_b^2 + \frac{\sigma_w^2}{m}} \left( \pi - \cos^{-1}{\frac{\sigma_b^2 + \frac{\sigma_w^2}{m} (x_1 \cdot x_2) }{\sigma_b^2 + \frac{\sigma_w^2}{m}}} \right) \right).
|
| 593 |
+
\end{equation*}
|
| 594 |
+
we define:
|
| 595 |
+
\begin{align*}
|
| 596 |
+
\varphi_\Sigma (x_1 , x_2) &= k_1 + k_2 (x_1 \cdot x_2) \\
|
| 597 |
+
\psi_\Sigma(\varphi_\Sigma) &= \sigma_b^2 + \frac{\sigma_w^2}{2\pi} \left( \sigma_b^2 + \frac{\sigma_w^2}{m} \right) \left( \sin{ \left( \cos^{-1}{\varphi_\Sigma (x_1 , x_2)} \right)} + \varphi_\Sigma (x_1 , x_2) \left( \pi - \cos^{-1}{\varphi_\Sigma (x_1 , x_2)} \right) \right).
|
| 598 |
+
\end{align*}
|
| 599 |
+
where:
|
| 600 |
+
\begin{align*}
|
| 601 |
+
k_1 = \frac{\sigma_b^2}{\sigma_b^2 + \frac{\sigma_w^2}{m}} \qquad \qquad \textrm{and} \qquad \qquad
|
| 602 |
+
k_2 = \frac{\frac{\sigma_w^2}{m}}{\sigma_b^2 + \frac{\sigma_w^2}{m}}.
|
| 603 |
+
\end{align*}
|
| 604 |
+
Due to smoothness of trigonometric functions it is easy to see that this decomposition of the kernel satisfy assumptions 1--2 stated in the main text (Section Constants Computation).
|
| 605 |
+
We also have that, thanks to the linearity of the dot product, for every $c_i$ and $x_i$
|
| 606 |
+
$$
|
| 607 |
+
\sum_{i = 1}^\tss c_i \varphi_\Sigma (x, x_i) = k_1 \left( \sum_{i = 1}^\tss c_i - 1 \right) + \varphi_\Sigma \left( x , \sum_{i = 1}^\tss c_i x_i \right).
|
| 608 |
+
$$
|
| 609 |
+
Hence the computation of the superior defined in Assumption 3, boils down to the trivial computation of the maximum of a dot product.
|
| 610 |
+
\subsection{Computation of $K^{(i)}_{x^*}$}
|
| 611 |
+
By taking into consideration only the priors, and by paramterising the kernel using the $\alpha = \cos^{-1} x_1 \cdot x_2$, we obtain a 1-dimensional form for $d^{(i)}(x_1,x_2))^2$ from which we can directly compute an overapproximation of $K^{(i)}_{x^*}$, as outlined in the previous sections
|
| 612 |
+
\section{{Kernel Functions Decomposition}}
|
| 613 |
+
\label{Appendix:decomposition}
|
| 614 |
+
{We provide decomposition of commonly used kernel functions that satisfy Assumptions 1,2 and 3 stated in the main text.
|
| 615 |
+
\\
|
| 616 |
+
\textbf{Rational Quadratic Kernel} defined as:
|
| 617 |
+
\begin{equation*}
|
| 618 |
+
\Sigma_{x_1,x_2} = \sigma^2 \left( 1 + \frac{1}{2} \sum_{j = 1}^{m} \theta_j \left( x_1^{(j)} - x_2^{(j)} \right)^2 \right)^{-\alpha}
|
| 619 |
+
\end{equation*}
|
| 620 |
+
with hyper-parameters $\sigma$, $\alpha$ and $\theta_j$, for $j=1,\ldots,m$.
|
| 621 |
+
\\
|
| 622 |
+
\textbf{Linear Kernel} defined as:
|
| 623 |
+
\begin{equation*}
|
| 624 |
+
\Sigma_{x_1,x_2} = \sigma^2 \sum_{j = 1}^{m}(x_1^{(j)}-\theta_j)(x_2^{(j)}-\theta_j)
|
| 625 |
+
\end{equation*}
|
| 626 |
+
with hyper-parameters $\sigma$ and $\theta_j$, for $j=1,\ldots,m$.
|
| 627 |
+
\\
|
| 628 |
+
\textbf{Periodic Kernel} defined as:
|
| 629 |
+
\begin{equation*}
|
| 630 |
+
\Sigma_{x_1,x_2} = \sigma^2 \exp{\left( - \frac{1}{2} \sum_{j = 1}^{m}\theta_j \sin \left( p_j(x_1^{(j)}-x_2^{(j)}) \right) ^2\right)}
|
| 631 |
+
\end{equation*}
|
| 632 |
+
with hyper-parameters $\sigma$, $\theta_j$ and $p_j$ for $j=1,\ldots,m$.
|
| 633 |
+
\\
|
| 634 |
+
\textbf{Mat\'ern Kernel} for half-integers values, defined as:
|
| 635 |
+
\begin{equation*}
|
| 636 |
+
\Sigma_{x_1,x_2} = \sigma^2 k_{p} \exp{\left(-\sqrt{\hat{k}_p\sum_{j = 1}^{m} \theta_j (x_1^{(j)} - x_2^{(j)}) }\right)} \sum_{l = 0}^{p}k_{l,p} \sqrt{ \hat{k}_p\sum_{j = 1}^{m} \theta_j (x_1^{(j)} - x_2^{(j)}) }^{p-l}
|
| 637 |
+
\end{equation*}
|
| 638 |
+
with hyper-parameters $\sigma$, $\theta_j$, for $j=1,\ldots,m$, and (integer valued) $p$; while $k_{p}$, $\hat{k}_p$ and $k_{l,p}$ are constants.
|
| 639 |
+
|
| 640 |
+
Table \ref{tab:decomposition} shows decompositions for the kernels listed above that satisfy Assumptions 1,2 and 3.
|
| 641 |
+
Specifically, for the periodic kernel Assumption 3 is not strictly satisfied as it is equivalent to the computation of:
|
| 642 |
+
\begin{equation*}
|
| 643 |
+
\sup_{x \in T} \sum_{i = 1}^\tss c_i \sum_{j = 1}^{m}\theta_j \sin(p_j(x^{(j)}-x_i^{(j)}))^2.
|
| 644 |
+
\end{equation*}
|
| 645 |
+
Each summand separately can be trivially optimized; summing together the individual optima provides a sound over-approximation of the $\sup$.
|
| 646 |
+
As such, the decomposition will provide formal lower and upper bounds that can be used for branch and bound, though in general those will be looser requiring an increased number of iterations in practice.
|
| 647 |
+
}
|
| 648 |
+
\begin{table}[h]
|
| 649 |
+
\centering{
|
| 650 |
+
\begin{tabular}{l||c|c}
|
| 651 |
+
Kernel & $\psi_\Sigma (\varphi_\Sigma)$ & $\varphi_\Sigma (x_1,x_2)$ \\ \hline \hline
|
| 652 |
+
Squared Exponential & $\sigma^2 \exp{ \left( - \varphi_\Sigma(x_1,x_2) \right) }$ & $\sum_{j=1}^m \theta_j (x_1^{(j)} -x_2^{(j)})^2$ \\ \hline
|
| 653 |
+
\multirow{2}{*}{ReLU} & $\sigma_b^2 + \frac{\sigma_w^2}{2\pi} \left( \sigma_b^2 + \frac{\sigma_w^2}{m} \right) \big( \sin{ \left( \cos^{-1}{\varphi_\Sigma (x_1 , x_2)} \right)} + $ & \multirow{2}{*}{$ k_1 + k_2 (x_1 \cdot x_2) $} \\
|
| 654 |
+
& $ + \varphi_\Sigma (x_1 , x_2) \left( \pi - \cos^{-1}{\varphi_\Sigma (x_1 , x_2)} \right) \big)$ & \\ \hline
|
| 655 |
+
Rational Quadratic & $\sigma^2(1+\frac{\varphi_\Sigma}{2})^{-\alpha} $ & $\sum_{j = 1}^{m} \theta_j(x_1^{(j)}-x_2^{(j)})^2$ \\ \hline
|
| 656 |
+
Linear & $\sigma^2\varphi_\Sigma$ & $\sum_{j = 1}^{m}(x_1^{(j)}-\theta_j)(x_2^{(j)}-\theta_j)$ \\ \hline
|
| 657 |
+
Periodic & $\sigma^2 \exp(-0.5\varphi_\Sigma)$ & $\sum_{j = 1}^{m}\theta_j \sin(p_j(x_1^{(j)}-x_2^{(j)}))^2$ \\ \hline
|
| 658 |
+
Mat\'ern & $\sigma^2 k_{p} \exp{(-\sqrt{\varphi_\Sigma})}\sum_{l = 0}^{p}k_{l,p} \sqrt{\varphi_\Sigma^{p-l}}$ & $\hat{k}_p\sum_{j = 1}^{m} \theta_j (x_1^{(j)} - x_2^{(j)})$ \\ \hline \hline
|
| 659 |
+
\end{tabular}}
|
| 660 |
+
\caption{{Kernels decomposition that satisfy the three assumptions stated in the main text (Section Constant Computation).
|
| 661 |
+
Decomposition for Mat\'ern kernel is given only for half-integer values. Decomposition for the ReLU kernel is given in the case of one-hidden layer, generalisation to an arbitrary number of layers can be obtained by recursive application of the formulas.}}
|
| 662 |
+
\label{tab:decomposition}
|
| 663 |
+
\end{table}
|
1809.06481v1.txt
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LinkedIn Talent Solutions business contributes to around 65% of LinkedIn’s annual revenue, and provides tools for job providers to reach out to potential candidates and for job seekers to find suitable career opportunities. LinkedIn’s job ecosystem has been designed as a platform to connect job providers and job seekers, and to serve as a marketplace for efficient matching between potential candidates and job openings. A key mechanism to help achieve these goals is the LinkedIn Recruiter product, which enables recruiters to search for relevant candidates and obtain candidate recommendations for their job postings.
|
| 2 |
+
|
| 3 |
+
We highlight a few unique information retrieval, system, and modeling challenges associated with talent search and recommendation systems:(1)The underlying query to the talent search system could be quite complex, combining several structured fields (such as canonical title(s), canonical skill(s), company name) and unstructured fields (such as free-text keywords). Depending on the application, the query could either consist of an explicitly entered query text and selected facets (talent search), or be implicit in the form of a job opening, or ideal candidate(s) for a job (talent recommendations). Our goal is to determine a ranked list of most relevant candidates in real-time among hundreds of millions of structured candidate profiles. Consequently, robust standardization, efficient indexing, candidate selection, and multi-pass scoring/ranking systems are essential (Sriram andMakhani, 2014; Ha-Thuc andSinha, 2016).(2)Unlike traditional search and recommendation systems which solely focus on estimating how relevant an item is for a given query, the talent search domain requires mutual interest between the recruiter and the candidate in the context of the job opportunity. In other words, we require not just that a candidate shown must be relevant to the recruiter’s query, but also that the candidate contacted by the recruiter must show interest in the job opportunity. Hence, it is crucial to use appropriate metrics (e.g., the likelihood of a candidate receiving an inMail (message) from the recruiter and also answering with a positive response) for model optimization as well as for online A/B testing, taking into account the fact that certain ideal metrics (e.g., the likelihood of a candidate receiving a job offer and accepting it) may either be unavailable or delayed (Ramanath et al., 2018; Ha-Thuc et al., 2015).(3)Quite often, the recruiter or the hiring manager may not be able to express their hiring needs in the form of a search query (or even a job posting), since this often requires deep domain knowledge, as well as significant time and manual effort to come up with the best search criteria (e.g., which skills are relevant for a specific role that the recruiter is looking to fill). To address this challenge, it is desirable to support search based on ideal candidate(s) (Ha-Thuc et al., 2016), and online learning of recruiter preferences within a search session based on their instantaneous response to recommended candidates (Geyiket al., 2018).In this talk, we will present how we formulated and addressed the above problems, the overall system design and architecture, the challenges encountered in practice, and the lessons learned from the production deployment of these systems at LinkedIn. By presenting our experiences of applying techniques at the intersection of recommender systems, information retrieval, machine learning, and statistical modeling in a large-scale industrial setting and highlighting the open problems, we hope to stimulate further research and collaborations within the SIGIR community.
|
| 4 |
+
|
| 5 |
+
We next briefly describe the overall architecture of LinkedIn’s talent search and recommendation engine, highlighting the key components (Figure 1). Our system can be subdivided into an online system for serving most relevant candidate results and an offline workflow for updating different machine learned models (described in greater detail in Figure 2). Our presentation covers the architecture choices, modeling design decisions, and the practical lessons learned.
|
| 6 |
+
|
| 7 |
+
Online system architecture: First, the recruiter’s search request (either as explicitly entered query, or implicit in the form of job opening / ideal candidate(s)), along with the recruiter and session context, is transformed into a complex query combining structured fields (e.g., canonical title(s) / skill(s), company name, region) and unstructured text keywords, and issued to LinkedIn’s Galene search engine (Sriram andMakhani, 2014). A candidate set of results is then retrieved from the search index based on the criteria specified, and then ranked in multiple passes using machine learned scoring models of varying complexity (Ha-Thuc andSinha, 2016; Ramanath et al., 2018; Ha-Thuc et al., 2015, 2016; Geyiket al., 2018). The search result set, along with the features used by the ranking model, are logged for later use for model training. Finally, front-end server gets the top ranked candidates, renders the result page, and logs recruiter interactions. The underlying search index is updated in near real-time to reflect changes in LinkedIn member data.
|
| 8 |
+
|
| 9 |
+
Offline modeling pipeline: Our offline system periodically trains the ranking models using recruiter usage logs (Ha-Thuc andSinha, 2016; Ramanath et al., 2018; Ha-Thuc et al., 2015, 2016; Geyiket al., 2018). The training data is generated from recruiter interactions (and candidate responses to recruiter messages) over the search results displayed. As the member data can change over time, we also log computed features along with search results, instead of generating the features during model training. The offline modeling pipeline is designed to support ease of feature engineering, incorporation of different types of machine learning models, and experimentation agility.
|
| 10 |
+
|
| 11 |
+
The authors have extensive experience in the field of web-scale search and recommendation systems, and in particular, in applying data mining, machine learning, and information retrieval techniques in the talent search domain. They have built and deployed multiple generations of machine learning models and systems for real-time, low latency applications such as talent search and recommendations at LinkedIn. They have published extensively in venues such as SIGIR, KDD, WWW, WSDM, and CIKM, and also presented tutorial/industry talks about their work.
|
| 12 |
+
|
| 13 |
+
Sahin Cem Geyik is part of the AI team at LinkedIn, focusing on personalized recommendations across several LinkedIn Talent Solutions products. He received his Ph.D. degree in Computer Science from Rensselaer Polytechnic Institute in 2012, and has authored papers in top-tier conferences and journals such as KDD, INFOCOM, IEEE TMC, and IEEE TSC.
|
| 14 |
+
|
| 15 |
+
Qi Guo is part of the AI team at LinkedIn, where he applies machine learning for LinkedIn Talent Solutions products. He received his M.S. degree in Robotics from Carnegie Mellon University in 2016. He has published at IJCAI.
|
| 16 |
+
|
| 17 |
+
Bo Hu is part of the AI team at LinkedIn, where he works on relevance for LinkedIn Talent Solutions products. He received his Ph.D. degree in Computer Science from Simon Fraser University in 2014, and has authored papers in top-tier conferences and journals such as RecSys, ICDM, IEEE TKDE, and ACM TOIS.
|
| 18 |
+
|
| 19 |
+
Cagri Ozcaglar is part of the AI team at LinkedIn, where he works on relevance for LinkedIn Talent Solutions products. He received his Ph.D. degree in Computer Science from Rensselaer Polytechnic Institute in 2012, and has authored papers in top-tier conferences and journals such as IEEE BIBM, IEEE TNBS, BMC Genomics, Mathematical Biosciences.
|
| 20 |
+
|
| 21 |
+
Ketan Thakkar is a relevance engineer at LinkedIn Talent Solutions and works on improving search relevance on LinkedIn search stack. Previously, he was part of Microsoft’s Bing search relevance team working on improving relevance for Bing search and ads. He received his M.S. degree in Information Technology from Bentley University in 2010.
|
| 22 |
+
|
| 23 |
+
Xianren Wu is part of the AI team at LinkedIn, leading the candidate recommendation relevance efforts within LinkedIn Talent Solutions. He previously co-founded and was the director of R&D for GageIn Inc. He received his Ph.D. degree in Electrical Engineering from U.C. Santa Cruz in 2008, and has authored papers in top-tier conferences such as WWW and CIKM.
|
| 24 |
+
|
| 25 |
+
Krishnaram Kenthapadi is part of the AI team at LinkedIn, where he leads the fairness and privacy modeling efforts across different LinkedIn applications. Previously, he was a Researcher at Microsoft Research Silicon Valley. He received his Ph.D. degree in Computer Science from Stanford University in 2006. He has published 35+ papers, filed 125+ patents, and received the CIKM best case studies paper award, the SODA best student paper award, and the WWW best paper award nomination.
|
| 26 |
+
|
| 27 |
+
About LinkedIn: Founded in 2003, LinkedIn connects the world’s professionals to make them more productive and successful. LinkedIn operates the world’s largest professional network on the Internet with more than 500 million members in over 200 countries and territories. The company has a diversified business model with revenues coming from talent solutions, marketing solutions, and premium subscription products. See https://press.linkedin.com/about for more information.
|
1809.06486v2.txt
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The past years have witnessed a drastic increase in the usage of online social networks. By the end of April 2018, there are totally 3.03 billion active social media users and each Internet user has an average of 7.6 social media accounts [24]. Despite allowing efficient exchange of information, online social networks have provided platforms for misinformation. Misinformation may lead to serious economic consequences and even cause panics. For example, it was reported by NDTV that the misinformation on social media led to Pune violence in January 2018.111https://www.ndtv.com/mumbai-news/misinformation-on-social-media-led-to-pune-violence-minister-1795562 Recently, the rapid spread of misinformation has been on the list of top global risks according to World Economic Forum 222http://reports.weforum.org/global-risks-2018/digital-wildfires/. Therefore, effective strategies on misinformation control are imperative.
|
| 2 |
+
|
| 3 |
+
Information propagates through social networks via cascades and each cascade starts to spread from certain seed users. When misinformation is detected, a feasible strategy is to launch counter campaigns competing against the misinformation [1]. Such counter campaigns are usually called as positive cascades. The misinformation containment (MC) problem aims at selecting seed users for positive cascades such that the misinformation can be effectively restrained. The existing works have considered this problem for the case when there is one misinformation cascade and one positive cascade [2, 3, 4]. In this paper, we address this problem for the general case when there are multiple misinformation cascades and positive cascades. The scenario considered in this paper is more realistic because there always exists multiple cascades concerning one issue or news in a real social network.
|
| 4 |
+
|
| 5 |
+
We introduce an important concept, called as cascade priority, which defines how the users make selections when more than one cascades arrive at the same time. As shown later, the cascade priority is a necessary and critical setting when multiple cascades exist. The model proposed in this paper is a natural extension of the existing models, but the MC problem becomes very challenging under the new setting. For example, as shown later in Sec. 5, adding more seed nodes for the positive cascade may surprisingly cause a wider spread of misinformation, i.e., the objective function is not monotone nondecreasing. Our goal in this paper is to offer a systematic study, including formal model formulation, hardness analysis, and algorithm design. The contributions of this paper are summarized as follows.
|
| 6 |
+
|
| 7 |
+
•We provide a formal model supporting multi-cascade influence diffusion in online social networks. To the best of our knowledge, we are the first to consider the issue on cascade priority. Based on the proposed model, we study the MC problem by formulating it as a combinatorial optimization problem.•We prove that the MC problem under the general model cannot be approximated within a factor of Ω(2log1−ϵn4)Ωsuperscript2superscript1italic-ϵsuperscript𝑛4\Omega(2^{\log^{1-\epsilon}n^{4}}) in polynomial time unless NP⊆DTIME(npolylogn)𝑁𝑃𝐷𝑇𝐼𝑀𝐸superscript𝑛polylog𝑛NP\subseteq DTIME(n^{\operatorname*{polylog}n}).333When there is only one misinformation cascade and one positive cascade, this problem can be approximated within a factor of 1−1/e11𝑒1-1/e [2, 3, 4]. Informally, the complexity class DTIME(f(n))𝐷𝑇𝐼𝑀𝐸𝑓𝑛DTIME(f(n)) consists of the decision problems that can be solved in O(f(n))𝑂𝑓𝑛O(f(n)).•We propose and study three types of cascade priorities, homogeneous cascade priority, M-dominant cascade priority, and P-dominant cascade priority. These special cascade priorities are commonly seen in real social networks, and the MC problem enjoys desirable combinatorial properties under these settings.•We design a novel algorithm for the MC problem by using nontrivial upper bound and lower bound. As shown in the experiments, the proposed algorithm outperforms other methods and it admits a near-constant data-dependent approximation ratio on all the considered datasets.
|
| 8 |
+
|
| 9 |
+
Influence maximization (IM). The influence maximization (IM) problem is proposed by Kempe, Kleinberg, and Tardos in [6] where the authors also develop two basic diffusion models, independent cascade (IC) model and linear threshold (LT) model. It is shown in [6] that the IM problem is actually a submodular maximization problem and therefore the greedy scheme provides a (1−1/e)11𝑒(1-1/e)-approximation. However, Chen et al. in [7] prove that it is #P-hard to compute the influence and the naive greedy algorithm is not scalable to large datasets. One breakthrough is made by C. Borgs et al. [8] who invent the reverse sampling technique and design an efficient algorithm. This technique is later improved by Tang et al. [9] and Nguyen et al. [10]. Recently, Li et al. [18] study the IM problem under non-submodular threshold functions and Lynn et al. [19] consider the IM problem under the Ising network. For the continuous-time generative model, N. Du et al. [30] propose a scalable influence estimation method and then study the IM problem under the continuous setting.
|
| 10 |
+
|
| 11 |
+
Misinformation containment (MC). Based on the IC and LT model or their variants, the MC problem is then proposed and extensively studied. Budak et al. [2] consider the independent cascade model and show that the MC problem is again a submodular maximization problem when there are two cascades. Tong et al. [4] design an efficient algorithm by utilizing the reverse sampling technique. He et al. [3], Fan et al. [11] and Zhang et al. [12] study the MC problem under competitive linear threshold model. Nguyen et al. [13] propose the IT-Node Protector problem which limits the spread of misinformation by blocking the high influential nodes. Different from the existing works, we focus on the general case when more than two cascades are allowed. In other contexts, He et al. [20] study the MC problem in mobile social networks and Wang et al. [21] study the MC problem with the consideration of user experience. Mehrdad et al. [28] consider a point process network activity model and study the fake news mitigation problem by reinforcement learning. Recently, a comprehensive survey [29] regarding false information is provided by Srijan et al.
|
| 12 |
+
|
| 13 |
+
In this section, we formally formulate the diffusion model and the MC problem.
|
| 14 |
+
|
| 15 |
+
A social network is given by a directed graph G=(V,E)𝐺𝑉𝐸G=(V,E). For each edge (u,v)𝑢𝑣(u,v), we say v𝑣v is an out-neighbor of u𝑢u, and u𝑢u is an in-neighbor of v𝑣v. Information is assumed to spread via cascades and each cascade spreads from seed users. Let ℂℂ\operatorname{\mathbb{C}} be the set of all the cascades, and we use τ(C)⊆V𝜏𝐶𝑉\tau(C)\subseteq V to denote the seed set of a cascade C∈ℂ𝐶ℂC\in\operatorname{\mathbb{C}}. We say a user is C𝐶C-active if they are activated by cascade C𝐶C. All users are initially defined as ∅\emptyset-active. Associated with each edge (u,v)𝑢𝑣(u,v), there is a real number p(u,v)∈[0,1]subscript𝑝𝑢𝑣01p_{(u,v)}\in[0,1] denoting the propagation probability from u𝑢u to v𝑣v. We assume that p(u,v)=0subscript𝑝𝑢𝑣0p_{(u,v)}=0 iff (u,v)∉E𝑢𝑣𝐸(u,v)\notin E. When u𝑢u becomes C𝐶C-active for a certain cascade C∈ℂ𝐶ℂC\in\operatorname{\mathbb{C}}, they attempt once to activate an ∅\emptyset-active out-neighbor v𝑣v with the success probability of p(u,v)subscript𝑝𝑢𝑣p_{(u,v)}. We assume that a user will be activated by the cascade arriving first and will not be activated later for another time. Associated with each user v𝑣v, each cascade C𝐶C is given a unique priority, denoted by Fv(C)subscriptF𝑣𝐶\operatorname*{F}_{v}(C), which gives a linear order over the cascades. FvsubscriptF𝑣{\operatorname*{F}}_{v} can be represented as a bijection between ℂℂ\operatorname{\mathbb{C}} and {1,2,…,|ℂ|}12…ℂ\{1,2,...,|\operatorname{\mathbb{C}}|\}, and, for each C1,C2∈Csubscript𝐶1subscript𝐶2𝐶C_{1},C_{2}\in C, Fv(C1)>Fv(C2)subscriptF𝑣subscript𝐶1subscriptF𝑣subscript𝐶2{\operatorname*{F}}_{v}(C_{1})>{\operatorname*{F}}_{v}(C_{2}) iff C1subscript𝐶1C_{1} has a higher priority than that of C2subscript𝐶2C_{2} at v𝑣v. If two or more cascades reach v𝑣v at the same time, v𝑣v will be activated by the cascade with the highest priority. The cascade priority at each node is affected by many factors such as the reputation of the source, the reliability of the message and the user’s personal opinion.
|
| 16 |
+
|
| 17 |
+
For a time step t∈{0,1,2,…}𝑡012…t\in\{0,1,2,...\}, we use πt(v)∈ℂ∪{∅}subscript𝜋𝑡𝑣ℂ\pi_{t}(v)\in\operatorname{\mathbb{C}}\cup\{\emptyset\} to denote the activation state of a user v𝑣v after time step t𝑡t, where πt(v)=Csubscript𝜋𝑡𝑣𝐶\pi_{t}(v)=C (resp. πt(v)=∅subscript𝜋𝑡𝑣\pi_{t}(v)=\emptyset) if v𝑣v is C𝐶C-active (resp. ∅\emptyset-active). Let π∞(v)subscript𝜋𝑣\pi_{\infty}(v) be the activation state of v𝑣v when the diffusion process terminates. The diffusion process unfolds stochastically in discrete, described as follows:
|
| 18 |
+
|
| 19 |
+
•Time step 0. If a node v𝑣v is selected as a seed node by one or more cascades, v𝑣v becomes C∗superscript𝐶C^{*}-active where C∗=argmaxC∈{C|C∈ℂ,v∈τ(C)}Fv(C)superscript𝐶subscriptargmax𝐶conditional-set𝐶formulae-sequence𝐶ℂ𝑣𝜏𝐶subscriptF𝑣𝐶C^{*}=\operatorname*{arg\,max}_{C\in\{C|C\in\operatorname{\mathbb{C}},v\in\tau(C)\}}{\operatorname*{F}}_{v}(C) .•Time step t. Each node u𝑢u activated at time step t−1𝑡1t-1 attempts to activate each of u𝑢u’s ∅\emptyset-active out-neighbor v𝑣v with a success probability of p(u,v)subscript𝑝𝑢𝑣p_{(u,v)}. If a node v𝑣v is successfully activated by one or more in-neighbors, v𝑣v becomes πt−1(u∗)subscript𝜋𝑡1superscript𝑢\pi_{t-1}(u^{*})-active where u∗=argmaxu∈A⊆VFv(πt−1(u))superscript𝑢subscriptargmax𝑢𝐴𝑉subscriptF𝑣subscript𝜋𝑡1𝑢u^{*}=\operatorname*{arg\,max}_{u\in A\subseteq V}{\operatorname*{F}}_{v}(\pi_{t-1}(u)) where A𝐴A is the set of the in-neighbors who successfully activate v𝑣v at time step t𝑡t.444Note that here πt−1(u)subscript𝜋𝑡1𝑢\pi_{t-1}(u) cannot be ∅\emptyset so Fv(πt−1(u))subscriptF𝑣subscript𝜋𝑡1𝑢{\operatorname*{F}}_{v}(\pi_{t-1}(u)) is well-defined.
|
| 20 |
+
|
| 21 |
+
We assume that, regarding one issue or topic, there are two groups of cascades: misinformation cascades and positive cascades. Suppose there are already some cascades in the network and their seed sets are known to us. For the purpose of misinformation containment, we launch a new positive cascade with a certain seed set. We use 𝕄𝕄\operatorname{\mathbb{M}} and ℙℙ\operatorname{\mathbb{P}} to denote the sets of the existing misinformation cascades and positive cascades, respectively, and use P∗subscript𝑃P_{*} to denote the newly introduced positive cascade. Therefore, ℂ=𝕄∪ℙ∪{P∗}ℂ𝕄ℙsubscript𝑃\operatorname{\mathbb{C}}=\operatorname{\mathbb{M}}\cup\operatorname{\mathbb{P}}\cup\{P_{*}\}. We say a user is 𝕄𝕄\operatorname{\mathbb{M}}-active if they are M𝑀M-active for some M∈𝕄𝑀𝕄M\in\operatorname{\mathbb{M}}, otherwise they are called as 𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}}-active.555Note that an ∅\emptyset-active node is 𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}}-active. For a seed set τ(P∗)𝜏subscript𝑃\tau(P_{*}) of cascade P∗subscript𝑃P_{*}, we use f𝕄(τ(P∗))subscript𝑓𝕄𝜏subscript𝑃f_{\operatorname{\mathbb{M}}}(\tau(P_{*})) (resp. f𝕄¯(τ(P∗))subscript𝑓¯𝕄𝜏subscript𝑃f_{\overline{\operatorname{\mathbb{M}}}}(\tau(P_{*}))) to denote the expected number of the 𝕄𝕄\operatorname{\mathbb{M}}-active (resp. 𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}}-active) nodes when the diffusion process terminates. The problems considered in this paper are shown as follows.
|
| 22 |
+
|
| 23 |
+
Alternatively, we can maximize the number of the 𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}}-active users.
|
| 24 |
+
|
| 25 |
+
An instance of the above problems is given by (1) G=(V,E)𝐺𝑉𝐸G=(V,E): a network structure; (2) {pe|pe∈[0,1],e∈E}conditional-setsubscript𝑝𝑒formulae-sequencesubscript𝑝𝑒01𝑒𝐸\{p_{e}|p_{e}\in[0,1],e\in E\}: the probabilities on the edges; (3) ℂ=𝕄∪ℙ∪{P∗}ℂ𝕄ℙsubscript𝑃\operatorname{\mathbb{C}}=\operatorname{\mathbb{M}}\cup\operatorname{\mathbb{P}}\cup\{P_{*}\}: the set of the existing cascades together with P∗subscript𝑃P_{*}; (4) {Fv(C)|v∈V,C∈ℂ}conditional-setsubscriptF𝑣𝐶formulae-sequence𝑣𝑉𝐶ℂ\{\operatorname*{F}_{v}(C)|v\in V,C\in\operatorname{\mathbb{C}}\}: the cascade priority at each node; (5) {τ(C)⊆V|C∈𝕄∪ℙ}conditional-set𝜏𝐶𝑉𝐶𝕄ℙ\{\tau(C)\subseteq V|C\in\operatorname{\mathbb{M}}\cup\operatorname{\mathbb{P}}\}: the seed sets of the existing cascades; (6) V∗⊆Vsuperscript𝑉𝑉V^{*}\subseteq V: a candidate set of the seed nodes of P∗subscript𝑃P_{*}. The propagation probability and the cascade priority can be inferred by mining historical data [25, 26, 27].
|
| 26 |
+
|
| 27 |
+
In this section, we provide a hardness result for the Min-𝕄𝕄\operatorname{\mathbb{M}} problem. The result is obtained by a reduction from the positive-negative partial set cover (±plus-or-minus\pmPSC) problem.
|
| 28 |
+
|
| 29 |
+
The following result is presented by Miettinen [15].
|
| 30 |
+
|
| 31 |
+
A core result is given in the next lemma.
|
| 32 |
+
|
| 33 |
+
The following result follows immediately from Lemmas 1 and 2.
|
| 34 |
+
|
| 35 |
+
In this section, we present algorithms for the Max-𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}} problem. Throughout this section, we denote the objective function f𝕄¯subscript𝑓¯𝕄f_{\operatorname{\overline{{\operatorname{\mathbb{M}}}}}} as f𝑓f. The technique of submodular maximization has been extensively used in the existing works. For a set function h()ℎh() over a ground set U𝑈U, the properties of monotone nondecreasing and submodular are defined as follows:
|
| 36 |
+
|
| 37 |
+
As mentioned in Remark 1, the Max-𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}} problem is a natural extension of the problem considered in [2, 4], but it is not submodular and even not monotone nondecreasing.
|
| 38 |
+
|
| 39 |
+
In the rest of this section, we first study three special cascade priorities and then design an algorithm for the general setting.
|
| 40 |
+
|
| 41 |
+
We introduce the following types of cascade priority that frequently appear in real social networks.
|
| 42 |
+
|
| 43 |
+
Similarly, we have the P-dominant cascade priority.
|
| 44 |
+
|
| 45 |
+
While the Max-𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}} problem does not exhibit any good property in general, it is indeed monotone nondecreasing and submodular under special cascade priority settings. For the above types of cascade priority, we have the following results.
|
| 46 |
+
|
| 47 |
+
Please see the supplementary material for the proofs of Theorems 2 and 3. Note that the greedy algorithm yields a (1−1/e)11𝑒(1-1/e)-approximation when the objective function is monotone nondecreasing and submodular [16]. Theorems 2 and 3 evince that special cascade priorities may admit desirable combinatorial properties. In the next subsection, we will utilize these results to design an effective algorithm for the Max-𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}} problem for the general case.
|
| 48 |
+
|
| 49 |
+
For the general cascade priority, we present a data-dependent approximation algorithm based on the upper-lower-bound technique [22]. Each cascade priority FvsubscriptF𝑣{\operatorname*{F}}_{v} induces another two cascade priorities, defined as follows:
|
| 50 |
+
|
| 51 |
+
F¯vsubscript¯F𝑣\overline{{\operatorname*{F}}}_{v} and F¯vsubscript¯F𝑣\underline{{\operatorname*{F}}}_{v} keep the relative priority of the cascades within the same group and adjust the relative priority of the cascades between groups. We can easily check that F¯vsubscript¯F𝑣\overline{{\operatorname*{F}}}_{v} and F¯vsubscript¯F𝑣\underline{{\operatorname*{F}}}_{v} are uniquely determined by FvsubscriptF𝑣{\operatorname*{F}}_{v}.
|
| 52 |
+
|
| 53 |
+
For a seed set τ(P∗)⊆V∗𝜏subscript𝑃superscript𝑉\tau(P_{*})\subseteq V^{*} of cascade P∗subscript𝑃P_{*}, we use f¯(τ(P∗))¯𝑓𝜏subscript𝑃\overline{f}(\tau(P_{*})) (resp. f¯(τ(P∗))¯𝑓𝜏subscript𝑃\underline{f}(\tau(P_{*}))) to denote the expected number of the 𝕄¯¯𝕄\overline{\operatorname{\mathbb{M}}}-active nodes when each node v𝑣v replaces its cascade priority FvsubscriptF𝑣{\operatorname*{F}}_{v} by F¯vsubscript¯F𝑣\overline{{\operatorname*{F}}}_{v} (resp. F¯vsubscript¯F𝑣\underline{{\operatorname*{F}}}_{v}). Because F¯vsubscript¯F𝑣\overline{{\operatorname*{F}}}_{v} is P-dominant and F¯vsubscript¯F𝑣\underline{{\operatorname*{F}}}_{v} is M-dominant, the following result immediately follows from Theorem 2.
|
| 54 |
+
|
| 55 |
+
Furthermore, f¯¯𝑓\overline{f} is an upper bound of f𝑓f and f¯¯𝑓\underline{f} is a lower bound of f𝑓f.
|
| 56 |
+
|
| 57 |
+
Please see the supplementary material for the proof of Theorem 4. We now present an algorithm to solve the Max-𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}} problem by approximating f¯¯𝑓\overline{f} and f¯¯𝑓\underline{f}. First, we run the greedy algorithm, ALG. 1, on all three functions, f,f¯𝑓¯𝑓f,\overline{f} and f¯¯𝑓\underline{f}, to obtain three solutions S∗,S¯∗subscript𝑆subscript¯𝑆S_{*},\overline{S}_{*} and S¯∗subscript¯𝑆\underline{S}_{*}, respectively. The final solution is selected as S′=argmaxS∈{S∗,S¯∗,S¯∗}f(S).superscript𝑆′subscriptargmax𝑆subscript𝑆subscript¯𝑆subscript¯𝑆𝑓𝑆S^{{}^{\prime}}=\operatorname*{arg\,max}_{S\in\{S_{*},\overline{S}_{*},\underline{S}_{*}\}}f(S). The process is formally shown in ALG. 2. According to [22], it has the following performance bound.
|
| 58 |
+
|
| 59 |
+
In this section, we evaluate the proposed algorithm by experiments. Our goal is to examine the performance of ALG. 2 by (a) comparing it to baseline methods and (b) measuring the data-dependent approximation ratio given in Theorem 5. Our experiments are performed on a server with a 2.2 GHz eight-core processor.
|
| 60 |
+
|
| 61 |
+
Dataset. The first dataset, collected from Twitter, is built after monitoring the spreading process of the messages posted between 1st and 7th July 2012 regarding the discovery of a new particle with the features of the elusive Higgs boson [17]. It consists of a collection of activities between users, including re-tweeting action, replying action, and mentioning action. We extract two subgraphs from this dataset, where the first one has 10,000 nodes and the second one has 100,000 nodes. We denote these two graphs by Higgs-10K and Higgs-100K, respectively. The second dataset, denoted by HepPh, is a citation graph from the e-print arXiv with 34,546 papers [23]. HepPh has been widely used in the study on influence diffusion in social networks. The statistics of the datasets can be found in the supplementary material.
|
| 62 |
+
|
| 63 |
+
Propagation Probability. On Higss-10K, the probability of edge (u,v)𝑢𝑣(u,v) is set to be proportional to the frequency of the activities between u𝑢u and v𝑣v. In particular, we set p(u,v)subscript𝑝𝑢𝑣p_{(u,v)} as aiamax⋅pmax+pbase⋅subscript𝑎𝑖subscript𝑎𝑚𝑎𝑥subscript𝑝𝑚𝑎𝑥subscript𝑝𝑏𝑎𝑠𝑒\frac{a_{i}}{a_{max}}\cdot p_{max}+p_{base}, where aisubscript𝑎𝑖a_{i} is the number of activities from u𝑢u to v𝑣v, amaxsubscript𝑎𝑚𝑎𝑥a_{max} is the maximum number of the activities among all the edges, and, pmax=0.2subscript𝑝𝑚𝑎𝑥0.2p_{max}=0.2 and pbase=0.4subscript𝑝𝑏𝑎𝑠𝑒0.4p_{base}=0.4 are two constants. On Higgs-100K, we adopt the uniform setting where the propagation probability on each edge is set as 0.1. On HepPh, we adopt the wighted cascade setting and set p(u,v)subscript𝑝𝑢𝑣p_{(u,v)} as 1/deg(v)1𝑑𝑒𝑔𝑣1/deg(v) where deg(v)𝑑𝑒𝑔𝑣deg(v) is the number of in-neighbors of v𝑣v. The uniform setting and the weighted cascade are two classic settings and they have been widely used in the existing works [2, 4, 6, 7, 9, 10, 18].
|
| 64 |
+
|
| 65 |
+
Cascade setting. We consider three cases where there are three cascades, five cascades and ten cascades, respectively. For the case of three cascades, we deploy one existing misinformation cascade and one existing positive cascade, and we launch a new positive cascade P∗subscript𝑃P_{*}. For each existing cascade, the size of the seed set is set as 20 and the seed nodes are selected from the node with the highest single-node influence. The seed sets of different cascades do not overlap with each other. The budget of P∗subscript𝑃P_{*} is enumerated from {1,2,…,20}12…20\{1,2,...,20\} and the candidate set V∗superscript𝑉V^{*} is equal to V𝑉V. The cascade priority at each node is assigned randomly by generating a random permutation over {1,2,3}123\{1,2,3\}. We process the cases with five and ten cascades in the same way as the three cascades case. The details can be found in the supplementary material.
|
| 66 |
+
|
| 67 |
+
Baseline methods. Since there is no algorithm explicitly addressing the model considered in this paper, we consider three baseline methods, HighWeight, Proximity and Random. The weight of a node v𝑣v is defined as the sum of the probabilities of its out-edges (i.e., ∑vp(u,v)subscript𝑣subscript𝑝𝑢𝑣\sum_{v}p_{(u,v)}). HighWeight outputs the seed set according to the decreasing order of the node weight. Proximity selects the seed nodes of P∗subscript𝑃P_{*} from the out-neighbors of the seed nodes of the misinformation cascades, where the preference is given to the node with a large weight. Random is a baseline method which selects the seed nodes randomly. The performance of Random is evaluated by the mean over 1,000 executions.
|
| 68 |
+
|
| 69 |
+
Estimating influence. The feasibility of ALG. 2 relies on the assumption that there is an efficient oracle of f𝕄¯subscript𝑓¯𝕄f_{\operatorname{\overline{{\operatorname{\mathbb{M}}}}}}. Unfortunately, it has been shown in [7] that computing the influence is a #P-hard problem, and in fact, it is also hard to compute f𝕄¯subscript𝑓¯𝕄f_{\operatorname{\overline{{\operatorname{\mathbb{M}}}}}}. In our experiments, the function value is estimated by 5,000 Monte Carlo simulations whenever f𝕄¯subscript𝑓¯𝕄f_{\operatorname{\overline{{\operatorname{\mathbb{M}}}}}} is called, and the final solution of each algorithm is evaluated by 10,000 simulations. We note that the techniques proposed in [4, 8, 9, 10] are potentially applicable to the MC problem, but improving the efficiency of the algorithm is beyond the scope of this paper.
|
| 70 |
+
|
| 71 |
+
The experimental results are shown in Figs. 4, 5 and 6. In each figure, the first three subfigures show the performance under the settings of three, five and ten cascades, respectively. Each subfigure gives four curves plotting the number of 𝕄𝕄\operatorname{\mathbb{M}}-active nodes under Sandwich (ALG. 2), HighWeight, Proximity and Random, respectively. The last subfigure shows the value of f(S¯∗)/f¯(S¯∗)𝑓subscript¯𝑆¯𝑓subscript¯𝑆{f}(\overline{S}_{*})/\overline{f}(\overline{S}_{*}) in each experiment.
|
| 72 |
+
|
| 73 |
+
Major observations. First, as shown in the figures, ALG. 2 consistently provides the best performance. Comparing it to other baseline methods, the superiority of ALG. 2 can be very significant when the budget becomes large. As shown in Fig. 4a, on Higgs-10K, when there are three cascades and the budget is equal to 20, ALG. 2 is able to reduce the number of 𝕄𝕄\operatorname{\mathbb{M}}-active nodes from 180 to 100, while other methods can hardly make it below 160. Another important observation is that the ratio f(S¯∗)/f¯(S¯∗)𝑓subscript¯𝑆¯𝑓subscript¯𝑆{f}(\overline{S}_{*})/\overline{f}(\overline{S}_{*}) is very close to 1 in practice. For example, on HepPh, this ratio is always larger than 0.9985. This means the performance ratio of ALG. 2 is guaranteed to be very close to 1−1/e11𝑒1-1/e on such datasets. From Example 3 and the proofs of Theorems 2 and 3 we can see that the non-submodularity only occurs in the case when two or more cascades arrive at one node at the same time. Thus, if such a scenario does not happen frequently, the Max-𝕄𝕄\operatorname{\mathbb{M}} and Min-𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}} problems will be close to submodular optimization problems, and consequently, the greedy algorithm is effective. While f(S¯∗)/f¯(S¯∗)𝑓subscript¯𝑆¯𝑓subscript¯𝑆{f}(\overline{S}_{*})/\overline{f}(\overline{S}_{*}) is data-dependent, we have observed that it is very close to 1 under all the considered datasets, which indicates that the approximation ratio is near-constant.
|
| 74 |
+
|
| 75 |
+
Minor observations. We can also observe that Random offers no help in misinformation containment and HighWeight is also futile in many cases (e.g., Figs. 4a, 5a and 6b where it has the same performance as that of Random). In addition, Proximity performs slightly better than HighWeight does but it can still fail to reduce the number of 𝕄𝕄\operatorname{\mathbb{M}}-active users when budget increases, i.e., the curve is not monotone decreasing. We have also observed that ALG. 2 strictly outperforms that solely running ALG. 1 on f𝕄¯subscript𝑓¯𝕄f_{\operatorname{\overline{{\operatorname{\mathbb{M}}}}}}, which means approximating the upper bound and lower bound can provide better solutions. The results of this part can be found in our supplementary material.
|
| 76 |
+
|
| 77 |
+
In this paper, we study the MC problem under the general case where there is an arbitrary number of cascades. The considered scenario is more realistic and it applies to complicated real applications in online social networks. We provide a formal model and address the MC problem from the view of combinatorial optimization. We show the MC problem is not only NP-hard but also admits strong inapproximability property. We propose three types of cascade priority and show that the MC problem can be close to submodular optimization problems. An effective algorithm for solving the MC problem is designed and evaluated by experiments.
|
| 78 |
+
|
| 79 |
+
This work is supported in part by NSF under grant #1747818 and a start-up grant from the University of Delaware.
|
| 80 |
+
|
| 81 |
+
We first provide some preliminaries. According to the model, with probability p(u,v)subscript𝑝𝑢𝑣p_{(u,v)} that u𝑢u can successfully activate v𝑣v. We use ģģ\operatorname{\text{\c{g}}} to denote a random subgraph sampled from G𝐺G where each edge (u,v)𝑢𝑣(u,v) appears in ģģ\operatorname{\text{\c{g}}} with probability p(u,v)subscript𝑝𝑢𝑣p_{(u,v)}. Each edge in ģģ\operatorname{\text{\c{g}}} then has the propagation probability of 1. We use 𝒢𝒢\operatorname{\mathcal{G}} to denote the set of all possible random graphs and use Pr[ģ]Prģ\Pr[\operatorname{\text{\c{g}}}] to denote the probability that ģģ\operatorname{\text{\c{g}}} can be sampled. Let fģ(τ(P∗))superscript𝑓ģ𝜏subscript𝑃f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})) be the number of 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active nodes in ģģ\operatorname{\text{\c{g}}} under τ(P∗)𝜏subscript𝑃\tau(P_{*}). Because the randomness of the diffusion process comes from that if each edge (u,v)𝑢𝑣(u,v) can be “passed”, each graph in 𝒢𝒢\operatorname{\mathcal{G}} is actually one possible outcome of the spreading process. Therefore, f(τ(P∗))𝑓𝜏subscript𝑃f(\tau(P_{*})) can be represented asf(τ(P∗))=∑ģ∈𝒢Pr[ģ]⋅fģ(τ(P∗)).𝑓𝜏subscript𝑃subscriptģ𝒢⋅Prģsuperscript𝑓ģ𝜏subscript𝑃f(\tau(P_{*}))=\sum_{\operatorname{\text{\c{g}}}\in\operatorname{\mathcal{G}}}\Pr[\operatorname{\text{\c{g}}}]\cdot f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})).(1)Because the properties of monotone nondecreasing and submodular are preserved under addition, to prove Theorem 2 or 3, it suffices to prove that fģ(τ(P∗))superscript𝑓ģ𝜏subscript𝑃f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})) is monotone nondecreasing and submodular.
|
| 82 |
+
|
| 83 |
+
Let us first consider under which condition a node can be 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active or 𝕄𝕄\operatorname{\mathbb{M}}-active. For each u,v∈V𝑢𝑣𝑉u,v\in V and V′⊆Vsuperscript𝑉′𝑉V^{{}^{\prime}}\subseteq V, we use disģ(u,v)subscriptdisģ𝑢𝑣\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(u,v) to denote the length of the shortest path from u𝑢u to v𝑣v in ģģ\operatorname{\text{\c{g}}}, and define that disģ(V′,v)=minu∈V′disģ(u,v)subscriptdisģsuperscript𝑉′𝑣subscript𝑢superscript𝑉′subscriptdisģ𝑢𝑣\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(V^{{}^{\prime}},v)=\min_{u\in V^{{}^{\prime}}}\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(u,v). Let τ(𝕄)=∪M∈𝕄τ(M)𝜏𝕄subscript𝑀𝕄𝜏𝑀\tau(\operatorname{\mathbb{M}})=\cup_{M\in\operatorname{\mathbb{M}}}\tau(M) be the union of the seed sets of misinformation cascades, and define τ(𝕄¯)=(∪P∈ℙτ(P))∪τ(P∗)𝜏¯𝕄subscript𝑃ℙ𝜏𝑃𝜏subscript𝑃\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}})=(\cup_{P\in\operatorname{\mathbb{P}}}\tau(P))\cup\tau(P_{*}) for the positive cascades. Note that τ(𝕄)𝜏𝕄\tau(\operatorname{\mathbb{M}}) is fixed while τ(𝕄¯)𝜏¯𝕄\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}) depends on τ(P∗)𝜏subscript𝑃\tau(P_{*}). Two important lemmas are given below.
|
| 84 |
+
|
| 85 |
+
Let a∈τ(𝕄¯)𝑎𝜏¯𝕄a\in\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}) be a node such that disģ(a,u)=disģ(τ(𝕄¯),u)subscriptdisģ𝑎𝑢subscriptdisģ𝜏¯𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(a,u)=\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u), and (v0,…,vl)subscript𝑣0…subscript𝑣𝑙(v_{0},...,v_{l}) be the shortest path from a𝑎a to u𝑢u, where v0=asubscript𝑣0𝑎v_{0}=a and vl=usubscript𝑣𝑙𝑢v_{l}=u. Assuming disģ(τ(𝕄¯),u)<disģ(τ(𝕄),u)subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u), we prove that v0,…,vlsubscript𝑣0…subscript𝑣𝑙v_{0},...,v_{l} are all 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active and visubscript𝑣𝑖v_{i} will be activated at time step i𝑖i. We prove this by induction. Because disģ(a,u)=disģ(τ(𝕄¯),u)<disģ(τ(𝕄),u)subscriptdisģ𝑎𝑢subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(a,u)=\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u), v0=asubscript𝑣0𝑎v_{0}=a is not a seed node of any misinformation cascade, and therefore v0subscript𝑣0v_{0} is 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active at time step 0. Suppose that, for some i𝑖i with 0<i<l0𝑖𝑙0<i<{l}, v0,…,visubscript𝑣0…subscript𝑣𝑖v_{0},...,v_{i} are all 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active and visubscript𝑣𝑖v_{i} is activated at time step i𝑖i. Now we prove that vi+1subscript𝑣𝑖1v_{i+1} will be 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active at time step i+1𝑖1i+1. Because i+1𝑖1i+1 is the length of the shortest path from any seed node to u𝑢u, u𝑢u cannot be activated before time step i+1𝑖1i+1. Furthermore, by the inductive hypothesis, visubscript𝑣𝑖v_{i} will activate vi+1subscript𝑣𝑖1v_{i+1} at time step i+1𝑖1i+1, so vi+1subscript𝑣𝑖1v_{i+1} will be activated at time step i+1𝑖1i+1 by visubscript𝑣𝑖v_{i} or other in-neighbors. Finally, because disģ(τ(𝕄¯),u)<disģ(τ(𝕄),u)subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u) and vi+1subscript𝑣𝑖1v_{i+1} is on the shortest path from a𝑎a to u𝑢u, we have disģ(τ(𝕄¯),vi+1)<disģ(τ(𝕄),vi+1)subscriptdisģ𝜏¯𝕄subscript𝑣𝑖1subscriptdisģ𝜏𝕄subscript𝑣𝑖1\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),v_{i+1})<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),v_{i+1}), which means any path from any misinformation seed node to vi+1subscript𝑣𝑖1v_{i+1} must have a length larger than i+1𝑖1i+1. Therefore, vi+1subscript𝑣𝑖1v_{i+1} cannot be M𝑀M-active at time step i+1𝑖1i+1 for any M∈𝕄𝑀𝕄M\in\operatorname{\mathbb{M}} and it must be 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active. By induction, u=vl𝑢subscript𝑣𝑙u=v_{l} will be 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active and it will be activated at time step l𝑙l.∎
|
| 86 |
+
|
| 87 |
+
We can prove the following lemma in a similar way.
|
| 88 |
+
|
| 89 |
+
Lemma 1 and 2 give the necessary conditions for a node to be 𝕄𝕄\operatorname{\mathbb{M}}-active or 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active.
|
| 90 |
+
|
| 91 |
+
Now let us consider the M-dominant cascade priority. The following lemma shows a necessary and sufficient condition for a node to be 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active under the M-dominant cascade priority.
|
| 92 |
+
|
| 93 |
+
⟹:absent:\implies: Let a∈τ(𝕄)𝑎𝜏𝕄a\in\tau(\operatorname{\mathbb{M}}) be a node such that disģ(a,u)=disģ(τ(𝕄),u)subscriptdisģ𝑎𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(a,u)=\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u), and (v0,…,vl)subscript𝑣0…subscript𝑣𝑙(v_{0},...,v_{l}) be the shortest path from a𝑎a to u𝑢u, where v0=asubscript𝑣0𝑎v_{0}=a and vl=usubscript𝑣𝑙𝑢v_{l}=u. We prove the contrapositive. That is, assuming disģ(τ(𝕄¯),u)≥disģ(τ(𝕄),u)subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)\geq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u), we prove that v0,…,vlsubscript𝑣0…subscript𝑣𝑙v_{0},...,v_{l} are all 𝕄𝕄\operatorname{\mathbb{M}}-active and visubscript𝑣𝑖v_{i} will be activated at time step i𝑖i. Again, we prove this by induction. Because v0=asubscript𝑣0𝑎v_{0}=a is a seed node of some misinformation cascade and the cascade setting is M-dominant, v0subscript𝑣0v_{0} will be 𝕄𝕄\operatorname{\mathbb{M}}-active at time step 00. Suppose that, for some i𝑖i with 0<i<l0��𝑙0<i<l, v0,…,visubscript𝑣0…subscript𝑣𝑖v_{0},...,v_{i} are all 𝕄𝕄\operatorname{\mathbb{M}}-active and visubscript𝑣𝑖v_{i} is activated at time step i𝑖i. Now we prove that vi+1subscript𝑣𝑖1v_{i+1} will be 𝕄𝕄\operatorname{\mathbb{M}}-active at time step i+1𝑖1i+1. Because i+1𝑖1i+1 is the length of the shortest path from any seed node to visubscript𝑣𝑖v_{i}, visubscript𝑣𝑖v_{i} cannot be activated before time step i+1𝑖1i+1. Furthermore, by the inductive hypothesis, visubscript𝑣𝑖v_{i} will activate vi+1subscript𝑣𝑖1v_{i+1} at time step i+1𝑖1i+1 so vi+1subscript𝑣𝑖1v_{i+1} will be activated at time step i+1𝑖1i+1 by visubscript𝑣𝑖v_{i} or other in-neighbors. Finally, because the cascade priority is M-dominant and visubscript𝑣𝑖v_{i} is 𝕄𝕄\operatorname{\mathbb{M}}-active, visubscript𝑣𝑖v_{i} must be 𝕄𝕄\operatorname{\mathbb{M}}-active. By induction, u=vl𝑢subscript𝑣𝑙u=v_{l} will be 𝕄𝕄\operatorname{\mathbb{M}}-active and it will be activated at time step l𝑙l.
|
| 94 |
+
|
| 95 |
+
⟸:implied-byabsent:\impliedby: This part is exactly the Lemma 1.
|
| 96 |
+
|
| 97 |
+
∎
|
| 98 |
+
|
| 99 |
+
Now we are ready to prove that fģ(τ(P∗))superscript𝑓ģ𝜏subscript𝑃f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})) is monotone nondecreasing and submodular. According to Lemma 5, fģ(τ(P∗))superscript𝑓ģ𝜏subscript𝑃f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})) can be expressed asfģ(τ(P∗))=∑u∈Vfģ(τ(P∗),u),superscript𝑓ģ𝜏subscript𝑃subscript𝑢𝑉superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}))=\sum_{u\in V}f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u),where fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is defined asfģ(τ(P∗),u)={1if disģ(τ(𝕄¯),u)<disģ(τ(𝕄),u)0else,superscript𝑓ģ𝜏subscript𝑃𝑢cases1if disģ(τ(𝕄¯),u)<disģ(τ(𝕄),u)0elsef^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\begin{cases}1&\text{if $\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u)$}\\0&\text{else}\end{cases},(2)where τ(𝕄¯)𝜏¯𝕄\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}) depends on τ(P∗)𝜏subscript𝑃\tau(P_{*}). Now it suffices to prove that fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is monotone nondecreasing and submodular with respect to τ(P∗)𝜏subscript𝑃\tau(P_{*}).
|
| 100 |
+
|
| 101 |
+
It is clear monotone nondecreasing because adding one node to τ(P∗)𝜏subscript𝑃\tau(P_{*}) will not increase disģ(τ(𝕄¯),u)subscriptdisģ𝜏¯𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u). To prove the submodularity, it suffices to prove that for each S1⊆S2⊆V∗subscript𝑆1subscript𝑆2superscript𝑉S_{1}\subseteq S_{2}\subseteq V^{*} and x∉S2𝑥subscript𝑆2x\notin S_{2},fģ(S1∪{x},u)−fģ(S1,u)≥fģ(S2∪{x},u)−fģ(S2,u).superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u)\geq f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u).Because fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is monotone nondecreasing and it can be only 0 or 1, it suffices to show that fģ(S1∪{x},u)−fģ(S1,u)=1superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢1f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u)=1 whenever fģ(S2∪{x},u)−fģ(S2,u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u)=1. If fģ(S2∪{x},u)−fģ(S2,u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u)=1, then fģ(S2∪{x},u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)=1 and fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0. Because fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0 and disģ(S1,u)≥disģ(S2,u)subscriptdisģsubscript𝑆1𝑢subscriptdisģsubscript𝑆2𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(S_{1},u)\geq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(S_{2},u), we have fģ(S1,u)=0superscript𝑓ģsubscript𝑆1𝑢0f^{\operatorname{\text{\c{g}}}}(S_{1},u)=0 . Because fģ(S2∪{x},u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)=1 and fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0, by Eq. (2), we have disģ(x,u)<disģ(τ(𝕄),u)subscriptdisģ𝑥𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(x,u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u). Therefore, disģ(S1∪{x},u)<disģ(τ(𝕄),u)subscriptdisģsubscript𝑆1𝑥𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u) and fģ(S1∪{x},u)=1superscript𝑓ģsubscript𝑆1𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)=1. So fģ(S1∪{x},u)−fģ(S1,u)superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u) is also equal to 1.
|
| 102 |
+
|
| 103 |
+
∎
|
| 104 |
+
|
| 105 |
+
Now we prove the P-dominant case. The proof is similar to that of the M-dominant case. We use the following lemma analogous to Lemma 5.
|
| 106 |
+
|
| 107 |
+
⟸:implied-byabsent:\impliedby: Let a∈τ(𝕄¯)𝑎𝜏¯𝕄a\in\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}) be the node such that disģ(a,u)=disģ(τ(𝕄¯),u)subscriptdisģ𝑎𝑢subscriptdisģ𝜏¯𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(a,u)=\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u), and (v0,…,vl)subscript𝑣0…subscript𝑣𝑙(v_{0},...,v_{l}) be the shortest path from a𝑎a to u𝑢u where v0=asubscript𝑣0𝑎v_{0}=a and vl=usubscript𝑣𝑙𝑢v_{l}=u. Assuming disģ(τ(𝕄¯),u)≤disģ(τ(𝕄),u)subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)\leq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u), we can prove that v0,…,vlsubscript𝑣0…subscript𝑣𝑙v_{0},...,v_{l} are all 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active and visubscript𝑣𝑖v_{i} will be activated at time step i𝑖i. This is similar to the ``⟹"``"``\implies" part in the proof of Lemma 5.
|
| 108 |
+
|
| 109 |
+
⟹:absent:\implies: This part follows from Lemma 2.∎
|
| 110 |
+
|
| 111 |
+
Therefore, for the P-dominant case, fģ(τ(P∗))superscript𝑓ģ𝜏subscript𝑃f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})) can be represented as fģ(τ(P∗))=∑u∈V⋅fģ(τ(P∗),u),superscript𝑓ģ𝜏subscript𝑃⋅subscript𝑢𝑉superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}))=\sum_{u\in V}\cdot f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u), where fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is defined asfģ(τ(P∗),u)={1if disģ(τ(𝕄),u)≤disģ(τ(𝕄¯),u)0else.superscript𝑓ģ𝜏subscript𝑃𝑢cases1if disģ(τ(𝕄),u)≤disģ(τ(𝕄¯),u)0elsef^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\begin{cases}1&\text{if $\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u)\leq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)$}\\0&\text{else}\end{cases}.(3)Now it suffices to prove that fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is monotone nondecreasing and submodular.
|
| 112 |
+
|
| 113 |
+
It is clear monotone nondecreasing as adding one node to τ(P∗)𝜏subscript𝑃\tau(P_{*}) will not increase disģ(τ(𝕄),u)subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u). To prove submodularity, it suffices to prove that for each S1⊆S2⊆V∗subscript𝑆1subscript𝑆2superscript𝑉S_{1}\subseteq S_{2}\subseteq V^{*} and x∉S2𝑥subscript𝑆2x\notin S_{2},fģ(S1∪{x},u)−fģ(S1,u)≥fģ(S2∪{x},u)−fģ(S2,u).superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u)\geq f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u).It suffices to show that fģ(S1∪{x},u)−fģ(S1,u)=1superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢1f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u)=1 whenever fģ(S2∪{x},u)−fģ(S2,u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u)=1. If fģ(S2∪{x},u)−fģ(S2,u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u)=1, then fģ(S2∪{x},u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)=1 and fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0. Because fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0 and disģ(S1,u)≥disģ(S2,u)subscriptdisģsubscript𝑆1𝑢subscriptdisģsubscript𝑆2𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(S_{1},u)\geq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(S_{2},u), we have fģ(S1,u)=0superscript𝑓ģsubscript𝑆1𝑢0f^{\operatorname{\text{\c{g}}}}(S_{1},u)=0. Because fģ(S2∪{x},u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)=1 and fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0, by Eq. (3), disģ(x,u)≤disģ(τ(𝕄),u)subscriptdisģ𝑥𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(x,u)\leq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u). Therefore, disģ(S1∪{x},u)≤disģ(τ(𝕄),u)subscriptdisģsubscript𝑆1𝑥𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)\leq\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u) and fģ(S1∪{x},u)=1superscript𝑓ģsubscript𝑆1𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)=1. So fģ(S1∪{x},u)−fģ(S1,u)superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u) is also equal to 1.∎
|
| 114 |
+
|
| 115 |
+
Since we are considering the homogeneous cascade priority, we denote Fv()subscriptF𝑣\operatorname*{F}_{v}() as F()F\operatorname*{F}() without mentioning any node. For each u∈V𝑢𝑉u\in V, ģ∈𝒢ģ𝒢\operatorname{\text{\c{g}}}\in\operatorname{\mathcal{G}} and τ(P∗)⊆V∗𝜏subscript𝑃superscript𝑉\tau(P_{*})\subseteq V^{*}, letAģ(τ(P∗),u)={v∈τ(𝕄)∪τ(𝕄¯)|disģ(v,u)=disģ(τ(𝕄)∪τ(𝕄¯),u)}subscript𝐴ģ𝜏subscript𝑃𝑢conditional-set𝑣𝜏𝕄𝜏¯𝕄subscriptdisģ𝑣𝑢subscriptdisģ𝜏𝕄𝜏¯𝕄𝑢A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\{v\in\tau(\operatorname{\mathbb{M}})\cup\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}})|\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(v,u)=\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}})\cup\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)\}be the set of the node v𝑣v such that disģ(v,u)=disģ(τ(𝕄)∪τ(𝕄¯),u)subscriptdisģ𝑣𝑢subscriptdisģ𝜏𝕄𝜏¯𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(v,u)=\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}})\cup\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u). Letℂģ(τ(P∗),u)={C|C∈𝕄∪ℙ∪{P∗},τ(C)∩Aģ(τ(P∗),u)≠∅}subscriptℂģ𝜏subscript𝑃𝑢conditional-set𝐶formulae-sequence𝐶𝕄ℙsubscript𝑃𝜏𝐶subscript𝐴ģ𝜏subscript𝑃𝑢\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\{C|C\in\operatorname{\mathbb{M}}\cup\operatorname{\mathbb{P}}\cup\{P_{*}\},\tau(C)\cap A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\neq\emptyset\}be set of the cascade(s) with a seed node in Aģ(τ(P∗),u)subscript𝐴ģ𝜏subscript𝑃𝑢A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u). Let Cģ(τ(P∗),u)∈ℂģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢subscriptℂģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\in\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) be the cascade such thatCģ(τ(P∗),u)=argmaxC∈ℂģ(τ(P∗),u)F(C).subscript𝐶ģ𝜏subscript𝑃𝑢subscriptargmax𝐶subscriptℂģ𝜏subscript𝑃𝑢F𝐶C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\operatorname*{arg\,max}_{C\in\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)}\operatorname*{F}(C).
|
| 116 |
+
|
| 117 |
+
Let a𝑎a be an arbitrary node in τ(Cģ(τ(P∗),u))∩Aģ(τ(P∗),u)𝜏subscript𝐶ģ𝜏subscript𝑃𝑢subscript𝐴ģ𝜏subscript𝑃𝑢\tau(C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u))\cap A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u), and (v0=a,…,vl=u)formulae-sequencesubscript𝑣0𝑎…subscript𝑣𝑙𝑢(v_{0}=a,...,v_{l}=u) be the shortest path from a𝑎a to u𝑢u where v0=asubscript𝑣0𝑎v_{0}=a and vl=usubscript𝑣𝑙𝑢v_{l}=u.777According to the definition, τ(Cģ(τ(P∗),u))∩Aģ(τ(P∗),u)𝜏subscript𝐶ģ𝜏subscript𝑃𝑢subscript𝐴ģ𝜏subscript𝑃𝑢\tau(C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u))\cap A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) cannot be empty. We prove that v0,…,vlsubscript𝑣0…subscript𝑣𝑙v_{0},...,v_{l} are all Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)-active and visubscript𝑣𝑖v_{i} will be activated at time step i𝑖i. We prove this by induction.
|
| 118 |
+
|
| 119 |
+
Because a𝑎a belongs to Aģ(τ(P∗),u)subscript𝐴ģ𝜏subscript𝑃𝑢A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u), any cascade selecting a𝑎a as a seed node must in ℂģ(τ(P∗),u)subscriptℂģ𝜏subscript𝑃𝑢\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u). Since Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) has the highest priority among ℂģ(τ(P∗),u)subscriptℂģ𝜏subscript𝑃𝑢\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u), a=v0𝑎subscript𝑣0a=v_{0} will be Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)-active at time step 0.
|
| 120 |
+
|
| 121 |
+
Suppose that, for some 0<i<l0𝑖𝑙0<i<{l}, v0,…,visubscript𝑣0…subscript𝑣𝑖v_{0},...,v_{i} are all Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)-active and visubscript𝑣𝑖v_{i} is activated at time step i𝑖i. Now we prove that vi+1subscript𝑣𝑖1v_{i+1} will be Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)-active at time step i+1𝑖1i+1. Because i+1𝑖1i+1 is the length of the shortest path from any seed node to vi+1subscript𝑣𝑖1v_{i+1}, vi+1subscript𝑣𝑖1v_{i+1} cannot be activated before time step i+1𝑖1i+1. Furthermore, visubscript𝑣𝑖v_{i} will activate vi+1subscript𝑣𝑖1v_{i+1} at time step i+1𝑖1i+1, so vi+1subscript𝑣𝑖1v_{i+1} will be activated at time step i+1𝑖1i+1 by visubscript𝑣𝑖v_{i} or other in-neighbors. Note that only the cascades with seed nodes in Aģ(τ(P∗),u)subscript𝐴ģ𝜏subscript𝑃𝑢A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) are able to activate vi+1subscript𝑣𝑖1v_{i+1} at time step i+1𝑖1i+1. Because visubscript𝑣𝑖v_{i} is Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)-active and Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) has the highest priority among Aģ(τ(P∗),u)subscript𝐴ģ𝜏subscript𝑃𝑢A_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u), vi+1subscript𝑣𝑖1v_{i+1} will be activated by visubscript𝑣𝑖v_{i} at time step i+1𝑖1i+1 and it will be Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)-active.∎
|
| 122 |
+
|
| 123 |
+
According to Lemma 9, a node u𝑢u is 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active in ģģ\operatorname{\text{\c{g}}} under τ(P∗)𝜏subscript𝑃\tau(P_{*}) if and only if Cģ(τ(P∗),u)∈ℙ∪{P∗}subscript𝐶ģ𝜏subscript𝑃𝑢ℙsubscript𝑃C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\in\operatorname{\mathbb{P}}\cup\{P_{*}\}. Therefore, under the homogeneous cascade setting, fģ(τ(P∗))superscript𝑓ģ𝜏subscript𝑃f^{\operatorname{\text{\c{g}}}}(\tau(P_{*})) can be represented as fģ(τ(P∗))=∑u∈Vfģ(τ(P∗),u),superscript𝑓ģ𝜏subscript𝑃subscript𝑢𝑉superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}))=\sum_{u\in V}f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u), where fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is defined asfģ(τ(P∗),u)={1if Cģ(τ(P∗),u)∈ℙ∪{P∗}0else, Cģ(τ(P∗),u)∈𝕄.superscript𝑓ģ𝜏subscript𝑃𝑢cases1if Cģ(τ(P∗),u)∈ℙ∪{P∗}0else, Cģ(τ(P∗),u)∈𝕄f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\begin{cases}1&\text{if $C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\in\operatorname{\mathbb{P}}\cup\{P_{*}\}$}\\0&\text{else, $C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\in\operatorname{\mathbb{M}}$}\end{cases}.
|
| 124 |
+
|
| 125 |
+
Now it suffices to prove that fģ(S,u)superscript𝑓ģ𝑆𝑢f^{\operatorname{\text{\c{g}}}}(S,u) is monotone nondecreasing and submodular.
|
| 126 |
+
|
| 127 |
+
When a new node x𝑥x is added to τ(P∗)𝜏subscript𝑃\tau(P_{*}), disģ(τ(C),u)subscriptdisģ𝜏𝐶𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(C),u) remains unchanged for C≠P∗𝐶subscript𝑃C\neq P_{*}, and disģ(τ(P∗),u)subscriptdisģ𝜏subscript𝑃𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) either decreases or remains unchanged. Therefore, after adding a new node to τ(P∗)𝜏subscript𝑃\tau(P_{*}), there are three possible cases. First, P∗subscript𝑃P_{*} becomes a new cascade in ℂģ(τ(P∗),u)subscriptℂģ𝜏subscript𝑃𝑢\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u). Second, P∗subscript𝑃P_{*} is the only cascade in ℂģ(τ(P∗),u)subscriptℂģ𝜏subscript𝑃𝑢\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u). Third, ℂģ(τ(P∗),u)subscriptℂģ𝜏subscript𝑃𝑢\operatorname{\mathbb{C}}_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) remains unchanged. In either of the three cases, Cģ(τ(P∗),u)subscript𝐶ģ𝜏subscript𝑃𝑢C_{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) cannot change to a misinformation cascade from a positive cascade. Therefore, fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢f^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) is monotone nondecreasing.∎
|
| 128 |
+
|
| 129 |
+
Again, it suffices to prove that for each ģģ\operatorname{\text{\c{g}}}, S1⊆S2⊆V∗subscript𝑆1subscript𝑆2superscript𝑉S_{1}\subseteq S_{2}\subseteq V^{*} and x∉S2𝑥subscript𝑆2x\notin S_{2},fģ(S1∪{x},u)−fģ((S1,u))≥fģ(S2∪{x},u)−fģ(S2,u).superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}((S_{1},u))\geq f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u).Furthermore, it suffices to show that fģ(S1∪{x},u)−fģ(S1,u)=1superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢1f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u)=1 whenever fģ(S2∪{x},u)−fģ(S2,u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u)=1. If fģ(S2∪{x},u)−fģ(S2,u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢superscript𝑓ģsubscript𝑆2𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{2},u)=1, then fģ(S2∪{x},u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)=1 and fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0. Because fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0, we have Cģ(S2,u)∈𝕄subscript𝐶ģsubscript𝑆2𝑢𝕄C_{\operatorname{\text{\c{g}}}}(S_{2},u)\in\operatorname{\mathbb{M}}. Since S1⊆S2subscript𝑆1subscript𝑆2S_{1}\subseteq S_{2}, by the discussion in the proof of Lemma 10, Cģ(S1,u)subscript𝐶ģsubscript𝑆1𝑢C_{\operatorname{\text{\c{g}}}}(S_{1},u) also belongs 𝕄𝕄\operatorname{\mathbb{M}} and therefore fģ(S1,u)=0superscript𝑓ģsubscript𝑆1𝑢0f^{\operatorname{\text{\c{g}}}}(S_{1},u)=0. Because fģ(S2∪{x},u)=1superscript𝑓ģsubscript𝑆2𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)=1 and fģ(S2,u)=0superscript𝑓ģsubscript𝑆2𝑢0f^{\operatorname{\text{\c{g}}}}(S_{2},u)=0, we have Cģ(S2,u)∈𝕄subscript𝐶ģsubscript𝑆2𝑢𝕄C_{\operatorname{\text{\c{g}}}}(S_{2},u)\in\operatorname{\mathbb{M}} and Cģ(S2∪{x},u)∈ℙsubscript𝐶ģsubscript𝑆2𝑥𝑢ℙC_{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u)\in\operatorname{\mathbb{P}}. According to the three cases in the proof of Lemma 10, Cģ(S2∪{x},u)subscript𝐶ģsubscript𝑆2𝑥𝑢C_{\operatorname{\text{\c{g}}}}(S_{2}\cup\{x\},u) must be P∗subscript𝑃P_{*}. Therefore, Cģ(S1∪{x},u)subscript𝐶ģsubscript𝑆1𝑥𝑢C_{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u) is also P∗subscript𝑃P_{*} and fģ(S1∪{x},u)=1superscript𝑓ģsubscript𝑆1𝑥𝑢1f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)=1. So fģ(S1∪{x},u)−fģ(S1,u)superscript𝑓ģsubscript𝑆1𝑥𝑢superscript𝑓ģsubscript𝑆1𝑢f^{\operatorname{\text{\c{g}}}}(S_{1}\cup\{x\},u)-f^{\operatorname{\text{\c{g}}}}(S_{1},u) is also equal to 1.∎
|
| 130 |
+
|
| 131 |
+
The proof of Theorem 4 requires the preliminaries given in the last subsection. For each ģ∈𝒢ģ𝒢\operatorname{\text{\c{g}}}\in\operatorname{\mathcal{G}} and u∈V𝑢𝑉u\in V, let us definefģ(τ(P∗),u)={1if u is 𝕄¯-active under τ(P∗) in ģ with cascade priority Fv for each v0else,superscript𝑓ģ𝜏subscript𝑃𝑢cases1if u is 𝕄¯-active under τ(P∗) in ģ with cascade priority Fv for each v0else{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\begin{cases}1&\text{if $u$ is $\operatorname{\overline{{\operatorname{\mathbb{M}}}}}$-active under $\tau(P_{*})$ in $\operatorname{\text{\c{g}}}$ with cascade priority ${\operatorname*{F}}_{v}$ for each $v$}\\0&\text{else}\end{cases},f¯ģ(τ(P∗),u)={1if u is 𝕄¯-active under τ(P∗) in ģ with cascade priority F¯v for each v0else,superscript¯𝑓ģ𝜏subscript𝑃𝑢cases1if u is 𝕄¯-active under τ(P∗) in ģ with cascade priority F¯v for each v0else\overline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\begin{cases}1&\text{if $u$ is $\operatorname{\overline{{\operatorname{\mathbb{M}}}}}$-active under $\tau(P_{*})$ in $\operatorname{\text{\c{g}}}$ with cascade priority $\overline{\operatorname*{F}}_{v}$ for each $v$}\\0&\text{else}\end{cases},andf¯ģ(τ(P∗),u)={1if u is 𝕄¯-active under τ(P∗) in ģ with cascade priority F¯v for each v0else.superscript¯𝑓ģ𝜏subscript𝑃𝑢cases1if u is 𝕄¯-active under τ(P∗) in ģ with cascade priority F¯v for each v0else\underline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=\begin{cases}1&\text{if $u$ is $\operatorname{\overline{{\operatorname{\mathbb{M}}}}}$-active under $\tau(P_{*})$ in $\operatorname{\text{\c{g}}}$ with cascade priority $\underline{\operatorname*{F}}_{v}$ for each $v$}\\0&\text{else}\end{cases}.According to Eq. (1), it suffices to show that f¯ģ(τ(P∗),u)≥fģ(τ(P∗),u)≥f¯ģ(τ(P∗),u)superscript¯𝑓ģ𝜏subscript𝑃𝑢superscript𝑓ģ𝜏subscript𝑃𝑢superscript¯𝑓ģ𝜏subscript𝑃𝑢\overline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\geq{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\geq\underline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u).
|
| 132 |
+
|
| 133 |
+
When f¯ģ(τ(P∗),u)=1superscript¯𝑓ģ𝜏subscript𝑃𝑢1\underline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=1, by Lemma 3, we have disģ(τ(𝕄¯),u)<disģ(τ(𝕄),u)subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)<\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u). According to Lemma 1, u𝑢u will be 𝕄¯¯𝕄\operatorname{\overline{{\operatorname{\mathbb{M}}}}}-active under Fvsubscript𝐹𝑣F_{v} and thus fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) must be 1. Therefore, fģ(τ(P∗),u)≥f¯ģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢superscript¯𝑓ģ𝜏subscript𝑃𝑢{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\geq\underline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u).
|
| 134 |
+
|
| 135 |
+
When f¯ģ(τ(P∗),u)=0superscript¯𝑓ģ𝜏subscript𝑃𝑢0\overline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)=0, by Lemma 5, we have disģ(τ(𝕄¯),u)>disģ(τ(𝕄),u)subscriptdisģ𝜏¯𝕄𝑢subscriptdisģ𝜏𝕄𝑢\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\overline{{\operatorname{\mathbb{M}}}}}),u)>\operatorname*{dis}_{\operatorname{\text{\c{g}}}}(\tau(\operatorname{\mathbb{M}}),u). According to Lemma 2, u𝑢u will be 𝕄𝕄\operatorname{\mathbb{M}}-active under Fvsubscript𝐹𝑣F_{v} and thus fģ(τ(P∗),u)superscript𝑓ģ𝜏subscript𝑃𝑢{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u) must be 0. Therefore, f¯ģ(τ(P∗),u)≥fģ(τ(P∗),u)superscript¯𝑓ģ𝜏subscript𝑃𝑢superscript𝑓ģ𝜏subscript𝑃𝑢\overline{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u)\geq{f}^{\operatorname{\text{\c{g}}}}(\tau(P_{*}),u).
|
| 136 |
+
|
| 137 |
+
The statistics of the datasets are listed in Table 1
|
| 138 |
+
|
| 139 |
+
For the case of five cascades, we deploy two existing misinformation cascades and two existing positive cascades. For the case of ten cascades, we deploy four existing misinformation cascades and five existing positive cascades. For each existing cascade, the size of the seed set is set as 20 and the seed nodes are selected from the node with the highest single-node influence. The seed sets of different cascades do not overlap with each other. The budget of P∗subscript𝑃P_{*} is enumerated from {1,2,…,20}12…20\{1,2,...,20\}. The cascade priority at each node is assigned randomly, by generating random permutations. The lists of the used random permutations over {1,2,3}123\{1,2,3\}, {1,…,5}1…5\{1,...,5\} and {1,…,10}1…10\{1,...,10\} are provided in the supplementary material. For each dataset, the list of the nodes ordered by single-node influence is provided in the supplementary material.
|
| 140 |
+
|
| 141 |
+
The performance of ALG. 1 on f¯¯𝑓\overline{f}, f𝑓f and f¯¯𝑓\underline{f} on each dataset is shown in Figs. 7, 8 and 9. As we can see in the figures, maximizing the upper or lower bound may provide a better solution that just maximizing the objective function. Therefore, the sandwich algorithm is effective than the naive greedy algorithm on f𝑓f.
|
1809.06508v2.txt
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Scene text recognition has been an active research field in computer vision because it is a critical element of a lot of real-world applications, such as street sign
|
| 3 |
+
reading in the driverless vehicle, human computer interaction, assistive technologies for the blind and guide board recognition~\cite{DBLP:conf/eccv/RongYT16,ZhuLYL18}. As compared to the maturity of document recognition, scene text recognition is still a challenging task due to large variations in text shapes, fonts, colors, backgrounds, etc.
|
| 4 |
+
|
| 5 |
+
Most of the recent works~\cite{DBLP:journals/pami/ShiBY17,DBLP:conf/cvpr/ShiWLYB16,zhu2016scene} convert scene text recognition into sequence recognition, which hugely simplifies the problem and leads to great performance on regular text. As shown in Fig.~\ref{subfig-1:introduction}, they firstly encode the input image into a feature sequence and then apply decoders such as RNN~\cite{hochreiter1997long} and CTC~\cite{ctc} to decode the target sequence. These methods produce good results when the text in the image is horizontal or nearly horizontal. However, different from speech, text in scene images is essentially distributed in a two-dimensional space. For example, the distribution of the characters can be scattered, in arbitrary orientations, and even in curve shapes, as shown in Fig.~\ref{fig:introduction}. In these cases, roughly encoding the images into one-dimensional sequences may lose key information or bring undesired noises.
|
| 6 |
+
\cite{DBLP:conf/cvpr/ShiWLYB16} tried to alleviate this problem by adopting a Spatial Transform Network (STN)~\cite{stn} to rectify the shape of the text. Nevertheless, \cite{DBLP:conf/cvpr/ShiWLYB16} still used a sequence-based model, so the effect of the rectification is limited.
|
| 7 |
+
|
| 8 |
+
\begin{figure}[!htbp]
|
| 9 |
+
\begin{center}
|
| 10 |
+
\captionsetup[subfigure]{justification=centering}
|
| 11 |
+
\centering
|
| 12 |
+
\subfloat[\label{subfig-1:introduction}]{%
|
| 13 |
+
\includegraphics[width=0.2\textwidth]{figures/introduction1_crop.pdf}
|
| 14 |
+
}
|
| 15 |
+
\subfloat[\label{subfig-2:introduction}]{%
|
| 16 |
+
\includegraphics[width=0.2\textwidth]{figures/introduction2_crop.pdf}
|
| 17 |
+
}
|
| 18 |
+
\end{center}
|
| 19 |
+
\caption{Illustration of text recognition in one-dimensional and two-dimensional spaces. (a) shows the recognition procedures of sequence-based methods. (b) presents the proposed segmentation-based method. Different colors mean different character classes.}
|
| 20 |
+
\label{fig:introduction}
|
| 21 |
+
\end{figure}
|
| 22 |
+
|
| 23 |
+
\begin{figure*}[ht]
|
| 24 |
+
\centering
|
| 25 |
+
\includegraphics[width=0.85\linewidth]{figures/network_crop.pdf}
|
| 26 |
+
\caption{Illustration of the CA-FCN. The blue feature maps in the left are inherited from the VGG-16 backbone; The yellow feature maps in the right are extra layers. H, W mean the height and width of the input image; C is the number of classes.}
|
| 27 |
+
\label{fig:network}
|
| 28 |
+
\end{figure*}
|
| 29 |
+
|
| 30 |
+
As discussed above, the limitations of sequence-based methods are mainly caused by the difference between the one-dimensional distribution of feature sequences and the two-dimensional distribution of text in scene images. To overcome these limitations, we tackle the scene text recognition problem in a new and natural perspective. We propose to directly predict the text in a two-dimensional space instead of a one-dimensional sequence. Inspired by FCN~\cite{fcn}, a Character Attention Fully Convolutional Network (CA-FCN) is proposed to predict the characters at pixel level. Then the word, as well as the location of each character, can be obtained by a word formation module, as shown in Fig.~\ref{subfig-2:introduction}. In this way, the procedures of compressing and slicing the features, which are widely used in the sequence-based methods, are avoided. Profiting from the higher dimensional perspective, the proposed method is much more robust than the previous sequence-based methods in terms of text shapes, background noises, and imprecise localizations from the detection stage~\cite{LiaoSBWL17,LiaoSB18,liao2018rotation}. Character-level annotations are needed in our proposed method. However, the character annotations are free of labor because only public synthetic data is used in the training period, where the annotations are easy to obtain.
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
The contributions of this paper can be summarized as follows:
|
| 34 |
+
(1) A totally different perspective for recognizing scene text is proposed. Different from the recent works which treat the text recognition problem as a sequence recognition problem in one-dimensional space, we propose to solve the problem in two-dimensional space.
|
| 35 |
+
(2) We devise character attention FCN for scene text recognition. To the best of our knowledge, which can deal with images of arbitrary height and width, as well as naturally recognize text in various shapes, including but not limited to oriented and curve shapes.
|
| 36 |
+
(3) The proposed method achieves state-of-the-art performance on regular datasets and outperforms the existing methods with a large margin on irregular datasets.
|
| 37 |
+
(4) We investigate the network's robustness to imprecise localization in the text detection phase for the first time. This problem is important in real-world applications but was previously ignored. Experiments show that the proposed method is more robust to imprecise localization (see
|
| 38 |
+
. Ablation study).
|
| 39 |
+
\section{Related Work}
|
| 40 |
+
Traditionally, scene text recognition systems firstly detect each character, using binarization or sliding-window operation, then recognize these characters as a word. Binarization-based methods, such as Extremal Regions~\cite{DBLP:conf/eccv/NovikovaBKL12} and Niblack's adaptive binarization~\cite{DBLP:conf/iccv/BissaccoCNN13}, find character pixels after binarization. However, text in the natural scene image may have varying backgrounds, fonts, colors or uneven illumination and so on, which binarization based methods can hardly handle. Sliding window methods use multi-scale sliding window strategy to localize characters from the text image directly, such as Random Ferns~\cite{DBLP:conf/iccv/WangBB11}, Integer Programming~\cite{DBLP:conf/cvpr/SmithFL11} and Convolutional Neural Network (CNN)~\cite{DBLP:conf/eccv/JaderbergVZ14}. For the word recognition stage, common methods are integrating contextual information with character classification scores, such as Pictorial Structure models, Bayesian inference, and Conditional Random Field (CRF), which are employed in \cite{DBLP:conf/iccv/WangBB11,DBLP:journals/pami/WeinmanLH09,DBLP:conf/bmvc/MishraAJ12,DBLP:conf/cvpr/MishraAJ12,DBLP:conf/cvpr/ShiWXZGZ13}.
|
| 41 |
+
|
| 42 |
+
Inspired by speech recognition, recent works designed an encoder-decoder framework, where text in images are encoded into feature sequences and then decoded as characters. With the development of the deep neural network, convolutional features are extracted at encoder stage, and then RNN or CNN network is applied to decode these features, then CTC is used to form the final word. This framework was proposed by \cite{DBLP:journals/pami/ShiBY17}. Later they also developed an attention-based STN for rectifying text distortion, which is useful to recognize curved scene text~\cite{DBLP:conf/cvpr/ShiWLYB16}. Based on this framework, subsequent works~\cite{conf/aaai/HeH0LT16,DBLP:conf/icfhr/WuYLLW16,DBLP:conf/aaai/LiuCW18} also focus on irregular scene text.
|
| 43 |
+
|
| 44 |
+
The encoder-decoder framework has dominated current text recognition works. Many systems based on this framework have achieved state-of-the-art performance. However, text in scene images are distributed in a two-dimensional space, which is different from speech. The encoder-decoder framework just considers them as one-dimensional sequences, bringing some problems. For example, compressing a text image into a feature sequence may lose key information and add extra noise, especially when the text is curved or seriously distorted.
|
| 45 |
+
|
| 46 |
+
There are some works that tried to improve some disadvantages of the encoder-decoder framework. \cite{bai2018edit} found that when considering the scene text recognition problem under the attention-based encoder-decoder framework, the misalignment between the ground truth strings and the attention's output sequences of the probability distribution, which is caused by missing or superfluous characters, will confuse and mislead the training process. To handle this problem, they propose a method called edit probability which considered losses including not only the probability distribution but also the possible occurrences of missing/superfluous characters. \cite{cheng2018aon} aimed to handle oriented text and realized that it is hard for the current encoder-decoder framework to capture the deep features of the oriented text. To solve this problem, they encode the input image to four feature sequences of four directions to extract scene text features in those directions. \cite{masktextspotter} proposed an instance segmentation model for word spotting, which uses an FCN-based method in its recognition part. However, it focused on the end-to-end word spotting task and no discussion is applied to verify the recognition part.
|
| 47 |
+
|
| 48 |
+
In this paper, we consider text recognition from the two-dimensional perspective and design a character attention FCN to deal with text recognition problem, which can naturally avoid those disadvantages of the encoder-decoder frameworks.
|
| 49 |
+
For example, compressing a text image into a feature sequence may lose key information and add extra noise, especially when the text is curved or seriously distorted.
|
| 50 |
+
The proposed method obtains high accuracy on both regular and irregular text, Meanwhile, it is also robust to imprecise localization in the text detection phase.
|
| 51 |
+
\section{Methodology}
|
| 52 |
+
|
| 53 |
+
\subsection{Overview}
|
| 54 |
+
The whole architecture of our proposed method consists of two parts. The first part is a Character Attention FCN (CA-FCN) which predicts the characters at pixel level. Another part is a word formation module which groups and arranges the pixels to form the final word result.
|
| 55 |
+
\subsection{Character attention FCN}
|
| 56 |
+
The architecture of CA-FCN is basically a fully convolutional network, as shown in Fig.~\ref{fig:network}. We use VGG-16 as the backbone while dropping the fully connected layers and removing its pooling layers of stage-4 and stage-5. Besides, a pyramid-like structure~\cite{fpn} is adopted to handle varying scales of characters. The final output is of shape $\frac{H}{2} \times \frac{W}{2} \times C$, where $H$, $W$ are the height and width of the input image and $C$ is the number of classes including character categories and background. It can handle text of various shapes by predicting characters in a two-dimensional space.
|
| 57 |
+
\subsubsection{Character attention module}
|
| 58 |
+
Attention module plays an important role in our network. Natural scene text recognition suffers from complex backgrounds, shadow, irrelevant symbols and so on. Moreover, characters in natural images are usually crowded, which can hardly be separated. To deal with those problems, inspired by~\cite{res-attention}, we propose a character attention module to highlight the foreground characters and weaken the background, as well as separate adjacent characters, as illustrated in Fig.~\ref{fig:network}. Attention module is appended to each output layer of VGG16. The low-level attention models mainly focus on the appearance, such as edge, color, and texture. And the high-level modules can extract more semantic information. The character attention module can be expressed as follows:
|
| 59 |
+
\begin{equation}
|
| 60 |
+
F_o = F_i \otimes (1+A)
|
| 61 |
+
\end{equation}
|
| 62 |
+
where $F_i$ and $F_o$ are the input and output feature map respectively; $A$ indicates the attention map; $\otimes$ means element-wise multiplication. The attention map is generated by two convolutional layers and a two-class (characters and background) soft-max function where $0$ represents background and $1$ indicates characters. The attention map $A$ is broadcast to the same shape as $F_i$ to achieve element-wise multiplication.
|
| 63 |
+
Compared with \cite{res-attention}, our character attention module uses a simpler network structure, profiting from the character supervision.
|
| 64 |
+
The effectiveness of the character attention module is discussed in Sec. Ablation study.
|
| 65 |
+
|
| 66 |
+
\begin{figure}[!htp]
|
| 67 |
+
\begin{center}
|
| 68 |
+
\captionsetup[subfigure]{justification=centering}
|
| 69 |
+
\centering
|
| 70 |
+
\subfloat[\label{subfig-1:deform}]{%
|
| 71 |
+
\includegraphics[width=0.2\textwidth]{figures/deform1.png}
|
| 72 |
+
}
|
| 73 |
+
\subfloat[\label{subfig-2:deform}]{%
|
| 74 |
+
\includegraphics[width=0.2\textwidth]{figures/deform2.png}
|
| 75 |
+
}
|
| 76 |
+
\end{center}
|
| 77 |
+
\caption{Illustration of our deformable convolution. (a) normal convolution; (b) deformable convolution with $3*1$ convolution. The green boxes indicate convolutional kernels. The yellow boxes mean the regions covered by receptive fields. The receptive fields out of the image are clipped.}
|
| 78 |
+
\label{fig:deform}
|
| 79 |
+
\end{figure}
|
| 80 |
+
\subsubsection{Deformable convolution}
|
| 81 |
+
As shown in Fig.~\ref{fig:network}, deformable convolution~\cite{deform} is applied in stage-4 and stage-5. The deformable convolution learns offsets of the convolution kernel, which provides more flexible receptive fields for the character prediction. The kernel size of deformable convolution is set to $3 \times 3$ as default. The kernel size of the convolution after the deformable convolution is set to $3 \times 1$. In Fig.~\ref{fig:deform}, there is a toy description of normal convolution, the deformable convolution with $3 \times 1$ convolutional kernel, as well as their receptive fields. The image in Fig.~\ref{fig:deform} is an expanded text image where more background is included in the image. Since most of the training images are cropped with tight bounding boxes, and the normal convolution contains a lot of character information due to the fixed receptive field, it tends to predict the extra background as a character. However, if deformable convolution and $3 \times 1$ convolution kernel are applied, with better and more flexible receptive field, the extra background can be predicted correctly. Note that the extra background is very common in real-world applications as the detection results may be inaccurate. Thus, the robustness on expanded text images is significant. The effectiveness of the deformable convolution is discussed in Sec. Ablation study by experiments.
|
| 82 |
+
\subsection{Training}
|
| 83 |
+
\paragraph{Label generation}
|
| 84 |
+
Let $b=(x_{min}, y_{min}, x_{max}, y_{max})$ be the original bounding boxes of characters, which can be expressed as the minimum axis-aligned rectangle boxes that covers the characters. The ground truth character regions $g=(x_{min}^g,y_{min}^g,x_{max}^g,y_{max}^g)$ can be calculated as follows:
|
| 85 |
+
\begin{equation} \label{label_gen}
|
| 86 |
+
\begin{split}
|
| 87 |
+
w & = x_{max} - x_{min} \\
|
| 88 |
+
h & = y_{max} - y_{min} \\
|
| 89 |
+
x_{min}^g & = (x_{min} + x_{max} - w \times r ) / 2 \\
|
| 90 |
+
y_{min}^g & = (y_{min} + y_{max} - h \times r ) / 2 \\
|
| 91 |
+
x_{max}^g & = (x_{min} + x_{max} + w \times r ) / 2 \\
|
| 92 |
+
y_{max}^g & = (y_{min} + y_{max} + h \times r ) / 2
|
| 93 |
+
\end{split}
|
| 94 |
+
\end{equation}
|
| 95 |
+
where $r$ is the shrink ratio of the character regions. We shrink the character regions because the adjacent characters tend to be overlapped without shrinking. The shrink process can reduce the difficulty of the word formation. Specifically, we set $r$ to $0.5$ and $0.25$ for the attention supervision and the final output supervision respectively.
|
| 96 |
+
|
| 97 |
+
\begin{figure}[!hbp]
|
| 98 |
+
\begin{center}
|
| 99 |
+
\captionsetup[subfigure]{justification=centering}
|
| 100 |
+
\centering
|
| 101 |
+
\subfloat[\label{subfig-1:labels}]{%
|
| 102 |
+
\includegraphics[width=0.14\textwidth]{figures/label_gen_1.pdf}
|
| 103 |
+
}
|
| 104 |
+
\subfloat[\label{subfig-2:labels}]{%
|
| 105 |
+
\includegraphics[width=0.14\textwidth]{figures/label_gen_2.pdf}
|
| 106 |
+
}
|
| 107 |
+
\subfloat[\label{subfig-3:labels}]{%
|
| 108 |
+
\includegraphics[width=0.14\textwidth]{figures/label_gen_3.pdf}
|
| 109 |
+
}
|
| 110 |
+
\end{center}
|
| 111 |
+
\caption{Illustration of ground truth generation. (a) Original bounding boxes; (b) Ground truth for character attention; (c) Ground truth for character prediction, where different colors represent different character classes.}
|
| 112 |
+
\label{fig:labels}
|
| 113 |
+
\end{figure}
|
| 114 |
+
|
| 115 |
+
\paragraph{Loss function}
|
| 116 |
+
The loss function is a weighted sum of the character prediction loss function $L_p$ and the character attention loss function $L_a$:
|
| 117 |
+
\begin{equation}
|
| 118 |
+
L = L_p + \alpha \sum_{s=2}^{5}L_a^s
|
| 119 |
+
\end{equation}
|
| 120 |
+
where $s$ indicates the index of the stages, as shown in Fig.~\ref{fig:network}; $\alpha$ is empirically set to $1.0$.
|
| 121 |
+
|
| 122 |
+
The final output of the CA-FCN is of shape $\frac{H}{2} \times \frac{W}{2} \times C$, where $H$, $W$ are the height and width of an input image respectively. $C$ is the number of classes including character classes and background. Assume that $X_{i,j,c}$ is one of the element of the output map, where $i \in \{1, ..., \frac{H}{2}\}$, $j \in \{1, ..., \frac{W}{2}\}$, and $c \in \{0,1, ..., C-1\}$; $Y_{i,j} \in \{0,1, ..., C-1\}$ indicates the corresponding class label. The prediction loss can be calculated as follows:
|
| 123 |
+
\begin{equation}
|
| 124 |
+
\begin{aligned}
|
| 125 |
+
L_p = & -\frac{4}{H \times W}\sum_{i=1}^{H/2}\sum_{j=1}^{W/2}W_{i,j}(\\
|
| 126 |
+
& \sum_{c=0}^{C-1}
|
| 127 |
+
(Y_{i,j}==c) log(\frac{e^{X_{i,j,c}}}{\sum_{k=0}^{C-1} e^{X_{i,j,k}}})),
|
| 128 |
+
\end{aligned}
|
| 129 |
+
\end{equation}
|
| 130 |
+
where $W_{i,j}$ is the corresponding weight of each pixel. Assume that $N=\frac{H}{2} \times \frac{W}{2}$ and $N_{neg}$ is the number of background pixels. The weight can be calculated as follows:
|
| 131 |
+
\begin{equation}
|
| 132 |
+
W_{i,j} =
|
| 133 |
+
\begin{cases}
|
| 134 |
+
N_{neg} / (N - N_{neg})& \text{if } Y_{i,j}>0, \\
|
| 135 |
+
1& \text{otherwise}
|
| 136 |
+
\end{cases}
|
| 137 |
+
\end{equation}
|
| 138 |
+
The character attention loss function is a binary cross entropy loss function which take all characters labels as $1$, background label as $0$:
|
| 139 |
+
\begin{equation}
|
| 140 |
+
\begin{aligned}
|
| 141 |
+
L_a^s = & -\frac{4}{H_s \times W_s}\sum_{i=1}^{H_s/2}\sum_{j=1}^{W_s/2}(\\
|
| 142 |
+
& \sum_{c=0}^{1} (Y_{i,j}==c) log(\frac{e^{X_{i,j,c}}}{\sum_{k=0}^{1} e^{X_{i,j,k}}}),
|
| 143 |
+
\end{aligned}
|
| 144 |
+
\end{equation}
|
| 145 |
+
where $H_s$ and $W_s$ are the height and width of the feature map in the corresponding stage $s$ respectively.
|
| 146 |
+
\subsection{Word formation module}
|
| 147 |
+
The word formation module converts the accurate, two-dimensional character maps predicted by CA-FCN into character sequence. As shown in Fig.~\ref{fig:word_form}, we firstly transform the character prediction map into a binary map with a threshold to extract the corresponding character regions; then, we calculate the average values of each region for $C$ classes and assign the class with the largest average value to the corresponding region; finally, the word is formed by sorting the regions from left to right. In this way, both the word and location of each character are produced. The word formation module assumes that words are roughly sorted from left to right, which may not work in certain scenarios. However, if necessary, a learnable component can be plugged into CA-FCN. The word formation module is simple yet effective, with only one hyper-parameter (the threshold to form binary map), which is set to $240/255$ for all experiments.
|
| 148 |
+
|
| 149 |
+
\begin{figure*}[ht]
|
| 150 |
+
\centering
|
| 151 |
+
\includegraphics[width=0.85\linewidth]{figures/form_word_crop.pdf}
|
| 152 |
+
\caption{Illustration of the word formation module.}
|
| 153 |
+
\label{fig:word_form}
|
| 154 |
+
\end{figure*}
|
| 155 |
+
|
| 156 |
+
\begin{figure*}[ht]
|
| 157 |
+
\centering
|
| 158 |
+
\includegraphics[width=0.85\linewidth]{figures/visu_crop.pdf}
|
| 159 |
+
\caption{Visualization of character prediction maps on IIIT and CUTE. The character prediction map generated by the CA-FCN is visualized with colors.}
|
| 160 |
+
\label{fig:visu}
|
| 161 |
+
\end{figure*}
|
| 162 |
+
\section{Experiments}
|
| 163 |
+
|
| 164 |
+
\subsection{Datasets}
|
| 165 |
+
Our proposed CA-FCN is purely trained on the synthetic datasets without real-world images. The trained model, without further fine-tuning, was evaluated on 4 benchmarks including regular and irregular text datasets.
|
| 166 |
+
|
| 167 |
+
\textbf{SynthText} is a synthetic text dataset proposed in \cite{gupta2016synthetic}. It contains 800,000 training images which are aimed at text detection. We crop them based on their word bounding boxes. It generates about 7 million images for text recognition. These images are with character-level annotations.
|
| 168 |
+
|
| 169 |
+
\textbf{IIIT5k-Words} (IIIT)~\cite{DBLP:conf/cvpr/MishraAJ12} consists of 3000 test images collected from the web. It provides two lexicons for each image in the dataset, which contains 50 words and 1000 words respectively.
|
| 170 |
+
|
| 171 |
+
\textbf{Street View Text} (SVT)~\cite{DBLP:conf/iccv/WangBB11} comes from the Google Street View. The test set consists of 647 images. It is challenging due to its low resolution and noises. A 50-word lexicon is given for each image.
|
| 172 |
+
|
| 173 |
+
\textbf{ICDAR 2013} (IC13)~\cite{karatzas2013icdar} contains 1015 images and no lexicon is provided. We remove images that contain non-alphanumeric characters or have less than three characters, following previous works.
|
| 174 |
+
|
| 175 |
+
\textbf{CUTE}~\cite{cute} is a dataset consists of 288 images with a lot of curved text. It is challenging because the shapes vary hugely. No lexicon is provided.
|
| 176 |
+
\subsection{Implementation details}
|
| 177 |
+
|
| 178 |
+
\subsubsection{Training}
|
| 179 |
+
Since our network is fully convolutional, there is no restriction on the size of input images. We adopt multi-scale training to make our model more robust. The input images are randomly resized to $32 \times 128$, $48 \times 192$, and $64 \times 256$. Besides, data augmentation is also applied in the training period, including random rotation, hue, brightness, contrast, and blur. Specifically, we randomly rotate the image with an angle in the range of $[-15^\circ, 15^\circ]$.
|
| 180 |
+
We use Adam~\cite{adam} to optimize our training with the initial learning rate $10^{-4}$. The learning rate is decreased to $10^{-5}$ and $10^{-6}$ at epoch 3 and epoch 4. The model is totally trained for about 5 epochs. The number of character classes is set to $38$, including $26$ alphabet, $10$ digitals, $1$ special character which represents those characters out of alphabet and digitals, and $1$ background.
|
| 181 |
+
\subsubsection{Testing}
|
| 182 |
+
At runtime, images are resized to $H_t \times W_t$, where $H_t$ is fixed to $64$ and $W_t$ is calculated as follows:
|
| 183 |
+
\begin{equation}
|
| 184 |
+
W_t =
|
| 185 |
+
\begin{cases}
|
| 186 |
+
W*H_t/H& \text{if } W/H>4, \\
|
| 187 |
+
256& \text{otherwise}
|
| 188 |
+
\end{cases}
|
| 189 |
+
\end{equation}
|
| 190 |
+
where $H$ and $W$ are the height and width of the origin images.
|
| 191 |
+
|
| 192 |
+
The speed is about $45$ FPS on IC13 dataset with a batch size of 1, where the CA-FCN costs $0.018$ second per image and word formation module costs $0.004$ second per image on average. Higher speed can be achieved if the batch size increases. We test our method with a single Titan Xp GPU.
|
| 193 |
+
|
| 194 |
+
|
| 195 |
+
\begin{table*}[!ht]
|
| 196 |
+
\caption{Results across different methods and datasets. ``50'' and ``1k'' indicate the sizes of the lexicons. ``0'' means no lexicon. ``data'' indicates using extra synthetic data to fine-tune the model.}
|
| 197 |
+
\label{tab:performance}
|
| 198 |
+
\centering
|
| 199 |
+
\begin{tabular}{|l|ccc|cc|c|c|}
|
| 200 |
+
\hline
|
| 201 |
+
\multirow{2}{*}{\textbf{Methods}} & \multicolumn{3}{c|}{\textbf{IIIT}} & \multicolumn{2}{c|}{\textbf{SVT}} & \textbf{IC13} & \textbf{CUTE}\tabularnewline
|
| 202 |
+
\cline{2-8}
|
| 203 |
+
& 50 & 1k & 0 & 50 & 0 & 0 & 0\tabularnewline
|
| 204 |
+
\hline
|
| 205 |
+
\cite{DBLP:conf/iccv/WangBB11} & - & - & - & 57.0 & - & - & -\tabularnewline
|
| 206 |
+
\cite{DBLP:conf/bmvc/MishraAJ12} & 64.1 & 57.5 & - & 73.2 & - & - & -\tabularnewline
|
| 207 |
+
\cite{WangWCN12} & - & - & - & 70.0 & - & - & -\tabularnewline
|
| 208 |
+
\cite{AlmazanGFV14} & 91.2 & 82.1 & - & 89.2 & - & - & -\tabularnewline
|
| 209 |
+
\cite{YaoBSL14} & 80.2 & 69.3 & - & 75.9 & - & - & -\tabularnewline
|
| 210 |
+
\cite{Rodriguez-Serrano15} & 76.1 & 57.4 & - & 70.0 & - & - & -\tabularnewline
|
| 211 |
+
\cite{DBLP:conf/eccv/JaderbergVZ14} & - & - & - & 86.1 & - & - & -\tabularnewline
|
| 212 |
+
\cite{SuL14} & - & - & - & 83.0 & - & - & -\tabularnewline
|
| 213 |
+
\cite{Gordo14} & 93.3 & 86.6 & - & 91.8 & - & - & -\tabularnewline
|
| 214 |
+
\cite{jaderberg2016reading} & 97.1 & 92.7 & - & 95.4 & 80.7 & 90.8 & -\tabularnewline
|
| 215 |
+
\cite{JaderbergSVZ14b} & 95.5 & 89.6 & - & 93.2 & 71.7 & 81.8 & -\tabularnewline
|
| 216 |
+
\cite{DBLP:journals/pami/ShiBY17} & 97.8 & 95.0 & 81.2 & 97.5 & 82.7 & 89.6 & -\tabularnewline
|
| 217 |
+
\cite{DBLP:conf/cvpr/ShiWLYB16} & 96.2 & 93.8 & 81.9 & 95.5 & 81.9 & 88.6 & 59.2\tabularnewline
|
| 218 |
+
\cite{LeeO16} & 96.8 & 94.4 & 78.4 & 96.3 & 80.7 & 90.0 & -\tabularnewline
|
| 219 |
+
\cite{DBLP:conf/nips/WangH17} & 98.0 & 95.6 & 80.8 & 96.3 & 81.5 & - & -\tabularnewline
|
| 220 |
+
\cite{YangHZKG17} & 97.8 & 96.1 & - & 95.2 & - & - & 69.3\tabularnewline
|
| 221 |
+
\cite{ChengBXZPZ17} & 99.3 & 97.5 & 87.4 & 97.1 & 85.9 & 93.3 & -\tabularnewline
|
| 222 |
+
\cite{cheng2018aon} & 99.6 & 98.1 & 87.0 & 96.0 & 82.8 & - & 76.8\tabularnewline
|
| 223 |
+
\cite{bai2018edit} & 99.5 & 97.9 & 88.3 & 96.6 & \textbf{87.5} & \textbf{94.4} & -\tabularnewline
|
| 224 |
+
\hline
|
| 225 |
+
Ours & \textbf{99.8} & \textbf{98.9} & \textbf{92.0} & 98.5 & 82.1 & 91.4 & 78.1 \tabularnewline
|
| 226 |
+
Ours+data & \textbf{99.8} & 98.8 & 91.9 & \textbf{98.8} & 86.4 & 91.5 & \textbf{79.9} \tabularnewline
|
| 227 |
+
\hline
|
| 228 |
+
\end{tabular}
|
| 229 |
+
\end{table*}
|
| 230 |
+
\subsection{Performances on benchmarks}
|
| 231 |
+
We evaluate our method on several benchmarks to indicate the superiority of the proposed method. Some results of IIIT and CUTE are visualized in Fig.~\ref{fig:visu}. As can be seen, our proposed method can handle various shapes of text.
|
| 232 |
+
|
| 233 |
+
Quantitative results are listed in Tab.~\ref{tab:performance}. Compared to previous methods, our proposed method achieves state-of-the-art performance on most of those benchmarks. More specifically, ``Ours'' outperforms the previous state-of-the-art by $3.7$ percents on IIIT without lexicons. On irregular text dataset CUTE, $3.1$ percents improvement is achieved by ``Ours''. Note that no extra training data for curved text is included to achieve this performance. Comparable results are also performed on other datasets, including SVT, IC13.
|
| 234 |
+
|
| 235 |
+
The training data of \cite{ChengBXZPZ17} consist of two synthetic datasets including Synth90k~\cite{synth90} and SynthText~\cite{gupta2016synthetic}. The former is generated according to a large lexicon which contains the lexicon of SVT and ICDAR, while the latter uses a normal corpus, where the distribution of words are not balanced. To fairly compared with \cite{ChengBXZPZ17}, we also generate extra 4 million synthetic images using the algorithm of SynthText with the lexicon used in Synth90k. As shown in Tab.~\ref{tab:performance}, after fine-tuning with the extra data, ``Ours+data'' also outperforms \cite{ChengBXZPZ17} on SVT.
|
| 236 |
+
|
| 237 |
+
\cite{bai2018edit} improves ~\cite{ChengBXZPZ17,DBLP:conf/cvpr/ShiWLYB16} by solving their misalignment problem and achieves excellent results in regular text recognition. However, it may fail in irregular text benchmarks such as CUTE due to its one-dimensional perspective. Moreover, we argue that our method can be further improved if the idea of \cite{bai2018edit} is well adapted to our word formulation module. Nevertheless, our method outperforms \cite{bai2018edit} on most of the benchmarks in Tab.~\ref{tab:performance}, especially on IIIT and CUTE.
|
| 238 |
+
|
| 239 |
+
\cite{cheng2018aon} focuses on dealing with arbitrary-oriented text by introducing four one-dimensional feature sequences with different directions adaptively. Our method is more superior in recognizing the text of irregular shapes such as curve shape. As shown in Tab.~\ref{tab:performance}, our method outperforms \cite{cheng2018aon} on all benchmarks.
|
| 240 |
+
|
| 241 |
+
\begin{figure*}[!ht]
|
| 242 |
+
\centering
|
| 243 |
+
\includegraphics[width=0.9\linewidth]{figures/compare_crop.pdf}
|
| 244 |
+
\caption{Visualization of the character prediction maps on expanded datasets. Red: wrong results; Green: correct results.}
|
| 245 |
+
\label{fig:compare}
|
| 246 |
+
\end{figure*}
|
| 247 |
+
|
| 248 |
+
\begin{table*}[!ht]
|
| 249 |
+
\centering
|
| 250 |
+
\caption{Experimental results on expanded datasets. ``ac'': accuracy; ``gap'': the gap between the original dataset; ``ratio'' indicates the decreasing ratio compared to the accuracy on the original dataset.}
|
| 251 |
+
\label{tab:expand}
|
| 252 |
+
\scriptsize
|
| 253 |
+
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
|
| 254 |
+
\hline
|
| 255 |
+
\multirow{2}{*}{\textbf{Methods}} & \textbf{IIIT} & \multicolumn{3}{c|}{\textbf{IIIT-p}} & \multicolumn{3}{c|}{\textbf{IIIT-r-p}} & \textbf{IC13} & \multicolumn{3}{c|}{\textbf{IC13-ex}} & \multicolumn{3}{c|}{\textbf{IC13-r-ex}} \\ \cline{2-15}
|
| 256 |
+
& ac & ac & gap & ratio & ac & gap & ratio & ac & ac & gap & ratio & ac & gap & ratio \\ \hline
|
| 257 |
+
CRNN & 81.2 & 76.0 & -5.2 & 6.4\% & 72.4 & -8.8 & 10.8\% & 89.6 & 81.9 & -7.7 & 8.6\% &76.7 & -12.9 & 14.4\% \\ \hline
|
| 258 |
+
ACSM & 85.4 & 79.1 & -6.3 & 7.4\% & 74.9 & -10.5 & 12.3\% & 88.0 & 81.2 & -6.8 & 7.7\% & 70.0 & -18.0 & 20.5\% \\ \hline
|
| 259 |
+
baseline & 90.5 & 87.0 & -3.5 & 3.9\% & 85.7 & -4.8 & 5.3\% & 90.5 & 83.2 & -7.3 & 8.1\% & 82.3 & -8.2 & 9.1\% \\ \hline
|
| 260 |
+
baseline + attention & 91.0 & 86.7 & -4.3 & 4.7\% & 85.7 & -5.3 & 5.8\% & 90.1 & 85.6 & -4.5 & 5.0\% & 83.0 & -7.1 & 7.9\% \\ \hline
|
| 261 |
+
baseline + deform & 91.4 & 87.6 & -3.8 & 4.2\% & 86.7 & -4.7 & 5.1\% & 91.1 & \textbf{87.4} & \textbf{-3.7} & \textbf{4.1\%} & \textbf{84.2} & \textbf{-6.9} & \textbf{7.6\%} \\ \hline
|
| 262 |
+
baseline + attention + deform & \textbf{92.0} & \textbf{89.3} & \textbf{-2.7} & \textbf{2.9\%} & \textbf{87.6} & \textbf{-4.4} & \textbf{4.8\%} & \textbf{91.4} & 87.2 & -4.2 & 4.6\% & 83.8 & -7.6 & 8.3\% \\ \hline
|
| 263 |
+
\end{tabular}
|
| 264 |
+
\end{table*}
|
| 265 |
+
\subsection{Ablation study}
|
| 266 |
+
\label{sec:expanding}
|
| 267 |
+
Scene text recognition is usually a following step of scene text detection, whose results may be not as accurate as expected. Thus, performances of text spotting systems in real-world applications are significantly affected by the robustness of text recognition algorithms on expanded images. We conduct experiments with expanded datasets to show the effect of text bounding box variance on recognition and prove the robustness of our method.
|
| 268 |
+
|
| 269 |
+
For the datasets which have the original background, such as IC13, we expand their bounding boxes and then crop them from the original images. If no extra background is provided like IIIT, padding by repeating the border pixels is applied to these images. The expanded datasets are described below:
|
| 270 |
+
|
| 271 |
+
\noindent\textbf{IIIT-p}
|
| 272 |
+
Padding the images in IIIT with extra $10\%$ height vertically and $10\%$ width horizontally by repeating the border pixels.
|
| 273 |
+
|
| 274 |
+
\noindent\textbf{IIIT-r-p}
|
| 275 |
+
Separately stretching the four vertexes of the images in IIIT with a random scale up to $20\%$ of height and width respectively; border pixels are repeated to fill the quadrilateral images; images are transformed back to axis-aligned rectangles.
|
| 276 |
+
|
| 277 |
+
\noindent\textbf{IC13-ex}
|
| 278 |
+
Expanding the bounding boxes of the images in IC13 to expanded rectangles with extra $10\%$ height and width before cropping.
|
| 279 |
+
|
| 280 |
+
\noindent\textbf{IC13-r-ex}
|
| 281 |
+
Expanding the bounding boxes of the images in IC13 randomly with a maximum $20\%$ of width and height to form expanded quadrilaterals; The pixels in axis-aligned circumscribed rectangles of those images are cropped.
|
| 282 |
+
|
| 283 |
+
We compare our method with two representative sequence-based models including CRNN~\cite{DBLP:journals/pami/ShiBY17} and Attention Convolutional Sequence Model (ACSM)~\cite{DBLP:journals/corr/gao}.
|
| 284 |
+
The model of CRNN is provided by its authors and the model of \cite{DBLP:journals/corr/gao} is re-implemented by ourself with the same training data as ours.
|
| 285 |
+
Qualitative results of the three methods are visualized in Fig.~\ref{fig:compare}. As can be observed, the sequence-based models usually predict extra characters if the images are expanded while CA-FCN is stable and robust.
|
| 286 |
+
|
| 287 |
+
The quantitative results are listed in Tab.~\ref{tab:expand}. Compared to the sequence-based models, our proposed method is more robust among these expanding datasets. For example, on IIIT-p dataset, the gap ratio of CRNN is $6.4\%$ while ours is only $2.6\%$. Note that even though our performances on the standard datasets are higher, the gaps of ours are still much smaller than CRNN.
|
| 288 |
+
As shown in Tab.~\ref{tab:expand}, both the deformable module and the attention module can improve the performance and the former also contributes to the robustness of the model. It indicates the effectiveness of the deformable convolution and the character attention module.
|
| 289 |
+
|
| 290 |
+
The possible reasons that our method is more robust than previous sequence-based models on expanded images could be:
|
| 291 |
+
Sequence-based models are in one-dimensional perspective, which are hard to endure extra background because the background noises are easy to encode into the feature sequence. In contrast, our method predicts the characters in a two-dimensional space, where both the characters and the background are the targeted predicting objects. The extra background is less likely to mislead the prediction of the characters.
|
| 292 |
+
\section{Conclusion}
|
| 293 |
+
In this paper, we have presented a method called Character Attention FCN (CA-FCN) for scene text recognition, which models the problem in a two-dimensional fashion. By performing character classification at each pixel location, the algorithm can effectively recognize irregular as well as regular text instances. Experiments show that the proposed model outperforms existing methods on datasets with regular and irregular text. We also analyzed the impact of imprecise text localization to the performances of text recognition algorithms and proved that our method is much more robust. For future research, we will make the word formation module learnable and build an end-to-end text spotting system.
|
| 294 |
+
\subsubsection*{Acknowledgments}
|
| 295 |
+
This work was supported by National Key R\&D Program of China No. 2018YFB1004600, NSFC 61733007, to Dr. Xiang Bai by the National Program for Support of Top-notch Young Professionals and the Program for HUST Academic Frontier Youth Team.
|
| 296 |
+
|
| 297 |
+
\bibliographystyle{aaai}
|
| 298 |
+
\bibliography{reference}
|
1809.06569v2.txt
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CNN models have been widely used by image-based applications, thanks to the breakthrough performance of AlexNet [15].However, a very deep and wide CNN model consists of many parameters, and as a result, the trained model may demand a large amount of DRAM and a large number of multiplications to perform a prediction.Such high resource and computation requirements lead to latency, heat, and power consumption problems, which are suboptimal for edge devices such as mobile phones and IoTs [25].Therefore, reducing CNN model size is essential for improving resource utilization and conserving energy.
|
| 2 |
+
|
| 3 |
+
Several CNN model reduction algorithms have recently been proposed [25].These algorithms can be divided into two categories: micro-level (performing reduction/quantization inside a filter) and macro-level reduction (removing redundant filters).These two categories are complement to each other. (More details are presented in the related work section.) We focus our study in this paper on macro-level reduction.For lucid exposition, we establish an essential concept that removing redundant filters are also referred as removing redundant channels since each filter outputs a corresponding channel in a CNN model [10].
|
| 4 |
+
|
| 5 |
+
There are two categories of macro-level reduction: optimization based and channel-scaling based.Each category has multiple methods and algorithms.The optimization-based category typically estimates the filter importance by formulating an optimization problem with the adopted criteria (e.g., filter weight magnitude).Removing a filter (or a channel, which is formally defined in Section 3) will affect both the former and latter layers.The filter pruning step of the optimization-based method must take into account the inter-connected structures between CNN layers.Therefore, a CNN model such as DenseNet [11] and ShuffleNet [31] with more complex inter-connected structures may prevent the optimization-based approach from being effective.
|
| 6 |
+
|
| 7 |
+
The channel-scaling based category uses an α𝛼\alpha-scalar to reduce channel width.For instance, MobileNet [10] uses the same α𝛼\alpha-scaler to prune the widths of all channels.Applying the same α𝛼\alpha-scaler to all convolutional layers without considering each information density is a coarse-grained method.A fine-grained method that finds the optimal α𝛼\alpha-scalar for each convolutional layer should be ideal.However, the increasingly complicated inter-layer connection structures of CNN models forbid fine-grained scaling to be computationally feasible.
|
| 8 |
+
|
| 9 |
+
To address the shortcomings of the current model-compaction methods, we propose macroblock scaling (MBS).A macroblock consists of a number of convolution layers that exhibit similar characteristics, such as having the same resolution or being a segment of convolution layers with customized inter-connects.Having macroblock as a structure abstraction provides the flexibility for MBS to inter-operate with virtually any CNN models of various structures, and also permits channel-scaling to be performed in a “finer”-grained manner.To quantify information density for each macroblock so as to determine an effective macroblock-dependent scalar, MBS uses effective flops to measure each macroblock’s information density. (We define effective flops to be the number of convolution flops required for the activated non-zero ReLU outputs.)Experimental results show that the reduction MBS can achieve is more significant than those achieved by all prior schemes.
|
| 10 |
+
|
| 11 |
+
Our contributions can be summarized as follows:
|
| 12 |
+
|
| 13 |
+
•MBS employs macroblock to address the issues that both coarse-grained and fine-grained scaling cannot deal with, and hence allows channel-scaling to be performed with any CNN models.•MBS proposes using an effective and efficient measure, effective flops, to quantify information density to decide macroblock-dependent scaling factors. As shown in the algorithm section, the complexity of MBS is linear with respect to the number of training instances times the number of parameters, which is more efficient than the optimization-based methods [30, 16].•Extensive empirical studies on two representative datasets and various well-known CNN models (e.g., MobileNet, ShuffleNet, ResNet, and DenseNet) demonstrate that MBS outperforms all state-of-the-art model-reduction methods in reduction size while preserving the same level of prediction accuracy.Due to its simple and effective nature, MBS remains to be effective even with ultra-deep CNNs like ResNet-101101101 on ImageNet (51.67%percent51.6751.67\% reduction) and ResNet-120212021202 on CIFAR-101010 (72.71%percent72.7172.71\% reduction).
|
| 14 |
+
|
| 15 |
+
The remaining parts of this paper are organized into three main sections.The Related Work section highlights some previous effortsof reducing CNN models.The Method section explains our proposed MBS algorithm.The Experiment section shows the encouraging resultsof applying MBS on various CNN models.
|
| 16 |
+
|
| 17 |
+
We review related work in two parts.We first review key CNN properties relevant to the inception ofMBS and then review somerepresentative model-reduction methods.
|
| 18 |
+
|
| 19 |
+
There are research works [27, 4, 29] integrating the early stop (or early exit) mechanism of the initial CNN layers in order to speed up the inference process.This phenomenon demonstrates that the outcome of a CNN model at early stages can be adequate for predicting an image label with high confidence.This result provides supporting evidence for usto group convolution layers into two types: former convolution layers (near to the input image) as the base layers, and latter convolution layers (close to the label output) as the enhancement layers.The early stop mechanism motivates that the informationdensity in the enhancement layers should be lowerthan that in the base layers, and therefore,more opportunities exist in the enhancement layers to reduce model size.
|
| 20 |
+
|
| 21 |
+
As mentioned in the introduction that model reduction can be divided intomicro-level and macro-level approaches.Binary approximation of a CNN filter is one important direction for micro-level model reduction [2, 23, 17, 12].Maintaining prediction accuracy of a binary CNN is a challenging issue [26]. The sparse convolution modules [18, 28, 13, 3, 1] or deep compression [6] usually introduce irregular structures.However, these micro-level model reduction methods with irregular structures often require special hardware for acceleration [5].
|
| 22 |
+
|
| 23 |
+
The macro-level model reduction approach removes irrelevant filters and maintains the existing structures of CNNs [16, 9, 20, 7].The methods of this reduction approach estimate the filter importance by formulating an optimization problem based on some adopted criteria (e.g., the filter weight magnitudes or the filter responses).
|
| 24 |
+
|
| 25 |
+
The research work of [30] addresses the filter importance issue by formulating the problem into binary integer programming with the aid of feature ranking [24], which achieves the state-of-the-art result.For an n𝑛n-convolution-layer model with npsubscript𝑛𝑝n_{p} parameters and N𝑁N training images, the complexity of acquiring the CNN outputs is O(np×N)𝑂subscript𝑛𝑝𝑁O(n_{p}\times N).The complexity of the feature ranking step is O(N2.37)𝑂superscript𝑁2.37O(N^{2.37}) [24].In addition to the preprocessing step, the binary integer programming is an NP-hard problem.The detail complexity is not specified in [30].In general, a good approximate solution for npsubscript𝑛𝑝n_{p} variables still requires high computational complexity (e.g., O(np3.5)𝑂superscriptsubscript𝑛𝑝3.5O(n_{p}^{3.5}) by linear programming [14]).In contrast, MBS enjoys low complexity that is O(np×N)𝑂subscript𝑛𝑝𝑁O(n_{p}\times N) in computing information density and O(M×n)𝑂𝑀𝑛O(M\times n) in computing the scaling factors for a CNN with n𝑛n convolution layers and M𝑀M macroblocks, which is detailed in the next section.
|
| 26 |
+
|
| 27 |
+
In a sense, some model reduction methods belonging to network pruning are related to the topic of architecture search.Our proposed MBS also falls into this type.Treating network pruning as architecture search only requires a one-pass training, but the search space is restricted to all sub-networks inside a large network [21].By contrast, full architecture search such as DARTS [19] considers more options, e.g., activation functions or different layer orders, and usually pays the cost of requiring more passes to find the goal architecture.Thus, applying architecture search on large datasets like ImageNet directly demands considerable computation cost.
|
| 28 |
+
|
| 29 |
+
This section presents our proposed macroblock scaling (MBS) algorithm for reducing an already trained CNN model. We first define key terms including channel, filter, channel scaling, macroblock, and the parameters used by MBS. We then explain how MBS computes information density, and how that information is used by MBS to reduce model size.Finally, we analyze computational complexity of MBS and compare its efficiency with competing model-compaction algorithms.
|
| 30 |
+
|
| 31 |
+
Let us use image applications to explain a CNN pipeline.A typical CNN pipeline accepts N𝑁N training images as input. These N𝑁N training instances are of the same height and width. To simplify our notation, we assume all input images are in the square form with the same resolution L×L𝐿𝐿L\times L.A CNN model is composed of multiple convolution layers.The input to a convolution layer is a set of input tensors (or input activations), each of which is called a channel [25]. Each layer generates a successively high-level abstraction of the input tensors, call a output tensor or feature map.
|
| 32 |
+
|
| 33 |
+
More specifically, the jthsuperscript𝑗thj^{\textup{th}} convolution layer cjsubscript𝑐𝑗c_{j}, j=0,…,n−1𝑗0…𝑛1j=0,\dots,n-1, takes s_sizej×s_sizej×c_widthjsubscripts_size𝑗subscripts_size𝑗subscriptc_width𝑗\text{s\_size}_{j}\times\text{s\_size}_{j}\times\text{c\_width}_{j} input tensor and produces s_sizej+1×s_sizej+1×c_widthj+1subscripts_size𝑗1subscripts_size𝑗1subscriptc_width𝑗1\text{s\_size}_{j+1}\times\text{s\_size}_{j+1}\times\text{c\_width}_{j+1} output tensor, where s_size is the spatial size of input or output tensors, and c_width is the input/output channel width (i.e., number of channels).Particularly, s_size0subscripts_size0\text{s\_size}_{0} is equal to L𝐿L.Let k_sizejsubscriptk_size𝑗\text{k\_size}_{j} denote the spatial size of the square kernel of cjsubscript𝑐𝑗c_{j}, the required number of parameters of cjsubscript𝑐𝑗c_{j} can be written ask_sizej×k_sizej×c_widthj×c_widthj+1.subscriptk_size𝑗subscriptk_size𝑗subscriptc_width𝑗subscriptc_width𝑗1\text{k\_size}_{j}\times\text{k\_size}_{j}\times\text{c\_width}_{j}\times\text{c\_width}_{j+1}.(1)
|
| 34 |
+
|
| 35 |
+
MBS groups convolution layers into macroblocks.A macroblock consists of the convolution layers whose output tensors (feature maps) are of the same size.We use M𝑀M to denote the number of macroblocks in a CNN model.Figure 1 depicts an example CNN model with M=3𝑀3M=3.The size of output tensors is down-sampled by the poolinglayers with stride size 2.Hence, macroblock misubscript𝑚𝑖m_{i} is defined asmi={cj|∀js.t.s_sizej+1=L2i}.subscript𝑚𝑖conditional-setsubscript𝑐𝑗formulae-sequencefor-all𝑗𝑠𝑡subscripts_size𝑗1𝐿superscript2𝑖m_{i}=\{c_{j}\ |\forall j\ s.t.\ \text{s\_size}_{j+1}=\frac{L}{2^{i}}\ \}.(2)
|
| 36 |
+
|
| 37 |
+
Operation scaling reduces channel width.Intuitively, MBS would like to prune channels that cannot provide positive contributions to accurate prediction.For instance, MobileNet [10] scales down all channel widths by a constant ratio 0<α<10𝛼10<\alpha<1, or we call this baseline scheme α𝛼\alpha-scaling.MobileNet uses the same α𝛼\alpha value for all convolution layers.However, an effective channel-scaling scheme should estimate the best scaling ratio for each convolution layer based on its information density
|
| 38 |
+
|
| 39 |
+
But quantifying and determining the scaling ratio for each convolution layer disturbs the designs of CNN models.To preserve the design structure of an original CNN model, MBS performs reduction at the macroblock level instead of at the convolution-layer level.For some CNN models that have convolution layers connected into a complex structure, MBS treats an entire such segment as a macroblock to preserve its design.Our macroblock approach, as its name suggests, does not deal with detailed inter-layer connection structure.The macroblock abstraction thus makes model reduction simple and adaptive.
|
| 40 |
+
|
| 41 |
+
An effective CNN model requires a sufficient number of convolution layers to capture good representations from input data.However, as the number of the convolution layers grows beyond a threshold, the additional benefit in improving prediction accuracy can diminish.One may argue that the former convolution layers may learn low-level representations such as edges and contours, whereas latter layers high-level semantics.As we will demonstrate shortly, the latter layers may cover receptive fields that are larger than the input images, and their learned information may not contribute to class prediction.The effective receptive field in CNN is the region of the input image that affects a particular neuron of the network [22].Figure 2 shows an example, where a neuron of a former convolution layer covers a region inside the input image, whereas a neuron of a latter layer may cover a region larger than the input image.Hence, we categorize convolution layers into two types, base layers and enhancement layers, which are defined as follows:•Base convolution layers:The former convolution layers (near to the input) of a CNN model learn essential representations from the training data. Though representations captured in the base layers could be redundant, they are fundamental for class prediction.•Enhancement convolution layers:The latter convolution layers may cover receptive fields larger than the input areas111Due to data augmentation and boundary patching operations applied to raw input images, a training input image may contain substantial useless information at its boundaries.. Therefore, opportunities are available for channel pruning to remove redundant information.
|
| 42 |
+
|
| 43 |
+
Now, we define a function RF(cj)RFsubscript𝑐𝑗\textup{RF}(c_{j}) to compute the receptive field size of layer cjsubscript𝑐𝑗c_{j}.For simplicity, assume that the receptive field region of filter cjsubscript𝑐𝑗c_{j} is RF(cj)×RF(cj)RFsubscript𝑐𝑗RFsubscript𝑐𝑗\textup{RF}(c_{j})\times\textup{RF}(c_{j}).The possible set of values of RF(cj)RFsubscript𝑐𝑗\textup{RF}(c_{j}) is discrete, which is determined by the configuration of the kernel size and the stride step of a CNN model.For lucid exposition, we define ⌈z⌉RFsubscript𝑧RF\lceil z\rceil_{\textup{RF}} to characterize the minimum receptive field boundary that is greater than a given value z𝑧z as follows:⌈z⌉RF=min{RF(cj)|∀jRF(cj)>z}.subscript𝑧RFRFsubscript𝑐𝑗ketfor-all𝑗RFsubscript𝑐𝑗𝑧\lceil z\rceil_{\textup{RF}}=\min\{\textup{RF}(c_{j})\ |\ \forall j\ \textup{RF}(c_{j})>z\}.(3)We use this boundary ⌈z⌉RFsubscript𝑧RF\lceil z\rceil_{\textup{RF}} to divide base convolution layers and enhancement convolution layers in a CNN pipeline.
|
| 44 |
+
|
| 45 |
+
Revisit macroblocks in Figure 1.Convolution layer c9subscript𝑐9c_{9} belonging to macroblock m2subscript𝑚2m_{2} is the first enhancement layer, where its receptive field is larger than the receptive field boundary ⌈z=32⌉RF=36subscript𝑧32RF36\lceil z=32\rceil_{\textup{RF}}=36.We estimate information redundancy of each macroblock misubscript𝑚𝑖m_{i} by measuring the information density ratio contributed by the enhancement layers.
|
| 46 |
+
|
| 47 |
+
We can determine the base layers of a CNN by setting the value of z𝑧z.As we have previously explained, the area beyond and at the boundary of an image contains less useful information.Thus, setting z=L𝑧𝐿z=L is reasonable to separate those layers that can contribute more to class prediction from the other layers.A macroblock can contain base layers only, enhancement layers only, or a mixture of the two.
|
| 48 |
+
|
| 49 |
+
MBS uses convolution FLOP to estimate information density.A FLOP (denoted by the lowercase “flop” in the remainder of the paper) is a multiply-and-add operation in convolution.The more frequently that ReLU outputs a zero value means that the less information that convolution layer contains.Therefore, only those flops that can produce a non-zero ReLU output are considered to be effective.
|
| 50 |
+
|
| 51 |
+
A neuron on a convolution layer covers a region, i.e., receptive field of the input image.The physical meaning of effective flops represents effective feature matchings on the input image whose the feature pattern size is the same as that of the receptive fields.Since effective flops quantify the effective feature matchings of CNN models for a given image, it plays the key role in estimating information density.
|
| 52 |
+
|
| 53 |
+
Figure 3 shows the computation of the effective flops of a convolution layer.Let ecjsubscript𝑒subscript𝑐𝑗e_{c_{j}} denote effective flops of layer cjsubscript𝑐𝑗c_{j}, and pjsubscript𝑝𝑗p_{j} represent the non-zero probability of its ReLU output.We can define ecjsubscript𝑒subscript𝑐𝑗e_{c_{j}} asecj=pj×flop(cj).subscript𝑒subscript𝑐𝑗subscript𝑝𝑗flopsubscript𝑐𝑗e_{c_{j}}=p_{j}\times\textup{flop}(c_{j}).(4)
|
| 54 |
+
|
| 55 |
+
To evaluate information density of macroblock misubscript𝑚𝑖m_{i}, we tally the total effective flops from the beginning of the CNN pipeline to the end of macroblock misubscript𝑚𝑖m_{i}.We can write the sum of the effective flops asEtotal(mi)=∑ecj,cj∈{m0,⋯,mi}.formulae-sequencesubscript𝐸totalsubscript𝑚𝑖subscript𝑒subscript𝑐𝑗subscript𝑐𝑗subscript𝑚0⋯subscript𝑚𝑖E_{\textup{total}}(m_{i})=\sum e_{c_{j}},\ c_{j}\in\{m_{0},\cdots,m_{i}\}.(5)Next, we compute the effective flops in the base layers or those flops taking place within the receptive field asEbase(mi)=∑ecj,cj∈{RF(cj)≤⌈z⌉RF},formulae-sequencesubscript𝐸basesubscript𝑚𝑖subscript𝑒subscript𝑐𝑗subscript𝑐𝑗RFsubscript𝑐𝑗subscript𝑧RFE_{\textup{base}}(m_{i})=\sum e_{c_{j}},\ c_{j}\in\{\textup{RF}(c_{j})\leq\lceil z\rceil_{\textup{RF}}\},(6)where the base layers have the maximum receptive field size ⌈z⌉RFsubscript𝑧RF\lceil z\rceil_{\textup{RF}}.
|
| 56 |
+
|
| 57 |
+
Based on the total flops Etotal(mi)subscript𝐸totalsubscript𝑚𝑖E_{\textup{total}}(m_{i}) and base flops Ebase(mi)subscript𝐸basesubscript𝑚𝑖E_{\textup{base}}(m_{i}), we define the difference between the two as the enhancement flops, which is denoted as Eenchancement(mi)subscript𝐸enchancementsubscript𝑚𝑖E_{\textup{enchancement}}(m_{i}) and can be written as Etotal(mi)−Ebase(mi)subscript𝐸totalsubscript𝑚𝑖subscript𝐸basesubscript𝑚𝑖E_{\textup{total}}(m_{i})-E_{\textup{base}}(m_{i}).The redundancy ratio risubscript𝑟𝑖r_{i} of macroblock misubscript𝑚𝑖m_{i} is then defined as the total enhancement flops over the total flops, orri=Eenhancement(mi)Etotal(mi)=1−Ebase(mi)Etotal(mi).subscript𝑟𝑖subscript𝐸enhancementsubscript𝑚𝑖subscript𝐸totalsubscript𝑚𝑖1subscript𝐸basesubscript𝑚𝑖subscript𝐸totalsubscript𝑚𝑖r_{i}=\frac{E_{\textup{enhancement}}(m_{i})}{E_{\textup{total}}(m_{i})}=1-\frac{E_{\textup{base}}(m_{i})}{E_{\textup{total}}(m_{i})}.(7)We estimate the channel-scaling factor for each macroblock misubscript𝑚𝑖m_{i} based on this derived redundancy risubscript𝑟𝑖r_{i}, which is illustrated in the next subsection.
|
| 58 |
+
|
| 59 |
+
We define the relation between the original channel width c_widthmisubscriptc_widthsubscript𝑚𝑖\text{c\_width}_{m_{i}} of macroblock misubscript𝑚𝑖m_{i} and the compact channel width c_widthmicsuperscriptsubscriptc_widthsubscript𝑚𝑖𝑐\text{c\_width}_{m_{i}}^{c} after the reduction process, which is depicted asc_widthmi=(1+ri)×c_widthmic.subscriptc_widthsubscript𝑚𝑖1subscript𝑟𝑖superscriptsubscriptc_widthsubscript𝑚𝑖𝑐\text{c\_width}_{m_{i}}=(1+r_{i})\times\text{c\_width}_{m_{i}}^{c}.(8)If there is no redundancy in macroblock misubscript𝑚𝑖m_{i} (i.e., ri=0subscript𝑟𝑖0r_{i}=0), the original channel c_widthmisubscriptc_widthsubscript𝑚𝑖\text{c\_width}_{m_{i}} is equal to the compact channel width c_widthmicsuperscriptsubscriptc_widthsubscript𝑚𝑖𝑐\text{c\_width}_{m_{i}}^{c}.Therefore, the channel width multiplierβisubscript𝛽𝑖\beta_{i} for the macroblock misubscript𝑚𝑖m_{i} isβi=11+ri,subscript𝛽𝑖11subscript𝑟𝑖\beta_{i}=\frac{1}{1+r_{i}},(9)where this estimation makes βi>0.5subscript𝛽𝑖0.5\beta_{i}>0.5 since ri<1subscript𝑟𝑖1r_{i}<1 according to Eq. (7).The lower bound of the channel-scaling factor βisubscript𝛽𝑖\beta_{i} is in accordance with the observation made by MobileNet [10] that a scaling factor that is less than 0.50.50.5 can introduce noticeable distortion.
|
| 60 |
+
|
| 61 |
+
Algorithm 1 presents our MBS algorithm, which estimates the scaling factor βisubscript𝛽𝑖\beta_{i} for each macroblock misubscript𝑚𝑖m_{i} and derives the compact channel width c_widthmicsuperscriptsubscriptc_widthsubscript𝑚𝑖𝑐\text{c\_width}_{m_{i}}^{c}.The MBS algorithm takes the pre-trained model Fn()subscript𝐹𝑛F_{n}() with n𝑛n convolution layers and N𝑁N training images as input.The convolution results of the pre-trained model Fn()subscript𝐹𝑛F_{n}() for the training images are utilized for estimating the scaling factors.The inner loop from steps 222 to 444 collects non-zero statistics of the ReLU outputs pjsubscript𝑝𝑗p_{j}.The steps after the inner loop (steps 555 and 666) take an average over N𝑁N training instances, and then derive the effective flop for each convolution layer cjsubscript𝑐𝑗c_{j}.
|
| 62 |
+
|
| 63 |
+
The macroblock process starts from step 888.The total and base effective flops for each macroblock are initialized in steps 999 and 101010, respectively.The MBS algorithm first tallies the total and base effective flops for each macroblock (steps 111111 to 181818).Afterwards, MBS computes the redundant ratio risubscript𝑟𝑖r_{i} for macroblock misubscript𝑚𝑖m_{i} (steps 191919 to 242424).The scaling factor βisubscript𝛽𝑖\beta_{i} is derived from redundancy ratio risubscript𝑟𝑖r_{i} in step 202020.After βisubscript𝛽𝑖\beta_{i} has been computed, MBS estimates the compact channel width c_widthmicsuperscriptsubscriptc_widthsubscript𝑚𝑖𝑐\text{c\_width}_{m_{i}}^{c} for each macroblock misubscript𝑚𝑖m_{i} in step 252525.
|
| 64 |
+
|
| 65 |
+
After Algorithm 1 outputs the new set of channel widths, the CNN is retrained with the new channel setting to generate a more compact model Fn′()subscriptsuperscript𝐹′𝑛F^{\prime}_{n}().Instead of fine-tuning, the reason why we retrain the model with the new channel setting is that fine-tuning the amended model with inherited weights is no better than training it from scratch, which is consistent with the observation in [21].In the experimental section, we will evaluate the effectiveness of MBS by examining the performance (prediction accuracy and model-size reduction) achieved by Fn′()subscriptsuperscript𝐹′𝑛F^{\prime}_{n}() over Fn()subscript𝐹𝑛F_{n}().
|
| 66 |
+
|
| 67 |
+
The pre-trained model Fn()subscript𝐹𝑛F_{n}() has n𝑛n convolution layers with npsubscript𝑛𝑝n_{p} parameters and N𝑁N training images.The required complexity of MBS consists of two parts: the non-zero statistics pjsubscript𝑝𝑗p_{j} collection (from steps 111 to 777) and the redundancy risubscript𝑟𝑖r_{i} estimation (from steps 888 to 262626).In the first part, we collect pjsubscript𝑝𝑗p_{j} by inferencing the N𝑁N training images, which the statement in step 333 can be absorbed into the forward pass of the pre-trained model.Hence, the computational complexity is O(np×N)𝑂subscript𝑛𝑝𝑁O(n_{p}\times N).The second part traverses all the convolution layers of the pre-trained model for deriving the compact model.The complexity of the second part is O(M×n)𝑂𝑀𝑛O(M\times n) since we have already derived each ecjsubscript𝑒subscript𝑐𝑗e_{c_{j}} from the first part.The wall-clock time of the first part usually takes 505050 minutes on a PC with NVIDIA 108010801080-Ti for pre-trained MobileNet on ImageNet.Notice that we only have to conduct the first part once for each pre-trained model.The wall-clock time of the second part is negligible, which is less than one second on the same PC.
|
| 68 |
+
|
| 69 |
+
We applied MBS to various CNNs on CIFAR-101010 and ImageNet to evaluate its effectiveness in model reduction.Our experiments aim to answer three main questions:1.How aggressively can one reduce the size of a CNN model without significantly degrading prediction accuracy? (Section 4.1.14.1.14.1.1)2.Can MBS work effectively with deep and already highly compact CNN models? (Section 4.2.24.2.24.2.2)3.Can MBS outperform competing model-reduction schemes? (Sections 4.1.24.1.24.1.2 and 4.2.14.2.14.2.1)
|
| 70 |
+
|
| 71 |
+
CIFAR-101010 consists of 505050k training images and 101010k testing images of 101010 classes.We follow the training settings in [11]: batch size is 128128128, weight decay is 10−4superscript10410^{-4}, and learning rate is set to 0.10.10.1 initially and divided by 101010 at the 50%percent5050\% and 75%percent7575\% of the total training epochs, respectively.
|
| 72 |
+
|
| 73 |
+
We evaluated the effect of setting different receptive field size threshold z𝑧z on prediction accuracy on CIFAR-101010 with ResNet.The threshold z𝑧z is set to z=k×L𝑧𝑘𝐿z=k\times L, which k𝑘k ranges from 1.41.41.4 to 0.60.60.6 with step size 0.20.20.2 (from the leftmost point to the rightmost point for each line in Figure 4(a)).
|
| 74 |
+
|
| 75 |
+
Figure 4(a) shows two results.The x𝑥x-axis depicts model reduction ratio from low to high, and the y𝑦y-axis prediction accuracy.We first observe that on all ResNet models (ResNet-202020, 323232, 444444, 565656, and 110110110), the more number of enhancement layers (i.e., MBS employing smaller z𝑧z value, see the five z𝑧z values on each line from large on the left to small on the right), the better the model reduction ratio.Second, the tradeoff between model reduction and prediction accuracy exhibits in all ResNet models, as expected.
|
| 76 |
+
|
| 77 |
+
Figure 4(b)provides an application designer a handbook to guide selectingthe receptive field setting that can fulfill the design goal. If accuracy out-weights model size, a larger k𝑘k is desirable (i.e., fewer enhancement layers).If model size is the primary concern for power-conservation and frame-rate improvement (e.g., video analysis requiring 303030 fps), then the designer can select a smaller k𝑘k.For instance, on ResNet-323232, the bitrate of k=0.6𝑘0.6k=0.6 is 200200200 KB, but the bitrate of k=1.4𝑘1.4k=1.4 is 300300300 KB.From the figure ResNet-565656 seems to be a better choice than ResNet-110110110,since given the same accuracy requirement, ResNet-565656 always enjoys a muchlower bitrate than ResNet-110110110.
|
| 78 |
+
|
| 79 |
+
Table 1 compares the reduction achieved by MBS and somerepresentative methods. The top-half of the table lists our evaluation on all ResNet models. For instance, MBS reduces the model size of ResNet-120212021202 significantly (72.71%percent72.7172.71\%) with negligible accuracy drop (0.98%percent0.980.98\%). The bottom half of the table compares MBS with recentlypublished methods with the best reduction ratios.We set MBS at the same accuracy level, MBS achieves the highest reduction ratio (50.29%percent50.2950.29\%).
|
| 80 |
+
|
| 81 |
+
We also compared MBS with the naive α𝛼\alpha-scaling methodused by ResNet.The α𝛼\alpha-scaling multiplies the entire model with the same scaling factor α𝛼\alpha, whereas MBS adaptively sets the scaling factor by the information density of each macroblock.Figure 5 plots the range of α𝛼\alpha from 0.60.60.6 to 0.90.90.9 with step size 0.10.10.1.Under the condition of having the similar resultant model size, MBS outperforms α𝛼\alpha-scaling in prediction accuracy on four model sizes.
|
| 82 |
+
|
| 83 |
+
ImageNet consists of 1.281.281.28 million training images and 505050k images for the 1,00010001,000 class validation. We trained all models (except for DenseNet, explained next) by 909090 epochs with batch size set as 256256256. The learning rate is initially set to 0.10.10.1 and divided by 101010 at epochs 303030 and 606060, respectively.For DenseNet, we trained its model by 100100100 epochs with batch size 128128128 and divided the learning rate by 101010 at epochs 909090 as suggested in [11].The data augmentation follows the ImageNet script of PyTorch, which is the same as ResNet [8]. The weight decay is 10−4superscript10410^{-4} for the CNNs with standard convolution (e.g., ResNet and DenseNet).The CNNs with depth-wise separable convolution (e.g., ShuffleNet and MobileNet) set the weigh decay to 4×10−54superscript1054\times 10^{-5} according to the training configurations as suggested in ShuffleNet [31].
|
| 84 |
+
|
| 85 |
+
Table 2 shows that MBS is flexible to work with different CNN designs including verydeep and complex CNN models such as ResNet-101101101 and DenseNet-121121121.As shown in Table 1,MBS can work with different depth configurations of ResNeton the CIFAR-10 dataset. Table 2 furthershows consistent results when working on ImageNet.MBS achieves 51.67%percent51.6751.67\% model reduction forResNet-101101101, while maintaining the same prediction accuracy.On a highly optimized deep model DenseNet-121121121 (a version of DenseNet-BC-121121121 defined in [11]), which has bottleneck modules and transition layers already highly compressed by 50%percent5050\%.MBS still can achieve additional 24.31%percent24.3124.31\% modelreduction with negligible accuracy loss.
|
| 86 |
+
|
| 87 |
+
To exhaustively compare with all prior works, we also conducted experiments with ResNet-343434. We divided the learning rate by 101010 at epoch 909090 and trained the reduced ResNet-343434 with additional 101010 epochs as a simplified fine-tune process.The state-of-the-art method NISP-343434-B did not specify its computation complexity in [30]. However, additional preprocessing steps are required to derive the filter’s importance.For a model with npsubscript𝑛𝑝n_{p} parameters and N𝑁N training images, these preprocessing steps require O(np×N)𝑂subscript𝑛𝑝𝑁O(n_{p}\times N) to acquire the CNN outputs and sort the features with O(N2.37)𝑂superscript𝑁2.37O(N^{2.37}) [24].Table 3 shows that MBS slightly outperforms NISP-343434-B on ResNet-343434 (by 0.8%percent0.80.8\% at the same accuracy level) and the complexity is only O(np×N)𝑂subscript𝑛𝑝𝑁O(n_{p}\times N).
|
| 88 |
+
|
| 89 |
+
We applied MBS to two CNN models with depth-wise convolution structures, ShuffleNet and MobileNet.The depth-wise convolution structure already reduces CNN model size significantly.Table 4 shows that MBS can further reduce these highly compact models.On ShuffleNet, MBS reduces the model size by additional 20.74%percent20.7420.74\% with negligible distortion.The depth-wise convolution and the unique shuffling operation of ShuffleNet would increase the difficulty of the objective function formulation for the optimization-based methods. On the contrary, MBS can simply estimate the channel-scaling factor for each CNN macroblock and perform model reduction.
|
| 90 |
+
|
| 91 |
+
We also evaluated MBS with MobileNet at different input image resolutions.Table 4 shows that MBSachieves 17.26%percent17.2617.26\% and 25.77%percent25.7725.77\% reduction on L=224𝐿224L=224 and L=192𝐿192L=192, respectively.Notice that when we set z=L𝑧𝐿z=L, the prediction accuracy of MobileNet-192192192 improves slightly. This result suggests apossible smaller threshold value of z𝑧z for MobileNet.Hence, we applied a slightly more aggressive setting ofz=0.8×L𝑧0.8𝐿z=0.8\times L, which achieved a 25.77%percent25.7725.77\% model-sizereduction.Furthermore, our method is also applicable to the state-of-the-art compact CNN, MobileNetV222222From TensorFlow GitHub., and achieves 25.03%percent25.0325.03\% reduction with negligible distortion.
|
| 92 |
+
|
| 93 |
+
We proposed a novel method to estimate the channel-scaling factor for each CNN macroblock.Our proposed MBS algorithm reduces model size guided by an information density surrogate without significantly degrading class-prediction accuracy.MBS is flexible in that it can work with various CNN models (e.g., ResNet, DenseNet, ShuffleNet and MobileNet), and is also scalable in its ability to work with ultra deep and highly compact CNN models (e.g., ResNet-120212021202).MBS outperforms all recently proposed methods to reduce model size at low computation complexity. With an adjustable receptive field parameter, an application designer can determine a proper tradeoff between prediction accuracy and model size (implying DRAM size and power consumption) by looking up a tradeoff table similar to the table presented in Figure 4.
|
1809.06590v1.txt
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
To automatically get the distributed representations of texts (words, phrases and sentences) is a fundamental task for natural language processing (NLP). There have been efficient learning algorithms to acquire the representations of words Mikolov et al. (2013a), which have shown to provide useful features for various tasks. Interestingly, the acquired word representations reflect some observed aspects of human conceptual organization Hill et al. (2015). In recent years, learning sentence representations has attracted much attention, which is to encode sentences into fixed-length vectors that could capture the semantic and syntactic properties of sentences and can then be transferred to a variety of other NLP tasks.
|
| 2 |
+
|
| 3 |
+
The most widely used method is to employ an encoder-decoder architecture with recurrent neural networks (RNN) to predict the original input sentence or surrounding sentences given an input sentence Kiros et al. (2015); Ba et al. (2016); Hill et al. (2016); Gan et al. (2017). However, the RNN becomes time consuming when the sequence is long. The problem becomes more serious when learning general sentence representations that needs training on a large amount of data. For example, it took two weeks to train the skip-thought Kiros et al. (2015). Moreover, the traditional RNN autoencoder generates words in sequence conditioning on the previous ground-truth words, i.e., teacher forcing training Williams and Zipser (1989). This teacher forcing strategy has been proven important because it forces the output of the RNN to stay close to the ground-truth sequence. However, at each time step, allowing the decoder solely to access the previous ground-truth words weakens the encoder’s ability to learn the global information of the input sequence.
|
| 4 |
+
|
| 5 |
+
Some other approaches Conneau et al. (2017); Cer et al. (2018); Subramanian et al. (2018) attempt to use the labelled data to build a generic sentence encoder, such as the Stanford Natural Language Inference (SNLI) dataset Bowman et al. (2015), but such large-scale high-quality labelled data appropriate for training sentence representations is generally not available in other languages.
|
| 6 |
+
|
| 7 |
+
In this paper, we are interested in learning universal sentence representations based on a large amount of naturally occurring corpus, without using any labelled data. We propose a mean-max attention autoencoder (mean-max AAE) to model sentence representations. Specifically, an encoder performs the MultiHead self-attention on an input sentence, and then the combined mean-max pooling operation is employed to produce the latent representation of the sentence. The representation is then fed into a decoder to reconstruct the input sequence, which also depends entirely on the MultiHead self-attention. At each time step, the decoder performs attention operations over the mean-max encoding, which on the one hand, enables the decoder to utilize the global information of the input sequence rather than generating words solely conditioning on the previous ground-truth words, and on the other hand, allows the decoder to attend to different representation subspaces dynamically.
|
| 8 |
+
|
| 9 |
+
We train our autoencoder on a large collection of unlabelled data, and evaluate the sentence embeddings across a diverse set of 10 transfer tasks. The experimental results show that our model outperforms the state-of-the-art unsupervised single models, and obtains comparable results with the combined models. Our mean-max representations yield consistent performance gain over the individual mean and max representations. At the same time, our model can be efficiently parallelized and so achieves significant improvement in computational efficiency.
|
| 10 |
+
|
| 11 |
+
In summary, our contributions are as follows:•We apply the MultiHead self-attention mechanism to train autoencoder for learning universal sentence representations, which allows our model to do processing parallelization and thus greatly reduce the training time in large unlabelled data.•we adopt a mean-max representation strategy in the encoding and then the decoder conducts attention over the latent representations, which can well capture the global information of the input from different views.•After training only on naturally occurring unordered sentences, we obtain a simple and fast sentence encoder, which is an unsupervised single model and achieves state-of-the-art performance on various transfer tasks.
|
| 12 |
+
|
| 13 |
+
With the flourishing of deep learning in NLP research, a variety of approaches have been developed for mapping word embeddings to fixed-length sentence representations. The methods generally fall into the following categories.
|
| 14 |
+
|
| 15 |
+
Unsupervised training with unordered sentences. This kind of methods depends only on naturally occurring individual sentences. Le and Mikolov (2014) propose the paragraph vector model, which incorporates a global context vector into the log-linear neural language model Mikolov et al. (2013b), but at test time, inference needs to be performed to compute a new vector. Arora et al. (2017) propose a simple but effective Smooth Inverse Frequency (SIF) method, which represents sentence by a weighted average of word embeddings. Hill et al. (2016) introduce sequential denoising autoencoders (SDAE), which employ the denoising objective to predict the original source sentence given a corrupted version. They also implement bag-of-words models such as word2vec-SkipGram, word2vec-CBOW. Our model belongs to this group, which has no restriction on the required training data and can be trained on sets of sentences in arbitrary order.
|
| 16 |
+
|
| 17 |
+
Unsupervised training with ordered sentences. This kind of method is trained to predict the surrounding sentences of an input sentence, based on the naturally occurring coherent texts. Kiros et al. (2015) propose the skip-thoughts model, which uses an encoder RNN to encode a sentence and two decoder RNN to predict the surrounding sentences. The skip-thought vectors perform well on several tasks, but training this model is very slow, requiring several days to produce meaningful results. Ba et al. (2016) further obtain better results by adding layer-norm regularization on the skip-thoughts model. Gan et al. (2017) explore a hierarchical model to predict multiple future sentences, using a convolutional neural network (CNN) encoder and a long-short term memory (LSTM) decoder. Logeswaran and Lee (2018) reformulate the problem of predicting the context in which a sentence appears as a classification task. Given a sentence and its context, a classifier distinguishes context sentences from other contrastive sentences based on their vector representations.
|
| 18 |
+
|
| 19 |
+
Supervised learning of sentence representations. Hill et al. (2016) implement models trained on supervised data, including dictionary definitions, image captions from the COCO dataset Lin et al. (2014) and sentence-aligned translated texts. Conneau et al. (2017) attempt to exploit the SNLI dataset for building generic sentence encoders. Through examining 777 different model schemes, they show that a bi-directional LSTM network with the max pooling yields excellent performance. Cer et al. (2018) apply multi-task learning to train sentence encoders, including a skip-thought like task, a conversational input-response task and classification tasks from the SNLI dataset. They also explore combining the sentence and word level transfer models. Subramanian et al. (2018) also present a multi-task learning framework for sentence representations, and train their model on several data resources with multiple training objectives on over 100100100 million sentences.
|
| 20 |
+
|
| 21 |
+
Our model follows the encoder-decoder architecture, as shown in Figure 1. The input sequence is compressed into a latent mean-max representation via an encoder network, which is then used to reconstruct the input via a decoder network.
|
| 22 |
+
|
| 23 |
+
In our model, we treat the input sentence as one sequence of tokens. Let S𝑆S denote the input, which is comprised of a sequence of tokens {w1,w2,…,wN}subscript𝑤1subscript𝑤2…subscript𝑤𝑁\{w_{1},w_{2},\dots,w_{N}\}, where N𝑁N denotes the length of the sequence. An additional “<</Sabsent𝑆/S>>” token is appended to each sequence. Each word wtsubscript𝑤𝑡w_{t} in S𝑆S is embedded into a k𝑘k-dimensional vector et=We[wt]subscript𝑒𝑡subscript𝑊𝑒delimited-[]subscript𝑤𝑡e_{t}=W_{e}[w_{t}], where We∈ℝdw×Vsubscript𝑊𝑒superscriptℝsubscript𝑑𝑤𝑉W_{e}\in\mathbb{R}^{d_{w}\times V} is a word embedding matrix, wtsubscript𝑤𝑡w_{t} indexes one element in a V𝑉V-dimensional set (vocabulary), and We[v]subscript𝑊𝑒delimited-[]𝑣W_{e}[v] denotes the v𝑣v-th column of matrix Wesubscript𝑊𝑒W_{e}.
|
| 24 |
+
|
| 25 |
+
In order for the model to take account of the sequence order, we also add “positional encodings” Vaswani et al. (2017) to the input embeddings:pt[2i]=sin(t100002i/dw)subscript𝑝𝑡delimited-[]2𝑖𝑠𝑖𝑛𝑡superscript100002𝑖subscript𝑑𝑤\displaystyle p_{t}[2i]=sin(\frac{t}{10000^{2i/d_{w}}})(1)pt[2i+1]=cos(t100002i/dw)subscript𝑝𝑡delimited-[]2𝑖1𝑐𝑜𝑠𝑡superscript100002𝑖subscript𝑑𝑤\displaystyle p_{t}[2i+1]=cos(\frac{t}{10000^{2i/d_{w}}})(2)where t𝑡t is the position and i𝑖i is the dimension. Each dimension of the positional encoding corresponds to a sinusoid. Therefore, the input of our model can be represented as xt=et+ptsubscript𝑥𝑡subscript𝑒𝑡subscript𝑝𝑡x_{t}=e_{t}+p_{t}.
|
| 26 |
+
|
| 27 |
+
In the following description, we use htesubscriptsuperscriptℎ𝑒𝑡h^{e}_{t} and htdsubscriptsuperscriptℎ𝑑𝑡h^{d}_{t} to denote the hidden vectors of the encoder and decoder respectively, the subscripts of which indicate timestep t𝑡t, and the superscripts indicate operations at the encoding or decoding stage.
|
| 28 |
+
|
| 29 |
+
In this subsection, we give a quick overview of MultiHead Self-Attention mechanism Vaswani et al. (2017). The attention is to map a query q𝑞q and a set of key-value pairs (K,V)𝐾𝑉(K,V) to an output. The output is computed as a weighted sum of the values, where the weight assigned to each value is computed based on the query and the corresponding key. The MultiHead mechanism applies multiple attention operations in parallel. Given q𝑞q and (K,V)𝐾𝑉(K,V), we can obtain the attention vector a𝑎a by:a=MultiHead(q,K,V)𝑎𝑀𝑢𝑙𝑡𝑖𝐻𝑒𝑎𝑑𝑞𝐾𝑉\displaystyle a=MultiHead(q,K,V)(3)=concat(head1,…,headl)absent𝑐𝑜𝑛𝑐𝑎𝑡ℎ𝑒𝑎subscript𝑑1…ℎ𝑒𝑎subscript𝑑𝑙\displaystyle{\ }{\;}=concat(head_{1},\dots,head_{l})(4)headi=attention(q¯,K¯,V¯)ℎ𝑒𝑎subscript𝑑𝑖𝑎𝑡𝑡𝑒𝑛𝑡𝑖𝑜𝑛¯𝑞¯𝐾¯𝑉\displaystyle head_{i}=attention(\overline{q},\overline{K},\overline{V})(5)=softmax(q¯K¯Tdk)V¯absent𝑠𝑜𝑓𝑡𝑚𝑎𝑥¯𝑞superscript¯𝐾𝑇subscript𝑑𝑘¯𝑉\displaystyle{\qquad}{\ }=softmax(\frac{\overline{q}\overline{K}^{T}}{\sqrt{d_{k}}})\overline{V}(6)whereq¯,K¯,V¯=qWiq,KWiK,VWiVformulae-sequence¯𝑞¯𝐾¯𝑉𝑞subscriptsuperscript𝑊𝑞𝑖𝐾subscriptsuperscript𝑊𝐾𝑖𝑉subscriptsuperscript𝑊𝑉𝑖\displaystyle\overline{q},\overline{K},\overline{V}=qW^{q}_{i},KW^{K}_{i},VW^{V}_{i}(7)Wiqsubscriptsuperscript𝑊𝑞𝑖W^{q}_{i}, WiKsubscriptsuperscript𝑊𝐾𝑖W^{K}_{i} and WiVsubscriptsuperscript𝑊𝑉𝑖W^{V}_{i} are parameter matrices; q¯∈ℝdk¯𝑞superscriptℝsubscript𝑑𝑘\overline{q}\in\mathbb{R}^{d_{k}}, K¯∈ℝnk×dk¯𝐾superscriptℝsubscript𝑛𝑘subscript𝑑𝑘\overline{K}\in\mathbb{R}^{n_{k}\times d_{k}} and V¯∈ℝnk×dv¯𝑉superscriptℝsubscript𝑛𝑘subscript𝑑𝑣\overline{V}\in\mathbb{R}^{n_{k}\times d_{v}}; dksubscript𝑑𝑘d_{k} and dvsubscript𝑑𝑣d_{v} are the dimensions of K¯¯𝐾\overline{K} and V¯¯𝑉\overline{V} respectively; nksubscript𝑛𝑘n_{k} is the number of key-value pairs.
|
| 30 |
+
|
| 31 |
+
The MultiHead self-attention allows the model to jointly attend to information from different positions. Due to the reduced dimension of each head and parallel operations, the total computational cost is similar to that of a single-head attention.
|
| 32 |
+
|
| 33 |
+
The encoder has two sub-layers. The first is a MultiHead self-attention mechanism, and the second is a position-wise fully connected feed-forward network which consists of two linear transformations with a ReLU activation in between. Different from Vaswani et al. (2017), we remove the residual connections in the MultiHead self-attention layer and only employ a residual connection in the fully connected layer, allowing the model to expand the dimension of hidden vectors to incorporate more information.
|
| 34 |
+
|
| 35 |
+
Given the input 𝐱=(x1,…,xN)𝐱subscript𝑥1…subscript𝑥𝑁\mathbf{x}=(x_{1},\dots,x_{N}), the hidden vector htesubscriptsuperscriptℎ𝑒𝑡h^{e}_{t} at time-step t𝑡t is computed by:ate=MultiHead(xt,𝐱,𝐱)subscriptsuperscript𝑎𝑒𝑡𝑀𝑢𝑙𝑡𝑖𝐻𝑒𝑎𝑑subscript𝑥𝑡𝐱𝐱\displaystyle a^{e}_{t}=MultiHead(x_{t},\mathbf{x},\mathbf{x})(8)a¯te=LN(ate)subscriptsuperscript¯𝑎𝑒𝑡𝐿𝑁subscriptsuperscript𝑎𝑒𝑡\displaystyle\overline{a}^{e}_{t}=LN(a^{e}_{t})(9)h¯te=max(0,a¯teW1e+b1e)W2e+b2esubscriptsuperscript¯ℎ𝑒𝑡𝑚𝑎𝑥0subscriptsuperscript¯𝑎𝑒𝑡subscriptsuperscript𝑊𝑒1subscriptsuperscript𝑏𝑒1subscriptsuperscript𝑊𝑒2subscriptsuperscript𝑏𝑒2\displaystyle\overline{h}^{e}_{t}=max(0,\overline{a}^{e}_{t}W^{e}_{1}+b^{e}_{1})W^{e}_{2}+b^{e}_{2}(10)hte=LN(h¯te+a¯te)subscriptsuperscriptℎ𝑒𝑡𝐿𝑁subscriptsuperscript¯ℎ𝑒𝑡subscriptsuperscript¯𝑎𝑒𝑡\displaystyle h^{e}_{t}=LN(\overline{h}^{e}_{t}+\overline{a}^{e}_{t})(11)where W1e∈ℝdm×dfsubscriptsuperscript𝑊𝑒1superscriptℝsubscript𝑑𝑚subscript𝑑𝑓W^{e}_{1}\in\mathbb{R}^{d_{m}\times d_{f}} and W2e∈ℝdf×dmsubscriptsuperscript𝑊𝑒2superscriptℝsubscript𝑑𝑓subscript𝑑𝑚W^{e}_{2}\in\mathbb{R}^{d_{f}\times d_{m}} are parameter matrices; b1e∈ℝdfsubscriptsuperscript𝑏𝑒1superscriptℝsubscript𝑑𝑓b^{e}_{1}\in\mathbb{R}^{d_{f}} and b2e∈ℝdmsubscriptsuperscript𝑏𝑒2superscriptℝsubscript𝑑𝑚b^{e}_{2}\in\mathbb{R}^{d_{m}} are bias vectors; dmsubscript𝑑𝑚d_{m} and dfsubscript𝑑𝑓d_{f} are the dimensions of hidden vector and fully connected inner layer respectively; LN𝐿𝑁LN denotes layer normalization.
|
| 36 |
+
|
| 37 |
+
Our model can be efficiently parallelized over the whole input. We can obtain all hidden vectors (h1e,…,hNe)subscriptsuperscriptℎ𝑒1…subscriptsuperscriptℎ𝑒𝑁(h^{e}_{1},\dots,h^{e}_{N}) simultaneously for an input sequence, thus greatly reducing the computational complexity compared with the sequential processing of LSTM.
|
| 38 |
+
|
| 39 |
+
Given the varying number of hidden vectors {hte}t=[1,…,N]subscriptsubscriptsuperscriptℎ𝑒𝑡𝑡1…𝑁\{h^{e}_{t}\}_{t=[1,\dots,N]}, we need to transform these local hidden vectors into a global sentence representation. We would like to apply the pooling strategy, which makes the extracted representation independent of the length of the input sequence and obtains a fixed-length vector. Conneau et al. (2017) examine BiLSTM with mean and max pooling for fixed-size sentence representation, and they conclude that the max pooling operation performs better on transfer tasks.
|
| 40 |
+
|
| 41 |
+
In this work, we propose to apply mean and max pooling simultaneously. The max pooling takes the maximum value over the sequence, which tries to capture the most salient property while filtering out less informative local values. On the other hand, the mean pooling does not make sharp choices on which part of the sequence is more important than others, and so it captures general information while not focusing too much on specific features. Obviously, the two pooling strategies can complement each other. The mean-max representation is obtained by:zmax[i]=maxthtiesubscript𝑧𝑚𝑎𝑥delimited-[]𝑖subscript𝑡subscriptsuperscriptℎ𝑒𝑡𝑖\displaystyle z_{max}[i]=\max_{t}h^{e}_{ti}(12)zmean=1N∑thtesubscript𝑧𝑚𝑒𝑎𝑛1𝑁subscript𝑡subscriptsuperscriptℎ𝑒𝑡\displaystyle z_{mean}=\frac{1}{N}\sum_{t}{h^{e}_{t}}(13)𝐳=[zmax,zmean]𝐳subscript𝑧𝑚𝑎𝑥subscript𝑧𝑚𝑒𝑎𝑛\displaystyle\mathbf{z}=[z_{max},z_{mean}](14)
|
| 42 |
+
|
| 43 |
+
Through combining two different pooling strategies, our model enjoys the following advantages. First, in the encoder, we can summarize the hidden vectors from different perspectives and so capture more diverse features of the input sequence, which will bring robustness on different transfer tasks. Second, in the decoder (as described in the next subsection), we can perform attention over the mean-max representation rather than over the local hidden vectors step by step, which would potentially make the autoencoder objective trivial.
|
| 44 |
+
|
| 45 |
+
As with the encoder, the decoder also applies the MultiHead self-attention to reconstruct the input sequence. As shown in Figure 1, the encoder and decoder are connected through a mean-max attention layer, which performs attention over the mean-max representation generated by the encoder.
|
| 46 |
+
|
| 47 |
+
To facilitate expansion of the hidden size, we employ residual connections in the mean-max attention layer and the fully connected layer, but not in the MultiHead self-attention layer. Given 𝐲=(x1,…,xt−1)𝐲subscript𝑥1…subscript𝑥𝑡1\mathbf{y}=(x_{1},\dots,x_{t-1}) and 𝐳𝐳\mathbf{z} as the decoder input, the hidden vector htdsubscriptsuperscriptℎ𝑑𝑡h^{d}_{t} at time step t𝑡t is obtained by:atd=MultiHead(yt,𝐲,𝐲)subscriptsuperscript𝑎𝑑𝑡𝑀𝑢𝑙𝑡𝑖𝐻𝑒𝑎𝑑subscript𝑦𝑡𝐲𝐲\displaystyle a^{d}_{t}=MultiHead(y_{t},\mathbf{y},\mathbf{y})(15)a¯td=LN(atd)subscriptsuperscript¯𝑎𝑑𝑡𝐿𝑁subscriptsuperscript𝑎𝑑𝑡\displaystyle\overline{a}^{d}_{t}=LN(a^{d}_{t})(16)atz=MultiHead(a¯td,𝐳,𝐳)subscriptsuperscript𝑎𝑧𝑡𝑀𝑢𝑙𝑡𝑖𝐻𝑒𝑎𝑑subscriptsuperscript¯𝑎𝑑𝑡𝐳𝐳\displaystyle a^{z}_{t}=MultiHead(\overline{a}^{d}_{t},\mathbf{z},\mathbf{z})(17)a¯tz=LN(atz+a¯td)subscriptsuperscript¯𝑎𝑧𝑡𝐿𝑁subscriptsuperscript𝑎𝑧𝑡subscriptsuperscript¯𝑎𝑑𝑡\displaystyle\overline{a}^{z}_{t}=LN(a^{z}_{t}+\overline{a}^{d}_{t})(18)h¯td=max(0,a¯tzW1d+b1d)W2d+b2dsubscriptsuperscript¯ℎ𝑑𝑡𝑚𝑎𝑥0subscriptsuperscript¯𝑎𝑧𝑡subscriptsuperscript𝑊𝑑1subscriptsuperscript𝑏𝑑1subscriptsuperscript𝑊𝑑2subscriptsuperscript𝑏𝑑2\displaystyle\overline{h}^{d}_{t}=max(0,\overline{a}^{z}_{t}W^{d}_{1}+b^{d}_{1})W^{d}_{2}+b^{d}_{2}(19)htd=LN(h¯td+a¯tz)subscriptsuperscriptℎ𝑑𝑡𝐿𝑁subscriptsuperscript¯ℎ𝑑𝑡subscriptsuperscript¯𝑎𝑧𝑡\displaystyle h^{d}_{t}=LN(\overline{h}^{d}_{t}+\overline{a}^{z}_{t})(20)where W1d∈ℝdm×dfsubscriptsuperscript𝑊𝑑1superscriptℝsubscript𝑑𝑚subscript𝑑𝑓W^{d}_{1}\in\mathbb{R}^{d_{m}\times d_{f}} and W2d∈ℝdf×dmsubscriptsuperscript𝑊𝑑2superscriptℝsubscript𝑑𝑓subscript𝑑𝑚W^{d}_{2}\in\mathbb{R}^{d_{f}\times d_{m}} are parameter matrices; b1d∈ℝdfsubscriptsuperscript𝑏𝑑1superscriptℝsubscript𝑑𝑓b^{d}_{1}\in\mathbb{R}^{d_{f}} and b2d∈ℝdmsubscriptsuperscript𝑏𝑑2superscriptℝsubscript𝑑𝑚b^{d}_{2}\in\mathbb{R}^{d_{m}} are bias vectors. 𝐳𝐳\mathbf{z} in Equation (17) is the mean-max representation generated by Equation (14).
|
| 48 |
+
|
| 49 |
+
Given the hidden vectors (h1d,…,hNd)subscriptsuperscriptℎ𝑑1…subscriptsuperscriptℎ𝑑𝑁(h^{d}_{1},\dots,h^{d}_{N}), the probability of generating a sequence S𝑆S with length-N𝑁N is defined as:P(wt|w<t,𝐳)∝exp(W3dhtd+b3d)proportional-to𝑃conditionalsubscript𝑤𝑡subscript𝑤absent𝑡𝐳𝑒𝑥𝑝subscriptsuperscript𝑊𝑑3subscriptsuperscriptℎ𝑑𝑡subscriptsuperscript𝑏𝑑3\displaystyle P(w_{t}|w_{<t},\mathbf{z})\propto exp(W^{d}_{3}h^{d}_{t}+b^{d}_{3})(21)J(θ)=∑tlogP(wt|w<t,𝐳)𝐽𝜃subscript𝑡𝑙𝑜𝑔𝑃conditionalsubscript𝑤𝑡subscript𝑤absent𝑡𝐳\displaystyle J(\theta)={\sum_{t}{logP(w_{t}|w_{<t},\mathbf{z})}}(22)The model learns to reconstruct the input sequence by optimizing the objective in Equation (22).
|
| 50 |
+
|
| 51 |
+
In the previous work, researchers evaluated the distributed representations of sentences by adding them as features in transfer tasks Kiros et al. (2015); Gan et al. (2017); Conneau et al. (2017). We use the same benchmarks and follow the same procedure to evaluate the capability of sentence embeddings produced by our generic encoder.
|
| 52 |
+
|
| 53 |
+
We conduct extensive experiments on 101010 transfer tasks. We first study the classification task on 666 benchmarks: movie review sentiment (MR, SST) Pang and Lee (2005); Socher et al. (2013), customer product reviews (CR) Hu and Liu (2004), subjectivity/objectivity classification (SUBJ) Pang and Lee (2004), opinion polarity (MPQA) Wiebe et al. (2005) and question type classification (TREC) Li and Roth (2002).
|
| 54 |
+
|
| 55 |
+
We also consider paraphrase detection on the Microsoft Research Paraphrase Corpus (MRPC) Dolan et al. (2004), where the evaluation metrics are accuracy and F1 score.
|
| 56 |
+
|
| 57 |
+
We then evaluate on the SICK dataset Marelli et al. (2014) for both textual entailment (SICK-E) and semantic relatedness (SICK-R). The evaluation metric is Pearson correlation for SICK-R. We also evaluate on the SemEval task of STS14 Agirre et al. (2014), where the evaluation metrics are Pearson and Spearman correlations.
|
| 58 |
+
|
| 59 |
+
The processing on each task is as follows: 1) Employ the pre-trained attention autoencoder to encode all sentences into the latent mean-max representations. 2) Using the representations as features, apply the open SentEval with a logistic regression classifier Conneau et al. (2017) to automatically evaluate on all the tasks. For a fair comparison of the plain sentence embeddings, we adopt all the default settings.
|
| 60 |
+
|
| 61 |
+
We train our model on the open Toronto Books Corpus Zhu et al. (2015), which was also used to train the skip-thoughts Kiros et al. (2015) and skip-thoughts+LN Ba et al. (2016). The Toronto Book Corpus consists of 707070 million sentences from over 7,00070007,000 books, which is not biased towards any particular domain or application.
|
| 62 |
+
|
| 63 |
+
The dimensions of hidden vectors and fully connected inner layer are set to 2,04820482,048 and 4,09640964,096 respectively. Hence, our mean-max AAE represents sentences with 4,09640964,096 dimensional vectors. We set l=8𝑙8l=8 parallel attention heads according to the development data.
|
| 64 |
+
|
| 65 |
+
We use the Adam algorithm Kingma and Ba (2014) with learning rate 2×10−42superscript1042\times 10^{-4} for optimization. Gradient clipping is adopted by scaling gradients when the norm of the parameter vector exceeds a threshold of 555. We perform dropout Srivastava et al. (2014) and set the dropout rate to 0.50.50.5. Mini-batches of size 646464 are used. Our model learns until the reconstruction accuracy in the development data stops improving.
|
| 66 |
+
|
| 67 |
+
Our aim is to learn a generic sentence encoder that could encode a large number of words. There always are some words that haven’t been seen during training, and so we use the publicly available GloVe vectors 222https://nlp.stanford.edu/projects/glove/ to expand our encoder’s vocabulary. We set the word vectors in our models as the corresponding word vectors in GloVe, and do not update the word embeddings during training. Thus, any word vectors from GloVe can be naturally used to encode sentences. Our models are trained with a vocabulary of 21,5832158321,583 top frequent words in the Toronto Book corpus. After vocabulary expansion, we can now successfully cover 2,196,01721960172,196,017 words.
|
| 68 |
+
|
| 69 |
+
All experiments are implemented in Tensorflow Abadi et al. (2016), using a NVIDIA GeForce GTX 1080 GPU with 8GB memory.
|
| 70 |
+
|
| 71 |
+
A summary of our experimental results on 101010 tasks is given in Table 1, in which the evaluation metric of the first 888 tasks is accuracy. To make a clear comparison of the overall performance, we compute the “macro” and “micro” average of accuracy in Table 2, where the micro average is weighted by the number of test samples in each task. In the previous work, different approaches conduct experiments on different benchmarks. Therefore we report the average scores on 666 tasks, 777 tasks and 888 tasks, respectively.
|
| 72 |
+
|
| 73 |
+
We divide related models into three groups. The first group contains unsupervised single models, including the Paragraph Vector model Le and Mikolov (2014), the SDAE method Hill et al. (2016), the SIF model Arora et al. (2017), the FastSent Hill et al. (2016), the skip-thoughts (uni-skip and bi-skip) Kiros et al. (2015), the CNN encoder (hierarchical-CNN and composite-CNN) Gan et al. (2017) and skip-thoughts+LN Ba et al. (2016). Our mean-max attention autoencoder sits in this group. The second group consists of unsupervised combined models, including combine-skip Kiros et al. (2015) and combine-CNN Gan et al. (2017). In the third group, we list the results from the work of Conneau et al. (2017) only for reference, since it is trained on labelled data.
|
| 74 |
+
|
| 75 |
+
Comparison with skip-thoughts+LN. The skip-thoughts+LN is the best model among the existing single models. Compared with the skip-thoughts+LN, our method obtains better results on 444 datasets (SST, TREC, SICK-E, STS14) and comparable results on 333 datastes (SUBJ, MPQA, SICK-R). Looking at the STS14 results, we observe that the cosine metrics in our representation space is much more semantically informative than in skip-thoughts+LN representation space (pearson score of 0.580.580.58 compared to 0.440.440.44). Considering the overall performance shown in Table 2, our model obtains better results both in the macro and micro average accuracy across 777 considered tasks. In view of the required training data, the skip-thoughts+LN needs coherent texts while our model needs only individual sentences. Moreover, we train our model in less than 555 hours on a single GPU compared to the best skip-thoughts+LN network trained for a month.
|
| 76 |
+
|
| 77 |
+
Unsupervised combined models. The results of the individual models Kiros et al. (2015); Gan et al. (2017) are not promising. To get better performance, they train two separate models on the same corpus and then combine the latent representations together. As shown in Table 2, our mean-max attention autoencoder outperforms the classical combine-skip model by 1.31.31.3 points in the average performance across 888 considered tasks. Specially, the pearson correlation of our model is 222 times over the combine-skip model on the STS14 task. Looking at the overall performance of 666 tasks, our model gets comparable results with the combine-CNN, which combines the hierarchical and composite approaches to exploit the intra-sentence and inter-sentence information. Obviously, our model is simple and fast to implement compared with the combined methods.
|
| 78 |
+
|
| 79 |
+
Supervised representation training. It is unfair to directly compare our totally unsupervised model with the supervised representation learning method. Conneau et al. (2017) train the BiLSTM-Max (on ALLNLI) on the high-quality natural language inference data. Our model even performs better than the BiLSTM-Max (on ALLNLI) on the SUBJ and TREC tasks. More importantly, our model can be easily adapted to other low-resource languages.
|
| 80 |
+
|
| 81 |
+
Our model contains three main modules: the mean-max attention layer, the combined pooling strategy and the encoder-decoder network. We make a further study on these components. The experimental results are shown in Table 3.
|
| 82 |
+
|
| 83 |
+
In our model, the mean-max attention layer allows the decoder to pay attention to the encoding representation of the full sentence at each time step dynamically. To summarize the contribution of the mean-max attention layer, we compare with traditional baselines, including the sequential denoising autoencoder (SDAE) with LSTM networks Hill et al. (2016) and the CNN-LSTM autoencoder Gan et al. (2017), both of which only use the encoding representation to set the initial state of the decoder and follow the teacher forcing strategy.
|
| 84 |
+
|
| 85 |
+
We employ both the mean and max pooling operations over the local hidden vectors to obtain sentence embeddings. To validate the effectiveness of our mean-max representations, we train two additional models: (i) an attention autoencoder only with max pooling (max AAE) and (ii) an attention autoencoder only with mean pooling (mean AAE). The dimension of hidden vectors is also set to 2,04820482,048.
|
| 86 |
+
|
| 87 |
+
Our encoder-decoder network depends on the MultiHead self-attention mechanism to reconstruct the input sequence. To test the effect of the MultiHead self-attention mechanism, we replace it with RNN and implement a mean-max RNN autoencoder (mean-max RAE) training on the same Toronto Books Corpus. A bidirectional LSTM computes a set of hidden vectors on an input sentence, and then the mean and max pooling operations are employed to generate the latent mean-max representation. The representation is then fed to a LSTM decoder to reconstruct the input sequence through attention operation over the latent representation. The parameter configurations are consistent with our other models. Moreover, we also train two additional models with different pooling strategies: mean RAE and max RAE.
|
| 88 |
+
|
| 89 |
+
Analysis on the mean-max attention layer. Our mean-max attention layer brings significant performance gain over the previous autoencoders. Compared the mean RAE with LSTM-SDAE, both of which use the RNN-RNN encoder-decoder network to reconstruct the input sequence, our mean RAE consistently obtains better performance than LSTM-SDAE across all considered tasks. In particular, it yields a performance gain of 10.410.410.4 on the TREC dataset and 292929 on the STS14 dataset. Compared with another CNN-LSTM autoencoder, our mean RAE also gets better performance for all but one task. It demonstrates that the mean-max attention layer enables the decoder to attend to the global information of the input sequence, thus go beyond the “teacher forcing training”.
|
| 90 |
+
|
| 91 |
+
Analysis on the pooling strategy. Considering the overall performance, our mean-max representations outperform the individual mean and max representations both in the attention and RNN networks. In our attention autoencoder, the macro average score of the mean-max AAE is more than 0.60.60.6 over the individual pooling strategy. In the RNN autoencoder, the combined pooling strategy yields a performance gain of 0.50.50.5 over the mean pooling and 0.60.60.6 over the max pooling. The results indicate that our mean-max pooling captures more diverse information of the input sequence, which is robust and effective in dealing with various transfer tasks.
|
| 92 |
+
|
| 93 |
+
Comparison with RNN-based autoencoder. As shown in Table 3, our MultiHead self-attention network obtains obvious improvement over the RNN network in different sets of pooling strategies, and it yields a performance gain of 1.11.11.1 when applying the best combined mean-max pooling operation. The results demonstrate that the MultiHead self-attention mechanism enables the sentence representations to capture more useful information about the input sequence.
|
| 94 |
+
|
| 95 |
+
Analysis on computational complexity. A self-attention layer connects all positions with a constant number of sequentially executed operations, whereas a recurrent layer requires O(n)𝑂𝑛O(n) sequential operations. Therefore, our model greatly reduces the computational complexity. Excluding the number of parameters used in the word embeddings, the skip-thought model Kiros et al. (2015) contains 40 million parameters, while our mean-max AAE has approximately 39 million parameters. It took nearly 50.450.450.4 and 25.425.425.4 minutes to train the skip-thought model Kiros et al. (2015) and the skip-thoughts+LN Ba et al. (2016) per 100010001000 mini-batches respectively. Both the skip-thought and skip-thought+LN are implemented in Theano. A recent implementation of the skip-thoughts model was released by Google 333https://github.com/tensorflow/models/tree/master/research/skip_thoughts, which took nearly 25.925.925.9 minutes to train 100010001000 mini-batches on a GTX 1080 GPU. In our experiment, it took 3.33.33.3 minutes to train the mean-max AAE model every 100010001000 mini-batches.
|
| 96 |
+
|
| 97 |
+
The above experimental results have proven the effectiveness of the mean-max attention mechanism in the decoding. We further inspect the attention distributions captured by the mean-max attention layer, as shown in Figure 2. The side-by-side heat illustrates how much the decoder pay attention to the mean representation and max representation respectively at each decoding step. We can see that the attention layer learns to selectively retrieve the mean or max representations dynamically, which relieve the decoder from the burden of generating words solely conditioning on the previous ground-truth words. Also, the two different representations can complement each other, and the mean representation plays a greater role.
|
| 98 |
+
|
| 99 |
+
In this paper, we present a mean-max AAE to learn universal sentence representations from unlabelled data. Our model applies the MultiHead self-attention mechanism both in the encoder and decoder, and employs a mean-max pooling strategy to capture more diverse information of the input. To avoid the impact of “teacher forcing training”, our decoder performs attention over the encoding representations dynamically. To evaluate the effectiveness of sentence representations, we conduct extensive experiments on 101010 transfer tasks. The experimental results show that our model obtains state-of-the-art performance among the unsupervised single models. Furthermore, it is fast to train a high-quality generic encoder due to the paralleling operation. In the future, we will adapt our mean-max AAE to other low-resource languages for learning universal sentence representations.
|
1809.06709v2.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
1809.06858v2.txt
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Word embeddings, which are distributed and continuous vector representations for word tokens, have been one of the basic building blocks for many neural network-based models used in natural language processing (NLP) tasks, such as language modeling [20, 18], text classification [26, 8] and machine translation [5, 6, 44, 42, 12]. Different from classic one-hot representation, the learned word embeddings contain semantic information which can measure the semantic similarity between words [30], and can also be transferred into other learning tasks [31, 3].
|
| 2 |
+
|
| 3 |
+
In deep learning approaches for NLP tasks, word embeddings act as the inputs of the neural network and are usually trained together with neural network parameters. As the inputs of the neural network, word embeddings carry all the information of words that will be further processed by the network, and the quality of embeddings is critical and highly impacts the final performance of the learning task [16]. Unfortunately, we find the word embeddings learned by many deep learning approaches are far from perfect. As shown in Figure 1(a) and 1(b), in the embedding space learned by word2vec model, the nearest neighbors of word “Peking” includes “quickest”, “multicellular”, and “epigenetic”, which are not semantically similar, while semantically related words such as “Beijing” and “China” are far from it. Similar phenomena are observed from the word embeddings learned from translation tasks.
|
| 4 |
+
|
| 5 |
+
With a careful study, we find a more general problem which is rooted in low-frequency words in the text corpus. Without any confusion, we also call high-frequency words as popular words and call low-frequency words as rare words. As is well known [25], the frequency distribution of words roughly follows a simple mathematical form known as Zipf’s law. When the size of a text corpus grows, the frequency of rare words is much smaller than popular words while the number of unique rare words is much larger than popular words. Interestingly, the learned embeddings of rare words and popular words behave differently. (1) In the embedding space, a popular word usually has semantically related neighbors, while a rare word usually does not. Moreover, the nearest neighbors of more than 85% rare words are rare words. (2) Word embeddings encode𝑒𝑛𝑐𝑜𝑑𝑒encode frequency information. As shown in Figure 1(a) and 1(b), the embeddings of rare words and popular words actually lie in different subregions of the space. Such a phenomenon is also observed in [31].
|
| 6 |
+
|
| 7 |
+
We argue that the different behaviors of the embeddings of popular words and rare words are problematic. First, such embeddings will affect the semantic understanding of words. We observe more than half of the rare words are nouns or variants of popular words. Those rare words should have similar meanings or share the same topics with popular words. Second, the neighbors of a large number of rare words are semantically unrelated rare words. To some extent, those word embeddings encode more frequency information than semantic information which is not good from the view of semantic understanding. It will consequently limit the performance of down-stream tasks using the embeddings. For example, in text classification, it cannot be well guaranteed that the label of a sentence does not change when you replace one popular/rare word in the sentence by its rare/popular alternatives.
|
| 8 |
+
|
| 9 |
+
To address this problem, in this paper, we propose an adversarial training method to learn FRequency-AGnostic word Embedding (FRAGE). For a given NLP task, in addition to minimize the task-specific loss by optimizing the task-specific parameters together with word embeddings, we introduce another discriminator, which takes a word embedding as input and classifies whether it is a popular/rare word. The discriminator optimizes its parameters to maximize its classification accuracy, while word embeddings are optimized towards a low task-dependent loss as well as fooling the discriminator to mis-classify the popular and rare words. When the whole training process converges and the system achieves an equilibrium, the discriminator cannot well differentiate popular words from rare words. Consequently, rare words lie in the same region as and are mixed with popular words in the embedding space. Then FRAGE will catch better semantic information and help the task-specific model to perform better.
|
| 10 |
+
|
| 11 |
+
We conduct experiments on four types of NLP tasks, including three word similarity tasks, two language modeling tasks, three sentiment classification tasks and two machine translation tasks to test our method. In all tasks, FRAGE outperforms the baselines. Specifically, in language modeling and machine translation, we achieve better performance than the state-of-the-art results on PTB, WT2 and WMT14 English-German datasets.
|
| 12 |
+
|
| 13 |
+
Words are the basic units of natural languages, and distributed word representations (i.e., word embeddings) are the basic units of many models in NLP tasks including language modeling [20, 18] and machine translation [5, 6, 44, 42, 12]. It has been demonstrated that word representations learned from one task can be transferred to other tasks and achieve competitive performance [3].
|
| 14 |
+
|
| 15 |
+
While word embeddings play an important role in neural network-based models in NLP and achieve great success, one technical challenge is that the embeddings of rare words are difficult to train due to their low frequency of occurrences. [39] develops a novel way to split word into sub-word units which is widely used in neural machine translation. However, the low-frequency sub-word units are still difficult to train: [33] provides a comprehensive study which shows that the rare (sub)words are usually under-estimated in neural machine translation: during inference step, the model tends to choose popular words over their rare alternatives.
|
| 16 |
+
|
| 17 |
+
The basic idea of our work to address the above problem is adversarial training, in which two or more models learn together by pursuing competing goals. A representative example of adversarial training is Generative Adversarial Networks (GANs) [13, 38] for image generation [36, 46, 2], in which a discriminator and a generator compete with each other: the generator aims to generate images similar to the natural ones, and the discriminator aims to detect the generated ones from the natural ones. Recently, adversarial training has been successfully applied to NLP tasks [7, 24, 23]. [7, 24] introduce an additional discriminator to differentiate the semantics learned from different languages in non-parallel bilingual data. [23] develops a discriminator to classify whether a sentence is created by human or generated by a model.
|
| 18 |
+
|
| 19 |
+
Our proposed method is under the adversarial training framework but not exactly the conventional generator-discriminator approach since there is no generator in our scenario. For an NLP task and its neural network model (including word embeddings), we introduce a discriminator to differentiate embeddings of popular words and rare words; while the NN model aims to fool the discriminator and minimize the task-specific loss simultaneously.
|
| 20 |
+
|
| 21 |
+
Our work is also weakly related to adversarial domain adaptation which attempts to mitigate the negative effects of domain shift between training and testing [10, 40]. The difference between this work and adversarial domain adaptation is that we do not target at the mismatch between training and testing; instead, we aim to improve the effectiveness of word embeddings and consequently improve the performance of end-to-end NLP tasks.
|
| 22 |
+
|
| 23 |
+
In this section, we study the embeddings of popular words and rare words based on the models trained from Google News corpora using word2vec 111https://code.google.com/archive/p/word2vec/ and trained from WMT14 English-German translation task using Transformer [42]. The implementation details can be found in the supplementary material (part A).
|
| 24 |
+
|
| 25 |
+
In both tasks, we simply set the top 20%percent2020\% frequent words in vocabulary as popular words and denote the rest as rare words (roughly speaking, we set a word as a rare word if its relative frequency is lower than 10−6superscript10610^{-6} in WMT14 dataset and 10−7superscript10710^{-7} in Google News dataset). We have tried other thresholds such as 10%percent1010\% or 25%percent2525\% and found the observations are similar.
|
| 26 |
+
|
| 27 |
+
We study whether the semantic relationship between two words is reasonable. To achieve this, we randomly sampled some rare/popular words and checked the embeddings trained from different tasks. For each sampled word, we determined its nearest neighbors based on the cosine similarity between its embeddings and others’.222Cosine distance is the most popularly used metric in literature to measure semantic similarity [30, 35, 31]. We also have tried other metrics, e.g., Euclid distance, and the phenomena still exist. We also manually chose words which are semantically similar to it. For simplicity, for each word, we call the nearest words predicted from the embeddings as model-predicted neighbors, and call our chosen words as semantic neighbors.
|
| 28 |
+
|
| 29 |
+
To visualize word embeddings, we reduce their dimensionalities by SVD and plot two cases in Figure 1. More cases and other studies without dimensionality reduction can be found in the supplementary material (part C).
|
| 30 |
+
|
| 31 |
+
We find that the embeddings trained from different tasks share some common patterns. For both tasks, more than 90% of model-predicted neighbors of rare words are rare words. For each rare word, the model-predicted neighbor is usually not semantically related to this word, and semantic neighbors we chose are far away from it in the embedding space. In contrast, the model-predicted neighbors of popular words are very reasonable.
|
| 32 |
+
|
| 33 |
+
As the patterns in rare words are different from that of popular words, we further check the whole embedding matrix to make a general understanding. We also visualize the word embeddings using SVD by keeping the two directions with top-2 largest eigenvalues as in [30, 32] and plot them in Figure 1(c) and 1(d). From the figure, we can see that the embeddings actually encode frequencies to a certain degree: the rare words and popular words lie in different regions after this linear projection, and thus they occupy different regions in the original embedding space. This strange phenomenon is also observed in other learned embeddings (e.g.CBOW and GLOVE) and mentioned in [32].
|
| 34 |
+
|
| 35 |
+
From the empirical study above, we can see that the occupied spaces of popular words and rare words are different and here we intuitively explain a possible reason. We simply take word2vec as an example which is trained by stochastic gradient descent. During training, the sample rate of a popular word is high and the embedding of a popular word updates frequently. For a rare word, the sample rate is low and its embedding rarely updates. According to our study, on average, the moving distance of the embedding for a popular word is twice longer than that of a rare word during training. As all word embeddings are usually initialized around the origin with a small variance, we observe in the final model, the embeddings of rare words are still around the origin and the popular words have moved far away.
|
| 36 |
+
|
| 37 |
+
We have strong evidence that the current phenomena are problematic. First, according to our study,333We use the POS tagger from Natural Language Toolkit, https://github.com/nltk. in both tasks, more than half of the rare words are nouns, e.g., company names, city names. They may share some similar topics to popular entities, e.g., big companies and cities; around 10% percent of rare words include a hyphen (which is usually used to join popular words), and over 30% rare words are different PoSs of popular words. These words should have mixed or similar semantics to some popular words. These facts show that rare words and popular words should lie in the same region of the embedding space, which is different from what we observed. Second, as we can see from the cases, for rare words, model-predicted neighbors are usually not semantically related words but frequency-related words (rare words). This shows, for rare words, the embeddings encode more frequency information than semantic information. It is not good to use such word embeddings into semantic understanding tasks, e.g., text classification, language modeling, language understanding and translation.
|
| 38 |
+
|
| 39 |
+
In this section, we present our method to improve word representations. As we have a strong prior that many rare words should share the same region in the embedding space as popular words, the basic idea of our algorithm is to train the word embeddings in an adversarial framework: We introduce a discriminator to categorize word embeddings into two classes: popular ones or rare ones. We hope the learned word embeddings not only minimize the task-specific training loss but also fool the discriminator. By doing so, the frequency information is removed from the embedding and we call our method frequency-agnostic word embedding (FRAGE).
|
| 40 |
+
|
| 41 |
+
We first define some notations and then introduce our algorithm. We develop three types of notations: embeddings, task-specific parameters/loss, and discriminator parameters/loss.
|
| 42 |
+
|
| 43 |
+
Denote θemb∈Rd×|V|superscript𝜃𝑒𝑚𝑏superscript𝑅𝑑𝑉\theta^{emb}\in R^{d\times|V|} as the word embedding matrix to be learned, where d𝑑d is the dimension of the embedding vectors and |V|𝑉|V| is the vocabulary size. Let Vpopsubscript𝑉𝑝𝑜𝑝V_{pop} denote the set of popular words and Vrare=V∖Vpopsubscript𝑉𝑟𝑎𝑟𝑒𝑉subscript𝑉𝑝𝑜𝑝V_{rare}=V\setminus V_{pop} denote the set of rare words. Then the embedding matrix θembsuperscript𝜃𝑒𝑚𝑏\theta^{emb} can be divided into two parts: θpopembsubscriptsuperscript𝜃𝑒𝑚𝑏𝑝𝑜𝑝\theta^{emb}_{pop} for popular words and θrareembsubscriptsuperscript𝜃𝑒𝑚𝑏𝑟𝑎𝑟𝑒\theta^{emb}_{rare} for rare words. Let θwembsubscriptsuperscript𝜃𝑒𝑚𝑏𝑤\theta^{emb}_{w} denote the embedding of word w𝑤w. Let θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model} denote all the other task-specific parameters except word embeddings. For instance, for language modeling, θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model} is the parameters of the RNN or LSTM; for neural machine translation, θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model} is the parameters of the encoder, attention module and decoder.
|
| 44 |
+
|
| 45 |
+
Let LT(S;θmodel,θemb)subscript𝐿𝑇𝑆superscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏L_{T}(S;\theta^{model},\theta^{emb}) denote the task-specific loss over a dataset S𝑆S. Taking language modeling as an example, the loss LT(S;θmodel,θemb)subscript𝐿𝑇𝑆superscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏L_{T}(S;\theta^{model},\theta^{emb}) is defined as the negative log likelihood of the data:LT(S;θmodel,θemb)=−1|S|∑y∈SlogP(y;θmodel,θemb),subscript𝐿𝑇𝑆superscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏1𝑆subscript𝑦𝑆𝑃𝑦superscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏\displaystyle L_{T}(S;\theta^{model},\theta^{emb})=-\frac{1}{|S|}\sum_{y\in S}\log P(y;\theta^{model},\theta^{emb}),(1)where y𝑦y is a sentence.
|
| 46 |
+
|
| 47 |
+
Let fθDsubscript𝑓superscript𝜃𝐷f_{\theta^{D}} denote a discriminator with parameters θDsuperscript𝜃𝐷\theta^{D} , which takes a word embedding as input and outputs a confidence score between 0 and 1 indicating how likely the word is a rare word. Let LD(V;θD,θemb)subscript𝐿𝐷𝑉superscript𝜃𝐷superscript𝜃𝑒𝑚𝑏L_{D}(V;\theta^{D},\theta^{emb}) denote the loss of the discriminator:LD(V;θD,θemb)=1|Vpop|∑w∈VpoplogfθD(θwemb)+1|Vrare|∑w∈Vrarelog(1−fθD(θwemb)).subscript𝐿𝐷𝑉superscript𝜃𝐷superscript𝜃𝑒𝑚𝑏1subscript𝑉𝑝𝑜𝑝subscript𝑤subscript𝑉𝑝𝑜𝑝subscript𝑓superscript𝜃𝐷subscriptsuperscript𝜃𝑒𝑚𝑏𝑤1subscript𝑉𝑟𝑎𝑟𝑒subscript𝑤subscript𝑉𝑟𝑎𝑟𝑒1subscript𝑓superscript𝜃𝐷subscriptsuperscript𝜃𝑒𝑚𝑏𝑤\displaystyle L_{D}(V;\theta^{D},\theta^{emb})=\frac{1}{|V_{pop}|}\sum_{w\in V_{pop}}\log f_{\theta^{D}}(\theta^{emb}_{w})+\frac{1}{|V_{rare}|}\sum_{w\in V_{rare}}\log(1-f_{\theta^{D}}(\theta^{emb}_{w})).(2)
|
| 48 |
+
|
| 49 |
+
Following the principle of adversarial training, we develop a minimax objective to train the task-specific model (θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model} and θembsuperscript𝜃𝑒𝑚𝑏\theta^{emb}) and the discriminator (θDsuperscript𝜃𝐷\theta^{D}) as below:minθmodel,θembmaxθDLT(S;θmodel,θemb)−λLD(V;θD,θemb),subscriptsuperscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏subscriptsuperscript𝜃𝐷subscript𝐿𝑇𝑆superscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏𝜆subscript𝐿𝐷𝑉superscript𝜃𝐷superscript𝜃𝑒𝑚𝑏\displaystyle\min_{\theta^{model},\theta^{emb}}\max_{\theta^{D}}L_{T}(S;\theta^{model},\theta^{emb})-\lambda L_{D}(V;\theta^{D},\theta^{emb}),(3)where λ𝜆\lambda is a coefficient to trade off the two loss terms. We can see that when the model parameter θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model} and the embedding θembsuperscript𝜃𝑒𝑚𝑏\theta^{emb} are fixed, the optimization of the discriminator θDsuperscript𝜃𝐷\theta^{D} becomesmaxθD−λLD(V;θD,θemb),subscriptsuperscript𝜃𝐷𝜆subscript𝐿𝐷𝑉superscript𝜃𝐷superscript𝜃𝑒𝑚𝑏\displaystyle\max_{\theta^{D}}-\lambda L_{D}(V;\theta^{D},\theta^{emb}),(4)which is to minimize the classification error of popular and rare words. When the discriminator θDsuperscript𝜃𝐷\theta^{D} is fixed, the optimization of θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model} and θembsuperscript𝜃𝑒𝑚𝑏\theta^{emb} becomesminθmodel,θembLT(S;θmodel,θemb)−λLD(V;θD,θemb),subscriptsuperscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏subscript𝐿𝑇𝑆superscript𝜃𝑚𝑜𝑑𝑒𝑙superscript𝜃𝑒𝑚𝑏𝜆subscript𝐿𝐷𝑉superscript𝜃𝐷superscript𝜃𝑒𝑚𝑏\displaystyle\min_{\theta^{model},\theta^{emb}}L_{T}(S;\theta^{model},\theta^{emb})-\lambda L_{D}(V;\theta^{D},\theta^{emb}),(5)i.e., to optimize the task performance as well as fooling the discriminator. We train θmodelsuperscript𝜃𝑚𝑜𝑑𝑒𝑙\theta^{model}, θembsuperscript𝜃𝑒𝑚𝑏\theta^{emb} and θDsuperscript𝜃𝐷\theta^{D} iteratively by stochastic gradient descent or its variants. The general training process is shown in Algorithm 1.
|
| 50 |
+
|
| 51 |
+
We test our method on a wide range of tasks, including word similarity, language modeling, machine translation and text classification. For each task, we choose the state-of-the-art architecture together with the state-of-the-art training method as our baseline 444Code for our implement is available at https://github.com/ChengyueGongR/FrequencyAgnostic.
|
| 52 |
+
|
| 53 |
+
For fair comparisons, for each task, our method shares the same model architecture as the baseline. The only difference is that we use the original task-specific loss function with an additional adversarial loss as in Eqn. (3). Due to space limitations, we put dataset description, model description, hyper-parameter configuration into supplementary material (part A).
|
| 54 |
+
|
| 55 |
+
We conduct experiments on the following tasks.
|
| 56 |
+
|
| 57 |
+
Word Similarity evaluates the performance of the learned word embeddings by calculating the word similarity: it evaluates whether the most similar words of a given word in the embedding space are consistent with the ground-truth, in terms of Spearman’s rank correlation. We use the skip-gram model as our baseline model [30]555https://github.com/tensorflow/models/blob/master/tutorials/embedding, and train the embeddings using Enwik9666http://mattmahoney.net/dc/textdata.html. We test the baseline and our method on three datasets: RG65, WS and RW. The RW dataset is a dataset for the evaluation of rare words. Following common practice [30, 1, 35, 31], we use cosine distance while computing the similarity between two word embeddings.
|
| 58 |
+
|
| 59 |
+
Language Modeling is a basic task in natural language processing. The goal is to predict the next word conditioned on previous words and the task is evaluated by perplexity. We do experiments on two widely used datasets [27, 28, 45], Penn Treebank (PTB) [29] and WikiText-2 (WT2) [28]. We choose two recent works as our baselines: the AWD-LSTM model777https://github.com/salesforce/awd-lstm-lm [27] and the AWD-LSTM-MoS model,888https://github.com/zihangdai/mos [45] which achieves state-of-the-art performance.
|
| 60 |
+
|
| 61 |
+
Machine Translation is a popular task in both deep learning and natural language processing. We choose two datasets: WMT14 English-German and IWSLT14 German-English datasets, which are evaluated in terms of BLEU score999https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl. We use Transformer [42] as the baseline model, which achieves state-of-the-art accuracy on multiple translation datasets. We use transformer_base and transformer_big configurations following tensor2tensor [41]101010To improve the training for imbalanced labeled data, a common method is to adjust loss function by reweighting the training samples; To regularize the parameter space, a common method is to use l2subscript𝑙2l_{2} regularization. We tested these methods in machine translation and found the performance is not good. Detailed analysis is provided in the supplementary material (part B)..
|
| 62 |
+
|
| 63 |
+
Text Classification is a conventional machine learning task and is evaluated by accuracy. Following the setting in [22], we implement a Recurrent CNN-based model111111https://github.com/brightmart/text_classification and test it on AG’s news corpus (AGs), IMDB movie review dataset (IMDB) and 20 Newsgroups (20NG).
|
| 64 |
+
|
| 65 |
+
In all tasks, we simply set the top 20%percent2020\% frequent words in vocabulary as popular words and denote the rest as rare words, which is the same as our empirical study. For all the tasks except word embedding, we use full-batch gradient descent to update the discriminator. For word embedding, mini-batch stochastic gradient descent is used to update the discriminator with a batch size 3000, since the vocabulary size is large. For language modeling and machine translation tasks, we use logistic regression as the discriminator. For other tasks, we find using a shallow neural network with one hidden layer is more efficient and we set the number of nodes in the hidden layer as 1.5 times embedding size. In all tasks, we set the hyper-parameter λ𝜆\lambda to 0.10.10.1. We list other hyper-parameters related to different task-specific models in the supplementary material (part A).
|
| 66 |
+
|
| 67 |
+
In this subsection, we provide the experimental results of all tasks. For simplicity, we use “with FRAGE” as our proposed method in the tables.
|
| 68 |
+
|
| 69 |
+
Word Similarity The results on three word similarity tasks are listed in Table 1. From the table, we can see that our method consistently outperforms the baseline on all datasets. In particular, we outperform the baseline for about 5.4 points on the rare word dataset RW. This result shows that our method improves the representation of words, especially the rare words.
|
| 70 |
+
|
| 71 |
+
Language Modeling The results of language modeling on PTB and WT2 datasets are presented in Table 2. We test our model and the baselines at several checkpoints used in the baseline papers: without finetune, with finetune, with post-process (continuous cache pointer [14] or dynamic evaluation [21]). In all these settings, our method outperforms the two baselines. On PTB dataset, our method improves the AWD-LSTM and AWD-LSTM-MoS baseline by 0.8/1.2/1.0 and 0.76/1.13/1.15 points in test set at different checkpoints. On WT2 dataset, which contains more rare words, our method achieves larger improvements. We improve the results of AWD-LSTM and AWD-LSTM-MoS by 2.3/2.4/2.7 and 1.15/1.72/1.54 in terms of test perplexity, respectively.
|
| 72 |
+
|
| 73 |
+
Machine Translation The results of neural machine translation on WMT14 English-German and IWSLT14 German-English tasks are shown in Table 3. We outperform the baselines for 1.06/0.71 in the term of BLEU in transformer_base and transformer_big settings in WMT14 English-German task, respectively. The model learned from adversarial training also outperforms original one in IWSLT14 German-English task by 0.85. These results show improving word embeddings can achieve better results in more complicated tasks and larger datasets.
|
| 74 |
+
|
| 75 |
+
Text Classification The results are listed in Table 4. Our method outperforms the baseline method for 1.26%/0.66%/0.44% on three different datasets.
|
| 76 |
+
|
| 77 |
+
As a summary, our experiments on four different tasks with 10 datasets verify the effectiveness of our method. We provide some case studies and visualizations of our method in the supplementary material (part C), which show that the semantic similarities are reasonable and the popular/rare words are better mixed together in the embedding space.
|
| 78 |
+
|
| 79 |
+
In this paper, we find that word embeddings learned in several tasks are biased towards word frequency: the embeddings of high-frequency and low-frequency words lie in different subregions of the embedding space. This makes learned word embeddings ineffective, especially for rare words, and consequently limits the performance of these neural network models. We propose a neat, simple yet effective adversarial training method to improve the model performance which is verified in a wide range of tasks.
|
| 80 |
+
|
| 81 |
+
We will explore several directions in the future. First, we will investigate the theoretical aspects of word embedding learning and our adversarial training method. Second, we will study more applications which have the similar problem even beyond NLP.
|
1809.06963v3.txt
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Machine Reading Comprehension (MRC) has gained growing interest in the research community Rajpurkar et al. (2016); Yu et al. (2018). In an MRC task, the machine reads a text passage and a question, and generates (or selects) an answer based on the passage. This requires the machine to possess strong comprehension, inference and reasoning capabilities. Over the past few years, there has been much progress in building end-to-end neural network models Seo et al. (2016) for MRC. However, most public MRC datasets (e.g., SQuAD, MS MARCO, TriviaQA) are typically small (less than 100K) compared to the model size (such as SAN Liu et al. (2018c, b) with around 10M parameters). To prevent over-fitting, recently there have been some studies on using pre-trained word embeddings Pennington et al. (2014) and contextual embeddings in the MRC model training, as well as back-translation approaches Yu et al. (2018) for data augmentation.
|
| 2 |
+
|
| 3 |
+
Multi-task learning Caruana (1997) is a widely studied area in machine learning, aiming at better model generalization by combining training datasets from multiple tasks. In this work, we explore a multi-task learning (MTL) framework to enable the training of one universal model across different MRC tasks for better generalization. Intuitively, this multi-task MRC model can be viewed as an implicit data augmentation technique, which can improve generalization on the target task by leveraging training data from auxiliary tasks.
|
| 4 |
+
|
| 5 |
+
We observe that merely adding more tasks cannot provide much improvement on the target task. Thus, we propose two MTL training algorithms to improve the performance.The first method simply adopts a sampling scheme, which randomly selects training data from the auxiliary tasks controlled by a ratio hyperparameter;The second algorithm incorporates recent ideas of data selection in machine translation van der Wees et al. (2017). It learns the sample weights from the auxiliary tasks automatically through language models.
|
| 6 |
+
|
| 7 |
+
Prior to this work, many studies have used upstream datasets to augment the performance of MRC models, including word embedding Pennington et al. (2014), language models (ELMo) Peters et al. (2018) and machine translation Yu et al. (2018). These methods aim to obtain a robust semantic encoding of both passages and questions. Our MTL method is orthogonal to these methods: rather than enriching semantic embedding with external knowledge, we leverage existing MRC datasets across different domains, which help makethe whole comprehension processmore robust and universal. Our experiments show that MTL can bring further performance boost when combined with contextual representations from pre-trained language models, e.g., ELMo Peters et al. (2018).
|
| 8 |
+
|
| 9 |
+
To the best of our knowledge, this is the first work that systematically explores multi-task learning for MRC. In previous methods that use language models and word embedding, the external embedding/language models are pre-trained separately and remain fixed during the training of the MRC model. Our model, on the other hand, can be trained with more flexibility on various MRC tasks. MTL is also faster and easier to train than embedding/LM methods: our approach requires no pre-trained models, whereas back translation and ELMo both rely on large models that would need days to train on multiple GPUs Jozefowicz et al. (2016); Peters et al. (2018).
|
| 10 |
+
|
| 11 |
+
We validate our MTL framework with two state-of-the-art models on four datasets from different domains.Experiments show that our methods lead to a significant performance gain over single-task baselines on SQuAD Rajpurkar et al. (2016), NewsQA Trischler et al. (2017) and Who-Did-What Onishi et al. (2016), while achieving state-of-the-art performance on the latter two.For example, on NewsQA Trischler et al. (2017), our model surpassed human performance by 13.4 (46.5 vs 59.9) and 3.2 (72.6 vs 69.4) absolute points in terms of exact match and F1.
|
| 12 |
+
|
| 13 |
+
The contribution of this work is three-fold. First, we apply multi-task learning to the MRC task, which brings significant improvements over single-task baselines. Second, the performance gain from MTL can be easily combined with existing methods to obtain further performance gain. Third, the proposed sampling and re-weighting scheme can further improve the multi-task learning performance.
|
| 14 |
+
|
| 15 |
+
Studies in machine reading comprehension mostly focus on architecture design of neural networks, such as bidirectional attention Seo et al. (2016), dynamic reasoning Xu et al. (2017), and parallelization Yu et al. (2018). Some recent work has explored transfer learning that leverages out-domain data to learn MRC models when no training data is available for the target domain Golub et al. (2017). In this work, we explore multi-task learning to make use of the data from other domains, while we still have access to target domain training data.
|
| 16 |
+
|
| 17 |
+
Multi-task learning Caruana (1997) has been widely used in machine learning to improve generalization using data from multiple tasks.For natural language processing, MTL has been successfully applied to low-level parsing tasks Collobert et al. (2011), sequence-to-sequence learning Luong et al. (2015), and web search Liu et al. (2015).More recently, McCann et al. (2018) proposes to cast all tasks from parsing to translation as a QA problem and use a single network to solve all of them. However, their results show that multi-task learning hurts the performance of most tasks when tackling them together. Differently, we focus on applying MTL to the MRC task and show significant improvement over single-task baselines.
|
| 18 |
+
|
| 19 |
+
Our sample re-weighting scheme bears some resemblance to previous MTL techniques that assign weights to tasks Kendall et al. (2018). However, our method gives a more granular score for each sample and provides better performance for multi-task learning MRC.
|
| 20 |
+
|
| 21 |
+
We call our model Multi-Task-SAN (MT-SAN), which is a variation of SAN Liu et al. (2018c) model with two main differences: i) we add a highway network layer after the embedding layer, the encoding layer and the attention layer;ii) we use exponential moving average Seo et al. (2016) during evaluation. The SAN architecture and our modifications are briefly described below and in Section 5.2, and detailed description can be found in Liu et al. (2018c).
|
| 22 |
+
|
| 23 |
+
For most tasks we consider, our MRC model takes a triplet (Q,P,A)𝑄𝑃𝐴(Q,P,A) as input, where Q=(q1,…,qm),P=(p1,…,pn)formulae-sequence𝑄subscript𝑞1…subscript𝑞𝑚𝑃subscript𝑝1…subscript𝑝𝑛Q=(q_{1},...,q_{m}),P=(p_{1},...,p_{n}) are the word index representations of a question and a passage, respectively, andA=(abegin,aend)𝐴subscript𝑎beginsubscript𝑎endA=(a_{\text{begin}},a_{\text{end}}) is the index of the answer span.The goal is to predict A𝐴A given (Q,P)𝑄𝑃(Q,P).
|
| 24 |
+
|
| 25 |
+
We map the word indices of P𝑃P and Q𝑄Q into their 300-dim Glove vectors Pennington et al. (2014).We also use the following additional information for embedding words:i) 16-dim part-of-speech (POS) tagging embedding;ii) 8-dim named-entity-recognition (NER) embedding;iii) 3-dim exact match embedding:fexact_match(pi)=𝕀(pi∈Q)subscript𝑓exact_matchsubscript𝑝𝑖𝕀subscript𝑝𝑖𝑄f_{\text{exact\_match}}(p_{i})=\mathbb{I}(p_{i}\in Q),where matching is determined based on the original word, lower case, and lemma form, respectively;iv) Question enhanced passage word embeddings: falign(pi)=∑jγi,jh(GloVe(qj))subscript𝑓alignsubscript𝑝𝑖subscript𝑗subscript𝛾𝑖𝑗ℎGloVesubscript𝑞𝑗f_{\text{align}}(p_{i})=\sum_{j}\gamma_{i,j}h(\text{GloVe}(q_{j})), where(1)is the similarity between word pjsubscript𝑝𝑗p_{j} and qisubscript𝑞𝑖q_{i}, and g(⋅)𝑔⋅g(\cdot) is a 300-dim single layer neural net with Rectified Linear Unit (ReLU) g(x)=ReLU(W1x)𝑔𝑥ReLUsubscript𝑊1𝑥g(x)=\text{ReLU}(W_{1}x);v) Passage-enhanced question word embeddings: the same as iv) but computed in the reverse direction. To reduce the dimension of the input to the next layer, the 624-dim input vectors of passages and questions are passed through a ReLu layer to reduce their dimensions to 125.
|
| 26 |
+
|
| 27 |
+
After the ReLU network, we pass the 125-dim vectors through a highway network Srivastava et al. (2015), to adapt to the multi-task setting:gi=sigmoid(W2pit),pit=ReLU(W3pit)⊙gi+gi⊙pitformulae-sequencesubscript𝑔𝑖sigmoidsubscript𝑊2superscriptsubscript𝑝𝑖𝑡superscriptsubscript𝑝𝑖𝑡direct-productReLUsubscript𝑊3superscriptsubscript𝑝𝑖𝑡subscript𝑔𝑖direct-productsubscript𝑔𝑖superscriptsubscript𝑝𝑖𝑡g_{i}=\text{sigmoid}(W_{2}p_{i}^{t}),p_{i}^{t}=\text{ReLU}(W_{3}p_{i}^{t})\odot g_{i}+g_{i}\odot p_{i}^{t}, where pitsuperscriptsubscript𝑝𝑖𝑡p_{i}^{t} is the vector after ReLU transformation. Intuitively, the highway network here provides a neuron-wise weighting, which can potentially handle the large variation in data introduced by multiple datasets.
|
| 28 |
+
|
| 29 |
+
Both the passage and question encodings go through a 2-layer Bidirectional Long-Short Term Memory (BiLSTM, Hochreiter and Schmidhuber, 1997) network in this layer. We append a 600-dim CoVe vector McCann et al. (2017) to the output of the lexicon encoding layer as input to the contextual encoders. For the experiments with ELMo, we also append a 1024-dim ELMo vector. Similar to the lexicon encoding layer, the outputs of both layers are passed through a highway network for multi-tasking. Then we concatenate the output of the two layers to obtain Hq∈ℝ2d×msuperscript𝐻𝑞superscriptℝ2𝑑𝑚H^{q}\in\mathbb{R}^{2d\times m} for the question and Hp=ℝ2d×nsuperscript𝐻𝑝superscriptℝ2𝑑𝑛H^{p}=\mathbb{R}^{2d\times n} the passage, where d𝑑d is the dimension of the BiLSTM.
|
| 30 |
+
|
| 31 |
+
We fuse Hpsuperscript𝐻𝑝H^{p} and Hqsuperscript𝐻𝑞H^{q} through cross attention and generate a working memory in this layer. We adopt the attention function from Vaswani et al. (2017) and compute the attention matrix asC=dropout(fattention(H^q,H^p))∈ℝm×n.𝐶dropoutsubscript𝑓attentionsuperscript^𝐻𝑞superscript^𝐻𝑝superscriptℝ𝑚𝑛C=\text{dropout}\left(f_{\text{attention}}(\hat{H}^{q},\hat{H}^{p})\right)\in\mathbb{R}^{m\times n}.We then use C𝐶C to compute a question-aware passage representation asUp=concat(Hp,HqC)superscript𝑈𝑝concatsuperscript𝐻𝑝superscript𝐻𝑞𝐶U^{p}=\text{concat}(H^{p},H^{q}C).Since a passage usually includes several hundred tokens, we use the method of Lin et al. (2017) to apply self attention to the representations of passage to rearrange its information:U^p=Updropdiag(fattention(Up,Up)),superscript^𝑈𝑝superscript𝑈𝑝subscriptdropdiagsubscript𝑓attentionsuperscript𝑈𝑝superscript𝑈𝑝\hat{U}^{p}=U^{p}\text{drop}_{\text{diag}}(f_{\text{attention}}(U^{p},U^{p})),where dropdiagsubscriptdropdiag\text{drop}_{\text{diag}} means that we only drop diagonal elements on the similarity matrix (i.e., attention with itself). Then, we concatenate Upsuperscript𝑈𝑝U^{p} and U^psuperscript^𝑈𝑝\hat{U}^{p} and pass them through a BiLSTM: M=BiLSTM([Up];U^p])M=\text{BiLSTM}([U^{p}];\hat{U}^{p}]). Finally, output of the BiLSTM (after concatenating two directions) goes through a highway layer to produce the memory.
|
| 32 |
+
|
| 33 |
+
The base answer module is the same as SAN, which computes a distribution over spans in the passage.Firstly,we compute an initial state s0subscript𝑠0s_{0} by self attention on Hqsuperscript𝐻𝑞H^{q}: s0←Highway(∑jexp(w4Hjq)∑j′expw4Hj′q⋅Hjq)←subscript𝑠0Highwaysubscript𝑗⋅subscript𝑤4subscriptsuperscript𝐻𝑞𝑗subscriptsuperscript𝑗′subscript𝑤4subscriptsuperscript𝐻𝑞superscript𝑗′subscriptsuperscript𝐻𝑞𝑗s_{0}\leftarrow\text{Highway}\left(\sum_{j}\frac{\exp(w_{4}H^{q}_{j})}{\sum_{j^{\prime}}\exp{w_{4}H^{q}_{j^{\prime}}}}\cdot H^{q}_{j}\right). The final answer is computed through T𝑇T time steps. At step t∈{1,…,T−1}𝑡1…𝑇1t\in\{1,...,T-1\}, we compute the new state using a Gated Recurrent Unit (GRU, Cho et al., 2014) st=GRU(st−1,xt)subscript𝑠𝑡GRUsubscript𝑠𝑡1subscript𝑥𝑡s_{t}=\text{GRU}(s_{t-1},x_{t}), where xtsubscript𝑥𝑡x_{t} is computed by attention between M𝑀M and st−1subscript𝑠𝑡1s_{t-1}: xt=∑jβjMj,βj=softmax(st−1W5M)formulae-sequencesubscript𝑥𝑡subscript𝑗subscript𝛽𝑗subscript𝑀𝑗subscript𝛽𝑗softmaxsubscript𝑠𝑡1subscript𝑊5𝑀x_{t}=\sum_{j}\beta_{j}M_{j},\beta_{j}=\text{softmax}(s_{t-1}W_{5}M). Then each step produces a prediction of the start and end of answer spans through a bilinear function:Ptbegin=softmax(stW6M),superscriptsubscript𝑃𝑡beginsoftmaxsubscript𝑠𝑡subscript𝑊6𝑀P_{t}^{\text{begin}}=\text{softmax}(s_{t}W_{6}M),Ptend=softmax(stW7M).superscriptsubscript𝑃𝑡endsoftmaxsubscript𝑠𝑡subscript𝑊7𝑀P_{t}^{\text{end}}=\text{softmax}(s_{t}W_{7}M).The final prediction is the average of each time step: Pbegin=1T∑tPtbegin,Pend=1T∑tPtendformulae-sequencesuperscript𝑃begin1𝑇subscript𝑡superscriptsubscript𝑃𝑡beginsuperscript𝑃end1𝑇subscript𝑡superscriptsubscript𝑃𝑡endP^{\text{begin}}=\frac{1}{T}\sum_{t}P_{t}^{\text{begin}},P^{\text{end}}=\frac{1}{T}\sum_{t}P_{t}^{\text{end}}. We randomly apply dropout on the step level in each time step during training, as done in Liu et al. (2018c). During training, the objective is the log-likelihood of the ground truth: l(Q,P,A)=logPbegin(abegin)+logPend(aend)𝑙𝑄𝑃𝐴superscript𝑃beginsubscript𝑎beginsuperscript𝑃endsubscript𝑎endl(Q,P,A)=\log P^{\text{begin}}(a_{\text{begin}})+\log P^{\text{end}}(a_{\text{end}}).
|
| 34 |
+
|
| 35 |
+
We describe our MTL training algorithms in this section.We start with a very simple and straightforward algorithm that samples one task and one mini-batch from that task at each iteration. To improve the performance of MTL on a target dataset, we propose two methods to re-weight samples according to their importance. The first proposed method directly lowers the probability of sampling from a particular auxiliary task; however, this probability has to be chosen using grid search. We then propose another method that avoids such search by using a language model.
|
| 36 |
+
|
| 37 |
+
Suppose we have K𝐾K different tasks, the simplest version of our MTL training procedure is shown in Algorithm 1. In each epoch, we take all the mini-batches from all datasets and shuffle them for model training, and the same set of parameters is used for all tasks.Perhaps surprisingly, as we will show in the experiment results, this simple baseline method can already lead to a considerable improvement over the single-task baselines.
|
| 38 |
+
|
| 39 |
+
One observation is that the performance of our model using Algorithm 1 starts to deteriorate as we add more and more data from other tasks into our training pool. We hypothesize that the external data will inevitably bias the model towards auxiliary tasks instead of the target task.
|
| 40 |
+
|
| 41 |
+
To avoid such adverse effect, we introduce a mixture ratio parameter during training. The training algorithm with the mixture ratio is presented in Algorithm 2, with 𝒟1subscript𝒟1\mathcal{D}_{1} being the target dataset. In each epoch, we use all mini-batches from 𝒟1subscript𝒟1\mathcal{D}_{1}, while only a ratio α𝛼\alpha of mini-batches from external datasets are used to train the model. In our experiment, we use hyperparameter search to find the best α𝛼\alpha for each dataset combination. This method resembles previous methods in multi-task learning to weight losses differently (e.g., Kendall et al., 2018), and is very easy to implement. In our experiments, we use Algorithm 2 to train our network when we only use 2 datasets for MTL.
|
| 42 |
+
|
| 43 |
+
The mixture ratio (Algorithm 2) dramatically improves the performance of our system. However, it requires to find an ideal ratio by hyperparameter search which is time-consuming. Furthermore,the ratio gives the same weight to every auxiliary data, but the relevance of every data point to the target task can vary greatly.
|
| 44 |
+
|
| 45 |
+
We develop a novel re-weighting method to resolve these problems, using ideas inspired by data selection in machine translation Axelrod et al. (2011); van der Wees et al. (2017). We use(Qk,Pk,Ak)superscript𝑄𝑘superscript𝑃𝑘superscript𝐴𝑘(Q^{k},P^{k},A^{k}) to represent a data point from the k𝑘k-th task for 1≤k≤K1𝑘𝐾1\leq k\leq K, with k=1𝑘1k=1 being the target task. Since the passage styles are hard to evaluate, we only evaluate data points based on Qksuperscript𝑄𝑘Q^{k} and Aksuperscript𝐴𝑘A^{k}. Note that only data from auxiliary task (2≤k≤K2𝑘𝐾2\leq k\leq K) is re-weighted; target task data always have weight 1.
|
| 46 |
+
|
| 47 |
+
Our scores consist of two parts, one for questions and one for answers. For questions, we create language models (detailed in Section 5.2) using questions from each task, which we represent as LMk𝐿subscript𝑀𝑘LM_{k} for the k𝑘k-th task. For each question Qksuperscript𝑄𝑘Q^{k} from auxiliary tasks, we compute a cross-entropy score:HC,Q(Qk)=−1m∑w∈Qklog(LMC(w)),subscript𝐻𝐶𝑄superscript𝑄𝑘1𝑚subscript𝑤superscript𝑄𝑘𝐿subscript𝑀𝐶𝑤\displaystyle H_{C,Q}(Q^{k})=-\frac{1}{m}\sum_{w\in Q^{k}}\log(LM_{C}(w)),(2)where C∈{1,k}𝐶1𝑘C\in\{1,k\} is the target or auxiliary task, m𝑚m is the length of question Qksuperscript𝑄𝑘Q^{k}, and w𝑤w iterates over all words in Qksuperscript𝑄𝑘Q^{k}.
|
| 48 |
+
|
| 49 |
+
It is hard to build language models for answers since they are typically very short (e.g., answers on SQuAD includes only one or two words in most cases). We instead just use the length of answers as a signal for scores. Let laksuperscriptsubscript𝑙𝑎𝑘l_{a}^{k} be the length of Aksuperscript𝐴𝑘A^{k}, the cross-entropy answer score is defined as:HC,A(Ak)=−logfreqC(lak),subscript𝐻𝐶𝐴superscript𝐴𝑘subscriptfreq𝐶superscriptsubscript𝑙𝑎𝑘\displaystyle H_{C,A}(A^{k})=-\log\text{freq}_{C}(l_{a}^{k}),(3)where freqC is the frequency of answer lengths in task C∈{1,k}𝐶1𝑘C\in\{1,k\}.
|
| 50 |
+
|
| 51 |
+
The cross entropy scores are then normalized over all samples in task C𝐶C to create a comparable metric across all auxiliary tasks:HC,Q′(Qk)=HC,Q(Qk)−min(HC,Q)max(HC,Q)−min(HC,Q)superscriptsubscript𝐻𝐶𝑄′superscript𝑄𝑘subscript𝐻𝐶𝑄superscript𝑄𝑘subscript𝐻𝐶𝑄subscript𝐻𝐶𝑄subscript𝐻𝐶𝑄\displaystyle H_{C,Q}^{\prime}(Q^{k})=\frac{H_{C,Q}(Q^{k})-\min(H_{C,Q})}{\max(H_{C,Q})-\min(H_{C,Q})}(4)HC,A′(Ak)=HC,A(Ak)−min(HC,A)max(HC,A)−min(HC,A)superscriptsubscript𝐻𝐶𝐴′superscript𝐴𝑘subscript𝐻𝐶𝐴superscript𝐴𝑘subscript𝐻𝐶𝐴subscript𝐻𝐶𝐴subscript𝐻𝐶𝐴\displaystyle H_{C,A}^{\prime}(A^{k})=\frac{H_{C,A}(A^{k})-\min(H_{C,A})}{\max(H_{C,A})-\min(H_{C,A})}(5)for C∈{1,2,…,K}𝐶12…𝐾C\in\{1,2,...,K\}. For C∈{2,…,K}𝐶2…𝐾C\in\{2,...,K\}, the maximum and minimum are taken over all samples in task k𝑘k. For C=1𝐶1C=1 (target task), they are taken over all available samples.
|
| 52 |
+
|
| 53 |
+
Intuitively, HC,Q′subscriptsuperscript𝐻′𝐶𝑄H^{\prime}_{C,Q} and HC,A′subscriptsuperscript𝐻′𝐶𝐴H^{\prime}_{C,A} represents the similarity of text Q,A𝑄𝐴Q,A to task C𝐶C; a low HC,Q′subscriptsuperscript𝐻′𝐶𝑄H^{\prime}_{C,Q} (resp. HC,A′subscriptsuperscript𝐻′𝐶𝐴H^{\prime}_{C,A}) means that Qksuperscript𝑄𝑘Q^{k} (resp. Aksuperscript𝐴𝑘A^{k}) is easy to predict and similar to C𝐶C, and vice versa. We would like samples that are most similar from data in the target domain (low H1′subscriptsuperscript𝐻′1H^{\prime}_{1}), and most different (informative) from data in the auxiliary task (high Hk′subscriptsuperscript𝐻′𝑘H^{\prime}_{k}). We thus compute the following cross-entropy difference for each external data:CED(Qk,Ak)=CEDsuperscript𝑄𝑘superscript𝐴𝑘absent\displaystyle\text{CED}(Q^{k},A^{k})=(H1,Q′(Qk)−Hk,Q′(Qk))+limit-fromsubscriptsuperscript𝐻′1𝑄superscript𝑄𝑘subscriptsuperscript𝐻′𝑘𝑄superscript𝑄𝑘\displaystyle(H^{\prime}_{1,Q}(Q^{k})-H^{\prime}_{k,Q}(Q^{k}))+(H1,A′(Ak)−Hk,A′(Ak))subscriptsuperscript𝐻′1𝐴superscript𝐴𝑘subscriptsuperscript𝐻′𝑘𝐴superscript𝐴𝑘\displaystyle(H^{\prime}_{1,A}(A^{k})-H^{\prime}_{k,A}(A^{k}))(6)for k∈{2,…,K}𝑘2…𝐾k\in\{2,...,K\}. Note that a low CED score indicates high importance.Finally, we transform the scores to weights by taking negative, and normalize between [0,1]01[0,1]:(7)
|
| 54 |
+
|
| 55 |
+
Here the maximum and minimum are taken over all available samples and task. Our training algorithm is the same as Algorithm 1, but for minibatch b𝑏b we instead use the lossl(b)=∑(P,Q,A)∈bCED′(Q,A)l(P,Q,A)𝑙𝑏subscript𝑃𝑄𝐴𝑏superscriptCED′𝑄𝐴𝑙𝑃𝑄𝐴\displaystyle l(b)=\sum_{(P,Q,A)\in b}\text{CED}^{\prime}(Q,A)l(P,Q,A)(8)in step 7. We define CED′(Q1,A1)≡1superscriptCED′superscript𝑄1superscript𝐴11\text{CED}^{\prime}(Q^{1},A^{1})\equiv 1 for all target samples (P1,Q1,A1)superscript𝑃1superscript𝑄1superscript𝐴1(P^{1},Q^{1},A^{1}).
|
| 56 |
+
|
| 57 |
+
Our experiments are designed to answer the following questions on multi-task learning for MRC:1. Can we improve the performance of existing MRC systems using multi-task learning?2. How does multi-task learning affect the performance if we combine it with other external data?3. How does the learning algorithm change the performance of multi-task MRC?4. How does our method compare with existing MTL methods?We first present our experiment details and results for MT-SAN. Then, we provide a comprehensive study on the effectiveness of various MTL algorithms in Section 5.4.At last, we provide some additional results on combining MTL with DrQA Chen et al. (2017) to show the flexibility of our approach 111We include the results in the appendix due to space limitations..
|
| 58 |
+
|
| 59 |
+
We conducted experiments on SQuAD (Rajpurkar et al., 2016), NewsQATrischler et al. (2017), MS MARCO (v1, Nguyen et al.,2016) and WDW Onishi et al. (2016). Dataset statistics is shown in Table 1. Although similar in size, these datasets are quite different in domains, lengths of text, and types of task. In the following experiments, we will validate whether including external datasets as additional input information (e.g., pre-trained language model on these datasets) helps boost the performance of MRC systems.
|
| 60 |
+
|
| 61 |
+
We mostly focus on span-based datasets for MT-SAN, namely SQuAD, NewsQA, and MS MARCO.We convert MS MARCO into an answer-span dataset to be consistent with SQuAD and NewsQA, following Liu et al. (2018c). For each question, we search for the best span using ROUGE-L score in all passage texts and use the span to train our model. We exclude questions with maximal ROUGE-L score less than 0.5 during training. For evaluation, we use our model to find a span in all passages. The prediction score is multiplied with the ranking score, trained following Liu et al. (2018a)’s method to determine the final answer.
|
| 62 |
+
|
| 63 |
+
We train our networks using algorithms in Section 4, using SQuAD as the target task. For experiments with two datasets, we use Algorithm 2; for experiments with three datasets we find the re-weighting mechanism in Section 4.2 to have a better performance (a detailed comparison will be presented in Section 5.4).
|
| 64 |
+
|
| 65 |
+
For generating sample weights, we build a LSTM language model on questions following the implementation of Merity et al. (2017) with the same hyperparameters. We only keep the 10,000 most frequent words, and replace the other words with a special out-of-vocabulary token.
|
| 66 |
+
|
| 67 |
+
Parameters of MT-SAN are mostly the same as in the original paper Liu et al. (2018c). We utilize spaCy222https://spacy.io to tokenize the text and generate part-of-speech and named entity labels. We use a 2-layer BiLSTM with 125 hidden units as the BiLSTM throughout the model. During training, we drop the activation of each neuron with 0.3 probability.For optimization, we use Adamax Kingma and Ba (2014) with a batch size of 32 and a learning rate of 0.002. For prediction, we compute an exponential moving average (EMA, Seo et al. 2016) of model parameters with a decay rate of 0.995 and use it to compute the model performance. For experiments with ELMo, we use the model implemented by AllenNLP 333https://allennlp.org/.We truncate passage to contain at most 1000 tokens during training and eliminate those data with answers located after the 1000th token.The training converges in around 50 epochs for models without ELMo (similar to the single-task SAN); For models with ELMo, the convergence is much faster (around 30 epochs).
|
| 68 |
+
|
| 69 |
+
In the following sub-sections, we report our results on SQuAD and MARCO development sets, as well as on the development and test sets of NewsQA 444The official submission for SQuAD v1.1 and MARCO v1.1 are closed, so we report results on the development set. According to their leaderboards, performances on development and test sets are usually similar.. All results are single-model performance unless otherwise noted.
|
| 70 |
+
|
| 71 |
+
The multi-task learning results of SAN on SQuAD are summarized in Table 2. By using MTL on SQuAD and NewsQA, we can improve the exact-match (EM) and F1 score by (2%, 1.5%), respectively, both with and without ELMo. The similar gain indicates that our method is orthogonal to ELMo. Note that our single-model performance is slightly higher than the original SAN, by incorporating EMA and highway networks. By incorporating with multi-task learning, it further improves the performance. The performance gain by adding MARCO is relatively smaller, with 1% in EM and 0.5% in F1. We conjecture that MARCO is less helpful due to its differences in both the question and answer style. For example, questions in MS MARCO are real web search queries, which are short and may have typos or abbreviations; while questions in SQuAD and NewsQA are more formal and well written.
|
| 72 |
+
|
| 73 |
+
Using 3 datasets altogether provides another marginal improvement.Our model obtains the best results among existing methods that do not use a large language model (e.g., ELMo). Our ELMo version also outperforms any other models which are under the same setting. We note that BERT Devlin et al. (2018) uses a much larger model than ours(around 20x), and we leave the performance of combining BERT with MTL as interesting future work.
|
| 74 |
+
|
| 75 |
+
The results of multi-task learning on NewsQA are in Table 3. The performance gain with multi-task learning is even larger on NewsQA, with over 2% in both EM and F1. Experiments with and without ELMo give similar results. What is worth noting is that our approach not only achieves new state-of-art results with a large margin but also surpasses human performance on NewsQA.
|
| 76 |
+
|
| 77 |
+
Finally we report MT-SAN performance on MS MARCO in Table 4. Multi-tasking on SQuAD and NewsQA provides a similar performance boost in terms of BLEU-1 and ROUGE-L score as in the case of NewsQA and SQuAD. Our method does not achieve very high performance compared to previous work, probably because we do not apply common techniques like yes/no classification or cross-passage ranking Wang et al. (2018b).
|
| 78 |
+
|
| 79 |
+
We also test the robustness of our algorithm by performing another set of experiments on SQuAD and WDW. WDW is much more different than the other three datasets (SQuAD, NewsQA, MS MARCO): WDW guarantees that the answer is always a person, whereas the percentage of such questions in SQuAD is 12.9%. Moreover, WDW is a cloze dataset, whereas in SQuAD and NewsQA answers are spans in the passage. We use a task-specific answer layer in this experiment and use Algorithm 2; the WDW answer module is the same as in AS Reader Kadlec et al. (2016), which we describe in the appendix for completeness.Despite these large difference between datasets, our results (Table 5) show that MTL can still provide a moderate performance boost when jointly training on SQuAD (around 0.7%) and WDW (around 1%).
|
| 80 |
+
|
| 81 |
+
Comparison of methods using external data. As a method of data augmentation, we compare our approach to previous methods for MRC in Table 6. Our model achieves better performance than back translation. We also observe that language models such as ELMo obtain a higher performance gain than multi-task learning, however, combining it with multi-task learning leads to the most significant performance gain. This validates our assumption that multi-task learning is more robust and is different from previous methods such as language modeling.
|
| 82 |
+
|
| 83 |
+
In this section, we provide ablation studies as well as comparisons with other existing algorithms on the MTL strategy. We focus on MT-SAN without ELMo for efficient training.
|
| 84 |
+
|
| 85 |
+
Table 7 compares different multi-task learning strategies for MRC. Both the mixture ratio (Sec 4.1) and sample re-weighting (Sec 4.2) improves over the naive baseline of simply combining all the data (Algorithm 1). On SQuAD+MARCO, they provide around 0.6% performance boost in terms of both EM and F1, and around 1% on all 3 datasets.We note that this accounts for around a half of our overall improvement. Although sample re-weighting performs similar as mixture ratio, it significantly reduces the amount of training time as it eliminates the need for a grid searching the best ratio. Kendal et al., (2018) use task uncertainty to weight tasks differently for MTL; our experiments show that this has some positive effect, but does not perform as well as our proposed two techniques.We note that Kendal et al. (as well as other previous MTL methods) optimizes the network to perform well for all the tasks, whereas our method focuses on the target domain which we are interested in, e.g., SQuAD.
|
| 86 |
+
|
| 87 |
+
Sensitivity of mixture ratio. We also investigate the effect of mixture ratio on the model performance. We plot the EM/F1 score on SQuAD dev set vs. mixture ratio in Figure 1 for MT-SAN when trained on all three datasets. The curve peaks at α=0.4𝛼0.4\alpha=0.4; however if we use α=0.2𝛼0.2\alpha=0.2 or α=0.5𝛼0.5\alpha=0.5, the performance drops by around 0.5%percent0.50.5\%, well behind the performance of sample re-weighting. This shows that the performance of MT-SAN is sensitive to changes in α𝛼\alpha, making the hyperparameter search even more difficult. Such sensitivity suggests a preference for using our sample re-weighting technique. On the other hand, the ratio based approach is pretty straightforward to implement.
|
| 88 |
+
|
| 89 |
+
Analysis of sample weights. Dataset comparisons in Table 1 and performance in Table 2 suggests that NewsQA share more similarity with SQuAD than MARCO. Therefore, a MTL system should weight NewsQA samples more than MARCO samples for higher performance. We try to verify this in Table 8 by showing examples and statistics of the sample weights. We present the CED′ scores, as well as normalized version of question and answer scores (resp. (H1,Q′−Hk,Q′)subscriptsuperscript𝐻′1𝑄subscriptsuperscript𝐻′𝑘𝑄(H^{\prime}_{1,Q}-H^{\prime}_{k,Q}) and (H1,A′−Hk,A′)subscriptsuperscript𝐻′1𝐴subscriptsuperscript𝐻′𝑘𝐴(H^{\prime}_{1,A}-H^{\prime}_{k,A}) in (6), and then negated and normalized over all samples in NewsQA and MARCO in the same way as in (7)). A high HQsubscript𝐻𝑄H_{Q} score indicates high importance of the question, and HAsubscript𝐻𝐴H_{A} of the answer; CED′ is a summary of the two.We first show one example from NewsQA and one from MARCO. The NewsQA question is a natural question (similar to SQuAD) with a short answer, leading to high scores both in questions and answers. The MARCO question is a phrase, with a very long answer, leading to lower scores. From overall statistics, we also find samples in NewsQA have a higher score than those in MARCO. However, if we look at MARCO questions that start with “when” or “who” (i.e., probability natural questions with short answers), the scores go up dramatically.
|
| 90 |
+
|
| 91 |
+
We proposed a multi-task learning framework to train MRC systems using datasets from different domains and developed two approaches to re-weight the samples for multi-task learning on MRC tasks. Empirical results demonstrated our approaches outperform existing MTL methods and the single-task baselines as well. Interesting future directions include combining with larger language models such as BERT, and MTL with broader tasks such as language inference Liu et al. (2019) and machine translation.
|
1809.06987v3.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
1809.07016v4.txt
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Despite of the great success in various learning tasks, deep neural networks (DNNs) have been found vulnerable to adversarial examples. The adversary is able to add imperceivable perturbation to the original data and mislead DNNs with high confidence. Many algorithms have been proposed to generate adversarial examples for data such as 2D images [26, 9, 17, 15, 3], natural languages [10, 34], and audios [4, 5]. Several recent works [1, 7] have proposed adversarial examples in the 3D space, but they simply project 3D objects to 2D images as data pre-processing. One concurring work [24] provides a simple analysis of 3D adversarial examples, but no new attack algorithm is proposed. To the best of our knowledge, we are the first to extensively study the robustness of actual 3D models which directly deal with 3D objects and propose effective attack algorithms.Specifically, we choose to represent 3D objects with point clouds, which are the raw data from most 3D sensors such as depth cameras and Lidars. Therefore, we attack 3D models by generating 3D adversarial point clouds.
|
| 2 |
+
|
| 3 |
+
As to the attacking target, we focus on the commonly used PointNet model [19]. We choose PointNet because the model and its variants have been widely and successfully adopted in many applications such as 3D object detection for autonomous driving [18, 35, 31], semantic segmentation for indoor scene understanding [12, 19], and AI-assisted shape design [25]. Furthermore, the model has been shown to be robust to various input point perturbations and corruptions [19]. The demonstrated more robustness than 3D CNNs in [19, 24] makes it a challenging and solid benchmark model for our evaluations. Although we focus on attacking PointNet, we expect our attacking algorithms and evaluation metrics extensible to more 3D models.
|
| 4 |
+
|
| 5 |
+
As the input to PointNet, a point cloud is a 3D geometric data structure that has the advantages of simple representation and low storage requirement. However, it is challenging to generate adversarial point clouds given its special properties. The point cloud’s irregular format has made existing attack algorithms designed for 2D images unsuitable: 1) In raw point clouds with XYZ𝑋𝑌𝑍XYZ, there are no “pixel values” positioned in a regular structure that can be slightly modified; 2) The search space for generating new adversarial points is very large, as points can be added to arbitrary positions; 3) The commonly used Lpsubscript𝐿𝑝L_{p} norm measurement in 2D images to bound perturbations does not fit for point cloud data with irregularity and varying cardinality.
|
| 6 |
+
|
| 7 |
+
To the best of our knowledge, we are the first to extend adversarial attack research to the irregular point cloud data, by addressing aforementioned challenges. We propose several novel attack methods for mainly two types of adversarial attacks on point clouds: adversarial point perturbation and adversarial point generation which are unnoticeable to human or hidden in the human psyche. The attack pipeline is illustrated in Figure 1.
|
| 8 |
+
|
| 9 |
+
For adversarial point perturbation, we propose to shift existing points negligibly. We optimize the perturbation vector under the commonly used Lpsubscript𝐿𝑝L_{p} norm constraint.Our experiments show that we are able to craft unnoticeable adversarial point clouds with 100% success rate given an acceptable perturbation budget.
|
| 10 |
+
|
| 11 |
+
For adversarial point generation, We propose to synthesize and place a set of independent points or a limited number of point clusters close to the original object. In particular, we search for “vulnerable” regions of objects and optimize the positions of points and the shapes of the clusters. In total, we have three kinds of generated points, namely independent points, adversarial clusters (points in generic shapes such as balls), and adversarial objects (points in object shapes such as mini airplanes), shown in the right three columns in Figure 1.We constrain the generation by their sizes, their distances to the object surface as well as how many shapes we place.
|
| 12 |
+
|
| 13 |
+
Our attacks achieve 100% success rate for scattered adversarial points, 99.3% for adding three adversarial shapes, 98.2% for two, and 78.8% for one.
|
| 14 |
+
|
| 15 |
+
Furthermore, in Section 6.4 we discuss the transferrability of our 3D adversarial point clouds as well as the possibility to combine PointNet with CNNs to defense attacks in images. Sample code and data will be released to support further research.
|
| 16 |
+
|
| 17 |
+
To summarize, the contributions of this paper can be summarized as follows:•We are the first to generate 3D adversarial examples against 3D learning models and provide baseline evaluations for future research. Specifically, we choose representative point cloud data and PointNet model for our evaluations.•We demonstrate the unique challenges in dealing with irregular data structures such as point clouds and propose novel algorithms for both adversarial point perturbation and adversarial point generation.•We propose six different perturbation metrics tailored to different attack tasks and perform extensive experiments to show our attack algorithms can achieve a success rate higher than 99% for all targeted attacks.•We provide robustness analysis for 3D point cloud models and show that analyzing properties of different 3D models sheds light on potential defenses for 2D instances.
|
| 18 |
+
|
| 19 |
+
Point Clouds and PointNet. Point clouds are consisted of unordered points with varying cardinality, which makes it hard to be consumed by neural networks. Qi et al. [19] addressed this problem by proposing a new network called PointNet, which is now widely used for deep point cloud processing. PointNet and its variants [20, 27] exploit a single symmetric function, max pooling, to reduce the unordered and varying length input to a fixed-length global feature vector and thus enables end-to-end learning.[19] also tried to demonstrate the robustness of the proposed PointNet and introduced the concept of critical points and upper bounds. They showed that points sets laying between critical points and upper bounds yield the same global features and thus PointNet is robust to missing points and random perturbation. However, they did not study the robustness of PointNet against adversarial manipulations, which is the main focus of this paper.
|
| 20 |
+
|
| 21 |
+
Adversarial Examples. Szegedy et al. [26] first pointed out that machine learning models such as neural networks were vulnerable to carefully crafted adversarial perturbation. An adversarial example which appears similar to its original data can easily fool the neural networks with high confidence. Such vulnerability of machine learning models has raised great concerns in the community and many works have been proposed to improve the attack performance [9, 17, 15, 3, 16, 30, 29] and search for possible defense [2, 14, 32, 21, 22, 33]. The state-of-the-art attack algorithm, optimization based attack [3], defines an objective loss function which measures both attack effectiveness and perturbation magnitude, and uses optimization to find a near-optimal adversarial solution. However, the algorithm only deals with 2D data.Several recent works [11, 1, 7] also study the adversarial examples in the physical world. However, these works only project physical objects to 2D images and do not study models which directly deal with 3D objects.One concurring work [24] does provide a simple analysis of 3D adversarial examples and demonstrates PointNet’s better robustness against the adversarial attacks than 3D CNNs. However, it simply adopts existing algorithms and the attack against PointNet model is not effective. To the best of our knowledge, we are the first to extensively study adversarial examples for 3D machine learning models and to propose effective algorithms for 3D adversarial point cloud generation in particular.
|
| 22 |
+
|
| 23 |
+
A point cloud is a set of points which are sampled from object surfaces. A data record x∈ℝn×3𝑥superscriptℝ𝑛3x\in\mathbb{R}^{n\times 3} corresponds to a point set of size n𝑛n, where each point is represented by a 3-tuple (x,y,z)𝑥𝑦𝑧(x,y,z) coordinate.One most important characteristic of point cloud data is its irregularity (a point cloud is not defined on a regular grid structure), which makes it hard to adapt existing attacking algorithms from 2D images.Moreover, we are able to add points at any positions in the 3D space while we cannot add pixels in 2D images. However, such lack of constrain results in an extremely large search space for generative adversarial examples. New attack algorithms should be proposed to address the above problems.
|
| 24 |
+
|
| 25 |
+
In this paper, we only focus on targeted attacks against 3D point cloud classification models. It is flexible to extend our algorithms to other tasks like attacking segmentation models.
|
| 26 |
+
|
| 27 |
+
The goal of targeted attacks is to mislead a 3D deep model (e.g., PointNet) to classify an adversarial example as a selected target class.Formally, for a classification model ℱ:𝒳→𝒴:ℱ→𝒳𝒴\mathcal{F}:\mathcal{X}\rightarrow\mathcal{Y}, which maps an input x∈𝒳⊂ℝn×3𝑥𝒳superscriptℝ𝑛3x\in\mathcal{X}\subset\mathbb{R}^{n\times 3} to its corresponding class label y∈𝒴⊂ℤ𝑦𝒴ℤy\in\mathcal{Y}\subset\mathbb{Z}, an adversary has a malicious target class t′∈𝒴superscript𝑡′𝒴t^{\prime}\in\mathcal{Y}. Based on a perturbation metric 𝒟:ℝn×3×ℝn′×3→ℝ:𝒟→superscriptℝ𝑛3superscriptℝsuperscript𝑛′3ℝ\mathcal{D}:\mathbb{R}^{n\times 3}\times\mathbb{R}^{n^{\prime}\times 3}\rightarrow\mathbb{R}, the goal of the attack is to find a legitimate input x′⊂ℝn′×3superscript𝑥′superscriptℝsuperscript𝑛′3x^{\prime}\subset\mathbb{R}^{n^{\prime}\times 3} which:min𝒟(x,x′),s.t.ℱ(x′)=t′formulae-sequence𝒟𝑥superscript𝑥′𝑠𝑡ℱsuperscript𝑥′superscript𝑡′\min\mathcal{D}(x,x^{\prime}),\qquad s.t.\;\mathcal{F}(x^{\prime})=t^{\prime}(1)Note that, for point cloud data, n𝑛n does not necessarily equal to n′superscript𝑛′n^{\prime}.
|
| 28 |
+
|
| 29 |
+
As mentioned in [3], directly solving this problem is difficult. Therefore, we reformulate the problem as gradient-based optimization algorithms:minf(x′)+λ∗𝒟(x,x′)𝑓superscript𝑥′𝜆𝒟𝑥superscript𝑥′\min f(x^{\prime})+\lambda*\mathcal{D}(x,x^{\prime})(2)Here f(x′)=(maxi≠t′(𝒵(x′)i)−𝒵(x′)t′)+𝑓superscript𝑥′superscriptsubscript𝑖superscript𝑡′𝒵subscriptsuperscript𝑥′𝑖𝒵subscriptsuperscript𝑥′superscript𝑡′f(x^{\prime})=(\max\limits_{i\neq t^{\prime}}(\mathcal{Z}(x^{\prime})_{i})-\mathcal{Z}(x^{\prime})_{t^{\prime}})^{+} is the adversarial loss function whose output measures the possibility of a successful attack, where 𝒵(x)i𝒵subscript𝑥𝑖\mathcal{Z}(x)_{i} is the ithsuperscript𝑖𝑡ℎi^{th} element of the logits (the input of softmax layer) and (r)+superscript𝑟(r)^{+} represents max(r,0)𝑟0\max(r,0).By optimizing over Equation 2, we aim to search for adversarial examples with least 3D perturbation.
|
| 30 |
+
|
| 31 |
+
In this paper, we consider two different types of attacks in point clouds 222To guarantee the points can still cover the object surface, we do not allow an adversary to remove points.: adversarial point perturbation and adversarial point generation. In perturbation attacks, we modify existing points by shifting their XYZ𝑋𝑌𝑍XYZ positions with adversarial jitters such that a point xi∈ℝ3subscript𝑥𝑖superscriptℝ3x_{i}\in\mathbb{R}^{3} in the point cloud x𝑥x becomes x′i=xi+δisubscriptsuperscript𝑥′𝑖subscript𝑥𝑖subscript𝛿𝑖{x^{\prime}}_{i}=x_{i}+\delta_{i}, for i=1,…,n𝑖1…𝑛i=1,...,n where δi∈ℝ3subscript𝛿𝑖superscriptℝ3\delta_{i}\in\mathbb{R}^{3} is the perturbation to the i𝑖i-th point.In generation attacks, we generate a set of adversarial points z={zi|i=1,…,k}𝑧conditional-setsubscript𝑧𝑖𝑖1…𝑘z=\{z_{i}|i=1,...,k\} (or z∈ℝk×3𝑧superscriptℝ𝑘3z\in\mathbb{R}^{k\times 3} as an array representation of it) where each zi∈ℝ3subscript𝑧𝑖superscriptℝ3z_{i}\in\mathbb{R}^{3} is a new point in addition to the existing point cloud x𝑥x. Then the union of the original points and adversarial points are input to the model: x′=x∪zsuperscript𝑥′𝑥𝑧x^{\prime}=x\cup z, or in the array representation x′∈ℝ(n+k)×3superscript𝑥′superscriptℝ𝑛𝑘3x^{\prime}\in\mathbb{R}^{(n+k)\times 3} through array concatenation (thus n′=n+ksuperscript𝑛′𝑛𝑘n^{\prime}=n+k). This manner of attacking is very new and vastly different from attacks in images, because we cannot generate new pixels in a fix-sized image.
|
| 32 |
+
|
| 33 |
+
In this section, we focus on the first and the simpler type of point cloud attack: adversarial point perturbation.Since for perturbation we have correspondences between the original points and the perturbed ones, we can simply use Lpsubscript𝐿𝑝L_{p} norm to measure the distance between the two clouds.
|
| 34 |
+
|
| 35 |
+
Lpsubscript𝐿𝑝L_{p} Norm. The Lpsubscript𝐿𝑝L_{p} norm is a commonly used metric for adversarial perturbation of fixed-shape data. For the original point sets 𝒮𝒮\mathcal{S} and corresponding adversarial set 𝒮′superscript𝒮′\mathcal{S}^{\prime}, the Lpsubscript𝐿𝑝L_{p} norm of the perturbation is defined as:𝒟Lp(𝒮,𝒮′)=(∑i(si−si′)p)1psubscript𝒟subscript𝐿𝑝𝒮superscript𝒮′superscriptsubscript𝑖superscriptsubscript𝑠𝑖superscriptsubscript𝑠𝑖′𝑝1𝑝\mathcal{D}_{L_{p}}(\mathcal{S},\mathcal{S}^{\prime})=(\sum_{i}{({s}_{i}-{s}_{i}^{\prime})}^{p})^{\frac{1}{p}}(3)
|
| 36 |
+
|
| 37 |
+
where sisubscript𝑠𝑖{s}_{i} is the ithsuperscript𝑖𝑡ℎi^{th} point coordinate in set 𝒮𝒮\mathcal{S}, and si′superscriptsubscript𝑠𝑖′{s}_{i}^{\prime} is its corresponding point in set 𝒮′superscript𝒮′\mathcal{S}^{\prime}.
|
| 38 |
+
|
| 39 |
+
We can directly use Equation 2 to generate the adversarial perturbations {δi}i=1nsuperscriptsubscriptsubscript𝛿𝑖𝑖1𝑛\{\delta_{i}\}_{i=1}^{n}, by optimization with the L2subscript𝐿2L_{2} norm distance to bound the perturbation.
|
| 40 |
+
|
| 41 |
+
Besides perturbing existing points, another general type of attacking strategy is to generate new adversarial points to mislead the 3D model. Among the ways to generate new points, a simple approach is to add arbitrary number of independent points (Section 5.1), ideally close to the object surface so that they are unnoticeable 333How to realize this attack in real world is still a question though..
|
| 42 |
+
|
| 43 |
+
On the other hand, we consider a more challenging attack task where the adversary is only able to add a limited number (1-3) of adversarial shapes (Section 5.2 and Section 5.3), as either generic primitive shapes such as balls or meaningful shapes such as small airplane models. The task is challenging since points can only be added within small regions of the 3D space and the points of original object remain unchanged. The goal of this attack is to generate adversarial point clusters that are plausible so they cloud be hidden in the human psyche.
|
| 44 |
+
|
| 45 |
+
In the following subsections, we will introduce metrics and our attacking algorithms to generate adversarial individual points, as well as two kinds of adversarial shapes: adversarial clusters and adversarial objects.
|
| 46 |
+
|
| 47 |
+
In this section, we focus on the attack of generating (unnoticeable) independent points. Note that when adding new points to the original point clouds, we have to deal with data dimensionality changes. We first introduce metrics that measure the deviation of adversarial points to the original one and then desrcribe our attack algorithm.
|
| 48 |
+
|
| 49 |
+
Hausdorff Distance. Hausdorff distance is often used to measure how far two subsets of a metric space are from each other. Formally, for an original point set 𝒮𝒮\mathcal{S} and its adversarial counterpart 𝒮′superscript𝒮′\mathcal{S}^{\prime}, we define Hausdorff distance as:𝒟H(𝒮,𝒮′)=maxy∈𝒮′minx∈𝒮∥x−y∥22\mathcal{D}_{\textit{H}}(\mathcal{S},\mathcal{S}^{\prime})=\max\limits_{y\in\mathcal{S}^{\prime}}\min\limits_{x\in\mathcal{S}}{\lVert x-y\rVert}_{2}^{2}(4)Intuitively, Hausdorff distance finds the nearest original point for each adversarial point and outputs the maximum square distance among all such nearest point pairs. We do not include the term maxx∈𝒮miny∈𝒮′∥x−y∥22\max\limits_{x\in\mathcal{S}}\min\limits_{y\in\mathcal{S}^{\prime}}{\lVert x-y\rVert}_{2}^{2} since we do not modify the original object 𝒮𝒮\mathcal{S}.
|
| 50 |
+
|
| 51 |
+
Chamfer Measurement.444We name it as “Chamfer measurement” since this perturbation metric does not satisfy triangle inequality, which means it does not satisfy the definition of distance. Chamfer measurement [8] is a similar perturbation metric as Hausdorff distance. The difference is Chamfer Measurement takes the average, rather than the maximum, of the distances of all nearest point pairs. The formal definition is as follows:𝒟C(𝒮,𝒮′)=1∥𝒮′∥0∑y∈𝒮′minx∈𝒮∥x−y∥22\mathcal{D}_{\textit{C}}(\mathcal{S},\mathcal{S}^{\prime})=\frac{1}{{\lVert\mathcal{S}^{\prime}\rVert}_{0}}\sum\limits_{y\in\mathcal{S}^{\prime}}\min\limits_{x\in\mathcal{S}}{\lVert x-y\rVert}_{2}^{2}(5)
|
| 52 |
+
|
| 53 |
+
Number of Points Added. We also want to measure the number of points added in our attack, by counting points whose distances from the object surface is above a certain threshold. Formally, for an original point set 𝒮𝒮\mathcal{S}, the generated point set 𝒮′superscript𝒮′\mathcal{S}^{\prime}, and a threshold value Tthresubscript𝑇threT_{\textit{thre}}, the number of points added is defined as:Count(𝒮,𝒮′)=∑y∈𝒮′𝟙[minx∈𝒮∥x−y∥2>Tthre]\textit{Count}(\mathcal{S},\mathcal{S}^{\prime})=\sum_{y\in\mathcal{S}^{\prime}}\mathbbm{1}[\min\limits_{x\in\mathcal{S}}{\lVert x-y\rVert}_{2}>T_{\textit{thre}}](6)where 𝟙[⋅]1delimited-[]⋅\mathbbm{1}[\cdot] is the indicator function whose value is 1 when the statement is true and 0 otherwise. Note that the number of points added is not optimized as the perturbation metric 𝒟𝒟\mathcal{D} in Equation 2 due to its incompatibility with gradient-based optimization algorithms, but is reported as an additional performance metric.
|
| 54 |
+
|
| 55 |
+
Directly adding points to the unconstrained 3D space is infeasible due to the large search space. Therefore we propose an initialize-and-shift method to find appropriate position for each added point:1.Initialize a number of points to the same coordinates of existing points as initial points.2.Shift initial points via optimizing Equation 2 and output their final positions.
|
| 56 |
+
|
| 57 |
+
During the optimization process, some initial points are shifted from their initial positions and “added” to the original objects as adversarial points.The others that are barely shifted do not change the shape of the object, and thus can be discarded as points-not-added.
|
| 58 |
+
|
| 59 |
+
To make the optimization more efficient, we propose to initialize points to the positions of “critical points” of the target. Critical points are like key points or salient points in a 3D point cloud. In PointNet specifically, they can be computed by taking the points that remain active after the max pooling [19], which means they are at important positions that determine the object category. Adversarial points around these critical positions are more likely to change the final prediction.
|
| 60 |
+
|
| 61 |
+
We use Hausdorff and Chamfer measurements as the perturbation metrics 𝒟𝒟\mathcal{D} for this attack because they are more capable of measuring how unnoticeable the adversarial point clouds of different dimensionality are.
|
| 62 |
+
|
| 63 |
+
For adversarial clusters, we aim to minimize the radius of the generated cluster so that they look like a ball attached to the original object and will not arouse suspicion. In addition, we also encourage the cluster to be close to the object surface. To satisfy these two requirements, we introduce the perturbation metrics used as follows.
|
| 64 |
+
|
| 65 |
+
Farthest Distance. If the farthest pair-wise point distance in a point set is controlled within a certain threshold, the points in this set are able to form a shaped cluster. Formally, we define farthest distance of a point set 𝒮𝒮\mathcal{S} as:𝒟far(𝒮)=maxx,y∈𝒮∥x−y∥2\mathcal{D}_{\textit{far}}(\mathcal{S})=\max\limits_{x,y\in\mathcal{S}}{\lVert x-y\rVert}_{2}(7)
|
| 66 |
+
|
| 67 |
+
Chamfer Measurement. Besides encouraging point cluster to form within a small radius, we may also want to push the added clusters towards the surface of the object. Therefore, we also include the Chamfer Measurement (defined in Equation 5) as our perturbation metric and optimization objective.
|
| 68 |
+
|
| 69 |
+
Number of Clusters Added. Similar to the number of points added in the unnoticeable adversarial point cloud generation, the number of clusters added also serves as an additional metric for attack performance, which is hard bounded to 1-3 in our experiments.
|
| 70 |
+
|
| 71 |
+
Before going into the details of generation algorithms, we need to reformulate Equation 2 as follow:minf(x′)+λ⋅(∑i𝒟far(𝒮i)+μ⋅𝒟C(𝒮0,𝒮i))𝑓superscript𝑥′⋅𝜆subscript𝑖subscript𝒟farsubscript𝒮𝑖⋅𝜇subscript𝒟Csubscript𝒮0subscript𝒮𝑖\min f(x^{\prime})+\lambda\cdot(\sum_{i}\mathcal{D}_{\textit{far}}(\mathcal{S}_{i})+\mu\cdot\mathcal{D}_{\textit{C}}(\mathcal{S}_{0},\mathcal{S}_{i}))(8)where i∈{1,2,…,m}𝑖12…𝑚i\in\{1,2,\ldots,m\}, 𝒮0subscript𝒮0\mathcal{S}_{0} is the original object, 𝒮isubscript𝒮𝑖\mathcal{S}_{i} is the ithsuperscript𝑖𝑡ℎi^{th} adversarial point cluster, m𝑚m is number of adversarial clusters, and μ𝜇\mu is the weight used to balance the importance between Farthest Distance loss and Chamfer Measurement loss. Here we abuse the notation a little to use 𝒟𝒟\mathcal{D} to denote both mappings ℝn×3×ℝn′×3→ℝ→superscriptℝ𝑛3superscriptℝsuperscript𝑛′3ℝ\mathbb{R}^{n\times 3}\times\mathbb{R}^{n^{\prime}\times 3}\rightarrow\mathbb{R} and ℝn×3→ℝ→superscriptℝ𝑛3ℝ\mathbb{R}^{n\times 3}\rightarrow\mathbb{R}.
|
| 72 |
+
|
| 73 |
+
Generating adversarial clusters is a special case of adding adversarial point clouds, so we can adopt the initialize-and-shift method used. However, unlike independent point generation, we have to constrain the added points clustered to be within small regions. As points are likely to get stuck in their initialized vicinity due to the ubiquity of local-minima, we need a more efficient initialization methods for adversarial clusters generation.
|
| 74 |
+
|
| 75 |
+
We try to leverage the idea of “vulnerable regions” for initialization. For formatted data like 2D images, it is common to impose a L1subscript𝐿1L_{1} constraint to encourage the sparsity of the perturbation vector. The region with large perturbation under a proper L1subscript𝐿1L_{1} constraint is believed to be important for model decisions and thus vulnerable to adversarial attacks. However, the L1subscript𝐿1L_{1} constraint is not well defined on point clouds thus inapplicable here. Instead, we take advantage of “critical points” again to effectively find potentially vulnerable regions for initialization. Critical points, as a subset of the original set, collectively determine the global features of the object shape but could also be vulnerable regions to attacks.
|
| 76 |
+
|
| 77 |
+
Given a victim object and a target class t′superscript𝑡′t^{\prime}, the attack process is as follows:1.Obtain the critical points of the objects in target class.2.Use the clustering algorithm DBSCAN [6] to cluster the selected critical points.3.Choose points in the k𝑘k largest clusters as the initial points, where k𝑘k is a self-chosen parameter as well as a metric for attack performance evaluation.4.Optimize over Equation 8 using gradient-based algorithms and find optimal cluster positions and shapes.Note that DBSCAN groups points that are closely packed (or points with local density passing a threshold), while marking the other points lying in low-density regions as outliers [6].Thus, we are able to filter out outlier points and get compact clusters via it.
|
| 78 |
+
|
| 79 |
+
Besides tuning DBSCAN, it is essential to determine the number of objects in target class we use, as well as the number of critical points selected from each target object. Choosing only one target object restricts the space distributions of the critical points. However, using too many target objects result in density scattered critical points unhelpful to identify a sparse set of vulnerable regions. The reasons for tuning the number of critical points selected are similar, we want a moderate number of them. However, such parameter tuning does not need to too fine grained as the attack pipeline is still dominated by the optimization over Equation 8.
|
| 80 |
+
|
| 81 |
+
For this attack, we start from some meaningful objects like small airplanes, slightly modify them, and place them in the appropriate adversarial positions. People may not become suspicious because the adversarial objects are like other benign objects nearby.
|
| 82 |
+
|
| 83 |
+
Lpsubscript𝐿𝑝L_{p} Norm. Since we want to only slightly modify the meaningful objects and make the generated shapes similar to the real-world ones, we adopt the Lpsubscript𝐿𝑝L_{p}, specifically L2subscript𝐿2L_{2}, as our first metric.
|
| 84 |
+
|
| 85 |
+
Chamfer Measurement. Similar to the adversarial clusters, we want to encourage the generate shape to be close the original object.
|
| 86 |
+
|
| 87 |
+
Number of Clusters Added. Number of clusters added, bounded to 1-3, is also used to evaluate the attack performance.
|
| 88 |
+
|
| 89 |
+
We also need to rewrite the objective function to fit the attack setting:minf(x′)+λ⋅(∑i𝒟L2(𝒮i0,𝒮i)+μ⋅𝒟C(𝒮0,𝒮i))𝑓superscript𝑥′⋅𝜆subscript𝑖subscript𝒟subscript𝐿2subscript𝒮𝑖0subscript𝒮𝑖⋅𝜇subscript𝒟Csubscript𝒮0subscript𝒮𝑖\min f(x^{\prime})+\lambda\cdot(\sum_{i}\mathcal{D}_{L_{2}}(\mathcal{S}_{i0},\mathcal{S}_{i})+\mu\cdot\mathcal{D}_{\textit{C}}(\mathcal{S}_{0},\mathcal{S}_{i}))(9)where i∈{1,2,…,m}𝑖12…𝑚i\in\{1,2,\ldots,m\}, 𝒮0subscript𝒮0\mathcal{S}_{0} is the original object, 𝒮isubscript𝒮𝑖\mathcal{S}_{i} is the ithsuperscript𝑖𝑡ℎi^{th} adversarial point cluster, 𝒮i0subscript𝒮𝑖0\mathcal{S}_{i0} is the ithsuperscript𝑖𝑡ℎi^{th} real-world clusters, m𝑚m is number of adversarial clusters, and μ𝜇\mu is the weight used to balance the importance between L2subscript𝐿2L_{2} loss and Hausdorff Distance loss.To mount this attack, we need to find the vulnerable regions first and then to initialize the perturb the added real-world point clusters. The attack pipeline is as follows:1.Obtain the critical points of the objects in target class.2.Use the clustering algorithm DBSCAN [6] to cluster the selected critical points.3.Identify the k𝑘k largest clusters and calculate the position of cluster centers, where k𝑘k is a self-chosen parameter as well as a metric for attack performance evaluation.4.Choose meaningful objects and initialize them to make their centers overlap with the calculated positions in the previous step.5.Optimize over Equation 9 using gradient-based algorithms and find optimal cluster positions and shapes.
|
| 90 |
+
|
| 91 |
+
Note that we also have the freedom to choose the orientation of the modified clusters. Since adversarial clusters with different orientations would not arouse suspicion, we do not impose an constraint on the magnitude of rotation.
|
| 92 |
+
|
| 93 |
+
In this section, we implement the proposed algorithms for different attack tasks and conduct extensively evaluation on attack performance based on various metrics.
|
| 94 |
+
|
| 95 |
+
We use the aligned benchmark ModelNet40 [28, 23] dataset for our experiments. The ModelNet40 dataset contains 12,311 CAD models from 40 most common object categories in the world. 9,843 objects are used for training and the other 2,468 for testing. As done by Qi et al. [19], we uniformly sample 1,024 points from the surface of each object, and re-scale them into a unit ball. We use the same PointNet structure as proposed in [19] and train the model with all ModelNet40 training data to obtain our victim model. The ModelNet40 dataset is very imbalanced. For our attacks, we randomly select 25 test examples from each 10 largest classes, namely airplane, bed, bookshelf, bottle, chair, monitor, sofa, table, toilet and vase, to generated adversarial point clouds for. For each victim data record, we generate adversarial examples targeted on the rest 9 classes. Therefore, we have 2,250 (victim,target) attach pairs for our experiments.
|
| 96 |
+
|
| 97 |
+
We evaluate the attack performance for adversarial point perturbation in this subsection.We use L2subscript𝐿2L_{2} distance as the perturbation constraint 𝒟𝒟\mathcal{D} in Equation 2 and minimize the objective loss to find the optimal perturbation. To obtain good attack performance, it is essential to choose an appropriate value for the weight λ𝜆\lambda, which controls the balance between minimizing adversarial loss and perturbation magnitude. If the λ𝜆\lambda is too small, the perturbation constraint is not strong enough and the perturbation would become too obvious. On the other hand, a λ𝜆\lambda that is too large would result in minimizing perturbation magnitude only and fail to attack. For all of our attacks, we perform 10-step binary search for the near-optimal λ𝜆\lambda. During the search, we record the smallest perturbation 𝒟(x,x′)𝒟𝑥superscript𝑥′\mathcal{D}(x,x^{\prime}) and its corresponding adversarial example x′superscript𝑥′x^{\prime}, and finally output the most unnoticeable adversarial example.
|
| 98 |
+
|
| 99 |
+
we report the experiment results for three cases: best case for the most easily attacked (victim,target) class pair, average case for all attacking class pairs, and worst case for the most difficult pair. The success rate and mean perturbation loss for point shifting attacks are reported in the first two columns of Table 1. We can see we successfully attack all victims examples into all target classes. The perturbation loss for this attack is relatively small, considering the perturbation vector contains 1,024 elements.We also provide visualization in the first row of Figure 2. We choose class “bottle” as our visualization victim because adversarial perturbation would become more obvious for a simple shape like a bottle. More visualization for other objects can be found in the supplementary. From the visualization, we can see the perturbation (the adversarial point cloud) is nearly indistinguishable.
|
| 100 |
+
|
| 101 |
+
In this subsection, we evaluate the attack performance of three different ways of adversarial point generation: independent points, adversarial clusters, and adversarial objects.
|
| 102 |
+
|
| 103 |
+
Adversarial Independent Points.For generating adversarial independent points, we take Hausdorff and Chamfer measurements as perturbation metrics 𝒟𝒟\mathcal{D} and optimize over Equation 2. We use two different distances separately and compare performance of these two constraints. To calculate the number of points added, we get the critical points of the newly generated adversarial point clouds, set Tthresubscript𝑇threT_{\textit{thre}} to 0.01, and count over points moved further than it. The experiment results are shown in Table 1. First, both Hausdorff and Chamfer constraints result in attack success rate of 100%, proving the effectiveness of proposed initialize-and-shift algorithm. Secondly, we can see great difference between the mean distance losses and number of points added. Since Hausdorff distance only controls the largest distance of all nearest point pairs while Chamfer measurement calculates the average distance, the loss value of Hausdorff is much larger than that of Chamfer and so does the number of points added. A more detailed analysis on the different attack performance of Hausdorff and Chamfer measurement is included in the supplementary.
|
| 104 |
+
|
| 105 |
+
The visualization of the adversarial bottle by adding points is shown in the second and third rows of Figure 2. From the figure, we can easily observe the different characteristics of different constraints (Hausdorff constraint results in more added points while Chamfer constraint leads to more obvious outliers). Considering the different properties of the two constraints, one can combine these two constraints and adjust the weights for the two perturbation metrics according to the specific attack goals.
|
| 106 |
+
|
| 107 |
+
Adversarial Clusters. To get initial clusters, we randomly select 8 different objects from the target class test set, and obtain 32 most important critical points for each selected object based on the number of global feature channels it contributes to. We then use DBSCAN algorithm to cluster these 32×832832\times 8 critical points. After that, we retain k𝑘k clusters of largest size and discard other small clusters and outliers. For each cluster, we conduct subsampling or padding to obtain 32 initial points. We vary k𝑘k from 111 to 333 to see how the number of adversarial clusters affects the attack performance (success rate and distance loss). In Equation 8, the parameter λ𝜆\lambda is chosen via 5-step binary search while μ𝜇\mu is prefixed according to the adversary’s preference on smaller or closer clusters. In our experiment, we set μ𝜇\mu to 0.1. Due to the lack of space, we only report the quantitative results for average case in Table 2. The comprehensive results for three cases are included in the supplementary.
|
| 108 |
+
|
| 109 |
+
The table shows that, as the number of adversarial clusters increases, the attack success rate is significantly improved and we are able to attack 99.3% examples when adding 3 adversarial clusters. Moreover, a larger number of added clusters also helps reduce the perturbation loss for each cluster. When we only add one cluster, the farthest distance of the cluster for average case is 0.5401, which is quite large considering the whole object fits in a unit ball. However, the farthest distance drops dramatically to 0.1818 when we are adding 3 clusters. Thus, it is reasonable to expect better attack performance if the adversary is able to add more than 3 clusters.Visualization for adding 3 adversarial clusters can be found in the first row of Figure 3. Several small clusters are clearly shown for most attack pairs.
|
| 110 |
+
|
| 111 |
+
Adversarial Objects. For this attack, we use the same setting as the adversarial cluster to identify the vulnerable regions. We randomly select an object from the “airplane” class and initialize it to the centers of different vulnerable regions. The airplane is re-scaled to three-tenths of its original size, and 64 points are uniformly sampled from the surface. 555We choose an airplane to simulate the scenario where the adversary could manipulate several micro-UAVs to suspend around the victim object. After the initialization, we optimize according to Equation 9 to perform the attack. Similarly, the parameter λ𝜆\lambda is determined by binary search while the μ𝜇\mu is pre-set to 0.20.20.2 in our experiment.
|
| 112 |
+
|
| 113 |
+
The results for different perturbation metrics are provided in the second row of Table 2. We can this attack is more challenging than that of adversarial clusters since the shapes of the objects are almost predefined. However, the shapes similar to real-world objects made this attack less suspicious. Moreover, we still achieve a reasonably high success rate of 97.3% when adding three adversarial clusters, and we can achieve better performance if more adversarial objects are allowed to be added.We also provide visualization in the second row of Figure 3. We can see the several small airplanes near the bottle are already capable to fool the PointNet model. Comparison between two rows of visualization in Figure 3 shows that when the clusters are close to the object, adversarial clusters have better visualization performance while adversarial objects are less suspicious when the clusters are far from the surface. This further justifies our attempt to introduce two kinds of meaningful shapes.
|
| 114 |
+
|
| 115 |
+
In this subsection, we provide robustness analyses for PointNet-like models.
|
| 116 |
+
|
| 117 |
+
Transferablity of Adversarial Point Clouds. We feed our crafted adversarial point clouds to PointNet++ [20], DGCNN [27], a PointNet trained with data augmentation, and a PointNet trained with a different weight initialization and find that theses 3D adversarial examples actually hardly transfer as targeted attacks. Furthermore, we calculate the success rate for untargeted attack and the results are shown Table 3. We can see the transferability for untargeted attack is also limited compared with 2D adversarial examples.Since our proposed attack methods are general and can be applied to attack other 3D models, the low transferability may be related with special properties of 3D models themselves. This intrinsic property makes it possible to design black-box defense against such adversarial instances.
|
| 118 |
+
|
| 119 |
+
Defense on MNIST [13] with PointNet. Motivated by aforementioned robustness analysis, we take a step forward to use PointNet structure for defense on MNIST dataset. We binarize the grey-scale images and sample 256 points from each MNIST digit. We craft adversarial examples by attacking LeNet [13] with FGSM [9]. The test accuracy of binarized images (LeNet) and sampled point clouds (PointNet) with different values of attack parameter ϵitalic-ϵ\epsilon are reported in Table 4. We can see the PointNet model achieve relatively high test accuracy and show promising defense properties against adversarial examples.
|
| 120 |
+
|
| 121 |
+
In summary, our analysis shows that PointNet structure is more robust than traditional CNNs. We believe part of the robustness comes from the learning of global features via max pooling. Though the intriguing properties is not fully understood yet, we believe a further study on this would motivate a defense direction to include PointNet-like structure to improve the robustness of traditional nerual networks.
|
| 122 |
+
|
| 123 |
+
Arguable as the first to study the vulnerability of 3D learning models, in this paper, we have proposed several attacking algorithms to generate adversarial point clouds to fool the widely used PointNet model, including adversarial point perturbation and adversarial point generation. We also propose six different perturbation metrics and extensively evaluate the performance of the proposed attack algorithms. Our extensive experiment results show that the proposed algorithms are able to find 3D adversarial point clouds with an attack success rate higher than 99% given an acceptable perturbation budget. We hope this work is able to provide a baseline as well as a guideline for future 3D adversarial example research.
|
1809.07023v1.txt
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
State-of-the-art deep neural networks are often over-parameterized to deliver more expressive power. For instance, a typical convolutional neural network (CNN) for image classification can consist of tens to hundreds of layers, and millions to tens of millions of learnable parameters [1, 2]. To combat overfitting, a variety of regularization techniques have been developed. Examples include dropout [3], DropConnect [4], and the recently proposed shake-shake regularization [5]. Among them, dropout is arguably the most popular, due to its simplicity and effectiveness in a wide range of architectures and tasks, e.g., convolutional neural networks (CNNs) for image recognition [6], and recurrent neural networks (RNNs) for natural language processing (NLP) [7].
|
| 2 |
+
|
| 3 |
+
Nonetheless, we observe a side effect of dropout that has long been ignored. That is, it tends to increase the correlation between the features it is applied to, which reduces the efficiency of representations. It is also known that decorrelated features can lead to better generalization [8, 9, 10, 11]. Thus, this side effect may counteract, to some extent, the regularization effect of dropout.
|
| 4 |
+
|
| 5 |
+
In this work, we demonstrate the feature correlation effect of dropout, as well as other types of multiplicative noise, through analysis and experiments. Our analysis is based on a simple assumption that, in order to reduce the interference of noise, the training process will try to maximize the signal-to-noise ratio (SNR) of representations. We show that the tendency of increasing the SNR will increase feature correlation as a result. To remove the correlation effect, it is possible to resort to feature decorrelation techniques. However, existing techniques penalize high correlation explicitly; they either introduce a substantial computational overhead [10], or yield marginal improvements [11]. Moreover, these techniques require extra hyperparameters to control the strength of the penalty, which further hinders their practical application.
|
| 6 |
+
|
| 7 |
+
We propose a simple yet effective approach to solve this problem. Specifically, we first decompose noisy features into the sum of two components, a signal component and a noise component, and then truncate the gradient through the latter, i.e., treat it as a constant. However, naively modifying the gradient would encourage the magnitude of features to grow in order to increase the SNR, causing optimization difficulties. We solve this problem by combining the aforementioned technique with batch normalization [12], which effectively counteracts the tendency of increasing feature magnitude. The resulting method, non-correlating multiplicative noise (NCMN), is able to reduce the correlation between features, reaching a level even lower than that without multiplicative noise. More importantly, it significantly improves the performance of standard multiplicative noise on image classification tasks.
|
| 8 |
+
|
| 9 |
+
As another contribution of this work, we further investigate the connection between NCMN and shake-shake regularization. Despite its impressive performance, how shake-shake works remains elusive. We show that the noise produced by shake-shake has a similar form to that of a NCMN variant, and both NCMN and shake-shake achieve superior generalization performance by avoiding feature correlation.
|
| 10 |
+
|
| 11 |
+
The rest of this paper is organized as follows. In Section 2, we define a general form of multiplicative noise, and identify the feature correlation effect. In Section 3, we first propose NCMN, which we show through analysis is able to remove the feature correlation effect; then we develop multiple variants of NCMN, and provide a unified view of NCMN and shake-shake regularization. In Section 4, we provide empirical evidence of our analysis, and evaluate the performance of the proposed methods.111Code is available at https://github.com/zj10/NCMN.
|
| 12 |
+
|
| 13 |
+
Let xisubscript𝑥𝑖x_{i} be the activation of hidden unit i𝑖i, we consider multiplicative noise, uisubscript𝑢𝑖u_{i}, which is applied to the activations of layer l𝑙l asx~i=uixi,∀i∈ℋl.formulae-sequencesubscript~𝑥𝑖subscript𝑢𝑖subscript𝑥𝑖for-all𝑖superscriptℋ𝑙\tilde{x}_{i}=u_{i}x_{i},\forall i\in\mathcal{H}^{l}.(1)Here, ℋlsuperscriptℋ𝑙\mathcal{H}^{l} represents the set of hidden units in layer l𝑙l. For simplicity, we restrict our analysis to fully-connected layers without batch normalization, and will later extend it to batch-normalized layers and convolutional layers. When used for regularization purpose, multiplicative noise is typically applied at training time, and removed at test time. Consequently, the noise should satisfy 𝔼[ui]=1𝔼subscript𝑢𝑖1\operatorname{\mathbb{E}}\left[u_{i}\right]=1, such that 𝔼[x~i]=xi𝔼subscript~𝑥𝑖subscript𝑥𝑖\operatorname{\mathbb{E}}\left[\tilde{x}_{i}\right]=x_{i}.
|
| 14 |
+
|
| 15 |
+
The noise mask, uisubscript𝑢𝑖u_{i}, can be sampled from various distributions, as exemplified by Bernoulli, Gaussian, and uniform distributions. We take dropout and DropConnect as examples. For dropout, let misubscript𝑚𝑖m_{i} be the dropout mask sampled from a Bernoulli distribution, Bern(p)Bern𝑝\operatorname{Bern}\left(p\right), then the equivalent multiplicative noise is given by ui=mi/psubscript𝑢𝑖subscript𝑚𝑖𝑝u_{i}=m_{i}/p. DropConnect is slightly different from dropout, in that the dropout mask is independently sampled for each weight instead of each activation. Thus, we denote the dropout mask by mijsubscript𝑚𝑖𝑗m_{ij}, where j∈ℋl+1𝑗superscriptℋ𝑙1j\in\mathcal{H}^{l+1}, then we have uij=mij/psubscript𝑢𝑖𝑗subscript𝑚𝑖𝑗𝑝u_{ij}=m_{ij}/p andx~ij=uijxi,∀i∈ℋl,j∈ℋl+1.formulae-sequencesubscript~𝑥𝑖𝑗subscript𝑢𝑖𝑗subscript𝑥𝑖formulae-sequencefor-all𝑖superscriptℋ𝑙𝑗superscriptℋ𝑙1\tilde{x}_{ij}=u_{ij}x_{i},\forall i\in\mathcal{H}^{l},j\in\mathcal{H}^{l+1}.(2)Comparing Eq. (2) with Eq. (1), we observe that applying multiplicative noise to weights is equivalent to applying it to activations, except that the noise mask is independently sampled for each hidden unit in the upper layer. Therefore, without loss of generality, we consider multiplicative noise of the form in Eq. (1) in the following discussion.
|
| 16 |
+
|
| 17 |
+
Compared to other types of noise, such as additive isotropic noise, multiplicative noise can adapt the scale of noise to the scale of features, which may contribute to its empirical success.
|
| 18 |
+
|
| 19 |
+
As a regularization technique, dropout, and other multiplicative noise, improve generalization by preventing feature co-adaptation [3]. From an information perspective, injecting noise into a neural network can be seen as training the model to solve the task with noisy information pathways. To better solve the task, a simple and natural strategy that can be learned is to increase the signal-to-noise ratio (SNR) of the information pathways.
|
| 20 |
+
|
| 21 |
+
Concretely, the noisy activations of layer l𝑙l is aggregated by a weighted sum to form the pre-activations (without biases) of layer l+1𝑙1l+1 aszj=∑i∈ℋlwijx~i,∀j∈ℋl+1,formulae-sequencesubscript𝑧𝑗subscript𝑖superscriptℋ𝑙subscript𝑤𝑖𝑗subscript~𝑥𝑖for-all𝑗superscriptℋ𝑙1z_{j}=\sum_{i\in\mathcal{H}^{l}}w_{ij}\tilde{x}_{i},\forall j\in\mathcal{H}^{l+1},(3)where wijsubscript𝑤𝑖𝑗w_{ij} is the weight between unit i𝑖i in layer l𝑙l and unit j𝑗j in layer l+1𝑙1l+1. Although we cannot increase the SNR of x~isubscript~𝑥𝑖\tilde{x}_{i} due to the multiplicative nature of the noise, it is possible to increase the SNR of zjsubscript𝑧𝑗z_{j} instead. In the following, we omit the range of summation when it is over ℋlsuperscriptℋ𝑙\mathcal{H}^{l}.
|
| 22 |
+
|
| 23 |
+
We now focus on the pre-activation, zjsubscript𝑧𝑗z_{j}, of an arbitrary unit in layer l+1𝑙1l+1, and define its signal and noise components, respectively, aszjs=∑iwijxi, and zjn=∑iwijvixi,formulae-sequencesuperscriptsubscript𝑧𝑗𝑠subscript𝑖subscript𝑤𝑖𝑗subscript𝑥𝑖 and superscriptsubscript𝑧𝑗𝑛subscript𝑖subscript𝑤𝑖𝑗subscript𝑣𝑖subscript𝑥𝑖z_{j}^{s}=\sum_{i}w_{ij}x_{i},\text{ and }z_{j}^{n}=\sum_{i}w_{ij}v_{i}x_{i},(4)where vi=ui−1subscript𝑣𝑖subscript𝑢𝑖1v_{i}=u_{i}-1, such that 𝔼[vi]=0𝔼subscript𝑣𝑖0\operatorname{\mathbb{E}}\left[v_{i}\right]=0, and zj=zjs+zjnsubscript𝑧𝑗superscriptsubscript𝑧𝑗𝑠superscriptsubscript𝑧𝑗𝑛z_{j}=z_{j}^{s}+z_{j}^{n}. Then we can model the tendency of increasing the SNR of information pathways by the following implicit objective function:maximizeSNR(zj)=𝔼[(zjs−𝔼[zjs])2]𝔼[(zjn)2].maximizeSNRsubscript𝑧𝑗𝔼superscriptsuperscriptsubscript𝑧𝑗𝑠𝔼superscriptsubscript𝑧𝑗𝑠2𝔼superscriptsuperscriptsubscript𝑧𝑗𝑛2\text{maximize}\quad\operatorname{SNR}\left(z_{j}\right)=\frac{\operatorname{\mathbb{E}}\left[\left(z_{j}^{s}-\operatorname{\mathbb{E}}\left[z_{j}^{s}\right]\right)^{2}\right]}{\operatorname{\mathbb{E}}\left[\left(z_{j}^{n}\right)^{2}\right]}.(5)Here, the expectations are taken with respect to both xisubscript𝑥𝑖x_{i} and visubscript𝑣𝑖v_{i}, ∀i∈ℋlfor-all𝑖superscriptℋ𝑙\forall i\in\mathcal{H}^{l}. Note that in Eq. (5), we subtract the constant component, 𝔼[zjs]𝔼superscriptsubscript𝑧𝑗𝑠\operatorname{\mathbb{E}}\left[z_{j}^{s}\right], from the signal, since it does not capture the variation of input samples. Let σ2=Var[vi],∀i∈ℋlformulae-sequencesuperscript𝜎2Varsubscript𝑣𝑖for-all𝑖superscriptℋ𝑙\sigma^{2}=\operatorname{Var}\left[v_{i}\right],\forall i\in\mathcal{H}^{l}, we haveSNR(zj)=1σ2[1+2𝔼[∑i′≠i∑i(wijxi)(wi′jxi′)]−𝔼[zjs]2𝔼[∑i(wijxi)2]].\operatorname{SNR}\left(z_{j}\right)=\frac{1}{\sigma^{2}}\left[1+\frac{2\operatorname{\mathbb{E}}\left[\sum_{i^{\prime}\neq i}\sum_{i}\left(w_{ij}x_{i}\right)\left(w_{i^{\prime}j}x_{i^{\prime}}\right)\right]-\operatorname{\mathbb{E}}\left[z_{j}^{s}\right]^{2}}{\operatorname{\mathbb{E}}\left[\sum_{i}\left(w_{ij}x_{i}\right)^{2}\right]}\right].(6)Thus, the objective function in Eq. (5) is equivalent to the following:maximize2𝔼[∑i′≠i∑i(wijxi)(wi′jxi′)]𝔼[∑i(wijxi)2]−𝔼[zjs]2𝔼[∑i(wijxi)2].\text{maximize}\quad\frac{2\operatorname{\mathbb{E}}\left[\sum_{i^{\prime}\neq i}\sum_{i}\left(w_{ij}x_{i}\right)\left(w_{i^{\prime}j}x_{i^{\prime}}\right)\right]}{\operatorname{\mathbb{E}}\left[\sum_{i}\left(w_{ij}x_{i}\right)^{2}\right]}-\frac{\operatorname{\mathbb{E}}\left[z_{j}^{s}\right]^{2}}{\operatorname{\mathbb{E}}\left[\sum_{i}\left(w_{ij}x_{i}\right)^{2}\right]}.(7)Intuitively, the first term in Eq. (7) tries to maximize the correlation between each pair of wijxisubscript𝑤𝑖𝑗subscript𝑥𝑖w_{ij}x_{i} and wi′jxisubscript𝑤superscript𝑖′𝑗subscript𝑥𝑖w_{i^{\prime}j}x_{i}, where i≠i′𝑖superscript𝑖′i\neq i^{\prime}. Although it is not the same as the commonly used Pearson correlation coefficient, it can be regarded as a generalization of the latter to multiple variables. Since wijsubscript𝑤𝑖𝑗w_{ij} can be either positive or negative, maximizing the correlations between wijxisubscript𝑤𝑖𝑗subscript𝑥𝑖w_{ij}x_{i}’s essentially increases the magnitudes of the correlations between xisubscript𝑥𝑖x_{i}’s, and hence causing the feature correlation effect. The second term in Eq. (7) penalizes non-zero values of 𝔼[zjs]𝔼superscriptsubscript𝑧𝑗𝑠\operatorname{\mathbb{E}}\left[z_{j}^{s}\right], and does not affect feature correlations.
|
| 24 |
+
|
| 25 |
+
For batch-normalized layers, if batch normalization is applied to zjsubscript𝑧𝑗z_{j} (as a common practice), the numerator and denominator of Eq. (5) will be divided by the same factor, Var[zj]Varsubscript𝑧𝑗\sqrt{\operatorname{Var}\left[z_{j}\right]}. Therefore, Eq. (5) remains the same, and the analysis still holds.
|
| 26 |
+
|
| 27 |
+
For convolutional layers, one should consider ℋl+1superscriptℋ𝑙1\mathcal{H}^{l+1} as the set of convolutional kernels or feature maps in layer l+1𝑙1l+1, and ℋlsuperscriptℋ𝑙\mathcal{H}^{l} as the set of input activations at each spatial location. Accordingly, the inputs at different spatial locations are considered as different input samples. Since adjacent activations in the same feature map are often highly correlated, sharing the same noise mask across different spatial locations is shown to be more effective [13]. In this setting, the feature correlation effect tends to be more prominent between activations in different feature maps than that in the same feature map.
|
| 28 |
+
|
| 29 |
+
A high correlation between features increases redundancy in neural representations, and can thus reduce the expressive power of neural networks. To remove this effect, one can directly penalize the correlation between features as part of the objective function [10], which, however, introduces a substantial computational overhead. Alternatively, one can penalize the correlation between the weight vectors (or convolutional kernels) of different hidden units [11], which is less computationally expensive, but yields only marginal improvements. Moreover, both approaches require manually-tuned penalty strength. A more desirable approach is to simply avoid feature correlation in the first place, rather than counteracting it with other regularization techniques.
|
| 30 |
+
|
| 31 |
+
From Eq. (5) we observe that, if we consider the denominator 𝔼[(zjn)2]𝔼superscriptsuperscriptsubscript𝑧𝑗𝑛2\operatorname{\mathbb{E}}\left[\left(z_{j}^{n}\right)^{2}\right] as a constant, i.e., ignore its gradient during training, the objective function is equivalent tomaximize𝔼[(zjs−𝔼[zjs])2].maximize𝔼superscriptsuperscriptsubscript𝑧𝑗𝑠𝔼superscriptsubscript𝑧𝑗𝑠2\text{maximize}\quad\operatorname{\mathbb{E}}\left[\left(z_{j}^{s}-\operatorname{\mathbb{E}}\left[z_{j}^{s}\right]\right)^{2}\right].(8)Eq. (8) implies that if we ignore the gradient of the noise component, zjnsuperscriptsubscript𝑧𝑗𝑛z_{j}^{n}, the tendency of increasing the SNR of zjsubscript𝑧𝑗z_{j} will attempt to increase the variance of the signal component, zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s}, instead of increasing the feature correlation of the lower layer. However, we find in practice that such modification to the gradient causes optimization difficulties, preventing the training process from converging. Fortunately, by using batch normalization, the remedy for this problem is surprisingly simple.
|
| 32 |
+
|
| 33 |
+
Concretely, we apply batch normalization to zjsubscript𝑧𝑗z_{j} asz^j=BN(zj;zjs)=zj−𝔼[zjs]Var[zjs].subscript^𝑧𝑗BNsubscript𝑧𝑗superscriptsubscript𝑧𝑗𝑠subscript𝑧𝑗𝔼superscriptsubscript𝑧𝑗𝑠Varsuperscriptsubscript𝑧𝑗𝑠\hat{z}_{j}=\operatorname{BN}\left(z_{j};z_{j}^{s}\right)=\frac{z_{j}-\operatorname{\mathbb{E}}\left[z_{j}^{s}\right]}{\sqrt{\operatorname{Var}\left[z_{j}^{s}\right]}}.(9)We neglect the small difference between the true mean/variance, and the sample mean/variance, and adopt the same notation for simplicity. Note that in Eq. (9), zjsubscript𝑧𝑗z_{j} is normalized using the statistics of zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s}, which is slightly different from standard batch normalization. We now consider the SNR of the new pre-activation, z^jsubscript^𝑧𝑗\hat{z}_{j}. The signal and noise components of z^jsubscript^𝑧𝑗\hat{z}_{j} are respectivelyz^js=zjs−𝔼[zjs]Var[zjs], and z^jn=z^j−z^js=zjnVar[zjs].superscriptsubscript^𝑧𝑗𝑠superscriptsubscript𝑧𝑗𝑠𝔼superscriptsubscript𝑧𝑗𝑠Varsuperscriptsubscript𝑧𝑗𝑠, and superscriptsubscript^𝑧𝑗𝑛subscript^𝑧𝑗superscriptsubscript^𝑧𝑗𝑠superscriptsubscript𝑧𝑗𝑛Varsuperscriptsubscript𝑧𝑗𝑠\hat{z}_{j}^{s}=\frac{z_{j}^{s}-\operatorname{\mathbb{E}}\left[z_{j}^{s}\right]}{\sqrt{\operatorname{Var}\left[z_{j}^{s}\right]}}\text{, and }\hat{z}_{j}^{n}=\hat{z}_{j}-\hat{z}_{j}^{s}=\frac{z_{j}^{n}}{\sqrt{\operatorname{Var}\left[z_{j}^{s}\right]}}.(10)
|
| 34 |
+
|
| 35 |
+
For clarity, we define an identity function, AsConst(⋅)AsConst⋅\operatorname{AsConst}\left(\cdot\right), meaning that the argument of the function is considered as a constant during the backpropagation phase, or in other words, its gradient is set to zero by the function. We then substitute z^jsubscript^𝑧𝑗\hat{z}_{j} withz^j′=z^js+AsConst(z^jn)=BN(zjs)+AsConst(BN(zj;zjs)−BN(zjs)),subscriptsuperscript^𝑧′𝑗superscriptsubscript^𝑧𝑗𝑠AsConstsuperscriptsubscript^𝑧𝑗𝑛BNsuperscriptsubscript𝑧𝑗𝑠AsConstBNsubscript𝑧𝑗superscriptsubscript𝑧𝑗𝑠BNsuperscriptsubscript𝑧𝑗𝑠\hat{z}^{\prime}_{j}=\hat{z}_{j}^{s}+\operatorname{AsConst}\left(\hat{z}_{j}^{n}\right)=\operatorname{BN}\left(z_{j}^{s}\right)+\operatorname{AsConst}\left(\operatorname{BN}\left(z_{j};z_{j}^{s}\right)-\operatorname{BN}\left(z_{j}^{s}\right)\right),(11)such that the noise component is considered as a constant. Therefore, maximizing SNR(z^j′)SNRsubscriptsuperscript^𝑧′𝑗\operatorname{SNR}\left(\hat{z}^{\prime}_{j}\right) is equivalent tomaximize𝔼[(z^js)2].maximize𝔼superscriptsuperscriptsubscript^𝑧𝑗𝑠2\text{maximize}\quad\operatorname{\mathbb{E}}\left[\left(\hat{z}_{j}^{s}\right)^{2}\right].(12)Due to the use of batch normalization, Eq. (12) is a constant with respect to each sample of zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s}, and thus we have ∂𝔼[(z^js)2]/∂zjs(m)=0,∀m∈ℬformulae-sequence𝔼superscriptsuperscriptsubscript^𝑧𝑗𝑠2superscriptsubscript𝑧𝑗𝑠𝑚0for-all𝑚ℬ\partial\operatorname{\mathbb{E}}\left[\left(\hat{z}_{j}^{s}\right)^{2}\right]/\partial z_{j}^{s}\left(m\right)=0,\forall m\in\mathcal{B},where ℬℬ\mathcal{B} denotes a set of mini-batch samples, and zjs(m)superscriptsubscript𝑧𝑗𝑠𝑚z_{j}^{s}\left(m\right) denotes the value of zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s} corresponding to sample m𝑚m. Therefore, we can now remove the feature correlation effect of multiplicative noise without causing optimization difficulties. We refer to this approach as non-correlating multiplicative noise (NCMN).
|
| 36 |
+
|
| 37 |
+
We also note that the non-standard batch normalization used in Eq. (9) is not necessary in practice. To take advantage of existing optimized implementations of batch normalization, we can modify Eq. (11) as follows:z^j′=BN(zjs)+AsConst(BN(zj)−BN(zjs)).subscriptsuperscript^𝑧′𝑗BNsuperscriptsubscript𝑧𝑗𝑠AsConstBNsubscript𝑧𝑗BNsuperscriptsubscript𝑧𝑗𝑠\hat{z}^{\prime}_{j}=\operatorname{BN}\left(z_{j}^{s}\right)+\operatorname{AsConst}\left(\operatorname{BN}\left(z_{j}\right)-\operatorname{BN}\left(z_{j}^{s}\right)\right).(13)In this case, to keep the forward pass consistent between training and testing, the running mean and variance should be calculated based on zjsubscript𝑧𝑗z_{j}, rather than zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s}.
|
| 38 |
+
|
| 39 |
+
Interestingly, Eq. (11) and Eq. (13) can be seen as adding a noise component to batch-normalized zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s}, where the noise is generated in a special way and passed through the AsConst(⋅)AsConst⋅\operatorname{AsConst}\left(\cdot\right) function. However, the analysis in this section does not depend on the particular choice of the noise, as long as it is considered as a constant. This observation leads to a unified view of multiple variants of NCMN and shake-shake regularization, as discussed in the following section.
|
| 40 |
+
|
| 41 |
+
In Eq. (11), the noise component, z^jnsuperscriptsubscript^𝑧𝑗𝑛\hat{z}_{j}^{n}, is generated indirectly from the multiplicative noise applied to the lower layer activations. Assuming the independence of visubscript𝑣𝑖v_{i}’s, we have 𝔼[z^jn]=0𝔼superscriptsubscript^𝑧𝑗𝑛0\operatorname{\mathbb{E}}\left[\hat{z}_{j}^{n}\right]=0, andVar[z^jn]=σ2Var[zjs]∑i(wijxi)2=σ2Var[zjs][(zjs)2−2∑i′≠i∑i(wijxi)(wi′jxi′)],Varsuperscriptsubscript^𝑧𝑗𝑛superscript𝜎2Varsuperscriptsubscript𝑧𝑗𝑠subscript𝑖superscriptsubscript𝑤𝑖𝑗subscript𝑥𝑖2superscript𝜎2Varsuperscriptsubscript𝑧𝑗𝑠delimited-[]superscriptsuperscriptsubscript𝑧𝑗𝑠22subscriptsuperscript𝑖′𝑖subscript𝑖subscript𝑤𝑖𝑗subscript𝑥𝑖subscript𝑤superscript𝑖′𝑗subscript𝑥superscript𝑖′\operatorname{Var}\left[\hat{z}_{j}^{n}\right]=\frac{\sigma^{2}}{\operatorname{Var}\left[z_{j}^{s}\right]}\sum_{i}\left(w_{ij}x_{i}\right)^{2}=\frac{\sigma^{2}}{\operatorname{Var}\left[z_{j}^{s}\right]}\left[\left(z_{j}^{s}\right)^{2}-2\sum_{i^{\prime}\neq i}\sum_{i}\left(w_{ij}x_{i}\right)\left(w_{i^{\prime}j}x_{i^{\prime}}\right)\right],(14)which implies that z^jnsuperscriptsubscript^𝑧𝑗𝑛\hat{z}_{j}^{n} can be approximated by a noise multiplied by zjssuperscriptsubscript𝑧𝑗𝑠z_{j}^{s} but applied to z^jssuperscriptsubscript^𝑧𝑗𝑠\hat{z}_{j}^{s}, if we neglect the correlation term in Eq. (14), and only the mean and variance of the noise are of interest. We can further simplify the approximation by applying multiplicative noise directly to z^jssuperscriptsubscript^𝑧𝑗𝑠\hat{z}_{j}^{s} asz^j′=z^js+AsConst(vjz^js).subscriptsuperscript^𝑧′𝑗superscriptsubscript^𝑧𝑗𝑠AsConstsubscript𝑣𝑗superscriptsubscript^𝑧𝑗𝑠\hat{z}^{\prime}_{j}=\hat{z}_{j}^{s}+\operatorname{AsConst}\left(v_{j}\hat{z}_{j}^{s}\right).(15)The advantage of this variant is that, while Eq. (11) and Eq. (13) require an extra forward pass for each layer, Eq. (15) introduces no computational overhead, and is straightforward to implement. A similar idea was explored for fast dropout training [14].
|
| 42 |
+
|
| 43 |
+
To indicate the number of layers involved in noise generation, we refer to this variant (Eq. (15)) as NCMN-00, and the original form (Eq. (13)) as NCMN-111. We next generalize NCMN from NCMN-111 to NCMN-222, and demonstrate its connection to shake-shake regularization [5]. For convenience, we define the following two functions to indicate the pre-activations and activations of a batch-normalized layer:Ψl+1(𝐱l)=BN((𝐱l)T𝐖l+1),superscriptΨ𝑙1superscript𝐱𝑙BNsuperscriptsuperscript𝐱𝑙𝑇superscript𝐖𝑙1\Psi^{l+1}\left(\mathbf{x}^{l}\right)=\operatorname{BN}\left(\left(\mathbf{x}^{l}\right)^{T}\mathbf{W}^{l+1}\right),(16)where 𝐱l=[xi]superscript𝐱𝑙delimited-[]subscript𝑥𝑖\mathbf{x}^{l}=\left[x_{i}\right], 𝐖l+1=[wij]superscript𝐖𝑙1delimited-[]subscript𝑤𝑖𝑗\mathbf{W}^{l+1}=\left[w_{ij}\right], i∈ℋl,j∈ℋl+1formulae-sequence𝑖superscriptℋ𝑙𝑗superscriptℋ𝑙1i\in\mathcal{H}^{l},j\in\mathcal{H}^{l+1}, andΦl+1(𝐱l)=ϕ(γl+1⊙Ψl+1(𝐱l)+βl+1),superscriptΦ𝑙1superscript𝐱𝑙italic-ϕdirect-productsuperscript𝛾𝑙1superscriptΨ𝑙1superscript𝐱𝑙superscript𝛽𝑙1\Phi^{l+1}\left(\mathbf{x}^{l}\right)=\phi\left(\gamma^{l+1}\odot\Psi^{l+1}\left(\mathbf{x}^{l}\right)+\beta^{l+1}\right),(17)where γl+1superscript𝛾𝑙1\gamma^{l+1} and βl+1superscript𝛽𝑙1\beta^{l+1} denote, respectively, the scaling and shifting vectors of batch normalization, ⊙direct-product\odot denotes element-wise multiplication, and ϕ(⋅)italic-ϕ⋅\phi\left(\cdot\right) denotes the activation function. Let Ψil(⋅)superscriptsubscriptΨ𝑖𝑙⋅\Psi_{i}^{l}\left(\cdot\right) be an element of Ψl(⋅)superscriptΨ𝑙⋅\Psi^{l}\left(\cdot\right), the noise component of NCMN-111 is then given byz^jn=Ψjl+1(𝐮l⊙𝐱l)−Ψjl+1(𝐱l),superscriptsubscript^𝑧𝑗𝑛superscriptsubscriptΨ𝑗𝑙1direct-productsuperscript𝐮𝑙superscript𝐱𝑙superscriptsubscriptΨ𝑗𝑙1superscript𝐱𝑙\hat{z}_{j}^{n}=\Psi_{j}^{l+1}\left(\mathbf{u}^{l}\odot\mathbf{x}^{l}\right)-\Psi_{j}^{l+1}\left(\mathbf{x}^{l}\right),(18)where 𝐮l=[ui],i∈ℋlformulae-sequencesuperscript𝐮𝑙delimited-[]subscript𝑢𝑖𝑖superscriptℋ𝑙\mathbf{u}^{l}=\left[u_{i}\right],i\in\mathcal{H}^{l}, and j∈ℋl+1𝑗superscriptℋ𝑙1j\in\mathcal{H}^{l+1}.
|
| 44 |
+
|
| 45 |
+
We then define a natural generalization from NCMN-111 to NCMN-222 asz^ks=Ψkl+2(Φl+1(𝐱l)), and z^kn=Ψkl+2(𝐮l+1⊙Φl+1(𝐮l⊙𝐱l))−z^ks,formulae-sequencesuperscriptsubscript^𝑧𝑘𝑠superscriptsubscriptΨ𝑘𝑙2superscriptΦ𝑙1superscript𝐱𝑙 and superscriptsubscript^𝑧𝑘𝑛superscriptsubscriptΨ𝑘𝑙2direct-productsuperscript𝐮𝑙1superscriptΦ𝑙1direct-productsuperscript𝐮𝑙superscript𝐱𝑙superscriptsubscript^𝑧𝑘𝑠\hat{z}_{k}^{s}=\Psi_{k}^{l+2}\left(\Phi^{l+1}\left(\mathbf{x}^{l}\right)\right),\text{ and }\hat{z}_{k}^{n}=\Psi_{k}^{l+2}\left(\mathbf{u}^{l+1}\odot\Phi^{l+1}\left(\mathbf{u}^{l}\odot\mathbf{x}^{l}\right)\right)-\hat{z}_{k}^{s},(19)andz^k′=z^ks+AsConst(z^kn),subscriptsuperscript^𝑧′𝑘superscriptsubscript^𝑧𝑘𝑠AsConstsuperscriptsubscript^𝑧𝑘𝑛\hat{z}^{\prime}_{k}=\hat{z}_{k}^{s}+\operatorname{AsConst}\left(\hat{z}_{k}^{n}\right),(20)where k∈ℋl+2𝑘superscriptℋ𝑙2k\in\mathcal{H}^{l+2}. Different from NCMN-00 and NCMN-111, which can be applied to every layer, NCMN-222 can only be applied once every two layers. For residual networks (ResNets) in particular, NCMN-222 should be aligned with residual blocks, such that γl+2z^k′+βl+2superscript𝛾𝑙2subscriptsuperscript^𝑧′𝑘superscript𝛽𝑙2\gamma^{l+2}\hat{z}^{\prime}_{k}+\beta^{l+2} or ϕ(γl+2z^k′+βl+2)italic-ϕsuperscript𝛾𝑙2subscriptsuperscript^𝑧′𝑘superscript𝛽𝑙2\phi\left(\gamma^{l+2}\hat{z}^{\prime}_{k}+\beta^{l+2}\right) is the residual of a residual block, depending on which variant is used [15].
|
| 46 |
+
|
| 47 |
+
Interestingly, we can formulate shake-shake regularization in a similar way to NCMN-222. Shake-shake regularization is a regularization technique developed specifically for ResNets with two residual branches, as opposed to only one of standard ResNets. It works by averaging the outputs of two residual branches with random weights. For the forward pass at training time, one of the weights, α1subscript𝛼1\alpha_{1}, is sampled uniformly from [0,1]01\left[0,1\right], while the other one is set to α2=1−α1subscript𝛼21subscript𝛼1\alpha_{2}=1-\alpha_{1}. For the backward pass, the weights are either sampled in the same way as the forward pass, or set to the same value, i.e, α1′=α2′=1/2subscriptsuperscript𝛼′1subscriptsuperscript𝛼′212\alpha^{\prime}_{1}=\alpha^{\prime}_{2}=1/2. We first consider the latter case. Let p∈{1,2}𝑝12p\in\left\{1,2\right\} denote the index of residual branches, then we have the signal component asz^ks=(z^1,k+z^2,k)/2, where z^p,k=Ψp,kl+2(Φpl+1(𝐱l)),formulae-sequencesuperscriptsubscript^𝑧𝑘𝑠subscript^𝑧1𝑘subscript^𝑧2𝑘2 where subscript^𝑧𝑝𝑘superscriptsubscriptΨ𝑝𝑘𝑙2superscriptsubscriptΦ𝑝𝑙1superscript𝐱𝑙\hat{z}_{k}^{s}=\left(\hat{z}_{1,k}+\hat{z}_{2,k}\right)/2,\text{ where }\hat{z}_{p,k}=\Psi_{p,k}^{l+2}\left(\Phi_{p}^{l+1}\left(\mathbf{x}^{l}\right)\right),(21)and the noise component asz^kn=v(z^1,k−z^2,k),superscriptsubscript^𝑧𝑘𝑛𝑣subscript^𝑧1𝑘subscript^𝑧2𝑘\hat{z}_{k}^{n}=v\left(\hat{z}_{1,k}-\hat{z}_{2,k}\right),(22)where v=α1−1/2𝑣subscript𝛼112v=\alpha_{1}-1/2 is uniformly sampled from [−1/2,1/2]1212\left[-1/2,1/2\right]. Accordingly, the noisy pre-activation is also given by Eq. (20).
|
| 48 |
+
|
| 49 |
+
Similar to Eq. (5), we can define the SNR of z^k′subscriptsuperscript^𝑧′𝑘\hat{z}^{\prime}_{k} asSNR(z^k′)=𝔼[(z^ks)2]𝔼[(z^kn)2]=3[1+4𝔼[z^1,kz^2,k]𝔼[(z^1,k−z^2,k)2]].SNRsubscriptsuperscript^𝑧′𝑘𝔼superscriptsuperscriptsubscript^𝑧𝑘𝑠2𝔼superscriptsuperscriptsubscript^𝑧𝑘𝑛23delimited-[]14𝔼subscript^𝑧1𝑘subscript^𝑧2𝑘𝔼superscriptsubscript^𝑧1𝑘subscript^𝑧2𝑘2\operatorname{SNR}\left(\hat{z}^{\prime}_{k}\right)=\frac{\operatorname{\mathbb{E}}\left[\left(\hat{z}_{k}^{s}\right)^{2}\right]}{\operatorname{\mathbb{E}}\left[\left(\hat{z}_{k}^{n}\right)^{2}\right]}=3\left[1+\frac{4\operatorname{\mathbb{E}}\left[\hat{z}_{1,k}\hat{z}_{2,k}\right]}{\operatorname{\mathbb{E}}\left[\left(\hat{z}_{1,k}-\hat{z}_{2,k}\right)^{2}\right]}\right].(23)Apparently, maximizing SNR(z^k′)SNRsubscriptsuperscript^𝑧′𝑘\operatorname{SNR}\left(\hat{z}^{\prime}_{k}\right) does not affect the correlation between features from the same branch. However, if we keep the gradient of the noise component, or, equivalently, let α1′=α1subscriptsuperscript𝛼′1subscript𝛼1\alpha^{\prime}_{1}=\alpha_{1} and α2′=α2subscriptsuperscript𝛼′2subscript𝛼2\alpha^{\prime}_{2}=\alpha_{2}, then maximizing SNR(z^k′)SNRsubscriptsuperscript^𝑧′𝑘\operatorname{SNR}\left(\hat{z}^{\prime}_{k}\right) will encourage large 𝔼[z^1,kz^2,k]𝔼subscript^𝑧1𝑘subscript^𝑧2𝑘\operatorname{\mathbb{E}}\left[\hat{z}_{1,k}\hat{z}_{2,k}\right] and small 𝔼[(z^1,k−z^2,k)2]𝔼superscriptsubscript^𝑧1𝑘subscript^𝑧2𝑘2\operatorname{\mathbb{E}}\left[\left(\hat{z}_{1,k}-\hat{z}_{2,k}\right)^{2}\right], leading to highly correlated branches. On the other hand, if we consider the noise component as a constant, then only large 𝔼[z^1,kz^2,k]𝔼subscript^𝑧1𝑘subscript^𝑧2𝑘\operatorname{\mathbb{E}}\left[\hat{z}_{1,k}\hat{z}_{2,k}\right] will be encouraged, which results in much weaker correlation, and hence the better generalization performance observed in practice. For a similar reason to that of NCMN, the batch normalization layers before Eq. (20) are crucial for avoiding optimization difficulties.
|
| 50 |
+
|
| 51 |
+
It is worth noting that setting α1′=α2′=1/2subscriptsuperscript𝛼′1subscriptsuperscript𝛼′212\alpha^{\prime}_{1}=\alpha^{\prime}_{2}=1/2 for the backward pass leads to exactly the same gradient for z^1,ksubscript^𝑧1𝑘\hat{z}_{1,k} and z^2,ksubscript^𝑧2𝑘\hat{z}_{2,k}, which can also increase the correlation between the two branches. Thus, sampling α1′subscriptsuperscript𝛼′1\alpha^{\prime}_{1} randomly further breaks the symmetry between the two branches, which may explain its slightly better performance on large networks.
|
| 52 |
+
|
| 53 |
+
While the noise components of NCMN-222 and shake-shake are generated in different ways, they are injected into the network in the same way (Eq. (20)). Therefore, we expect similar regularization effects from NCMN-222 and shake-shake in practice. However, while adjusting the regularization strength is difficult for shake-shake, it can be easily done for NCMN by tuning the variance of multiplicative noise. Moreover, NCMN is not restricted to ResNets with multiple residual branches, and can be applied to various architectures.
|
| 54 |
+
|
| 55 |
+
In our preliminary experiments we found that different choices of noise distributions, including Bernoulli, Gaussian, and uniform distributions, lead to similar performance, which is consistent with the experimental results for Gaussian dropout [3]. We use uniform noise with variable standard deviation in the following experiments. For fair comparison, in contrast to previous work [5, 16], we tune the hyperparameters (e.g., learning rate, L2 weight decay, noise standard deviation) separately for different types of noise, as well as for different datasets. We use ND-Adam [17] for optimization, which is a variant of Adam [18] that has similar generalization performance to SGD, but is easier to tune due to its decoupled learning rate and weight decay hyperparameters. See Appendix A for hyperparameter settings and some practical guidelines for tuning them.
|
| 56 |
+
|
| 57 |
+
We first empirically verify the feature correlation effect of multiplicative noise, and the decorrelation effect of NCMN. To avoid possible interactions with skip connections, we use plain CNNs rather than more sophisticated architectures for this purpose. Due to the lack of skip connections, we use a relatively shallow network in case of optimization difficulties. Specifically, we construct a CNN by removing the skip connections from a wide residual network (WRN) [16], WRN-161616-101010, which is a 161616-layer ResNet with 101010 times more filters per layer than the original. Accordingly, we refer to the modified network as CNN-161616-101010. We train the network with different types of noise on the CIFAR-10 and CIFAR-100 datasets [19]. For each convolutional layer except the first one, we calculate the correlation between each pair of feature maps after batch normalization, and take the average of their absolute values. The results are grouped by the size of feature maps, and are shown in Fig. 1. In addition, the corresponding test error rates (average of 3 or more runs) are shown in Table 2.
|
| 58 |
+
|
| 59 |
+
Compared to the baseline, standard multiplicative noise exhibits slightly higher feature correlations for both CIFAR-10 and CIFAR-100. By modifying the gradient as Eq. (13), which results in NCMN-111, the feature correlations are significantly reduced as predicted by our analysis. Surprisingly, for all sizes of feature maps, the feature correlations of NCMN-111 reach a level even lower than that of the baseline. This intriguing result may indicate that the regularization effect of multiplicative noise strongly encourages decorrelation between features, which, however, is counteracted by the feature correlation effect. As a result, NCMN-111 significantly improves the performance of standard multiplicative noise, as shown in Table 2. As discussed in Section 3.2, NCMN-00 can be considered as an approximation to NCMN-111, which is consistent with the fact that the feature correlations and test errors of NCMN-00 are both close to that of NCMN-111. On the other hand, since NCMN-222 applies noise more sparsely (once every two layers), it exhibits higher correlations and slightly worse generalization performance than NCMN-00 and NCMN-111.
|
| 60 |
+
|
| 61 |
+
Next, we extend our experiments to ResNets, in order to investigate possible interactions between skip connections and NCMN. Specifically, we test different types of noise on a WRN-222222-7.57.57.5 network, which has comparable performance to WRN-282828-101010, but is much faster to train. Since WRN is based on the full pre-activation variant of ResNets [15], NCMN-111, NCMN-222, and shake-shake require an extra batch normalization layer after each residual branch. The feature correlation is calculated for the output of each residual block, instead of for each layer.
|
| 62 |
+
|
| 63 |
+
As shown in Fig. 2, NCMN continues to lower the correlation between features, which is especially prominent in the second and third stages of the network. In addition, as shown in Table 2, we obtain even more performance gains from NCMN compared to the CNN-161616-101010 network. However, a notable difference is that, while NCMN-111 works well with both architectures, NCMN-00 and NCMN-222 perform slightly better, respectively with plain CNNs and ResNets, which may result from the interaction between the skip connections of ResNets and NCMN.
|
| 64 |
+
|
| 65 |
+
To compare the performance of NCMN with shake-shake regularization, we train a WRN-222222-5.45.45.4 network with two residual branches, which has comparable number of parameters to WRN-222222-7.57.57.5. We refer to this network as WRN-222222-5.45.45.4×\times222. The averaging weights of residual branches are randomly sampled for each input image, and are independently sampled for the forward and backward passes. The training curves corresponding to different types of noise are shown in Fig. 3. On both CIFAR-10 and CIFAR-100, NCMN and shake-shake show stronger regularization effect than standard multiplicative noise, as indicated by the difference between training (dashed lines) and testing (solid lines) accuracies. However, we make the observation that, the regularization strength of shake-shake is stronger at the early stage of training, but diminishes rapidly afterwards, while that of NCMN is more consistent throughout the training process. See Table 3 for detailed results.
|
| 66 |
+
|
| 67 |
+
As shown in Table 3, we provide additional results demonstrating the performance of NCMN on models of different sizes. Interestingly, NCMN is able to significantly improve the performance of both small and large models. It is worth noting that, apart from the difference in architecture and the number of parameters, the number of training epochs can also notably affect generalization performance [20]. Compared to the results of shake-shake regularization, a WRN-282828-101010 network trained with NCMN is able to achieve comparable performance in 9 times less epochs. For practical uses, NCMN-00 is simple, fast, and can be applied to any batch-normalized neural networks, while NCMN-2 yields better generalization performance on ResNets.
|
| 68 |
+
|
| 69 |
+
We also experimented with language models based on long short-term memories (LSTMs) [22]. Intriguingly, we found that the hidden states of LSTMs had a consistently low level of correlation (less than 0.10.10.1 on average), even in the presence of dropout. Consequently, we did not observe significant improvement by replacing dropout with NCMN.
|
| 70 |
+
|
| 71 |
+
In this work, we analyzed multiplicative noise from an information perspective. Our analysis suggests a side effect of dropout and other types of multiplicative noise, which increases the correlation between features, and consequently degrades generalization performance. The same theoretical framework also provides a principled explanation for the performance gain of shake-shake regularization. Furthermore, we proposed a simple modification to the gradient of noise components, which, when combined with batch normalization, is able to effectively remove the feature correlation effect. The resulting method, NCMN, outperforms standard multiplicative noise by a large margin, proving it to be a better alternative for batch-normalized networks.
|
| 72 |
+
|
| 73 |
+
While we combine batch normalization with NCMN to counteract the tendency of increasing feature magnitude, an interesting future work would be to investigate if other normalization schemes, such as layer normalization [23] and group normalization [24], can serve the same purpose.
|
1809.07122v1.txt
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Deep neural networks have pushed the frontiers of a wide variety of AI tasks in recent years such as speech recognition \cite{xiong2016achieving,chan2016listen}, computer vision \cite{ioffe2015batch,ren2015faster} and neural language processing \cite{bahdanau2014neural,gehring2017convolutional}, etc. More surprisingly, deep neural networks generalize well, even when the number of parameters is significantly larger than the amount of training data \cite{zhang2016understanding}. To explain the generalization ability of neural networks, researchers commonly used different norms of network parameters to measure the capacity \cite{bartlett2017spectrally,neyshabur2014search,neyshabur2015norm}.
|
| 3 |
+
|
| 4 |
+
Among different types of deep neural networks, ReLU networks (i.e., neural networks with ReLU activations \cite{glorot2011deep}) have demonstrated their outstanding performances in many fields such as image classification \cite{resnet,densenet}, information system \cite{cheng2016wide,he2017neural}, and text understanding \cite{t2t} etc. It is well known that ReLU neural networks are positively scale invariant \cite{pathsgd,pathsgd-rnn}. That is, for a hidden node with ReLU activation, if all of its incoming weights are multiplied by a positive constant $c$ and its outgoing weights are divided by the same constant, the neural network with the new weights will generate exactly the same output as the old one for any arbitrary input. \cite{pathsgd} considered the product of weights along all paths from the input to output units as path norm which is invariant to the rescaling of weights, and proposed Path-SGD which takes path norm as the regularization term to the loss function.
|
| 5 |
+
|
| 6 |
+
In fact, each path in a ReLU network can be represented by a small group of generalized linearly independent paths (we call them \emph{basis-path} in the sequels) with multiplication and division operation as shown in Figure \ref{fig:sk}. Thus, there is dependency among different paths. The smaller the percentage of basis paths, the higher the dependency. As the network is determined only by the basis paths, the generalization property of the network should depend only on the basis paths, as well as the relevant regularization methods. In addition, Path-SGD controls the capacity by solving argmin of the regularized loss function, the solution of the argmin problem is approximate because dependency among different values of all paths is not considered in the network. This motivates us to establish a capacity bound based on only the basis paths instead of all the paths. This is in contrast to the generalization bound based on the path norm which counts the values of all the paths and does not consider the dependency among different paths. To tackle these problems, we define a new norm based on the values of the basis paths called \emph{Basis-path Norm}. In previous work, \cite{ecsgd} constructed the basis paths by \emph{skeleton method} and proved that the values of all other paths can be calculated using the values of basis paths by multiplication and division operations. In this work, we take one step further and categorize the basis paths into \emph{positive} and \emph{negative} basis paths according to the sign of their coefficients in the calculations of non-basis paths.
|
| 7 |
+
|
| 8 |
+
In order to control generalization error, we need to keep the hypothesis space being small. As we know, loss function can be computed by paths, hence we keep the values of all paths being small. To keep small values of non-basis paths represented by positive and negative basis paths, we control the positive basis paths not being too large while the negative basis paths not being too small. In addition, to keep small values of basis paths, we control the negative basis paths not being too large as well. With this consideration, we define the new Basis-path norm. We prove a generalization error bound for ReLU networks in terms of the basis-path norm. We then study the relationship between this basis-path norm bound and the empirical generalization gap – the absolute difference between test error and training error. The experiments included ReLU networks with different depths, widths, and levels of randomness to the label. For comparison purpose, we also compute the generalization error bounds induced by other capacity measures for neural networks proposed in the literature. Our experiments show that the generalization bound based on basis-path norm is much more consistent with the empirical generalization gap than those based on other norms. In particular, when the network size is small, the ordinary path norm bound fit empirical generalization gap well. However, when the width and depth increases, the percentage of non-basis paths increases, and the dependency among paths increases and we observe that the path norm bound degenerates in reflecting the empirical generalization gap. In contrast, our basis-path norm bound fits the empirical generalization gap consistently as the network size changes. This validates the efficacy of BP norm as a capacity measure.
|
| 9 |
+
|
| 10 |
+
Finally, we propose a novel regularization method, called Basis-path regularization (BP regularization), in which we penalize the loss function by the BP norm. Empirically, we first conduct experiments on recommendation system of MovieLens-1M dataset to compare the multi-layer perceptron (MLP) model's generalization with BP regularization and baseline norm-based regularization, then we verify the effectiveness of BP regularization on image classification task with ResNet and PlainNet on CIFAR-10 dataset. The results of all experiments show that, with our method, optimization algorithms (i.e., SGD, Adam, Quotient SGD) can attain better test accuracy than with other regularization methods.
|
| 11 |
+
|
| 12 |
+
\begin{figure}[t]
|
| 13 |
+
\centering
|
| 14 |
+
\includegraphics[width=0.2\textwidth]{skeleton_path.png}
|
| 15 |
+
\caption{A toy neural network example. The network has 6 paths $p_{i,j}$, where $i \in \{1,2,3\}$ and $j \in \{1,2\}$, the values of paths $v_{p_{i,j}}=w_{1,i}w_{2,j}$, We can see the dependency among the paths, i.e., $v_{p_{2,2}}=\frac{v_{p_{1,2}}\cdot v_{p_{2,1}}}{v_{p_{1,1}}}$ and $v_{p_{3,2}}=\frac{v_{p_{3,1}}\cdot v_{p_{1,2}}}{v_{p_{1,1}}}$. In this group of basis paths, $p_{1,1}$ is the negative Basis-path, $p_{1,2}$,$p_{2,1}$ and $p_{3,1}$ are the positive basis paths.
|
| 16 |
+
}\label{fig:sk}
|
| 17 |
+
\vspace{-1.em}
|
| 18 |
+
\end{figure}
|
| 19 |
+
\subsection{Related Work}
|
| 20 |
+
Generalization of deep neural networks has attracted a great deal of attention in the community \cite{zhang2016understanding,neyshabur2017exploring,kawaguchi2017generalization}. Norm and margin-based measures have been widely studied, and commonly used in neural network optimization with capacity control \cite{bartlett2002rademacher,evgeniou2000regularization,neyshabur2015norm}. For example, in \cite{bartlett2017spectrally}, the authors proposed a margin-based generalization bound for networks that scale with their margin-normalized spectral complexity. An analysis of generalization bounds based on PAC-Bayes was proposed in \cite{dziugaite2017computing}.
|
| 21 |
+
|
| 22 |
+
Among these measures, the generalization bound based on path norm is tighter theoretically \cite{neyshabur2015norm}. Empirically, path norm has been showed to be more accurate to describe the tendency of generalization error \cite{neyshabur2017exploring}. Thus, we are interested in the capacity measure which is related to the path norm. In \cite{neyshabur2015norm}, the authors first proposed group norm and path norm. The results show that the path norm is equivalent to a kind of group norm. In \cite{pathsgd,pathsgd-rnn}, the authors proposed to use path norm as a regularization term for ReLU multi-layers perceptron (MLP) network and recurrent network and designed Path-SGD algorithm. In \cite{neyshabur2017exploring}, the authors empirically compared different kinds of capacity measures including path norm for deep neural network generalization. However, none of those norms considered the dependency among paths in the networks.
|
| 23 |
+
\section{Preliminaries}
|
| 24 |
+
\label{sec2.1}
|
| 25 |
+
In this section, we introduce ReLU neural networks and generalization error.
|
| 26 |
+
|
| 27 |
+
First of all, we briefly introduce the structure of rectifier neural network models. Suppose {\small$f_w: \mathcal{X} \to\ \mathcal{Y}$} is a $L$-layer neural network with weight {\small$w\in\mathcal{W}$}, where input space {\small$\mathcal{X}\subset \mathbb{R}^d$} and output space {\small$\mathcal{Y} = \mathbb{R}^K$}. In the $l$-th layer ($l=0,…,L$), there are $h_l$ nodes. We denote the nodes and their values as {\small$\{O^l,o^l\}$}. It is clear that, $h_0=d, h_L=K$. The layer mapping is given as, $o^l=\sigma(w_l^T o^{l-1})$, where $w_l$ is the adjacency matrix in the $l$-layer, and the rectifier activation function $\sigma(\cdot)=max(\cdot,0)$ is applied element-wisely. We can also calculate the $k$-th output by paths, i.e., {\small \begin{align}
|
| 28 |
+
N_{w}^{k}(x)= \sum_{(i_0,\cdots,i_{L}=k)}\prod_{l=1}^{L}w_l(i_{l-1},i_l)\cdot \prod_{l=1}^{L-1}\mathbb{I}(o^l_{i_{l}}(w,x)>0) \cdot x_{p_0}\label{loss}
|
| 29 |
+
\end{align}}where {\small$(i_0,\cdots,i_L)$} is the path starting from input feature node $O_{i_0}^0$ to output node $O_{i_L}^L$ via hidden nodes {\small$ O^1_{i_1},…,O^{L-1}_{i_{L-1}}$}, and {\small$w_l(i_{l-1},i_l)$} is the weight of the edge connecting nodes {\small$O^{l-1}_{i_{l-1}}$} and {\small$O^{l}_{i_{l}}$}. \footnote{The paths across the bias node can also be described in the same way. For simplicity, we omit the bias term. }
|
| 30 |
+
|
| 31 |
+
We denote $p_{(i_0,\cdots,i_L)}=\prod_{l=1}^{L}w_l(i_{l-1},i_l)$ and $a_{(i_0,\cdots,i_{L})}=\prod_{l=1}^{L-1}\mathbb{I}(o^l_{i_{l}}(w,x)>0)$. The output can be represented using paths as
|
| 32 |
+
$$N_{p,a}^k(x)=\sum_{(i_0,\cdots,i_L)}p_{(i_0,\cdots,i_L)}\cdot a_{(i_0,\cdots,i_L)}\cdot x_{i_0}.$$
|
| 33 |
+
For ease of reference, we omit the explicit index $(i_0,\cdots,i_L)$ and use $i$ be the index of path. We use $p=(p_1,p_2,\cdots,p_{M})$ where $M=\prod_{l=0}^Lh_l$ to denote the path vector. The path norm used in Path-SGD \cite{pathsgd} is defined as $\Omega(p)=\left(\sum_{i=1}^Mp_{i}^2\right)^{1/2}.$
|
| 34 |
+
|
| 35 |
+
Given the training set $\{(x_1,y_1),\cdots,(x_n,y_n)\}$ i.i.d sampled from the underlying distribution $\mathbb{P}$, machine learning algorithms learn a model $f$ from the hypothesis space $\mathcal{F}$ by minimizing the empirical loss function $l(f(x),y)$. The uniform generalization error of empirical risk minimization in hypothesis space $\mathcal{F}$ is defined as
|
| 36 |
+
\begin{align*}
|
| 37 |
+
\epsilon_{gen}(\mathcal{F})=\sup_{f\in\mathcal{F}}|\frac{1}{n}\sum_{i=1}^nl(f(x_i),y_i)-\mathbb{E}_{(x,y)\sim\mathbb{P}}l(f(x),y)|.
|
| 38 |
+
\end{align*} Generalization error $\epsilon_{gen}$ measures how well a model $f$ learned from the training data $S$ can fit an unknown test sample $(x,y)\sim\mathbb{P}$.
|
| 39 |
+
|
| 40 |
+
Empirically, we consider the empirical generalization error which is defined as the difference of empirical loss between the training set and test set at the trained model $f$.
|
| 41 |
+
\section{Basis-path Norm}
|
| 42 |
+
\label{sec3}
|
| 43 |
+
|
| 44 |
+
In this section, we define the Basis-path Norm (abbreviated as BP norm) on the networks. Using the BP norm, we define a capacity measure which is called BP-measure and we prove that the generalization error can be upper bounded using this measure.
|
| 45 |
+
\subsection{The Definition of Basis-path Norm}
|
| 46 |
+
\label{sec3.1}
|
| 47 |
+
First, as shown in \cite{ecsgd}, the authors constructed a group of basis paths by skeleton method. It means that the value of non-basis paths can be calculated using the values of basis paths. In the calculation of non-basis paths' values, some basis paths always have positive exponents and hence appear in the numerator, others have negative exponents and hence appear in the denominator. We use $\tilde p$ to denote a non-basis path and $p_1,\cdots,p_r$ to denote basis paths. We have the following proposition.
|
| 48 |
+
|
| 49 |
+
\begin{proposition}\label{propo1}
|
| 50 |
+
For any non-basis path $\tilde{p}$, $\tilde{p}=\prod_{i=1}^{m}p_i^{\alpha_i}\prod_{j=m+1}^{r}p_j^{\alpha_j}$, where $\alpha_i\leq 0, \alpha_j\geq 0$.
|
| 51 |
+
\end{proposition}
|
| 52 |
+
Limited by the space, we put the detailed proof in the supplementary materials.
|
| 53 |
+
|
| 54 |
+
The proposition shows that basis paths $p_1,\cdots,p_m$ always have negative exponent in the calculation, while $p_{m+1},\cdots,p^r$ always have positive exponent. We call the basis path with negative exponent $\alpha_i$ \emph{Negative Basis Path} and denote the negative basis path vector as $p^{-}=(p_1,\cdots,p_{m})$. We call the basis path with positive exponent $\alpha_j$ \emph{Positive Basis Path} and denote it as $p^{+}=(p_{m+1},\cdots,p_{r})$.
|
| 55 |
+
|
| 56 |
+
In order to control generalization error, we need to keep the hypothesis space being small. Thus we want all the paths to have small values. For non-basis path represented by $p_i$ and $p_j$, we control $p_i$ not being too small because $\alpha_i$ is negative, and $p_j$ not being too large because $\alpha_j$ is positive. We control $p_i$ not being too large as well to keep small values of basis paths. We define the following basis-path norm $\phi(\cdot)$ as follows.
|
| 57 |
+
|
| 58 |
+
\begin{definition}The basis norm on the ReLU networks is
|
| 59 |
+
\begin{align}\label{eq6}
|
| 60 |
+
\phi(p)=\sup\left\{|\log{|p_1|}|,\cdots,|\log{|p_m|}|, |{p_{m+1}}|,\cdots,|p_{r}|\right\}.
|
| 61 |
+
\end{align}
|
| 62 |
+
\end{definition}
|
| 63 |
+
|
| 64 |
+
We next provide the property of $\phi(p)$.
|
| 65 |
+
|
| 66 |
+
\begin{theorem}\label{thm1}
|
| 67 |
+
$\phi(p)$ is a norm in the vector space where $p^-$ is a vector in Euclidean space and $p^+$ is a vector in a generalized linear space under the generalized addition and generalized scalar multiplication operations: $p^-\oplus (p')^-=[p_1\cdot p'_1,\cdots,p_m\cdot p'_m]$ and $c\odot p^-=[\textit{sgn}(p_1)\cdot |p_1|^{a},\cdots,\textit{sgn}(p_m)\cdot |p_m|^{a}]$ for $p^-, (p')^-\in\mathbb{R}^m$ and $c\in\mathbb{R}$.
|
| 68 |
+
\end{theorem}
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
\textit{Proof:} The definition of $\phi(p)$ is equivalent to \begin{align}
|
| 72 |
+
\phi(p)=\sup\left\{\phi_{\infty}(p^+),\phi_{\infty}(p^-)\right\}.
|
| 73 |
+
\end{align}where {\small$\phi_{\infty}(p^-)=\sup_i\left\{|\log{|p_i|}|, i=1,\cdots,m\right\}$} and {\small$\phi_{\infty}(p^+)=\sup_j\left\{|p_j|, j=m+1,\cdots,r\right\}$}. Obviously, $\phi_{\infty}(p^+)$ is the $\ell_{\infty}$ norm in Euclidean space. Thus, it only needs to prove $\phi_{\infty}(p^-)$ is a kind of norm. Next, we prove that $\phi_{\infty}(p^-)$ is a norm in the generalized linear space.
|
| 74 |
+
|
| 75 |
+
In the generalized linear space, the zero vector is $I$, where $I$ denotes a vector with all elements being equal to $1$. Based on the generalized linear operators, we verify the properties including positive definite, absolutely homogeneous and the triangle inequality of $\|p^-\|_{\infty}$ as follows:
|
| 76 |
+
|
| 77 |
+
(1) (Positive definite)
|
| 78 |
+
$\phi_{\infty}(p^-)\geq 0$ and $\phi_{\infty}(p^-)=0$ when $p^-=I$.
|
| 79 |
+
|
| 80 |
+
(2) (Absolutely homogeneous) For arbitrary $c\in\mathbb{R}$, we have
|
| 81 |
+
\begin{align*}
|
| 82 |
+
\phi_{\infty}(c\cdot p^-)=\sup_i\left\{|\log |p^-_i|^c|, i=1,\cdots,m\right\}=|c|\cdot\phi_{\infty}(p^-).
|
| 83 |
+
\end{align*}
|
| 84 |
+
|
| 85 |
+
(3) (Triangle inequality)
|
| 86 |
+
\begin{align*}
|
| 87 |
+
\phi_{\infty}(p^-\oplus (p')^-)=&\sup_i\left\{|\log|p_ip'_i||, i=1,\cdots,m\right\}\\
|
| 88 |
+
\leq &\sup_i\left\{|\log|p_i||, i=1,\cdots,m\right\}\\
|
| 89 |
+
&+\sup_i\left\{|\log|p'_i||, i=1,\cdots,m\right\}\\
|
| 90 |
+
=&\phi_{\infty}(p^-)+\phi_{\infty}((p')^-).
|
| 91 |
+
\end{align*} Considered that $\phi_{\infty}(p^+)$ and $\phi_{\infty}(p^-)$ are both norms, taking supreme of them is still a norm. Thus $\phi(p)$ satisfies the definition of norm. $\Box$
|
| 92 |
+
\subsection{Generalization Error Bound by Basis-path Norm}
|
| 93 |
+
\label{sec3.2}
|
| 94 |
+
We want to use the basis-path norm to define a capacity measure to get the upper bound for the generalization error. Suppose the binary classifier is given as $g(x)=v^Tf(x)$, where $v$ represents the linear operator on the output of the deep network with input vector $x\in\mathbb{R}^d$.
|
| 95 |
+
We consider the following hypothesis space which is composed of linear operator $v$, and $L$-layered fully connected neural networks with width $H$ and input dimension $d$:
|
| 96 |
+
\begin{align*}
|
| 97 |
+
&\mathcal{G}_{\gamma,v}^{d,H,L}=\\
|
| 98 |
+
&\{g=v\circ f: L\geq 2, h_0=d, h_1=\cdots=h_{L-1}=H, \phi(p)\leq \gamma\}.
|
| 99 |
+
\end{align*}
|
| 100 |
+
|
| 101 |
+
\begin{theorem}\label{thm3.1}
|
| 102 |
+
Given the training set $\{(x_1,y_1),\cdots,(x_n,y_n)\}$ with $x_i\in\mathbb{R}^d$, $y_i\in\{0,1\}$, and the hypothesis space $\mathcal{G}_{\gamma,v}^{d,H,L}$ which contains MLPs with depth $L\geq 2$, width $H$ and $\phi(p)$, for arbitrary $z>0$, for every $\delta>0$, with probability at least $1-\delta$, for every hypothesis $g\in\mathcal{G}_{\gamma,v}^{d,H,L}$, the generalization error can be upper bounded as
|
| 103 |
+
\begin{align*}
|
| 104 |
+
&\epsilon_{gen}(\mathcal{G}_{\gamma,v}^{d,H,L}) \leq 4\sqrt{\frac{2\ln(4/\delta)}{n}}+\\
|
| 105 |
+
&\quad \quad 2\sqrt{\frac{2\Phi(\gamma; d, H, L)(4H)^{L-1}\cdot\|v\|_2^2\cdot\max_i\|x_i\|_2^2}{n}},
|
| 106 |
+
\end{align*}where
|
| 107 |
+
\begin{align}\label{eqn:epnorm}
|
| 108 |
+
&\Phi(\gamma; d, H, L)\overset{\Delta}{=} \nonumber\\
|
| 109 |
+
&(He^{2\gamma}+(d-1)H\gamma^2)\left(1+(H-1)\gamma^2e^{2\gamma}\right)^{L-2}.
|
| 110 |
+
\end{align}
|
| 111 |
+
\end{theorem}
|
| 112 |
+
We call $\Phi(\gamma; d, H, L)$ \emph{Basis-path measure}.
|
| 113 |
+
Therefore, the generalization error $\epsilon_{gen}(\mathcal{G}_{\gamma,v}^{d,H,L})$ can be upper bounded by a function of Basis-path measure.
|
| 114 |
+
|
| 115 |
+
The proof depends on estimating the value of different types of paths and counting the number of different types of paths. We give the proof sketch of Theorem \ref{thm3.1}.
|
| 116 |
+
|
| 117 |
+
\textbf{Proof of Theorem \ref{thm3.1}:}
|
| 118 |
+
|
| 119 |
+
Step 1: If we denote $\mathcal{F}_{\gamma}=\{f: L\geq 2, h_0=d, h_1=\cdots=h_{L-1}=H, \phi(p)\leq \gamma\}$, the generalization error of a binary classification problem is $$\epsilon_{gen}(\mathcal{G}_{\gamma,v}^{d,H,L})\leq 2\|v\|_2^2 \mathcal{RA}(\mathcal{F}_{\gamma})+4\sqrt{\frac{2\ln(4/\delta)}{n}},$$where $\mathcal{RA}(\cdot)$ denotes the Rademacher complexity of a hypothesis space \cite{wolf2018mathematical}. Following the results of Theorem 1 and Theorem 5 in \cite{neyshabur2015norm} under $p=2$ and $q=\infty$, we have $$\mathcal{RA}(\mathcal{F}_{\gamma})\leq \sqrt{\frac{2\Omega^2(\mathcal{F}_{\gamma})(4H)^{L-1}\max_i\|x_i\|_2^2}{n}},$$ where $\Omega(\mathcal{F}_{\gamma})$ is the maximal path norm of $f, f\in\mathcal{F_{\gamma}}$.
|
| 120 |
+
|
| 121 |
+
Step 2 (estimating path value): We give $\Omega(\mathcal{F}_{\gamma})$ an upper bound using Basis-path norm. Using $\phi(p)\leq\gamma$, we have $e^{-\gamma}\leq|p_i|\leq e^{\gamma}$ and $|p_j|\leq\gamma$. Then using Proposition \ref{propo1}, we have
|
| 122 |
+
\begin{align}
|
| 123 |
+
|\tilde p|&\leq \big|\prod_{i=1}^{m}p_i^{\alpha_i}\prod_{j=m+1}^{r}p_j^{\alpha_j}\big|\\
|
| 124 |
+
&\leq e^{-\gamma\sum_{i=1}^m\alpha_i}\cdot\gamma^{\sum_{i=m+1}^r\alpha_j},
|
| 125 |
+
\end{align}where $\alpha_i\leq 0, \alpha_j\geq 0$.
|
| 126 |
+
|
| 127 |
+
As shown in skeleton method in \cite{ecsgd} (which can also be referred in supplementary materials), basis paths are constructed according to skeleton weights. Here, we clarify the non-basis paths according to the number of non-skeleton weights it contains. We denote the non-basis path which contains $b$ non-skeleton weights as $\tilde p_b$. The proofs of Proposition \ref{propo1} indicates that for $\tilde p_b, \sum_{i=1}^m\alpha_i=1-b, \sum_{i=m+1}^r\alpha_j=b$. Thus we have $$|\tilde p_b|\leq e^{\gamma(b-1)}\cdot\gamma^{b}.$$
|
| 128 |
+
|
| 129 |
+
Step 3 (counting the number of different type of paths): Based on the construction of basis paths (refer to the skeleton method in supplementary), in each hidden layer, there are $H$ skeleton weights and $H(H-1)$ non-skeleton weights. We can get that the number of $\tilde p_b$ in a $L$-layer MLP with width $H$ is $(d-1)HC_{L-2}^{b-1}(H-1)^{b-1}+HC_{L-2}^b(H-1)^b$ if $1\leq b\leq L-2$ and $(d-1)H(H-1)^{L-2}$ if $b=L-1$.
|
| 130 |
+
|
| 131 |
+
Step 4: We have:
|
| 132 |
+
\begin{align}
|
| 133 |
+
\Omega^2(\mathcal{F}_{\gamma})=\sum_{i=1}^{m}(p_{i})^2+\sum_{j=m+1}^{r}(p_j)^2+\sum_{b=2}^{L-1}\sum_{k}\tilde{p}_{b,k}^2.
|
| 134 |
+
\end{align} The number of negative basis paths is $H$ and $e^{-\gamma}\leq |p_i|\leq e^{\gamma}$, so we have $\sum_{i=1}^mp_{i}^2\leq He^{2\gamma}$, where $m=H$.
|
| 135 |
+
\begin{align}
|
| 136 |
+
\begin{split}
|
| 137 |
+
&\Omega^2(\mathcal{F}_{\gamma})\\
|
| 138 |
+
\leq& He^{2\gamma} +\sum_{b=1}^{L-2}\left((d-1)HC_{L-2}^{b-1}(H-1)^{b-1}+HC_{L-2}^b(H-1)^b\right)\\
|
| 139 |
+
&\cdot\left(\gamma^be^{\gamma(b-1)}\right)^2 +(d-1)H(H-1)^{L-2}\cdot\left(\gamma^{L-1}e^{\gamma(L-2)}\right)^2 \\
|
| 140 |
+
\leq&( He^{2\gamma}+(d-1)H\gamma^2\sum_{b=0}^{L-2}C_{L-2}^b(H-1)^b\left(\gamma^2e^{2\gamma}\right)^{b}\\
|
| 141 |
+
\leq&( He^{2\gamma}+(d-1)H\gamma^2)\left(1+(H-1)\gamma^2e^{2\gamma}\right)^{L-2}\\
|
| 142 |
+
=&\Phi(\gamma; d, H, L), \label{ineq10}
|
| 143 |
+
\end{split}
|
| 144 |
+
\end{align}where Ineq.\ref{ineq10} is established by the calculation of $(1+x)^a$.
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
$\quad\Box$
|
| 148 |
+
|
| 149 |
+
Based on the above theorem, we discuss how $\Phi(\gamma;d,H,L)$ changes as width $H$ and depth $L$. (1) For fixed $\gamma$, $\Phi(\gamma;d,H,L)$ increases exponentially as $L$ and $H$ goes to large. (2) $\Phi(\gamma;d,H,L)$ increases as $\gamma$ increases. If $\gamma$ diminishes to zero, we have $\Phi(\gamma;d,H,L)\rightarrow H$. In this case, the feature directly flow into the output, which means that $f_k(x)=x_{k\mod{d}}$, for $k=1,\cdots, H$. (3) If $\gamma=\mathcal{O}\left( \frac{1}{\sqrt{HL}}\right)$, we have $\Phi(\gamma;d,H,L)\leq \mathcal{O}\left(H+\frac{d}{L}\right)$. It increases linearly as $d$ and $H$ increase and decreases linearly as $L$ increases.
|
| 150 |
+
\subsection{Empirical Verification}
|
| 151 |
+
In the previous section, we derived a BP norm induced generalization error bound for ReLU networks. In this section, we study the relationship between this bound and the empirical generalization gap – the absolute difference between test error and training error with real-data experiments, in comparison with the generalization error bounds given by other capacity measures, including weight norm \cite{evgeniou2000regularization}, path norm \cite{neyshabur2015norm} and spectral norm \cite{bartlett2017spectrally}. We follow the experiment settings in \cite{neyshabur2017exploring}, and extend on our BP norm bound. As shown in the previous section, the BP norm with capacity is proportional to Eqn.\ref{eqn:epnorm} We conduct experiments with multi-layer perceptrons (MLP) with ReLU of different depths, widths, and global minima on MNIST classification task which is optimized by stochastic gradient descent. More details of the training strategies can be found in the supplementary materials. All experiments are averaged over 5 trials if without explicit note.
|
| 152 |
+
|
| 153 |
+
\begin{figure*}[ht]
|
| 154 |
+
\centering
|
| 155 |
+
\includegraphics[width=0.8\textwidth]{rand_size_depth.pdf}
|
| 156 |
+
\caption{Left: experiments on different global minima for the objective function on the subset with true labels:(a) the training and test error, (b) different measures w.r.t. the size of random labels. Middle: experiments on different hidden units: (c) the training and test error, (d) different measures w.r.t. the size of hidden units for each layer. Right: (e) the test error, (f) different measure w.r.t. the number of layers of the network.}\label{fig:rand_size_depth}
|
| 157 |
+
\end{figure*}
|
| 158 |
+
|
| 159 |
+
First, we train several MLP models and force them to converge to different global minima by intentionally replacing a different number of training data with random labels, and then calculate the capacity measures on these models. The training set consists of 10000 randomly selected samples with true labels and another at most 5000 intentionally mislabeled data which are gradually added into the training set. The evaluation of error rate is conducted on a fixed 10000 validation set. Figure \ref{fig:rand_size_depth} (a) shows that every network is enough to fit the entire training set regardless of the amount of mislabeled data, while the test error of the learned networks increases with increasing size of the mislabeled data. As shown in Figure \ref{fig:rand_size_depth} (b), the measure of BP norm is consistent with the behaviors of generalization on the data and indeed is a good predictor of the generalization error, as well as weight norms, path norm, and spectral norm.
|
| 160 |
+
|
| 161 |
+
We further investigate the relationship between generalization error and the network size with different widths. We train a bunch of MLPs with 2 hidden layers and varying number of hidden units from 16 to 8192 for each layer. The experiment is conducted on the whole training set with 60000 images. As shown in Figure \ref{fig:rand_size_depth}(c), the networks can fit the whole training set when the number of hidden units is greater than or equal to 32, while the minimal test error is achieved with 512 hidden units, then shows a slightly over fitting on training set beyond 1024 hidden units. Figure \ref{fig:rand_size_depth}(d) shows that the measure of BP norm behaves similarly to the trend of generalization errors which decreases at the beginning and then slightly increases, and also achieves minimal value at 512 hidden units. Weight norm and spectral norm keep increasing along with the network size growing while the trend of generalization error behaves differently. Path norm shows the good explanation of the generalization when the number of hidden units is small, but keeps decreasing along with increasing the network size in this experiment. One possible reason is that the proportion of basis paths in all paths is decreasing, and the vast majority improperly affects the capacity measure when the dependency in the network becomes large. In contrast, BP norm better explains the generalization behaviors regardless of the network size.
|
| 162 |
+
|
| 163 |
+
Similar empirical observation is shown when we train the network with a different number of hidden layers. Each network has 32 hidden units in each layer and can fit the whole training set in this experiment. As shown in Figure\ref{fig:rand_size_depth}(e,f), the minimal test error is achieved with 3 hidden layers, and then shows an over fitting along with the increasing of the layers. The weight norm keeps increasing with the growing of network size as discussed above, and the $\Pi_i h_i$ in spectral norm will be quite large when layers $L$ is increasing. Path norm can partially explain the decreasing generalization error before 4 hidden layers and it indicates that the networks with 4, 5 and 6 hidden layers have small generalization error, which doesn't match our observations. The amount of non-basis paths is exponentially growing when layers $L$ is increasing, therefore the path norm couldn't measure the capacity accurately by counting all paths' values. In contrast, the BP norm can nearly match the generalization error, these observations verify that BP norm bound is more tight to generalization error and can be a better predictor of generalization.
|
| 164 |
+
\section{Basis-path Regularization for ReLU Networks}
|
| 165 |
+
\label{sec4}
|
| 166 |
+
|
| 167 |
+
\begin{algorithm}[t]\label{alg:1}
|
| 168 |
+
\caption{Optimize ReLU Network with Basis-path Regularization}
|
| 169 |
+
\label{EC-Opt F}
|
| 170 |
+
\begin{algorithmic}
|
| 171 |
+
\Require learning rate $\eta_t$, training set $S$, initial $w_0$.
|
| 172 |
+
\For{$t=0,\cdots, T$}
|
| 173 |
+
\State 1. Draw mini-batch data $x^t$ from $S$.
|
| 174 |
+
\State 2. Compute gradient of the loss function $g(w^t) = \nabla f(w^t,x^t)$.
|
| 175 |
+
\State 3. Compute gradient of the basis-path regularization $h(w^t) = \nabla R(w)$ by Ineq. (\ref{eqn:18}) and (\ref{eq:12}).
|
| 176 |
+
\State 4. Update $w^{t+1} = w^t-\eta_t (g(w^t) + h(w^t))$.
|
| 177 |
+
\EndFor
|
| 178 |
+
\Ensure{\small$w^{T}$}.
|
| 179 |
+
\end{algorithmic}
|
| 180 |
+
\end{algorithm}
|
| 181 |
+
|
| 182 |
+
In this section, we propose Basis-path regularization, in which we penalize the loss function by the BP norm. According to the definition of BP norm in Eqn.(\ref{eq6}), to make it small, we need to restrict the values of negative basis paths to be moderate (neither too large nor too small) and minimize the value of positive basis paths. To this end, in our proposed method, we penalize the empirical loss by the $l_2$ distance between the values of negative basis paths and $1$, as well as the sum of the values of all positive basis paths.
|
| 183 |
+
|
| 184 |
+
The constraint $\phi(p)\leq \gamma$ equals to $\|p^+\|^2\leq\gamma^2$ and $\|\log(p^-)^2\|^2\leq(2\gamma)^2$, which means that the largest element in a vector is smaller than $\gamma$ iff all of the element is smaller than $\gamma$. We choose to optimize their square because of the smoothness. So using the Lagrangian dual methods, we add the constraint $\frac{\lambda_1}{2}\|p^+\|^2$ and $\frac{\lambda_2}{4}\|\log(p^-)^2\|^2$ in the loss function and then optimize the regularized empirical risk function:
|
| 185 |
+
\begin{align}
|
| 186 |
+
\begin{split}
|
| 187 |
+
L(w,x) &= f(w,x)+R(p)\\
|
| 188 |
+
&=f(w,x)+\frac{\lambda_1}{2}\|p^+\|^2+\frac{\lambda_2}{4}\|\log(p^-)^2\|^2.
|
| 189 |
+
\end{split}
|
| 190 |
+
\end{align}
|
| 191 |
+
We use $g(w)$ to denote the gradient of loss with respect to $w$, i.e., $g(w)=\frac{\partial f(w,x)}{\partial w}$.
|
| 192 |
+
For the non-skeleton weight $w_{j}$, since it is contained in only one positive basis path $p_{j}$, we can calculate the gradient of the regularization term with respect to $w_{j}$ as
|
| 193 |
+
{\small\begin{align}\label{eqn:18}h(w_{j})=\frac{\lambda_1}{2}\frac{\partial R(p)}{\partial p_{j}}\frac{\partial p_{j}(w)}{\partial w_{j}}=\lambda_1\cdot\frac{p_{j}^2}{w_{j}}.\end{align}}
|
| 194 |
+
For the skeleton weight $w_{i}$, it is contained in only one negative basis path $p_i$ (if the neural network has equal number of hidden nodes) and some of the positive basis paths $p_j$. Thus its gradient can be calculated as follows
|
| 195 |
+
\begin{align}\label{eq:12}
|
| 196 |
+
\begin{split}
|
| 197 |
+
h(w_{i})&=\frac{\lambda_2}{4}\frac{\partial R(p)}{\partial p_{i}}\frac{\partial p_{i}(w)}{\partial w_{i}}+\frac{\lambda_1}{2}\sum_{p_j:w_{i}}\frac{\partial R(p)}{\partial p_{j}}\frac{\partial p_{j}(w)}{\partial w_{i}}\\ &=\frac{\lambda_2\log{p_i}}{w_{i}}+\lambda_1\sum_{p_j:w_{i}}\frac{p_{j}^2}{w_{i}},
|
| 198 |
+
\end{split}
|
| 199 |
+
\end{align} where $p_j:w_{i}$ denotes all positive basis paths containing $w_i$.
|
| 200 |
+
|
| 201 |
+
Combining them together, we get the gradient of the regularized loss function with respected to the weights. For example, if we use stochastic gradient descent to be the optimizer, the update rule is as follows:
|
| 202 |
+
\begin{align}
|
| 203 |
+
&w^{t+1}=w^{t}-\eta_t(g(w^t)+ h(w^t)).
|
| 204 |
+
\end{align}
|
| 205 |
+
Please note that the computation overhead of $h(w_i)$ is high, moreover, we observed that the values of the negative basis paths are relatively stable in the optimization, thus we set $h(w_{i})$ to be zero for ease of the computation. Specifically, basis-path regularization can be easily combined with the optimization algorithm which is in quotient space.
|
| 206 |
+
|
| 207 |
+
The flow of SGD with basis-path regularization is shown in Algorithm 1, it's trivial to extend basis-path regularization to other stochastic optimization algorithms. Comparing to weight decay, basis-path regularization has little additional computation overhead. All the additional computations regarding Ineq.(\ref{eqn:18}) only introduce very lightweight element-wise matrix operations, which is small compared with the forward and backward process.
|
| 208 |
+
|
| 209 |
+
\begin{figure*}[ht]
|
| 210 |
+
\centering
|
| 211 |
+
\includegraphics[width=1.0\textwidth]{movielens.pdf}
|
| 212 |
+
\caption{Performance of HR and NDCG w.r.t. the number of predictive factors and Top-K items recommendation.}\label{fig:movielens}
|
| 213 |
+
\end{figure*}
|
| 214 |
+
\section{Experimental Results}
|
| 215 |
+
In this section, we evaluate Basis-path Regularization on deep ReLU neural networks with the aim of verifying that does our proposed BP regularization outperforms other baseline regularization methods and whether it can improve the generalization on the benchmark datasets. For sake of fairness, we reported the \textit{mean} of 5 independent runs with random initialization.
|
| 216 |
+
\subsection{Recommendation System}
|
| 217 |
+
We first apply our basis-path regularization method to recommendation task with MLP networks and conduct experimental studies based on a public dataset, MovieLens\footnote{https://grouplens.org/datasets/movielens/1m/}. The characteristics of the MovieLens dataset are summarized in Table \ref{tab:movielens}. We use the version containing one million ratings, where each user has at least 20 ratings. We train an NCF framework with similar MLP network proposed in \cite{he2017neural} and followed their training strategies with Adam optimizer but without any pre-training. We test the \textit{predictive factors} of [8,16,32,64], and set the number of hidden units to the embedding size $\times 4$ in each hidden layer. We calculate both metrics for each test user and report the average score. For each method, we perform a wide range grid search of hyper-parameter $\lambda$ from $10^{-\alpha}$ where $\alpha \in {5,6,7,8,9}$ and report the experimental results based on the best performance on the validation set. The performance of a ranked list is judged by \textit{Hit Ratio} (HR) and \textit{Normalized Discounted Cumulative Gain} (NDCG) \cite{he2015trirank}.
|
| 218 |
+
|
| 219 |
+
\begin{table}[ht]
|
| 220 |
+
\vspace{-0.5em}
|
| 221 |
+
\renewcommand\arraystretch{1.1}
|
| 222 |
+
\setlength{\tabcolsep}{4pt}
|
| 223 |
+
\caption{Statistics of the MovieLens datasets.}
|
| 224 |
+
\begin{center}
|
| 225 |
+
\small
|
| 226 |
+
\begin{tabular}{|c|c|c|c|c|}
|
| 227 |
+
\hline
|
| 228 |
+
\textbf{Dataset} & \textbf{Interaction\#} & \textbf{Item\#} & \textbf{User\#} & \textbf{Sparsity} \\
|
| 229 |
+
\hline
|
| 230 |
+
MovieLens & 1,000,209 & 3,706 & 6,040 & 95.53\%\\
|
| 231 |
+
\hline
|
| 232 |
+
\end{tabular}
|
| 233 |
+
\end{center}
|
| 234 |
+
\label{tab:movielens}
|
| 235 |
+
\end{table}
|
| 236 |
+
|
| 237 |
+
Figure \ref{fig:movielens} (a) and (b) show the performance of HR@10 and NDCG@10 w.r.t. the number of predictive factors. From this figure, it's clear to see that basis-path regularization achieve better generalization performance than all baseline methods. Figure \ref{fig:movielens} (c) and (d) show the performance of Top-K recommended lists where the ranking position K ranges from 1 to 10. As can be seen, the basis-path regularization demonstrates consistent improvement over other methods across positions, which is consistent with our analysis of generalization error bound in the previous section.
|
| 238 |
+
\subsection{Image Classification}
|
| 239 |
+
In this section, we apply our basis-path regularization to this task and conduct experimental studies based on CIFAR-10 \cite{cifar10}, with 10 classes of images. We employ a popular deep convolutional ReLU model, ResNet \cite{resnet} for image classification since it achieves huge successes in many image related tasks. In addition, we conduct our studies on a stacked deep CNN described in \cite{resnet} (refer to PlainNet), which suffers serious dependency among the paths. We train 34 layers ResNet and PlainNet networks on this dataset, and use SGD with widely used $l_2$ weight decay regularization (WD) as our baseline. In addition, we implement Q-SGD, which is proposed in \cite{ecsgd} and optimize the networks on basis paths. We investigate the combination of SGD/Q-SGD and basis-path regularization (BPR). Similar with the previous task, we perform a wide range grid search of $\lambda$ from $\{0.1,0.2,0.5\} \times 10^{-\alpha}$, where $\alpha \in \{3,4,5,6\}$. More training details can be found in supplementary materials.
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
\begin{table}[ht]
|
| 243 |
+
\renewcommand\arraystretch{1.1}
|
| 244 |
+
\setlength{\tabcolsep}{4pt}
|
| 245 |
+
\caption{Classification error rate (\%) on image classification task. Baseline is from \cite{resnet}, and the number of $\dagger$ is 7.51 reported in the original paper. Fig.~\ref{fig:plainresnet} shows the training procedures.}
|
| 246 |
+
\begin{center}
|
| 247 |
+
\small
|
| 248 |
+
\begin{tabular}{|c|c|c|c|c|c|c|}
|
| 249 |
+
|
| 250 |
+
\hline
|
| 251 |
+
\multirow{2}*{Algorithm} & \multicolumn{3}{c|}{PlainNet34} & \multicolumn{3}{c|}{ResNet34} \\ \cline{2-7}
|
| 252 |
+
& Train & Test & $\Delta$ &Train & Test & $\Delta$ \\
|
| 253 |
+
\hline
|
| 254 |
+
|
| 255 |
+
SGD & 0.06 & 7.76&7.70&0.01&7.13&7.12\\
|
| 256 |
+
SGD + WD & 0.06 & 6.34 &6.27&0.01&5.71$^\dagger$&5.70\\
|
| 257 |
+
SGD + BPR & 0.06 & \textbf{5.99} &\textbf{5.92}&0.01&\textbf{5.62}&\textbf{5.61}\\
|
| 258 |
+
\hline
|
| 259 |
+
Q-SGD & 0.03 & 7.00 &6.97&0.01&6.66&6.65\\
|
| 260 |
+
Q-SGD + BPR & 0.05 & \textbf{5.73} &\textbf{5.68}&0.03&\textbf{5.36}&\textbf{5.33}\\
|
| 261 |
+
\hline
|
| 262 |
+
\end{tabular}
|
| 263 |
+
\end{center}
|
| 264 |
+
\vspace{-0.em}
|
| 265 |
+
\label{tab:cifar10}
|
| 266 |
+
\end{table}
|
| 267 |
+
|
| 268 |
+
|
| 269 |
+
Table \ref{tab:cifar10} shows the training and test results of each algorithms. From the figure and table, we can see that our basis-path regularization indeed improves test accuracy of PlainNet34 and Resnet34 by nearly 1.8\% and 1.5\% respectively. Moreover, the training behaviors of SGD with weight decay and basis-path regularization are quite similar, but the basis-path regularization can always find better generalization points during optimization, which is consistent with our theoretical analysis in the previous section. We further investigate the combination of Q-SGD and basis-path regularization. Q-SGD with basis-path regularization achieves the best test accuracy on both PlainNet and ResNet model, which indicates that taking BP norm as the regularization term to the loss function is helpful for optimization algorithms.
|
| 270 |
+
\section{Conclusion}
|
| 271 |
+
In this paper, we define Basis-path norm on the group of basis paths, and prove that the generalization error of ReLU neural networks can be upper bounded by a function of BP norm. We then design Basis-path regularization method, which shows clearly performance gain on generalization ability. For future work, we plan to test basis-path regularization on larger networks and datasets. Furthermore, we are also interested in applying basis-path regularization on networks with different architecture.
|
| 272 |
+
|
| 273 |
+
\bibliography{arxiv}
|
| 274 |
+
\bibliographystyle{aaai}
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
\newpage
|
| 278 |
+
\section*{Supplementary: Capacity Control of ReLU Neural Networks by Basis-path Norm}
|
| 279 |
+
This document contains supplementary theoretical materials and additional experimental details of the paper "Capacity Control of ReLU Neural Networks by Essential Path Norm".
|
| 280 |
+
\section{Skeleton Method to Construct Basis-Path}
|
| 281 |
+
We briefly review the construction of basis-paths. For an $L$-layer feedforward neural network with width $H$, skeleton methods \cite{ecsgd} construct basis paths following two steps:
|
| 282 |
+
|
| 283 |
+
(1) \textbf{Select skeleton weights:} The skeleton weights are the diagonal elements in weight matrix $w_l$, $l=1,\cdots,L-1$. For $w_0$, select elements $w_0(p_1 \mod d, p_1)$. For $w_L$, select elements $w_L(p_{L-1}, p_{L-1} \mod K)$. All the selected weights are called skeleton weights. Others are called non-skeleton weights.
|
| 284 |
+
|
| 285 |
+
(2) \textbf{Construct basis-paths:} The paths contains no more than one non-skeleton weights are basis-paths.
|
| 286 |
+
|
| 287 |
+
In \cite{ecsgd}, the authors also proved the following properties of basis-paths: each non-skeleton weight will only appear in one basis-path.
|
| 288 |
+
\section{Proof of Proposition 1}
|
| 289 |
+
\begin{proposition}\label{p1}
|
| 290 |
+
For any non-basis path $\tilde{p}$, $\tilde{p}=\prod_{i=1}^{m}p_i^{\alpha_i}\prod_{j=m+1}^{r}p_j^{\alpha_j}$, where $\alpha_i\leq 0, \alpha_j\geq 0$.
|
| 291 |
+
\end{proposition}
|
| 292 |
+
\textbf{Proof:} We prove this proposition by induction. For ease of reference, we use $M_{i}(j)$ to denote the operator $i\mod j$, i.e., $M_{i}(j)=i\mod j$ where $i,j\in \mathbb{Z}_+$.
|
| 293 |
+
|
| 294 |
+
(1) If $L=2$, hidden node $O_{i_1}^1$ ($i_1=1,\cdots,H$) has an ingoing skeleton weight $w_1(M_{i_1}(d),i_1)$ and an outgoing skeleton weight $w_2(i_1,M_{i_1}(K))$. Then for a non-skeleton path $p_{(i_0,i_1,i_2)}$ where $i_0\neq M_{i_1}(d)$ and $i_2\neq M_{i_1}(K))$, it can be calculated as
|
| 295 |
+
\begin{align}
|
| 296 |
+
&p_{(i_0,i_1,i_2)}\\
|
| 297 |
+
=&w_1(i_0,i_1)\cdot w_2(i_1,i_2)\\
|
| 298 |
+
=&\frac{w_1(i_0,i_1)w_2(i_1,M_{i_1}(K))\cdot w_1(M_{i_1}(d),i_1)w_2(i_1,i_2)}{w_1(M_{i_1}(d),i_1)\cdot w_2(i_1,M_{i_1}(K))}\\
|
| 299 |
+
=&\frac{p_{(i_0,i_1,M_{i_1}(K))}\cdot p_{(M_{i_1}(d),i_1,i_2)}}{p_{(M_{i_1}(d),i_1,M_{i_1}(K))}}.
|
| 300 |
+
\end{align}According to skeleton method, $p_{(i_0,i_1,M_{i_1}(K))}$, $p_{(M_{i_1}(d),i_1,i_2)}$, $p_{(M_{i_1}(d),i_1,M_{i_1}(K))}$ are all basis-paths. We can see that the basis-path such as $p_{(M_{i_1}(d),i_1,M_{i_1}(K))}$ which contains no non-skeleton weights is in the denominator. The basis-path which contains one skeleton weight such as $p_{(i_0,i_1,M_{i_1}(K))}$ and $p_{(M_{i_1}(d),i_1,i_2)}$ is in the numerator. An example is shown in Figure 1 in the main paper.
|
| 301 |
+
|
| 302 |
+
(2) If the proposition is satisfied for a $L-1$-layer FNN, i.e.,
|
| 303 |
+
$$p_{(i_0,\cdots,i_{L-1})}=\prod_{l=1}^{L-1}w_l(i_{l-1},i_l)=\frac{\prod_{l\leq L-1}p_l(w_{i_{l-1},i_l})}{\prod_j p_j},$$where $p_l(w_l(i_{l-1},i_l))$ is the basis-path which contains non-skeleton weight $w_l(i_{l-1},i_l)$ \footnote{If $w_l(i_{l-1},i_l)$ is a non-skeleton weight. Otherwise, it will not appear in the numerator.} and $p_j$ denotes a basis-path which only contains skeleton weights.
|
| 304 |
+
|
| 305 |
+
Then for a $L$-layer FNN, a non-basis path can be calculated as
|
| 306 |
+
\begin{align*}
|
| 307 |
+
&p_{(i_0,\cdots,i_{L-1},i_L)}\\=&\prod_{l=1}^{L}w_l(i_{l-1},i_l)\\
|
| 308 |
+
=&w_{L}(i_{L-1},i_L)\cdot\frac{\prod_{l\leq L-1}p_l(w_l(i_{l-1},i_l))\cdot w_L(w_l(i_{l-1},i_l))}{\prod_j p_j\cdot \prod_l w_L(w_l(i_{l-1},i_l))}\\
|
| 309 |
+
=&\frac{p_L(w_{L}(i_{L-1},i_L))}{\prod_{l=1}^{L-1}w_l(w_L(i_{L-1},i_L))}\cdot\frac{\prod_{l\leq L-1}p_l(w_l(i_{l-1},i_l))}{\prod_j p_j\cdot \prod_{l\leq L-1} w_L(w_l(i_{l-1},i_l))}\\
|
| 310 |
+
=&\frac{\prod_{l\leq L}p_l(w_l(i_{l-1},i_l))}{\prod_j \tilde p_j},
|
| 311 |
+
\end{align*}where $w_L(w_l(i_{l-1},i_l))$ is the skeleton weight at layer $L$ which connects the basis-path that contains $w_l(i_{l-1},i_l)$, and $w_l(w_L(i_{L-1},i_L))$ denotes the skeleton weight at layer $l$ that connects the weight $w_L(i_{L-1},i_L)$. Because $w_l(w_L(i_{L-1},i_L))$ are all skeleton weights, $\prod_{l=1}^{L-1}w_l(w_L(i_{L-1},i_L))$ is the value of a basis-path in a $L-1$ layer FNN. The establishing of the above equality also uses the fact that $p_l(w_l(i_{l-1},i_l))\cdot w_L(w_l(i_{l-1},i_l))$ is a basis-path for a L-layer FNN because it contains only one non-skeleton weight $w_l(i_{l-1},i_l)$. Combining $\prod_{l=1}^{L-1}w_l(w_L(i_{L-1},i_L))\cdot\prod_j p_j\cdot \prod_l w_L(w_l(i_{l-1},i_l))$ together, we can get that the denominator $\tilde p_j$ is a basis-path which contains only skeleton weight.
|
| 312 |
+
|
| 313 |
+
Therefore, we prove that basis-path which contains one non-skeleton weight will only appear in the numerator and basis-path which only contains skeleton weights will only appear in the denominator in the calculation of the non-basis paths.
|
| 314 |
+
|
| 315 |
+
\begin{figure*}[htbp]
|
| 316 |
+
\centering
|
| 317 |
+
\includegraphics[width=1.0\textwidth]{plainresnet_lambda.pdf}
|
| 318 |
+
\caption{Training loss and test accuracy of ResNet34 models w.r.t. number of effective passes on CIFAR-10.}\label{fig:plainresnet_labmda}
|
| 319 |
+
\end{figure*}
|
| 320 |
+
\section{Experiments - additional material}
|
| 321 |
+
All experiments were conducted with \emph{Pytorch} commit 2b47480. The ResNet implementation can be found in (\emph{https://github.com/pytorch/vision/}). Unless noted the initialization method was used by sampling values from a uniform distribution with range $[-a,a]$, where $a=\frac{1}{\sqrt{h_{l-1}}}$, $h_{l-1}$ is the dimension of previous layer, which is the default initialization method for linear layers and convolutional layers in PyTorch.
|
| 322 |
+
\subsection{Experiment settings}
|
| 323 |
+
|
| 324 |
+
\subsubsection{Empirical Verification}
|
| 325 |
+
Multi-layer perceptrons with ReLU activation were trained by SGD in this experiments. The max iteration number is 500 epochs. The initial learning rate is set to 0.05 for each model. Exponential decay is a wildly used method when training neural network models\cite{hinton2012improving,ruder2016overview}, which is applied to the learning rate in this experiments with power 0.01. Mini-batch size with 128 was performed in this experiments.
|
| 326 |
+
\subsubsection{Recommendation System}
|
| 327 |
+
For the recommendation system experiments, to evaluate the performance of item recommendation, we employed the \emph{leave-one-out} evaluation, which has been widely used in literatures \cite{bayer2017generic,he2017neural}. For each user, we held-out the latest interaction as the test set and utilized the remaining data for training. We followed the common strategy that randomly samples 100 items that are not interacted by the user, ranking the test item among the 100 items.
|
| 328 |
+
\subsubsection{Image Classification}
|
| 329 |
+
For the image classification experiment, we use the original RGB image of CIFAR-10 dataset with size 3 $\times$ 32 $\times$ 32. As before, we re-scale each pixel value to the interval [0, 1]. We then extract random crops (and their horizontal flips) of size 3 $\times$ 28 $\times$ 28 pixels and present these to the network in mini-batches of size 128. The training and test loss and the test error are only computed from the center patch (3 $\times$ 28 $\times$ 28).
|
| 330 |
+
|
| 331 |
+
We trained 34 layers ResNet and PlainNet models (refer to resnet34 and plain34 in the original paper respectively) on this dataset. We performed training for 64k iterations, with a mini-batch size of 128, and an initial learning rate of 1.0 which was divided by 10 at 32k and 48k iterations following the practice in the original paper.
|
| 332 |
+
\subsection{Experimental Results on the Influence of $\lambda$}
|
| 333 |
+
As for different model and norm, the $\lambda$ should be selected carefully. As described in image classification task section in the main paper, we performed a wide range of grid search for each norm from $\{0.1,0.2,0.5\} \times 10^{-\alpha}$, where $\alpha \in \{3,4,5,6\}$, and reported the best performance based on the validation set. In this section, we show how $\lambda$ affect our basis-path regularization. The results are given in Figure \ref{fig:plainresnet_labmda}. Each result is reported by 5 independent runs with random initialization. Please note that too large value of $\lambda$ ($\lambda > 1e-3$ in this setting) will lead to diverge, meanwhile too small will make the regularization influence nearly disappear. A proper $\lambda$ will lead to significant better accuracy.
|
1809.07260v2.txt
ADDED
|
@@ -0,0 +1,745 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Functional optimisation arises when a time-varying system requires
|
| 3 |
+
optimal control variable values to change with time. As an example
|
| 4 |
+
consider optimising the learning rate schedule while training a neural
|
| 5 |
+
network. The learning rate schedule can be expressed as a function
|
| 6 |
+
of time and often there is a about the shape of this function; traditionally,
|
| 7 |
+
it is a decreasing function. Consider also recirculation processes,
|
| 8 |
+
common in industries like drug production or plastic recycling. Recirculation
|
| 9 |
+
involves the reintroduction of partially formed output product into
|
| 10 |
+
the input of the system until target output is reached. Recirculation
|
| 11 |
+
might require adjusting of input parameters as a function of time
|
| 12 |
+
to keep the system optimal throughout. Often, industrial knowledge
|
| 13 |
+
exists about the trend of this adjustment.
|
| 14 |
+
|
| 15 |
+
We propose a Bayesian functional optimisation algorithm for expensive
|
| 16 |
+
processes that offers two main capabilities: a) allows detection of
|
| 17 |
+
underspecification of complexity of the functional search space and
|
| 18 |
+
adjusting for it in a dynamic fashion, and b) admits loose prior information
|
| 19 |
+
on the shape of the function.
|
| 20 |
+
|
| 21 |
+
The closest work is that of \cite{vien2018bayesian}, where functions
|
| 22 |
+
are represented in a functional RKHS, captured through functional
|
| 23 |
+
kernels. Based on that a Gaussian process is constructed and subsequently,
|
| 24 |
+
Bayesian optimisation is performed. However, their method does not
|
| 25 |
+
allow incorporating prior information or for adjustment of function
|
| 26 |
+
complexity mid-optimisation.
|
| 27 |
+
|
| 28 |
+
Our solution is primarily based on representing the control function
|
| 29 |
+
on Bernstein polynomial basis \cite{bernstein1912demonstration} and
|
| 30 |
+
then optimising on the coefficient space. Bernstein polynomials basis
|
| 31 |
+
follows the Stone-Weierstrass approximation theorem i.e. any function
|
| 32 |
+
on a bounded subspace when represented on this basis system can be
|
| 33 |
+
point-wise approximated to an arbitrary precision. Whilst the theorem
|
| 34 |
+
is true for any polynomial basis system, Bernstein basis offers many
|
| 35 |
+
unique properties, some of which are critical for achieving our goals.
|
| 36 |
+
Once the control functions are represented on a Bernstein basis with
|
| 37 |
+
a suitable order we can directly use the coefficient vector as the
|
| 38 |
+
input subspace for the global optimisation of a function which maps
|
| 39 |
+
the coefficient vector to the outcome of the system.
|
| 40 |
+
|
| 41 |
+
Bernstein polynomials have been a popular choice in the field of aerospace
|
| 42 |
+
for the optimisation of aerofoil geometry. For example, it has been
|
| 43 |
+
used in \cite{kulfan2006fundamental} to convert a shape optimisation
|
| 44 |
+
problem into a function optimisation problem. Often Computational
|
| 45 |
+
Fluid Dynamic (CFD) tools are used in to optimise such geometries
|
| 46 |
+
\cite{samareh2001survey}. However, these methods are not designed
|
| 47 |
+
to be sample-efficient, and hence, not feasible for expensive optimisation
|
| 48 |
+
tasks. The proposed Bayesian functional optimisation algorithm addresses
|
| 49 |
+
the optimisation of expensive experimental processes, two of which
|
| 50 |
+
we present in this paper (physical recirculation systems, and optimisation
|
| 51 |
+
of learning rate schedule for a large neural network model being trained
|
| 52 |
+
on a large dataset).
|
| 53 |
+
|
| 54 |
+
Mathematically, if {\small{}$g(t)$} is the control function that
|
| 55 |
+
drives the system output ($y$) by a functional {\small{}$h:g(t)\rightarrow y$}
|
| 56 |
+
where {\small{}$g\in B(R)$}, the space of all bounded real-valued
|
| 57 |
+
functions, then the original functional optimisation problem can be
|
| 58 |
+
written as: {\small{}
|
| 59 |
+
\[
|
| 60 |
+
g^{*}(t)=\text{argmax}_{g(t)\in B(R)}h(g(t))
|
| 61 |
+
\]
|
| 62 |
+
}When we convert {\small{}$g(t)$} onto the $n$th order Bernstein
|
| 63 |
+
polynomial as\emph{ }\emph{\small{}$g(t)=\sum_{v=0}^{n}\alpha_{v}b_{v,n}(t)$}\emph{,
|
| 64 |
+
}where $\boldsymbol{\alpha}=\{\alpha_{v}\}_{v=1}^{n}$are the Bernstein
|
| 65 |
+
coefficients and{\small{} $b_{v,n}(t)$ }are the base polynomials
|
| 66 |
+
(more in framework), the above optimisation problem can thus be reformulated
|
| 67 |
+
in a more familiar function optimisation problem as:{\small{}
|
| 68 |
+
\begin{align*}
|
| 69 |
+
\boldsymbol{\alpha}^{*} & =\text{argmax}_{\alpha\in\mathcal{A}}f(\boldsymbol{\alpha})
|
| 70 |
+
\end{align*}
|
| 71 |
+
}where {\small{}$f:\boldsymbol{\alpha}\rightarrow y$}. In addition
|
| 72 |
+
to a control function, we may also have some other control variables
|
| 73 |
+
({\small{}$\boldsymbol{u}$}) that need to be optimised. For example,
|
| 74 |
+
in the case of neural network hyper-parameter tuning, {\small{}$\boldsymbol{u}$}
|
| 75 |
+
may represent network size parameters, whilst {\small{}$\boldsymbol{\alpha}$}
|
| 76 |
+
represents the learning rate schedule. In such cases, our formulation
|
| 77 |
+
can be easily extended to{\small{} $\{\boldsymbol{\alpha}^{*},\boldsymbol{u^{*}}\}=\text{argmax}_{\alpha\in\mathcal{A},u\in\mathcal{U}}f(\boldsymbol{\alpha},\boldsymbol{u})$.
|
| 78 |
+
}Putting them together, we will henceforth indicate{\small{} $\boldsymbol{x}=\{\boldsymbol{\alpha},\boldsymbol{u}\}$,
|
| 79 |
+
}and{\small{} $\mathcal{X}=\mathcal{A}\cup\mathcal{U}$.}{\small\par}
|
| 80 |
+
|
| 81 |
+
\begin{figure}
|
| 82 |
+
\begin{centering}
|
| 83 |
+
\includegraphics[width=1\columnwidth]{derivativeLimit}
|
| 84 |
+
\par\end{centering}
|
| 85 |
+
\caption{{\small{}Intuition behind determining the whether the current order
|
| 86 |
+
of Bernstein suffices to capture the optimal function.\label{fig:derivative}}}
|
| 87 |
+
\end{figure}
|
| 88 |
+
|
| 89 |
+
Next, following the properties of derivative of function on Bernstein
|
| 90 |
+
basis, and using results from \cite{chang2007shape}, we show that
|
| 91 |
+
prior information on shapes such as monotonicity or unimodality can
|
| 92 |
+
be encoded by simply adding constraint functions on the values of
|
| 93 |
+
{\small{}$\boldsymbol{\alpha}$}. We further propose a principled
|
| 94 |
+
way to detect if the order of the polynomial is underspecified. The
|
| 95 |
+
intuition is as follows: Figure \ref{fig:derivative} shows three
|
| 96 |
+
functions at the top and their corresponding derivative at the bottom
|
| 97 |
+
panel with matching colour. Let us assume that the current function
|
| 98 |
+
we have with a 3rd order Bernstein polynomial is the red function.
|
| 99 |
+
The maximum derivative of the red function happens at $t=0$ and it
|
| 100 |
+
is around -2.8. The target function is depicted via the colour green
|
| 101 |
+
and its maximum derivative as seen from the bottom panel is -4 at
|
| 102 |
+
$t=0$. In the absolute sense the derivative magnitude is higher than
|
| 103 |
+
the current function that we have. However, we see that the derivative
|
| 104 |
+
limit of a 3rd order Bernstein polynomial (Blue function) is at -3,
|
| 105 |
+
which in the magnitude sense lower than the maximum derivative of
|
| 106 |
+
the target function (green). Thus the optimal function (green) cannot
|
| 107 |
+
be reached by a 3rd order Bernstein polynomial. The target function
|
| 108 |
+
can only be reached if the order is increased. An underspecification
|
| 109 |
+
of the order is thus detected if the derivative magnitude is close
|
| 110 |
+
to the theoretical maxima possible within the current order of the
|
| 111 |
+
polynomial basis based on the ranges over \foreignlanguage{english}{$\boldsymbol{\alpha}$}.
|
| 112 |
+
When an underspecification is detected, we increment the order of
|
| 113 |
+
the Bernstein basis. We derive a key theorem to compute the maximum
|
| 114 |
+
of the derivative for a function realised using Bernstein polynomial
|
| 115 |
+
basis of fixed order. Next, using the existing results of order elevation
|
| 116 |
+
for Bernstein basis, we show how to reuse observation obtained using
|
| 117 |
+
lower order basis for the new higher order basis. In some cases, it
|
| 118 |
+
may not be possible to detect order underspecification via derivative
|
| 119 |
+
checking (if the function has more number of modes than can be modelled
|
| 120 |
+
by the current order of the polynomial), and hence, we also increment
|
| 121 |
+
order at a fixed interval up to a maximum specified order. In all
|
| 122 |
+
time, we use all the observations using order elevation technique.
|
| 123 |
+
Convergence is guaranteed as long as the function is realisable within
|
| 124 |
+
the maximum order specified.
|
| 125 |
+
|
| 126 |
+
\begin{figure}
|
| 127 |
+
\begin{centering}
|
| 128 |
+
\includegraphics[width=1\columnwidth]{Recirculation2}
|
| 129 |
+
\par\end{centering}
|
| 130 |
+
\caption{{\small{}Short polymer fibre production using recirculation.\label{fig:Recirculation}}}
|
| 131 |
+
\end{figure}
|
| 132 |
+
|
| 133 |
+
We apply our algorithm to two problems: the design and production
|
| 134 |
+
of concentrated short polymer fibre solution using recirculation and
|
| 135 |
+
learning rate schedule optimisation for neural network training. Interesting
|
| 136 |
+
new materials like short polymer fibres can impart exotic properties
|
| 137 |
+
to natural fabrics \cite{feng2003creation,ma2008review}. Production
|
| 138 |
+
involves injecting a liquid polymer into a high speed butanol flow
|
| 139 |
+
through a specially designed apparatus (Figure \ref{fig:Recirculation}).
|
| 140 |
+
This turns the liquid polymer into short nano-scale fibres. The control
|
| 141 |
+
variables include the apparatus geometry and flow rates which in turn
|
| 142 |
+
determine the produced fibre quality. To increase the fibre concentration
|
| 143 |
+
in the mixture produced, the same mixture (butanol+fibre) is recirculated
|
| 144 |
+
through the apparatus, keeping the polymer flow uninterrupted. Since
|
| 145 |
+
the recirculation process introduces dynamics in the constituents
|
| 146 |
+
of the mixture, one may need to change the control variables to keep
|
| 147 |
+
them optimal throughout this dynamic process. We apply our algorithm
|
| 148 |
+
in maximising the quality of fibre yield for the already mentioned
|
| 149 |
+
short polymer fibre production process. During recirculation we only
|
| 150 |
+
change the butanol flow rate as a function of time, as others are
|
| 151 |
+
not easy to change dynamically in the used setup. We used the experimenter's
|
| 152 |
+
hunch that an increasing flow rate will result in the highest quality
|
| 153 |
+
fibre. In our experiments we found two profiles, one which is nearly
|
| 154 |
+
constant, and the other which is increasing that both result in the
|
| 155 |
+
highest quality possible, loosely validating the experimenter's hunch.
|
| 156 |
+
|
| 157 |
+
In neural network training, the learning rate schedule can be modelled
|
| 158 |
+
either as a long vector or as a function of epochs \cite{bengio2012practical}.
|
| 159 |
+
The latter is attractive as the smoothness in the consecutive learning
|
| 160 |
+
rate values implies smaller effective design space when considered
|
| 161 |
+
as a function than with a full blown vector of the corresponding schedule.
|
| 162 |
+
We apply our algorithm for learning rate schedule optimisation and
|
| 163 |
+
found that an optimised learning rate schedule can even make SGD to
|
| 164 |
+
perform better than both the method proposed by \cite{vien2018bayesian}
|
| 165 |
+
and a state of the art optimiser with automatic scheduling like Adam.
|
| 166 |
+
\section{Bayesian optimisation}
|
| 167 |
+
Bayesian optimisation is a global optimisation method for expensive
|
| 168 |
+
black-box function \cite{jones1998efficient,mockus1994application}.
|
| 169 |
+
The optimisation problem:
|
| 170 |
+
\begin{center}
|
| 171 |
+
$\boldsymbol{x}^{*}=\text{argmax}_{\boldsymbol{x}\in\mathcal{X}}f(\boldsymbol{x})$
|
| 172 |
+
\par\end{center}
|
| 173 |
+
|
| 174 |
+
\noindent The function is usually modelled using a \emph{Gaussian
|
| 175 |
+
Process }\cite{rasmussen2006gaussian} as the prior \emph{i.e.}{\small{}
|
| 176 |
+
\begin{eqnarray*}
|
| 177 |
+
f(\boldsymbol{x}) & \sim & \mathcal{GP}(m(\boldsymbol{x}),k(\boldsymbol{x},\boldsymbol{x}')).
|
| 178 |
+
\end{eqnarray*}
|
| 179 |
+
}where{\small{} $m(\boldsymbol{x})$} and {\small{}$k(\boldsymbol{x},\boldsymbol{x}')$
|
| 180 |
+
}are the mean and the covariance function of the Gaussian process
|
| 181 |
+
\cite{Brochu_Cora_Freitas_2010Tutorial}. Mean function {\small{}$m(\boldsymbol{x})$}
|
| 182 |
+
can be assumed to be a zero function without any loss of generalisation.
|
| 183 |
+
Popular covariance functions include squared exponential (SE) kernel,
|
| 184 |
+
Mat\'ern kernel etc. The predictive mean and variance of the Gaussian
|
| 185 |
+
process is a Gaussian distribution, whose encapsulates epistemic uncertainty.
|
| 186 |
+
Using an observation model of{\small{} $y=f(\boldsymbol{x})+\epsilon$},
|
| 187 |
+
where {\small{}$\epsilon\sim\mathcal{N}(0,\sigma_{noise}^{2})$},
|
| 188 |
+
and denoting {\small{}$\mathcal{D}=\{\boldsymbol{x}_{i},y_{i}\}_{i=1}^{t}$}
|
| 189 |
+
one can derive the predictive distribution as:
|
| 190 |
+
\begin{center}
|
| 191 |
+
$P(f_{t+1}\given\mathcal{D}_{1:t},\boldsymbol{x})=\mathcal{N}(\mu_{t+1}(\boldsymbol{x}),\sigma_{t+1}^{2}(\boldsymbol{x}))$
|
| 192 |
+
\par\end{center}
|
| 193 |
+
|
| 194 |
+
\noindent where,{\small{} $\boldsymbol{k}=[k(\boldsymbol{x},\boldsymbol{x}_{1}),\ldots,k(\boldsymbol{x},\boldsymbol{x}_{t})]$},
|
| 195 |
+
the kernel matrix{\small{} $[K_{ij}]=k(\boldsymbol{x}_{i},\boldsymbol{x}_{j})\forall i,j\in{1,\ldots,t}$,
|
| 196 |
+
}and
|
| 197 |
+
\begin{center}
|
| 198 |
+
$\mu_{t+1}(\boldsymbol{x})=\boldsymbol{k}^{T}[K+\sigma_{noise}^{2}I]^{-1}y_{1:t}$
|
| 199 |
+
\qquad{}\qquad{}$\sigma_{t+1}(\boldsymbol{x})=k(\boldsymbol{x},\boldsymbol{x})-\boldsymbol{k}^{T}[K+\sigma_{noise}^{2}I]^{-1}\boldsymbol{k}$
|
| 200 |
+
\par\end{center}
|
| 201 |
+
|
| 202 |
+
Next, a surrogate utility function called \emph{acquisition function
|
| 203 |
+
}is constructed to find the next sample to evaluate. It balances two
|
| 204 |
+
contrastive needs of sampling at the high mean location versus sampling
|
| 205 |
+
at the high uncertainty location so that the global optima for {\small{}$f(.)$}
|
| 206 |
+
is reached in a fewer number of samples. Acquisition functions are
|
| 207 |
+
either constructed based on improvement over the current best (e.g.
|
| 208 |
+
Probability of Improvement, Expected Improvement \cite{kushner1964new,mockus1978toward}),
|
| 209 |
+
or information based criteria (e.g. Entropy Search \cite{hennig2012entropy}.
|
| 210 |
+
Predictive Entropy Search \cite{hernandez2014predictive}), or confidence
|
| 211 |
+
based criteria (e.g. GP-UCB \cite{Srinivas_etal_2010Gaussian}). A
|
| 212 |
+
GP-UCB acquisition function for the {\small{}$(t+1)$} th iteration
|
| 213 |
+
is:
|
| 214 |
+
\begin{center}
|
| 215 |
+
$\text{a}_{t+1}(\boldsymbol{x})=\mu_{t}(\boldsymbol{x})+\sqrt{\beta_{t+1}}\sigma_{t}(\boldsymbol{x})$
|
| 216 |
+
\par\end{center}
|
| 217 |
+
|
| 218 |
+
where {\small{}$\beta_{t}$} is an increasing sequence of {\small{}$O(log\thinspace t)$}.
|
| 219 |
+
An example sequence can be {\small{}$\beta_{t}=2log(t^{d/2+2}\pi^{2}/3\delta)$}
|
| 220 |
+
where {\small{}$d$} represents the dimensionality of the data and
|
| 221 |
+
{\small{}$1-\delta$} is the probability of convergence. A regret
|
| 222 |
+
$r_{t}$ is defined as the difference of the {\small{}$t$}'th function
|
| 223 |
+
evaluation and the global maxima, i.e. {\small{}$r_{t}=max_{\boldsymbol{x}\in\mathcal{X}}f(\boldsymbol{x})-f(\boldsymbol{x}_{t})$},
|
| 224 |
+
and the cumulative regret is defined as {\small{}$R_{t}=\sum_{t'=1}^{t}r_{t'}$}.
|
| 225 |
+
It can be shown that when Gaussian process is used with SE kernel
|
| 226 |
+
then {\small{}$R_{t}\sim O(\sqrt{t(log\thinspace t)^{d+1}})$}, \emph{i.e}.
|
| 227 |
+
it only grows sublinearly and{\small{} $Lim_{t\rightarrow\infty}R_{t}/t\rightarrow0$},
|
| 228 |
+
implying a `no regret' algorithm. A generic Bayesian optimisation
|
| 229 |
+
is a sequential algorithm with one recommendation per iteration. However,
|
| 230 |
+
when at each iteration it is convenient to perform a batch of recommendation.
|
| 231 |
+
it can be altered to produce a batch of recommendations at each iteration.
|
| 232 |
+
Some of the popular batch Bayesian optimisation algorithms with theoretical
|
| 233 |
+
guarantee include BUCB \cite{desautels2014parallelizing}, and GP-UCB-PE
|
| 234 |
+
\cite{contal_2013parallel}.
|
| 235 |
+
\section{Proposed framework\label{sec:framework}}
|
| 236 |
+
As previously mentioned, we model the control function $g(t)$ using
|
| 237 |
+
the Bernstein polynomial basis. Instead of optimising the function
|
| 238 |
+
$g(t)$ directly, we optimise its Bernstein coefficients $\{\alpha_{v}\}_{v=1:n}$.
|
| 239 |
+
In this manner, we are able to convert our functional optimisation
|
| 240 |
+
problem into a vector optimisation problem. In this section, first
|
| 241 |
+
we present how the optimum control function can be found in the presence
|
| 242 |
+
of basic shape information. We also discuss how the order of the polynomial
|
| 243 |
+
can be adjusted based on the complexity of the control function being
|
| 244 |
+
optimised.
|
| 245 |
+
\subsection{{\normalsize{}Bernstein polynomial representation with shape constraints}}
|
| 246 |
+
An $n^{th}$ order Bernstein polynomial as a linear combination of
|
| 247 |
+
its basis polynomials is represented as
|
| 248 |
+
|
| 249 |
+
\qquad{}\qquad{}\qquad{}$g_{n}(t)=\sum_{v=0}^{n}\alpha_{v}b_{v,n}(t)$\hfill{}(1)
|
| 250 |
+
|
| 251 |
+
\noindent where $b_{v,n}(t)=\binom{n}{v}t^{v}(1-t)^{n-v}$ are the
|
| 252 |
+
Bernstein basis polynomials for order $n$ defined on $[0,1]$ and
|
| 253 |
+
$\binom{n}{v}$ is the binomial coefficient, and $\alpha_{v}$ are
|
| 254 |
+
the Bernstein coefficients. In other words, the Bernstein polynomial
|
| 255 |
+
is the weighted sum of the basis polynomials. We first present a lemma
|
| 256 |
+
that guarantees universality of Bernstein polynomial basis.
|
| 257 |
+
|
| 258 |
+
\textbf{Lemma 1 }\cite{bernstein1912demonstration}\textbf{.}\textbf{\emph{
|
| 259 |
+
}}\emph{Any continuous function $f$ defined on the closed interval
|
| 260 |
+
$[0,1]$ can be uniformly approximated by a Bernstein polynomial function
|
| 261 |
+
$B_{n}(f)$. Let $B_{n}(f)(t)=\sum_{v=0}^{n}f\left(\frac{v}{n}\right)b_{v,n}(t)$.
|
| 262 |
+
then as $n\to\infty$, $B_{n}(f)$ converges to the function $f$,
|
| 263 |
+
i.e.} $lim_{n\to\infty}B_{n}(f)=f$. \hfill{}$\oblong$
|
| 264 |
+
|
| 265 |
+
Next, we present lemmas to control the shape of the function. Our
|
| 266 |
+
interest lies in the elegant relationship between the Bernstein coefficients
|
| 267 |
+
$\{\alpha_{v}\}_{v=0}^{n}$ and the shape of the Bernstein polynomial.
|
| 268 |
+
In Theorem 1 and 2, we will elaborate on the details of this relationship
|
| 269 |
+
for the monotonic function and the unimodal function case. The following
|
| 270 |
+
Lemma leads us towards the statements in these theorems.
|
| 271 |
+
|
| 272 |
+
\textbf{Lemma 2. }\emph{For a Bernstein polynomial $g_{n}(t)=\sum_{b=0}^{n}\alpha_{v}b_{v,n}(t)$,
|
| 273 |
+
the derivative of the polynomial is given by $g_{n}^{'}(t)=n\sum_{v=0}^{n-1}\left(\alpha_{v+1}-\alpha_{v}\right)b_{v,n-1}(t)$.
|
| 274 |
+
In other words the derivative of the $n$th order Bernstein polynomial
|
| 275 |
+
can be expressed through a linear combination of Bernstein base polynomials
|
| 276 |
+
up to order $(n-1)$.} (Please refer to supplementary material detailed
|
| 277 |
+
proof)\hfill{}$\oblong$
|
| 278 |
+
|
| 279 |
+
\textbf{Theorem 1. }(Monotonicity)\cite{chang2007shape}\textbf{:}\emph{
|
| 280 |
+
If $\alpha_{v+1}\geq\alpha_{v}$, then $g_{n}(t)$ is a monotonically
|
| 281 |
+
increasing function. Similarly if $\alpha_{v+1}\leq\alpha_{v}$, then
|
| 282 |
+
$g_{n}(t)$ is a monotonically decreasing function. }
|
| 283 |
+
|
| 284 |
+
\emph{Proof:}\textbf{\emph{ }}From Lemma 2, consider the derivative
|
| 285 |
+
of the Bernstein polynomial \emph{$g_{n}^{'}(t)=n\sum_{v=0}^{n-1}\left(\alpha_{v+1}-\alpha_{v}\right)b_{v,n-1}(t)$.}
|
| 286 |
+
Here, the base polynomials $\left\{ b_{v,n-1}(t)\right\} _{v=0}^{n-1}$
|
| 287 |
+
are always positive by definition. Therefore, if the difference $\left(\alpha_{v+1}-\alpha_{v}\right)$
|
| 288 |
+
is kept positive, the derivative $g_{n}^{'}(t)$ remains positive
|
| 289 |
+
implying \emph{$g_{n}(t)$} to be a monotonically increasing function.
|
| 290 |
+
Similar argument can be made for $g_{n}(x)$ to be a monotonically
|
| 291 |
+
decreasing function provided $\alpha_{v+1}<\alpha_{v}$. \hfill{}$\oblong$
|
| 292 |
+
|
| 293 |
+
\textbf{Theorem 2} (Unimodality)\cite{chang2007shape}\textbf{:}\textbf{\emph{
|
| 294 |
+
}}\emph{For $n\geq3$. If $\alpha_{0}=\alpha_{1}=...=\alpha_{l_{1}}<\alpha_{l_{1}+1}\leq\alpha_{l_{1}+2}\leq...\leq\alpha_{l_{2}}$
|
| 295 |
+
and $\alpha_{l_{2}}\geq\alpha_{l_{2}+1}\geq...\geq\alpha_{l_{3}}>\alpha_{l_{3}+1}=...=\alpha_{n}$
|
| 296 |
+
for some $0\leq l_{1}<l_{2}\leq l_{3}\leq n$, then there exists some
|
| 297 |
+
$s\in(0,\tau)]$ such that $s$ is the unique maximum point of $g_{n}(t)$
|
| 298 |
+
and $g_{n}(t)$ is strictly increasing on $[0,s]$ and it is strictly
|
| 299 |
+
decreasing on $[s,\tau].$}
|
| 300 |
+
|
| 301 |
+
\emph{Proof:}\textbf{\emph{ }}Please refer to \cite{chang2007shape}
|
| 302 |
+
for proof. The proof also uses Lemma 2 as a key ingredient. \hfill{}$\oblong$
|
| 303 |
+
|
| 304 |
+
These theorems are used to formulate constraints in the next subsection.
|
| 305 |
+
Chang et al. \cite{chang2007shape} have also provided theory for
|
| 306 |
+
the cases other than unimodal concave. Our framework can be extended
|
| 307 |
+
to all such cases where such a relationship between the coefficients
|
| 308 |
+
and the shape of the polynomial has been established.\emph{ }Often
|
| 309 |
+
the prior information about the trend is available from the domain
|
| 310 |
+
experts. Specifically, in the design of short polymer fibre, it is
|
| 311 |
+
known that as the fibre recirculates they get shorter. Hence, to get
|
| 312 |
+
more narrow size distribution we need to produce longer fibre initially,
|
| 313 |
+
with gradual reduction in length. This would require butanol flow
|
| 314 |
+
to increase monotoically with time. Similarly, for deep learning learning
|
| 315 |
+
schedule tuning we also use monotonically decreasing constraint. However,
|
| 316 |
+
our method can be applied to applications where the function is either
|
| 317 |
+
unimodal or even when there is no prior information available about
|
| 318 |
+
the shape of the control function.
|
| 319 |
+
|
| 320 |
+
For illustration, let us consider the functions that are represented
|
| 321 |
+
via third order Bernstein polynomial basis. The base polynomials in
|
| 322 |
+
this case are $b_{0,3}(t)=(1-t)^{3}$, $b_{1,3}(t)=3t(1-t)^{2}$,
|
| 323 |
+
$b(t)=3t^{2}(1-t),$ and $b_{3,3}(t)=t^{3}$. Fig \ref{fig:Bpoly}
|
| 324 |
+
shows the sample functions from functions with only range constraint,
|
| 325 |
+
as well as functions with monotonicty constraint and unimodality constraint.
|
| 326 |
+
|
| 327 |
+
\begin{figure}
|
| 328 |
+
\begin{centering}
|
| 329 |
+
\subfloat[Bernstein base polynomials for the third order Bernstein polynomial.]{\centering{}\includegraphics[width=1\columnwidth]{base_NIPS}}
|
| 330 |
+
\par\end{centering}
|
| 331 |
+
\centering{}\subfloat[Examples of Bernstein polynomial $g_{3}(t)$ based on how alphas are
|
| 332 |
+
sampled.]{\begin{centering}
|
| 333 |
+
\includegraphics[width=1\columnwidth]{bernstein_poly}
|
| 334 |
+
\par\end{centering}
|
| 335 |
+
}\caption{{\small{}Examples of a third order Bernstein polynomial. \label{fig:Bpoly}}}
|
| 336 |
+
\end{figure}
|
| 337 |
+
|
| 338 |
+
\begin{algorithm*}
|
| 339 |
+
\textbf{\small{}Input: }{\small{}Observations $\mathcal{D}_{1:m}=\{\boldsymbol{x}_{i},y_{i}\}_{i=1}^{m}$,
|
| 340 |
+
where $y_{i}=f(g_{n}(t)\given\boldsymbol{x}_{i})+\varepsilon$ for
|
| 341 |
+
an $n$th order Bernstein polynomial, $\boldsymbol{x}_{i}=\{\boldsymbol{\alpha}_{i},\boldsymbol{u}_{i}\}$
|
| 342 |
+
for $\boldsymbol{\alpha}_{i}\in\mathbb{R}^{1\times n}$, Fixed increment
|
| 343 |
+
schedule $\omega$.}{\small\par}
|
| 344 |
+
|
| 345 |
+
\textbf{\small{}for $m=1:MaxIteration$ }{\small\par}
|
| 346 |
+
|
| 347 |
+
\begin{onehalfspace}{\small{}\qquad{}build $\mathcal{GP}$ on $\mathcal{D}_{1:m}$}{\small\par}
|
| 348 |
+
|
| 349 |
+
{\small{}\qquad{}sample $\boldsymbol{x}_{m+1}=\text{argmax}_{x\in\mathcal{X}}\text{a}\left(\boldsymbol{x}_{m}\given C,\mathcal{D}\right)$}{\small\par}
|
| 350 |
+
|
| 351 |
+
{\small{}\qquad{}evaluate $y_{m+1}=f(g_{n}(t)\given\boldsymbol{x}_{m+1})$
|
| 352 |
+
(see eq: (1))}{\small\par}
|
| 353 |
+
|
| 354 |
+
{\small{}\qquad{}obtain the current best sample $\{\boldsymbol{x}^{+},y^{+}\}$}{\small\par}
|
| 355 |
+
|
| 356 |
+
{\small{}\qquad{}compute the maximum difference $d$ between any
|
| 357 |
+
two coefficients in $\boldsymbol{\alpha}^{+}$}{\small\par}
|
| 358 |
+
|
| 359 |
+
{\small{}\qquad{}}\textbf{\small{}if}{\small{} $d>0.95$ or $m\%\omega=0$}{\small\par}
|
| 360 |
+
|
| 361 |
+
{\small{}\qquad{}\qquad{}update order $n=n+1$ and re-evaluate $\{\boldsymbol{\alpha}_{i}\}_{i=1}^{m}$
|
| 362 |
+
for $\boldsymbol{\alpha}_{i}\in\mathbb{R}^{1\times(n+1)}$}{\small\par}
|
| 363 |
+
|
| 364 |
+
{\small{}\qquad{}\qquad{}update observations $\mathcal{D}_{1:m}$}{\small\par}
|
| 365 |
+
|
| 366 |
+
{\small{}\qquad{}}\textbf{\small{}end if}{\small\par}
|
| 367 |
+
|
| 368 |
+
{\small{}\qquad{}augment the data $\mathcal{D}_{1:m+1}=\mathcal{D}_{1:m}\cup\left\{ \boldsymbol{x}_{m+1},y_{m+1}\right\} $}{\small\par}
|
| 369 |
+
\end{onehalfspace}
|
| 370 |
+
|
| 371 |
+
\textbf{\small{}end for }{\small\par}
|
| 372 |
+
|
| 373 |
+
{\small{}\caption{Framework for control function optimisation{\small{}. \label{alg:schedule_with_trend} }}
|
| 374 |
+
}{\small\par}
|
| 375 |
+
\end{algorithm*}
|
| 376 |
+
\subsection{{\normalsize{}Control function optimisation with shape constraints}}
|
| 377 |
+
We recall our optimisation problem as:
|
| 378 |
+
\begin{center}
|
| 379 |
+
$\boldsymbol{x}^{*}=\text{argmax}_{x\in\mathcal{X}}f(\boldsymbol{x})$
|
| 380 |
+
\par\end{center}
|
| 381 |
+
|
| 382 |
+
\noindent where $\boldsymbol{x}=\{\boldsymbol{\alpha},\boldsymbol{u}\}$,
|
| 383 |
+
$\mathcal{X}=\mathcal{A}\cup\mathcal{U}$, $\boldsymbol{\alpha}$
|
| 384 |
+
is the Bernstein coefficient vector and $\boldsymbol{u}$ are the
|
| 385 |
+
other fixed control variables. When prior information about the shape
|
| 386 |
+
of the control function is available, then it boils down to usual
|
| 387 |
+
constrained optimisation problem as:
|
| 388 |
+
\begin{center}
|
| 389 |
+
$\boldsymbol{x}^{*}=\text{argmax}_{x\in\mathcal{X}}f(\boldsymbol{x})$\qquad{}\qquad{}$s.t.$
|
| 390 |
+
$\mathbb{C}\geq0$
|
| 391 |
+
\par\end{center}
|
| 392 |
+
|
| 393 |
+
\noindent where $\mathbb{C}$ is a set of inequality constraints over
|
| 394 |
+
the parameter space. Such constraints can be easily enforced during
|
| 395 |
+
acquisition function optimisation. In the following we present the
|
| 396 |
+
$\mathbb{C}$ for monotonically increasing and decreasing control
|
| 397 |
+
functions, and unimodal control functions based on the Theorems
|
| 398 |
+
1 and 2:
|
| 399 |
+
|
| 400 |
+
\paragraph*{\emph{Controlling the range of the control function:}}
|
| 401 |
+
|
| 402 |
+
By choosing the values of $\alpha_{0:n}\in[0,1]$ the Bernstein polynomial
|
| 403 |
+
is limited to the range $[0,1]$ (this is possible due to Lemma 3,
|
| 404 |
+
which will be described in the next subsection). For any application,
|
| 405 |
+
optimised Bernstein polynomial can then be rescaled using the known
|
| 406 |
+
range of input function.
|
| 407 |
+
|
| 408 |
+
\paragraph*{\emph{Increasing control function:}}
|
| 409 |
+
|
| 410 |
+
$\mathbb{C}=\{C_{v}\}_{v=0}^{n-1}$ where $C_{v}=$$\alpha_{v+1}-\alpha_{v}$.
|
| 411 |
+
This is used in the design of recirculation control function in short
|
| 412 |
+
polymer fibre production experiment as presented in experiments.
|
| 413 |
+
|
| 414 |
+
\paragraph*{\emph{Decreasing control function:} }
|
| 415 |
+
|
| 416 |
+
$\mathbb{C}=\{C_{v}\}_{v=0}^{n-1}$ where $C_{v}=$$\alpha_{v}-\alpha_{v+1}$.
|
| 417 |
+
These constraints are used in modelling learning rate schedules for
|
| 418 |
+
deep neural network optimisers as presented in experiments.
|
| 419 |
+
|
| 420 |
+
\paragraph*{\emph{Unimodal control function:} }
|
| 421 |
+
|
| 422 |
+
For unimodal control function we chose simplified constraints adapted
|
| 423 |
+
from Theorem 2. For some $0<l<n$, we define the constraints as $\mathbb{C}=\{C_{v}\}_{v=0}^{n-1}$
|
| 424 |
+
where $C_{v}=$ $\alpha_{v+1}-\alpha_{v}$ $\forall v=0:l$ and $C_{v}=$
|
| 425 |
+
$\alpha_{v}-\alpha_{v+1}$ $\forall v=l:n-1$.
|
| 426 |
+
\subsection{{\normalsize{}Dynamically adjusting order of Bernstein basis}}
|
| 427 |
+
As discussed earlier the intuition is illustrated in the figure 2.
|
| 428 |
+
We compare the maximum computed derivative of the best control function
|
| 429 |
+
with the maximum derivative possible with the same order polynomial.
|
| 430 |
+
If it is close then we increase the polynomial order.
|
| 431 |
+
|
| 432 |
+
We first derive Lemma 3 that provides an easy way to compute the maximum
|
| 433 |
+
of the derivative of a function based on the Bernstein coefficients.
|
| 434 |
+
|
| 435 |
+
\textbf{Lemma 3.}\emph{ The derivative $g_{n}^{'}(t)$ of the Bernstein
|
| 436 |
+
polynomial $g_{n}(t)$ is bounded by `n' times the maxima of the basis
|
| 437 |
+
polynomial with the highest coefficient, where `n' is the order.}
|
| 438 |
+
|
| 439 |
+
\emph{Proof:} It can be said about Bernstein polynomials that the
|
| 440 |
+
range of the polynomial $g_{n}(t)$ is bounded by the values of the
|
| 441 |
+
minimum and maximum values of the Bernstein coefficients $\{\alpha_{v}\}_{v=0:n}$.
|
| 442 |
+
Then from Lemma 2 we can say that the derivative of the Bernstein
|
| 443 |
+
polynomial \emph{$g_{n}^{'}(t)$} is bounded by the values of the
|
| 444 |
+
minimum and maximum of the values of the Bernstein coefficients $\{n(\alpha_{v+1}-\alpha_{v})\}_{v=0:n-1}$.
|
| 445 |
+
By the same token the theoretical maximum of the magnitude of the
|
| 446 |
+
derivative is $(\alpha_{max}-\alpha_{min})$, assuming $\alpha\in[\alpha_{max},\thinspace\alpha_{min}]$.
|
| 447 |
+
\hfill{}$\oblong$
|
| 448 |
+
|
| 449 |
+
Based on this it can be said that an $n$-th order Bernstein polynomial
|
| 450 |
+
can only be used to sufficiently approximate a function if the derivate
|
| 451 |
+
of the function is within the bounds as stated in Lemma 3. We should
|
| 452 |
+
test whether the current function has already reached the limit or
|
| 453 |
+
at least close to it. If it is true then we can decide that the current
|
| 454 |
+
order is underspecified and we increment the order by one.
|
| 455 |
+
|
| 456 |
+
Next, we use the following lemma to reuse the past observations by
|
| 457 |
+
transforming $\{\alpha_{v}\}_{v=0:n}$ vectors of length $n$ to $\{\alpha_{v}^{'}\}_{v=0:n+1}$
|
| 458 |
+
vectors of length $n+1$.
|
| 459 |
+
|
| 460 |
+
\textbf{Lemma 4.}\emph{ A Bernstein polynomial of order $n$ and with
|
| 461 |
+
Bernstein coefficients} $\{\alpha_{v}\}_{v=0:n}$\emph{ can be represented
|
| 462 |
+
using a Bernstein polynomial of order $n+1$ with Bernstein coefficients}
|
| 463 |
+
$\{\alpha_{v}^{'}\}_{v=0:n+1}$\emph{, such that $\alpha_{v}^{'}=\frac{v}{n+1}\alpha_{v-1}+\left(1-\frac{v}{n+1}\right)\alpha_{v}$.
|
| 464 |
+
In other words, it is possible to raise the order of the Bernstein
|
| 465 |
+
polynomial and recompute the Bernstein coefficients.}
|
| 466 |
+
|
| 467 |
+
\emph{Proof: }Please refer to \cite{lorentz1953bernstein} . \hfill{}$\oblong$
|
| 468 |
+
|
| 469 |
+
Lemma 3 can detect one type of signs of underspecification. To avoid
|
| 470 |
+
underspecification altogether, we also increment the order at a regular
|
| 471 |
+
interval until a maximum specified order is reached. The overall algorithm
|
| 472 |
+
is presented in Algo \ref{alg:schedule_with_trend}.
|
| 473 |
+
\section{Experiments\label{sec:Experiments}}
|
| 474 |
+
We evaluate our proposed functional optimisation method on one synthetic
|
| 475 |
+
and two real world experiments: optimisation of fibre yield in short
|
| 476 |
+
polymer fibre production, and learning rate schedule optimisation
|
| 477 |
+
for neural network training. For convenience, we refer to the proposed
|
| 478 |
+
algorithm as BFO-SP. For all experiments we start with a 5th order
|
| 479 |
+
Bernstein polynomial basis, but limiting to 10 as the highest order.
|
| 480 |
+
The change of order is triggered due to hitting the derivative limit
|
| 481 |
+
when it reaches 95\% of the maximum derivative magnitude possible.
|
| 482 |
+
The code will be made available at \emph{https://goo.gl/6twf4i}.
|
| 483 |
+
|
| 484 |
+
\begin{figure}
|
| 485 |
+
\subfloat[With monotonicity constraint.]{\begin{centering}
|
| 486 |
+
\includegraphics[width=0.9\columnwidth]{Synth_negslope1}
|
| 487 |
+
\par\end{centering}
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
\subfloat[With unimodality constraint.]{\begin{centering}
|
| 491 |
+
\includegraphics[width=0.9\columnwidth]{synth_unimodal1}
|
| 492 |
+
\par\end{centering}
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
\caption{{\small{}Synthetic experiment.\label{fig:Synthetic-experimen} }}
|
| 496 |
+
|
| 497 |
+
\noindent\begin{minipage}[t]{1\columnwidth}%
|
| 498 |
+
\begin{center}
|
| 499 |
+
\includegraphics[width=1\columnwidth]{Fiber_NIPS}
|
| 500 |
+
\par\end{center}
|
| 501 |
+
\caption{{\small{}Short polymer fibre production: Best recirculation control
|
| 502 |
+
functions $g(t)$ found compared to baseline. $g1(t)$ and $g2(t)$
|
| 503 |
+
gave highest score (9). \label{fig:recirc_sched}}}
|
| 504 |
+
\end{minipage}
|
| 505 |
+
\end{figure}
|
| 506 |
+
\subsection{Synthetic experiments }
|
| 507 |
+
In the synthetic experiment we construct two different 10 dimensional
|
| 508 |
+
vectors, one which is monotonically decreasing and the other which
|
| 509 |
+
is unimodal convex. These can be thought of schedule vectors, sampled
|
| 510 |
+
on a fixed grid of size 10 from our optimal control functions that
|
| 511 |
+
we would like to recover via our functional optimisation approach.
|
| 512 |
+
For each, the utility of a trial control function is measured by first
|
| 513 |
+
sampling the control function on the same grid and evaluating the
|
| 514 |
+
resultant 10 dimensional vector through a Gaussian pdf function whose
|
| 515 |
+
mean is the respective optimal vector. We start with Bernstein polynomial
|
| 516 |
+
of order 5 and then increase the order when either a) at the trigger
|
| 517 |
+
as mentioned in lemma 2, or b) at a fixed schedule of every 10 iterations.
|
| 518 |
+
The results are shown in Fig \ref{fig:Synthetic-experimen} with a)
|
| 519 |
+
showing the case for monotonicity and b) showing the case for unimodality.
|
| 520 |
+
In the plots we show the optimal (in red), the best so far when the
|
| 521 |
+
first order change is triggered by lemma 2 (in teal) and the best
|
| 522 |
+
one after 20 iterations. For both the cases order changes have been
|
| 523 |
+
triggered multiple times resulting in the final best with considerable
|
| 524 |
+
higher order (8 for monotonicity and 9 for unimodality). The final
|
| 525 |
+
best ones looks much closer to the optimal one. The results are compared
|
| 526 |
+
with the method proposed by \cite{vien2018bayesian} (in green), where
|
| 527 |
+
incorporating prior is not possible.
|
| 528 |
+
|
| 529 |
+
\begin{table*}
|
| 530 |
+
\begin{centering}{\small{}}%
|
| 531 |
+
\begin{tabular}{|c||c|c|c|c|}
|
| 532 |
+
\hline
|
| 533 |
+
\multirow{2}{*}{\textbf{\small{}Dataset}} & \multicolumn{4}{c|}{\textbf{\small{}Validation error}}\tabularnewline
|
| 534 |
+
\cline{2-5}
|
| 535 |
+
& \textbf{\small{}BFO-SP + SGD } & \textbf{\small{}SGD } & \textbf{\small{}Adam} & \textbf{\small{}BFO + SGD (Vien et al. 2018)}\tabularnewline
|
| 536 |
+
\hline
|
| 537 |
+
\hline
|
| 538 |
+
\textbf{\small{}CFIR10} & \textbf{\small{}18.81\% } & {\small{}20.30\%} & {\small{}20.20\%} & {\small{}22.2\%}\tabularnewline
|
| 539 |
+
\hline
|
| 540 |
+
\textbf{\small{}MNIST} & \textbf{\small{}0.74\% } & {\small{}1.26\%} & {\small{}0.86\%} & {\small{}0.87\%}\tabularnewline
|
| 541 |
+
\hline
|
| 542 |
+
\end{tabular}\vspace{0.005\textheight}
|
| 543 |
+
\par\end{centering}
|
| 544 |
+
\caption{{\small{}Comparison of prediction error of Bayesian optimisation of
|
| 545 |
+
learning rate schedule against SGD and Adam with exponential decay
|
| 546 |
+
for both CFIR10 and MNIST datasets. \label{tab:Comparison}}}
|
| 547 |
+
\end{table*}
|
| 548 |
+
\subsection{Short polymer fibre production}
|
| 549 |
+
We optimise the butanol flow profile over the recirculation period
|
| 550 |
+
to achieve a high quality yield of concentrated fibres. All other
|
| 551 |
+
variables (device geometry and polymer flow) are fixed to the known
|
| 552 |
+
best setting. The recirculation is run till a fixed time, limited
|
| 553 |
+
by the maximum concentration achievable with the chosen polymer flow.
|
| 554 |
+
At the end of each experiment a sample of fibre is looked under a
|
| 555 |
+
powerful optical microscope to inspect fibre length and diameter distribution.
|
| 556 |
+
Quality score is given between 1-10, with 10 being the highest for
|
| 557 |
+
fibre distribution with small variance. Experimenters had a hunch
|
| 558 |
+
that an increasing flow profile will result in a higher quality yield,
|
| 559 |
+
which we used as our shape prior. We used GP-UCB-PE with batch size
|
| 560 |
+
of 6.
|
| 561 |
+
|
| 562 |
+
We have been able to reach a score of 9 out of a maximum score of
|
| 563 |
+
10, within 5 iterations. Figure \ref{fig:recirc_sched} shows examples
|
| 564 |
+
of butanol flow schedules for which high scores were recorded. Both
|
| 565 |
+
a flat and increasing profile results in a score of 9, thus validating
|
| 566 |
+
the experimenters hunch. These are improvements over their current
|
| 567 |
+
baseline with a fixed butanol flow (8). The markers on each function
|
| 568 |
+
are time intervals at which the butanol flow is{\small{} changed.}
|
| 569 |
+
|
| 570 |
+
\begin{figure}[H]
|
| 571 |
+
\noindent\begin{minipage}[t]{1\columnwidth}%
|
| 572 |
+
\begin{center}
|
| 573 |
+
\includegraphics[width=1\columnwidth]{LRSchedule}
|
| 574 |
+
\par\end{center}
|
| 575 |
+
\caption{{\small{}Learning rate schedules that resulted in the highest accuracy
|
| 576 |
+
on CFIR10 and MNIST datasets using the BFO-SP with known prior - monotonicity
|
| 577 |
+
constraint.\label{fig:lr_func}}}
|
| 578 |
+
\end{minipage}
|
| 579 |
+
|
| 580 |
+
\noindent\begin{minipage}[t]{1\columnwidth}%
|
| 581 |
+
\begin{center}
|
| 582 |
+
\includegraphics[width=1\columnwidth]{LRScheduleVien}
|
| 583 |
+
\par\end{center}
|
| 584 |
+
\caption{{\small{}Learning rate schedules that resulted in the highest accuracy
|
| 585 |
+
on CFIR10 and MNIST datasets using \cite{vien2018bayesian}\label{fig:vien}}}
|
| 586 |
+
\end{minipage}
|
| 587 |
+
\end{figure}
|
| 588 |
+
\subsection{Learning rate schedule optimisation}
|
| 589 |
+
For neural network training it has been observed that stochastic gradient
|
| 590 |
+
descent (SGD) performs better if the learning rate is varied as a
|
| 591 |
+
function of training duration \cite{bengio2012practical}. Specifically,
|
| 592 |
+
it has been reported that starting with an adequately high learning
|
| 593 |
+
rate and decreasing it over the training duration can significantly
|
| 594 |
+
speed-up convergence. We optimise for a schedule of learning rate
|
| 595 |
+
$f(\eta)$ for a couple of neural networks, each for the CFIR10 and
|
| 596 |
+
MNIST datasets, while keeping the other parameters the same for all
|
| 597 |
+
the experiments.
|
| 598 |
+
|
| 599 |
+
For CFIR10 we use a network architecture that be summarised as $(Conv2D\to Dropout\to Conv2D\to Maxpooling2D)\times3\to Flatten\to(Dropout\to Dense)\times3$.
|
| 600 |
+
Whereas for MNIST the network architecture used is $(Conv2D\to Maxpooling2D\to Dropout\to Flatten\to Dense\to Dense)$.
|
| 601 |
+
(Details about the network architecture are given in the supplementary
|
| 602 |
+
material). Fig \ref{fig:lr_func} shows the optimised learning schedules
|
| 603 |
+
for CFIR10 and MNIST datasets. For Bayesian optimisation the range
|
| 604 |
+
of learning rate was chosen between 0.2 and 0.0001. For Adam and SGD
|
| 605 |
+
the starting learning rate used was 0.01, with 0.8 momentum for SGD
|
| 606 |
+
and default values for hyper-parameters of Adam \cite{kingma2014adam}.
|
| 607 |
+
We compare the performance of learning rate optimised stochastic gradient
|
| 608 |
+
descent (SGD) optimiser against a) SGD with an exponential decay and
|
| 609 |
+
b) Adam. Table \ref{tab:Comparison} shows the performance comparison
|
| 610 |
+
with the baselines after 20 Bayesian optimisation iteration. On both
|
| 611 |
+
the datasets our method BFO-SP achieved higher performance than the
|
| 612 |
+
baselines. The results are also compared with BFO by \cite{vien2018bayesian}
|
| 613 |
+
as shown in Fig \ref{alg:schedule_with_trend}. By admitting prior
|
| 614 |
+
knowledge, in limited number of iterations our method seems to perform
|
| 615 |
+
well.
|
| 616 |
+
\section{Conclusion}
|
| 617 |
+
We present a novel approach for functional optimisation with Bayesian
|
| 618 |
+
optimisation. We use Bernstein polynomials to model the control function
|
| 619 |
+
and in turn optimise the Bernstein coefficients to learn the optimum
|
| 620 |
+
function shape. Prior shape information (e.g. monotonicity, unimodality
|
| 621 |
+
etc) is integrated and the polynomial order is dynamically adjusted
|
| 622 |
+
during the optimisation process. We demonstrate the performance of
|
| 623 |
+
our method by applying it for short polymer fibre recirculation production,
|
| 624 |
+
and for modelling learning rate schedule for deep learning networks.
|
| 625 |
+
Our method performs well in both the cases and can be useful in many
|
| 626 |
+
industrial processes involving recirculation.
|
| 627 |
+
|
| 628 |
+
|
| 629 |
+
\newpage{}
|
| 630 |
+
|
| 631 |
+
\bibliographystyle{aaai}
|
| 632 |
+
\bibliography{Vellanki_BO}
|
| 633 |
+
|
| 634 |
+
\newpage{}
|
| 635 |
+
\section*{Supplementary material}
|
| 636 |
+
\selectlanguage{english}%
|
| 637 |
+
\subsection{Proof of Lemma 2}
|
| 638 |
+
\textbf{Lemma 2. }\emph{For a Bernstein polynomial}\emph{\small{}
|
| 639 |
+
$g_{n}(t)=\sum_{b=0}^{n}\alpha_{v}b_{v,n}(t)$}\emph{, the derivative
|
| 640 |
+
of the polynomial is given by }\emph{\small{}$g_{n}^{'}(t)=n\sum_{v=0}^{n-1}\left(\alpha_{v+1}-\alpha_{v}\right)b_{v,n-1}(t)$}\emph{.
|
| 641 |
+
In other words the derivative of the $n$th order Bernstein polynomial
|
| 642 |
+
can be expressed through a linear combination of Bernstein base polynomials
|
| 643 |
+
up to order}\emph{\small{} $(n-1)$}\emph{ .}
|
| 644 |
+
|
| 645 |
+
\emph{Proof:}\textbf{\emph{ }}The derivative of a Bernstein base polynomial
|
| 646 |
+
can be derived as below:
|
| 647 |
+
\begin{align*}
|
| 648 |
+
b_{v,n}(t) & =\frac{n!}{v!(n-v)!}t^{v}(1-t)^{n-v}\\
|
| 649 |
+
\frac{d}{dt}b_{v,n}(t) & =\frac{d}{dt}\left[\frac{n!}{v!(n-v)!}t^{v}(1-t)^{n-v}\right]\\
|
| 650 |
+
& =n\left[\frac{(n-1)!}{(v-1)!(n-v)!}t^{v-1}(1-t)^{n-v}\right]\ldots\\
|
| 651 |
+
& -n\left[\frac{(n-1)!}{v!(n-v-1)!}t^{v}(1-t)^{n-v-1}\right]\\
|
| 652 |
+
& =n\left[b_{v-1,n-1}(t)-b_{v,n-1}(t)\right]
|
| 653 |
+
\end{align*}
|
| 654 |
+
Now using Eq (1) and above, the derivative of the Bernstein polynomial
|
| 655 |
+
$g_{n}(t)$ can be derived as
|
| 656 |
+
\begin{align*}
|
| 657 |
+
g_{n}(t) & =\sum_{v=0}^{n}\alpha_{v}b_{v,n}(t)\\
|
| 658 |
+
g_{n}^{'}(t) & =\sum_{v=0}^{n}\alpha_{v}n\left[b_{v-1,n-1}(t)-b_{v,n-1}(t)\right]\\
|
| 659 |
+
& \propto\alpha_{0}\left[b_{-1,n-1}(t)-b_{0,n-1}(t)\right]\ldots\\
|
| 660 |
+
& +\alpha_{1}\left[b_{0,n-1}(t)-b_{1,n-1}(t)\right]+\ldots\\
|
| 661 |
+
& +\alpha_{n-1}\left[b_{n-2,n-1}(t)-b_{n-1,n-1}(t)\right]\ldots\\
|
| 662 |
+
& +\alpha_{n}\left[b_{n-1,n-1}(t)-b_{n,n-1}(t)\right]\\
|
| 663 |
+
& =\sum_{v=0}^{n-1}\left(\alpha_{v+1}-\alpha_{v}\right)b_{v,n-1}(t)
|
| 664 |
+
\end{align*}
|
| 665 |
+
where $b_{-1,n-1}(t)=b_{n,n-1}(t)=0$.
|
| 666 |
+
|
| 667 |
+
\vspace{0.015\textheight}
|
| 668 |
+
\subsection{Network architecture for learning rate schedule (experiment 4.3)}
|
| 669 |
+
\begin{table}[H]
|
| 670 |
+
\begin{centering}
|
| 671 |
+
\subfloat[Network architecture for CIFAR10 experiment.]{\begin{centering}
|
| 672 |
+
\begin{tabular}{|c|c|c|}
|
| 673 |
+
\hline
|
| 674 |
+
Layer type & Output shape & Param \#\tabularnewline
|
| 675 |
+
\hline
|
| 676 |
+
\hline
|
| 677 |
+
Conv2D & (32,32,32) & 896\tabularnewline
|
| 678 |
+
\hline
|
| 679 |
+
Dropout & (32,32,32) & 0\tabularnewline
|
| 680 |
+
\hline
|
| 681 |
+
Conv2D & (32,32,32) & 9248\tabularnewline
|
| 682 |
+
\hline
|
| 683 |
+
MaxPooling2D & (32,16,16) & 0\tabularnewline
|
| 684 |
+
\hline
|
| 685 |
+
Conv2D & (64,16,16) & 18496\tabularnewline
|
| 686 |
+
\hline
|
| 687 |
+
Dropout & (64,16,16) & 0\tabularnewline
|
| 688 |
+
\hline
|
| 689 |
+
Conv2D & (64,16,16) & 36928\tabularnewline
|
| 690 |
+
\hline
|
| 691 |
+
MaxPooling2D & (64,8,8) & 0\tabularnewline
|
| 692 |
+
\hline
|
| 693 |
+
Conv2D & (128,8,8) & 73856\tabularnewline
|
| 694 |
+
\hline
|
| 695 |
+
Dropout & (128,8,8) & 0\tabularnewline
|
| 696 |
+
\hline
|
| 697 |
+
Conv2D & (128,8,8) & 147584\tabularnewline
|
| 698 |
+
\hline
|
| 699 |
+
MaxPooling2D & (128,4,4) & 0\tabularnewline
|
| 700 |
+
\hline
|
| 701 |
+
Flatten & (2048) & 0\tabularnewline
|
| 702 |
+
\hline
|
| 703 |
+
Dropout & (2048) & 0\tabularnewline
|
| 704 |
+
\hline
|
| 705 |
+
Dense & (1024) & 2098176\tabularnewline
|
| 706 |
+
\hline
|
| 707 |
+
Dropout & (1024) & 0\tabularnewline
|
| 708 |
+
\hline
|
| 709 |
+
Dense & (512) & 524800\tabularnewline
|
| 710 |
+
\hline
|
| 711 |
+
Dropout & (512) & 0\tabularnewline
|
| 712 |
+
\hline
|
| 713 |
+
Dense & (10) & 5130\tabularnewline
|
| 714 |
+
\hline
|
| 715 |
+
\end{tabular}
|
| 716 |
+
\par\end{centering}
|
| 717 |
+
}
|
| 718 |
+
\par\end{centering}
|
| 719 |
+
\begin{centering}
|
| 720 |
+
\subfloat[Network architecture for MNIST.]{\begin{centering}
|
| 721 |
+
\begin{tabular}{|c|c|c|}
|
| 722 |
+
\hline
|
| 723 |
+
Layer type & Output Shape & Param \#\tabularnewline
|
| 724 |
+
\hline
|
| 725 |
+
\hline
|
| 726 |
+
Conv2D & (32,24,24) & 832\tabularnewline
|
| 727 |
+
\hline
|
| 728 |
+
MaxPooling2D & (32,12,12) & 0\tabularnewline
|
| 729 |
+
\hline
|
| 730 |
+
Dropout & (32,12,12) & 0\tabularnewline
|
| 731 |
+
\hline
|
| 732 |
+
Flatten & (4608) & 0\tabularnewline
|
| 733 |
+
\hline
|
| 734 |
+
Dense & (128) & 589952\tabularnewline
|
| 735 |
+
\hline
|
| 736 |
+
Dense & (10) & 1290\tabularnewline
|
| 737 |
+
\hline
|
| 738 |
+
\end{tabular}
|
| 739 |
+
\par\end{centering}
|
| 740 |
+
}
|
| 741 |
+
\par\end{centering}
|
| 742 |
+
\selectlanguage{british}%
|
| 743 |
+
\selectlanguage{british}%
|
| 744 |
+
\end{table}
|
| 745 |
+
\selectlanguage{british}%
|
1809.07282v3.txt
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Topic models have become one of the most common unsupervised methods for uncovering latent semantic information in natural language data, and have found a wide variety of applications across the sciences. However, many common models - such as Latent Dirichlet Allocation Ng and Jordan (2003) - make an explicit exchangeability assumption that treats documents as independent samples from a generative prior, thereby ignoring important aspects of text corpora which are generated by non-ergodic, interconnected social systems. While the direct application of such models to datasets such as transcripts of The French Revolution Barron et al. (2017) and discussions on Twitter Zhao et al. (2011) have yielded sensible topics and exciting insights, their exclusion of document-to-document interactions imposes limitations on the scope of their applicability and the analyses they support. For instance, on many social media platforms, comments are short (the average Reddit comment is 101010 words long), making them difficult to treat as full documents, yet they do cohere as a collection, suggesting that contextual relationships should be considered. Moreover, analysis of social data is often principally concerned with understanding relationships between documents (such as question-asking and -answering), so a model able to capture such features is of direct scientific relevance.
|
| 2 |
+
|
| 3 |
+
To address these issues, we propose a design that models representations of comments jointly along observed reply links.Specifically, we attach a vector of latent binary variables to each comment in a collection of social data, which in turn connect to each other according to the observed reply-link structure of the dataset. The inferred representations can provide information about the rhetorical moves and linguistic elements that characterize an evolving discourse. An added benefit is that while previous work such as Sequential LDA Du et al. (2012) has focused on modeling a linear progression, the model we present applies to a more general class of acyclic graphs such as tree-structured comment threads ubiquitous on the web.
|
| 4 |
+
|
| 5 |
+
Online data can be massive, which presents a scalability issue for traditional methods.Our approach uses latent binary variables similar to a Restricted Boltzmann Machine (RBM); related models such as Replicated Softmax (RS) Salakhutdinov and Hinton (2009) have previously seen success in capturing latent properties of language, and found substantial speedups over previous methods due to their GPU amenable training procedure. RS was also shown to deal well with documents of significantly different length, another key characteristic of online data.While RBMs permit exact inference, the additional coupling potentials present in our model make inference intractable. However, the choice of bilinear potentials and latent features admits a mean-field inference procedure which takes the form of a series of dense matrix multiplications followed by nonlinearities, which is particularly amenable to GPU computation and lets us scale efficiently to large data.
|
| 6 |
+
|
| 7 |
+
Our model outperforms LDA and RS baselines on perplexity and downstream tasks including metadata prediction and document retrieval when evaluatedon a new dataset mined from Reddit. We also qualitatively analyze the learned topics and discuss the social phenomena uncovered.
|
| 8 |
+
|
| 9 |
+
We now present an overview of our model.Specifically, it will take the probabilistic formof an undirected graphical model whose architecture mirrors the tree structure ofthe threads in our data.
|
| 10 |
+
|
| 11 |
+
We evaluate on a corpus mined from Reddit, an internet forum which ranks as the fourth most trafficked site in the US Alexa (2018) and sees millions of daily comments Reddit (2015). Discourse on Reddit follows a branching pattern, shown in Figure 1. The largest unit of discourse is a thread, beginning with a link to external content or a natural language prompt, posted to a relevant subreddit based on its subject matter. Users comment in response to the original post (OP), or to any other comment. The result is a structure which splits at many points into more specific or tangential discussions that while locally coherent may differ substantially from each other. The data reflect features of the underlying memory and network structure of the generating process; comments are serially correlated and highly cross-referential. We treat individual comments as “documents” under the standard topic modeling paradigm, but use observed reply structure to induce a tree of documents for every thread.
|
| 12 |
+
|
| 13 |
+
We now introduce the Discursive Distributed Topic Model (DDTM) (illustrated in Figure 1).For each comment in the thread, DDTM assigns a latent vector of binary random variables (or bits) that collectively form a distributed embedding ofthe topical content of that comment; for instance, one bit might represent sarcastic languagewhile another might track usage of specific acronyms - a given comment could have anycombination of those features.These representations are tied to those of parent and child comments viacoupling potentials (see Section 2.3), which allow them to learn discursive properties by inducing a deep undirected network over the thread.In order to encourage the model to use these comment-level representations tolearn discursive and stylistic patterns as opposed to simply topics ofdiscussion, we incorporate a single additional latent vector for the entire thread that interacts with each comment, explaining word choices that are mainly topical rather than discursive or stylistic.As we demonstrate in our experiments (see Section 6)the thread-level embedding learnsdistributions more reminiscent of what a traditionaltopic model would uncover, while the comment-level embeddingsmodel styles of speaking and mannerisms that do not directlyindicate specific subjects of conversation.The joint probability is defined in terms of an energy function that scores latent embeddings and observed word counts across the tree of comments within a thread using log-bilinear potentials, and is globally normalized over all word count and embedding combinations.
|
| 14 |
+
|
| 15 |
+
More formally, consider a thread containing N𝑁N comments each of size Dnsubscript𝐷𝑛D_{n}with a vocabulary of size K𝐾K.As depicted in Figure 1, each comment is viewed as a bag-of-words, densely connected via a log-bilinear potential to a latent embedding of size F𝐹F.Let each comment be represented asas an integer vector xn∈ℤKsubscript𝑥𝑛superscriptℤ𝐾x_{n}\in\mathbb{Z}^{K} where xnksubscript𝑥𝑛𝑘x_{nk} isnumber of times word k𝑘k was observed in comment n𝑛n,and let hn={0,1}Fsubscriptℎ𝑛superscript01𝐹h_{n}=\{0,1\}^{F} be the topic embedding for each comment,and let h0={0,1}Fsubscriptℎ0superscript01𝐹h_{0}=\{0,1\}^{F} be the embedding for the entire thread.To model topic transitions, we score the embeddings of parent-child pairs with a separate coupling potential as shown in Figure 1 (comments with no parents or children receive additional start/stop biases respectively).Let replies be represented with setsR𝑅R, PNsubscript𝑃𝑁P_{N}, and CNsubscript𝐶𝑁C_{N} where (n,m)∈R𝑛𝑚𝑅(n,m)\in R and n∈Pm𝑛subscript𝑃𝑚n\in P_{m} and m∈Cn𝑚subscript𝐶𝑛m\in C_{n} if comment m𝑚m is a reply to comment n𝑛n.DDTM assigns probability to a specific configuration of x,h𝑥ℎx,h withan energy function scored bythe emission (πesubscript𝜋e\pi_{\text{e}}) and coupling (πcsubscript𝜋c\pi_{\text{c}}) potentials.E(x,h;θ)=∑n=1Nπe(h,x,n)⏟Emission Potentials+∑(n,m)∈Rπc(h,n,m)⏟Coupling Potentialsπe(h,x,n)=hn⊺Uxn+xn⊺a+Dnhn⊺b+h0⊺Vxn+Dnh0⊺cπc(h,n,m)=hn⊺Whm𝐸𝑥ℎ𝜃subscript⏟superscriptsubscript𝑛1𝑁subscript𝜋eℎ𝑥𝑛Emission Potentialssubscript⏟subscript𝑛𝑚𝑅subscript𝜋cℎ𝑛𝑚Coupling Potentialssubscript𝜋eℎ𝑥𝑛superscriptsubscriptℎ𝑛⊺𝑈subscript𝑥𝑛superscriptsubscript𝑥𝑛⊺𝑎subscript𝐷𝑛superscriptsubscriptℎ𝑛⊺𝑏superscriptsubscriptℎ0⊺𝑉subscript𝑥𝑛subscript𝐷𝑛superscriptsubscriptℎ0⊺𝑐subscript𝜋cℎ𝑛𝑚superscriptsubscriptℎ𝑛⊺𝑊subscriptℎ𝑚\begin{split}E(x,h;\theta)&=\underbrace{\sum_{n=1}^{N}\pi_{\text{e}}(h,x,n)}_{\text{Emission Potentials}}+\underbrace{\sum_{(n,m)\in R}\pi_{\text{c}}(h,n,m)}_{\text{Coupling Potentials}}\\\pi_{\text{e}}(h,x,n)&=h_{n}^{\intercal}Ux_{n}+x_{n}^{\intercal}a+D_{n}h_{n}^{\intercal}b\\&+h_{0}^{\intercal}Vx_{n}+D_{n}h_{0}^{\intercal}c\\\pi_{\text{c}}(h,n,m)&=h_{n}^{\intercal}Wh_{m}\end{split}(1)Note that the bias on embeddings is scaled by the number of words in the comment,which controls for their highly variable length. The joint probability is computed by exponentiating the energy and dividing by a normalizing constant.
|
| 16 |
+
|
| 17 |
+
p(x,h;θ)=exp(E(x,h;θ))Z(θ)Z(θ)=∑x′,h′exp(E(x′,h′;θ))𝑝𝑥ℎ𝜃𝐸𝑥ℎ𝜃𝑍𝜃𝑍𝜃subscriptsuperscript𝑥′superscriptℎ′𝐸superscript𝑥′superscriptℎ′𝜃\begin{split}p(x,h;\theta)&=\frac{\exp(E(x,h;\theta))}{Z(\theta)}\\Z(\theta)&=\sum_{x^{\prime},h^{\prime}}\exp(E(x^{\prime},h^{\prime};\theta))\end{split}(2)
|
| 18 |
+
|
| 19 |
+
This architecture encourages the model to learndiscursive maneuvers via the coupling potentials whileseparating within-thread variance and across-thread variancethrough the comment-level and thread-level embeddings respectively.The coupling of latent variables makes factored inference impossible,meaning that even the exact computation of the partition functionis no longer tractable. This necessitates approximating the gradientsfor learning which we will now address.
|
| 20 |
+
|
| 21 |
+
Inference in this model class in intractable, so as has been donein previous work on topic modeling (Ng and Jordan, 2003) we rely on variationalmethods to approximate the gradients needed during training as well as the posteriorsover the topic bit vectors. Specifically, we will need the gradients of the normalizer and the sum of the energy function over the hidden variablesE(x;θ)=log∑hexp(E(x,h;θ))𝐸𝑥𝜃subscriptℎ𝐸𝑥ℎ𝜃E(x;\theta)=\log\sum_{h}\exp(E(x,h;\theta))(3)which we refer to as the marginal energy. Following the approach described for undirected models by Eisner (2011), we approximate these quantities and their gradients with respect to the model parameters θ𝜃\theta as we will now describe(thread-level embeddings are omitted in this section for clarity).
|
| 22 |
+
|
| 23 |
+
We aim to train our model to maximize the marginal likelihood of the observed comment word counts, conditioned on the reply links.To do this we must compute the gradient of the normalizer Z(θ)𝑍𝜃Z(\theta).However, this quantity is computationally intractable, as it contains a summation overall exponential choices for every word in the thread.Therefore, we must approximate Z(θ)𝑍𝜃Z(\theta).Observe that under Jensen’s Inequality, we can form the following lowerbound on the normalizer using an approximate joint distribution q(Z)superscript𝑞Zq^{(\mathrm{Z})}.
|
| 24 |
+
|
| 25 |
+
logZ(θ)=log∑x,hexp(E(x,h;θ))≥𝔼q(Z)[E(x,h;θ)]−𝔼q(Z)[logq(Z)(x,h;ϕ,γ)]𝑍𝜃subscript𝑥ℎ𝐸𝑥ℎ𝜃subscript𝔼superscript𝑞Zdelimited-[]𝐸𝑥ℎ𝜃subscript𝔼superscript𝑞Zdelimited-[]superscript𝑞Z𝑥ℎitalic-ϕ𝛾\begin{split}&\log Z(\theta)=\log\sum_{x,h}\exp(E(x,h;\theta))\\&\geq\mathbb{E}_{q^{(\mathrm{Z})}}[E(x,h;\theta)]-\mathbb{E}_{q^{(\mathrm{Z})}}[\log q^{(\mathrm{Z})}(x,h;\phi,\gamma)]\end{split}(4)
|
| 26 |
+
|
| 27 |
+
We now define q(Z)superscript𝑞Zq^{(\mathrm{Z})} as depicted in Figure 2 as a mean-field approximation that treats all variables as independent.We parameterize q(Z)superscript𝑞Zq^{(\mathrm{Z})}with ϕnf∈[0,1]subscriptitalic-ϕ𝑛𝑓01\phi_{nf}\in[0,1], independent Bernoulli parameters representing theprobability of hnfsubscriptℎ𝑛𝑓h_{nf} being equal to 111, and γnksubscript𝛾𝑛𝑘\gamma_{nk} replicated softmaxesrepresenting the probability of a word in xnsubscript𝑥𝑛x_{n} taking the value k𝑘k.Note that all words in xnsubscript𝑥𝑛x_{n} are modeled as samples from this single distribution.The approximation then factors as follows:
|
| 28 |
+
|
| 29 |
+
q(Z)(x,h;ϕ,γ)=q(Z)(x;γ)⋅q(Z)(h;ϕ)q(Z)(x;γ)=∏n=1N∏k=1K(γnk)xnkq(Z)(h;ϕ)=∏n=1N∏f=1F((ϕnf)hnf(1−ϕnf)(1−hnf))superscript𝑞Z𝑥ℎitalic-ϕ𝛾⋅superscript𝑞Z𝑥𝛾superscript𝑞Zℎitalic-ϕsuperscript𝑞Z𝑥𝛾superscriptsubscriptproduct𝑛1𝑁superscriptsubscriptproduct𝑘1𝐾superscriptsubscript𝛾𝑛𝑘subscript𝑥𝑛𝑘superscript𝑞Zℎitalic-ϕsuperscriptsubscriptproduct𝑛1𝑁superscriptsubscriptproduct𝑓1𝐹superscriptsubscriptitalic-ϕ𝑛𝑓subscriptℎ𝑛𝑓superscript1subscriptitalic-ϕ𝑛𝑓1subscriptℎ𝑛𝑓\begin{split}&q^{(\mathrm{Z})}(x,h;\phi,\gamma)=q^{(\mathrm{Z})}(x;\gamma)\cdot q^{(\mathrm{Z})}(h;\phi)\\&q^{(\mathrm{Z})}(x;\gamma)=\prod_{n=1}^{N}\prod_{k=1}^{K}(\gamma_{nk})^{x_{nk}}\\&q^{(\mathrm{Z})}(h;\phi)=\prod_{n=1}^{N}\prod_{f=1}^{F}\left((\phi_{nf})^{h_{nf}}(1-\phi_{nf})^{(1-h_{nf})}\right)\end{split}(5)
|
| 30 |
+
|
| 31 |
+
We optimize the parameters of q(Z)superscript𝑞Zq^{(\mathrm{Z})}to maximize its variational lower bound,via iterative mean-field updates, which allow us to performcoordinate ascent over the parameters of q(Z)superscript𝑞Zq^{(\mathrm{Z})}.Maximizing the lower bound with respect to particular ϕnfsubscriptitalic-ϕ𝑛𝑓\phi_{nf} and γnksubscript𝛾𝑛𝑘\gamma_{nk} while holding all otherparameters frozen, yields the following mean-field update equations (biases omitted for clarity):
|
| 32 |
+
|
| 33 |
+
ϕn⋅=σ(Uγn+∑m∈CnWϕm+ϕPn⊺W)γn⋅=σ(ϕn⊺U)subscriptitalic-ϕ𝑛⋅𝜎𝑈subscript𝛾𝑛subscript𝑚subscript𝐶𝑛𝑊subscriptitalic-ϕ𝑚superscriptsubscriptitalic-ϕsubscript𝑃𝑛⊺𝑊subscript𝛾𝑛⋅𝜎superscriptsubscriptitalic-ϕ𝑛⊺𝑈\begin{split}\phi_{n\cdot}&=\sigma\left(U\gamma_{n}+\sum_{m\in C_{n}}W\phi_{m}+\phi_{P_{n}}^{\intercal}W\right)\\\gamma_{n\cdot}&=\sigma\left(\phi_{n}^{\intercal}U\right)\end{split}(6)
|
| 34 |
+
|
| 35 |
+
We iterate over the parameters of q(Z)superscript𝑞Zq^{(\mathrm{Z})} in an “upward-downward” manner;first updating ϕitalic-ϕ\phi for all commentswith no children, then all comments whose children have been updated,and so on up to the root of the thread.Then we perform the same updates in reverse order. After updating all ϕitalic-ϕ\phi, we then update γ𝛾\gammasimultaneously (the components of γ𝛾\gamma are independent conditioned on ϕitalic-ϕ\phi).We iterate these upward-downward passes until convergence.
|
| 36 |
+
|
| 37 |
+
We can now approximate the normalizer, butstill need the marginal data likelihood in order to take gradient steps on it and train our model.In order to recover the marginal likelihood, we must next approximate themarginal energy E(x;θ)𝐸𝑥𝜃E(x;\theta)as it too is intractable. This is due to the coupling potentials, which make the topics across comments dependent even when conditioned on theword counts. To do this, we form an additional variational approximation (see Figure 2)to the marginal energy, which we optimize similarly.
|
| 38 |
+
|
| 39 |
+
E(x;θ)=log∑hexp(E(x,h;θ))≥𝔼q(E)[E(x,h;θ)]−𝔼q(E)[logq(E)(h;ψ)]𝐸𝑥𝜃subscriptℎ𝐸𝑥ℎ𝜃subscript𝔼superscript𝑞Edelimited-[]𝐸𝑥ℎ𝜃subscript𝔼superscript𝑞Edelimited-[]superscript𝑞Eℎ𝜓\begin{split}&E(x;\theta)=\log\sum_{h}\exp(E(x,h;\theta))\\&\geq\mathbb{E}_{q^{(\mathrm{E})}}[E(x,h;\theta)]-\mathbb{E}_{q^{(\mathrm{E})}}[\log q^{(\mathrm{E})}(h;\psi)]\end{split}(7)
|
| 40 |
+
|
| 41 |
+
Since q(E)(h;ψ)superscript𝑞Eℎ𝜓q^{(\mathrm{E})}(h;\psi) need only model the hidden units hℎh, we can parameterizeit in the same manneras q(Z)(h;ϕ)superscript𝑞Zℎitalic-ϕq^{(\mathrm{Z})}(h;\phi). Note that while these distributions factor similarly,they do not share parameters, although we find that in practice, initializingϕ←ψ←italic-ϕ𝜓\phi\leftarrow\psiimproves our approximation. We optimize the lower bound onE(x;θ)𝐸𝑥𝜃E(x;\theta) via a similar coordinate ascent strategy, where the mean-field updates take the following form(biases omitted for clarity):
|
| 42 |
+
|
| 43 |
+
ψn⋅=σ(Uhn+∑m∈CnWψm+ψPn⊺W)subscript𝜓𝑛⋅𝜎𝑈subscriptℎ𝑛subscript𝑚subscript𝐶𝑛𝑊subscript𝜓𝑚superscriptsubscript𝜓subscript𝑃𝑛⊺𝑊\begin{split}\psi_{n\cdot}=\sigma\left(Uh_{n}+\sum_{m\in C_{n}}W\psi_{m}+\psi_{P_{n}}^{\intercal}W\right)\end{split}(8)
|
| 44 |
+
|
| 45 |
+
We can use q(E)superscript𝑞Eq^{(\mathrm{E})} to perform inference at test time in our model,as its parameters ψ𝜓\psi directly correspond to the expected valuesof the hidden topic embeddings under our approximation.
|
| 46 |
+
|
| 47 |
+
We train the parameters of our true model p(x,h;θ)𝑝𝑥ℎ𝜃p(x,h;\theta) via stochastic updateswherein we optimize both approximations on a single datum (i.e. thread) to computethe approximate gradient of its log-likelihood, and take a singlegradient step on the model parameters (repeating on all training instancesuntil convergence).That gradient is given by the difference in featureexpectations under the approximations (entropy terms from the lowerbounds are dropped as they do not depend on θ𝜃\theta).
|
| 48 |
+
|
| 49 |
+
∇logp(x;θ)≈𝔼q(E)(h;ψ)[∇E(x,h;θ)]−𝔼q(Z)(x′,h;ψ)[∇E(x′,h;θ)]∇𝑝𝑥𝜃subscript𝔼superscript𝑞Eℎ𝜓delimited-[]∇𝐸𝑥ℎ𝜃subscript𝔼superscript𝑞Zsuperscript𝑥′ℎ𝜓delimited-[]∇𝐸superscript𝑥′ℎ𝜃\begin{split}\nabla\log p(x;\theta)&\approx\mathbb{E}_{q^{(\mathrm{E})}(h;\psi)}\left[\nabla E(x,h;\theta)\right]\\&-\mathbb{E}_{q^{(\mathrm{Z})}(x^{\prime},h;\psi)}\left[\nabla E(x^{\prime},h;\theta)\right]\end{split}(9)
|
| 50 |
+
|
| 51 |
+
In summary, we use two separate mean-field approximations to compute lower boundson the marginal energy E(x,h;θ)𝐸𝑥ℎ𝜃E(x,h;\theta), and its normalizer Z(θ)𝑍𝜃Z(\theta),which lets us approximate the marginal likelihood p(x;θ)𝑝𝑥𝜃p(x;\theta). Note that asour estimate on the marginal likelihoodis the difference between two lower bounds, it is not a lower bound itself, althoughin practice it works well for training.
|
| 52 |
+
|
| 53 |
+
Given the magnitude of our dataset,it is essential to be able to trainefficiently at scale. Many commonly used topic models suchas LDA Ng and Jordan (2003) have difficulty scaling,particularly if trained via MCMC methods.Improvements have been shown from online training Hoffman et al. (2010),but extending such techniques to model comment-to-commentconnections and leverage GPU compute is nontrivial.
|
| 54 |
+
|
| 55 |
+
In contrast, our proposed model and mean-field procedure canbe scaled efficiently to large data because they are amenable to GPU implementation.Specifically, the described inference procedurecan be viewed as the outputof a neural network. This is because DDTM is globally normalizedwith edges parameterized as log-bilinear weights, whichresults in the mean-field updates taking the form of matrix operationsfollowed by nonlinearities. Therefore, a single iteration of mean-fieldis equivalent to a forward pass through a recursive neural network, whose architectureis defined by the tree structure of the thread. Multiple iterationsare equivalent to feeding the output of thenetwork back into itself in a recurrent manner,and optimizing for T𝑇T iterations is achieved by unrolling the network over T𝑇T timesteps.This property makes DDTM highly amenable to efficient training on a GPU, and allowedus to scale experiments to a dataset of over 131313M total Reddit comments.
|
| 56 |
+
|
| 57 |
+
We mined a corpus of Reddit threads pulled through the platform’s API.Focusing on the twenty most popular subreddits (gifs, todayilearned, CFB, funny, aww, AskReddit, BlackPeopleTwitter, videos, pics, politics, The_Donald, soccer, leagueoflegends, nba, nfl, worldnews, movies, mildlyinteresting, news, gaming) over a one month periodyielded 200,000200000200,000 threads consisting of 13,276,4551327645513,276,455 comments total.The data was preprocessed by removing special characters, replacing URLs with a domain-specific token,stemming English words using a Snowball English Stemmer Porter (2001), removing stopwords,and truncating the vocabulary to only include the top 10,0001000010,000 most common words.OPs are modeled as a comment at the root of each thread to which all top-level comments respond.This dataset will be made available for public use after publication.
|
| 58 |
+
|
| 59 |
+
We compare to baselines of Replicated Softmax (RS) Salakhutdinov and Hinton (2009)and Latent Dirichlet Allocation (LDA) Ng and Jordan (2003).RS is a distributed topic model similar to our own, albeitwithout any coupling potentials. LDA is a locally normalizedtopic model which defines topics as non-overlapping distributionsover words.To ensure that DDTM does not gain an unfair advantagepurely by having a larger embedding space,we divide the dimensions equally between comment-and thread-level.Unless specified 646464 bits/topics were used.We experiment with RS and LDAtreating either comments or full threads as documents.
|
| 60 |
+
|
| 61 |
+
SGD was performed using the Adam optimizer Kingma and Ba (2015). When running inference, we foundconvergence was reached in an average of 222 iterations of updates.Using a single NVIDIA Titan X (Pascal) card, we were able to train our model toconvergence on the training set of 101010M comments in less than 303030 hours.It is worth noting that we found DDTM to be fairly sensitive to initialization. Wefound best results from Gaussian noise, with comment-level emissions at varianceof 0.010.010.01, thread-level emissions at 0.00010.00010.0001, and transitions at 00.We initialized all biases to 00 except for the bias on word counts, which we set tothe unigram log-probabilities from the train set.
|
| 62 |
+
|
| 63 |
+
We compare models by perplexity on a held-out test set, a standard evaluation for generative and latent variables models.
|
| 64 |
+
|
| 65 |
+
Setup: Due to the use of mean-field approximations for both the marginal energy and normalizerwe lose any guarantees regarding the accuracy of ourlikelihood estimate (both approximations are lower bounds, and therefore their differenceis neither a strict lower bound nor guaranteed to be unbiased).To evaluate perplexity in a more principled way, we use Annealed Importance Sampling (AIS)to estimate the ratio between our model’s normalizerand the tractable normalizer of a basemodel from which we can draw true independent samplesas described by Salakhutdinov and Murray (2008). Note that since the marginal energy is intractable in ourmodel, unlike a standard RBM, we must sample the joint - and not the marginal- intermediate distributions.This yields an unbiased estimate of the normalizer.The marginal energy must still be approximatedvia a lower bound, but given that AIS is unbiased and empiricallylow in variance, we can treatthe overall estimate as a lower bound on likelihood for evaluation.Using 200020002000 intermediate distributions, and averaging over 202020 runs, we evaluatedper-word perplexity over a set of 505050 unseen threads. Results are shown in Table 1.
|
| 66 |
+
|
| 67 |
+
Results: DDTM achieves the lowest perplexity at all dimensionalities.Note our ablation with the coupling potentials removed (-cpl),increases perplexity noticeably, indicating that modeling replies helps beyond simplymodeling threads and comments jointly, particularly at larger embeddings.For reference, a unigram model achieves 264426442644.We find that LDA’s approximate perplexity is even worse, likely dueto slackness in its lower bound.
|
| 68 |
+
|
| 69 |
+
To measure how well embeddings capture comment-levelcharacteristics, we feed them into a linear regression model that predicts the number of upvotes the comment received. Upvotes provide a loose human-annotated measure of likability. We expect that context matters in determining how well received a comment is; the same comment posted in response to different parents may receive a very different number of upvotes.Hence, we expect comment-level embeddings to be more informative for this task when connectedvia our model’s coupling potentials.
|
| 70 |
+
|
| 71 |
+
Setup: We trained a standard linear regressor for each model.The regressor was trained using ordinary least squareson the entire training set of comments using the model’s computed topic embeddings as input,and the number of upvotes on the commentas the output to predict. As a preprocessing step,we took the log of the absolute number of votes before training.We compared models by mean squared error (MSE) on our test set.Results are shown in Table 2.
|
| 72 |
+
|
| 73 |
+
Results: DDTM achieves lowest MSE. To assess statistical significance, we performed a 500500500 sample bootstrap of our training set. The standard errors of these replications are small, and a two-sample t-test rejects the null hypothesis that DDTM has an average MSE equal to that of the next best method (p<.001𝑝.001p<.001). Note that our model outperforms both comment- and thread-level embeddings, suggesting that modeling these jointly, and modeling the effect of neighboring representations in the comment graph, more accurately learns information relevant to a comment’s social impact.
|
| 74 |
+
|
| 75 |
+
Comments that are excessivelyprovocative or in violation ofsite rules are often deleted, either by the author or a moderator. We can measure whether DDTMcaptures discursive interactions that lead tosuch intervention by training a logistic classifierthat predicts whether any of a given comment’s childrenhave been deleted.
|
| 76 |
+
|
| 77 |
+
Setup:For each model, a logistic regression classifier was trained stochastically with the Adam optimizeron the entire training set of comments using the model’s computed topic embeddings as input,and a binary label for whether the comment had any deleted childrenas the output to predict. We compared models by accuracy on our test set.Results are shown in Table 2.
|
| 78 |
+
|
| 79 |
+
Results: DDTM gets the highest accuracy. Interestingly, thread-level modelsdo better than comment-level ones, which suggests that certain topics oreven subreddits may correlate with comments being deleted. This makessense given that subreddits vary in severity of moderation.DDTM’s performance also demonstrates that modeling comment-to-comment interactionpatterns is helpful in predicting when a comment will spawn a deleted future response,which strongly matches our intuition.
|
| 80 |
+
|
| 81 |
+
Finally, while DDTM is not designed to better capture topical structure,we evaluate the extent to which it can still capture this information by performingdocument retrieval, a standard evaluation, for which we treat the subredditto which a thread was posted as a label for relevance.Note that every comment within the same thread belongs to the same subreddit,which gives thread-level models an inherent advantage at this task.We include this task purely for the purpose of demonstrating that by capturing discursivepatterns, DDTM does not lose the ability to model thread-level topics as well.
|
| 82 |
+
|
| 83 |
+
Setup: Given a query comment from our held-out test set,we rank the training set by the Dice similarity of the hiddenembeddings computed by the model.We consider a retrieved comment relevant to the query if they both originate fromthe same subreddit, which loosely categorizes the semantic content.Tuning the number of documents we return allows us to formprecision recall curves, which we show in Figure 3.
|
| 84 |
+
|
| 85 |
+
Results: DDTM outperforms both comment-level baselines and is competitive withthread-level models, even beating LDA at high levels of recall.This indicates that despite using half of its dimensions to modelcomment-to-comment interactions DDTM can still do almost as good ajob of modeling thread-levelsemantics as a model using its entire capacity to do so.The gap between comment-level RS and LDA is also consistent with LDA’s known issuesdealing with sparse data Sridhar (2015), and lends credence to ourtheory that distributed topic representations are better suited to such domains.
|
| 86 |
+
|
| 87 |
+
We now offer qualitative analysis of the topic embeddings learned by our model.Note that since we use distributed embeddings, our bitsare more akin to filters than complete distributions over words, and we typicallyobserve as many as half of them active for a single comment.In a sense, we have an exponential number of topics, whose parameterizationsimply factors over the bits.Therefore, it canbe difficult to interpret them as one would interpret topics learned by amodel such as LDA. Furthermore, we find that in practice this effect is correlated with the topic embeddingsize; the more bits our model has, the less sparse and consequently less individuallymeaningful the bits become. Therefore for this analysis, we specificallyfocus on DDTM trained with 64 bits total.
|
| 88 |
+
|
| 89 |
+
Directly inspecting the emission parameters, reveals that the comment-level and thread-levelhalves of our embeddings capture substantially different aspects of the data(shown in Table 3) akin to vertical, within-thread, and horizontal, across-threadsources of variance respectively.The comment-level topic bits tend to reflect styles of speaking, lingo,and memes that are not unique to a particular subject of discourse or even subreddit.For example, comment-level Bit 2 captures many words typical of taunting Reddit comments; replyingwith “/r/iamverysmart” (a subredditdedicated to mocking people who make grandiose claims about their intellect)is a common way of jokingly implying thatthe author of the parent comment takes themselves too seriously— and thus corresponds to a certain kind of rhetorical move. Further, it is grouped with other words that indicate related rhetorical moves; calling a user “risky” or a “madman” isa common means of suggesting that they are engaging in a pointlessact of rebellion.They also cluster at the coarsest level by length (see Figure 5) which wefind to correlate with writing style.
|
| 90 |
+
|
| 91 |
+
By contrast, the thread-level bits are more indicative of specific topics of discussion,and unsurprisingly they cluster by subreddit (see Figure 4).For example, thread-level Bit 3 captures lexicon used almost exclusivelyby alt-right Donald Trump supporters as well as the names of various political figures.Bit 4 highlights words related to civil unrest in Spanish speaking parts of the world.
|
| 92 |
+
|
| 93 |
+
While these distributions over words (particularly for comment-level bits) can seemvague, when multiple bits are active, their effectscompound to produce much more specific topics.One can think of the bits as defining soft filters over the space of words,that when stacked together carve out patterns not apparent in any of themindividually.We now analyze a few sample topic embeddings. To do this, we performinference as described on a held-out thread, and pass the comment-leveltopic embedding for a single sampled comment through our emission matrix and inspect the words withthe highest corresponding weight (shown in Table 4).In generative terminology, these can be thought of as reconstructions of comments.
|
| 94 |
+
|
| 95 |
+
These topic embeddings capture more specific conversationaland rhetorical moves.For example, Sample 6 displays supportive and interested reactionary language, which onemight expect to see used in response to a post or commentlinking to media or describing something intriguing.This is of note given that one of the primary aims of including couplingpotentials was to encourage DDTM to learn “topics” that correspond to responsesand interactive behavior, something existing methods are largely not designed for.By contrast, Sample 9 captures a variety of hostile language and insults, which unlikethose discussed previously do not denote membership in a particularonline community. As patterns of toxic and hateful behavior on Reddit are more well-studied(Chandrasekharan et al., 2017),it could be useful to have a tool to analyze precipitous contexts and parent comments,something which we hope systems based on coupling of comment embeddingshave the capacity to provide.Sample 10 is of particular interest as it consists largely of Redditterminology. Conversations about the meta ofthe site can manifest for example in users accusing each otherof being “shills” (i.e. accounts paid to astroturf on behalf of external interests)or requesting/responding to “guilding”, a feature which lets users purchasepremium access for each other often in response to a particularly well made comment.
|
| 96 |
+
|
| 97 |
+
Many topic models such as LDA Ng and Jordan (2003) treat documents as independent mixtures,yet this approach fails to model how commentsinteract with one another throughout a larger discourse if such connections exist in the data.Other work has considered modeling hierarchy in topics Griffiths et al. (2004). These models form hierarchical representations of topics themselves, but still treat documents as independent. While this approach can succeed in learning topics of various granularities, it does not explicitly track how topics interact in the context of a nested conversation.
|
| 98 |
+
|
| 99 |
+
Some approaches such as Pairwise-Link-LDA and Link-PSLA-LDA Nallapati et al. (2008) attempt to model interactions among documents in an arbitrary graph, albeit with important drawbacks. The former models every possible pairwise link between comments, and the latter models links as a bipartite graph, limiting its ability to scale to large tree-structured threads. Similar work on Topic-Link LDA Liu et al. (2009) models link probabilities conditioned on both topic similarity and an authorship model, yet this approach is poorly suited to high volume, semi-anonymous online domains.Other studies have leveraged reply-structures on Reddit in the context of predicting persuasion (Hidey and McKeown, 2018), but DDTMdiffers in its generative, unsupervised approach.
|
| 100 |
+
|
| 101 |
+
DDTM’s emission potentials are similar to those of Replicated Softmax Salakhutdinov and Hinton (2009), an undirected model based on a Restricted Boltzmann Machine. Unlike LDA-style models, RS does not assign a topic to each word, but instead builds a distributed representation. In this setting, a single word can be likely under two different topics, both of which are present, and lend probability mass to that word. LDA-style models by contrast would require the topics to compete for the word.
|
| 102 |
+
|
| 103 |
+
In this paper we introducea novel way to learn topic interactions inobserved discourse trees, and describe GPU-amenable learning techniquesto train on large-scale data mined from Reddit.We demonstrate improvementsover previous models on perplexity and downstream tasks, and offerqualitative analysis of learned discursive patterns. The dichotomybetween the two levels of embeddings hints atapplications in style-transfer.
|
1809.07358v1.txt
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
At present, dialog systems are considered to be either task-oriented, where a specific task is the goal of the conversation (e.g. getting bus information or weather for a particular location);or non-task oriented where conversations are more for the sake of themselves, be it entertainment or passing the time.Ultimately, we want our agents to smoothly interleave between task-related information flow and casual chat for the given situation.There is a dire need of a dataset which caters to both these objectives.
|
| 2 |
+
|
| 3 |
+
Serban et al. (2015) provide a comprehensive list of available datasets for building end-to-end conversational agents.Datasets based on movie scripts Lison and Tiedemann (2016); Danescu-Niculescu-Mizil andLee (2011a) contain artificial conversations.The Ubuntu Dialogue Corpus Lowe et al. (2015) is based on technical support logs from the Ubuntu forum.The Frames dataset Asri et al. (2017) was collected to solve the problem of frame tracking.These datasets do not provide grounding of the information presented in the conversations.Zhang et al. (2018) focuses on personas in dialogues: each worker has a set of predefined facts about the persona that they can talk about.Most of these datasets lack conversations with large number of on-topic turns.
|
| 4 |
+
|
| 5 |
+
We introduce a new dataset which addresses the concerns of grounding in conversation responses, context and coherence in responses.We present a dataset which has real human conversations with grounding in a document.Although our examples use Wikipedia articles about movies, we see the same techniques being valid for other external documents such as manuals, instruction booklets, and other informational documents.We build a generative model with and without the document information and find that the responses generated by the model with the document information is more engaging (+7.5% preference) and more fluent (+0.96 MOS).The perplexity also shows a 11.69 point improvement.
|
| 6 |
+
|
| 7 |
+
To create a dataset for document grounded conversations, we seek the following things:(1) A set of documents(2) Two humans chatting about the content of the document for more than 12 turns.We collected conversations about the documents through Amazon Mechanical Turk (AMT).We restrict the topic of the documents to be movie-related articles to facilitate the conversations.We initially experimented with different potential domains. Since movies are engaging and widely known, people actually stay on task when discussing them.In fact in order to make the task interesting, we offered a choice of movies to the participants so that they are invested in the task.
|
| 8 |
+
|
| 9 |
+
We choose Wikipedia (Wiki) 111https://en.wikipedia.orgarticles to create a set of documents𝑫={d1,…,d30}𝑫subscript𝑑1…subscript𝑑30\boldsymbol{D}=\{d_{1},\ldots,d_{30}\} for grounding of conversations.We randomly select 30 movies, covering various genres likethriller, super-hero, animation, romantic, biopic etc.We extract the key information provided in the Wiki article and divide it into four separate sections.This was done to reduce the load of the users to read, absorb and discuss the information in the document.Hence, each movie document disubscript𝑑𝑖d_{i} consists of four sections {s1,s2,s3,s4}subscript𝑠1subscript𝑠2subscript𝑠3subscript𝑠4\{s_{1},s_{2},s_{3},s_{4}\} corresponding to basic information and three key scenes of the movie.The basic information section s1subscript𝑠1s_{1} contains data from the Wikipedia article in a standard form such as year, genre, director.It also includes a short introduction about the movie, ratings from major review websites, and some critical responses.Each of the key scene sections {s2,s3,s4}subscript𝑠2subscript𝑠3subscript𝑠4\{s_{2},s_{3},s_{4}\} contains one short paragraph from the plot of the movie.Each paragraph contains on an average 7 sentences and 143 words.These paragraphs were extracted automatically from the original articles, and were then lightly edited by hand to make them of consistent size and detail.An example of the document is attached in Appendix.
|
| 10 |
+
|
| 11 |
+
To create a dataset of conversations which uses the information from the document, involves the participation of two workers.Hence, we explore two scenarios: (1) Only one worker has access to the document and the other worker does not and (2) Both the workers have access to the document.In both settings, they are given the common instructions of chatting for at least 12 turns.
|
| 12 |
+
|
| 13 |
+
In this scenario, only one worker has access to the document.The other worker cannot see the document.The instruction to the worker with the document is: Tell the other user what the movie is, and try to persuade the other user to watch/not to watch the movie using the information in the document;and the instruction to the worker without the document is: After you are told the name of the movie, pretend you are interested in watching the movie, and try to gather all the information you need to make a decision whether to watch the movie in the end.An example of part of the dialogue for this scenario is shown in Table 1.
|
| 14 |
+
|
| 15 |
+
In this scenario, both the workers have access to the same Wiki document.The instruction given to the workers are: Discuss the content in the document with the other user, and show whether you like/dislike the movie.An example of the dialogue for this scenario is shown in Table 2.
|
| 16 |
+
|
| 17 |
+
When the two workers enter the chat-room, they are initially given only the first section on basic information s1subscript𝑠1s_{1} of the document disubscript𝑑𝑖d_{i}.After the two workers complete 3 turns (for the first section 6 turns is needed due to initial greetings),the users will be shown the next section.The users are encouraged to discuss information in the new section, but are not constrained to do so.
|
| 18 |
+
|
| 19 |
+
The dataset consists of total 4112 conversations with an average of 21.43 turns.The number of conversations for scenario 1 is 2128 and for scenario 2 it is 1984.We consider a turn to be an exchange between two workers (say w1𝑤1w1 and w2subscript𝑤2w_{2}).Hence an exchange of w1,w2,w1subscript𝑤1subscript𝑤2subscript𝑤1w_{1},w_{2},w_{1} has 2 turns (w1subscript𝑤1w_{1}, w2subscript𝑤2w_{2}) and (w2subscript𝑤2w_{2}, w1subscript𝑤1w_{1}).We show the comparison of our dataset as CMU Document Grounded Conversations (CMU_DoG) with other datasets in Table 3.One of the salient features of CMUDoG dataset is that it has mapping of the conversation turns to each section of the document, which can then be used to model conversation responses.Another useful aspect is that we report the quality of the conversations in terms of how much the conversation adheres to the information in the document.
|
| 20 |
+
|
| 21 |
+
We automatically measure the quality of the conversations using BLEU Papineni et al. (2002) score.We use BLEU because we want to measure the overlap of the turns of the conversation with the sections of the document.Hence, a good quality conversation should use more information from the document than a low quality conversation.We divide our dataset into three ratings based on this measure.The BLEU score is calculated between all the utterances {x1,…,xn}subscript𝑥1…subscript𝑥𝑛\{x_{1},\ldots,x_{n}\} of a conversation Cisubscript𝐶𝑖C_{i} and the document disubscript𝑑𝑖d_{i} corresponding to Cisubscript𝐶𝑖C_{i}.We eliminate incomplete conversations that have less than 10 turns.The percentiles for the remaining conversations are shown in Table 5.We split the dataset into three ratings based on BLEU score.
|
| 22 |
+
|
| 23 |
+
Conversations are given a rating of 1 if their BLEU score is less than or equal to 0.1.We consider these conversations to be of low-quality.
|
| 24 |
+
|
| 25 |
+
All the conversations that do not fit in rating 1 and 3 are marked with a rating of 2.
|
| 26 |
+
|
| 27 |
+
Conversations are labeled with a rating of 3, only if the conversation has more than 12 turns andhas a BLEU score larger than 0.587.This threshold was calculated by summing the mean (0.385) and the standard deviation (0.202) of BLEU scores of the conversations that do not belong rating 1.
|
| 28 |
+
|
| 29 |
+
The average BLEU score for workers who have access to the document is 0.22 whereas the average BLEU score for the workers without access to the document is 0.03.This suggests that even if the workers had external knowledge about the movie, they have not extensively used it in the conversation.It also suggests that the workers with the document have not used the information from the document verbatim in the conversation.Table 4 shows the statistics on the total number of conversations, utterances, and average number of utterances per conversation and average length of utterances for all the three ratings.
|
| 30 |
+
|
| 31 |
+
In this section we discuss models which can leverage the information from the document for generating responses.We explore generative models for this purpose.Given a dataset 𝑿={x0,…,xn}𝑿subscript𝑥0…subscript𝑥𝑛\boldsymbol{X}=\{x_{0},\ldots,x_{n}\} of utterances in a conversation Cisubscript𝐶𝑖C_{i}, we consider two settings: (1) to generate a response xi+1subscript𝑥𝑖1x_{i+1} when given only the current utterance xisubscript𝑥𝑖x_{i} and (2) to generate a response xi+1subscript𝑥𝑖1x_{i+1} when given the corresponding section sisubscript𝑠𝑖s_{i} and the previous utterance xisubscript𝑥𝑖x_{i}.
|
| 32 |
+
|
| 33 |
+
We use the sequence-to-sequence model Sutskever et al. (2014) to build our baseline model.Formally, let 𝜽Esubscript𝜽𝐸\boldsymbol{\theta}_{E} represent the parameters of the encoder.Then the representation 𝒉xisubscript𝒉subscript𝑥𝑖\boldsymbol{h}_{x_{i}} of the current utterance xisubscript𝑥𝑖x_{i} is given by:𝒉xi=Encoder(𝒙i;𝜽E)subscript𝒉subscript𝑥𝑖Encodersubscript𝒙𝑖subscript𝜽𝐸\boldsymbol{h}_{x_{i}}=\text{Encoder}(\boldsymbol{x}_{i};\boldsymbol{\theta}_{E})(1)Samples of xi+1subscript𝑥𝑖1x_{i+1} are generated as follows:p(𝒙^|𝒉xi)=∏tp(x^t|𝒙^<t,𝒉xi)𝑝conditional^𝒙subscript𝒉subscript𝑥𝑖subscriptproduct𝑡𝑝conditionalsubscript^𝑥𝑡superscript^𝒙absent𝑡subscript𝒉subscript𝑥𝑖p(\hat{\boldsymbol{x}}|\boldsymbol{h}_{x_{i}})=\prod_{t}p(\hat{x}_{t}|\hat{\boldsymbol{x}}^{<t},\boldsymbol{h}_{x_{i}})(2)where, 𝒙^<tsuperscript^𝒙absent𝑡\hat{\boldsymbol{x}}^{<t} are the tokens generated before x^tsubscript^𝑥𝑡\hat{x}_{t}. We also use global attention Luong et al. (2015) with copy mechanism See et al. (2017) to guide our generators to replace the unknown (UNK) tokens. We call this model SEQ.
|
| 34 |
+
|
| 35 |
+
We extend the sequence-to-sequence framework to include the section sisubscript𝑠𝑖s_{i} corresponding the current turn.We use the same encoder to encode both the utterance and the section.We get the representation 𝒉xisubscript𝒉subscript𝑥𝑖\boldsymbol{h}_{x_{i}} of the current utterance xisubscript𝑥𝑖x_{i} using Eq. 1.The representation of the section is given by:𝒉si=Encoder(𝒔i;𝜽E)subscript𝒉subscript𝑠𝑖Encodersubscript𝒔𝑖subscript𝜽𝐸\boldsymbol{h}_{s_{i}}=\text{Encoder}(\boldsymbol{s}_{i};\boldsymbol{\theta}_{E})(3)The input at each time step t𝑡t to the generative model is given by ht=[xt−1;hs]subscriptℎ𝑡subscript𝑥𝑡1subscriptℎ𝑠h_{t}=[x_{t-1};h_{s}], where xt−1subscript𝑥𝑡1x_{t-1} is the embedding of the word at the previous time step.We call this model SEQS.
|
| 36 |
+
|
| 37 |
+
For both SEQ and SEQS model, we use a two-layer bidirectional LSTM as the encoder and a LSTM as the decoder.The dropout rate of the LSTM output is set to be 0.3.The size of hidden units for both LSTMs is 300.We set the word embedding size to be 100, since the size of vocabulary is relatively small222The total number of tokens is 46000, and we limit the vocabulary to be 10000 tokens..The models are trained with adam Kingma and Ba (2014) optimizer with learning rate 0.001 until they converge on the validation set for the perplexity criteria.We use beam search with size 5 for response generation.We use all the data (i.e all the conversations regardless of the rating and scenario) for training and testing.The proportion of train/validation/test split is 0.8/0.05/0.15.
|
| 38 |
+
|
| 39 |
+
In what follows, we first present an analysis of the dataset, then provide an automatic metric for evaluation of our models–perplexity and finally present the results of human evaluation of the generated responses for engagement and fluency.
|
| 40 |
+
|
| 41 |
+
We perform two kinds of automated evaluation to investigate the usefulness of the document in the conversation.The first one is to investigate if the workers use the information from the document in the conversation.The second analysis is to show that the document adds value to the conversation.Let the set of tokens in the current utterance xisubscript𝑥𝑖x_{i} be N𝑁N, the set of tokens in the current section sisubscript𝑠𝑖s_{i} be M𝑀M, the set of tokens inthe previous three utterances be H𝐻H, and the set of stop words be S𝑆S.In scenario 1, we calculate the set operation (NW) as |((N∩M)∖H)∖S|𝑁𝑀𝐻𝑆|((N\cap M)\setminus H)\setminus S|.Let the tokens that appear in all the utterances (xi,…,xi+ksubscript𝑥𝑖…subscript𝑥𝑖𝑘x_{i},\ldots,x_{i+k}) corresponding to the current section sisubscript𝑠𝑖s_{i} be K𝐾K and the tokens that appear in all the utterances (xi,…,xi+psubscript𝑥𝑖…subscript𝑥𝑖𝑝x_{i},\ldots,x_{i+p}) corresponding to the previous section si−1subscript𝑠𝑖1s_{i-1} be P𝑃P.In scenario 2, we calculate the set operation (NW) as |((K∩M)∖P)∖S|𝐾𝑀𝑃𝑆|((K\cap M)\setminus P)\setminus S|.The results in Table 6 show that peopleuse the information in the new sections and are not fixated on old sections. It also shows that they use the information to construct the responses.
|
| 42 |
+
|
| 43 |
+
To automatically evaluate the fluency of the models, we use perplexity measure.We build a language model on the train set of responses using ngrams up to an order of 3333We use the SRILM toolkit Stolcke (2002).The generated test responses achieve a perplexity of 21.8 for the SEQ model and 10.11 for the SEQS model.This indicates that including the sections of document helps in the generation process.
|
| 44 |
+
|
| 45 |
+
We also perform two kinds of human evaluations to evaluate the quality of predicted utterances – engagement and fluency. These experiments are performed on Amazon Mechanical Turk.
|
| 46 |
+
|
| 47 |
+
We set up a pairwise comparison following Bennett (2005) to evaluate the engagement of the generated responses.The test presents the chat history (1 utterance) and then, in random order, its corresponding response produced by the SEQ and SEQS models.A third option “No Preference” was given to participants to mark no preference for either of the generated responses.The instruction given to the participants is “Given the above chat history as context, you have to pick the one which can be best used as the response based on the engagingness.”We randomly sample 90 responses from each model.Each response was annotated by 3 unique workers and we take majority vote as the final label.The result of the test is that SEQ generated responses were chosen only 36.4% times as opposed to SEQS generated responses which were chosen 43.9% and the “No Preference” option was chosen 19.6% of times.This result shows the information from the sections improves the engagement of the generated responses.
|
| 48 |
+
|
| 49 |
+
The workers were asked to evaluate the fluency of the generated response on a scale of 1 to 4, where 1 is unreadable and 4 is perfectly readable.We randomly select 120 generated responses from each model and each response was annotated by 3 unique workers.The SEQ model got a low score of 2.88, contrast to the SEQS score of 3.84.This outcome demonstrates that the information in the section also helps in guiding the generator to produce fluent responses.
|
| 50 |
+
|
| 51 |
+
In this paper we introduce a crowd-sourced conversations dataset that is grounded in a predefined set of documents which is available for download 444https://github.com/festvox/datasets-CMU_DoG.We perform multiple automatic and human judgment based analysis to understand the value the information from the document provides to the generation of responses.The SEQS model which uses the information from the section to generate responses outperforms the SEQ model in the evaluation tasks of engagement, fluency and perplexity.
|
| 52 |
+
|
| 53 |
+
•Batman Begins•Bruce Almighty•Batman v Superman: Dawn of Justice•Catch me if you can•Despicable me (2010)•Dunkirk•Frozen (2013)•Home Alone•How to Train Your Dragon (2010)•The Imitation Game•Iron Man (2008)•Jaws•John Wick (2014)•La La Land•Maleficient•Mean Girls•Monsters University•Real Steel•The Avengers (2012)•The Blind Side•The Great Gatsby (2013)•The Inception•The Notebook•The Post•The Shape of Water•The Social Network•The Wolf of Wall Street•Toy Story•Wonder Woman•Zootopia
|
| 54 |
+
|
| 55 |
+
•The user you are pairing does not have the document you hold. Please read the document first.•Tell the other user what the movie is, and try to persuade the other user to watch/not to watch the movie using the information in the document.•You should try to discuss the new paragraph when the document has changed.•You will have 3 turns of conversation with your partner on each of the documents.•You will be given 4 documents each containing a short paragraph. The new paragraph might show just beneath the previous document.•The next document will be loaded automatically after you finish 3 turns discussing the current document.•You cannot use information you personally know that is not included there. You can use any information given in the document in the conversation.
|
| 56 |
+
|
| 57 |
+
•The other user will read a document about a movie.•If you are not told the name of the movie, try to ask the movie name.•After you are told the name of the movie, pretend you are interested in watching the movie, and try to gather all the information you need to make a decision whether to watch the movie in the end.•You don’t have to tell the other user you decision in the end, but please share your mind at the feedback page.
|
| 58 |
+
|
| 59 |
+
•The user you pair with has the same set of documents as yours. Please read the document first•Imagine you just watched this movie. Discuss the content in the document with the other user, and show whether you like/dislike the movie.•You should try to discuss the new paragraph when the document has changed.•You will have 3 turns of conversation with your partner on each of the documents.•You will be given 4 documents each containing a short paragraph. The new paragraph might show just beneath the previous document•The next document will be loaded automatically after you finish 3 turns discussing the current document.•You cannot use information you personally know that is not included there. You can use any information given in the document in the conversation.
|
| 60 |
+
|
| 61 |
+
Choose any:•The document is understandable.•The other user is actively responding to me.•The conversation goes smoothly.Choose one of the following:•I have watched the movie before.•I have not watched the movie before.
|
| 62 |
+
|
| 63 |
+
Choose any:•The document is understandable.•The other user is actively responding to me.•The conversation goes smoothly.Choose one of the following:•I will watch the movie after the other user’s introduction.•I will not watch the movie after the other user’s introduction.
|
1809.07394v3.txt
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Water and fire managers in the western United States (U.S.) rely on subseasonal forecasts—forecasts of temperature and precipitation two to six weeks in advance—to allocate water resources, manage wildfires, and prepare for droughts and other weather extremes (White et al., 2017).While purely physics-based numerical weather prediction dominates the landscape of short-term weather forecasting, such deterministic methods have a limited skillful (i.e., accurate) forecast horizon due to the chaotic nature of their differential equations (Lorenz, 1963). Prior to the widespread availability of operational numerical weather prediction, weather forecasters made predictions using their knowledge of past weather patterns and climate (sometimes called the method of analogs) (Nebeker, 1995). The current availability of ample meteorological records and high-performance computing offers the opportunity to blend physics-based and statistical machine learning (ML) approaches to extend the skillful forecast horizon.
|
| 2 |
+
|
| 3 |
+
This data and computing opportunity, coupled with the critical operational need, motivated the U.S. Bureau of Reclamation and the National Oceanic and Atmospheric Administration (NOAA) to conduct the Subseasonal Climate Forecast Rodeo (Nowaket al., 2017), a year-long real-time forecasting challenge, in which participants aimed to skillfully predict temperature and precipitation in the western U.S. two to four weeks and four to six weeks in advance. To meet this challenge, we developed an ML-based forecasting system and a SubseasonalRodeo dataset (Hwanget al., 2018) suitable for training and benchmarking subseasonal forecasts.
|
| 4 |
+
|
| 5 |
+
ML approaches have been successfully applied to bothshort-term (<2absent2<2 week) weather forecasting (Karstenset al., 2018; Ghosh andKrishnamurti, 2018; Herman andSchumacher, 2018; Xingjian et al., 2015; Hernández et al., 2016; Qiu et al., 2017; Ghaderiet al., 2017; Kuligowski andBarros, 1998; Horenko et al., 2008; Radhika andShashi, 2009; Karevan andSuykens, 2016; Cofino et al., 2002; Groveret al., 2015) and longer-term climate prediction (Strobach and Bel, 2016; Badret al., 2014; Totz et al., 2017; Iglesiaset al., 2015; Cohen et al., 2019), but mid-term subseasonal outlooks, which depend on both local weather and global climate variables, still lack skillful forecasts (Robertson et al., 2015).
|
| 6 |
+
|
| 7 |
+
Our subseasonal ML system is an ensemble of two nonlinear regression models: a local linear regression model with multitask feature selection (MultiLLR) and a weighted local autoregression enhanced with multitask k𝑘k-nearest neighbor features (AutoKNN).The MultiLLR model introduces candidate regressors from each data source in the SubseasonalRodeo dataset and then prunes irrelevant predictors using a multitask backward stepwise criterion designed for the forecasting skill objective.The AutoKNN model extracts features only from the target variable (temperature or precipitation), combining lagged measurements with a skill-specific form of nearest-neighbor modeling.For each of the two Rodeo target variables (temperature and precipitation) and forecast horizons (weeks 3-4 and weeks 5-6), this paper makes the following principal contributions:(1)We release a new SubseasonalRodeo dataset suitable for training and benchmarking subseasonal forecasts.(2)We introduce two subseasonal regression approaches tailored to the forecast skill objective, one of which uses only features of the target variable.(3)We introduce a simple ensembling procedure that provably improves average skill whenever average skill is positive.(4)We show that each regression method alone outperforms the Rodeo benchmarks, including a debiased version of the operational U.S. Climate Forecasting System (CFSv2), and that our ensemble outperforms the top Rodeo competitor.(5)We show that, over 2011-2018, an ensemble of our models and debiased CFSv2 improves debiased CFSv2 skill by 40-50% for temperature and 129-169% for precipitation.We hope that this work will expose the ML community to an important problem ripe for ML development—improving subseasonal forecasting for water and fire management,demonstrate that ML tools can lead to significant improvements in subseasonal forecasting skill, and stimulate future development with the release of our user-friendly Python Pandas SubseasonalRodeo dataset.
|
| 8 |
+
|
| 9 |
+
While statistical modeling was common in the early days of weather and climate forecasting (Nebeker, 1995), purely physics-based dynamical modeling of atmosphere and oceans rose to prominence in the 1980s and has been the dominant forecasting paradigm in major climate prediction centers since the 1990s (Barnston et al., 2012).Nevertheless, skillful statistical machine learning approaches have been developed for short-term weather forecasting with outlooks ranging from hours to two weeks ahead (Karstenset al., 2018; Ghosh andKrishnamurti, 2018; Herman andSchumacher, 2018; Xingjian et al., 2015; Hernández et al., 2016; Qiu et al., 2017; Ghaderiet al., 2017; Kuligowski andBarros, 1998; Horenko et al., 2008; Radhika andShashi, 2009; Karevan andSuykens, 2016; Cofino et al., 2002; Groveret al., 2015) and for coarse-grained long-term climate forecasts with target variables aggregated over months or years (Strobach and Bel, 2016; Badret al., 2014; Totz et al., 2017; Iglesiaset al., 2015; Cohen et al., 2019).Tailored machine learning solutions are also available for detecting and predicting weather extremes (McGovern et al., 2014; Liu et al., 2016; Racah et al., 2017).However, subseasonal forecasting, with its 2-6 week outlooks and biweekly granularity, is considered more difficult than either short-term weather forecasting or long-term climate forecasting, due to its complex dependence on both local weather and global climate variables (White et al., 2017).We complement prior work by developing a dataset and an ML-based forecasting system suitable for improving temperature and precipitation prediction in this traditional ‘predictability desert’ (Vitartet al., 2012).
|
| 10 |
+
|
| 11 |
+
The Subseasonal Climate Forecast Rodeo was a year-long, real-time forecasting competition in which, every two weeks, contestants submitted forecasts for average temperature (∘C) and total precipitation (mm) at two forecast horizons, 15-28 days ahead (weeks 3-4) and 29-42 days ahead (weeks 5-6). The geographic region of interest was the western contiguous United States, delimited by latitudes 25N to 50N and longitudes 125W to 93W, at a 1∘ by 1∘ resolution, for a total of G=514𝐺514G=514 grid points. The initial forecasts were issued on April 18, 2017 and the final on April 3, 2018.
|
| 12 |
+
|
| 13 |
+
Forecasts were judged on the spatial cosine similarity between predictions and observations adjusted by a long-term average.More precisely, let t𝑡t denote a date represented by the number of days since January 111, 190119011901, and let year(t)year𝑡\texttt{year}(t), doy(t)doy𝑡\texttt{doy}(t), and monthday(t)monthday𝑡\texttt{monthday}(t) respectively denote the year, the day of the year, and the month-day combination (e.g., January 111) associated with that date.We associate with the two-week period beginning on t𝑡t an observed average temperature or total precipitation 𝐲t∈𝐑Gsubscript𝐲𝑡superscript𝐑𝐺\mathbf{y}_{t}\in\mathbf{R}^{G} and an observed anomaly(1)𝐚tsubscript𝐚𝑡\textstyle\mathbf{a}_{t}=𝐲t−𝐜monthday(t),absentsubscript𝐲𝑡subscript𝐜monthday𝑡\textstyle=\mathbf{y}_{t}-\mathbf{c}_{\texttt{monthday}(t)},where(4)𝐜dsubscript𝐜𝑑\textstyle\mathbf{c}_{d}≜130∑\Let@\restore@math@cr\default@tag:t=monthday(t)d,1981≤year(t)≤2010𝐲t≜absent130subscript\Let@\restore@math@cr\default@tag:t=monthday(t)d,1981≤year(t)≤2010subscript𝐲𝑡\textstyle\triangleq\frac{1}{30}\sum_{\vbox{\Let@\restore@math@cr\default@tag\halign{\hfil$\m@th\scriptstyle#$&$\m@th\scriptstyle{}#$\cr&t\,:\,\texttt{monthday}(t)=d,\\&1981\leq\texttt{year}(t)\leq 2010\crcr}}}\mathbf{y}_{t}is the climatology or long-term average over 1981-2010 for the month-day combination d𝑑d. Contestant forecasts 𝐲^tsubscript^𝐲𝑡\hat{\mathbf{y}}_{t} were judged on the cosine similarity—termed skill in meteorology—between their forecast anomalies 𝐚^t=𝐲^t−𝐜monthday(t)subscript^𝐚𝑡subscript^𝐲𝑡subscript𝐜monthday𝑡\hat{\mathbf{a}}_{t}=\hat{\mathbf{y}}_{t}-\mathbf{c}_{\texttt{monthday}(t)} and the observed anomalies:(5)skill(𝐚^t,𝐚t)≜cos(𝐚^t,𝐚t)=⟨𝐚^t,𝐚t⟩‖𝐚^t‖2‖𝐚t‖2.≜skillsubscript^𝐚𝑡subscript𝐚𝑡subscript^𝐚𝑡subscript𝐚𝑡subscript^𝐚𝑡subscript𝐚𝑡subscriptnormsubscript^𝐚𝑡2subscriptnormsubscript𝐚𝑡2\textstyle\text{skill}(\hat{\mathbf{a}}_{t},\mathbf{a}_{t})\triangleq\cos(\hat{\mathbf{a}}_{t},\mathbf{a}_{t})=\frac{\langle{\hat{\mathbf{a}}_{t}},{\mathbf{a}_{t}}\rangle}{\|\hat{\mathbf{a}}_{t}\|_{2}\|\mathbf{a}_{t}\|_{2}}.
|
| 14 |
+
|
| 15 |
+
To qualify for a prize, contestants had to achieve higher mean skill over all forecasts than two benchmarks, a debiased version of the physics-based operational U.S. Climate Forecasting System (CFSv2) and a damped persistence forecast. The official contest CFSv2 forecast for t𝑡t, an average of 32 operational forecasts based on 4 model initializations and 8 lead times, was debiased by adding the mean observed temperature or precipitation for monthday(t)monthday𝑡\texttt{monthday}(t) over 1999-2010 and subtracting the mean CFSv2 reforecast, an average of 8 lead times for a single initialization, over the same period.An exact description of the damped persistence model was not provided, but the Rodeo organizers reported it relied on “seasonally developed regression coefficients based on the historical climatology period of 1981-2010 that relate observations of the past two weeks to the forecast outlook periods on a grid cell by grid cell basis.”
|
| 16 |
+
|
| 17 |
+
Since the Rodeo did not provide data for training predictive models, we constructed our own SubseasonalRodeo dataset from a diverse collection of data sources. Unless otherwise noted below, spatiotemporal variables were interpolated to a 1∘ by 1∘ grid and restricted to the contest grid points, and daily measurements were replaced with average measurements over the ensuing two-week period.The SubseasonalRodeo dataset is available for download at (Hwanget al., 2018), and Appendix A provides additional details on data sources, processing, and variables ultimately not used in our solution.
|
| 18 |
+
|
| 19 |
+
Temperature Daily maximum and minimum temperature measurements at 2 meters (tmax and tmin) from 1979 onwards were obtained from NOAA’s Climate Prediction Center (CPC) Global Gridded Temperature dataset and converted to ∘C; the same data source was used to evaluate contestant forecasts. The official contest target temperature variable was tmp2m≜tmax+tmin2≜tmp2mtmaxtmin2\texttt{tmp2m}\triangleq\frac{\texttt{tmax}+\texttt{tmin}}{2}.
|
| 20 |
+
|
| 21 |
+
Precipitation Daily precipitation (precip) data from 1979 onward were obtained from NOAA’s CPC Gauge-Based Analysis of Global Daily Precipitation (Xie et al., 2010) and converted to mm; the same data source was used to evaluate contestant forecasts.We augmented this dataset with daily U.S. precipitation data in mm from 1948-1979 from the CPC Unified Gauge-Based Analysis of Daily Precipitation over CONUS.Measurements were replaced with sums over the ensuing two-week period.
|
| 22 |
+
|
| 23 |
+
Sea surface temperature and sea ice concentration NOAA’s Optimum Interpolation Sea Surface Temperature (SST) dataset provides SST and sea ice concentration data, daily from 1981 to the present (Reynolds et al., 2007).After interpolation, we extracted the top three principal components (PCs), (sst_i)i=13superscriptsubscriptsst_i𝑖13(\texttt{sst\_i})_{i=1}^{3} and (icec_i)i=13superscriptsubscripticec_i𝑖13(\texttt{icec\_i})_{i=1}^{3}, across grid points in the Pacific basin region (20S to 65N, 150E to 90W) based on PC loadings from 1981-2010.
|
| 24 |
+
|
| 25 |
+
Multivariate ENSO index (MEI) Bimonthly MEI values (mei) from 1949 to the present, were obtained from NOAA/Earth System Research Laboratory (Wolter, 1993; Wolter and Timlin, 1998). The MEI is a scalar summary of six variables (sea-level pressure, zonal and meridional surface wind components, SST, surface air temperature, and sky cloudiness) associated with El Niño/Southern Oscillation (ENSO), an ocean-atmosphere coupled climate mode.
|
| 26 |
+
|
| 27 |
+
Madden-Julian oscillation (MJO) Daily MJO values since 1974 are provided by the Australian Government Bureau of Meteorology (Wheeler andHendon, 2004). MJO is a metric of tropical convection on daily to weekly timescales and can have significant impact on the western United States’ subseasonal climate. We extract measurements of phase and amplitude on the target date but do not aggregate over the two-week period.
|
| 28 |
+
|
| 29 |
+
Relative humidity and pressure NOAA’s National Center for Environmental Prediction (NCEP)/National Center for Atmospheric Research Reanalysis dataset (Kalnayet al., 1996) contains daily relative humidity (rhum) near the surface (sigma level 0.995) from 1948 to the present and daily pressure at the surface (pres) from 1979 to the present.
|
| 30 |
+
|
| 31 |
+
Geopotential height To capture polar vortex variability, we obtained daily mean geopotential height at 10mb since 1948 from the NCEP Reanalysis dataset (Kalnayet al., 1996) and extracted the top three PCs (wind_hgt_10_i)i=13superscriptsubscriptwind_hgt_10_i𝑖13(\texttt{wind\_hgt\_10\_i})_{i=1}^{3} based on PC loadings from 1948-2010. No interpolation or contest grid restriction was performed.
|
| 32 |
+
|
| 33 |
+
NMME The North American Multi-Model Ensemble (NMME) is a collection of physics-based forecast models from various modeling centers in North America (Kirtmanet al., 2014). Forecasts issued monthly from the Cansips, CanCM3, CanCM4, CCSM3, CCSM4, GFDL-CM2.1-aer04, GFDL-CM2.5 FLOR-A06 and FLOR-B01, NASA-GMAO-062012, and NCEP-CFSv2 models were downloaded from the IRI/LDEO Climate Data Library. Each forecast contains monthly mean predictions from 0.5 to 8.5 months ahead. We derived forecasts by taking a weighted average of the monthly predictions with weights proportional to the number of target period days that fell into each month. We then formed an equally-weighted average (nmme_wo_ccsm3_nasa) of all models save CCSM3 and NASA (which were not reliably updated during the contest).Another feature was created by averaging the most recent monthly forecast of each model save CCSM3 and NASA (nmme0_wo_ccsm3_nasa).
|
| 34 |
+
|
| 35 |
+
In developing our forecasting models, we focused our attention on computationally efficient methods that exploited the multitask, i.e., multiple grid point, nature of our problem and incorporated the unusual forecasting skill objective function 5.For each target variable (temperature or precipitation) and horizon (weeks 3-4 or 5-6), our forecasting system relies on two regression models trained using two sets of features derived from the SubseasonalRodeo dataset.The first model, described in Section 4.1, introduces lagged measurements from all data sources in the SubseasonalRodeo dataset as candidate regressors. For each target date, irrelevant regressors are pruned automatically using multitask feature selection tailored to the cosine similarity objective.Our second model, described in Section 4.2, chooses features derived from the target variable (temperature or precipitation) using a skill-specific nearest neighbor strategy.The final forecast is obtained by ensembling the predictions of these two models in a manner well-suited to the cosine similarity objective.
|
| 36 |
+
|
| 37 |
+
Our first model uses lagged measurements from each of the data sources in the SubseasonalRodeo dataset as candidate regressors, with lags selected based on the temporal resolution of the measurement and the frequency of the data source update.The y-axis of Fig. 2 provides an explicit list of candidate regressors for each prediction task.The suffix anom indicates that feature values are anomalies instead of raw measurements, the substring shiftℓshiftℓ\texttt{shift}\ell indicates a lagged feature with measurements from ℓℓ\ell days prior, and the constant feature ones equals 111 for all datapoints.
|
| 38 |
+
|
| 39 |
+
We combine predictors using local linear regression with locality determined by the day of the year111As a matter of convention, we treat Feb. 29 as the same day as Feb. 28 when computing doy, so that doy(t)∈{1,…,365}doy𝑡1…365\texttt{doy}(t)\in\{1,\dots,365\}. (Algorithm 1).Specifically, the training data for a given target date is restricted to a 56-day (8-week) span around the target date’s day of the year (s=56𝑠56s=56). For example, if the target date is May 2, 2017, the training data consists of days within 56 days of May 2 in any year. We employ equal datapoint weighting (wt,g=1subscript𝑤𝑡𝑔1w_{t,g}=1) and no offsets (bt,g=0subscript𝑏𝑡𝑔0b_{t,g}=0).
|
| 40 |
+
|
| 41 |
+
As we do not expect all features to be relevant at all times of year, we use multitask feature selection tailored to the cosine objective to automatically identify relevant features for each target date. The selection is multitask in that variables for a target date are selected jointly for all grid points, while the coefficients associated with those variables are fit independently for each grid point using local linear regression.
|
| 42 |
+
|
| 43 |
+
The feature selection is performed for each target date using a customized backward stepwise procedure (Algorithm 2) built atop the local linear regression subroutine. At each step of the backward stepwise procedure, we regress the outcome on all remaining candidate predictors; the regression is fit separately for each grid point. A measure of predictive performance (described in the next paragraph) is computed, and the candidate predictor that decreases predictive performance the least is removed. The procedure terminates when no candidate predictor can be removed from the model without decreasing predictive performance by more than the tolerance threshold tol=0.01tol0.01\texttt{tol}=0.01.
|
| 44 |
+
|
| 45 |
+
Our measure of predictive performance is the average leave-one-year-out cross-validated (LOYOCV) skill on the target date’s day-of-year, where the average is taken across all years in the training data. The LOYOCV skill for a target date t𝑡t is the cosine similarity achieved by holding out a year’s worth of data around t𝑡t, fitting the model on the remaining data, and predicting the outcome for t𝑡t. When forecasting weeks 3-4, we hold out the data from 29 days before t𝑡t through 335 days after t𝑡t; for weeks 5-6, we hold out the data from 43 days before through 321 days after t𝑡t. This ensures that the model is not fitted on future dates too close to t𝑡t.For n𝑛n training dates, Y𝑌Y training years, and d𝑑d features, the MultiLLR running time is O(nd2+Yd3)𝑂𝑛superscript𝑑2𝑌superscript𝑑3O(nd^{2}+Yd^{3}) per grid point and step. In our experiments in Section 5, we run the per grid point regressions in parallel on each step, d𝑑d ranges from 20 to 23, and the average number of steps is 131313.
|
| 46 |
+
|
| 47 |
+
Our second model is a weighted local linear regression (Algorithm 1) with features derived exclusively from historical measurements of the target variable (temperature or precipitation). When predicting weeks 3-4, we include lagged temperature or precipitation anomalies from 29 days, 58 days, and 1 year prior to the target date; when predicting weeks 5-6, we use 43 days, 86 days, and 1 year. These lags are chosen because the most recent data available to us are from 29 days before the target date when predicting weeks 3-4 and 58 days before the target date when predicting weeks 5-6.
|
| 48 |
+
|
| 49 |
+
In addition to fixed lags, we include the constant intercept ones and the observed anomaly patterns of the target variable on similar dates in the past (Algorithm 3).Our measure of similarity is tailored to the cosine similarity objective: similarity between a target date and another date is measured as the mean skill observed when the historical anomalies preceding the candidate date are used to forecast the historical anomalies of the target date. The mean skill is computed over a history of H=60𝐻60H=60 days, starting 1 year prior to the target date (lag ℓ=365ℓ365\ell=365). Only dates with observations fully observed prior to the forecast issue date are considered viable. We find the 20 viable candidate dates with the highest similarity to the target date and scale each neighbor date’s observed anomaly vector so that it has a standard deviation equal to 1.The resulting features are knn1 (the most similar neighbor) through knn20 (the 20th most similar neighbor).We find the k=20𝑘20k=20 top neighbors for each of n𝑛n training dates in parallel, using O(knHG)𝑂𝑘𝑛𝐻𝐺O(knHG) time per date.
|
| 50 |
+
|
| 51 |
+
To predict a given target date, we regress onto the three fixed lags, the constant intercept feature ones, and either knn1 through knn20 (for temperature) or knn1 only (for precipitation), treating each grid point as a separate prediction task. We found that including knn2 through knn20 did not lead to improved performance for predicting precipitation. For each grid point, we fit a weighted local linear regression, with weights wt,gsubscript𝑤𝑡𝑔w_{t,g} given by 111 over the variance of the target anomaly vector. As with MultiLLR, locality is determined by the day of the year. For predicting precipitation, we restrict the training data to a 56-day span s𝑠s around the target date’s day of the year. For predicting temperature, we use all dates.In each case, we use a climatology offset (bt,g=cmonthday(t),gsubscript𝑏𝑡𝑔subscript𝑐monthday𝑡𝑔b_{t,g}=c_{\texttt{monthday}(t),g}) so that the effective target variable is the measurement anomaly rather than the raw measurement.Given d𝑑d features and n𝑛n training dates, the final regression is carried out in O(nd2)𝑂𝑛superscript𝑑2O(nd^{2}) time per grid point. In our experiments in Section 5, per grid point regressions were performed in parallel, and d=24𝑑24d=24 for temperature and d=5𝑑5d=5 for precipitation.
|
| 52 |
+
|
| 53 |
+
Our final forecasting model is obtained by ensembling the predictions of the MultiLLR and AutoKNN models. Specifically, for a given target date, we take as our ensemble forecast anomalies the average of the ℓ2subscriptℓ2\ell_{2}-normalized predicted anomalies of the two models:(6)𝐚^ensemble≜12𝐚^multillr‖𝐚^multillr‖2+12𝐚^autoknn‖𝐚^autoknn‖2.≜subscript^𝐚ensemble12subscript^𝐚multillrsubscriptnormsubscript^𝐚multillr212subscript^𝐚autoknnsubscriptnormsubscript^𝐚autoknn2\textstyle\hat{\mathbf{a}}_{\textrm{ensemble}}\triangleq\frac{1}{2}\frac{\hat{\mathbf{a}}_{\textrm{multillr}}}{\mathopen{}\mathclose{{}\left\|{\hat{\mathbf{a}}_{\textrm{multillr}}}}\right\|_{2}}+\frac{1}{2}\frac{\hat{\mathbf{a}}_{\textrm{autoknn}}}{\mathopen{}\mathclose{{}\left\|{\hat{\mathbf{a}}_{\textrm{autoknn}}}}\right\|_{2}}.The ℓ2subscriptℓ2\ell_{2} normalization is motivated by the following result, which implies that the skill of 𝐚^ensemblesubscript^𝐚ensemble\hat{\mathbf{a}}_{\textrm{ensemble}} is strictly better than the average skill of 𝐚^multillrsubscript^𝐚multillr\hat{\mathbf{a}}_{\textrm{multillr}} and 𝐚^autoknnsubscript^𝐚autoknn\hat{\mathbf{a}}_{\textrm{autoknn}} whenever that average skill is positive.
|
| 54 |
+
|
| 55 |
+
Proof The sign claim follows from the equalities(10)∑i=1mpicos(𝐚^i,𝐚)superscriptsubscript𝑖1𝑚subscript𝑝𝑖subscript^𝐚𝑖𝐚\textstyle\sum_{i=1}^{m}p_{i}\cos(\hat{\mathbf{a}}_{i},\mathbf{a})=∑i=1mpi⟨𝐚^i‖𝐚^i‖2,𝐚‖𝐚‖2⟩absentsuperscriptsubscript𝑖1𝑚subscript𝑝𝑖subscript^𝐚𝑖subscriptnormsubscript^𝐚𝑖2𝐚subscriptnorm𝐚2\textstyle=\sum_{i=1}^{m}p_{i}\langle{\frac{\hat{\mathbf{a}}_{i}}{\mathopen{}\mathclose{{}\left\|{\hat{\mathbf{a}}_{i}}}\right\|_{2}}},{\frac{\mathbf{a}}{\mathopen{}\mathclose{{}\left\|{\mathbf{a}}}\right\|_{2}}}\rangle(11)=⟨𝐚¯(𝐩),𝐚‖𝐚‖2⟩=cos(𝐚¯(𝐩),𝐚)‖𝐚¯(𝐩)‖2.absentsubscript¯𝐚𝐩𝐚subscriptnorm𝐚2subscript¯𝐚𝐩𝐚subscriptnormsubscript¯𝐚𝐩2\textstyle=\textstyle\langle{\bar{\mathbf{a}}_{(\mathbf{p})}},{\frac{\mathbf{a}}{\mathopen{}\mathclose{{}\left\|{\mathbf{a}}}\right\|_{2}}}\rangle=\textstyle\cos(\bar{\mathbf{a}}_{(\mathbf{p})},\mathbf{a})\ \|\bar{\mathbf{a}}_{(\mathbf{p})}\|_{2}.Since the forecasts are distinct, Jensen’s inequality now yields the magnitude claim as(12)|∑i=1mpicos(𝐚^i,𝐚)|superscriptsubscript𝑖1𝑚subscript𝑝𝑖subscript^𝐚𝑖𝐚\textstyle\textstyle|\sum_{i=1}^{m}p_{i}\cos(\hat{\mathbf{a}}_{i},\mathbf{a})|=|cos(𝐚¯(𝐩),𝐚)|‖𝐚¯(𝐩)‖2absentsubscript¯𝐚𝐩𝐚subscriptnormsubscript¯𝐚𝐩2\textstyle=|\cos(\bar{\mathbf{a}}_{(\mathbf{p})},\mathbf{a})|\ \|\bar{\mathbf{a}}_{(\mathbf{p})}\|_{2}(13)≤|cos(𝐚¯(𝐩),𝐚)|∑i=1mpi‖𝐚^i‖2‖𝐚^i‖2=|cos(𝐚¯(𝐩),𝐚)|,absentsubscript¯𝐚𝐩𝐚superscriptsubscript𝑖1𝑚subscript𝑝𝑖subscriptnormsubscript^𝐚𝑖2subscriptnormsubscript^𝐚𝑖2subscript¯𝐚𝐩𝐚\textstyle\leq|\cos(\bar{\mathbf{a}}_{(\mathbf{p})},\mathbf{a})|\sum_{i=1}^{m}p_{i}\frac{\mathopen{}\mathclose{{}\left\|{\hat{\mathbf{a}}_{i}}}\right\|_{2}}{\mathopen{}\mathclose{{}\left\|{\hat{\mathbf{a}}_{i}}}\right\|_{2}}=|\cos(\bar{\mathbf{a}}_{(\mathbf{p})},\mathbf{a})|,with strict inequality when ∑i=1mpicos(𝐚^i,𝐚)≠0superscriptsubscript𝑖1𝑚subscript𝑝𝑖subscript^𝐚𝑖𝐚0\sum_{i=1}^{m}p_{i}\cos(\hat{\mathbf{a}}_{i},\mathbf{a})\neq 0.∎
|
| 56 |
+
|
| 57 |
+
In this section we evaluate our model forecasts over the Rodeo contest period and over each year following the climatology period and explore the relevant features inferred by each model.Python 2.7 code to reproduce all experiments can be found at https://github.com/paulo-o/forecast_rodeo.
|
| 58 |
+
|
| 59 |
+
For each target date in the contest period, the Rodeo organizers provided the skills of two baseline models, debiased CFSv2 and damped persistence.To provide baselines for evaluation outside the contest period, we reconstructed a debiased CFSv2 forecast approximating the contest guidelines.We were unable to recreate the damped persistence model, as no exact description was provided.
|
| 60 |
+
|
| 61 |
+
We first reconstructed the undebiased 2011-2018 CFSv2 forecasts using the 6-hourly CFSv2 Operational Forecast datasetand, for each month-day combination, computed long-term CFS reforecast averages over 1999-2010 using the 666-hourly CFS Reforecast High-Priority Subset (Saha et al., 2014). For each target two-week period and horizon, we averaged eight forecasts, issued at 6-hourly intervals. For weeks 3-4, the eight forecasts came from 15 and 16 days prior to the target date; for weeks 5-6, we used 29 and 30 days prior.For each date t𝑡t, we then reconstructed the debiased CFSv2 forecast by subtracting the long-term CFS average and adding the observed target variable average over 1999-2010 for monthday(t)monthday𝑡\texttt{monthday}(t) to the reconstructed CFSv2 forecast.Our reconstructed debiased forecasts are available for download at (Hwang et al., 2019), and Appendix B provides more details on data sources and processing.
|
| 62 |
+
|
| 63 |
+
While the official contest CFSv2 baseline averages the forecasts of four model initializations, the CFSv2 Operational Forecast dataset only provides the forecasts of one model initialization (the remaining model initialization forecasts are released in real time but deleted after one week). Thus, our reconstruction does not precisely match the contest baseline, but it provides a similarly competitive benchmark.
|
| 64 |
+
|
| 65 |
+
We now examine how our methods perform over the contest period, consisting of forecast issue dates between April 18, 2017, and April 17, 2018. Forecast issue dates occur every two weeks, so we have 26 realized skills for each method and each prediction task. Table 1 shows the average skills for each of our methods and each of the baselines. All three of our methods outperform the official contest baselines (debiased CFSv2 and damped persistence), and our ensemble outperforms the top Rodeo competitor in all four prediction tasks.Note that, while the remaining evaluations are of static modeling strategies, the competitor skills represent the real-time evaluations of forecasting systems that may have evolved over the course of the competition.
|
| 66 |
+
|
| 67 |
+
In Fig. 1 we plot the 26 realized skills for each method. In each plot, the average skill over the contest period is indicated by a vertical line. The histograms indicate that both of the official contest baselines have a number of extreme negative skills, which drag down their average skill over the contest period. Our ensemble avoids these extreme negative skills. For both precipitation tasks, the worst realized skills of the two baseline methods are −0.80.8-0.8 or worse; by contrast, the worst realized skill of the ensemble is −0.40.4-0.4.
|
| 68 |
+
|
| 69 |
+
Next, we evaluate the performance of our methods over each year following the climatology period.That is, following the template of the contest period, we associate with each year in 2011-2017 a sequence of biweekly forecast issue dates between April 18 of that year and April 17 of the following year. For example, forecasts with submission dates between April 18, 2011 and April 17, 2012 are considered to belong to the evaluation year 2011. To mimic the actual real-time use of the forecasting system to produce forecasts for a particular target date, we train our models using only data available prior to the forecast issue date; for example, the forecasts issued on April 18, 2011 are only trained on data available prior to April 18, 2011. We compare our methods to the reconstructed debiased CFSv2 forecast.
|
| 70 |
+
|
| 71 |
+
Table 2 shows the average skills of our methods and the reconstructed debiased CFSv2 forecast (denoted by rec-deb-cfs) in each year, 2011-2017.MultiLLR, AutoKNN, and the ensemble all achieve higher average skill than debiased CFSv2 on every task, save for MultiLLR on the temperature, weeks 3-4 task.The ensemble improves over the debiased CFSv2 average skill by 23% for temperature weeks 3-4, by 39% for temperature weeks 5-6, by 123% for precipitation weeks 3-4, and by 157% for precipitation weeks 5-6.
|
| 72 |
+
|
| 73 |
+
Table 2 also presents the average skills achieved by a three-component ensemble of MultiLLR, AutoKNN, and reconstructed debiased CFSv2.Guided by Proposition 1, we ℓ2subscriptℓ2\ell_{2}-normalize the anomalies of each model before taking an equal-weighted average. This ensemble (denoted by ens-cfs) produces higher average skills than the original ensemble in all prediction tasks. The ens-cfs ensemble also substantially outperforms debiased CFSv2, with skill improvements of 40% and 50% for the temperature tasks and 129% and 169% for the precipitation tasks. These results highlight the valuable roles that ML-based models, physics-based models, and principled ensembling can all play in subseasonal forecasting.
|
| 74 |
+
|
| 75 |
+
Interestingly, the skill improvements of AutoKNN were achieved without any use of physics-based model forecasts. Moreover, a Proposition 1 ensemble of just AutoKNN and rec-deb-cfsv2 realizes most of the gains of ens-cfs without using NMME. Indeed, this ensemble has mean skills over all years in Table 2 of (temp. weeks 3-4: 0.354, temp. weeks 5-6: 0.31, precip. weeks 3-4: 0.162, precip. weeks 5-6: 0.147).
|
| 76 |
+
|
| 77 |
+
While physics-based model forecasts contribute to MultiLLR through the NMME ensemble mean, nmme_wo_ccsm3_nasa alone achieves inferior mean skill(temp. weeks 3-4: 0.094, temp. weeks 5-6: 0.116, precip. weeks 3-4: 0.116, precip. weeks 5-6: 0.107) over all years in Table 2 than all proposed methods and even the temperature debiased CFSv2 baseline.One contributing factor to this performance is the mismatch between the monthly granularity of the publicly-available NMME forecasts and the biweekly granularity of our forecast periods.As a result, we anticipate that more granular NMME data would lead to significant improvements in the final MultiLLR model.
|
| 78 |
+
|
| 79 |
+
Fig. 2 shows the frequency with which each candidate feature was selected by MultiLLR in the four prediction tasks, across all target dates in the historical evaluation period. For all four tasks, the most frequently selected features include pressure (pres), the intercept term (ones), and temperature (tmp2m). The NMME ensemble average (nmme_wo_ccsm3_nasa) is the first or second most commonly selected feature for predicting precipitation, but its relative selection frequency is much lower for temperature.
|
| 80 |
+
|
| 81 |
+
Although we used a slightly larger set of candidate features for the precipitation tasks—23 for precipitation, compared to 20 for temperature—the selected models are more parsimonious for precipitation than for temperature.The median number of selected features for predicting temperature is 7 for both forecasting horizons, while the median number of selected features for predicting precipitation is 4 for weeks 3-4 and 5 for weeks 5-6.
|
| 82 |
+
|
| 83 |
+
Fig. 3(a) plots the month distribution of the top nearest neighbor learned by AutoKNN for predicting precipitation, weeks 3-4, as a function of the month of the target date. The figure shows that when predicting precipitation, the top neighbor for a target date is generally from the same time of year as the target date: for summer target dates, the top neighbor tends to be from a summer month and similarly for winter target dates. The corresponding plot for temperature (omitted due to space constraints) shows that this pattern does not hold when predicting temperature; rather, the top neighbors are drawn from throughout the year, regardless of the month of the target date.
|
| 84 |
+
|
| 85 |
+
The matrix plots in Fig. 3(b) show the year and month of the top 20 nearest neighbors for predicting temperature, weeks 3-4, as a function of the target date. In each plot, the vertical axis ranges from k=1𝑘1k=1 (most similar neighbor) to k=20𝑘20k=20 (20th most similar neighbor). The vertical striations in both plots indicate that the top 20 neighbors for a given target date tend to be homogeneous in terms of both month and year: neighbors tend to come from the same or adjacent years and times of year. Moreover. the neighbors for post-2015 target dates tend to be from post-2010 years, in keeping with recent years’ record high temperatures. The corresponding plots for precipitation (omitted due to space constraints) show that the top neighbors for precipitation do not disproportionately come from recent years, and the months of the top neighbors follow a regular seasonal pattern, consistent with Fig. 3(a).
|
| 86 |
+
|
| 87 |
+
To meet the USBR’s Subseasonal Climate Forecast Rodeo challenge,we developed an ML-based forecasting system and demonstrated 40-169% improvements in forecasting skill across the challenge period (2017-18) and the years 2011-18 more generally.Notably, the same procedures provide these improvements for each of the four Rodeo prediction tasks (forecasting temperature or precipitation at weeks 3-4 or weeks 5-6).In the short term, we anticipate that these improvements willbenefit disaster management (e.g., anticipating droughts, floods, and other wet weather extremes) and the water management, development, and protection operations of the USBR more generally (e.g., providing irrigation water to 20% of western U.S. farmers and generating hydroelectricity for 3.5 million homes).In the longer term, we hope that these tools will improve our ability to anticipate and manage wildfires (White et al., 2017).
|
| 88 |
+
|
| 89 |
+
Our experience also suggests that subseasonal forecasting is fertile ground for machine learning development.Much of the methodological novelty in our approach was driven by the unusual multitask forecasting skill objective. This objective inspired our new and provably beneficial ensembling approach and our custom multitask neighbor selection strategy.We hope that introducing this problem to the ML community and providing a user-friendly benchmark dataset will stimulate the development and evaluation of additional subseasonal forecasting approaches.
|
1809.07483v1.txt
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Clauses in a paragraph play different discourse and pragmatic roles and have different aspectual properties Smith (1997); Verkuyl (2013) accordingly.We aim to categorize a clause based on its aspectual property and more specifically, based on the type of Situation Entity (SE)111The Situation Entity (SE) type of a clause is defined with respect to three situation-related features: the main NP referent type (specific or generic), fundamental aspectual class (stative or dynamic), and whether the situation evoked is episodic or habitual Friedrich and Palmer (2014b). (e.g., events, states, generalizing statements and generic statements) the clause introduces to the discourse, following the recent work by Friedrich et al. (2016).Understanding SE types of clauses is beneficial for many NLP tasks, including discourse mode identification222E.g., EVENTs and STATEs are dominant in narratives while GENERALIZINGs and GENERICs are dominant in informative discourses. Smith (2003, 2005), text summarization, information extraction and question answering.
|
| 2 |
+
|
| 3 |
+
The situation entity type of a clause reflects discourse roles the clause plays in a paragraph and discourse role interpretation depends heavily on paragraph-wide contexts.Recently, Friedrich et al. (2016) used insightful syntactic-semantic features extracted from the target clause itself for SE type classification, which has achieved good performance across several genres when evaluated on the newly created large dataset MASC+Wiki.In addition, Friedrich et al. (2016) implemented a sequence labeling model with conditional random fields (CRF) Lafferty et al. (2001) for fine-tuning a sequence of predicted SE types.However, other than leveraging common SE label patterns (e.g., GENERIC clauses tend to cluster together.), this approach largely ignored the wider contexts a clause appears in when predicting its SE type.
|
| 4 |
+
|
| 5 |
+
To further improve the performance and robustness of situation entity type classification, we argue that we should consider influences of wider contexts more extensively, not only by fine-tuning a sequence of SE type predictions,but also in deriving clause representations and obtaining precise individual SE type predictions.For example, we distinguish GENERIC statements from GENERALIZING statements depending on if a clause expresses general information over classes or kinds instead of specific individuals.We recognize the latter two clauses in the following paragraph as GENERALIZING because both clauses describe situations related to the Amazon river:
|
| 6 |
+
|
| 7 |
+
(1): [Today, the Amazon river is experiencing a crisis of overfishing.]STATE [Both subsistence fishers and their commercial rivals compete in netting large quantities of pacu,]GENERALIZING [which bring good prices at markets in Brazil and abroad.]GENERALIZING
|
| 8 |
+
|
| 9 |
+
If we ignore the wider context, the second clause can be wrongly recognized as GENERIC easily since “fishers” usually refer to one general class rather than specific individuals.However, considering the background introduced in first clause, “fishers” here actually refer to the fishers who fish on Amazon river which become specific individuals immediately.
|
| 10 |
+
|
| 11 |
+
Therefore, we aim to build context-aware clause representations dynamically which are informed by their paragraph-wide contexts.Specifically, we propose a hierarchical recurrent neural network model to read a whole paragraph at a time and jointly learn representations for all the clauses in the paragraph.Our paragraph-level model derive clause representations by modeling inter-dependencies between clauses within a paragraph.In order to further improve SE type classification performance, we also add an extra CRF layer at the top of our paragraph-level model to fine-tune a sequence of SE type predictions over clauses Friedrich et al. (2016), which however is not our contribution.
|
| 12 |
+
|
| 13 |
+
Experimental results show that our paragraph-level neural network model greatly improves the performance of SE type classification on the same MASC+Wiki Friedrich et al. (2016) corpus and achieves robust performance close to human level.In addition, the CRF layer further improves the SE type classification results, but by a small margin.We hypothesize that situation entity type patterns across clauses may have been largely captured by allowing the preceding and following clauses to influence semantic representation building for a clause in the paragraph-level neural net model.
|
| 14 |
+
|
| 15 |
+
The situation entity types annotated in the MASC+Wiki corpus Friedrich et al. (2016) were initially introduced by Smith (2003), which were then extended by Palmer et al. (2007); Friedrich and Palmer (2014b).The situation entity types can be divided into the following broad categories:•Eventualities (EVENT, STATE and REPORT): for clauses representing actual happenings and world states.STATE and EVENT are two fundamental aspectual classes of a clause Siegel and McKeown (2000) which can be distinguished by the semantic property of dynamism.REPORT is a subtype of EVENT for quoted speech.•General Statives (GENERIC and GENERALIZING): for clauses that express general information over classes or kinds, or regularities related to specific main referents. The type GENERIC is for utterances describing a general class or kind rather than any specific individuals (e.g., People love dogs.). The type GENERALIZING is for habitual utterances that refer to ongoing actions or properties of specific individuals (e.g., Audubon educates the public.).•Speech Acts (QUESTION and IMPERATIVE): for clauses expressing two types of speech acts Searle (1969).
|
| 16 |
+
|
| 17 |
+
Although situation entities have been well-studied in linguistics, there were only several previous works focusing on data-driven SE type classification using computational methods.Palmer et al. (2007) first implemented a maximum entropy model for SE type classification relying on words, POS tags and some linguistic cues as main features.This work used a relatively small dataset (around 4300 clauses) and did not achieve satisfied performance (around 50% of accuracy).
|
| 18 |
+
|
| 19 |
+
To bridge the gap, Friedrich et al. (2016) created a much larger dataset MASC+Wiki (more than 40,000 clauses) and achieved better SE type classification performance (around 75% accuracy) by using rich features extracted from the target clause.The feature sets include POS tags, Brown cluster features, syntactic and semantic features of the main verb and main referent as well as features indicating the aspectual nature of a clause.Friedrich et al. (2016) further improved the performance by implementing a sequence labeling (CRF) model to fine-tune a sequence of SE type predictions and noted that much of the performance gain came from modeling the label pattern thatGENERIC clauses often occur together.In contrast, we focus on deriving dynamic clause representations informed by paragraph-level contexts and model context influences more extensively.
|
| 20 |
+
|
| 21 |
+
Becker et al. (2017) proposed a GRU based neural network model that predicts the SE type for one clause each time, by encoding the content of the target clause using a GRU and incorporating several sources of context information, including contents and labels of preceding clauses as well as genre information, using additional separate GRUs Chung et al. (2014).This model is different from our approach that processes one paragraph (with a sequence of clauses) at a time and extensively models inter-dependencies of clauses.
|
| 22 |
+
|
| 23 |
+
Other related tasks include predicting aspectual classes of verbs Friedrich and Palmer (2014a), classifying genericity of noun phrases Reiter and Frank (2010) and predicting clause habituality Friedrich and Pinkal (2015).
|
| 24 |
+
|
| 25 |
+
Learning latent representations and predicting a sequence of labels from a long sequence of sentences (clauses), such as a paragraph, is a challenging task.Recently, various neural network models, including Convolution Neural Network (CNN) Wang and Lu (2017), Recurrent Neural Network (RNN) based models Wang et al. (2015); Chiu and Nichols (2016); Huang et al. (2015); Ma and Hovy (2016); Lample et al. (2016) and Sequence to Sequence models Vaswani et al. (2016); Zheng et al. (2017), have been applied to the general task of sequence labeling.Among them, the bidirectional LSTM (Bi-LSTM) model Schuster and Paliwal (1997) has been widely used to process a paragraph for applications such as language generation Li et al. (2015), dialogue systems Serban et al. (2016) and text summarization Nallapati et al. (2016), because of its capabilities in modeling long-distance dependencies between words.In this work, we use two levels of Bi-LSTMs connected by a max-pooling layer to abstract clause representations by extensively modeling paragraph-wide contexts and inter-dependencies between clauses.
|
| 26 |
+
|
| 27 |
+
We design an unified neural network to extensively model word-level dependenciesas well as clause-level dependencies in deriving clause representations for SE type prediction.Figure 1 shows the architecture of the proposed paragraph-level neural network model which includes two Bi-LSTM layers, one max-pooling layer in between and one final softmax prediction layer.
|
| 28 |
+
|
| 29 |
+
Given the word sequence of one paragraph as input, the word-level Bi-LSTM will firstly generate a sequence of hidden states as word representations, then a max-pooling layer will be applied to abstract clause embeddings from word representations within a clause.Next, another clause-level Bi-LSTM will run over the sequence of clause embeddings and derive final clause representations by further modeling semantic dependencies between clauses within a paragraph.The softmax prediction layer will then predict a sequence of situation entity (SE) types with one label for each clause, based on the final clause representations.
|
| 30 |
+
|
| 31 |
+
Word Vectors:To transform the one-hot representation of each word into its distributed word vector Mikolov et al. (2013), we used the pre-trained 300-dimension Google English word2vec embeddings333Downloaded from https://docs.google.com/uc?id=0B7XkCwpI5KDYNlNUTTlSS21pQmM.For the words which are not included in the vocabulary of Google word2vec, we randomly initialize their word vectors with each dimension sampled from the range [−0.25,0.25]0.250.25[-0.25,0.25].
|
| 32 |
+
|
| 33 |
+
For situation entity type classification, it is important to recognize certain types of words such as punctuation marks (e.g., “?” for QUESTION and “!” for IMPERATIVE) as well as entities such as locations and time values.We therefore created feature-rich word vectors by concatenating word embeddings with parts-of-speech (POS) tag and named-entity (NE) tag one-hot embeddings444Our feature-rich word vectors are of dimension 343, including 300 dimensions for Google word2vec + 36 dimensions for POS tags + 7 dimensions for NE tags. We used the Stanford CoreNLP to generate POS tags and NE tags..
|
| 34 |
+
|
| 35 |
+
Deriving Clause Representations:In designing the model, we focus on building clause representations that sufficiently leverage cues from paragraph-wide contexts for SE type prediction, including both preceding and following clauses in a paragraph.To process long paragraphs which may contain a number of clauses, we utilize a two-level bottom-up abstraction approach and progressively obtain the compositional representation of each word (low-level) and then compute a compositional representation of each clause (high-level), with a max-pooling layer in between.
|
| 36 |
+
|
| 37 |
+
At both word-level and clause-level, we choose the Bi-LSTM as our basic neural net component for representation learning, mainly considering its ability to capture long-distance dependencies between words (clauses) and to integrate influences of context words (clauses) from both directions.
|
| 38 |
+
|
| 39 |
+
Given a word sequence X=(x1,x2,…,xL)𝑋subscript𝑥1subscript𝑥2…subscript𝑥𝐿X=(x_{1},x_{2},...,x_{L}) in a paragraph as the input, the word-level Bi-LSTM will process the input paragraph by using two separate LSTMs, one processes the word sequence from the left to right while the other processes the sequence from the right to left.Therefore, at each word position t𝑡t, we obtain two hidden states ht→,ht←→subscriptℎ𝑡←subscriptℎ𝑡\overrightarrow{h_{t}},\overleftarrow{h_{t}} and concatenate them to get the word representation ht=[ht→,ht←]subscriptℎ𝑡→subscriptℎ𝑡←subscriptℎ𝑡h_{t}=[\overrightarrow{h_{t}},\overleftarrow{h_{t}}].Then we apply the max-pooling operation over the sequence of word representations for words within a clause in order to get the initial clause embedding:hClause[j]=maxt=Clause_startClause_endht[j]subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒delimited-[]𝑗superscriptsubscript𝑡𝐶𝑙𝑎𝑢𝑠𝑒_𝑠𝑡𝑎𝑟𝑡𝐶𝑙𝑎𝑢𝑠𝑒_𝑒𝑛𝑑subscriptℎ𝑡delimited-[]𝑗\displaystyle h_{Clause}[j]=\max_{t=Clause\_start}^{Clause\_end}h_{t}[j]\quad(1)where,1≤j≤hidden_unit_size𝑤ℎ𝑒𝑟𝑒1𝑗ℎ𝑖𝑑𝑑𝑒𝑛_𝑢𝑛𝑖𝑡_𝑠𝑖𝑧𝑒\displaystyle where,1\leq j\leq hidden\_unit\_size(2)
|
| 40 |
+
|
| 41 |
+
Next, the clause-level Bi-LSTM will process the sequence of initial clause embeddings in a paragraph and generate refined hidden states hClause_t→→subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒_𝑡\overrightarrow{h_{Clause\_t}} and hClause_t←←subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒_𝑡\overleftarrow{h_{Clause\_t}} at each clause position t𝑡t.Then, we concatenate the two hidden states for a clause to get the final clause representation hClause_t=[hClause_t→,hClause_t←]subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒_𝑡→subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒_𝑡←subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒_𝑡h_{Clause\_t}=[\overrightarrow{h_{Clause\_t}},\overleftarrow{h_{Clause\_t}}].
|
| 42 |
+
|
| 43 |
+
Situation Entity Type Classification:Finally, the prediction layer will predict the situation entity type for each clause by applying the softmax function to its clause representation:yt=softmax(Wy∗hClause_t+by)subscript𝑦𝑡𝑠𝑜𝑓𝑡𝑚𝑎𝑥subscript𝑊𝑦subscriptℎ𝐶𝑙𝑎𝑢𝑠𝑒_𝑡subscript𝑏𝑦\displaystyle y_{t}=softmax(W_{y}*h_{Clause\_t}+b_{y})(3)
|
| 44 |
+
|
| 45 |
+
Previous studies Friedrich et al. (2016); Becker et al. (2017) show that there exist common SE label patterns between adjacent clauses.For example, Friedrich et al. (2016) reported the fact that GENERIC sentences usually occur together in a paragraph.Following Friedrich et al. (2016), in order to capture SE label patterns in our hierarchical recurrent neural network model, we add a CRF layer at the top of the softmax prediction layer (shown in figure 2) to fine-tune predicted situation entity types.
|
| 46 |
+
|
| 47 |
+
The CRF layer will update a state-transition matrix, which can effectively adjust the current label depending on its preceding and following labels.Both the training and decoding procedures of the CRF layer can be conducted efficiently using the Viterbi algorithm.With the CRF layer, the model jointly assigns a sequence of SE labels, one label per clause, by considering individual clause representations as well as common SE label patterns.
|
| 48 |
+
|
| 49 |
+
We finalized hyperparameters based on the best performance with 10-fold cross-validation on the training set.The word vectors were fixed during model training.Both word representations and clause representations in the model are of 300 dimensions, and all the Bi-LSTM layers contain 300 hidden units as well.To avoid overfitting, we applied dropout mechanism Hinton et al. (2012) with dropout rate of 0.5 to both input and output vectors of Bi-LSTM layers.To deal with the exploding gradient problem in LSTMs training, we utilized gradient clipping Pascanu et al. (2013) with gradient L2-norm threshold of 5.0 and used L2 regularization with λ=10−4𝜆superscript104\lambda=10^{-4} simultaneously.These parameters remained the same for all our proposed models including our own baseline models.
|
| 50 |
+
|
| 51 |
+
We chose the standard cross-entropy loss function for training our neural network models and adopted Adam Kingma and Ba (2014) optimizer with the initial learning rate of 0.001 and the batch size555Counted as the number of SEs rather than paragraph instances. of 128.All our proposed models were implemented with Pytorch666http://pytorch.org/ and converged to the best result within 40 epochs.Note that to diminish the effects of randomness in training neural network models and report stable experimental results, we ran each of the proposed models as well as our own baseline models ten times and reported the averaged performance across the ten runs.
|
| 52 |
+
|
| 53 |
+
The MASC+Wiki Corpus:We evaluated our neural network model on the MASC+Wiki corpus777www.coli.uni-saarland.de/projects/sitent/page.php?id=resources Friedrich et al. (2016), which contains more than 40,000 clauses and is the largest annotated dataset for situation entity type classification.The MASC+Wiki dataset is composed of documents from Wikipedia and MASC Ide et al. (2008) covering as many as 13 written genres (e.g., news, essays, fiction, etc).Table 1 shows statistics of the dataset, from which you can see that the SE type distribution is highly imbalanced.The majority SE type of MASC documents is STATE while the majority SE type of Wikipedia documents is GENERIC.To make our results comparable with previous works Friedrich et al. (2016); Becker et al. (2017), we used the same 80:20 train-test split with balanced genre distributions.
|
| 54 |
+
|
| 55 |
+
Preprocessing: As described in Friedrich et al. (2016), texts were split into clauses using SPADE Soricut and Marcu (2003).There are 4,784 paragraphs in total in the corpus; and on average, each paragraph contains 9.6 clauses.In figure 4, the horizontal axis shows the distribution of paragraphs based on the number of clauses in a paragraph.The annotations of clauses are stored in separate files from the text files.To recover the paragraph contexts for each clause, we matched its content with the corresponding raw document.
|
| 56 |
+
|
| 57 |
+
We compare the performance of our neural network model with two recent SE type classification models on the MASC+Wiki corpus as well as humans’ performance (upper bound).
|
| 58 |
+
|
| 59 |
+
•CRF Friedrich et al. (2016): a CRF model that relies heavily on features extracted from the target clause itself.•GRU Becker et al. (2017): a GRU based neural network model that incorporates context information by using separate GRU units and predicts the SE type for one clause each time.•Humans Friedrich et al. (2016): one annotator’s performance when using two other annotators’ annotation as “gold labels”. It has been reported that labeling SE types is a non-trivial task even for humans.
|
| 60 |
+
|
| 61 |
+
In addition, we implemented a clause-level Bi-LSTM model as our own baseline, which takes a single clause as its input.Since there is only one clause, the upper Bi-LSTM layer shown in Figure 1 is meaningless and removed in the clause-level Bi-LSTM model.
|
| 62 |
+
|
| 63 |
+
Following the previous work Friedrich et al. (2016) on the same task and dataset, we report accuracy and macro-average F1-score across SE types on the test set of MASC+Wiki.
|
| 64 |
+
|
| 65 |
+
The first section of Table 3 shows the results of the previous works.The second section shows the result of our implemented clause-level Bi-LSTM baseline, which already outperforms the previous best model.This result proves the effectiveness of the Bi-LSTM + max pooling approach in clause representation learning Conneau et al. (2017).The third section reports the performance of the paragraph-level models that uses paragraph-wide contexts as input.Compared with the baseline clause-level Bi-LSTM model, the basic paragraph-level model achieves 3.5% and 3.3% of performance gains in macro-average F1-score and accuracy respectively.Building on top of the basic paragraph-level model, the CRF layer further improves the SE type prediction performance slightly by 0.4% and 0.7% in macro-average F1-score and accuracy respectively.Therefore, our full model with the CRF layer achieves the state-of-the-art performance on the MASC+Wiki corpus.
|
| 66 |
+
|
| 67 |
+
We noticed that the previous work Friedrich et al. (2016) did not publish the class-wise performance of their model on the test set, instead, they reported the detailed performance on the training set using 10-fold cross-validation.For direct comparisons, we also report our 10-fold cross-validation results888The original folds split used by Friedrich et al. (2016) is not available. So we manually split folds by ourselves with even genre distribution across folds. on the training set of MASC+Wiki.
|
| 68 |
+
|
| 69 |
+
Table 2 reports the cross-validation classification results.Consistently, our clause-level baseline model already outperforms the previous best model.By exploiting paragraph-wide contexts, the basic paragraph-level model obtains consistent performance improvements across all the classes compared with the baseline clause-level prediction model, especially for the classes GENERIC and GENERALIZING, where the improvements are significant.After using the CRF layer to fine-tune the predicted SE label sequence, slight performance improvements were observed on the four small classes.Overall, the full paragraph-level neural network model achieves the best macro-average F1-score of 77.8% in predicting SE types, which not only outperforms all previous approaches but also reaches human-like performance on some classes.
|
| 70 |
+
|
| 71 |
+
Considering that MASC+Wiki is rich in written genres, we additionally conduct cross-genre classification experiments, where we use one genre of documents for testing and the other genres of documents for training.The purpose of cross-genre experiment is to see whether the model can work robustly across genres.
|
| 72 |
+
|
| 73 |
+
Table 4 shows cross-genre experimental results of our neural network models on the training set of MASC+Wiki by treating each genre as one cross-validation fold.As we expected, both the macro-average F1-score and class-wise F1 scores are lower compared with the results in Table 2 where in-genre data were used for model training as well.But the performance drop on the paragraph-level models is little, which clearly outperform the previous system Friedrich et al. (2016) and the baseline model by a large margin.As shown in Table 5, benefited from modeling wider contexts and common SE label patterns, our full paragraph-level model improves performance across almost all the genres.The high performance in the cross-genre setting demonstrates the robustness of our paragraph-level model across genres.
|
| 74 |
+
|
| 75 |
+
In order to understand how much training data is required to train the paragraph-level model and obtain a good performance for SE type classification, we plot the learning curve shown in Figure 3 by training the full model several times using an increasing amount of training data.The classification performance increased quickly before the amount of training data was increased to30% of the full training set; then the learning curve starts to become saturated afterwards.We conclude that the paragraph-level model can achieve a high performance quickly without requiring a large amount of training data.
|
| 76 |
+
|
| 77 |
+
To study the influence of paragraph lengths to the performance of the paragraph-level models, we report the performance of our proposed models on subsets of the test set, with paragraphs divided based on the number of clauses in a paragraph.The histogram in Figure 4 compares performance of the two paragraph-level models and the baseline model.Note that the last bucket (paragraphs containing ten or more clauses) of the histogram is especially large and contains over 30% of all the paragraphs in the test set.Clearly, the paragraph-level model greatly outperforms the baseline clause-level model on paragraphs containing more than 6 clauses, which covers over 50% of the test set.Adding the CRF layer further improves the performance of the paragraph-level model on long paragraphs (with 10 or more clauses), while the influences to the performance are mixed on short paragraphs.Therefore, it is beneficial to model wider paragraph-level contexts and inter-dependencies between clauses for situation entity type classification, especially when processing long paragraphs.
|
| 78 |
+
|
| 79 |
+
As one aspect of modeling context influences and clause inter-dependencies in SE type identification, we investigated the role of discourse connective phrases in determining the SE type of clauses they connect.Our assumption is that discourse connectives are important to glue clauses together and removing them affects text coherence and information flow between clauses.Intuitively, the connective “and” may occur between two clauses with the same SE type; “for example” may indicate that the following clause is not GENERIC.Therefore, we designed a pilot experiment to see whether discourse connective phrases are indispensable in building clause representations.
|
| 80 |
+
|
| 81 |
+
In this pilot experiment, we extracted a list of 100 explicit discourse connectives.PDTB corpus Prasad et al. (2008) and identified clauses that start with a discourse connecte. We found that 20.6% of clauses in the MASC+Wiki corpus contain a discourse connective phrase.Then we ran the full paragraph-level model with one modification, i.e., disregarding words in connective phrases when conducting the max-pooling operation in equation (1), thus we did not consider discourse connective phrases directly when building a clause representation.
|
| 82 |
+
|
| 83 |
+
As shown in Table 6, for clauses containing a discourse connective phrase, both macro-average F1-score and accuracy dropped due to the exclusion of discourse connective phrases.The performance was negatively influenced across all the SE types except the type of QUESTION and IMPERATIVE999A possible explanation is that recognizing QUESTION (IMPERATIVE) clauses mainly relies on seeing certain punctuation marks and key words, such as “?” (“!”) and “why” (“please”), which are independent from discourse connectives..The performance decreases on three SE types, REPORT, GENERIC and GENERALIZING, are noticeable.To some extent, this pilot study shows that modeling text coherence and the overall discourse structure of a paragraph is important in situation entity type classification.
|
| 84 |
+
|
| 85 |
+
Table 7 reports the confusion matrix of the full model on the training set of MASC+Wiki with cross-validation.We can see that the four situation entity types, including two eventualities (STATE and EVENT) and two general statives (GENERIC and GENERALIZING), are often mutually confused with each other.To further improve the performance of situation entity type classification, it is important to accurately detect events within a clause (for fixing STATE/EVENT errors) and identify the genericity of main referents (for fixing STATE/GENERIC and GENERIC/GENERALIZING errors), which can be potentially achieved by incorporating linguistic features into neural net models.
|
| 86 |
+
|
| 87 |
+
We presented a paragraph-level neural network model for situation entity (SE) type classification which builds context-aware clause representations by modeling inter-dependencies of clauses in a paragraph.Evaluation shows that the paragraph-level model outperforms previous systems for SE type classification and approaches human-level performance.In the future, we plan to incorporate SE type information in various downstream applications, e.g., many information extraction applications that require distinguishing specific fact descriptions from generic statements.
|
1809.07599v2.txt
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Stochastic Gradient Descent (SGD) [29] and variants thereof (e.g. [10, 16]) are among the most popular optimization algorithms in machine- and deep-learning [5]. SGD consists of iterations of the form𝐱t+1subscript𝐱𝑡1\displaystyle\mathbf{x}_{t+1}:=𝐱t−ηt𝐠t,assignabsentsubscript𝐱𝑡subscript𝜂𝑡subscript𝐠𝑡\displaystyle:=\mathbf{x}_{t}-\eta_{t}\mathbf{g}_{t}\,,(1)for iterates 𝐱t,𝐱t+1∈ℝdsubscript𝐱𝑡subscript𝐱𝑡1superscriptℝ𝑑\mathbf{x}_{t},\mathbf{x}_{t+1}\in\mathbb{R}^{d}, stepsize (or learning rate) ηt>0subscript𝜂𝑡0\eta_{t}>0, and stochastic gradient 𝐠tsubscript𝐠𝑡\mathbf{g}_{t} with the property 𝔼[𝐠t]=∇f(𝐱t)𝔼subscript𝐠𝑡∇𝑓subscript𝐱𝑡\operatorname{\mathbb{E}}[\mathbf{g}_{t}]=\nabla f(\mathbf{x}_{t}), for a loss function f:ℝd→ℝ:𝑓→superscriptℝ𝑑ℝf\colon\mathbb{R}^{d}\to\mathbb{R}.SGD addresses the computational bottleneck of full gradient descent, as the stochastic gradients can in general be computed much more efficiently than a full gradient ∇f(𝐱t)∇𝑓subscript𝐱𝑡\nabla f(\mathbf{x}_{t}). However, note that in general both 𝐠tsubscript𝐠𝑡\mathbf{g}_{t} and ∇f(𝐱t)∇𝑓subscript𝐱𝑡\nabla f(\mathbf{x}_{t}) are dense vectors111Note that the stochastic gradients 𝐠tsubscript𝐠𝑡\mathbf{g}_{t} are dense vectors for the setting of training neural networks. The 𝐠tsubscript𝐠𝑡\mathbf{g}_{t} themselves can be sparse for generalized linear models under the additional assumption that the data is sparse. of size d𝑑d, i.e. SGD does not address the communication bottleneck of gradient descent, which occurs as a roadblock both in distributed as well as parallel training. In the setting of distributed training, communicating the stochastic gradients to the other workers is a major limiting factor for many large scale (deep) learning applications, see e.g. [33, 3, 44, 21]. The same bottleneck can also appear for parallel training, e.g. in the increasingly common setting of a single multi-core machine or device, where locking and bandwidth of memory write operations for the common shared parameter 𝐱tsubscript𝐱𝑡\mathbf{x}_{t} often forms the main bottleneck, see e.g. [25, 14, 18].
|
| 2 |
+
|
| 3 |
+
A remedy to address these issues seems to enforce applying smaller and more efficient updates comp(𝐠t)compsubscript𝐠𝑡\operatorname{comp}(\mathbf{g}_{t}) instead of 𝐠tsubscript𝐠𝑡\mathbf{g}_{t}, where comp:ℝd→ℝd:comp→superscriptℝ𝑑superscriptℝ𝑑\operatorname{comp}\colon\mathbb{R}^{d}\to\mathbb{R}^{d} generates a compression of the gradient, such as by lossy quantization or sparsification. We discuss different schemes below.However, too aggressive compression can hurt the performance, unless it is implemented in a clever way: 1Bit-SGD [33, 37] combines gradient quantization with an error compensation technique, which is a memory or feedback mechanism.We in this work leverage this key mechanism but apply it within more the more general setting of SGD.We will now sketch how the algorithm uses feedback of to correct for errors accumulated in previous iterations.Roughly speaking, the method keeps track of a memory vector 𝐦𝐦\mathbf{m} which contains the sum of the information that has been suppressed thus far, i.e. 𝐦t+1:=𝐦t+𝐠t−comp(𝐠t)assignsubscript𝐦𝑡1subscript𝐦𝑡subscript𝐠𝑡compsubscript𝐠𝑡\mathbf{m}_{t+1}:=\mathbf{m}_{t}+\mathbf{g}_{t}-\operatorname{comp}(\mathbf{g}_{t}),and injects this information back in the next iteration, by transmitting comp(𝐦t+1+𝐠t+1)compsubscript𝐦𝑡1subscript𝐠𝑡1\operatorname{comp}(\mathbf{m}_{t+1}+\mathbf{g}_{t+1}) instead of only comp(𝐠t+1)compsubscript𝐠𝑡1\operatorname{comp}(\mathbf{g}_{t+1}). Note that updates of this kind are not unbiased (even if comp(𝐠t+1)compsubscript𝐠𝑡1\operatorname{comp}(\mathbf{g}_{t+1}) would be) and there is also no control over the delay after which the single coordinates are applied. These are some (technical) reasons why there exists no theoretical analysis of this scheme up to now.
|
| 4 |
+
|
| 5 |
+
In this paper we give a concise convergence rate analysis for SGD with memory and k𝑘k-compression operators222See Definition 2.1., such as (but not limited to) top-k𝑘k sparsification. Our analysis also supports ultra-sparsification operators for which k<1𝑘1k<1, i.e. where less than one coordinate of the stochastic gradient is applied on average in (1). We not only provide the first convergence result of this method, but the result also shows that the method converges at the same rate as vanilla SGD.
|
| 6 |
+
|
| 7 |
+
There are several ways to reduce the communication in SGD. For instance by simply increasing the amount of computation before communication, i.e. by using large mini-batches (see e.g. [43, 12]), or by designing communication-efficient schemes [45]. These approaches are a bit orthogonal to the methods we consider in this paper, which focus on quantization or sparsification of the gradient.
|
| 8 |
+
|
| 9 |
+
Several papers consider approaches that limit the number of bits to represent floating point numbers [13, 24, 31].Recent work proposes adaptive tuning of the compression ratio [7]. Unbiased quantization operators not only limit the number of bits, but quantize the stochastic gradients in such a way that they are still unbiased estimators of the gradient [3, 41]. The ZipML framework also applies this technique to the data [44].Sparsification methods reduce the number of non-zero entries in the stochastic gradient [3, 40].
|
| 10 |
+
|
| 11 |
+
A very aggressive sparsification method is to keep only very few coordinates of the stochastic gradient by considering only the coordinates with the largest magnitudes [9, 1]. In contrast to the unbiased schemes it is clear that such methods can only work by using some kind of error accumulation or feedback procedure, similar to the one the we have already discussed [33, 37], as otherwise certain coordinates could simply never be updated. However, in certain applications no feedback mechanism is needed [38]. Also more elaborate sparsification schemes have been introduced [21].
|
| 12 |
+
|
| 13 |
+
Asynchronous updates provide an alternative solution to disguise the communication overhead to a certain amount [19]. However, those methods usually rely on a sparsity assumption on the updates [25, 31], which is not realistic e.g. in deep learning. We like to advocate that combining gradient sparsification with those asynchronous schemes seems to be a promising approach, as it combines the best of both worlds. Other scenarios that could profit from sparsification are heterogeneous systems or specialized hardware, e.g. accelerators [11, 44].
|
| 14 |
+
|
| 15 |
+
Convergence proofs for SGD [29] typically rely on averaging the iterates [30, 27, 23], though convergence of the last iterate can also be proven [34]. For our convergence proof we rely on averaging techniques that give more weight to more recent iterates [17, 34, 28],as well as the perturbed iterate framework from Mania et al. [22] and techniques from [18, 36].
|
| 16 |
+
|
| 17 |
+
Simultaneous to our work, [4, 39] at NIPS 2018 propose related schemes.Whilst Tang et al. [39] only consider unbiased stochastic compression schemes,Alistarh et al. [4] study biased top-k𝑘k sparsification. Their scheme also uses a memory vector to compensate for the errors, but their analysis suffers from a slowdown proportional tok𝑘k, which we can avoid here.Another simultaneous analysis of Wu et al. [42] at ICML 2018 is restricted to unbiased gradient compression.This scheme also critically relies on an error compensation technique, but in contrast to our work the analysis is restricted to quadratic functions and the scheme introduces two additional hyperparameters that control the feedback mechanism.
|
| 18 |
+
|
| 19 |
+
We consider finite-sum convex optimization problems f:ℝd→ℝ:𝑓→superscriptℝ𝑑ℝf\colon\mathbb{R}^{d}\to\mathbb{R} of the formf(𝐱)𝑓𝐱\displaystyle f(\mathbf{x})=1n∑i=1nfi(𝐱),absent1𝑛superscriptsubscript𝑖1𝑛subscript𝑓𝑖𝐱\displaystyle=\frac{1}{n}\sum_{i=1}^{n}f_{i}(\mathbf{x})\,,𝐱⋆superscript𝐱⋆\displaystyle\mathbf{x}^{\star}:=argmin𝐱∈ℝdf(𝐱),assignabsentsubscriptargmin𝐱superscriptℝ𝑑𝑓𝐱\displaystyle:=\operatorname*{arg\,min}_{\mathbf{x}\in\mathbb{R}^{d}}\,f(\mathbf{x})\,,f⋆superscript𝑓⋆\displaystyle f^{\star}:=f(𝐱⋆),assignabsent𝑓superscript𝐱⋆\displaystyle:=f(\mathbf{x}^{\star})\,,(2)where each fisubscript𝑓𝑖f_{i} is L𝐿L-smooth333fi(𝐲)≤fi(𝐱)+⟨∇fi(𝐱),𝐲−𝐱⟩+L2∥𝐲−𝐱∥2subscript𝑓𝑖𝐲subscript𝑓𝑖𝐱∇subscript𝑓𝑖𝐱𝐲𝐱𝐿2superscriptdelimited-∥∥𝐲𝐱2f_{i}(\mathbf{y})\leq f_{i}(\mathbf{x})+\left\langle\nabla f_{i}(\mathbf{x}),\mathbf{y}-\mathbf{x}\right\rangle+\frac{L}{2}\left\lVert\mathbf{y}-\mathbf{x}\right\rVert^{2}, ∀𝐱,𝐲∈ℝdfor-all𝐱𝐲superscriptℝ𝑑\forall\mathbf{x},\mathbf{y}\in\mathbb{R}^{d}, i∈[n]𝑖delimited-[]𝑛i\in[n]. and f𝑓f is μ𝜇\mu-strongly convex444f(𝐲)≥f(𝐱)+⟨∇f(𝐱),𝐲−𝐱⟩+μ2∥𝐲−𝐱∥2𝑓𝐲𝑓𝐱∇𝑓𝐱𝐲𝐱𝜇2superscriptdelimited-∥∥𝐲𝐱2f(\mathbf{y})\geq f(\mathbf{x})+\left\langle\nabla f(\mathbf{x}),\mathbf{y}-\mathbf{x}\right\rangle+\frac{\mu}{2}\left\lVert\mathbf{y}-\mathbf{x}\right\rVert^{2}, ∀𝐱,𝐲∈ℝdfor-all𝐱𝐲superscriptℝ𝑑\forall\mathbf{x},\mathbf{y}\in\mathbb{R}^{d}.. We consider a sequential sparsified SGD algorithm with error accumulation technique and prove convergence for k𝑘k-compression operators, 0<k≤d0𝑘𝑑0<k\leq d (for instance the sparsification operators top-k𝑘k or random-k𝑘k). For appropriately chosen stepsizes and an averaged iterate 𝐱¯Tsubscript¯𝐱𝑇\bar{\mathbf{x}}_{T} after T𝑇T steps we show convergence𝔼f(𝐱¯T)−f⋆=𝒪(G2μT)+𝒪(d2k2G2κμT2)+𝒪(d3k3G2μT3),𝔼𝑓subscript¯𝐱𝑇superscript𝑓⋆𝒪superscript𝐺2𝜇𝑇𝒪superscript𝑑2superscript𝑘2superscript𝐺2𝜅𝜇superscript𝑇2𝒪superscript𝑑3superscript𝑘3superscript𝐺2𝜇superscript𝑇3\displaystyle\operatorname{\mathbb{E}}f(\bar{\mathbf{x}}_{T})-f^{\star}=\mathcal{O}\left(\frac{G^{2}}{\mu T}\right)+\mathcal{O}\left(\frac{\frac{d^{2}}{k^{2}}G^{2}\kappa}{\mu T^{2}}\right)+\mathcal{O}\left(\frac{\frac{d^{3}}{k^{3}}G^{2}}{\mu T^{3}}\right)\,,(3)for κ=Lμ𝜅𝐿𝜇\kappa=\frac{L}{\mu} and G2≥𝔼∥∇fi(𝐱t)∥2G^{2}\geq\operatorname{\mathbb{E}}\left\lVert\nabla f_{i}(\mathbf{x}_{t})\right\rVert^{2}. Not only is this, to the best of our knowledge, the first convergence result for sparsified SGD with memory, but the result also shows that for T=Ω(dkκ)𝑇Ω𝑑𝑘𝜅T=\Omega(\frac{d}{k}\sqrt{\kappa}) the convergence rate is the same as for vanilla SGD, i.e. 𝒪(G2μT)𝒪superscript𝐺2𝜇𝑇\mathcal{O}\bigl{(}\frac{G^{2}}{\mu T}\bigr{)}.
|
| 20 |
+
|
| 21 |
+
We introduce the method formally in Section 2 and show a sketch of the convergence proof in Section 3. In Section 4 we include a few numerical experiments for illustrative purposes. The experiments highlight that top-k𝑘ksparsification yields a very effective compression method and does not hurt convergence.We also report results for a parallel multi-core implementation of SGD with memory that show that the algorithm scales as well as asynchronous SGD and drastically decreases the communication cost without sacrificing the rate of convergence.We like to stress that the effectiveness of SGD variants with sparsification techniques has already been demonstrated in practice [9, 1, 21, 37, 33].
|
| 22 |
+
|
| 23 |
+
Although we do not yet provide convergence guarantees for parallel and asynchronous variants of the scheme, this is the main application of this method.For instance, we like to highlight that asynchronous SGD schemes [25, 2] could profit from the gradient sparsification. To demonstrate this use-case, we include in Section 4 a set of experiments for a multi-core implementation.
|
| 24 |
+
|
| 25 |
+
In this section we present the sparsified SGD algorithm with memory. First we introduce sparsification and quantization operators which allow us to drastically reduce the communication cost in comparison with vanilla SGD.
|
| 26 |
+
|
| 27 |
+
We consider compression operators that satisfy the following contraction property:
|
| 28 |
+
|
| 29 |
+
The contraction property is sufficient to obtain all mathematical results that are derived in this paper. However, note that (4) does not imply that comp(𝐱)comp𝐱\operatorname{comp}(\mathbf{x}) is a necessarily sparse vector. Also dense vectors can satisfy (4). One of the main goals of this work is to derive communication efficient schemes, thus we are particularly interested in operators that also ensure that comp(𝐱)comp𝐱\operatorname{comp}(\mathbf{x}) can be encoded much more efficiently than the original 𝐱𝐱\mathbf{x}.
|
| 30 |
+
|
| 31 |
+
The following two operators are examples of k𝑘k-contraction operators with the additional property of being k𝑘k-sparse vectors:
|
| 32 |
+
|
| 33 |
+
It is easy to see that both operators satisfy Definition 2.1 of being a k𝑘k-contraction. For completeness the proof is included in Appendix A.1.
|
| 34 |
+
|
| 35 |
+
We note that our setting is more general than simply measuring sparsity in terms of the cardinality, i.e. the non-zero elements of vectors in ℝdsuperscriptℝ𝑑\mathbb{R}^{d}.Instead, Definition 2.1 can also be considered for quantization or e.g. floating point representation of each entry of the vector. In this setting we would for instance measure sparsity in terms of the number of bits that are needed to encode the vector.By this, we can also use stochastic rounding operators (similar as the ones used in [3], but with different scaling) as compression operators according to (4). Also gradient dropping [1] trivially satisfies (4), though with different parameter k𝑘k in each iteration.
|
| 36 |
+
|
| 37 |
+
Before introducing SGD with memory we first discuss a motivating example. Consider the following variant of SGD, where (d−k)𝑑𝑘(d-k) random coordinates of the stochastic gradient are dropped:𝐱t+1subscript𝐱𝑡1\displaystyle\mathbf{x}_{t+1}:=𝐱t−ηt𝐠t,assignabsentsubscript𝐱𝑡subscript𝜂𝑡subscript𝐠𝑡\displaystyle:=\mathbf{x}_{t}-\eta_{t}\mathbf{g}_{t}\,,𝐠tsubscript𝐠𝑡\displaystyle\mathbf{g}_{t}:=dk⋅randk(∇fi(𝐱t)),assignabsent⋅𝑑𝑘subscriptrand𝑘∇subscript𝑓𝑖subscript𝐱𝑡\displaystyle:=\tfrac{d}{k}\cdot\operatorname{rand}_{k}(\nabla f_{i}(\mathbf{x}_{t}))\,,(6)where i∼u.a.r[n]subscriptsimilar-toformulae-sequenceuar𝑖delimited-[]𝑛i\sim_{\rm u.a.r}[n]. It is important to note that the update is unbiased, i.e. 𝔼𝐠t=∇f(𝐱)𝔼subscript𝐠𝑡∇𝑓𝐱\operatorname{\mathbb{E}}\mathbf{g}_{t}=\nabla f(\mathbf{x}). For carefully chosen stepsizes ηtsubscript𝜂𝑡\eta_{t} this algorithm converges at rate 𝒪(σ2t)𝒪superscript𝜎2𝑡\mathcal{O}\bigl{(}\frac{\sigma^{2}}{t}\bigr{)} on strongly convex and smooth functions f𝑓f, where σ2superscript𝜎2\sigma^{2} is an upper bound on the variance, see for instance [46]. We haveσ2=𝔼∥dkrandk(∇fi(𝐱))���∇f(𝐱)∥2≤𝔼∥dkrandk(∇fi(𝐱))∥2≤dk𝔼i∥∇fi(𝐱)∥2≤dkG2\displaystyle\textstyle\sigma^{2}=\operatorname{\mathbb{E}}\left\lVert\frac{d}{k}\operatorname{rand}_{k}(\nabla f_{i}(\mathbf{x}))-\nabla f(\mathbf{x})\right\rVert^{2}\leq\operatorname{\mathbb{E}}\left\lVert\frac{d}{k}\operatorname{rand}_{k}(\nabla f_{i}(\mathbf{x}))\right\rVert^{2}\leq\frac{d}{k}\operatorname{\mathbb{E}}_{i}\left\lVert\nabla f_{i}(\mathbf{x})\right\rVert^{2}\leq\frac{d}{k}G^{2}where we used the variance decomposition 𝔼∥X−𝔼X∥2=𝔼∥X∥2−∥𝔼X∥2\operatorname{\mathbb{E}}\left\lVert X-\operatorname{\mathbb{E}}X\right\rVert^{2}=\operatorname{\mathbb{E}}\left\lVert X\right\rVert^{2}-\left\lVert\operatorname{\mathbb{E}}X\right\rVert^{2} and the standard assumption 𝔼i∥∇fi(𝐱)∥2≤G2\operatorname{\mathbb{E}}_{i}\left\lVert\nabla f_{i}(\mathbf{x})\right\rVert^{2}\leq G^{2}.Hence, when k𝑘k is small this algorithm requires d𝑑d times more iterations to achieve the same error guarantee as vanilla SGD with k=d𝑘𝑑k=d.
|
| 38 |
+
|
| 39 |
+
It is well known that by using mini-batches the variance of the gradient estimator can be reduced. If we consider in (6) the estimator 𝐠t:=dk⋅randk(1τ∑i∈ℐτ∇fi(𝐱t))assignsubscript𝐠𝑡⋅𝑑𝑘subscriptrand𝑘1𝜏subscript𝑖subscriptℐ𝜏∇subscript𝑓𝑖subscript𝐱𝑡\mathbf{g}_{t}:=\frac{d}{k}\cdot\operatorname{rand}_{k}\bigl{(}\frac{1}{\tau}\sum_{i\in\mathcal{I}_{\tau}}\nabla f_{i}(\mathbf{x}_{t})\bigr{)} for τ=⌈kd⌉𝜏𝑘𝑑\tau=\lceil\frac{k}{d}\rceil, and ℐτ∼u.a.r.([n]k)subscriptsimilar-toformulae-sequenceuarsubscriptℐ𝜏binomialdelimited-[]𝑛𝑘\mathcal{I}_{\tau}\sim_{\rm u.a.r.}\binom{[n]}{k} instead, we haveσ2=𝔼∥𝐠t−∇f(𝐱t)∥2≤𝔼∥dk⋅randk(1τ∑i∈ℐτ∇fi(𝐱t))∥2≤dkτ𝔼i∥∇fi(𝐱t)∥2≤G2.\displaystyle\textstyle\sigma^{2}=\operatorname{\mathbb{E}}\left\lVert\mathbf{g}_{t}-\nabla f(\mathbf{x}_{t})\right\rVert^{2}\leq\operatorname{\mathbb{E}}\left\lVert\frac{d}{k}\cdot\operatorname{rand}_{k}\bigl{(}\frac{1}{\tau}\sum_{i\in\mathcal{I}_{\tau}}\nabla f_{i}(\mathbf{x}_{t})\bigr{)}\right\rVert^{2}\leq\frac{d}{k\tau}\operatorname{\mathbb{E}}_{i}\left\lVert\nabla f_{i}(\mathbf{x}_{t})\right\rVert^{2}\leq G^{2}\,.(7)This shows that, when using mini-batches of appropriate size, the sparsification of the gradient does not hurt convergence. However, by increasing the mini-batch size, we increase the computation by a factor of dk𝑑𝑘\frac{d}{k}.
|
| 40 |
+
|
| 41 |
+
These two observations seem to indicate that the factor dk𝑑𝑘\frac{d}{k} is inevitably lost, either by increased number of iterations or increased computation. However, this is no longer true when the information in (6) is not dropped, but kept in memory. To illustrate this, assume k=1𝑘1k=1 and that index i𝑖i has not been selected by the rand1subscriptrand1\operatorname{rand}_{1} operator in iterations t=t0,⋯,ts−1𝑡subscript𝑡0⋯subscript𝑡𝑠1t=t_{0},\cdots,t_{s-1}, but is selected in iteration tssubscript𝑡𝑠t_{s}. Then the memory 𝐦ts∈ℝdsubscript𝐦subscript𝑡𝑠superscriptℝ𝑑\mathbf{m}_{t_{s}}\in\mathbb{R}^{d} contains this past information (𝐦ts)i=∑t=t0ts−1(∇fit(𝐱t))isubscriptsubscript𝐦subscript𝑡𝑠𝑖superscriptsubscript𝑡subscript𝑡0subscript𝑡𝑠1subscript∇subscript𝑓subscript𝑖𝑡subscript𝐱𝑡𝑖(\mathbf{m}_{t_{s}})_{i}=\sum_{t=t_{0}}^{t_{s-1}}(\nabla f_{i_{t}}(\mathbf{x}_{t}))_{i}. Intuitively, we would expect that the variance of this estimator is now reduced by a factor of s𝑠s compared to the naïve estimator in (6), similar to the mini-batch update in (7). Indeed, SGD with memory converges at the same rate as vanilla SGD, as we will demonstrate below.
|
| 42 |
+
|
| 43 |
+
We consider the following algorithm for parameter 0<k≤d0𝑘𝑑0<k\leq d, using a compression operator compk:ℝd→ℝd:subscriptcomp𝑘→superscriptℝ𝑑superscriptℝ𝑑\operatorname{comp}_{k}\colon\mathbb{R}^{d}\to\mathbb{R}^{d} which is a k𝑘k-contraction (Definition 2.1)𝐱t+1subscript𝐱𝑡1\displaystyle\mathbf{x}_{t+1}:=𝐱t−𝐠t,assignabsentsubscript𝐱𝑡subscript𝐠𝑡\displaystyle:=\mathbf{x}_{t}-\mathbf{g}_{t}\,,𝐠tsubscript𝐠𝑡\displaystyle\mathbf{g}_{t}:=compk(𝐦t+ηt∇fit(𝐱t)),assignabsentsubscriptcomp𝑘subscript𝐦𝑡subscript𝜂𝑡∇subscript𝑓subscript𝑖𝑡subscript𝐱𝑡\displaystyle:=\operatorname{comp}_{k}(\mathbf{m}_{t}+\eta_{t}\nabla f_{i_{t}}(\mathbf{x}_{t}))\,,𝐦t+1subscript𝐦𝑡1\displaystyle\mathbf{m}_{t+1}:=𝐦t+ηt∇fit(𝐱t)−𝐠t,assignabsentsubscript𝐦𝑡subscript𝜂𝑡∇subscript𝑓subscript𝑖𝑡subscript𝐱𝑡subscript𝐠𝑡\displaystyle:=\mathbf{m}_{t}+\eta_{t}\nabla f_{i_{t}}(\mathbf{x}_{t})-\mathbf{g}_{t}\,,(8)where it∼u.a.r.[n]subscriptsimilar-toformulae-sequenceuarsubscript𝑖𝑡delimited-[]𝑛i_{t}\sim_{\rm u.a.r.}[n], 𝐦0:=0assignsubscript𝐦00\mathbf{m}_{0}:=0 and {ηt}t≥0subscriptsubscript𝜂𝑡𝑡0\{\eta_{t}\}_{t\geq 0} denotes a sequence of stepsizes. The pseudocode is given in Algorithm 1. Note that the gradients get multiplied with the stepsize ηtsubscript𝜂𝑡\eta_{t} at the timestep t𝑡t when they put into memory, and not when they are (partially) retrieved from the memory.
|
| 44 |
+
|
| 45 |
+
We state the precise convergence result for Algorithm 1 in Theorem 2.4 below. In Remark 2.6 we give a simplified statement in big-𝒪𝒪\mathcal{O} notation for a specific choice of the stepsizes ηtsubscript𝜂𝑡\eta_{t}.
|
| 46 |
+
|
| 47 |
+
We now give an outline of the proof. The proofs of the lemmas are given in Appendix A.2.
|
| 48 |
+
|
| 49 |
+
Inspired by the perturbed iterate framework in [22] and [18] we first define a virtual sequence {𝐱~t}t≥0subscriptsubscript~𝐱𝑡𝑡0\{\tilde{\mathbf{x}}_{t}\}_{t\geq 0} in the following way:𝐱~0subscript~𝐱0\displaystyle\tilde{\mathbf{x}}_{0}=𝐱0,absentsubscript𝐱0\displaystyle=\mathbf{x}_{0}\,,𝐱~t+1=𝐱~t−ηt∇fit(𝐱t),subscript~𝐱𝑡1subscript~𝐱𝑡subscript𝜂𝑡∇subscript𝑓subscript𝑖𝑡subscript𝐱𝑡\displaystyle\tilde{\mathbf{x}}_{t+1}=\tilde{\mathbf{x}}_{t}-\eta_{t}\nabla f_{i_{t}}(\mathbf{x}_{t})\,,(11)where the sequences {𝐱t}t≥0,{ηt}t≥0subscriptsubscript𝐱𝑡𝑡0subscriptsubscript𝜂𝑡𝑡0\{\mathbf{x}_{t}\}_{t\geq 0},\{\eta_{t}\}_{t\geq 0} and {it}t≥0subscriptsubscript𝑖𝑡𝑡0\{i_{t}\}_{t\geq 0} are the same as in (8). Notice that𝐱~t−𝐱t=(𝐱0−∑j=0t−1ηj∇fij(𝐱j))−(𝐱0−∑j=0t−1𝐠j)=𝐦t.subscript~𝐱𝑡subscript𝐱𝑡subscript𝐱0superscriptsubscript𝑗0𝑡1subscript𝜂𝑗∇subscript𝑓subscript𝑖𝑗subscript𝐱𝑗subscript𝐱0superscriptsubscript𝑗0𝑡1subscript𝐠𝑗subscript𝐦𝑡\displaystyle\textstyle\tilde{\mathbf{x}}_{t}-\mathbf{x}_{t}=\left(\mathbf{x}_{0}-\sum_{j=0}^{t-1}\eta_{j}\nabla f_{i_{j}}(\mathbf{x}_{j})\right)-\left(\mathbf{x}_{0}-\sum_{j=0}^{t-1}\mathbf{g}_{j}\right)=\mathbf{m}_{t}\,.(12)
|
| 50 |
+
|
| 51 |
+
From equation (13) it becomes clear that we should derive an upper bound on 𝔼∥𝐦t∥2\operatorname{\mathbb{E}}\left\lVert\mathbf{m}_{t}\right\rVert^{2}. For this we will use the contraction property (4) of the compression operators.
|
| 52 |
+
|
| 53 |
+
Similar as discussed in [17, 34, 28] we have to define a suitable averaging scheme for the iterates {𝐱t}t≥0subscriptsubscript𝐱𝑡𝑡0\{\mathbf{x}_{t}\}_{t\geq 0} to get the optimal convergence rate. In contrast to [17] that use linearly increasing weights, we use quadratically increasing weights, as for instance [34, 36].
|
| 54 |
+
|
| 55 |
+
The proof of the theorem immediately follows from the three lemmas that we have presented in this section and convexity of f𝑓f, i.e. we have 𝔼f(𝐱¯T)−f⋆≤1ST∑t=0T−1wtet𝔼𝑓subscript¯𝐱𝑇superscript𝑓⋆1subscript𝑆𝑇superscriptsubscript𝑡0𝑇1subscript𝑤𝑡subscript𝑒𝑡\operatorname{\mathbb{E}}f(\bar{\mathbf{x}}_{T})-f^{\star}\leq\frac{1}{S_{T}}\sum_{t=0}^{T-1}w_{t}e_{t} in (16), for constants A=G2𝐴superscript𝐺2A=G^{2} and B=(μ+2L)4αα−4d2k2G2𝐵𝜇2𝐿4𝛼𝛼4superscript𝑑2superscript𝑘2superscript𝐺2B=(\mu+2L)\frac{4\alpha}{\alpha-4}\frac{d^{2}}{k^{2}}G^{2}. □□\Box
|
| 56 |
+
|
| 57 |
+
We present numerical experiments to illustrate the excellent convergence properties and communication efficiency of Mem-SGD.As the usefulness of SGD with sparsification techniqueshas already been shown in practical applications [9, 1, 21, 37, 33]we focus here on a few particular aspects.First, we verify the impact of the initial learning rate that did come up in the statement of Theorem 2.4. We then compare our method with QSGD [3] which decreases the communication cost in SGD by using random quantization operators, but without memory. Finally, we show the performance of the parallel SGD depicted in Algorithm 2 in a multi-core setting with shared memory and compare the speed-up to asynchronous SGD.
|
| 58 |
+
|
| 59 |
+
The experiments focus on the performance of Mem-SGD applied to logistic regression. The associated objective function is1n∑i=1nlog(1+exp(−bi𝐚i⊤𝐱))+λ2‖𝐱‖21𝑛superscriptsubscript𝑖1𝑛1subscript𝑏𝑖superscriptsubscript𝐚𝑖top𝐱𝜆2superscriptnorm𝐱2\frac{1}{n}\sum_{i=1}^{n}\log(1+\exp(-b_{i}\mathbf{a}_{i}^{\top}\mathbf{x}))+\frac{\lambda}{2}\|\mathbf{x}\|^{2},where 𝐚i∈ℝdsubscript𝐚𝑖superscriptℝ𝑑\mathbf{a}_{i}\in\mathbb{R}^{d} and bi∈{−1,+1}subscript𝑏𝑖11b_{i}\in\{-1,+1\} are the data samples, and we employ a standard L2𝐿2L2-regularizer. The regularization parameter is set to λ=1/n𝜆1𝑛\lambda=1/n for both datasets following [32].
|
| 60 |
+
|
| 61 |
+
We consider a dense dataset, epsilon [35], as well as a sparse dataset, RCV1 [20] where we train on the larger test set. Statistics on the datasets are listed in Table 1 below:
|
| 62 |
+
|
| 63 |
+
We use Python3 and the numpy library [15]. Our code is open-source and publicly available at github.com/epfml/sparsifiedSGD.We emphasize that our high level implementation is not optimized for speed per iteration but for readability and simplicity. We only report convergence per iteration and relative speedups, but not wall-clock time because unequal efforts have been made to speed up the different implementations.Plots additionally show the baseline computed with the standard optimizer LogisticSGD of scikit-learn [26]. Experiments were run on an Ubuntu 18.04 machine with a 24 cores processor Intel® Xeon® CPU E5-2680 v3 @ 2.50GHz.
|
| 64 |
+
|
| 65 |
+
We study the convergence of the method using the stepsizes ηt=γ/(λ(t+a))subscript𝜂𝑡𝛾𝜆𝑡𝑎\eta_{t}=\gamma/(\lambda(t+a)) and hyperparameters γ𝛾\gamma and a𝑎a set as in Table 2. We compute the final estimate 𝐱¯¯𝐱\bar{\mathbf{x}} as a weighted average of all iterates 𝐱tsubscript𝐱𝑡\mathbf{x}_{t} with weights wt=(t+a)2subscript𝑤𝑡superscript𝑡𝑎2w_{t}=(t+a)^{2} as indicated by Theorem 2.4. The results are depicted in Figure 2. We use k∈{1,2,3}𝑘123k\in\{1,2,3\} for epsilon and k∈{10,20,30}𝑘102030k\in\{10,20,30\} for RCV1 to increase the difference with large number of features. The topksubscripttop𝑘\operatorname{top}_{k} variant consistently outperforms randksubscriptrand𝑘\operatorname{rand}_{k} and sometimes outperforms vanilla SGD, which is surprising and might come from feature characteristics of the datasets. We also evaluate the impact of the delay a𝑎a in the learning rate: setting it to 111 instead of order 𝒪(d/k)𝒪𝑑𝑘\mathcal{O}(d/k) dramatically hurts the memory and requires time to recover from the high initial learning rate (labeled “without delay” in Figure 2).
|
| 66 |
+
|
| 67 |
+
We experimentally verified the convergence properties of Mem-SGD for different sparsification operators and stepsizes but we want to further evaluate its fundamental benefits in terms of sparsity enforcement and reduction of the communication bottleneck. The gain in communication cost of SGD with memory is very high for dense datasets—using the top1subscripttop1\operatorname{top}_{1} strategy on epsilon dataset improves the amount of communication by 103superscript10310^{3} compared to SGD. For the sparse dataset, SGD can readily use the given sparsity of the gradients.Nevertheless, the improvement for top10subscripttop10\operatorname{top}_{10} on RCV1 is of approximately an order of magnitude.
|
| 68 |
+
|
| 69 |
+
Now we compare Mem-SGD with the QSGD compression scheme [3] which reduces communication cost by random quantization. The accuracy (and the compression ratio) in QSGD is controlled by a parameter s𝑠s, corresponding to the number of quantization levels. Ideally, we would like to set the quantization precision in QSGD such that the number of bits transmitted by QSGD and Mem-SGD are identical and compare their convergence properties. However, even for the lowest precision, QSGD needs to send the sign and index of 𝒪(d)𝒪𝑑\mathcal{O}(\sqrt{d}) coordinates. It is therefore not possible to reach the compression level of sparsification operators such as top-k𝑘k or random-k𝑘k, that only transmit a constant number of bits per iteration (up to logarithmic factors).555Encoding the indices of the top-k𝑘k or random-k𝑘k elements can be done with additional 𝒪(klogd)𝒪𝑘𝑑\mathcal{O}(k\log d) bits. Note that logd≤32≤d𝑑32𝑑\log d\leq 32\leq\sqrt{d} for both our examples.Hence, we did not enforce this condition and resorted to pick reasonable levels of quantization in QSGD (s=2b𝑠superscript2𝑏s=2^{b} with b∈{2,4,8}𝑏248b\in\{2,4,8\}). Note that b𝑏b-bits stands for the number of bits used to encode s=2b𝑠superscript2𝑏s=2^{b} levels but the number of bits transmitted in QSGD can be reduced using Elias coding.As a fair comparison in practice, we chose a standard learning rate γ0/(1+γ0λt)−1subscript𝛾0superscript1subscript𝛾0𝜆𝑡1\gamma_{0}/(1+\gamma_{0}\lambda t)^{-1} [6], tuned the hyperparameter γ0subscript𝛾0\gamma_{0} on a subset of each dataset (see Appendix B).Figure 3 shows that Mem-SGD with top1subscripttop1\operatorname{top}_{1} on epsilon and RCV1 converges as fast as QSGD in term of iterations for 8 and 4-bits.As shown in the bottom of Figure 3, we are transmitting two orders of magnitude fewer bits with the top1subscripttop1\operatorname{top}_{1} sparsifier concluding that sparsification offers a much more aggressive and performant strategy than quantization.
|
| 70 |
+
|
| 71 |
+
We implement a parallelized version of Mem-SGD, as depicted in Algorithm 2. The enforced sparsity allows us to do the update in shared memory using a lock-free mechanism as in [25]. For this experiment we evaluate the final iterate 𝐱Tsubscript𝐱𝑇\mathbf{x}_{T} instead of the weighted average 𝐱¯Tsubscript¯𝐱𝑇\bar{\mathbf{x}}_{T} above, and use the learning rate ηt≡(1+t)−1subscript𝜂𝑡superscript1𝑡1\eta_{t}\equiv(1+t)^{-1}.
|
| 72 |
+
|
| 73 |
+
Figure 4 shows the speed-up obtained when increasing the number of cores.We see that both sparsified SGD and vanilla SGD have a linear speed-up, the slopes are dependent of the implementation details. But we observe that Parallel-Mem-SGD with a reasonable sparsification parameter k𝑘k does not suffer of having multiple independent memories.The experiment is run on a single machine with a 24 core processor, hence no inter-node communication is used. The main advantage of our method—overcoming the communication bottleneck— would be even more visible in a multi-node setup.In this asynchronous setup, SGD with memory computes gradients on stale iterates that differ only by a few coordinates. It encounters fewer inconsistent read/write operations than lock free asynchronous SGD and exhibits better scaling properties on the RCV1 dataset. The topksubscripttop𝑘\operatorname{top}_{k} operator performs better than randksubscriptrand𝑘\operatorname{rand}_{k} in the sequential setup, but this is not the case in the parallel setup.
|
| 74 |
+
|
| 75 |
+
We provide the first concise convergence analysis of sparsified SGD [37, 33, 9, 1]. This extremely communication-efficient variant of SGD enforces sparsity of the applied updates by only updating a constant number of coordinates in every iteration. This way, the method overcomes the communication bottleneck of SGD, while still enjoying the same convergence rate in terms of stochastic gradient computations.
|
| 76 |
+
|
| 77 |
+
Our experiments verify the drastic reduction in communication cost by demonstrating that Mem-SGD requires one to two orders of magnitude less bits to be communicated than QSGD [3] while converging to the same accuracy.The experiments show an advantage for the top-k𝑘k sparsification over random sparsification in the serial setting, but not in the multi-core shared memory implementation. There, both schemes are on par, and show better scaling than a simple shared memory implementation that just writes the unquantized updates in a lock-free asynchronous fashion (like Hogwild! [25]).
|
| 78 |
+
|
| 79 |
+
The theoretical insights to Mem-SGD that were developed here should facilitate the analysis of the same scheme in the parallel (as developped in [8]) and the distributed setting.It has already been shown in practice that gradient sparsification can be efficiently applied to bandwidth memory limited systems such as multi-GPU trainingfor neural networks [9, 1, 21, 37, 33]. By delivering sparsity no matter if the original gradients were sparse or not, our scheme is not only communication efficient, but becomes more eligible for asynchronous implementations as well. While those were so far limited by strict sparsity assumptions (as e.g. in [25]), our approach might make such methods much more widely applicable.
|
1809.07657v1.txt
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Entity Linking (EL) systems ground entity mentions in text to entries in Knowledge Bases (KB), such asWikipedia Mihalcea and Csomai (2007). Recently, the task ofCross-lingual Entity Linking (XEL) has gained attention McNamee et al. (2011); Ji et al. (2015); Tsai and Roth (2016) with the goal of groundingentity mentions written in any language tothe English Wikipedia.For instance, Figure 1 shows a Tamil (a language with >>70 million speakers) and an English mention (shown [enclosed]) and their mention contexts. XEL involves grounding the Tamil mention (which translates to ‘Liverpool’) to the football club Liverpool_F.C., and not the city or the university.XEL enables knowledge acquisition directly from documents in any language, without resorting to machine translation.
|
| 2 |
+
|
| 3 |
+
Training an EL model requires grounded mentions, i.e. mentions of entities that are grounded to a Knowledge Base (KB), as supervision (Figure 1).While millions of such mentions are availablein English, by virtue of hyperlinks in the English Wikipedia, this is not the case for most languages. This makes learning XEL models challenging, especially for languages with limited resources (e.g., the Tamil Wikipedia is only 1% of the English Wikipedia in size).To overcome this challenge, it is desirable toaugment the limited contextual evidence available in the target language with evidence from high-resource languages like English.
|
| 4 |
+
|
| 5 |
+
We propose Xelms (XEL with Multilingual Supervision) (§2), the first approach that fulfills the above desiderata by using multilingual supervision to train an XEL model.Xelms represents the mention contexts of the same entity from different languages in the same semantic space using a single context encoder (§2.1).Language-agnostic entity representations arejointly learned with the relevant mention context representations, so that an entity and its context share similar representations. Additionally, by encoding freely available structuredknowledge, like fine-grained entity types, the entity and context representations can be further improved(§2.2).
|
| 6 |
+
|
| 7 |
+
The ability to use multilingual supervision enables Xelms to learn XEL models for target languages with limited resources by exploiting freely available supervision from high resourcelanguages (like English). We show that Xelms outperforms existing state-of-the-artapproaches that only use target language supervision, across 3 benchmark datasets in 8 languages(§5.1).Moreover, while previous XEL models McNamee et al. (2011); Tsai and Roth (2016) train separate models for different languages, Xelms can train a single model for performing XEL in multiple languages (§5.2).
|
| 8 |
+
|
| 9 |
+
One of the goals of XEL is to enable understanding of languages with limited resources.We provide experimental analyses in two such settings. In the zero-shot setting (§6.1), where no supervision is available in the target language, we show that the good performance of zero-shot XEL approaches Sil et al. (2018) can be attributed to the use of prior probabilities.These probabilities are computed from large amount of grounded mentions, which are not available in realistic zero-shot settings.In the low-resource setting (§6.2), where some supervision is available in the target language, we show that even when only a fraction of the available supervision in the target language is provided, Xelms can achieve competitive performance by exploiting supervision from English.
|
| 10 |
+
|
| 11 |
+
The contributions of our work are,•A new XEL approach, Xelms, that learns a XEL model for a language with limited resources by exploiting additional supervision from a high-resource language like English.•Xelms can also train a single XEL model for multiple languages jointly, which we show improves on separately trained models.•Analysis of XEL approaches in the zero-shot and low-resource settings. Our analysis reveals that in realistic scenarios, zero-shot XELis not as effective as previously shown.We also show that in low-resource settings jointly training with English leads to better utilization of target language supervision.
|
| 12 |
+
|
| 13 |
+
Given a mention m𝑚m in a document 𝒟𝒟\mathcal{D} written in any language, XEL involves linking m𝑚m to its gold entity e∗superscript𝑒e^{*} in a KB, 𝒦={e1,⋯,en}𝒦subscript𝑒1⋯subscript𝑒𝑛\mathcal{K}=\{e_{1},\cdots,e_{n}\}.
|
| 14 |
+
|
| 15 |
+
An overview of Xelms is shown in Figure 2(a).Xelms computes the probability, Pcontext(e∣m)subscriptPcontextconditional𝑒𝑚\text{P}_{\text{context}}(e\mid m), of a mention m𝑚m referring to entity e∈𝒦𝑒𝒦e\in\mathcal{K} using a mention context vector 𝐠∈ℝh𝐠superscriptℝℎ\mathbf{g}\in\mathbb{R}^{h} representing m𝑚m’s context, and an entity vector 𝐞∈ℝh𝐞superscriptℝℎ\mathbf{e}\in\mathbb{R}^{h}, representing the entity e∈𝒦𝑒𝒦e\in\mathcal{K} (one vector per entity).Xelms can also incorporate structured knowledge likefine-grained entity types (§2.2) using amulti-task learning approach Caruana (1998), bylearning a type vector 𝐭∈ℝh𝐭superscriptℝℎ\mathbf{t}\in\mathbb{R}^{h} for eachpossible type t𝑡t (e.g., sports_team) associated with the entity e𝑒e.The entity vector 𝐞𝐞\mathbf{e}, context vector 𝐠𝐠\mathbf{g} and the type vector𝐭𝐭\mathbf{t} are jointly trained, and interact through appropriately defined pairwise lossterms – an Entity-Context loss (EC-Loss), Type-Entity loss (TE-Loss) and a Type-Context loss (TC-Loss).
|
| 16 |
+
|
| 17 |
+
The mention context vector 𝐠𝐠\mathbf{g} is generated by amention context encoder (§2.1), shown in Figure 2(b). The mention context of m𝑚m ina document 𝒟𝒟\mathcal{D} consists of: (a) neighboringwords around the mention, which we refer to as its local context and, (b) surfaces of other mentionsappearing in 𝒟𝒟\mathcal{D}, which we refer as its document context.
|
| 18 |
+
|
| 19 |
+
Xelms is trained using grounded mentionsin multiple languages (English and Tamil inFigure 2(a)), which can be derived from Wikipedia (§4.1).
|
| 20 |
+
|
| 21 |
+
To learn from mention contexts in multiple languages, wegenerate mention context representations usinga language-agnostic mention context encoder. An overview of the mention context encoder is shown in Figure 2(b).Below we describe the components of the mention context encoder, namely multilingual word embeddings and local and document context encoders.
|
| 22 |
+
|
| 23 |
+
Ammar et al. (2016b); Smith et al. (2017); Duong et al. (2017) jointly encode words in multiple (≥\geq2)languages in the same vector space such that semantically similarwords in the same language, and translationally equivalent words indifferent languages are close (per cosine similarity). Multilingual embeddings generalizebilingual embeddings, which do the same for two languages only.
|
| 24 |
+
|
| 25 |
+
We use FastText Bojanowski et al. (2017); Smith et al. (2017), which aligns monolingual embeddings of multiple languages in the same space using a small dictionary (∼similar-to\sim2500 pairs) from each language to English. Both monolingual embeddings and the dictionary can be easily obtained for languages with limited resources.We denote the multilingual word embeddings for aset of tokens {w1,w2,⋯,wn}subscript𝑤1subscript𝑤2⋯subscript𝑤𝑛\{w_{1},w_{2},\cdots,w_{n}\} by𝐰1:n={𝐰1,𝐰2,⋯,𝐰n}subscript𝐰:1𝑛subscript𝐰1subscript𝐰2⋯subscript𝐰𝑛\mathbf{w}_{1:n}=\{\mathbf{w}_{1},\mathbf{w}_{2},\cdots,\mathbf{w}_{n}\}, where each𝐰i∈ℝdsubscript𝐰𝑖superscriptℝ𝑑\mathbf{w}_{i}\in\mathbb{R}^{d}.
|
| 26 |
+
|
| 27 |
+
The local context of a mention m𝑚m, spanning tokensi𝑖i to j𝑗j, consists of left context (tokens i−W𝑖𝑊i-W to j𝑗j) and right context (tokens i𝑖i to j+W𝑗𝑊j+W). For example, for the mention [Liverpool] in Figure 2(b), the left and right contexts are “Everton won against Liverpool” and “Liverpool in a FA Cup match” respectively. The local context encoder (Figure 3) encodes the left and the right contexts into vectors 𝐥∈ℝh𝐥superscriptℝℎ\mathbf{l}\in\mathbb{R}^{h} and 𝐫∈ℝh𝐫superscriptℝℎ\mathbf{r}\in\mathbb{R}^{h} using a convolutional neural network (CNN). These two vectors are then combined to generate the local context vector 𝐜∈ℝh𝐜superscriptℝℎ\mathbf{c}\in\mathbb{R}^{h} (Figure 2(b)).
|
| 28 |
+
|
| 29 |
+
The CNN convolves continuous spans of k𝑘k tokens usinga filter matrix 𝐅∈ℝkd×h𝐅superscriptℝ𝑘𝑑ℎ\mathbf{F}\in\mathbb{R}^{kd\times h} to projectthe concatenation (⊕direct-sum\oplus operator) of the token embeddings in the span. The resultingvector is passed through a ReLU unit togenerate convolutional output 𝐎isubscript𝐎𝑖\mathbf{O}_{i}. The outputs {𝐎i}subscript𝐎𝑖\{\mathbf{O}_{i}\} are pooled by averaging,𝐎i=relu(𝐅T(𝐰i⊕⋯⊕𝐰i+k−1))subscript𝐎𝑖relusuperscript𝐅𝑇direct-sumsubscript𝐰𝑖⋯subscript𝐰𝑖𝑘1\displaystyle\mathbf{O}_{i}=\text{\sc relu}(\mathbf{F}^{T}(\mathbf{w}_{i}\oplus\cdots\oplus\mathbf{w}_{i+k-1}))(1)Enc(𝐰1:n)=avg(𝐎1,⋯,𝐎n−k+1)Encsubscript𝐰:1𝑛avgsubscript𝐎1⋯subscript𝐎𝑛𝑘1\displaystyle{\text{\sc Enc}}(\mathbf{w}_{1:n})=\text{\sc avg}(\mathbf{O}_{1},\cdots,\mathbf{O}_{n-k+1})(2)Left and right context vectors 𝐥𝐥\mathbf{l} and 𝐫𝐫\mathbf{r} are computed using respective Enc(.){\text{\sc Enc}}(.) layers,𝐥𝐥\displaystyle\mathbf{l}=Encleft(𝐰i−W⋯𝐰j)absentsubscriptEncleftsubscript𝐰𝑖𝑊⋯subscript𝐰𝑗\displaystyle=\text{\sc Enc}_{\text{left}}(\mathbf{w}_{i-W}\cdots\mathbf{w}_{j})(3)𝐫𝐫\displaystyle\mathbf{r}=Encright(𝐰i⋯𝐰j+W)absentsubscriptEncrightsubscript𝐰𝑖⋯subscript𝐰𝑗𝑊\displaystyle=\text{\sc Enc}_{\text{right}}(\mathbf{w}_{i}\cdots\mathbf{w}_{j+W})(4)These vectors together generate the local context vector 𝐜=ℱ2h,h(𝐥⊕𝐫)𝐜subscriptℱ2ℎℎdirect-sum𝐥𝐫\mathbf{c}=\mathcal{F}_{2h,h}(\mathbf{l}\oplus\mathbf{r}). Here ℱdi,do:𝐯i→𝐯o:subscriptℱsubscript𝑑𝑖subscript𝑑𝑜→subscript𝐯𝑖subscript𝐯𝑜\mathcal{F}_{d_{i},d_{o}}:\mathbf{v}_{i}\rightarrow\mathbf{v}_{o} denotes a feed-forward layer that takes 𝐯i∈ℝdisubscript𝐯𝑖superscriptℝsubscript𝑑𝑖\mathbf{v}_{i}\in\mathbb{R}^{d_{i}} as input, and outputs 𝐯o∈ℝdosubscript𝐯𝑜superscriptℝsubscript𝑑𝑜\mathbf{v}_{o}\in\mathbb{R}^{d_{o}}.
|
| 30 |
+
|
| 31 |
+
Presence of certain mentions in a document can help disambiguate other mentions. For example, “Suarez”, “Everton” in a document can help disambiguate “Liverpool”. To incorporate this, we define the document context dmsubscript𝑑𝑚d_{m} of a mention m𝑚m appearing in document 𝒟𝒟\mathcal{D} to be thebag of all other mentions in 𝒟𝒟\mathcal{D}.We encode dmsubscript𝑑𝑚d_{m} into a dense document context vector𝐝∈ℝh𝐝superscriptℝℎ\mathbf{d}\in\mathbb{R}^{h} by a feed-forward layer 𝐝=ℱ|V|,h(dm)𝐝subscriptℱ𝑉ℎsubscript𝑑𝑚\mathbf{d}=\mathcal{F}_{|V|,h}(d_{m}).Here V𝑉V is the set containing all mention surfaces seen during training. When training jointly over multiple languages, V𝑉V consists of mention surfaces seen in alllanguages (e.g. all English and Tamil mention surfaces) during training. This enables parametersharing by embedding mention surfaces in differentlanguages in the same low-dimensional space.
|
| 32 |
+
|
| 33 |
+
The local and document context vectors 𝐜𝐜\mathbf{c} and 𝐝𝐝\mathbf{d} are combined to get the mention context vector 𝐠=ℱ2h,h(𝐜⊕𝐝)𝐠subscriptℱ2ℎℎdirect-sum𝐜𝐝\mathbf{g}=\mathcal{F}_{2h,h}(\mathbf{c}\oplus\mathbf{d}).
|
| 34 |
+
|
| 35 |
+
We compute the probability of a mention m𝑚m linking to entity e𝑒e using its context vector 𝐠𝐠\mathbf{g} and the entity vector 𝐞𝐞\mathbf{e},Pcontext(e∣m)=exp(𝐠T𝐞)∑e′∈C(m)exp(𝐠T𝐞′)subscriptPcontextconditional𝑒𝑚superscript𝐠𝑇𝐞subscriptsuperscript𝑒′𝐶𝑚superscript𝐠𝑇superscript𝐞′\displaystyle\text{P}_{\text{context}}(e\mid m)=\frac{\exp(\mathbf{g}^{T}\mathbf{e})}{\sum\limits_{e^{\prime}\in C(m)}\exp(\mathbf{g}^{T}\mathbf{e^{\prime}})}(5)where C(m)𝐶𝑚C(m) denotes all candidate entities of the mention m𝑚m (§3.1 explains how C(m)𝐶𝑚C(m) is generated). We minimize the negative log-likelihood of Pcontext(e∣m)subscriptPcontextconditional𝑒𝑚\text{P}_{\text{context}}(e\mid m) with respect to the gold entity e∗superscript𝑒e^{*} against the candidate entities C(m)𝐶𝑚C(m), and call it the Entity-Context loss (EC-Loss),EC-Loss=−logPcontext(e∗∣m)∑e′∈C(m)Pcontext(e′∣m)EC-LosssubscriptPcontextconditionalsuperscript𝑒𝑚subscriptsuperscript𝑒′𝐶𝑚subscriptPcontextconditionalsuperscript𝑒′𝑚\displaystyle\text{\sc EC-Loss}\!=\!-\log\frac{\text{P}_{\text{context}}(e^{*}\mid m)}{\sum\limits_{e^{\prime}\in C(m)}\text{P}_{\text{context}}(e^{\prime}\mid m)}(6)
|
| 36 |
+
|
| 37 |
+
Incorporating the fine-grained types of a mention m𝑚m can help rank entities of the appropriate type higher than others Ling et al. (2015); Gupta et al. (2017); Raiman and Raiman (2018). For instance, knowing the correct type of mention [Liverpool] as sports_team and constraining linking to entities with the relevant type, encourages disambiguation to the correct entity.
|
| 38 |
+
|
| 39 |
+
To make the mention context representation 𝐠𝐠\mathbf{g} type-aware, we predict the set of fine-grained types of m𝑚m, 𝐓(m)={t1,…,t|𝐓(m)|}𝐓𝑚subscript𝑡1…subscript𝑡𝐓𝑚\mathbf{T}(m)=\{t_{1},...,t_{|\mathbf{T}(m)|}\} using 𝐠𝐠\mathbf{g}. Each tisubscript𝑡𝑖t_{i} belongs to a pre-defined type vocabulary ΓΓ\Gamma.222We use the type vocabulary ΓΓ\Gamma from Ling and Weld (2012), which contains 112 fine-grained types (|Γ|=112Γ112|\Gamma|=112) The probability of a type t𝑡t belonging to 𝐓(m)𝐓𝑚\mathbf{T}(m) given the mention context is defined asP(t∣m)=σ(𝐭T𝐠)Pconditional𝑡𝑚𝜎superscript𝐭𝑇𝐠\text{P}(t\mid m)\!=\!\sigma(\mathbf{t}^{T}\mathbf{g}), where σ𝜎\sigma is the sigmoid function and 𝐭𝐭\mathbf{t} is the learnable embedding for type t𝑡t.
|
| 40 |
+
|
| 41 |
+
We define a Type-Context loss (TC-Loss) as,TC-Loss=BCE(𝐓(m),P(t∣m))TC-LossBCE𝐓𝑚Pconditional𝑡𝑚\displaystyle\text{{\sc TC-Loss}}=\text{\sc BCE}(\mathbf{T}(m),\text{P}(t\mid m))(7)where BCE is the Binary Cross-Entropy Loss,−∑t∈𝐓(m)logP(t∣m)−∑t∉𝐓(m)log(1−P(t∣m))subscript𝑡𝐓𝑚Pconditional𝑡𝑚subscript𝑡𝐓𝑚1Pconditional𝑡𝑚\displaystyle-\!\!\!\!\sum\limits_{t\in\mathbf{T}(m)}\!\!\log\text{P}(t\mid m)-\!\!\!\!\sum\limits_{t\not\in\mathbf{T}(m)}\!\!\log(1-\text{P}(t\mid m))We also incorporate the entity-type information in the entity representations, and define a similar Type-Entity loss (TE-Loss).
|
| 42 |
+
|
| 43 |
+
To identify the gold types 𝐓(m)𝐓𝑚\mathbf{T}(m) of a mention m𝑚m, we make the distant supervision assumption (same as Ling et al. (2015)) and assign the types of the gold entity e∗superscript𝑒e^{*} to be the types of the mention.Gold fine-grained types of the entities can be acquired from resources like Freebase Bollacker et al. (2008) or YAGO Hoffart et al. (2013).
|
| 44 |
+
|
| 45 |
+
We explain how Xelms generates candidate entities, performs inference, and combines the different training losses.
|
| 46 |
+
|
| 47 |
+
Candidate generation identifies a small number of plausible entities for a mention m𝑚m to avoid brute force comparison with all KB entities.Given m𝑚m, candidate generation outputs alist of candidate entities C(m)={e1,e2,⋯,eK}𝐶𝑚subscript𝑒1subscript𝑒2⋯subscript𝑒𝐾C(m)=\{e_{1},e_{2},\cdots,e_{K}\} ofsize at most K𝐾K (we use K𝐾K=20), each associated with a prior probabilityPprior(ei∣m)subscriptPpriorconditionalsubscript𝑒𝑖𝑚\text{P}_{\text{prior}}(e_{i}\mid m) indicating the probability of m𝑚m referring to eisubscript𝑒𝑖e_{i}, given only m𝑚m’s surface.PpriorsubscriptPprior\text{P}_{\text{prior}} is estimated from counts over the training mentions.
|
| 48 |
+
|
| 49 |
+
We adopt Tsai and Roth (2016)’s candidate generation strategy with someminor modifications (Appendix A).Using other approaches like CrossWikis Spitkovsky and Chang (2012), lead to consistently worse recall.We note that transliteration based candidategeneration McNamee et al. (2011); Pan et al. (2017); Tsai and Roth (2018); Upadhyay et al. (2018) can further improverecall.
|
| 50 |
+
|
| 51 |
+
We combine the context conditional entityprobability Pcontext(e∣m)subscriptPcontextconditional𝑒𝑚\text{P}_{\text{context}}(e\mid m) (eq. 5) and prior probabilityPprior(e∣m)subscriptPpriorconditional𝑒𝑚\text{P}_{\text{prior}}(e\mid m) by taking their union:Pmodel(e∣m)=Pprior(e∣m)+Pcontext(e∣m)−Pprior(e∣m)×Pcontext(e∣m)subscriptPmodelconditional𝑒𝑚subscriptPpriorconditional𝑒𝑚subscriptPcontextconditional𝑒𝑚subscriptPpriorconditional𝑒𝑚subscriptPcontextconditional𝑒𝑚\displaystyle\begin{split}\text{P}_{\text{model}}(e\mid m)&=\text{P}_{\text{prior}}(e\mid m)+\text{P}_{\text{context}}(e\mid m)\\&-\text{P}_{\text{prior}}(e\mid m)\times\text{P}_{\text{context}}(e\mid m)\end{split}Inference for the mention m𝑚m picks the entity,e^=argmaxe∈C(m)Pmodel(e∣m)^𝑒subscriptargmax𝑒𝐶𝑚subscriptPmodelconditional𝑒𝑚\displaystyle\hat{e}=\operatorname*{arg\,max}_{e\in C(m)}\text{P}_{\text{model}}(e\mid m)(8)
|
| 52 |
+
|
| 53 |
+
When only training the mention context encoder and entity vectors, we minimize the EC-Lossaveraged over all training mentions. Whenusing the two type-aware losses, we minimize aweighted sum of EC-Loss, TE-Loss, and TC-Loss,using the weighing scheme of Kendall et al. (2018),EC-Loss2λEC2+TE-Loss2λTE2+TC-Loss2λTC2+logλEC2+logλTE2+logλTC2EC-Loss2superscriptsubscript𝜆EC2TE-Loss2superscriptsubscript𝜆TE2TC-Loss2superscriptsubscript𝜆TC2superscriptsubscript𝜆EC2superscriptsubscript𝜆TE2superscriptsubscript𝜆TC2\displaystyle\begin{split}&\frac{\text{\sc EC-Loss}}{2\lambda_{\text{\sc EC}}^{2}}+\frac{\text{\sc TE-Loss}}{2\lambda_{\text{\sc TE}}^{2}}+\frac{\text{\sc TC-Loss}}{2\lambda_{\text{\sc TC}}^{2}}\\&+\log\lambda_{\text{\sc EC}}^{2}+\log\lambda_{\text{\sc TE}}^{2}+\log\lambda_{\text{\sc TC}}^{2}\end{split}(9)Here λisubscript𝜆𝑖\lambda_{i} are learnable scalar weighing parameters, and the respective 12λi212superscriptsubscript𝜆𝑖2\frac{1}{2\lambda_{i}^{2}} and logλi2superscriptsubscript𝜆𝑖2\log\lambda_{i}^{2} termensure that λi2superscriptsubscript𝜆𝑖2\lambda_{i}^{2} does not grow unboundedly. This way, the model learns the relativeweight for each loss term.
|
| 54 |
+
|
| 55 |
+
During training, mentions from different languages are mixed usinginverse-ratio mini-batch mixing strategy. That is, if twolanguages have training data sizes proportional to α:β:𝛼𝛽\alpha:\beta, atany time during training, mini-batches seen from them are in the ratio1α:1β:1𝛼1𝛽\frac{1}{\alpha}:\frac{1}{\beta}. This strategy prevents languageswith more training data from overwhelming languages with less trainingdata. Though simple, we found this strategy yielded good results.
|
| 56 |
+
|
| 57 |
+
We briefly describe the training and evaluation datasets, and the previous XEL approaches from the literature used in our comparison.
|
| 58 |
+
|
| 59 |
+
Following previous work, we use hyperlinks from Wikipedia (dumps dated 05/20/2017)as our source of grounded mentions for supervision.Wikipedias in different languages have different pages for the same entity, which are resolved by using inter-language links (e.g., page 利物浦 in Chinese Wikipedia resolves to Liverpool in English). Training mentions statistics are shown in Table 1.
|
| 60 |
+
|
| 61 |
+
We evaluate on 8 languages – German (de), Spanish (es), Italian (it), French (fr),Chinese (zh), Arabic (ar), Turkish (tr) and Tamil (ta), each of which has varying amount of grounded mentions from the respective Wikipedia (Table 1).We note that our method is applicable to any of the 293293293 Wikipedialanguages as a target language.
|
| 62 |
+
|
| 63 |
+
We evaluate Xelms on the following benchmark datasets, spanning 8 different languages, thus providing an extensive evaluation.
|
| 64 |
+
|
| 65 |
+
dataset from McNamee et al. (2011).The test set was collected by using parallel document collections, and then crowd-sourcing the ground truths.All the test mentions in this dataset consists of person-names only.
|
| 66 |
+
|
| 67 |
+
A subset of the dataset used in Tsai and Roth (2016), derived from Wikipedia.333Pan et al. (2017) also created a dataset using Wikipedia, but did not categorize mentions like Tsai and Roth (2016). Preliminary experiments on their dataset showed Xelms consistently beat Pan et al. (2017)’s model. We chose TH-Test for more controlled experiments.The mentions in the dataset fall in two categories – easy andhard, where hard mentions are those for which the most likelycandidate according to the prior probability (i.e., argmaxPprior(e∣m)argmaxsubscriptPpriorconditional𝑒𝑚\operatorname*{arg\,max}\text{P}_{\text{prior}}(e\mid m)) is not the correcttitle.Indeed, most Wikipedia mentions can be correctly linked by selecting the most likely candidate Ratinov et al. (2011).We use all the hard mentions from Tsai and Roth (2016)’s testsplits for each language, and collectively call thissubset TH-Test.
|
| 68 |
+
|
| 69 |
+
TAC 2015 Ji et al. (2015) dataset for Chinese and Spanish.It contains documents from discussion forum articles and news.
|
| 70 |
+
|
| 71 |
+
We evaluate all models using linking accuracy on gold mentions,and assume gold mentions are provided at test time.Table 2 summarizes the different domains of the evaluation datasets.
|
| 72 |
+
|
| 73 |
+
We avoid any dataset-specific tuning, instead tuning on a developmentset and applying the same parameters across all datasets. All tunableparameters were tuned on a development set containing the hardmentions from the train split released by Tsai and Roth (2016). Werefer the reader to Appendix B for details ontuning.
|
| 74 |
+
|
| 75 |
+
We compare against the following state-of-the-art (SoTA) approaches, described with the language from which they use mention contexts in (.),
|
| 76 |
+
|
| 77 |
+
trains a separate XEL model for each language using mention contexts from the target language Wikipedia only. Current SoTA on TH-Test.
|
| 78 |
+
|
| 79 |
+
uses entity coherence statistics from English Wikipedia and the document context of a mention for XEL. Current SoTA on McN-Test, except for Italian and Turkish, for which it’s McNamee et al. (2011).
|
| 80 |
+
|
| 81 |
+
uses multilingual embeddings to transfer a pre-trained English entity linking model to perform XEL for Spanish and Chinese. Prior probabilities PpriorsubscriptPprior\text{P}_{\text{prior}} are used as a feature. Current SoTA on TAC15-Test.
|
| 82 |
+
|
| 83 |
+
We show that: (a) Xelms can train a better entity linking model for a target language on various benchmark datasets by exploiting additional data from a high resource language like English (§5.1).(b) Xelms can train a single XEL model for multiple related languages and improve upon separately trained models (§5.2).(c) Adding additional type information as multi-task loss to Xelms further improves performance (§5.3).
|
| 84 |
+
|
| 85 |
+
In all tables, we report the linking accuracy of Xelms, averaged over 5 different runs, and mark with ∗ the statistical significance (p<0.01𝑝0.01p<0.01) of the best result (shown bold)against the state-of-the-art (SoTA) using Student’s one-sample t-test.
|
| 86 |
+
|
| 87 |
+
In Table 3 and 4 we compareXelms(mono), which uses monolingual supervision in the targetlanguage only, and Xelms(joint), which uses supervision fromEnglish in addition to the monolingual supervision, with the state-of-the-art approaches.
|
| 88 |
+
|
| 89 |
+
We see that Xelms(mono) achieves similaror slightly better scores than respective SoTA on all datasets. The SoTA for McN-Test in Turkish and Chinese enhances the model by using transliteration for candidate generation, explaining their superior performance.Xelms(joint) performs substantially better thanXelms(mono) on all datasets (Table 3 and4), proving that using additional supervision from a high resource language likeEnglish leads to better linking performance. In particular, Xelms(joint) outperforms the SoTA on all languages in TH-Test, on Spanish in TAC15-Test, and on 4 of the 7 languages in McN-Test.
|
| 90 |
+
|
| 91 |
+
Xelms is the first approach that can train a single XEL model for multiple languages.To demonstrate this capability, we train a model, henceforth referred as Xelms(multi),jointly on 5 related languages – Spanish, German, French, Italian andEnglish. We compare Xelms(multi) to the respective Xelms(joint) model for each language.
|
| 92 |
+
|
| 93 |
+
Table 4 and 5, show that Xelms(multi) is better (or at par) than Xelms(joint) on all datasets.This shows that Xelms(multi) can making more efficient use of available supervision in related languages than previous approaches which trained separate models per language.
|
| 94 |
+
|
| 95 |
+
To study the effect of adding fine-grained type information, in Table 4 we compare Xelms(mono) and Xelms(joint) to Xelms(mono+type+type{}^{\text{+type}}) and Xelms(joint+type+type{}^{\text{+type}}) respectively, which are versions of Xelms(mono) and Xelms(joint) trained using the two type-aware losses.
|
| 96 |
+
|
| 97 |
+
Xelms(mono+type+type{}^{\text{+type}}) and Xelms(joint+type+type{}^{\text{+type}}) both improve compared to Xelms(mono) and Xelms(joint) on McN-Test and TH-Test (Table 6 vs Table 3), showing the benefit of usingstructured knowledge in the form of fine-grained types. Similar trends are also seen on TAC15-Test(Table 4), where Xelms(joint+type+type{}^{\text{+type}})improves on the SoTA for Spanish and Chinese.
|
| 98 |
+
|
| 99 |
+
The key motivation of Xelms is to exploit supervision from high-resource languages like English to aid XEL for languages with limited resources. In this section, we examine two such scenarios,
|
| 100 |
+
|
| 101 |
+
(a) Zero-shot setting i.e., no supervision available in the target language.Our analysis reveals the limitations of zero-shot XEL approaches and finds that the prior probabilities play an important role in achieving good performance (§6.1), which are unavailable in realistic zero-shot scenarios.
|
| 102 |
+
|
| 103 |
+
(b) Low-resource setting i.e., some supervision available in the target language. We show that by combining supervision from a high-resource language, like English, Xelms can achieve competitive performance with a fraction of available supervision in the target language (§6.2).
|
| 104 |
+
|
| 105 |
+
We first explain how Xelms can perform zero-shot XEL, the implications of our zero-shot setting, and how it is more realistic than previous work.
|
| 106 |
+
|
| 107 |
+
Xelms performs zero-shot XEL by training a model using English supervision and multilingual embeddings for English, and directly applying it to the test data in another language using the respective multilingual word embedding instead of English embeddings.
|
| 108 |
+
|
| 109 |
+
Prior probabilities (or prior), i.e., PpriorsubscriptPprior\text{P}_{\text{prior}} have been shown to be a reliable indicator of the correct disambiguation in entity linking Ratinov et al. (2011); Tsai and Roth (2016).These probabilities are estimated from counts over the training mentions in the target language. In the absence of training data for the target language, as in the zero-shot setting, these prior probabilities are not available to an XEL model.
|
| 110 |
+
|
| 111 |
+
The only other model capable of zero-shot XEL is that ofSil et al. (2018). However, Sil et al. (2018) use prior probabilities and coreference chains for the target language in their zero-shotexperiments, both of which will not be available in a realistic zero-shot scenario. Compared to Sil et al. (2018), we evaluate the performance of zero-shot XELin more realistic setting, and show it is adversely affected by absence of prior probabilities.
|
| 112 |
+
|
| 113 |
+
To evaluate the effectiveness of the zero-shot XEL approach, we perform zero-shot XEL using Xelms on all datasets. Table 7 shows zero-shot XEL results on all datasets, both with and without using the prior during inference. Note that zero-shot XEL (with prior) is close to SoTA (Sil et al. (2018)) on TAC15-Test, which also uses the prior for zero-shot XEL. However, for zero-shot XEL (without prior) performance drops by more than 20% for TAC15-Test, 2.4% for TH-Test and by 2.1% for McN-Test. This indicates that zero-shot XEL is not effective in a realistic zero-shot setting (i.e., when the prior is unavailable for inference).
|
| 114 |
+
|
| 115 |
+
We found that the prior is indeed a strong indicator of the correct disambiguation. For instance, simply selecting the the most likely candidate using the prior for TAC15-Test achieved 77.2% and 78.8% for Spanish and Chinese respectively.It is interesting to note that both zero-shot XEL (with or without prior) perform worse than the best possible model on TH-Test, because TH-Test was constructed to ensure prior probabilities are not strong indicators Tsai and Roth (2016).On McN-Test, we found that an average of 75.9% mentions have only one (the correct) candidate, making them trivial to link, regardless of the absence of priors.
|
| 116 |
+
|
| 117 |
+
The results show that most of the XEL performance in zero-shot settings can be attributed to availability of prior probabilities for the candidates.It is evident that zero-shot XEL in a realistic setting (i.e., when prior probabilities are not available) is still a challenging problem.
|
| 118 |
+
|
| 119 |
+
We analyze the behavior of Xelms in a low-resource setting, i.e. when some supervision is available in the target language.The aim of this setting is to estimate how much supervision from the target language is needed to get reasonable performance when using it jointly with supervision from English.To discount the effect of prior probabilities, we report all results without the prior.
|
| 120 |
+
|
| 121 |
+
Figure 4 plots results on the TH-Test dataset when training a Xelms(joint) model by gradually increasing the number of mention contexts for target language L (= Spanish, Chinese and Turkish) that are available for supervision. Figure 4 also shows the best results achieved using all available target language supervision (denoted by L-best). For comparison with the mono-lingually supervised model, we also plot the performance of Xelms(mono), which only uses the target language supervision.
|
| 122 |
+
|
| 123 |
+
Figure 4 shows that after training on 0.75M mentions from Turkish and Chinese (and 1.0M mentions from Spanish), the Xelms(joint) model is within 2-3% of the respective L-best model which uses all training mentions in the target language, indicating that Xelms(joint) can reach competitive performance even with a fraction of the full target language supervision. For comparison, a Xelms(mono) model trained on the same number of training mentions is 5-10% behind the respective Xelms(joint) model, showing better utilization of target language supervision by Xelms(joint).
|
| 124 |
+
|
| 125 |
+
Existing approaches have taken two main directions to obtain supervision for learning XEL models— (a) using mention contexts appearing in the target language McNamee et al. (2011); Tsai and Roth (2016), or (b) using mention contexts appearing only in English Pan et al. (2017); Sil et al. (2018). We describe these directions and their limitations below, and explain how Xelms overcomes these limitations.
|
| 126 |
+
|
| 127 |
+
McNamee et al. (2011) use annotation projection via parallel corpora to generate mention contexts in the targetlanguage, while Tsai and Roth (2016) learns separate XELmodels for each language and only use mention contexts in the target language.Both these approach have scalability issuesfor languages with limited resources.Another limitation of theseapproaches is that they train separate models for each language, which is inefficient when working with multiple languages.Xelms overcomes these limitations as it can use mention context from multiple languages simultaneously, and train a single model.
|
| 128 |
+
|
| 129 |
+
Other approaches only use mention contexts from English. While Pan et al. (2017) compute entity coherence statistics from English Wikipedia, Sil et al. (2018) perform zero-shot XEL for Chinese and Spanish by using multilingual embeddings to transfer a pre-trained English EL model.However, our work suggests that mention contexts in the target language should also be used, if available. Indeed, a recent study Lewoniewski et al. (2017) found that forlanguage sensitive topics, the quality of information can bebetter in the relevant language version of Wikipedia than the English version.Our analysis also shows that zero-shot XEL approaches like that of Sil et al. (2018) are not effective in realistic zero-shot scenarios where good prior probabilities are unlikely to be available.In such cases, we showed that combining supervision available in the target language with supervision from a high-resource language like English can yield significant performance improvements.
|
| 130 |
+
|
| 131 |
+
The architecture of Xelms is inspired by several monolingual entity linkingsystems Francis-Landau et al. (2016); Nguyen et al. (2016); Gupta et al. (2017), approaches that use type information to aid entity linking Ling et al. (2015); Gupta et al. (2017); Raiman and Raiman (2018), and the recent success of multilingual embeddings for several tasks Ammar et al. (2016a); Duong et al. (2017).
|
| 132 |
+
|
| 133 |
+
We introduced Xelms, an approach that can combine supervision from multiple languages to train an XEL model. We illustrate its benefits through extensive evaluation on different benchmarks. Xelms is also the first approach that can train a single model for multiple languages, making more efficient use of available supervision than previous approaches which trained separate models.
|
| 134 |
+
|
| 135 |
+
Our analysis sheds light on the poor performance of zero-shot XEL in realistic scenarios where the prior probabilities for candidates are unlikely to exist, in contrast to findings in previous work that focused on high-resource languages. We also show how in low-resource settings, Xelms makes it possible to achieve competitive performance even when only a fraction of the available supervision in the target language is provided.
|
| 136 |
+
|
| 137 |
+
Several future research directions remain open. For all XEL approaches, thetask of candidate generation is currently limited by existence of atarget language Wikipedia and remains a keychallenge. A joint inference framework which enforces coherentpredictions Cheng and Roth (2013); Globerson et al. (2016); Ganea and Hofmann (2017)could also lead to further improvements for XEL. Similar techniquescan be applied to other information extraction tasks like relation extraction to extendthem to multilingual settings.
|
1809.07845v2.txt
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Visual tracking, aiming to locate an arbitrary target in a video with an initial bounding box in the first frame, has been one of the most important problems in computer vision with many applications such as video surveillance, robotics, human-computer interaction and so forth [32, 47, 54]. With considerable progresses in the tracking community, numerous algorithms have been proposed. In this process, tracking benchmarks have played a vital role in objectively evaluating and comparing different trackers. Nevertheless, further development and assessment of tracking algorithms are restricted by existing benchmarks with several issues:
|
| 2 |
+
|
| 3 |
+
Small-scale. Deep representations have been popularly applied to modern object tracking algorithms, and demonstrated state-of-the-art performances. However, it is difficult to train a deep tracker using tracking-specific videos due to the scarcity of large-scale tracking datasets. As shown in Fig. 1, existing datasets seldom have more than 400 sequences. As a result, researchers are restricted to leverage either the pre-trained models (e.g., [46] and [18]) from image classification for deep feature extraction or the sequences from video object detection (e.g., [45] and [43]) for deep feature learning, which may result in suboptimal tracking performance because of the intrinsic differences among different tasks [55]. Moreover, large scale benchmarks are desired for more reliable evaluation results.
|
| 4 |
+
|
| 5 |
+
Lack of high-quality dense annotations. For tracking, dense (i.e., per frame) annotations with high precision are of importance for several reasons. (i) They ensure more accurate and reliable evaluations; (ii) they offer desired training samples for the training of tracking algorithms; and (iii) they provide rich temporal contexts among consecutive frames that are important for tracking tasks. It is worth noting that there are recently proposed benchmarks toward large-scale and long-term tracking, such as [41] and [51], their annotations are however either semi-automatic (e.g., generated by a tracking algorithm) or sparse (e.g., labeled every 30 frames), limiting their usabilities.
|
| 6 |
+
|
| 7 |
+
Short-term tracking. A desired tracker is expected to be capable of locating the target in a relative long period, in which the target may disappear and re-enter the view. However, most existing benchmarks have been focused on short-term tracking where the average sequence length is less than 600 frames (i.e., 20 seconds for 30 fps, see again Fig. 1) and the target almost always appears in the video frame. The evaluations on such short-term benchmarks may not reflect the real performance of a tracker in real-world applications, and thus restrain the deployment in practice.
|
| 8 |
+
|
| 9 |
+
Category bias. A robust tracking system should exhibit stable performance insensitive to the category the target belongs to, which signifies that the category bias (or class imbalance) should be inhibited in both training and evaluating tracking algorithms. However, existing benchmarks usually comprise only a few categories (see Tab. 1) with unbalanced numbers of videos.
|
| 10 |
+
|
| 11 |
+
In the literature, many datasets have been proposed to deal with the issues above: e.g., [39, 51] for long-term tracking, [41] for large-scale, [52, 35, 25] for precise dense annotations. Nevertheless, none of them addresses all the issues, which motivates the proposal of LaSOT.
|
| 12 |
+
|
| 13 |
+
With the above motivations, we provide the community a novel benchmark for Large-scale Single Object Tracking (LaSOT) with multi-fold contributions:
|
| 14 |
+
|
| 15 |
+
1)LaSOT consists of 1,400 videos with average 2,512 frames per sequence. Each frame is carefully inspected and manually labeled, and the result visually double-checked and corrected when needed. This way, we generate around 3.52 million high-quality bounding box annotations. Moreover, LaSOT contains 70 categories with each consisting of twenty sequences. To our knowledge, LaSOT is the largest benchmark with high-quality manual dense annotations for object tracking to date. By releasing LaSOT, we aim to offer a dedicated platform for the development and assessment of tracking algorithms.2)Different from existing datasets, LaSOT provides both visual bounding box annotations and rich natural language specification, which has recently been proven to be beneficial for various vision tasks (e.g., [21, 31]) including visual tracking [34]. By doing so, we aim to encourage and facilitate explorations of integrating visual and lingual features for robust tracking performance.3)To assess existing trackers and provide extensive baselines for future comparisons on LaSOT, we evaluate 35 representative trackers under different protocols, and analyze their performances using different metrics.
|
| 16 |
+
|
| 17 |
+
With considerable progresses in the tracking community, many trackers and benchmarks have been proposed in recent decades. In this section, we mainly focus on the tracking benchmarks that are relevant to our work, and refer the readers to surveys [32, 47, 54, 30] for tracking algorithms.
|
| 18 |
+
|
| 19 |
+
For a systematic review, we intentionally classify tracking benchmarks into two types: one with dense manual annotations (referred to as dense benchmark for short) and the other one with sparse and/or (semi-)automatic annotations. In the following, we review each of these two categories.
|
| 20 |
+
|
| 21 |
+
Dense tracking benchmark provides dense bounding box annotations for each video sequence. To ensure high quality, the bounding boxes are usually manually labeled with careful inspection. For the visual tracking task, these highly precise annotations are desired for both training and assessing trackers. Currently, the popular dense benchmarks contain OTB [52, 53], TC-128 [35], VOT [25], NUS-PRO [28], UAV [39], NfS [14] and GOT-10k [22].
|
| 22 |
+
|
| 23 |
+
OTB. OTB-2013 [52] firstly contributes a testing dataset by collecting 51 videos with manually annotated bounding box in each frame. The sequences are labeled with 11 attributes for further analysis of tracking performance. Later, OTB-2013 is extended to the larger OTB-2015 [53] by introducing extra 50 sequences.
|
| 24 |
+
|
| 25 |
+
TC-128. TC-128 [35] comprises 128 videos that are specifically designated to evaluate color-enhanced trackers. The videos are labeled with 11 similar attributes as in OTB [52].
|
| 26 |
+
|
| 27 |
+
VOT. VOT [25] introduces a series of tracking competitions with up to 60 sequences in each of them, aiming to evaluate the performance of a tracker in a relative short duration. Each frame in the VOT datasets is annotated with a rotated bounding box with several attributes.
|
| 28 |
+
|
| 29 |
+
NUS-PRO. NUS-PRO [28] contains 365 sequences with a focus on human and rigid object tracking. Each sequence in NUS-PRO is annotated with both target location and occlusion level for evaluation.
|
| 30 |
+
|
| 31 |
+
UAV. UAV123 and UAV20L [39] are utilized for unmanned aerial vehicle (UAV) tracking, comprising 123 short and 20 long sequences, respectively. Both UAV123 and UAV20L are labeled with 12 attributes.
|
| 32 |
+
|
| 33 |
+
NfS. NfS [14] provides 100 sequences with a high framerate of 240 fps, aiming to analyze the effects of appearance variations on tracking performance.
|
| 34 |
+
|
| 35 |
+
GOT-10k. GOT-10k [22] consists of 10,000 videos, aiming to provide rich motion trajectories for developing and evaluating trackers.
|
| 36 |
+
|
| 37 |
+
LaSOT belongs to the category of dense tracking dataset. Compared to others, LaSOT is the largest with 3.52 million frames and an average sequence length of 2,512 frames. In addition, LaSOT provides extra lingual description for each video while others do not. Tab. 1 provides a detailed comparison of LaSOT with existing dense benchmarks.
|
| 38 |
+
|
| 39 |
+
In addition to the dense tracking benchmarks, there exist other benchmarks which may not provide high-quality annotations for each frame. Instead, these benchmarks are either annotated sparsely (e.g., every 30 frames) or labeled (semi-)automatically by tracking algorithms. Representatives of this type of benchmarks include ALOV [47], TrackingNet [41] and OxUvA [51].ALOV [47] consists of 314 sequences labeled in 14 attributes. Instead of densely annotating each frame, ALOV provides annotations every 5 frames. TrackingNet [41] is a subset of the video object detection benchmark YT-BB [43] by selecting 30K videos, each of which is annotated by a tracker. Though the tracker used for annotation is proven to be reliable in a short period (i.e., 1 second) on OTB 2015 [53], it is difficult to guarantee the same performance on a harder benchmark. Besides, the average sequence length of TrackingNet does not exceed 500 frames, which may not demonstrate the performance of a tracker in long-term scenarios. OxUvA [51] also comes from YT-BB [43]. Unlike TrackingNet, OxUvA is focused on long-term tracking. It contains 366 videos with an average length of around 4,200 frames. However, a problem with OxUvA is that it does not provide dense annotations in consecutive frames. Each video in OxUvA is annotated every 30 frames, ignoring rich temporal context between consecutive frames when developing a tracking algorithm.
|
| 40 |
+
|
| 41 |
+
Despite reduction of annotation cost, the evaluations on these benchmarks may not faithfully reflect the true performances of tracking algorithms. Moreover, it may cause problems for some trackers that need to learn temporal models from annotations, since the temporal context in these benchmarks may be either lost due to sparse annotation or inaccurate due to potentially unreliable annotation. By contrast, LaSOT provides a large set of sequences with high-quality dense bounding box annotations, which makes it more suitable for developing deep trackers as well as evaluating long-term tracking in practical application.
|
| 42 |
+
|
| 43 |
+
LaSOT aims to offer the community a dedicated dataset for training and assessing trackers. To such purpose, we follow five principles in constructing LaSOT, including large-scale, high-quality dense annotations, long-term tracking, category balance and comprehensive labeling.
|
| 44 |
+
|
| 45 |
+
1)Large-scale. One of the key motivations of LaSOT is to provide a dataset for training data-hungry deep trackers, which require a large set of annotated sequences. Accordingly, we expect such a dataset to contain at least a thousand videos with at least a million frames.2)High-quality dense annotations. As mentioned before, a tracking dataset is desired to have high-quality dense bounding box annotations, which are crucial for training robust trackers as well as for faithful evaluation. For this purpose, each sequence in LaSOT is manually annotated with additional careful inspection and fine-tuning.3)Long-term tracking. In comparison with short-term tracking, long-term tracking can reflect more practical performance of a tracker in the wild. We ensure that each sequence comprises at least 1,000 frames, and the average sequence length in LaSOT is around 2,500 frames.4)Category balance. A robust tracker is expected to perform consistently regardless of the category the target object belongs to. For this purpose, in LaSOT we include a diverse set of objects from 70 classes and each class contains equal number of videos.5)Comprehensive labeling. As a complex task, tracking has recently seen improvements from natural language specification. To stimulate more explorations, a principle of LaSOT is to provide comprehensive labeling for videos, including both visual and lingual annotations.
|
| 46 |
+
|
| 47 |
+
Our benchmark covers a wide range of object categories in diverse contexts. Specifically, LaSOT consists of 70 object categories. Most of the categories are selected from the 1,000 classes from ImageNet [12], with a few exceptions (e.g., drone) that are carefully chosen for popular tracking applications. Different from existing dense benchmarks that have less than 30 categories and typically are unevenly distributed, LaSOT provides the same number of sequences for each category to alleviate potential category bias. Details of the dataset can be found in the supplementary material.
|
| 48 |
+
|
| 49 |
+
After determining the 70 object categories in LaSOT, we have searched for the videos of each class from YouTube. Initially, we collect over 5,000 videos. With a joint consideration of the quality of videos for tracking and the design principles of LaSOT, we pick out 1,400 videos. However, these 1,400 sequences are not immediately available for the tracking task because of a large amount of irrelevant contents. For example, for the video of person category (e.g., a sporter), it often contains some introduction content of each sporter in the beginning, which is undesirable for tracking. Therefore, we carefully filter out these unrelated contents in each video and retain an usable clip for tracking. In addition, each category in LaSOT consists of 20 targets, reflecting the category balance and varieties of natural scenes.
|
| 50 |
+
|
| 51 |
+
Eventually, we have compiled a large-scale dataset by gathering 1,400 sequences with 3.52 million frames from YouTube under Creative Commons licence. The average video length of LaSOT is 2,512 frames (i.e., 84 seconds for 30 fps). The shortest video contains 1,000 frames (i.e., 33 seconds), while the longest one consists of 11,397 frames (i.e., 378 seconds).
|
| 52 |
+
|
| 53 |
+
In order to provide consistent bounding box annotation, we define a deterministic annotation strategy. Given a video with a specific tracking target, for each frame, if the target object appears in the frame, a labeler manually draws/edits its bounding box as the tightest up-right one to fit any visible part of the target; otherwise, the labeler gives an absent label, either out-of-view or full occlusion, to the frame. Note that, such strategy can not guarantee to minimize the background area in the box, as observed in any other benchmarks. However, the strategy does provide a consistent annotation that is relatively stable for learning the dynamics.
|
| 54 |
+
|
| 55 |
+
While the above strategy works great most of the time, exceptions exist. Some objects, e.g. a mouse, may have long and thin and highly deformable part, e.g. a tail, which not only causes serious noise in object appearance and shape, but also provides little information for localizing of the target object. We carefully identify such objects and associated videos in LaSOT, and design specific rules for their annotation (e.g., exclude the tails of mice when drawing their bounding boxes). An example of such cases is shown in the last row of Fig. 2.
|
| 56 |
+
|
| 57 |
+
The natural language specification of a sequence is represented by a sentence that describes the color, behavior and surroundings of the target. For LaSOT, we provide 1,400 sentences for all videos. Note that the lingual description aims to provide auxiliary help for tracking. For instance, if a tracker generates proposals for further processing, the lingual specification can assist in reducing the ambiguity among them by serving as a global semantic guidance.
|
| 58 |
+
|
| 59 |
+
The greatest effort for constructing a high-quality dense tracking dataset is, apparently, the manual labeling, double-checking, and error correcting. For this task, we have assembled an annotation team containing several Ph.D. students working on related areas and about 10 volunteers.To guarantee high-quality annotation, each video is processed by teams: a labeling team and a validation team. A labeling team is composed of a volunteer and an expert (Ph.D. student). The volunteer manually draws/edits the target bounding box in each frame, and the expert inspects the results and adjusts them if necessary. Then, the annotation results are reviewed by the validation team containing several (typically three) experts. If an annotation result is not unanimously agreed by the members of validation team, it will be sent back to the original labeling team to revise.
|
| 60 |
+
|
| 61 |
+
To improve the annotation quality as much as possible, our team checks the annotation results very carefully and revises them frequently. Around 40% of the initial annotations fail in the first round of validation. And many frames are revised more than three times. Some challenging examples of frames that are initially labeled incorrectly or inaccurately are given in Fig. 3.With all these efforts, we finally reach a benchmark with high-quality dense annotation, with some examples shown in Fig. 2.
|
| 62 |
+
|
| 63 |
+
To enable further performance analysis of trackers, we label each sequence with 14 attributes, including illumination variation (IV), full occlusion (FOC), partial occlusion (POC), deformation (DEF), motion blur (MB), fast motion (FM), scale variation (SV), camera motion (CM), rotation (ROT), background clutter (BC), low resolution (LR), viewpoint change (VC), out-of-view (OV) and aspect ratio change (ARC). The attributions are defined in Tab. 2, and Fig. 4 (a) shows the distribution of videos in each attribute.
|
| 64 |
+
|
| 65 |
+
From Fig. 4 (a), we observe that the most common challenge factors in LaSOT are scale changes (SV and ARC), occlusion (POC and FOC), deformation (DEF) and rotation (ROT), which are well-known challenges for tracking in real-world applications. Besides, Fig. 4 (b) demonstrates the distribution of attributes of LaSOT compared to OTB-2015 [53] and TC-128 [35] on overlapping attributes. From the figure we observe that more than 1,300 videos in LaSOT are involved with scale variations. Compared with OTB-2015 and TC-128 with less than 70 videos with scale changes, LaSOT is more challenging for scale changes. In addition, on the out-of-view attribute, LaSOT comprises 477 sequences, much larger than existing benchmarks.
|
| 66 |
+
|
| 67 |
+
Though there is no restriction to use LaSOT, we suggest two evaluation protocols for evaluating tracking algorithms, and conduct evaluations accordingly.
|
| 68 |
+
|
| 69 |
+
Protocol I. In protocol I, we use all 1,400 sequences to evaluate tracking performance. Researchers are allowed to employ any sequences except for those in LaSOT to develop tracking algorithms. Protocol I aims to provide large-scale evaluation of trackers.
|
| 70 |
+
|
| 71 |
+
Protocol II. In protocol II, we split LaSOT into training and testing subsets. According to the 80/20 principle (i.e., the Pareto principle), we select 16 out of 20 videos in each category for training, and the rest is for testing111The training/testing split is shown in the supplementary material.. In specific, the training subset contains 1,120 videos with 2.83M frames, and the testing subset consists of 280 sequences with 690K frames. The evaluation of trackers is performed on the testing subset. Protocol II aims to provide a large set of videos for training and assessing trackers in the mean time.
|
| 72 |
+
|
| 73 |
+
Following popular protocols (e.g. OTB-2015 [53]), we perform an One-Pass Evaluation (OPE) and measure the precision, normalized precision and success of different tracking algorithms under two protocols.
|
| 74 |
+
|
| 75 |
+
The precision is computed by comparing the distance between tracking result and groundtruth bounding box in pixels. Different trackers are ranked with this metric on a threshold (e.g., 20 pixels). Since the precision metric is sensitive to target size and image resolution, we normalize the precision as in [41]. With the normalized precision metric, we rank tracking algorithms using the Area Under the Curve (AUC) between 0 to 0.5. Please refer to [41] about the normalized precision metric. The success is computed as the Intersection over Union (IoU) between tracking result and groundtruth bounding box. The tracking algorithms are ranked using the AUC between 0 to 1.
|
| 76 |
+
|
| 77 |
+
We evaluate 35 algorithms on LaSOT to provide extensive baselines, comprising deep trackers (e.g., MDNet [42], TRACA [5], CFNet [50], SiamFC [4], StructSiam [59], DSiam [16], SINT [49] and VITAL [48]), correlation filter trackers with hand-crafted features (e.g., ECO_HC [7], DSST [8], CN [11], CSK [19], KCF [20], fDSST [9], SAMF [33], SCT4 [6], STC [57] and Staple [3]) or deep features (e.g., HCFT [37] and ECO [7]) and regularization techniques (e.g., BACF [15], SRDCF [10], CSRDCF [36], Staple_CA [40] and STRCF [29]), ensemble trackers (e.g., PTAV [13], LCT [38], MEEM [56] and TLD [24]), sparse trackers (e.g., L1APG [2] and ASLA [23]), other representatives (e.g., CT [58], IVT [44], MIL [1] and Struck [17]). Tab. 3 summarizes these trackers with their representation schemes and search strategies in a chronological order.
|
| 78 |
+
|
| 79 |
+
Overall performance. Protocol I aims at providing large-scale evaluations on all 1,400 videos in LaSOT. Each tracker is used as it is for evaluation, without any modification. We report the evaluation results in OPE using precision, normalized precision and success, as shown in Fig. 5. MDNet achieves the best precision score of 0.374 and success score of 0.413, and VITAL obtains the best normalized precision score of 0.484. Both MDNet and VITAL are trained in an online fashion, resulting in expensive computation and slow running speeds. SimaFC tracker, which learns off-line a matching function from a large set of videos using deep network, achieves competitive results with 0.341 precision score, 0.449 normalized precision score and 0.358 success score, respectively. Without time-consuming online model adaption, SiamFC runs efficiently in real-time. The best correlation filter tracker is ECO with 0.298 precision score, 0.358 normalized precision score and 0.34 success score.
|
| 80 |
+
|
| 81 |
+
Compared to the typical tracking performances on existing dense benchmarks (e.g., OTB-2015 [53]), the performances on LaSOT are severely degraded because of a large mount of non-rigid target objects and challenging factors involved in LaSOT. An interesting observation from Fig. 5 is that all the top seven trackers leverage deep feature, demonstrating its advantages in handling appearance changes.
|
| 82 |
+
|
| 83 |
+
Attribute-based performance. To analyze different challenges faced by existing trackers, we evaluate all tracking algorithms on 14 attributes. We show the results on three most challenging attributes, i.e., fast motion, out-of-view and full occlusion, in Fig. 6 and refer the readers to supplementary material for detailed attribute-based evaluation.
|
| 84 |
+
|
| 85 |
+
Qualitative evaluation. To qualitatively analyze different trackers and provide guidance for future research, we show the qualitative evaluation results of six representative trackers, including MDNet, SiamFC, ECO, PTAV, Staple and MEEM, in six typical hard challenges containing fast motion, full occlusion, low resolution, out-of-view, aspect ratio change and background clutter in Fig. 7. From Fig. 7, we observe that, for videos with fast motion, full occlusion and out-of-view (e.g., Yoyo-3, Goldfish-4 and Basketball-15), the trackers are prone to lose the target because existing trackers usually perform localization from a small local region. To handle these challenges, a potential solution is to leverage an instance-specific detector to locate the target for subsequent tracking. Trackers easily drift in video with low resolution (e.g., Pool-4) due to the ineffective representation for small target. A solution for deep feature based trackers is to combine features from multiple scales to incorporate details into representation. Video with aspect ratio change is difficult as most existing trackers either ignore this issue or adopt a simple method (e.g., random search or pyramid strategy) to deal with it. Inspired from the success of deep learning based object detection, a generic regressor can be leveraged to reduce the effect of aspect ratio change (and scale change) on tracking. For sequence with background clutter, trackers drift due to less discriminative representation for target and background. A possible solution to alleviate this problem is to utilize the contextual information to enhance the discriminability.
|
| 86 |
+
|
| 87 |
+
Under protocol II, we split LaSOT into training and testing sets. Researchers are allowed to leverage the sequences in the training set to develop their trackers and assess their performances on the test set. In order to provide baselines and comparisons on the testing set, we evaluate the 35 tracking algorithms. Each tracker is used as it is for evaluation without any modification or re-training. The evaluation results are shown in Fig. 8 using precision, normalized precision and success. We observe consistent results as in protocol I. MDNet and VITAL show top performances with precision scores of 0.373 and 0.36, normalized precision scores of 0.46 and 0.453 and success scores of 0.397 and 0.39. Next, SiamFC achieves the third-ranked performance with a 0.339 precision score, a 0.42 normalized precision score and a 0.336 success score, respectively. Despite slightly lower scores in accuracy than MDNet and VITAL, SiamFC runs much faster and achieves real-time running speed, showing good balance between accuracy and efficiency. For attribute-based evaluation of trackers on LaSOT testing set, we refer the readers to supplementary material because of limited space.
|
| 88 |
+
|
| 89 |
+
In addition to evaluating each tracking algorithm as it is, we conduct experiments by re-training two representative deep trackers, MDNet [42] and SiamFC [4], on the training set of LaSOT and assessing them. The evaluation results show similar performances for these trackers as without retraining. A potential reason is that our re-training may not follow the same configurations used by the original authors. Besides, since LaSOT are in general more challenging than previous datasets (e.g., all sequences are long-term), dedicated configuration may be needed for training these trackers. We leave this part as a future work since it is beyond the scope of this benchmark.
|
| 90 |
+
|
| 91 |
+
We conduct the experiment by retraining SiamFC [4] on the training set of LaSOT to demonstrate how deep learning based tracker is improved using more data. Tab. 4 reports the results on OTB-2013 [52] and OTB-2015 [53] and comparisons with the performance of original SiamFC trained on ImageNet Video [45]. Note that, we utilize color images for training, and apply a pyramid with 3 scales for tracking, i.e., SiamFC-3s (color). All parameters for training and tracking are kept the same in these two experiments. From Tab. 4, we observe consistent performance gains on the two benchmarks, showing the importance of specific large-scale training set for deep trackers.
|
| 92 |
+
|
| 93 |
+
We present LaSOT with high-quality dense bounding box annotations for visual object tracking. To the best of our knowledge, LaSOT is the largest tracking benchmark with high quality annotations to date. By releasing LaSOT, we expect to provide the tracking community a dedicated platform for training deep trackers and assessing long-term tracking performance. Besides, LaSOT provides lingual annotations for each sequence, aiming to encourage the exploration on integrating visual and lingual features for robust tracking. By releasing LaSOT, we hope to narrow the gap between the increasing number of deep trackers and the lack of large dedicated datasets for training, and meanwhile provide more veritable evaluations for different trackers in the wild. Extensive evaluations on LaSOT under two protocols imply a large room to improvement for visual tracking.
|
| 94 |
+
|
| 95 |
+
Acknowledgement. We sincerely thank B. Huang, X. Li, Q. Zhou, L. Chen, J. Liang, J. Wang and anonymous volunteers for their help in constructing LaSOT. This work is supported in part by the China National Key Research and Development Plan (Grant No. 2016YFB1001200), and in part by US NSF Grants 1618398, 1449860 and 1350521, and Yong Xu thanks the supports by National Nature Science Foundation of China (U1611461 and 61672241), the Cultivation Project of Major Basic Research of NSF-Guangdong Province (2016A030308013).
|
1809.07888v3.txt
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
In the last years, several probabilistic variants of Prologhave been developed, such asICL [Poole, 2000], Dyna [Eisner et al., 2005], PRISM [Sato and Kameya, 2001] and ProbLog [De Raedt et al., 2007], with its aProbLog extension [Kimmig et al., 2011] to handle arbitrary labels from a semiring (Section 2.1).They all are based ondefinite clause logic (pure Prolog) extended with facts labelled with probability values.Their meaning is typically derived fromSato’s distribution semantics [Sato, 1995], which assigns a probability to every literal. The probability of a Herbrand interpretation, or possible world, is the product of the probabilities of the literals occurring in this world.The success probability is the probability that a query succeeds in a randomly selected world.
|
| 2 |
+
|
| 3 |
+
Faithfully capturing the distribution of the probabilities of such queries is necessary for effective decision making under uncertainty to compute an expected utility [Von Neumann and Morgenstern, 2007]. Often such distributions are learned from prior experiences that can be provided either by subject matter experts or by objective recordings.
|
| 4 |
+
|
| 5 |
+
Unfortunately, these probability distributions can be highly uncertain and this significantly affects decision making [Anderson et al., 2016, Antonucci et al., 2014]. In fact, not all scenarios are blessed with a substantial amount of data enabling reasonable characterisation of probability distributions. For instance, when dealing with adversarial behaviours such as policing operations, training data is sparse or subject matter experts have limited experience to elicit the probabilities.
|
| 6 |
+
|
| 7 |
+
To understand and accurately manipulate such probability distributions, we need a well-defined theoretical framework that is provided by the Beta distribution, which specifies a distribution of probabilities representing all the possible values of a probability when the exact value is unknown. This has been recently investigated in the context of singly-connected Bayesian Network, in an approach named Subjective Bayesian Network (SBN) [Ivanovska et al., 2015, Kaplan and Ivanovska, 2016, Kaplan and Ivanovska, 2018], that shows higher performance against other traditional approaches dealing with uncertain probabilities, such as Dempster-Shafer Theory of Evidence [Dempster, 1968, Smets, 1993], and replacing single probability values with closed intervals representing the possible range of probability values [Zaffalon and Fagiuoli, 1998]. SBN is based on Subjective Logic [Jøsang, 2016] (Section 2.2) that provides an alternative, more intuitive, representation of Beta distributions as well as a calculus for manipulating them. Subjective logic has been successfully applied in a variety of domains, from trust and reputation [Jøsang et al., 2006], to urban water management [Moglia et al., 2012], to assessing the confidence of neural networks for image classification [Sensoy et al., 2018].
|
| 8 |
+
|
| 9 |
+
In this paper, we enable aProbLog [Kimmig et al., 2011] to reason in presence of uncertain probabilities represented as Beta distribution. Among other features, aProbLog is freely available111https://dtai.cs.kuleuven.be/problog/ and it directly handles Bayesian networks,222As pointed out by [Fierens et al., 2015], for such Bayesian network models, ProbLog inference is tightly linked to the inference approach of [Sang et al., 2005]. which simplifies our experimental setting when comparing against SBN and other approaches on Bayesian Networks with uncertain probabilities.We determine a parametrisation for aProbLog (Section 3) deriving operators for addition, multiplication, and division operating on Beta-distributed random variables matching the results to a new Beta-distributed random variable using the moment matching method [Minka, 2001, Kleiter, 1996, Allen et al., 2008, Kaplan and Ivanovska, 2018].
|
| 10 |
+
|
| 11 |
+
We achieve the same results of highly engineered approaches for inferencing in single-connected Bayesian networks—in particular in presence of high uncertainty in the distribution of probabilities which is our main research focus—and simultaneously we maintain the flexibility offered by aProbLog in handling complex relational domains.Results of our experimental analysis (Section 4) indeed indicate that the proposed approach (1) handles inferences in general aProbLog programs better than using standard subjective logic operators [Jøsang, 2016] (Appendix A), and (2) it performs equivalently to state-of-the-art approaches of reasoning with uncertain probabilities [Kaplan and Ivanovska, 2018, Zaffalon and Fagiuoli, 1998, Smets, 1993], despite the fact that they have been highly engineered for the specific case of single connected Bayesian Networks while we can handle general aProbLog programs.
|
| 12 |
+
|
| 13 |
+
For a set J𝐽J of ground facts, we define the set of literals L(J)L𝐽\operatorname{L}(J) and the set of interpretations ℐ(J)ℐ𝐽\mathcal{I}(J) as follows:L(J)L𝐽\displaystyle\operatorname{L}(J)=J∪{¬f|f∈J}absent𝐽conditional-set𝑓𝑓𝐽\displaystyle=J\cup\{\neg f~{}|~{}f\in J\}(1)���(J)ℐ𝐽\displaystyle\mathcal{I}(J)={S|S⊆L(J)∧∀l∈J:l∈S↔¬l∉S}absentconditional-set𝑆:𝑆L𝐽for-all𝑙𝐽𝑙𝑆↔𝑙𝑆\displaystyle=\{S~{}|~{}S\subseteq\operatorname{L}(J)\wedge\forall l\in J:~{}l\in S\leftrightarrow\neg l\notin S\}(2)
|
| 14 |
+
|
| 15 |
+
An algebraic Prolog (aProbLog) program [Kimmig et al., 2011] consists of:•a commutative semiring ⟨𝒜,⊕,⊗,e⊕,e⊗⟩𝒜direct-sumtensor-productsuperscript𝑒direct-sumsuperscript𝑒tensor-product\langle\mathcal{A},\oplus,\otimes,e^{\oplus},e^{\otimes}\rangle333That is, addition ⊕direct-sum\oplus and multiplication ⊗tensor-product\otimes are associative and commutative binary operations over the set 𝒜𝒜\mathcal{A}, ⊗tensor-product\otimes distributes over ⊕direct-sum\oplus, e⊕∈𝒜superscript𝑒direct-sum𝒜e^{\oplus}\in\mathcal{A} is the neutral element with respect to ⊕direct-sum\oplus, e⊗∈𝒜superscript𝑒tensor-product𝒜e^{\otimes}\in\mathcal{A} that of ⊗tensor-product\otimes, and for all a∈𝒜𝑎𝒜a\in\mathcal{A}, e⊕⊗a=a⊗e⊕=e⊕tensor-productsuperscript𝑒direct-sum𝑎tensor-product𝑎superscript𝑒direct-sumsuperscript𝑒direct-sume^{\oplus}\otimes a=a\otimes e^{\oplus}=e^{\oplus}.•a finite set of ground algebraic facts F={f1,…,fn}Fsubscript𝑓1…subscript𝑓𝑛\operatorname{F}=\{f_{1},\ldots,f_{n}\}•a finite set BKBK\operatorname{BK} of background knowledge clauses•a labeling function δ:L(F)→𝒜:𝛿→LF𝒜\delta:\operatorname{L}(\operatorname{F})\rightarrow\mathcal{A}Background knowledge clauses are definite clauses, but their bodies may contain negative literals for algebraic facts. Their heads may not unify with any algebraic fact.
|
| 16 |
+
|
| 17 |
+
For instance, in the following aProbLog programalarm :- burglary.0.05 :: burglary.
|
| 18 |
+
|
| 19 |
+
burglary is an algebraic fact with label 0.05, and alarm :- burglary represents a background knowledge clause, whose intuitive meaning is: in case of burglary, the alarm should go off.
|
| 20 |
+
|
| 21 |
+
The idea of splitting a logic program in a set of facts and a set of clauses goes back to Sato’s distribution semantics [Sato, 1995], where it is used to define a probability distribution over interpretations of the entire program in terms of a distribution over the facts.This is possible because a truth value assignment to the facts in FF\operatorname{F} uniquely determines the truth values of all other atoms defined in the background knowledge.In the simplest case, as realised in ProbLog [De Raedt et al., 2007, Fierens et al., 2015], this basic distribution considers facts to be independent random variables and thus multiplies their individual probabilities. aProbLog uses the same basic idea, but generalises from the semiring of probabilities to general commutative semirings.While the distribution semantics is defined for countably infinite sets of facts,the set of ground algebraic facts in aProbLog must be finite.
|
| 22 |
+
|
| 23 |
+
In aProbLog, the label ofa complete interpretation I∈ℐ(F)𝐼ℐFI\in\mathcal{I}(\operatorname{F}) is defined as the product of the labels of its literals𝐀(I)=⨂l∈Iδ(l)𝐀𝐼subscripttensor-product𝑙𝐼𝛿𝑙\operatorname{\mathbf{A}}(I)=\bigotimes_{l\in I}\delta(l)(3)and the label of a set of interpretations S⊆ℐ(F)𝑆ℐFS\subseteq\mathcal{I}(\operatorname{F}) as the sum of the interpretation labels𝐀(S)=⨁I∈S⨂l∈Iδ(l)𝐀𝑆subscriptdirect-sum𝐼𝑆subscripttensor-product𝑙𝐼𝛿𝑙\operatorname{\mathbf{A}}(S)=\bigoplus_{I\in S}\bigotimes_{l\in I}\delta(l)(4)A query q𝑞q is a finite set of algebraic literals and atoms from the Herbrand base,444I.e., the set of ground atoms that can be constructed from the predicate, functor and constant symbols of the program. q⊆L(F)∪HB(F∪BK)𝑞LF𝐻𝐵FBKq\subseteq\operatorname{L}(\operatorname{F})\cup HB(\operatorname{F}\cup\operatorname{BK}). We denote the set of interpretations where the query is true by ℐ(q)ℐ𝑞\mathcal{I}(q),ℐ(q)={I|I∈ℐ(F)∧I∪BK⊧q}ℐ𝑞conditional-set𝐼𝐼ℐF𝐼BKmodels𝑞\mathcal{I}(q)=\{I~{}|~{}I\in\mathcal{I}(\operatorname{F})\wedge I\cup\operatorname{BK}\models q\}(5)The label of query q𝑞q is defined as the label of ℐ(q)ℐ𝑞\mathcal{I}(q),𝐀(q)=𝐀(ℐ(q))=⨁I∈ℐ(q)⨂l∈Iδ(l).𝐀𝑞𝐀ℐ𝑞subscriptdirect-sum𝐼ℐ𝑞subscripttensor-product𝑙𝐼𝛿𝑙\operatorname{\mathbf{A}}(q)=\operatorname{\mathbf{A}}(\mathcal{I}(q))=\bigoplus_{I\in\mathcal{I}(q)}\bigotimes_{l\in I}\delta(l).(6)As both operators are commutative and associative, the label is independent of the order of both literals and interpretations.
|
| 24 |
+
|
| 25 |
+
In the context of this paper, we extend aProbLog to queries with evidence by introducing an additional division operator ⊘⊘\oslash that defines the conditional label of a query as follows:𝐀(q|𝑬=𝒆)=𝐀(ℐ(q∧𝑬=𝒆))⊘𝐀(ℐ(𝑬=𝒆))𝐀conditional𝑞𝑬𝒆⊘𝐀ℐ𝑞𝑬𝒆𝐀ℐ𝑬𝒆\displaystyle{\mathbf{A}(q|\bm{E}=\bm{e})}=\mathbf{A}(\mathcal{I}(q~{}\land~{}\bm{E}=\bm{e}))~{}\oslash~{}\mathbf{A}(\mathcal{I}(\bm{E}=\bm{e}))(7)
|
| 26 |
+
|
| 27 |
+
where 𝐀(ℐ(q∧𝑬=𝒆))⊘𝐀(ℐ(𝑬=𝒆))⊘𝐀ℐ𝑞𝑬𝒆𝐀ℐ𝑬𝒆\mathbf{A}(\mathcal{I}(q~{}\land~{}\bm{E}=\bm{e}))~{}\oslash~{}\mathbf{A}(\mathcal{I}(\bm{E}=\bm{e})) returns the label of q∧𝑬=𝒆𝑞𝑬𝒆q~{}\land~{}\bm{E}=\bm{e} given the label of 𝑬=𝒆𝑬𝒆\bm{E}=\bm{e}. We refer to a specific choice of semiring, labeling function and division operator as an aProbLog parametrisation.
|
| 28 |
+
|
| 29 |
+
ProbLog is an instance of aProbLog with the following parameterisation, which we denote 𝔖psubscript𝔖𝑝\mathfrak{S}_{p}:𝒜=ℝ≥0;a⊕b=a+b;a⊗b=a⋅b;e⊕=0;e⊗=1;δ(f)∈[0,1];δ(¬f)=1−δ(f);a⊘b=ab𝒜subscriptℝabsent0direct-sum𝑎𝑏𝑎𝑏tensor-product𝑎𝑏⋅𝑎𝑏superscript𝑒direct-sum0superscript𝑒tensor-product1𝛿𝑓01𝛿𝑓1𝛿𝑓⊘𝑎𝑏𝑎𝑏\begin{array}[]{l}\mathcal{A}=\mathbb{R}_{\geq 0};\\a~{}\oplus~{}b=a+b;\\a~{}\otimes~{}b=a\cdot b;\\e^{\oplus}=0;\\e^{\otimes}=1;\\\delta(f)\in[0,1];\\\delta(\lnot f)=1-\delta(f);\\a~{}\oslash~{}b=\frac{a}{b}\end{array}(8)
|
| 30 |
+
|
| 31 |
+
When probabilities are uncertain—for instance because of limited observations—such an uncertainty can be captured by a Beta distribution, namely a distribution of possible probabilities. Let us consider only binary variables such as X𝑋X that can take on the value of true or false, i.e., X=x𝑋𝑥X={x} or X=x¯𝑋¯𝑥X=\bar{{x}}. The value of X𝑋X does change over different instantiations, and there is an underlying ground truth value for the probability pxsubscript𝑝𝑥p_{x} that X𝑋X is true (px¯=1−pxsubscript𝑝¯𝑥1subscript𝑝𝑥p_{\bar{x}}=1-p_{x} that X𝑋X is false).If pxsubscript𝑝𝑥p_{x} is drawn from a Beta distribution, it has the following probability density function:f𝜷(px;𝜶)=1β(αx,αx¯)pxαx−1(1−px)αx¯−1subscript𝑓𝜷subscript𝑝𝑥𝜶1𝛽subscript𝛼𝑥subscript𝛼¯𝑥superscriptsubscript𝑝𝑥subscript𝛼𝑥1superscript1subscript𝑝𝑥subscript𝛼¯𝑥1f_{\bm{\beta}}(p_{x};\bm{\alpha})=\frac{1}{\beta(\alpha_{x},\alpha_{\bar{x}})}p_{x}^{\alpha_{x}-1}(1-p_{x})^{\alpha_{\bar{x}}-1}\;(9)for 0≤px≤10subscript𝑝𝑥10\leq p_{x}\leq 1, where β(⋅)𝛽⋅\beta(\cdot) is the beta function and the beta parameters are𝜶X=⟨αx,αx¯⟩subscript𝜶𝑋subscript𝛼𝑥subscript𝛼¯𝑥\bm{\alpha}_{X}=\langle\alpha_{x},\alpha_{\bar{x}}\rangle, such that αx>1,αx¯>1formulae-sequencesubscript𝛼𝑥1subscript𝛼¯𝑥1\alpha_{x}>1,\alpha_{\bar{x}}>1. Given a Beta-distributed random variable X𝑋X,sX=αx+αx¯subscript𝑠𝑋subscript𝛼𝑥subscript𝛼¯𝑥s_{X}=\alpha_{x}+\alpha_{\bar{x}}(10)is its Dirichlet strength andμX=αxsXsubscript𝜇𝑋subscript𝛼𝑥subscript𝑠𝑋\mu_{X}=\frac{\alpha_{x}}{s_{X}}(11)is its mean. From (10) and (11) the beta parameters can equivalently be written as:𝜶𝑿=⟨μXsX,(1−μX)sX⟩.subscript𝜶𝑿subscript𝜇𝑋subscript𝑠𝑋1subscript𝜇𝑋subscript𝑠𝑋\bm{\alpha_{X}}=\langle\mu_{X}s_{X},~{}(1-\mu_{X})s_{X}\rangle.(12)The variance of a Beta-distributed random variable X𝑋X isσX2=μX(1−μX)sX+1superscriptsubscript𝜎𝑋2subscript𝜇𝑋1subscript𝜇𝑋subscript𝑠𝑋1\sigma_{X}^{2}=\frac{\mu_{X}(1-\mu_{X})}{s_{X}+1}(13)and from (13) we can rewrite sXsubscript𝑠𝑋s_{X} (10) assX=μX(1−μX)σX2−1.subscript𝑠𝑋subscript𝜇𝑋1subscript𝜇𝑋subscriptsuperscript𝜎2𝑋1s_{X}=\frac{\mu_{X}(1-\mu_{X})}{\sigma^{2}_{X}}-1.(14)
|
| 32 |
+
|
| 33 |
+
Given a random variable Z𝑍Z with known mean μZsubscript𝜇𝑍\mu_{Z} and variance σZ2subscriptsuperscript𝜎2𝑍\sigma^{2}_{Z}, we can use the method of moments and (14) to estimate the 𝜶𝜶\bm{\alpha} parameters of a Beta-distributed variable Z′superscript𝑍′Z^{\prime} of mean μZ′=μZsubscript𝜇superscript𝑍′subscript𝜇𝑍\mu_{Z^{\prime}}=\mu_{Z} andsZ′=max{μZ(1−μZ)σZ2−1,WaZμZ,W(1−aZ)(1−μZ)}.subscript𝑠superscript𝑍′subscript𝜇𝑍1subscript𝜇𝑍subscriptsuperscript𝜎2𝑍1𝑊subscript𝑎𝑍subscript𝜇𝑍𝑊1subscript𝑎𝑍1subscript𝜇𝑍s_{Z^{\prime}}=\max\left\{\frac{\mu_{Z}(1-\mu_{Z})}{\sigma^{2}_{Z}}-1,\frac{Wa_{Z}}{\mu_{Z}},\frac{W(1-a_{Z})}{(1-\mu_{Z})}\right\}.(15)(15) is needed to ensure that the resulting Beta-distributed random variable Z′superscript𝑍′Z^{\prime} does not lead to a 𝜶Z′≤⟨1,1⟩subscript𝜶superscript𝑍′11\bm{\alpha}_{Z^{\prime}}\leq\langle 1,1\rangle.
|
| 34 |
+
|
| 35 |
+
The value of X𝑋X can be observed from Ninssubscript𝑁𝑖𝑛𝑠N_{ins} independent observations of X𝑋X. If over these observations, nxsubscript𝑛𝑥n_{x} times X=x𝑋𝑥X={x}, nx¯=Nins−nxsubscript𝑛¯𝑥subscript𝑁𝑖𝑛𝑠subscript𝑛𝑥n_{\bar{x}}=N_{ins}-n_{x} times X=x¯𝑋¯𝑥X=\bar{{x}}, then 𝜶X=⟨nx+WaX,nx¯+W(1−aX)⟩subscript𝜶𝑋subscript𝑛𝑥𝑊subscript𝑎𝑋subscript𝑛¯𝑥𝑊1subscript𝑎𝑋\bm{\alpha}_{X}=\langle n_{x}+Wa_{X},n_{\bar{x}}+W(1-a_{X})\rangle: aXsubscript𝑎𝑋a_{X} is the prior assumption, i.e. the probability that X𝑋X is true in the absence of observations;and W>0𝑊0W>0 is a prior weight indicating the strength of the prior assumption. Unless specified otherwise, in the following we will assume ∀X,aX=0.5for-all𝑋subscript𝑎𝑋0.5\forall X,a_{X}=0.5 and W=2𝑊2W=2, so to have an uninformative, uniformly distributed, prior.
|
| 36 |
+
|
| 37 |
+
Subjective logic [Jøsang, 2016] provides (1) an alternative, more intuitive, way of representing the parameters of a Beta-distributed random variables, and (2) a set of operators for manipulating them. A subjective opinion about a proposition X𝑋X is a tuple ωX=⟨bX,dX,uX,aX⟩subscript𝜔𝑋subscript𝑏𝑋subscript𝑑𝑋subscript𝑢𝑋subscript𝑎𝑋\omega_{X}=\langle b_{X},d_{X},u_{X},a_{X}\rangle, representing the belief,disbelief and uncertainty that X𝑋X is true at a given instance, and, as above, aXsubscript𝑎𝑋a_{X} is the prior probability that X𝑋X is true in the absence of observations. These values are non-negative and bX+dX+uX=1subscript𝑏𝑋subscript𝑑𝑋subscript𝑢𝑋1b_{X}+d_{X}+u_{X}=1. Theprojected probability P(x)=bX+uX⋅aX𝑃𝑥subscript𝑏𝑋⋅subscript𝑢𝑋subscript𝑎𝑋P(x)=b_{X}+u_{X}\cdot a_{X}, provides an estimate of the ground truth probability pxsubscript𝑝𝑥p_{x}.
|
| 38 |
+
|
| 39 |
+
The mapping from a Beta-distributed random variable X𝑋X with parameters 𝜶X=⟨αx,αx¯⟩subscript𝜶𝑋subscript𝛼𝑥subscript𝛼¯𝑥\bm{\alpha}_{X}=\langle\alpha_{x},\alpha_{\bar{x}}\rangle to a subjective opinion is:ωX=⟨αx−WaXsX,αx¯−W(1−aX)sX,WsX,aX⟩subscript𝜔𝑋subscript𝛼𝑥𝑊subscript𝑎𝑋subscript𝑠𝑋subscript𝛼¯𝑥𝑊1subscript𝑎𝑋subscript𝑠𝑋𝑊subscript𝑠𝑋subscript𝑎𝑋\omega_{X}=\left\langle\frac{\alpha_{x}-Wa_{X}}{s_{X}},\frac{\alpha_{\bar{x}}-W(1-a_{X})}{s_{X}},\frac{W}{s_{X}},a_{X}\right\rangle(16)With this transformation, the mean of X𝑋X is equivalent to the projected probability P(x)𝑃𝑥P(x), and the Dirichlet strength is inversely proportional to the uncertainty of the opinion:μX=P(x)=bX+uXaX,sX=WuXformulae-sequencesubscript𝜇𝑋𝑃𝑥subscript𝑏𝑋subscript𝑢𝑋subscript𝑎𝑋subscript𝑠𝑋𝑊subscript𝑢𝑋\mu_{X}=P(x)=b_{X}+u_{X}a_{X},\quad s_{X}=\frac{W}{u_{X}}(17)
|
| 40 |
+
|
| 41 |
+
Conversely, a subjective opinion ωXsubscript𝜔𝑋\omega_{X} translates directly into a Beta-distributed random variable with:𝜶X=⟨WuXbX+WaX,WuXdX+W(1−aX)⟩subscript𝜶𝑋𝑊subscript𝑢𝑋subscript𝑏𝑋𝑊subscript𝑎𝑋𝑊subscript𝑢𝑋subscript𝑑𝑋𝑊1subscript𝑎𝑋\bm{\alpha}_{X}=\left\langle\frac{W}{u_{X}}b_{X}+Wa_{X},\frac{W}{u_{X}}d_{X}+W(1-a_{X})\right\rangle(18)
|
| 42 |
+
|
| 43 |
+
Subjective logic is a framework that includes various operators to indirectly determine opinions from various logical operations. In particular, we will make use of ⊞SLsubscript⊞𝑆𝐿\boxplus_{SL}, ⊠SLsubscript⊠𝑆𝐿\boxtimes_{SL}, and ⧅SLsubscript⧅𝑆𝐿\boxslash_{SL}, resp. summing, multiplying, and dividing two subjective opinions as they are defined in [Jøsang, 2016] (Appendix A).Those operators aim at faithfully matching the projected probabilities: for instance the multiplication of two subjective opinions ωX⊠SLωYsubscript⊠𝑆𝐿subscript𝜔𝑋subscript𝜔𝑌\omega_{X}\boxtimes_{SL}\omega_{Y} results in an opinion ωZsubscript𝜔𝑍\omega_{Z} such that P(z)=P(x)⋅P(z)𝑃𝑧⋅𝑃𝑥𝑃𝑧P(z)=P(x)\cdot P(z).
|
| 44 |
+
|
| 45 |
+
The straightforward approach to derive a aProbLog parametrisation for operations in subjective logic is to use the operators ⊞⊞\boxplus, ⊠⊠\boxtimes, and ⧅⧅\boxslash.
|
| 46 |
+
|
| 47 |
+
Note that ⟨𝒜SL,⊕SL,⊗SL,e⊕SL,e⊗SL⟩subscript𝒜SLsubscriptdirect-sumSLsubscripttensor-productSLsuperscript𝑒subscriptdirect-sumSLsuperscript𝑒subscripttensor-productSL\langle\mathcal{A_{\mbox{SL}}},\oplus_{\mbox{SL}},\otimes_{\mbox{SL}},e^{\oplus_{\mbox{SL}}},e^{\otimes_{\mbox{SL}}}\rangle does not form a commutative semiring in general. If we consider only the projected probabilities—i.e. the means of the associated Beta distributions—then ⊞⊞\boxplus and ⊠⊠\boxtimes are indeed commutative, associative, and ⊠⊠\boxtimes distributes over ⊞⊞\boxplus. However, the uncertainty of the resulting opinion depends on the order of operands.
|
| 48 |
+
|
| 49 |
+
While SL operators try to faithfully characterise the projected probabilities, they employ an uncertainty maximisation principle to limit the belief commitments, hence they have a looser connection to the Beta distribution. The operators we derive in this section aim at maintaining such a connection.
|
| 50 |
+
|
| 51 |
+
Let us first define a sum operator between two independent Beta-distributed random variables X𝑋X and Y𝑌Y as the Beta-distributed random variable Z𝑍Z such that μZ=μX+Ysubscript𝜇𝑍subscript𝜇𝑋𝑌\mu_{Z}=\mu_{X+Y} and σZ2=σX+Y2subscriptsuperscript𝜎2𝑍subscriptsuperscript𝜎2𝑋𝑌\sigma^{2}_{Z}=\sigma^{2}_{X+Y}. The sum (and in the following the product as well) of two Beta random variables is not necessarily a Beta random variable. Our approach, consistent with [Kaplan and Ivanovska, 2018], approximates the resulting distribution as a Beta distribution via moment matching on mean and variance: this guarantees to approximate the result as a Beta distribution.
|
| 52 |
+
|
| 53 |
+
ωZ=ωX⊞βωYsubscript𝜔𝑍superscript⊞𝛽subscript𝜔𝑋subscript𝜔𝑌\omega_{Z}=\omega_{X}\boxplus^{\beta}\omega_{Y} can then be obtained as discussed in Section 2.2, taking (15) into consideration. The same applies for the following operators as well.
|
| 54 |
+
|
| 55 |
+
Let us now define the product operator between two independent Beta-distributed random variables X𝑋X and Y𝑌Y as the Beta-distributed random variable Z𝑍Z such that μZ=μXYsubscript𝜇𝑍subscript𝜇𝑋𝑌\mu_{Z}=\mu_{XY} and σZ2=σXY2subscriptsuperscript𝜎2𝑍subscriptsuperscript𝜎2𝑋𝑌\sigma^{2}_{Z}=\sigma^{2}_{XY}.
|
| 56 |
+
|
| 57 |
+
Finally, let us define the conditioning-division operator between two independent Beta-distributed random variables X𝑋X and Y𝑌Y, represented by subjective opinions ωXsubscript𝜔𝑋\omega_{X} and ωYsubscript𝜔𝑌\omega_{Y}, as the Beta-distributed random variable Z𝑍Z such that μZ=μXYsubscript𝜇𝑍subscript𝜇𝑋𝑌\mu_{Z}=\mu_{\frac{X}{Y}} and σZ2=σXY2subscriptsuperscript𝜎2𝑍subscriptsuperscript𝜎2𝑋𝑌\sigma^{2}_{Z}=\sigma^{2}_{\frac{X}{Y}}.
|
| 58 |
+
|
| 59 |
+
We can now define a new aProbLog parametrisation similar to Definition 1 operating with our newly defined operators ⊞βsuperscript⊞𝛽\boxplus^{\beta}, ⊠βsuperscript⊠𝛽\boxtimes^{\beta}, and ⧅βsuperscript⧅𝛽\boxslash^{\beta}.
|
| 60 |
+
|
| 61 |
+
As per Definition 1, also ⟨𝒜β,⊕β,⊗β,e⊕β,e⊗β⟩superscript𝒜𝛽superscriptdirect-sum𝛽superscripttensor-product𝛽superscript𝑒superscriptdirect-sum𝛽superscript𝑒superscripttensor-product𝛽\langle\mathcal{A^{\beta}},\oplus^{\beta},\otimes^{\beta},e^{\oplus^{\beta}},e^{\otimes^{\beta}}\rangle is not in general a commutative semiring. Means are correctly matched to projected probabilities, therefore for them 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} actually operates as a semiring. However, for what concerns variance, the product is not distributive over addition: σX(Y+Z)2=σX2(μY+μZ)2+(σY2+σZ2)μX2+σX2(σY2+σZ2)≠σX2(μY2+μZ2)+(σY2+σZ2)μX2+σX2(σY2+σZ2)=σ(XY)+(XZ)2subscriptsuperscript𝜎2𝑋𝑌𝑍subscriptsuperscript𝜎2𝑋superscriptsubscript𝜇𝑌subscript𝜇𝑍2subscriptsuperscript𝜎2𝑌subscriptsuperscript𝜎2𝑍superscriptsubscript𝜇𝑋2subscriptsuperscript𝜎2𝑋subscriptsuperscript𝜎2𝑌subscriptsuperscript𝜎2𝑍subscriptsuperscript𝜎2𝑋superscriptsubscript𝜇𝑌2superscriptsubscript𝜇𝑍2subscriptsuperscript𝜎2𝑌subscriptsuperscript𝜎2𝑍superscriptsubscript𝜇𝑋2subscriptsuperscript𝜎2𝑋subscriptsuperscript𝜎2𝑌subscriptsuperscript𝜎2𝑍subscriptsuperscript𝜎2𝑋𝑌𝑋𝑍\sigma^{2}_{X(Y+Z)}=\sigma^{2}_{X}(\mu_{Y}+\mu_{Z})^{2}+(\sigma^{2}_{Y}+\sigma^{2}_{Z})\mu_{X}^{2}+\sigma^{2}_{X}(\sigma^{2}_{Y}+\sigma^{2}_{Z})\neq\sigma^{2}_{X}(\mu_{Y}^{2}+\mu_{Z}^{2})+(\sigma^{2}_{Y}+\sigma^{2}_{Z})\mu_{X}^{2}+\sigma^{2}_{X}(\sigma^{2}_{Y}+\sigma^{2}_{Z})=\sigma^{2}_{(XY)+(XZ)}. The approximation error we introduce is thereforee(X,Y,Z)≤2μYμZσX2σX2(μY2+μZ2)+(μX2+σX2)(σY2+σZ2)𝑒𝑋𝑌𝑍2subscript𝜇𝑌subscript𝜇𝑍subscriptsuperscript𝜎2𝑋subscriptsuperscript𝜎2𝑋superscriptsubscript𝜇𝑌2superscriptsubscript𝜇𝑍2superscriptsubscript𝜇𝑋2subscriptsuperscript𝜎2𝑋subscriptsuperscript𝜎2𝑌subscriptsuperscript𝜎2𝑍\begin{split}e(X,Y,Z)&\leq\\&\frac{2\mu_{Y}\mu_{Z}\sigma^{2}_{X}}{\sigma^{2}_{X}(\mu_{Y}^{2}+\mu_{Z}^{2})+(\mu_{X}^{2}+\sigma^{2}_{X})(\sigma^{2}_{Y}+\sigma^{2}_{Z})}\end{split}(23)and it minimally affects the results both in the case of low and in the case of high uncertainty in the random variables.
|
| 62 |
+
|
| 63 |
+
To evaluate the suitability of using 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} in aProbLog for uncertain probabilistic reasoning, we run an experimental analysis involving several aProbLog programs with unspecified labelling function. For each program, first labels are derived for 𝔖psubscript𝔖𝑝\mathfrak{S}_{p} by selecting the ground truth probabilities from a uniform random distribution. Then, for each label of the aProbLog program over 𝔖psubscript𝔖𝑝\mathfrak{S}_{p}, we derive a subjective opinion by observing Ninssubscript𝑁𝑖𝑛𝑠N_{ins} instantiations of the random variables comprising the aProbLog program over 𝔖psubscript𝔖𝑝\mathfrak{S}_{p} so to simulate data sparsity [Kaplan and Ivanovska, 2018].We then proceed analysing the inference on specific query nodes 𝒒𝒒\bm{q} in the presence of a set of evidence 𝑬=𝒆𝑬𝒆\bm{E}=\bm{e} using aProbLog with 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} and 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} over the subjective opinion labels, and compare the RMSE to the actual ground truth of using aProbLog with 𝔖psubscript𝔖𝑝\mathfrak{S}_{p}. This process of inference to determine the marginal Beta distributions is repeated 1000 times by considering 100 random choices for each label of the aProbLog with 𝔖psubscript𝔖𝑝\mathfrak{S}_{p}, i.e. the ground truth, and for each ground truth 10 repetitions of sampling the interpretationsused to derive the subjective opinion labels used in 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} and 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} observing Ninssubscript𝑁𝑖𝑛𝑠N_{ins} instantiations of all the variables.
|
| 64 |
+
|
| 65 |
+
Following [Kaplan and Ivanovska, 2018], we judge the quality of the Beta distributions of the queries on how well its expression of uncertainty captures the spread between its projected probability and the actual ground truth probability. In simulations where the ground truths are known, such as ours, confidence bounds can be formed around the projected probabilities at a significance level of γ𝛾\gamma and determine the fraction of cases when the ground truth falls within the bounds. If the uncertainty is well determined by the Beta distributions, then this fraction should correspond to the strength γ𝛾\gamma of the confidence interval [Kaplan and Ivanovska, 2018, Appendix C].
|
| 66 |
+
|
| 67 |
+
We first considered the famous Friends & Smokers problem666https://dtai.cs.kuleuven.be/problog/tutorial/basic/05_smokers.html with fixed queries and set of evidence, to illustrate the behaviour between 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} and 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta}.Table 1 provides the root mean square error (RMSE) between the projected probabilities and the ground truth probabilities for all the inferred query variables for Ninssubscript𝑁𝑖𝑛𝑠N_{ins} = 10, 50, 100. The table also includes the predicted RMSE by taking the square root of the average—over the number of runs—variances from the inferred marginal Beta distributions, cf. Eq. (13). Figure 1 plots the desired and actual significance levels for the confidence intervals (best closest to the diagonal), i.e. the fractions of times the ground truth falls within confidence bounds set to capture x% of the data.
|
| 68 |
+
|
| 69 |
+
The aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} exhibits the lowest RMSE, and is a little conservative in estimating its own RMSE, while aProbLog with 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} is overconfident. This reflects in Figure 1, with the results of aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} being over the diagonal, and those of aProbLog with 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} being below it.
|
| 70 |
+
|
| 71 |
+
We compared our approach against the state-of-the-art approaches for reasoning with uncertain probabilites—Subjective Bayesian Network [Ivanovska et al., 2015, Kaplan and Ivanovska, 2016, Kaplan and Ivanovska, 2018], Credal Network [Zaffalon and Fagiuoli, 1998], and Belief Network [Smets, 1993]—in the case that is handled by all of them, namely single connected Bayesian networks. We considered three networks proposed in [Kaplan and Ivanovska, 2018]that are depicted in Figure 2: from each network, we straightforwardly derived a aProbLog program.
|
| 72 |
+
|
| 73 |
+
As before,Table 2 provides the root mean square error (RMSE) between the projected probabilities and the ground truth probabilities for all the inferred query variables for Ninssubscript𝑁𝑖𝑛𝑠N_{ins} = 10, 50, 100, together with the RMSE predicted by taking the square root of the average variances from the inferred marginal Beta distributions. Figure 3 plots the desired and actual significance levels for the confidence intervals (best closest to the diagonal).
|
| 74 |
+
|
| 75 |
+
Table 2 shows that aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} shares the best performance with the state-of-the-art Subjective Bayesian Networks—in terms of actual RMSE—for Net1, and in two out of three cases of Net2 (all of them from a practical standpoint). This is clearly a significant achievement considering that Subjective Bayesian network is the state-of-the-art approach when dealing only with single connected Bayesian Networks with uncertain probabilities, while aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} can also handle much more complex problems. Net3 results are slightly worse due to approximations induced in the floating point operations used in the implementation: the more the connections of a node in the Bayesian network (e.g. node E in Figure 2(c)), the higher the number of operations involved in (7). A more accurate code engineering can address it.Consistently with Table 1, aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} has lower RMSE than with 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} and it underestimates its predicted RMSE, while aProbLog with 𝔖SLsubscript𝔖SL\mathfrak{S}_{\mbox{SL}} overestimates it.
|
| 76 |
+
|
| 77 |
+
From visual inspection of Figure 3, it is evident that aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} performs best in presence of high uncertainty (Nins=10subscript𝑁𝑖𝑛𝑠10N_{ins}=10).In presence of lower uncertainty, instead, it underestimates its own prediction up to a desired confidence between 0.6 and 0.8, and overestimate it after. This is due to the fact that aProbLog computes the conditional distributions at the very end of the process and 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} relies, in (21), on the assumption that X𝑋X and Y𝑌Y are uncorrelated. However, since the correlation between X𝑋X and Y𝑌Y is inversely proportional to σX2σY2subscriptsuperscript𝜎2𝑋subscriptsuperscript𝜎2𝑌\sqrt{\sigma^{2}_{X}\sigma^{2}_{Y}}, the lower the uncertainty, the less accurate our approximation.
|
| 78 |
+
|
| 79 |
+
We enabled the aProbLog approach to probabilistic logic programming to reason in presence of uncertain probabilities represented as Beta-distributed random variables. Other extensions to logic programming can handle uncertain probabilities by considering intervals of possible probabilities [Ng and Subrahmanian, 1992], similarly to the Credal network approach we compared against in Section 4; or bysampling random distributions, including ProbLog itself and cplint [Alberti et al., 2017] among others. Our approach does not require sampling or Monte Carlo computation, thus being significantly more efficient.
|
| 80 |
+
|
| 81 |
+
Our experimental section shows that the proposed operators outperform the standard subjective logic operators and they are as good as the state-of-the-art approaches for uncertain probabilities in Bayesian networks while being able to handle much more complex problems.Moreover, in presence of high uncertainty, which is our main research focus, the approximations we introduce in this paper are minimal, as Figures 3(a), 3(d), and 3(g) show, with the results of aProbLog with 𝔖βsuperscript𝔖𝛽\mathfrak{S}^{\beta} being very close to the diagonal.
|
| 82 |
+
|
| 83 |
+
As part of future work we will (1) provide a different characterisation of the variance in (21) taking into consideration the correlation between X𝑋X and Y𝑌Y; (2) test the boundaries of our approximations to provide practitioners with pragmatic assessments and assurances; and (3) introduce an expectation-maximisation (EM) algorithm for learning labels representing Beta-distributed random variables with partial interpretations and compare it against the LFI algorithm [Gutmann et al., 2011] for ProbLog.
|
1809.07889v4.txt
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
In theoretical linguistics, a formal distinction is made between arguments and adjuncts of a verb. For example, in the following example, the window is an argument of the verb open, whereas this morning and with Mary are adjuncts.
|
| 2 |
+
|
| 3 |
+
John opened [the window] [this morning] [with Mary].
|
| 4 |
+
|
| 5 |
+
What distinguishes arguments (or complements) from adjuncts (or modifiers)111Various combinations of the terminology are found in the literature, with subtle domain-specific preferences. We use arguments and adjuncts, with a rough definition of arguments as elements specifically selected or subcategorized by the verb. We use the umbrella term (verbal) dependents to refer to both., and why is this distinction important? Theoretically, the distinct representations given to arguments and adjuncts manifest in different formal behaviors (?; ?). There is also a range of psycholinguistic evidence which supports the psychological reality of the distinction (?). In natural language processing (NLP), argumenthood information is useful in various applied tasks such as automatic parsing (?) and PP attachment disambiguation (?). In particular, automatic distinction of argumenthood could prove useful in improving structure-aware semantic role labeling, which has been shown to outperform structure-agnostic models in recent works (?). However, argument-adjunct distinction is one of the most difficult linguistic properties to annotate, and has remained unmarked in popular resources including the Penn TreeBank. PropBank (?) addresses this issue to an extent by providing arg-n labels, but does not provide full coverage (?). Thus, there are theoretical and practical motivations to a systematic approach for predicting argumenthood.
|
| 6 |
+
|
| 7 |
+
We focus on PPs in this paper, which are known to be one of the most challenging verbal dependents to classify correctly (?). The paper is structured as follows. First, we discuss the theoretical and practical motivations for PP argumenthood prediction in more detail and review related works. Second, we formulate two different argumenthood tasks—binary and gradient—and describe how each dataset is constructed. Results for each task using various word embeddings and linguistic features as predictors are reported. Finally, we investigate whether better PP argumenthood prediction is indeed useful for NLP. Through a controlled evaluation setup, we demonstrate that pretraining sentence encoders on our proposed tasks improves the quality of learned representations.
|
| 8 |
+
|
| 9 |
+
Although arguments and adjuncts are theoretically and practically important concepts, distinguishing arguments from adjuncts in practice is not a trivial problem even for linguists (?). Numerous diagnostic tests have been proposed in the literature; for instance, omissibility and iterability tests are commonly used (?). However, none of the existing diagnostic tests (or a set of tests) provide necessary or sufficient criteria to determine the status of a verbal dependent. Moreover, it has long been noted that argumenthood is a gradient phenomenon rather than a strict dichotomy (e.g., some arguments are less argument-like than others, resulting in different syntactic and semantic behaviors (?)). This raises many interesting theoretical questions such as what kinds of lexical and contextual information affect these judgments, and whether the judgments would be predictable in a principled way given that information. By building prediction models for gradient judgments using lexical features, we hope to gain insights about what factors explain gradience and to what degree they do so.
|
| 10 |
+
|
| 11 |
+
Automatic parsing will likely benefit from argumenthood information. For instance, the issue of PP attachment negatively affects the accuracy of a competitive dependency parser (?). It has been shown that reducing PP attachment errors leads to higher parsing accuracy (?; ?), and also that argument-adjunct distinction is useful for PP attachment disambiguation (?).
|
| 12 |
+
|
| 13 |
+
Argument-adjunct distinction is also closely connected to Semantic Role Labeling (SRL). ? (?) report that even state-of-the-art deep models for SRL still suffer from argument-adjunct distinction errors as well as PP attachment errors. They also observe that errors in widely-used automatic parsers pose challenges to improving performance in syntax-aware neural models (?). This suggests that improving parsers with better argumenthood distinction would lead to better SRL performance.
|
| 14 |
+
|
| 15 |
+
? (?) discuss the issue of core-noncore distinction being confounded with argument-adjunct distinction in the annotation protocol of Universal Dependencies (UD), which leads to internal inconsistencies. They point out the flaws of the argument-adjunct distinction and suggest a solution that disentangles it better from the core-noncore distinction that UD advocates. This does improve within-UD consistency, but argument-adjunct status is still explicitly encoded in many formal grammars including Combinatory Categorial Grammar (CCG) (?). Thus, being able to predict argumenthood would still be important in improving the quality of resources being ported between different grammars, such as CCGBank.
|
| 16 |
+
|
| 17 |
+
Our tasks share a similar objective with ? (?), which is to distinguish PP arguments from adjuncts by an informed selection of linguistic features. However, we do not use logical forms or explicit formal grammar in our models, although the use of distributional word representations may capture some syntactic information. The scale and data collection procedure of our binary classification task (Experiment 1) are more comparable to those of ? (?) or ? (?), where the authors construct a PP attachment database from Penn TreeBank data. Our binary classfication dataset is similar in scale, but is based on VerbNet (?) frames. Experiment 2, which is a smaller-scale experiment on predicting gradient argumenthood judgment data from humans, is a novel task to the extent of our knowledge. The crowdsourcing protocol for collecting human judgments is inspired by ? (?).
|
| 18 |
+
|
| 19 |
+
Our evaluation setup to measure downstream task performance gains from PP argumenthood information (Section 5) is inspired by a recent line of efforts on probing for evaluating linguistic representations encoded by neural networks (?; ?). In order to investigate whether PP argument-adjunct distinction tasks have a practical application, we attempt to improve performances on existing tasks such as SRL with an ultimate goal of making sentence representations better and more generalizable (as opposed to representations optimized for one specific task). We use the setup of pretraining a sentence encoder with a linguistic task of interest, fixing the encoder weights and then training a classifier for tasks other than the pretraining task, using the representations from the frozen encoder (?). This enables us to compare the utility of information from different pretraining tasks (e.g., PP argument-adjunct distinction) on another task (e.g., SRL) or even multiple external tasks.
|
| 20 |
+
|
| 21 |
+
We use VerbNet subcategorization frames to define the argument-adjunct status of a verb-PP combination. This means if a certain PP is listed as a subcategorization frame under a certain verb entry, the PP is considered to be an argument of the verb. If it is not listed as a subcategorization frame, it is considered an adjunct of the verb. This way of defining argumenthood has been proposed and studied by ? (?). Their evaluation suggests that even though VerbNet is not an exhaustive list of subcategorization frames and not all frames listed are strictly arguments, VerbNet membership is a reasonable proxy of PP argumenthood. We chose VerbNet over PropBank arg-n and am labels, which are also a viable proxy for argumenthood (?), since VerbNet’s design goal of exhaustively listing frames for each verb better matches our task that requires broad type-level coverage of V-PP constructions.
|
| 22 |
+
|
| 23 |
+
2714 unique verbs (V) and 60 unique prepositions (P) are used to generate all possible combinations of {V, P}. These are all unique verb entries that pertain to a single set of VerbNet class and all prepositions that appear in VerbNet PP frames excluding multi-word prepositions (e.g., all over, on top of). Some frames are only defined by features such as {+spatial}, without specifying which specific prepositions these features correspond to (see Figure 1). For such featurally-marked frames, a manual mapping was made to preposition sets constructed approximately based on PrepWiki sense annotations (?). As a result, we have 2714∗60 = 162,480271460 = 1624802714*60\textnormal{ = }162,480 different {V, P} tuples that either correspond to (↦maps-to\mapstoarg) or do not correspond to (↦maps-to\mapstoadj) a subcategorization frame.
|
| 24 |
+
|
| 25 |
+
Since each verb subcategorizes only a handful of prepositions out of the possible 60, the distribution of labels arg and adj is heavily skewed towards adj. The ratio of arg:adj labels in the whole dataset is approximately 1:10. For this reason, we use randomized subsampling of the negative cases to construct a balanced dataset. Since there were 13,5441354413,544 datapoints with label 1 in the whole set, the same number of label 0 datapoints were randomly subsampled. This balanced dataset (n=27,088𝑛27088n=27,088) is randomly split into 70:15:15 train:dev:test sets.
|
| 26 |
+
|
| 27 |
+
The task is to predict whether a given {V, P} pair is an argument or an adjunct construction (i.e., whether it is an existing VerbNet subcategorization frame or not). Performance is measured by classification accuracy and F1subscript𝐹1F_{1} on the test set.
|
| 28 |
+
|
| 29 |
+
The meaning of the complement noun phrase (NP) of the preposition can also be a clue to determining argumenthood. We did not include the NP as a part of the input in our main task dataset because the argumenthood labels we are using are type-level and not labels for individual instantiation of the types (token-level). However,the NP meanings, especially thematic roles, do play crucial roles in argumenthood. To address this concern, we propose variants of the main task that give prediction models access to information from the NP by providing full sentence inputs. We report additional results on one of the full-sentence variants (ternary classification) using two of the best-performing model setups for the main task (Table 2).
|
| 30 |
+
|
| 31 |
+
The full-sentence variants of the main task dataset are constructed by performing a heuristic search through the Stanford Natural Language Inference (SNLI; (?)) and Multi-genre Natural Language Inference (MNLI; (?)) datasets using the syntactic parse trees provided, to find sentences that contain a particular {V, P} construction. Note that the full sentence data is noisier compared to the main dataset (1) because the trees are parser outputs and (2) the original type-level gold labels given to the {V, P} were unchanged regardless of what the NP may be. Duplicate entries for the same {V, P} were permitted as long as the sentences themselves were different. In the first task variant, for case where no examples of the input pair is found in the dataset, we retained the original label. In the second variant, we assign a new unobserved label to such cases. This helps filter out overgenerated adjunct labels in the original dataset, where the {V, P} is not listed as a frame because it is an impossible or an infelicitous construction. It also eliminates the need for subsampling, since the three labels were reasonably balanced.
|
| 32 |
+
|
| 33 |
+
We chose NLI datasets as the source of full sentence inputs over other parsed corpora such as the Penn TreeBank for the following two reasons. First, we wanted to avoid using the the same source text as several downstream tasks we test in Section 5 (e.g., CoNLL-2005 SRL (?) uses sections of the Penn TreeBank), in order to separate out the benefits of seeing the source text at train time from the benefits of structural knowledge gained from learning to distinguish PP arguments and adjuncts. Second, we wanted both simple, short sentences (SNLI) and complex, naturally-occuring sentences (MNLI) from datasets of a consistent structure.
|
| 34 |
+
|
| 35 |
+
We report results using 4 different types of word embeddings (word2vec (?), GloVe (?), fastText (?), ELMo (?)) to represent the input tuples. Publicly available pretrained embeddings provided by the respective authors222code.google.com/archive/p/word2vec/nlp.stanford.edu/projects/glove/github.com/facebookresearch/fastTextgithub.com/allenai/allennlp are used.
|
| 36 |
+
|
| 37 |
+
Our current best model uses a combination of bidirectional LSTM (BiLSTM) and multi-layer perceptron (MLP) for the binary classification task. We first obtain a representation of the given {V, P} sequence using an encoder and then train an MLP classifier (Eq. 1) on top to perform the actual classification. The BiLSTM encoder is implemented using the AllenNLP toolkit (?), and the MLP classifier is a simple feedforward neural network with a single hidden layer that consists of 512512512 units (Eq. 1). We also test models that use the same MLP classifier with concatenated input vectors (Concatenation + MLP) or bag-of-words encodings of the input (BoW + MLP).
|
| 38 |
+
|
| 39 |
+
l=argmax(σ(Wo[tanh(Wh[Vvp]+bh)]+bo))largmax𝜎subscriptWodelimited-[]subscriptWhdelimited-[]subscriptVvpsubscriptbhsubscriptbomissing-subexpression\begin{array}[]{ll}l=argmax(\sigma(W_{o}[\tanh(W_{h}[V_{vp}]+b_{h})]+b_{o}))\end{array}(1)
|
| 40 |
+
|
| 41 |
+
Vvpsubscript𝑉𝑣𝑝V_{vp} is a linear projection (d=512𝑑512d=512) of the output of an encoder (encoder states followed by max-pooling or a concatenated word vector), and σ𝜎\sigma is the softmax activation function. The output of Eq. 1 is the label (1 or 0) that is more likely given Vvpsubscript𝑉𝑣𝑝V_{vp}. The models are trained using Adadelta (?) with cross-entropy loss and batch size =32absent32=32. Several other off-the-shelf implementations from the Python library scikit-learn were also tested in place of MLP, but since MLP consistently outperformed other classifiers, we only list models that use MLP classifiers out of the models we tested (Table 1).
|
| 42 |
+
|
| 43 |
+
Table 1 compares the performance of the tested models. The most trivial baseline is chance-level classification, which would yield 50% accuracy and F1subscript𝐹1F_{1}. Since the labels in the dataset are perfectly balanced by randomized subsampling, majority class classification is equivalent to chance-level classification. All nontrivial models outperform chance, and out of all models tested ELMo yielded the best performance. Using concatenated inputs that preserve the linear order of the inputs increases both accuracy and F1subscript𝐹1F_{1} by around 1.5%p over bag-of-words, and using a BiLSTM to encode the V+P representation adds 1.5%p improvement across the board.
|
| 44 |
+
|
| 45 |
+
We additionally report results on the full-sentence, ternary-classification variant of the task (description in Section 3.1) from the best model on the main task. The results are given in Table 2. We did not test the concatenation model since the dimensionality of the vectors would be too large with full sentence inputs. All tested models perform over chance, with ELMo achieving the best performance once again. We observe a similar gain of around 3%p by replacing BoW with BiLSTM as in the main task.
|
| 46 |
+
|
| 47 |
+
As discussed in Section 2, there is much work in theoretical linguistics literature that suggests argument-adjuncthood is a continuum rather than a dichotomy. We propose a gradient argumenthood prediction task and test regression models that use a combination of embeddings and lexical features. Since there is no publicly available gradient argumenthood data, we collected our own dataset via crowdsourcing333See Supplemental Material for examples of questions given to participants. Detailed protocol and theoretical analysis of the data are omitted; it will be discussed in a separate theoretically-oriented paper in preparation.. Due to the resource-consuming nature of human judgment collection, the size of the dataset is limited (n=305𝑛305n=305, 25-way redundant). This task serves as a small-scale, proof-of-concept test for whether a reasonable prediction of gradient argumenthood judgments is possible with informed selection of lexical features (and if so, how well different models perform and what features are informative).
|
| 48 |
+
|
| 49 |
+
The gradient argumenthood judgment dataset consists of 305 sentences that contain a single main verb and a PP dependent of that verb. All sentences are adaptations from example sentences in VerbNet PP subcategorization frames or sentences containing arg-n PPs in PropBank. To capture a full range of the argumenthood spectrum from fully argument-like to fully adjunct-like, we manually augmented the dataset by adding more strongly adjunct-like examples. These examples are generated by substituting the PP of the original sentence with a felicitous adjunct. This step is necessary since PPs listed as a subcategorization frame or arg-n are more argument-like, as discussed in Section 3.1.
|
| 50 |
+
|
| 51 |
+
25 participants were recruited to produce argumenthood judgments about these sentences on a 7-point Likert scale, using protocols adapted from a prior work for collecting similar judgments (?). Larger numbers are given an interpretation of being more argument-like and smaller numbers, more adjunct-like. The results were z-normalized within-subject to adjust for individual differences in the use of the scale, and then the final argumenthood scores were computed by averaging the normalized scores across all participants. The result is a set of values on a continuum, each value representing each sentence in the dataset. The actual numbers range between [−1.435,1.172]1.4351.172[-1.435,1.172], roughly centered around zero (μ=1.967e-11,σ=0.526formulae-sequence𝜇1.967𝑒-11𝜎0.526\mu=1.967e\textnormal{-}11,\sigma=0.526). The distribution is slightly left-skewed (right-leaning), with more positive values than negative values (z=2.877,p<.01formulae-sequence𝑧2.877𝑝.01z=2.877,p<.01; see Figure 2). Here are some examples with varying degrees of argumenthood, indicated by the numbers:
|
| 52 |
+
|
| 53 |
+
I whipped the sugar [with cream]. (0.35)The witch turned him [into a frog]. (0.570.570.57) The children hid [in a hurry]. (−0.410.41-0.41) It clamped [on his ankle]. (0.660.660.66) Amanda shuttled the children [from home]. (−0.10.1-0.1)
|
| 54 |
+
|
| 55 |
+
We refrain from assigning definitive interpretations to the absolute values of the scores, but how the scores compare to each other gives us insight into the relative difference in argumenthood. For instance, shuttled from home with a score of −0.10.1-0.1 is more adjunct-like than a higher-scoring construction such as clamped on his ankle (0.66)0.66(0.66), but more argument-like compared to hid in a hurry with a score of −0.410.41-0.41. This matches the intuition that a locative PP from home would be more argument-like to a change-of-location predicate shuttle, compared to a manner PP like in a hurry. However, it is still less argument-like than a more clearly argument-like PP on his ankle that is selected by clamp.
|
| 56 |
+
|
| 57 |
+
We use the same sets of word embeddings we used in Experiment 1 as base features, but we reduced their dimensionality to 555 via Principal Component Analysis. This reduction step is necessary due to the large dimensionality (d≥300𝑑300d\geq 300) of the word vectors compared to the small size of our dataset (n=305𝑛305n=305). Various features in addition to the embeddings of verbs and prepositions were also tested. The features we experimented with include semantic proto-role property scores (?) of the target PP (normalized mean across 5 annotators), mutual information (MI) (?), word embeddings of the nominal head token of the NP under the PP in question, existence of a direct object, and various interaction terms between the features (e.g., additive, subtractive, inner/outer products). The following lexical features were selected for the final models based on dev set performance: embeddings of the verb, preposition, nominal head, mutual information and existence of a direct object (D.O.). The intuition behind including D.O. is that if there exists a direct object in the given sentence, the syntactically oblique PP dependent would seem comparatively less argument-like compared to the direct object. This feature is expected to reduce the noise introduced by different argument structures of the main verbs.
|
| 58 |
+
|
| 59 |
+
We also include a diagnostics feature which is a weighted combination of two different traditional diagnostic test results (omissibility and pseudo-cleftability) produced by a linguist with expertise in theoretical syntax. Unlike all other features in our feature set, this diagnostics feature is not straightforwardly computable from corpus data. We add this feature in order to examine how powerful traditional linguistic diagnostics are in capturing gradient argumenthood.
|
| 60 |
+
|
| 61 |
+
The selected features are given as inputs to an MLP which is equivalent to Eq. 1 in Experiment 1 except that it outputs a continuous value. This regressor consists of an input layer with n𝑛n units (corresponding to n𝑛n features), m hidden units and a single output unit. Smooth L1 loss is used in order to reduce sensitivity to outliers, and m, the activation function (ReLU, Tanh or Sigmoid), optimizers and learning rates are all tuned using the development set for each individual model. We limit ourselves to a simpler MLP-only model for this experiment; the BiLSTM encoder model suffered from overfitting.
|
| 62 |
+
|
| 63 |
+
We use 15% of the dataset as development set, and train/test using 10-fold cross-validation on the remaining 85% rather than reporting performance on a fixed test split. This is because the credibility of performance on one test split may be questioned due to the small sample size. Pearson’s r𝑟r averaged over the 10 folds using Fisher z-transformation is the main metric. Mean R2superscript𝑅2R^{2} and Adjusted R2superscript𝑅2R^{2} (Radj2subscriptsuperscript𝑅2𝑎𝑑𝑗R^{2}_{adj}) are also reported to account for the potentially differing number of predictors in the ablation experiment.
|
| 64 |
+
|
| 65 |
+
Table 3 reports performances on the regression task. Results from several off-the-shelf regressors are reported for comparison. ELMo embeddings again produced the best results among the embeddings used in Experiment 1 (although our ablation study reveals that using only word embeddings as predictors is not sufficient to obtain satisfactory results). We further speculated that the dimensionality of the embeddings may have impacted the results, and ran additional experiments using higher-dimensional embeddings that were publicly available. Higher-dimensional embeddings did indeed lead to performance improvements, even though the actual inputs given to the models were all PCA-reduced to d=5𝑑5d=5. From this observation, we could further improve upon the inital ELMo results. Results from the best model (w2v-wiki) are given in addition to the set of results using the same embeddings as the models in Experiment 1. This model uses 1000-d𝑑d word2vec features with additional interaction features (multiplicative, subtractive) that improved dev set performance.
|
| 66 |
+
|
| 67 |
+
We conducted ablation experiments with the two best-performing models to examine the contribution of non-embedding features discussed in Section 4.2. Table 4 indicates that any linguistic feature contributes positively towards performance, with the direct object feature helping both word2vec and ELMo models the most. This supports our initial hypothesis that adding the direct object feature would help reduce noise in the data. When only the linguistic features are used without embeddings as base features, mutual information is the most informative. This suggests that there is some (but not complete) redundancy in information captured by word embeddings and mutual information. The diagnostics feature is informative but is a comparatively weak predictor, which aligns with the current state of diagnostic acceptability tests—they are sometimes useful but not always, especially with respect to syntactically oblique items such as PPs. This behavior of the diagnostics predictor adds credibility to our data collection protocol.
|
| 68 |
+
|
| 69 |
+
In motivating our tasks, we suggested that PP argumenthood information could improve existing NLP task performance such as SRL and parsing. We investigate whether this is a grounded claim by testing two separate hypotheses: (1) whether the task is indeed useful, and if so, (2) whether it is useful as a standalone task. We leave the issue of gradient argumenthood to future work for now, since the dataset is currently small and the notion of gradient argumenthood is not yet compatible with formulations of many NLP tasks.
|
| 70 |
+
|
| 71 |
+
We first test the utility of the binary argumenthood task in improving performances on existing NLP tasks. We selected three tasks that may benefit from PP argumenthood information: SRL on Wall Street Journal (WSJ) data (CoNLL 2005; ? ?), SRL on OntoNotes Corpus (CoNLL 2012 data; ? ?)555Tasks are labeling only, as described in ? (?)., and PP attachment disambiguation on WSJ (?).
|
| 72 |
+
|
| 73 |
+
We follow ? (?)’s setup to pretrain and evaluate sentence encoders666github.com/jsalt18-sentence-repl/jiant. If learning to make correct PP argumenthood distinction teaches models knowledge that is generalizable to the new tasks, the classifier trained on top of the fixed-weights encoder will perform better on those tasks compared to a classifier trained on top of an encoder with randomly initialized weights. Improvements over the randomly initialized setup from pretraining on our main PP argumenthood task (Arg) and its full-sentence variants (Arg fullsent and Arg fullsent 3-way; see Section 3.1 for details) are shown in Table 5. Only statistically significant (p<.05𝑝.05p<.05) improvements over the random encoder model are bolded, with significance levels calculated via Approximate Randomization (?) (R=1000𝑅1000R=1000). The models trained on PP argumenthood tasks perform significantly better than the random initalization model in both SRL tasks, which supports our initial claim that argumenthood tasks can be useful for SRL. Although not all errors made by the models were interpretable, we found interesting improvements such as the model trained on the PP argumenthood task being slightly more accurate than the random initialization model on AM-DIR, AM-LOC, and AM-MNR labels.
|
| 74 |
+
|
| 75 |
+
However, we did not observe significant improvements for the PP attachment disambiguation task. We speculate that since the task as formulated in ? (?) requires the model to understand PP dependents of NPs as well as VPs, our tasks that focus on verbal dependents may not provide the full set of linguistic knowledge necessary to solve this task. Nevertheless, our models are not significantly worse than the baseline, and the accuracy of the Arg fullsent model (88.2%) was comparable to a model that uses an encoder directly trained on PP attachment (88.7%).
|
| 76 |
+
|
| 77 |
+
Secondly, we discuss whether it is indeed useful to formulate PP argumenthood prediction as a separate task. The questions that need to be answered are (1) whether it would be the same or better to use a different pretraining task that would provide similar information (e.g., PP attachment disambiguation), and (2) whether the performance gain can be attributed to simply seeing more datapoints at train time rather than to the regularities we hope the models would learn through our task. Table 6 addresses both questions; we compare models pretrained on argumenthood tasks to a model pretrained directly on the PP attachment task listed in Table 5. All models trained on PP argumenthood prediction outperform the model trained on PP attachment, despite the fact that the latter has advantage for SRL2005 since the tasks share the same source text (WSJ). Furthermore, the variance in the sizes of the datasets indicates that the reported performance gains cannot solely be due to the increased number of datapoints seen during training.
|
| 78 |
+
|
| 79 |
+
We have proposed two different tasks—binary and gradient—for predicting PP argumenthood, and reported results on each using four different types of word embeddings as base predictors. We obtain 95.5 accuracy and 95.4 F1subscript𝐹1F_{1} in the binary classification task with BiLSTM and ELMo, and r=0.624𝑟0.624r=0.624 for the gradient human judgment prediction task. Our overall contribution is threefold: first, we have demonstrated that a principled prediction of both binary and gradient argumenthood judgments is possible with informed selection of lexical features; second, we justified the utility of our binary PP argumenthood classification as a standalone task by reporting performance gains on multiple end-tasks through encoder pretraining. Finally, we have conducted a proof-of-concept study with a novel gradient argumenthood prediction task, paired with a new public dataset777To be released at: decomp.io.
|
| 80 |
+
|
| 81 |
+
The pretraining approach holds promise in understanding and improving neural network models of language. Especially for end-to-end models, this method has an advantage over architecture engineering or hyperparameter tuning in terms of interpretability. That is, we can attribute the source of the performance gain on end tasks to the knowledge necessary to do well on the pretraining task. For instance, in Section 5 we can infer that that knowing how to make correct PP argumenthood distinction helps models encode representations that are more useful for SRL. Furthermore, we believe it is important to contribute to the recent efforts for designing better probing tasks to understand what machines really know about natural language (as opposed to directly taking downstream performances as metrics of better models). We hope to scale up our preliminary experiments and will continue to work on developing a set of linguistically informed probing and pretraining tasks for higher-quality, better-generalizable sentence representations.
|
1809.07893v2.txt
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Multiagent interactions are often modeled using extensive-form games (EFGs), a powerful framework that incoporates sequential actions, hidden information, and stochastic events. Recent research has focused on computing approximately optimal strategies in large extensive-form games, resulting in a solution to heads-up limit Texas Hold’em, a game with approximately 1017superscript101710^{17} states (?), and in two independent super-human computer agents for the much larger heads-up no-limit Texas Hold’em (?; ?).
|
| 2 |
+
|
| 3 |
+
When modeling an interaction with an EFG, for each outcome we must specify the agents’ utility, a cardinal measure of the outcome’s desirability. Utility is particularly difficult to specify. Take, for example, situations where an agent has multiple objectives to balance: a defender in a security game with the primary objective of protecting a target and a secondary objective of minimizing expected cost, or a robot operating in a dangerous environment with a primary task to complete and a secondary objective of minimizing damage to itself and others. How these objectives combine into a single value, the agent’s utility, is ill-specified and error prone.
|
| 4 |
+
|
| 5 |
+
One approach for handling multiple objectives is to use a linear combination of per-objective utilities. This approach has been used in EFGs to “tilt” poker agents toward taking specific actions (?), and to mix between cost minimization and risk mitigation in sequential security games (?). However, objectives are typically measured on incommensurable scales. This leads to dubious combinations of weights often selected by trial-and-error.
|
| 6 |
+
|
| 7 |
+
A second approach is to constrain the agents’ strategy spaces directly. For example, rather than minimizing the expected cost, we use a hard constraint that disqualifies high-cost strategies. Using such constraints has been extensively studied in single-agent perfect information settings (?) and partial information settings (?; ?; ?), as well as in (non-sequential) security games (?).
|
| 8 |
+
|
| 9 |
+
Incorporating strategy constraints when solving EFGs presents a unique challenge. Nash equilibria can be found by solving a linear program (LP) derived using the sequence-form representation (?). This LP is easily modified to incorporate linear strategy constraints; however, LPs do not scale to large games. Specialized algorithms for efficiently solving large games, such as an instantiation of Nesterov’s excessive gap technique (EGT) (?) as well as counterfactual regret minimization (CFR) (?) and its variants (?; ?), cannot integrate arbitrary strategy constraints directly. Currently, the only large-scale approach is restricted to constraints that consider only individual decisions (?).
|
| 10 |
+
|
| 11 |
+
In this work we present the first scalable algorithm for solving EFGs with arbitrary convex strategy constraints. Our algorithm, Constrained CFR, provably converges towards a strategy profile that is minimax optimal under the given constraints. It does this while retaining the 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/\sqrt{T}) convergence rate of CFR and requiring additional memory proportional to the number of constraints. We demonstrate the empirical effectiveness of Constrained CFR by comparing its solution to that of an LP solver in a security game. We also present a novel constraint-based technique for opponent modeling with partial observations in a small poker game.
|
| 12 |
+
|
| 13 |
+
Formally, an extensive-form game (?) is a game tree defined by:•A set of players N𝑁N. This work focuses on games with two players, so N={1,2}𝑁12N=\{1,2\}.•A set of histories H𝐻H, the tree’s nodes rooted at ∅\emptyset. The leafs, Z⊆H𝑍𝐻Z\subseteq H, are terminal histories. For any history h∈Hℎ𝐻h\in H, we let h′⊏hsquare-image-ofsuperscriptℎ′ℎh^{\prime}\sqsubset h denote a prefix h′superscriptℎ′h^{\prime} of hℎh, and necessarily h′∈Hsuperscriptℎ′𝐻h^{\prime}\in H.•For each h∈H∖Zℎ𝐻𝑍h\in H\setminus Z, a set of actions A(h)𝐴ℎA(h). For any a∈A(h)𝑎𝐴ℎa\in A(h), ha∈Hℎ𝑎𝐻ha\in H is a child of hℎh.•A player function P:H∖Z→N∪{c}:𝑃→𝐻𝑍𝑁𝑐P\colon H\setminus Z\to N\cup\{c\} defining the player to act at hℎh. If P(h)=c𝑃ℎ𝑐P(h)=c then chance acts according to a known probability distribution σc(h)∈Δ|A(h)|subscript𝜎𝑐ℎsubscriptΔ𝐴ℎ\sigma_{c}(h)\in\Delta_{|A(h)|}, where Δ|A(h)|subscriptΔ𝐴ℎ\Delta_{|A(h)|} is the probability simplex of dimension |A(h)|𝐴ℎ|A(h)|.•A set of utility functions ui:Z→ℝ:subscript𝑢𝑖→𝑍ℝu_{i}\colon Z\to\mathbb{R}, for each player. Outcome z𝑧z has utility ui(z)subscript𝑢𝑖𝑧u_{i}(z) for player i𝑖i. We assume the game is zero-sum, i.e., u1(z)=−u2(z)subscript𝑢1𝑧subscript𝑢2𝑧u_{1}(z)=-u_{2}(z). Let u(z)=u1(z)𝑢𝑧subscript𝑢1𝑧u(z)=u_{1}(z).•For each player i∈N𝑖𝑁i\in N, a collection of information sets ℐisubscriptℐ𝑖\mathcal{I}_{i}. ℐisubscriptℐ𝑖\mathcal{I}_{i} partitions Hisubscript𝐻���H_{i}, the histories where i𝑖i acts. Two histories h,h′ℎsuperscriptℎ′h,h^{\prime} in an information set I∈ℐi𝐼subscriptℐ𝑖I\in\mathcal{I}_{i} are indistinguishable to i𝑖i. Necessarily A(h)=A(h′)𝐴ℎ𝐴superscriptℎ′A(h)=A(h^{\prime}), which we denote by A(I)𝐴𝐼A(I). When a player acts they do not observe the history, only the information set it belongs to, which we denote as I[h]𝐼delimited-[]ℎI[h].We assume a further requirement on the information sets ℐisubscriptℐ𝑖\mathcal{I}_{i} called perfect recall. It requires that players are never forced to forget information they once observed. Mathematically this means that all indistinguishable histories share the same sequence of past information sets and actions for the actor. Although this may seem like a restrictive assumption, some perfect recall-like condition is needed to guarantee that an EFG can be solved in polynommial time, and all sequential games played by humans exhibit perfect recall.
|
| 14 |
+
|
| 15 |
+
A behavioral strategy for player i𝑖i maps each information set I∈ℐi𝐼subscriptℐ𝑖I\in\mathcal{I}_{i} to a distribution over actions, σi(I)∈Δ|A(I)|subscript𝜎𝑖𝐼subscriptΔ𝐴𝐼\sigma_{i}(I)\in\Delta_{|A(I)|}. The probability assigned to a∈A(I)𝑎𝐴𝐼a\in A(I) is σi(I,a)subscript𝜎𝑖𝐼𝑎\sigma_{i}(I,a). A strategy profile, σ={σ1,σ2}𝜎subscript𝜎1subscript𝜎2\sigma=\{\sigma_{1},\sigma_{2}\}, specifies a strategy for each player. We label the strategy of the opponent of player i𝑖i as σ−isubscript𝜎𝑖\sigma_{-i}. The sets of behavioral strategies and strategy profiles are ΣisubscriptΣ𝑖\Sigma_{i} and ΣΣ\Sigma respectively.
|
| 16 |
+
|
| 17 |
+
A strategy profile uniquely defines a reach probability for any history h∈Hℎ𝐻h\in H:πσ(h)≔∏h′a⊑hσP(h′)(I[h′],a)≔superscript𝜋𝜎ℎsubscriptproductsquare-image-of-or-equalssuperscriptℎ′𝑎ℎsubscript𝜎𝑃superscriptℎ′𝐼delimited-[]superscriptℎ′𝑎\pi^{\sigma}(h)\coloneqq\prod_{h^{\prime}a\sqsubseteq h}\sigma_{P(h^{\prime})}(I[h^{\prime}],a)(1)This product decomposes into contributions from each player and chance, π1σ1(h)π2σ2(h)πc(h)subscriptsuperscript𝜋subscript𝜎11ℎsubscriptsuperscript𝜋subscript𝜎22ℎsubscript𝜋𝑐ℎ\pi^{\sigma_{1}}_{1}(h)\pi^{\sigma_{2}}_{2}(h)\pi_{c}(h). For a player i∈N𝑖𝑁i\in N, we denote the contributions from the opponent and chance as π−iσ−i(h)subscriptsuperscript𝜋subscript𝜎𝑖𝑖ℎ\pi^{\sigma_{-i}}_{-i}(h) so that πσ(h)=πiσi(h)π−iσ−i(h)superscript𝜋𝜎ℎsuperscriptsubscript𝜋𝑖subscript𝜎𝑖ℎsuperscriptsubscript𝜋𝑖subscript𝜎𝑖ℎ\pi^{\sigma}(h)=\pi_{i}^{\sigma_{i}}(h)\pi_{-i}^{\sigma_{-i}}(h). By perfect recall we have πiσi(h)=πiσi(h′)subscriptsuperscript𝜋subscript𝜎𝑖𝑖ℎsubscriptsuperscript𝜋subscript𝜎𝑖𝑖superscriptℎ′\pi^{\sigma_{i}}_{i}(h)=\pi^{\sigma_{i}}_{i}(h^{\prime}) for any h,h′ℎsuperscriptℎ′h,h^{\prime} in same information set I∈ℐi𝐼subscriptℐ𝑖I\in\mathcal{I}_{i}. We thus also write this probability as πiσi(I)subscriptsuperscript𝜋subscript𝜎𝑖𝑖𝐼\pi^{\sigma_{i}}_{i}(I).
|
| 18 |
+
|
| 19 |
+
Given a strategy profile σ={σ1,σ2}𝜎subscript𝜎1subscript𝜎2\sigma=\{\sigma_{1},\sigma_{2}\}, the expected utility for player i𝑖i is given byui(σ)=ui(σ1,σ2)≔∑z∈Zπσ(z)ui(z).subscript𝑢𝑖𝜎subscript𝑢𝑖subscript𝜎1subscript𝜎2≔subscript𝑧𝑍superscript𝜋𝜎𝑧subscript𝑢𝑖𝑧u_{i}(\sigma)=u_{i}(\sigma_{1},\sigma_{2})\coloneqq\sum_{z\in Z}\pi^{\sigma}(z)u_{i}(z).(2)
|
| 20 |
+
|
| 21 |
+
A strategy σisubscript𝜎𝑖\sigma_{i} is an ε𝜀\varepsilon-best response to the opponent’s strategy σ−isubscript𝜎𝑖\sigma_{-i} if ui(σi,σ−i)+ε≥ui(σi′,σ−i)subscript𝑢𝑖subscript𝜎𝑖subscript𝜎𝑖𝜀subscript𝑢𝑖superscriptsubscript𝜎𝑖′subscript𝜎𝑖u_{i}(\sigma_{i},\sigma_{-i})+\varepsilon\geq u_{i}(\sigma_{i}^{\prime},\sigma_{-i}) for any alternative strategy σi′∈Σisuperscriptsubscript𝜎𝑖′subscriptΣ𝑖\sigma_{i}^{\prime}\in\Sigma_{i}. A strategy profile is an ε𝜀\varepsilon-Nash equilibrium when each σisubscript𝜎𝑖\sigma_{i} is a ε𝜀\varepsilon-best response to its opponent; such a profile exists for any ε≥0𝜀0\varepsilon\geq 0. The exploitability of a strategy profile is the smallest ε=1/2(ε1+ε2)𝜀12subscript𝜀1subscript𝜀2\varepsilon=\nicefrac{{1}}{{2}}(\varepsilon_{1}+\varepsilon_{2}) such that each σisubscript𝜎𝑖\sigma_{i} is an εisubscript𝜀𝑖\varepsilon_{i}-best response. Due to the zero-sum property, the game’s Nash equilibria are the saddle-points of the minimax problemmaxσ1∈Σ1minσ2∈Σ2u(σ1,σ2)=minσ2∈Σ2maxσ1∈Σ1u(σ1,σ2).subscriptsubscript𝜎1subscriptΣ1subscriptsubscript𝜎2subscriptΣ2𝑢subscript𝜎1subscript𝜎2subscriptsubscript𝜎2subscriptΣ2subscriptsubscript𝜎1subscriptΣ1𝑢subscript𝜎1subscript𝜎2\max_{\sigma_{1}\in\Sigma_{1}}\min_{\sigma_{2}\in\Sigma_{2}}u(\sigma_{1},\sigma_{2})=\min_{\sigma_{2}\in\Sigma_{2}}\max_{\sigma_{1}\in\Sigma_{1}}u(\sigma_{1},\sigma_{2}).(3)
|
| 22 |
+
|
| 23 |
+
A zero-sum EFG can be represented in sequence form (?). The sets of sequence-form strategies for players 1 and 2 are 𝒳𝒳\mathcal{X} and 𝒴𝒴\mathcal{Y} respectively. A sequence-form strategy 𝐱∈𝒳𝐱𝒳{\bm{\mathbf{x}}}\in\mathcal{X} is a vector indexed by pairs I∈ℐ1𝐼subscriptℐ1I\in\mathcal{I}_{1}, a∈A(I)𝑎𝐴𝐼a\in A(I). The entry 𝐱(I,a)subscript𝐱𝐼𝑎{\bm{\mathbf{x}}}_{(I,a)} is the probability of player 1 playing the sequence of actions that reaches I𝐼I and then playing action a𝑎a. A special entry, 𝐱∅=1subscript𝐱1{\bm{\mathbf{x}}}_{\emptyset}=1, represents the empty sequence. Any behavioral strategy σ1∈Σ1subscript𝜎1subscriptΣ1\sigma_{1}\in\Sigma_{1} has a corresponding sequence-form strategy SEQ(σ1)SEQsubscript𝜎1\text{SEQ}(\sigma_{1}) whereSEQ(σ1)(I,a)≔π1σ1(I)σ1(I,a).∀I∈ℐi,a∈A(I)\text{SEQ}(\sigma_{1})_{(I,a)}\coloneqq\pi^{\sigma_{1}}_{1}(I)\sigma_{1}(I,a).\qquad\forall I\in\mathcal{I}_{i},a\in A(I)
|
| 24 |
+
|
| 25 |
+
Player i𝑖i has a unique sequence to reach any history h∈Hℎ𝐻h\in H and, by perfect recall, any information set I∈ℐi𝐼subscriptℐ𝑖I\in\mathcal{I}_{i}. Let 𝐱hsubscript𝐱ℎ{\bm{\mathbf{x}}}_{h} and 𝐱Isubscript𝐱𝐼{\bm{\mathbf{x}}}_{I} denote the corresponding entries in 𝐱𝐱{\bm{\mathbf{x}}}. Thus, we are free to write the expected utility as u(𝐱,𝐲)=∑z∈Zπc(z)𝐱z𝐲zu(z)𝑢𝐱𝐲subscript𝑧𝑍subscript𝜋𝑐𝑧subscript𝐱𝑧subscript𝐲𝑧𝑢𝑧u({\bm{\mathbf{x}}},{\bm{\mathbf{y}}})=\sum_{z\in Z}\pi_{c}(z){\bm{\mathbf{x}}}_{z}{\bm{\mathbf{y}}}_{z}u(z). This is bilinear, i.e., there exists a payoff matrix 𝐀𝐀\mathbf{A} such that u(𝐱,𝐲)=𝐱⊺𝐀𝐲𝑢𝐱𝐲superscript𝐱⊺𝐀𝐲u({\bm{\mathbf{x}}},{\bm{\mathbf{y}}})={\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}}. A consequence of perfect recall and the laws of probability is for I∈ℐ1𝐼subscriptℐ1I\in\mathcal{I}_{1} that 𝐱I=∑a∈A(I)𝐱(I,a)subscript𝐱𝐼subscript𝑎𝐴𝐼subscript𝐱𝐼𝑎{\bm{\mathbf{x}}}_{I}=\sum_{a\in A(I)}{\bm{\mathbf{x}}}_{(I,a)} and that 𝐱≥0𝐱0{\bm{\mathbf{x}}}\geq 0. These constraints are linear and completely describe the polytope of sequence-form strategies. Using these together, (3) can be expressed as a bilinear saddle point problem over the polytopes 𝒳𝒳\mathcal{X} and 𝒴𝒴\mathcal{Y}:max𝐱∈𝒳min𝐲∈𝒴𝐱⊺𝐀𝐲=min𝐲∈𝒴max𝐱∈𝒳𝐱⊺𝐀𝐲subscript𝐱𝒳subscript𝐲𝒴superscript𝐱⊺𝐀𝐲subscript𝐲𝒴subscript𝐱𝒳superscript𝐱⊺𝐀𝐲\max_{{\bm{\mathbf{x}}}\in\mathcal{X}}\min_{{\bm{\mathbf{y}}}\in\mathcal{Y}}{\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}}=\min_{{\bm{\mathbf{y}}}\in\mathcal{Y}}\max_{{\bm{\mathbf{x}}}\in\mathcal{X}}{\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}}(4)
|
| 26 |
+
|
| 27 |
+
For a convex function f:𝒳→ℝ:𝑓→𝒳ℝf:\mathcal{X}\rightarrow\mathbb{R}, let ∇f(𝐱)∇𝑓𝐱\nabla f({\bm{\mathbf{x}}}) be any element of the subdifferential ∂f(𝐱)𝑓𝐱\partial f({\bm{\mathbf{x}}}), and let ∇(I,a)f(𝐱)subscript∇𝐼𝑎𝑓𝐱\nabla_{(I,a)}f({\bm{\mathbf{x}}}) be the (I,a)𝐼𝑎(I,a) element of this subgradient.
|
| 28 |
+
|
| 29 |
+
Counterfactual regret minimization (?) is a large-scale equilibrium-finding algorithm that, in self-play, iteratively updates a strategy profile in a fashion that drives its counterfactual regret to zero. This regret is defined in terms of counterfactual values. The counterfactual value of reaching information set I𝐼I is the expected payoff under the counterfactual that the acting player attempts to reach it:v(I,σ)=∑h∈Iπ−iσ−i(h)∑z∈Zπσ(h,z)u(z)𝑣𝐼𝜎subscriptℎ𝐼superscriptsubscript𝜋𝑖subscript𝜎𝑖ℎsubscript𝑧𝑍superscript𝜋𝜎ℎ𝑧𝑢𝑧v(I,\sigma)=\sum_{h\in I}\pi_{-i}^{\sigma_{-i}}(h)\sum_{z\in Z}\pi^{\sigma}(h,z)u(z)\ (5)Here i=P(h)𝑖𝑃ℎi=P(h) for any h∈Iℎ𝐼h\in I, and πσ(h,z)superscript𝜋𝜎ℎ𝑧\pi^{\sigma}(h,z) is the probability of reaching z𝑧z from hℎh under σ𝜎\sigma. Let σI→asubscript𝜎→𝐼𝑎\sigma_{I\to a} be the profile that plays a𝑎a at I𝐼I and otherwise plays according to σ𝜎\sigma. For a series of profiles σ1,..,σT\sigma^{1},..,\sigma^{T}, the average counterfactual regret of action a𝑎a at I𝐼I is RT(I,a)=1T∑t=1Tv(I,σI→at)−v(I,σt)superscript𝑅𝑇𝐼𝑎1𝑇superscriptsubscript𝑡1𝑇𝑣𝐼subscriptsuperscript𝜎𝑡→𝐼𝑎𝑣𝐼superscript𝜎𝑡R^{T}(I,a)=\frac{1}{T}\sum_{t=1}^{T}v(I,\sigma^{t}_{I\to a})-v(I,\sigma^{t}).
|
| 30 |
+
|
| 31 |
+
To minimize counterfactual regret, CFR employs regret matching (?). In particular, actions are chosen in proportion to positive regret, σt+1(I,a)∝(Rt(I,a))+proportional-tosuperscript𝜎𝑡1𝐼𝑎superscriptsuperscript𝑅𝑡𝐼𝑎\sigma^{t+1}(I,a)\propto(R^{t}(I,a))^{+} where (x)+=max(x,0)superscript𝑥𝑥0(x)^{+}=\max(x,0). It follows that the average strategy profile σ¯Tsuperscript¯𝜎𝑇\overline{\sigma}^{T}, defined by σ¯iT(I,a)∝∑t=1Tπiσt(I)σit(I,a)proportional-tosuperscriptsubscript¯𝜎𝑖𝑇𝐼𝑎superscriptsubscript𝑡1𝑇superscriptsubscript𝜋𝑖superscript𝜎𝑡𝐼subscriptsuperscript𝜎𝑡𝑖𝐼𝑎\overline{\sigma}_{i}^{T}(I,a)\propto\sum_{t=1}^{T}\pi_{i}^{\sigma^{t}}(I)\sigma^{t}_{i}(I,a), is an 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/\sqrt{T})-Nash equilibrium (?). In sequence form, the average is given by 𝐱¯𝐓=1T∑t=1T𝐱𝐭superscriptbold-¯𝐱𝐓1𝑇superscriptsubscript𝑡1𝑇superscript𝐱𝐭{\bm{\mathbf{\overline{x}^{T}}}}=\frac{1}{T}\sum_{t=1}^{T}{\bm{\mathbf{x^{t}}}}.
|
| 32 |
+
|
| 33 |
+
We begin by formally introducing the constrained optimization problem for extensive-form games. We specify convex constraints on the set of sequence-form strategies111Without loss of generality, we assume throughout this paper that the constrained player is player 1, i.e. the maximizing player. 𝒳𝒳\mathcal{X} with a set of k𝑘k convex functions fi:𝒳→ℝ:subscript𝑓𝑖→𝒳ℝf_{i}\colon\mathcal{X}\to\mathbb{R} where we require fi(𝐱)≤0subscript𝑓𝑖𝐱0f_{i}({\bm{\mathbf{x}}})\leq 0 for each i=1,…,k𝑖1…𝑘i=1,...,k. We use constraints on the sequence form instead of on the behavioral strategies because reach probabilities and utilities are linear functions of a sequence-form strategy, but not of a behavioral strategy.
|
| 34 |
+
|
| 35 |
+
The optimization problem can be stated as:max𝐱∈𝒳min𝐲∈𝒴subscript𝐱𝒳subscript𝐲𝒴\displaystyle\max_{{\bm{\mathbf{x}}}\in\mathcal{X}}\min_{{\bm{\mathbf{y}}}\in\mathcal{Y}}~{}𝐱⊺𝐀𝐲superscript𝐱⊺𝐀𝐲\displaystyle{\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}}(6)subject tofi(𝐱)≤0fori=1,…,kformulae-sequencesubject tosubscript𝑓𝑖𝐱0for𝑖1…𝑘\displaystyle\text{subject to}\qquad f_{i}({\bm{\mathbf{x}}})\leq 0\qquad\text{for}~{}i=1,...,k
|
| 36 |
+
|
| 37 |
+
The first step toward solving this problem is to incorporate the constraints into the objective with Lagrange multipliers. If the problem is feasible (i.e., there exists a feasible 𝐱f∈𝒳subscript𝐱𝑓𝒳{\bm{\mathbf{x}}}_{f}\in\mathcal{X} such that fi(𝐱f)≤0subscript𝑓𝑖subscript𝐱𝑓0f_{i}({\bm{\mathbf{x}}}_{f})\leq 0 for each i𝑖i), then (6) is equivalent to:max𝐱∈𝒳min𝐲∈𝒴𝝀≥𝟎𝐱⊺𝐀𝐲−∑i=1kλifi(𝐱)subscript𝐱𝒳subscript𝐲𝒴𝝀0superscript𝐱⊺𝐀𝐲superscriptsubscript𝑖1𝑘subscript𝜆𝑖subscript𝑓𝑖𝐱\max_{{\bm{\mathbf{x}}}\in\mathcal{X}}\min_{\begin{subarray}{c}{\bm{\mathbf{y}}}\in\mathcal{Y}\\{\bm{\mathbf{\lambda}}}\geq{\bm{\mathbf{0}}}\end{subarray}}{\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}}-\sum_{i=1}^{k}\lambda_{i}f_{i}({\bm{\mathbf{x}}})(7)
|
| 38 |
+
|
| 39 |
+
We will now present intuition as to how CFR can be modified to solve (7), before presenting the algorithm and proving its convergence.
|
| 40 |
+
|
| 41 |
+
CFR can be seen as doing a saddle point optimization on the objective in (3), using the gradients222For a more complete discussion of the connection between CFR and gradient ascent, see (?). of g(𝐱,𝐲)=𝐱⊺𝐀𝐲𝑔𝐱𝐲superscript𝐱⊺𝐀𝐲g({\bm{\mathbf{x}}},{\bm{\mathbf{y}}})={\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}} given as∇𝐱g(𝐱𝐭,𝐲𝐭)=𝐀𝐲𝐭∇𝐲−g(𝐱𝐭,𝐲𝐭)=−(𝐱𝐭)⊺𝐀.formulae-sequencesubscript∇𝐱𝑔superscript𝐱𝐭superscript𝐲𝐭𝐀superscript𝐲𝐭subscript∇𝐲𝑔superscript𝐱𝐭superscript𝐲𝐭superscriptsuperscript𝐱𝐭⊺𝐀\nabla_{{\bm{\mathbf{x}}}}g({\bm{\mathbf{x^{t}}}},{\bm{\mathbf{y^{t}}}})=\mathbf{A}{\bm{\mathbf{y^{t}}}}\qquad\nabla_{{\bm{\mathbf{y}}}}{-g({\bm{\mathbf{x^{t}}}},{\bm{\mathbf{y^{t}}}})}=-({\bm{\mathbf{x^{t}}}})^{\intercal}\mathbf{A}.(8)
|
| 42 |
+
|
| 43 |
+
The intuition behind our modified algorithm is to perform the same updates, but with gradients of the modified utility functionh(𝐱,𝐲,𝝀)=𝐱⊺𝐀𝐲−∑i=1kλifi(𝐱).ℎ𝐱𝐲𝝀superscript𝐱⊺𝐀𝐲superscriptsubscript𝑖1𝑘subscript𝜆𝑖subscript𝑓𝑖𝐱h({\bm{\mathbf{x}}},{\bm{\mathbf{y}}},{\bm{\mathbf{\lambda}}})={\bm{\mathbf{x}}}^{\intercal}\mathbf{A}{\bm{\mathbf{y}}}-\sum_{i=1}^{k}\lambda_{i}f_{i}({\bm{\mathbf{x}}}).(9)The (sub)gradients we use in the modified CFR update are then∇𝐱h(𝐱𝐭,𝐲𝐭,𝝀𝐭)=𝐀𝐲𝐭−∑i=1kλit∇fi(𝐱𝐭)∇𝐲−h(𝐱𝐭,𝐲𝐭,𝝀𝐭)=−(𝐱𝐭)⊺𝐀.subscript∇𝐱ℎsuperscript𝐱𝐭superscript𝐲𝐭superscript𝝀𝐭𝐀superscript𝐲𝐭superscriptsubscript𝑖1𝑘subscriptsuperscript𝜆𝑡𝑖∇subscript𝑓𝑖superscript𝐱𝐭subscript∇𝐲ℎsuperscript𝐱𝐭superscript𝐲𝐭superscript𝝀𝐭superscriptsuperscript𝐱𝐭⊺𝐀\displaystyle\begin{split}&\nabla_{{\bm{\mathbf{x}}}}h({\bm{\mathbf{x^{t}}}},{\bm{\mathbf{y^{t}}}},{\bm{\mathbf{\lambda^{t}}}})=\mathbf{A}{\bm{\mathbf{y^{t}}}}-\sum_{i=1}^{k}\lambda^{t}_{i}\nabla f_{i}({\bm{\mathbf{x^{t}}}})\\&\nabla_{{\bm{\mathbf{y}}}}{-h({\bm{\mathbf{x^{t}}}},{\bm{\mathbf{y^{t}}}},{\bm{\mathbf{\lambda^{t}}}})}=-({\bm{\mathbf{x^{t}}}})^{\intercal}\mathbf{A}.\end{split}(10)Note that this leaves the update of the unconstrained player unchanged. In addition, we must update 𝝀𝐭superscript𝝀𝐭{\bm{\mathbf{\lambda^{t}}}} using the gradients ∇𝝀−h(𝐱𝐭,𝐲𝐭,𝝀𝐭)=∑i=1kfi(𝐱𝐭)𝐞𝐢subscript∇𝝀ℎsuperscript𝐱𝐭superscript𝐲𝐭superscript𝝀𝐭superscriptsubscript𝑖1𝑘subscript𝑓𝑖superscript𝐱𝐭subscript𝐞𝐢\nabla_{{\bm{\mathbf{\lambda}}}}{-h({\bm{\mathbf{x^{t}}}},{\bm{\mathbf{y^{t}}}},{\bm{\mathbf{\lambda^{t}}}})}=\sum_{i=1}^{k}f_{i}({\bm{\mathbf{x^{t}}}}){\bm{\mathbf{e_{i}}}}, which is the k𝑘k-vector with fi(𝐱𝐭)subscript𝑓𝑖superscript𝐱𝐭f_{i}({\bm{\mathbf{x^{t}}}}) at index i𝑖i. This can be done with any gradient method, e.g. simple gradient ascent with the update ruleλit+1=max(λit+αtfi(𝐱𝐭),0)subscriptsuperscript𝜆𝑡1𝑖subscriptsuperscript𝜆𝑡𝑖superscript𝛼𝑡subscript𝑓𝑖superscript𝐱𝐭0\lambda^{t+1}_{i}=\max(\lambda^{t}_{i}+\alpha^{t}f_{i}({\bm{\mathbf{x^{t}}}}),0)(11)for some step size αt∝1/tproportional-tosuperscript𝛼𝑡1𝑡\alpha^{t}\propto 1/\sqrt{t}.
|
| 44 |
+
|
| 45 |
+
We give the Constrained CFR (CCFR) procedure in Algorithm 1. The constrained player’s strategy is updated with the function CCFR and the unconstrained player’s strategy is updated with unmodified CFR. In this instantiation 𝝀𝐭superscript𝝀𝐭{\bm{\mathbf{\lambda^{t}}}} is updated with gradient ascent, though any regret minimizing update can be used. We clamp each λitsuperscriptsubscript𝜆𝑖𝑡\lambda_{i}^{t} to the interval [0,β]0𝛽[0,\beta] for reasons discussed in the following section. Together, these updates form a full iteration of CCFR.
|
| 46 |
+
|
| 47 |
+
The CCFR update for the constrained player is the same as the CFR update, with the crucial difference of line 6, which incorporates the second part of the gradient ∇𝐱hsubscript∇𝐱ℎ\nabla_{{\bm{\mathbf{{\bm{\mathbf{x}}}}}}}{h} into the counterfactual value vt(I,a)superscript𝑣𝑡𝐼𝑎v^{t}(I,a). The loop beginning on line 3 goes through the constrained player’s information sets, walking the tree bottom-up from the leafs. The counterfactual value vt(I,a)superscript𝑣𝑡𝐼𝑎v^{t}(I,a) is set on line 5 using the values of terminal states Z1[Ia]superscript𝑍1delimited-[]𝐼𝑎Z^{1}[Ia] which directly follow from action a𝑎a at I𝐼I (this corresponds to the 𝐀𝐲𝐭𝐀superscript𝐲𝐭\mathbf{A}{\bm{\mathbf{y^{t}}}} term of the gradient), as well as the already computed values of successor information sets succ(I,a)𝑠𝑢𝑐𝑐𝐼𝑎succ(I,a). Line 8 computes the value of the current information set using the current strategy. Lines 10 and 11 update the stored regrets for each action. Line 14 updates the current strategy with regret matching.
|
| 48 |
+
|
| 49 |
+
In order to ensure that the utilities passed to the regret matching update are bounded, we will require 𝝀𝐭superscript𝝀𝐭{\bm{\mathbf{\lambda^{t}}}} to be bounded from above; in particular, we will choose 𝝀𝐭∈[0,β]ksuperscript𝝀𝐭superscript0𝛽𝑘{\bm{\mathbf{\lambda^{t}}}}\in[0,\beta]^{k}. We can then evaluate the chosen sequence 𝝀𝟏,…,𝝀𝐓superscript𝝀1…superscript𝝀𝐓{\bm{\mathbf{\lambda^{1}}}},...,{\bm{\mathbf{\lambda^{T}}}} using its regret in comparison to the optimal 𝝀∗∈[0,β]ksuperscript𝝀superscript0𝛽𝑘{\bm{\mathbf{\lambda^{*}}}}\in[0,\beta]^{k}:RλT(β)≔maxλ∗∈[0,β]k1T∑t=1T∑i=1k[λi∗fi(SEQ(σ1t))−λitfi(SEQ(σ1t))].≔subscriptsuperscript𝑅𝑇𝜆𝛽subscriptsuperscript𝜆superscript0𝛽𝑘1𝑇superscriptsubscript𝑡1𝑇superscriptsubscript𝑖1𝑘delimited-[]superscriptsubscript𝜆𝑖subscript𝑓𝑖SEQsuperscriptsubscript𝜎1𝑡superscriptsubscript𝜆𝑖𝑡subscript𝑓𝑖SEQsuperscriptsubscript𝜎1𝑡\displaystyle\begin{split}R^{T}_{\lambda}(\beta)\coloneqq\max_{\lambda^{*}\in[0,\beta]^{k}}\frac{1}{T}\sum_{t=1}^{T}\sum_{i=1}^{k}\bigl{[}&\lambda_{i}^{*}f_{i}(\text{SEQ}(\sigma_{1}^{t}))\\&-\lambda_{i}^{t}f_{i}(\text{SEQ}(\sigma_{1}^{t}))\bigr{]}.\end{split}(12)We can guarantee RλT(β)=𝒪(1/T)subscriptsuperscript𝑅𝑇𝜆𝛽𝒪1𝑇R^{T}_{\lambda}(\beta)=\mathcal{O}(1/\sqrt{T}), e.g. by choosing 𝝀𝐭superscript𝝀𝐭{\bm{\mathbf{\lambda^{t}}}} with projected gradient ascent (?).
|
| 50 |
+
|
| 51 |
+
We now present the theorems which show that CCFR can be used to approximately solve (6). In the following thereoms we assume that T∈ℕ𝑇ℕT\in\mathbb{N}, we have some convex, continuous constraint functions f1,…,fksubscript𝑓1…subscript𝑓𝑘f_{1},...,f_{k}, and we use some regret-minimizing method to select the vectors 𝝀1,…,𝝀Tsuperscript𝝀1…superscript𝝀𝑇{\bm{\mathbf{\lambda}}}^{1},...,{\bm{\mathbf{\lambda}}}^{T} each in [0,β]ksuperscript0𝛽𝑘[0,\beta]^{k} for some β≥0𝛽0\beta\geq 0.
|
| 52 |
+
|
| 53 |
+
First, we show that the exploitability of the average strategies approaches the optimal value:
|
| 54 |
+
|
| 55 |
+
All proofs are given in the appendix. Theorem 3 guarantees that the constrained exploitability of the final CCFR strategy profile converges to the minimum exploitability possible over the set of feasible profiles, at a rate of 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/\sqrt{T}) (assuming a suitable regret minimizer is used to select 𝝀tsuperscript𝝀𝑡{\bm{\mathbf{\lambda}}}^{t}).
|
| 56 |
+
|
| 57 |
+
In order to establish that CCFR approximately solves optimization (6), we must also show that the CCFR strategies converge to being feasible. In the case of arbitrary β≥0𝛽0\beta\geq 0:
|
| 58 |
+
|
| 59 |
+
This theorem guarantees that the CCFR strategy converges to the feasible set at a rate of 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/\sqrt{T}), up to an approximation error of Δu/βsubscriptΔ𝑢𝛽\Delta_{u}/\beta induced by the bounding of 𝝀𝐭superscript𝝀𝐭{\bm{\mathbf{\lambda^{t}}}}.
|
| 60 |
+
|
| 61 |
+
We can eliminate the approximation error when β𝛽\beta is chosen large enough for some optimal 𝝀∗superscript𝝀{\bm{\mathbf{\lambda}}}^{*} to lie within the bounded set [0,β]ksuperscript0𝛽𝑘[0,\beta]^{k}. In order to establish the existence of such a 𝝀∗superscript𝝀{\bm{\mathbf{\lambda}}}^{*}, we must assume a constraint qualification such as Slater’s condition, which requires the existance of a feasible 𝐱𝐱{\bm{\mathbf{x}}} which strictly satisfies any nonlinear constraints (fi(𝐱)≤0subscript𝑓𝑖𝐱0f_{i}({\bm{\mathbf{x}}})\leq 0 for all i𝑖i and fj(𝐱)<0subscript𝑓𝑗𝐱0f_{j}({\bm{\mathbf{x}}})<0 for all nonlinear fjsubscript𝑓𝑗f_{j}). Then there exists a finite 𝝀∗superscript𝝀{\bm{\mathbf{\lambda}}}^{*} which is a solution to optimization (7), which we can use to give the bound:
|
| 62 |
+
|
| 63 |
+
In this case, the CCFR strategy converges fully to the feasible set, at a rate of 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/\sqrt{T}), given a suitable choice of regret minimizer for 𝝀tsuperscript𝝀𝑡{\bm{\mathbf{\lambda}}}^{t}. We provide an explicit example of such a minimizer in the following corollary:
|
| 64 |
+
|
| 65 |
+
This follows from using the projected gradient descent regret bound (?) to giveRλT(β)≤β22αT+G22∑t=1Tαt≤βGTsuperscriptsubscript𝑅𝜆𝑇𝛽superscript𝛽22superscript𝛼𝑇superscript𝐺22superscriptsubscript𝑡1𝑇superscript𝛼𝑡𝛽𝐺𝑇R_{\lambda}^{T}(\beta)\leq\frac{\beta^{2}}{2\alpha^{T}}+\frac{G^{2}}{2}\sum_{t=1}^{T}\alpha^{t}\leq\frac{\beta G}{\sqrt{T}}.∎
|
| 66 |
+
|
| 67 |
+
Finally, we discuss how to choose β𝛽\beta. When there is a minimum acceptable constrant violation, β𝛽\beta can be selected with Theorem 2 to guarantee that the violation is no more than the specified value, either asymptotically or after a specified number of iterations T𝑇T. When no amount of constraint violation is acceptable, β𝛽\beta should be chosen such that β≥λi∗𝛽superscriptsubscript𝜆𝑖\beta\geq\lambda_{i}^{*} by Theorem 3. If 𝝀∗superscript𝝀{\bm{\mathbf{\lambda}}}^{*} is unknown, CCFR can be run with an arbitrary β𝛽\beta for a number of iterations. If the average 1T∑t=1Tλit1𝑇superscriptsubscript𝑡1𝑇superscriptsubscript𝜆𝑖𝑡\frac{1}{T}\sum_{t=1}^{T}\lambda_{i}^{t} is close to β𝛽\beta, then β≤λi∗𝛽subscriptsuperscript𝜆𝑖\beta\leq\lambda^{*}_{i}, so β𝛽\beta is doubled and CCFR run again. Otherwise, it is guaranteed that β>λi∗𝛽subscriptsuperscript𝜆𝑖\beta>\lambda^{*}_{i} and CCFR will converge to a solution with no constraint violation.
|
| 68 |
+
|
| 69 |
+
To the best of our knowledge, no previous work has proposed a technique for solving either of the optimizations (6) or (7) for general constraints in extensive-form games. Optimization (7) belongs to a general class of saddle point optimizations for which a number of accelerated methods with 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/T) convergence have been proposed (?; ?; ?; ?; ?). These methods have been applied to unconstrained equilibrium computation in extensive-form games using a family of prox functions initially proposed by Hoda et. al. (?; ?; ?). Like CFR, these algorithms could be extended to solve the optimization (7).
|
| 70 |
+
|
| 71 |
+
Despite a worse theoretical dependence on T𝑇T, CFR is preferred to accelerated methods as our base algorithm for a number of practical reasons.•CFR can be easily modified with a number of different sampling schemes, adapting to sparsity and achieving greatly improved convergence over the deterministic version (?). Although the stochastic mirror prox algorithm has been used to combine an accelerated update with sampling in extensive-form games, each of its iterations still requires walking each player’s full strategy space to compute the prox functions, and it has poor performance in practice (?).•CFR has good empirical performance in imperfect recall games (?) and even provably converges to an equilibrium in certain subclasses of well-formed games (?; ?), which we will make use of in Section 5.1. The prox function used by the accelerated methods is ill-defined in all imperfect recall games.•CFR theoretically scales better with game size than do the accelerated techniques. The constant M𝑀M in the bounds of Theorems 3-3 is at worst |ℐ|ℐ|\mathcal{I}|, and for many games of interest is closer to |ℐ|1/2superscriptℐ12|\mathcal{I}|^{1/2} (? ?, Section 3.2). The best convergence bound for an accelerated method depends in the worst case on |ℐ|22dsuperscriptℐ2superscript2𝑑|\mathcal{I}|^{2}2^{d} where d𝑑d is the depth of the game tree, and is at best |ℐ|2dℐsuperscript2𝑑|\mathcal{I}|2^{d} (?).•The CFR update can be modified to CFR+ to give a guaranteed bound on tracking regret and greatly improve empirical performance (?). CFR+ has been shown to converge with initial rate faster than 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/T) in a variety of games (? ?, Sections 4.3-4.4).•Finally, CFR is not inherently limited to 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/\sqrt{T}) worst-case convergence. Regret minimization algorithms can be optimistically modified to give 𝒪(1/T)𝒪1𝑇\mathcal{O}(1/T) convergence in self-play (?). Such a modification has been applied to CFR (? ?, Section 4.4).
|
| 72 |
+
|
| 73 |
+
We describe CCFR as an extension of deterministic CFR for ease of exposition. All of the CFR modifications described in this section can be applied to CCFR out-of-the-box.
|
| 74 |
+
|
| 75 |
+
We present two domains for experimental evaluation in this paper. In the first, we use constraints to model a secondary objective when generating strategies in a model security game. In the second domain, we use constraints for opponent modeling in a small poker game. We demonstrate that using constraints for modeling data allows us to learn counter-strategies that approach optimal counter-strategies as the amount of data increases. Unlike previous opponent modeling techniques for poker, we do not require our data to contain full observations of the opponent’s private cards for this guarantee to hold.
|
| 76 |
+
|
| 77 |
+
The transit game is a model security game introduced in (?). With size parameter w𝑤w, the game is played on an 8-connected grid of size 2w×w2𝑤𝑤2w\times w (see Figure 1) over d=2w+4𝑑2𝑤4d=2w+4 time steps. One player, the evader, wishes to cross the grid from left to right while avoiding the other player, the patroller. Actions are movements along the edges of the grid, but each move has a probability 0.10.10.1 of failing. The evader receives −11-1 utils for each time he encounters the patroller, 111 utils when he escapes on reaching the east end of the grid, and −0.020.02-0.02 utils for each time step that passes without escaping. The patroller receives the negative of the evader’s utils, making the game zero-sum. The players observe only their own actions and locations.
|
| 78 |
+
|
| 79 |
+
The patroller has a secondary objective of minimizing the risk that it fails to return to its base (sp0subscriptsuperscript𝑠0𝑝s^{0}_{p} in Figure 1) by the end of the game. In the original formulation, this was modeled using a large utility penalty when the patroller doesn’t end the game at its base. For the reasons discussed in the introduction, it is more natural to model this objective as a linear constraint on the patroller’s strategy, bounding the maximum probability that it doesn’t return to base.
|
| 80 |
+
|
| 81 |
+
For our experiments, we implemented CCFR on top of the NFGSS-CFR algorithm described in (?). In the NFGSS framework, each information set is defined by only the current grid state and the time step; history is not remembered. This is a case of imperfect recall, but our theory still holds as the game is well-formed. The constraint on the patroller is defined as∑sd,aπσp(sd)σ(sd,a)∑sd+1≠sp0T(sd,a,sd+1)≤brsubscriptsuperscript𝑠𝑑𝑎superscript𝜋subscript𝜎𝑝superscript𝑠𝑑𝜎superscript𝑠𝑑𝑎subscriptsuperscript𝑠𝑑1subscriptsuperscript𝑠0𝑝𝑇superscript𝑠𝑑𝑎superscript𝑠𝑑1subscript𝑏𝑟\sum_{s^{d},a}\pi^{\sigma_{p}}(s^{d})\sigma(s^{d},a)\sum_{s^{d+1}\neq s^{0}_{p}}T(s^{d},a,s^{d+1})\leq b_{r}where sd,asuperscript𝑠𝑑𝑎s^{d},a are state action pairs at time step d𝑑d, T(sd,a,sd+1)𝑇superscript𝑠𝑑𝑎superscript𝑠𝑑1T(s^{d},a,s^{d+1}) is the probability that sd+1superscript𝑠𝑑1s^{d+1} is the next state given that action a𝑎a is taken from sdsuperscript𝑠𝑑s^{d}, and brsubscript𝑏𝑟b_{r} is the chosen risk bound. This is a well-defined linear constraint despite imperfect recall, as πσp(sd)superscript𝜋subscript𝜎𝑝superscript𝑠𝑑\pi^{\sigma_{p}}(s^{d}) is a linear combination over the sequences that reach sdsuperscript𝑠𝑑s^{d}. We update the CCFR constraint weights λ𝜆\lambda using stochastic gradient ascent with constant step size αt=1superscript𝛼𝑡1\alpha^{t}=1, which we found to work well across a variety of game sizes and risk bounds. In practice, we found that bounding 𝝀𝝀{\bm{\mathbf{\lambda}}} was unnecessary for convergence.
|
| 82 |
+
|
| 83 |
+
Previous work has shown that double oracle (DO) techniques outperform solving the full game linear program (LP) in the unconstrained transit game (?; ?). However, an efficient best response oracle exists in the unconstrained setting only because a best response is guaranteed to exist in the space of pure strategies, which can be efficiently searched. Conversely, constrained best responses might exist only in the space of mixed strategies, meaning that the best response computation requires solving an LP of comparable size to the LP for the full game Nash equilibrium. This makes DO methods inappropriate for the general constrained setting, so we omit comparison to DO methods in this work.
|
| 84 |
+
|
| 85 |
+
We first empirically demonstrate that CCFR converges to optimality by comparing its produced strategies with strategies produced by solving the LP representation of the game with the simplex solver in IBM ILOG CPLEX 12.7.1. Figure 2(a) shows the risk and exploitability for strategies produced by running CCFR for 100,000 iterations on a game of size w=8𝑤8w=8, with a variety of values for the risk bound brsubscript𝑏𝑟b_{r}. In each case, the computed strategy had risk within 0.0010.0010.001 of the specified bound brsubscript𝑏𝑟b_{r}, and exploitability within 0.0010.0010.001 of the corresponding LP strategy (not shown because the points are indistinguishable). The convergence over time for one particular case, br=0.1subscript𝑏𝑟0.1b_{r}=0.1, is shown in Figure 2(b), where the plotted value is the difference in exploitability between the average CCFR strategy and the LP strategy, shown with a log-linear scale. The vertical line shows the time used to compute the LP strategy.
|
| 86 |
+
|
| 87 |
+
Convergence times for the CPLEX LP and CCFR with risk bound br=0.1subscript𝑏𝑟0.1b_{r}=0.1 are shown on a log scale for a variety of game sizes w𝑤w in Figure 2(c). The time for CCFR is presented for a variety of precisions ϵitalic-ϵ\epsilon, which bounds both the optimality of the final exploitability and the violation of the risk bound. The points for game size w=8𝑤8w=8 are also shown in Figure 2(b). The LP time is calculated with default precision ϵ=10−6italic-ϵsuperscript106\epsilon=10^{-6}. Changing the precision to a higher value actually results in a slower computation, due to the precision also controlling the size of allowed infeasibility in the Harris ratio test (?).
|
| 88 |
+
|
| 89 |
+
Even at w=6𝑤6w=6, a game which has relatively small strategy sizes of ∼similar-to\sim6,000 values, CCFR can give a significant speedup for a small tradeoff in precision. At w=8𝑤8w=8 and larger, the LP is clearly slower than CCFR even for the relatively modest precision of ϵ=0.001italic-ϵ0.001\epsilon=0.001. For game size w=10𝑤10w=10, with strategy sizes of ∼similar-to\sim25,000 values, the LP is more than an order of magnitude slower than high precision CCFR.
|
| 90 |
+
|
| 91 |
+
In multi-agent settings, strategy constraints can serve an additional purpose beyond encoding secondary objectives. Often, when creating a strategy for one agent, we have partial information on how the other agent(s) behave. A way to make use of this information is to solve the game with constraints on the other agents’ strategies, enforcing that their strategy in the solution is consistent with their observed behavior. As a motivating example, we consider poker games in which we always observe our opponent’s actions, but not necessarily the private card(s) that they hold when making the action.
|
| 92 |
+
|
| 93 |
+
In poker games, if either player takes the fold action, the other player automatically wins the game. Because the players’ private cards are irrelevant to the game outcome in this case, they are typically not revealed. We thus consider the problem of opponent modeling from observing past games, in which the opponent’s hand of private card(s) is only revealed when a showdown is reached and the player with the better hand wins. Most previous work in opponent modeling has either assumed full observation of private cards after a fold (?; ?) or has ignored observations of opponent actions entirely, instead only using observed utilities (?). The only previous work which uses these partial observations has no theoretical guarantees on solution quality (?).
|
| 94 |
+
|
| 95 |
+
We first collect data by playing against the opponent with a probe strategy, which is a uniformly random distribution over the non-fold actions. To model the opponent in an unbiased way, we generate two types of sequence-form constraints from this data. First, for each possible sequence of public actions and for each of our own private hands, we build an unbiased confidence interval on the probability that we are dealt the hand and the public sequence occurs. This probability is a weighted sum of opponent sequence probabilities over their possible private cards, and thus the confidence bounds become linear sequence-form constraints. Second, for each terminal history that is a showdown, we build a confidence interval on the probability that the showdown is reached. In combination, these two sets of constraints guarantee that the CCFR strategy converges to a best response to the opponent strategy as the number of observed games increases. A proof of convergence to a best response and full details of the constraints are provided in the appendix.
|
| 96 |
+
|
| 97 |
+
Because we construct each constraint separately, there is no guarantee that the full constraint set is simultaneously feasible. In fact, in our experiments the constraints were typically mildly infeasible. However, this is not a problem for CCFR, which doesn’t require feasible constraints to have well-defined updates. In fact, because we bound the Lagrange multipliers, CCFR still theoretically converges to a sensible solution, especially when the total infeasibility is small. For more details on how CCFR handles infeasibility, see the appendix.
|
| 98 |
+
|
| 99 |
+
We ran our experiments in Leduc Hold’em (?), a small poker game played with a six card deck over two betting rounds. To generate a target strategy profile to model, we solved the "JQ.K/pair.nopair" abstracted version of the game (?). We then played a probe strategy profile against the target profile to generate constraints as described above, and ran CCFR twice to find each half of a counter-profile that is optimal against the set of constrained profiles. We used gradient ascent with step size αt=1000/tsuperscript𝛼𝑡1000𝑡\alpha^{t}=1000/\sqrt{t} to update the 𝝀𝝀{\bm{\mathbf{\lambda}}} values, and ran CCFR for 106superscript10610^{6} iterations, which we found to be sufficient for approximate convegence with ε<0.001𝜀0.001\varepsilon<0.001.
|
| 100 |
+
|
| 101 |
+
We evaluate how well the trained counter-profile performs when played against the target profile, and in particular investigate how this performance depends on the number of games we observe to produce the counter-profile, and on the confidence γ𝛾\gamma used for the confidence interval constraints. Results are shown in Figure 3, with a log-linear scale. With a high confidence γ=99%𝛾percent99\gamma=99\% (looser constraints), we obtain an expected value that is better than the equilibrium expected value with fewer than 100 observed games on average, and with fewer than 200 observed games consistently. Lower confidence levels (tighter constraints) resulted in more variable performance and poor average value with small numbers of observed games, but also faster learning as the number of observed games increased. For all confidence levels, the expected value converges to the best response value as the number of observed games increases.
|
| 102 |
+
|
| 103 |
+
Strategy constraints are a powerful modeling tool in extensive-form games. Prior to this work, solving games with strategy constraints required solving a linear program, which scaled poorly to many of the very large games of practical interest. We introduced CCFR, the first efficient large-scale algorithm for solving extensive-form games with general strategy constraints. We demonstrated that CCFR is effective at solving sequential security games with bounds on acceptable risk. We also introduced a method of generating strategy constraints from partial observations of poker games, resulting in the first opponent modeling technique that has theoretical guarantees with partial observations. We demonstrated the effectiveness of this technique for opponent modeling in Leduc Hold’em.
|
| 104 |
+
|
| 105 |
+
The transit game experiments were implemented with code made publically available by the game theory group of the Artificial Intelligence Center at Czech Technical University in Prague. This research was supported by Alberta Innovates, Alberta Advanced Education, and the Alberta Machine Intelligence Institute (Amii). Computing resources were provided by Compute Canada and Calcul Québec.
|
1809.07952v2.txt
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Many cities around the world are now collectinglarge amounts of spatial datafrom a wide range of sources.Governments and other organizations are releasingdata on items such as poverty rate,air pollution, traffic flow, energy consumption andcrime (?; ?; ?).Analyzing such spatial data isof critical importancein improving the life quality of citizensin many fields such associo-economics (?; ?),public health (?),public security (?; ?)and urban planning (?).For example, knowing the spatial distribution of povertyenables us to optimize allocation of resourcesfor remedial action.Likewise,the spatial distribution of air pollution is usefulin creating policiesthat can control air qualityand thus protect human health.
|
| 2 |
+
|
| 3 |
+
Naturally, information at fine spatial granularity is preferredbecause it allows us to identifykey regions that require interventionto improve city environments efficiently.As an example,Figures 1(a) and 1(b)visualizethe distributions of poverty ratesin New York Cityby community district and by borough, respectively;darker hues represent poorer regions.Clearly, to better understand socio-economic problems,Figure 1(a) is better than Figure 1(b).In practice, however, such information is often aggregatedinto coarse granularities as in Figure 1(b).It is usually thought to be too time-consuming and costlyto conduct a census over the whole population of a city,and a sample survey is conducted instead.Accordingly,the number of samples associated witheach fine-grained regionmay not be large enoughto provide a statistically significant estimateof the value associated to this region;the typical response is to aggregate samples over larger regions (?).
|
| 4 |
+
|
| 5 |
+
With the recent increase in data availability,utilizing auxiliary spatial data sets on the same regionis an effective way ofrefining coarse-grained target data (?; ?; ?; ?; ?).In these works,the regression models are used for estimating the relationshipsbetween target data (e.g., poverty rate)and auxiliary data sets (e.g., unemployment rate).These existing methods, however, require thatthe spatial granularities of all the auxiliary data setsare the same as the desired granularity of target data.This requirement prevents us from making full use ofthe auxiliary data sets with various granularities.The auxiliary data sets areactually associated with various geographical partitions.For example, New York City has releasedvarious spatial data sets portioned intoboroughs, community districts, zip code, police precincts and so on.
|
| 6 |
+
|
| 7 |
+
We propose a probabilistic modelfor refining coarse-grained target datavia the effective use of auxiliary data setswith various granularities.An important characteristic isdiscerning the usefulness of each auxiliary data setwhich depends on not only the strength of relationship with the target databut also the level of spatial granularity.For example, consider the case of two auxiliary data setsthat have the same strength of relationship with the target data,but different granularities.In that case,the finer-grained one is seen as more helpfulfor refining the coarse-grained target data.
|
| 8 |
+
|
| 9 |
+
With the proposed model,the fine-grained target data are assumed to followa Gaussian process (GP) (?)whose mean functionis modeled by a linear regressionof the auxiliary data sets.This GP-based modeling allows us toconsider the spatial correlationin the target dataand the auxiliary data sets simultaneously.Since the target data are observednot at fine granularity but at coarse granularity,we model a spatial aggregation processto transform the fine-grained target datainto the coarse-grained target data.Furthermore,to handle auxiliary data sets with various granularities,we apply GP regression to each auxiliary data setto derive a predictive distributiondefined on the continuous space;this conceptually corresponds to spatial interpolation.A key idea is thatit hierarchically incorporatesthe predictive distributions into the model;that is, it does not use point estimates.This enables us to consideruncertainty in the prediction ofauxiliary data sets.The uncertainty is governedby several factors,one of which is sample density,i.e., spatial granularity of the auxiliary data;the finer the granularity is, the lower the uncertainty is.Incorporating the uncertainty leads toeffectively learningthe usefulness of the auxiliary datawith consideration ofthe levels of spatial granularity;this allows our model to accurately refine the coarse-grained target data.We predict the fine-grained target data via a Bayesian inference procedure.The proposed model is designed such that theestimation of model parameters based on the exact marginal likelihood is possible:By analytically integrating out the variables offine-grained target and auxiliary data,we can estimate the parameters without explicitly obtaining these variables.We construct the predictive distribution of the fine-grained target databy using the estimated parameters.
|
| 10 |
+
|
| 11 |
+
The problem of refining coarse-grained spatial datahas been studied in various fieldssuch as socio-economics (?; ?),agricultural economics (?; ?),epidemiology (?), meteorology (?; ?) andgeographical information system (GIS) (?; ?).This problem is also called statistical downscaling,spatial disaggregation, and areal interpolation.The previous works can be categorized intotwo cases in terms of target data availability.
|
| 12 |
+
|
| 13 |
+
In the first case,in which a large amount of coarse- and fine-grained target dataare available,we can predictthe fine-grained target databy using a mapping functionfrom coarse- to fine-grained data.The mapping function can be learntby using various machine learning methodsincluding linear regression models (?),neural networks (?; ?)and support vector machines (?).Recently,super-resolution techniquesbased on deep neural networks have been appliedfor refining coarse-grained spatial data (?; ?).The super-resolution techniques aim tolearn a mapping functionfrom low- to high-resolution images (?).The method by (?) is based onthe analogy between gridded spatial data and images;values at grid cells are regarded as values at pixels.The large amount of fine-grained data needed for training are,however, not available in many cases (e.g., poverty survey),and often only coarse-grained data are available.These methods are not applicable in such situations.
|
| 14 |
+
|
| 15 |
+
In the second case,in which only coarse-grained target dataare available,many regression-based methods have been proposedthat use auxiliary spatial data sets to refine coarse-grainedtarget data (?; ?; ?; ?; ?).Regression models (linear and non-linear) are usedfor estimating the relationshipsbetween target data and auxiliary data sets.A few methods can construct the regression modelsunder the spatial aggregation constraints (?; ?).The constraints state thata value associatedwith a coarse-grained regionis a linear average of their constituent valuesin a fine-grained partition.In order to satisfythe spatial aggregation constraints,the regression residualsat the coarse-grained regionsare allocatedto the fine-grained regionsby using the spatial interpolation method,i.e., kriging (?).These methods, however, assume thatthe auxiliary data sets have spatial granularitiesequivalent to that of fine-grained target data to be estimated.This assumption makes it difficultto utilize multiple auxiliary data setswith various granularities.
|
| 16 |
+
|
| 17 |
+
Several regression methods have been developedfor estimating relationshipsbetween multi-scale spatial datasets (?; ?; ?; ?).These methods predict the target datawith the same granularity as that of the training databy utilizing multi-scale auxiliary data sets.They do not, however, considerthe spatial aggregation constraint,which is a critical factor inrefining the coarse-scale target data.
|
| 18 |
+
|
| 19 |
+
There have been several hierarchical Bayesian modelsto predict fine-grained target datausing fine-grained auxiliary data sets.Although they introducea fully Bayesian inference (?; ?; ?)or a variational inference (?)for model parameters,the uncertainty in the prediction of auxiliary data sets is ignored:They cannot discern the usefulness of each auxiliary data setconsidering their levels of spatial granularity.
|
| 20 |
+
|
| 21 |
+
Different from prior works,the proposed model can effectively make use of auxiliary data setswith various granularities by hierarchically incorporating Gaussian processes.This hierarchical modeling allows us to effectively learnthe usefulness of each auxiliary data setconsidering the levels of spatial granularity.Our model also considersthe spatial aggregation constraintsby integrating the Gaussian processes witha spatial aggregation process to transform the fine-grained target datainto the coarse-grained target data.
|
| 22 |
+
|
| 23 |
+
In this section, we describe the spatial data this study focuses on,and define our problem of refining coarse-grained spatial databy using, for the same region, auxiliary spatial data setswith various granularities.Assume that we have a target spatial data set with coarse granularity,and we would like to obtain a fine-grained version.Let 𝒮𝒮{\mathcal{S}} bethe collection of indices of auxiliary data sets.The notations used in this paper are listed in Table 1.
|
| 24 |
+
|
| 25 |
+
Partition:Let 𝒳𝒳{\mathcal{X}} be a total region of a city,and 𝒙∈𝒳𝒙𝒳{\mbox{\boldmath$x$}}\in{\mathcal{X}} be a location pointrepresented by its coordinates (e.g., latitude and longitude).Partition 𝒫𝒫{\mathcal{P}} of 𝒳𝒳{\mathcal{X}} isa collection of disjoint subsets,called regions, of 𝒳𝒳{\mathcal{X}},whose union is equal to 𝒳𝒳{\mathcal{X}}.Let |𝒫|𝒫|{\mathcal{P}}| denote the number of regions in 𝒫𝒫{\mathcal{P}}.We can consider several partitions of 𝒳𝒳{\mathcal{X}} as follows.Let 𝒫coarsuperscript𝒫coar{\mathcal{P}}^{\rm coar} be the coarse-grained partition,i.e., that of the coarse-grained target data.Let 𝒫finesuperscript𝒫fine{\mathcal{P}}^{\rm fine} be the fine-grained partition,of the desired fine-grained target data.For s∈𝒮𝑠𝒮s\in{\mathcal{S}}, let 𝒫ssubscript𝒫𝑠{\mathcal{P}}_{s} be the partition of the s𝑠sth auxiliary data set.
|
| 26 |
+
|
| 27 |
+
Spatial data:Let 𝒂=(a1,…,a|𝒫coar|)⊤𝒂superscriptsubscript𝑎1…subscript𝑎superscript𝒫coartop{\mbox{\boldmath$a$}}=(a_{1},\ldots,a_{|{\mathcal{P}}^{\rm coar}|})^{\top}be a |𝒫coar|superscript𝒫coar|{\mathcal{P}}^{\rm coar}|-dimensional vector consisting of the coarse-grained target values,where ai∈ℝsubscript𝑎𝑖ℝa_{i}\in{\mathbb{R}} is the value associated with region i∈𝒫coar𝑖superscript𝒫coari\in{\mathcal{P}}^{\rm coar}.For s∈𝒮𝑠𝒮s\in{\mathcal{S}}, let 𝒚s=(ys,1,…,ys,|𝒫s|)⊤subscript𝒚𝑠superscriptsubscript𝑦𝑠1…subscript𝑦𝑠subscript𝒫𝑠top{\mbox{\boldmath$y$}}_{s}=(y_{s,1},\ldots,y_{s,|{\mathcal{P}_{s}}|})^{\top} be a |𝒫s|subscript𝒫𝑠|{\mathcal{P}_{s}}|-dimensional vectorconsisting of the s𝑠sth auxiliary data values, where ys,p∈ℝsubscript𝑦𝑠𝑝ℝy_{s,p}\in{\mathbb{R}} is the value associatedwith region p∈𝒫s𝑝subscript𝒫𝑠p\in{\mathcal{P}_{s}} of the s𝑠sth auxiliary data set.
|
| 28 |
+
|
| 29 |
+
Problem:Suppose that we have coarse-grained target data 𝒂𝒂a whose partition is 𝒫coarsuperscript𝒫coar{\mathcal{P}}^{\rm coar},auxiliary data sets with the respective partitions {(𝒫s,𝒚s)∣s∈𝒮}conditional-setsubscript𝒫𝑠subscript𝒚𝑠𝑠𝒮\{({\mathcal{P}}_{s},{\mbox{\boldmath$y$}}_{s})\mid s\in{\mathcal{S}}\},and the desired fine-grained partition 𝒫finesuperscript𝒫fine{\mathcal{P}}^{\rm fine},we wish to estimate a |𝒫fine|superscript𝒫fine|{\mathcal{P}}^{\rm fine}|-dimensional vector𝒛=(z1,…,z|𝒫fine|)⊤𝒛superscriptsubscript𝑧1…subscript𝑧superscript𝒫finetop{\mbox{\boldmath$z$}}=(z_{1},\ldots,z_{|{\mathcal{P}}^{\rm fine}|})^{\top}consisting of the fine-grained target values, where zj∈ℝsubscript𝑧𝑗ℝz_{j}\in{\mathbb{R}} is the value associated with region j∈𝒫fine𝑗superscript𝒫finej\in{\mathcal{P}}^{\rm fine}.Here, the values aisubscript𝑎𝑖a_{i}, ys,psubscript𝑦𝑠𝑝y_{s,p} and zjsubscript𝑧𝑗z_{j} are assumed to be intensive quantities such as ratios; that is,they are independent of the area scale of the respective regions.When the values are extensive quantities such as population,they can be transformed into intensive quantitiesby dividing them with the areas of regions.
|
| 30 |
+
|
| 31 |
+
We propose a probabilistic model that allows auxiliary spatial data setswith various granularities to be used in refining coarse-grained spatial data.Our model is based on Gaussian process (GP) (?),which is a flexible non-parametric model for non-linear functions in a continuous domain.We model the generative process for coarse-grained target data 𝒂𝒂a,given the auxiliary data sets with known partitions{(𝒫s,𝒚s)∣s∈𝒮}conditional-setsubscript𝒫𝑠subscript𝒚𝑠𝑠𝒮\{({\mathcal{P}}_{s},{\mbox{\boldmath$y$}}_{s})\mid s\in{\mathcal{S}}\},coarse-grained partition 𝒫coarsuperscript𝒫coar{\mathcal{P}}^{\rm coar},and fine-grained partition 𝒫finesuperscript𝒫fine{\mathcal{P}}^{\rm fine}.In other words,we model the conditional probabilityp(𝒂∣{𝒚s}s∈𝒮)𝑝conditional𝒂subscriptsubscript𝒚𝑠𝑠𝒮p({\mbox{\boldmath$a$}}\mid\{{\mbox{\boldmath$y$}}_{s}\}_{s\in{\mathcal{S}}})instead of the joint probability of 𝒂𝒂a and {𝒚s}s∈𝒮subscriptsubscript𝒚𝑠𝑠𝒮\{{\mbox{\boldmath$y$}}_{s}\}_{s\in{\mathcal{S}}}.It enables us to adopt two-step inference approachdescribed in Section 5,which is advantageous in the computational cost for learning model parameters.
|
| 32 |
+
|
| 33 |
+
The generative process (given three auxiliary data sets) is illustrated schematicallyin Figure 2, where darker hues represent regions with higher values.This process contains the following three steps:(a) Deriving the predictive distribution over continuous spacefor each auxiliary data set 𝒚ssubscript𝒚𝑠{\mbox{\boldmath$y$}}_{s} via GP regression,which corresponds to spatial interpolation;(b) generating the fine-grained target data 𝒛𝒛z via a GPwhose mean function is modeled as the linear regressionof the continuous predictive distributions of the auxiliary data sets;(c) generating the coarse-grained target data 𝒂𝒂aby spatially aggregating the constituent values in a fine-grained partition.
|
| 34 |
+
|
| 35 |
+
In our problem,each value is associated with a region in a partition rather than a single location point in 𝒳𝒳{\mathcal{X}};this prevents us from directly applying GP.We thus associate each region in a partition with its centroid,and regard each value as being associated with the centroid of that region.This assumption, while significantly simplifying computations involved,might worsen the fit of the GP to the data set,which however is appropriately taken into account in the following stepsas increased uncertainty of theGPs for both the respective auxiliary data sets (described in (5))and the target data (described in (6)).For s∈𝒮𝑠𝒮s\in{\mathcal{S}},let 𝐗s=(𝒙s,1,…,𝒙s,|𝒫s|)subscript𝐗𝑠subscript𝒙𝑠1…subscript𝒙𝑠subscript𝒫𝑠{\bf X}_{s}=({\mbox{\boldmath$x$}}_{s,1},\ldots,{\mbox{\boldmath$x$}}_{s,|{\mathcal{P}_{s}}|}) bethe set of the centroids in partition 𝒫ssubscript𝒫𝑠{\mathcal{P}}_{s},where 𝒙s,psubscript𝒙𝑠𝑝{\mbox{\boldmath$x$}}_{s,p} is the centroid of region p∈𝒫s𝑝subscript𝒫𝑠p\in{\mathcal{P}_{s}}.Similarly, for fine-grained partition 𝒫finesuperscript𝒫fine{\mathcal{P}}^{\rm fine},let 𝐗fine=(𝒙1,…,𝒙|𝒫fine|)superscript𝐗finesubscript𝒙1…subscript𝒙superscript𝒫fine{\bf X}^{\rm fine}=({\mbox{\boldmath$x$}}_{1},\ldots,{\mbox{\boldmath$x$}}_{|{\mathcal{P}}^{\rm fine}|}) be the set of centroids in 𝒫finesuperscript𝒫fine{\mathcal{P}}^{\rm fine}.Thus, our problem is now reformulated as estimating 𝒛=(z1,…,z|𝒫fine|)⊤𝒛superscriptsubscript𝑧1…subscript𝑧superscript𝒫finetop{\mbox{\boldmath$z$}}=(z_{1},\ldots,z_{|{\mathcal{P}}^{\rm fine}|})^{\top},where zj∈ℝsubscript𝑧𝑗ℝz_{j}\in{\mathbb{R}} is a target value at the centroid of region j∈𝒫fine𝑗superscript𝒫finej\in{\mathcal{P}}^{\rm fine},as indicated by the auxiliary spatial data sets {(𝐗s,𝒚s)∣s∈𝒮}conditional-setsubscript𝐗𝑠subscript𝒚𝑠𝑠𝒮\{({\bf X}_{s},{\mbox{\boldmath$y$}}_{s})\mid s\in{\mathcal{S}}\}.
|
| 36 |
+
|
| 37 |
+
(a) Deriving predictive distributions of auxiliary spatial data sets:In order to handle auxiliary spatial data sets with various granularities,we use GP regression to derive a posterior Gaussian process for a latent continuous random function on 𝒳𝒳\mathcal{X};this conceptually corresponds to spatial interpolation of each auxiliary spatial data set.We then evaluate the predictive distribution on the basis of the posterior Gaussian process.Let fs(𝒙)subscript𝑓𝑠𝒙f_{s}({\mbox{\boldmath$x$}}) be a noise-free latent function for the s𝑠sth auxiliary data set at location 𝒙𝒙x.We assume that fs(𝒙)subscript𝑓𝑠𝒙f_{s}({\mbox{\boldmath$x$}}) follows a Gaussian process,fs(𝒙)∼𝒢𝒫(0,ks(𝒙,𝒙′))similar-tosubscript𝑓𝑠𝒙𝒢𝒫0subscript𝑘𝑠𝒙superscript𝒙′f_{s}({\mbox{\boldmath$x$}})\sim\mathcal{GP}(0,k_{s}({\mbox{\boldmath$x$}},{\mbox{\boldmath$x$}}^{\prime})),with mean zero anda covariance function ks(𝒙,𝒙′)subscript𝑘𝑠𝒙superscript𝒙′k_{s}({\mbox{\boldmath$x$}},{\mbox{\boldmath$x$}}^{\prime}).Though our model does not depend on any particular choice of the covariance function,for simplicity we consider the well-known covariance function,i.e., squared-exponential kernel,which is widely used for measuring the similarity between function valuesin spatial coordinates (?).The squared-exponential kernel is defined asks(𝒙,𝒙′)=αs2exp(−12γs2‖𝒙−𝒙′‖2),subscript𝑘𝑠𝒙superscript𝒙′subscriptsuperscript𝛼2𝑠12subscriptsuperscript𝛾2𝑠superscriptnorm𝒙superscript𝒙′2k_{s}({\mbox{\boldmath$x$}},{\mbox{\boldmath$x$}}^{\prime})=\alpha^{2}_{s}\exp\left(-\frac{1}{2\gamma^{2}_{s}}\|{\mbox{\boldmath$x$}}-{\mbox{\boldmath$x$}}^{\prime}\|^{2}\right),(1)where γssubscript𝛾𝑠\gamma_{s} is the scale parameter,αs2subscriptsuperscript𝛼2𝑠\alpha^{2}_{s} is a signal variance that controls the magnitude of the covariance,and ∥⋅∥\|\cdot\| is the Euclidean norm.We assume that the s𝑠sth auxiliary data 𝒚ssubscript𝒚𝑠{\mbox{\boldmath$y$}}_{s} is generated with an additive Gaussian noise with noise variance σs2superscriptsubscript𝜎𝑠2\sigma_{s}^{2}.Defining fs∗(𝒙p)superscriptsubscript𝑓𝑠∗subscript𝒙𝑝f_{s}^{\ast}({\mbox{\boldmath$x$}}_{p}) asthe prediction of the s𝑠sthauxiliary data set for the centroid 𝒙psubscript𝒙𝑝{\mbox{\boldmath$x$}}_{p} of thefine-grained partition,the predictive distribution of𝒇s∗=(fs∗(𝒙1),…,fs∗(𝒙|𝒫fine|))⊤subscriptsuperscript𝒇∗𝑠superscriptsuperscriptsubscript𝑓𝑠∗subscript𝒙1…superscriptsubscript𝑓𝑠∗subscript𝒙superscript𝒫finetop{\mbox{\boldmath$f$}}^{\ast}_{s}=(f_{s}^{\ast}({\mbox{\boldmath$x$}}_{1}),\ldots,f_{s}^{\ast}({\mbox{\boldmath$x$}}_{|{\mathcal{P}}^{\rm fine}|}))^{\top}is as follows:p(𝒇s∗)=𝒩(𝒇s∗∣𝒇s∗¯,𝚺s∗),𝑝superscriptsubscript𝒇𝑠∗𝒩conditionalsuperscriptsubscript𝒇𝑠∗¯superscriptsubscript𝒇𝑠∗superscriptsubscript𝚺𝑠∗p({\mbox{\boldmath$f$}}_{s}^{\ast})={\mathcal{N}}({\mbox{\boldmath$f$}}_{s}^{\ast}\mid\bar{{\mbox{\boldmath$f$}}_{s}^{\ast}},{\mbox{\boldmath$\Sigma$}}_{s}^{\ast}),(2)where 𝒇s∗¯=𝐊s∗⊤(𝐊s+σs2𝐈)−1𝒚s¯superscriptsubscript𝒇𝑠∗superscriptsubscript𝐊𝑠∗topsuperscriptsubscript𝐊𝑠superscriptsubscript𝜎𝑠2𝐈1subscript𝒚𝑠\bar{{\mbox{\boldmath$f$}}_{s}^{\ast}}={\bf K}_{s\ast}^{\top}({\bf K}_{s}+\sigma_{s}^{2}{\bf I})^{-1}{\mbox{\boldmath$y$}}_{s} isthe predictive means,and 𝚺s∗=𝐊s∗∗−𝐊s∗⊤(𝐊s+σs2𝐈)−1𝐊s∗superscriptsubscript𝚺𝑠∗subscript𝐊𝑠∗absent∗superscriptsubscript𝐊𝑠∗topsuperscriptsubscript𝐊𝑠superscriptsubscript𝜎𝑠2𝐈1subscript𝐊𝑠∗{\mbox{\boldmath$\Sigma$}}_{s}^{\ast}={\bf K}_{s\ast\ast}-{\bf K}_{s\ast}^{\top}({\bf K}_{s}+\sigma_{s}^{2}{\bf I})^{-1}{\bf K}_{s\ast} isthe covariance matrix,whose diagonal elements represent the uncertainties in the prediction at the test points 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine}.Incorporation ofthe predictive distributions (2) is expectedto allow the usefulness of auxiliary data to be effectively learntas it allows consideration of the uncertainty in the prediction.Details are given in (7) in Section 5.Here,𝐊ssubscript𝐊𝑠{\bf K}_{s} isa |𝒫s|×|𝒫s|subscript𝒫𝑠subscript𝒫𝑠|{\mathcal{P}}_{s}|\times|{\mathcal{P}}_{s}| covariance matrixwhose entries are covariancesbetween training points 𝐗ssubscript𝐗𝑠{\bf X}_{s}.𝐊s∗subscript𝐊𝑠∗{\bf K}_{s\ast} isa |𝒫s|×|𝒫fine|subscript𝒫𝑠superscript𝒫fine|{\mathcal{P}}_{s}|\times|{\mathcal{P}}^{\rm fine}| covariance matrixwhose entries are covariancesbetween training points 𝐗ssubscript𝐗𝑠{\bf X}_{s} and test points 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine}.𝐊s∗∗subscript𝐊𝑠∗absent∗{\bf K}_{s\ast\ast} isa |𝒫fine|×|𝒫fine|superscript𝒫finesuperscript𝒫fine|{\mathcal{P}}^{\rm fine}|\times|{\mathcal{P}}^{\rm fine}| covariance matrixwhose entries are covariancesbetween test points 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine}.
|
| 38 |
+
|
| 39 |
+
(b) Generative process of fine-grained target data:We model a generative processfor the fine-grained target data 𝒛𝒛z.Let z(𝒙)𝑧𝒙z({\mbox{\boldmath$x$}}) bea noise-free latent functionfor the fine-grained target dataat location 𝒙𝒙x.We assume that z(𝒙)𝑧𝒙z({\mbox{\boldmath$x$}}) follows a Gaussian process,𝒛(𝒙)∼𝒢𝒫(m(𝒙),k(𝒙,𝒙′))similar-to𝒛𝒙𝒢𝒫𝑚𝒙𝑘𝒙superscript𝒙′{\mbox{\boldmath$z$}}({\mbox{\boldmath$x$}})\sim\mathcal{GP}(m({\mbox{\boldmath$x$}}),k({\mbox{\boldmath$x$}},{\mbox{\boldmath$x$}}^{\prime})),with mean function m(𝒙)=∑s∈𝒮wsfs(𝒙)+w0𝑚𝒙subscript𝑠𝒮subscript𝑤𝑠subscript𝑓𝑠𝒙subscript𝑤0m({\mbox{\boldmath$x$}})=\sum_{s\in{\mathcal{S}}}w_{s}f_{s}({\mbox{\boldmath$x$}})+w_{0},where ws∈ℝsubscript𝑤𝑠ℝw_{s}\in{\mathbb{R}} and w0∈ℝsubscript𝑤0ℝw_{0}\in{\mathbb{R}} arethe regression coefficient of the s𝑠sth auxiliary data set and the bias parameter, respectively.The covariance function k(𝒙,𝒙′)𝑘𝒙superscript𝒙′k({\mbox{\boldmath$x$}},{\mbox{\boldmath$x$}}^{\prime})is a squared-exponential kernelwith the scale parameter γ𝛾\gamma and signal variance α2superscript𝛼2\alpha^{2}.Given the predictive values for the auxiliary data sets from (2),the conditional distribution of 𝒛𝒛z at the centroids 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine} is given byp(𝒛∣𝐅∗)=𝒩(𝒛∣𝐅∗𝒘,𝐊),𝑝conditional𝒛superscript𝐅𝒩conditional𝒛superscript𝐅∗𝒘𝐊p({\mbox{\boldmath$z$}}\mid{\bf F}^{*})={\mathcal{N}}({\mbox{\boldmath$z$}}\mid{\bf F}^{\ast}{\mbox{\boldmath$w$}},{\bf K}),(3)where 𝒘=(w0,…,w|𝒮|)⊤𝒘superscriptsubscript𝑤0…subscript𝑤𝒮top{\mbox{\boldmath$w$}}=(w_{0},\ldots,w_{|{\mathcal{S}}|})^{\top} and 𝐊𝐊{\bf K} isa |𝒫fine|×|𝒫fine|superscript𝒫finesuperscript𝒫fine|{\mathcal{P}}^{\rm fine}|\times|{\mathcal{P}}^{\rm fine}| covariance matrixdefined by k(𝒙,𝒙′)𝑘𝒙superscript𝒙′k({\mbox{\boldmath$x$}},{\mbox{\boldmath$x$}}^{\prime}).Here, we let |𝒮|𝒮|{\mathcal{S}}| be the number of auxiliary data sets.We define the augmented matrix asthe |𝒫fine|×(|𝒮|+1)superscript𝒫fine𝒮1|{\mathcal{P}}^{\rm fine}|\times(|{\mathcal{S}}|+1) matrix𝐅∗=(𝒇1∗,…,𝒇|𝒮|∗,𝟏)superscript𝐅∗superscriptsubscript𝒇1∗…superscriptsubscript𝒇𝒮∗1{\bf F}^{\ast}=({\mbox{\boldmath$f$}}_{1}^{\ast},\ldots,{\mbox{\boldmath$f$}}_{|{\mathcal{S}}|}^{\ast},{\bf 1}),in which 𝟏11 is a column vector of 1’s.This GP-based modeling enables us to consider the spatial correlationin the target data and the auxiliary data sets simultaneously.
|
| 40 |
+
|
| 41 |
+
(c) Generative process of coarse-grained target data:We design a spatial aggregation process to transform the fine-grained target data 𝒛𝒛z into the coarse-grained target data 𝒂𝒂a,in order to encourage consistency between 𝒛𝒛z , which is to be estimated, and the available coarse-grained target data 𝒂𝒂a.In the spatial aggregation process,a value associated with one region in the coarse-grained partition is obtained by aggregating the values in the fine-grained regions contained in the coarse-grained region(see the upper part of Figure 2).Then, 𝒂𝒂a is generated from the following conditional distribution given 𝒛𝒛z,p(𝒂∣𝒛)=𝒩(𝒂∣𝐇𝒛,σ2𝐈),𝑝conditional𝒂𝒛𝒩conditional𝒂𝐇𝒛superscript𝜎2𝐈p({\mbox{\boldmath$a$}}\mid{\mbox{\boldmath$z$}})=\mathcal{N}({\mbox{\boldmath$a$}}\mid{\bf H}{\mbox{\boldmath$z$}},\sigma^{2}{\bf I}),(4)where σ2superscript𝜎2\sigma^{2} isthe noise variance for the coarse-grained target data,and 𝐇𝐇{\bf H} isa |𝒫coar|×|𝒫fine|superscript𝒫coarsuperscript𝒫fine|{\mathcal{P}}^{\rm coar}|\times|{\mathcal{P}}^{\rm fine}| aggregation matrix,whose entries are nonnegative weighting coefficients;the row sum of 𝐇𝐇{\bf H} should equal 1.We set the coefficients in accordance with the property of the target data.For example,in cases where target data are incidences of disease,then the (i,j)𝑖𝑗(i,j)-entry H(i,j)𝐻𝑖𝑗H(i,j) of 𝐇𝐇{\bf H}would be proportional to the population in the intersection of the coarse-grained region i𝑖i and the fine-grained region j𝑗j.In the following, for simplicity,we consider a simple aggregation matrix,in which entry H(i,j)𝐻𝑖𝑗H(i,j) is1/|𝒫ifine|1subscriptsuperscript𝒫fine𝑖1/|{\mathcal{P}}^{\rm fine}_{i}|if the fine-grained region j𝑗j iscontained in the coarse-grained region i𝑖i, and zero otherwise.Here, 𝒫ifinesubscriptsuperscript𝒫fine𝑖{\mathcal{P}}^{\rm fine}_{i} isa subset of 𝒫finesuperscript𝒫fine{\mathcal{P}}^{\rm fine}, all the elements of which are contained in the coarse-grained region i∈𝒫coar𝑖superscript𝒫coari\in{\mathcal{P}}^{\rm coar}.
|
| 42 |
+
|
| 43 |
+
Given the coarse-grained target data 𝒂𝒂a, the auxiliary spatial data sets with centroids {(𝐗s,𝒚s)∣s∈𝒮}conditional-setsubscript𝐗𝑠subscript𝒚𝑠𝑠𝒮\{({\bf X}_{s},{\mbox{\boldmath$y$}}_{s})\mid s\in{\mathcal{S}}\},the centroids of fine-grained partition 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine} and the aggregation matrix 𝐇𝐇{\bf H}, we aim to predict the fine-grained target data 𝒛𝒛zvia a Bayesian inference procedure.In order to calculatethe predictive distribution of 𝒛𝒛z,we need to estimate the model parameters.The problem of estimating the model parameters can be divided into two steps:1) Estimate hyperparameters αs,γs,σssubscript𝛼𝑠subscript𝛾𝑠subscript𝜎𝑠\alpha_{s},\gamma_{s},\sigma_{s}for each auxiliary data setand 2) estimate regression coefficient 𝒘𝒘wand hyperparameters α,γ,σ𝛼𝛾𝜎\alpha,\gamma,\sigmafor the target data.Although one could also opt for estimating all the model parameterssimultaneously (i.e., one-step inference),it will increase the computational cost of inference drastically;we adopt the efficient two-step inference as described in the following paragraphs.We finally constructthe predictive distribution of 𝒛𝒛zby using the estimated parameters.Details of the inference procedure are shown in Algorithm 1.
|
| 44 |
+
|
| 45 |
+
The first inference step:Given the s𝑠sth auxiliary spatial data set with centroids (𝐗s,𝒚s)subscript𝐗𝑠subscript𝒚𝑠({\bf X}_{s},{\mbox{\boldmath$y$}}_{s}),the marginal likelihood of 𝒚ssubscript𝒚𝑠{\mbox{\boldmath$y$}}_{s} is given byp(𝒚s|αs,γs,σs)=𝒩(𝒚s|0,𝐊s+σs2𝐈).𝑝conditionalsubscript𝒚𝑠subscript𝛼𝑠subscript𝛾𝑠subscript𝜎𝑠𝒩conditionalsubscript𝒚𝑠0subscript𝐊𝑠superscriptsubscript𝜎𝑠2𝐈p({\mbox{\boldmath$y$}}_{s}|\alpha_{s},\gamma_{s},\sigma_{s})={\mathcal{N}}({\mbox{\boldmath$y$}}_{s}|0,{\bf K}_{s}+\sigma_{s}^{2}{\bf I}).(5)The hyperparameters αs,γs,σssubscript𝛼𝑠subscript𝛾𝑠subscript𝜎𝑠\alpha_{s},\gamma_{s},\sigma_{s} are estimatedby maximizing the logarithm of (5).We solve the optimization problem through the use of the BFGS method (?).By solving the optimization problem for each auxiliary data set independently,we obtain the set of the estimated hyperparameters for all auxiliary data sets.The predictive distribution of 𝒇s∗superscriptsubscript𝒇𝑠∗{\mbox{\boldmath$f$}}_{s}^{\ast} corresponding to (2) is obtained using the estimated hyperparameters.
|
| 46 |
+
|
| 47 |
+
The second inference step:Given the coarse-grained target data 𝒂𝒂aand the centroids of fine-grained partition 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine},the marginal likelihood of 𝒂𝒂a is given byp(𝒂∣𝒘,α,γ,σ)𝑝conditional𝒂𝒘𝛼𝛾𝜎\displaystyle p({\mbox{\boldmath$a$}}\mid{\mbox{\boldmath$w$}},\alpha,\gamma,\sigma)=∫∫p(𝒂∣𝒛)p(𝒛∣𝐅∗)∏s∈𝒮p(𝒇s∗)d𝐅∗d𝒛absent𝑝conditional𝒂𝒛𝑝conditional𝒛superscript𝐅∗subscriptproduct𝑠𝒮𝑝superscriptsubscript𝒇𝑠∗𝑑superscript𝐅∗𝑑𝒛\displaystyle=\int\int p({\mbox{\boldmath$a$}}\mid{\mbox{\boldmath$z$}})p({\mbox{\boldmath$z$}}\mid{\bf F}^{\ast})\prod_{s\in{\mathcal{S}}}p({\mbox{\boldmath$f$}}_{s}^{\ast})d{\bf F}^{\ast}d{\mbox{\boldmath$z$}}=∫∫𝒩(𝒂∣𝐇𝒛,σ2𝐈)𝒩(𝒛∣𝐅∗𝒘,𝐊)absent𝒩conditional𝒂𝐇𝒛superscript𝜎2𝐈𝒩conditional𝒛superscript𝐅∗𝒘𝐊\displaystyle=\int\int{\mathcal{N}}\left({\mbox{\boldmath$a$}}\mid{\bf H}{\mbox{\boldmath$z$}},\sigma^{2}{\bf I}\right){\mathcal{N}}\left({\mbox{\boldmath$z$}}\mid{\bf F}^{\ast}{\mbox{\boldmath$w$}},{\bf K}\right)×∏s∈𝒮𝒩(𝒇s∗∣𝒇s∗¯,𝚺s∗)d𝐅∗d𝒛\displaystyle\quad\quad\quad\times\prod_{s\in{\mathcal{S}}}{\mathcal{N}}\left({\mbox{\boldmath$f$}}_{s}^{\ast}\mid\bar{{\mbox{\boldmath$f$}}_{s}^{\ast}},{\mbox{\boldmath$\Sigma$}}_{s}^{\ast}\right)d{\bf F}^{\ast}d{\mbox{\boldmath$z$}}=𝒩(𝒂∣𝐇𝐅¯∗𝒘,𝚲),absent𝒩conditional𝒂𝐇superscript¯𝐅∗𝒘𝚲\displaystyle={\mathcal{N}}\left({\mbox{\boldmath$a$}}\mid{\bf H}\bar{{\bf F}}^{\ast}{\mbox{\boldmath$w$}},{\mbox{\boldmath$\Lambda$}}\right),(6)where𝐅¯∗=(𝒇1∗¯,…,𝒇¯|𝒮|∗,𝟏)superscript¯𝐅∗¯superscriptsubscript𝒇1∗…subscriptsuperscript¯𝒇∗𝒮1\bar{{\bf F}}^{\ast}=(\bar{{\mbox{\boldmath$f$}}_{1}^{\ast}},\ldots,\bar{{\mbox{\boldmath$f$}}}^{\ast}_{|{\mathcal{S}}|},{\bf 1})is a |𝒫fine|×(|𝒮|+1)superscript𝒫fine𝒮1|{\mathcal{P}}^{\rm fine}|\times(|{\mathcal{S}}|+1) matrix,and we analytically integrate out the latent variables 𝐅∗superscript𝐅∗{\bf F}^{\ast} and 𝒛𝒛zwith the help of the conjugacyof the distributions (2), (3),and (4).𝚲𝚲\Lambda is a |𝒫coar|×|𝒫coar|superscript𝒫coarsuperscript𝒫coar|{\mathcal{P}}^{\rm coar}|\times|{\mathcal{P}}^{\rm coar}|covariance matrix represented by𝚲=σ2𝐈+𝐇𝛀𝐇⊤𝚲superscript𝜎2𝐈𝐇𝛀superscript𝐇top{\mbox{\boldmath$\Lambda$}}=\sigma^{2}{\bf I}+{\bf H}{\bf\Omega}{\bf H}^{\top},where 𝛀=𝐊+∑s∈𝒮ws2𝚺s∗𝛀𝐊subscript𝑠𝒮superscriptsubscript𝑤𝑠2superscriptsubscript𝚺𝑠∗{\bf\Omega}={\bf K}+\sum_{s\in{\mathcal{S}}}w_{s}^{2}{\mbox{\boldmath$\Sigma$}}_{s}^{\ast}.The (i,i′)𝑖superscript𝑖′(i,i^{\prime})-entry Λ(i,i′)Λ𝑖superscript𝑖′\Lambda(i,i^{\prime}) of 𝚲𝚲\Lambdais shown in (7).
|
| 48 |
+
|
| 49 |
+
Here,δ∙,∙subscript𝛿∙∙\delta_{\bullet,\bullet} in (7) represents Kronecker delta;δA,B=1subscript𝛿𝐴𝐵1\delta_{A,B}=1 if A=B𝐴𝐵A=B, and δA,B=0subscript𝛿𝐴𝐵0\delta_{A,B}=0 otherwise.The residual variance term in (7) representsthe residual variance in the regression of z(𝒙j)𝑧subscript𝒙𝑗z({\mbox{\boldmath$x$}}_{j}).This term containsthe uncertainty in the prediction of fs(𝒙j)subscript𝑓𝑠subscript𝒙𝑗f_{s}({\mbox{\boldmath$x$}}_{j}),i.e., Σs∗(j,j)superscriptsubscriptΣ𝑠∗𝑗𝑗\Sigma_{s}^{\ast}(j,j),which is weighted by ws2superscriptsubscript𝑤𝑠2w_{s}^{2}.The spatial correlation term in (7) representsthe strength of spatial correlationbetween z(𝒙j)𝑧subscript𝒙𝑗z({\mbox{\boldmath$x$}}_{j}) and z(𝒙j′)𝑧subscript𝒙superscript𝑗′z({\mbox{\boldmath$x$}}_{j^{\prime}}).This term containsthe covariance between fs(𝒙j)subscript𝑓𝑠subscript𝒙𝑗f_{s}({\mbox{\boldmath$x$}}_{j}) and fs(𝒙j′)subscript𝑓𝑠subscript𝒙superscript𝑗′f_{s}({\mbox{\boldmath$x$}}_{j^{\prime}}),i.e., Σs∗(j,j′)superscriptsubscriptΣ𝑠∗𝑗superscript𝑗′\Sigma_{s}^{\ast}(j,j^{\prime}), which is weighted by ws2superscriptsubscript𝑤𝑠2w_{s}^{2}.On the basis of the marginal likelihood (6)with this covariance matrix 𝚲𝚲{\bf\Lambda},our model can effectively learn the regression coefficient 𝒘𝒘wwhile taking into consideration the prediction uncertainties and the spatial correlations from the auxiliary data sets with various granularities, simultaneously.The parameter 𝒘𝒘w and the hyperparameters α𝛼\alpha, γ𝛾\gamma, σ𝜎\sigmaare estimated by maximizingthe logarithm of (6).We solve the optimization problem by using the BFGS method (?).The derivatives of the logarithm of (6)with respect to wssubscript𝑤𝑠w_{s}, α𝛼\alpha, γ𝛾\gamma, σ𝜎\sigma are describedin Appendix A.
|
| 50 |
+
|
| 51 |
+
Predictive distribution of fine-grained target data:Using the estimated model parameters, the predictive distribution of the fine-grained target data 𝒛𝒛z is given byp(𝒛∗)=𝒩(𝒛∗∣𝒛¯∗,cov(𝒛∗)),𝑝superscript𝒛∗𝒩conditionalsuperscript𝒛∗superscript¯𝒛∗covsuperscript𝒛∗p({\mbox{\boldmath$z$}}^{\ast})={\mathcal{N}}\left({\mbox{\boldmath$z$}}^{\ast}\mid\bar{{\mbox{\boldmath$z$}}}^{\ast},{\rm cov}({\mbox{\boldmath$z$}}^{\ast})\right),(8)where𝒛¯∗=𝐅¯∗𝒘+𝛀𝐇⊤𝚲−1(𝒂−𝐅¯∗𝒘)superscript¯𝒛∗superscript¯𝐅∗𝒘𝛀superscript𝐇topsuperscript𝚲1𝒂superscript¯𝐅∗𝒘\bar{{\mbox{\boldmath$z$}}}^{\ast}=\bar{{\bf F}}^{\ast}{\mbox{\boldmath$w$}}+{\mbox{\boldmath$\Omega$}}{\bf H}^{\top}{\mbox{\boldmath$\Lambda$}}^{-1}({\mbox{\boldmath$a$}}-\bar{{\bf F}}^{\ast}{\mbox{\boldmath$w$}})is the predictive means,and wherecov(𝒛∗)=𝛀−𝛀𝐇⊤𝚲−1𝐇𝛀covsuperscript𝒛∗𝛀𝛀superscript𝐇topsuperscript𝚲1𝐇𝛀{\rm cov}({\mbox{\boldmath$z$}}^{\ast})={\mbox{\boldmath$\Omega$}}-{\mbox{\boldmath$\Omega$}}{\bf H}^{\top}{\mbox{\boldmath$\Lambda$}}^{-1}{\bf H}{\mbox{\boldmath$\Omega$}}is the covariance matrix.We can obtain the refinement results, i.e., the estimated fine-grained target data, by using the predictive means 𝒛¯∗superscript¯𝒛∗\bar{{\mbox{\boldmath$z$}}}^{\ast}.By analyzing the covariance matrix cov(𝒛∗)covsuperscript𝒛∗{\rm cov}({\mbox{\boldmath$z$}}^{\ast}), we can also evaluate the confidence of the refinement results.
|
| 52 |
+
|
| 53 |
+
Data description:We evaluated the proposed modelusing real-world spatial data sets from NYC Open Data 111https://opendata.cityofnewyork.us.There are 44 data sets that containa variety of categoriessuch as social indicators, land use, air quality and taxi traffic.Each data set is associatedwith one of six geographical partitions, i.e.,school district (32), UHF42 (42), community district (59),police precinct (77), zip code (186) and taxi zone (249),where each number in parenthesis denotes the number of regions in the corresponding partition.In our experiments, we try to refine the poverty rate data set and the five air pollution data sets (i.e., PM2.5, ozone, formaldehyde, benzene, elemental carbon).The experimental setting is as follows:1) Given the poverty rate data set with the borough partition (|𝒫coar|=5superscript𝒫coar5|{\mathcal{P}}^{\rm coar}|=5),we would like to refine the data into the community district partition (|𝒫fine|=59superscript𝒫fine59|{\mathcal{P}}^{\rm fine}|=59),and 2) given each air pollution data set with the borough partition (|𝒫coar|=5superscript𝒫coar5|{\mathcal{P}}^{\rm coar}|=5),we aim to refine the data into the UHF42 partition (|𝒫fine|=42superscript𝒫fine42|{\mathcal{P}}^{\rm fine}|=42).Appendix B details the data sets and the experimental settings.
|
| 54 |
+
|
| 55 |
+
Baselines:The existing methods can be applied to auxiliary data sets with various granularitiesif pre-processing is applied, i.e., spatial interpolation,so that the granularities of the auxiliary data setsmatch with that of the fine-grained target data.Accordingly,we first performedspatial interpolationof each auxiliary data set 𝒚ssubscript𝒚𝑠{\mbox{\boldmath$y$}}_{s} by using GP regression;we then obtainedthe predictive values 𝒇s∗¯¯subscriptsuperscript𝒇∗𝑠\bar{{\mbox{\boldmath$f$}}^{\ast}_{s}}at the centroids 𝐗finesuperscript𝐗fine{\bf X}^{\rm fine}of the target fine-grained partitionso that the spatial granularities of all auxiliary data sets equaled that of the fine-grained target data.We compared the proposed modelwith three baselines:GP regression (GPR) (?),Linear regression-based method (LR-based method) (?)and Two-stage statistical downscaling method (2-stage SD) (?).Here, GPR is a simple spatial interpolation,namely, it predicts the fine-grained target data 𝒛𝒛zby using only the coarse-grained target data 𝒂𝒂a.Details of these baselines are given in Appendix C.
|
| 56 |
+
|
| 57 |
+
Fine-grained target data prediction:We evaluated our model in terms of its performance in predicting fine-grained target data 𝒛𝒛z.The evaluation metric is the mean absolute percentage error (MAPE)in fine-grained target values:L=1|𝒫fine|∑j∈𝒫fine|zjtrue−zj∗zjtrue|𝐿1superscript𝒫finesubscript𝑗superscript𝒫finesubscriptsuperscript𝑧true𝑗superscriptsubscript𝑧𝑗∗subscriptsuperscript𝑧true𝑗L=\frac{1}{|{\mathcal{P}}^{\rm fine}|}\sum_{j\in{\mathcal{P}}^{\rm fine}}\left|\frac{z^{\rm true}_{j}-z_{j}^{\ast}}{z^{\rm true}_{j}}\right|,where zjtruesubscriptsuperscript𝑧true𝑗z^{\rm true}_{j} is the true value associated with region j𝑗j in the target fine-grained partition;zj∗superscriptsubscript𝑧𝑗∗z_{j}^{\ast} is its predicted value.Table 2 showsthe MAPE and the standard error of absolute percentage errorfor the proposed model, 2-stage SD, LR-based method and GPR.For all data sets,our model performed better than the baselines, and the differences between our model and the baselines are statistically significant (Student’s t-test).In Table 2,the single star (⋆⋆\star) and the double star (⋆⋆⋆⋆\star\star) indicate significant difference at the levels of P<0.05𝑃0.05P<0.05 and P<0.01𝑃0.01P<0.01, respectively.We found similar results using other evaluation metrics (e.g., MAE, RMSE, RMSPE).These results show that our model well utilized the auxiliary data sets with various granularities to accurately predict the fine-grained target data.
|
| 58 |
+
|
| 59 |
+
Figures 3 and 4 visualizethe predicted fine-grained target data 𝒛𝒛zfor the PM2.5 data set and for the poverty rate data set, respectively.We illustrate the true fine-grained dataon the left in Figures 3 and 4,and the predictions made by the proposed model,2-stage SD and LR-based method on the right.Here, the predictive values of each method were normalizedto the range [0,1]01[0,1],and darker hues represent regions with higher values.As shown in these figures,our model refinedthe coarse-grained data more precisely than the other methods.In particular, in both data sets,our model achieved significant improvementin the north part of the map (i.e., Manhattan).Such visualization results are usefulfor finding key regions, e.g., the poorest regions of a city.
|
| 60 |
+
|
| 61 |
+
Evaluation of auxiliary spatial data sets:Table 3 showsthe top ten relevant auxiliary data sets as determinedby our model and 2-stage SD for the PM2.5 data set.These auxiliary data sets are arrangedin descending order of the absolute values ofthe estimated regression coefficient 𝒘𝒘w,each of which is listed in the “wssubscript𝑤𝑠w_{s}” columns of Table 3.By comparing the sorted list of the auxiliary data setscreated by the proposed modelwith that yielded by 2-stage SD,we can confirm thatthe proposed model assigned relatively large regression coefficients to the auxiliary data sets with finer-grained partitions (i.e., Zip code and Taxi zone).
|
| 62 |
+
|
| 63 |
+
Figures 5 and 6 visualizethe top two relevant auxiliary data setsas estimated by our model and 2-stage SDfor the PM2.5 data set, respectively.Comparing these visualizations with that of the true target data in Figure 3(a)shows that our model emphasized the most useful auxiliary data sets, i.e., those that are both strongly related with the target data and have fine granularities;2-stage SD evaluated the usefulness of auxiliary data setsonly in terms of the strength of relationshipsbetween the target data and the auxiliary data sets in the coarse-grained partition.
|
| 64 |
+
|
| 65 |
+
Figure 7 shows the relation between the regression coefficient and the uncertainty in the prediction of auxiliary data setsestimated by the proposed model for the PM2.5 data set.In this figure,each auxiliary data set is depictedby a dot whose color indicates its partition.The horizontal axis shows the averages of the variances in the predicted values of each auxiliary data set;for the s𝑠sth auxiliary data set,the average of variances was calculated by (1/|𝒫fine|)∑j∈𝒫fineΣs∗(j,j)1superscript𝒫finesubscript𝑗superscript𝒫finesuperscriptsubscriptΣ𝑠∗𝑗𝑗(1/|{\mathcal{P}}^{\rm fine}|)\sum_{j\in{\mathcal{P}}^{\rm fine}}\Sigma_{s}^{\ast}(j,j),which is the degree of uncertainty in predicting the s𝑠sth auxiliary data set;the vertical axis showsthe absolute values of the estimated coefficients.As shown,the absolute coefficient valuesestimated by our model were likely to be higher for the auxiliary data sets that had lower degrees of uncertainty.These results indicate that our model can effectively learn the usefulness of each auxiliary data set by considering the uncertaintyin the prediction of auxiliary data sets.Consequently,the proposed model can precisely refine the coarse-grained target data by effectively utilizing auxiliary data sets with various granularities.
|
| 66 |
+
|
| 67 |
+
This paper has proposed a probabilistic modelfor refining coarse-grained spatial databy utilizing auxiliary spatial data setswith various granularities on the same region.Our model can effectively make use of auxiliary data setswith various granularities by hierarchically incorporating Gaussian processes.Our model also has the advantage of allowingthe inference of model parameters based on the exact marginal likelihood,in which the variables of fine-grained target and auxiliary data are analyticallyintegrated out.Using multiple real-world spatial data sets in New York City,we confirmed that our model can predict the fine-grained target datamore precisely compared with the baselines.
|
| 68 |
+
|
| 69 |
+
Our future work is to consider shapes of regions as in the previous study (?):The assumption of using the centroid of each regionallows for GP-based formulationsand significantly simplifying computations involved;meanwhile, it might worsen the fit of the GPto the exotic shaped regions (e.g., extremely elongated).Another future work is to incorporatefully Bayesian treatment for model parameters.It can be expected to provide the better results.
|
1809.08151v4.txt
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
In the stochastic Multi Armed Bandit problem (MAB), a single player sequentially takes a decision (or “pulls an arm”) amongst a finite set of possibilities [K]≔{1,…,K}≔delimited-[]𝐾1…𝐾[K]\coloneqq\{1,\ldots,K\}. After pulling arm k∈[K]𝑘delimited-[]𝐾k\in[K] at stage t∈ℕ∗𝑡superscriptℕt\in\mathds{N}^{*}, the player receives a random reward Xk(t)∈[0,1]subscript𝑋𝑘𝑡01X_{k}(t)\in[0,1], drawn i.i.d. according to some unknown distribution νksubscript𝜈𝑘\nu_{k} of expectation μk≔𝔼[Xk(t)]≔subscript𝜇𝑘𝔼delimited-[]subscript𝑋𝑘𝑡\mu_{k}\coloneqq\mathds{E}[X_{k}(t)]. Her objective is to maximize her cumulative reward up to stage T∈ℕ∗𝑇superscriptℕT\in\mathds{N}^{*}. This sequential decision problem, first introduced for clinical trials [27, 25], involves an “exploration/exploitation dilemma” where the player must trade-off acquiring vs. using information. The performance of an algorithm is controlled in term of regret, the difference of the cumulated reward of an optimal algorithm knowing the distributions (νk)k∈[K]subscriptsubscript𝜈𝑘𝑘delimited-[]𝐾(\nu_{k})_{k\in[K]} beforehand and the cumulated reward of the player. It is known that any “reasonable” algorithm must incur at least a logarithmic regret [19], which is attained by some existing algorithms such as ucb [1, 4].
|
| 2 |
+
|
| 3 |
+
MAB has been recently popularized thanks to its applications to online recommendation systems. Many different variants of MAB and classes of algorithms have thus emerged in the recent years [see 11]. In particular, they have been considered for cognitive radios [16], where the problem gets more intricate as multiple users are involved and they collide if they pull the same arm k𝑘k at the same time t𝑡t, i.e., they transmit on the same channel. If this happens, they all receive 00 as a reward instead of Xk(t)subscript𝑋𝑘𝑡X_{k}(t), meaning that no message is transmitted.
|
| 4 |
+
|
| 5 |
+
If a central agent controls simultaneously all players’ behavior then a tight lower bound is known [3, 18]. Yet this centralized problem is not adapted to cognitive radios, as it allows communication between players at each time step; in practice, this induces significant costs in both energy and time. As a consequence, most of the current interest lies in the decentralized case [20, 2, 5], which presents another complication due to the feedback. Besides the received reward, an additional piece of information may be observed at each time step. When this extra observation is the collision indicator, Rosenski et al. [26] provided two algorithms for both a fixed and a varying number of players. They are based on a Musical Chairs procedure that quickly assigns players to different arms.Besson and Kaufmann [8] provided an efficient UCB-based algorithm if Xk(t)subscript𝑋𝑘𝑡X_{k}(t) is observed instead111We stress that Xk(t)subscript𝑋𝑘𝑡X_{k}(t) does not necessarily correspond to the received reward in case of collision..Lugosi and Mehrabian [21] recently proposed an algorithm using no additional information. The performances of these algorithms and the underlying model differences are summarized in Table 1, Section 1.1.
|
| 6 |
+
|
| 7 |
+
The first non trivial lower bound for this problem has been recently improved [20, 8]. These lower bounds suggest that decentralization adds to the regret a multiplicative factor M,𝑀M, the number of players, compared to the centralized case [3].Interestingly, these lower bounds scale linearly with the inverse of the gaps between the μksubscript𝜇𝑘\mu_{k} whereas this scaling is quadratic for most of the existing algorithms.This is due to the fact that although collisions account for most of the regret, lower bounds are proved without considering them.
|
| 8 |
+
|
| 9 |
+
Although it is out of our scope, the heterogeneous model introduced by Kalathil et al. [17] is worth mentioning. In this case, the reward distribution depends on each user [6, 7]. An algorithm reaching the optimal allocation without explicit communication between the players was recently proposed [9].
|
| 10 |
+
|
| 11 |
+
Our main contributions are the following:
|
| 12 |
+
|
| 13 |
+
When collisions are observed, we introduce a new decentralized algorithm that is “hacking” the setting and induces communication between players through deliberate collisions. The regret of this algorithm reaches asymptotically (up to some universal constant) the lower bound of the centralized problem, meaning that the aforementioned lower bounds are unfortunately incorrect.
|
| 14 |
+
|
| 15 |
+
This algorithm relies on the unrealistic assumption that all users start transmitting at the very same time. It also explains why the current literature fails to provide near optimal results for the multiplayer bandits. It therefore appears that the assumption of synchronization has to be removed for practical application of the multiplayer bandits problem. On the other hand, this technique also shows that exhibiting lower bounds in multi-player MAB is more complex than in stochastic standard MAB.
|
| 16 |
+
|
| 17 |
+
Without synchronization or collision observations, we propose the first algorithm with a logarithmic regret. The dependencies in the gaps between rewards yet become quadratic.
|
| 18 |
+
|
| 19 |
+
In this section, we introduce different models of multiplayer MAB with a known number of arms K𝐾K but an unknown number of players M≤K𝑀𝐾M\leq K. The horizon T𝑇T is assumed known to the players (for simplicity of exposure, as the anytime generalization of results is now well understood [14]). At each time step t∈[T]𝑡delimited-[]𝑇t\in[T], given their (private) information, all players j∈[M]𝑗delimited-[]𝑀j\in[M] simultaneously pull the arms πj(t)superscript𝜋𝑗𝑡\pi^{j}(t) and receive the reward rj(t)∈[0,1]superscript𝑟𝑗𝑡01r^{j}(t)\in[0,1] such thatrj(t)≔Xπj(t)(t)(1−ηπj(t)(t)), where ηπj(t)(t) is the collision indicator defined by≔superscript𝑟𝑗𝑡subscript𝑋superscript𝜋𝑗𝑡𝑡1subscript𝜂superscript𝜋𝑗𝑡𝑡 where subscript𝜂superscript𝜋𝑗𝑡𝑡 is the collision indicator defined by\displaystyle r^{j}(t)\coloneqq X_{\pi^{j}(t)}(t)(1-\eta_{\pi^{j}(t)}(t)),\text{ where }\eta_{\pi^{j}(t)}(t)\text{ is the collision indicator defined by }ηk(t)≔𝟙#Ck(t)>1 with Ck(t)≔{j∈[M]|πj(t)=k}.formulae-sequence≔subscript𝜂𝑘𝑡subscript1#subscript𝐶𝑘𝑡1 with ≔subscript𝐶𝑘𝑡conditional-set𝑗delimited-[]𝑀superscript𝜋𝑗𝑡𝑘\displaystyle\eta_{k}(t)\coloneqq\mathds{1}_{\#C_{k}(t)>1}\qquad\text{ with }\qquad C_{k}(t)\coloneqq\{j\in[M]\ |\ \pi^{j}(t)=k\}.The problem is centralized if players can communicate any information to each other. In that case, they can easily avoid collisions and share their statistics. In opposition, the problem is decentralized when players have only access to their own rewards and actions.The crucial concept we introduce is (a)synchronization between players. With synchronization, the model is called static.
|
| 20 |
+
|
| 21 |
+
With quasi-asynchronicity222We prefer not to mention asynchronicity as players still use shared discrete time slots., the model is dynamic and several variants already exist [26]. Denote by 𝐌(t)𝐌𝑡\mathbf{M}(t) the set of players in the game at time t𝑡t (unknown but not random) and by μ(n)subscript𝜇𝑛\mu_{(n)} the n𝑛n-th order statistics of μ𝜇\mu, i.e., μ(1)≥μ(2)≥…≥μ(K)subscript𝜇1subscript𝜇2…subscript𝜇𝐾\mu_{(1)}\geq\mu_{(2)}\geq\ldots\geq\mu_{(K)}. The total regret is then defined for both static and dynamic models by:RT≔∑t=1T∑k=1#𝐌(t)μ(k)−𝔼μ[∑t=1T∑j∈𝐌(t)rj(t)].≔subscript𝑅𝑇superscriptsubscript𝑡1𝑇superscriptsubscript𝑘1#𝐌𝑡subscript𝜇𝑘subscript𝔼𝜇delimited-[]superscriptsubscript𝑡1𝑇subscript𝑗𝐌𝑡superscript𝑟𝑗𝑡R_{T}\coloneqq{\sum_{t=1}^{T}}{\sum_{k=1}^{\#\mathbf{M}(t)}}\mu_{(k)}-\mathbb{E}_{\mu}\left[{\sum_{t=1}^{T}}{\sum_{j\in\mathbf{M}(t)}}r^{j}(t)\right].As mentioned in the introduction, different observation settings are considered.Collision Sensing: Player j𝑗j observes ηπj(t)(t)subscript𝜂superscript𝜋𝑗𝑡𝑡\eta_{\pi^{j}(t)}(t) and rj(t)superscript𝑟𝑗𝑡r^{j}(t) at each time step.No sensing:Player j𝑗j only observes rj(t)superscript𝑟𝑗𝑡r^{j}(t), i.e., a reward of 00 can indistinguishably come from a collision with another player or a null statistic Xπj(t)(t)subscript𝑋superscript𝜋𝑗𝑡𝑡X_{\pi^{j}(t)}(t).Notice that as soon as ℙ(Xk=0)=0ℙsubscript𝑋𝑘00\mathbb{P}(X_{k}=0)=0, the No Sensing and Collision Sensing settings are equivalent.The setting where both Xπj(t)subscript𝑋superscript𝜋𝑗𝑡X_{\pi^{j}}(t) and rj(t)superscript𝑟𝑗𝑡r^{j}(t) are observed is also considered in the literature and is called Statistic Sensing [8]. The No Sensing setting is the most difficult one as there is no extra observation.
|
| 22 |
+
|
| 23 |
+
Table 1 below compares the performances of the major algorithms, specifying the precise setting considered for each of them. The second algorithm of Lugosi and Mehrabian [21] and our algorithms also have problem independent bounds that are not mentioned in Table 1 for the sake of clarity. Due to space constraints, adapted sic-mmab, sic-mmab2 and their related results are presented in Appendix C.Note that the two dynamic algorithms in Table 1 rely on different specific assumptions.
|
| 24 |
+
|
| 25 |
+
In this section, we consider the Collision Sensing static model and prove that the decentralized problem is almost as complex, in terms of regret growth, as the centralized one. When players are synchronized, we provide an algorithm with an exploration regret similar to the known centralized lower bound [3]. This algorithm strongly relies on the synchronization assumption, which we leverage to allow communication between players through observed collisions. The communication protocol is detailed and explained in Section 2.2.3.This result also implies that the two lower bounds provided in the literature [8, 20] are unfortunately not correct. Indeed, the factor M𝑀M that was supposed to be the cost of the decentralization in the regret should not appear.
|
| 26 |
+
|
| 27 |
+
Let us now describe our algorithm sic-mmab. It consists of several phases.1.The initialization phase first estimates the number of players and assigns ranks among them.2.Players then alternate between exploration phases and communication phases.(a)During the p𝑝p-th exploration phase, each arm is pulled 2psuperscript2𝑝2^{p} times and its performance is estimated in a Successive Accepts and Rejects fashion [22, 12].(b)During the communication phases, players communicate their statistics to each other using collisions. Afterwards, the updated common statistics are known to all players.3.The last phase, the exploitation one, is triggered for a player as soon as an arm is detected as optimal and assigned to her. This player then pulls this arm until the final horizon T𝑇T.
|
| 28 |
+
|
| 29 |
+
Players that are not in the exploitation phase are called active. We denote, with a slight abuse of notation, by [Mp]delimited-[]subscript𝑀𝑝[M_{p}] the set of active players during the p𝑝p-th phase of exploration-communication and by Mp≤Msubscript𝑀𝑝𝑀M_{p}\leq M its cardinality. Notice that Mpsubscript𝑀𝑝M_{p} is non increasing because players never leave the exploitation phase. Any arm among the top-M𝑀M ones is called optimal and any other arm is sub-optimal. Arms that still need to be explored (players cannot determine whether they are optimal or sub-optimal yet) are active. We denote, with the same abuse of notation, the set of active arms by [Kp]delimited-[]subscript𝐾𝑝[K_{p}] of cardinality Kp≤Ksubscript𝐾𝑝𝐾K_{p}\leq K. By construction of our algorithm, this set is common to all active players at each stage.
|
| 30 |
+
|
| 31 |
+
Our algorithm is based on a protocol called sequential hopping [15]. It consists of incrementing the index of the arm pulled by a specific player: if she plays arm πtksuperscriptsubscript𝜋𝑡𝑘\pi_{t}^{k} at time t𝑡t, she will play πt+1k=πtk+1 (mod [Kp])\pi_{t+1}^{k}=\pi_{t}^{k}+1\text{ (mod }[K_{p}]) at time t+1𝑡1t+1 during the p𝑝p-th exploration phase.
|
| 32 |
+
|
| 33 |
+
As mentioned above, the sic-mmab algorithm consists of several phases. During the communication phase, players communicate with each other. At the end of this phase, each player thus knows the statistics of all players on all arms, so that this decentralized problem becomes similar to the centralized one.After alternating enough times between exploration and communication phases, sub-optimal arms are eliminated and players are fixed to different optimal arms and will exploit them until stage T𝑇T. The complete pseudocode of sic-mmab is given in Algorithm 1, Appendix A.1.
|
| 34 |
+
|
| 35 |
+
The objective of the first phase is to estimate the number of players M𝑀M and to assign internal ranks to players. First, players follow the Musical Chairs algorithm [26], described in Pseudocode 4, Appendix A.1, during T0≔⌈Klog(T)⌉≔subscript𝑇0𝐾𝑇T_{0}\coloneqq\lceil K\log(T)\rceil steps in order to reach an orthogonal setting, i.e., a position where they are all pulling different arms. The index of the arm pulled by a player at stage T0subscript𝑇0T_{0} will then be her external rank.
|
| 36 |
+
|
| 37 |
+
The second procedure, given by Pseudocode 5 in Appendix A.1, determines M𝑀M and assigns a unique internal rank in [M]delimited-[]𝑀[M] to each player. For example, if there are three players on arms 555, 777 and 222 at t=T0𝑡subscript𝑇0t=T_{0}, their external ranks are 555, 777 and 222 respectively, while their internal ranks are 222, 333 and 111.Roughly speaking, the players follow each other sequentially hopping through all the arms so that players with external ranks k𝑘k and k′superscript𝑘′k^{\prime} collide exactly after a time k+k′𝑘superscript𝑘′k+k^{\prime}. Each player then deduces M𝑀M and her internal rank from observed collisions during this procedure that lasts 2K2𝐾2K steps.
|
| 38 |
+
|
| 39 |
+
In the next phases, active players will always know the set of active players [Mp]delimited-[]subscript𝑀𝑝[M_{p}]. This is how the initial symmetry among players is broken and it allows the decentralized algorithm to establish communication protocols.
|
| 40 |
+
|
| 41 |
+
During the p𝑝p-th exploration phase, active players sequentially hop among the active arms for Kp2psubscript𝐾𝑝superscript2𝑝K_{p}2^{p} steps. Any active arm is thus pulled 2psuperscript2𝑝2^{p} times by each active player. Using their internal rank, players start and remain in an orthogonal setting during the exploration phase, which is collision-free.
|
| 42 |
+
|
| 43 |
+
We denote by Bs=3log(T)2ssubscript𝐵𝑠3𝑇2𝑠B_{s}=3\sqrt{\frac{\log(T)}{2s}} the error bound after s𝑠s pulls and by Tk(p)subscript𝑇𝑘𝑝T_{k}(p) (resp. Sk(p)subscript𝑆𝑘𝑝S_{k}(p)) the centralized number of pulls (resp. sum of rewards) for the arm k𝑘k during the p𝑝p first exploration phases, i.e., Tk(p)=∑j=1MTkj(p)subscript𝑇𝑘𝑝superscriptsubscript𝑗1𝑀superscriptsubscript𝑇𝑘𝑗𝑝T_{k}(p)=\sum_{j=1}^{M}T_{k}^{j}(p) where Tkj(p)superscriptsubscript𝑇𝑘𝑗𝑝T_{k}^{j}(p) is the number of pulls for the arm k𝑘k by player j𝑗j during the p𝑝p first exploration phases. During the communication phase, quantized rewards S~kj(p)superscriptsubscript~𝑆𝑘𝑗𝑝\widetilde{S}_{k}^{j}(p) will be communicated between active players as described in Section 2.2.3.
|
| 44 |
+
|
| 45 |
+
After a succession of two phases (exploration and communication), an arm k𝑘k is accepted if#{i∈[Kp]|μ~k(p)−BTk(p)≥μ~i(p)+BTi(p)}≥Kp−Mp,#conditional-set𝑖delimited-[]subscript𝐾𝑝subscript~𝜇𝑘𝑝subscript𝐵subscript𝑇𝑘𝑝subscript~𝜇𝑖𝑝subscript𝐵subscript𝑇𝑖𝑝subscript𝐾𝑝subscript𝑀𝑝\#\Big{\{}i\in[K_{p}]\,\big{|}\,\widetilde{\mu}_{k}(p)-B_{T_{k}(p)}\geq\widetilde{\mu}_{i}(p)+B_{T_{i}(p)}\Big{\}}\geq K_{p}-M_{p},where μ~k(p)=∑m=1MS~kj(p)Tk(p)subscript~𝜇𝑘𝑝superscriptsubscript𝑚1𝑀superscriptsubscript~𝑆𝑘𝑗𝑝subscript𝑇𝑘𝑝\widetilde{\mu}_{k}(p)=\frac{\sum_{m=1}^{M}\widetilde{S}_{k}^{j}(p)}{T_{k}(p)} is the centralized quantized empirical mean of the arm k𝑘k333For a player j𝑗j already exploiting since the pjsuperscript𝑝𝑗p^{j}-th phase, we instead use the last statistic S~kj(p)=S~kj(pj)superscriptsubscript~𝑆𝑘𝑗𝑝superscriptsubscript~𝑆𝑘𝑗superscript𝑝𝑗\widetilde{S}_{k}^{j}(p)=\widetilde{S}_{k}^{j}(p^{j})., which is an approximation of μ^k(p)=Sk(p)Tk(p)subscript^𝜇𝑘𝑝subscript𝑆𝑘𝑝subscript𝑇𝑘𝑝\hat{\mu}_{k}(p)=\frac{S_{k}(p)}{T_{k}(p)}. This inequality implies that k𝑘k is among the top-Mpsubscript𝑀𝑝M_{p} active arms with high probability. In the same way, k𝑘k is rejected if#{i∈[Kp]|μ~i(p)−BTi(p)≥μ~k(p)+BTk(p)}≥Mp,#conditional-set𝑖delimited-[]subscript𝐾𝑝subscript~𝜇𝑖𝑝subscript𝐵subscript𝑇𝑖𝑝subscript~𝜇𝑘𝑝subscript𝐵subscript𝑇𝑘𝑝subscript𝑀𝑝\#\Big{\{}i\in[K_{p}]\,\big{|}\,\widetilde{\mu}_{i}(p)-B_{T_{i}(p)}\geq\widetilde{\mu}_{k}(p)+B_{T_{k}(p)}\Big{\}}\geq M_{p},meaning that there are at least Mpsubscript𝑀𝑝M_{p} active arms better than k𝑘k with high probability.Notice that each player j𝑗j uses her own quantized statistics S~kj(p)superscriptsubscript~𝑆𝑘𝑗𝑝\widetilde{S}_{k}^{j}(p) to accept/reject an arm instead of the exact ones Skj(p)superscriptsubscript𝑆𝑘𝑗𝑝S_{k}^{j}(p). Otherwise, the estimations μ~k(p)subscript~𝜇𝑘𝑝\widetilde{\mu}_{k}(p) would indeed differ between the players as well as the sets of accepted and rejected arms. With Bernoulli distributions, the quantization becomes unnecessary and the confidence bound can be chosen as Bs=2log(T)/ssubscript𝐵𝑠2𝑇𝑠B_{s}=\sqrt{2\log(T)/s}.
|
| 46 |
+
|
| 47 |
+
In this phase, each active player communicates, one at a time, her statistics of the active arms to all other active players. Each player has her own communicating arm, corresponding to her internal rank. When the player j𝑗j is communicating, she sends a bit at a time step to the player l𝑙l by deciding which arm to pull: a 111 bit is sent by pulling the communicating arm of player l𝑙l (a collision occurs) and a 00 bit by pulling her own arm. The main originality of sic-mmab comes from this trick which allows implicit communication through collisions and is used in subsequent papers [13, 10, 24]. In an independent work, Tibrewal et al. [28] also proposed an algorithm using similar communication protocols for the heterogeneous case.
|
| 48 |
+
|
| 49 |
+
As an arm is pulled 2nsuperscript2𝑛2^{n} times by a single player during the n𝑛n-th exploration phase, it has been pulled 2p+1−1superscript2𝑝112^{p+1}-1 times in total at the end of the p𝑝p-th phase and the statistic Skj(p)superscriptsubscript𝑆𝑘𝑗𝑝S_{k}^{j}(p) is a real number in [0,2p+1−1]0superscript2𝑝11[0,2^{p+1}-1]. Players then send a quantized integer statistic S~kj(p)∈[2p+1−1]superscriptsubscript~𝑆𝑘𝑗𝑝delimited-[]superscript2𝑝11\widetilde{S}_{k}^{j}(p)\in[2^{p+1}-1] to each other in p+1𝑝1p+1 bits, i.e., collisions. Let n=⌊Skj(p)⌋𝑛superscriptsubscript𝑆𝑘𝑗𝑝n=\lfloor S_{k}^{j}(p)\rfloor and d=Skj(p)−n𝑑superscriptsubscript𝑆𝑘𝑗𝑝𝑛d=S_{k}^{j}(p)-n be the integer and decimal parts of Skj(p)superscriptsubscript𝑆𝑘𝑗𝑝S_{k}^{j}(p), the quantized statistic is then n+1𝑛1n+1 with probability d𝑑d and n𝑛n otherwise, so that 𝔼[S~kj(p)]=Skj(p)𝔼delimited-[]superscriptsubscript~𝑆𝑘𝑗𝑝superscriptsubscript𝑆𝑘𝑗𝑝\mathbb{E}[\widetilde{S}_{k}^{j}(p)]=S_{k}^{j}(p).
|
| 50 |
+
|
| 51 |
+
An active player can have three possible statuses during the communication phase:1.either she is receiving some other players’ statistics about the arm k𝑘k. In that case, she proceeds to Receive Protocol (see Pseudocode 1).2.Or she is sending her quantized statistics about arm k𝑘k to player l𝑙l (who is then receiving). In that case, she proceeds to Send Protocol (see Pseudocode 2) to send them in a time p+1𝑝1p+1.3.Or she is pulling her communicating arm, while waiting for other players to finish communicating statistics among them.
|
| 52 |
+
|
| 53 |
+
Communicated statistics are all of length p+1𝑝1p+1, even if they could be sent with shorter messages, in order to maintain synchronization among players. Using their internal ranks, the players can communicate in turn without interfering with each other.The general protocol for each communication phase is described in Pseudocode 3 below.
|
| 54 |
+
|
| 55 |
+
At the end of the communication phase, all active players know the statistics S~kj(p)superscriptsubscript~𝑆𝑘𝑗𝑝\widetilde{S}_{k}^{j}(p) and so which arms to accept or reject. Rejected arms are removed right away from the set of active arms. Thanks to the assigned ranks, accepted arms are assigned to one player each. The remaining active players then update both sets of active players and arms as described in Algorithm 1, line 21.
|
| 56 |
+
|
| 57 |
+
This communication protocol uses the fact that a bit can be sent with a single collision. Without sensing, this can not be done in a single time step, but communication is still somehow possible. A bit can then be sent in log(T)μ(K)𝑇subscript𝜇𝐾\frac{\log(T)}{\mu_{(K)}} steps with probability 1−1T11𝑇1-\frac{1}{T}. Using this trick, two different algorithms relying on communication protocols are proposed in Appendix C for the No Sensing setting.
|
| 58 |
+
|
| 59 |
+
Theorem 1 bounds the expected regret incurred by sic-mmab. Due to space constraints, its proof is delayed to Appendix A.2.
|
| 60 |
+
|
| 61 |
+
The first, second and third terms respectively correspond to the regret incurred by the exploration, initialization and communication phases, which dominate the regret due to low probability events of bad initialization or incorrect estimations. Notice that the minmax regret scales with 𝒪(KTlog(T))𝒪𝐾𝑇𝑇\mathcal{O}(K\sqrt{T\log(T)}).Experiments on synthetic data are described in Appendix A.3. They empirically confirm that sic-mmab scales better than mctopm [8] with the gaps ΔΔ\Delta, besides having a smaller minmax regret.
|
| 62 |
+
|
| 63 |
+
Theorem 1 is in contradiction with the two existing lower bounds [8, 20], however sic-mmab respects the conditions required for both. It was thought that the decentralized lower bound was Ω(M∑k>Mlog(T)μ(M)−μ(k))Ω𝑀subscript𝑘𝑀𝑇subscript𝜇𝑀subscript𝜇𝑘\Omega\left(M\sum_{k>M}\frac{\log(T)}{\mu_{(M)}-\mu_{(k)}}\right), while the centralized lower bound was already known to be Ω(∑k>Mlog(T)μ(M)−μ(k))Ωsubscript𝑘𝑀𝑇subscript𝜇𝑀subscript𝜇𝑘\Omega\left(\sum_{k>M}\frac{\log(T)}{\mu_{(M)}-\mu_{(k)}}\right) [3]. However, it appears that the asymptotic regret of the decentralized case is not that much different from the latter, at least if players are synchronized. Indeed, sic-mmab takes advantage of this synchronization to establish communication protocols as players are able to communicate through collisions. Subsequent papers [10, 24] recently improved the communication protocols of sic-mmab to obtain both initialization and communication costs constant in T𝑇T, confirming that the lower bound of the centralized case is also tight for the decentralized model considered so far.
|
| 64 |
+
|
| 65 |
+
Liu and Zhao [20] proved the lower bound “by considering the best case that they do not collide”. This is only true if colliding does not provide valuable information and the policies just maximize the losses at each round, disregarding the information gathered for the future. Our algorithm is built upon the idea that the value of the information provided by collisions can exceed in the long run the immediate loss in rewards (which is standard in dynamic programming or reinforcement learning for instance).The mistake of Besson and Kaufmann [8] is found in the proof of Lemma 12 after the sentence “We now show that second term in (25) is zero”. The conditional expectation cannot be put inside/outside of the expectation as written and the considered term, which corresponds to the difference of information given by collisions for two different distributions, is therefore not zero. These two lower bounds disregarded the amount of information that can be deduced from collisions, while sic-mmab obviously takes advantage of this information.
|
| 66 |
+
|
| 67 |
+
Our exploration regret reaches, up to a constant factor, the lower bound of the centralized problem [3]. Although it is sub-logarithmic in time, the communication cost scales with KM3𝐾superscript𝑀3KM^{3} and can thus be predominant in practice. Indeed for large networks, M3superscript𝑀3M^{3} can easily be greater than log(T)𝑇\log(T) and the communication cost would then prevail over the other terms. This highlights the importance of the parameter M𝑀M in multiplayer MAB and future work should focus on the dependency in both M𝑀M and T𝑇T instead of only considering asymptotic results in T𝑇T.
|
| 68 |
+
|
| 69 |
+
Synchronization is not a reasonable assumption for practical purposes and it also leads to undesirable algorithms relying on communication protocols such as sic-mmab. We thus claim that this assumption should be removed in the multiplayer MAB and the dynamic model should be considered instead. However, this problem seems complex to model formally. Indeed, if players stay in the game only for a very short period, learning is not possible. The difficulty to formalize an interesting and nontrivial dynamic model may explain why most of the literature focused on the static model so far.
|
| 70 |
+
|
| 71 |
+
From now on, we no longer assume that players can communicate using synchronization. In the previous section, it was crucial that all exploration/communication phases start and end at the same time. This assumption is clearly unrealistic and should be alleviated, as radios do not start and end transmitting simultaneously. We also consider the more difficult No Sensing setting in this section.
|
| 72 |
+
|
| 73 |
+
We assume in the following that players do not leave the game once they have started. Yet, we mention that our results can also be adapted to the cases when players can leave the game during specific intervals or share an internal synchronized clock [26]. If the time is divided in several intervals, dyn-mmab can be run independently on each of these intervals as suggested by Rosenski et al. [26]. In some cases, players will be leaving in the middle of these intervals, leading to a large regret. But for any other interval, every player stays until its end, thus satisfying Assumption 2.
|
| 74 |
+
|
| 75 |
+
In this section, Assumption 2 holds. At each stage t=tj+τj𝑡subscript𝑡𝑗subscript𝜏𝑗t=t_{j}+\tau_{j}, player j𝑗j does not know t𝑡t but only tjsubscript𝑡𝑗t_{j} (duration since joining). We denote by Tj=T−τjsuperscript𝑇𝑗𝑇subscript𝜏𝑗T^{j}=T-\tau_{j} the (known) time horizon of player j𝑗j.
|
| 76 |
+
|
| 77 |
+
As synchronization no longer holds, we propose the dyn-mmab algorithm, relying on different tools than sic-mmab. The main ideas of dyn-mmab are given in Section 3.2. Its thorough description as well as the proof of the regret bound are delayed to Appendix B due to space constraints.
|
| 78 |
+
|
| 79 |
+
The regret incurred by dyn-mmab in the dynamic No Sensing model is given by Theorem 2 and its proof is delayed to Appendix B.2.We also mention that dyn-mmab leads to a Pareto optimal configuration in the more general problem where users’ reward distributions differ [17, 6, 7, 9].
|
| 80 |
+
|
| 81 |
+
dyn-mmab’s ideas are easy to understand but the upper bound proof is quite technical. This section gives some intuitions about dyn-mmab and its performance guarantees stated in Theorem 2.
|
| 82 |
+
|
| 83 |
+
A player will only follow two different sampling strategies:either she samples uniformly at random in [K]delimited-[]𝐾[K] during the exploration phase; or she exploits an arm and pulls it until the final horizon. In the first case, the exploration of the other players is not too disturbed by collisions as they only change the mean reward of all arms by a common multiplicative term. In the second case, the exploited arm will appear as sub-optimal to the other players, which is actually convenient for them as this arm is now exploited.
|
| 84 |
+
|
| 85 |
+
During the exploration phase, a player will update a set of arms called Occupied ⊂[K]absentdelimited-[]𝐾\subset[K] and an ordered list of arms called Preferences ∈[K]⋆absentsuperscriptdelimited-[]𝐾⋆\in[K]^{\star}. As soon as an arm is detected as occupied (by another player), it is then added to Occupied (which is the empty set at the beginning). If an arm is discovered to be the best one amongst those that are neither in Occupied nor in Preferences, it is then added to Preferences (at the last position). An arm is active for player j𝑗j if it was neither added to Occupied nor to Preferences by this player yet.
|
| 86 |
+
|
| 87 |
+
To handle the fact that players can enter the game at anytime, we introduce the quantity γj(t)superscript𝛾𝑗𝑡\gamma^{j}(t), the expected multiplicative factor of the means defined byγj(t)=1t∑t′=1+τjt+τj𝔼[(1−1K)mt′−1],superscript𝛾𝑗𝑡1𝑡superscriptsubscriptsuperscript𝑡′1subscript𝜏𝑗𝑡subscript𝜏𝑗𝔼delimited-[]superscript11𝐾subscript𝑚superscript𝑡′1\gamma^{j}(t)=\frac{1}{t}\sum_{t^{\prime}=1+\tau_{j}}^{t+\tau_{j}}\mathbb{E}\Big{[}(1-\frac{1}{K})^{m_{t^{\prime}}-1}\Big{]},where mtsubscript𝑚𝑡m_{t} is the number of players in their exploration phase at time t𝑡t. The value of γj(t)superscript𝛾𝑗𝑡\gamma^{j}(t) is unknown to the player and random but it only affects the analysis of dyn-mmab and not how it runs.
|
| 88 |
+
|
| 89 |
+
The objective of the algorithm is still to form estimates and confidence intervals of the performances of arms. However, it might happen that the true mean μksubscript𝜇𝑘\mu_{k} does not belong to this confidence interval. Indeed, this is only true for γj(t)μksuperscript𝛾𝑗𝑡subscript𝜇𝑘\gamma^{j}(t)\mu_{k}, if the arm k𝑘k is still free (not exploited). This is the first point of Lemma 1 below. Notice that as soon as the confidence interval for the arm i𝑖i dominates the confidence interval for the arm k𝑘k, then it must hold that γj(t)μi≥γj(t)μksuperscript𝛾𝑗𝑡subscript𝜇𝑖superscript𝛾𝑗𝑡subscript𝜇𝑘\gamma^{j}(t)\mu_{i}\geq\gamma^{j}(t)\mu_{k} and thus arm i𝑖i is better than k𝑘k.
|
| 90 |
+
|
| 91 |
+
The second crucial point is to detect when an arm k𝑘k is exploited by another player. This detection will happen if a player receives too many 0 rewards successively (so that it is statistically very unlikely that this arm is not occupied). The number of zero rewards needed for player j𝑗j to disregard arm k𝑘k is denoted by Lkjsuperscriptsubscript𝐿𝑘𝑗L_{k}^{j}, which is sequentially updated during the process (following the rule of Equation (4) in Appendix B.1), so that Lkj≥2elog(Tj)/μksuperscriptsubscript𝐿𝑘𝑗2𝑒superscript𝑇𝑗subscript𝜇𝑘L_{k}^{j}\geq 2e\log(T^{j})/\mu_{k}. As the probability of observing a 00 reward on a free arm k𝑘k is smaller than 1−μk/e1subscript𝜇𝑘𝑒1-\mu_{k}/e, no matter the current number of players, observing Lkjsuperscriptsubscript𝐿𝑘𝑗L_{k}^{j} successive 00 rewards on an unexploited arm happens with probability smaller than 1(Tj)21superscriptsuperscript𝑇𝑗2\frac{1}{(T^{j})^{2}}.
|
| 92 |
+
|
| 93 |
+
The second point of Lemma 1 then states that an exploited arm will either be quickly detected as occupied after observing Lkjsuperscriptsubscript𝐿𝑘𝑗L_{k}^{j} zeros (if Lkjsuperscriptsubscript𝐿𝑘𝑗L_{k}^{j} is small enough) or its average reward will quickly drop because it now gives zero rewards (and it will be dominated by another arm after a relatively small number of pulls). The proof of Lemma 1 is delayed to Appendix B.2.
|
| 94 |
+
|
| 95 |
+
It remains to describe how players start exploiting arms. After some time (upper-bounded by Lemma 10 in Appendix B.2), an arm which is still free and such that all better arms are occupied will be detected as the best remaining one. The player will try to occupy it, and this happens as soon as she gets a positive reward from it: either she succeeds and starts exploiting it, or she fails and assumes it is occupied by another player (this only takes a few number of steps, see Lemma 1). In the latter case, she resumes exploring until she detects the next available best arm. With high probability, the player will necessarily end up exploiting an arm while all the better arms are already exploited by other players.
|
| 96 |
+
|
| 97 |
+
We have presented algorithms for different multiplayer bandits models. The first one illustrates why the assumption of synchronization between the players is basically equivalent to allowing communication. Since communication through collisions is possible with other players at a sub-logarithmic cost, the decentralized multiplayer bandits is almost equivalent to the centralized one for the considered model. However, this communication cost has a large dependency in the number of agents in the network. Future work should then focus on considering both the dependency in time and the number of players as well as developing efficient communication protocols.
|
| 98 |
+
|
| 99 |
+
Our major claim is that synchronization should not be considered anymore, unless communication is allowed. We thus introduced a dynamic model and proposed the first algorithm with a logarithmic regret.
|
| 100 |
+
|
| 101 |
+
This work was supported in part by a public grant as part of the Investissement d’avenir project, reference ANR-11-LABX-0056-LMH, LabEx LMH, in a joint call with Gaspard Monge Program for optimization, operations research and their interactions with data sciences.
|
1809.08205v1.txt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Background knowledge plays a very important role in human conversations. For example, to have a meaningful conversation about a movie, one uses their knowledge about the plot, reviews, comments and facts about the movie.A typical conversation involves recalling important points from this background knowledge and producing them appropriately in the context of the conversation. However, most existing large scale datasets Lowe et al. (2015b); Ritter et al. (2010); Serban et al. (2016) simply contain a sequence of utterances and responses without any explicit background knowledge associated with them. This has led to the development of models which treat conversation as a simple sequence-to-sequence generation task and often produce output which is both syntactically incorrect and incoherent (off topic). To make conversations more coherent, there is an increasing interest in integrating structured and unstructured knowledge sources with neural conversation models. While there are already some works in this direction Rojas-Barahona et al. (2017); Williams et al. (2016); Lowe et al. (2015a); Ghazvininejad et al. (2017) which try to integrate external knowledge sources with existing datasets, we believe that building new datasets where the utterances are explicitly linked to external background knowledge will further facilitate the development of such background aware conversation models.
|
| 2 |
+
|
| 3 |
+
With this motivation, we built a new background aware conversation dataset using crowdsourcing. Specifically, we asked workers to chat about a movie using structured and unstructured resources about the movie such as plots, reviews, comments, fact tables (see Figure 1). For every even numbered utterance, we asked the workers to consult the available background knowledge and try to construct a sentence which contains information from this background knowledge and is relevant in the current context of the conversation (akin to how humans recall things from their background knowledge and insert them appropriately in the conversation). For example, in Turn 2, Speaker 2 picked a sentence from the plot which is relevant to the current context of the conversation. Similarly, in Turn 3, Speaker 2 picked a sentence from the movie review. We also asked the workers to suitably modify the content picked from the background knowledge, if needed, so that the conversation remains coherent.We collected around 9K such conversations containing a total of 90K utterances pertaining to about 921 movies. These conversations along with the background resources will be made publicly available111https://github.com/nikitacs16/Holl-E. For every utterance, we also provide information about the exact span in the resource from which this utterance was created. Lastly note that unlike existing datasets, our test set contains multiple reference responses for each test context thereby facilitating better evaluation of conversation models. We believe that this dataset will allow the community to take a fresh look at conversation modeling and will lead to the development of models which can learn to exploit background knowledge to pick appropriate responses instead of generating responses from scratch. Such a conversation strategy which produces responses from background knowledge would be useful in various domains. For example, a troubleshooting bot could exploit the information available in manuals, reviews and previous bug reports about the software. Similarly, an e-commerce bot could exploit the rich information available in product descriptions, reviews, fact tables, etc. about the product. While the proposed dataset is domain specific, it serves as a good benchmark for developing creative background-knowledge-aware models which can then be ported to different domains by building similar datasets for other domains.
|
| 4 |
+
|
| 5 |
+
We establish some initial baselines using three different paradigms to demonstrate the various models that can be developed and evaluated using this dataset. For the sake of completeness, the first paradigm is a hierarchical variant of the sequence to sequence architecture which does not exploit any background knowledge. The second paradigm is the copy-and-generate paradigm wherein the model tries to copy text from the given resources whenever appropriate and generate it otherwise. The third paradigm borrows from the span prediction based models which are predominantly being used for Question Answering (QA). These baseline results along with the dataset would hopefully shape future research in the area of background aware conversation models.
|
| 6 |
+
|
| 7 |
+
There has been an active interest in building datasets Serban et al. (2015) for training dialog systems. Some of these datasets contain transcripts of human-bot conversations Williams et al. (2013); Henderson et al. (2014a, b) while others are created using a fixed set of natural language patterns Bordes and Weston (2017); Dodge et al. (2016). The advent of deep learning created interest in the construction of large-scale dialog datasets Lowe et al. (2015b); Ritter et al. (2010); Sordoni et al. (2015) leading to the development of several end-to-end conversation systems Shang et al. (2015); Vinyals and Le (2015); Li et al. (2016); Serban et al. (2016) which treat dialog as a sequence generation task.
|
| 8 |
+
|
| 9 |
+
To make the output of these models more coherent, there is an increasing effort in integrating external background knowledge with these models. This is because human beings rely on background knowledge for conversations as well as other tasks Schallert (2002). There has been considerable work on incorporating background knowledge in the context of goal-oriented dialog datasets even before the advent of large-scale datasets for deep learning Raux et al. (2005); Seneff et al. (1991) as well as in recent times Rojas-Barahona et al. (2017); Williams et al. (2016); Eric et al. (2017) where datasets include small sized knowledge graphs as background knowledge.However, the conversations in these datasets are very templated and nowhere close to open conversations in specific domains such as the ones contained in our dataset.
|
| 10 |
+
|
| 11 |
+
Even in the case of open domain conversations, there are some works which have integrated external knowledge sources. Most of the entries in 2017 Amazon Alexa Prize Ram et al. (2017) relied on background knowledge for meaningful response generation. Milabot Serban et al. (2017a) and even the winning entry SoundingBoard Liu et al. (2018) used Reddit pages, Amazon’s Evi Service, and large databases like OMDB, Google Knowledge Graph and Wikidata as external knowledge. The submission named Eigen Guss et al. (2017) used several dialog datasets and corpora belonging to related Natural Language Processing tasks to make their responses more informative. We refer the reader to Ram et al. (2017) for detailed analysis of these systems. In the space of academic datasets, Lowe et al. (2015a) report results on the Ubuntu dataset using manpages as external knowledge whereas Ghazvininejad et al. (2017) use Foursquare tips as external knowledge for social media conversations. However, unlike our work both these works do not create a new dataset where the responses are explicitly linked to a knowledge source. The infusion of external knowledge in both these works is post facto (as opposed to our work where we take a bottom-up approach and explicitly create a dataset which allows exploitation of background knowledge). Additionally, existing large-scale datasets are noisy as they are extracted from online forums which are inherently noisy. In contrast, since we use crowdsourcing, the extent of noise is reduced since there are humans in the loop who were explicitly instructed to use only clean sentences from the external knowledge sources.
|
| 12 |
+
|
| 13 |
+
We would also like to mention some existing works such as He et al. (2017); Lewis et al. (2017); Krause et al. (2017) which have used crowdsourcing for creating conversation datasets. In fact, our data collection method is inspired by the work of Krause et al. (2017) where the authors use self-dialogs to collect conversation data about movies, music and sports. They are referred to as self-dialogs because the same worker plays the role of both parties in the conversation. However, our work differs from Krause et al. (2017) as we provide explicit background knowledge sources to the workers from where they can copy text with the addition of suitable prefixes and suffixes to generate appropriate coherent responses.
|
| 14 |
+
|
| 15 |
+
In the following sub-sections we describe the various stages involved in collecting our dataset.
|
| 16 |
+
|
| 17 |
+
We created a list of 921 movies containing (i) top 10 popular movies within the past five years, (ii) top 250 movies as per IMDb rankings, (iii) top 10 movies in popular genres, and (iv) other popular movie lists made available elsewhere on the Internet. These movies belonged to 22 different genres such as sci-fi, action, horror, fantasy, adventure, romance, etc. thereby ensuring that our dataset is not limited to a specific genre. We considered those movies for which enough background information such as plots, reviews, comments, facts, etc. were available on the Internet irrespective of whether they were box-office successes or not. Please find the respective urls in the Appendix.
|
| 18 |
+
|
| 19 |
+
For each movie, we collected the following background knowledge:
|
| 20 |
+
|
| 21 |
+
1. Review (R): For each movie, we asked some in-house workers to fetch the top 2 most popular reviews for this movie from IMDb using the sort by Total Votes option. We also instructed them to avoid choosing reviews which were less than 50 words but this was typically never the case with popular reviews.2. Plot (P): For each movie,we extracted information about the ‘‘Plot’’ of the movie from the Wikipedia page of the movie. Wikipedia pages of movies have an explicit section on ‘‘Plot’’ making it easy to extract this information using scripts.3. Comments (C): Websites like Reddit have a segment called ‘‘official discussion page about X’’ (where X is a movie name) containing small comments about various aspects of movie. We identified such pages and extracted the first comment on every thread on this page. We bundled all these comments into a single text file and refer to it as the resource containing ‘‘Comments’’. For a few movies, the official discussion page was not present in which case we used the review titles of all the IMDb reviews of the movie as comments. The difference between Reviews and Comments is that a Review is an opinion piece given by one person thus typically exhibiting one sentiment throughout while Comments include opinions of several people about the same movie ensuring that positive, negative and factual aspects of the movie are captured as well as some banter.
|
| 22 |
+
|
| 23 |
+
4. Meta data or Fact Table (F): For each movie, we also collected factual details about the movie, viz., box office collection, similar movies (for recommendations), awards and tag-lines from the corresponding IMDb pages and Wikipedia Infoboxes. Such information would be useful for inserting facts in the conversation, for example, “Did you know that the movie won an Oscar?’’. We included only 4 fields in our fact table instead of showing the entire Wikipedia Infobox to reduce the cognitive load on turkers who already had to read the plot, reviews and comments of the movie.
|
| 24 |
+
|
| 25 |
+
During our initial pilots, we observed that if we asked the workers to converse for at least 8 turns, they used a lot of the initial turns in greetings and general chit-chat before actually chatting about a movie. To avoid this, we collected opening statements using Amazon Mechanical Turk (AMT) where the task for the workers was to answer the following questions ‘‘What is your favorite scene from the movie X ?’’, ‘‘What is your favorite character from the movie X ?’’ and ‘‘What is your opinion about the movie X?’’ (X is the movie name). We paid the workers 0.04$ per movie and showed the same movie to 3 different workers, thereby collecting 9 different opening statements for every movie. By using these statements as conversation starters in our data collection, the workers could now directly start conversing about the movie.
|
| 26 |
+
|
| 27 |
+
Our aim is to create a conversation dataset wherein every response is explicitly linked to some structured or unstructured background knowledge. Creating such a dataset using dedicated in-house workers would obviously be expensive and time consuming and so we decided to use crowdsourcing. However, unlike other NLP and Vision tasks, where crowdsourcing has been very successful, collecting conversations via crowdsourcing is a bit challenging. The main difficulty arises from the fact that conversation is inherently a task involving two persons but it is hard to get two workers to synchronize and chat on AMT. We did try a few pilot experiments where we setup a server to connect two AMT workers but we found that the probability of two workers simultaneously logging in was very low. Thus, most workers logged in and left in a few seconds because no other worker joined simultaneously. Finally, we took inspiration from the idea of self chats Krause et al. (2017) in which, the same worker plays the role of both Speaker 1 and Speaker 2 to create the chat.In the above self chat setup, we showed every worker 3 to 4 resources related to the movie, viz., plot (P), review (R), comments (C) and fact table (F). We also showed them a randomly selected opening statement from the 9 opening statements that we had collected for each movie and requested them to continue the conversation from that point. The workers were asked to add at least 8 utterances to this initial chat. While playing the role of Speaker 1, the worker was not restricted to copy/modify sentences from the background resources but was given the freedom to create (write) original sentences. However, when playing the role of Speaker 2, the worker was strictly instructed to copy/modify sentences from the shown resources such that they were relevant in the current context of the conversation. The reason for not imposing any restrictions on Speaker 1 was to ensure that the chats look more natural and coherent. Further, Speaker 2 was allowed to add words at the beginning or end of the span selected from the resources to make the chats more coherent and natural (for example, see the prefix in utterance 2 of Speaker 2 in Figure 1).We paid the workers 40 cents for every chat. Please refer to the Appendix for the instruction screen shots.
|
| 28 |
+
|
| 29 |
+
Every chat that was collected by the above process was verified by an in-house evaluator to check if the workers adhered to the instructions and produced coherent chats. Since humans typically tend to paraphrase the background knowledge acquired by reading articles, one could argue that such conversations may not look very natural because of this restriction to copy/modify content from the provided resources. To verify this, we conducted a separate human evaluation wherein we asked 15 in-house evaluators to read conversations (without the background resources) from our dataset and rate them on five different parameters. Specifically, they were asked to check if the conversations were 1) intelligible: i.e., an average reader could understand the conversation 2) coherent: i.e., there were no abrupt context switches 3) grammatically correct 4) on-topic: i.e., the chat revolved around the concerned movie with digression limited to related movies/characters/actors and 5) natural two-person chats: i.e., the role-play setup does not make the chat look unnatural. These evaluators were post-graduate students who were fluent in English and had watched at least 100 Hollywood movies. We did not give them any information about the data creation process.We used a total of 500 chats for the evaluation and every chat was shown to 3 different evaluators. The evaluators rated the conversations on a scale of 1 (very poor) to 5 (very good). We computed inter-annotator agreement using the mean linearly weighted Cohen’s κ𝜅\kappa Cohen (1968) and mean Krippendorff’s α𝛼\alpha Hayes and Krippendorff (2007). The average rating for each of the 5 parameters along with the inter annotator agreement are reported in Table 1 and are very encouraging.
|
| 30 |
+
|
| 31 |
+
In Table 2, we show different statistics about the dataset collected using the above process. These include average number of utterances per chat, average number of words per utterance, and so on followed by the statistics of the different resources which were used as background knowledge. Please note that the # unique Plots and # unique Reviews correspond to unique paragraphs while the # unique Comments is the count of unique sentences. We observed that 41.2%, 34.6%, 16.1% and 8.1% of Speaker 2 responses came from Reviews, Comments, Plots and Fact Table respectively.
|
| 32 |
+
|
| 33 |
+
We evaluate three different types of models as described below. Since these are popular existing models, we describe them very briefly below and refer the reader to the original papers for more details. Note that in this work we merge the comments, reviews, plots and facts into one single document and refer to it as background knowledge. In the rest of the paper, when we refer to a resource we mean this single document which is a merger of all the resources unless specified otherwise.
|
| 34 |
+
|
| 35 |
+
We use the standard Hierarchical Recurrent Encoder Decoder model (HRED) Serban et al. (2016) instead of its variant Serban et al. (2017b) as the standard model performs only slightly poorly than the variant and is much easier to implement. It decomposes the context of the conversation as two level hierarchy using Recurrent Neural Networks (RNN). The lower RNN encodes individual utterances (sequence of words) which is then fed into the higher level RNN as a sequence of utterances. The decoder RNN then generates the output based on this hierarchical context representation.
|
| 36 |
+
|
| 37 |
+
Get To The Point (GTTP) See et al. (2017) proposed a hybrid pointer generator network for abstractive summarization that learns to copy words from the source document when required and otherwise generates a word like any sequence-to-sequence model. In the summarization task, the input is a document and the output is a summary whereas in our case the input is a {document, context} pair and the output is a response. Here, the context includes the previous two utterances and the current utterance. We modified the architecture to suit our task. We use an RNN to compute the representation of the document (like the original model) and introduce another RNN to compute a representation of the context by treating it as a single sequence of words. The decoder which is also an RNN then uses the document representation, context representation and its own internal state representation to compute a (i) probability score which indicates whether the next word should be copied or generated (ii) probability distribution over the vocabulary if the next word needs to be generated and (iii) probability distribution over the input words if the next word needs to be copied. These three probability distributions are then combined to produce the next word in the response.
|
| 38 |
+
|
| 39 |
+
Bi-directional Attention Flow Model (BiDAF) Seo et al. (2017) model is a QA model which was proposed in the context of the SQuAD dataset Rajpurkar et al. (2016). Given a document and a question, the model uses a six-layered architecture to predict the span in the document which contains the answer. We can use their model as it is for our task without any modifications by simply treating the context as the question and the resource as the document.
|
| 40 |
+
|
| 41 |
+
We chose to evaluate on the modified generate-or-copy model instead of other variants such as Ghazvininejad et al. (2017); Lowe et al. (2015a) as the modified model already contains the extra encoder for background model which is present in these models. Moreover, the modified model uses a hybrid copy-or-generate decoder which is well-suited to our task.
|
| 42 |
+
|
| 43 |
+
In this section we describe the train-validation-test splits, the process used for creating training instances, the manner in which the models were trained using our data and the evaluation metrics.
|
| 44 |
+
|
| 45 |
+
On average we have 9.14 chats per movie. We divide the collected chats into train, validation, and test splits such that all the chats corresponding to a given movie are in exactly one of the splits. This ensures that a movie seen in the test or validation set is never seen at training time. We create the splits such that the percentage of chats in the train-validation-test set is roughly 80%-10%-10%.
|
| 46 |
+
|
| 47 |
+
For each chat in the training data, we construct training instances of the form {resource, context, response} where the context is taken as previous two utterances and current utterance. We consider only the even numbered utterances as training examples as they are generated from the background resources thus emulating a human-bot setup. If a chat has 10 turns, we will have 5 instances. The task then is to train a model which can predict these even numbered responses. At test time the model is shown {resource, context} and predicts the response. Note that, HRED will ignore the resource and only use {context, response} as input-output pairs. BiDAF and GTTP will use {resource, context, response} as training data with relevant span instead of response for BiDAF.
|
| 48 |
+
|
| 49 |
+
As stated earlier, we simply merge all the background information to create a single document which we collectively refer to as resource. For the BiDAF model, we had to restrict the length of the resource to 256 words because we found that even on a K80 GPU with 12GB RAM, this model gives an out of memory error for longer documents. We found this to be a severe limitation of this and other span based models (for example, R-Net Wang et al. (2017)) .We experimented with three methods of creating this resource. The first method oracle uses the actual resource (plot or comments or reviews) from which the next response was generated as a resource. If that resource itself has more than 256 words then we truncate it from the beginning and the end such that the span containing the actual response is contained within the retained 256 words. The number of words that are discarded from the start or the end is chosen at random so that the correct spans do not end up in similar positions throughout the dataset. The next two methods mixed-short and mixed-long are created by merging the individual resources. We retain each resource in the merged document proportional to its length. (i.e,if there are 400 words in the plot, 200 words in the review and 100 in the comments, the merged resource will contain contiguous sentences from these three resources in the ratio of 4:2:1.) Further, we ensure that the merged resource contains the actual response span. In this way, we create mixed-short with 256 words and mixed-long with 1200 words (the maximum length of the merged resources). We will henceforth denote oracle, mixed-long and mixed-short using ‘(o) ’, ‘(ms) ’and ‘(ml) ’respectively. We report results for BiDAF(o), BiDAF (ms), GTTP (o) and GTTP (ml).
|
| 50 |
+
|
| 51 |
+
As HRED and GTTP models are generation based models we use BLEU-4, ROUGE-1, ROUGE-2 and ROUGE-L as the evaluation metrics. For BiDAF we use the above metrics by comparing the predicted span with the reference span. For BiDAF, we also report F1 as stated in Rajpurkar et al. (2016).
|
| 52 |
+
|
| 53 |
+
In addition to the automatic evaluation, we also collected human judgments using 100 test responses generated for every model for every setup (oracle, mixed-short, mixed-long). These evaluators had the same qualifications as the evaluators who earlier helped us evaluate our dataset. They were asked to rate the response on scale of 1 to 5 (with 1 being the least) on the following four metrics: (1) Fluency(Flu), (2) appropriateness/relevance (apt) of the response in the current context language (3) humanness (Hum) of the response, i.e., whether the responses look as if they were generated by a human (4) and specificity (spec) of the response, i.e., whether the model produced movie-specific responses or generic responses such as ‘‘This movie is amazing’’. We report these results in Table 4.
|
| 54 |
+
|
| 55 |
+
One common issue with evaluating dialog systems is that existing datasets typically contain only one reference response whereas in practice several responses can be correct in a given context.To solve this to a certain extent, we collected three reference responses for every Speaker 2 utterance in our dataset (note that Speaker 2 is treated as the bot while training/testing our models). We show the previous utterances ending with Speaker 1’s response and ask workers to provide three appropriate responses from the given resources. We found that in some cases there was only one appropriate response like factual response and the workers could not provide multiple references . In this way we were able to create a multiple reference test set where 78.04% of the test instances have multiple responses. In Table 3, we report two sets of scores based on single-reference test dataset and multi-reference test dataset. While calculating the scores for multi-reference dataset, we take the maximum score over multiple reference responses.
|
| 56 |
+
|
| 57 |
+
Please refer to the Appendix section for the details of the model, hyperparameters, example of multiple references in our dataset and sample outputs produced by different models.
|
| 58 |
+
|
| 59 |
+
In this section, we discuss the results of our experiments as summarized in Tables 3 and 4.
|
| 60 |
+
|
| 61 |
+
Generation based models v/s Span prediction models:We compare the generation based models and span prediction models only based on results in the oracle setting. Here, the span based model (BiDAF) outperforms the generation based models (HRED and GTTP). This confirms our belief that the natural language generation (NLG) capabilities of current generation based models are far from being acceptable even in case of generate-or-copy modes. This also emphasizes the importance of this data which allows building models which can exploit well-formed sentences in the background knowledge and reproduce them with minor modifications instead of generating them from scratch. While the results for BiDAF are encouraging, we reiterate that it does not scale to longer documents (we were not able to run it in the mixed-long setting). We still need much better models as BiDAF on SQuAD dataset gives an F1 of 81.52 % which is much higher than the results on our dataset. Further, note that using the predicted span as a response is not natural. This is evident from human likeliness (Hum) score of GTTP (o) being higher than both the BiDAF models. We need models which can suitably alter the span to retain the coherence of the context.
|
| 62 |
+
|
| 63 |
+
Effect of including background knowledge: We observe that there isn’t much difference between the performance of HRED which does not use any background knowledge when compared to GTTP (ml) which actually uses a lot of background knowledge. However, there is a substantial difference between the performance of HRED and GTTP (o) which uses only the relevant background knowledge. Further, without background knowledge, HRED learns to produce very generic responses (Spec score = 2.06). This shows that the background knowledge is important, but the models should learn to focus on the right background knowledge relevant to the current context. Alternately, we can have a two-stage network which first predicts the right resource (plot, review, comments) from which the span should be selected and then selects the span from this chosen resource.
|
| 64 |
+
|
| 65 |
+
Oracle v/s mixed-short resource:We observe that the performance of BiDAF (ms) is actually better than BiDAF (o) even when the resource length for both is 256 words. We would expect a poor performance for BiDAF (ms) as the resource has more noise because of the sentences from irrelevant resources. However, we speculate the model learns to regard irrelevant sentences as noise and learns to focus on sentences corresponding to the correct resource resulting in improved performance (however, this is only a hypothesis and it needs to be verified).We realize that this is clearly a poor baseline and we need better span prediction based models which can work with longer documents. At the same time, GTTP (o) and GTTP (ms) have comparable (yet poor) performance. There is no co-attention mechanism in this model which can effectively filter out noisy sentences.
|
| 66 |
+
|
| 67 |
+
Observations from the copy-and-gen model:We observed that this model produced sentences where on average of 82.18% (oracle) and 71.95% (mixed-long) of the tokens were copied. One interesting observation was that it easily learns to copy longer contiguous sequences one word at a time.However, as is evident from the automatic evaluation metrics, in many cases, the ‘copied’ spans are not relevant to the current context.Evaluating with multiple references:When considering multiple references, the performance numbers as reported in Table 3 indeed improve. This shows the importance of having multiple references and the need to develop metrics which account for multiple dissimilar references.
|
| 68 |
+
|
| 69 |
+
We introduce a new dataset for building dialog systems which would hopefully allow the community to take a fresh look at this task. Unlike existing datasets which only contain a sequence of utterances, in our dataset each response is explicitly linked to some background knowledge. This mimics how humans converse by recalling information from their background knowledge and use it appropriately in the context of the conversation. Using this dataset, we evaluated models belonging to three different paradigms, viz., generation based models, generate-or-copy models and span prediction models. Our results suggest that the NLG capabilities of existing seq-to-seq models are still far from desirable while span based models which completely bypass the process of NLG show some promise but with clear scope for improvement.
|
| 70 |
+
|
| 71 |
+
Going forward, we would like to build models which are a hybrid of span prediction models and generation models. Specifically, we would like to build models which can learn to copy a large sequence from the input instead of one word at a time. Another important aspect is to build less complex models which can handle longer documents. For example, the BiDAF model has an expensive outer product between two large matrices which makes it infeasible for long documents (because the size of these matrices grows with the length of the document). Alternately, we would like to build two-stage models which first select the correct resource from which the next response is to be generated and then generate or copy the response from the resource.
|
1809.08267v3.txt
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
main
|
| 2 |
+
\newcommand{\todo}[1]{{\color{red}{[{\bf TODO}: #1]}}}
|
| 3 |
+
\newcommand{\todoJG}[1]{{\color{blue}{[{\bf JG}: #1]}}}
|
| 4 |
+
\newcommand{\todoMG}[1]{{\color{purple}{[{\bf MG}: #1]}}}
|
| 5 |
+
\newcommand{\todoLL}[1]{{\color{cyan}{[{\bf LL}: #1]}}}
|
| 6 |
+
|
| 7 |
+
\newcommand{\figref}[1]{Fig.~\ref{#1}}
|
| 8 |
+
\newcommand{\eqnref}[1]{Eqn.~\ref{#1}}
|
| 9 |
+
\newcommand{\chref}[1]{Chapter~\ref{#1}}
|
| 10 |
+
\newcommand{\secref}[1]{Sec.~\ref{#1}}
|
| 11 |
+
\newcommand{\tabref}[1]{Table~\ref{#1}}
|
| 12 |
+
\newcommand{\ie}{{i.e.}}
|
| 13 |
+
\newcommand{\eg}{{e.g.}}
|
| 14 |
+
\newcommand{\etc}{{etc.}}
|
| 15 |
+
\newcommand{\cf}{{cf.}}
|
| 16 |
+
|
| 17 |
+
\newcommand{\dnfont}[1]{{\texttt{#1}}} %
|
| 18 |
+
\newcommand{\dafont}[1]{{\texttt{#1}}} %
|
| 19 |
+
\newcommand{\slotfont}[1]{\texttt{#1}} %
|
| 20 |
+
\newcommand{\valuefont}[1]{\textcolor{gray}{\texttt{#1}}}
|
| 21 |
+
\newcommand{\vecb}[1]{\mathbf{#1}}
|
| 22 |
+
|
| 23 |
+
\newcommand{\exbox}[1]{ %
|
| 24 |
+
{\begin{center}\fbox{%
|
| 25 |
+
\begin{minipage}{.95\textwidth} %
|
| 26 |
+
\centering #1
|
| 27 |
+
\end{minipage}%
|
| 28 |
+
}\end{center}} %
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
\newcommand{\defeq}{:=}
|
| 32 |
+
\newcommand{\E}{\mathbb{E}}
|
| 33 |
+
\newcommand{\Rset}{\mathbb{R}}
|
| 34 |
+
\newcommand{\mt}{{\operatorname{T}}} %
|
| 35 |
+
\newcommand{\mi}{{-1}} %
|
| 36 |
+
\newcommand{\argmin}{\operatorname{argmin}}
|
| 37 |
+
\newcommand{\argmax}{\operatorname{argmax}}
|
| 38 |
+
|
| 39 |
+
\newcommand{\Sset}{\mathcal{S}}
|
| 40 |
+
\newcommand{\Aset}{\mathcal{A}}
|
| 41 |
+
\newcommand{\Dset}{\mathcal{D}}
|
| 42 |
+
|
| 43 |
+
\newcommand{\mMSE}{\operatorname{MSE}}
|
| 44 |
+
\newcommand{\mFone}{\operatorname{F1}}
|
| 45 |
+
\newcommand{\mREC}{\operatorname{RECALL}}
|
| 46 |
+
\newcommand{\mACC}{\operatorname{ACCURACY}}
|
| 47 |
+
\newcommand{\mPRE}{\operatorname{PRECISION}}
|
| 48 |
+
\newcommand{\mAUC}{\operatorname{AUC}}
|
| 49 |
+
\newcommand{\1}{\mathbf{1}}
|
| 50 |
+
|
| 51 |
+
\tableofcontents
|
| 52 |
+
\newpage
|
| 53 |
+
|
| 54 |
+
\include{introduction}
|
| 55 |
+
|
| 56 |
+
\include{machine_learning_background}
|
| 57 |
+
|
| 58 |
+
\include{question_answering_and_machine_reading_comprehension}
|
| 59 |
+
|
| 60 |
+
\include{task-oriented_dialogue_systems}
|
| 61 |
+
|
| 62 |
+
\include{fully_data-driven_conversation_models_and_social_bots}
|
| 63 |
+
|
| 64 |
+
\include{conversational_ai_in_industry}
|
| 65 |
+
|
| 66 |
+
\include{conclusion_and_research_trends}
|
| 67 |
+
|
| 68 |
+
\bibliographystyle{apalike}
|
| 69 |
+
\bibliography{nacai}
|
1809.08440v3.txt
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Person search has gained great attention in recent years due to its wide applications in video surveillance, e.g., missing persons searching and suspects tracking. With the explosive increase in the number of videos, manual person search in large-scale videos is unrealistic, so we need to design automatic methods to perform this task more efficiently. Existing methods of person search are mainly classified into three categories according to the query type, e.g., image-based query \cite{zhou2018graph,Zheng2011Person,Sarfraz2017A}, attribute-based query \cite{Su2016Deep,Vaquero2009Attribute} and text-based query \cite{Li2017Person,Li2017Identity,zheng2017dual,Chen2018Improving}. Image-based person search needs at least one image of the queried person which in many cases is very difficult to obtain. Attribute-based person search has limited capability of describing persons' appearance. Since textual descriptions are more accessible and can describe persons of interest with more details in a more natural way, we study the task of text-based person search in this paper.
|
| 3 |
+
|
| 4 |
+
\begin{figure}[t]
|
| 5 |
+
\centering
|
| 6 |
+
\includegraphics[width=0.8\columnwidth]{138_illustration.png}
|
| 7 |
+
\caption{The illustration of text-based person search. Given a textual description of a person, the model aims to retrieve the corresponding person images from the given image database. There are two granularity alignments in our retrieval procedure: coarse alignment by textual description and fine-grained alignment by noun phrases.
|
| 8 |
+
}
|
| 9 |
+
\label{fig:graph1}
|
| 10 |
+
\end{figure}
|
| 11 |
+
|
| 12 |
+
Text-based person search aims to retrieve the corresponding person images to a textual description from a large-scale image database, which is illustrated in Fig.~\ref{fig:graph1}. The main challenge of this task is to effectively extract corresponding visual contents to the human description under multi-granularity semantic relevances between image and text.
|
| 13 |
+
Previous methods \cite{zheng2017dual,zhang2018deep} generally utilize Convolutional Neural Networks (CNNs) \cite{krizhevsky2012imagenet} to obtain a global representation of the input image, which often cannot effectively extract visual contents corresponding to the person in image.
|
| 14 |
+
Considering that human pose is closely related to human body parts, we exploit pose information for effective visual feature extraction. To our knowledge, we are probably the first to employ human pose to handle the task of text-based person search.
|
| 15 |
+
|
| 16 |
+
Nonetheless, it is still not suitable to match the global features directly due to the fact that only partial image regions are corresponding to the given textual description. The learned global visual representation suffers from much irrelevant information brought by useless visual regions, e.g., meaningless background. Therefore, selecting description-related image regions is necessary for better matching.
|
| 17 |
+
Previous methods \cite{Chen2018Improving,chen2018improve} mainly focus on utilizing attention mechanisms for single-level alignment,
|
| 18 |
+
which largely neglect the multi-granularity semantic relevances.
|
| 19 |
+
In contrast, we propose to exploit the multi-granularity corresponding visual contents by the given textual description. First, we coarsely select the related visual regions by the whole text.
|
| 20 |
+
In addition to sentence-level correlations, phrase-level relations are also significant for fine-grained image-text matching. In fact, the noun phrase in textual description usually is related to the specific visual human part but not the whole image as shown in Fig.~\ref{fig:graph1}. To select the phrase-level visual contents, we learn the latent semantic alignment between noun phrase and visual human part.
|
| 21 |
+
Considering that human pose is closely related to human body parts, we utilize pose information to guide the fine-grained alignment.
|
| 22 |
+
|
| 23 |
+
In summary, we propose a pose-guided multi-granularity attention network (PMA) for text-based person search as shown in Fig.~\ref{fig:model1}.
|
| 24 |
+
First, we estimate human pose from the input image,
|
| 25 |
+
where global visual representations emphasize the human-related features by concatenating the pose confidence maps to the original input image. To further capture the description-related image regions, a coarse alignment network (CA) is performed between textual description and image regions, where a similarity-based attention is utilized. To exploit the phrase-related visual contents, a fine-grained alignment network (FA) is further proposed, where the pose information is utilized to guide the attention of noun phrases and image regions.
|
| 26 |
+
Both ranking loss and identification loss are employed for better training. Our proposed method is evaluated on a challenging dataset CUHK-PEDES \cite{Li2017Person}, which is currently the only available dataset for text-based person search. Experimental results show that our PMA outperforms the state-of-the-art methods on this dataset.
|
| 27 |
+
|
| 28 |
+
The main contributions of this paper can be summarized as follows: (1) Multi-granularity corresponding visual contents are extracted by the coarse alignment network and fine-grained alignment network.
|
| 29 |
+
(2) A novel pose-guided part aligned matching network is proposed to exploit the latent semantic alignment between visual body part and textual noun phrase, which is probably the first used in text-based person search.
|
| 30 |
+
(3) The proposed PMA achieves the best results on the challenging dataset CUHK-PEDES. Extensive ablation studies verify the effectiveness of each component in the PMA.
|
| 31 |
+
|
| 32 |
+
\begin{figure*}[t]
|
| 33 |
+
\centering
|
| 34 |
+
\includegraphics[width=0.85\textwidth]{138_new_main_model.png}
|
| 35 |
+
\caption{The architecture of our proposed pose-guided multi-granularity attention network (PMA) for text-based person search. It contains two matching networks (best viewed in colors): the coarse alignment network aims to select the description-related image regions by similarity-based attention and fine-grained alignment network aims to select phrase-related visual human parts by pose-guided attention.
|
| 36 |
+
To better train PMA, both ranking loss and identification loss are employed in our method.
|
| 37 |
+
}
|
| 38 |
+
\label{fig:model1}
|
| 39 |
+
\end{figure*}
|
| 40 |
+
\section{Related Work}
|
| 41 |
+
In this section, we briefly introduce the related work about prior studies on text-based person search, human pose for person search, as well as attention for person search.
|
| 42 |
+
|
| 43 |
+
\textbf{Text-Based Person Search.} Li et al. \cite{Li2017Person} propose the task of text-based person search and further employ a recurrent neural network with gated neural attention (GNA-RNN) for this task. To utilize identity-level annotations, Li et al. \cite{Li2017Identity} propose an identity-aware two-stage framework.
|
| 44 |
+
PWM+ATH \cite{Chen2018Improving} utilizes a word-image patch matching model in order to capture the local similarity. Different from the above three methods which are all the CNN-RNN architectures, Dual Path \cite{zheng2017dual} employs CNN for textual feature learning. CMPM+CMPC \cite{zhang2018deep} utilizes a cross-modal projection matching (CMPM) loss and a cross-modal projection classification (CMPC) loss to learn discriminative image-text representations.
|
| 45 |
+
In this paper, we propose a pose-guided multi-granularity attention network to learn multilevel cross-modal relevances.
|
| 46 |
+
|
| 47 |
+
\textbf{Human Pose for Person Search.} With the development of pose estimation \cite{Insafutdinov2016DeeperCut,cao2016realtime,Carreira2015Human,Chu2016Structured,chu2017multi}, many approaches in image-based person search extract human poses to improve the visual representation. To solve the problem of human pose variations, Pose-transfer \cite{liu2018pose} employs a pose transferrable person search framework through pose-transferred sample augmentations. PIE \cite{zheng2017pose} utilizes human pose to normalize the person image. The normalized image and original image are both used to match the person. SSDAL \cite{Su2016Deep} also utilizes pose to normalize the person image, while it leverages human body parts and the global image to learn a robust feature representation. PSE \cite{Sarfraz2017A} directly concatenates pose information to the input image to learn visual representation. In this paper, we use pose information for effective visual feature extraction and aligned part matching between noun phrase and image regions.
|
| 48 |
+
|
| 49 |
+
\textbf{Attention for Person Search.} Attention mechanism aims to select key parts of an input, which is generally divided into soft attention and hard attention. Soft attention computes a weight map and selects the input according to the weight map, while hard attention just preserves one or a few parts of the input and ignores the others. Recently, attention is widely used in person search, which selects either visual contents or textual information.
|
| 50 |
+
GNA-RNN \cite{Li2017Person} computes an attention map based on text representation to focus on visual units. IATV \cite{Li2017Identity} employs a co-attention method, which extracts word-image features via spatial attention and aligns sentence structures via a latent semantic attention. Zhao et al. \cite{Zhao2017Deeply} employ human body parts to weight the image feature map. As we know, hard attention is rarely exploited in person search. In this paper, we fully exploit the hard and soft attentions in learning the semantic relevance between image and text.
|
| 51 |
+
\section{Pose-Guided Multi-Granularity Attention Network }
|
| 52 |
+
In this section, we explain the proposed pose-guided multi-granularity attention network in detail. First, we introduce the procedures of visual and textual representations extraction. Then, we describe the two alignment networks including coarse alignment network and fine-grained alignment network. Finally, we give the details of learning the proposed model.
|
| 53 |
+
\subsection{Visual Representation Extraction}
|
| 54 |
+
Considering that human pose is closely related to human body parts, we exploit pose information to learn human-related visual feature and guide the aligned part matching. In this work, we estimate human pose from the input image using the PAF approach proposed in \cite{Cao2017Realtime} due to its high accuracy and realtime performance.
|
| 55 |
+
To obtain more accurate human poses, we retrain PAF on a larger AI challenge
|
| 56 |
+
dataset \cite{Wu2017AI} which annotates 14 keypoints for each person.
|
| 57 |
+
|
| 58 |
+
However, in the experiments, the retrained PAF still cannot obtain accurate human poses in the challenging CUHK-PEDES dataset due to the occlusion and lighting change. The upper right three images in Fig.~\ref{fig:pose} show the cases of partial and complete missing keypoints. Looking in detail at the procedure of pose estimation, we find that the 14 confidence maps prior to keypoints generation can convey more information about the person in the image when the estimated joint keypoints are incorrect or missing. The lower right images in Fig.~\ref{fig:pose} show the superimposed results of the 14 confidence maps which can still provide cues for human body and its parts.
|
| 59 |
+
|
| 60 |
+
The pose confidence maps play the two-fold role in our model. On one hand, the 14 confidence maps are concatenated with the 3-channel input image to augment visual representation. We extract visual representation using both VGG-16 \cite{Simonyan2014Very} and ResNet-50 \cite{He2015Deep} on the augmented 17-channel input and compare their performance in the experiments. Taking VGG-16 for example, we first resize the input image to 384$\times$128 and obtain the feature map $\phi^{'}(I)\in\mathbf{R}^{12\times4\times 512}$ before the last pooling layer of VGG-16. Then we partition the $\phi^{'}(I)$ into 6 horizontal stripes inspired by \cite{sun2018beyond} and average each stripe along the first dimension. The $\phi^{'}(I)$ is transformed into $\phi(I)\in\mathbf{R}^{6\times4\times 512}$, where $6\times4\times 512$ means there are 24 regions and each region is represented by a 512-dimensional vector.
|
| 61 |
+
|
| 62 |
+
On the other hand, the 14 confidence maps are used to learn latent semantic alignment between noun phrase and image regions, which is explained in fine-grained alignment network.
|
| 63 |
+
\subsection{Textual Representation Learning}
|
| 64 |
+
\textbf{Textual Description.} Given a textual description $T$,
|
| 65 |
+
we represent its $j$-th word as an one-hot vector $t_{j} \in \mathbf{R}^{K}$ according to the index of this word in the vocabulary, where $K$ is the vocabulary size. Then we embed the one-hot vector into a 300-dimensional embedding vector:
|
| 66 |
+
\begin{equation}
|
| 67 |
+
x_{j}=W_{t} t_{j},
|
| 68 |
+
\end{equation}
|
| 69 |
+
where $W_{t} \in \mathbf{R}^{300\times K}$ is the embedding matrix.
|
| 70 |
+
To model the dependencies between adjacent words, we adopt a bi-directional long short-term memory network (bi-LSTM) \cite{hochreiter1997long} to handle the embedding vectors $X = (x_{1}, x_{2}, ..., x_{r})$ which correspond to the $r$ words in the text description:
|
| 71 |
+
\begin{equation}
|
| 72 |
+
\overrightarrow{h_{t}} = \overrightarrow{LSTM}(x_{t}, \overrightarrow{h_{t-1}}),
|
| 73 |
+
\end{equation}
|
| 74 |
+
\begin{equation}
|
| 75 |
+
\overleftarrow{h_{t}} = \overleftarrow{LSTM}(x_{t}, \overleftarrow{h_{t+1}}),
|
| 76 |
+
\end{equation}
|
| 77 |
+
where $\overrightarrow{LSTM}$ and $\overleftarrow{LSTM}$ represent the forward and backward LSTMs, respectively.
|
| 78 |
+
|
| 79 |
+
The global textual representation $e^{t}$ is defined as the concatenation of the last hidden states $\overrightarrow{h_{r}}$ and $\overleftarrow{h_{1}}$:
|
| 80 |
+
\begin{equation}
|
| 81 |
+
\label{eq:8}
|
| 82 |
+
e^{t} = concat(\overrightarrow{h_{r}}, \overleftarrow{h_{1}})
|
| 83 |
+
\end{equation}
|
| 84 |
+
|
| 85 |
+
\begin{figure}[t]
|
| 86 |
+
\centering
|
| 87 |
+
\includegraphics[width=0.9\columnwidth]{138_pose.png}
|
| 88 |
+
\caption{Examples of human pose estimation from the retrained PAF. The first row shows the detected joint keypoints and the second row shows the superimposed results from 14 confidence maps.}
|
| 89 |
+
\label{fig:pose}
|
| 90 |
+
\end{figure}
|
| 91 |
+
|
| 92 |
+
\textbf{Noun Phrase.} For the given textual description, we utilize the NLTK \cite{loper2002nltk} to extract the noun phrase $N$.
|
| 93 |
+
Similar to textual description, for the $j$-th noun phrase $n_{j}$ in $N = (n_{1}, n_{2}, ..., n_{m})$, we use the words in $n_{j}$ to represent the noun phrase according to Equations 1-4. Therefore, we can obtain the representations of all noun phrases $e^{n} = (e^{n}_{1}, e^{n}_{2}, ..., e^{n}_{m})$. Note that we adopt the same bi-LSTM when encoding the textual description and noun phrase. Moreover, the number of noun phrase $m$ varies in different textual descriptions.
|
| 94 |
+
\subsection{Coarse Alignment Network}
|
| 95 |
+
Due to the fact that only partial image regions are related to textual description, we propose a coarse alignment network to select the most related image regions by attention mechanism.
|
| 96 |
+
|
| 97 |
+
First, we transform local visual representation $\phi(I)$ and textual representation $e^{t}$ to the same feature space.
|
| 98 |
+
For different horizontal stripes in $\phi(I)=\{\phi^{ij}(I) \in \mathbf{R}^{512} \mid i=1,2, ...,6, j=1,2,3,4\}$, we employ different transformation matrices as follows:
|
| 99 |
+
\begin{equation}
|
| 100 |
+
\widetilde{\phi^{ij}(I)} = W_{\phi^i}\phi^{ij}(I),
|
| 101 |
+
\end{equation}
|
| 102 |
+
\begin{equation}
|
| 103 |
+
\tilde{e^{t}} = W_{e^{t}}e^{t},
|
| 104 |
+
\end{equation}
|
| 105 |
+
where $W_{\phi^i}\in\mathbf{R}^{b\times 512}$ and $W_{e^{t}}\in\mathbf{R}^{b\times 2d}$ are two transformation matrices, and $b$ is the dimension of the feature space. Here $d$ is the hidden dimension of the bi-LSTM in textual representation learning.
|
| 106 |
+
|
| 107 |
+
Then, we define the local cosine similarity between each image region representation $\widetilde{\phi^{ij}(I)}$ and textual representation $\tilde{e^{t}}$:
|
| 108 |
+
\begin{equation}
|
| 109 |
+
s_{ij} = \cos(\widetilde{\phi^{ij}(I)}, \tilde{e^{t}}).
|
| 110 |
+
\end{equation}
|
| 111 |
+
Accordingly, a set of local similarities can be obtained.
|
| 112 |
+
|
| 113 |
+
Rather than summing all the local similarities as the final score, we propose a hard attention to select the description-related image regions and ignore the irrelevant ones.
|
| 114 |
+
Specifically, we set a threshold $\tau$ and select the local similarities if their weights are higher than $\tau$.
|
| 115 |
+
The final similarity score $S^{ca}$ is defined as follows:
|
| 116 |
+
\begin{equation}
|
| 117 |
+
\label{eq:final_sim}
|
| 118 |
+
q_{ij} = \frac{\exp(s_{ij})}{\sum_{i=1}^{6} \sum_{j=1}^{4} \exp(s_{ij})},
|
| 119 |
+
\end{equation}
|
| 120 |
+
\begin{equation}
|
| 121 |
+
S^{ca} = \sum_{q_{ij} \ge \tau}{s_{ij}},
|
| 122 |
+
\end{equation}
|
| 123 |
+
where $q_{ij}$ is the weight of local similarity and $\tau$ is set to $\frac{1}{6\times 4}$. Practically, we can select a fixed number of similarity scores according to their values, but the complex person images can easily fail this idea. In the ablation experiments, we compare the proposed hard attention with several other selection strategies. The experimental results demonstrate the effectiveness of our model.
|
| 124 |
+
\subsection{Fine-Grained Alignment Network}
|
| 125 |
+
In fact, a noun phrase in the textual description usually describes specific part of an image. To extract the phrase-level related visual contents, we propose a fine-grained alignment network to learn the latent semantic alignment between noun phrase and image regions.
|
| 126 |
+
Considering that human pose is closely related to human body parts, we propose to use pose information to guide the matching. As described above, for an image, we extract 14 confidence maps which are related to 14 keypoints. As shown in Fig.~\ref{fig:model1}, 14 keypoints are classified into 6 body parts: head, upper torso, arm, hand, leg, foot. It should be noted that keypoints in different parts have overlap.
|
| 127 |
+
|
| 128 |
+
For each body part, we first add the corresponding confidence maps of keypoints. Next the confidence maps are embedded into a $b$-dimensional vector $p\in\mathbf{R}^{b}$ by a pose CNN, which has 4 convolutional layers and a fully connected layer. Then two pose-guided attention models are employed to concentrate on the noun phrases and image regions, respectively.
|
| 129 |
+
The formulation is illustrated in Fig.~\ref{fig:model1}. Taking textual attention for example, each body part $(p_{1}, p_{2}, ..., p_{6})\in P$ attends to noun phrases with respect to the cosine similarities. Specifically, for the head part $p_{1}$, we first transform all noun phrases $(e^{n}_{1}, e^{n}_{2}, ..., e^{n}_{m})$ to the same feature space as $p_{1}$ and then compute the cosine similarity between $p_{1}$ and all transformed noun phrases $(\tilde{e^{n}_{1}}, \tilde{e^{n}_{2}}, ..., \tilde{e^{n}_{m}})$.
|
| 130 |
+
The attended head-related textual representation is defined as follows:
|
| 131 |
+
\begin{equation}
|
| 132 |
+
e^{pn}_{1} = \sum_{i=1}^{m}\alpha_{1,i}\tilde{e^{n}_{i}},
|
| 133 |
+
\end{equation}
|
| 134 |
+
\begin{equation}
|
| 135 |
+
\alpha_{1,i} = \frac{\exp(\cos(p_{1}, \tilde{e^{n}_{i}}))}{\sum_{i=1}^{m}\exp(\cos(p_{1}, \tilde{e^{n}_{i}}))},
|
| 136 |
+
\end{equation}
|
| 137 |
+
where $\alpha_{1,i}$ indicates the weight value of attention.
|
| 138 |
+
Similarly, we can obtain the attended part-related visual representations $(\phi^{p}_{1}, \phi^{p}_{2}, ..., \phi^{p}_{6})$. Then the similarity between attended image-text representations is defined as follows:
|
| 139 |
+
\begin{equation}
|
| 140 |
+
s_{i} = \cos(e^{pn}_{i}, \phi^{p}_{i}), i=1,2,..,6
|
| 141 |
+
\end{equation}
|
| 142 |
+
\begin{equation}
|
| 143 |
+
S^{fa} = \sum_{i=1}^{6}s_{i},
|
| 144 |
+
\end{equation}
|
| 145 |
+
where $s_{i}$ measures the local similarity between corresponding cross-modal parts.
|
| 146 |
+
\subsection{Learning PMA}
|
| 147 |
+
The ranking loss $L_{r}$ is a common objective function for the retrieval task. In this paper, we employ the triplet ranking loss as proposed in \cite{Faghri2017VSE} to train our PMA. This ranking loss function ensures that the positive pair is closer than the hardest negative pair in a mini-batch with a margin $\alpha$.
|
| 148 |
+
For our coarse alignment network, we obtain a ranking loss $L_{r}^{ca}$.
|
| 149 |
+
|
| 150 |
+
In addition, we adopt the identification loss and classify persons into different groups by their identities, which ensures the identity-level matching. The image and text identification losses $L_{id_{i}}^{ca}$ and $L_{id_t}^{ca}$ in coarse alignment network are defined as follows:
|
| 151 |
+
\begin{equation}
|
| 152 |
+
\widetilde{\phi(I)_{avg}} = avgpool(\widetilde{\phi(I)}),
|
| 153 |
+
\end{equation}
|
| 154 |
+
\begin{equation}
|
| 155 |
+
L_{id_{i}}^{ca} = -y_{id}\log(softmax(W_{id}^{ca}\widetilde{\phi(I)_{avg}})),
|
| 156 |
+
\end{equation}
|
| 157 |
+
\begin{equation}
|
| 158 |
+
L_{id_t}^{ca} = -y_{id}\log(softmax(W_{id}^{ca}\tilde{e^{t}})),
|
| 159 |
+
\end{equation}
|
| 160 |
+
where $W_{id}^{ca}\in\mathbf{R}^{11003\times b}$ is a shared transformation matrix to classify the 11003 different persons in the training set, $y_{id}$ is the ground truth identity. We share $W_{id}^{ca}$ between image and text to constrain their representations in the same feature space.
|
| 161 |
+
|
| 162 |
+
Then the total loss in CA is defined as:
|
| 163 |
+
\begin{equation}
|
| 164 |
+
L^{ca} = L_{r}^{ca}+\lambda_1 L_{id_{i}}^{ca} + \lambda_2 L_{id_t}^{ca},
|
| 165 |
+
\end{equation}
|
| 166 |
+
where $\lambda_{1}$ and $ \lambda_{2}$ are empirically set to 1 in our experiments. Similarly, we can obtain the total loss $L^{fa}$ in FA .
|
| 167 |
+
|
| 168 |
+
To make sure that different pose parts can attend to different parts of image and text in fine-grained alignment network, we add an additional part loss $L_{p}$ to classify 6 pose parts into 6 kinds. The part loss $L_{p}$ is defined as follows:
|
| 169 |
+
\begin{equation}
|
| 170 |
+
L_{p} = \frac{1}{6}\sum_{i=1}^{6}-y_{p_{i}}\log(softmax(W_{p}p_{i})),
|
| 171 |
+
\end{equation}
|
| 172 |
+
where $W_{p} \in \mathbf{R}^{6\times b}$ is a transformation matrix and $y_{p_{i}}$ is the ground truth label of $p_{i}$.
|
| 173 |
+
|
| 174 |
+
Finally, the total loss is defined as:
|
| 175 |
+
\begin{equation}
|
| 176 |
+
L = L^{ca}+\lambda_3 L^{fa} + \lambda_{4} L_{p},
|
| 177 |
+
\end{equation}
|
| 178 |
+
where $\lambda_{3}$ and $\lambda_{4}$ are also empirically set to 1 in our experiments.
|
| 179 |
+
|
| 180 |
+
During testing, we rank the similarity score $S=S^{ca}+ \lambda_3S^{fa}$ to retrieve the person images based on the text query.
|
| 181 |
+
\section{Experiments}
|
| 182 |
+
In this section, we first introduce the experimental setup including dataset, evaluation metrics, and implementation details. Then, we analyze the quantitative results of our method and a set of baseline variants. Finally, we visualize several attention maps.
|
| 183 |
+
\subsection{Experimental Setup}
|
| 184 |
+
\textbf{Dataset and Metrics.} The CUHK-PEDES is currently the only dataset for text-based person search.
|
| 185 |
+
We follow the same data split as \cite{Li2017Person}. The training set has 34054 images, 11003 persons and 68126 textual descriptions. The validation set has 3078 images, 1000 persons and 6158 textual descriptions. The test set has 3074 images, 1000 persons and 6156 textual descriptions. On average, each image contains 2 different textual descriptions and each textual description contains more than 23 words. The dataset contains 9408 different words. In addition, the method we proposed can be utilized in other human related cross-modal tasks.
|
| 186 |
+
|
| 187 |
+
We adopt top-1, top-5 and top-10 accuracies to evaluate the performance.
|
| 188 |
+
Given a textual description, we rank all test images by their similarities with the query text. If top-k images contain
|
| 189 |
+
any corresponding person, the search is successful.
|
| 190 |
+
|
| 191 |
+
\textbf{Implementation Details.} In our experiments, we set both the hidden dimension of bi-LSTM and dimension $b$ of the feature space as 1024. For pose CNN, the kernel size of each convolutional layer is $3\times3$ and the numbers of the convolutional channels are 64, 128, 256 and 256, respectively. The fully connected layer has 1024 nodes. In addition, the pose CNN is randomly initialized.
|
| 192 |
+
After dropping the words that occur less than twice, the obtained vocabulary has 4984 words.
|
| 193 |
+
|
| 194 |
+
We initialize the weights of visual CNN with VGG-16 or ResNet-50 pre-trained on the ImageNet classification task. In order to match the dimension of the augmented first layer, we directly copy the averaged weight along the channel dimension to initialize the first layer.
|
| 195 |
+
To better train our model, we divide the model training into two steps. First, we fix the parameters of pre-trained visual CNN and only train the other model parameters with a learning rate of $1e^{-3}$. Second, we release the parts of the visual CNN and train the entire model with a learning rate of $2e^{-4}$.
|
| 196 |
+
We stop training when the loss converges.
|
| 197 |
+
The model is optimized with the Adam \cite{Kingma2014Adam} optimizer. The batch size and margin are 128 and 0.2, respectively.
|
| 198 |
+
|
| 199 |
+
\begin{table}[t]
|
| 200 |
+
\caption{Comparison with the state-of-the-art methods using the same visual CNN as us on CUHK-PEDES. Top-1, top-5 and top-10 accuracies (\%) are reported. The best performance is bold.}
|
| 201 |
+
\centering
|
| 202 |
+
\label{table:results1}
|
| 203 |
+
\resizebox{0.95\columnwidth}!{
|
| 204 |
+
\begin{tabular}{l|l|lcl}
|
| 205 |
+
\hline
|
| 206 |
+
Method&Visual&Top-1&Top-5&Top-10 \\
|
| 207 |
+
\hline{CNN-RNN\shortcite{Reed2016Learning}}&VGG-16&8.07&{-}&32.47\\
|
| 208 |
+
{Neural Talk\shortcite{Vinyals2015Show}}&VGG-16&13.66&{-}&41.72\\
|
| 209 |
+
{GNA-RNN\shortcite{Li2017Person}}&VGG-16&19.05&{-}&53.64\\
|
| 210 |
+
{IATV\shortcite{Li2017Identity}}&VGG-16&25.94&{-}&60.48\\
|
| 211 |
+
{PWM-ATH\shortcite{Chen2018Improving}}&VGG-16&27.14&{49.45}&61.02\\
|
| 212 |
+
{Dual Path\shortcite{zheng2017dual}}&VGG-16&32.15&{54.42}&64.30\\
|
| 213 |
+
\textbf{PMA(ours)}&\textbf{VGG-16}&\textbf{47.02}&\textbf{68.54}&\textbf{78.06}\\
|
| 214 |
+
\hline
|
| 215 |
+
\hline{Dual Path\shortcite{zheng2017dual}}&Res-50&44.40&66.26&75.07\\
|
| 216 |
+
{GLA\shortcite{chen2018improve}}&Res-50&43.58&66.93&76.26\\
|
| 217 |
+
\textbf{PMA(ours)}&\textbf{Res-50}&\textbf{53.81}&\textbf{73.54}&\textbf{81.23}\\
|
| 218 |
+
|
| 219 |
+
\hline
|
| 220 |
+
\end{tabular}
|
| 221 |
+
}
|
| 222 |
+
\end{table}
|
| 223 |
+
\subsection{Quantitative Results}
|
| 224 |
+
\textbf{Comparison with the State-of-the-art Methods.} Table~\ref{table:results1} shows the comparison results with the state-of-the-art methods which use the same visual CNN (VGG-16 or ResNet-50) as we do.
|
| 225 |
+
Overall, it can be seen that our PMA achieves the best performances under top-1, top-5 and top-10 metrics. Specifically, compared with the best competitor Dual Path \cite{zheng2017dual}, our PMA significantly outperforms it under top-1 metric by about 15\% with the VGG-16 feature and 9\% with the ResNet-50 feature, respectively. The improved performances over the best competitor indicate that our PMA is very effective for this task. Compared with the methods (GNA-RNN \cite{Li2017Person}, IATV \cite{Li2017Identity}, PWM-ATH \cite{Chen2018Improving} and GLA \cite{chen2018improve}) which employ the attention mechanism to extract visual representations or textual representations, our PMA also achieves better performances under three evaluation metrics, which proves the superiorities of our similarity-based attention and pose-guided attention in selecting multi-granularity image-text relations so as to learn diverse and discriminative representations.
|
| 226 |
+
Although GLA \cite{chen2018improve} also learns the cross-modal representations by global and local
|
| 227 |
+
associations, the improved performance (10\%) over it suggests that our pose-guided multi-granularity attention network can
|
| 228 |
+
learn more discriminative and robust multi-granularity representations.
|
| 229 |
+
|
| 230 |
+
\begin{table}[t]
|
| 231 |
+
\caption{Effects of different vocabulary sizes and LSTMs on CUHK-PEDES. ResNet-50 is utilized as the visual CNN.}
|
| 232 |
+
\centering
|
| 233 |
+
\label{table:results4}
|
| 234 |
+
\begin{tabular}{l|lll}
|
| 235 |
+
\hline
|
| 236 |
+
Method&Top-1&Top-5&Top-10 \\
|
| 237 |
+
\hline{Base-9408}&46.51&68.45&77.32\\
|
| 238 |
+
{Base-LSTM}&47.02&69.70&78.33\\
|
| 239 |
+
{Base(bi-LSTM)}&\textbf{48.67}&\textbf{70.53}&\textbf{79.22}\\
|
| 240 |
+
\hline
|
| 241 |
+
\end{tabular}
|
| 242 |
+
\end{table}
|
| 243 |
+
|
| 244 |
+
\begin{table}[t]
|
| 245 |
+
\caption{Ablation analysis. We investigate the effectiveness of the concatenated pose before visual CNN (Con-pose), coarse alignment network (CA), and fine-grained alignment network (FA).}
|
| 246 |
+
\centering
|
| 247 |
+
\label{table:results-abla}
|
| 248 |
+
\begin{tabular}{cll|lll}
|
| 249 |
+
\hline
|
| 250 |
+
Con-pose&CA&FA&Top-1&Top-5&Top-10 \\
|
| 251 |
+
\hline{$\times$}&{$\times$}&{$\times$}&48.67&70.53&79.22\\
|
| 252 |
+
{$\surd$}&{$\times$}&{$\times$}&50.06 &71.27 &79.84\\
|
| 253 |
+
{$\surd$ }&{$\surd$ }&{$\times$}&52.20& 72.41 &80.48\\
|
| 254 |
+
{ $\surd$}&{$\surd$ }&{$\surd$ }&\textbf{53.81}&\textbf{73.54}&\textbf{81.23}\\
|
| 255 |
+
\hline
|
| 256 |
+
\end{tabular}
|
| 257 |
+
\end{table}
|
| 258 |
+
|
| 259 |
+
\textbf{Ablation Experiments.} To investigate the several components in PMA, we perform a set of ablation studies. The ResNet-50 is employed as the visual CNN in experiments.
|
| 260 |
+
|
| 261 |
+
We first investigate the importance of vocabulary size by utilizing all the words in the dataset (9408). The baseline model indicates utilizing the global visual and textual features to compute the similarity in experiments. In addition, there is no pose information.
|
| 262 |
+
As shown in Table~\ref{table:results4}, utilizing all the words in the dataset has a negative effect on the accuracy, which demonstrates that low-frequency words could make noise to the model. Then we investigate the effectiveness of bi-LSTM. Compared with unidirectional LSTM, the increased performances illustrate that bi-LSTM is more effective to encode textual description.
|
| 263 |
+
|
| 264 |
+
Table~\ref{table:results-abla} illustrates the effectiveness of concatenated pose confidence maps before visual CNN (Con-pose), coarse alignment network (CA), and fine-grained alignment network (FA).
|
| 265 |
+
The improved performances compared with the strong baseline demonstrate that Con-pose, CA and FA are all effective for text-based person search.
|
| 266 |
+
Specifically, concatenating the pose confidence maps with original input image indeed improves the matching performance, which demonstrates that pose information is effective in learning discriminative human-related representation. The performance improvement of Con-pose+CA over Con-pose
|
| 267 |
+
by 2.2\% in terms of top-1 metric indicates that CA can help our model select coarse description-related image regions and thus benefit the performances. In addition, the Con-pose+CA+FA outperforms the Con-pose+CA by 1.6\% in terms of top-1 metric, which proves the effectiveness of pose-guided fine-grained aligned matching. The overall performances further indicate that exploiting multi-granularity cross-modal relations are effective in image-text matching by learning sufficient and diverse discriminative representations.
|
| 268 |
+
|
| 269 |
+
\begin{table}[t]
|
| 270 |
+
\caption{Effects of selecting different numbers of regions and utilizing different attention mechanisms in CA. Adaptive hard attention is our proposed similarity-based hard attention model.}
|
| 271 |
+
\centering
|
| 272 |
+
\label{table:results3}
|
| 273 |
+
\resizebox{0.9\columnwidth}!{
|
| 274 |
+
\begin{tabular}{l|c|lll}
|
| 275 |
+
\hline
|
| 276 |
+
Method&Number of&Top-1&Top-5&Top-10 \\
|
| 277 |
+
{}&Regions&{}&{}&{} \\
|
| 278 |
+
\hline{PMA(CA-Hard)}&5&51.24&72.05&79.87\\
|
| 279 |
+
{PMA(CA-Hard)}&10&53.56&73.16&80.97\\
|
| 280 |
+
{PMA(CA-Hard)}&20&53.21&72.98&80.78\\
|
| 281 |
+
{PMA(CA-Soft)}&24&52.35&72.66&80.24\\
|
| 282 |
+
{PMA(CA-Hard)}&Adaptive&\textbf{53.81}&\textbf{73.54}&\textbf{81.23}\\
|
| 283 |
+
\hline
|
| 284 |
+
\end{tabular}
|
| 285 |
+
}
|
| 286 |
+
\end{table}
|
| 287 |
+
|
| 288 |
+
\begin{figure}[t]
|
| 289 |
+
\centering
|
| 290 |
+
\includegraphics[width=0.9\columnwidth]{138_plot.png}
|
| 291 |
+
\caption{The distribution diagram of the selected number of regions by our similarity-based hard attention network. (a) is the distribution diagram of positive pairs. (b) is the distribution diagram of positive and negative pairs.}
|
| 292 |
+
\label{fig:plot}
|
| 293 |
+
\end{figure}
|
| 294 |
+
|
| 295 |
+
\begin{figure*}[t]
|
| 296 |
+
\centering
|
| 297 |
+
\includegraphics[width=0.95\textwidth]{138_pose_atten.png}
|
| 298 |
+
\caption{Visualization of the similarity-based hard attention regions and pose-guided soft attention map on serval examples. (a) shows the selected regions in coarse alignment network. (b) shows the attention map in fine-grained alignment network.
|
| 299 |
+
The lighter regions and higher values indicate the attended areas.}
|
| 300 |
+
\label{fig:pose-atten}
|
| 301 |
+
\end{figure*}
|
| 302 |
+
|
| 303 |
+
\textbf{Analysis of Coarse Alignment Network.} In our experiments, we select a variational number of regions by our hard attention. As illustrated in Fig.~\ref{fig:plot}, our model mainly selects 6 regions with positive image-text pairs and 20 regions with negative image-text pairs, which demonstrates that our model can match the positive pairs better. For positive pairs, our PMA can select significant description-related regions. But for negative pairs, due to the lack of regions corresponding to the textual description, the similarity-based hard attention network is unable to select the regions with high similarity score and thus tends to select all regions in image.
|
| 304 |
+
|
| 305 |
+
We also exploit how the number of selected regions affects the performance of our PMA.
|
| 306 |
+
In experiments, we select the top $m$ regions according to their local similarities. Table~\ref{table:results3} shows the experimental results. We can see that the performance increases when increasing the number of selected regions, and saturates soon. It denotes that only some description-related regions are useful for matching. In addition, we compare our hard attention with the soft attention model which re-weights the local similarities according to their values. From the results, we can see that the soft attention performs worse than most of the hard attention, which demonstrates that our hard attention in CA is more effective due to filtering out unrelated visual features.
|
| 307 |
+
|
| 308 |
+
\begin{table}[t]
|
| 309 |
+
\caption{Effects of pose information and noun phrases used in fine-grained alignment network.}
|
| 310 |
+
\centering
|
| 311 |
+
\label{table:resultsFA}
|
| 312 |
+
\begin{tabular}{c|lll}
|
| 313 |
+
\hline
|
| 314 |
+
Method&Top-1&Top-5&Top-10 \\
|
| 315 |
+
\hline{PMA (FA w/o pose)}&52.54&72.69&80.73\\
|
| 316 |
+
{PMA (FA w/o noun phrase)}&52.71&72.87&80.69\\
|
| 317 |
+
{PMA (FA)}&\textbf{53.81}&\textbf{73.54}&\textbf{81.23}\\
|
| 318 |
+
\hline
|
| 319 |
+
\end{tabular}
|
| 320 |
+
\end{table}
|
| 321 |
+
|
| 322 |
+
\textbf{Analysis of Fine-Grained Alignment Network.} In experiments, we utilize 6 body parts rather than 14 score maps of body joints to guide the attention due to the fact that 14 score maps of body joints are just the coordinates of the joints. Therefore, it is difficult to model the relationships with image regions, as well as with the text. To investigate the effectiveness of pose information and noun phrases used in fine-grained alignment network, we perform ablation analysis by dropping one of them. When dropping the pose information, we utilize noun phrases to guide the attention of image regions by their similarities. In addition, dropping the noun phrases means we utilize every word in sentence. As shown in Table~\ref{table:resultsFA}, the performance decreases when dropping one of the key components in FA, which indicates that pose information is effective in selecting aligned image-text contents and noun phrase has more complete semantic information than word. Moreover, we perform the FA with hard attention just like CA but do not obtain meaningful results.
|
| 323 |
+
\subsection{Qualitative Results}
|
| 324 |
+
To verify whether the proposed model can selectively attend to the corresponding regions and make our matching procedure more interpretable, we visualize the attention weights of the similarity-based hard attention model and pose-guided soft attention model, respectively. Fig.~\ref{fig:pose-atten} shows the results, where lighter regions and higher values indicate the attended areas. We can see that the similarity-based hard attention indeed selects the image regions about the described human and filters out the unrelated regions. The pose-guided soft attention model can attend to the corresponding image regions and noun phrases to pose parts, which illustrates our model can learn accurate aligned fine-grained matching
|
| 325 |
+
by the guidance of pose information. Specifically, for the foot part, the model mainly attends to the foot region in image and grey tennis shoes in noun phrases. This fine-grained matching benefits the inference of image-text similarity.
|
| 326 |
+
\section{Conclusion}
|
| 327 |
+
We propose a novel pose-guided multi-granularity attention network for text-based person search in this paper.
|
| 328 |
+
Both coarse alignment network and fine-grained alignment network are proposed to learn multi-granularity cross-modal relevances. The coarse alignment network selects the description-related image regions by a similarity-based attention, while the fine-grained alignment network employs pose information to guide the attention of phrase-related visual contents. Extensive experiments with ablation analysis on a challenging dataset show that our approach outperforms the state-of-the-art methods by a large margin.
|
| 329 |
+
\section{Acknowledgments}
|
| 330 |
+
This work is jointly supported by National Key Research and Development Program of China (2016YFB1001000), National Natural Science Foundation of China (61525306, 61633021, 61721004, 61420106015, 61572504), Capital Science and Technology Leading Talent Training Project (Z181100006318030), and Beijing Science and Technology Project (Z181100008918010). This work is also supported by grants from NVIDIA and the NVIDIA DGX-1 AI Supercomputer.
|
| 331 |
+
|
| 332 |
+
\bibliographystyle{aaai}
|
| 333 |
+
\bibliography{138.egbib}
|
1809.08510v1.txt
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Anecdotally speaking, fluent bilingual speakers rarely face trouble translating a task learned in one language to another. For example, a bilingual speaker who is taught a math problem in English will trivially generalize to other known languages. Furthermore there is a large collection of evidence in linguistics arguing that although separate lexicons exist in multilingual speakers the core representations of concepts and theories are shared in memory (Altarriba, 1992; Mitchel, 2005; Bentin et al., 1985). The fundamental question we’re interested in answering is on the learnability of these shared representations within a statistical framework.
|
| 2 |
+
|
| 3 |
+
We approached this problem from a linguistics perspective. Languages have vastly varying syntactic features and rules. Linguistic Relativity studies the impact of these syntactic variations on the formations of concepts and theories (Au, 1983). Within this framework of study, the two schools of thoughts are linguistic determinism and weak linguistic influence. Linguistic determinism argues that language entirely forms the range of cognitive processes, including the creation of various concepts, but is generally agreed to be false (Hoijer, 1954; Au, 1983). Although there exists some weak linguistic influence, it is by no means fundamental (Ahearn, 2016). The superfluous nature of syntactic variations across languages brings forward the argument of principles and parameters (PnP) which hypothesizes the existence of a small distributed parameter representation that captures the syntactic variance between languages denoted by parameters (e.g. head-first or head-final syntax), as well as common principles shared across all languages (Culicover, 1997). Universal Grammar (UG) is the study of principles and the parameters that are universal across languages (Montague, 1970).
|
| 4 |
+
|
| 5 |
+
The ability to learn these universalities would allow us to learn representations of language that are fundamentally agnostic of the specific language itself. Doing so would allow us to learn a task in one language and reap the benefits of all other languages without needing multilingual datasets. Our attempt to learn these representations begins by taking inspiration from linguistics and formalizing UG as an optimization problem.
|
| 6 |
+
|
| 7 |
+
We train downstream models using language agnostic universal representations on a set of tasks and show the ability for the downstream models to generalize to languages that we did not train on.
|
| 8 |
+
|
| 9 |
+
Our work attempts to unite universal (task agnostic) representations with multilingual (language agnostic) representations (Peters et al., 2018; McCann et al., 2017). The recent trend in universal representations has been moving away from context-less unsupervised word embeddings to context-rich representations. Deep contextualized word representations (ELMo) trains an unsupervised language model on a large corpus of data and applies it to a large set of auxiliary tasks (Peters et al., 2018). These unsupervised representations boosted the performance of models on a wide array of tasks. Along the same lines McCann et al. (2017) showed the power of using latent representations of translation models as features across other non-translation tasks. In general, initializing models with pre-trained language models shows promise against the standard initialization with word embeddings. Even further, Radford et al. (2017) show that an unsupervised language model trained on a large corpus will contain a neuron that strongly correlates with sentiment without ever training on a sentiment task implying that unsupervised language models maybe picking up informative and structured signals.
|
| 10 |
+
|
| 11 |
+
In the field of multilingual representations, a fair bit of work has been done on multilingual word embeddings. Ammar et al. (2016) explored the possibility of training massive amounts of word embeddings utilizing either parallel data or bilingual dictionaries via the SkipGram paradigm. Later on an unsupervised approach to multilingual word representations was proposed by Chen & Cardie (2018) which utilized an adversarial training regimen to place word embeddings into a shared latent space. Although word embeddings show great utility, they fall behind methods which exploit sentence structure as well as words. Less work has been done on multilingual sentence representations. Most notably both Schwenk & Douze (2017) and Artetxe et al. (2017) propose a way to learn multilingual sentence representation through a translation task.
|
| 12 |
+
|
| 13 |
+
We propose learning language agnostic representations through constrained language modeling to capture the power of both multilingual and universal representations. By decoupling language from our representations we can train downstream models on monolingual data and automatically apply the models to other languages.
|
| 14 |
+
|
| 15 |
+
Statistical language models approximate the probability distribution of a series of words by predicting the next word given a sequence of previous words.p(w0,…,wn)=∏i=1np(wi∣w0,…,wi−1)𝑝subscript𝑤0…subscript𝑤𝑛superscriptsubscriptproduct𝑖1𝑛𝑝conditionalsubscript𝑤𝑖subscript𝑤0…subscript𝑤𝑖1p(w_{0},...,w_{n})=\prod_{i=1}^{n}p(w_{i}\mid w_{0},...,w_{i-1})where wisubscript𝑤𝑖w_{i} are indices representing words in an arbitrary vocabulary.
|
| 16 |
+
|
| 17 |
+
Learning grammar is equivalent to language modeling, as the support of p𝑝p will represent the set of all grammatically correct sentences. Furthermore, let pj(⋅)subscript𝑝𝑗⋅p_{j}(\cdot) represent the language model for the jth language and wjsuperscript𝑤𝑗w^{j} represents a word from the jth language. Let kjsubscript𝑘𝑗k_{j} represent a distributed representation of a specific language along the lines of the PnP argument (Culicover, 1997). UG, through the lens of statistical language modeling, hypothesizes the existence of a factorization of pj(⋅)subscript𝑝𝑗⋅p_{j}(\cdot) containing a language agnostic segment.The factorization used throughout this paper is the following:
|
| 18 |
+
|
| 19 |
+
b𝑏\displaystyle b=u∘ej(w0j,…,wij)absent𝑢subscript𝑒𝑗subscriptsuperscript𝑤𝑗0…subscriptsuperscript𝑤𝑗𝑖\displaystyle=u\circ e_{j}(w^{j}_{0},...,w^{j}_{i})(1)pj(wi∣w0,…,wi−1)subscript𝑝𝑗conditionalsubscript𝑤𝑖subscript𝑤0…subscript𝑤𝑖1\displaystyle p_{j}(w_{i}\mid w_{0},...,w_{i-1})=ej−1(h(b,kj))absentsuperscriptsubscript𝑒𝑗1ℎ𝑏subscript𝑘𝑗\displaystyle=e_{j}^{-1}(h(b,k_{j}))(2)s.t.d(𝐩(b∣jα)∣∣𝐩(b∣jβ))≤ϵ\displaystyle s.t.\quad d(\mathbf{p}(b\mid j_{\alpha})\mid\mid\mathbf{p}(b\mid j_{\beta}))\leq\epsilon(3)
|
| 20 |
+
|
| 21 |
+
The distribution matching constraint d𝑑d, insures that the representations across languages are common as hypothesized by the UG argument.
|
| 22 |
+
|
| 23 |
+
Function ej:ℕi→ℝi×d:subscript𝑒𝑗→superscriptℕ𝑖superscriptℝ𝑖𝑑e_{j}:\mathbb{N}^{i}\rightarrow\mathbb{R}^{i\times d} is a language specific function which takes an ordered set of integers representing tokens and outputs a vector of size d𝑑d per token. Function u:ℝi×d→ℝi×d:𝑢→superscriptℝ𝑖𝑑superscriptℝ𝑖𝑑u:\mathbb{R}^{i\times d}\rightarrow\mathbb{R}^{i\times d} takes the language specific representation and attempts to embed into a language agnostic representation. Function h:(ℝi×d,ℝf)→ℝi×d:ℎ→superscriptℝ𝑖𝑑superscriptℝ𝑓superscriptℝ𝑖𝑑h:(\mathbb{R}^{i\times d},\mathbb{R}^{f})\rightarrow\mathbb{R}^{i\times d} takes the universal representation as well as a distributed representation of the language of size f𝑓f and returns a language specific decoded representation. e−1superscript𝑒1e^{-1} maps our decoded representation back to the token space.
|
| 24 |
+
|
| 25 |
+
For the purposes of distribution matching we utilize the GAN framework. Following recent successes we use Wasserstein-1 as our distance function d𝑑d (Arjovsky et al., 2017).
|
| 26 |
+
|
| 27 |
+
Given two languages jαsubscript𝑗𝛼j_{\alpha} and jβsubscript𝑗𝛽j_{\beta} the distribution of the universal representations should be within ϵitalic-ϵ\epsilon with respect to the W1subscript𝑊1W_{1} of each other. Using the Kantarovich-Rubenstein duality we define
|
| 28 |
+
|
| 29 |
+
d(𝐩(b∣jα)∣∣𝐩(b∣jβ))=sup‖fα,β‖L≤1𝔼x∼𝐩(b∣jα)[fα,β(x)]−𝔼x∼𝐩(b∣jβ)[fα,β(x)]d(\mathbf{p}(b\mid j_{\alpha})\mid\mid\mathbf{p}(b\mid j_{\beta}))=\sup_{||f_{\alpha,\beta}||_{L}\leq 1}\mathbb{E}_{x\sim\mathbf{p}(b\mid j_{\alpha})}\left[f_{\alpha,\beta}(x)\right]-\mathbb{E}_{x\sim\mathbf{p}(b\mid j_{\beta})}\left[f_{\alpha,\beta}(x)\right](4)where L𝐿L is the Lipschitz constant of f𝑓f. Throughout this paper we satisfy the Lipschitz constraint by clamping the parameters to a compact space, as done in the original WGAN paper (Arjovsky et al., 2017). Therefore the complete loss function for m𝑚m languages each containing N𝑁N documents becomes:maxθ∑α=0m∑i=0Nlogpjα(wi,0α,…,wi,nα;θ)−λm2∑α=0m∑β=0md(𝐩(b∣jα)∣∣𝐩(b∣jβ))\max_{\theta}\sum_{\alpha=0}^{m}\sum_{i=0}^{N}\log p_{j_{\alpha}}(w_{i,0}^{\alpha},...,w_{i,n}^{\alpha};\theta)-\frac{\lambda}{m^{2}}\sum_{\alpha=0}^{m}\sum_{\beta=0}^{m}d(\mathbf{p}(b\mid j_{\alpha})\mid\mid\mathbf{p}(b\mid j_{\beta}))λ𝜆\lambda is a scaling factor for the distribution constraint loss.
|
| 30 |
+
|
| 31 |
+
Our specific implementation of this optimization problem we denote as UG-WGAN.Each function described in the previous section we implement using neural networks. For ejsubscript𝑒𝑗e_{j} in equation 1 we use a language specific embedding table followed by a LSTM (Hochreiter & Schmidhuber, 1997). Function u𝑢u in equation 1 is simply stacked LSTM’s. Function hℎh in equation 2 takes input from u𝑢u as well as a PnP representation of the language via an embedding table. Calculating the real inverse of e−1superscript𝑒1e^{-1} is non trivial therefore we use another language specific LSTM whose outputs we multiply by the transpose of the embedding table of e𝑒e to obtain token probabilities. For regularization we utilized dropout and locked dropout where appropriate (Gal & Ghahramani, 2016).
|
| 32 |
+
|
| 33 |
+
The critic, adopting the terminology from Arjovsky et al. (2017), takes the input from u𝑢u, feeds it through a stacked LSTM, aggregates the hidden states using linear sequence attention as described in DrQA (Chen et al., 2017). Once we have the aggregated state we map to a m×m𝑚𝑚m\times m matrix from where we can compute the total Wasserstein loss. A Batch Normalization layer is appended to the end of the critic (Ioffe & Szegedy, 2015). The α,β𝛼𝛽\alpha,\betath index in the matrix correspond to the function output of f𝑓f in calculating W1(𝐩(b∣jα)∣∣𝐩(b∣jβ))W_{1}(\mathbf{p}(b\mid j_{\alpha})\mid\mid\mathbf{p}(b\mid j_{\beta})).
|
| 34 |
+
|
| 35 |
+
We trained UG-WGAN with a variety of languages depending on the downstream task. For each language we utilized the respective Wikipedia dump. From the wikipedia dump we extract all pages using the wiki2text111https://github.com/rspeer/wiki2text utility and build language specific vocabularies consisting of 16k BPE tokens (Sennrich et al., 2015). During each batch we sample documents from our set of languages which are approximately the same length. We train our language model via BPTT where the truncation length progressively grows from 15 to 50 throughout training. The critic is updated 101010 times for every update of the language model. We trained each language model for 14 days on a NVidia Titan X. For each language model we would do a sweep over λ𝜆\lambda, but in general we have found that λ=0.1𝜆0.1\lambda=0.1 works sufficiently well for minimizing both perplexity and Wasserstein distance.
|
| 36 |
+
|
| 37 |
+
A couple of interesting questions arise from the described training procedure. Is the distribution matching constraint necessary or will simple joint language model training exhibit the properties we’re interested in? Can this optimization process fundamentally learn individual languages grammar while being constrained by a universal channel? What commonalities between languages can we learn and are they informative enough to be exploited?
|
| 38 |
+
|
| 39 |
+
We can test out the usefulness of the distribution matching constraint by running an ablation study on the λ𝜆\lambda hyper-parameter. We trained UG-WGAN on English, Spanish and Arabic wikidumps following the procedure described above. We kept all the hyper-parameters consistent apart for augmenting λ𝜆\lambda from 0 to 10. The results are shown in Figure 2. Without any weight on the distribution matching term the critic trivially learns to separate the various languages and no further training reduces the wasserstein distance. The joint language model internally learns individual language models who are partitioned in the latent space. We can see this by running a t-SNE plot on the universal (u(⋅)𝑢⋅u(\cdot)) representation of our model and seeing existence of clusters of the same language as we did in Figure 3 (Maaten & Hinton, 2008). An universal model satisfying the distribution matching constrain would mix all languages uniformly within it’s latent space.
|
| 40 |
+
|
| 41 |
+
To test the universality of UG-WGAN representations we will apply them to a set of orthogonal NLP tasks. We will leave the discussion on the learnability of grammar to the Discussion section of this paper.
|
| 42 |
+
|
| 43 |
+
By introducing a universal channel in our language model we reduced a representations dependence on a single language. Therefore we can utilize an arbitrary set of languages in training an auxiliary task over UG encodings. For example we can train a downstream model only on one languages data and transfer the model trivially to any other language that UG-WGAN was trained on.
|
| 44 |
+
|
| 45 |
+
To test this hypothesis we first trained UG-WGAN in English, Chinese and German following the procedure described in Section 4. The embedding size of the table was 300300300 and the internal LSTM hidden size was 512. A dropout rate of 0.10.10.1 was used and trained with the ADAM optimization method (Kingma & Ba, 2014). Since we are interested in the zero-shot capabilities of our representation, we trained our sentiment analysis model only on the english IMDB Large Movie Review dataset and tested it on the chinese ChnSentiCorp dataset and german SB-10K (Maas et al., 2011; Tan & Zhang, 2008). We binarize the label’s for all the datasets.
|
| 46 |
+
|
| 47 |
+
Our sentiment analysis model ran a bi-directional LSTM on top of fixed UG representations from where we took the last hidden state and computed a logistic regression. This was trained using standard SGD with momentum.
|
| 48 |
+
|
| 49 |
+
We also compare against encodings learned as a by-product of multi-encoder and decoder neural machine translation as a baseline (Klein et al., 2017). We see that UG representations are useful in situations when there is a lack of data in an specific language. The language agnostics properties of UG embeddings allows us to do successful zero-shot learning without needing any parallel corpus, furthermore the ability to generalize from language modeling to sentiment attests for the universal properties of these representations. Although we aren’t able to improve over the state of the art in a single language we are able to learn a model that does surprisingly well on a set of languages without multilingual data.
|
| 50 |
+
|
| 51 |
+
A natural language inference task consists of two sentences; a premise and a hypothesis which are either contradictions, entailments or neutral. Learning a NLI task takes a certain nuanced understanding of language. Therefore it is of interest whether or not UG-WGAN captures the necessary linguistic features. For this task we use the Stanford NLI (sNLI) dataset as our training data in english (Bowman et al., 2015). To test the zero-shot learning capabilities we created a russian sNLI test set by random sampling 400 sNLI test samples and having a native russian speaker translate both premise and hypothesis to russian. The label was kept the same.
|
| 52 |
+
|
| 53 |
+
For this experiment we trained UG-WGAN on the English and Russian language following the procedure described in Section 4. We kept the hyper-parameters equivalent to the Sentiment Analysis experiment. All of the NLI model tested were run over the fixed UG embeddings. We trained two different models from literature, Densely-Connected Recurrent and Co-Attentive Network by Kim et al. (2018) and Multiway Attention Network by Tan et al. (2018). Please refer to this papers for further implementation details.
|
| 54 |
+
|
| 55 |
+
UG representations contain enough information to non-trivially generalize the NLI task to unseen languages. That being said, we do see a relatively large drop in performance moving across languages which hints that either our calculation of the Wasserstein distance may not be sufficiently accurate or the universal representations are biased toward specific languages or tasks.
|
| 56 |
+
|
| 57 |
+
One hypothesis might be that as we increase λ𝜆\lambda the cross lingual generalization gap (difference in test error on a task across languages) will vanish. To test this hypothesis we conducted the same experiment where UG-WGAN was trained with a λ𝜆\lambda ranging from 00 to 101010. From each of the experiments we picked the model epoch which showed the best perplexity. The NLI specific model was the Densely-Connected Recurrent and Co-Attentive Network.
|
| 58 |
+
|
| 59 |
+
Increasing λ𝜆\lambda doesn’t seem to have a significant impact on the generalization gap but has a large impact on test error. Our hypothesis is that a large λ𝜆\lambda doesn’t provide the model with enough freedom to learn useful representations since the optimizations focus would largely be on minimizing the Wasserstein distance, while a small λ𝜆\lambda permits this freedom. One reason we might be seeing this generalization gap might be due to the way we satisfy the Lipschitz constraint. It’s been shown that there are better constraints than clipping parameters to a compact space such as a gradient penalty (Gulrajani et al., 2017). This is a future direction that can be explored.
|
| 60 |
+
|
| 61 |
+
Universal Grammar also comments on the learnability of grammar, stating that statistical information alone is not enough to learn grammar and some form of native language faculty must exist, sometimes titled the poverty of stimulus (POS) argument (Chomsky, 2010; Lewis & Elman, 2001). From a machine learning perspective, we’re interested in extracting informative features and not necessarily a completely grammatical language model. That being said it is of interest to what extent language models capture grammar and furthermore the extent to which models trained toward the universal grammar objective learn grammar.
|
| 62 |
+
|
| 63 |
+
One way to measure universality is by studying perplexity of our multi-lingual language model as we increase the number of languages. To do so we trained 6 UG-WGAN models on the following languages: English, Russian, Arabic, Chinese, German, Spanish, French. We maintain the same procedure as described above. The hidden size of the language model was increased to 1024 with 16K BPE tokens being used. The first model was trained on English Russian, second was trained on English Russian Arabic and so on. For arabic we still trained from left to right even though naturally the language is read from right to left. We report the results in Figure 5. As the number of languages increases the gap between a UG-WGAN without any distribution matching and one with diminishes. This implies that the efficiency and representative power of UG-WGAN grows as we increase the number of languages it has to model.
|
| 64 |
+
|
| 65 |
+
We see from Figure 2 that perplexity worsens proportional to λ𝜆\lambda. We explore the differences by sampling sentences from an unconstrained language model and λ=0.1𝜆0.1\lambda=0.1 language model trained towards English and Spanish in Table 3. In general there is a very small difference between a language model trained with a Universal Grammar objective and one without. The Universal Grammar model tends to make more gender mistakes and mistakes due to Plural-Singular Form in Spanish. In English we saw virtually no fundamental differences between the language models. This seems to hint the existence of an universal set of representations for languages, as hypothesized by Universal Grammar. And although completely learning grammar from statistical signals might be improbable, we can still extract useful information.
|
| 66 |
+
|
| 67 |
+
In this paper we introduced an unsupervised approach toward learning language agnostic universal representations by formalizing Universal Grammar as an optimization problem. We showed that we can use these representations to learn tasks in one language and automatically transfer them to others with no additional training. Furthermore we studied the importance of the Wasserstein constraint through the λ𝜆\lambda hyper-parameter. And lastly we explored the difference between a standard multi-lingual language model and UG-WGAN by studying the generated outputs of the respective language models as well as the perplexity gap growth with respect to the number of languages.
|
1809.08545v3.txt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Large scale object detection datasets like ImageNet [6], MS-COCO [35] and CrowdHuman [47] try to define the ground truth bounding boxes as clear as possible.
|
| 2 |
+
|
| 3 |
+
However, we observe that the ground-truth bounding boxes are inherently ambiguous in some cases. The ambiguities makes it hard to label and hard to learn the bounding box regression function.Some inaccurately labeled bounding boxes from MS-COCO are shown in Figure 1 (a)(c). When the object is partially occluded, the bounding box boundaries are even more unclear, shown in Figure 1 (d) from YouTube-BoundingBoxes [40].
|
| 4 |
+
|
| 5 |
+
Object detection is a multi-task learning problem consisting of object localization and object classification. Current state-of-the-art object detectors (e.g., Faster R-CNN [42], Cascade R-CNN [2] and Mask R-CNN [17]) rely on bounding box regression to localize objects.
|
| 6 |
+
|
| 7 |
+
However, the traditional bounding box regression loss (i.e., the smooth L1 loss [13]) does not take such the ambiguities of the ground truth bounding boxes into account.Besides, bounding box regression is assumed to be accurate when the classification score is high, which is not always the case, illustrated in Figure 2.
|
| 8 |
+
|
| 9 |
+
To address these problems, we propose a novel bounding box regression loss, namely KL Loss, for learning bounding box regression and localization uncertainty at the same time. Specifically, to capture the uncertainties of bounding box prediction, we first model the bounding box prediction and ground-truth bounding box as Gaussian distribution and Dirac delta function respectively. Then the new bounding box regression loss is defined as the KL divergence of the predicted distribution and ground-truth distribution. Learning with KL Loss has three benefits: (1) The ambiguities in a dataset can be successfully captured. The bounding box regressor gets smaller loss from ambiguous bounding boxes. (2) The learned variance is useful during post-processing. We propose var voting (variance voting) to vote the location of a candidate box using its neighbors’ locations weighted by the predicted variances during non-maximum suppression (NMS). (3) The learned probability distribution is interpretable. Since it reflects the level of uncertainty of the bounding box prediction, it can potentially be helpful in down-stream applications like self-driving cars and robotics [7, 16, 21].
|
| 10 |
+
|
| 11 |
+
To demonstrate the generality of KL Loss and var voting, we evaluate various CNN-based object detectors on both PASCAL VOC 2007 and MS-COCO including VGG-CNN-M-1024, VGG-16, ResNet-50-FPN, and Mask R-CNN. Our experiments suggest that our approach offers better object localization accuracy for CNN-based object detectors. For VGG-16 Faster R-CNN on MS-COCO, we improve the AP from 23.6% to 29.1%, with only 2ms increased inference latency on the GPU (GTX 1080 Ti). Furthermore, we apply this pipeline to ResNet-50-FPN Mask R-CNN and improve the AP and AP90 by 1.8% and 6.2% respectively, which outperforms the previous state-of-the-art bounding box refinement algorithm [27].
|
| 12 |
+
|
| 13 |
+
Although one-stage detection algorithms [36, 41, 30, 52] are efficient, state-of-the-art object detectors are based on two-stage, proposal-driven mechanism [42, 4, 5, 17, 31, 2]. Two-stage detectors generate cluttered object proposals, which result in a large number of duplicate bounding boxes. However, during the standard NMS procedure, bounding boxes with lower classification scores will be discarded even if their locations are accurate. Our var voting tries to utilize neighboring bounding boxes based on localization confidence for better localization of the selected boxes.
|
| 14 |
+
|
| 15 |
+
To better learn object detection, different kind of losses have been proposed. UnitBox [50] introduced an Intersection over Union (IoU) loss function for bounding box prediction. Focal Loss [34] deals with the class imbalance by changing the standard cross entropy loss such that well-classified examples are assigned lower weights. [39] optimizes for the mAP via policy gradient for learning globally optimized object detector. [28] introduces uncertainties for depth estimation. The idea is further extended to the 3D object detection [10, 9]. [29] proposes to weight multi-task loss for scene understanding by considering the uncertainty of each task. With KL Loss, our model can adaptively adjust variances for the boundaries of every object during training, which can help to learn more discriminative features.
|
| 16 |
+
|
| 17 |
+
NMS has been an essential part of computer vision for many decades. It is widely used in edge detection [44], feature point detection [37] and objection detection [13, 12, 42, 45].Recently, soft NMS and learning NMS [1, 24] are proposed to improve NMS results. Instead of eliminating all lower scored surrounding bounding boxes, soft-NMS [1] decays the detection scores of all other neighbors as a continuous function of their overlap with the higher scored bounding box. Learning NMS [24] proposed to learn a new neural network to perform NMS using only boxes and their classification scores.
|
| 18 |
+
|
| 19 |
+
MR-CNN [11] is first proposed to merge boxes during iterative localization. Relation network [25] proposes to learn the relation between bounding boxes. Recently, IoU-Net [27] proposes to learn the IoU between the predicted bounding box and the ground-truth bounding box. IoU-NMS is then applied to the detection boxes, guided by the learned IoU. Different from IoU-Net, we propose to learn the localization variance from a probabilistic perspective. It enables us to learn the variances for the four coordinates of a predicted bounding box separately instead of only IoU.Our var voting determine the new location of a selected box based on the variances of neighboring bounding boxes learned by KL Loss, which can work together with soft-NMS (Table 1 and Table 6).
|
| 20 |
+
|
| 21 |
+
In this section, we first introduce our bounding box parameterization. Then we propose KL Loss for training detection network with localization confidence. Finally, a new NMS approach is introduced for improving localization accuracy with our confidence estimation.
|
| 22 |
+
|
| 23 |
+
Based on a two-stage object detector Faster R-CNN or Mask R-CNN [42, 17] shown in Figure 3, we propose to regress the boundaries of a bounding box separately.Let (x1,y1,x2,y2)∈ℛ4subscript𝑥1subscript𝑦1subscript𝑥2subscript𝑦2superscriptℛ4(x_{1},y_{1},x_{2},y_{2})\in\mathcal{R}^{4} be the bounding box representation as a 4-dimensional vector, where each dimension is the box boundary location. We adopt the parameterizations of the (x1,y1,x2,y2)subscript𝑥1subscript𝑦1subscript𝑥2subscript𝑦2(x_{1},y_{1},x_{2},y_{2}) coordinates instead of the (x,y,w,h)𝑥𝑦𝑤ℎ(x,y,w,h) coordinates used by R-CNN [13]:tx1=x1−x1awa,tx2=x2−x2awaformulae-sequencesubscript𝑡subscript𝑥1subscript𝑥1subscript𝑥1𝑎subscript𝑤𝑎subscript𝑡subscript𝑥2subscript𝑥2subscript𝑥2𝑎subscript𝑤𝑎\displaystyle t_{x_{1}}=\frac{x_{1}-x_{1a}}{w_{a}},t_{x_{2}}=\frac{x_{2}-x_{2a}}{w_{a}}(1)ty1=y1−y1aha,ty2=y2−y2ahaformulae-sequencesubscript𝑡subscript𝑦1subscript𝑦1subscript𝑦1𝑎subscriptℎ𝑎subscript𝑡subscript𝑦2subscript𝑦2subscript𝑦2𝑎subscriptℎ𝑎\displaystyle t_{y_{1}}=\frac{y_{1}-y_{1a}}{h_{a}},t_{y_{2}}=\frac{y_{2}-y_{2a}}{h_{a}}tx1∗=x1∗−x1awa,tx2∗=x2∗−x2awaformulae-sequencesuperscriptsubscript𝑡subscript𝑥1superscriptsubscript𝑥1subscript𝑥1𝑎subscript𝑤𝑎superscriptsubscript𝑡subscript𝑥2superscriptsubscript𝑥2subscript𝑥2𝑎subscript𝑤𝑎\displaystyle t_{x_{1}}^{*}=\frac{x_{1}^{*}-x_{1a}}{w_{a}},t_{x_{2}}^{*}=\frac{x_{2}^{*}-x_{2a}}{w_{a}}ty1∗=y1∗−y1aha,ty2∗=y2∗−y2ahaformulae-sequencesuperscriptsubscript𝑡subscript𝑦1superscriptsubscript𝑦1subscript𝑦1𝑎subscriptℎ𝑎superscriptsubscript𝑡subscript𝑦2superscriptsubscript𝑦2subscript𝑦2𝑎subscriptℎ𝑎\displaystyle t_{y_{1}}^{*}=\frac{y_{1}^{*}-y_{1a}}{h_{a}},t_{y_{2}}^{*}=\frac{y_{2}^{*}-y_{2a}}{h_{a}}where tx1subscript𝑡subscript𝑥1t_{x_{1}}, ty1subscript𝑡subscript𝑦1t_{y_{1}}, tx2subscript𝑡subscript𝑥2t_{x_{2}}, ty2subscript𝑡subscript𝑦2t_{y_{2}} are the predicted offsets. tx1∗superscriptsubscript𝑡subscript𝑥1t_{x_{1}}^{*}, ty1∗superscriptsubscript𝑡subscript𝑦1t_{y_{1}}^{*}, tx2∗superscriptsubscript𝑡subscript𝑥2t_{x_{2}}^{*}, ty2∗superscriptsubscript𝑡subscript𝑦2t_{y_{2}}^{*} are the ground-truth offsets. x1asubscript𝑥1𝑎x_{1a}, x2asubscript𝑥2𝑎x_{2a}, y1asubscript𝑦1𝑎y_{1a}, y2asubscript𝑦2𝑎y_{2a}, wasubscript𝑤𝑎w_{a}, hasubscriptℎ𝑎h_{a} are from the anchor box. x1subscript𝑥1x_{1}, y1subscript𝑦1y_{1}, x2subscript𝑥2x_{2}, y2subscript𝑦2y_{2} are from the predicted box.In the following discussions, a bounding box coordinate is denoted as x𝑥x for simplicity because we can optimize each coordinate independently.
|
| 24 |
+
|
| 25 |
+
We aim to estimate the localization confidence along with the location. Formally, our network predicts a probability distribution instead of only bounding box location. Though the distribution could be more complex ones like multivariate Gaussian or a mixture of Gaussians, in this paper we assume the coordinates are independent and use single variate gaussian for simplicity:PΘ(x)=12πσ2e−(x−xe)22σ2subscript𝑃Θ𝑥12𝜋superscript𝜎2superscript𝑒superscript𝑥subscript𝑥𝑒22superscript𝜎2P_{\Theta}(x)=\frac{1}{\sqrt{2\pi\sigma^{2}}}e^{-\frac{(x-x_{e})^{2}}{2\sigma^{2}}}(2)where ΘΘ\Theta is the set of learnable parameters. xesubscript𝑥𝑒x_{e} is the estimated bounding box location. Standard deviation σ𝜎\sigma measures uncertainty of the estimation. When σ→0→𝜎0\sigma\rightarrow 0, it means our network is extremely confident about estimated bounding box location. It is produced by a fully-connected layer on top of the fast R-CNN head (fc7). Figure 3 illustrates the fast R-CNN head of our network architecture for object detection.
|
| 26 |
+
|
| 27 |
+
The ground-truth bounding box can also be formulated as a Gaussian distribution, with σ→0→𝜎0\sigma\rightarrow 0, which is a Dirac delta function:PD(x)=δ(x−xg)subscript𝑃𝐷𝑥𝛿𝑥subscript𝑥𝑔P_{D}(x)=\delta(x-x_{g})(3)where xgsubscript𝑥𝑔x_{g} is the ground-truth bounding box location.
|
| 28 |
+
|
| 29 |
+
The goal of object localization in our context is to estimate Θ^^Θ\hat{\Theta} that minimize the KL-Divergence between PΘ(x)subscript𝑃Θ𝑥P_{\Theta}(x) and PD(x)subscript𝑃𝐷𝑥P_{D}(x) [43] over N𝑁N samples:Θ^=argminΘ1N∑DKL(PD(x)||PΘ(x))\hat{\Theta}=\operatorname*{arg\,min}_{\Theta}\frac{1}{N}\sum D_{KL}(P_{D}(x)||P_{\Theta}(x))(4)We use the KL-Divergence as the loss function Lregsubscript𝐿𝑟𝑒𝑔L_{reg} for bounding box regression. The classification loss Lclssubscript𝐿𝑐𝑙𝑠L_{cls} remains the same. For a single sample:Lregsubscript𝐿𝑟𝑒𝑔\displaystyle L_{reg}=DKL(PD(x)||PΘ(x))\displaystyle=D_{KL}(P_{D}(x)||P_{\Theta}(x))(5)=∫PD(x)logPD(x)dx−∫PD(x)logPΘ(x)dxabsentsubscript𝑃𝐷𝑥subscript𝑃𝐷𝑥d𝑥subscript𝑃𝐷𝑥subscript𝑃Θ𝑥d𝑥\displaystyle=\int P_{D}(x)\log P_{D}(x)\text{d}x-\int P_{D}(x)\log P_{\Theta}(x)\text{d}x=(xg−xe)22σ2+log(σ2)2+log(2π)2−H(PD(x))absentsuperscriptsubscript𝑥𝑔subscript𝑥𝑒22superscript𝜎2superscript𝜎222𝜋2𝐻subscript𝑃𝐷𝑥\displaystyle=\frac{(x_{g}-x_{e})^{2}}{2\sigma^{2}}+\frac{\log(\sigma^{2})}{2}+\frac{\log(2\pi)}{2}-H(P_{D}(x))
|
| 30 |
+
|
| 31 |
+
Shown in Figure 4, when the location xesubscript𝑥𝑒x_{e} is estimated inaccurately, we expect the network to be able to predict larger variance σ2superscript𝜎2\sigma^{2} so that Lregsubscript𝐿𝑟𝑒𝑔L_{reg} will be lower.log(2π)/22𝜋2\log(2\pi)/2 and H(PD(x))𝐻subscript𝑃𝐷𝑥H(P_{D}(x)) do not depend on the estimated parameters ΘΘ\Theta, hence:Lreg∝(xg−xe)22σ2+12log(σ2)proportional-tosubscript𝐿𝑟𝑒𝑔superscriptsubscript𝑥𝑔subscript𝑥𝑒22superscript𝜎212superscript𝜎2\displaystyle L_{reg}\propto\frac{(x_{g}-x_{e})^{2}}{2\sigma^{2}}+\frac{1}{2}\log(\sigma^{2})(6)When σ=1𝜎1\sigma=1, KL Loss degenerates to the standard Euclidean loss:Lreg∝(xg−xe)22proportional-tosubscript𝐿𝑟𝑒𝑔superscriptsubscript𝑥𝑔subscript𝑥𝑒22\displaystyle L_{reg}\propto\frac{(x_{g}-x_{e})^{2}}{2}(7)The loss is differentiable w.r.t location estimation xesubscript𝑥𝑒x_{e} and localization standard deviation σ𝜎\sigma:ddxeLregddsubscript𝑥𝑒subscript𝐿𝑟𝑒𝑔\displaystyle\frac{\text{d}}{\text{d}x_{e}}L_{reg}=xe−xgσ2absentsubscript𝑥𝑒subscript𝑥𝑔superscript𝜎2\displaystyle=\frac{x_{e}-x_{g}}{\sigma^{2}}(8)ddσLregdd𝜎subscript𝐿𝑟𝑒𝑔\displaystyle\frac{\text{d}}{\text{d}\sigma}L_{reg}=−(xe−xg)2σ3+1σabsentsuperscriptsubscript𝑥𝑒subscript𝑥𝑔2superscript𝜎31𝜎\displaystyle=-\frac{(x_{e}-x_{g})^{2}}{\sigma^{3}}+\frac{1}{\sigma}However, since σ𝜎\sigma is in the denominators, the gradient sometimes can explode at the beginning of training. To avoid gradient exploding, our network predicts α=log(σ2)𝛼superscript𝜎2\alpha=\log(\sigma^{2}) instead of σ𝜎\sigma in practice:Lreg∝e−α2(xg−xe)2+12αproportional-tosubscript𝐿𝑟𝑒𝑔superscript𝑒𝛼2superscriptsubscript𝑥𝑔subscript𝑥𝑒212𝛼\displaystyle L_{reg}\propto\frac{e^{-\alpha}}{2}(x_{g}-x_{e})^{2}+\frac{1}{2}\alpha(9)We convert α𝛼\alpha back to σ𝜎\sigma during testing.
|
| 32 |
+
|
| 33 |
+
For |xg−xe|>1subscript𝑥𝑔subscript𝑥𝑒1|x_{g}-x_{e}|>1, we adopt a loss similar to the smooth L1subscript𝐿1L_{1} loss defined in Fast R-CNN [12]:Lreg=e−α(|xg−xe|−12)+12αsubscript𝐿𝑟𝑒𝑔superscript𝑒𝛼subscript𝑥𝑔subscript𝑥𝑒1212𝛼L_{reg}=e^{-\alpha}(|x_{g}-x_{e}|-\frac{1}{2})+\frac{1}{2}\alpha(10)
|
| 34 |
+
|
| 35 |
+
We initialize the weights of the FC layer for α𝛼\alpha prediction with random Gaussian initialization. The standard deviation and mean are set to 0.0001 and 0 respectively, so that KL Loss will be similar to the standard smooth L1 loss at the beginning of training. (Equation 9 and Equation 10).
|
| 36 |
+
|
| 37 |
+
After we obtain the variance of predicted location, it is intuitive to vote candidate bounding box location according to the learned variances of neighboring bounding boxes.Shown in Algorithm 1, we change NMS with three lines of code:
|
| 38 |
+
|
| 39 |
+
We vote the location of selected boxes within the loop of standard NMS or soft-NMS [1]. After selecting the detection with maximum score b𝑏b,{x1,y1,x2,y2,s,σx1,σy1,σx2,σy2}subscript𝑥1subscript𝑦1subscript𝑥2subscript𝑦2𝑠subscript𝜎subscript𝑥1subscript𝜎subscript𝑦1subscript𝜎subscript𝑥2subscript𝜎subscript𝑦2\{x_{1},y_{1},x_{2},y_{2},s,\sigma_{x_{1}},\sigma_{y_{1}},\sigma_{x_{2}},\sigma_{y_{2}}\}, its new location is computed according to itself and its neighboring bounding boxes. Inspired by soft-NMS, we assign higher weights for boxes that are closer and have lower uncertainties. Formally, let x𝑥x be a coordinate (e.g., x1subscript𝑥1x_{1}) and xisubscript𝑥𝑖x_{i} be the coordinate of i𝑖ith box. The new coordinate is computed as follow:pisubscript𝑝𝑖\displaystyle p_{i}=e−(1−IoU(bi,b))2/σtabsentsuperscript𝑒superscript1𝐼𝑜𝑈subscript𝑏𝑖𝑏2subscript𝜎𝑡\displaystyle=e^{-(1-IoU(b_{i},b))^{2}/\sigma_{t}}(11)x𝑥\displaystyle x=∑ipixi/σx,i2∑ipi/σx,i2absentsubscript𝑖subscript𝑝𝑖subscript𝑥𝑖superscriptsubscript𝜎𝑥𝑖2subscript𝑖subscript𝑝𝑖superscriptsubscript𝜎𝑥𝑖2\displaystyle=\frac{\sum_{i}p_{i}x_{i}/\sigma_{x,i}^{2}}{\sum_{i}p_{i}/\sigma_{x,i}^{2}}subject to IoU(bi,b)>0subject to 𝐼𝑜𝑈subscript𝑏𝑖𝑏0\displaystyle\text{subject\ to }IoU(b_{i},b)>0σtsubscript𝜎𝑡\sigma_{t} is a tunable parameter of var voting. Two types of neighboring bounding boxes will get lower weights during voting: (1)Boxes with high variances. (2) Boxes that have small IoU with the selected box. Classification score is not involved in the voting, since lower scored boxes may have higher localization confidence. In Figure 5, we provide a visual illustration of var voting. With var voting, the two situations as mentioned earlier in Figure 2 that lead to detection failure can sometimes be avoided.
|
| 40 |
+
|
| 41 |
+
To demonstrate our method for accurate object detection, we use two datasets: MS-COCO [35] and PASCAL VOC 2007 [8].We use four GPUs for our experiments. The training schedule and batch size are adjusted according to the linear scaling rule [15].For VGG-CNN-M-1024 and VGG-16 Net [48], our implementation is based on Caffe [26].For ResNet-50 FPN [18, 33] and Mask R-CNN [17], our implementation is based on Detectron [14].For VGG-16 [48] Faster R-CNN, following py-faster-rcnn111github.com/rbgirshick/py-faster-rcnn, we train on train2014 and test on val2014. For other object detection networks, we train and test on the newly defined train2017 and val2017 respectively. We set σtsubscript𝜎𝑡\sigma_{t} to 0.02. Unless specified, all hyper-parameters are set to default222github.com/facebookresearch/Detectron.
|
| 42 |
+
|
| 43 |
+
We evaluate the contribution of each element in our detection pipeline:KL Loss, soft-NMS and var voting with VGG-16 Faster R-CNN. The detailed results are shown in Table 1.
|
| 44 |
+
|
| 45 |
+
Surprisingly, simply training with KL Loss greatly improves the AP by 2.8%, which is also observed on ResNet-50 Faster R-CNN and Mask R-CNN (1.5% and 0.9% improvement respectively, shown in Table 3 and Table 4). First, by learning to predict high variances for samples with high uncertainties during training, the network can learn more from useful samples. Second, the gradient for localization can be adaptively controlled by the network during training (Equation 8), which encourages the network to learn more accurate object localization. Third, KL Loss incorporates learning localization confidence which can potentially help the network to learn more discriminative features.
|
| 46 |
+
|
| 47 |
+
The learned variances through our KL Loss are interpretable. Our network will output higher variances for challenging object boundaries, which can be useful in vision applications like self-driving cars and robotics. The first row of Figure 5 shows some qualitative examples of the standard deviation learned through our KL Loss.
|
| 48 |
+
|
| 49 |
+
As expected, soft-NMS performs consistently on both baseline and our network trained with KL Loss. It improves the AP by 1.2% and 1.4% on the baseline and our network respectively, shown in Table 1.
|
| 50 |
+
|
| 51 |
+
Finally, with var voting, the AP is further improved to 29.1%. We made the observation that improvement mainly comes from the more accurate localization. Notice that the AP50 is only improved by 0.1%. However, AP75, APM and APL are improved by 1.8%, 1.8%, and 1.6% respectively, shown in Table 1. This indicates that classification confidence is not always associated with localization confidence. Therefore, learning localization confidence apart from classification confidence is important for more accurate object localization.
|
| 52 |
+
|
| 53 |
+
We also found that var voting and soft-NMS can work well together. Applying var voting with the standard NMS improves the AP by 1.4%. Applying var voting after soft-NMS still can improve the AP by 1.3%. We argue that soft-NMS is good at scoring candidate bounding boxes which improve overall performance, whereas var voting is good at refining those selected bounding boxes for more accurate object localization. The second row of Figure 5 shows some qualitative examples of our var voting.
|
| 54 |
+
|
| 55 |
+
Shown in Figure 6, we test the sensitivity of the tunable parameter σtsubscript𝜎𝑡\sigma_{t} for var voting. When σt=0subscript𝜎𝑡0\sigma_{t}=0, var voting is not activated. We observe that the AP75, AP80 and AP90 can be significantly affected by σtsubscript𝜎𝑡\sigma_{t}, while AP50 is less sensitive to σtsubscript𝜎𝑡\sigma_{t}. Acceptable values of σtsubscript𝜎𝑡\sigma_{t} varies from around 0.005∼0.05similar-to0.0050.050.005\sim 0.05. We use σt=0.02subscript𝜎𝑡0.02\sigma_{t}=0.02 in all experiments.
|
| 56 |
+
|
| 57 |
+
We also evaluate the inference time of our improved VGG-16 Faster R-CNN on a single GTX 1080 Ti GPU with CUDA 8 and CUDNN 6, as it is crucial for resource-limited applications [51, 20, 23, 19, 32].Shown in Table 2, our approach only increases 2ms latency on GPU. Different from IoUNet [27] which uses 2mlp head for IoU prediction, our approach only requires a 4096×32440963244096\times 324 fully-connected layer for the localization confidence prediction.
|
| 58 |
+
|
| 59 |
+
We test the effectiveness of KL Loss with different RoI box heads on a deeper backbone: ResNet-50. res5/conv5 head consists of 9 convolutional layers which can be applied to each RoI as fast R-CNN head. 2mlp head consists of two fully connected layers. res5 head can learn more complex representation than the commonly used 2mlp head. Shown in Table 3, KL Loss can improve the AP by 0.9% with mask. KL Loss can further improve the AP by 1.5% with conv5 head. We hypothesize that the localization variance is much more challenging to learn than localization, therefore KL Loss can benefit more from the expressiveness of conv5 head. Since conv5 head is not commonly used in recent state-of-the-art detectors, we still adopt the 2mlp head in the following experiments.
|
| 60 |
+
|
| 61 |
+
Table 4 summarizes the performance of different methods for accurate object detection on ResNet-50-FPN Mask R-CNN. With KL Loss, the network can learn to adjust the gradient for ambiguous bounding boxes during training. As a result, Mask R-CNN trained with KL Loss performs significantly better than the baseline for high overlap metrics like AP90. Variance Voting improves the localization results by voting the location according to the localization confidences of neighboring bounding boxes. AP80 and AP90 are further improved by 0.4% and 1.2% respectively. Variance Voting is also compatible with soft-NMS. Variance Voting combined with soft-NMS improves the AP90 and the overall AP of the final model by 6.2% and 1.8% respectively. Compared with IoUNet [27]: (1) our variance and localization are learned together with KL Loss, which improves the performance. (2) KL Loss does not require a separate 2mlp head for learning localization confidence, which introduces nearly no additional computation. (3) var voting does not require iterative refinement, which is much faster.
|
| 62 |
+
|
| 63 |
+
We further evaluate our approach on the feature pyramid network (ResNet-50 FPN) [33, 18], shown in Table 6.
|
| 64 |
+
|
| 65 |
+
For fast R-CNN version, training with KL Loss increases the baseline by 0.4%. After applying var voting along with soft-NMS, our model achieves 38.0% in AP, which outperforms both IoU-NMS and soft-NMS baselines. Training end-to-end with KL Loss can help the network learn more discriminative features, which improves the baseline AP by 0.6%. The final model achieves 39.2% in AP, which improves the baseline by 1.3%.
|
| 66 |
+
|
| 67 |
+
Even though our approach is designed for large scale object detection, it could also generalize well on small datasets. We perform experiments with Faster R-CNN [42] on PASCAL VOC 2007, which consists of about 5k voc_2007_trainval images and 5k voc_2007_test images over 20 object categories. Backbone networks: VGG-CNN-M-1024 and VGG-16 Net [48] are tested.
|
| 68 |
+
|
| 69 |
+
Shown in Table 5, we compare our approach with soft-NMS and quadratic unconstrained binary optimization (QUBO [46]).For QUBO, we test both greedy and classical tabu solver (we manually tuned the penalty term for both solvers to get better performance). We observe that it is much worse than the standard NMS, though it was reported to be better for pedestrian detection. We hypothesize that QUBO is better at pedestrian detection since there are more occluded bounding boxes [47].For VGG-CNN-M-1024, training with var voting improves the mAP by 1.6%. var voting further improves the mAP by 0.8%.For VGG-16, our approach improves the mAP by 2.9%, combined with soft-NMS.We notice that var voting could still improve performance even after soft-NMS is applied to the initial detection boxes. This observation is consistent with our experiments on MS-COCO (Table 1).
|
| 70 |
+
|
| 71 |
+
To conclude, the uncertainties in large-scale object detection datasets can hinder the performance of state-of-the-art object detectors. Classification confidence is not always strongly related to localization confidence. In this paper, a novel bounding box regression loss with uncertainty is proposed for learning more accurate object localization. By training with KL Loss, the network learns to predict localization variance for each coordinate. The resulting variances empower var voting, which can refine the selected bounding boxes via voting. Compelling results are demonstrated for VGG-16 Faster R-CNN, ResNet-50 FPN and Mask R-CNN on both MS-COCO and PASCAL VOC 2007.
|
1809.08700v2.txt
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The study of fairness in machine learning is driven by an abundance of exampleswhere learning algorithms were perceived as discriminating against protectedgroups [29, 6]. Addressing this problem requires a conceptual —perhaps even philosophical — understanding of what fairness means in thiscontext. In other words, the million dollar question is(arguably111Certain papers take a somewhat differentview [17].) this: What are the formal constraints that fairnessimposes on learning algorithms?
|
| 2 |
+
|
| 3 |
+
In this paper, we propose a new measure of algorithmic fairness. It draws on an extensive body of work onrigorous approaches to fairness, which — modulo one possible exception (seeSection 1.2) — has not been tapped by machine learningresearchers: the literature on fair division [3, 20]. Themost prominent notion is that of envy-freeness [10, 31],which, in the context of the allocation of goods, requires that the utility ofeach individual for his allocation be at least as high as his utility for theallocation of any other individual; for six decades, it has been the gold standard of fairness forproblems such as cake cutting [25, 24] and rent division[28, 12]. In the classification setting, envy-freeness would simplymean that the utility of each individual for his distribution over outcomes isat least as high as his utility for the distribution over outcomes assigned toany other individual.
|
| 4 |
+
|
| 5 |
+
It is important to say upfront that envy-freeness is not suitable for several widely-studied problems where there are only two possible outcomes, one of which is ‘good’ and the other ‘bad’; examples include predicting whether an individual would default on a loan, and whether an offender would recidivate. In these degenerate cases, envy-freeness would require that the classifier assign each and every individual the exact same probability of obtaining the ‘good’ outcome, which, clearly, is not a reasonable constraint.
|
| 6 |
+
|
| 7 |
+
By contrast, we are interested in situations where there is a diverse set of possible outcomes, and individuals have diverse preferences for those outcomes. For example, consider a system responsible for displaying credit cardadvertisements to individuals. There are many credit cards with differenteligibility requirements, annual rates, and reward programs. An individual’sutility for seeing a card’s advertisement will depend on his eligibility,his benefit from the rewards programs, and potentially other factors. It maywell be the case that an envy-free advertisement assignment shows Bobadvertisements for a card with worse annual rates than those shown to Alice; this outcome is not unfair if Bob is genuinely more interested in the cardoffered to him. Such rich utility functions are also evident in the context ofjob advertisements [6]: people generally want higher paying jobs, butwould presumably have higher utility for seeing advertisements for jobs thatbetter fit their qualifications and interests.
|
| 8 |
+
|
| 9 |
+
A second appealing property of envy-freeness is that its fairness guaranteebinds at the level of individuals. Fairness notions can be coarselycharacterized as being either individual notions, or group notions, depending onwhether they provide guarantees to specific individuals, or only on average to aprotected subgroup. The majority of work on fairness in machine learning focuseson group fairness [18, 9, 35, 13, 15, 34].
|
| 10 |
+
|
| 11 |
+
There is, however, one well-known example of individual fairness: the influential fairclassification model of Dwork et al. [9]. The model involves a set of individualsand a set of outcomes. The centerpiece of the model is a similaritymetric on the space of individuals; it is specific to the classification taskat hand, and ideally captures the ethical ground truth about relevantattributes. For example, a man and a woman who are similar in every other wayshould be considered similar for the purpose of credit card offerings, butperhaps not for lingerie advertisements. Assuming such a metric is available,fairness can be naturally formalized as a Lipschitz constraint, which requiresthat individuals who are close according to the similarity metric be mapped todistributions over outcomes that are close according to some standard metric(such as total variation).
|
| 12 |
+
|
| 13 |
+
As attractive as this model is, it has one clear weakness from a practicalviewpoint: the availability of a similarity metric. Dwork et al. [9] are wellaware of this issue; they write that justifying this assumption is “one of themost challenging aspects” of their approach. They add that “in reality themetric used will most likely only be society’s current best approximation to thetruth.” But, despite recent progress on automating ethical decisions in certaindomains [23, 11], the task-specific nature of the similaritymetric makes even a credible approximation thereof seem unrealistic. Inparticular, if one wanted to learn a similarity metric, it is unclear what typeof examples a relevant dataset would consist of.
|
| 14 |
+
|
| 15 |
+
In place of a metric, envy-freeness requires access to individuals’ utilityfunctions, but — by contrast — we do not view this assumption as abarrier to implementation. Indeed, there are a variety of techniques forlearning utility functions [4, 22, 2]. Moreover, in our runningexample of advertising, one can use standard measures like expectedclick-through rate (CTR) as a good proxy for utility.
|
| 16 |
+
|
| 17 |
+
It is worth noting that the classification setting is different from classicfair division problems in that the “goods” (outcomes) are non-excludable. Infact, one envy-free solution simply assigns each individual to his favoriteoutcome. But this solution may be severely suboptimal according to another (standard) component of our setting, the loss function, which, in the examples above, might represent the expected revenue from showing an ad to an individual. Typically the loss function is not perfectly aligned with individual utilities, and, therefore, it maybe possible to achieve smaller loss than the naïve solution without violating the envy-freenessconstraint.
|
| 18 |
+
|
| 19 |
+
In summary, we view envy-freeness as a compelling, well-established, and,importantly, practicable notion of individual fairness for classification taskswith a diverse set of outcomes when individuals have heterogeneous preferences.Our goal is to understand its learning-theoretic properties.
|
| 20 |
+
|
| 21 |
+
The challenge is that the space of individuals is potentially huge, yet we seek to provide universal envy-freeness guarantees. To this end, we are given a sample consisting of individuals drawn from an unknown distribution. We are interested in learning algorithms that minimize loss, subject to satisfying the envy-freeness constraint, on the sample. Our primary technical question is that of generalizability, that is, given a classifier that is envy free on a sample, is it approximately envy free on the underlying distribution? Surprisingly, Dwork et al. [9] do not study generalizability in their model, and we are aware of only one subsequent paper that takes a learning-theoretic viewpoint on individual fairness and gives theoretical guarantees (see Section 1.2).
|
| 22 |
+
|
| 23 |
+
In Section 3, we do not constrain the classifier. Therefore, we need some strategy to extend a classifier that is defined on a sample; assigning an individual the same outcome as his nearest neighbor in the sample is a popular choice. However, we show that any strategy for extending a classifier from a sample, on which it is envy free, to the entire set of individuals is unlikely to be approximately envy free on the distribution, unless the sample is exponentially large.
|
| 24 |
+
|
| 25 |
+
For this reason, in Section 4, we focus on structured families of classifiers. On a high level, our goal is to relate the combinatorial richness of the family to generalization guarantees. One obstacle is that standard notions of dimension do not extend to the analysis of randomized classifiers, whose range is distributions over outcomes (equivalently, real vectors). We circumvent this obstacle by considering mixtures of deterministic classifiers that belong to a family of bounded Natarajan dimension (an extension of the well-known VC dimension to multi-class classification). Our main theoretical result asserts that, under this assumption, envy-freeness on a sample does generalize to the underlying distribution, even if the sample is relatively small (its size grows almost linearly in the Natarajan dimension).
|
| 26 |
+
|
| 27 |
+
Finally, in Section 5, we design and implement an algorithm that learns (almost) envy-free mixtures of linear one-vs-all classifiers. We present empirical results that validate our computational approach, and indicate good generalization properties even when the sample size is small.
|
| 28 |
+
|
| 29 |
+
Conceptually, our work is most closely related to work by Zafar et al. [34]. They are interested in group notions of fairness, and advocate preference-based notions instead of parity-based notions. In particular, they assume that each group has a utility function for classifiers, and define the preferred treatment property, which requires that the utility of each group for its own classifier be at least its utility for the classifier assigned to any other group. Their model and results focus on the case of binary classification where there is a desirable outcome and an undesirable outcome, so the utility of a group for a classifier is simply the fraction of its members that are mapped to the desirable outcome. Although, at first glance, this notion seems similar to envy-freeness, it is actually fundamentally different.222On a philosophical level, the fair division literature deals exclusively with individual notions of fairness. In fact, even in group-based extensions of envy-freeness [19] the allocation is shared by groups, but individuals must not be envious. We subscribe to the view that group-oriented notions (such as statistical parity) are objectionable, because the outcome can be patently unfair to individuals.Our paper is also completely different from that of Zafar et al. in terms of technical results; theirs are purely empirical in nature, and focus on the increase in accuracy obtained when parity-based notions of fairness are replaced with preference-based ones.
|
| 30 |
+
|
| 31 |
+
Concurrent work by Rothblum and Yona [26] provides generalization guarantees for the metric notion of individual fairness introduced by Dwork et al. [9], or, more precisely, for an approximate version thereof. There are two main differences compared to our work: first, we propose envy-freeness as an alternative notion of fairness that circumvents the need for a similarity metric. Second, they focus on randomized binary classification, which amounts to learning a real-valued function, and so are able to make use of standard Rademacher complexity results to show generalization. By contrast, standard tools do not directly apply in our setting. It is worth noting that several other papers provide generalization guarantees for notions of group fairness, but these are more distantly related to our work [35, 32, 8, 16, 14].
|
| 32 |
+
|
| 33 |
+
We assume that there isa space 𝒳𝒳\mathcal{X} of individuals, a finite space 𝒴𝒴\mathcal{Y} of outcomes, and a utility function u:𝒳×𝒴→[0,1]:𝑢→𝒳𝒴01u:\mathcal{X}\times\mathcal{Y}\to[0,1] encoding the preferencesof each individual for the outcomes in 𝒴𝒴\mathcal{Y}. In the advertising example, individuals are users, outcomes are advertisements, and the utility function reflects the benefit an individual derives from being shown a particular advertisement. For any distribution p∈Δ(𝒴)𝑝Δ𝒴p\in\Delta(\mathcal{Y}) (where Δ(𝒴)Δ𝒴\Delta(\mathcal{Y}) is the set of distributions over 𝒴𝒴\mathcal{Y}) we letu(x,p)=𝔼y∼p[u(x,y)]𝑢𝑥𝑝subscript𝔼similar-to𝑦𝑝𝑢𝑥𝑦u(x,p)=\operatorname*{\mathbb{E}}_{y\sim p}[u(x,y)] denote individual x𝑥x’s expected utilityfor an outcome sampled from p𝑝p. We refer to a function h:𝒳→Δ(𝒴):ℎ→𝒳Δ𝒴h:\mathcal{X}\to\Delta(\mathcal{Y}) as a classifier, even though it can return a distribution over outcomes.
|
| 34 |
+
|
| 35 |
+
Roughly speaking, a classifier h:𝒳→Δ(𝒴):ℎ→𝒳Δ𝒴h:\mathcal{X}\to\Delta(\mathcal{Y}) is envy free if no individual prefers theoutcome distribution of someone else over his own.
|
| 36 |
+
|
| 37 |
+
Any classifier that is EF on a sample S𝑆S of individuals is also(α,β)𝛼𝛽(\alpha,\beta)-pairwise EF on any pairing of the individuals in S𝑆S, for any α≥0𝛼0\alpha\geq 0 and β≥0𝛽0\beta\geq 0. Theweaker pairwise EF condition is all that is required for ourgeneralization guarantees to hold.
|
| 38 |
+
|
| 39 |
+
Our formal learning problem can be stated as follows. Given sample access to anunknown distribution P𝑃P over individuals 𝒳𝒳\mathcal{X} and their utility functions, and a known loss function ℓ:𝒳×𝒴→[0,1]:ℓ→𝒳𝒴01\ell:\mathcal{X}\times\mathcal{Y}\to[0,1], find a classifier h:𝒳→Δ(𝒴):ℎ→𝒳Δ𝒴h:\mathcal{X}\to\Delta(\mathcal{Y}) that is(α,β)𝛼𝛽(\alpha,\beta)-EF with respect to P𝑃P minimizing expected loss 𝔼x∼P[ℓ(x,h(x))]subscript𝔼similar-to𝑥𝑃ℓ𝑥ℎ𝑥\operatorname*{\mathbb{E}}_{x\sim P}[\ell(x,h(x))], where for x∈𝒳𝑥𝒳x\in\mathcal{X} and p∈Δ(𝒴)𝑝Δ𝒴p\in\Delta(\mathcal{Y}), ℓ(x,p)=𝔼y∼p[ℓ(x,y)]ℓ𝑥𝑝subscript𝔼similar-to𝑦𝑝ℓ𝑥𝑦\ell(x,p)=\operatorname*{\mathbb{E}}_{y\sim p}[\ell(x,y)].
|
| 40 |
+
|
| 41 |
+
We follow the empirical risk minimization (ERM)learning approach, i.e., we collect a sample of individuals drawn i.i.d fromP𝑃P and find an EF classifier with low loss on the sample. Formally, given a sample of individuals S={x1,…,xn}𝑆subscript𝑥1…subscript𝑥𝑛S=\{x_{1},\ldots,x_{n}\} and their utility functions uxi(⋅)=u(xi,⋅)subscript𝑢subscript𝑥𝑖⋅𝑢subscript𝑥𝑖⋅u_{x_{i}}(\cdot)=u(x_{i},\cdot), we are interested in a classifier h:S→Δ(𝒴):ℎ→𝑆Δ𝒴h:S\to\Delta(\mathcal{Y}) that minimizes ∑i=1nℓ(xi,h(xi))superscriptsubscript𝑖1𝑛ℓsubscript𝑥𝑖ℎsubscript𝑥𝑖\sum_{i=1}^{n}\ell(x_{i},h(x_{i})) among all classifiers that are EF on S𝑆S.
|
| 42 |
+
|
| 43 |
+
Recall that we consider randomized classifiers that can assign a distribution over outcomes to each of the individuals. However, one might wonder whether the EF classifier that minimizes loss on a sample happens to always be deterministic. Or, at least, the optimal deterministic classifier on the sample might incur a loss that is very close to that of the optimal randomized classifier. If this were true, we could restrict ourselves to classifiers of the form h:𝒳→𝒴:ℎ→𝒳𝒴h:\mathcal{X}\to\mathcal{Y}, which would be much easier to analyze. Unfortunately, it turns out that this is not the case. In fact, there could be an arbitrary (multiplicative) gap between the optimal randomized EF classifier and the optimal deterministic EF classifier. The intuition behind this is as follows. A deterministic classifier that has very low loss on the sample, but is not EF, would be completely discarded in the deterministic setting. On the other hand, a randomized classifier could take this loss-minimizing deterministic classifier and mix it with a classifier with high “negative envy”, so that the mixture ends up being EF and at the same time has low loss. This is made concrete in the following example.
|
| 44 |
+
|
| 45 |
+
An important (and typical) aspect of our learning problem is that the classifierhℎh needs to provide an outcome distribution for every individual, not justthose in the sample. For example, if hℎh chooses advertisements for visitors ofa website, the classifier should still apply when a new visitor arrives.Moreover, when we use the classifier for new individuals, it must continue to beEF. In this section, we consider two-stage approaches that first choose outcomedistributions for the individuals in the sample, and then extend those decisionsto the rest of 𝒳𝒳\mathcal{X}.
|
| 46 |
+
|
| 47 |
+
In more detail, we are given a sample S={x1,…,xn}𝑆subscript𝑥1…subscript𝑥𝑛S=\{x_{1},\dots,x_{n}\} of individualsand a classifier h:S→Δ(𝒴):ℎ→𝑆Δ𝒴h:S\to\Delta(\mathcal{Y}) assigning outcome distributions to eachindividual. Our goal is to extend these assignments to a classifierh¯:𝒳→Δ(𝒴):¯ℎ→𝒳Δ𝒴\overline{h}:\mathcal{X}\to\Delta(\mathcal{Y}) that can be applied to new individuals aswell. For example, hℎh could be the loss-minimizing EF classifier on the sampleS𝑆S.
|
| 48 |
+
|
| 49 |
+
For this section, weassume that 𝒳𝒳\mathcal{X} is equipped with a distance metric d𝑑d. Moreover, we assume in this section that the utility function u𝑢u is L𝐿L-Lipschitz on 𝒳𝒳\mathcal{X}. That is, forevery y∈𝒴𝑦𝒴y\in\mathcal{Y} and for all x,x′∈𝒳𝑥superscript𝑥′𝒳x,x^{\prime}\in\mathcal{X}, we have |u(x,y)−u(x′,y)|≤L⋅d(x,x′)𝑢𝑥𝑦𝑢superscript𝑥′𝑦⋅𝐿𝑑𝑥superscript𝑥′|u(x,y)-u(x^{\prime},y)|\leq L\cdot d(x,x^{\prime}).
|
| 50 |
+
|
| 51 |
+
Under the foregoing assumptions, one natural way to extend the classifier on the sampleto all of 𝒳𝒳\mathcal{X} is to assign new individuals the same outcome distributionas their nearest neighbor in the sample. Formally, for a set S⊂𝒳𝑆𝒳S\subset\mathcal{X} and any individualx∈𝒳𝑥𝒳x\in\mathcal{X}, let NNS(x)∈arg minx′∈Sd(x,x′)subscriptNN𝑆𝑥subscriptarg minsuperscript𝑥′𝑆𝑑𝑥superscript𝑥′\operatorname{NN}_{S}(x)\in\text{arg\,min}_{x^{\prime}\in S}d(x,x^{\prime}) denote the nearest neighbor of x𝑥x in S𝑆S withrespect to the metric d𝑑d (breaking ties arbitrarily). The following simple result (whose proof is relegated to Appendix B) establishes that this approach preserves envy-freeness in cases wherethe sample is exponentially large.
|
| 52 |
+
|
| 53 |
+
The conditions of Theorem 1 require that the set ofindividuals S𝑆S is a β/(2L)𝛽2𝐿\beta/(2L)-net for at least a (1−α)1𝛼(1-\alpha)-fraction ofthe mass of P𝑃P on 𝒳𝒳\mathcal{X}. In several natural situations, an exponentially largesample guarantees that this occurs with high probability. For example, if 𝒳𝒳\mathcal{X}is a subset of ℝqsuperscriptℝ𝑞\mathbb{R}^{q}, d(x,x′)=‖x−x′‖2𝑑𝑥superscript𝑥′subscriptnorm𝑥superscript𝑥′2d(x,x^{\prime})=\|x-x^{\prime}\|_{2}, and 𝒳𝒳\mathcal{X} has diameter atmost D𝐷D, then for any distribution P𝑃P on 𝒳𝒳\mathcal{X}, if S𝑆S is an i.i.d. sample of sizeO(1α(LDqβ)q(qlogLDqβ+log1δ))𝑂1𝛼superscript𝐿𝐷𝑞𝛽𝑞𝑞𝐿𝐷𝑞𝛽1𝛿O(\frac{1}{\alpha}(\frac{LD\sqrt{q}}{\beta})^{q}(q\log\frac{LD\sqrt{q}}{\beta}+\log\frac{1}{\delta})), it will satisfy the conditions ofTheorem 1 with probability at least 1−δ1𝛿1-\delta. Thissampling result is folklore, but, for the sake of completeness, we prove it in Lemma 3of Appendix B.
|
| 54 |
+
|
| 55 |
+
However, the exponential upper bound given by the nearest neighbor strategy is as far as we can go in terms of generalizing envy-freeness from a sample (without further assumptions). Specifically, our next result establishes that any algorithm — even randomized — for extending classifiers from the sample to the entire space 𝒳𝒳\mathcal{X}requires an exponentially large sample of individuals to ensure envy-freeness onthe distribution P𝑃P. The proof of Theorem 2 can be found in Appendix B.
|
| 56 |
+
|
| 57 |
+
We remark that a similar result would hold even if we sampled S𝑆S with replacement; we sample here without replacement purely for ease of exposition.
|
| 58 |
+
|
| 59 |
+
In this section we show that (despite Theorem 2) generalization forenvy-freeness is possible using much smaller samples of individuals, as long aswe restrict ourselves to classifiers from a family of relatively low complexity.
|
| 60 |
+
|
| 61 |
+
In more detail, two classic complexity measures are the VC-dimension [30]for binary classifiers, and the Natarajandimension [21] for multi-class classifiers. However, tothe best of our knowledge, there is no suitable dimension directly applicable tofunctions ranging over distributions, which in our case can be seen as|𝒴|𝒴|\mathcal{Y}|-dimensional real vectors. One possibility would be to restrict ourselvesto deterministic classifiers of the type h:𝒳→𝒴:ℎ→𝒳𝒴h:\mathcal{X}\to\mathcal{Y}, but we haveseen in Section 2 that envy-freeness is a very strong constrainton deterministic classifiers. Instead, we will consider a family ℋℋ\mathcal{H}consisting of randomized mixtures of m𝑚m deterministic classifiers belonging to afamily 𝒢⊂{g:𝒳→𝒴}𝒢conditional-set𝑔→𝒳𝒴\mathcal{G}\subset\{g:\mathcal{X}\to\mathcal{Y}\} of low Natarajan dimension. This allowsus to adapt Natarajan-dimension-based generalization results to our settingwhile still working with randomized classifiers. The definition and relevant properties of the Natarajan dimension are summarized in Appendix A.
|
| 62 |
+
|
| 63 |
+
Formally,let g→=(g1,…,gm)∈𝒢m→𝑔subscript𝑔1…subscript𝑔𝑚superscript𝒢𝑚\vec{g}=(g_{1},\dots,g_{m})\in\mathcal{G}^{m} be a vector of m𝑚m functions in 𝒢𝒢\mathcal{G} and η∈Δm𝜂subscriptΔ𝑚\eta\in\Delta_{m} be adistribution over [m]delimited-[]𝑚[m], where Δm={p∈ℝm:pi≥0,∑ipi=1}subscriptΔ𝑚conditional-set𝑝superscriptℝ𝑚formulae-sequencesubscript𝑝𝑖0subscript𝑖subscript𝑝𝑖1\Delta_{m}=\{p\in\mathbb{R}^{m}\,:\,p_{i}\geq 0,\sum_{i}p_{i}=1\} is the m𝑚m-dimensional probability simplex. Then consider thefunction hg→,η:𝒳→Δ(𝒴):subscriptℎ→𝑔𝜂→𝒳Δ𝒴h_{\vec{g},\eta}:\mathcal{X}\to\Delta(\mathcal{Y}) with assignmentprobabilities given byPr(hg→,η(x)=y)=∑i=1m𝕀{gi(x)=y}ηi.Prsubscriptℎ→𝑔𝜂𝑥𝑦superscriptsubscript𝑖1𝑚𝕀subscript𝑔𝑖𝑥𝑦subscript𝜂𝑖\operatorname*{Pr}(h_{\vec{g},\eta}(x)=y)=\sum_{i=1}^{m}\mathbb{I}\{g_{i}(x)=y\}\eta_{i}.Intuitively, for a given individual x𝑥x, hg→,ηsubscriptℎ→𝑔𝜂h_{\vec{g},\eta} chooses one ofthe gisubscript𝑔𝑖g_{i} randomly with probability ηisubscript𝜂𝑖\eta_{i}, and outputs gi(x)subscript𝑔𝑖𝑥g_{i}(x). Letℋ(𝒢,m)={hg→,η:𝒳→Δ(𝒴):g→∈𝒢m,η∈Δm}ℋ𝒢𝑚conditional-setsubscriptℎ→𝑔𝜂:→𝒳Δ𝒴formulae-sequence→𝑔superscript𝒢𝑚𝜂subscriptΔ𝑚\mathcal{H}(\mathcal{G},m)=\{h_{\vec{g},\eta}:\mathcal{X}\to\Delta(\mathcal{Y})\,:\,\vec{g}\in\mathcal{G}^{m},\eta\in\Delta_{m}\}be the family of classifiers that can be writtenthis way. Our main technical result shows that envy-freeness generalizes forthis class.
|
| 64 |
+
|
| 65 |
+
The proof of Theorem 3 is relegated to Appendix C. In a nutshell, it consists of two steps. First,we show that envy-freeness generalizes for finite classes. Second, we show thatℋ(𝒢,m)ℋ𝒢𝑚\mathcal{H}(\mathcal{G},m) can be approximated by a finite subset.
|
| 66 |
+
|
| 67 |
+
We remark that the theorem is only effective insofar as families of classifiers of low Natarajan dimension are useful. Fortunately, several prominent families indeed have low Natarajan dimension [5], including one vs. all, multiclass SVM, tree-based classifiers, and error correcting output codes.
|
| 68 |
+
|
| 69 |
+
So far we have not directly addressed the problem of computing the loss-minimizing envy-free classifier from a given family on a given sample of individuals. We now turn to this problem. Our goal is not to provide an end-all solution, but rather to provide evidence that computation will not be a long-term obstacle to implementing our approach.
|
| 70 |
+
|
| 71 |
+
In more detail, our computational problem is to find the loss-minimizing classifier hℎh from a given family of randomized classifiers ℋℋ\mathcal{H} that is envy free on a given a sample of individuals S={x1,…,xn}𝑆subscript𝑥1…subscript𝑥𝑛S=\{x_{1},\dots,x_{n}\}. For this classifier hℎh to generalize to the distribution P𝑃P, Theorem 3 suggests that the family ℋℋ\mathcal{H} to use is of the form ℋ(𝒢,m)ℋ𝒢𝑚\mathcal{H}(\mathcal{G},m), where 𝒢𝒢\mathcal{G} is a family of deterministic classifiers of low Natarajan dimension.
|
| 72 |
+
|
| 73 |
+
In this section, we let 𝒢𝒢\mathcal{G} be the family of linear one-vs-all classifiers. In particular, denoting 𝒳⊂ℝq𝒳superscriptℝ𝑞\mathcal{X}\subset\mathbb{R}^{q}, each g∈𝒢𝑔𝒢g\in\mathcal{G} is parameterized by w→=(w1,w2,…,w|𝒴|)∈ℝ|𝒴|×q→𝑤subscript𝑤1subscript𝑤2…subscript𝑤𝒴superscriptℝ𝒴𝑞\vec{w}=(w_{1},w_{2},\dots,w_{|\mathcal{Y}|})\in\mathbb{R}^{|\mathcal{Y}|\times q}, whereg(x)=argmaxy∈𝒴(wy⊤x)𝑔𝑥subscriptargmax𝑦𝒴superscriptsubscript𝑤𝑦top𝑥g(x)=\text{argmax}_{y\in\mathcal{Y}}\left(w_{y}^{\top}x\right).This class 𝒢𝒢\mathcal{G} has a Natarajan dimension of at most q|𝒴|𝑞𝒴q|\mathcal{Y}|. The optimization problem to solve in this case isming→∈𝒢m,η∈Δm∑i=1n∑k=1mηkL(xi,gk(xi))subscriptformulae-sequence→𝑔superscript𝒢𝑚𝜂subscriptΔ𝑚superscriptsubscript𝑖1𝑛superscriptsubscript𝑘1𝑚subscript𝜂𝑘𝐿subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖\displaystyle\min_{\vec{g}\in\mathcal{G}^{m},\eta\in\Delta_{m}}\quad\sum_{i=1}^{n}\sum_{k=1}^{m}\eta_{k}L(x_{i},g_{k}(x_{i}))s.t.∑k=1mηku(xi,gk(xi))≥∑k=1mηku(xi,gk(xj))∀(i,j)∈[n]2.formulae-sequences.t.superscriptsubscript𝑘1𝑚subscript𝜂𝑘𝑢subscript𝑥𝑖subscript���𝑘subscript𝑥𝑖superscriptsubscript𝑘1𝑚subscript𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑗for-all𝑖𝑗superscriptdelimited-[]𝑛2\displaystyle\text{s.t.}\quad\sum_{k=1}^{m}\eta_{k}u(x_{i},g_{k}(x_{i}))\geq\sum_{k=1}^{m}\eta_{k}u(x_{i},g_{k}(x_{j}))\quad\forall(i,j)\in[n]^{2}.(1)
|
| 74 |
+
|
| 75 |
+
Observe that optimization problem (5) is highly non-convex and non-differentiable as formulated, because of the argmax computed in each of the gk(xi)subscript𝑔𝑘subscript𝑥𝑖g_{k}(x_{i}). Another challenge is the combinatorial nature of the problem, as we need to find m𝑚m functions from 𝒢𝒢\mathcal{G} along with their mixing weights. In designing an algorithm, therefore, we employ several tricks of the trade to achieve tractability.
|
| 76 |
+
|
| 77 |
+
Learning the mixture components.We first assume predefined mixing weights η~~𝜂\tilde{\eta}, and iteratively learn mixture components based on them. Specifically, let g1,g2,…gk−1subscript𝑔1subscript𝑔2…subscript𝑔𝑘1g_{1},g_{2},\dots g_{k-1} denote the classifiers learned so far. To compute the next component gksubscript𝑔𝑘g_{k}, we solve the optimization problem (5) with these components already in place (and assuming no future ones). This induces the following optimization problem.mingk∈𝒢∑i=1nL(xi,gk(xi))subscriptsubscript𝑔𝑘𝒢superscriptsubscript𝑖1𝑛𝐿subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖\displaystyle\min_{g_{k}\in\mathcal{G}}\quad\sum_{i=1}^{n}L(x_{i},g_{k}(x_{i}))s.t.USFii(k−1)+η~ku(xi,gk(xi))≥USFij(k−1)+η~ku(xi,gk(xj))∀(i,j)∈[n]2,formulae-sequences.t.𝑈𝑆superscriptsubscript𝐹𝑖𝑖𝑘1subscript~𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖𝑈𝑆superscriptsubscript𝐹𝑖𝑗𝑘1subscript~𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑗for-all𝑖𝑗superscriptdelimited-[]𝑛2\displaystyle\text{s.t.}\quad USF_{ii}^{(k-1)}+\tilde{\eta}_{k}u(x_{i},g_{k}(x_{i}))\geq USF_{ij}^{(k-1)}+\tilde{\eta}_{k}u(x_{i},g_{k}(x_{j}))\quad\forall(i,j)\in[n]^{2},(2)where USFij(k−1)𝑈𝑆superscriptsubscript𝐹𝑖𝑗𝑘1USF_{ij}^{(k-1)} denotes the expected utility i𝑖i has for j𝑗j’s assignments so far, i.e., USFij(k−1)=∑c=1k−1η~cu(xi,gc(xj))𝑈𝑆superscriptsubscript𝐹𝑖𝑗𝑘1superscriptsubscript𝑐1𝑘1subscript~𝜂𝑐𝑢subscript𝑥𝑖subscript𝑔𝑐subscript𝑥𝑗USF_{ij}^{(k-1)}=\sum_{c=1}^{k-1}\tilde{\eta}_{c}u(x_{i},g_{c}(x_{j})).
|
| 78 |
+
|
| 79 |
+
Solving the optimization problem (5.1) is still non-trivialbecause it remains non-convex and non-differentiable. To resolve this, we first soften the constraints333This may lead to solutions that are not exactly EF on the sample. Nonetheless, Theorem 3 still guarantees that there should not be much additional envy on the testing data.. Writing out the optimization problem in the form equivalent to introducing slack variables, we obtainmingk∈𝒢∑i=1nL(xi,gk(xi))subscriptsubscript𝑔𝑘𝒢superscriptsubscript𝑖1𝑛𝐿subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖\displaystyle\min_{g_{k}\in\mathcal{G}}\quad\sum_{i=1}^{n}L(x_{i},g_{k}(x_{i}))+λ∑i≠jmax(USFij(k−1)+η~ku(xi,gk(xj))−USFii(k−1)−η~ku(xi,gk(xi)),0),𝜆subscript𝑖𝑗𝑈𝑆superscriptsubscript𝐹𝑖𝑗𝑘1subscript~𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑗𝑈𝑆superscriptsubscript𝐹𝑖𝑖𝑘1subscript~𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖0\displaystyle\qquad\quad+\lambda\sum_{i\neq j}\max\left(USF_{ij}^{(k-1)}+\tilde{\eta}_{k}u(x_{i},g_{k}(x_{j}))-USF_{ii}^{(k-1)}-\tilde{\eta}_{k}u(x_{i},g_{k}(x_{i})),0\right),(3)where λ𝜆\lambda is a parameter that defines the trade-off between loss and envy-freeness.This optimization problem is still highly non-convex as gk(xi)=argmaxy∈𝒴wy⊤xisubscript𝑔𝑘subscript𝑥𝑖subscriptargmax𝑦𝒴superscriptsubscript𝑤𝑦topsubscript𝑥𝑖g_{k}(x_{i})=\text{argmax}_{y\in\mathcal{Y}}w_{y}^{\top}x_{i}, where w→→𝑤\vec{w} denotes the parameters of gksubscript𝑔𝑘g_{k}. To solve this, we perform a convex relaxation on several components of the objective using the fact that wgk(xi)⊤xi≥wy′⊤xisuperscriptsubscript𝑤subscript𝑔𝑘subscript𝑥𝑖topsubscript𝑥𝑖superscriptsubscript𝑤superscript𝑦′topsubscript𝑥𝑖w_{g_{k}(x_{i})}^{\top}x_{i}\geq w_{y^{\prime}}^{\top}x_{i} for any y′∈𝒴superscript𝑦′𝒴y^{\prime}\in\mathcal{Y}. Specifically, we haveL(xi,gk(xi))≤maxy∈𝒴{L(xi,y)+wy⊤xi−wyi⊤xi},𝐿subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖subscript𝑦𝒴𝐿subscript𝑥𝑖𝑦superscriptsubscript𝑤𝑦topsubscript𝑥𝑖superscriptsubscript𝑤subscript𝑦𝑖topsubscript𝑥𝑖L(x_{i},g_{k}(x_{i}))\leq\max_{y\in\mathcal{Y}}\left\{L(x_{i},y)+w_{y}^{\top}x_{i}-w_{y_{i}}^{\top}x_{i}\right\},−u(xi,gk(xi))≤maxy∈𝒴{−u(xi,y)+wy⊤xi−wbi���xi}, and𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖subscript𝑦𝒴𝑢subscript𝑥𝑖𝑦superscriptsubscript𝑤𝑦topsubscript𝑥𝑖superscriptsubscript𝑤subscript𝑏𝑖topsubscript𝑥𝑖 and-u(x_{i},g_{k}(x_{i}))\leq\max_{y\in\mathcal{Y}}\left\{-u(x_{i},y)+w_{y}^{\top}x_{i}-w_{b_{i}}^{\top}x_{i}\right\},\text{ and}u(xi,gk(xj))≤maxy∈𝒴{u(xi,y)+wy⊤xj−wsi⊤xj},𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑗subscript𝑦𝒴𝑢subscript𝑥𝑖𝑦superscriptsubscript𝑤𝑦topsubscript𝑥𝑗superscriptsubscript𝑤subscript𝑠𝑖topsubscript𝑥𝑗u(x_{i},g_{k}(x_{j}))\leq\max_{y\in\mathcal{Y}}\left\{u(x_{i},y)+w_{y}^{\top}x_{j}-w_{s_{i}}^{\top}x_{j}\right\},where yi=argminy∈𝒴L(xi,y)subscript𝑦𝑖subscriptargmin𝑦𝒴𝐿subscript𝑥𝑖𝑦y_{i}=\text{argmin}_{y\in\mathcal{Y}}L(x_{i},y), si=argminy∈𝒴u(xi,y)subscript𝑠𝑖subscriptargmin𝑦𝒴𝑢subscript𝑥𝑖𝑦s_{i}=\text{argmin}_{y\in\mathcal{Y}}u(x_{i},y) and bi=argmaxy∈𝒴u(xi,y)subscript𝑏𝑖subscriptargmax𝑦𝒴𝑢subscript𝑥𝑖𝑦b_{i}=\text{argmax}_{y\in\mathcal{Y}}\ u(x_{i},y).While we provided the key steps here, complete details and the rationale behind these choices are given in Appendix D. On a very high-level, these are inspired by multi-class SVMs. Finally, plugging these relaxations into (5.1), we obtain the following convex optimization problem to compute each mixture component.minw→∈ℝ|𝒴|×q∑i=1nmaxy∈𝒴{L(xi,y)+wy⊤xi−wyi⊤xi}+λ∑i≠jmax(USFij(k−1)\displaystyle\min_{\vec{w}\in\mathbb{R}^{|\mathcal{Y}|\times q}}\quad\sum_{i=1}^{n}\max_{y\in\mathcal{Y}}\left\{L(x_{i},y)+w_{y}^{\top}x_{i}-w_{y_{i}}^{\top}x_{i}\right\}+\lambda\sum_{i\neq j}\max\left(USF_{ij}^{(k-1)}\right.(4)+η~kmaxy∈𝒴{u(xi,y)+wy⊤xj−wsi⊤xj}−USFii(k−1)+η~kmaxy∈𝒴{−u(xi,y)+wy⊤xi−wbi⊤xi},0).\displaystyle\left.+\tilde{\eta}_{k}\max_{y\in\mathcal{Y}}\left\{u(x_{i},y)+w_{y}^{\top}x_{j}-w_{s_{i}}^{\top}x_{j}\right\}-USF_{ii}^{(k-1)}+\tilde{\eta}_{k}\max_{y\in\mathcal{Y}}\left\{-u(x_{i},y)+w_{y}^{\top}x_{i}-w_{b_{i}}^{\top}x_{i}\right\},0\right).
|
| 80 |
+
|
| 81 |
+
Learning the mixing weights.Once the mixture components g→→𝑔\vec{g} are learned (with respect to the predefined mixing weights η~~𝜂\tilde{\eta}), we perform an additional round of optimization to learn the optimal weights η𝜂\eta for them. This can be done via the following linear programminη∈Δm,ξ∈ℝ≥0n×n∑i=1n∑k=1mηkL(xi,gk(xi))+λ∑i≠jξijsubscriptformulae-sequence𝜂subscriptΔ𝑚𝜉superscriptsubscriptℝabsent0𝑛𝑛superscriptsubscript𝑖1𝑛superscriptsubscript𝑘1𝑚subscript𝜂𝑘𝐿subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖𝜆subscript𝑖𝑗subscript𝜉𝑖𝑗\displaystyle\min_{\eta\in\Delta_{m},\xi\in\mathbb{R}_{\geq 0}^{n\times n}}\quad\sum_{i=1}^{n}\sum_{k=1}^{m}\eta_{k}L(x_{i},g_{k}(x_{i}))+\lambda\sum_{i\neq j}\xi_{ij}s.t.∑k=1mηku(xi,gk(xi))≥∑k=1mηku(xi,gk(xj))−ξij∀(i,j).formulae-sequences.t.superscriptsubscript𝑘1𝑚subscript𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑖superscriptsubscript𝑘1𝑚subscript𝜂𝑘𝑢subscript𝑥𝑖subscript𝑔𝑘subscript𝑥𝑗subscript𝜉𝑖𝑗for-all𝑖𝑗\displaystyle\text{s.t.}\quad\sum_{k=1}^{m}\eta_{k}u(x_{i},g_{k}(x_{i}))\geq\sum_{k=1}^{m}\eta_{k}u(x_{i},g_{k}(x_{j}))-\xi_{ij}\quad\forall(i,j).(5)
|
| 82 |
+
|
| 83 |
+
To validate our approach, we have implemented our algorithm. However, we cannotrely on standard datasets, as we need access to both the features and theutility functions of individuals. Hence, we rely on synthetic data. All our code is included as supplementary material.Our experiments arecarried out on a desktop machine with 16GB memory and an Intel Xeon(R) CPUE5-1603 v3 @ 2.80GHz×\times4 processor. To solve convex optimizationproblems, we use CVXPY [7, 1].
|
| 84 |
+
|
| 85 |
+
In our experiments, we cannot compute the optimal solution to the original optimization problem (5), and there are no existing methods we can use as benchmarks. Hence, we generate the dataset such that we know the optimal solution upfront.
|
| 86 |
+
|
| 87 |
+
Specifically, to generate the whole dataset (both training and test), we first generate random classifiers g→⋆∈𝒢msuperscript→𝑔⋆superscript𝒢𝑚\vec{g}^{\star}\in\mathcal{G}^{m} by sampling their parameters w→1,…w→m∼𝒩(0,1)|𝒴|×qsimilar-tosubscript→𝑤1…subscript→𝑤𝑚𝒩superscript01𝒴𝑞\vec{w}_{1},\dots\vec{w}_{m}\sim\mathcal{N}(0,1)^{|\mathcal{Y}|\times q}, and generate η⋆∈Δmsuperscript𝜂⋆subscriptΔ𝑚\eta^{\star}\in\Delta_{m} by drawing uniformly random weights in [0,1]01[0,1] and normalizing. We use hg→⋆,η⋆subscriptℎsuperscript→𝑔⋆superscript𝜂⋆h_{\vec{g}^{\star},\eta^{\star}} as the optimal solution of the dataset we generate. For each individual, we sample each feature value independently and u.a.r. in [0,1]01[0,1].For each individual x𝑥x and outcome y𝑦y, we set L(x,y)=0𝐿𝑥𝑦0L(x,y)=0 if y∈{gk⋆(x):k∈[m]}𝑦conditional-setsuperscriptsubscript𝑔𝑘⋆𝑥𝑘delimited-[]𝑚y\in\{g_{k}^{\star}(x):k\in[m]\} and otherwise we sample L(x,y)𝐿𝑥𝑦L(x,y) u.a.r. in [0,1]01[0,1].For the utility function u𝑢u, we need to generate it such that the randomized classifier hg→⋆,η⋆subscriptℎsuperscript→𝑔⋆superscript𝜂⋆h_{\vec{g}^{\star},\eta^{\star}} is envy free on the dataset. For this, we set up a linear program and compute each of the values u(x,y)𝑢𝑥𝑦u(x,y). Hence, hg→⋆,η⋆subscriptℎsuperscript→𝑔⋆superscript𝜂⋆h_{\vec{g}^{\star},\eta^{\star}} is envy free and has zero loss, so it is obviously the optimal solution. The dataset is split into 75% training data (to measure the accuracy of our solution to the optimization problem) and 25% test data (to evaluate generalizability).
|
| 88 |
+
|
| 89 |
+
For our experiments, we use the following parameters: |𝒴|=10𝒴10|\mathcal{Y}|=10, q=10𝑞10q=10, m=5𝑚5m=5, and λ=10.0𝜆10.0\lambda=10.0. We set the predefined weights to beη~=[12,14,…,12m−1,12m−1]~𝜂1214…1superscript2𝑚11superscript2𝑚1\tilde{\eta}=\left[\frac{1}{2},\frac{1}{4},\dots,\frac{1}{2^{m-1}},\frac{1}{2^{m-1}}\right].444The reason for using an exponential decay isso that the subsequent classifiers learned are different from the previous ones.Using smaller weightsmight cause consecutive classifiers to be identical, thereby‘wasting’ some of the components. In our experiments we vary the number of individuals, andeach result is averaged over 25 runs. On each run, we generate anew ground-truth classifier hg→∗,η∗subscriptℎsuperscript→𝑔superscript𝜂h_{\vec{g}^{*},\eta^{*}}, as well as newindividuals, losses, and utilities.
|
| 90 |
+
|
| 91 |
+
Figure 2 shows the time taken to compute the mixture components g→→𝑔\vec{g} and the optimal weights η𝜂\eta, as the number of individuals in the training data increases. As we will see shortly, even though the η𝜂\eta computation takes a very small fraction of the time, it can lead to non-negligible gains in terms of loss and envy.
|
| 92 |
+
|
| 93 |
+
Figure 2 shows the average loss attained on the training and testdata by the algorithm immediately after computing the mixture components, andafter the round of η𝜂\eta optimization. It also shows the average lossattained (on both the training and test data) by a random allocation, whichserves as a naïve benchmark for calibration purposes. Recall that the optimalassignment hg→⋆,η⋆subscriptℎsuperscript→𝑔⋆superscript𝜂⋆h_{\vec{g}^{\star},\eta^{\star}} has loss 00.For both the training and testing individuals, optimizingη𝜂\eta improves the loss of the learned classifer. Moreover, our algorithmsachieve low training errors for all dataset sizes, and as the dataset grows thetesting error converges to the training error.
|
| 94 |
+
|
| 95 |
+
Figure 4 shows the average envy among pairs in the training dataand test data, where, for each pair, negative envy is replaced with 00, toavoid obfuscating positive envy. The graph also depicts the average envyattained (on both the training and test data) by a random allocation.As for the losses, optimizing η𝜂\eta results in loweraverage envy, and as the training set grows we see the generalization gapdecrease.
|
| 96 |
+
|
| 97 |
+
In Figure 4 we zoom in on the case of 100100100 training individuals, and observe the empirical CDF of envy values. Interestingly, the optimal randomized classifier hg→⋆,η⋆subscriptℎsuperscript→𝑔⋆superscript𝜂⋆h_{\vec{g}^{\star},\eta^{\star}} shows lower negative envy values compared to other algorithms, but as expected has no positive envy pairs. Looking at the positive envy values, we can again see very encouraging results. In particular, for at least a 0.9460.9460.946 fraction of the pairs in the train data, we obtain envy of at most 0.050.050.05, and this generalizes to the test data, where for at least a 0.9390.9390.939 fraction of the pairs, we obtain envy of at most 0.10.10.1.
|
| 98 |
+
|
| 99 |
+
In summary, these results indicate that the algorithm described in Section 5.1 solves the optimization problem (5) for linear one-vs-all classifiers almost optimally, and that its output generalizes well even when the training set is small.
|
| 100 |
+
|
| 101 |
+
In this paper we propose EF as a suitable fairness notion for learning tasks withmany outcomes over which individuals have heterogeneous preferences. We providegeneralization guarantees for a rich family of classifiers, showing that if wefind a classifier that is envy-free on a sample of individuals, it will remainenvy-free when we apply it to new individuals from the same distribution. Thisresult circumvents an exponential lower bound on the sample complexity sufferedby any two-stage learning algorithm that first finds an EF assignment for thesample and then extends it to the entire space. Finally, we empiricallydemonstrate that finding low-envy and low-loss classifiers is computationallytractable. These results show that envy-freeness is a practical notion offairness for machine learning systems.
|
1809.08733v2.txt
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Morphological generation of previouslyunencountered word forms is a crucial problemin many areas of natural language processing(NLP). High performancecan lead to better systems fordownstream tasks, e.g., machine translation Tamchyna et al. (2017).Since existing lexicons have limited coverage,learning morphologicalinflection patterns from labeled data isan important mission and has recently been the subject of multiple shared tasks Cotterell et al. (2016, 2017a).
|
| 2 |
+
|
| 3 |
+
In morphologically rich languages, words inflect, i.e., they change their surface form in oder to express certain properties, e.g., number or tense.A word’s canonical form, which can be found in a dictionary, is called the lemma, and the set of all inflected forms is referred to as the lemma’s paradigm.In this work, we address paradigm completion (PC), themorphologicaltask of, givena partial paradigm of a lemma,generating all of its missing forms.Forthe partial paradigm represented by the input subset {(“Schneemannes”, GEN;SG),(“Schneemännern”, DAT;PL)}of the German noun“Schneemann” shown in Figure 1,the goal ofPC is togeneratethe output subset consisting of the six remaining forms.
|
| 4 |
+
|
| 5 |
+
Neural seq2seq models define thestate of the art formorphological generation if training sets are large;however,they have been lesssuccessful in the low-resource setting Cotterell et al. (2017a). In this paper, weaddress an even more extrememinimal-resource setting:for some of our experiments,ourtraining sets only contain k≈10𝑘10k\approx 10 paradigms.Each paradigm has multiple cells, so the numberof forms (as opposed to the number of paradigms) is notnecessarily minimal.However, we will see thatgeneralizing from paradigm to paradigm is a key challenge,makingthe number of paradigmsa good measure of the effective training set size.
|
| 6 |
+
|
| 7 |
+
We propose two PC methods for the minimal-resourcesetting: paradigm transduction and source selection with high precision (SHIP). Wedefine a learning algorithm as transductive111In order to avoid ambiguity, “transduction” is never used in the sense of string-to-string transduction in this paper. if itsgoal is to generalize from specific training examples tospecific test examples Vapnik (1998). In contrast, inductiveinference learns a general modelthat is independent of any test set. Predictions oftransductive inference for the same item are different for different testsets. There is no suchdependence in inductive inference.Our motivation for transductionis that, in the minimal-resource setting,neural seq2seq models capturerelationships between paradigm cells like affix substitutionand umlauting, but are tied to theidiosyncracies of the k𝑘k training paradigms.For example, if all source forms in the training set start with “b” or “d”, a purely inductive model may then be unable to generate targets withdifferent initials.By transductive inferenceon the information available in the input subset at test time, i.e., the given partial paradigm,our model can learnidiosyncracies. For example, if the input subset sourcesstart with “p”, we can learn to generateoutput subset targets that start with “p”. Thus,we exploit the input subset for learning idiosyncracies at testtime and then generate the output subsetusing a modified model. Thissetupemploys standard inductive training (on the training set) forlearning general rules of inflectionalmorphologyand transductive inference (on the test set) for learningidiosyncracies.Our use of transduction is innovative in thatmost previous work has addressed unstructured problemswhereas our problem is structured: we complete aparadigm, a complex structure of forms, each of them labeledwith a morphological tag. Thus, the test set contains labels,whereas, in transduction for unstructured problems, thetest set is a flat set of unlabeled instances. We viewour work as an extension of transduction to the structuredcase,even thoughnot all elements of the theory developed byVapnik (1998)carry over.
|
| 8 |
+
|
| 9 |
+
The motivation for our second PCmethod for limited training data,SHIP, is as follows.Multi-source models can learn which combination of sourcesmost reliably predicts the target in the high-resource,but less well in the minimal-resource setting.SHIP models the relationship between paradigm slotsusingedit trees Chrupała et al. (2008), inorder to measure how deterministic each transformationis. Then, it identifies themost deterministic source slot for the generation of each target inflection.
|
| 10 |
+
|
| 11 |
+
Paradigm transduction and SHIP can be employed separately or in combination.Our experiments show that, in an extreme minimal-resource setting, a combination of SHIPand a non-neural approach is most effective;for slightly more data, a combination of a neural model, paradigm transduction and SHIP obtains the best results.
|
| 12 |
+
|
| 13 |
+
(i) We introduce neural paradigm transduction, whichexploits thestructure of the PC task to mitigate the negative effect of limited training data.(ii) We propose SHIP, a new algorithm forpicking a singlereliable source for PC in the minimal-resource setting.(iii) On average over all languages of a 52-languagebenchmark dataset,our approachesoutperform state-of-the-art baselinesby up to 9.71%percent9.719.71\% absolute accuracy.
|
| 14 |
+
|
| 15 |
+
In this section, we formally define ourtask, developing the notation for the rest of the paper.
|
| 16 |
+
|
| 17 |
+
Given the set of morphological tags T(w)𝑇𝑤T(w) of a lemma w𝑤w, we define the paradigm of w𝑤w as the set of tuples of inflected form fksubscript𝑓𝑘f_{k} and tag tksubscript𝑡𝑘t_{k}:π(w)={(fk[w],tk)}tk∈T(w)𝜋𝑤subscriptsubscript𝑓𝑘delimited-[]𝑤subscript𝑡𝑘subscript𝑡𝑘𝑇𝑤\pi(w)=\big{\{}\big{(}f_{k}[w],t_{k}\big{)}\big{\}}_{t_{k}\in T(w)}(1)The example in Figure 1 thus corresponds to:π𝜋\pi(Schneemann) ={(\big{\{}\big{(}“Schneemann”,NOM;SG))\big{)} …((\big{(}“Schneemänner”, ACC;PL)}\big{)}\big{\}}.
|
| 18 |
+
|
| 19 |
+
A training set in our setup consists of complete paradigms, i.e., allinflected forms of each lemma are available. This simulatesa setting in which a linguistannotates completeparadigms, as done, e.g., in Sylak-Glassman et al. (2016).In contrast, each element of the test set is a partialparadigm, which we refer to asthe input subset.This simulates a settingin which we collect all forms of a lemma occurring in a(manually or automatically) annotatedinput corpus; this set will generally not be complete.ThePC task consists of generating theoutput subset of the paradigm, i.e., the formsbelonging to form-tag pairs which are missing from the collected subset.
|
| 20 |
+
|
| 21 |
+
Our approach for PC is based on MED (Morphological Encoder-Decoder), a state-of-the-art model for morphological generation in the high-resource case, which wasdeveloped by Kann and Schütze (2016b).In this section, we first cover required background on MED and then introduce our new approaches.
|
| 22 |
+
|
| 23 |
+
MED converts one inflected form of a paradigm into another, given the two respective tags.Thus, the input of MED is a sequence of subtags of the source and the target form(e.g., NOM and SG are subtags of NOM;SG), as well as the characters ofthe source form. All elements are represented by embeddings, which are trained together with the model.The output of MED is the character sequence of the target inflected form.
|
| 24 |
+
|
| 25 |
+
An example from the paradigm in Figure 1 is:
|
| 26 |
+
|
| 27 |
+
INPUT: DATS PLS GENT SGT S c h n e e m ä n n e r nOUTPUT: S c h n e e m a n n e s
|
| 28 |
+
|
| 29 |
+
The model’s encoder consists of a bidirectional gated recurrent neural network (GRU)with a single hidden layer.It reads an input vector sequencex=(x1,…,xXt)𝑥subscript𝑥1…subscript𝑥subscript𝑋𝑡x=(x_{1},\ldots,x_{X_{t}})and encodes it from two opposite directions into two hidden representationsht→→subscriptℎ𝑡\overrightarrow{h_{t}} and ht←←subscriptℎ𝑡\overleftarrow{h_{t}} asht→→subscriptℎ𝑡\displaystyle\overrightarrow{h_{t}}=GRU(xt,ht−1→)absentGRUsubscript𝑥𝑡→subscriptℎ𝑡1\displaystyle=\text{GRU}(x_{t},\overrightarrow{h_{t-1}})(2)ht←←subscriptℎ𝑡\displaystyle\overleftarrow{h_{t}}=GRU(xt,ht+1←)absentGRUsubscript𝑥𝑡←subscriptℎ𝑡1\displaystyle=\text{GRU}(x_{t},\overleftarrow{h_{t+1}})(3)which are concatenated toht=[ht→;ht←]subscriptℎ𝑡→subscriptℎ𝑡←subscriptℎ𝑡h_{t}=\left[\overrightarrow{h_{t}};\overleftarrow{h_{t}}\right](4)
|
| 30 |
+
|
| 31 |
+
The decoder, another GRU with a single hidden layer, defines a probability distribution overthe output vocabulary, which, for paradigm completion, consists of the characters in the language, asp(y)=∏t=1TyGRU(yt−1,st−1,ct)𝑝𝑦superscriptsubscriptproduct𝑡1subscript𝑇𝑦GRUsubscript𝑦𝑡1subscript𝑠𝑡1subscript𝑐𝑡\displaystyle p(y)=\prod_{t=1}^{T_{y}}\text{GRU}(y_{t-1},s_{t-1},c_{t})(5)stsubscript𝑠𝑡s_{t} denotes the state of the decoder at step t𝑡t, and ctsubscript𝑐𝑡c_{t} is the sum of the hidden representations of the encoder,weighted by an attention mechanism.
|
| 32 |
+
|
| 33 |
+
Additional background on the general model architecture is given in Bahdanau et al. (2015);details on MED can be found in Kann and Schütze (2016b).
|
| 34 |
+
|
| 35 |
+
In order to make use of unlabeled data with MED, Kann and Schütze (2017) defined an auxiliary autoencoding task and proposed a multi-task learning approach.
|
| 36 |
+
|
| 37 |
+
For this extension, an additional symbol is added to the input vocabulary.Each input is then of the form (A∣M+)Σ+conditionalAsuperscript𝑀superscriptΣ\left(\text{{A}}\mid M^{+}\right)\Sigma^{+}, withA being a novel tag for autoencoding,ΣΣ\Sigma being the alphabet of the language, andM𝑀M beingthe set of morphological subtags of the source and the target.As for the basic MED model, all parts of the input are represented by embeddings.
|
| 38 |
+
|
| 39 |
+
The training objective isto maximize the joint likelihood for the tasks of paradigm completion and autoencoding:ℒ(𝜽)=ℒ𝜽absent\displaystyle{\cal L}({\boldsymbol{\theta}})=∑(s,tS,tT,w)∈𝒟subscript𝑠superscript𝑡𝑆superscript𝑡𝑇𝑤𝒟\displaystyle\sum_{(s,t^{S},t^{T},w)\in{\cal D}}logp𝜽(w∣eθ(tS,tT,s))subscript𝑝𝜽conditional𝑤subscript𝑒𝜃superscript𝑡𝑆superscript𝑡𝑇𝑠\displaystyle\log p_{{\boldsymbol{\theta}}}(w\mid e_{\theta}(t^{S},t^{T},s))+∑a∈𝒜subscript𝑎𝒜\displaystyle+\sum_{a\in{\cal A}}logp𝜽(a∣eθ(a))subscript𝑝𝜽conditional𝑎subscript𝑒𝜃𝑎\displaystyle\log p_{{\boldsymbol{\theta}}}(a\mid e_{\theta}(a))where 𝒜𝒜\cal A is aset of autoencoding examples, eθsubscript𝑒𝜃e_{\theta} is the encoder, and𝒟𝒟\cal D is a labeled training set oftuples of source s𝑠s, morphological source tag tSsuperscript𝑡𝑆t^{S}, morphological target tag tTsuperscript𝑡𝑇t^{T}, and target w𝑤w.
|
| 40 |
+
|
| 41 |
+
MED was originally developed for morphological reinflection.Thus, it operates on pairs consisting of a single source and a single target form.In order to use it for paradigm completion, where multiple source formsare given, and multiple target forms are expected, weconvert the given data into a suitable format in the way described in the following.
|
| 42 |
+
|
| 43 |
+
For a lemma w𝑤w, let J(w)𝐽𝑤J(w) be the set of tags in the inputsubset. Recall that J(w)𝐽𝑤J(w) is a subset ofT(w)𝑇𝑤T(w), the set of all tags, at test time, but that trainingparadigms are complete, i.e., J(w)=T(w)𝐽𝑤𝑇𝑤J(w)=T(w) for the training set.
|
| 44 |
+
|
| 45 |
+
For both training of the inductive model andparadigm transduction, we generate |J(w)|(|J(w)|−1)𝐽𝑤𝐽𝑤1|J(w)|(|J(w)|-1) training examples(ti,tj,fi[w])↦fj[w]maps-tosubscript𝑡𝑖subscript𝑡𝑗subscript𝑓𝑖delimited-[]𝑤subscript𝑓𝑗delimited-[]𝑤(t_{i},t_{j},f_{i}[w])\mapsto f_{j}[w]one foreach pair of different tags in J(w)𝐽𝑤J(w).We also generate autoencoding training examplesfor all tags in J(w)𝐽𝑤J(w)(removing duplicates):(A,fi[w])↦fi[w]maps-toAsubscript𝑓𝑖delimited-[]𝑤subscript𝑓𝑖delimited-[]𝑤\big{(}{\tt\textbf{A}},f_{i}[w]\big{)}\mapsto f_{i}[w]
|
| 46 |
+
|
| 47 |
+
For the German lemma “Schneemann”, assume:
|
| 48 |
+
|
| 49 |
+
J(Schneemann)={GEN;SG,DAT;PL}𝐽SchneemannGEN;SGDAT;PLJ(\mbox{Schneemann})=\{\mbox{GEN;SG},\mbox{DAT;PL}\}
|
| 50 |
+
|
| 51 |
+
at test time. We then produce the following training examples for paradigmtransduction:
|
| 52 |
+
|
| 53 |
+
(DATS PLS GENT SGT Schneemännern) ↦maps-to\mapsto Schneemannes(GENS SGS DATT PLT Schneemannes) ↦maps-to\mapsto Schneemännern(A Schneemannes) ↦maps-to\mapsto Schneemannes(A Schneemännern) ↦maps-to\mapsto Schneemännern
|
| 54 |
+
|
| 55 |
+
For completinga partial paradigm, we then select one source form per target slot(the lemma, unless stated otherwise)and create all forms corresponding to the tags in J(w)∖T(w)𝐽𝑤𝑇𝑤J(w)\setminus T(w)one by one.
|
| 56 |
+
|
| 57 |
+
In the minimal-resource setting,parameter estimates are tied to the idiosyncraciesof the lemmas seen in training, due to overfitting. Ourexample in§1 is that the model has difficulties producinginitial letters not seen during training.However, within each paradigm, forms are generally similar;thus, input subset sources contain valuable informationabout how to generate output subset targets. Based onthis observation, we solve the problem of overfitting bytransduction: we teach the model test idiosyncraciesby training it on the input subset before generating the outputsubset.
|
| 58 |
+
|
| 59 |
+
We first train a general modelon the training set in the standard supervised learningsetup, i.e., the setup which is called inductive inference byVapnik (1998).At test time,we take the general model as initialization and continue training on examples generated fromthe input subset as described in §3.3.We do this separately for each lemma,satisfying the defining criterion of transductiveinference thatpredictions depend on the testdata. Also, differentinput subsets (i.e., different subsets of the same paradigm)can in general makedifferent predictions on an output subset target.
|
| 60 |
+
|
| 61 |
+
Paradigm transduction is expected to perform best in a setting in whichmany forms of each paradigm are given as input, i.e., when|J(w)|𝐽𝑤|J(w)| is big.In Figure 2 we show the average sizes of the input subsetsfor all languages in our experiments.
|
| 62 |
+
|
| 63 |
+
During PC,some sources contain moreinformation relevant to generating certain targets thanothers. For instance, the nominative singular and accusativesingular in German are generally identical(cf. Figure 1); thus, for generating the accusative singular,we should use the nominative singular assource if it is available—rather than, say, the dativeplural.
|
| 64 |
+
|
| 65 |
+
In fact, for many languages, the entire paradigmof most lemmasisdeterministicif the right source forms are known and used for the right targets.A set of forms that determines all otherinflected forms is called principal partsFinkel and Stump (2007). Based on this theory,Cotterell et al. (2017b)inducetopologies and jointly decode entire paradigms, thusmaking use of all available forms. However, their method isonly applicable ifgood estimates of the probabilitiesp(fj[w]|fi[w])𝑝conditionalsubscript𝑓𝑗delimited-[]𝑤subscript𝑓𝑖delimited-[]𝑤p(f_{j}[w]|f_{i}[w]) for source fi[w]subscript𝑓𝑖delimited-[]𝑤f_{i}[w] andtarget fj[w]subscript𝑓𝑗delimited-[]𝑤f_{j}[w] can be obtained,and they train on hundreds of paradigmsper part of speech (POS) and language, which are not available in our setup.
|
| 66 |
+
|
| 67 |
+
We propose an alternative for the minimal-resource setting:SHIP, whichselects a single best sourcefor each target and isbased on edit trees.An edit tree e(fi[w],fj[w])𝑒subscript𝑓𝑖delimited-[]𝑤subscript𝑓𝑗delimited-[]𝑤e(f_{i}[w],f_{j}[w]) is a transformation from asource fi[w]subscript𝑓𝑖delimited-[]𝑤f_{i}[w] to a target fj[w]subscript𝑓𝑗delimited-[]𝑤f_{j}[w]Chrupała et al. (2008); seeFigure 3.It is constructed by firstdetermining the longest common substring (LCS)Gusfield (1997) of fi[w]subscript𝑓𝑖delimited-[]𝑤f_{i}[w] and fj[w]subscript𝑓𝑗delimited-[]𝑤f_{j}[w] and thenmodeling the prefix and suffix pairs of the LCS recursively.In the case of an empty LCS, e(fi[w],fj[w])𝑒subscript𝑓𝑖delimited-[]𝑤subscript𝑓𝑗delimited-[]𝑤e(f_{i}[w],f_{j}[w]) is thesubstitution operation that replaces fi[w]subscript𝑓𝑖delimited-[]𝑤f_{i}[w] with fj[w]subscript𝑓𝑗delimited-[]𝑤f_{j}[w].
|
| 68 |
+
|
| 69 |
+
We construct edit trees for each pair (fi[w],fj[w])subscript𝑓𝑖delimited-[]𝑤subscript𝑓𝑗delimited-[]𝑤(f_{i}[w],f_{j}[w])in the training set, count the number nijsubscript𝑛𝑖𝑗n_{ij} ofdifferent edit trees forti↦tjmaps-tosubscript𝑡𝑖subscript𝑡𝑗t_{i}\mapsto t_{j}, and construct a fully connectedgraph.The tags are nodes of the graph, and the counts nijsubscript𝑛𝑖𝑗n_{ij} are weights.Edges are undirected, since edit trees are bijections(cf. Figure 4). We then interpret the weight of an edge as a measure ofthe (un)reliability ofthe corresponding two source-target relationships.Our intuition is that the fewer different edit treesrelate source and target, the morereliable the source is for generating the target.
|
| 70 |
+
|
| 71 |
+
At test time, we find for each target tjsubscript𝑡𝑗t_{j}a source tksubscript𝑡𝑘t_{k} such that nkj≤nij∀i∈J(w)subscript𝑛𝑘𝑗subscript𝑛𝑖𝑗for-all𝑖𝐽𝑤n_{kj}\leq n_{ij}\forall i\in J(w). We then use fk[w]subscript𝑓𝑘delimited-[]𝑤f_{k}[w] togenerate fj[w]subscript𝑓𝑗delimited-[]𝑤f_{j}[w]. Again, Figure 4shows examples.
|
| 72 |
+
|
| 73 |
+
We run experiments on the datasets from task2 of the CoNLL–SIGMORPHON 2017 shared task, which have beencreated using UniMorph Kirov et al. (2018).We give a short overview here;seeCotterell et al. (2017a)for details.The dataset contains, for each of 52 languages,a development set of 50 partial paradigms, a testset of50 partial paradigms,and three training sets ofcomplete paradigms.Training set sizes are10 (SET1),50 (SET2), and 200 (SET3).Recall thatwe viewthe number ofparadigms (not the number of forms) as the bestmeasure of the amount of training data available.Even for SET3, there areonly 200 lemmas per language in the training set, which are additionallydistributed overmultiple POS tags, compared to >>600lemmas per POS used byCotterell et al. (2017b).We, thus, want to emphasize thatall settings—SET1, SET2, and SET3—can be consideredlow-resource.
|
| 74 |
+
|
| 75 |
+
We produce training sets for our encoder-decoder asdescribed in§3.3, but limit the totalnumber of training examples to 200,000.
|
| 76 |
+
|
| 77 |
+
With our hyperparameters, we followKann andSchütze (2016a).In particular,our encoder and decoder GRUs have 100-dimensional hidden states. Ourembeddings are 300-dimensional.For training, we use stochastic gradient descent, ADADELTA Zeiler (2012), andminibatches of size 202020.After experiments on the development set, we decide on trainingSET1, SET2, and SET3 models for 50, 30, and 20 epochs, respectively.For paradigm transduction, we train all models for 25 additional epochs.
|
| 78 |
+
|
| 79 |
+
In the following, we describe our baselines.COPY, MED, and PT are used for ablationand SIG17 for comparison with the state ofthe art.
|
| 80 |
+
|
| 81 |
+
As targets in many paradigm cells in manylanguages are identical to thelemma, we consider a copy baseline that simplycopies the lemma.
|
| 82 |
+
|
| 83 |
+
Thisisthe model by Kann and Schütze (2016b), which performed bestat SIGMORPHON 2016.For decoding, the lemma isused. Since MED is designed for the high-resourcesetting, wedo not expect goodperformancefor our minimal-resource scenario, but the comparisonshows how much ourenhancementsimprove performance.
|
| 84 |
+
|
| 85 |
+
PT isa seq2seqmodel exclusively trained on the input subset.Its performance sheds light on the importance of the initialinductive training.
|
| 86 |
+
|
| 87 |
+
SIG17 is theofficial baseline ofthe CoNLL–SIGMORPHON 2017 shared task,which was developed to perform well with very littletraining data.Its design follows Liu and Mao (2016):SIG17 firstaligns each input lemma and output inflected form.Afterwards,it assumes that each aligned paircan be split into a prefix, a stem, and a suffix.Based on this alignment, the system extracts prefix (resp. suffix)rules from the prefix (resp. suffix) pairings.At test time,suitable rules are applied to the input string togenerate the target; more details can be found inCotterell et al. (2017a).
|
| 88 |
+
|
| 89 |
+
Our results are shown inTable 1.For SET1, SIG17+SHIP obtains the highest accuracy, while,for SET2 and SET3,MED+PT+SHIP performs best. This difference can be easily explained by the fact thatthe performance of neural networks decreases rapidly for smaller training sets, and, while paradigm transductionstronglymitigates this problem, it cannot completely eliminate it.Overall, however, SIG17+SHIP, MED+PT, and MED+PT+SHIP all outperform the baselines by a wide marginfor all settings.
|
| 90 |
+
|
| 91 |
+
On average, MED+PT clearly outperforms SIG17, the strongest baseline: by.0796 (.5808-.5012) on SET1, .0910 (.7486-.6576) on SET2,and .0747 (.8454-.7707) on SET3.
|
| 92 |
+
|
| 93 |
+
However,looking at each language individually (refer to Appendix A for those results), we find thatMED+PT performs poorly for a few languages, namely Danish,English, and Norwegian (Bokmål & Nynorsk).We hypothesize that this can most likely be explained by thesize of the input subset of those languages being small(cf. Figure 2 for average input subset sizes per language).Recall that the input subsetis explored by the model during transduction.Most poorly performinglanguages have input subsets containing onlythe lemma;in this caseparadigm transduction reduces toautoencoding the lemma. Thus, we conclude that paradigm transduction canonly improve over MED if two or more sourcesare given.
|
| 94 |
+
|
| 95 |
+
Conversely,if we consider only the languages with an average input subset size ofmore than 151515 (Basque, Haida, Hindi, Khaling, Persian, and Quechua), the average accuracy of MED+PT forSET1 is 0.95640.95640.9564, compared to an overall average of 0.58080.58080.5808. This observation shows clearly thatparadigm transduction obtains strong results if many forms per paradigm are given.
|
| 96 |
+
|
| 97 |
+
Further, Table 1 shows thatSIG17+SHIP is better thanSIG17 by .0959 (.5971-.5012) on SET1,.0779 (.7355-.6576) on SET2, and.0301 (.8008-.7707) on SET3.Stronger effects for smaller amounts of trainingdata indicate that SHIP’s strategy of selecting a single reliable sourceis more important for weaker final models; in these cases,selecting the most deterministic source reduceserrors due to noise.
|
| 98 |
+
|
| 99 |
+
author=Katharina,color=yellow!40,size=,fancyline,caption=,]Include here results by languages.
|
| 100 |
+
|
| 101 |
+
In contrast, the performance of MED, theneural model, is relatively independent ofthe choice of source; this is in line with earlierfindings Cotterell et al. (2016). However, even forMED+PT, adding SHIP (i.e., MED+PT+SHIP) slightly increasesaccuracy by .0061(.7547-.7486) on SET2, and .0029(.8483-.8454) on SET3 (L53).
|
| 102 |
+
|
| 103 |
+
MED does not perform well for either SET1 or SET2.In contrast, on SET3 iteven outperforms SIG17for a few languages. However, MED loses againstMED+PT in all cases, highlighting the positiveeffect of paradigm transduction.
|
| 104 |
+
|
| 105 |
+
Looking at PT next, even though PTdoes not have a zero accuracy for any setting or language,it performs consistently worse than MED+PT. For SET3, PT is evenlower than MED on average, by .3436 (.4211-.0775).Note that, in contrast to the other methods, PT’s performance is not dependenton the size of the training set.The main determinant for PT’sperformanceis the size of the input subset during transductiveinference.If the input subset is large, PT can perform betterthan MED, e.g., for Hindi and Urdu.For KhalingSET1, PT even outperforms both MED and SIG17.However, in most cases,PT does not perform well on itsown.
|
| 106 |
+
|
| 107 |
+
MED+PT outperforms bothMED and PT.This confirms our initial intuition: MEDand PT learn complementary information for paradigmcompletion. The base model learns thegeneral structure of the language (i.e.,correspondences between tags and inflections) whileparadigm transduction teaches the model which charactersequences are common in a specific test paradigm.
|
| 108 |
+
|
| 109 |
+
We expect paradigm transduction to become more effective asthe size of the input subset increases.Figure 5 shows the accuracy of MED+PT as afunction of the average input subset size for SET1, SET2, and SET3.Accuracy for languageswith input set sizes above 15is higher than .8 in all settings. In general,languages with larger input set sizes perform better.The correlation is not perfect becauselanguages have different degrees of morphological regularity.However, the overall trend is clearly recognizable.
|
| 110 |
+
|
| 111 |
+
Theorganizers of CoNLL–SIGMORPHONprovided large input subsets in the development and test sets of languageswith large paradigms.Thus, PT performs better for languages withmany inflected forms per paradigm, i.e., large |T(w)|𝑇𝑤|T(w)|.
|
| 112 |
+
|
| 113 |
+
We further analyzewhy paradigm transduction improves theperformance of the base model MED, using theGerman, English, and SpanishSET2 examples for MED, PT, and MED+PTgiven in Table 2.
|
| 114 |
+
|
| 115 |
+
MEDgenerates an almost random sequence.However, it learns that the umlaut “ä”must appear in the target. PTonly produces correct characters, but it produces far too many.The reason may be thatthe model is trained on both a double “e”and a double “n”, learning that “e” and “n” are likely toappear repeatedly.MED+PTgenerates the correct target.
|
| 116 |
+
|
| 117 |
+
MED fails to generate “h” becausethe bigram “sh” did not occur in training,and so theprobability of “h” following “s” is estimated to below. PT fails to producethe suffix “ing”, since itdoes not occur in the input subset,and, thus, PT has no way of learning it.Again, MED+PTgenerates the correct target.
|
| 118 |
+
|
| 119 |
+
MED produces “crezcamos”,a form that has the correcttag V;SBJV;PRS;1;PL, but is a form of “crecer” (whichappears in the training set), not of “creer” (which does not).This demonstrates the problems resulting from a lack of lemma diversity during training.PT produces a combination of several of the forms in theinput subset:subjunctive forms beginning with “crey”and “creemos” V;IND;PRS;1;PL. Again,MED+PTgenerates the correct target.
|
| 120 |
+
|
| 121 |
+
Overall, this analysis confirms that MEDlearns relationships between paradigm cells,while paradigm transduction adds knowledge aboutthe idiosyncracies of a partial test paradigm.
|
| 122 |
+
|
| 123 |
+
In this section, we explicitly compare our approach toneural multi-source models for morphological generation.
|
| 124 |
+
|
| 125 |
+
Following Kann et al. (2017a), weemploy attention-based RNN encoder-decoder networks with twoor four input sources. The input to a multi-source model is theconcatenation of all sources and corresponding tags.During training, we randomly sample (with repetition) oneor three additional forms from the paradigm of each example.At test time,we sample the additional forms from the given partial paradigm;without repetitionfirst, but repeating if not enough inflected formsare available. For autoencoding examples in the trainingdata, we simply concatenate two or four copies of thesource and the autoencoding tag.We randomly select five languages for this experiment.
|
| 126 |
+
|
| 127 |
+
Table 3 shows that, for SET3,four sources (column header “4”) are generally better thantwo sources (“2”), which in turn are better than one source(“1”); thus, as expected, making additional sources available intraining improves results. We attribute one exception(German accuracy is .4391 for “1” and .4179 for “2”)to the noisiness of the problem—training sets in terms ofnumber of paradigms are relatively small, even for SET3.
|
| 128 |
+
|
| 129 |
+
The improvements we see for SET3 are large.This suggests that using more than four sources wouldfurther improve results and perhaps reach the level ofperformance of MED+PT, at the cost of a long training time.However, for SET1 and SET2, there is no consistentimprovement from 1 to 2 to 4 sources.While it is possible thatfurther optimizationcould improve the best multi-source resultgiven in Table 3, the gap to MED+PT is verylarge, and the improvement from 2 to 4 is small.This indicates that multi-source methods cannot compete withtransductive learning for SET1 and SET2.
|
| 130 |
+
|
| 131 |
+
For a qualitative analysis of SHIP, we look at the sources it selectsfor French verbs on the development set; the complete diagramis shown in Figure 6.For most verbs, future and conditional can bepredicted fromCOND;1;PL(e.g., “finirions”), and indicative present, indicativeimparfait and subjunctive present from IND;PRS;3;PL (e.g., “finissent”). Incase of ties, SHIP selects the alphabetically first tag; thisexplains whyCOND;1;PLgets preference overIND;PRS;3;PL for indicative present singular.These two forms represent two of the principal parts ofFrench conjugation, the infinitive (almost always derivablefrom COND;1;PL) and the stem that is used for pluralindicative, imparfait, and other paradigm cells—which issometimes not derivable from the infinitive as is the casefor “finir”.In comparison,IND;PST;3;SG;IPFV and SBJV;PST;2;PL are less reliablesources. But they are still reasonably accurate if nobetter alternative is available; consider the followingSBJV;PST;2;PL →→\rightarrow IND;PST;1;SG;PFV generations:“parlassiez” ↦maps-to\mapsto “parlai”,“finissiez” ↦maps-to\mapsto “finis”,“missiez” ↦maps-to\mapsto “mis”,“prissiez” ↦maps-to\mapsto “pris”.
|
| 132 |
+
|
| 133 |
+
We thus conclude that SHIP indeed learns to select appropriate source forms.
|
| 134 |
+
|
| 135 |
+
In the last two years, most work on paradigm completion has been done in the context of the SIGMORPHON 2016 and the CoNLL–SIGMORPHON 2017 shared tasksCotterell et al. (2016, 2017a).Due to the success of neural seq2seq models in 2016 Kann and Schütze (2016b); Aharoni et al. (2016),systems developed for the 2017 edition were mostly neuralMakarov et al. (2017); Bergmanis et al. (2017); Zhou and Neubig (2017).Besides the shared task systems, Kann and Schütze (2017) presented a paradigm completion model for a multi-source setting that made use ofan attention mechanism to decide which input form to attend to at each time step.They usedrandomly chosen, independent pairs of source and targetforms for training. This differs crucially from the setting we considerin that no complete paradigms were available intheir training sets.Only Cotterell et al. (2017b)addressed essentially the same task we do, butthey only consideredthe high-resource setting:their models were trained on hundreds of complete paradigms.The experiments reported in §5.3empirically confirm that inductive-only models performpoorly in our setting.
|
| 136 |
+
|
| 137 |
+
Severalways to employ neural models for morphological generation with limited data have beenproposed, e.g., semi-supervised trainingZhou and Neubig (2017); Kann and Schütze (2017) or simultaneoustraining on multiple languages Kann et al. (2017b).The total number of sources in the training setin some of our settingsmay becomparable to this earlier work, butour training sets are less diverse since many forms come fromthe same paradigm. We argue in §1 that thenumber of paradigms (not the number of sources)measures the effective size of the training set.
|
| 138 |
+
|
| 139 |
+
Other important work on morphological generation—neural and non-neural—includesDreyer et al. (2008); Durrett and DeNero (2013); Hulden et al. (2014); Nicolai et al. (2015); Faruqui et al. (2016); Yin et al. (2016).
|
| 140 |
+
|
| 141 |
+
Even though neural seq2seq models were originally designed formachine translation Sutskever et al. (2014); Cho et al. (2014); Bahdanau et al. (2015), their applicationhas not stayed limited to this area.Similar architectures have been successfully applied to many seq2seq tasks in NLP, e.g., syntacticparsing Vinyals et al. (2015), language correction Xie et al. (2016), normalization of historical texts Bollmann et al. (2017),or text simplification Nisioi et al. (2017).Transductive inference is similar todomain adaptation, e.g., inmachine translation Luong and Manning (2015). One differenceis that training set and test set can hardly be calleddifferent domains in paradigm completion. Another differenceis that explicit structured labels(the morphological tags of theforms in the input subset)are available at testtime in paradigm completion.
|
| 142 |
+
|
| 143 |
+
We presented two new methods for minimal-resource paradigmcompletion: paradigm transduction andSHIP.Paradigm transduction learnsgeneral inflection rules through standard inductive training andidiosyncracies of a test paradigm through transduction.We showed that paradigm transduction effectively mitigates the problem ofoverfitting due to a lack ofdiversity in the training data.SHIP is a robust non-neural method that identifies a single reliablesource for generating a target. In the minimal-resourcesetting, this is an effective alternative tolearning howto combine evidence from multiple sources.Considering the average over all languages of a 52-languagebenchmark dataset, we outperform the previous stateof the art by at least 7.07%percent7.077.07\%, and up to9.71%percent9.719.71\% absolute accuracy.
|