fbpx
维基百科

長短期記憶


长短期记忆(英語:Long Short-Term MemoryLSTM)是一种时间循环神经网络(RNN)[1],论文首次发表于1997年。由于独特的设计结构,LSTM适合于处理和预测时间序列中间隔和延迟非常长的重要事件。

LSTM的表现通常比时间循环神经网络隐马尔科夫模型(HMM)更好,比如用在不分段连续手写识别[2]。2009年,用LSTM构建的人工神经网络模型赢得过ICDAR手写识别比赛冠军。LSTM还普遍用于自主语音识别,2013年運用TIMIT自然演講資料庫達成17.7%錯誤率的紀錄。作为非线性模型,LSTM可作为复杂的非线性单元用于构造更大型深度神经网络

历史

1997年,Sepp Hochreiter和于尔根·施密德胡伯提出LSTM。版本包含了cells, input以及output gates。

2014年,Kyunghyun Cho et al.发明了门控循环单元英语Gated recurrent unit(GRU)。[3]

2016年,谷歌用LSTM进行谷歌翻译[4] 苹果公司微软亞馬遜公司也用LSTM生产产品,例如:iPhone[5]Amazon Alexa[6]、等。中国公司也正在用LSTM。

结构

LSTM是一種含有LSTM區塊(blocks)或其他的一種類神經網路,文獻或其他資料中LSTM區塊可能被描述成智慧型網路單元,因為它可以記憶不定時間長度的數值,區塊中有一個gate能夠決定input是否重要到能被記住及能不能被輸出output。

右圖底下是四個S函數單元,最左邊函數依情況可能成為區塊的input,右邊三個會經過gate決定input是否能傳入區塊,左邊第二個為input gate,如果這裡產出近似於零,將把這裡的值擋住,不會進到下一層。左邊第三個是forget gate,當這產生值近似於零,將把區塊裡記住的值忘掉。第四個也就是最右邊的input為output gate,他可以決定在區塊記憶中的input是否能輸出 。

LSTM有很多个版本,其中一个重要的版本是GRU(Gated Recurrent Unit)[7],根据谷歌的测试表明,LSTM中最重要的是Forget gate,其次是Input gate,最次是Output gate[8]

方程

 

 
简单LSTM的结构[9]

变量

  •  : LSTM的input(輸入)
  •  : forget gate(遺忘閥)
  •  : input gate(輸入閥)
  •  : output gate(輸出閥)
  •  : hidden state(隱藏狀態)
  •  : cell state(單元狀態)
  •    : 訓練中的矩阵,网络学习计算元值


训练方法

為了最小化訓練誤差,梯度下降法(Gradient descent)如:應用時序性倒傳遞演算法英语Backpropagation through time,可用來依據錯誤修改每次的權重。梯度下降法在循環神經網路(RNN)中主要的問題初次在1991年發現,就是誤差梯度隨著事件間的時間長度成指數般的消失。當設置了LSTM 區塊時,誤差也隨著倒回計算,從output影響回input階段的每一個gate,直到這個數值被過濾掉。因此正常的倒循環類神經是一個有效訓練LSTM區塊記住長時間數值的方法。

Backpropagation through time英语Backpropagation through time、BPTT [10][11]

 
LSTM的经典模型

应用

参见

完整阅读

参考

  1. ^ S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735–1780, 1997.
  2. ^ A. Graves, M. Liwicki, S. Fernandez, R. Bertolami, H. Bunke, J. Schmidhuber. A Novel Connectionist System for Improved Unconstrained Handwriting Recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 31, no. 5, 2009.
  3. ^ Cho, Kyunghyun; van Merrienboer, Bart; Gulcehre, Caglar; Bahdanau, Dzmitry; Bougares, Fethi; Schwenk, Holger; Bengio, Yoshua. Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation. arXiv:1406.1078 [cs, stat]. 2014-09-02 [2020-02-11]. (原始内容于2022-02-08). 
  4. ^ Wu, Yonghui; Schuster, Mike; Chen, Zhifeng; Le, Quoc V.; Norouzi, Mohammad; Macherey, Wolfgang; Krikun, Maxim; Cao, Yuan; Gao, Qin. Google's Neural Machine Translation System: Bridging the Gap between Human and Machine Translation. arXiv:1609.08144 [cs]. 2016-10-08 [2020-02-11]. (原始内容于2021-01-14). 
  5. ^ Amir@theinformation.cOm. Apple’s Machines Can Learn Too. The Information. [2020-02-11]. (原始内容于2021-01-15). 
  6. ^ Bringing the Magic of Amazon AI and Alexa to Apps on AWS. - All Things Distributed. www.allthingsdistributed.com. [2020-02-11]. (原始内容于2019-04-01). 
  7. ^ Neural Machine Translation by Jointly Learning to Align and Translate (页面存档备份,存于互联网档案馆),Cho et al. 2014年。
  8. ^ 递归神经网络结构经验之谈 (页面存档备份,存于互联网档案馆),2015年。
  9. ^ Klaus Greff; Rupesh Kumar Srivastava; Jan Koutník; Bas R. Steunebrink; Jürgen Schmidhuber. LSTM: A Search Space Odyssey. IEEE Transactions on Neural Networks and Learning Systems. 2015, 28 (10): 2222–2232. PMID 27411231. arXiv:1503.04069 . doi:10.1109/TNNLS.2016.2582924. 
  10. ^ Problem Set 8. COS 485 Neural Networks: Theory and Applications. 2019-04-24 [2020-02-11] (英语). 
  11. ^ Danqi Chen. Recurrent Neural Networks (PDF). (原始内容 (PDF)于2020-09-02). 
  12. ^ Institute of Electrical and Electronics Engineers. 2006 IEEE/RSJ International Conference on Intelligent Robots and Systems : Beijing, China, 9-13 October 2006.. Piscataway, NJ: IEEE https://www.worldcat.org/oclc/812612388. 2006. ISBN 1-4244-0258-1. OCLC 812612388.  缺少或|title=为空 (帮助)

