Can LLM Find the Green Circle? Investigation and Human-Guided Tool Manipulation for Compositional Generalization

Min Zhang, Jianfeng He, Shuo Lei, Murong Yue, Linhan Wang, Chang-Tien Lu · DOI

TL;DR

This paper investigates how well Large Language Models (LLMs) can handle compositional generalization – understanding novel combinations of familiar concepts – using in-context learning (ICL). They find current ICL methods struggle with complex reasoning. To address this, they propose a Human-guided Tool Manipulation (HTM) framework that breaks down problems into smaller, tool-assisted steps, achieving state-of-the-art results.

What Problem Does This Paper Address?

Natural language is inherently compositional: the meaning of a complex phrase arises from the combination of its individual parts. The challenge of compositional generalization lies in a model's ability to understand and reason about these parts when they are combined in ways not seen during training. Think of it like learning the words "red," "square," and "big," and then being able to understand "the big red square" even if you've only seen "red square" and "big circle" before. This is crucial for robust language understanding. While traditional models struggled with this, LLMs have shown impressive generalization capabilities. However, their effectiveness in compositional generalization, especially for complex, multi-step reasoning tasks, remained an open question. The authors highlight that existing ICL methods, while powerful, falter when faced with intricate logic and cumulative errors in long reasoning chains, particularly when these reasoning steps involve using external tools.

Methods

The core of this paper is the Human-guided Tool Manipulation (HTM) framework. Instead of relying on a single, complex tool or expecting the LLM to perform all reasoning in one go, HTM breaks down a problem into manageable sub-questions.

  1. Tool Planner: The LLM first decomposes a complex question into simpler sub-questions. Human annotators then validate these sub-questions and provide answers. The LLM then analyzes these sub-questions to identify the necessary tools and their arguments.
  2. Tool Maker: The LLM generates Python code for each identified tool. This process is iterative and involves human feedback. If a generated tool fails validation or produces incorrect output, the LLM receives error messages and regenerates the tool until it passes.
  3. Tool Utilizer: The LLM is then trained via in-context learning to use these generated tools to answer the original complex question. This involves providing the LLM with tool descriptions, task instructions, and demonstrations of how to call tools with appropriate arguments, often guided by code comments that explain the relationships between different parts of the question.

This approach aims to reduce the burden on the LLM by offloading complex computations to specialized tools and simplifying the reasoning process to tool integration.

Datasets

The authors evaluate their method on two established compositional generalization benchmarks:

  • ReaSCAN [14]: Focuses on compositional reasoning in a grid world, involving target identification and navigation.
  • GSRR [15]: Another benchmark for compositional generalization.

The evaluation specifically targets the "target identification" subtask, as navigation is considered a solved problem given the correct target. The datasets are designed with Out-Of-Distribution (OOD) test splits, meaning they contain novel combinations of attributes and structures not present in the training data.

Key Insights and Ideas

  • ICL Struggles with Complex Composition: Prevailing ICL methods (Zero-shot, Few-shot, CoT, PoT) perform poorly on complex compositional questions, especially those requiring long reasoning chains or intricate logic. They are prone to cumulative errors and hallucinations.
  • Tool Use is Key, But Tool Creation is Hard: While tools can aid reasoning, automatically generating complex tools for intricate questions is challenging.
  • Human Guidance is Efficient: HTM demonstrates that minimal human effort (feedback on a small amount of data) is sufficient to guide the LLM in creating and utilizing effective tools.
  • Decomposition Reduces Reasoning Pressure: Breaking down problems into sub-questions and using tools significantly reduces the LLM's reasoning burden, allowing it to focus on higher-level problem-solving and sentence structure.
  • LLMs Can Generalize Beyond Pretraining Data: Experiments with symbolic expressions (Table 2) suggest that LLMs' compositional generalization ability is not solely dependent on seeing specific component combinations during pretraining, but rather on their underlying reasoning capabilities.

Key Results

  • State-of-the-Art Performance: HTM achieves state-of-the-art (SOTA) performance on both ReaSCAN and GSRR benchmarks.
  • Significant Improvement on Challenging Splits: On the most challenging test split (C2 of ReaSCAN), HTM achieves an Exact Match (EM) score of 95.8%, a dramatic improvement over previous methods like Gro-CoT (27.3%) and existing ICL methods (20.6%). This represents a nearly 70% improvement.
  • CoT Limitations: Chain-of-Thought (CoT) performs well on simple questions but degrades significantly on complex ones (e.g., 95.8% EM on P1 vs. 19% on P3 in ReaSCAN), likely due to cumulative errors.
  • PoT Strengths and Weaknesses: Program-of-Thought (PoT) shows more consistent performance across complexities but struggles with novel syntactic structures.
  • Human Intervention Value: Ablation studies show that human participation in tool planning and making is crucial. Purely automatic tool generation failed to pass validation, whereas HTM achieved a perfect pass rate. Removing code comments in demonstrations also led to a performance drop.

Limitations and Future Work

  • Human Effort: While minimal, human intervention is still required for tool planning and making. Future work could explore further automation of these steps.
  • Tool Complexity: The paper focuses on generating tools for sub-questions. The complexity of the tools themselves and how to manage them in very large toolkits could be an area for future exploration.
  • Generalizability of HTM: While shown to be effective on two benchmarks, exploring HTM's performance on a wider range of compositional generalization tasks and domains would be beneficial.

Summary updated

BibTeX
@inproceedings{zhang2024can,
  author = {Min Zhang and Jianfeng He and Shuo Lei and Murong Yue and Linhan Wang and Chang-Tien Lu},
  title = {{Can LLM Find the Green Circle? Investigation and Human-Guided Tool Manipulation for Compositional Generalization}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10446355},
}
Figure