Unlocking Biological Workflows for Robust Protein-Text Question Answering: A Dual-Dimensional RAG Framework

Li Ding, Duanyu Feng, Chen Huang, Yangshuai Wang, Yang Li, Wenqiang Lei, See-Kiong NgarXiv 2026 · DOI

TL;DR

This paper introduces 2D-ProteinRAG, a novel framework that bridges the gap between complex protein sequence data and natural language question answering. By integrating established biological tools like BLAST with a unique dual-dimensional filtering strategy, it significantly improves the accuracy and robustness of protein function prediction, especially for novel or out-of-distribution proteins.

What Problem Does This Paper Address?

Interpreting the function of protein sequences using natural language is crucial for biological discovery, from understanding molecular mechanisms to drug development. While Large Language Models (LLMs) show promise, they often struggle with the sheer complexity and vastness of biological data. Existing methods, even those using Retrieval-Augmented Generation (RAG), often rely on curated, static datasets that don't reflect how biologists actually work. This leads to two major issues: 1) models can't effectively distill fine-grained, task-relevant information from noisy retrieval results, and 2) they perform poorly when encountering proteins not seen in their training data (Out-of-Distribution or OOD scenarios). This paper aims to solve these problems by mimicking a biologist's workflow to extract high-quality, relevant information for protein-text question answering.

Methods

The core innovation of 2D-ProteinRAG lies in its two-phase filtering strategy, applied after an initial raw homology retrieval using BLAST:

  • Phase I: Raw Homology Retrieval: Instead of relying on pre-curated datasets, the framework directly uses BLAST to query the comprehensive UniProt database. This ensures access to the entire known biological universe, inherently addressing OOD challenges. The raw output is a collection of homologous sequences and their associated annotations.
  • Phase II: Horizontal Filtering (Fine-grained Attribute Alignment): This phase tackles the "granularity mismatch" between exhaustive database entries and specific user queries. It employs an "intent-aware" filter, trained via distillation, that learns to identify and retain only the biological attributes (like "Molecular Function" or "Subcellular Location") relevant to the user's instruction. This mimics an expert's ability to selectively focus on task-specific evidence.
  • Phase III: Vertical Filtering (Homology-based Semantic Denoising): This phase addresses conflicting or redundant information that can arise from diverse homologous sequences. It uses hierarchical clustering to group semantically similar descriptions and then anchors the selection to the cluster most consistent with the structure of the top-ranked homolog. This "structure determines function" principle helps resolve contradictions and noise.

The final, refined context is then fed to an LLM for generating the answer.

Datasets

The paper uses two primary datasets for evaluation:

  • Mol-Instructions: A standard, in-distribution (ID) benchmark for protein-text QA, containing expert-curated sequence-instruction pairs.
  • Prot-Inst-OOD: A more challenging out-of-distribution (OOD) benchmark designed to prevent data leakage by enforcing strict constraints on sequence homology between training and testing proteins.

The retrieval component uses the Swiss-Prot subset of the UniProtKB database.

Key Insights and Ideas

  • Biologist Workflow as a Blueprint: The paper argues that mimicking the established biological workflow (BLAST for homology search, followed by expert reasoning to filter and synthesize information) is key to robust protein-text QA, especially for OOD scenarios.
  • Dual-Dimensional Filtering is Crucial: Neither horizontal (intent alignment) nor vertical (homology denoising) filtering alone is sufficient. Their synergistic combination is essential for distilling high-fidelity information from noisy retrieval results.
  • Open-World Retrieval for OOD Robustness: Directly querying large, raw biological databases (like UniProt) via BLAST, rather than relying on static, curated subsets, is a powerful strategy for handling novel proteins.
  • Intent-Awareness is Key: The horizontal filter's ability to understand the user's intent and match it to relevant biological attributes is critical for pruning irrelevant metadata.

Key Results

  • State-of-the-Art Performance: 2D-ProteinRAG consistently achieves state-of-the-art (SOTA) performance across multiple tasks (General Description, Protein Function, Catalytic Activity, Domain/Motif) on both in-distribution and OOD benchmarks.
  • Significant OOD Improvement: On the challenging Prot-Inst-OOD dataset, 2D-ProteinRAG significantly outperforms fine-tuned baselines and other RAG methods, showing improvements of up to 40 points in key metrics.
  • Robustness to Low Homology: Even under strict homology constraints (e.g., <40% sequence identity), 2D-ProteinRAG maintains robust performance, whereas naive BLAST retrieval collapses to near-zero scores.
  • Denoising Efficacy: The framework demonstrates a nearly four-fold improvement in E-BLEU4 scores for tasks like Protein Function compared to a naive BLAST baseline, highlighting the effectiveness of its denoising strategy.

Limitations and Future Work

  • Inference Latency: The retrieval and filtering steps introduce additional computational overhead compared to purely parametric LLMs, leading to higher inference latency.
  • Hallucination Risks: While RAG mitigates hallucinations, there's still a residual risk of generating factually incorrect descriptions, necessitating expert verification for critical applications.
  • Future Work: The paper suggests further investigation into optimizing retrieval context size (k) for different task complexities and exploring more advanced teacher models for distillation. The authors also highlight the need for continued research into robust protein analysis tools for real-world scientific scenarios.

Summary updated

Abstract

Protein-Text Question Answering (QA) is crucial for interpreting biological sequences through natural language. The integration of Large Language Models (LLMs) with Retrieval-Augmented Generation (RAG) that efficiently leverages biological databases and facilitates reasoning offers a potent approach for it. However, constrained by the standard RAG pipeline, these models often rely on curated, static datasets instead of expert-proven biological workflows, lacking the fine-grained information processing and struggling to generalize to novel (OOD) proteins. To bridge this gap, we propose 2D-ProteinRAG, a novel framework that empowers LLMs to operate within the gold-standard biological research workflow (BLAST). To further extract high-quality information from noisy retrieval contexts, we introduce a dual-dimensional (2D) filtering strategy following the expert analytical paradigms. Horizontal Fine-grained Attribute Alignment utilizes a lightweight, intent-aware discriminative filter to prune irrelevant metadata and align database entries with specific user queries. Vertical Homology-based Semantic Denoising resolves functional contradictions and redundancy across multiple homologs via hierarchical clustering. Extensive evaluations on both In-Distribution and diverse biological OOD benchmarks demonstrate that 2D-ProteinRAG consistently achieves state-of-the-art performance, outperforming fine-tuned baselines and other RAG methods. Our results validate the framework's robustness and scalability, providing a practical solution for interpreting protein functions in real-world scientific scenarios.
BibTeX
@misc{ding2026unlocking,
  author = {Li Ding and Duanyu Feng and Chen Huang and Yangshuai Wang and Yang Li and Wenqiang Lei and See-Kiong Ng},
  title = {{Unlocking Biological Workflows for Robust Protein-Text Question Answering: A Dual-Dimensional RAG Framework}},
  year = {2026},
  eprint = {2605.17261},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.17261},
}
Figure