Invariant Rationalization

Shiyu Chang, Yang Zhang, Mo Yu, Tommi S. Jaakkola

Introduction

A number of selective rationalization techniques (Lei et al., 2016; Li et al., 2016b; Chen et al., 2018a, b; Yu et al., 2018, 2019; Chang et al., 2019) have been proposed to explain the predictions of complex neural models. The key idea driving these methods is to find a small subset of the input features – rationale – that suffices on its own to yield the same outcome. In practice, rationales that remove much of the spurious content from the input, e.g., text, could be used and examined as justifications for model’s predictions.

The most commonly-used criterion for rationales is the maximum mutual information (MMI) criterion. In the context of NLP, it defines rationale as the subset of input text that maximizes the mutual information between the subset and the model output, subject to the constraint that the selected subset remains within a prescribed length. Specifically, if we denote the random variables corresponding to input as X\bm{X}, rationales as Z\bm{Z} and the model output as YY, then the MMI criterion finds the explanation Z=Z(X)\bm{Z}=\bm{Z}(\bm{X}) that yields the highest prediction accuracy of YY.

MMI criterion can nevertheless lead to undesirable results in practice. It is prone to highlighting spurious correlations between the input features and the output as valid explanations. While such correlations represent statistical relations present in the training data, and thus incorporated into the neural model, the impact of such features on the true outcome (as opposed to model’s predictions) can change at test time. In other words, MMI may select features that do not explain the underlying relationship between the inputs and outputs even though they may still be faithfully reporting the model’s behavior. We seek to modify the rationalization criterion to better tailor it to find causal features.

As an example, consider figure 1 that shows a beverage review which covers four aspects of beer: appearance, smell, palate, and overall. The reviewers also assigned a score to each of these aspects. Suppose we want to find an explanation supporting a positive score to smell. The correct explanation should be the portion of the review that actually discusses smell, as highlighted in green. However, reviews for other aspects such as palate (highlighted in red) may co-vary with smell score since, as senses, smell and palate are related. The overall statement as highlighted in blue would typically also clearly correlate with any individual aspect score, including smell. Taken together, sentences highlighted in green, red and blue would all be highly correlated with the positive score for smell. As a result, MMI may select any one of them (or some combination) as the rationale, depending on precise statistics in the training data. Only the green sentence constitutes an adequate explanation.

Our goal is to design a rationalization criterion that approximates finding causal features. While assessing causality is challenging, we can approximate the task by searching features that are invariant. This notion was recently introduced in the context of invariant risk minimization (IRM) (Arjovsky et al., 2019). The main idea is to highlight spurious (non-causal) variation by dividing the data into different environments. The same predictor, if based on causal features, should remain optimal in each environment separately.

In this paper, we propose invariant rationalization (InvRat), a novel rationalization scheme that incorporates the invariance constraint. We extend the IRM principle to neural predictions by resorting to a game-theoretic framework to impose invariance. Specifically, the proposed framework consists of three modules: a rationale generator, an environment-agnostic predictor as well as an environment-aware predictor. The rationale generator generates rationales Z\bm{Z} from the input X\bm{X}, and both predictors try to predict YY from Z\bm{Z}. The only difference between the two predictors is that the environment-aware predictor also has access to which environment each training data point is drawn from. The goal of the rationale generator is to restrict the rationales in a manner that closes the performance gap between the two predictors while still maximizing the prediction accuracy of the environment-agnostic predictor.

We show theoretically that InvRat can solve the invariant rationalization problem, and that the invariant rationales generalize well to unknown test environments in a well-defined minimax sense. We evaluate InvRat on multiple datasets with false correlations. The results show that InvRat does significantly better in removing false correlations and finding explanations that better align with human judgments.

Preliminaries: MMI and Its Limitation

In this section, we will formally review the MMI criterion and analyze its limitation using a probabilistic model. Throughout the paper, upper-cased letters, XX and X\bm{X}, denote random scalars and vectors respectively; lower-cased letters, xx and x\bm{x}, denote deterministic scalars and vectors respectively; H(X)H(\bm{X}) denotes the Shannon entropy of X\bm{X}; H(Y∣X)H(Y|\bm{X}) denotes the entropy of YY conditional on X\bm{X}; I(Y;X)I(Y;\bm{X}) denotes the mutual information. Without causing ambiguities, we use pX(⋅)p_{\bm{X}}(\cdot) and p(X)p(\bm{X}) interchangeably to denote the probabilistic mass function of X\bm{X}.

