Abhinaash Blog

Article thumbnail.

Geometric Deep Learning, Explained: Why Symmetry Is the Real Architecture

The first time I tried to learn deep learning properly, it felt like walking into a zoo with no signs. CNNs over here. RNNs and LSTMs in that cage. Graph neural networks in a new enclosure that kept growing. Transformers somewhere near the entrance, drawing all the crowds. Every architecture came with its own vocabulary, its own tricks, and its own origin story.

What I wanted was a map. Geometric Deep Learning (GDL) is the best map I've found so far.

The claim is simple enough to fit on a sticky note: most successful neural architectures follow from the symmetries of the data's domain. Tell me what your data lives on and which transformations shouldn't change the answer, and I can tell you, roughly, what your network should look like.

This post walks through that idea from the ground up. There's math, but I'll try to keep each piece motivated.

1. A 150-year-old idea

In 1872, Felix Klein had a problem. Geometry had split into a mess of competing systems: Euclidean, affine, projective, hyperbolic. Mathematicians argued about which one was "true."

Klein's fix, now called the Erlangen Programme, was to stop arguing and start classifying. A geometry, he said, is the study of whatever stays unchanged under some group of transformations.

Bigger group, fewer invariants. And suddenly the relationships between geometries were just relationships between groups.

The idea spread well beyond geometry. Noether showed that symmetries give conservation laws. Physicists classified particles as representations of symmetry groups. The Standard Model is a gauge theory.

GDL applies the same move to neural networks. Instead of a zoo, we get a small set of principles, and architectures become consequences of those principles.

2. Why we need priors at all: the curse of dimensionality

Before talking about symmetry, it helps to see why "just use a big network" isn't enough.

The learning setup

We have samples $x_i$ drawn from some distribution $P$ and labels $y_i = f^*(x_i)$. We pick a model $f$ from a hypothesis class $\mathcal{F}$ to minimise the risk

$$ \mathcal{R}(f) = \mathbb{E}_{x \sim P}\, \ell\big(f(x), f^*(x)\big). $$

Our error roughly splits into three parts:

$$ \text{error} \;\approx\; \underbrace{\text{approximation}}_{\text{can } \mathcal{F} \text{ express } f^*?} + \underbrace{\text{statistical}}_{\text{enough data?}} + \underbrace{\text{optimisation}}_{\text{can we find it?}} $$

A richer model class helps the first term and hurts the second. A good inductive bias shrinks both at once.

Universal approximation doesn't save us

The universal approximation theorem says a two-layer network

$$ f(x) = \sum_{j=1}^m a_j\, \sigma(\langle w_j, x\rangle + b_j) $$

can approximate any continuous function on a compact set, as long as $\sigma$ isn't a polynomial. Great. But it says nothing about how many neurons you need or how many samples it takes to find them.

Lipschitz functions are already hopeless

Take the gentlest assumption imaginable: $f^*$ is 1-Lipschitz, meaning $|f(x) - f(x')| \le \|x - x'\|$.

Here's the problem. Chop the cube $[0,1]^d$ into little cells of side $r$. There are $r^{-d}$ of them. In each cell, put a tiny bump pointing up or down at random. Every such function is 1-Lipschitz. If a cell has no training points in it, you have zero information about which way its bump points.

Work it through and you get an error of about $N^{-2/d}$ with $N$ samples. To reach error $\epsilon$, you need

$$ N \gtrsim \epsilon^{-d/2}. $$

For a small image, $d$ is in the tens of thousands. That number of samples doesn't exist.

Smoothness alone won't rescue us either. (Barron's classical result does give a dimension-free rate for a special class of functions, but that class is too narrow for things like "is there a cat in this photo?")

So we need a different kind of prior. Not "the function is smooth," but "the input has structure." That's where geometry comes in.

3. The three geometric priors

Signals on domains

The key shift is to stop viewing an input as a flat vector in $\mathbb{R}^d$. Instead, treat it as a signal on a domain:

$$ x : \Omega \to \mathcal{C}. $$

Here $\Omega$ is the domain and $\mathcal{C}$ is the channel space. Some examples:

The space of signals $\mathcal{X}(\Omega, \mathcal{C})$ is huge, but the structure of $\Omega$ tells us which functions of $x$ make sense.

Prior 1: Symmetry

A symmetry is a transformation that leaves something we care about unchanged. Symmetries always form a group.

A group $\mathfrak{G}$ acting on the domain automatically acts on signals:

$$ (\mathfrak{g}.x)(u) = x(\mathfrak{g}^{-1} u). $$

(The inverse is there so that composing two transformations works out in the right order. If you shift an image right by $v$, the pixel now at $u$ used to be at $u - v$.)

This action is linear, so it's a representation $\rho(\mathfrak{g})$. For a set of $n$ elements, it's just a permutation matrix acting on the rows of $\mathbf{X}$.

Now the two words that matter most in this whole field:

A handy fact that the whole blueprint relies on: compose equivariant maps and you get an equivariant map. Put an invariant map at the end and the whole thing is invariant.

Why does this help statistically? If $f^*$ is invariant, it only depends on the orbit of $x$, not $x$ itself. The space of orbits is smaller, so you need fewer samples to cover it.

A detour into graphs: isomorphism

On graphs, the symmetry isn't a geometric motion. It's relabelling. Node order is arbitrary, so if $\mathbf{P}$ is a permutation matrix,

$$ (\mathbf{X}, \mathbf{A}) \mapsto (\mathbf{P}\mathbf{X},\; \mathbf{P}\mathbf{A}\mathbf{P}^\top) $$

describes the same graph. A graph-level model must satisfy $f(\mathbf{P}\mathbf{X}, \mathbf{P}\mathbf{A}\mathbf{P}^\top) = f(\mathbf{X}, \mathbf{A})$, and a node-level model must satisfy $F(\mathbf{P}\mathbf{X}, \mathbf{P}\mathbf{A}\mathbf{P}^\top) = \mathbf{P}F(\mathbf{X}, \mathbf{A})$.

We'll come back to this later, because it limits what graph networks can tell apart.

Prior 2: Deformation stability

Real data are only approximately symmetric. A slightly squished "7" is still a 7.

You might think: just demand invariance to all smooth deformations. That fails badly, because you can morph almost any image into any other through small steps. Instead, we ask for stability: the output should change in proportion to how far the deformation $\tau$ is from a true symmetry,

$$ \|f(\tau.x) - f(x)\| \le C\, c(\tau)\, \|x\|. $$

Here $c(\tau)$ is zero for exact symmetries and grows with distortion (for shifts, something like $\|\nabla \tau\|_\infty$).

The classic cautionary tale is the Fourier transform. Its magnitude $|\hat{x}(\omega)|$ is perfectly shift-invariant. But stretch the signal slightly and high frequencies move a lot, in proportion to $|\omega|$. So global Fourier features are invariant but unstable. Wavelets, which are localised in both space and frequency, don't have this problem.

For domains that change (different graphs, different meshes), the analogous requirement is that approximately isomorphic domains give similar outputs.

Prior 3: Scale separation

Physics tends to be hierarchical. Nearby things interact strongly. Far-away things interact through summaries.

Formally, we can coarsen a domain: average locally, subsample, and get a smaller domain $\Omega'$. If the target function can be written as $f^* \approx f' \circ P$ with $P$ the coarsening, the effective dimension drops.

Multiresolution analysis and wavelets are the classic tools here. Mallat's scattering transform stacks wavelet filters and absolute values:

$$ Sx = \big\{\, \big| |x \star \psi_{j_1}| \star \psi_{j_2} \big| \cdots \star \phi_J \,\big\}. $$

It's provably shift-invariant and stable to deformations. If that looks a lot like a CNN with fixed filters, that's because it basically is. It's the mathematical ancestor.

