Skip to content
JacobFVPublic

Repository files navigation

dynagraph: Typed Physical Memory with Recurrent Belief Refinement for Robot Manipulation

Factory CI Project Site Hugging Face Weights

Jacob Valdez (jvboid.dev) · Live Project Site (GitHub Pages) · Public Weights (Hugging Face) · A100 Inkling-2-Mini Cluster Runbook · MIT License

Release Summary & Honest Scope. We ablated our 28.13M Typed Physical Memory model (PhysMemV2-XL) down to a stateless vanilla Transformer across 35 multi-physics robot families (368 paired held-out TEST jobs at 0.684 yield / 9.2% scrap vs 10.6% adaptive, plus a 7-rung, 2,688-rollout single-feature component ablation showing BeliefRefiner K=4 (−0.021 VAL AUC, −0.010 TEST), Typed SI Slots (−0.007 VAL AUC, −0.010 TEST, +0.3% scrap), Physics Margins (−0.009 VAL AUC, +0.5% scrap), and True Vanilla (−0.017 VAL AUC, −0.020 TEST, +1.3% scrap)), published public weights on Hugging Face (jacob-valdez/dynagraph-physmem-v2), and started fine-tuning Inkling-2-Mini System I/II across all 35 families (1,600 steps: VAL AUC 0.5400 → 0.8509 peak / 0.8469 final, VAL Brier 0.2577 → 0.1583, bit-exact System-II rtol=0, atol=0, adapter checkpoints uploaded to HF). All results are in MuJoCo 4.0.1 simulation / mock HIL — zero physical robot claims. Negative and null results are reported alongside positive ones, and every number is traceable to results/ and docs/.

Procedural industrial stations (contact sheet)
Procedural, site-dressed MuJoCo industrial stations used for closed-loop evaluation.

Abstract

General real-world manipulation depends on physical properties no single sensor reveals: mass, friction, elasticity, crush limits, clearances, and the behaviour of other agents. A robot has to infer them by fusing vision, third-person observation, proprioception, force and touch, and digital-twin anchors (joint encoders, IMUs, tracked poses, contact points). Our thesis is that the looped core of a pretrained transformer (Inkling-2-Mini) can act as a hyperdimensional physics engine. In that view it holds an explicit, interpretable, editable physical belief state, a typed variable store keyed by entity and property class (MASS, FRICTION, STIFFNESS, POSE, FORCE, AGENCY, ...). Recurrent attention would update that state in agreement with rigid-body, friction and Hookean-elastic structure, and anchors would be added, revised and removed as evidence arrives. We want one model that works across modalities, embodiments and domains, and that generalizes beyond them. A fast System I mode (entered by a mode token) carries that computation, and the language-level System II mode stays intact.

What is built and evaluated so far is a subset:

  • a typed, versioned, causal property-graph memory with provenance and privileged-label rejection;
  • a world model whose interaction history reaches the decision only through typed slots;
  • uncertainty-gated planners;
  • the Inkling System I/II adaptation.

All of it is tested in simulation on industrial stations with four robots, a held-out robot and a held-out task, under pre-registered, paired comparisons. The evaluated observations are actor-legal force/pose interaction series, entity states and a scalar visual material reading. Third-person tracks, human hands and bodies, and new physical domains are in progress (docs/V3_GENERAL.md).

Distance to the thesis (honest status)

  • V3 writes named physical beliefs between recurrent passes in the 1-D contact-chain simulator. The first pre-registered store gets the sign of named-property interventions right in 52% of trials.
  • Arm I2 uses a learned rollout that reads the typed beliefs and initial conditions directly. On fresh seeds, it passes the motion, intermediate-state and realized-outcome criteria, but misses the action-sign criterion in every seed (0.44–0.65 versus the 0.80 target). Classical reaches 0.82.
  • With supervised initial velocity and the known MuJoCo mechanism, a fixed compact estimator passes all four primary checks on 200 fresh contact chains. Action-sign agreement is 0.829 (155/187 eligible cases), and applying the property edit reduces realized error by 6.35 mm. The classical analytic estimator has lower factual error on those same cases. Confirmation protocol and results
  • The experimental Inkling adapter reads the graph and writes named beliefs between native middle-layer passes. The pinned-backbone pilot completes 64 updates, preserves the language probe exactly and reloads its checkpoint. Pilot validation accuracy is mixed. Inkling pilot and reproduction
  • Generalization across physical domains, learned 3-D rigid-body dynamics, models of other agents, multi-rate control and real-robot performance remain open. Actor anchors can now resolve through typed interaction relations and calibrated SE(3) frame chains.

See the V3 causal evaluation and the paired-rollout experiment.

Main findings so far

  1. Typed memory beats generic memory in closed loop on every robot, including the held-out Kinova Gen3: +0.05 to +0.39 good parts per lot in the round-5 pre-registered test (docs/MODEL_V2.md §12b).

  2. Lot memory pays off when the budget binds. On a gantry robot with a shared 12-call budget per 5-part lot, the typed planner probes 1.1 times per lot instead of 4.9 and beats a strong probe-then-act baseline by +0.09 [+0.03, +0.16] good parts per lot. Turning lot memory off costs 0.17 [0.11, 0.23].

  3. No win over probe-then-act on the arms (UR5e, Panda, Gen3): the typed planner still saves 2–2.7 probes per lot, but those arms fail for reasons other than budget, so the saved calls have nothing to turn into.

  4. Absolute competence is far from industrial. Even with the true hidden physics (the labelled oracle), only a few robot/task pairs exceed 0.8 success. Examples are UR5e bin clearing at 0.83 and UR5e tight insertion with force ramping at 0.90 (results/v2/envs/ceiling_r7.md on branch envs-r7).

  5. Early sprint (compact models and Unitree G1 push): structure helped prediction under occlusion and delay, but the typed friction slot was not causally used. No learned model beat a prior stub in the G1 closed loop (docs/findings.md).

  6. Round 6 (pre-registered, fixed skills, ACT and classical comparators) is a null against scripted baselines. Force-ramp, nominal or probe-then-act is at or above every learned planner in all 8 cells, including the held-out Gen3. A classical cached estimator matches learned lot memory (docs/MODEL_V2.md §13b).

See project status for the active experiments and collected results.

Method overview

Component Where Summary
Typed property-graph memory src/physmem/memory.py, frames.py, schema.py Immutable evidence, explicit revisions, causal availability, same-source correlation, retraction, provenance, privileged-label rejection
World model (v2) src/physmem/models/v2/ Segment encoder over actor-legal force/pose time series. Typed latent slots (e.g. crush force, friction, stiffness) with posterior uncertainty. Outcome heads. Lot memory shared across parts of a lot
Planner src/physmem/planner.py, models/v2/harness.py Ranked skill-parameter search anchored on a scripted policy. Deviates only if the LCB beats the anchor. Value-of-information probing. Competence gate from VAL AUC
Inkling System I/II src/physmem/models/inkling_quant.py, sys12.py, sys12_train.py Quantized Inkling-2-Mini (~21 GB resident). <sys1>/<sys2> mode tokens. Gated LoRA + memory cross-attention active only in System I. System II logits bit-identical to base
Environments src/physmem/envs/, skills/, embodiments/, robots/ Procedural, site-dressed MuJoCo stations with hidden per-part and per-lot physics. Scripted, probe-then-act, force-ramp and labelled-oracle policies
Imitation baseline src/physmem/models/v2/imitation/ ACT-style action-chunking policy trained on the same demonstrations
Factory runtime & FAT src/physmem/factory/, configs/factory_cell.yaml Deterministic workcell runtime: safety supervisor & FSM interlocks, actor-legal HAL (SimCellDriver, MockHardwareDriver), Bayesian lot memory, SHA-256 + VAL-gated ModelRegistry, JSONL/OEE telemetry, MES/SCADA HTTP API, and automated Factory Acceptance Tests

Evaluation protocol

  • Pre-registration. Each round's hypotheses, metrics, thresholds and test seeds are committed on their own, before any test run. Errata are committed as found; see the git log.
  • Paired evaluation. Every policy sees identical seeded tasks. Results are reported as paired differences with 95% bootstrap CIs, n ≥ 30 per cell.
  • Held-out generalization. The Kinova Gen3 robot and the drawer_open family are never trained on.
  • Baselines. Nominal scripted, probe-then-act (PTA), force-ramp, generic memory, no memory, ACT imitation, and a labelled oracle with the true hidden physics, which is reported only as a ceiling.
  • Thresholds (risk τ, competence gates) are chosen on VAL seeds only.

Repository layout

src/physmem/      memory, world models (compact, v2, Inkling), planner, environments, skills, robots
scripts/          data generation, training, evaluation, rendering (scripts/v2, scripts/sys12)
docs/             design docs and the full experimental record (MODEL_V2.md, ENVS.md, INKLING_SYS12.md, findings.md)
results/          metrics, tables and videos (results/v2/closed_loop, results/v2/videos_paired)
paper/            LaTeX draft
tests/            unit and invariance tests

