Home > Technology peripherals > AI > Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series Forecasting

Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series Forecasting

王林
Release: 2024-03-18 09:20:10
forward
1058 people have browsed it

Today I want to share a recent research work from the University of Connecticut that proposes a method to align time series data with large natural language processing (NLP) models on the latent space to improve The performance of time series forecasting. The key to this method is to use latent spatial hints (prompts) to enhance the accuracy of time series predictions.

Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series Forecasting

Paper title: S2IP-LLM: Semantic Space Informed Prompt Learning with LLM for Time Series Forecasting

Download address: https://www .php.cn/link/3695d85c350d924e662ea2cd3b760d40

1. Problem background

Large models are increasingly used in time series, mainly divided into two categories: the first category uses Various types of time series data train a large model of its own in the time series field; the second type directly uses a large text model trained in the NLP field and applies it to the time series. Because time series are different from images and texts, different data sets have different input formats and distributions, and there are problems such as distribution shift, making it difficult to train a unified model using all time series data. Therefore, more and more work has begun to try to directly use NLP large models to solve time series related problems.

This article also focuses on the second method of solving time series problems, which is to use NLP large models. Current practice often uses a description of the time series as a cue, but not all time series datasets contain this information. In addition, the patch-based time series data processing method cannot completely retain all the information of the time series data.

Based on the above problems, this article proposes a new modeling method, the core modeling idea, on the one hand, the time series is mapped into embedding after tokenize processing, on the other hand, the space of these time series Representations are aligned to word embeddings in the larger model. In this way, during the time series prediction process, the information related to the aligned word embedding can be found as a prompt to improve the prediction effect.

Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series ForecastingPicture

2. Implementation method

The following will introduce this from three aspects: data processing, latent space alignment, and model details. How to implement this work.

Data processing: Due to problems such as distribution shift of time series, this article performs a one-step trend term seasonal term decomposition on the input sequence. Each decomposed time series is standardized separately and then divided into overlapping patches. Each set of patches corresponds to the trend term patch, seasonal term patch, and residual patch. These three sets of patches are spliced ​​together and input into the MLP to obtain the basic embedding representation of each set of patches.

Implicit space alignment: This is the core step in this article. The design of prompts has a great impact on the performance of large models, and time series prompts are difficult to design. Therefore, this article proposes to align the patch representation of the time series with the word embedding of the large model in the latent space, and then retrieve the topK word embeddings as implicit prompts. The specific method is to use the patch embedding generated in the previous step to calculate the cosine similarity with the word embedding in the language model, select the topK word embeddings, and then use these word embeddings as prompts to splice them to the front of the time series patch embeddings. Since there are many word embeddings in large models, in order to reduce the amount of calculation, we first map the word embeddings to a small number of cluster centers.

Model details: In terms of model details, GPT2 is used as the language model part. Except for the parameters of the position embedding and layer normalization parts, the rest are frozen. In addition to MSE, the optimization goal also introduces the similarity between the patch embedding and the retrieved topK cluster embedding as a constraint, requiring that the distance between the two be as small as possible. The final prediction result is also

Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series ForecastingPicture

3. Experimental results

This article compares with some large time series models, iTransformer, The effect of SOTA models such as PatchTST has achieved relatively good improvement in the prediction of different time windows in most data sets.

Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series ForecastingPicture

At the same time, the article also visually analyzes embedding through t-SNE. As can be seen from the figure, the embedding of the time series is not aligned before alignment. There is no obvious clustering phenomenon, but the embedding generated through prompt has obvious clustering changes, which shows that the method proposed in this article effectively uses the spatial alignment of text and time series, and the corresponding prompt, to improve the quality of time series representation.

Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series Forecastingpicture

The above is the detailed content of Time Series Forecasting NLP Large Model New Work: Automatically Generate Implicit Prompts for Time Series Forecasting. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:51cto.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template