posted on 2025-10-14, 05:52authored byYaodi Liu, Kun Zhang, Rong TongRong Tong, Chenxi Cai, Xiaohe Wu
<p dir="ltr">Most Named entity recognition (NER) methods can only handle flat entities and ignore nested entities. In Natural language processing (NLP), it is common to contain other entities within entities. Therefore, we propose a Flat-Span contrastive learning (Fla-SpaCL) method for nested NER. This method includes two sub-modules: a flat NER module for outer entities and a candidate span classification module based on contrastive learning. In the flat NER module, we use Star-Transformer and Conditional random field (CRF) to identify the outer entities. In the candidate span classification module, we first generate inner candidate spans based on the identified outer entities. Secondly, to better distinguish entity spans and non-entity spans, we introduce contrastive learning to maximize the similarity between entity spans and use the InfoNEC loss function to handle hard negative samples. Finally, multi-task learning is used to jointly optimize the flat NER module and the candidate span classification module to reduce error propagation and improve model performance. In the experimental analysis, we compared the proposed model with baseline models to verify its effectiveness.</p>