OpenTSLM: Modelli Linguistici per Serie Temporali per il Ragionamento su Dati Medici Multivariati di Testo e Serie Temporali
OpenTSLM: Time-Series Language Models for Reasoning over Multivariate Medical Text- and Time-Series Data
October 2, 2025
Autori: Patrick Langer, Thomas Kaar, Max Rosenblattl, Maxwell A. Xu, Winnie Chow, Martin Maritsch, Aradhana Verma, Brian Han, Daniel Seung Kim, Henry Chubb, Scott Ceresnak, Aydin Zahedivash, Alexander Tarlochan Singh Sandhu, Fatima Rodriguez, Daniel McDuff, Elgar Fleisch, Oliver Aalami, Filipe Barata, Paul Schmiedmayer
cs.AI
Abstract
I LLM sono emersi come strumenti potenti per l'interpretazione di dati multimodali. In medicina, offrono un potenziale particolare per sintetizzare grandi volumi di informazioni cliniche in insight azionabili e applicazioni di salute digitale. Tuttavia, una limitazione significativa rimane la loro incapacità di gestire serie temporali. Per superare questa lacuna, presentiamo OpenTSLM, una famiglia di Time Series Language Models (TSLM) creati integrando le serie temporali come modalità nativa in LLM pre-addestrati, consentendo il ragionamento su più serie temporali di qualsiasi lunghezza. Esploriamo due architetture per OpenTSLM. La prima, OpenTSLM-SoftPrompt, modella le serie temporali implicitamente concatenando token di serie temporali apprendibili con token di testo tramite soft prompting. Sebbene efficiente in termini di parametri, ipotizziamo che la modellazione esplicita delle serie temporali si adatti meglio e superi gli approcci impliciti. Introduciamo quindi OpenTSLM-Flamingo, che integra le serie temporali con il testo tramite cross-attention. Confrontiamo entrambe le varianti con baseline che trattano le serie temporali come token di testo o grafici, attraverso una serie di task di ragionamento Chain-of-Thought (CoT) testo-serie temporali. Introduciamo tre dataset: HAR-CoT, Sleep-CoT e ECG-QA-CoT. In tutti, i modelli OpenTSLM superano le baseline, raggiungendo 69.9 F1 nella stadiazione del sonno e 65.4 in HAR, rispetto a 9.05 e 52.2 per modelli testuali fine-tuned. Notabilmente, anche modelli OpenTSLM da 1B parametri superano GPT-4o (15.47 e 2.95). OpenTSLM-Flamingo eguaglia OpenTSLM-SoftPrompt in prestazioni e supera su sequenze più lunghe, mantenendo requisiti di memoria stabili. Al contrario, SoftPrompt cresce esponenzialmente in memoria con la lunghezza della sequenza, richiedendo circa 110 GB rispetto a 40 GB di VRAM durante l'addestramento su ECG-QA con LLaMA-3B. Le revisioni esperte da parte di clinici evidenziano forti capacità di ragionamento esibite da OpenTSLM su ECG-QA. Per facilitare ulteriori ricerche, forniamo tutto il codice, i dataset e i modelli open-source.
English
LLMs have emerged as powerful tools for interpreting multimodal data. In
medicine, they hold particular promise for synthesizing large volumes of
clinical information into actionable insights and digital health applications.
Yet, a major limitation remains their inability to handle time series. To
overcome this gap, we present OpenTSLM, a family of Time Series Language Models
(TSLMs) created by integrating time series as a native modality to pretrained
LLMs, enabling reasoning over multiple time series of any length. We
investigate two architectures for OpenTSLM. The first, OpenTSLM-SoftPrompt,
models time series implicitly by concatenating learnable time series tokens
with text tokens via soft prompting. Although parameter-efficient, we
hypothesize that explicit time series modeling scales better and outperforms
implicit approaches. We thus introduce OpenTSLM-Flamingo, which integrates time
series with text via cross-attention. We benchmark both variants against
baselines that treat time series as text tokens or plots, across a suite of
text-time-series Chain-of-Thought (CoT) reasoning tasks. We introduce three
datasets: HAR-CoT, Sleep-CoT, and ECG-QA-CoT. Across all, OpenTSLM models
outperform baselines, reaching 69.9 F1 in sleep staging and 65.4 in HAR,
compared to 9.05 and 52.2 for finetuned text-only models. Notably, even
1B-parameter OpenTSLM models surpass GPT-4o (15.47 and 2.95). OpenTSLM-Flamingo
matches OpenTSLM-SoftPrompt in performance and outperforms on longer sequences,
while maintaining stable memory requirements. By contrast, SoftPrompt grows
exponentially in memory with sequence length, requiring around 110 GB compared
to 40 GB VRAM when training on ECG-QA with LLaMA-3B. Expert reviews by
clinicians find strong reasoning capabilities exhibited by OpenTSLMs on ECG-QA.
To facilitate further research, we provide all code, datasets, and models
open-source.