The MMI objective can be formulated as follows. Given the input-output pairs (X,Y)(\bm{X},Y), MMI aims to find a rationale Z\bm{Z}, which is a masked version of X\bm{X}, such that it maximizes the mutual information between Z\bm{Z} and YY. Formally,

where m\bm{m} is a binary mask and S\mathcal{S} denotes a subset of {0,1}N\{0,1\}^{N} with a sparsity and a continuity constraints. NN is the total length in X\bm{X}. We leave the exact mathematical form of the constraint set S\mathcal{S} abstract here, and it will be formally introduced in section 3.5. ⊙\odot denotes the element-wise multiplication of two vectors or matrices. Since the mutual information measures the predictive power of Z\bm{Z} on YY, MMI essentially tries to find a subset of input features that can best predict the output YY.

2 MMI Limitations

The biggest problem of MMI is that it is prone to picking up spurious probabilistic correlations, rather than finding the causal explanation. To demonstrate why this is the case, consider a probabilistic graph in figure 2, where X\bm{X} is divided into three variables, X1\bm{X}_{1}, X2\bm{X}_{2} and X3\bm{X}_{3}, which represents the three typical relationship with YY: X1\bm{X}_{1} influences YY; X2\bm{X}_{2} is influenced by YY; X3\bm{X}_{3} has no direction connections with YY. The dashed arrows represent some additional probabilistic dependencies among X\bm{X}. For now, we ignore EE.

As observed from the graph, X1\bm{X}_{1} serves as the valid explanation of YY, because it is the true cause of YY. Neither X2\bm{X}_{2} nor X3\bm{X}_{3} are valid explanations. However, X1\bm{X}_{1}, X2\bm{X}_{2} and X3\bm{X}_{3} can all be highly predicative of YY, so the MMI criterion may select any of the three features as the rationale. Concretely, consider the following toy example with all binary variables. Assume pX1(1)=0.5p_{\bm{X}_{1}}(1)=0.5, and

which makes X1\bm{X}_{1} a good predictor of YY. Next, define the conditional prior of X2\bm{X}_{2} as

which makes X2\bm{X}_{2} also a good predictor of YY. Finally, assume the conditional prior of X3\bm{X}_{3} is

In short, according to equations (2), (3) and (4), we have constructed a set of priors such that the predictive power of X1\bm{X}_{1}, X2\bm{X}_{2} and X3\bm{X}_{3} is exactly the same. As a result, there is no reason for MMI to favor X1\bm{X}_{1} over the others.

In fact, X1\bm{X}_{1}, X2\bm{X}_{2} and X3\bm{X}_{3} correspond to the three highlighted sentences in figure 1. X1\bm{X}_{1} corresponds to the smell review (green sentence), because it represents the true explanation that influences the output decision. X2\bm{X}_{2} corresponds to the overall review (blue sentence), because the overall summary of the beer inversely influenced by the smell score. Finally, X3\bm{X}_{3} corresponds to the palate review (red sentence), because the palate review does not have a direct relationship with the smell score. However, X3\bm{X}_{3} may still be highly predicative of YY because it can be strongly correlated with X1\bm{X}_{1} and X2\bm{X}_{2}. Therefore, we need to explore a novel rationalization scheme that can distinguish X1\bm{X}_{1} from the rest.

Adversarial Invariant Rationalization

In this section, we propose invariant rationalization, a rationalization criterion that can exclude rationales with spurious correlations, utilizing the extra information provided by an environment variable. We will introduce InvRat, a game-theoretic approach to solving the invariant rationalization problem. We will then theoretically analyze the convergence property and the generalizability of invariant rationales.

Without further information, distinguishing X1\bm{X}_{1} from X2\bm{X}_{2} and X3\bm{X}_{3} is a challenging task. However, this challenge can be resolved if we also have access to an extra piece of information: the environment. As shown in figure 2, an environment is defined as an instance of the variable EE that impacts the prior distribution of X\bm{X} (Arjovsky et al., 2019). On the other hand, we make the same assumption as in IRM that the p(Y∣X1)p(Y|\bm{X}_{1}) remains the same across the environments (hence there is no edge pointing from EE to YY in figure 2), because X1\bm{X}_{1} is the true cause of YY. As we will show soon, p(Y∣X2)p(Y|\bm{X}_{2}) and p(Y∣X3)p(Y|\bm{X}_{3}) will not remain the same across the environments, which distinguishes X1\bm{X}_{1} from X2\bm{X}_{2} and X3\bm{X}_{3}.

