Research
Shortcut learning in geometric knot classification
Shortcut Learning in Geometric Knot Classification Authors: Djordje Mihajlovic (School of Mathematics and School of Physics and Astronomy, University of Edinburgh), Davide Michieletto (School of Physi
- arXiv
- 2602.17350
- Published
- 2026-02-19
- Authors
- Djordje Mihajlovic, Davide Michieletto
AI summary
Shortcut Learning in Geometric Knot ClassificationAuthors: Djordje Mihajlovic (School of Mathematics and School of Physics and Astronomy, University of Edinburgh), Davide Michieletto (School of Physics and Astronomy, University of Edinburgh; MRC Human Genetics Unit, Institute of Genetics and Cancer, University of Edinburgh; WPI-SKCM², Hiroshima University) arXiv: 2602.17350v1 [cs.LG], 19 Feb 2026 | License: CC BY 4.0
Overview
Research area: Machine learning applied to low-dimensional topology, specifically the classification of polygonal knots sampled from physical simulations, with connections to polymer physics and biophysics.
Technical level: Intermediate. The paper combines knot theory terminology (ambient isotopy, Reidemeister moves, writhe, Alexander polynomial) with standard supervised-learning practice, but explains both in accessible terms.
Scope: The paper argues that neural networks reporting near-perfect accuracy on knot classification tasks are exploiting non-topological geometric correlations in Molecular Dynamics (MD) training data, and introduces a diagnostic "shortcut probe" plus an open-source sampler (GEOKNOT) to generate geometrically unbiased knot datasets.
What This Paper Is About
Determining whether two closed curves are the same knot (equivalent under ambient isotopy) is an open mathematical problem: no known invariant uniquely classifies all knots. Because previous ML studies reported classification accuracies above 99% on polygonal knots, the authors ask whether those models learned topology or simply latched onto geometric quirks of the training data. They show that MD-generated knot datasets contain geometric features strongly correlated with knot type, and that removing those correlations (by sampling geometries more uniformly) collapses classifier accuracy.
Key Contributions
-
A diagnostic "shortcut probe" and shortcut index. The authors define an algorithm that computes the mutual information between candidate geometric functionals of a knot embedding and its knot label, then quantify reliance on those functionals through the shortcut index τ = m_a / m, the ratio of accuracy from models trained on flagged shortcut features to accuracy from models trained on untransformed data.
-
GEOKNOT, an open-source sampler for geometry-controlled knots. A Markov Chain Monte Carlo package that generates polygonal knot embeddings while explicitly biasing the sampler to explore broad, flattened distributions across geometric properties (total space writhe, average crossing number, long-range entanglement), rather than the narrow, energy-constrained distributions produced by MD.
-
A benchmark dataset designed to suppress non-topological shortcuts. Datasets of at least 1000 embeddings per knot class (unknot 0₁ and trefoil 3₁), each with 100 vertices, from two LAMMPS MD regimes (T = 1 and T = 10) and from GEOKNOT, enabling direct comparison of in-distribution and out-of-distribution performance.
-
Evidence that reported high accuracies are partly attributable to shortcut learning. MD-trained models reach above 99% accuracy within their own datasets but fall to roughly 50% (coordinate input) and roughly 70% (writhe matrix input) when tested on GEOKNOT embeddings.
Main Findings
-
MD datasets are geometrically narrow. Molecular Dynamics sampling at T = 1 and T = 10 produces confined distributions of total space writhe, average crossing number, and long-range entanglement for each knot class. The high-temperature distributions broaden but remain clearly separable between unknots and trefoils.
-
GEOKNOT datasets overlap across knot classes. For the same three geometric quantities, the GEOKNOT distributions are broad and overlap substantially between 0₁ and 3₁, meaning geometry alone carries little information about topology.
-
Mutual information exposes correlated features. On MD low-temperature data, the shortcut probe returns mutual information values of 0.65 (Σ₊, sum of pairwise distances), 0.69 (Ω₊, total space writhe), 0.57 (M, maximal pairwise distance), 0.53 (Π₁₀), and 0.45 (Π₂₀), with κ₊ (total curvature) at 0.02 and Π₅ at 0.083. On MD high-temperature data these fall to 0.45 (Σ₊), 0.47 (Ω₊), 0.28 (M), 0.25 (Π₅), 0.02 (Π₁₀), 0.05 (Π₂₀), 0.00 (κ₊). On GEOKNOT, all values are effectively zero (0.02, 0.03, 0.05, 0.01, 0.02, 0.01, 0.00 respectively).
-
Shortcut features alone can solve the low-temperature task. Models trained solely on the flagged shortcut probes reach 99.9% accuracy on MD low-temperature data, giving τ = 1.00. On MD high-temperature data the same probes give 83.1% accuracy versus 99.9% from coordinates and 96.7% from the writhe matrix (τ_coord = 0.83, τ_wr = 0.86).
-
GEOKNOT classification is poor across representations. Coordinate-based models reach 49.9% (approximately random for a two-class problem), writhe-matrix models 67.2%, and shortcut-probe models 62.3%. The authors omit τ_coord for GEOKNOT because the coordinate model accuracy is random, making τ uninformative in that regime; τ_wr is reported as 0.93.
-
Writhe dominates low-temperature decisions. A saliency analysis back-propagating the class score to the input shows that Ω₊ (total space writhe) influences the classification decision substantially more than any other feature on the low-temperature MD dataset.
-
Shortcut reliance is a property of model–dataset interaction. The authors state explicitly that the same architecture may or may not rely on shortcuts depending on their availability in the data, and that the shortcut index serves as a conservative lower bound on shortcut reliance for more complex models trained on similarly generated data.
Methodology in Plain English
The authors reduce the knot classification problem to a two-class task: distinguish the unknot (0₁) from the trefoil (3₁). They argue that any non-topological shortcut exploitable here would persist, and potentially compound, at higher crossing numbers.
They generate three datasets of at least 1000 embeddings per class with 100 vertices each. Two come from LAMMPS Molecular Dynamics simulations of bead–spring chains, initialised with KnotPlot, evolved with a Langevin equation under excluded-volume, bond, and angle potentials at timestep dt = 0.01 τ_LJ and sampled every 10⁷ dt = 10⁵ τ_LJ, run at T = 1 (matching prior literature) and T = 10 (to broaden exploration while preserving topology, checked via the Alexander determinant). The third comes from GEOKNOT, their lattice-based Monte Carlo sampler using BFACF moves for topology-preserving local updates, pivot moves for non-local rearrangement, and topology verification at every move via the Alexander polynomial (computed with KymoKnot) plus secondary checks using the second and third Vassiliev invariants. A final off-lattice displacement, controlled by a fixed random seed, produces the exported embedding.
To detect shortcuts, they compute candidate geometric functionals on each embedding — Σ₊, Ω₊, κ₊, M, and the peak-count functionals Πₙ — and estimate the mutual information between each functional and the label using Scikit-learn's non-parametric, k-nearest-neighbour entropy estimators. High mutual information flags features that are sufficient, within that dataset, to support classification.
Classifiers are simple feed-forward neural networks in PyTorch with 4 layers of 320 neurons, inputs flattened (coordinates as x₁, y₁, z₁, x₂, …, zₙ; matrices flattened row-wise), configurations centred on their centroid and scale-normalised, trained with Adam at a 10⁻³ learning rate, categorical cross-entropy loss, and He initialisation. The authors state this replicates the architecture of a prior study that classified up to 250 knot types at 95% accuracy. Data are shuffled with a chosen seed and split [train : val : test] = [0.8 : 0.05 : 0.15]. Two input representations are compared: raw 3D segment coordinates and the discretised space writhe matrix Ω_αβ.
Why This Matters
Impact on research. The paper reframes strong published knot-classification results as potentially the product of biased sampling rather than topological understanding. It supplies a reusable diagnostic (the shortcut probe and index τ), a controllable data generator (GEOKNOT), and a stated methodological distinction between "situationally powerful geometric probes" and genuine topological classification. The authors are careful to say they do not claim ML cannot learn knot topology — only that dataset construction must be examined first.
Real-world applications.
- Protein folding and function: knotted protein folds are tied to biological function, and geometric/topological motifs are hypothesised to be connected.
- DNA and polymer physics: knotted DNA moving through a porous gel during electrophoresis travels at a speed set by the volume the molecule occupies, which itself depends on topology.
- Magnetohydrodynamics and field systems: knotted field line configurations in plasmas fall under the same classification problem named in the abstract.
- Scientific machine learning practice: the shortcut probe generalises as a data-level audit for any scientific ML pipeline where the label correlates with a nuisance variable.
Industry relevance. Biotech and computational biology groups using ML on structural data benefit from knowing when a model is reading geometry rather than topology. Materials and polymer-modelling groups using MD to build datasets face the same sampling-bias trap. For ML practitioners, the paper is a case study in out-of-distribution evaluation and feature-importance auditing.
Future Directions
- Extend GEOKNOT to higher crossing numbers. The authors note that sampling becomes slower for more complex knot classes — an 11-crossing knot is sampled less efficiently than a 3-crossing knot due to higher rejection rates of topology-altering pivot moves — and that polynomial invariant computation is a bottleneck at scale.
- Adopt faster invariant computation. They point to recent work on parallel algorithms for computing Jones polynomials as a possible route past the scaling bottleneck.
- Explain the high-temperature residual accuracy. Shortcut probes account for the low-temperature MD result (τ = 1.00) but not the full 99.9% coordinate accuracy at high temperature, implying more complicated geometric functionals are at work there.
- Test topological-invariance explicitly. The truncated text introduces a section titled "Topologically invariant deformations reveal reliance of ML models on geometric shortcuts"; the outcome of that experiment and the paper's concluding Section IV are not present in the available content, so their results are not reported here.
Target Audience
Researchers at the intersection of machine learning and mathematics or physics — particularly those using neural networks on geometric data from Molecular Dynamics or Monte Carlo simulations. Knot theorists and polymer physicists evaluating ML claims about topology will find the diagnostic framing useful, as will ML practitioners interested in shortcut learning, dataset bias, and out-of-distribution generalisation in scientific domains.
Authors’ abstract
Classifying the topology of closed curves is a central problem in low dimensional topology with applications beyond mathematics spanning protein folding, polymer physics and even magnetohydrodynamics. The central problem is how to determine whether two embeddings of a closed arc are equivalent under ambient isotopy. Given the striking ability of neural networks to solve complex classification tasks, it is therefore natural to ask if the knot classification problem can be tackled using Machine Learning (ML). In this paper, we investigate generic shortcut methods employed by ML to solve the knot classification challenge and specifically discover hidden non-topological features in training data generated through Molecular Dynamics simulations of polygonal knots that are used by ML to arrive to positive classifications results. We then provide a rigorous foundation for future attempts to tackle the knot classification challenge using ML by developing a publicly-available (i) dataset, that aims to remove the potential of non-topological feature classification and (ii) code, that can generate knot embeddings that faithfully explore chosen geometric state space with fixed knot topology. We expect that our work will accelerate the development of ML models that can solve complex geometric knot classification challenges.