Layerwise linking-number topology probe
Implementation & benchmark of arXiv:2606.31856 — Low-dimensional topology of deep neural networks
Source paper: Low-dimensional topology of deep neural networks arXiv:2606.31856 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use linking number as a diagnostic and optional regularizer for representations of paired closed data manifolds. The probe identifies layers that collapse or separate class geometry through collisions and folds, giving an architecture-selection signal beyond loss and Jacobian singular values.
Formulas
Mathematical statement
For disjoint closed oriented manifolds $M^{m},N^{n}\subset\mathbb{R}^{d}$ satisfying $d=m+n+1$, the paper defines the higher-dimensional linking number by the degree of the Gauss map $G:M\times N\to\mathbb{S}^{d-1}$, $G(x,y)=(x-y)/|x-y|$: $\operatorname{lk}(M,N)=\deg(G)$. In the practical case $m=n=1,d=3$, $M$ and $N$ are oriented closed curves and the degree is an integer measuring how many times the pairwise displacement directions wrap around the sphere. For a network prefix $F_j$, evaluate $G_j(s,t)=\big(F_j(M(s))-F_j(N(t))\big)/\|F_j(M(s))-F_j(N(t))\|$ whenever the two image curves remain separated. A discrete estimate is obtained by triangulating the parameter torus $M\times N$ and summing signed spherical triangle areas divided by $4\pi$: $\widehat{\operatorname{lk}}_j=(4\pi)^{-1}\sum_{\tau}\operatorname{Area}_{S^2}(G_j(\tau))$. The invariant is integer-valued and non-smooth at collisions, so use it primarily as a layerwise probe; for training, add a margin penalty on minimum cross-curve distance or a soft squared error against a desired linking pattern.
Implementation notes
Use this as a layerwise representation probe first, and only then as an auxiliary loss. Construct two oriented closed polygonal curves from minibatch embeddings: for a toy benchmark, sample known linked and unlinked circles in $\mathbb{R}^{3}$; for real data, fit each class or subgroup with a closed principal curve and resample it at $K$ evenly spaced points. At selected layers $j$, obtain $P=F_j(M)\in\mathbb{R}^{K\times d}$ and $Q=F_j(N)\in\mathbb{R}^{K\times d}$, project to three coordinates with a fixed random orthogonal projection if $d>3$, and form the $K\times K$ Gauss-map grid $G_{ab}=(P_a-Q_b)/(\|P_a-Q_b\|+\epsilon)$. Split each parameter-grid cell into two triangles. Compute the signed spherical area of a triangle with unit vertices $u,v,w$ using $2\operatorname{atan2}(u\cdot(v\times w),1+u\cdot v+v\cdot w+w\cdot u)$, then sum areas and divide by $4\pi$. Use the rounded value only for logging; gradients should use the smooth separation term in $\mathcal{L}_{\mathrm{top}}$, because the integer degree changes discontinuously at collisions. Set $k_{ab}$ to the known toy link number or to a teacher-network measurement, and apply the loss only to selected class pairs. Estimate numerical reliability by doubling $K$ and checking that the rounded linking number is unchanged. First compare a width-3 plain MLP, explicit-fold ResNet, and invertible flow on linked/unlinked curve classification. Success is higher class accuracy or fewer layers at fixed accuracy, while the probe should reveal intentional changes in $\widehat{\operatorname{lk}}_j$ without frequent spurious changes caused by near-collisions.
Verification
This idea has not been verified yet.
Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.
Artifacts
Artifacts unavailable.