ISoLA & AISoLA 2026

International Symposium on Leveraging Applications of Formal Methods, Verification, and Validation • Kos, Greece

Talk

Automated Historical Cause-of-Death Coding Using Fine-Tuned Language Models

Time: Sunday, 25.10

Room: Room 4

Authors: Elias Lunøe, Lucas Mortensen

Abstract: Historical mortality research depends on cause-of-death (CoD) records that must be coded into a standardized classification before they can be analyzed. For nineteenth- and early twentieth-century sources this coding is done by hand, by scarce specialists who interpret archaic, abbreviated, and multilingual disease terms and map each to the historical ICD-10h classification of roughly 14,000 codes. The coding stage is slow and expensive, and for large digitized registers it is often the bottleneck that determines whether a research question is feasible at all. We investigate whether a fine-tuned, task-specific language model can serve as a practical replacement for manual ICD-10h coding. We fine-tune FLAN-T5 at four sizes on about 1.5 million hand-coded death records from five European registers (1853-1939) spanning Danish, Dutch, English, Spanish, and French, using a locked, leakage-checked train/validation/test split. On the held-out test set the largest model reaches a macro-averaged F1 of 0.765 and near-saturated record-level accuracy of about 0.98, with performance rising monotonically with model size. We benchmark the approach against a ladder of baselines on the identical split: a majority-class floor, multilingual sentence-embedding retrieval, a classical TF-IDF model with a linear classifier, and an agentic large language model equipped with masterlist access and open web search. The fine-tuned model outperforms the strongest baseline by roughly a factor of 2.4 on macro-F1. A controlled study of the input representation yields a finding of independent interest: adding structured metadata (age and sex) helps the fine-tuned model but degrades every baseline, because only a model that learns to weight these fields benefits from them rather than being misled by them. Finally, we examine uncertainty-informed selective classification, using the model's calibrated confidence to defer ambiguous records to expert review while auto-accepting the confident majority, a workflow suited to historical demography in practice. The result is a deployable, reproducible coder that materially relieves the manual coding bottleneck while keeping a human in the loop for the hardest cases.