Few-Shot Learning for Clinical Natural Language Processing Using Siamese Neural Networks: Algorithm Development and Validation Study
- PMID: 38875537
- PMCID: PMC11041484
- DOI: 10.2196/44293
Few-Shot Learning for Clinical Natural Language Processing Using Siamese Neural Networks: Algorithm Development and Validation Study
Abstract
Background: Natural language processing (NLP) has become an emerging technology in health care that leverages a large amount of free-text data in electronic health records to improve patient care, support clinical decisions, and facilitate clinical and translational science research. Recently, deep learning has achieved state-of-the-art performance in many clinical NLP tasks. However, training deep learning models often requires large, annotated data sets, which are normally not publicly available and can be time-consuming to build in clinical domains. Working with smaller annotated data sets is typical in clinical NLP; therefore, ensuring that deep learning models perform well is crucial for real-world clinical NLP applications. A widely adopted approach is fine-tuning existing pretrained language models, but these attempts fall short when the training data set contains only a few annotated samples. Few-shot learning (FSL) has recently been investigated to tackle this problem. Siamese neural network (SNN) has been widely used as an FSL approach in computer vision but has not been studied well in NLP. Furthermore, the literature on its applications in clinical domains is scarce.
Objective: The aim of our study is to propose and evaluate SNN-based approaches for few-shot clinical NLP tasks.
Methods: We propose 2 SNN-based FSL approaches, including pretrained SNN and SNN with second-order embeddings. We evaluate the proposed approaches on the clinical sentence classification task. We experiment with 3 few-shot settings, including 4-shot, 8-shot, and 16-shot learning. The clinical NLP task is benchmarked using the following 4 pretrained language models: bidirectional encoder representations from transformers (BERT), BERT for biomedical text mining (BioBERT), BioBERT trained on clinical notes (BioClinicalBERT), and generative pretrained transformer 2 (GPT-2). We also present a performance comparison between SNN-based approaches and the prompt-based GPT-2 approach.
Results: In 4-shot sentence classification tasks, GPT-2 had the highest precision (0.63), but its recall (0.38) and F score (0.42) were lower than those of BioBERT-based pretrained SNN (0.45 and 0.46, respectively). In both 8-shot and 16-shot settings, SNN-based approaches outperformed GPT-2 in all 3 metrics of precision, recall, and F score.
Conclusions: The experimental results verified the effectiveness of the proposed SNN approaches for few-shot clinical NLP tasks.
Keywords: FSL; NLP; SNN; Siamese neural network; few-shot learning; natural language processing; neural networks.
©David Oniani, Premkumar Chandrasekar, Sonish Sivarajkumar, Yanshan Wang. Originally published in JMIR AI (https://ai.jmir.org), 04.05.2023.
Conflict of interest statement
Conflicts of Interest: None declared.
Figures
Similar articles
-
An Empirical Evaluation of Prompting Strategies for Large Language Models in Zero-Shot Clinical Natural Language Processing: Algorithm Development and Validation Study.JMIR Med Inform. 2024 Apr 8;12:e55318. doi: 10.2196/55318. JMIR Med Inform. 2024. PMID: 38587879 Free PMC article.
-
A large language model-based generative natural language processing framework fine-tuned on clinical notes accurately extracts headache frequency from electronic health records.Headache. 2024 Apr;64(4):400-409. doi: 10.1111/head.14702. Epub 2024 Mar 25. Headache. 2024. PMID: 38525734 Free PMC article.
-
Multifaceted Natural Language Processing Task-Based Evaluation of Bidirectional Encoder Representations From Transformers Models for Bilingual (Korean and English) Clinical Notes: Algorithm Development and Validation.JMIR Med Inform. 2024 Oct 30;12:e52897. doi: 10.2196/52897. JMIR Med Inform. 2024. PMID: 39475725 Free PMC article.
-
Few-shot learning for medical text: A review of advances, trends, and opportunities.J Biomed Inform. 2023 Aug;144:104458. doi: 10.1016/j.jbi.2023.104458. Epub 2023 Jul 23. J Biomed Inform. 2023. PMID: 37488023 Free PMC article. Review.
-
AMMU: A survey of transformer-based biomedical pretrained language models.J Biomed Inform. 2022 Feb;126:103982. doi: 10.1016/j.jbi.2021.103982. Epub 2021 Dec 31. J Biomed Inform. 2022. PMID: 34974190 Review.
Cited by
-
Automated Extraction of Key Entities from Non-English Mammography Reports Using Named Entity Recognition with Prompt Engineering.Bioengineering (Basel). 2025 Feb 10;12(2):168. doi: 10.3390/bioengineering12020168. Bioengineering (Basel). 2025. PMID: 40001686 Free PMC article.
-
A novel dual embedding few-shot learning approach for classifying bone loss using orthopantomogram radiographic notes.Head Face Med. 2025 Jul 11;21(1):49. doi: 10.1186/s13005-025-00528-3. Head Face Med. 2025. PMID: 40640850 Free PMC article.
-
Digital transformation with clinical alerts and personalized care systems in an integrated value based model.NPJ Digit Med. 2025 Jul 8;8(1):415. doi: 10.1038/s41746-025-01838-1. NPJ Digit Med. 2025. PMID: 40629133 Free PMC article.
-
Learning to explain is a good biomedical few-shot learner.Bioinformatics. 2024 Oct 1;40(10):btae589. doi: 10.1093/bioinformatics/btae589. Bioinformatics. 2024. PMID: 39360976 Free PMC article.
-
Prediction of liquid-phase separation proteins using Siamese network with feature fusion.Brief Bioinform. 2025 Jul 2;26(4):bbaf393. doi: 10.1093/bib/bbaf393. Brief Bioinform. 2025. PMID: 40794947 Free PMC article.
References
-
- Sejnowski TJ. The unreasonable effectiveness of deep learning in artificial intelligence. Proc Natl Acad Sci U S A. 2020 Dec 01;117(48):30033–30038. doi: 10.1073/pnas.1907373117. https://europepmc.org/abstract/MED/31992643 1907373117 - DOI - PMC - PubMed
-
- Brigato L, Iocchi L. A close look at deep learning with small data. 25th International Conference on Pattern Recognition (ICPR); January 10-15, 2021; Milan, Italy. 2021. - DOI
-
- Mo Y, Xiaoxiao G, Jinfeng Y, Shiyu C, Saloni P, Yu C, Gerald T, Haoyu W, Bowen Z. Diverse few-shot text classification with multiple metrics. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers); June 1-6, 2018; New Orleans, Louisiana, USA. 2018. - DOI
-
- Emmanouil M, Sepideh M, Alessandro B, Selene B, Robert JS. Give it a shot: Few-shot learning to normalize ADR mentions in social media posts. Fourth Social Media Mining for Health Applications (#SMM4H) Workshop & Shared Task; August 2, 2019; Florence, Italy. 2019. - DOI
-
- Zhipeng B, Yu-Xiong W, Martial H. Bowtie networks: Generative modeling for joint few-shot recognition and novel-view synthesis. International Conference on Learning Representations; May 3-7, 2021; Virtual. 2021. - DOI
LinkOut - more resources
Full Text Sources