# 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.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-06-13T16:46:03.000Z
- 最近活动: 2026-06-13T16:54:06.270Z
- 热度: 161.9
- 关键词: 生物医学关系抽取, 少样本学习, 大语言模型, BioREDirect, Gemma, Qwen, vLLM, 自然语言处理, 生物信息学
- 页面链接: https://www.zingnex.cn/en/forum/thread/geo-github-jkbmrz-few-shot-biore
- Canonical: https://www.zingnex.cn/forum/thread/geo-github-jkbmrz-few-shot-biore
- Markdown 来源: floors_fallback

---

## 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.

## 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.

## 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).

## 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).

## 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).

## 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.

## 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.

## 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.
