Diverse Few-Shot Text Classification with Multiple Metrics

Mo Yu, Xiaoxiao Guo, Jinfeng Yi, Shiyu Chang, Saloni Potdar, Yu Cheng, Gerald Tesauro, Haoyu Wang, Bowen Zhou

Introduction

Few-shot learning (FSL) Miller et al. (2000); Li et al. (2006); Lake et al. (2015) aims to learn classifiers from few examples per class. Recently, deep learning has been successfully exploited for FSL via learning meta-models from a large number of meta-training tasks. These meta-models can be then used for rapid-adaptation for the target/meta-testing tasks that only have few training examples. Examples of such meta-models include: (1) metric-/similarity-based models, which learn contextual, and task-specific similarity measures Koch (2015); Vinyals et al. (2016); Snell et al. (2017); and (2) optimization-based models, which receive the input of gradients from a FSL task and predict either model parameters or parameter updates (Ravi and Larochelle, 2017; Munkhdalai and Yu, 2017; Finn et al., 2017; Wang et al., 2017).

In the past, FSL has mainly considered image domains, where all tasks are often sampled from one huge collection of data, such as Omniglot (Lake et al., 2011) and ImageNet (Vinyals et al., 2016), making tasks come from a single domain thus related. Due to such a simplified setting, almost all previous works employ a common meta-model (metric-/optimization-based) for all few-shot tasks. However, this setting is far from the realistic scenarios in many real-world applications of few-shot text classification. For example, on an enterprise AI cloud service, many clients submit various tasks to train text classification models for business-specific purposes. The tasks could be classifying customers’ comments or opinions on different products/services, monitoring public reactions to different policy changes, or determining users’ intents in different types of personal assistant services. As most of the clients cannot collect enough data, their submitted tasks form a few-shot setting. Also, these tasks are significantly diverse, thus a common metric is insufficient to handle all these tasks.

We consider a more realistic FSL setting where tasks are diverse. In such a scenario, the optimal meta-model may vary across tasks. Our solution is based on the metric-learning approach (Snell et al., 2017) and the key idea is to maintain multiple metrics for FSL. The meta-learner selects and combines multiple metrics for learning the target task using task clustering on the meta-training tasks. During the meta-training, we propose to first partition the meta-training tasks into clusters, making the tasks in each cluster likely to be related. Then within each cluster, we train a deep embedding function as the metric. This ensures the common metric is only shared across tasks within the same cluster. Further, during meta-testing, each target FSL task is assigned to a task-specific metric, which is a linear combination of the metrics defined by different clusters. In this way, the diverse few-shot tasks can derive different metrics from the previous learning experience.

The key of the proposed FSL framework is the task clustering algorithm. Previous works (Kumar and Daume III, 2012; Kang et al., 2011; Crammer and Mansour, 2012; Barzilai and Crammer, 2015) mainly focused on convex objectives, and assumed the number of classes is the same across different tasks (e.g. binary classification is often considered). To make task clustering (i) compatible with deep networks and (ii) able to handle tasks with a various number of labels, we propose a matrix-completion based task clustering algorithm. The algorithm utilizes task similarity measured by cross-task transfer performance, denoted by matrix S. The (i,j)(i,j)-entry of S is the estimated accuracy by adapting the learned representations on the ii-th (source) task to the jj-th (target) task. We rely on matrix completion to deal with missing and unreliable entries in S and finally apply spectral clustering to generate the task partitions.

To the best of our knowledge, our work is the first one addressing the diverse few-shot learning problem and reporting results on real-world few-shot text classification problems. The experimental results show that the proposed algorithm provides significant gains on few-shot sentiment classification and dialog intent classification tasks. It provides positive feedback on the idea of using multiple meta-models (metrics) to handle diverse FSL tasks, as well as the proposed task clustering algorithm on automatically detecting related tasks.

Problem Definition

Our definitions can be easily generalized to other meta-learning approaches Ravi and Larochelle (2017); Finn et al. (2017); Mishra et al. (2017). The motivation of employing multiple metrics is that when the tasks are diverse, one metric model may not be sufficient. Note that previous metric-based FSL methods can be viewed as a special case of our definition where M\mathcal{M} only contains a single Λ\Lambda, as shown in the two base model examples below.

where we defined α(.,.)\alpha(.,.) to be a softmax distribution given Λ(x^,xi)\Lambda(\hat{x},x_{i}), where xix_{i} is a supporting instance, i.e., α(x^,xi;θ)=\nicefracexp⁡(f(x^)Tf(xi))∑j=1∣S∣exp⁡(f(x^)Tf(xj))\alpha(\hat{x},x_{i};\theta)=\nicefrac{{\exp(f(\hat{x})^{T}f(x_{i}))}}{{\sum_{j=1}^{|S|}\exp(f(\hat{x})^{T}f(x_{j}))}}, where θ\theta are the parameters of the encoder ff. Thus, yy is a valid distribution over the supporting set’s labels {yi}i=1∣S∣\{y_{i}\}_{i=1}^{|S|}. To adapt the MNet to text classification, we choose encoder ff to be a convolutional neural network (CNN) following Kim (2014); Johnson and Zhang (2016). Figure 1 shows the MNet with the CNN architecture. Following (Collobert et al., 2011; Kim, 2014), the model consists of a convolution layer and a max-pooling operation over the entire sentence.

