natemacfadden commited on
Commit
2f278eb
·
verified ·
1 Parent(s): 027ddaf

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +80 -0
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gpl-3.0
3
+ pipeline_tag: graph-ml
4
+ tags:
5
+ - gnn
6
+ - sampling
7
+ - triangulations
8
+ - lattice-polytopes
9
+ - calabi-yau
10
+ - string-theory
11
+ ---
12
+
13
+ # dualGNN
14
+
15
+ dualGNN is an autoregressive message-passing GNN for sampling fine, regular
16
+ triangulations (FRTs) of convex lattice polytopes. It operates on a
17
+ generalization of the dual graph of a triangulation, with edges labeled by
18
+ "signed circuits" -- combinatorial invariants from oriented matroid theory
19
+ that are necessary and sufficient for exposing regularity. The model is
20
+ independent of the number of points in the polytope, invariant under its
21
+ orientation-preserving symmetries, and guarantees (in 2D) that every rollout
22
+ is a fine triangulation. On unseen polygons it is the most uniform FRT
23
+ sampler tested, with ~92k parameters, trained in ~7.5 hours on a single
24
+ consumer GPU. Applied to string theory, it uniformly samples Calabi-Yau
25
+ threefolds at $h^{1,1} = 86$ (consistent with uniformity at
26
+ $h^{1,1} = 128$) -- an order of magnitude beyond previous learned methods
27
+ with a ~1000x smaller model.
28
+
29
+ ## Files
30
+
31
+ | file | what it is |
32
+ |------|------------|
33
+ | `reinforce.pt` | D=32, K=16 model after REINFORCE fine-tuning -- **the default** |
34
+ | `D32K16.pt` | the same model before fine-tuning (SFT only), for comparison |
35
+
36
+ ## Usage
37
+
38
+ The weights here are the same files bundled inside the
39
+ [`dualgnn`](https://pypi.org/project/dualgnn/) pip package, so the simplest
40
+ path needs nothing from this page:
41
+
42
+ ```python
43
+ # pip install dualgnn
44
+ import numpy as np
45
+ from dualgnn import sample_frts
46
+
47
+ pts = np.array([[x, y] for x in range(5) for y in range(5)]) # [0,4]^2
48
+ fts = sample_frts(pts, 1000, only_regular=True, seed=0)
49
+ ```
50
+
51
+ To load this repo's checkpoint explicitly:
52
+
53
+ ```python
54
+ from huggingface_hub import hf_hub_download
55
+ from dualgnn.model import DualGNN
56
+
57
+ path = hf_hub_download("natemacfadden/dualGNN", "reinforce.pt")
58
+ net = DualGNN.from_ckpt(path)
59
+ ```
60
+
61
+ ## Links
62
+
63
+ - **Paper:** [Sampling Triangulations and Calabi-Yau Threefolds with
64
+ Autoregressive GNNs](https://arxiv.org/abs/2605.27770) (arXiv:2605.27770)
65
+ - **Code / training scripts:**
66
+ [github.com/natemacfadden/dualGNN](https://github.com/natemacfadden/dualGNN)
67
+ - **Benchmark protocol** (evaluate your own sampler against dualGNN):
68
+ [`eval/`](https://github.com/natemacfadden/dualGNN/tree/main/eval)
69
+ - **Archive:** [doi:10.5281/zenodo.20622920](https://doi.org/10.5281/zenodo.20622920)
70
+
71
+ ## Citation
72
+
73
+ ```bibtex
74
+ @article{MacFadden:2605.27770,
75
+ author = {MacFadden, Nate},
76
+ title = {Sampling Triangulations and Calabi-{Y}au Threefolds with Autoregressive {GNN}s},
77
+ doi = {10.48550/arXiv.2605.27770},
78
+ url = {https://arxiv.org/abs/2605.27770},
79
+ }
80
+ ```