Memory has become central to self-evolving LLM agents, which store and retrieve experience from past rollouts to guide future decisions. Existing systems represent this experience as free-form natural language and maintain it by rewriting, which fits tasks whose experience is narratable. However, in scientific discovery and optimization, experience is often a quantity measured by an oracle under a specific context. Rewriting it as text leaves no index for where a record should be, replaces a measurement with a description, and cannot express how interventions interact. To address this, we argue that agent memory for biomolecule optimization should instead be indexable, quantitative, and structured, and we introduce MEMIG. This memory construction framework realizes these three properties. In detail, MEMIG addresses each insight with a domain-grounded identifier and accumulates the quantitative effect measured by a property oracle, so that updates remain local and retrieval becomes an exact lookup. Next, MEMIG connects insights whose interventions are applied together and measures their epistasis by decomposing each evaluated set. Our results show that MEMIG improves performance in most settings across in silico antibody optimization tasks.
Figures & tables
Figure 1: Overview of MemIG . MemIG constructs an epistasis graph with antibody-grounded identifiers. Directed edges organize property → germline → region → mutation hierarchies, while undirected edges connect co-occurring mutations and store their epistatic effects.
Figure 2: Antibody optimization task.
Figure 3: Memory retrieval of MemIG . Given a starting antibody, MemIG identifies the matching identifiers, retrieves the corresponding insights with their neighbors, and curates them into natural language. Blue denotes the antibody-grounded identifier and the corresponding node, green its quantitative record, and yellow the epistasis graph neighbors and the curation based on them.
Figure 4: Multi property optimization results. Pass@1 and pass@3 (left) and the distribution of improvement over the starting sequence (right), where each colored dot is one rollout and the black diamond marks the mean.
Figure 5: In silico antibody binding optimization. Each numeric label corresponds to an antibody-antigen cluster, clustered by CDR sequence identity. ∗ denotes the structural baselines (dashed), which have access to the complex structure.
Component
Pass@1
Pass@3
Imp.
MemIG (Ours)
0.149
0.278
0.125
Identifier
0.074
0.153
0.117
Epistasis
0.049
0.130
0.142
Vanilla LLM
0.015
0.047
0.067
Table 1: Ablation study on component .
Adoption
Helpful
Harmful
Δ
0.931
0.909
0.004
0.905
Table 2: Memory faithfulness. MemIG raises both adoption and net directional alignment.
Figure 6: Cumulative performance progression. Vertical lines mark memory updates, where the rollouts between two lines are generated concurrently under the same memory. The curves report the centered rolling mean with a half-width of 30 rollouts, computed within each memory step. Notably, the ordering of rollouts within the same memory is random, so a downward slope does not imply performance decrease. Each dot marks the mean over all rollouts of that memory step.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Property
Objective
Oracle
Why it matters
Immunogenicity
Minimize
Pep2Vec ( Thrift et al., 2024 )
Predicted MHC class II epitope cores that can provoke an anti-drug antibody response.
Liabilities
Minimize
Biopython ( Cock et al., 2009 )
Motifs that degrade during manufacture and storage, costing potency and shelf life.
GRAVY
Range
Biopython ( Kyte & Doolittle, 1982 )
Exposed hydrophobicity drives aggregation, but an overly hydrophilic domain loses stability.
Charge
Range
Biopython ( Cock et al., 2009 )
Endosomal charge at pH 5.5 governs clearance rate and formulation viscosity at both extremes.
pTM
Range
Protenix ( Zhang et al., 2026b )
Predicted TM-score between the predicted and the true complex.
AbAg iPTM
Range
Protenix ( Zhang et al., 2026b )
Accuracy of the predicted relative placement of the antibody and the antigen.
Appendix
Table A1: Optimized properties. Six antibody properties the agent optimizes, the oracle or function measuring each, and why each are significant.
Cluster
# Complexes
PDBs
993
5
7l7e, 8d8q, 8ekd, 8suo
114
6
6kyz, 8f2j
147
7
7ben, 7beo, 7orb, 7tbf
148
4
7jmw, 7lq7, 7s5q, 7s5r
193
6
4fp8, 5umn, 6d0u
234
4
4mwf, 6bkb, 6uyd, 6uym
Appendix
Table A2: Details of the in silico binding optimization dataset. Antibodies were clustered by CDR sequence identity. Each antibody’s Heavy and Light chain CDR loops are concatenated into one string. Mmseqs2 ( Steinegger & Söding, 2017 ) is run with a 70% sequence identity cutoff.
Task
Hyperparameter
Value
Multiple property
Rollouts per example
10
Number of examples
100
Maximum turns per rollout
15
In silico binding
Rollouts per example
30
Number of examples
# complexes per cluster
Maximum turns per rollout
10
Appendix
Table A3: Hyperparameters used in all experiments.
Figure 7: Cumulative performance progression without a rolling average. Vertical lines mark memory updates, where the rollouts between two lines are generated concurrently under the same memory. Each point is the mean improvement over all rollouts sharing a memory step, and error bars indicate the standard error across those rollouts.
Cluster
Model
Pass@1
Pass@3
Avg
148
DC-Cu*
0.067
0.182
0.109
ACE*
0.100
0.215
0.169
MemIG (Ours)
0.258
0.456
0.144
193
DC-Cu*
0.056
0.159
0.110
ACE*
0.028
0.081
0.107
MemIG (Ours)
0.194
0.374
0.141
Appendix
Table A4: Comparison under the same oracle calls. Bold highlights the best score in a cluster and * denotes additional decomposition oracle call mode.
Method
Input
Output
Pass@1
Tokens / pass
Vanilla LLM
98.1
6.8
0.022
4.719M
Obs.
204.3
7.2
0.000
–
ACE
103.8
6.6
0.017
6.623M
DC-Cu
120.3
7.7
0.006
23.028M
MemIG
270.1
9.2
0.194
1.436M
Appendix
Table A5: Token cost analysis. Average token consumption per rollout. Input and output tokens are reported in thousands. Tokens per pass include tokens consumed by unsuccessful rollouts.
Method
Ref.
Candidate
Single
Pair
Total
Vanilla LLM
1.00
6.03
0
0
0 7.03
Obs.
1.00
5.88
0
0
0 6.88
ACE
1.00
5.44
0
0
0 6.44
DC-Cu
1.00
5.76
0
0
0 6.76
MemIG
1.00
4.95
8.46
22.97
37.38
Appendix
Table A6: Oracle evaluation cost. Average number of oracle evaluations per rollout. Single and pair evaluations are additional evaluations used by MemIG to construct the epistasis graph.
Pass
Improvement
Backbone
Model
@1
@3
Avg.
Charge
GRAVY
Immu.
Liab.
Random
0.003
0.009
-0.419
-0.071
0.000
-1.243
-0.363
MCMC
0.004
0.012
-0.043
0.308
0.008
-0.465
-0.115
Haiku-4.5
Vanilla
0.077
0.212
0.431
1.223
0.004
-0.037
0.535
Obs.
0.073
0.168
0.477
1.225
0.019
0.167
0.499
DC-Cu
0.188
0.423
0.602
1.240
0.040
0.431
0.696
Appendix
Table A7: Multiple property optimization. Teal indicates improvement over all baselines and bold indicates the best results.
993
114
147
Pass
Improvement
Pass
Improvement
Pass
Improvement
Category
Model
@1
@3
Avg
ipTM
pTM
@1
@3
Avg
ipTM
pTM
@1
@3
Avg
ipTM
pTM
Statistical
Random
0.000
0.000
0.028
0.043
0.013
0.089
0.206
0.016
0.036
-0.003
0.024
0.070
-0.035
-0.041
-0.030
MCMC
0.013
0.040
0.075
0.110
0.039
0.233
0.368
0.069
0.115
0.024
0.171
0.383
0.064
0.101
0.027
Structure-based
ProteinMPNN*
0.000
0.000
0.138
0.196
0.081
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
AbMPNN*
0.000
0.000
0.116
0.164
0.068
0.600
0.762
0.160
0.242
0.077
0.229
0.406
0.109
0.158
0.059
Appendix
Table A8: In silico antibody binindg optimization. Bold indicates the best per column across all methods and teal indicates improvement over all non-structural methods within the same backbone. * indicates structural baselines included as reference.
In drug discovery, molecular optimization aims to iteratively refine a lead compound to improve molecular properties while preserving structural similarity to the original molecule. However, each oracle evaluation is expensive, making sample efficiency a key challenge for existing methods under a limited oracle budget. Trial-and-error approaches require many oracle calls, while methods that leverage external knowledge tend to reuse familiar templates and struggle on challenging objectives. A key missing piece is long-term memory that can ground decisions and provide reusable insights for future optimizations. To address this, we present MolMem (Molecular optimization with Memory), a multi-turn agentic reinforcement learning (RL) framework with a dual-memory system. Specifically, MolMem uses Static Exemplar Memory to retrieve relevant exemplars for cold-start grounding, and Evolving Skill Memory to distill successful trajectories into reusable strategies. Built on this memory-augmented formulation, we train the policy with dense step-wise rewards, turning costly rollouts into long-term knowledge that improves future optimization. Extensive experiments show that MolMem achieves 90% success on single-property tasks (1.5× over the best baseline) and 52% on multi-property tasks using only 500 oracle calls. Our code is available at https://github.com/REAL-Lab-NU/MolMem.
Long-term memory is essential for LLM agents that operate across multiple sessions, yet existing memory systems treat retrieval infrastructure as fixed: stored content evolves while scoring functions, fusion strategies, and answer-generation policies remain frozen at deployment. We argue that truly adaptive memory requires co-evolution at two levels: the stored knowledge and the retrieval mechanism that queries it. We present EvolveMem, a self-evolving memory architecture that exposes its full retrieval configuration as a structured action space optimized by an LLM-powered diagnosis module. In each evolution round, the module reads per-question failure logs, identifies root causes, and proposes targeted configuration adjustments; a guarded meta-analyzer applies them with automatic revert-on-regression and explore-on-stagnation safeguards. This closed-loop self-evolution realizes an AutoResearch process: the system autonomously conducts iterative research cycles on its own architecture, replacing manual configuration tuning. Starting from a minimal baseline, the process converges autonomously, discovering effective retrieval strategies including entirely new configuration dimensions not present in the original action space. On LoCoMo, EvolveMem outperforms the strongest baseline by 25.7% relative and achieves a 78.0% relative improvement over the minimal baseline. On MemBench, EvolveMem exceeds the strongest baseline by 18.9% relative. Evolved configurations transfer across benchmarks with positive rather than catastrophic transfer, indicating that the self-evolution process captures universal retrieval principles rather than benchmark-specific heuristics. Code is available at https://github.com/aiming-lab/SimpleMem.
LLM-based agents increasingly operate in persistent environments where they must store, update, and reason over information across many sessions. While prior benchmarks evaluate only single-entity updates, MEME defines six tasks spanning the full space defined by the multi-entity and evolving axes, including three not scored by prior work: Cascade and Absence (dependency reasoning) and Deletion (post-removal state). Evaluating six memory systems spanning three memory paradigms on 100 controlled episodes, we find that all systems collapse on dependency reasoning under the default configuration (Cascade: 3%, Absence: 1% in average accuracy) despite adequate static retrieval performance. Prompt optimization, deeper retrieval, reduced filler noise, and most stronger LLMs fail to close this gap. Only a file-based agent paired with Claude Opus 4.7 as its internal LLM partially closes the gap, but at ~70x the baseline cost, indicating closure currently depends on configurations that are not practical at scale. Code and data are available on the project page: https://seokwonjung-jay.github.io/meme-eval/.
Seokwon Jung, Alexander Rubinstein, Arnas Uselis +2
1KAIST AI · 2Tübingen AI Center, University of Tübingen · 3NAVER AI Lab