Enhancing Biomedical Question Answering with Parameter-Efficient Fine-Tuning and Hierarchical Retrieval Augmented Generation

Yichen Gao, Licheng Zong, Yu LiCLEF (Working Notes) 2024 · OpenReview

Abstract

Large Language Models (LLMs) face significant hurdles in specialized domains like biomedicine, where accuracy is paramount and hallucinations are costly. This paper introduces Corpus PEFT Searching (CPS), a system developed for the 12th BioASQ Challenge. CPS leverages Parameter-Efficient Fine-Tuning (PEFT) via Low-Rank Adaptation (LoRA) on a Llama2-7B-chat model, combined with a sophisticated hierarchical Retrieval-Augmented Generation (RAG) pipeline. Our approach demonstrates that a targeted 7B-parameter model can match or exceed the performance of general-purpose models like GPT-4 in medical question answering.

Introduction

The biomedical domain requires systems that can navigate vast amounts of technical literature to provide precise, evidence-based answers. The 12th BioASQ Challenge (Task 12b) evaluates these capabilities across three phases: document retrieval (Phase A), answer generation from provided snippets (Phase B), and end-to-end retrieval and generation (Phase A+). The CPS system was designed to address these tasks by integrating domain-specific fine-tuning with a robust retrieval strategy.

Methodology

Parameter-Efficient Fine-Tuning (PEFT)

To adapt a general-purpose LLM to the medical domain without the prohibitive cost of full retraining, we utilized LoRA (Low-Rank Adaptation). We fine-tuned the Llama2-7B-chat model on a corpus of biomedical question-answer pairs from the BioASQ training set. This allowed the model to learn specialized terminology and the expected format for medical answers, effectively adopting a "medical expert" persona.

Phase B pipeline showing the generation process using provided snippets and a LoRA fine-tuned Llama2 model.

Hierarchical Retrieval-Augmented Generation (RAG)

For the end-to-end task (Phase A+), we implemented a two-stage hierarchical retrieval strategy to manage the massive PubMed Central (PMC) corpus:

  1. Document Retrieval: We used BM25, a sparse keyword-based retriever, to identify the most relevant abstracts from the PMC database.
  2. Snippet Extraction: The retrieved abstracts were segmented into smaller chunks using a TextSplitter.
  3. Ensemble Retrieval: We employed an ensemble retriever combining BM25 with BGE (a dense semantic retriever) to select the most pertinent chunks from the segmented abstracts based on the query question.
  4. Generation: The selected chunks were provided as context to the fine-tuned Llama2 model to generate the final answer.
Phase A+ hierarchical RAG pipeline, detailing the two-stage retrieval and generation process.

Experimental Setup

The system was trained and evaluated using the following datasets:

  • BioASQ Task 12b Training Set: Approximately 5,049 QA pairs used for primary fine-tuning.
  • BioASQ Task 11b: Used for benchmarking and ablation studies (4,719 pairs for training, 90 for testing).
  • PubMed Central (PMC): The primary source for building retrieval indexes for Phase A and A+.

Results and Discussion

The CPS system demonstrated strong performance across the BioASQ tasks. On the Task 11b dataset, the CPS-B variant achieved an R-2 F1-score of 0.5581, significantly outperforming GPT-3.5-turbo (0.2999) and the BioASQ Baseline FS (0.2493). Notably, CPS-B also surpassed GPT-4 in terms of F1-score and SU4 metrics, despite GPT-4 having a slightly higher raw recall.

Key Insights

  • Contextual Importance: Providing relevant snippets improved performance by over 100% compared to zero-shot generation, confirming that retrieval is critical for reducing hallucinations.
  • Model Efficiency: A fine-tuned 7B model can outperform much larger general-purpose models in specialized tasks, provided it has access to high-quality domain-specific context.
  • Retrieval Quality: Ablation studies showed that "noise" (irrelevant snippets) significantly degrades answer quality, emphasizing the need for precise retrieval mechanisms.

Conclusion and Future Work

The CPS system highlights the potential of combining PEFT with hierarchical RAG for specialized QA tasks. Future work will focus on integrating more advanced dense retrievers, such as MedCPT, and exploring the benefits of scaling the base model to 13B or 70B parameters. Additionally, we aim to investigate more stable decoding strategies to mitigate the inherent randomness in LLM outputs.

Summary updated

BibTeX
@inproceedings{gao2024enhancing,
  author = {Yichen Gao and Licheng Zong and Yu Li},
  title = {{Enhancing Biomedical Question Answering with Parameter-Efficient Fine-Tuning and Hierarchical Retrieval Augmented Generation}},
  booktitle = {CLEF (Working Notes)},
  year = {2024},
  url = {https://openreview.net/forum?id=iA8A2Hd62Q},
}
Figure