TsLLM: Augmenting LLMs for General Time Series Understanding and Prediction
Abstract
Time series data is fundamental to decision-making across many domains including healthcare, finance, power systems, and logistics. However, analyzing this data correctly often requires incorporating unstructured contextual information, answering domain-specific questions, and generating natural language explanations – capabilities that traditional time series models lack. While Large Language Models (LLMs) excel at contextual reasoning and knowledge integration, they struggle with numerical time series due to inefficient text-based representations and limited exposure to numerical data during pretraining. We address this gap by augmenting an LLM with specialized time series perception through a patch-based encoder-decoder architecture. We train this time series-augmented LLM (TsLLM) on a large corpus of over 25 billion tokens of interleaved time series and text spanning diverse tasks: forecasting with contextual information, question-answering, anomaly detection, classification, report generation, and more, all unified as autoregressive next token prediction. This training enables TsLLM to leverage both its natural language skills and newly acquired understanding of numerical time series signals. While not designed to surpass specialized models on traditional benchmarks, TsLLM demonstrates strong performance on tasks requiring the integration of time series analysis with natural language – capabilities that conventional approaches cannot provide. It also exhibits strong zero-shot and few-shot performance, showing it can adapt to new data without additional training.
Lay Summary
Numerical time series signals – sequences of measurements taken over time, like a patient's heart rhythm or a stock's daily price – are everywhere in medicine, finance, and science. But the numbers alone rarely tell the whole story: a doctor reads an electrocardiogram alongside a patient's symptoms, and an analyst forecasts prices while reading the news. Today's AI chatbots are great at reasoning with words and context, yet they handle streams of numbers poorly, because they were built to process text, not dense numerical signals. We gave an AI model a new "sense" for numerical data. Rather than feeding it long sequences of numbers as text directly, we built a model to translate these signals into the complex internal states that the AI understands. We then taught the AI to perform important tasks that combine time series and relevant text across a huge range of real-world problems in science, medicine, and engineering. The result, TsLLM, can answer questions about time series, make forecasts that take written context into account, and explain its findings in plain language – all things that either traditional forecasting tools or ordinary chatbots cannot do alone. This moves us toward AI assistants that work directly with real-world sensor and signal data, making expert analysis more accessible.