A Multi-task Approach for Machine Reading Comprehension Form Named Entity Recognition Tasks

Yu Zhang, Jian Deng, Ying Ma, Jianmin LiAtlantis 2023 · OpenAlex

TL;DR

This paper introduces a multi-task learning approach that treats Named Entity Recognition (NER) as a Machine Reading Comprehension (MRC) task. By co-training on large-scale Natural Language Inference (NLI) and traditional MRC datasets, the authors overcome the generalization issues typically found when converting NER into a question-answering format, achieving state-of-the-art results on the CoNLL-2003 benchmark.

What Problem Does This Paper Address?

Named Entity Recognition—the task of identifying and categorizing entities like people, locations, and organizations in text—has traditionally been treated as a "sequence labeling" problem. Recently, researchers have found success by reframing NER as a Machine Reading Comprehension (MRC) task. Instead of just labeling tokens, the model is asked a question: "Which words in this sentence refer to a person?"

However, this "NER-as-MRC" conversion faces two major hurdles:

  1. Data Scarcity: NER datasets often have very few instances for specific entity classes, leading to poor model generalization.
  2. Context Deficit: Traditional MRC datasets (like SQuAD) feature long passages with rich context. In contrast, NER "contexts" are usually just single sentences, providing less "corpus" for the model to learn deep semantic relationships.

The authors aim to solve these problems by injecting external domain knowledge into the model through multi-task learning.

Methods

The researchers developed a one-stage model using BERT-Large as the encoder. Their approach is built on three pillars:

  1. Task Transformation: They convert the CoNLL-2003 NER dataset into an MRC format. For example, the entity type "PER" (Person) is turned into a query: "Find the person entities are named persons or family in the text."
  2. Multi-task Learning (MTL): The model doesn't just train on NER. It simultaneously learns from four datasets across two different tasks:
  3. NLI Task: Learning the logical relationship between a premise and a hypothesis.
  4. MRC Task: Learning to extract answer spans from long-form text.
  5. Proportional Sampling: To handle the different sizes of these datasets, the model extracts instances using a proportional sampling technique, ensuring the training process isn't overwhelmed by any single dataset.
  6. Span-based Matching: To handle "Nested NER" (where one entity might be inside another), the model uses a binary classification layer to match predicted start and end indices, rather than just picking the nearest neighbor.

Datasets

The study utilizes four major benchmarks:

  • MNLI & SNLI: Large-scale datasets for Natural Language Inference used to teach the model semantic entailment.
  • SQuAD: The standard for Machine Reading Comprehension, providing the model with "intra-domain" knowledge of how to extract answers from long contexts.
  • CoNLL-2003: The target NER dataset (English version), containing labels for Persons, Locations, Organizations, and Miscellaneous entities.

Key Insights and Ideas

  • NLI as a Semantic Foundation: The authors argue that NLI is a "meta-skill" for QA. If a model can determine that a specific span of text (the answer) is logically supported by the sentence (the premise), it becomes much better at extracting the correct entity in an MRC setup.
  • Compensating for Short Contexts: By including SQuAD in the training mix, the model learns to handle the complexities of language found in long-form passages, which compensates for the "thin" context provided by standard NER sentences.
  • Unified Representation: By sharing parameters across NLI, MRC, and NER, the BERT encoder learns a more robust, generalized representation of language that isn't overfitted to the specific quirks of a single small dataset.

Key Results

The multi-task approach demonstrated clear improvements over standard baselines on the CoNLL-2003 dataset:

Method F1-score
BERT-TAGGER (Sequence Labeling) 92.8
BERT-MRC (Standard MRC approach) 93.04
OUR-Method (Multi-task NLI+MRC) 93.146

While the numerical gains (0.1% to 0.3%) might seem incremental, they represent a significant step in proving that "out-of-domain" knowledge (like logical inference) can directly benefit "in-domain" performance for specialized NLP tasks.

Limitations and Future Work

The authors acknowledge that while their method improves generalization, the generation of questions for the MRC-form NER remains a difficult and manual-heavy part of the pipeline.

Future directions suggested by the work include:

  • Applying this multi-task framework to other NLP tasks beyond NER.
  • Exploring more automated ways to generate entity queries.
  • Testing the model on more complex, "nested" NER datasets where the span-matching mechanism can be more rigorously evaluated.

Summary updated

Abstract

Named Entity Recognition (NER) is a basic NLP task that aims to provide class labels for words in free text, such as people, locations.The traditional NER task is treated as a label-sequence task, but the trend of recent jobs is to convert the NER task into a Machine Reading Comprehension (MRC) task to achieve better representation.However, this conversion is often accompanied by the problem of poor generalization of the model due to too few class-specific instances.Therefore, to solve this problem, we try to introduce different domain knowledge into our NER task, and we introduce MRC knowledge as well as NLI knowledge into our NER task through a multi-task learning approach.Our method is a one-stage model that combines two large NLI datasets (MNLI, SNLI) and a large traditional MRC dataset (SquAD) with our target NER dataset for multi-task learning.Through multi task learning, we learn the knowledge of NLI domain and MRC domain, so as to improve the performance of our model on the target dataset.We conducted enough experiments to validate the effectiveness of our method.Also, our model achieves 0.3% and 0.106% improvement compared to different baselines, respectively, proving that introducing external knowledge is effective in improving model performance.
BibTeX
@inproceedings{zhang2023multi,
  author = {Yu Zhang and Jian Deng and Ying Ma and Jianmin Li},
  title = {{A Multi-task Approach for Machine Reading Comprehension Form Named Entity Recognition Tasks}},
  booktitle = {Atlantis},
  year = {2023},
  doi = {10.2991/978-94-6463-040-4\_73},
}

Loading related content...

Figure