SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.01227 · 2019

An Efficient Graph Convolutional Network Technique for the Travelling Salesman Problem

arXiv · PDF · Open in the Atlas

Code that ran

7 of 9 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 6 have no contract verdict; 1 failure of our instrument; 2 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/1906.01227.json · badge: /api/ran/1906.01227.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
chaitjo/graph-convnet-tsp canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
LorenzoSciandra/GraphConvolutionalBranchandBound community (classifier label)
classifier basis not recorded on the link
6 ran · 2 no recorded run
FunctionStatusWhere it lives
adjacency_matrix Ran
ran on a synthesized input
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/1tree/main/HybridSolver.py
code served (permissive licence) · get_code("75fed4918c2cc8d9")
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 ndarray, ndim 2, dtype family float, shape (3, 3) 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 numpy as np

# The function expects orig_graph to be an iterable of points/nodes
# Each node should be array-like (convertible to numpy array)
# The function calculates pairwise distances between nodes

# Create a small graph with 3 nodes in 2D space
orig_graph = [
    [0.0, 0.0],      # node 0
    [1.0, 0.0],      # node 1
    [0.0, 1.0],      # node 2
]

ARGS = {
    "orig_graph": orig_graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (3, 3) — shape (3, 3) 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_config Ran
ran; our contract draft was wrong, not the code
chaitjo/graph-convnet-tsp/config.py
code served (permissive licence) · get_code("c6c725f2da1fe430")
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 Settings. 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 json
import tempfile
import os

# Create a temporary directory and default config file
temp_dir = tempfile.mkdtemp()
configs_dir = os.path.join(temp_dir, 'configs')
os.makedirs(configs_dir, exist_ok=True)

# Create a minimal default.json
default_config = {
    "expt_name": "default_experiment",
    "gpu_id": 0,
    "train_filepath": "/tmp/train.txt",
    "val_filepath": "/tmp/val.txt",
    "test_filepath": "/tmp/test.txt",
    "num_nodes": 20,
    "num_neighbors": 10,
    "node_dim": 8,
    "voc_nodes_in": 16,
    "voc_nodes_out": 16,
    "voc_edges_in": 4,
    "voc_edges_out": 4,
    "beam_size": 5,
    "hidden_dim": 64,
    "num_layers": 3,
    "mlp_layers": 2,
    "aggregation": "mean",
    "max_epochs": 100,
    "val_every": 10,
    "test_every": 10,
    "batch_size": 32,
    "batches_per_epoch": -1,
    "accumulation_steps": 1,
    "learning_rate": 0.001,
    "decay_rate": 0.95
}

default_config_path = os.path.join(configs_dir, 'default.json')
with open(default_config_path, 'w') as f:
    json.dump(default_config, f)

# Create a test config file
test_config = {
    "expt_name": "test_experiment",
    "learning_rate": 0.0005
}

test_config_path = os.path.join(configs_dir, 'test.json')
with open(test_config_path, 'w') as f:
    json.dump(test_config, f)

# Change to temp directory so relative path works
original_cwd = os.getcwd()
os.chdir(temp_dir)

ARGS = {
    "filepath": test_config_path
}
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 Settings — a Settings 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
get_nodes Ran
ran on a synthesized input
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/1tree/main/HybridSolver.py
code served (permissive licence) · get_code("904f73141222e6df")
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 torch

# The function iterates over 'graph' and accesses each element as node[0] and node[1]
# It converts them to strings and formats them
# So graph should be an iterable of items where each item is indexable with [0] and [1]

graph = [
    (42, "node_a"),
    (99, "node_b"),
    (7, "node_c"),
]

ARGS = {
    "graph": graph
}
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 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
read_two_opt_solutions Ran
ran on a synthesized input
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/1tree/results/AdjacencyMatrix/analyzer.py
code served (permissive licence) · get_code("e8e257007a4f4f42")
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 dict. 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 re
import tempfile
import os

# Create a temporary file with TSP 2-opt solution data
num_nodes = 10
temp_dir = tempfile.gettempdir()
original_dir = os.getcwd()
os.chdir(temp_dir)

filename = 'tsp_' + str(num_nodes) + '_nodes_2Opt.txt'
with open(filename, 'w') as f:
    f.write("Solution 1: (1.5, 2.3), (3.7, 4.2), (5.1, 6.8)\n")
    f.write("Solution 2: (2.1, 3.4), (4.5, 5.6), (6.7, 7.8)\n")
    f.write("Solution 3: (0.5, 1.2), (2.3, 3.4), (4.5, 5.6), (7.8, 8.9)\n")

ARGS = {
    'num_nodes': num_nodes
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_values Ran
ran on a synthesized input
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/1tree/results/AdjacencyMatrix/analyzer.py
code served (permissive licence) · get_code("5a383ef27769b617")
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 dict. 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 os
import tempfile
import shutil

# Create a temporary directory with sample result files
temp_dir = tempfile.mkdtemp()

# Create sample result files with the expected format
sample_content_1 = """Time taken: 10.5s
elapsed time = 8.3s
time to obtain = 2.1s
Final cycle with edges of 42.5 cost
interrupted = FALSE
generated BBNodes = 100
explored BBNodes = 85
max tree level = 12
level of the BB tree = 8
prob_tour = -5.25
BBNode number = 42
type = CLOSED_NEAREST_NEIGHBOR
Updated best value: 50.0, at time: 1.5
Updated best value: 45.0, at time: 1.8
"""

sample_content_2 = """Time taken: 15.2s
elapsed time = 12.1s
time to obtain = 3.5s
SUBPROBLEM with cost = 38.7,
interrupted = FALSE
generated BBNodes = 200
explored BBNodes = 180
max tree level = 15
level of the BB tree = 10
prob_tour = -3.14
BBNode number = 95
type = CLOSED_1TREE
Updated best value: 45.0, at time: 2.0
"""

sample_content_3 = """Time taken: 20.0s
elapsed time = 18.5s
time to obtain = 5.0s
Final cycle with edges of 55.3 cost
interrupted = TRUE
"""

with open(os.path.join(temp_dir, 'result_1.txt'), 'w') as f:
    f.write(sample_content_1)

with open(os.path.join(temp_dir, 'result_2.txt'), 'w') as f:
    f.write(sample_content_2)

with open(os.path.join(temp_dir, 'result_3.txt'), 'w') as f:
    f.write(sample_content_3)

ARGS = {
    'path': temp_dir
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
safe_eval Ran
ran on a synthesized input
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/Concorde/runner.py
code served (permissive licence) · get_code("c67b8943b8193969")
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 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 ast

def safe_eval(value, default=None):
    """Safely evaluate a string using ast.literal_eval."""
    try:
        return ast.literal_eval(value)
    except (ValueError, SyntaxError):
        return default

# Construct valid arguments for safe_eval
ARGS = {
    "value": "[1, 2, 3]",
    "default": None
}
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 list, ndim 1, dtype family int — 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
significance_test Ran
ran on a synthesized input
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/1tree/results/AdjacencyMatrix/analyzer.py
code served (permissive licence) · get_code("98cbd8181e79d909")
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 dict. 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 numpy as np

# The function takes two dictionaries mapping IDs to numerical values
# We need to create stats_hyb and stats_cla with overlapping keys

stats_hyb = {
    'id_1': 0.85,
    'id_2': 0.92,
    'id_3': 0.78,
    'id_4': 0.88,
    'id_5': 0.91
}

stats_cla = {
    'id_1': 0.80,
    'id_2': 0.89,
    'id_3': 0.75,
    'id_4': 0.86,
    'id_6': 0.84
}

ARGS = {
    'stats_hyb': stats_hyb,
    'stats_cla': stats_cla
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
get_instance Not yet run
unverified (harvested, no recorded run)
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/1tree/main/HybridSolver.py
code served (permissive licence) · get_code("3e25b442a62074f4")
How it ran

no invocation recorded.

run_instance Not yet run
unverified (harvested, no recorded run)
LorenzoSciandra/GraphConvolutionalBranchandBound/src/HybridSolver/Concorde/runner.py
code served (permissive licence) · get_code("11e3d823d255f1dc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 9 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

This paper introduces a new learning-based approach for approximately solving the Travelling Salesman Problem on 2D Euclidean graphs. We use deep Graph Convolutional Networks to build efficient TSP graph representations and output tours in a non-autoregressive manner via highly parallelized beam search. Our approach outperforms all recently proposed autoregressive deep learning techniques in terms of solution quality, inference speed and sample efficiency for problem instances of fixed graph sizes. In particular, we reduce the average optimality gap from 0.52% to 0.01% for 50 nodes, and from 2.26% to 1.39% for 100 nodes. Finally, despite improving upon other learning-based approaches for TSP, our approach falls short of standard Operations Research solvers.

For agents

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

get_harvested_code_for_paper("1906.01227")
get_code_for_paper("1906.01227")
have("1906.01227")

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

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

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

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

Connect an agent — have() is free.