Elamur Research

A Type-Theoretical system for the FraCaS test suite: Grammatical Framework meets Coq

Paper Β· 2017 Β· Jean-Philippe Bernardy and Stergios Chatzikyriakidis

Summary

If nobody finished a report, can anyone have finished it on time? Answering requires knowing what the modifier contributes. Finishing on time gives a more specific description of an event and still counts as finishing. A system that can use that relationship can rule out an on-time completion from a premise that rules out every completion. Bernardy and Chatzikyriakidis build FraCoq to make such steps explicit. Their approach to natural language inference connects a grammatical analysis of each sentence to a proposition that can be used in a proof. Semantics Β· Reasoning

Grammatical Framework, or GF, supplies the categories and construction rules for sentence trees. FraCoq takes those trees from an existing treebank for FraCaS, so the experiment starts with a syntactic analysis already in place. The authors assign a meaning to each category and each construction. Applying a construction to parts of a tree then has a corresponding operation on their meanings. The resulting sentence propositions go to Coq, a proof assistant based on type theory. An affirmative answer requires a proof of the hypothesis from the premises. A negative answer requires a proof of its negation. The authors also show that a well-typed GF expression receives a meaning of the corresponding Coq type. Treebanks

Much of the work lies in giving grammatical expressions meanings precise enough to support the intended inferences. Common nouns are predicates on objects. Verb phrases can use both the subject and the noun class under which it is being considered. Adjectives and adverbs can carry properties that Coq can use in proofs. Noun phrases keep their number, quantifier and noun class accessible, so a grammatical operation can update one part before the phrase combines with a verb. The authors release this semantic resource as free software under the name FraCoq.

FraCoq reaches 83% accuracy on 174 examples from 5 FraCaS sections. The paper reports a gain of 14 percentage points over the earlier higher-order logical system, which was evaluated on 181 examples. With the comparatives section removed, FraCoq scores 0.88 on 143 examples. LangPro scores 0.85 on a smaller evaluation of 92 examples that omits comparatives. FraCoq's strongest section scores are on quantifiers and adjectives. Its treatment of definite plurals can yield a proof where the expected answer is unknown, and the GF analysis of some comparative phrases leaves information difficult to recover. The proofs were constructed by hand and checked in Coq. The result shows how much inference a precise grammatical interpretation can support on these examples, with automatic proof search and performance beyond FraCaS still open.

Deep dive: A Type-Theoretical system for the FraCaS test suite: Grammatical Framework meets Coq

FraCoq translates Grammatical Framework trees into Coq propositions and tests which natural language inferences can be proved on FraCaS. Β· about 37 minutes to read

The problem and its context

What a sentence allows a reader to conclude

Natural language inference asks what follows from statements expressed in ordinary language. A problem supplies premises and a hypothesis. The premises describe what is to be taken as given, and the hypothesis states a candidate conclusion. Sometimes the premises establish the conclusion. Sometimes they establish its negation. They can also leave the issue open. A premise about which people might have signed a contract, for example, can narrow the possibilities while leaving each person's participation unsettled.

For the authors, this is a question about what it means to understand a sentence. A reader who understands a noun phrase such as every delegate can work out how a statement about that group applies to a particular delegate. A reader who understands on time can see why an on-time completion counts as a completion. The details lie in different parts of the language, but they meet in the same judgment about a conclusion. A formal account has to make the information contributed by each part available when a proof needs it.

FraCaS organizes inference problems by the linguistic phenomena involved. That organization makes it possible to ask what a system can do with quantifiers, plurals or modifiers, and to examine the interpretation responsible for a particular answer. The paper also names the Pascal Recognizing Textual Entailment tasks and the Stanford Natural Language Inference corpus as other settings in which inference had been studied. It presents the latter as a more recent benchmark and leaves the broader question of which evaluation platform best serves computational semantics outside its scope. Evaluation & benchmarks Β· A Large Annotated Corpus for Learning Natural Language Inference

Why put a logical representation between the sentence and the answer?

The paper describes a division in earlier work according to whether an approach interprets sentences in an intermediate logical language. On the logical side, it places systems that use first-order logic and systems based on weaker formalisms such as Natural Logic. Among approaches that omit that intermediate translation, it mentions methods based on bags of words and various uses of machine learning. The distinction concerns the route from premises to answer. In a logical system, the inference procedure has a representation of the sentences' content on which it can operate directly. Recognising Textual Entailment with Logical Inference

The paper points in particular to earlier work by Mineshima and colleagues. They argued that higher-order logic could improve the accuracy of logical systems. One reason higher-order machinery is relevant to the constructions in FraCoq is that meanings sometimes take other meanings as arguments. A noun denotes a predicate, while a modifier can take such a predicate and produce another. A quantifier can operate over meanings supplied by a noun and a verb phrase. The logical language therefore has work to do before proof search even begins. It has to express the contributions that a grammar makes available. Higher-Order Logical Inference with Compositional Semantics

The authors connect that line of research to modern, constructive type theories. In this setting, a type can depend on a value. A function can accept a noun predicate as an argument, for instance, and a record can contain both an operation and evidence that this particular operation has a stated property. The latter is useful for words such as on time. The record can hold the meaning of the modifier along with a proof principle about the relationship between a modified phrase and the underlying verb phrase. The paper also describes the possibility of organizing individuals into richer types as an attraction of modern type theories. FraCoq's design uses a single abstract object type and encodes noun membership with predicates over it.

What GF and Coq each supply