Back to the binary toy example in section 2.2, suppose there are two environments, e1e_{1} and e2e_{2}. In environment e1e_{1}, all the prior distributions are exactly the same as in section 2.2. In environment e2e_{2}, the priors are almost the same, except for the prior of X1\bm{X}_{1}. For notation ease, define qX(⋅)q_{\bm{X}}(\cdot) as the probabilities under environment e2e_{2}, i.e. pX∣E(⋅∣e2)p_{\bm{X}|E}(\cdot|e_{2}). Then, we assume that

It turns out that such a small difference suffices to expose X2\bm{X}_{2} and X3\bm{X}_{3}. In this environment, q(Y∣X1)q(Y|\bm{X}_{1}) is the same as in equation (2) as assumed. However, it can be computed that

which are different from equations (3) and (4). Notice that we have not yet assumed any changes in the priors of X2\bm{X}_{2} and X3\bm{X}_{3}, which will introduce further differences. The fundamental cause of such differences is that YY is independent of EE only when conditioned on X1\bm{X}_{1}, so pY∣X1(⋅∣⋅)p_{Y|\bm{X}_{1}}(\cdot|\cdot) would not change with EE. We call this property invariance. However, the conditional independence does not hold for X2\bm{X}_{2} and X3\bm{X}_{3}.

Therefore, given that we have access to multiple environments during training, i.e. multiple instances of EE, we propose the invariant rationalization objective as follows:

where ⊥\perp denotes probabilistic independence. The only difference between equations (1) and (5) is that the latter has the invariance constraint, which is used to screen out X2\bm{X}_{2} and X3\bm{X}_{3}. In practice, finding an eligible environment is feasible. In the beer review example in figure 1, a possible choice of environment is the brand of beer, because different beer brands have different prior distributions of the review in each aspect – some brands are better at the appearance, others better at the palate. Such variations in priors suffice to expose the non-invariance of the palate review or the overall review in terms of predicting the smell score.

2 The InvRat Framework

The constrained optimization in equation (5) is hard to solve in its original form. InvRat introduces a game-theoretic framework, which can approximately solve this problem. Notice that the invariance constraint can be converted to a constraint on entropy, i.e.,

which means if Z\bm{Z} is invariant, EE cannot provide extra information beyond Z\bm{Z} to predict YY. Guided by this perspective, InvRat consists of three players, as shown in figure 3:

an environment-agnostic/-independent predictor fi(Z)f_{i}(\bm{Z});

an environment-aware predictor fe(Z,E)f_{e}(\bm{Z},E); and

The goal of the environment-agnostic and environment-aware predictors is to predict YY from the rationale Z\bm{Z}. The only difference between them is that the latter has access to EE as another input feature but the former does not. Formally, denote L(Y;f)\mathcal{L}(Y;f) as the cross-entropy loss on a single instance. Then the learning objective of these two predictors can be written as follows.

where Z=g(X)\bm{Z}=g(\bm{X}). The rationale generator generates Z\bm{Z} by masking X\bm{X}. The goal of the rationale generator is also to minimize the invariance prediction loss Li∗\mathcal{L}^{*}_{i}. However, there is an additional goal to make the gap between Li∗\mathcal{L}^{*}_{i} and Le∗\mathcal{L}^{*}_{e} small. Formally, the objective of the generator is as follows:

where h(t)h(t) a convex function that is monotonically increasing in tt when t<0t<0, and strictly monotonically increasing in tt when t≥0t\geq 0, e.g., h(t)=th(t)=t and h(t)=ReLU(t)h(t)=\textrm{ReLU}(t).

3 Convergence Properties

This section justifies that equations (7) and (8) can solve equation (5) in its Lagrangian form. If the representation power of fi(⋅)f_{i}(\cdot) and fe(⋅,⋅)f_{e}(\cdot,\cdot) is sufficient, the cross-entropy loss can achieve its entropy lower bound, i.e.,

Notice that the environment-aware loss should be no greater than the environment-agnostic loss, because of the availability of more information, i.e., H(Y∣Z)≥H(Y∣Z,E)H(Y|\bm{Z})\geq H(Y|\bm{Z},E). Therefore, the invariance constraint in equation (6) can be rewritten as an inequality constraint:

