CodecMem Fast and Adaptive Visual Memory for Video and World Models

1NVIDIA 2Stanford University 3UIUC
†Work done while at NVIDIA
Background: a 60 s video generated with codec memory
Scroll
Method

A motion-compensated tubelet codec as the memory of a video model

World action model (top left): tokens of the 4 frames on screen, drawn to scale. Counts are for the whole three-camera input.

Dense frame340 tokens
Codec memory (ours)8 tokens

Clip so far: codec memory 551 tokens compared to 11,900 for dense attention, 21.6× fewer

The codec at work. Green boxes are the tubelets that the codec selects for each window of 4 frames, on four kinds of input from this page. It stores tubelets only where warping its previous reconstruction fails, so a still scene costs nothing and fast motion costs more. Every tubelet costs the same as a 32×32 pixel region of a dense window, whatever its size; percentages are relative to a dense window. The video generation and spatial memory models cap the budget at 12.5%; the world action models have no cap and stop at the quality gate.

CodecMem is a fast and adaptive codec for long-context video and world models. To encode an observation, it warps its own reconstruction of the previous frame with estimated flow and stores additional multi-scale tubelets only where this warping fails. The video model is conditioned on this codec memory, which spans the whole history, in place of dense attention over every token of every past frame.

100+ fpscodec speed; selection needs no training
18×fewer inference FLOPs than dense attention on our benchmark
1staverage rank among 12 compressed-memory baselines
60 sof context in retrieval, tracking and spatial memory tasks

How it works

Flowreference → next frame
The codec's reconstruction of frame 76 and the real frame 77, shown in turn, with teal arrows for the flow from the reference to the next frame
reconstructed 76real 77
Predictionreuse flow across window
The prediction of frames 77 to 80: the reconstruction of frame 76 warped by the flow
77787980
Prediction errorselect tubelets by error
The prediction error of frames 77 to 80 as a heat map, with green boxes on the 18 selected tubelets33 dB
no tubelet
77787980
40 dB28 dB gate15 dB
Reconstructionprediction + pasted tubelets
The reconstruction of frames 77 to 80: the prediction with the tubelets pasted in the green boxes
77787980

Frame 80 is the next window’s reference

Past video
564 tubelets from 32 windows

frozen VAE
a 32 pixel tubelet
32
a 64 pixel tubelet
64
a 128 pixel tubelet
128 px

2 × 2 tokens

Sinkdense
Recent chunkdense

Codec memory

DiTfine-tuned
+ actions (optional)

Next chunk

Fine-tuning
next chunk + noise

Real codec outputs on one video. Top: one window, frames 77–80; teal arrows show the flow, drawn 8× longer than the motion. Bottom: the tubelets the codec stores for chunks 1–8. Each stack is one tubelet, the 4 frames of its box, drawn larger for a larger box; the frozen VAE turns it into its region of the latents, pooled to 2 × 2 tokens.
Long-context benchmark

CodecMem is in the top three on every metric of the three tasks and has by far the best average rank. Ranked among the 13 compressed memories, which all get the same memory budget.

↑ BetterAverage rank on 3 tasks
Video generation
VBench total, higher is better

Distilled autoregressive video models. Baseline numbers are from Causal Forcing.

Robot manipulation
RoboMME success over all tasks, %

Cosmos 3 with keyframes is the same policy as ours, given 32 evenly spaced keyframes in place of codec memory.

Context tokens
Codec memory compared to dense attention

Each blue block holds as many tokens as the whole codec memory.

The interactive charts could not be loaded; all numbers are in the table below.

