Language models that write clinical text, such as discharge summaries and treatment recommendations, often add claims that appear nowhere in the patient's record. A typical example is "start drug X for condition Y." Today's fact-checkers can only call such a claim unverifiable, because the reference text says nothing about it. Learned detectors that score it anyway tend to pick up the writing style of whichever model produced their training data. They then fail when the text comes from a different model or was sampled with different decoding settings.
We propose a different signal: score each added drug–condition claim by how close the drug's protein targets sit to the condition's genes in a biomedical knowledge graph. This measure, called network proximity, depends only on the biology named in the claim. It does not depend on who wrote the sentence or how. We therefore expect it to keep working across generators where style-based detectors break.
Core Claim
The contribution is a hallucination detector for one specific blind spot. Fact-checkers that split text into small claims and compare them with a reference handle contradictions well. They have no evidence at all for extrinsic claims, meaning plausible-sounding additions with no reference support. We claim that network proximity supplies graded, generator-independent evidence for exactly these claims, when computed in PrimeKG relative to the patient's own conditions. We further claim that a detector built on this evidence loses much less accuracy when moved to an unseen generator than detectors trained on text.
The claim is deliberately narrow, and the patient record plays a specific role. Multimodal clinical data, meaning structured diagnosis codes, medication orders, lab results, and findings in radiology and progress notes, defines whose disease neighborhood a claim is measured against. It is not used as model input. Imaging enters only through radiology reports, not pixels. We state this limitation openly.
Prior Work and Where This Sits
Three bodies of work motivate the gap.
- Clinical models fail on open-ended clinical work. ClinicBench evaluates 22 language models on open-ended clinical tasks. Models below 20% F1 on treatment recommendation and near-random performance on drugs approved recently are its findings. Neural-MedBench stress-tests vision-language models on complex neurology cases and attributes 51% of errors to failures of reasoning rather than perception. Both benchmarks measure the failure; neither offers a way to catch it.
- Text-trained detectors do not generalize. RAID shows detectors losing up to 32 accuracy points under a repetition penalty. It also reports a cross-domain example in which accuracy falls from 95% to 60%. M4 shows the same collapse across generators, domains, and languages. These results constrain our design: any feature tied to surface statistics is suspect.
- Claim-level checking against references is the method we reuse. REFCHECKER extracts (subject, relation, object) triplets and labels each against a reference as entailed, contradicted, or neutral. FactAlign aligns extracted triplets to a reference graph and separates intrinsic hallucinations (contradicting the source) from extrinsic ones (unverifiable additions). Both operate on general-domain text references. We keep their claim-extraction stage and replace their dead-end "neutral" or "extrinsic" label with a biological plausibility score.
The proximity side supplies the core mechanism. PrimeKG has already shown that 8 of 10 drug–disease pairs approved after its cutoff sit significantly closer than chance. This was a population-level validation on a static graph and was never applied to generated text. MD-Miner builds patient-specific signaling networks and reports a five-fold gain in drug selection success over random. That result supports the idea of measuring proximity from a patient-specific seed set rather than a generic disease. Target Prioritization finds that genes deregulated by a drug cluster around the drug's target in the network. This supports reading proximity as a mechanistic signal rather than an artifact.
The closest existing combination is a paper that uses language models to extract knowledge-graph modules and studies their proximity (psychosomatic KG proximity). It treats the language model as a trusted extractor. We invert that relationship and use proximity to audit the language model's output.
Research Program
The pipeline has three stages: extract claims, map them into PrimeKG, and score them.
Extraction. We extract drug–relation–condition triplets from generated clinical text using a REFCHECKER-style extractor.
Mapping. We map drugs and conditions to PrimeKG nodes. We also build the patient's seed set from MIMIC-IV diagnosis codes, active medications, and conditions mentioned in the notes.
Scoring. For a drug with target set $T$ and a condition with gene set $S$, we compute the standard closest-distance proximity. Let $d(t,s)$ be the shortest-path length in the protein layer of PrimeKG. Then
$$d(T,S)=\frac{1}{|T|}\sum_{t\in T}\min_{s\in S} d(t,s), \qquad z=\frac{d(T,S)-\mu_{\text{rand}}}{\sigma_{\text{rand}}},$$
where $\mu_{\text{rand}}$ and $\sigma_{\text{rand}}$ are the mean and standard deviation of $d$ over random target and gene sets matched for node degree. Degree matching matters because heavily studied drugs have many connections and would otherwise look close to everything.
The detector combines several features into a small logistic model:
- $z$ for the stated condition;
- $z$ to the patient's comorbidity module;
- the existence and length of any path that runs through a contraindication edge (PrimeKG contains over 61,000 such edges);
- REFCHECKER's three-way label against the patient's record.
The model has few parameters on purpose. Its features carry no information about the generator's style, so the cross-generator gap has little room to open.
Evaluation data. We will build a claim-level clinical hallucination set. Generators include open models, which also permit white-box baselines, and at least one closed model. They will write treatment recommendations and discharge medication sections for MIMIC-IV admissions. We also use ClinicBench's treatment-recommendation and emerging-drug tasks through its codebase.
Clinicians label each extracted claim as supported by the record, contradicted, or extrinsic. Extrinsic claims are further labeled as clinically appropriate or inappropriate. Only natural model outputs are labeled. We do not create negatives by swapping in random drugs, because random distractors are almost always far away in the graph and would make proximity win trivially.
Baselines
Naive references. Two simple baselines set the floor. The first flags every extrinsic claim as hallucinated. The second is a popularity-only score: how often the drug appears in MIMIC-IV across all patients. If proximity cannot beat drug popularity, it adds nothing.
Strongest existing method. The strongest competitor is REFCHECKER run against the patient's full note history as the reference, with a strong model as the checker. On KNOWHALBENCH it outperformed SelfCheckGPT and FacTool by 18.2 to 27.2 points. Claim-level decomposition alone added about 10 Macro-F1 points over sentence-level checking (REFCHECKER). FactAlign reports 0.889 F1 on WikiBio GPT-3, but on general text (FactAlign). We found no reported result on Lacuna for claim-level hallucination detection on MIMIC-IV or ClinicBench outputs, so we will run both checkers ourselves. They will share the same extractor, the same claims, and the same checker model as our method. This isolates the scoring stage.
Learned and white-box detectors. A supervised RoBERTa or ELECTRA classifier fine-tuned on labeled claims from one generator is the shortcut-prone comparison. M4 found ELECTRA generalizes better to unseen domains, so it is the stronger version of this baseline. On open generators we add RAUQ, which reads uncertainty from attention heads at under 1% added latency and requires white-box access. All learned components receive the same labeled training claims and the same hyperparameter search budget.
Ablations. Two ablations isolate the key ingredient. Edge-lookup-only asks whether PrimeKG contains a direct indication or contraindication edge, with no path computation. Global-versus-patient proximity tests whether the patient's own record actually matters.
What counts as beating the baselines. We would claim success if two things hold. First, on extrinsic claims the full detector exceeds REFCHECKER's fallback and edge-lookup by a confidence interval that excludes zero, measured by AUROC and by recall at a fixed 5% false-positive rate (following RAID's protocol). Second, its in-generator minus out-of-generator AUROC gap is clearly smaller than the supervised classifier's.
Why not just…?
Why not just look up the edge in PrimeKG? This is the most serious threat. For common drugs and indications, a direct edge may decide most claims. Our answer is a measurement, not an argument. We stratify claims by whether any direct edge exists. Proximity can only earn its place in the uncovered stratum: off-label, rare-disease, and recently approved drugs, which is where ClinicBench finds models near random. If edge lookup matches the full detector even in that stratum, we will report that proximity adds nothing beyond graph coverage and drop the proximity claim.
Why not just fine-tune a clinical hallucination classifier? RAID and M4 show that detectors trained on one generator or domain lose large amounts of accuracy elsewhere. Our leave-one-generator-out and changed-decoding splits measure this directly. If a fine-tuned ELECTRA shows no larger gap than our detector in those splits, then the generalization half of our claim fails.
Why not just use co-prescription frequency from the EHR? A drug often ordered alongside a diagnosis in MIMIC-IV is probably appropriate, and this costs nothing to compute. We include it both as a baseline and as a feature. We expect it to be strong for common drugs and empty for emerging ones, which have no prescription history. The stratified results will show whether proximity contributes anything once frequency is in the model.
Why not just ask a stronger model to self-check? Neural-MedBench reports GPT-4o passing only 9.67% of its cases. REFCHECKER found that model-based checkers lean on their own internal knowledge instead of the reference. A self-check therefore inherits the generator's blind spots. We run it anyway as an additional checker variant with the same claims.
Decisive Checks
Three results would settle the proposal.
- Extrinsic-claim stratum. We compare the full detector, edge lookup, frequency, and REFCHECKER on extrinsic claims, broken down by drug approval date and graph coverage. This directly tests whether proximity carries signal where references are silent.
- Generator and decoding shift. We train on one generator and test on the rest, and we also test under RAID-style changes in temperature and repetition penalty. The proximity features should barely move under these shifts, while text-based detectors should degrade.
- Degree-confound control. We repeat the main comparison with proximity scores that are not degree-corrected. If the advantage disappears once degree matching is applied, the method is detecting drug popularity, not biology.
A negative result on the first check would still be useful. It would mean that biological network distance, despite its record in drug repurposing, does not separate appropriate from inappropriate clinical additions at the level of individual claims.
References
- Building a knowledge graph to enable precision medicine
- Large Language Models Are Poor Clinical Decision-Makers: A Comprehensive Benchmark
- Beyond Classification Accuracy: Neural-MedBench and the Need for Deeper Reasoning Benchmarks
- RAID: A Shared Benchmark for Robust Evaluation of Machine-Generated Text Detectors
- M4: Multi-generator, Multi-domain, and Multi-lingual Black-Box Machine-Generated Text Detection
- Knowledge-Centric Hallucination Detection
- FactAlign: Fact-Level Hallucination Detection and Classification Through Knowledge Graph Alignment
- MD-Miner: a network-based approach for personalized drug repositioning
- Drug target prioritization by perturbed gene expression and network information
- Research on the proximity relationships of psychosomatic disease knowledge graph modules extracted by large language models
- Efficient Hallucination Detection for LLMs Using Uncertainty-Aware Attention Heads