Generating Texts with Integer Linear Programming

Gerasimos Lampouras, Ion AndroutsopoulosarXiv 2018

Abstract

Concept-to-text generation typically employs a pipeline architecture, which often leads to suboptimal texts. Content selection, for example, may greedily select the most important facts, which may require, however, too many words to express, and this may be undesirable when space is limited or expensive. Selecting other facts, possibly only slightly less important, may allow the lexicalization stage to use much fewer words, or to report more facts in the same space. Decisions made during content selection and lexicalization may also lead to more or fewer sentence aggregation opportunities, affecting the length and readability of the resulting texts. Building upon on a publicly available state of the art natural language generator for Semantic Web ontologies, this article presents an Integer Linear Programming model that, unlike pipeline architectures, jointly considers choices available in content selection, lexicalization, and sentence aggregation to avoid greedy local decisions and produce more compact texts, i.e., texts that report more facts per word. Compact texts are desirable, for example, when generating advertisements to be included in Web search results, or when summarizing structured information in limited space. An extended version of the proposed model also considers a limited form of referring expression generation and avoids redundant sentences. An approximation of the two models can be used when longer texts need to be generated. Experiments with three ontologies confirm that the proposed models lead to more compact texts, compared to pipeline systems, with no deterioration or with improvements in the perceived quality of the generated texts.

Introduction

Most concept-to-text generation systems—which transform structured data like OWL ontologies into human-readable text—rely on a traditional pipeline architecture. In this setup, the system sequentially decides what to say (content selection), how to say it (lexicalization), and how to combine those statements (aggregation).

The primary drawback of this approach is its inherent "greediness." Because each stage is unaware of the others, the content selector might pick the most important facts without realizing they are wordy or difficult to aggregate. Conversely, a slightly less important fact might be much easier to express concisely or merge into a punchy sentence. This paper addresses this suboptimality by proposing an Integer Linear Programming (ILP) framework that jointly optimizes these decisions to maximize information density.

Methodology

The authors introduce two primary ILP models to replace the middle stages of the NaturalOWL generation system:

1. The Basic ILP Model

This model treats text generation as a global optimization problem. It uses an objective function to maximize the total "importance" of selected facts while minimizing the cost, defined as the number of distinct linguistic elements (words or phrases) used. It simultaneously determines which facts to include, which sentence plans to utilize, and how to group them into "buckets" for aggregation.

2. The Extended ILP Model

This version incorporates a limited form of referring expression generation. It can choose between multiple names for an entity; for instance, it might select a longer name like "the Napa Region Bancroft Chardonnay wine" if that name implicitly conveys other facts, thereby saving the need for additional sentences.

Lexicalization and Sentence Plans

In these models, each fact is mapped to a sentence plan. These plans define the linguistic structure and grammatical constraints required to express a fact.

Figure 1: A structured sentence plan for the phrase "a famous wine," illustrating slots for an article, adjective, and head noun with associated grammatical features.

3. Approximation Model

Because ILP is NP-hard, the authors developed a "one-sentence-at-a-time" approximation for longer texts. This greedy version solves the ILP for a single aggregated sentence, removes those facts from the pool, and repeats the process, ensuring practical runtimes for complex descriptions.

Experimental Evaluation

The models were tested across three distinct OWL ontologies:

  • Wine Ontology: A classic benchmark with 14 relations and 52 individuals.
  • Consumer Electronics Ontology: Used to generate descriptions for 30 products (e.g., cameras, printers) with up to 21 facts each.
  • Disease Ontology: A large-scale dataset used to test the model's ability to handle complex, multi-word symptoms and medical relations.

Key Results and Insights

  • Higher Information Density: In all domains, the ILP models consistently achieved higher "facts-per-word" ratios than traditional pipeline baselines.
  • Improved Quality: Human evaluations by computer science students showed that joint optimization does not sacrifice fluency. In fact, ILP-generated texts often received higher scores for sentence fluency and text structure because the model finds more natural opportunities to merge related ideas.
  • Practicality: For typical description lengths (3-10 sentences), off-the-shelf ILP solvers found global optimums in fractions of a second, proving the approach is viable for real-time applications.

Conclusion

By moving away from greedy pipeline architectures toward joint optimization, this research demonstrates that it is possible to produce more compact and informative texts without deteriorating linguistic quality. Future work will explore integrating high-level text planning and more dynamic user-modeling components to weight fact importance based on specific reader needs.

Summary updated

BibTeX
@misc{lampouras2018generating,
  author = {Gerasimos Lampouras and Ion Androutsopoulos},
  title = {{Generating Texts with Integer Linear Programming}},
  year = {2018},
  eprint = {1811.00051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.00051},
}
Figure