Many texts, especially in chemistry and biology, describe complex processes. We focus on texts that describe a chemical reaction process and questions that ask about the process's outcome under different environmental conditions. To answer questions about such processes, one needs to understand the interactions between the different entities involved in the process and to simulate their state transitions during the process execution under different conditions. A state transition is defined as the memory modification the program does to the variables during the execution. We hypothesize that generating code and executing it to simulate the process will allow answering such questions. We, therefore, define a domain-specific language (DSL) to represent processes. We contribute to the community a unique dataset curated by chemists and annotated by computer scientists. The dataset is composed of process texts, simulation questions, and their corresponding computer codes represented by the DSL.We propose a neural program synthesis approach based on reinforcement learning with a novel state-transition semantic reward. The novel reward is based on the run-time semantic similarity between the predicted code and the reference code. This allows simulating complex process transitions and thus answering simulation questions. Our approach yields a significant boost in accuracy for simulation questions: 88\% accuracy as opposed to 83\% accuracy of the state-of-the-art neural program synthesis approaches and 54\% accuracy of state-of-the-art end-to-end text-based approaches.
翻译:许多文本,特别是化学和生物学的文本,描述复杂的过程。我们侧重于描述化学反应过程的文本,以及在不同环境条件下询问过程结果的问题。为了回答关于这些过程的问题,人们需要理解参与过程的不同实体之间的互动,并模拟过程在不同条件下的状态过渡。国家过渡的定义是程序执行过程中对变量的记忆修改。我们假想生成代码和进行模拟过程的代码将允许回答这些问题。因此,我们定义了一种特定域名语言(DSL)来代表过程。我们为社区提供了一种由化学家和计算机科学家附加说明的独特数据组。数据组由过程文本、模拟问题和DSL代表的流程执行过程中相应的计算机代码组成。我们提出一个神经程序综合方法,其基础是用新的状态过渡语义奖励来强化学习。新颖的奖励是基于预测代码和参考代码之间连续时间的语义相似性。这样可以模拟复杂的过程转变,从而回答模拟问题。我们的方法由过程文本、模拟数据的准确性是:88的准确性,88的准确性是模拟状态的准确性。88-88的精确性程序。