SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.02805 · ICML · 2024

Graph-enhanced Large Language Models in Asynchronous Plan Reasoning

Valentin Hofmann, Janet Pierrehumbert, Fangru Lin, Emanuele Malfa, Elle Yang, Anthony Cohn

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 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/2402.02805.json · badge: /api/ran/2402.02805.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
fangru-lin/graph-llm-asynchow-plan canonical (classifier label)
classifier basis: classifier_2025
6 ran · 1 no recorded run
FunctionStatusWhere it lives
createGraph Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
fangru-lin/graph-llm-asynchow-plan/prototypical/longest_path.py
code served (permissive licence) · get_code("8ae89fd11601a661")
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) and returned tuple. 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 random

random.seed(42)

ARGS = {
    'num_flows': 3,
    'flow_max_length': 5,
    'graph_type': 'async',
    'distribution': [1, 2, 3, 4, 5]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 tuple — a tuple output has no array shape of its own; none is 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
generate_nshot_prompt_graph Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
fangru-lin/graph-llm-asynchow-plan/benchmark_llm/benchmark_llm.py
code served (permissive licence) · get_code("beb6f978b0460558")
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) and returned str. 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 torch

torch.manual_seed(0)

# Construct benchmark_dic with the required nested structure
benchmark_dic = {
    'prompts': {
        'template_1': {
            'graph_cot_prompts': [
                'Prompt 0 with chain of thought for graph',
                'Prompt 1 with chain of thought for graph',
                'Prompt 2 with chain of thought for graph',
            ],
            'graph_prompts': [
                'Prompt 0 for graph',
                'Prompt 1 for graph',
                'Prompt 2 for graph',
            ],
            'graph_cot_combined_prompts': [
                'Prompt 0 with chain of thought combined',
                'Prompt 1 with chain of thought combined',
                'Prompt 2 with chain of thought combined',
            ],
            'graph_combined_prompts': [
                'Prompt 0 combined',
                'Prompt 1 combined',
                'Prompt 2 combined',
            ],
        }
    }
}

# Construct instruction dictionary with few-shot templates
instruction = {
    'few_shot_cot': 'Few shot with CoT: [PROMPT0] and [PROMPT1]',
    'few_shot': 'Few shot: [PROMPT0] and [PROMPT1]',
}

# Define parameters
best_template = 'template_1'
nshot_idx = [0, 1]
cot = True
graph = 'graph'
combined = ''

ARGS = {
    'benchmark_dic': benchmark_dic,
    'best_template': best_template,
    'instruction': instruction,
    'nshot_idx': nshot_idx,
    'cot': cot,
    'graph': graph,
    'combined': combined,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
generate_prompt Ran
ran; our contract draft was wrong, not the code
fangru-lin/graph-llm-asynchow-plan/prototypical/longest_path.py
code served (permissive licence) · get_code("3b90664fabed7d8a")
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) and returned str. 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 tempfile
import os

# Create a temporary file with the required XML tags
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file_path = temp_file.name

# Write sample prompts with the required tags
prompt_content = """
<cot-edges>
Find the shortest path from @i@ to @j@ using nodes @nodes@ and edges @edges@.
</cot-edges>
<cot-adj>
Find the shortest path from @i@ to @j@ using nodes @nodes@ and adjacency matrix @adj@.
</cot-adj>
<cot-adj-list>
Find the shortest path from @i@ to @j@ using nodes @nodes@ and adjacency list @adj@.
</cot-adj-list>
"""

temp_file.write(prompt_content)
temp_file.close()

# Create a sample graph dictionary
graph = {
    'vertices': [0, 1, 2, 3],
    'edges': [(0, 1), (1, 2), (2, 3), (0, 3)],
    'adjacency': [[0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0]],
    'adjacency_list': {0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]}
}

ARGS = {
    'graph': graph,
    'f': temp_file_path,
    'ftype': 'cot-edges'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
prompt_model_for_all_templates Ran
ran; our contract draft was wrong, not the code
fangru-lin/graph-llm-asynchow-plan/benchmark_llm/benchmark_llm.py
code served (permissive licence) · get_code("48e26b4369fa09b7")
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) 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 torch
import torch.nn as nn
import random

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal tokenizer stand-in
class DummyTokenizer:
    def __call__(self, text):
        return {"input_ids": torch.tensor([[1, 2, 3, 4]])}
    
    def decode(self, ids):
        return "decoded text"