To train the MNets, we first sample the training dataset DD for task T{T} from all tasks T\mathcal{T}, with notation simplified as D∼TD\sim\mathcal{T}. For each class in the sampled dataset DD, we sample kk random instances in that class to construct a support set SS, and sample a batch of training instances BB as training examples, i.e., B,S∼DB,S\sim D. The training objective is to minimize the prediction error of the training samples given the supporting set (with regard to the encoder parameters θ\theta) as follows:

Methodology

We propose a task-clustering framework to address the diverse few-shot learning problem stated in Section 2. We have the FSL algorithm summarized in Algorithm 1. Figure 2 gives an overview of our idea. The initial step of the algorithm is a novel task clustering algorithm based on matrix completion, which is described in Section 3.1. The few-shot learning method based on task clustering is then introduced in Section 3.2.

Our task clustering algorithm is shown in Algorithm 2. The algorithm first evaluates the transfer performance by applying a single-task model ii to another task jj (Section 3.1.1), which will result in a (partially observed) cross-task transfer performance matrix S. The matrix S is then cleaned and completed, giving a symmetry task similarity matrix Y for spectral clustering Ng et al. (2002).

Ideally, the transfer performance could be estimated by training a MNet on task ii and directly evaluating it on task jj. However, the limited training data usually lead to generally low transfer performance of single-task MNet. As a result we adopt the following approach to estimate S:

In text classification tasks, transferring an encoder with fine-tuned word embeddings from one task to another is difficult as there can be a significant difference between the two vocabularies. Hence, while learning the single-task CNN classifiers, we always make the word embeddings fixed.

1.2 Task Clustering Method

Directly using the transfer performance for task clustering may suffer from both efficiency and accuracy issues. First, evaluation of all entries in the matrix S involves conducting the source-target transfer learning O(n2)O(n^{2}) times, where nn is the number of meta-training tasks. For a large number of diverse tasks where the nn can be larger than 1,000, evaluation of the full matrix is unacceptable (over 1M entries to evaluate). Second, the estimated cross-task performance (i.e. some Sij\textbf{S}_{ij} or Sji\textbf{S}_{ji} scores) is often unreliable due to small data size or label noise. When the number of the uncertain values is large, they can collectively mislead the clustering algorithm to output an incorrect task-partition. To address the aforementioned challenges, we propose a novel task clustering algorithm based on the theory of matrix completion (Candès and Tao, 2010). Specifically, we deal with the huge number of entries by randomly sample task pairs to evaluate the Sij\textbf{S}_{ij} and Sji\textbf{S}_{ji} scores. Besides, we deal with the unreliable entries and asymmetry issue by keeping only task pairs (i,j)(i,j) with consistent Sij\textbf{S}_{ij} and Sji\textbf{S}_{ji} scores. as will be introduced in Eq. (9). Below, we describe our method in detail.

First, we use only reliable task pairs to generate a partially-observed similarity matrix Y. Specifically, if Sij\textbf{S}_{ij} and Sji\textbf{S}_{ji} are high enough, then it is likely that tasks {i,j}\{i,j\} belong to a same cluster and share significant information. Conversely, if Sij\textbf{S}_{ij} and Sji\textbf{S}_{ji} are low enough, then they tend to belong to different clusters. To this end, we need to design a mechanism to determine if a performance is high or low enough. Since different tasks may vary in difficulty, a fixed threshold is not suitable. Hence, we define a dynamic threshold using the mean and standard deviation of the target task performance, i.e., μj=mean(S:j)\mu_{j}=\text{mean}(\textbf{S}_{:j}) and σj=std(S:j)\sigma_{j}=\text{std}(\textbf{S}_{:j}), where S:j\textbf{S}_{:j} is the jj-th column of S. We then introduce two positive parameters p1p_{1} and p2p_{2}, and define high and low performance as Sij\textbf{S}_{ij} greater than μj+p1σj\mu_{j}+p_{1}\sigma_{j} or lower than μj−p2σj\mu_{j}-p_{2}\sigma_{j}, respectively. When both Sij\textbf{S}_{ij} and Sji\textbf{S}_{ji} are high and low enough, we set their pairwise similarity as 11 and , respectively. Other task pairs are treated as uncertain task pairs and are marked as unobserved, and don’t influence our clustering method. This leads to a partially-observed symmetric matrix Y, i.e.,

