Dependency parser is widely used in relation classification tasks with the aim of exploring the syntactic information of sentences. We apply the Stanford dependency parser (37) to extract dependency syntactic information. Figure 2 shows the dependency relation of the input text in Figure 1. The connection from coadministered to colestipol means that coadministered is the head word of colestipol, and “nsubjpass” denotes the “passive nominal subject” dependency relation between the two words. We use the word embedding from PubMedBERT as the initial node representations, and set edge weights as 0 or 1 to indicate if two nodes are connected in the dependency path.
An example of dependency relation. Two drugs are labelled in bold.
Let the node representations in lth layer of the dependency graph be . We apply two graph convolutional layers to update each node, thus the updated is expressed as follows:
Then, an average pooling layer is applied to get the syntactic-based sentence embedding. Let be the updated node representations obtained from graph convolutional layers, the output of dependency graph, , is shown as:
We denote the outputs of drug and verbs representations as , , and , respectively.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.