Part X: Sensor Fusion, World Models, and Spatial AI
Chapter 51: Neural Fields and Gaussian Splatting for Sensing

Validation of synthetic-from-real pipelines

"A synthetic frame that looks perfect to me and teaches my detector nothing is not data. It is wallpaper."

A Skeptical AI Agent

The big picture

Everything earlier in this chapter builds a machine that takes real sensor logs, fits a scene, and emits new sensor readings: novel camera views (Section 51.3), re-simulated lidar returns (Section 51.4), and whole rare-event scenarios (Section 51.5). That machine is only worth running if you can prove its output is trustworthy. This section is the audit. It answers three questions that a reconstruction pipeline must survive before its synthetic frames are allowed into a training set or a safety case: is the geometry and appearance faithful to what the sensor would truly measure, does the synthetic distribution actually cover the real one, and, the only question that ultimately pays the bills, does training on the synthetic data improve a downstream model on real held-out data. Get validation wrong and you ship a data engine that quietly poisons every model it feeds. Get it right and you have a defensible way to manufacture the long tail that reality refuses to hand you.

This is an advanced, research-frontier section. It assumes the splatting and re-simulation pipeline of Sections 51.2 through 51.5. It leans hard on two running threads of the book: leakage-safe evaluation, treated in general in Chapter 5 and formalized as benchmark protocol in Chapter 65, and distribution shift, treated in Chapter 66. If those chapters are unfamiliar, read their opening sections first; the whole point here is that a synthetic-data pipeline is a new and sneaky way to leak the test set into training.

Three layers of validation, and why you need all three

Validation of a synthetic-from-real pipeline stacks in three layers, from cheap and weak to expensive and decisive. The fidelity layer asks, per sample, how close a re-simulated reading is to a real one at the same pose: this is image and geometry error, and it is what neural-rendering papers report. The distributional layer asks whether the set of synthetic samples covers the real sensor distribution, because a pipeline can render every individual frame beautifully and still only ever produce sunny noon scenes. The task layer asks the one question that actually matters for a data engine: if you train a perception model on the synthetic data and test it on real held-out data, does it get better. Each layer catches failures the layer below is blind to. A pipeline can pass fidelity and fail distribution; it can pass both and still fail the task, because the errors it does make happen to sit exactly where your detector is sensitive. Never report only the first layer and call the pipeline validated.

Key insight: the only validation that counts is downstream and held-out

A high PSNR on a re-rendered view tells you the pixels are close; it says nothing about whether those pixels teach a network the right invariances. The decisive test is train-on-synthetic, test-on-real (TSTR): train a model on synthetic data alone (or on real-plus-synthetic) and evaluate it on a real test set that the reconstruction pipeline never saw. Its mirror, train-on-real, test-on-synthetic (TRTS), checks the reverse and exposes synthetic frames that a real-trained model finds trivially easy or bizarrely hard. Both are worthless if the real logs used to fit the scenes overlap, even by neighboring frames of the same drive, with the real test set. Because a splat is fitted to specific frames, evaluating on a nearby frame of the same sequence is a textbook leak: the scene memorized the answer. Split by scene, by session, by drive, never by frame.

Fidelity: measuring the sim-to-real gap per sample

Fidelity metrics come in two families matched to the two sensor modalities this chapter re-simulates. For camera output you hold out a real image at a known pose, render the scene from that exact pose, and compare. Pixel-space peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) measure low-level agreement, but they reward blur and miss the perceptual errors that break a detector, so pair them with a learned perceptual metric such as LPIPS, which correlates far better with how a downstream network sees the image. For lidar you compare the re-simulated point cloud against the real return: geometric error as a symmetric Chamfer distance or per-ray range error, plus intensity error if your model predicts reflectance, and, critically, a drop or spurious-point rate, because a re-simulator that silently deletes returns on dark or specular surfaces will teach a segmenter that those surfaces do not exist. The physics of why lidar drops returns on retroreflectors and wet asphalt is exactly the measurement-model material of Chapter 2, and a good re-simulator must reproduce those dropouts, not paper over them.

The subtlety that trips people up is that these are novel-view metrics, and they only mean something on poses genuinely held out of fitting. A splat evaluated on one of its own training views reports a gorgeous PSNR that certifies nothing. So the fitting split must reserve a set of frames the optimizer never touched, and fidelity is reported only there. The helper below computes the standard camera trio the honest way and enforces the held-out contract by refusing to score a pose that appears in the training set.

import numpy as np

