RAM: Replace Attention with MLP for Efficient Multivariate Time Series Forecasting

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Guo, Suhan, Deng, Jiahong, Wei, Yi, Dou, Hui, Shen, Furao, Zhao, Jian
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909606170591232
author Guo, Suhan
Deng, Jiahong
Wei, Yi
Dou, Hui
Shen, Furao
Zhao, Jian
author_facet Guo, Suhan
Deng, Jiahong
Wei, Yi
Dou, Hui
Shen, Furao
Zhao, Jian
contents Attention-based architectures have become ubiquitous in time series forecasting tasks, including spatio-temporal (STF) and long-term time series forecasting (LTSF). Yet, our understanding of the reasons for their effectiveness remains limited. In this work, we propose a novel pruning strategy, $\textbf{R}$eplace $\textbf{A}$ttention with $\textbf{M}$LP (RAM), that approximates the attention mechanism using only feedforward layers, residual connections, and layer normalization for temporal and/or spatial modeling in multivariate time series forecasting. Specifically, the Q, K, and V projections, the attention score calculation, the dot-product between the attention score and the V, and the final projection can be removed from the attention-based networks without significantly degrading the performance, so that the given network remains the top-tier compared to other SOTA methods. RAM achieves a $62.579\%$ reduction in FLOPs for spatio-temporal models with less than $2.5\%$ performance drop, and a $42.233\%$ FLOPs reduction for LTSF models with less than $2\%$ performance drop.
format Preprint
id arxiv_https___arxiv_org_abs_2410_24023
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle RAM: Replace Attention with MLP for Efficient Multivariate Time Series Forecasting
Guo, Suhan
Deng, Jiahong
Wei, Yi
Dou, Hui
Shen, Furao
Zhao, Jian
Machine Learning
Attention-based architectures have become ubiquitous in time series forecasting tasks, including spatio-temporal (STF) and long-term time series forecasting (LTSF). Yet, our understanding of the reasons for their effectiveness remains limited. In this work, we propose a novel pruning strategy, $\textbf{R}$eplace $\textbf{A}$ttention with $\textbf{M}$LP (RAM), that approximates the attention mechanism using only feedforward layers, residual connections, and layer normalization for temporal and/or spatial modeling in multivariate time series forecasting. Specifically, the Q, K, and V projections, the attention score calculation, the dot-product between the attention score and the V, and the final projection can be removed from the attention-based networks without significantly degrading the performance, so that the given network remains the top-tier compared to other SOTA methods. RAM achieves a $62.579\%$ reduction in FLOPs for spatio-temporal models with less than $2.5\%$ performance drop, and a $42.233\%$ FLOPs reduction for LTSF models with less than $2\%$ performance drop.
title RAM: Replace Attention with MLP for Efficient Multivariate Time Series Forecasting
topic Machine Learning
url https://arxiv.org/abs/2410.24023