计算机与现代化 ›› 2025, Vol. 0 ›› Issue (07): 55-62.doi: 10.3969/j.issn.1006-2475.2025.07.008

• 人工智能 • 上一篇    下一篇

基于优化Transformer的长短期空气污染物浓度预测

  


  1. (杭州师范大学信息科学与技术学院,浙江 杭州 311121)
  • 出版日期:2025-07-22 发布日期:2025-07-22
  • 作者简介: 作者简介:蔡博涵(2000—),男,安徽宿州人,硕士研究生,研究方向:时间序列预测,E-mail: caibohan200@163.com; 通信作者:刘俊(1988—),男,湖南常德人,讲师,博士,研究方向:机器学习,移动污染源监测,智能自主系统等,E-mail: junliu@hznu.edu.cn。
  • 基金资助:
    基金项目:国家自然科学基金面上项目(62273126)

Long-and Short-Term Air Pollutant Concentration Forecasting Based on Optimized Transformer



  1. (College of Information Science and Technology, Hangzhou Normal University, Hangzhou 311121, China)
  • Online:2025-07-22 Published:2025-07-22

摘要: 摘要:针对空气污染物浓度预测精度低、时效短、时空特征捕获难的问题,提出一种基于条件掩码注意力机制(Conditional Mask Self-attention)的Transformer架构—CondMSA-Transformer。对Transformer模型中的多头自注意力机制进行改进,引入稀疏注意力机制的理念,结合风速、风向等关键环境因素,实现对非必要站点数据的智能“掩码”,聚焦于时空维度内最具价值的信息提取,避免远程站点弱信号的干扰,降低计算复杂度,同时增强模型对核心特征的捕捉能力。通过对北京2组真实数据集进行全面的实验评估,实验结果表明,CondMSA-Transformer在短期甚至长期预测场景中的稳健表现,与其他现有方法比,在PM2.5预测的均方误差(MAE)方面提供了高达14.67%的改进,展现出其在空气污染物浓度预测领域的应用潜力及先进性。

关键词: 关键词:空气污染物浓度预测, 长期预测, Transformer, 注意力机制, 条件掩码


Abstract: Abstract:Addressing the issues of low prediction accuracy, short timeliness, and difficulties in capturing spatiotemporal features for air pollutant concentration prediction, a Transformer architecture based on conditional mask self-attention is proposed, named CondMSA-Transformer. This paper improves the multi-head self-attention mechanism in the Transformer model, introduces the sparse attention concepts. By integrating critical environmental factors such as wind speed and wind direction, it implements intelligent “masking” of unnecessary site data, focusing on extracting the most valuable information within the spatiotemporal dimension. This strategy effectively avoids interference from weak signals of remote stations, reduces computational complexity, and enhances the model’s ability to capture core features. Comprehensive experimental evaluations on two real datasets in Beijing demonstrate that CondMSA-Transformer exhibits robust performance in both short-term and long-term prediction scenarios, providing up to 14.67% improvement in mean absolute error (MAE) for PM2.5 prediction compared to other existing methods. This shows its vast application potential and advancement in the field of air quality prediction.

Key words: Key words: air pollutant concentration prediction, long-term predictions, Transformer, attention mechanism, conditional mask

中图分类号: