Improving the Robustness of Summarization Models by Detecting and Removing Input Noise (2023)

Abstract: The evaluation of abstractive summarization models typically uses test data that is identically distributed as training data. In real-world practice, documents to be summarized may contain input noise caused by text extraction artifacts or data pipeline bugs. The robustness of model performance under distribution shift caused by such noise is relatively under studied. We present a large empirical study quantifying the sometimes severe loss in performance – up to 12 ROUGE-1 points – from different types of input noise for a range of datasets and model sizes. We then propose a light-weight method for detecting and removing such noise in the input during model inference without requiring any extra training, auxiliary models, or even prior knowledge of the type of noise. Our proposed approach effectively mitigates the loss in performance, recovering a large fraction of the performance drop, sometimes as large as 11 ROUGE-1 points.

## introduction despite rapid progress in abstractive summarization in recent years @xcite @xcite , virtually all works have tested models using test data which is identically distributed as the training data, and little attention has gone into studying their robustness to input distribution shift caused by input noise. data from different domains which have been addressed in summarization research, may contain noise of different types. for example, when summarizing a news article on a web page, there can be embedded elements such as ads or tweets which may be included as part of the article due to erroneous text extraction. a system summarizing chatroom conversations might encounter artifacts such as urls, or sometimes even code shared between participants. if the text to be summarized is acquired by scanning a document, noise can be introduced in the form of ocr errors @xcite . however, the impact of different kinds of noise on modern abstractive summarization systems, and ways to accurately detect and remove that noise, remain largely unknown. in this work, we study how noise in the input affects the output generated by summarization models, and propose a method to detect and remove it. we synthetically inject 4 types of noise to 4 abstractive summarization datasets with diverse styles @xcite @xcite , and quantify the drop in aggregate metrics for the output summaries (section 3). we also study how the quality of generated summaries varies with factors such as the amount of noise and size of the models. for our experiments, we use pegasus @xcite ) models -transformer-based pre-trained models which deliver competitive performance across abstractive summarization benchmarks. we present a method to detect and remove noisy spans in the input, which works without prior knowledge of the noise type or access to its samples, yet can recover a large fraction of the drop in output quality resulting from noise addition (section 4). our approach for detecting noisy spans is based on variations of the relative mahalanobis distance ood score proposed by @xcite , which uses the embeddings computed by the summarization model's encoder. our approach does not require any additional training or use of external models, hence it is relatively efficient. figure 1 shows our method's impact on a sample noisy document. finally, we investigate how different parts of the model architecture cause the drop in output quality upon adding noise to the input (section 5). we attribute the performance drop to two phenomena: (i) corruption of the representations of non-noisy input tokens computed by the encoder due to contextualization with neighboring noise; and (ii) distraction of the decoder such that it assigns non-zero attention to the representations of noisy input tokens. we perform an ablation where we remove the encoder embeddings of the noisy tokens before running the decoder, hence eliminating the effect of decoder distraction. we find that in a majority of cases this leads to partial recovery in output quality suggesting that generally both factors are responsible to some extent for the poor output summaries. we make the following contributions: ## related work research on the behavior of summarization models on noisy inputs is quite sparse. jing et al. (2003) investigated how extractive summarization models are impacted by ocr errors in scanned documents. more recently, meechan-maddon (2019) studied the effect of noise from asr errors on cnn based summarization models. in contrast, we experiment with pre-trained transformer models which are now preferred in popular use due to their superior performance (lewis et al., 2020; zhang et al., 2020; raffel et al., 2020b), and address a wide variety of noise types and summarization datasets. contemporary to our work, chen et al. (2023) have studied the impact of misspellings in input to summarization models, whereas our work instead focuses on additive input noise and its explicit removal. the effect of noisy inputs has also been studied for nlp tasks other than summarization, such as machine translation @xcite and question answering @xcite . multiple works across machine translation @xcite , question answering @xcite and summarization @xcite have used synthetic noise to create noisy inputs. similar to these works, we also create synthetic noisy inputs due to lack of a dataset with naturally occurring labeled noise. one distinguishing aspect of our work is that our noise detection/removal method works without exposing the model to the noise during training, which is closer to practical scenarios where unknown types of noise can be encountered after a model is deployed. ## impact of noise addition we inject noisy text spans in between sentences of the clean articles. the insert position of each noisy text span is sampled independently and uniformly at random (see figure 7 in appendix for an exam-ple). overall, we consider the following choices of a noisy text span: we experiment with different amounts of noise added to the input which is treated as a hyperparameter. we measure the amount of noise in terms of the number of noisy tokens added to the input divided by the total number of tokens in the input after noise addition. we experiment with 4 different datasets -xsum @xcite , cnn/dailymail @xcite , samsum @xcite and reddittifulong @xcite . our datasets span a variety of domains, where the first two datasets deal with summarizing news articles, and the remaining two consider summarizing conversations and social media posts respectively. for all experiments with each summarization dataset, we use pega-sus models @xcite finetuned on that dataset. we evaluate the performance of models using rouge scores @xcite of the corresponding summaries generated by the them. ## investigating causes of loss in performance there are two distinct mechanisms which can lead to worsening of generated summaries upon addition of input noise. the first is the corruption of the encoder's representation of useful clean tokens. the encoder transformer uses self-attention over input tokens to generate their contextualized representations. in cases where noise is present in the input, self-attention can distort the encoder representations of clean tokens. the second mechanism is the distraction of the decoder such that it assigns non-zero attention to the noisy tokens' embeddings and this impairs its computation. even if there is no corruption in the embeddings of clean tokens, the embeddings of noisy tokens can receive non-zero cross-attention from the decoder and influence its generation. if neither of these two phenomenon occur, the generated summary on the noisy and clean variants of any input would be the same. in this section we investigate the contribution of these two factors in the degradation of output quality. ## conclusion and future work in this work, we quantified the impact that noisy inputs can have on the output quality of summarization models, for a variety of datasets and noise types. we then proposed a method to detect and remove noise from the input without using any extra models, training, or prior information about noise types, and demostrated its efficacy. one direction for future work is to investigate what makes certain models more susceptible to specific noise types. another interesting direction would be to carry out experiments for noise filtering with realworld noisy data rather than using synthetically generated noisy examples.