def novel_view_fidelity(render, real, pose_id, train_pose_ids):
    """Per-sample camera fidelity, but only on genuinely held-out poses."""
    if pose_id in train_pose_ids:
        raise ValueError(f"pose {pose_id} was used to fit the scene: leaked metric")
    mse = np.mean((render.astype(np.float64) - real) ** 2)
    psnr = 10.0 * np.log10((255.0 ** 2) / max(mse, 1e-9))
    # SSIM / LPIPS omitted for brevity; use skimage.metrics + lpips in practice
    return {"psnr_db": round(psnr, 2), "mse": round(mse, 2)}

held_out = {17, 42, 88}          # frames reserved from fitting
train_ids = set(range(200)) - held_out
print(novel_view_fidelity(render_frame_42, real_frame_42, 42, train_ids))
# -> {'psnr_db': 24.7, 'mse': 220.1}
A leakage-guarded fidelity check: it computes novel-view PSNR but raises if asked to score a pose that was part of the fitting set, which is the single most common way neural-rendering evaluations quietly inflate their numbers. In production you would add SSIM and LPIPS from established libraries and a matching Chamfer/range routine for the lidar branch.

Library shortcut: do not hand-roll perceptual metrics

The naive version above is a teaching stub. In practice, torchmetrics gives you PSNR, SSIM, LPIPS, and FID as drop-in modules, and pytorch3d gives you a batched, differentiable Chamfer distance for the lidar branch. A validation report that would be roughly 150 lines of careful numpy (correct SSIM windowing, a pretrained LPIPS backbone, stable FID covariance estimation) collapses to about 10 lines of module construction and .update() calls, and the library handles the pretrained weights, GPU batching, and the numerical edge cases that make a from-scratch FID silently wrong.

Distribution and coverage: does the synthetic set span the real one

Per-sample fidelity is necessary but blind to the failure that most often ruins a data engine: mode collapse in what you choose to render. A pipeline that faithfully re-simulates only the conditions present in your source logs will produce a mountain of synthetic frames that are individually perfect and collectively redundant. Distributional validation treats the real and synthetic sets as two samples from two distributions and asks how far apart they are. In feature space, the Frechet Inception Distance (FID, and its cleaner successor for reused features) compares the mean and covariance of a perception backbone's activations on real versus synthetic images; for lidar, compare occupancy or point-density histograms and the distribution of returns per range bin. Beyond a single distance you want the two directional numbers of precision (are synthetic samples realistic, that is, do they fall inside the real manifold) and recall (does the synthetic set cover the real manifold, or has it collapsed onto a mode). A rare-event generator (Section 51.5) is precisely a bet on recall: you are manufacturing regions of the distribution that the real logs undersample, so you must measure that you actually reached them and did not just re-render the easy middle.

Practical example: an automotive data engine that passed fidelity and failed on-road

An autonomous-driving team fits per-scene Gaussian splats from fleet drives and re-simulates novel camera and lidar views to augment a pedestrian detector, aiming at the rare case of a child stepping out between parked cars. Their re-rendered validation views scored 27 dB PSNR and a low LPIPS: fidelity looked excellent. But road testing showed no improvement on real near-miss events. The distributional audit found the miss: every synthetic child was inserted at midday under clear skies, because that is when the source drives happened, so the FID against a night-and-rain real set was enormous and recall was near zero for low-light. The synthetic set was faithful and useless. Adding varied relighting and re-simulating lidar with correct wet-road dropouts closed the FID gap, and only then did TSTR show a real recall gain on held-out night scenes. The lesson is that they would have shipped a poisoned augmentation had they trusted the fidelity layer alone. This connects directly to the BEV and 3D-occupancy detectors of Chapter 43, which consume exactly this kind of multi-view synthetic data.

The task layer, leakage, and calibration

The task layer runs the TSTR and TRTS experiments and reads them against a real-only baseline. The number to move is downstream performance on the held-out real test set, whatever your task metric is: mean average precision for a detector, intersection-over-union for a segmenter. A synthetic pipeline earns its keep when real-plus-synthetic beats real-alone on that metric, especially on the tail slices you built the synthetic data to cover. Two guardrails make this trustworthy. First, leakage discipline: the drives whose logs were fitted into scenes must be entirely disjoint from the drives in the real test set, split by session and geography, or you are testing whether a splat can memorize, which it can. Second, calibration: a model trained partly on synthetic data often becomes overconfident on the synthetic-looking part of the real distribution, so re-check its calibration with the reliability diagrams and conformal methods of Chapter 18. A pipeline that raises accuracy while wrecking calibration has not passed; it has moved the problem somewhere a naive accuracy number will not show it.

Research frontier: validating splat-based sensor simulators

