Programs as Singularities
Daniel Murfet, Will Troiani
TL;DR
The paper constructs a structure-preserving bridge between discrete Turing machines and the geometry of real-analytic singularities by embedding TM codes into a smooth parameter space of noisy codes and associating each TM with a germ $([M],L)$, where $L$ is the average negative log-likelihood. It then shows that the Taylor expansion of the accompanying polynomial $H$ encodes the combinatorics of error syndromes, linking local geometry to the internal structure of programs, and connects this to Bayesian inference via the local learning coefficient $ ext{RLCT}_{W_{[M]}}(K;oldsymbol{ ho})$ and Watanabe’s free energy framework. The work demonstrates how features of TM design—such as runtime error correction and control-flow modularity—shape the Hessian and the spectrum of $H$, with explicit analysis on the detectA family illustrating nondegenerate and degenerate directions that reflect internal structure. A central takeaway is a philosophical shift toward structural Bayesianism: the posterior distribution not only selects for predictive accuracy but also for internal algorithmic organization, suggesting a principled path toward interpretability in singular models and neural networks alike.
Abstract
We develop a correspondence between the structure of Turing machines and the structure of singularities of real analytic functions, based on connecting the Ehrhard-Regnier derivative from linear logic with the role of geometry in Watanabe's singular learning theory. The correspondence works by embedding ordinary (discrete) Turing machine codes into a family of noisy codes which form a smooth parameter space. On this parameter space we consider a potential function which has Turing machines as critical points. By relating the Taylor series expansion of this potential at such a critical point to combinatorics of error syndromes, we relate the local geometry to internal structure of the Turing machine. The potential in question is the negative log-likelihood for a statistical model, so that the structure of the Turing machine and its associated singularity is further related to Bayesian inference. Two algorithms that produce the same predictive function can nonetheless correspond to singularities with different geometries, which implies that the Bayesian posterior can discriminate between distinct algorithmic implementations, contrary to a purely functional view of inference. In the context of singular learning theory our results point to a more nuanced understanding of Occam's razor and the meaning of simplicity in inductive inference.