長短期記憶, 此條目可参照外語維基百科相應條目来扩充, 若您熟悉来源语言和主题, 请协助参考外语维基百科扩充条目, 请勿直接提交机械翻译, 也不要翻译不可靠, 低品质内容, 依版权协议, 译文需在编辑摘要注明来源, 或于讨论页顶部标记, href, template, translated, page, html, title, template, translated, page, translated, page, 标签, 长短期记忆, 英語, long, short, term, memory, lstm, . 此條目可参照外語維基百科相應條目来扩充 若您熟悉来源语言和主题 请协助参考外语维基百科扩充条目 请勿直接提交机械翻译 也不要翻译不可靠 低品质内容 依版权协议 译文需在编辑摘要注明来源 或于讨论页顶部标记 a href Template Translated page html title Template Translated page Translated page a 标签 长短期记忆 英語 Long Short Term Memory LSTM 是一种时间循环神经网络 RNN 1 论文首次发表于1997年 由于独特的设计结构 LSTM适合于处理和预测时间序列中间隔和延迟非常长的重要事件 LSTM的表现通常比时间循环神经网络及隐马尔科夫模型 HMM 更好 比如用在不分段连续手写识别上 2 2009年 用LSTM构建的人工神经网络模型赢得过ICDAR手写识别比赛冠军 LSTM还普遍用于自主语音识别 2013年運用TIMIT自然演講資料庫達成17 7 錯誤率的紀錄 作为非线性模型 LSTM可作为复杂的非线性单元用于构造更大型深度神经网络 目录 1 历史 2 结构 3 方程 3 1 变量 4 训练方法 5 应用 6 参见 7 完整阅读 8 参考历史 编辑1997年 Sepp Hochreiter和于尔根 施密德胡伯提出LSTM 版本包含了cells input以及output gates 2014年 Kyunghyun Cho et al 发明了门控循环单元 英语 Gated recurrent unit GRU 3 2016年 谷歌用LSTM进行谷歌翻译 4 苹果公司 微软和亞馬遜公司也用LSTM生产产品 例如 iPhone 5 Amazon Alexa 6 等 中国公司也正在用LSTM 结构 编辑LSTM是一種含有LSTM區塊 blocks 或其他的一種類神經網路 文獻或其他資料中LSTM區塊可能被描述成智慧型網路單元 因為它可以記憶不定時間長度的數值 區塊中有一個gate能夠決定input是否重要到能被記住及能不能被輸出output 右圖底下是四個S函數單元 最左邊函數依情況可能成為區塊的input 右邊三個會經過gate決定input是否能傳入區塊 左邊第二個為input gate 如果這裡產出近似於零 將把這裡的值擋住 不會進到下一層 左邊第三個是forget gate 當這產生值近似於零 將把區塊裡記住的值忘掉 第四個也就是最右邊的input為output gate 他可以決定在區塊記憶中的input是否能輸出 LSTM有很多个版本 其中一个重要的版本是GRU Gated Recurrent Unit 7 根据谷歌的测试表明 LSTM中最重要的是Forget gate 其次是Input gate 最次是Output gate 8 方程 编辑f t s g W f x t U f h t 1 b f i t s g W i x t U i h t 1 b i o t s g W o x t U o h t 1 b o c t f t c t 1 i t s c W c x t U c h t 1 b c h t o t s h c t displaystyle begin aligned f t amp sigma g W f x t U f h t 1 b f i t amp sigma g W i x t U i h t 1 b i o t amp sigma g W o x t U o h t 1 b o c t amp f t circ c t 1 i t circ sigma c W c x t U c h t 1 b c h t amp o t circ sigma h c t end aligned 简单LSTM的结构 9 变量 编辑 x t R d displaystyle x t in mathbb R d LSTM的input 輸入 f t R h displaystyle f t in mathbb R h forget gate 遺忘閥 i t R h displaystyle i t in mathbb R h input gate 輸入閥 o t R h displaystyle o t in mathbb R h output gate 輸出閥 h t R h displaystyle h t in mathbb R h hidden state 隱藏狀態 c t R h displaystyle c t in mathbb R h cell state 單元狀態 W R h d displaystyle W in mathbb R h times d U R h h displaystyle U in mathbb R h times h b R h displaystyle b in mathbb R h 訓練中的矩阵 网络学习计算元值训练方法 编辑為了最小化訓練誤差 梯度下降法 Gradient descent 如 應用時序性倒傳遞演算法 英语 Backpropagation through time 可用來依據錯誤修改每次的權重 梯度下降法在循環神經網路 RNN 中主要的問題初次在1991年發現 就是誤差梯度隨著事件間的時間長度成指數般的消失 當設置了LSTM 區塊時 誤差也隨著倒回計算 從output影響回input階段的每一個gate 直到這個數值被過濾掉 因此正常的倒循環類神經是一個有效訓練LSTM區塊記住長時間數值的方法 Backpropagation through time 英语 Backpropagation through time BPTT 10 11 LSTM的经典模型应用 编辑机器控制 12 時間序列 语音识别 音乐 自然语言处理 手写识别 生物 飞机处理 自動駕駛汽車 自平衡滑行车 电脑游戏 动画 即時天氣預報 ConvLSTM 参见 编辑人工神经网络 深度学习 前额叶皮质基底节工作记忆 英语 Prefrontal Cortex Basal Ganglia Working Memory PBWM 循环神经网络 RNN 时间序列 Seq2seq完整阅读 编辑理解LSTM网络 页面存档备份 存于互联网档案馆 作者Christopher Olah 更新于2015年八月 http people idsia ch juergen rnn html 页面存档备份 存于互联网档案馆 https www youtube com watch v cTqVhcrilrE amp list WL amp index 51参考 编辑 S Hochreiter and J Schmidhuber Long short term memory Neural Computation 9 8 1735 1780 1997 A Graves M Liwicki S Fernandez R Bertolami H Bunke J Schmidhuber A Novel Connectionist System for Improved Unconstrained Handwriting Recognition IEEE Transactions on Pattern Analysis and Machine Intelligence vol 31 no 5 2009 Cho Kyunghyun van Merrienboer Bart Gulcehre Caglar Bahdanau Dzmitry Bougares Fethi Schwenk Holger Bengio Yoshua Learning Phrase Representations using RNN Encoder Decoder for Statistical Machine Translation arXiv 1406 1078 cs stat 2014 09 02 2020 02 11 原始内容存档于2022 02 08 Wu Yonghui Schuster Mike Chen Zhifeng Le Quoc V Norouzi Mohammad Macherey Wolfgang Krikun Maxim Cao Yuan Gao Qin Google s Neural Machine Translation System Bridging the Gap between Human and Machine Translation arXiv 1609 08144 cs 2016 10 08 2020 02 11 原始内容存档于2021 01 14 Amir theinformation cOm Apple s Machines Can Learn Too The Information 2020 02 11 原始内容存档于2021 01 15 Bringing the Magic of Amazon AI and Alexa to Apps on AWS All Things Distributed www allthingsdistributed com 2020 02 11 原始内容存档于2019 04 01 Neural Machine Translation by Jointly Learning to Align and Translate 页面存档备份 存于互联网档案馆 Cho et al 2014年 递归神经网络结构经验之谈 页面存档备份 存于互联网档案馆 2015年 Klaus Greff Rupesh Kumar Srivastava Jan Koutnik Bas R Steunebrink Jurgen Schmidhuber LSTM A Search Space Odyssey IEEE Transactions on Neural Networks and Learning Systems 2015 28 10 2222 2232 PMID 27411231 arXiv 1503 04069 doi 10 1109 TNNLS 2016 2582924 Problem Set 8 COS 485 Neural Networks Theory and Applications 2019 04 24 2020 02 11 英语 Danqi Chen Recurrent Neural Networks PDF 原始内容存档 PDF 于2020 09 02 Institute of Electrical and Electronics Engineers 2006 IEEE RSJ International Conference on Intelligent Robots and Systems Beijing China 9 13 October 2006 Piscataway NJ IEEE https www worldcat org oclc 812612388 2006 ISBN 1 4244 0258 1 OCLC 812612388 缺少或 title 为空 帮助 取自 https zh wikipedia org w index php title 長短期記憶 amp oldid 72658589, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。