4. The blueprint

Here's the part that ties it together.

First, linear isn't enough. If $f$ is linear and $\mathfrak{G}$-invariant for a compact group, then

$$ f(x) = f\!\left(\int_{\mathfrak{G}} \mathfrak{g}.x \; d\mu(\mathfrak{g})\right). $$

It can only see the group-averaged signal. For images under shifts, that's the average colour. Useless.

Second, linear equivariant maps are rich, and nonlinearities keep equivariance. If $B$ is equivariant and $\sigma$ is applied pointwise, then $\sigma \circ B$ is still equivariant. Pointwise functions don't care where a value sits.

Third, locality gives stability. If each output location only looks at a small neighbourhood (the receptive field), and we stack layers with coarsening in between, the receptive field grows while each step stays local.

Put it together and you get the Geometric Deep Learning Blueprint. The building blocks:

BlockWhat it does
Linear $\mathfrak{G}$-equivariant layer $B$$B(\mathfrak{g}.x) = \mathfrak{g}.B(x)$
Nonlinearity $\sigma$Applied pointwise
Local pooling $P$Coarsens the domain
Invariant layer $A$Global pooling, $A(\mathfrak{g}.x) = A(x)$

And the model:

$$ f = A \circ \sigma_J \circ B_J \circ P_{J-1} \circ \cdots \circ P_1 \circ \sigma_1 \circ B_1. $$

Drop $A$ if you want an equivariant output.

It's worth noticing that shallow invariant networks are often already universal (Deep Sets proved this for permutations). The deep, local, multiscale structure isn't there for expressivity. It's there because it gets invariance, stability and scale separation all at once.

One more distinction: sometimes the domain is fixed (every image lives on the same grid), and sometimes it's part of the input (every molecule has its own graph). The second case is where isomorphism, rather than transformation, becomes the key notion.

5. The five Gs

Here's the lay of the land before we dig in.

DomainSymmetryArchitectures
SetsPermutationsDeep Sets, Transformers
GraphsPermutationsGCN, GAT, MPNN
GridsTranslationsCNNs
Groups / homogeneous spacesGlobal group (e.g. SO(3))Group CNNs, Spherical CNNs
ManifoldsIsometriesIntrinsic CNNs
Gauges / bundles / meshesLocal frame changesGauge-equivariant CNNs
Geometric graphsPermutations × E(3)Equivariant GNNs
SequencesTime warpingRNNs, LSTMs, GRUs

5.1 Graphs and sets

Sets first. A set is a graph with no edges. Zaheer et al. showed that permutation-invariant functions on sets can be written as

$$ f(\mathbf{X}) = \phi\Big(\sum_u \psi(\mathbf{x}_u)\Big). $$

And the only linear equivariant maps (with scalar channels) are

$$ \mathbf{x} \mapsto \alpha \mathbf{x} + \beta\, \mathbf{1}\mathbf{1}^\top \mathbf{x}. $$

Each element sees itself and the sum of everyone else. That's it. Sets have no notion of "near."

Graphs add neighbourhoods. The general recipe is a shared function applied at each node:

$$ \mathbf{h}_u = \phi\big(\mathbf{x}_u,\; \{\!\{\mathbf{x}_v : v \in \mathcal{N}_u\}\!\}\big), $$

where $\phi$ doesn't care about the order of the neighbour multiset. Any such layer is permutation-equivariant.

This comes in three flavours, each more expressive than the last:

$$ \begin{aligned} \text{Convolutional:} &\quad \mathbf{h}_u = \phi\Big(\mathbf{x}_u, \textstyle\bigoplus_{v} c_{uv}\, \psi(\mathbf{x}_v)\Big)\\ \text{Attentional:} &\quad \mathbf{h}_u = \phi\Big(\mathbf{x}_u, \textstyle\bigoplus_{v} a(\mathbf{x}_u, \mathbf{x}_v)\, \psi(\mathbf{x}_v)\Big)\\ \text{Message passing:} &\quad \mathbf{h}_u = \phi\Big(\mathbf{x}_u, \textstyle\bigoplus_{v} \psi(\mathbf{x}_u, \mathbf{x}_v)\Big) \end{aligned} $$

