arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.02875cs.CL
收藏

符号语言中的绑定语言模型

Binding Language Models in Symbolic Languages

The University of Hong Kong(香港大学);University of Washington(华盛顿大学);University of Waterloo(滑铁卢大学);Salesforce Research(赛富时研究院);Yale University(耶鲁大学);Shanghai Jiao Tong University(上海交通大学);Allen Institute for AI(艾伦人工智能研究所);Meta AI

Zhoujun Cheng, Tianbao Xie, Peng Shi, Chengzu Li, Rahul Nadkarni, Yushi Hu, Caiming Xiong, Dragomir Radev, Mari Ostendorf, Luke Zettlemoyer, Noah A. Smith, Tao Yu

摘要:

虽然端到端神经方法最近在性能和易用性方面都主导了NLP任务,但它们缺乏可解释性和鲁棒性。我们提出了Binder,一个将任务输入映射到程序的无训练神经符号框架,它(1)允许将语言模型(LM)功能的统一API绑定到程序设计语言(例如,SQL,Python)来扩展其语法覆盖范围,从而解决更多样化的问题,(2)采用LM作为程序解析器和API在执行期间调用的底层模型,以及(3)只需要一些上下文中的范例注释。具体来说,我们采用GPT-3 Codex作为LM。在解析阶段,只有少量的上下文范例,Codex能够识别任务输入中原始程序设计语言无法回答的部分,正确地生成API调用以提示Codex解决无法回答的部分,并识别在哪里放置API调用,同时与原始语法兼容。在执行阶段,Codex可以执行多功能(例如,常识QA、信息抽取)在API调用中给出适当的提示。Binder在WikiTableQuestions和TabFact数据集上实现了最先进的结果,其显式输出程序有利于人类调试。请注意,以前最好的系统都是在数万个特定于任务的样本上进行微调的,而Binder只使用数十个注释作为上下文范例,而没有任何训练。我们的代码可在https://github.com/HKUNLP/Binder上获得。

英文摘要:

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 .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