journal article·2025-11-06Open access

Contrastive Learning with Gaussian Embeddings and Self-Attention for Few-Shot Named Entity Recognition

Yihao Zhang, Wei Chen, Lei Ma

Applied Sciences· Volume 15· Issue 21

Abstract

Named entity recognition (NER) in few-shot scenarios plays a critical role in entity annotation for low-resource domains. However, existing methods are often limited to learning semantic features and intermediate representations specific to the source domain, which restricts their generalization capability when applied to unseen target domains and leads to prominent performance degradation. To address this issue, we propose a novel few-shot NER model based on contrastive learning. Specifically, the model enhances token representations through Gaussian distribution embedding and a self-attention mechanism, while adaptively optimizing the weighting parameters of the contrastive loss to achieve performance improvement. This design effectively mitigates overfitting and enhances the model’s generalization ability. Experiments on multiple datasets (including CoNLL2003, GUM, and Few-NERD) demonstrate that our approach achieves performance gains of 2.05% to 15.89% compared to state-of-the-art methods. These results confirm the effectiveness of our model in few-shot NER tasks and suggest its potential for broader application in low-resource information extraction scenarios.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Topic Modeling · Domain Adaptation and Few-Shot Learning · Advanced Graph Neural Networks

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Faculty of Information Engineering and Automation, Kunming University of Science and Technology, Kunming 650500, China

Yunnan Key Laboratory of Artificial Intelligence, Kunming University of Science and Technology, Kunming 650500, China

References (21)

Show source-provided references
1. A review of named entity recognition: From learning methods to modelling paradigms and tasks10.1007/s10462-025-11321-8 ↗
2. A novel large-language-model-driven framework for named entity recognition
3. BERT applications in natural language processing: A review10.1007/s10462-025-11162-5 ↗
4. Research on the application of deep learning-based BERT model in sentiment analysis10.54254/2755-2721/67/2024MA ↗
5. Karim, M., Khan, S., Van, D.H., Liu, X., Wang, C., and Qu, Q. (2025). Transforming Data Annotation with AI Agents: A Review of Architectures, Reasoning, Applications, and Impact. Future Internet, 17.10.3390/fi17080353 ↗
6. Chen, J., Lin, H., Han, X., Lu, Y., Jiang, S., Dong, B., and Sun, L. (2024). Few-Shot Named Entity Recognition via Superposition Concept Discrimination, ELRA and ICCL.
7. Ji, S., and Kong, F. (2024). A Novel Three-Stage Framework for Few-Shot Named Entity Recognition, ELRA and ICCL.
8. Zhou, C., Huang, B., and Ling, Y. (2025). A Chinese Few-Shot Named-Entity Recognition Model Based on Multi-Label Prompts and Boundary Information. Appl. Sci., 15.10.3390/app15115801 ↗
9. Zhang, S., Cao, B., and Fan, J. (2024). KCL: Few-Shot Named Entity Recognition with Knowledge Graph and Contrastive Learning, ELRA and ICCL.
10. Guo, Q., Dong, Y., Tian, L., Kang, Z., Zhang, Y., and Wang, S. (2024). BANER: Boundary-Aware LLMs for Few-Shot Named Entity Recognition. arXiv.
11. Yang, Y., and Katiyar, A. (2020, January 16–20). Frustratingly Simple Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning. Proceedings of the Empirical Methods in Natural Language Processing, Online.10.18653/v1/2020.emnlp-main.516 ↗
12. Ma, R., Zhou, X., Gui, T., Tan, Y., Li, L., Zhang, Q., and Huang, X.-J. (2022). Template-Free Prompt Tuning for Few-Shot NER, Association for Computational Linguistics.10.18653/v1/2022.naacl-main.420 ↗
13. Zhang, Y., Yu, Z., Huang, Y., and Tang, J. (2024). CLLMFS: A Contrastive Learning enhanced Large Language Model Framework for Few-Shot Named Entity Recognition. arXiv.10.3233/FAIA240714 ↗
14. Xue, X., Zhang, C., Xu, T., and Niu, Z. (2024, January 20–27). Robust few-shot named entity recognition with boundary discrimination and correlation purification. Proceedings of the Thirty-Eighth AAAI Conference on Artificial Intelligence and Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence and Fourteenth Symposium on Educational Advances in Artificial Intelligence, Vancouver, BC, Canada.10.1609/aaai.v38i17.29904 ↗
15. Yoda, S., Tsukagoshi, H., Sasano, R., and Takeda, K. (2024). Sentence Representations via Gaussian Embedding, Association for Computational Linguistics.10.18653/v1/2024.eacl-short.36 ↗
16. Gao, B., Wang, X., Yang, Y., and Clifton, D. (2025). Optimization-Inspired Few-Shot Adaptation for Large Language Models. arXiv.
17. Li, Q., Guo, S., Chen, Y., Ji, C., Sheng, J., and Li, J. (2024). Uncertainty-Aware Relational Graph Neural Network for Few-Shot Knowledge Graph Completion. arXiv.10.2139/ssrn.4455564 ↗
18. Pandey, G., Contractor, D., and Joshi, S. (2022). Mix-and-Match: Scalable Dialog Response Retrieval Using Gaussian Mixture Embeddings, Association for Computational Linguistics.10.18653/v1/2022.findings-emnlp.239 ↗
19. Wang, Y., Chao, W.L., Weinberger, K.Q., and Van Der Maaten, L. (2019). SimpleShot: Revisiting Nearest-Neighbor Classification for Few-Shot Learning. arXiv.
20. Ding, N., Xu, G., Chen, Y., Wang, X., Han, X., Xie, P., Zheng, H.T., and Liu, Z. (2021). Few-NERD: A Few-Shot Named Entity Recognition Dataset, Association for Computational Linguistics.10.18653/v1/2021.acl-long.248 ↗
21. Breaking Away from AI: The Ontological and Ethical Evolution of Machine Learning10.1109/ACCESS.2025.3553032 ↗