In the first, weights are fixed by the graph. In the second, they're learned scalars. In the third, the message itself is a learned vector. More expressive isn't always better: convolutional layers are cheap and often generalise well when neighbours tend to be similar.

Graph spectra. The Laplacian $\boldsymbol{\Delta} = \mathbf{D} - \mathbf{A}$ measures how much a signal varies across edges:

$$ \mathbf{x}^\top \boldsymbol{\Delta}\mathbf{x} = \tfrac{1}{2}\sum_{u,v} a_{uv}(x_u - x_v)^2. $$

Its eigenvectors act like Fourier modes on the graph. And since the Laplacian itself is permutation-equivariant, any polynomial $p(\boldsymbol{\Delta})$ gives you an equivariant layer for free.

5.2 Grids: where convolution comes from

This is my favourite result in the whole framework, because it's so clean.

Take a 1D cyclic grid of $n$ points. The shift operator $\mathbf{S}$ moves every value one step: $(\mathbf{S}\mathbf{x})_u = x_{u-1}$.

Theorem. A linear map $\mathbf{B}$ commutes with $\mathbf{S}$ if and only if it's a convolution.

Proof. Convolutions are polynomials in $\mathbf{S}$, so they commute with it. For the other direction, let $\boldsymbol{\theta} = \mathbf{B}\mathbf{e}_0$. Every basis vector is a shift of $\mathbf{e}_0$, so

$$ \mathbf{B}\mathbf{e}_k = \mathbf{B}\mathbf{S}^k \mathbf{e}_0 = \mathbf{S}^k \mathbf{B}\mathbf{e}_0 = \mathbf{S}^k \boldsymbol{\theta}. $$

That's exactly what a convolution with filter $\boldsymbol{\theta}$ does. Done.

So convolution, including weight sharing, isn't a design choice. It's forced on you by asking for shift equivariance. Add locality and each layer has a handful of parameters instead of $n^2$.

Fourier falls out too. All convolutions commute with each other, so they share eigenvectors. Those eigenvectors are the complex exponentials

$$ \boldsymbol{\varphi}_k = \tfrac{1}{\sqrt{n}}\big(1, e^{2\pi i k/n}, \dots, e^{2\pi i k (n-1)/n}\big), $$

and in that basis every convolution is diagonal. That's the convolution theorem: $\widehat{x \star \theta} = \hat{x} \cdot \hat{\theta}$ (up to a normalising constant).

The deeper reason: exponentials are the characters of the translation group. Fourier analysis is the representation theory of shifts. That observation is what lets the whole idea generalise.

5.3 Groups and homogeneous spaces

A homogeneous space is a domain where the group can move any point to any other. The sphere is the standard example: rotations in $\mathrm{SO}(3)$ can take any point to any other point, so $\mathbb{S}^2 \cong \mathrm{SO}(3)/\mathrm{SO}(2)$.

Write the ordinary convolution as "correlate the signal with a shifted filter," then swap "shift" for "any group element":

$$ (x \star \theta)(\mathfrak{g}) = \langle x, \rho(\mathfrak{g})\theta\rangle = \int_\Omega x(u)\, \theta(\mathfrak{g}^{-1}u)\, du. $$

One subtle thing: the output lives on the group, not the domain. For the sphere, you feed in a 2D signal and get back a function on the 3D rotation group. Later layers convolve on the group directly.

Equivariance is a one-liner if $\rho$ is unitary:

$$ \langle \rho(\mathfrak{h})x, \rho(\mathfrak{g})\theta\rangle = \langle x, \rho(\mathfrak{h}^{-1}\mathfrak{g})\theta\rangle. $$

