arXiv is now an independent nonprofit! Learn more
License: CC BY 4.0
arXiv:2609.00256v2 [cs.CL] 11 Sep 2026

NSIDDx: A Design Framework for Neuro-Symbolic, Practitioner-First
Differential Diagnosis in Low-Resource Settings

Aarav Singh Affiliation: IIIT Naya Raipur Email: aarav24101@iiitnr.edu.in
Abstract

LLM-based diagnostic systems achieve high semantic accuracy on benchmarks, but open-ended evaluation on clinically uncommon presentations reveals a systematic gap between headline accuracy and verifiable clinical reliability. We evaluate an LLM+rare-disease-RAG pipeline across two cohorts and show that the paradigm produces confident outputs that are frequently unverifiable and systematically resistant to clinician interrogation. We present NSIDDx (Neuro-Symbolic Integrated Differential Diagnosis System), a design framework arguing that DDx systems in low-resource settings must treat the clinician as an active reasoning agent. We instantiate this through a neuro-symbolic pipeline with ternary symptom encoding, contradiction detection, audit strings, and practitioner override — running offline on consumer hardware. We distill five design principles for clinician-in-the-loop clinical NLP and invite the prospective studies needed to validate the claim at scale.

1 Introduction

Differential diagnosis is among the most cognitively demanding tasks in clinical medicine. A general practitioner must retrieve relevant disease knowledge, weigh present and absent symptoms, consider rare conditions, and produce a reasoned conclusion — often in under fifteen minutes without specialist support. In low-resource settings, this load falls on a single practitioner frequently without any decision support tool. They do not need a system that is right eighty percent of the time if they cannot tell which twenty percent to distrust. They need a practitioner-first design whose reasoning they can follow, augment, and whose uncertainty is surfaced rather than concealed.

Large language models have shown strong performance on clinical benchmarks (Singhal et al., 2023; Nori et al., 2023), yet the clinician receiving an LLM-based diagnostic output gets an answer, not a reasoning process they can interrogate, modify, or reject on clinical grounds — a limitation that persists even in KG-grounded pipelines (Chandak et al., 2023; Gargano et al., 2024; Wang et al., 2025b) where the graph informs generation but remains invisible to the clinician. Singhal et al. (2023) themselves note that strong benchmark numbers conceal key gaps when models are evaluated by clinicians rather than automated metrics — a finding our open-ended evaluation on 750 CUPCase cases independently reproduces: 75.2% semantic accuracy at DDx@5 collapses to 6.6% exact match, and 83.5% of rare scanner outputs carry no tokenically verifiable (verifiable by words (token) overlapping between disease names) relationship to the ground-truth diagnosis. The clinical decision support literature consistently identifies automation bias and alert fatigue as major barriers to adoption (Goddard et al., 2012). This is not a failure of accuracy; it is a failure of design philosophy.

Our Position.

We argue that for low-resource clinical settings, the most critical design constraint for diagnostic AI is not accuracy alone, but tractability of disagreement: a system whose reasoning is transparent, auditable, and modifiable by the clinician may in practice be more useful than a more accurate system whose failures are invisible — because it invites collaboration rather than anchoring.

This paper presents NSIDDx, a neuro-symbolic differential diagnosis pipeline built around that philosophy. NSIDDx uses a large language model for what it does well — synthesising clinical narratives, generating structured reasoning chains, producing readable explanations — while independently validating that reasoning through a symbolic layer grounded in HPO/MONDO (Gargano et al., 2024) and PrimeKG (Chandak et al., 2023). The practitioner can read the Propositional Logic (PL) audit string, inspect the graph, and disagree: they can add a symptom the model missed, remove a candidate they consider implausible, and rerun the scoring pipeline. The loop is not closed without them.

Our contributions are two-fold:

(A) Position and Design Principles. We distill five design principles for clinician-in-the-loop clinical NLP — surface contradiction, preserve negation structurally, make override cheap, provide multi-level explanation, and design for offline deployment — intended as actionable guidelines for the community.

(B) System Instantiation and Failure Characterisation. We present NSIDDx as a concrete instantiation of these principles, built around a ternary symptom encoding scheme (+1+1 present, −1-1 explicitly denied, 00 unrecorded), a dual-formula scoring engine combining a contradiction-sensitive matrix score and a coverage-penalising hybrid score, and a Negation-Retaining Phenotype Graph that renders absent findings as structural nodes rather than silently discarding them. We evaluate this pipeline under open-ended conditions with no multiple-choice scaffolding, characterising systematic failure modes — vocabulary mismatch, confidence-without-grounding, and negation inversion — that make clinician intervention a routine requirement rather than an edge case. NSIDDx’s symbolic transparency layer is proposed as the architectural response. We do not claim diagnostic superiority — our contribution is architectural.

We acknowledge that no user study or clinical validation has been conducted. The argument for clinician involvement is theoretical and demonstrated by one case study, and explicitly invites prospective validation.

2 Related Work

LLM-based clinical diagnosis.

Large language models have demonstrated strong performance on medical benchmarks (Singhal et al., 2023; Nori et al., 2023). Health-LLM (Yu et al., 2025) extends this with a two-pass RAG pipeline and XGBoost classifier for personalised prediction, but the clinician receives a label with no inspectable logic chain and no mechanism for override.

Human-AI collaborative diagnosis.

AMIE (Tu et al., 2025) shows conversational AI can match physician accuracy in OSCE studies but does not expose an inspectable reasoning chain or practitioner override mechanism. In low-resource settings, the ability to interrogate and correct AI suggestions may be more valuable than raw accuracy.

Knowledge graph-guided iterative diagnosis.

MedKGI (Wang et al., 2025a) models multi-step diagnosis as an iterative conversational loop using information gain over KG subgraphs. It does not model absent symptoms — negative findings are neither elicited nor encoded, and clinicians cannot see which absent symptoms are relevant to the differential. NSIDDx is complementary: where MedKGI optimises automated history-taking over positive findings, NSIDDx makes negation explicit and inspectable after history collection.

Knowledge graph grounding for prognosis.

Wang et al. (2025b) fine-tune lightweight LLMs on PrimeKG-scaffolded reasoning paths for next-visit prediction, encoding visits as binary ICD-9 vectors — structurally unable to represent explicit symptom denials (xi=−1x_{i}=-1). The reasoning chain is not inspectable and absent findings are implicit. Our two-cohort evaluation quantifies this opacity: 41.6% of DDx@5 semantic hits on CUPCase are tokenically unverifiable without an audit trail.

Neuro-symbolic explainability.

Mondal et al. (2025) and Lu et al. (2025) apply LNN-based methods to explainable diabetes prediction, exposing auditable reasoning with negation support, but operate on low-dimensional tabular data with statically defined rules and cannot parse unstructured clinical narratives.

