Skip to content
View natemacfadden's full-sized avatar
🤖
🤖

Block or report natemacfadden

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
natemacfadden/README.md

Nate MacFadden

See my first bonsai 'Paco'
(named after one of my favorite
mathematicians). I've grown quite
fond of these trees - I now have
4-5, including a Japanese maple,
redwood, and spruce.

I build high-performance systems and algorithms for hard problems in geometry and combinatorics (from multithreaded C/OpenMP kernels to symmetry-aware neural networks), and ship them as tools other researchers rely on. I lead development of and am the sole active maintainer of CYTools, the standard toolkit in my field (computational string-theory geometry).

A few things I've built: dualGNN, a symmetry-aware GNN that beats a ~120M-parameter transformer baseline on sampling uniformity and zero-shot generalization with ~1300x fewer parameters; latticepts, a lattice-point enumeration kernel that materializes ~17M points/s in parallel and is integrated into CYTools and Macaulay2; and agent harnesses that make small, untrustworthy LLMs reliable in a technical domain. These grow out of my string-theory Ph.D. at Cornell (McAllister group), a steady source of hard geometry and combinatorics problems.

Looking for research engineer / research scientist roles at AI labs.

Stack: Python (PyTorch, NumPy, Numba), Cython, C (OpenMP), C++

Performance & Systems

  • latticepts - High-performance C/Cython implementation of Kannan's lattice point enumeration algorithm, substantially faster than Normaliz and OR-Tools CP-SAT in some cases. For an example of the performance: latticepts generates ~108M lattice points in a polyhedron of interest (the strict interior of a certain 7D cone used in Candidate de Sitter Vacua) in ~13s single-threaded, or ~6.3s on 12 threads (~8M points/s, ~17M/s in parallel), materializing the full point set. Integrated into CYTools and Macaulay2.
  • unitri - High-performance C/Cython library for efficiently counting the unimodular (i.e., fine) triangulations of convex lattice polygons. Built on Stepan Orevkov's counting code (which itself generalizes Kaibel and Ziegler's code), reworked and generalized; applied to string theory in Further Bounding the Kreuzer-Skarke Landscape. Counts without enumerating (cost depends only on the bounding box, not the number of triangulations), with exact big-integer arithmetic (or primes + CRT for parallelization): e.g. the 4x4 grid's $736,983,568$ triangulations in $\sim0.33$ms, or a height-84 triangle's $\sim 7.6\times10^{65}$ triangulations in $\sim1.26$s.
  • pfvs (paper in preparation) - High-performance C/Cython library (with some Python prep) for solving certain diophantine problems orders of magnitude faster than previous methods, with significantly better time and memory scaling - reaching searches an order of magnitude beyond their reach. Converted a many core-year computation into a handful of core-weeks. Relevant for string theory, where these solutions can be interpreted as perturbatively flat vacua (PFVs).
  • fanroots - Library for optimization over $\sim200$-dimensional piecewise-smooth functions whose analytic form changes across cone boundaries. Specifically designed for functions of 'Kahler moduli space' in string theory, for which FanRoots is used to locate special points where desired physics can be engineered, as in Candidate de Sitter Vacua. Achieves 20-70x speedups over the prior methods used there (growing with dimension), and converges on geometries where they fail.
  • FastAerosol (code, paper) - C++ 'advanced example' contributed to GEANT4: memory- and time-efficient stochastic simulation of particle transport through aerosol geometries.

