[Paper Review] Fine-tuning BERT for Joint Entity and Relation Extraction in Chinese Medical Text
This paper proposes a focused attention mechanism that fine-tunes BERT for joint Chinese medical entity and relation extraction by dynamically restricting attention ranges in the final BERT layers via task-specific MASK matrices. The resulting STR-encoder achieves SOTA performance with 96.89% F1 on NER and 88.51% on relation classification, outperforming prior methods by 1.65% and 1.22% respectively on coronary angiography texts.
Entity and relation extraction is the necessary step in structuring medical text. However, the feature extraction ability of the bidirectional long short term memory network in the existing model does not achieve the best effect. At the same time, the language model has achieved excellent results in more and more natural language processing tasks. In this paper, we present a focused attention model for the joint entity and relation extraction task. Our model integrates well-known BERT language model into joint learning through dynamic range attention mechanism, thus improving the feature representation ability of shared parameter layer. Experimental results on coronary angiography texts collected from Shuguang Hospital show that the F1-score of named entity recognition and relation classification tasks reach 96.89% and 88.51%, which are better than state-of-the-art methods 1.65% and 1.22%, respectively.
Motivation & Objective
- To address the limitations of Bi-LSTM-based joint models in capturing shared features between entity and relation types in Chinese medical text.
- To improve feature representation in joint learning by integrating BERT’s pre-trained knowledge into a shared parameter layer.
- To design a dynamic attention mechanism that focuses BERT’s context learning on task-relevant tokens for NER and RC.
- To evaluate the effectiveness of joint learning versus pipeline approaches in Chinese medical text extraction.
- To analyze hyperparameter sensitivity and ablation effects on model performance.
Proposed method
- Introduces a shared task representation encoder (STR-encoder) that modifies the attention mechanism in the last K layers of BERT to focus on task-specific input spans.
- Employs two distinct MASK matrices for relation classification: one that restricts attention to the two entities and another that allows broader context.
- Uses dynamic range attention to control the attention range in BERT’s self-attention mechanism, enabling task-specific context representation.
- Applies the STR-encoder as a shared feature extractor in a joint learning framework for NER and RC.
- Trains the model end-to-end using cross-entropy loss for both NER (BIEOS tagging) and RC (classification).
- Performs ablation studies by training NER and RC separately to isolate the benefit of joint learning.
Experimental results
Research questions
- RQ1Can a BERT-based shared encoder with dynamic attention improve joint entity and relation extraction in Chinese medical text?
- RQ2How does the choice of MASK matrix affect relation classification performance in the proposed model?
- RQ3What is the optimal number of BERT layers (K) to apply the focused attention mechanism for maximum performance?
- RQ4Does joint learning of NER and RC outperform separate training of the two tasks?
- RQ5How do hyperparameters K and MASK configuration interact to influence model performance?
Key findings
- The proposed model achieves 96.89% F1 on named entity recognition, surpassing the previous SOTA by 1.65 percentage points.
- The model reaches 88.51% F1 on relation classification, representing a 1.22% improvement over the second-best method.
- When K=6 and MASK rc uses Eq. (13), NER achieves the highest F1 of 96.77%, indicating broader attention aids entity recognition.
- For relation classification, the best F1 of 92.18% is achieved with K=4 and MASK rc using Eq. (14), suggesting constrained attention improves RC.
- Joint learning improves both NER and RC performance by 0.52 and 0.82 percentage points in F1, respectively, compared to separate training.
- Ablation analysis confirms that joint learning captures beneficial inter-task features, though entity type prediction precision slightly drops due to introduced noise.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.