arXiv:2611.07514math.GTNov 2026

Manuscript Offprint

arXiv:2611.07514

Using Transformers to Generate 3-Manifold Triangulations

Daniel Bruwel, Ashvni Narayanan, Jonathan Spreer

Abstract

Using dehydration signatures as an encoding, we train GPT-2-style transformers to generate triangulations of 3-dimensional manifolds. Our main runs each use ≈ 3 exaFLOPs, spanning a 200 million parameter model trained on 60 million sphere triangulations to an 11 million parameter model trained on 1.1 billion sphere triangulations. The optimal model has 10 blocks, width 640 and generates dehydration signatures of closed manifolds of various topological types at a rate of 6.9%, 82% of which are spheres. To investigate how our method scales, we use the technique of IsoFLOP curves on 15-tetrahedron triangulations of the 3-sphere, over a compute range of 6-3000 petaFLOPs, and observe neural scaling behaviour. We extract a parameter scaling exponent of α=0.49\alpha = 0.49 ([0.48, 0.50] stat, ±0.02\pm 0.02 syst), and an optimal ratio of 234 tokens per parameter for training. In addition, we present a number of smaller experiments, including evidence that transformers are able to learn to count degree-one edges near-perfectly, but get progressively worse when counting edges with higher degrees.

MSC 2020 classification: 57Q15; 57K30, 57-08, 68T07

Keywords: 3-manifold triangulations, transformer models, generative machine learning, dehydration signatures, neural scaling laws

1 Introduction

The study of manifolds is central to research in geometric topology. One way to achieve this is to decompose a given manifold MM into simplices, that is, to construct a triangulation T\mathcal{T} of MM, and to then use the finite combinatorial nature of T\mathcal{T} to compute topological properties of MM using algorithms and mathematical software.

For this pipeline of mathematical research to be successful, having access to large numbers of example triangulations with particular properties (determined by the application) is crucial. Ideally, we would have some version of a random generator for triangulations of manifolds that would sample from a controlled distribution over the combinatorial isomorphism types of triangulations with a given number of simplices. The motivation for this requirement stems from algorithms in the field whose performance only depends on the combinatorial isomorphism type of the input, and nothing else.

For manifolds of dimension two, i.e., surfaces, producing such a random generator is well within reach. There exist many random models, see, for instance [9, 12, 34, 35], including one by Shankar and the third author that is asymptotically uniform on the set of combinatorial isomorphism types of triangulations under consideration [41], and one by Altmann and the third author based on a Markov chain that converges to a uniform distribution [1].

In dimension d=3d = 3, a truly random generator with control over its distribution is much more difficult to obtain. See [13] for seminal work on random 3-manifolds, including a discussion of random triangulations. Their main investigations, however, focus on a different probabilistic model based on random Heegaard splittings.

If we are interested in sampling triangulations of a given fixed 3-manifold MM, we can apply repeated local modifications, e.g., bistellar flips, to a seed triangulation of MM. Organising this random walk through the space of triangulations of MM in a Markov Chain Monte Carlo model achieves asymptotic control over a sampling distribution. See, for instance, [1] where this has been done in the case where MM is the 3-sphere. Although convergence rates and mixing times remain unknown, experimental evidence suggests that such methods approximate a random generator of moderately sized triangulations of a given 3-manifold relatively well.

If we do not want to fix the topology of the triangulation, one straightforward approach is to randomly sample a 4-regular multi-graph G=(V,E)G = (V, E), and for each node v∈Vv \in V, introduce a tetrahedron Δv\Delta_v, and for each edge e∈Ee \in E connecting a vertex vv to w∈Vw \in V (possibly v=wv = w), glue a triangle of Δv\Delta_v to a triangle of Δw\Delta_w along a random bijection between their vertices. The issue with this approach is that the probability that this triangulation represents a manifold tends to zero extremely quickly as #V→∞\#V \to \infty, see Section 3 for some specific numbers.

