# Sampling Triangulations and Calabi-Yau Threefolds with Autoregressive GNNs

arXiv: https://arxiv.org/abs/2605.27770 · HTML: https://mlsanity.com/paper/2605.27770/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 43 references that are in the map.
- First posted on arXiv 26 May 2026.

## Builds on (most cited first, 12 of 12)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [RoFormer: Enhanced Transformer with Rotary Position Embedding](https://mlsanity.com/paper/2104.09864/) (2021)
- [Neural Message Passing for Quantum Chemistry](https://mlsanity.com/paper/1704.01212/) (2017)
- [Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges](https://mlsanity.com/paper/2104.13478/) (2021)
- [Pointer Networks](https://mlsanity.com/paper/1506.03134/) (2015)
- [Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation](https://mlsanity.com/paper/2106.04399/) (2021)
- [Do Transformers Really Perform Bad for Graph Representation?](https://mlsanity.com/paper/2106.05234/) (2021)
- [Weisfeiler and Lehman Go Topological: Message Passing Simplicial Networks](https://mlsanity.com/paper/2103.03212/) (2021)
- [Integer Discrete Flows and Lossless Compression](https://mlsanity.com/paper/1905.07376/) (2019)
- [Discrete Flows: Invertible Generative Models of Discrete Data](https://mlsanity.com/paper/1905.10347/) (2019)
- [Transforming Calabi-Yau Constructions: Generating New Calabi-Yau Manifolds with Transformers](https://mlsanity.com/paper/2507.03732/) (2025)
- [The DNA of Calabi-Yau Hypersurfaces](https://mlsanity.com/paper/2405.08871/) (2024)

## Abstract (arXiv)

We introduce `dualGNN', an autoregressive message-passing GNN for sampling fine, regular triangulations of lattice polytopes. dualGNN operates on a generalization of the dual graph of a triangulation, with edges labeled by `signed circuits' -- combinatorial invariants from the theory of oriented matroids. We show that these circuits are necessary and sufficient to determine a triangulation's regularity from the graph, provided certain magnitude information is retained. The model is independent of the polytope's point count and invariant under its orientation-preserving symmetries (SL(d,mathbbZ) ltimes mathbbZd), and our masking procedure further guarantees that every rollout produces a fine triangulation (in 2D). On unseen polygons with Npts ≤ 40, dualGNN is the only sampler we tested that is consistent with uniform sampling across all our diagnostics (KL divergence from uniformity, collision counts, and sample autocorrelation). The model is small (~92k parameters) and trains in ~7.5 hours on a single consumer GPU. We apply dualGNN to string theory, sampling Calabi-Yau threefolds uniformly at h1,1=86; we also sample CYs at h1,1=128, observing no deviations from uniformity, but our diagnostics are weaker here. Code, training scripts, and pretrained models are available at https://github.com/natemacfadden/dualGNN (pip install dualgnn), and dualGNN is integrated into CYTools.
