Embeddings : from NLP to medical pathways
15 October 2025
From Stanford NLP Course


Notice how the context length is important and can quickly fill the memory.
From Lena Voita
From GloVe project page


Dataset of medical pathways: For i = 1, \dots, n, X_i \coloneqq (e_i, t_i, f_i), where:
We predict for each token, if it will appear within the next t days.
We consider, simulatenously, several t \in \mathcal{T}, \mathcal{T} being the sorted set of short term horizons, typically 14, 30, 90, 180 days.
We trained a “large” model (40M params) and a “small” one (5M).
ROC curve of the pre-training task for a given specialty on a test set of 10,000 patients.
Up to a given time t, we have:
We want to estimate the Conditional Average Treatment Effect (CATE): \tau(x, t) \coloneqq \mathbf{E}[Y_t(1) - Y_t(0) | X_{<t} = x]
We want ideally to have a generative model.
Trade off between number of training tokens (train dataset size) and number of parameters in the model (model size)
Estimated optimal ratio: \frac{\text{\# training tokens}}{\text{\# parameters}} = 20