Metacognitive Capabilities of LLMs: An Exploration in Mathematical Problem Solving

Aniket Rajiv Didolkar, Anirudh Goyal, Nan Rosemary Ke, Siyuan Guo, Michal Valko, Timothy P Lillicrap, Danilo Jimenez Rezende, Yoshua Bengio, Michael Curtis Mozer, Sanjeev Arora

TL;DR

This paper explores whether Large Language Models (LLMs) possess "metacognitive" abilities, specifically the capacity to understand and label the skills required to solve mathematical problems. By developing a novel prompt-guided method, the researchers demonstrate that LLMs can generate interpretable skill labels, and using these labels to provide relevant in-context examples significantly boosts problem-solving performance across various LLMs and datasets.

What Problem Does This Paper Address?

While LLMs have shown impressive reasoning capabilities, their limitations in complex tasks like mathematical problem-solving are well-documented. A key aspect of human learning and problem-solving is metacognition – thinking about one's own thinking and understanding the skills involved. This paper investigates whether LLMs exhibit similar metacognitive knowledge, specifically the ability to identify and categorize the skills needed for a given problem. The challenge lies in deciphering the internal workings of these complex models and finding a way to elicit and leverage this potential metacognitive knowledge to improve their performance. Existing approaches often rely on broad topic labels, which may not capture the fine-grained skills required for specific problems.

Methods

The core of the paper's methodology involves a two-stage automated skill discovery process:

  1. Skill Labeling: A powerful LLM (initially GPT-4) is prompted to assign a specific, descriptive skill label to each math question in a dataset, along with a reason for the label. This initial labeling can result in a very large number of fine-grained skills.
  2. Semantic Skill Clustering: The same LLM is then used to group these fine-grained skills into broader, more interpretable categories. This reduces the number of skills and creates more generalizable labels.

These "coarse" skill labels form a "Skill Exemplar Repository," which includes the skill name and corresponding question-answer pairs. During inference, when presented with a new question, an LLM first identifies the most relevant skill from the repository. It is then provided with exemplar problems associated with that skill as in-context examples to guide its problem-solving. This approach aims to provide more targeted and effective few-shot learning than standard methods.

Datasets

The paper utilizes and evaluates its method on several established mathematical reasoning datasets:

  • GSM8K: A dataset of grade-school level math word problems.
  • MATH: A dataset of competition-level math problems covering topics like Pre-Algebra, Algebra, Geometry, etc.
  • SVAMP, ASDIV, SingleOP, SingleEQ, AddSub, MultiArith: Various other math word problem datasets used to test the transferability of skills.

Key Insights and Ideas

  • LLMs Can Exhibit Metacognitive-like Skills: The research provides strong evidence that LLMs, when prompted appropriately, can identify and label the specific skills required to solve mathematical problems, mirroring human metacognitive abilities.
  • Skill-Based Exemplars are More Effective: Providing LLMs with in-context examples that are matched to the specific skill needed for a problem significantly improves their accuracy compared to random examples or examples based on broader topics. This suggests that fine-grained skill relevance is crucial for effective few-shot learning.
  • Transferability of Skills: The skill labels and exemplar repositories generated by a strong LLM (like GPT-4) can be effectively transferred to improve the performance of weaker LLMs and across different datasets, demonstrating a valuable form of knowledge transfer.
  • Interpretability Matters: The generated skill labels are designed to be human-interpretable, making the LLM's reasoning process more transparent and understandable.

Key Results

  • Improved Accuracy: The Skill-Based approach, using GPT-4 for skill labeling and clustering, achieved significant performance improvements:
  • MATH Dataset: An 11.6% enhancement over standard Chain-of-Thought (CoT) prompting.
  • MATH Dataset (Code-based): A 7.52% improvement over the Program-Aided Language (PAL) approach.
  • GSM8K Dataset: Outperformed baselines like CoT and Random, with further gains using self-consistency.
  • Transfer Learning Success: The skill exemplars derived from GSM8K improved performance on other math word problem datasets.
  • Weaker LLM Improvement: Skill-based in-context examples significantly enhanced the performance of less advanced models like Mixtral.
  • GPT-4 Superiority: GPT-4 was found to be superior to GPT-3.5 and Mixtral in generating descriptive and accurate skill labels and performing sensible clustering.

Limitations and Future Work

  • Single Skill Assignment: The current methodology assigns only one primary skill per question. The authors acknowledge that many mathematical problems require a combination of primary and secondary skills.
  • Future Work: Developing an approach to assign hierarchies of skills or multiple skills to each data point.
  • Reliance on Advanced Models: The skill discovery process currently relies on powerful LLMs like GPT-4.
  • Future Work: Exploring fine-tuning processes to improve LLMs' capabilities using these skill-based insights, potentially leading to a bootstrapping effect for model performance.
  • Domain Specificity: While the methodology is presented as domain-agnostic, the current application is limited to mathematical problems.
  • Future Work: Extending the approach to other problem-solving domains.

Summary updated

BibTeX
@inproceedings{didolkar2024metacognitive,
  author = {Aniket Rajiv Didolkar and Anirudh Goyal and Nan Rosemary Ke and Siyuan Guo and Michal Valko and Timothy P Lillicrap and Danilo Jimenez Rezende and Yoshua Bengio and Michael Curtis Mozer and Sanjeev Arora},
  title = {{Metacognitive Capabilities of LLMs: An Exploration in Mathematical Problem Solving}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=D19UyP4HYk},
}
Figure