VSAVM

Controlled generation with closure gating

This page is a theory note. It expands the topic in short chapters and defines terminology without duplicating the formal specification documents.

The diagram has a transparent background and is intended to be read together with the caption and the sections below.

Related wiki pages: VM, event stream, context scope, bounded closure, LLM, macro-unit.

Related specs: DS004, DS010, DS011.

Overview

VSAVM does not treat generation as unconstrained continuation. “Generation” is split into two mechanisms:

Implemented today: rendering checked artifacts

The default path for answering is: execute → close → render. The renderer is intentionally simple and deterministic so it cannot “invent” facts.

  1. VM produces a result containing claims, mode (strict/conditional/indeterminate), and optional trace references.
  2. Claim gating selects which claims are allowed to be rendered (see GenerationService + ClaimGate.filterClaims).
  3. Deterministic rendering converts each claim into text lines (see ClaimRenderer).
  4. Mode adaptation prefixes or suppresses output in conditional/indeterminate modes (see ModeAdapter + UncertaintyMarker).
  5. Audit hint appends a minimal trace note when traces exist (see TraceExplainer).

DS011 continuation: macro-units + budgets + validation

DS011 defines an optional continuation loop built on macro-units: frequently occurring byte sequences discovered by compression (MDL). Macro-units are reversible: they expand deterministically into the original bytes.

The current implementation lives in src/training/outer-loop/macro-unit-model.mjs and is exercised by eval_tinyLLM. It is a byte-level model with:

Step-by-step continuation loop

  1. Collect context: take a bounded window of recent bytes (the prompt tail).
  2. Optionally encode VM state: compute a deterministic conditioning signature (see VMStateConditioner).
  3. Propose candidates: generate top-K macro-unit proposals (and keep a byte-level fallback).
  4. Validate candidates: if VM state is available, pass each proposal through ClaimGate.validateMacroUnit.
  5. Select next: choose the best remaining candidate under the decoding policy and budget.
  6. Append bytes and repeat until budget or stop condition ends the loop.

Budgets and “thinking more”

Budgets are explicit and user-controlled. Increasing a budget changes what the system is allowed to assert:

In both cases, budget is not a cosmetic knob: it is the horizon of the non-contradiction promise.

Why separators matter (DS010)

Controlled generation depends on scope boundaries. DS010 discovers structural separators so facts, rules, and continuations remain localized to the current structural region instead of bleeding across unrelated regions.

controlled-generation diagram
Generation is treated as proposal followed by verification: either render checked artifacts (default) or propose continuations that are budgeted and (when applicable) validated against VM claims.

References

Beam search (Wikipedia) Transitive closure (Wikipedia) Verification and validation (Wikipedia) Natural language generation (Wikipedia)