实时准确地预测中长期日径流对干旱半干旱地区水资源合理利用具有重要意义。针对长短期记忆网络(long short-term memory,LSTM)模型输入输出时间步长度相等、处理长序列遗忘多、无法按重要程度分配权重等不足,构建了一种基于注意力机制(attention mechanism,Attention)优化的LSTM-Seq2seq组合模型(LSTM-Seq2seq-Attention)。该模型将序列到序列模型(sequence to sequence,Seq2seq)中编码器、解码器设置为三层LSTM结构,并在解码器输出序列前引入注意力机制对模型进一步优化。为验证LSTM-Seq2seq-Attention模型的有效性,本研究以党河上游为研究区域,基于历史数据对流域未来1~7d的日径流进行模拟预测;预测结果与传统的机器学习模型支持向量机(support vector machines,SVM)以及单一的LSTM模型预测结果进行了对比。结果表明:SVM、LSTM和LSTM-Seq2seq-Attention模型均可用于短期日径流预测;但相比之下,LSTM-Seq2seq-Attention模型在中长期日径流预测中的预测效果更突出。说明LSTM-Seq2seq-Attention模型较单一模型具备更强的预测能力,可作为干旱半干旱地区中长期日径流预测模拟的可靠工具。
Runoff simulation study based on LSTM-Seq2seq model optimized by attention mechanism
Real-time and accurate medium-and long-term daily runoff prediction is of great significance for the rational utilization of water resources in arid and semi-arid areas. Aiming at the shortcomings of long short-term memory (LSTM) model such as equal length of input and output time steps,many forgetting when dealing with long sequences,and inability to assign weights according to importance,an LSTM-Seq2seq-Attention based on attention mechanism (Attention) optimization is constructed. The model sets the encoder and decoder in the se-quence to sequence (Seq2seq) model as a three-layer LSTM structure,and introduces an attention mechanism to further optimize the model before the decoder outputs the sequence. In order to verify the effectiveness of the LSTM-Seq2seq-Attention model,this study takes the upper reaches of the Dang River as the research area,and simulates and predicts the future daily runoff of the basin in the future 1~7 d based on historical data. The predic-tion results were compared with those of traditional machine learning models,i. e.,support vector machines (SVM) and the single LSTM model. The results show that the SVM,LSTM and LSTM-Seq2seq-Attention models can be used for short-term daily runoff prediction. However,in contrast,the LSTM-Seq2seq-Attention model has a more prominent predictive effect in medium and long-term daily runoff prediction. This shows that the LSTM-Seq2seq-Attention model has stronger predictive power than a single model,and can be used as a reliable tool for medium and long-term daily runoff prediction and simulation in arid and semi-arid areas.
runoff predictionLSTMSeq2seqattention mechanismDang River