liveBook · Manning

Carry state

As explained in Inside Deep Learning: Math, Algorithms, Models

The LSTM memory state that carries longer-term information separately from the hidden state.

An LSTM carry state, written Cₜ, holds information for later use. The hidden state hₜ does more complex work and represents shorter-term information. This separation helps address the difficulty of carrying gradients back across many time steps. section 6.6.2

Three gates regulate the carry state:

  • The forget gate controls what to remove from Cₜ. section 6.6.2
  • The input gate controls what to add to Cₜ. section 6.6.2
  • The output gate controls how much of Cₜ contributes to hₜ. section 6.6.2

Sigmoid produces gate values from 0 to 1: multiplying by 0 blocks information, while multiplying by 1 lets it pass through. Intermediate values regulate how much passes. section 6.6.2

Figure 6.14 Diagram showing the detailed operations of an LSTM and how each gate is implemented and connected. The × indicates two values being multiplied together, and the + shows values being added together. The same color coding applies (red for the forget gate, blue for the input gate, and green for the output gate).

The diagram shows how the gates connect and how multiplication and addition regulate information flow through an LSTM. section 6.6.2

How Inside Deep Learning: Math, Algorithms, Models covers it

How deep it goes
Explains state roles and gate functions but provides no code or complete mathematical update equations.
Examples
Uses diagrams of sequential gates and their multiplication and addition operations.
What you can do after
Understand how forget, input, and output gates regulate information in the context state and hidden state.
How it connects
Connects LSTM memory to hidden states, gating, sigmoid, tanh, and residual-network short paths.

Also explained in

Compare how 5 books explain carry state →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Inside Deep Learning: Math, Algorithms, Models. The section links point to the parts of the book it draws on.