A Generalized Language Model as the Combination of Skipped n-grams and Modified Kneser-Ney Smoothing

Rene Pickhardt, Thomas Gottron, Martin Körner, Paul Georg Wagner, Till Speicher, Steffen Staab

TL;DR

This paper introduces a "generalized language model" (GLM) that significantly improves upon traditional n-gram models by incorporating "skip n-grams" and modified Kneser-Ney smoothing. This novel approach leads to substantial reductions in perplexity, especially in scenarios with sparse training data, making language models more robust and efficient.

What Problem Does This Paper Address?

Language models are fundamental to many NLP tasks, predicting the probability of word sequences. The core challenge in building these models is the "combinatorial explosion" and "data sparsity." As we try to predict words based on longer and longer preceding sequences (higher-order n-grams), the number of possible sequences grows exponentially, and we encounter many sequences in training data that are rare or never seen. This leads to unreliable probability estimates. Traditional methods like Kneser-Ney smoothing try to mitigate this by interpolating with lower-order models (shorter contexts). However, these methods still struggle when a single rare word in a context makes the entire sequence rare. This paper addresses the limitation of traditional smoothing by proposing a more systematic way to leverage information from contexts that are similar but not identical to the target context.

Methods

The paper's core innovation is the Generalized Language Model (GLM). It builds upon the established Modified Kneser-Ney (MKN) smoothing technique. MKN smoothing interpolates higher-order n-gram models with lower-order models by essentially "backing off" to a shorter context (omitting the first word). The GLM extends this by systematically exploring skip n-grams.

A skip n-gram allows for "gaps" within the n-gram sequence. For example, instead of just considering w1 w2 w3, a skip n-gram could consider w1 _ w3 (where _ represents a skipped word). The GLM interpolates the higher-order model not just with the standard lower-order model (omitting the first word), but with all possible lower-order models derived by skipping one word at any position within the context. This is achieved by defining a notation for skip operators and extending the count functions and interpolation weights to accommodate these skipped words. Essentially, the GLM leverages more diverse, yet related, contexts to improve probability estimations, especially for rare events.

Datasets

The authors evaluated their approach on a variety of datasets:

  • General Domain: Wikipedia corpora for four languages: German (de), English (en), French (fr), and Italian (it).
  • Special Purpose Domain: The multi-lingual JRC-Acquis corpus of legislative texts for German (de), English (en), and French (fr).

These datasets were split into training and testing sets. The paper also describes experiments using progressively smaller training data subsets to specifically test performance under data sparsity conditions.

Key Insights and Ideas

  • Skip n-grams offer a richer way to leverage context: By allowing gaps, skip n-grams can capture word relations beyond fixed consecutive sequences, effectively increasing the number of observed word combinations without a prohibitive increase in model complexity.
  • Systematic exploration of skips is key: The GLM's strength lies in its systematic interpolation with all possible single-word skip n-grams, not just a few hand-picked ones. This ensures that more relevant, albeit slightly different, contexts are considered.
  • GLM is a true generalization: The paper demonstrates mathematically and empirically that the standard MKN smoothed language model is a special case of the proposed GLM.
  • Sparse data is where GLMs shine: The most significant improvements are observed when training data is scarce, directly addressing the core problem of data sparsity in language modeling.

Key Results

The GLM consistently outperformed the baseline Modified Kneser-Ney (MKN) models across all tested datasets and model orders (n=3 to 5).

  • General Improvement: Relative perplexity reductions ranged from 3.1% to 12.7% on large datasets.
  • Impact of Model Order: Improvements were more pronounced for higher-order models (n=5).
  • Domain Differences: GLMs showed a slightly larger benefit on broad domain text (Wikipedia) compared to specialized domains (JRC-Acquis).
  • Sparse Data Performance: On very small training datasets (e.g., 0.008% of the data), the GLM achieved remarkable perplexity reductions of up to 25.7% compared to MKN.
  • Model Size Efficiency: The paper notes that GLMs can achieve competitive or better performance with smaller models trained on less data, suggesting potential for more efficient model deployment.

Limitations and Future Work

  • Weighting of Lower Order Models: The current GLM interpolates all lower-order skip models with equal weight. Future work could explore assigning different weights based on the statistical reliability of each skip n-gram.
  • Compression and Indexing: For very large models, efficient compression and indexing techniques are needed to improve memory usage and computation speed.
  • Scalability: Applying MapReduce techniques is suggested to scale the approach to even larger datasets.
  • Higher Order Skips: The paper focuses on single-word skips. Investigating models with multiple skips or more complex skip patterns could be beneficial.
  • Application Benefits: The authors plan to explore how the improved performance of GLMs translates to downstream NLP applications like machine translation, speech recognition, and text classification.

Summary updated

BibTeX
@inproceedings{pickhardt2014generalized,
  author = {Rene Pickhardt and Thomas Gottron and Martin Körner and Paul Georg Wagner and Till Speicher and Steffen Staab},
  title = {{A Generalized Language Model as the Combination of Skipped n-grams and Modified Kneser-Ney Smoothing}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2014},
  doi = {10.3115/v1/p14-1108},
}
Figure