arXiv:2609.31152cs.MSSep 2026

Manuscript Offprint

arXiv:2609.31152

KnottedGraph: Scalable knotted-graph topology for scientific and mathematical discovery

Hakan Akgün, Xianquan Yan, Kehan Liu, Zhaoyun Chen, Ching Hua Lee

Hakan Akgün 1,∗^{1,*}, Xianquan Yan 1,2^{1,2}, Kehan Liu 1^{1}, Zhaoyun Chen 1^{1}, Ching Hua Lee 1,†^{1,\dagger}

1^{1}Department of Physics, National University of Singapore, Singapore 117551, Singapore

2^{2}Department of Computer Science, National University of Singapore, Singapore 117417, Singapore

Scientific data span heterogeneous structures, including coordinates, networks, surfaces, volumes and fields, yet their topology can be quantified within a common framework through graph connectivity, cycle structure, genus and spatial embedding. Graph- and homology-based summaries do not determine spatial embedding, while standard knot and link polynomials require extensions to accommodate branching graphs. Here, we introduce KnottedGraph, a computational framework that converts such scientific representations to knotted graphs that retain graph connectivity and spatial embedding together. It constructs projected diagrams and PD codes, enabling various topological analyses, including Yamada-polynomial evaluation for topological classification. For scalable exact evaluation, it combines partial resolutions that leave the same unresolved connections and optimizes their processing order; the resulting algorithm is verified against published topological invariants of knotted graphs with up to 500 crossings. This scalability enables us to introduce an LLM-assisted mathematical-discovery methodology, in which computational topological data generated across knotted-graph families are used to identify candidate closed-form formulas. With this approach, we identify analytical Yamada-polynomials for generic graph motif families exhibiting Abelian and non-Abelian word sequences. Together, these scalable capabilities make knotted-graph topology computationally accessible across scientific domains, enabling large-scale classification and introducing a route from topological data to LLM-assisted AI4Math discovery.

Introduction

Many systems in biology, materials science and physics are governed by graph connectivity and spatial embedding. Examples include biomolecular backbones [1, 2] (Fig. 1a), vascular [3] and neuronal networks [4] (Fig. 1b), polymers [5, 6] (Fig. 1c), engineered spatial networks [7, 8] (Fig. 1d), Hamiltonian-derived geometries [9–14] (Fig. 1e) and vector flow curves [14, 15] (Fig. 1g). Their physical origins differ, but the computational question is the same when underlying topology matters: the representation must retain graph connectivity and spatial embedding, i.e., edge over/undercrossing information.

Graph connectivity and homological quantities capture abstract topological structure [16–18], but do not in general determine the ambient-isotopy class of a spatial graph [19, 20]. Classical knot and link polynomials are sensitive to embedding, but their standard definitions apply to knots and links [21–24], and extensions are required to accommodate branching graph connectivity [25]. On the other hand, knotted graphs 1^{1} retain both types of information, graph connectivity and spatial embedding, in the same object and can be distinguished using their associated invariants [19, 20, 25], one of the most prominent being the Yamada polynomial [25, 26].

Previous work has established the usefulness of knotted-graph descriptions and invariants in polymer systems, engineering design and condensed-matter physics [5, 8, 14]. Extending these analyses across heterogeneous scientific data requires a common knotted-graph representation and scalable invariant evaluation. Explicit curves and networks can enter this representation directly, whereas surfaces and volumes require construction of the corresponding spatial graph while preserving graph connectivity and three-dimensional edge geometry, including candidate graph spines when a handlebody–spine description is appropriate [27, 28]. The resulting knotted graph can then be projected to a planar diagram retaining graph vertices, projection crossings and edge over/undercrossing information [8, 19, 20], converted to PD encoding [6, 29], and evaluated through the Yamada polynomial [25, 26]. Here, we introduce a computational framework that integrates these stages and makes the invariant calculation scalable enough for repeated analysis across derived datasets, parameter sweeps and mathematically generated graph families, while supporting additional analyses including vector-flow characterization [14], repulsive-curve preconditioning [30] and parameter-space analysis [14].

