Papers › Neural Combinatorial Optimization with Reinforcement Learning

Neural Combinatorial Optimization with Reinforcement Learning

29 Nov 2016arXiv:1611.09940archive 2025-07-28

Irwan Bello, Hieu Pham, Quoc V. Le, Mohammad Norouzi, Samy Bengio

This paper presents a framework to tackle combinatorial optimization problems using neural networks and reinforcement learning. We focus on the traveling salesman problem (TSP) and train a recurrent network that, given a set of city coordinates, predicts a distribution over different city permutations. Using negative tour length as the reward signal, we optimize the parameters of the recurrent network using a policy gradient method. We compare learning the network parameters on a set of training graphs against learning them on individual test graphs. Despite the computational expense, without much engineering and heuristic designing, Neural Combinatorial Optimization achieves close to optimal results on 2D Euclidean graphs with up to 100 nodes. Applied to the KnapSack, another NP-hard problem, the same method obtains optimal solutions for instances with up to 200 items.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 20 code samples harvested from 5 repositories linked to this paper: 14 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 1 violated, 8 with no contract checked; 4 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 20 samples from 5 repositories, 14 ran (10 with no instrument failure; 4 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 14 samples that ran has no recorded date.

Rintarooo/TSP_DRL_PointerNet mentioned on GitHubpytorchMITSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
Rintarooo/TSP_DRL_PtrNet mentioned on GitHubpytorchSyntology: 1 sample, 0 ran · 1 unverified report
Rintarooo/TSP_RL_Pointer_Actor_Critic mentioned on GitHubpytorchMITSyntology: not harvested report
abdullah-al-masud/rl-optimize mentioned on GitHubpytorchMITSyntology: 7 samples, 5 ran (0 instrument-failed) · 2 unverified report
ahottung/EAS mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to POMO: Policy Optimization with Multiple Optima for Reinforcement Learning (arXiv:2010.16011; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 7 unverified) and Efficient Active Search for Combinatorial Optimization Problems (arXiv:2106.05126; that paper's own run record: 0 ran · 1 unverified); nothing checks that they implement this paper's method. report
chaitjo/learning-tsp mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Learning the Travelling Salesperson Problem Requires Rethinking Generalization (arXiv:2006.07054; that paper's own run record: 3 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 4 unverified); nothing checks that they implement this paper's method. report
longkangli/pfss-il mentioned on GitHubpytorchSyntology: not harvested report
pemami4911/neural-combinatorial-rl-pytorch mentioned on GitHubpytorchMITSyntology: 6 samples, 3 ran (0 instrument-failed) · 3 unverified report
zhengsr3/Reinforcement_Learning_Pointer_Networks_TSP_Pytorch mentioned on GitHubpytorchSyntology: not harvested report
JoseVillagranE/Pointer-Networks pytorchSyntology: 5 samples, 5 ran (4 instrument-failed) · 0 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

20 samples harvested: 14 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 1 violated, 8 with no contract checked; 4 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · violated contract
2ran · our draft was wrong
2ran; the contract check could not run
8ran
6unverified

Licence: 7 of the 20 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

Rintarooo/TSP_DRL_PointerNet community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
get_2city_distance env.py ran fingerprinted MIT (permissive) · cb53b718ef642545 · report fixture: signature n1:Tensor/1/float, n2:Tensor/1/float · returned Tensor · level recorded 2026-09-26
Rintarooo/TSP_DRL_PtrNet community (archive-listed) 1 sample, 0 ran · 1 unverified
load_pkl in 46 papers config.py unverified MIT (permissive) · cdefd51f0daf2843 · report
abdullah-al-masud/rl-optimize community (archive-listed) 7 samples, 5 ran (0 instrument-failed) · 2 unverified
comparison_table utils.py ran MIT (permissive) · 131a59fa13a6da38 · report fixture: signature solutions:dict/0/?, keyname:str/0/str, maximize:bool/0/bool · returned DataFrame · level recorded 2026-09-26
create_data_model tsp_utils.py ran MIT (permissive) · c5bf8b09fc4c7356 · report fixture: signature input_data:ndarray/2/float, start_index:int/0/int · returned dict · level recorded 2026-09-26
inference_config rlutils.py ran MIT (permissive) · 603daec7955e6b32 · report fixture: signature config:Config/0/? · returned Config · level recorded 2026-09-26
make_big rlutils.py ran fingerprinted MIT (permissive) · 2a2a3a02703e0cc3 · report fixture: signature x:Tensor/3/float, size_inc:int/0/int · returned Tensor · level recorded 2026-09-26
solve_agent rlutils.py ran MIT (permissive) · 175f1ee7b5d44f2d · report fixture: signature agent:callable/0/?, instances:Tensor/3/float, config:MinimalConfig/0/?, evaluate_func:callable/0/?, keyname:str/0/str · returned dict · level recorded 2026-09-26
get_solution tsp_utils.py unverified MIT (permissive) · 1080a3f43ce02c26 · report
prepare_tsp_config config.py unverified MIT (permissive) · d8ef9d8f7e4a2e47 · report
pemami4911/neural-combinatorial-rl-pytorch community (archive-listed) 6 samples, 3 ran (0 instrument-failed) · 3 unverified
create_dataset in 47 papers sorting_task.py ran MIT (permissive) · 06248b1d4ce6e73f · report fixture: signature train_size:int/0/int, val_size:int/0/int, data_dir:str/0/str, data_len:int/0/int, seed:int/0/int · returned tuple · level recorded 2026-09-26
reward in 13 papers tsp_task.py ran MIT (permissive) · 570a2842c2ff2ab8 · report fixture: signature sample_solution:list/1/Tensor, USE_CUDA:bool/0/bool · returned Tensor · level recorded 2026-09-26
str2bool in 533 papers trainer.py ran · violated contract MIT (permissive) here; the stored copy is pointer only · 248284f69adfeaad · report fixture: signature v:str/0/str · returned bool · level recorded, date not recorded
download_file_from_google_drive in 13 papers tsp_task.py unverified MIT (permissive) · 20f31737837ced8e · report
get_confirm_token in 41 papers tsp_task.py unverified MIT (permissive) here; the stored copy is pointer only · 135b3dc835ffe6ad · report
reward in 13 papers sorting_task.py unverified MIT (permissive) · da119d24707d7943 · report
JoseVillagranE/Pointer-Networks community (archive-listed) 5 samples, 5 ran (4 instrument-failed) · 0 unverified
PreProcessOutput TSP.py ran · honoured contract fingerprinted no licence file found · pointer only · b337a9636b389167 · report fixture: signature outp:Tensor/2/float · returned list · level recorded 2026-09-22
PreProcessOutput_batch RLtraining.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted no licence file found · pointer only · d88d8c4f9d624404 · report fixture: signature batch:ndarray/2/int · returned ndarray · level recorded 2026-09-22
Reward RLtraining.py ran · our draft was wrong no licence file found · pointer only · 7c3324bc44451062 · report fixture: signature sample_solution:Tensor/3/float, device:str/0/str · returned Tensor · level recorded 2026-09-22
sequence_mask in 55 papers
census: 12 implementations from 15 papers, 5 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 1, kind int, dtype int64
pointer_network.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 0c43e7290e581e42 · report fixture: signature lengths:Tensor/1/int, max_len:int/0/int · returned Tensor · level recorded 2026-09-22
tensor_sort RLtraining.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · 926944485fdd4f48 · report fixture: signature input:Tensor/3/float, idxs:Tensor/2/int, dim:int/0/int · returned Tensor · level recorded 2026-09-22

Tasks

Combinatorial OptimizationReinforcement LearningReinforcement Learning (RL)Traveling Salesman Problemreinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections