Electronic Health Records (EHRs) are inherently discrete, sparse, and high-dimensional. A single patient’s record might contain a handful of diagnostic codes selected from a vocabulary of tens of thousands of international classification (ICD) codes, alongside specific medication names, lab results, and unstructured clinical notes.
Traditionally, machine learning models treated these medical codes as independent categorical variables (such as through one-hot encoding). However, this approach suffers from the curse of dimensionality and fails to capture clinical reality: it treats "Type 2 Diabetes" and "Diabetic Retinopathy" as completely orthogonal, ignoring the deep biological and sequential relationships between them.
To overcome this, a major research direction focuses on clinical vectorization—mapping discrete medical concepts, patient histories, and clinical narratives into a shared, continuous, low-dimensional latent space. In this space, geometric proximity and directional vectors reflect real-world clinical similarities, statistical co-occurrences, and biological pathways.
The Language of Patient Trajectories
The core intuition behind clinical vectorization relies on a powerful analogy: a patient's medical history can be read like a sentence, where each clinical event is a word.
In natural language processing, algorithms like Word2vec learn the meaning of words by looking at the contexts in which they appear. If two words frequently share similar neighbors, they are projected close together in a vector space. As shown by Gengjie Jia et al. in Estimating heritability and genetic correlations from large health datasets in the absence of genetic data, the same logic applies to medicine. By treating longitudinal diagnosis histories as chronological sequences of tokens, word embedding algorithms can map discrete medical codes into a continuous space where proximity reflects population-level co-occurrence and clinical similarity.
[Patient History Sentence]
Admission 1: Hypertension ──> Admission 2: Hyperlipidemia ──> Admission 3: Myocardial Infarction
When models look at millions of these "patient sentences," they capture latent medical logic without any manual rule-engineering. For instance, Jacek M. Bajor and Thomas A. Lasko demonstrated in Predicting Medications from Diagnostic Codes with Recurrent Neural Networks that high-dimensional embeddings of medical codes autonomously organize into clusters reflecting real-world clinical relationships, such as grouping chronic conditions with their common complications.
To capture these relationships, researchers leverage various architectures:
- Skip-gram and CBOW: Models developed by Maor Lewis et al. in Comparison of deep learning with traditional models to predict preventable acute care use and spending among heart failure patients and Yufeng Zhang et al. in Enhancing heart failure treatment decisions: interpretable machine learning models for advanced therapy eligibility prediction using EHR data use sliding contextual windows across clinical visits to map codes based on temporal proximity.
- Matrix Factorization: Frameworks like the one proposed by Everett Neil Rush et al. in Clinical knowledge extraction via sparse embedding regression (KESER) with multi-center large scale electronic health record data apply Singular Value Decomposition (SVD) to temporal co-occurrence matrices, abstracting away individual patient identities while preserving macro-level clinical semantics.
- Graph Embeddings: Rather than treating records as flat sequences, Fahmida Liza Piya et al. in HealthGAT: Node Classifications in Electronic Health Records using Graph Attention Networks structure EHR data as a graph, learning embeddings that capture multi-layered relationships between diagnoses and procedures based on their structural connectivity.
The Geometry of Clinical Vector Arithmetic
Why project clinical data into a continuous space instead of keeping it discrete? The answer lies in the power of geometric operations. In a well-constructed latent space, spatial distance and direction correspond directly to clinical concepts, allowing researchers to perform "clinical vector arithmetic."
In The high-dimensional space of human diseases built from diagnosis records and mapped to genetic loci, Gengjie Jia et al. mapped the entire spectrum of human illness into a continuous, 20-dimensional embedding space. They demonstrated that vectors can be added or subtracted to model how diseases combine, interact, and progress over time.
Similarly, Thomas Beaney et al. in Identifying multi-resolution clusters of diseases in ten million patients with multimorbidity in primary care in England showed that these high-dimensional vector representations allow for the discovery of clinical analogies and shared underlying etiologies. For example, the directional vector moving from a mild condition to its severe manifestation remains consistent across different organ systems, allowing models to identify unexpected disease clusters across millions of patients.
Disease Vector A (Diabetes) + Disease Vector B (Hypertension) = Latent Risk State (Metabolic Syndrome)
By mapping diverse clinical entities into a shared latent space, as explored by Phuoc Nguyen et al. in Resset: A Recurrent Model for Sequence of Sets with Applications to Electronic Medical Records, models can use geometric operations to bypass manual feature engineering entirely, automatically discovering complex medical patterns and treatment interactions directly from raw data.
Unifying Heterogeneous Modalities
Patients do not exist solely as a list of billing codes; their states are captured in free-text clinical notes, online forum posts, and external medical literature. Clinical vectorization serves as a universal translator, bridging the gap between these heterogeneous modalities by mapping them into the same continuous space.
Bridging Layman and Professional Language
Patients describing symptoms online rarely use formal medical ontologies (e.g., writing "heart fluttering" instead of "atrial fibrillation"). Nigel Collier in NLP and Online Health Reports: What do we say and what do we mean? highlighted how representation learning can learn shared embeddings for lay terms and clinical concepts. This allows public health surveillance systems to recognize health-related events even when formal medical vocabulary is absent.
Grounding Codes in Medical Knowledge
Standardized codes are often cryptic. To enrich them, Hongda Sun et al. in Debiased, Longitudinal and Coordinated Drug Recommendation through Multi-Visit Clinic Records converted categorical codes into natural language descriptions to generate richer semantic embeddings. Taking this further, Ran Xu et al. developed RAM-EHR: Retrieval Augmentation Meets Clinical Predictions on Electronic Health Records, which uses a dual-encoder dense retrieval model to align the latent representations of discrete medical codes with external medical knowledge passages, overcoming the limitations of exact string matching.
Integrating Unstructured Text and Audio
Modern clinical vectorization increasingly relies on domain-specific transformers (such as ClinicalBERT) to ingest free-text clinical narratives and output high-dimensional embeddings (Jing Ma and Shuai Niu in Modelling Patient Longitudinal Data for Clinical Decision Support: A Case Study on Emerging AI Healthcare Technologies). Even unstructured audio transcripts can be summarized and mapped into these vector spaces to detect subtle shifts in disease pathology, as demonstrated by James Anibal in Generative AI and unstructured audio data for precision public health.
Ultimately, by transforming discrete, isolated data points into continuous trajectories within a mathematically structured latent space, clinical vectorization allows deep learning models to internalize the complex, non-linear dependencies of human health and disease progression.
Key Foundational Work
Control Matching via Discharge Code Sequences (2016) — contributed 2 concept elements to this direction.