# Create a minimal async benchmark_model function
async def benchmark_model(model_name, prompts, client=None, model=None, tokenizer=None, batch_size=30):
    """Mock implementation that returns dummy responses"""
    return ["response_" + str(i) for i in range(len(prompts))]

# Construct the benchmark_dic with required structure
benchmark_dic = {
    'titles': ['title_' + str(i) for i in range(150)],
    'prompts': {
        'template_1': {
            'vanilla_prompts': ['prompt_' + str(i) for i in range(150)]
        },
        'template_2': {
            'vanilla_prompts': ['prompt_alt_' + str(i) for i in range(150)]
        }
    }
}

# Create model and tokenizer instances
model = DummyModel()
tokenizer = DummyTokenizer()

# Define ARGS dictionary with all parameters
ARGS = {
    'model_name': 'gpt-3.5-turbo',
    'benchmark_dic': benchmark_dic,
    'client': None,
    'model': model,
    'tokenizer': tokenizer,
    'batch': 30
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
prompt_model_for_combined_templates Ran
ran; our contract draft was wrong, not the code
fangru-lin/graph-llm-asynchow-plan/benchmark_llm/benchmark_llm.py
code served (permissive licence) · get_code("072a250c0113af7d")
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) 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 torch
import torch.nn as nn
import random

torch.manual_seed(0)

# Create a minimal tokenizer stand-in
class MinimalTokenizer:
    def __init__(self):
        self.vocab_size = 100
    
    def encode(self, text):
        return [1, 2, 3]
    
    def decode(self, tokens):
        return "decoded text"

# Create a minimal model stand-in
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 5)
    
    def forward(self, input_ids):
        return torch.randn(2, 5)

# Create a minimal client stand-in
class MinimalClient:
    async def call(self, prompt):
        return "model response"

# Build benchmark dictionary with required structure
benchmark_dic = {
    'titles': [f'title_{i}' for i in range(150)],
    'prompts': {
        'best_prompt_key': {
            'vanilla_combined_prompts': [f'prompt_{i}' for i in range(150)]
        }
    }
}

# Define ARGS
ARGS = {
    'model_name': 'test-model',
    'best_prompt': 'best_prompt_key',
    'benchmark_dic': benchmark_dic,
    'client': MinimalClient(),
    'model': MinimalModel(),
    'tokenizer': MinimalTokenizer(),
    'batch': 30
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — 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
read_prompts Ran
ran; our contract draft was wrong, not the code
fangru-lin/graph-llm-asynchow-plan/prototypical/longest_path.py
code served (permissive licence) · get_code("73847c2701147093")
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) and returned str. 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 tempfile
import os

# Create a temporary file with XML-like content containing tags
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write('<intro>This is a test prompt</intro>')
temp_file.close()

ARGS = {
    'file_': temp_file.name,
    'tag': 'intro'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
longest_simple_paths Not yet run
unverified (harvested, no recorded run)
fangru-lin/graph-llm-asynchow-plan/prototypical/longest_path.py
code served (permissive licence) · get_code("ee0e9e373d8175be")
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-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

Planning is a fundamental property of human intelligence. Reasoning about asynchronous plans is challenging since it requires sequential and parallel planning to optimize time costs. Can large language models (LLMs) succeed at this task? Here, we present the first large-scale study investigating this question. We find that a representative set of closed and open-source LLMs, including GPT-4 and LLaMA-2, behave poorly when not supplied with illustrations about the task-solving process in our benchmark Asyn-cHow. We propose a novel technique called Plan Like a Graph (PLaG) that combines graphs with natural language prompts and achieves state-ofthe-art results. We show that although PLaG can boost model performance, LLMs still suffer from drastic degradation when task complexity increases, highlighting the limits of utilizing LLMs for simulating digital devices. We see our study as an exciting step towards using LLMs as efficient autonomous agents. Our code and data are available at https://github.com/ fangru-lin/graph-llm-asynchow-plan.

For agents

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

get_harvested_code_for_paper("2402.02805")
get_code_for_paper("2402.02805")
have("2402.02805")

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

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

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

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

Connect an agent — have() is free.