Skip to main content
QUICK REVIEW

[Paper Review] Language Model Cascades

D. Dohan, Winnie Xu|arXiv (Cornell University)|Jul 21, 2022
Natural Language Processing TechniquesComputer Science21 citations
TL;DR

The paper presents a probabilistic-programming framework for composing language models into cascades that operate over string-valued variables, unifying techniques like scratchpads, verifiers, STaR, and tool use under a language-model–driven inference paradigm. It demonstrates how cascades can tackle multi-step reasoning tasks and outlines implementation and experimental results including a Twenty Questions setup.

ABSTRACT

Prompted models have demonstrated impressive few-shot learning abilities. Repeated interactions at test-time with a single model, or the composition of multiple models together, further expands capabilities. These compositions are probabilistic models, and may be expressed in the language of graphical models with random variables whose values are complex data types such as strings. Cases with control flow and dynamic structure require techniques from probabilistic programming, which allow implementing disparate model structures and inference strategies in a unified language. We formalize several existing techniques from this perspective, including scratchpads / chain of thought, verifiers, STaR, selection-inference, and tool use. We refer to the resulting programs as language model cascades.

Motivation & Objective

  • Provide a unifying probabilistic programming framework for language model reasoning with string-valued variables.
  • Showhow existing LM techniques (scratchpads, chain-of-thought, verifiers, tool use) fit into language model cascades.
  • Demonstrate the framework on multi-step reasoning tasks and discuss implementation details.
  • Explore semi-supervised learning and inference strategies within cascades to improve reasoning quality.

Proposed method

  • Define a joint probability model over string-valued variables parameterized by LMs.
  • Represent cascades as trace-based probabilistic programs embedded in Python to allow arbitrary control flow and recursion.
  • Use sampling-based inference (e.g., ancestral sampling) to compute posteriors over unknown strings.
  • Incorporate and unify techniques such as scratchpads/chain-of-thought, semi-supervised learning (STaR), selection-inference, verifiers, and tool use as nodes in the cascade.
  • Demonstrate a Twenty Questions experiment with forward sampling to gauge reasoning performance and discuss extensions to multimodal and fine-tuned LM settings.

Experimental results

Research questions

  • RQ1How can a probabilistic programming perspective unify disparate LM reasoning approaches (scratchpads, verifiers, STaR, tool use) into a single framework?
  • RQ2Can language model cascades handle complex multi-step reasoning and dynamic control flow over string-valued variables?
  • RQ3What inference strategies and training regimes (e.g., semi-supervised, Bayesian-like) improve reasoning quality within cascades?
  • RQ4How well do cascades extend to tasks requiring external tools or multimodal data?
  • RQ5What is the empirical potential of cascades on interactive reasoning tasks such as Twenty Questions?

Key findings

  • Cascades provide a flexible formalism to compose LMs into probabilistic programs over strings.
  • Scratchpads, chain-of-thought, verifiers, and tool use can be represented as nodes and observations in a cascade.
  • Semi-supervised approaches like STaR can be interpreted as EM-like steps within the cascade framework.
  • Self-consistency and sampling strategies are discussed as practical inference methods within cascades.
  • A preliminary Twenty Questions experiment with a 137B LM shows the approach can solve a subset of tasks (29% in the reported setup).
  • The paper discusses practical challenges of inference with string-valued variables and potential remedies using LM-based proposals and future program-synthesis directions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.