递归神经网络/LSTM 结构:c_t+1 = i_t * k_t + c_t * f_t

Recurrent Neural Networks / LSTM Structure: c_t+1 = i_t * k_t + c_t * f_t

LSTM 来源:https://medium.com/@jon.froiland/recurrent-neural-networks-part-6-d585c7af8923

output_t = activation(dot(state_t, Uo) + dot(input_t, Wo) + dot(C_t, Vo) + bo)
i_t = activation(dot(state_t, Ui) + dot(input_t, Wi) + bi)
f_t = activation(dot(state_t, Uf) + dot(input_t, Wf) + bf)
k_t = activation(dot(state_t, Uk) + dot(input_t, Wk) + bk)

您通过组合i_t、f_t和

获得新的进位状态(下一个c_t)
c_t+1 = i_t * k_t + c_t * f_t

我理解 f_t 和 i_t 或 k_t 的必要性,但是,我不直观地理解为什么 i_t 和 k_t 都是必要的。每个都包含相同的输入数据(state_t 和 input_t)。是否出于实施目的以帮助在矩阵维数方面与 c_t * f_t 保持一致?对此有任何想法表示赞赏!

在经典的LSTM中,这两者有不同的激活函数。 i_t 被称为具有 sigmoid 激活函数的输入门,k_t 也被称为具有 tanh 激活函数的 "candidate values"。我还阅读了术语输入和 "input" 和 "input modulation"(例如 Christopher Olah 在 LSTM 上的 Gal & Ghahramani). To cite the wonderful blog post

The next step [after the forget gate layer] is to decide what new information we’re going to store in the cell state. This has two parts. First, a sigmoid layer called the “input gate layer” decides which values we’ll update. Next, a tanh layer creates a vector of new candidate values, C~t, that could be added to the state. In the next step, we’ll combine these two to create an update to the state.

他指的输入门层是你的i_t,候选值是k_t。基本上,

the sigmoid layer tells us which (or what proportion of) values to update and the tanh layer tells us how to update the state.

(在博客 post 讨论中引用 Jann Krynauw)。请务必查看 post,我发现它对理解 LSTM 非常有帮助!