Finally, we apply spectral clustering on the matrix X to get the task clusters.

In the Appendix A, we show a Theorem 7.1 as well as its proof, implying that under mild conditions, the problem (3.1.2) can perfectly recover the underlying similarity matrix X∗\textbf{X}^{*} if the number of observed correct entries is at least O(nlog⁡2n)O(n\log^{2}n). This theoretical guarantee implies that for a large number nn of training tasks, only a tiny fraction of all task pairs is needed to reliably infer similarities over all task pairs.

2 Few-Shot Learning with Task Clusters

For each cluster CkC_{k}, we train a multi-task MNet model (Figure 1(b)) with all tasks in that cluster to encourage parameter sharing. The result, denoted as fkf_{k} is called the cluster-encoder of cluster CkC_{k}. The kk-th metric of the cluster is thus Λ(x1,x2)=fk(x1)⊺fk(x2)\Lambda(x_{1},x_{2})=f_{k}(x_{1})^{\intercal}f_{k}(x_{2}).

2.2 Adapting Multiple Metrics for Few-Shot Learning

where fkf_{k} is the learned (and frozen) encoder of the kk-th cluster, {αk}k=1K\{\alpha_{k}\}_{k=1}^{K} are adaptable parameters trained with few-shot training examples. And the predictor P(y∣x;fk)P(y|x;f_{k}) from each cluster is

xlx_{l} is the corresponding training sample of label yly_{l}.

End-to-end joint optimization on training data becomes a popular methodology for deep learning systems, but it is not directly applicable to diverse FSL. One main reason is that deep networks could easily fit any task partitions if we optimize on training loss only, making the learned metrics not generalize, as discussed in Section 6. As a result, this work adopts a pipeline training approach and employing validation sets for task clustering. Combining reinforcement learning with meta-learning could be a potential solution to enable an end-to-end training for future work.

Tasks and Data Sets

We test our methods by conducting experiments on two text classification data sets. We used NLTK toolkithttp://www.nltk.org/ for tokenization. The task are divided into meta-training tasks and meta-testing tasks (target tasks), where the meta-training tasks are used for clustering and cluster-encoder training. The meta-testing tasks are few-shot tasks, which are used for evaluating the method in Eq. (12).

First, following Barzilai and Crammer (2015), we construct multiple tasks with the multi-domain sentiment classification (Blitzer et al., 2007) data set. The dataset consists of Amazon product reviews for 23 types of products (see Appendix D for the details). For each product domain, we construct three binary classification tasks with different thresholds on the ratings: the tasks consider a review as positive if it belongs to one of the following buckets =5=5 stars, >=4>=4 stars or >=2>=2 stars.Data downloaded from http://www.cs.jhu.edu/~mdredze/datasets/sentiment/, in which the 3-star samples were unavailable due to their ambiguous nature (Blitzer et al., 2007). These buckets then form the basis of the task-setup, giving us 23 ×\times 3==69 tasks in total. For each domain we distribute the reviews uniformly to the 3 tasks. For evaluation, we select 12 (4×\times3) tasks from 4 domains (Books, DVD, Electronics, Kitchen) as the meta-testing (target) tasks out of all 23 domains. For the target tasks, we create 5-shot learning problems.

2 Real-World Tasks: User Intent Classification for Dialog System

The second dataset is from an online service which trains and serves intent classification models to various clients. The dataset comprises recorded conversations between human users and dialog systems in various domains, ranging from personal assistant to complex service-ordering or customer-service request scenarios. During classification, intent-labelsIn conversational dialog systems, intent-labels are used to guide the dialog-flow. are assigned to user utterances (sentences). We use a total of 175 tasks from different clients, and randomly sample 10 tasks from them as our target tasks. For each meta-training task, we randomly sample 64% data into a training set, 16% into a validation set, and use the rest as the test set. The number of labels for these tasks varies a lot (from 2 to 100, see Appendix D for details), making regular kk-shot settings not essentially limited-resource problems (e.g., 5-shot on 100 classes will give a good amount of 500 training instances). Hence, to adapt this to a FSL scenario, for target tasks we keep one example for each label (one-shot), plus 20 randomly picked labeled examples to create the training data. We believe this is a fairly realistic estimate of labeled examples one client could provide easily.

Our matrix-completion method could handle a large number of tasks via task-pair sampling. However, the sizes of tasks in the above two few-shot learning datasets are not too huge, so evaluation of the whole task-similarity matrix is still tractable. In our experiments, the incomplete matrices mainly come from the score-filtering step (see Eq. 9). Thus there is limited randomness involved in the generation of task clusters.

To strengthen the conclusion, we evaluate our algorithm on an additional dataset with a much larger number of tasks. The results are reported in the multi-task learning setting instead of the few-shot learning setting focused in this paper. Therefore we put the results to a non-archive version of this paperhttps://arxiv.org/pdf/1708.07918.pdf for further reference.

