From Text to Timelines: Enhancing Time Series Forecasting with Large Language Models

Let's explore how time series forecasting can achieve a significant boost by incorporating LLMs, in order to accurately forecast inventory needs, market demands, or economic trends.

We're hiring!
3
OPEN
POSITIONS
September 27, 2023
3
 
minutes read
Tags
AI
Data Science
Technology

What if we could accurately forecast inventory needs, market demands, or economic trends? In the world of business and supply chain management, this ability could be the defining difference between success or failure. The science of making forecasts is far from mere conjecture; it's a complex art form built on an understanding of data and trends – this is where time series forecasting comes in.

Exploring the Overlap: Language Models and Time Series

Time series forecasting finds its roots across multiple facets like classical statistical methods such as ARIMA and GARCH, tree-based strategies like XGBoost and LightGBM, and the more recent neural networks such as LSTMs and Transformers.

Interestingly, it also shares a surprising level of overlap with contemporary language processing technologies also relying on LSTMs, Transformers, and Large Language Models (LLMs) like GPT-x and BERT. It leads one to wonder if it is possible to enhance the efficacy of time series forecasting using LLMs?

The Role of LLMs: Limitations and Strengths

The notion of using LLMs directly for time series forecasts is intriguing, and in fact there is research exploring in that direction. However it is essential to remember these models, as they stand, are intended for generating coherent, plausible text. This trait doesn't necessarily lend well to producing accurate, reliable, and replicable numerical forecasts. Still, discounting them entirely based on this limitation would be a mistake. LLMs do have a valuable role to play.

Take as an example tasks related to data cleansing. LLMs excel at text normalization, entity recognition, text completion, and translation, all of which prove to be vital in refining and preparing data for further analysis and forecasting.

LLMs also empower feature engineering through various ways - sentiment analysis, topic modeling, semantic similarity, text summarisation, and custom text feature generation. Deploying LLMs in these operations can significantly augment the accuracy and reliability of forecasts.

Making Sense of Text Embeddings

When it comes to textual data, the actual power of LLM lies in 'Embeddings.' These serve as a semantic numerical representation of textual data, which can be readily offered by pre-trained LLMs. There are multiple ways to leverage embeddings for forecasting.

It is possible to use them directly as features capable of augmenting the overall forecast model. On the other hand, conducting semantic clustering allows valuable insights during the Exploratory Data Analysis (EDA) phase.

Embeddings offer a versatile solution, even extending to feature engineering. Take the cold start problem, for instance. This challenge involves making forecasts for items, like those in retail, with little to no historical data to rely on. Extracting historical insights from similar items can significantly benefit forecasting models. LLM embeddings offer an automated and scalable approach to identify semantically similar items through their textual representations. Interestingly, you can also leverage embeddings from image models to achieve similar outcomes using item images. Furthermore, you can even explore combining these two approaches for a more comprehensive solution.

Further Research

Research is delving into the intriguing intersections of Language Models (LLMs) and time series forecasting. As an example, one interesting approach involves fine-tuning a segment of a transformer model initially trained for natural language processing, while keeping most of the model parts frozen. This concept, which has previously demonstrated promising potential in logical tasks and computer vision, has recently been extended to the realm of time series forecasting.

Key Takeaways

Time series forecasting can achieve a significant boost by incorporating LLMs into its fold. By including it in the data gathering and forecasting workflow to improve EDA, data cleansing, and feature engineering, greater accuracy and reliability can be achieved.

Moreover, with the power of embeddings and new time series models possible via fine-tuned LLMs, users can truly level up their time series game.

paretos
We are the leading AI-based decision intelligence platform for effective, data-driven decision-making processes in companies. No more bad decisions!
Dr. Alexander Meier
Senior Data Scientist
I’m an experienced Data Scientist with a strong background in software engineering. Having a PhD in mathematical statistics, I’m proficient in machine learning, statistics and time series analysis.
Share

Related articles

Untapped potential
Customer examples
Software demo

Book a demo

Would you like to know if paretos is the right solution for you?
Feel free to schedule a non-binding consultation appointment.