Overview
UniCO is a unified framework designed to solve diverse combinatorial optimization (CO) problems—such as Boolean Satisfiability (SAT) and Hamiltonian Cycles (HCP)—by reducing them to a "General" Traveling Salesman Problem (TSP) encoded as a distance matrix. By moving away from traditional 2D coordinate representations and introducing two novel neural solvers (MatPOENet and MatDIFFNet), the authors demonstrate that a single model can learn to solve multiple NP-hard problem types simultaneously. Notably, this unified approach often outperforms the gold-standard LKH heuristic on discrete and non-metric instances.
The Challenge of Specialized Solvers
Most current "neural solvers" for combinatorial optimization are highly specialized. Researchers typically build one model for the Traveling Salesman Problem (TSP), another for Vehicle Routing (VRP), and a completely different architecture for Boolean Satisfiability (SAT). While effective in isolation, this paradigm is restrictive. Real-world problems are diverse, and designing a bespoke architecture for every variation is highly inefficient.
Furthermore, the bulk of neural TSP research focuses on Euclidean TSP, where nodes have 2D coordinates and distances strictly follow the triangle inequality. However, many real-world problems translate to "General TSPs"—they might be asymmetric (where traveling from A to B costs more than B to A), non-metric, or purely discrete (binary distances). Existing models that rely heavily on coordinate-based graph neural networks (GNNs) simply cannot process these "coordinate-less" matrix inputs.
The UniCO Framework
To address these limitations, the authors propose UniCO, a comprehensive three-step workflow:
- Reduction: Transform various CO problems (like 3SAT or HCP) into a General TSP instance using classic polynomial-time reduction theories.
- Solving: Feed the resulting distance matrix into a general-purpose neural solver.
- Transformation: Convert the resulting TSP tour back into a valid solution for the original problem.
To power this framework, the authors introduce two new architectures designed specifically for matrix-encoded inputs:
- MatPOENet: A reinforcement learning (RL) model based on the Transformer architecture. Its core innovation is the Pseudo One-hot Embedding (POE). Standard one-hot embeddings fail when the number of nodes ($N$) exceeds the embedding dimension ($d$). POE solves this by using a "rough solver" (like Nearest Neighbor) to order nodes, and then applying a continuous, periodic function to create size-agnostic position embeddings.
- MatDIFFNet: A supervised Diffusion-based generative model. It utilizes a "Mix-Noised Reference Map" that fuses the problem's distance matrix with noised solution labels, allowing the model to "denoise" a random matrix into a high-quality TSP heatmap.
Evaluation and Datasets
The authors evaluated UniCO on a diverse "mixed-task" dataset across three problem scales ($N \approx 20, 50, 100$):
- ATSP: Asymmetric TSP (non-metric).
- 2DTSP: Standard Euclidean TSP.
- DHCP: Directed Hamiltonian Cycle Problem (binary distances).
- 3SAT: 3-Satisfiability (reduced to TSP).
- TSPLIB: A standard library of real-world TSP instances used to test zero-shot generalization.
- Large-scale instances: Tested up to $N=10,000$ using the GLOP (divide-and-conquer) framework.
Key Insights
- Reduction as a Unifier: While the theory of NP-completeness (that all NPC problems can be reduced to one another) is foundational to computer science, this paper is one of the first to successfully use it as a practical "interface" for a unified neural solver.
- The "Alpha-Measure" Crash: A fascinating finding is that the legendary LKH heuristic—usually the undisputed champion of TSP solvers—struggles significantly with the discrete, binary distance matrices generated by SAT and HCP reductions. LKH relies on a metric called the "alpha-measure" to prune edges, which breaks down when many edges have identical weights. Neural solvers like MatPOENet do not share this mathematical blind spot.
- Coordinates are a Crutch: By forcing the model to learn from a pure distance matrix rather than 2D coordinates, the authors created a more robust solver that generalizes better to complex problem geometries that do not exist in flat Euclidean space.
Performance Highlights
- Outperforming Heuristics: On the $N=100$ scale, MatPOENet* (the unified model) achieved a better average tour length than LKH-10,000 while being significantly faster (taking roughly 15 minutes versus 2 hours for the full test set).
- Multi-Task Synergy: The "Mixed" models (trained simultaneously on all four problem types) performed nearly as well as, and sometimes better than, models trained on a single task. This suggests that learning the underlying structure of a "General TSP" helps the model solve specific sub-types like SAT more effectively.
- Zero-Shot Generalization: MatPOENet demonstrated a strong ability to solve real-world instances from TSPLIB without ever seeing those specific distributions during training, proving the framework's universality.
Limitations and Future Directions
- Computational Complexity: MatPOENet’s attention mechanism consumes $O(N^3)$ space ($O(N^2)$ for attention and $O(N)$ for rollout). This limits its ability to solve very large instances (e.g., $N > 500$) on a single GPU without resorting to divide-and-conquer methods.
- The Optimality Gap: While the models beat traditional heuristics on complex reductions, there is still a performance gap compared to exact solvers like Gurobi on smaller, simpler instances.
- Expanding the Pool: The authors suggest that more CO problems (like Vertex Cover or Clique) should be formally integrated into the UniCO training pipeline in future iterations.
- Consistency Models: To address the slow inference times associated with the Diffusion-based MatDIFFNet, the authors identify "Consistency Models" as a highly promising future direction.
Summary updated