From compositional semantics to B ayesian pragmatics via logical inference (2021)

Abstract: Formal semantics in the Montagovian tradition provides precise meaning characterisations, but usually without a formal theory of the pragmatics of contextual parameters and their sensitivity to background knowledge. Meanwhile, formal pragmatic theories make explicit predictions about meaning in context, but generally without a well-defined compositional semantics. We propose a combined framework for the semantic and pragmatic interpretation of sentences in the face of probabilistic knowledge. We do so by (1) extending a Montagovian interpretation scheme to generate a distribution over possible meanings, and (2) generating a posterior for this distribution using a variant of the Rational Speech Act (RSA) models, but generalised to arbitrary propositions. These aspects of our framework are tied together by evaluating entailment under probabilistic uncertainty. We apply our model to anaphora resolution and show that it provides expected biases under suitable assumptions about the distributions of lexical and world-knowledge. Further, we observe that the model’s output is robust to variations in its parameters within reasonable ranges.

## introduction a goal of much work in computational semantics is to determine how responsibility should be apportioned between discrete, logical techniques and stochastic, probabilistic ones in explanations of inference. a current tradition that has roots in symbolic ai leverages the power of theorem provers to model inference in corpora, oftentimes grappling with both deductive and abductive modes of reasoning @xcite @xcite @xcite @xcite . such approaches, while explicitly compositional, often attempt to combine both semantic and pragmatic meaning into a single inferential module, with the goal of capturing naturally occurring patterns. simultaneously (in the last decade), rational speech act (rsa) models have provided a promising avenue for integrating logical and probabilistic approaches to meaning by modelling utterance interpretation as a process of updating probability distributions over logically characterised meanings @xcite @xcite . according to the rsa perspective, interpreting an utterance involves reasoning pragmatically about a speaker's intended message according to bayesian principles of belief update. the reasoning of rational conversation participants, moreover, reflects principles of cooperative communication according to which speakers make true and informative utterances. thus such models aim to capture a central feature of rational discourse known since the work of @xcite : that it is constrained by principles of appropriate social behaviour, which, through the reasoning of interlocutors, serve to enrich the very meanings which are communicated. the goal of the current work is to integrate these two approaches to meaning and inference by using, on the one hand, a theorem prover to reason about compositionally derived semantic meanings and, on the other hand, bayesian inference, as applied within the rsa framework, to give a computational account of pragmatic reasoning in discourse. our contribution is thus to tie work in the logical tradition into a successful probabilistic framework for pragmatic reasoning. while logical entailment is at the core of evaluating truth values, we use probabilistic reasoning to deal with epistemic un-figure 1 : phases of our system. syntax is first interpreted into a distribution over fol formulae. the truth values of such formulae can then be extracted using a theorem prover, allowing an expected value for the resulting distribution to be computed. the rsa model acts on the distribution over fol formulae. this refinement step may itself invoke the theorem prover and distributions over truth values (we omit these dependencies to avoid clutter). we pay special attention to the resolution of linguistic ambiguity in discourse-in particular, anaphora-as a test-case for our approach. by considering anaphora resolution as a bayesian inference problem, we show how both prior world and lexical knowledge may influence the choice of antecedent for a given pronoun. moreover, because our computational implementation combines a probabilistic approach to inference with a compositional, logical approach to meaning in the tradition of @xcite , i.e., by integrating numeric computation and theorem proving, we are able to explicitly and robustly characterise the contribution of conventional meaning to the task of pragmatic inference, as well as how the latter serves to modulate uncertainty about the former. we illustrate our approach on two test cases which differ in the priors they involve, thus demonstrating the importance of background knowledge to the behaviour of our model. ## anaphora resolution as a case study to apply the above theory to anaphora resolution, we let θ be a set of parameters that determine the mapping of anaphoric expressions to antecedents. (in our experiments, we will consider only pronominal anaphora.) for example, if @xmath0, then (singleton) θ could be taken in the set θ = {john, bill, bob}, if those three antecedents are available in the discourse context. the logical representation of the utterance is then u θ = run(θ). the factor p (θ) might be used to give lower probabilities to an-tecedents further back in the discourse; a value for this prior might be estimated from psycholinguistic experimentation. for the sake of simplicity, we let p (θ) be uniform across θ in what follows. alternative utterances within the rsa framework, p s 1 gives the distribution over alternative utterances considered by the speaker to express φ. the set underlying this distribution, moreover, must be supplied by the modeller a priori. we determine this set as follows. first, the utterance observed by l is itself in this set. moreover, for any utterance u in the set, and for any anaphor x present in u, we include in the set the alternative utterance u just like u, but in which the anaphor is substituted by a noun phrase denoting the antecedent actually meant by s (given s's intention to communicate φ). that is, u is less ambiguous than u. for example, when evaluating p ('he runs'|run(bill)), s considers both 'he runs' and 'bill runs'. this set is important because it is used to normalise s's distribution over utterances: in our experiments, we let γ be governed by a finite sequence of boolean variables b 1 , . . . , b n drawn from bernoulli distributions. concretely, we work with a set of potential propositions {ψ 1 , . . . , ψ n } and write '. . . b i . . . {. . . ψ i . . .}' to denote the set containing ψ i if b i is true and ¬ψ i if b i is false. the set of propositions in γ and the parameters of their associated bernoulli distributions vary from example to example. the model then predicts a posterior distribution over mappings θ from anaphora to antecedents, along with a corresponding posterior distribution over meanings φ. as a result, one may also obtain a posterior distribution over boolean variables b i representing the common ground, now updated with φ. ## examples we provide two examples to illustrate our model and, in particular, the effect of prior knowledge on its behaviour. our first example is (1). here, the noun phrases emacs and the command are in competition as potential antecedents for the pronoun it. 2 intuitively, the most likely antecedent for the pronoun is emacs, which we take to be due (at least in part) to the fact that the verbs waiting and prepared lexically entail that their subjects are animate. 3 thus a rational listener who infers that the antecedent for it in (1) is emacs is doing so (at least in part) on the basis of the following reasoning: because animacy is entailed of the pronoun in virtue of its role as subject of the verb prepared, it is more likely, all else being equal, to co-refer with emacs, which is also entailed to be animate (in virtue of being the subject of the verb waiting), than the command, which is subject to no such entailment. such an inference is thus obtained on the basis of abductive reasoning about the source of the animacy of the pronoun. the availability of this reasoning in (1) contrasts with its relative unavailibility in the second example in (2). in contrast to emacs and the command, proper names referring to humans, like ashley and amy, are very likely to denote animate individuals. as such, their prior probability of being animate will be higher than that of the noun phrases in (1), and the animacy entailment contributed by the verb waiting will therefore provide less of a basis for using animacy as a cue to distinguish potential antecedents for the pronouns. with the impact of animacy attenuated in (2), the candidate antecedents for the subject pronoun should be in closer competition, and anaphora resolution should be less certain. intuitively, this seems to be the case: it appears more difficult to determine the referent of the subject pronoun in (2) than in (1) (though experimental investigation would be required to confirm this intuition). we can model the difference between these examples by assuming different priors for the animacy of the referents of noun phrases like emacs and the command, on the one hand, and ashley and amy, on the other. in our model, we encode such priors by associating probabilities with sentences translated into first order formulae; each such formula ψ is then associated with an independent bernoulli random variable b in the definition of a probabilistic program that returns a world-state consisting of a set of hypotheses encoded as logical formulae. that is, such a set contains ψ if b is true, and it contains ¬ψ if b is false. animate(emacs) 0.2 animate(the command) 0.2 animate(ashley) 0.9 animate(amy) 0.9 as the table shows, we model world knowledge as dictating that the referents of emacs and the command are only 20% likely to be animate, while individuals such as ashley and amy are 90% likely to be animate. though these priors are somewhat arbitrary, they are meant to reflect qualitative differences in the knowledge we have about noun phrases referring to humans and those referring to other objects. in addition to the priors listed above, we include priors for the truth of the following formulae, which, in each case, we take to be 0. in our model, these formulae act as filters of background knowledge: any world-state that contradicts them is given probability 0, and the probability distribution over world-states is re-normalised. as a result, the bernoulli random variables associated with individual hypotheses in the final model of background knowledge will not be entirely independent. ## results and analysis to illustrate the model's performance, we give results for the examples discussed in the previous section, fixing values for parameters in the speaker model; in particular, the exponent α, as well as the log-cost associated with an utterance that uses either a pronoun or a full noun phrase to refer to a given antecedent. the results of second, even though high values of α increase the bias in favour of emacs (as expected), the model is not very sensitive to its precise choice. as α approaches 0, the speaker model approaches a uniform distribution over utterances, but even as low a value as 0.5 yields sensible results. third, incorporating a measure of cost into the reasoning of the pragmatic speaker has a dampening effect on the model's bias, as can be seen by comparing rows 1 and 2, as well as rows 3 and 4. this effect consists in about 1% of difference, and it is due to the fact that making reference to cost has the pragmatic listener reason about a "lazier" pragmatic speaker; such a speaker, who finds full noun phrases costlier to utter than pronouns, will more likely choose a pronoun to minimise their effort, rather than as a result of their reasoning about a literal listener who will choose the expected antecedent for the pronoun. second, comparing the results of this model with those for (1) demonstrates clearly the effect of prior knowledge on the model's behaviour. because the antecedents have high animacy priors (0.9), the animacy entailment of the verb waiting provides less of a basis for distinguishing them; as a result, they are in closer competition as antecedents for the subject pronoun, which is entailed to be animate, and bias toward the subject antecedent is greatly reduced (though still present). last, we note that the object pronoun is exactly split in its probability of taking ashley versus amy as its antecedent in (2). because there is no animacy entailment from the verb for the object pronoun, the pragmatic listener has no basis for distinguishing the antecedents, e.g., through abductive inference. this result supports our explanation for the biases displayed in the other cases. ## related work the work presented in this paper is related to a number of attempts in both the formal and computational semantics communities to bridge logical and probabilistic approaches to natural language semantics. these approaches, in addition to their formal differences, can be categorised into those which have been computationally implemented and those which have not. in the first category, one finds approaches such as @xcite ; @xcite ; @xcite ; @xcite ; @xcite ; @xcite , while in the latter category, those such as van @xcite ; @xcite ; @xcite . a common theme among probabilistic approaches to interpretation is that they describe a set of possible world-states as a distribution. predicates are then evaluated at each world-state, and probabilistic truth is the expected value over all possible world-states. in implemented accounts, one often uses monte carlo sampling methods to estimate truth values. we refrain from a further comparison with approaches lacking a computational implementation: even though they contain fruitful ideas, it is unclear how they should be realised computationally. another way to classify approaches is by the representation of world-states that they employ. goodman and stuhlmüller (2013); @xcite ; @xcite use an ad hoc set of variables, chosen according to the problem at hand. @xcite use vector representations inspired by machine-learning approaches. @xcite present a system that tries to minimise (and in cases, eliminate) the need for sampling by modelling predicates as (the unions of) boxes and individuals as points. a unique characteristic of the present account is our use of a small number of bernoulli random variables to represent world-states, where each variable captures the applicability of a proposition. this choice is afforded by the use of logical entailment as the basis of evaluating truth values. together, this means that we can provide exact calculations for truth values, i.e., by taking the average over finite probability distributions. an additional benefit of using the knowledge-as-propositions approach is that we have all the expressivity of the underlying logic at our disposal. hence, we have no difficulty dealing with predicates with multiple arguments, contrary to @xcite . even though weighted formulae can be interpreted as possible world-states via a markov logic networks @xcite , as @xcite showed for natural language semantics, our simpler approach is sufficient for our purposes. ## future directions the model presented in this paper relies on techniques that are widely used in computational semantics; by combining them in a novel way, we believe that our approach has important potential to generate applications in semantic analysis, inference, and bayesian cognitive modelling. one immediate avenue for extending our model concerns its applicability to a range of semantic problems that could benefit from a system that leverages both logical semantics and bayesian reasoning. an obvious candidate is predication vagueness, a classic problem for logical semantics and the target of discussion of a number of bayesian approaches to semantics @xcite @xcite . thus extending the coverage of the present model and checking the predictions it makes with respect to these phenomena is one of our goals. we are also interested in designing a general natural language inference system based on the approach proposed in this paper; such a system could then be evaluated against various test suites. to start, one can check whether the proposed system accounts for pragmatic aspects of the fracas test suite @xcite , the rte test suite @xcite , or the small probabilistic test suite of @xcite . as a realistic anaphora resolution algorithm, the model presented here falls short in some respects. first, we take no account of the well-studied grammatical restrictions on the relation between pronominal anaphora and their antecedents @xcite . second, our model currently shows no sensitivity to the discourse factors which are well known to affect the acceptability of anaphora in various contexts. and third, it incorporates no sensitivity to psycholinguistic constraints on anaphora, which, like discourse factors, affect acceptability. there are different ways one might make the model sensitive to such constraints, which may be decided on a case-by-case basis. in principle, any non-pragmatic factor may be accounted for by imposing the right prior on θ. however, other solutions suggest themselves. grammatical constraints on the anaphora-antecedent relation, for example, might be implemented in an improved compositional semantics which makes antecedents available for certain anaphora depending on their relative syntactic positions. sensitivity to discourse factors might be incorporated into our model as declarative knowledge that contributes to the prior (i.e., on a par with world and lexical knowledge). and, psycholinguistic (and, perhaps, discourse) constraints might, for example, be incorporated into our pragmatic speaker model as a more realistic measure of cost (see, e.g., @xcite , or our literal listener model, by sampling antecedents for anaphora according to their retrieval costs. in principle, antecedent retrieval cost could be incorporated into the distribution over antecedents accessed by the pragmatic listener, as well, perhaps depending on whether our model is viewed as giving a computational-level versus algorithmic-level characterisation of anaphora resolution @xcite . the ultimate success of our approach relies on obtaining an accurate account of prior knowledge. prior world knowledge can be obtained through experiment, following approaches to rsa that have assessed prior beliefs using surveys @xcite . given that our model characterises prior knowledge declaratively, we can use similar methods. finally, although we have paid specific attention to anaphora resolution, our model makes way for a general approach to semantic ambiguity resolution. we might, for example, extend our model to other anaphora-like phenomena, e.g., ellipsis, as well as the resolution of structural and quantifier-scope ambiguities. the success of such extensions depends on generating an appropriate set of alternatives, given an utterance (and vice versa). for ellipsis, semantic alternatives can be generated by a free parameter, as above; in the case of, e.g., quantifier scope, one might incorporate a parser to provide alternative semantic representations for a given utterance. in all cases, one requires an appropriate set of alternative utterances from a proposition in the speaker model.