Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- graph-neural-networks
|
| 5 |
+
- combinatorial-optimization
|
| 6 |
+
- tsp
|
| 7 |
+
- floydnet
|
| 8 |
+
- diffusion-models
|
| 9 |
+
- pytorch
|
| 10 |
+
license: mit
|
| 11 |
+
datasets:
|
| 12 |
+
- ocxlabs/FloydNet_TSP_demo
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# FloydNet (Non-Metric TSP / Explicit TSP)
|
| 16 |
+
|
| 17 |
+
## Model Summary
|
| 18 |
+
|
| 19 |
+
**FloydNet** is a graph reasoning architecture designed to mimic the execution of algorithms via a learned, global Dynamic Programming operator. This checkpoint (`_exp`) is trained to solve the **Non-Metric (Explicit) Traveling Salesman Problem**, where edge weights are generic integers and do not necessarily obey the triangle inequality.
|
| 20 |
+
|
| 21 |
+
Unlike standard GNNs that rely on local message passing, FloydNet maintains and refines a global all-pairs relationship tensor, achieving 3-WL (2-FWL) expressive power.
|
| 22 |
+
|
| 23 |
+
## Model Details
|
| 24 |
+
|
| 25 |
+
* **Model ID:** `ocxlabs/FloydNet_TSP_exp`
|
| 26 |
+
* **Architecture:** FloydNet (Deep relational layers with Pivotal Attention)
|
| 27 |
+
* **Task:** General Traveling Salesman Problem (Non-Metric)
|
| 28 |
+
* **Paper:** [FloydNet: A Learning Paradigm for Global Relational Reasoning](https://arxiv.org/abs/YOUR_PAPER_LINK)
|
| 29 |
+
* **Demo Dataset:** [ocxlabs/FloydNet_TSP_demo](https://huggingface.co/datasets/ocxlabs/FloydNet_TSP_demo)
|
| 30 |
+
|
| 31 |
+
## Performance
|
| 32 |
+
|
| 33 |
+
On General TSP instances (N=100-200), FloydNet demonstrates capabilities significantly exceeding strong heuristics:
|
| 34 |
+
* **Optimality:** Achieves an optimality rate of **99.8%** (with 10 samples) on held-out graphs, compared to **38.8%** by the Linkern heuristic.
|
| 35 |
+
* **Exact Solutions:** On single-solution instances, it finds the exact optimal tour in **92.6%** of cases.
|
| 36 |
+
|
| 37 |
+
## Usage: Inference & Evaluation
|
| 38 |
+
|
| 39 |
+
Reproducing TSP results at full scale is computationally heavy. For convenience, we provide a small demo dataset and pre-trained checkpoints.
|
| 40 |
+
|
| 41 |
+
### 1. Preparation
|
| 42 |
+
Download the demo dataset from [Hugging Face](https://huggingface.co/datasets/ocxlabs/FloydNet_TSP_demo). Unzip it and place the extracted folder under `example/data/`.
|
| 43 |
+
|
| 44 |
+
### 2. Inference
|
| 45 |
+
Run inference in `--test_mode` using `torchrun`. The command below assumes a single-node setup with 8 GPUs. Ensure `--subset` is set to `exp`.
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
source .venv/bin/activate
|
| 49 |
+
cd example
|
| 50 |
+
|
| 51 |
+
torchrun \
|
| 52 |
+
--nproc_per_node=8 \
|
| 53 |
+
-m TSP.run \
|
| 54 |
+
--subset exp \
|
| 55 |
+
--output_dir ./outputs/TSP_exp \
|
| 56 |
+
--load_checkpoint path/to/TSP_exp/epoch_01000.pt \
|
| 57 |
+
--test_mode \
|
| 58 |
+
--split_factor 1 \
|
| 59 |
+
--sample_count_per_case 10
|