Syntax-Based Word Ordering Incorporating a Large-Scale Language Model

Yue Zhang, Graeme W. Blackwood, Stephen Clark

Abstract

This paper addresses the word ordering problem in natural language generation by integrating a syntax-based Combinatory Categorial Grammar (CCG) model with a large-scale N-gram language model. By transitioning from standard perceptron training to a robust online large-margin algorithm (MIRA), the authors achieve significant improvements in fluency and grammatical accuracy. Experimental results demonstrate a gain of up to 6.0 BLEU points over previous state-of-the-art methods.

Introduction

Word ordering—the task of arranging a set of words into a grammatical and fluent sentence—is a fundamental challenge in natural language processing. Computationally, finding the optimal permutation is NP-hard, even with simple bigram models. While machine translation systems often use constraints like "distortion limits" or grammars to prune the search space, unconstrained word ordering remains difficult. Previous syntax-based approaches, such as those using CCG, have shown promise but often lack the local fluency provided by large-scale N-gram language models. This research bridges that gap by incorporating a massive language model into a syntax-driven framework.

Methodology

The proposed system builds upon the bottom-up, best-first search algorithm of Zhang and Clark (2011). Two primary innovations are introduced:

1. Online Large-Margin Training

The standard perceptron algorithm is replaced with a Margin Infused Relaxed Algorithm (MIRA). This online large-margin approach ensures a "margin" of separation between the scores of correct (gold-standard) syntactic edges and incorrect ones. This leads to more stable convergence and better guidance during the search process.

2. N-gram Language Model Integration

A 4-gram language model, trained on over 1 billion tokens, is integrated using linear interpolation. The final scoring function $F(e)$ balances the syntax score $f(e)$ with language model scores $g(e)$ for 4-grams, trigrams, and bigrams: $F(e) = f(e) + \alpha \cdot g_{four}(e) + \beta \cdot g_{tri}(e) + \gamma \cdot g_{bi}(e)$

The decoding process utilizes an agenda-based best-first search, where the most promising hypotheses are expanded first, constrained by a timeout mechanism to maintain tractability.

Experimental Setup

The syntactic model was trained on Sections 2–21 of the CCGBank, with Section 00 for development and Section 23 for testing. The 4-gram language model was trained on the AFP and XIN subsets of the English GigaWord v4 corpus, totaling over 1 billion tokens, using the SRILM toolkit with Kneser-Ney smoothing.

Results and Discussion

The integration of large-margin training and a large-scale language model yielded substantial performance gains.

Figure 1: BLEU score progression over training iterations for the baseline, margin-based, and margin+LM models.

As shown in Figure 1, the margin-based training alone provides a significant boost over the baseline, while the addition of the language model further improves performance and stability. Quantitatively, the baseline (Z&C 2011) achieved 40.1 BLEU points, whereas the full system (Large-Margin + LM) reached 43.8 BLEU points (without pruning) and up to 46.1 BLEU points with lexical category pruning.

Qualitatively, the system produces more coherent and grammatically sound sentences.

Figure 4: Qualitative comparison of generated sentences across different models.

As illustrated in Figure 4, the "margin +LM" model correctly handles complex structures, such as placing titles like "nonexecutive director" before names, where the baseline and margin-only models often struggle with word placement and local fluency.

Conclusion

Combining global syntactic structure with local N-gram fluency significantly advances the state-of-the-art in word ordering. While the system shows marked improvements, a "fluency gap" remains for long, complex sentences. Future work will explore applying this framework to downstream tasks like machine translation and summarization to leverage additional source-text constraints.

Summary updated

BibTeX
@inproceedings{zhang2012syntax,
  author = {Yue Zhang and Graeme W. Blackwood and Stephen Clark},
  title = {{Syntax-Based Word Ordering Incorporating a Large-Scale Language Model}},
  booktitle = {EACL},
  year = {2012},
}
Figure