Skip to content
Systems, agents and memoryExperiments

Verace Topos

Hamiltonian activation steering for language models with reversible leapfrog transport, invariant checks and verified distillation.

Verace Research·September 1 to September 2, 2026
  1. Layer activation: Last-token activation, paired with a steering momentum
  2. Basin centre: The harmonic potential pulls the activation here
  3. Leapfrog transport: Half kick, drift, half kick, each step invertible
  4. Volume-preserving flow: Checked at every step by the invariant checker
Figure 1. Reversible leapfrog steering of an activation in phase space. Schematic: in Verace Topos a layer activation and its steering momentum are stepped by leapfrog transport toward a target basin. Each step preserves phase-space volume and can be reversed exactly.
Open the simulator on its own pageA pendulum stepped two ways: an interactive toy model of the principle. You can also try it below

Overview

Verace Topos is a steering engine for transformer language models. It edits a model's internal activations while the model generates text, and it treats that edit as motion in a phase space rather than as a vector added once. The activation is the position qq, a steering momentum pp is attached to it, and the pair evolves under H=12∥p∥2+U(q)H = \frac{1}{2}\|p\|^2 + U(q). The question is whether an edit can shift a model's behaviour while staying reversible, auditable and checkable against explicit invariants, and whether checked reasoning traces can then be written permanently into the weights.

The engine has five layers, and each depends only on the layers below it: a pure mathematics core, the steering engines, a runtime that schedules per-layer interventions, backend adapters, and a host interface. A per-layer pipeline routes the activation to a target basin, computes a direction, transports the state with a symplectic integrator, verifies invariants I1 to I5, and appends an inverse record to a reversibility ledger. A second generation adds Dynamic Symplectic Steering, which keeps a singular-value logic volume above a floor; a formal verification gateway built on Z3, an SMT solver from another organisation; a sandbox with a sanitizer differential fuzzer; a swarm orchestrator; and a distillation loop. A third generation extends this to 33 subsystems behind a constitutional gate called I0.

The implementation hooks GPT-2, a pre-trained language model from another organisation, through a HuggingFace adapter and steers it with contrastive profiles. The test records for the second generation report 83 passing tests at 93% coverage, and an earlier record reports 71 at 94%. The lab's experiments report native GPT-2 reasoning accuracy rising from 0% to 10 to 15% after verified trajectories were baked into attention projection biases. They also report the distillation loop matching GRPO at 33.3% with zero human labels while SFT scored 0% with 24 labels, on only n=3n = 3 problems. A swarm run of 288 branches had 222 refuted by Z3, 60 killed by the fuzzer, and contention 0.

The steering core, the invariant checkers, the ledger, the logic-volume controller, the Z3 gateway and the distillation pipeline are implemented and tested on GPT-2 on CPU. Several parts exist only as reference stubs behind fixed contracts. The KdV soliton integrator and the holographic pager are stubs. The Wilson-loop pointer audit runs on scripted allocation events. The Z3 proofs used by the agent are fixed binomial identities. One benchmark compares against simulated baselines. The 16/16 held-out result relies on a regime that mostly returns expected answers. The claimed 8x KV-cache memory saving and the scaling slope of accuracy with compute are not demonstrated.

Status

Experiments. Steering, verification and distillation code exists with test suites and recorded GPT-2 runs, while the lab's own audit marks several subsystems as stubs and several claims as not demonstrated.

Simulator

A pendulum moves through its phase space: angle across, momentum up. Step it with a method that can be run backwards and with one that cannot, and drag its start.

  • across: angle · up: momentum
Energy at the start
0.368
Energy at the end
0.368
Change in energy
0.000
Returns to its start run backwards
Yes
How each step is taken

Switch to Euler with the same step: the trajectory spirals off its curve and cannot be run back. Drag the ring, or tap the plane, to start elsewhere.

This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.

In depth

Each of these pages goes through one part of the work in detail.

Architecture

  1. Mathematics core

    Pure, backend-agnostic functions: symplectic integrators, spectral projectors, natural-gradient solves, sheaf gluing, instanton action and the invariant checkers. An import-linter rule in CI keeps it free of model libraries.

  2. Symplectic steering engine

    Moves a layer's last-token activation along a reversible, volume-preserving leapfrog flow toward a target basin. For each step it emits the record needed to invert it.

  3. 5D instanton router

    Projects the activation into a five-dimensional frame built from the basin centroids. It selects a target vacuum, either as a hard choice or as soft weights.

  4. Runtime engine and ledger

    Builds the intervention plan, attaches and detaches model hooks, runs the per-layer schedule and emits telemetry. It also keeps an append-only ledger of inverse records for audit and replay.

  5. Dynamic Symplectic Steering

    A controller that measures the spread of hidden-state directions as a logic volume. When the volume falls below a floor, it injects symplectic counter-flow to prevent representational collapse.

  6. Formal Verification Gateway

    Sends claims to a Z3 SMT, property or dual-oracle backend. It returns PROVED, REFUTED or UNKNOWN with a hashed certificate, and it blocks output on a critical UNKNOWN.

  7. Execution sandbox and differential fuzzer

    A userspace subprocess sandbox with resource limits and no network access. It compiles C++ candidates with address and undefined-behaviour sanitizers and compares their output against a reference binary.

  8. Distillation loop

    Computes steering directions from verified trajectories, bakes them into GPT-2 attention projection biases, and promotes a candidate only on strict held-out improvement.

  9. Topos KV cache

    A drop-in key-value cache that offloads old token chunks to a content-addressed store tagged with a geometric signature. It recalls blocks by query geometry and applies the volume floor to the keys.

  10. Constitutional gate I0

    A fail-closed check called before consequential actions in governed subsystems. It matches action and intent text against keyword lists for prohibited domains and raises an error on denial.

Implementation

Mechanisms as they are implemented in the source code, with the constants the code uses.

