NER-MQMRC : F ormulating Named Entity Recognition as Multi Question Machine Reading Comprehension (2022)

Abstract: NER has been traditionally formulated as a sequence labeling task. However, there has been recent trend in posing NER as a machine reading comprehension task (Wang et al., 2020; Mengge et al., 2020), where entity name (or other information) is considered as a question, text as the context and entity value in text as answer snippet. These works consider MRC based on a single question (entity) at a time. We propose posing NER as a multi-question MRC task, where multiple questions (one question per entity) are considered at the same time for a single text. We propose a novel BERT-based multi-question MRC (NER-MQMRC) architecture for this formulation. NER-MQMRC architecture considers all entities as input to BERT for learning token embeddings with self-attention and leverages BERT-based entity representation for further improving these token embeddings for NER task. Evaluation on three NER datasets show that our proposed architecture leads to average 2.5 times faster training and 2.3 times faster inference as compared to NER-SQMRC framework based models by considering all entities together in a single pass. Further, we show that our model performance does not degrade compared to single-question based MRC (NER-SQMRC) (Devlin et al., 2019) leading to F1 gain of +0.41%, +0.32% and +0.27% for AE-Pub, Ecommerce5PT and Twitter datasets respectively. We propose this architecture primarily to solve large scale e-commerce attribute (or entity) extraction from unstructured text of a magnitude of 50k+ attributes to be extracted on a scalable production environment with high performance and optimised training and inference runtimes.

## introduction named entity recognition (ner) is the task of locating and classifying entities mentioned in unstructured text into predefined categories such as * work done as part of retail business services, amazon † work done as part of india machine learning, amazon names of people, organizations and locations. it is a crucial component of many applications, such as web search, relation extraction @xcite and e-commerce attribute extraction @xcite . traditionally, ner has been posed as a sequence labeling task @xcite @xcite where each token is assigned a single tag class. we term these sequence labeling approaches as ner-sl. recently, there has been interest in posing ner as a machine reading comprehension task @xcite @xcite . specifically, ner is posed as a question answering problem, where text is considered context, entity name (or some variant) is considered question and entity value mentioned in text is considered as answer snippet. we term these approaches as single question machine reading comprehension (ner-sqmrc) as they involve asking a single question (or entity) at a time. we argue that both ner-sl and ner-sqmrc have their merits and demerits, e.g. ner-sqmrc incorporates entity name for better representation and can be easily extended to new entities without re-training and ner-sl requires single scoring pass for extracting all entities from a given text. we pose ner as a multi-question mrc problem, where multiple questions (one question per entity) are asked at the same time and propose a novel architecture (ner-mqmrc) for this formulation. we summarize the merits and demerits of these three formulations in ## conclusion in this paper, we formulated ner as a multi question mrc task (ner-mqmrc). experimental evaluation on three ner datasets shows that our proposed ner-mqmrc model handles multiple entities together and leads to faster training and inference as compared to single question mrc for-