GRU算法出自這篇文章:"Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation"。這里介紹下這篇文章的主要貢獻。
RNN Encoder–Decoder
文章首先提出一種RNN的自編碼結構。相比于一個個單詞的預測方法,這種結構能夠更有效的學習序列中的隱含信息。這相當于在模型中增加了更多的標簽信息。
Hidden Unit that Adaptively Remembers and Forgets
然后,該文章提出了一種自適應記憶和忘記的結構。該結構的主要思想是為每個unit設計記憶和忘記的機制,從而學習到長短期的特征。對于短期記憶單元,reset gate就會頻繁的激活;對長期記憶單元,update gate會經常激活。
原文中的解釋是
As each hidden unit has separate reset and update gates, each hidden unit will learn to capture dependencies over different time scales. Those units that learn to capture short-term dependencies will tend to have reset gates that are frequently active, but those that capture longer-term dependencies will have update gates that are mostly active.
對比LSTM
相比于LSTM,GRU算法有以下優勢:
- 在保留基本思想(遺忘和更新機制)的基礎上,簡化了網絡結構。
- 利用update門使每個單元學習長短期特征,減小了梯度彌散的風險。