The current frontier is joint lidar-camera neural simulators such as SplatAD and closed-loop driving-simulation stacks like NeuRAD and the UniSim line, which re-simulate full multi-sensor rigs from real drives. Their validation is still an open problem: the field has largely standardized on novel-view PSNR/SSIM/LPIPS plus lidar Chamfer and depth error, but there is active work on closed-loop validation, where the synthetic sensor stream drives a full autonomy policy and the metric is downstream driving behavior rather than per-frame pixels. Benchmarks such as nuScenes and Waymo Open provide the real reference distributions, and the emerging consensus is that a simulator is only validated to the extent that a policy trained or tested in it transfers to the real fleet. Expect the reported metric in the next few years to shift from image similarity toward held-out, task-conditioned transfer.

Exercise

Take a Gaussian-splat scene fitted from a driving sequence. (1) Reserve every tenth frame from fitting and report novel-view PSNR, SSIM, and LPIPS on those held-out frames only. (2) Render 500 novel views under varied simulated lighting and compute FID against a real image set from a different drive; also estimate precision and recall in the backbone feature space. (3) Train a small object detector on real-plus-synthetic and on real-only, evaluate both on a real held-out drive split by session, and report the change in mAP overall and on the low-light slice. State which of the three layers, if any, your pipeline fails.

Self-check

1. Why is a PSNR of 30 dB on a training-set pose almost meaningless as validation, and what must be true of the pose for the number to count?

2. A pipeline shows excellent per-frame LPIPS but a large FID against the real test distribution. What kind of failure is this, and which downstream symptom would you expect?

3. You split your evaluation by frame instead of by drive, reserving frame 51 of a 100-frame sequence as the test frame. Explain precisely how the fitted splat leaks the answer.

Lab 51

reconstruct a scene with Gaussian splatting and re-simulate a sensor view for augmentation.

Bibliography

Neural rendering and re-simulation for sensors

Kerbl, Kopanas, Leimkuhler, Drettakis (2023). 3D Gaussian Splatting for Real-Time Radiance Field Rendering. ACM TOG (SIGGRAPH).

The representation whose re-rendered views you validate here; its own evaluation reports novel-view PSNR/SSIM/LPIPS, the fidelity layer of this section.

Tonderski, Lindstrom, Hess, Ljungbergh, Svensson, Petersson (2023). NeuRAD: Neural Rendering for Autonomous Driving. CVPR 2024.

A sensor-realistic neural simulator for driving; its ablations are a model of reporting both camera and lidar fidelity against real held-out sensor data.

Hess, Tonderski, Petersson, Astrom, Svensson (2024). SplatAD: Real-Time Lidar and Camera Rendering with 3D Gaussian Splatting for Autonomous Driving. 2024.

Joint lidar-camera splatting; the current frontier for the kind of pipeline whose validation this section formalizes.

Yang, Chen, Wang, et al. (2023). UniSim: A Neural Closed-Loop Sensor Simulator. CVPR 2023.

Argues for closed-loop, policy-level validation of sensor simulators rather than per-frame pixel similarity alone.

Fidelity and distributional metrics

Zhang, Isola, Efros, Shechtman, Wang (2018). The Unreasonable Effectiveness of Deep Features as a Perceptual Metric (LPIPS). CVPR 2018.

Establishes the learned perceptual metric that correlates with how networks see images, the fidelity metric to trust over raw PSNR.

Heusel, Ramsauer, Unterthiner, Nessler, Hochreiter (2017). GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium (FID). NeurIPS 2017.

Introduces the Frechet Inception Distance, the workhorse of the distributional layer for synthetic image sets.

Kynkaanniemi, Karras, Laine, Lehtinen, Aila (2019). Improved Precision and Recall Metric for Assessing Generative Models. NeurIPS 2019.

The precision/recall decomposition that separates "synthetic looks real" from "synthetic covers real," essential for auditing rare-event coverage.

Reference distributions and downstream validation

Caesar, Bankiti, Lang, et al. (2020). nuScenes: A Multimodal Dataset for Autonomous Driving. CVPR 2020.

A standard real multi-sensor distribution against which synthetic camera and lidar sets are compared and on which held-out downstream tests are run.

Sun, Kretzschmar, Dotiwalla, et al. (2020). Scalability in Perception for Autonomous Driving: Waymo Open Dataset. CVPR 2020.

A second large real reference distribution with session-level structure, enabling the split-by-drive discipline this section requires.

What's Next

In Chapter 52, the same reconstructed scenes stop being an offline data factory and start being built online: SLAM and Spatial AI turn the fit budget into a live mapping loop, and the validation instincts you built here (held-out poses, geometric error, no frame-level leakage) become the trajectory and map-quality benchmarks that decide whether a robot actually knows where it is.