Experiments

In all experiments, we set both p1p_{1} and p2p_{2} parameters in (9) to 0.50.5. This strikes a balance between obtaining enough observed entries in Y, and ensuring that most of the retained similarities are consistent with the cluster membership. The window/hidden-layer sizes of CNN and the initialization of embeddings (random or pre-trained) are tuned during the cluster-encoder training phase, with the validation sets of meta-training tasks. We have the CNN with window size of 5 and 200 hidden units. The single-metric FSL baselines have 400 hidden units in the CNN encoders. On sentiment classification, all cluster-encoders use random initialized word embeddings for sentiment classification, and use Glove embeddings as initialization for intent classification, which is likely because the training sets of the intent tasks are usually small.

Since all the sentiment classification tasks are binary classification based on our dataset construction. A CNN classifier with binary output layer can be also trained as the cluster-encoder for each task cluster. Therefore we compared CNN classifier, matching network, and prototypical network on Amazon review, and found that CNN classifier performs similarly well as prototypical network. Since some of the Amazon review data is quite large which involves further difficulty on the computation of supporting sets, we finally use binary CNN classifiers as cluster-encoders in all the sentiment classification experiments.

Selection of the learning rate and number of training epochs for FSL settings, i.e., fitting α\alphas in Eq. (12), is more difficult since there is no validation data in few-shot problems. Thus we pre-select a subset of meta-training tasks as meta-validation tasks and tune the two hyper-parameters on the meta-validation tasks.

2 Experimental Results

Table 1 shows the main results on (i) the 12 few-shot product sentiment classification tasks by leveraging the learned knowledge from the 57 previously observed tasks from other product domains; and (ii) the 10 few-shot dialog intent classification tasks by leveraging the 165 previously observed tasks from other clients’ data.

Due to the limited training resources, all the supervised-learning baselines perform poorly. The two state-of-the-art metric-based FSL approaches, matching network (4) and prototypical network (5), do not perform better compared to the other baselines, since the single metric is not sufficient for all the diverse tasks. On intent classification where tasks are further diverse, all the single-metric or single-model methods (3-5) perform worse compared to the single-task CNN baseline (1). The convex combination of all the single training task models is the best performing baseline overall. However, on intent classification it only performs on par with the single-task CNN (1), which does not use any meta-learning or transfer learning techniques, mainly for two reasons: (i) with the growth of the number of meta-training tasks, the model parameters grow linearly, making the number of parameters (165 in this case) in Eq.(12) too large for the few-shot tasks to fit; (ii) the meta-training tasks in intent classification usually contain less training data, making the single-task encoders not generalize well.

In contrast, our RobustTC-FSL gives consistently better results compared to all the baselines. It outperforms the baselines in previous work (1-5) by a large margin of more than 6% on the sentiment classification tasks, and more than 3% on the intent classification tasks. It is also significantly better than our proposed baseline (6), showing the advantages of the usage of task clustering.

Although the RobustTC-FSL improves over baselines on intent classification, the margin is smaller compared to that on sentiment classification, because the intent classification tasks are more diverse in nature. This is also demonstrated by the training accuracy on the target tasks, where several tasks fail to find any cluster that could provide a metric that suits their training examples. To deal with this problem, we propose an improved algorithm to automatically discover whether a target task belongs to none of the task-clusters. If the task doesn’t belong to any of the clusters, it cannot benefit from any previous knowledge thus falls back to single-task CNN. The target task is treated as “out-of-clusters” when none of the clusters could achieve higher than 20% accuracy (selected on meta-validation tasks) on its training data. We call this method Adaptive RobustTC-FSL, which gives more than 5% performance boost over the best RobustTC-FSL result on intent classification. Note that the adaptive approach makes no difference on the sentiment tasks, because they are more closely related so re-using cluster-encoders always achieves better results compared to single-task CNNs.

3 Analysis