Large artefacts (checkpoints, datasets, the Inkling-2-Mini weights) are not in the repository.

Quick start

python -m venv .venv && . .venv/bin/activate
pip install -e .
pytest -q                      # unit + invariance tests
physmem doctor                 # environment check

Factory runtime, frontier multi-physics & full-stack qualification (simulation / mock HIL)

  • Interactive Project Page (15 real MuJoCo 4.0.1 EGL rollouts): https://jacobfv.github.io/dynagraph/ (docs/index.html)
  • Documentation: docs/FACTORY_READINESS.md, docs/FRONTIER_2027_BENCHMARKS.md, docs/SOTA_2026_DEXTEROUS.md, docs/RESEARCH_LOG.md
  • 35-Family PhysMemV2-v17-XL (28.13M params, d=512, K=4, results/factory/learned_v17_xl/fullstack_report.md):
    • 34/35 FULL VAL trusted + 1 S1-guard (0 untrusted), 46-cell held-out TEST (368 paired jobs): 0.208 → 0.684 (3.29× scripted), scrap 67.4% → 9.2% (-1.4% safer than adaptive 10.6%), 1,037 neural calls, 0 fallbacks, 0 Hard E-STOPs.
    • 24-cell closed-loop 3-way ablation (192 jobs): Typed 0.783 > Generic 0.757 (+0.026) & NoMem 0.757 (+0.026).
    • 6-cell zero-shot unseen-robot transfer: 0.688 (+0.083 vs adaptive 0.604; v17 11.69M hit 0.708, +0.104 vs adaptive including unseen Franka Panda at 100 nm / 250 nm / 800 nm).
  • Horizon C PhysMem-ACT v3 (10 Hz raw 64×64 wrist-RGB + tactile S1, results/factory/visuomotor_s1_fixture_v3/visuomotor_s1_report.md, results/factory/visuomotor_s1_pouch/visuomotor_s1_report.md):
    • Zero-drift hemisphere-aligned quaternion ensembling + FiLM typed-belief conditioning achieves binary env.solved() wins over iso-parameter Blind-ACT on both CNC fixture_place (0.042 vs 0.000 at 2 mm / 3°, -57.0% val grip-force MAE 11.29→4.85 N, -50% damage 0.333→0.167, +38.9 N / +16.2 N frozen-RGB counterfactuals) and 3D deformable pouch_transfer (0.083 vs 0.042, 0.000 dmg, -21.6% force MAE).
  • Tier-11 Frontier (50 nm EUV Nano-Stage at 7,000× finer than vision + holonomic TidyBot mobile-base handover, results/factory/tier11/fat_report.md):
    • PASS (14/14 safety/adversarial/Byzantine/OOD/VOI gates, 4/4 stations at 1.000, 0.000 scrap across 32 paired jobs, 0 Hard E-STOPs). Full repo test suite: 321 passed, 0 failed, 3 skipped.
physmem factory preflight --config configs/factory_cell.yaml
physmem factory run --config configs/factory_cell.yaml --jobs 5 --out results/factory/shift.json
physmem factory fat --suite tier11 --seeds 8 --workers 4 --out results/factory/tier11
physmem factory fat --suite all --seeds 8 --workers 8 --out results/factory/all
physmem factory serve --config configs/factory_cell.yaml --host 127.0.0.1 --port 8080

Heavy training and evaluation were run on a single NVIDIA GB10 (≈117 GB unified memory). The Inkling experiments need the pinned thinkingmachines/Inkling-2-Mini@b85c3cf checkpoint, which you download separately.

Example: paired closed-loop video

The pre-registered rule renders a paired video only for statistically significant wins. results/v2/videos_paired/pouch_transfer__ur5e_2f85__s2900001.mp4 shows UR5e pouch transfer: the scripted heuristic damages the part, and the gated residual planner succeeds at 0.34× the effort.

Paired pouch-transfer still

Citation

@misc{valdez2026dynagraph,
  author = {Valdez, Jacob},
  title  = {dynagraph: Typed Physical Memory with Recurrent Refinement for Robot Manipulation},
  year   = {2026},
  howpublished = {\url{https://github.com/JacobFV/dynagraph}},
  note   = {Work in progress; simulation only}
}

License

MIT. See LICENSE. Third-party assets, such as MuJoCo Menagerie robot models and the Inkling-2-Mini weights, are covered by their own licenses.

Releases

Packages

Contributors

Languages