Skip to main content
QUICK REVIEW

[Paper Review] Thinking about GPT-3 In-Context Learning for Biomedical IE? Think Again

Bernal Jiménez Gutiérrez, Nikolas McNeal|arXiv (Cornell University)|Mar 16, 2022
Topic ModelingComputer Science8 citations
TL;DR

This study systematically compares GPT-3 in-context learning with fine-tuning BERT-sized models on biomedical information extraction tasks (NER and RE) under a true few-shot setting. Despite optimizing GPT-3 with prompt engineering, kNN retrieval, and calibration techniques, fine-tuning smaller PLMs consistently outperforms in-context learning, especially as data scales, revealing fundamental limitations in handling null cases and low-resource scenarios.

ABSTRACT

The strong few-shot in-context learning capability of large pre-trained language models (PLMs) such as GPT-3 is highly appealing for application domains such as biomedicine, which feature high and diverse demands of language technologies but also high data annotation costs. In this paper, we present the first systematic and comprehensive study to compare the few-shot performance of GPT-3 in-context learning with fine-tuning smaller (i.e., BERT-sized) PLMs on two highly representative biomedical information extraction tasks, named entity recognition and relation extraction. We follow the true few-shot setting to avoid overestimating models' few-shot performance by model selection over a large validation set. We also optimize GPT-3's performance with known techniques such as contextual calibration and dynamic in-context example retrieval. However, our results show that GPT-3 still significantly underperforms compared to simply fine-tuning a smaller PLM. In addition, GPT-3 in-context learning also yields smaller gains in accuracy when more training data becomes available. Our in-depth analyses further reveal issues of the in-context learning setting that may be detrimental to information extraction tasks in general. Given the high cost of experimenting with GPT-3, we hope our study provides guidance for biomedical researchers and practitioners towards more promising directions such as fine-tuning small PLMs.

Motivation & Objective

  • To evaluate the practicality of GPT-3 in-context learning for biomedical information extraction (IE) tasks under realistic few-shot conditions.
  • To compare the few-shot performance of GPT-3 in-context learning against fine-tuning smaller, BERT-sized pre-trained language models (PLMs) on two core IE tasks: named entity recognition (NER) and relation extraction (RE).
  • To investigate whether recent optimization techniques—such as prompt design, kNN example retrieval, and contextual calibration—can close the performance gap between GPT-3 and fine-tuned PLMs in biomedical IE.
  • To analyze inherent limitations of in-context learning, particularly its struggle with the null class (e.g., sentences with no entities or relations), which may hinder general IE performance.
  • To provide actionable guidance for biomedical researchers and practitioners on cost-effective, data-efficient NLP solutions, favoring fine-tuning over in-context learning for current biomedical IE needs.

Proposed method

  • Adopted the true few-shot setting (Perez et al., 2021) to avoid overestimation by using cross-validation on the 100-shot training set for model and prompt selection, rather than relying on large validation sets.
  • Designed systematic prompt templates for NER and RE by reformulating tasks as sequence-to-sequence generation, using structured formats with task instructions, sentence inputs, and example demonstrations.
  • Implemented a k-nearest neighbors (kNN) module to dynamically retrieve the most relevant in-context examples based on sentence embeddings, improving few-shot generalization.
  • Applied logit biases in NER to constrain output tokens to only those present in the input sentence, reducing hallucination and improving token-level accuracy.
  • Used contextual calibration (Zhao et al., 2021) in RE to reduce model bias toward specific relations, improving fairness and reliability in relation prediction.
  • Conducted ablation studies to validate the effectiveness of each optimization technique, including prompt design, retrieval, and calibration, on GPT-3’s in-context learning performance.

Experimental results

Research questions

  • RQ1Does GPT-3 in-context learning outperform fine-tuned BERT-sized PLMs on biomedical NER and RE tasks under a true few-shot setting?
  • RQ2To what extent do recent optimization techniques—such as prompt design, kNN retrieval, and contextual calibration—improve GPT-3’s in-context learning performance for biomedical IE?
  • RQ3How does the performance of in-context learning scale with increasing training data, and how does it compare to fine-tuned models in this regime?
  • RQ4What are the inherent limitations of in-context learning in biomedical IE, particularly regarding the handling of null cases (e.g., entity-less sentences or relation-less pairs)?
  • RQ5Can in-context learning be a viable, cost-effective alternative to fine-tuning for low-resource biomedical information extraction tasks?

Key findings

  • Fine-tuning BERT-sized PLMs consistently outperforms GPT-3 in-context learning across all evaluated biomedical NER and RE datasets, even when GPT-3 is optimized with advanced techniques.
  • GPT-3 in-context learning shows significantly lower performance gains when more training data becomes available, while fine-tuned models exhibit steady and reliable improvements with data scale-up.
  • In-context learning struggles with the null class: it frequently generates false positives in NER (e.g., predicting entities in entity-less sentences) and in RE (e.g., predicting relations where none exist), indicating a fundamental flaw in zero-shot generalization.
  • The performance gap between GPT-3 in-context learning and fine-tuned models remains substantial even after applying prompt optimization, kNN retrieval, and contextual calibration, suggesting that current techniques are insufficient to close the gap.
  • Ablation studies confirm that each optimization technique (prompt design, retrieval, calibration) improves GPT-3’s performance, but collectively they fail to match the robustness and accuracy of fine-tuned smaller PLMs.
  • The study provides empirical evidence that fine-tuning smaller PLMs remains a more practical, reliable, and cost-effective strategy than GPT-3 in-context learning for biomedical IE in low-resource settings.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.