For compact groups, the Peter–Weyl theorem gives a Fourier theory. The Fourier coefficients become matrices, and the convolution theorem becomes a matrix product. On the sphere, that means spherical harmonics and Wigner D-matrices, and it's how spherical CNNs are computed efficiently.

5.4 Geodesics and manifolds

Most shapes aren't homogeneous. A human body has no global symmetry group that slides the elbow onto the knee. For these, we need Riemannian geometry.

A quick tour:

Two ways to do convolution on a manifold.

Spectral. Use the Laplacian's eigenfunctions as Fourier modes:

$$ (x \star \theta)(u) = \sum_k \hat{x}_k\, \hat{\theta}_k\, \varphi_k(u). $$

The catch: eigenbases are only defined up to sign flips and rotations within repeated eigenvalues, so a filter learned on one shape doesn't transfer to another. The fix is to make the filter a function of the eigenvalue, $\hat\theta_k = p(\lambda_k)$, so the layer becomes $p(\Delta)x$. Now it depends only on the operator, not the basis, and a smooth $p$ gives a localised filter.

Spatial. Unroll a patch with the exponential map and correlate:

$$ (x \star \theta)(u) = \int_{T_u\Omega} \theta(v)\, x(\exp_u v)\, dv. $$

The catch here is nastier. To place a 2D filter on the tangent plane, you need to choose which way is "up." There's no canonical choice. On a sphere, the hairy ball theorem says you can't even pick a smooth nonvanishing direction everywhere.

That frame problem is the whole reason gauges exist.

5.5 Gauges and bundles

A gauge is a choice of frame (basis) in each tangent space. A gauge transformation changes those frames, point by point:

$$ \omega'_u = \omega_u \circ \mathfrak{g}_u, \qquad \mathfrak{g}_u \in \mathrm{SO}(2). $$

Here's the key idea, and I think it's the most philosophically interesting bit of the whole framework: a gauge is not a symmetry of the data. It's a choice the modeller made. The prediction shouldn't depend on it.

Features are generalised to fields of type $\rho$: their coordinates change under a frame rotation according to a representation, $\mathbf{x}'(u) = \rho(\mathfrak{g}_u^{-1})\mathbf{x}(u)$. Scalars don't change. Vectors rotate. Higher-order features transform in more complex ways.

To compare features at different points, you first parallel-transport them to a common point. Then a convolution with matrix-valued kernel $\boldsymbol{\theta}$ is gauge-equivariant exactly when

$$ \boldsymbol{\theta}(\mathfrak{h}^{-1}\mathbf{v}) = \rho_{\text{out}}(\mathfrak{h}^{-1})\, \boldsymbol{\theta}(\mathbf{v})\, \rho_{\text{in}}(\mathfrak{h}). $$

This is a linear constraint. You solve it once (with circular harmonics for 2D rotations) and learn coefficients in the resulting basis. These are called steerable kernels.

5.6 Meshes and geometric graphs

Computers don't store smooth manifolds. They store meshes: graphs with triangular faces. On a mesh, the standard Laplacian is the cotangent Laplacian:

$$ (\Delta \mathbf{x})_u = \frac{1}{a_u}\sum_{v \in \mathcal{N}_u} \tfrac{1}{2}(\cot\alpha_{uv} + \cot\beta_{uv})(x_u - x_v), $$