Finally, notice that I(Y;Z)=H(Y)−H(Y∣Z)I(Y;\bm{Z})=H(Y)-H(Y|\bm{Z}). Thus the objective in equation (8) can be regarded as the Lagrange form of equation (5), with the constraint rewritten as an inequality constraint

According to the KKT conditions, λ>0\lambda>0 when equation (10) is binding. Moreover, the objectives in equations (7) and (8) can be rewritten as a minimax game

Therefore, the generator plays a co-operative game with the environment-agnostic predictor, and an adversarial game with the environment-aware predictor. The optimization can be performed using alternate gradient descent/ascent.

4 Invariance and Generalizability

In our previous discussions, we have justified the invariant rationales in the sense that it can uncover consistent and causal explanations and leave out spurious statistical correlations. In this section, we further justify invariant rationale in terms of generalizability. We consider two sets of environments, a set of training environments {et}\{e_{t}\} and a test environment eae_{a}. Only the training environments are accessible during training. The prior distributions in the test environment are completely unknown. The question we want to ask is: does keeping the invariant rationales and dropping the non-invariant rationales improve the generalizability in the unknown test environment?

Assume that 1) the training data are sufficient, 2) the predictor is environment-agnostic, 3) the predictor has sufficient representation power, and 4) the training converges to the global optimum. Under these assumptions, any predictor is able to replicate the training set distribution (with all the training environments mixed) p(Y∣Z,E∈{et})p(Y|\bm{Z},E\in\{e_{t}\}), which is optimal under the cross-entropy training objective. In the test environment eae_{a}, the cross-entropy loss of this predictor is given by

where p(Y∣Z,{et})p(Y|\bm{Z},\{e_{t}\}) is short for p(Y∣Z,E∈{et})p(Y|\bm{Z},E\in\{e_{t}\}). Ltest∗(Z)\mathcal{L}^{*}_{\textrm{test}}(\bm{Z}) cannot be evaluated because the prior distribution in the test environment is unknown. Instead, we consider the worst scenario. For notational ease, we introduce the following shorthand for the test environment distributions:

For the selected rationale Z\bm{Z}, we consider an adversarial test environment (hence the notation eae_{a}), which chooses π1\pi_{1}, π2\pi_{2} and π3\pi_{3} to maximize Ltest∗(Z;π1,π2,π3)\mathcal{L}^{*}_{\textrm{test}}(\bm{Z};\pi_{1},\pi_{2},\pi_{3}) (note that Ltest∗(Z)\mathcal{L}^{*}_{\textrm{test}}(\bm{Z}) is a function of π1\pi_{1}, π2\pi_{2}, and π3\pi_{3}). The following theorem shows that the minimizer of this adversarial loss is the invariant rationale X1\bm{X}_{1}.

Assume the probabilistic graph in figure 2 and that there are two environments ete_{t} and eae_{a}. Z=X1\bm{Z}=\bm{X}_{1} achieves the saddle point of the following minimax problem

where X\mathcal{X} denotes the power set of [X1,X2,X3][\bm{X}_{1},\bm{X}_{2},\bm{X}_{3}].

The proof is provided in the appendix A. Theorem 1 shows the nice property of the invariance rationale that it minimizes the risk under the most adverse test environment.

5 Incorporating Sparsity and Continuity Constraints

The sparsity and continuity constraint m∈S\bm{m}\in\mathcal{S} (equation (5)) stipulates that the total number of 11’s in m\bm{m} should be upper bounded and contiguous. There are two ways to implement the constraints.

Soft constraints: Following Chang et al. (2019), we can add another two Lagrange terms to equations (11):

where mn\bm{m}_{n} denotes the nn-th element of m\bm{m}; α\alpha is a predefined sparsity level. m\bm{m} is produced by an independent selection process (Lei et al., 2016). This method is flexible, but requires sophisticated tuning of three Lagrange multipliers.

Hard constraints: An alternative approach is to force g(⋅)g(\cdot) to select one chunck of text with a pre-specified length ll. Instead of predicting the mask directly, g(⋅)g(\cdot) produces a score sn\bm{s}_{n} for each position nn, and predicts the start position of the chunk by choosing the maximum of the score. Formally

