## 4 Discussion  
### Datasets and Experiment Setups  
The proposed model was evaluated in three commonly used public ERE datasets: CoNLL04 [25], ADE [27], and SciERC [1].  
The CoNLL04 dataset contains sentences with annotated named entities and relations extracted from news articles. It contains a training set consisting of 1153 texts and a test set consisting of 288 texts written in English. The dataset comprises four entity types (persons, locations, organizations, and others) and five relation types (Work-For, Kill, OrganizationBased-In, Live-In, and Located-In). The partition of the CoNLL04 dataset that was used for testing SpERT [14] and DyGIE++ [7] is utilized in the experiments.  
The ADE dataset contains Medline case reports in which drugs, adverse effects, doses, and their relations were annotated. Entities and relations are systematically annotated to ensure data quality. Experiments were conducted using ten-fold cross-validation with a total sample size of 4272. For each validation, 3845 samples were used for training and the rest of the 427 samples were used for testing.  
The SciERC dataset includes annotations of scientific entities, the relations between them, and co-citation clusters for 500 scientific abstracts. These abstracts are extracted from the AI conference/workshop proceedings. We used the same dataset partition as in [1], containing a training set (1861 sentences), a development set (275 sentences) and a test (551 sentences). For the actual training, we used both the training set and the development set together for training. The details of the three datasets are shown in Table 2.  
In the experiments, we evaluated the proposed model using the predefined training and test datasets in CoNLL04 and SciERC. Additionally, the model was evaluated in the ADE dataset using ten-fold cross-validation. To test the performance of the proposed lexical features and the transformer encoder for relation classification, ablation experiments were conducted based on a basic span-based ERE model SpERT in the CoNLL04 dataset [14]. The proposed model was compared with several state-of-the-art (SOTA) entity-relation extraction models on the three datasets. The performance of each model was evaluated using precision, recall, and F1 scores in both ablation experiments and comparisons with other models, and the advantages of the proposed method were analyzed as well. However, the proposed method has more added features and network structures, which may result in additional computational complexity. To ensure that the proposed model did not have too much of an increase in computational complexity compared to the basic SpERT model, a computational complexity analysis of the proposed method was conducted.  
The hyperparameters were manually optimized and set as follows: batch size = 2, learning rate = 5e - 5, number of epochs = 20, Nr = 5, m is the width of spans, \(1\leq\) m \(\leq\) 10, Nc = 100, Nf = 50, Nm = 20. The hyperparameters used in the proposed model were manually optimized and set to the same values as in SpERT, and the AdamW optimizer was used. The experiments were implemented on a workstation with 24 CPU cores, 64G RAM, one NVIDIA RTX 3090 GPU, CentOS 7.5, Python 3.6, and Pytorch 1.9.0.