Manuscript Offprint

arXiv:2610.03029

SoftGene: Protein Language Model-Enhanced Soft Prompting for Interpretable Gene Set Annotation

Drew Ross, Arya Hadizadeh Moghaddam, Dongjie Wang, Xiaoyu Zhang, Zijun Yao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Gene set analysis is a cornerstone of functional genomics, yet it remains labor-intensive and heavily dependent on manual curation and expert biological interpretation. While Large Language Models (LLMs) have emerged as powerful tools for genomic reasoning and annotation, most existing approaches rely on symbolic gene names and fail to capture domain-specific biological structure, particularly protein sequence information that governs molecular activity, interactions, and downstream gene function. In this work, we propose SoftGene, a novel framework for LLM-based gene set annotation that leverages the hierarchical structure of gene sets. First, we use a hierarchical attention-based encoder built on ESM, a protein language model, to represent each gene set using protein-level amino acid sequence information. Second, we construct a hybrid prompting scheme that combines soft prompts derived from gene set embeddings with hard prompts containing auxiliary context generated by an LLM, and feed the resulting prompt into a local LLM for annotation. We evaluate our framework on two benchmark datasets: Gene Ontology (GO) and the Molecular Signatures Database (MSigDB). Our results show that integrating protein-sequence representations with textual context improves gene set annotation overall, while per-domain analyses reveal that the contribution of protein embeddings varies across biological domains.

1 Introduction

Gene sets represent cohorts of functionally related genes that collectively drive specific biological pathways and cellular processes (Ashburner et al., 2000). Generating gene set annotations, which are concise descriptions that delineate shared functional behaviors and metabolic roles, is a fundamental task in modern genomics (Ji et al., 2026). As sequencing continues to reveal novel gene associations, the ability to rapidly and accurately annotate these sets is essential for translating raw data into biological insights (Salzberg, 2019).

Traditionally, gene set annotation has relied on expert curation or statistical enrichment methods, such as Over-Representation Analysis (ORA) (Beissbarth and Speed, 2004) and Gene Set Enrichment Analysis (GSEA) (Subramanian et al., 2005). However, manual annotation is a time-consuming process that cannot scale with the current pace of data generation (Baumgartner Jr et al., 2007). Furthermore, existing automated methods are inherently limited by their dependence on curated databases, which are often incomplete or biased toward well-studied genes and biological processes (Stoeger et al., 2018; Haynes et al., 2018).

The recent emergence of Large Language Models (LLMs) has introduced a promising paradigm for a wide range of biological and biomedical tasks (Luo et al., 2022; Jin et al., 2024; Ferruz et al., 2022) including automated gene annotation (Wang et al., 2024; Joachimiak et al., 2024). However, current LLM-based approaches often overlook the domain-specific biological structure of constituent proteins. Protein-sequence representations can provide evolutionary and structural signals such as subcellular localization (Thumuluri et al., 2022), interaction-relevant interfaces (Sun et al., 2025), and structural properties (Simon and Zou, 2025) that may complement symbolic gene information (Anfinsen, 1973). The utility of these sequence-derived signals, however, can vary across biological domains. Moreover, hard-prompting strategies typically treat genes as semantic tokens, and LLMs remain prone to hallucination (Kalai et al., 2025), which reduces their reliability for this task. Lastly, although many LLM approaches provide narrative explanations through generative reasoning (Hu et al., 2025), they still lack a concrete decision path showing how specific genes or protein domains contribute to the predicted annotation.

In this paper, we address these limitations by

∗^{*}Corresponding author.

Figure

Figure 1: High-level overview of the model architecture. The proposed approach combines a sequence-level pathway that encodes amino acid information into soft prompt tokens with a textual pathway that provides high-level functional context from a large language model, enabling the generation of descriptive gene set annotations optimized via supervision against ground-truth labels.

presenting a soft-prompting framework for interpretable gene set annotation. An overview of the framework is shown in Figure 1. Our main contributions are as follows:

• We incorporate the embeddings from a pretrained protein language model (PLM) and introduce a hierarchical attention encoder that learns to weigh the relative importance of biological features and aggregate them into a comprehensive representation of gene sets.

• We propose a conditioning scheme that bridges biological sequence data and natural language, enabling an LLM to generate annotations informed by both text-based context and protein-sequence-derived representations.

• We provide concrete interpretability by leveraging the hierarchical attention mechanism to quantify the relative importance of biological features contributing to each annotation. This yields explicit, feature-level explanations grounded in the input data, rather than relying solely on implicit reasoning within the language model.

• We evaluate our framework on two widely used benchmark datasets: Gene Ontology (GO) and MSigDB. Results demonstrate superior performance over existing baselines across metrics.

References (26)