Hindsight-Guided Rationale Distillation for Rare Disease Diagnosis
Organizations: Dr. Shyama Prasad Mukherjee International Institute of Information Technology, Naya Raipur
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.
Figures & tables
| Metric | Base | Student | StudentF | Teacher |
| Mentioned (proxy only) | 0.191 [0.162, 0.221] | 0.255 [0.223, 0.288] | 0.255 [0.222, 0.287] | 0.253 [0.220, 0.287] |
| Accuracy (primary) | 0.069 [0.054, 0.083] | 0.172 [0.147, 0.198] | 0.196 [0.170, 0.223] | 0.155 [0.133, 0.179] |
| Accuracy, upper bound | — | 0.174 [0.149, 0.200] | 0.197 [0.170, 0.224] | 0.163 [0.140, 0.187] |
| Accuracy, format-compliant ( ) | — | 0.175 [0.149, 0.202] | 0.198 [0.171, 0.226] | 0.163 [0.139, 0.187] |
| <diagnosis> present | — | 0.987 | 0.991 | 0.962 |
| Mean response length (chars) | 1950 | 4098 | 3753 | 3421 |
| Comparison | Metric | RD [95% CI] | Cohen’s [95% CI] |
| Primary (M3/Accuracy) | |||
| StudentF vs. Teacher | Acc. | [ , ] | [ , ] |
| Student vs. Teacher | Acc. | [ , ] | [ , ] |
| StudentF vs. Student | Acc. | [ , ] | [ , ] |
| StudentF vs. Base | Acc. | [ , ] | [ , ] |
| Conservative bounds | |||
| Stratum (defined by Student’s reasoning chain) | Student Accuracy | StudentF Accuracy | Teacher Accuracy | |
| No GT phrase | 1322 | 0.2050 [0.1735, 0.2373] | 0.2194 [0.1891, 0.2504] | 0.1793 [0.1502, 0.2094] |
| GT phrase, label correct | 74 | 0.7703 [0.6712, 0.8611] | 0.5000 [0.3803, 0.6164] | 0.2973 [0.1867, 0.4143] |
| GT phrase, label wrong | 604 | 0.0265 [0.0142, 0.0408] | 0.1060 [0.0810, 0.1329] | 0.0960 [0.0721, 0.1219] |
| Q | Freq | Stud Acc. | SF Acc. | Teach Acc. |
| Q1 | 7 | 0.104 [0.068, 0.143] | 0.133 [0.096, 0.174] | 0.148 [0.107, 0.191] |
| Q2 | 13 | 0.115 [0.075, 0.159] | 0.139 [0.095, 0.188] | 0.137 [0.091, 0.188] |
| Q3 | 25 | 0.185 [0.141, 0.234] | 0.214 [0.159, 0.270] | 0.159 [0.113, 0.208] |
| Q4 | 59 | 0.286 [0.226, 0.349] | 0.298 [0.238, 0.359] | 0.177 [0.131, 0.226] |
| +0.306 ∗∗ | +0.242 ∗ | +0.029 (ns) | ||
| OLS | +0.064 ∗∗ | +0.058 ∗ | -0.000 (ns) |
| Metric | Student | StudentF | Teacher |
| Think length (chars) | |||
| Self-corrections | |||
| Expl. uncertainty | 4.53 | 2.12 | 4.09 |
| Confident assertions | 0.31 | 0.51 | 0.67 |
| SC ratio ( / ) | 1.5143 [1.2969, 1.7884] | 1.3365 [0.9646, 1.9537] | 1.4650 [1.0984, 2.0598] |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset — ZebraMap Islam et al. (2026b) | |
| Eval set | 250 diseases 8 cases 2,000 |
| Train set | 1,090 diseases, 18,388 cases (4 quality filters) |
| Splits | Raw CoT Student; GT-redacted CoT StudentF |
| Hindsight trace generation | |
| Teacher | DeepSeek-R1-Distill-LLaMA-8B Guo et al. (2025) (GGUF Q4_K_M) via llama.cpp |
| Input | Case narrative + ground-truth label |