Rare disease detection.

RADAR (Kim et al., 2025) applies FAISS to rare disease retrieval in brain MRI; Zelin et al. (2024) explore knowledge-guided RAG for rare disease diagnosis. NSIDDx’s scanner differs: it operates over clinical text, is grounded in ZebraMap (Islam et al., 2026), and scores candidates through the same dual-source symbolic pipeline as the primary DDx, offline without API access.

White-box diagnostic systems.

Ada DX (Ronicke et al., 2019) demonstrates the value of accepting present and absent findings with full practitioner override, but operates as a probabilistic expert system on structured symptom input rather than free-text narratives.

Feature comparison.

Table 1 situates NSIDDx among prior systems. The claim is not individual feature novelty but that the specific integration of all five dimensions — negation modelling, override interface, offline capability, unstructured text input, and KG grounding — is novel in neuro-symbolic clinical NLP.

System N O C U K
Health-LLM (Yu et al., 2025) ✗ ✗ ✗ ✓ ✓
MedKGI (Wang et al., 2025a) ✗ ✗ ✗ ✓ ✓
LNN (Mondal et al., 2025; Lu et al., 2025) ✓ ✗ ✓ ✗ ✗
Ada DX (Ronicke et al., 2019) ✓ ✓ ✓ ✗ ✓
AMIE (Tu et al., 2025) ✗ ✗ ✗ ✓ ✗
NSIDDx ❜ ✓ ✓ ✓ ✓
Table 1: Feature comparison. Columns: Negation modelling, Override interface, offline Capable, Unstructured text input, KG grounding. ✓ full; ❜ partial (feature exists but with major constraints: e.g., negation requires manual entry, override is single-direction, or offline mode excludes some functionality); ✗ none.

3 System Architecture

NSIDDx is a modular pipeline with six core stages (Figure 1). The pipeline is not rigidly sequential: every stage is an independently invocable module, and the practitioner can bypass Stage 1 entirely by entering symptoms directly, or add and remove symptoms and candidates at any later point via the override interface, which re-triggers scoring, graph generation, and PL compilation without restarting the pipeline. Figure 1 distinguishes the path exercised in the evaluation of Section 4 (solid arrows) from these optional bypass and override affordances (dashed arrows).

Figure 1: NSIDDx system architecture (colour key in figure). Solid arrows trace the path exercised in the evaluation of Section 4: history taking (Stage 1) feeds symptom extraction (Stage 2), whose ternary-encoded output is passed in parallel to the rare disease scanner, the LLM differential diagnosis module (Stage 3), and the all-disease scanner (Stage 6); all three candidate streams are scored by the ternary-hybrid engine (Stage 4) before graph and audit-string generation (Stage 5). Dashed arrows show that the pipeline is not rigid: the practitioner may enter symptoms manually in place of Stage 1, and the override loop lets the practitioner add or remove symptoms (fed back into Stage 2) or candidates (fed back into Stage 4) at any point, triggering re-scoring, re-graphing, and PL recompilation (Section 3, “Practitioner override”).

Data sourcing.

Knowledge base files are sourced from HPO (hp.obo, phenotype.hpoa), MONDO (mondo.owl), and PrimeKG (kg.feather). HPO terms are extracted into a symptom catalog; unannotated modifier and inheritance terms are excluded. MONDO cross-references unify OMIM and ORPHA identifiers; entries with zero present-symptom annotations are dropped, yielding roughly 10,800 disease profiles. For PrimeKG, disease-phenotype edges are bridged to HPO IDs; disease-disease edges are excluded. Over 9,000 phenotype-bearing entities enter the scoring pipeline. The NSIDDx pipeline, including all preprocessing scripts and filter thresholds, is publicly available at https://github.com/joetheguide2/NSIDDX-.

3.1 Stage 1: Clinical History Taking and Summarisation

Clinical history is gathered via an LLM-driven conversational agent and condensed into a structured summary preserving both positive and negative findings.

3.2 Stage 2: Symptom Extraction and HPO Resolution

Symptom extraction passes the clinical summary through a two-step pipeline. First, the LLM reformats the summary into a structured format with Presence of: and Denies: prefixes. Second, surface forms are resolved to HPO IDs via MedSpaCy TargetRule (literal) or Abhinand/MedEmbed-large-v0.1 (semantic) matching; each is tagged with its resolution method. The result is two typed sets: patient_hpo_ids (present) and absent_hpo_ids (explicitly denied).

Disease name resolution uses exact then substring match, preferring diseases with symptom profiles over umbrella terms like “syndrome”.

3.3 Stage 3: LLM Differential Diagnosis and PL Generation

The LLM differential diagnosis stage sends the clinical summary together with the confirmed present and explicitly denied symptom lists to the LLM under a structured DDx prompt. The prompt enforces a fixed Evidences →\rightarrow Reasoning →\rightarrow Diagnosis format per entry, with an ABSENT: marker for denied symptoms.

Propositional Logic (PL) strings — case-specific conjunctions of symptom propositions implying a diagnosis — are generated per diagnosis, either symbolically (from HPO-matched symptoms) or via the LLM. Propositional statements use absent symptoms as negated propositions (e.g., ¬(Raynaud phenomenon)\neg(\text{Raynaud phenomenon})). These strings serve as practitioner-readable audit trails for each diagnostic candidate.

3.4 Stage 4: Ternary-Hybrid Scoring Engine

The scoring engine runs two scoring formulas — the matrix score and the hybrid score — independently against each knowledge source (HPO/MONDO, PrimeKG), yielding independent scores per candidate disease. Both formulas are applied to all sources.

Score Formula 1: Matrix Score.

A patient symptom vector 𝐕p∈{−1,0,+1}N\mathbf{V}_{p}\in\{-1,0,+1\}^{N} is built from the extracted HPO IDs: +1+1 for confirmed present, −1-1 for explicitly denied, 00 for unrecorded. A disease profile vector 𝐀j∈{−1,0,+1}N\mathbf{A}_{j}\in\{-1,0,+1\}^{N} encodes expected phenotypes. The score is the normalised dot product:

Sjmatrix=𝐕p⋅𝐀j|𝐀j|∈[−1,+1]S_{j}^{\text{matrix}}=\frac{\mathbf{V}_{p}\cdot\mathbf{A}_{j}}{|\mathbf{A}_{j}|}\in[-1,\,+1]

where |𝐀j||\mathbf{A}_{j}| is the disease’s profile size. Negative scores indicate contradictions — the patient denies a required symptom or presents one the disease expects absent. Both formulas use standard measures (dot product, Jaccard); their specific combination with equal weights is novel.

Score Formula 2: Hybrid Score.

