Papers
Topics
Authors
Recent
Search
2000 character limit reached

HeatACO: Neural-ACO Decoder for TSP

Updated 30 January 2026
  • The paper introduces HeatACO, a decoding algorithm that blends neural priors with a Max-Min Ant System to construct feasible TSP tours under strict degree and single-cycle constraints.
  • It employs a candidate edge list and dynamic pheromone updates, using local distance heuristics and a heatmap exponent to balance exploration and error correction.
  • Optional 2-opt and 3-opt post-processing further refine solutions, yielding competitive gaps and CPU times on TSP instances up to 10K nodes.

HeatACO is a decoding algorithm introduced for large-scale Travelling Salesman Problems (TSP) that integrates neural "heatmap" predictions with a probabilistic Ant Colony Optimization (ACO) framework. It is designed to translate dense edge-probability matrices generated by neural predictors into feasible TSP tours that obey degree-2 and single-cycle constraints, offering high-quality solutions with computational efficiency at scale (Lin et al., 26 Jan 2026).

1. Problem Formulation and Decoding Challenges

The large-scale symmetrical TSP is defined over NN points with coordinates xiR2x_i\in\mathbb R^2 and inter-point distances dij=xixj2d_{ij} = \|x_i - x_j\|_2. A legal TSP tour satisfies two critical constraints: (i) each node has degree 2, enforced by jAij=2\sum_j A_{ij} = 2 for the adjacency matrix A{0,1}N×NA \in \{0,1\}^{N\times N}, and (ii) the tour forms a single cycle, excluding subtours.

Heatmap-based non-autoregressive TSP solvers output a confidence matrix Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}, where higher HijH_{ij} signals greater neural confidence that edge (i,j)(i,j) belongs to a near-optimal solution. Decoding aims to map (H,D)(H, D) to a feasible Hamiltonian cycle. Standard greedy heuristics—such as edge selection by HijH_{ij} ranking—aggregate errors at scale, yielding poor performance as xiR2x_i\in\mathbb R^20 increases. While MCTS-guided k-opt solvers mitigate such error cascades and enforce constraints accurately, their computational costs are prohibitive for high xiR2x_i\in\mathbb R^21.

HeatACO instead reframes decoding as constrained probabilistic construction. It samples tours from a distribution that blends three influences:

  • Local geometry (xiR2x_i\in\mathbb R^22 as a distance heuristic),
  • Neural prior (xiR2x_i\in\mathbb R^23 as a soft edge prior),
  • Global feedback (pheromone trails xiR2x_i\in\mathbb R^24 learned during search).

2. HeatACO Algorithm: Max-Min Ant System Structure

HeatACO is instantiated as a Max-Min Ant System (MMAS) [Stützle & Hoos 2000], maintaining:

  • A pheromone matrix xiR2x_i\in\mathbb R^25 (dynamic global feedback),
  • A static distance heuristic xiR2x_i\in\mathbb R^26,
  • A fixed heatmap xiR2x_i\in\mathbb R^27.

Transition Probability:

Ants construct tours stepwise. At node xiR2x_i\in\mathbb R^28, the next node xiR2x_i\in\mathbb R^29 (unvisited, feasible) is selected with: dij=xixj2d_{ij} = \|x_i - x_j\|_20 where dij=xixj2d_{ij} = \|x_i - x_j\|_21 are exponents, dij=xixj2d_{ij} = \|x_i - x_j\|_22 avoids zero-probability transitions (dij=xixj2d_{ij} = \|x_i - x_j\|_23), and dij=xixj2d_{ij} = \|x_i - x_j\|_24 is the heatmap exponent modulating reliance on the neural prior. dij=xixj2d_{ij} = \|x_i - x_j\|_25 recovers vanilla MMAS.

Candidate Edge Lists:

To achieve scalability, HeatACO restricts sampling and search to dij=xixj2d_{ij} = \|x_i - x_j\|_26 candidate edges (dij=xixj2d_{ij} = \|x_i - x_j\|_27). For each node:

  1. Retain edges with dij=xixj2d_{ij} = \|x_i - x_j\|_28 (dij=xixj2d_{ij} = \|x_i - x_j\|_29).
  2. For each jAij=2\sum_j A_{ij} = 20, take the top-jAij=2\sum_j A_{ij} = 21 highest-jAij=2\sum_j A_{ij} = 22 neighbors (if above threshold).
  3. If needed, pad to jAij=2\sum_j A_{ij} = 23 neighbors with closest nodes by jAij=2\sum_j A_{ij} = 24.

Pheromone Update:

After each batch of ant tours:

  • Evaporation: jAij=2\sum_j A_{ij} = 25
  • Reinforcement: If jAij=2\sum_j A_{ij} = 26 is on elite tour jAij=2\sum_j A_{ij} = 27, jAij=2\sum_j A_{ij} = 28
  • Clamping: jAij=2\sum_j A_{ij} = 29, where A{0,1}N×NA \in \{0,1\}^{N\times N}0, A{0,1}N×NA \in \{0,1\}^{N\times N}1 (A{0,1}N×NA \in \{0,1\}^{N\times N}2), and A{0,1}N×NA \in \{0,1\}^{N\times N}3 is the evaporation rate.

3. Global Coordination and Correction of Local Errors

The heatmap A{0,1}N×NA \in \{0,1\}^{N\times N}4 serves as a soft prior—no edge is strictly forbidden, as even low-confidence options remain accessible. Tour feasibility constraints (degree, subtour) are enforced during sampling. Over multiple iterations, if a high-A{0,1}N×NA \in \{0,1\}^{N\times N}5 edge consistently leads to infeasible or suboptimal tours, reinforcement is withheld and pheromone levels for such edges decay, while effective ones are reinforced. This moderates local heatmap mis-rankings, correcting error cascades without resorting to intensive backtracking or search tree expansion.

4. Post-Processing: 2-opt and 3-opt Local Search

Optional post-processing using 2-opt or 3-opt exchanges is undertaken on the A{0,1}N×NA \in \{0,1\}^{N\times N}6 candidate edge set to further refine constructed tours. In 2-opt, pairs of edges are considered for replacement if the exchange reduces total tour length, with iterative improvement halted when no further gains are found. 3-opt iteratively attempts more complex triple-edge improvements.

Cost for these routines is A{0,1}N×NA \in \{0,1\}^{N\times N}7 for A{0,1}N×NA \in \{0,1\}^{N\times N}8 2-opt passes and A{0,1}N×NA \in \{0,1\}^{N\times N}9 for Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}0 3-opt passes. For Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}1 up to 10,000, these searches typically complete within seconds.

5. Experimental Results and Performance Benchmarks

HeatACO was evaluated on TSP500, TSP1K, and TSP10K datasets, with heatmaps derived from AttGCN [Fu et al.], DIMES (Ożański et al., 2022), UTSP (Erceg et al., 2023), and DIFUSCO (Troulé et al., 2023). Baselines include NAR + Greedy merge (fast but brittle), published parallel MCTS combined with k-opt (Pan et al., 2024), and vanilla MMAS.

Key empirical outcomes for fixed heatmaps, Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}22-opt, using Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}3 ants, 5000 iterations:

Dataset Gap (%) CPU Time
TSP500 0.11 ≈ 2 s
TSP1K 0.23 ≈ 5 s
TSP10K 1.15 ≈ 1 m

Further tightening with 3-opt achieved sub-0.01% gaps on TSP500, approximately 0.05% on TSP1K (tens of seconds), and approximately 0.4% on TSP10K (≈4 m). Greedy merge delivered significantly inferior results (gaps >10–40%), while MCTS/k-opt achieved gaps of 1–4% with much higher CPU times (50 s–16 m).

6. Heatmap Reliability and Distribution Shift Effects

Sparse Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}4 candidate sets with near-perfect recall are attainable by thresholding the heatmap. However, most candidates reside in low-confidence regions, complicating decoding since true tour edges concentrate in a mid-to-high confidence band. Under distribution shift (e.g., TSPLIB circuits, drilling instances), candidate set sizes inflate (Edges/Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}5) and heatmap confidence can collapse, leading to degraded performance for greedy approaches. HeatACO remained robust, maintaining sub-1% gaps in seconds and matching or surpassing parallel MCTS at substantially reduced CPU burden.

Auxiliary diagnostics such as binary cross-entropy (CE) and class-weighted CE (WCE) of Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}6 relative to the reference tour correlated with decoding difficulty, but did not fully predict performance.

7. Hyperparameterization and Practical Considerations

The heatmap exponent Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}7 sharply modulates the influence of the neural prior. Sweeping Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}8 across Hij[0,1]N×NH_{ij} \in [0,1]^{N\times N}9 is empirically sufficient. Greater HijH_{ij}0 sharpens the prior and can accelerate convergence but risks overcommitting to misranked edges or suffering from poor calibration, especially under aggressive local search. Smaller HijH_{ij}1 promotes exploration when HijH_{ij}2 is noisy. An entropy-based label-free heuristic can also automate HijH_{ij}3 selection by targeting the effective support size of the heatmap-only proposal per node.

Parameter settings, full reproducibility instructions, and source code are available at https://github.com/bochenglin/HEATACO (Lin et al., 26 Jan 2026).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to HeatACO.