The Grammatical Framework distinguishes abstract syntax from the concrete forms used in a language. In the abstract syntax, a noun phrase, a common noun and an adjectival phrase belong to different categories. A construction rule states which categories it accepts and which category it produces. This supplies an explicit structure for interpretation. If a rule builds a common noun by combining an adjective with another common noun, the semantics can specify how those meanings combine at precisely that point in the tree. Syntax & grammar formalisms

GF also provides mappings between abstract trees and concrete syntax. Those mappings can be used in reverse to parse text into trees. For this project, the authors start from the existing FraCaS analyses by LjunglΓΆf and Siverbo. They identify that resource as an important reason for choosing GF and acknowledge that another suitable parsing system, such as the CCG parser used by Mineshima and colleagues, could supply sentence structures in an inference system. With the GF trees already chosen, the experiment can focus on the consequences of a semantic interpretation without choosing among competing parses. Parsing

Coq supplies the language for defining the interpretations and checking proofs that use them. It is based on the calculus of inductive constructions, a typed calculus with dependent types. In FraCoq it hosts meanings as varied as predicates for common nouns, records for lexical items and propositions for sentences. Once those definitions are in place, a question about what follows from a premise becomes a question about whether a corresponding proposition can be proved. That arrangement also makes it possible to locate some failures quite precisely. A proof can be valid in Coq even when the translation that made it possible assigns too strong a meaning to the original sentence.

The method, step by step

Start with a sentence tree

The input to the semantic interpretation is a GF tree. The leaves provide lexical items, while the internal structure records the grammatical operations used to build larger phrases. To interpret a sentence about a delegate finishing a report on time, FraCoq needs the meanings of the noun and verbal material, the operation that adds the time modifier, and the operation that combines the subject with the resulting verb phrase. Working from the structure of the tree tells the interpreter where each meaning is used.

This is a compositional procedure. A grammatical constructor comes with a semantic operation, which receives the interpretations of its arguments. A compound phrase can itself serve as an argument to another operation. Once this process reaches the sentence, the result is a proposition. Premises become propositions available to the proof. The hypothesis gives a proposition to prove or negate. FraCaS determines which cases are examined, while the authors supply the semantic definitions and construct the proofs. There is no statistical training stage in the procedure described.

From FraCaS sentence trees to inference judgments

The steps in order.

From FraCaS sentence trees to inference judgmentsStep 1: Take the existing GF trees1. Take the existing GF treesStep 2: Interpret lexical entries in Coq2. Interpret lexical entries in CoqStep 3: Compose meanings along each tree3. Compose meanings along each treeStep 4: Form propositions for premises and hypothesis4. Form propositions for premises and hypothesisStep 5: Try to prove the hypothesis or its negation5. Try to prove the hypothesis or its negationStep 6: Assign the FraCaS answer6. Assign the FraCaS answer

Give grammatical constructions typed meanings

A GF constructor has a type that describes how it can be used. The paper begins with the construction that adds an adjectival phrase to a common noun. Its type describes the order of the inputs and the kind of phrase that comes out.

AdjCN : AP β†’ CN β†’ CN

AdjCN names the construction. The colon introduces its type. AP is the category of adjectival phrases, and CN is the category of common nouns. Each β†’ marks a function type. The constructor accepts an adjectival phrase and then a common noun, producing a new common noun.

FraCoq assigns a Coq type to every GF category. It also interprets the function types used to state the grammar's construction rules. A function from one grammatical category to another becomes a function between the meanings of those categories.

⟦A β†’ B⟧ = ⟦A⟧ β†’ ⟦B⟧

A and B stand for types in the grammar. The brackets ⟦ ⟧ denote the semantic interpretation. The arrow on the left belongs to GF's type expression, and the arrow on the right belongs to Coq's function type. The equality states how the mapping deals with a function type.

For a construction whose GF type is X, the authors supply a semantic operation inhabiting the interpretation of X. Application then has a uniform translation. This rule is what carries the operation from a grammatical definition to a particular occurrence of that construction in a tree.

⟦t(u)⟧ = ⟦t⟧(⟦u⟧)

t is a GF expression used as a function, and u is its argument. Parentheses mark application. The brackets denote interpretation, and the equality says that translating the application amounts to applying the translated function to the translated argument. The semantic definition of an individual constructor can be complex, while the rule for using it in a larger tree stays the same.

The type-soundness theorem is about this mapping. If a GF application is well formed by the grammar's rules, its translation is well formed by the corresponding Coq rules.

If e : X in GF, then ⟦e⟧ : ⟦X⟧ in Coq.

e stands for a GF expression, X for its GF type, and the colons express the typing judgments. The brackets on the right give the interpretation of the expression and of its type. The authors prove the claim by induction on the GF typing derivation. A constructor already has its assigned semantic type. At an application, the induction gives the types of the interpreted function and argument, so the interpreted function can be applied to that argument. The argument relies on GF's typing apparatus fitting inside Coq's.

This guarantee is what lets definitions for individual constructions work together when interpreting a well-typed tree. For instance, the result of interpreting a noun modifier can be used by an operation that expects a common noun, provided the modifier was given the correct type. Whether that common noun describes the intended set of objects is a further question, resolved by examining the chosen definition and the inferences it licenses.

Use types that can carry properties of meanings

The authors use dependent products and records to state properties that mention particular semantic values. A dependent product generalizes the type of a function by letting its result type refer to its input. It also expresses universal quantification when the result is a proposition.

Ξ (x : A) B[x]

Ξ  forms the dependent product. The parentheses enclose the binding of x, the input variable, and the colon assigns it the type A. B[x] is the result type or proposition, with the square brackets indicating that it can depend on x. If that dependence is absent, the type has the ordinary function form from A to B. In Coq the dependent form is written using forall.

The complementary construction discussed in the paper is a dependent sum. Its value contains a first component and a second whose type can depend on the first. This relationship is what makes it possible to package up a modifier with a property about its own behavior.

Ξ£(x : A) B[x]

Ξ£ forms the dependent sum. x is the first component and A is its type, as indicated by the colon inside the binding parentheses. B[x] is the type of the second component after taking the first into account. If the second component's type is independent of the first, the construction reduces to an ordinary product of types. The paper describes how Coq represents this kind of package with a single-constructor inductive type and uses record-like definitions for several lexical classes.

A record of this kind can preserve a distinction that matters for inference even when the surrounding grammar expects a broad category. A grammar rule for modifying a verb phrase can accept an adverb in general. A specific adverb can also have a proven implication about its unmodified predicate. The record preserves that implication for proofs, and a coercion, meaning an implicit conversion declared in Coq, supplies the general semantic value where the grammar requires it.

Turn a sentence into a proposition

Sentences have the semantic type Prop, Coq's type of propositions. A sentence tree can therefore be translated into something that occurs as an assumption or a goal in Coq. For entailment, the simplest case has a single premise and a single hypothesis.

⟦P⟧ β†’ ⟦H⟧

P names the premise tree, and H names the hypothesis tree. The brackets indicate their translated propositions. β†’ is logical implication. A proof of this implication shows that the translated hypothesis follows when the translated premise is assumed. With several premises, the reasoning has the corresponding premise propositions available. For a negative answer, the goal is the negation of the hypothesis proposition.

The proof assistant checks a conclusion relative to the semantic definitions and any assumptions they use. This matters for entries whose behavior is left partly abstract. A proof about a quantifier may use an axiom about cardinality, while a proof about an adverb may use a property included in its entry. The logical conclusion follows from that formal material. Agreement with the natural language judgment depends on whether the material captures the relevant reading of the sentences.

Represent noun classes and verb phrases

FraCoq starts with an abstract type of objects. A common noun is then a predicate that says whether an object belongs to the relevant class. Applying the meaning of delegate to an object gives a proposition about that object's membership. That proposition can appear under a quantifier, in a conjunction or as a premise for a particular inference.

CN = object β†’ Prop

CN is the semantic type of common nouns. object is the abstract domain of individuals, and Prop is the type of propositions. β†’ forms the function type, and the equality gives the semantic definition. Each common noun meaning takes one object and returns the proposition that the noun applies to it.

The paper considers using common nouns as types, a design found in other work in modern type theory. In that design, being a man can be expressed by assigning a person a type corresponding to the noun man. FraCoq often needs the membership claim as a proposition inside another definition. The authors choose predicates because application produces that proposition directly. They judge that a richer arrangement of noun types and subtyping would add machinery whose benefits are limited for the examples under consideration. They leave the comparison with a developed common-nouns-as-types treatment for later work.

A verb phrase also makes a proposition about an object, but its semantic operation can take the subject's noun class into account. A quantifier can thus pass both the individual it is considering and the class that supplies the subject restriction. The class remains available even when the grammatical composition has moved past the common noun itself.

VP = Ξ (C : CN) Ξ (x : object) Prop

VP is the semantic type of verb phrases. Ξ  binds an input, the colons specify input types, and the parentheses enclose each binding. C is the subject's class, of type CN, and x is the subject, of type object. Prop is the type of the result. The equality defines VP. A phrase whose truth depends only on the individual can ignore C. The interpretation of comparative adjectives can use it to identify the class relevant to the comparison.

This design keeps the object domain general while passing particular class information to the constructions that need it. The class is a predicate such as the meaning of delegate. The individual is an argument to that predicate and to the verb phrase. Keeping them distinct also matters when the system further restricts a class with a modifier or supplies it to a generalized quantifier.

Give modifiers the properties needed for inference

An adjective is interpreted as an operation from a common noun meaning to another common noun meaning. That general type allows different kinds of adjectival behavior. A particular class can carry additional structure. The authors identify several adjective classes relevant to FraCaS and give definitions for intersective and extensional subsective adjectives in detail.

An intersective adjective has a predicate of its own. To interpret the modified noun, FraCoq requires that the adjective's predicate and the original noun both apply to the object. This builds a restricted class whose members satisfy both conditions.

wkIntersectiveA(a)(C)(x) = a(x) ∧ C(x)

wkIntersectiveA names the conversion from an intersective adjective to a general noun modifier. a is the adjective predicate, C the noun predicate and x an object. Parentheses mark application. ∧ is logical conjunction, and the equality defines the conversion's result. Coq can insert this conversion implicitly when a rule calls for a general adjective meaning.

A subsective adjective can depend on the noun it modifies. Its result still implies membership in the bare noun class, but its adjective contribution is represented as an operation on that class. For the extensional subclass, the entry includes a rule allowing the adjective to respect equivalence between noun predicates. If two predicates hold of exactly the same objects, an adjective applied to one can be carried over to the other.

(βˆ€x, P(x) β†’ Q(x)) β†’ (βˆ€x, Q(x) β†’ P(x)) β†’ (βˆ€x, M(P)(x) β†’ M(Q)(x))

P and Q are common noun predicates, M is the modifier operation stored in the entry, and x ranges over objects. βˆ€ means universal quantification, with the comma separating its variable from its scope. β†’ indicates implication. Parentheses mark application or group an entire quantified claim. The first two claims establish inclusion in both directions. Together they let a proof transfer the result of applying M from P to Q. The same property can be used with the noun predicates exchanged.

