SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.11388 · 2026

Deep Reasoning in General Purpose Agents via Structured Meta-Cognition

Wei Pang, Koh, Yulia Tsvetkov, Chirag Shah, Kshitish Ghate, Benjamin Newman, Aylin Caliskan, Shuyue Li, Dan Suciu, Dean Light, Michael Theologitis

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2605.11388.json · badge: /api/ran/2605.11388.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
DeanLight/dolores canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
FunctionStatusWhere it lives
em_score Ran
ran, honoured the contract we drafted
DeanLight/dolores/analysis/results.py
code served (permissive licence) · get_code("bd507c1e65e57edc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function em_score takes two parameters: answer and gold
# It converts both to strings, strips whitespace, converts to lowercase,
# and compares them for equality
# Both can be any type that can be converted to string

answer = "Hello World"
gold = "hello world"

ARGS = {
    "answer": answer,
    "gold": gold,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_task_ids Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DeanLight/dolores/src/dolores/experiment.py
code served (permissive licence) · get_code("767884ff0a5a46d2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random
from typing import Any

class BenchmarkConfig:
    """One benchmark slice to evaluate."""
    def __init__(self, name: str, key_limit: int | list[str] | None = None, key_limit_seed: int = 0, extra_params: dict[str, Any] | None = None):
        self.name = name
        self.key_limit = key_limit
        self.key_limit_seed = key_limit_seed
        self.extra_params = extra_params if extra_params is not None else {}

# Mock the benchmarks modules
class MockBenchmarks:
    @staticmethod
    def list_test_ids(size=None, seed=None, limit=None):
        random.seed(seed if seed is not None else 42)
        if size is not None:
            return [f"task_{i}" for i in range(size)]
        elif limit is not None:
            return [f"task_{i}" for i in range(limit)]
        else:
            return [f"task_{i}" for i in range(10)]

import sys
from types import ModuleType

# Create mock benchmark modules
hello_world = ModuleType('hello_world')
hello_world.list_test_ids = lambda seed: [f"hello_{i}" for i in range(5)]

oolong = ModuleType('oolong')
oolong.list_test_ids = lambda limit=500, seed=42: [f"oolong_{i}" for i in range(min(limit, 20))]

phantomwiki = ModuleType('phantomwiki')
phantomwiki.list_test_ids = lambda size, seed: [f"wiki_{i}" for i in range(size)]

synthworlds = ModuleType('synthworlds')
synthworlds.list_test_ids = lambda: [f"synth_{i}" for i in range(8)]

deepresearchqa = ModuleType('deepresearchqa')
deepresearchqa.list_test_ids = lambda limit=None, seed=42: [f"qa_{i}" for i in range(15)]

benchmarks = ModuleType('benchmarks')
benchmarks.hello_world = hello_world
benchmarks.oolong = oolong
benchmarks.phantomwiki = phantomwiki
benchmarks.synthworlds = synthworlds
benchmarks.deepresearchqa = deepresearchqa

sys.modules['benchmarks'] = benchmarks
sys.modules['benchmarks.hello_world'] = hello_world
sys.modules['benchmarks.oolong'] = oolong
sys.modules['benchmarks.phantomwiki'] = phantomwiki
sys.modules['benchmarks.synthworlds'] = synthworlds
sys.modules['benchmarks.deepresearchqa'] = deepresearchqa

# Create a valid BenchmarkConfig instance for testing
bench = BenchmarkConfig(
    name='oolong',
    key_limit=5,
    key_limit_seed=42,
    extra_params={'limit': 20, 'seed': 42}
)

ARGS = {
    'bench': bench
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
benchmarks, pydantic — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
list_all_task_ids Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DeanLight/dolores/src/dolores/experiment.py
code served (permissive licence) · get_code("af87b1e9c01216ff")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Any

# Mock the benchmark modules since they're not available
class MockBenchmarkModule:
    @staticmethod
    def list_test_ids(*args, **kwargs):
        return ['task_1', 'task_2', 'task_3']

# Create mock modules
import sys
from types import ModuleType

benchmarks = ModuleType('benchmarks')
benchmarks.hello_world = MockBenchmarkModule()
benchmarks.oolong = MockBenchmarkModule()
benchmarks.phantomwiki = MockBenchmarkModule()
benchmarks.synthworlds = MockBenchmarkModule()
benchmarks.deepresearchqa = MockBenchmarkModule()

sys.modules['benchmarks'] = benchmarks
sys.modules['benchmarks.hello_world'] = benchmarks.hello_world
sys.modules['benchmarks.oolong'] = benchmarks.oolong
sys.modules['benchmarks.phantomwiki'] = benchmarks.phantomwiki
sys.modules['benchmarks.synthworlds'] = benchmarks.synthworlds
sys.modules['benchmarks.deepresearchqa'] = benchmarks.deepresearchqa

from pydantic import BaseModel, ConfigDict, Field

class BenchmarkConfig(BaseModel):
    """One benchmark slice to evaluate."""
    name: str
    key_limit: int | list[str] | None = None
    key_limit_seed: int = 0
    extra_params: dict[str, Any] = Field(default_factory=dict)
    
    model_config = ConfigDict(arbitrary_types_allowed=True)

# Create a BenchmarkConfig for oolong (simplest case with defaults)
bench_config = BenchmarkConfig(
    name='oolong',
    key_limit=None,
    key_limit_seed=0,
    extra_params={'limit': 500, 'seed': 42}
)

ARGS = {
    'bench': bench_config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
benchmarks, numpy, pydantic, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_task_result Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DeanLight/dolores/analysis/dr_analysis.py
code served (permissive licence) · get_code("a589ddd8587ff497")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import asyncio
from pathlib import Path
from typing import Any

# Create a temporary directory structure for testing
import tempfile
import json

# Create temporary directory with task structure
temp_dir = tempfile.mkdtemp()
task_dir = Path(temp_dir) / "task_0"
task_dir.mkdir(parents=True, exist_ok=True)

# Create qa.json
qa_data = {
    "question": "What is the capital of France?",
    "answer": "Paris",
    "f1": 1.0,
    "em": 1.0
}
with open(task_dir / "qa.json", "w") as f:
    json.dump(qa_data, f)

# Create scores.json
scores_data = {
    "f1": 1.0,
    "em": 1.0
}
with open(task_dir / "scores.json", "w") as f:
    json.dump(scores_data, f)

# Create metadata.json
metadata = {
    "task_id": "task_0",
    "benchmark": "helloworld_v1"
}
with open(task_dir / "metadata.json", "w") as f:
    json.dump(metadata, f)

# Create run_meta dict
run_meta = {
    "experiment_config": {
        "model": "test_model",
        "version": "1.0",
        "benchmark": "helloworld_v1",
        "max_iter": 10,
        "benchmark_extra_params": {
            "size": 10,
            "seed": 42
        }
    }
}

# Create semaphore
semaphore = asyncio.Semaphore(1)

ARGS = {
    "task_dir": task_dir,
    "run_meta": run_meta,
    "openai_api_key": None,
    "semaphore": semaphore
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
benchmarks — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
task_is_finished Ran
ran, violated the contract we drafted
DeanLight/dolores/src/dolores/experiment.py
code served (permissive licence) · get_code("92475644d084b2e0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import json
from pathlib import Path

# Create a temporary directory to act as log_base_dir
temp_dir = tempfile.mkdtemp()
log_base_dir = temp_dir

# Create a task directory structure with a completed qa.json
task_id = "task_001"
task_dir = Path(log_base_dir) / task_id
task_dir.mkdir(parents=True, exist_ok=True)

# Create a qa.json file with a non-null answer
qa_data = {"answer": "This is the answer", "question": "What is this?"}
qa_path = task_dir / "qa.json"
qa_path.write_text(json.dumps(qa_data))

# Define the task dict
task = {
    "task_id": task_id,
    "name": "sample_task"
}

ARGS = {
    "log_base_dir": log_base_dir,
    "task": task
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
collect_results Not yet run
unverified (harvested, no recorded run)
DeanLight/dolores/analysis/dr_analysis.py
code served (permissive licence) · get_code("cfeb5ccc75ffe9f9")
How it ran

no invocation recorded.

collect_results_from_run_dirs Not yet run
unverified (harvested, no recorded run)
DeanLight/dolores/analysis/dr_analysis.py
code served (permissive licence) · get_code("cdd5f462d650d3ee")
How it ran

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-23.

Repositories linked to this paper

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

Abstract

Humans solve complex problems by flexibly shifting among reasoning modes, often without explicit deliberation: they plan, execute, revise intermediate goals, resolve ambiguity through associative judgment, and apply formal procedures to well-specified subproblems. Current LLM agents lack this flexibility, as their scaffolds hard-code such reasoning decisions in advance through fixed inference patterns. These scaffolds are effective when their prescribed structure matches the task, but brittle when solving the task requires adapting the structure of reasoning itself. We introduce Deep Reasoning -an inference-time approach for constructing task-specific scaffolds through structured meta-reasoning. Deep Reasoning uses a formal language that represents meta-reasoning as executable decompositions over associative inference, formal computation, and recursive subproblem solving, enabling decomposition principles to be encoded as in-context examples that guide test-time scaffold construction. We instantiate this approach in a general-purpose agent (DOLORES) that distributes complex tasks across smaller, more controlled reasoning threads while preserving dependencies among subproblems. We evaluate DOLORES against state-of-the-art scaffolding methods across four hard benchmarks: grounded multi-hop reasoning, synthetic long-chain question answering, long-context aggregation, and deep research-style information seeking. DOLORES outperforms all evaluated scaffolds across four benchmarks, three model sizes, and two model families, improving over the strongest evaluated scaffold baseline by 24.8% on average, including methods tailored to individual benchmark families. Trace and token analyses suggest that while baseline scaffolds fail by overloading individual LLM calls, DOLORES succeeds by distributing cognition across structured, lower-load reasoning threads, thereby reducing premature termination and hallucination. This advantage can even bridge the scaling gap, with an 8B version surpassing all evaluated 32B baselines from the same family in more than half the settings. These results point toward future agentic systems that treat scaffolding as adaptive reasoning, constructing the structure each task requires just-in-time. * Equal contribution.

For agents

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

get_harvested_code_for_paper("2605.11388")
get_code_for_paper("2605.11388")
have("2605.11388")

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

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

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

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

Connect an agent — have() is free.