《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (7): 2262-2268.DOI: 10.11772/j.issn.1001-9081.2024070929

• 数据科学与技术 • 上一篇    下一篇

基于分段注意力机制的时间序列预测模型

王慧斌1(), 胡展傲2, 胡节2, 徐袁伟1, 文博1   

  1. 1.国网四川岷江供电有限责任公司,成都 611830
    2.西南交通大学 计算机与人工智能学院,成都 611756
  • 收稿日期:2024-07-03 修回日期:2024-10-18 接受日期:2024-10-22 发布日期:2025-07-10 出版日期:2025-07-10
  • 通讯作者: 王慧斌
  • 作者简介:王慧斌(1994—),男,四川眉山人,硕士,主要研究方向:电力设备预警分析、时间序列预测 whbzhu@foxmail.com
    胡展傲(1999—),男,四川成都人,硕士,主要研究方向:时间序列预测
    胡节(1978—),女,四川成都人,副教授,博士,CCF会员,主要研究方向:时间序列预测
    徐袁伟(1983—),男,重庆人,工程师,主要研究方向:电力设备预警分析
    文博(1990—),男,四川三台人,工程师,主要研究方向:电力工程及其自动化。
  • 基金资助:
    四川省电力公司常规科技项目(5219T8230001)

Time series forecasting model based on segmented attention mechanism

Huibin WANG1(), Zhan’ao HU2, Jie HU2, Yuanwei XU1, Bo WEN1   

  1. 1.State Grid Sichuan Minjiang Power Supply Company Limited,Chengdu Sichuan 611830,China
    2.School of Computing and Artificial Intelligence,Southwest Jiaotong University,Chengdu Sichuan 611756,China
  • Received:2024-07-03 Revised:2024-10-18 Accepted:2024-10-22 Online:2025-07-10 Published:2025-07-10
  • Contact: Huibin WANG
  • About author:WANG Huibin, born in 1994, M. S. His research interests include early warning analysis of electrical equipment, time series forecasting.
    HU Zhan’ao, born in 1999, M. S. His research interests include time series forecasting.
    HU Jie, born in 1978, Ph. D., associate professor. Her research interests include time series forecasting.
    XU Yuanwei, born in 1983, engineer. His research interests include early warning analysis of power equipment.
    WEN Bo, born in 1990, engineer. His research interests include power engineering and its automation.
  • Supported by:
    Sichuan Electric Power Company Conventional Technology Project(5219T8230001)

摘要:

针对时间序列分段后存在因采样间隔增大而导致的长期预测过程中局部依赖关系丢失的情况,提出一种基于分段注意力机制的时间序列预测模型(SAMformer)。首先,显式地将时间静态协变量与原始数据按比例融合,以增强数据的时域信息表征能力;其次,同时引入两个连续的带偏置的线性层和一个激活函数来微调融合数据,从而提高模型对非线性数据的拟合能力;然后,在分段序列的每个段内引入点积注意力机制,以便捕获局部特征依赖关系;最后,利用跨尺度依赖的编码器-解码器架构预测时序数据。所提模型在公开的5个时间序列数据集上的实验结果表明,相较于Crossformer、 Pyraformer和Informer等其他监督学习时序预测模型,SAMformer的均方误差(MSE)和平均绝对误差(MAE)分别降低了2.0%~62.0%和0.9%~49.8%。此外,通过消融实验验证了所提不同组件的完备性和有效性,进一步说明了融合时域信息和段内注意力机制有助于提高时间序列预测的精度。

关键词: 深度神经网络, 时间序列预测, 时域信息融合, 编码器-解码器架构, 注意力机制

Abstract:

To address the issue of local dependency loss during long-term forecasting due to increased sampling interval after time series segmentation, a time series forecasting model based on Segmented Attention Mechanism (SAMformer) was proposed. Firstly, time static covariates were fused with original data in proportion explicitly to enhance time domain information representation ability of the data. Secondly, two continuous linear layers with bias and an activation function were introduced to fine-tune the fused data, thereby improving the model’s ability to fit nonlinear data. Thirdly, a dot product attention mechanism was introduced in each segment of the segmented series to capture local feature dependencies. Finally, a cross-scale dependency based encoder-decoder architecture was utilized to predict time series data. Several experiments of the proposed model were carried out on five public time series datasets, and the results show that compared with other supervised learning based time series forecasting models, Crossformer, Pyraformer, and Informer, SAMformer reduces the Mean Squared Error (MSE) and Mean Absolute Error (MAE) by 2.0%-62.0% and 0.9%-49.8% respectively. Besides, through ablation experiments, the completeness and effectiveness of the proposed different components are verified, which further shows that fusion of time domain information and intra-segment attention mechanism is helpful to improve the accuracy of time series forecasting.

Key words: Deep Neural Network (DNN), time series forecasting, time domain information fusion, encoder-decoder architecture, attention mechanism

中图分类号: