Source: docs/superpowers/specs/2026-08-11-evidence-residual-scene-state-design.md · Plain text

Evidence-Residual Scene State Design

Research contract

The new architecture must preserve the project's main claim: calibrated context RGB views are compressed into one target-independent typed 3D state, and all primary measurements are read by the existing parameter-free renderer. The target camera is a query only. It must not enter the state encoder or completion branch.

The architectural change formalizes a bounded residual decomposition:

state = context-supported evidence state + completion_gate * completion_residual

This is a 3D state residual, not a target-image residual. The model must retain enough auxiliary fields to audit which state regions are supported by cross-view evidence and which depend on the learned completion prior.

Compatibility boundary

Typed evidence contract

SceneState gains an optional StateEvidence payload with the following fields:

The first version does not claim directly observed free space from RGB-only inputs. Free-space semantics require reliable depth or ray-termination evidence and are deferred rather than fabricated from camera-frustum coverage.

Evidence construction

Every voxel center is projected into every context view. The evidence branch samples a deterministic multi-scale RGB pyramid at those projections, while a separate learned feature pyramid supplies the 3D completion branch.

For each voxel, evidence confidence combines:

  1. the number of context views in which the projection is valid;
  2. pairwise cosine agreement of normalized multi-scale RGB descriptors;
  3. raw RGB agreement across valid views.

Source provenance is a masked softmax over per-view agreement with the local consensus. Invalid views receive zero weight. Voxels with fewer than two valid views have zero correspondence confidence and therefore remain completion-dominated.

Evidence confidence and provenance contain no learned parameters. This prevents the completion objective from deliberately lowering confidence to gain a larger residual gate or evade the high-confidence rewrite penalty. Learned sampled features still train normally through the 3D residual branch.

The context-supported base color is the provenance-weighted sampled RGB. Base density is a bounded logit transform of correspondence confidence. A 3D residual network receives the fused observation statistics, evidence confidence, and unknown probability. It predicts bounded density and color-logit residuals. The residual gate has a small configured floor in supported regions so the model can correct calibration and Lambertian violations, while unknown regions receive the full completion capacity. The main bound is 4.0: a 1.5 pilot bound saturated at the 90th percentile on a one-window diagnostic, while the fixed evidence field itself remained unchanged.

Interpretability and anti-cheating constraints

This architecture is structurally auditable, not fully human-interpretable. The 2D feature pyramid and 3D residual network remain learned components.

Capacity change

The evidence-residual main config uses a 48-channel image pyramid, a 48-channel typed state, four 3D refinement blocks, and the existing [48, 32, 48] metric grid. This increases capacity without changing the 0.25 m spatial protocol. Resolution changes remain a separate ablation because they alter both compute and the geometry metric floor.

Data expansion protocol

The local official Hypersim metadata contains 365 public train scenes, 46 validation scenes, and 46 test scenes. The current subset contains 60/20/20 scenes. The expanded protocol is:

Training uses four context views, two target views, and sample stride two, yielding roughly 17,000 windows when about 100 frames are available per scene. The planned main budget is 150,000 micro-steps with gradient accumulation two. A one-window overfit gate and a short multi-scene validation run must pass before the main run.

Full Hypersim expansion is expected to add substantially less than 100 GiB because the downloader extracts only selected preview RGB, depth, normal, and camera files. A live disk-space guard must keep at least 100 GiB free on D before each download batch.

Evaluation boundary

Architecture and hyperparameters are selected on validation only. The existing diagnostic test can explain old failures but cannot select the new model. The sealed final holdout is evaluated once after checkpoint selection.

Hypersim results cannot be compared numerically with published RealEstate10K results. A separate RealEstate10K/ACID track and matched external baseline reruns are still required for a defensible NVS comparison.

Acceptance gates

  1. Legacy configs load and legacy model tests remain unchanged.
  2. New evidence fields validate shapes, ranges, provenance sums, and device transfer.
  3. Evidence-residual forward/backward is finite on CPU and BF16 CUDA smoke.
  4. Zero residual reconstructs the base state exactly.
  5. High-confidence residual regularization is non-zero only when evidence fields exist.
  6. Full unit tests, Ruff, syntax compilation, synthetic CLI smoke, and main-resolution CUDA smoke pass before any long training command is recommended.