← Speech and Language Processing
NLP›Popular Textbooks› SLP · Chapter 14

Chapter 14

RNNs and LSTMs: How a Sequence Carries Its Past

Chapter: RNNs and LSTMs, in Daniel Jurafsky and James H. Martin, Speech and Language Processing, 3rd edition draft, August 19, 2026.

Topics to learn

Page numbers refer to the linked chapter PDF.

FAQ

Why can one recurrent weight learn from several positions?

The same parameter is used at each step. Its gradient is the sum of every path by which those uses affect the loss, including paths through later states.

Does a closed output gate erase an LSTM's memory?

No. A small output gate limits the state exposed at this step. The cell's forget and input updates decide what remains for later steps.

Can a bidirectional encoder feed a left-to-right decoder?

Yes, when the whole source is available before decoding starts. The decoder still must not read future target tokens.

What is weight tying?

Using one matrix both to embed input tokens and to score output tokens, when the dimensions match. It is a parameter-sharing choice, not a change to the recurrence.