01 Introduction
01 Introduction
The last decade has witnessed an experimental revolution in data science and
machine learning, epitomised by deep learning methods. Indeed, many high-
dimensional learning tasks previously thought to be beyond reach – such as
computer vision, playing Go, or protein folding – are in fact feasible with
appropriate data and computational scale. Remarkably, the essence of deep
learning is built from two simple algorithmic principles: first, the notion
of representation or feature learning, whereby adapted, often hierarchical,
features capture the appropriate notion of regularity for each task, and sec-
ond, learning by gradient descent-type optimisation, typically implemented as
backpropagation.
While learning generic functions in high dimensions is a cursed estimation
problem, most tasks of interest are not generic, and come with essential prede-
fined regularities arising from the underlying low-dimensionality and structure
of the physical world. This book is concerned with exposing these regulari-
ties through unified geometric principles that can be applied throughout a wide
spectrum of applications.
Exploiting the known symmetries of a large system is a powerful and clas-
sical remedy against the curse of dimensionality, and forms the basis of most
physical theories. Deep learning systems are no exception, and since the early
days researchers have adapted neural networks to exploit the low-dimensional
geometry arising from physical measurements, e.g. grids in images, sequences
in time-series, or position and momentum in molecules, and their associated
symmetries, such as translation or rotation. Throughout our exposition, we will
describe these models, as well as many others, as natural instances of the same
underlying principle of geometric regularity.
Geometric Deep Learning is a ‘geometric unification’ endeavour in the spirit
of Klein’s Erlangen Programme that serves a dual purpose. On one hand, it
provides a common mathematical framework to study the classical successful
4 Chapter 1
Figure 1.1
Plato believed that symmetric polyhedra (“Platonic solids”) were the fundamental
building blocks of nature. Johannes Kepler attributed for the first time the six-fold
symmetry of water crystals to the hexagonal packing of particles, antedating modern
crystallography.
continuous symmetries that today bears his name (Lie groups); the latter pro-
claimed group theory to be the organising principle of geometry in his Erlangen
Programme, which we already mentioned in the Preface. Given that Klein’s
Programme is the inspiration for our book, it is worthwhile to spend more time
on its historical context and revolutionary impact.
Figure 1.2
The “Father of Geometry”, Euclid, laid the foundations of modern geometry in the
Elements. Omar Khayyam made early attempts to prove Euclid’s fifth postulate, which
were also referenced in Saccheri’s work (Euclides ab omni nævo vindicatus).
The nineteenth century has brought the realisation that the Fifth Postulate is
not essential and one can construct alternative geometries based on different
notions of parallelism. One such early example is projective geometry, arising,
as the name suggests, in perspective drawing and architecture. In this geom-
etry, points and lines are interchangeable, and there are no parallel lines in
the usual sense: any lines meet in a ‘point at infinity.’ While results in projec-
tive geometry are known since antiquity, it was first systematically studied by
Jean-Victor Poncelet (1822)5; see Figure 1.3.
Figure 1.3
Based on the prior work of Gérard Desargues, Jean-Victor Poncelet revived the interest
in projective geometry, one of the earliest examples of geometries not requiring the
parallel postulate.
Introduction 7
Figure 1.4
Several mathematicians played pivotal roles in proposing early variants of non-
Euclidean geometries in the eighteenth century. Gauss reportedly worked on the topic
without publishing any material on it. The first publication—focussed on hyperbolic
geometry—came from Lobachevsky (On the Origins of Geometry, depicted here), with
Bolyai having worked on it concurrently. Riemann introduced any such geometries later
on, one of which was elliptic geometry.
In the meantime, new geometries continued to come out like from a cornu-
copia. August Möbius (1827), of the eponymous surface fame, studied affine
geometry. Gauss’ student Bernhardt Riemann introduced a very broad class
of geometries — called today Riemannian is his honour — in his habili-
tation lecture, subsequently published under the title Über die Hypothesen,
8 Chapter 1
welche der Geometrie zu Grunde liegen (‘On the Hypotheses on which Geom-
etry is Based,’ 1854). A special case of Riemannian geometry is the ‘elliptic’
geometry of the sphere, another construction violating Euclid’s Fifth Postu-
late, as there is no point on the sphere through which a line can be drawn that
never intersects a given line. Towards the second half of the nineteenth cen-
tury, Euclid’s monopoly over geometry was completely shuttered. New types
of geometry (Euclidean, affine, projective, hyperbolic, spherical) emerged
and became independent fields of study. However, the relationships of these
geometries and their hierarchy were not understood.
It was in this exciting but messy situation that Felix Klein came forth, with
a genius insight to use group theory as an algebraic abstraction of symmetry to
organise the ‘geometric zoo.’9 It appeared that Euclidean geometry is a special
case of affine geometry, which is in turn a special case of projective geom-
etry (or, in terms of group theory, the Euclidean group is a subgroup of the
projective group). Klein, and independently the Italian geometer Eugenio Bel-
trami, further showed that constant-curvature non-Euclidean geometries (i.e.,
the hyperbolic geometry of Lobachevsky and Bolyai and the spherical geom-
etry or Riemann) could be obtained as special cases of projective geometry 10 ;
also see Figure 1.5. More general Riemannian geometry with non-constant
curvature was not included in Klein’s unified geometric picture, and it took
another fifty years before it was integrated, largely thanks to the work of Élie
Cartan in the 1920s.
Figure 1.5
Felix Klein’s Erlangen Programme offered a way to organise and categorise existing
geometries according to their symmetries. Additionally, Klein and Beltrami indepen-
dently proved that non-Euclidean geometries with constant curvature are special cases
of projective geometry.
‘second algebraisation’ of geometry (the first one being the analytic geometry
of René Descartes and the method of coordinates bearing his latinised name
Cartesius) that allowed to produce results impossible by previous methods.
Category Theory, abstracting the relations between objects and now pervasive
in pure mathematics, can be “regarded as a continuation of the Klein Erlangen
Programme, in the sense that a geometrical space with its group of transforma-
tions is generalized to a category with its algebra of mappings,” in the words
of its creators Samuel Eilenberg and Saunders Mac Lane—see (Marquis 2009)
and Figure 1.6.
Figure 1.6
While the Erlangen Programme outlined a path towards unifying all geometries under
a common lens, it was not until the work of Élie Cartan several decades later that this
unification was entirely formalised. Additionally, the Erlangen Programme inspired the
creation of entire novel fields of mathematics, as evidenced by ‘General Theory of
Natural Equivalences’, the original text on Category Theory by Eilenberg and Mac
Lane.
the conservation of energy, and even then, it was an empirical result not com-
ing from anywhere. Noether’s Theorem — “a guiding star to 20th and 21st
century physics,” in the words of the Nobel laureate Frank Wilczek — allowed
for example to show that the conservation of energy emerges from the transla-
tional symmetry of time, a rather intuitive idea that the results of an experiment
should not depend on whether it is conducted today or tomorrow. The first page
of this landmark result is depicted in Figure 1.7.
Another symmetry associated with charge conservation, the global gauge
invariance of the electromagnetic field, first appeared in Maxwell’s formu-
lation of electrodynamics (Maxwell 1865); however, its importance initially
remained unnoticed. The same Hermann Weyl who wrote so dithyrambically
about symmetry is the one who first introduced the concept of gauge invari-
ance in physics in the early 20th century, 13 emphasizing its role as a principle
from which electromagnetism can be derived. It took several decades until
this fundamental principle – in its generalised form developed by Yang and
Mills (1954) – proved successful in providing a unified framework to describe
the quantum-mechanical behaviour of electromagnetism and the weak and
strong forces, finally culminating in the Standard Model that captures all the
fundamental forces of nature but gravity. As succinctly put by another Nobel-
winning physicist, Philip Anderson (1972), “it is only slightly overstating the
case to say that physics is the study of symmetry.”
Figure 1.7
The Erlangen Programme had significant spillover effects in physics. The landmark
result was Noether’s theorem, which directly specifies how conservation laws arise
directly from symmetry constraints. Later on, gauge symmetries – first introduced by
Weyl, then developed by Yang and Mills – proved an effective abstraction for discover-
ing the presently best-known model of the physical world: the Standard Model.
Introduction 11
ASSOCIATION RESPONSE
SENSORY
UNITS UNITS
UNITS (A-UNITS) (R-UNITS)
(S-UNITS)
RETINAL
UNITS R1
RETNA CIRCUITS
R2
R3
R4
R5
R6
R7
Frank Rosenblatt
R8 (1928–1971)
Figure 1.8
The Perceptron proposed by Frank Rosenblatt (1957) was one of the simplest neural
network architectures.
The reality is probably more mundane and more nuanced at the same time.
First, a far more plausible reason for the ‘AI Winter’ in the USA is the 1969
Mansfield Amendment, which required the military to fund “mission-oriented
direct research, rather than basic undirected research.” Since many efforts in
artificial intelligence at the time, including Rosenblatt’s research, were funded
by military agencies and did not show immediate utility, the cut in funding
has had dramatic effects. Second, neural networks and artificial intelligence
in general were over-hyped: it is enough to recall a 1958 New Yorker article
calling perceptrons a “first serious rival to the human brain ever devised” and
“remarkable machines” that were “capable of what amounts to thought,” 16 or
the overconfident MIT Summer Vision Project expecting a “construction of a
significant part of a visual system” and achieving the ability to perform “pattern
recognition”17 during one summer term of 1966. A realisation by the research
community that initial hopes to ‘solve intelligence’ had been overly optimistic
was just a matter of time.
If one, however, looks into the substance of the dispute, it is apparent that
what Rosenblatt called a ‘perceptron’ is rather different from what Minsky
and Papert understood under this term. Minsky and Papert focused their analy-
sis and criticism on a narrow class of single-layer neural networks they called
‘simple perceptrons’ (and what is typically associated with this term in modern
times, see Figure 1.8) that compute a weighted linear combination of the inputs
followed by a nonlinear function.18 On the other hand, Rosenblatt considered a
broader class of architectures that antedated many ideas of what would now be
considered ‘modern’ deep learning, including multi-layered networks with ran-
dom and local connectivity.19 Rosenblatt could have probably rebutted some
Introduction 13
Marvin Minsky
(1927–2016) Seymour Papert
(1928–2016)
Figure 1.9
The influential book Perceptrons by Minsky and Papert (1969) considered simple
single-layer neural networks depicted here. It was perhaps the earliest geometric
approach to learning, including the introduction of group invariance.
Sejnowski, Kienker, and Hinton (1986) and Shawe-Taylor (1989, 1993), unfor-
tunately rarely cited today, provided the foundations of the geometric learning
blueprint described in this book.
Figure 1.10
David Hilbert’s Thirteenth Problem, proven by Andrey Kolmogorov and Vladimir
Arnold, was one of the first results showing that a multivariate continuous function
could be expressed as a composition and sum of simple one-dimensional functions.
George Cybenko and Kurt Hornik proved results specific to neural networks, showing
that a perceptron with one hidden layer can approximate any continuous function to any
desired accuracy.
reader judge how true this maxim is by trying to answer the following impor-
tant question: how many samples (training examples) are needed to accurately
approximate a function? Approximation theorists will immediately retort that
the class of continuous functions that multilayer perceptrons can represent
is obviously way too large: one can pass infinitely many different continu-
ous functions through a finite collection of points. 23 It is necessary to impose
additional regularity assumptions such as Lipschitz continuity,24 in which case
one can provide a bound on the required number of samples. Unfortunately,
these bounds scale exponentially with dimension — a phenomenon colloqui-
ally known as the ‘curse of dimensionality’ 25 — which is unacceptable in
machine learning problems: even small-scale pattern recognition problems,
such as image classification, deal with input spaces of thousands of dimen-
sions. If one had to rely only on classical results from approximation theory,
machine learning would be impossible. In our illustration, the number of exam-
ples of cat and dog images that would be required in theory in order to learn to
tell them apart would be way larger than the number of atoms in the universe26
— there are simply not enough cats and dogs around to do it.
The struggle of machine learning methods to scale to high dimensions was
brought up by the British mathematician Sir James Lighthill (1973) in a paper
that AI historians call the ‘Lighthill Report,’ in which he used the term ‘com-
binatorial explosion’ and claimed that existing AI methods could only work
on toy problems and would become intractable in real-world applications.
Lighthill further complained that “most workers in AI research and in related
fields confess to a pronounced feeling of disappointment in what has been
achieved in the past twenty-five years” and “in no part of the field have the
discoveries made so far produced the major impact that was then promised.”
These were not mere frustrations of a grumpy academic stuck with a hard
problem: the Report was commissioned by the British Science Research Coun-
cil to evaluate academic research in the field of artificial intelligence, and its
pessimistic conclusions resulted in funding cuts across the pond. Together
with similar decisions by the American funding agencies, this amounted to
a wrecking ball for AI research in the 1970s.
For us, the realisation that classical functional analysis cannot provide an
adequate framework to deal with learning problems will be the motivation
to seek stronger, geometric forms of regularity, that can be implemented in
a particular wiring of the neural network — such as the local connectivity of
convolutional neural networks. It is fair to say that the triumphant reemergence
of deep learning a decade ago owes, at least in part, to these insights. It is also
probably true that the role of symmetry and invariance as a broad organising
Introduction 17
and design principle in neural networks has not been given enough credit at the
time, and us highlighting these principles here are a hindsight.
Electrical signal
from brain
Recording electrode
Visual area
of brain
Figure 1.12
The classical experiment of Hubel and Wiesel (1962) revealed the structure of the brain
visual cortex and inspired a new generation of neural network architectures mimicking
its local connectivity.
The understanding of the structure of the visual cortex has had profound
impact on early works in computer vision and pattern recognition, with mul-
tiple attempts to imitate its main ingredients. Kunihiko Fukushima (1980),
at that time a researcher at the Japan Broadcasting Corporation, developed a
18 Chapter 1
new neural network architecture “similar to the hierarchy model of the visual
nervous system proposed by Hubel and Wiesel,” which was given the name
neocognitron.29 The neocognitron consisted of interleaved S- and C-layers of
neurons (a naming convention reflecting its inspiration in the biological visual
cortex); the neurons in each layer were arranged in 2D arrays following the
structure of the input image (‘retinotopic’), with multiple ‘cell-planes’ (fea-
ture maps in modern terminology) per layer. The S-layers were designed to be
translationally symmetric: they aggregated inputs from a local receptive field
using shared learnable weights, resulting in cells in a single cell-plane having
receptive fields of the same function, but at different positions. The rationale
was to pick up patterns that could appear anywhere in the input. The C-layers
were fixed and performed local pooling (a weighted average), affording insen-
sitivity to the specific location of the pattern: a C-neuron would be activated if
any of the neurons in its input are activated.
Since the main application of the neocognitron was character recognition,
translation invariance30 was crucial. This property was a fundamental differ-
ence from earlier neural networks such as Rosenblatt’s perceptron: in order
to use a perceptron reliably, one had to first normalise the position of the
input pattern, whereas in neocognitron the insensitivity to the pattern posi-
tion was baked into the architecture. Neocognitron achieved it by interleaving
translationally-equivariant local feature extraction layers with pooling, cre-
ating a multiscale representation—we will refer to this principle as scale
separation and study in subsequent Chapters why it can also help deal with
a broader class of geometric transformations in addition to translations. Com-
putational experiments showed that Fukushima’s architecture was able to
successfully recognise complex patterns such as letters or digits, even in the
presence of noise and geometric distortions.
Looking from the vantage point of four decades of progress in the field,
one finds that the neocognitron already had strikingly many characteristics of
modern deep learning architectures: depth (Fukishima simulated a seven-layer
network in his paper), local receptive fields, shared weights, and pooling. It
even used half-rectifier (ReLU) activation function, which is often believed
to be introduced in recent deep learning architectures.31 The main distinction
from modern systems was in the way the network was trained: neocogni-
tron was a ‘self-organised’ architecture trained in an unsupervised manner,
since backpropagation had still not been widely used in the neural network
community.
Introduction 19
layer H3
30 hidden units fully connected
6000 links
layer H2
12 x 16 =192 H2.1 H2.12
hidden units 40,000 links
from 12 kernels
5x5x8
layer H1
12 x 64 =768
hidden units
H1.1 H1.12
20,000 links
from 12 kernels
5x5
Kunihiko
Yann LeCun
Fukushima
Figure 1.13
The original variants of convolutional neural network architectures have been intro-
duced by Fukushima and LeCun (though the name “convolutional” would appear later).
Implemented on a digital signal processor, LeCun’s CNN allowed real-time handwrit-
ten digit recognition for the first time.
recognition systems of the first decade of the new millennium was a care-
fully hand-crafted feature extractor (typically detecting interesting points in an
image and providing their local description in a way that is robust to perspec-
tive transformations and contrast changes35 ) followed by a simple classifier
(most often a support vector machine (SVM) and more rarely, a small neural
network).36
Sepp Jürgen
Hochreiter Schmidhuber
Figure 1.14
The creators of the long short-term memory cell—the first recurrent neural network
module capable of dealing with long-range dependencies—Hochreiter and Schmidhu-
ber, pictured alongside one of the earliest schematic depictions of their creation.
in computer vision, the breakthrough would need to wait for another decade to
come.
gating mechanism. This provides a theoretical justification for gate RNN mod-
els, such as the aforementioned LSTMs of Hochreiter and Schmidhuber or
the Gated Recurrent Unit (GRU) (Cho et al. 2014). Full overwriting used in
simple RNNs corresponds to an implicit assumption of a constant time warp-
ing derivative equal to one – a situation unlikely to happen in most real-world
scenarios – which also explains the success of LSTMs.
Top-5 error
30% 28%
26%
25%
20%
16.4%
15% 11.7%
10% 6.7% 5%
5% 3.6% 3.1%
0%
2010 2011 2012 2013 2014 Human 2015 2016
NEC-UIUC XREC AlexNet ZFNet GoogLeNet ResNet GoogLeNet
VGGNet -v4 Fei Fei Li
Figure 1.15
ImageNet, a benchmark developed by Fei Fei Li at Stanford University was one of the
‘Holy Grail’ challenges in computer vision in the early 2010s. The dramatic perfor-
mance improvement provided by the convolutional neural network AlexNet in 2012 is
considered the turning point leading to the widespread adoption of deep learning in the
field.
honour of its developer, Alex Krizhevsky; see Figure 1.16) was significantly
bigger in terms of the number of parameters and layers compared to its older
sibling LeNet-5,41 but conceptually the same. The key difference was the use
of a graphics processor (GPU) for training42 , now the mainstream hardware
platform for deep learning. 43
11 3 3 3
11 5 3 3 3
5 3
192 192 128 dense
128 2048 2048
48
55
224 27 13 13 13
5 13 13
5 13
27 3 3 3
11 3 3 3
3 dense dense
11
55 3
224 Stride Max Max 192 192 128 Max 1000
2048 2048
of 4 48 pooling 128 pooling pooling
CONV1 POOL1 CONV2 POOL2 CONV3 CONV4 CONV5 POOL3 FC1 FC2 FC3
Alex Krizhevsky
Figure 1.16
Alex Krizhevsky, pictured next to a schematic of AlexNet—the first deep neural
network-based solution to win the ImageNet contest, by a significant margin. AlexNet’s
result is commonly seen as a pivotal moment in the development of modern deep learn-
ing, ushering in significant developments in subsequent years—eventually leading to
surpassing human performance on ImageNet only a few years later.
The success of CNNs on ImageNet became the turning point for deep learn-
ing and heralded its broad acceptance in the following decade. A similar
transformation happened in natural language processing and speech recog-
nition, which moved entirely to neural network-based approaches during the
2010s; indicatively, Google and Facebook switched their machine translations
systems to LSTM-based architectures around 2016–2017. Multi-billion dollar
industries emerged as a result of this breakthrough, with deep learning success-
fully used in commercial systems ranging from speech recognition in Apple
iPhone to Tesla self-driving cars. More than forty years after the scathing
review of Rosenblatt’s work, the connectionists were finally vindicated.
growth of known chemical compounds and an early need for their organi-
sation. This role was initially played by periodicals such as the Chemisches
Zentralblatt44 and “chemical dictionaries” like the Gmelins Handbuch der
anorganischen Chemie (an early compendium of inorganic compounds first
published in 1817 45) and Beilsteins Handbuch der organischen Chemie (a sim-
ilar effort for organic chemistry) – all initially published in German, which was
the dominant language of science until the early 20th century.
In the English-speaking world, the Chemical Abstracts Service (CAS) was
created in 1907 and has gradually become the central repository for the world’s
published chemical information. 46 However, the sheer amount of data (the
Beilstein alone has grown to over 500 volumes and nearly half a million pages
over its lifetime) has quickly made it impractical to print and use such chemical
databases.
Since the mid-nineteenth century, chemists have established a universally
understood way to refer to chemical compounds through structural formulae,
indicating a compound’s atoms, the bonds between them, and even their 3D
geometry. But such structures did not lend themselves to easy retrieval. In
the first half of the 20th century, with the rapid growth of newly discovered
compounds and their commercial use, the problem of organising, searching,
and comparing molecules became of crucial importance: for example, when a
pharmaceutical company sought to patent a new drug, the Patent Office had to
verify whether a similar compound had been previously deposited.
To address this challenge, several systems for indexing molecules were
introduced in the 1940s, forming foundations for a new discipline that would
later be called chemoinformatics. One such system, named the ‘GKD chemical
cipher’ after the authors Gordon, Kendall, and Davison (1948), was developed
at the English tire firm Dunlop to be used with early punchcard-based com-
puters.47 In essence, the GKD cipher was an algorithm for parsing a molecular
structure into a string that could be more easily looked up by a human or a
computer.
However, the GKD cipher and other related methods 48 were far from sat-
isfactory. In chemical compounds, similar structures often result in similar
properties. Chemists are trained to develop intuition to spot such analogies,
and look for them when comparing compounds. 49 On the other hand, when
a molecule is represented as a string (such as in the GKD cipher), the con-
stituents of a single chemical structure may be mapped into different positions
of the cipher. As a result, two molecules containing a similar substructure (and
thus possibly similar properties) might be encoded in very different ways (see
an example in Figure 1.17).
Introduction 25
George Vlăduţ
Figure 1.17
A figure from Vl˘aduţ et al. (1959) showing a chemical molecule (top left) and its frag-
ment (top right) and the corresponding GKD-ciphers (bottom). Note that this coding
system breaks the spatial locality of connected atoms in the molecule, such that the
fragment cipher cannot be found by simple substring matching in that of the the full
molecule. This drawback of early chemical representation methods was one of the moti-
vations for the search of structural representations of molecules as graphs.
James Joseph
August Kekulé Sylvester
(1829–1896) (1814–1897)
Figure 1.18
The structural formula of benzene (C6 H6 ) proposed by the 19th-century German
chemist August Kekulé. The term “graph” (in the sense used in graph theory) was
first introduced as a model of molecules by James Sylvester in an 1878 Nature note,
explicitly relating molecules to graphs expressing their “Kekuléan diagrams”.
Boris Andrey
Weisfeiler Lehman
Figure 1.19
The creators of the eponymous Weisfeiler-Lehman graph isomorphism test, the bedrock
of expressivity analysis for both graph isomorphism and graph neural networks, are
pictured alongside the front page of their paper.
household names with the proof of the equivalence of their graph isomorphism
test to message passing (K. Xu et al. 2018; Morris et al. 2019).
Franco Scarselli (2008) proposed the first “GNN.” They relied on recurrent
mechanisms, required the neural network parameters to specify contraction
mappings, and thus computing node representations by searching for a fixed
point — this in itself necessitated a special form of backpropagation and did
not depend on node features at all. All of the above issues were rectified by
the Gated GNN (GGNN) model of Yujia Li et al. (2015), which brought many
benefits of modern RNNs, such as gating mechanisms (Cho et al. 2014) and
backpropagation through time. The neural network for graphs (NN4G) pro-
posed by Alessio Micheli (2009) around the same time used a feedforward
rather than recurrent architecture, in fact resembling more the modern GNNs.
Figure 1.20
Six of the pioneering authors of graph neural networks (GNNs) within the machine
learning community. Alessandro Sperduti developed the earliest known GNN-like
architecture to be published at NeurIPS, in 1994. Goller and Küchler also published
an early form of backprop through structures in the ’90s. The term “GNN” was coined
by Gori and Scarselli’s work in 2005, firmly establishing the term that’s very popular to
this day—although, the concurrent NN4G work of Alessio Micheli uses a mechanism
that more closely resembles modern GNN implementations.
It is worth noting that, while the concept of GNNs experienced several inde-
pendent re-derivations in the 2010s arising from several perspectives (besides
the already mentioned connections to computational chemistry and signal pro-
cessing, we should highlight probabilistic graphical models (Dai, Dai, and
Song 2016) and natural language processing (Vaswani et al. 2017)), the fact
that all of these models arrived at different instances of a common blueprint
is certainly telling. In fact, it has recently been posited (Veličkovi´c 2022) that
GNNs may offer a universal framework for processing discretised data. Other
neural architectures we will discuss in this book (such as CNNs or RNNs) may
be recovered as special cases of GNNs, by inserting appropriate priors into the
message passing functions or the graph structure over which the messages are
computed.
In a somewhat ironic twist of fate, modern GNNs were triumphantly re-
introduced to chemistry (Figure 1.21), a field they originated from, by David
Duvenaud et al. (2015) as a replacement for handcrafted Morgan’s molecular
fingerprints, and by Justin Gilmer et al. (2017) in the form of message-passing
neural networks equivalent to the Weisfeiler-Lehman test. After fifty years,
the circle finally closed. At the time of writing, graph neural networks have
become a standard tool in chemistry and already used in drug discovery and
design pipelines. A notable accolade was claimed with the GNN-based discov-
ery of novel antibiotic compounds (Stokes et al. 2020). DeepMind’s AlphaFold
2 (Jumper et al. 2021) used a form of GNNs in order to address a hallmark
problem in structural biology – the problem of protein folding.
Figure 1.21
The two works spearheaded by David Duvenaud and Justin Gilmer, respectively, have
greatly popularised the use of GNNs for both drug screening and quantum chemistry—
applications that remain prominent to this day.
30 Chapter 1
Notes
1 Fully titled Strena, Seu De Nive Sexangula, (‘New Year’s gift, or on the Six-
Cornered Snowflake’, see Figure 1.1) was, as suggested by the title, a small
booklet sent by Kepler in 1611 as a Christmas gift to his patron and friend
Johannes Matthäus Wackher von Wackenfels.
2
Galois famously described the ideas of group theory (which he considered
in the context of finding solutions to polynomial equations) and coined the
term ‘group’ (groupe in French) in a letter to a friend written on the eve of his
fatal duel. He asked to communicate his ideas to prominent mathematicians
of the time, expressing the hope that they would be able to ‘decipher all this
mess’ (‘déchiffrer tout ce gâchis’). Galois died two days later from wounds
suffered in the duel aged only 20, but his work has been transformational in
mathematics.
3 Omar Khayyam is nowadays mainly remembered as a poet and author of the
immortal line “a flask of wine, a book of verse, and thou beside me.”
4 The publication of Euclides vindicatus required the approval of the Inqui-
sition, which came just a few months before the author’s death. Rediscovered
32 Chapter 1
results, Gauss famously wrote: “To praise it would amount to praising myself.
For the entire content of the work coincides almost exactly with my own
meditations which have occupied my mind for the past thirty or thirty-five
years.” Gauss was also the first to use the term ‘non-Euclidean geometry’ (in
a letter to Heinrich Christian Schumacher), referring strictu sensu to his own
construction of hyperbolic geometry (Faber 1983).
7 A model for hyperbolic geometry known as the pseudosphere, a surface
with constant negative curvature, was shown by Beltrami, who also proved that
hyperbolic geometry was logically consistent. The term ‘hyperbolic geometry’
was introduced by Klein in his 1873 paper Über die sogenannte nicht-
Euklidische Geometrie (‘On the so-called non-Euclidean geometry’). The
prefix ‘so-called’ might strike with a somewhat negative flavour, and indeed
it does: in his Erlangen Programme, Klein wrote that “with the name non-
Euclidean geometry have been associated a multitude of non-mathematical
ideas, which have been as zealously cherished by some as resolutely rejected
by others.” He however dropped the derogatory adjective in his latter works.
8 For example, an 1834 pamphlet signed only with the initials “S.S.”
11
At the time, Göttingen was Germany’s and the world’s leading centre
of mathematics. Though Erlangen is proud of its association with Klein, he
stayed there for only three years, moving in 1875 to the Technical University
of Munich (then called Technische Hochschule), followed by Leipzig (1880),
and finally settling down in Göttingen from 1886 until his retirement.
12
Emmy Noether is rightfully regarded as one of the most important women in
mathematics and one of the greatest mathematicians of the twentieth century.
She was unlucky to be born and live in an epoch when the academic world
was still entrenched in the medieval beliefs of the unsuitability of women
for science. Her career as one of the few women in mathematics having to
overcome prejudice and contempt was a truly trailblazing one. It should be
said to the credit of her male colleagues that some of them tried to break the
rules. When Klein and David Hilbert first unsuccessfully attempted to secure
a teaching position for Noether at Göttingen, they met fierce opposition from
the academic hierarchs. Hilbert reportedly retorted sarcastically to concerns
brought up in one such discussion: “I do not see that the sex of the candidate
is an argument against her admission as a Privatdozent. After all, the Senate
is not a bathhouse.” (Reid 1976) Nevertheless, Noether enjoyed great esteem
among her close collaborators and students, and her male peers in Göttingen
affectionately referred to her as Der Noether, in the masculine (Quigg 2019).
13 Weyl first conjectured (incorrectly) in 1919 that invariance under the change
problem is alluded to on the cover of the book, which is adorned by two pat-
terns: one is connected, one is not. Even for a human it is very difficult to
determine which is which.
19
Kussul et al. (2001) showed that Rosenblatt’s 3-layer perceptron trained
with modern methods and implemented on the 21st century hardware was able
to achieve an accuracy of 99.2% on the MNIST digit recognition task, on par
with modern models.
20 Hilbert’s Thirteenth Problem is one of the 23 problems compiled by
David Hilbert in 1900 and entailing the proof of whether a solution exists for
all 7th-degree equations using continuous functions of two arguments. Kol-
mogorov and his student Arnold showed a solution of a generalised version of
this problem, which is now known as the Arnold–Kolmogorov Superposition
Theorem.
21 Computational geometry has subject code I.3.5 in the ACM Computing
Classification System.
22 Backpropagation is based on the chain rule of differentiation that itself
the distance between points on the domain. For differentiable functions, Lip-
schitz continuity can be expressed as an upper bound on the norm of the
gradient, implying that the function does not ‘jump’ too abruptly.
25
The first to use the term was Richard Bellman (1957) in the preface of
his book Dynamic Programming, where he refers to dimensionality as ‘a curse
which has hung over the head of the physicist and astronomer for many a year.’
26
The number of protons in the observable universe, known as the Eddington
number, is estimated at 1080 .
27
The term ‘receptive field’ predates Hubel and Wiesel and was used by
neurophysiologists from the early twentieth century, see Sherrington (1906).
28
The term ‘grandmother cell’ is likely to have first appeared in Jerry Lettvin’s
course ‘Biological Foundations for Perception and Knowledge’ held at MIT in
1969. A similar concept of ‘gnostic neurons’ was introduced two years earlier
in a book by a Polish neuroscientist Jerzy Konorski (1967). See Gross (2002).
Introduction 35
29
The name ‘neocognitron’ suggests it was an improved version of an earlier
architecture of Fukushima (1975), the cognitron.
30
In the words of the author himself, having an output that is “dependent
only upon the shape of the stimulus pattern, and is not affected by the position
where the pattern is presented.”
31
ReLU-type activations date back to at least the 1960s and have been
previously employed by Fukushima (1969, 1975).
32
Université Pierre-et-Marie-Curie, today part of the Sorbonne University.
33
In LeCun’s 1989 paper, the architecture was not named; the term ‘con-
volutional neural network’ or ‘convnet’ would appear in a later paper in
1998.
34
LeCun’s first CNN was trained on a CPU (a SUN-4/250 machine). However,
the image recognition system using a trained CNN was run on AT&T DSP-32C
(a second-generation digital signal processor with 256KB of memory capa-
ble of performing 125m floating point multiply-and-accumulate operations per
second with 32-bit precision), achieving over 30 classifications per second.
35 One of the most popular feature descriptors was the scale-invariant feature
transform (SIFT), introduced by David Lowe (1999). It is one of the most cited
computer vision papers.
36 A prototypical approach was “bag-of-words” representing images as
neural networks was already described McCulloch and Pitts (1943), who noted
that “the nervous system contains many circular paths” and referred to “pre-
cise specification of these implications by means of recursive functions and
determination of those that can be embodied in the activity of nervous nets.”
The book of Minsky (1967) uses McCulloch-Pitts neurons and calls recurrent
architectures “networks with cycles.” The technical report of Rumelhart, Hin-
ton, and Williams (1985) (an earlier version of the famous Nature paper (1986)
by the same authors) contains generalisations for learning in RNNs, which are
named “recurrent nets,” and credited to Minsky and Papert (1969).
38 The paper presenting LSTMs was initially rejected from NIPS in 1995 and
CNN models that won several vision competitions, including Chinese charac-
ter recognition (Cireşan et al. 2010) and traffic sign recognition (Ciresan et
al. 2012).
40
AlexNet achieved an error over 10.8% smaller than the runner up.
41
AlexNet had eleven layers and was trained on 1.2M images from ImageNet
(for comparison, LeNet-5 had five layers and was trained on 60K MNIST
36 Chapter 1
the Gmelins Handbuch last print edition appeared in the 1990s. The database
currently contains 1.5 million compounds and 1.3 million different reactions
discovered between 1772 and 1995.
46 In 1906, the American Chemical Society authorised the publication of
52
We were unable to find solid proof of whether or how Weisfeiler and
Lehman interacted with Vl˘aduţ, as most of the people who had known both are
now dead. The strongest evidence is a comment in their classical paper (Weis-
feiler and Leman 1968) acknowledging Vlăduţ for “formulating the problem.”
It is also certain that Weisfeiler and Lehman were aware of the methods devel-
oped in the chemical community, in particular the method of Morgan (1965),
whom they cited in their paper as a “similar procedure.”
53
Andrey Lehman’s surname is often also spelled Leman, a variant that he
preferred himself, stating in an email that the former spelling arose from a
book by the German publisher Springer who believed “that every Leman is
a hidden Lehman.” Since Lehman’s family had Teutonic origins by his own
admission, we stick here to the German spelling.
54
Lehman unsuccessfully attempted to defend a thesis based on his work on
graph isomorphism in 1971, which was rejected due to the personal enmity of
the head of the dissertation committee with a verdict “it is not mathematics.”
To this, Lehman bitterly responded: “I am not a mathematician, I am a pro-
grammer.” He eventually defended another dissertation in 1973, on topics in
databases.
55 There are in fact multiple versions of the Weisfeiler-Lehman test. The orig-
inal paper described what is now called the “2-WL test,” which is however
equivalent to 1-WL or node colour refinement algorithm.
56 Since little biographical information is available in English on our heroes,
we will use this note to outline the rest of their careers. All the three ended
up in the United States. George Vl˘aduţ applied for emigration in 1974, which
was a shock to his bosses and resulted in his demotion from the head of lab-
oratory post (emigration was considered a “mortal sin” in the USSR — to
people from the West, it is now hard to imagine what an epic effort it used to
be for Soviet citizens). Vl˘aduţ left his family behind and worked at the Insti-
tute for Scientific Information in Philadelphia until his death in 1990. Being
of Jewish origin, Boris Weisfeiler decided to emigrate in 1975 due to growing
official antesemitism in the USSR – the last drop was the refusal to publish a
monograph on which he had worked extensively as too many authors had “non-
Russian surnames.” He became a professor at Pennsylvania State University
working on algebraic geometry after a short period of stay at the Institute for
Advanced Study in Princeton. An avid mountaineer, he disappeared during a
hike in Chile in 1985. Andrey Lehman left the USSR in 1990 and subsequently
worked as programmer in multiple American startups. He died in 2012.
57
In the chemical community, multiple works proposed GNN-like models
including Kireev (1995), Baskin, Palyulin, and Zefirov (1997), and Merkwirth
and Lengauer (2005).
38 Chapter 1
58
It is worth noting that in the field of computer graphics and geometry pro-
cessing, non-Euclidean harmonic analysis predates Graph Signal Processing
by at least a decade. We can trace spectral filters on manifolds and meshes to
the works of Taubin, Zhang, and Golub (1996), Karni and Gotsman (2000),
and Lévy (2006).
59
From a private email sent by Lehman to Ilia Ponomarenko in 1999.