Exploring Combinatorial Problem Solving with Large Language Models: A Case Study on the Travelling Salesman Problem Using GPT-3.5 Turbo

2405.01997

YC

0

Reddit

0

Published 5/6/2024 by Mahmoud Masoud, Ahmed Abdelhay, Mohammed Elhenawy

💬

Abstract

Large Language Models (LLMs) are deep learning models designed to generate text based on textual input. Although researchers have been developing these models for more complex tasks such as code generation and general reasoning, few efforts have explored how LLMs can be applied to combinatorial problems. In this research, we investigate the potential of LLMs to solve the Travelling Salesman Problem (TSP). Utilizing GPT-3.5 Turbo, we conducted experiments employing various approaches, including zero-shot in-context learning, few-shot in-context learning, and chain-of-thoughts (CoT). Consequently, we fine-tuned GPT-3.5 Turbo to solve a specific problem size and tested it using a set of various instance sizes. The fine-tuned models demonstrated promising performance on problems identical in size to the training instances and generalized well to larger problems. Furthermore, to improve the performance of the fine-tuned model without incurring additional training costs, we adopted a self-ensemble approach to improve the quality of the solutions.

Create account to get full access

or

If you already have an account, we'll log you in

Overview

  • This research explores the potential of large language models (LLMs) to solve the Travelling Salesman Problem (TSP), a well-known combinatorial optimization problem.
  • Researchers utilized GPT-3.5 Turbo, a powerful LLM, and experimented with different approaches, including zero-shot in-context learning, few-shot in-context learning, and chain-of-thoughts (CoT).
  • The team also fine-tuned the GPT-3.5 Turbo model to solve a specific problem size and tested it on a range of instances.
  • To further improve the performance of the fine-tuned model, the researchers adopted a self-ensemble approach without additional training.

Plain English Explanation

Large language models are a type of artificial intelligence that can generate human-like text based on what they've learned from a vast amount of data. While these models have shown impressive capabilities in tasks like writing and code generation, researchers wanted to explore how they could be used to solve a specific type of problem: the Travelling Salesman Problem.

The Travelling Salesman Problem is a classic mathematical problem where a salesperson needs to find the shortest route to visit a set of cities and then return to the starting point. This type of problem is known as a combinatorial optimization problem, which means there are a lot of possible solutions, and finding the best one can be very challenging.

In this study, the researchers used a powerful language model called GPT-3.5 Turbo to tackle the Travelling Salesman Problem. They tried different approaches, including teaching the model how to solve the problem from scratch, giving it a few examples to learn from, and even having it think through the problem step-by-step.

The researchers also fine-tuned the language model to specialize in solving a particular size of the Travelling Salesman Problem and then tested it on a range of different problem sizes. Interestingly, the model was able to generalize well, meaning it could solve larger problems even though it was only trained on a specific size.

To further improve the model's performance, the researchers used a technique called self-ensemble, which combines the outputs of the model in a way that can enhance its general capabilities without requiring additional training.

Overall, this research suggests that large language models like GPT-3.5 Turbo have the potential to be effective at solving complex, combinatorial problems, which could have important implications for the field of artificial intelligence and its real-world applications.

Technical Explanation

The researchers investigated the potential of large language models (LLMs) to solve the Travelling Salesman Problem (TSP), a well-known combinatorial optimization problem. They utilized GPT-3.5 Turbo, a powerful LLM, and explored various approaches, including zero-shot in-context learning, few-shot in-context learning, and chain-of-thoughts (CoT).

In the zero-shot and few-shot experiments, the researchers provided the model with textual descriptions of the problem and, in the few-shot case, a small number of example solutions. The model was then tasked with generating solutions for new instances of the TSP.

For the chain-of-thoughts approach, the researchers prompted the model to think through the problem step-by-step, generating a sequence of reasoning steps to arrive at a solution.

Additionally, the team fine-tuned the GPT-3.5 Turbo model to specialize in solving a specific problem size of the TSP. They then tested the fine-tuned model on a range of instance sizes, including larger problems than those used during training. The fine-tuned models demonstrated promising performance on problems identical in size to the training instances and were able to generalize well to larger problems.

To further improve the performance of the fine-tuned model without incurring additional training costs, the researchers adopted a self-ensemble approach. This technique combines the outputs of the model in a way that can enhance its general capabilities.

Critical Analysis

The research presented in this paper demonstrates the potential of large language models to tackle combinatorial optimization problems, such as the Travelling Salesman Problem. However, it's important to note that the experiments were conducted on relatively small problem instances, and the performance of the models on larger, more realistic problem sizes may vary.

Additionally, the paper does not provide a detailed analysis of the limitations of the approaches used. For example, it's unclear how the models would perform on problems with different characteristics, such as asymmetric or dynamic TSP instances, or how the performance would scale with the size of the problem.

Furthermore, the self-ensemble approach used to improve the fine-tuned model's performance is a relatively simple technique, and there may be more sophisticated methods that could yield even better results. The paper could have explored alternative techniques for enhancing the model's capabilities without additional training.

Overall, while the research presents promising results, further investigation is needed to fully understand the strengths, weaknesses, and broader applicability of using large language models for solving combinatorial optimization problems.

Conclusion

This research demonstrates the potential of large language models, specifically GPT-3.5 Turbo, to tackle the Travelling Salesman Problem, a well-known combinatorial optimization problem. The researchers explored various approaches, including zero-shot learning, few-shot learning, and chain-of-thoughts, as well as fine-tuning the model to specialize in solving a specific problem size.

The fine-tuned models exhibited strong performance on problems identical in size to the training instances and were able to generalize well to larger problem sizes. Furthermore, the researchers employed a self-ensemble technique to improve the model's performance without additional training, showcasing the versatility and adaptability of these language models.

