Dual-Grained Agent Memory and Shapley Context Attribution for Multimodal Agentic Learner
Organizations: UC Merced · Shanghai Jiao Tong University
Abstract
Frontier multimodal large language models (MLLMs) deliver impressive perception yet still falter on scientific and mathematical reasoning. Parameter-level adaptation is unavailable for closed-weight or on-device backbones, and stateless prompting forfeits any compounding benefit from problems already solved. We propose DG-Mem, a dual-grained agentic memory framework that augments a frozen MLLM with a non-parametric, externally stored memory built once from training-time rollouts and consulted read-only at test time. Motivated by the Complementary Learning Systems (CLS) account of human memory, DG-Mem factors its store into an instance-grounded exemplar memory and a category-level schema memory of IF-THEN rules, with a transient reflection store mediating their construction so that schemas are synthesized only from abstract reflections, never from exemplar text. Two design choices distinguish DG-Mem: an online concept categorizer that grows the category space incrementally during training rather than committing to a predefined taxonomy, and a Shapley context attribution procedure that decomposes correctness across the entire retrieved rule set and yields a per-rule utility that re-weights retrieval at test time. The pipeline introduces no gradient updates and is deployable on closed-weight or on-device backbones. Across MathVista, MMMU, and MMMU-Pro on four open-weight and proprietary backbones (Qwen3.5-27B, Qwen3.5-122B-A10B, GPT-5-Nano, Gemini-3-Flash), DG-Mem improves consistently over no-memory and competitive memory baselines.
Figures & tables
| Method | Multimodal | Exemplar | Schema | Credit Assn. | Grad-Free |
|---|---|---|---|---|---|
| Mem0 [ 5 ] | |||||
| Memento [ 47 ] | |||||
| A-Mem [ 30 ] | |||||
| ExpeL [ 44 ] | |||||
| AWM [ 29 ] | |||||
| ReasoningBank [ 17 ] |
| Backbone | Method | MathVista* | MMMU* | MMMU-Pro* | Avg Imp. |
|---|---|---|---|---|---|
| Qwen3.5-122B-A10B | No-memory | 83.6 | 85.8 | 77.9 | - |
| ViLoMem (offline) | 85.2 | 86.4 | 80.0 | +1.4 | |
| ViLoMem (online) | 88.4 | 87.4 | 80.3 | +2.9 | |
| DG-Mem (Ours) | 88.7 | 89.2 | 86.1 | +5.6 | |
| Qwen3.5-27B | No-memory | 82.9 | 83.4 | 75.1 | - |
| ViLoMem (offline) | 86.4 | 85.9 | 74.6 | +1.8 |
| Datasets | MathVista* | MMMU* | MMMU-Pro* |
|---|---|---|---|
| Baseline | 86.2 | 82.4 | 69.0 |
| – w/o (stage-1 schema only) | 88.4 +2.2 | 82.1 -0.3 | 73.4 +4.4 |
| – w/o (stage-1 exemplar only) | 87.6 +1.4 | 84.0 +1.6 | 73.4 +4.4 |
| – w/o utility ( , stage-1 both memory) | 91.0 +4.8 | 84.0 +1.6 | 75.0 +6.0 |
| Full method | 91.6 +5.4 | 84.7 +2.3 | 77.1 +8.1 |
| Test question | Retrieved exemplar ( ) | Retrieved schema rule ( ) | Baseline Ours |
|---|---|---|---|
| MathVista #90. “Subtract all yellow matte blocks. Subtract all tiny brown cylinders. How many objects are left?” | Solved template: “Subtract all red things. Subtract all tiny matte balls. How many objects.” Strategy: “Catalog every object’s color, size, material, and shape, then translate the natural-language descriptors to those attribute categories before subtracting.” | Visual Counting and Attribute Analysis: “Perform an exhaustive initial census of all objects, assign a count of zero to any missing categories, and calculate the cardinality of each subset independently before applying the subtraction.” | Gold: 5 Baseline: 4 (skipped enumeration; “There are 4 objects left.”) Ours: 5 (lists 7 objects, removes 2) |
| MathVista #13. “How many objects are preferred by more than 90% of people in at least one category?” (grouped bar chart) | Solved template: “How many algorithms have accuracy higher than 9 in at least one dataset?” Verification check: “Re-evaluate any bar that appears to end exactly on a midpoint or grid line to confirm whether it meets a ‘strictly greater than’ or ‘strictly less than’ condition.” | Data Analysis and Interpretation: “When identifying threshold-based counts, systematically compute the metric for every distinct item rather than relying on visual estimation of distances or assumed ordering.” | Gold: 0 Baseline: 2 (visually estimated bars near the 90% line) Ours: 0 (computes per-bar height, applies strict ) |
| MathVista #792. “What is the age gap between these two people?” (photo of P. Hammond and M. Kaljurand) | Solved template: same age-gap question structure on a different pair. Verification check: “Cross-verify the identity of the less prominent individual against the primary subject’s known associates or event context, as misidentification of this figure is the most frequent source of error.” | Arithmetic: Age Problems and Data Extraction: “Subtract the earlier birth year from the later birth year, ensuring the values belong to the exact subjects specified in the query.” | Gold: 7 Baseline: 3 (used wrong birth year for Kaljurand: 1958) Ours: 7 (corrects to 1962, then ) |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Train (Stage 1 & 2) | Test (held out) | Total |
|---|---|---|---|
| MathVista (MINI) | 750 | 250 | 1,000 |
| MMMU (DEV+VAL) | 788 | 262 | 1,050 |
| MMMU-Pro | 1,298 | 432 | 1,730 |
| Hyperparameter | Value | Description |
| 0.8 | Similarity / utility interpolation in Eq. ( 5 ) | |
| Category similarity threshold | 0.40 | Min cosine similarity for category retrieval |
| Schema rule similarity threshold | 0.35 | Min cosine similarity for rule retrieval |
| (rules per category) | 2 | Top- rules retrieved per active category |
| Datasets | MathVista* | MMMU* | MMMU-Pro* |
|---|---|---|---|
| Baseline | 64.8 | 67.6 | 48.2 |
| – w/o (stage-1 exemplar only) | 68.8 +4.0 | 72.5 +4.9 | 55.6 +7.4 |
| – w/o (stage-2 schema only) | 67.2 +2.4 | 74.0 +6.4 | 58.1 +9.9 |
| Full method | 74.4 +9.6 | 79.4 +11.8 | 64.4 +16.2 |
| Datasets | MathVista* | MMMU* | MMMU-Pro* |
|---|---|---|---|
| Baseline | 83.6 | 85.8 | 77.9 |
| – w/o (stage-1 exemplar only) | 87.2 +3.6 | 85.8 +0 | 80.9 +3.0 |
| – w/o (stage-2 schema only) | 86.4 +2.8 | 86.5 +0.7 | 81.3 +3.4 |
| Full method | 88.7 +5.1 | 89.2 +3.4 | 86.1 +8.2 |
Memory-Augmented VLMs
Memory-augmented vision-language models use persistent or retrieved context to improve reasoning across long inputs and interactions.
See all 160 papers