Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
| 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 (Metric TSP / Euclidean 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 (`_euc`) is trained to solve the **Metric (Euclidean) Traveling Salesman Problem**, where edge weights are defined by Euclidean distances between 2D coordinates.
|
| 20 |
+
|
| 21 |
+
FloydNet operates directly on the pairwise relationship tensor (distance matrix), learning to refine global dependencies without explicit geometric engineering.
|
| 22 |
+
|
| 23 |
+
## Model Details
|
| 24 |
+
|
| 25 |
+
* **Model ID:** `ocxlabs/FloydNet_TSP_euc`
|
| 26 |
+
* **Architecture:** FloydNet (Deep relational layers with Pivotal Attention)
|
| 27 |
+
* **Task:** Metric Traveling Salesman Problem (Euclidean)
|
| 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 Metric TSP instances (N=100-200), FloydNet matches the performance of specialized geometric heuristics:
|
| 34 |
+
* **Robustness:** Maintains robust performance (>96% optimality) within the training distribution ($N \le 100$).
|
| 35 |
+
* **Generalization:** effectively generalizes to larger unseen graph sizes.
|
| 36 |
+
|
| 37 |
+
## Usage: Inference & Evaluation
|
| 38 |
+
|
| 39 |
+
### 1. Preparation
|
| 40 |
+
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/`.
|
| 41 |
+
|
| 42 |
+
### 2. Inference
|
| 43 |
+
Run inference in `--test_mode` using `torchrun`. Ensure `--subset` is set to `euc` and the checkpoint path matches.
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
source .venv/bin/activate
|
| 47 |
+
cd example
|
| 48 |
+
|
| 49 |
+
torchrun \
|
| 50 |
+
--nproc_per_node=8 \
|
| 51 |
+
-m TSP.run \
|
| 52 |
+
--subset euc \
|
| 53 |
+
--output_dir ./outputs/TSP_euc \
|
| 54 |
+
--load_checkpoint path/to/TSP_euc/epoch_01000.pt \
|
| 55 |
+
--test_mode \
|
| 56 |
+
--split_factor 1 \
|
| 57 |
+
--sample_count_per_case 10
|