Advancing Math by Guiding Human Intuition With AI
Advancing Math by Guiding Human Intuition With AI
Advancing Math by Guiding Human Intuition With AI
One of the central drivers of mathematical progress is the discovery that AI can also be used to assist in the discovery of theorems and con-
of patterns and formulation of useful conjectures: statements that jectures at the forefront of mathematical research. This extends work
are suspected to be true but have not been proven to hold in all cases. using supervised learning to find patterns20–24 by focusing on enabling
Mathematicians have always used data to help in this process—from mathematicians to understand the learned functions and derive useful
the early hand-calculated prime tables used by Gauss and others that mathematical insight. We propose a framework for augmenting the
led to the prime number theorem5, to modern computer-generated standard mathematician’s toolkit with powerful pattern recognition
data1,5 in cases such as the Birch and Swinnerton-Dyer conjecture2. and interpretation methods from machine learning and demonstrate
The introduction of computers to generate data and test conjectures its value and generality by showing how it led us to two fundamental
afforded mathematicians a new understanding of problems that were new discoveries, one in topology and another in representation theory.
previously inaccessible6, but while computational techniques have Our contribution shows how mature machine learning methodologies
become consistently useful in other parts of the mathematical pro- can be adapted and integrated into existing mathematical workflows
cess7,8, artificial intelligence (AI) systems have not yet established a to achieve novel results.
similar place. Prior systems for generating conjectures have either
contributed genuinely useful research conjectures9 via methods that
do not easily generalize to other mathematical areas10, or have dem- Guiding mathematical intuition with AI
onstrated novel, general methods for finding conjectures11 that have A mathematician’s intuition plays an enormously important role in
not yet yielded mathematically valuable results. mathematical discovery—“It is only with a combination of both rigor-
AI, in particular the field of machine learning12–14, offers a collec- ous formalism and good intuition that one can tackle complex math-
tion of techniques that can effectively detect patterns in data and has ematical problems”25. The following framework, illustrated in Fig. 1,
increasingly demonstrated utility in scientific disciplines15. In math- describes a general method by which mathematicians can use tools
ematics, it has been shown that AI can be used as a valuable tool by from machine learning to guide their intuitions concerning complex
finding counterexamples to existing conjectures16, accelerating calcu- mathematical objects, verifying their hypotheses about the existence
lations17, generating symbolic solutions18 and detecting the existence of relationships and helping them understand those relationships. We
of structure in mathematical objects19. In this work, we demonstrate propose that this is a natural and empirically productive way that these
DeepMind, London, UK. 2University of Oxford, Oxford, UK. 3University of Sydney, Sydney, New South Wales, Australia. ✉e-mail: adavies@deepmind.com; pushmeet@deepmind.com
1
Reformulate hypothesis
Mathematician steps Prove theorem
Computational steps
Fig. 1 | Flowchart of the framework. The process helps guide a mathematician’s the accuracy of the learned function f̂ and attribution techniques applied to it
intuition about a hypothesized function f, by training a machine learning model to can aid in the understanding of the problem and the construction of a closed-form
estimate that function over a particular distribution of data PZ. The insights from f′. The process is iterative and interactive, rather than a single series of steps.
well-understood techniques in statistics and machine learning can be they may be related. We have used the above framework to help math-
used as part of a mathematician’s work. ematicians to obtain impactful mathematical results in two cases—dis-
Concretely, it helps guide a mathematician’s intuition about the covering and proving one of the first relationships between algebraic
relationship between two mathematical objects X(z) and Y(z) associ- and geometric invariants in knot theory and conjecturing a resolution
ated with z by identifying a function fˆ such that fˆ(X(z)) ≈ Y(z) and to the combinatorial invariance conjecture for symmetric groups4,
analysing it to allow the mathematician to understand properties of a well-known conjecture in representation theory. In each area, we
the relationship. As an illustrative example: let z be convex polyhedra, demonstrate how the framework has successfully helped guide the
X(z) ∈ Z2 × R2 be the number of vertices and edges of z, as well as the mathematician to achieve the result. In each of these cases, the neces-
volume and surface area, and Y(z) ∈ ℤ be the number of faces of z. sary models can be trained within several hours on a machine with a
Euler’s formula states that there is an exact relationship between X(z) single graphics processing unit.
and Y(z) in this case: X(z) · (−1, 1, 0, 0) + 2 = Y(z). In this simple example,
among many other ways, the relationship could be rediscovered by
the traditional methods of data-driven conjecture generation1. How- Topology
ever, for X(z) and Y(z) in higher-dimensional spaces, or of more complex Low-dimensional topology is an active and influential area of mathemat-
types, such as graphs, and for more complicated, nonlinear fˆ, this ics. Knots, which are simple closed curves in R3, are one of the key objects
approach is either less useful or entirely infeasible. that are studied, and some of the subject’s main goals are to classify
The framework helps guide the intuition of mathematicians in two them, to understand their properties and to establish connections with
ways: by verifying the hypothesized existence of structure/patterns in other fields. One of the principal ways that this is carried out is through
mathematical objects through the use of supervised machine learning; invariants, which are algebraic, geometric or numerical quantities that
and by helping in the understanding of these patterns through the use are the same for any two equivalent knots. These invariants are derived
of attribution techniques. in many different ways, but we focus on two of the main categories:
In the supervised learning stage, the mathematician proposes a hyperbolic invariants and algebraic invariants. These two types of
hypothesis that there exists a relationship between X(z) and Y(z). By invariants are derived from quite different mathematical disciplines,
generating a dataset of X(z) and Y(z) pairs, we can use supervised learn- and so it is of considerable interest to establish connections between
ing to train a function fˆ that predicts Y(z), using only X(z) as input. The them. Some examples of these invariants for small knots are shown in
key contributions of machine learning in this regression process are Fig. 2. A notable example of a conjectured connection is the volume
the broad set of possible nonlinear functions that can be learned given conjecture26, which proposes that the hyperbolic volume of a knot (a
a sufficient amount of data. If fˆ is more accurate than would be geometric invariant) should be encoded within the asymptotic behav-
expected by chance, it indicates that there may be such a relationship iour of its coloured Jones polynomials (which are algebraic invariants).
to explore. If so, attribution techniques can help in the understanding Our hypothesis was that there exists an undiscovered relationship
of the learned function fˆ sufficiently for the mathematician to conjec- between the hyperbolic and algebraic invariants of a knot. A supervised
ture a candidate f′. Attribution techniques can be used to understand learning model was able to detect the existence of a pattern between a
which aspects of fˆ are relevant for predictions of Y(z). For example, large set of geometric invariants and the signature σ(K), which is known
many attribution techniques aim to quantify which component of X(z) to encode important information about a knot K, but was not previously
the function fˆ is sensitive to. The attribution technique we use in our known to be related to the hyperbolic geometry. The most relevant
work, gradient saliency, does this by calculating the derivative of out- features identified by the attribution technique, shown in Fig. 3a, were
puts of fˆ, with respect to the inputs. This allows a mathematician to three invariants of the cusp geometry, with the relationship visualized
identify and prioritize aspects of the problem that are most likely to partly in Fig. 3b. Training a second model with X(z) consisting of only
be relevant for the relationship. This iterative process might need to these measurements achieved a very similar accuracy, suggesting that
be repeated several times before a viable conjecture is settled on. In they are a sufficient set of features to capture almost all of the effect of
this process, the mathematician can guide the choice of conjectures the geometry on the signature. These three invariants were the real and
to those that not just fit the data but also seem interesting, plausibly imaginary parts of the meridional translation μ and the longitudinal
true and, ideally, suggestive of a proof strategy. translation λ. There is a nonlinear, multivariate relationship between
Conceptually, this framework provides a ‘test bed for intuition’— these quantities and the signature. Having been guided to focus on
quickly verifying whether an intuition about the relationship between these invariants, we discovered that this relationship is best understood
two quantities may be worth pursuing and, if so, guidance as to how by means of a new quantity, which is linearly related to the signature.
Fig. 2 | Examples of invariants for three hyperbolic knots. We hypothesized that there was a previously undiscovered relationship between the geometric and
algebraic invariants.
We introduce the ‘natural slope’, defined to be slope(K) = Re(λ/μ), where result that instead relies on short geodesics, another of the most salient
Re denotes the real part. It has the following geometric interpretation. features, in the Supplementary Information. Further details and a full
One can realize the meridian curve as a geodesic γ on the Euclidean proof of the above theorem are available in ref. 27. Across the datasets
torus. If one fires off a geodesic γ⊥ from this orthogonally, it will even- we generated, we can place a lower bound of c ≥ 0.23392, and it would
tually return and hit γ at some point. In doing so, it will have travelled be reasonable to conjecture that c is at most 0.3, which gives a tight
along a longitude minus some multiple of the meridian. This multiple relationship in the regions in which we have calculated.
is the natural slope. It need not be an integer, because the endpoint of The above theorem is one of the first results that connect the alge-
γ⊥ might not be the same as its starting point. Our initial conjecture braic and geometric invariants of knots and has various interesting
relating natural slope and signature was as follows. applications. It directly implies that the signature controls the
Conjecture: There exist constants c1 and c2 such that, for every hyper- non-hyperbolic Dehn surgeries on the knot and that the natural slope
bolic knot K, controls the genus of surfaces in R+4 whose boundary is the knot. We
expect that this newly discovered relationship between natural slope
|2σ (K ) − slope(K )| < c 1vol(K ) + c 2 (1) and signature will have many other applications in low-dimensional
While this conjecture was supported by an analysis of several large topology. It is surprising that a simple yet profound connection such
datasets sampled from different distributions, we were able to con- as this has been overlooked in an area that has been extensively studied.
struct counterexamples using braids of a specific form. Subsequently,
we were able to establish a relationship between slope(K), signature
Representation theory
σ(K), volume vol(K) and one of the next most salient geometric invari-
ants, the injectivity radius inj(K) (ref. 27). Representation theory is the theory of linear symmetry. The building
blocks of all representations are the irreducible ones, and understand-
Theorem: There exists a constant c such that, for any hyperbolic knot K,
ing them is one of the most important goals of representation theory.
|2σ (K ) − slope(K )| ≤ c vol(K )inj(K )−3 (2) Irreducible representations generalize the fundamental frequencies of
Fourier analysis28. In several important examples, the structure of irreduc-
It turns out that the injectivity radius tends not to get very small, ible representations is governed by Kazhdan–Lusztig (KL) polynomials,
even for knots of large volume. Hence, the term inj(K)−3 tends not to get which have deep connections to combinatorics, algebraic geometry and
very large in practice. However, it would clearly be desirable to have a singularity theory. KL polynomials are polynomials attached to pairs of
theorem that avoided the dependence on inj(K)−3, and we give such a elements in symmetric groups (or more generally, pairs of elements in
a b
Im(Meridional translation)
200
Longitudinal translation
30
Re(Meridional translation) 175
X(z): Geometric invariants
Im(Short geodesic) 20
150
Injectivity radius
10 125
Cusp volume
Signature
Fig. 3 | Knot theory attribution. a, Attribution values for each of the input confidence interval error bars are across 10 retrainings of the model.
X(z). The features with high values are those that the learned function is most b, Example visualization of relevant features—the real part of the meridional
sensitive to and are probably relevant for further exploration. The 95% translation against signature, coloured by the longitudinal translation.
(03214), (34201) 1 + q2
(021435), (240513) 1 + 2q + q2
Fig. 4 | Two example dataset elements, one from S5 and one from S6. The combinatorial invariance conjecture states that the KL polynomial of a pair of
permutations should be computable from their unlabelled Bruhat interval, but no such function was previously known.
Coxeter groups). The combinatorial invariance conjecture is a fascinating Further structural evidence was found by calculating salient subgraphs
open conjecture concerning KL polynomials that has stood for 40 years, that attribution techniques determined were most relevant and analysing
with only partial progress29. It states that the KL polynomial of two ele- the edge distribution in these graphs compared to the original graphs.
ments in a symmetric group SN can be calculated from their unlabelled In Fig. 5a, we aggregate the relative frequency of the edges in the salient
Bruhat interval30, a directed graph. One barrier to progress in understand- subgraphs by the reflection that they represent. It shows that extremal
ing the relationship between these objects is that the Bruhat intervals for reflections (those of the form (0, i) or (i, N − 1) for SN) appear more com-
non-trivial KL polynomials (those that are not equal to 1) are very large monly in salient subgraphs than one would expect, at the expense of
graphs that are difficult to develop intuition about. Some examples simple reflections (those of the form (i, i + 1)), which is confirmed over
of small Bruhat intervals and their KL polynomials are shown in Fig. 4. many retrainings of the model in Fig. 5b. This is notable because the
We took the conjecture as our initial hypothesis, and found that a edge labels are not given to the network and are not recoverable from
supervised learning model was able to predict the KL polynomial from the unlabelled Bruhat interval. From the definition of KL polynomials,
the Bruhat interval with reasonably high accuracy. By experimenting on it is intuitive that the distinction between simple and non-simple reflec-
the way in which we input the Bruhat interval to the network, it became tions is relevant for calculating it; however, it was not initially obvious
apparent that some choices of graphs and features were particularly con- why extremal reflections would be overrepresented in salient subgraphs.
ducive to accurate predictions. In particular, we found that a subgraph Considering this observation led us to the discovery that there is a natural
inspired by prior work31 may be sufficient to calculate the KL polynomial, decomposition of an interval into two parts—a hypercube induced by
and this was supported by a much more accurate estimated function. one set of extremal edges and a graph isomorphic to an interval in SN−1.
a b
45
0 40
Trained *
Baseline
1 ****
30 40
Percentage observed
First reflection index
2
3 20 35
4 10 ****
5 30
0
6
25
7 –10
8 –20 20
0 1 2 3 4 5 6 7 8 Extremal Simple Other
Second reflection index Edge type
c
Inductive
Hypercube
0 1 2 3 4 5 6 7
Fig. 5 | Representation theory attribution. a, An example heatmap of significance level shown was determined using a two-sided two-sample t-test.
the percentage increase in reflections present in the salient subgraphs *p < 0.05; ****p < 0.0001. c, Illustration for the interval 021435–240513 ∈ S6
compared with the average across intervals in the dataset when predicting q4. of the interesting substructures that were discovered through the iterative
b, The percentage of observed edges of each type in the salient subgraph for 10 process of hypothesis, supervised learning and attribution. The subgraph
retrainings of the model compared to 10 bootstrapped samples of the same inspired by previous work31 is highlighted in red, the hypercube in green and
size from the dataset. The error bars are 95% confidence intervals, and the the decomposition component isomporphic to an interval in S N−1 in blue.
37. Bronstein, M. M., Bruna, J., Cohen, T. & Veličković, P. Geometric deep learning: grids, Acknowledgements We thank J. Ellenberg, S. Mohamed, O. Vinyals, A. Gaunt, A. Fawzi and
groups, graphs, geodesics, and gauges. Preprint at https://arxiv.org/abs/2104.13478 D. Saxton for advice and comments on early drafts; J. Vonk for contemporary supporting work;
(2021). X. Glorot and M. Overlan for insight and assistance; and A. Pierce, N. Lambert, G. Holland,
38. Efroymson, M. A. in Mathematical Methods for Digital Computers 191–203 (John Wiley, R. Ahamed and C. Meyer for assistance coordinating the research. This research was funded by
1960). DeepMind.
39. Xu, K. et al. Show, attend and tell: neural image caption generation with visual
attention. In Proc. International Conference on Machine Learning 2048–2057 (PMLR, Author contributions A.D., D.H. and P.K. conceived of the project. A.D., A.J. and M.L.
2015). discovered the knot theory results, with D.Z. and N.T. running additional experiments. A.D., P.V.
40. Sundararajan, M., Taly, A. & Yan, Q. Axiomatic attribution for deep networks. and G.W. discovered the representation theory results, with P.V. designing the model, L.B.
In Proc. International Conference on Machine Learning 3319–3328 (PMLR, 2017). running additional experiments, and C.B. providing advice and ideas. S.B. and R.T. provided
41. Bradbury, J. et al. JAX: composable transformations of Python+NumPy programs (2018); additional support, experiments and infrastructure. A.D., D.H. and P.K. directed and managed
https://github.com/google/jax the project. A.D. and P.V. wrote the paper with help and feedback from P.B., C.B., M.L., A.J.,
42. Martín A. B. A. D. I. et al. TensorFlow: large-scale machine learning on heterogeneous G.W., P.K. and D.H.
systems (2015); https://doi.org/10.5281/zenodo.4724125.
43. Paszke, A. et al. in Advances in Neural Information Processing Systems 32 Competing interests The authors declare no competing interests.
(eds Wallach, H. et al.) 8024–8035 (Curran Associates, 2019).
44. Thurston, W. P. Three dimensional manifolds, Kleinian groups and hyperbolic geometry. Additional information
Bull. Am. Math. Soc 6, 357–381 (1982). Supplementary information The online version contains supplementary material available at
45. Culler, M., Dunfield, N. M., Goerner, M. & Weeks, J. R. SnapPy, a computer program for https://doi.org/10.1038/s41586-021-04086-x.
studying the geometry and topology of 3-manifolds (2020); http://snappy.computop.org. Correspondence and requests for materials should be addressed to Alex Davies or Pushmeet
46. Burton, B. A. The next 350 million knots. In Proc. 36th International Symposium on Kohli.
Computational Geometry (SoCG 2020) (Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Peer review information Nature thanks Sanjeev Arora, Christian Stump and the other,
2020). anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer
47. Warrington, G. S. Equivalence classes for the μ-coefficient of Kazhdan–Lusztig reports are available.
polynomials in Sn. Exp. Math. 20, 457–466 (2011). Reprints and permissions information is available at http://www.nature.com/reprints.
Article
Extended Data Fig. 1 | Empirical relationship between slope and signature. a Signature vs slope for random dataset. b Signature vs slope for Regina dataset.
Extended Data Table 1 | Model accuracies at predicting KL coefficients from Bruhat intervals in S9