Optimizing Bi-Encoder for Named Entity Recognition via Contrastive Learning
Sheng Zhang, Hao Cheng, Jianfeng Gao, Hoifung Poon
Abstract
We present a bi-encoder framework for named entity recognition (NER), which applies contrastive learning to map candidate text spans and entity types into the same vector representation space. Prior work predominantly approaches NER as sequence labeling or span classification. We instead frame NER as a representation learning problem that maximizes the similarity between the vector representations of an entity mention and its type. This makes it easy to handle nested and flat NER alike, and can better leverage noisy self-supervision signals. A major challenge to this bi-encoder formulation for NER lies in separating non-entity spans from entity mentions. Instead of explicitly labeling all non-entity spans as the same class Outside (O) as in most prior methods, we introduce a novel dynamic thresholding loss, learned in conjunction with the standard contrastive loss. Experiments show that our method performs well in both supervised and distantly supervised settings, for nested and flat NER alike, establishing new state of the art across standard datasets in the general domain (e.g., ACE2004, ACE2005, CoNLL2003) and high-value verticals such as biomedicine (e.g., GENIA, NCBI, BC5CDR, JNLPBA). We release the code at github.com/microsoft/binder.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 46b7aa7c-91b9-4b1d-8c55-4fc19f1a02fdCited by top-tier papers7
- GoLLIE: Annotation Guidelines improve Zero-Shot Information-ExtractionOscar Sainz, Iker García-Ferrero, Rodrigo Agerri, Oier Lopez de Lacalle et al.ICLR 2024 · 168 citations
- NuNER: Entity Recognition Encoder Pre-training via LLM-Annotated DataSergei Bogdanov, Alexandre Constantin, Timothée Bernard, Benoît Crabbé et al.EMNLP 2024 · 29 citations
- PaDeLLM-NER: Parallel Decoding in Large Language Models for Named Entity RecognitionJinghui Lu, Yanjie Wang, Ziwei Yang, Xuejing Liu et al.NeurIPS 2024 · 22 citations
- Improving Natural Language Understanding for LLMs via Large-Scale Instruction SynthesisLin Yuan, Jun Xu, Honghao Gui, Mengshu Sun et al.AAAI 2025 · 3 citations
- Span Graph Transformer for Document-Level Named Entity RecognitionHongli Mao, Xian-Ling Mao, Hanlin Tang, Yuming Shang et al.AAAI 2024 · 3 citations
Builds on19
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- A Unified MRC Framework for Named Entity RecognitionXiaoya Li, Jingrong Feng, Yuxian Meng, Qinghong Han et al.ACL 2020 · 617 citations
- LinkBERT: Pretraining Language Models with Document LinksMichihiro Yasunaga, Jure Leskovec, Percy LiangACL 2022 · 463 citations
- Scalable Zero-shot Entity Linking with Dense Entity RetrievalLedell Wu, Fabio Petroni, Martin Josifoski, Sebastian Riedel et al.EMNLP 2020 · 336 citations
- Poly-encoders: Architectures and Pre-training Strategies for Fast and Accurate Multi-sentence ScoringSamuel Humeau, Kurt Shuster, Marie-Anne Lachaux, Jason WestonICLR 2020 · 316 citations
Related papers
- Boundary Enhanced Neural Span Classification for Nested Named Entity RecognitionChuanqi Tan, Wei Qiu, Mosha Chen, Rui Wang et al.AAAI 2020 · 125 citations
- Learning "O" Helps for Learning More: Handling the Unlabeled Entity Problem for Class-incremental NERRuotian Ma, Xuanting Chen, Zhang Lin, Xin Zhou et al.ACL 2023 · 12 citations
- MCL-NER: Cross-Lingual Named Entity Recognition via Multi-View Contrastive LearningYing Mo, Jian Yang, Jiahao Liu, Qifan Wang et al.AAAI 2024 · 42 citations
- MCL: Multi-Granularity Contrastive Learning Framework for Chinese NERShan Zhao, Chengyu Wang, Minghao Hu, Tianwei Yan et al.AAAI 2023 · 25 citations
- A Supervised Multi-Head Self-Attention Network for Nested Named Entity RecognitionYongxiu Xu, Heyan Huang, Chong Feng, Yue HuAAAI 2021 · 39 citations
