SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.10037 · NeurIPS · 2023

Can Language Models Solve Graph Problems in Natural Language?

Heng Wang, Yulia Tsvetkov, Shangbin Feng, Zhaoxuan Tan, Tianxing He, Xiaochuang Han

arXiv · PDF · Open in the Atlas

Code that ran

11 of 22 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 9 have no contract verdict; 2 failures of our instrument; 11 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2305.10037.json · badge: /api/ran/2305.10037.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
Arthur-Heng/NLGraph canonical (classifier label)
classifier basis: census
9 ran · 11 no recorded run
arthur-heng/nlgraph canonical (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
check Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/hamilton.py
code served (permissive licence) · get_code("782c581cdb1bbb73")
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 int, ndim 0, dtype family int, 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 networkx as nx

# Create a small graph that forms a Hamiltonian path
# Nodes: 0, 1, 2, 3
# Edges: 0-1, 1-2, 2-3 (forms a path)
G = nx.Graph()
G.add_nodes_from([0, 1, 2, 3])
G.add_edges_from([(0, 1), (1, 2), (2, 3)])

# Create a valid solution: a Hamiltonian path visiting all nodes exactly once
# in an order that follows edges
solution = [0, 1, 2, 3]

ARGS = {
    "solution": solution,
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
check Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/topology.py
code served (permissive licence) · get_code("5c1d56344deffa84")
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 int, ndim 0, dtype family int, 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 networkx as nx

# Create a small directed graph
G = nx.DiGraph()
G.add_edges_from([(0, 1), (0, 2), (1, 3)])

# Create a valid solution: nodes with in_degree 0
# Node 0 has in_degree 0, so it can be in the solution
# When we select node 0, we decrement in_degree of its neighbors (1, 2)
# Then we need to select nodes that now have in_degree 0
# After selecting 0: deg = [0, 0, 0, 1]
# Node 1 now has in_degree 0, select it: deg = [0, 0, 0, 0]
# Node 2 has in_degree 0, select it: deg = [0, 0, 0, 0]
# Node 3 still has in_degree 1, so we need to include it but it has incoming edges
# Let me create a simpler graph where a valid solution exists

# Simpler case: chain graph 0->1->2->3
G = nx.DiGraph()
G.add_edges_from([(0, 1), (1, 2), (2, 3)])

# Valid solution: [0, 1, 2, 3] processes all nodes
# Start: deg = [0, 1, 1, 1]
# Select 0: deg = [0, 0, 1, 1]
# Select 1: deg = [0, 0, 0, 1]
# Select 2: deg = [0, 0, 0, 0]
# Select 3: deg = [0, 0, 0, 0]
# Final check: all deg[i] == 0, return 1

solution = [0, 1, 2, 3]

ARGS = {
    "solution": solution,
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
evaluate Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/flow.py
code served (permissive licence) · get_code("daa7ab27ed6a2874")
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 tuple, ndim 1, dtype family int; 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

torch.manual_seed(0)

# The function expects:
# ans: a string containing text about maximum flow
# G: a graph object (not actually used in the function body)
# q: a tuple/list with two node indices [source, target]
# std: the expected standard/correct maximum flow value

# Create a simple stand-in graph class
class SimpleGraph:
    def __init__(self):
        self.nodes = [0, 1, 2, 3]
        self.edges = [(0, 1), (1, 2), (2, 3)]

# Create test arguments
G = SimpleGraph()

# q is a list/tuple with source and target nodes
q = [0, 3]

# std is the expected maximum flow value
std = 42

# ans is a string that should contain the pattern "the maximum flow from node X to node Y"
# followed by a number
ans = "the maximum flow from node 0 to node 3 is 42 units"

ARGS = {
    "ans": ans,
    "G": G,
    "q": q,
    "std": std
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple 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
evaluate Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/gnn.py
code served (permissive licence) · get_code("4c51f0221b1060a1")
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 int, ndim 0, dtype family int, 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 networkx as nx
import re

# Create a small graph with 3 nodes
G = nx.Graph()
G.add_nodes_from([0, 1, 2])
G.add_edges_from([(0, 1), (1, 2)])

# Create standard values for each node
# Each node has 2 expected output values
std = [
    [1.0, 2.0],
    [3.0, 4.0],
    [5.0, 6.0]
]

# Create an answer string that matches the expected format
# The function looks for "node 0" and then extracts numbers
# Format: "node 0" followed by values for node 0, then node 1, then node 2
# Each node has len(std[i]) + 1 slots (1 for node index + len(std[i]) for values)
ans = "node 0 0 1.0 2.0 1 3.0 4.0 2 5.0 6.0"

ARGS = {
    "ans": ans,
    "std": std,
    "G": G
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
evaluate Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/matching.py
code served (permissive licence) · get_code("e3ef6dfd5527c2c2")
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 int, ndim 0, dtype family int, 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 networkx as nx

# Build a simple directed graph with some edges
G = nx.DiGraph()
# Add edges: (0, 5), (1, 6), (2, 7)
G.add_edges_from([(0, 5), (1, 6), (2, 7)])

# Example answer string that contains "applicant" and "job" keywords
# followed by pairs of numbers that will be parsed
ans = "applicant 0 job 5 and applicant 1 job 6"

# n1 is used to offset the second number in pairs when tag=0
n1 = 5

# std is the expected count of edges that should match the parsed solution
std = 2

ARGS = {
    'ans': ans,
    'G': G,
    'n1': n1,
    'std': std
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
predict Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/shortest_path.py
code served (permissive licence) · get_code("415f590e6388b0be")
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 argparse

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.SC = 0  # Self-consistency flag (0 or 1)
        self.model = "text-davinci-003"  # Non-gpt model for Completion API path
        self.token = 10  # max_tokens parameter

args = Args()

# Create sample input questions
Q = [
    "What is the shortest path from A to B?",
    "How do we find the minimum distance?"
]

# Define ARGS dictionary mapping all parameters
ARGS = {
    "Q": Q,
    "args": args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai, tenacity — 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
translate Ran
ran; our contract draft was wrong, not the code
arthur-heng/nlgraph/evaluation/connectivity.py
code served (permissive licence) · get_code("fac4585dd50fc9b7")
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 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 argparse
import numpy as np

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.prompt = '0-CoT'  # Use a prompt that doesn't require file I/O

args = Args()

# Define parameters for the translate function
m = 3  # number of edges
q = 2  # number of questions

# Create edge array: shape (m, 2) with node indices
edge = np.array([
    [0, 1],
    [1, 2],
    [2, 3]
], dtype=np.int32)

# Create question array: shape (q*2, 2) with node pairs to query
question = np.array([
    [0, 2],
    [0, 3],
    [1, 3],
    [2, 0]
], dtype=np.int32)

# Concatenate edge and question into single array
array = np.vstack([edge, question])

ARGS = {
    'm': m,
    'q': q,
    'array': array,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
translate Ran
ran; our contract draft was wrong, not the code
arthur-heng/nlgraph/evaluation/cycle.py
code served (permissive licence) · get_code("38fdd534407c8c15")
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 argparse

class MockArgs:
    def __init__(self, prompt='0-CoT'):
        self.prompt = prompt

# Create a simple mock args object
mock_args = MockArgs(prompt='0-CoT')

# Define test data
edge = [[0, 1], [1, 2], [2, 3]]
n = 4

# Define ARGS dict mapping all parameters
ARGS = {
    'edge': edge,
    'n': n,
    'args': mock_args
}
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
translate Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/flow.py
code served (permissive licence) · get_code("8e91c3d4139b8193")
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 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 argparse
import networkx as nx

# Create a simple directed graph
G = nx.DiGraph()
G.add_edge(0, 1, capacity=10)
G.add_edge(1, 2, capacity=5)
G.add_edge(0, 2, capacity=8)

# Define query: max flow from node 0 to node 2
q = (0, 2)

# Create parser and set args
parser = argparse.ArgumentParser(description='maximum flow')
parser.add_argument('--prompt', type=str, default='0-CoT', 
                    choices=['0-CoT', 'CoT', 'k-shot', 'LTM', 'PROGRAM'])

args = parser.parse_args(['--prompt', '0-CoT'])

ARGS = {
    'G': G,
    'q': q,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — 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
translate Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/gnn.py
code served (permissive licence) · get_code("04daf61e489de501")
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 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 argparse
import networkx as nx
import numpy as np

# Create a simple graph
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 3), (0, 3)])

# Create embeddings for nodes (4 nodes, embedding dimension 3)
embedding = np.array([
    [0.1, 0.2, 0.3],
    [0.4, 0.5, 0.6],
    [0.7, 0.8, 0.9],
    [1.0, 1.1, 1.2]
])

# Create args namespace
parser = argparse.ArgumentParser(description='GNN')
parser.add_argument('--prompt', type=str, default='0-CoT', choices=['0-CoT', 'LTM', 'PROGRAM', 'CoT', 'k-shot'])
parser.add_argument('--layer', type=int, default=1, choices=[1, 2])

args = parser.parse_args(['--prompt', '0-CoT', '--layer', '1'])

ARGS = {
    'G': G,
    'embedding': embedding,
    'args': args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, numpy — 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
translate Ran
ran on a synthesized input
Arthur-Heng/NLGraph/evaluation/topology.py
code served (permissive licence) · get_code("c8139334cc727e15")
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 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 argparse
import tempfile
import os

# Create a temporary directory and mock prompt files
temp_dir = tempfile.mkdtemp()
prompt_dir = os.path.join(temp_dir, 'NLGraph', 'topology', 'prompt')
os.makedirs(prompt_dir, exist_ok=True)

# Create mock prompt files
for prompt_type in ['CoT', 'k-shot', 'LTM', 'Instruct', 'Algorithm']:
    with open(os.path.join(prompt_dir, f'{prompt_type}-prompt.txt'), 'w') as f:
        f.write(f"This is a {prompt_type} prompt exemplar.")

# Change to temp directory so file opens work
original_dir = os.getcwd()
os.chdir(temp_dir)

# Create parser and parse arguments
parser = argparse.ArgumentParser(description='connectivity')
parser.add_argument('--prompt', type=str, default='CoT', 
                    choices=['CoT', 'k-shot', 'LTM', 'Instruct', 'Algorithm', '0-CoT', 'PROGRAM'])

args = parser.parse_args(['--prompt', 'CoT'])

# Define edges as a list of tuples
edges = [
    (0, 1),
    (1, 2),
    (2, 3)
]

# Number of nodes
n = 4

# Construct the ARGS dict with all parameters needed by translate()
ARGS = {
    'edge': edges,
    'n': n,
    'args': args
}
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 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
evaluate Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/shortest_path.py
code served (permissive licence) · get_code("87574d66dd58d6c4")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/connectivity.py
code served (permissive licence) · get_code("cbe4067d5b14ce7d")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/cycle.py
code served (permissive licence) · get_code("dad997d21261794f")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/flow.py
code served (permissive licence) · get_code("4d787eb13e705643")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/gnn.py
code served (permissive licence) · get_code("d1eee01b3266712e")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/hamilton.py
code served (permissive licence) · get_code("50e688855b366fbc")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/matching.py
code served (permissive licence) · get_code("755ec6742596b4eb")
How it ran

no invocation recorded.

predict Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/topology.py
code served (permissive licence) · get_code("f317ee318e2fe255")
How it ran

no invocation recorded.

translate Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/hamilton.py
code served (permissive licence) · get_code("503a4252204da5ca")
How it ran

no invocation recorded.

translate Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/matching.py
code served (permissive licence) · get_code("92ac2d6e4ce50246")
How it ran

no invocation recorded.

translate Not yet run
unverified (harvested, no recorded run)
Arthur-Heng/NLGraph/evaluation/shortest_path.py
code served (permissive licence) · get_code("8ac657fd99c70d31")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 18 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 18 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) are increasingly adopted for a variety of tasks with implicit graphical structures, such as planning in robotics, multi-hop question answering or knowledge probing, structured commonsense reasoning, and more. While LLMs have advanced the state-of-the-art on these tasks with structure implications, whether LLMs could explicitly process textual descriptions of graphs and structures, map them to grounded conceptual spaces, and perform structured operations remains underexplored. To this end, we propose NLGraph (Natural Language Graph), a comprehensive benchmark of graph-based problem solving designed in natural language. NLGraph contains 29,370 problems, covering eight graph reasoning tasks with varying complexity from simple tasks such as connectivity and shortest path up to complex problems such as maximum flow and simulating graph neural networks. We evaluate LLMs (GPT-3/4) with various prompting approaches on the NLGraph benchmark and find that 1) language models do demonstrate preliminary graph reasoning abilities, 2) the benefit of advanced prompting and in-context learning diminishes on more complex graph problems, while 3) LLMs are also (un)surprisingly brittle in the face of spurious correlations in graph and problem settings. We then propose Build-a-Graph Prompting and Algorithmic Prompting, two instruction-based approaches to enhance LLMs in solving natural language graph problems. Build-a-Graph and Algorithmic prompting improve the performance of LLMs on NLGraph by 3.07% to 16.85% across multiple tasks and settings, while how to solve the most complicated graph reasoning tasks in our setup with language models remains an open research question. The NLGraph benchmark and evaluation code are available at https://github.com/Arthur-Heng/NLGraph. * equal contribution 37th Conference on Neural Information Processing Systems (NeurIPS 2023).

For agents

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

get_harvested_code_for_paper("2305.10037")
get_code_for_paper("2305.10037")
have("2305.10037")

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

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

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

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

Connect an agent — have() is free.