Verace Topos
Hamiltonian activation steering for language models with reversible leapfrog transport, invariant checks and verified distillation.
- Layer activation: Last-token activation, paired with a steering momentum
- Basin centre: The harmonic potential pulls the activation here
- Leapfrog transport: Half kick, drift, half kick, each step invertible
- Volume-preserving flow: Checked at every step by the invariant checker
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 , a steering momentum is attached to it, and the pair evolves under . 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 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
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.
System design v2
Design of record for a self-improving steering engine with absolute verification, a lock-free swarm and non-dispersive long-context memory.
System design v3
Architecture and requirements specification for a 33-subsystem production engine built around a symplectic steering core and a hierarchy of invariants.
Architecture and design levels
A five-layer, invariant-bounded design for reversible symplectic steering of a language model's residual stream, from math core to host interface.
V3 code
Invariant-checked Python subsystems built around a transformer KV cache with content-addressed paging and symplectic volume steering.
Core and v2 code
A symplectic activation steering engine, a 24-subsystem v2 suite with Z3 verification gates, and VFM-1 reversible model benchmarks.
Architecture
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.
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.
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.
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.
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.
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.
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.
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.
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.
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: , , . The map has and is reversed exactly by stepping from . The agent's steerer uses with the potential scaled by 0.05, which from gives only a small contraction .
- Quadratic steering potential
- , with defaults and . The harmonic term pulls the activation toward the basin centre , and the second term penalises the component along configured directions . The configuration caps kappa and lambda at 5.
- Invariant checks I1 to I5
- For each step the checker requires within tolerance (finite-difference floor 1e-4), that the inverse step recovers , an integer winding, zero gauge curvature, and wave-norm drift below , with default . A benchmark test requires 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 check sets status 'failsafe' and passes the original activation through unchanged rather than raising. Setup errors such asConfigErrordo raise. - SVD logic volume
- Hidden-state rows are normalised to unit length and mean-centred, and the volume is the mean singular value: . Invariant I6 requires . The code's docstring reports about 4x separation between fluent and collapsed GPT-2 text.
- PI-controlled counter-flow
- The controller fires when , with the margin raised by a factor of 1.5 on a spike. It computes and gain . The target adds times the mean row norm times a cosine basis applied to the lowest-variance right singular vectors, and is reached by a symplectic step with using at most 12 substeps.
- Instanton-action basin routing
- Each vacuum is scored by a bounce action . Soft mode weights basins by . Hard mode keeps the current basin unless , which prevents switching back and forth between basins.
- Monotonic strict-improvement promotion
- With defaults
max_generations20, andplateau_k3, the incumbent is replaced only when . A candidate blocked by the gate scores and counts toward the plateau. - Fréchet-direction bias baking
- A per-layer direction is found by contrasting verified and neutral activations. It is added permanently to the attention projection bias as . The strength 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 . 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 , where an allocation and its free cancel, and the audit passes when 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 with using a Ruth-Yoshida fourth-order symplectic scheme. Expansion stalls and reverses at , 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.
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.
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 problems, and they describe SFT as limited by an annotator ceiling and GRPO as exposed to soft-reward hacking.
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.
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.
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.
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.
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.
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 , 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: and . 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.