ACL 2023
Nuno M. Guerreiro
André F. T. Martins
Alexis Ross
Marcos Treviso
This album is terrible and some of the songs are really bad
NEG
NEU
POS
This album is terrible and some of the songs are really bad
This album is terrible and some of the songs are really bad
NEG
NEU
POS
Selective Rationalization
a.k.a. mask-then-predict
highlights as explanations
This album is terrible and some of the songs are really bad
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
Selective Rationalization
a.k.a. mask-then-predict
highlights as explanations
Counterfactual Generation
a.k.a. what-if questions
edits as explanations
NEG
NEU
POS
CREST (ContRastive Edits with Sparse raTionalization)
Selective Rationalization
a.k.a. mask-then-predict
highlights as explanations
Counterfactual Generation
a.k.a. what-if questions
edits as explanations
NEG
NEU
POS
This album is terrible and some of the songs are really bad
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
This album is terrible and some of the songs are really bad
\(\bm{x}\)
Trainable Masker
This album is terrible and some of the songs are really bad
\(\bm{x}\)
Trainable Masker
\(\bm{z}\)
This album is terrible and some of the songs are really bad
\(\bm{x}\)
This album is terrible and some of the songs are really bad
\(\hat{y}\)
NEG
Predictor
Trainable Masker
\(\bm{z}\)
This album is terrible and some of the songs are really bad
\(\bm{x}\)
This album is terrible and some of the songs are really bad
\(\hat{y}\)
NEG
Predictor
Trainable Masker
\(\bm{z}\)
This album is terrible and some of the songs are really bad
\(\bm{x}\)
POS: This album is MASK and some of the songs are MASK
This album is terrible and some of the songs are really bad
\(\hat{y}\)
NEG
Predictor
Trainable Masker
\(\bm{z}\)
This album is terrible and some of the songs are really bad
\(\bm{x}\)
\(\tilde{\bm{x}}\)
POS: This album is MASK and some of the songs are MASK
Editor
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
• Masker: SPECTRA rationalizer [1]
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
• Two datasets: IMDB and SNLI
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
• Two datasets: IMDB and SNLI
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
• Two datasets: IMDB and SNLI
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
• Two datasets: IMDB and SNLI
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
• Two datasets: IMDB and SNLI
– Controllable sparsity
– Contiguity
– Robustness
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
• 100 examples (IMDB + SNLI)
• Validity and naturalness (e.g., based on style, tone, and grammar)
• 5-point Likert scale
• 100 examples (IMDB + SNLI)
• Validity and naturalness (e.g., based on style, tone, and grammar)
• 5-point Likert scale
• 100 examples (IMDB + SNLI)
• Validity and naturalness (e.g., based on style, tone, and grammar)
• 5-point Likert scale
CREST-Generation
✅
High-quality counterfactuals
CREST-Generation
???
✅
High-quality counterfactuals
CREST-Generation
🤔
Data augmentation?
✅
High-quality counterfactuals
CREST-Generation
✅
High-quality counterfactuals
🥰
Exploit the paired structure of factual and counterfactual inputs
CREST-Rationalization
CREST-Generation
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
CREST-Generation
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
CREST-Generation
\(\tilde{\bm{x}}\)
\(\tilde{\bm{z}}^\star\)
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
CREST-Generation
\(\tilde{\bm{x}}\)
\(\tilde{\bm{z}}^\star\)
FACTUAL
FLOW
COUNTERFACTUAL
FLOW
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
CREST-Generation
\(\tilde{\bm{x}}\)
\(\tilde{\bm{z}}^\star\)
FACTUAL
FLOW
COUNTERFACTUAL
FLOW
Trainable Masker
Trainable Masker
shared
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
CREST-Generation
\(\tilde{\bm{x}}\)
\(\tilde{\bm{z}}^\star\)
FACTUAL
FLOW
COUNTERFACTUAL
FLOW
Trainable Masker
Trainable Masker
\(\bm{z}\)
\(\tilde{\bm{z}}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
shared
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
CREST-Generation
\(\tilde{\bm{x}}\)
\(\tilde{\bm{z}}^\star\)
FACTUAL
FLOW
COUNTERFACTUAL
FLOW
Trainable Masker
Trainable Masker
\(\bm{z}\)
\(\tilde{\bm{z}}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
NEG
Predictor
POS
Predictor
\(\hat{y}\)
\(\tilde{y}\)
shared
shared
\(\bm{z}^\star\)
\(\bm{x}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
CREST-Generation
\(\tilde{\bm{x}}\)
\(\tilde{\bm{z}}^\star\)
FACTUAL
FLOW
COUNTERFACTUAL
FLOW
Trainable Masker
Trainable Masker
\(\bm{z}\)
\(\tilde{\bm{z}}\)
This album is terrible and some of the songs are really bad
This album is amazing and some of the songs are very well written
NEG
Predictor
POS
Predictor
\(\hat{y}\)
\(\tilde{y}\)
shared
shared
Agreement regularization:
factual similarity
counterfactual similarity
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
Original inputs
Original + Human CFs
Original + CREST CFs
CREST-Rationalization
Data Augmentation
in-domain
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
contrastive
out-of-domain
Are the rationales generated by CREST-Rationalization interpretable?
Are the rationales generated by CREST-Rationalization interpretable?
• Plausibility (human-likeness)
• Forward simulability (informativeness)
• Counterfactual simulability:
Are the rationales generated by CREST-Rationalization interpretable?
input with infilled tokens by \(G\) in the positions marked by \(\bm{z}\)
• Plausibility (human-likeness)
• Forward simulability (informativeness)
• Counterfactual simulability:
ability of a rationale \(\bm{z}\) to change the classifier's prediction when the classifier receives a rationale-guided contrastive edit as input
Are the rationales generated by CREST-Rationalization interpretable?
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
0.6733 ± 0.02 91.70 ± 0.92 81.18 ± 2.79
0.6718 ± 0.04 91.44 ± 1.46 80.53 ± 4.17
0.6758 ± 0.01 91.68 ± 0.59 84.54 ± 1.09
0.6904 ± 0.02 91.93 ± 0.83 86.43 ± 1.56
Setup
Plausibility
(AUC)
Forward Sim.
(ACC)
Counterfactual Sim.
(ACC)
Data augmentation:
CREST-Rationalization:
Are the rationales generated by CREST-Rationalization interpretable?
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
0.6733 ± 0.02 91.70 ± 0.92 81.18 ± 2.79
0.6718 ± 0.04 91.44 ± 1.46 80.53 ± 4.17
0.6758 ± 0.01 91.68 ± 0.59 84.54 ± 1.09
0.6904 ± 0.02 91.93 ± 0.83 86.43 ± 1.56
Setup
Plausibility
(AUC)
Forward Sim.
(ACC)
Counterfactual Sim.
(ACC)
Data augmentation:
CREST-Rationalization:
Are the rationales generated by CREST-Rationalization interpretable?
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
0.6733 ± 0.02 91.70 ± 0.92 81.18 ± 2.79
0.6718 ± 0.04 91.44 ± 1.46 80.53 ± 4.17
0.6758 ± 0.01 91.68 ± 0.59 84.54 ± 1.09
0.6904 ± 0.02 91.93 ± 0.83 86.43 ± 1.56
Setup
Plausibility
(AUC)
Forward Sim.
(ACC)
Counterfactual Sim.
(ACC)
Data augmentation:
CREST-Rationalization:
• produces valid, fluent, and diverse counterfactuals
• controls the amount of perturbation
• leads to plausible explanations
• achieves high counterfactual simulability
Selective Rationalization ❤︎ Counterfactual Generation
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
– Controllable sparsity
– Contiguity
– Robustness
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
– Controllable sparsity
– Contiguity
– Robustness
validity
fluency
diversity
closeness
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
– Controllable sparsity
– Contiguity
– Robustness
validity
fluency
diversity
closeness
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
– Controllable sparsity
– Contiguity
– Robustness
validity
fluency
diversity
closeness
• Masker: SPECTRA rationalizer [1]
• Editor: Pre-trained T5 model
[1] Guerreiro, N.M. and Martins, A. F. T. SPECTRA: Sparse structured text rationalization. EMNLP 2021.
– Controllable sparsity
– Contiguity
– Robustness
validity
fluency
diversity
closeness
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
91.1 ± 0.3 91.4 ± 0.8 88.5 ± 0.9 76.5 ± 1.6 79.8 ± 1.6 86.0 ± 0.7 88.5 ± 0.7
90.9 ± 0.5 92.9 ± 0.9 90.4 ± 1.6 76.6 ± 1.5 80.7 ± 1.3 86.3 ± 1.0 89.1 ± 1.2
90.8 ± 0.2 91.6 ± 1.3 89.2 ± 0.4 76.7 ± 1.0 80.6 ± 0.6 86.4 ± 0.6 89.1 ± 0.5
91.2 ± 0.5 92.9 ± 0.5 89.7 ± 1.1 77.3 ± 2.3 81.1 ± 2.4 86.8 ± 0.8 89.3 ± 0.7
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp
• SPECTRA rationalizer as the masker
• Experiments on IMDB and SNLI
in-domain contrast out-of-domain
\(F\)
\(F + C_H\)
\(F + C_S\)
\(F \,\&\, C_S\)
91.1 ± 0.3 91.4 ± 0.8 88.5 ± 0.9 76.5 ± 1.6 79.8 ± 1.6 86.0 ± 0.7 88.5 ± 0.7
90.9 ± 0.5 92.9 ± 0.9 90.4 ± 1.6 76.6 ± 1.5 80.7 ± 1.3 86.3 ± 1.0 89.1 ± 1.2
90.8 ± 0.2 91.6 ± 1.3 89.2 ± 0.4 76.7 ± 1.0 80.6 ± 0.6 86.4 ± 0.6 89.1 ± 0.5
91.2 ± 0.5 92.9 ± 0.5 89.7 ± 1.1 77.3 ± 2.3 81.1 ± 2.4 86.8 ± 0.8 89.3 ± 0.7
Data augmentation:
CREST-Rationalization:
Setup
IMDB
Revised IMDB
Contrast IMDB
RotTom
SST-2
Amazon
Yelp