循环神经网络
1 RNN的统计学基础
1.1 回归:
Investpedia:
Regression refers to the relation between selected values of x and observed values of y (from which the most probable value of y can be predicted for any value of x). The general form of each type of regression is:
- Simple linear regression:
- Multiple linear regression:
Where:
= the variable that you are trying to predict (dependent variable,因变量).
= the variable that you are using to predict Y (independent variable,自变量).
= the intercept(截距).
= the slope(斜率).
= the regression residual(回归残差).
1.2 自回归(Auto-Regression, AR模型)
自回归,即AR模型,属于时间序列分析的范畴,即用一个变量的历史信息来预测自己,tutorialspoint给出的定义:
- For a stationary time series, an auto regression models sees the value of a variable at time ‘t’ as a linear function of values ‘p’ time steps preceding it. Mathematically it can be written as:
Where,‘p’ is the auto-regressive trend parameter
is white noise, and denote the value of variable at previous time periods.
1.3 有外部输入的非线性自回归模型(Nonlinear AutoRegressive with Exogenous Inputs Model,NARX)
NARX是自回归模型的扩展,在每个时刻都有一个外部输入,产生一个输出,NARX通过一个延时器记录最近次的外部输入和最近次的输出,第个时刻的输出为:
其中表示非线性函数,可以是一个前馈网络, 和为超参数。
2 简单循环神经网络
2.1 循环神经网络的通用近似定理
如果一个完全连接的循环神经网络有足够数量的 sigmoid 型隐藏神经元,它可以以任意的准确率去近似任何一个非线性动力系统:
2.2 学习模式
2.3 参数学习
2.4 梯度爆炸、梯度消失与长程依赖问题
2.5 门控机制、LSTM及其变体
2.6 深层循环神经网络
2.6.1 堆叠循环神经网络
图 按时间展开的堆叠循环神经网络
2.6.2 双向循环神经网络
在有些任务中,一个时刻的输出不但和过去时刻的信息有关,也和后续时刻
的信息有关.比如给定一个句子,其中一个词的词性由它的上下文决定,即包含左右两边的信息.因此,在这些任务中,我们可以增加一个按照时间的逆序来传递信息的网络层,来增强网络的能力.
双向循环神经网络(Bidirectional Recurrent Neural Network,Bi-RNN)由
两层循环神经网络组成,它们的输入相同,只是信息传递的方向不同.
图 按时间展开的双向循环神经网络