arXiv:2608.28541cs.LGAug 2026

Manuscript Offprint

arXiv:2608.28541

An Enclosed Mode Is a Gauge Choice: Topology Relative to Reach in Certified Code World Models

Javier Aguilar Martín

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

A code world model accepted by a sampling gate can be exactly right on everything the gate can see and arbitrarily wrong beyond it. We characterize what a certified model can know — and what its errors can cost — when the omitted structure is a topologically nontrivial region: an annular freeze mode enclosing an unreachable interior. The gate quotient makes the question precise: acceptance-with-certainty determines the model exactly up to the reachable query set, so everything beyond reach is gauge. On a minimal ring instrument we prove the extreme case — a wrong-topology filled-disc artifact is unfalsifiable by any sampling gate and bitwise harmless at play — and measure, with real large-language-model (LLM) synthesis across three model families, how a single knob (an angular channel of width γ\gamma) walks the same artifact through three regimes: unfalsifiable-and-harmless, falsifiable-and-costly, and instantly falsified. Three principles organize the empirics. First, danger is topology relative to reach, not topology: opening a channel the planner can use collapses the blind model's exploitation (play_cost 1.09→∼01.09 \rightarrow \sim 0 over a knee at γ≈0.1\gamma \approx 0.1), while a hidden channel with the same first Betti number keeps it at full strength (1.12). Second, repair is parameter-bound and sensor-bound: from outside evidence no family recovers the region (superstitious point fits); from inside, models pose the right topology but cannot pin its parameters to the gate's precision — and the persistent-homology summary that guides them has a measurable, geometric rather than budgetary resolution limit, and the posed topology tracks that summary's wrong β^1\hat{\beta}_1 rather than the truth. Third, mitigation must match the dimension and direction of the model's error: point distrust-fences, a zero-dimensional cover, fail against the one-dimensional closed boundary at their calibrated radius, while a fence matched to the boundary's dimension and persisted across episodes collapses the exploitation to a two-lesson transient (play_cost 0.999→0.0580.999 \rightarrow 0.058, truth-equal returns from the second episode on). Against an invented mode every fence fires constantly and recovers nothing, and the dual certificate (freedom points that locally un-freeze imagination where the model was refuted as too pessimistic) collapses that failure symmetrically ( 1.769→0.0291.769 \rightarrow 0.029): the two wrongnesses need opposite defenses, each priced by its failure's lie rate. In n dimensions the enclosing shell makes the identifiability event near-certain ( r(n)→0r(n) \rightarrow 0) while the danger stays fully exploitable — rarity and reachability are independent knobs of the danger law.

1 Introduction

In the Code World Model (CWM) paradigm, a language model synthesizes an executable world model that a classical planner searches, and the model is accepted when it reproduces sampled transitions. Two companion papers established that this gate certifies the wrong thing, following a quantitative law, danger = play_cost × (1 - rarity) N^{N}: in discrete games (Aguilar Martín, 2026b), and in continuous hybrid systems, where an omitted mode is a rare rule and the danger collapses to pure identifiability (Aguilar Martín, 2026a). The continuous paper ended on a sharpened negative:

repair-from-data is geometry-dependent, and its two ablations located the mechanism in a template prior — the synthesizer selects low-descriptive-complexity region forms (1D thresholds, radial balls) instead of inducing the boundary, flattening curves and curving flats alike. Curvature is not the axis. This paper takes up the axis that survived: topology — and shows that the right formulation is not the topology of the mode but its topology relative to what the certifying process and the planner can reach.

Why an enclosed mode? Because it is the minimal setting where the certification question and the topology question are the same question. An annular freeze band — a fence with an inside — is the simplest region whose defining feature, the hole, is invisible from one side: every trajectory that approaches from outside stops at the outer wall, and whether anything is behind it is, in a sense this paper makes exact, not a property of the data at all. Fences, containment shells, and geofenced no-go regions are the practical shape of safety-critical hybrid modes; a certification pipeline that cannot distinguish a fenced void from a fenced hazard — or a fence from a filled wall — is certifying less than it appears to. The question is what the gate's acceptance actually pins down, and the answer turns out to be geometric: everything up to reach, nothing beyond it, with the boundary between the two movable by knobs that never touch the mode's own physics.

The instrument is deliberately minimal (Section 2): a 2D thrust-and-drag plant with an annular freeze band (inner radius 3.5, outer 5.0) wrapping a high-reward “phantom” lode, with three pre-registered knobs — an angular channel of width γ\gamma (closed ring at γ=0\gamma = 0), the channel’s orientation (facing the start or hidden behind the lode), and the start side (outside or inside the hole). Everything the paper claims follows from what these knobs do to the reachable query set R.

References (29)