Back to AI/ML
AI/ML · Learned Representations

Deep Learning

Composed differentiable layers that learn the features themselves, specialized by the structural prior each architecture encodes.

The premise

Instead of supplying features, you supply an architecture whose structure matches the structure of the data — locality for images, recurrence or causal masking for sequences, adjacency for graphs — and let gradient descent learn the representation. That buys you the ability to model interactions nobody could hand-engineer. It costs data, compute, calibration, and interpretability, and it wins only when there is enough data for the learned representation to beat a stated one.

Most general

Foundations

The dense layer and backpropagation — the substrate every other architecture is built from.

The most general neural form: no structural prior at all, every input connected to every unit. Everything below is this with a constraint added.

Rung 2

Spatial

Weight sharing and locality — the convolutional prior.

Specializes the dense layer by asserting that nearby inputs are related and that the same feature detector applies everywhere.

Convolutional Neural Network

Slide a small learned filter across the input and record how strongly it responds at each position. Two assumptions are baked into that operation and they are the whole reason it works: nearby inputs are related (locality), and a feature worth detecting in one place is worth detecting everywhere (translation equivariance, via weight sharing). Stack these layers and the receptive field widens, so early layers see edges and later ones see objects.

SupervisedConvolutional

Object Detection Heads (IoU & Box Regression)

A classifier answers "what is this image". A detector has to answer "what is here, and where, and how many" — and the last part is the hard one, because a network produces a fixed-size output and an image contains a variable number of objects. Every design resolves this the same way: predict far more boxes than there could be, have almost all of them predict "nothing", and clean up the duplicates afterwards. That structure explains the two facts that dominate the field. The class imbalance is extreme, because background outnumbers objects by orders of magnitude. And the deduplication step — non-maximum suppression — is a hand-written greedy algorithm bolted to the outside of a learned system, which is exactly the kind of seam that later designs try to remove.

SupervisedConvolutional

Residual Network (ResNet)

Instead of asking a stack of layers to learn the mapping H(x) directly, ask it to learn only the correction F(x) = H(x) - x and add the input back: y = F(x) + x. If the best thing a block can do is nothing, it only has to push its weights toward zero, which is easy; a plain stack has to learn the identity map through several nonlinear layers, which turns out to be hard. That is the whole idea, and its consequence was surprising: before it, making a network deeper made it train worse, not just generalise worse. After it, hundreds of layers train with ordinary SGD, and the shortcut became the default way to wire any deep network.

SupervisedConvolutional

U-Net

Downsampling is how a network learns WHAT is in an image, and it is exactly what destroys WHERE it is. A U-Net refuses to choose. A contracting path (convolution, then downsample, repeated) trades resolution for context until the bottleneck sees the whole scene. An expanding path (upsample, then convolution) climbs back to input resolution. And at every scale the encoder feature map is CONCATENATED onto the decoder feature map, handing the decoder the fine spatial detail the pooling threw away, so it only has to decide what each pixel is rather than reconstruct where the boundary was. The output is a class distribution at every pixel, which is why it is called dense prediction. Concatenation is the point: ResNet adds its skip, which forces the two sources to share channels and be summed blindly, whereas a U-Net stacks them and lets the next convolution learn how much of each to trust.

SupervisedConvolutional
Rung 3

Sequence

Recurrence and causal convolution — architectures that carry state across time.

Specializes by asserting order matters and the past may not see the future; gating (LSTM/GRU) then specializes further to fix the vanishing-gradient failure of plain recurrence.

Recurrent Neural Network

A feedforward network sees a fixed-size input and has no way to represent "what came before". Give it a hidden state that is fed back in alongside the next input and it does: the state is a running summary of everything seen so far, updated once per step. Weights are shared across steps, so the same update rule applies at position three and position three hundred — which is what lets one model handle sequences of any length. The trouble is in the gradient. To learn from step three hundred what happened at step three, the error has to be multiplied back through three hundred copies of the same matrix, and repeated multiplication by a matrix either shrinks toward zero or grows without bound. Almost nothing in between.

SupervisedSelf-supervisedRecurrent

Long Short-Term Memory

A recurrent cell that carries an explicit memory track alongside its hidden state, and learns three gates that decide what to erase from that memory, what to write into it, and what to expose. The memory passes forward through addition rather than repeated multiplication, which is the entire trick: gradients can travel back hundreds of steps without vanishing.

SupervisedLSTM / GRU

Gated Recurrent Unit

A plain RNN overwrites its state at every step, which is why a signal from far back is gone by the time it would be useful. The fix is to let the network decide, per step and per dimension, how much to overwrite and how much to keep. That is the update gate: a number between zero and one that interpolates between the old state and a freshly computed candidate. Set it near zero and the state passes through untouched — and crucially, the gradient passes through with it, because carrying a value forward is addition rather than multiplication. The reset gate does the complementary job: it decides how much of the old state the candidate is even allowed to look at, which lets the unit forget deliberately rather than by decay.

SupervisedSelf-supervisedLSTM / GRU

Temporal Convolutional Network

A convolution over time looks at a fixed window, which is too short to be useful and too expensive to widen by brute force. Two modifications fix that. Causal: pad only on the left, so a position never sees the future — without which the model cheats and the validation numbers are fiction. Dilated: skip a growing number of positions between taps at each layer, so a stack of layers with dilations 1, 2, 4, 8 reaches back sixteen steps with four layers rather than sixteen. The receptive field doubles per layer, so it grows exponentially in depth while the parameter count grows linearly. And because nothing is carried forward, every output position is computed from its own window independently — the entire sequence in one parallel pass.

