- The paper introduces a novel framework that distills survival risk from Cox models into a large language model via prompt-based supervised fine-tuning.
- It demonstrates that LLM predictions achieve comparable discrimination (ΔC-index < 0.01) and calibration across multiple clinical datasets.
- The approach leverages LoRA fine-tuning to embed continuous risk representations, enabling flexible clinical risk assessment without bespoke survival heads.
Cox-Supervised Distillation of Survival Risk into LLMs
Introduction
The paper "From Hazard Functions to Language Space: Cox-Supervised Distillation of Survival Risk into a LLM" (2606.08945) presents a framework for transferring clinically calibrated, time-to-event risk information from a Cox proportional hazards model to a generative LLM via prompt-based supervised fine-tuning. The pipeline reformulates survival analysis as a text-generation task by encoding structured clinical covariates as natural-language prompts, using the Cox model to generate patient-level survival risk targets, and fine-tuning a Qwen-based LLM to autoregressively output Cox-consistent survival risk estimates. This research rigorously evaluates model discrimination, calibration, and latent-state risk geometry across multiple clinical datasets.
Methodology
The pipeline entails several critical stages:
- Cox Model Fitting and Risk Target Generation: For each dataset (WHAS500, GBSG2, ACTG320), a Cox proportional hazards model is fitted on the training partition, producing patient-specific survival risk estimates (e.g., 1-year risk ri​=1−Si​(τ)) serving as supervision targets.
- Prompt Engineering: Tabular clinical covariates are rendered as canonicalised text prompts including a fixed task instruction (standardising prediction as 1-year risk between 0 and 1), followed by the clinical fields and a "Risk:" cue.
- LoRA-based Fine-tuning: A Qwen2.5-1.5B-Instruct LLM, quantised to 4-bit, is fine-tuned using Low-Rank Adaptation (LoRA), with all supervision presented as prompt--completion pairs where the "completion" is a tokenised string representation (e.g., "0.2374") of the Cox-derived risk estimate. The fine-tuning occurs with completion-only loss, keeping base model weights fixed except for injected low-rank adapters.
- Inference and Risk Recovery: Autoregressive decoding on held-out samples; predicted risk values are parsed from generated text using regular-expression extraction on the output.
- Evaluation: Predictive discrimination (Harrell’s C-index), numerical calibration error, and percentile-based NRI are evaluated against ground-truth time-to-event data and the Cox teacher model.
The overall workflow is illustrated in (Figure 1).
Figure 1: Text-based survival risk prediction via Cox-supervised LLM training.
Experimental Results
Evaluation spans three datasets representing cardiovascular (WHAS500), oncology (GBSG2), and HIV (ACTG320) populations, each with differing covariate complexity and event distributions.
Notable Claims and Strong Results
- The LLM learns competitive survival risk discrimination and calibration via Cox-based language supervision despite lacking a task-specific survival objective.
- The model’s latent space supports smooth, continuous risk encoding, as opposed to discrete class partitioning, demonstrating effective internalisation of survival-risk geometry from the Cox output.
- No evidence is found for meaningful NRI improvement over the Cox model; performance is consistently competitive but does not surpass the teacher.
- Substantial parameter efficiency is achieved; only ∼1.2% of model parameters are updated during LoRA fine-tuning.
Theoretical and Practical Implications
This work establishes that LLMs, when supervised with explicitly calibrated Cox model outputs via prompt-based SFT, can internalise survival risk structure at clinically competitive levels in the absence of domain-specific risk objectives. The approach circumvents requirements for bespoke survival heads or regression-specific tuning, leveraging natural-language input to unify disparate tabular schemas. This could enable greater flexibility in clinical deployment—especially where feature types, documentation conventions, or data pipeline idiosyncrasies impede the standardisation of tabular ML frameworks.
However, the Cox teacher necessarily bounds the predictive information available for distillation; further, the computational overhead for LLM fine-tuning far exceeds Cox model training, and the absence of explicit censored-data loss could limit extrapolation in non-standard survival settings. There is also no evidence that this pipeline can reliably outperform established classical models in terms of calibration or discrimination. Generalisation to broader clinical event types, heterogeneous prompt structures, or missingness patterns without re-tuning remains unverified.
Future Directions
Open questions include:
- Robustness of the LLM to prompt schema drift, missing covariates, or out-of-distribution feature values.
- Extension to endogenous self-supervised risk pretraining, moving beyond teacher-student distillation.
- Mechanistic analysis of LLM interpretability in survival-risk stratification along clinical axes.
- Ultra-scale experiments with larger LLMs or in-context learning for time-to-event tasks without explicit supervision.
- Deployment studies assessing language-based survival models under real-world data harmonisation and regulatory considerations.
Conclusion
The Cox-supervised LLM risk-distillation pipeline demonstrates that generative LLMs can act as clinically meaningful risk estimators when supervised by calibrated survival-model output, achieving strong discrimination and calibration without specialised survival losses or model heads. The capacity for smooth continuous risk encoding in language-model latent space is empirically established. While the approach does not outperform classical Cox models, it provides a flexible substrate for future developments in LLM-based clinical prediction in the context of heterogeneous, partially structured datasets.