SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.04968 · NeurIPS · 2024

Collaboration! Towards Robust Neural Methods for Routing Problems

Jie Zhang, Zhiguang Cao, Wen Song, Jianan Zhou, Yaoxin Wu, Zhiqi Shen

arXiv · PDF · Open in the Atlas

Code that ran

4 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 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/2410.04968.json · badge: /api/ran/2410.04968.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
RoyalSkye/Routing-CNF canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
generate_adv_dataset Ran
ran; our contract draft was wrong, not the code
RoyalSkye/Routing-CNF/MatNet/ATSP-HAC/generate_adv.py
code served (permissive licence) · get_code("a6f02f8790022ea7")
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 3, 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 torch.nn as nn

torch.manual_seed(0)

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

# Create a mock generate_x_adv function since it's called in the body
def generate_x_adv(model, nat_data, eps=1, num_steps=1, return_opt=False):
    """Mock adversarial perturbation generator"""
    # Return perturbed data with same shape as input
    return nat_data + torch.randn_like(nat_data) * 0.01

# Patch it into the module namespace for the function to find
import sys
current_module = sys.modules[__name__]
current_module.generate_x_adv = generate_x_adv

# Create test data: shape (batch=2, seq=5, dim=4)
data = torch.randn(2, 5, 4)

# Create model
model = DummyModel()

ARGS = {
    "model": model,
    "data": data,
    "eps_min": 1,
    "eps_max": 3,
    "num_steps": 1
}
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 3, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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_random_problems Ran
ran, honoured the contract we drafted
RoyalSkye/Routing-CNF/MatNet/ATSP-HAC/ATSProblemDef.py
code served (permissive licence) · get_code("150798abd7bb81e3")
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 3, dtype family float, shape (2, 4, 4) 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)

ARGS = {
    'batch_size': 2,
    'node_cnt': 4,
    'problem_gen_params': {
        'int_min': 1,
        'int_max': 10,
        'scaler': 5.0
    }
}
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 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) 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
load_single_problem_from_file Ran
ran, honoured the contract we drafted
RoyalSkye/Routing-CNF/MatNet/ATSP-HAC/ATSProblemDef.py
code served (permissive licence) · get_code("920fae7209e1c57a")
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 (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 torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary file with valid TSPLIB-style edge weight data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.tsp')
temp_filename = temp_file.name

try:
    # Write header lines that should be skipped
    temp_file.write("TYPE: TSP\n")
    temp_file.write("DIMENSION: 3\n")
    temp_file.write("EDGE_WEIGHT_TYPE: EXPLICIT\n")
    temp_file.write("EDGE_WEIGHT_FORMAT: FULL_MATRIX\n")
    temp_file.write("EDGE_WEIGHT_SECTION\n")
    
    # Write edge weight matrix data (3x3)
    temp_file.write("0 10 20\n")
    temp_file.write("10 0 30\n")
    temp_file.write("20 30 0\n")
    
    temp_file.write("EOF\n")
    temp_file.close()
    
    # Define arguments
    ARGS = {
        'filename': temp_filename,
        'node_cnt': 3,
        'scaler': 10.0
    }
finally:
    pass
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 (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
reshape_by_heads Ran
ran; our contract draft was wrong, not the code
RoyalSkye/Routing-CNF/MatNet/ATSP-HAC/ATSPModel.py
pointer only (licence: MIT); the stored copy get_code serves, from yihang0410/RADAR, is pointer only (licence: NONE) · get_code("459fe521069329c6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yihang0410/RADAR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

generate_x_adv Not yet run
unverified (harvested, no recorded run)
RoyalSkye/Routing-CNF/MatNet/ATSP-HAC/ATSProblemDef.py
code served (permissive licence) · get_code("c5221ee4e474a5c0")
How it ran

no invocation recorded.

get_lkh_executable Not yet run
unverified (harvested, no recorded run)
RoyalSkye/Routing-CNF/MatNet/ATSP-HAC/generate_adv.py
code served (permissive licence) · get_code("2d392e7a5022b4c0")
How it ran

no invocation recorded.

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, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 5 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
reshape_by_heads 28 other papers
14 dated earlier, 2 the same month, 10 later, 1 same year, order not determinable, 1 undated · 15 only as an assembly brick
2010.16011 (2020-10)
POMO: Policy Optimization with Multiple Optima for Reinforcement Learning
2106.11113 (2021-06)
Matrix Encoding Networks for Neural Combinatorial Optimization
2203.15386 (2022-03)
Pareto Set Learning for Neural Multi-objective Combinatorial Optimization
and 25 more not named here

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

Despite enjoying desirable efficiency and reduced reliance on domain expertise, existing neural methods for vehicle routing problems (VRPs) suffer from severe robustness issues -their performance significantly deteriorates on clean instances with crafted perturbations. To enhance robustness, we propose an ensemble-based Collaborative Neural Framework (CNF) w.r.t. the defense of neural VRP methods, which is crucial yet underexplored in the literature. Given a neural VRP method, we adversarially train multiple models in a collaborative manner to synergistically promote robustness against attacks, while boosting standard generalization on clean instances. A neural router is designed to adeptly distribute training instances among models, enhancing overall load balancing and collaborative efficacy. Extensive experiments verify the effectiveness and versatility of CNF in defending against various attacks across different neural VRP methods. Notably, our approach also achieves impressive out-of-distribution generalization on benchmark instances.

For agents

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

get_harvested_code_for_paper("2410.04968")
get_code_for_paper("2410.04968")
have("2410.04968")

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

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

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

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

Connect an agent — have() is free.