The conversion to a general adjective retains the subsective requirement by conjoining the modifier's result with the original noun predicate.

apExtensionalSubsectiveA(r)(C)(x) = M(C)(x) ∧ C(x)

apExtensionalSubsectiveA names the conversion. r is the record whose modifier field is M, C is the common noun predicate, and x is an object. Parentheses mark application, the equality specifies the result, and ∧ requires both propositions to hold. The resulting predicate explicitly retains noun membership. The extensionality evidence remains available through the lexical entry even though the ordinary interpretation of the modified noun uses the modifier field.

The treatment of adverbs uses a related pattern. The adverbs at issue in FraCaS modify verb phrases. The authors say these examples give the adverb no need for the subject's noun class, so an adverb operates on a predicate over objects. The refined class in the paper carries both veridicality and covariance. Veridicality means that the result of applying the adverb entails the underlying verb predicate of the same individual.

βˆ€x, VAdv(V)(x) β†’ V(x)

x ranges over objects, V is the unmodified verbal predicate, and VAdv is the adverbial operation on predicates. βˆ€ means the implication holds for every object, and the comma introduces its scope. Parentheses mark application. β†’ expresses the implication from the modified predicate to the original one. In the report example, this is the step from finishing on time to finishing.

Covariance concerns the transfer of an implication between predicates through the same modifier. Suppose a predicate entails another for every individual. If the adverb is covariant, an implication in the same direction holds between the modified predicates.

(βˆ€x, V(x) β†’ W(x)) β†’ (βˆ€x, VAdv(V)(x) β†’ VAdv(W)(x))

V and W are verbal predicates, x ranges over objects, and VAdv is the same adverbial operation on both. βˆ€ quantifies over objects, commas introduce the corresponding scopes, and parentheses mark application or group the quantified claims. The outer β†’ connects the implication between the bare predicates to the implication between the modified ones. The inner arrows give the direction of each implication.

The paper declares on time as an entry in the class that supplies these properties. The general adverb meaning can be recovered by taking the operation from the record. A proof has access to the property's statement because it belongs to the entry's type. This puts the grammatical operation of adding an adverb and the inferential principles licensed by particular adverbs in the same semantic account. Lexical semantics

Keep noun phrase components accessible

A conventional meaning for a noun phrase consumes a verb phrase and returns a proposition. That gives a direct account of a quantified sentence. The noun phrase supplies a restriction and a quantificational force, while the verb phrase supplies what is asserted of the relevant individuals. FraCoq retains this functional meaning as the result of combining the noun phrase's components.

NP0 = VP β†’ Prop

NP0 names the functional interpretation of a noun phrase, VP is the type of a verb phrase, and Prop is the type of propositions. The arrow gives the function type, and the equality defines NP0. A meaning of this type is ready to take a verb phrase and yield a proposition.

The GF grammar also has predeterminers, which it treats as operations on already constructed noun phrases. An expression such as all can occur in that role. If the noun phrase were stored only as a function of a verb phrase, the predeterminer would have no separate field representing the quantifier to replace. FraCoq therefore stores a number, a quantifier and a common noun together. The constructor for this package makes the fields available independently.

mkNP : Num β†’ Quant β†’ CN β†’ NP

mkNP names the constructor and the colon introduces its type. Num encodes the grammatical number information, Quant is the quantifier type, CN is the common noun type, and NP names the assembled noun phrase. The arrows show the successive inputs and the resulting type.

A predeterminer has type from NP to NP. The paper's entries for all and most take the existing package apart, keep its number and noun, and insert the corresponding quantifier. The justification the authors give for all is tied to analyses they encounter in GF. The parser's structure can include an indefinite article that serves as a placeholder. The interpretation needs to replace that placeholder when it supplies universal force. The stored fields give the predeterminer access to that part of the interpretation.

The number field preserves a distinction between grammatical number and more precise cardinal information. It can record singular, plural, an unknown number, a cardinal value or a more than specification built on another number expression. A quantifier can inspect the field if it needs the distinction. An operation such as all can ignore it, while an article with a cardinal expression can impose a condition on a count. Retaining these alternatives at the noun phrase stage lets the grammar build the phrase before the quantifier decides how to use the number.

Quant = Num β†’ CN β†’ NP0

Quant is the type of a generalized quantifier. Num is the number representation, CN is a noun predicate, and NP0 is the kind of noun phrase meaning that takes a verb phrase. The arrows give the sequence of function inputs and the result. The equality defines the type. Once the noun restriction and number have been supplied, the result can combine with the verb phrase to form a proposition.

Interpret quantifiers and articles

The interpretation of all says that the verb phrase holds of every object that satisfies the common noun. At the point of application, the verb phrase receives the same class that restricts the quantification. This is the use of the extra class argument introduced in the definition of VP.

all_Quant(n)(C)(V) = βˆ€x, C(x) β†’ V(C)(x)

all_Quant is the quantifier entry, n is the number argument, C is the noun predicate, and V is the verb phrase. x ranges over objects. Parentheses denote application, βˆ€ gives universal quantification, and the comma introduces its scope. β†’ means that if C holds of x, the verb phrase holds of x in the class C. The equality gives the definition. The number n is accepted by the quantifier's type and plays no part in its result.

For quantifiers that make explicit use of counts, the system assumes a context-dependent function CARD. The argument is a predicate, and the result is a natural number. A common argument to CARD describes the individuals that satisfy both the common noun and the verb phrase. The authors give cardinality axioms that suffice for relevant proofs, including one that lets the count preserve set inclusion.

(βˆ€x, A(x) β†’ B(x)) β†’ CARD(A) ≀ CARD(B)

