arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.01391cs.LGcs.AI
收藏

Transformer 应如何在电子健康记录中编码数值?

How Should Transformers Encode Numeric Values in Electronic Health Records?

Maria Elkjær Montgomery, Christian Igel, Mikkel Odgaard, Martin Sillesen, Mads Nielsen

AI总结:

本研究系统比较了离散、连续和混合数值编码策略在合成算术任务和真实临床预测任务中的表现,发现混合令牌方法在精度与鲁棒性间取得最佳平衡,并提出基于数据集大小的经验幂律确定最优分箱数。

摘要:

我们如何在基于 transformer 的序列处理中编码数值,特别是在电子健康记录(EHR)数据中?我们使用嵌入真实世界 EHR 数据的合成算术任务以及真实世界的临床预测任务,系统比较了离散、连续和混合值编码策略。我们的研究揭示了数值精度、优化稳定性和架构灵活性之间的权衡。我们发现,在架构约束允许的情况下,显式建模值-概念交互的方法在精度敏感的算术任务上表现最佳。保留数值但在投影前进行分箱的混合令牌方法提供了一种更稳健且广泛适用的替代方案,其最优分箱数遵循基于数据集大小的简单经验幂律。跨任务而言,模型一致地表现出可靠的“足够好”数值计算而非精确算术,而纳入实验室值带来的临床收益则因任务而异。这表明在实际中,鲁棒性和可部署性通常胜过最大数值精度,从而促使混合令牌方法成为实用的默认选择。

英文摘要:

How do we encode numeric values in transformer-based sequence processing, particularly in electronic health record (EHR) data? We systematically compare discrete, continuous, and hybrid value encoding strategies using synthetic arithmetic tasks embedded within real-world EHR data, as well as real-world clinical prediction tasks. Our study reveals trade-offs between numeric precision, optimisation stability, and architectural flexibility. We find that approaches that explicitly model value-concept interactions perform best on precision-sensitive arithmetic tasks when architectural constraints permit. Hybrid token-based approaches that retain numeric values but apply binning prior to projection provide a more robust and broadly applicable alternative, with the optimal number of bins following a simple empirically derived power-law in dataset size. Across tasks, models consistently exhibit reliable "good enough" numeric computation rather than exact arithmetic, while clinical gains from incorporating laboratory values are task-dependent. This suggests that robustness and deployability often outweigh maximal numeric precision in practice, motivating hybrid token-based approaches as a practical default.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