TriSearch: Learning to Optimize Triangulations via Bistellar Flips

Yiran Wang, Guido MontufarNeurIPS 2026

TL;DR

Chopping a multi-dimensional geometric shape into building blocks—a process called triangulation—is foundational for everything from 3D computer graphics to string theory, yet finding the best way to chop a shape is an exponentially massive search problem. TriSearch solves this by framing triangulation as a reinforcement learning game: instead of guessing shapes from scratch, an AI agent navigates a hidden web of valid configurations using local geometric swaps. Trained only on tiny shapes, it generalizes zero-shot to vastly larger geometries and even discovers new Calabi-Yau manifolds faster than standard physics software.

What Problem Does This Paper Address?

Imagine slicing a 2D polygon into triangles, or a 3D shape into tetrahedra. In $d$ dimensions, slicing a convex shape (a polytope) into fundamental $d$-dimensional building blocks (simplices) is called triangulation.

Depending on your field, you want different things out of a triangulation. An engineer running finite element simulations wants nice, plump simplices and very few of them to save compute. Meanwhile, a string theorist studying 4D shapes wants special triangulations that map to Calabi-Yau threefolds—the curled-up extra dimensions of our universe.

The catch? As you add vertices or step up in dimension, the number of valid triangulations explodes exponentially. Finding an optimal triangulation (like minimizing total edge weight or simplex count) is NP-hard. Standard constructive AI approaches—which build solutions piece-by-piece like laying down dominoes—fail miserably here. In 3D and higher, placing a few tetrahedra inside a shape often leaves behind a weird, non-convex void that might be mathematically impossible to finish triangulating. Checking if a partial solution is a dead end is itself NP-hard!

Methods

Instead of building triangulations from scratch, the authors start with any valid triangulation and make local edits called bistellar flips. For instance, in 3D, if two tetrahedra share a face inside a 5-vertex cluster (a minimal dependent set of points called a circuit), you can often swap them out for three tetrahedra arranged around a central edge, and vice versa.

Figure 1: An illustration of bistellar flips in 3D.

Every valid triangulation is a node in a giant, implicit "flip graph," connected by bistellar flips. TriSearch turns navigating this graph into a Reinforcement Learning (RL) problem:

  • Offloading Validity to Geometry: Rather than forcing a neural network to learn complex geometric rules from data, TriSearch uses an established geometric engine (TOPCOM) to list all valid flips at the current step. Every step is 100% guaranteed to stay inside the valid space.
  • Two-Stage Neural Architecture: The available actions change at every single step. To score them, TriSearch uses a shared Equivariant Graph Neural Network (EGNN) encoder to extract vertex features invariant to rotation and translation. Next—and this is the novel core—an Actor network pools those vertex features onto the $d$-simplices, runs simplicial convolutions over adjacent simplices, and scores each valid flip based on the exact local subtriangulation being replaced.
  • Smart Exploration: The agent is trained via standard PPO, augmented with a count-based exploration bonus and weighted initial-state sampling so it doesn't get stuck pacing around the same tiny corner of the flip graph.
Figure 2: Architecture and training loop of TriSearch. The shared encoder Encκ maps the triangula- tion graph to node-level embeddings. The actor scores each circuit that supports a flip Zi ∈F(△) using a simplex-level GNN and selects a flip via softmax. The value head Vψ max-pools the simplex embeddings from this GNN into a scalar estimate of the state value.

Datasets

  • Synthetic 3D & 4D Polytopes: For general optimization, the authors generated 130 random polytopes per dimension with 8 to 11 vertices (plus up to 2,000 seed triangulations each via TOPCOM) for training. To test out-of-distribution generalization, they evaluated on unseen polytopes with 13 and 14 vertices, which have exponentially larger flip graphs.
  • Kreuzer-Skarke Database: For the physics application, they pulled 4D reflexive lattice polytopes from the famous Kreuzer-Skarke classification. They trained on small instances (Hodge number $h^{1,1} = 3$) and evaluated zero-shot on much larger, unseen polytopes up to $h^{1,1} = 16$.

Key Insights and Ideas

  • Don't learn constraints you can compute: Constructive ML models waste capacity trying (and failing) to output valid triangulations—recent transformers drop below a 50% validity rate on larger physics benchmarks. Letting exact math routines enumerate valid local moves frees the RL policy to focus purely on long-horizon strategy.
  • Higher-order structure is essential: You cannot judge a bistellar flip just by looking at vertices or pairwise edges. Ablation studies proved that stripping away the $d$-simplex adjacency representation caused error gaps in 4D to jump from 0.19% to over 9%.
  • Climbing hills to find deeper valleys: Visualizing the search landscape shows classical greedy search getting immediately trapped in local minima, while TriSearch learns to intentionally accept temporary increases in simplex count to hop over barriers and hit the global optimum in just 10 flips.
Figure 4: Min Simplices trajectories on an unseen 3D polytope with 13 vertices. (a) Flip subgraph with heights given by the number of simplices. (b) Number of simplices along each trajectory.

Key Results

  • Zero-Shot Optimization: Under a strict 500-flip budget on larger unseen polytopes, TriSearch achieved an average optimality gap of just 0.56% in 3D and 1.21% in 4D across three objectives (minimizing simplices, dual-graph diameter, and edge weight). The next-best learned baseline (NeuroLS) trailed behind at 8.97% and 9.48%. Remarkably, within 500 steps in 4D, TriSearch beat a massive $10^9$-step TOPCOM enumeration baseline on two of the three objectives.
  • Calabi-Yau Discovery: Tasked with finding Fine, Regular, Star Triangulations (FRSTs) within 50 flips from random starts, TriSearch maintained a 100% success rate across increasing complexities ($h^{1,1}$ from 4 to 16), while random walks and breadth-first search plummeted toward zero. Used as a sampler under a 300-second budget, it recovered 100% of known Calabi-Yau classes on smaller instances and discovered significantly more distinct topological classes at $h^{1,1}=12$ and $16$ than industry-standard CYTOOLS samplers.

Limitations and Future Work

  • Geometric Bottleneck: Relying on TOPCOM to enumerate valid circuits at every step is hard to parallelize on GPUs; replacing this exact routine with a fast neural filter is an open avenue.
  • Disconnected Spaces: In dimensions 6 and above, flip graphs aren't guaranteed to be connected—meaning bistellar flips alone might never reach an isolated island of triangulations.
  • Smarter Restarts: For Calabi-Yau sampling, TriSearch currently initiates searches from uniformly random geometric liftings. Learning the underlying distribution of good starting points could make discovery even faster.

Summary updated

Abstract

We introduce TriSearch, a reinforcement-learning framework for optimizing objectives over triangulations of a polytope via bistellar flips. The key idea is a circuit-supported subtriangulation action representation: feasible flips are encoded by their supporting circuit and realized local subtriangulation, enabling a learned policy to rank them using local geometric and combinatorial features. This yields a dimension-agnostic interface and enables efficient traversal of the flip graph without explicit enumeration of the full triangulation space. Instantiated in 3D and 4D, TriSearch generalizes zero-shot from small training instances to larger polytopes with exponentially larger search spaces. It achieves top performance on metric objectives in 3D and, in 4D, discovers more distinct Fine, Regular, Star triangulations of reflexive polytopes, corresponding to Calabi-Yau threefolds, than existing samplers under a fixed budget.
BibTeX
@inproceedings{wang2026trisearch,
  author = {Yiran Wang and Guido Montufar},
  title = {{TriSearch: Learning to Optimize Triangulations via Bistellar Flips}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=xNmLiO7Q7N},
}
Figure