Skip to content

Video understanding, tracking, generation, and world models · World models and dynamic 3D · VID066 · Model

V-JEPA 2 and action-conditioned post-training

Extends latent predictive video learning and adds action-conditioned world-model post-training for planning. It separates broad action-free representation learning from a later stage using robot interaction…

Explained here Component demo, not a trained model CodeSplash's run and the reference's record

In CodeSplash

Documented in the Academy only. There's no Set up button.

Availability
Explained here
Code example
Component demo, not a trained model
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Extends latent predictive video learning and adds action-conditioned world-model post-training for planning. It separates broad action-free representation learning from a later stage using robot interaction trajectories, an important distinction when describing supervision.

Question / objective

Predict, control or reconstruct dynamic visual scenes under an explicit observation/action/camera model. This is a learning or inference objective, not a test of a statistical null hypothesis.

Method type and supervision

model · World models and dynamic 3D. Mixed: passive video learning, interaction-conditioned learning, or scene fitting from calibrated observations.

Architecture / computational structure

Pretrained latent video encoder plus action-conditioned predictive dynamics and a latent-goal planner.

Assumptions

Inputs must satisfy the temporal, modality and annotation protocol described below. Action-free pretraining does not make action-conditioned post-training free of action information. Latent closeness may omit task-critical constraints, and demonstrations in specified robot settings do not prove general physical competence.

Formula / computational definition

z^t+1=Fθ(z≤t,a≤t)\hat z_{t+1}=F_\theta(z_{\le t},a_{\le t}) predicts future latent state; planning can minimize ∥z^t+H−zgoal∥\|\hat z_{t+H}-z_{goal}\| over candidate action sequences. This schematic captures latent goal planning, not the complete published objective.

Parameters and notation

Learned/estimated quantities: Learned quantities depend on the system: dynamics/representation weights or scene-specific geometry, motion, appearance and opacity; planning actions are optimized inputs. Symbols specific to the objective are defined with the equation. Hyperparameters and design choices: Frozen encoder, interaction-data coverage, action representation, prediction horizon, planning optimizer and goal metric matter.

Fitting, fine-tuning, and adaptation

Keep the visual encoder fixed initially while learning action-conditioned dynamics from interaction trajectories. Tune planning separately; confirm that latent goal progress predicts actual task success. Use a separate adaptation validation split, monitor the target metric and retention of previously useful behavior, and save the exact preprocessing and training configuration.

How to use and calibrate

Fix the input protocol and target before fitting; choose design settings on held-out source videos, then freeze the evaluation procedure. Report motion understanding separately from robot success rates, including task distribution, repeated trials and out-of-domain performance.

Example application

Plan short robot actions toward an image-defined goal.

Interpretation / pitfalls

Watch out

An optimized training objective or a favorable example does not establish generalization. Report motion understanding separately from robot success rates, including task distribution, repeated trials and out-of-domain performance. The example below isolates one mechanism and cannot substantiate a full-model benchmark claim.

Python and R code examples

Component: Choose an action sequence by a latent goal-distance objective. Dependencies: NumPy in Python; base R in R; run the shared setup above. Python component: executed successfully. R component: unexecuted. No complete model training or pretrained inference was executed.

Full implementation route — Python: Use the official facebookresearch/vjepa2 implementation and distinguish encoder checkpoints from action-conditioned models. R: Prototype latent rollout and goal-distance planning in R; bridge the trained encoder and action model for substantive experiments.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Component demo, not a trained model — Choose an action sequence by a latent goal-distance objective.

Shared setup for this chapter
import numpy as np

def softmax(x):
    z = np.asarray(x, dtype=float)
    e = np.exp(z - z.max())
    return e / e.sum()
candidates = np.array([[1.,1.],[1.,-1.],[-1.,-1.]])
goal = 2.; initial = 0.
predicted_goal = initial+candidates.sum(axis=1)
cost = (predicted_goal-goal)**2
print("chosen sequence",candidates[cost.argmin()],"costs",cost)
# Dynamics here are exact toy addition, not a learned V-JEPA 2-AC model.
R

Component demo, not a trained model — Choose an action sequence by a latent goal-distance objective.

Shared setup for this chapter
softmax <- function(x) {
  e <- exp(x - max(x))
  e / sum(e)
}
candidates <- rbind(c(1,1),c(1,-1),c(-1,-1))
goal <- 2; initial <- 0
predicted_goal <- initial+rowSums(candidates)
cost <- (predicted_goal-goal)^2
print(candidates[which.min(cost),]); print(cost)
# Exact toy dynamics; the trained model is not implemented here.

Sources

From the CodeSplash reference, entry VID066.