liveBook · Manning

Hidden state

As explained in Graph Neural Networks in Action

A hidden state is the recurrent internal representation that carries sequence information between processing steps.

A hidden state is the recurrent representation that carries sequence information between processing steps. At step t, an RNN combines the current input with the previous state hₜ₋₁, produces an output, and passes the new state hₜ to the next step. section 6.5.1

A recurrent update follows a short pipeline:

  • Use a GRU’s update gate to retain or replace information and its reset gate to control what is forgotten. section 6.5.1 section 6.4.2

In spatiotemporal graph models, hidden states can represent nodes rather than an entire sequence. A graph decoder uses edge-derived messages to update each node’s state, then uses the updated representations to predict future frames. section 6.4.2

PyTorch recurrent model

A compact sequence model creates h0 with shape (num_layers, batch_size, hidden_size), moves it to the input device, and calls nn.GRU(x, h0). A linear layer then maps recurrent outputs to predictions, such as the final ten time steps.

How Graph Neural Networks in Action covers it

How deep it goes
Explains temporal propagation, zero initialization, GRU gating, and graph-decoder updates without deriving recurrent equations.
Examples
Uses pose-estimation RNN and GRU models plus a custom graph GRU that aggregates sender-receiver edge messages.
What it assumes
Builds from RNN sequence processing and introduces gated state updates through GRU reset and update gates.
What you can do after
Apply it via PyTorch by initializing, passing, and optionally returning recurrent state in sequence and graph decoders.
How it connects
Connects hidden state to recurrent neural networks, GRUs, update gates, reset gates, message passing, graph decoders, and future-frame prediction.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.