Rethinking Tokenization for Clinical Time Series: When Less is More
Rafi Al Attrach, Rajna Fani, David Restrepo, Yugang Jia, Peter Schüffler
TL;DR
This study question how best to tokenize clinical time series for transformer models and whether common enhancements to time and value encoding actually help. Through a controlled, multi-task evaluation on MEDS-MIMIC-IV data, it shows that explicit time encodings often offer little advantage, while code-into-language-model representations (TextCode) benefit greatly when the code encoder is frozen and large, especially in clinical-domain pretrained models. The findings reveal that code sequences carry substantial predictive signal, with frozen, larger clinical encoders delivering strong, parameter-efficient performance across tasks. The work provides a fair evaluation framework for tokenization strategies and suggests a shift toward simpler, more scalable approaches for clinical AI.
Abstract
Tokenization strategies shape how models process electronic health records, yet fair comparisons of their effectiveness remain limited. We present a systematic evaluation of tokenization approaches for clinical time series modeling using transformer-based architectures, revealing task-dependent and sometimes counterintuitive findings about temporal and value feature importance. Through controlled ablations across four clinical prediction tasks on MIMIC-IV, we demonstrate that explicit time encodings provide no consistent statistically significant benefit for the evaluated downstream tasks. Value features show task-dependent importance, affecting mortality prediction but not readmission, suggesting code sequences alone can carry sufficient predictive signal. We further show that frozen pretrained code encoders dramatically outperform their trainable counterparts while requiring dramatically fewer parameters. Larger clinical encoders provide consistent improvements across tasks, benefiting from frozen embeddings that eliminate computational overhead. Our controlled evaluation enables fairer tokenization comparisons and demonstrates that simpler, parameter-efficient approaches can, in many cases, achieve strong performance, though the optimal tokenization strategy remains task-dependent.
