Generating Pragmatic Examples to Train Neural Program Synthesizers
Not on the map. Why?
Abstract (arXiv)
Programming-by-example is the task of synthesizing a program that is consistent with a set of user-provided input-output examples. As examples are often an under-specification of one's intent, a good synthesizer must choose the intended program from the many that are consistent with the given set of examples. Prior work frames program synthesis as a cooperative game between a listener (that synthesizes programs) and a speaker (a user choosing examples), and shows that models of computational pragmatic inference are effective in choosing the user intended programs. However, these models require counterfactual reasoning over a large set of programs and examples, which is infeasible in realistic program spaces. In this paper, we propose PraX, a novel way to amortize this search with neural networks. We sample pairs of programs and examples via self-play between listener and speaker models, and use pragmatic inference to choose informative training examples from this sample. We then use the informative dataset to train models to improve the synthesizer's ability to disambiguate user-provided examples without human supervision. We validate PraX on the challenging task of synthesizing regular expressions from example strings, and find that our method (1) outperforms models trained without choosing pragmatic examples by 23% (a 51% relative increase) (2) matches the performance of supervised learning on a dataset of pragmatic examples provided by humans, despite using no human data in training.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 18 of its 23 references that are in the map. First posted on arXiv 9 Nov 2023.
Builds on
18 of 23 references.
References · 18
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
- 2018Speaker-Follower Models for Vision-and-Language Navigationcited by 337
- 2016DeepCoder: Learning to Write Programscited by 145
- 2017RobustFill: Neural Program Learning under Noisy I/Ocited by 124
- 2016Reasoning About Pragmatics with Neural Listeners and Speakerscited by 68
- 2020Multi-agent Communication meets Natural Language: Synergies between Functional and Structural Language Learningcited by 65
- 2017Unified Pragmatic Models for Generating and Following Instructionscited by 55
- 2018Pragmatically Informative Image Captioning with Character-Level Inferencecited by 42
- 2021SpreadsheetCoder: Formula Prediction from Semi-structured Contextcited by 41
- 2017Program Synthesis using Conflict-Driven Learningcited by 26
- 2020Learning to refer informatively by amortizing pragmatic reasoningcited by 17
6 more
- 2015Learning in the Rational Speech Acts Modelcited by 16
- 2020Learning to learn generative programs with Memoised Wake-Sleepcited by 15
- 2020Program Synthesis with Pragmatic Communicationcited by 15
- 2019Lost in Machine Translation: A Method to Reduce Meaning Losscited by 11
- 2023The Usability of Pragmatic Communication in Regular Expression Synthesiscited by 4
- 2020FOREST: An Interactive Multi-tree Synthesizer for Regular Expressionscited by 2
Built on by
Citing papers per year: 2024: 3; 2025: 2.
5 papers.
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2025Pragmatics in the Era of Large Language Models: A Survey on Datasets, Evaluation, Opportunities and Challengescited by 31
- 2024LACIE: Listener-Aware Finetuning for Confidence Calibration in Large Language Modelscited by 14
- 2024Amortizing Pragmatic Program Synthesis with Rankingscited by 3
- 2025Identifying & Interactively Refining Ambiguous User Goals for Data Visualization Code Generationcited by 1
- 2025Identifying & Interactively Refining Ambiguous User Goals for Data Visualization Code Generation10 Oct 2025
- 2025Pragmatics in the Era of Large Language Models: A Survey on Datasets, Evaluation, Opportunities and Challenges17 Feb 2025
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions22 Jun 2024
- 2024Amortizing Pragmatic Program Synthesis with Rankings1 Jun 2024
- 2024LACIE: Listener-Aware Finetuning for Confidence Calibration in Large Language Models31 May 2024