where CausalConv(⋅)\textrm{CausalConv}(\cdot) denotes causal convolution, and the convolution kernel is an all-one vector of length ll.

Experiments

To evaluate the invariant rationale generation, we consider the following two binary classification datasets with known spurious correlations.

The original dataset consists of 25,000 movie reviews for training and 25,000 for testing. The output YY is the binarized score of the movie. We construct a synthetic setting that manually injects tokens with false correlations with YY, whose prior varies across artificial environments. The goal is to validate if the proposed method excludes these tokens from rationale selections. Specifically, we first randomly split the training set into two balanced subsets, where each subset is considered as an environment. We append punctuation “,” and “.” at the beginning of each sentence with the following distributions:

Here ii is the environment index taking values on {0,1}\{0,1\}. Specifically, we set α0\alpha_{0} and α1\alpha_{1} to be 0.9 and 0.7, respectively, for the training set. For the purpose of model selection and evaluation, we randomly split the original test set into two balanced subsets, which are our new validation and test sets. To test how different rationalization techniques generalize to unknown environments, we also inject the punctuation to the test and validation set, but with α0\alpha_{0} and α1\alpha_{1} set as 0.5 for the validation set, and 0.1, 0.3 for the testing set. According to equation (4.1), these manually injected “,” and “.” can be thought of as the X2\bm{X}_{2} variable in the figure 2, which have strong correlations to the label. It is worth mentioning that the environment ID is only provided in the training set.

Multi-aspect beer reviews (McAuley et al., 2012):

This dataset is commonly used in the field of rationalization (Lei et al., 2016; Bao et al., 2018; Yu et al., 2019; Chang et al., 2019). It contains 1.5 million beer reviews, each of which evaluates multiple aspects of a beer. These aspects include appearance, aroma, smell, palate and overall. Each aspect has a rating at the scale of . The goal is to provide rationales for these ratings. There is a high correlation among the rating scores of different aspects in the same review, making it difficult to directly learn a rationalization model from the original data. Therefore only the decorrelated subsets are selected as training data in the previous usages (Lei et al., 2016; Yu et al., 2019).

However, the high correlation among rating scores in the original data provides us a perfect evaluation benchmark for InvRaton its ability to exclude irrelevant but highly correlated aspects, because these highly correlated aspects can be thought of as X2\bm{X}_{2} and X3\bm{X}_{3} in figure 2, as discussed in section 2.2. To construct different environments, we cluster the data based on different degree of correlation among the aspects. To gauge the correlation among aspect, we train a simple linear regression model to predict the rating of the target aspect given the ratings of all the other aspects except the overall. A low prediction error of the data implies high correlation among the aspects. We then assign the data into different environments based on the linear prediction error. In particular, we construction two training environments using the data with least prediction error, i.e. highest correlations. The first training environment is sampled from the lowest 25 percentile of the prediction error, while the second one is from 25 to 50 percentile. On the contrary, we construction a validation set and a subjective evaluation set from data with the highest prediction error (i.e. highest 50 percentile). Following the same evaluation protocol (Bao et al., 2018; Chang et al., 2019), we consider a classification setting by treating reviews with ratings ≤\leq 0.4 as negative and ≥\geq 0.6 as positive. Each training environment has a total 5,000 label-balanced examples, which makes the size of the training set as 10,000. The size of the validation set and the subjective evaluation set are 2,000 and 400, respectively. Same as almost all previous work in rationalization, we focus on the appearance, aroma, and palate aspects only.

Also, this dataset includes sentence-level annotations for about 1,000 reviews. Each sentence is annotated with one or multiple aspects label, indicating which aspect this sentence belonging to. We use this set to automatically evaluate the precision of the extracted rationales.

2 Baselines

Rnp: A generator-predictor framework proposed by Lei et al. (2016) for rationalizing neural prediction (Rnp). The generator selects text spans as rationales which are then fed to the predictor for label classification. The selection optimizes the MMI criterion shown in equation (1).

3Player: The improvement of Rnp from Yu et al. (2019), which aims to alleviate the degeneration problem of Rnp. The model consists of three modules, which are the generator, the predictor and the complement predictor. The complement predictor tries to maximize the predictive accuracy from unselected words. Besides the MMI objective optimized between the generator and predictor, the generator also plays an adversarial game with the complement predictor, trying to minimize its performance.

3 Implementation Details

For all experiments, we use bidirectional gated recurrent units (Chung et al., 2014) with hidden dimension 256 for the generator and both of the predictors. All the methods use fixed 100-dimension Glove embeddings (Pennington et al., 2014). We use the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.001. The batch size is set to 500. To seek fair comparisons, we try to keep the settings of both Rnp and 3Player the same to ours. We re-implement the Rnp, and use the open-source implementationhttps://github.com/Gorov/three_player_for_emnlp. of 3Player. The only major difference between these models is that both Rnp and InvRat use the straight-through technique (Bengio et al., 2013) to deal with the problem of nondifferentiability in rationale selections while 3Player is based on the policy gradient (Williams, 1992).

For the IMDB dataset, we follow a standard setting (Lei et al., 2016; Chang et al., 2019) to use the soft constraints to regularize the selected rationales for all methods. Hyperparameters (i.e., μ1\mu_{1}, μ2\mu_{2} in equation (12), λ\lambda in equation (8), and the number of training epochs) are determined based on the best performance on the validation set. For the beer review task, we find the baseline methods perform much worse using soft constraints compared to the hard one. This might be because the review of each aspect is highly correlated in the training set. Thus, we consider the hard constraints with different length in generating rationales.

4 Results

Table 1 shows the results of the synthetic IMDB dataset. As we can see, Rnp selects the injected punctuation in 78.24% of the testing samples, while InvRat, as expected, does not highlight any. This result verifies our theoretical analysis in section 3. Moreover, because Rnp relies on these injected punctuation, whose probabilistic distribution varies drastically between training set and test set, its generalizability is poor, which leads to low predictive accuracy on the testing set. Specifically, there is a large gap of around 15% between the test performance of Rnp and the proposed InvRat. It is worth pointing out that, by the dataset construction, 3Player will obviously fail by including all punctuation as rationales. This is because otherwise, the complement predictor will have a clear clue to guess the predicted label. Thus, we exclude 3Player from the comparison.

Beer review:

We conduct both objective and subjective evaluations for the beer review dataset. We first compare the generated rationales against the human annotations and report precision, recall and F1 score in table 2. Similarly, the reported performances are based on the best performance on the validation set, which is also reported. We consider the highlight lengths of 10, 20 and 30.

We observe that InvRat consistently surpass the other two baselines in finding rationales that align with human annotation for most of the rationale lengths and the aspects. In particular, although the best accuracies among all three methods on validation sets have only small variations, the improvements are significant in terms of finding the correct rationales. For example, InvRat improves over the other two methods for more than 20 absolute percent in F1 for the appearance aspect. Two baselines methods fail to distinguish the true clues for different aspects, which confirms that the previous MMI objective is insufficient for ruling out the spurious words.

In addition, we also visualize the generated rationales of our method with a preset length of 20 in figure 4. We observe that the InvRat is able to produce meaningful justifications for all three aspects. By reading these selected texts alone, humans will easily predict the aspect label. To further verify that the rationales generated by InvRat align with human judgment, we present a subjective evaluation via Amazon Mechanical Turk. Recall that for each aspect we preserved a hold-out set with 400 examples (total 1,200 examples for all three aspects). We generate rationales with different lengths for all methods. In each subjective test, the subject is presented with the rationale of one aspect of the beer review, generated by one of the three methods (unselected words blocked), and asked to guess which aspect the rationale is talking about. We then compute the accuracy as the performance metric, which is shown in figure 5. Under this setting, a generator that picks spurious correlated texts will have a low accuracy. As can be observed, InvRat achieves the best performances in all cases.

Related Work

Selective rationalization is one of the major categories of model interpretability in machine learning. Lei et al. (2016) first propose a generator-predictor framework for rationalization. The framework is formally a co-operative game that maximizes the mutual information between the selected rationales and labels, as shown in (Chen et al., 2018a). Following this work, Chen et al. (2018b) improves the generator-predictor framework by proposing a new rationalization criterion by considering the combinatorial nature of the selection. Yu et al. (2019) point out the communication problem in co-operative learning and proposes a new three-player framework to control the unselected texts. Chang et al. (2019) aim to generate rationales in all possible classes instead of the target label only, which makes the model perform counterfactual reasoning. In all, these models deal with different challenges in generating high-quality rationales. However, they are still insufficient to distinguish the invariant words from the correlated ones.

Self-explaining models beyond selective rationalization:

