FloydNet (Metric TSP / Euclidean TSP)

Model Summary

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.

FloydNet operates directly on the pairwise relationship tensor (distance matrix), learning to refine global dependencies without explicit geometric engineering.

Model Details

Performance

On Metric TSP instances (N=100-200), FloydNet matches the performance of specialized geometric heuristics:

  • Robustness: Maintains robust performance (>96% optimality) within the training distribution ($N \le 100$).
  • Generalization: effectively generalizes to larger unseen graph sizes.

Usage: Inference & Evaluation

1. Preparation

Download the demo dataset from Hugging Face. Unzip it and place the extracted folder under example/data/.

2. Inference

Run inference in --test_mode using torchrun. Ensure --subset is set to euc and the checkpoint path matches.

source .venv/bin/activate
cd example

torchrun \
  --nproc_per_node=8 \
  -m TSP.run \
  --subset euc \
  --output_dir ./outputs/TSP_euc \
  --load_checkpoint path/to/TSP_euc/epoch_01000.pt \
  --test_mode \
  --split_factor 1 \
  --sample_count_per_case 10
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train ocxlabs/FloydNet_TSP_euc