EA-LSTM: Evolutionary attention-based LSTM for time series prediction

原文链接

1. Introduction

做法: Based on the idea of evolutionary computation[21],we propose a competitive random search (CRS) instead of the gradient-based method to solve the attention layer weights.

Genetic Algorithms and the Optimal Allocation of Trials

为什么要引入CRS:change the search direction to avoid falling into local optimum.

[22] X. Zhang, J. Clune, K.O. Stanley, On the relationship between the OpenAI evolution strategy and stochastic gradient descent, 2017, arXiv:1712. 06564.
[23] E. Conti, V. Madhavan, F. Petroski Such, J. Lehman, K.O. Stanley, J. Clune, Improving exploration in evolution strategies for deep reinforcement learning via a population of novelty-seeking agents, 2017, arXiv:1712. 06560.
[24] Joel Lehman, Jay Chen, Jeff Clune, Kenneth O. Stanley, Safe mutations for deep and recurrent neural multi-order through output gradients, 2017, arXiv:1712.06563.

对GA的操作

  1. In particular, theimproved crossoveroperator has integrated more stochastic mechanisms to maintain the differences between the progeny individuals,
    目的:avoiding premature convergence of the algorithm and being trapped in local optimum.

  2. use the basic bit mutation operator to specifically perform the mutation operation by randomly inverting one or several gene values at the locus according to the mutation rate on a single encoded string.

introduction的知识点:

  1. 遗传算法

2. Preliminaries(预先准备)

时序数据用于分类和回归。

数据集为 X = ( X 1 , X 2 , . . . X T ) X=(X_1, X_2,... X_T) X=(X1,X2,...XT),其中每一个 X t = ( x t 1 , x t 2 , . . . x t L ) X_t=(x_t^1, x_t^2,...x_t^L) Xt=(xt1,xt2,...xtL)代表 L L L个timestamps。其中每个时刻对应的输出值则记为 y y y

离散or 回归则取决于Y的数据是连续的还是discrete的。

目标:根据历史时刻的输入数据和输出数据找到映射函数 y ~ T \widetilde{y}_T y T,数学表达式为:
y ~ T = f ( X , y ) \widetilde{y}_T=f(X, y) y T=f(X,y)

3. Methodology(方法论)

3.1 Overview

本章结构:

  1. ,we first give the overview of the model we proposed
  2. we will detail the evolutionary attention-based LSTM.
  3. we present the competitive random search and a collaborative(协作训练) training mechanism.

工作流程如下:
在这里插入图片描述

3.2 整体算法流程

  1. 定义注意力层的权重为:
    W = ( W 1 , W 2 , . . . , W L ) W=(W^1, W^2, ..., W^L) W=(W1,W2,...,WL)
    这里的L是timestamps的个数。根据注意力层的权重对LSTM层的输出进行采样。
    X ~ t = ( x t 1 W 1 , x t 1 W 2 , . . . , x t 1 W L ) \widetilde{X}_t=(x_t^1W^1, x_t^1W^2, ..., x_t^1W^L) X t=(xt1W1,xt1W2,...,xt1WL)
  2. 然后把 X ~ t \widetilde{X}_t X t喂到LSTM层中,LSTM的计算公式:
    在这里插入图片描述在这里插入图片描述
  3. 作者把 h t − 1 h^{t-1} ht1作为输出 y ~ t \widetilde{y}_t y t,然后拼成一个矩阵。 y ~ T = ( y ~ 1 , y ~ 2 , . . . , y ~ T ) \widetilde{y}_T=(\widetilde{y}^1, \widetilde{y}^2, ..., \widetilde{y}^T) y T=(y 1,y 2,...,y T)

3.2 Competitive random search

在这里插入图片描述

  1. 把part a中的权重进行二进制编码, 每一个个体 W i W_i Wi 对应的权重传递到 part b,利用遗传算法筛选出最合适的 权重组合

这里并未使用所有的权重,而是挑选出了最合适的权重,umm,跟原来想的不太一样,原本以为是通过遗传算法训练attention的weight,现在只是通过遗传算法找到那些weight合适,其实做了一个筛选操作。送到LSTM神经网络中根据误差进行训练。

在这里插入图片描述
2. 然后重复步骤 c。
3. 最后构建新的种群。

在这里插入图片描述

  • 2
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
MATLAB是一种常用的编程语言和开发环境,用于进行各种科学计算和数据分析。CNN-LSTM-SE Attention是一种结合了卷积神经网络(Convolutional Neural Network,CNN)、长短期记忆网络(Long Short-Term Memory Network,LSTM)和自注意力机制(Self-Attention)的深度学习模型。 CNN是一种常用于图像处理和计算机视觉任务的神经网络模型。它可以自动提取图像中的特征,从而实现图像分类、目标检测等功能。 LSTM是一类特殊的循环神经网络(Recurrent Neural Network,RNN),能够有效地处理序列数据。LSTM具有记忆单元和门控单元,使得它能够捕捉并利用序列数据中的长期依赖关系,适用于自然语言处理、语音识别等任务。 自注意力机制是深度学习中的一种重要技术,能够自动地给序列中的每个元素分配权重。这样,模型可以有选择地关注重要的元素,忽略无关的元素,从而提升模型的性能。 CNN-LSTM-SE Attention结合了CNN、LSTM和自注意力机制的优势,能够在处理图像、视频、文本等序列数据时取得良好的效果。模型首先通过CNN提取输入序列的空间特征,然后通过LSTM捕捉序列的时间动态特征,最后利用自注意力机制进一步提取关键信息。 MATLAB提供了强大的深度学习工具箱,能够方便地实现和训练CNN-LSTM-SE Attention模型。利用MATLAB的深度学习工具箱,可以加载预训练的CNN和LSTM模型,设计自定义的自注意力机制,并进行端到端的模型训练和评估。 总之,MATLAB的CNN-LSTM-SE Attention是一种用于序列数据处理的深度学习模型,能够从输入序列中提取重要信息,具有广泛的应用前景。
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值