Natural Language Generation by Hierarchical Decoding with Linguistic Patterns

Shang-Yu Su, Kai-Ling Lo, Yi Ting Yeh, Yun-Nung Chen

Abstract

Natural language generation (NLG) is a critical component in spoken dialogue systems. Classic NLG can be divided into two phases: (1) sentence planning: deciding on the overall sentence structure, (2) surface realization: determining specific word forms and flattening the sentence structure into a string. Many simple NLG models are based on recurrent neural networks (RNN) and sequence-to-sequence (seq2seq) model, which basically contains an encoder-decoder structure; these NLG models generate sentences from scratch by jointly optimizing sentence planning and surface realization using a simple cross entropy loss training criterion. However, the simple encoder-decoder architecture usually suffers from generating complex and long sentences, because the decoder has to learn all grammar and diction knowledge. This paper introduces a hierarchical decoding NLG model based on linguistic patterns in different levels, and shows that the proposed method outperforms the traditional one with a smaller model size. Furthermore, the design of the hierarchical decoding is flexible and easily-extensible in various NLG systems.

Introduction

In modern dialogue systems, the Natural Language Generation (NLG) component is responsible for converting structured data (e.g., "Name: All Bar One, Food: Italian") into human-like sentences. While standard encoder-decoder (seq2seq) models are popular, they often struggle with long or grammatically complex sentences. The core issue is that a single decoder is tasked with learning everything simultaneously: vocabulary, syntax, and global sentence structure. This "all-at-once" approach often leads to models that lack a deep understanding of linguistic hierarchy, resulting in outputs that are either repetitive or grammatically incoherent as sentence length increases.

Methods

The proposed framework introduces a Hierarchical Decoder that decomposes the generation process into four distinct layers, each responsible for a specific set of Part-of-Speech (POS) tags. This approach is bio-inspired, mimicking child language acquisition where basic keywords are learned before complex grammar.

Architecture of the Hierarchical Decoding NLG model.

The hierarchy is structured as follows:

  1. Layer 1 (NOUN + PROPN + PRON): Generates the "skeleton" of the sentence.
  2. Layer 2 (VERB): Adds actions to the skeleton.
  3. Layer 3 (ADJ + ADV): Incorporates descriptors.
  4. Layer 4 (Others): Adds function words like prepositions and conjunctions to finalize the sentence.

To facilitate this multi-layer decoding, three key mechanisms are employed:

  • Repeat-Input Mechanism: Ensures consistency by feeding the output of a lower layer as input to the next. If a layer does not add a new word at a specific time step, it repeats the token from the previous layer.
  • Inter-Layer Teacher Forcing: During training, ground-truth labels from previous layers are used to prevent error propagation from hindering the learning of higher layers.
  • Curriculum Learning: The model is trained progressively, starting with simple noun-only versions and gradually moving up the hierarchy to full sentences.

Results and Evaluation

The model was evaluated using the E2E NLG Challenge dataset, which contains 50,000 instances in the restaurant domain. The task involves generating natural language descriptions from semantic frames.

Performance comparison of various NLG model configurations on the E2E dataset.

As shown in the results table, the hierarchical model (configuration 'e', "+ All") significantly outperformed the standard seq2seq baseline across most metrics. Notably, while BLEU scores remained competitive, the ROUGE scores—which measure recall and overlap—saw massive gains. ROUGE-1 improved from 51.6 to 67.3 (a 30.4% relative increase), and ROUGE-L improved from 40.6 to 53.8 (a 32.5% relative increase).

Furthermore, the hierarchical approach proved more efficient. By introducing a specific "linguistic bias" through the POS hierarchy, the model achieved these superior results with only 520k parameters, compared to the 640k parameters required by the baseline—an 18% reduction in model size. Ablation studies (rows 'b' through 'd') highlight that the combination of Repeat-Input and Curriculum Learning is critical for these performance leaps.

Conclusion

This paper demonstrates that a hierarchical decoding framework based on linguistic patterns can effectively address the limitations of standard seq2seq models in NLG tasks. By decomposing the decoding process, the model achieves higher quality output with fewer parameters. Future research may explore optimizing the POS groupings or investigating the model's generalizability to more creative writing domains where linguistic patterns are less predictable.

Summary updated

BibTeX
@inproceedings{su2018natural,
  author = {Shang-Yu Su and Kai-Ling Lo and Yi Ting Yeh and Yun-Nung Chen},
  title = {{Natural Language Generation by Hierarchical Decoding with Linguistic Patterns}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=B1bp27-O-B},
}
Figure