Besides selective rationalization, other approaches also improve the interpretability of neural predictions. For example, module networks (Andreas et al., 2016a, b; Johnson et al., 2017) compose appropriate modules following the logical program produced by a natural language component. The restriction to a small set of pre-defined programs currently limits their applicability. Other lines of work include evaluating feature importance with gradient information (Simonyan et al., 2013; Li et al., 2016a; Sundararajan et al., 2017) or local perturbations (Kononenko et al., 2010; Lundberg & Lee, 2017); and interpreting deep networks by locally fitting interpretable models (Ribeiro et al., 2016; Alvarez-Melis & Jaakkola, 2018). However, these methods aim at providing post-hoc explanations of already-trained models, which is not able to find invariant texts.

Learning with biases:

Our work also relates to the topic of discovering dataset-specific biases. Specifically, neural models have shown remarkable results in many NLP applications, however, these models sometimes prone to fit some dataset-specific patterns or biases. For example, in natural language inference, such biased clues can be the word overlap between the input sentence pair (McCoy et al., 2019) or whether the negative word ”not” exists (Niven & Kao, 2019). Similar observations have been found in multi-hop question answering (Welbl et al., 2018; Min et al., 2019). To learn with biased data but not fully rely on it, Lewis & Fan (2018) use generative objectives to force the QA models to make use of the full question. Agrawal et al. (2018); Wang et al. (2019) propose carefully designed model architectures to capture more complex interactions between input clues beyond the biases. Ramakrishnan et al. (2018); Belinkov et al. (2019) propose to add adversarial regularizations that punish the internal representations that cooperate well with bias-only models. Clark et al. (2019); He et al. (2019) propose to learn ensemble models that fit the residual from the prediction with bias features. However, all these works assume that the biases are known. Our work instead can rule out unwanted features without knowing the pattern priorly.

Conclusion

In this paper, we propose a game-theoretic approach to invariant rationalization, where the method is trained to constrain the probability of the output conditional on the rationales be the same across multiple environments. The framework consists of three players, which competitively rule out spurious words with strong correlations to the output. We theoretically demonstrate the proposed game-theoretic framework drives the solution towards better generalization to test scenarios that have different distributions from the training. Extensive objective and subjective evaluations on both synthetic and multi-aspect sentiment classification datasets demonstrate that InvRat performs favorably against existing algorithms in rationale generation.

References

Appendix A Proof To Theorem 1

∀Z\forall\bm{Z}, partition Z\bm{Z} into an invariant variable ZI\bm{Z}_{I} and a non-invariant variable ZV\bm{Z}_{V}:

Given an arbitrary π1\pi_{1}, we construct a specific π2=π2∗\pi_{2}=\pi_{2}^{*} and π3=π3∗\pi_{3}=\pi_{3}^{*} such that

In other words, set these two priors such that the all the non-invariant variables are uninformative of YY. Since the test adversary is allowed to choose any distribution, this set of priors is within the feasible set of the test adversary.

Under the set of priors in equation (14), the non-invariant features are not predicative of YY, and only the invariant features are predicative of YY, i.e.

where (i) is from equation (15); (ii) is from the relationship between cross entropy and entropy; (iii) is because X1\bm{X}_{1} is the minimizer of conditional entropy of YY on ZI\bm{Z}_{I} and eae_{a}, among all the invariant variables; (iv) is because, by the definition of invariant variables, p(Y∣X1,E)=p(Y∣X1)p(Y|\bm{X}_{1},E)=p(Y|\bm{X}_{1}). Here, we use Ltest∗(Z;π1,π2∗,π3∗)\mathcal{L}^{*}_{\textrm{test}}(\bm{Z};\pi_{1},\pi_{2}^{*},\pi_{3}^{*}) to emphasize that Ltest∗(Z)\mathcal{L}^{*}_{\textrm{test}}(\bm{Z}) is computed under the distribution of π1,π2∗,π3∗\pi_{1},\pi_{2}^{*},\pi_{3}^{*}. Therefore, if we optimize over π2\pi_{2} and π3\pi_{3}, we have the following

where the second line is because p(Y∣X1,ea)p(Y|\bm{X}_{1},e_{a}) does not depend on π2\pi_{2} and π3\pi_{3}. Combining equations (16) and (17), we have

Note that the above discussions holds for all π1\pi_{1}. Therefore, taking the maximum over π1\pi_{1} of equation (18) preserves the inequality.