Manuscript Offprint

arXiv:2608.25466

Homo-RAG: Homology-Guided Retrieval-Augmented Generation for Cross-Species Gene Function Prediction

Azrin Sultana

Abstract

The functional annotation of genes in non-model organisms remains a significant challenge in computational biology, with 20–70% of sequenced genes lacking characterized functions, while traditional homology-based methods are costly and heavily dependent on high sequence similarity. This study presents Homo-RAG, a framework that employs large language model-based gene function prediction through homology-guided multi-hop retrieval and evidence-aware ranking, exploiting biological relationships between zebrafish and human orthologs to guide evidence acquisition from ZFIN, UniProt, and PubMed using hybrid dense and lexical retrieval. An Evidence Confidence Score (ECS) combines semantic relevance, entity matching, orthology information, source reliability, and literature-association signals to refine the ranking of retrieved evidence. Extensive evaluation across 150 queries and 7,200 retrieved documents demonstrates that optimal evidence weighting at λ=0.50\lambda=0.50 improves NDCG@10 to 0.9879 and MRR to 0.99, while retrieving relevant evidence for 99.33% of queries with 80% of documents being query-exclusive, confirming that evidence quality complements rather than replaces retrieval relevance. These findings establish Homo-RAG as a practical, robust foundation for reliable, evidence-grounded gene function prediction in understudied organisms, addressing critical limitations of conventional annotation pipelines while identifying clear paths for future feature and attribution improvements.

Keywords: large language model, retrieval augmented generation, query reformation, multihop RAG

1 Introduction

Proteins are essential to all biological activities in tissues and cells to determine physical and functional traits. Studying protein function is important for understanding unique ecological adaptations, evolutionary biology, and species specialization [1]. Advances in gene sequencing technologies have accelerated the generation of genomic data, yielding millions of DNA and protein sequences. However, the functional characteristics of many of these genes remain unexplored, with estimates ranging from 20 to 70% [2, 3]. Although homology-based methods have achieved considerable success, they have several important limitations. For example, popular UniProtKB databases include SWISS-PROT has less than 1% of UniProt protein sequences computational annotations that experts have validated [4]. About 30–40% of computational and manual annotations contain errors. Because shared ancestry and conserved biological processes allow genetic information to be transferred, compared, and used to infer functions between species [5], model organisms can help predict the functions of genes with insufficient documentation. Conserved genes and orthologous relationships can provide informative evidence for functional inference across species, although functional conservation is not guaranteed solely by sequence similarity. Analyzing these genetic similarities allows scientists to predict gene function even when empirical data for a particular non-model organism are insufficient [1].

Recent advances in sequence-based methods have expanded their applicability beyond proteins with very high sequence similarity. These methods compare unknown gene sequences against well-annotated reference databases and transfer functional annotations from homologous genes to query sequences [6]. Over the years, the BLAST algorithm has been applied to perform DNA and protein sequence similarity searches to identify local similarity between a "query" sequence and a database of "subject" sequences, thereby inferring evolutionary relationships [7, 8]. Another category comprises methods that use sequence information and employ information on a protein's three-dimensional biologically active structure [9]. However, it is arduous to obtain in the wet lab and is unavailable for many proteins. Yet another category comprises methods that use information on known protein-protein interactions, as encapsulated in protein-protein interaction networks. A profile hidden Markov model is generated from an alignment of multiple sequences and thus inherits more information than a single-sequence model [10]. Therefore, sequence alignment tools such as BLAST, profile-based methods, orthology-detection algorithms, conserved protein domain analysis, and phylogenetic inference have become standard tools for functional annotation. Their effectiveness has made them the foundation of automated annotation pipelines used by major biological databases. Nevertheless, they are very time-consuming and expensive due to the sophisticated laboratory equipment and costly chemical reagents.

Recent advances in artificial intelligence, particularly Large Language Models (LLMs), have demonstrated remarkable capabilities in understanding texts, synthesizing knowledge, answering domain-specific questions, and generating coherent explanations [11][11]. They have also been widely adopted to address scientific problems in other areas, including gene-oriented analysis [12][12]. Applying LLMs to gene-related analysis requires accurate, current gene information. New species and discoveries, along with their genetic structures and evolving species genes, are changing necessities, requiring recent, up-to-date knowledge [13]. Because genetic knowledge is vast and intricate, the computational resources and financial costs required to fine-tune existing LLMs to incorporate external knowledge bases pose significant challenges. Retrieval-augmented generation (RAG) techniques have proven effective at integrating up-to-date information, mitigating hallucinations, and enhancing response quality, particularly in specialized domains, by dynamically retrieving relevant information from external databases and integrating it [14, 15]. This enhances the accuracy and credibility of knowledge generation for knowledge-intensive tasks and enables continuous knowledge updates and information integration. This approach is particularly well suited to addressing the complexities of gene-related inquiries. In this work, we aim to enhance LLMs' ability to address gene-related problems by effectively integrating external knowledge bases via RAG. Unlike conventional sequence-similarity-based annotation, the proposed framework uses curated orthology relationships as an explicit retrieval constraint, allowing functional evidence associated with a better-characterized ortholog to guide subsequent literature retrieval.

To address these challenges, this study proposes Homo-RAG framework for gene function prediction in organisms that exploits the biological relationship between orthologs of two species to guide evidence retrieval. The framework first identifies the query gene and its corresponding ortholog, then retrieves curated gene knowledge from UniProt, including protein descriptions, functional annotations, pathway information, and related literature identifiers. These newly discovered biological concepts are subsequently used to formulate an adaptive retrieval query, enabling the literature search to become increasingly specific as additional biological knowledge is obtained. Therefore, the framework enables an effective multi-hop retrieval system that retrieves information across multiple biological relationships and adapts subsequent searches based on knowledge discovered during earlier retrieval stages. The proposed framework further introduces biological evidence-aware ranking to address another important limitation of conventional RAG. Ranking incorporates semantic relevance, gene matching, ortholog matching, source reliability, and literature-association signals. This enables the system to prioritize evidence that is more directly connected to the biological hypothesis being investigated. The system first retrieves a larger candidate set and then refines it through evidence-aware ranking before supplying the most informative evidence to the LLM. This separation between candidate retrieval and biological evidence selection allows the system to preserve retrieval recall while reducing irrelevant evidence in the final generation context.

The main contribution of the study:

  • Multi-hop retrieval for exploiting relationships among genes, orthologs, functional annotations, and supporting biomedical literature.

  • Query reformulation after each retrieval to reduces the semantic and lexical mismatch need and the heterogeneous biological evidence distributed across gene, orthology, functional annotation, and literature collections

  • A dedicated evidence feature engineering layer analyzes retrieved documents using source reliability and other available evidence-level features, distinguishing retrieval relevance from the intrinsic reliability of supporting biological evidence.

• Evidence-based ranking through Evidence Confidence Scoring: Rather than relying exclusively on retrieval similarity to prioritize biologically trustworthy supporting documents.

References (41)