From Language to Programs: Bridging Reinforcement Learning and Maximum Marginal Likelihood

Kelvin Guu, Panupong Pasupat, Evan Zheran Liu, Percy Liang

Introduction: The Challenge of Spurious Programs

A central goal in semantic parsing is the development of systems that can map natural language instructions into executable code. While training such systems typically requires expensive "gold" programs as direct supervision, a more scalable approach utilizes weak supervision, where the model learns only from the final execution results (the "world state").

However, this approach introduces the problem of spurious programs: incorrect logical interpretations that happen to yield the correct output by coincidence. For instance, if a model is instructed to "move the man in the yellow hat" and it incorrectly moves a different person who happens to be at the target location, it receives a false positive reward. Standard algorithms like Reinforcement Learning (RL) and Maximum Marginal Likelihood (MML) often overfit to these coincidental shortcuts, failing to learn the underlying logic.

The spurious program problem: an incorrect program (moving a red-shirted man) accidentally yields the correct world state, misleading the learner.

The RANDOMER Algorithm

To address this, researchers at Stanford developed RANDOMER, a training algorithm that bridges the gap between the systematic search of MML and the randomized exploration of RL. RANDOMER introduces two key innovations:

  1. Randomized Beam Search: Unlike deterministic beam search, which can be overly rigid, RANDOMER employs an $\epsilon$-greedy randomized search. This allows the model to systematically explore the program space while injecting enough noise to discover correct, low-probability programs that might otherwise be ignored.
  2. The Meritocratic Update Rule: In traditional learning, the model heavily weights programs it already assigns high probability to (an "elitist" approach). RANDOMER introduces a $\beta$-smoothed update rule. By setting $\beta < 1$, the gradient "spreads the wealth" across all programs that achieved the correct result. This "meritocratic" approach prevents a single lucky spurious program from dominating the learning process early on.

Experimental Results and Performance

The researchers evaluated RANDOMER on the SCONE (Semantic Coordination in Natural Environments) dataset, covering three domains: ALCHEMY (chemical mixing), TANGRAMS (geometric shapes), and SCENE (moving people).

RANDOMER achieved new state-of-the-art results across all domains. Most notably, in the complex SCENE domain, accuracy improved from 14.7% to 46.2%. The meritocratic update rule proved particularly effective for efficiency; as shown in the learning curves below, lower $\beta$ values (more meritocratic) allowed the model to reach high accuracy significantly faster than standard MML ($\beta=1$).

Learning curves on the ALCHEMY task showing that meritocratic updates (lower beta) lead to faster convergence and higher final accuracy compared to standard MML (beta=1).

Discussion and Future Work

The success of RANDOMER highlights that the primary difference between MML and RL lies in their exploration strategies and gradient approximations. By balancing systematic search with meritocratic updates, RANDOMER effectively navigates the search bias where shorter, spurious programs are often mathematically favored early in training.

Future work may explore annealing $\beta$—starting with a meritocratic approach to discover programs and gradually becoming more selective as the model gains confidence. Additionally, while RANDOMER significantly improves program discovery, it still faces a "cold start" problem in environments where the initial search fails to find any successful programs, suggesting a potential role for reward shaping in even more sparse environments.

Summary updated

BibTeX
@misc{guu2017from,
  author = {Kelvin Guu and Panupong Pasupat and Evan Zheran Liu and Percy Liang},
  title = {{From Language to Programs: Bridging Reinforcement Learning and Maximum Marginal Likelihood}},
  year = {2017},
  eprint = {1704.07926},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.07926},
}
Figure