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 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
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.
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.
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.
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.
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.