A and B are common noun predicates, and x is an object. βˆ€ quantifies over objects, with the comma marking the beginning of the scope. The inner β†’ expresses that everything in class A is in class B. The outer β†’ licenses the count comparison from that inclusion. CARD supplies the counts, and ≀ says the count of A is at most the count of B. Parentheses group the inclusion claim or mark application.

The entry for at most feeds the number representation and the count of noun members satisfying the verb phrase to a helper called interpAtMost. This is where the fixed number carried by the noun phrase becomes relevant to the truth condition. The displayed entry specifies the inputs to the helper. A related use of counts occurs in the interpretation of most, which compares the number satisfying the whole description with a context-dependent threshold based on the size of the noun class.

CARD(Ξ»x. C(x) ∧ V(C)(x)) β‰₯ MOSTPART(CARD(C))

CARD maps a predicate to a natural number. Ξ»x. forms a predicate by binding the object variable x. C is the common noun predicate, V is the verb phrase, and ∧ requires that both the noun and verb descriptions hold of the object. Parentheses mark application or group the predicate being counted. MOSTPART maps the count of the noun class to a threshold. β‰₯ says the count of objects satisfying the complete description reaches that threshold.

The paper imposes a bound on the threshold supplied by MOSTPART. This leaves the contextual choice of threshold abstract and makes an explicit statement about what a proof can use.

βˆ€k, MOSTPART(k) ≀ k

k ranges over natural numbers. βˆ€ means the condition holds for every such number, and the comma introduces its scope. MOSTPART(k) applies the threshold function to that number. ≀ says the threshold is at most its input. This is the particular condition displayed by the authors for the FraCaS examples.

The indefinite article decides which proposition to form by examining the number field. A specific cardinal value triggers an equality between that value and the count of objects meeting the noun and verb descriptions. A more than specification uses the helper interpAtLeast on the stored number and that count. In the remaining cases, the article uses an existential proposition. The simplest such claim says there is an individual that fits both descriptions.

βˆƒx, C(x) ∧ V(C)(x)

βˆƒ is existential quantification, x is the object whose existence is asserted, and the comma introduces the scope of the quantifier. C is the noun predicate, V is the verb phrase, and parentheses mark application. ∧ requires the same object to satisfy the noun predicate and the verb phrase in the class supplied by the noun.

For the definite article, the authors assume an abstract environment that selects an object for a common noun predicate. The article uses this object for the nonplural case. The sentence asserts that the chosen object satisfies the verb phrase and belongs to the requested noun class.

V(C)(environment(C)) ∧ C(environment(C))

C is the common noun predicate and V is the verb phrase. environment is the assumed function from noun predicates to objects. Parentheses indicate application. ∧ joins the claim about the selected object made by the verb phrase with its membership in the noun class.

The definite plural adds a universal condition while retaining the claims about the representative from the environment. In particular, it says that every member of the noun class satisfies the verb phrase. That clause is immediately available to a proof that seeks a statement about all members. The other conjuncts supply membership and predication for the representative as well.

(βˆ€x, C(x) β†’ V(C)(x)) ∧ V(C)(environment(C)) ∧ C(environment(C))

x ranges over objects, C is the noun predicate, and V is the verb phrase. βˆ€ gives universal quantification, and the comma introduces its scope. β†’ makes noun membership the condition for the verb phrase to hold. environment selects an object associated with C, and parentheses group the universal claim or mark function application. The conjunction signs ∧ join the universal claim to the two claims about that selected object. The universal clause supplies the inference that causes trouble for some plurals in the evaluation.

Compose prepositions, relatives and comparisons

The paper gives prepositions a record with an operation and properties about its behavior. The operation takes a simplified noun phrase as the preposition's argument. Here the simplified phrase is a function from an object predicate to a proposition. Once the argument is fixed, the preposition transforms a verbal predicate into another verbal predicate.

NP1 = (object β†’ Prop) β†’ Prop

NP1 names the simplified noun phrase type. object is the domain of individuals, and Prop is the type of propositions. β†’ forms a function type. Parentheses group the type of an object predicate, and the equality identifies the type that consumes such a predicate and produces a proposition.

The stored veridicality principle says that the modified predicate entails the underlying one. The covariance principle says that an implication between two underlying predicates is preserved under the prepositional modification with the argument held fixed. This is the same pair of proof principles used in the refined adverb treatment. The new part is the noun phrase argument. Storing the properties with the operation ensures that both principles refer to the particular operation interpreted by that record.

A relative clause is treated as a verb phrase. To attach it, the authors take the noun phrase package and refine the common noun predicate with the clause. The package retains its number and quantifier. When that quantifier is later applied, it ranges over the class that satisfies both the original noun description and the relative clause.

Cβ€²(x) = C(x) ∧ R(C)(x)

Cβ€² is the refined noun predicate, C is the original noun predicate, R is the relative clause interpreted as a verb phrase, and x is an object. Parentheses denote application, ∧ joins the noun and relative clause conditions, and the equality defines the new predicate. In the relative clause's application, C supplies the class argument.

An adjectival comparative uses the adjectival quality, the noun phrase that supplies the other participant, and a class against which the quality is considered. For the comparison proper, the authors apply the adjective to the same class for both participants. The verb phrase supplied to the comparison noun phrase can receive that phrase's own class, but the displayed definitions use the subject's class in the adjectival predicates. The authors flag possible future work on relating the classes.

For an as … as construction, the comparison condition is an equivalence. It says that the adjective applies to one participant in the chosen class exactly when it applies to the other in that class. This condition sits inside the application of the comparison noun phrase. The noun phrase can therefore contribute its quantificational force to the complete sentence.

