arXiv:2609.02473cs.CLSep 2026

Manuscript Offprint

arXiv:2609.02473

Learning to Fuse LLMs with Ontology Rankers for Rare-Disease Diagnosis

Zhaoyang Jiang, Zhizhong Fu, Yunsoo Kim, Zicheng Li, Xuanqi Peng, Fei Teng, Jiacong Mi, Honghan Wu

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

Abstract

Ontology rankers remain useful for rare-disease diagnosis because each candidate can be traced to matched patient phenotypes. Large language models (LLMs) can generate differential diagnoses from the same patient description, but their predictions lack an equally clear evidence trail. Rather than asking which system should replace the other, we ask whether an LLM can improve the ranker without giving up its evidence. Our behavior-based fusion model examines the two ranked lists, their agreement, and the ontology support behind each candidate, and learns how much to rely on each system for the individual case. Before comparison, we remove a documented test-set leakage pathway caused by benchmark cases and ontology annotations being derived from the same publications. Across eight open LLMs, fusion improves Phenomizer Recall@1 by 7.86 percentage points on Phenopacket Store and 20.18 points on RAMEDIS. When paired with DeepSeek-V4-Flash through an API, a fusion model trained only on the other LLMs improves Recall@1 from 0.1657 to 0.2176, a 5.19-point gain, without retraining. For 90.8% of correct fused diagnoses, the disease retains candidate-level ontology evidence that can be inspected. These results show that LLMs can strengthen an established diagnostic tool without discarding the structured evidence that makes it useful.

1 Introduction

Rare-disease diagnosis often begins with a list of findings rather than a familiar disease name. Phenotype tools such as Exomiser (Robinson et al.,

2014), LIRICAL (Robinson et al., 2020), and Phenomizer (Köhler et al., 2009) compare those findings with disease profiles in the Human Phenotype Ontology (HPO) (Köhler et al., 2021) and return a ranked differential diagnosis. Their value is not limited to the ranking. A clinician can inspect the HPO terms supporting each candidate and, for Phenomizer, the statistical strength of the match. This evidence remains important in clinical decision support, where clinicians need to examine the basis for a recommendation (Amann et al., 2020).

The arrival of LLMs has made it possible to produce a differential diagnosis directly from clinical text or HPO terms, drawing on knowledge beyond a fixed curated resource. Yet the strongest structured comparisons have favored classical tools. A large systematic benchmark reports Exomiser ahead of every one of seven LLMs across accuracy metrics and clinical subgroups (Reese et al., 2026), and prompt-only LLMs also trail established phenotype pipelines in related rare-disease gene prioritization (Lee et al., 2026). LLM output introduces a second concern. Medical models can elaborate fabricated clinical details (Omar et al., 2025), the medical hallucination literature identifies factual reliability as a persistent problem (Zhu et al., 2025), and verbal confidence systematically overstates diagnostic reliability (Savage et al., 2025). A bare LLM ranking also lacks the independently computed HPO matches and statistical score supplied by an ontology tool. On the surface, classical systems seem to offer both greater accuracy and a more auditable decision path.

These findings establish the continuing strength of classical pipelines, but they do not determine how much a ranker backed by the HPO annotation database (HPOA) benefits from the construction

Corresponding author.

of a particular benchmark. Phenopackets are structured patient records, many curated from published case reports. HPOA is curated from the same literature. The same paper can therefore supply both a test patient's findings and the phenotype evidence attached to that patient's confirmed disease in the knowledge base. We call this publication-source overlap.

Because both resources record publication provenance, we remove any phenotype relationship whose only supporting source is the test case's paper before rerunning the unchanged ontology ranker. After this correction, the ranker and LLM show complementary strengths rather than a simple winner.

This motivates a different role for the LLM. It need not replace the ontology tool, because the two systems fail for different reasons and can supply what the other lacks. Recent work already shows the value of this combination. LA-MARRVEL improves a phenotype-driven gene ranker with language-aware reranking (Lee et al., 2026), while DeepRare integrates LLM reasoning with specialized tools and traceable external evidence (Zhao et al., 2026). Most directly, Elmofty and Leser (2026) find complementary correct diagnoses from ontology retrieval and unrestricted LLM generation on every rare-disease benchmark they test. Their experiments also expose the unresolved step. They call cases whose correct diagnosis falls outside the retriever's candidate set non-retrievable, a hard ceiling for any method using that pool. They explicitly leave a learned router using case characteristics as the next step. Complementary answers are available, but identifying which one to use on a new case remains unresolved.

We learn a case-level decision rule. The LLM diagnoses independently rather than reordering the ontology list, and a small behavior-based gate assigns case-specific weights before combining the union of both outputs. It observes only their behavior: how clearly the leading diagnoses stand out, whether the lists agree, how well patient findings match the candidates, and how much ontology knowledge is available for them. The gate receives neither model identity nor a model-specific representation. During training, we exclude the target LLM together with every other model from its backbone family. It can therefore be applied to a newly introduced LLM without first collecting labels for that model, allowing the pipeline to adopt a stronger diagnostic model while retaining access to candidate-level ontology evidence.

Code is available at https://github.com/Anonymous-Awesome-Submissions/PhenoGate.

References (22)