Teaching Algorithmic Reasoning via In-context Learning

By Hattie Zhou, Azade Nova, Hugo Larochelle, Aaron C. Courville, Behnam Neyshabur, Hanie Sedghi. 2022

135 citations recorded by the source corpus.

Large language models (LLMs) have shown increasing in-context learning capabilities through scaling up model and data size. Despite this progress, LLMs are still unable to solve algorithmic reasoning problems. While providing a rationale with the final answer has led to further improvements in multi-step reasoning problems, Anil et al. 2022 showed that even simple algorithmic reasoning tasks such as parity are far from solved. In this work, we identify and study four key stages for successfully teaching algorithmic reasoning to LLMs: (1) formulating algorithms as skills, (2) teaching multiple skills simultaneously (skill accumulation), (3) teaching how to combine skills (skill composition) and (4) teaching how to use skills as tools. We show that it is possible to teach algorithmic reasoning to LLMs via in-context learning, which we refer to as algorithmic prompting. We evaluate our approach on a variety of arithmetic and quantitative reasoning tasks, and demonstrate significant boosts in performance over existing prompting techniques. In particular, for long parity, addition, multiplication and subtraction, we achieve an error reduction of approximately 10x, 9x, 5x and 2x respectively compared to the best available baselines.

Subfields: Artificial Intelligence, Large Language Models, Prompting & Reasoning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Yejin Choi
  2. Mohit Bansal
  3. Sean Welleck
  4. Percy Liang
  5. Luke S. Zettlemoyer
  6. Xiang Ren
  7. Ronan Le Bras
  8. Hannaneh Hajishirzi

In Large Language Models

  1. Jie Huang
  2. Kevin Chen-Chuan Chang
  3. Xinyun Chen
  4. Noah D. Goodman
  5. Nick Haber
  6. Denny Zhou
  7. Ximing Lu
  8. Hailey Schoelkopf

In Prompting & Reasoning

  1. Yejin Choi
  2. Jie Huang
  3. Sean Welleck
  4. Kevin Chen-Chuan Chang
  5. Xinyun Chen
  6. Ronan Le Bras
  7. Chandra Bhagavatula
  8. Nick Haber

Citations in the corpus