liveBook · Manning

Gating

As explained in Sutskever's List

Gating is a learned mechanism that controls how much newly computed information is combined with retained information.

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.
figure

Trace how the LSTM's three gates selectively update the cell-state pathway and shape the output. section 4.2

How Sutskever's List covers it

How deep it goes
Explains LSTM gate roles and elementwise filtering, then relates gating to RMC memory updates.
Examples
Uses an LSTM cell diagram and an RMC task comparing vectors by distance from a reference.
What you can do after
Understand how gates regulate memory retention, updating, and exposure in recurrent models.
How it connects
Connects gating to LSTMs, cell states, recurrent neural networks, and attention.

Also explained in

Compare how 4 books explain gating →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Sutskever's List. The section links point to the parts of the book it draws on.