liveBook · Manning

Recurrent neural network

As explained in Fight Fraud with Machine Learning

A recurrent neural network is a neural-network model that processes ordered sequences by maintaining an internal state and using connections across time steps.

A recurrent neural network (RNN) models ordered data as a sequence [X1, X2, …, Xt], rather than treating every input as independent. Recurrent connections create cycles that preserve a hidden internal state, allowing information from one time step to influence the next. section 4.3.2

Use an RNN when the order and dependencies between observations matter:

  • Model time series or text, where later data points depend on earlier points. section 4.3 section 4.3.2
  • Carry intermediate outputs forward as inputs for subsequent time steps through recurrent connections. section 4.3.2
  • Prefer sequence-specific modeling over a fully connected network when temporal structure is relevant. section 4.3 section 4.3.2

Sequential image classification

A toy dog-versus-cat classifier can treat an image’s pixels as a sequence and replace fully connected hidden layers with a recurrent hidden layer. The example illustrates recurrence and memory, although the pixels are artificially treated as sequential data. section 4.3.2

Figure 4.16 Toy RNN model used to classify dog versus cat images by treating pixels of the input image as sequential data.

Trace the recurrent layer’s self-loop and the connections carrying information across time steps. section 4.3.2

How Fight Fraud with Machine Learning covers it

How deep it goes
Explains sequences, recurrent cycles, and hidden state, but stops short of detailed RNN variants or training mechanics.
Examples
Uses a dog-versus-cat pixel sequence and voice authentication for fraud detection.
What you can do after
Evaluate/understand when recurrent connections and hidden state suit sequential fraud-detection data.
How it connects
Contrasts recurrent neural networks with fully connected neural networks, convolutional neural networks, graph neural networks, and transformers.

Also explained in

Compare how 18 books explain recurrent neural network →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.