where $\alpha_{uv}, \beta_{uv}$ are the angles opposite the edge. It only depends on edge lengths (so it's intrinsic), it's permutation-equivariant (so it fits in a GNN), and it converges to the smooth Laplacian as the mesh gets finer. Meshes are nice because they're exactly where graphs and manifolds meet.

Geometric graphs are graphs with positions attached, like molecules. Now the symmetry is permutations and rigid motions:

$$ (\mathbf{X}, \mathbf{P}) \mapsto (\boldsymbol{\Pi}\mathbf{X},\; \boldsymbol{\Pi}\mathbf{P}\mathbf{R}^\top + \mathbf{1}\mathbf{b}^\top). $$

Energy should be invariant. Forces should rotate with the molecule.

6. The architectures, derived

Now we cash in. Each of these is the blueprint on a particular domain.

CNNs

Grid + translations. A conv layer is

$$ \mathbf{h}_u = \sigma\Big(\sum_{\mathbf{v}} \boldsymbol{\Theta}_{\mathbf{v}}\, \mathbf{x}_{u+\mathbf{v}} + \mathbf{b}\Big), $$

followed by pooling (which halves the grid), then global pooling at the end. Pooling grows the receptive field exponentially with depth.

A small honesty note: striding and subsampling break exact shift equivariance. At level $j$ you're only equivariant to shifts by multiples of $2^j$. That's the root of aliasing issues in CNNs.

ResNets add skip connections, $\mathbf{h}^{(\ell+1)} = \mathbf{h}^{(\ell)} + \sigma(B_\ell \mathbf{h}^{(\ell)})$. You can read this as a forward Euler step of an ODE, which connects deep nets to classical PDE-based image processing. Skip connections and batch norm both preserve equivariance.

And data augmentation? It encourages invariance but doesn't guarantee it. Built-in equivariance guarantees it for every parameter setting.

Group-equivariant CNNs

Three steps: lift the signal onto the group, convolve on the group a few times, then pool.

A concrete case is the $p4$ group: shifts plus 90° rotations. Each feature map becomes a stack of four, one per orientation. Rotate the input, and every feature map rotates and the four orientation channels cycle.

For continuous or large groups, storing a function on the whole group is expensive. Steerable CNNs keep features on the original domain but give them transformation types, using the kernel constraint from Section 5.5. For 3D, this means spherical harmonics and Clebsch–Gordan products (Tensor Field Networks).

Graph neural networks

Spectral route. Bruna et al. started with the full spectral filter $\boldsymbol{\Phi}\,\hat\theta(\boldsymbol{\Lambda})\,\boldsymbol{\Phi}^\top$. ChebNet made it practical with Chebyshev polynomials,

$$ p(\tilde{\boldsymbol{\Delta}}) = \sum_{k=0}^r \alpha_k T_k(\tilde{\boldsymbol{\Delta}}), $$

which only need sparse matrix products and are exactly $r$-hop local.

GCN is ChebNet with $r=1$ and a few simplifications:

$$ \mathbf{H} = \sigma\big(\tilde{\mathbf{D}}^{-1/2}\tilde{\mathbf{A}}\tilde{\mathbf{D}}^{-1/2}\mathbf{X}\boldsymbol{\Theta}\big), \quad \tilde{\mathbf{A}} = \mathbf{A} + \mathbf{I}. $$

It's the convolutional flavour.

GAT is the attentional flavour:

$$ \mathbf{h}_u = \sigma\Big(\sum_{v} \alpha_{uv} \mathbf{W}\mathbf{x}_v\Big), \quad \alpha_{uv} = \mathrm{softmax}_v\big(\mathrm{LeakyReLU}(\mathbf{a}^\top[\mathbf{W}\mathbf{x}_u \,\|\, \mathbf{W}\mathbf{x}_v])\big). $$

MPNN is the message-passing flavour:

$$ \mathbf{m}_{uv} = \psi(\mathbf{h}_u, \mathbf{h}_v, \mathbf{e}_{uv}), \qquad \mathbf{h}'_u = \phi\Big(\mathbf{h}_u, \textstyle\bigoplus_v \mathbf{m}_{uv}\Big). $$

Two known pain points:

Fixes include residual connections, rewiring the graph, and adding global attention.

Deep Sets and Transformers

Deep Sets is the graph model with no edges. PointNet is the same thing with max-pooling, applied to point clouds.

Now here's something I found genuinely surprising when I first saw it: a Transformer is a GNN on a complete graph. Self-attention,

$$ \mathbf{H} = \mathrm{softmax}\!\left(\frac{\mathbf{Q}\mathbf{K}^\top}{\sqrt{d_k}}\right)\mathbf{V}, $$

is the attentional flavour with every node connected to every other. That makes it permutation-equivariant, which means it doesn't know word order.

That's why Transformers need positional encodings. The standard sinusoidal ones,

$$ p_{u,2i} = \sin(u / 10000^{2i/d}), \qquad p_{u,2i+1} = \cos(u / 10000^{2i/d}), $$

are Fourier modes on the 1D grid of positions. The grid comes back in through the side door. On graphs, the equivalent trick uses Laplacian eigenvectors, with care about their sign ambiguity.

If you don't trust the given graph, you can learn one: embed the nodes, connect k-nearest neighbours, run a GNN, repeat. That's Dynamic Graph CNN. Attention itself is a soft version of this.

Equivariant message passing

For molecules and physical systems, the E(n)-equivariant GNN is a neat design:

$$ \begin{aligned} \mathbf{m}_{uv} &= \psi(\mathbf{f}_u, \mathbf{f}_v, \|\mathbf{p}_u - \mathbf{p}_v\|^2),\\ \mathbf{f}'_u &= \phi\Big(\mathbf{f}_u, \textstyle\sum_v \mathbf{m}_{uv}\Big),\\ \mathbf{p}'_u &= \mathbf{p}_u + \textstyle\sum_v (\mathbf{p}_u - \mathbf{p}_v)\, \xi(\mathbf{m}_{uv}). \end{aligned} $$

Why it works: distances don't change under rotation, so messages and features are invariant. Relative positions rotate with the input, and they're only ever multiplied by scalars, so the updated positions rotate correctly too.

Using only distances is simple but loses some information (chirality, directions). Higher-order models carry features that transform like spherical harmonics and combine them with Clebsch–Gordan coefficients.

Intrinsic mesh CNNs

These implement the geodesic convolution on meshes. Around each vertex, build local polar coordinates and a set of soft "pixels" $w_k(u,v)$:

$$ (x \star \theta)(u) = \sum_k \theta_k\, \frac{\sum_v w_k(u,v)\, \mathbf{x}_v}{\sum_v w_k(u,v)}. $$

The main difference between methods is how they handle the frame problem:

RNNs, and where gates come from

A sequence is a signal on a 1D grid that arrives one step at a time. An RNN,

$$ \mathbf{h}_t = \tanh(\mathbf{W}\mathbf{h}_{t-1} + \mathbf{U}\mathbf{x}_t + \mathbf{b}), $$

shares weights across time, which makes it shift-equivariant in time. So far, nothing new.

The interesting symmetry is time warping: the same process, sampled at a different or varying speed. This derivation, from Tallec and Ollivier, is one of the most satisfying in the book.

Start with a continuous-time model:

$$ \frac{d\mathbf{h}}{dt} = \tanh(\mathbf{W}\mathbf{h} + \mathbf{U}\mathbf{x} + \mathbf{b}) - \mathbf{h}. $$

Now warp time with some increasing function $\tau$. The chain rule multiplies the right-hand side by $\tau'(t)$. Discretise with step 1:

$$ \mathbf{h}_{t+1} = \tau'(t)\, \tanh(\cdots) + \big(1 - \tau'(t)\big)\, \mathbf{h}_t. $$

