Home  >  Article  >  Technology peripherals  >  Time series multi-task integrated large-scale model based on Adapter and GPT

Time series multi-task integrated large-scale model based on Adapter and GPT

WBOY
WBOYforward
2023-12-15 13:03:56776browse

Today I would like to talk to you about the latest work on large model time series forecasting. From Alibaba Damo Academy, a general time series analysis framework based on adapter is proposed, which can be used in long-term forecasting, short-term forecasting, and zero-shot. Remarkable results have been achieved on 7 time series tasks, including few-shot, anomaly detection, time series classification, and time series filling.

Time series multi-task integrated large-scale model based on Adapter and GPT

Paper title: One size fits all: Universal time series analysis using pre-trained language models and specially designed adapters

Downloadable link: https://arxiv .org/pdf/2311.14782v1.pdf

1. Background

In the field of time series prediction, one of the difficulties in building large models is the lack of sufficient training data like in the NLP or CV fields. . This article proposes a solution, which is to adapt it to time series based on large-scale models trained in the field of NLP or CV, combined with Adapter technology, to solve various time series problems

Adapters are widely used in fields such as NLP and CV. Especially in recent large model applications, adapters are often used to perform lightweight finetune of large models. The Adapter is a lightweight network. By inserting it into some modules in the large model, then fixing the parameters of the large model, and only updating the parameters of the adapter, you can achieve lightweight large model finetune.

Time series multi-task integrated large-scale model based on Adapter and GPTPicture

Next, I will introduce to you how in this work of Alibaba Damo Academy, we use adapter to combine pre-trained NLP and CV models to build a unified time series model.

2. Overall structure

The model proposed in this article is based on the pre-trained language model of Freeze parameters and is implemented by combining 4 types of adapters. The overall model structure is shown in the figure below.

Time series multi-task integrated large-scale model based on Adapter and GPTPicture

First, for the input time series, we will use the RevIN method for normalization. This means that we subtract the mean from each time series and divide by the variance. Next, we will use the PatchTST method to split the time series into multiple segments through sliding windows and generate segment embeddings. The processed time series will be input into a pre-trained language model in the NLP field. During the entire training process, the original parameters of the language model will remain unchanged, and we will only update the newly added 4 types of adapter parameters

3. Adapter design

This article introduces four types of Adapters that can be plugged into different locations in large models in the fields of NLP and CV to achieve the goal of adapting time series. These four adapters are time adapter, channel adapter, frequency adapter and exception adapter

Time adapter: Time adapter is an MLP network used to fuse time dimension information. In this paper, we adopt a bottleneck structure to first map high-dimensional information in the time dimension or space dimension to a low-dimensional space, and then map it back to the high-dimensional space. The purpose of this is to avoid the risk of over-fitting in the process of extracting time series relationships

Channel Adaptor: The structure of the channel adapter is similar to the temporal adapter. The difference is that it is performed in the spatial dimension and is used to extract the variables of the multivariate sequence. The relationship between them also uses bottleect;

Time series multi-task integrated large-scale model based on Adapter and GPTPicture

Frequency Adapter: The frequency adapter extracts time series information in the frequency domain. This part will The time series is mapped to the frequency domain, MLP is performed in the frequency domain, and then mapped back to the time domain to achieve the extraction of global information in the frequency domain.

Anomaly Adapter: This part mainly implements a new time series anomaly detection method. The attention score matrix is ​​used here. For normal sequences, the attention score matrix exhibits periodic repetition characteristics, while abnormal sequences do not. Therefore, a Gaussian kernel is used as anomaly adapter in this article, and the output result of attention and its calculated KL divergence are used for time series anomaly detection.

Time series multi-task integrated large-scale model based on Adapter and GPTPicture

In addition, different data will be affected by each adapter to varying degrees. Therefore, a gated network is used in this article to selectively Using adapter

4 and experimental results

, the effects of 7 time series tasks were compared. The time series unified large model proposed in this article achieved results in each task that exceeded those of various SOTA models in the industry. Effect. Taking the long-term prediction task as an example, the unified model based on GPT2 Adapter performs best

Time series multi-task integrated large-scale model based on Adapter and GPTpicture

The above is the detailed content of Time series multi-task integrated large-scale model based on Adapter and GPT. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete