Abstract

Many robot tasks require long-horizon memory, yet most vision-language-action (VLA) models condition only on current observations or a small set of past frames. We present LongContextVLA, a VLA model that reasons over hundreds of past images while maintaining real-time inference speed. Built on Qwen3.5-4B, LongContextVLA combines dense visual history with reasoning supervision that explicitly teaches the policy to interpret past events before generating actions. To reduce inference latency, we reuse cached visual features and model states, decode reasoning in parallel, and predict action tokens in groups. In real-robot shell-game and drawer put-away tasks, LongContextVLA generalizes to unseen shuffle sequences and drawer configurations, achieving an average success rate of 74.4%, compared with 44.4% for the strongest competing baseline. Ablation experiments show a 23.3-percentage-point improvement over training with subtask supervision alone. Separate latency evaluations measure inference times of 381 ms at 258k visual tokens (3.6k images) and 824 ms at one million tokens (13.9k images) on a single H100 GPU. Finally, we show that the memory context can support visual prompting, allowing the robot to infer sorting rules directly from human demonstration videos. Together, our results show that VLAs can reason over long, dense visual histories while maintaining real-time inference speed.

Overview

We propose LongContextVLA, a model that processes long, dense visual memory at 2 Hz while generating reasoning and actions in real time. Our model can process up to 1 million visual tokens at 0.82 s latency, equivalent to 13.9k frames, or about four hours of memory, assuming 1 Hz frame sampling and 72 tokens per image. The fast inference is enabled by caching model states and previously computed tokens, and by decoding reasoning and actions in parallel. The animation below gives an intuitive overview of how our model works.

1) How our model works

1. Past images are already cached.

We maintain memory only for the third-person camera. For wrist images and user queries, we use only what is relevant at the current moment.

Figure 1. Qwen3.5-4B takes the image history and current inputs, predicts reasoning in parallel, then generates a subtask and grouped action tokens.
Figure 1. Architecture of LongContextVLA. The model receives the history of top-down images, together with the current wrist images, the task instruction and the robot state. It decodes its reasoning in parallel in a single forward pass, then predicts the subtask and generates the action tokens in groups. The cached history is reused across decisions, so only newly received images are encoded. From Figure 2 of the paper.

Figure 1 shows an example input and the reasoning the model generates for the shell game. The reasoning refers to events by their time, for instance “At 2 s, the ball is placed under the middle cup. At 5 s, the middle and right cups swap.” This format comes naturally to Qwen, which places timestamps between frames of the video so that it can refer to specific moments in a long video. The same ability helps a robot keep track of what happened and when.

2) Model latency

Figure 2. Two charts of inference latency on one H100 GPU against the number of visual tokens. Left: latency from scratch rises from 0.3 s at 1k tokens to 370.6 s at 1M tokens, while cached latency stays between 0.26 s and 0.82 s. Right: cached latency split into stages, growing from 0.227 s with no history to 0.824 s at 1M tokens.
Figure 2. Inference latency on one H100 GPU versus visual history length. (a) Recomputing from scratch versus cached inference. (b) Cached latency by stage. Image counts assume 72 tokens per image. At one million visual tokens, a cached decision takes 0.82 s, well below the 1 s line. Hover over a point or a bar to read its values. From Figure 6 of the paper.

Without caching, the time per decision grows quickly with the visual history. It takes 1.47 s at 16k visual tokens (224 images) and 370.6 s at 1M tokens (13.9k images), as Figure 2a shows. With caching, a decision takes 312 ms at 129k tokens (1.8k images), only 85 ms more than with no history at all. It stays below 500 ms through 258k tokens (3.6k images), where it takes 381 ms, and reaches 824 ms at 1M tokens (13.9k images), about 450× faster than recomputing from scratch. Figure 2b shows where that time goes. Encoding the new images takes only 29–43 ms at every history length. With 13.9k images cached, decoding the subtask and actions takes 430 ms (52% of the total), because each decoding pass still attends over the whole cached history. The latency measurements account only for server-side compute and exclude delays from sending the images over the network or running inverse kinematics (if needed).

Results

1) Memory tasks

We evaluate on two memory tasks. The shell game tests whether the robot can follow a hidden block through an unseen sequence of five or six swaps. The drawer task tests whether it remembers where objects came from and how often they were used, in unseen drawer-object configurations. In both tasks the model’s memory holds overhead images sampled at 2 Hz from the start of the episode. This comes to at most 50 images in the shell game and 272 in the drawer task. Real-robot success is measured over 30 trials per task. Offline evaluation checks whether the generated subtask is correct at the critical decision moments of each task, evaluated on larger held-out sets.

We compare three versions of our model, which differ in how they are trained and in what they generate at test time. The subtask-only variant is trained without any reasoning and generates only the subtask and actions. The reason + subtask variant is additionally trained to write out reasoning about its memory token by token. This reasoning is used for training only, so at test time it runs in subtask mode and generates only the subtask and actions. The full model, LongContextVLA, adds a third training objective, which is to decode all the reasoning tokens in parallel in a single forward pass. It is the only version that reasons at test time. It runs this parallel pass first, then generates the subtask and actions.

Figure 3. Bar charts of success rates for six methods. Real-robot average across tasks: π0.7 24.4%, MemER 33.3%, SimpleMemVLA 44.4%, LC-VLA subtask 51.1%, LC-VLA reason + subtask 53.3%, full LC-VLA 74.4%. Offline average: π0.7 31.7%, MemER 33.3%, SimpleMemVLA 67.2%, LC-VLA subtask 59.3%, LC-VLA reason + subtask 61.3%, full LC-VLA 79.1%.
Figure 3. Main results on the shell game and the drawer task, both in unseen configurations. The left column shows real-robot success rates. The right column shows offline accuracy of the generated subtask at critical decision moments, on larger samples. The bottom row averages across tasks. LongContextVLA outperforms every other method in both real-robot and offline evaluation. Hover over a bar to read its values and to highlight that method in every panel. From Figure 5 of the paper.

LongContextVLA outperforms every other method on every task, in both real-robot and offline evaluation (Figure 3). Averaged over the three tasks, it succeeds in 74.4% of real-robot trials. Its two variants follow at 53.3% (reason + subtask) and 51.1% (subtask only), then SimpleMemVLA (44.4%), MemER (33.3%) and π0.7 (24.4%).

Our results show that reasoning helps, and helps most when the model also reasons at test time. The reason + subtask variant gains only 2.2 percentage points over subtask only, while the full model (with parallel decoding of reasoning included) gains 23.3 percentage points.

Shell game Sped up1× speed
An unseen sequence of six swaps. The robot follows the hidden block and lifts the correct cup. By the end, its memory holds 39 images.
Drawer put-away Sped up1× speed
An unseen drawer setup (i.e. the drawer-to-object configuration is unseen). The robot watches each object leave its drawer, then puts every object back. By the end, its memory holds 114 images.
Drawer put-away (multi-hop reasoning) Sped up1× speed
Four successive requests about the same pickup history, such as “return the object picked up exactly 3 times”. By the end, the memory holds 236 images.

2) Video prompting

The memory can also hold a video prompt. In this task, a human records a video (20 images) demonstrating where each object should go. We give the model this video as its memory, and the robot must sort the objects the same way. Even though the model was trained to sort three objects, it could sort up to five objects, two of which it never saw during training.

Figure 4. Bar chart of sorting success over 10 trials. Three objects, as in training: LC-VLA subtask 100%, MemER 100%, π0.7 70%. Five objects, unseen: LC-VLA subtask 90%, MemER 80%, π0.7 20%.
Figure 4. Video prompting results. Success rate at sorting objects as shown in a human video, over 10 trials. Although trained to sort three objects, LongContextVLA also sorts five, including two objects it never saw during training. Hover over a bar to read its values. From Figure 7 of the paper.

For the video prompting task, no reasoning was used. The subtask-only variant of LongContextVLA sorts three objects correctly in all 10 trials (in-distribution), and five objects in 9 of 10 (out-of-distribution), as Figure 4 shows. MemER also does well, achieving 100% and 80% success rates in the same categories. π0.7 reaches 70% with three objects but drops to 20% with five. It picks and places well, but struggles to follow the assignments shown in the video.

Video-prompted sorting Sped up1× speed
A human shows which objects go in which bins. The robot then sorts five objects the same way. Two of them, the yellow banana and the paper cup, never appeared during training.

Conclusion and limitations

We presented LongContextVLA, a VLA model that can use hundreds of images of context while operating in real time. The model can also process much longer context lengths, supporting up to one million visual tokens with a latency of 0.82 s. This context length corresponds to 13.9k images or approximately four hours of visual observations if sampled at 1 Hz and assuming 72 tokens per image. We make these long contexts useful through reasoning supervision and enable fast inference through caching and parallel decoding of reasoning and actions. Our results show that reasoning over visual history improves generalization to unseen scenarios in challenging memory tasks. We also demonstrate that the same memory context can serve as a visual prompt, enabling the robot to infer sorting rules from a human demonstration video and apply those rules to unseen object types and numbers of objects.

Our approach has several limitations, which we leave for future work. Parallel decoding can produce jumbled reasoning text that contains correct details but lacks the coherence of autoregressively generated text. Even so, this reasoning substantially improves task performance. Improving its coherence is an interesting direction, and related work has explored approaches such as refining reasoning through repeated parallel decoding and generating it in blocks (Fan et al., 2026). Another limitation is the short duration of the tasks we explored relative to the length of context the model can process. Exploring tasks that extend over hours or days would help us understand how effectively the model uses memory at these scales. Finally, extending our approach beyond stationary tabletop tasks to mobile manipulation would be interesting, since robots moving through an environment naturally encounter greater partial observability and more varied situations that require long-context visual memory.

BibTeX

Coming soon.