FR: Folded Rationalization with a Unified Encoder
Anonymous Author(s)
AffiliationAddress email
Abstract
Rationalization aims to strengthen the interpretability of NLP models by extractinga subset of human-intelligible pieces of their inputting texts.
Conventional worksgenerally employ a two-phase model in which a generator selects the most important pieces, followed by a predictor that makes predictions based on the selectedpieces.
However, such a two-phase model may incur the degeneration problemwhere the predictor overfits to the noise generated by a not yet well-trained generator and in turn, leads the generator to converge to a sub-optimal model that tends toselect senseless pieces.
To tackle this challenge, we propose Folded Rationalization(FR)
that folds the two phases of the rationale model into one from the perspectiveof text semantic extraction.
The key idea of FR is to employ a unified encoderbetween the generator and predictor, based on which FR can facilitate a better predictor by access to valuable information blocked by the generator in the traditionaltwo-phase model and thus bring a better generator.
Empirically, we show that FRimproves the F1 score by up to 10 .
3% as compared to state-of-the-art methods.
Introduction
There are growing concerns over the interpretability of NLP models, especially when languagemodels are being rapidly applied on various critical fields(Lipton, 2016; Du et al., 2019; Xianget al., 2019; Miller, 2019; Sun et al., 2021).
Rationalization, using a cooperative game between agenerator and a predictor in which the generator selects distinguishable and human-intelligible piecesof the inputting text (i e., rationale) to the followed predictor that maximizes the predictive accuracy
has become one of the mainstream approaches to improve the interpretability of NLP models.
Thestandard rationalization method named RNP (Lei et al., 2016) organizes the generator and predictorwith a two-phase framework (see Figure 2(a)).
However, as illustrated in Table 1, such a two-phasemodel suffers from the degeneration problem where the predictor may overfit to meaningless butdistinguishable rationales generated by the not yet well-trained generator (Yu et al., 2019), leadingthe generator to converge to the sub-optimal model that tends to select these uninformative rationales.
Many approaches have been proposed to address the degeneration issue.
The basic idea of theseapproaches is to regularize the predictor using supplementary modules that make use of the full textsuch that the predictor does not rely entirely on the rationale provided by the generator.
For example,as shown in the Figure 2, 3PLAYER (Yu et al., 2019) adopts an extra predictor to squeeze informativeparts from the unselected text pieces into the rationale; DMR (Huang et al., 2021) additionally alignswith prediction distribution and feature distribution of of the full text; A2R (Yu et al., 2021) combinesbinary selection with soft selection in which every token in the inputting text is partly contained.
Although these regularized methods can greatly alleviate the degeneration problem, they still maintainthe two fragmented phases in which the spoiled predictor can only be partially calibrated by the extra
[Table]
More specifically we identify that the predictor has notably higher speed the generator under the two-phase framework, indicating that a regularized predictor will not immediately
[Table]
lead to a well-trained generator and has to continuously learn from generated uninformative rationales
[Table]
until convergence.
To show this, we consider the RNP method with different learning rates for thegenerator and predictor.
We defer the experimental details to Appendix B.2 and present the results
[Table]
of rationale quality (F1 score) in Figure 1.
As can be seen, the results usually get better when the
[Table]
learning rate of the predictor is smaller than the generator.
In particular, the result achieves the best
[Table]
when the learning rate of the predictor is approximately 1 / 5 that of the generator, where the learningspeed of the predictor is exceptionally limited.
[Figure]
Although balancing the learning speed between the generator and predictorcan effectively improve the performance, tuning the learning rates involvescareful coordination between the two phases and requires much humaneffort, especially when some existing methods are designed with moremodules.
To tackle this challenge, we in this work propose a frustratinglysimple but effective method, Folded Rationalization (FR), which foldsthe two phases of the current rationalization method into one using a unified encoding mechanism.
Specifically, FR shares a unified text encoderbetween the generator and the predictor.
The predictor is enforced withthe same learning speed as the generator and has significant chances oflearning informative rationales from a well-trained generator.
On the otherhand, the generator can also get a higher learning speed with the auxiliaryof the predictor.
Additionally, as theoretically analyzed, the encoder ofthe generator can also be seen as a special regularizer for the predictor, which helps it get a globalview of all the possible rationale candidates from the full text and thus prohibits it from overfitting tothe uninformative ones.
Furthermore, we evaluate our approach on two widely used rationalizationbenchmarks, i.e., the Beer Reviews dataset (McAuley et al., 2012) and the Hotel Reviews dataset(Wang et al., 2010), of which the empirical results show that FR outperforms all state-of-the-artmethods in terms of the rationale quality.
Our contributions are:
• To the best of our knowledge, this paper is the first to solve the degeneration problem in rationalization from the perspective of re-organizing the two-phase framework.
We propose a simple buteffective method, namely, FR, that folds the two phases into one by sharing a unified encoder betweenthe generator and the predictor.• The degeneration problem is mainly because the predictor can make correct predictions usinguninformative rationales, leading to a sub-optimal generator.
In this paper, we theoretically provethat the predictor of FR will not make correct predictions using these uninformative ones and thusmitigate the degeneration problem.• We conduct extensive experiments over various datasets.
The performance superiority of FR is
Encoder g
Linear g G e n e r a t o r $
Encoder p
Linear p $ "
Encoder c
Linear c P r e d i c t
o r
P r e d i c t o r c ! !
Encoder g
Linear g G e n e r a t o r
Linear p
Linear a P r e d i c t o r
P r e d i c t
o r a Shared Param .
Encoder p
Encoder p min)* !
Encoder g
Linear g G e n e r a t o r $
Encoder p
Linear p P
r
e
d i c t
o r $ $ % (a) RNP ! ! "
Encoder g
Linear g G e n e r a t o r $
Encoder p
Linear p $ "
Encoder c
Linear c P r e d i c t
o r
P r e d i c t o r c !
Encoder g
Linear g G e n e r a t o r $
Encoder p
Linear p P
r
e
d i c t
o r ! !
Encoder g
Linear g G e n e r a t o r
Linear p
Linear a P r e d i c t o r
P r e d i c t
o r a Shared Param .
Encoder p
Encoder p min)* $ $ % (b) 3PLAYER ! "
Encoder g
Linear g G e n e r a t o r #
Linear p S t ud e n t
P r e d i c t o r !
$
Encoder t
Linear t T eac h e r
P r e d i c t o r
OutPenalty
FeaPenalty
Shared Param.
Encoder p
Encoder p % &' % &( % $( "
Encoder
Linear g
Encoder
Linear p !
G e n e r a t o r
P r e d i c t o r Shared Param.
Encoder
Linear g
Encoder
Linear p !
G e n e r a t o r
P r e d i c t o r Shared Param.
(c) DMR ! !
Encoder g
Linear g G e n e r a t o r $
Encoder p
Linear p $ "
Encoder c
Linear c P r e d i c t
o r
P r e d i c t o r c !
Encoder g
Linear g G e n e r a t o r $
Encoder p
Linear p P
r
e
d i c t
o r ! !
Encoder g
Linear g G e n e r a t o r
Linear p
Linear a P r e d i c t o r
P r e d i c t
o r a Shared Param .
Encoder p
Encoder p min)* $ $ % (d) A2R demonstrated as compared to traditional rationalization methods.
In particular, the F of FRcan be up to 10 .
3% higher than the state-of-the method
Related work
Optimization for neural rationales.
Most current rationalization methods adopt a cooperativeframework between generator and predictor (Lei et al., 2016), which requires careful optimizationto coordinate and is hard to train.
Considering this challenge, a series of research efforts focus onrefining the optimization process to improve the rationalization.
For instance, Bao et al.
(2018) used
Gumbel softmax to do the reparameterization.
Bastings et al.
(2019) replaced the Bernoulli samplingdistributions with rectified Kumaraswamy distributions.
Chang et al.
(2019) introduced a adversarialgame and produces both positive and negative rationales.
Jain et al.
(2020) disconnected the trainingregimes of the generator and predictor networks using saliency threshold.
Chang et al.
(2020) tried tolearn the invariance in rationalization.
Jiang et al.
(2021) used a post-hoc local approach to generaterationales for well-trained models.
These methods are orthogonal to our proposed method FR thatshares an encoder between the generator and predictor.
Regularization for neural rationales.
Another series of efforts seeks to regularize the predictorusing supplementary modules which have access to the information of the full text (Yu et al., 2019;
Sha et al., 2021; Huang et al., 2021; Yu et al., 2021).
Figure 2 shows a comparison of somerepresentative methods, where X, Z, Y represent the input text, the generated rationale, and thepredictive output, respectively.
Yu et al.
(2019) took the unselected text Z c into consideration byemploying a supplementary predictor Predictor c , as shown in Figure 4(c).
The generator and thesupplementary predictor play an adversarial game.
Predictor c tries to maximize the predictiveaccuracy while the Generator seeks to minimize the predictive accuracy of Predictor c such that allthe informative pieces is squeezed into Z from Z c .
Huang et al.
(2021) tried to align the distributionsof rationale with the full input text in both the output space and feature space, as shown in Figure 4(d).
To make alignment in the output space, they introduce a teacher predictor Predictor t pre-trained withthe full text and minimize the cross-entropy between the distributions of Y and Y t ( OutPenalty ).
Infeature space, they minimize the central moment discrepancy ( FeaPenalty ) (Zellinger et al., 2017)between the representation of X and Z .
Yu et al.
(2021) endowed the predictor with the information offull text by introducing a soft rationale, which is shown in Figure 4(f).
Specifically, the supplementarypredictor takes the masked text by soft attention Z soft as the input.
To convey the formation of fulltext to the predictor, the model minimizes the JS-divergence between the output Y of the originalpredictor and Y s of the supplementary predictor.
These methods are mostly related to our work.
However, different from these methods, we in this paper solve the degeneration problem from a newperspective.
We fold the two phases of the rationalization framework into one such that the predictorgets direct access to the original full text.
Problem definition
Notation In the following sections, we use P ( · ) and p ( · ) to represent distribution and probability.gen ( · ) and pred ( · ) represent the generator and predictor.
θ g
and θ p represent the parameters ofthe generator and predictor.
D represents the distribution of dataset.
We consider the classificationproblem, where the input is a text sequence
X =
[ x 1 , x 2 , · · · , x l ] with x i being the i -th token and lbeing the number of tokens.
The label of X is a one-hot vector Y ∈ { 0 , 1 } c , where c is the numberof categories.
Cooperative rationalization Cooperative rationalization framework consists of a generator and apredictor.
The goal of the generator is to find the most informative pieces including several tokensin the original input text X .
For each sample ( X, Y ) ∼ D , the generator firstly outputs a sequenceof binary mask M =
[ m 1 , · · · , m l ] ∈ { 0 , 1 } l .
Then, it forms the rationale Z by the element-wiseproduct of X and M :
[Equation]
To simplify the notation, we denote the rationale Z by gen ( X ) , i.e., Z = gen ( X ) .
In cooperativerationalization, the informativeness of the rationale Z provided by the generator is measured by thenegative cross entropy − H
( Y, Y z ) , where Y z is the output of the predictor with the input being Z .
Consequently, the generator and the predictor are usually optimized cooperatively:
[Equation]
Short and coherent regularizer Instead of using more complicated regularizers in the other modelstrying to mitigate degeneration (Yu et al., 2019; Huang et al., 2021), our model only needs a basicregularizer (Chang et al., 2019) as follows, which is similar to RNP (Lei et al., 2016), to effectivelycontrol the sparsity and coherence of the selected rationales:
[Equation]
where K denotes the number of tokens in the input text.
The first term encourages that the percentageof the tokens being selected as rationales is close to a pre-defined level α .
The second term encouragesthe rationales to be coherent.
Folded rationalization using unified encoder
In this section, we specify FR and analyze why it works both intuitively and formally.
4.1 Architecture of folded rationalization
[Figure]
Based on the framework of RNP, the architecture of FR is toshare the encoder between the generator and the predictor, asshown in Figure 3.
It is worthwhile to note that we have noconstraints on the types of the encoder and it can be any modelssuch as RNN and Transformer (Vaswani et al., 2017).
For theconvenience of comparing with crruent methods in experiments,in this paper, we adopt the bidirectional gated recurrent units(GRU)
(Cho et al., 2014) as the encoder which has been adoptedby most previous works (Huang et al., 2021; Yu et al., 2021).
In FR, the full text X is first sent to the unified Encoder in thegenerator and it outputs a representation for each token in X .
Then, the representation of each token is independently sent to
Linear g which is a linear layer acting as the generator head.
Linear g outputs a value of probabilityfollowing the Bernoulli distribution from which the mask of each token is independently sampled using gumbel-softmax (Jang et al., 2016).
After that, the generator outputs Z using equation 1 andfurther sends it to the unified encoder Encoder in the predictor.
By pre-processing the output of
Encoder with max-pooling, the predictor uses the linear layer Linear p to make the prediction.
Weadopt the similar objective function as RNP, i.e., equation 2 and 3, to optimize the generator andpredictor cooperatively.
Intuition for guaranteed predictive accuracy By taking the classification problem for example,we here discuss why FR will not reduce the predictive accuracy of the predictor.
In principle, thegenerator and the prdictor seek to extract the same semantic information from the similar input text.
Specifically, to select the most informative pieces from the original text, the generator has to extractthe semantic information of the text which is usually specific and distinguishable from other texts.
On the other hand, to make the correct prediction, the predictor needs to transform the selected piecesmostly relative to the input text into the semantic features which are distinguishable and separable.
Therefore, a unified encoder will not degrade the performance of the predictor, but will encouragethem to benefit from each other.
Mutually reinforcing generator and predictor The main problem in RNP is that both the genratorand the predictor only have access to partial information of the original data pairs, which requirescareful coordination to obtain the missed information from each other.
FR with a unified encoderprovides inherent benefits for the coordination and promotes the information sharing.
To be morespecific, the generator has access to the input text but no true labels, while the predictor is on thecontrary.
To achieve good results, they have to carefully make a coordination such that receive valuableinformation from one another.
However, there are 2 l candidate rationales for each X with length l ,which is exceptionally difficult for a not well trained generator to select informative ones from such alarge space.
As a consequence, the predictor of RNP has high risks in overfitting the uninformativenoise provided by the generator.
There is a similar case for the generator as obtaining backwardinformation from the predictor.
FR addresses this issue by allowing the generator and predictor todirectly access to the full information of the original data.
Specifically, the predictor with the unifiedencoder has a global view of all the rationale candidates by direct access to X , which prevents itselffrom overfitting to uninformative ones.
In turn, with the encoder of the predictor, the generator’sability of summarizing and extracting information from the original text is greatly enhanced.
4.2 Theoretical analysis
In the cooperative rationalization, the generator uses the predictor to evaluate the informativenessof rationales.
If the predictor can always classify uninformative rationales into true labels, then thegenerator may be fooled and converge to be sub-optimal.
Here we will show that the predictor in FRis regularized by the generator through the unified encoder and can not stably classify uninformativerationales into true labels any more.
In this way, only informative rationales can promise high predictive accuracy.
To this end, once the equation 2 is optimized to maximize the final predictive accuracy,the selected rationales is guaranteed to be informative ones.
To quantify the uninformativeness, wefirst give a definition of uninformative tokens:
Definition 1 For X ∼ D , X s is a subset of X , for a given token t , we say it is uninformative for Xif the following equation holds:
[Equation]
It means that token t is independent of Y under the condition of X s . In this situation, we cansay t is uninformative to Y for X naturally.
When equation 2 gets the optimal solution, we havepred ( gen ( X ))
=
p ( Y | X ) and pred ( gen ([ X, t ]))
=
p ( Y | X, t ) , where “[ X, t ]” denotes the result ofadding token t to any position of X .
Then, we derive the following lemma.
Lemma 1 When an uninformative token t is added to the original text X , the predictive results willhardly change:
[Equation]
where ϵ is an error depending on the learning error of the neural network.
When equation 2 gets theoptimal solution, the absolute value of ϵ is 0 .
Without losing generality, we consider the case when equation 2 achieves the optimal solution for simplicity.
For ease of exposition, we here denote gen ( X ) and gen ([ X, t ]) as Z ( X ) and [ Z 1 ( X ) , Z 2 ( t )]respectively, where Z 1 ( X ) represents the binary masks of tokens in X and Z 2 ( t ) represents the maskof the new token t .
Using equation 5 and ϵ = 0 , we have pred ( Z ( X ))
=
pred ([ Z 1 ( X ) , Z 2 ( t )]) .
Topromise the same prediction, we get Z ( X ) =
Z 1 ( X ) , which indicates
[Equation]
where gen ([ X, t ]) denotes the first item of generator’s output, e.g., Z 1 ( X ) .
For convenience ofanalyzing the functionality of the unified encoder, we decompose the generator and the predictor as
[Equation]
where “ ◦ ” stands for functional composition, i.e., ( f ◦ h )( X ) =
f ( h ( X )) .
h and f represent theencoder and linear layer, respectively.
Obviously, we have h g = h p for FR.
We rewrite equation 6 asf g ◦ h g
( X ) =
f g ◦ h g
([ X, t ]) .
Since f g is a linear function, and the mask is selected independentlyfor each token in practice, we get h g ( X )
=
h g ([ X, t ]) .
Now, we have the following lemma.
Lemma
If equation 2 gets the optimal solution, adding an uninformative token t to the text X doesnot change the representation of the original tokens in X output by the encoder of the generator, i.e.,
[Equation]
where h g ( X ) x i represents the token x i ’s representation with X being the input of the encoder h g .
In the following, we consider h g as a general one-way RNN network.
Note that bidirectional RNN isalmost the same.
Besides, our analysis also holds for Transformer encoder which we leave its proofin the Appendix A.2.
For the i -th token in X , the representation can be expressed as:
[Equation]
where e i , s i are the word embedding and hidden state of the i -th token.
φ g , ψ g are two functionscorresponding to the type of RNN units.
When an uninformative token t is added between x i andx i − 1 , we have
[Equation]
Since t will not influence the representation of x i , i.e., s i =
s ′
i , we have s t =
s i − 1 , which is specifiedin the following lemma.
Lemma
If the i -th token in X is uninformative, the hidden state of it through the encoder ofgenerator is equal to that of the token preceding it:
[Equation]
[Equation] Then, let us consider two different uninformative rationales, i.e., Z uninf and Z ′ uninf , which containonly uninformative tokens and come from two different data pairs ( X, Y ) , ( X ′ , Y ′ ) .
Lemma
If equation 11 holds, any two different uninformative rationales have the same representation through the encoder of generator for each token, i.e., h g ( Z uninf )
z i =
h g ( Z ′ uninf )
z j , whereh g
( Z uninf ) z i denotes the representation for the i -th token in Z uninf .
The proof can be seen in Appendix A.1.
Now, we immediately get the following theorem.
Theorem 1 If FR gets the optimal solution of equation 2, i.e., P ( Y | X ) =
P ( pred ( gen ( X ))) , and
Z uninf , Z ′ uninf are two different rationales that contain only uninformative tokens and are selectedfrom two different data pairs ( X, Y ) , ( X ′ , Y ′ ) , we have
[Equation]
Theorem 1 indicates that the predictor in FR will give the same output for any different uninformativerationales.
Hence, when we optimize the generator and the predictor by maximizing the finalpredictive accuracy using equation 2, the predictor only recognizes the informative rationales andignores the uninformative ones.
In this way, our FR greatly mitigates the degeneration problem.
[Table]
Experiments
5.1 Experimental setup
Datasets and Models Following (Huang et al., 2021), we consider two widely used rationalizationdatasets.
To the best of our knowledge, none of dataset contains personally identifiable informationor offensive content.
The details of the two dataset can be found in Appendix B.1.
1) Beer Reviews(McAuley et al., 2012) is a multi-aspect sentiment prediction dataset widely used in rationalization(Lei et al., 2016;
Yu et al., 2019; Chang et al., 2019; Huang et al., 2021; Yu et al., 2021).
There is ahigh correlation among the rating scores of different aspects in the same review, making it difficultto directly learn a rationalization model from the original data.
Following the previous work (Leiet al., 2016; Huang et al., 2021; Yu et al., 2021), we use the subsets decorrelated by Lei et al.
(2016)and binarize the labels as Bao et al.
(2018) did.
2) Hotel Reviews (Wang et al., 2010) is anothermulti-aspect sentiment classification dataset.
The dataset contains reviews of hotels from three aspectsincluding location, cleanliness, and service.
Each review has a rating on a scale of 0-5 stars.
Webinarize the labels as Bao et al.
(2018) did.
On both two dataset, we adopt the GRU (Cho et al., 2014)as the encoder which has been adopted by most previous works (Huang et al., 2021; Yu et al., 2021).
Baselines and implementation details We compare FR to the cooperative rationalization framework
RNP (Lei et al., 2016) and two latest published models that achieve state-of-the-art results: DMR(Huang et al., 2021) and A2R (Yu et al., 2021), both of which have been specified in section 1.
For
DMR, we adopt its source code and adjust its sparsity constraint to get a sparsity similar to theannotated rationales.
For A2R, we re-implement it to do token level selection as other models do.
Since DMR and A2R have been validated to outperform 3PLAYER (Huang et al., 2021; Yu et al.,2021), we in this paper ignore its results for clarity of presentation.
Following DMR and A2R, weuse the 100-dimension Glove (Pennington et al., 2014) as the word embedding and set the hiddendimension of GRU to be 200.
We use Adam (Kingma and Ba, 2014) as the optimizer.
All thebaselines are tuned a lot of times to find the best hyperparameters.
All of the models are implementedwith PyTorch 1 and trained on a RTX3090 GPU.
Metrics All the methods get similar predictive accuracy.
Following (Huang et al., 2021; Yu et al.,2021), we mainly focus on the quality of rationales, which is measured by the overlap between themodel selected tokens and human-annotated tokens.
P, R, F 1 indicate the precision, recall, and F1score, respectively.
S indicates the average sparsity of the selected rationales, i.e., the percentage ofselected tokens to the whole texts.
Acc indicates the predictive accuracy on the test set.
[Table]
Methods
[Table]
5.2 Results
Comparison with baselines on two dataset Table 2(a) and 2(b) show the results of selected rationaleson two dataset.
All the methods choose similar percentage of tokens that is close to the humanannotated sparsity by adjusting the sparsity regularization term in equation 3.
Obviously, we gainsignificant improvements in all six aspects.
In particular, the F1 score of our method FR is 82 .
8% inthe Beer-Appearance dataset, which improves the state-of-the-art result by up to 10 .
3% , i.e., 72 . 5 of
A2R. Table 3 shows some visualized examples of rationales from RNP and FR.
Comparison with baselines in low sparsity To show the robustness of our FR, we also conduct anexperiment where the sparsity of selected rationales is very low, which is the same as CAR (Changet al., 2019) and DMR.
The results are shown in Table 4.
The results of RNP and CAR are obtainedfrom (Chang et al., 2019), and the results of DMR are obtained from (Huang et al., 2021).
For theaspects of Aroma and Palate , we still achieve great improvement over other methods.
For Appearance ,our performance is a little bit worse than DMR.
The reason may be that when the sparsity is far fromthe ground truth, many informative tokens are lost and the predictor can not make the right prediction.
While DMR uses an adversarial framework same as CAR in practice and the label is used as anadditional input to the generator, so it may work better when the sparsity is extremely low.
Skewed predictor To show that our FR does not suffer from the degeneration problem, we conductthe same synthetic experiment that deliberately induces degeneration as Yu et al.
(2021) did.
Thedetails of the experimental setup can be found in Appendix B.3.
The results are shown in Table 5.
The results of RNP and A2R are obtained from (Yu et al., 2021).
For all the settings, we outperformboth RNP and A2R. Especially, for Palate-skew 20 , RNP and A2R can not work at all while our FR isstill effective.
It can be concluded that FR is much more robust than the other two methods in thissituation.
Skewed generator : To further show that our method is not easy to degenerate, we design a newsynthetic experiment with special initialization that induces degeneration from the perspective of
[Table]
[Table]
skewed generator.
We pre-train the generator to be a special classifier that indicates the category usingthe mask of the first token in each text.
For the text of class 1, we force the generator to select thefirst token, and for the text of class 0, we force the generator not to select the first token.
Therefore,the generator learns the category implicitly by whether the first token is chosen and the predictor onlyneeds to learn this misleading position information to make a prediction with high accuracy.
We compare the performance of RNP and our FR in the dataset Beer-Palate, because Palate isrelatively hard to learn as compared to other aspects (Yu et al., 2021).
Besides, the performanceof RNP and FR is similar in this aspect when the generator is not deliberately skewed.
All thehyperparameters we use here are the same as that of the best results in Table 2(a).
The results areshown in Table 6.
The k in “ skew k ” denotes the threshold of the skew: we pre-train the specialgenerator-classifier for a few epochs until its predictive accuracy is higher than k .
Since the accuracyincreases rapidly in the first a few epochs, obtaining a model that precisely achieves the pre-definedaccuracy is almost impossible.
Therefore, we use “ Pre _ acc ” to denote the actual predictive accuracyof the generator-classifier when the pre-training process stops.
Higher “ Pre _ acc ” means easier todegenerate.
We find, in this case, both methods get high predictive accuracy while RNP fails to findthe human-annotated rationales.
Conclusion, limitations, and future work
In this paper, we analyze the relationship between generator and predictor in terms of workingmechanism and propose a simple but effective framework to solve the degeneration problem in thetwo-phase rationalization.
The experimental results show that our proposed methods significantlyoutperform state-of-the-arts in terms of the rationale quality.
One limitation may be that our theoretical analysis mainly focuses on the idealized models whichhave perfectly fitted the distribution of the dataset.
Besides, although sharing the encoder between thegenerator and predictor is simple, it is limited to the basic RNP which has no extra modules.
Existingworks have proposed many extra modules to solve the degeneration problem, which demonstrate greateffectiveness.
Leveraging these extra modules can predictably achieve performance improvement.
However, the relationship among multiple modules will become much more sophisticated, simplysharing the generator and predictor may not be the optimal.
How to effectively incorporate existingoptimized techniques is a challenge for FR.
Besides, the sharing encoder of FR is similar to multi-task learning when training the generator andpredictor are viewed as two cooperative tasks.
However, existing multi-task learning methods areusually designed for the case where there are multiple output objectives but only one single inputsample.
How to bridge FR and multi-task learning both intuitively and theoretically, and then improvethe rationalization with techniques in multi-task learning, is still unknown.
We leave them as futurework.
Checklist
For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes]
(b) Did you describe the limitations of your work?
[Yes] See Section 6.(c)
Did you discuss any potential negative societal impacts of your work?
[Yes] SeeSection 6.(d) Have you read the ethics review guidelines and ensured that your paper conforms tothem?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes] See Section 4.2.
(b) Did you include complete proofs of all theoretical results?
[Yes] See Section 4.2 and
Appendix A.3.
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] (b) Did you specify all the training details (e
g., data splits, hyperparameters,
how they
were chosen)?
[Yes] See Section 5.1.
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[No] The experiments of most methods for rationalization donot have this item (Lei et al., 2016; Yu et al., 2019;
Chang et al., 2019; Huang et al., 2021) because experiments with multiple aspects of multiple datasets under the same
random seed are sufficient to verify the stability of the models.
All of our experiments
and re-implemented baselines with different settings and datasets are under one same
random seed to make a fair comparison.
We have also tried five different random seedsfor Beer-Appearance and Beer-Aroma in Table 2(a), and the standard deviations are 1.198 and 0.657 respectively.
(d) Did you include the total amount of compute and the type of resources used (e
g., typeof GPUs, internal cluster, or cloud provider)?
[Yes] See Section 5.1.
If you are using existing assets (e
g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes]
(b) Did you mention the license of the assets?
[Yes] See Appendix B.1.
(c) Did you include any new assets either in the supplemental material or as a URL?
[N/A]
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[Yes] See Appendix B.1.
(e) Did you discuss whether the data you are using/curating contains personally identifiable
information or offensive content?
[Yes] See Section 5.1.
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable? [N /A
c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A
A Theorem proofs
Using equation 11, we get that the hidden state of an uninformative token is equal to that of thetoken precedes it. Considering two specific uninformative rationales Z = { “ mask ” , “ t 1 ” , “ t 2 ” } and Z ′ =
{ “ mask ” , “ t 3 ” , “ t 4 ” } where all tokens in them are uninformative, we have:
[Equation]
Note that the token “ mask ” will always appear in any rationales because the hidden state in frontof the first token is randomly initialized.
So the proof of Lemma 4 is completed.
Then, we havemaxpool ( h g ( Z ))
=
maxpool ( h g ( Z ′ )) .
Theorem 1 is also proved.
A.2 The proof of Theorem 1 when the encoder is a Transformer encoder
In fact, we only need to prove Lemma 4 because Theorem 1 can be easily derived from it.
We expressh g as :
[Equation]
If x j is an uninformative token, it has no influence on h g ( X ) x
i for any x i according to Lemma 2.
So,we have || φ g ( e j ) ||
=0 for any uninformative x j .
For any Z uninf that contains only uninformative tokens and z i , z j in Z uninf , we have
[Equation]
The proof of Lemma 4 is completed.
A.3 More details on the derivation of Lemma
[Figure]
From Lemma 2, we know that the representation of each token obtained by the generator’s encoderkeeps unchanged after an uninformative token is added to the original text, under the conditionthat ϵ = 0 in Lemma 1.
For simplicity, we here consider the general one-way RNN network (thederivation process for Transformer can be found in the original Appendix.
A.2).
For the i -th token in
X , its representation can be expressed as:
[Equation]
(16) where e i , s i are the word embedding and hidden state of the i -th token, respectively.
φ g , ψ g are twofunctions corresponding to the type of RNN units.
When an uninformative token t is added betweenx i and x i − 1 , we have
[Equation]
(17) where s ′
i is the hidden state of the original x
i in this new text and we denote it by h g ([ X, t ]) x ′ i =
φ g ( s ′ i ) .
From Lemma 2, we have h g ( X ) x i =
h g ([ X, t ]) x ′ i .
Using the first term of of the first equation(equation 8 in our original paper), we get
[Equation]
Then, we have s i =
s ′
i .
Using the second term of of the second equation (equation 9 in our originalpaper), we get
[Equation]
Then, we have s t =
s i − 1 very smoothly and Lemma 3 is just a formal description of this equation.
[Table]
B Details of experimental setup
B.1 Datasets
Beer Reviews Following (Chang et al., 2019; Huang et al., 2021; Yu et al., 2021), we consider aclassification setting by treating reviews with ratings ≤ 0.4 as negative and ≥ 0.6 as positive.
Thenwe randomly select examples from the original training set to construct a balanced set.
Hotel Reviews Similar to Beer Reviews, we treat reviews with ratings < 3 as negative and > 3 aspositive.
More details are in Table 7.
Pos and Neg denote the number of positive and negative examples ineach set.
Sparsity denotes the average percentage of tokens in human-annotated rationales to thewhole texts.
We get the license of Beer Reviews by sending an email to Julian McAuley.
The Hotel Reviews is apublic dataset and we get it from https://github.com/kochsnow/distribution-matching-rationality.
B.
{+The setup of the experiment in Figure 
+}
We use the dataset of Beer-Aroma, whose details are shown in Table 7.
We use a fixed batch sizeof 256 and initialize the learning rates of the two modules to different sizes as shown in Figure 1.
The numbers in the squares are F1 scores that indicate the overlaps between the selected tokens andhuman-annotated rationales.
For different settings, they use the same hyperparameters except thelearning rates.
B.3 The details of skewed predictor
The experiment was first designed by Yu et al.
It deliberately induces degeneration to showthe robustness of A2R compared to RNP.
The predictor is first pre-trained using the first sentence ofeach text for a few epochs.
In Beer Reviews, the first sentence is usually about appearance.
So, thepredictor will overfit to the aspect of Appearance , which is uninformative for Aroma and Palate .
“ skew k ” denotes the predictor is pre-trained for k epochs.
To make a fair comparison, we keep thepre-training process the same as that of A2R: we use a batch size of 500 and a learning rate of 0.001.
B.4 More visualized results
We also provide the visualized rationales from DMR and A2R corresponding to the examples in
Table 3.
The results are shown in Table 8.
B.5 Visualized results of Lemma 3
To verify Lemma 3, we visualized the representations of the tokens in two special designed sentences“good . , smell”(a,b,c) and “good , .
smell ”(d,e,f) through different encoders in Figure 4.
We choosethese two sentences because “ ,” and “ .”
are uninformative in most cases, which is consistent with the
[Table]
setting of Lemma 3.
Both our FR and RNP are trained on Beer-Aroma, where the predictive accuracyof the two models are similar while RNP selects bad rationales.
Note that in FR, the encoder of thepredictor is just the generator’s encoder.
According to Lemma 3, the hidden states of “ ,” and “ .” should be the same as that of the word “ good”after they are passed through the generator’s encoder, thus resulting in the same representation.
Wetake the first 40 dimensions for better observation.
From Figure 4, we can see for both RNP and FR,
[Figure]
the uninformative tokens "," and "." are closer to "good" by the encoder of the generator than by theencoder of the predictor.
These results directly verify the conclusion of Lemma 3.
B.6 Failure examples
Table B.6 show some failure cases of our method.
Typically, the failures can be summarized as follows.
First, the model fails to grasp high-level language phenomena and world background knowledge.
Forexample, in the case of Beer-Palate, the model fails to understand the analogy statement of "almostfeels like drinking champagne" and makes the prediction as negative.
Second, the model fails tomake logical reasoning.
The ground truth of hotel cleanliness should be inferred from the word"comfortable".
However, our model makes judgments by selecting the rationales such as "breakfast,staff was friendly..., stay", which have little relevance to the cleanliness but are positive.
A similarfailure also occurs in the case of Beer-Aroma, where the model selects texts with a strong sentimentbut uncorrelated with the predefined ground truth.
The interpretability of neural networks aims to improve trust in the models. However, the problemof degeneration in the traditional two-phase rationalization models makes them untrustworthy forhumans. Although the regularization terms introduced by following researches on the predictorcan alleviate this problem, adjusting the regularization terms requires significant manual effort tosee whether the model has degenerated or not according to the human-annotated rationales, whichare very precious and only present in small numbers in the test set.
Our FR does not suffer fromdegeneration as long as the predictive accuracy is high, which can be tuned on the validation set.
So, our model saves a lot of manual cost.
In addition, our model reduces the number of parametersby roughly half compared to traditional RNP and can be used by more researchers with limitedcomputational resources.
To the best of our knowledge, our research has no negative impact onsociety.
[Table]
D Experiments with specialized layers
To make a fair comparison with the baseline models, our original paper mainly implemented theencoder with only one layer of GRUs for the experiments, which keeps the same as them.
To better understand the behavior where the encoders are partly shared, we further constructed theencoders with 3,4,5 layers of GRUs.
{+The results can be seen in table 10 and 
+}
[Table]
Notes in table 10:
0(RNP): all 3 layers are not shared
1st: only the 1st layer is shared
1st+2nd: the 1st and 2nd layers are shared
3rd: only the 3rd layer is shared
2st+3rd: the 2nd and 3rd layers are shared
All (FR): the unified encoder (all 3 layers are fully shared)
Notes in table 11:
0(RNP): all layers are not shared
[Table]
[Table]
two
[Table]
are [Table] [Table] the first three layers are shared
[Table]
the first four layers are shared
[Table]
It can be seen from the table that the case fully sharing the encoder between the generator andpredictor always outperforms that where the encoders are partly shared in terms of rationale quality(f1).
Besides, the above table showed that the rationale quality gets better as the number of sharedlayers increases in overall.
We argue that, in order to achieve a good rationale, both the generator and predictor have to captureand encode the same informative sections from an input.
Therefore, sharing the entire encoder canhelp performance.
We also showed in the theoretical analysis of the paper, the encoder should befully shared to make the predictor and the generator regularized by each other to get stable models.