Sentence generation as a planning problem

Alexander Koller, Matthew StoneACL 2007

Abstract

We translate sentence generation from Lexicalized Tree-Adjoining Grammars (LTAG) with semantic and pragmatic information into a planning problem by encoding the contribution of each word declaratively and explicitly. This allows us to exploit the performance of off-the-shelf planners. It also opens up new perspectives on referring expression generation and the relationship between language and action.

1. Introduction

Natural language generation (NLG) is the task of synthesizing linguistic primitives into well-formed sentences that achieve specific communicative goals. Traditionally, NLG systems employ a pipeline architecture: a "sentence planner" determines content and referring expressions, followed by a "surface realizer" that constructs the grammatical tree.

This sequential approach often suffers from rigidity, as earlier stages cannot anticipate the syntactic constraints of later ones. While integrated systems like SPUD have attempted to bridge this gap, they often rely on specialized, custom search algorithms. This paper proposes a novel alternative: mapping the integrated generation process directly into a standard AI planning framework using PDDL (Planning Domain Definition Language). By doing so, NLG can leverage the significant performance optimizations found in general-purpose, off-the-shelf heuristic planners.

2. Integrated Generation with LTAG

The core of the methodology involves modeling sentence generation using Lexicalized Tree-Adjoining Grammars (LTAG). In LTAG, the grammar consists of elementary trees that are combined through two primary operations: substitution and adjunction.

LTAG elementary trees and their combination via substitution and adjunction for the sentence 'Mary likes the white rabbit'.

As shown in Figure 1, substitution (indicated by downward arrows) fills open slots in a tree, while adjunction (indicated by asterisks) allows for the insertion of auxiliary structures, such as adjectives. The authors treat the selection of each word—and its associated elementary tree—as a discrete planning action.

3. Mapping NLG to PDDL

To translate this into a PDDL planning problem, the authors define syntax, semantics, and pragmatics as state variables and operators:

  • Syntax as State: The planning state tracks open grammatical slots. An action (adding a word) requires a specific open slot as a precondition and results in filling that slot while potentially introducing new ones.
  • Semantics as Goals: The goal state is defined by the set of facts the speaker intends to communicate. Each word action has semantic effects that satisfy these goals.
  • Pragmatics and Referring Expressions (REs): The system manages the listener's mental state by tracking "distractors"—objects that could be confused with the target entity. Descriptive words like "white" act as planning steps that eliminate these distractors. A plan is considered complete only when the target reference is unique (zero distractors remain).
The generation process represented as a sequence of planning steps in PDDL, showing causal links between substitution and adjunction actions.

Figure 6 illustrates the resulting planning graph. The unified state-space search eliminates the artificial boundary between choosing words for grammar and choosing words for meaning, allowing the planner to find the most efficient path to satisfy all constraints simultaneously.

4. Evaluation and Results

The approach was validated using the FF (Fast Forward) planner on custom LTAG grammars. The results demonstrate that modern planners are highly capable of handling the complexities of NLG:

  • Efficiency: Basic sentences were generated in under 100 ms.
  • Scalability: The system scaled well with both lexicon size and sentence complexity. For instance, generating a complex noun phrase with six adjectives took 890 ms.
  • Comparison: When compared to a greedy search baseline (similar to SPUD), the FF planner showed superior scaling for larger inputs. Furthermore, unlike greedy approaches, the planning-based method is complete, ensuring a valid sentence will be found if one exists within the grammar.

5. Conclusion and Future Work

By compiling NLG into PDDL, the authors demonstrate that sentence generation can be treated as a pure planning problem, benefiting from decades of research in automated planning. However, challenges remain. The "grounding bottleneck"—where the planner instantiates all possible actions upfront—can lead to significant overhead in large domains. Future research will focus on lazy instantiation and improving the handling of complex relational references, such as "the rabbit in the hat," where mutual constraints between entities must be resolved.

Summary updated

BibTeX
@inproceedings{koller2007sentence,
  author = {Alexander Koller and Matthew Stone},
  title = {{Sentence generation as a planning problem}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2007},
  url = {https://openreview.net/forum?id=H1NTqhlubr},
}
Figure