The hybrid score measures how well a disease explains the patient’s positive findings:

Sjhybrid=0.5×|A∩B||A|+0.5×|A∩B||A∪B|∈[0,+1]S_{j}^{\text{hybrid}}=0.5\times\frac{|A\cap B|}{|A|}+0.5\times\frac{|A\cap B|}{|A\cup B|}\in[0,\,+1]

Here AA is the patient’s set of confirmed present symptoms and BB is the disease’s expected phenotype profile (the positive-symptom counterparts of 𝐕p\mathbf{V}_{p} and 𝐀j\mathbf{A}_{j} above, with denied and unrecorded symptoms excluded). The inclusion term (|A∩B|/|A||A\cap B|/|A|) rewards covering most of the patient’s symptoms; the Jaccard term (|A∩B|/|A∪B||A\cap B|/|A\cup B|) penalises large profiles with only incidental symptom overlap.

3.5 Stage 5: Negation-Retaining Phenotype Graph and Rare Disease RAG Scanner

The negation graph stage builds a Negation-Retaining Phenotype Graph — a directed multigraph using NetworkX from the current patient payload and the last scoring output. The graph contains five node types: present symptoms (HPO-resolved), absent symptoms (explicitly denied), past medical history, family history, and DDx candidates. Absent symptom nodes remain structurally present in the graph — visually distinguishable from confirmed symptoms — giving the practitioner a direct view of pertinent negatives alongside positive findings.

Edge types.

The graph renders four edge types from PrimeKG: explains (disease →\rightarrow symptom); presents (symptom →\rightarrow disease); linked_to (symptom co-occurrence); and phenotype_modifier_of (modifier →\rightarrow base). Explains edges carry a PrimeKG-derived specificity weight w=log10⁡(total diseases/symptom count)+1w=\log_{10}(\text{total diseases}/\text{symptom count})+1, where higher weight indicates greater diagnostic specificity. The scoring layer treats modifier terms as independent phenotypes — a known limitation (Section Limitations).

The rare disease RAG scanner provides an optional safety net grounded in ZebraMap (Islam et al., 2026), encoded with MedEmbed and indexed in a FAISS vector store. Retrieved candidates are mapped from UMLS to MONDO IDs, enabling scoring through the same dual-source symbolic pipeline as the primary DDx. The module is intended for presentations with eight or more symptoms where the primary DDx may miss low-prevalence conditions.

3.6 Stage 6: All-Disease Scanning

Beyond scoring LLM-nominated candidates, NSIDDx provides a parallel, LLM-independent diagnostic pathway that sweeps the entire knowledge base, scoring every disease in HPO/MONDO and PrimeKG against the current patient symptom set using the hybrid score. The hybrid formula is used by deliberate design: in full-database sweeps, the matrix score suffers a structural bias where diseases with tiny profiles achieve artificially high scores (Table 2).

Disease Matrix Hybrid Explained
Intellectual dev. disorder 1.000 0.071 1/14
17q11.2 microduplication 0.625 0.762 12/14
Table 2: Matrix score bias in full-database scanning. The hybrid score correctly reverses the ranking, which is why all full-database sweeps use the hybrid formula by default.

Practitioner override and closed-loop design.

At any stage, the practitioner can add or remove symptoms and disease candidates, then re-run scoring, graph generation, and PL compilation. Changes propagate back into the LLM prompt, giving direct control over the differential diagnosis without modifying underlying weights.

4 Evaluation

This section evaluates the LLM+rare-disease-RAG diagnostic pipeline on 750 CUPCase cases across two cohorts, characterising failure modes of the paradigm rather than of NSIDDx alone.

4.1 Setup

We evaluate on two cohorts drawn from CUPCase (Perets et al., 2025), a publicly available benchmark of 3,562 real-world patient case reports sourced from BMC case report journals, accepted at AAAI 2025. The 500-case random sample (CUP) represents the full distribution of clinically uncommon presentations — the realistic evaluation surface for any system deployed on edge-case presentations. The 250-case exact-match sample (WELL) consists of cases whose correct diagnosis resolves by exact name match in HPO/MONDO or PrimeKG; this cohort represents the upper bound of automated symbolic pipeline performance within CUPCase, as the correct disease is guaranteed to have an ontology entry, a curated phenotype profile, and a resolvable name. Approximately 700 of 3,562 CUPCase cases meet this criterion. Both cohorts are drawn from CUPCase; there is no domain shift between them. The only variable is ontology coverage. All evaluation used Qwen3.5-9B (Qwen Team, 2026) (IQ4_XS, a 4-bit GGUF quantization) on consumer hardware without cloud API access. Median per-case runtime was 87.6 seconds.

Metrics.

We evaluate under four matching metrics of increasing permissiveness: exact (complete string match), substring (one is a complete substring of the other), token (significant token overlap), and semantic (cosine similarity of sentence embeddings using Abhinand/MedEmbed-large-v0.1, similarity threshold 0.7). We report all four to make the gap between verifiable and apparent accuracy explicit.

Statistical analysis.

Accuracy differences between cohorts are tested using the chi-square test of proportions on 2×\times2 contingency tables (hit/miss per case); all reported expected cell counts exceed five. Continuous distributions (phenotype counts, DDx label lengths, confidence scores) are compared using the two-sided Mann-Whitney U test, which makes no normality assumption. Per-cohort confidence intervals are Wilson score intervals at α=0.05\alpha=0.05. Significance markers follow the convention ∗p<0.05{}^{*}p<0.05, p∗⁣∗<0.01{}^{**}p<0.01, ∗∗∗p<0.001{}^{***}p<0.001.

4.2 Primary DDx Accuracy

Pipeline Exact Token Semantic
CUP (500-case random sample)
DDx (LLM) @1 2.4% 17.0% 41.8%
DDx (LLM) @3 5.6% 29.2% 67.8%
DDx (LLM) @5 6.6% 34.4% 75.2%
MONDO @5 0.0% 1.8% 5.0%
KG @5 0.0% 1.4% 4.0%
Rare scanner any 2.6% 9.4% 23.6%
DDx@5 ∪\cup Rare — — 78.4%
WELL (250-case exact-match sample)
DDx (LLM) @1 7.2% 25.6% 42.8%
DDx (LLM) @3 11.6% 40.8% 66.4%
DDx (LLM) @5 14.0% 46.8% 73.6%
MONDO @5 0.4% 2.8% 8.0%
KG @5 0.8% 5.6% 8.0%
Rare scanner any 17.6% 27.6% 35.6%
DDx@5 ∪\cup Rare — — 80.4%
Table 3: DDx semantic accuracy is statistically equivalent between cohorts (χ2\chi^{2}, p=0.700p=0.700). Exact and token accuracy diverge significantly (p<0.001p<0.001–0.010.01), reflecting vocabulary mismatch on uncommon cases rather than differential LLM reasoning. CUP = 500-case random sample; WELL = 250-case exact-match sample (upper bound of ontology coverage within CUPCase).

The LLM component performs equivalently across both cohorts: DDx@5 semantic accuracy is 75.2% and 73.6% respectively (χ2\chi^{2}, p=0.700p=0.700). The divergence appears in exact accuracy (6.6% vs 14.0%, p=0.001p=0.001) and token accuracy (34.4% vs 46.8%, p<0.001p<0.001) — metrics that depend on vocabulary alignment between the LLM’s generated labels and ontology entries. Phenotype extraction rates are also statistically indistinguishable (MWU, p=0.976p=0.976), ruling out differential input quality as a confound. The failure is at the vocabulary interface, not in the LLM’s clinical reasoning. The MONDO and KG symbolic scorers achieve 5.0–8.0% semantic accuracy in both cohorts, confirming that their near-zero performance reflects HPO phenotype annotation sparsity, not a scoring formula failure.

4.3 Rare Disease Scanner

The rare scanner recovers cases missed by the LLM DDx (Table 4).

Metric CUP / WELL
Empty-match rate 83.5% / 84.4%
Mean empty-match confidence 0.641 / 0.645
Discriminative gap (correct vs missed) +0.061*** / +0.064***
Rare scanner sole recovery 3.2% / 6.8%
DDx@5 ∪\cup Rare (combined ceiling) 78.4% / 80.4%
Table 4: Rare disease scanner quality analysis. The empty-match rate is consistent across cohorts. The discriminative gap is statistically significant (MWU, p<0.001p<0.001) but clinically insufficient as a decision threshold.

Candidates are ranked by embedding similarity without phenotypic pathway validation; the scanner functions as a hypothesis generator requiring clinician review.

4.4 Accuracy by Extraction Quality

Phenotype bin CUP WELL
nn DDx@5 nn DDx@5
0 (extraction failure) 12 83.3%* 5 60.0%*
1–2 96 74.0% 54 66.7%
3–5 (modal) 173 72.3% 84 75.0%
6–9 131 79.4% 60 75.0%
10+ 88 75.0% 47 78.7%
Table 5: DDx semantic accuracy by extraction quality. No between-cohort difference is significant at any phenotype bin (all p>0.44p>0.44). The absence of significant differences within bins confirms that performance divergence is attributable to the vocabulary boundary layer, not differential extraction quality.

Extraction errors are input-level failures that the clinician can correct regardless of ontology coverage — motivating the practitioner override interface.

5 Qualitative Failure Mode Analysis

Analysis of automated failure modes across both cohorts reveals four intervention categories (Table 6).

Category CUP (500) WELL (250)
Cat 1: Extraction failure 2.4% 2.0%
Cat 2: DDx complete miss 24.4% 25.6%
Cat 3: Semantic-only hit 41.6% 28.0%***
Cat 4: KG+MONDO silent 70.0% 62.8%
Any intervention 96.8% 93.2%*
Table 6: Failure taxonomy across both cohorts. Categories 1 and 2 are statistically equivalent (p>0.78p>0.78), indicating LLM blind spots and extraction failures are domain-level phenomena not dependent on ontology coverage. Category 3 diverges significantly (p<0.001p<0.001), localising the primary performance gap to the vocabulary boundary.

Negation Inversion.

Analysis of HPO resolver mappings identified 26 cases where explicitly denied symptoms were semantically mapped to affirmative HPO terms, entering the scoring pipeline as positive evidence. Examples include: DENIED: pain →\rightarrow Pain insensitivity, DENIED: hemoptysis →\rightarrow Hemoptysis, No remarkable family history →\rightarrow hereditary fructose intolerance. In the sarcoidosis case (Section 6), six of seven absent symptoms were LLM-inferred rather than explicitly denied, causing matrix score −0.024-0.024 for the correct diagnosis. This failure class is structurally undetectable in any pipeline without explicit polarity encoding.

Implications for design.

Categories 1 and 2 are domain-level failures requiring clinician oversight regardless of ontology coverage. Category 3 calls for synonym normalisation and an audit trail so the clinician can verify tokenically unverifiable hits. Category 4 confirms that symbolic path confirmation is unavailable for most cases; the PL string and negation graph provide alternative explanation modalities independent of score magnitude. Active contradictions and negation inversions require no system change — surfacing them is the design goal.

6 Case Study

The following case falls within the category of semantic-only hit under automation with active symbolic contradiction and illustrates the override mechanism converting a surfaced failure into a confirmed diagnosis.

Case and automated extraction failure.

A 64-year-old Japanese woman presents with exertional dyspnea, bilateral pleural effusions, bilateral hilar and mediastinal lymphadenopathy, subcutaneous nodules, and non-caseous epithelioid granulomas on biopsy. The correct diagnosis is Sarcoidosis (Kesici et al., 2014). The automated pipeline extracts 5 present and 7 absent symptoms:

Present (5): HP:0002094 dyspnea, HP:0032252 granuloma, HP:0034388 hilar lymphadenopathy, HP:0100721 mediastinal lymphadenopathy, HP:0002202 pleural effusion.

Absent (7): HP:0100749 ¬\negchest pain, HP:0012735 ¬\negcough, HP:0001945 ¬\negfever, HP:0002105 ¬\neghemoptysis, HP:0030166 ¬\negnight sweats, HP:0001962 ¬\negpalpitations, HP:0001824 ¬\negweight loss.

All seven absent symptoms are generated by the LLM’s structured reformatting step, which infers pertinent negatives from the narrative even where the case text does not explicitly deny them. Splenomegaly, documented via gallium-67 scintigraphy showing abnormal splenic uptake, is not extracted because no explicit “splenomegaly” surface form appears in the HPO synonym dictionary.

The resulting automated score for Sarcoidosis is MONDOm=−0.024\text{MONDO}_{m}=-0.024, MONDOh=0.512\text{MONDO}_{h}=0.512 — the negative matrix score places it last in the symbolic ranking despite the LLM correctly nominating it first in the DDx. The system does not suppress this contradiction; the negative score is surfaced in the scoring output alongside the PL audit trail.

Human-in-the-loop demonstration.

A researcher reviewed the raw case narrative alongside the automated symptom vector and performed three targeted interventions:

  1. 1.

    Corrects the absent list: six of the seven absent symptoms (chest pain, cough, fever, haemoptysis, night sweats, weight loss) were not explicitly denied in the case text and are removed, retaining only ¬\negpalpitations (HP:0001962) as a true absent finding.

  2. 2.

    Adds splenomegaly by medical judgement: the gallium-67 scintigraphy finding of abnormal splenic uptake implies splenic involvement, even though no explicit “splenomegaly” string appears in the symptom extraction pass. The clinician enters it as /add_symptom splenomegaly.

  3. 3.

    Re-runs /score.

Removing the six spurious absent symptoms resolves the matrix contradiction immediately: Sarcoidosis moves from MONDOm=−0.024\text{MONDO}_{m}=-0.024 to MONDOm=0.073\text{MONDO}_{m}=0.073, MONDOh=0.284\text{MONDO}_{h}=0.284. Adding splenomegaly improves coverage further: MONDOm=0.098\text{MONDO}_{m}=0.098, MONDOh=0.331\text{MONDO}_{h}=0.331. Sarcoidosis rises to rank 1 in the scored DDx.

The corrected present vector contains 7 HPO IDs (dyspnea, hilar lymphadenopathy, mediastinal lymphadenopathy, pleural effusion, subcutaneous nodules, granuloma, splenomegaly) and 1 absent (¬\negpalpitations). The full-database sweeps independently confirm Sarcoidosis at top ranks across all scoring sources.

The PL audit string for the corrected state reads:

(Dyspnea) ∧\wedge (Mediastinal lymphadenopathy) ∧\wedge (Pleural effusion) ∧\wedge (Splenomegaly) ⇒\Rightarrow sarcoidosis, susceptibility to, 1

Phenotypic graph.

Refer to caption
Figure 2: Negation-Retaining Phenotype Graph for the corrected case. Red nodes: confirmed present symptoms. Grey node: explicitly denied symptom. Green nodes: DDx candidates.

Figure 2 shows the Negation-Retaining Phenotype Graph for the corrected state.

This case demonstrates the design philosophy: the system surfaced a symbolic contradiction, the practitioner corrected extraction errors via override, and convergent evidence confirmed the corrected diagnosis. It does not represent typical recovery rates (Section 5). The three interventions required represent capabilities that Category 3 analysis indicates 208 CUPCase cases would benefit from. We do not claim this recovery rate is generalisable without a user study; we demonstrate that the mechanism functions as designed in this instance.

7 Position: Five Design Principles for Clinician-in-the-Loop Clinical NLP

From the NSIDDx experience, we distill five design principles for clinical NLP systems that treat the practitioner as an active reasoning agent rather than a passive consumer of model outputs. These principles are derived from the failure modes we observed (Section 5) and the recovery patterns demonstrated in the case study (Section 6). They are well-motivated hypotheses, not empirically validated claims; prospective clinician studies are needed to test their usability and generalisability.

Principle 1: Surface Contradiction.

When the symbolic layer disagrees with the LLM, the system should present both outputs side-by-side. The contradiction is the signal: it flags uncertainty, extraction failure, or missing clinician knowledge. In the sarcoidosis case (Section 6), the negative matrix score (−0.024-0.024) correctly identified an extraction error — the system flagged its own mistake rather than hiding it.

Principle 2: Preserve Negation Structurally.

Denied symptoms are first-class citizens in scoring, graphs, and reasoning chains. NSIDDx encodes them as −1-1 in the ternary vector and renders them as grey nodes in the negation graph, visually distinct from confirmed findings. The sarcoidosis contradiction (matrix −0.024-0.024 from spurious absent symptoms) motivates this design.

Yet a symptom may be structurally absent (the profile expects it) without being clinically meaningfully absent at a given stage of presentation. The ternary vector cannot represent this temporal distinction; the override interface exists to admit the clinical judgment that no encoding can capture by design.

Principle 3: Enable Auditable Practitioner Override.

The practitioner can add, remove, or modify symptoms at any stage, with changes propagating through scoring, graph, and reasoning chains in real time. Override actions are auditable: what changed and why is visible. In NSIDDx, /add_symptom and /remove_symptom trigger immediate re-scoring and regeneration of all outputs.

Principle 4: Provide Multiple Levels of Explanation.

Different clinicians prefer different explanation formats: some read PL audit strings, others inspect graphs, others examine raw scores. NSIDDx provides all three. No single explanation format works for all users, and the system should not force a choice. This aligns with the layered explanation paradigm established in the XAI literature (Doshi-Velez and Kim, 2017). Numerical scores alone can be insufficient; the PL string and negation graph provide complementary modalities independent of score magnitude.

Principle 5: Design for Offline Deployment on Consumer Hardware.

Low-resource settings cannot rely on cloud APIs. Systems designed for these settings must run locally on commodity hardware. This is not a technical constraint — it is a design requirement that shapes every architectural choice, from the selection of quantized models (Qwen3.5-9B-IQ4_XS.gguf) to the decision to use deterministic scoring alongside probabilistic LLM output.

8 Conclusion

We presented NSIDDx, a neuro-symbolic pipeline with explicit negation, ternary-hybrid scoring, and full-stack override — and a design framework arguing that diagnostic AI must prioritise tractability of disagreement over raw accuracy. Evaluation characterises three failure modes of the LLM+RAG paradigm under open-ended conditions (vocabulary mismatch, confidence-without-grounding, negation inversion) that make clinician oversight a routine requirement, not an edge case. Offline deployability on consumer hardware is a prerequisite for equitable access in the settings this system is designed to serve. A case study demonstrates the override mechanism. We distill five design principles for clinician-in-the-loop clinical NLP and invite the prospective studies needed to validate the claim at scale.

Limitations

We document the known limitations of NSIDDx alongside the design choices that partially address each.

Natural language symptom coverage.

MedSpaCy TargetRule matching performs literal string lookup against a large synonym dictionary. A semantic fallback (Abhinand/MedEmbed-large-v0.1, cosine threshold 0.7) resolves colloquial terms such as “SOB” to dyspnea, but the threshold was not ablated and false positives are possible; match quality is uncertain. Each extracted symptom is tagged with its resolution method (literal/semantic); the practitioner can inspect and correct any mapping via /add_symptom.

PrimeKG phenotype coverage.

PrimeKG has limited coverage of common diseases: many conditions a general practitioner would recognise confidently (e.g., pharyngitis, bronchitis) lack curated phenotype entries in the graph, producing zero or low KG scores for diagnoses that are clinically straightforward. The HPO/MONDO matrix score is unaffected by this gap. NSIDDx is most valuable for complex, multisystem presentations where GPs genuinely benefit from structured support. This limitation is partially mitigated by the dual-source design: while PrimeKG scores may be near-zero for common conditions, the HPO/MONDO matrix score remains operational, and the LLM-generated DDx is not suppressed by low KG scores.

LLM hallucination in DDx reasoning.

The LLM may generate plausible but factually incorrect reasoning chains, particularly for rare diseases with sparse training data representation. The symbolic scoring layer exists precisely as an independent validation step: if the LLM proposes a diagnosis that the matrix score actively contradicts, the practitioner sees both the narrative reasoning and the symbolic contradiction. The system does not suppress the LLM’s output; it presents it alongside its symbolic assessment.

Absent symptom reliability.

The pipeline treats clinician-reported negations as structurally meaningful diagnostic signals. In real settings, patients may not volunteer absent symptoms unless explicitly asked. The history-taking agent partially addresses this through targeted pertinent-negative elicitation, but cannot guarantee completeness.

Single-language support.

The pipeline currently operates on English clinical text. Many low-resource settings operate in Hindi, Swahili, or other languages. Cross-lingual extension is outside the scope of this version; the modular architecture is designed to support alternative extraction front-ends.

Single-encounter reasoning.

NSIDDx reasons over a single clinical encounter. Chronic or evolving presentations with important longitudinal signal are outside the current design scope.

Phenotype modifier terms in scoring.

The graph correctly captures qualifier relationships between HPO terms via PrimeKG’s phenotype_modifier_of edges. However, the symbolic scoring layer does not exploit this binding: modifier terms extracted by MedSpaCy are entered into 𝐕p\mathbf{V}_{p} as independent +1+1 entries, creating a gap between the graph’s semantic fidelity and the scoring layer’s representational granularity. Composing modifier-symptom pairs into single weighted phenotype entries prior to scoring is a direction for future work.

Evaluation scope.

Evaluation is conducted on 750 cases from the CUPCase benchmark across two cohorts — real-world published case reports. The sample reflects hardware constraints (one to three minutes per case on the target hardware). Notably, CUPCase cases are selected for their diagnostic interest and completeness, which may overestimate system performance compared to routine clinical notes that are often fragmented or incomplete. Real-world EHR validation and evaluation on the full CUPCase corpus remain necessary next steps before clinical deployment.

Semantic matching permissiveness.

The evaluation relies on semantic similarity (cosine similarity of sentence embeddings) as a matching metric. Across the CUPCase cohort, 83.5% of rare scanner outputs and 41.6% of DDx@5 semantic hits carry no tokenically verifiable relationship to the ground-truth diagnosis. Whether these semantic hits represent genuine synonymy or embedding artefacts cannot be determined without expert review — a core motivation for the practitioner override interface.

Human-in-the-loop demonstration.

The override interventions in Section 6 were performed by a researcher reviewing the case narrative alongside the automated symptom vector, not by a clinician in a live diagnostic setting. The case study demonstrates the mechanism functions as designed but provides no evidence about human behaviour with the system. Prospective user studies with practising clinicians are necessary and explicitly invited.

Scoring formula ablation.

The ternary-hybrid scoring formulas were designed for interpretability rather than diagnostic accuracy. No hyperparameter tuning was performed; the equal-weight combination (0.5/0.5) was selected for transparency. Future work should explore learned weights that preserve interpretability while improving discrimination.

Ethical and Societal Implications

Positive Impact Definition.

For us, positive impact in clinical NLP is not primarily measured in benchmark accuracy. It is measured in access: whether a practitioner in a clinic with no specialist referral network, no reliable internet connection, and no clinical decision support infrastructure can use a system to surface a differential diagnosis they might otherwise have missed, inspect the reasoning behind it, and make a better-informed decision for their patient. NSIDDx is designed with this practitioner in mind. Its offline deployability, consumer hardware requirements, and practitioner-in-the-loop architecture are not technical constraints — they are the design goal. Following the NLP4PI workshop’s emphasis on impact grounding (Pant et al., 2025), we define positive impact as democratized access to structured differential reasoning — the ability of any practitioner, regardless of institutional resources, to receive a transparent, auditable diagnostic aid that respects clinical expertise and local data sovereignty.

Assistive-Only Design Principle.

NSIDDx is an assistive tool, not an autonomous diagnostic system. It does not make diagnoses. Every output — the DDx ranking, the PL string, the phenotypic graph — is presented to the practitioner as structured information to reason with, not a decision to accept. The system is explicitly designed so that disagreement is easy: the practitioner can add symptoms, remove candidates, and rerun the pipeline in seconds.

Automation Bias and Over-Reliance Risk.

Any decision support system carries a risk of automation bias: the tendency of clinicians to anchor on system outputs even when their own clinical judgment diverges. The PL strings and phenotypic graphs are designed to invite disagreement — a practitioner who reads (Alopecia)∧(Malar rash)⇒SLE(\text{Alopecia})\wedge(\text{Malar rash})\Rightarrow\text{SLE} and knows the patient also has a finding not captured in the system has a clear signal that the system’s evidence base is incomplete. Nevertheless, we acknowledge that the risk of over-reliance cannot be fully designed away and should be addressed through practitioner training and deployment guidance.

Rare Disease Scanner and Diagnostic Heuristics.

We deliberately invert the hoofbeats heuristic for low-resource settings: when specialist referral is unavailable, surfacing a rare disease candidate with moderate confidence is more ethical than suppressing it. This inversion is bounded by three constraints: the scanner is optional and off by default; it activates only for presentations with eight or more symptoms; and low-scoring candidates (including negative matrix scores) are visually deprioritised.

Evaluation on real-world case reports.

The evaluation uses 750 cases from the CUPCase benchmark across two cohorts, a publicly available collection of real-world BMC patient case reports. The sample reflects inference time constraints on consumer hardware. Validation on institution-specific EHR data, with appropriate ethics approvals and data governance, is required before any clinical deployment.

Review and Governance.

NSIDDx is explicitly positioned as a research prototype, not a clinical tool. Any future deployment would require institutional review board approval, HIPAA/GDPR compliance audits, and a phased clinical validation protocol. The system’s architecture — local processing, no cloud dependency, auditable reasoning chains — is designed to facilitate, not circumvent, these governance requirements.

Equity and language access.

The instantiated system currently operates only in English. This limits immediate applicability in many of the low-resource settings it is designed to serve. We recognise this as a significant equity gap and identify multilingual extension as a priority for future work.

Data Retention and Sovereignty.

NSIDDx operates entirely locally. No patient information is sent to external servers or APIs. This is both a practical requirement for offline deployment and an ethical requirement for patient data sovereignty in settings where data protection infrastructure may be limited.

References

  • Chandak et al. (2023) P. Chandak, K. Huang, and M. Zitnik Building a knowledge graph to enable precision medicine. Scientific Data 10 (1), pp. 67. External Links: Document, Link Cited by: §1, §1.
  • Doshi-Velez and Kim (2017) F. Doshi-Velez and B. Kim Towards a rigorous science of interpretable machine learning. In NIPS 2017 Symposium on Interpretable Machine Learning, External Links: Link Cited by: §7.
  • Gargano et al. (2024) M. A. Gargano, N. Matentzoglu, B. Coleman, E. B. Addo-Lartey, A. V. Anagnostopoulos, J. Anderton, P. Avillach, A. M. Bagley, E. Bakštein, J. P. Balhoff, G. Baynam, S. M. Bello, M. Berk, H. Bertram, S. Bishop, H. Blau, D. F. Bodenstein, P. Botas, K. Boztug, J. Čady, T. J. Callahan, R. Cameron, S. J. Carbon, F. Castellanos, J. H. Caufield, L. E. Chan, C. G. Chute, J. Cruz-Rojo, N. Dahan-Oliel, J. R. Davids, M. de Dieuleveult, V. de Souza, B. B. A. de Vries, E. de Vries, J. R. DePaulo, B. Derfalvi, F. Dhombres, C. Diaz-Byrd, A. J. M. Dingemans, B. Donadille, M. Duyzend, R. Elfeky, S. Essaid, C. Fabrizzi, G. Fico, H. V. Firth, Y. Freudenberg-Hua, J. M. Fullerton, D. L. Gabriel, K. Gilmour, J. Giordano, F. S. Goes, R. G. Moses, I. Green, M. Griese, T. Groza, W. Gu, J. Guthrie, B. Gyori, A. Hamosh, M. Hanauer, K. Hanušová, Y. (. He, H. Hegde, I. Helbig, K. Holasová, C. T. Hoyt, S. Huang, E. Hurwitz, J. O. B. Jacobsen, X. Jiang, L. Joseph, K. Keramatian, B. King, K. Knoflach, D. A. Koolen, M. L. Kraus, C. Kroll, M. Kusters, M. S. Ladewig, D. Lagorce, M. Lai, P. Lapunzina, B. Laraway, D. Lewis-Smith, X. Li, C. Lucano, M. Majd, M. L. Marazita, V. Martinez-Glez, T. H. McHenry, M. G. McInnis, J. A. McMurry, M. Mihulová, C. E. Millett, P. B. Mitchell, V. Moslerová, K. Narutomi, S. Nematollahi, J. Nevado, A. A. Nierenberg, N. N. Čajbiková, Jr. Nurnberger, S. Ogishima, D. Olson, A. Ortiz, H. Pachajoa, G. Perez de Nanclares, A. Peters, T. Putman, C. K. Rapp, A. Rath, J. Reese, L. Rekerle, A. M. Roberts, S. Roy, S. J. Sanders, C. Schuetz, E. C. Schulte, T. G. Schulze, M. Schwarz, K. Scott, D. Seelow, B. Seitz, Y. Shen, M. N. Similuk, E. S. Simon, B. Singh, D. Smedley, C. L. Smith, J. T. Smolinsky, S. Sperry, E. Stafford, R. Stefancsik, R. Steinhaus, R. Strawbridge, J. C. Sundaramurthi, P. Talapova, J. A. Tenorio Castano, P. Tesner, R. H. Thomas, A. Thurm, M. Turnovec, M. E. van Gijn, N. A. Vasilevsky, M. Vlčková, A. Walden, K. Wang, R. Wapner, J. S. Ware, A. A. Wiafe, S. A. Wiafe, L. D. Wiggins, A. E. Williams, C. Wu, M. J. Wyrwoll, H. Xiong, N. Yalin, Y. Yamamoto, L. N. Yatham, A. K. Yocum, A. H. Young, Z. Yüksel, P. P. Zandi, A. Zankl, I. Zarante, M. Zvolský, S. Toro, L. C. Carmody, N. L. Harris, M. C. Munoz-Torres, D. Danis, C. J. Mungall, S. Köhler, M. A. Haendel, and P. N. Robinson The human phenotype ontology in 2024: phenotypes around the world. Nucleic Acids Research 52 (D1), pp. D1333–D1346. External Links: ISSN 0305-1048, Document, Link, https://academic.oup.com/nar/article-pdf/52/D1/D1333/55039688/gkad1005.pdf Cited by: §1, §1.
  • Goddard et al. (2012) K. Goddard, A. Roudsari, and J. C. Wyatt Automation bias: a systematic review of frequency, effect mediators, and mitigators. Journal of the American Medical Informatics Association 19 (1), pp. 121–127. External Links: Document Cited by: §1.
  • Islam et al. (2026) M. S. Islam, A. Jamal, and A. Alkhathlan ZebraMap: a multimodal rare disease knowledge map with automated data aggregation & LLM-enriched information extraction pipeline. Diagnostics 16 (1), pp. 107. External Links: Document, Link Cited by: §2, §3.5.
  • Kesici et al. (2014) B. Kesici, A. B. Toros, L. Bayraktar, and A. Dervisoglu Sarcoidosis incidentally diagnosed: a case report. Case Reports in Pulmonology 2014 (1), pp. 702868. External Links: Document, Link, https://onlinelibrary.wiley.com/doi/pdf/10.1155/2014/702868 Cited by: §6.
  • Kim et al. (2025) H. Y. Kim, J. Li, A. B. Solana, C. M. Pirkl, B. Wiestler, J. A. Schnabel, and C. I. Bercea Learning to reason about rare diseases through retrieval-augmented agents. External Links: 2511.04720, Link Cited by: §2.
  • Lu et al. (2025) Q. Lu, R. Li, E. Sagheb, A. Wen, J. Wang, L. Wang, J. W. Fan, and H. Liu Explainable diagnosis prediction through neuro-symbolic integration. AMIA Joint Summits on Translational Science Proceedings 2025, pp. 332–341. External Links: Link Cited by: §2, Table 1.
  • Mondal et al. (2025) S. Mondal, A. Ferraro, F. Pecorelli, and G. De Pietro A logic tensor network-based neurosymbolic framework for explainable diabetes prediction. Applied Sciences 15 (21), pp. 11806. External Links: Document Cited by: §2, Table 1.
  • Nori et al. (2023) H. Nori, N. King, S. M. McKinney, D. Carignan, and E. Horvitz Capabilities of gpt-4 on medical challenge problems. External Links: 2303.13375, Link Cited by: §1, §2.
  • Pant et al. (2025) D. Pant, R. R. Grandhe, J. Agrawal, J. Singh Kalra, S. Kumar, S. Khanna, V. Samaria, M. Paul, Dr. S. V. Khalikar, V. Garg, Dr. H. Chauhan, Dr. P. Verma, A. Vssg, N. Khandelwal, S. S. Dhavala, and M. Mathew Health sentinel: an AI pipeline for real-time disease outbreak detection. In Proceedings of the Fourth Workshop on NLP for Positive Impact (NLP4PI), K. Atwell, L. Biester, A. Borah, D. Dementieva, O. Ignat, N. Kotonya, Z. Liu, R. Wan, S. Wilson, and J. Zhao (Eds.), Vienna, Austria, pp. 23–42. External Links: Link, Document, ISBN 978-1-959429-19-7 Cited by: Positive Impact Definition..
  • Perets et al. (2025) O. Perets, O. Ben Shoham, N. Grinberg, and N. Rappoport CUPCase: clinically uncommon patient cases and diagnoses dataset. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 39, pp. 28293–28301. Note: Dataset: https://huggingface.co/datasets/ofir408/CupCase External Links: Document Cited by: Appendix B, §4.1.
  • Qwen Team (2026) Qwen Team Qwen3.5: towards native multimodal agents. External Links: Link Cited by: §4.1.
  • Ronicke et al. (2019) S. Ronicke, M. C. Hirsch, E. Türk, K. Larionov, D. Tientcheu, and A. D. Wagner Can a decision support system accelerate rare disease diagnosis? evaluating the potential impact of Ada DX in a retrospective study. Orphanet Journal of Rare Diseases 14 (1), pp. 69. External Links: Document Cited by: §2, Table 1.
  • Singhal et al. (2023) K. Singhal, S. Azizi, T. Tu, S. S. Mahdavi, J. Wei, H. W. Chung, N. Scales, A. Tanwani, H. Cole-Lewis, S. Pfohl, P. Payne, M. Seneviratne, P. Gamble, C. Kelly, A. Babiker, N. Schärli, A. Chowdhery, P. Mansfield, D. Demner-Fushman, B. Agüera y Arcas, D. Webster, G. S. Corrado, Y. Matias, K. Chou, J. Gottweis, N. Tomasev, Y. Liu, A. Rajkomar, J. Barral, C. Semturs, A. Karthikesalingam, and V. Natarajan Large language models encode clinical knowledge. Nature 620 (7972), pp. 172–180. External Links: Document Cited by: §1, §2.
  • Tu et al. (2025) T. Tu, M. Schaekermann, A. Palepu, K. Saab, J. Freyberg, R. Tanno, A. Wang, B. Li, M. Amin, N. Tomasev, et al. Towards conversational diagnostic artificial intelligence. Nature. External Links: Document, Link Cited by: §2, Table 1.
  • Wang et al. (2025a) Q. Wang, R. Sheng, Y. Li, H. Qu, Y. Sun, and M. Zhu MedKGI: iterative differential diagnosis with medical knowledge graphs and information-guided inquiring. External Links: 2512.24181, Link Cited by: §2, Table 1.
  • Wang et al. (2025b) R. Wang, T. Vinh, R. Xu, Y. Zhou, J. Lu, F. Pasquel, M. K. Ali, and C. Yang Knowledge graph augmented large language models for disease prediction. External Links: 2512.01210, Link Cited by: §1, §2.
  • Yu et al. (2025) Q. Yu, M. Jin, D. Shu, C. Zhang, L. Fan, W. Hua, S. Zhu, Y. Meng, Z. Wang, M. Du, and Y. Zhang Health-llm: personalized retrieval-augmented disease prediction system. External Links: 2402.00746, Link Cited by: §2, Table 1.
  • Zelin et al. (2024) C. Zelin, W. K. Chung, M. Jeanne, G. Zhang, and C. Weng Rare disease diagnosis using knowledge guided retrieval augmentation for ChatGPT. Journal of Biomedical Informatics 157, pp. 104702. External Links: Document Cited by: §2.

Appendix A Sarcoidosis Case: Negation-Retaining Phenotype Graph

The following is the Negation-Retaining Phenotype Graph output for the corrected Sarcoidosis demonstration case from Section 6, showing present and absent symptom nodes with their HPO identifiers and PrimeKG-derived explains edge weights for each DDx candidate. Patient – present (7):

dyspnea (HP:0002094)
hilar lymphadenopathy (HP:0034388)
mediastinal lymphadenopathy (HP:0100721)
pleural effusion (HP:0002202)
subcutaneous nodule (HP:0001482)
granuloma (HP:0032252)
splenomegaly (HP:0001744)

Patient – denies (1):

palpitations (HP:0001962)

Candidates (green nodes):

Sarcoidosis (ORPHA:797): explains dyspnea (w=3.739), pleural effusion (w=3.317), subcutaneous nodule (w=3.165), mediastinal lymphadenopathy (w=2.781); also linked to ¬\negpalpitations via “denies”
Granulomatosis with polyangiitis: explains pleural effusion (w=3.317), subcutaneous nodule (w=3.165); narrower coverage
Lung TB: no resolved HPO overlap, disconnected node with zero scores
NHL: no resolved HPO overlap, disconnected node
Pulmonary fungal disease: no resolved HPO overlap, disconnected node

Appendix B Evaluation Data

The evaluation set consists of 750 cases drawn from the CUPCase benchmark (Perets et al., 2025) across two cohorts: a 500-case random sample representing the full distribution of clinically uncommon presentations, and a 250-case exact-match sample representing the upper bound of ontology coverage within CUPCase. The full 3,562-case corpus remains unevaluated due to inference time constraints on consumer hardware.

The complete filtered dataset, together with all evaluation scripts and code used in this paper, is publicly available at https://github.com/joetheguide2/NSIDDX-. The raw per-case result files backing this evaluation are part_1_qwen9b_semantic.csv (CUP, 500-case cohort) and exact_qwen9b_semantic.csv (WELL, 250-case cohort). The repository also contains earlier exploratory runs and threshold variants retained for transparency; these do not reflect the final reported numbers, which are the two files named above. Some summary documents in the repository (e.g. disease/symptom counts in the top-level README) report raw, pre-filter counts rather than the corrected, filtered counts used in the scoring pipeline and reported in Section 3.

Appendix C Scoring Mechanism Detail

The scoring engine produces four scores per candidate disease, displayed as HPO_m / KG_m (matrix) and HPO_h / KG_h (hybrid). Both formulas are applied to both sources. Table 7 provides an interpretation guide for reading score combinations in clinical practice.

Matrix Hybrid Clinical interpretation
High High Strong match; disease fits both positive findings and full expected profile
Low High Disease explains findings but patient is missing symptoms the disease requires
Negative Any Active contradiction; inspect grey nodes in graph for specific conflicts
Any Low Weak explanatory fit; disease does not account for the patient’s symptom cluster
Zero Zero No phenotype overlap; consider /rare_disease_scan
HPO high, KG low — KG resolution likely inaccurate; check KG →\rightarrow mapping
Table 7: Four-score interpretation guide. HPO/KG discrepancies surface knowledge graph noise and are flagged for the practitioner.