Program Synthesis with Pragmatic Communication
Yewen Pu, Kevin Ellis, Marta Kryven, Josh Tenenbaum, Armando Solar-Lezama
Abstract
Program synthesis techniques construct or infer programs from user-provided specifications, such as input-output examples. Yet most specifications, especially those given by end-users, leave the synthesis problem radically ill-posed, because many programs may simultaneously satisfy the specification. Prior work resolves this ambiguity by using various inductive biases, such as a preference for simpler programs. This work introduces a new inductive bias derived by modeling the program synthesis task as rational communication, drawing insights from recursive reasoning models of pragmatics. Given a specification, we score a candidate program both on its consistency with the specification, and also whether a rational speaker would chose this particular specification to communicate that program. We develop efficient algorithms for such an approach when learning from input-output examples, and build a pragmatic program synthesizer over a simple grid-like layout domain. A user study finds that end-user participants communicate more effectively with the pragmatic program synthesizer over a non-pragmatic one.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- I Cast Detect Thoughts: Learning to Converse and Guide with Intents and Theory-of-Mind in Dungeons and DragonsPei Zhou, Andrew Zhu, Jennifer Hu, Jay Pujara et al.ACL 2023 · 8 citations
- Generating Pragmatic Examples to Train Neural Program SynthesizersSaujas Vaduguru, Daniel Fried, Yewen PuICLR 2024 · 7 citations
- Amortizing Pragmatic Program Synthesis with RankingsYewen Pu, Saujas Vaduguru, Priyan Vaithilingam, Elena L. Glassman et al.ICML 2024 · 5 citations
- A Domain-Specific Probabilistic Programming Language for Reasoning about Reasoning (Or: A Memo on memo)Kartik Chandra, Tony Chen, Joshua B. Tenenbaum, Jonathan Ragan-KelleyOOPSLA 2025 · 2 citations
- Identifying & Interactively Refining Ambiguous User Goals for Data Visualization Code GenerationMert Inan, Anthony Sicilia, Alex Xie, Saujas Vaduguru et al.EMNLP 2025
Builds on1
Related papers
- Can Humans Teach Machines to Code?Céline Hocquette, Johannes Langer, Andrew Cropper, Ute SchmidAAAI 2026
- Interpretable Program SynthesisTianyi Zhang, Zhiyang Chen, Yuanli Zhu, Priyan Vaithilingam et al.CHI 2021 · 25 citations
- Inductive Program Synthesis Guided by Observational Program SimilarityJohn K. Feser, Isil Dillig, Armando Solar-LezamaOOPSLA 2023 · 6 citations
- GENSYNTH: Synthesizing Datalog Programs without Language BiasJonathan Mendelson, Aaditya Naik, Mukund Raghothaman, Mayur NaikAAAI 2021 · 14 citations
- Multi-modal program inference: a marriage of pre-trained language models and component-based synthesisKia Rahmani, Mohammad Raza, Sumit Gulwani, Vu Le et al.OOPSLA 2021 · 32 citations
