# FormJEPA: Non-Collapse Canonical Program World Models, Federated Training, and Closed-Loop Actuator Verification

- **Study ID:** `rce-form-jepa`
- **Kind / Status:** Research study · open topic
- **Revision:** `058c0f3e` (30 November 2026)
- **Web Edition:** https://research.openie.dev/papers/rce-form-jepa/
- **Markdown Twin:** https://research.openie.dev/papers/rce-form-jepa.md
- **PDF Edition:** https://research.openie.dev/pdfs/rce-form-jepa.pdf
- **Interactive Figures:** https://research.openie.dev/constellation/
- **Claim Scope & About:** https://research.openie.dev/about/rce-form-jepa/
- **Data & Reproducibility:** https://research.openie.dev/data/#rce-form-jepa
- **Keywords:** FormJEPA, joint embedding predictive architecture, VICReg, federated learning, program synthesis, De Bruijn representation, MuJoCo, ISO/TS 15066, Reality Code Engine

> Trains and audits a two-level Joint-Embedding Predictive Architecture (HierFormJepa and RepoFormJepa in openIE-dev/rce) over identifier-free De Bruijn program representations and deterministic execution traces using VICReg regularization and a momentum EMA target encoder. Across a 4-node heterogeneous Federated Averaging run (Apple M5 Max IOReport 0.950 J reported_j, Framework AMD Ryzen AI Max+ 395 RAPL 3.007 J reported_j, NVIDIA Jetson AGX Thor, and Windows 11 Intel Core i7; 480 training pairs), holdout evaluation on 96 unseen specifications achieves singular-value effective rank 23.99 of 24.0, minimum per-dimension standard deviation 0.2737, 97.92% regime recall, 96/96 replay-and-EARS-verified whole-program syntheses, and 0 escaped false admissions. Extends to 35/35 multi-function polyglot call-graph modules (0.0 drift across Rust, Python, and C renames), 1,280/1,280 (100.0%) capability-sandboxed standard-library G0 operations (1,279/1,280 unprivileged), TI INA3221 physical DC rail shunt measured_j on NVIDIA Jetson AGX Thor (9.17 nJ net dynamic / 0.164 uJ gross per G0 lookup vs 0.357 J net dynamic / 3.619 J gross per cold RepoFormJepa synthesis = 38.9M x dynamic reduction, 4/4 Falsifier 6 PASS; TI INA238 carrier shunt reported separately), and 500 Hz closed-loop MuJoCo 4.0.1 simulation-in-the-loop actuator verification (4/4 episodes converging within 0.48 mm under 6.90 N peak force and 8,625 Pa peak pressure, recovering dt = 0.002 s). Plain words: strip variable names away first, steer program search in structural space without decoding latents blindly, verify every candidate by running it against examples, and store accepted solutions as microjoule table lookups.

---
*revision [`058c0f3e`](https://github.com/openIE-dev/research-openie-web/commits/main/src/content/papers/rce-form-jepa.md), 30 November 2026. Public reference implementation: [openIE-dev/rce](https://github.com/openIE-dev/rce) at commits `8efcd0b0` and `258cbb11` (`competence-catalog`: `src/form_jepa.rs`, `src/repo_jepa.rs`, `src/hil_mujoco.rs`, `src/runtime.rs`, `src/energy.rs`, `data/thor-ina3221-shunt-receipts.json`, and `assets/mujoco/rce_actuator_cell/model.xml`). Companion studies and interactive map: [The Reality Code Engine](https://research.openie.dev/papers/rce/), [World Coding](https://research.openie.dev/papers/rce-jepa/), and [The Language Constellation](https://research.openie.dev/constellation/) (`270 / 270` grammar-measured languages at `100.0%` named-node coverage across `12,117` catalogued languages).*

## Abstract

Most neural code generators map surface tokens to surface tokens, requiring a learned model to rediscover variable-renaming equivalence, syntactic punctuation, and forward execution semantics from text corpora. This study evaluates an alternative division of labor inside the Reality Code Engine (RCE) competence substrate: because the forward execution semantics of the target intermediate representation is deterministic and executable, a learned model only needs to steer inverse search in a canonical, identifier-free representation space while a deterministic replay and specification gate decides admission.

The reference implementation (`HierFormJepa` and `RepoFormJepa` in `competence-catalog`) couples a two-level Joint-Embedding Predictive Architecture (regime classifier plus continuous latent predictor) with Variance-Invariance-Covariance Regularization (`VICReg`) and an exponential moving average (`EMA`) target encoder ($\tau = 0.96$). Latents rank and parameterize candidate templates and counterexample-guided synthesis loops; latents are never decoded directly into unverified text. Across a 4-node heterogeneous federated averaging (`FedAvg`) run over 480 training pairs and 96 held-out specifications spanning 8 algorithmic regimes, the global model maintains singular-value effective rank `23.99 / 24.0`, minimum per-dimension standard deviation `0.2737`, `11.0x` mean energy separation between positive and mismatched pairs (`0.01083` versus `0.11918`), `97.92%` (`94/96`) regime accuracy, `96/96` (`100.0%`) replay-and-specification-verified whole-program synthesis, and `0` escaped false admissions on contradictory inputs. The same architecture extends to polyglot multi-function call graphs (`35/35` verified modules, `0.0` representation drift across Rust, Python, and C renames), in-process standard-library execution (`1,279 / 1,280` unprivileged operations and `1,280 / 1,280` = `100.0%` under deterministic `CapSandbox` at `G0`), physical direct-current rail shunt `measured_j` telemetry on Linux Tegra (`0.164 uJ` gross / `9.17 nJ` net dynamic per `G0` lookup versus `3.62 J` gross / `0.357 J` net dynamic per cold `RepoFormJepa` synthesis, a `38.9M x` dynamic-joule reduction on `G0` repeat), and closed-loop `500 Hz` MuJoCo `4.0.1` simulation-in-the-loop actuator verification (`4/4` episodes converging within `0.48 mm` under `6.90 N` peak force and `8,625 Pa` peak pressure).

**In plain words**

1. Ordinary code models spend capacity guessing variable names and syntax rules. FormJEPA strips variable and helper names away first, so equivalent Rust, Python, and C programs map to the exact same structural point.
2. Instead of generating code blindly from a hidden vector, FormJEPA predicts where a solution sits in structural space, proposes candidate programs with loops, branches, and helper calls, and tests every candidate by actually running it against required examples and invariants. If no candidate passes every check, the system abstains rather than guessing.
3. Once a specification is solved and checked once, the verified program is indexed by canonical signature so repeated or paraphrased requests resolve by direct table lookup in microjoules rather than repeating search.

## Terms and labels

<ul id="terms">
<li>RCE: Reality Code Engine, the deterministic intermediate representation and runtime studied in companion papers on this site</li>
<li>JEPA, I-JEPA, V-JEPA: Joint-Embedding Predictive Architecture, Image-JEPA, and Video-JEPA, self-supervised world-model architectures that predict target representations rather than raw surface tokens or pixels</li>
<li>VICReg: Variance-Invariance-Covariance Regularization, a non-contrastive objective that prevents representation collapse without negative-pair memory banks</li>
<li>BYOL, EMA: Bootstrap Your Own Latent and exponential moving average, target-encoder stabilization via momentum parameter updates</li>
<li>CEGIS, MPC: counterexample-guided inductive synthesis and model-predictive control</li>
<li>EARS, WHEN, THE, SYSTEM, SHALL, RETURN: Easy Approach to Requirements Syntax and its uppercase clause keywords (`WHEN ... THE SYSTEM SHALL RETURN ...`)</li>
<li>CE: cross-entropy classification loss</li>
<li>AST, IR, CFG: abstract syntax tree, intermediate representation, and control-flow graph</li>
<li>SHA, UTF, JSON, XML: Secure Hash Algorithm (`SHA-256`), Unicode Transformation Format (`UTF-8`), JavaScript Object Notation, and Extensible Markup Language</li>
<li>SVD: singular value decomposition, used here to measure latent effective rank</li>
<li>FedAvg: Federated Averaging across distributed training nodes without centralizing raw source traces</li>
<li>G0, G1, G2, G3: cascade tiers in `competence-catalog` from `G0` content-addressed lookup (`1 uJ` stated floor) through bounded repair and learned `JEPA` proposal</li>
<li>CPU, SoC, OS, RAPL, AMD, AI, NVIDIA, AGX: central processing unit, system-on-chip, operating system, Running Average Power Limit hardware energy counters, Advanced Micro Devices (`Ryzen AI`), artificial intelligence, NVIDIA Corporation, and Jetson `AGX` embedded platform</li>
<li>INA3221, INA238, TI, DC, GPU, MSS, SYS, VIN: Texas Instruments `INA3221` 3-channel module shunt (`VDD_GPU`, `VDD_CPU_SOC_MSS`, `VIN_SYS_5V0`) and `INA238` carrier input shunt (`VIN_CARRIER_TOTAL`) over direct-current rails</li>
<li>ARM64, RV64IM, ELF64, PASS: 64-bit Arm instruction set, 64-bit RISC-V integer/multiply profile, 64-bit Executable and Linkable Format, and passing threshold check</li>
<li>L1, L2, L3: board/rail (`L1`), package/chip (`L2`), and per-process (`L3`) telemetry levels (`TI INA3221` and `TI INA238` DC rail shunt `measured_j` on Jetson AGX Thor; `IOReport` and `RAPL` `reported_j` on M5 Max and Ryzen AI Max+ 395)</li>
<li>MJCF, HIL, SIL, PD: MuJoCo XML model format, hardware-in-the-loop, simulation-in-the-loop, and proportional-derivative feedback control</li>
<li>ISO, TS, IEC, EU: International Organization for Standardization, Technical Specification (`ISO/TS 15066`), International Electrotechnical Commission (`IEC 61508`), and European Union Regulation `2023/1230`</li>
<li>PRNG, CI, MSRV: deterministic pseudorandom number generator, continuous integration, and minimum supported Rust version</li>
</ul>

Four telemetry classes remain strictly separated (`measured_j ⊥ reported_j ⊥ est_j ⊥ unmetered`) throughout this study:

- **Physical shunt (`measured_j`: `L1` / `L2` DC rails)** denotes integrated voltage-times-current readings from `TI INA3221` (`VDD_GPU + VDD_CPU_SOC_MSS + VIN_SYS_5V0` on `/sys/class/hwmon/hwmon5`) and `TI INA238` (`VIN_CARRIER_TOTAL` on `/sys/class/hwmon/hwmon6`, recorded separately and never summed with `INA3221`) on `NVIDIA Jetson AGX Thor` (`data/thor-ina3221-shunt-receipts.json`), gated by `Falsifier 6` (`<= 5.0%` pre/post idle baseline drift after a `2,200 ms` governor dwell).
- **Measured (counts, wall times, and simulation trajectories)** denotes exact test counts, singular values, wall-clock durations, and deterministic MuJoCo `4.0.1` state/force trajectories reproduced by running the public test suite.
- **Reported (`reported_j`: `L2` hardware counters)** denotes on-chip energy counter readings from Apple Silicon `IOReport` on `M5 Max` and Linux `powercap` `intel-rapl` / `amd-rapl` on `AMD Ryzen AI Max+ 395`.
- **Stated (`est_uj`)** denotes analytical integer gear-cost constants (`1 uJ` for `G0` hash lookup, `5,000 uJ` for cold proposal) carried in receipt structures for deterministic ordering.

## 1. Related work and architectural motivation

Joint-Embedding Predictive Architectures predict the representation of a target signal from a context signal inside latent space rather than reconstructing raw pixels or tokens (LeCun, 2022; Assran et al., 2023; Bardes et al., 2024). In visual and embodied domains (`I-JEPA`, `V-JEPA 2`), both the encoder and the forward environment dynamics must be learned from observations because the underlying physical world is only partially observed. Recent analyses of latent generative models also show that training a direct token or pixel decoder on top of a frozen `JEPA` representation degrades generation quality unless the latent space is explicitly regularized for inversion, motivating the rule here that latents rank and steer search rather than directly emitting unchecked code.

Program synthesis occupies a distinct regime: the forward transition semantics of a well-defined intermediate representation (`Stmt` and the `RCE` runtime) is exact, deterministic, and fast to execute. This connects world-model planning directly to two established synthesis traditions:

1. **Counterexample-Guided Inductive Synthesis (`CEGIS`)** (Solar-Lezama et al., 2006; Alur et al., 2013), in which a synthesizer proposes a candidate implementation and a verifier either accepts it or returns a concrete witness input on which the candidate fails.
2. **Library learning and wake-sleep abstraction** (Ellis et al., 2021, *DreamCoder*; Bowers et al., 2023, *Stitch*), in which verified solutions are compressed into reusable, composable abstractions so subsequent tasks require shallower search.

`FormJEPA` combines these strands:

- **Target encoder with zero alpha-renaming variance.** Source procedures are lifted into canonical `Stmt` trees (`Let`, `Assign`, `If`, `While`, `Return`, plus `LetFn`, `LetCall`, and `Call` at module scope), normalized to De Bruijn positional indices, and evaluated on deterministic probe vectors. Renaming local variables or helper functions leaves the target feature vector identical to floating-point machine precision (Manhattan drift `0.0`).
- **Non-collapse self-supervised training.** Context encoders read structured intent specifications (`EARS` clauses, probe signatures, and natural-language tokens) and predict both a coarse `8`-way algorithmic regime distribution and a `24`-dimensional continuous latent vector. Training minimizes `VICReg` invariance, hinge-variance ($\gamma = 0.30$), and off-diagonal covariance penalties (Bardes, Ponce and LeCun, 2022) against a momentum `EMA` target encoder ($\tau = 0.96$, Grill et al., 2020).
- **Latent-steered `MPC` + `CEGIS` under a replay gate.** Given a specification, the predictor ranks structural regimes, initializes affine and loop bounds by closed-form witness interpolation, rolls out candidate `Stmt` programs plus single-step mutations against all witness probes and `EARS` invariants, and admits a candidate if and only if every check passes. Admitted programs crystallize into a `G0` signature table.

## 2. Non-collapse objective and canonical representation

Let $x$ denote an intent specification (`IntentSpec`: natural-language summary, `EARS` clauses, and input-output witness probes) and $y$ denote a verified implementation (`Stmt`). The online context encoder $f_\theta$ maps $x$ to regime logits $g_\theta(x) \in \mathbb{R}^8$ and continuous representation $\hat{z} = p_\theta(f_\theta(x)) \in \mathbb{R}^D$ ($D = 24$). The target encoder $f_\xi$, updated by exponential moving average $\xi \leftarrow \tau \xi + (1 - \tau)\theta$ with $\tau = 0.96$, maps the canonicalized program $y$ to $z = f_\xi(y) \in \mathbb{R}^D$.

Over a batch $Z = [z_1, \dots, z_B]^\top \in \mathbb{R}^{B \times D}$ and predictions $\hat{Z} = [\hat{z}_1, \dots, \hat{z}_B]^\top$, the training objective combines four terms:

$$
\mathcal{L}(\theta) = \lambda_{\text{inv}} \frac{1}{B} \sum_{i=1}^{B} \|\hat{z}_i - \text{sg}(z_i)\|_2^2 + \lambda_{\text{var}} \frac{1}{D} \sum_{d=1}^{D} \max\!\left(0, \gamma - \sqrt{\text{Var}(\hat{Z}_{:,d}) + \varepsilon}\right) + \lambda_{\text{cov}} \frac{1}{D} \sum_{d \neq d'} \text{Cov}(\hat{Z})_{d,d'}^2 + \lambda_{\text{reg}} \mathcal{L}_{\text{CE}}(g_\theta(x), r(y))
$$

where $\text{sg}(\cdot)$ stops gradients through the momentum target branch, $\gamma = 0.30$ enforces per-dimension spread, off-diagonal covariance decorrelates latent coordinates, and $\mathcal{L}_{\text{CE}}$ supervises the `8` structural regimes (`LinearAffine`, `RatioDifference`, `ClampFloorCeiling`, `PiecewiseBranch`, `BoundedLoopSum`, `QuadraticPolynomial`, `DiscreteControlPD`, and `Modular Bitwise`).

To audit representation collapse quantitatively, let $\sigma_1 \ge \sigma_2 \ge \dots \ge \sigma_D \ge 0$ be the singular values of the centered holdout embedding matrix. Normalized singular probabilities $p_k = \sigma_k / \sum_{j=1}^{D} \sigma_j$ define the spectral effective rank (Roy and Vetterli, 2007):

$$
\text{erank}(Z) = \exp\!\left(-\sum_{k=1}^{D} p_k \ln p_k\right) \in [1, D]
$$

A collapsed encoder concentrates variance into one or a few directions ($\text{erank} \ll D$), whereas an isotropic full-rank embedding approaches $D = 24.0$.

## 3. Heterogeneous 4-node federated training (`FedAvg`)

Because target representations depend only on canonical De Bruijn structure and deterministic probe traces, clients holding private source repositories in different languages can train local `FormJEPA` copies and aggregate weights via Federated Averaging (`FedAvg`, McMahan et al., 2017) without exchanging source identifiers or raw code.

A `480`-pair corpus (`60` verified specification-program pairs across each of the `8` regimes) was partitioned across `4` physical machines (`120` local pairs per node, `3` `FedAvg` communication rounds, `4` local epochs per round) alongside a disjoint `96`-specification unseen holdout set (`12` per regime):

| Node | Hardware and OS | Architecture | Local train wall time | Local train energy (`reported_j`) | `G0` lookup vs 3-stage check (`reported_j`) |
|---|---|---|---|---|---|
| Node 1 | Apple MacBook Pro (`M5 Max`, `macOS`) | `aarch64` | `0.021 s` (`3` rounds) | `949,594 uJ` (`0.950 J`, `IOReport`) | `39.19 uJ` vs `202,714 uJ` (`5,172.3x`) |
| Node 2 | Framework Workstation (`AMD Ryzen AI Max+ 395`, `Linux`) | `x86_64` | `0.024 s` (`3` rounds) | `3,006,663 uJ` (`3.007 J`, `RAPL`) | `107.44 uJ` vs `648,510 uJ` (`6,035.9x`) |
| Node 3 | NVIDIA Jetson AGX Thor (`Linux` Tegra) | `aarch64` | `0.025 s` (`3` rounds) | Counter privilege not enabled in run | Verified bit-exact `SHA-256` digest |
| Node 4 | Intel Core i7 Workstation (`Windows 11 Pro`) | `AMD64` (`x86_64`) | `0.027 s` (`3` rounds) | Counter privilege not enabled in run | Verified bit-exact `SHA-256` digest |

On the `96` unseen holdout specifications, the aggregated `FedAvg` model achieved the following measured metrics:

| Metric on `96` unseen holdout specifications | Measured value | Non-collapse / safety threshold |
|---|---|---|
| Spectral effective rank $\text{erank}(Z)$ | `23.99 / 24.0` | `>= 18.0` |
| Minimum per-dimension standard deviation | `0.2737` | `>= 0.25` |
| Mean positive-pair latent energy $\|\hat{z} - z\|_2^2$ | `0.01083` | `< 0.03` |
| Mean negative-pair latent energy (mismatched pairs) | `0.11918` (`11.0x` ratio) | `> 3.0x` positive energy |
| Top-1 structural regime accuracy | `97.92%` (`94 / 96`) | `>= 85.0%` |
| Top-3 regime recall (`Recall@3`) | `97.92%` (`94 / 96`) | `>= 95.0%` |
| Replay + `EARS` verified whole-program synthesis | `100.0%` (`96 / 96`) | `>= 90.0%` |
| Escaped false admissions on contradictory specifications | `0` | `0` (hard gate) |

Even on the `2 / 96` specifications where top-1 regime classification ranked the true regime second, bounded `MPC` rollout across the top-ranked regimes still found and replay-verified an exact implementation (`96 / 96`), while contradictory witness sets (`WHEN x = 2 RETURN 4` paired with `WHEN x = 2 RETURN 9`) were deterministically rejected (`0` false admissions).

## 4. Scaling to multi-function call graphs (`RepoFormJepa`)

Single-procedure synthesis leaves open whether canonical target encoding survives multi-function modules with internal helper calls. `src/repo_jepa.rs` extends lifting, canonical encoding, and `JEPA`-guided composition to multi-procedure modules (`Stmt::LetFn`, `Stmt::LetCall`, `Stmt::Call`):

1. **Polyglot multi-function lifting (`lift_repo_module`).** Modules written in Rust (`pub fn` / `fn` with type annotations), Python (`def`), and C (`int` / `long` functions) lift into a unified executable `Stmt` call graph analyzed by `xref` call-edge extraction.
2. **Call-graph alpha-invariance (`encode_repo_module_raw`).** A `48`-dimensional module representation combines construct histograms, call-graph in-degree spectra, chain depth, and deterministic De Bruijn execution traces. Across a 2-helper + caller pipeline implemented in Rust (`scale_step` -> `floor_zero`), Python (`helper_one` -> `helper_two`), and C (`f_a` -> `f_b`) with distinct parameter and helper identifiers, pairwise representation Manhattan distance is `< 10^-12` (`0.0` measured drift) and `repo_structural_key` produces the identical `SHA-256` digest across all three languages.
3. **Composable helper synthesis (`RepoFormJepa`).** Combining verified helper competences (`clamp0`, `abs_val`, `min2`, `tri_sum`, `sq_term`) with caller glue synthesized over witness probes and `EARS` invariants admitted `35 / 35` (`100.0%`) multi-function modules spanning `>= 70` static call edges with `0` escaped false admissions. Paraphrased repeat specifications hit the `G0` cache in `0` candidate evaluations (`12 / 12` repeat checks).

## 5. General `G0` standard-library executor closure and physical `INA3221` DC shunt `measured_j`

For crystallized competence to execute without invoking an external compiler or neural model, the in-process runtime bridge (`RuntimeBridge::call_general` in `src/runtime.rs`) must marshal JSON arguments into typed `RCE` forms across the standard library (`1,280` public operations in `data/stdlib-basis-index.json`).

Expanding `struct-registry.json` (`173` standard-library structs including virtual filesystem `Fs`, deterministic `Rng`, `Ratchet`, `Event`, and `Client`), `kind-registry.json` (`23` recursive sum kinds with deterministic `BTreeMap` constructor ordering and suffix-qualified module resolution for `events.Jv`, `linalg.Mat`, `xml.Xml`, `enc.JsonDoc`, and `enc.Cbor`), `Map[K, V]` and `Option[T]` marshalling, unbound generic return instantiation (`()->Plan[T0]`, `()->Deque[T0]`, `()->OrdMap[K,V]`), caller-module type shadowing guards, and explicit `CapSandbox` host policies (`src/runtime.rs`, commit `258cbb11`) brought the live in-process `sweep_coverage` audit to:

- **`1,279 / 1,280` (`99.92%`) standard-library operations executed in-process under `CapSandbox::unprivileged()`**, where only `rand.det.from_entropy` (`Cap[Entropy]`) is deterministically rejected with `capability refused: missing Cap[Entropy]`.
- **`1,280 / 1,280` (`100.00%`) standard-library operations covered under `CapSandbox::deterministic_fixture()`**, comprising `988` operations returning concrete marshalled values and `292` operations exercising deterministic domain traps (`DivisionByZero`, `BadSeed`, `FsErr`, precondition guards), with `0` uncovered operations.

To anchor the `G3 -> G0` crystallization ratio on physical direct-current rails (`measured_j`), `examples/thor_shunt_bench.rs` (`data/thor-ina3221-shunt-receipts.json` at `258cbb11`) sampled the `TI INA3221` 3-channel module shunt (`VDD_GPU + VDD_CPU_SOC_MSS + VIN_SYS_5V0`) and separate `TI INA238` carrier shunt on `NVIDIA Jetson AGX Thor` (`Linux 6.8.12-1021-tegra aarch64`) after a `2,200 ms` governor dwell before `400 ms` pre-idle and post-idle windows:

| Workload on Jetson AGX Thor (`TI INA3221` module shunt `measured_j`) | Acts | Pre/post idle drift (`Falsifier 6 <= 5.0%`) | Gross module `measured_j` per act | Net dynamic module `measured_j` per act | Carrier `TI INA238` gross window `measured_j` (separate) |
|---|---|---|---|---|---|
| Single `G0` lookup (`150,000` batches of `1,000` = `150M` lookups) | `150,000,000` | `0.21%` (`PASS`) | `0.164 uJ` (`163.87 nJ`) | `0.00917 uJ` (`9.17 nJ`) | `34.78 J` (`1.193 s`) |
| 4-artifact sovereign compile (`ARM64` + `x86-64` + `RV64IM` + `ELF64`) | `20,000` | `3.04%` (`PASS`) | `1,102.81 uJ` (`1.103 mJ`) | `59.84 uJ` | `31.62 J` (`1.061 s`) |
| Cold `RepoFormJepa` multi-function call-graph synthesis | `25` | `0.00%` (`PASS`) | `3,618,674 uJ` (`3.619 J`) | `357,259 uJ` (`0.357 J`) | `125.15 J` (`4.188 s`) |
| Closed-loop `500 Hz` actuator twin certification (`hil::certify`) | `25` | `0.88%` (`PASS`) | `3,817,783 uJ` (`3.818 J`) | `360,995 uJ` (`0.361 J`) | `131.75 J` (`4.370 s`) |

Once a multi-function specification is synthesized and admitted (`0.357 J` net dynamic `measured_j`), serving subsequent hits from `G0` (`9.17 nJ` net dynamic `measured_j`) reduces dynamic module energy on Jetson AGX Thor by **`38.9M x`** (`22.1M x` gross module energy).

## 6. Closed-loop `500 Hz` MuJoCo `4.0.1` actuator verification

To test whether `FormJEPA`-synthesized discrete controllers satisfy physical-safety envelopes under realistic rigid-body contact dynamics, `src/hil_mujoco.rs` and `assets/mujoco/rce_actuator_cell/model.xml` pair `HierFormJepa` with MuJoCo `4.0.1`:

1. **Synthesized controller and twin gate.** `HierFormJepa` synthesizes a replay-and-`EARS`-verified proportional-derivative rail controller (`32` units at `err_mm = 10, vel_term = 2`; `0` at origin), which first passes `hil::certify` across `4` perturbed episodes on the deterministic `Plant2` twin.
2. **`500 Hz` MuJoCo `4.0.1` closed-loop rollout.** `scripts/mujoco_hil_verify.py` compiles `rce_actuator_cell/model.xml` (`0.5 kg` prismatic rail carriage on `[-0.23 m, +0.23 m]` travel with mechanical end-stops and an `8.0 cm^2` compliant contact pad) via `mujoco.MjSpec` at `timestep = 0.002 s` (`500 Hz`, `mjINT_IMPLICITFAST`) and runs `750` closed-loop control steps (`1.5 s`) from `4` initial state perturbations:
   - `x0 = -0.15 m, v0 = 0.00 m/s` -> `x_final = +0.000468 m`, peak force `6.00 N`, peak pressure `7,500 Pa`,
   - `x0 = +0.18 m, v0 = -0.05 m/s` -> `x_final = -0.000462 m`, peak force `6.90 N`, peak pressure `8,625 Pa`,
   - `x0 = -0.08 m, v0 = +0.10 m/s` -> `x_final = +0.000481 m`, peak force `2.60 N`, peak pressure `3,250 Pa`,
   - `x0 = +0.12 m, v0 = 0.00 m/s` -> `x_final = -0.000475 m`, peak force `4.80 N`, peak pressure `6,000 Pa`.
3. **Collaborative force/pressure limits, real-to-sim identification, and conformity record.** Across all `4 / 4` episodes, carriage travel remains strictly inside `[-0.23 m, +0.23 m]`, peak force (`6.90 N`) stays `20.3x` below the `140 N` `ISO/TS 15066` quasi-static reference threshold, and peak contact pressure (`8,625 Pa`) stays `23.2x` below the `200 kPa` reference threshold. Passing the recorded MuJoCo position and control prefix into `twin::identify2` recovers the true `dt = 0.002 s` (`500 Hz`) plant timestep from candidate hypotheses `{0.002 s, 0.010 s, 0.020 s}`, and `TrustLayer::module_a_file` emits a hash-chained `EU 2023/1230` Module-A internal production control technical file (`trace_sha256` prefix `3b58d670b47e11fd`).

## 7. Scope limits and open frontiers

Every claim in this study is bounded by the scope of its test harness:

- **Algorithmic regime breadth.** `HierFormJepa` and `RepoFormJepa` operate over integer/fixed-point `Stmt` programs and `5`-helper call graphs (`480` federated training pairs, `96` single-procedure holdouts, `35` multi-function modules). Scaling to large heap-manipulating repositories with trait dispatch, asynchronous concurrency, and million-token context windows requires pairing `FormJEPA` with external frontier proposers behind the same replay gate.
- **Explicit `CapSandbox` fixture vs live OS side effects.** In-process `1,280 / 1,280` (`100.0%`) standard-library closure evaluates `rand.det.from_entropy` against deterministic capability seeds in `CapSandbox::deterministic_fixture()` while refusing unprivileged `Cap[Entropy]` calls (`1,279 / 1,280`); live network socket and hardware peripheral effects remain gated by host capability tokens.
- **Physical robot hardware and third-party certification.** While Jetson AGX Thor `TI INA3221` / `TI INA238` compute rails now carry `Falsifier 6`-verified `measured_j` receipts, MuJoCo `4.0.1` provides rigid-body simulation-in-the-loop (`SiL`) actuator dynamics (`measured_j` on physical robot motor stages remains unset); physical robot hardware-in-the-loop (`HiL`) with force-torque load cells and notified-body `Annex III` / `IEC 61508` attestation remain open engineering steps.

## 8. References

<ul data-refs>
<li>Alur, R., Bodik, R., Juniwal, G., Martin, M. M. K., Raghothaman, M., Seshia, S. A., Singh, R., Solar-Lezama, A., Torlak, E., and Udupa, A. (2013). Syntax-guided synthesis. In <i>Formal Methods in Computer-Aided Design (FMCAD)</i>, pages 1 to 8.</li>
<li>Assran, M., Duval, Q., Misra, I., Bojanowski, P., Vincent, P., Rabbat, M., LeCun, Y., and Ballas, N. (2023). Self-supervised learning from images with a joint-embedding predictive architecture. In <i>Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)</i>, pages 15619 to 15629.</li>
<li>Bardes, A., Garrido, Q., Ponce, J., Chen, X., Rabbat, M., LeCun, Y., Assran, M., and Ballas, N. (2024). Revisiting feature prediction for learning visual representations from video. <i>Transactions on Machine Learning Research (TMLR)</i>.</li>
<li>Bardes, A., Ponce, J., and LeCun, Y. (2022). VICReg: Variance-invariance-covariance regularization for self-supervised learning. In <i>International Conference on Learning Representations (ICLR)</i>.</li>
<li>Bowers, M., Olausson, T. X., Wong, L., Grand, G., Tenenbaum, J. B., Ellis, K., and Solar-Lezama, A. (2023). Top-down synthesis for library learning. <i>Proceedings of the ACM on Programming Languages</i>, 7(POPL), pages 1182 to 1213.</li>
<li>Ellis, K., Wong, C., Nye, M., Sablé-Meyer, M., Morales, L., Hewitt, L., Cary, L., Solar-Lezama, A., and Tenenbaum, J. B. (2021). DreamCoder: Bootstrapping inductive program synthesis with wake-sleep library learning. In <i>Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI)</i>, pages 835 to 850.</li>
<li>Grill, J.-B., Strub, F., Altché, F., Tallec, C., Richemond, P. H., Buchatskaya, E., Doersch, C., Pires, B. A., Guo, Z. D., Azar, M. G., Piot, B., Kavukcuoglu, K., Munos, R., and Valko, M. (2020). Bootstrap your own latent: A new approach to self-supervised learning. In <i>Advances in Neural Information Processing Systems (NeurIPS)</i>, volume 33, pages 21271 to 21284.</li>
<li>ISO/TS 15066 (2016). <i>Robots and robotic devices: Collaborative robots</i>. International Organization for Standardization, Geneva.</li>
<li>LeCun, Y. (2022). A path towards autonomous machine intelligence. OpenReview preprint.</li>
<li>McMahan, B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. (2017). Communication-efficient learning of deep networks from decentralized data. In <i>Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS)</i>, pages 1273 to 1282.</li>
<li>Roy, O. and Vetterli, M. (2007). The effective rank: A measure of effective dimensionality. In <i>15th European Signal Processing Conference (EUSIPCO)</i>, pages 606 to 610.</li>
<li>Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., and Saraswat, V. (2006). Combinatorial sketching for finite programs. In <i>Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS)</i>, pages 404 to 415.</li>
<li>Todorov, E., Erez, T., and Tassa, Y. (2012). MuJoCo: A physics engine for model-based control. In <i>IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)</i>, pages 5026 to 5033.</li>
</ul>