Summary. Top: score against inference cost for every method on our long-context benchmark. CodecMem has by far the best average rank of the compressed memories, at one of the lowest inference costs. Bottom: CodecMem has the best VBench total and the best RoboMME success. Its memory holds 23× fewer context tokens than dense attention in long video generation, and 10× fewer in a world action model.
Numbers as a table
Long-context benchmark. Inference PFLOPs are per generated chunk; the cache is the largest KV cache. Lower ranks are better; dense attention and VSA are not ranked.
MethodRetrievalTracking, %Spatial memoryAvg. rankEfficiency, 30 s of contextEff. rank
fg-PSNRfg-SSIMIn dist.Extrap.PSNRLPIPSCache, GBTrain, PFInfer., PF
Full memory, unlimited budget
Dense attention22.090.90199.685.220.120.256–39.717.655.73–
VSA19.090.85199.679.020.270.265–40.35.821.85–
Compressed memory, limited budget
WorldKV7.160.21399.481.419.190.3035.319.817.65†1.8710.7
MosaiChunk15.760.66751.131.916.360.5008.339.717.651.9511.3
DeCoPrune7.800.25699.673.317.630.4035.35.217.65†13.249.0
RECAP-Forcing5.830.14899.579.016.960.4617.85.217.65†1.868.0
FramePack11.140.42566.535.018.100.3906.20.2‡0.961.145.7
MilliVid10.190.36395.061.117.410.4486.75.20.690.374.0
DC-Gen14.290.57898.473.117.490.4495.34.90.560.292.3
Helios11.700.45067.235.018.410.3875.35.20.870.385.0
GDN7.840.21591.158.516.970.4648.20.92.450.855.7
TTT5.520.12734.128.014.300.62912.75.22.871.047.0
LongLive-RAG5.440.12856.630.816.730.44310.839.7§0.860.387.3
MemLearner7.520.21458.418.920.290.2287.26.60.250.284.0
CodecMem (ours)21.150.87999.590.819.970.2761.55.20.640.323.3

† Inference-time pruning on the dense-attention backbone. ‡ Recomputes its context at every step. § KV of all frames offloaded to CPU. ¶ Frozen dense-attention backbone and router distilled from it.

VBench of distilled autoregressive video models. Baseline numbers are from Causal Forcing.
MethodTotalQualitySemantic
CausVid81.3383.9870.72
Self Forcing83.7484.4880.77
Causal Forcing84.0484.5981.84
CodecMem, built on Self Forcing84.4385.4480.38
RoboMME success over all tasks, %.
MethodSuccess, %
Fast-WAM11.3
LingBot-VA (time-aware)40.4
RTP48.6
Cosmos 3 (keyframes)28.8
CodecMem71.3
Context tokens of codec memory, compared to dense attention, and speed of the codec.
ExampleContext tokensCodec speed
Long video generation, new chunk at 58 s23× fewer118 fps at 1024×576
World action model, new observation at 20 s10× fewer126 fps at 640×544
Long video generation

60 s videos with codec memory

We distill a pre-trained video model with codec memory to generate 60 s videos in 4 sampling steps at 1024×576. Each video follows a sequence of five captions. On 64 such prompts, a VLM judge rates only 2 of the 64 videos as strongly drifting. The videos are shown without sound.

▶ Play 60 s

Pottery studio

An older potter with silver hair teaches a teenage student in a gray apron at the wheel of a sunlit pottery studio.

  1. The potter guides the student's hands, and the red clay rises into a first bowl.
  2. The student cuts the bowl from the wheel with a wire and lifts it onto a wooden board.
  3. The student sets the bowl on the drying rack by the window, near a brick kiln, and they return to the wheel with a fresh ball of clay.
  4. The student centers and opens the clay alone while the potter watches.
  5. The student shapes a small vase and smooths its rim with a sponge.

Home kitchen

A woman with curly dark hair and a striped apron and a tall man with a beard in a blue shirt cook at a wooden island in a bright home kitchen.

  1. She kneads and cuts pasta dough while he cooks tomato sauce.
  2. They toss the pasta in the sauce and plate it, and he pours two glasses of red wine.
  3. They toast and eat side by side at the island.
  4. She brushes flour from his beard, he wipes his face with a dish towel, and they make strawberries with whipped cream.
  5. They eat dessert and then wash the dishes together at the sink.

Mountain meadow

A rider in a brown leather jacket and a wide-brimmed hat rides a chestnut horse through a meadow below snowcapped mountains.

  1. They gallop across the meadow, and a herd of wild horses runs alongside.
  2. At sunset they ride down the slope and across a stream to a small lake where the herd grazes.
  3. A pale gray mare touches noses with the chestnut horse, and the rider lets it drink.
  4. The rider takes off the saddle under a lone pine and lights a campfire.
  5. At night the rider rests against the saddle by the fire as a full moon rises over the lake.

Classroom

A young teacher in a mustard sweater and a group of excited children stand around a papier-mache volcano in an elementary school classroom.

  1. The teacher pours vinegar into the crater, and red foam erupts.
  2. A boy pours again, the foam drips onto the floor, and the teacher writes “dish soap” on the whiteboard.
  3. With dish soap added, a tall tower of red foam rises out of the crater.
  4. A girl with braids measures the tower with a ruler, and it topples onto the sneakers of a boy with glasses.
  5. The children go to their desks and draw the experiment.

Bakery

A baker with rolled-up sleeves, a white apron, and a flour-dusted beard works in a small artisan bakery with a large brick oven.

  1. Before dawn he shapes and scores loaves, bakes them, and flips the door sign to open.
  2. In the morning an elderly woman in a green wool coat buys a round loaf and waves goodbye.
  3. He kneads fresh dough, braids it into loaves, glazes them with egg, and sprinkles sesame seeds.
  4. He slides the braids into the oven, sets a timer, and drinks a cup of coffee.
  5. The timer rings, and he takes out the golden braids and tastes one.

Pizza oven

A pizzaiolo with a graying mustache and a white apron teaches a young couple, a woman in a yellow sundress and a man in a gray linen shirt, at a wood-fired brick oven on a stone patio at dusk.

  1. He shows them how to stretch the dough, and the couple pulls a second ball into a thin round together.
  2. The woman spreads tomato sauce, the man adds mozzarella and a smile of basil leaves, and the pizzaiolo drizzles olive oil.
  3. The pizzaiolo carries the pizza to the oven and slides it onto the hot floor.
  4. They watch the crust puff while he turns the pizza toward the flames, and he draws it out.
  5. He slices the pizza at the table, and the couple eats the first slices.

Space station

An astronaut with dark curly hair in a blue flight suit and an astronaut with a blond beard in a gray polo shirt float at an open wall panel inside a space station module.

  1. He holds a flashlight while she finds a loose connector and unscrews the inner cover.
  2. A screw tumbles away, he glides after it and catches it, and she pushes the connector into its socket.
  3. She drives the screws back in, and the camera drifts down the module to a round window that looks down on the Earth.
  4. The sun rises over the horizon, the camera floats back to them, and the lights of the panel turn from red to green.
  5. They bump fists and float to the window to watch the sunrise.

Tavern

A weary knight in chainmail and a muddy gray cloak enters a candlelit stone tavern on a stormy night, where an innkeeper with a red braid stands behind a long oak bar.

  1. The knight shuts the door against the storm, crosses the room past a lute player by the hearth, and sits at the bar.
  2. The innkeeper draws a tankard of ale, he drinks, and she asks where he is heading.
  3. She ladles stew from the pot over the fire and tears off bread, and he hangs his cloak by the hearth.
  4. He eats at a small table by the fire, and the lute player strikes up a brighter tune.
  5. He pays with a silver coin for a room, and she points him up the stairs.

Eight of the 64 prompts. The prompts are shortened here; each numbered event corresponds to one of the five captions.

Comparison with other MiniMax-H3 methods

MosaiChunk and RAVEN build on the same pre-trained model, MiniMax-H3. A VLM judge scores the 64 silent videos of each method.

MosaiChunkRAVENCodecMem (ours)
12345MosaiChunk, Prompt following: 2.032.03RAVEN, Prompt following: 2.012.01CodecMem (ours), Prompt following: 3.383.38Prompt followingMosaiChunk, Drift: 2.702.70RAVEN, Drift: 2.592.59CodecMem (ours), Drift: 3.213.21DriftMosaiChunk, Visual quality: 3.343.34RAVEN, Visual quality: 3.343.34CodecMem (ours), Visual quality: 3.413.41Visual qualityMosaiChunk, Dynamics: 2.782.78RAVEN, Dynamics: 2.812.81CodecMem (ours), Dynamics: 3.623.62DynamicsJudge score, 1 to 5 (higher is better)
016324864MosaiChunk, Strong drift: 26/6426/64RAVEN, Strong drift: 32/6432/64CodecMem (ours), Strong drift: 2/642/64Strong driftVideos of 64 (lower is better)
VLM judge on 64 one-minute videos, without sound. Scores are averaged over the prompts; a drift score of 5 means no drift. Strong drift counts the videos with a drift score of 2 or less.
Numbers as a table
MethodPrompt followingDriftVisual qualityDynamicsStrong drift
MosaiChunk2.032.703.342.7826/64
RAVEN2.012.593.342.8132/64
CodecMem (ours)3.383.213.413.622/64

Below, the eight prompts of the gallery for all three methods. The videos play in sync, and the caption that is active at the current time is highlighted.

Prompt
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. An older potter with silver hair teaches a teenage student in a gray apron at the wheel of a sunlit pottery studio.

0–15 sThe potter guides the student's hands, and the red clay rises into a first bowl.
15–26 sThe student cuts the bowl from the wheel with a wire and lifts it onto a wooden board.
26–36 sThe student sets the bowl on the drying rack by the window, near a brick kiln, and they return to the wheel with a fresh ball of clay.
36–47 sThe student centers and opens the clay alone while the potter watches.
47–60 sThe student shapes a small vase and smooths its rim with a sponge.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. A woman with curly dark hair and a striped apron and a tall man with a beard in a blue shirt cook at a wooden island in a bright home kitchen.

0–15 sShe kneads and cuts pasta dough while he cooks tomato sauce.
15–26 sThey toss the pasta in the sauce and plate it, and he pours two glasses of red wine.
26–36 sThey toast and eat side by side at the island.
36–47 sShe brushes flour from his beard, he wipes his face with a dish towel, and they make strawberries with whipped cream.
47–60 sThey eat dessert and then wash the dishes together at the sink.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. A rider in a brown leather jacket and a wide-brimmed hat rides a chestnut horse through a meadow below snowcapped mountains.

0–15 sThey gallop across the meadow, and a herd of wild horses runs alongside.
15–26 sAt sunset they ride down the slope and across a stream to a small lake where the herd grazes.
26–36 sA pale gray mare touches noses with the chestnut horse, and the rider lets it drink.
36–47 sThe rider takes off the saddle under a lone pine and lights a campfire.
47–60 sAt night the rider rests against the saddle by the fire as a full moon rises over the lake.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. A young teacher in a mustard sweater and a group of excited children stand around a papier-mache volcano in an elementary school classroom.

0–15 sThe teacher pours vinegar into the crater, and red foam erupts.
15–26 sA boy pours again, the foam drips onto the floor, and the teacher writes “dish soap” on the whiteboard.
26–36 sWith dish soap added, a tall tower of red foam rises out of the crater.
36–47 sA girl with braids measures the tower with a ruler, and it topples onto the sneakers of a boy with glasses.
47–60 sThe children go to their desks and draw the experiment.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. A baker with rolled-up sleeves, a white apron, and a flour-dusted beard works in a small artisan bakery with a large brick oven.

0–15 sBefore dawn he shapes and scores loaves, bakes them, and flips the door sign to open.
15–26 sIn the morning an elderly woman in a green wool coat buys a round loaf and waves goodbye.
26–36 sHe kneads fresh dough, braids it into loaves, glazes them with egg, and sprinkles sesame seeds.
36–47 sHe slides the braids into the oven, sets a timer, and drinks a cup of coffee.
47–60 sThe timer rings, and he takes out the golden braids and tastes one.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. A pizzaiolo with a graying mustache and a white apron teaches a young couple, a woman in a yellow sundress and a man in a gray linen shirt, at a wood-fired brick oven on a stone patio at dusk.

0–15 sHe shows them how to stretch the dough, and the couple pulls a second ball into a thin round together.
15–26 sThe woman spreads tomato sauce, the man adds mozzarella and a smile of basil leaves, and the pizzaiolo drizzles olive oil.
26–36 sThe pizzaiolo carries the pizza to the oven and slides it onto the hot floor.
36–47 sThey watch the crust puff while he turns the pizza toward the flames, and he draws it out.
47–60 sHe slices the pizza at the table, and the couple eats the first slices.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. An astronaut with dark curly hair in a blue flight suit and an astronaut with a blond beard in a gray polo shirt float at an open wall panel inside a space station module.

0–15 sHe holds a flashlight while she finds a loose connector and unscrews the inner cover.
15–26 sA screw tumbles away, he glides after it and catches it, and she pushes the connector into its socket.
26–36 sShe drives the screws back in, and the camera drifts down the module to a round window that looks down on the Earth.
36–47 sThe sun rises over the horizon, the camera floats back to them, and the lights of the panel turn from red to green.
47–60 sThey bump fists and float to the window to watch the sunrise.
MosaiChunkRAVENCodecMem (ours)
▶ Play 60 s

Prompt. A weary knight in chainmail and a muddy gray cloak enters a candlelit stone tavern on a stormy night, where an innkeeper with a red braid stands behind a long oak bar.

0–15 sThe knight shuts the door against the storm, crosses the room past a lute player by the hearth, and sits at the bar.
15–26 sThe innkeeper draws a tankard of ale, he drinks, and she asks where he is heading.
26–36 sShe ladles stew from the pot over the fire and tears off bread, and he hangs his cloak by the hearth.
36–47 sHe eats at a small table by the fire, and the lute player strikes up a brighter tune.
47–60 sHe pays with a silver coin for a room, and she points him up the stairs.
World action models

Acting on what the policy saw earlier

A world action model with codec memory keeps the whole episode, or its earlier attempts, as codec tokens. All videos are closed-loop rollouts in simulation, on scenes not seen in training.

Robot cup game: tracking, then acting

The policy watches a cup game with 3–6 cups and 1–5 swaps, then lifts the cup that hides the ball.

The codec stores the whole episode in – tokens, compared to – for dense attention: – fewer.

0.0 s / –
Sink frame
Each window of 4 frames
  1. Warp the previous reconstruction
  2. Find where it fails the – gate
  3. Store tubelets there
Tokens per window, to scale Codec tokens Recent chunk, read densely
Tokens so far
Dense attention – tokens CodecMem – tokens
Context for the next chunk
Instructiontext tokens
Sinkframe 0, kept whole – tokens
Codec memoryearlier chunks, one token per tubelet– tokens
Recent chunk – tokens
Autoregressive DiTfine-tuned
Next chunk Actions
The policy’s input is a wrist camera above two shoulder cameras; the codec keeps the episode’s first frame whole, then, 4 frames at a time, stores tubelets only where its prediction fails, boxed in green.

RoboMME: the best world action model on all four suites

RoboMME tests whether a policy acts on what it saw earlier in the episode, in four suites: counting, permanence, reference and imitation. Cosmos 3 with keyframes is our policy given 32 evenly spaced keyframes in place of codec memory.

Show
LingBot-VA (time-aware)RTPCosmos 3 (keyframes)CodecMem (ours)
0255075100LingBot-VA (time-aware), Counting: 27.5%27.5RTP, Counting: 33.5%33.5Cosmos 3 (keyframes), Counting: 10.0%10.0CodecMem (ours), Counting: 88.5%88.5CountingLingBot-VA (time-aware), Permanence: 42.5%42.5RTP, Permanence: 51.5%51.5Cosmos 3 (keyframes), Permanence: 22.5%22.5CodecMem (ours), Permanence: 63.8%63.8PermanenceLingBot-VA (time-aware), Reference: 37.0%37.0RTP, Reference: 47.5%47.5Cosmos 3 (keyframes), Reference: 37.5%37.5CodecMem (ours), Reference: 52.2%52.2ReferenceLingBot-VA (time-aware), Imitation: 54.5%54.5RTP, Imitation: 62.0%62.0Cosmos 3 (keyframes), Imitation: 45.0%45.0CodecMem (ours), Imitation: 80.5%80.5ImitationLingBot-VA (time-aware), Average: 40.4%40.4RTP, Average: 48.6%48.6Cosmos 3 (keyframes), Average: 28.8%28.8CodecMem (ours), Average: 71.3%71.3AverageSuccess rate (%)
Success rate on RoboMME. CodecMem leads every suite, by the widest margin on Counting. LingBot-VA, RTP and Fast-WAM numbers are those reported by RTP; Fast-WAM gives only an average, 11.3.
Numbers as a table
MethodCountingPermanenceReferenceImitationAverage
LingBot-VA (time-aware)27.542.537.054.540.4
RTP33.551.547.562.048.6
Cosmos 3 (keyframes)10.022.537.545.028.8
CodecMem (ours)88.563.852.280.571.3
Fast-WAM––––11.3

Two solved test episodes of our policy from this suite, front camera left and wrist camera right, at 1.5× speed. A red border marks the video the policy is shown before it acts.

▶ Play

PickXtimes

Instruction. “Pick up the blue cube and place it on the target, repeating this action four times, then press the button to stop.”

▶ Play

SwingXtimes

Instruction. “Pick up the green cube, move it to the top of the right-side target, then to the top of the left-side target, repeating this back-and-forth motion three times, finally press the button to stop.”

Two solved test episodes of our policy from this suite, front camera left and wrist camera right, at 1.5× speed. A red border marks the video the policy is shown before it acts.

▶ Play

ButtonUnmask

Instruction. “First press the button, then pick up the container hiding the blue cube, finally pick up another container hiding the green cube.”

▶ Play

ButtonUnmaskSwap

Instruction. “First press both buttons on the table, then pick up the container hiding the red cube, finally pick up another container hiding the blue cube.”

Two solved test episodes of our policy from this suite, front camera left and wrist camera right, at 1.5× speed. A red border marks the video the policy is shown before it acts.

▶ Play

VideoPlaceButton

Instruction. “Watch the video carefully, then place the green cube on the target right after the button was pressed.”

▶ Play

VideoPlaceOrder

Instruction. “Watch the video carefully, then place the green cube on the third target it was previously placed on.”

Two solved test episodes of our policy from this suite, front camera left and wrist camera right, at 1.5× speed. A red border marks the video the policy is shown before it acts.

▶ Play

InsertPeg

Instruction. “Watch the video carefully, then grasp the same end of the same peg you’ve picked before and insert it into the same side of the box.”

▶ Play

MoveCube

Instruction. “Watch the video carefully, then move the cube to the target in the same manner as before.”

In-context learning: pushing with hidden physics

A robot arm must push an object so that its centre stops inside a target. The physics differ per scene and are never given, so the first push usually misses and later pushes depend on remembering the earlier ones. Codec memory matches dense attention, which keeps every frame, with 4.7× fewer inference FLOPs.

Scenes solved within N attempts
96 unseen test scenes, closed loop in simulation. Hover an attempt for its numbers.
0% 25% 50% 75% 100% 1 2 3 4 5 6 7 8 9 10 Attempts so far, as the memory grows Scenes solved Dense attention CodecMem No memory Attempt 1: CodecMem (ours) 49%, 47 of 96 scenes; Dense attention 44.8%, 43 of 96 scenes; No memory 18.8%, 18 of 96 scenes Attempt 1 CodecMem 49% Dense attention 44.8% No memory 18.8% Attempt 2: CodecMem (ours) 71.9%, 69 of 96 scenes; Dense attention 71.9%, 69 of 96 scenes; No memory 36.5%, 35 of 96 scenes Attempt 2 CodecMem 71.9% Dense attention 71.9% No memory 36.5% Attempt 3: CodecMem (ours) 82.3%, 79 of 96 scenes; Dense attention 83.3%, 80 of 96 scenes; No memory 44.8%, 43 of 96 scenes Attempt 3 CodecMem 82.3% Dense attention 83.3% No memory 44.8% Attempt 4: CodecMem (ours) 86.5%, 83 of 96 scenes; Dense attention 90.6%, 87 of 96 scenes; No memory 45.8%, 44 of 96 scenes Attempt 4 CodecMem 86.5% Dense attention 90.6% No memory 45.8% Attempt 5: CodecMem (ours) 89.6%, 86 of 96 scenes; Dense attention 91.7%, 88 of 96 scenes; No memory 54.2%, 52 of 96 scenes Attempt 5 CodecMem 89.6% Dense attention 91.7% No memory 54.2% Attempt 6: CodecMem (ours) 90.6%, 87 of 96 scenes; Dense attention 92.7%, 89 of 96 scenes; No memory 56.2%, 54 of 96 scenes Attempt 6 CodecMem 90.6% Dense attention 92.7% No memory 56.2% Attempt 7: CodecMem (ours) 91.7%, 88 of 96 scenes; Dense attention 92.7%, 89 of 96 scenes; No memory 63.5%, 61 of 96 scenes Attempt 7 CodecMem 91.7% Dense attention 92.7% No memory 63.5% Attempt 8: CodecMem (ours) 91.7%, 88 of 96 scenes; Dense attention 93.8%, 90 of 96 scenes; No memory 66.7%, 64 of 96 scenes Attempt 8 CodecMem 91.7% Dense attention 93.8% No memory 66.7% Attempt 9: CodecMem (ours) 92.7%, 89 of 96 scenes; Dense attention 93.8%, 90 of 96 scenes; No memory 68.8%, 66 of 96 scenes Attempt 9 CodecMem 92.7% Dense attention 93.8% No memory 68.8% Attempt 10: CodecMem (ours) 92.7%, 89 of 96 scenes; Dense attention 94.8%, 91 of 96 scenes; No memory 68.8%, 66 of 96 scenes Attempt 10 CodecMem 92.7% Dense attention 94.8% No memory 68.8% 0% 25% 50% 75% 100% 1 2 3 4 5 6 7 8 9 10 Attempts so far, as the memory grows Scenes solved Attempt 1: CodecMem (ours) 49%, 47 of 96 scenes; Dense attention 44.8%, 43 of 96 scenes; No memory 18.8%, 18 of 96 scenes Attempt 1 CodecMem 49% Dense attention 44.8% No memory 18.8% Attempt 2: CodecMem (ours) 71.9%, 69 of 96 scenes; Dense attention 71.9%, 69 of 96 scenes; No memory 36.5%, 35 of 96 scenes Attempt 2 CodecMem 71.9% Dense attention 71.9% No memory 36.5% Attempt 3: CodecMem (ours) 82.3%, 79 of 96 scenes; Dense attention 83.3%, 80 of 96 scenes; No memory 44.8%, 43 of 96 scenes Attempt 3 CodecMem 82.3% Dense attention 83.3% No memory 44.8% Attempt 4: CodecMem (ours) 86.5%, 83 of 96 scenes; Dense attention 90.6%, 87 of 96 scenes; No memory 45.8%, 44 of 96 scenes Attempt 4 CodecMem 86.5% Dense attention 90.6% No memory 45.8% Attempt 5: CodecMem (ours) 89.6%, 86 of 96 scenes; Dense attention 91.7%, 88 of 96 scenes; No memory 54.2%, 52 of 96 scenes Attempt 5 CodecMem 89.6% Dense attention 91.7% No memory 54.2% Attempt 6: CodecMem (ours) 90.6%, 87 of 96 scenes; Dense attention 92.7%, 89 of 96 scenes; No memory 56.2%, 54 of 96 scenes Attempt 6 CodecMem 90.6% Dense attention 92.7% No memory 56.2% Attempt 7: CodecMem (ours) 91.7%, 88 of 96 scenes; Dense attention 92.7%, 89 of 96 scenes; No memory 63.5%, 61 of 96 scenes Attempt 7 CodecMem 91.7% Dense attention 92.7% No memory 63.5% Attempt 8: CodecMem (ours) 91.7%, 88 of 96 scenes; Dense attention 93.8%, 90 of 96 scenes; No memory 66.7%, 64 of 96 scenes Attempt 8 CodecMem 91.7% Dense attention 93.8% No memory 66.7% Attempt 9: CodecMem (ours) 92.7%, 89 of 96 scenes; Dense attention 93.8%, 90 of 96 scenes; No memory 68.8%, 66 of 96 scenes Attempt 9 CodecMem 92.7% Dense attention 93.8% No memory 68.8% Attempt 10: CodecMem (ours) 92.7%, 89 of 96 scenes; Dense attention 94.8%, 91 of 96 scenes; No memory 68.8%, 66 of 96 scenes Attempt 10 CodecMem 92.7% Dense attention 94.8% No memory 68.8%
Numbers as a table
AttemptCodecMem (ours)Dense attentionNo memory
149%44.8%18.8%
271.9%71.9%36.5%
382.3%83.3%44.8%
486.5%90.6%45.8%
589.6%91.7%54.2%
690.6%92.7%56.2%
791.7%92.7%63.5%
891.7%93.8%66.7%
992.7%93.8%68.8%
1092.7%94.8%68.8%
Three memories side by side
▶ Play attempts in order
“Push the rubber puck so that its centre stops inside the white ring.” Ours: solved at attempt 2 · Dense attention: solved at attempt 2 · No memory: not solved in 10 attempts.

