SlowGuess/NAACL_2021_OCR huggingface dataset:
Zi-Yi Dou, Pengfei Liu, Hiroaki Hayashi, Zhengbao Jiang, Graham Neubig
{zdou, pliu3, hiroakih, zhengbaij, gneubig}@cs.cmu.edu
Neural abstractive summarization models are flexible and can produce coherent summaries, but they are sometimes unfaithful and can be difficult to control. While previous studies attempt to provide different types of guidance to control the output and increase faithfulness, it is not clear how these strategies compare and contrast to each other. In this paper, we propose a general and extensible guided summarization framework (GSum) that can effectively take different kinds of external guidance as input, and we perform experiments across several different varieties. Experiments demonstrate that this model is effective, achieving state-of-the-art performance according to ROUGE on 4 popular summarization datasets when using highlighted sentences as guidance. In addition, we show that our guided model can generate more faithful summaries and demonstrate how different types of guidance generate qualitatively different summaries, lending a degree of controllability to the learned models.
Modern techniques for text summarization generally can be categorized as either extractive methods (Nallapati et al., 2017; Narayan et al., 2018b; Zhou et al., 2018), which identify the most suitable words or sentences from the input document and concatenate them to form a summary, or abstractive methods (Rush et al., 2015; Chopra et al., 2016; Nallapati et al., 2016; Paulus et al., 2018), which generate summaries freely and are able to produce novel words and sentences. Compared with extractive algorithms, abstractive algorithms are more flexible, making them more likely to produce fluent and coherent summaries. However, the unconstrained nature of abstractive summarization can also result in problems. First, it can result
Figure 1: Our framework generates summaries using both the source document and separate guidance signals. We use an oracle to select guidance during training and use automatically extracted or user-specified guidance at test time.
in unfaithful summaries (Krysciński et al., 2019), containing factual errors as well as hallucinated content. Second, it can be difficult to control the content of summaries; it is hard to pick in advance which aspects of the original content an abstractive system may touch upon. To address the issues, we propose methods for guided neural abstractive summarization: methods that provide various types of guidance signals that 1) constrain the summary so that the output content will deviate less from the source document; 2) allow for controllability through provision of user-specified inputs.
There have been some previous methods for guiding neural abstractive summarization models. For example, Kikuchi et al. (2016) specify the length of abstractive summaries, Li et al. (2018) provide models with keywords to prevent the model from missing key information, and Cao et al. (2018) propose models that retrieve and reference relevant summaries from the training set. While these methods have demonstrated improvements in summarization quality and controllability, each focuses on one particular type of guidance - it remains unclear which is better and whether they are complementary to each other.
In this paper, we propose a general and extensible guided summarization framework that can take different kinds of external guidance as in
$^{1}$ Code is available at https://github.com/neulab/guided_summarization.
Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4830-4842 June 6-11, 2021. ©2021 Association for Computational Linguistics
Work	Guidance Form
Tokens	Triples	Sentences	Summaries
Kikuchi et al. (2016)	✓ (length tokens)	✗	✗	✗
Cao et al. (2018)	✗	✗	✗	✓ (retrieved sums.)
Li et al. (2018)	✓ (keywords)	✗	✗	✗
Liu et al. (2018a)	✗	✗	✓ (highlighted sents.)	✗
Liu et al. (2018b)	✓ (length tokens)	✗	✗	✗
Fan et al. (2018)	✓ (length, entity, style tokens)	✗	✗	✗
Zhu et al. (2020)	✗	✓ (relations)	✗	✗
Jin et al. (2020)	✗	✓ (relations)	✗	✗
Saito et al. (2020)	✓ (keywords)	✗	✓ (highlighted sents.)	✗
Ours	✓ (keywords)	✓ (relations)	✓ (highlighted sents.)	✓ (retrieved sums.)
Table 1: A comparison of different guided neural abstractive summarization models. Previous works have tried to provide guidance in different forms, including tokens, triples, sentences and summaries. Our proposed framework can incorporate them together and we have experimented with all four forms.
put. Like most recent summarization models, our model is based on neural encoder-decoders, instantiated with contextualized pretrained language models, including BERT (Devlin et al., 2019) and BART (Lewis et al., 2020). With this as a strong starting point, we make modifications allowing the model to attend to both the source documents and the guidance signals when generating outputs. As shown in Figure 1, we can provide automatically extracted or user-specified guidance to the model during test time to constrain the model output. At training time, to encourage the model to pay close attention to the guidance, we propose to use an oracle to select informative guidance signals – a simple modification that nonetheless proved essential in effective learning of our guided summarization models. Using this framework, we investigate four types of guidance signals: (1) highlighted sentences in the source document, (2) keywords, (3) salient relational triples in the form of (subject, relation, object), and (4) retrieved summaries.
We evaluate our methods on 6 popular summarization benchmarks. Our best model, using highlighted sentences as guidance, can achieve state-of-the-art performance on 4 out of the 6 datasets, including  $1.28 / 0.79 / 1.13$  ROUGE-1/2/L improvements over previous state-of-the-art model on the widely-used CNN/DM dataset. In addition, we perform in-depth analyses of different guidance signals and demonstrate that they are complementary to each other in that there is potential to aggregate their outputs together and obtain further improvements. An analysis of the results also reveals that our guided models can generate more faithful summaries and more novel words. Finally, we demonstrate that we can control the output by
providing user-specified guidance signals, with different provided signals resulting in qualitatively different summaries.
Neural abstractive summarization typically takes a source document  $\mathbf{x}$  consisting of multiple sentences  $x_{1},\dots ,x_{|\mathbf{x}|}$ , runs them through an encoder to generate representations, and passes them to a decoder that outputs the summary  $\mathbf{y}$  one target word at a time. Model parameters  $\theta$  are trained to maximize the conditional likelihood of the outputs in a parallel training corpus  $\langle \mathcal{X},\mathcal{Y}\rangle$ :
$$
\arg \max  _ {\theta} \sum_ {\left\langle \mathbf {x} ^ {i}, \mathbf {y} ^ {i} \right\rangle \in \left\langle \mathcal {X}, \mathcal {Y} \right\rangle} \log p (\mathbf {y} ^ {i} \mid \mathbf {x} ^ {i}; \theta).
$$
Several techniques have been proposed to improve the model architecture. For example, models of copying (Gu et al., 2016; See et al., 2017; Gehrmann et al., 2018) allow words to be copied directly from the input to the output, and models of coverage discourage the model from generating repetitive words (See et al., 2017).
Guidance can be defined as some variety of signal  $\mathbf{g}$  that is fed into the model in addition to the source document  $\mathbf{x}$ :
$$
\arg \max _ {\theta} \sum_ {\langle \mathbf {x} ^ {i}, \mathbf {y} ^ {i}, \mathbf {g} ^ {i} \rangle \in \langle \mathcal {X}, \mathcal {Y}, \mathcal {G} \rangle} \log p (\mathbf {y} ^ {i} \mid \mathbf {x} ^ {i}, \mathbf {g} ^ {i}; \theta).
$$
Within this overall framework, the types of information that go into  $\mathbf{g}$  and the method for incorporating this information into the model may vary. While there are early attempts at non-neural guided models (Owczarzak and Dang, 2010; Genest and Lapalme, 2012), here we focus on neural approaches
Figure 2: General framework of our model. The two encoders encode the source document and guidance signal, which are attended to by the decoder.
and summarize recent work in Table 1. For example, Li et al. (2018) first generate a set of keywords, which are then incorporated into the generation process by an attention mechanism. Cao et al. (2018) propose to search the training corpus and retrieve datapoint  $\langle \mathbf{x}^j,\mathbf{y}^j\rangle$  whose input document  $\mathbf{x}^j$  is most relevant to the current input  $\mathbf{x}$ , and treat  $\mathbf{y}^j$  as a candidate template to guide the summarization process. Besides, Jin et al. (2020) and Zhu et al. (2020) extract relational triples in the form of (subject, relation, object) from source documents and represent them by graph neural networks. The decoders then attend to the extracted relations to generate faithful summaries. A concurrent work by Saito et al. (2020) propose to extract keywords or highlighted sentences using saliency models and feed them to summarization models.
There are also works on controlling the summary length (Kikuchi et al., 2016; Liu et al., 2018b) and styles (Fan et al., 2018) by explicitly feeding the desired features to the model. In addition, Liu et al. (2018a) and Chen and Bansal (2018) follow a two-stage paradigm, in which a subset of the source document  $\{x_{i_1},\dots ,x_{i_n}\}$  will first be selected by a pretrained extractor as highlighted sentences and then be fed into the model encoder in the second stage with the rest of the text discarded.
Figure 2 illustrates the general framework of our proposed method. We feed both the source docu
ments and various types of guidance signals to the model. Specifically, we experiment with guidance signals including highlighted sentences, keywords, relations, and retrieved summaries, although the framework is general and could be expanded to other varieties of guidance as well.
We adopt the Transformer model (Vaswani et al., 2017) as our backbone architecture, instantiated with BERT or BART, which can be separated into the encoder and decoder components.
3.1.1 Encoder
Our model has two encoders, encoding the input source document and guidance signals respectively.
Similar to the Transformer model, each of our encoders is composed of  $N_{enc} + 1$  layers, with each encoding layer containing both a self-attention block and a feed-forward block:
$$
\begin{array}{l} \mathbf {x} = \mathrm {L N} (\mathbf {x} + \operatorname {S E L F A T T N} (\mathbf {x})), \\ \mathbf {x} = \mathrm {L N} (\mathbf {x} + \mathrm {F E E D F O R W A R D} (\mathbf {x})), \\ \end{array}
$$
where LN denotes layer normalization. Note the source document and guidance signal do not interact with each other during encoding.
We share the parameters of the bottom  $N_{enc}$  layers and the word embedding layers between the two encoders, because 1) this can reduce the computation and memory requirements; 2) we conjecture that the differences between source documents and guidance signals should be high-level, which are captured at top layers of the encoders.
3.1.2 Decoder
Different from the standard Transformer, our decoder has to attend to both the source document and guidance signal instead of just one input.
Concretely, our decoder is composed of  $N_{dec}$  identical layers, with each layer containing four blocks. After the self-attention block, the decoder will first attend to the guidance signals and generate the corresponding representations, and hence the guidance signal will inform the decoder which part of the source documents should be focused on. Then, the decoder will attend to the whole source document based on the guidance-aware representations. Finally, the output representation will be fed into the feed-forward block:
$$
\begin{array}{l} \mathbf {y} = \mathrm {L N} (\mathbf {y} + \operatorname {S E L F A T T N} (\mathbf {y})), \\ \mathbf {y} = \mathrm {L N} (\mathbf {y} + \operatorname {C R O S S A T T N} (\mathbf {y}, \mathbf {g})), \\ \mathbf {y} = \mathrm {L N} (\mathbf {y} + \text {C R O S S A T T N} (\mathbf {y}, \mathbf {x})), \\ \mathbf {y} = \mathrm {L N} (\mathbf {y} + \text {F E E D F O R W A R D} (\mathbf {y})). \\ \end{array}
$$
Ideally, the second cross-attention block allows the model to fill in the details of the input guidance signal, such as finding the name of an entity by searching through co-reference chains.
3.2 Choices of Guidance Signals
Before delving into the specifics of the types of guidance signal we used, we first note an important detail in training our model. At test time, there are two ways we can define the guidance signal: 1) manual definition where an interested user defines the guidance signal  $\mathbf{g}$  by hand, and 2) automatic prediction where an automated system is used to infer the guidance signal  $\mathbf{g}$  from input  $\mathbf{x}$ . We demonstrate results for both in experiments.
At training time, it is often prohibitively expensive to obtain manual guidance. Hence, we focus on two varieties of generating them: 1) automatic prediction using  $\mathbf{x}$  as detailed above, and 2) oracle extraction where we use both  $\mathbf{x}$  and  $\mathbf{y}$  to deduce a value  $\mathbf{g}$  that is most likely useful in generating  $\mathbf{y}$ .
Theoretically, automatic prediction has the advantage of matching the training and testing conditions of a system that will also receive automatic predictions at test time. However, as we will show in experiments, the use of oracle guidance has a large advantage of generating guidance signals that are highly informative, thus encouraging the model to pay more attention to them at test time.
With this in mind, we describe the four varieties of guidance signal we experiment with, along with their automatic and oracle extraction methods.
Highlighted Sentences. The success of extractive approaches have demonstrated that we can extract a subset of sentences  $\{x_{i_1},\dots ,x_{i_n}\}$  from the source document and concatenate them to form a summary. Inspired by this, we explicitly inform our model which subset of source sentences should be highlighted using extractive models.
We perform oracle extraction using a greedy search algorithm (Nallapati et al., 2017; Liu and Lapata, 2019) to find a set of sentences in the source document that have the highest ROUGE scores with the reference (detailed in Appendix) and treat these as our guidance g. At test time, we use pretrained extractive summarization models (BertExt (Liu and Lapata, 2019) or MatchSum (Zhong et al., 2020) in our experiments) to perform automatic prediction.
Keywords. If we select full sentences, they may contain unnecessary information that does not oc
cur in an actual summary, which could distract the model from focusing on the desired aspects of the input. Therefore, we also try to feed our model with a set of individual keywords  $\{w_{1},\ldots ,w_{n}\}$  from the source document.
For oracle extraction, we first use the greedy search algorithm mentioned above to select a subset of input sentences, then use TextRank (Mihalcea and Tarau, 2004) to extract keywords from these sentences. We also filter the keywords that are not in the target summary. The remaining keywords are then fed to our models. For automatic prediction, we use another neural model (BertAbs (Liu and Lapata, 2019) in the experiments) to predict the keywords in the target summary.
Relations. Relations are typically represented in the form of relational triples, with each triple containing a subject, a relation, and an object. For example, Barack Obama was born in Hawaii will create a triple (Barack Obama, was born in, Hawaii).
For oracle extraction, we first use Stanford OpenIE (Angeli et al., 2015) to extract relational triples from the source document. Similar to how we select highlighted sentences, we then greedily select a set of relations that have the highest ROUGE score with the reference, which are then flattened and treated as guidance. For automatic prediction, we use another neural model (similarly, BertAbs) to predict the relation triples on the target side.
Retrieved Summaries. Intuitively, gold summaries of similar documents with the input can provide a reference point to guide the summarization. Therefore, we also try to retrieve relevant summaries from the training data  $\langle \mathcal{X},\mathcal{Y}\rangle$
For oracle extraction, we directly retrieve five datapoints  $\{\langle \mathbf{x}_1,\mathbf{y}_1\rangle ,\ldots ,\langle \mathbf{x}_5,\mathbf{y}_5\rangle \}$  from training data whose summaries  $\mathbf{y}_i$  are most similar to the target summary  $\mathbf{y}$  using Elastic Search. For automatic prediction at test time, we retrieve five datapoints whose source documents  $\mathbf{x}_i$  are most similar to each input source document  $\mathbf{x}$  instead.
We experiment on 6 datasets (statistics in Table 2):
Reddit (Kim et al., 2019) is a highly abstractive dataset and we use its TIFU-long version.
2https://github.com/elastic/ elasticsearch
Dataset	Source	#Pairs	#Tokens	#Ext
Train	Valid	Test	Doc.	Sum.
Reddit	Social Media	41,675	645	645	482.2	28.0	2
XSum	News	203,028	11,273	11,332	430.2	23.3	2
CNN/DM	News	287,084	13,367	11,489	766.1	58.2	3
WikiHow	Knowledge Base	168,126	6,000	6,000	580.8	62.6	4
NYT	News	44,382	5,523	6,495	1183.2	110.8	4
PubMed	Scientific Paper	83,233	4,946	5,025	444.0	209.5	6
XSum (Narayan et al., 2018a) is an abstractive dataset that contains one-sentence summaries of online articles from BBC.
CNN/DM (Hermann et al., 2015; Nallapati et al., 2016) is a widely-used summarization dataset consisting of news articles and associated highlights as summaries. We use its non-anonymized version.
WikiHow (Koupaee and Wang, 2018) is extracted from an online knowledge base and requires high level of abstraction.
New York Times (NYT) (Sandhaus, 2008) is a dataset that consists of news articles and their associated summaries. We follow Kedzie et al. (2018) to preprocess and split the dataset.
PubMed (Cohan et al., 2018) is relatively extractive and is collected from scientific papers.
Our baselines include the following models:
BertExt (Liu and Lapata, 2019) is an extractive model whose parameters are initialized with BERT (Devlin et al., 2019).
BertAbs (Liu and Lapata, 2019) is an abstractive model with encoder initialized with BERT and trained with a different optimizer than its decoder.
MatchSum (Zhong et al., 2020) is an extractive model that reranks the candidate summaries produced by BertExt and achieves state-of-the-art extractive results on various summarization datasets.
BART (Lewis et al., 2020) is an state-of-the-art abstractive summarization model pretrained with a denoising autoencoding objective.
We build our models based on both BertAbs and BART, and follow their hyperparameter settings to train our summarizers. For our model built on BertAbs, there are 13 encoding layers, with the top layer randomly initialized and separately trained
Table 2: Statistics of the datasets. #Ext denotes the number of sentences we extract for extractive summarization.
Model	Guide	R-1	R-2	R-L
BertExt* (Base)	-	43.25	20.24	39.63
BertAbs*	-	41.72	19.39	38.76
BertAbs (Ours)	-	41.58	18.99	38.56
Ours
BertAbs + Sentence	Auto.	43.78	20.66	40.66
Oracle	55.18	32.54	52.06
BertAbs + Keyword	Auto.	42.21	19.36	39.23
Oracle	45.08	22.22	42.07
BertAbs + Relation	Auto.	41.40	18.66	38.40
Oracle	45.96	23.09	42.92
BertAbs + Retrieve	Auto.	40.88	18.24	37.99
Oracle	43.69	20.53	40.71
Table 3: Results (ROUGE; Lin (2004)) on CNN/DM. "Auto" and "oracle" denote using automatically predicted and oracle-extracted guidance at test time respectively. Results with * are from Liu and Lapata (2019).
between the two encoders. For our model built on BART, there are 24 encoding layers, with the top layer initialized with pretrained parameters yet separately trained between the two encoders. The first cross-attention block of the decoder is randomly initialized whereas the second cross-attention block is initialized with pretrained parameters. BertAbs is used to predict guidance signals of relations and keywords during test time. Unless otherwise stated, we use oracle extractions at training time.
We first compare different kinds of guidance signals on the CNN/DM dataset using BertAbs, then evaluate the best guidance on the other five datasets using both BertAbs and BART.
Performance of Different Guidance Signals. As shown in Table 3, if we feed the model with automatically constructed signals, feeding either highlighted sentences or keywords can outperform the abstractive summarization baseline by a large margin. Especially, feeding highlighted sentences can outperform the best baseline by more than 1
$^{3}$ https://catalog.ldc.upenn.edu/LDC2008T19
Model	R-1	R-2	R-L
Oracle	55.76	33.22	51.83
Extractive
BertExt (Base)*	43.25	20.24	39.63
BertExt (Large)*	43.85	20.34	39.90
MatchSum†	44.41	20.86	40.55
Abstractive
BertAbs*	41.72	19.39	38.76
BertAbs (Ours)	41.58	18.99	38.56
BertExtAbs*	42.13	19.60	39.18
BART‡	44.16	21.28	40.90
BART (Ours)	44.66	21.53	41.35
Ours
BertAbs + BertExt	43.78	20.66	40.66
BART + MatchSum	45.94	22.32	42.48
Table 4: Comparisons with state-of-the-art models on CNN/DM. The highest numbers are in bold. Marked results are from Liu and Lapata (2019)*, Zhong et al. (2020)†, Lewis et al. (2020)‡.
ROUGE-L point. Using relations or retrieved summaries as guidance will not improve the baseline performance, likely because it is hard to predict these signals during test time.
If we use an oracle to select the guidance signals, all varieties of guidance can improve the baseline performance significantly, with the best-performing model achieving a ROUGE-1 score of 55.18. The results indicate that 1) the model performance has the potential to be further improved given a better guidance prediction model; 2) the model does learn to depend on the guidance signals.
Comparisons with State of the Art. We then try to build our model on the state-of-the-art model, using highlighted sentences as guidance as it achieves the best performance on CNN/DM. First, we build our model on BART and train it with oracle-extracted highlighted sentences as guidance. Then, we use MatchSum to predict the guidance at test time. From Table 4, we can see that our model can achieve over 1 ROUGE-1/L point improvements compared with the state-of-the-art models, indicating the effectiveness of the proposed methods.
Performance on Other Datasets. We report the performance of the highlighted sentence model on all the other five datasets in Table 5. Generally, the model works better when the dataset is more extractive. For abstractive datasets such as Reddit and XSum, our model cannot achieve performance increases when the abstractive summarization base
Figure 3: Our model can generate more novel words and achieve higher recall of novel words in the gold reference compared with baseline.
line is already rather strong. For extractive datasets such as PubMed and NYT, on the other hand, our model can achieve some improvements over the baselines even though the abstractive baseline outperforms the extractive oracle model in some cases.
We perform extensive analyses on CNN/DM to gain insights into our (BERT-based) models. Unless otherwise stated, we use oracle extractions at training time and automatic prediction at test time.
Novel  $n$ -grams. While we sometimes provide information extracted from the source document as guidance signals, it is unclear whether the model will over-fit to and regurgitate this guidance, or still generate novel expressions. To measure this, we count the number of novel  $n$ -grams in the output summaries, namely  $n$ -grams that do not appear in the source document. As shown in Figure 3, all of our guided models in fact generate more novel  $n$ -grams than the baseline, likely because at training time the model is trained to compress and paraphrase the extracted information from the source document into the gold summary. In addition, our models cover more novel  $n$ -grams that are in the gold reference than baseline. The results indicate that our guided models can indeed generate novel expressions, and are not referencing the input guidance too strongly.