Electronic health record foundation models typically treat ICD diagnosis codes as flat tokens, overlooking the clinically meaningful hierarchical structure that captures disease families, subcategories, and fine-grained diagnostic detail. As a result, existing EHR representation learning methods do not explicitly exploit the hierarchical structure already present in the coding system. In this work, we study ICD-10-CM hierarchy as a general inductive bias for clinical representation learning. We investigate two complementary mechanisms for incorporating hierarchy: first, by augmenting diagnosis sequences in a BERT-style transformer with tokens corresponding to different levels of the ICD hierarchy, and second, by injecting hierarchy into graph-based code representations through hierarchy-aware edges combined with diagnosis co-occurrence structure. Across these settings, we evaluate whether explicit hierarchy improves downstream prediction, which levels of the hierarchy are most useful, whether hierarchy encoding improves transfer across datasets, and how hierarchy reshapes embedding similarity structure. We conduct experiments on two large-scale real-world clinical datasets: MIMIC-IV, used for pretraining and in-domain evaluation, and eICU, used to assess cross-dataset transfer via frozen encoder probing. Our findings show that explicitly encoding ICD hierarchy improves over flat code representations in both in-domain and cross-dataset settings, while revealing that the most useful level of hierarchy depends on both the task and the modeling approach. More broadly, we focus on hierarchy-aware EHR representation learning and show that the benefits of encoding hierarchy are generalizable across modeling settings and hierarchy levels.
翻译:电子健康记录基础模型通常将ICD诊断编码视为扁平化词元,忽略了捕获疾病家族、子类别及细粒度诊断细节的临床层级结构。现有电子健康记录表示学习方法未能充分利用编码系统中已有的层次结构。本研究将ICD-10-CM层级作为临床表示学习的通用归纳偏置,探索两种互补机制:其一,通过向BERT风格变换器的诊断序列中注入对应ICD层级不同级别的词元;其二,通过层次感知边与诊断共现结构相结合的方式,将层级注入基于图的编码表示。针对这些设置,我们评估了显式层级结构能否改善下游预测、哪些层级最有效、层级编码是否提升跨数据集迁移能力,以及层级如何重塑嵌入相似性结构。我们在两个大规模真实临床数据集(用于预训练与域内评估的MIMIC-IV和通过冻结编码器探测评估跨数据集迁移能力的eICU)上开展实验。结果表明,在域内与跨数据集场景下,显式编码ICD层级均优于扁平编码表示,同时揭示最有效的层级取决于具体任务与建模方法。更广泛而言,我们聚焦层次感知的电子健康记录表示学习,证实层级编码带来的收益可推广至不同建模设置与层级水平。