Reason about long-horizon dynamics by disentangling structure and motion in video VAE latents. Learn continuous latent motion chains that preserve temporal coherence while predicting terminal keyframes, enabling efficient reasoning about multi-step scenarios.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Reason about long-horizon dynamics by disentangling structure and motion in video VAE latents. Learn continuous latent motion chains that preserve temporal coherence while predicting terminal keyframes, enabling efficient reasoning about multi-step scenarios.
Chain of World: Latent Motion Reasoning for Long-Horizon Planning
Traditional world models either predict dense frame sequences (computationally expensive) or use discrete action sequences (temporally discontinuous). Chain of World introduces a middle ground: learn continuous latent motion representations extracted from video VAE latents, then reason about multi-step trajectories as chains of motion in latent space. This approach preserves temporal structure while dramatically reducing computational requirements.
The core insight is to decompose each video segment into separable structure (static semantic content) and motion (how objects move). Reasoning then operates on compact continuous motion representations rather than full frames or discrete actions.
Core Concept
Chain of World implements three coordinated mechanisms:
Structure-Motion Disentanglement: Use pretrained video VAE to factorize scene into static structure latents and dynamic motion latents
Continuous Latent Motion Chains: Learn to predict chains of motion latents, which implicitly define object trajectories
Terminal Keyframe Prediction: Predict end-state visuals from motion chains, reconstructing the trajectory from sparse keyframes
Architecture Overview
Input: Video segments or action sequences with visual context
Video VAE Encoder: Decompose into structure (global semantics) and motion (directional dynamics)
Motion Chain Generator: Predict sequences of motion latents given instruction
Keyframe Decoder: Convert predicted motion chains to visual output
Output: Structured representations of multi-step scenarios
Implementation Steps
Step 1: Implement structure-motion decomposition
Extract separable structure and motion from pretrained video VAE.
classVideoVAEDecomposer:
"""
Decompose video into structure and motion latents using pretrained VAE.
"""def__init__(self, pretrained_vae_path):
"""Load pretrained video VAE (e.g., VideoMAE)."""self.vae = load_pretrained_vae(pretrained_vae_path)
self.structure_dim =
.motion_dim =
():
segment_latent = .vae.encode(video_segment)
structure_latent = segment_latent[:, :.structure_dim]
motion_latents = []
t ((video_segment) - ):
frame_t = .vae.encode(video_segment[t:t+])
frame_t1 = .vae.encode(video_segment[t+:t+])
motion_t = frame_t1 - frame_t
motion_latents.append(motion_t[:, .structure_dim:])
motion_latents = np.stack(motion_latents, axis=).squeeze()
structure_latent, motion_latents
():
magnitude = np.linalg.norm(motion_latent)
magnitude > :
direction = motion_latent / magnitude
:
direction = np.zeros_like(motion_latent)
direction, magnitude
32
self
32
def
decompose_segment
self, video_segment
"""
Decompose video segment into structure and motion.
video_segment: shape (T, H, W, 3) — T frames of video
Returns:
structure_latent: (1, 32) — global semantic content
motion_latents: (T-1, 32) — per-frame motion
"""
# Encode full segment
self
# Shape: (1, 64)
# Split into structure and motion components
self
# Motion: computed via optical flow-like differencing in latent space
for
in
range
len
1
# Encode consecutive frames
self
1
self
1
2
# Motion is frame-to-frame difference
self
1
0
return
def
extract_motion_direction
self, motion_latent
"""
Extract directional components (e.g., velocity) from motion latent.
"""
# Normalize to unit direction vector
if
1e-6
else
return
Step 2: Model continuous latent motion chains
Learn to generate sequences of motion latents that form coherent trajectories.