Multimodal large language model (MLLM) agents have shown promising capabilities in task-oriented environments. However, they still struggle when queries are deferred until after exploration, requiring them to retain visual evidence before knowing which details will matter. We introduce EvoViM, a recursively self-evolving framework in which a frozen multimodal model turns its own interaction experience into one visual program for memory and skills. The program retains images and computes directly on pixels, and its operations decide how this evidence is used in each task. During memory evolution, the same model traces failures in its visual trajectories to the operations that lost or misused evidence and revises them. It also rewrites the notes and analysis tools that guide later revisions, which then build on earlier findings and skip changes that have already failed. We evaluate EvoViM with three multimodal models on six tasks covering visual matching, spatial recall, and sequential decision-making, including three tasks with deferred queries. Across the six tasks, EvoViM improves the average score over AutoMem, the strongest baseline in the main comparison, by 31.3-47.6 points on held-out episodes. Programs written once from the initial environment instructions perform substantially worse, highlighting the value of interaction experience in shaping how visual evidence is retained and used. Code and dataset are available at https://evovim.github.io/.
Figures & tables
Figure 1: EvoViM evolves task-specific visual programs from one generic starting program. Each panel shows an evolved program on a held-out episode, with the evolved mechanisms named in its header. Red marks the evidence the program finds or the action it suggests.
Figure 2: Overview of EvoViM. In task execution (blue), the agent records each outcome and consults the memory program (green) before acting. In memory evolution (orange), the same frozen MLLM revises the program from development episodes. A candidate is kept only if it passes code checks and the gate, and the model also rewrites the revision experience that guides its later revisions.
Claude Haiku 5.5
Qwen3.8-27B
Method
MC
Maze
DMV
MC
Maze
DMV
Basic image tools
15.0
18.8
13.8
23.8
23.8
7.9
Evolved text memory [ 28 ]
23.8
16.3
42.1
25.0
17.5
37.9
VISTA [ 5 ]
20.0
16.3
22.1
25.0
21.3
20.4
+ matcher
18.8
16.3
80.8
47.5
15.0
81.7
One-shot program
13.8
20.0
28.8
13.8
25.0
14.2
Table 1: Scores of different memory designs on the three tasks with deferred queries.
Task
To recall
Goal
Steps
Episodes
Card Matching
144 cards
72 pairs
360
5
DMV-Hard
100 product pages
24 answers
124
10
MC Gallery
16 paintings ( 12×12 )
8 answers
60
10
Poster Maze
16 posters ( 6×6 )
≤8 answers
140
10
Tetris
–
task progress
100
5
Pac-Man
–
task progress
100
5
Table 2: Task settings and held-out evaluation budgets.
Figure 3: Example observations from the six evaluation tasks.
Visual matching
Spatial recall
Sequential decision-making
Method
Card Matching
DMV-Hard
MC Gallery
Poster Maze
Tetris
Pac-Man
Avg.
GPT-6.1 Sol
No memory
0.3 ± 0.6
0.0 ± 0.0
25.0 ± 0.0
25.0 ± 0.0
34.7 ± 9.1
45.3 ± 21.5
21.7
Rolling summary
8.6 ± 4.5
1.7 ± 2.2
11.3 ± 12.4
17.5 ± 14.7
51.1 ± 19.6
42.6 ± 14.6
22.1
Hand-crafted text
0.8 ± 0.8
11.3 ± 6.8
25.0 ± 0.0
17.5 ± 8.7
36.9 ± 4.6
44.5 ± 20.3
22.7
Hand-crafted visual
2.8 ± 1.0
9.2 ± 5.5
25.0 ± 0.0
17.5 ± 8.7
38.9 ± 4.1
42.0 ± 7.3
22.6
Table 3: Mean scores (%) with per-task standard deviations across seeds. Bold and underline mark the best and second-best means within each model.
Figure 4: Accuracy on photo details and generated patterns in DMV-Hard.
Figure 5: Average score and relative input-token use across the six tasks. Arrows connect each starting program to its evolved version.
Figure 6: Cumulative input tokens on Card Matching (left) and model requests on Tetris (right), using Qwen3.8-27B on seed 47.
Claude Haiku 5.5
Qwen3.8-27B
Method
Input (M)
Code (s)
Input (M)
Code (s)
VISTA-style archive
1.53
8
1.09
5
+ matcher (tool)
1.65
1,527
1.28
3,585
+ matcher (every step)
1.49
6,118
1.05
5,536
EvoViM
4.55
14
2.24
364
Table 4: Execution cost on DMV-Hard, averaged over ten episodes. Code time includes matching and excludes waiting for the model.
Method
Evaluated
Accepted
Input
Output
GPT-6.1 Sol
AutoMem
30
8
85.0
1.10
EvoViM
26
12
138.6
1.34
Claude Haiku 5.5
AutoMem
32
7
508.7
9.36
EvoViM
21
17
375.6
7.50
Table 5: Candidate evaluations and recorded token use during revision, summed over six tasks for each model. Token counts are in millions.
Figure 7: Mechanisms added by evolution across the final programs of six tasks and three models.
Model
AutoMem
EvoViM
GPT-6.1 Sol
Free-text card identities ranked by word overlap.
Exact crop hashes. A query tool returns remembered matches when called.
Claude Haiku 5.5
4×4 grids of color words ranked by agreement between cells.
Crop distances. The program supplies matching-card suggestions and a list of unseen cards.
Qwen3.8-27B
Short color labels compared for equality.
Crop distances. The program suggests the next flip at every step.
Table 6: Card representations and tool interfaces in the final programs.
Figure 8: Color-grid notes produced by AutoMem with Claude Haiku 5.5. Boxed cells mark disagreements between the notes. The true pair in (a) agrees in 11 of 16 cells, while the different cards in (b) agree in 10. In both cases, the program ranks the card on the right first.
Figure 9: Queries and retrieved candidates from the workspace evolved by GPT-6.1 Sol for Poster Maze, shown during a development episode. Candidates are arranged by rank. The model rejects the lure in (a) and uses the top candidate to locate the seen poster on the east wall of cell (2,4) in (b).
Figure 10: State records and action suggestions produced by the evolved Tetris programs at step 30 of held-out episodes. The excerpts show the information passed to each model.
Gen.
Score (%)
Program after selection
0
25.0
The starting program answers not seen to every question.
1
81.3
Painting crops indexed by door and side, with a pixel matcher.
2
100.0
Whole views indexed by door, with the side inferred from the match position.
3
100.0
Both candidates are rejected, leaving the generation-2 program unchanged.
Table 7: The Claude Haiku 5.5 lineage on MC Gallery. Scores are measured on the development episodes after each generation.
Figure 11: Development scores after each generation, with one row per model. Generation 0 is the starting program.
Earlier finding
Experience retained
Use in a later revision
A visually plausible candidate was incorrectly used as an answer label.
Establish confirmed labels from recorded score changes before testing the matcher.
Generations 2 and 3 use score-derived labels to examine matching results.
Tool declarations need to agree with the interfaces registered by the program.
An interface-checking script and a validation procedure in the playbook.
Generation 2 adds a script that exports the registered interfaces and runs the inherited checker.
Several changes to the matcher fail to improve recognition.
Notes on the tested changes and guidance to compare aligned candidate regions.
Generation 3 consults these records and adds the aligned comparison tool with new rendering checks.
Table 8: Revision experience reused in the Claude Haiku 5.5 lineage on DMV-Hard.
Figure 12: Points lost by AutoMem and EvoViM at each stage, averaged over six tasks and three models.
Figure 13: Score loss in each task, averaged over the three models and split by failure stage.
Figure 14: DMV-Hard questions grouped by the rank of the correct product and the final answer. Bar widths show proportions, and segment labels give question counts. For GPT-6.1 Sol, rank 1 includes a first-place result in either the dense or local-feature matcher. For Qwen3.8-27B, it includes a first-place result in any of the three displayed rankings.
Figure 15: Match scores and answers on MC Gallery. For GPT-6.1 Sol, seen queries are shown only when the true location ranks first. Dots indicate location answers, crosses indicate not seen , and dashed lines mark the program’s threshold.
Figure 16: Poster Maze queries answered by Claude Haiku 5.5. The left pair shows the query and the highest-ranked stored view. The right pair shows the underlying patterns for comparison. The model returns incorrect locations for the unseen posters in (a)–(c) and correctly locates the seen poster in (d).
Method
MC Gallery
DMV-Hard
AutoMem
23.8
42.1
EvoViM
88.3
77.1
w/o visual pathway
22.5
42.1
w/o revision support
60.0
82.9
Table 9: Ablation scores (%) for the visual pathway and revision support with Claude Haiku 5.5.
Development score
Held-out performance
Lineage
Gen. 1
Gen. 2
Gen. 3
Seen
Lures
Overall
EvoViM
Original
81.3
100.0
100.0
98.3
100.0
98.8
Repeat 1
93.8
100.0
100.0
98.3
100.0
98.8
Repeat 2
31.3
75.0
75.0
90.0
0.0
67.5
w/o revision support
Table 10: Three evolution runs per configuration on MC Gallery with Claude Haiku 5.5. Development scores are measured after selection at each generation. Held-out columns report accuracy on seen paintings and lures, followed by the overall score. All values are percentages.
Figure 17: Frames observed on MC Gallery (seed 52) in the original runs with and without revision support. Red outlines mark the frames saved for later retrieval.
Appendix figures & tables23 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 18: Shared revision-prompt template, abridged. Braces mark fields filled by the host, and … marks cuts. Parts marked † are removed in the ablation without revision support.
Precision (%)
Cells
Method
GPT
Haiku
Qwen
GPT
Haiku
Qwen
No memory
0.0
0.1
0.0
14.8
17.0
14.8
Rolling summary
4.2
3.9
0.0
94.8
126.4
134.4
Hand-crafted text
0.4
3.0
0.1
41.6
90.8
39.2
Hand-crafted visual
1.3
1.9
0.1
46.4
83.4
24.4
AutoMem
7.3
34.6
8.4
132.8
144
144
Appendix
Table 11: Card Matching recall precision and exploration coverage. Cells counts distinct cards flipped per episode, out of 144.
Figure 19: Card Matching at flip 121 of seed 47 with Qwen3.8-27B. The panels show the board and memory presented by AutoMem and EvoViM. Prompt excerpts are quoted verbatim, with … marking cuts.
Figure 20: Answers on MC Gallery, separated into seen paintings and lures. Each row contains 60 seen queries and 20 lures over ten episodes.
Figure 21: Text memories produced by AutoMem. On Poster Maze, GPT-6.1 Sol records the poster layout and later identifies the correct wall (left). On MC Gallery, Claude Haiku 5.5 records the paintings as walls and later answers not seen (right).
GPT
Haiku
Qwen
Method
Seen
Route
Seen
Route
Seen
Route
No memory
2.1
49
2.0
47
2.1
41
Rolling summary
4.9
79
4.1
65
2.6
37
Hand-crafted text
5.6
81
3.7
49
1.9
30
Hand-crafted visual
4.9
79
4.0
59
1.5
37
AutoMem
5.3
81
3.5
76
1.8
34
Appendix
Table 12: Poster Maze exploration, averaged over ten episodes. Seen counts clearly observed posters. Route is the percentage of cells on the shortest route that the agent visits.
Method
Observed
Asked
All
Seen
Lure
Score
GPT-6.1 Sol
AutoMem
5.3
6.6
90.9
93.5
85.0
75.0
EvoViM
4.6
5.9
89.8
97.4
75.0
66.3
Claude Haiku 5.5
AutoMem
3.5
5.1
25.5
9.7
50.0
16.3
EvoViM
5.5
6.4
62.5
84.1
15.0
50.0
Appendix
Table 13: Poster Maze questions and answers. Observed and Asked are mean counts per episode. Accuracy columns and Score are percentages.
Figure 22: GPT-6.1 Sol routes on Poster Maze seeds 52 and 55. Green solid lines show EvoViM and gray dashed lines show AutoMem. Shading marks the shortest route from S to G. Bars mark posters, with dark bars seen clearly by AutoMem and green outlines seen clearly by EvoViM.
GPT
Haiku
Qwen
Method
D
P
D
P
D
P
No memory
0
0
0
0
0
0
Rolling summary
2
2
1
0
2
3
Hand-crafted text
24
3
51
2
38
1
Hand-crafted visual
20
2
33
0
17
2
AutoMem
92
7
100
1
87
4
Appendix
Table 14: Correct DMV-Hard answers over ten episodes. D denotes the 134 photo-detail questions and P the 106 pattern questions.
Method
Score
Lines
Drops (%)
Pieces
Top-outs
GPT-6.1 Sol
No memory
34.7
0.0
100
12.6
1.2
Hand-crafted text
36.9
0.0
100
12.6
1.8
Hand-crafted visual
38.9
0.0
100
14.4
1.8
AutoMem
40.4
0.0
100
15.6
1.4
EvoViM
45.8
0.0
100
16.8
1.0
Appendix
Table 15: Tetris statistics over five episodes of 100 actions. Lines and Pieces refer to the best game. Drops is the percentage of its points earned by dropping pieces, and Top-outs counts games lost per episode.
GPT
Haiku
Qwen
Method
Eat
Still
Eat
Still
Eat
Still
No memory
34.4
3.8
29.4
8.2
22.8
18.6
Rolling summary
31.6
6.6
25.4
25.0
27.4
36.2
Hand-crafted text
36.0
5.0
37.4
3.2
24.4
24.8
Hand-crafted visual
33.2
5.2
33.2
7.2
31.2
16.4
AutoMem
24.6
2.6
35.8
8.4
30.0
20.0
Appendix
Table 16: Pac-Man actions, averaged over five episodes of 100 steps. Eat counts steps on which Pac-Man eats something, and Still counts steps without movement.
Figure 23: Information presented by the evolved Pac-Man programs. GPT-6.1 Sol retains route claims written by the model. Claude Haiku 5.5 and Qwen3.8-27B compute nearby pellets and ghost distances from the current frame. Prompt excerpts are quoted verbatim, with … marking cuts.
Function
Group
What the added code does
EvoViM
AutoMem
Pixel matching
image memory
compares a query image or region with stored pixels or pixel features and returns a score or a ranking
14
0
Visual store
image memory
keeps frames, crops or pixel features across steps, filed under a place, an object or an id
12
0
Visual recall
image memory
lets a tool ask the host to show stored frames or crops to the model
11
0
Frame parsing
frame parsing
reads the current frame or observation into structured values such as card cells, posters or a board
13
1
Spatial index
frame parsing
keeps where things are and how places connect, such as a maze graph or place records
8
6
Decision support
frame parsing
turns stored or parsed evidence into a proposal, such as seen or not seen, the next flip or a ranked drop
12
7
Appendix
Table 17: Functions added by evolution. Counts give the number of final programs with each function, out of 18 per method. Group names match Figure 7 .
Figure 24: Mechanisms added by each model, grouped as in Figure 7 and counted over the six final programs of each method.
Figure 25: Excerpts of three final EvoViM programs, quoted verbatim. … marks cuts.
Stage
Subtype
Criterion
Tasks
Observe
never on screen
the item did not appear on screen
Maze
no clear view
it appeared, but not clearly or head-on
Maze
Store
not saved
no memory entry holds the item at the decision step
Card, MC, Maze, DMV
saved under a wrong key
an entry exists but is bound to a wrong doorway, wall, cell or id
Card, MC, Maze, DMV
saved but incomplete
the entry lacks what the answer needs: the id of a saved photo, the painting in a labeled view, or a usable face description
Card, MC, DMV
Retrieve
not queried
a usable entry exists, but no retrieval was made or shown at the decision step
Card, MC, Maze, DMV
Appendix
Table 18: Failure subtypes and their assignment criteria. Tasks lists where each subtype occurs in the evaluated methods.
Card
MC
Maze
DMV
Tetris
Pac-Man
All
Stage
Subtype
A
E
A
E
A
E
A
E
A
E
A
E
A
E
Observe
never on screen
–
–
–
–
13.3
5.0
–
–
–
–
–
–
2.2
0.8
no clear view
–
–
–
–
22.1
19.2
–
–
–
–
–
–
3.7
3.2
Store
not saved
–
–
45.0
–
3.8
–
0.1
–
–
–
–
–
8.1
–
saved under a wrong key
–
–
–
–
–
0.8
–
–
–
–
–
–
–
0.1
saved but incomplete
0.2
–
–
3.8
–
–
–
–
–
–
–
–
–
0.6
Appendix
Table 19: Points lost by failure subtype, averaged over the three models. A denotes AutoMem and E denotes EvoViM. All averages over the six tasks. A dash indicates fewer than 0.05 points.
Sessions
Lines added
Method
Launched
Completed
Final
Candidates
GPT-6.1 Sol
AutoMem
30
30
500
536
EvoViM
26
26
558
582
Claude Haiku 5.5
AutoMem
44
33
674
624
Appendix
Table 20: Revision sessions and program growth, summed over six tasks. Lines reports median lines added to final programs and to all candidates.
MC Gallery
Poster Maze
DMV-Hard
Haiku
Qwen
Haiku
Qwen
Haiku
Qwen
Start
15.0
23.8
18.8
23.8
13.8
7.9
One-shot
13.8
13.8
20.0
25.0
28.8
14.2
EvoViM
98.8
96.3
50.0
70.0
77.1
45.4
Seen / detail
0
1
0
0
69
29
Lure / pattern
11
10
16
20
0
5
Appendix
Table 21: One-shot programs and EvoViM from the same starting program. The last two rows count correct one-shot answers by query type.
MC
Maze
DMV
D / P
Claude Haiku 5.5
Start program
15.0
18.8
13.8
33 / 0
Archive
20.0
16.3
22.1
51 / 2
+ matcher (tool)
25.0
18.8
57.1
78 / 59
+ matcher (every step)
18.8
16.3
80.8
98 / 96
EvoViM
98.8
50.0
77.1
103 / 82
Appendix
Table 22: Fixed visual memories on the three deferred-query tasks. D / P counts correct answers among 134 photo-detail and 106 pattern queries on DMV-Hard.
MC Gallery
Poster Maze
DMV-Hard
Claude Haiku 5.5
Archive
78.8 [72.5, 85.0]
33.8 [20.0, 47.5]
55.0 [49.2, 61.3]
+ matcher (tool)
73.8 [70.0, 77.5]
31.3 [15.0, 48.8]
20.0 [9.2, 29.6]
+ matcher (every step)
80.0 [73.8, 87.5]
33.8 [18.8, 50.0]
− 3.8 [ − 12.1, 4.2]
Qwen3.8-27B
Archive
71.3 [66.3, 75.0]
48.8 [35.0, 60.0]
25.0 [15.0, 35.0]
Appendix
Table 23: Paired score differences between EvoViM and each fixed visual memory, with 95% bootstrap intervals over ten seeds. Positive values favor EvoViM.
MC Gallery
Poster Maze
Method
Req.
In
Code
Req.
In
Code
Claude Haiku 5.5
Archive
86
0.34
0.5
229
0.66
1.5
+ matcher (tool)
88
0.37
4.1
248
0.79
14
+ matcher (every step)
86
0.38
50
232
0.79
327
EvoViM
79
0.36
37
416
2.64
2.3
Appendix
Table 24: Execution cost per episode on MC Gallery and Poster Maze. Req. counts model requests, In reports input tokens in millions, and Code reports seconds in program code, excluding model wait time.
Figure 26: Score points lost at each failure stage for the ablations and fixed visual memories. For Claude Haiku 5.5 on MC Gallery, full EvoViM and the variant without revision support are averaged over three evolution runs.
Long-term memory is essential for LVLM agents to maintain consistency and integrate information across extended multimodal interactions. Existing agent memory systems, however, often reduce visual experiences into textual summaries or rely on static retrieve-then-reason pipelines, which are inefficient at query time and brittle when questions require image-text binding, temporal updates, or visual details. We propose Prospective Multimodal Memory Compilation, a framework that shifts part of the memory reasoning process from query time to memory consolidation time. Given accumulated multimodal interactions, a Questioner predicts future question candidates, a Planner compiles question-conditioned multimodal memory programs, and a Doubter verifies whether the planned evidence path can support the predicted answer. The verified question-program pairs form a structured question bank for efficient query-time routing and evidence retrieval. Experiments on multimodal long-term memory benchmarks show that our method improves answer quality and visual evidence recall while reducing query-time token and latency costs. Extensive ablations analyze the effects of self-feedback, dynamic planning, raw-image access, and question bank coverage.
Jingyu Sun, Yan Lin, Yuyang Xue +10
The University of Manchester · The University of Newcastle · The University of Edinburgh +5
Agent benchmarks for measuring memory largely study textual cases, in which information is deliberately extracted from the environment, written down, and then later retrieved. In other words, they assess what agents elected to record, not what they happened to see. We introduce DMV-Bench (code: https://github.com/yyyujintang/DMV-Bench), the first interactive benchmark for visual memory in multimodal agents, to study this often-neglected property. DMV-Bench is built on (1) a controlled home-furnishing e-commerce environment, supported by a catalog of 1,000 product variants, and (2) a text-leakage contract which ensures that the primary discriminative signal of each task is solely in the pixels. In DMV-Bench, agents undergo chains of autonomous shopping sessions in which every visited product image carries a unique, pre-rendered incidental cue that the agent is later asked to recall. We show that conventional solutions struggle with this task. Inspired by dual-coding theory, we propose a memory architecture that uses parallel visual and verbal codes, which we call DualMem. On DMV-Bench, DualMem outperforms a caption-only baseline and three recent multimodal agent-memory systems across multi-session chain lengths on multiple models. These gains persist even adjusting for memory-bank size and encoding-position bias. Further experiments also reveal an asymmetric division of labor between the two codes; a weighted coding scheme is often strongest. We view this as a step towards memory systems that preserve a richer record of agents' observations.
Recent studies of embodied agents based on frontier multimodal large language models (MLLMs) develop harness engineering around the MLLM, such as harnesses with post-trained policies and recursive self-improvement loops. Yet whether these additions exceed the native capability of the MLLM remains unexplored. We introduce SimplEvo to explore how far an MLLM can improve under direct control when it retains its execution experience in self-written text memories. It requires no weight updates, post-trained policies, or privileged information. The MLLM writes a coordinate-free task memory once from a single demonstration. Under a strict train-test protocol, it then creates a bounded working memory on training episodes only and refines it after each episode with lessons on procedure, completion, and recovery. Both memories stay fixed at test time. On EBench, SimplEvo lifts the success rate (SR) of GPT-6-Astra under direct control from 46.7% to 81.7%, and tops the RoboDojo leaderboard with 69.63% SR and a score of 75.32. Compared with memories that also store past visual frames, SimplEvo reaches a similar SR with text memory alone while using fewer tokens. With its memories fixed, SimplEvo also generalizes to unseen layouts and randomized scene configurations. Moreover, the working memory transfers across models: written by GPT-6-Astra, it can be reused as is by weaker MLLMs and improve their performance without any adaptation of their own.
Yifei Yao, Yude Zou, Xing Gao +5
Shanghai Artificial Intelligence Laboratory · Shanghai Jiao Tong University · Fudan University +1