Amortizing Pragmatic Program Synthesis with Rankings

Yewen Pu, Saujas Vaduguru, Priyan Vaithilingam, Elena Glassman, Daniel Fried
9/1/2023
cs.PLcs.AI

Official code: evanthebouncy/pragmatic_synthesis_ranking (1 star, Python, last commit 2023-09-01).

Abstract

In program synthesis, an intelligent system takes in a set of user-generated examples and returns a program that is logically consistent with these examples. The usage of Rational Speech Acts (RSA) framework has been successful in building \emph{pragmatic} program synthesizers that return programs which -- in addition to being logically consistent -- account for the fact that a user chooses their examples informatively.

Show full abstract

However, the computational burden of running the RSA algorithm has restricted the application of pragmatic program synthesis to domains with a small number of possible programs. This work presents a novel method of amortizing the RSA algorithm by leveraging a \emph{global pragmatic ranking} -- a single, total ordering of all the hypotheses. We prove that for a pragmatic synthesizer that uses a single demonstration, our global ranking method exactly replicates RSA's ranked responses. We further empirically show that global rankings effectively approximate the full pragmatic synthesizer in an online, multi-demonstration setting. Experiments on two program synthesis domains using our pragmatic ranking method resulted in orders of magnitudes of speed ups compared to the RSA synthesizer, while outperforming the standard, non-pragmatic synthesizer.

View on arXivView PDF

Code Implementations(1)

amortizing pragmatic RSA reasoning for program synthesis using global ranking functions

10Python, Jupyter NotebookSep 1, 20233 years ago

Similar Papers

Cite this paper

@article{pu2023amortizing,
  title  = {Amortizing Pragmatic Program Synthesis with Rankings},
  author = {Yewen Pu and Saujas Vaduguru and Priyan Vaithilingam and Elena Glassman and Daniel Fried},
  year   = {2023},
  eprint = {2309.03225},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.03225v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.03225.svg)](https://codeofpaper.com/paper/2309.03225)

Discussion