We don't know $\tau'$. So we learn it from the input and state, and squash it into $(0,1)$:

$$ \boldsymbol{\Gamma}_{t+1} = \mathrm{sigmoid}(\mathbf{W}_\Gamma \mathbf{h}_t + \mathbf{U}_\Gamma \mathbf{x}_{t+1} + \mathbf{b}_\Gamma), $$
$$ \mathbf{h}_{t+1} = \boldsymbol{\Gamma}_{t+1} \odot \tanh(\cdots) + (1 - \boldsymbol{\Gamma}_{t+1}) \odot \mathbf{h}_t. $$

That's a gate. Gates aren't an engineering hack. They're what you get when you ask for invariance to time warping.

It also explains why gated networks remember well: a gate near zero means "time is passing slowly," so the state gets copied forward almost untouched, and gradients survive. And it suggests chrono initialisation: set the gate biases so that $1/\Gamma$ covers the range of time scales you expect in your data.

LSTMs

The LSTM splits the gate into three (input, forget, output) and adds a memory cell:

$$ \begin{aligned} \mathbf{c}_t &= \mathbf{f}_t \odot \mathbf{c}_{t-1} + \mathbf{i}_t \odot \tilde{\mathbf{c}}_t,\\ \mathbf{h}_t &= \mathbf{o}_t \odot \tanh(\mathbf{c}_t). \end{aligned} $$

