Projects

su-JEPA

2026-10-07 · retrospective

This began as an experiment to get comfortable training a world model end to end — data collection, dynamics model, decoder, evaluation — on ARC-AGI-3 gameplay. It is not a solver: there is no agent here and no planning. This page is the short version of what the exercise found, the recipe, and where it does not hold up.

ARC-AGI-3 hands you five never-seen interactive games and scores how well an agent solves them. The bet I wanted to test was modest: can a JEPA-style latent dynamics model, trained only on exploration recordings, learn gameplay dynamics well enough to be a substrate for a later agent — one that explores, plans in latent space, and fine-tunes on a new game as it plays. Code is at github.com/densudk/su-jepa.

What it is

A per-frame CNN encoder compresses each 64×64 frame into one 512-d latent; a causal transformer predictor takes (latent, action) and predicts the next latent as a residual delta. There is no EMA teacher and no stop-gradient — LayerNorm plus SIGReg (λ=1) are what keep the latents from collapsing. A separate frozen-encoder readout decodes latents back to pixels for visualization and measurement.

The recipe

What worked

On held-out episodes of the trained games the one-step dynamics is solid: prediction loss fell from ~1.0 to ~0.17, predicted and true next latents agree at cosine ~0.89, and the decoder renders ~90% of changed pixels correctly — and it was still improving when I stopped it. On games the model has seen, it both predicts the next state and can draw it.

side-by-side animation: real next frame vs world model's one-step predicted frame on a held-out ls20 episode
real vs predicted (ls20 holdout · one step)

Honest footnote: an early loss-averaging bug inflated every reported prediction loss by the latent dimension. Gradients were unaffected, but the λ·SIGReg term was diluted, so old numbers need rescaling by the latent dim to be comparable.

Where it breaks

Takeaway

The pipeline is sound and measured, and the model learns the dynamics of the games it saw — it can predict them and imagine them. But generalization to new games, the only thing the benchmark rewards, did not come out of this recipe: 20 games of pure exploration is too narrow a distribution, and repetition cannot buy the missing diversity. If this line continues, the unlock is more diverse environments — new games, new mechanics, a synthetic-world generator — before more compute.

The DAG edge-packing scheme I designed along the way — packing whole prefix trees of gameplay so shared prefixes are paid for once — is gone from the training path; with short windows and a flat per-position loss profile its shared-prefix savings stopped mattering. The write-up lives here.