Zero-shot inference and the future of forecasting


Alexei Domorev
Contributor

In any organisation, time series forecasting remains a fundamental problem that has a tremendous impact on a vast range of activities covering anything from resource planning to budgeting.

Time series refers to any data (sales, inventory levels, staffing numbers) organised in chronological order. Time series forecasting simply means predicting future values based on the previous observations, trends, underlying patterns and seasonality found in the data.

Artificial intelligence has entered our everyday lexicon, but it means different things to different people. So it is essential to define the term AI here in the context of forecasting. 

Machine learning (or ML) is a branch of AI used to make predictions, or forecasts, based on the data. What makes ML valuable in the business context is its ability to discover hidden patterns in vast amounts of data and make accurate predictions.

If we look at forecasting, there are several ways in which businesses approach the task, from simple (or, as we call them, naïve) methods of using the most recent observations, to sophisticated ones based on ML models that need to be trained, validated and optimised.

However, recently, a fundamentally new, ‘zero-shot’ inference approach to forecasting has made its way to the market. Zero-shot inference refers to the ability of a foundation model to correctly handle tasks or make predictions for which it has not been explicitly trained.

The zero-shot aspect means the model sees zero examples from these specific tasks during training, traditionally the most time-consuming part of ML modelling. In a nutshell, zero-shot inference is like going to an exam without specifically studying the subject, yet acing it based on the vast number of books and articles you have read previously and your ability to make connections and observations.

We can compare this with the traditional approach requiring specific training, reviewing course material and going through practice tests before the exam.

Previously, this concept of zero-shot inference has been applied to the fields of natural language processing (NLP) and computer vision, but in October 2023, Nixtla, a Californian company, released the first pre-trained foundation model, TimeGPT, extending the idea to time series forecasting and revolutionising how small and large organisations might do accurate forecasting with minimum fuss and effort.

So, how do forecasting foundation models like TimeGPT work, and are they any good?

Foundation models are trained on a vast amount of time series data spanning different domains, from finance and economics to web traffic and retail, using an enormous amount of data. More than 100 billion data points were used to create TimeGPT, for example.

Similar to the large language models that power up the ChatGPT revolution, after a model like TimeGPT has been trained and tuned, you can use it to make predictions, or inferences, on new data.

In practice, it means you supply your input data to the model, for example, your weekly revenue in the last year, and the model will predict the next period – the forecast horizon that you specify – based on what it has learnt about seasonality, trends and other underlying patterns it has seen during its training previously. 

Since the model has been trained on a large number of datasets, it can easily detect similarities and patterns in your data and make accurate forecasts in less than a few seconds.

From the end-user perspective, it only takes a few lines of code and access to the model’s application programming interface (API). Compared to the other ML approaches, with foundation models like TimeGPT you don’t need to train and tune it for your data specifically. You just plug and play.

When we used the actual US sales data from Tielka, an Australian tea company, and compared short-term revenue forecasts produced by TimeGPT and other traditional time series forecasting models ARIMA and Prophet, TimeGPT outperformed them on all fronts, including accuracy, computational cost, and implementation complexity.

Yes, more research is required to determine how the model would cope with larger forecast horizons, different domains and markets, but the initial results in straight out-of-the-box implementation were surprisingly significant.

Imagine the productivity gains in your organisation with improved budget planning and forecasting. How much working capital can be released if you optimise your inventory levels and accurately predict demand for the upcoming season or determine the optimal staffing levels?

Zero-shot inference foundation models like TimeGPT can truly deliver a world of new opportunities for any organisation and provide a competitive edge. 

However, it is important to keep in mind that the innovative foundation models like TimeGPT, which are mostly trained on data collected in the northern hemisphere, could be fantastic at anticipating a change of gears in the economy around Thanksgiving, for instance, but of little use here in Australia, because our festive calendar is so different.

This is one of the main reasons why we can’t simply rely on AI models developed elsewhere, especially if we want to embrace the AI revolution and the productivity gains that come with it.

So, to realise and sustain the opportunities presented by breakthroughs like this in the field of AI and ML here in Australia, a more coordinated approach is required.

Firstly, we will need to implement a policy framework that covers data protection and governance, model development, deployment standards and ethical AI guidelines at the national level.

This is an opportunity to avoid the common situation where each state and territory has their way of “doing things”. The recent experience during the COVID pandemic should serve as a stark reminder of the enormous economic cost associated with fragmented policies and different standards.

Secondly, we need to double down on our efforts to develop and implement national data repositories and open data initiatives to facilitate access to public data for model training and validation.

Thirdly, we must continue to develop and nurture local talent in data science, data engineering, and related fields, a healthy ecosystem of industry and academic collaboration and public-private partnerships. It goes without saying that all of this would require new infrastructure and investment.

At an organisational level, there are many initiatives that leaders can start implementing today to stay ahead of the competition.

Begin with raising awareness about what is possible. For instance, now that you know that zero-shot inference forecasting can turbo-charge your planning, share and brainstorm ideas within your team on how the new forecasting approach can save you time and money without compromising your data security. 

As you continue this journey in AI and ML, attract and develop talent. One qualified data scientist in your team will be able to create more value than two or three planning experts who are happy to continue crunching numbers the good old way. And this is just in forecasting.

Once you get a good idea for improvements in your business processes, implement the change using a phased approach.

You can start with pilot programs to test and refine new forecasting methods and then apply a scale-up strategy, extending the scope to broader applications across different use cases in your organisation.

As you implement more ML tools in your organisation, monitor and evaluate their performance and impact on a regular basis. By establishing continuous monitoring mechanisms and providing feedback loops to your stakeholders, you will keep everyone on the same page. 

It is the most effective way to improve your capabilities and outsmart your competition.

The recent developments in AI and ML have ushered us into a new era of technological innovation. We need to develop our infrastructure and capabilities to stay competitive on the world stage and locally.

At the end of the day, it is not AI that will take your job; it is the person who knows how to use it.

Alexei Domorev, business scientist. Alexei is an award-winning data scientist specialising in machine learning and time series forecasting. He has completed a Master’s degree in Applied Data Science at the University of Adelaide and holds an MBA from Melbourne Business School.

This article is part of The Industry Papers publication by InnovationAus.com. Order your hard copy here. 36 Papers, 48 Authors, 65,000 words, 72 page tabloid newspaper + 32 page insert magazine.

The Industry Papers is a big undertaking and would not be possible without the assistance of our valued sponsors. InnovationAus.com would like to thank Geoscape Australia, The University of Sydney Faculty of Science, the S3B, AirTrunk, InnoFocus, ANDHealth, QIMR Berghofer, Advance Queensland and the Queensland Government.

Do you know more? Contact James Riley via Email.

Leave a Comment

Related stories