Natural Language Embedded Programs for Hybrid Language Symbolic Reasoning
Tianhua Zhang, Jiaxin Ge, Hongyin Luo, Yung-Sung Chuang, Mingye Gao,, Yuan Gong, Xixin Wu, Yoon Kim, Helen Meng, James Glass

TL;DR
This paper introduces natural language embedded programs (NLEP), a framework that enables language models to generate Python code for symbolic and numeric reasoning tasks, improving performance and interpretability across various NLP and reasoning tasks.
Contribution
The paper presents NLEP, a novel approach where language models generate executable Python programs over natural language data, unifying reasoning and understanding tasks with improved results.
Findings
Outperforms strong baselines on multiple reasoning tasks
Generated programs are interpretable and reveal reasoning steps
Applicable to diverse NLP and symbolic reasoning tasks
Abstract
How can we perform computations over natural language representations to solve tasks that require symbolic and numeric reasoning? We propose natural language embedded programs (NLEP) as a unifying framework for addressing math/symbolic reasoning, natural language understanding, and instruction following tasks. Our approach prompts a language model to generate full Python programs that define functions over data structures which contain natural language representations of structured knowledge. A Python interpreter then executes the generated code and prints the output. Despite using a task-general prompt, we find that this approach can improve upon strong baselines across a range of different tasks including math and symbolic reasoning, text classification, question answering, and instruction following. We found that the generated programs are interpretable since they outline the exact…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsSoftware Engineering Research · Topic Modeling · Natural Language Processing Techniques
