CycleFormer : TSP Solver Based on Language Modeling

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yook, Jieun, Seo, Junpyo, Huh, Joon, Byun, Han Joon, Moon, Byung-ro
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913532961882112
author Yook, Jieun
Seo, Junpyo
Huh, Joon
Byun, Han Joon
Moon, Byung-ro
author_facet Yook, Jieun
Seo, Junpyo
Huh, Joon
Byun, Han Joon
Moon, Byung-ro
contents We propose a new transformer model for the Traveling Salesman Problem (TSP) called CycleFormer. We identified distinctive characteristics that need to be considered when applying a conventional transformer model to TSP and aimed to fully incorporate these elements into the TSP-specific transformer. Unlike the token sets in typical language models, which are limited and static, the token (node) set in TSP is unlimited and dynamic. To exploit this fact to the fullest, we equated the encoder output with the decoder linear layer and directly connected the context vector of the encoder to the decoder encoding. Additionally, we added a positional encoding to the encoder tokens that reflects the two-dimensional nature of TSP, and devised a circular positional encoding for the decoder tokens that considers the cyclic properties of a tour. By incorporating these ideas, CycleFormer outperforms state-of-the-art (SOTA) transformer models for TSP from TSP-50 to TSP-500. Notably, on TSP-500, the optimality gap was reduced by approximately 2.8 times, from 3.09% to 1.10%, compared to the existing SOTA. The code will be made available at https://github.com/Giventicket/CycleFormer.
format Preprint
id arxiv_https___arxiv_org_abs_2405_20042
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CycleFormer : TSP Solver Based on Language Modeling
Yook, Jieun
Seo, Junpyo
Huh, Joon
Byun, Han Joon
Moon, Byung-ro
Machine Learning
We propose a new transformer model for the Traveling Salesman Problem (TSP) called CycleFormer. We identified distinctive characteristics that need to be considered when applying a conventional transformer model to TSP and aimed to fully incorporate these elements into the TSP-specific transformer. Unlike the token sets in typical language models, which are limited and static, the token (node) set in TSP is unlimited and dynamic. To exploit this fact to the fullest, we equated the encoder output with the decoder linear layer and directly connected the context vector of the encoder to the decoder encoding. Additionally, we added a positional encoding to the encoder tokens that reflects the two-dimensional nature of TSP, and devised a circular positional encoding for the decoder tokens that considers the cyclic properties of a tour. By incorporating these ideas, CycleFormer outperforms state-of-the-art (SOTA) transformer models for TSP from TSP-50 to TSP-500. Notably, on TSP-500, the optimality gap was reduced by approximately 2.8 times, from 3.09% to 1.10%, compared to the existing SOTA. The code will be made available at https://github.com/Giventicket/CycleFormer.
title CycleFormer : TSP Solver Based on Language Modeling
topic Machine Learning
url https://arxiv.org/abs/2405.20042