Gating is a learned way to control how much information a model retains, adds, or exposes. In an LSTM, gates use sigmoid values between 0 and 1 to scale information element by element. section 4.2
An LSTM uses three gates to manage its long-term cell state and short-term output:
- The forget gate scales the previous cell state, controlling how much past information remains. section 4.2
- The input gate filters a candidate update before it is added to the cell state. section 4.2
- The output gate controls how much of the updated cell state becomes the current output. section 4.2
Gating also appears in relational recurrent memory networks (RMCs). After attention lets memory slots exchange information and a feed-forward network refines them, a gate blends the new information with the old memory. section 7.4
Comparing remembered vectors
In a task asking which vector is second farthest from a reference vector, an RMC can use memory slots to track the reference and accumulate ranking evidence. Gating controls how much each updated slot retains. section 7.4
Figure 4.2 A single LSTM cell. The inputs are the current vector Xt, the previous hidden state ht–1, and the previous cell state Ct–1. There are three learned gates: the forget ft, input it, and output Ot. They are all produced by sigmoid layers (“σ” blocks). A tanh layer forms a candidate update \(\tilde{C}\)t. Pointwise multiplications (“×”) and an addition (“+”) update the cell state on the top “conveyor” pathway. Arrows indicate vector flow; the legend marks pointwise operations, concatenation, and copies. This is the standard LSTM, emphasizing how gating enables selective memory retention and exposure. Used with permission granted by the author (Chris Olah), though it is slightly modified from its original form.
Trace how the LSTM's three gates selectively update the cell-state pathway and shape the output. section 4.2