For embedding-sensitive topological analysis at scale, one important algorithmic bottleneck is Yamada evaluation [25, 26]. Our algorithm combines resolutions whenever they leave the same unresolved connections and orders local operations to keep the number of simultaneously unresolved arc ends small. On the structured published families in Refs. [32, 33], this allows us to reproduce the known formulas of spatial graphs with up to 500 crossings. This efficiency enables repeated invariant evaluation across scientific parameter spaces and algorithmically generated graph families, where exact topological invariants can also serve as data for mathematical discovery.

Recent advances in AI-assisted mathematics have rapidly expanded evaluation-guided search, mathematical construction and machine-verifiable reasoning across increasingly challenging research settings [34–39]. In structured spatial-graph families, Yamada-polynomial formulas are traditionally derived analytically from the family construction, for example using recurrence or transfer-matrix methods [32, 33, 40]. Such derivations are generally family-specific and are not automatically inferred from computed invariant data. Here, we introduce an LLM-assisted mathematical-discovery methodology in which Yamada values are generated computationally, used to identify candidate family relations, converted to explicit symbolic forms and tested on additional family members. Our framework thereby extends this emerging direction to exact topological-invariant data and the reconstruction of interpretable algebraic structure across knotted-graph families.

More broadly, the framework opens several directions beyond the results developed here: embedding-sensitive analysis across scientific parameter spaces; extension from handlebody

*hakan.akgun@u.nus.edu

†^{\dagger}phylch@nus.edu.sg

1^{1}Following the terminology of our companion work [14], we use knotted graph and spatial graph synonymously throughout this work, with spatial graph retained where conventional mathematical terminology is useful.

(a) Biomolecular backbones

PDB / mmCIF

(b) Neural & vascular networks

SWC / NPY / NPZ

Figure

(c) Polymer structures

GRO / LAMMPS dump

(d) Engineering spatial networks

CSV / JSON / GraphML

Figure

(e) Hamiltonian-derived spatial graphs

Hamiltonian / JSON / NPZ

Figure

(f) Surface & volume skeletons

OBJ / OFF / PLY / STL

VTK / VTP / NPY / NPZ

(g) Oriented fields & flows

NPY / NPZ

(h) Mathematical spatial graphs

CSV / JSON / GraphML

Figure

Figure

Heterogeneous

Scientific

Inputs

Knotted/

Spatial

Graphs

Projection/PD

Representations

Topological

Analysis

Fig. 1 | Heterogeneous scientific geometry is brought to one knotted-graph representation. (a) Biomolecular backbones, represented by the Cα trace of chain A of 1IPA [31], from the RCSB Protein Data Bank [1, 2]; (b) neuronal and vascular morphologies [3, 4]; (c) polymer configurations [5, 6]; (d) engineered node–edge networks [7, 8]; (e) Hamiltonian-derived level-set or occupied-region geometry [9–11, 14]; (f) a volumetric regular-neighborhood input and a candidate graph spine [27, 28]; (g) vector field curves [15]; and (h) mathematical spatial graphs [19, 20]. The bottom workflow summarizes the common analysis path from heterogeneous scientific inputs to knotted/spatial graphs, projection/PD representations and topological analysis. Format labels in panels (b), (d) and (h) describe source data, not necessarily direct adapter inputs: SWC, GraphML and arbitrary graph-JSON records are converted externally to paired node–edge CSV before use (Supplementary Table 1).

spines to more general volumetric topologies; implementation of additional knot, link and spatial-graph invariants, including the Alexander, Jones and HOMFLY–PT polynomials [21–23]; and LLM-assisted mathematical discovery across broader structured families, including braid words, tangles, satellite operations and other recursive constructions [40–43]. Together, these directions connect scalable embedding-sensitive topological analysis with a general route from exact invariant data to automated mathematical formula discovery.

References (70)