SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2511.00489 · EMNLP · 2025

ToM: Leveraging Tree-oriented MapReduce for Long-Context Reasoning in Large Language Models

Jie Wu, Yujiu Yang, Lefei Zhang, Yun Li, Zuchao Li, Hai Zhao, Qianren Wang, Jiani Guo

arXiv · PDF · Open in the Atlas

Code that ran

3 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2511.00489.json · badge: /api/ran/2511.00489.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
gjn12-31/ToM community
Papers with Code archive
3 ran · 4 no recorded run
FunctionStatusWhere it lives
TreeNode Ran
ran on a synthesized input · constructed an object; no result was computed
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("8004b7e3471e60b3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

format_map_prompt Ran
ran; our contract draft was wrong, not the code
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("f3b33cd4aa2de1c4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

format_reduce_prompt Ran
ran; our contract draft was wrong, not the code
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("ec81b029a4ec13b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

AsyncMapReducePipeline Not yet run
unverified (harvested, no recorded run)
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("14ea15e38475d993")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

get_model_inference Not yet run
unverified (harvested, no recorded run)
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("9f26e8649c5c2094")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

run_batch_inference Not yet run
unverified (harvested, no recorded run)
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("5261d227a1e9714f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

run_inference Not yet run
unverified (harvested, no recorded run)
gjn12-31/ToM/Reasoning/pipeline.py
pointer only (licence: NONE) · get_code("89b2fef50c90d00f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, gjn12-31/ToM when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large Language Models (LLMs), constrained by limited context windows, often face significant performance degradation when reasoning over long contexts. To address this, Retrieval-Augmented Generation (RAG) retrieves and reasons over chunks but frequently sacrifices logical coherence due to its reliance on similarity-based rankings. Similarly, divideand-conquer frameworks (DCF) split documents into small chunks for independent reasoning and aggregation. While effective for local reasoning, DCF struggles to capture longrange dependencies and risks inducing conflicts by processing chunks in isolation. To overcome these limitations, we propose ToM, a novel Tree-oriented MapReduce framework for long-context reasoning. ToM leverages the inherent hierarchical structure of long documents (e.g., main headings and subheadings) by constructing a DocTree through hierarchical semantic parsing and performing bottom-up aggregation. Using a Tree MapReduce approach, ToM enables recursive reasoning: in the Map step, rationales are generated at child nodes; in the Reduce step, these rationales are aggregated across sibling nodes to resolve conflicts or reach consensus at parent nodes. Experimental results on 70B+ LLMs show that ToM significantly outperforms existing divide-andconquer frameworks and retrieval-augmented generation methods, achieving better logical coherence and long-context reasoning. Our code is available at https://github.com/gjn12-31/ToM. Large Language Models (LLMs) with limited context windows (e.g., 8k, 32k) struggle with reasoning over long contexts. As context length increases, the performance declines due to difficulties in processing information far from the text's beginning * Equal contribution. † Corresponding Author. Retrieved Context c 1 c 2 c 3 c i-1 c i c n Chunk c 3 c i c 2 + Reasoning Answer (b) Divide-and-Conquer Framework (a) Retrieval-Augmented Generation Encoder Q Query (c) Our ToM Framework I. Treat Long Context as DocTree II. Perform MapReduce on DocTree Retrieve Query Node 1 Node 2

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2511.00489")
get_code_for_paper("2511.00489")
have("2511.00489")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2511.00489.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2511.00489.svg)](https://syntology.ai/paper/2511.00489)

Connect an agent — have() is free.