liveBook · Manning

Carry state

As explained in Natural Language Processing in Action, Second Edition

A cell state is the persistent recurrent representation maintained by an LSTM across sequence positions.

Carry state is the persistent cell-state representation an LSTM passes from one sequence position to the next. It stores long-term patterns, while the hidden state emphasizes recently processed tokens and produces the current output. section 8.4.3

An LSTM updates carry state through learned gates:

  • The forget gate determines which existing state elements remain available. section 8.4.3
  • The input gate controls which candidate information enters the state. section 8.4.3

Reading a sequence

As tokens arrive, the carry state preserves a representation of meaning from earlier text and reuses it when processing later tokens. The hidden state remains the recurrent output needed at each time step. section 8.4.3

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Explains gate roles, state equations, and hidden-state interaction, but does not derive the learned weight matrices.
Examples
Uses token sequences, long documents, gate diagrams, and compact matrix equations to illustrate recurrent memory.
What it assumes
Assumes familiarity with recurrent neural networks and hidden states while introducing gated memory incrementally.
What you can do after
Understand how LSTMs preserve, update, and expose sequence information through a separate cell-state pathway.
How it connects
Connects LSTM carry state with hidden state, recurrent neural networks, gates, backpropagation, and GRUs.

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 Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.