SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.13767 · 2025

An Efficient Diffusion-based Non-Autoregressive Solver for Traveling Salesman Problem

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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 5 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-24; 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/2501.13767.json · badge: /api/ran/2501.13767.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
deitsp/deitsp canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
batched_two_opt_torch Ran
ran on a synthesized input
deitsp/deitsp/utils/tsp_utils.py
code served (permissive licence) · get_code("9587e3297756f4d3")
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. 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 numpy as np

torch.manual_seed(0)

# Create small point cloud: batch_size=2, num_points=4, coordinates=2D
num_points = 4
batch_size = 2
points = np.random.rand(num_points, 2).astype(np.float32)

# Create initial tours: batch_size=2, tour_length=num_points+1 (closed tour)
# Each tour is a sequence of point indices, with first point repeated at end
tour = np.array([
    [0, 1, 2, 3, 0],
    [0, 2, 3, 1, 0]
], dtype=np.int64)

ARGS = {
    'points': points,
    'tour': tour,
    'max_iterations': 10,
    'device': 'cpu'
}
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 — 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
batched_two_opt_torch_cuda Ran
ran on a synthesized input
deitsp/deitsp/utils/tsp_utils.py
code served (permissive licence) · get_code("9e8ce602af8c4640")
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. 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)

# Create small tensors for testing
# points: tensor of shape (num_points, 2) containing x,y coordinates
num_points = 4
points = torch.randn(num_points, 2)

# tour: tensor of shape (batch_size, tour_length) containing indices into points
# tour_length should be num_points
batch_size = 2
tour = torch.randint(0, num_points, (batch_size, num_points))

# Ensure tour contains valid indices
tour = torch.tensor([[0, 1, 2, 3], [3, 2, 1, 0]], dtype=torch.long)

ARGS = {
    'points': points,
    'tour': tour,
    'max_iterations': 100,
    'device': 'cpu'
}
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 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
get_one_cycle Ran
ran on a synthesized input
deitsp/deitsp/utils/lr_schedulers.py
code served (permissive licence) · get_code("0c44d4af4c356ee5")
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 LambdaLR. 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
from torch.optim import SGD

torch.manual_seed(0)

# Build a minimal model
model = nn.Linear(4, 3)

# Create an optimizer
optimizer = SGD(model.parameters(), lr=0.1)

# Define the number of training steps
num_training_steps = 100

ARGS = {
    "optimizer": optimizer,
    "num_training_steps": num_training_steps,
}
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 LambdaLR — a LambdaLR output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LambdaLR 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_schedule_fn Ran
ran on a synthesized input
deitsp/deitsp/utils/lr_schedulers.py
code served (permissive licence) · get_code("b04bf96acaa8e607")
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 partial. 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
from torch.optim import SGD
from functools import partial
from torch.optim.lr_scheduler import LambdaLR

torch.manual_seed(0)

# Create a minimal model
class TinyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate model and optimizer
model = TinyModel()
optimizer = SGD(model.parameters(), lr=0.1)

# Define arguments
ARGS = {
    'scheduler': 'one-cycle',
    'num_training_steps': 100
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
numpy_merge Ran
ran on a synthesized input
deitsp/deitsp/utils/tsp_utils.py
code served (permissive licence) · get_code("3f4c5b6a015b2fa5")
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. 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

# Construct valid arguments for numpy_merge function
# The function expects:
# - points: array of shape (n_points, n_dims) - used to compute pairwise distances
# - adj_mat: square matrix of shape (n_points, n_points) - adjacency/weight matrix

# Create a small set of points in 2D space
points = np.array([
    [0.0, 0.0],
    [1.0, 0.0],
    [2.0, 0.0],
    [0.0, 1.0]
], dtype=np.float32)

# Create a small adjacency matrix with 4 nodes
# The function uses this to compute weights and sort edges
adj_mat = np.array([
    [0.0, 0.5, 1.0, 2.0],
    [0.5, 0.0, 0.3, 1.5],
    [1.0, 0.3, 0.0, 1.2],
    [2.0, 1.5, 1.2, 0.0]
], dtype=np.float32)

ARGS = {
    "points": points,
    "adj_mat": adj_mat
}
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 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
timestep_embedding Ran
ran; our contract draft was wrong, not the code
deitsp/deitsp/tsp_net.py
code served (permissive licence) · get_code("6c617b25817f8107")
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 Tensor, ndim 2, dtype family float, shape (4, 8) 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 math
import torch

torch.manual_seed(0)

# Create valid arguments for timestep_embedding function
timesteps = torch.tensor([0, 5, 10, 15], dtype=torch.long)
dim = 8
max_period = 10000

ARGS = {
    "timesteps": timesteps,
    "dim": dim,
    "max_period": max_period,
}
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 Tensor, ndim 2, dtype family float, shape (4, 8) — shape (4, 8) 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 1 later) and 1 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.

FunctionAlso present inEarliest-datedOthers named
timestep_embedding 29 other papers
24 dated earlier, 5 later · 9 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2103.11161 (2021-03)
MonteFloor: Extending MCTS for Reconstructing Accurate Large-Scale Floor Plans
and 26 more not named here
batched_two_opt_torch 1 other paper
1 dated earlier
2302.08224 (2023-02)
DIFUSCO: Graph-based Diffusion Solvers for Combinatorial Optimization
get_one_cycle 1 other paper
1 dated earlier
2302.08224 (2023-02)
DIFUSCO: Graph-based Diffusion Solvers for Combinatorial Optimization
get_schedule_fn 1 other paper
1 dated earlier
2302.08224 (2023-02)
DIFUSCO: Graph-based Diffusion Solvers for Combinatorial Optimization
numpy_merge 1 other paper
1 dated earlier
2302.08224 (2023-02)
DIFUSCO: Graph-based Diffusion Solvers for Combinatorial Optimization

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

Repositories linked to this paper

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

Abstract

Recent advances in neural models have shown considerable promise in solving Traveling Salesman Problems (TSPs) without relying on much hand-crafted engineering. However, while non-autoregressive (NAR) approaches benefit from faster inference through parallelism, they typically deliver solutions of inferior quality compared to autoregressive ones. To enhance the solution quality while maintaining fast inference, we propose DEITSP, a diffusion model with efficient iterations tailored for TSP that operates in a NAR manner. Firstly, we introduce a one-step diffusion model that integrates the controlled discrete noise addition process with self-consistency enhancement, enabling optimal solution prediction through simultaneous denoising of multiple solutions. Secondly, we design a dual-modality graph transformer to bolster the extraction and fusion of features from node and edge modalities, while further accelerating the inference with fewer layers. Thirdly, we develop an efficient iterative strategy that alternates between adding and removing noise to improve exploration compared to previous diffusion methods. Additionally, we devise a scheduling framework to progressively refine the solution space by adjusting noise levels, facilitating a smooth search for optimal solutions. Extensive experiments on real-world and large-scale TSP instances demonstrate that DEITSP performs favorably against existing neural approaches in terms of solution quality, inference latency, and generalization ability. Our code is available at $\href{https://github.com/DEITSP/DEITSP}{https://github.com/DEITSP/DEITSP}$.

For agents

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

get_harvested_code_for_paper("2501.13767")
get_code_for_paper("2501.13767")
have("2501.13767")

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

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

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

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

Connect an agent — have() is free.