SupervisedSelf-supervisedConvolutional

Seq2Seq with Attention

Translating a sentence with a plain encoder-decoder means reading the whole source, compressing it into one fixed vector, and then generating from that vector alone. Everything the decoder will ever know about the source has to fit there — and it does not, which is why the approach degraded sharply on long sentences and why reversing the source words used to help. Attention removes the compression. Keep every encoder state, and at each output step compute a score between what the decoder is currently doing and each source position, turn those scores into weights that sum to one, and read a weighted average. The decoder is no longer remembering the source; it is looking at it, and choosing where to look.

SupervisedHybrid

Connectionist Temporal Classification

You have a thousand audio frames and a nine-character transcript, and nobody has told you which frames belong to which character. Rather than guess an alignment, add a blank symbol meaning "emit nothing here" and score every alignment that collapses to the transcript, summing them all. There are exponentially many, but because the alignment can only move forward, the sum factorizes into a two-pass dynamic program that computes it exactly.

SupervisedHybrid
Rung 4

Graph

Message passing over an explicit adjacency structure.

Generalizes convolution from a fixed grid to an arbitrary graph — the right prior when the relationships between entities are known rather than inferred.

Graph Neural Network

Each node builds a representation by gathering messages from its neighbours, combining them, and updating itself — then repeats. After k rounds a node has absorbed information from everything within k hops. It is convolution generalized off the grid: a CNN assumes neighbours are the adjacent pixels, a GNN asks you to supply the adjacency explicitly. That single change is what lets it operate on molecules, payment networks, and road systems, where "nearby" is a relationship rather than a coordinate.

SupervisedSemi-supervisedSelf-supervisedGraph

Spatio-Temporal Graph Network

A hundred traffic sensors are not a hundred independent series: congestion at one junction shows up downstream twenty minutes later, and the road network says which junctions are downstream. So alternate two operations — mix each node with its graph neighbours, then mix each node with its own recent past — and stack them. Spatial dependency comes from the graph rather than from being learned blind, which is the entire reason this beats a per-series model when the network is real.

SupervisedGraph

DeepWalk & Node2Vec

Word2vec learned that a word is defined by the words it appears near. A graph has no sentences, so make some: start at a node and take a random walk, and treat the sequence of nodes you visit as a sentence. Then run skip-gram on that corpus unchanged. Nodes that keep showing up in each other’s walks get similar vectors, and because a walk can be biased to either circle a neighbourhood or head away from it, the same machinery produces either community structure or structural role depending on two knobs.

Self-supervisedFeedforward
Rung 5

Attention

Learned, content-based routing between all positions.

Replaces a fixed structural prior with a learned one — which is why it generalizes across modalities, and why it needs far more data than the architectures whose prior is built in.

Transformer

Every position looks at every other position and decides, from content alone, which ones matter to it. A convolution asserts in advance that neighbours are relevant; recurrence asserts that recency is. Attention asserts neither — it learns the routing. That is why it transfers across modalities, and also why it needs far more data than architectures whose prior is built in: it has to learn from scratch what the others assume.

SupervisedSelf-supervisedTransformer

Vision Transformer

Cut the image into a grid of 16-by-16 patches, flatten each one into a vector, and feed the resulting sequence to a plain text transformer with nothing changed. The model is told nothing about two-dimensional structure — not locality, not translation equivariance, not scale — beyond a learned position embedding per patch. That sounds like it should not work, and on a hundred thousand images it does not: below a certain data scale a convolutional network wins comfortably, because the biases a CNN hardcodes are true and free. Above that scale the transformer learns better biases than the ones we knew to build in, and overtakes.

SupervisedSelf-supervisedTransformer

Temporal Fusion Transformer

Most forecasting inputs are not the same kind of thing. Store size never changes; a public holiday next Tuesday is known now; yesterday’s footfall was observed and tomorrow’s will not be. A plain sequence model that concatenates all of these into one vector per timestep either leaks future information or throws away covariates it legitimately has. TFT keeps the three kinds separate by construction, learns which variables matter at each step, and emits quantiles rather than a point — which is what a forecast is actually for, since the decision downstream is almost always asymmetric in cost.

SupervisedHybrid
Rung 6

Forecasting-Native

Architectures designed for the forecasting task rather than adapted to it.

The most specialized group: basis expansion, probabilistic heads, and multi-horizon decoding, all assuming the deliverable is a forecast.

Rung 7

Representation

Networks trained to compress and reconstruct rather than to predict a label.

Specializes the objective rather than the architecture — reconstruction error becomes the signal, which is what makes this the deep anomaly-detection workhorse.

Rung 8

Retrieval

Encoders trained so that relevance becomes geometric distance in a shared space.

Specializes representation learning toward a systems constraint: the embedding must be indexable, because selecting from millions of candidates in milliseconds is an infrastructure problem the model architecture has to accommodate.

Most specialized

Scientific & Continuous-Depth

Networks whose structure encodes a differential equation or a physical law.

The most specialized group: replaces the discrete stack of layers with a continuous dynamic, and replaces "fit the data" with "fit the data while obeying known physics" — the strongest prior in the category.