Figure 3 shows the effect of cluster numbers on the two tasks. RobustTC achieves best performance with 5 clusters on sentiment analysis (SA) and 20 clusters on intent classification (Intent). All clustering results significantly outperform the single-metric baselines (#cluster=1 in the figure).

Compared to previous task clustering algorithms, our RobustTC is the only one that can cluster tasks with varying numbers of class labels (e.g. in intent classification tasks). Moreover, we show that even in the setting of all binary classifications tasks (e.g. the sentiment-analysis tasks) that previous task clustering research work on, our RobustTC is still slightly better for the diverse FSL problems. Figure 3 compares with a state-of-the-art logistic regression based task clustering method (ASAP-MT-LR) (Barzilai and Crammer, 2015). Our RobustTC clusters give slightly better FSL performance (e.g. 83.12 vs. 82.65 when #cluster=5).

The top rows of Table 2 shows the ten clusters used to generate the sentiment classification results in Figure 3. From the results, we can see that tasks with same thresholds are usually grouped together; and tasks in similar domains also tend to appear in the same clusters, even the thresholds are slightly different (e.g. t2 vs t4 and t4 vs t5).

The bottom of the table shows the weights α\alphas in Eq.(12) for the target tasks with the largest improvement. It confirms that our RobustTC-FSL algorithm accurately adapts multiple metrics for the target tasks.

Related Work

Few Shot Learning FSL (Miller et al., 2000; Li et al., 2006; Lake et al., 2015) aims to learn classifiers for new classes with only a few training examples per class. Recent deep learning based FSL approaches mainly fall into two categories: (1) metric-based approaches Koch (2015); Vinyals et al. (2016); Snell et al. (2017), which aims to learn generalizable metrics and corresponding matching functions from multiple training tasks. These approaches essentially learn one metric for all tasks, which is sub-optimal when the tasks are diverse. (2) optimization-based approaches Ravi and Larochelle (2017); Munkhdalai and Yu (2017); Finn et al. (2017), which aims to learn to optimize model parameters (by either predicting the parameter updates or directly predicting the model parameters) given the gradients computed from few-shot examples.

Previous FSL research usually adopts the kk-shot, NN-way setting, where all the few-shot tasks have the same number of NN class labels, and each label has kk training instances. Moreover, these few-shot tasks are usually constructed by sampling from one huge dataset, thus all the tasks are guaranteed to be related to each other. However, in real-world applications, the few-shot learning tasks could be diverse: there are different tasks with varying number of class labels and they are not guaranteed to be related to each other. As a result, a single meta-model or metric-model is usually not sufficient to handle all the few-shot tasks.

Task Clustering Previous task clustering methods measure the task relationships in terms of similarities among single-task model parameters (Kumar and Daume III, 2012; Kang et al., 2011); or jointly assign task clusters and train model parameters for each cluster to minimize the overall training loss (Crammer and Mansour, 2012; Barzilai and Crammer, 2015; Murugesan et al., 2017). These methods usually work on convex models but do not fit the deep networks, mainly because of (i) the parameters of deep networks are very high-dimensional and their similarities are not necessarily related to the functional similarities; and (ii) deep networks have flexible representation power so they may overfit to arbitrary cluster assignment if we consider training loss alone. Moreover, these methods require identical class label sets across different tasks, which does not hold in most of the realistic settings.

Conclusion

We propose a few-shot learning approach for diverse tasks based on task clustering. The proposed method can use multiple metrics, and performs significantly better compared to previous single-metric methods when the few-shot tasks come from diverse domains. Future work includes applying the task-clustering idea to other FSL algorithms Ravi and Larochelle (2017); Finn et al. (2017); Cheng et al. (2017), and exploring more advanced composition methods of cluster-encoders beyond linear combination Chang et al. (2013); Andreas et al. (2016).

References

Appendix A: Perfect Recovery Guarantee for the Problem (3.1.2)

The following theorem shows the perfect recovery guarantee for the problem (3.1.2). Appendix C provides the proof for completeness.

The row and column spaces of X have coherence bounded above by a positive number μ0\mu_{0}.

Max absolute value in matrix UV⊤\textbf{U}\textbf{V}^{\top} is bounded above by μ1r/n\mu_{1}\sqrt{r}/n for a positive number μ1\mu_{1}.

Suppose that m1m_{1} entries of X∗\textbf{X}^{*} are observed with their locations sampled uniformly at random, and among the m1m_{1} observed entries, m2m_{2} randomly sampled entries are corrupted. Using the resulting partially observed matrix as the input to the problem (3.1.2), then with a probability at least 1−n−31-n^{-3}, the underlying matrix X∗\textbf{X}^{*} can be perfectly recovered, given

μ(E)ξ(X)≤14k+5\mu(\textbf{E})\xi(\textbf{X})\leq\frac{1}{4k+5},

ξ(X)−(2k−1)μ(E)ξ2(X)1−2(k+1)μ(E)ξ(X)<λ<1−(4k+5)μ(E)ξ(X)(k+2)μ(E)\frac{\xi(\textbf{X})-(2k-1)\mu(\textbf{E})\xi^{2}(\textbf{X})}{1-2(k+1)\mu(\textbf{E})\xi(\textbf{X})}<\lambda<\frac{1-(4k+5)\mu(\textbf{E})\xi(\textbf{X})}{(k+2)\mu(\textbf{E})},

 m1−m2≥C[max⁡(μ0,μ1)]4nlog⁡2n\ m_{1}-m_{2}\geq C[\max(\mu_{0},\mu_{1})]^{4}n\log^{2}n,

where CC is a positive constant; ξ(∘)\xi(\circ) and μ(∘)\mu(\circ) denotes the low-rank and sparsity incoherence (Chandrasekaran et al., 2011).

Theorem 7.1 implies that even if some of the observed entries computed by (9) are incorrect, problem (3.1.2) can still perfectly recover the underlying similarity matrix X∗\textbf{X}^{*} if the number of observed correct entries is at least O(nlog⁡2n)O(n\log^{2}n). For MATL with large nn, this implies that only a tiny fraction of all task pairs is needed to reliably infer similarities over all task pairs. Moreover, the completed similarity matrix X is symmetric, due to symmetry of the input matrix Y. This enables analysis by similarity-based clustering algorithms, such as spectral clustering.

Appendix B: Proof of Low-rankness of Matrix X

where Bi=aiai⊤\textbf{B}_{i}=\mathbf{a}_{i}\mathbf{a}_{i}^{\top} is a rank one matrix. Using the fact that \mboxrank(X)≤∑i=1k\mboxrank(Bi)\mbox{rank}(\textbf{X})\leq\sum_{i=1}^{k}\mbox{rank}(\textbf{B}_{i}) and \mboxrank(Bi)=1\mbox{rank}(\textbf{B}_{i})=1, we have \mboxrank(X)≤k\mbox{rank}(\textbf{X})\leq k, i.e., the rank of the similarity matrix X is upper bounded by the number of clusters. Since the number of clusters is usually small, the similarity matrix X should be of low rank.

Appendix C: Proof of Theorem 7.1

A1: the row and column spaces of X have coherence bounded above by a positive number μ0\mu_{0}, i.e., n/rmax⁡i∥PU(ei)∥≤μ0\sqrt{n/r}\max_{i}\|\textbf{P}_{\textbf{U}}(\mathbf{e}_{i})\|\leq\mu_{0} and n/rmax⁡i∥PV(ei)∥≤μ0\sqrt{n/r}\max_{i}\|\textbf{P}_{\textbf{V}}(\mathbf{e}_{i})\|\leq\mu_{0}, where PU=UU⊤\textbf{P}_{\textbf{U}}=\textbf{U}\textbf{U}^{\top}, PV=VV⊤\textbf{P}_{\textbf{V}}=\textbf{V}\textbf{V}^{\top}, and ei\mathbf{e}_{i} is the standard basis vector, and

A2: the matrix UV⊤\textbf{U}\textbf{V}^{\top} has a maximum entry bounded by μ1r/n\mu_{1}\sqrt{r}/n in absolute value for a positive number μ1\mu_{1}.

Let TT be the space spanned by the elements of the form uiy⊤\mathbf{u}_{i}\mathbf{y}^{\top} and xvi⊤\mathbf{x}\mathbf{v}^{\top}_{i}, for 1≤i≤k1\leq i\leq k, where x\mathbf{x} and y\mathbf{y} are arbitrary nn-dimensional vectors. Let T⊥T^{\perp} be the orthogonal complement to the space TT, and let PT\textbf{P}_{T} be the orthogonal projection onto the subspace TT given by

The following proposition shows that for any matrix Z∈T\textbf{Z}\in T, it is a zero matrix if enough amount of its entries are zero.

Let Ω\Omega be a set of mm entries sampled uniformly at random from [1,…,n]×[1,…,n][1,\ldots,n]\times[1,\ldots,n], and PΩ(Z)\textbf{P}_{\Omega}(\textbf{Z}) projects matrix Z onto the subset Ω\Omega. If m>m0m>m_{0}, where m0=CR2μ0rnβlog⁡nm_{0}=C_{R}^{2}\mu_{0}rn\beta\log n with β>1\beta>1 and CRC_{R} being a positive constant, then for any Z∈T\textbf{Z}\in T with PΩ(Z)=0\textbf{P}_{\Omega}(\textbf{Z})=0, we have Z=0\textbf{Z}=0 with probability 1−3n−β1-3n^{-\beta}.

According to the Theorem 3.2 in Candès and Tao (2010), for any Z∈T\textbf{Z}\in T, with a probability at least 1−2n2−2β1-2n^{2-2\beta}, we have

where δ=m0/m<1\delta=m_{0}/m<1. Since Z∈T\textbf{Z}\in T, we have PT(Z)=ZP_{T}(\textbf{Z})=\textbf{Z}. Then from (14), we have ∥Z∥F≤0\|\textbf{Z}\|_{F}\leq 0 and thus Z=0\textbf{Z}=0. ∎

In the following, we will develop a theorem for the dual certificate that guarantees the unique optimal solution to the following optimization problem

First, the existence of Q satisfying the conditions (a) to (e) ensures that (X,E)(\textbf{X},\textbf{E}) is an optimal solution. We only need to show its uniqueness and we prove it by contradiction. Assume there exists another optimal solution (X+NX,E+NE)(\textbf{X}+\textbf{N}_{\textbf{X}},\textbf{E}+\textbf{N}_{\textbf{E}}), where PΩ(NX+NE)=0\textbf{P}_{\Omega}(\textbf{N}_{\textbf{X}}+\textbf{N}_{\textbf{E}})=0. Then we have

where QE\textbf{Q}_{\textbf{E}} and QX\textbf{Q}_{\textbf{X}} satisfying PΔ(QE)=λ \mboxsgn(E)\textbf{P}_{\Delta}(\textbf{Q}_{\textbf{E}})=\lambda\ \mbox{sgn}(\textbf{E}), ∥PΔc(QE)∥∞≤λ\|\textbf{P}_{\Delta^{c}}(\textbf{Q}_{\textbf{E}})\|_{\infty}\leq\lambda, PT(QX)=UV⊤\textbf{P}_{T}(\textbf{Q}_{\textbf{X}})=\textbf{U}\textbf{V}^{\top} and ∥PT⊥(QX)∥≤1\|\textbf{P}_{T^{\perp}}(\textbf{Q}_{\textbf{X}})\|\leq 1. As a result, we have

We then choose PΔc(QE)\textbf{P}_{\Delta^{c}}(\textbf{Q}_{\textbf{E}}) and PT⊥(QX)\textbf{P}_{T^{\perp}}(\textbf{Q}_{\textbf{X}}) to be such that ⟨PΔc(QE),PΔc(NE)⟩=λ∥PΔc(NE)∥1\langle\textbf{P}_{\Delta^{c}}(\textbf{Q}_{\textbf{E}}),\textbf{P}_{\Delta^{c}}(\textbf{N}_{\textbf{E}})\rangle=\lambda\|\textbf{P}_{\Delta^{c}}(\textbf{N}_{\textbf{E}})\|_{1} and ⟨PT⊥(QX),PT⊥(NX)⟩=∥PT⊥(NX)∥∗\langle\textbf{P}_{T^{\perp}}(\textbf{Q}_{\textbf{X}}),\textbf{P}_{T^{\perp}}(\textbf{N}_{\textbf{X}})\rangle=\|\textbf{P}_{T^{\perp}}(\textbf{N}_{\textbf{X}})\|_{*}. We thus have

Since (X+NX,E+NE)(\textbf{X}+\textbf{N}_{\textbf{X}},\textbf{E}+\textbf{N}_{\textbf{E}}) is also an optimal solution, we have ∥PΩc(NE)∥1=∥PT⊥(NX)∥∗\|\textbf{P}_{\Omega^{c}}(\textbf{N}_{E})\|_{1}=\|\textbf{P}_{T^{\perp}}(\textbf{N}_{\textbf{X}})\|_{*}, leading to PΩc(NE)=PT⊥(NX)=0\textbf{P}_{\Omega^{c}}(\textbf{N}_{\textbf{E}})=\textbf{P}_{T^{\perp}}(\textbf{N}_{\textbf{X}})=0, or NX∈T\textbf{N}_{\textbf{X}}\in T. Since PΩ(NX+NE)=0\textbf{P}_{\Omega}(\textbf{N}_{\textbf{X}}+\textbf{N}_{\textbf{E}})=0, we have NX=NE+Z\textbf{N}_{\textbf{X}}=\textbf{N}_{\textbf{E}}+\textbf{Z}, where PΩ(Z)=0P_{\Omega}(\textbf{Z})=0 and PΩc(NE)=0\textbf{P}_{\Omega^{c}}(\textbf{N}_{\textbf{E}})=0. Hence, PΩc∩Ω(NX)=0\textbf{P}_{\Omega^{c}\cap\Omega}(\textbf{N}_{\textbf{X}})=0, where ∣Ωc∩Ω∣=m1−m2|\Omega^{c}\cap\Omega|=m_{1}-m_{2}. Since m1−m2>m0m_{1}-m_{2}>m_{0}, according to Proposition 1, we have, with a probability 1−3n−β1-3n^{-\beta}, NX=0\textbf{N}_{\textbf{X}}=0. Besides, since PΩ(NX+NE)=PΩ(NE)=0\textbf{P}_{\Omega}(\textbf{N}_{\textbf{X}}+\textbf{N}_{\textbf{E}})=\textbf{P}_{\Omega}(\textbf{N}_{\textbf{E}})=0 and Δ⊂Ω\Delta\subset\Omega, we have PΔ(NE)=0\textbf{P}_{\Delta}(\textbf{N}_{\textbf{E}})=0. Since NE=PΔ(NE)+PΔc(NE)\textbf{N}_{\textbf{E}}=\textbf{P}_{\Delta}(\textbf{N}_{\textbf{E}})+\textbf{P}_{\Delta^{c}}(\textbf{N}_{\textbf{E}}), we have NE=0\textbf{N}_{\textbf{E}}=0, which leads to the contradiction. ∎

Given Theorem 1, we are now ready to prove Theorem 3.1.

The key to the proof is to construct the matrix Q that satisfies the conditions (a)-(e) specified in Theorem 1. First, according to Theorem 1, when m1−m2>m0=CR2μ0rnβlog⁡nm_{1}-m_{2}>m_{0}=C_{R}^{2}\mu_{0}rn\beta\log n, with a probability at least 1−3n−β1-3n^{-\beta}, mapping PTPΩPT(Z):T↦T\textbf{P}_{T}\textbf{P}_{\Omega}\textbf{P}_{T}(\textbf{Z}):T\mapsto T is an one to one mapping and therefore its inverse mapping, denoted by (PTPΩPT)−1(\textbf{P}_{T}\textbf{P}_{\Omega}\textbf{P}_{T})^{-1} is well defined. Similar to the proof of Theorem 2 in Chandrasekaran et al. (2011), we construct the dual certificate Q as follows

where ϵT∈T\epsilon_{T}\in T and ϵΔ=PΔ(ϵΔ)\epsilon_{\Delta}=\textbf{P}_{\Delta}(\epsilon_{\Delta}). We further define

Evidently, we have PΩ(Q)=Q\textbf{P}_{\Omega}(\textbf{Q})=\textbf{Q} since Δ⊂Ω\Delta\subset\Omega, and therefore the condition (a) is satisfied. To satisfy the conditions (b)-(e), we need

Below, we will first show that there exist solutions ϵT∈T\epsilon_{T}\in T and ϵΔ\epsilon_{\Delta} that satisfy conditions (16) and (18). We will then bound ∥ϵΩ∥∞\|\epsilon_{\Omega}\|_{\infty}, ∥ϵT∥\|\epsilon_{T}\|, ∥PT⊥(H)∥\|\textbf{P}_{T^{\perp}}(\textbf{H})\|, and ∥PT⊥(F)∥\|\textbf{P}_{T^{\perp}}(\textbf{F})\| to show that with sufficiently small μ(E)\mu(\textbf{E}) and ξ(X)\xi(\textbf{X}), and appropriately chosen λ\lambda, conditions (17) and (19) can be satisfied as well.

First, we show the existence of ϵΔ\epsilon_{\Delta} and ϵT\epsilon_{T} that obey the relationships in (16) and (18). It is equivalent to show that there exists ϵT\epsilon_{T} that satisfies the following relation

where Ω∖Δ\Omega\setminus\Delta indicates the complement set of set Δ\Delta in Ω\Omega and ∣Ω∖Δ∣|\Omega\setminus\Delta| denotes its cardinality. Similar to the previous argument, when ∣Ω∖Δ∣=m1−m2>m0|\Omega\setminus\Delta|=m_{1}-m_{2}>m_{0}, with a probability 1−3n−β1-3n^{-\beta}, PTPΩ∖ΔPT(Z):T↦T\textbf{P}_{T}\textbf{P}_{\Omega\setminus\Delta}\textbf{P}_{T}(\textbf{Z}):T\mapsto T is an one to one mapping, and therefore (PTPΩ∖ΔPT(Z))−1(\textbf{P}_{T}\textbf{P}_{\Omega\setminus\Delta}\textbf{P}_{T}(\textbf{Z}))^{-1} is well defined. Using this result, we have the following solution to the above equation

We now bound ∥ϵT∥\|\epsilon_{T}\| and ∥ϵΔ∥∞\|\epsilon_{\Delta}\|_{\infty}. Since ∥ϵT∥≤∥ϵT∥F\|\epsilon_{T}\|\leq\|\epsilon_{T}\|_{F}, we bound ∥ϵT∥F\|\epsilon_{T}\|_{F} instead. First, according to Corollary 3.5 in Candès and Tao (2010), when β=4\beta=4, with a probability 1−n−31-n^{-3}, for any Z∈T\textbf{Z}\in T, we have

In the last step, we use the fact that \mboxrank(ϵT)≤2k\mbox{rank}(\epsilon_{T})\leq 2k if ϵT∈T\epsilon_{T}\in T. We then proceed to bound ∥ϵT∥\|\epsilon_{T}\| as follows

Combining the above two inequalities together, we have

Using the bound for ∥ϵΔ∥∞\|\epsilon_{\Delta}\|_{\infty} and ∥ϵT∥\|\epsilon_{T}\|, we now check the condition (17)

To ensure that there exists λ≥0\lambda\geq 0 satisfies the above two conditions, we have

Since the first condition is guaranteed to be satisfied for k≥1k\geq 1, we have

Appendix D: Data Statistics

We listed the detailed domains of the sentiment analysis tasks in Table 3. We removed the musical_instruments and tools_hardware domains from the original data because they have too few labeled examples. The statistics for the 10 target tasks of intent classification in Table 4.