# Attentional Extractive Summarization +
## 4 Framework Definition  
A scheme of our framework can be seen in Figure 1. Let \(\mathcal{D}=\left\{(X_{k},X_{k}^{\prime})\right\}_{k=1}^{M}\) be a corpus of \(M\) (document, summary) pairs, where all documents and summaries are defined according to a vocabulary \(\mathcal{V}\), let \(X_{k}=\left\{(\{x_{ij}\}_{i=1}^{W})_{j=1}^{T}\right\}_{j=1}^{T}\) be a document composed by \(T\) sentences of \(W\) words, \(X_{k}\in\mathcal{V}^{T\times W}\), let \(X_{k}^{\prime}=\left\{(\{x_{ij}^{\prime}\}_{i=1}^{V})_{j=1}^{Q}\right\}_{j=1}^ {Q}\) be a summary composed by \(Q\) sentences of \(V\) words, (Although documents and summaries of the dataset can have arbitrary lengths, the models based on neural networks digest fixed-length representations achieved by means of truncating or padding. So, we used a maximum number of sentences (T and Q) and a maximum number of words per sentence (W and V) to better reflect it. Regarding the notation, \(\mathcal{V}^{A\times B}\) is intended to represent the set of \(A\) lists with \(B\) words each one, each word belonging to \(\mathcal{V}\)). \(X_{k}^{\prime}\in\mathcal{V}^{Q\times V}\) and let \(f:\mathcal{V}^{T\times W}\times\mathcal{V}^{Q\times V}\rightarrow\mathbb{R}^{2}\) be a model whose input is a (document, summary) pair and whose output is a probability distribution of the summary correctness over \(\mathbb{C}=\left\{0,1\right\}\), where \(0\) is for incorrect summaries and \(1\) is for correct summaries. The objective is that the model \(f(.,. ;\Theta)\) has to be able to determine if a \((X,X^{\prime})\) pair is correct or incorrect. This way, the class computed from the output of the model for the \((X_{k},X_{k}^{\prime})\) pair will be \(1\), as \(X_{k}^{\prime}\) is the reference summary for the document \(X\), while for the \((X_{k},X_{j\
eq k}^{\prime})\) pair, the class computed will be \(0\), as \(X_{j\
eq k}^{\prime}\) is the reference summary for another document from the corpus \(\mathcal{D}\), different from \(X\). In order to do that, the model must represent documents and summaries in a proper way to distinguish each case. Thus, \(f(.,. ;\Theta)\) relies on a document encoder \(g:\mathcal{V}^{T\times W}\rightarrow\mathbb{R}^{d_{S}}\) and in a summary encoder \(g^{\prime}:\mathcal{V}^{Q\times V}\rightarrow\mathbb{R}^{d_{S}^{\prime}}\). These encoders have to be able to model the hierarchical structure of documents and summaries, so that \(g(. ;\theta_{1})\) and \(g^{\prime}(. ;\theta_{2})\) are decomposed in two different levels. First, \(g_{1}:\mathcal{V}^{T\times W}\to\mathbb{R}^{T\times d_{g_{1}}}\) and \(g_{1}^{\prime}:\mathcal{V}^{Q\times V}\to\mathbb{R}^{Q\times d_{g_{1}^{\prime}}}\) that are applied independently on each sentence (of documents and summaries respectively) to obtain sentence-level representations from the word-level representations. The encoders can be composed of \(N\) hidden layers. In practice, the words are represented by means of a \(d_{e}\)-dimensional embedding model \(\mathrm{E}:\mathcal{V}\to\mathbb{R}^{d_{e}}\), typically pretrained and applied to arbitrary-length (\(P\)) word sequences, i.e., \(\mathrm{E}:\mathcal{V}^{P}\to\mathbb{R}^{P\times d_{e}}\). Therefore, \(g_{1}:\mathbb{R}^{T\times W\times d_{e}}\to\mathbb{R}^{T\times d_{g_{1}}}\) and \(g_{1}^{\prime}:\mathbb{R}^{Q\times V\times d_{e}}\to\mathbb{R}^{Q\times d_{g_{ 1}^{\prime}}}\). Second, in order to represent documents and summaries from the representation of their sentences, \(g_{2}:\mathbb{R}^{T\times d_{g_{1}}}\to\mathbb{R}^{d_{g}}\) and \(g_{2}^{\prime}:\mathbb{R}^{T\times d_{g_{1}^{\prime}}}\to\mathbb{R}^{d_{g}^{ \prime}}\) are defined. These encoders can have \(\hat{N}\) hidden layers. Basically, the sentence encoders can be any function that digests a three-dimensional tensor of word embeddings representing the words inside the sentences of a text, and generates a vector representation for each sentence of the text. Similarly, the document encoders, can be any function that digests a matrix of sentence representations to generate a vector representation of the whole text.