Monitoring Fact Preservation, Grammatical Consistency and Ethical Behavior of Abstractive Summarization Neural Models (2021)

Abstract: The paper describes a system for automatic summarization in English language of online news data that come from different non-English languages. The system is designed to be used in production environment for media monitoring. Automatic summarization can be very helpful in this domain when applied as a helper tool for journalists so that they can review just the important information from the news channels. However, like every software solution, the automatic summarization needs performance monitoring and assured safe environment for the clients. In media monitoring environment the most problematic features to be addressed are: the copyright issues, the factual consistency, the style of the text and the ethical norms in journalism. Thus, the main contribution of our present work is that the above mentioned characteristics are successfully monitored in neural automatic summarization models and improved with the help of validation, fact-preserving and fact-checking procedures.

## introduction automatic summarization is the task of retelling long texts in a shorter abstract, emphasizing the most important information in an easy to read and grammatically correct way. there are two types of automatic summarization: extractive and abstractive. the key difference between the two are the methods they use to summarize text documents. while the extractive summarization is a scoring task that looks for the most important sentences within the input text, the abstractive summarization is a text generation task, relying on machinebased understanding of the content of the original text. the end-product of the abstractive summarization has an element of innovation -it often contains phrases and knowledge which are not part of the source document but can be inferred from it. this creativity element makes most abstractive summaries closer to human-made ones. thus, we consider abstractive summarization to be more appropriate for our main goal -producing a system for automatic summarization in english of textual data that come from different non-english languages, applicable in the production environment for media monitoring. additionally, it is mandatory in journalism to retell information complying with copyright rules, which is not possible to achieve with extractive summarization. on the other hand, recent research shows that the state-of-the-art (sota) abstractive summarization neural models have difficulties with the proper processing of lengthy texts. the problem is that the models' attention focuses mostly on the beginning of the text source, which means that the information appearing at the end of the text is either truncated (if the input text exceeds the allowed length) or/and is simply ignored @xcite . as a consequence, the generated summary itself does not capture all the relevant information. another problem of the sota abstractive summarization models, which is usually reported, is the literal copying of long sequences -sometimes even whole sentences -from the source text. this copying makes some of the generated abstracts similar to extractive summaries @xcite . last but not least, the abstractive summarization models are not easy to interpret @xcite @xcite , which interferes with the back-tracing of possible problems like the generation of inappropriate content or nonsense sequences. with all this in mind, the focus of our research is on the following challenges: 1) it seems that traditional attention mechanisms have difficulties summarizing long documents since they often miss some important information; 2) they are prone to introducing additional content @xcite and factual inconsistencies, known as hallucinations. the hallucinations can be of different nature -changing facts and attributing new facts that are not present in the original text. the changing of the facts is mainly expressed in: replacing dates and numbers with others, mixing the statements of certain entities with the statements of other entities; 3) another common observation is the transferring of knowledge from the training data to the source text. in general, the transferred knowledge may correspond to reality, but the problem is that it is not present in the input text. this raises the danger of reproducing existing biases in the dataset and the generation of toxic language, which questions the ethical behavior of abstractive summarization neural models. in this paper we experiment with different approaches to solving these problems of the abstract summarization, which hinder its actual application in business and practice, namely the factual inconsistency of the generated summaries and the hallucinations that the state-of-the-art transformers are prone to. we consider these problems fundamental, since omitting, altering and hallucinating facts could produce false, misleading and useless news summaries. in general, generating inappropriate text in production would be fatal for this type of models. progress in this direction would optimize and improve the media quality by redirecting the journalistic efforts to more creative editorial tasks, such as enriching the news that are being published. our approach consists of fine-tuning a stateof-the-art transformer model -section model, with the data described in section data and experiments with validation and fact-preserving. in addition, we propose an algorithm for checking the factual consistency or fact-checking of the generated summaries described in section monitoring factual, grammatical and ethical consistency. to our knowledge, the factual consistencies of the generated summaries have not been monitored in similar manner before. conclusions are presented in section conclusions. ## related work needless to say, the state-of-the-art models for abstractive summarization seem to be very promising. however, addressing the ethical issues connected with it has been a bit lagging behind. as @xcite emphasizes, one of the key challenges for the artificial intelligence is the fact that the models could reproduce already existing biases. this is a valid concern, as up to 3% of the web content is considered to contain toxicity @xcite . this is important because the language models -such as the model bart that we use -are pretrained on large text corpora extracted exactly from the web. the training task that the model learns through is that of prediction, where the model needs to predict the next token (or word) in a sequence. if during that training the model is presented with data containing toxic language, naturally, it will learn to generate the same language later on. a non-conservative assessment of part of the dataset used for the training of gpt-2, for example, shows that at least 50 000 sentences contain toxic language @xcite . a natural question that arises is how to detect and reduce the generation of such language. @xcite suggests that the general methods can be divided into either data-based or decoding-based. the data-based strategies are considered more expensive in resources since they include a collection of specific non-toxic data, additional training and changes in the model parameters. a considerable liability in this regard is that by decreasing the generation of toxic language, the utility of the language models used by marginalized groups is also decreased @xcite . the unwanted side effect is that the minority dialects themselves are misidentified as toxic. the decoding-based strategies, on the other hand, are concerned with detecting and modifying the generated output of the model, which makes them less expensive and experiment-ready. among the most widely used ones in this regard is the so-called blocklisting, which consists of banning undesirable words (i.e., abusive/offensive language). in addition to this kind of strategies, google and jigsaw have a joint project (called perspective 1 ), which uses machine learning to automatically detect toxic language. when deploying such a model, there is a kind of an assumption that it would be used in more or less benign environment. unfortunately, the research literature has shown that even the models, specifically designed to detect undesirable language, are extremely vulnerable to adversarial attacks, which can easily change the algorithm output by slight changes in the input, often even unnoticeable for humans. @xcite have convincingly demonstrated that even google's perspective system can be easily deceived by simply misspelling the abusive words and/or by adding punctuation signs among the letters. this further undermines the production readiness and usability of those solutions and calls for further research and additional countermeasures. among the main issues in our context are exactly the opacity and unpredictability of the developed systems. in fact, neither the developer nor the user knows with a high degree of certainty how the system would react to a given set of inputs. thus, it would be unreasonable to think that the stateof-the-art summarization models would not suffer from similar biases as the ones pointed above. besides all these, the transformers have some additional important weaknesses: their attention is focused mostly on the beginning and the end of the source text @xcite ; the models often copy lengthy sequences from the original text, making the abstract summaries more like extractive ones @xcite and they are hardly susceptible to human interpretation @xcite @xcite . the bigger problems, however, are the following: generalization of the source text information without respecting the facts, and the production of new facts @xcite . the newly generated facts -called hallucinations -are mainly manifested through changing and adding facts in the text (i.e. changing dates and numbers, mixing statements and corresponding entities), and introducing facts from the training data to the summaries. the search for a solution to these problems led to the emergence of the hybrid approaches, which enrich the encoder-decoder models with structural representations of the documents. this has been realized in several different ways. structsum @xcite , for example, adds attention layers for both latent and explicit structure attention to a standard encoder-decoder model. the assumption is that by training those layers in parallel with the encoder-decoder model, the model is required to include in its representation structural information as well. another similar hybrid approach -asgard @xcite -improves the information selection from the source text by replacing the attention mechanism of the encoder-decoder model with a graph-based attention mechanism. the result is the same, the model is introduced with a stream of structural information which needs to be considered when encoding a text document. ## data our data contain 304 570 news articles written in several languages, including english, german, spanish, french and italian, and their summaries in english. we implemented the data-based strategy described in @xcite to ensure politically balanced, ethically and factually correct news, coming from left-wing, right-wing and centrist media sources. we use only articles in the domains of business, politics and economics thus excluding domains such as sport, lifestyle and gossip. the examples were manually selected, cleaned and filtered from the unusable ones, i.e. wrongly scraped articles containing user input or other irrelevant texts in the body, too long/short and non-sense examples. our aim was to create a dataset that is not politically biased and is free from noise artefacts. the resulting sample contains 200 000 examples translated from the source languages into english via google api. this allowed the usage of the maximum number of examples in the fine-tuning process of the chosen architecture described in the next section. consequently, bart was fine-tuned on the abstractive summarization task with the cnn/daily mail dataset presented in @xcite . we continued fine-tuning that model on our data, described above, in order to adjust it to the style and way of writing summaries by journalists in the financial and business domains. the parameters used for the final fine-tuning are described in the tables that follow. ## monitoring factual, grammatical and ethical consistency as pointed out above, a common problem with the abstractive summarization models, reported by @xcite , is the factual inconsistency between some of the summaries and their corresponding input texts. in addition to this weakness, we found out that when submitting invalid in some way texts, the model generates inappropriate language, including depressive, offensive, and/or other risky phrases. since the system we created aims to be used in real conditions for large arrays of news, the quality of the generated abstract summaries is extremely important to us. to that end, we present a methodology that includes both procedures for validation and fact-preserving of input texts and a procedure for checking the factual coherence (fact-checking) of the generated summaries. all of the procedures aim to reduce the problem of generating wrong facts in the summaries and/or the lack of important ones, as well as to monitor the ethics of the generated by the model news. ## conclusions with the described procedures for validation, fact preserving and fact-checking we aim to improve the deployment process of existing architectures for abstractive summarization. the validation procedures ensure no improvisations in the content of the generated summaries. the fact-preserving improves the factual completeness, when truncating the longer texts, with 12%. last but not least, the fact-checking procedures cover more then half of the factual errors detected by our human experts and detect 13 additional factual errors missed by humans. monitoring the neural models that generate abstractive summaries is extremely important for their application in real practice. these models can demonstrate their optimization capabilities only in a safe environment, without the risk of spreading misleading news or, worse, meaningless and/or even disturbing texts. ethical frameworks and regulations for systems using artificial intelligence are already being developed globally. an example is the proposed by the european commission regulation of the european parliament and the council -artificial intelligence act foot_8 . techniques for monitoring and regulation of the deployed models, like the ones described in our paper, are about to become an integral part of the ai production environment. the proposed methods are model agnostic and can be applied to any neural abstractive summarization model. high data quality in the pretraining phase of the transformers is also essential for their performance in order to ensure that their fine-tuned inheritants and the deployed afterward systems perform safely and as intended, and that they do not become a source of discrimination or misinformation. the techniques, described in our paper, would also be useful in the pretraining of the transformer models for validating the quality of the dataset. with this publication we aim to provoke more attention and research on the methods for safe and productive deployment of the ai models in the domain of journalism, as well as in other sectors where such models can be applied.