While the results are promising, further research is needed to fully understand the limitations and broader applicability of using large language models for solving complex, combinatorial problems. Nonetheless, this study opens up exciting new avenues for the application of these powerful AI systems in the field of optimization and decision-making, with potential implications for a wide range of real-world problems and industries.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Related Papers

💬

Eyeballing Combinatorial Problems: A Case Study of Using Multimodal Large Language Models to Solve Traveling Salesman Problems

Mohammed Elhenawy, Ahmed Abdelhay, Taqwa I. Alhadidi, Huthaifa I Ashqar, Shadi Jaradat, Ahmed Jaber, Sebastien Glaser, Andry Rakotonirainy

YC

0

Reddit

0

Multimodal Large Language Models (MLLMs) have demonstrated proficiency in processing di-verse modalities, including text, images, and audio. These models leverage extensive pre-existing knowledge, enabling them to address complex problems with minimal to no specific training examples, as evidenced in few-shot and zero-shot in-context learning scenarios. This paper investigates the use of MLLMs' visual capabilities to 'eyeball' solutions for the Traveling Salesman Problem (TSP) by analyzing images of point distributions on a two-dimensional plane. Our experiments aimed to validate the hypothesis that MLLMs can effectively 'eyeball' viable TSP routes. The results from zero-shot, few-shot, self-ensemble, and self-refine zero-shot evaluations show promising outcomes. We anticipate that these findings will inspire further exploration into MLLMs' visual reasoning abilities to tackle other combinatorial problems.

Read more

6/12/2024

💬

Large Language Models Can Plan Your Travels Rigorously with Formal Verification Tools

Yilun Hao, Yongchao Chen, Yang Zhang, Chuchu Fan

YC

0

Reddit

0

The recent advancements of Large Language Models (LLMs), with their abundant world knowledge and capabilities of tool-using and reasoning, fostered many LLM planning algorithms. However, LLMs have not shown to be able to accurately solve complex combinatorial optimization problems. In Xie et al. (2024), the authors proposed TravelPlanner, a U.S. domestic travel planning benchmark, and showed that LLMs themselves cannot make travel plans that satisfy user requirements with a best success rate of 0.6%. In this work, we propose a framework that enables LLMs to formally formulate and solve the travel planning problem as a satisfiability modulo theory (SMT) problem and use SMT solvers interactively and automatically solve the combinatorial search problem. The SMT solvers guarantee the satisfiable of input constraints and the LLMs can enable a language-based interaction with our framework. When the input constraints cannot be satisfiable, our LLM-based framework will interactively offer suggestions to users to modify their travel requirements via automatic reasoning using the SMT solvers. We evaluate our framework with TravelPlanner and achieve a success rate of 97%. We also create a separate dataset that contain international travel benchmarks and use both dataset to evaluate the effectiveness of our interactive planning framework when the initial user queries cannot be satisfied. Our framework could generate valid plans with an average success rate of 78.6% for our dataset and 85.0% for TravelPlanner according to diverse humans preferences.

Read more

4/22/2024

🏷️

Navigating the Labyrinth: Evaluating and Enhancing LLMs' Ability to Reason About Search Problems

Nasim Borazjanizadeh, Roei Herzig, Trevor Darrell, Rogerio Feris, Leonid Karlinsky

YC

0

Reddit

0

Recently, Large Language Models (LLMs) attained impressive performance in math and reasoning benchmarks. However, they still often struggle with logic problems and puzzles that are relatively easy for humans. To further investigate this, we introduce a new benchmark, SearchBench, containing 11 unique search problem types, each equipped with automated pipelines to generate an arbitrary number of instances and analyze the feasibility, correctness, and optimality of LLM-generated solutions. We show that even the most advanced LLMs fail to solve these problems end-to-end in text, e.g. GPT4 solves only 1.4%. SearchBench problems require considering multiple pathways to the solution as well as backtracking, posing a significant challenge to auto-regressive models. Instructing LLMs to generate code that solves the problem helps, but only slightly, e.g., GPT4's performance rises to 11.7%. In this work, we show that in-context learning with A* algorithm implementations enhances performance. The full potential of this promoting approach emerges when combined with our proposed Multi-Stage-Multi-Try method, which breaks down the algorithm implementation into two stages and verifies the first stage against unit tests, raising GPT-4's performance above 57%.

Read more

6/19/2024

Self-Guiding Exploration for Combinatorial Problems

Self-Guiding Exploration for Combinatorial Problems

Zangir Iklassov, Yali Du, Farkhad Akimov, Martin Takac

YC

0

Reddit

0

Large Language Models (LLMs) have become pivotal in addressing reasoning tasks across diverse domains, including arithmetic, commonsense, and symbolic reasoning. They utilize prompting techniques such as Exploration-of-Thought, Decomposition, and Refinement to effectively navigate and solve intricate tasks. Despite these advancements, the application of LLMs to Combinatorial Problems (CPs), known for their NP-hardness and critical roles in logistics and resource management remains underexplored. To address this gap, we introduce a novel prompting strategy: Self-Guiding Exploration (SGE), designed to enhance the performance of solving CPs. SGE operates autonomously, generating multiple thought trajectories for each CP task. It then breaks these trajectories down into actionable subtasks, executes them sequentially, and refines the results to ensure optimal outcomes. We present our research as the first to apply LLMs to a broad range of CPs and demonstrate that SGE outperforms existing prompting strategies by over 27.84% in CP optimization performance. Additionally, SGE achieves a 2.46% higher accuracy over the best existing results in other reasoning tasks (arithmetic, commonsense, and symbolic).

Read more

5/29/2024