# VideoVAE+ vs Cosmos — Latent tokenizer diagnostic for visuo-tactile world model **Timeline**: 2026-07-02 to 2026-07-03. Diagnosing whether our current VideoVAE+ latent tokenizer has architectural issues that hurt downstream world model training, and whether NVIDIA's Cosmos Tokenizer CV4x8x8 is a viable replacement. ## TL;DR Two architectural issues found in VideoVAE+, both **absent in Cosmos**: 1. **Right-bottom spatial hotspot** — `Downsample2plus1D` uses asymmetric zero-pad on right + bottom (`autoencoder2plus1d_1dcnn.py:396`), accumulated over 3 downsample layers, produces a systematic (15, 15) activation on uniform mid-gray inputs. Content-dependent via GroupNorm suppression → `delta-to-ref` does NOT fully cancel it. 2. **Temporal boundary bleed (ti=0 has 5× baseline magnitude)** — spatial encoder's `TemporalAttention` uses RelativePosition embeddings with full-bidirectional attention (no causal mask) + `EncoderTemporal1DCNN` front- only replicate pad accumulates over 2 downsample layers, biasing ti=0 by 5× and ti=1 by 1.7× on identical inputs. This is also a **training-time information leak**: history latents encode future raw frames through bidirectional attention. **Cosmos verification**: `CausalConv3d` uses strict left-only replication pad; `CausalTemporalAttnBlock` uses lower-triangular mask. For 16 identical raw frames, Cosmos produces 5 latent frames identical to 4 decimal digits (drift mean = 0.0000, ~bf16 precision noise). **Cosmos reconstruction beats VideoVAE+ on tactile by 6–8 dB PSNR** even though Cosmos is **zero-shot on tactile** and VideoVAE+ was finetuned on our exact tactile distribution. Visual: VideoVAE+ leads by ~3 dB. **Recommendation**: switch tokenizer to Cosmos CV4x8x8. No tactile finetune needed. Visual gap is acceptable and can be closed later if it becomes a world-model bottleneck. --- ## Experiments (chronological) | # | Directory | What | Key finding | |---|---|---|---| | 01 | [`01_tactile_delta_heatmaps_p01_vs_p01rand/`](./01_tactile_delta_heatmaps_p01_vs_p01rand) | Tactile Δ heatmaps on 5 episodes × 2 sides × 2 ref modes | Contact regions concentrate in 3-6 latent tokens; p01rand pool covers 8-19% of frames | | 02 | [`02_videovae_tactile_debug/`](./02_videovae_tactile_debug) | VideoVAE+ tactile-finetuned encoder — synthetic input / per-row vmax / temporal identity | gray-192 argmax = (15,15); ti=0 max = 5× baseline; ti=1 max = 1.7× | | 03 | [`03_videovae_visual_debug_base_vae/`](./03_videovae_visual_debug_base_vae) | Base VideoVAE+ (visual) — same 3 tests | Same artifacts as tactile — confirmed architectural, not finetune-specific | | 04 | [`04_videovae_full_latents_tactile_ep000/`](./04_videovae_full_latents_tactile_ep000) | Every latent frame of ep_000 as MP4 (tactile) | 3-panel per-frame video: raw + \|z\| global vmax + \|z\| per-frame vmax | | 05 | [`05_videovae_full_latents_visual_ep000/`](./05_videovae_full_latents_visual_ep000) | Every latent frame of ep_000 as MP4 (visual_left, base VAE) | Same layout for direct A/B viewing with tactile | | 06 | [`06_cosmos_debug/`](./06_cosmos_debug) | Cosmos CV4x8x8 causality verification | drift mean = 0.0000 on 16 identical frames; hotspot much weaker | | 07 | [`07_cosmos_vs_videovae_recon/`](./07_cosmos_vs_videovae_recon) | encode+decode reconstruction A/B on all 5 streams | **Cosmos beats VideoVAE+ on tactile by +6-8 dB PSNR (zero-shot)**; VVAE+ leads visual by +3 dB | | 08 | [`08_cosmos_full_latents_ep000/`](./08_cosmos_full_latents_ep000) | Cosmos full-episode latent videos + p01 Δ heatmaps (all 5 streams) | Cosmos latent 5-7× smaller magnitude, cleaner spatial distribution | ## Code All scripts committed to `scripts/` in the training repo: - `viz_tactile_latent_delta.py` — experiment 01 - `debug_tactile_latent_bias.py` — experiment 02 - `debug_visual_latent_bias.py` — experiment 03 - `viz_all_latents_video.py` — experiments 04 + 05 - `debug_cosmos_latent.py` — experiment 06 - `compare_recon_cosmos_vs_videovae.py` — experiment 07 - `viz_cosmos_episode.py` — experiment 08 ## Reconstruction metrics summary From experiment 07, on `episode_000` raw frames [1000, 1016): | stream | Cosmos PSNR | Cosmos SSIM | VideoVAE+ PSNR | VideoVAE+ SSIM | |---|---|---|---|---| | visual_left | 30.04 | 0.892 | **32.99** | **0.949** | | visual_middle | 29.94 | 0.885 | **33.20** | **0.945** | | visual_right | 28.82 | 0.889 | **32.10** | **0.948** | | tactile_left | **43.98** | **0.971** | 37.42 | 0.965 | | tactile_right | **46.68** | **0.983** | 38.83 | 0.979 | ## Next steps - Robustness check across more episodes / segments - Full-dataset re-encoding with Cosmos if the finding holds - Smoke train on Cosmos latents to check world-model rollout quality