SlowGuess/ACL_2020_OCR huggingface dataset:
Danqing Wang*, Pengfei Liu*, Yining Zheng, Xipeng Qiu†, Xuanjing Huang  
Shanghai Key Laboratory of Intelligent Information Processing, Fudan University School of Computer Science, Fudan University 825 Zhangheng Road, Shanghai, China  
{dqwang18, pfliu14, ynzheng19, xpqiu, xjhuang}@fudan.edu.cn
As a crucial step in extractive document summarization, learning cross-sentence relations has been explored by a plethora of approaches. An intuitive way is to put them in the graph-based neural network, which has a more complex structure for capturing inter-sentence relationships. In this paper, we present a heterogeneous graph-based neural network for extractive summarization (HETERSUMGRAPH), which contains semantic nodes of different granularity levels apart from sentences. These additional nodes act as the intermediary between sentences and enrich the cross-sentence relations. Besides, our graph structure is flexible in natural extension from a single-document setting to multi-document via introducing document nodes. To our knowledge, we are the first one to introduce different types of nodes into graph-based neural networks for extractive document summarization and perform a comprehensive qualitative analysis to investigate their benefits. The code will be released on Github<sup>1</sup>.
Extractive document summarization aims to extract relevant sentences from the original documents and reorganize them as the summary. Recent years have seen a resounding success in the use of deep neural networks on this task (Cheng and Lapata, 2016; Narayan et al., 2018; Arumae and Liu, 2018; Zhong et al., 2019a; Liu and Lapata, 2019b). These existing models mainly follow the encoder-decoder framework in which each sentence will be encoded by neural components with different forms.
To effectively extract the summary-worthy sentences from a document, a core step is to model
the cross-sentence relations. Most current models capture cross-sentence relations with recurrent neural networks (RNNs) (Cheng and Lapata, 2016; Nallapati et al., 2017; Zhou et al., 2018). However, RNNs-based models are usually hard to capture sentence-level long-distance dependency, especially in the case of the long document or multi-documents. One more intuitive way is to model the relations of sentences using the graph structure. Nevertheless, it is challenging to find an effective graph structure for summarization. Efforts have been made in various ways. Early traditional work makes use of inter-sentence cosine similarity to build the connectivity graph like LexRank (Erkan and Radev, 2004) and TextRank (Mihalcea and Tarau, 2004). Recently, some works account for discourse inter-sentential relationships when building summarization graphs, such as the Approximate Discourse Graph (ADG) with sentence personalization features (Yasunaga et al., 2017) and Rhetorical Structure Theory (RST) graph (Xu et al., 2019). However, they usually rely on external tools and need to take account of the error propagation problem. A more straightforward way is to create a sentence-level fully-connected graph. To some extent, the Transformer encoder (Vaswani et al., 2017) used in recent work(Zhong et al., 2019a; Liu and Lapata, 2019b) can be classified into this type, which learns the pairwise interaction between sentences. Despite their success, how to construct an effective graph structure for summarization remains an open question.
In this paper, we propose a heterogeneous graph network for extractive summarization. Instead of solely building graphs on sentence-level nodes, we introduce more semantic units as additional nodes in the graph to enrich the relationships between sentences. These additional nodes act as the intermediary that connects sentences. Namely, each additional node can be viewed as a special rela
* These two authors contributed equally.  
† Corresponding author.  
<sup>1</sup>https://github.com/brxx122/iterSUMGraph
6209
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6209-6219 July 5 - 10, 2020. ©2020 Association for Computational Linguistics
tionship between sentences containing it. During the massage passing over the heterogeneous graph, these additional nodes will be iteratively updated as well as sentence nodes.
Although more advanced features can be used (e.g., entities or topics), for simplicity, we use words as the semantic units in this paper. Each sentence is connected to its contained words. There are no direct edges for all the sentence pairs and word pairs. The constructed heterogeneous word-sentence graph has the following advantages: (a) Different sentences can interact with each other in consideration of the explicit overlapping word information. (b) The word nodes can also aggregate information from sentences and get updated. Unlike ours, existing models usually keep the words unchanged as the embedding layer. (c) Different granularities of information can be fully used through multiple message passing processes. (d) Our heterogeneous graph network is expandable for more types of nodes. For example, we can introduce document nodes for multi-document summarization.
We highlight our contributions as follows:
(1) To our knowledge, we are the first one to construct a heterogeneous graph network for extractive document summarization to model the relations between sentences, which contains not only sentence nodes but also other semantic units. Although we just use word nodes in this paper, more superior semantic units (e.g. entities) can be incorporated.
(2) Our proposed framework is very flexible in extension that can be easily adapt from single-document to multi-document summarization tasks.
(3) Our model can outperform all existing competitors on three benchmark datasets without the pre-trained language models<sup>2</sup>. Ablation studies and qualitative analysis show the effectiveness of our models.
Extractive Document Summarization With the development of neural networks, great progress has been made in extractive document summarization. Most of them focus on the encoder-decoder framework and use recurrent neural networks (Cheng and Lapata, 2016; Nallapati et al., 2017; Zhou et al., 2018) or Transformer encoders
(Zhong et al., 2019b; Wang et al., 2019a) for the sentential encoding. Recently, pre-trained language models are also applied in summarization for contextual word representations (Zhong et al., 2019a; Liu and Lapata, 2019b; Xu et al., 2019; Zhong et al., 2020).
Another intuitive structure for extractive summarization is the graph, which can better utilize the statistical or linguistic information between sentences. Early works focus on document graphs constructed with the content similarity among sentences, like LexRank (Erkan and Radev, 2004) and TextRank (Mihalcea and Tarau, 2004). Some recent works aim to incorporate a relational priori into the encoder by graph neural networks (GNNs) (Yasunaga et al., 2017; Xu et al., 2019). Methodologically, these works only use one type of nodes, which formulate each document as a homogeneous graph.
Heterogeneous Graph for NLP Graph neural networks and their associated learning methods (i.e. message passing (Gilmer et al., 2017), self-attention (Velickovic et al., 2017)) are originally designed for the homogeneous graph where the whole graph shares the same type of nodes. However, the graph in the real-world application usually comes with multiple types of nodes (Shi et al., 2016), namely the heterogeneous graph. To model these structures, recent works have made preliminary exploration. Tu et al. (2019) introduced a heterogeneous graph neural network to encode documents, entities and candidates together for multi-hop reading comprehension. Linmei et al. (2019) focused on semi-supervised short text classification and constructed a topic-entity heterogeneous neural graph.
For summarization, Wei (2012) proposes a heterogeneous graph consisting of topic, word and sentence nodes and uses the markov chain model for the iterative update. Wang et al. (2019b) modify TextRank for their graph with keywords and sentences and thus put forward HeteroRank. Inspired by the success of the heterogeneous graph-based neural network on other NLP tasks, we introduce it to extractive text summarization to learn a better node representation.
Given a document  $D = \{s_1, \dots, s_n\}$  with  $n$  sentences, we can formulate extractive summarization as a sequence labeling task as (Narayan et al., 2018;
<sup>2</sup>Since our proposed model is orthogonal to the methods that using pre-trained models, we believe our model can be further boosted by taking the pre-trained models to initialize the node representations, which we reserve for the future.
Figure 1: Model Overview. The framework consists of three major modules: graph initializers, the heterogeneous graph layer and the sentence selector. Green circles and blue boxes represent word and sentence nodes respectively. Orange solid lines denote the edge feature (TF-IDF) between word and sentence nodes and the thicknesses indicate the weight. The representations of sentence nodes will be finally used for summary selection.
Liu and Lapata, 2019b). Our goal is to predict a sequence of labels  $y_{1}, \dots, y_{n}$  ( $y_{i} \in \{0,1\}$ ) for sentences, where  $y_{i} = 1$  represents the  $i$ -th sentence should be included in the summaries. The ground truth labels, which we call ORACLE, is extracted using the greedy approach introduced by Nallapati et al. (2016) with the automatic metrics ROUGE (Lin and Hovy, 2003).
Generally speaking, our heterogeneous summarization graph consists of two types of nodes: basic semantic nodes (e.g. words, concepts, etc.) as relay nodes and other units of discourse (e.g. phrases, sentences, documents, etc.) as supernodes. Each supernode connects with basic nodes contained in it and takes the importance of the relation as their edge feature. Thus, high-level discourse nodes can establish relationships between each other via basic nodes.
In this paper, we use words as the basic semantic nodes for simplicity. HETERSUMGRAPH in Section 3.1 is a special case which only contains one type of supernodes (sentences) for classification, while HETERSDOCSUMGRAPH in Section 3.5 use two (documents and sentences). Based on
our framework, other types of supernodes (such as paragraphs) can also be introduced and the only difference lies in the graph structure.
3.1 Document as a Heterogeneous Graph
Given a graph  $G = \{V, E\}$ , where  $V$  stands for a node set and  $E$  represents edges between nodes, our undirected heterogeneous graph can be formally defined as  $V = V_{w} \cup V_{s}$  and  $E = \{e_{11}, \dots, e_{mn}\}$ . Here,  $V_{w} = \{w_{1}, \dots, w_{m}\}$  denotes  $m$  unique words of the document and  $V_{s} = \{s_{1}, \dots, s_{n}\}$  corresponds to the  $n$  sentences in the document.  $E$  is a real-value edge weight matrix and  $e_{ij} \neq 0$  ( $i \in \{1, \dots, m\}$ ,  $j \in \{1, \dots, n\}$ ) indicates the  $j$ -th sentence contains the  $i$ -th word.
Figure 1 presents the overview of our model, which mainly consists of three parts: graph initializers for nodes and edges, the heterogeneous graph layer and the sentence selector. The initializers first create nodes and edges and encode them for the document graph. Then the heterogeneous graph updates these node representations by iteratively passing messages between word and sentence nodes via Graph Attention Network (GAT) (Velickovic et al., 2017). Finally, the representations of sentence nodes are extracted to predict labels for summaries.
3.2 Graph Initializers
Let  $\mathbf{X}_w\in \mathbb{R}^{m\times d_w}$  and  $\mathbf{X}_s\in \mathbb{R}^{n\times d_s}$  represent the input feature matrix of word and sentence nodes respectively, where  $d_{w}$  is the dimension of the word embedding and  $d_{s}$  is the dimension of each sentence representation vector. Specifically, we first use Convolutional Neural Networks (CNN) (LeCun et al., 1998) with different kernel sizes to capture the local n-gram feature for each sentence  $l_{j}$  and then use the bidirectional Long Short-Term Memory (BiLSTM) (Hochreiter and Schmidhuber, 1997) layer to get the sentence-level feature  $g_{j}$ . The concatenation of the CNN local feature and the BiLSTM global feature is used as the sentence node feature  $X_{s_j} = [l_j;g_j]$ .
To further include information about the importance of relationships between word and sentence nodes, we infuse TF-IDF values in the edge weights. The term frequency (TF) is the number of times  $w_{i}$  occurs in  $s_j$  and the inverse document frequency (IDF) is made as the inverse function of the out-degree of  $w_{i}$ .
6211
3.3 Heterogeneous Graph Layer
Given a constructed graph  $G$  with node features  $\mathbf{X}_w\cup \mathbf{X}_s$  and edge features  $\mathbf{E}$ , we use graph attention networks (Velickovic et al., 2017) to update the representations of our semantic nodes.
We refer to  $\pmb{h}_i \in \mathbb{R}^{d_h}$ ,  $i \in \{1, \dots, (m + n)\}$  as the hidden states of input nodes and the graph attention (GAT) layer is designed as follows:
$$
z _ {i j} = \text {L e a k y R e L U} \left(\mathbf {W} _ {a} \left[ \mathbf {W} _ {q} \boldsymbol {h} _ {i}; \mathbf {W} _ {k} \boldsymbol {h} _ {j} \right]\right), \tag {1}
$$
$$
\alpha_ {i j} = \frac {\exp \left(z _ {i j}\right)}{\sum_ {l \in \mathcal {N} _ {i}} \exp \left(z _ {i l}\right)}, \tag {2}
$$
$$
\boldsymbol {u} _ {i} = \sigma \left(\sum_ {j \in \mathcal {N} _ {i}} \alpha_ {i j} \mathbf {W} _ {v} \boldsymbol {h} _ {j}\right), \tag {3}
$$
where  $\mathbf{W}_a, \mathbf{W}_q, \mathbf{W}_k, \mathbf{W}_v$  are trainable weights and  $\alpha_{ij}$  is the attention weight between  $h_i$  and  $h_j$ . The multi-head attention can be denoted as:
$$
\boldsymbol {u} _ {i} = \left\| _ {k = 1} ^ {K} \sigma \left(\sum_ {j \in \mathcal {N} _ {i}} \alpha_ {i j} ^ {k} \mathbf {W} ^ {k} \boldsymbol {h} _ {i}\right). \right. \tag {4}
$$
Besides, we also add a residual connection to avoid gradient vanishing after several iterations. Therefore, the final output can be represented as:
$$
\boldsymbol {h} _ {i} ^ {\prime} = \boldsymbol {u} _ {i} + \boldsymbol {h} _ {i}. \tag {5}
$$
We further modify the GAT layer to infuse the scalar edge weights  $e_{ij}$ , which are mapped to the multi-dimensional embedding space  $e_{ij} \in \mathbb{R}^{mn \times d_e}$ . Thus, Equal 1 is modified as follows:
$$
z _ {i j} = \text {L e a k y R e L U} \left(\mathbf {W} _ {a} \left[ \mathbf {W} _ {q} \boldsymbol {h} _ {i}; \mathbf {W} _ {k} \boldsymbol {h} _ {j}; \boldsymbol {e} _ {i j} \right]\right). \tag {6}
$$
After each graph attention layer, we introduce a position-wise feed-forward (FFN) layer consisting of two linear transformations just as Transformer (Vaswani et al., 2017).
Iterative updating To pass messages between word and sentence nodes, we define the information propagation as Figure 2. Specifically, after the initialization, we update sentence nodes with their neighbor word nodes via the above GAT and FFN layer:
$$
\mathbf {U} _ {s \leftarrow w} ^ {1} = \operatorname {G A T} \left(\mathbf {H} _ {s} ^ {0}, \mathbf {H} _ {w} ^ {0}, \mathbf {H} _ {w} ^ {0}\right), \tag {7}
$$
$$
\mathbf {H} _ {s} ^ {1} = \operatorname {F F N} \left(\mathbf {U} _ {s \leftarrow w} ^ {1} + \mathbf {H} _ {s} ^ {0}\right), \tag {8}
$$
where  $\mathbf{H}_w^1 = \mathbf{H}_w^0 = \mathbf{X}_w$ ,  $\mathbf{H}_s^0 = \mathbf{X}_s$  and  $\mathbf{U}_{s\leftarrow w}^{1}\in \mathbb{R}^{m\times d_h}$ .  $\mathrm{GAT}(\mathbf{H}_s^0,\mathbf{H}_w^0,\mathbf{H}_w^0)$  denotes that  $\mathbf{H}_s^0$  is used as the attention query and  $\mathbf{H}_w^0$  is used as the key and value.
(a) Update  $s_1$
(b) Update  $w_{1}$
Figure 2: The detailed update process of word and sentence nodes in Heterogeneous Graph Layer. Green and blue nodes are word and sentence nodes involved in this turn. Orange edges indicate the current information flow direction. First, for sentence  $s_1$ , word  $w_1$  and  $w_3$  are used to aggregate word-level information in (a). Next,  $w_1$  is updated by the new representation of  $s_1$  and  $s_2$  in (b), which are the sentences it occurs. See Section 3.3 for details on the notation.
After that, we obtain new representations for word nodes using the updated sentence nods and further update sentence nodes iteratively. Each iteration contains a sentence-to-word and a word-to-sentence update process. For the  $t$ -th iteration, the process can be represented as:
$$
\mathbf {U} _ {w \leftarrow s} ^ {t + 1} = \operatorname {G A T} \left(\mathbf {H} _ {w} ^ {t}, \mathbf {H} _ {s} ^ {t}, \mathbf {H} _ {s} ^ {t}\right), \tag {9}
$$
$$
\mathbf {H} _ {w} ^ {t + 1} = \operatorname {F F N} \left(\mathbf {U} _ {w \leftarrow s} ^ {t + 1} + \mathbf {H} _ {w} ^ {t}\right), \tag {10}
$$
$$
\mathbf {U} _ {s \leftarrow w} ^ {t + 1} = \operatorname {G A T} \left(\mathbf {H} _ {s} ^ {t}, \mathbf {H} _ {w} ^ {t + 1}, \mathbf {H} _ {w} ^ {t + 1}\right), \tag {11}
$$
$$
\mathbf {H} _ {s} ^ {t + 1} = \operatorname {F F N} \left(\mathbf {U} _ {s \leftarrow w} ^ {t + 1} + \mathbf {H} _ {s} ^ {t}\right). \tag {12}
$$
As Figure 2 shows, word nodes can aggregate the document-level information from sentences. For example, the high degree of a word node indicates the word occurs in many sentences and is likely to be the keyword of the document. Regarding sentence nodes, the one with more important words tends to be selected as the summary.
3.4 Sentence Selector
Finally, we need to extract sentence nodes included in the summary from the heterogeneous graph. Therefore, we do node classification for sentences and cross-entropy loss is used as the training objective for the whole system.
Trigram blocking Following Paulus et al. (2017) and Liu and Lapata (2019b), we use Trigram Blocking for decoding, which is simple but powerful version of Maximal Marginal Relevance (Carbonell and Goldstein, 1998). Specifically, we rank sentences by their scores and discard those which have trigram overlappings with their predecessors.
6212
Figure 3: Graph structure of HETERDOCSUMGRAPH for multi-document summarization (corresponding to the Graph Layer part of Figure 1). Green, blue and orange boxes represent word, sentence and document nodes respectively.  $d_{1}$  consists of  $s_{11}$  and  $s_{12}$  while  $d_{2}$  contains  $s_{21}$  and  $s_{22}$ . As a relay node, the relation of document-document, sentence-sentence, and sentence-document can be built through the common word nodes. For example, sentence  $s_{11}$ ,  $s_{12}$  and  $s_{21}$  share the same word  $w_{1}$ , which connects them across documents.
3.5 Multi-document Summarization
For multi-document summarization, the document-level relation is crucial for better understanding the core topic and most important content of this cluster. However, most existing neural models ignore this hierarchical structure and concatenate documents to a single flat sequence(Liu et al., 2018; Fabbri et al., 2019). Others try to model this relation by attention-based full-connected graph or take advantage of similarity or discourse relations(Liu and Lapata, 2019a).
Our framework can establish the document-level relationship in the same way as the sentence-level by just adding supernodes for documents(as Figure 3), which means it can be easily adapted from single-document to multi-document summarization. The heterogeneous graph is then extended to three types of nodes:  $V = V_{w} \cup V_{s} \cup V_{d}$  and  $V_{d} = \{d_{1},\dots ,d_{l}\}$  and  $l$  is the number of source documents. We name it as HETERDOC-SUMGRAPH.
As we can see in Figure 3, word nodes become the bridges between sentences and documents. Sentences containing the same words connect with each other regardless of their distance across documents, while documents establish relationships based on their similar contents.
Document nodes can be viewed as a special type of sentence nodes: a document node connects with contained word nodes and the TF-IDF value is used as the edge weight. Besides, document nodes also share the same update process as sentence nodes.
The differences lie in the initialization, where the document node takes the mean-pooling of its sentence node features as its initial state. During the sentence selection, the sentence nodes are concatenated with the corresponding document representations to obtain the final scores for multi-document summarization.
We evaluate our models both on single- and multi-document summarization tasks. Below, we start our experiment with the description of the datasets.
CNN/DailyMail The CNN/DailyMail question answering dataset (Hermann et al., 2015; Nallapati et al., 2016) is the most widely used benchmark dataset for single-document summarization. The standard dataset split contains 287,227/13,368/11,490 examples for training, validation, and test. For the data prepossessing, we follow Liu and Lapata (2019b), which use the non-anonymized version as See et al. (2017), to get ground-truth labels.
NYT50 NYT50 is also a single-document summarization dataset, which was collected from New York Times Annotated Corpus (Sandhaus, 2008) and preprocessed by Durrett et al. (2016). It contains 110,540 articles with summaries and is split into 100,834 and 9706 for training and test. Following Durrett et al. (2016), we use the last 4,000 examples from the training set as validation and filter test examples to 3,452.
Multi-News The Multi-News dataset is a large-scale multi-document summarization introduced by Fabbri et al. (2019). It contains 56,216 articles-summary pairs and each example consists of 2-10 source documents and a human-written summary. Following their experimental settings, we split the dataset into 44,972/5,622/5,622 for training, validation and test examples and truncate input articles to 500 tokens.
4.2 Settings and Hyper-parameters
For both single-document and multi-document summarization, we limit the vocabulary to 50,000 and initialize tokens with 300-dimensional GloVe embeddings (Pennington et al., 2014). We filter stop words and punctuations when creating word
6213
nodes and truncate the input document to a maximum length of 50 sentences. To get rid of the noisy common words, we further remove  $10\%$  of the vocabulary with low TF-IDF values over the whole dataset. We initialize sentence nodes with  $d_{s} = 128$  and edge features  $e_{ij}$  in  $\mathrm{GAT}_e$  with  $d_{e} = 50$ . Each GAT layer is 8 heads and the hidden size is  $d_{h} = 64$ , while the inner hidden size of FFN layers is 512.
During training, we use a batch size of 32 and apply Adam optimizer (Kingma and Ba, 2014) with a learning rate 5e-4. An early stop is performed when valid loss does not descent for three continuous epochs. We select the number of iterations  $t = 1$  based on the performance on the validation set. For decoding, we select top-3 sentences for CNN/DailyMail and NYT50 datasets and top-9 for Multi-New according to the average length of their human-written summaries.
4.3 Models for Comparison
Ext-BiLSTM Extractive summarizer with BiLSTM encoder learns the cross-sentence relation by regarding a document as a sequence of sentences. For simplification, we directly take out the initialization of sentence nodes for classification, which includes a CNN encoder for the word level and 2-layer BiLSTM for sentence level. This model can also be viewed as an ablation study of our HETER-SUMGRAPH on the updating of sentence nodes.
Ext-Transformer Extractive summarizers with Transformer encoder learn the pairwise interaction (Vaswani et al., 2017) between sentences in a purely data-driven way with a fully connected priori. Following (Liu and Lapata, 2019b), we implement a Transformer-based extractor as a baseline, which contains the same encoder for words followed by 12 Transformer encoder layers for sentences. Ext-Transformer can be regarded as the sentence-level fully connected graph.
HETERSUMGRAPH Our heterogeneous summarization graph model relations between sentences based on their common words, which can be denoted as sentence-word-sentence relationships. HETERSUMGRAPH directly selects sentences for the summary by node classification, while HETERSUMGRAPH with trigram blocking further utilizes the n-gram blocking to reduce redundancy.