Computing patient similarity based on unstructured clinical notes
Petr Zelina, Marko Řeháček, Jana Halámková, Lucia Bohovicová, Martin Rusinko, Vít Nováček
TL;DR
The paper addresses the challenge of computing patient similarity from unstructured EHR notes by representing each patient as a matrix of per-note embeddings and evaluating category-specific similarity. It introduces a modular pipeline with segmentation/filtering, multiple embedding methods (LSA, Doc2Vec, sentence-BERT), and three matrix similarity measures (RV coefficient, MaxMax, Edit-Distance), validated against expert annotations. A 50-pivot validation study across 10 clinical categories shows that certain configurations, particularly RV2 with LSA or a combined embedding approach, provide the most reliable similarity for treatment-related categories, though several facets (e.g., social history, allergies) remain challenging. The work demonstrates practical utility for downstream tasks such as personalized therapy recommendations and toxicity warnings, while highlighting the importance of category-focused filtering and robust validation design; the codebase is publicly available for reproduction.
Abstract
Clinical notes hold rich yet unstructured details about diagnoses, treatments, and outcomes that are vital to precision medicine but hard to exploit at scale. We introduce a method that represents each patient as a matrix built from aggregated embeddings of all their notes, enabling robust patient similarity computation based on their latent low-rank representations. Using clinical notes of 4,267 Czech breast-cancer patients and expert similarity labels from Masaryk Memorial Cancer Institute, we evaluate several matrix-based similarity measures and analyze their strengths and limitations across different similarity facets, such as clinical history, treatment, and adverse events. The results demonstrate the usefulness of the presented method for downstream tasks, such as personalized therapy recommendations or toxicity warnings.
