Skip to main content
QUICK REVIEW

[Paper Review] Binding Language Models in Symbolic Languages

Zhoujun Cheng, Tianbao Xie|arXiv (Cornell University)|Oct 6, 2022
Topic ModelingComputer Science38 citations
TL;DR

Binder is a training-free neural-symbolic framework that maps inputs to executable programs binding a unified LM API to a programming language, achieving state-of-the-art results on WikiTableQuestions and TabFact with only a dozen in-context exemplars and no training.

ABSTRACT

Though end-to-end neural approaches have recently been dominating NLP tasks in both performance and ease-of-use, they lack interpretability and robustness. We propose Binder, a training-free neural-symbolic framework that maps the task input to a program, which (1) allows binding a unified API of language model (LM) functionalities to a programming language (e.g., SQL, Python) to extend its grammar coverage and thus tackle more diverse questions, (2) adopts an LM as both the program parser and the underlying model called by the API during execution, and (3) requires only a few in-context exemplar annotations. Specifically, we employ GPT-3 Codex as the LM. In the parsing stage, with only a few in-context exemplars, Codex is able to identify the part of the task input that cannot be answerable by the original programming language, correctly generate API calls to prompt Codex to solve the unanswerable part, and identify where to place the API calls while being compatible with the original grammar. In the execution stage, Codex can perform versatile functionalities (e.g., commonsense QA, information extraction) given proper prompts in the API calls. Binder achieves state-of-the-art results on WikiTableQuestions and TabFact datasets, with explicit output programs that benefit human debugging. Note that previous best systems are all finetuned on tens of thousands of task-specific samples, while Binder only uses dozens of annotations as in-context exemplars without any training. Our code is available at https://github.com/HKUNLP/Binder .

Motivation & Objective

  • Improve coverage of symbolic languages without large task-specific training by leveraging language model APIs.
  • Increase interpretability and robustness of NL-to-executable-program systems.
  • Demonstrate state-of-the-art performance on WikiTableQuestions and TabFact with minimal annotations.

Proposed method

  • Map task inputs to an executable Binder program in a standard programming language (e.g., SQL, Python) extended with API calls to an LM.
  • Use Codex as both the semantic parser and the executor for API calls within the Binder program.
  • In-context learning with a small set of demonstrations to generate multiple Binder programs and perform majority voting over their answers.
  • Extend Binder to SQL and Python with neural APIs f_col and f_val to integrate LM capabilities into column/value reasoning.
  • Execution via a Binder interpreter that extends the grammar to accommodate API calls and evaluates nested API calls bottom-up.

Experimental results

Research questions

  • RQ1Can a training-free neural-symbolic framework achieve competitive performance on structured knowledge tasks without large-scale fine-tuning?
  • RQ2How does binding LM-enabled API calls to a programming language affect coverage, interpretability, and robustness on real-world questions?
  • RQ3What is Binder’s impact on program-unsolvable vs. program-solvable WikiTQ questions and related datasets?
  • RQ4How well does Binder generalize to multi-modal inputs (text, tables, images) and alternative programming languages (SQL, Python)?

Key findings

  • Binder achieves state-of-the-art execution accuracy on WikiTableQuestions and TabFact using Codex with only dozens of in-context exemplars and no task-specific training.
  • On WikiTQ, Codex Binder dev 65.0 and test 64.6 surpass prior baselines, including many finetuned models.
  • On TabFact, Codex Binder achieves 85.1 test accuracy, and 86.0 with few-shot retrieval, surpassing prior symbolic methods and competitive with fine-tuned baselines.
  • Binder improves performance on questions that SQL-alone cannot solve (program-unsolvable), outperforming pure SQL by 10.1 percentage points on WikiTQ unsolvable items.
  • Compared to end-to-end QA, Codex Binder shows large gains (e.g., 15.9% on WikiTQ and 12.4% on TabFact), highlighting better coverage through symbolic execution.
  • Binder provides interpretable intermediate programs, aiding debugging and error analysis, and demonstrates robustness to large inputs and noisy content.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.