ML & Algorithms

  • dualGNN - Autoregressive GNN for combinatorial sampling (triangulations) under local (validity, fineness) and global (regularity) constraints out of a large population. We use signed-circuit edge features from oriented matroid theory which we show are provably necessary and empirically sufficient for determining regularity, and invariant under the problem's symmetries. Pointer-Network-style decoding, trained with cross-entropy then REINFORCE-tuned for uniformity. Has ~92k parameters and trains in ~7.5h on a single RTX 5060 Ti. It is the most uniform sampler we tested across these diagnostics (divergence from uniformity, collision counts, sample autocorrelation); transfers zero-shot to unseen instances. Applied to Calabi-Yau enumeration up to $h^{1,1}=128$ (uniformity validated to $h^{1,1}=86$).
  • NTFE algorithm (code in CYTools) - Simple algorithm for generating regular triangulations of reflexive polytopes with distinct 2-face restrictions, exponentially faster than previous methods (this is the current SOTA). Such triangulations lead to potentially-inequivalent Calabi-Yau manifolds via Batyrev's construction. This algorithm is used in most CYTools workflows. Bounds on NTFE counts established in this work.
  • pfvscorer - Learned richness classifier for certain classes of Diophantine problems (i.e., 'PFVs' in string theory). Enumerating the solutions (my pfvs kernel) is fast but eventually hits a fundamental wall; pfvscorer instead predicts how many solutions a class is likely to have, before enumeration, so searches can be steered toward rich classes. Three encoders, each tailored to the symmetry of one geometric input, feed a shared trunk with sigmoid heads that predict P(#solutions > threshold) (e.g. >0 and >50).
  • The DNA of Calabi-Yau Hypersurfaces (Fortschritte der Physik, 2025; code) - Custom genetic algorithm with hyperparameters tuned by Bayesian optimization; combinatorial optimization over Calabi-Yau search spaces up to ~$10^{36}$ candidates, substantially outperforming MCMC, simulated annealing, and best-first search on both maximization and inverse problems. Built on the NTFE encoding, which eliminates the search space's exponential redundancy.

LLM Agents & Reliability

  • cytools-agent - Makes small, untrustworthy open-weight models (e.g. qwen3:8b) reliably answer research-level questions with CYTools. The model is treated as helpful but untrustworthy: a planner routes each question to a tool-calling executor, knowledge comes from a queryable encyclopedia of source-derived definitions (not model memory), and every numeric result is backed by an evidence ledger and checked against machine-verified invariants (the harness refuses rather than guesses on a violation). Schema-constrained decoding and forgiving tool interfaces take a weak model from near-useless to genuinely useful (more so with self-consistency voting); the same tools are exposed over MCP.
  • repo-review - Claude Code plugin that reviews a GitHub repo by spawning five lens-specialized sub-agents (performance, correctness, engineering, taste & positioning, documentation) that clone, build, run, test, and profile it. Invoke with /repo-review:review <repo>.

CYTools

I'm the lead developer and sole active maintainer (BDFL) of CYTools, the standard toolkit for studying Calabi-Yau compactifications in string theory (invited talks at multiple conferences). Recent contributions: a significantly faster intersection-number kernel, and regfans, a standalone package I wrote for regular triangulations of vector configurations, which extends CYTools to vex triangulations.

Selected papers

  • Sampling Triangulations and Calabi-Yau Threefolds with Autoregressive GNNs (2026) - Nate MacFadden. arXiv:2605.27770. [code]
  • The DNA of Calabi-Yau Hypersurfaces: A Genetic Algorithm for Polytope Triangulations (2025) - Nate MacFadden, Andreas Schachner, Elijah Sheridan. Fortschritte der Physik 73 (2025). doi:10.1002/prop.70060, arXiv:2405.08871
  • Further Bounding the Kreuzer-Skarke Landscape (2026) - Nate MacFadden, Stepan Yu. Orevkov, Michael Stepniczka. arXiv:2602.16909

For fun

Pinned Loading

  1. dualGNN dualGNN Public

    Demo code from the dualGNN paper. Includes inference and training, as well as grow2d and pushing

    Python 2

  2. cytools-agent cytools-agent Public

    Tools for using CYTools with AI models

    Python 1

  3. latticepts latticepts Public

    For finding lattice points in convex polyhedra

    Python 1

  4. LiamMcAllisterGroup/cytools LiamMcAllisterGroup/cytools Public

    A software package for analyzing Calabi-Yau manifolds.

    Python 44 17