Each video plays the given exploration push, then the three models’ attempts side by side, marked hit or miss with the distance to the target centre; a panel stops once its model succeeds. The model without memory solves none of these three scenes; the chart covers all 96.

▶ Play attempts in order
“Push the glazed ceramic flat slab so that its centre stops inside the white disc.” Ours: solved at attempt 3 · Dense attention: solved at attempt 4 · No memory: not solved in 10 attempts.

Each video plays the given exploration push, then the three models’ attempts side by side, marked hit or miss with the distance to the target centre; a panel stops once its model succeeds. The model without memory solves none of these three scenes; the chart covers all 96.

▶ Play attempts in order
“Push the polished metal upright can so that its centre stops inside the yellow rectangle.” Ours: solved at attempt 2 · Dense attention: solved at attempt 4 · No memory: not solved in 10 attempts.

Each video plays the given exploration push, then the three models’ attempts side by side, marked hit or miss with the distance to the target centre; a panel stops once its model succeeds. The model without memory solves none of these three scenes; the chart covers all 96.

One scene, attempt by attempt (codec memory)

“Push the glossy plastic small cube so that its centre stops inside the orange disc.” Target radius 2.2 cm. The model corrects its push from the failed attempts in its context.

Click an attempt to play from there.
Long-context memory benchmark

Retrieval, tracking and spatial memory

One task per skill, each with an output that is determined by the context. All methods share the same backbone, training data and schedule; the limited-budget baselines get the same memory budget as CodecMem. Click a still to play its video.

Needle Watermark. The model watches 60 s of moving polygons. A white square watermark marks one 4 s segment. After the video ends, the model must generate that segment again, so the polygons have to be where they were tens of seconds earlier. Bottom row of each comparison: absolute error on the polygons.

Example

Input · 60 s context; watermark at 15.5–19.5 s, 41 s before generation

▶ Play input

Output · the watermarked segment, generated from memory

▶ Play comparison

Input · 60 s context; watermark at 32.1–36.1 s, 24 s before generation

▶ Play input

Output · the watermarked segment, generated from memory

▶ Play comparison

Input · 60 s context; watermark at 26.3–30.3 s, 30 s before generation

▶ Play input

Output · the watermarked segment, generated from memory

▶ Play comparison

Cup Shell Game. A ball is placed under one cup, and the cups are then swapped many times. After the input video, the model must generate the reveal: the cups lift, and the ball must appear under the right cup. These examples have 18–19 swaps, more than any training sequence (1–15), and several of the other memories lose track of the ball. The label of each cell says whether that method puts the ball under the right cup.

Example

Input · ball placed, then 19 swaps

▶ Play input

Output · generated reveal: ground truth, ours and nine other memories

▶ Play reveal

Input · ball placed, then 18 swaps

▶ Play input

Output · generated reveal: ground truth, ours and nine other memories

▶ Play reveal

Input · ball placed, then 18 swaps

▶ Play input

Output · generated reveal: ground truth, ours and nine other memories

▶ Play reveal

Revisit-NVS. The model observes a context video of a static 3D scene with its cameras. It must then render a 3 s camera path that revisits views seen earlier. Each cell shows one method's rendering of the same clip.

Example

Input · 30 s context

▶ Play context

Output · novel views along the revisit path: ground truth and methods

▶ Play comparison

Input · 30 s context

▶ Play context

Output · novel views along the revisit path: ground truth and methods

▶ Play comparison

Input · 30 s context

▶ Play context

Output · novel views along the revisit path: ground truth and methods

▶ Play comparison