Long short-term memory:

make that short-term memory last for a long time.

Paper Reference:

A Critical Review of Recurrent Neural Networks for Sequence Learning

Three Types of Gate

Input Gate:

Controls how much of the current input \(x_t\) and the previous output \(h_{t-1}\) will enter into the new cell.
\[i_t=\sigma(W^i x_t+U^i h_{t-1}+b^i)\]

Forget Gate:

Decide whether to erase (set to zero) or keep individual components of the memory.
\[f_t=\sigma(W^f x_t+U^f h_{t-1}+b^f)\]

Cell Update:

Transforms the input and previous state to be taken into account into the current state.
\[g_t=\phi(W^g x_t+U^g h_{t-1}+b^g)\]

Output Gate:

Scales the output from the cell.
\[o_t=\sigma(W_o x_t+U^o h^{t-1}+b^o)\]

Internal State update:

Computes the current timestep's state using the gated previous state and the gated input.
\[s_t=g_t\cdot i_t+s_{t-1}\cdot f_t\]

Hidden Layer:

Output of the LSTM scaled by a \(\tanh\) (squashed) transformations of the current state.
\[h_t=s_t\cdot \phi(o_t)\]

其中\(\cdot\) 代表"element-wise matrix multiplication"(对应元素相乘),\(\phi(x)=\tanh(x),\sigma(x)=sigmoid(x)\)
\[\phi(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}},\sigma(x)=\frac{1}{1+e^{-x}}\]

Parallel Computing

input gate, forget gate, cell update, output gate can be computed in parallel.

\[\begin{bmatrix} i^t\\ f^t\\g^t\\o^t \end{bmatrix} =\begin{bmatrix}\sigma\\ \sigma\\\phi\\\sigma\end{bmatrix}\times W\times[x^t,h^{t-1}]\]

LSTM network for Semantic Analysis


Model Architecture
Model: LSTM layer --> Averaging Pooling --> Logistic Regession

Input sequence:

\[x_0,x_1,x_2,\cdots,x_n\]

representation sequence:

\[h_0,h_1,h_2,\cdots,h_n\]

This representation sequence is then averaged over all timesteps resulting in representation h:
\[h=\sum\limits_i^n{h_i}\]

Bidirectional LSTM

貌似只能用于 fixed-length sequence. 还有一点就是在传统的机器学习中我们实际上无法获取到 future infromation

Long Short-Term Memory (LSTM)公式简介的更多相关文章

  1. LSTM学习—Long Short Term Memory networks

    原文链接:https://colah.github.io/posts/2015-08-Understanding-LSTMs/ Understanding LSTM Networks Recurren ...

  2. LSTM(Long Short Term Memory)

    长时依赖是这样的一个问题,当预测点与依赖的相关信息距离比较远的时候,就难以学到该相关信息.例如在句子”我出生在法国,……,我会说法语“中,若要预测末尾”法语“,我们需要用到上下文”法国“.理论上,递归 ...

  3. [译] 理解 LSTM(Long Short-Term Memory, LSTM) 网络

    本文译自 Christopher Olah 的博文 Recurrent Neural Networks 人类并不是每时每刻都从一片空白的大脑开始他们的思考.在你阅读这篇文章时候,你都是基于自己已经拥有 ...

  4. Long Short-Term Memory (LSTM)

                         Long Short-Term Memory (LSTM) Outline Background LSTM Network Extended LSTM LST ...

  5. Mathjax与LaTex公式简介

    MathJax与LaTex公式简介 (转载) PS: 原文链接写的非常好!!! 博主写这篇文章,一是为了防止原链接失效,二是在cnblogs上测试MathJax; 本文从math.stackexcha ...

  6. (转).NET Memory Profiler 使用简介

    1         简介 .Net Memory Profiler(以下简称Profiler):专门针对于.NET程序,功能最全的内存分析工具,最大的特点是具有内存动态分析(Automatic Mem ...

  7. Gated Recurrent Unit (GRU)公式简介

    update gate $z_t$: defines how much of the previous memory to keep around. \[z_t = \sigma ( W^z x_t+ ...

  8. [Android Memory] Android Lint简介(转载)

    英文原文:http://tools.android.com/tips/lint  参照文章:http://blog.csdn.net/thl789/article/details/8037473 转载 ...

  9. DMA(Direct Memory Access)简介

    什么是DMA(Direct Memory Access) DMA绕过CPU,在内存和外设之间开辟了一条 "隧道" ,直接控制内存与外设之间的操作,并完全由硬件控制. 这样数据传送不 ...

随机推荐

  1. 统计文件种类数+获取子shell返回值的其它方法

    前言 只是作为一个shell的小小练习和日常统计用,瞎折腾的过程中也是摸到了获取子shell返回值的几种方法: 肯定还有别的方法,跟进程间的通信相关,希望你能提出建议和补充,谢谢~ 完整程序: #! ...

  2. 7 Must Read Python Books

    7 Must Read Python Books I started learning Python just two years ago. Coming from a C++ and Java ba ...

  3. nodejs缓冲模块buffer相关资料

    buffer模块的详细使用教程 浅析nodejs的buffer类 深入浅出NodeJS--Buffer Node Buffer/Stream 内存策略分析

  4. gcc/g++中weak弱符号及alias别名

    最近查看linux内核代码时,表现了一些编译器选项如__attribute_((weak)).__attribute__( (alias("target"))),一开始不了解,后来 ...

  5. 基本shell编程【2】-服务端发布脚本

    set -x deployBase="/var/lib/tomcat7/webapps" bakBase="/root/bak" echo "auto ...

  6. 【小白的CFD之旅】16 流程

    那天听了小牛师兄关于CFD应用的四种境界的说法后,小白发现自己连第一种境界都算不上,自己对于CFD还只是停留在做了少数几个案例的基础上,可以说是对其一无所知.不过小白不是那种遇到挫折就退缩的人,他决定 ...

  7. C#基础---Attribute(标签) 和 reflect(反射) 应用

    1.Attribute的定义与作用: 公共语言运行时允许你添加类似关键字的描述声明,叫做attributes, 它对程序中的元素进行标注,如类型.字段.方法和属性等.Attributes和Micros ...

  8. 【JavaScript Demo】回到顶部功能实现

    随着网站的不断发展,需要展示的内容也越来越丰富,这导致网页上能展示的内容越来越多.当内容堆积影响了用户体验,就需考虑如何提升用户体验.在这一系列的改动中,“回到顶部”的功能成为了一个经典. 1.页面布 ...

  9. BZOJ3223: Tyvj 1729 文艺平衡树 [splay]

    3223: Tyvj 1729 文艺平衡树 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 3595  Solved: 2029[Submit][Sta ...

  10. POJ1190生日蛋糕[DFS 剪枝]

    生日蛋糕 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 18236   Accepted: 6497 Description ...