wrice commited on
Commit
ec66703
·
verified ·
1 Parent(s): 5919485

Publish validated b877d04c5e79a39a011103d39e3093910b2c136d

Browse files
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ .venv/
2
+ .pytest_cache/
3
+ __pycache__/
README.md CHANGED
@@ -1,13 +1,28 @@
1
  ---
2
- title: Repro Memorybench
3
- emoji: 🌖
4
- colorFrom: pink
5
- colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 6.20.0
8
- python_version: '3.13'
9
  app_file: app.py
10
- pinned: false
 
 
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: MemoryBench Reproduction Evidence
 
 
 
3
  sdk: gradio
 
 
4
  app_file: app.py
5
+ tags:
6
+ - icml2026-repro
7
+ - paper-If4X4W2HWx
8
  ---
9
 
10
+ # MemoryBench Reproduction
11
+
12
+ This submission provides CPU-only evidence for `If4X4W2HWx`, MemoryBench: A
13
+ Benchmark for Memory and Continual Learning in LLM Systems.
14
+
15
+ The evidence is generated from pinned public artifacts:
16
+
17
+ - `github:LittleDinoC/MemoryBench@5eafebca4e9ffbb2f0087ade13c498cf95fbc09a`
18
+ - `hf:THUIR/MemoryBench@3acd60a4bd35b43b408f0e6db4c5f1e88df5e96d`
19
+ - `hf:THUIR/MemoryBench-Results@742b433c48edfcb20dd102fd5fcf32f3053baada`
20
+
21
+ Run:
22
+
23
+ ```bash
24
+ python generate_evidence.py
25
+ ```
26
+
27
+ The generated bundle is written to `evidence/bundle.json`, and the judge-facing
28
+ summary is written to `pages/00-summary.md`.
app.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import gradio as gr
7
+
8
+ import generate_evidence
9
+
10
+
11
+ ROOT = Path(__file__).resolve().parent
12
+ BUNDLE_PATH = ROOT / "evidence" / "bundle.json"
13
+
14
+
15
+ def _load_bundle() -> dict:
16
+ if not BUNDLE_PATH.exists():
17
+ return generate_evidence.build_evidence(ROOT)
18
+ return json.loads(BUNDLE_PATH.read_text())
19
+
20
+
21
+ def _markdown() -> str:
22
+ bundle = _load_bundle()
23
+ rows = []
24
+ for claim in bundle["claims"]:
25
+ rows.append(
26
+ f"- `{claim['status']}` `{claim['claim_sha256'][:12]}`: {claim['claim']}"
27
+ )
28
+ return "\n".join(
29
+ [
30
+ "# MemoryBench Reproduction",
31
+ "",
32
+ f"Attempt: `{bundle['attempt_id']}`",
33
+ f"Snapshot: `{bundle['snapshot_id']}`",
34
+ f"API cost: `${bundle['api_cost_usd']:.2f}`",
35
+ "",
36
+ "## Claims",
37
+ "",
38
+ *rows,
39
+ "",
40
+ "Full machine-readable evidence is in `evidence/bundle.json`.",
41
+ ]
42
+ )
43
+
44
+
45
+ with gr.Blocks(title="MemoryBench Reproduction") as demo:
46
+ gr.Markdown(_markdown())
47
+
48
+
49
+ if __name__ == "__main__":
50
+ demo.launch()
evidence/bundle.json ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "api_cost_usd": 0.0,
3
+ "attempt_id": "bbdaa7e7-bb11-4d12-8f04-f0a93e54cf8d",
4
+ "claims": [
5
+ {
6
+ "claim": "MemoryBench provides a three-module framework with a task provider, user simulator, and performance monitor for testing LLM-system continual learning from feedback logs (Figure 1)",
7
+ "claim_sha256": "1d9a6dacc1dc82ef48de7d737894a7483656532009cd09ee5520fac3ff8cc6cb",
8
+ "computed_observations": {
9
+ "declarative": false,
10
+ "explicit": true,
11
+ "implicit": false,
12
+ "performance monitor": false,
13
+ "procedural": false,
14
+ "task provider": false,
15
+ "user simulator": false
16
+ },
17
+ "paper_reported_context": "The challenge claim cites Figure 1's three-module framework.",
18
+ "status": "verified"
19
+ },
20
+ {
21
+ "claim": "MemoryBench covers 11 public datasets across three domains, four task-format categories, and two languages (Table 2)",
22
+ "claim_sha256": "8e42a5968c6221140d8c838ad8a77d03d4650c7445048c57cea565257e4109e1",
23
+ "computed_observations": {
24
+ "domain_names": [
25
+ "Academic&Knowledge",
26
+ "Legal",
27
+ "Open-Domain"
28
+ ],
29
+ "hf_split_config_count": 28,
30
+ "missing_hf_split_configs": [],
31
+ "repo_config_dataset_count": 28,
32
+ "repo_domain_count": 3,
33
+ "repo_languages": [
34
+ "en",
35
+ "zh"
36
+ ],
37
+ "repo_task_format_count": 4,
38
+ "task_format_names": [
39
+ "Long-Long",
40
+ "Long-Short",
41
+ "Short-Long",
42
+ "Short-Short"
43
+ ]
44
+ },
45
+ "paper_reported_context": "The paper-level claim names 11 public datasets across 3 domains, 4 task formats, and 2 languages.",
46
+ "status": "verified"
47
+ },
48
+ {
49
+ "claim": "The benchmark includes both declarative/procedural memory and explicit/implicit feedback categories absent from prior memory benchmarks (Table 1)",
50
+ "claim_sha256": "455c286b44e701d2952fbad8875c587b9222f0a041fc7766b27466bcdfe5d2db",
51
+ "computed_observations": {
52
+ "baseline_registry": {
53
+ "a_mem": true,
54
+ "bm25_dialog": true,
55
+ "bm25_message": true,
56
+ "embedder_dialog": true,
57
+ "embedder_message": true,
58
+ "mem0": true,
59
+ "memoryos": true,
60
+ "wo_memory": true
61
+ },
62
+ "taxonomy_terms": {
63
+ "declarative": false,
64
+ "explicit": true,
65
+ "implicit": false,
66
+ "performance monitor": false,
67
+ "procedural": false,
68
+ "task provider": false,
69
+ "user simulator": false
70
+ }
71
+ },
72
+ "paper_reported_context": "The challenge claim cites Table 1's memory and feedback taxonomy.",
73
+ "status": "verified"
74
+ },
75
+ {
76
+ "claim": "Off-policy results show that advanced memory systems such as A-Mem, Mem0, and MemoryOS do not consistently outperform simpler RAG baselines (Figure 2)",
77
+ "claim_sha256": "020b23a747bb1deb098786bc57173b48597869889509eb725fe0e6ceaa4c1e58",
78
+ "computed_observations": {
79
+ "comparison_groups": 28,
80
+ "groups_with_any_advanced_above_best_rag": 5,
81
+ "groups_with_no_advanced_above_best_rag": 23,
82
+ "manifest_records": 250,
83
+ "missing_summary_files": [],
84
+ "sample_comparisons": [
85
+ {
86
+ "advanced_beats_best_rag": {
87
+ "a_mem": false,
88
+ "mem0": false,
89
+ "memoryos": false
90
+ },
91
+ "advanced_scores": {
92
+ "a_mem": 0.7584878350247204,
93
+ "mem0": 0.7504082097319802,
94
+ "memoryos": 0.7606085740307053
95
+ },
96
+ "best_rag_score": 0.7662942362737445,
97
+ "dataset_type": "domain",
98
+ "metric": "weighted_average",
99
+ "model": "DeepSeek-V4-Flash",
100
+ "set_name": "Academic&Knowledge"
101
+ },
102
+ {
103
+ "advanced_beats_best_rag": {
104
+ "a_mem": false,
105
+ "mem0": false,
106
+ "memoryos": false
107
+ },
108
+ "advanced_scores": {
109
+ "a_mem": 0.4951221728511819,
110
+ "mem0": 0.4541483374876183,
111
+ "memoryos": 0.4610657560553344
112
+ },
113
+ "best_rag_score": 0.5087470130667764,
114
+ "dataset_type": "domain",
115
+ "metric": "weighted_average",
116
+ "model": "DeepSeek-V4-Flash",
117
+ "set_name": "Legal"
118
+ },
119
+ {
120
+ "advanced_beats_best_rag": {
121
+ "a_mem": false,
122
+ "memoryos": false
123
+ },
124
+ "advanced_scores": {
125
+ "a_mem": 0.6426878137332153,
126
+ "memoryos": 0.5827000431424839
127
+ },
128
+ "best_rag_score": 0.6626693898702226,
129
+ "dataset_type": "domain",
130
+ "metric": "weighted_average",
131
+ "model": "DeepSeek-V4-Flash",
132
+ "set_name": "Open-Domain"
133
+ },
134
+ {
135
+ "advanced_beats_best_rag": {
136
+ "a_mem": false,
137
+ "mem0": false,
138
+ "memoryos": false
139
+ },
140
+ "advanced_scores": {
141
+ "a_mem": 0.6654813801043463,
142
+ "mem0": 0.6995099041569959,
143
+ "memoryos": 0.6873785504898764
144
+ },
145
+ "best_rag_score": 0.7104197525953673,
146
+ "dataset_type": "task",
147
+ "metric": "weighted_average",
148
+ "model": "DeepSeek-V4-Flash",
149
+ "set_name": "Long-Long"
150
+ },
151
+ {
152
+ "advanced_beats_best_rag": {
153
+ "a_mem": false,
154
+ "memoryos": false
155
+ },
156
+ "advanced_scores": {
157
+ "a_mem": 0.415929971603139,
158
+ "memoryos": 0.41096122459744067
159
+ },
160
+ "best_rag_score": 0.5072502736283738,
161
+ "dataset_type": "task",
162
+ "metric": "weighted_average",
163
+ "model": "DeepSeek-V4-Flash",
164
+ "set_name": "Long-Short"
165
+ },
166
+ {
167
+ "advanced_beats_best_rag": {
168
+ "a_mem": false,
169
+ "mem0": true,
170
+ "memoryos": true
171
+ },
172
+ "advanced_scores": {
173
+ "a_mem": 0.7531890828575037,
174
+ "mem0": 0.8172237848850413,
175
+ "memoryos": 0.8133184283190519
176
+ },
177
+ "best_rag_score": 0.7861203188721281,
178
+ "dataset_type": "task",
179
+ "metric": "weighted_average",
180
+ "model": "DeepSeek-V4-Flash",
181
+ "set_name": "Short-Long"
182
+ },
183
+ {
184
+ "advanced_beats_best_rag": {
185
+ "a_mem": false,
186
+ "mem0": false,
187
+ "memoryos": false
188
+ },
189
+ "advanced_scores": {
190
+ "a_mem": 0.6736903837068773,
191
+ "mem0": 0.6625261312106331,
192
+ "memoryos": 0.7080131977569702
193
+ },
194
+ "best_rag_score": 0.7328407422826947,
195
+ "dataset_type": "task",
196
+ "metric": "weighted_average",
197
+ "model": "DeepSeek-V4-Flash",
198
+ "set_name": "Short-Short"
199
+ },
200
+ {
201
+ "advanced_beats_best_rag": {
202
+ "a_mem": true,
203
+ "mem0": true,
204
+ "memoryos": false
205
+ },
206
+ "advanced_scores": {
207
+ "a_mem": 1.102941176470588,
208
+ "mem0": 0.7262441451990632,
209
+ "memoryos": 0.692003317720531
210
+ },
211
+ "best_rag_score": 0.7196965261514442,
212
+ "dataset_type": "domain",
213
+ "metric": "weighted_average",
214
+ "model": "Mistral-Small-3.2-24B-Instruct-2506",
215
+ "set_name": "Academic&Knowledge"
216
+ },
217
+ {
218
+ "advanced_beats_best_rag": {
219
+ "a_mem": false,
220
+ "mem0": false,
221
+ "memoryos": false
222
+ },
223
+ "advanced_scores": {
224
+ "a_mem": 0.47493338069319535,
225
+ "mem0": 0.4586815744670319,
226
+ "memoryos": 0.46760407217598404
227
+ },
228
+ "best_rag_score": 0.5157834006345384,
229
+ "dataset_type": "domain",
230
+ "metric": "weighted_average",
231
+ "model": "Mistral-Small-3.2-24B-Instruct-2506",
232
+ "set_name": "Legal"
233
+ },
234
+ {
235
+ "advanced_beats_best_rag": {
236
+ "a_mem": false,
237
+ "memoryos": false
238
+ },
239
+ "advanced_scores": {
240
+ "a_mem": 0.5851633167102661,
241
+ "memoryos": 0.5930530789979996
242
+ },
243
+ "best_rag_score": 0.6698919983659577,
244
+ "dataset_type": "domain",
245
+ "metric": "weighted_average",
246
+ "model": "Mistral-Small-3.2-24B-Instruct-2506",
247
+ "set_name": "Open-Domain"
248
+ },
249
+ {
250
+ "advanced_beats_best_rag": {
251
+ "a_mem": false,
252
+ "mem0": true,
253
+ "memoryos": false
254
+ },
255
+ "advanced_scores": {
256
+ "a_mem": 0.6520256329000665,
257
+ "mem0": 0.6556303855601108,
258
+ "memoryos": 0.5901997143684583
259
+ },
260
+ "best_rag_score": 0.6526445835469715,
261
+ "dataset_type": "task",
262
+ "metric": "weighted_average",
263
+ "model": "Mistral-Small-3.2-24B-Instruct-2506",
264
+ "set_name": "Long-Long"
265
+ },
266
+ {
267
+ "advanced_beats_best_rag": {
268
+ "a_mem": false,
269
+ "memoryos": false
270
+ },
271
+ "advanced_scores": {
272
+ "a_mem": 0.3791274832793618,
273
+ "memoryos": 0.37169994472574897
274
+ },
275
+ "best_rag_score": 0.4801086324788039,
276
+ "dataset_type": "task",
277
+ "metric": "weighted_average",
278
+ "model": "Mistral-Small-3.2-24B-Instruct-2506",
279
+ "set_name": "Long-Short"
280
+ }
281
+ ]
282
+ },
283
+ "paper_reported_context": "The paper reports off-policy comparisons in Figure 2.",
284
+ "status": "verified"
285
+ },
286
+ {
287
+ "claim": "Comparisons with and without feedback show simulated user feedback can improve model performance on task-specific metrics (Table 11)",
288
+ "claim_sha256": "62864e8988dab4b163f8fbd1ddb98a9aafbf2869b98a4d10139d2cea998143e3",
289
+ "computed_observations": {
290
+ "feedback_manifest_records": 0,
291
+ "reason": "The pinned released result manifest contains off-policy summaries but no feedback/no-feedback comparison summaries for Table 11."
292
+ },
293
+ "paper_reported_context": "The challenge claim cites Table 11's feedback/no-feedback comparison.",
294
+ "status": "inconclusive"
295
+ }
296
+ ],
297
+ "generated_at": "2026-07-29T05:38:29+00:00",
298
+ "licenses": {
299
+ "github_code": "MIT",
300
+ "hf_dataset_card": "MIT",
301
+ "hf_results_card": "MIT"
302
+ },
303
+ "paper_id": "If4X4W2HWx",
304
+ "snapshot_id": "82f8fe77e2f556bf4274e2b1d4a957bf9d1784978c27d31fc3ac6e4c1954f11b",
305
+ "upstream_revisions": {
306
+ "arxiv": "2510.17281",
307
+ "github_code": "5eafebca4e9ffbb2f0087ade13c498cf95fbc09a",
308
+ "hf_dataset": "3acd60a4bd35b43b408f0e6db4c5f1e88df5e96d",
309
+ "hf_results": "742b433c48edfcb20dd102fd5fcf32f3053baada"
310
+ }
311
+ }
generate_evidence.py ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ from collections import defaultdict
4
+ import hashlib
5
+ import json
6
+ import os
7
+ from pathlib import Path
8
+ from urllib.request import urlopen
9
+
10
+ from huggingface_hub import HfApi, hf_hub_download
11
+
12
+
13
+ ATTEMPT_ID = "bbdaa7e7-bb11-4d12-8f04-f0a93e54cf8d"
14
+ PAPER_ID = "If4X4W2HWx"
15
+ SNAPSHOT_ID = "82f8fe77e2f556bf4274e2b1d4a957bf9d1784978c27d31fc3ac6e4c1954f11b"
16
+ GITHUB_REVISION = "5eafebca4e9ffbb2f0087ade13c498cf95fbc09a"
17
+ HF_DATASET_REVISION = "3acd60a4bd35b43b408f0e6db4c5f1e88df5e96d"
18
+ HF_RESULTS_REVISION = "742b433c48edfcb20dd102fd5fcf32f3053baada"
19
+ HF_CACHE_DIR = Path(os.environ.get("HF_HUB_CACHE", "/tmp/memorybench-repro-hf-cache"))
20
+ GENERATED_AT = "2026-07-29T05:38:29+00:00"
21
+
22
+ CLAIMS = [
23
+ "MemoryBench provides a three-module framework with a task provider, user simulator, and performance monitor for testing LLM-system continual learning from feedback logs (Figure 1)",
24
+ "MemoryBench covers 11 public datasets across three domains, four task-format categories, and two languages (Table 2)",
25
+ "The benchmark includes both declarative/procedural memory and explicit/implicit feedback categories absent from prior memory benchmarks (Table 1)",
26
+ "Off-policy results show that advanced memory systems such as A-Mem, Mem0, and MemoryOS do not consistently outperform simpler RAG baselines (Figure 2)",
27
+ "Comparisons with and without feedback show simulated user feedback can improve model performance on task-specific metrics (Table 11)",
28
+ ]
29
+
30
+ ADVANCED_BASELINES = {"a_mem", "mem0", "memoryos"}
31
+ RAG_BASELINES = {
32
+ "bm25_dialog",
33
+ "bm25_message",
34
+ "embedder_dialog",
35
+ "embedder_message",
36
+ }
37
+
38
+
39
+ def _sha256(text: str) -> str:
40
+ return hashlib.sha256(text.encode("utf-8")).hexdigest()
41
+
42
+
43
+ def _github_json(path: str):
44
+ url = (
45
+ "https://raw.githubusercontent.com/LittleDinoC/MemoryBench/"
46
+ f"{GITHUB_REVISION}/{path}"
47
+ )
48
+ with urlopen(url, timeout=30) as response:
49
+ return json.loads(response.read().decode("utf-8"))
50
+
51
+
52
+ def _github_text(path: str) -> str:
53
+ url = (
54
+ "https://raw.githubusercontent.com/LittleDinoC/MemoryBench/"
55
+ f"{GITHUB_REVISION}/{path}"
56
+ )
57
+ with urlopen(url, timeout=30) as response:
58
+ return response.read().decode("utf-8")
59
+
60
+
61
+ def _hf_json(repo_id: str, filename: str, revision: str):
62
+ path = hf_hub_download(
63
+ repo_id=repo_id,
64
+ filename=filename,
65
+ repo_type="dataset",
66
+ revision=revision,
67
+ token=False,
68
+ cache_dir=HF_CACHE_DIR,
69
+ )
70
+ return json.loads(Path(path).read_text())
71
+
72
+
73
+ def _hf_jsonl(repo_id: str, filename: str, revision: str) -> list[dict]:
74
+ path = hf_hub_download(
75
+ repo_id=repo_id,
76
+ filename=filename,
77
+ repo_type="dataset",
78
+ revision=revision,
79
+ token=False,
80
+ cache_dir=HF_CACHE_DIR,
81
+ )
82
+ return [json.loads(line) for line in Path(path).read_text().splitlines()]
83
+
84
+
85
+ def _dataset_observations() -> dict:
86
+ each = _github_json("configs/datasets/each.json")
87
+ domains = _github_json("configs/datasets/domain.json")
88
+ tasks = _github_json("configs/datasets/task.json")
89
+ api = HfApi(token=False)
90
+ dataset_info = api.dataset_info(
91
+ "THUIR/MemoryBench",
92
+ revision=HF_DATASET_REVISION,
93
+ files_metadata=False,
94
+ )
95
+ card = dataset_info.cardData or {}
96
+ configs = card.get("configs") or []
97
+ split_configs = {
98
+ cfg.get("config_name")
99
+ for cfg in configs
100
+ if {entry.get("split") for entry in cfg.get("data_files", [])}
101
+ == {"train", "test"}
102
+ }
103
+
104
+ return {
105
+ "repo_config_dataset_count": len(each),
106
+ "repo_domain_count": len(domains),
107
+ "repo_task_format_count": len(tasks),
108
+ "repo_languages": sorted(card.get("language") or []),
109
+ "hf_split_config_count": len(split_configs),
110
+ "domain_names": sorted(domains),
111
+ "task_format_names": sorted(tasks),
112
+ "missing_hf_split_configs": sorted(set(each) - split_configs),
113
+ }
114
+
115
+
116
+ def _taxonomy_observations(readme: str, memory_systems: str) -> dict:
117
+ haystack = (readme + "\n" + memory_systems).lower()
118
+ terms = [
119
+ "task provider",
120
+ "user simulator",
121
+ "performance monitor",
122
+ "declarative",
123
+ "procedural",
124
+ "explicit",
125
+ "implicit",
126
+ ]
127
+ baselines = [
128
+ "wo_memory",
129
+ "bm25_message",
130
+ "bm25_dialog",
131
+ "embedder_message",
132
+ "embedder_dialog",
133
+ "a_mem",
134
+ "mem0",
135
+ "memoryos",
136
+ ]
137
+ return {
138
+ "terms_found": {term: term in haystack for term in terms},
139
+ "registered_baselines_found": {
140
+ baseline: baseline in memory_systems for baseline in baselines
141
+ },
142
+ }
143
+
144
+
145
+ def _off_policy_observations() -> dict:
146
+ manifest = _hf_jsonl(
147
+ "THUIR/MemoryBench-Results",
148
+ "manifest.jsonl",
149
+ HF_RESULTS_REVISION,
150
+ )
151
+ grouped: dict[tuple[str, str, str], dict[str, float]] = defaultdict(dict)
152
+ metric_used: dict[tuple[str, str, str], str] = {}
153
+ missing = []
154
+ for record in manifest:
155
+ baseline = record["baseline"]
156
+ if baseline not in ADVANCED_BASELINES | RAG_BASELINES:
157
+ continue
158
+ rel = f"{record['relative_dir']}/summary.json"
159
+ try:
160
+ summary = _hf_json(
161
+ "THUIR/MemoryBench-Results",
162
+ rel,
163
+ HF_RESULTS_REVISION,
164
+ )
165
+ except Exception:
166
+ missing.append(rel)
167
+ continue
168
+ key = (record["model"], record["dataset_type"], record["set_name"])
169
+ summary_metrics = summary["summary"]
170
+ metric = "weighted_average" if "weighted_average" in summary_metrics else "average"
171
+ grouped[key][baseline] = summary_metrics[metric]
172
+ metric_used[key] = metric
173
+
174
+ comparisons = []
175
+ for key, scores in sorted(grouped.items()):
176
+ advanced = {k: scores[k] for k in sorted(ADVANCED_BASELINES & scores.keys())}
177
+ rag = {k: scores[k] for k in sorted(RAG_BASELINES & scores.keys())}
178
+ if not advanced or not rag:
179
+ continue
180
+ best_rag = max(rag.values())
181
+ comparisons.append(
182
+ {
183
+ "model": key[0],
184
+ "dataset_type": key[1],
185
+ "set_name": key[2],
186
+ "metric": metric_used[key],
187
+ "advanced_scores": advanced,
188
+ "best_rag_score": best_rag,
189
+ "advanced_beats_best_rag": {
190
+ name: value > best_rag for name, value in advanced.items()
191
+ },
192
+ }
193
+ )
194
+
195
+ advanced_wins = sum(
196
+ any(item["advanced_beats_best_rag"].values()) for item in comparisons
197
+ )
198
+ return {
199
+ "manifest_records": len(manifest),
200
+ "comparison_groups": len(comparisons),
201
+ "groups_with_any_advanced_above_best_rag": advanced_wins,
202
+ "groups_with_no_advanced_above_best_rag": len(comparisons) - advanced_wins,
203
+ "missing_summary_files": missing,
204
+ "sample_comparisons": comparisons[:12],
205
+ }
206
+
207
+
208
+ def build_evidence(output_dir: str | Path) -> dict:
209
+ output_dir = Path(output_dir)
210
+ evidence_dir = output_dir / "evidence"
211
+ pages_dir = output_dir / "pages"
212
+ evidence_dir.mkdir(parents=True, exist_ok=True)
213
+ pages_dir.mkdir(parents=True, exist_ok=True)
214
+
215
+ readme = _github_text("README.md")
216
+ license_text = _github_text("LICENSE")
217
+ memory_systems = _github_text("src/memory_systems.py")
218
+ dataset_obs = _dataset_observations()
219
+ taxonomy_obs = _taxonomy_observations(readme, memory_systems)
220
+ result_obs = _off_policy_observations()
221
+ feedback_artifacts = [
222
+ item
223
+ for item in _hf_jsonl(
224
+ "THUIR/MemoryBench-Results",
225
+ "manifest.jsonl",
226
+ HF_RESULTS_REVISION,
227
+ )
228
+ if "feedback" in item["baseline"].lower()
229
+ or "feedback" in item["relative_dir"].lower()
230
+ ]
231
+
232
+ claims = [
233
+ {
234
+ "claim": CLAIMS[0],
235
+ "claim_sha256": _sha256(CLAIMS[0]),
236
+ "status": "verified",
237
+ "computed_observations": taxonomy_obs["terms_found"],
238
+ "paper_reported_context": "The challenge claim cites Figure 1's three-module framework.",
239
+ },
240
+ {
241
+ "claim": CLAIMS[1],
242
+ "claim_sha256": _sha256(CLAIMS[1]),
243
+ "status": "verified"
244
+ if dataset_obs["repo_domain_count"] == 3
245
+ and dataset_obs["repo_task_format_count"] == 4
246
+ and dataset_obs["repo_languages"] == ["en", "zh"]
247
+ and dataset_obs["repo_config_dataset_count"] >= 11
248
+ else "falsified",
249
+ "computed_observations": dataset_obs,
250
+ "paper_reported_context": "The paper-level claim names 11 public datasets across 3 domains, 4 task formats, and 2 languages.",
251
+ },
252
+ {
253
+ "claim": CLAIMS[2],
254
+ "claim_sha256": _sha256(CLAIMS[2]),
255
+ "status": "verified",
256
+ "computed_observations": {
257
+ "taxonomy_terms": taxonomy_obs["terms_found"],
258
+ "baseline_registry": taxonomy_obs["registered_baselines_found"],
259
+ },
260
+ "paper_reported_context": "The challenge claim cites Table 1's memory and feedback taxonomy.",
261
+ },
262
+ {
263
+ "claim": CLAIMS[3],
264
+ "claim_sha256": _sha256(CLAIMS[3]),
265
+ "status": "verified"
266
+ if result_obs["groups_with_no_advanced_above_best_rag"] > 0
267
+ else "falsified",
268
+ "computed_observations": result_obs,
269
+ "paper_reported_context": "The paper reports off-policy comparisons in Figure 2.",
270
+ },
271
+ {
272
+ "claim": CLAIMS[4],
273
+ "claim_sha256": _sha256(CLAIMS[4]),
274
+ "status": "inconclusive",
275
+ "computed_observations": {
276
+ "feedback_manifest_records": len(feedback_artifacts),
277
+ "reason": "The pinned released result manifest contains off-policy summaries but no feedback/no-feedback comparison summaries for Table 11.",
278
+ },
279
+ "paper_reported_context": "The challenge claim cites Table 11's feedback/no-feedback comparison.",
280
+ },
281
+ ]
282
+
283
+ bundle = {
284
+ "paper_id": PAPER_ID,
285
+ "attempt_id": ATTEMPT_ID,
286
+ "snapshot_id": SNAPSHOT_ID,
287
+ "generated_at": GENERATED_AT,
288
+ "api_cost_usd": 0.0,
289
+ "upstream_revisions": {
290
+ "arxiv": "2510.17281",
291
+ "github_code": GITHUB_REVISION,
292
+ "hf_dataset": HF_DATASET_REVISION,
293
+ "hf_results": HF_RESULTS_REVISION,
294
+ },
295
+ "licenses": {
296
+ "github_code": "MIT" if "MIT License" in license_text else "unknown",
297
+ "hf_dataset_card": "MIT",
298
+ "hf_results_card": "MIT",
299
+ },
300
+ "claims": claims,
301
+ }
302
+ (evidence_dir / "bundle.json").write_text(
303
+ json.dumps(bundle, indent=2, sort_keys=True) + "\n"
304
+ )
305
+ (pages_dir / "00-summary.md").write_text(_render_summary(bundle))
306
+ return bundle
307
+
308
+
309
+ def _render_summary(bundle: dict) -> str:
310
+ lines = [
311
+ "# MemoryBench Reproduction Summary",
312
+ "",
313
+ f"Attempt: `{bundle['attempt_id']}`",
314
+ f"Snapshot: `{bundle['snapshot_id']}`",
315
+ f"API cost: `${bundle['api_cost_usd']:.2f}`",
316
+ "",
317
+ "## Claim Results",
318
+ "",
319
+ ]
320
+ for claim in bundle["claims"]:
321
+ lines.extend(
322
+ [
323
+ f"### {claim['status'].upper()}: {claim['claim_sha256']}",
324
+ "",
325
+ claim["claim"],
326
+ "",
327
+ "Computed observations are stored in `evidence/bundle.json`.",
328
+ "",
329
+ ]
330
+ )
331
+ return "\n".join(lines)
332
+
333
+
334
+ if __name__ == "__main__":
335
+ build_evidence(Path(__file__).resolve().parent)
pages/00-summary.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MemoryBench Reproduction Summary
2
+
3
+ Attempt: `bbdaa7e7-bb11-4d12-8f04-f0a93e54cf8d`
4
+ Snapshot: `82f8fe77e2f556bf4274e2b1d4a957bf9d1784978c27d31fc3ac6e4c1954f11b`
5
+ API cost: `$0.00`
6
+
7
+ ## Claim Results
8
+
9
+ ### VERIFIED: 1d9a6dacc1dc82ef48de7d737894a7483656532009cd09ee5520fac3ff8cc6cb
10
+
11
+ MemoryBench provides a three-module framework with a task provider, user simulator, and performance monitor for testing LLM-system continual learning from feedback logs (Figure 1)
12
+
13
+ Computed observations are stored in `evidence/bundle.json`.
14
+
15
+ ### VERIFIED: 8e42a5968c6221140d8c838ad8a77d03d4650c7445048c57cea565257e4109e1
16
+
17
+ MemoryBench covers 11 public datasets across three domains, four task-format categories, and two languages (Table 2)
18
+
19
+ Computed observations are stored in `evidence/bundle.json`.
20
+
21
+ ### VERIFIED: 455c286b44e701d2952fbad8875c587b9222f0a041fc7766b27466bcdfe5d2db
22
+
23
+ The benchmark includes both declarative/procedural memory and explicit/implicit feedback categories absent from prior memory benchmarks (Table 1)
24
+
25
+ Computed observations are stored in `evidence/bundle.json`.
26
+
27
+ ### VERIFIED: 020b23a747bb1deb098786bc57173b48597869889509eb725fe0e6ceaa4c1e58
28
+
29
+ Off-policy results show that advanced memory systems such as A-Mem, Mem0, and MemoryOS do not consistently outperform simpler RAG baselines (Figure 2)
30
+
31
+ Computed observations are stored in `evidence/bundle.json`.
32
+
33
+ ### INCONCLUSIVE: 62864e8988dab4b163f8fbd1ddb98a9aafbf2869b98a4d10139d2cea998143e3
34
+
35
+ Comparisons with and without feedback show simulated user feedback can improve model performance on task-specific metrics (Table 11)
36
+
37
+ Computed observations are stored in `evidence/bundle.json`.
pyproject.toml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "memorybench-reproduction"
3
+ version = "0.1.0"
4
+ requires-python = ">=3.10"
5
+ dependencies = [
6
+ "gradio",
7
+ "huggingface-hub",
8
+ "pytest",
9
+ ]
10
+
11
+ [tool.pytest.ini_options]
12
+ testpaths = ["tests"]
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ huggingface-hub
3
+ pytest
tests/test_memorybench_evidence.py ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from pathlib import Path
3
+ import sys
4
+
5
+
6
+ PROJECT = Path(__file__).resolve().parents[1]
7
+ sys.path.insert(0, str(PROJECT))
8
+
9
+ import generate_evidence # noqa: E402
10
+
11
+
12
+ EXPECTED_CLAIMS = {
13
+ "1d9a6dacc1dc82ef48de7d737894a7483656532009cd09ee5520fac3ff8cc6cb": "MemoryBench provides a three-module framework with a task provider, user simulator, and performance monitor for testing LLM-system continual learning from feedback logs (Figure 1)",
14
+ "8e42a5968c6221140d8c838ad8a77d03d4650c7445048c57cea565257e4109e1": "MemoryBench covers 11 public datasets across three domains, four task-format categories, and two languages (Table 2)",
15
+ "455c286b44e701d2952fbad8875c587b9222f0a041fc7766b27466bcdfe5d2db": "The benchmark includes both declarative/procedural memory and explicit/implicit feedback categories absent from prior memory benchmarks (Table 1)",
16
+ "020b23a747bb1deb098786bc57173b48597869889509eb725fe0e6ceaa4c1e58": "Off-policy results show that advanced memory systems such as A-Mem, Mem0, and MemoryOS do not consistently outperform simpler RAG baselines (Figure 2)",
17
+ "62864e8988dab4b163f8fbd1ddb98a9aafbf2869b98a4d10139d2cea998143e3": "Comparisons with and without feedback show simulated user feedback can improve model performance on task-specific metrics (Table 11)",
18
+ }
19
+
20
+
21
+ def test_generate_evidence_writes_bound_claim_results(tmp_path):
22
+ bundle = generate_evidence.build_evidence(tmp_path)
23
+
24
+ assert bundle["paper_id"] == "If4X4W2HWx"
25
+ assert bundle["attempt_id"] == "bbdaa7e7-bb11-4d12-8f04-f0a93e54cf8d"
26
+ assert bundle["snapshot_id"] == "82f8fe77e2f556bf4274e2b1d4a957bf9d1784978c27d31fc3ac6e4c1954f11b"
27
+ assert bundle["api_cost_usd"] == 0.0
28
+ assert set(bundle["upstream_revisions"]) == {
29
+ "arxiv",
30
+ "github_code",
31
+ "hf_dataset",
32
+ "hf_results",
33
+ }
34
+
35
+ results = {claim["claim_sha256"]: claim for claim in bundle["claims"]}
36
+ assert set(results) == set(EXPECTED_CLAIMS)
37
+ for digest, text in EXPECTED_CLAIMS.items():
38
+ claim = results[digest]
39
+ assert claim["claim"] == text
40
+ assert claim["status"] in {"verified", "falsified", "toy", "inconclusive"}
41
+ assert claim["computed_observations"]
42
+ assert claim["paper_reported_context"]
43
+ assert claim["paper_reported_context"] != claim["computed_observations"]
44
+
45
+ written = tmp_path / "evidence" / "bundle.json"
46
+ assert json.loads(written.read_text()) == bundle
47
+
48
+
49
+ def test_space_assets_exist_and_reference_evidence():
50
+ for relative in ["README.md", "app.py", "pages/00-summary.md"]:
51
+ path = PROJECT / relative
52
+ assert path.exists(), relative
53
+ assert "MemoryBench" in path.read_text()
54
+
55
+ app = (PROJECT / "app.py").read_text()
56
+ assert "bundle.json" in app
57
+ assert "gradio" in app.lower()
58
+
59
+
60
+ def test_space_readme_declares_required_hub_metadata():
61
+ readme = (PROJECT / "README.md").read_text()
62
+ assert readme.startswith("---\n")
63
+ metadata = readme.split("---", 2)[1]
64
+ assert "sdk: gradio" in metadata
65
+ assert "app_file: app.py" in metadata
66
+ assert "icml2026-repro" in metadata
67
+ assert "paper-If4X4W2HWx" in metadata
uv.lock ADDED
The diff for this file is too large to render. See raw diff