Störmer-Verlet leapfrog transport
A half-step momentum kick, a full position drift and a second half kick: p1/2=p+h2F(q)p_{1/2} = p + \frac{h}{2}F(q), q′=q+hmp1/2q' = q + \frac{h}{m}p_{1/2}, p′=p1/2+h2F(q′)p' = p_{1/2} + \frac{h}{2}F(q'). The map has det⁡J=1\det J = 1 and is reversed exactly by stepping from (q′,−p′)(q', -p'). The agent's steerer uses dt=0.02dt = 0.02 with the potential scaled by 0.05, which from p=0p = 0 gives only a small contraction q′=q(1−0.5 dt2⋅0.05)q' = q(1 - 0.5\,dt^2 \cdot 0.05).
Quadratic steering potential
U(q)=12κ∥q−μ∥2+12λ⟨q,v^⟩2U(q) = \frac{1}{2}\kappa\|q - \mu\|^2 + \frac{1}{2}\lambda\langle q, \hat v\rangle^2, with defaults κ=1\kappa = 1 and λ=0\lambda = 0. The harmonic term pulls the activation toward the basin centre μ\mu, and the second term penalises the component along configured directions v^\hat v. The configuration caps kappa and lambda at 5.
Invariant checks I1 to I5
For each step the checker requires ∣det⁡J−1∣|\det J - 1| within tolerance (finite-difference floor 1e-4), that the inverse step recovers qq, an integer winding, zero gauge curvature, and wave-norm drift below ϵ\epsilon, with default ϵ=10−6\epsilon = 10^{-6}. A benchmark test requires ∣det⁡J−1∣≤10−7|\det J - 1| \le 10^{-7} and a forward-then-reverse error of at most 1e-10.
Fail-safe step envelope
Every intervention returns a StepResult. A non-finite value or a failed det⁡J\det J check sets status 'failsafe' and passes the original activation through unchanged rather than raising. Setup errors such as ConfigError do raise.
SVD logic volume
Hidden-state rows are normalised to unit length and mean-centred, and the volume is the mean singular value: V=mean(svd(Hn−Hˉn))V = \mathrm{mean}(\mathrm{svd}(H_n - \bar H_n)). Invariant I6 requires V≥0.15V \ge 0.15. The code's docstring reports about 4x separation between fluent and collapsed GPT-2 text.
PI-controlled counter-flow
The controller fires when V<vmin⁡⋅1.2V < v_{\min} \cdot 1.2, with the margin raised by a factor of 1.5 on a spike. It computes e=vmin⁡−Ve = v_{\min} - V and gain g=max⁡(0.6e+0.1∫e,0.05)g = \max(0.6e + 0.1\int e, 0.05). The target adds gg times the mean row norm times a cosine basis cos⁡(πm(i+12)/b)\cos(\pi m(i + \frac{1}{2})/b) applied to the lowest-variance right singular vectors, and is reached by a symplectic step with dt=0.3dt = 0.3 using at most 12 substeps.
Instanton-action basin routing
Each vacuum is scored by a bounce action SS. Soft mode weights basins by e−S/Te^{-S/T}. Hard mode keeps the current basin unless Scur−Sbest≥0.1S_{\mathrm{cur}} - S_{\mathrm{best}} \ge 0.1, which prevents switching back and forth between basins.
Monotonic strict-improvement promotion
With defaults max_generations 20, ϵ=10−3\epsilon = 10^{-3} and plateau_k 3, the incumbent is replaced only when s>sinc+ϵs > s_{\mathrm{inc}} + \epsilon. A candidate blocked by the gate scores −∞-\infty and counts toward the plateau.
Fréchet-direction bias baking
A per-layer direction vv is found by contrasting verified and neutral activations. It is added permanently to the attention projection bias as b′=b+βvb' = b + \beta v. The strength β\beta is chosen by the distillation loop, with the unbaked model as the incumbent on a held-out split.
Z3 and sanitizer dual filter
A branch survives only if Z3 proves its deduction, meaning the negation is unsat, and its binary built with address and undefined-behaviour sanitizers matches the reference on every fuzz input. Z3 checks the logic, and the fuzzer catches memory errors that Z3 does not see.
Chunked KV offload with geometric recall
The active window is held to at most 16 chunk tokens plus 16 pinned recent tokens. The oldest chunk is offloaded as raw float32 bytes with a 16-dimensional signature, and the top-k blocks are recalled by query geometry and prepended. The store addresses blocks by SHA-256, compresses them with zstd, and deduplicates them by reference count.
Soliton wave memory buffer
Each layer holds a complex field of 64 points. Every token write injects a sech packet of width 4 and the field is evolved by a focusing nonlinear Schrödinger step with dt=0.1dt = 0.1. A write that changes the L2 norm by more than 1e-6 is rejected under I5, and the position invariance of the KdV signature is asserted rather than simulated.
SU(2) Wilson-loop pointer audit
Pointer events multiply U=∏kexp⁡(iak⋅σ)U = \prod_k \exp(i a_k \cdot \sigma), where an allocation and its free cancel, and the audit passes when W=12Re Tr U≈1W = \frac{1}{2}\mathrm{Re}\,\mathrm{Tr}\,U \approx 1 within 1e-4. Callers record an allocation and a free immediately before the audit, so the trace is always safe and is not tied to the compiled program's real heap behaviour.
Holonomy-corrected bounce solver
A loop quantum cosmology module integrates a˙=−4πG3apa(1−ρ/ρc)\dot a = -\frac{4\pi G}{3a}p_a(1 - \rho/\rho_c) with ρc=0.41\rho_c = 0.41 using a Ruth-Yoshida fourth-order symplectic scheme. Expansion stalls and reverses at ρc\rho_c, so the solution bounces instead of reaching a singularity. A Weyl entropy term must vanish at critical density within 1e-6.

Results

From the lab's own experiments and records. They have not been independently replicated.

  1. Baking verified trajectories lifts native GPT-2 accuracy

    The lab's experiments report that GPT-2 native reasoning accuracy rose from 0% to 10 to 15% without runtime steering, after verified trajectories were baked into attention projection biases.

  2. Distillation loop matches GRPO with zero labels

    In a comparison against SFT and GRPO that edited the same three attention biases under the same verified problem budget, the evaluation records report that the distillation loop matched GRPO at 33.3% with zero labels, while SFT scored 0% with 24 labels. The records state that the comparison covers only n=3n = 3 problems, and they describe SFT as limited by an annotator ceiling and GRPO as exposed to soft-reward hacking.

  3. Dual filter pruned most swarm branches

    In one recorded swarm run of 288 branches, Z3 refuted 222 and the sanitizer fuzzer killed 60, with 0 contention recorded.

  4. Invariants hold while overdriven steering degrades text

    In the calibrated GPT-2 steering demonstration, an overdriven case recorded as risk R-2 degrades the generated text while every geometric invariant still passes. The invariant checks therefore do not certify output quality.

  5. Distilled model memorised rather than generalised

    The lab's audit found that the distilled GPT-2 scored 100% on training items but 0 of 16 held-out items. The full hybrid engine scored 16/16, but the evaluation code shows that this regime mostly returns hardcoded or expected answers.

  6. Accuracy scaling slope not demonstrated

    The lab's records show monotonic behaviour and linear prune yield, but they state that an accuracy-proportional slope with distillation depth and swarm width could not be shown on the small corpus.

  7. Several verification paths are scripted or simulated

    The lab's code reading found that the Wilson-loop audit runs on scripted allocation events, the agent's Z3 proofs are fixed binomial identities, and one benchmark's baselines are generated from formulas or random draws. It also found that the logic-volume loss penalty has no gradient path.

  8. Cosmological bounce keeps scale factor positive

    The loop quantum cosmology solver records a minimum scale factor of 1.1542, which satisfies the singularity-avoidance invariant I11.

Concepts

Activation steering
Changing a model's behaviour at inference time by editing hidden activations in chosen layers, without retraining. Here the edit direction comes from contrasting activations on positive and negative prompts.
Symplectic integration
A numerical scheme for Hamiltonian systems that preserves phase-space volume, so det⁡J=1\det J = 1, and is time-reversible. The engine uses it so that every steering step can be inverted and audited.
Steering profile
An immutable behaviour artifact holding per-layer directions, basins, metrics and a routing frame in SafeTensors, plus a JSON sidecar pinned to one model. It is identified by a content hash.
Reversibility ledger
An append-only log of each step's inverse parameters, namely layer, token, time step and substeps. It allows a steered session to be replayed in reverse and audited.
Logic volume and collapse
A measure of how widely hidden-state directions spread. The design specification links a falling volume to repetition collapse, which was observed when naive steering was applied to GPT-2 on hard prompts.
Proof by unsat negation
A claim P counts as proved only when the SMT solver finds its negation unsatisfiable. A satisfying model is returned as a counterexample.
Zero-human-data distillation
A loop that generates problems, explores steered solution paths with a swarm, keeps only those that pass Z3 and the fuzzer, and bakes their directions into weights. No human labels are used.
Verification integrity principle
The design rule that only Z3 and the differential fuzzer may decide whether a weight change is accepted. Soft scores may rank candidates but never gate updates.
Fail-safe versus fail-closed
A failed invariant passes the original activation through, while a failed constitutional check blocks the action. An SMT timeout on a critical claim rejects the output.
Lock-free swarm via relational clocks
Each agent carries a relational phase and synchronises only at points of agreement, using single-writer slots and a separate Z3 context per worker. The swarm invariant I8 requires zero contention and zero deadlocks.
Lost-in-the-middle memory triad
The design pairs soliton wave memory, block paging in a content-addressed store and the volume floor, so that recall of distant context does not degrade. In the current code the soliton integrator and the pager are stubs.
Reversible two-stream coupling
A RevNet-style block in the reversible foundation-model experiments: y1=x1+Attn(x2)y_1 = x_1 + \mathrm{Attn}(x_2) and y2=x2+FFN(y1)y_2 = x_2 + \mathrm{FFN}(y_1). It is designed to avoid caching activations: the backward pass reconstructs the inputs and backpropagates locally. In the lab's parameter-matched benchmark it roughly halved the slope of activation memory, 38.4 against 76.1 MB per layer, rather than removing its growth with depth, and the same benchmark records a validation perplexity of 357.78 against 232.16 for the baseline.
Invariant taxonomy
A numbered set of guarantees. I1 to I5 cover the geometry of steering, I6 the volume floor, I7 the proof gate, I8 swarm concurrency, and later entries cover thermal budget, isolation, cosmology and other subsystems. Each is tied to a checker.

About this page

Written from the lab's own documents and source code. Figures and results are the lab's measurements as it recorded them at the time, and have not been independently replicated.

Published under the PolyForm Noncommercial License 1.0.0: free for noncommercial use.