Syntax Directed Semantic Parsing with Combinatory Grammars

42 concepts33 papers1 proposal

How do machines understand the infinite variety of natural language sentences? Rather than treating sentences as unstructured bags of words or relying entirely on black-box pattern recognition, a long-standing research direction operationalizes the Principle of Compositionality: the meaning of a complex expression is a function of the meanings of its parts and the syntactic rules used to combine them.

By tightly coupling formal grammars with mathematical logic, researchers have built systems that systematically map natural language into executable representations. This approach ensures that a sentence's grammatical structure serves as an explicit blueprint for its logical meaning.

The Foundation: Standalone Meaning and Lambda Calculus

To build a compositional system, every sub-phrase within a sentence must possess a standalone, mathematically rigorous meaning rather than being a fragmented piece of text. As Warren demonstrated, adopting typed lambda calculus ($\lambda$-calculus) provides this exact capability. By treating sub-sentential components as high-level functions, phrases can be systematically combined and reduced, enabling precise phrase-level reasoning and inference.

To operationalize this, the system requires a grammar formalism where syntax and semantics are perfectly synchronized. Combinatory Categorial Grammar (CCG) serves as the primary engine for this interface. In CCG, lexical items are assigned syntactic categories that are intrinsically linked to semantic functions in lambda calculus (Artzi et al.; Zettlemoyer et al.).

       Syntax:  Noun Phrase (NP)  +  Verb Phrase (VP)  --->  Sentence (S)
                  |                    |                       |
                  v                    v                       v
    Semantics:  Argument (x)      +  Function (λx.P(x)) --->  Proposition P(x)

As a CCG parser traverses a sentence bottom-up, it applies grammatical combinators (such as functional application or composition). Every time a syntactic rule merges two phrases, the corresponding lambda expressions undergo functional reduction. This transparent interface allows the system to recursively assemble word-level definitions into full sentence representations that reflect the true grammatical dependencies of the text (Artzi et al.; Russo et al.). To scale this without manual engineering, Zettlemoyer et al. introduced probabilistic categorial grammars that can automatically induce these lexicons from sentence-logic pairs.

Executing Logic: Proof Assistants and Logic Programs

Once natural language is mapped to a formal representation, how do machines actually compute truth or perform reasoning? Researchers generally route the parsed semantic forms into one of two powerful reasoning frameworks:

Higher-Order Logic and Theorem Proving

Standard first-order logic often breaks down when faced with complex natural language phenomena like generalized quantifiers ("most") or intensional operators ("believe"). To resolve this, Mineshima et al. and Martínez-Gómez et al. developed systems like ccg2lambda that map CCG parse trees directly to Higher-Order Logic (HOL) formulas. These formulas are then passed to robust, automated proof assistants like Coq to verify textual entailment. Similarly, Bernardy et al. demonstrated that maintaining a strict compositional mapping between syntactic categories and logical types in a formal proof assistant provides a highly effective and predictable framework for handling diverse linguistic structures.

Answer Set Programming (ASP)

For tasks that require common-sense reasoning, managing defaults (rules that are usually true), and handling exceptions, researchers leverage logic programming. Baral et al. demonstrated that the hierarchical arrangement of a sentence can serve as a direct blueprint for assembling complex logical rules in ASP (Baral et al.). By utilizing an "inverse lambda" algorithm, the authors showed that a system can learn the mathematical meanings of novel words simply by observing sentences and their desired ASP outputs (Baral et al.). Russo et al. extended this paradigm to machine reading comprehension, using CCG to automatically generate modular logic programs capable of resolving coordination, relativization, and temporal logic.

Bypassing Full Translation: Natural Logic

While translating sentences into full formal logic (like HOL or ASP) provides immense reasoning power, it can be computationally expensive and brittle when encountering out-of-vocabulary words. A parallel paradigm, Natural Logic, bypasses full translation by reasoning directly on the structure of natural language strings.

    Sentence 1: "Every [mammal] barks" 
                     | (Substitutions / Edits)
                     v
    Sentence 2: "Every [dog] barks" ---> Global Entailment Decision

Instead of mapping a sentence to an abstract formula, the system decomposes sentence pairs into local lexical modifications or "edits." MacCartney et al. introduced this computational approach with NatLog, which predicts elementary entailment relations for individual string modifications and aggregates them using a specialized calculus. By composing these local judgments, the system derives a global entailment decision for complex sentence pairs without requiring full translation into formal logic.

To handle contradictions and semantic alignment, Watanabe et al. utilized formal composition rules to systematically map local edits to specific logical operators. Modern neuro-symbolic architectures have evolved this idea further: Zhu et al. mapped phrase pairs to set-theoretic relations (such as equivalence, inclusion, or negation) and aggregated them using a formal logic table. This separates local semantic matching from global logical composition, ensuring a transparent and structured reasoning path.

Handling Linguistic Nuance and Domain Constraints

The true power of syntax-directed semantic composition becomes apparent when handling highly specialized domains or subtle linguistic edge cases that break standard machine learning models:

  • Nested Modals and Pragmatics: In strategic environments like games, interpreting language requires composing the logical properties of different verb classes (e.g., factive and implicative verbs like force, prevent, or pretend). Joshi et al. showed that a compositional framework successfully handles these nested constructions where the truth value of a complement depends entirely on the modal constraints of preceding verbs.
  • Non-Truth-Conditional Modifiers: Certain linguistic elements, such as Japanese honorifics, express social or emotional context without altering the primary message. Kawahara designed a specialized composition rule that allows these markers to access an argument's value to generate secondary meaning while passing the original argument through the grammatical tree completely unmodified.
  • Domain-Specific Specifications: In software engineering, network protocols are often written in ambiguous natural language. Yen demonstrated that domain-specific semantic parsing using CCG, paired with a dictionary mapping terminology to precise variables and types, can successfully translate text specifications into structured, executable code.
  • Mathematics and Quantities: Resolving deeply nested mathematical queries in word problems requires structured linguistic analysis to capture high degrees of compositionality (Roy et al.). For multi-modal tasks, Iokawa et al. combined CCG and lambda calculus to translate natural language hypotheses into formal expressions, allowing precise evaluation of quantifiers and negations against visual data via model checking.

Key Foundational Work

Hierarchical Meaning Representation and Analysis of Natural Language Documents (1980) — contributed 2 concept elements to this direction.
Some Frills for the Modal Tic-Tac-Toe of Davies and Isard: Semantics of Predicate Complement Constructions (1973) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_compositional_semantic_parsing_17e366cf,
  title = {compositional semantic parsing},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/compositional-semantic-parsing/rdr_17e366cf169e42548484a544cc9598f9},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-26},
}

This exact version (version 1, frozen text):

@misc{lacuna_compositional_semantic_parsing_17e366cf_v1,
  title = {compositional semantic parsing},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/compositional-semantic-parsing/rdr_17e366cf169e42548484a544cc9598f9/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-26},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake