Condition-Gated Reasoning for Context-Dependent Biomedical Question Answering
Organizations: University of Illinois Urbana-Champaign · National Institutes of Health
Abstract
Current biomedical question answering (QA) systems often assume that medical knowledge applies uniformly, yet real-world clinical reasoning is inherently conditional: nearly every decision depends on patient-specific factors such as comorbidities and contraindications. Existing benchmarks do not evaluate such conditional reasoning, and retrieval-augmented or graph-based methods lack explicit mechanisms to ensure that retrieved knowledge is applicable to given context. To address this gap, we propose CondMedQA, the first benchmark for conditional biomedical QA, consisting of multi-hop questions whose answers vary with patient conditions. Furthermore, we propose Condition-Gated Reasoning (CGR), a novel framework that constructs condition-aware knowledge graphs and selectively activates or prunes reasoning paths based on query conditions. Our findings show that CGR more reliably selects condition-appropriate answers while matching or exceeding state-of-the-art performance on biomedical QA benchmarks, highlighting the importance of explicitly modeling conditionality for robust medical reasoning.
Figures & tables
| Reasoning Category | % | Example(s) |
|---|---|---|
| Comorbidity & Organ-Based Contraindications | 57 | Doc 1: Treatment for major depressive disorder includes antidepressants such as bupropion , sertraline , and fluoxetine . Bupropion acts as a norepinephrine-dopamine reuptake inhibitor. |
| Doc 2: Bupropion lowers the seizure threshold and is contraindicated in patients with bulimia nervosa or other eating disorders due to elevated seizure risk. | ||
| Q: Which antidepressant for MDD is contraindicated in patients with bulimia ? | ||
| A: Bupropion (w/o condition: Sertraline ) | ||
| Diagnostic Modality Selection | 23 | Doc 1: For suspected appendicitis , diagnostic imaging options include CT scan , ultrasound , and MRI . CT scan has the highest sensitivity in adult populations. |
| Doc 2: In pediatric patients , ultrasound is the preferred first-line imaging modality to avoid ionizing radiation exposure , with CT reserved for inconclusive cases. |
| Dimension | Gwet’s AC | % Agree (all) | % Agree (pair) |
|---|---|---|---|
| Conditionality | 0.96 (AC1) | 96.7 | 97.8 |
| Answer Accuracy | 0.67 (AC1) | 66.7 | 77.8 |
| Question Quality | 0.60 (AC2) | 56.7 | 71.1 |
| Method | CondMedQA | MedHopQA | MedHopQA (Cond) | BioASQ-B | ||||
|---|---|---|---|---|---|---|---|---|
| EM | F1 | EM | F1 | EM | F1 | EM | F1 | |
| GPT-5.2 | ||||||||
| Zero-Shot | 22.00 | 41.29 | 20.50 | 47.87 | 28.27 | 53.52 | 13.00 | 40.21 |
| RAG | 44.00 | 52.36 | 51.25 | 62.61 | 45.71 | 55.04 | 31.80 | 54.80 |
| CoT | 40.00 | 52.81 | 49.50 | 57.55 | 50.00 | 59.38 | 25.60 | 47.81 |
| HippoRAG2 | 46.00 | 67.56 | 45.00 | 60.81 | 48.57 | 72.82 | 22.60 | 43.57 |
| Method | CondMedQA | MedHopQA | MedHop (C) | |||
|---|---|---|---|---|---|---|
| EM | F1 | EM | F1 | EM | F1 | |
| CGR w/o gating | 57.0 | 60.2 | 72.5 | 76.8 | 62.9 | 73.5 |
| CGR | 82.0 | 86.7 | 86.8 | 89.9 | 80.0 | 85.4 |
| Extractor | CondMedQA | MedHopQA | MedHop (C) | Tok/s | s/doc | |||
|---|---|---|---|---|---|---|---|---|
| EM | F1 | EM | F1 | EM | F1 | |||
| Flan-T5-Large | 65.00 | 66.67 | 85.00 | 90.00 | 70.00 | 77.33 | 1053.95 | 21.69 |
| LLaMA-3.2-3B | 65.00 | 66.67 | 85.00 | 90.00 | 85.00 | 88.33 | 932.12 | 15.04 |
| Qwen2.5-14B | 65.00 | 66.67 | 85.00 | 92.50 | 85.00 | 88.33 | 1077.55 | 15.08 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Document 1: HIV Treatment |
|---|
| “A large study in Africa and India found that a PI-based regimen was superior to an NNRTI-based regimen in children less than 3 years who had never been exposed to NNRTIs in the past. Thus the WHO recommends PI-based regimens for children less than 3 . In pregnant women , viral load is proportional to transmission risk; ART reduces transmission to mothers and infants before, during, and after delivery .” |
| Extracted N-Tuples: |
| PI-based regimen, superior_to , NNRTI-based regimen, [ children <3 years , not exposed to NNRTI ] |
| WHO, recommends , PI-based regimen, [ children <3 years ] |
| viral load, proportional_to , transmission risk, [ pregnant women ] |
| ART, reduces , transmission risk, [ pregnant women , before/during/after delivery ] |
| Example 1: “Which gene causes cardiomyopathy in pediatric patients but not in adults?” | |
|---|---|
| K (keywords) | [gene, cardiomyopathy, causes] |
| C (required) | [pediatric, in children] |
| C (excluded) | [in adults, adult patients] |
| N (negated) | [] |
| Interpretation: K matches nodes related to genes and cardiomyopathy. C gates traversal: only edges with pediatric/child conditions are followed; edges conditioned on adults are blocked. | |
| Example 2: “What drug treats hypertension in pregnant women, excluding ACE inhibitors?” | |
| Example 1: “Which gene causes cardiomyopathy in pediatric patients but not in adults?” | |
|---|---|
| Conditions | [pediatric, in children, in adults, adult patients] |
| Output | {‘‘pediatric’’: true, ‘‘in children’’: true, ‘‘in adults’’: false, ‘‘adult patients’’: false} |
| Gating result: Edges conditioned on “pediatric” or “in children” are traversable ( ); edges conditioned on “in adults” or “adult patients” are blocked ( ). | |
| Example 2: “What antibiotic is safe for a 5-year-old boy with pneumonia and no known allergies?” | |
| Conditions | [in children, in adults, penicillin allergy, renal impairment, pregnancy] |
| Output | {‘‘in children’’: true, ‘‘in adults’’: false, ‘‘penicillin allergy’’: false, ‘‘renal impairment’’: null, ‘‘pregnancy’’: false} |
| Error Type | QID | Question | Gold | Predicted | Diagnosis |
|---|---|---|---|---|---|
| Retrieval (11/18) | 23 | What antibiotic is recommended for treating scrub typhus during pregnancy ? | Azithromycin | Doxycycline | Gold tuple with pregnancy condition exists in KG but not in top-ranked paths; typhus–doxycycline edge dominates ranking. |
| 74 | Which multikinase inhibitor is most effective for hepatocellular carcinoma in advanced (BCLC-C) unresectable disease ? | Sorafenib | Insufficient evidence | Gold tuple with BCLC-C condition in KG; top paths traverse unrelated edges. Gold never reaches evidence assembly. | |
| Extraction (5/18) | 65 | Which csDMARD that has the side effect of liver cancer is the most effective for ankylosing spondylitis in peripheral arthritis ? | Methotrexate | Insufficient evidence | Methotrexate not extracted from source documents; KG lacks the gold entity entirely. |
| 96 | Which anxiolytic is preferred for generalized anxiety disorder in a patient who has myasthenia gravis ? | Buspirone | Sertraline | Buspirone absent from KG. Model correctly avoids benzodiazepines and selects SSRI; normalization maps SSRI to an incorrect canonical form. | |
| Reasoning (2/18) | 28 | What imaging test is preferred for suspected pulmonary embolism in a pregnant patient due to lower radiation exposure? | V/Q scan | MRI w/o contrast | V/Q is the guideline alternative to CTPA in pregnancy; model over-optimizes for radiation avoidance and selects MRI. |
| 99 | Which antimycobacterial drug should be replaced in the RIPE regimen for a patient who is HIV-positive and receiving protease inhibitors ? | Rifabutin | Rifampin | Gold present in retrieved paths. Model answers the drug to be replaced (rifampin) rather than the replacement (rifabutin). |
Biomedical QA
Biomedical question answering develops systems that answer health and life-science questions using clinical knowledge, research literature, and structured data.
See all 51 papers