Chain-of-Symbol Prompting Elicits Planning in Large Langauge Models

Hanxu Hu, Hongyuan Lu, Huajian Zhang, Wai Lam, Yue ZhangarXiv 2023

Abstract: In this paper, we investigate the performance of Large Language Models (LLMs) on complex planning tasks that require understanding virtual spatial environments described in natural language. We introduce the Natural Language Planning and Action (Natala) benchmark, comprising tasks like Brick World, NLVR-based Manipulations, and Natural Language Navigation. Our findings reveal that current LLMs, including ChatGPT, struggle with these tasks due to the redundancy of natural language in intermediate reasoning steps. To address this, we propose Chain-of-Symbol (CoS) Prompting, which replaces wordy natural language reasoning with condensed symbolic spatial representations. CoS requires no additional training and significantly outperforms Chain-of-Thought (CoT) prompting. On the Brick World task, CoS improved accuracy by up to 60.8% while reducing intermediate token usage by 65.8%.

Introduction

Spatial reasoning—the ability to understand object relationships and plan movements—is a cornerstone of intelligence. While LLMs are proficient in text generation, natural language is often a clunky medium for representing complex spatial environments. When an environment is described purely through text, models must parse complex syntax before they can reason about the underlying logic. This paper investigates whether symbolic representations can serve as a more effective "internal monologue" for LLMs performing spatial tasks.

The Chain-of-Symbol (CoS) Method

The core innovation of this work is Chain-of-Symbol (CoS) prompting. Traditional Chain-of-Thought (CoT) prompting encourages models to explain their reasoning in natural language sentences. However, for spatial tasks, this often introduces irrelevant information and linguistic noise.

CoS prompts the model to convert natural language environment descriptions into condensed symbolic maps during intermediate thinking steps. For instance, in a task involving stacked bricks, instead of writing out "Remove brick A from the top of brick B," the model uses a symbolic shorthand like B/A/D/E/C to represent the stack and subsequent state changes.

Comparison between Chain-of-Thought (CoT) and Chain-of-Symbol (CoS) prompting on a brick-stacking task.

The implementation involves three straightforward steps: generating a zero-shot response, manually correcting errors in a few-shot demonstration, and replacing natural language descriptions with intuitive symbols (e.g., / for "on top of").

Experimental Framework

The researchers evaluated CoS across four distinct domains within the Natala benchmark:

  1. Brick World (1D & 2D): Determining the sequence of moves to retrieve a specific brick from a stack.
  2. NLVR-based Manipulation: Moving objects between boxes based on properties like color and shape.
  3. Natural Language Navigation: Path-planning between landmarks described in text.
  4. SPARTUN: A human-annotated spatial question-answering dataset providing complex linguistic challenges.

Key Insights and Results

Efficiency and Accuracy

CoS is not only more accurate but also significantly more efficient. In the Brick World task, CoS reduced the number of intermediate tokens from 407 to 139—a 65.8% reduction. This suggests that symbolic reasoning allows for a more compressed and effective processing of spatial information.

Robustness to Symbol Choice

A key finding was that the specific symbol used (e.g., a comma vs. a slash) is less important than the presence of a structured, condensed representation. As shown in the experimental data, various symbolic delimiters consistently outperformed the "None" (standard text) baseline.

Success rates of GPT-3.5-Turbo on Brick World 1D using various symbolic delimiters.

Emergent Symbolic Ability

The study observed a clear scaling effect. While smaller models like Llama-2-7B and 13B struggled with symbolic representations, the 70B variant showed a massive performance jump. This indicates that the ability to manipulate abstract symbols for planning is an emergent property that manifests as model size increases.

Performance Gains

The performance improvements were substantial across all tested models. For GPT-3.5-Turbo on the most difficult Brick World 1D setting, accuracy jumped from 31.8% with CoT to 92.6% with CoS. Similar gains were observed in Navigation (53.6% to 74.9%) and NLVR Manipulation tasks.

Conclusion

Chain-of-Symbol prompting demonstrates that natural language is not always the optimal medium for LLM reasoning, particularly in spatial and planning contexts. By stripping away linguistic "fluff" and focusing on structured symbols, CoS enables models to achieve higher accuracy with lower computational cost. Future research may explore "Symbol Tuning" to further enhance these capabilities and apply CoS to real-world robotics and navigation systems.

Summary updated

BibTeX
@misc{hu2023chain,
  author = {Hanxu Hu and Hongyuan Lu and Huajian Zhang and Wai Lam and Yue Zhang},
  title = {{Chain-of-Symbol Prompting Elicits Planning in Large Langauge Models}},
  year = {2023},
  eprint = {2305.10276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.10276},
}
Figure