a(C)(x) ↔ a(C)(y)

a is the adjectival modifier, C is the class used for the comparison, x is the subject, and y is the comparison participant. Parentheses mark application. ↔ expresses equivalence between the two propositions about the adjectival quality.

For the directional comparative, the authors express the quality in terms of implication. The displayed condition includes a positive implication from the comparison participant to the subject and a negative implication from the subject to the comparison participant. It operates on membership in the adjective's predicate. There is no degree or scale argument in this representation.

(a(C)(y) β†’ a(C)(x)) ∧ (Β¬a(C)(x) β†’ Β¬a(C)(y))

a is the adjective, C is the common class used to interpret it, x is the subject, and y is the comparison participant. Parentheses mark application or group the two implications, and ∧ joins those implications. β†’ marks the direction of each implication, while Β¬ is negation. The first conjunct transfers the positive property from y to x. The second moves from absence of the property at x to absence at y.

These definitions explain how the comparison works once the grammar has made its arguments available together. A comparative in a natural sentence can also involve unspoken material, such as a verb that the reader understands from the preceding phrase. Whether that material can be supplied compositionally then depends on how the GF tree relates the comparative marker, the remainder of the comparison and its verbal context.

Experiments and results

What FraCaS asks and what FraCoq receives

FraCaS contains 346 examples in 9 sections. A problem gives one or more premises, asks a question and records an answer. The authors use examples from Bill MacCartney's XML conversion of the suite, which also makes the declarative hypothesis associated with a question available. The distinction between question and hypothesis matters. Coq's goal is a proposition corresponding to what the question asks about, such as the claim that a particular person signed a contract.

The labels are YES, NO and UNK. YES means the premises support the hypothesis. NO means they support the hypothesis's negation. UNK is used when the premises support neither outcome. The example about a choice among possible signatories illustrates UNK. A disjunction naming several people can hold while leaving open whether a particular one of them signed. The contrast with a negative case is important. An explicit premise saying that no delegate completed a report can rule out the more specific claim that a delegate completed it on time.

FraCoq is evaluated on 174 examples in 5 sections. The section counts are 75 for quantifiers, 33 for plurals, 22 for adjectives, 31 for comparatives and 13 for attitudes. The authors omit the sections devoted to anaphora, ellipsis and temporal reference because of their reliance on context. They also omit the short verbs section, whose cases concern aspectual class and collective predication. Omitting an entire section devoted to ellipsis still leaves elliptical forms inside the comparatives section.

For the evaluated examples, the GF treebank supplies the abstract syntax. The authors then interpret the trees and attempt the proofs. They assign YES when the hypothesis can be proved from the premises and NO when its negation can be proved. Their procedure assigns UNK otherwise. The distinction between a benchmark label and an outcome of this procedure is significant. The benchmark is about what follows from the English premises. The procedure records which outcome the authors can establish from the Coq interpretations with the proof effort they make.

How to read the scores

The paper reports accuracy, the agreement of the predicted labels with the benchmark answers. It compares FraCoq with the higher-order system of Mineshima and colleagues, called MINE in the results, and with the CCG system that uses the first-order Nutcracker prover. It also reports the available LangPro results from Abzianidze. The systems' aggregate figures come from evaluations with different coverage. The chart preserves the accuracy values as proportions. Higher-Order Logical Inference with Compositional Semantics

Overall accuracy on the reported FraCaS evaluations

FraCoq scores above MINE and Nutcracker, while LangPro's score comes from a smaller evaluation that omits comparatives.

Overall accuracy on the reported FraCaS evaluationsNutcracker: 0.50Nutcracker0.50MINE (181 examples): 0.69MINE (181 examples)0.69FraCoq (174 examples) (this paper): 0.83FraCoq (174 examples) (this paper)0.83LangPro (92 examples): 0.85LangPro (92 examples)0.85
The numbers
System or settingaccuracy proportion
Nutcracker0.50
MINE (181 examples)0.69
FraCoq (174 examples) (this paper)0.83
LangPro (92 examples)0.85

The authors report a gain of 14 percentage points over MINE. MINE's evaluation includes the verbs section, so it covers 181 examples. FraCoq covers 174 and leaves that section out. The total scores compare the reported evaluations. The section-level numbers add detail because each system's coverage contributes to its total, and the sections differ substantially in difficulty. LangPro's 0.85 comes from 92 examples and excludes comparatives. The paper gives 0.88 on 143 examples for FraCoq when its own comparative cases are removed. Those totals describe different example sets even after both omit comparatives.

The quantifier results show a substantial separation among the reported systems. FraCoq's accuracy on its 75 examples is .96. MINE reports .77, and Nutcracker reports .53 for the section. LangPro reports .93 on its 44 quantifier cases. For FraCoq, the quantifier section tests constructions ranging from universal and existential readings to uses of noun phrase numbers and other quantified forms. The aggregate score describes their combined performance. It does not assign a separate success rate to the count-based definitions or to any individual lexical entry.

On the 33 plural cases, FraCoq scores .76. MINE reports .67 and Nutcracker .52, while LangPro reports .73 on 24 cases. The paper discusses an explicit source of plural errors through its treatment of the definite article. A system can receive the intended syntax and carry out a valid deduction while still disagreeing with the answer key, because its meaning for the plural phrase already encodes a stronger statement than the sentence warrants.

FraCoq scores .95 on the 22 adjective examples. MINE reports .68 and Nutcracker .32 for the section, while LangPro reports .73 on 12 examples. FraCoq's definitions make several properties of adjectival modification expressible in the lexical entries and available to proofs. The section score measures the result of using the complete semantics, including those entries, the tree structures and the proof construction for each test case.

The 31 comparative cases yield FraCoq's lowest section score, .56. MINE reports .48 and Nutcracker .45, and LangPro gives no score for the section. The difficulty is visible across the reported systems that cover it. For FraCoq, the authors trace some trouble to the interaction of comparative meaning with the representation of elliptical phrases. Performance on this section contributes to the difference between FraCoq's full evaluated score and its score when comparatives are removed.

For attitudes, FraCoq scores .85 on 13 cases. The table reports .77 for MINE and .46 for Nutcracker in that section. The paper supplies fewer construction details for attitudes than for noun phrases, modifiers and comparatives, so the score establishes the observed performance for those cases without identifying a specific semantic definition responsible for it.

What the analyzed examples show

A success case is the inference from a Nobel literature prize to a Nobel prize in FraCaS 017. The premise gives a more specific description of the prize, and the hypothesis uses the broader description. The requested answer is affirmative. The case illustrates how a system can use the relationship between two descriptions to establish a conclusion while retaining the premise's existential information about the winner.

FraCaS 038 illustrates a negative answer. Its premise rules out any delegate completing the report. The hypothesis asks about a completion with an added on-time qualification. A proof can assume a delegate completed it on time and use veridicality to obtain a completion. That conflicts with the premise. The proof derives the negative label from the relationship between the predicates, instead of taking an unsuccessful attempt to prove the hypothesis as grounds to reject it.

For an unknown case, FraCaS 083 allows Smith, Jones or Anderson as a signatory and asks about Jones individually. The stated possibilities leave room for cases where Jones signed and cases where a different person did. This shows what the unknown label is meant to capture in the benchmark. When FraCoq outputs the same label because a proof could not be constructed in either direction, the observable result is agreement with that answer. The proof procedure itself has no general way to certify that every possible derivation has been ruled out.

FraCaS 233 involves orders won by ITEL and APCOM. The premise is comparative, and the hypothesis asks whether ITEL won any orders. The expected inference is affirmative. A reader recovers the material implicit in the phrase about APCOM and understands the comparison as one between quantities of orders won. The GF structure can make it difficult to recover precisely the parts that the interpretation has to connect. The authors use this case to show how an inference about quantity depends on the treatment of the elliptical comparison.

FraCaS 094 exposes a different problem. The premise attributes a vote for a Labour MP to Cambridge inhabitants as a group, and the hypothesis asks whether the claim holds of every inhabitant. The expected judgment is UNK. FraCoq interprets the definite plural with a universal clause. The statement about every inhabitant is then available from the interpretation of the premise, and Coq can check a proof of that conclusion. The erroneous prediction is traceable to the translation of a grammatical construction, even though the resulting proof is legitimate on its formal premises.

What the ablations show

The paper offers no component ablations. Its analyses compare results by section, report the effect of excluding comparative cases from the evaluation, and inspect examples to identify where the syntax or semantics leads to difficulty.

The comparison with and without comparatives varies the evaluation set. FraCoq scores 0.83 on 174 examples and 0.88 on 143 examples after those cases are dropped. The grammar, lexical entries and proof process have not been experimentally varied in that comparison. The scores therefore show what happens to aggregate accuracy when a difficult section no longer contributes. This also explains why LangPro's aggregate belongs alongside its coverage of 92 cases and its omission of comparatives. An overall figure by itself leaves the reader without information about which phenomena contributed.

The section scores help locate strengths and weaknesses within the evaluated material. Quantifiers and adjectives are strong for FraCoq, while comparative constructions are substantially harder. Several design choices are active in all of these results. Quantification uses structured noun phrases and sometimes cardinality assumptions. Adjectival modification uses the categories and lexical properties encoded in Coq. Proofs are selected and guided by the authors. Establishing the contribution of any of those choices in isolation would require changing that choice and evaluating the resulting system under comparable conditions.

The examples provide a more direct account of particular outcomes. In the definite plural case, the error can be traced to a proposition inside the translation. The premise receives a universal conjunct, and the hypothesis is the conclusion that this conjunct makes available. Changing the reading from universal to one that allows the weaker interpretation would change what the proof could take from the premise. The authors use this observation to explain the error. They do not report a revised plural semantics or an evaluation of one.

The comparative example isolates a different obstacle. The expression giving the quantity comparison and the phrase introduced by than may occur in different parts of the GF tree. If the latter attaches to the verb phrase, the local operation interpreting the noun phrase has no natural access to it. The paper also describes trees with an attachment closer to the intended relationship but an analysis built from prepositional and adjectival categories that suits the intended interpretation poorly. The example points to which grammatical information a semantic rule would need. There is no reported comparison using revised trees that measures how many cases such an analysis would recover.

The paper's discussion of proof difficulty distinguishes relatively direct deductions from cases that need properties such as veridicality and covariance. These properties can entail more than the application of a quantifier or the extraction of a conjunct. The proof writer needs to recognize the relevant underlying predicates, choose the direction of an implication, and decide where a lexical principle applies. The authors say the premises in FraCaS often make the relevant direction apparent. Their account explains why short proofs can still require guidance, without attributing a numerical share of the results to that guidance.

Taken together, the analyses attribute different difficulties to different steps in the method. A proof can expose a reading that is too strong, as with definite plurals. A grammatical structure can obscure the relation needed to state a useful meaning, as with some comparatives. A suitable meaning can still require a person to recognize which available principle advances the proof. The paper's evidence for these distinctions comes from the definitions and individual cases. The reported accuracies measure the full procedure that combines them.

