C L ] 2 0 A ug 2 01 9 Density Matrices for Derivational Ambiguity

Recent work on vector-based compositional natural language semantics has proposed the use of density matrices to model lexical ambiguity and (graded) entailment (e.g. Piedeleu et al 2015, Bankova et al 2016, Sadrzadeh et al 2018). Ambiguous word meanings, in this work, are represented as mixed states, and the compositional interpretation of phrases out of their constituent parts takes the form of a strongly monoidal functor sending the derivational morphisms of a pregroup syntax to linear maps in FdHilb. Our aims in this paper are twofold. First, we replace the pregroup front end by a Lambek categorial grammar with directional implications expressing a word’s selectional requirements. By the Curry-Howard correspondence, the derivations of the grammar’s type logic are associated with terms of the (ordered) linear lambda calculus; these terms can be read as programs for compositional meaning assembly with density matrices as the target semantic spaces. Secondly, we use the density matrix spaces to model the ubiquitous derivational ambiguity of natural language syntax, opening up the possibility of an integrated treatment of lexical and derivational forms of ambiguity. 1 Lambek Calculus: proofs as programs With his [2, 3] papers, Jim Lambek initiated the ‘parsing as deduction’ method in computational linguistics: words are assigned formulas of a type logic designed to reason about grammatical composition; the judgement whether a phrase is well-formed is the outcome of a process of deduction in that type logic. Lambek’s original work was on a calculus of syntactic types. Van Benthem [9] added semantics to the equation with his work on LP, a commutative version of the Lambek calculus, which in retrospect turns out to be a precursor of (multiplicative intuitionistic) linear logic. LP is a calculus of semantic types. Under the Curry-Howard ‘formulas-as-types’ approach, proofs in LP are in correspondence with terms of the (linear) lambda calculus; these terms can be seen as programs for compositional meaning assembly. To establish the connection between syntax and semantics, the Lambek-Van Benthem framework relies on a homomorphism sending types and proofs of the syntactic calculus to their semantic counterparts. In this paper, we want to keep the distinction between the left and right implications \, / of the syntactic calculus in the vector-based interpretation we aim for. To do so, we turn to the directional lambda calculus of [10]; its Curry-Howard correspondence with proofs of (N)L/,\ is given in Fig 1. With L/,\ we refer to the simply typed (implicational) fragment of Lambek’s [2] associative syntactic calculus, which assigns types to strings ; NL/,\ is the non-associative version of [3], where types are assigned to phrases (bracketed strings) . The presentation of Fig 1 is in the sequent-style natural deduction format. The formula language has atomic types (say s, np, n for sentences, noun phrases, common nouns) for complete expressions and implicational types A\B, B/A for incomplete expressions, selecting an A argument to the left resp right to form a B. Ignoring the term labeling, judgments are of the form Γ ⊢ A, where the antecedent Γ is a non-empty list (for L) or bracketed ∗Corresponding author: a.duartecorreia@uu.nl Neither of these calculi is satisfactory for modelling natural language syntax. What we report on, then, is a first step towards extended calculi that can handle the well-documented problems of over/undergeneration of (N)L/,\ in a principled way. 1 Terms: t, u ::= x | λx. t | λx. t | t(u) | (u)t Typing rules: x : A ⊢ x : A Ax Γ, x : A ⊢ t : B Γ ⊢ λx. t : B/A I/ x : A,Γ ⊢ t : B Γ ⊢ λx. t : A\B I\ Γ ⊢ t : B/A ∆ ⊢ u : A Γ,∆ ⊢ t(u) : B E/ Γ ⊢ u : A ∆ ⊢ t : A\B Γ,∆ ⊢ (u)t : B E\ Figure 1: Proofs as programs for (N)L/,\. list (NL) of formulas, and the succedent a single formula A. For each of the type-forming operations, there is an Introduction rule, and an Elimination rule. Turning to the Curry-Howard encoding of NL/,\ proofs, we introduce a language of directional lambda terms, with variables as atomic expressions, left and right λ abstraction, and left and right application. The inference rules now become typing rules for these terms, with judgments of the form x1 : A1, . , xn : An ⊢ t : B. The antecedent is a typing environment providing type declarations for the variables xi; a proof constructs a program t of type B out of these variables. In the absence of Contraction and Weakening structural rules, the program t contains x1, . , xn as free variables exactly once, and in that order. Intuitively, one can see a term-labelled proof as an algorithm to compute a meaning t of type B with parameters xi of type Ai. In parsing a particular phrase, one substitutes the meaning of the constants (i.e. words) that make it up for the parameters of this algorithm. In what follows, we introduce density matrices as the meaning spaces of our target interpretation. Section 2 gives some background on density matrices, and on ways of capturing the directionality of our syntactic type logic in these semantic spaces. Section 3 then turns to the compositional interpretation of the λ/,\ programs associated with (N)L/,\ derivations. Section 4 shows how the density matrix framework can be used to capture simple forms of derivational ambiguity. 2 Density Matrices: Capturing Directionality The semantic spaces we envisage for the interpretation of the syntactic calculus are density matrices. A density matrix or density operator is used in quantum mechanics to describe systems for which the state is not completely known. For lexical semantics, it can be used to describe the meaning of a word by placing distributional information on its components. As standardly presented, density matrices that are defined on a tensor product space indicate no preference with respect to contraction from the left or from the right. Because we want to keep the distinction between left and right implications in the semantics, we set up the interpretation of composite spaces in such a way that they indicate which parts will and will not contract with other density matrices. The basic building blocks for the interpretation are density matrix spaces V ∗ ⊗ V for V a vector space over C and and V ∗ the dual space. From these basic building blocks, composite spaces are formed via the binary operation ⊗ (tensor product) and an operation ↓ that sends a density matrix basis to its dual basis. In the notation, we use Ã for density matrix spaces (basic or compound), and ρ, or subscripted ρx, ρy, ρz, . ∈ Ã for elements of such spaces. The ↓ operation is involutive; it interacts with the tensor product as (Ã⊗B̃) = B̃⊗Ã and acts as identity on matrix multiplication. Below in (†) the general form of a density matrix defined on a single space in the standard basis, and (‡) in the dual basis: (†) ρx = ∑