Zing Forum

Reading

Few-Shot Biomedical Relation Extraction: Can Large Language Models Replace Supervised Learning?

This article introduces an open-source project for few-shot biomedical relation extraction based on large language models, exploring the feasibility of using large language models as an alternative to supervised learning in the biomedical field where labeled data is scarce.

生物医学关系抽取少样本学习大语言模型BioREDirectGemmaQwenvLLM自然语言处理生物信息学
Published 2026-06-14 00:46Recent activity 2026-06-14 00:54Estimated read 6 min
Few-Shot Biomedical Relation Extraction: Can Large Language Models Replace Supervised Learning?
1

Section 01

Project Introduction

This article introduces the GitHub open-source project few-shot-biore (by author Jakob Mraz, released on June 13, 2026), which aims to explore the feasibility of using large language models (LLMs) as a replacement for supervised learning in few-shot biomedical relation extraction (BioRE) tasks. The related paper is "Few-Shot Biomedical Relation Extraction with Large Language Models: A Viable Alternative to Supervised Learning?" (Mraz et al., 2026). Project address: https://github.com/jkbmrz/few-shot-biore.

2

Section 02

Research Background and Motivation

Biomedical Relation Extraction (BioRE) is a key NLP application for identifying entity relations (e.g., gene-disease associations) from literature. Traditional supervised learning relies on large amounts of labeled data, but the biomedical field faces challenges such as high professional thresholds, expensive annotation costs, complex relations, and data privacy constraints, making it difficult to obtain large-scale labeled data. Therefore, researchers are exploring few-shot learning, and the few-shot capabilities of LLMs provide a possible alternative to supervised learning.

3

Section 03

Dataset and Task Definition

The project uses the BioREDirect dataset (sourced from PubMed abstracts, containing multiple entity/relation types in PubTator format). The tasks are divided into two paradigms: 1. Classification paradigm: Predict the relation of a single entity pair (e.g., the association between BRCA1 and breast cancer); 2. Generation paradigm: Extract all relation triples from text (e.g., aspirin relieves headaches, causes stomach discomfort).

4

Section 04

Technical Architecture and Implementation

Workflow: BioREDirect → parsed by parse.py → structured dataset → extracted by extract.py → results → evaluation. Supported models include Google's Gemma series (gemma-4-31B-it, etc.) and Alibaba's Qwen series (Qwen3.5-27B, etc.). Inference modes: Online (OpenAI-compatible API, suitable for quick verification), Offline (vLLM local inference, suitable for privacy/batch scenarios). Code structure: parse.py (data parsing), extract.py (core extraction), evaluate/performance.py (evaluation).

5

Section 05

Technical Highlights and Evaluation

Core highlights: 1. Few-shot prompt design (optimization of example selection, format, and context length); 2. Flexible inference backend (balances convenience and privacy); 3. Standardized evaluation process (supports micro/macro average metrics to ensure reproducibility).

6

Section 06

Research Significance and Implications

Contributions to BioNLP: Reduce annotation costs, quickly adapt to new relation types, and explore cross-domain transfer. Implications for LLM applications: Verify the few-shot capabilities of general LLMs in professional fields, the challenges of structured prediction tasks, and the empirical basis for prompt engineering.

7

Section 07

Limitations and Future Directions

Current limitations: Large model size (30B+ parameters), limited coverage of relation types, and only English support. Future directions: Explore small models (7B/13B), automatic prompt optimization, multi-task learning, and expand to clinical data.

8

Section 08

Project Conclusion

The few-shot-biore project provides a benchmark platform for BioRE. Through systematic evaluation of the few-shot performance of LLMs, it provides empirical answers to the question "Can LLMs replace supervised learning?" Regardless of the conclusion, this research has important guiding value for the future direction of BioNLP and is worth in-depth study by developers.