# DEEDP: Document-Level Event Extraction Model Incorporating Dependency Paths
## 4 Methodology
### Document-Level Encoder  
Document-level contextualized representations for entities and sentences take advantage of the global semantic of the document and can benefit DEE. **Entity & Sentence Embedding. ** To acquire the sentence-level representations of entities, we aggregated all word representations by performing a _mean pooling_ operation over consecutive tokens that mention \(e_{i}\). Specifically, given entity \(e_{i}\) and its span in sentence \(S_{i}\), which starts at the \(k\)th token and ends at the \(t\)th token, the representation for \(e_{i}\) can be represented as:  
\[c_{i}^{e}=MeanPool(c_{i,k},\cdots,c_{i,t}) \tag{3}\]  
where \(MeanPool(\cdot)\) denotes the _mean pooling_ operation and \(c_{i}^{e}\in R^{d}\) denotes the representation for \(e_{i}\). The variables \(c_{i,k},c_{i,t}\in R^{d}\) are tensors for the start token and end token of entity \(e_{i}\), which were used to calculate the sentence-level representation for \(e_{i}\). Similarly, we performed a _mean pooling_ operation for all entities contained in document \(\mathcal{D}\), then obtained a series of sentence-level entity representations \([c_{1}^{e},c_{2}^{e},\cdots,c_{N_{c}}^{e}]\), with \(N_{c}\) being the number of entities contained in document \(\mathcal{D}\). For sentences, we also performed a _mean pooling_ operation over the tokens covering a sentence and obtained the sentence-level sentence representations \([c_{1}^{s},c_{2}^{s},\cdots,c_{N_{c}}^{s}]\), where \(c_{i}^{s}\in R^{d}\) denotes the representation for sentence \(S_{i}\). **Document-level Encoding. ** To obtain the document-level contextualized representations for all sentences and entities, we applied a Transformer encoder, _TF-_2, to model the information interaction between them, enabling the awareness of document-level contexts. Following Doc2 EDAG [8], we added sentence position embeddings to the sentence repre  
Figure 3: The input embedding layer of sentence-level encoder. The input embeddings for each token are the sum of the token, position, POS, entity type, and the document topic embeddings. sentation to inform the sentence order in the given document before feeding them into _TF-2_. Document-aware representations could be obtained through document-level encoding:  
\[[H^{e},H^{s}]=TF-2\big{(}c_{1}^{e},\cdots,c_{N_{e}}^{e};c_{1}^{s},\cdots,c_{N_{e} }^{s}\big{)} \tag{4}\]  
where _TF-2_(\(\cdot\)) is used to obtain the document-level representations for entities and sentences contained in the given document, which takes the sentence-level representations of entities and sentences as inputs. The variable \(H^{e}\in R^{N_{e}\times d}\) denotes document-level entity representation, and \(H^{s}\in R^{N_{h}\times d}\) denotes document-level sentence representation. As entities may be mentioned by different word spans in a document, we performed a _max pooling_ operation over all the mention embeddings referring to the same entity to obtain a fused embedding. Then we acquired the distinct document-aware context representation \(H^{e}\in R^{N_{e}^{\prime}\times d}\). In this study, we performed event type classification tasks at the document-level encoding stage. We first applied a _mean pooling_ operation over \(H^{s}\) to obtain the document representation \(H^{d}\), and then fed \(H^{d}\) into multiple feed-forward networks (FFN) to perform event type predictions. Concretely, the event \(t\) can be predicted by:  
\[p_{t}=softmax\Big{(}H^{d}\cdot W_{e}^{t}\Big{)} \tag{5}\]  
where \(p_{t}\) indicates the probability for event type \(t\), which is calculated by the _softmax_(\(\cdot\)) function. The variable \(W_{e}^{t}\in R^{d\times 2}\) represents learnable parameters for predicting the event type \(t\). Variables \(t\in\mathcal{T}\) and \(\mathcal{T}\) denote the pre-defined event type set.