Contrastive Distant Supervision for Debiased and Denoised Machine Reading Comprehension (2023)

Abstract: Distant Supervision (DS) is a promising learning approach for MRC by leveraging easily-obtained question-answer pairs. Unfortunately, the heuristically annotated dataset will inevitably lead to mislabeled instances, resulting in answer bias and context noise problems. To learn debiased and denoised MRC models, this paper proposes the Contrastive Distant Supervision algorithm – CDS, which can learn to distinguish confusing and noisy instances via confidence-aware contrastive learning. Specifically, to eliminate answer bias, CDS samples counterfactual negative instances, which ensures that MRC models must take both answer information and question-context interaction into consideration. To denoise distantly annotated contexts, CDS samples confusing negative instances to increase the margin between correct and mislabeled instances. We further propose a confidence-aware contrastive loss to model and leverage the uncertainty of all DS instances during learning. Experimental results show that CDS is effective and can even outperform supervised MRC models without manual annotations.

## introduction machine reading comprehension (mrc) is a fundamental nlp task, which aims to answer questions based on given documents @xcite @xcite . traditional mrc models are usually learned using manually-@xmath0, answer @xmath1, which are labor-intensive and time-consuming. to learn mrc models under low-resource settings, distant supervision (ds) is a promising approach that leverages the @xmath2, @xmath3. specifically, given @xmath4, @xmath5, a ds-mrc system retrieves relevant passages, matches answers with these passages, and uses all matched answer spans to train mrc models @xcite . unfortunately, such a heuristically annotation process will inevitably result in numerous mislabeled instances @xcite . as shown in figure 1 (a), by simply matching the answer "2022" with retrieved passages, p2 and p3 are mislabeled instances because they do not express the release-year relation of "iphone 14" in the question. these mislabeled instances make learning effective ds-mrc models a non-trivial task due to the answer bias and context noise problems: • answer bias problem. by heuristically annotating all answer spans as correct labels, ds-mrc models tend to make decisions using only answer information, while ignoring the question-context interactions @xcite . for example, in figure 1 (a), the model may learn to answer "when" questions depending on the when-date shortcut and ignore all other information such as the interaction between "come out" in the question and "released" in the context. these spurious correlations cannot generalize well to real-world situations. to learn debiased and denoised mrc models, this paper proposes the contrastive distant supervision algorithm -cds, which can learn to distinguish confusing and noisy instances via confidenceaware contrastive learning. the contrastive learning framework of cds is shown in figure 1(b) . to eliminate answer bias, cds samples counterfactual negative instances and lets ds-mrc models learn to distinguish them from positive instances. concretely, a counterfactual negative instance is an instance with a correct answer but a wrong counterfactual context. for example, in figure 1(a), "apple announced iphone se in 2022." is a counterfactual instance because its context does not express the release-year relation of "iphone 14" in the question. by learning to distinguish positive and counterfactual instances, mrc models need to consider both answer information and questioncontext interaction, and therefore the answer bias can be addressed. to denoise distantly annotated contexts, cds samples confusing negative instances, and increases the margin between correct and mislabeled instances by pulling mislabeled positive instances closer to negative instances and pushing correct positive instances away. concretely, a confusing negative instance contains the wrong answer and a confusing context. for example, in figure 1(a) , f1 is a confusing instance because its context is similar to the mislabeled instances p2 but it does not contain the answer "2022". by learning to distinguish mislabeled instances, cds can effectively address the context noise problem. finally, because there are no golden labels during distant supervision, we propose a confidenceaware contrastive loss, which iteratively estimates the confidence of all instances during training, and optimizes ds-mrc models by taking the uncer-tainty of training instances into consideration. we conduct experiments on both close-domain and open-domain mrc benchmarks. experimental results verify the effectiveness of cds: on closedomain mrc, cds significantly outperforms previous ds-mrc methods and achieves competitive performances with supervised mrc methods. on open-domain mrc settings, cds even outperforms supervised mrc models by a large margin. the main contributions of this paper are: contrastive learning is a promising technique that learns informative representations by contrasting positive sample pairs against negative pairs @xcite . some studies have leveraged contrastive learning on weak labels: hong and yang (2021) contrastively debiases noisy labels by regularizing feature space. @xcite learns better-aligned representations of partial labels via contrastive learning. @xcite proposes an answer-aware contrastive learning approach to address the translation noise in crosslanguage mrc. @xcite propose to exploit span-level contrastive learning for few-shot mrc. @xcite proposes to sample counterfactual instances and learn inter-modality relationships by contrastive learning for visual commonsense reasoning. contrastive learning is also widely used for weakly supervised learning @xcite @xcite @xcite @xcite @xcite @xcite . in this paper, we leverage contrastive learning to address the bias and the noise problems in ds-mrc. ## background base mrc model. the mrc model used in this paper is vanilla distant supervision for mrc. given @xmath6, @xmath7, the ds-mrc method first retrieves k relevant passages from a corpus. following @xcite , this paper uses the wikipedia corpus and splits all texts into 100token chunks. then, we heuristically match the answer with retrieved passages, and all matching answer spans are used to @xmath8, passage, answer @xmath9. the passages that do not contain the answer are labeled as negative passages. finally, all ds instances are used to train mrc models as in @xcite . as shown above, the main drawback of vanilla distant supervision for mrc is that many ds instances are mislabeled, resulting in answer bias and context noise problems. in the next section, we describe how to resolve these problems via contrastive distant supervision. ## contrastive distant supervision for machine reading comprehension in this section, we present our contrastive distant supervision (cds) algorithm, which can learn to distinguish confusing and noisy instances via confidence-aware contrastive learning. specifically, cds samples counterfactual negative instances to eliminate answer bias, and samples confusing negative instances to denoise distantly annotated contexts. then, a confidence-aware contrastive loss is proposed to estimate and leverage the uncertainty of all instances during learning. in the following, we describe them in detail. ## conclusion this paper proposes contrastive distant supervision -cds, which can debias and denoise ds-mrc models by learning to distinguish confusing and noisy instances via confidence-aware contrastive learning. specifically, cds samples counterfactual negative instances to eliminate answer bias, and samples confusing negative instances to denoise noisy contexts. then, a confidenceaware contrastive loss is proposed to estimate and leverage the uncertainty of all ds instances during learning. experimental results verify the effectiveness of cds: on close-domain mrc, cds significantly outperforms previous ds-mrc methods and achieves competitive performances with supervised mrc methods. on open-domain mrc settings, cds even outperforms supervised mrc models by a large margin. furthermore, contrastive distant supervision is model-free and thus can effectively complement other mrc techniques. we will release all codes, models and datasets on github.