acceptodds
Under review as a conference paper at ICLR 2027

TopoMem: Compiling Evidence Topology into Executable Memory for Long-Context Reasoning

Abstract

Existing approaches to long-context reasoning use direct inference, retrieval, compression, or agentic processing to access and manage long inputs. Our controlled analyses suggest that locating and retaining relevant text can be insufficient for tasks requiring dependency tracking or global aggregation. We propose TopoMem, a training-free framework that compiles evidence topology—how supporting facts are distributed and related—together with the required composition rule and answer schema into an executable memory contract. A restricted state-execution fast path handles supported event sequences; other queries use a hybrid compiler that reconciles query semantics with observable context structure to select a typed reducer or model-backed reader. The operator library spans 13 evaluated execution routes, including set construction, dependency closure, global counting, numerical execution, and semantic synthesis. With a frozen Qwen3.5-9B backbone across five benchmarks, TopoMem matches or exceeds BM25, ReadAgent-P, and LLM×MapReduce-v1 in all completed benchmark-level comparisons. Relative to the best-performing of these evaluated baselines on each benchmark, it improves scores by 14.31 points on LongBench-v2, 21.02 task-balanced points on InfiniteBench, and 33.80 points on BABILong. Gains over direct inference (Direct-HT) persist on the full-context-fit subsets of LongBench-v2 and InfiniteBench, although Direct-HT remains 1.11 points stronger on RULER. Routing ablations on a controlled RULER subset favor joint semantic–structural selection over either signal alone. These findings support constructing long-context memory around query-dependent computation rather than text retention alone.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.