Chain-of-Symbol Prompting For Spatial Reasoning in Large Language Models

Hanxu Hu, Hongyuan Lu, Huajian Zhang, Yunze Song, Wai Lam, Yue ZhangCOLM 2024

TL;DR

This paper introduces Chain-of-Symbol (COS) prompting, a novel method that represents spatial relationships using condensed symbols instead of natural language in LLM reasoning chains. COS significantly improves LLM performance on complex spatial reasoning tasks, achieving up to 60.8% higher accuracy while using fewer tokens, and shows emergent symbolic understanding capabilities in larger models.

What Problem Does This Paper Address?

Large Language Models (LLMs) have shown impressive capabilities in various reasoning tasks, often enhanced by Chain-of-Thought (CoT) prompting, where intermediate reasoning steps are provided in natural language. However, when it comes to complex spatial reasoning and planning tasks that involve understanding virtual environments described through natural language, current LLMs still struggle. The authors hypothesize that natural language might not be the most efficient or effective way to represent these complex spatial relationships for LLMs. This paper investigates whether a more symbolic representation can overcome these limitations.

Methods

The core contribution is the Chain-of-Symbol (COS) prompting method. Instead of using natural language descriptions for intermediate reasoning steps, COS represents spatial relationships using condensed symbols. For instance, the relationship "from the top of" is represented by the symbol "/". This approach aims to create a more structured, efficient, and potentially easier-to-process representation for LLMs. COS is designed to be used with few-shot prompting and does not require any additional training of the LLMs. The authors developed a procedure to convert natural language CoT demonstrations into COS demonstrations by replacing descriptive text with symbolic representations and removing redundant information.

Datasets

The authors evaluated their method on a combination of existing and newly proposed datasets:

  • Brick World: A 1D and 2D spatial planning task involving stacking and retrieving bricks. The authors created synthetic instances with varying levels of complexity in descriptions.
  • NLVR-based Manipulation: A task adapted from Natural Language Visual Reasoning, where LLMs need to manipulate objects in virtual boxes based on natural language descriptions.
  • Natural Language Navigation: A task inspired by vision-language navigation, where LLMs navigate a virtual environment described solely through natural language.
  • SPARTUN: An existing, manually annotated spatial question-answering dataset, which features a wider variety of spatial expressions and relationships.

Key Insights and Ideas

  • Natural Language Limitations in Spatial Reasoning: The paper strongly suggests that while LLMs excel with natural language CoT for many tasks, it's not optimal for complex spatial reasoning. The inherent ambiguity and verbosity of natural language descriptions can hinder LLM performance in these domains.
  • Symbolic Representation Efficiency: COS demonstrates that condensed symbolic representations are significantly more efficient and effective for LLMs in understanding and reasoning about spatial relationships. This leads to improved accuracy and reduced computational cost (fewer tokens).
  • Emergent Symbolic Understanding: A fascinating observation is the "emergent ability of abstract symbols understanding" in larger LLMs. As model size increases, their capacity to interpret and utilize these symbolic representations appears to improve, suggesting a potential for more sophisticated symbolic reasoning in future LLMs.
  • Robustness of COS: The method shows robustness across different languages (tested in Chinese) and different symbol choices, indicating its generalizability.

Key Results

  • Performance Improvement: COS consistently and significantly outperforms both zero-shot CoT and few-shot CoT across all tested spatial planning tasks. The accuracy gains are substantial, reaching up to 60.8% on the Brick World task (from 31.8% to 92.6% for GPT-3.5-Turbo).
  • Token Efficiency: COS drastically reduces the number of tokens required for intermediate reasoning steps. For the Brick World task, token usage was reduced by up to 65.8% (from 407 to 139 tokens).
  • Stability: COS exhibits lower standard deviations in performance compared to CoT, suggesting it is a more stable prompting method.
  • Generalizability: COS shows promising results on the SPARTUN dataset, indicating its effectiveness even with a greater variety of spatial relationships.

Limitations and Future Work

  • Model Scope: The authors acknowledge that they only evaluated two LLMs (ChatGPT and LLAMA-2) due to time and resource constraints. They suggest that applying COS to a wider range of models with varying sizes would be beneficial to further explore emergent symbolic understanding.
  • Broader Impact: The paper mentions that COS can effectively improve LLM performance on complex planning tasks and suggests that future LLM training could also benefit from this approach to enhance planning abilities.
  • Future Applications: The authors believe COS is highly relevant to areas like spatial reasoning, navigation, and path planning, and suggest future work could investigate these applications further.

Summary updated

BibTeX
@inproceedings{hu2024chain,
  author = {Hanxu Hu and Hongyuan Lu and Huajian Zhang and Yunze Song and Wai Lam and Yue Zhang},
  title = {{Chain-of-Symbol Prompting For Spatial Reasoning in Large Language Models}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=Hvq9RtSoHG},
}
Figure