Tie $\mathbf{f}_t = 1 - \mathbf{i}_t$ and you're back to the warping-derived update. Along the direct path, $\partial \mathbf{c}_t / \partial \mathbf{c}_{t-1} = \mathrm{diag}(\mathbf{f}_t)$, so a forget gate near 1 keeps gradients alive. That's why people initialise the forget bias to a positive number. GRUs are a leaner cousin with a merged update gate.

So on a 1D grid: translation symmetry gives you convolution, time-warping symmetry gives you gating. Same domain, two symmetries, two architectures.

7. How powerful are GNNs? The Weisfeiler–Lehman story

A permutation-invariant GNN must give isomorphic graphs the same output. The flip side: can it tell non-isomorphic graphs apart?

The benchmark is the 1-WL test from 1968. Colour every node by its features, then repeat:

$$ c_u^{(t+1)} = \mathrm{hash}\Big(c_u^{(t)},\; \{\!\{c_v^{(t)} : v \in \mathcal{N}_u\}\!\}\Big). $$

If two graphs end up with different colour histograms, they're definitely different. If not, the test can't tell. It fails on some simple cases: two triangles and a hexagon look identical to it, because every node has exactly two neighbours.

The theorem (Xu et al.; Morris et al., 2019):

  1. No message-passing GNN can distinguish two graphs that 1-WL can't. (By induction: the GNN update sees the same information as the hash.)
  2. Some GNNs match 1-WL exactly. You need aggregation that's injective on multisets. Sum works. Mean and max don't. The Graph Isomorphism Network does it:
$$ \mathbf{h}_u^{(t+1)} = \mathrm{MLP}\Big((1+\epsilon)\,\mathbf{h}_u^{(t)} + \sum_{v \in \mathcal{N}_u} \mathbf{h}_v^{(t)}\Big). $$

Going beyond 1-WL is an active area: higher-order $k$-WL networks (more powerful, but $O(n^k)$ cost), adding substructure counts like cycles, random or positional features, subgraph methods, and message passing on simplicial and cell complexes.

I'd add one caution: telling graphs apart is only one axis. A more expressive model isn't automatically one that generalises better.

8. Where this shows up in practice

9. A short history

None of this came out of nowhere.

The phrase "geometric deep learning" itself was popularised in a 2017 paper about deep learning on graphs and manifolds. The 2021 book broadened it into the symmetry-first framework described here.

10. What I take away from all this

If I had to compress this post into one sentence: ask what shouldn't matter, and let that decide the architecture.

And on top of symmetry, stability and scale separation push you toward local layers, depth, and pooling.

I don't think this is the final word. There are open questions I find genuinely interesting. How much data does a symmetry actually save you, in precise terms? How do you handle symmetries that only mostly hold? How should expressivity and generalisation be traded off on graphs? What does this look like for causal or generative models? But as a way of making sense of the zoo, it's the most useful lens I've come across.

Further reading

Repository: https://github.com/abhinaash-broski/Portfolio