arXiv:2504.18185cs.LG2025-04被引 15

开源实现LSTM与GRU模型,用于时间序列预测并确保可复现性。

An Open-Source and Reproducible Implementation of LSTM and GRU Networks for Time Series Forecasting

  • 基于LSTM和GRU构建时间序列预测模型,支持单序列训练。
  • 在合成数据集上,1步与20步预测均显著优于滞后值基准。
  • 提供完整代码与数据集,便于复现与后续研究对比。

本文提出一个开源且可复现的长短期记忆(LSTM)与门控循环单元(GRU)网络实现,用于时间序列预测。评估了这两种模型在两个数据集上的表现:一是包含十家金融机构收盘价的S&P BSE BANKEX股票时间序列数据集;二是模拟每周活动模式的合成数据集Activities,其特征为每周五天高活跃度、两天低活跃度。报告了实际值与预测值之间的均方根误差(RMSE)及方向准确率(DA)。结果表明,若数据序列中存在可重复模式(即使有变异),经适当处理后即可有效训练模型。在Activities数据集上,1步和20步前向预测中,LSTM与GRU显著优于仅重复最后一个值的基准模型。而在股票市场数据集上,模型表现与基准相当,可能因序列固有特性所致。本文发布所用数据集及全部实验代码,以促进未来研究的可比性与可复现性。

原文摘要 · Abstract (English)

This paper introduces an open-source and reproducible implementation of Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) Networks for time series forecasting. We evaluated LSTM and GRU networks because of their performance reported in related work. We describe our method and its results on two datasets. The first dataset is the S&P BSE BANKEX, composed of stock time series (closing prices) of ten financial institutions. The second dataset, called Activities, comprises ten synthetic time series resembling weekly activities with five days of high activity and two days of low activity. We report Root Mean Squared Error (RMSE) between actual and predicted values, as well as Directional Accuracy (DA). We show that a single time series from a dataset can be used to adequately train the networks if the sequences in the dataset contain patterns that repeat, even with certain variation, and are properly processed. For 1-step ahead and 20-step ahead forecasts, LSTM and GRU networks significantly outperform a baseline on the Activities dataset. The baseline simply repeats the last available value. On the stock market dataset, the networks perform just like the baseline, possibly due to the nature of these series. We release the datasets used as well as the implementation with all experiments performed to enable future comparisons and to make our research reproducible.

时间序列LSTMGRU可复现

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。