In this work, we address this issue using machine learning techniques. More specifically, we train a transformer to learn to randomly generate dehydration signatures of 3-manifold triangulations.

Our contributions We use GPT-2-style transformers trained on large quantities of dehydration signatures (first presented in [8]) of 3-sphere triangulations. Our hypothesis is that as compute increases, the transformer will improve primarily by increasing the rate of closed manifolds, and to a lesser extent by learning to generate the correct manifold type. This is motivated by the observation that checking if a 3-dimensional triangulation is a manifold is a linear time procedure, while there is still no polynomial algorithm known for recognising the 3-sphere [23, 25], arguably the simplest closed 3-manifold.

We run a series of small experiments on classifying triangulations as manifolds and learning certain properties from their input signatures. We find a large degree of success for simple properties, such as the number of loops in the dual graph, and classification of the manifold property over a small range of topologies. For more complex properties, such as the edge-degree variance, success is more limited.

We run a series of larger experiments for generation. Our models succeed in generating valid triangulations at very high rates, and for triangulations of closed manifolds, at rates many orders of magnitude greater than the baseline. We also find evidence that the optimal parameter count as a function of compute follows a power law, and the optimal loss as a function of compute follows a power law with constant offset.

We observe that our model is significantly biased towards generating spheres, but interestingly that the fraction of generated closed manifolds that are not spheres has a relatively small spread over the range of models we test. In particular, we find it to be only ≈1%\approx 1\% relative to the spread in the total sphere shortfall. This supports our initial hypothesis that learning is focused on improving the rate of closed manifolds, rather than ensuring those manifolds are the correct type.

Finally, we analyse the statistical properties of our model, and find that there are sphere triangulations with very low likelihoods, preventing our models from being used with techniques such as importance sampling.

Related work There exist rich and extremely useful data sources for example triangulations, such as censuses of several billion triangulations of manifolds of various topological types in dimensions 3 [6] and 4 [4]. By their very nature, these data sources only contain examples with relatively few tetrahedra. To obtain large quantities of triangulations with many tetrahedra (≥12\geq 12), local searches, such as the one from [1], are very useful. However, these only produce a fixed manifold type.

Generating large numbers of example triangulations with distinct topologies can be done using layered handlebodies and random layerings [17], or by operating on framed links [42]. Here the combinatorial structure of the examples is very restricted, which is a problem that can be addressed by, again, using local search methods.

Regarding machine learning on triangulations, in [11], the authors work with a similar data source, namely, isomorphism signatures of triangulations, to train classifiers to discriminate between topological types, and specific topological properties of the underlying manifold of triangulations. In their work, the machine learning models must pick up on topological features of 3-manifolds, which are often hard to compute. In contrast, we want our models to learn the manifold property in dimension three, which is a linear time procedure (essentially an Euler characteristic computation).

In a more recent study [40], the authors operate on a census of simplicial triangulations of surfaces and 3-manifolds due to Lutz [28]. They find that the representation of data is very important for learning success, and that performance is highly dependent on the combinatorial structure of the input, along with limited generalisability to triangulations of different sizes.

Acknowledgements The authors would like to thank the MATRIX Institute, and in particular the organisers of the MATRIX-Oberwolfach Tandem Workshop Machine Learning and AI for Mathematics, where this project was started.

The second author would like to thank the Hooper-Shaw Foundation and Sydney Mathematical Research Institute for supporting her as a postdoc when the project began. The third author is supported by the Australian Research Council under the Discovery Scheme, grant number DP220102588. This research was undertaken with the assistance of resources and services from the National Computational Infrastructure (NCI), supported by the Australian Government, under project io00: Learning triangulations of manifolds. The authors acknowledge the technical assistance provided by the Sydney Informatics Hub, a Core Research Facility of the University of Sydney.

AI disclosure statement: The authors acknowledge the use of generative AI—specifically, web-based ChatGPT 6.0 and Claude Opus 5.5—for proofreading, for writing some of the TikZ code, and for assistance with minor coding tasks.

References (28)