arXiv:2610.03176cs.CLOct 2026

Manuscript Offprint

arXiv:2610.03176

Hindsight-Guided Rationale Distillation for Rare Disease Diagnosis

Aarav Singh, Animesh Pathak, Navyansh Singh

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

Abstract

We study hindsight-guided distillation for rare disease diagnosis on ZebraMap: a 1.5B student is fine-tuned on chain-of-thought traces from a 8B teacher that observes the ground-truth diagnosis during generation. Absolute accuracy remains low for all models—the task is hard at this scale—but within this ceiling a filtered variant (StudentF) achieves a small, statistically significant accuracy advantage over the teacher (p<0.001), concentrated in better-represented diseases. The unfiltered student does not significantly outperform the teacher (p=0.129), establishing that contamination filtering—not hindsight distillation alone—drives the gain.

The gap traces to an artifact we term GT hallucination. Label-visible generation causes the teacher to embed “ground truth is X” phrases in its reasoning chain; SFT copies the pattern. At inference, the unfiltered student reproduces the phrase in 33.9% of cases, with severe accuracy degradation when the hallucinated label is wrong. A regex filter removing these slots reduces contamination to near-zero, producing the observed gain—though the effect remains small. We precisely quantify this gain-cost tradeoff, document frequency-dependent knowledge transfer absent from the RL-trained teacher, and characterize a calibration gap that SFT does not close—identifying both as directions for future work.

1 Introduction

Rare diseases collectively affect an estimated 263–446 million people worldwide (Nguengang Wakap et al., 2020; Bruckner-Tuderman, 2021), yet clinical NLP research focuses predominantly on common conditions. ZebraMap (Islam et al., 2026b)—a multimodal resource constructed from 36,131 PubMed case report articles into 69,146 patient-level narratives and 98,038 clinical images across 1,727 rare diseases—provides a principled testbed for diagnostic reasoning on underrepresented conditions.

Deploying large reasoning models in resource-constrained clinical settings requires smaller, distilled models (Hinton et al., 2015; Xu et al., 2024). Standard CoT distillation (Wei et al., 2022) samples teacher traces on unseen inputs for behavioral cloning (Ho et al., 2023; Magister et al., 2023), limiting knowledge transfer to what the teacher already knows without label guidance. We study hindsight-guided distillation: both teacher and student are LLMs. We generate each training trace by showing the teacher—a 8B reasoning model—the patient case narrative together with the ground-truth diagnosis, so its reasoning chain explicitly connects patient evidence to the confirmed diagnosis. The student—a 1.5B model—is then trained by supervised fine-tuning (SFT) to predict the teacher's full trace (reasoning plus <diagnosis> tag) from the narrative alone; at inference it receives only the narrative and must commit to a diagnosis. Throughout, StudentF denotes the student trained on traces from which a regex filter has removed every explicit "ground truth is X" slot, and Student denotes the unfiltered ablation trained on the raw traces. This is related to STaR (Zelikman et al., 2022) but uses a dedicated external teacher rather than self-generated rationales.

Trace contamination, instantiated as GT phrases. Trace contamination from label-visible generation is a known phenomenon (Green et al., 2025; Turpin et al., 2023): when teacher traces contain privileged information, this information can leak into student outputs through pattern-copying. In our setting, this manifests as explicit “ground truth is X” phrases—the most common construction appearing in teacher reasoning traces. Label-visible prompting causes DeepSeek-R1-Distill-LLaMA-8B (Guo et al., 2025) to write this phrase in its transparent reasoning chain, and

∗^{*}Equal contribution.

SFT faithfully copies the structural pattern (Turpin et al., 2023). At inference, Student reproduces the phrase despite no label access, wrong in 89.1% of contaminated cases, causing a 18 percentage point Accuracy collapse. We refer to this specific instantiation as Ground Truth (GT) hallucination.

Regex-based filtering and its limits. The natural data-centric response is to remove GT reference slots from training traces before SFT. We train two variants on the same 18,388 cases:

(1) StudentF: trained on regex-filtered traces with all “ground truth is X” slots removed. Produces near-zero GT phrases at inference (3/2,000 traces retain contamination).

(2) Student: trained on raw traces. Serves as an ablation quantifying what unfiltered hindsight distillation produces.

StudentF exceeds the teacher on Accuracy across all metric variants (+0.040, p<0.001). The unfiltered Student, by contrast, does not significantly outperform the teacher (p=0.129), demonstrating that filtering is necessary to realise the advantage. The gain of filtering over the unfiltered Student (+0.024, p<0.05) is partly offset because static filtering cannot distinguish labels that would be reproduced correctly at inference from those that would not—and correct labels provide genuine diagnostic value (Student Accuracy on the GT-correct stratum: 0.7703).

References (1)