Towards General Natural Language Understanding with Probabilistic Worldbuilding (2022)

Abstract: We introduce the Probabilistic Worldbuilding Model (PWM), a new fully symbolic Bayesian model of semantic parsing and reasoning, as a first step in a research program toward more domain- and task-general NLU and AI. Humans create internal mental models of their observations that greatly aid in their ability to understand and reason about a large variety of problems. In PWM, the meanings of sentences, acquired facts about the world, and intermediate steps in reasoning are all expressed in a human-readable formal language, with the design goal of interpretability. PWM is Bayesian, designed specifically to be able to generalize to new domains and new tasks. We derive and implement an inference algorithm that reads sentences by parsing and abducing updates to its latent world model that capture the semantics of those sentences, and evaluate it on two out-of-domain question-answering datasets: (1) ProofWriter and (2) a new dataset we call FictionalGeoQA, designed to be more representative of real language but still simple enough to focus on evaluating reasoning ability, while being robust against heuristics. Our method outperforms baselines on both, thereby demonstrating its value as a proof-of-concept.

## introduction despite recent progress in ai and nlp producing algorithms that perform well on a number of nlp tasks, it is still unclear how to move forward and develop algorithms that understand language as well as humans do. in particular, large-scale language models such as bert @xcite , roberta @xcite , @xcite , xlnet @xcite , and others were trained on a very large amount of text and can then be applied to perform many different nlp tasks after some fine-tuning. in the case of gpt-3, some tasks require very few additional training examples to achieve state-of-the-art performance. as a result of training on text from virtually every domain, these models are domain-general. this is in contrast with nlp algorithms that are largely trained on one or a small handful of domains, and as such, are not able to perform well on new domains outside of their training. despite this focus on domain-generality, there are still a large number of tasks on which these large-scale language models perform poorly @xcite . many limitations of today's state-of-the-art methods become evident when comparing with the human ability to understand language @xcite @xcite @xcite . many cognitive scientists posit that humans create rich mental models of the world from their observations which provide superior explainability, reasoning, and generalizability to new domains and tasks. how do we, as a field, move from today's state-of-the-art to more general intelligence? what are the next steps to develop algorithms that can generalize to new tasks at the same level as humans? the lack of interpretability in many of these models makes these questions impossible to answer precisely. one promising direction is to change the evaluation metric: brown et al. (2020), linzen (2020), and many others have suggested zero-shot or few-shot accuracy to measure the performance of algorithms (i.e., the algorithm is evaluated with a new dataset, wholly separate from its training; or in the case of few-shot learning, save for a few examples). while this shift is welcome, it alone will not solve the above issues. we introduce the probabilistic worldbuilding model (pwm), a probabilistic generative model of reasoning and semantic parsing. like some past approaches, pwm explicitly builds an internal mental model, which we call the theory @xcite @xcite . the theory constitutes what the algorithm believes to figure 1 : the generative process and inference in our model, with an example of a theory, generating a proof of a logical form which itself generates the sentence ''bob is a mammal.'' during inference, only the sentences are observed, whereas the theory and proofs are latent. given sentence y i , the language module outputs the logical form. the reasoning module then infers the proof π i of the logical form and updates the posterior of the theory t . we present an implementation of inference under the proposed model, called the probabilistic worldbuilding from language (pwl). while pwm is an abstract mathematical description of the underlying distribution of axioms, proofs, logical forms, and sentences, pwl is the algorithm that reads sentences, computes logical form representations of their meaning, and updates the axioms and proofs in the theory accordingly. see figure 1 for a high-level schematic diagram of pwm and pwl. pwm describes the process depicted by the red arrows, whereas pwl is the algorithm depicted by the green arrows. we emphasize that the reasoning in pwl is not a theorem prover and is not purely deductive. instead, pwl solves a different problem of finding satisfying abductive proofs, which is computationally easier than deductive inference: given a set of observations, work backwards to find a set of axioms that deductively explain the observations. it is these abduced axioms that constitute the internal ''mental model.'' humans often rely on abductive reasoning, for example in commonsense reasoning @xcite . a core principle of our approach is to ensure generality by design. simplifying assumptions often trade away generality for tractability, such as by restricting the representation of the meanings of sentences, or number of steps during reasoning. pwm is designed to be domain-and task-general, and to this end, uses higher-order logic (i.e., lambda calculus) @xcite as the formal language, which we believe is sufficiently expressive to capture the meaning of declarative and interrogative sentences in natural language. furthermore, pwm uses natural deduction for reasoning, which is complete in that if a logical form φ is true, there is a proof of φ @xcite . in section 3, we describe pwm and pwl more precisely. in section 4, as a proof-of-concept of the value of further research, we run experiments on two question-answering datasets: proofwriter @xcite and a new dataset, called fictionalgeoqa, which we specifically created to evaluate the ability to reason over short paragraphs while being robust against simpler heuristic strategies. unlike proofwriter, the text in fic-tionalgeoqa was not template-generated and is more realistic, but is still simple enough to focus the evaluation on reasoning rather than parsing, with many sentences having semantics that go beyond the horn clause fragment of first-order logic. pwl outperforms the baselines with respect to zero-shot accuracy (i.e., without looking at any training examples). our code and data is freely available at github.com/asaparov/pwl and github.com/asaparov/fictionalgeoqa. in summary, the primary contributions of this paper are the following: ## related work fully symbolic methods were commonplace in earlier ai research @xcite . however, they were oftentimes brittle: a new observation would contradict the internal theory or violate an assumption, and it was not clear how to resolve the impasse in a principled manner and proceed. but they do have some key advantages: symbolic approaches that use well-studied human-readable formal languages such as first-order logic, higher-order logic, type theory, etc. enable humans to readily inspect and understand the internal processing of these algorithms, effecting a high degree of interpretability @xcite @xcite . symbolic systems can be made general by design, by using a sufficiently expressive formal language and ontology. hybrid methods have been explored to alleviate the brittleness of formal systems while engendering their strengths, such as interpretability and generalizability; for example, the recent work in neuro-symbolic methods @xcite @xcite . neural theorem provers are in this vein @xcite . however, the proofs considered in these approaches are based on backward chaining @xcite , which restricts the semantics to the horn clause fragment of first-order logic. sun et al. (2020), ren et al. (2020), and arakelyan et al. (2021) knowledge bases (kbs) and cognitive architectures @xcite @xcite have attempted to explicitly model domaingeneral knowledge in a form amenable to reasoning. cognitive architectures aim to more closely replicate human cognition. some approaches use probabilistic methods to handle uncertainty @xcite @xcite . however, many of these approaches make strong simplifying assumptions that restrict the expressive power of the formal language that expresses facts in the kb. for example, many kbs can be characterized as graphs, where each entity corresponds to a vertex and every fact corresponds to a labeled edge. for example, the belief plays sport(s williams, tennis) is representable as a directed edge connecting the vertex s williams to the vertex tennis, with the edge label plays sport. while this assumption greatly aids tractability and scalability, allowing many problems in reasoning to be solved by graph algorithms, it greatly hinders expressivity and generality, and there are many kinds of knowledge that simply cannot be expressed and represented in such kbs. pwm does not make such restrictions on logical forms in the theory, allowing for richer semantics, such as definitions, universally quantified statements, conditionals, etc. ## model in this section, we provide a mathematical description of pwm. at a high level, the process for generating a sentence sampled from this probability distribution is: ## conclusions and future work we introduced pwm, a fully symbolic bayesian model of semantic parsing and reasoning, which we hope serves as a compelling first step in a research program toward more domain-and task-general nlu. we derived pwl, an efficient inference algorithm that reads sentences by parsing and abducing updates to its latent world model that capture the semantics of those sentences, and empirically demonstrated its ability to generalize to two out-of-domain question-answering tasks. to do so, we created a new question-answering dataset, fictionalgeoqa, designed specifically to evaluate reasoning ability while capturing more of the complexities of real language and being robust against heuristic strategies. pwl is able to read and understand sentences with richer semantics, such as definitions of new concepts. in contrast with past deductive reasoning approaches, pwl performs abduction, which is computationally easier. the highly underspecified nature of the problem of abduction is alleviated by the probabilistic nature of pwl, as it gives a principled way to find the most probable theories. we present an inference strategy where metropolis-hastings (mh) is performed on each sentence, in sequence, where the previous sample of the theory and proofs provides a warm-start for inference of the next sentence, reducing the number of mh iterations. there are many avenues for future work: a simple prior was used for proofs p(π i |t ), and an alternative is to use a compositional exchangeable prior such as adaptor grammars @xcite . the first mh proposal in as mentioned earlier, a model of context is necessary in the language module to properly handle cross-sentential anaphora and conversational contexts. real language very rarely consists of sentences that are independent of context. there are also many research questions on the issue of scalability. although pwl is able to scale to examples in fictionalgeoqa with more than 100 sentences, there are two main bottlenecks currently preventing it from scaling to significantly larger theories: (1) the maintenance of global consistency, and (2) the unfocused nature of the current mh proposals. when checking for consistency of a new axiom, rather than considering all other axioms/sets in the theory, it would be preferable to only consider the portion of the theory relevant to the new axiom. additionally, the current mh proposals do not take into account the goal of reasoning. for example, if the current task is to answer a question about geography, then mh proposals for proofs unrelated to geography are wasteful, and would increase the number of mh steps needed. a more clever goal-aware approach for selecting proofs to mutate would help to alleviate this problem and improve scalability. pwm provides a path to incorporate information from additional modalities in principled fashion: for example by adding a generative model of images, which would serve as a separate ''vision module.'' in addition, even though pwl is fully-symbolic, non-symbolic methods could be used for expressive prior/proposal distributions or approximate inference. there are many fascinating research paths to pursue from here.