Explaining with Contrastive Phrasal Highlighting: A Case Study in Assisting Humans to Detect Translation Differences (2023)

Abstract: Explainable NLP techniques primarily explain by answering “Which tokens in the input are responsible for this prediction?”. We argue that for NLP models that make predictions by comparing two input texts, it is more useful to explain by answering “What differences between the two inputs explain this prediction?”. We introduce a technique to generate contrastive phrasal highlights that explain the predictions of a semantic divergence model via phrase alignment guided erasure. We show that the resulting highlights match human rationales of cross-lingual semantic differences better than popular post-hoc saliency techniques and that they successfully help people detect fine-grained meaning differences in human translations and critical machine translation errors.

## introduction a common strategy to explain the predictions of nlp models is to highlight salient tokens in their inputs @xcite @xcite . however, this is suboptimal for the many nlp tasks that require comparing and contrasting two or more pieces of text to predict a class or a similarity score, such as natural language inference @xcite , semantic textual similarity @xcite , or evaluation and quality estimation of text generation @xcite @xcite @xcite . at the same time, a long line of research in social sciences shows that human explanations are contrastive @xcite , i.e., humans do not explain why an event happened in a vacuum but instead compare what happened to a contrast case. for instance, to explain how a greek sentence and a translation in english differ, it is more intuitive to show how they differ (as presented in figure 1 ) than to highlight all salient greek and english tokens without specifying how they relate to each other. in this work, we introduce a post-hoc explainability technique to answer "what differences between two inputs explain a prediction"? for nlp regression models that produce a score encoding a relationship between two text inputs. we apply it to the task of explaining meaning divergences between a text in one language and its translation. we design a phrase-alignment-guided erasure strategy to explain the predictions of a semantic divergence model and highlight minimal phrase pairs in the two inputs that result in meaning differences. we extensively evaluate our approach with both proxy and human-centered evaluations. comparing against human explanations for meaning differences in english-french human translations, our approach matches human rationales better than popular post-hoc methods that highlight salient tokens independently @xcite . acknowledging the limitations of such proxy evaluations @xcite , we conduct two irb-approved human studies to assess the usefulness of our contrastive phrasal highlights when crowd-sourcing challenging bilingual annotation tasks. we find that our approach helps annotators reliably discover finegrained meaning differences in english-french and english-spanish human translations and detect critical errors in portuguese-to-english machine trans-lation. we make our code and data publicly available: https://github.com/elbria/ex-semdiv . ## background we focus on local explanations which explain why a specific prediction was made, often to help humans rely on predictions appropriately in machinein-the-loop use cases @xcite . highlight explanations local explanations often consist of highlighting input features deemed important to a prediction. in glass-box settings, prior works seek to quantify feature saliency with model-internal signals such as gradients @xcite , contextual decompositions @xcite , or attention mechanisms @xcite . however, these highlights' ability to serve as explanations has been questioned @xcite @xcite , leading to work revisiting technical solutions and evaluations under which attention could be seen as an explanation @xcite @xcite . another family of approaches relies on erasure strategies to explain the predictions of black box models. @xcite quantify a token's importance as the difference in model confidence once it is erased from the input, with several following works exploring different token erasure schemes @xcite . @xcite approximates the model's local decision boundary with linear models by erasing multiple tokens from a model's input, while shap (lundberg and lee, 2017) computes shapley values by estimating the marginal contribution of each token across all possible erasures. we build on this line of work by designing an erasure strategy that identifies salient contrastive phrasal pairs rather than independent salient tokens. contrastive explanations motivated by social science research suggesting that humans explain with respect to an (implicit) contrast case @xcite , recent work has sought to generate the latter by producing counterfactual explanations: minimally edited versions of the input that change the model prediction. performing such edits usually requires training dedicated editors @xcite , prompting language models @xcite , and accessing knowledge bases @xcite , among others @xcite . closer to our work, an-other family of approaches extracts highlights contrastively: jacovi and goldberg (2021) extend erasure-based approaches to identify which input features lead to the actual prediction vs. a contrastive prediction, while yin and neubig (2022) extend saliency methods to explain the generation of contrast cases for language generation tasks. our work explains the predictions of models that compare two inputs, where identifying salient phrase pairs that differ across them provides a natural mechanism for contrastive explanations. evaluation most current work in nlp adopts proxy evaluations that compare automatic explanations with human explanations of the gold label, with numerous datasets encoding explanations using highlights or free-form text @xcite . others rely on simplified human tasks, such as simulatability, evaluating whether explanations help people predict a model's prediction more accurately @xcite . despite the attractiveness of the above evaluations, evidence is growing that they do not reliably indicate how useful explanations are in practice @xcite . @xcite call for application-grounded evaluations to directly assess whether explanations help people complete an actual task, as suggested by work in hci @xcite . we heed that call by complementing a proxy evaluation with two application-grounded user studies. explaining translation differences detecting translation differences is a core task in multilingual nlp, e.g., to predict machine translation errors @xcite , to study how humans translate @xcite , or to understand how multilingual resources such as wikipedia differ across languages @xcite . automatic approaches often score the degree of (dis)similarity between an input and its translation to quantify machine translation quality @xcite @xcite or to detect meaning divergences in human translations @xcite @xcite . however, sentence-level scores can be hard to interpret and do not pinpoint how translations differ. this has been addressed by tagging text with human translation processes @xcite , with dedicated, supervised models or with word-level quality estimation (qe) tasks @xcite @xcite , often addressed by applying post-hoc explanation methods to sentence-level predictors @xcite . we augment this work by contributing unsupervised contrastive explanations of translation differences and testing whether they help annotate them more reliably. ## explaining divergences with contrastive phrasal highlights we introduce a highlighting approach to explain the predictions of a model that compares and contrasts two text inputs. we hypothesize that phrase pairs provide more appropriate cognitive chunks @xcite than tokens as basic units of explanations. for instance, instead of highlighting tokens that differ in the english-french pair of figure 2 , it is more natural to explain that the english text refers to the maple leaf forever as a national anthem as opposed to a chant patriotique (patriotic song) in french and that the english phrase "for many years" has no equivalent in french. building on token-level erasure-based explanation methods @xcite , we design a phrasealignment-guided erasure strategy to explain the predictions of a model @xcite that ranks bilingual sentence pairs based on the granularity of their semantic similarity (assuming s is an equivalent pair and ŝ a pair containing semantic divergences, the model r(•) ranks them such that r(s) > r( ŝ)). as shown in figure 2 , given two input texts, we first extract a set of candidate counterfactual inputs by masking a subset of phrase pairs ( §3.1). then, we explain the model's prediction by selecting the phrase pair whose erasure maximally increases the similarity score between the two inputs ( §3.2). ## proxy evaluation in this section, we describe our proxy evaluation based on human-provided highlights. we acknowledge that proxy evaluations encounter validity issues @xcite and use them primarily to guide system development and validate against standard highlighting methods. ## application-grounded evaluation ii: critical error detection in this section, we examine the potential of using contrastive phrasal highlights to assist bilingual humans in detecting critical errors in machine translation outputs. recent work on quality estimation for machine translation proposes an error-based evaluation framework where bilingual professional annotators are asked to: highlight translation errors; rate their severity as major or minor; and finally, indicate their type (e.g., mistranslation vs. terminology, etc.) @xcite . drawing on those intuitions, we aim to study whether a simplified evaluation framework that uses contrastive phrasal highlights yields reliable annotations of critical errors with bilingual crowd workers. this is a hard task as these errors are rare in high-quality systems and might be missed when parsing translations quickly. in what follows, we test the hypothesis: contrastive phrasal highlights help bilingual crowd-workers detect critical (accuracy) errors in machine translation outputs. ## conclusion we introduce an approach to extracting contrastive phrasal highlights that explain nlp models that take as input two texts. unlike existing techniques that highlight input tokens independently, we consider the input's structure and explicitly model the relationships between contrasting inputs. we study the effectiveness of contrastive phrasal highlights by explaining the predictions of a divergence ranker that compares and contrasts meaning differences in bilingual texts. our proxy evaluation confirms our approach outperforms standard explainability approaches, that highlight tokens, by matching human-provided rationales of divergences in english-french wikipedia texts. finally, through a series of human-centered evaluations, we explore the usefulness of contrastive phrasal highlights in application-grounded contexts for three language pairs. our results suggest that contrastive phrasal highlights assist bilingual speakers in detecting fine-grained meaning differences in (human) translated texts and critical errors due to local mistranslations in machine-translated texts. our findings create opportunities for designing better machine-in-the-loop pipelines to identify critical machine translation errors grounded in highstake settings, study translation data at scale, and facilitate the creation of multilingual content through crowd-based efforts.