Limitations

Limits identified by the authors

The authors emphasize that they construct proofs manually. Coq checks the resulting proofs, and the authors say that the proofs usually take few steps. Earlier work with Coq had used its tactic language, LTAC, to package sequences of proof steps. The authors argue that an adaptation of this kind could reproduce their tested proofs with modest effort. Their concern is what such a result would establish. A macro built from tactics that worked on known examples has demonstrated only that those tactics can solve those examples and other cases to which they happen to apply.

Higher-order proof search creates a deeper issue. There is no general decision algorithm that establishes, for every proposition in that logic, whether a proof exists. An automatic system needs tactics or heuristics for pursuing promising lines of reasoning and some policy for stopping a search. For an inference benchmark with an unknown label, the stopping policy affects the answers. Failing to construct a proof within a search procedure gives an operational outcome. The benchmark's unknown label describes absence of entailment in either direction. The gap matters especially if a relevant proof exists but takes a form the search does not find.

The authors also point to the size and artificial construction of FraCaS. The suite provides a range of linguistic phenomena, which is valuable for examining formal analyses. They say their evaluation lacks a separation between development and testing examples. In their discussion they use a lookup table with a 100% success rate as a limiting illustration of how a fixed suite can be matched. FraCoq has compositional definitions and checked proofs, which give readers explanations for those outputs. Its accuracy still leaves open how the same definitions and search choices would behave on new data. The authors add that specialized meanings for particular lexical entries can increase the demand for heuristics.

Several linguistic restrictions arise from choices explained in the paper. Definite plurals receive the universal reading across the relevant uses, in spite of the existence of cases calling for a weaker interpretation. The comparative treatment lacks explicit degrees and scales, which the authors say were unnecessary for the treatment they chose for the examples at hand. At the same time, they identify comparative phrases involving more than as hard to interpret from the available GF trees. They propose improvements to the grammar's analyses of both these phrases and predeterminers.

Discourse context is another stated boundary. The environment used for the definite article provides an abstract object associated with a noun predicate. The authors propose passing an environment of previously mentioned objects through the constituents as a step towards supporting anaphora. Such an extension would have to make earlier referents available to later expressions. The evaluation omits the anaphora, temporal reference and ellipsis sections, so it supplies no section results for reasoning over those phenomena. Coreference resolution

Limits visible in the evaluation setup

Starting with selected trees makes it possible to evaluate the semantic rules without conflating their behavior with parse selection. It confines the result to inference given those analyses. GF's ability to parse from concrete text provides a possible route to a larger system. The experiment cannot establish how that system would behave when a sentence has several plausible structures, a parser chooses the wrong one, or a useful analysis is absent. The comparative cases also show that an available tree can still organize information in a way that frustrates semantic composition.

The theorem concerns type correctness. A translator can give a well-typed interpretation to a premise while overcommitting to a reading, as the Cambridge example demonstrates. A correct proof then faithfully exposes the effect of the translation. For readers assessing the result, there are consequently separate questions about whether a tree is admissible under the grammar, whether its interpretation is well typed, and whether that interpretation supports the same conclusions a reader draws. The theorem establishes the connection between the first two. The FraCaS experiments probe the third for a portion of the suite.

The count-based definitions and lexical records also depend on stated assumptions. CARD and MOSTPART are context-dependent functions, and the paper supplies particular conditions that proofs can use. For example, the formula for MOSTPART bounds a threshold by its own input. It gives no relationship between thresholds at different inputs. An adverb's properties likewise enter through the class of its lexical entry. The experiment shows what these axioms and entries can support in the formalized cases. It leaves open the work of choosing them for other contexts or inferring from unfamiliar wording which lexical class should apply.

The cross-system comparisons have limits even where the numbers appear together in the same table. MINE includes a section FraCoq omits. LangPro covers a smaller collection and omits comparatives. Each total reports performance under its evaluation conditions, and the paper provides no matched comparison across all of those totals. The result demonstrates the behavior of FraCoq on its selected examples with human-guided proof construction. It leaves the accuracy of a fully automatic version, measured on fresh text and against baselines with identical case coverage, unestablished.

What came after

The paper closes by proposing a decidable fragment of the logic as a route to principled automation. Restricting the logical expressions admitted by the system would make it possible to characterize where a decision procedure applies. For FraCoq, the open question is which constructions could still be represented with adequate precision inside such a fragment, especially when their lexical entries contribute properties about functions or predicates. The paper develops no fragment or evaluation of one.

The authors also outline extensions to the grammatical interface. They want a closer connection between the parts of a comparative that the semantics needs to interpret together, and a treatment of predeterminers that better matches their effect on quantification. For anaphora, they envisage passing records of mentioned objects through the interpretation. These proposals identify where the original architecture could be extended. The paper reports them as future work and supplies no subsequent implementation or measured outcomes for them.

Cite

Cite as Jean-Philippe Bernardy and Stergios Chatzikyriakidis. 2017. A Type-Theoretical system for the FraCaS test suite: Grammatical Framework meets Coq. Proceedings of the 12th International Conference on Computational Semantics (IWCS) –- Long papers.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{bernardy2017type,
  title = {{A Type-Theoretical system for the FraCaS test suite: Grammatical Framework meets Coq}},
  author = {Jean-Philippe Bernardy and Stergios Chatzikyriakidis},
  booktitle = {Proceedings of the 12th International Conference on Computational Semantics (IWCS) –- Long papers},
  year = {2017},
  url = {https://aclanthology.org/W17-6801/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/bernardy-2017-type-theoretical-system-fracas-test/